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AAA;;;SAAXyM;AAAWxM,WAAXwM,WAAW;AAAAvM,cAFV","sources":["./src/app/core/models/course/modal/modal-action.ts","./src/app/core/models/enums/corse-application-status.ts","./src/app/core/models/enums/course-status.ts","./src/app/core/services/course-application.service.ts","./src/app/core/services/feedback-form.service.ts","./src/app/features/admin/academie/courses/components/approver-select-modal/approver-select-modal.component.ts","./src/app/features/admin/academie/courses/components/approver-select-modal/approver-select-modal.component.html","./src/app/features/admin/academie/courses/components/feedback-form/feedback-form-response-modal/feedback-form-response-modal.component.html","./src/app/features/admin/academie/courses/components/feedback-form/feedback-form-response-modal/feedback-form-response-modal.component.ts","./src/app/features/admin/academie/courses/components/upsert-personal-course-modal/upsert-personal-course-modal.component.ts","./src/app/features/admin/academie/courses/components/upsert-personal-course-modal/upsert-personal-course-modal.component.html","./src/app/features/courses/courses-utils.ts"],"sourcesContent":["export enum ModalAction {\n CREATE,\n EDIT,\n COPY\n}\n","export enum CourseApplicationStatus {\n APPLIED = 'APPLIED',\n APPROVED = 'APPROVED',\n ON_WAITING_LIST = 'ON_WAITING_LIST',\n REGISTERED = 'REGISTERED',\n ABSENT = 'ABSENT',\n PRESENT = 'PRESENT',\n COMPLETED = 'COMPLETED',\n NOT_COMPLETED = 'NOT_COMPLETED',\n DENIED = 'DENIED',\n EXCUSED = 'EXCUSED',\n}\n","export enum CourseStatus {\n\n DRAFT = 'DRAFT',\n ANNOUNCED = 'ANNOUNCED',\n OPEN_FOR_REGISTRATION = 'OPEN_FOR_REGISTRATION',\n ONGOING='ONGOING',\n CLOSED_FOR_REGISTRATION = 'CLOSED_FOR_REGISTRATION',\n REOPEN_FOR_REGISTRATION = 'REOPEN_FOR_REGISTRATION',\n CANCELLED = 'CANCELLED',\n FINISHED = 'FINISHED',\n POSTPONED = 'POSTPONED'\n}\n","import {Injectable} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {HttpClient} from '@angular/common/http';\nimport {PageModel} from '../models/shared/page';\nimport {CourseApplication} from '../models/course/course-application';\nimport {UpdateParticipantStatus} from '../models/course/application/update-participant-status';\nimport {Course} from '../models/course/course';\nimport {SubordinateFilters} from '../models/course/participant/subordinate-filters';\nimport {Subordinate} from '../models/course/participant/subordinate';\nimport {CourseForApproval} from '../models/course/participant/course-for-approval';\nimport {map} from 'rxjs/operators';\nimport * as FileSaver from 'file-saver';\nimport {CourseFilter} from '../models/course/course-filter';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CourseApplicationService {\n\n private APPLICATION_API = '/api/courses/application'\n\n constructor(private http: HttpClient) {\n }\n\n getAllParticipantsForCourse(courseId: number, page: number, size: number): Observable> {\n return this.http.get>(this.APPLICATION_API + `/${courseId}/participants?page=${page}&size=${size}`);\n }\n\n getAllColleaguesForCourse(courseId: number, page: number, size: number): Observable> {\n return this.http.get>(this.APPLICATION_API + `/${courseId}/colleagues?page=${page}&size=${size}`);\n }\n\n applyForCourse(courseId: number, approverEmail: string): Observable {\n return this.http.post(this.APPLICATION_API + '/' + courseId + '/apply', approverEmail);\n }\n\n cancelCourseApplication(applicationId): Observable {\n return this.http.post(this.APPLICATION_API + '/' + applicationId + '/cancel-application', {});\n }\n\n cancelCourseApplicationByUser(courseId: number): Observable {\n return this.http.post(this.APPLICATION_API + '/' + courseId + '/cancel', {});\n }\n\n getAppliedSubordinatesForCourse(courseId: number, page, size): Observable> {\n return this.http.get>(this.APPLICATION_API + `/${courseId}/subordinates?page=${page}&size=${size}`);\n }\n\n approveApplication(courseId: number, applicationId: number): Observable {\n return this.http.post(this.APPLICATION_API + '/' + courseId + '/' + applicationId + '/approve', {});\n }\n\n denyApplication(courseId: number, applicationId: number): Observable {\n return this.http.post(this.APPLICATION_API + '/' + courseId + '/' + applicationId + '/deny', {});\n }\n\n changeApplicationStatus(courseId: number, applicationId: number, status: string): Observable {\n return this.http.put(this.APPLICATION_API + '/' + courseId + '/' + applicationId + '/status', {\n updatedStatus: status\n } as UpdateParticipantStatus);\n }\n\n getAllApproverSubordinates(filters: SubordinateFilters, page, size): Observable> {\n return this.http.post>(this.APPLICATION_API + `/approval/subordinates?page=${page}&size=${size}`, filters);\n }\n\n getSubordinateCourses(subordinateId: number, filters: SubordinateFilters, page, size): Observable> {\n return this.http.post>(this.APPLICATION_API + `/subordinate-courses/?subordinateId=${subordinateId}&page=${page}&size=${size}`, filters);\n }\n\n removeCourseApplication(courseId, applicationId): Observable {\n return this.http.delete(this.APPLICATION_API + '/' + courseId + '/' + applicationId + '/remove');\n }\n\n exportCourseAttendanceList(course: Course) {\n return this.http.get(this.APPLICATION_API + '/export/attendance-by-course/' + course.id, {responseType: 'blob'})\n .pipe(map(response => {\n const blob = new Blob([response], {\n type: 'text/csv'\n });\n FileSaver.saveAs(blob, course.title.substr(0,20) + '.csv');\n return response;\n })\n );\n }\n\n exportAtClbLevel(criteria: CourseFilter) {\n return this.http.post(this.APPLICATION_API + '/export/clb', criteria, {responseType: 'blob'})\n .pipe(map(response => {\n const blob = new Blob([response], {\n type: 'text/csv'\n });\n FileSaver.saveAs(blob, 'exportClb.csv');\n return response;\n })\n );\n }\n\n exportCoursesPerSubordinate(subordinate: Subordinate) {\n return this.http.get(this.APPLICATION_API + '/export/subordinate/' + subordinate.id, {responseType: 'blob'})\n .pipe(map(response => {\n const blob = new Blob([response], {\n type: 'text/csv'\n });\n FileSaver.saveAs(blob, subordinate.name + ' ' + subordinate.firstName + '.csv');\n return response;\n })\n );\n }\n\n changeCourseParticipant(courseApplicationId: number, participantEmail: string, approverEmail: string): Observable {\n return this.http.post(this.APPLICATION_API + '/' + courseApplicationId + '/change-participant/' + participantEmail + '/' + approverEmail, {});\n }\n\n applyExternalUserForCourse(courseId: number): Observable {\n return this.http.post(this.APPLICATION_API + '/' + courseId + '/apply-external', {});\n }\n\n getCourseApplication(courseId: number, userId: number): Observable {\n return this.http.get(this.APPLICATION_API + '/' + courseId + '/application/' + userId)\n }\n\n moveParticipantToAnotherCourse(participantId: number, courseFromId: number, courseToId: number, applicationStatus: string): Observable {\n return this.http.post(this.APPLICATION_API + '/move/' + participantId + '/from/' + courseFromId + '/to/' + courseToId + '/' + applicationStatus, {});\n }\n\n}\n","import {HttpClient} from '@angular/common/http';\nimport {Injectable} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {FeedbackForm} from '../models/course/feedback/feedback-form';\nimport {Question} from '../models/course/feedback/question';\nimport {Response} from '../models/course/feedback/response';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class FeedbackFormService {\n\n private FEEDBACK_FORM_API = '/api/courses/feedback-form';\n\n constructor(private http: HttpClient) {\n }\n\n createFeedBackForm(form: FeedbackForm): Observable {\n return this.http.put(this.FEEDBACK_FORM_API, form);\n }\n\n getGeneratedQuestions(): Observable {\n return this.http.get(this.FEEDBACK_FORM_API + '/generated-questions');\n }\n\n submitResponseToFeedbackForm(response: Response): Observable {\n return this.http.put(this.FEEDBACK_FORM_API + '/response/submit', response);\n }\n\n getFeedbackForm(courseId: number): Observable {\n return this.http.get(this.FEEDBACK_FORM_API + '/' + courseId);\n }\n\n getFeedbackFormsForCourseIds(courseIds: number[]): Observable {\n return this.http.post(this.FEEDBACK_FORM_API + '/by-course-ids', courseIds)\n }\n\n getUserResponseOnForms(finishedCourseIds: number[]): Observable {\n return this.http.post(this.FEEDBACK_FORM_API + '/user-filled-in/by-course-ids', finishedCourseIds)\n }\n\n getResponse(responseId: number): Observable {\n return this.http.get(this.FEEDBACK_FORM_API + '/response' + '/' + responseId);\n }\n\n}\n","import {Component, Input} from '@angular/core';\nimport {NgbActiveModal} from '@ng-bootstrap/ng-bootstrap';\nimport {ConfirmDialogService} from '../../../../../../core/services/confirm-dialog.service';\nimport {CaleidoscoopUser} from '../../../../../../core/models/user/caleidoscoop-user';\nimport {UserService} from '../../../../../../core/services/user.service';\n\n@Component({\n selector: 'app-approver-select-modal',\n templateUrl: './approver-select-modal.component.html'\n})\nexport class ApproverSelectModalComponent {\n\n @Input()\n courseId: number;\n\n approvers: CaleidoscoopUser[] = [];\n selectedApprover: CaleidoscoopUser;\n\n constructor(public activeModal: NgbActiveModal,\n private confirmDialogService: ConfirmDialogService,\n private userService: UserService) {\n }\n\n submit() {\n this.activeModal.close(this.selectedApprover.email);\n }\n\n openCancelConfirmationDialog() {\n this.confirmDialogService.openCancelConfirmationDialog(this.activeModal);\n }\n\n setSelectedApprover(approver: any) {\n this.selectedApprover = approver;\n }\n\n fetchApprovers(filter: string) {\n this.userService.getApprovers(filter).subscribe(res => {\n this.approvers = res;\n })\n }\n\n searchApproversByFilter(filter: string) {\n this.fetchApprovers(filter);\n }\n}\n","
\n
\n

{{'SELECT_APPROVER_TITLE'|translate}}

\n
\n \n
\n
\n \n \n
\n
\n \n \n
\n","
\n
\n

{{'USER_FEEDBACK_FORM'|translate}}

\n
\n \n
\n
\n

{{'FEEDBACK_INTRO_LINE_1'|translate}}

\n

{{'FEEDBACK_INTRO_LINE_2'|translate}}

\n

{{'FEEDBACK_INTRO_LINE_3'|translate}}

\n

{{'FEEDBACK_INTRO_LINE_4'|translate}}

\n
\n
\n
\n
\n
\n
\n
{{question.mandatory ? \"*\" : \"\"}}{{question.questionText}}
\n
\n
\n
\n
\n \n\n \n
\n
\n\n
\n
\n \n \n
\n
\n\n \n
\n
\n
\n
\n
\n
\n \n \n
\n","import {Component, Input, OnInit} from '@angular/core';\nimport {FeedbackFormService} from '../../../../../../../core/services/feedback-form.service';\nimport {NgbActiveModal} from '@ng-bootstrap/ng-bootstrap';\nimport {TranslateService} from '@ngx-translate/core';\nimport {AlertService} from '../../../../../../../core/services/alert.service';\nimport {FeedbackForm} from '../../../../../../../core/models/course/feedback/feedback-form';\nimport {Response} from '../../../../../../../core/models/course/feedback/response';\nimport {ConfirmDialogService} from '../../../../../../../core/services/confirm-dialog.service';\n\n@Component({\n selector: 'app-feedback-form-response-modal',\n templateUrl: './feedback-form-response-modal.component.html',\n styleUrls: ['feedback-form-response-modal.component.scss']\n})\nexport class FeedbackFormResponseModalComponent implements OnInit {\n\n @Input()\n feedbackForm: FeedbackForm;\n response: Response = {\n formId: null,\n answers: [], id: null, userId: null\n }\n\n constructor(private feedbackFormService: FeedbackFormService,\n public activeModal: NgbActiveModal,\n private translate: TranslateService,\n private alertService: AlertService,\n private confirmDialogService: ConfirmDialogService) {\n }\n\n ngOnInit(): void {\n this.response.formId = this.feedbackForm.id;\n this.createAnswerObjectsForAllQuestions();\n }\n\n createAnswerObjectsForAllQuestions() {\n for (let question of this.feedbackForm.questions) {\n this.response.answers.push({id: null, questionId: question.id, userAnswers: []});\n }\n }\n\n existsMandatoryQuestionWithoutAnswer(): boolean {\n return !!this.feedbackForm.questions.find(quest => quest.mandatory &&\n this.response.answers.some(ans => ans.questionId === quest.id && ans.userAnswers.length === 0));\n }\n\n hasAtLeastOneAnswer() {\n return this.response.answers?.filter(ans => ans.userAnswers.length > 0).map(ans => ans.userAnswers[0]).filter(ansValue => ansValue.value.length > 0).length > 0;\n }\n\n submit() {\n if (this.existsMandatoryQuestionWithoutAnswer()) {\n this.alertService.error(this.translate.instant('MANDATORY_FIELD_NEED_TO_BE_FILLED'), {closeButton: true});\n return;\n }\n if (!this.hasAtLeastOneAnswer()) {\n this.alertService.error(this.translate.instant('RESPONSE_MUST_HAVE_AT_LEAST_ONE_ANSWER'), {closeButton: true});\n return;\n }\n this.feedbackFormService.submitResponseToFeedbackForm(this.response).subscribe(() => {\n this.activeModal.close(true);\n let successEditTranslate = this.translate.instant('SUCCESS_RESPONSE_SUBMISSION');\n this.alertService.success(successEditTranslate, {\n closeButton: true,\n autoClose: true,\n keepAfterRouteChange: false\n });\n }, (err) => {\n this.alertService.error(err, {\n closeButton: true,\n autoClose: false,\n keepAfterRouteChange: false\n });\n });\n }\n\n setAnswer(id, answer, isRadio) {\n let userAnswers = this.response.answers?.filter(ans => ans.questionId === id)[0].userAnswers;\n if (userAnswers.includes(answer)) {\n userAnswers = userAnswers?.filter(ans => ans !== answer);\n } else {\n if (isRadio)\n userAnswers = [answer];\n else\n userAnswers.push(answer);\n }\n this.response.answers.filter(ans => ans.questionId === id)[0].userAnswers = userAnswers;\n }\n\n isAnswerChecked(id, answer) {\n return this.response.answers.filter(ans => ans.questionId === id)[0].userAnswers.includes(answer);\n }\n\n setFreeTextAnswer(value, id) {\n this.response.answers.filter(ans => ans.questionId === id)[0].userAnswers = [{id: null, index: 0, value: value}];\n }\n\n openCancelConfirmationDialog() {\n this.confirmDialogService.openCancelConfirmationDialog(this.activeModal);\n }\n}\n","import {Component, ElementRef, Input, OnInit} from '@angular/core';\nimport {ModalAction} from '../../../../../../core/models/course/modal/modal-action';\nimport {NgbActiveModal} from '@ng-bootstrap/ng-bootstrap';\nimport {FormBuilder, FormGroup, Validators} from '@angular/forms';\nimport Quill from 'quill';\nimport {ConfirmDialogService} from '../../../../../../core/services/confirm-dialog.service';\nimport {CourseConstants} from '../../../../../../core/models/course/course-constants';\nimport {SimpleEntity} from '../../../../../../core/models/shared/simple-entity';\nimport {AlertService} from '../../../../../../core/services/alert.service';\nimport {TranslateService} from '@ngx-translate/core';\nimport {CourseService} from '../../../../../../core/services/course.service';\nimport {PersonalCourse} from '../../../../../../core/models/course/personal-course';\nimport {UserService} from '../../../../../../core/services/user.service';\nimport {CourseApplicationStatus} from '../../../../../../core/models/enums/corse-application-status';\nimport {SimpleDisplayEntity} from '../../../../../../core/models/shared/simple-display-entity';\nimport {CourseStatus} from '../../../../../../core/models/enums/course-status';\n\nconst titleMaxChar = 100;\nconst descriptionMaxChar = 1500;\nconst additionalInformationMaxChar = 250;\nconst externalLinkMaxChar = 1000;\nconst speakersMaxChar = 300;\n\n@Component({\n selector: 'app-upsert-personal-course-modal',\n templateUrl: './upsert-personal-course-modal.component.html',\n styleUrls: ['./upsert-personal-course-modal.component.scss']\n})\nexport class UpsertPersonalCourseModalComponent implements OnInit {\n\n @Input()\n modalAction: ModalAction = ModalAction.CREATE;\n @Input()\n course: PersonalCourse;\n @Input()\n courseConstants: CourseConstants;\n\n courseForm: FormGroup;\n editor: Quill;\n\n titleCharRemaining = titleMaxChar;\n descriptionCharRemaining = descriptionMaxChar;\n additionalInformationCharRemaining = additionalInformationMaxChar;\n speakersCharRemaining = speakersMaxChar;\n submitted = false;\n isEndDateBeforeStartDate = false;\n possibleSecondaryDisciplines: SimpleEntity[] = [];\n selectedSecondaryDisciplines: SimpleEntity[] = [];\n secondaryDisciplinesSelectDisabled: boolean = true;\n approvers: string[] = [];\n defaultOrganiser: SimpleDisplayEntity;\n courseStatusForInput: string = '';\n\n quillModules = {\n toolbar: [\n ['bold', 'italic', 'underline', 'strike'],\n [{'list': 'ordered'}, {'list': 'bullet'}],\n [{'indent': '-1'}, {'indent': '+1'}],\n [{'align': []}],\n ['clean'],\n ['link']\n ],\n keyboard: {\n bindings: {\n tab: {\n key: 9,\n handler: function (range, context) {\n this.startDateInput.myInput.nativeElement.focus();\n return false;\n },\n },\n },\n }\n };\n\n constructor(private activeModal: NgbActiveModal,\n private _formBuilder: FormBuilder,\n private confirmDialogService: ConfirmDialogService,\n private elementRef: ElementRef,\n private alertService: AlertService,\n private translate: TranslateService,\n private courseService: CourseService,\n private userService: UserService) {\n }\n\n ngOnInit(): void {\n if (this.modalAction === ModalAction.CREATE) {\n this.createEmptyForm();\n } else {\n this.fillFormFromCourse();\n }\n this.setValidators();\n this.possibleSecondaryDisciplines = this.courseConstants.disciplines;\n this.courseStatusForInput = this.modalAction === ModalAction.CREATE ?\n this.courseConstants.courseStatuses[0] : this.course.courseStatus;\n }\n\n setValidators():void {\n this.courseForm.controls['title'].setValidators([Validators.required, Validators.maxLength(titleMaxChar)]);\n this.courseForm.controls['descriptionText'].setValidators([Validators.maxLength(descriptionMaxChar)]);\n this.courseForm.controls['additionalInformationText'].setValidators([Validators.maxLength(additionalInformationMaxChar)]);\n this.courseForm.controls['externalLink'].setValidators([Validators.maxLength(externalLinkMaxChar)]);\n this.courseForm.controls['speakers'].setValidators([Validators.maxLength(speakersMaxChar)]);\n this.courseForm.controls['approverEmail'].setValidators([Validators.required]);\n }\n\n get formControls() {\n return this.courseForm.controls;\n }\n\n private createEmptyForm(): void {\n this.courseForm = this._formBuilder.group({\n title: [],\n description: [],\n descriptionText: [],\n speakers: [],\n startDate: [''],\n endDate: [''],\n price: [''],\n externalLink: [],\n additionalInformation: [],\n additionalInformationText: [],\n tags: [],\n courseStatus: [this.courseConstants.courseStatuses[0]],\n applicationStatus: CourseApplicationStatus.APPLIED,\n approverEmail: [],\n targetGroup: this._formBuilder.group({\n disciplines: [[]],\n disciplinesSecondary: [[]],\n coreProcesses: [[]],\n formationType: [],\n }),\n organiser: []\n });\n this.setUpDefaultOrganiser();\n }\n\n private fillFormFromCourse(): void {\n this.courseForm = this._formBuilder.group({\n id: [this.course.id],\n title: [this.course.title],\n description: [this.course.description],\n descriptionText: [],\n speakers: [this.course.speakers],\n startDate: [this.course.startDate ? this.course.startDate : ''],\n endDate: [this.course.endDate ? this.course.endDate : ''],\n price: [this.course.price],\n externalLink: [this.course.externalLink],\n additionalInformation: this.course.additionalInformation,\n additionalInformationText: [],\n tags: [this.course.tags],\n courseStatus: this.course.courseStatus,\n applicationStatus: this.course.applicationStatus,\n approverEmail: this.course.approverEmail,\n targetGroup: this._formBuilder.group({\n disciplines: [this.course.targetGroup.disciplines],\n disciplinesSecondary: [this.course.targetGroup.disciplinesSecondary],\n coreProcesses: [this.course.targetGroup.coreProcesses],\n formationType: this.course.targetGroup.formationType,\n }),\n organiser: [this.course.organiser ? this.getOrganiserCenter() : this.courseConstants.organisers[0]],\n });\n this.titleCharRemaining = titleMaxChar - this.course?.title?.length;\n this.descriptionCharRemaining = descriptionMaxChar - this.course?.description?.length\n this.speakersCharRemaining = speakersMaxChar - this.course?.speakers?.length;\n this.selectedSecondaryDisciplines = this.course.targetGroup.disciplinesSecondary;\n }\n\n resolveTitle() {\n switch (this.modalAction) {\n case ModalAction.CREATE:\n return 'ADD_PERSONAL_COURSE';\n case ModalAction.EDIT:\n return 'EDIT_PERSONAL_COURSE';\n case ModalAction.COPY:\n return 'COPY_COURSE';\n default:\n throw new Error(`Non-existent modalAction in switch: ${this.modalAction}`);\n }\n }\n\n dismissModal() {\n this.activeModal.dismiss('Cross click');\n }\n\n titleChanged() {\n this.titleCharRemaining = titleMaxChar - this.courseForm.value.title.length;\n }\n\n speakersChanged(): void {\n this.speakersCharRemaining = speakersMaxChar - this.courseForm.value.speakers.length;\n }\n\n setFieldInForm(value: any, field: string, subfield: string) {\n if (subfield === '') {\n this.courseForm.get(field).setValue(value);\n } else {\n this.courseForm.get([field, subfield]).setValue(value);\n }\n if (field === 'startDate') {\n this.checkIsEndDateBeforeStartDate();\n this.setCourseStatusDependingOnDates();\n }\n if (field === 'endDate') {\n this.checkIsEndDateBeforeStartDate();\n this.setCourseStatusDependingOnDates();\n }\n if (subfield === 'disciplines') {\n this.primaryDisciplinesChanged(value);\n }\n if (field === 'courseStatus') {\n this.courseStatusForInput = value;\n }\n }\n\n setCourseStatusDependingOnDates(): void {\n const currentDate = new Date();\n if (this.courseForm.value.endDate < currentDate) {\n this.setFieldInForm(CourseStatus.FINISHED, 'courseStatus', '');\n } else if (this.courseForm.value.startDate > currentDate) {\n this.setFieldInForm(CourseStatus.OPEN_FOR_REGISTRATION, 'courseStatus', '');\n } else {\n this.setFieldInForm(CourseStatus.ONGOING, 'courseStatus', '');\n }\n }\n\n checkIsEndDateBeforeStartDate() {\n if (this.courseForm.value.endDate && this.courseForm.value.startDate) {\n this.isEndDateBeforeStartDate = this.courseForm.value.endDate < this.courseForm.value.startDate;\n }\n }\n\n isCreateModal(): boolean {\n return ModalAction.CREATE === this.modalAction;\n }\n\n onQuillEditorCreated(quill: Quill, component: string) {\n this.editor = quill;\n switch (component) {\n case 'description':\n this.descriptionCharRemaining = descriptionMaxChar;\n quill.pasteHTML(this.course?.description ? this.course.description : '');\n this.courseForm.controls['descriptionText'].setValue(quill.getText().slice(0, -1));\n break;\n case 'additionalInformation':\n this.additionalInformationCharRemaining = additionalInformationMaxChar;\n quill.pasteHTML(this.course?.additionalInformation ? this.course.additionalInformation : '');\n this.courseForm.controls['additionalInformationText'].setValue(quill.getText().slice(0, -1));\n break;\n }\n }\n\n onQuillEditorTextChange(event: any, component: string) {\n if (event?.event === 'text-change') {\n switch (component) {\n case 'description':\n this.courseForm.controls['description'].setValue(event.html);\n this.courseForm.controls['descriptionText'].setValue(event.text.slice(0, -1));\n this.descriptionCharRemaining = descriptionMaxChar - event.html?.length + 1;\n break;\n case 'additionalInformation':\n this.courseForm.controls['additionalInformation'].setValue(event.html);\n this.courseForm.controls['additionalInformationText'].setValue(event.text.slice(0, -1));\n this.additionalInformationCharRemaining = additionalInformationMaxChar - event.html?.length + 1;\n break;\n }\n }\n }\n\n openCancelConfirmationDialog() {\n this.confirmDialogService.openCancelConfirmationDialog(this.activeModal);\n }\n\n onSubmit() {\n this.submitted = true;\n if (this.courseForm.invalid || this.isEndDateBeforeStartDate) {\n this.focusFirstInvalidField();\n return;\n }\n\n if (this.modalAction === ModalAction.EDIT) {\n this.courseService.editPersonalCourse(this.courseForm.value).subscribe(() => {\n this.alertSuccesAndCloseModal(this.translate.instant('SUCCESS_EDIT_COURSE'));\n },\n (err) => {\n let errorTranslate = this.translate.instant(err);\n this.alertService.error(errorTranslate, {closeButton: true, autoClose: false, keepAfterRouteChange: false});\n });\n } else if (this.modalAction === ModalAction.CREATE) {\n this.courseService.addPersonalCourse(this.courseForm.value).subscribe(() =>\n this.alertSuccesAndCloseModal(this.translate.instant('COURSE_SUCCESS_ADD')));\n }\n }\n\n deleteCourse(): void {\n this.confirmDialogService.confirmCancelDeleteDialog().subscribe(res => {\n if (res) {\n this.courseService.deletePersonalCourse(this.course.id).subscribe(() => {\n this.alertSuccesAndCloseModal(this.translate.instant('SUCCESS_DELETE_COURSE'))\n })\n }\n })\n }\n\n private alertSuccesAndCloseModal(alertMessage: string) {\n this.activeModal.close();\n this.alertService.success(alertMessage, {\n closeButton: true,\n autoClose: true,\n keepAfterRouteChange: false\n });\n }\n\n focusFirstInvalidField() {\n let inputFields = this.elementRef.nativeElement.querySelectorAll('.form-control.ng-invalid, .custom-form-component');\n let invalidClasses = ['ng-invalid', 'is-invalid', 'invisible-error', 'has-error'];\n for (var i = 0, len = inputFields.length; i < len; i++) {\n let classes = inputFields[i].className.split(/\\s+/);\n if (classes.some(cl => invalidClasses.includes(cl))) {\n if (classes.includes('quill-editor')) {\n this.editor.focus();\n }\n if (classes.includes('ng-select-multiple')) {\n inputFields[i] = inputFields[i].querySelector('.ng-select-container>.ng-value-container>.ng-input>input')\n }\n inputFields[i].focus();\n }\n }\n }\n\n isUrlValid(): Boolean {\n if (this.courseForm.value.externalLink === null || this.courseForm.value.externalLink === '')\n return true;\n\n const urlPattern = /^(https?|ftp):\\/\\/[^\\s/$.?#].\\S*$/;\n return urlPattern.test(this.courseForm.value.externalLink);\n }\n\n primaryDisciplinesChanged(selectedPrimaryDisciplines: SimpleEntity[]) {\n if (selectedPrimaryDisciplines.length > 0) {\n this.possibleSecondaryDisciplines = this.courseConstants.disciplines\n .filter(secondary => !selectedPrimaryDisciplines.some(primary => primary.id === secondary.id));\n this.secondaryDisciplinesSelectDisabled = false;\n if (this.courseForm.value.targetGroup.disciplinesSecondary.length > 0) {\n this.removeSecondaryDisciplineIfAddedToPrimary(selectedPrimaryDisciplines);\n }\n } else {\n this.secondaryDisciplinesSelectDisabled = true;\n this.courseForm.get(['targetGroup', 'disciplinesSecondary']).setValue([]);\n this.selectedSecondaryDisciplines = [];\n this.possibleSecondaryDisciplines = this.courseConstants.disciplines;\n }\n }\n\n removeSecondaryDisciplineIfAddedToPrimary(selectedPrimaryDisciplines: SimpleEntity[]) {\n this.courseForm.get(['targetGroup', 'disciplinesSecondary']).setValue(\n this.courseForm.value.targetGroup.disciplinesSecondary.filter((secondary: SimpleEntity) => !selectedPrimaryDisciplines.some(primary => primary.id === secondary.id))\n );\n this.selectedSecondaryDisciplines = this.courseForm.value.targetGroup.disciplinesSecondary;\n }\n\n getCourseApplicationStatuses(): string[] {\n return this.courseConstants.courseApplicationStatuses.filter(value => !['APPLIED', 'PRESENT', 'ON_WAITING_LIST', 'ABSENT', 'DENIED'].includes(value));\n }\n\n showDeleteButton(): boolean {\n return !this.isCreateModal() && this.course.applicationStatus === CourseApplicationStatus.DENIED;\n }\n\n allowApproverChange(): boolean {\n return this.isCreateModal() || this.course.applicationStatus === CourseApplicationStatus.APPLIED;\n }\n\n allowCourseApplicationChange(): boolean {\n return this.course?.applicationStatus &&\n (this.course.applicationStatus !== CourseApplicationStatus.APPLIED && this.course.applicationStatus !== CourseApplicationStatus.DENIED);\n }\n\n fetchApprovers(filter: string) {\n if (filter && filter.length > 2) {\n this.userService.getApprovers(filter).subscribe(res => {\n this.approvers = res?.map(user => user.email);\n })\n }\n }\n\n setUpDefaultOrganiser() {\n this.userService.getUsersDefaultOrganiserId().subscribe(organiserId => {\n this.courseConstants.organisers.forEach(organiser => {\n if (organiser.id === organiserId) {\n this.defaultOrganiser = organiser;\n this.courseForm.get('organiser').setValue(organiser);\n }\n })\n })\n }\n\n getOrganiserCenter(): SimpleEntity {\n if (this.course.organiser) {\n this.courseConstants.organisers.forEach((organiser) => {\n if (organiser.id === this.course.organiser.id) {\n this.defaultOrganiser = organiser;\n }\n })\n }\n return this.defaultOrganiser;\n }\n}\n","
\n
\n
\n

{{resolveTitle()|translate}}

\n
\n \n
\n
\n
\n
\n
{{'GENERAL_INFORMATION'|translate}}
\n
\n
\n
\n
\n \n \n
\n
\n
\n
{{'TITLE_REQUIRED'|translate}}
\n
{{'TITLE_TOO_LONG'|translate}}
\n
\n
\n
\n

=0\"\n class=\"char-counter mr-1\">{{titleCharRemaining + ('CHARACTERS_REMAINING'|translate)}}

\n

{{('TOO_LONG_BY_X_CHARACTERS' |translate: {character_number: -titleCharRemaining})}}

\n
\n
\n
\n
\n
\n\n
\n
\n
\n \n \n
\n
{{'ORGANISER_REQUIRED'|translate}}
\n
\n
\n
\n
\n\n
\n
\n \n \n \n
\n
{{'END_DATE_AFTER_START'|translate}}
\n
\n
\n
\n \n \n \n
\n
\n \n \n
\n
\n
\n
{{'SPEAKERS_TOO_LONG'|translate}}
\n
\n
\n
\n

=0\"\n class=\"char-counter mr-1\">{{speakersCharRemaining + ('CHARACTERS_REMAINING'|translate)}}

\n

{{('TOO_LONG_BY_X_CHARACTERS' |translate: {character_number: -speakersCharRemaining})}}

\n
\n
\n
\n
\n\n
\n
\n \n \n
\n
\n
\n
{{'DESCRIPTION_REQUIRED'|translate}}
\n
{{'DESCRIPTION_TOO_LONG'|translate}}
\n
\n
\n
\n

=0\"\n class=\"char-counter mr-1\">{{descriptionCharRemaining + ('CHARACTERS_REMAINING'|translate)}}

\n

{{('TOO_LONG_BY_X_CHARACTERS' |translate: {character_number: -descriptionCharRemaining})}}

\n
\n
\n
\n
\n\n
\n
\n \n \n
\n
\n \n \n
\n
{{'INVALID_URL'|translate}}
\n
\n
\n
\n\n
\n
\n \n \n
\n
{{'TAGS_REQUIRED'|translate}}
\n
\n
\n
\n \n \n
\n
{{'APPROVER_REQUIRED'|translate}}
\n
\n
\n
\n\n
\n
\n
\n \n \n
\n
\n
\n {{'ADDITIONAL_INFORMATION_TO_LONG'|translate}}
\n
\n
\n
\n

=0\"\n class=\"char-counter mr-1\">{{additionalInformationCharRemaining + ('CHARACTERS_REMAINING'|translate)}}

\n

{{('TOO_LONG_BY_X_CHARACTERS' |translate: {character_number: -additionalInformationCharRemaining})}}

\n
\n
\n
\n
\n
\n\n
\n
{{'TARGET_GROUP_INFORMATION'|translate}}
\n
\n
\n
\n \n \n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n \n \n
\n
\n\n
\n
{{'STATUS_INFORMATION'|translate}}
\n
\n
\n
\n \n \n
\n
\n \n \n
\n
\n \n
\n\n
\n \n \n \n
\n\n","import {EventEmitter, Injectable} from '@angular/core';\nimport {CourseService} from '../../core/services/course.service';\nimport {CourseApplicationService} from '../../core/services/course-application.service';\nimport {Router} from '@angular/router';\nimport {NgbModal, NgbModalOptions} from '@ng-bootstrap/ng-bootstrap';\nimport {AlertService} from '../../core/services/alert.service';\nimport {TranslateService} from '@ngx-translate/core';\nimport {AuthService} from '../../core/services/auth.service';\nimport {ConfirmDialogService} from '../../core/services/confirm-dialog.service';\nimport {CourseBrowse} from '../../core/models/course/course-browse';\nimport {\n ApproverSelectModalComponent\n} from '../admin/academie/courses/components/approver-select-modal/approver-select-modal.component';\nimport {UserService} from '../../core/services/user.service';\nimport {FeedbackFormService} from '../../core/services/feedback-form.service';\nimport {\n FeedbackFormResponseModalComponent\n} from '../admin/academie/courses/components/feedback-form/feedback-form-response-modal/feedback-form-response-modal.component';\nimport {CourseApplicationStatus} from '../../core/models/enums/corse-application-status';\nimport {PlatformConfigurationService} from '../../core/services/platform-configuration.service';\nimport {Course} from '../../core/models/course/course';\nimport {ModalAction} from '../../core/models/course/modal/modal-action';\nimport {\n UpsertPersonalCourseModalComponent\n} from '../admin/academie/courses/components/upsert-personal-course-modal/upsert-personal-course-modal.component';\nimport {CourseConstantsService} from '../../core/services/course-constants.service';\nimport {PersonalCourse} from '../../core/models/course/personal-course';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CourseUtils {\n\n public courseChangedEmitter: EventEmitter = new EventEmitter()\n\n modalOption: NgbModalOptions = {};\n\n constructor(private courseService: CourseService,\n private courseApplicationService: CourseApplicationService,\n private _router: Router,\n private modalService: NgbModal,\n private alertService: AlertService,\n private translate: TranslateService,\n private authService: AuthService,\n private confirmDialogService: ConfirmDialogService,\n private userService: UserService,\n private feedbackFormService: FeedbackFormService,\n private platformConfigurationService: PlatformConfigurationService,\n private courseConstantsService: CourseConstantsService) {\n }\n\n cancelCourseApplicationByParticipant(course: CourseBrowse | Course, callFetchCourse: EventEmitter): void {\n this.proceedWithCancellation(course).then(shouldCancel => {\n if (shouldCancel) {\n this.cancelCourseApplicationWorker(course, callFetchCourse);\n }\n })\n }\n\n cancelCourseApplicationWorker(course: CourseBrowse | Course, callFetchCourse: EventEmitter): void {\n this.courseApplicationService.cancelCourseApplicationByUser(course.id).subscribe(() => {\n let successCancelApplicationFromCourse = this.translate.instant('SUCCESS_APPLICATION_CANCEL');\n this.alertService.success(successCancelApplicationFromCourse, {closeButton: true, autoClose: true});\n if (callFetchCourse) callFetchCourse.emit();\n },\n (err) => {\n this.alertService.error(err, {closeButton: true, autoClose: false});\n });\n }\n\n async proceedWithCancellation(course: CourseBrowse | Course): Promise {\n return new Promise((resolve) => {\n if (this.validForFreeCancel(course.courseStatus, course.startDate)) {\n resolve(true);\n } else {\n this.confirmDialogService.confirmCancelApplicationDialog()\n .subscribe((res) => resolve(res === true));\n }\n });\n }\n\n public validForFreeCancel(courseStatus: string, courseStartDate: Date) {\n return ['OPEN_FOR_REGISTRATION', 'CANCELLED'].includes(courseStatus) || !this.lessThanTwoWeeksUntilCourseStarts(courseStartDate);\n }\n\n applyToCourse(courseId: number, callFetchCourse: EventEmitter): void {\n if (this.authService.isExternalUser()) {\n this.applyToCourseAsExternal(courseId, callFetchCourse)\n } else {\n this.approverSelect(courseId, callFetchCourse)\n }\n }\n\n applyToCourseAsExternal(courseId: number, callFetchCourse: EventEmitter) {\n this.courseApplicationService.applyExternalUserForCourse(courseId)\n .subscribe(() => this.applySuccessful(callFetchCourse)\n ,(err) => this.alertService.error(err, {closeButton: true, autoClose: false})\n );\n }\n\n approverSelect(courseId: number, callFetchCourse: EventEmitter) {\n this.fillModalOptions('md');\n\n const modalRef = this.modalService.open(ApproverSelectModalComponent, this.modalOption);\n modalRef.componentInstance.courseId = courseId;\n modalRef.result.then(res => {\n if (res) {\n this.courseApplicationService.applyForCourse(courseId, res)\n .subscribe(() => this.applySuccessful(callFetchCourse)\n ,(err) => this.alertService.error(err, {closeButton: true, autoClose: false})\n );\n }\n })\n }\n\n applySuccessful(callFetchCourse: EventEmitter): void {\n let successApplicationToCourse = this.translate.instant('SUCCESS_APPLICATION_TO_COURSE');\n this.alertService.success(successApplicationToCourse, {closeButton: true, autoClose: true});\n callFetchCourse.emit();\n }\n\n private fillModalOptions(size: string) {\n this.modalOption.backdrop = 'static';\n this.modalOption.keyboard = false;\n this.modalOption.size = size;\n }\n\n private lessThanTwoWeeksUntilCourseStarts(courseStartDate: Date): boolean {\n return this.calculateDiff(courseStartDate) <= 14;\n }\n\n private calculateDiff(date: Date): number {\n let currentDate = new Date();\n let dateSent = new Date(date)\n\n let currentDateForCalculate = Date.UTC(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate());\n let dateSentForCalculate = Date.UTC(dateSent.getFullYear(), dateSent.getMonth(), dateSent.getDate());\n\n return Math.floor((dateSentForCalculate - currentDateForCalculate) / (1000 * 60 * 60 * 24));\n }\n\n makeCourseFavorite(id: number, courseBrowse: CourseBrowse) {\n this.userService.addFavouriteCourse(id).subscribe(() => {\n courseBrowse.isFavorite = true;\n this.alertService.success(this.translate.instant('COURSE_SUCCESS_ADD_TO_FAVORITE'),\n {closeButton: true, autoClose: true})\n },\n (err) => this.alertService.error(err, {closeButton: true, autoClose: false}));\n }\n\n unFavouriteCourse(id: number, courseBrowse: CourseBrowse) {\n this.userService.removeFavouriteCourse(id).subscribe(() => {\n courseBrowse.isFavorite = false;\n this.alertService.success(this.translate.instant('COURSE_SUCCESS_REMOVE_FROM_FAVORITE'),\n {closeButton: true, autoClose: true});\n },\n (err) => {\n this.alertService.error(err, {closeButton: true, autoClose: false});\n });\n }\n\n fillFeedbackForm(courseId): Promise {\n return new Promise((resolve) => {\n this.feedbackFormService.getFeedbackForm(courseId).subscribe(result => {\n this.modalOption.backdrop = 'static';\n this.modalOption.keyboard = false;\n this.modalOption.size = 'lg';\n const modalRef = this.modalService.open(FeedbackFormResponseModalComponent, this.modalOption);\n modalRef.componentInstance.feedbackForm = result;\n modalRef.result.then(res => resolve(res));\n },\n (err) => {\n this.alertService.error(err, {closeButton: true, autoClose: false});\n resolve(false);\n });\n });\n }\n\n getEligibleApplicationStatusesForAttachments(): CourseApplicationStatus[] {\n return [CourseApplicationStatus.REGISTERED, CourseApplicationStatus.PRESENT, CourseApplicationStatus.COMPLETED];\n }\n\n isEligibleApplicationStatusForAttachments(applicationStatus: string) {\n return this.getEligibleApplicationStatusesForAttachments()\n .map(value => value.toString())\n .includes(applicationStatus);\n }\n\n openCourseOverview(id: number, approverPage: boolean = false, subordinatePage: boolean = false): void {\n if (approverPage && this.authService.isApprover()) {\n this._router.navigate(subordinatePage ? ['admin/academie/courses/subordinates/approve/' + id] : ['admin/academie/courses/approve/' + id]);\n } else {\n this._router.navigate(['courses/' + id]);\n }\n }\n\n openUpsertPersonalCourseModal(modalAction: ModalAction, course: PersonalCourse): void {\n this.fillModalOptions('lg');\n\n this.courseConstantsService.getCourseConstantsForCreatePersonal().subscribe(res => {\n const modalRef = this.modalService.open(UpsertPersonalCourseModalComponent, this.modalOption);\n\n modalRef.componentInstance.modalAction = modalAction;\n modalRef.componentInstance.courseConstants = res;\n modalRef.componentInstance.course = course;\n modalRef.result.then(() => {\n this.courseChangedEmitter.next();\n })\n });\n }\n\n createPersonalCourse(): void {\n this.openUpsertPersonalCourseModal(ModalAction.CREATE, null);\n }\n\n editPersonalCourse(courseId: number): void {\n this.courseService.getPersonalCourse(courseId).subscribe(course => {\n this.openUpsertPersonalCourseModal(ModalAction.EDIT, course);\n })\n }\n\n}\n"],"names":["ModalAction","CourseApplicationStatus","CourseStatus","map","FileSaver","CourseApplicationService","http","courseId","page","size","get","APPLICATION_API","approverEmail","post","applicationId","status","put","updatedStatus","filters","subordinateId","delete","course","id","responseType","pipe","blob","Blob","response","type","saveAs","title","substr","criteria","subordinate","name","firstName","courseApplicationId","participantEmail","userId","participantId","courseFromId","courseToId","applicationStatus","i0","factory","providedIn","FeedbackFormService","form","FEEDBACK_FORM_API","courseIds","finishedCourseIds","responseId","ApproverSelectModalComponent","activeModal","confirmDialogService","userService","close","selectedApprover","email","openCancelConfirmationDialog","approver","filter","getApprovers","subscribe","approvers","res","fetchApprovers","selectors","inputs","decls","vars","consts","template","ctx","ctx_r7","ctx_r14","ctx_r19","FeedbackFormResponseModalComponent","feedbackFormService","translate","alertService","formId","answers","feedbackForm","createAnswerObjectsForAllQuestions","questions","question","push","questionId","userAnswers","find","quest","mandatory","some","ans","length","_a","ansValue","value","existsMandatoryQuestionWithoutAnswer","error","instant","closeButton","hasAtLeastOneAnswer","submitResponseToFeedbackForm","successEditTranslate","success","autoClose","keepAfterRouteChange","err","answer","isRadio","includes","index","Validators","ctx_r35","titleMaxChar","descriptionMaxChar","additionalInformationMaxChar","externalLinkMaxChar","speakersMaxChar","UpsertPersonalCourseModalComponent","_formBuilder","elementRef","courseService","CREATE","toolbar","keyboard","bindings","tab","key","handler","range","context","startDateInput","myInput","nativeElement","focus","modalAction","createEmptyForm","fillFormFromCourse","setValidators","possibleSecondaryDisciplines","courseConstants","disciplines","courseStatusForInput","courseStatuses","courseStatus","courseForm","controls","required","maxLength","group","description","descriptionText","speakers","startDate","endDate","price","externalLink","additionalInformation","additionalInformationText","tags","APPLIED","targetGroup","disciplinesSecondary","coreProcesses","formationType","organiser","setUpDefaultOrganiser","getOrganiserCenter","organisers","titleCharRemaining","_b","descriptionCharRemaining","_c","_d","speakersCharRemaining","_e","_f","selectedSecondaryDisciplines","EDIT","COPY","Error","dismiss","field","subfield","setValue","checkIsEndDateBeforeStartDate","setCourseStatusDependingOnDates","primaryDisciplinesChanged","currentDate","Date","setFieldInForm","FINISHED","OPEN_FOR_REGISTRATION","ONGOING","isEndDateBeforeStartDate","quill","component","editor","pasteHTML","getText","slice","additionalInformationCharRemaining","event","html","text","submitted","invalid","focusFirstInvalidField","editPersonalCourse","alertSuccesAndCloseModal","errorTranslate","addPersonalCourse","confirmCancelDeleteDialog","deletePersonalCourse","alertMessage","inputFields","querySelectorAll","invalidClasses","i","len","classes","className","split","cl","querySelector","urlPattern","test","selectedPrimaryDisciplines","primary","secondary","secondaryDisciplinesSelectDisabled","removeSecondaryDisciplineIfAddedToPrimary","courseApplicationStatuses","isCreateModal","DENIED","user","getUsersDefaultOrganiserId","forEach","organiserId","defaultOrganiser","EventEmitter","CourseUtils","courseApplicationService","_router","modalService","authService","platformConfigurationService","courseConstantsService","callFetchCourse","proceedWithCancellation","then","shouldCancel","cancelCourseApplicationWorker","cancelCourseApplicationByUser","successCancelApplicationFromCourse","emit","Promise","resolve","validForFreeCancel","confirmCancelApplicationDialog","courseStartDate","lessThanTwoWeeksUntilCourseStarts","isExternalUser","applyToCourseAsExternal","approverSelect","applyExternalUserForCourse","applySuccessful","fillModalOptions","modalRef","open","modalOption","componentInstance","result","applyForCourse","successApplicationToCourse","backdrop","calculateDiff","date","dateSent","currentDateForCalculate","UTC","getFullYear","getMonth","getDate","dateSentForCalculate","Math","floor","courseBrowse","addFavouriteCourse","isFavorite","removeFavouriteCourse","getFeedbackForm","REGISTERED","PRESENT","COMPLETED","getEligibleApplicationStatusesForAttachments","toString","approverPage","subordinatePage","isApprover","navigate","getCourseConstantsForCreatePersonal","courseChangedEmitter","next","openUpsertPersonalCourseModal","getPersonalCourse"],"sourceRoot":"webpack:///"}