{"version":3,"sources":["webpack:///./src/views/administrator/AddStudent.vue?34fb","webpack:///./src/views/administrator/AddStudent.vue","webpack:///./src/views/administrator/AddStudent.vue?b5e4","webpack:///./src/views/administrator/AddStudent.vue?5500","webpack:///./node_modules/core-js/modules/es.array.splice.js"],"names":["_hoisted_1","class","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","key","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","render","_ctx","_cache","$props","$setup","$data","$options","_component_DetailsHeader","_component_TextInput","_component_router_link","_component_PersonDetails","_component_MandatoryFieldFlag","_component_CourseInput","_component_Accordion","_component_DatePicker","title","$t","showPrevious","showNext","onBack","$event","navigateToOverview","ref","label","required","placeholder","maxLength","pattern","value","this","personalId","onKeyup","fetchStudent","id","disabled","fetchButtonIsDisabled","onClick","personResponse","studentExists","to","name","params","student","default","_","saveWasSuccessful","showNameMsg","addedStudent","isActiveNoteTaker","innerHTML","noteTakerId","showStudentDetails","person","showCourses","showCoordinator","showDatePicker","editCoordinator","functionId","requiredCoordinator","hasLaterStartDates","laterStartDateText","terms","term","expanded","button","getTermString","content","getCoursesByTerm","course","courseCode","isHighlighted","isCourseWithLaterStartDate","courseUid","isCompleted","isCompletedCourse","onCourseCheckedChanged","grantedSupportDate","clearable","disabledDates","onCancelClicked","saveButtonIsDisabled","onSaveClicked","components","TextInput","CourseInput","DatePicker","PersonDetails","MandatoryFieldFlag","DetailsHeader","Accordion","data","studentIsSaved","coursesOption","NoteTakingFunctionId","date","Date","coursesWithLaterStartDate","Array","computed","length","selectedCourses","filter","checked","coordinatorId","saveWasSuccessfulMsg","msg","student_name","firstName","lastName","getTerms","methods","getStudentResponseByPersonalId","replace","courses","map","$store","commit","supportCourses","addOrUpdateStudent","then","focusTextInput","catch","e","console","error","finally","$refs","personalIdInput","focus","$router","push","localeKey","full_name","checkGrantedSupportDate","dateAisBeforeDateB","courseStartDate","undefined","find","x","index","indexOf","splice","watch","mounted","unmounted","studentResponse","__exports__","$","global","toAbsoluteIndex","toIntegerOrInfinity","lengthOfArrayLike","toObject","arraySpeciesCreate","createProperty","arrayMethodHasSpeciesSupport","HAS_SPECIES_SUPPORT","TypeError","max","Math","min","MAX_SAFE_INTEGER","MAXIMUM_ALLOWED_LENGTH_EXCEEDED","target","proto","forced","start","deleteCount","insertCount","actualDeleteCount","A","k","from","O","len","actualStart","argumentsLength","arguments"],"mappings":"yIAGMA,EAAa,CAAEC,MAAO,aACtBC,EAAa,CAAED,MAAO,QACtBE,EAAa,CAAEF,MAAO,kBACtBG,EAAa,CAAEH,MAAO,wBACtBI,EAAa,CAAC,WAAY,cAC1BC,EAAa,CACjBC,IAAK,EACLN,MAAO,qBAEHO,EAAa,CACjBD,IAAK,EACLN,MAAO,gBAEHQ,EAAa,CACjBF,IAAK,EACLN,MAAO,mBAEHS,EAAa,CAAET,MAAO,qBACtBU,EAAc,CAClBJ,IAAK,EACLN,MAAO,gBAEHW,EAAc,CAClBL,IAAK,EACLN,MAAO,gBAEHY,EAAc,CAClBN,IAAK,EACLN,MAAO,gBAEHa,EAAc,CAAC,aACfC,EAAc,CAAEd,MAAO,wBACvBe,EAAc,CAAET,IAAK,GACrBU,EAAc,CAAEhB,MAAO,kBACvBiB,EAAc,CAClBX,IAAK,EACLN,MAAO,8BAEHkB,EAAc,CAAElB,MAAO,oBACvBmB,EAAc,CAAEnB,MAAO,oBACvBoB,EAAc,CAAC,cACfC,EAAc,CAAC,aAAc,YAE7B,SAAUC,EAAOC,EAAUC,EAAYC,EAAYC,EAAYC,EAAWC,GAAa,WACrFC,EAA2B,eAAkB,iBAC7CC,EAAuB,eAAkB,aACzCC,EAAyB,eAAkB,eAC3CC,EAA2B,eAAkB,iBAC7CC,EAAgC,eAAkB,sBAClDC,EAAyB,eAAkB,eAC3CC,EAAuB,eAAkB,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AAmBE,IACjCC,EAAOG,EAAcJ,EACjBC,KAAQC,GAAGnB,EAAegB,EAAGC,EAAGE,EAAED,IAGxC,GADAF,EAAEvE,OAASsE,EACPD,EAAcC,EAAmB,CACnC,IAAKE,EAAII,EAAaJ,EAAIG,EAAML,EAAmBE,IACjDC,EAAOD,EAAIF,EACXlI,EAAKoI,EAAIH,EACLI,KAAQC,EAAGA,EAAEtI,GAAMsI,EAAED,UACbC,EAAEtI,GAEhB,IAAKoI,EAAIG,EAAKH,EAAIG,EAAML,EAAoBD,EAAaG,WAAYE,EAAEF,EAAI,QACtE,GAAIH,EAAcC,EACvB,IAAKE,EAAIG,EAAML,EAAmBE,EAAII,EAAaJ,IACjDC,EAAOD,EAAIF,EAAoB,EAC/BlI,EAAKoI,EAAIH,EAAc,EACnBI,KAAQC,EAAGA,EAAEtI,GAAMsI,EAAED,UACbC,EAAEtI,GAGlB,IAAKoI,EAAI,EAAGA,EAAIH,EAAaG,IAC3BE,EAAEF,EAAII,GAAeE,UAAUN,EAAI,GAGrC,OADAE,EAAE1E,OAAS2E,EAAML,EAAoBD,EAC9BE","file":"assets/js/chunk-1ed77747.435423db.js","sourcesContent":["import { resolveComponent as _resolveComponent, createVNode as _createVNode, withKeys as _withKeys, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, normalizeClass as _normalizeClass, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-0cf7bb3d\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"container\" }\nconst _hoisted_2 = { class: \"card\" }\nconst _hoisted_3 = { class: \"form-container\" }\nconst _hoisted_4 = { class: \"text-input-container\" }\nconst _hoisted_5 = [\"disabled\", \"aria-label\"]\nconst _hoisted_6 = {\n key: 0,\n class: \"student-container\"\n}\nconst _hoisted_7 = {\n key: 0,\n class: \"unsuccessful\"\n}\nconst _hoisted_8 = {\n key: 1,\n class: \"save-successful\"\n}\nconst _hoisted_9 = { class: \"student-container\" }\nconst _hoisted_10 = {\n key: 2,\n class: \"unsuccessful\"\n}\nconst _hoisted_11 = {\n key: 3,\n class: \"unsuccessful\"\n}\nconst _hoisted_12 = {\n key: 4,\n class: \"unsuccessful\"\n}\nconst _hoisted_13 = [\"innerHTML\"]\nconst _hoisted_14 = { class: \"note-taker-container\" }\nconst _hoisted_15 = { key: 5 }\nconst _hoisted_16 = { class: \"info-container\" }\nconst _hoisted_17 = {\n key: 0,\n class: \"later-start-date-container\"\n}\nconst _hoisted_18 = { class: \"later-start-date\" }\nconst _hoisted_19 = { class: \"button-container\" }\nconst _hoisted_20 = [\"aria-label\"]\nconst _hoisted_21 = [\"aria-label\", \"disabled\"]\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_DetailsHeader = _resolveComponent(\"DetailsHeader\")!\n const _component_TextInput = _resolveComponent(\"TextInput\")!\n const _component_router_link = _resolveComponent(\"router-link\")!\n const _component_PersonDetails = _resolveComponent(\"PersonDetails\")!\n const _component_MandatoryFieldFlag = _resolveComponent(\"MandatoryFieldFlag\")!\n const _component_CourseInput = _resolveComponent(\"CourseInput\")!\n const _component_Accordion = _resolveComponent(\"Accordion\")!\n const _component_DatePicker = _resolveComponent(\"DatePicker\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(_component_DetailsHeader, {\n title: _ctx.$t('shared.routes.add-student'),\n showPrevious: false,\n showNext: false,\n onBack: _cache[0] || (_cache[0] = ($event: any) => (_ctx.navigateToOverview()))\n }, null, 8, [\"title\"]),\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\n _createVNode(_component_TextInput, {\n class: \"mr-2 personal-id-input\",\n ref: \"personalIdInput\",\n label: _ctx.$t('person.personalId'),\n required: true,\n placeholder: _ctx.placeholder,\n maxLength: _ctx.maxLength,\n pattern: _ctx.pattern,\n value: this.personalId,\n \"onUpdate:value\": _cache[1] || (_cache[1] = ($event: any) => ((this.personalId) = $event)),\n onKeyup: _withKeys(_ctx.fetchStudent, [\"enter\"])\n }, null, 8, [\"label\", \"placeholder\", \"maxLength\", \"pattern\", \"value\", \"onKeyup\"]),\n _createElementVNode(\"button\", {\n id: \"fetchBtn\",\n class: \"btn btn-outline-primary\",\n disabled: _ctx.fetchButtonIsDisabled,\n \"aria-label\": _ctx.$t('shared.search'),\n onClick: _cache[2] || (_cache[2] = ($event: any) => (_ctx.fetchStudent()))\n }, _toDisplayString(_ctx.$t(\"shared.search\")), 9, _hoisted_5)\n ]),\n (_ctx.personResponse)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, [\n (_ctx.personResponse.studentExists)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_7, [\n _createTextVNode(_toDisplayString(_ctx.$t(\"add-student.studentExists\")) + \" \", 1),\n _createVNode(_component_router_link, {\n to: {\n name: 'StudentDetails',\n params: { id: _ctx.personResponse.student.id },\n }\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.personResponse.student.personalId), 1)\n ]),\n _: 1\n }, 8, [\"to\"])\n ]))\n : _createCommentVNode(\"\", true),\n (_ctx.saveWasSuccessful)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_8, [\n _createTextVNode(_toDisplayString(_ctx.showNameMsg(\"add-student.saveSuccessful\")) + \" \", 1),\n _createElementVNode(\"div\", _hoisted_9, [\n _createVNode(_component_router_link, {\n to: {\n name: 'StudentDetails',\n params: { id: _ctx.addedStudent.id },\n }\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.personResponse.student.personalId), 1)\n ]),\n _: 1\n }, 8, [\"to\"])\n ])\n ]))\n : _createCommentVNode(\"\", true),\n (_ctx.saveWasSuccessful === false)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_10, _toDisplayString(_ctx.$t(\"add-student.saveUnsuccessful\")), 1))\n : _createCommentVNode(\"\", true),\n (!_ctx.personResponse.student)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_11, _toDisplayString(_ctx.$t(\"add-student.studentDoesNotExist\")), 1))\n : _createCommentVNode(\"\", true),\n (_ctx.personResponse.isActiveNoteTaker)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_12, [\n _createElementVNode(\"span\", {\n innerHTML: _ctx.showNameMsg('add-student.activeNoteTaker')\n }, null, 8, _hoisted_13),\n _createElementVNode(\"span\", _hoisted_14, [\n _createVNode(_component_router_link, {\n to: {\n name: 'NoteTakerDetails',\n params: { id: _ctx.personResponse.noteTakerId },\n }\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t(\"shared.routes.note-taker-details\")), 1)\n ]),\n _: 1\n }, 8, [\"to\"])\n ])\n ]))\n : _createCommentVNode(\"\", true),\n (_ctx.showStudentDetails)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_15, [\n _createElementVNode(\"div\", _hoisted_16, [\n _createVNode(_component_PersonDetails, {\n person: _ctx.personResponse.student,\n showCourses: false,\n showCoordinator: true,\n showDatePicker: false,\n editCoordinator: true,\n functionId: _ctx.functionId,\n requiredCoordinator: true\n }, null, 8, [\"person\", \"functionId\"]),\n (_ctx.hasLaterStartDates)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_17, [\n _createElementVNode(\"div\", _hoisted_18, _toDisplayString(_ctx.laterStartDateText), 1)\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"p\", null, [\n _createTextVNode(_toDisplayString(_ctx.$t(\"shared.courses\")), 1),\n _createVNode(_component_MandatoryFieldFlag)\n ]),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.terms, (term) => {\n return (_openBlock(), _createBlock(_component_Accordion, {\n key: term,\n class: \"mb-3\",\n expanded: true\n }, {\n button: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.getTermString(term)), 1)\n ]),\n content: _withCtx(() => [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.getCoursesByTerm(term), (course) => {\n return (_openBlock(), _createBlock(_component_CourseInput, {\n key: course.courseCode,\n course: course,\n isHighlighted: \n _ctx.isCourseWithLaterStartDate(course.courseUid)\n ,\n isCompleted: _ctx.isCompletedCourse(course.courseUid),\n onCourseCheckedChanged: _ctx.onCourseCheckedChanged,\n class: _normalizeClass(\n _ctx.isCourseWithLaterStartDate(course.courseUid)\n ? 'highlighted-course'\n : ''\n )\n }, null, 8, [\"course\", \"isHighlighted\", \"isCompleted\", \"onCourseCheckedChanged\", \"class\"]))\n }), 128))\n ]),\n _: 2\n }, 1024))\n }), 128)),\n _createVNode(_component_DatePicker, {\n value: _ctx.personResponse.student.grantedSupportDate,\n \"onUpdate:value\": _cache[3] || (_cache[3] = ($event: any) => ((_ctx.personResponse.student.grantedSupportDate) = $event)),\n label: _ctx.$t('add-student.grantedSupportUntil'),\n required: true,\n clearable: true,\n disabledDates: _ctx.disabledDates\n }, null, 8, [\"value\", \"label\", \"disabledDates\"])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_19, [\n _createElementVNode(\"button\", {\n id: \"cancelBtn\",\n class: \"btn btn-outline-primary mr-2\",\n \"aria-label\": _ctx.$t('shared.cancel'),\n onClick: _cache[4] || (_cache[4] = ($event: any) => (_ctx.onCancelClicked()))\n }, _toDisplayString(_ctx.$t(\"shared.cancel\")), 9, _hoisted_20),\n _createElementVNode(\"button\", {\n id: \"saveBtn\",\n class: \"btn btn-outline-primary\",\n \"aria-label\": _ctx.$t('shared.save'),\n disabled: _ctx.saveButtonIsDisabled,\n onClick: _cache[5] || (_cache[5] = ($event: any) => (_ctx.onSaveClicked()))\n }, _toDisplayString(_ctx.$t(\"shared.save\")), 9, _hoisted_21)\n ])\n ]))\n : _createCommentVNode(\"\", true)\n ]))\n : _createCommentVNode(\"\", true)\n ])\n ])\n ]))\n}","\nimport { Options, Vue } from \"vue-class-component\";\nimport PersonDetails from \"@/components/PersonDetails.vue\";\nimport CourseInput from \"@/components/CourseInput.vue\";\nimport DatePicker from \"@/components/Form/DatePicker.vue\";\nimport TextInput from \"@/components/Form/TextInput.vue\";\nimport MandatoryFieldFlag from \"@/components/Form/MandatoryFieldFlag.vue\";\nimport StudentService from \"@/services/student-service\";\nimport DetailsHeader from \"@/components/DetailsHeader.vue\";\nimport { Course, Student } from \"@/interfaces/api\";\nimport { PersonCourse } from \"@/interfaces/PersonCourse\";\nimport { Constants } from \"@/constants/constants\";\nimport DateHelper from \"@/helpers/date-helper\";\nimport TermHelper from \"@/helpers/term-helper\";\nimport Accordion from \"@/components/Accordion.vue\";\nimport CourseService from \"@/services/course-service\";\n\n@Options({\n components: {\n TextInput,\n CourseInput,\n DatePicker,\n PersonDetails,\n MandatoryFieldFlag,\n DetailsHeader,\n Accordion,\n },\n data: () => ({\n /*\n * A boolean indicating if the student has been saved\n */\n studentIsSaved: false,\n /*\n * Holds a student response object containing the student data and also a boolean value representing whether or not\n * the student already exists in the STP database. It is populated by a call to the student service\n */\n personResponse: null,\n /*\n * Holds the personal id entered in the text input\n */\n personalId: null,\n /*\n * Save call to service returns a boolean value indicating whether the save was successful or not\n * Used to display the result to the user\n */\n saveWasSuccessful: null,\n /**\n * The maximum number of characters the user can enter into the input\n */\n maxLength: 13,\n /**\n * A regular expression the input's value should match\n * - A sequence of up to 12 digits\n * - A sequence of up to 8 digits followed by an optional '+' or '-' and up to 4 digits\n * - A sequence of up to 8 digits followed by an optional '+' or '-' and a single letter followed by up to 3 digits.\n */\n pattern:\n \"^([0-9]{0,12}|[0-9]{0,8}[-+]?[0-9]{0,4}|[0-9]{0,8}[-+]?[A-Z, a-z]{1}[0-9]{0,3})$\",\n /**\n * Copy of student courses with added attribute, \"checked\"\n */\n coursesOption: [],\n /**\n * Required if showCoordinator\n * The functionId to fetch coordinators from\n */\n functionId: Constants.NoteTakingFunctionId,\n /*\n * Disables selection of past dates in the date picker\n */\n disabledDates(date: Date): boolean {\n return date < new Date();\n },\n /**\n * Populated with student courses which have a start date later than the granted support date\n */\n coursesWithLaterStartDate: new Array(),\n }),\n computed: {\n showStudentDetails(): boolean {\n return (\n !this.studentIsSaved &&\n this.personResponse &&\n !this.personResponse.studentExists &&\n this.personResponse.student &&\n !this.personResponse.isActiveNoteTaker\n );\n },\n /*\n * The placeholder for the text input\n */\n placeholder(): string {\n return `${this.$t(\"add-student.personalIdFormat\")}: 20001101-0112`;\n },\n /*\n * Keeps the fetch button disabled until a full 12 number personal id is entered\n */\n fetchButtonIsDisabled(): boolean {\n return this.personalId\n ? this.personalId.length < this.maxLength - 1\n : true;\n },\n /*\n * Selected courses\n */\n selectedCourses(): Array {\n const selectedCourses = this.coursesOption.filter(\n (course: PersonCourse) => course.checked\n );\n return selectedCourses;\n },\n /*\n * Keeps the save button disabled until a non existing student is fetched, courses is selected, student not saved\n */\n saveButtonIsDisabled(): boolean {\n return (\n !this.personResponse ||\n this.personResponse.studentExists ||\n !this.personResponse.student ||\n this.selectedCourses.length <= 0 ||\n !this.personResponse.student.grantedSupportDate ||\n this.saveWasSuccessful ||\n !this.personResponse.student.coordinatorId ||\n this.hasLaterStartDates\n );\n },\n /*\n * The message displayed in the GUI if a save is successful\n */\n saveWasSuccessfulMsg(): string {\n const student = this.personResponse.student;\n const msg = this.$t(\"add-student.saveSuccessful\", {\n student_name: `${student.firstName} ${student.lastName}`,\n });\n return msg;\n },\n /**\n * Gets the terms\n * Eg: ['VT22', 'HT22']\n */\n terms(): string[] {\n return TermHelper.getTerms(this.coursesOption);\n },\n /**\n * The date that the student is granted support until\n */\n grantedSupportDate(): string {\n return this.personResponse && this.personResponse.student\n ? this.personResponse.student.grantedSupportDate\n : null;\n },\n /**\n * Indicates if the granted support date is earlier than any of the selected course start dates\n */\n hasLaterStartDates(): boolean {\n return this.coursesWithLaterStartDate.length > 0;\n },\n /**\n * The text displayed to the user if the granted support date is earlier than any of the selected course start dates\n */\n laterStartDateText(): string {\n return this.$t(\"add-student.later-start-date\");\n },\n },\n methods: {\n /*\n * Calls the student service to fetch data for the student with the specified personal id and also\n * a boolean value indicating whether or not the student already exists in the STP database\n */\n async fetchStudent(): Promise {\n this.studentIsSaved = false;\n if (!this.fetchButtonIsDisabled) {\n this.saveWasSuccessful = null;\n this.personResponse =\n await StudentService.getStudentResponseByPersonalId(\n this.personalId.replace(/-/g, \"\")\n );\n if (this.personResponse.student) {\n this.coursesOption = this.personResponse.student.courses.map(\n (course: Course) => {\n return {\n ...course,\n checked: this.isCompletedCourse(course.courseUid)\n ? false\n : true,\n };\n }\n );\n }\n }\n },\n /*\n * Calls the student service to save the student with the specified personal id in the STP database\n * Service call returns a boolean value indicating whether the save was successful or not\n */\n onSaveClicked(): void {\n this.$store.commit(\"showSpinner\", true);\n this.personResponse.student.supportCourses = this.selectedCourses\n .filter((course: PersonCourse) => course.checked)\n .map((course: PersonCourse) => ({\n courseUid: course.courseUid,\n }));\n\n StudentService.addOrUpdateStudent(this.personResponse.student)\n .then((student: Student) => {\n this.addedStudent = student;\n this.saveWasSuccessful = true;\n this.focusTextInput();\n this.studentIsSaved = true;\n })\n .catch((e: Error) => {\n this.saveWasSuccessful = false;\n console.error(e);\n })\n .finally(() => {\n this.$store.commit(\"showSpinner\", false);\n });\n },\n /*\n * Resets data properties to null which hides all but the text input and fetch button\n */\n onCancelClicked(): void {\n this.personResponse = null;\n this.personalId = null;\n this.saveWasSuccessful = null;\n this.coursesWithLaterStartDate = new Array();\n this.hasLaterStartDates = false;\n this.focusTextInput();\n },\n /*\n * Places focus in the text input\n */\n focusTextInput(): void {\n this.$refs.personalIdInput?.focus();\n },\n\n navigateToOverview() {\n this.$router.push({\n name: \"StudentList\",\n });\n },\n /**\n * Get courses within a term\n *\n * @param {string} term The term\n * @returns {PersonCourse[]} The courses within the term\n */\n getCoursesByTerm(term: string): PersonCourse[] {\n return TermHelper.getCoursesByTerm(this.coursesOption, term);\n },\n getTermString(term: string): string {\n return TermHelper.getTermString(term, this.$t);\n },\n /**\n * The message displayed in the GUI if the person's name is to be used\n */\n showNameMsg(localeKey: string): string {\n const person = this.personResponse.student;\n const msg = this.$t(localeKey, {\n full_name: `${person.firstName} ${person.lastName}`,\n });\n return msg;\n },\n /**\n * Checks if the granted support date is earlier than any of the selected course start dates\n */\n checkGrantedSupportDate(): void {\n if (this.grantedSupportDate) {\n this.coursesWithLaterStartDate = this.selectedCourses.filter(\n (course: PersonCourse) =>\n DateHelper.dateAisBeforeDateB(\n this.grantedSupportDate,\n course.courseStartDate\n )\n );\n }\n },\n /**\n * Checks if the specified course has a later date than the granted support date\n * Used to highlight the course in the GUI\n */\n isCourseWithLaterStartDate(courseUid: string): boolean {\n return (\n this.coursesWithLaterStartDate.find(\n (x: PersonCourse) => x.courseUid === courseUid\n ) !== undefined\n );\n },\n /**\n * Checks whether the course with the specified course Uid has an end date that has passed\n * Used for setting the disabled attribute on the course checkbox\n *\n * @param {string} courseUid The course Uid\n * @returns {boolean} whether the course has an end date that has passed\n */\n isCompletedCourse(courseUid: string): boolean {\n return CourseService.isCompletedCourse(\n courseUid,\n this.personResponse.student.courses\n );\n },\n /**\n * Regulates the coursesWithLaterStartDate array\n */\n onCourseCheckedChanged(course: PersonCourse): void {\n const index = this.coursesWithLaterStartDate.indexOf(course);\n\n if (index > -1) {\n this.coursesWithLaterStartDate.splice(index, 1);\n }\n\n this.checkGrantedSupportDate();\n },\n },\n watch: {\n grantedSupportDate() {\n this.checkGrantedSupportDate();\n },\n },\n mounted() {\n this.focusTextInput();\n },\n unmounted() {\n this.studentResponse = null;\n },\n})\nexport default class AddStudent extends Vue {}\n","import { render } from \"./AddStudent.vue?vue&type=template&id=0cf7bb3d&scoped=true&ts=true\"\nimport script from \"./AddStudent.vue?vue&type=script&lang=ts\"\nexport * from \"./AddStudent.vue?vue&type=script&lang=ts\"\n\nimport \"./AddStudent.vue?vue&type=style&index=0&id=0cf7bb3d&scoped=true&lang=css\"\n\nimport exportComponent from \"C:\\\\GIT\\\\StudentPortal\\\\student-portal-web\\\\node_modules\\\\vue-loader-v16\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-0cf7bb3d\"]])\n\nexport default __exports__","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader-v16/dist/index.js??ref--1-1!./AddStudent.vue?vue&type=style&index=0&id=0cf7bb3d&scoped=true&lang=css\"","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar toObject = require('../internals/to-object');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar createProperty = require('../internals/create-property');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');\n\nvar TypeError = global.TypeError;\nvar max = Math.max;\nvar min = Math.min;\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';\n\n// `Array.prototype.splice` method\n// https://tc39.es/ecma262/#sec-array.prototype.splice\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n splice: function splice(start, deleteCount /* , ...items */) {\n var O = toObject(this);\n var len = lengthOfArrayLike(O);\n var actualStart = toAbsoluteIndex(start, len);\n var argumentsLength = arguments.length;\n var insertCount, actualDeleteCount, A, k, from, to;\n if (argumentsLength === 0) {\n insertCount = actualDeleteCount = 0;\n } else if (argumentsLength === 1) {\n insertCount = 0;\n actualDeleteCount = len - actualStart;\n } else {\n insertCount = argumentsLength - 2;\n actualDeleteCount = min(max(toIntegerOrInfinity(deleteCount), 0), len - actualStart);\n }\n if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {\n throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);\n }\n A = arraySpeciesCreate(O, actualDeleteCount);\n for (k = 0; k < actualDeleteCount; k++) {\n from = actualStart + k;\n if (from in O) createProperty(A, k, O[from]);\n }\n A.length = actualDeleteCount;\n if (insertCount < actualDeleteCount) {\n for (k = actualStart; k < len - actualDeleteCount; k++) {\n from = k + actualDeleteCount;\n to = k + insertCount;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];\n } else if (insertCount > actualDeleteCount) {\n for (k = len - actualDeleteCount; k > actualStart; k--) {\n from = k + actualDeleteCount - 1;\n to = k + insertCount - 1;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n }\n for (k = 0; k < insertCount; k++) {\n O[k + actualStart] = arguments[k + 2];\n }\n O.length = len - actualDeleteCount + insertCount;\n return A;\n }\n});\n"],"sourceRoot":""}