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b,KAAKkP,eAAeyF,eAAiB3U,KAAK2W,qBAAqBxI,QACjEnO,KAAK4U,0BAA2B,EAChC5U,KAAKoR,aACF+J,gBAAgB,CACfC,OAAQpb,KAAKkP,eAAeyF,cAC5B/F,KAAM,CACJvF,WAAYI,eAGf7B,UAAU,CACTmB,KAAOqG,IACDA,IACGpP,KAAK2R,kBACR3R,KAAK8G,aAAc,EACnB9G,KAAKqb,0BAA2B,EAChCrb,KAAKkP,eAAiB,IACjBlP,KAAKkP,eACR4D,kBAAmB1D,EAAOO,SAI9B3P,KAAKqR,qBAAqB0D,2CAA2C/U,KAAKkP,eAAgBE,GAAM,EAGpGI,SAAU,KACRxP,KAAK4U,0BAA2B,KAI1C,CACAI,SACEhV,KAAKwR,OAAOyD,SAAS,CAAC,gBACxB,wCAtaWK,GAAyBgG,qFA1C/BpG,KAAoBoG,8DA0CdhG,EAAyB3U,+mFDjEtChB,0BAwOAA,mCAxOMA,0CAwOUA,6DAA4C,s6iKCvK/C2V,KAAyBiG,UADrCzK,QACYwE","names":["i0","DialogComponent","constructor","dialogRef","data","this","ngOnInit","depositLimitDate","FormControl","defaultDate","closeDialog","name","close","value","_angular_core__WEBPACK_IMPORTED_MODULE_0__","MAT_DIALOG_DATA","selectors","ctx","DragAndDropDirective","EventEmitter","onDragOver","event","stopEvent","fileOver","onDragLeave","ondrop","files","dataTransfer","length","fileDropped","emit","preventDefault","stopPropagation","FilesUploaderComponent","notificationService","DEFAULT_EXTENSIONS","ngOnChanges","changes","hasDocument","documents","uploading","uploadingFile","currentValue","documentsList","disableUpload","multiFiles","onFileDropped","prepareFilesList","fileBrowseHandler","$event","target","filesArray","index","push","uploadingFiles","Array","from","splice","forEach","file","itemSize","formatFileSize","size","goodExtension","allowedExtensions","includes","type","maxSize","uploadFile","error","fileDropElement","nativeElement","newFiles","uploadCallbackFn","deleteFile","id","deleteCallbackFn","bytes","decimals","dm","parseFloat","Math","pow","toFixed","core","FinalDocIconComponent","IconButtonComponent","emitClick","clickCallbackFn","LoaderComponent","MessageComponent","ResearchSpinnerComponent","ValidationComponent","stepType","StepType","title","message","COORDINATOR_EXTENSIONS","CoordinatorThesisRoute","DocumentType","OralType","Project","FinalDocFormComponent","formBuilder","group","Validators","titleMaxLength","plan","planMaxLength","resume","resumeMaxLength","coSupervisor","isConfidential","Subscription","addFormChangesTrigger","disableForm","finalDocForm","disable","disableCoSupervisorInput","get","patchValue","thesis","enabled","displayCoSupervisor","lastName","firstName","finalDocFormSubscription","add","valueChanges","subscribe","values","onFormValuesChanges","isValid","invalid","ThesisDocumentsTableComponent","onMarkInputKeyDown","code","ThesisStepsModule","CommonModule","TranslateModule","SharedModule","BreadcrumbService","BehaviorSubject","_breadcrumbs$","asObservable","addBreadcrumb","pageTitle","_currentbreadCrums","next","initBreadcrumb","factory","getTimeTable","getThesisStatus","step","stepStatus","specialization","projectCode","pvDocExist","EnumStepStatus","Specialisation","sortListByDate","list","sort","c1","c2","dateA","Date","createdAt","getTime","getCoordinatorMenu","specialisation","examination","currentMenu","route","document","concat","getPageSizeOptions","resultsLength","options","evaluationHasTwoGrid","programCode","isExecutiveProProgram","isExecutiveTutoredProgram","CommonStepsModule","DisplayQuestion","DynamicFormComponent","_class","answersService","questions","currentQuestions","map","question","display","childName","answer","answerValue","childQuestion","find","a","displayingQuestions","b","order","codirQuestion","codirQuestionName","form","toFormGroup","addSaveTrigger","addInvalidFormTrigger","addCodirectorTrigger","enableFormGroup","Object","keys","controls","key","control","enable","addValidators","updateValueAndValidity","disableFormGroup","currentControl","q","timeForDebounce","getTimeForDebounce","unescapedCharacters","dynamicFormSubscription","pipe","debounceTime","trimmedValue","toString","trim","isValueChanged","controlIsValid","valid","test","saveChanges","questionType","extendedDebounceTime","answerResponse$","previousAnswer","updateAnswerAsync","answerId","body","createOrUpdateRequest","questionCategoryId","currentCategory","questionId","studentId","currentStudent","createAnswerAsync","result","questionItem","formChanged","categoryIsValid","complete","success","statusChanges","status","formInvalid","formGroup","codirControlForm","tap","validators","formControl","isRequired","parseInt","FormGroup","addTriggerForChildCtrl","childControl","setValue","manageDisplayingQuestion","setErrors","markAsTouched","childIndex","findIndex","tslib_es6","AutoUnsubscribe","EvaluationFormComponent","evaluation_form_component_class","questionService","categoriesService","studentStore","stepsService","globalStorageService","breadcrumbService","thesisSupervisorStore","router","quizFormSubscription","supervisorMode","coordinatorMode","readonlyStep","currentTitle","getThesisSupervisor","getQuestionCategoriesByStudentId","getStudent","navigationTitle","getQuestionCategoriesByStudentIdAsync","categories","showValidButton","every","isCompleted","focusedFirstUncompletedCategory","select","setStudentFormData","disableFormByStep","studentOwner","currentStudentStep","currentStep","currentStepStatus","getCategories","project","tabIndex","getTabIndex","catMatGroup","selectedIndex","tabBody","_elementRef","querySelector","focus","click","getQuestionsByCategory","currentFormIsValid","incompleteCategoryIndex","getIncompleteTabIndex","category","getQuestionsAndAnswersByStudentAndCategoryIdAsync","nextCategory","checkCategory","finishedCatIndex","c","onFormChanged","request","updateQuestion","answerResponse","indexQuestion","onFormInvalid","validForm","currentStepId","formJustSavedOrValidated","validateStepAndNextAsync","nextStepStatus","updateStudentCurrentStepAndDispatchToStore","goBack","navigate","GlobalStorageService","ProfessionalFormControls","OralOrganizationFormControls","THESIS_DATA_TYPE","OralOrganizationComponent","professorsService","campusService","examinationService","email","fullName","supervisor","professionalSupervisor","professionalSupervisorForm","oralDate","timeSlot","campus","placeDetails","placeDetailsMaxLength","oralType","requirements","requirementsMaxLength","oralOrganizationSubscription","parent","getThesisFromStore","commonOralOrganizationSteps","oralOrganizationForm","checkStep","displayProfessionalSupervisor","shouldDisplayProfessionalSupervisor","timeTable","campusList","getCampus","patchForm","addTriggers","thesisSupervisorReducer","setThesisInformations","THESIS_SUPERVISOR","currentThesis","STUDENT","thesisData","currentStartRegisterAt","semesters","isCurrent","startRegisterAt","semesterStartDate","currentStudentData","initializeProfessionalSupervisor","disableProfessionalSupervisorForm","disableLoader","controlName","autoCompleteLoading","professionalSupervisors","isReferent","textInputs","textareaDebounceTime","saveForm","addSupervisorsTrigger","SUPERVISOR","supervisor$","getSupervisorsByLastNameAsync","supervisors","selectedCoSupervisor","COSUPERVISOR","filter","Observable","supervisorControl","coSupervisor$","getSupervisorsAndCoSupervisorsByLastNameAsync","coSupervisors","selectedSupervisor","coSupervisorControl","getAllCampusAsync","getFullName","professor","examinationResult$","campusId","CAMPUS","coSupervisorId","supervisorId","thesisId","ORALTYPE","proSupervisorFormValues","EMAIL","FULLNAME","professionalRequest","isProfessionalSupervisorReferent","updateExaminationByIdAsync","examinationId","createExaminationAsync","examinationsResponse","updateThesisInStore","updatedThesis","dispatch","ThesisActions","JSON","stringify","validStep","updateStepAsync","stepId","displayValidationMessage","_angular_core__WEBPACK_IMPORTED_MODULE_8__","tslib__WEBPACK_IMPORTED_MODULE_37__"],"sourceRoot":"webpack:///","sources":["./src/app/shared/components/dialog/dialog.component.html","./src/app/shared/components/dialog/dialog.component.ts","./src/app/shared/directives/draganddrop.directive.ts","./src/app/shared/components/files-uploader/files-uploader.component.html","./src/app/shared/components/files-uploader/files-uploader.component.ts","./src/app/shared/components/final-doc-icon/final-doc-icon.component.ts","./src/app/shared/components/final-doc-icon/final-doc-icon.component.html","./src/app/shared/components/icon-button/icon-button.component.ts","./src/app/shared/components/icon-button/icon-button.component.html","./src/app/shared/components/loader/loader.component.html","./src/app/shared/components/loader/loader.component.ts","./src/app/shared/components/message/message.component.html","./src/app/shared/components/message/message.component.ts","./src/app/shared/components/research-spinner/research-spinner.component.html","./src/app/shared/components/research-spinner/research-spinner.component.ts","./src/app/shared/components/validation/validation.component.html","./src/app/shared/components/validation/validation.component.ts","./src/app/shared/constants/allowedExtensions.ts","./src/app/shared/enums/coordinator-thesis-route.enum.ts","./src/app/shared/enums/documentType.enum.ts","./src/app/shared/enums/oral-type.enum.ts","./src/app/shared/enums/project.enum.ts","./src/app/shared/enums/step-type.enum.ts","./src/app/shared/modules/thesis-steps/components/final-doc-form/final-doc-form.component.html","./src/app/shared/modules/thesis-steps/components/final-doc-form/final-doc-form.component.ts","./src/app/shared/modules/thesis-steps/components/thesis-documents-table/thesis-documents-table.component.html","./src/app/shared/modules/thesis-steps/components/thesis-documents-table/thesis-documents-table.component.ts","./src/app/shared/modules/thesis-steps/thesis-steps.module.ts","./src/app/shared/services/breadcrumb.service.ts","./src/app/shared/services/tools.service.ts","./src/app/views/common/common-steps.module.ts","./src/app/shared/enums/displayQuestion.enum.ts","./src/app/shared/components/dynamic-form/dynamic-form.component.html","./src/app/shared/components/dynamic-form/dynamic-form.component.ts","./src/app/views/student/components/common/evaluation-form/evaluation-form.component.html","./src/app/views/student/components/common/evaluation-form/evaluation-form.component.ts","./src/app/views/student/components/oral-organization/oral-organization.component.html","./src/app/views/student/components/oral-organization/oral-organization.component.ts"],"sourcesContent":["

{{ data.title | translate }}

\n\n {{ data.content | translate }}\n
\n \n \n \n \n \n
\n
\n
\n \n \n
\n","import { Component, Inject, OnInit } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { DialogData } from '../../models/dialogData.model';\nimport { FormControl } from '@angular/forms';\n\n@Component({\n selector: 'app-dialog',\n templateUrl: './dialog.component.html',\n styleUrls: ['./dialog.component.scss'],\n})\nexport class DialogComponent implements OnInit {\n depositLimitDate!: FormControl;\n constructor(\n public dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA)\n public data: DialogData\n ) {}\n ngOnInit(): void {\n this.depositLimitDate = new FormControl(this.data.defaultDate);\n }\n\n closeDialog(name: string): void {\n if (name == 'CONFIRM_DATE') {\n this.dialogRef.close(this.depositLimitDate.value);\n } else {\n this.dialogRef.close(true);\n }\n }\n}\n","import { Directive, Output, EventEmitter, HostBinding, HostListener } from '@angular/core';\n\n@Directive({\n selector: '[appDnd]',\n})\nexport class DragAndDropDirective {\n @HostBinding('class.fileover') fileOver!: boolean;\n @Output() fileDropped = new EventEmitter();\n\n // Dragover\n @HostListener('dragover', ['$event']) onDragOver(event: any) {\n this.stopEvent(event);\n this.fileOver = true;\n }\n\n // Dragleave\n @HostListener('dragleave', ['$event']) public onDragLeave(event: any) {\n this.stopEvent(event);\n this.fileOver = false;\n }\n\n // Drop\n @HostListener('drop', ['$event']) public ondrop(event: any) {\n this.stopEvent(event);\n this.fileOver = false;\n let files = event.dataTransfer.files;\n if (files.length > 0) {\n this.fileDropped.emit(files);\n }\n }\n\n private stopEvent(event: any): void {\n event.preventDefault();\n event.stopPropagation();\n }\n}\n","\n
\n \"upload\n
\n

{{ 'UPLOAD_DOCUMENT_COMPONENT_LABEL' | translate }}

\n \n \n
\n
\n
\n
\n
\n {{ document.createdAt | date : 'dd/MM/yyyy' }}\n
\n
\n \"file\n \n {{ document.name }}\n \n
\n \n
\n
\n \n
\n
\n
{{ 'UPLOAD_DOCUMENT_LABEL_WEIGHT' | translate }} {{ maxSize }}Mo
{{ 'UPLOAD_DOCUMENT_LABEL_FORMAT' | translate }}
\n
\n\n
\n \"upload\n
\n

{{ 'UPLOAD_DOCUMENT_COMPONENT_LABEL' | translate }}

\n \n
\n
\n
\n
\n \n
\n \n
\n\n
\n \n\n
\n \"\"\n
\n

\n {{ document.name }}\n

\n

\n {{ document.createdAt | date : 'dd/MM/yyyy' }}\n

\n
\n \n
\n \n
\n \n
\n","import { Component, ElementRef, EventEmitter, Input, OnChanges, Output, SimpleChanges, ViewChild } from '@angular/core';\n\nimport { NotificationService } from '@sharedServices/notification.service';\nimport { DocumentResponse } from '@sharedModels/document-response';\nimport { DEFAULT_EXTENSIONS } from '@sharedConstants/allowedExtensions';\n\n@Component({\n selector: 'app-files-uploader',\n templateUrl: './files-uploader.component.html',\n styleUrls: ['./files-uploader.component.scss'],\n})\nexport class FilesUploaderComponent implements OnChanges {\n @Output() readonly deleteCallbackFn = new EventEmitter();\n @Output() readonly uploadCallbackFn = new EventEmitter();\n @Input() smallerVersion = false;\n @Input() conventionVersion = false;\n @Input() multiFiles = true;\n @Input() maxSize = 5; // 5MO\n @Input() allowedExtensions = DEFAULT_EXTENSIONS;\n @Input() documents!: DocumentResponse[];\n @Input() uploading!: boolean;\n\n @ViewChild('fileDropRef', { static: false }) fileDropElement!: ElementRef;\n\n uploadingFile = false;\n disableUpload = false;\n documentsList!: DocumentResponse[];\n hasDocument = false;\n\n constructor(private notificationService: NotificationService) {}\n\n ngOnChanges(changes: SimpleChanges): void {\n this.hasDocument = this.documents && this.documents.length > 0;\n if (changes.uploading) {\n this.uploadingFile = changes.uploading?.currentValue;\n }\n if (changes.documents?.currentValue) {\n this.documentsList = changes.documents?.currentValue;\n }\n this.disableUpload = this.documentsList && this.documentsList.length >= 1 && !this.multiFiles;\n }\n\n /**\n * on file drop handler\n */\n onFileDropped(files: File[]) {\n if (!this.disableUpload) this.prepareFilesList(files);\n }\n\n /**\n * handle file from browsing\n */\n fileBrowseHandler($event: Event) {\n const htmlInputElement = $event.target as HTMLInputElement;\n const files = htmlInputElement.files as FileList;\n let filesArray: File[] = [];\n for (let index = 0; index < files.length; index++) {\n filesArray.push(files[index]);\n }\n this.prepareFilesList(filesArray);\n }\n\n /**\n * Check size and extension\n * @param files (Files List)\n */\n prepareFilesList(files: File[]) {\n let uploadingFiles = Array.from(files);\n let filesArray = new Array();\n\n if (!this.multiFiles) {\n uploadingFiles = uploadingFiles.splice(0, 1);\n }\n uploadingFiles.forEach(file => {\n const itemSize = this.formatFileSize(file.size);\n const goodExtension = this.allowedExtensions.includes(file.type);\n if (itemSize < this.maxSize && goodExtension) {\n filesArray = [...filesArray, file];\n this.uploadFile(filesArray);\n } else if (!goodExtension) {\n this.notificationService.error('UPLOAD_ERROR_EXTENSION');\n } else if (itemSize > this.maxSize) {\n this.notificationService.error('UPLOAD_ERROR_SIZE');\n }\n });\n this.fileDropElement.nativeElement.value = '';\n }\n\n /**\n * Emit documents list to upload\n */\n uploadFile(newFiles: File[]) {\n this.uploadCallbackFn.emit(newFiles);\n }\n\n /**\n * Delete file\n * @param id (documentId)\n */\n deleteFile(id: string | undefined) {\n this.deleteCallbackFn.emit(id);\n }\n\n /**\n * format bytes to MO\n * @param bytes (File size in bytes)\n * @param decimals (Decimals point)\n */\n formatFileSize(bytes: number, decimals = 2) {\n if (bytes === 0) {\n return 0;\n }\n const k = 1024;\n const dm = decimals <= 0 ? 0 : decimals;\n return parseFloat((bytes / Math.pow(k, 2)).toFixed(dm));\n }\n}\n","import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'app-final-doc-icon',\n templateUrl: './final-doc-icon.component.html',\n styleUrls: ['./final-doc-icon.component.scss'],\n})\nexport class FinalDocIconComponent {\n @Input() isValid!: boolean | null | undefined;\n @Input() style = '';\n @Input() label = '';\n @Input() icon = '';\n}\n","
\n \n {{ label | translate }}\n
\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\n\n@Component({\n selector: 'app-icon-button',\n templateUrl: './icon-button.component.html',\n styleUrls: ['./icon-button.component.scss'],\n})\nexport class IconButtonComponent {\n @Input() disabled = false;\n @Input() icon!: string;\n @Input() iconSize!: number;\n @Output() readonly clickCallbackFn = new EventEmitter();\n\n emitClick() {\n this.clickCallbackFn.emit();\n }\n}\n","\n {{ icon }}\n\n","
\n
\n
\n
\n","import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'app-loader',\n templateUrl: './loader.component.html',\n styleUrls: ['./loader.component.scss'],\n})\nexport class LoaderComponent {\n @Input() loading = false;\n @Input() gridOverlay = false;\n @Input() customClass!: string;\n}\n","\n \n {{ message | translate }}\n {{ limitDate | date : 'dd/MM/yyyy' }}\n \n error_outline\n\n","import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'app-message',\n templateUrl: './message.component.html',\n styleUrls: ['./message.component.scss'],\n})\nexport class MessageComponent {\n @Input() message!: string;\n @Input() limitDate!: string | null;\n @Input() type = 'success';\n}\n","\n \n\n","import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'app-research-spinner',\n templateUrl: './research-spinner.component.html',\n styleUrls: ['./research-spinner.component.scss'],\n})\nexport class ResearchSpinnerComponent {\n @Input() researchInProgress = false;\n @Input() insideInput = false;\n}\n","
\n
\n

{{ title | translate }}

\n

{{ message | translate }}

\n
\n
\n","import { Component, Input, OnInit } from '@angular/core';\nimport { StepType } from '@sharedEnums/step-type.enum';\n\n@Component({\n selector: 'app-validation',\n templateUrl: './validation.component.html',\n styleUrls: ['./validation.component.scss'],\n})\nexport class ValidationComponent implements OnInit {\n @Input() validationState = false;\n @Input() stepType!: StepType;\n title = '';\n message = '';\n\n ngOnInit(): void {\n switch (this.stepType) {\n case StepType.INSCRIPTION:\n this.title = 'INSCRIPTION_TITLE';\n break;\n case StepType.PITCH:\n this.title = 'PITCH_TITLE';\n this.message = 'PITCH_MESSAGE';\n break;\n case StepType.PITCH_ALTERNANCE:\n this.title = 'PITCH_TITLE';\n this.message = 'PITCH_MESSAGE_ALTERNANCE';\n break;\n case StepType.FINAL:\n this.title = 'FINAL_TITLE';\n this.message = 'FINAL_MESSAGE';\n break;\n case StepType.FINAL_DRAFTS:\n this.title = 'FINAL_DRAFTS_TITLE';\n this.message = 'FINAL_DRAFTS_MESSAGE';\n break;\n case StepType.FINAL_EDI:\n this.title = 'FINAL_TITLE';\n this.message = 'FINAL_MESSAGE_EDI';\n break;\n case StepType.FINAL_ALTERNANCE:\n this.title = 'FINAL_TITLE';\n this.message = 'FINAL_MESSAGE_ALTERNANCE';\n break;\n case StepType.ORGA:\n this.title = 'ORGA_TITLE';\n this.message = 'ORGA_MESSAGE';\n break;\n case StepType.BOOK:\n this.title = 'BOOK_TITLE';\n this.message = 'BOOK_MESSAGE';\n break;\n case StepType.DRAFT:\n this.title = 'DRAFT_TITLE';\n this.message = 'DRAFT_MESSAGE';\n break;\n case StepType.PLAN:\n this.title = 'PLAN_TITLE';\n this.message = 'PLAN_MESSAGE';\n break;\n case StepType.INTER_PCI:\n this.title = 'PCI_INTERMEDIATE_TITLE';\n this.message = 'PCI_INTERMEDIATE_MESSAGE';\n break;\n case StepType.SUBJECT:\n this.title = 'SUBJECT_TITLE';\n this.message = 'SUBJECT_MESSAGE';\n }\n }\n}\n","export const COORDINATOR_EXTENSIONS = [\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n 'application/vnd.ms-excel',\n 'application/vnd.oasis.opendocument.spreadsheet',\n 'application/msword',\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n 'application/vnd.oasis.opendocument.text',\n 'text/plain',\n 'application/pdf',\n 'image/png',\n 'image/jpeg',\n 'application/vnd.ms-powerpoint',\n 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\n];\n\nexport const DEFAULT_EXTENSIONS = [\n 'application/pdf',\n 'application/msword',\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n 'application/vnd.oasis.opendocument.text',\n];\n","export enum CoordinatorThesisRoute {\n INFO = 'general-info',\n DETAILS = 'details',\n NOTES = 'notes',\n EVALUATION = 'evaluation',\n LITERATURE = 'documents/literature',\n PLANDRAFT = 'documents/plan-draft',\n PLAN = 'documents/plan',\n FINAL = 'documents/final-doc',\n ARBITRATION = 'arbitration',\n EXAMINATION_ORGANIZATION = 'examination-organization',\n EXAMINATION = 'examination',\n PV = 'examination/pv',\n HISTORIC = 'historic',\n BILLING = 'billing',\n CONVENTION_AGREEMENT = 'convention-agreement',\n ADDITIONNAL_INFO = 'additional-information',\n STUDENT = 'student',\n}\n","export enum DocumentType {\n FINAL = 'FINAL',\n FINALDRAFT1 = 'FINALDRAFT1',\n FINALDRAFT2 = 'FINALDRAFT2',\n PV = 'PV',\n SIGNEDPV = 'SIGNEDPV',\n PITCH = 'PITCH',\n CONV = 'CONV',\n SIGNEDCONV = 'SIGNEDCONV',\n MET = 'MET',\n ANA = 'ANA',\n BOOK = 'BOOK',\n PROBLEM = 'PROBLEM',\n SUBJECT = 'SUBJECT',\n DRAFT = 'DRAFT',\n PLAN = 'PLAN',\n SPEC = 'SPEC',\n STUDY = 'STUDY',\n BUSINESS = 'BUSINESS',\n FINANCIAL = 'FINANCIAL',\n BUSINESS1 = 'BUSINESS1',\n BUSINESS2 = 'BUSINESS2',\n BUSINESS3 = 'BUSINESS3',\n MINITHESIS = 'MINITHESIS',\n PROJECT = 'PROJECT',\n COORDINATOR = 'COORDINATOR',\n}\n","export enum OralType {\n INPERSON = 1,\n REMOTELY,\n HYBRID,\n}\n","export enum Project {\n MEM = 'MEM',\n PC = 'PC',\n PCI = 'PCI',\n PCE = 'PCE',\n IBL = 'IBL'\n}\n","export enum StepType {\n INSCRIPTION = 1,\n PITCH,\n PITCH_ALTERNANCE,\n INTER_PCI,\n FINAL,\n FINAL_EDI,\n FINAL_ALTERNANCE,\n EVAL,\n ORGA,\n RESULT,\n BOOK,\n DRAFT,\n PLAN,\n FINAL_DRAFTS,\n SUBJECT,\n}\n","
\n
\n \n \n \n {{ titleInput.value.length }} / {{ titleMaxLength }}\n \n {{ 'ERROR.REQUIRED' | translate }}\n \n \n
\n
\n \n \n \n {{ planInput.value.length }} / {{ planMaxLength }}\n \n {{ 'ERROR.REQUIRED' | translate }}\n \n \n
\n
\n \n \n \n {{ resumeInput.value.length }} / {{ resumeMaxLength }} \n \n {{ 'ERROR.REQUIRED' | translate }}\n \n \n
\n
\n \n \n \n \n \n {{ coSupervisor.lastName }} {{ coSupervisor.firstName }}\n \n \n \n {{ 'ERROR.REQUIRED' | translate }}\n \n \n {{ 'ERROR.JURY' | translate }}\n \n \n
\n
\n {{ 'CONFIDENTIAL_DOC' | translate }} \n
\n
\n","import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges, OnInit } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\nimport { ProfessorSearchResponse } from '@sharedModels/professor-search-response';\nimport { ThesisResponse } from '@sharedModels/thesis-response';\nimport { ThesisSupervisorResponse } from '@sharedModels/thesis-supervisor-response';\nimport { Observable, Subscription } from 'rxjs';\n\nexport type FinalDocFormValues = {\n title: string | null;\n plan: string | null;\n resume: string | null;\n coSupervisor: ProfessorSearchResponse | null;\n isConfidential: boolean | null;\n};\n\n@Component({\n selector: 'app-final-doc-form',\n templateUrl: './final-doc-form.component.html',\n styleUrls: ['./final-doc-form.component.scss'],\n})\nexport class FinalDocFormComponent implements OnInit, OnChanges {\n @Input() pageTitle!: string;\n @Input() disableForm = false;\n @Input() disableCoSupervisorInput = false;\n @Input() thesis: ThesisResponse | ThesisSupervisorResponse | undefined;\n\n @Output() onFormValuesChanges = new EventEmitter<{ values: FinalDocFormValues; isValid: boolean }>();\n\n coSupervisor$!: Observable;\n titleMaxLength = 1000;\n planMaxLength = 1700;\n resumeMaxLength = 2000;\n\n finalDocForm: FormGroup = this.formBuilder.group({\n title: [null, [Validators.required, Validators.maxLength(this.titleMaxLength)]],\n plan: [null, [Validators.required, Validators.maxLength(this.planMaxLength)]],\n resume: [null, [Validators.required, Validators.maxLength(this.resumeMaxLength)]],\n coSupervisor: [null],\n isConfidential: [null],\n });\n\n readonly finalDocFormSubscription = new Subscription();\n\n constructor(private readonly formBuilder: FormBuilder) {}\n\n ngOnInit(): void {\n this.addFormChangesTrigger();\n\n if (this.disableForm) {\n this.finalDocForm.disable();\n }\n\n if (this.disableCoSupervisorInput) {\n this.finalDocForm.get('coSupervisor')?.disable();\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.finalDocForm.patchValue(changes.thesis.currentValue);\n if (changes.disableForm && changes.disableForm.currentValue && this.finalDocForm.enabled) {\n this.finalDocForm.disable();\n }\n }\n\n displayCoSupervisor(coSupervisor: ProfessorSearchResponse): string {\n return coSupervisor && `${coSupervisor.lastName} ${coSupervisor.firstName}`;\n }\n\n addFormChangesTrigger() {\n this.finalDocFormSubscription.add(\n this.finalDocForm.valueChanges.subscribe(values => {\n this.onFormValuesChanges.emit({ values, isValid: !this.finalDocForm.invalid });\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 \n
Documents{{ 'MARK' | translate }}
{{ 'NODOCUMENT' | translate }}
{{ document.createdAt | date : 'dd/MM/yyyy' }}\n \"file\n {{ document.name }}\n \n \n \n \n \n \n \n {{ document.mark }}\n /20\n
\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { DocumentResponse } from '@sharedModels/document-response';\n\n@Component({\n selector: 'app-thesis-documents-table',\n templateUrl: './thesis-documents-table.component.html',\n styleUrls: ['./thesis-documents-table.component.scss'],\n})\nexport class ThesisDocumentsTableComponent {\n @Input() documents: DocumentResponse[] = [];\n @Input() markIsRequired = false;\n @Input() canDeleteDocuments = false;\n @Input() isSupervisor = false;\n\n @Output() readonly onDeleteDocument = new EventEmitter();\n @Output() readonly onDownloadDocument = new EventEmitter();\n\n onMarkInputKeyDown(event: KeyboardEvent) {\n const input = event.target as HTMLInputElement;\n if (input.value.length >= 5 && event.code !== 'Backspace' && event.code !== 'Delete') {\n event.preventDefault();\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RegistrationFormComponent } from './components/registration-form/registration-form.component';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { SharedModule } from '../../shared.module';\nimport { ThesisDocumentsTableComponent } from './components/thesis-documents-table/thesis-documents-table.component';\nimport { FinalDocFormComponent } from './components/final-doc-form/final-doc-form.component';\n\n@NgModule({\n declarations: [RegistrationFormComponent, ThesisDocumentsTableComponent, FinalDocFormComponent],\n exports: [RegistrationFormComponent, ThesisDocumentsTableComponent, FinalDocFormComponent],\n imports: [CommonModule, TranslateModule.forChild(), SharedModule],\n})\nexport class ThesisStepsModule {}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class BreadcrumbService {\n private _currentbreadCrums = new Array();\n private readonly _breadcrumbs$ = new BehaviorSubject([]);\n readonly breadcrumbs$ = this._breadcrumbs$.asObservable();\n\n public addBreadcrumb(pageTitle: string) {\n if (pageTitle) {\n if (this._currentbreadCrums.length > 1) {\n this._currentbreadCrums.splice(this._currentbreadCrums.length - 1, 1, pageTitle);\n } else {\n this._currentbreadCrums.push(pageTitle);\n }\n this._breadcrumbs$.next(this._currentbreadCrums);\n }\n }\n\n public initBreadcrumb() {\n this._currentbreadCrums = [];\n this._currentbreadCrums.push('HOME');\n this._breadcrumbs$.next(this._currentbreadCrums);\n }\n}\n","import { CommentResponse, CoordinatorCommentResponse, DocumentResponse, EnumStepStatus, ExaminationResponse } from '../api/models';\nimport { Specialisation } from '@sharedEnums/specialisation.enum';\nimport { Project } from '@sharedEnums/project.enum';\nimport { CoordinatorThesisRoute } from '@sharedEnums/coordinator-thesis-route.enum';\nimport { MenuItem } from '@sharedModels/menu.model';\n\n/**\n *\n * @return a string[] of time slots for thesis oral organization\n */\nexport function getTimeTable(): string[] {\n return ['08h30', '10h00', '11h30', '13h00', '14h00', '15h30'];\n}\n\n/**\n * Returns the status of a thesis based on various parameters.\n *\n *\n * @param {number} step - The current step of the thesis process.\n * @param {EnumStepStatus} stepStatus - The status of the current step.\n * @param {Specialisation} specialization - The type of specialization.\n * @param {Project} projectCode - The code of the project.\n * @return {string} The status of the thesis.\n */\nexport function getThesisStatus(step: number, stepStatus: EnumStepStatus, specialization: Specialisation, projectCode: Project, pvDocExist = false): string {\n if (step === 1 && stepStatus === EnumStepStatus.ValidationInProgress && specialization !== Specialisation.EDI) {\n return 'STATUS_SUPERVISION_REQUEST';\n }\n\n if (specialization === Specialisation.EDI) {\n if (step === 1 && stepStatus === EnumStepStatus.ValidationInProgress) {\n return 'STATUS_FRAMING';\n }\n if (step === 2 && stepStatus === EnumStepStatus.InProgress) {\n return 'STATUS_FRAMING_VALIDATED';\n }\n\n if (step === 2 && stepStatus === EnumStepStatus.ValidationInProgress) {\n return 'STATUS_BOOK_DOC_SENT';\n }\n\n if (step === 2 && stepStatus === EnumStepStatus.Refused) {\n return 'STATUS_BOOK_DOC_REVIEW';\n }\n\n if (step === 3 && stepStatus === EnumStepStatus.ValidationInProgress) {\n return 'STATUS_DRAFT_DOC_SENT';\n }\n\n if (step === 3 && stepStatus === EnumStepStatus.Refused) {\n return 'STATUS_DRAFT_DOC_REVIEW';\n }\n\n if (step === 3 && stepStatus === EnumStepStatus.InProgress) {\n return 'STATUS_BOOK_DOC_VALID';\n }\n\n if (step === 4 && stepStatus === EnumStepStatus.InProgress) {\n return 'STATUS_DRAFT_DOC_VALID';\n }\n\n if (step === 4 && stepStatus === EnumStepStatus.Refused) {\n return 'STATUS_PLAN_DOC_REVIEW';\n }\n\n if (step === 4 && stepStatus === EnumStepStatus.ValidationInProgress) {\n return 'STATUS_PLAN_DOC_SENT';\n }\n\n if (step === 5 && stepStatus === EnumStepStatus.InProgress) {\n return 'STATUS_PLAN_DOC_VALIDATED';\n }\n\n if (step === 5 && stepStatus === EnumStepStatus.Waiting) {\n return 'STATUS_FINAL_DOC_AWAITING_VALID';\n }\n\n if (step === 7 && stepStatus === EnumStepStatus.ValidationInProgress) {\n return 'STATUS_THESIS_TO_VALIDATE';\n }\n\n if (step === 7 && stepStatus === EnumStepStatus.Waiting && !pvDocExist) {\n return 'STATUS_THESIS_WAITING_GRADE';\n }\n\n if (step === 7 && stepStatus === EnumStepStatus.Waiting && pvDocExist) {\n return 'STATUS_PV_TO_SIGN';\n }\n\n if (step === 7 && stepStatus === EnumStepStatus.Validated) {\n return 'STATUS_THESIS_FINISH';\n }\n }\n\n if (step === 2 && stepStatus === EnumStepStatus.InProgress) {\n return 'STATUS_SUPERVISION_VALIDATED';\n }\n\n if (\n (specialization === Specialisation.CLASSIQUE && projectCode !== Project.IBL && projectCode !== Project.PCI) ||\n specialization === Specialisation.ALTERNANCE\n ) {\n if (step === 2 && stepStatus === EnumStepStatus.ValidationInProgress) {\n return 'STATUS_PITCH_SENT';\n }\n\n if (step === 4) {\n switch (stepStatus) {\n case EnumStepStatus.InProgress:\n return 'STATUS_INTERMEDIATE_DOCS_SENT';\n case EnumStepStatus.ValidationInProgress:\n return 'STATUS_FINAL_DOC_SENT';\n case EnumStepStatus.Refused:\n return 'STATUS_FINAL_DOC_REVIEW';\n }\n }\n\n if (step === 5 && stepStatus === EnumStepStatus.InProgress) {\n return 'STATUS_FINAL_DOC_VALIDATED';\n }\n\n if (step === 6) {\n switch (stepStatus) {\n case EnumStepStatus.InProgress:\n return 'STATUS_SEMESTER_EVALUATION_DONE';\n case EnumStepStatus.Waiting:\n return 'STATUS_ORAL_RESERVATION_SENT';\n }\n }\n }\n\n if (specialization === Specialisation.CLASSIQUE && projectCode === Project.PCI) {\n if (step === 2 && stepStatus === EnumStepStatus.ValidationInProgress) {\n return 'STATUS_PITCH_SENT';\n }\n\n if (step === 4 && stepStatus === EnumStepStatus.InProgress) {\n return 'STATUS_PROJECT_MINI_THESIS_SENT';\n }\n\n if (step === 5 && stepStatus === EnumStepStatus.InProgress) {\n return 'STATUS_SEMESTER_EVALUATION_DONE';\n }\n }\n\n if (specialization === Specialisation.CLASSIQUE && projectCode === Project.IBL) {\n if (step === 3 && stepStatus === EnumStepStatus.InProgress) {\n return 'STATUS_INTERMEDIATE_DOCS_SENT';\n }\n\n if (step === 3 && stepStatus === EnumStepStatus.ValidationInProgress) {\n return 'STATUS_FINAL_DOC_V1_SENT';\n }\n\n if (step === 4 && stepStatus === EnumStepStatus.ValidationInProgress) {\n return 'STATUS_FINAL_DOC_V2_SENT';\n }\n }\n\n if ((specialization === Specialisation.CLASSIQUE && projectCode === Project.IBL) || specialization === Specialisation.EDI) {\n if (step === 5 && stepStatus === EnumStepStatus.ValidationInProgress) {\n return 'STATUS_FINAL_DOC_SENT';\n }\n\n if (step === 5 && stepStatus === EnumStepStatus.Refused) {\n return 'STATUS_FINAL_DOC_REVIEW';\n }\n\n if (step === 6 && stepStatus === EnumStepStatus.InProgress) {\n return 'STATUS_FINAL_DOC_VALIDATED';\n }\n\n if (step === 7 && stepStatus === EnumStepStatus.InProgress) {\n return 'STATUS_SEMESTER_EVALUATION_DONE';\n }\n\n if (step === 7 && stepStatus === EnumStepStatus.Waiting) {\n return 'STATUS_ORAL_RESERVATION_SENT';\n }\n }\n\n return '';\n}\n\n/**\n *\n * @param {CommentResponse[] | DocumentResponse[] | CoordinatorCommentResponse[]} list\n * @return The list sort by createdDate\n */\nexport function sortListByDate(list: T[]): T[] {\n const currentList = list.sort((c1, c2) => {\n const dateA = new Date(c1.createdAt);\n const dateB = new Date(c2.createdAt);\n return dateB.getTime() - dateA.getTime();\n });\n\n return currentList;\n}\n\n//TODO Add project for other specialisations\n/**\n *\n * @param {string} specialisation\n * @param {ExaminationResponse} examination - Need examination to know if we enable deposit PV sub menu depending to examination document\n * @return The menu by specialisation\n */\nexport function getCoordinatorMenu(specialisation: string, examination: ExaminationResponse | null | undefined): MenuItem[] {\n switch (specialisation) {\n case Specialisation.EDI:\n let currentMenu = [\n {\n title: 'MENU.GEN_INFO',\n route: CoordinatorThesisRoute.INFO,\n },\n {\n title: 'MENU.DETAILS',\n route: CoordinatorThesisRoute.DETAILS,\n },\n {\n title: 'MENU.LITERATURE',\n route: CoordinatorThesisRoute.LITERATURE,\n },\n {\n title: 'MENU.PLANDRAFT',\n route: CoordinatorThesisRoute.PLANDRAFT,\n },\n {\n title: 'MENU.PLAN',\n route: CoordinatorThesisRoute.PLAN,\n },\n {\n title: 'MENU.FINAL',\n route: CoordinatorThesisRoute.FINAL,\n },\n {\n title: 'MENU.EVAL',\n route: CoordinatorThesisRoute.EVALUATION,\n },\n {\n title: 'MENU.ORAL_ORGA',\n route: CoordinatorThesisRoute.EXAMINATION_ORGANIZATION,\n },\n {\n title: 'MENU.ORAL_EVAL',\n route: CoordinatorThesisRoute.EXAMINATION,\n },\n ] as MenuItem[];\n\n if (examination?.document) {\n currentMenu.push({\n title: 'MENU.ORAL_PV',\n route: CoordinatorThesisRoute.PV,\n } as MenuItem);\n }\n\n currentMenu = currentMenu.concat([\n {\n title: 'MENU.COMMENT',\n route: CoordinatorThesisRoute.ADDITIONNAL_INFO,\n },\n {\n title: 'MENU.HISTORIC',\n route: CoordinatorThesisRoute.HISTORIC,\n },\n ] as MenuItem[]);\n\n return currentMenu;\n\n default:\n return [];\n }\n}\n\n/**\n *\n * @param resultsLength of the grid\n * @returns the options array with the page sizes\n */\nexport function getPageSizeOptions(resultsLength: number) {\n const options: number[] = [];\n\n if (resultsLength > 10) {\n options.push(10);\n }\n\n if (resultsLength > 30) {\n options.push(30);\n }\n\n if (resultsLength > 50) {\n options.push(50);\n }\n\n if (resultsLength > 100) {\n options.push(100);\n }\n\n return options;\n}\n\n/**\n *\n * @param programCode\n * @returns if the Edi evaluation must have 2 categories\n */\nexport function evaluationHasTwoGrid(programCode: string): boolean {\n return isExecutiveProProgram(programCode) && isExecutiveTutoredProgram(programCode);\n}\n\n/**\n *\n * @param programCode\n * @returns if the program code is available for the Executive professional project evaluation\n */\nfunction isExecutiveProProgram(programCode: string): boolean {\n return ['5_EXEC_MSDC', '5_EXEC_MSDF', '5_EXEC_MSDM', '5_EXEC_MSDTDH'].includes(programCode);\n}\n\n/**\n *\n * @param programCode\n * @returns if the program code is available for the Executive tutored professional evaluation\n */\nfunction isExecutiveTutoredProgram(programCode: string): boolean {\n return ['5_EXEC_MSDC', '5_EXEC_MSDF', '5_EXEC_MSDM', '5_EXEC_MSDTDH', '5_EXEC_EMBA', '5_EXEC_IMBA', '5_EXEC_MBA_HUB', '5_EXEC_MBALC'].includes(programCode);\n}\n","import { NgModule } from '@angular/core';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { SharedModule } from 'src/app/shared/shared.module';\nimport { SingleDocFormComponent } from './components/single-doc-form/single-doc-form.component';\nimport { OralOrganizationButtonComponent } from '@views/student/components/edi/oral-organization-button/oral-organization-button.component';\n\n@NgModule({\n declarations: [SingleDocFormComponent, OralOrganizationButtonComponent],\n exports: [SingleDocFormComponent, OralOrganizationButtonComponent],\n imports: [SharedModule, TranslateModule.forChild()],\n})\nexport class CommonStepsModule {}\n","export enum DisplayQuestion {\n BLOCK = 'block',\n NONE = 'none',\n}\n","
\n
\n
\n \n
\n \n \n {{ question.name | translate }}\n \n
\n
\n \n
\n \n \n \n step1Form.controls.project?.errors?.required\n \n {{ 'ERROR.REQUIRED' | translate }}\n \n \n \n \n \n /20\n \n {{ 'ERROR.MARK_REQUIRED' | translate }}\n \n \n \n \n \n {{ textareaInput.value.length }} / {{ question.maxSize }}\n \n {{ 'ERROR.REQUIRED' | translate }}\n \n \n \n \n \n {{ option.key | translate }}\n \n \n \n \n \n \n {{ option.key | translate }}\n \n \n \n {{ 'ERROR.REQUIRED' | translate }}\n \n \n
\n
\n
\n
\n
\n","import { Component, ElementRef, EventEmitter, Input, OnChanges, Output, QueryList, SimpleChanges, ViewChildren } from '@angular/core';\nimport { FormControl, FormGroup, Validators } from '@angular/forms';\nimport { QuestionAnswerResponse } from '@sharedModels/question-answer-response';\nimport { Subscription, debounceTime, tap, Observable } from 'rxjs';\nimport { AutoUnsubscribe } from 'src/app/shared/decorators/autoUnsubscribe';\nimport { DisplayQuestion } from '@sharedEnums/displayQuestion.enum';\nimport { Question } from '@sharedModels/question.model';\nimport { AnswerResponse } from '@sharedModels/answer-response';\nimport { CreateOrUpdateAnswerRequest } from '@sharedModels/create-or-update-answer-request';\nimport { AnswersService } from '@sharedServices/answers.service';\nimport { QuestionCategoryTabResponse } from '@sharedModels/question-category-tab-response';\nimport { StudentResponse } from '@sharedModels/student-response';\nimport { NotificationService } from '../../services/notification.service';\nimport { AnswerChange } from '@sharedModels/answerChange.models';\n\n@Component({\n selector: 'app-dynamic-form',\n templateUrl: './dynamic-form.component.html',\n styleUrls: ['./dynamic-form.component.scss'],\n})\n@AutoUnsubscribe()\nexport class DynamicFormComponent implements OnChanges {\n @Input() currentStudent: StudentResponse | undefined;\n @Input() currentCategory: QuestionCategoryTabResponse | undefined;\n @Input() questions: QuestionAnswerResponse[] | undefined;\n @Input() disableForm = false;\n\n @Output() readonly formChanged = new EventEmitter();\n @Output() readonly formInvalid = new EventEmitter();\n\n @ViewChildren('questionsContainer') questionsContainer!: QueryList;\n\n form!: FormGroup;\n\n displayingQuestions = new Array();\n codirQuestionName = 'CODIRDONTCHECKBOX';\n codirQuestion!: QuestionAnswerResponse | undefined;\n\n debounceTime = 0;\n extendedDebounceTime = 500;\n\n dynamicFormSubscription = new Subscription();\n\n constructor(private answersService: AnswersService, private notificationService: NotificationService) {}\n\n // get questions when category changed\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.questions.currentValue) {\n let currentQuestions = changes.questions.currentValue.map((question: Question) => ({\n ...question,\n display: DisplayQuestion.BLOCK,\n })) as Question[];\n\n currentQuestions.forEach(question => {\n if (question.childName && (!question.answer || question.answer?.answerValue !== '1')) {\n const childQuestion = currentQuestions.find(a => a.name == question.childName);\n if (childQuestion) this.displayingQuestions.push({ ...childQuestion, display: DisplayQuestion.NONE });\n }\n if (!this.displayingQuestions.find(a => a.id == question.id)) this.displayingQuestions.push(question);\n });\n\n this.displayingQuestions = this.displayingQuestions.sort((a, b) => a.order - b.order);\n this.codirQuestion = this.displayingQuestions.find(a => a.name == this.codirQuestionName);\n this.form = this.toFormGroup(this.displayingQuestions);\n\n this.addSaveTrigger();\n this.addInvalidFormTrigger();\n\n if (this.codirQuestion) {\n this.addCodirectorTrigger(this.codirQuestion, this.form);\n }\n }\n\n if (changes.disableForm.currentValue === true) {\n this.form.disable();\n }\n }\n\n enableFormGroup(codirQuestion: QuestionAnswerResponse) {\n Object.keys(this.form.controls).forEach(key => {\n if (key !== codirQuestion.id) {\n const control = this.form.get(key);\n control?.enable();\n control?.addValidators(Validators.required);\n control?.updateValueAndValidity();\n }\n });\n }\n\n disableFormGroup(codirQuestion: QuestionAnswerResponse) {\n Object.keys(this.form.controls).forEach(key => {\n if (key !== codirQuestion.id) {\n const control = this.form.get(key);\n control?.disable();\n }\n });\n }\n\n // Add trigger on form to save change\n addSaveTrigger(): void {\n Object.keys(this.form.controls).forEach(key => {\n const currentControl = this.form.controls[key];\n const question = this.displayingQuestions?.find(q => q.id == key);\n const timeForDebounce = this.getTimeForDebounce(question?.type);\n const unescapedCharacters = /[^\\\\]([^\\\\]|\\\\[btnfr'\"\\\\])*/;\n this.dynamicFormSubscription.add(\n currentControl.valueChanges.pipe(debounceTime(timeForDebounce)).subscribe(value => {\n const trimmedValue = value?.toString().trim();\n const isValueChanged = question?.answer?.answerValue !== trimmedValue;\n const controlIsValid = currentControl.valid;\n\n if ((isValueChanged && unescapedCharacters.test(trimmedValue) && controlIsValid) || (controlIsValid && trimmedValue === '' && isValueChanged)) {\n this.form.disable();\n this.saveChanges(key, value, question);\n }\n })\n );\n });\n }\n\n getTimeForDebounce(questionType: string | undefined): number {\n switch (questionType) {\n case 'number':\n case 'textarea':\n return this.extendedDebounceTime;\n default:\n return this.debounceTime;\n }\n }\n\n saveChanges(key: string, value: any, question: Question | undefined): void {\n let answerResponse$: Observable;\n const previousAnswer = this.questions?.find(q => q.id == key)?.answer;\n if (previousAnswer) {\n answerResponse$ = this.answersService.updateAnswerAsync({\n answerId: previousAnswer.id,\n body: { answerValue: value?.toString() },\n });\n } else {\n const createOrUpdateRequest: CreateOrUpdateAnswerRequest = {\n answerValue: value?.toString(),\n questionCategoryId: this.currentCategory?.id,\n questionId: key,\n studentId: this.currentStudent?.id,\n };\n answerResponse$ = this.answersService.createAnswerAsync({\n body: createOrUpdateRequest,\n });\n }\n\n answerResponse$.subscribe({\n next: (result: AnswerResponse) => {\n if (result) {\n if (question) {\n question.answer = result;\n // Update question & answer in questions list\n this.questions?.forEach(questionItem => {\n if (questionItem.id == key) questionItem = questionItem;\n });\n }\n\n this.form.enable();\n const answerChange: AnswerChange = {\n questionId: key,\n categoryIsValid: this.form.valid,\n answer: result,\n };\n this.formChanged.emit(answerChange);\n }\n },\n complete: () => this.notificationService.success('SAVE_SUCCESS'),\n });\n }\n\n addInvalidFormTrigger(): void {\n this.dynamicFormSubscription.add(\n this.form.statusChanges.subscribe(status => {\n if (status === 'INVALID') {\n this.formInvalid.emit();\n }\n })\n );\n }\n\n addCodirectorTrigger(codirQuestion: QuestionAnswerResponse, formGroup: FormGroup) {\n const codirControlForm = formGroup.get(codirQuestion.id);\n this.dynamicFormSubscription.add(\n codirControlForm?.valueChanges\n .pipe(\n tap(value => {\n if (value == true) {\n this.disableFormGroup(codirQuestion);\n } else {\n this.enableFormGroup(codirQuestion);\n }\n })\n )\n .subscribe()\n );\n codirControlForm?.updateValueAndValidity();\n }\n\n toFormGroup(questions: Question[]): FormGroup {\n const group: any = {};\n questions.forEach(question => {\n const validators = [];\n let formControl: FormControl;\n if (question.isRequired) validators.push(Validators.required);\n if (question.maxSize) validators.push(Validators.maxLength(question.maxSize));\n let currentValue: string | number | undefined | boolean = question.answer?.answerValue;\n if (question.answer?.answerValue) {\n if (question.type === 'number') {\n // Grade validator\n validators.push(Validators.max(20));\n currentValue = parseInt(question.answer.answerValue);\n }\n if (question.type === 'checkbox') {\n currentValue = question.answer?.answerValue == 'true';\n }\n }\n formControl = new FormControl(currentValue, validators);\n group[question.id] = formControl;\n });\n\n const formGroup = new FormGroup(group);\n this.addTriggerForChildCtrl(formGroup, questions);\n\n return formGroup;\n }\n\n addTriggerForChildCtrl(formGroup: FormGroup, questions: Question[]): void {\n questions.forEach(question => {\n if (question.childName) {\n const childQuestion = questions.find(q => q.name == question.childName);\n if (childQuestion) {\n const childControl = formGroup.get(childQuestion.id);\n if (question.answer?.answerValue !== '1') {\n childControl?.setValue(null);\n childControl?.disable();\n }\n this.dynamicFormSubscription.add(\n formGroup\n .get(question.id)\n ?.valueChanges.pipe(\n tap(value => {\n // If the first answer of the parent question is select (value == 1)\n if (value == 1) {\n childControl?.enable();\n this.manageDisplayingQuestion(question, DisplayQuestion.BLOCK);\n const validators = [];\n validators.push(Validators.required);\n if (childQuestion.maxSize) {\n validators.push(Validators.maxLength(childQuestion.maxSize));\n }\n if (childQuestion.type === 'number') {\n validators.push(Validators.pattern(/^(\\d|1\\d|20)(\\.\\d{1,2})?$/));\n }\n childControl?.addValidators(validators);\n if (!formGroup.get(childQuestion.id)?.value) {\n childControl?.setErrors({\n invalid: true,\n });\n }\n } else {\n childControl?.setValue(null);\n childControl?.disable();\n this.manageDisplayingQuestion(question, DisplayQuestion.NONE);\n }\n childControl?.markAsTouched();\n childControl?.updateValueAndValidity();\n })\n )\n .subscribe()\n );\n }\n }\n });\n formGroup.updateValueAndValidity();\n }\n\n manageDisplayingQuestion(question: Question, display: DisplayQuestion) {\n const childIndex = this.displayingQuestions.findIndex(a => a.name == question.childName);\n this.displayingQuestions[childIndex].display = display;\n }\n}\n","\n\n
\n
\n \n \n \n
\n check_circle_outline\n \n
\n

{{ currentTitle | translate }}

\n \n
0 && category.id == currentCategory.id\" class=\"evaluation-form show_element\">\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, ViewChild } from '@angular/core';\nimport { MatTabGroup } from '@angular/material/tabs';\nimport { QuestionCategoryTabResponse } from '@sharedModels/question-category-tab-response';\nimport { QuestionCategoriesService } from '@sharedServices/question-categories.service';\nimport { QuestionsService } from '@sharedServices/questions.service';\nimport { map, Observable, Subscription, tap } from 'rxjs';\nimport { StudentState } from 'src/store/student/student.states';\nimport { Store } from '@ngrx/store';\nimport { StudentResponse } from '@sharedModels/student-response';\nimport { QuestionAnswerResponse } from '@sharedModels/question-answer-response';\nimport { StepsService } from '@sharedServices/steps.service';\nimport { AutoUnsubscribe } from 'src/app/shared/decorators/autoUnsubscribe';\nimport { AnswerResponse } from '@sharedModels/answer-response';\nimport { Specialisation } from '@sharedEnums/specialisation.enum';\nimport GlobalStorageService from '@coreServices/globalStorageService';\nimport { Project } from '@sharedEnums/project.enum';\nimport { EnumStepStatus } from '@sharedModels/enum-step-status';\nimport { AnswerChange } from '@sharedModels/answerChange.models';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { BreadcrumbService } from '@sharedServices/breadcrumb.service';\nimport { ThesisSupervisorState } from 'src/store/thesis/thesis.states';\nimport { ThesisSupervisorResponse } from '@sharedModels/thesis-supervisor-response';\nimport { getThesisSupervisor } from 'src/store/thesis/thesis.reducer';\nimport { getStudent } from 'src/store/student/student.reducer';\nimport { CoordinatorResponse } from '@sharedModels/coordinator-response';\n\n// TODO: We continue to use this component for each different parts (Student, Supervisor, Coordinator), using data routing like before\n// We need to finish refactoring of the component by externalizing forms or update the component for Coordinator part\n@Component({\n selector: 'app-evaluation-form',\n templateUrl: './evaluation-form.component.html',\n styleUrls: ['./evaluation-form.component.scss'],\n})\n@AutoUnsubscribe()\nexport class EvaluationFormComponent implements OnInit {\n @Input() readonlyStep!: boolean;\n\n @ViewChild('catMatGroup') catMatGroup!: MatTabGroup;\n\n currentCoordinator!: CoordinatorResponse;\n currentStep!: number;\n currentStudent!: StudentResponse;\n currentCategory!: QuestionCategoryTabResponse;\n questions!: QuestionAnswerResponse[];\n categories!: QuestionCategoryTabResponse[];\n StepStatusEnum = EnumStepStatus;\n\n formJustSavedOrValidated = false;\n disableForm = false;\n currentFormIsValid = false;\n showValidButton = false;\n currentStudentStep: number | undefined;\n depositLimitDate!: string;\n currentStepStatus?: EnumStepStatus;\n supervisorMode!: boolean;\n coordinatorMode!: boolean;\n navigationTitle = 'EVALUATIONSTEP';\n currentTitle!: string;\n\n private readonly quizFormSubscription = new Subscription();\n\n constructor(\n private questionService: QuestionsService,\n private categoriesService: QuestionCategoriesService,\n private studentStore: Store,\n private stepsService: StepsService,\n private globalStorageService: GlobalStorageService,\n private breadcrumbService: BreadcrumbService,\n private thesisSupervisorStore: Store,\n private route: ActivatedRoute,\n private router: Router\n ) {}\n\n ngOnInit(): void {\n this.quizFormSubscription.add(\n this.route.data.subscribe(value => {\n this.supervisorMode = value.supervisorMode ?? false;\n this.coordinatorMode = value.coordinatorMode ?? false;\n if (this.supervisorMode || this.coordinatorMode) {\n this.readonlyStep = true;\n }\n })\n );\n\n if (this.supervisorMode || this.coordinatorMode) {\n this.currentTitle = 'SEMESTER_EVAL_SUPERVISOR_TITLE';\n this.quizFormSubscription.add(\n this.getThesisSupervisor().subscribe(() => {\n this.disableForm = true;\n this.getQuestionCategoriesByStudentId();\n })\n );\n } else {\n this.currentTitle = 'SEMESTER_EVAL_TITLE';\n this.quizFormSubscription.add(\n this.getStudent().subscribe(() => {\n this.getQuestionCategoriesByStudentId();\n })\n );\n }\n\n if (this.supervisorMode) this.quizFormSubscription.add(this.breadcrumbService.addBreadcrumb(this.navigationTitle));\n }\n\n getQuestionCategoriesByStudentId() {\n if (this.currentStudent?.id) {\n this.categoriesService\n .getQuestionCategoriesByStudentIdAsync({ studentId: this.currentStudent.id })\n .pipe(\n map(result => {\n this.categories = result;\n this.showValidButton = result.every(a => a.isCompleted);\n return true;\n }),\n tap(result => {\n if (result) {\n this.focusedFirstUncompletedCategory();\n }\n })\n )\n .subscribe();\n }\n }\n\n getStudent(): Observable {\n return this.studentStore.select(getStudent).pipe(\n tap(result => {\n this.currentStudent = result;\n if (this.currentStudent) {\n this.setStudentFormData();\n }\n this.disableForm = this.disableFormByStep();\n })\n );\n }\n\n getThesisSupervisor(): Observable {\n return this.thesisSupervisorStore.select(getThesisSupervisor).pipe(\n tap(result => {\n if (result.studentOwner) {\n this.currentStudent = result.studentOwner;\n this.setStudentFormData();\n }\n })\n );\n }\n\n setStudentFormData() {\n this.currentStudentStep = this.currentStudent.currentStep;\n this.currentStepStatus = this.currentStudent.currentStepStatus;\n this.depositLimitDate = this.currentStudent.depositLimitDate ?? '';\n }\n\n getCategories() {\n return this.categoriesService.getQuestionCategoriesByStudentIdAsync({ studentId: this.currentStudent.id }).pipe(\n map(result => {\n this.categories = result;\n this.showValidButton = result.every(a => a.isCompleted);\n return true;\n }),\n tap(result => {\n if (result) {\n this.focusedFirstUncompletedCategory();\n }\n })\n );\n }\n\n disableFormByStep(): boolean {\n const currentStep = this.currentStudent.currentStep;\n const specialisation = this.currentStudent.specialisation;\n const projectCode = this.currentStudent.thesis?.project?.code;\n\n if (specialisation.name === Specialisation.CLASSIQUE) {\n if (projectCode !== Project.IBL && projectCode !== Project.PCI && currentStep !== 5) {\n return true;\n }\n if (projectCode === Project.PCI && currentStep !== 4) {\n return true;\n }\n if (projectCode === Project.IBL && currentStep !== 6) {\n return true;\n }\n } else if (specialisation.name === Specialisation.EDI && currentStep !== 6) {\n return true;\n } else if (specialisation.name === Specialisation.ALTERNANCE && currentStep !== 5) {\n return true;\n }\n\n return false;\n }\n\n focusedFirstUncompletedCategory(): void {\n const tabIndex = this.getTabIndex();\n this.catMatGroup.selectedIndex = tabIndex;\n const tabBody = this.catMatGroup._elementRef.nativeElement.querySelector(`#mat-tab-label-${tabIndex}`);\n if (tabBody) {\n tabBody.focus();\n tabBody.click();\n }\n this.getQuestionsByCategory(this.categories[tabIndex]);\n this.currentFormIsValid = this.categories[tabIndex].isCompleted;\n }\n\n getTabIndex(): number {\n const currentStep = this.currentStudent.currentStep;\n const specialisation = this.currentStudent.specialisation;\n const projectCode = this.currentStudent.thesis?.project?.code;\n const incompleteCategoryIndex = this.categories.findIndex(a => !a.isCompleted);\n\n if (specialisation.name === Specialisation.CLASSIQUE) {\n if (projectCode !== Project.IBL) {\n return currentStep !== 5 ? 0 : this.getIncompleteTabIndex(incompleteCategoryIndex);\n } else if (projectCode === Project.IBL) {\n return currentStep !== 6 ? 0 : this.getIncompleteTabIndex(incompleteCategoryIndex);\n }\n } else if (specialisation.name === Specialisation.ALTERNANCE) {\n return currentStep !== 5 ? 0 : this.getIncompleteTabIndex(incompleteCategoryIndex);\n } else if (specialisation.name === Specialisation.EDI) {\n return currentStep !== 6 ? 0 : this.getIncompleteTabIndex(incompleteCategoryIndex);\n }\n\n return 0;\n }\n\n private getIncompleteTabIndex(incompleteCategoryIndex: number) {\n return incompleteCategoryIndex !== -1 ? incompleteCategoryIndex : 0;\n }\n\n getQuestionsByCategory(category: QuestionCategoryTabResponse) {\n if (!this.currentCategory || this.currentCategory.id !== category.id) {\n this.questions = [];\n this.currentCategory = category;\n this.questionService\n .getQuestionsAndAnswersByStudentAndCategoryIdAsync({\n studentId: this.currentStudent.id,\n questionCategoryId: category.id,\n })\n .subscribe(questions => {\n this.questions = questions;\n if (category) {\n this.currentFormIsValid = category.isCompleted;\n }\n });\n }\n }\n\n //Go to next category\n nextCategory(): void {\n let tabIndex = this.catMatGroup.selectedIndex;\n let nextCategory!: QuestionCategoryTabResponse;\n if (tabIndex != null && tabIndex + 1 < this.categories.length) {\n const tabBody = this.catMatGroup._elementRef.nativeElement.querySelector(`#mat-tab-label-0-${tabIndex + 1}`);\n this.checkCategory(true);\n tabBody.focus();\n tabBody.click();\n nextCategory = this.categories[tabIndex + 1];\n } else {\n tabIndex = this.categories.findIndex(a => !a.isCompleted);\n const tabBody = this.catMatGroup._elementRef.nativeElement.querySelector(`#mat-tab-label-0-${tabIndex}`);\n tabBody.focus();\n tabBody.click();\n nextCategory = this.categories[tabIndex];\n }\n this.getQuestionsByCategory(nextCategory);\n }\n\n checkCategory(isCompleted: boolean): void {\n const finishedCatIndex = this.categories.findIndex(c => c.id == this.currentCategory.id);\n this.categories[finishedCatIndex] = {\n ...this.categories[finishedCatIndex],\n isCompleted: isCompleted,\n };\n }\n\n onFormChanged(request: AnswerChange): void {\n if (request.categoryIsValid && request.categoryIsValid !== this.currentFormIsValid) {\n this.currentFormIsValid = request.categoryIsValid;\n this.checkCategory(this.currentFormIsValid);\n }\n this.updateQuestion(request.questionId, request.answer);\n }\n\n updateQuestion(questionId: string, answerResponse: AnswerResponse): void {\n const indexQuestion = this.questions.findIndex(q => q.id == questionId);\n // Add the answer in the question\n this.questions[indexQuestion] = {\n ...this.questions[indexQuestion],\n answer: answerResponse,\n };\n this.showValidButton = this.categories.every(a => a.isCompleted);\n }\n\n onFormInvalid(): void {\n this.currentFormIsValid = false;\n this.showValidButton = false;\n }\n\n validForm(): void {\n if (this.currentStudent.currentStepId) {\n this.formJustSavedOrValidated = true;\n this.stepsService\n .validateStepAndNextAsync({\n body: {\n currentStepId: this.currentStudent.currentStepId,\n nextStepStatus: this.currentStudent.specialisation.name === Specialisation.EDI ? EnumStepStatus.ValidationInProgress : EnumStepStatus.InProgress,\n },\n })\n .subscribe(result => {\n if (result) {\n this.formJustSavedOrValidated = false;\n this.globalStorageService.updateStudentCurrentStepAndDispatchToStore(this.currentStudent, result);\n }\n });\n }\n }\n\n goBack(): void {\n this.router.navigate(['/coordinator']);\n }\n}\n","
\n \n
\n
\n \n
\n
\n
\n

{{ 'ORGASTEP_TITLE' | translate }}

\n
{{ 'MODALITY_ORAL' | translate }}
\n
{{ 'FIELDS_MANDATORY' | translate }}
\n
\n
\n
\n
\n \n
\n \n \n \n \n \n {{ supervisor.lastName }} {{ supervisor.firstName }}\n \n \n \n {{ 'ERROR.REQUIRED' | translate }}\n \n \n {{ 'ERROR.JURY' | translate }}\n \n \n \n
\n \n
\n \n \n \n \n \n {{ coSupervisor.lastName }} {{ coSupervisor.firstName }}\n \n \n \n {{ 'ERROR.REQUIRED' | translate }}\n \n \n {{ 'ERROR.JURY' | translate }}\n \n \n \n
\n
\n \n
\n
\n \n \n \n \n {{ 'ERROR.REQUIRED' | translate }}\n \n \n
\n
\n \n \n \n \n {{ 'ERROR.REQUIRED' | translate }}\n \n \n {{ 'ERROR.EMAIL' | translate }}\n \n \n
\n
\n \n
\n
\n \n \n \n \n \n \n {{ 'ERROR.REQUIRED' | translate }}\n \n \n
\n
\n \n \n \n \n {{ time }}\n \n \n \n {{ 'ERROR.REQUIRED' | translate }}\n \n \n
\n
\n \n
\n
\n \n \n \n \n {{ campus.name }}\n \n \n \n {{ 'ERROR.REQUIRED' | translate }}\n \n \n
\n \n
\n \n \n \n {{ placeDetailsInput.value.length }} / {{ placeDetailsMaxLength }}\n \n
\n
\n \n
\n
\n \n \n {{ 'INPERSON' | translate }}\n \n {{ 'REMOTELY' | translate }}\n {{ 'HYBRID' | translate }}\n \n
\n
\n
\n \n \n \n {{ requirementsInput.value.length }} / {{ requirementsMaxLength }} \n \n {{ 'ERROR.REQUIRED' | translate }}\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 { FormBuilder, FormGroup, Validators } from '@angular/forms';\nimport { OralType } from '@sharedEnums/oral-type.enum';\nimport { ProfessorSearchResponse } from '@sharedModels/professor-search-response';\nimport { debounceTime, map, Observable, Subscription, tap } from 'rxjs';\nimport * as thesisSupervisorReducer from 'src/store/thesis/thesis.reducer';\nimport { StudentState } from 'src/store/student/student.states';\nimport { Store } from '@ngrx/store';\nimport { AutoUnsubscribe } from 'src/app/shared/decorators/autoUnsubscribe';\nimport { ThesisResponse } from '@sharedModels/thesis-response';\nimport { StepsService } from '@sharedServices/steps.service';\nimport { StudentResponse } from '@sharedModels/student-response';\nimport { EnumStepStatus } from '@sharedModels/enum-step-status';\nimport { ProfessorsService } from '@sharedServices/professors.service';\nimport { Project } from '@sharedEnums/project.enum';\nimport { CampusService } from '@sharedServices/campus.service';\nimport { ExaminationsService } from '@sharedServices/examinations.service';\nimport { CampusResponse } from '@sharedModels/campus-response';\nimport { StepType } from '@sharedEnums/step-type.enum';\nimport { ExaminationResponse } from '@sharedModels/examination-response';\nimport { NotificationService } from 'src/app/shared/services/notification.service';\nimport { CreateOrUpdateProfessionalRequest } from '@sharedModels/create-or-update-professional-request';\nimport { ProfessionalResponse } from '@sharedModels/professional-response';\nimport GlobalStorageService from '@coreServices/globalStorageService';\nimport { CreateOrUpdateExaminationRequest } from '@sharedModels/create-or-update-examination-request';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { ThesisSupervisorState } from 'src/store/thesis/thesis.states';\nimport { ThesisSupervisorResponse } from '@sharedModels/thesis-supervisor-response';\nimport { getStudent } from 'src/store/student/student.reducer';\nimport { ThesisActions } from 'src/store/thesis/thesis.actions';\nimport { StepResponse } from '@sharedModels/step-response';\nimport { SupervisorResponse } from '@sharedModels/supervisor-response';\nimport { getTimeTable } from '@sharedServices/tools.service';\n\nenum ProfessionalFormControls {\n EMAIL = 'email',\n FULLNAME = 'fullName',\n}\n\nenum OralOrganizationFormControls {\n SUPERVISOR = 'supervisor',\n COSUPERVISOR = 'coSupervisor',\n ORALDATE = 'oralDate',\n ORALTYPE = 'oralType',\n TIMESLOT = 'timeSlot',\n CAMPUS = 'campus',\n PLACEDETAILS = 'placeDetails',\n REQUIREMENTS = 'requirements',\n}\n\nenum THESIS_DATA_TYPE {\n THESIS_SUPERVISOR,\n STUDENT,\n}\n\ntype ThesisDataType = {\n type: THESIS_DATA_TYPE;\n data: ThesisSupervisorResponse | StudentResponse;\n};\n@Component({\n selector: 'app-oral-organization',\n templateUrl: './oral-organization.component.html',\n styleUrls: ['./oral-organization.component.scss'],\n})\n@AutoUnsubscribe()\nexport class OralOrganizationComponent implements OnInit {\n @Input() currentStep!: number;\n\n debounceTime = 0;\n textareaDebounceTime = 1400;\n requirementsMaxLength = 2000;\n placeDetailsMaxLength = 200;\n textInputs = ['requirements', 'placeDetails', 'professionalSupervisor'];\n\n oralType = OralType;\n Project = Project;\n stepType = StepType.ORGA;\n EnumStepStatus = EnumStepStatus;\n autoCompleteLoading: { [key: string]: boolean } = {};\n coordinatorMode!: boolean;\n formJustSavedOrValidated = false;\n disableForm = false;\n displayProfessionalSupervisor = false;\n displayValidationMessage = false;\n\n professionalFormControlsEnum = ProfessionalFormControls;\n oralOrganizationFormControlsEnum = OralOrganizationFormControls;\n oralOrganizationSubscription = new Subscription();\n currentStudent!: StudentResponse;\n currentStudentStep!: number;\n currentStepStatus?: EnumStepStatus;\n currentThesis!: ThesisResponse;\n semesterStartDate!: Date;\n professionalSupervisor!: ProfessionalResponse | undefined;\n campusList!: CampusResponse[];\n supervisor$!: Observable;\n coSupervisor$!: Observable;\n timeTable!: string[];\n depositLimitDate!: string;\n //Init forms\n professionalSupervisorForm: FormGroup = this.formBuilder.group({\n email: ['', [Validators.required, Validators.email]],\n fullName: ['', Validators.required],\n });\n\n oralOrganizationForm: FormGroup = this.formBuilder.group({\n supervisor: [null],\n coSupervisor: [null],\n professionalSupervisor: this.professionalSupervisorForm,\n oralDate: [null, Validators.required],\n timeSlot: [null, Validators.required],\n campus: [null, Validators.required],\n placeDetails: [null, Validators.maxLength(this.placeDetailsMaxLength)],\n oralType: [OralType.INPERSON, Validators.required],\n requirements: [null, Validators.maxLength(this.requirementsMaxLength)],\n });\n\n constructor(\n private formBuilder: FormBuilder,\n private studentStore: Store,\n private stepsService: StepsService,\n private professorsService: ProfessorsService,\n private campusService: CampusService,\n private examinationService: ExaminationsService,\n private notificationService: NotificationService,\n private globalStorageService: GlobalStorageService,\n private thesisSupervisorStore: Store,\n private router: Router,\n private route: ActivatedRoute\n ) {}\n\n ngOnInit(): void {\n this.oralOrganizationSubscription.add(\n this.route.parent?.data.subscribe(value => {\n this.coordinatorMode = value.coordinatorMode ?? false;\n })\n );\n\n if (this.coordinatorMode) {\n this.oralOrganizationSubscription.add(\n this.getThesisFromStore().subscribe((result: ThesisSupervisorResponse) => {\n if (result.id) this.commonOralOrganizationSteps();\n })\n );\n\n this.oralOrganizationForm.controls.supervisor.addValidators(Validators.required);\n } else {\n this.getStudent().subscribe(result => {\n if (result) {\n this.commonOralOrganizationSteps();\n this.checkStep();\n this.oralOrganizationForm.controls.supervisor.disable();\n this.oralOrganizationForm.controls.coSupervisor.disable();\n this.displayProfessionalSupervisor = this.shouldDisplayProfessionalSupervisor();\n }\n });\n }\n }\n\n /**\n * common methods for student , coordinator or supervisor\n */\n commonOralOrganizationSteps(): void {\n this.timeTable = getTimeTable();\n if (!this.campusList) this.getCampus();\n this.patchForm();\n this.addTriggers();\n }\n\n getThesisFromStore(): Observable {\n return this.thesisSupervisorStore.select(thesisSupervisorReducer.getThesisSupervisor).pipe(\n tap(result => {\n if (result.studentOwner) {\n this.currentStudent = result.studentOwner;\n this.setThesisInformations({ data: result, type: THESIS_DATA_TYPE.THESIS_SUPERVISOR });\n }\n })\n );\n }\n\n checkStep() {\n if (\n this.currentStudent.currentStep > this.currentStep ||\n (this.currentStudent.currentStep === this.currentStep && this.currentStudent.currentStepStatus === EnumStepStatus.Waiting)\n ) {\n Object.keys(this.oralOrganizationForm.controls).forEach(key => {\n this.oralOrganizationForm.get(key)?.disable();\n });\n this.disableForm = true;\n }\n }\n\n shouldDisplayProfessionalSupervisor(): boolean {\n const projectCode = this.currentThesis.project?.code;\n return projectCode === Project.PC || projectCode === Project.IBL || projectCode === Project.PCE;\n }\n\n getStudent(): Observable {\n return this.studentStore.select(getStudent).pipe(\n tap(result => {\n if (result) {\n this.currentStudent = result;\n this.setThesisInformations({ data: result, type: THESIS_DATA_TYPE.STUDENT });\n }\n })\n );\n }\n\n setThesisInformations(thesisData: ThesisDataType) {\n this.currentStudentStep = this.currentStudent.currentStep;\n this.currentStepStatus = this.currentStudent.currentStepStatus;\n this.depositLimitDate = this.currentStudent.depositLimitDate ?? '';\n const currentStartRegisterAt = this.currentStudent.thesis?.semesters.find(a => a.isCurrent)?.startRegisterAt;\n\n if (currentStartRegisterAt) this.semesterStartDate = new Date(currentStartRegisterAt);\n\n if (thesisData.type == THESIS_DATA_TYPE.STUDENT) {\n const currentStudentData = { ...(thesisData.data as StudentResponse) };\n if (currentStudentData.thesis) this.currentThesis = currentStudentData.thesis;\n }\n\n if (thesisData.type == THESIS_DATA_TYPE.THESIS_SUPERVISOR) {\n const currentStudentData = { ...(thesisData.data as ThesisSupervisorResponse) };\n this.currentThesis = { ...currentStudentData, semesters: currentStudentData.semesters ?? [] };\n }\n }\n\n patchForm(): void {\n if (this.currentThesis.examination?.id) {\n this.oralOrganizationForm.patchValue({\n ...this.currentThesis.examination,\n campus: this.currentThesis.examination.campus?.id,\n });\n } else {\n this.oralOrganizationForm.patchValue({\n ...this.currentThesis,\n });\n }\n\n if (this.currentThesis && this.shouldDisplayProfessionalSupervisor()) {\n this.initializeProfessionalSupervisor();\n } else {\n // Not required if not a PC or IBL project\n this.disableProfessionalSupervisorForm();\n }\n }\n\n disableLoader(controlName: string) {\n this.autoCompleteLoading[controlName] = false;\n }\n\n private initializeProfessionalSupervisor() {\n const examination = this.currentThesis.examination;\n\n // Backup pro supervisor\n const supervisor = examination ? examination.professionalSupervisor : this.currentThesis.professionalSupervisors.find(a => !a.isReferent);\n\n // Pro supervisor\n this.professionalSupervisor = supervisor || this.currentThesis.professionalSupervisors.find(a => a.isReferent);\n\n if (this.professionalSupervisor) {\n this.professionalSupervisorForm.patchValue({ ...this.professionalSupervisor });\n }\n }\n\n private disableProfessionalSupervisorForm() {\n this.professionalSupervisorForm.controls.email.disable();\n this.professionalSupervisorForm.controls.fullName.disable();\n }\n\n addTriggers(): void {\n //auto save\n Object.keys(this.oralOrganizationForm.controls).forEach(key => {\n let currentControl = this.oralOrganizationForm.controls[key];\n const timeForDebounce = this.textInputs.includes(key) ? this.textareaDebounceTime : this.debounceTime;\n this.oralOrganizationSubscription.add(\n currentControl.valueChanges.pipe(debounceTime(timeForDebounce)).subscribe(() => {\n if (currentControl.valid && !this.coordinatorMode) {\n this.saveForm();\n }\n })\n );\n });\n\n this.addSupervisorsTrigger();\n }\n\n addSupervisorsTrigger() {\n // Supervisor\n this.oralOrganizationSubscription.add(\n this.oralOrganizationForm\n .get(OralOrganizationFormControls.SUPERVISOR)\n ?.valueChanges.pipe(\n tap((value: string | ProfessorSearchResponse | null) => {\n if (typeof value === 'string' && value.trim().toString().length >= 2) {\n this.autoCompleteLoading[OralOrganizationFormControls.SUPERVISOR] = true;\n this.supervisor$ = this.professorsService.getSupervisorsByLastNameAsync({ lastName: value.trim().toString() }).pipe(\n map(supervisors => {\n const selectedCoSupervisor = this.oralOrganizationForm.get(OralOrganizationFormControls.COSUPERVISOR)\n ?.value as ProfessorSearchResponse | null;\n\n if (!selectedCoSupervisor) {\n return supervisors;\n }\n\n return supervisors?.filter(supervisor => supervisor.id != selectedCoSupervisor.id);\n })\n );\n } else {\n this.supervisor$ = new Observable<[]>();\n }\n\n const supervisorControl = this.oralOrganizationForm.get(OralOrganizationFormControls.SUPERVISOR);\n const currentValue: ProfessorSearchResponse = { ...(value as ProfessorSearchResponse) };\n\n if (currentValue.id) {\n supervisorControl?.setErrors(null);\n } else if (value == '') {\n supervisorControl?.addValidators(Validators.required);\n this.disableLoader(OralOrganizationFormControls.SUPERVISOR);\n } else {\n supervisorControl?.setErrors({\n invalid: true,\n });\n this.disableLoader(OralOrganizationFormControls.SUPERVISOR);\n }\n })\n )\n .subscribe()\n );\n\n // CoSupervisor\n this.oralOrganizationSubscription.add(\n this.oralOrganizationForm\n .get(OralOrganizationFormControls.COSUPERVISOR)\n ?.valueChanges.pipe(\n tap((value: string | ProfessorSearchResponse | null) => {\n if (typeof value === 'string' && value.trim().toString().length >= 2) {\n this.autoCompleteLoading[OralOrganizationFormControls.COSUPERVISOR] = true;\n this.coSupervisor$ = this.professorsService.getSupervisorsAndCoSupervisorsByLastNameAsync({ lastName: value.trim().toString() }).pipe(\n map(coSupervisors => {\n const selectedSupervisor = this.oralOrganizationForm.get(OralOrganizationFormControls.SUPERVISOR)?.value as ProfessorSearchResponse | null;\n\n if (!selectedSupervisor) {\n return coSupervisors;\n }\n return coSupervisors?.filter(coSupervisor => coSupervisor.id != selectedSupervisor.id);\n })\n );\n } else {\n this.coSupervisor$ = new Observable<[]>();\n }\n\n const coSupervisorControl = this.oralOrganizationForm.get(OralOrganizationFormControls.COSUPERVISOR);\n const currentValue: ProfessorSearchResponse = { ...(value as ProfessorSearchResponse) };\n\n if (currentValue.id || value == '') {\n this.disableLoader(OralOrganizationFormControls.COSUPERVISOR);\n coSupervisorControl?.setErrors(null);\n } else {\n coSupervisorControl?.setErrors({\n invalid: true,\n });\n this.disableLoader(OralOrganizationFormControls.COSUPERVISOR);\n }\n })\n )\n .subscribe()\n );\n }\n\n getCampus() {\n this.campusService.getAllCampusAsync().subscribe(result => (this.campusList = result));\n }\n\n getFullName(professor: ProfessorSearchResponse): string {\n return professor && `${professor.lastName} ${professor.firstName}`;\n }\n\n saveForm(): void {\n this.formJustSavedOrValidated = true;\n let examinationResult$: Observable;\n\n let request: CreateOrUpdateExaminationRequest = {\n campusId: this.oralOrganizationForm.get(OralOrganizationFormControls.CAMPUS)?.value,\n coSupervisorId: this.oralOrganizationForm.get(OralOrganizationFormControls.COSUPERVISOR)?.value?.id,\n supervisorId: this.oralOrganizationForm.get(OralOrganizationFormControls.SUPERVISOR)?.value?.id,\n thesisId: this.currentThesis.id,\n oralType: this.oralOrganizationForm.get(OralOrganizationFormControls.ORALTYPE)?.value,\n ...this.oralOrganizationForm.value,\n };\n\n // professionalSupervisor\n if (this.shouldDisplayProfessionalSupervisor()) {\n const proSupervisorFormValues = {\n email: this.professionalSupervisorForm.get(ProfessionalFormControls.EMAIL)?.value.trim(),\n fullName: this.professionalSupervisorForm.get(ProfessionalFormControls.FULLNAME)?.value.trim(),\n } as CreateOrUpdateProfessionalRequest;\n\n const professionalRequest: CreateOrUpdateProfessionalRequest = {\n thesisId: this.currentThesis.id,\n ...proSupervisorFormValues,\n isReferent: this.isProfessionalSupervisorReferent(proSupervisorFormValues),\n };\n request = { ...request, professionalSupervisor: professionalRequest };\n }\n if (this.currentThesis.examination?.id) {\n examinationResult$ = this.examinationService.updateExaminationByIdAsync({\n examinationId: this.currentThesis.examination.id,\n body: request,\n });\n } else {\n examinationResult$ = this.examinationService.createExaminationAsync({\n body: request,\n });\n }\n\n examinationResult$.subscribe({\n next: (examinationsResponse: ExaminationResponse) => {\n if (examinationsResponse) {\n this.currentThesis.examination = examinationsResponse;\n this.updateThesisInStore();\n }\n },\n complete: () => {\n this.notificationService.success('SAVE_SUCCESS');\n this.formJustSavedOrValidated = false;\n },\n });\n }\n\n updateThesisInStore() {\n let updatedThesis: ThesisSupervisorResponse;\n const supervisor: SupervisorResponse = this.oralOrganizationForm.get(OralOrganizationFormControls.SUPERVISOR)?.value;\n const coSupervisor: SupervisorResponse = this.oralOrganizationForm.get(OralOrganizationFormControls.COSUPERVISOR)?.value;\n\n updatedThesis = {\n ...this.currentThesis,\n supervisor: { ...supervisor },\n coSupervisor: { ...coSupervisor },\n examination: { ...this.currentThesis.examination, coSupervisor: coSupervisor, supervisor: supervisor } as ExaminationResponse,\n };\n\n this.thesisSupervisorStore.dispatch(ThesisActions.setThesisSupervisor(updatedThesis));\n }\n\n isProfessionalSupervisorReferent(proSupervisorFormValues: CreateOrUpdateProfessionalRequest): boolean {\n if (this.currentThesis.project?.code === Project.IBL) {\n return false;\n } else {\n return !(this.professionalSupervisor && JSON.stringify(this.professionalSupervisor) != JSON.stringify(proSupervisorFormValues));\n }\n }\n\n validStep(): void {\n if (this.currentStudent.currentStepId && this.oralOrganizationForm.valid) {\n this.formJustSavedOrValidated = true;\n this.stepsService\n .updateStepAsync({\n stepId: this.currentStudent.currentStepId,\n body: {\n stepStatus: EnumStepStatus.Waiting,\n },\n })\n .subscribe({\n next: (result: StepResponse) => {\n if (result) {\n if (!this.coordinatorMode) {\n this.disableForm = true;\n this.displayValidationMessage = true;\n this.currentStudent = {\n ...this.currentStudent,\n currentStepStatus: result.status,\n };\n }\n\n this.globalStorageService.updateStudentCurrentStepAndDispatchToStore(this.currentStudent, result);\n }\n },\n complete: () => {\n this.formJustSavedOrValidated = false;\n },\n });\n }\n }\n goBack(): void {\n this.router.navigate(['/coordinator']);\n }\n}\n"],"x_google_ignoreList":[]}