{"version":3,"sources":["webpack:////home/vsts/work/1/s/Websites/src/VueCommon/mixins/EditorialState.js","webpack:///./src/views/PhasingOverview.vue","webpack:///src/views/PhasingOverview.vue","webpack:///./src/views/PhasingOverview.vue?bf58","webpack:///./src/views/PhasingOverview.vue?7923","webpack:///./src/views/PhasingOverview.vue?9d55","webpack:///./src/views/PhasingOverview.vue?2d35"],"names":["methods","stateMessage","state","this","$t","render","_vm","_c","_self","staticClass","phase","userCanEditPhasing","attrs","isEditing","isSaving","isDirty","saveMessage","isExchange","programDetails","ShowInCourseCatalogOrShowInCourseCatalogEdit","on","onSwitchView","savePhasing","_e","loading","_v","_s","acYear","newDataLoading","PhasingLabel","domProps","Text","_l","items","item","index","key","type","_b","updateSave","onDirty","requiredFieldNotFilled","requiredFieldFilled","baseitemsAsRows","rows","row","Id","Title","Baseitems","userCanEditCourse","courseRoute","stringIsNullOrEmpty","Cloned","CourseCatalogHasMultipleBaseItems","class","ToCamelCase","EditorialState","name","params","programSlug","$route","phaseValue","staticRenderFns","components","SideMenu","OverviewHeader","Spinner","mixins","Overview","data","computed","_objectSpread","acYears","currentAcademicYear","program","details","programPhasings","phasings","programBaseitems","phasevalue","baseitems","i","length","push","model","j","h","sort","a","b","CompareBaseItems","identifyingProperty","p","null_id","PhasingValue","facultyId","FacultyId","facultyProgramEditor","roles","ExchangeProgramProgramEditor","indexOf","ExchangeProgramProgramFinalEditor","CourseCatalogProgramEditor","CourseCatalogProgramFinalEditor","Editable","userIsProgramEditor","userIsProgramFinalEditor","userCanEditCourses","userIsCourseEditor","userIsCourseFinalEditor","mapState","watch","populateData","_userCanEditPhasing","_asyncToGenerator","_regeneratorRuntime","mark","_callee","newValue","wrap","_context","prev","next","get","concat","$i18n","locale","phasingOptions","sent","stop","_x","apply","arguments","created","_this","_callee2","_context2","$store","dispatch","then","undefined","createReadOnly","createText","ShowInEnglish","baseItem","facultyBaseItemEditor","ExchangeProgramCourseEditor","ExchangeProgramCourseFinalEditor","CourseCatalogCourseEditor","CourseCatalogCourseFinalEditor","baseitem","baseItemId","BaseItemId","substring","_this2","_callee3","updateKey","programId","_context3","put","post","t0","commit","ob1","ob2","SortId","camelCase","component"],"mappings":"kHAAe,QACbA,QAAS,CACPC,aAAY,SAACC,GACX,MAAc,aAAVA,EAA6BC,KAAKC,GAAG,8BACtB,eAAVF,EAA+BC,KAAKC,GAAG,gCAC7B,WAAVF,EAA2BC,KAAKC,GAAG,iCACzB,8BAAVF,EAA8CC,KAAKC,GAAG,gCACnDD,KAAKC,GAAG,oC,yCCP1B,IAAIC,EAAS,WAAkB,IAAIC,EAAIH,KAAKI,EAAGD,EAAIE,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACE,YAAY,iBAAiB,CAACF,EAAG,MAAM,CAACE,YAAY,yCAAyC,CAAEH,EAAII,OAASJ,EAAIK,mBAAoBJ,EAAG,YAAY,CAACK,MAAM,CAAC,UAAYN,EAAIO,UAAU,SAAWP,EAAIQ,SAAS,QAAUR,EAAIS,QAAQ,YAAcT,EAAIU,YAAY,yBAA2BV,EAAIW,YAAcX,EAAIY,eAAeC,8CAA8CC,GAAG,CAAC,WAAad,EAAIe,aAAa,KAAOf,EAAIgB,eAAehB,EAAIiB,KAAKhB,EAAG,kBAAkB,CAACK,MAAM,CAAC,QAAUN,EAAIY,eAAe,UAAYZ,EAAIO,aAAaN,EAAG,MAAM,CAACE,YAAY,OAAO,CAACF,EAAG,MAAM,CAACE,YAAY,YAAY,CAACF,EAAG,YAAY,CAACE,YAAY,WAAWG,MAAM,CAAC,mBAAqBN,EAAIK,oBAAsBL,EAAIO,cAAc,GAAGN,EAAG,MAAM,CAACE,YAAY,gBAAgB,CAAGH,EAAIkB,QAAk3FjB,EAAG,WAA52FA,EAAG,MAAM,CAACA,EAAG,MAAM,CAACE,YAAY,iBAAiB,CAACH,EAAImB,GAAGnB,EAAIoB,GAAGpB,EAAIF,GAAG,6BAA6B,MAAME,EAAIoB,GAAGpB,EAAIqB,QAAQ,KAAMrB,EAA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AAAhJ,MAAAoC,GAAA,CAAAgH,EAAApC,KAAA,gBAAAoC,EAAApC,KAAA,EACAqC,eAAA,0BAAA3E,EAAA1E,OAAA,OAAAoJ,EAAApC,KAAA,iBAEA,OAAAmC,EAAAzE,EAAAlE,eAAA4B,GAAAgH,EAAApC,KAAA,GACAsC,eAAA,2BAAApC,OAAAiC,GAAAzE,EAAA1E,OAAA,QAEA0E,EAAApE,YAAAqB,KAAA,GAAAyH,EAAApC,KAAA,iBAAAoC,EAAArC,KAAA,GAAAqC,EAAAG,GAAAH,EAAA,YAEA1E,EAAApE,YAAAqB,KAAA,sBAGAqH,EAAAjB,OAAAyB,OAAA,mBAAAN,GACAF,EAAAjB,OAAAC,SAAA,aAAAgB,EAAA9F,OAAAF,QACA0B,EAAAtE,UAAA,2BAAAgJ,EAAA7B,UAAA0B,EAAA,kBApBAzC,IAsBAxB,iBAAA,SAAAyE,EAAAC,GACA,cAAAD,EAAAE,QAAA,OAAAD,EAAAC,OAAA,EACA,OAAAF,EAAAE,QAAA,OAAAD,EAAAC,QAAA,EAEAF,EAAAE,OAAAD,EAAAC,OACA,EACAF,EAAAE,OAAAD,EAAAC,QAIAF,EAAApH,MAAAqH,EAAArH,OAHA,EAKAoH,EAAApH,MAAAqH,EAAArH,MACA,EAEA,GAGAQ,YAAA,SAAArB,GACA,OAAAoI,eAAApI,MCtSwV,I,kCCSpVqI,EAAY,eACd,EACAlK,EACAyD,GACA,EACA,KACA,WACA,MAIa,aAAAyG,E,6CCpBf,W,oCCAA,W","file":"js/chunk-4a14180a.18129cb1.js","sourcesContent":["export default {\n methods: {\n stateMessage(state) {\n if (state === \"Invoeren\") return this.$t(\"editPageLabels.state_enter\");\n else if (state === \"Goedkeuren\") return this.$t(\"editPageLabels.state_approve\");\n else if (state === \"Gereed\") return this.$t(\"editPageLabels.state_complete\");\n else if (state === \"Publiceer alleen de titel\") return this.$t(\"editPageLabels.state_preview\");\n else return this.$t(\"editPageLabels.state_unknown\");\n }\n }\n}\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"bootstrap-hva\"},[_c('div',{staticClass:\"container gutter-hva fix-mobile-width\"},[(_vm.phase && _vm.userCanEditPhasing)?_c('editorBar',{attrs:{\"isEditing\":_vm.isEditing,\"isSaving\":_vm.isSaving,\"isDirty\":_vm.isDirty,\"saveMessage\":_vm.saveMessage,\"showCourseCatalogWarning\":_vm.isExchange && _vm.programDetails.ShowInCourseCatalogOrShowInCourseCatalogEdit},on:{\"switchView\":_vm.onSwitchView,\"save\":_vm.savePhasing}}):_vm._e(),_c('overview-header',{attrs:{\"program\":_vm.programDetails,\"isEditing\":_vm.isEditing}}),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-md-3\"},[_c('side-menu',{staticClass:\"vue-menu\",attrs:{\"userCanEditProgram\":_vm.userCanEditPhasing && _vm.isEditing}})],1),_c('div',{staticClass:\"col col-md-9\"},[(!_vm.loading)?_c('div',[_c('div',{staticClass:\"acYearHeading\"},[_vm._v(_vm._s(_vm.$t('programList.academicYear'))+\" : \"+_vm._s(_vm.acYear)+\" \"),(_vm.newDataLoading)?_c('spinner'):_vm._e()],1),_c('div',{staticClass:\"overview-content phasing-content\"},[(!_vm.isEditing)?_c('div',{staticClass:\"redit\"},[_c('h2',[_vm._v(_vm._s(_vm.phase.PhasingLabel))])]):_vm._e(),(!_vm.isEditing )?[_c('div',{staticClass:\"phasing-description\"},[_c('div',{staticClass:\"text-content\",domProps:{\"innerHTML\":_vm._s(_vm.phase.Text)}})])]:_vm._e(),(_vm.userCanEditPhasing)?_vm._l((_vm.items),function(item,index){return _c('div',{key:index},[(_vm.isEditing)?[(item.type === 'text')?_c('text-item',_vm._b({attrs:{\"set\":\"\",\"edit\":_vm.isEditing},on:{\"change\":_vm.updateSave,\"dirty\":_vm.onDirty,\"requiredFieldNotFilled\":_vm.requiredFieldNotFilled,\"requiredFieldFilled\":_vm.requiredFieldFilled}},'text-item',item,false)):_vm._e(),(item.type == 'readonly')?_c('readonly',_vm._b({attrs:{\"set\":\"\",\"edit\":_vm.isEditing}},'readonly',item,false)):_vm._e()]:_vm._e()],2)}):_vm._e(),_c('div',{staticClass:\"phasing-grid\"},_vm._l((_vm.baseitemsAsRows),function(rows,index){return _c('div',{key:index,staticClass:\"row\"},_vm._l((rows),function(row){return _c('div',{key:row.Id,staticClass:\"col col-md-6\"},[_c('h3',{staticClass:\"phasing-title\"},[_vm._v(_vm._s(row.Title))]),_c('ul',{staticClass:\"phasing-list\"},_vm._l((row.Baseitems),function(item){return _c('li',{key:item.Id},[_c('div',{staticClass:\"phasing-course\"},[(_vm.userCanEditCourse(item) && (_vm.isEditing || !_vm.userCanEditPhasing))?_c('div',{staticClass:\"redit\"},[_c('router-link',{staticClass:\"hva-caret-right\",attrs:{\"to\":_vm.courseRoute(item),\"append\":\"\"}},[_vm._v(_vm._s(item.Title))]),_c('div',{staticClass:\"icons\"},[(!_vm.stringIsNullOrEmpty(item.Cloned))?_c('font-awesome-icon',{attrs:{\"alt\":_vm.$t('general.cloned'),\"title\":_vm.$t('general.cloned'),\"icon\":\"clone\"}}):_vm._e(),(item.CourseCatalogHasMultipleBaseItems)?_c('font-awesome-icon',{attrs:{\"alt\":_vm.$t('general.sharesData'),\"title\":_vm.$t('general.sharesData'),\"icon\":\"link\"}}):_vm._e(),_c('font-awesome-icon',{class:[_vm.ToCamelCase(item.EditorialState), 'redactiestatusOpleiding'],attrs:{\"alt\":_vm.stateMessage(item.EditorialState),\"title\":_vm.stateMessage(item.EditorialState),\"icon\":\"circle\"}})],1)],1):_c('div',[_c('router-link',{staticClass:\"hva-caret-right\",attrs:{\"to\":_vm.courseRoute(item),\"append\":\"\"}},[_vm._v(_vm._s(item.Title))])],1)])])}),0)])}),0)}),0),(!_vm.loading)?_c('router-link',{attrs:{\"target\":\"_blank\",\"to\":{ name: 'print-phasing', params: { programSlug: this.$route.params.programSlug, acYear: _vm.acYear, phaseValue: this.$route.params.phaseValue}}}},[_c('div',{staticClass:\"pdfDownload download-link\"},[_vm._v(_vm._s(_vm.$t(\"general.download\")))]),_c('font-awesome-icon',{staticClass:\"fontAwesome\",attrs:{\"icon\":\"file-pdf\"}}),_c('font-awesome-icon',{staticClass:\"fontAwesome\",attrs:{\"icon\":\"print\"}})],1):_vm._e()],2)]):_c('spinner')],1)])],1)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n\t<div class=\"bootstrap-hva\">\n\t\t<div class=\"container gutter-hva fix-mobile-width\">\n\t\t\t<editorBar v-if=\"phase && userCanEditPhasing\" :isEditing=\"isEditing\" :isSaving=\"isSaving\" :isDirty=\"isDirty\" :saveMessage=\"saveMessage\" :showCourseCatalogWarning=\"isExchange && programDetails.ShowInCourseCatalogOrShowInCourseCatalogEdit\" @switchView=\"onSwitchView\" @save=\"savePhasing\" />\n\t\t\t<overview-header :program=\"programDetails\" :isEditing=\"isEditing\" />\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-md-3\">\n\t\t\t\t\t<side-menu class=\"vue-menu\" :userCanEditProgram=\"userCanEditPhasing && isEditing\" />\n\t\t\t\t</div>\n\t\t\t\t<div class=\"col col-md-9\">\n <div v-if=\"!loading\">\n <div class=\"acYearHeading\">{{$t('programList.academicYear')}} : {{acYear}} <spinner v-if=\"newDataLoading\" /></div>\n <div class=\"overview-content phasing-content\">\n <div v-if=\"!isEditing\" class=\"redit\">\n <h2>{{phase.PhasingLabel}}</h2>\n </div>\n <template v-if=\"!isEditing \">\n <div class=\"phasing-description\">\n <div class=\"text-content\" v-html=\"phase.Text\"></div>\n </div>\n </template>\n <template v-if=\"userCanEditPhasing\">\n <div v-for=\"(item, index) in items\" :key=\"index\">\n <template v-if=\"isEditing\">\n <text-item v-if=\"item.type === 'text'\" v-bind=\"item\" set :edit=\"isEditing\" @change=\"updateSave\" @dirty=\"onDirty\" @requiredFieldNotFilled=\"requiredFieldNotFilled\" @requiredFieldFilled=\"requiredFieldFilled\" />\n <readonly v-if=\"item.type == 'readonly'\" v-bind=\"item\" set :edit=\"isEditing\" />\n </template>\n </div>\n </template>\n <div class=\"phasing-grid\">\n <div class=\"row\" v-for=\"(rows, index) in baseitemsAsRows\" :key=\"index\">\n <div class=\"col col-md-6\" v-for=\"row in rows\" :key=\"row.Id\">\n <h3 class=\"phasing-title\">{{row.Title}}</h3>\n <ul class=\"phasing-list\">\n <li v-for=\"item in row.Baseitems\" :key=\"item.Id\">\n <div class=\"phasing-course\">\n <div v-if=\"userCanEditCourse(item) && (isEditing || !userCanEditPhasing)\" class=\"redit\">\n <router-link class=\"hva-caret-right\" :to=\"courseRoute(item)\" append>{{item.Title}}</router-link>\n <div class=\"icons\">\n <font-awesome-icon v-if=\"!stringIsNullOrEmpty(item.Cloned)\" :alt=\"$t('general.cloned')\" :title=\"$t('general.cloned')\" icon=\"clone\" />\n <font-awesome-icon v-if=\"item.CourseCatalogHasMultipleBaseItems\" :alt=\"$t('general.sharesData')\" :title=\"$t('general.sharesData')\" icon=\"link\" />\n <font-awesome-icon :class=\"[ToCamelCase(item.EditorialState), 'redactiestatusOpleiding']\" :alt=\"stateMessage(item.EditorialState)\" :title=\"stateMessage(item.EditorialState)\" icon=\"circle\" />\n </div>\n </div>\n <div v-else>\n <router-link class=\"hva-caret-right\" :to=\"courseRoute(item)\" append>{{item.Title}}</router-link>\n </div>\n </div>\n </li>\n </ul>\n </div>\n </div>\n </div>\n <router-link v-if=\"!loading\" target=\"_blank\" :to=\"{ name: 'print-phasing', params: { programSlug: this.$route.params.programSlug, acYear: acYear, phaseValue: this.$route.params.phaseValue}}\">\n <div class=\"pdfDownload download-link\">{{$t(\"general.download\")}}</div>\n <font-awesome-icon icon=\"file-pdf\" class=\"fontAwesome\" />\n <font-awesome-icon icon=\"print\" class=\"fontAwesome\" />\n </router-link>\n </div>\n </div>\n <spinner v-else />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</template>\n<script>\nimport OverviewHeader from \"common/components/General/OverviewHeader.vue\";\nimport SideMenu from \"common/components/General/SideMenu.vue\";\nimport Spinner from \"common/components/General/Spinner.vue\";\nimport EditorialState from \"common/mixins/EditorialState.js\";\nimport Overview from \"../mixins/Overview.js\";\nimport { mapState } from \"vuex\";\nimport { get, put, post, camelCase } from 'common/store/storeFunctions.js'\n\nexport default {\n\tcomponents: {\n\t\tSideMenu,\n\t\tOverviewHeader,\n\t\tSpinner\n\t},\n mixins: [EditorialState, Overview],\n data: function() {\n return {\n newDataLoading: false\n\t\t};\n\t},\n computed: {\n acYear() {\n var acYear = this.$route.params.acYear;\n if (acYear == null && this.acYears) {\n acYear = this.acYears.currentAcademicYear;\n }\n return acYear;\n },\n\t\tprogramDetails() {\n\t\t\tif (this.acYear) {\n var params = this.$route.params;\n var key = this.acYear + params.programSlug;\n return this.program[key] ? this.program[key].details : null;\n } else {\n return null;\n }\n\t\t},\n programPhasings() {\n if (this.acYear) {\n var params = this.$route.params;\n var key = this.acYear + params.programSlug;\n return this.program[key] ? this.program[key].phasings : null;\n } else {\n return null;\n }\n\t\t},\n programBaseitems() {\n if (this.acYear) {\n var params = this.$route.params;\n var key = this.acYear + params.programSlug;\n var phasevalue = params.phaseValue;\n return this.program[key] && this.program[key].baseitems ? this.program[key].baseitems[phasevalue] : null;\n } else {\n return null;\n }\n\t\t},\n\t\tbaseitemsAsRows() {\n\t\t\tif (this.programBaseitems) {\n\t\t\t\tvar rows = [];\n\t\t\t\tfor (var i = 0; i < this.programBaseitems.length; i += 2) {\n\t\t\t\t\tvar row = [];\n\t\t\t\t\trow.push(this.programBaseitems[i]);\n\t\t\t\t\tif (this.programBaseitems[i + 1]) {\n\t\t\t\t\t\trow.push(this.programBaseitems[i + 1]);\n\t\t\t\t\t}\n\t\t\t\t\trows.push(row);\n }\n var model = this;\n for (var j = 0; j < rows.length; j++) {\n for (var h = 0; h < rows[j].length; h++) {\n if (rows[j][h].Baseitems) {\n rows[j][h].Baseitems.sort(function (a, b) {\n return model.CompareBaseItems(a, b);\n });\n }\n }\n }\n\t\t\t\treturn rows;\n\t\t\t}\n\t\t\treturn [];\n\t\t},\n\t\tphase() {\n\t\t\tif (this.programPhasings) {\n\t\t\t\tvar phaseValue = this.identifyingProperty ? this.identifyingProperty : this.$route.params.phaseValue;\n\t\t\t\tfor (var i in this.programPhasings) {\n\t\t\t\t\tvar p = this.programPhasings[i];\n\t\t\t\t\tvar null_id = \"00000000-0000-0000-0000-000000000000\";\n\t\t\t\t\tif (p.PhasingValue == phaseValue) {\n\t\t\t\t\t\tif (p.Id == null_id) p.Id = null;\n\t\t\t\t\t\treturn p;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tloading() {\n\t\t\treturn this.programDetails == null || this.programPhasings == null || this.programBaseitems == null;\n\t\t},\n userCanEditPhasing() {\n if (this.programDetails) {\n var facultyId = this.programDetails.FacultyId;\n var facultyProgramEditor = false;\n if (this.isExchange && ((this.roles.ExchangeProgramProgramEditor && this.roles.ExchangeProgramProgramEditor.indexOf(facultyId) != -1) || (this.roles.ExchangeProgramProgramFinalEditor && this.roles.ExchangeProgramProgramFinalEditor.indexOf(facultyId) != -1))) {\n facultyProgramEditor = true;\n }\n if (!this.isExchange && ((this.roles.CourseCatalogProgramEditor && this.roles.CourseCatalogProgramEditor.indexOf(facultyId) != -1) || (this.roles.CourseCatalogProgramFinalEditor && this.roles.CourseCatalogProgramFinalEditor.indexOf(facultyId) != -1))) {\n facultyProgramEditor = true;\n }\n return facultyProgramEditor && this.programDetails.Editable && (this.userIsProgramEditor || this.userIsProgramFinalEditor);\n } else {\n return false;\n }\n\t\t},\n\t\tuserCanEditCourses(){\n\t\t\treturn (this.userIsCourseEditor || this.userIsCourseFinalEditor);\n\t\t},\n\t\t...mapState([\"program\", \"acYears\"])\n\t},\n\twatch:{\n\t\tphase: function(){\n\t\t\tthis.populateData();\n\t\t},\n\t\tuserCanEditPhasing: async function(newValue){\n\t\t\tvar model = this;\n\t\t\tif(newValue){\n\t\t\t\tmodel.phasingOptions = await get(`/api/phasinginfo/getoptions/${model.$i18n.locale == 'nl' ? 1043 : 1033}`)\n\t\t\t}\n\t\t}\n\t},\n\tasync created() {\n var model = this;\n var params = this.$route.params;\n this.$store.dispatch(\"getProgram\", params);\n this.newDataLoading = true;\n\t\tthis.$store.dispatch(\"getBaseitems\", params).then(function(){\n model.newDataLoading = false;\n });\n\t\tthis.populateData();\n\t},\n\tmethods: {\n\t\tpopulateData(){\n\t\t\tvar model = this;\n\t\t\tif(this.phase === undefined || this.phase === null) return;\n this.isEditing = this.userCanEditPhasing;\n\t\t\tthis.items = {\n\t\t\t\t\"commonLabels.phasing\": model.createReadOnly(model.phase, \"commonLabels.phasing\", \"PhasingLabel\", true),\n\t\t\t\t\"phasingPageLabels.description\": model.createText(model.phase, \"phasingPageLabels.description\", \"Text\", false, model.programDetails.ShowInEnglish ? 'en_GB' : null)\n\t\t\t}\n\t\t},\n\t\tuserCanEditCourse(baseItem){\n\t\t\tif(baseItem === undefined || baseItem === null){\n\t\t\t\treturn false;\n }\n var facultyId = baseItem.FacultyId;\n\t\t\tvar facultyBaseItemEditor = false;\n\t\t\tif (this.isExchange && ((this.roles.ExchangeProgramCourseEditor && this.roles.ExchangeProgramCourseEditor.indexOf(facultyId) != -1) || (this.roles.ExchangeProgramCourseFinalEditor && this.roles.ExchangeProgramCourseFinalEditor.indexOf(facultyId) != -1))){\n\t\t\t\tfacultyBaseItemEditor = true;\t\n\t\t\t}\n\t\t\tif (!this.isExchange && ((this.roles.CourseCatalogCourseEditor && this.roles.CourseCatalogCourseEditor.indexOf(facultyId) != -1) || (this.roles.CourseCatalogCourseFinalEditor && this.roles.CourseCatalogCourseFinalEditor.indexOf(facultyId) != -1))){\n\t\t\t\tfacultyBaseItemEditor = true;\t\t\t\t\n }\n\t\t\treturn facultyBaseItemEditor && baseItem.Editable && this.userCanEditCourses\n\t\t},\n\t\tcourseRoute(baseitem) {\n var params = this.$route.params;\n if (params.acYear) {\n return {\n name: \"course-overview\",\n params: {\n programSlug: params.programSlug,\n phaseValue: params.phaseValue,\n baseItemId: baseitem.BaseItemId.substring(4),\n acYear: params.acYear\n }\n };\n } else {\n return {\n name: \"course-overview\",\n params: {\n programSlug: params.programSlug,\n phaseValue: params.phaseValue,\n baseItemId: baseitem.BaseItemId.substring(4)\n }\n };\n }\n\t\t},\n\t\tasync savePhasing(){\n var model = this;\n var params = this.$route.params;\n var key = this.acYear + params.programSlug;\n\t\t\tvar updateKey = `program.${key}.phasings`;\n\t\t\tmodel.isSaving = true;\n\t\t\ttry {\n\t\t\t\tif(this.phase.Id){\n\t\t\t\t\tawait put(\"/api/phasinginfo/update\", model.phase);\n\t\t\t\t} else {\n\t\t\t\t\tvar programId = model.programDetails.Id;\n\t\t\t\t\tawait post(`/api/phasinginfo/create/${programId}`, model.phase);\n\t\t\t\t}\n\t\t\t\tmodel.saveMessage.type = \"\";\n\t\t\t} catch {\n\t\t\t\tmodel.saveMessage.type = \"updateError\";\t\n\t\t\t}\n\t\t\t\n\t\t\tthis.$store.commit(\"resetCacheForKey\", updateKey);\n\t\t\tthis.$store.dispatch(\"getPhasing\", this.$route.params);\n\t\t\tmodel.isSaving = false;\n },\n CompareBaseItems(ob1, ob2) {\n if (ob1.SortId === null && ob2.SortId !== null) return 1;\n else if (ob1.SortId !== null && ob2.SortId === null) return -1;\n\n if (ob1.SortId > ob2.SortId) {\n return 1;\n } else if (ob1.SortId < ob2.SortId) {\n return -1;\n }\n\n if (ob1.Title < ob2.Title) {\n return -1;\n } else if (ob1.Title > ob2.Title) {\n return 1;\n } else {\n return 0;\n }\n },\n ToCamelCase(item){\n return camelCase(item);\n }\n\t}\n};\n</script>\n<style lang=\"less\" scoped>\n#app {\n\t.icons {\n\t\twidth: 20%;\n\t\tdisplay: flex;\n\t\tjustify-content: flex-end;\n }\n .acYearHeading .spinner {\n margin-top: 0px;\n justify-content: unset;\n display: inline-flex;\n height: 30px;\n width: 40px;\n margin-left:10px;\n margin-bottom: -6px;\n }\n}\n</style>\n<style lang=\"less\">\n@import \"../assets/overview.less\";\n</style>\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PhasingOverview.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PhasingOverview.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./PhasingOverview.vue?vue&type=template&id=922137aa&scoped=true\"\nimport script from \"./PhasingOverview.vue?vue&type=script&lang=js\"\nexport * from \"./PhasingOverview.vue?vue&type=script&lang=js\"\nimport style0 from \"./PhasingOverview.vue?vue&type=style&index=0&id=922137aa&prod&lang=less&scoped=true\"\nimport style1 from \"./PhasingOverview.vue?vue&type=style&index=1&id=922137aa&prod&lang=less\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"922137aa\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--11-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../../node_modules/less-loader/dist/cjs.js??ref--11-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PhasingOverview.vue?vue&type=style&index=1&id=922137aa&prod&lang=less\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--11-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../../node_modules/less-loader/dist/cjs.js??ref--11-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PhasingOverview.vue?vue&type=style&index=0&id=922137aa&prod&lang=less&scoped=true\""],"sourceRoot":""}