{"version":3,"sources":["assets/images/logo512.png","scenes/Schedules/CreatedSchedules/logic/selectors.ts","app/CloseApp/index.js","serviceWorker.js","app/logic/sagas.ts","scenes/LogsStudent/logic/sagas.ts","scenes/Logs/logic/sagas.ts","shared/errorMessages.ts","shared/errorHandler.ts","scenes/VirtualSecretary/ExamsCalendar/logic/sagas.ts","scenes/VirtualSecretary/Applications/ApplicationDetails/logic/sagas.ts","scenes/VirtualSecretary/Applications/NewApplication/logic/sagas.ts","scenes/VirtualSecretary/Certificates/NewCertificate/logic/sagas.ts","scenes/VirtualSecretary/RegistrationDetails/logic/sagas.ts","scenes/VirtualSecretary/Registrations/logic/sagas.ts","scenes/Schedules/SeriationHistory/logic/sagas.ts","scenes/Schedules/SeriationHistoryDetails/logic/sagas.ts","scenes/Schedules/MySchedule/containers/FreeOptionsDropdown/logic/sagas.ts","shared/containers/StudentRegistrationDropdown/logic/sagas.ts","scenes/VirtualSecretary/Applications/ApplicationsList/logic/sagas.ts","scenes/VirtualSecretary/Certificates/CertificatesList/logic/sagas.ts","scenes/VirtualSecretary/Certificates/CertificatesDetails/logic/sagas.ts","scenes/VirtualSecretary/CertificateValidator/logic/sagas.ts","scenes/VirtualSecretary/Payments/logic/sagas.ts","scenes/VirtualSecretary/Payments/PendingDebitsPayment/logic/sagas.ts","scenes/VirtualSecretary/Grades/logic/sagas.ts","scenes/VirtualSecretary/AssessmentChoice/logic/sagas.ts","scenes/VirtualSecretary/ExamRegistration/logic/sagas.ts","scenes/VirtualSecretary/SubscriptionRenewal/logic/sagas.ts","scenes/VirtualSecretary/ClassSupoort/logic/sagas.ts","scenes/VirtualSecretary/CurricularPlan/CurricularPlan/logic/sagas.ts","scenes/VirtualSecretary/CurricularPlan/CurricularUnitDetails/logic/sagas.ts","scenes/VirtualSecretary/PersonalData/logic/sagas.ts","scenes/GradesManagement/GradesManagement/logic/sagas.ts","scenes/GradesManagement/EditGrades/logic/sagas.ts","scenes/GradesManagement/GradesDetails/logic/sagas.ts","scenes/GradesManagement/GradesHistory/logic/sagas.ts","scenes/Schedules/utils.tsx","scenes/Schedules/CreatedSchedules/logic/sagas.ts","scenes/Schedules/MySchedule/containers/MandatoryOptionsDropdown/logic/sagas.ts","shared/containers/Toaster/logic/sagas.ts","shared/containers/ToasterAction/logic/sagas.ts","scenes/Schedules/MySchedule/logic/sagas.ts","scenes/Schedules/FreeOptionsList/logic/sagas.ts","scenes/Schedules/containers/FreeOptionsTable/logic/sagas.ts","scenes/Schedules/SchedulesHome/logic/sagas.ts","scenes/Schedules/SchedulesGuide/logic/sagas.ts","scenes/GradesManagement/GradesGuide/logic/sagas.ts","scenes/Schedules/CreatedSchedules/containers/CreatedSchedule/logic/selectors.ts","scenes/Schedules/CreatedSchedules/containers/CreatedSchedule/logic/sagas.ts","scenes/Home/logic/sagas.ts","scenes/Help/logic/sagas.ts","scenes/VirtualSecretary/Enrollments/ImprovementExamEnrollment/logic/sagas.ts","scenes/VirtualSecretary/Enrollments/ExamEnrollment/logic/sagas.ts","scenes/VirtualSecretary/Enrollments/EvaluationTypeSelection/logic/sagas.ts","scenes/VirtualSecretary/Enrollments/EnrollmentRenewal/logic/sagas.ts","scenes/VirtualSecretary/Enrollments/SpecialExamsEnroll/logic/sagas.ts","store/rootSaga.ts","store/index.ts","api/interceptors.ts","index.tsx","scenes/GradesManagement/EditGrades/utils.js","scenes/Schedules/containers/FreeOptionsTable/logic/selectors.ts","scenes/VirtualSecretary/CurricularPlan/CurricularPlan/logic/selectors.ts","shared/containers/Breadcrumb/utils.ts","api/calls/signin.ts","api/calls/student.ts","api/calls/sgh.ts","api/calls/search.ts","api/calls/translations.ts","api/calls/secVirtual.ts","api/calls/files.ts","api/calls/pautas.ts","api/index.ts","api/utils.ts","scenes/VirtualSecretary/Applications/NewApplication/utils.tsx","scenes/Schedules/CreatedSchedules/utils.ts","scenes/GradesManagement/GradesManagement/logic/selectors.ts","shared/components/AuthWrapper/selectors.ts","shared/components/AuthWrapper/index.tsx","translations/index.js","translations/numerals.js","utils.js","scenes/VirtualSecretary/Applications/ApplicationDetails/logic/selectors.ts","scenes/Schedules/containers/FreeOptionsTable/types.ts","scenes/VirtualSecretary/PersonalData/utils.ts","config/production.ts","config/index.ts","scenes/VirtualSecretary/Applications/ApplicationsList/logic/selectors.ts","scenes/VirtualSecretary/PersonalData/logic/selectors.ts","scenes/Schedules/MySchedule/containers/FreeOptionsDropdown/logic/selectors.ts","scenes/VirtualSecretary/ExamsCalendar/logic/selectors.ts","shared/containers/StudentRegistrationDropdown/logic/selectors.ts","scenes/Schedules/MySchedule/containers/MandatoryOptionsDropdown/logic/selectors.ts","scenes/Schedules/SeriationHistoryDetails/logic/selectors.ts","scenes/VirtualSecretary/ExamsCalendar/utils.ts","scenes/GradesManagement/GradesDetails/logic/selectors.ts","shared/containers/TitleHeader/selectors.ts","shared/containers/TitleHeader/index.tsx","scenes/Home/logic/selectors.ts","shared/containers/MarkdownRenderer/selectors.ts","shared/containers/MarkdownRenderer/index.tsx","shared/containers/MarkdownRenderer/utils.tsx","scenes/Home/index.tsx","scenes/Help/logic/selectors.ts","scenes/Help/index.tsx","scenes/VirtualSecretary/Applications/NewApplication/containers/NewApplicationSelectRegistration/selectors.ts","scenes/VirtualSecretary/Applications/NewApplication/containers/NewApplicationSelectRegistration/index.tsx","scenes/VirtualSecretary/Applications/NewApplication/containers/NewApplicationSelectType/selectors.ts","scenes/VirtualSecretary/Applications/NewApplication/containers/NewApplicationSelectType/index.tsx","scenes/VirtualSecretary/Applications/NewApplication/containers/NewApplicationStatement/selectors.ts","scenes/VirtualSecretary/Applications/NewApplication/containers/NewApplicationStatement/index.tsx","scenes/VirtualSecretary/Applications/NewApplication/containers/NewApplicationSubmission/selectors.ts","shared/components/FileDownloader/index.tsx","scenes/VirtualSecretary/Applications/NewApplication/containers/NewApplicationSubmission/index.tsx","shared/containers/FormManager/validations.js","shared/components/FormInputWithFlags/index.tsx","shared/components/FormTextArea/index.tsx","shared/components/FormLargeTextArea/index.tsx","shared/components/FileUploader/index.tsx","shared/components/FormTable/index.tsx","shared/components/FormDropdown/index.tsx","shared/components/FormGroup/index.tsx","scenes/VirtualSecretary/Applications/NewApplication/components/NewApplicationDropdown/index.tsx","shared/containers/FormManager/FormElement/index.tsx","shared/containers/FormManager/utils.tsx","shared/containers/FormManager/index.tsx","scenes/VirtualSecretary/Applications/NewApplication/index.tsx","scenes/VirtualSecretary/RegistrationDetails/logic/selectors.ts","scenes/VirtualSecretary/RegistrationDetails/containers/EligibilityGraph/index.tsx","scenes/VirtualSecretary/Registrations/utils.ts","scenes/VirtualSecretary/RegistrationDetails/index.tsx","scenes/VirtualSecretary/Registrations/logic/selectors.ts","scenes/VirtualSecretary/Registrations/index.tsx","scenes/Schedules/SeriationHistory/types.ts","scenes/Schedules/SeriationHistory/logic/selectors.ts","scenes/Schedules/SeriationHistory/index.tsx","scenes/Schedules/SeriationHistoryDetails/index.tsx","scenes/PageNotFound/index.tsx","scenes/PageNoAccess/index.tsx","scenes/PageServerError/index.tsx","scenes/InMaintenance/index.tsx","shared/containers/StudentRegistrationDropdown/index.tsx","scenes/VirtualSecretary/Applications/ApplicationsList/index.tsx","scenes/VirtualSecretary/Applications/ApplicationDetails/utils.tsx","scenes/VirtualSecretary/Applications/ApplicationDetails/index.tsx","shared/components/Icons/mb.tsx","shared/components/Icons/mbway.tsx","shared/components/Icons/visa.tsx","shared/components/Icons/googleCalendar.tsx","scenes/VirtualSecretary/Payments/containers/PaymenMethodsInfo/index.tsx","scenes/VirtualSecretary/Payments/containers/PaymentsTable/utils.ts","scenes/VirtualSecretary/Payments/containers/PaymentsTable/useTable.ts","scenes/VirtualSecretary/Payments/containers/PaymentsTable/index.tsx","scenes/VirtualSecretary/Payments/containers/DebitsTable/utils.ts","scenes/VirtualSecretary/Payments/containers/DebitsTable/index.tsx","scenes/VirtualSecretary/Payments/containers/DebitsTable/useTable.ts","scenes/VirtualSecretary/Payments/containers/PendingDebitsTable/useTable.ts","scenes/VirtualSecretary/Payments/containers/PendingDebitsTable/utils.ts","scenes/VirtualSecretary/Payments/containers/PendingDebitsTable/index.tsx","scenes/VirtualSecretary/Payments/containers/MbPaymentInfoModal/index.tsx","scenes/VirtualSecretary/Payments/index.tsx","scenes/VirtualSecretary/Payments/PendingDebitsPayment/types.ts","scenes/VirtualSecretary/Payments/PendingDebitsPayment/components/SelectedPayments/index.tsx","scenes/VirtualSecretary/Payments/PendingDebitsPayment/containers/SelectDebits/index.tsx","scenes/VirtualSecretary/Payments/PendingDebitsPayment/containers/SelectPaymentMethod/index.tsx","scenes/VirtualSecretary/Payments/PendingDebitsPayment/containers/SubmitPaymentRequest/index.tsx","scenes/VirtualSecretary/Payments/containers/MultiPaymentsSelection/utils.ts","scenes/VirtualSecretary/Payments/containers/MultiPaymentsSelection/index.tsx","scenes/VirtualSecretary/Payments/containers/MultiPaymentsSelection/useTable.ts","scenes/VirtualSecretary/Payments/PendingDebitsPayment/validations.js","scenes/VirtualSecretary/Payments/PendingDebitsPayment/index.tsx","scenes/VirtualSecretary/Grades/index.tsx","scenes/VirtualSecretary/AssessmentChoice/index.tsx","scenes/VirtualSecretary/CurricularPlan/CurricularPlan/types.ts","scenes/VirtualSecretary/CurricularPlan/CurricularPlan/components/LabeledCell/index.tsx","scenes/VirtualSecretary/CurricularPlan/CurricularPlan/utils.tsx","scenes/VirtualSecretary/CurricularPlan/CurricularPlan/index.tsx","scenes/VirtualSecretary/CurricularPlan/CurricularUnitDetails/logic/selectors.ts","scenes/VirtualSecretary/CurricularPlan/CurricularUnitDetails/index.tsx","scenes/VirtualSecretary/PersonalData/containers/PersonalDataBlock/index.tsx","scenes/VirtualSecretary/PersonalData/containers/PersonalDataBlock/utils.ts","scenes/VirtualSecretary/PersonalData/index.tsx","scenes/Schedules/CreatedSchedules/containers/CreatedSchedule/index.tsx","scenes/Schedules/containers/CaptionSchedule/index.tsx","scenes/Schedules/CreatedSchedules/index.tsx","scenes/Schedules/MySchedule/containers/ScheduleConfirmationPreview/selectors.ts","scenes/Schedules/MySchedule/containers/ScheduleConfirmationPreview/index.tsx","scenes/Schedules/MySchedule/containers/ScheduleConfirmationPreview/utils.ts","scenes/Schedules/MySchedule/containers/ScheduleGridView/index.tsx","scenes/Schedules/MySchedule/containers/ScheduleListView/utils.ts","scenes/Schedules/MySchedule/containers/ScheduleListView/index.tsx","scenes/Schedules/MySchedule/containers/SelectedClasses/index.tsx","scenes/Schedules/MySchedule/containers/MandatoryOptionsDropdown/index.tsx","scenes/Schedules/containers/FreeOptionsTable/utils.ts","scenes/Schedules/containers/FreeOptionsTable/structure.tsx","scenes/Schedules/containers/FreeOptionsTable/useTable.ts","scenes/Schedules/containers/FreeOptionsTable/index.tsx","scenes/Schedules/MySchedule/containers/FreeOptionsDropdown/index.tsx","scenes/Schedules/MySchedule/containers/ClassCardDetails/index.tsx","scenes/Schedules/MySchedule/containers/SchedulesSystemHelp/selectors.ts","scenes/Schedules/MySchedule/containers/SchedulesSystemHelp/index.tsx","shared/containers/MobileSupportModal/index.tsx","scenes/Schedules/MySchedule/web.tsx","scenes/Schedules/MySchedule/index.tsx","scenes/Schedules/FreeOptionsList/logic/selectors.ts","scenes/Schedules/FreeOptionsList/index.tsx","scenes/Schedules/SchedulesHome/logic/selectors.ts","scenes/Schedules/SchedulesHome/index.tsx","scenes/Schedules/SchedulesGuide/logic/selectors.ts","scenes/Schedules/SchedulesGuide/index.tsx","scenes/Schedules/AllSchedules/index.tsx","scenes/VirtualSecretary/Certificates/NewCertificate/containers/NewCertificateSelectRegistration/selectors.ts","scenes/VirtualSecretary/Certificates/NewCertificate/containers/NewCertificateSelectRegistration/index.tsx","scenes/VirtualSecretary/Certificates/NewCertificate/containers/NewCertificateSelectType/selectors.ts","scenes/VirtualSecretary/Certificates/NewCertificate/containers/NewCertificateSelectType/index.tsx","scenes/VirtualSecretary/Certificates/NewCertificate/containers/NewCertificateStatement/selectors.ts","scenes/VirtualSecretary/Certificates/NewCertificate/hooks/useWarningModal.ts","scenes/VirtualSecretary/Certificates/NewCertificate/containers/NewCertificateStatement/index.tsx","scenes/VirtualSecretary/Certificates/NewCertificate/containers/NewCertificateSubmission/selectors.ts","shared/components/FieldsGroupDisplay/index.tsx","scenes/VirtualSecretary/Certificates/NewCertificate/containers/NewCertificateSubmission/utils.ts","scenes/VirtualSecretary/Certificates/NewCertificate/containers/NewCertificateSubmission/index.tsx","scenes/VirtualSecretary/Certificates/NewCertificate/index.tsx","scenes/VirtualSecretary/Certificates/CertificatesList/types.ts","scenes/VirtualSecretary/Certificates/CertificatesList/components/Certificate/index.tsx","scenes/VirtualSecretary/Certificates/CertificatesList/index.tsx","scenes/VirtualSecretary/Certificates/CertificatesDetails/containers/CertificateReady/PdfReader.tsx","scenes/VirtualSecretary/Certificates/CertificatesDetails/utils.tsx","scenes/VirtualSecretary/Certificates/CertificatesDetails/containers/CertificateReady/index.tsx","scenes/VirtualSecretary/Certificates/CertificatesDetails/components/CertificateState/index.tsx","scenes/VirtualSecretary/Certificates/CertificatesDetails/logic/selectors.ts","scenes/VirtualSecretary/Certificates/CertificatesDetails/containers/CertificateNotReady/index.tsx","scenes/VirtualSecretary/Certificates/CertificatesDetails/components/AccessHistoryModal/index.tsx","scenes/VirtualSecretary/Certificates/CertificatesDetails/index.tsx","scenes/VirtualSecretary/CertificateValidator/logic/selectors.ts","scenes/VirtualSecretary/CertificateValidator/index.tsx","shared/containers/PageWarningComponent/index.tsx","scenes/VirtualSecretary/ExamsCalendar/index.tsx","scenes/VirtualSecretary/Enrollments/EnrollmentRenewal/logic/selectors.ts","scenes/VirtualSecretary/Enrollments/EnrollmentRenewal/index.tsx","scenes/VirtualSecretary/Enrollments/ExamEnrollment/logic/selectors.ts","scenes/VirtualSecretary/Enrollments/ExamEnrollment/index.tsx","scenes/VirtualSecretary/Enrollments/ImprovementExamEnrollment/logic/selectors.ts","scenes/VirtualSecretary/Enrollments/ImprovementExamEnrollment/index.tsx","scenes/VirtualSecretary/Enrollments/EvaluationTypeSelection/logic/selectors.ts","scenes/VirtualSecretary/Enrollments/EvaluationTypeSelection/index.tsx","scenes/GradesManagement/GradesManagement/utils.ts","scenes/GradesManagement/GradesManagement/TableView/utils.ts","scenes/GradesManagement/GradesManagement/StateProgressBar/index.tsx","scenes/GradesManagement/GradesManagement/Modal/Modal.tsx","scenes/GradesManagement/GradesManagement/TableView/index.tsx","scenes/GradesManagement/GradesManagement/index.tsx","scenes/GradesManagement/EditGrades/logic/selectors.ts","shared/components/Modal/index.tsx","shared/components/ConfirmActionModal/index.tsx","shared/components/GradeTitle/logic/selectors.ts","shared/components/GradeTitle/index.tsx","scenes/GradesManagement/EditGrades/CSVModal/utils.ts","scenes/GradesManagement/EditGrades/CSVModal/index.tsx","scenes/GradesManagement/EditGrades/LabelsModal/index.tsx","scenes/GradesManagement/EditGrades/StatisticsModal/utils.ts","scenes/GradesManagement/EditGrades/StatisticsModal/Modal.tsx","scenes/GradesManagement/EditGrades/StatisticsModal/index.tsx","scenes/GradesManagement/EditGrades/ErrorsModal/index.tsx","scenes/GradesManagement/EditGrades/DatePicker/logic/selectors.ts","scenes/GradesManagement/EditGrades/DatePicker/ExamDatePicker.tsx","scenes/GradesManagement/EditGrades/index.tsx","scenes/GradesManagement/GradesHistory/logic/selectors.ts","scenes/GradesManagement/GradesHistory/index.tsx","scenes/GradesManagement/GradesDetails/Chart/utils.ts","scenes/GradesManagement/GradesDetails/Chart/index.tsx","scenes/GradesManagement/GradesDetails/PDFModal/index.tsx","scenes/GradesManagement/GradesDetails/index.tsx","scenes/GradesManagement/GradesDetails/utils.ts","scenes/VirtualSecretary/Enrollments/Exams/logic/selectors.ts","scenes/VirtualSecretary/Enrollments/Exams/index.tsx","scenes/VirtualSecretary/Enrollments/TransferalCompetence/logic/selectors.ts","scenes/VirtualSecretary/Enrollments/TransferalCompetence/index.tsx","scenes/VirtualSecretary/ClassSupoort/logic/selectors.ts","scenes/VirtualSecretary/ClassSupoort/index.tsx","scenes/GradesManagement/GradesGuide/logic/selectors.ts","scenes/GradesManagement/GradesGuide/index.tsx","scenes/VirtualSecretary/Enrollments/SpecialExamsEnroll/logic/selectors.ts","scenes/VirtualSecretary/Enrollments/SpecialExamsEnroll/index.tsx","shared/components/ModuleCommunication/communicationTypes.ts","scenes/Logs/logic/selectors.ts","shared/components/ModuleCommunication/utils.ts","shared/components/ModuleCommunication/usePostMessageMiddleware.ts","scenes/Logs/index.tsx","scenes/LogsStudent/logic/selectors.ts","scenes/LogsStudent/index.tsx","routes.tsx","api/endpoints.ts","scenes/Schedules/MySchedule/containers/MandatoryOptionsDropdown/utils.ts","scenes/Schedules/MySchedule/containers/FreeOptionsDropdown/utils.ts","scenes/VirtualSecretary/Certificates/NewCertificate/utils.ts","shared/containers/PageStructure/index.tsx","app/logic/slice.ts","app/AppTools/logic/slice.ts","scenes/LogsStudent/logic/slice.ts","scenes/Logs/logic/slice.ts","scenes/VirtualSecretary/ExamsCalendar/logic/slice.ts","scenes/VirtualSecretary/Applications/ApplicationDetails/logic/slice.ts","scenes/VirtualSecretary/Applications/NewApplication/logic/slice.ts","scenes/VirtualSecretary/RegistrationDetails/logic/slice.ts","scenes/VirtualSecretary/Registrations/logic/slice.ts","scenes/Schedules/SeriationHistory/logic/slice.ts","scenes/Schedules/SeriationHistoryDetails/logic/slice.ts","scenes/Schedules/MySchedule/containers/FreeOptionsDropdown/logic/slice.ts","shared/containers/StudentRegistrationDropdown/logic/slice.ts","scenes/VirtualSecretary/Applications/ApplicationsList/logic/slice.ts","scenes/VirtualSecretary/Payments/logic/slice.ts","scenes/VirtualSecretary/Payments/PendingDebitsPayment/logic/slice.ts","scenes/VirtualSecretary/Grades/logic/slice.ts","scenes/VirtualSecretary/AssessmentChoice/logic/slice.ts","scenes/VirtualSecretary/ExamRegistration/logic/slice.ts","scenes/VirtualSecretary/SubscriptionRenewal/logic/slice.ts","scenes/VirtualSecretary/ClassSupoort/logic/slice.ts","scenes/VirtualSecretary/CurricularPlan/CurricularPlan/logic/slice.ts","scenes/VirtualSecretary/CurricularPlan/CurricularUnitDetails/logic/slice.ts","scenes/VirtualSecretary/PersonalData/logic/slice.ts","scenes/Schedules/CreatedSchedules/containers/CreatedSchedule/logic/slice.ts","scenes/Schedules/CreatedSchedules/logic/slice.ts","scenes/Schedules/MySchedule/containers/MandatoryOptionsDropdown/logic/slice.ts","shared/containers/Toaster/logic/slice.ts","shared/containers/ToasterAction/logic/slice.ts","scenes/Schedules/MySchedule/logic/slice.ts","scenes/Schedules/FreeOptionsList/logic/slice.ts","scenes/Schedules/containers/FreeOptionsTable/logic/slice.ts","scenes/Schedules/SchedulesHome/logic/slice.ts","scenes/Schedules/SchedulesGuide/logic/slice.ts","scenes/GradesManagement/GradesGuide/logic/slice.ts","scenes/Home/logic/slice.ts","scenes/GradesManagement/GradesManagement/logic/slice.ts","scenes/GradesManagement/EditGrades/logic/slice.ts","scenes/GradesManagement/GradesDetails/logic/slice.ts","scenes/GradesManagement/GradesHistory/logic/slice.ts","scenes/Help/logic/slice.ts","shared/containers/Breadcrumb/logic/slice.ts","scenes/VirtualSecretary/Certificates/NewCertificate/logic/slice.ts","scenes/VirtualSecretary/Certificates/CertificatesList/logic/slice.ts","scenes/VirtualSecretary/Certificates/CertificatesDetails/logic/slice.ts","scenes/VirtualSecretary/CertificateValidator/logic/slice.ts","scenes/VirtualSecretary/Enrollments/ImprovementExamEnrollment/logic/slice.ts","scenes/VirtualSecretary/Enrollments/ExamEnrollment/logic/slice.ts","scenes/VirtualSecretary/Enrollments/EvaluationTypeSelection/logic/slice.ts","scenes/VirtualSecretary/Enrollments/EnrollmentRenewal/logic/slice.ts","scenes/VirtualSecretary/Enrollments/Exams/logic/slice.ts","scenes/VirtualSecretary/Enrollments/TransferalCompetence/logic/slice.ts","scenes/VirtualSecretary/Enrollments/SpecialExamsEnroll/logic/slice.ts","store/rootSlices.ts","scenes/GradesManagement/GradesManagement/Modal/SigningModal.tsx","scenes/GradesManagement/GradesManagement/Modal/useSignalRConnection.ts","scenes/GradesManagement/GradesManagement/Modal/CMD-assinatura-2.png","shared/components/Footer/cc-reta_white.png","app/CloseApp/logo512.png","scenes/VirtualSecretary/Payments/types.ts","ui/globalStyles.js","app/AppTools/logic/selectors.ts","app/AppTools/index.tsx","app/SuperUserTools/logic/selectors.ts","app/SuperUserTools/index.tsx","app/Translation/message.tsx","app/Translation/index.tsx","shared/containers/Toaster/logic/selectors.ts","shared/containers/Toaster/index.tsx","shared/containers/ToasterAction/logic/selectors.ts","shared/containers/ToasterAction/index.tsx","shared/containers/Breadcrumb/logic/selectors.ts","shared/containers/Breadcrumb/index.tsx","shared/containers/Header/selectors.ts","shared/containers/Header/utils.tsx","shared/containers/Header/index.tsx","shared/containers/SystemBar/selectors.ts","shared/containers/SystemBar/index.tsx","shared/components/Sidebar/selectors.ts","shared/components/Sidebar/mobile.tsx","shared/components/Sidebar/web.tsx","shared/components/Sidebar/utils.ts","shared/components/Sidebar/index.tsx","shared/components/Footer/selectors.ts","shared/components/Footer/index.tsx","scenes/InMaintenanceScene/index.tsx","app/index.tsx","scenes/Schedules/MySchedule/utils.tsx","scenes/VirtualSecretary/Payments/logic/selectors.ts","scenes/Schedules/MySchedule/logic/selectors.ts","scenes/VirtualSecretary/Payments/PendingDebitsPayment/logic/selectors.ts","app/utils.tsx","scenes/VirtualSecretary/Applications/NewApplication/logic/selectors.ts","scenes/VirtualSecretary/Payments/utils.ts","scenes/VirtualSecretary/Certificates/NewCertificate/logic/selectors.ts","app/logic/selectors.ts","scenes/VirtualSecretary/Certificates/CertificatesList/logic/selectors.ts"],"names":["module","exports","getRegistration","state","StudentRegistrationDropdown","registration","getMySchedulesSlice","MySchedules","getRegistrations","App","user","registrations","children","useState","getStorage","setClosed","useEffect","window","location","search","match","Boolean","hostname","onMountSaga","navigateToSaga","navigateBackSaga","changeLocaleSaga","toggleApiTranslationsEditSaga","getApiTranslationsAndCheckRoutesSaga","updateApiTranslationSaga","updateUserRoleSaga","signinSaga","forceSigninSaga","getSuperUserSaga","signoutSaga","impersonateUserSaga","cleanImpersonateUserSaga","watcherSignin","select","selectors","signInfo","shouldSignin","tokenParameter","hasTokenParameter","getCurrentRoute","route","params","cookies","initTracking","console","log","call","putResolve","actions","setUser","put","ToasterAction","showToasterAction","title","t","buttonTitle","cancelTitle","onCancel","localStorage","setItem","onAccept","config","LOGROCKET_ID","LogRocket","identify","email","e","navigateTo","key","setStartingApp","Toaster","showToaster","icon","type","action","payload","forceRefresh","hash","routingStructure","find","path","Object","keys","forEach","i18nInstance","language","includes","en","param","replace","href","history","push","goBack","moment","locale","numeral","changeLanguage","setCurrentLocale","setStorage","setTranslationsEdit","translationsEdit","API","translations","getTranslations","allTranslations","routes","getFunctionalities","newRoutes","length","Error","translation","fields","name","translationBundles","createTranslationBundles","addResourceBundle","currentLocale","ENVIRONMENT","ROUTES_ENV","setRoutingStructure","mergedRoutes","reduce","acc","foundRoute","newRoute","pt","setApiTranslations","form","apiTranslations","id","map","property","value","valueCh","zh","valueEn","code","signin","token","grantType","redirectUri","OIDC_CONFIG","userData","camelizeKeys","profile","decodeJWT","idToken","accessToken","refreshToken","tokenType","expiresIn","scope","studentNmec","HARDCODED_NMEC","studentNumber","nMecAluno","iss","aud","userRoles","getUserRoles","HARDCODED_ROLES","groups","givenName","fullName","uAFriendlyName","roles","nmec","scopes","JSON","stringify","sgh","getLogin","postLogin","familyName","listAllScopes","storageUser","superUserData","getRcuGroups","uAIUPI","rcuData","data","some","group","role","newUser","removeItem","setRegistration","impersonate","cleanImpersonate","takeLatest","onUnmountSaga","LogsStudent","setLoadingModule","Logs","GENERAL_ERROR_MESSAGE","GENERAL_ERROR_MESSAGE_SERVER","GENERAL_ERROR_MESSAGE_REQUEST","PERSONAL_DATA_ERROR_MESSAGE","APPLICATION_ERROR_MESSAGE","PAYMENT_ERROR_MESSAGE","CURRICULAR_PLAN_ERROR_MESSAGE","GRADES_ERROR_MESSAGE","CERTIFICATE_ERROR_MESSAGE","err","message","INTERCEPTOR_LOGOUT","signout","ERR_SGH_SCHEDULE_MAX","ERR_INVALID_ACCESS","navigateBack","response","error_code","BLACKLISTED_REQUEST","ERR_INVALID_STUDENT","ERR_STUDENT_INVALID_REGISTRATION","ERR_FORBIDDEN_PAUTA_REQUEST","ERR_TEACHER_NOT_FOUND","values","ERR_DEBT_DELETED","ERR_DEBT_PAID","ERR_REGISTRATION_SUSPENDED_CERT","ERR_REGISTRATION_NOT_FINISHED_CERT","ERR_UNPAID_CERT_DEBTS","ERR_STUDENT_INVALID_CERTIFICATE","ERR_STUDENT_INVALID_CERTIFICATE_TYPE","ERR_CERT_PAID","ERR_CERT_CANCELLED","ERR_IDENTICAL_CERT_PROCESSING","ERR_GRADE_FINAL_COURSE","ERR_FINAL_COURSE_DOC_FINAL_MISSING","ERR_ASSOCIATED_DEBT_MBREF","ERR_STUDENT_DOESNT_EXIST","getExamCalendarSaga","API_SEC_VIRTUAL","API_WSO2","API_SEC_VIRTUAL_PATH","ExamsCalendar","setLoadingExamsCalendar","ErrorHandler","setErrorStatus","fieldName","fieldValue","registrationId","examsCalendarSlice","secVirtual","getExamCalendar","filterParams","date","undefined","calendarData","filters","filter","textOnly","setCalendarFilterTypes","file","url","getCalendarIcsFile","calendarFile","setCurrentICS","setEventsData","reformatCalendarEvents","setInitialCalendarDate","dayOfFirstEvent","setReset","debounce","getStatusAndDetailsSaga","ApplicationDetails","reset","setLoadingStatus","pathname","Number","split","slice","applicationId","currentRegistration","getApplicationDetails","applicationStatement","studentName","details","course","courseCode","courseName","category","theme","statement","exposition","documents","applicationDocument","setStatus","setDetails","ERR_STUDENT_INVALID_APPLICATION","setActiveRegistrationSaga","getApplicationTypesSaga","getApplicationFormSaga","addDocumentToFormSchemaSaga","removeDocumentFromFormSchemaSaga","submitApplicationSaga","NewApplication","resetPage","applicationData","activeRegistration","reg","registrationState","setApplicationData","getApplicationTypes","applicationTypes","setApplicationTypes","ERR_STUDENT_NO_APPLICATIONS","getApplicationForm","applicationForm","newForm","_","cloneDeep","additionalDocuments","i","idFoundInUse","doc","nameKey","initialAdditionalDoc","item","setFormSchema","docNamekey","formValues","applicationTypeId","registrationIdentifier","getDocuments","mandatoryDocuments","document","fileName","docTypeId","stringTemplateParser","expoFields","field","observations","postApplicationForm","ERR_STUDENT_DUPLICATE_APPLICATION","onLoadPageSaga","setCertificateDataSaga","getCertificateTypesSaga","getCertificateFormSaga","postCertificateChosenOptionsSaga","submitCertificateSaga","NewCertificate","onLoadPage","certificateData","setCertificateData","setProcessedCertificateData","newCertificateSlice","getCertificateTypes","certificateTypes","setCertificateTypes","getCertificateForm","certificateCode","selectedCertificateType","certificateForm","radioBtnMappings","requestedCertificate","index","formComp","radioBtnOpt","subindex","valueId","visibleIf","visibleIfElem","elemKey","subsubindex","mappedValue","setRadioBtnMappings","body","exemptionMotiveOther","exemptionMotive","numberCopies","pageCounter","deliveryMethod","selectedRegistrationId","processeBody","certTypeId","withExemption","formatId","deliveryMethodId","postalCode","ucsCodes","uc","isAvailable","ucCode","postCertificateOptions","totalCosts","setCertificateCosts","certificateOptions","payNow","isExempt","setLoadingSubmission","payLater","formChosenOptions","getFinalResults","exemption","alternativeEmail","exemptionOtherText","ucs_codes","ucCodesObjectsList","foundYear","namekey","schoolYear","academicYear","semester","postCertificateForm","setCertificateSubmitted","goApplication","certificateId","getCertificatesDetails","certificateDetails","certificatePaymentData","payment","debit","Payments","setPreSelectedDebits","setSelectedDebits","getRegistrationSaga","RegistrationDetails","setLoading","registrationDetails","registrationGeneralInfo","accessScheme","registrationDate","registrationAcademicYear","registrationStatus","typology","setEligibility","eligibility","setHistory","setScholarship","scholarship","setRegistrationGeneralInfo","Registrations","getSeriationHistoryResultsSaga","SeriationHistory","Schedules","setRestriction","phase","scheduleName","allocationProb","seriationDate","seriationId","finalSeriation","getHistory","final","schedules","currentPhaseName","currentPhase","Breadcrumb","overridePath","what","scheduleId","current","seriationFinished","setSeriationHistoryResults","historyItem","setCurrentDetails","currentYear","year","currentScheduleName","currentSemester","phaseFilterList","setCurrentSelectedPhase","err_code","setIsScheduleInvalid","getSeriationHistoryDetailsSaga","SeriationHistoryDetails","phaseName","getHistoryDetails","setSeriationDate","setRanking","ranking","setLog","setFreeOptionsSaga","setOptions","FreeOptionsDropdown","options","ucs","option","selectedOptionKey","getSelectedOptionKey","optionId","selected","groupName","irregular","open","getRegistrationsSaga","service","setLoadingRestriction","student","sameItems","every","fetchedRegistration","userRegistration","getStudentApplicationsSaga","ApplicationsList","getStudentApplications","studentApplications","application","description","requestDate","responseDate","status","reference","ref","setStudentApplications","setApplicationFilters","getInitialFilterStateSaga","getDataSaga","CertificatesList","requestParams","setRequestParams","getStudentCertificatesOnMountState","initialFilterState","onMountState","getCertificatesList","certificatesList","setCertificatesList","text","setCertificatesFilters","certificatePaymentSaga","certificatePaymentPendingSaga","openChangeHistoryModalSaga","CertificatesDetails","certificatesDetails","certificate","files","getFileUint8Array","pdfFile","setCertificateFile","setCertificatesDetails","setVisibleAccessHistoryModal","getCertificatesDetailsChangeHistory","certificatesChangeHistory","setAccessHistory","validateCertificateCodeSaga","CertificatesValidator","postCertAccessCodeWithRecaptcha","recaptchaToken","accessCode","certData","setHasValidated","fetchDebitsSaga","fetchPendingDebitsSaga","fetchPaymentsSaga","fetchMbPaymentDetailsSaga","fetchDataSaga","deleteDebitSaga","handleWebsocketConnectionSaga","watchMessagesSaga","closeWebsocketSaga","onPaymentNotificationSaga","paymentsSlice","getStudentsUnpaidDebits","debitsData","setDebit","setDebitsFilterTypes","getStudentsPendingDebits","pendingData","setPendingDebits","isSocketActivated","getStudentsPayments","paymentsData","setPayments","setIsMbInfoModalOpened","getPaymentMbInfo","paymentRequestId","mbPaymentDetails","setConsultedMbPaymentInfo","ERR_STUDENT_INVALID_PAYMENT","fetchPendingDebits","fetchPayments","DEFAULT_PARAMS","fetchDebits","DEFAULT_DEBITS_PARAMS","deletePaymentMb","websocket","WebSocket","configs","WEB_SOCKET_URL","getWsChannel","eventChannel","race","task","cancel","take","close","error","emitter","onopen","send","onmessage","event","msgList","addressableMsgList","websocketMsg","payloadObj","parse","arguments","onPaymentNotification","isSocletActivated","setIsSocketActivated","toString","result","EWEBSOCKET_RESULT","success","expired","resetResettableStates","fetchPhoneNumberSaga","submitMBDebitsRequestSaga","submitMbwayDebitsRequestSaga","PendingDebitsPayment","fetchPhoneNumber","pendingDebitsSlice","pendingDebits","allowMbwayPayment","paymentMethod","PAYMENT_METHOD","mbway","PENDING_DEBIT_STATE","awaitingPayment","setAllowMbwayPayment","getPersonalDataPhoneNumber","phoneNumber","setMbwayForm","countryDropdown","mbwayForm","input","allDebits","debitId","associatedCosts","el","postPaymentReferenceMb","debits","setMbwayResponse","setDebitsSubmissionCompleted","setCurrentStep","selectedDebits","phone","number","prefix","countryValue","postPaymentReferenceMbWay","handleWebsocketMessages","ERR_STUDENT_DUPLICATE_PAYMENT_METHOD","resetPendingDebits","getUcOptions","getCurricularPlanSaga","CurricularPlan","optionName","setUcOptions","courseList","setUcOptionsModal","getStudentModuleOptions","ucOptionList","all","getStudentCurricularPlan","getStudentExtraCurricularUcs","getStudentMobilityUcs","curricularPlanData","extraCurricularUcs","mobilityUcs","tmp","summary","grade","addCurricularPlanSummary","curricularPlan","accreditedUcs","regCurricularPlan","subUcs","submodules","addCurricularPlan","getUcDetailsSaga","CurricularUnitDetails","getCurricularUnitDetails","selectedUcCode","ucDetails","setUcDetails","ERR_REGISTRATION_INVALID_UC","patchAddressFormSaga","patchContactsFormSaga","resetFormSaga","showNoRegistrationWarning","PersonalData","getPersonalData","getStudentCardInfo","personalDataBlocks","studentCardBlock","address","camelCase","placeholderKey","contacts","splice","picture","reformatPersonalDataBlocks","setPersonalDataBlocks","setStudentCardBlock","regionNames","Intl","DisplayNames","fallback","homePostalCode","patchAddressForm","updatedBody","homeCountry","toUpperCase","homeCountryName","of","updatedPersonalDataBlocks","updatePersonalDataBlocks","patchContactsForm","formField","getGradesStatsSaga","changeYearRequestSaga","gradesManagementWatcher","GradesManagement","pautas","getGradesStats","stats","setPautasStats","getFiltrarPorPeriodo","period","getTeacherGrades","setFiltrarPorPeriodo","updatedPautas","periodosDisponiveis","setPeriodosDisponiveis","setPautasLista","changePautasLista","setPautasListaChanged","fetchGradeData","saveOrSubmitGradesSaga","uploadGradesSaga","editGradesWatcher","getDecryptedGrade","getGradeDetails","gradeDetails","regimes","hDados","bDados","fDados","dicionarios","EditGrades","setHDADOS","setGradeData","setFDADOS","setDicionarios","setRegimes","setGradeDetails","validValues","getValidGradeValues","setValidGradeValues","HDADOS","examDate","editedGradesData","gradesEdits","isSubmission","codigoPauta","studentsGrades","entries","formattedData","codigo_pauta","data_exame","dataExame","students_grades","compressedData","compressGradeData","putFinalGrade","putIntermediateGrade","childOf","clearGradeEdits","nmecColumnIndex","gradeColumnIndex","hasHeader","csvFile","postGradeFile","gradesData","gradeEdits","updatedGrade","currentGrade","nota","setGradeEdits","errors","warnings","setImportErrors","setImportWarnings","setIsErrorsModalOpen","fetchGradeDetailsSaga","fetchDecryptedGradeSaga","fetchPdfSaga","gradeDetailsWatcher","GradesDetails","hdadosItem","bdadosItem","setDataExame","studentData","gradeCounts","curr","setGradeCounts","getPautaData","pauta","setIsPdfReady","documentId","comAssinaturaId","paraAssinaturaId","isSigned","getGradePdf","pdfBlobUrl","setPdfUrl","getGradeHistorySaga","getGradeHistory","responseHistory","responseDetails","GradesHistory","setGradeHistory","getScheduleInterval","currentInterval","interval","classSchedule","classItem","currentIntervalMin","min","classMin","startTime","currentIntervalMax","max","classMax","endTime","isBefore","format","isAfter","onPhaseUpdateSaga","getSchedulesSaga","deleteScheduleSaga","updateSchedulesSaga","getScheduleToViewSaga","setLoadingSchedules","getSchedules","activateLoading","getPhases","phases","getStudentAccess","isCurrentPhaseActive","p","isActive","setCurrentActivePhase","finished","setCurrentPhase","isFree","hasAllocatedSchedule","attemptedSchedule","hasAccess","setWarningNoAccess","setWarningNoAccessMotive","motive","setShowHistory","createdSchedules","setLastSeriatedPhase","lastSeriatedPhase","setNextSeriationDate","nextSeriationDate","sortedSchedules","sortSchedules","setSchedules","errcode","setSavingMySchedules","indexOfSchedule","activePhase","findIndex","schedule","newSchedules","immutableRemove","preference","updatedSchedules","deleteSchedule","removeScheduleToDelete","schedulesPayload","formattedSchedules","patchSchedule","output","scheduleGridInterval","finishedPhase","showScheduleModalOpening","setLoadingScheduleToView","getSchedule","scheduleToView","normal","mandatory","free","reformatUcs","allUcs","ucUnit","setUcs","hideFaces","setScheduleGridInterval","setMandatoryOptionsSaga","mandatoryOptions","MandatoryOptionsDropdown","newOptions","timeoutAndHideToaster","unsetDisplayToasterAction","delay","getAccessAndUcsSaga","getCurrentModeSaga","handleScheduleEditOrDuplicateModeSaga","getRegistrationScheduleSaga","filterClassesByPeriodSaga","getStudentTotalChoicesSaga","submitScheduleSaga","editScheduleSaga","editScheduleNameSaga","setLoadingSchedule","getAccessAndUcs","setIsCurrentPhaseActive","setRestrictionMotive","setCurrentMode","scheduleIdToEdit","scheduleToEdit","setScheduleName","clearSchedule","setScheduleToEdit","currentMode","getUcs","mandatoryUcs","freeUcs","freeOptions","unfilteredUcsToCount","typologies","setClassesTypologies","setMandatoryOptions","setFreeOptions","setUnfilteredUcs","setMandatoryUcs","setFreeUcs","setFreeOptionsGroups","setCreatedSchedules","schedulesNumber","parseInt","copiedScheduleName","setSchedulesNumber","setPeriods","setPeriod","filteredUcs","eachUc","eachClass","filtered","unfilteredUcs","mandatoryDropdownSelectors","freeDropdownSelectors","totalChoices","mandatoryOption","ucTotalChoices","freeOption","normalUcs","setStudentTotalChoices","setSavingSchedule","selectedClasses","getScheduleSelectedClasses","postSchedule","classes","setEditingSchedule","fetchFreeOptionsSaga","fetchFreeOptionsFiltersSaga","FreeOptionsTable","fetchFreeOptionsFilters","DEFAULT_PAGINATION_PARAMS","mandatoryFilters","freeOptionsListSlice","getStudentFreeOptions","freeOptionsData","getFreeOptions","setFreeOptionsData","onlyFilters","SchedulesHome","setPhases","setLoadingPhases","SchedulesGuide","setLoadingMarkdown","getMarkdown","markdowns","guides","markdown","setMarkdown","properties","GradesGuide","selectedGuide","getMySchedules","updateScheduleSaga","formData","mySchedules","indexOf","updatedSchedule","patchSchedules","immutableReplace","Home","cards","getHelpListingSaga","Help","getFunctionalitiesHelp","helpListing","setFilterTypes","setHelpListing","ImprovementExamEnrollment","getStudentSignups","annual","ExamEnrollment","EvaluationTypeSelection","EnrollmentRenewal","SpecialExams","rootSaga","logsstudentSaga","logsSaga","examsCalendarSaga","applicationdetailsSaga","newapplicationSaga","newcertificateSaga","registrationdetailsSaga","registrationsSaga","seriationhistorySaga","seriationhistorydetailsSaga","freeOptionsDropdownSaga","studentregistrationdropdownSaga","applicationslistSaga","certificateslistSaga","certificatesdetailsSaga","certificateValidatorSaga","paymentsSaga","pendingDebitsPaymentSaga","gradesSaga","assessmentchoiceSaga","examregistrationSaga","subscriptionrenewalSaga","classsupoortSaga","curricularplanSaga","curricularUnitDetailsSaga","personaldataSaga","gradesManagementSaga","editGradesSaga","gradesDetailsSaga","gradesHistorySaga","createdScheduleSaga","myschedulesSaga","mandatoryOptionsDropdownSaga","toasterSaga","toasterActionSaga","schedulesSaga","freeOptionsListSaga","freeOptionsTableSaga","schedulesHomeSaga","schedulesGuideSaga","gradesGuideSaga","improvementExamEnrollmentSaga","examEnrollmentSaga","evaluationTypeSelectionSaga","enrollmentRenewalSaga","specialExamsSaga","homeSaga","helpSaga","appSaga","sagaMiddleware","createSagaMiddleware","customizedMiddleware","getDefaultMiddleware","thunk","serializableCheck","immutableCheck","middleware","logRocketMiddleware","reduxMiddleware","store","configureStore","reducer","rootReducer","devTools","process","run","axios","interceptors","use","a","originalRequest","getItem","_retry","refresh","updatedUser","dispatch","headers","axiosApiInstance","create","redoneResponse","Promise","reject","request","currentContentType","i18n","FormData","decamelizeKeys","JSONtoQueryString","Endpoints","API_SCHEDULES_PATH","API_STUDENT","API_SEARCH","API_PAUTAS_PATH","API_TRANSLATIONS_PATH","method","substring","ScrollToTop","useLocation","scrollTo","top","behavior","initLocales","hideLogs","ReactDOM","render","getElementById","navigator","serviceWorker","ready","then","unregister","catch","inputStyle","textAlign","height","width","getGradesEditValues","Dicionarios","tipoAvaliacao","gama","valorMinimo","valorMaximo","Array","from","isArray","dicionario","bodyItems","valor","isValidGradeValue","validGradeValues","intValue","handleGradeChange","newValue","newGradeEdits","revertedGradeEdits","renderGradeInput","currentValue","borderStyle","originalValue","getBorderStyle","isValid","onChange","target","onKeyDown","handleKeyDown","style","border","borderColor","outline","preventDefault","nextIndex","nextInput","focus","handleCSVImport","setCSVFile","setIsCSVModalOpen","getDropdownSuplementaryGradesOptions","handleSupplementaryGradeChange","updatedGradesData","updatedGradeEdits","setDropdownValueSelected","handleSupplementaryGradeClear","dataObject","jsonData","compressed","gzip","Buffer","getFreeOptionsListSlice","getAppSlice","getCurricularPlanSlice","getUserRegistrations","getUser","getPathToPage","currentRoute","routeList","currentRouteElems","didSetModule","setModuleName","unshift","detached","disabled","parentRoutes","searchParentRoutes","searchRoute","parentRoute","pRoute","post","Authorization","clientSecret","res","getSuperUser","iupi","checkBlacklist","get","superUser","rcuGroups","login","endpoint","allStudentRegistrations","studentAccess","studentSchedules","studentUcs","getSeriation","studentSeriation","historyDetails","trim","studentFreeOptions","patch","delete","functionalities","getFunctionalitiesSearch","functionalitiesSearch","functionalitiesHelp","st","personalDataForms","personalDataPhoneNumber","getCertificateCodeValidation","accessKey","certificateCodeValidation","studentCardInfo","addressForm","contactsForm","getStudentPicture","studentPicture","studentCertificatesList","studentCertificatesDetails","getCertificateChangeHistory","getAllStudentRegistrations","getStudentRegistrationSummary","studentRegistrationSummary","studentCurricularPlan","studentExtraCurricularUcs","studentMobilityUcs","getStudentAccreditedUcs","studentAccreditedUcs","studentModuleOptions","payments","unpaidDebits","getStudentCertificates","getStudentCertificateRequests","getStudentCertificateRequestsOnMountState","paymentsMbWay","paymentsMb","paymentMbInfo","studentSignups","getStudentPictureFile","postFiles","studentId","getFile","fileType","fileId","expires","signature","getFileOnTab","byteCharacters","atob","byteNumbers","charCodeAt","byteArray","Uint8Array","Blob","fileURL","URL","createObjectURL","professorGradesInfo","gradesStatistics","gradeHistoryInfo","gradeDecryptedInfo","saveIntermediateGrade","submitGrade","uniqueIdentifierColumn","gradeColumn","sheetNumber","append","uploadGradeFile","signed","gradePdf","responseType","blob","k","join","findAll","obj","hasOwnProperty","blacklist","throwError","resolve","componentTemplateParser","expression","valueObj","currentlyInStatementTab","expressionLines","templateMatcher","paragraphSequenceCounter","line","splittedLine","trimmedSplittedLine","Paragraph","largeTextBoxCandidate","element","MarkdownContainer","isLargeTextBox","piece","textBoxCandidate","ValueObjWrapper","isTextBox","MarkdownWrapper","source","renderers","paragraph","getExpoFields","expoFieldsValues","expoFieldsField","targetExpoFieldValues","valueField","getMandatoryDocuments","mandatoryDocumentsValues","mandatoryDocumentField","dataField","itemNameKey","itemValue","getAdditionalDocuments","additionalDocumentsValues","additionalDocumentField","getFormValues","styled","div","swapSchedules","sourceId","targetId","tempObject","selectClassesToViewSchedule","classId","allocated","reformatedSchedules","sort","b","phaseEndDate","scheduleRest","finishedPhases","getStatusName","getGradesManagementSlice","getPautasLista","pautasLista","filtrarPorPeriodo","getCurrentLocale","AuthWrapper","checkSuperUser","useSelector","shouldRender","toLowerCase","numeralsInit","register","delimiters","thousands","decimal","abbreviations","thousand","million","billion","trillion","ordinal","ordinalPlural","ordinalFemale","ordinalFemalePlural","currency","symbol","regexps","roundingFunction","locales","numberToFormat","lastRoutes","createBrowserHistory","initReactI18next","init","lng","fallbackLng","default","resources","items","warn","Routes","pathKey","matchPath","exact","getLastRoute","addRouteToHistory","pop","usePrevious","useRef","createAndDownloadFile","msSaveOrOpenBlob","uuid","createElement","download","appendChild","click","setTimeout","removeChild","revokeObjectURL","c","r","Math","random","GAEvent","GA_TRACKING_ID","ReactGA","getApplicationDetailsSlice","getStatus","getDetails","offset","limit","DEFAULT_PAGINATION","total","hasNext","hasPrevious","personalDataBlocksClone","personalDataBlockKey","editing","showPicture","updateFormEditingStatus","block","SHOW_APPTOOLS","API_BASE_URL","INTERNAL_API_BASE_URL","SOCKET_BASE_URL","SOCKET_SCHEDULES_PATH","API_PAUTAS_WEBSOCKET","HOTJAR_TRACKING_ID","HOTJAR_SNIPPET_VERSION","SENTRY_ID","WHITELIST_DEV_NMEC","RECAPTCHA_PUBLIC_KEY","WHITELIST_DEV_EMAIL","clientId","GRADES_MANAGEMENT_ENCRYPT_DATA_PUBLIC_KEY","REACT_APP_ROUTES","ROLES_RELATIONSHIPS","relationships","SCOPES","GET","SERIATION_RESULTS","ALL_PHASES","CURRENT_PHASE","FINAL_SCHEDULE","TEMP_SCHEDULE","STUDENT_UCS","STUDENT_UCS_MANDATORY","STUDENT_UCS_FREE","STUDENT_HISTORY","POST","TEMP_SCHEDULES","PATCH","PUT","DELETE","ALL_SCHEDULES","production","getApplicationsListSlice","getRegistrationId","getPersonalDataSlice","getPersonalDataBlocks","getSchedulesSlices","getExamsCalendarSlice","getMandatoryOptions","getSeriationHistoryDetailsSlice","setSummaryKey","label","ical2json","convert","VCALENDAR","VEVENT","startDate","UID","DESCRIPTION","desc","start","toDate","end","SUMMARY","LOCATION","setEventData","eventData","getIcon","getFooter","popupFooter","convertEventToIcs","currentICS","fullEvent","filteredEvent","revert","pautaData","getGradeDetailsSlice","TitleHeader","backButton","onBack","props","lastRoute","canNavigateToParent","useMemo","parentRouteFound","userRole","checkRoute","loading","pullBackButton","useDispatch","getHomeSlice","MardownRenderer","pageStructure","setChildren","TOC","setTOC","activeItemTOC","setActiveItemTOC","openItemTOC","seOpenItemTOC","usedParam","countHeadings","countCaptions","useContext","ThemeContext","root","break","color","size","breakWord","strong","as","weight","listItem","link","image","ImageWrapper","alt","src","ImageCaption","heading","HeadingWrapper","level","renderContent","rerender","tocValue","checkTOC","headingNr","scrollToOffset","getBoundingClientRect","pageYOffset","scrollIntoView","headings","rootPanels","firstKey","prevLevel","setRootPanels","active","content","TextWrapper","onClick","IconWrapper","rootPanel","faAngleDown","Accordion","panels","renderTOC","didFindSpecialChar","trimTo","getHeadings","reactMarkdown","WrapperMarkdown","plugins","gfm","emoji","PageStructure","headerLeft","expanded","subHeader","secondaryContent","WrapperTOC","mainContent","colors","primary","onMount","loadingPhases","who","ContentWrapper","Grid","Column","mobile","tablet","computer","largeScreen","widescreen","shadow","data-testid","CardTitle","CardButton","redirectAuth","CardWrapper","MarkdownRenderer","getHelpSlice","onUnmount","setTypeFilter","setSearchFilter","getHelpListing","filterTypes","loadingStatus","errorStatus","errLoading","Wrapper","SearchAndFiltersWrapper","placeholder","plusDarkGrey","iconColor","defaultValue","onSearch","canBeCleared","selectionWeight","selectionFontSize","onClear","loadingSearch","LoadingWrapper","sizes","large","header","AccordionWrapper","structure","parent","AccordionParent","transform","helpRow","AccordionChild","AccordionChildDescription","AccordionChildColumn","getAccordionChild","softGrey","softRegularGrey","getNewApplicationData","NewApplicationSelectRegistration","setActiveRegistration","newApplicationData","titles","rows","rowProps","white","navigatable","cells","TableRowWrapper","Input","checked","TableRowInfo","faEllipsisH","branchName","eligibilityState","background","successGreen","hideTooltip","softgrey","dangerRed","cellProps","SegmentTitleWrapper","SegmentDescriptionWrapper","darkGrey","TableWrapper","unstackable","Text","regularGrey","getNewApplicationSlice","NewApplicationSelectType","resetApplicationSelection","resetStepThree","setApplicationTypeId","themeGroup","typeId","AccordionChildDescriptionText","SegmentDescriptionText","tabLoading","errLoadingApplicationList","MessageNoApplications","faInfoCircle","errNoApplications","Icon","lightGrey","getLoadingStatus","getNewApplicationNumAdditionalDocs","numAdditionalDocs","NewApplicationStatement","formElements","formElementsData","setLoadingFile","newApplicationLoadingStatus","newApplicationNumAdditionalDocs","addDocumentToFormSchema","addAdditionalDoc","remAdditionalDoc","removeDocumentFromFormSchema","setNumAdditionalDocs","useFormContext","formState","uploadingAdditionalFile","setUploadingAdditionalFile","maxAdditionalDocuments","setMaxAdditionalDocuments","customFormElements","found","customFormElementsData","nNonOtherDocuments","nOtherDocuments","getMandatoryDocumentsData","isGroupItem","groupDocumentKey","groupField","hidden","maxSize","validations","validation","minSize","acceptTypes","constructor","errLoadingApplicationForm","DescriptionWrapper","ApplicationData","ApplicationDataNameAndCourse","ApplicationDataBlock","grey","ApplicationDataBlockText","ApplicationDataApplicationType","ApplicationStatementWrapper","ApplicationStatementHeading","fontWeight","ApplicationStatement","ApplicationStatementText","statementField","FormElement","FormInputWrapper","noAutocomplete","fontSize","FormElementWrapper","StatementDisabledInputWrapper","StatementDisabledInputLabel","ApplicationStatementObservations","ApplicationStatementObservationsTextAreaWrapper","docVisible","ApplicationStatementFiles","FormChildren","faFilePdf","errorGroup","accept","getMandatoryDocumentsChildren","FileUploaderWrapper","setUploadingFlag","AdditionalDocumentsWrapper","AdditionalDocumentsTitle","enableRemoveField","onRemoveField","AddFileButtonWrapper","faPlus","getNewApplicationTabLoading","FileDownloader","callToEndpoint","showFileLoading","setShowFileLoading","FileWrapper","FileNameAndDescription","HeadingText","FileDescriptionText","leftIcon","faEye","NewApplicationSubmission","newApplicationTabLoading","StudentName","xxLarge","DescriptionText","RequestText","formValueField","ApplicationStatementFieldText","ApplicationMandatoryDocuments","ApplicationMandatoryDocumentsTitle","FileDownloaderWrapper","ApplicationAdditionalDocuments","ApplicationAdditionalDocumentsTitle","yup","this","test","PhoneNumber","PostalCodes","validate","createYupSchema","schema","validationType","validator","FormInputWithFlags","displayLocale","showTooltip","WrapperFlags","DropdownWrapper","flagValue","lang","currentLang","MessageArea","FormTextArea","StyledTextArea","SemanticTextArea","FormLargeTextArea","FileUploader","removable","onError","onRemove","didUpdateValue","uploadedFiles","setUploadedFiles","uploadedSucceeded","setUploadedSuccess","disableDropzone","setDisableDropzone","dropzoneActiveColor","setDropzoneActiveColor","errorToDisplay","setErrorToDisplay","DEFAULT_FILE_SIZES","prevState","newList","bytesToMegabytes","nBytes","toFixed","progress","trigger","useDropzone","noClick","multiple","onDrop","onUploadProgress","progressEvent","percentageCompleted","round","loaded","onDragEnter","onDragLeave","onDropAccepted","onDropRejected","getRootProps","getInputProps","fileRejections","FileNameAndProgress","ProgressBar","percent","RemoveFieldButtonWrapper","StyledButton","borderless","borderlessHoverColor","RemoveFileIconWrapper","faPlusCircle","InnerWrapper","backgroundColor","DropzoneContainer","className","DescriptionAndButtonUploader","UploaderDescription","TextDescription","UploadedFileHeading","UploadedFileHeadingTitle","StyledText","UploadedFileHeadingFileName","filename","filenameSplit","filenameHeader","processFilename","UploadedFileSubHeading","getFileExtension","UploaderDescriptionText","faArrowFromBottom","ButtonDeleteFileWrapper","loadingProps","TrashIconWrapper","faTrash","Progress","Button","FormTable","disabledAccordion","resetRows","selectable","onChangeSelected","hasDescription","FormDropdown","v","FormGroup","setError","childrenValues","React","Children","child","getValues","FormGroupTitleWrapper","FormGroupFilesWrapper","ChildWrapper","cloneElement","defaultProps","NewApplicationDropdown","dropdownOpen","setDropdownOpen","Dropdown","DropdownToggleIcon","faChevronUp","faChevronDown","onOpen","onClose","mappings","component","textbox","FormInput","largetextbox","big_textbox","checkbox","Checkbox","checkbox_table","radio_button","RadioList","dropdown","flag_dropdown_textbox","application_dropdown","counter","Counter","editableGroupComponent","EditableFieldsGroup","control","Component","ComponentType","constructFormElements","formElement","andReducer","initalValue","orReducer","getHiddenFields","watchForm","formSchema","hiddenComponents","uiComponent","visibilityResults","visibleEntry","getForm","yupSchema","newFormatFormData","groupValidation","oneOfRequired","createValidationFormData","validationSchema","shape","yupResolver","FormManager","dynamicFormSchema","setDynamicFormSchema","useForm","resolver","shouldUnregister","watch","verifyHiddenFields","hiddenFields","updateSchema","newSchema","newHiddenFieldsMatrix","schemaElement","groupChildElement","newHiddenFields","isEqual","elementIndex","isHidden","hiddenFieldNameKey","formSchemaElem","newSchemaElement","groupChild","childKey","isHiddenChild","fieldElement","getFormElements","getFormElementsData","steps","stepStyles","done","checkTick","toDo","submitApplication","currentStep","newApplicationErrorStatus","newApplicationLoading","newApplicationReset","setNewApplicationReset","loadingFile","onSubmitStatement","getFormSchema","ApplicationStepsWrapper","step","ApplicationStep","TabText","CheckTickWrapper","faCheck","handleSubmit","NavigationButtonsWrapper","decision","BackwardForwardButtonsWrapper","rightIcon","faChevronRight","itemKey","getRegDetailsSlice","EligibilityGraph","ectsScale","signUpsScale","signupsValue","signUpsAmount","AxisCaption","ECTSValue","CaptionTopText","ECTSBar","ECTSApproved","ectsEarned","decisionYellow","ECTSMinimum","minimumECTS","ECTSMaximum","maximumECTS","SignUpsBar","SignUpsAmount","lower","SignUpsValue","NumText","CaptionBottomText","GraphCaptions","LeftCaptions","CaptionElementWrapper","CaptionElementColor","divider","RightCaptions","getEligibilityState","eligibilityHistoryTableTitles","wordBreak","wordWrap","getEligibilityColor","getWidth","eligibilityHistoryTableStructure","StatusLabelWrapper","errorRegistrationDetails","GridWrapper","GridInnerWrapper","RegistrationGeneralInfo","RegistrationGeneralInfoBlock","Scholarship","ScholarshipBlock","ScholarshipLabel","scholarshipStatus","CategoryText","scholarshipCategory","Eligibility","padding","EligibilityGeneralInfo","EligibilityGeneralInfoECTSToDo","DetailsWrapper","black","totalEctsToDo","EligibilityGeneralInfoECTSEarned","totalEctsEarned","whiteSpace","EligibilityCurrentYear","EligibilityCurrentYearECTSToDo","currentYearEctsToDo","EligibilityCurrentYearECTSEarned","currentYearEctsEarned","EligibilityState","EligibilityStateLabel","EligibilityGraphWrapper","numberSignups","graphMinEcts","graphMaxEcts","EligibilityHistory","EligibilityHistoryTableWrapper","headerCellPadding","getRegistrationsSlice","SeriationStatus","getTablestructure","singleLine","minWidth","collapsableRows","errLoadingRegistrations","getSeriationHistorySlice","getSeriationHistoryResults","seriationHistoryResults","currentDetails","currentSelectedPhase","invalidSchedule","isProvisory","getScheduleStateLabel","placed","tableState","tableHeader","AUTOMATIC","ASSIGNED","PROBABLY_ASSIGNED","PROBABLY_NOTASSIGNED","NOTASSIGNED","NOTASSIGNED_MANDATORY","getScheduleProbabilityIcon","allocationProbability","faSmile","faFrown","getTableStructure","table","faHistory","labelOffset","idUc","nameUc","nameClass","StateLabelWrapper","tableStructure","resultsAvailable","medium","phasename","getCurrentHeader","SeriationDateWrapper","SeriationDateText","AboutSimulationBarText","AboutSimulationWrapper","AboutSimulationText","noPadding","faQuestionCircle","TablesWrapper","getSeriationHistoryDetails","regimenMap","O","T","D","A","E","M","B","G","L","getSeriationType","headerRight","faDownload","textToDownload","downloadTxtFile","rankingNumber","rankingTotal","RankingTextWrapper","RankingTextSubWrapper","regimen","totalEcts","repeatUcs","SeriationDetailsTableWrapper","SeriationDetailsHeaderWrapper","HistoryIconWrapper","DetailedHistoryWrapper","newLine","charAt","PageNotFound","Container","AlignCenter","LogoUA","logoUA","WrapperText","FormattedText","medias","sm","xs","img","PageNoAccess","PageServerError","BackAction","faArrowLeft","InMaintenance","setOpen","PacoLegacyHref","setText","handleRegistrationChange","userRegistrations","SingleRegistration","selectedRegistration","CostumDrop","foundUserRegistration","ActiveRegistration","applicationFilters","initialLoading","setInitialLoading","APPLICATION_STATUS","NC","SBMT","ANL","PROCSA","CANC","errLoadingList","loadingList","MessageNoCertificates","parseBulletAndBoldElements","boldTransformed","bulletTransformed","__html","DOMPurify","textParser","splitArray","tmpString","paragraphCounter","dangerouslySetInnerHTML","getStatusAndDetails","currentRegistrationId","StatusAndDate","DateBlock","InfoText","StatusAnswer","ResponseText","hasText","DetailsSegmentWrapper","DetailsNameAndCourse","DetailsApplicationCategory","CategoryBlock","DetailsStatement","FileContainer","usePadding","MbIcon","fill","viewBox","d","MbWay","VisaIcon","GoogleCalendar","lineHeight","textIndent","textDecorationLine","textDecorationStyle","textDecorationColor","textTransform","msBlockProgression","isolation","mixBlendMode","fontFamily","overflow","PaymenMethodsInfo","Content","Description","Icons","compileTableRow","loadingReceipt","setLoadingReceipt","DEFAULT_STRUCTURE","setStructure","pagination","setPagination","handlePaginationNavigation","newPagination","exceedsTotal","compileTableStructure","onChangePage","onChangeRows","CellWrapper","PaymentIdText","paymentId","PaymentDescriptionText","CurrencyText","count","coin","paymentDate","receiptState","billReceipt","currentValues","alignItems","PaymentsTable","useTable","PaymentsTableWrapper","dropdownUpward","ButtonComponent","DEBIT_STATUS","DEBIT_STATUS_COLOR","ASSOCIATED_COSTS_TYPES","lateFeeCost","ucCost","certCost","mailCost","getCellButton","openPendingDebitsPaymentPage","disableButtons","faCreditCard","isSelected","preSelected","preSelectedDebit","tableRow","defaultSelected","debitType","DebitStatusText","debitStatus","dueDate","StatusLabelContainer","collapsableOpen","InDebitDescriptionText","colSpan","entry","bgColor","softLightGrey","disableHover","ExtraFeeWrapper","ExtraFeeCellWrapper","ExtraFeeValueCellWrapper","copies","CostCellWrapper","DebitsTable","preSelectedDebits","addFilters","disablePayButtons","setDisabelPayButtons","filtersChanged","setFiltersChanged","numSelectedDebits","setNumSelectedDebits","multiples","initialFetch","setInitialFetch","DEFAULT_UNSELECTED_DEBITS_PARAMS","updatePagination","isRowSelected","searchPlaceholder","dropdownPlaceholder","onFilterChange","DebitTableWrapper","selectedDebitsList","structureRows","selectedInfoTitle","selectedInfoSubTitle","selectedInfoAction","resetSelectedIds","setResetSelectedIdsFunction","collapsedColor","openMbInfoModal","countdowns","loadingCancel","setLoadingCancel","setIsCancelPaymentsModalOpened","isCancelPaymentsModalOpened","cur","concat","multipayment","remainingTime","paymentRows","CellWrapperMultiPayment","justifyContent","totalValue","ButtonCellWrapper","mb","ShowButton","curDebit","debitRows","costEntry","CellWrapperPayIconMethod","CellWrapperPayMethod","TimeLimitText","getSeconds","getMinutes","getMultipaymentTableRows","LabelCellWrapper","getSinglepaymentTableRows","PendingDebitsTable","setCountdowns","newCountdowns","debitItem","timeList","timer","setInterval","countdownKey","remainingTimeInSeconds","timeInSeconds","hours","floor","minutes","seconds","Date","setHours","toHHMMSS","clearInterval","PendingDebitsTableWrapper","noAutoEmptyCells","lockCollapsableInPlace","MbPaymentInfoModal","MbReferenceInfo","MBReferenceTitle","readOnly","MbwayResponseWrapper","paymentDetails","MbwayResponseColumn","TextFieldTitle","parseFloat","toLocaleString","minimumFractionDigits","getPaymentDetailsTable","MessageNoInfo","ButtonsProgressWrapper","Title","fetchData","resetDebitsList","fetchMbPaymentDetails","debitsFilterTypes","isMbInfoModalOpened","consultedMbPaymentInfo","changePaymentTab","setChangePaymentTab","appSlice","pageErrorDisplayed","setPageErrorDisplayed","errorLoadingDebitsTable","errorLoadingPendingDebitsTable","errorLoadingPaymentsTable","loadingDebitsTable","loadingPaymentsTable","loadingPendingDebitsTable","topBorder","noPointer","footer","MultiToggleWrapper","buttons","testId","Row","TableHeader","mbInfoModalLoading","onFilterClear","TableFooter","TableFooterNoteText","TableFooterText","paddingtop","paddingbottom","unit","PAYMENT_METHODS","SelectedPayments","DEBIT_SITUATION_COLOR","DEBIT_SITUATION","unpaid","inDebit","inDebitAwaitingPayment","DebitSegmentWrapper","PaymentsContainer","WrapperColumn","TuitionText","TuitionPriceText","EllipsisWrapper","marginTop","associatedCost","borderTopColor","WrapperColumnFeePrice","SelectDetails","multiPaymentsComponent","showMorePayments","setShowMorePayments","SelectPaymentMethod","totalCost","setPaymentMethod","handleMethodSelection","PaymentMethodColumn","WrapperTitlePayment","Options","Option","disableCursor","MbwayDisabledNote","button","SubmitPaymentRequest","formControl","formRegister","formGetValues","formErrors","mbwayResponse","PaymentMethodOperationsColumn","PaymentMethodTitle","MbwayTextWrapper","MbwayDetails","CountryWrapper","NoteWrapper","NoteTextWrapper","findItem","addDebit","removeDebit","preSelectedDisabled","MultiPaymentsSelection","fetchUnselectedDebits","setMultiple","defaultSelectedRows","useValueAsId","required","String","startsWith","submitMbwayDebitsRequest","submitMbDebitsRequest","debitsSubmissionCompleted","getTotalCost","cost","errLoadingPendingDebits","SelectDebits","updatedSelected","preSelDebit","selectedItem","inUpdatedSelected","updatedItem","inStructure","structureItem","inSelected","Id","hasOnlyOneButton","SecondaryContentWrapper","NumberItens","NumberSelectedItens","LineSeparator","TotalPayWrapper","Grades","AssessmentChoice","GRADE_TYPE","LabeledCell","LabelWrapper","isLink","LabelIcon","LinkContainer","ucOptionCode","COURSE_FIELD_KEY","COURSE_TYPE_KEY","findTabInList","courseTypeTabs","tabKey","tab","CENTERED_TABLE_TITLES","UC_TYPE","getOnClickRow","hasDetails","hasOneSignup","selectedOption","regid","createFormattedSubucsRows","subucs","columnsTitles","moduleSubUcs","subucsRowsCellArray","subuc","createTableCell","ucType","ucName","createLabeledCell","getTableColumnsForMandatoryUcs","mandatoryCourseColumns","isExtraCurricular","visibleColumns","columnsToRemove","ucsTypesList","findCreditTypes","extracurricularTypesList","columnIndex","ucsList","ectsType","creditsType","bolonha","getCurricularPlan","summaries","curricularPlans","ucOptionsModal","ucOptions","tabSelectionIndex","setTabSelectionIndex","visibleTabsList","setVisibleTabsList","tableContent","setTableContent","optionsTableContent","setOptionsTableContent","noDataAvailable","setNoDataAvailable","COURSE_FIELD","ACADEMIC_YEAR","CREDITS","ECTS","GRADE","INSTITUTION","PROGRAMME","SEMESTER","TYPE","UC_CODE","UC_NAME","YEAR_STUDY","COURSE_TYPE","FIRST_YEAR","SECOND_YEAR","THIRD_YEAR","FOURTH_YEAR","FIFTH_YEAR","SIXTH_YEAR","EVERY_COURSE_UCS","EXTRA_CURRICULAR_UCS","MOBILITY_UCS","ACCREDITED_UCS","MANDATORY_COURSE_COLUMNS","MOBILITY_COURSE_COLUMNS","ACCREDITED_COURSE_COLUMNS","OPTIONS_COURSE_COLUMNS","COURSE_TYPE_TABS","tabButtons","visibleTabs","tabYear","getTableTabs","setupTableContent","optionsCourseColumns","credits","tmpOptionsList","indexToRemove","indexAcademicYear","setupOptionsTableContent","dropdownOption","tmpColumnTitlesList","tableData","ucsDict","hasCollapsableRows","getTableColumnsForAllCourseUcs","newTable","columnTitles","selectedTabKey","tableRows","isTabNum","tmpColumnTitles","tableRowsCellArray","mobilityInstitutionName","textOverflow","maxWidth","getCurricularPlanTableFormat","errLoadingSummary","NoDataMessageWrapper","overlay","SummaryWrapper","columns","SummaryItem","SummaryText","SummaryValuesText","totalEctsAccredited","totalUcsCompleted","totalUcsToDo","totalUcsAccredited","AverageWrapper","AverageGradeTitleWrapper","AverageGradeBodyWrapper","verticalAlign","InfoIconWrapper","AverageSubtitleWrapper","CallToActionWrapper","faAngleRight","onAction","CourseTableWrapper","scrollableAtWidth","ModalContentWrapper","loadingModal","headerColor","noTopBorder","NoOptionsListWrapper","xLarge","getCurricularUnitDetailsSlice","getUcDetails","setSelectedUcCode","loadingModels","setLoadingModels","SUMMARY_COLUMN_TITLES","HISTORY_COLUMN_TITLES","EVALUATION_METHOD","er","eq","ml","nm","re","ex","es","EVALUATION_TYPE","finalExam","continuous","EVALUATION_STATUS","ongoing","signups","evaluationStatus","evaluationType","evaluationMethod","historyTableStructure","gradesFile","display","errLoadingDetails","HistorySegmentWrapper","SummaryTableWrapper","HeaderWrapper","TitleWrapper","PictureWrapper","PictureDescriptionWrapper","PictureFrameWrapper","EditButtonWrapper","FormTableWrapper","ButtonWrapper","FooterWrapper","SubtitleText","StudentPicture","PersonalDataBlock","blockKey","subtitle","lastUpdated","showEditBlockButton","formDataList","editBlockState","setEditBlockState","resetForm","setPersonalDataFormEditingState","onSubmit","marginBottom","faPen","FormElements","FormElementsData","inputType","formValue","setValuesStructure","setHasRegistrationId","studendId","footnoteDataPerBlock","parents","studentCardNotice","blocksWithEditButton","loadingPage","errLoadingPersonalData","fieldIndex","PersonalDataBlockWrapper","descriptionKey","loadingAddress","loadingContacts","footerIcon","faCommentAltEdit","footerArrow","PageBottom","profileData","registrationIdObject","checkIfHasRegistrationId","CardBlockTitleWrapper","errLoadingCardData","CardBlockWrapper","CardColumn","CardInfoField","MessageError","CreatedSchedule","indexKey","assignedClasses","creationTime","viewOnly","showDetails","addScheduleToDelete","getStatusLabel","PreferenceAndEditScheduleWrapper","Preference","TopWrapper","TopInnerWrapper","TopTitle","StateWrapper","underline","StateWrapperText","StateWrapperSubtext","when","BottomWrapper","getScheduleToView","faClone","CaptionSchedule","hideSmiles","captionReferences","faMeh","ExpandIcon","faArrowsH","references","withSize","cursor","setCursor","scheduleToDelete","deleteModalOpen","loadingSchedules","loadingScheduleToView","savingMySchedules","dragEnabled","warningNoAccess","warningNoAccessMotive","currentActivePhase","viewScheduleModalIsOpen","viewScheduleHideFaces","showHistory","setDeleteModalOpen","onPhaseUpdate","updateSchedules","setDragEnabled","hideScheduleModalOpening","boxesPerRow","rowsNumber","ceil","hasCurrentActivePhase","hasFinishedActivePhase","sourceIndex","targetIndex","ScheduleModalContentWrapper","ScheduleGridWrapper","noUcs","weekdays","intervalInMin","CaptionWrapper","cancelButtonText","submitButtonText","HeaderButtons","restrictionStatus","restrictionMotive","onComplete","PhaseTitleWrapper","CurrentActivePhaseText","faExclamationCircle","StaticGrid","colGap","StaticGridItem","GridContext","DropZone","disableDrag","rowHeight","GridItem","CreatedScheduleWrapper","onMouseUp","onMouseDown","onEdit","currentSelections","FinishedPhases","defaultOpen","AccordionPhaseWrapper","rowGap","getMainContent","GridDropZone","getSchedulesSlice","ScheduleConfirmationPreview","periods","selectedUcs","periodClone","ucsClone","periodButtons","periodItem","filterUcsByPeriod","PeriodAndButtonsWrapper","ScheduleGridView","loadingSchedule","scheduleType","expandedWeekDay","setExpandedWeekDay","setClassSelectionState","viewMode","onReady","firstWeekDayWithClasses","onToggleWeekDay","weekday","expandedDay","onSelect","ucId","groupId","classType","getClassTypeFullName","classesTypologies","initials","getWeekday","dayNumber","removeSeconds","time","getFirstScheduleType","firstType","getDropdownValue","selectedClass","classToSelect","getDropdownBorderColor","blue","green","getFilteredUcForZommAtScheduleOptions","allocatedClassesTypologies","Set","allocatedClass","filteredClasses","ScheduleListView","zoomAtScheduleModalClassType","setZoomAtScheduleModalClassType","zoomAtScheduleModalState","setZoomAtScheduleModalState","zommAtScheduleOptions","getIrregularMessage","infoDropdown","IrregularMessageWrapper","noMargin","IrregularMessage","zoomedClassType","handleUCZoomOnClose","ucFullName","ucColor","ZommAtScheduleModalHeader","ZommAtScheduleModalMultiToggle","UCWrapper","UCHeader","UCFullName","ucInitials","handleUCZoomOnClick","ClassSelectionWrapper","typeClassesOption","o","irregularSituation","getIrregularMessageSmall","descriptions","getDropdownOptions","getAllocatedState","fitToContent","red","full","selectedClassAndLockData","allocation","SelectedClass","SelectedClassScheduleWrapper","weekDay","SelectedClassSchedule","SelectedClassWeekDay","SelectedClassHour","selectedClassScheduleAndLockState","ucGroupId","locked","getScheduleAndLockState","h3","span","SelectedClasses","placedAmount","childrenWrapperRef","prevSelected","classesSelected","CounterWrapper","CounterTitle","CounterAmount","ChildrenWrapper","ScrollDownButtonWrapper","SeeMoreButton","scrollBy","preselected","confirmationModalIsOpen","optionIndexToRemove","ucIdToRemove","removeMandatoryOptions","setConfirmationModalOpening","setOptionIndexToRemove","setUcIdToRemove","handleClassPreSelection","ucsToPreselect","optionUc","classUnit","optionKey","idToSelect","ucKey","handleOptionRemoval","optionIndex","handleModalOnCloseOrOnCancel","tip","countSlots","availableSlots","noClasses","noOnline","ucSelectedOtherOption","infoType","info","context","selection","itemId","scheduleUcToRemove","handleCheckingIfOptionHasSelectedClasses","classIndex","handleClassSelection","checkAreAllFiltersFilled","department","cycle","hasSelectedUcId","onSelectRow","totalHours","stopPropagation","availableAtList","availableAt","WorkloadWrapper","classesList","lessons","lessonItem","day","endDate","accLessonItem","ClassesWrapper","getIrregularMessageSmallFreeOptions","getIrregularMessageFreeOptions","disableFilters","fetchFreeOptions","freeOptionsPage","hasFilter","checkHasFilters","hasMissingFilter","dropdownDepartmentPlaceholder","disable","filterDepartments","onDepartmentFilterChange","dropdownCoursePlaceholder","filterCycles","onCycleFilterChange","MessageNoOptions","danger","FreeOptionsTableWrapper","stackingFrom","alignCenter","onLoad","onPeriod","setDepartmentFilter","setCycleFilter","freeOptionsList","departmentFilterList","cycleFilterList","errLoadingFreeOptions","loadingTable","totalRecords","freeOptionsSearchModalIsOpen","optionToRemove","removeFreeOptions","setFreeOptionsSearchModalOpening","setOptionToRemove","removeUcList","handleRemoval","selectedUc","fullHeight","modalOpen","ModalHeader","_loading","_error","reformatedUc","reformatFreeUcs","ucItem","handleSelection","itemIndex","onToggleOption","ClassCardDetails","overlaps","seriationPlacedResultOpen","setSeriationPlacedResultOpening","rankingResultOpening","setRankingResultOpening","hasRankingProvisory","freeSlots","getClassDetails","ClassDetailsItemSchedule","classesDays","classDay","periodDays","colorId","FullTitle","UCID","UCInitials","ClassName","SlotsNumber","slots","AccordionIconWrapper","Fragment","RankingRow","RankingCol","Ranking","RankingDesc","above","below","SeriationPlacedResultHeader","SeriationPlacedManualResult","SeriationPlacedAutomaticResult","SeriationPlacedResultWrapper","SeriationTriesWrapper","previousTries","ClassDetailsItem","SeriationTriesTextWrapper","SeriationTriesText","class","NumberSlotsText","occupiedSlots","totalSlots","SeriationPhaseText","FooterDesc","paddingBottom","spaceBetween","light","SchedulesSystemHelp","shouldHide","storeHasPreSelections","setStoreHasPreSelections","showSchedulesSystemHelp","showModal","setShowingModal","handleOnSubmit","dontShowAgain","handleOnClose","hide","HelpHeader","HelpHeaderIcon","HelpBody","HelpBodyCheckboxAndButton","HelpBodyCheckbox","HelpBodyButton","TitleWarpper","FiguresWrapper","InfoIcon","HardwareIcon","MobileIcon","Footer","MobileSupportModal","onEnter","faDesktop","faTablet","faMobile","restricted","originalEditingUcs","editScheduleName","exchangeUcs","studentTotalChoices","disclaimerMobileModalIsOpen","loadingRestriction","savingSchedule","editingSchedule","ScheduleNameForm","setScheduleType","setEditScheduleName","setDisclaimerMobileModalIsOpen","handleConfirmationModalOpening","submitSchedule","editSchedule","getStudentTotalChoices","scheduleActionButtons","faTable","faList","getSelectedClasses","createMode","editMode","duplicateMode","hasActivePhase","getScheduleName","handleModalSubmission","web","Name","Phase","ScheduleNameWrapper","maxLength","minLength","pattern","autoFocus","decisionActions","onChangeClick","EditScheduleLabel","getScheduleNameContainer","TopRightButtonWrapper","StudentRegistrationDropdownWrapper","TopScheduleControllers","PeriodButtonsWrapper","ScheduleActionButtonsWrapper","CaptionAndActionButtons","ActionButtons","compareUcs","NoSelectedClassesHelp","NoSelectedClassesHelpIcon","faUsers","selectedAt","selectedStudents","studentsHigherRanking","studentsLowerRanking","seriationFinalResult","seriationTries","getSecondaryContent","shadows","FreeOptionsList","getSchedulesHomeSlice","getPhaseDetails","getPhaseLabel","shoulShowMySchedules","HeaderButton","QuestionMarkIcon","FreeOptionsButton","PresentationWrapper","columnsCountBreakPoints","350","650","900","1200","gutter","phaseType","phaseLabel","expandedContent","PhaseDetailsExpanded","PhaseDetailsExpandedHeader","PhaseDetailsExpandedContent","PhaseDetails","PhaseDetailsHeader","getPhaseCardSubTitle","PhaseDetailsContent","beginDate","LinksWrapper","Links","LinkArea","Link","FontAwesomeIcon","getSchedulesGuideSlice","loadingMarkdown","AllSchedules","CenteredWrapper","getNewCertificateData","getNewCertificateSlice","NewCertificateSelectRegistration","newCertificateData","NewCertificateSelectType","resetSelectedCertificateType","setSelectedCertificatePreviewUrl","setSelectedCertificateType","previewUrl","price","AccordionTitleText","AccordionChildDescritionText","ModelViewColumn","ModelWrapper","VerticalSeparator","PriceWrapper","TitleDescriptionWrapper","errLoadingCertificateList","getNewCertificateNumAdditionalDocs","useWarningModal","modalContent","setShowModal","showWarningModalOnSubmit","showRepeteadCertModal","setShowWarningModalOnSubmit","setShowRepeteadCertWarningModal","useTranslation","checkActiveCertificates","hasRepeatedCertificate","activeCertificates","cert","commonKeys","intersection","sanitizedApiObject","omitBy","isNull","sanitizeApiObject","shouldRenderModal","NewCertificateStatement","formElementsWatch","resetField","newCertificateNumAdditionalDocs","setExempt","setEnglishWarning","setIsDigital","postCertificateChosenOptions","setNeedsRequirement","clearWarnings","selectedCertificatePreviewUrl","loadingCertificateModel","setLoadingCertificateModel","activatedUcsList","setActivatedUcsList","watchElements","conditionalFormValidation","useCallback","row","getWarning","warning","activatedTableNameKey","tableNamekeysList","ucsNamekeysList","needsRequirement","nk","getUcsTableNamekeys","costs","errLoadingCertificateForm","AnimatedBackgroundTitle","CertificateData","CertificateDataNameAndCourse","CertificateDataBlock","DataText","CertificateDataCertificateType","CertificateSegment","SegmentContent","SegmentDescription","SegmentSubtitleText","CertificateStatement","labelKey","ExemptionWrapper","position","ExemptionRadioListWrapper","dropdownOptions","DropdownContainer","ExemptionReasonWrapper","LanguageTitleWrapper","CertificateStatementRequest","descriptionLabel","PageCounterWrapper","getChildren","EditableGroupWrapper","labels","nameKeys","nameSubKeys","concatenatedArray","rq","CheckboxContainer","TableTitleWrapper","FrequentedUcsTableWrapper","col","WarningIcon","WarningContainer","faExclamationTriangle","AnimatedBackground","FieldsGroupDisplay","disableEdit","getLabels","EditableBlockTitle","VisibilityWrapper","visible","getSubmissionTabData","requestCertificateData","formRequestData","elem","formDataItem","valueItem","getRequestedCertificateSubmission","detailsData","valueNameKey","elementNameKey","ignoreField","getDetailsSubmission","formElementsGetValues","submissionTabData","getUcsListNameKey","ucsTableNameKey","mockCertificatePaymentData","debitAcademicYear","debitDate","debitOriginId","certificateCosts","FourthStepText","CourseText","RequestedYearWrapper","elementKey","CertificateAdditionalDocsWrapper","CertificateAdditionalDocuments","CertificateAdditionalDocumentsTitle","documentKey","LanguageWrapper","FormatWrapper","RequestedCurricularYearWrapper","ECertificateState","englishWarning","isDigital","loadingSubmission","refreshPage","hasModeration","submitCertificate","resetSubmissionTabData","resetFormTabData","setRefreshPage","setHasModeration","newCertificateReset","setNewCertificateReset","onSubmitCertificate","exemptionHasModeration","hasMotivation","isPedagogicalDossierCertificate","setValue","NewCertificateSubmission","stretched","costLoading","ModalStatement","SubmitButtonsWrapper","secondaryContentOffset","SidebarWrapper","ExemptionNote","NoteDescriptionText","SegmentHeader","CertificateCostWrapper","Certificate","expirationDate","paymentState","showAccesskeyModal","setShowAccessKeyModal","setSelectedRegistration","grow","awaitingExemptionDecision","rejected","cancelled","exemptionDenied","getColor","faKey","SegmentBody","SegmentWrapper","SegmentSubHeader","SegmentLabels","PaymentStateWrapper","TextLabel","ResponseDateWrapper","DateWrapper","getRequestDateLabel","pending","submitted","faClock","faTimes","getLabelState","clipboard","writeText","host","certificatesFilters","getData","Separator","loadingCertificatesList","CertificatesWrapper","doubling","stackable","CertificateWrapper","PdfReader","numPages","setNumPages","pageNumber","setPageNumber","httpHeader","setHttpHeader","getFilePluginInstance","getFilePlugin","fileNameGenerator","Download","mode","IDToken","PageNumbersWrapper","TextLeft","TextRight","marginLeft","PdfWrapper","workerUrl","onDocumentLoad","onPageChange","currentPage","fileUrl","withCredentials","httpHeaders","getDeliveryMethod","getAccessHistoryModalStructure","accessHistory","countryCode","countryIso2","countryName","country","accessDate","accessTime","CertificatesReady","certificateFile","DetailsTitle","ValidDateWrapper","DetailsSentTitle","openChangeHistoryModal","ChangesItem","DetailsItems","DetailItem","DetailSubItem","DetailsSent","DetailsSentItems","DetailsSentItem","homeAddress","homeLocality","CostDetails","receipt","CertificateState","elements","SituationWrapper","SituationState","SituationCircle","isNotLast","iconPadding","iconWidth","SituationDetails","generateStates","colorVerticalLine","getCertificatesDetailsSlices","CertificatesNotReady","certificatePayment","certificatePaymentPending","PAID_STATUS_COLOR","noDebits","paid","model","SegmentTitle","SegmentDoc","verticalCenter","ModelText","DetailsStudentWrapper","DetailsElement","DetailsType","DetailsTypeItem","ConfirmationTitle","SegmentPayment","SegmentPaymentWrapper","SegmentAreaLeft","SegmentPaymentIcons","SegmentPaymentIconInstance","SegmentAreaRight","PaymentRow","margin","DetailsElementPayment","SeparatorPayment","notButton","PaymentMethodWrapper","faMoneyBill","entity","receiptNum","CenteredGridColumn","LabelContentWrapper","DeliveryMethodWrapper","AccessHistoryModal","accessHistoryModalVisible","loadingAccessHistory","loadingCertificatesDetails","errLoadingCertificatesDetails","isReady","CertificateReady","CertificateNotReady","getCertificateValidatorSlice","CertificateValidator","certCode","recaptchaValue","setRecaptchaValue","outlineRecap","setOutlineRecap","validateCertificateCode","createError","defaultValues","hasValidated","FormWrapper","CustomFormInput","hasExpired","validAccessKey","ResultWrapper","CertificateInfoWrapper","SegmentDocWrapper","DocSubWrapper","DocLinkText","loadingCertificateFile","ValidationDateWrapper","OutlineRecaptcha","sitekey","CustomButton","loadingCertificateValidation","ViewInfoWrapper","BottomButtonWrapper","CustomValAnotherButton","faRedoAlt","PageWarningComponent","eventsData","loadingExamsCalendar","calendarFilterTypes","calendarCurrentYearMonth","initialCalendarDate","setCalendarCurrentYearMonth","innerWidth","windowViewportWidth","setWindowViewportWidth","handleResize","addEventListener","removeEventListener","EventIcon","errLoadingCalendarData","leftButtonTooltip","rightButtonTooltip","todayButtonText","events","icsEvent","escape","faCalendar","seeMore","seeLocation","initialDate","onSeeLocation","updateCalendarCurrentYearMonth","EventCaption","SegmentWrapperActions","getEnrollmentRenewalSlice","getExamEnrollmentSlice","frameBorder","getImprovementExamEnrollmentSlice","setEnrollImprovementExamId","setRequestImprovementExamId","enrollImprovementExamId","requestImprovementExamId","setSelectedUcData","filterValues","ucData","signupId","getEvaluationTypeSelectionSlice","GradesManagementUtils","pautaStats","selectedReduxState","selectedState","setSelectedState","searchText","setSearchText","selectedYear","setSelectedYear","filteredPautasByState","setFilteredPautasByState","pautaStatsArray","totalPautasStats","accumulator","toSubmit","toSign","withErrors","updatedFilteredPautasByState","applyFilters","updatedCountPautasByState","searchString","codPauta","nomeDisciplina","tipoExame","dataLimiteLancamento","ntotalAlunos","estadoActual","uniqueStatus","intersectedPautas","matchesSearch","getFullYear","handleStateChange","selectedValue","displayInfoToaster","handleSearchChange","handleYearChange","changeYearRequest","handleDashboardClick","setPautasListaState","handleSelectAll","selectedRows","setSelectedPautaIds","maxPautasNumber","newSelectedIds","handleModal","selectedPautaIds","closeModal","showErrorForDuration","prevShowModal","StateProgressBar","percentage","now","borderRadius","data_listaPautas","Backdrop","ModalWrapper","Modal","changeModal","TableView","array_listaPautas","subarray","setData","originalData","setOriginalData","showError","setShowError","isPdfReady","signingPdfUrl","setSigningPdfUrl","pdfUrl","isLoading","setIsLoading","isAllSelected","setIsAllSelected","formatDate","dateString","toLocaleDateString","handleCheckboxChange","isChecked","prevSelectedIds","pid","duration","useInitializeState","tooltipText","subarrayItem","isDisabled","codDisciplina","isPT","nomeDisciplinaEng","nmecAluno","SigningModal","scrollToTop","overflowX","visibility","GridContainer","SemesterBlock","SemesterTitle","StatLine","StatLabel","attrs","StatCount","Dashboard","useGradesManagement","year1","semester1","nextYear","formattedFiltrarPorPeriodo","choice","placeholderText","loadingGrades","loadingStats","gap","marginRight","selectHDADOS","selectDicionarios","selectRegimes","selectGradeData","selectValidGradeValues","selectGradeEdits","selectIsStatisticsModalOpen","isStatisticsModalOpen","isCSVModalOpen","selectIsLabelsModalOpen","isLabelsModalOpen","selectDropdownValueSelected","dropdownValueSelected","selectIsConfirmPageLeaveModalOpen","isConfirmPageLeaveModalOpen","selectIsErrorsModalOpen","isErrorsModalOpen","selectImportErrors","importErrors","selectImportWarnings","importWarnings","selectIsConfirmDiscardChangesModalOpen","isConfirmDiscardChangesModalOpen","selectExamDate","selectLoadingStatus","selectGradeDetails","ConfirmActionModal","onConfirm","confirmButtonText","MessageWrapper","MessageTitle","MessageBody","ButtonsWrapper","blackLight","GradeTitle","epocaExame","anoLectivo","GradeTitleWrapper","GradeContainer","toLocaleUpperCase","DisciplineCode","ExameType","ExameInfo","YearSemesterCode","epocaExameMap","tipoExameMap","NM","RE","ML","DZ","SV","SE","ES","1","2","3","4","5","6","columnNameToIndex","columnName","indexToColumnName","remainder","fromCharCode","ButtonsDiv","CheckboxDiv","DropdownsDiv","DropdownsDivWrapper","ExcelWarningText","CSVModal","loadingLabel","setLoadingLabel","nmecColumnLabel","setnmecColumnLabel","gradeColumnLabel","setgradeColumnLabel","setHasHeader","columnOptions","numColumns","columnsList","num","getColumnNames","loadingCSVData","LabelsModalHeader","LabelsModalItem","HoverCloseIcon","LabelsModal","hdados","setBodyItems","regimeItems","setRegimeItems","nomeTipoAvaliacao","getPercentage","getPositiveGrades","aluno","getNegativeGrades","getRNMStudents","getMissingStudents","getDropOutStudents","getFailedByMissingStudents","getStudentsWithoutGrades","Header","StatisticsModal","totalStudents","positiveGrades","negativeGrades","rnmStudents","missingStudents","dropOutStudents","failedByMissingStudents","studentsWithoutGrades","isConfirmSubmitModalOpen","setIsConfirmSubmitModalOpen","handleIsConfirmSubmitModalOpen","statisticsTableStructure","setStatisticsModal","saveOrSubmitGrades","ErrorsModalHeader","ErrorsModalHeaderWrapper","ErrorsModalItem","WarningText","ErrorsModal","errorMessages","setErrorMessages","warningMessages","setWarningMessages","messages","errorCode","translationKey","val","localWarningMessages","warning1","warning3","warningJson","warningObj","warning2","new_grade","previous_grade","faTimesSquare","faExclamationSquare","float","CalendarIcon","ExamDatePicker","selectedDate","onDateChange","isOpen","setIsOpen","registerLocale","DatePickerContainer","faCalendarAlt","inline","month","stringToDate","formattedDate","filterDate","today","getDay","FileInputLabel","HiddenFileInput","TitleGradeExamDateStyle","pickedExamDate","css","ExamDateWrapper","useParams","handleBeforeUnload","hasEdits","returnValue","handleGradeInputChange","nome","curso","regime","handleLabelsModal","setIsLabelsModalOpen","handleConfirmPageLeaveModal","setIsConfirmPageLeaveModalOpen","handleConfirmDiscardChangesModal","setIsConfirmDiscardChangesModalOpen","loadingGradeData","clearExamDate","setExamDate","htmlFor","faUpload","uploadGrades","getGradeHistorySlice","TimeWrapper","historyList","dataHora","timeString","toLocaleTimeString","hour","minute","second","hour12","codEstado","nomeUtilizador","obs","loadingGradeHistory","lineToAxisPlugin","afterDatasetsDraw","chart","easing","initialAnimationCompleted","ctx","datasets","dataset","meta","getDatasetMeta","yInterpolated","yBottom","scales","bottom","yCurrent","tooltipPosition","y","save","strokeStyle","lineWidth","beginPath","moveTo","_model","x","lineTo","stroke","restore","Chart","GradesChart","setCustomTooltip","canvasRef","loadingGradeDetailsCounts","loadingGradeDetailsInfo","specialGrades","regularGradesRange","allValidGradeKeys","validGrades","chartLabels","chartData","myLollipopChart","update","canvas","getContext","legend","responsive","maintainAspectRatio","layout","right","xAxes","scaleLabel","labelString","yAxes","beginAtZero","ticks","stepSize","tooltips","enabled","intersect","custom","tooltipModel","opacity","caretY","left","caretX","tooltipContent","dataPoints","yLabel","updateChart","destroy","isNaN","PdfBackdrop","PdfModal","currentTarget","pautaCode","isPdfModalOpen","customTooltip","dateStr","parts","handlePreview","fetchPdf","setIsPdfModalOpen","semestre","scale","zIndex","Exams","TransferalCompetence","ClassSupoort","getGradesGuideSlice","getSpecialExamsSlice","CommunicationTypes","targets","IFRAME_LOGS","IFRAME_ENROLL","origins","IFRAME_LOGS_ORIGIN","IFRAME_ENROLL_ORIGIN","usePostMessageMiddleware","targetWindow","listeners","handleMessage","origin","messageOrigin","listener","l","sendMessage","postMessage","addMessageListener","removeMessageListener","cleanup","embeddedModuleLoaded","setEmbeddedModuleLoaded","embeddedModuleHeight","setEmbeddedModuleHeight","embeddedModuleRef","contentWindow","loadModule","iframeElement","STORE_OTHER_ACTION","CHANGE_LANG","STORE_NAVIGATE_ACTION","STORE_TOASTER_ACTION","IFRAME_HEIGHT","LOGOUT","scrolling","resize","hideFromSidebar","inMaintenance","CreatedSchedules","MySchedule","API_SCHEDULES","API_TRANSLATIONS","API_PAUTAS_GRADES_MANAGEMENT","API_PAUTAS_GRADES_SIGNATURE","getFileEndpoint","ucClass","currentOption","currentClass","selectedUcCodes","formTableCheckbox","ucRow","getRequestedCertificateData","getDetailsData","documentsData","elemNamekey","getAdditionalDocumentsData","secondaryContentNonStickyGrow","centered","ContentHeaderWrapperColumn","padded","HeaderColumnWrapper","hassubheader","DisplayableWrapper","HeaderLeftWrapper","HeaderRightWrapper","SubHeaderWrapper","ContentWrapperGrid","ContentWrapperColumn","maskProps","lineBreak","widths","fix","rest","createSlice","initialState","isSidebarOpen","startingApp","reducers","toggleApiTranslationsEdit","updateApiTranslation","changeLocale","onFirstSignIn","updateUserRole","toggleSidebar","impersonateUser","cleanImpersonateUser","ROLES","loadingModule","getExamCalendarData","applicationTypePagination","totalPages","errSubmittingForm","resetAdditionDocs","existingPhases","registrationOptions","loadingRegistrations","DEFAULT_DEBITS","DEFAULT_PAYMENTS","DEFAULT_PENDING_DEBITS","multiSelectionModal","errorLoadingMbInfo","handleWebsocketConnection","deleteDebit","errLoadingPhoneNumber","errLoadingDebits","defaultDropdownOption","setDefaultDropdownOption","hasRegistrationId","updateSchedule","showing","toast","closeToaster","displayToaster","closeToasterAction","freeOptionsGroups","getCurrentMode","handleScheduleCreateMode","handleScheduleEditOrDuplicateMode","comparator","newUcs","setReformatedClassesTypologies","setClassLockState","selectClassesToEditSchedule","setClassesProvisorySeriationResult","seriationResult","setFreeOptionsPage","setYear","setSemester","setDepartmentFilterList","pautasListaChanges","filterState","pautasListaChanged","resetPautasListaChanges","dep","ano","idTipoAvaliacao","tipo","x1","x2","x3","FDADOS","loadingGradeDetails","pathElemsList","setPath","certificateSubmitted","errorLoadingAccessHistory","errLoadingCertificateValidation","combineReducers","logsstudentSlice","logsSlice","examsCalendarlSlice","applicationdetailsSlice","newapplicationSlice","registrationdetailsSlice","registrationsSlice","seriationhistorySlice","seriationhistorydetailsSlice","freeOptionsDropdownSlice","studentregistrationdropdownSlice","applicationslistSlice","pendingDebitsPaymentSlice","gradesSlice","assessmentchoiceSlice","ExamRegistration","examregistrationSlice","SubscriptionRenewal","subscriptionrenewalSlice","classsupoortSlice","curricularplanSlice","curricularUnitDetailsSlice","personaldataSlice","createdScheduleSlice","myschedulesSlice","freeOptionsTableSlice","mandatoryOptionsDropdownSlice","toasterSlice","toasterActionSlice","schedulesSlice","schedulesHomeSlice","schedulesGuideSlice","gradesGuideSlice","homeSlice","gradesManagementSlice","editGradesSlice","gradesDetailsSlice","gradesHistorySlice","helpSlice","AppTools","appToolsSlice","breadcrumbSlice","newcertificateSlice","certificateslistSlice","certificatesdetailsSlice","certificateValidatorSlice","improvementExamEnrollmentSlice","examEnrollmentSlice","evaluationTypeSelectionSlice","enrollmentRenewalSlice","exams","transferalCompetence","specialExams","RightSide","StyledContainer","ModalButtonsContainer","ModalButtons","LeftSide","AmaLogoWrapper","AmaDescLink","AmaDesc","FormLabel","ErrorsWrapper","ErrorMessage","PautasList","PautaItem","PautasListHeader","PautasListWrapper","PautasListContainer","AmaSMS","AmaWarning","useSignalRConnection","connection","initiateConnection","setPhoneNumber","selectedCountryCode","pin","setPin","otp","setOtp","processId","setProcessId","errorMessage","setErrorMessage","detailErrorMessage","setDetailErrorMessage","phonePattern","wsConnClosedWithSuccess","on","base64Data","bytes","contentType","endsWith","stop","processErrorMessage","onclose","off","handleInitiateSigning","connectionId","completePhoneNumber","encryptedPhoneNumber","encryptWithPublicKey","encryptedPin","pautaIds","invoke","handleCompleteSigning","encryptedOtp","handleForceSms","publicKey","buffer","crypto","publicEncrypt","constants","RSA_PKCS1_PADDING","containsWhitespace","str","HubConnectionState","Connected","AmaLogo","setConnection","connectionInitialized","signalR","newConnection","withUrl","accessTokenFactory","build","EWEBSOCKET_PAYMENT_TYPE","createGlobalStyle","base","getRoles","withTranslation","openTools","setOpenTools","setImpersonate","CloseButton","Tools","Switcher","ImpersonatingWrapper","HelpMessage","transKey","onUpdateKeys","isMouseInside","setIsMouseInside","isMouseInsideMessage","setIsMouseInsideMessage","translationKeys","onMouseEnter","onMouseLeave","OverlayWrapper","KeysWrapper","IconMessage","IDBDatabase","Flex","tKey","Trans","i18nKey","defaults","components","getToasterSlice","timeout","getTypeColor","clearTimeout","ToastContent","CloseIconWrapper","faCheckCircle","Transition","animation","toastsize","Toast","Message","small","getToasterActionSlice","faCookieBite","BodyWrapper","getBreadcrumbSelector","appSelectors","getRoutes","listen","onNavigate","paths","getLanguageName","hasSidebar","setSearch","searchResults","setSearchResults","loadingSearchResults","setLoadingSearchResults","LeftAreaWrapper","SidebarAreaWrapper","Hamburger","faBars","LogoWrapper","BrandName","RightAreaWrapper","SearchInputWrapper","enterAnimation","dropdownValues","breadcrumbPath","SearchTextWrapper","resetSearchResults","results","faSearch","sidebar","SystemBar","UserWrapper","LinkWrapper","faUser","systemBar","institutional","getSidebarOpening","Sidebar","sidebarLinks","collapseLink","collapseSubLink","goTo","StickyWrapper","RefLinks","RefLink","collapsed","subLinks","Angle","RefSubLinks","subLink","subLinkIndex","RefSubLink","subSubLink","lighter","sideBar","subItemColor","subSubItemColor","setSkipSeletectItems","Heightblock","RefLinkItem","RefLinkIcon","RefLinkIconName","collapsedWidth","setSelectedItems","newSideBarLink","foundSublink","breadcrumb","routeIcons","paco","faGraduationCap","faCabinetFiling","faTh","personalData","faUserGraduate","backoffice","faUsersCog","teachers","faChalkboardTeacher","candidature","faAddressCard","onlineEnrollments","faPenSquare","setSidebar","skipSeletectItems","currentPath","isImpersonating","orderedRoutes","routeRole","isWasStudent","filteredRoute","routeStructure","routeStructureSubLinks","subRoute","indexOfModule","orderedRoute","indexOfPath","LinksList","wideScreen","SidebarWeb","SidebarMobile","contextualProps","noLogo","linkIndex","sidebarLinksCopy","SOCIAL","faFacebookF","faInstagram","faTwitter","faLinkedinIn","faYoutube","SocialLinksContacts","ColumnTitle","FirstColumnWrapper","SocialLinksWrapper","social","aria-label","ContactsWrapper","PhoneLink","LogoLinks","BottomFooterWrapper","LinksBrandWrapper","Brand","LogosWrapper","Logo","EasyPayLogo","InMaintenanceScene","tOptions","withRouter","showGoToTopButton","setShowGoToTopButton","showGoToTopButtonRef","shoulRenderSideBar","setShoulRenderSideBar","setRef","handleOnScroll","evt","scrollTop","onRefSet","node","__authConfig","callbackUri","routingRules","to","verifyRoute","getHours","Theme","handleGoToTop","AppWrapper","StickyToaster","StickyHeader","RouteContainer","hasRoutes","RouteWrapper","showButton","phaseFinished","showDisabled","showAllocated","showAllocatedState","hideAllocationProb","reformatUcsUtil","mandatoryUc","freeUc","filterAllocatedClasses","getSelectedOrAllocatedMandatoryOptionUcs","organizedClassesByPeriod","viewAllocated","viewAllocatedState","newClassItems","lesson","accToUpdate","accClassItem","classRoom","room","irregularMessage","getIrregularMessageClass","associatedClasses","getAllocationValue","prob","selects","lowerRanking","higherRanking","high","low","showPreselected","classesFilter","unfilter","reformattedUcs","existingTypologies","typologyInitials","typologyName","groupUc","stateClone","assoc","classesOfThisUc","allClasses","wantsToRemoveSelection","ucFound","classFound","hasOverlaps","accData","self","eachSeriatedClass","hideClass","eachOtherClass","submit","aggregator","shouldOverlap","allClassesItem","verifyOverlaps","ucsOriginal","selectedClassesId","originalSelectedClassesId","originalSelectedClass","getPaymentsSlice","getCurrentPhase","getPendingDebitsPaymentSlice","Sentry","dsn","integrations","Integrations","BrowserTracing","tracesSampleRate","hotjar","initialize","set","page","pageview","allScopes","sessionState","base64","jsonPayload","decodeURIComponent","userGroups","roleRelationship","relationship","relation","roleRelation","getCurrentStep","getApplicationTypeId","getApplicationLoading","getApplicationTabLoading","getApplicationErrorStatus","getTranslationsEdit","getCertificatesListSlice"],"mappings":"8IAAAA,EAAOC,QAAU,k2O,+JCAjB,sGASO,IAAMC,EAAkB,SAACC,GAAD,OAAsBA,EAAMC,4BAA4BC,cAC1EC,EAAsB,SAACH,GAAD,OAAsBA,EAAMI,aAElDC,EAAmB,SAACL,GAAD,OAAsBA,EAAMM,IAAIC,KAAKC,gB,oKCyEtDF,EA5EH,SAAC,GAAkB,IAAhBG,EAAe,EAAfA,SAAe,EACAC,oBAASC,YAAW,eADpB,mBACbC,GADa,aAEJF,mBAAS,IAFL,gCAGIA,mBAAS,KAHb,6BAK5BG,qBAAU,WAPC,yCAQIC,OAAOC,SAASC,OAAOC,MAAM,iBAGxCL,GAAU,KAEX,IASH,OAAOH,GCjBWS,QACW,cAA7BJ,OAAOC,SAASI,UAEa,UAA7BL,OAAOC,SAASI,UAEhBL,OAAOC,SAASI,SAASF,MACvB,2D,4LC0CMG,G,WAkFAC,G,WAuCAC,G,WAIAC,G,WAcAC,I,WAKAC,I,WA4DAC,I,WAmBAC,I,WAIAC,I,WA4DAC,I,WAiDAC,I,WAyGAC,I,WAmBAC,I,WAgCAC,I,WAyBeC,IArgBzB,SAAUd,IAAV,iFACc,OADd,SACoBe,YAAOC,KAD3B,UACQ9B,EADR,OAEQ+B,EAAWC,cACXC,EAAiBC,cAHzB,WAM4BC,cAN5B,EAMUC,MANV,EAMiBC,OAEPpC,EAAOI,YAAW,SAAW,GAC7BiC,EAAUjC,YAAW,oBAE3BkC,cACAC,QAAQC,IAAI,kBAERV,EAdR,iBAgBM,OAhB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KAAM,GAAIwX,QAAS,eAE/B,CACE24B,OAAO,EACPhzC,IAAK,sBACL6C,KAAM,sBACNs0H,iBAAiB,EACjBl7E,KAAM,kCACN7V,UAAU,EACVra,QAAS,cACT7lB,MAAO,CACL,QACA,eACA,QACA,WACA,aACA,cACA,YACA,UACA,uBACA,qBACA,yBACA,2BACA,yBACA,4BAEFJ,OAAQ,CAAC,eACTvK,OAAQ,CAAEsH,KAAM,GAAIwX,QAAS,eAE/B,CACE24B,OAAO,EACPhzC,IAAK,mBACL6C,KAAM,mBACNs0H,iBAAiB,EACjBl7E,KAAM,kCACN7V,UAAU,EACVra,QAAS,cACT7lB,MAAO,CACL,QACA,eACA,QACA,WACA,aACA,cACA,YACA,UACA,uBACA,qBACA,yBACA,2BACA,yBACA,4BAEFJ,OAAQ,CAAC,eACTvK,OAAQ,CAAEsH,KAAM,GAAIwX,QAAS,eAE/B,CACE24B,OAAO,EACPhzC,IAAK,0BACL6C,KAAM,0BACNs0H,iBAAiB,EACjBl7E,KAAM,kCACN7V,UAAU,EACVra,QAAS,cACT7lB,MAAO,CACL,QACA,eACA,QACA,WACA,aACA,cACA,YACA,UACA,uBACA,qBACA,yBACA,2BACA,yBACA,4BAEFJ,OAAQ,CAAC,eACTvK,OAAQ,CAAEsH,KAAM,GAAIwX,QAAS,eAE/B,CACE24B,OAAO,EACPhzC,IAAK,0BACL6C,KAAM,0BACNs0H,iBAAiB,EACjBl7E,KAAM,+CACN7V,UAAU,EACVra,QAAS,cACT7lB,MAAO,CACL,QACA,eACA,QACA,WACA,aACA,cACA,YACA,UACA,uBACA,qBACA,yBACA,2BACA,yBACA,4BAEFJ,OAAQ,CAAC,eACTvK,OAAQ,CAAEsH,KAAM,GAAIwX,QAAS,eAE/B,CACE24B,OAAO,EACPhzC,IAAK,oCACL6C,KAAM,oCACNs0H,iBAAiB,EACjBl7E,KAAM,kCACN7V,UAAU,EACVra,QAAS,cACT7lB,MAAO,CACL,QACA,eACA,QACA,WACA,aACA,cACA,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,KAAM,GACNqzC,SAAS,GAGE56B,EAA8B,CACzCg1B,OAAQ,EACRC,MAAO,GAGI/0B,EAAqC,CAChD80B,OAAQ,EACRC,MAAO,IAGIk4B,EAAgD,CAC3Dn4B,OAAQ,EACRC,MAAO,I,gCC9CT,wIASO,IACMhP,EAAU,SAACjqC,GAAD,OAAsBA,EAAMM,IAAIC,MAC1CupC,EAAc,SAAC9pC,GAAD,OAAsBA,EAAMM,IAAIiH,eAG9ClH,EAAmB,SAACL,GAAD,OAAsBA,EAAMM,IAAIC,KAAKC,eACxD6nG,EAAyB,SAACroG,GAAD,OAAsBA,EAAMyV,iB,oICflE,sGASO,IAAMq0B,EAAc,SAAC9pC,GAAD,OAAsBA,EAAMM,KAC1C2pC,EAAU,SAACjqC,GAAD,OAAsBA,EAAMM,IAAIC,MAC1Ci8I,EAAsB,SAACx8I,GAAD,OAAsBA,EAAMM,IAAIiG,mB,wECXnE,wIAQO,IACMk2I,EAA2B,SAACz8I,GAAD,OAAsBA,EAAMigB,kBACvDgqB,EAAU,SAACjqC,GAAD,OAAsBA,EAAMM,IAAIC,MAC1CR,EAAkB,SAACC,GAAD,OAAsBA,EAAMC,4BAA4BC,cAC1E4pC,EAAc,SAAC9pC,GAAD,OAAsBA,EAAMM,IAAIiH,gB","file":"static/js/main.d865f28d.chunk.js","sourcesContent":["module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAFZhJREFUeNrs3T92G0eeB/AC5WCzxQ0MnWCpbDNBJzAdTmToBKZPQOgEtMONSJ+A8gkIZZuRk01GKNtMnGw30naZhTeUJVEgge6uP5/Pe/UkvZlngtWFrm/9uro7BAAAAAAAAAAAAAAAAAAgUxNdAL2ade3nrh2lv9933bXbrq279j79e53+BAAKtejah659fEK76tpZ1467dqgrAaAMR0+c+L/WYpC4SIFgpnsBID/THVb+27abrp2qDg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gAhAAATP6NBgAhAACTf08mhXxOdwcAkPNiNesNf19yUFjnro0zADKyKnHyL6kCsDFNlQBPDARgbOeh4PfZHBT2eWPCiu9R/tW4A2DEueh1KPxldpOCP3vcGHgW7AsAYDjXaeK/Lv0XOSj4s79N1YCV8QjAAGL1uaid/g95Vvjnj2WY37v2z3D3OuF/Mz4B2LN1uHuy33917X9r+aUmFR2gWbi7JDA3VgHY46r/TShwl39LAWAj7g04DV4rDMDTrbr2S6ik3N9KANhYdu3nYJMgANtbh7tNfqvaf9FnFf9u8eDF6zX/F+6eG2B/AAAPTfy/pMl/3cIvPGnkwMYqwCJVBGbGOQD3Fou/hbs7y5oyafBgxz0CPwUvGAJo1W2a8OPEf91qJ0waHgCzFAJUBQDaECf9P9Kft613xsR4+FPcIzBPlQHvGQAw6QsADZqmMPAy/SkQAJRj1bV36c+V7hAAdrUJAt+nP2fBZQOAMV2nFX2c7Nfp39e6RQAYslpw+MC/Adh9Rf/QvwEAAAAAAAAAAAAAACr3/wIMAFV+uN1GjdkIAAAAAElFTkSuQmCC\"","/**\r\n * MySchedules scene logic selectors\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getRegistration = (state: RootState) => state.StudentRegistrationDropdown.registration;\r\nexport const getMySchedulesSlice = (state: RootState) => state.MySchedules;\r\nexport const getSchedules = (state: RootState) => state.Schedules.mySchedules;\r\nexport const getRegistrations = (state: RootState) => state.App.user.registrations;\r\n","import React, { useState, useEffect } from 'react';\r\nimport logo from './logo512.png';\r\nimport './CloseApp.css';\r\nimport config from 'config';\r\n\r\nimport { getStorage, setStorage } from 'utils';\r\n\r\nconst uuid = '0a07d29d-d043-4c7c-85bc-ac58f1d3c976';\r\n\r\nconst App = ({ children }) => {\r\n const [closed, setClosed] = useState(getStorage('63ERkoNglo') ? false : true);\r\n const [name, setName] = useState('');\r\n const [password, setPassword] = useState('');\r\n\r\n useEffect(() => {\r\n const user = window.location.search.match(/user=([^&]+)/);\r\n if (user === uuid) {\r\n //setStorage('63ERkoNglo', uuid);\r\n setClosed(false);\r\n }\r\n }, []);\r\n\r\n const handleSubmit = (event) => {\r\n if (name === 'xU0deZnPLF0dhtE' && password === 'CN9Dk5c9Xu3oJIq') {\r\n setClosed(false);\r\n setStorage('63ERkoNglo', true);\r\n }\r\n };\r\n\r\n return children;\r\n if (!closed || config.ENVIRONMENT !== 'PROD') return children;\r\n else {\r\n return (\r\n
\r\n
Acesso temporariamente restrito.
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \"logo\"\r\n\r\n
\r\n Estamos a trabalhar num Portal Académico Online mais atual e com mais funcionalidades.\r\n
\r\n \r\n Até lá continue a aceder a{' '}\r\n \r\n https://paco.ua.pt\r\n \r\n
\r\n
\r\n
\r\n \r\n );\r\n }\r\n};\r\n\r\nexport default App;\r\n","// This optional code is used to register a service worker.\r\n// register() is not called by default.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on subsequent visits to a page, after all the\r\n// existing tabs open on the page have been closed, since previously cached\r\n// resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model and instructions on how to\r\n// opt-in, read https://bit.ly/CRA-PWA\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === 'localhost' ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === '[::1]' ||\r\n // 127.0.0.0/8 are considered localhost for IPv4.\r\n window.location.hostname.match(\r\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n )\r\n);\r\n\r\nexport function register(config) {\r\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n return;\r\n }\r\n\r\n window.addEventListener('load', () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Let's check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl, config);\r\n\r\n // Add some additional logging to localhost, pointing developers to the\r\n // service worker/PWA documentation.\r\n navigator.serviceWorker.ready.then(() => {\r\n console.log(\r\n 'This web app is being served cache-first by a service ' +\r\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\r\n );\r\n });\r\n } else {\r\n // Is not localhost. Just register service worker\r\n registerValidSW(swUrl, config);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW(swUrl, config) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n if (installingWorker == null) {\r\n return;\r\n }\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the updated precached content has been fetched,\r\n // but the previous service worker will still serve the older\r\n // content until all client tabs are closed.\r\n console.log(\r\n 'New content is available and will be used when all ' +\r\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\r\n );\r\n\r\n // Execute callback\r\n if (config && config.onUpdate) {\r\n config.onUpdate(registration);\r\n }\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // \"Content is cached for offline use.\" message.\r\n console.log('Content is cached for offline use.');\r\n\r\n // Execute callback\r\n if (config && config.onSuccess) {\r\n config.onSuccess(registration);\r\n }\r\n }\r\n }\r\n };\r\n };\r\n })\r\n .catch(error => {\r\n console.error('Error during service worker registration:', error);\r\n });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl, config) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl, {\r\n headers: { 'Service-Worker': 'script' }\r\n })\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n const contentType = response.headers.get('content-type');\r\n if (\r\n response.status === 404 ||\r\n (contentType != null && contentType.indexOf('javascript') === -1)\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl, config);\r\n }\r\n })\r\n .catch(() => {\r\n console.log(\r\n 'No internet connection found. App is running in offline mode.'\r\n );\r\n });\r\n}\r\n\r\nexport function unregister() {\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.ready\r\n .then(registration => {\r\n registration.unregister();\r\n })\r\n .catch(error => {\r\n console.error(error.message);\r\n });\r\n }\r\n}\r\n","/**\r\n * App sagas\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\nimport { call, takeLatest, put, putResolve, select } from 'redux-saga/effects';\r\nimport moment from 'moment';\r\nimport numeral from 'numeral';\r\nimport { camelizeKeys } from 'humps';\r\nimport routes, { IRoutes } from 'routes';\r\nimport LogRocket from 'logrocket';\r\n\r\nimport { t } from 'app';\r\n\r\nimport API from 'api';\r\n\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './selectors';\r\n\r\nimport { ITranslation } from 'app/logic/slice';\r\nimport { ISignin, IUser } from './slice';\r\n\r\nimport { initTracking, shouldSignin, hasTokenParameter, decodeJWT } from 'app/utils';\r\n\r\nimport ErrorHandler from 'shared/errorHandler';\r\n\r\nimport { setStorage, getStorage, history, i18nInstance, getCurrentRoute } from 'utils';\r\nimport {\r\n initWebSocket,\r\n initWebSocketChannel,\r\n createTranslationBundles,\r\n getUserRoles,\r\n} from 'app/utils';\r\n\r\nimport { listAllScopes } from 'api/utils';\r\n\r\nimport config, { IRole } from 'config';\r\n\r\n\r\ninterface INavigateToSaga {\r\n type: 'App/navigateTo';\r\n payload: { key: string; params?: any; state?: any; forceRefresh?: boolean; hash?: string };\r\n}\r\n\r\ninterface IChangeLocaleSaga {\r\n type: 'App/changeLocale';\r\n payload: string;\r\n}\r\n\r\ninterface IUpdateApiTranslationSaga {\r\n type: 'App/updateApiTranslation';\r\n payload: ITranslation;\r\n}\r\n\r\ninterface IImpersonateUserSaga {\r\n type: 'App/impersonateUser';\r\n payload: string;\r\n}\r\n\r\nfunction* onMountSaga() {\r\n const App = yield select(selectors.getAppSlice);\r\n const signInfo = shouldSignin();\r\n const tokenParameter = hasTokenParameter();\r\n\r\n try {\r\n let { route, params } = getCurrentRoute();\r\n\r\n const user = getStorage('user') || {};\r\n const cookies = getStorage('cookies-accepted');\r\n\r\n initTracking();\r\n console.log('INIT TRACKING');\r\n\r\n if (signInfo) {\r\n // user is signing in\r\n yield call(signinSaga, signInfo);\r\n yield call(getSuperUserSaga);\r\n } else if (tokenParameter !== null) {\r\n // force user token\r\n yield call(forceSigninSaga, tokenParameter);\r\n yield call(getSuperUserSaga);\r\n } else {\r\n // user already signed in\r\n yield putResolve(actions.App.setUser({ ...App.user, ...user }));\r\n }\r\n\r\n yield* getApiTranslationsAndCheckRoutesSaga();\r\n\r\n if (cookies === null) {\r\n yield put(\r\n actions.ToasterAction.showToasterAction({\r\n title: t('generic.cookies'),\r\n buttonTitle: t('generic.accept'),\r\n cancelTitle: t('generic.reject'),\r\n onCancel: () => {\r\n localStorage.setItem('cookies-accepted', 'false');\r\n },\r\n onAccept: () => {\r\n try {\r\n initTracking();\r\n if (config.LOGROCKET_ID) {\r\n LogRocket.identify(user.email);\r\n }\r\n localStorage.setItem('cookies-accepted', 'true');\r\n } catch (e) {}\r\n },\r\n })\r\n );\r\n }\r\n\r\n if (signInfo) {\r\n yield put(actions.App.navigateTo({ key: 'home' }));\r\n }\r\n\r\n yield put(actions.App.setStartingApp(false));\r\n } catch (e) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('offline.actionErrorStartUp'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n}\r\n\r\n/* try {\r\n if (getStorage('user')) {\r\n const socket = yield call(initWebSocket);\r\n \r\n const channel = yield call(initWebSocketChannel, socket);\r\n \r\n while (true) {\r\n const action = yield take(channel);\r\n yield put(action);\r\n }\r\n }\r\n } catch (e) {\r\n console.error('Socket initiation error');\r\n }*/\r\n\r\nfunction* navigateToSaga(action: INavigateToSaga) {\r\n const { key, params, state, forceRefresh, hash } = action.payload;\r\n const { routingStructure } = yield select(selectors.getAppSlice);\r\n\r\n let route = routingStructure.find((route) => route.key === key);\r\n let path: any = route?.path || null;\r\n\r\n if (!path) {\r\n return null;\r\n }\r\n\r\n Object.keys(path).forEach((key) => {\r\n if (i18nInstance.language.includes(key)) {\r\n path = path[key];\r\n }\r\n });\r\n\r\n if (typeof path !== 'string') {\r\n path = path.en;\r\n }\r\n\r\n if (hash) {\r\n path += `#${hash}`;\r\n }\r\n\r\n //check path based on current language\r\n if (params) {\r\n Object.keys(params).forEach((param) => {\r\n path = path.replace(`:${param}`, params[param]);\r\n });\r\n }\r\n\r\n if (forceRefresh) {\r\n window.location.href = path;\r\n } else {\r\n yield call(history.push, path, state);\r\n }\r\n}\r\n\r\nfunction* navigateBackSaga() {\r\n yield call(history.goBack);\r\n}\r\n\r\nfunction* changeLocaleSaga(action: IChangeLocaleSaga) {\r\n const { payload } = action;\r\n moment.locale(payload);\r\n numeral.locale(payload);\r\n i18nInstance.changeLanguage(payload);\r\n\r\n let { route, params } = getCurrentRoute();\r\n\r\n yield put(actions.App.setCurrentLocale(i18nInstance.language));\r\n yield put(actions.App.navigateTo({ key: route.key, params }));\r\n\r\n setStorage('currentLocale', payload);\r\n}\r\n\r\nfunction* toggleApiTranslationsEditSaga() {\r\n const App = yield select(selectors.getAppSlice);\r\n yield put(actions.App.setTranslationsEdit(!App.translationsEdit));\r\n}\r\n\r\nfunction* getApiTranslationsAndCheckRoutesSaga() {\r\n const allTranslations = yield call(API.translations.getTranslations.call);\r\n const newRoutes = yield call(API.routes.getFunctionalities.call);\r\n\r\n if (newRoutes.length === 0) {\r\n throw new Error();\r\n }\r\n\r\n let translations = [] as any[];\r\n\r\n allTranslations.forEach((translation) => {\r\n if (translation.fields.name !== 'routingStructure') {\r\n translations.push(translation);\r\n }\r\n });\r\n\r\n const translationBundles = createTranslationBundles(translations);\r\n\r\n Object.keys(translationBundles).forEach((language) => {\r\n i18nInstance.addResourceBundle(\r\n language,\r\n 'translation',\r\n translationBundles[language],\r\n true,\r\n true\r\n );\r\n });\r\n\r\n let currentLocale = getStorage('currentLocale');\r\n\r\n if (currentLocale) {\r\n i18nInstance.changeLanguage(currentLocale);\r\n } else {\r\n i18nInstance.changeLanguage(i18nInstance.language);\r\n setStorage('currentLocale', i18nInstance.language);\r\n }\r\n\r\n if (\r\n config.ENVIRONMENT === 'DEV' ||\r\n (config.ENVIRONMENT === 'DEV' && config.ROUTES_ENV !== 'STG')\r\n ) {\r\n yield putResolve(actions.App.setRoutingStructure(routes));\r\n } else {\r\n const mergedRoutes = routes.reduce((acc, route) => {\r\n let foundRoute = newRoutes.find((newRoute) => newRoute.key === route.key);\r\n if (foundRoute) {\r\n if (foundRoute?.path?.pt?.length === 0 || foundRoute?.path?.en?.length === 0)\r\n delete foundRoute.path;\r\n return [...acc, { ...route, ...foundRoute }];\r\n }\r\n return acc;\r\n }, []);\r\n\r\n yield putResolve(actions.App.setRoutingStructure(mergedRoutes));\r\n }\r\n\r\n yield put(actions.App.setApiTranslations(translations));\r\n yield put(actions.App.setCurrentLocale(i18nInstance.language));\r\n}\r\n\r\nfunction* updateApiTranslationSaga(action: IUpdateApiTranslationSaga) {\r\n const App = yield select(selectors.getAppSlice);\r\n const { name, form } = action.payload;\r\n\r\n try {\r\n const { id } = App.apiTranslations.find((translation) => translation.name === name);\r\n const properties = Object.keys(form).map((property) => ({\r\n key: property,\r\n value: form[property].pt,\r\n valueCh: form[property].zh,\r\n valueEn: form[property].en,\r\n }));\r\n\r\n //yield call(API.translations.patchTranslations.call, id, { properties });\r\n } catch (e) {\r\n console.log('update translation error', e);\r\n }\r\n}\r\n\r\nfunction* updateUserRoleSaga() {\r\n //alert('Update user role')\r\n}\r\n\r\nfunction* signinSaga(signInfo: ISignin) {\r\n \r\n try {\r\n const { code } = signInfo;\r\n let userData = yield call(API.signin.token.call, {\r\n grantType: 'authorization_code',\r\n code,\r\n redirectUri: config.OIDC_CONFIG.redirectUri,\r\n });\r\n userData = camelizeKeys(userData);\r\n const profile = camelizeKeys(decodeJWT(userData.idToken));\r\n\r\n const { accessToken, refreshToken, idToken, tokenType, expiresIn, scope } = userData;\r\n const studentNmec = config.HARDCODED_NMEC || profile.studentNumber || profile.nMecAluno;\r\n\r\n if (!profile.iss || !profile.aud[0]) throw Error();\r\n\r\n const userRoles: IRole[] = getUserRoles(config.HARDCODED_ROLES || profile.groups, []);\r\n\r\n let user: IUser = {\r\n name: `${profile.givenName}`,\r\n fullName: `${profile.uAFriendlyName}`,\r\n email: `${profile.email}`,\r\n expiresIn,\r\n roles: userRoles,\r\n nmec: studentNmec,\r\n registrations: null,\r\n accessToken,\r\n refreshToken,\r\n scopes: scope,\r\n idToken,\r\n tokenType,\r\n };\r\n \r\n //logRocket signUser\r\n if (config.LOGROCKET_ID) {\r\n try {\r\n LogRocket.identify(profile.email);\r\n } catch (e) {}\r\n }\r\n localStorage.setItem('user', JSON.stringify(user));\r\n yield putResolve(actions.App.setUser(user));\r\n try{\r\n yield call(API.sgh.getLogin.call);\r\n }\r\n catch (e){\r\n const { scope } = userData; \r\n yield call(API.signin.postLogin.call,scope);\r\n } \r\n } catch (e) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('generic.actionErrorUnauthorized'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n}\r\n\r\nfunction* forceSigninSaga(signInfo: {\r\n accessToken: string;\r\n idToken: string;\r\n refreshToken: string;\r\n}) {\r\n const { accessToken, refreshToken, idToken } = signInfo;\r\n\r\n try {\r\n const profile = camelizeKeys(decodeJWT(idToken));\r\n const studentNmec = config.HARDCODED_NMEC || profile.studentNumber || profile.nMecAluno;\r\n\r\n if (!profile.iss || !profile.aud[0]) throw Error();\r\n\r\n const userRoles = getUserRoles(config.HARDCODED_ROLES || profile.groups, []);\r\n\r\n let user = {\r\n name: `${profile.givenName}`,\r\n fullName: `${profile.givenName} ${profile.familyName}`,\r\n email: `${profile.email}`,\r\n expiresIn: '3600',\r\n roles: userRoles,\r\n nmec: studentNmec,\r\n registrations: null,\r\n accessToken,\r\n refreshToken,\r\n scopes: listAllScopes(),\r\n idToken,\r\n tokenType: 'Bearer',\r\n };\r\n\r\n //logRocket signUser\r\n if (config.LOGROCKET_ID) {\r\n try {\r\n LogRocket.identify(profile.email);\r\n } catch (e) {}\r\n }\r\n localStorage.setItem('user', JSON.stringify(user));\r\n yield putResolve(actions.App.setUser(user));\r\n } catch (e) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('generic.actionErrorUnauthorized'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n}\r\n\r\nfunction* getSuperUserSaga() {\r\n try {\r\n const storageUser = getStorage('user') || {};\r\n\r\n const profile = camelizeKeys(decodeJWT(storageUser.idToken));\r\n let superUserData = [] as string[];\r\n\r\n // if (\r\n // config?.WHITELIST_DEV_NMEC.some((whiteNmec) => whiteNmec === parseInt(storageUser.nmec)) ||\r\n // config?.WHITELIST_DEV_EMAIL.some((whiteEmail) => whiteEmail === storageUser.email)\r\n // ) {\r\n // superUserData = ['FullAccess', 'ReadOnly'];\r\n // }\r\n\r\n let userRoles = getUserRoles(config.HARDCODED_ROLES || profile.groups, superUserData);\r\n\r\n //in case of some roles we need to get more information at RCU,\r\n //this cannot happen for every user so that the system doesn't have problems with many requests\r\n \r\n try {\r\n const rcuData = yield call(\r\n API.signin.getRcuGroups.call,\r\n profile.uAIUPI,\r\n storageUser.accessToken\r\n );\r\n\r\n rcuData.forEach((data) => {\r\n if (data.includes('SGA-PACO2-superUser-ReadOnly')) {\r\n superUserData.push('superUser_ReadOnly');\r\n }\r\n if (data.includes('SGA-PACO2-superUser-FullAccess')) {\r\n superUserData.push('superUser_FullAccess');\r\n }\r\n\r\n if (data.includes('SGA-PACO2-SecretariaVirtual-ReadOnly')) {\r\n superUserData.push('sec_superUser_ReadOnly');\r\n }\r\n if (data.includes('SGA-PACO2-SecretariaVirtual-FullAccess')) {\r\n superUserData.push('sec_superUser_FullAccess');\r\n }\r\n\r\n if (data.includes('SGA-PACO2-Horarios-ReadOnly')) {\r\n superUserData.push('sgh_superUser_ReadOnly');\r\n }\r\n if (data.includes('SGA-PACO2-Horarios-FullAccess')) {\r\n superUserData.push('sgh_superUser_FullAccess');\r\n }\r\n if (data.includes('SGA-PACO2-Pautas-FullAccess')) {\r\n superUserData.push('pautas_superUser_FullAccess');\r\n }\r\n if (data.includes('SGA-PACO2-Pautas-ReadOnly')) {\r\n superUserData.push('pautas_superUser_ReadOnly');\r\n }\r\n \r\n if (data.includes('STIC-PACO2-DEV-superUser-ReadOnly')) {\r\n superUserData.push('superUser_ReadOnly');\r\n }\r\n if (data.includes('STIC-PACO2-DEV-superUser-FullAccess')) {\r\n superUserData.push('superUser_FullAccess');\r\n }\r\n\r\n if (data.includes('STIC-PACO2-DEV-SecretariaVirtual-ReadOnly')) {\r\n superUserData.push('sec_superUser_ReadOnly');\r\n }\r\n if (data.includes('STIC-PACO2-DEV-SecretariaVirtual-FullAccess')) {\r\n superUserData.push('sec_superUser_FullAccess');\r\n }\r\n\r\n if (data.includes('STIC-PACO2-DEV-Horarios-ReadOnly')) {\r\n superUserData.push('sgh_superUser_ReadOnly');\r\n }\r\n if (data.includes('STIC-PACO2-DEV-Horarios-FullAccess')) {\r\n superUserData.push('sgh_superUser_FullAccess');\r\n }\r\n\r\n if (data.includes('STIC-PACO2-DEV-Pautas-FullAccess')) {\r\n superUserData.push('pautas_superUser_FullAccess');\r\n }\r\n if (data.includes('STIC-PACO2-DEV-Pautas-ReadOnly')) {\r\n superUserData.push('pautas_superUser_ReadOnly');\r\n }\r\n });\r\n\r\n userRoles = getUserRoles(config.HARDCODED_ROLES || profile.groups, superUserData);\r\n\r\n if (rcuData.some((group) => group.includes('Horarios-Pivot'))) {\r\n if (!userRoles.some((role) => role === 'nonProfessor')) {\r\n userRoles.push('nonProfessor');\r\n }\r\n }\r\n } catch (e) {}\r\n \r\n\r\n const newUser = {\r\n ...storageUser,\r\n roles: userRoles,\r\n };\r\n localStorage.setItem('user', JSON.stringify(newUser));\r\n\r\n yield putResolve(actions.App.setUser(newUser));\r\n } catch (e) {\r\n //do nothing if this fails. should not block app\r\n }\r\n}\r\n\r\nfunction* signoutSaga() {\r\n try {\r\n yield put(actions.App.setStartingApp(true));\r\n const { navigateTo } = actions.App;\r\n localStorage.removeItem('user');\r\n yield put(\r\n actions.App.setUser({\r\n name: '',\r\n roles: ['guest'],\r\n accessToken: '',\r\n scopes: [],\r\n })\r\n );\r\n yield* getApiTranslationsAndCheckRoutesSaga();\r\n yield put(navigateTo({ key: 'home' }));\r\n yield put(actions.App.setStartingApp(false));\r\n } catch (e) {}\r\n}\r\n\r\nfunction* impersonateUserSaga(action: IImpersonateUserSaga) {\r\n const studentNmec = action.payload;\r\n\r\n try {\r\n yield put(actions.App.setStartingApp(true));\r\n yield put(actions.StudentRegistrationDropdown.setRegistration(null));\r\n\r\n const storageUser = getStorage('user') || {};\r\n\r\n const newUser = {\r\n ...storageUser,\r\n impersonate: studentNmec,\r\n };\r\n localStorage.setItem('user', JSON.stringify(newUser));\r\n\r\n yield putResolve(actions.App.setUser(newUser));\r\n\r\n yield* getApiTranslationsAndCheckRoutesSaga();\r\n yield put(actions.App.setStartingApp(false));\r\n } catch (e) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('superuser.errorInvalidNmec'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n } finally {\r\n yield put(actions.App.setStartingApp(false));\r\n }\r\n}\r\n\r\nfunction* cleanImpersonateUserSaga() {\r\n try {\r\n yield put(actions.App.setStartingApp(true));\r\n const storageUser = getStorage('user') || {};\r\n\r\n const { impersonate, ...cleanImpersonate } = storageUser;\r\n const newUser = {\r\n ...cleanImpersonate,\r\n };\r\n\r\n localStorage.setItem('user', JSON.stringify(newUser));\r\n yield putResolve(actions.App.setUser(newUser));\r\n yield put(actions.App.navigateTo({ key: 'home' }));\r\n yield put(actions.App.setStartingApp(false));\r\n } catch (e) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('generic.actionErrorUnauthorized'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('App/onMount', onMountSaga);\r\n yield takeLatest('App/navigateTo', navigateToSaga);\r\n yield takeLatest('App/navigateBack', navigateBackSaga);\r\n yield takeLatest('App/changeLocale', changeLocaleSaga);\r\n yield takeLatest('App/toggleApiTranslationsEdit', toggleApiTranslationsEditSaga);\r\n yield takeLatest('App/updateApiTranslation', updateApiTranslationSaga);\r\n yield takeLatest('App/updateUserRole', updateUserRoleSaga);\r\n yield takeLatest('App/signout', signoutSaga);\r\n yield takeLatest('App/impersonateUser', impersonateUserSaga);\r\n yield takeLatest('App/cleanImpersonateUser', cleanImpersonateUserSaga);\r\n yield takeLatest('App/getApiTranslationsAndCheckRoutes', getApiTranslationsAndCheckRoutesSaga);\r\n}\r\n","/**\r\n * LogsStudent scene sagas\r\n *\r\n * @author Manuel Gil \r\n *\r\n */\r\n\r\nimport { takeLatest, put } from 'redux-saga/effects'\r\nimport { actions } from 'store/rootSlices';\r\n//import { actions } from 'store/rootSlices'\r\n\r\nfunction* onMountSaga() {\r\n yield put(actions.LogsStudent.setLoadingModule(false));\r\n}\r\n\r\nfunction* onUnmountSaga() {\r\n // IMPORTANT: we must return to the initial state\r\n\r\n yield put(actions.LogsStudent.setLoadingModule(true));\r\n}\r\n\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('LogsStudent/onMount', onMountSaga)\r\n yield takeLatest('LogsStudent/onUnmount', onUnmountSaga)\r\n}\r\n\r\n\r\n","/**\r\n * Logs scene sagas\r\n *\r\n * @author Manuel Gil \r\n *\r\n */\r\n\r\nimport { put, call, takeLatest } from 'redux-saga/effects';\r\nimport { actions } from 'store/rootSlices';\r\n//import { actions } from 'store/rootSlices'\r\n\r\nfunction* onMountSaga() {\r\n}\r\n\r\nfunction* onUnmountSaga() {\r\n // IMPORTANT: we must return to the initial state\r\n yield put(actions.Logs.setLoadingModule(true));\r\n}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('Logs/onMount', onMountSaga)\r\n yield takeLatest('Logs/onUnmount', onUnmountSaga)\r\n}\r\n\r\n\r\n","export enum GENERAL_ERROR_MESSAGE {\r\n INTERCEPTOR_LOGOUT = 'INTERCEPTOR_LOGOUT',\r\n BLACKLISTED_REQUEST = 'BLACKLISTED_REQUEST',\r\n ERR_INVALID_STUDENT = 'ERR_INVALID_STUDENT',\r\n ERR_STUDENT_INVALID_REGISTRATION = 'ERR_STUDENT_INVALID_REGISTRATION',\r\n ERR_SGH_SCHEDULE_MAX = 'ERR_SGH_SCHEDULE_MAX',\r\n ERR_INVALID_ACCESS = 'ERR_INVALID_ACCESS',\r\n}\r\n\r\n// grouped error message\r\nexport enum GENERAL_ERROR_MESSAGE_SERVER {\r\n ERR_SERVER = 'ERR_SERVER',\r\n ERR_FORBIDDEN_REQUEST = 'ERR_FORBIDDEN_REQUEST',\r\n ERR_WEBSERVICE_COMMUNICATION = 'ERR_WEBSERVICE_COMMUNICATION',\r\n ERR_GESDOC_FILE_NOT_FOUND = 'ERR_GESDOC_FILE_NOT_FOUND',\r\n ERR_GESDOC_COMMUNICATION = 'ERR_GESDOC_COMMUNICATION',\r\n ERR_UNKNOWN = 'ERR_UNKNOWN',\r\n ERR_SQLSERVER_DATA = 'ERR_SQLSERVER_DATA',\r\n ERR_SQLSERVER = 'ERR_SQLSERVER',\r\n}\r\n\r\n// grouped error message\r\nexport enum GENERAL_ERROR_MESSAGE_REQUEST {\r\n ERR_MISSING_PARAMETER = 'ERR_MISSING_PARAMETER',\r\n ERR_INVALID_PARAMETER = 'ERR_INVALID_PARAMETER',\r\n ERR_INVALID_TTL = 'ERR_INVALID_TTL',\r\n ERR_INVALID_TYPE = 'ERR_INVALID_TYPE',\r\n ERR_INVALID_LANG = 'ERR_INVALID_LANG',\r\n ERR_INVALID_TIMESTAMP = 'ERR_INVALID_TIMESTAMP',\r\n ERR_INVALID_REQUEST = 'ERR_INVALID_REQUEST',\r\n}\r\n\r\nexport enum PERSONAL_DATA_ERROR_MESSAGE {\r\n ERR_STUDENT_PHOTO_NOT_FOUND = 'ERR_STUDENT_PHOTO_NOT_FOUND',\r\n ERR_STUDENT_DOESNT_EXIST = 'ERR_STUDENT_DOESNT_EXIST'\r\n}\r\n\r\nexport enum APPLICATION_ERROR_MESSAGE {\r\n ERR_STUDENT_INVALID_APPLICATION = 'ERR_STUDENT_INVALID_APPLICATION',\r\n ERR_STUDENT_DUPLICATE_APPLICATION = 'ERR_STUDENT_DUPLICATE_APPLICATION',\r\n ERR_STUDENT_NO_APPLICATIONS = 'ERR_NO_APPLICATIONS',\r\n}\r\n\r\nexport enum PAYMENT_ERROR_MESSAGE {\r\n ERR_STUDENT_DUPLICATE_PAYMENT_METHOD = 'ERR_STUDENT_DUPLICATE_PAYMENT_METHOD',\r\n ERR_STUDENT_INVALID_PAYMENT = 'ERR_STUDENT_INVALID_PAYMENT',\r\n ERR_STUDENT_INVALID_DEBIT = 'ERR_STUDENT_INVALID_DEBIT',\r\n ERR_DEBT_DELETED = 'ERR_DEBT_DELETED',\r\n ERR_DEBT_PAID = 'ERR_DEBT_PAID',\r\n ERR_ASSOCIATED_DEBT_MBREF = 'ERR_ASSOCIATED_DEBT_MBREF',\r\n}\r\n\r\nexport enum CURRICULAR_PLAN_ERROR_MESSAGE {\r\n ERR_REGISTRATION_INVALID_UC = 'ERR_REGISTRATION_INVALID_UC',\r\n}\r\n\r\nexport enum GRADES_ERROR_MESSAGE {\r\n ERR_FORBIDDEN_PAUTA_REQUEST = 'ERR_FORBIDDEN_PAUTA_REQUEST',\r\n ERR_TEACHER_NOT_FOUND = 'ERR_TEACHER_NOT_FOUND',\r\n}\r\n\r\nexport enum CERTIFICATE_ERROR_MESSAGE{\r\n ERR_REGISTRATION_SUSPENDED_CERT = 'ERR_REGISTRATION_SUSPENDED_CERT',\r\n ERR_REGISTRATION_NOT_FINISHED_CERT = 'ERR_REGISTRATION_NOT_FINISHED_CERT',\r\n ERR_UNPAID_CERT_DEBTS = 'ERR_UNPAID_CERT_DEBTS',\r\n ERR_STUDENT_INVALID_CERTIFICATE = 'ERR_STUDENT_INVALID_CERTIFICATE',\r\n ERR_STUDENT_INVALID_CERTIFICATE_TYPE = 'ERR_STUDENT_INVALID_CERTIFICATE_TYPE',\r\n ERR_CERT_PAID = 'ERR_CERT_PAID',\r\n ERR_CERT_CANCELLED = 'ERR_CERT_CANCELLED',\r\n ERR_IDENTICAL_CERT_PROCESSING = 'ERR_IDENTICAL_CERT_PROCESSING',\r\n ERR_GRADE_FINAL_COURSE = 'ERR_GRADE_FINAL_COURSE',\r\n ERR_FINAL_COURSE_DOC_FINAL_MISSING = 'ERR_FINAL_COURSE_DOC_FINAL_MISSING',\r\n ERR_DEBT_DELETED = 'ERR_DEBT_DELETED',\r\n}\r\n","import { put } from 'redux-saga/effects';\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport { t } from 'app';\r\n\r\nimport {\r\n GENERAL_ERROR_MESSAGE,\r\n GENERAL_ERROR_MESSAGE_SERVER,\r\n GENERAL_ERROR_MESSAGE_REQUEST,\r\n GRADES_ERROR_MESSAGE,\r\n PAYMENT_ERROR_MESSAGE,\r\n CERTIFICATE_ERROR_MESSAGE,\r\n PERSONAL_DATA_ERROR_MESSAGE\r\n} from './errorMessages';\r\n\r\nexport default function* (err) {\r\n try {\r\n // front end error handling\r\n if (err.message === GENERAL_ERROR_MESSAGE.INTERCEPTOR_LOGOUT) {\r\n yield put(actions.App.signout());\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.general_expiredToken'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n return false;\r\n } else if (err.message === GENERAL_ERROR_MESSAGE.ERR_SGH_SCHEDULE_MAX) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.general_errSghScheduleMax'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n return false;\r\n } else if (err.message === GENERAL_ERROR_MESSAGE.ERR_INVALID_ACCESS) {\r\n yield put(actions.App.navigateBack());\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('superuser.errUnauthorizedAccess'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n return false;\r\n } else if (!err || !err.response || !err.response.data || !err.response.data.error_code) {\r\n console.log('ErrorHandler - unsupported error message format:', err);\r\n }\r\n\r\n // api error handling\r\n if (err.response.data.error_code === GENERAL_ERROR_MESSAGE.BLACKLISTED_REQUEST) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.general_blacklistedRequest'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n return false;\r\n } else if (err.response.data.error_code === GENERAL_ERROR_MESSAGE.ERR_INVALID_STUDENT) {\r\n yield put(actions.App.navigateTo({ key: 'home' }));\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.general_invalidStudent'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n return false;\r\n } else if (\r\n err.response.data.error_code === GENERAL_ERROR_MESSAGE.ERR_STUDENT_INVALID_REGISTRATION\r\n ) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.general_invalidRegistration'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n return false;\r\n } else if (err.response.data.error_code === GRADES_ERROR_MESSAGE.ERR_FORBIDDEN_PAUTA_REQUEST) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('pautas.invalidGrade'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n return false;\r\n } else if (err.response.data.error_code === GRADES_ERROR_MESSAGE.ERR_TEACHER_NOT_FOUND) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('pautas.teacherNotFound'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n return false;\r\n } else if (Object.values(GENERAL_ERROR_MESSAGE_SERVER).includes(err.response.data.error_code)) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.general_errorServer'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n yield put(actions.App.navigateTo({ key: 'pageServerError' }));\r\n return false;\r\n } else if (\r\n Object.values(GENERAL_ERROR_MESSAGE_REQUEST).includes(err.response.data.error_code)\r\n ) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.general_invalidRequest'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n return false;\r\n }\r\n\r\n //api payments error handling\r\n if (err.response.data.error_code === PAYMENT_ERROR_MESSAGE.ERR_DEBT_DELETED) {\r\n yield put(actions.App.navigateTo({ key: 'payments' }));\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t(`secVirtualNotifications.payments_${PAYMENT_ERROR_MESSAGE.ERR_DEBT_DELETED}`),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n return false;\r\n } else if (err.response.data.error_code === PAYMENT_ERROR_MESSAGE.ERR_DEBT_PAID) {\r\n yield put(actions.App.navigateTo({ key: 'payments' }));\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t(`secVirtualNotifications.payments_${PAYMENT_ERROR_MESSAGE.ERR_DEBT_PAID}`),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n return false;\r\n } else if (\r\n err.response.data.error_code === CERTIFICATE_ERROR_MESSAGE.ERR_REGISTRATION_SUSPENDED_CERT\r\n ) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t(\r\n `secVirtualNotifications.certs_${CERTIFICATE_ERROR_MESSAGE.ERR_REGISTRATION_SUSPENDED_CERT}`\r\n ),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n return false;\r\n } else if (\r\n err.response.data.error_code === CERTIFICATE_ERROR_MESSAGE.ERR_REGISTRATION_NOT_FINISHED_CERT\r\n ) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t(\r\n `secVirtualNotifications.certs_${CERTIFICATE_ERROR_MESSAGE.ERR_REGISTRATION_NOT_FINISHED_CERT}`\r\n ),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n return false;\r\n } else if (err.response.data.error_code === CERTIFICATE_ERROR_MESSAGE.ERR_UNPAID_CERT_DEBTS) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t(\r\n `secVirtualNotifications.certs_${CERTIFICATE_ERROR_MESSAGE.ERR_UNPAID_CERT_DEBTS}`\r\n ),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n return false;\r\n } else if (\r\n err.response.data.error_code === CERTIFICATE_ERROR_MESSAGE.ERR_STUDENT_INVALID_CERTIFICATE\r\n ) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t(\r\n `secVirtualNotifications.certs_${CERTIFICATE_ERROR_MESSAGE.ERR_STUDENT_INVALID_CERTIFICATE}`\r\n ),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n return false;\r\n } else if (\r\n err.response.data.error_code ===\r\n CERTIFICATE_ERROR_MESSAGE.ERR_STUDENT_INVALID_CERTIFICATE_TYPE\r\n ) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t(\r\n `secVirtualNotifications.certs_${CERTIFICATE_ERROR_MESSAGE.ERR_STUDENT_INVALID_CERTIFICATE_TYPE}`\r\n ),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n return false;\r\n } else if (err.response.data.error_code === CERTIFICATE_ERROR_MESSAGE.ERR_CERT_PAID) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t(`secVirtualNotifications.certs_${CERTIFICATE_ERROR_MESSAGE.ERR_CERT_PAID}`),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n return false;\r\n } else if (err.response.data.error_code === CERTIFICATE_ERROR_MESSAGE.ERR_CERT_CANCELLED) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t(`secVirtualNotifications.certs_${CERTIFICATE_ERROR_MESSAGE.ERR_CERT_CANCELLED}`),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n return false;\r\n } else if (\r\n err.response.data.error_code === CERTIFICATE_ERROR_MESSAGE.ERR_IDENTICAL_CERT_PROCESSING\r\n ) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t(\r\n `secVirtualNotifications.certs_${CERTIFICATE_ERROR_MESSAGE.ERR_IDENTICAL_CERT_PROCESSING}`\r\n ),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n return false;\r\n } else if (err.response.data.error_code === CERTIFICATE_ERROR_MESSAGE.ERR_GRADE_FINAL_COURSE) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t(\r\n `secVirtualNotifications.certs_${CERTIFICATE_ERROR_MESSAGE.ERR_GRADE_FINAL_COURSE}`\r\n ),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n return false;\r\n } else if (\r\n err.response.data.error_code === CERTIFICATE_ERROR_MESSAGE.ERR_FINAL_COURSE_DOC_FINAL_MISSING\r\n ) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t(\r\n `secVirtualNotifications.certs_${CERTIFICATE_ERROR_MESSAGE.ERR_FINAL_COURSE_DOC_FINAL_MISSING}`\r\n ),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n return false;\r\n } else if (err.response.data.error_code === CERTIFICATE_ERROR_MESSAGE.ERR_DEBT_DELETED) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t(`secVirtualNotifications.certs_${CERTIFICATE_ERROR_MESSAGE.ERR_DEBT_DELETED}`),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n return false;\r\n } else if (err.response.data.error_code === PAYMENT_ERROR_MESSAGE.ERR_ASSOCIATED_DEBT_MBREF) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t(\r\n `secVirtualNotifications.newPaymentRequest_${PAYMENT_ERROR_MESSAGE.ERR_ASSOCIATED_DEBT_MBREF}`\r\n ),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n return false;\r\n } else if (err.response.data.error_code === PERSONAL_DATA_ERROR_MESSAGE.ERR_STUDENT_DOESNT_EXIST) {\r\n yield put(actions.App.navigateTo({ key: 'home' }));\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t(\r\n `secVirtualNotifications.general_invalidStudent`\r\n ),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n } catch (e) {\r\n // Most likely some error in the code triggered the catch, as the\r\n // 'err' object is not well structured\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.general_exception'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n}\r\n","/**\r\n * ExamsCalendar scene sagas\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport { select, put, putResolve, call, takeLatest, debounce } from 'redux-saga/effects';\r\n\r\nimport { t } from 'app';\r\n\r\nimport API from 'api';\r\nimport { PayloadAction } from '@reduxjs/toolkit';\r\n\r\nimport { actions } from 'store/rootSlices';\r\nimport { reformatCalendarEvents } from '../utils';\r\nimport ErrorHandler from 'shared/errorHandler';\r\n\r\nimport * as selectors from './selectors';\r\n\r\nimport config from 'config';\r\n\r\nconst API_SEC_VIRTUAL = config.API_WSO2 + config.API_SEC_VIRTUAL_PATH;\r\n\r\nfunction* onMountSaga() {\r\n try {\r\n yield put(actions.ExamsCalendar.setLoadingExamsCalendar(true));\r\n yield putResolve(actions.StudentRegistrationDropdown.getRegistrations());\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.general_errorLoadingRegistrations'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nfunction* getExamCalendarSaga(action: PayloadAction) {\r\n yield put(\r\n actions.ExamsCalendar.setErrorStatus({\r\n fieldName: 'errLoadingCalendarData',\r\n fieldValue: false,\r\n })\r\n );\r\n\r\n try {\r\n const registrationId = yield select(selectors.getRegistration);\r\n\r\n if (!registrationId) {\r\n return;\r\n }\r\n\r\n const examsCalendarSlice = yield select(selectors.getExamsCalendarSlice);\r\n\r\n let calendarData = yield call(API.secVirtual.getExamCalendar.call, {\r\n registrationId: registrationId,\r\n ...examsCalendarSlice.filterParams,\r\n date: action.payload !== '' ? action.payload : undefined,\r\n });\r\n \r\n\r\n calendarData.filters = calendarData.filters.map((filter) => {\r\n return {\r\n key: filter,\r\n translation: t(`examsCalendar.${filter}`, { textOnly: true }),\r\n };\r\n });\r\n\r\n yield put(actions.ExamsCalendar.setCalendarFilterTypes(calendarData.filters));\r\n\r\n calendarData.file.url = API_SEC_VIRTUAL + calendarData.file.url;\r\n\r\n let calendarFile = yield call(\r\n API.secVirtual.getCalendarIcsFile.call,\r\n calendarData.file.url,\r\n registrationId\r\n );\r\n\r\n yield put(actions.ExamsCalendar.setCurrentICS(calendarFile));\r\n\r\n yield put(actions.ExamsCalendar.setEventsData(reformatCalendarEvents(calendarFile)));\r\n\r\n yield put(actions.ExamsCalendar.setLoadingExamsCalendar(false));\r\n yield put(actions.ExamsCalendar.setInitialCalendarDate(calendarData.dayOfFirstEvent));\r\n } catch (e) {\r\n yield put(\r\n actions.ExamsCalendar.setErrorStatus({\r\n fieldName: 'errLoadingCalendarData',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n const shouldRun = yield call(ErrorHandler, e);\r\n\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.calendar_errorLoadingPage'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nfunction* onUnmountSaga() {\r\n yield put(actions.ExamsCalendar.setReset());\r\n}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('ExamsCalendar/onMount', onMountSaga);\r\n yield debounce(500, 'ExamsCalendar/getExamCalendar', getExamCalendarSaga);\r\n yield takeLatest('ExamsCalendar/onUnmount', onUnmountSaga);\r\n}\r\n","/**\r\n * ApplicationDetails scene sagas\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { takeLatest, put, select, putResolve, call } from 'redux-saga/effects';\r\n\r\nimport { t } from 'app';\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './selectors';\r\nimport ErrorHandler from 'shared/errorHandler';\r\n\r\nimport { APPLICATION_ERROR_MESSAGE } from 'shared/errorMessages';\r\n\r\nimport API from 'api';\r\n\r\nimport { history, getCurrentRoute } from 'utils';\r\n\r\nfunction* onMountSaga() {\r\n yield put(actions.ApplicationDetails.reset());\r\n yield putResolve(actions.StudentRegistrationDropdown.getRegistrations());\r\n}\r\n\r\nfunction* getStatusAndDetailsSaga() {\r\n try {\r\n yield put(\r\n actions.ApplicationDetails.setLoadingStatus({ fieldName: 'loading', fieldValue: true })\r\n );\r\n yield put(\r\n actions.ApplicationDetails.setErrorStatus({ fieldName: 'errLoading', fieldValue: false })\r\n );\r\n\r\n const { pathname } = history.location;\r\n const registrationId = Number(pathname.split('/').slice(-2)[0]);\r\n const applicationId = getCurrentRoute().params.id;\r\n const { name, registrations } = yield select(selectors.getUser);\r\n\r\n const currentRegistration = registrations.find((registration) => {\r\n return registration.registrationId === registrationId;\r\n });\r\n\r\n const response = yield call(API.secVirtual.getApplicationDetails.call, {\r\n registrationId,\r\n applicationId,\r\n });\r\n\r\n // TODO: add documents\r\n const applicationStatement = {\r\n studentName: response.details.studentName,\r\n course: `${currentRegistration.courseCode} - ${currentRegistration.courseName}`,\r\n category: `${response.state.theme} - ${response.state.type}`,\r\n statement: response.details.exposition,\r\n documents: response.details.documents,\r\n applicationDocument: response.details.applicationDocument,\r\n };\r\n\r\n yield put(actions.ApplicationDetails.setStatus(response.state));\r\n yield put(actions.ApplicationDetails.setDetails(applicationStatement));\r\n } catch (e) {\r\n yield put(\r\n actions.ApplicationDetails.setErrorStatus({ fieldName: 'errLoading', fieldValue: true })\r\n );\r\n\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n if (\r\n e.response.data.error_code === APPLICATION_ERROR_MESSAGE.ERR_STUDENT_INVALID_APPLICATION\r\n ) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.applicationDetails_errorInvalidApplication'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n } else {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.applicationDetails_errorLoadingPage'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n } finally {\r\n yield put(\r\n actions.ApplicationDetails.setLoadingStatus({ fieldName: 'loading', fieldValue: false })\r\n );\r\n }\r\n}\r\n\r\nfunction* onUnmountSaga() {\r\n yield put(actions.ApplicationDetails.reset());\r\n}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('ApplicationDetails/onMount', onMountSaga);\r\n yield takeLatest('ApplicationDetails/onUnmount', onUnmountSaga);\r\n yield takeLatest('ApplicationDetails/getStatusAndDetails', getStatusAndDetailsSaga);\r\n}\r\n","/**\r\n * NewApplication scene sagas\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { takeLatest, call, put, putResolve, select } from 'redux-saga/effects';\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './selectors';\r\nimport { PayloadAction } from '@reduxjs/toolkit';\r\nimport _ from 'lodash';\r\n\r\nimport { IApplicationTypeData } from '../types';\r\nimport ErrorHandler from 'shared/errorHandler';\r\n\r\nimport { APPLICATION_ERROR_MESSAGE } from 'shared/errorMessages';\r\n\r\nimport API from 'api';\r\n\r\nimport { t } from 'app';\r\n\r\nimport { stringTemplateParser } from '../utils';\r\nimport { history } from 'utils';\r\n\r\nfunction* onMountSaga() {\r\n try {\r\n yield put(actions.NewApplication.resetPage());\r\n\r\n yield put(\r\n actions.NewApplication.setLoadingStatus({\r\n fieldName: 'loading',\r\n fieldValue: true,\r\n })\r\n );\r\n yield putResolve(actions.StudentRegistrationDropdown.getRegistrations());\r\n } catch (e) {\r\n yield put(\r\n actions.NewApplication.setErrorStatus({\r\n fieldName: 'errLoading',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.general_errorLoadingRegistrations'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n } finally {\r\n if (!history.location.state) {\r\n yield put(\r\n actions.NewApplication.setLoadingStatus({\r\n fieldName: 'loading',\r\n fieldValue: false,\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nfunction* setActiveRegistrationSaga() {\r\n const applicationData = yield select(selectors.getNewApplicationData);\r\n const registrations = yield select(selectors.getRegistrations);\r\n\r\n // check already the student active registration\r\n const activeRegistration = registrations?.find((reg) => reg.registrationState === 'activo');\r\n yield put(\r\n actions.NewApplication.setApplicationData({\r\n ...applicationData,\r\n registrationId: activeRegistration?.registrationId ?? null,\r\n })\r\n );\r\n}\r\n\r\nfunction* getApplicationTypesSaga(params?: any) {\r\n yield put(\r\n actions.NewApplication.setLoadingStatus({\r\n fieldName: 'tabLoading',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n try {\r\n const applicationData = yield select(selectors.getNewApplicationData);\r\n const registrationId = applicationData.registrationId;\r\n\r\n const applicationTypes: IApplicationTypeData = yield call(\r\n API.secVirtual.getApplicationTypes.call,\r\n {\r\n registrationId: registrationId,\r\n ...params?.payload,\r\n }\r\n );\r\n\r\n yield put(\r\n actions.NewApplication.setApplicationTypes({\r\n data: applicationTypes.data,\r\n filters: applicationTypes.filters,\r\n })\r\n );\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n\r\n if (shouldRun) {\r\n if (APPLICATION_ERROR_MESSAGE.ERR_STUDENT_NO_APPLICATIONS === e.response?.data?.error_code) {\r\n yield put(\r\n actions.NewApplication.setErrorStatus({\r\n fieldName: 'errNoApplications',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t(`secVirtualNotifications.newApplication_errorNoApplications`),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n\r\n yield put(\r\n actions.NewApplication.setLoadingStatus({\r\n fieldName: 'loading',\r\n fieldValue: false,\r\n })\r\n );\r\n } else {\r\n yield put(\r\n actions.NewApplication.setErrorStatus({\r\n fieldName: 'errLoadingApplicationList',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.newApplication_errorGetTypes'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n } finally {\r\n yield put(\r\n actions.NewApplication.setLoadingStatus({\r\n fieldName: 'tabLoading',\r\n fieldValue: false,\r\n })\r\n );\r\n }\r\n}\r\n\r\nfunction* getApplicationFormSaga() {\r\n yield put(\r\n actions.NewApplication.setLoadingStatus({\r\n fieldName: 'tabLoading',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n try {\r\n const applicationData = yield select(selectors.getNewApplicationData);\r\n\r\n const registrationId = applicationData.registrationId;\r\n\r\n const applicationForm = yield call(API.secVirtual.getApplicationForm.call, {\r\n registrationId,\r\n applicationId: applicationData.type.id,\r\n });\r\n\r\n yield put(\r\n actions.NewApplication.setApplicationData({\r\n ...applicationData,\r\n form: applicationForm,\r\n })\r\n );\r\n } catch (e) {\r\n yield put(\r\n actions.NewApplication.setErrorStatus({\r\n fieldName: 'errLoadingApplicationForm',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.newApplication_errorGetForm'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n } finally {\r\n yield put(\r\n actions.NewApplication.setLoadingStatus({\r\n fieldName: 'tabLoading',\r\n fieldValue: false,\r\n })\r\n );\r\n }\r\n}\r\n\r\nfunction* addDocumentToFormSchemaSaga(action: PayloadAction) {\r\n let newForm = _.cloneDeep(action.payload);\r\n\r\n if (newForm.additionalDocuments.values.length > 0) {\r\n for (let i = newForm.additionalDocuments.values.length; i > 0; i--) {\r\n let idFoundInUse = false;\r\n action.payload.additionalDocuments.values.forEach((doc, key) => {\r\n if (doc.nameKey === `otherDocuments${i}`) {\r\n idFoundInUse = true;\r\n }\r\n });\r\n\r\n const initialAdditionalDoc = action.payload.additionalDocuments.values.find(\r\n (item) => item.nameKey === 'otherDocuments'\r\n );\r\n\r\n if (!idFoundInUse) {\r\n newForm.additionalDocuments.values.push({\r\n ...initialAdditionalDoc,\r\n nameKey: `otherDocuments${i}`,\r\n //placeholderKey: 'otherDocumentsPlaceholder',\r\n });\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n yield put(actions.NewApplication.setFormSchema(newForm));\r\n}\r\n\r\nfunction* removeDocumentFromFormSchemaSaga(action: PayloadAction) {\r\n const form = action.payload.form;\r\n const docNamekey = action.payload.key;\r\n\r\n let newForm = _.cloneDeep(form);\r\n newForm.additionalDocuments.values = [];\r\n\r\n if (form.additionalDocuments.values.length > 0) {\r\n form.additionalDocuments.values.forEach((doc, key) => {\r\n if (doc.nameKey !== docNamekey) {\r\n newForm.additionalDocuments.values.push({\r\n ...doc,\r\n });\r\n }\r\n });\r\n }\r\n\r\n yield put(actions.NewApplication.setFormSchema(newForm));\r\n}\r\n\r\nfunction* submitApplicationSaga() {\r\n yield put(\r\n actions.NewApplication.setLoadingStatus({\r\n fieldName: 'loading',\r\n fieldValue: true,\r\n })\r\n );\r\n try {\r\n const { type, formValues, registrationId } = yield select(selectors.getNewApplicationData);\r\n const applicationTypeId = yield select(selectors.getApplicationTypeId);\r\n const registrationIdentifier = '' + registrationId;\r\n\r\n const getDocuments = () => {\r\n let mandatoryDocuments = [];\r\n let additionalDocuments = [];\r\n if (formValues.mandatoryDocuments && formValues.mandatoryDocuments.length) {\r\n mandatoryDocuments = formValues.mandatoryDocuments.map((document) => ({\r\n name: document.fileName,\r\n id: document.id,\r\n docTypeId: document?.docTypeId,\r\n }));\r\n }\r\n\r\n if (formValues.additionalDocuments && formValues.additionalDocuments.length) {\r\n additionalDocuments = formValues.additionalDocuments.map((document) => ({\r\n name: document.fileName,\r\n id: document.id,\r\n docTypeId: document?.docTypeId,\r\n }));\r\n }\r\n\r\n return [...mandatoryDocuments, ...additionalDocuments];\r\n };\r\n\r\n const data = {\r\n id: applicationTypeId,\r\n theme: type.theme,\r\n type: type.name,\r\n exposition: stringTemplateParser(\r\n formValues.statement,\r\n formValues.expoFields.reduce((acc, field) => {\r\n acc[field.nameKey] = field.value;\r\n return acc;\r\n }, {})\r\n ),\r\n observations: formValues.observations,\r\n documents: getDocuments(),\r\n };\r\n\r\n yield call(API.secVirtual.postApplicationForm.call, {\r\n registrationId: registrationIdentifier,\r\n data,\r\n });\r\n\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.newApplication_successSubmit'),\r\n icon: 'check',\r\n type: 'success',\r\n })\r\n );\r\n\r\n yield put(actions.App.navigateTo({ key: 'applicationslist' }));\r\n } catch (e) {\r\n yield put(\r\n actions.NewApplication.setErrorStatus({\r\n fieldName: 'errSubmittingForm',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n if (\r\n e.response.data.error_code === APPLICATION_ERROR_MESSAGE.ERR_STUDENT_DUPLICATE_APPLICATION\r\n ) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.newApplication_errorDuplicateApplication'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n } else {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.newApplication_errorSubmit'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n } finally {\r\n yield put(\r\n actions.NewApplication.setLoadingStatus({\r\n fieldName: 'loading',\r\n fieldValue: false,\r\n })\r\n );\r\n }\r\n}\r\n\r\nfunction* onUnmountSaga() {\r\n yield put(actions.NewApplication.resetPage());\r\n}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('NewApplication/onMount', onMountSaga);\r\n yield takeLatest('NewApplication/onUnmount', onUnmountSaga);\r\n yield takeLatest('NewApplication/getApplicationTypes', getApplicationTypesSaga);\r\n yield takeLatest('NewApplication/getApplicationForm', getApplicationFormSaga);\r\n yield takeLatest('NewApplication/submitApplication', submitApplicationSaga);\r\n yield takeLatest('NewApplication/addDocumentToFormSchema', addDocumentToFormSchemaSaga);\r\n yield takeLatest('NewApplication/removeDocumentFromFormSchema', removeDocumentFromFormSchemaSaga);\r\n yield takeLatest('NewApplication/setActiveRegistration', setActiveRegistrationSaga);\r\n}\r\n","/**\r\n * NewCertificate scene sagas\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { takeLatest, call, put, putResolve, select } from 'redux-saga/effects';\r\nimport { actions } from 'store/rootSlices';\r\nimport { t } from 'app';\r\n\r\nimport API from 'api';\r\nimport * as selectors from './selectors';\r\nimport { PayloadAction } from '@reduxjs/toolkit';\r\nimport { IDebitData } from 'scenes/VirtualSecretary/Payments/types';\r\n\r\nimport { getFinalResults } from '../utils';\r\n\r\nimport _ from 'lodash';\r\n\r\nimport ErrorHandler from 'shared/errorHandler';\r\n\r\nfunction* onMountSaga() {\r\n yield put(actions.NewCertificate.onLoadPage());\r\n}\r\n\r\nfunction* onLoadPageSaga() {\r\n try {\r\n yield put(\r\n actions.NewCertificate.setLoadingStatus({\r\n fieldName: 'loading',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n yield put(\r\n actions.NewCertificate.setErrorStatus({\r\n fieldName: 'errLoading',\r\n fieldValue: false,\r\n })\r\n );\r\n\r\n yield putResolve(actions.StudentRegistrationDropdown.getRegistrations());\r\n } catch (e) {\r\n yield put(\r\n actions.NewCertificate.setErrorStatus({\r\n fieldName: 'errLoading',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.general_errorLoadingRegistrations'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n } finally {\r\n yield put(\r\n actions.NewCertificate.setLoadingStatus({\r\n fieldName: 'tabLoading',\r\n fieldValue: false,\r\n })\r\n );\r\n\r\n yield put(\r\n actions.NewCertificate.setLoadingStatus({\r\n fieldName: 'loading',\r\n fieldValue: false,\r\n })\r\n );\r\n }\r\n}\r\n\r\nfunction* setActiveRegistrationSaga() {\r\n const certificateData = yield select(selectors.getNewCertificateSlice);\r\n const registrations = yield select(selectors.getRegistrations);\r\n\r\n // check already the student active registration\r\n const activeRegistration = registrations?.find((reg) => reg.registrationState === 'activo');\r\n yield put(\r\n actions.NewCertificate.setCertificateData({\r\n ...certificateData,\r\n registrationId: activeRegistration?.registrationId ?? null,\r\n })\r\n );\r\n}\r\n\r\nfunction* setCertificateDataSaga(action: PayloadAction) {\r\n /* let originalPayload: any = _.cloneDeep(action.payload);\r\n let radioBtnMappings = {} as any;\r\n\r\n\r\n yield put(actions.NewCertificate.setRadioBtnMappings(radioBtnMappings)); */\r\n\r\n yield put(actions.NewCertificate.setProcessedCertificateData(action.payload));\r\n}\r\n\r\nfunction* getCertificateTypesSaga(params?: any) {\r\n yield put(\r\n actions.NewCertificate.setLoadingStatus({\r\n fieldName: 'tabLoading',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n try {\r\n const newCertificateSlice = yield select(selectors.getNewCertificateSlice);\r\n\r\n const certificateTypes = yield call(API.secVirtual.getCertificateTypes.call, {\r\n registrationId: newCertificateSlice.certificateData.registrationId,\r\n ...params?.payload,\r\n });\r\n\r\n yield put(\r\n actions.NewCertificate.setCertificateTypes({\r\n data: certificateTypes.data,\r\n filters: certificateTypes.filters,\r\n })\r\n );\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.newCertificate_errorGetTypes'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n } finally {\r\n yield put(\r\n actions.NewCertificate.setLoadingStatus({\r\n fieldName: 'tabLoading',\r\n fieldValue: false,\r\n })\r\n );\r\n }\r\n}\r\n\r\nfunction* getCertificateFormSaga() {\r\n yield put(\r\n actions.NewCertificate.setLoadingStatus({\r\n fieldName: 'tabLoading',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n try {\r\n const newCertificateSlice = yield select(selectors.getNewCertificateSlice);\r\n\r\n const certificateForm = yield call(API.secVirtual.getCertificateForm.call, {\r\n registrationId: newCertificateSlice.certificateData.registrationId,\r\n certificateCode: newCertificateSlice.selectedCertificateType.id,\r\n });\r\n\r\n // create radio button mappings, substitue value, valueId and visibleIf fields\r\n\r\n // store the changed form in the slice\r\n\r\n //let originalPayload: any = _.cloneDeep(action.payload);\r\n let radioBtnMappings = {} as any;\r\n\r\n // store the pointers to the requestedCertificate and details fields of the certificateForm in an array, in order\r\n // to iterate over them\r\n let tmpCertificateForm = [certificateForm.requestedCertificate, certificateForm.details];\r\n\r\n tmpCertificateForm.forEach((item, index) => {\r\n if (item && item.values) {\r\n // first create mappings of radio button options value_ids and change the payoad radio button options value_ids accordingly\r\n item.values.forEach((formComp, index) => {\r\n if (formComp.type === 'radio_button') {\r\n formComp.values.forEach((radioBtnOpt, subindex) => {\r\n if (!radioBtnMappings[formComp.nameKey]) {\r\n radioBtnMappings[formComp.nameKey] = [radioBtnOpt.valueId];\r\n } else {\r\n radioBtnMappings[formComp.nameKey].push(radioBtnOpt.valueId);\r\n }\r\n\r\n item.values[index].values[subindex] = {\r\n ...radioBtnOpt,\r\n valueId: subindex,\r\n };\r\n });\r\n }\r\n });\r\n\r\n // update default value for each radio button list according to the mapping\r\n item.values.forEach((formComp, index) => {\r\n if (formComp.type === 'radio_button') {\r\n radioBtnMappings[formComp.nameKey].forEach((value: number, index: number) => {\r\n if (value === formComp.value) {\r\n formComp.value = index;\r\n return;\r\n }\r\n });\r\n }\r\n });\r\n\r\n // then, change the visible_if values referencing radio button values\r\n item.values.forEach((formComp, index) => {\r\n if (formComp.visibleIf) {\r\n formComp.visibleIf.forEach((visibleIfElem, subindex) => {\r\n Object.keys(visibleIfElem).forEach((elemKey, subsubindex) => {\r\n // if the current visible_if object property key is in the mappings => itś related to radio buttons\r\n if (radioBtnMappings[elemKey]) {\r\n // find mapped value, which corresponds to the position in the array of a property of radioBtnMappings\r\n let mappedValue = -1;\r\n radioBtnMappings[elemKey].forEach((value, index) => {\r\n if (value === visibleIfElem[elemKey]) {\r\n mappedValue = index;\r\n return; // end loop\r\n }\r\n });\r\n\r\n // set the appropriately mapped value\r\n item.values[index].visibleIf[subindex][elemKey] = mappedValue;\r\n }\r\n });\r\n });\r\n }\r\n });\r\n }\r\n });\r\n\r\n yield put(actions.NewCertificate.setRadioBtnMappings(radioBtnMappings));\r\n yield put(\r\n actions.NewCertificate.setCertificateData({\r\n ...newCertificateSlice.certificateData,\r\n form: certificateForm,\r\n })\r\n );\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.newCertificate_errorGetForm'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n } finally {\r\n yield put(\r\n actions.NewCertificate.setLoadingStatus({\r\n fieldName: 'tabLoading',\r\n fieldValue: false,\r\n })\r\n );\r\n }\r\n}\r\n\r\nfunction* addDocumentToFormSchemaSaga(action: PayloadAction) {\r\n let newForm = _.cloneDeep(action.payload);\r\n\r\n if (newForm.additionalDocuments.values.length > 0) {\r\n for (let i = newForm.additionalDocuments.values.length; i > 0; i--) {\r\n let idFoundInUse = false;\r\n action.payload.additionalDocuments.values.forEach((doc, key) => {\r\n if (doc.nameKey === `otherDocuments${i}`) {\r\n idFoundInUse = true;\r\n }\r\n });\r\n\r\n const initialAdditionalDoc = action.payload.additionalDocuments.values.find(\r\n (item) => item.nameKey === 'otherDocuments'\r\n );\r\n\r\n if (!idFoundInUse) {\r\n newForm.additionalDocuments.values.push({\r\n ...initialAdditionalDoc,\r\n nameKey: `otherDocuments${i}`,\r\n //placeholderKey: 'otherDocumentsPlaceholder',\r\n });\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n yield put(actions.NewCertificate.setFormSchema(newForm));\r\n}\r\n\r\nfunction* postCertificateChosenOptionsSaga(action: PayloadAction) {\r\n // update cost according to the selected options\r\n yield put(\r\n actions.NewCertificate.setLoadingStatus({\r\n fieldName: 'costLoading',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n const newCertificateSlice = yield select(selectors.getNewCertificateSlice);\r\n\r\n try {\r\n let body = {};\r\n\r\n if (\r\n action.payload.exemptionMotiveOther !== undefined &&\r\n action.payload.exemptionMotiveOther !== null\r\n ) {\r\n body = {\r\n ...action.payload,\r\n exemptionMotive: `${action.payload.exemptionMotive}: ${action.payload.exemptionMotiveOther}`,\r\n numberCopies: action.payload.pageCounter,\r\n deliveryMethod: action.payload.deliveryMethod,\r\n };\r\n } else {\r\n body = {\r\n ...action.payload,\r\n exemptionMotive: action.payload.exemptionMotive,\r\n numberCopies: action.payload.pageCounter,\r\n deliveryMethod: action.payload.deliveryMethod,\r\n };\r\n }\r\n\r\n const selectedRegistrationId = newCertificateSlice.certificateData.registrationId;\r\n\r\n const processeBody = {\r\n certTypeId: newCertificateSlice.selectedCertificateType.id,\r\n withExemption: Boolean(body['exemption']),\r\n formatId: body['format'] || 0,\r\n deliveryMethodId: body['deliveryMethod'],\r\n numberCopies: body['numberCopies'],\r\n postalCode: body['postalCode'],\r\n ucsCodes:\r\n body['ucs_codes']\r\n ?.filter((uc) => {\r\n if (uc.isAvailable === undefined) return true;\r\n if (uc.isAvailable === true) return true;\r\n return false;\r\n })\r\n .map((uc) => uc.ucCode) ?? [],\r\n };\r\n\r\n if (processeBody.formatId !== undefined && processeBody.formatId !== null) {\r\n const totalCosts = yield call(\r\n API.secVirtual.postCertificateOptions.call,\r\n processeBody,\r\n selectedRegistrationId\r\n );\r\n\r\n yield put(actions.NewCertificate.setCertificateCosts(totalCosts));\r\n }\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.newCertificate_errorGetCost'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n } finally {\r\n yield put(\r\n actions.NewCertificate.setLoadingStatus({\r\n fieldName: 'costLoading',\r\n fieldValue: false,\r\n })\r\n );\r\n }\r\n}\r\n\r\nfunction* removeDocumentFromFormSchemaSaga(action: PayloadAction) {\r\n const form = action.payload.form;\r\n const docNamekey = action.payload.key;\r\n\r\n let newForm = _.cloneDeep(form);\r\n newForm.additionalDocuments.values = [];\r\n\r\n if (form.additionalDocuments.values.length > 0) {\r\n form.additionalDocuments.values.forEach((doc, key) => {\r\n if (doc.nameKey !== docNamekey) {\r\n newForm.additionalDocuments.values.push({\r\n ...doc,\r\n });\r\n }\r\n });\r\n }\r\n\r\n yield put(actions.NewCertificate.setFormSchema(newForm));\r\n}\r\n\r\nfunction* submitCertificateSaga(action: PayloadAction) {\r\n // submit filled form\r\n try {\r\n //const registrationId = yield select(selectors.getRegistrationId);\r\n const newCertificateSlice = yield select(selectors.getNewCertificateSlice);\r\n const selectedRegistrationId = newCertificateSlice.certificateData.registrationId;\r\n\r\n const {\r\n certificateData,\r\n certificateOptions,\r\n selectedCertificateType,\r\n payNow,\r\n isExempt,\r\n } = action.payload;\r\n\r\n yield put(\r\n actions.NewCertificate.setLoadingSubmission({\r\n payNow: true,\r\n payLater: true,\r\n })\r\n );\r\n\r\n let formChosenOptions = getFinalResults(\r\n certificateData.form,\r\n certificateOptions,\r\n newCertificateSlice.radioBtnMappings\r\n );\r\n\r\n // if (formChosenOptions) {\r\n // formChosenOptions['documents'] = undefined;\r\n // }\r\n\r\n const body = {\r\n theme: selectedCertificateType.theme,\r\n type: selectedCertificateType.name,\r\n code: selectedCertificateType.code,\r\n certTypeId: selectedCertificateType.id,\r\n details: {\r\n ...formChosenOptions,\r\n deliveryMethod: formChosenOptions?.deliveryMethod,\r\n exemption:\r\n formChosenOptions?.exemption && formChosenOptions?.exemption !== 'withoutExemption'\r\n ? true\r\n : false,\r\n email: formChosenOptions?.email?.alternativeEmail,\r\n exemptionMotive: formChosenOptions?.exemptionMotive,\r\n exemptionOtherText: formChosenOptions?.exemptionMotiveOther,\r\n numberCopies: formChosenOptions?.pageCounter ? formChosenOptions?.pageCounter : null,\r\n ucsCodes: formChosenOptions?.ucs_codes?.map((uc) => uc.ucCode),\r\n },\r\n documents: formChosenOptions?.documents ? formChosenOptions.documents : [],\r\n };\r\n\r\n let foundYear;\r\n let ucCodesObjectsList = [] as any;\r\n\r\n certificateData.form.requestedCertificate.values?.forEach((field) => {\r\n if (!foundYear && field.type === 'checkbox_table') {\r\n Object.keys(certificateOptions).forEach((namekey) => {\r\n if (field.nameKey === namekey) {\r\n foundYear = namekey;\r\n }\r\n });\r\n\r\n if (foundYear) {\r\n field.values.forEach((item) => {\r\n if (body.details['ucs_codes'].map((uc) => uc.ucCode).includes(item.valueId)) {\r\n ucCodesObjectsList.push({\r\n schoolYear: item.nameKey.academicYear.split('/')[0], //foundYear.split('/')[0],\r\n ucCode: item.nameKey.ucCode,\r\n semester: item.nameKey.semester,\r\n });\r\n }\r\n });\r\n }\r\n }\r\n });\r\n\r\n body.details['ucs'] = ucCodesObjectsList;\r\n\r\n const response = yield call(\r\n API.secVirtual.postCertificateForm.call,\r\n body,\r\n selectedRegistrationId\r\n );\r\n\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.newCertificate_successSubmit'),\r\n icon: 'check',\r\n type: 'success',\r\n })\r\n );\r\n\r\n yield putResolve(actions.NewCertificate.setCertificateSubmitted(true));\r\n\r\n console.log(response);\r\n\r\n if (response?.goApplication) {\r\n yield put(\r\n actions.App.navigateTo({\r\n key: 'applicationslist',\r\n })\r\n );\r\n } else if (!payNow || isExempt) {\r\n yield put(\r\n actions.App.navigateTo({\r\n key: 'certificatesdetails',\r\n params: {\r\n certificateId: response.certificateId,\r\n registrationId: selectedRegistrationId,\r\n },\r\n })\r\n );\r\n } else {\r\n const certificateDetails = yield call(\r\n API.secVirtual.getCertificatesDetails.call,\r\n response.certificateId,\r\n selectedRegistrationId\r\n );\r\n const certificatePaymentData = [certificateDetails.payment.debit] as IDebitData[];\r\n\r\n yield put(actions.Payments.setPreSelectedDebits(certificatePaymentData));\r\n yield put(actions.Payments.setSelectedDebits(certificatePaymentData));\r\n\r\n yield put(\r\n actions.App.navigateTo({\r\n key: 'pendingDebitsPayment',\r\n state: selectedRegistrationId,\r\n })\r\n );\r\n }\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.newCertificate_errorSubmit'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n } finally {\r\n yield put(\r\n actions.NewCertificate.setLoadingSubmission({\r\n payNow: false,\r\n payLater: false,\r\n })\r\n );\r\n }\r\n}\r\n\r\nfunction* onUnmountSaga() {\r\n yield put(actions.NewCertificate.resetPage());\r\n}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('NewCertificate/onMount', onMountSaga);\r\n yield takeLatest('NewCertificate/onUnmount', onUnmountSaga);\r\n yield takeLatest('NewCertificate/getCertificateTypes', getCertificateTypesSaga);\r\n yield takeLatest('NewCertificate/getCertificateForm', getCertificateFormSaga);\r\n yield takeLatest('NewCertificate/submitCertificate', submitCertificateSaga);\r\n yield takeLatest('NewCertificate/postCertificateChosenOptions', postCertificateChosenOptionsSaga);\r\n yield takeLatest('NewCertificate/addDocumentToFormSchema', addDocumentToFormSchemaSaga);\r\n yield takeLatest('NewCertificate/removeDocumentFromFormSchema', removeDocumentFromFormSchemaSaga);\r\n yield takeLatest('NewCertificate/onLoadPage', onLoadPageSaga);\r\n yield takeLatest('NewCertificate/setCertificateData', setCertificateDataSaga);\r\n yield takeLatest('NewCertificate/setActiveRegistration', setActiveRegistrationSaga);\r\n}\r\n","/**\r\n * RegistrationDetails scene sagas\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { takeLatest, call, put, putResolve } from 'redux-saga/effects';\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport API from 'api';\r\nimport { t } from 'app';\r\n\r\nimport ErrorHandler from 'shared/errorHandler';\r\n\r\nimport { getCurrentRoute } from 'utils';\r\n\r\nfunction* onMountSaga() {\r\n yield put(actions.RegistrationDetails.setLoading(true));\r\n yield putResolve(actions.StudentRegistrationDropdown.getRegistrations());\r\n\r\n yield call(getRegistrationSaga);\r\n}\r\n\r\nfunction* getRegistrationSaga() {\r\n try {\r\n yield put(\r\n actions.RegistrationDetails.setErrorStatus({\r\n fieldName: 'errorRegistrationDetails',\r\n fieldValue: false,\r\n })\r\n );\r\n\r\n const registrationId = getCurrentRoute().params.id;\r\n\r\n const registrationDetails = yield call(API.secVirtual.getRegistration.call, {\r\n registrationId: registrationId,\r\n });\r\n\r\n const registrationGeneralInfo = {\r\n accessScheme: registrationDetails.accessScheme,\r\n courseCode: registrationDetails.courseCode,\r\n courseName: registrationDetails.courseName,\r\n id: registrationDetails.id,\r\n registrationDate: registrationDetails.registrationDate,\r\n registrationAcademicYear: registrationDetails.registrationAcademicYear,\r\n registrationStatus: registrationDetails.registrationStatus,\r\n academicYear: registrationDetails.academicYear,\r\n typology: registrationDetails.typology,\r\n };\r\n\r\n yield put(actions.RegistrationDetails.setEligibility(registrationDetails.eligibility));\r\n yield put(actions.RegistrationDetails.setHistory(registrationDetails.history));\r\n yield put(actions.RegistrationDetails.setScholarship(registrationDetails.scholarship));\r\n yield put(actions.RegistrationDetails.setRegistrationGeneralInfo(registrationGeneralInfo));\r\n\r\n yield put(actions.RegistrationDetails.setLoading(false));\r\n } catch (e) {\r\n yield put(\r\n actions.RegistrationDetails.setErrorStatus({\r\n fieldName: 'errorRegistrationDetails',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n const shouldRun = yield call(ErrorHandler, e);\r\n\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.registrationDetails_errorLoadingPage'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nfunction* onUnmountSaga() {\r\n yield put(actions.RegistrationDetails.reset());\r\n}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('RegistrationDetails/onMount', onMountSaga);\r\n yield takeLatest('RegistrationDetails/onUnmount', onUnmountSaga);\r\n}\r\n","/**\r\n * Registration scene sagas\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { takeLatest, call, put, putResolve } from 'redux-saga/effects';\r\nimport { actions } from 'store/rootSlices';\r\nimport ErrorHandler from 'shared/errorHandler';\r\n\r\nimport { t } from 'app';\r\n\r\nfunction* onMountSaga() {\r\n try {\r\n yield put(actions.Registrations.setLoading(true));\r\n\r\n yield put(\r\n actions.Registrations.setErrorStatus({\r\n fieldName: 'errLoadingRegistrations',\r\n fieldValue: false,\r\n })\r\n );\r\n\r\n yield putResolve(actions.StudentRegistrationDropdown.getRegistrations());\r\n\r\n yield put(actions.Registrations.setLoading(false));\r\n } catch (e) {\r\n yield put(\r\n actions.Registrations.setErrorStatus({\r\n fieldName: 'errLoadingRegistrations',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n const shouldRun = yield call(ErrorHandler, e);\r\n\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.general_errorLoadingRegistrations', { textOnly: true }),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nfunction* onUnmountSaga() {\r\n yield put(actions.Registrations.reset());\r\n}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('Registrations/onMount', onMountSaga);\r\n yield takeLatest('Registrations/onUnmount', onUnmountSaga);\r\n}\r\n","/**\r\n * SeriationHistory scene sagas\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { call, put, putResolve, takeLatest } from 'redux-saga/effects';\r\n\r\nimport API from 'api';\r\n\r\nimport { t } from 'app';\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport ErrorHandler from 'shared/errorHandler';\r\n\r\nimport { getCurrentRoute } from 'utils';\r\n\r\ninterface IGetSeriationResults {\r\n type: 'SeriationHistory/getSeriationResult';\r\n payload: {\r\n registrationId: number;\r\n phase?: number;\r\n };\r\n}\r\n\r\nfunction* onMountSaga() {\r\n try {\r\n yield put(actions.SeriationHistory.setLoading(true));\r\n yield putResolve(actions.StudentRegistrationDropdown.getRegistrations());\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(actions.Schedules.setRestriction(true));\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionErrorGetSeriationHistory'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nfunction* getSeriationHistoryResultsSaga(action: IGetSeriationResults) {\r\n try {\r\n yield put(actions.SeriationHistory.setLoading(true));\r\n\r\n let { registrationId, phase } = action.payload;\r\n\r\n let response;\r\n\r\n let scheduleName = null;\r\n let allocationProb = null;\r\n let seriationDate = null;\r\n let seriationId = null;\r\n let finalSeriation = null;\r\n\r\n if (getCurrentRoute().route.key === 'provisoryseriationhistory') {\r\n const id = getCurrentRoute().params.id;\r\n response = yield call(API.sgh.getHistory.call, {\r\n registrationId: registrationId,\r\n phase: id,\r\n final: false,\r\n });\r\n\r\n allocationProb = response?.history?.[0]?.schedules?.[0]?.allocationProb || null;\r\n seriationDate = response?.history?.[0]?.schedules?.[0]?.seriationDate || null;\r\n seriationId = response?.history?.[0]?.seriationId || null;\r\n finalSeriation = response?.history?.[0]?.final;\r\n\r\n scheduleName = response?.history?.[0]?.schedules?.[0]?.name;\r\n const currentPhaseName = `${t('sgh.phase', { textOnly: true })} ${response?.currentPhase}`;\r\n\r\n yield put(\r\n actions.Breadcrumb.overridePath({\r\n key: 'provisoryseriationhistory',\r\n name: t('sgh.provisorySeriationHistoryDetailOff', {\r\n what: `${currentPhaseName}`,\r\n }),\r\n })\r\n );\r\n } else if (getCurrentRoute().route.key === 'provisoryscheduleseriationhistory') {\r\n const id =\r\n getCurrentRoute().params.id === 'null' ? null : Number(getCurrentRoute().params.id);\r\n\r\n response = yield call(API.sgh.getHistory.call, {\r\n registrationId: registrationId,\r\n final: false,\r\n scheduleId: id,\r\n });\r\n\r\n allocationProb = response?.history?.[0]?.schedules?.[0]?.allocationProb || null;\r\n seriationDate = response?.history?.[0]?.schedules?.[0]?.seriationDate || null;\r\n seriationId = response?.history?.[0]?.seriationId || null;\r\n finalSeriation = response?.history?.[0]?.final;\r\n\r\n scheduleName = response?.history?.[0]?.schedules?.[0]?.name;\r\n const currentPhaseName = `${t('sgh.phase', { textOnly: true })} ${response?.currentPhase}`;\r\n\r\n yield put(\r\n actions.Breadcrumb.overridePath({\r\n key: 'provisoryscheduleseriationhistory',\r\n name: t('sgh.provisoryScheduleSeriationHistory', {\r\n what: `${currentPhaseName}`,\r\n }),\r\n })\r\n );\r\n } else if (getCurrentRoute().route.key === 'seriationhistory') {\r\n response = yield call(API.sgh.getHistory.call, {\r\n registrationId: registrationId,\r\n final: true,\r\n phase: phase,\r\n current: phase === undefined || phase === null ? true : undefined,\r\n });\r\n\r\n if (!phase) {\r\n if (response.filters.length > 0) {\r\n phase = response.filters[0];\r\n if (!response.seriationFinished) {\r\n if (response.filters.length > 1) {\r\n phase = response.currentPhase;\r\n }\r\n }\r\n } else {\r\n phase = response.currentPhase;\r\n }\r\n }\r\n\r\n allocationProb = response?.history?.[0]?.schedules?.[0]?.allocationProb || null;\r\n seriationDate = response?.history?.[0]?.schedules?.[0]?.seriationDate || null;\r\n seriationId = response?.history?.[0]?.seriationId || null;\r\n finalSeriation = response?.history?.[0]?.final;\r\n\r\n yield put(\r\n actions.Breadcrumb.overridePath({\r\n key: 'seriationhistory',\r\n name: t('sgh.seriationHistoryBreadcrumb'),\r\n })\r\n );\r\n }\r\n\r\n yield putResolve(\r\n actions.SeriationHistory.setSeriationHistoryResults(\r\n response?.history.reduce((acc, historyItem) => {\r\n if (historyItem?.schedules && !!historyItem.schedules.length) {\r\n return [...acc, ...historyItem.schedules];\r\n }\r\n return acc;\r\n }, []) || []\r\n )\r\n );\r\n\r\n yield put(\r\n actions.SeriationHistory.setCurrentDetails({\r\n currentYear: response.year,\r\n currentScheduleName: scheduleName,\r\n allocationProb: allocationProb,\r\n seriationDate: seriationDate,\r\n seriationId: seriationId,\r\n currentSemester: response.semester,\r\n phaseFilterList: response.filters,\r\n currentPhase: phase || response.currentPhase,\r\n finalSeriation: finalSeriation,\r\n })\r\n );\r\n\r\n yield put(actions.SeriationHistory.setCurrentSelectedPhase(phase || response.currentPhase));\r\n\r\n yield put(actions.SeriationHistory.setLoading(false));\r\n } catch (e) {\r\n if (e && e.response && e.response.data && e.response.data.err_code === 'ERR_INVALID_SCHEDULE') {\r\n yield put(actions.SeriationHistory.setIsScheduleInvalid(true));\r\n yield put(actions.SeriationHistory.setLoading(false));\r\n } else {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionErrorGetSeriationHistory'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n }\r\n}\r\n\r\nfunction* onUnmountSaga() {\r\n yield put(actions.SeriationHistory.reset());\r\n}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('SeriationHistory/onMount', onMountSaga);\r\n yield takeLatest('SeriationHistory/onUnmount', onUnmountSaga);\r\n yield takeLatest('SeriationHistory/getSeriationHistoryResults', getSeriationHistoryResultsSaga);\r\n}\r\n","/**\r\n * SeriationHistoryDetails scene sagas\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { call, put, putResolve, takeLatest, select } from 'redux-saga/effects';\r\n\r\nimport API from 'api';\r\n\r\nimport { t } from 'app';\r\n\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './selectors';\r\n\r\nimport ErrorHandler from 'shared/errorHandler';\r\n\r\nimport { getCurrentRoute } from 'utils';\r\n\r\nfunction* onMountSaga() {\r\n try {\r\n yield put(actions.SeriationHistoryDetails.setLoading(true));\r\n yield putResolve(actions.StudentRegistrationDropdown.getRegistrations());\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(actions.Schedules.setRestriction(true));\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionErrorGetSeriationHistory'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nfunction* getSeriationHistoryDetailsSaga() {\r\n try {\r\n yield put(actions.SeriationHistoryDetails.setLoading(true));\r\n const registrationId = yield select(selectors.getRegistration);\r\n\r\n let response;\r\n const phaseName = getCurrentRoute().params.id;\r\n const seriationId = getCurrentRoute().params.seriationId;\r\n\r\n if (getCurrentRoute().route.key === 'seriationhistorydetails') {\r\n response = yield call(API.sgh.getHistoryDetails.call, {\r\n registrationId: registrationId,\r\n phase: phaseName,\r\n final: true,\r\n seriationId: seriationId,\r\n });\r\n\r\n if (response) {\r\n yield put(actions.SeriationHistoryDetails.setSeriationDate(response?.seriationDate));\r\n yield put(actions.SeriationHistoryDetails.setRanking(response?.ranking));\r\n\r\n if (response?.log) {\r\n yield put(actions.SeriationHistoryDetails.setLog(response?.log.split('\\n')));\r\n }\r\n yield put(actions.SeriationHistoryDetails.setLoading(false));\r\n }\r\n } else if (getCurrentRoute().route.key === 'provisoryseriationhistorydetails') {\r\n response = yield call(API.sgh.getHistoryDetails.call, {\r\n registrationId: registrationId,\r\n phase: phaseName,\r\n final: false,\r\n seriationId: seriationId,\r\n });\r\n\r\n if (response) {\r\n yield put(actions.SeriationHistoryDetails.setSeriationDate(response.seriationDate));\r\n yield put(actions.SeriationHistoryDetails.setRanking(response.ranking));\r\n yield put(actions.SeriationHistoryDetails.setLog(response.log.split('\\n')));\r\n yield put(actions.SeriationHistoryDetails.setLoading(false));\r\n }\r\n }\r\n\r\n if (!response) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionNoSeriationHistoryDetails'),\r\n icon: 'info',\r\n type: 'info',\r\n })\r\n );\r\n }\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionErrorGetSeriationHistory'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nfunction* onUnmountSaga() {\r\n yield put(actions.SeriationHistoryDetails.reset());\r\n}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('SeriationHistoryDetails/onMount', onMountSaga);\r\n yield takeLatest('SeriationHistoryDetails/onUnmount', onUnmountSaga);\r\n yield takeLatest(\r\n 'SeriationHistoryDetails/getSeriationHistoryDetails',\r\n getSeriationHistoryDetailsSaga\r\n );\r\n}\r\n","/**\r\n * FreeOptionsDropdown container sagas\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport { call, put, takeLatest } from 'redux-saga/effects';\r\n\r\nimport { t } from 'app';\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport ErrorHandler from 'shared/errorHandler';\r\n\r\nimport { getSelectedOptionKey } from '../utils';\r\n\r\ninterface ISetFreeOptions {\r\n type: 'FreeOptionsDropdown/setFreeOptions';\r\n payload: { ucs: any[]; options: { name: string; id: number }[] };\r\n}\r\n\r\nfunction* setFreeOptionsSaga(action: ISetFreeOptions) {\r\n const payload = action.payload;\r\n\r\n try {\r\n const { setOptions } = actions.FreeOptionsDropdown;\r\n\r\n const options = payload.ucs.map((option, index) => {\r\n let selectedOptionKey = getSelectedOptionKey(option);\r\n\r\n return {\r\n id: index + 1,\r\n optionId: option.id,\r\n selected: selectedOptionKey,\r\n //if editing is called group else is name\r\n name: option.groupName || option.name,\r\n irregular: option.irregular,\r\n open: selectedOptionKey ? true : false,\r\n ucs: option.ucs,\r\n };\r\n });\r\n\r\n yield put(setOptions(options));\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n\r\n if (shouldRun) {\r\n const { showToaster } = actions.Toaster;\r\n yield put(\r\n showToaster({\r\n title: t('sgh.actionErrorGetFreeOptions'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('FreeOptionsDropdown/setFreeOptions', setFreeOptionsSaga);\r\n}\r\n","/**\r\n * StudentRegistrationDropdown container sagas\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport { call, takeLatest, put, putResolve, select, cancel } from 'redux-saga/effects';\r\n\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport { t } from 'app';\r\nimport { getCurrentRoute } from 'utils';\r\n\r\nimport API from 'api';\r\n\r\nimport * as selectors from './selectors';\r\n\r\nimport ErrorHandler from 'shared/errorHandler';\r\n\r\nfunction* getRegistrationsSaga() {\r\n try {\r\n const service = getCurrentRoute()?.route?.module?.service || null;\r\n const user = yield select(selectors.getUser);\r\n const registrationId = yield select(selectors.getRegistration);\r\n\r\n yield put(actions.StudentRegistrationDropdown.setLoadingRestriction(true));\r\n\r\n const registrations = yield call(API.student.getRegistrations.call, {\r\n service,\r\n user,\r\n });\r\n \r\n if(registrations.length === 0){\r\n yield put(actions.StudentRegistrationDropdown.setLoadingRestriction(false));\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('generic.errorSuspendedRegistration'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n yield putResolve(actions.App.navigateTo({ key: 'home' }));\r\n }\r\n \r\n \r\n const sameItems =\r\n user?.registrations &&\r\n registrations.every((fetchedRegistration) =>\r\n user.registrations.some(\r\n (userRegistration) =>\r\n userRegistration.registrationId === fetchedRegistration.registrationId\r\n )\r\n ) &&\r\n user.registrations.every((userRegistration) =>\r\n registrations.some(\r\n (fetchedRegistration) =>\r\n userRegistration.registrationId === fetchedRegistration.registrationId\r\n )\r\n );\r\n\r\n if (registrations && registrations.length > 0 && !sameItems && registrationId === null) {\r\n yield putResolve(\r\n actions.StudentRegistrationDropdown.setRegistration(registrations[0].registrationId)\r\n );\r\n }\r\n\r\n yield putResolve(actions.App.setUser({ ...user, registrations }));\r\n\r\n yield put(actions.StudentRegistrationDropdown.setLoadingRestriction(false));\r\n \r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('generic.errorRegistrations'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('StudentRegistrationDropdown/getRegistrations', getRegistrationsSaga);\r\n}\r\n","/**\r\n * ApplicationsList scene sagas\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport { takeLatest, put, putResolve, select, call } from 'redux-saga/effects';\r\n\r\nimport { actions } from 'store/rootSlices';\r\nimport ErrorHandler from 'shared/errorHandler';\r\nimport { t } from 'app';\r\nimport * as selectors from './selectors';\r\n\r\nimport API from 'api';\r\n\r\nfunction* onMountSaga() {\r\n try {\r\n yield put(actions.ApplicationsList.reset());\r\n\r\n yield putResolve(actions.StudentRegistrationDropdown.getRegistrations());\r\n } catch (e) {\r\n yield put(\r\n actions.ApplicationsList.setErrorStatus({ fieldName: 'errLoading', fieldValue: true })\r\n );\r\n\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.general_errorLoadingRegistrations'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nfunction* onUnmountSaga() {\r\n yield put(actions.ApplicationsList.setReset());\r\n}\r\n\r\nfunction* getStudentApplicationsSaga(params?: any) {\r\n try {\r\n yield put(\r\n actions.ApplicationsList.setLoadingStatus({ fieldName: 'loadingList', fieldValue: true })\r\n );\r\n yield put(\r\n actions.ApplicationsList.setErrorStatus({ fieldName: 'errLoadingList', fieldValue: false })\r\n );\r\n\r\n const registrationId = yield select(selectors.getRegistrationId);\r\n\r\n const response = yield call(API.secVirtual.getStudentApplications.call, {\r\n registrationId,\r\n ...params?.payload,\r\n });\r\n\r\n const studentApplications = response.data.map((application) => {\r\n return {\r\n id: application.id,\r\n category: application.theme,\r\n description: application.type,\r\n requestDate: application.requestDate,\r\n responseDate: application.responseDate,\r\n status: application.state,\r\n reference : application.ref\r\n };\r\n });\r\n\r\n yield put(actions.ApplicationsList.setStudentApplications(studentApplications));\r\n\r\n yield put(actions.ApplicationsList.setApplicationFilters(response.filters));\r\n\r\n yield put(\r\n actions.ApplicationsList.setLoadingStatus({ fieldName: 'loading', fieldValue: false })\r\n );\r\n\r\n yield put(\r\n actions.ApplicationsList.setLoadingStatus({ fieldName: 'loadingList', fieldValue: false })\r\n );\r\n } catch (e) {\r\n yield put(\r\n actions.ApplicationsList.setErrorStatus({ fieldName: 'errLoadingList', fieldValue: true })\r\n );\r\n\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.applicationsList_errorGetList'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('ApplicationsList/onMount', onMountSaga);\r\n yield takeLatest('ApplicationsList/onUnmount', onUnmountSaga);\r\n yield takeLatest('ApplicationsList/getStudentApplications', getStudentApplicationsSaga);\r\n}\r\n","/**\r\n * CertificatesList scene sagas\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { select, call, put, putResolve, takeLatest, delay } from 'redux-saga/effects';\r\n\r\nimport { t } from 'app';\r\n\r\nimport API, { IParams } from 'api';\r\nimport ErrorHandler from 'shared/errorHandler';\r\n\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './selectors';\r\n\r\nfunction* onMountSaga() {\r\n try {\r\n yield put(actions.CertificatesList.reset());\r\n yield putResolve(actions.StudentRegistrationDropdown.getRegistrations());\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.CertificatesList.setErrorStatus({\r\n fieldName: 'errLoading',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.certificatesList_errorLoadingPage'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nfunction* getInitialFilterStateSaga(params?: IParams) {\r\n try {\r\n const registrationId = yield select(selectors.getRegistration);\r\n const { requestParams } = yield select(selectors.getCertificatesListSlice);\r\n\r\n if (registrationId === null) return;\r\n \r\n if (requestParams.state !== undefined) {\r\n yield put(actions.CertificatesList.setRequestParams({ ...params }));\r\n return;\r\n }\r\n\r\n const initialFilterState = yield call(API.secVirtual.getStudentCertificatesOnMountState.call, {\r\n registrationId,\r\n });\r\n yield put(\r\n actions.CertificatesList.setRequestParams({\r\n ...params,\r\n state: initialFilterState.onMountState !== '' ? initialFilterState.onMountState : 'ready',\r\n })\r\n );\r\n \r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.CertificatesList.setErrorStatus({\r\n fieldName: 'errLoadingCertificateList',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.certificatesList_errorLoadingPage'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nfunction* getDataSaga(action?: { payload: IParams | undefined }) {\r\n const params = action?.payload || {};\r\n\r\n try {\r\n yield put(\r\n actions.CertificatesList.setErrorStatus({\r\n fieldName: 'errLoadingCertificateList',\r\n fieldValue: false,\r\n })\r\n );\r\n\r\n const registrationId = yield select(selectors.getRegistration);\r\n yield getInitialFilterStateSaga(params);\r\n const { requestParams } = yield select(selectors.getCertificatesListSlice);\r\n\r\n yield put(\r\n actions.CertificatesList.setLoadingStatus({\r\n fieldName: 'loadingCertificatesList',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n const certificatesList = yield call(API.secVirtual.getCertificatesList.call, {\r\n ...requestParams,\r\n registrationId: registrationId,\r\n });\r\n\r\n yield put(actions.CertificatesList.setCertificatesList(certificatesList.data));\r\n\r\n const filters = certificatesList.filters.map((filter, key) => ({\r\n key: key,\r\n text: filter,\r\n value: filter,\r\n }));\r\n\r\n yield put(actions.CertificatesList.setCertificatesFilters(filters));\r\n\r\n yield put(\r\n actions.CertificatesList.setLoadingStatus({\r\n fieldName: 'loadingCertificatesList',\r\n fieldValue: false,\r\n })\r\n );\r\n\r\n yield put(\r\n actions.CertificatesList.setLoadingStatus({ fieldName: 'loading', fieldValue: false })\r\n );\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.CertificatesList.setErrorStatus({\r\n fieldName: 'errLoadingCertificateList',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.certificatesList_errorLoadingPage'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nfunction* onUnmountSaga() {\r\n yield put(actions.CertificatesList.reset());\r\n}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('CertificatesList/onMount', onMountSaga);\r\n yield takeLatest('CertificatesList/getData', getDataSaga);\r\n yield takeLatest('CertificatesList/onUnmount', onUnmountSaga);\r\n}\r\n","/**\r\n * CertificatesDetails scene sagas\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport { call, put, putResolve, takeLatest } from 'redux-saga/effects';\r\nimport ErrorHandler from 'shared/errorHandler';\r\n\r\nimport { PayloadAction } from '@reduxjs/toolkit';\r\n\r\nimport { t } from 'app';\r\n\r\nimport API from 'api';\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport config from 'config';\r\n\r\nfunction* onMountSaga() {\r\n try {\r\n yield put(actions.CertificatesDetails.reset());\r\n yield putResolve(actions.StudentRegistrationDropdown.getRegistrations());\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.certificateDetails_errorLoadingPage'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nfunction* getDataSaga(action: PayloadAction<{ certificateId: number; registrationId: number }>) {\r\n try {\r\n yield put(\r\n actions.CertificatesDetails.setLoadingStatus({\r\n fieldName: 'errLoadingCertificatesDetails',\r\n fieldValue: false,\r\n })\r\n );\r\n\r\n const certificatesDetails = yield call(\r\n API.secVirtual.getCertificatesDetails.call,\r\n action.payload.certificateId,\r\n action.payload.registrationId\r\n );\r\n\r\n // only retrieve preview when the certificate request is ready\r\n if (certificatesDetails.state.state === 'ready' && certificatesDetails.certificate) {\r\n const API_SEC_VIRTUAL = config.API_WSO2 + config.API_SEC_VIRTUAL_PATH;\r\n\r\n if (certificatesDetails.certificate.url !== null) {\r\n const pdfFile = yield call(\r\n API.files.getFileUint8Array.call,\r\n `${API_SEC_VIRTUAL}${certificatesDetails.certificate.url}`\r\n );\r\n\r\n yield put(actions.CertificatesDetails.setCertificateFile(pdfFile));\r\n } else {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.certificates_errorLoadingPdfFile'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n\r\n yield put(actions.CertificatesDetails.setCertificatesDetails(certificatesDetails));\r\n\r\n yield put(\r\n actions.CertificatesDetails.setLoadingStatus({\r\n fieldName: 'loadingCertificatesDetails',\r\n fieldValue: false,\r\n })\r\n );\r\n } catch (e) {\r\n yield put(\r\n actions.CertificatesDetails.setErrorStatus({\r\n fieldName: 'errLoadingCertificateDetails',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n if (e.response.data.error_code === 'nullFileUrl') {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.certificateDetails_errorLoadingCertificateFile'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n } else {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.certificateDetails_errorLoadingPage'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n }\r\n}\r\n\r\nfunction* certificatePaymentSaga(action: PayloadAction) {\r\n try {\r\n const certificatePaymentData = action.payload;\r\n\r\n yield put(actions.Payments.setPreSelectedDebits(certificatePaymentData));\r\n yield put(actions.Payments.setSelectedDebits(certificatePaymentData));\r\n\r\n yield put(\r\n actions.App.navigateTo({\r\n key: 'pendingDebitsPayment',\r\n })\r\n );\r\n } catch (e) {\r\n } finally {\r\n }\r\n}\r\n\r\nfunction* certificatePaymentPendingSaga(action: PayloadAction) {\r\n try {\r\n yield put(\r\n actions.App.navigateTo({\r\n key: 'payments',\r\n })\r\n );\r\n } catch (e) {\r\n } finally {\r\n }\r\n}\r\n\r\nfunction* openChangeHistoryModalSaga(\r\n action: PayloadAction<{ certificateId: number; registrationId: number }>\r\n) {\r\n try {\r\n yield put(\r\n actions.CertificatesDetails.setLoadingStatus({\r\n fieldName: 'loadingAccessHistory',\r\n fieldValue: true,\r\n })\r\n );\r\n yield put(actions.CertificatesDetails.setVisibleAccessHistoryModal(true));\r\n const certificatesChangeHistory = yield call(\r\n API.secVirtual.getCertificatesDetailsChangeHistory.call,\r\n action.payload.certificateId,\r\n action.payload.registrationId\r\n );\r\n\r\n if (certificatesChangeHistory) {\r\n yield put(actions.CertificatesDetails.setAccessHistory(certificatesChangeHistory));\r\n }\r\n } catch (e) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.certificateDetails_errorLoadingCertificateChangeHistory'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n } finally {\r\n yield put(\r\n actions.CertificatesDetails.setLoadingStatus({\r\n fieldName: 'loadingAccessHistory',\r\n fieldValue: false,\r\n })\r\n );\r\n }\r\n}\r\n\r\nfunction* onUnmountSaga() {\r\n //yield put(actions.CertificatesDetails.reset());\r\n}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('CertificatesDetails/onMount', onMountSaga);\r\n yield takeLatest('CertificatesDetails/getData', getDataSaga);\r\n yield takeLatest('CertificatesDetails/certificatePayment', certificatePaymentSaga);\r\n yield takeLatest('CertificatesDetails/certificatePaymentPending', certificatePaymentPendingSaga);\r\n yield takeLatest('CertificatesDetails/openChangeHistoryModal', openChangeHistoryModalSaga);\r\n yield takeLatest('CertificatesDetails/onUnmount', onUnmountSaga);\r\n}\r\n","/**\r\n * CertificateValidator scene sagas\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { takeLatest, call, put, putResolve, select } from 'redux-saga/effects';\r\nimport { actions } from 'store/rootSlices';\r\nimport { t } from 'app';\r\n\r\nimport API from 'api';\r\nimport * as selectors from './selectors';\r\nimport { PayloadAction } from '@reduxjs/toolkit';\r\nimport config from 'config';\r\nimport _ from 'lodash';\r\n\r\nimport ErrorHandler from 'shared/errorHandler';\r\n\r\nfunction* onMountSaga() {}\r\n\r\nfunction* validateCertificateCodeSaga(\r\n action: PayloadAction<{\r\n recaptchaToken: string;\r\n accessCode: string;\r\n }>\r\n) {\r\n try {\r\n yield put(\r\n actions.CertificatesValidator.setErrorStatus({\r\n fieldName: 'errLoadingCertificateValidation',\r\n fieldValue: false,\r\n })\r\n );\r\n\r\n yield put(\r\n actions.CertificatesValidator.setLoadingStatus({\r\n fieldName: 'loadingCertificateValidation',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n const certData = yield call(API.secVirtual.postCertAccessCodeWithRecaptcha.call, {\r\n recaptchaToken: action.payload.recaptchaToken,\r\n accessCode: action.payload.accessCode,\r\n });\r\n\r\n yield put(actions.CertificatesValidator.setCertificateData(certData));\r\n yield put(actions.CertificatesValidator.setHasValidated(true));\r\n } catch (e) {\r\n yield put(\r\n actions.CertificatesValidator.setErrorStatus({\r\n fieldName: 'errLoadingCertificateValidation',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n if(e.response.data.error_code === \"ERR_EXPIRED_CERT\"){\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.certificateValidator_errorExpiredCertificate'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n else {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.certificateValidator_errorValidatingCertificate'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n\r\n yield put(actions.CertificatesValidator.setHasValidated(false));\r\n } finally {\r\n yield put(\r\n actions.CertificatesValidator.setLoadingStatus({\r\n fieldName: 'loadingCertificateValidation',\r\n fieldValue: false,\r\n })\r\n );\r\n }\r\n}\r\n\r\nfunction* onUnmountSaga() {\r\n yield put(actions.CertificatesValidator.reset());\r\n}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('CertificateValidator/onMount', onMountSaga);\r\n yield takeLatest('CertificateValidator/onUnmount', onUnmountSaga);\r\n yield takeLatest('CertificateValidator/validateCertificateCode', validateCertificateCodeSaga);\r\n}\r\n","/**\r\n * Payments scene sagas\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport { takeLatest, put, putResolve, call, take, race, select } from 'redux-saga/effects';\r\nimport { eventChannel } from 'redux-saga';\r\nimport { PayloadAction } from '@reduxjs/toolkit';\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './selectors';\r\nimport { t } from 'app';\r\n\r\nimport { IWEBSOCKET_PAYLOAD, EWEBSOCKET_RESULT } from 'scenes/VirtualSecretary/Payments/types';\r\n\r\nimport ErrorHandler from 'shared/errorHandler';\r\n\r\nimport API from 'api';\r\n\r\nimport { DEFAULT_PARAMS, DEFAULT_DEBITS_PARAMS } from '../utils';\r\nimport { ICallParams } from '../types';\r\n\r\nimport { PAYMENT_ERROR_MESSAGE } from 'shared/errorMessages';\r\nimport configs from 'config';\r\n\r\nfunction* onMountSaga(action: PayloadAction) {\r\n const registrationId = action.payload;\r\n try {\r\n yield put(\r\n actions.Payments.setLoadingStatus({\r\n fieldName: 'loading',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n if (registrationId) {\r\n yield putResolve(actions.StudentRegistrationDropdown.setRegistration(registrationId));\r\n } else {\r\n yield putResolve(actions.StudentRegistrationDropdown.getRegistrations());\r\n }\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.payments_errorLoadingPage'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nfunction* fetchDebitsSaga(action: PayloadAction) {\r\n try {\r\n yield put(\r\n actions.Payments.setLoadingStatus({\r\n fieldName: 'loadingDebitsTable',\r\n fieldValue: true,\r\n })\r\n );\r\n yield put(\r\n actions.Payments.setErrorStatus({\r\n fieldName: 'errorLoadingDebitsTable',\r\n fieldValue: false,\r\n })\r\n );\r\n\r\n const registrationId = yield select(selectors.getRegistrationId);\r\n\r\n if (registrationId !== null && registrationId !== undefined) {\r\n const paymentsSlice = yield select(selectors.getPaymentsSlice);\r\n\r\n const debitsData = yield call(API.secVirtual.getStudentsUnpaidDebits.call, {\r\n ...action.payload,\r\n registrationId,\r\n ...paymentsSlice.filterParams,\r\n });\r\n\r\n yield put(actions.Payments.setDebit(debitsData));\r\n\r\n yield put(actions.Payments.setDebitsFilterTypes(debitsData.filters));\r\n }\r\n } catch (e) {\r\n yield put(\r\n actions.Payments.setErrorStatus({\r\n fieldName: 'errorLoadingDebitsTable',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.payments_errorLoadingPage'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n } finally {\r\n yield put(\r\n actions.Payments.setLoadingStatus({\r\n fieldName: 'loadingDebitsTable',\r\n fieldValue: false,\r\n })\r\n );\r\n }\r\n}\r\n\r\nfunction* fetchPendingDebitsSaga() {\r\n try {\r\n yield put(\r\n actions.Payments.setLoadingStatus({\r\n fieldName: 'loadingPendingDebitsTable',\r\n fieldValue: true,\r\n })\r\n );\r\n yield put(\r\n actions.Payments.setErrorStatus({\r\n fieldName: 'errorLoadingPendingDebitsTable',\r\n fieldValue: false,\r\n })\r\n );\r\n\r\n const paymentsSlice = yield select(selectors.getPaymentsSlice);\r\n const registrationId = yield select(selectors.getRegistrationId);\r\n\r\n if (!registrationId) {\r\n return;\r\n }\r\n\r\n const pendingData = yield call(API.secVirtual.getStudentsPendingDebits.call, registrationId);\r\n\r\n yield put(actions.Payments.setPendingDebits(pendingData));\r\n\r\n yield put(\r\n actions.Payments.setLoadingStatus({\r\n fieldName: 'loadingPendingDebitsTable',\r\n fieldValue: false,\r\n })\r\n );\r\n\r\n if (!paymentsSlice.isSocketActivated) {\r\n if (pendingData.length > 0) {\r\n yield* handleWebsocketConnectionSaga();\r\n }\r\n }\r\n } catch (e) {\r\n yield put(\r\n actions.Payments.setErrorStatus({\r\n fieldName: 'errorLoadingPendingDebitsTable',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.payments_errorLoadingPendingDebitsTable'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nfunction* fetchPaymentsSaga(action: PayloadAction) {\r\n try {\r\n yield put(\r\n actions.Payments.setLoadingStatus({\r\n fieldName: 'loadingPaymentsTable',\r\n fieldValue: true,\r\n })\r\n );\r\n yield put(\r\n actions.Payments.setErrorStatus({\r\n fieldName: 'errorLoadingPaymentsTable',\r\n fieldValue: false,\r\n })\r\n );\r\n\r\n const registrationId = yield select(selectors.getRegistrationId);\r\n\r\n if (!registrationId) {\r\n return;\r\n }\r\n\r\n const paymentsData = yield call(API.secVirtual.getStudentsPayments.call, {\r\n ...action.payload,\r\n registrationId,\r\n });\r\n yield put(actions.Payments.setPayments(paymentsData));\r\n } catch (e) {\r\n yield put(\r\n actions.Payments.setErrorStatus({\r\n fieldName: 'errorLoadingPaymentsTable',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.payments_errorLoadingPaymentsTable'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n } finally {\r\n yield put(\r\n actions.Payments.setLoadingStatus({\r\n fieldName: 'loadingPaymentsTable',\r\n fieldValue: false,\r\n })\r\n );\r\n }\r\n}\r\n\r\nfunction* fetchMbPaymentDetailsSaga(action: PayloadAction) {\r\n try {\r\n yield put(\r\n actions.Payments.setLoadingStatus({\r\n fieldName: 'mbInfoModalLoading',\r\n fieldValue: true,\r\n })\r\n );\r\n yield put(\r\n actions.Payments.setErrorStatus({\r\n fieldName: 'errorLoadingMbInfo',\r\n fieldValue: false,\r\n })\r\n );\r\n\r\n yield put(actions.Payments.setIsMbInfoModalOpened(true));\r\n\r\n const registrationId = yield select(selectors.getRegistrationId);\r\n\r\n if (!registrationId) {\r\n return;\r\n }\r\n\r\n const mbPaymentDetails = yield call(API.secVirtual.getPaymentMbInfo.call, {\r\n paymentRequestId: action.payload,\r\n registrationId: registrationId,\r\n });\r\n\r\n yield put(actions.Payments.setConsultedMbPaymentInfo(mbPaymentDetails));\r\n } catch (e) {\r\n yield put(\r\n actions.Payments.setErrorStatus({\r\n fieldName: 'errorLoadingMbInfo',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n if (e.response.data.error_code === PAYMENT_ERROR_MESSAGE.ERR_STUDENT_INVALID_PAYMENT) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.newPaymentRequest_errorInvalidPayment'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n } else {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.payments_errorLoadingPage'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n } finally {\r\n yield put(\r\n actions.Payments.setLoadingStatus({\r\n fieldName: 'mbInfoModalLoading',\r\n fieldValue: false,\r\n })\r\n );\r\n }\r\n}\r\n\r\nfunction* fetchDataSaga(action: PayloadAction) {\r\n try {\r\n yield put(actions.Payments.fetchPendingDebits());\r\n yield put(actions.Payments.fetchPayments(DEFAULT_PARAMS));\r\n yield put(actions.Payments.fetchDebits(DEFAULT_DEBITS_PARAMS));\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.payments_errorDeletingDebit'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n } finally {\r\n yield put(\r\n actions.Payments.setLoadingStatus({\r\n fieldName: 'loading',\r\n fieldValue: false,\r\n })\r\n );\r\n }\r\n}\r\n\r\nfunction* deleteDebitSaga(action: PayloadAction) {\r\n try {\r\n const registrationId = yield select(selectors.getRegistrationId);\r\n\r\n yield call(API.secVirtual.deletePaymentMb.call, {\r\n paymentRequestId: action.payload,\r\n registrationId: registrationId,\r\n });\r\n\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.payments_successDeletingDebit'),\r\n icon: 'check',\r\n type: 'success',\r\n })\r\n );\r\n\r\n yield put(actions.Payments.fetchPendingDebits());\r\n yield put(actions.Payments.fetchDebits(DEFAULT_DEBITS_PARAMS));\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.payments_errorLoadingPage'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nfunction* handleWebsocketConnectionSaga() {\r\n try {\r\n const user = yield select(selectors.getUser);\r\n\r\n // initiate websocket communication\r\n const websocket = new WebSocket(\r\n `${configs.WEB_SOCKET_URL}?idToken=${user.idToken}${\r\n user.impersonate ? `&impersonate=${user.impersonate}` : ''\r\n }`\r\n );\r\n\r\n // Create channel\r\n const eventChannel = yield call(getWsChannel, websocket);\r\n\r\n const { cancel } = yield race({\r\n task: call(watchMessagesSaga, eventChannel),\r\n cancel: take('DEACTIVATE_WEBSOCKET'),\r\n });\r\n\r\n if (cancel) {\r\n console.log('Websocket closed');\r\n eventChannel.close();\r\n }\r\n } catch (e) {\r\n console.error('Websocket disconnected unexpectedly...');\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.payments_errorWebsoket'),\r\n icon: 'info',\r\n type: 'warning',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nfunction getWsChannel(websocket) {\r\n return eventChannel((emitter) => {\r\n const escape_char = '\u001e';\r\n\r\n websocket.onopen = function () {\r\n console.log('Websocket Connected.');\r\n websocket.send('{\"protocol\":\"json\",\"version\":1}' + escape_char);\r\n };\r\n\r\n websocket.onmessage = (event) => {\r\n if (!event.data) {\r\n return;\r\n }\r\n\r\n try {\r\n let msgList = event.data.split(escape_char).slice(0, -1);\r\n\r\n let addressableMsgList = [] as any;\r\n\r\n msgList.forEach((websocketMsg) => {\r\n //if(!websocketMsg.startsWith(\"{}\"))\r\n {\r\n // websocketMsg\r\n // .replace(/\\\\u0022/g, '\"')\r\n // .replace('\"{', '{')\r\n // .replace('}\"', '}');\r\n\r\n let payloadObj = JSON.parse(websocketMsg);\r\n\r\n // if it's a keep-alive message\r\n if (payloadObj.type !== 1 || !payloadObj.arguments) {\r\n return;\r\n }\r\n\r\n // mockMsg\r\n /*msg = {\r\n type: 1,\r\n target: 'BroadCast',\r\n arguments: [\r\n {\r\n request_payment_id: 57623,\r\n result: EWEBSOCKET_RESULT.success,\r\n operation: EWEBSOCKET_PAYMENT_TYPE.mbway_payment,\r\n },\r\n ],\r\n };*/\r\n\r\n addressableMsgList.push(payloadObj.arguments[0]);\r\n }\r\n });\r\n\r\n if (!addressableMsgList.length) {\r\n return;\r\n }\r\n return emitter(actions.Payments.onPaymentNotification(addressableMsgList));\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n };\r\n\r\n // unsubscribe function\r\n return () => {\r\n websocket.close();\r\n };\r\n });\r\n}\r\n\r\nfunction* watchMessagesSaga(eventChannel) {\r\n const paymentsSlice = yield select(selectors.getPaymentsSlice);\r\n\r\n if (!paymentsSlice.isSocletActivated) {\r\n yield put(actions.Payments.setIsSocketActivated(true));\r\n }\r\n\r\n while (true) {\r\n const action = yield take(eventChannel);\r\n yield put(action);\r\n }\r\n}\r\n\r\nfunction* closeWebsocketSaga() {\r\n yield put({ type: 'DEACTIVATE_WEBSOCKET' });\r\n}\r\n\r\nfunction* onPaymentNotificationSaga(action: PayloadAction) {\r\n for (let i = 0; i < action.payload.length; i++) {\r\n var payload = JSON.parse(action.payload[i].toString());\r\n\r\n if (payload.result === EWEBSOCKET_RESULT.success) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.payments_successPaymentRequest'),\r\n icon: 'info',\r\n type: 'success',\r\n })\r\n );\r\n\r\n // update the pending debits table and the history/payments table\r\n yield put(actions.Payments.fetchPendingDebits());\r\n yield put(actions.Payments.fetchPayments(DEFAULT_PARAMS));\r\n } else if (payload.result === EWEBSOCKET_RESULT.expired) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.payments_expiredPaymentRequest'),\r\n icon: 'info',\r\n type: 'warning',\r\n })\r\n );\r\n\r\n // update pending debits table and debits table\r\n yield put(actions.Payments.fetchPendingDebits());\r\n yield put(actions.Payments.fetchDebits(DEFAULT_DEBITS_PARAMS));\r\n } else if (payload.result === EWEBSOCKET_RESULT.cancel) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.payments_canceledPaymentRequest'),\r\n icon: 'info',\r\n type: 'danger',\r\n })\r\n );\r\n\r\n // update pending debits table and debits table\r\n yield put(actions.Payments.fetchPendingDebits());\r\n yield put(actions.Payments.fetchDebits(DEFAULT_DEBITS_PARAMS));\r\n }\r\n }\r\n}\r\n\r\nfunction* onUnmountSaga() {\r\n yield call(closeWebsocketSaga);\r\n\r\n // the slice states debits, preSelectedDebits, payments, selectedDebits and pendingDebits\r\n // may be in use in the PendingDebitsPayment page, so they should not be reset onUnmount\r\n yield put(actions.Payments.resetResettableStates());\r\n}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('Payments/onMount', onMountSaga);\r\n yield takeLatest('Payments/onUnmount', onUnmountSaga);\r\n yield takeLatest('Payments/fetchData', fetchDataSaga);\r\n yield takeLatest('Payments/fetchDebits', fetchDebitsSaga);\r\n yield takeLatest('Payments/deleteDebit', deleteDebitSaga);\r\n yield takeLatest('Payments/fetchPayments', fetchPaymentsSaga);\r\n yield takeLatest('Payments/fetchPendingDebits', fetchPendingDebitsSaga);\r\n yield takeLatest('Payments/fetchMbPaymentDetails', fetchMbPaymentDetailsSaga);\r\n yield takeLatest('Payments/onPaymentNotification', onPaymentNotificationSaga);\r\n yield takeLatest('Payments/watchMessages', watchMessagesSaga);\r\n yield takeLatest('Payments/handleWebsocketConnection', handleWebsocketConnectionSaga);\r\n}\r\n","/**\r\n * PendingDebitsPayment sagas\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport { PayloadAction } from '@reduxjs/toolkit';\r\n\r\nimport { call, takeLatest, put, select, putResolve } from 'redux-saga/effects';\r\nimport { t } from 'app';\r\n\r\nimport ErrorHandler from 'shared/errorHandler';\r\nimport API from 'api';\r\nimport * as selectors from './selectors';\r\nimport { ICallParams, IDebitData } from '../../types';\r\n\r\nimport { PAYMENT_ERROR_MESSAGE } from 'shared/errorMessages';\r\n\r\nimport { PAYMENT_METHOD, PENDING_DEBIT_STATE } from 'scenes/VirtualSecretary/Payments/types';\r\n\r\nfunction* onMountSaga(action: PayloadAction) {\r\n const registrationId = action.payload;\r\n\r\n if (registrationId) {\r\n yield putResolve(actions.StudentRegistrationDropdown.setRegistration(registrationId));\r\n } else {\r\n yield putResolve(actions.StudentRegistrationDropdown.getRegistrations());\r\n }\r\n\r\n yield putResolve(actions.PendingDebitsPayment.fetchPhoneNumber());\r\n\r\n yield put(actions.PendingDebitsPayment.fetchPendingDebits());\r\n}\r\n\r\nfunction* fetchDebitsSaga(action: PayloadAction) {\r\n try {\r\n yield put(\r\n actions.PendingDebitsPayment.setErrorStatus({\r\n fieldName: 'errLoadingDebits',\r\n fieldValue: false,\r\n })\r\n );\r\n\r\n const registrationId = yield select(selectors.getRegistrationId);\r\n\r\n const pendingDebitsSlice = yield select(selectors.getPendingDebitsPaymentSlice);\r\n\r\n const debitsData = yield call(API.secVirtual.getStudentsUnpaidDebits.call, {\r\n ...action.payload,\r\n registrationId,\r\n ...pendingDebitsSlice.filterParams,\r\n });\r\n\r\n yield put(actions.Payments.setDebit(debitsData));\r\n\r\n yield put(actions.PendingDebitsPayment.setDebitsFilterTypes(debitsData.filters));\r\n } catch (e) {\r\n yield put(\r\n actions.PendingDebitsPayment.setErrorStatus({\r\n fieldName: 'errLoadingDebits',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.newPaymentRequest_errorLoadingPage'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n } finally {\r\n yield put(\r\n actions.PendingDebitsPayment.setLoadingStatus({\r\n fieldName: 'loadingPaymentsTable',\r\n fieldValue: false,\r\n })\r\n );\r\n }\r\n}\r\n\r\nfunction* fetchPendingDebitsSaga() {\r\n try {\r\n yield put(\r\n actions.PendingDebitsPayment.setErrorStatus({\r\n fieldName: 'errLoadingPendingDebits',\r\n fieldValue: false,\r\n })\r\n );\r\n\r\n const registrationId = yield select(selectors.getRegistrationId);\r\n const paymentsSlice = yield select(selectors.getPaymentsSlice);\r\n\r\n if (registrationId !== null && registrationId !== undefined) {\r\n let pendingData = [] as any;\r\n\r\n if (paymentsSlice.pendingDebits.data.length > 0) {\r\n pendingData = paymentsSlice.pendingDebits.data;\r\n } else {\r\n pendingData = yield call(API.secVirtual.getStudentsPendingDebits.call, registrationId);\r\n }\r\n\r\n if (pendingData && pendingData.length > 0) {\r\n const allowMbwayPayment = !pendingData.some((debit) => {\r\n return (\r\n debit.paymentMethod === PAYMENT_METHOD.mbway &&\r\n debit.status === PENDING_DEBIT_STATE.awaitingPayment\r\n );\r\n });\r\n\r\n yield put(actions.PendingDebitsPayment.setAllowMbwayPayment(allowMbwayPayment));\r\n }\r\n }\r\n } catch (e) {\r\n yield put(\r\n actions.PendingDebitsPayment.setErrorStatus({\r\n fieldName: 'errLoadingPendingDebits',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.newPaymentRequest_errorLoadingPage'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n } finally {\r\n yield put(\r\n actions.PendingDebitsPayment.setLoadingStatus({\r\n fieldName: 'loading',\r\n fieldValue: false,\r\n })\r\n );\r\n }\r\n}\r\n\r\nfunction* fetchPhoneNumberSaga() {\r\n try {\r\n yield put(\r\n actions.PendingDebitsPayment.setErrorStatus({\r\n fieldName: 'errLoadingPhoneNumber',\r\n fieldValue: false,\r\n })\r\n );\r\n\r\n const pendingDebitsSlice = yield select(selectors.getPendingDebitsPaymentSlice);\r\n\r\n const phoneNumber = yield call(API.secVirtual.getPersonalDataPhoneNumber.call);\r\n\r\n yield put(\r\n actions.PendingDebitsPayment.setMbwayForm({\r\n countryDropdown: {\r\n ...pendingDebitsSlice.mbwayForm.countryDropdown,\r\n input: phoneNumber.toString(),\r\n },\r\n })\r\n );\r\n } catch (e) {\r\n yield put(\r\n actions.PendingDebitsPayment.setErrorStatus({\r\n fieldName: 'errLoadingPhoneNumber',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.newPaymentRequest_errorFetchingPhoneNumber'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n } finally {\r\n yield put(\r\n actions.PendingDebitsPayment.setLoadingStatus({\r\n fieldName: 'loadingPaymentsTable',\r\n fieldValue: false,\r\n })\r\n );\r\n }\r\n}\r\n\r\nfunction* submitMBDebitsRequestSaga(action: PayloadAction) {\r\n const allDebits: number[] = [];\r\n const registrationId = yield select(selectors.getRegistrationId);\r\n\r\n action.payload.forEach((debit) => {\r\n allDebits.push(debit.debitId);\r\n\r\n debit.associatedCosts?.forEach((el) => {\r\n if (el.debitId) allDebits.push(el.debitId);\r\n });\r\n });\r\n\r\n try {\r\n yield put(\r\n actions.PendingDebitsPayment.setLoadingStatus({\r\n fieldName: 'loading',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n const response = yield call(API.secVirtual.postPaymentReferenceMb.call, {\r\n registrationId,\r\n data: { debits: allDebits },\r\n });\r\n\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.newPaymentRequest_successPaymentAtm'),\r\n icon: 'check',\r\n type: 'success',\r\n })\r\n );\r\n\r\n yield put(actions.PendingDebitsPayment.setMbwayResponse(response));\r\n\r\n yield put(actions.PendingDebitsPayment.setDebitsSubmissionCompleted(true));\r\n\r\n yield put(actions.PendingDebitsPayment.setCurrentStep(3));\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.newPaymentRequest_errorPaymentAtm'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n\r\n //get back to payments initial page with previous selected registration\r\n yield put(\r\n actions.App.navigateTo({\r\n key: 'payments',\r\n state: registrationId,\r\n })\r\n );\r\n } finally {\r\n yield put(\r\n actions.PendingDebitsPayment.setLoadingStatus({\r\n fieldName: 'loading',\r\n fieldValue: false,\r\n })\r\n );\r\n }\r\n}\r\n\r\nfunction* submitMbwayDebitsRequestSaga(action: any) {\r\n const allDebits: number[] = [];\r\n\r\n action.payload.selectedDebits.forEach((debit) => {\r\n allDebits.push(debit.debitId);\r\n\r\n debit.associatedCosts?.forEach((el) => {\r\n if (el.debitId) allDebits.push(el.debitId);\r\n });\r\n });\r\n\r\n const data = {\r\n phone: {\r\n number: action.payload.form.countryDropdown.input,\r\n prefix: action.payload.form.countryDropdown.countryValue,\r\n },\r\n debits: allDebits,\r\n };\r\n\r\n try {\r\n yield put(\r\n actions.PendingDebitsPayment.setLoadingStatus({\r\n fieldName: 'loading',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n const registrationId = yield select(selectors.getRegistrationId);\r\n\r\n /*const response =*/ yield call(API.secVirtual.postPaymentReferenceMbWay.call, {\r\n registrationId,\r\n data,\r\n });\r\n\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.newPaymentRequest_successPaymentMbway'),\r\n icon: 'check',\r\n type: 'success',\r\n })\r\n );\r\n\r\n const paymentsSlice = yield select(selectors.getPaymentsSlice);\r\n\r\n if (!paymentsSlice.isSocketActivated) {\r\n yield put(actions.Payments.handleWebsocketMessages());\r\n }\r\n\r\n yield put(actions.PendingDebitsPayment.setDebitsSubmissionCompleted(true));\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n if (\r\n e.response.data.error_code === PAYMENT_ERROR_MESSAGE.ERR_STUDENT_DUPLICATE_PAYMENT_METHOD\r\n ) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.newPaymentRequest_errorSubmitDuplicatePaymentMethod'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n } else if (e.response.data.error_code === PAYMENT_ERROR_MESSAGE.ERR_STUDENT_INVALID_PAYMENT) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.newPaymentRequest_errorInvalidPayment'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n } else {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.newPaymentRequest_errorPaymentMbway'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n } finally {\r\n yield put(\r\n actions.PendingDebitsPayment.setLoadingStatus({\r\n fieldName: 'loading',\r\n fieldValue: false,\r\n })\r\n );\r\n }\r\n}\r\n\r\nfunction* onUnmountSaga() {\r\n yield put(actions.PendingDebitsPayment.resetPendingDebits());\r\n}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('PendingDebitsPayment/onMount', onMountSaga);\r\n yield takeLatest('PendingDebitsPayment/submitMbwayDebitsRequest', submitMbwayDebitsRequestSaga);\r\n yield takeLatest('PendingDebitsPayment/submitMbDebitsRequest', submitMBDebitsRequestSaga);\r\n yield takeLatest('PendingDebitsPayment/fetchDebits', fetchDebitsSaga);\r\n yield takeLatest('PendingDebitsPayment/fetchPhoneNumber', fetchPhoneNumberSaga);\r\n yield takeLatest('PendingDebitsPayment/fetchPendingDebits', fetchPendingDebitsSaga);\r\n yield takeLatest('PendingDebitsPayment/onUnmount', onUnmountSaga);\r\n}\r\n","/**\r\n * Grades scene sagas\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport { takeLatest } from 'redux-saga/effects';\r\n\r\n//import { actions } from 'store/rootSlices'\r\n\r\nfunction* onMountSaga() {}\r\n\r\nfunction* onUnmountSaga() {}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('Grades/onMount', onMountSaga);\r\n yield takeLatest('Grades/onUnmount', onUnmountSaga);\r\n}\r\n","/**\r\n * AssessmentChoice scene sagas\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport { takeLatest } from 'redux-saga/effects';\r\n\r\n//import { actions } from 'store/rootSlices'\r\n\r\nfunction* onMountSaga() {}\r\n\r\nfunction* onUnmountSaga() {}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('AssessmentChoice/onMount', onMountSaga);\r\n yield takeLatest('AssessmentChoice/onUnmount', onUnmountSaga);\r\n}\r\n","/**\r\n * ExamRegistration scene sagas\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport { takeLatest } from 'redux-saga/effects';\r\n\r\n//import { actions } from 'store/rootSlices'\r\n\r\nfunction* onMountSaga() {}\r\n\r\nfunction* onUnmountSaga() {}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('ExamRegistration/onMount', onMountSaga);\r\n yield takeLatest('ExamRegistration/onUnmount', onUnmountSaga);\r\n}\r\n","/**\r\n * SubscriptionRenewal scene sagas\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport { takeLatest } from 'redux-saga/effects';\r\n\r\n//import { actions } from 'store/rootSlices'\r\n\r\nfunction* onMountSaga() {}\r\n\r\nfunction* onUnmountSaga() {}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('SubscriptionRenewal/onMount', onMountSaga);\r\n yield takeLatest('SubscriptionRenewal/onUnmount', onUnmountSaga);\r\n}\r\n","/**\r\n * ClassSupoort scene sagas\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport { takeLatest } from 'redux-saga/effects';\r\n\r\n//import { actions } from 'store/rootSlices'\r\n\r\nfunction* onMountSaga() {}\r\n\r\nfunction* onUnmountSaga() {}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('ClassSupoort/onMount', onMountSaga);\r\n yield takeLatest('ClassSupoort/onUnmount', onUnmountSaga);\r\n}\r\n","/**\r\n * CurricularPlan scene sagas\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { actions } from 'store/rootSlices';\r\nimport ErrorHandler from 'shared/errorHandler';\r\n\r\nimport { PayloadAction } from '@reduxjs/toolkit';\r\n\r\nimport { call, takeLatest, put, putResolve, select, all } from 'redux-saga/effects';\r\nimport { t } from 'app';\r\n\r\nimport API from 'api';\r\nimport * as selectors from './selectors';\r\n\r\nfunction* onMountSaga() {\r\n try {\r\n yield put(actions.CurricularPlan.reset());\r\n\r\n yield putResolve(actions.StudentRegistrationDropdown.getRegistrations());\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.curricularPlan_errorLoadingPage', { textOnly: true }),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nfunction* getUcOptions(action: PayloadAction<{ name: string; code: number }>) {\r\n const ucCode = action.payload.code;\r\n const optionName = action.payload.name;\r\n const registrationId = yield select(selectors.getRegistration);\r\n\r\n // reset\r\n yield put(actions.CurricularPlan.setUcOptions({ name: optionName, courseList: [] }));\r\n\r\n yield put(actions.CurricularPlan.setUcOptionsModal(true));\r\n\r\n yield put(\r\n actions.CurricularPlan.setLoadingStatus({ fieldName: 'loadingModal', fieldValue: true })\r\n );\r\n\r\n if (!registrationId) {\r\n return;\r\n }\r\n\r\n try {\r\n const ucOptionList = yield call(\r\n API.secVirtual.getStudentModuleOptions.call,\r\n ucCode,\r\n registrationId\r\n );\r\n\r\n if (ucOptionList.length > 0) {\r\n yield put(\r\n actions.CurricularPlan.setUcOptions({ name: optionName, courseList: ucOptionList })\r\n );\r\n }\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.curricularPlan_errorLoadingOptions', {\r\n textOnly: true,\r\n }),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n } finally {\r\n yield put(\r\n actions.CurricularPlan.setLoadingStatus({ fieldName: 'loadingModal', fieldValue: false })\r\n );\r\n }\r\n}\r\n\r\nfunction* getCurricularPlanSaga() {\r\n yield put(\r\n actions.CurricularPlan.setErrorStatus({\r\n fieldName: 'errLoadingSummary',\r\n fieldValue: false,\r\n })\r\n );\r\n\r\n const registrationId = yield select(selectors.getRegistration);\r\n\r\n try {\r\n yield put(actions.CurricularPlan.setLoadingStatus({ fieldName: 'loading', fieldValue: true }));\r\n\r\n if (!registrationId) {\r\n return;\r\n }\r\n\r\n //gets all the curricular plan info for the registrationId selected\r\n const [curricularPlanData, extraCurricularUcs, mobilityUcs] = yield all([\r\n call(API.secVirtual.getStudentCurricularPlan.call, registrationId),\r\n call(API.secVirtual.getStudentExtraCurricularUcs.call, registrationId),\r\n call(API.secVirtual.getStudentMobilityUcs.call, registrationId),\r\n ]);\r\n\r\n const tmp = {\r\n registrationId,\r\n summary: curricularPlanData.summary,\r\n grade: curricularPlanData.grade,\r\n };\r\n\r\n yield put(actions.CurricularPlan.addCurricularPlanSummary(tmp));\r\n\r\n //it can be null. A student might not have a curricular plan associated\r\n const curricularPlan = curricularPlanData.curricularPlan;\r\n const accreditedUcs = curricularPlanData.accreditedUcs;\r\n\r\n //the properties of this object that are null or undefined must be using the optional chaining operator to avoid breaking the screen\r\n const regCurricularPlan = {\r\n registrationId: registrationId,\r\n curricularPlan: {\r\n courseName: curricularPlan?.courseCode,\r\n courseCode: curricularPlan?.courseCode,\r\n ucs: curricularPlan?.ucs,\r\n subUcs: curricularPlan?.submodules,\r\n accreditedUcs: accreditedUcs,\r\n mobilityUcs: mobilityUcs,\r\n extraCurricularUcs: extraCurricularUcs,\r\n /* ...(curricularPlan ? {} : null),\r\n ...(accreditedUcs ? {} : null), */\r\n },\r\n };\r\n\r\n yield put(actions.CurricularPlan.addCurricularPlan(regCurricularPlan));\r\n\r\n yield put(actions.CurricularPlan.setLoadingStatus({ fieldName: 'loading', fieldValue: false }));\r\n } catch (e) {\r\n yield put(\r\n actions.CurricularPlan.setErrorStatus({\r\n fieldName: 'errLoadingSummary',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n const shouldRun = yield call(ErrorHandler, e);\r\n\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.curricularPlan_errorLoadingPage', { textOnly: true }),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n } finally {\r\n }\r\n}\r\n\r\nfunction* onUnmountSaga() {\r\n yield put(actions.CurricularPlan.reset());\r\n}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('CurricularPlan/onMount', onMountSaga);\r\n yield takeLatest('CurricularPlan/onUnmount', onUnmountSaga);\r\n yield takeLatest('CurricularPlan/getCurricularPlan', getCurricularPlanSaga);\r\n yield takeLatest('CurricularPlan/getUcOptions', getUcOptions);\r\n}\r\n","/**\r\n * CurricularUnitDetails sagas\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport { PayloadAction } from '@reduxjs/toolkit';\r\n\r\nimport { call, takeLatest, put } from 'redux-saga/effects';\r\nimport { t } from 'app';\r\n\r\nimport API from 'api';\r\nimport ErrorHandler from 'shared/errorHandler';\r\nimport { CURRICULAR_PLAN_ERROR_MESSAGE } from 'shared/errorMessages';\r\n\r\nfunction* onMountSaga() {}\r\n\r\nfunction* getUcDetailsSaga(\r\n action: PayloadAction<{ selectedUcCode: number; registrationId: number }>\r\n) {\r\n try {\r\n yield put(actions.CurricularUnitDetails.setLoading(true));\r\n\r\n const ucDetails = yield call(\r\n API.secVirtual.getCurricularUnitDetails.call,\r\n action.payload.selectedUcCode,\r\n action.payload.registrationId\r\n );\r\n\r\n yield put(actions.CurricularUnitDetails.setUcDetails(ucDetails));\r\n\r\n yield put(actions.CurricularUnitDetails.setLoading(false));\r\n } catch (e) {\r\n yield put(\r\n actions.CurricularUnitDetails.setErrorStatus({\r\n fieldName: 'errLoadingDetails',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n const shouldRun = yield call(ErrorHandler, e);\r\n\r\n if (shouldRun) {\r\n if (\r\n e.response.data.error_code === CURRICULAR_PLAN_ERROR_MESSAGE.ERR_REGISTRATION_INVALID_UC\r\n ) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.curricularPlan_errorInvalidUc'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n } else {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.curricularUnitDetails_errorLoadingPage', {\r\n textOnly: true,\r\n }),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n } finally {\r\n yield put(actions.CurricularUnitDetails.setLoading(false));\r\n }\r\n}\r\n\r\nfunction* onUnmountSaga() {\r\n yield put(actions.CurricularUnitDetails.reset());\r\n}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('CurricularUnitDetails/onMount', onMountSaga);\r\n yield takeLatest('CurricularUnitDetails/getUcDetails', getUcDetailsSaga);\r\n yield takeLatest('CurricularUnitDetails/onUnmount', onUnmountSaga);\r\n}\r\n","/**\r\n * PersonalData scene sagas\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport { call, takeLatest, put, select, all } from 'redux-saga/effects';\r\nimport { actions } from 'store/rootSlices';\r\nimport { t } from 'app';\r\n\r\nimport API from 'api';\r\nimport * as selectors from './selectors';\r\nimport { reformatPersonalDataBlocks, updatePersonalDataBlocks } from '../utils';\r\n\r\nimport ErrorHandler from 'shared/errorHandler';\r\nimport { IContactsFields, IAddressFields } from './slice';\r\n\r\nimport { camelCase } from 'lodash';\r\nimport { ItemMeta } from 'semantic-ui-react';\r\n\r\nfunction* onMountSaga() {\r\n try {\r\n yield put(actions.PersonalData.reset());\r\n yield put(\r\n actions.PersonalData.setLoadingStatus({ fieldName: 'loadingPage', fieldValue: true })\r\n );\r\n let [personalDataBlocks, studentCardBlock] = yield all([\r\n call(API.secVirtual.getPersonalData.call),\r\n call(API.secVirtual.getStudentCardInfo.call),\r\n ]);\r\n\r\n // let personalDataBlocks = yield call(API.secVirtual.getPersonalData.call);\r\n\r\n // convert nameKeys involved in forms, from snake case to camel case\r\n personalDataBlocks.address.values.forEach((item, index) => {\r\n personalDataBlocks.address.values[index].nameKey = camelCase(\r\n personalDataBlocks.address.values[index].nameKey\r\n );\r\n personalDataBlocks.address.values[index].placeholderKey = camelCase(\r\n personalDataBlocks.address.values[index].placeholderKey\r\n );\r\n });\r\n\r\n personalDataBlocks.contacts.values.forEach((item, index) => {\r\n //Remove alternative phone number\r\n if (personalDataBlocks.contacts.values[index].nameKey === 'alternative_phone_number')\r\n personalDataBlocks.contacts.values.splice(index, 1);\r\n personalDataBlocks.contacts.values[index].nameKey = camelCase(\r\n personalDataBlocks.contacts.values[index].nameKey\r\n );\r\n personalDataBlocks.contacts.values[index].placeholderKey = camelCase(\r\n personalDataBlocks.contacts.values[index].placeholderKey\r\n );\r\n });\r\n\r\n let picture = null;\r\n picture = personalDataBlocks.profile.values.filter(\r\n (item) => item.nameKey === 'photo' && item.value !== ''\r\n )[0]?.value;\r\n\r\n personalDataBlocks = reformatPersonalDataBlocks(personalDataBlocks, picture);\r\n\r\n yield put(actions.PersonalData.setPersonalDataBlocks(personalDataBlocks));\r\n yield put(actions.PersonalData.setStudentCardBlock(studentCardBlock));\r\n } catch (e) {\r\n yield put(\r\n actions.PersonalData.setErrorStatus({\r\n fieldName: 'errLoadingPersonalData',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n const shouldRun = yield call(ErrorHandler, e);\r\n\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.personalData_errorLoadingPage'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n } finally {\r\n yield put(\r\n actions.PersonalData.setLoadingStatus({ fieldName: 'loadingPage', fieldValue: false })\r\n );\r\n }\r\n}\r\n\r\nfunction* patchAddressFormSaga(action: IAddressFields) {\r\n try {\r\n yield put(\r\n actions.PersonalData.setLoadingStatus({ fieldName: 'loadingAddress', fieldValue: true })\r\n );\r\n\r\n const form = action.payload;\r\n\r\n const regionNames = new (Intl as any).DisplayNames('pt', {\r\n type: 'region',\r\n fallback: 'code',\r\n });\r\n\r\n const body = {\r\n ...form,\r\n homePostalCode: {\r\n prefix: form.homePostalCode.countryValue,\r\n number: form.homePostalCode.input,\r\n },\r\n };\r\n\r\n const personalDataBlocks = yield select(selectors.getPersonalDataBlocks);\r\n\r\n yield call(API.secVirtual.patchAddressForm.call, body);\r\n\r\n // converts country code to country name to display in FE\r\n const updatedBody = {\r\n ...body,\r\n homePostalCode: body.homePostalCode.number,\r\n homeCountry: body.homePostalCode.prefix.toUpperCase(),\r\n homeCountryName: regionNames.of(body.homePostalCode.prefix.toUpperCase()),\r\n };\r\n\r\n const updatedPersonalDataBlocks = updatePersonalDataBlocks(\r\n personalDataBlocks,\r\n 'address',\r\n updatedBody,\r\n false\r\n );\r\n\r\n yield put(actions.PersonalData.setPersonalDataBlocks(updatedPersonalDataBlocks));\r\n\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.personalData_successUpdateContact'),\r\n icon: 'check',\r\n type: 'success',\r\n })\r\n );\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.personalData_errorUpdateContact'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n } finally {\r\n yield put(\r\n actions.PersonalData.setLoadingStatus({ fieldName: 'loadingAddress', fieldValue: false })\r\n );\r\n }\r\n}\r\n\r\nfunction* patchContactsFormSaga(action: IContactsFields) {\r\n try {\r\n const form = action.payload;\r\n\r\n yield put(\r\n actions.PersonalData.setLoadingStatus({ fieldName: 'loadingContacts', fieldValue: true })\r\n );\r\n\r\n const personalDataBlocks = yield select(selectors.getPersonalDataBlocks);\r\n\r\n yield call(API.secVirtual.patchContactsForm.call, form);\r\n\r\n const updatedPersonalDataBlocks = updatePersonalDataBlocks(\r\n personalDataBlocks,\r\n 'contacts',\r\n form,\r\n false\r\n );\r\n\r\n yield put(actions.PersonalData.setPersonalDataBlocks(updatedPersonalDataBlocks));\r\n\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.personalData_successUpdateAddress'),\r\n icon: 'check',\r\n type: 'success',\r\n })\r\n );\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.personalData_errorUpdateAddress'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n } finally {\r\n yield put(\r\n actions.PersonalData.setLoadingStatus({ fieldName: 'loadingContacts', fieldValue: false })\r\n );\r\n }\r\n}\r\n\r\nfunction* resetFormSaga(action: IAddressFields | IContactsFields) {\r\n try {\r\n const form = action.payload;\r\n const field = action.type;\r\n\r\n let body = {};\r\n\r\n Object.keys(form).forEach((formField) => {\r\n body[form[formField].nameKey] = form[formField].value;\r\n });\r\n\r\n const personalDataBlocks = yield select(selectors.getPersonalDataBlocks);\r\n\r\n const updatedPersonalDataBlocks = updatePersonalDataBlocks(\r\n personalDataBlocks,\r\n field,\r\n body,\r\n false\r\n );\r\n\r\n yield put(actions.PersonalData.setPersonalDataBlocks(updatedPersonalDataBlocks));\r\n } catch (e) {}\r\n}\r\n\r\nfunction* showNoRegistrationWarning(action: any) {\r\n const state = action.payload;\r\n\r\n if (!state) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('personalData.errorRedirectRequirement', { textOnly: true }),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n}\r\n\r\nfunction* onUnmountSaga() {\r\n yield put(actions.PersonalData.reset());\r\n}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('PersonalData/onMount', onMountSaga);\r\n yield takeLatest('PersonalData/onUnmount', onUnmountSaga);\r\n yield takeLatest('PersonalData/patchAddressForm', patchAddressFormSaga);\r\n yield takeLatest('PersonalData/patchContactsForm', patchContactsFormSaga);\r\n yield takeLatest('PersonalData/setHasRegistrationId', showNoRegistrationWarning);\r\n yield takeLatest('PersonalData/resetForm', resetFormSaga);\r\n}\r\n","import { call, takeLatest, put, select } from 'redux-saga/effects';\r\nimport { actions } from 'store/rootSlices';\r\nimport API from 'api';\r\nimport { getFiltrarPorPeriodo } from './selectors';\r\nimport ErrorHandler from 'shared/errorHandler';\r\n\r\nfunction* getGradesStatsSaga() {\r\n yield put(\r\n actions.GradesManagement.setLoadingStatus({\r\n fieldName: 'loadingStats',\r\n fieldValue: true,\r\n })\r\n );\r\n const stats = yield call(API.pautas.getGradesStats.call);\r\n yield put(actions.GradesManagement.setPautasStats(stats));\r\n}\r\n\r\nfunction* changeYearRequestSaga(action) {\r\n try {\r\n yield put(\r\n actions.GradesManagement.setLoadingStatus({\r\n fieldName: 'loadingTable',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n let period = yield select(getFiltrarPorPeriodo);\r\n\r\n if (!period) {\r\n const response = yield call(API.pautas.getTeacherGrades.call, { period });\r\n\r\n if (response && response.period) {\r\n period = response.period;\r\n yield put(actions.GradesManagement.setFiltrarPorPeriodo({ period: response.period }));\r\n }\r\n }\r\n\r\n period = yield select(getFiltrarPorPeriodo);\r\n const updatedPautas = yield call(API.pautas.getTeacherGrades.call, {\r\n period: period?.period || period,\r\n });\r\n\r\n //const response2 = yield call(API.pautas.getTeacherGrades.call, { period: period.period });\r\n\r\n if (updatedPautas?.periodosDisponiveis) {\r\n yield put(actions.GradesManagement.setPeriodosDisponiveis(updatedPautas.periodosDisponiveis));\r\n }\r\n\r\n if (updatedPautas?.pautas) {\r\n yield put(actions.GradesManagement.setPautasLista(updatedPautas.pautas));\r\n }\r\n\r\n if (action.payload?.changePautasLista) {\r\n yield put(actions.GradesManagement.setPautasListaChanged(true));\r\n }\r\n } catch (error) {\r\n console.error(error);\r\n const shouldRun = yield call(ErrorHandler, error);\r\n }\r\n yield put(\r\n actions.GradesManagement.setLoadingStatus({\r\n fieldName: 'loadingTable',\r\n fieldValue: false,\r\n })\r\n );\r\n yield put(\r\n actions.GradesManagement.setLoadingStatus({\r\n fieldName: 'loadingGrades',\r\n fieldValue: false,\r\n })\r\n );\r\n yield put(\r\n actions.GradesManagement.setLoadingStatus({\r\n fieldName: 'loadingStats',\r\n fieldValue: false,\r\n })\r\n );\r\n}\r\n\r\nfunction* onUnmountSaga() {\r\n // do nothing\r\n}\r\n\r\nexport default function* gradesManagementWatcher() {\r\n yield takeLatest('GradesManagement/onMount', getGradesStatsSaga);\r\n yield takeLatest('GradesManagement/onMount', changeYearRequestSaga);\r\n yield takeLatest('GradesManagement/onUnmount', onUnmountSaga);\r\n yield takeLatest('GradesManagement/changeYearRequest', changeYearRequestSaga);\r\n}\r\n","import { call, put, takeLatest, select } from 'redux-saga/effects';\r\nimport { actions } from 'store/rootSlices';\r\nimport API from 'api';\r\nimport { getValidGradeValues, compressGradeData } from '../utils.js';\r\nimport { getCurrentRoute } from 'utils';\r\nimport { t } from 'app';\r\nimport ErrorHandler from 'shared/errorHandler';\r\n\r\nconst { navigateTo, navigateBack } = actions.App;\r\n\r\nfunction* fetchGradeData(action) {\r\n try {\r\n const response = yield call(API.pautas.getDecryptedGrade.call, action.payload);\r\n const gradeDetails = yield call(API.pautas.getGradeDetails.call, action.payload);\r\n let hDados, bDados, fDados, dicionarios, regimes = {};\r\n\r\n response.forEach((item) => {\r\n switch (item.type) {\r\n case 'HDADOS':\r\n hDados = item;\r\n break;\r\n case 'BDADOS':\r\n bDados = item.data;\r\n break;\r\n case 'FDADOS':\r\n fDados = item;\r\n break;\r\n case 'Dicionarios':\r\n dicionarios = item;\r\n break;\r\n case 'Regimes':\r\n regimes = item;\r\n break;\r\n }\r\n });\r\n\r\n yield put(actions.EditGrades.setHDADOS(hDados));\r\n yield put(actions.EditGrades.setGradeData(bDados));\r\n yield put(actions.EditGrades.setFDADOS(fDados));\r\n yield put(actions.EditGrades.setDicionarios(dicionarios));\r\n yield put(actions.EditGrades.setRegimes(regimes));\r\n yield put(actions.EditGrades.setGradeDetails(gradeDetails));\r\n\r\n const validValues = getValidGradeValues(hDados, dicionarios);\r\n yield put(actions.EditGrades.setValidGradeValues(validValues));\r\n\r\n } catch (error: any) {\r\n console.error('Error in fetchGradeData:', error);\r\n const shouldRun = yield call(ErrorHandler, error);\r\n }\r\n yield put(\r\n actions.EditGrades.setLoadingStatus({\r\n fieldName: 'loadingGradeData',\r\n fieldValue: false,\r\n })\r\n );\r\n yield put(\r\n actions.EditGrades.setLoadingStatus({\r\n fieldName: 'loadingTable',\r\n fieldValue: false,\r\n })\r\n );\r\n}\r\n\r\nfunction* saveOrSubmitGradesSaga(action) {\r\n try {\r\n yield put(\r\n actions.EditGrades.setLoadingStatus({\r\n fieldName: 'loadingTable',\r\n fieldValue: true,\r\n })\r\n );\r\n const { HDADOS, examDate } = yield select(state => state.EditGrades);\r\n\r\n const editedGradesData = action.payload.gradesEdits;\r\n const isSubmission = action.payload.isSubmission;\r\n const codigoPauta = action.payload.codigoPauta;\r\n \r\n // Prepare the data in the required format\r\n const studentsGrades = Object.entries(editedGradesData).map(([nmec, grade]) => ({\r\n nmec,\r\n grade\r\n }));\r\n \r\n // Return the complete object\r\n const formattedData = {\r\n codigo_pauta: codigoPauta,\r\n data_exame: (examDate || HDADOS.dataExame), \r\n students_grades: studentsGrades\r\n };\r\n\r\n const compressedData = compressGradeData(formattedData);\r\n\r\n isSubmission ?\r\n yield call(API.pautas.putFinalGrade.call, HDADOS.codigoPauta, compressedData) : \r\n yield call(API.pautas.putIntermediateGrade.call, HDADOS.codigoPauta, compressedData);\r\n\r\n if (isSubmission) {\r\n yield put(navigateTo({key: getCurrentRoute().route.childOf}));\r\n }\r\n else {\r\n yield call(fetchGradeData, { \"payload\": HDADOS.codigoPauta });\r\n yield put(actions.EditGrades.clearGradeEdits());\r\n }\r\n \r\n yield put(\r\n actions.EditGrades.setLoadingStatus({\r\n fieldName: 'loadingTable',\r\n fieldValue: false,\r\n })\r\n );\r\n\r\n yield put(actions.Toaster.showToaster({\r\n title: t('pautas.changesSavedSuccessfully'),\r\n icon: 'check',\r\n type: 'success',\r\n }));\r\n \r\n } catch (error) {\r\n yield put(actions.Toaster.showToaster({\r\n title: t('pautas.errorSavingChanges'),\r\n icon: 'error',\r\n type: 'danger',\r\n }));\r\n console.error('Error in saveGradesSaga:', error);\r\n }\r\n}\r\n\r\nfunction* uploadGradesSaga(action) {\r\n try {\r\n const { codigoPauta, nmecColumnIndex, gradeColumnIndex, hasHeader, csvFile } = action.payload;\r\n\r\n const response = yield call(API.pautas.postGradeFile.call, codigoPauta, nmecColumnIndex + 1, gradeColumnIndex + 1, hasHeader, 1, csvFile);\r\n\r\n const gradesData = yield select(state => state.EditGrades.gradesData)\r\n\r\n let gradeEdits = {}\r\n\r\n response.data.forEach((item) => {\r\n if (item.type === 'BDADOS') {\r\n item.data.forEach((updatedGrade) => {\r\n const currentGrade = gradesData.find((grade) => grade.nmec === updatedGrade.nmec);\r\n if (currentGrade && currentGrade.nota !== updatedGrade.nota) {\r\n gradeEdits[updatedGrade.nmec] = updatedGrade.nota;\r\n }\r\n });\r\n }\r\n });\r\n\r\n if (Object.keys(gradeEdits).length > 0) { // Update cells that were successfully imported\r\n yield put(actions.EditGrades.setGradeEdits(gradeEdits));\r\n }\r\n if (response.errors.length > 0 || Object.keys(response.warnings).length > 0) { // Show modal if there are any warnings or errors\r\n yield put(actions.EditGrades.setImportErrors(response.errors));\r\n yield put(actions.EditGrades.setImportWarnings(response.warnings));\r\n yield put(actions.EditGrades.setIsErrorsModalOpen());\r\n }\r\n else if (Object.keys(gradeEdits).length > 0) { // If there are no errors or warnings and there is at least 1 imported grade, show success toaster\r\n yield put(actions.Toaster.showToaster({\r\n title: t('pautas.importSuccessToaster'),\r\n icon: 'check',\r\n type: 'success',\r\n }));\r\n }\r\n\r\n yield put(\r\n actions.EditGrades.setLoadingStatus({\r\n fieldName: 'loadingCSVData',\r\n fieldValue: false,\r\n })\r\n );\r\n\r\n } catch (error) {\r\n console.error('Error in uploadGradesSaga:', error);\r\n yield put(actions.Toaster.showToaster({\r\n title: t('pautas.errorImportingGrades'),\r\n icon: 'error',\r\n type: 'danger',\r\n }));\r\n }\r\n}\r\n\r\nfunction* onMountSaga(action) {\r\n yield call(fetchGradeData, action);\r\n}\r\n\r\nfunction* onUnmountSaga() {\r\n yield put(actions.EditGrades.reset());\r\n}\r\n\r\nexport default function* editGradesWatcher() {\r\n yield takeLatest('EditGrades/onMount', onMountSaga);\r\n yield takeLatest('EditGrades/onUnmount', onUnmountSaga);\r\n yield takeLatest(\"EditGrades/fetchGradeData\", fetchGradeData);\r\n yield takeLatest(\"EditGrades/uploadGrades\", uploadGradesSaga);\r\n yield takeLatest(\"EditGrades/saveOrSubmitGrades\", saveOrSubmitGradesSaga);\r\n}","import { call, put, takeLatest, select } from 'redux-saga/effects';\r\nimport { actions } from 'store/rootSlices';\r\nimport { t } from 'app';\r\nimport ErrorHandler from 'shared/errorHandler';\r\nimport API from 'api';\r\nimport { getPautaData } from './selectors';\r\n\r\nfunction* fetchGradeDetailsSaga(action) {\r\n try {\r\n const codigoPauta = action.payload.codigoPauta;\r\n const response = yield call(API.pautas.getGradeDetails.call, codigoPauta);\r\n yield put(actions.GradesDetails.setGradeDetails(response));\r\n } catch (error) {\r\n console.error(error);\r\n const shouldRun = yield call(ErrorHandler, error);\r\n }\r\n yield put(\r\n actions.GradesDetails.setLoadingStatus({\r\n fieldName: 'loadingGradeDetailsInfo',\r\n fieldValue: false,\r\n })\r\n );\r\n}\r\n\r\nfunction* fetchDecryptedGradeSaga(action) {\r\n try {\r\n const codigoPauta = action.payload.codigoPauta;\r\n const response = yield call(API.pautas.getDecryptedGrade.call, codigoPauta);\r\n\r\n // Extracting hdadosItem and bdadosItem\r\n const hdadosItem = response.find(item => item.type === 'HDADOS');\r\n const bdadosItem = response.find(item => item.type === 'BDADOS');\r\n\r\n if (!hdadosItem || !bdadosItem) {\r\n console.error(\"BDADOS or HDADOS data not found\");\r\n return;\r\n }\r\n\r\n // Set dataExame\r\n const dataExame = hdadosItem.dataExame;\r\n if (dataExame) {\r\n yield put(actions.GradesDetails.setDataExame(dataExame));\r\n }\r\n\r\n // Compute and set gradeCounts\r\n const studentData = bdadosItem.data as StudentData[];\r\n const gradeCounts = studentData.reduce((acc, curr) => {\r\n const grade = curr.nota;\r\n acc[grade] = (acc[grade] || 0) + 1;\r\n return acc;\r\n }, {});\r\n\r\n\r\n yield put(actions.GradesDetails.setGradeCounts(gradeCounts));\r\n } catch (error) {\r\n console.error('Error in fetchDecryptedGradeSaga:', error);\r\n const shouldRun = yield call(ErrorHandler, error);\r\n }\r\n yield put(\r\n actions.GradesDetails.setLoadingStatus({\r\n fieldName: 'loadingGradeDetailsCounts',\r\n fieldValue: false,\r\n })\r\n );\r\n}\r\n\r\nfunction* fetchPdfSaga() {\r\n try {\r\n const [pauta] = yield select(getPautaData);\r\n\r\n if (!pauta || pauta.length === 0) {\r\n console.error(\"pauta is empty.\");\r\n yield put(actions.GradesDetails.setIsPdfReady(false));\r\n return;\r\n }\r\n\r\n let documentId: string | undefined = pauta.comAssinaturaId || pauta.paraAssinaturaId;\r\n let isSigned = pauta.comAssinaturaId ? true : false;\r\n\r\n if (!documentId) {\r\n console.error(\"Neither comAssinaturaId nor paraAssinaturaId found for the current pauta.\");\r\n yield put(actions.GradesDetails.setIsPdfReady(false));\r\n return;\r\n }\r\n\r\n const pdfBlobUrl = yield call(API.pautas.getGradePdf.call, documentId, isSigned);\r\n\r\n yield put(actions.GradesDetails.setPdfUrl(pdfBlobUrl));\r\n yield put(actions.GradesDetails.setIsPdfReady(true));\r\n } catch (error) {\r\n console.error(\"Error fetching PDF: \", error);\r\n yield put(actions.GradesDetails.setIsPdfReady(false));\r\n }\r\n}\r\n\r\n\r\ninterface StudentData {\r\n nota: string;\r\n}\r\n\r\ninterface GradeCounts {\r\n [grade: string]: number;\r\n}\r\n\r\nfunction* onMountSaga() {\r\n try {\r\n yield put(actions.GradesDetails.reset());\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.certificateDetails_errorLoadingPage'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nfunction* onUnmountSaga() {\r\n // yield put(actions.GradesDetails.reset());\r\n}\r\n\r\n// Watcher Saga: Spawns a new fetchGradeDetailsSaga on each action dispatched\r\nexport default function* gradeDetailsWatcher() {\r\n yield takeLatest('GradesDetails/onMount', onMountSaga);\r\n yield takeLatest('GradesDetails/onUnmount', onUnmountSaga);\r\n yield takeLatest('GradesDetails/getGradeDetails', fetchGradeDetailsSaga);\r\n yield takeLatest('GradesDetails/getGradeDetails', fetchDecryptedGradeSaga);\r\n yield takeLatest('GradesDetails/fetchPdf', fetchPdfSaga);\r\n}\r\n","import { call, takeLatest, put, select, all } from 'redux-saga/effects';\r\nimport { actions } from 'store/rootSlices';\r\nimport { t } from 'app';\r\nimport ErrorHandler from 'shared/errorHandler';\r\n\r\nimport API from 'api';\r\nimport * as selectors from './selectors';\r\n\r\nfunction* getGradeHistorySaga(action) {\r\n try {\r\n const codigoPauta = action.payload.codigoPauta;\r\n const responseHistory = yield call(API.pautas.getGradeHistory.call, codigoPauta);\r\n const responseDetails = yield call(API.pautas.getGradeDetails.call, codigoPauta);\r\n\r\n // Dispatch actions to update the store\r\n yield put(actions.GradesHistory.setGradeHistory(responseHistory));\r\n yield put(actions.GradesHistory.setGradeDetails(responseDetails));\r\n } catch (error) {\r\n const shouldRun = yield call(ErrorHandler, error);\r\n }\r\n yield put(\r\n actions.GradesHistory.setLoadingStatus({\r\n fieldName: 'loadingGradeHistory',\r\n fieldValue: false,\r\n })\r\n );\r\n}\r\n\r\nfunction* onMountSaga() {\r\n try {\r\n yield put(actions.GradesHistory.reset());\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.certificateDetails_errorLoadingPage'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nfunction* onUnmountSaga() {\r\n // yield put(actions.GradesHistory.reset());\r\n}\r\n\r\nexport default function* gradesManagementWatcher() {\r\n yield takeLatest('GradeHistory/onMount', onMountSaga);\r\n yield takeLatest('GradeHistory/getGradeHistory', getGradeHistorySaga);\r\n yield takeLatest('GradeHistory/onUnmount', onUnmountSaga);\r\n}\r\n","/**\r\n * Schedules utils\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport moment from 'moment';\r\n\r\nexport const getScheduleInterval = (ucs, currentInterval) => {\r\n let interval = { ...currentInterval };\r\n\r\n ucs.forEach((uc) => {\r\n uc.classSchedule.forEach((classItem) => {\r\n const currentIntervalMin = moment(interval.min, 'HH:mm:ss');\r\n const classMin = moment(classItem.startTime, 'HH:mm:ss');\r\n\r\n const currentIntervalMax = moment(interval.max, 'HH:mm:ss');\r\n const classMax = moment(classItem.endTime, 'HH:mm:ss');\r\n\r\n if (classMin.isBefore(currentIntervalMin)) {\r\n interval.min = classMin.format('HH:mm:ss');\r\n }\r\n\r\n if (classMax.isAfter(currentIntervalMax)) {\r\n interval.max = classMax.format('HH:mm:ss');\r\n }\r\n });\r\n });\r\n\r\n return interval;\r\n};\r\n","/**\r\n * MySchedules scene sagas\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport { call, takeLatest, put, putResolve, select } from 'redux-saga/effects';\r\n\r\nimport { t } from 'app';\r\n\r\nimport API from 'api';\r\n\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './selectors';\r\n\r\nimport { IScheduleToDelete } from './slice';\r\n\r\nimport { immutableRemove } from 'utils';\r\nimport { reformatUcs } from 'scenes/Schedules/MySchedule/utils';\r\n\r\nimport { getScheduleInterval } from 'scenes/Schedules/utils';\r\n\r\nimport { IMySchedule, ICreatedScheduleClass } from 'shared/types';\r\n\r\nimport { sortSchedules } from '../utils';\r\n\r\nimport ErrorHandler from 'shared/errorHandler';\r\n\r\ninterface IGetSchedules {\r\n type: 'MySchedules/getSchedules';\r\n payload: {\r\n registrationId: number;\r\n activateLoading: boolean;\r\n data?: any;\r\n };\r\n}\r\n\r\ninterface IDeleteScheduleSaga {\r\n type: 'MySchedules/deleteSchedule';\r\n payload: IScheduleToDelete;\r\n}\r\n\r\ninterface IUpdateSchedulesSaga {\r\n type: 'MySchedules/updateSchedules';\r\n payload: IMySchedule[];\r\n}\r\n\r\ninterface IGetScheduleToViewSaga {\r\n type: 'MySchedules/getScheduleToView';\r\n payload: { id: number; finishedPhase: boolean };\r\n}\r\n\r\nfunction* onMountSaga() {\r\n try {\r\n yield put(actions.MySchedules.setLoadingSchedules(true));\r\n yield putResolve(actions.MySchedules.reset());\r\n yield putResolve(actions.StudentRegistrationDropdown.getRegistrations());\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(actions.Schedules.setRestriction(true));\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionErrorGetSchedule_plural', { textOnly: true }),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nfunction* onPhaseUpdateSaga() {\r\n yield put(actions.MySchedules.setLoadingSchedules(true));\r\n const registration = yield select(selectors.getRegistration);\r\n yield put(\r\n actions.MySchedules.getSchedules({ registrationId: registration, activateLoading: true })\r\n );\r\n}\r\n\r\nfunction* getSchedulesSaga(action: IGetSchedules) {\r\n try {\r\n yield put(actions.MySchedules.setLoadingSchedules(action.payload.activateLoading));\r\n\r\n if (!action.payload.registrationId) {\r\n return;\r\n }\r\n\r\n const phases = yield call(API.sgh.getPhases.call);\r\n const currentPhase = yield call(API.sgh.getStudentAccess.call, {\r\n registrationId: action.payload.registrationId,\r\n });\r\n const isCurrentPhaseActive = phases.find(p => { return p.period === currentPhase.period && p.name === currentPhase.name })?.isActive ?? false\r\n yield putResolve(\r\n actions.MySchedules.setCurrentActivePhase(\r\n currentPhase.name !== null && currentPhase.name !== undefined && !currentPhase.finished && isCurrentPhaseActive\r\n ? currentPhase.name\r\n : null\r\n )\r\n );\r\n\r\n yield putResolve(\r\n actions.MySchedules.setCurrentPhase({\r\n phase: currentPhase.name,\r\n year: currentPhase.year,\r\n period: currentPhase.period,\r\n isFree: currentPhase.type === 'queue',\r\n finished: currentPhase.finished,\r\n hasAllocatedSchedule: currentPhase.hasAllocatedSchedule,\r\n attemptedSchedule: currentPhase.attemptedSchedule,\r\n seriationFinished: currentPhase.seriationFinished,\r\n })\r\n );\r\n\r\n if (!currentPhase.hasAccess) {\r\n yield put(actions.MySchedules.setWarningNoAccess(true));\r\n yield put(actions.MySchedules.setWarningNoAccessMotive(currentPhase.motive));\r\n } else {\r\n yield put(actions.MySchedules.setWarningNoAccess(false));\r\n yield put(actions.MySchedules.setWarningNoAccessMotive(''));\r\n\r\n yield put(\r\n actions.MySchedules.setShowHistory(\r\n currentPhase.attemptedSchedule && currentPhase.seriationFinished\r\n )\r\n );\r\n\r\n const createdSchedules = action.payload.data\r\n ? action.payload.data\r\n : yield call(API.sgh.getSchedules.call, {\r\n registrationId: action.payload.registrationId,\r\n });\r\n\r\n yield put(actions.MySchedules.setLastSeriatedPhase(createdSchedules.lastSeriatedPhase));\r\n yield put(actions.MySchedules.setNextSeriationDate(createdSchedules.nextSeriationDate));\r\n yield put(actions.MySchedules.setSeriationDate(createdSchedules.seriationDate));\r\n\r\n const sortedSchedules = sortSchedules(\r\n createdSchedules,\r\n currentPhase.name !== null && currentPhase.name !== undefined && !currentPhase.finished\r\n );\r\n yield put(actions.MySchedules.setSchedules(sortedSchedules));\r\n }\r\n\r\n yield put(actions.MySchedules.setLoadingSchedules(false));\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n if (e?.response?.data?.errcode === 'ERR_PHASE_NO_PERMISSION') {\r\n yield put(actions.MySchedules.setWarningNoAccess(true));\r\n } else {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionErrorGetSchedule_plural', { textOnly: true }),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n }\r\n}\r\n\r\nfunction* deleteScheduleSaga(action: IDeleteScheduleSaga) {\r\n try {\r\n const { id } = action.payload;\r\n const { createdSchedules } = yield select(selectors.getMySchedulesSlice);\r\n\r\n const registration = yield select(selectors.getRegistration);\r\n\r\n yield put(actions.MySchedules.setSavingMySchedules(true));\r\n\r\n const indexOfSchedule = createdSchedules.activePhase.schedules.findIndex(\r\n (schedule) => schedule.id === id\r\n );\r\n const newSchedules = immutableRemove(\r\n createdSchedules.activePhase.schedules,\r\n indexOfSchedule\r\n ).map((schedule, key) => {\r\n if (key >= indexOfSchedule) {\r\n return { ...schedule, preference: schedule.preference - 1 };\r\n }\r\n return schedule;\r\n });\r\n\r\n const updatedSchedules = {\r\n ...createdSchedules,\r\n ...{ activePhase: { ...createdSchedules.activePhase, schedules: newSchedules } },\r\n };\r\n\r\n yield call(API.sgh.deleteSchedule.call, [{ scheduleId: id, registrationId: registration }]);\r\n\r\n yield put(actions.MySchedules.removeScheduleToDelete());\r\n yield put(actions.MySchedules.setSchedules(updatedSchedules));\r\n\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionSuccessUpdateSchedule_plural'),\r\n icon: 'check',\r\n type: 'success',\r\n })\r\n );\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionErrorRemoveSchedule'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n } finally {\r\n yield put(actions.MySchedules.setSavingMySchedules(false));\r\n }\r\n}\r\n\r\nfunction* updateSchedulesSaga(action: IUpdateSchedulesSaga) {\r\n const { createdSchedules } = yield select(selectors.getMySchedulesSlice);\r\n const schedulesPayload = action.payload;\r\n\r\n try {\r\n yield put(actions.MySchedules.setSavingMySchedules(true));\r\n\r\n const registration = yield select(selectors.getRegistration);\r\n\r\n const updatedSchedules = {\r\n ...createdSchedules,\r\n ...{ activePhase: { ...createdSchedules.activePhase, schedules: schedulesPayload } },\r\n };\r\n\r\n yield put(actions.MySchedules.setSchedules(updatedSchedules));\r\n\r\n const formattedSchedules = schedulesPayload.map((schedule) => ({\r\n id: schedule.id,\r\n preference: schedule.preference,\r\n }));\r\n\r\n const output = yield call(API.sgh.patchSchedule.call, {\r\n registrationId: registration,\r\n schedules: formattedSchedules,\r\n });\r\n\r\n yield put(\r\n actions.MySchedules.getSchedules({\r\n registrationId: registration,\r\n activateLoading: false,\r\n data: output,\r\n })\r\n );\r\n\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionSuccessUpdateSchedule_plural', { textOnly: true }),\r\n icon: 'check',\r\n type: 'success',\r\n })\r\n );\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionErrorUpdateSchedule_plural', { textOnly: true }),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n } finally {\r\n yield put(actions.MySchedules.setSavingMySchedules(false));\r\n }\r\n}\r\n\r\nfunction* getScheduleToViewSaga(action: IGetScheduleToViewSaga) {\r\n const registration = yield select(selectors.getRegistration);\r\n const { scheduleGridInterval } = yield select(selectors.getMySchedulesSlice);\r\n // Get UCs in order to be able to create an object\r\n // that match the structure\r\n const { id, finishedPhase } = action.payload;\r\n\r\n try {\r\n yield put(actions.MySchedules.showScheduleModalOpening());\r\n yield put(actions.MySchedules.setLoadingScheduleToView(true));\r\n\r\n const scheduleToView = yield call(API.sgh.getSchedule.call, id, registration);\r\n\r\n const ucs = {\r\n normal: scheduleToView?.normal,\r\n mandatory: scheduleToView?.mandatory,\r\n free: scheduleToView?.free,\r\n };\r\n\r\n let { allUcs } = reformatUcs(ucs, false, false, false, false, finishedPhase);\r\n //filter only selected items\r\n allUcs = allUcs.map((ucUnit) => ({\r\n ...ucUnit,\r\n classSchedule: ucUnit.classSchedule.filter((classItem) => classItem.selected),\r\n }));\r\n\r\n yield put(actions.MySchedules.setUcs({ ucs: allUcs, hideFaces: finishedPhase }));\r\n\r\n yield put(\r\n actions.MySchedules.setScheduleGridInterval(getScheduleInterval(allUcs, scheduleGridInterval))\r\n );\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionErrorGetScheduleToView'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n } finally {\r\n yield put(actions.MySchedules.setLoadingScheduleToView(false));\r\n }\r\n}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('MySchedules/onMount', onMountSaga);\r\n yield takeLatest('MySchedules/onPhaseUpdate', onPhaseUpdateSaga);\r\n yield takeLatest('MySchedules/getSchedules', getSchedulesSaga);\r\n yield takeLatest('MySchedules/updateSchedules', updateSchedulesSaga);\r\n yield takeLatest('MySchedules/deleteSchedule', deleteScheduleSaga);\r\n yield takeLatest('MySchedules/getScheduleToView', getScheduleToViewSaga);\r\n}\r\n","/**\r\n * Mandatory Options Dropdown container\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { put, call, takeLatest } from 'redux-saga/effects';\r\n\r\nimport { t } from 'app';\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport { getSelectedOptionKey } from '../utils';\r\n\r\nimport ErrorHandler from 'shared/errorHandler';\r\n\r\nfunction* setMandatoryOptionsSaga(action: any) {\r\n const mandatoryOptions = action.payload;\r\n const { setOptions } = actions.MandatoryOptionsDropdown;\r\n const { showToaster } = actions.Toaster;\r\n\r\n try {\r\n const newOptions = mandatoryOptions\r\n ? mandatoryOptions.map((option, index) => {\r\n let selectedOptionKey = getSelectedOptionKey(option);\r\n\r\n return {\r\n id: index + 1,\r\n optionId: option.id,\r\n selected: selectedOptionKey,\r\n name: option.name,\r\n open: selectedOptionKey ? true : false,\r\n ucs: option.ucs,\r\n };\r\n })\r\n : [];\r\n\r\n yield put(setOptions(newOptions));\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(setOptions([]));\r\n\r\n yield put(\r\n showToaster({\r\n title: t('sgh.actionErrorGetMandatoryOptions'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('MandatoryOptionsDropdown/setMandatoryOptions', setMandatoryOptionsSaga);\r\n}\r\n","/**\r\n * Toaster container sagas\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nexport default function* watcherSignin() {}\r\n","/**\r\n * Toaster container sagas\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\nimport { takeLatest, delay, put } from 'redux-saga/effects';\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\nfunction* timeoutAndHideToaster() {\r\n const { unsetDisplayToasterAction } = actions.ToasterAction;\r\n\r\n yield delay(500);\r\n\r\n yield put(unsetDisplayToasterAction());\r\n}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('ToasterAction/closeToasterAction', timeoutAndHideToaster);\r\n}\r\n","/**\r\n * Schedules scene sagas\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport { put, putResolve, all, call, takeLatest, select } from 'redux-saga/effects';\r\n\r\nimport { t } from 'app';\r\n\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './selectors';\r\nimport * as mandatoryDropdownSelectors from '../containers/MandatoryOptionsDropdown/logic/selectors';\r\nimport * as freeDropdownSelectors from '../containers/FreeOptionsDropdown/logic/selectors';\r\n\r\nimport API from 'api';\r\n\r\nimport { getCurrentRoute } from 'utils';\r\nimport {\r\n reformatUcs,\r\n setClassesTypologies,\r\n getScheduleSelectedClasses,\r\n} from 'scenes/Schedules/MySchedule/utils';\r\n\r\nimport { getScheduleInterval } from 'scenes/Schedules/utils';\r\n\r\nimport { IUc, ICreatedSchedule } from 'shared/types';\r\n\r\nimport ErrorHandler from 'shared/errorHandler';\r\n\r\ninterface IGetRegistrationSchedule {\r\n registrationId: number;\r\n schedule?: any;\r\n}\r\n\r\ninterface IEditSchedule {\r\n type: 'Schedules/editSchedule';\r\n payload: number;\r\n}\r\ninterface IDeleteScheduleSaga {\r\n type: 'Schedules/deleteSchedule';\r\n payload: number;\r\n}\r\n\r\nfunction* onMountSaga() {\r\n try {\r\n yield put(actions.Schedules.setLoadingSchedule(true));\r\n yield putResolve(actions.Schedules.reset());\r\n yield putResolve(actions.StudentRegistrationDropdown.getRegistrations());\r\n //it was commented to remove a flash apeearing in the page\r\n yield put(actions.Schedules.setLoadingSchedule(false));\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(actions.Schedules.setRestriction(true));\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionErrorGetPhase'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nfunction* onPhaseUpdateSaga() {\r\n yield putResolve(actions.Schedules.setLoadingRestriction(true));\r\n yield put(actions.Schedules.getAccessAndUcs());\r\n}\r\n\r\nfunction* getAccessAndUcsSaga() {\r\n try {\r\n yield putResolve(actions.Schedules.setRestriction(null));\r\n yield put(actions.Schedules.setLoadingRestriction(true));\r\n\r\n if (\r\n getCurrentRoute().route.key === 'mySchedule' ||\r\n getCurrentRoute().route.key === 'createSchedule'\r\n ) {\r\n const registration = yield select(selectors.getRegistration);\r\n \r\n const phases = yield call(API.sgh.getPhases.call);\r\n const {\r\n name,\r\n year,\r\n period,\r\n finished,\r\n type,\r\n hasAccess,\r\n motive,\r\n seriationFinished,\r\n hasAllocatedSchedule,\r\n attemptedSchedule,\r\n } = yield call(API.sgh.getStudentAccess.call, {\r\n registrationId: registration,\r\n });\r\n\r\n \r\n const isCurrentPhaseActive = phases.find(p => { return p.period === period && p.name === name})?.isActive ?? false\r\n yield put(actions.Schedules.setIsCurrentPhaseActive(isCurrentPhaseActive))\r\n\r\n // attemptedSchedule save if user attempted to create a schedule last time phases were open\r\n // This will allow us to display a more specific/significant message for the lack of schedule\r\n yield put(\r\n actions.Schedules.setCurrentPhase({\r\n phase: name,\r\n year: year,\r\n period: period,\r\n isFree: type === 'queue',\r\n finished,\r\n hasAllocatedSchedule,\r\n attemptedSchedule,\r\n seriationFinished,\r\n })\r\n );\r\n\r\n if (!hasAccess) {\r\n // If the access is not restricted, this action will, basically, tell the loader to finish its animation\r\n // and, when its finished, the loader callback will dispatch 'mySchedulesSaga' to continue the flow\r\n yield put(actions.Schedules.setRestriction(!hasAccess));\r\n yield put(actions.Schedules.setRestrictionMotive(motive));\r\n yield put(actions.Schedules.setLoadingSchedule(false));\r\n } else {\r\n yield* getCurrentModeSaga();\r\n }\r\n } else {\r\n yield* getCurrentModeSaga();\r\n }\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(actions.Schedules.setRestriction(true));\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionErrorGetPhase'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n } finally {\r\n yield put(actions.Schedules.setLoadingRestriction(false));\r\n }\r\n}\r\n\r\nfunction* getCurrentModeSaga() {\r\n if (\r\n getCurrentRoute().route.key === 'mySchedule' ||\r\n getCurrentRoute().route.key === 'createSchedule'\r\n ) {\r\n const registration = yield select(selectors.getRegistration);\r\n if (getCurrentRoute().route.key === 'mySchedule') {\r\n yield putResolve(actions.Schedules.setCurrentMode('view'));\r\n } else {\r\n yield putResolve(actions.Schedules.setCurrentMode('create'));\r\n }\r\n yield* getRegistrationScheduleSaga({\r\n registrationId: registration,\r\n });\r\n } else if (getCurrentRoute().route.key === 'editSchedule') {\r\n yield putResolve(actions.Schedules.setCurrentMode('edit'));\r\n yield* handleScheduleEditOrDuplicateModeSaga();\r\n } else if (getCurrentRoute().route.key === 'duplicateSchedule') {\r\n yield putResolve(actions.Schedules.setCurrentMode('duplicate'));\r\n yield* handleScheduleEditOrDuplicateModeSaga();\r\n }\r\n}\r\n\r\nfunction* handleScheduleEditOrDuplicateModeSaga() {\r\n const scheduleIdToEdit = getCurrentRoute().params.id;\r\n const registration = yield select(selectors.getRegistration);\r\n\r\n let scheduleToEdit: ICreatedSchedule | null = null;\r\n\r\n try {\r\n scheduleToEdit = yield call(API.sgh.getSchedule.call, scheduleIdToEdit, registration);\r\n\r\n if (scheduleToEdit) {\r\n if (getCurrentRoute().route.key === 'editSchedule') {\r\n yield putResolve(actions.Schedules.setScheduleName(scheduleToEdit.name));\r\n }\r\n\r\n yield putResolve(\r\n actions.StudentRegistrationDropdown.setRegistration(scheduleToEdit.registrationId)\r\n );\r\n\r\n const {\r\n name,\r\n year,\r\n period,\r\n finished,\r\n type,\r\n motive,\r\n hasAccess,\r\n hasAllocatedSchedule,\r\n attemptedSchedule,\r\n seriationFinished,\r\n } = yield call(API.sgh.getStudentAccess.call, {\r\n registrationId: scheduleToEdit.registrationId,\r\n });\r\n\r\n // attemptedSchedule save if user attempted to create a schedule last time phases were open\r\n // This will allow us to display a more specific/significant message for the lack of schedule\r\n yield put(\r\n actions.Schedules.setCurrentPhase({\r\n phase: name,\r\n year: year,\r\n period: period,\r\n isFree: type === 'queue',\r\n finished,\r\n hasAllocatedSchedule,\r\n attemptedSchedule,\r\n seriationFinished,\r\n })\r\n );\r\n\r\n if (!hasAccess) {\r\n // If the access is not restricted, this action will, basically, tell the loader to finish its animation\r\n // and, when its finished, the loader callback will dispatch 'mySchedulesSaga' to continue the flow\r\n yield put(actions.Schedules.setRestriction(!hasAccess));\r\n yield put(actions.Schedules.setRestrictionMotive(motive));\r\n } else {\r\n yield put(\r\n actions.Breadcrumb.overridePath({ key: 'editschedules', name: scheduleToEdit.name })\r\n );\r\n\r\n // Ensure that schedule grid/list are both clean\r\n yield put(actions.Schedules.clearSchedule());\r\n\r\n yield* getRegistrationScheduleSaga({\r\n registrationId: scheduleToEdit.registrationId,\r\n schedule: scheduleToEdit,\r\n });\r\n\r\n yield put(actions.Schedules.setScheduleToEdit(scheduleToEdit));\r\n }\r\n }\r\n yield put(actions.Schedules.setLoadingSchedule(false));\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionErrorGetSchedule'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nfunction* getRegistrationScheduleSaga(action: IGetRegistrationSchedule) {\r\n const currentPhase = yield select(selectors.getCurrentPhase);\r\n const { currentMode, scheduleGridInterval } = yield select(selectors.getSchedulesSlice);\r\n\r\n try {\r\n yield put(actions.Schedules.setLoadingSchedule(true));\r\n\r\n //this is called when changing registration id or when seriation updates. Therefore registrationID can be different\r\n const registration = action.registrationId || (yield select(selectors.getRegistration));\r\n let ucs;\r\n if (action.schedule !== null && action.schedule !== undefined) {\r\n ucs = {\r\n normal: action.schedule?.normal,\r\n mandatory: action.schedule?.mandatory,\r\n free: action.schedule?.free,\r\n };\r\n } else {\r\n ucs = yield call(API.sgh.getUcs.call, {\r\n registrationId: registration,\r\n });\r\n }\r\n\r\n const { mandatoryUcs, freeUcs, freeOptions, allUcs } = reformatUcs(\r\n ucs,\r\n currentMode === 'view' ||\r\n currentPhase?.finished ||\r\n (!currentPhase.phase && !currentPhase?.finished)\r\n );\r\n\r\n const unfilteredUcsToCount = reformatUcs(\r\n ucs,\r\n currentPhase?.finished || (!currentPhase.phase && !currentPhase?.finished)\r\n );\r\n\r\n const typologies = setClassesTypologies(ucs);\r\n yield put(actions.MandatoryOptionsDropdown.setMandatoryOptions(mandatoryUcs));\r\n yield put(actions.FreeOptionsDropdown.setFreeOptions({ ucs: freeUcs, options: freeOptions }));\r\n yield putResolve(actions.Schedules.setUcs(allUcs));\r\n yield putResolve(actions.Schedules.setUnfilteredUcs(unfilteredUcsToCount));\r\n yield putResolve(actions.Schedules.setMandatoryUcs(mandatoryUcs));\r\n yield putResolve(actions.Schedules.setFreeUcs(freeUcs));\r\n yield putResolve(actions.Schedules.setFreeOptionsGroups(freeOptions));\r\n\r\n yield put(\r\n actions.Schedules.setScheduleGridInterval(getScheduleInterval(allUcs, scheduleGridInterval))\r\n );\r\n //yield put(actions.Schedules.setPeriods(response.weeks || []));\r\n yield put(actions.Schedules.setClassesTypologies(typologies));\r\n //yield put(actions.Schedules.setPeriod(response.weeks ? response.weeks[0] : null));\r\n yield put(actions.Schedules.setCreatedSchedules(ucs.schedulesNumber));\r\n\r\n //Set a default translated scheduleName\r\n if (currentPhase?.phase && !currentPhase?.finished) {\r\n if (getCurrentRoute().route.key === 'createSchedule') {\r\n yield put(\r\n actions.Schedules.setScheduleName(\r\n `${t('sgh.schedule', { textOnly: true })} ${parseInt(ucs.schedulesNumber) + 1}`\r\n )\r\n );\r\n }\r\n if (getCurrentRoute().route.key === 'duplicateSchedule') {\r\n let copiedScheduleName = `${t('sgh.schedule', { textOnly: true })} ${\r\n parseInt(action?.schedule?.schedulesNumber) + 1\r\n }`;\r\n yield put(actions.Schedules.setScheduleName(copiedScheduleName));\r\n }\r\n }\r\n\r\n // According to currentPhase we should show freeOptions and open grid mode to exchange classes\r\n // Ucs need to be filtered according to allocated value, in order to use them for the exchange class grid\r\n yield put(actions.Schedules.setLoadingSchedule(false));\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(actions.Schedules.setUcs([]));\r\n yield put(actions.Schedules.setSchedulesNumber(0));\r\n yield put(actions.Schedules.setPeriods([]));\r\n yield put(actions.Schedules.setClassesTypologies([]));\r\n yield put(actions.Schedules.setPeriod(''));\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionErrorGetUcs'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nfunction* filterClassesByPeriodSaga() {\r\n const { ucs, period } = yield select(selectors.getSchedulesSlice);\r\n\r\n const filteredUcs = ucs.map((eachUc) => {\r\n return {\r\n ...eachUc,\r\n classSchedule: eachUc.classSchedule.map((eachClass) => {\r\n if (eachClass.period && eachClass.period !== period) {\r\n return { ...eachClass, filtered: true };\r\n } else {\r\n return { ...eachClass, filtered: false };\r\n }\r\n }),\r\n };\r\n });\r\n\r\n yield put(actions.Schedules.setUcs(filteredUcs));\r\n}\r\n\r\nfunction* getStudentTotalChoicesSaga() {\r\n const { ucs, unfilteredUcs } = yield select(selectors.getSchedulesSlice);\r\n const mandatoryOptions = yield select(mandatoryDropdownSelectors.getMandatoryOptions);\r\n const freeOptions = yield select(freeDropdownSelectors.getFreeOptions);\r\n\r\n let totalChoices = 0;\r\n\r\n if (mandatoryOptions?.options) {\r\n mandatoryOptions.options.forEach((mandatoryOption) => {\r\n if (mandatoryOption?.selected !== null) {\r\n totalChoices += mandatoryOption.ucs[mandatoryOption.selected].ucTotalChoices;\r\n } else {\r\n totalChoices++;\r\n }\r\n });\r\n }\r\n\r\n if (freeOptions?.options) {\r\n freeOptions.options.forEach((freeOption) => {\r\n if (freeOption?.selected !== null) {\r\n totalChoices += freeOption.ucs[freeOption.selected].ucTotalChoices || 1;\r\n } else {\r\n totalChoices++;\r\n }\r\n });\r\n }\r\n\r\n if (unfilteredUcs.normalUcs) {\r\n totalChoices =\r\n unfilteredUcs.normalUcs\r\n .filter((uc) => !uc.classSchedule.every((classItem) => classItem.filtered))\r\n .reduce((acc: number, uc: IUc) => {\r\n return acc + (uc.ucTotalChoices || 0);\r\n }, 0) + totalChoices;\r\n }\r\n\r\n yield put(actions.Schedules.setStudentTotalChoices(totalChoices));\r\n}\r\n\r\nfunction* submitScheduleSaga() {\r\n const { ucs, scheduleName, createdSchedules } = yield select(selectors.getSchedulesSlice);\r\n const registration = yield select(selectors.getRegistration);\r\n\r\n try {\r\n yield put(actions.Schedules.setLoadingSchedule(true));\r\n yield put(actions.Schedules.setSavingSchedule(true));\r\n\r\n if (createdSchedules >= 30) {\r\n throw new Error('ERR_SGH_SCHEDULE_MAX');\r\n }\r\n\r\n const selectedClasses = getScheduleSelectedClasses(ucs, true);\r\n\r\n yield call(API.sgh.postSchedule.call, {\r\n data: {\r\n name: scheduleName,\r\n registrationId: registration,\r\n classes: selectedClasses,\r\n },\r\n });\r\n // Show success toast\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionSuccessAddSchedule'),\r\n icon: 'check',\r\n type: 'success',\r\n })\r\n );\r\n\r\n yield put(actions.App.navigateTo({ key: 'createdSchedules', forceRefresh: true }));\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n if (\r\n e?.message === 'ERR_SGH_SCHEDULE_MAX' ||\r\n e?.response?.data?.errcode === 'ERR_SGH_SCHEDULE_MAX'\r\n ) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionErrorAddScheduleMax'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n } else {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionErrorAddSchedule'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n\r\n yield put(actions.Schedules.setLoadingSchedule(false));\r\n yield put(actions.Schedules.setSavingSchedule(false));\r\n }\r\n}\r\n\r\nfunction* editScheduleSaga(action: IEditSchedule) {\r\n const { ucs, scheduleName } = yield select(selectors.getSchedulesSlice);\r\n const registration = yield select(selectors.getRegistration);\r\n\r\n try {\r\n yield put(actions.Schedules.setLoadingSchedule(true));\r\n yield put(actions.Schedules.setSavingSchedule(true));\r\n yield put(actions.Schedules.setEditingSchedule(true));\r\n const selectedClasses = getScheduleSelectedClasses(ucs, true);\r\n\r\n yield call(API.sgh.patchSchedule.call, {\r\n registrationId: registration,\r\n schedules: [\r\n {\r\n id: action.payload,\r\n name: scheduleName,\r\n classes: selectedClasses,\r\n },\r\n ],\r\n });\r\n\r\n // Show success toast\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionSuccessUpdateSchedule'),\r\n icon: 'check',\r\n type: 'success',\r\n })\r\n );\r\n\r\n yield put(actions.App.navigateTo({ key: 'createdSchedules' }));\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(actions.Schedules.setEditingSchedule(false));\r\n\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionErrorUpdateSchedule'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n } finally {\r\n yield put(actions.Schedules.setEditingSchedule(false));\r\n yield put(actions.Schedules.setLoadingSchedule(false));\r\n yield put(actions.Schedules.setSavingSchedule(false));\r\n }\r\n}\r\n\r\nfunction* editScheduleNameSaga(action) {\r\n try {\r\n if (getCurrentRoute().route.key === 'editSchedule') {\r\n const scheduleName = action.payload;\r\n const { scheduleToEdit } = yield select(selectors.getSchedulesSlice);\r\n\r\n if (scheduleToEdit && scheduleName !== scheduleToEdit.name) {\r\n const registration = yield select(selectors.getRegistration);\r\n\r\n yield call(API.sgh.patchSchedule.call, {\r\n registrationId: registration,\r\n schedules: [\r\n {\r\n id: scheduleToEdit.id,\r\n name: scheduleName,\r\n },\r\n ],\r\n });\r\n\r\n // Show success toast\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionSuccessUpdateSchedule'),\r\n icon: 'check',\r\n type: 'success',\r\n })\r\n );\r\n }\r\n }\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionErrorUpdateSchedule'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nfunction* deleteScheduleSaga(action: IDeleteScheduleSaga) {\r\n try {\r\n const id = action.payload;\r\n const registration = yield select(selectors.getRegistration);\r\n\r\n yield put(actions.Schedules.setSavingSchedule(true));\r\n yield put(actions.Schedules.setLoadingSchedule(true));\r\n\r\n yield call(API.sgh.deleteSchedule.call, [{ scheduleId: id, registrationId: registration }]);\r\n\r\n yield put(actions.App.navigateTo({ key: 'createdSchedules' }));\r\n\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionSuccessUpdateSchedule_plural'),\r\n icon: 'check',\r\n type: 'success',\r\n })\r\n );\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionErrorRemoveSchedule'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n } finally {\r\n yield put(actions.Schedules.setSavingSchedule(false));\r\n yield put(actions.Schedules.setLoadingSchedule(false));\r\n }\r\n}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('Schedules/onMount', onMountSaga);\r\n yield takeLatest('Schedules/onPhaseUpdate', onPhaseUpdateSaga);\r\n yield takeLatest('Schedules/getAccessAndUcs', getAccessAndUcsSaga);\r\n yield takeLatest('Schedules/getCurrentMode', getCurrentModeSaga);\r\n yield takeLatest(\r\n 'Schedules/handleScheduleEditOrDuplicateMode',\r\n handleScheduleEditOrDuplicateModeSaga\r\n );\r\n yield takeLatest('Schedules/setPeriod', filterClassesByPeriodSaga);\r\n yield takeLatest('Schedules/getStudentTotalChoices', getStudentTotalChoicesSaga);\r\n yield takeLatest('Schedules/setMandatoryOptions', getStudentTotalChoicesSaga);\r\n yield takeLatest('Schedules/removeMandatoryOptions', getStudentTotalChoicesSaga);\r\n yield takeLatest('Schedules/submitSchedule', submitScheduleSaga);\r\n yield takeLatest('Schedules/editSchedule', editScheduleSaga);\r\n yield takeLatest('Schedules/setScheduleName', editScheduleNameSaga);\r\n yield takeLatest('Schedules/deleteSchedule', deleteScheduleSaga);\r\n}\r\n","/**\r\n * FreeOptionsList scene sagas\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { takeLatest } from 'redux-saga/effects';\r\n\r\nfunction* onMountSaga() {}\r\n\r\nfunction* onUnmountSaga() {}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('FreeOptionsList/onMount', onMountSaga);\r\n yield takeLatest('FreeOptionsList/onUnmount', onUnmountSaga);\r\n}\r\n","/**\r\n * FreeOptionsTable container sagas\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { call, takeLatest, put, putResolve, select } from 'redux-saga/effects';\r\n\r\nimport { PayloadAction } from '@reduxjs/toolkit';\r\n\r\nimport { t } from 'app';\r\n\r\nimport API from 'api';\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport * as selectors from './selectors';\r\n\r\nimport ErrorHandler from 'shared/errorHandler';\r\n\r\nimport {\r\n ICallParams,\r\n IRegistration,\r\n DEFAULT_PAGINATION_PARAMS,\r\n IFreeOptionsPayload,\r\n} from '../types';\r\n\r\n\r\nfunction* onMountSaga(action: PayloadAction) {\r\n try {\r\n yield put(\r\n actions.FreeOptionsTable.setLoadingStatus({ fieldName: 'loading', fieldValue: true })\r\n );\r\n \r\n yield putResolve(\r\n actions.FreeOptionsTable.fetchFreeOptionsFilters({\r\n ...DEFAULT_PAGINATION_PARAMS,\r\n registrationId: action.payload.registrationId,\r\n mandatoryFilters: action.payload.mandatoryFilters,\r\n })\r\n );\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionErrorGetFreeOptionsList', { textOnly: true }),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n } \r\n}\r\n\r\nfunction* fetchFreeOptionsSaga(\r\n action: PayloadAction\r\n) {\r\n try {\r\n yield put(\r\n actions.FreeOptionsTable.setLoadingStatus({ fieldName: 'loadingTable', fieldValue: true })\r\n );\r\n\r\n let freeOptionsListSlice = yield select(selectors.getFreeOptionsListSlice);\r\n let freeOptionsData: IFreeOptionsPayload;\r\n\r\n if (action.payload.mandatoryFilters) {\r\n // refreshes filters if at least one filter is empty\r\n freeOptionsListSlice = {\r\n ...freeOptionsListSlice,\r\n filterParams: { ...freeOptionsListSlice.filterParams },\r\n };\r\n }\r\n\r\n if (action.payload.registrationId) {\r\n freeOptionsData = yield call(API.sgh.getStudentFreeOptions.call, {\r\n ...action.payload,\r\n ...freeOptionsListSlice.filterParams,\r\n });\r\n } else {\r\n freeOptionsData = yield call(API.sgh.getFreeOptions.call, {\r\n ...action.payload,\r\n ...freeOptionsListSlice.filterParams,\r\n });\r\n }\r\n \r\n yield put(actions.FreeOptionsTable.setFreeOptionsData(freeOptionsData));\r\n\r\n } catch (e) {\r\n yield put(\r\n actions.FreeOptionsTable.setErrorStatus({\r\n fieldName: 'errLoadingFreeOptions',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.freeOptionsList_errorLoadingPage'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n } finally {\r\n yield put(\r\n actions.FreeOptionsTable.setLoadingStatus({ fieldName: 'loading', fieldValue: false })\r\n );\r\n yield put(\r\n actions.FreeOptionsTable.setLoadingStatus({ fieldName: 'loadingTable', fieldValue: false })\r\n );\r\n }\r\n}\r\n\r\nfunction* fetchFreeOptionsFiltersSaga(\r\n action: PayloadAction\r\n) {\r\n\r\n try {\r\n yield put(\r\n actions.FreeOptionsTable.setLoadingStatus({ fieldName: 'loadingTable', fieldValue: true })\r\n );\r\n let freeOptionsListSlice = yield select(selectors.getFreeOptionsListSlice);\r\n let freeOptionsData: IFreeOptionsPayload;\r\n\r\n if (action.payload.mandatoryFilters) {\r\n \r\n // refreshes filters if at least one filter is empty\r\n freeOptionsListSlice = {\r\n ...freeOptionsListSlice,\r\n filterParams: { ...freeOptionsListSlice.filterParams, onlyFilters: true },\r\n };\r\n }\r\n \r\n if (action.payload.registrationId) {\r\n freeOptionsData = yield call(API.sgh.getStudentFreeOptions.call, {\r\n registrationId: action.payload.registrationId,\r\n ...freeOptionsListSlice.filterParams,\r\n });\r\n } else {\r\n freeOptionsData = yield call(API.sgh.getFreeOptions.call, {\r\n ...freeOptionsListSlice.filterParams,\r\n });\r\n }\r\n \r\n\r\n yield put(actions.FreeOptionsTable.setFreeOptionsData(freeOptionsData));\r\n\r\n } catch (e) {\r\n yield put(\r\n actions.FreeOptionsTable.setErrorStatus({\r\n fieldName: 'errLoadingFreeOptions',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.freeOptionsList_errorLoadingPage'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n } finally {\r\n yield put(\r\n actions.FreeOptionsTable.setLoadingStatus({ fieldName: 'loading', fieldValue: false })\r\n );\r\n yield put(\r\n actions.FreeOptionsTable.setLoadingStatus({ fieldName: 'loadingTable', fieldValue: false })\r\n );\r\n }\r\n}\r\n\r\nfunction* onUnmountSaga() {}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('FreeOptionsTable/onMount', onMountSaga);\r\n yield takeLatest('FreeOptionsTable/fetchFreeOptions', fetchFreeOptionsSaga);\r\n yield takeLatest('FreeOptionsTable/fetchFreeOptionsFilters', fetchFreeOptionsFiltersSaga);\r\n yield takeLatest('FreeOptionsTable/onUnmount', onUnmountSaga);\r\n}\r\n","/**\r\n * Home scene sagas\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\nimport { put, call, takeLatest } from 'redux-saga/effects';\r\n\r\nimport { t } from 'app';\r\n\r\nimport API from 'api';\r\n\r\nimport { actions } from 'store/rootSlices';\r\nimport { addIntermediatePhases } from '../utils';\r\n\r\nimport ErrorHandler from 'shared/errorHandler';\r\n\r\nfunction* onMountSaga() {\r\n try {\r\n const phases = yield call(API.sgh.getPhases.call);\r\n yield put(actions.SchedulesHome.setPhases(phases));\r\n yield put(actions.SchedulesHome.setLoadingPhases(false));\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionErrorGetAllPhases'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nfunction* onUnmountSaga() {}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('SchedulesHome/onMount', onMountSaga);\r\n yield takeLatest('SchedulesHome/onUnmount', onUnmountSaga);\r\n}\r\n","/**\r\n * SchedulesGuide scene sagas\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\nimport { put, call, takeLatest } from 'redux-saga/effects';\r\n\r\nimport { t } from 'app';\r\n\r\nimport API from 'api';\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport ErrorHandler from 'shared/errorHandler';\r\n\r\nfunction* onMountSaga(action) {\r\n try {\r\n yield put(actions.SchedulesGuide.setLoadingMarkdown(true));\r\n const markdowns = yield call(API.translations.getMarkdown.call);\r\n\r\n let param = action.payload;\r\n\r\n const guides = markdowns.find((markdown) => markdown.fields.name === 'apoio');\r\n\r\n if (guides) {\r\n yield put(\r\n actions.SchedulesGuide.setMarkdown(\r\n guides.fields.properties.find((field) => field.key === param)\r\n )\r\n );\r\n yield put(actions.SchedulesGuide.setLoadingMarkdown(false));\r\n } else {\r\n throw new Error();\r\n }\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionErrorGetScheduleGuide'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nfunction* onUnmountSaga() {\r\n yield put(actions.SchedulesGuide.reset());\r\n}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('SchedulesGuide/onMount', onMountSaga);\r\n yield takeLatest('SchedulesGuide/onUnmount', onUnmountSaga);\r\n}\r\n","import { put, call, takeLatest } from 'redux-saga/effects';\r\nimport { t } from 'app';\r\nimport API from 'api';\r\nimport { actions } from 'store/rootSlices';\r\nimport ErrorHandler from 'shared/errorHandler';\r\n\r\nfunction* onMountSaga(action) {\r\n try {\r\n console.log('Action payload:', action.payload); // Debug log\r\n\r\n yield put(actions.GradesGuide.setLoadingMarkdown(true));\r\n const markdowns = yield call(API.translations.getMarkdown.call);\r\n\r\n let param = action.payload;\r\n\r\n const guides = markdowns.find((markdown) => markdown.fields.name === 'pautasAjuda');\r\n\r\n if (guides) {\r\n const selectedGuide = guides.fields.properties.find((field) => field.key === param);\r\n\r\n console.log('Selected Guide:', selectedGuide); \r\n\r\n if (selectedGuide) {\r\n yield put(actions.GradesGuide.setMarkdown(selectedGuide));\r\n } else {\r\n console.error('Guide not found for param:', param);\r\n }\r\n\r\n yield put(actions.GradesGuide.setLoadingMarkdown(false));\r\n } else {\r\n throw new Error('Guides not found');\r\n }\r\n } catch (e) {\r\n console.error('Error in onMountSaga:', e);\r\n\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionErrorGetScheduleGuide'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nfunction* onUnmountSaga() {\r\n yield put(actions.GradesGuide.reset());\r\n}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('GradesGuide/onMount', onMountSaga);\r\n yield takeLatest('GradesGuide/onUnmount', onUnmountSaga);\r\n}\r\n","/**\r\n * CreatedSchedule container logic selectors\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getRegistration = (state: RootState) => state.StudentRegistrationDropdown.registration;\r\nexport const getMySchedules = (state: RootState) => state.MySchedules.createdSchedules;\r\n","/**\r\n * Created Schedule container\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport { call, select, put, takeLatest } from 'redux-saga/effects';\r\n\r\nimport { t } from 'app';\r\n\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './selectors';\r\nimport API from 'api';\r\n\r\nimport { immutableReplace } from 'utils';\r\n\r\nimport { IUpdateSchedule } from 'scenes/Schedules/CreatedSchedules/containers/CreatedSchedule/types';\r\n\r\ninterface IUpdateScheduleSaga {\r\n type: 'CreatedSchedule/updateSchedule';\r\n payload: IUpdateSchedule;\r\n}\r\n\r\nfunction* updateScheduleSaga(action: IUpdateScheduleSaga) {\r\n try {\r\n yield put(actions.MySchedules.setSavingMySchedules(true));\r\n const registration = yield select(selectors.getRegistration);\r\n const { id, formData } = action.payload;\r\n const mySchedules = yield select(selectors.getMySchedules);\r\n\r\n const indexOf = mySchedules.findIndex((schedule) => schedule.id === id);\r\n const updatedSchedule = { ...mySchedules[indexOf], ...{ name: formData.name } };\r\n\r\n yield call(API.sgh.patchSchedules.call, {\r\n registrationId: registration,\r\n scheduleId: id,\r\n name: formData.name,\r\n preference: mySchedules[indexOf].preference,\r\n });\r\n\r\n yield put(\r\n actions.MySchedules.setSchedules(immutableReplace(mySchedules, indexOf, updatedSchedule))\r\n );\r\n\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionSuccessUpdateSchedule_plural', { textOnly: true }),\r\n icon: 'check',\r\n type: 'success',\r\n })\r\n );\r\n } catch (e) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionErrorUpdateSchedule_plural', { textOnly: true }),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n } finally {\r\n yield put(actions.MySchedules.setSavingMySchedules(false));\r\n }\r\n}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('CreatedSchedule/updateSchedule', updateScheduleSaga);\r\n}\r\n","/**\r\n * Home scene sagas\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\nimport { put, call, takeLatest } from 'redux-saga/effects';\r\n\r\nimport { t } from 'app';\r\n\r\nimport API from 'api';\r\n\r\nimport { actions } from 'store/rootSlices';\r\n//import { actions } from 'store/rootSlices'\r\n\r\nimport ErrorHandler from 'shared/errorHandler';\r\n\r\nfunction* onMountSaga() {\r\n try {\r\n const phases = yield call(API.sgh.getPhases.call);\r\n yield put(actions.Home.setPhases(phases));\r\n yield put(actions.Home.setLoadingPhases(false));\r\n\r\n //get markdown\r\n const markdowns = yield call(API.translations.getMarkdown.call);\r\n const cards = markdowns.find((markdown) => markdown.fields.name === 'paginaPrincipal');\r\n\r\n yield put(\r\n actions.Home.setMarkdown(\r\n cards.fields.properties.map((property) => ({\r\n value: property.value,\r\n valueEn: property.valueEn,\r\n valueCh: property.valueCh,\r\n }))\r\n )\r\n );\r\n } catch (e) {\r\n const shouldRun = yield call(ErrorHandler, e);\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.actionErrorGetAllPhases'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nfunction* onUnmountSaga() {}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('Home/onMount', onMountSaga);\r\n yield takeLatest('Home/onUnmount', onUnmountSaga);\r\n}\r\n","/**\r\n * Help scene sagas\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport { takeLatest, call, put } from 'redux-saga/effects';\r\nimport { actions } from 'store/rootSlices';\r\nimport ErrorHandler from 'shared/errorHandler';\r\nimport API from 'api';\r\n\r\nimport { t } from 'app';\r\n\r\nfunction* onMountSaga() {\r\n yield put(actions.Help.setLoadingStatus({ fieldName: 'loading', fieldValue: true }));\r\n\r\n yield call(getHelpListingSaga);\r\n}\r\n\r\nfunction* getHelpListingSaga(params?: any) {\r\n try {\r\n yield put(actions.Help.setLoadingStatus({ fieldName: 'loadingSearch', fieldValue: true }));\r\n yield put(actions.Help.setErrorStatus({ fieldName: 'errLoading', fieldValue: false }));\r\n\r\n const helpListing = yield call(API.search.getFunctionalitiesHelp.call, {\r\n ...params?.payload,\r\n });\r\n\r\n yield put(actions.Help.setFilterTypes(helpListing.filters));\r\n yield put(actions.Help.setHelpListing(helpListing.data));\r\n\r\n yield put(actions.Help.setLoadingStatus({ fieldName: 'loading', fieldValue: false }));\r\n yield put(actions.Help.setLoadingStatus({ fieldName: 'loadingSearch', fieldValue: false }));\r\n } catch (e) {\r\n yield put(\r\n actions.Help.setErrorStatus({\r\n fieldName: 'errLoadingList',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n const shouldRun = yield call(ErrorHandler, e);\r\n\r\n if (shouldRun) {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.general_errorLoadingHelp', { textOnly: true }),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n}\r\n\r\nfunction* onUnmountSaga() {\r\n yield put(actions.Help.reset());\r\n}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('Help/onMount', onMountSaga);\r\n yield takeLatest('Help/getHelpListing', getHelpListingSaga);\r\n yield takeLatest('Help/onUnmount', onUnmountSaga);\r\n}\r\n","/**\r\n * ImprovementExamEnrollment scene sagas\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { takeLatest, call, put } from 'redux-saga/effects';\r\nimport { actions } from 'store/rootSlices';\r\nimport { t } from 'app';\r\n\r\nimport API from 'api';\r\n\r\nfunction* onMountSaga() {\r\n yield put(actions.ImprovementExamEnrollment.setLoading(true));\r\n\r\n yield put(\r\n actions.ImprovementExamEnrollment.getStudentSignups({\r\n semester: null,\r\n annual: null,\r\n })\r\n );\r\n}\r\n\r\nfunction* getStudentSignupsSaga(action: any) {\r\n const body = action.payload;\r\n\r\n try {\r\n const signups = yield call(API.secVirtual.getStudentSignups.call, body);\r\n\r\n yield put(actions.ImprovementExamEnrollment.setData(signups));\r\n } catch {\r\n yield put(\r\n actions.Toaster.showToaster({\r\n title: t('getStudentSignupsSaga()', { textOnly: true }),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n } finally {\r\n yield put(actions.ImprovementExamEnrollment.setLoading(false));\r\n }\r\n}\r\n\r\nfunction* onUnmountSaga() {}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('ImprovementExamEnrollment/onMount', onMountSaga);\r\n yield takeLatest('ImprovementExamEnrollment/onUnmount', onUnmountSaga);\r\n //yield takeLatest('ImprovementExamEnrollment/getStudentSignups', getStudentSignupsSaga);\r\n}\r\n","/**\r\n * ExamEnrollment scene sagas\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { takeLatest, put } from 'redux-saga/effects';\r\nimport { actions } from 'store/rootSlices';\r\n\r\nfunction* onMountSaga() {\r\n yield put(actions.ExamEnrollment.setLoading(false));\r\n}\r\n\r\nfunction* onUnmountSaga() {}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('ExamEnrollment/onMount', onMountSaga);\r\n yield takeLatest('ExamEnrollment/onUnmount', onUnmountSaga);\r\n}\r\n","/**\r\n * EvaluationTypeSelection scene sagas\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { takeLatest, put } from 'redux-saga/effects';\r\nimport { actions } from 'store/rootSlices';\r\n\r\nfunction* onMountSaga() {\r\n yield put(actions.EvaluationTypeSelection.setLoading(false));\r\n}\r\n\r\nfunction* onUnmountSaga() {}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('EvaluationTypeSelection/onMount', onMountSaga);\r\n yield takeLatest('EvaluationTypeSelection/onUnmount', onUnmountSaga);\r\n}\r\n","/**\r\n * EnrollmentRenewal scene sagas\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { takeLatest, put } from 'redux-saga/effects';\r\nimport { actions } from 'store/rootSlices';\r\n\r\nfunction* onMountSaga() {\r\n yield put(actions.EnrollmentRenewal.setLoading(false));\r\n}\r\n\r\nfunction* onUnmountSaga() {}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('EnrollmentRenewal/onMount', onMountSaga);\r\n yield takeLatest('EnrollmentRenewal/onUnmount', onUnmountSaga);\r\n}\r\n","/**\r\n * ExamEnrollment scene sagas\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { takeLatest, put } from 'redux-saga/effects';\r\nimport { actions } from 'store/rootSlices';\r\n\r\nfunction* onMountSaga() {\r\n yield put(actions.SpecialExams.setLoading(false));\r\n}\r\n\r\nfunction* onUnmountSaga() {}\r\n\r\nexport default function* watcherSignin() {\r\n yield takeLatest('SpecialExams/onMount', onMountSaga);\r\n yield takeLatest('SpecialExams/onUnmount', onUnmountSaga);\r\n}\r\n","import { all, cancel } from 'redux-saga/effects';\r\n\r\nimport appSaga from 'app/logic/sagas';\r\n\r\n// WARNING!! Don't erase the nextline as it is necessary for hygen to automatically import your components\r\n// Define imports here\r\nimport logsstudentSaga from 'scenes/LogsStudent/logic/sagas'\r\nimport logsSaga from 'scenes/Logs/logic/sagas'\r\nimport examsCalendarSaga from 'scenes/VirtualSecretary/ExamsCalendar/logic/sagas';\r\nimport applicationdetailsSaga from 'scenes/VirtualSecretary/Applications/ApplicationDetails/logic/sagas';\r\nimport newapplicationSaga from 'scenes/VirtualSecretary/Applications/NewApplication/logic/sagas';\r\nimport newcertificateSaga from 'scenes/VirtualSecretary/Certificates/NewCertificate/logic/sagas';\r\nimport registrationdetailsSaga from 'scenes/VirtualSecretary/RegistrationDetails/logic/sagas';\r\nimport registrationsSaga from 'scenes/VirtualSecretary/Registrations/logic/sagas';\r\nimport seriationhistorySaga from 'scenes/Schedules/SeriationHistory/logic/sagas';\r\nimport seriationhistorydetailsSaga from 'scenes/Schedules/SeriationHistoryDetails/logic/sagas';\r\nimport freeOptionsDropdownSaga from 'scenes/Schedules/MySchedule/containers/FreeOptionsDropdown/logic/sagas';\r\nimport studentregistrationdropdownSaga from 'shared/containers/StudentRegistrationDropdown/logic/sagas';\r\nimport applicationslistSaga from 'scenes/VirtualSecretary/Applications/ApplicationsList/logic/sagas';\r\nimport certificateslistSaga from 'scenes/VirtualSecretary/Certificates/CertificatesList/logic/sagas';\r\nimport certificatesdetailsSaga from 'scenes/VirtualSecretary/Certificates/CertificatesDetails/logic/sagas';\r\nimport certificateValidatorSaga from 'scenes/VirtualSecretary/CertificateValidator/logic/sagas';\r\nimport paymentsSaga from 'scenes/VirtualSecretary/Payments/logic/sagas';\r\nimport pendingDebitsPaymentSaga from 'scenes/VirtualSecretary/Payments/PendingDebitsPayment/logic/sagas';\r\nimport gradesSaga from 'scenes/VirtualSecretary/Grades/logic/sagas';\r\nimport assessmentchoiceSaga from 'scenes/VirtualSecretary/AssessmentChoice/logic/sagas';\r\nimport examregistrationSaga from 'scenes/VirtualSecretary/ExamRegistration/logic/sagas';\r\nimport subscriptionrenewalSaga from 'scenes/VirtualSecretary/SubscriptionRenewal/logic/sagas';\r\nimport classsupoortSaga from 'scenes/VirtualSecretary/ClassSupoort/logic/sagas';\r\nimport curricularplanSaga from 'scenes/VirtualSecretary/CurricularPlan/CurricularPlan/logic/sagas';\r\nimport curricularUnitDetailsSaga from 'scenes/VirtualSecretary/CurricularPlan/CurricularUnitDetails/logic/sagas';\r\nimport personaldataSaga from 'scenes/VirtualSecretary/PersonalData/logic/sagas';\r\nimport gradesManagementSaga from 'scenes/GradesManagement/GradesManagement/logic/sagas';\r\nimport editGradesSaga from 'scenes/GradesManagement/EditGrades/logic/sagas';\r\nimport gradesDetailsSaga from 'scenes/GradesManagement/GradesDetails/logic/sagas';\r\nimport gradesHistorySaga from 'scenes/GradesManagement/GradesHistory/logic/sagas';\r\nimport myschedulesSaga from 'scenes/Schedules/CreatedSchedules/logic/sagas';\r\nimport mandatoryOptionsDropdownSaga from 'scenes/Schedules/MySchedule/containers/MandatoryOptionsDropdown/logic/sagas';\r\nimport toasterSaga from 'shared/containers/Toaster/logic/sagas';\r\nimport toasterActionSaga from 'shared/containers/ToasterAction/logic/sagas';\r\nimport schedulesSaga from 'scenes/Schedules/MySchedule/logic/sagas';\r\nimport freeOptionsListSaga from 'scenes/Schedules/FreeOptionsList/logic/sagas';\r\nimport freeOptionsTableSaga from 'scenes/Schedules/containers/FreeOptionsTable/logic/sagas';\r\nimport schedulesHomeSaga from 'scenes/Schedules/SchedulesHome/logic/sagas';\r\nimport schedulesGuideSaga from 'scenes/Schedules/SchedulesGuide/logic/sagas';\r\nimport gradesGuideSaga from 'scenes/GradesManagement/GradesGuide/logic/sagas';\r\nimport createdScheduleSaga from 'scenes/Schedules/CreatedSchedules/containers/CreatedSchedule/logic/sagas';\r\nimport homeSaga from 'scenes/Home/logic/sagas';\r\nimport helpSaga from 'scenes/Help/logic/sagas';\r\nimport improvementExamEnrollmentSaga from 'scenes/VirtualSecretary/Enrollments/ImprovementExamEnrollment/logic/sagas';\r\nimport examEnrollmentSaga from 'scenes/VirtualSecretary/Enrollments/ExamEnrollment/logic/sagas';\r\nimport evaluationTypeSelectionSaga from 'scenes/VirtualSecretary/Enrollments/EvaluationTypeSelection/logic/sagas';\r\nimport enrollmentRenewalSaga from 'scenes/VirtualSecretary/Enrollments/EnrollmentRenewal/logic/sagas';\r\nimport specialExamsSaga from 'scenes/VirtualSecretary/Enrollments/SpecialExamsEnroll/logic/sagas';\r\n\r\n// WARNING!! DO NOT CHANGE STRUCTURE OR ELSE HYGEN WON'T WORK\r\nexport default function* rootSaga() {\r\n yield all([\r\n logsstudentSaga(),\r\n logsSaga(),\r\n examsCalendarSaga(),\r\n applicationdetailsSaga(),\r\n newapplicationSaga(),\r\n newcertificateSaga(),\r\n registrationdetailsSaga(),\r\n registrationsSaga(),\r\n seriationhistorySaga(),\r\n seriationhistorydetailsSaga(),\r\n freeOptionsDropdownSaga(),\r\n studentregistrationdropdownSaga(),\r\n applicationslistSaga(),\r\n certificateslistSaga(),\r\n certificatesdetailsSaga(),\r\n certificateValidatorSaga(),\r\n paymentsSaga(),\r\n pendingDebitsPaymentSaga(),\r\n gradesSaga(),\r\n assessmentchoiceSaga(),\r\n examregistrationSaga(),\r\n subscriptionrenewalSaga(),\r\n classsupoortSaga(),\r\n curricularplanSaga(),\r\n curricularUnitDetailsSaga(),\r\n personaldataSaga(),\r\n gradesManagementSaga(),\r\n editGradesSaga(),\r\n gradesDetailsSaga(),\r\n gradesHistorySaga(),\r\n createdScheduleSaga(),\r\n myschedulesSaga(),\r\n mandatoryOptionsDropdownSaga(),\r\n toasterSaga(),\r\n toasterActionSaga(),\r\n schedulesSaga(),\r\n freeOptionsListSaga(),\r\n freeOptionsTableSaga(),\r\n schedulesHomeSaga(),\r\n schedulesGuideSaga(),\r\n gradesGuideSaga(),\r\n improvementExamEnrollmentSaga(),\r\n examEnrollmentSaga(),\r\n evaluationTypeSelectionSaga(),\r\n enrollmentRenewalSaga(),\r\n specialExamsSaga(),\r\n homeSaga(),\r\n helpSaga(),\r\n appSaga(),\r\n ]);\r\n}\r\n","import { configureStore, getDefaultMiddleware } from '@reduxjs/toolkit';\r\nimport createSagaMiddleware from 'redux-saga';\r\nimport LogRocket from 'logrocket';\r\n\r\nimport { rootReducer } from './rootSlices';\r\nimport rootSaga from './rootSaga';\r\n\r\nimport config from 'config';\r\n\r\nconst sagaMiddleware = createSagaMiddleware();\r\nconst customizedMiddleware = getDefaultMiddleware({\r\n thunk: false,\r\n serializableCheck: false,\r\n immutableCheck: false,\r\n});\r\n\r\nconst middleware = [...customizedMiddleware, sagaMiddleware];\r\n\r\nif (config.LOGROCKET_ID) {\r\n const logRocketMiddleware = LogRocket.reduxMiddleware();\r\n middleware.push(logRocketMiddleware);\r\n}\r\n\r\nconst store = configureStore({\r\n reducer: rootReducer,\r\n middleware,\r\n devTools: process.env.NODE_ENV !== 'production',\r\n});\r\n\r\nsagaMiddleware.run(rootSaga);\r\n\r\nexport type AppDispatch = typeof store.dispatch;\r\n\r\nexport default store;\r\n","import axios from 'axios';\r\nimport API, { IApiCall } from 'api';\r\nimport i18n from 'i18next';\r\nimport store from 'store';\r\nimport { actions } from 'store/rootSlices';\r\nimport { camelizeKeys, decamelizeKeys } from 'humps';\r\nimport { JSONtoQueryString } from 'api/utils';\r\nimport Endpoints from 'api/endpoints';\r\nimport configs from 'config';\r\nimport { setStorage } from 'utils';\r\nimport { GENERAL_ERROR_MESSAGE } from 'shared/errorMessages';\r\nimport { t } from 'app';\r\nimport { put } from 'redux-saga/effects';\r\n// Converts all responses for CamelCase\r\naxios.interceptors.response.use(\r\n (response) => {\r\n response.data = camelizeKeys(response.data);\r\n return response;\r\n },\r\n async (error) => {\r\n try {\r\n const originalRequest = error.config;\r\n const user = JSON.parse(localStorage.getItem('user') || '{}');\r\n\r\n if (user?.refreshToken && error?.response?.status === 401) {\r\n if (!originalRequest._retry) {\r\n originalRequest._retry = true;\r\n\r\n try {\r\n const response = await API.signin.refresh.call(user.refreshToken);\r\n\r\n const updatedUser = {\r\n ...user,\r\n accessToken: response.accessToken,\r\n refreshToken: response.refreshToken,\r\n idToken: response.idToken,\r\n };\r\n\r\n setStorage('user', updatedUser);\r\n //call store to update user\r\n await store.dispatch(actions.App.setUser(updatedUser));\r\n\r\n originalRequest.headers['Authorization'] = `Bearer ${response.accessToken}`;\r\n originalRequest.headers['IDToken'] = `Bearer ${response.idToken}`;\r\n } catch (e) {\r\n await store.dispatch(actions.App.signout());\r\n }\r\n\r\n //redo and camelize newResponse data\r\n try {\r\n const axiosApiInstance = axios.create();\r\n const redoneResponse = await axiosApiInstance(originalRequest);\r\n redoneResponse.data = camelizeKeys(redoneResponse.data);\r\n return redoneResponse;\r\n } catch (e) {\r\n return Promise.reject(e);\r\n }\r\n }\r\n } else {\r\n if (\r\n // error?.response?.status === 403 ||\r\n !user?.refreshToken &&\r\n error?.response?.status === 401\r\n ) {\r\n throw new Error(GENERAL_ERROR_MESSAGE.INTERCEPTOR_LOGOUT);\r\n } else if (error?.response?.status === 403) {\r\n throw new Error(GENERAL_ERROR_MESSAGE.ERR_INVALID_ACCESS);\r\n } else {\r\n return Promise.reject(error);\r\n }\r\n }\r\n } catch (e) {\r\n if (e instanceof Error) {\r\n if (e.message === GENERAL_ERROR_MESSAGE.ERR_INVALID_ACCESS)\r\n throw new Error(GENERAL_ERROR_MESSAGE.ERR_INVALID_ACCESS);\r\n else throw new Error(GENERAL_ERROR_MESSAGE.INTERCEPTOR_LOGOUT);\r\n }\r\n //call store to logout user\r\n else throw new Error(GENERAL_ERROR_MESSAGE.INTERCEPTOR_LOGOUT);\r\n }\r\n }\r\n);\r\n// Converts all requests to under-cased\r\naxios.interceptors.request.use(\r\n async (config) => {\r\n let user = JSON.parse(localStorage.getItem('user') || '{}');\r\n const currentContentType = config.headers['Content-Type'];\r\n\r\n //TODO MARTELADA\r\n config.headers['Accept-Language'] = i18n.language;\r\n\r\n //all calls to every api we use are decamelized\r\n if (!(config.data instanceof FormData)) {\r\n config.data = decamelizeKeys(config.data);\r\n }\r\n if (config.url && config.params && !config.url.includes('secvirtual')) {\r\n config.params = decamelizeKeys(config.params);\r\n }\r\n if (currentContentType && currentContentType.includes('x-www-form-urlencoded') && config.data) {\r\n config.data = JSONtoQueryString(config.data);\r\n }\r\n\r\n //add correct rules and token to our requests\r\n if (config.url && !config.url.includes(Endpoints.signin.token)) {\r\n if (user?.accessToken) {\r\n config.headers['Authorization'] = `Bearer ${user.accessToken}`;\r\n config.headers['Content-Type'] = `application/octet-stream`;\r\n\r\n //so far only this API has this verification\r\n if (\r\n (user.idToken &&\r\n (config.url.includes(configs.API_SCHEDULES_PATH) ||\r\n config.url.includes(configs.API_SEC_VIRTUAL_PATH) ||\r\n config.url.includes(configs.API_STUDENT) ||\r\n config.url.includes(configs.API_SEARCH))) ||\r\n (config.url.includes(configs.API_PAUTAS_PATH) && !config.headers['IDToken'])\r\n ) {\r\n config.headers['IDToken'] = `Bearer ${user.idToken}`;\r\n }\r\n\r\n //so far only this API has this verification\r\n if (\r\n user.impersonate &&\r\n !config.url.includes(configs.API_TRANSLATIONS_PATH) &&\r\n !config.headers['impersonate']\r\n ) {\r\n config.headers['impersonate'] = user.impersonate;\r\n }\r\n }\r\n\r\n if (config.method !== 'get') {\r\n config.headers['Content-Type'] = `application/json`;\r\n }\r\n if (config.data instanceof FormData) {\r\n config.headers['Content-Type'] = `multipart/form-data`;\r\n }\r\n //remove last slash from wso2 requests\r\n if (config.url && config.url.includes('wso2')) {\r\n if (config.url.slice(-1) === '/') {\r\n config.url = config.url.substring(0, config.url.length - 1);\r\n }\r\n }\r\n }\r\n return config;\r\n },\r\n (error) => {\r\n return Promise.reject(error);\r\n }\r\n);\r\nexport default axios;\r\n","import React, {useEffect} from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport { Router,useLocation} from 'react-router-dom';\r\nimport { Provider } from 'react-redux';\r\n\r\nimport App from 'app';\r\nimport CloseApp from 'app/CloseApp';\r\n\r\nimport * as serviceWorker from 'serviceWorker';\r\n\r\nimport { history, initLocales, hideLogs } from 'utils';\r\nimport store from 'store';\r\nimport 'api/interceptors';\r\n\r\nimport 'moment/locale/pt';\r\nimport 'moment/locale/zh-hk';\r\n\r\n// External styling\r\nimport 'semantic-ui-css/semantic.min.css';\r\nimport 'normalize.css';\r\nimport 'react-big-calendar/lib/css/react-big-calendar.css';\r\nimport '@react-pdf-viewer/core/lib/styles/index.css';\r\n\r\ninitLocales();\r\nhideLogs();\r\n\r\nfunction ScrollToTop( ) {\r\n let location = useLocation();\r\n\r\n useEffect( () => {\r\n window.scrollTo({ top: -50, behavior: 'smooth' })\r\n }, [ location ] );\r\n\r\n return null;\r\n}\r\n\r\nReactDOM.render(\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ,\r\n document.getElementById('root')\r\n);\r\n\r\n// If you want your app to work offline and load faster, you can change\r\n// unregister() to register() below. Note this comes with some pitfalls.\r\n// Learn more about service workers: https://bit.ly/CRA-PWA\r\nserviceWorker.unregister();","import React from \"react\";\r\nimport { actions } from 'store/rootSlices';\r\nimport { t } from 'app';\r\nimport { gzip } from 'pako';\r\n\r\nexport const inputStyle = {\r\n textAlign: 'right',\r\n height: '2rem',\r\n width: '6rem',\r\n};\r\n\r\nexport const getGradesEditValues = (gradesData, gradeEdits) => {\r\n return gradesData.map(grade => ({\r\n ...grade,\r\n nota: gradeEdits[grade.nmec] ?? grade.nota,\r\n }));\r\n}\r\n\r\n// Dynamically determines the range of valid grades based on HDADOS and Dicionarios\r\nexport const getValidGradeValues = (HDADOS, Dicionarios) => {\r\n let validValues = [];\r\n\r\n // Dynamically add values based on HDADOS.tipoAvaliacao.gama if available\r\n if (HDADOS.tipoAvaliacao && HDADOS.tipoAvaliacao.gama) {\r\n const min = parseInt(HDADOS.tipoAvaliacao.gama.valorMinimo, 10);\r\n const max = parseInt(HDADOS.tipoAvaliacao.gama.valorMaximo, 10);\r\n validValues = Array.from({ length: max - min + 1 }, (_, i) => i + min);\r\n }\r\n\r\n // Add additional valid values from Dicionarios\r\n if (Dicionarios && Dicionarios.data && Array.isArray(Dicionarios.data)) {\r\n Dicionarios.data.forEach(dicionario => {\r\n if (dicionario.bodyItems && Array.isArray(dicionario.bodyItems)) {\r\n dicionario.bodyItems.forEach(item => {\r\n const valor = parseInt(item.valor, 10);\r\n if (!validValues.includes(valor)) {\r\n validValues.push(valor);\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n return validValues;\r\n};\r\n\r\n\r\n// Determine valid values\r\nexport const isValidGradeValue = (value, validGradeValues) => {\r\n if (value === '') return true;\r\n\r\n const intValue = parseInt(value, 10);\r\n return validGradeValues.includes(intValue) && intValue.toString() === value;\r\n};\r\n\r\n\r\n// Determine the border style based on grade changes\r\nexport const getBorderStyle = (originalValue, currentValue) => {\r\n return originalValue !== currentValue ? '2px solid yellow' : '1px solid';\r\n};\r\n\r\n// Handle changes to the grade input fields\r\nexport const handleGradeChange = (dispatch, gradesData, gradeEdits, validGradeValues) => (nmec, newValue) => {\r\n if (isValidGradeValue(newValue, validGradeValues)) {\r\n const newGradeEdits = { ...gradeEdits, [nmec]: newValue };\r\n dispatch(actions.EditGrades.setGradeEdits(newGradeEdits));\r\n\r\n } else {\r\n // If the value is invalid, place an empty string in the gradeEdits\r\n const revertedGradeEdits = { ...gradeEdits, [nmec]: '' };\r\n dispatch(actions.EditGrades.setGradeEdits(revertedGradeEdits));\r\n }\r\n};\r\n\r\n// Render the grade input field\r\nexport const renderGradeInput = (item, gradeEdits, handleGradeChange, validGradeValues, gradesData) => {\r\n const currentValue = gradeEdits[item.nmec] ?? item.nota;\r\n const borderStyle = getBorderStyle(item.nota, currentValue);\r\n const isValid = isValidGradeValue(currentValue, validGradeValues);\r\n\r\n return (\r\n handleGradeChange(item.nmec, e.target.value)}\r\n onKeyDown={(e) => handleKeyDown(e, item.nmec, gradesData)}\r\n style={{ ...inputStyle, border: borderStyle, borderColor: isValid ? 'initial' : 'red', outline: 'none' }}\r\n />\r\n );\r\n};\r\n\r\nconst handleKeyDown = (e, nmec, gradesData) => {\r\n if (e.key === 'Enter') {\r\n e.preventDefault();\r\n const currentIndex = gradesData.findIndex(item => item.nmec === nmec);\r\n const nextIndex = currentIndex + 1;\r\n\r\n if (nextIndex < gradesData.length) {\r\n const nextInput = document.getElementById(`grade-${gradesData[nextIndex].nmec}`);\r\n if (nextInput) {\r\n nextInput.focus();\r\n }\r\n }\r\n }\r\n};\r\n\r\nexport const handleCSVImport = async (event, dispatch) => {\r\n if (event.target.files && event.target.files[0]) {\r\n const file = event.target.files[0];\r\n\r\n dispatch(actions.EditGrades.setCSVFile(file));\r\n dispatch(actions.EditGrades.setIsCSVModalOpen());\r\n }\r\n};\r\n\r\n// Get suplementary grades options for the dropdown\r\nexport const getDropdownSuplementaryGradesOptions = (Dicionarios) => {\r\n let options = [];\r\n\r\n if (Dicionarios && Dicionarios.data && Array.isArray(Dicionarios.data)) {\r\n Dicionarios.data.forEach(dicionario => {\r\n if (dicionario.bodyItems && Array.isArray(dicionario.bodyItems)) {\r\n dicionario.bodyItems.forEach(item => {\r\n options.push({\r\n key: item.valor,\r\n text: item.valor + \" - \" + t(`pautas.evaluationCode${item.valor}`, { textOnly: true }),\r\n value: item.valor,\r\n });\r\n });\r\n }\r\n });\r\n }\r\n\r\n return options;\r\n};\r\n\r\nexport const handleSupplementaryGradeChange = (dispatch, gradesData, gradeEdits, value) => {\r\n // Update gradesData where nota is \"\"\r\n const updatedGradesData = gradesData.reduce((acc, grade) => {\r\n if (grade.nota === \"\") {\r\n return { ...acc, [grade.nmec]: value };\r\n }\r\n return acc;\r\n }, {});\r\n\r\n // Update gradeEdits where nota is \"\"\r\n const updatedGradeEdits = Object.entries(gradeEdits).reduce((acc, [nmec, grade]) => {\r\n if (grade === \"\") {\r\n return { ...acc, [nmec]: value };\r\n }\r\n return { ...acc, [nmec]: grade };\r\n }, {});\r\n\r\n // Combine updatedGradesData and updatedGradeEdits\r\n const newGradeEdits = { ...updatedGradesData, ...updatedGradeEdits };\r\n\r\n dispatch(actions.EditGrades.setGradeEdits(newGradeEdits));\r\n dispatch(actions.EditGrades.setDropdownValueSelected(value));\r\n}\r\n\r\n// Clear suplementary grades from gradeEdits\r\nexport const handleSupplementaryGradeClear = (dispatch, gradeEdits, value) => {\r\n const updatedGradeEdits = Object.entries(gradeEdits).reduce((acc, [nmec, grade]) => {\r\n if (value === grade) {\r\n return { ...acc, [nmec]: \"\" };\r\n }\r\n return { ...acc, [nmec]: grade };\r\n }, {});\r\n\r\n dispatch(actions.EditGrades.setGradeEdits(updatedGradeEdits));\r\n}\r\n\r\n// Compress the grade data\r\nexport const compressGradeData = (dataObject) => {\r\n // Convert the data object to JSON string\r\n const jsonData = JSON.stringify(dataObject);\r\n\r\n // Compress the JSON string using pako\r\n const compressed = gzip(jsonData);\r\n\r\n const base64Data = Buffer.from(compressed).toString('base64');\r\n\r\n return {\r\n \"base_64\": base64Data\r\n }\r\n}","/**\r\n * FreeOptionsTable container selectors\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getFreeOptionsListSlice = (state: RootState) => state.FreeOptionsTable;\r\nexport const getUcs = (state: RootState) => state.Schedules.freeUcs;\r\nexport const getAppSlice = (state: RootState) => state.App;\r\n","import { RootState } from 'store/rootSlices';\r\n\r\nexport const getCurricularPlanSlice = (state: RootState) => state.CurricularPlan;\r\nexport const getRegistration = (state: RootState) => state.StudentRegistrationDropdown.registration;\r\nexport const getUserRegistrations = (state: RootState) => state.App.user.registrations;\r\nexport const getUserNmec = (state: RootState) => state.App.user.nmec;\r\nexport const getUser = (state: RootState) => state.App.user;\r\nexport const getAppSlice = (state: RootState) => state.App.currentLocale;\r\n","import { t } from 'app';\r\n\r\nexport const getPathToPage = (currentRoute, routeList) => {\r\n let currentRouteElems: any[] = [];\r\n let didSetModule = false;\r\n\r\n const setModuleName = (route) => {\r\n if (route?.module?.name && !didSetModule) {\r\n didSetModule = true;\r\n currentRouteElems.unshift({\r\n name: t(`routes.${route.module.name}`, { textOnly: true }),\r\n });\r\n }\r\n };\r\n\r\n routeList.forEach((route) => {\r\n if (route.path) {\r\n if (currentRoute.key === route.key && !route.detached && !route.disabled) {\r\n setModuleName(route);\r\n\r\n if (route.childOf) {\r\n //iterate over other routes to search if is or has child of and continue adding in this order else\r\n const parentRoutes: any[] = [];\r\n\r\n const searchParentRoutes = (searchRoute) => {\r\n const parentRoute = routeList.find((pRoute) => searchRoute.childOf === pRoute.key);\r\n\r\n if (parentRoute) {\r\n setModuleName(parentRoute);\r\n\r\n parentRoutes.unshift({\r\n key: parentRoute.key,\r\n name: t(`routes.${parentRoute.name}`, { textOnly: true }),\r\n url: parentRoute.key,\r\n });\r\n\r\n searchParentRoutes(parentRoute);\r\n } else if (searchRoute?.childOf) {\r\n parentRoutes.unshift({\r\n key: `parent_${searchRoute.childOf}`,\r\n name: t(`routes.${searchRoute.childOf}`, { textOnly: true }),\r\n });\r\n }\r\n };\r\n\r\n searchParentRoutes(route);\r\n\r\n currentRouteElems = [...currentRouteElems, ...parentRoutes];\r\n }\r\n\r\n currentRouteElems.push({\r\n key: route.key,\r\n name: t(`routes.${route.name}`, { textOnly: true }),\r\n url: route.key,\r\n });\r\n }\r\n }\r\n });\r\n\r\n return currentRouteElems;\r\n};\r\n\r\nexport const overridePath = (state, payload) => {\r\n return state.map((path) => {\r\n if (payload.key === path.key) {\r\n return {\r\n key: path.key,\r\n name: payload.name || t(`routes.${path.name}`, { textOnly: true }),\r\n url: payload.url || path.url,\r\n };\r\n } else {\r\n return path;\r\n }\r\n });\r\n};\r\n","import axios from 'axios';\r\nimport Endpoints from 'api/endpoints';\r\n\r\nimport config from 'config';\r\n\r\nimport { listAllScopes, checkBlacklist } from 'api/utils';\r\n\r\nimport { IApiCall } from '../index';\r\n\r\nconst token = (data) => {\r\n return axios\r\n .post(\r\n Endpoints.signin.token,\r\n {\r\n ...data,\r\n },\r\n {\r\n headers: {\r\n Authorization: `Basic ${config.OIDC_CONFIG.clientSecret}`,\r\n 'Content-Type': 'application/x-www-form-urlencoded',\r\n },\r\n }\r\n )\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst refresh = (refreshToken) => {\r\n return axios\r\n .post(\r\n Endpoints.signin.token,\r\n {\r\n grantType: 'refresh_token',\r\n refreshToken,\r\n },\r\n {\r\n headers: {\r\n Authorization: `Basic ${config.OIDC_CONFIG.clientSecret}`,\r\n 'Content-Type': 'application/x-www-form-urlencoded',\r\n },\r\n }\r\n )\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getSuperUser = async (iupi, token) => {\r\n return checkBlacklist(['student', 'researcher', 'protocol', 'scholarship'], false)\r\n .then(() =>\r\n axios\r\n .get(Endpoints.signin.superUser, {\r\n headers: {\r\n Authorization: `Bearer ${token}`,\r\n },\r\n // params: {\r\n // iupi,\r\n // },\r\n })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n })\r\n )\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getRcuGroups = async (iupi, token) => {\r\n return axios\r\n .get(Endpoints.signin.rcuGroups, {\r\n headers: {\r\n Authorization: `Bearer ${token}`,\r\n },\r\n // params: {\r\n // iupi,\r\n // },\r\n })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst postLogin = async (scopes) => {\r\n return axios\r\n .post(Endpoints.signin.login,{\r\n scopes,\r\n })\r\n .then(res => res.data)\r\n .catch(err => {throw err;})\r\n};\r\n\r\nexport default {\r\n token: { call: token } as IApiCall,\r\n refresh: { call: refresh } as IApiCall,\r\n getSuperUser: { call: getSuperUser } as IApiCall,\r\n getRcuGroups: { call: getRcuGroups } as IApiCall,\r\n postLogin: {call: postLogin} as IApiCall,\r\n};\r\n","import axios from 'axios';\r\n\r\nimport mockStudent from 'api/schemas/mockStudent';\r\n\r\nimport Endpoints from 'api/endpoints';\r\n\r\nimport { IService } from 'config';\r\nimport { IUser } from 'app/logic/slice';\r\n\r\nimport { IApiCall } from '../index';\r\n\r\nconst getRegistrations = ({ service, user }: { service: IService; user: IUser }) => {\r\n //return mockStudent.getRegistrations;\r\n let params: any = {};\r\n let endpoint;\r\n\r\n if (service === 'sgh') {\r\n if (user?.nmec) {\r\n params.nmec = user.nmec;\r\n }\r\n\r\n endpoint = Endpoints.sgh.allStudentRegistrations;\r\n } else if (service === 'secVirtual') {\r\n endpoint = Endpoints.secVirtual.allStudentRegistrations;\r\n }\r\n\r\n return axios\r\n .get(endpoint, {\r\n params,\r\n })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nexport default {\r\n getRegistrations: {\r\n call: getRegistrations,\r\n scope: ['paco_2.0_sgh_get_registrations', 'paco_2.0_secvirtual_get_registrations'],\r\n } as IApiCall,\r\n};\r\n","import axios from 'axios';\r\n\r\nimport mockSchedule from 'api/schemas/mockSchedule';\r\n\r\nimport Endpoints from 'api/endpoints';\r\nimport config from 'config';\r\n\r\nimport { IApiCall } from '../index';\r\n\r\nconst getPhases = () => {\r\n //return mockSchedule.getPhases;\r\n return axios\r\n .get(Endpoints.sgh.phases)\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getLogin = () => {\r\n // return mockSchedule.getLogin;\r\n return axios\r\n .get(Endpoints.sgh.login)\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getStudentAccess = ({ registrationId }) => {\r\n //return mockSchedule.getAccess;\r\n return axios\r\n .get(Endpoints.sgh.studentAccess, { params: { registrationId } })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getSchedule = (scheduleId, registrationId) => {\r\n //return mockSchedule.getSchedule;\r\n return axios\r\n .get(Endpoints.sgh.schedule, {\r\n params: {\r\n scheduleId,\r\n registrationId,\r\n },\r\n })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getSchedules = ({ registrationId }) => {\r\n //return mockSchedule.getSchedules;\r\n return axios\r\n .get(Endpoints.sgh.studentSchedules, {\r\n params: {\r\n registrationId,\r\n },\r\n })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst deleteSchedule = (data) => {\r\n return axios\r\n .delete(Endpoints.sgh.schedule, { data })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst patchSchedules = (data) => {\r\n return axios\r\n .patch(Endpoints.sgh.studentSchedules, data)\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst patchSchedule = (data) => {\r\n return axios\r\n .patch(Endpoints.sgh.studentSchedules, data)\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getUcs = ({ registrationId }) => {\r\n //return mockSchedule.getUcs;\r\n return axios\r\n .get(Endpoints.sgh.studentUcs, { params: { registrationId } })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getStudentFreeOptions = (params: {\r\n registrationId: number;\r\n search?: string;\r\n choosen?: boolean;\r\n}) => {\r\n if (params?.search) {\r\n params = { ...params, search: params.search.trim() };\r\n }\r\n //if (params.choosen)\r\n //return mockSchedule.getSelectedFreeOptions;\r\n //return mockSchedule.getStudentFreeOptions;\r\n return axios\r\n .get(Endpoints.sgh.studentFreeOptions, { params })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getFreeOptions = (params: {\r\n limit?: number;\r\n offset: number;\r\n department?: string;\r\n search?: string;\r\n}) => {\r\n if (params?.search) {\r\n params = { ...params, search: params.search.trim() };\r\n }\r\n //return mockSchedule.getFreeOptions;\r\n return axios\r\n .get(Endpoints.sgh.freeOptions, { params })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst postSchedule = ({ data }) => {\r\n return axios\r\n .post(Endpoints.sgh.schedule, data)\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getHistory = ({\r\n final = true,\r\n registrationId,\r\n scheduleId = null,\r\n current = false,\r\n phase = null,\r\n}) => {\r\n let params =\r\n scheduleId === null\r\n ? {\r\n registrationId,\r\n final,\r\n current,\r\n phaseName: phase,\r\n }\r\n : {\r\n registrationId,\r\n scheduleId,\r\n final,\r\n current,\r\n phaseName: phase,\r\n };\r\n\r\n //return mockSchedule.getHistory;\r\n return axios\r\n .get(Endpoints.sgh.history, {\r\n params: params,\r\n })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getHistoryDetails = ({ final = true, registrationId, phase = null, seriationId }) => {\r\n return axios\r\n .get(Endpoints.sgh.historyDetails, {\r\n params: {\r\n registrationId,\r\n final,\r\n phaseName: phase,\r\n seriationId: seriationId,\r\n },\r\n })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getSeriation = ({ registrationId }) => {\r\n //return mockSchedule.getSeriation;\r\n\r\n return axios\r\n .get(Endpoints.sgh.studentSeriation, {\r\n params: {\r\n registrationId,\r\n },\r\n })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nexport default {\r\n getLogin: {\r\n call: getLogin,\r\n scope: 'paco_2.0_sgh_login',\r\n } as IApiCall,\r\n getPhases: {\r\n call: getPhases,\r\n scope: 'paco_2.0_sgh_get_all_phases',\r\n } as IApiCall,\r\n getStudentAccess: {\r\n call: getStudentAccess,\r\n scope: 'paco_2.0_sgh_get_current_phase',\r\n } as IApiCall,\r\n getSchedule: {\r\n call: getSchedule,\r\n scope: 'paco_2.0_sgh_get_final_schedule',\r\n } as IApiCall,\r\n getSchedules: {\r\n call: getSchedules,\r\n scope: 'paco_2.0_sgh_get_temp_schedules',\r\n } as IApiCall,\r\n getUcs: {\r\n call: getUcs,\r\n scope: 'paco_2.0_sgh_get_student_ucs',\r\n } as IApiCall,\r\n getSeriation: {\r\n call: getSeriation,\r\n scope: 'paco_2.0_sgh_get_seriation_results',\r\n } as IApiCall,\r\n getHistory: {\r\n call: getHistory,\r\n scope: 'paco_2.0_sgh_get_history',\r\n } as IApiCall,\r\n getHistoryDetails: {\r\n call: getHistoryDetails,\r\n scope: 'paco_2.0_sgh_get_history_details',\r\n } as IApiCall,\r\n getStudentFreeOptions: {\r\n call: getStudentFreeOptions,\r\n scope: 'paco_2.0_sgh_get_free_options',\r\n } as IApiCall,\r\n getFreeOptions: {\r\n call: getFreeOptions,\r\n scope: 'paco_2.0_sgh_get_free_options_list',\r\n } as IApiCall,\r\n patchSchedules: {\r\n call: patchSchedules,\r\n scope: 'paco_2.0_sgh_patch_temp_schedules',\r\n } as IApiCall,\r\n deleteSchedule: {\r\n call: deleteSchedule,\r\n scope: 'paco_2.0_sgh_delete_all_schedules',\r\n } as IApiCall,\r\n patchSchedule: {\r\n call: patchSchedule,\r\n scope: 'paco_2.0_sgh_patch_temp_schedules',\r\n } as IApiCall,\r\n postSchedule: {\r\n call: postSchedule,\r\n scope: 'paco_2.0_sgh_post_temp_schedules',\r\n } as IApiCall,\r\n};\r\n","import axios from 'axios';\r\nimport Endpoints from 'api/endpoints';\r\n\r\nimport { IApiCall } from '../index';\r\n\r\nimport mockFunctionalities from 'api/schemas/mockFunctionalities';\r\n\r\nconst getFunctionalities = () => {\r\n //return mockFunctionalities.getFunctionalities;\r\n return axios\r\n .get(Endpoints.search.functionalities)\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getFunctionalitiesSearch = (input: string) => {\r\n return axios\r\n .get(Endpoints.search.functionalitiesSearch, {\r\n params: {\r\n input: input,\r\n },\r\n })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getFunctionalitiesHelp = ({ search, type }) => {\r\n return axios\r\n .get(Endpoints.search.functionalitiesHelp, {\r\n params: {\r\n search,\r\n type,\r\n },\r\n })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nexport default {\r\n getFunctionalities: { call: getFunctionalities } as IApiCall,\r\n getFunctionalitiesSearch: { call: getFunctionalitiesSearch } as IApiCall,\r\n getFunctionalitiesHelp: { call: getFunctionalitiesHelp } as IApiCall,\r\n};\r\n","import axios from 'axios';\r\n\r\nimport Endpoints from 'api/endpoints';\r\n\r\nconst getTranslations = () => {\r\n return axios\r\n .get(Endpoints.st.translations)\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getMarkdown = () => {\r\n return axios\r\n .get(Endpoints.st.markdown)\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nexport default {\r\n getTranslations: {\r\n call: getTranslations,\r\n },\r\n getMarkdown: {\r\n call: getMarkdown,\r\n },\r\n};\r\n","import axios from 'axios';\r\nimport Endpoints from 'api/endpoints';\r\nimport { IParams } from '../index';\r\n\r\nimport mockPayments from 'api/schemas/mockPayments';\r\nimport mockUnpaidDebits from 'api/schemas/mockUnpaidDebits';\r\nimport mockSecVirtual from 'api/schemas/mockSecVirtual';\r\n\r\nimport { IApiCall } from '../index';\r\n\r\nconst getPersonalData = () => {\r\n return axios\r\n .get(Endpoints.secVirtual.personalDataForms)\r\n .then((res) => {\r\n return res.data;\r\n })\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getPersonalDataPhoneNumber = () => {\r\n return axios\r\n .get(Endpoints.secVirtual.personalDataPhoneNumber)\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getCertificateCodeValidation = (accessKey: string) => {\r\n return axios\r\n .get(Endpoints.secVirtual.certificateCodeValidation(accessKey))\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getStudentCardInfo = () => {\r\n return axios\r\n .get(Endpoints.secVirtual.studentCardInfo)\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst patchAddressForm = (data) => {\r\n return axios\r\n .patch(Endpoints.secVirtual.addressForm, data)\r\n .then((res) => res.status)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst patchContactsForm = (data) => {\r\n return axios\r\n .patch(Endpoints.secVirtual.contactsForm, data)\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getStudentPicture = () => {\r\n return axios\r\n .get(Endpoints.secVirtual.studentPicture)\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getStudentPictureFile = (endpoint) => {\r\n return axios\r\n .get(endpoint)\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getCertificatesList = (params?: IParams) => {\r\n return axios\r\n .get(Endpoints.secVirtual.studentCertificatesList, {\r\n params: {\r\n ...params,\r\n },\r\n })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getCertificatesDetails = (certificateId: number, registrationId: number) => {\r\n //return mockSecVirtual.getCertificateReady;\r\n return axios\r\n .get(Endpoints.secVirtual.studentCertificatesDetails(certificateId), {\r\n params: {\r\n registrationId: registrationId,\r\n },\r\n })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getCertificatesDetailsChangeHistory = (certificateId: number, registrationId: number) => {\r\n return axios\r\n .get(Endpoints.secVirtual.getCertificateChangeHistory(certificateId, registrationId))\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getAllStudentRegistrations = () => {\r\n return axios\r\n .get(Endpoints.secVirtual.allStudentRegistrations)\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getStudentRegistrationSummary = (registrationId: number) => {\r\n return axios\r\n .get(Endpoints.secVirtual.studentRegistrationSummary, {\r\n params: {\r\n registrationId,\r\n },\r\n })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getStudentCurricularPlan = (registrationId: number) => {\r\n return axios\r\n .get(Endpoints.secVirtual.studentCurricularPlan, {\r\n params: {\r\n registrationId,\r\n },\r\n })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getStudentExtraCurricularUcs = (registrationId: number) => {\r\n return axios\r\n .get(Endpoints.secVirtual.studentExtraCurricularUcs, {\r\n params: {\r\n registrationId,\r\n },\r\n })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getStudentMobilityUcs = (registrationId: number) => {\r\n return axios\r\n .get(Endpoints.secVirtual.studentMobilityUcs, {\r\n params: {\r\n registrationId,\r\n },\r\n })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getStudentAccreditedUcs = (registrationId: number) => {\r\n return axios\r\n .get(Endpoints.secVirtual.studentAccreditedUcs, {\r\n params: {\r\n registrationId,\r\n },\r\n })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getStudentModuleOptions = (ucCode: number, registrationId: number) => {\r\n return axios\r\n .get(Endpoints.secVirtual.studentModuleOptions(ucCode), {\r\n params: {\r\n registrationId,\r\n },\r\n })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getRegistration = ({ registrationId }) => {\r\n return axios\r\n .get(Endpoints.secVirtual.registration(registrationId))\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getApplicationTypes = (params: {\r\n registrationId: number;\r\n type?: string;\r\n search?: string;\r\n}) => {\r\n return axios\r\n .get(Endpoints.secVirtual.getApplicationTypes, {\r\n params: {\r\n ...params,\r\n },\r\n })\r\n .then((res) => {\r\n return res.data;\r\n })\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getApplicationForm = ({ registrationId, applicationId }) => {\r\n //return mockSecVirtual.getApplicationForm;\r\n return axios\r\n .get(Endpoints.secVirtual.getApplicationForm(applicationId), {\r\n params: {\r\n registrationId,\r\n },\r\n })\r\n .then((res) => {\r\n return res.data;\r\n })\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst postApplicationForm = ({ registrationId, data }) => {\r\n return axios\r\n .post(Endpoints.secVirtual.postApplicationForm, data, {\r\n params: {\r\n registrationId,\r\n },\r\n })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst postCertAccessCodeWithRecaptcha = ({ accessCode, recaptchaToken }) => {\r\n return axios\r\n .post(Endpoints.secVirtual.postCertAccessCodeWithRecaptcha, {\r\n accessCode: accessCode,\r\n 'g-recaptcha-response': recaptchaToken,\r\n })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getStudentApplications = (params: {\r\n registrationId: number;\r\n type?: string;\r\n search?: string;\r\n}) => {\r\n return axios\r\n .get(Endpoints.secVirtual.getStudentApplications, {\r\n params: {\r\n ...params,\r\n },\r\n })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getApplicationDetails = ({ registrationId, applicationId }) => {\r\n return axios\r\n .get(Endpoints.secVirtual.getApplicationDetails(applicationId), {\r\n params: {\r\n registrationId,\r\n },\r\n })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getCertificateTypes = (params: {\r\n registrationId: number;\r\n type?: string;\r\n search?: string;\r\n}) => {\r\n //return mockSecVirtual.getCertificates;\r\n return axios\r\n .get(Endpoints.secVirtual.getCertificateTypes, {\r\n params: {\r\n ...params,\r\n },\r\n })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getCertificateForm = ({ registrationId, certificateCode }) => {\r\n //return mockSecVirtual.getCertificateForm;\r\n return axios\r\n .get(Endpoints.secVirtual.getCertificateForm(certificateCode, registrationId), {})\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst postCertificateForm = (data, registrationId) => {\r\n return axios\r\n .post(Endpoints.secVirtual.postCertificateForm(registrationId), data)\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst postCertificateOptions = (data, registrationId) => {\r\n return axios\r\n .post(Endpoints.secVirtual.postCertificateOptions(registrationId), data)\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getStudentCertificates = ({ registrationId }) => {\r\n return axios\r\n .get(Endpoints.secVirtual.getStudentCertificateRequests, {\r\n params: {\r\n registrationId,\r\n },\r\n })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\nconst getStudentCertificatesOnMountState = ({ registrationId }) => {\r\n return axios\r\n .get(Endpoints.secVirtual.getStudentCertificateRequestsOnMountState, {\r\n params: {\r\n registrationId,\r\n },\r\n })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getStudentsPayments = (params) => {\r\n return axios\r\n .get(Endpoints.secVirtual.payments, { params })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getStudentsPendingDebits = (registrationId: number) => {\r\n return axios\r\n .get(Endpoints.secVirtual.pendingDebits, {\r\n params: {\r\n registrationId,\r\n },\r\n })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getStudentsUnpaidDebits = (params: {\r\n limit: number;\r\n offset: number;\r\n registrationId: number;\r\n type?: string;\r\n search?: string;\r\n}) => {\r\n return axios\r\n .get(Endpoints.secVirtual.unpaidDebits, { params })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getExamCalendar = (params: {\r\n registrationId: number;\r\n type?: string;\r\n search?: string;\r\n date?: string;\r\n}) => {\r\n return axios\r\n .get(Endpoints.secVirtual.getExamCalendar, { params: { ...params } })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getCalendarIcsFile = (endpoint, registrationId) => {\r\n return axios\r\n .get(endpoint, registrationId)\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst postPaymentReferenceMbWay = ({ registrationId, data }) => {\r\n //return mockPayments.postRefMbWay;\r\n return axios\r\n .post(Endpoints.secVirtual.paymentsMbWay, data, {\r\n params: {\r\n registrationId,\r\n },\r\n })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst postPaymentReferenceMb = ({ registrationId, data }) => {\r\n // return mockPayments.postRefMb;\r\n return axios\r\n .post(\r\n Endpoints.secVirtual.paymentsMb,\r\n { ...data },\r\n {\r\n params: {\r\n registrationId,\r\n },\r\n }\r\n )\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getPaymentMbInfo = ({ paymentRequestId, registrationId }) => {\r\n // return mockPayments.postRefMb;\r\n return axios\r\n .get(Endpoints.secVirtual.paymentMbInfo(paymentRequestId), {\r\n params: {\r\n registrationId,\r\n },\r\n })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst deletePaymentMb = ({ paymentRequestId, registrationId }) => {\r\n // return mockPayments.postRefMb;\r\n return axios\r\n .delete(Endpoints.secVirtual.paymentMbInfo(paymentRequestId), {\r\n params: {\r\n registrationId,\r\n },\r\n })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getCurricularUnitDetails = (ucCode: number, registrationId: number) => {\r\n //return mockSecVirtual.getUcDetails;\r\n return axios\r\n .get(Endpoints.secVirtual.getCurricularUnitDetails(ucCode), {\r\n params: { registrationId: registrationId },\r\n })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getStudentSignups = (data) => {\r\n //return mockSecVirtual.getStudentSignups;\r\n return axios\r\n .get(Endpoints.secVirtual.studentSignups)\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nexport default {\r\n getPersonalData: {\r\n call: getPersonalData,\r\n scope: 'paco_2.0_secvirtual_get_personal_info',\r\n } as IApiCall,\r\n getPersonalDataPhoneNumber: {\r\n call: getPersonalDataPhoneNumber,\r\n scope: 'paco_2.0_secvirtual_get_personal_contact',\r\n } as IApiCall,\r\n getCertificateCodeValidation: {\r\n call: getCertificateCodeValidation,\r\n } as IApiCall,\r\n getStudentCardInfo: {\r\n call: getStudentCardInfo,\r\n scope: 'paco_2.0_secvirtual_get_card_info',\r\n } as IApiCall,\r\n patchAddressForm: {\r\n call: patchAddressForm,\r\n scope: 'paco_2.0_secvirtual_patch_address',\r\n } as IApiCall,\r\n patchContactsForm: {\r\n call: patchContactsForm,\r\n scope: 'paco_2.0_secvirtual_patch_contacts',\r\n } as IApiCall,\r\n getStudentPicture: {\r\n call: getStudentPicture,\r\n scope: 'paco_2.0_secvirtual_get_photo',\r\n } as IApiCall,\r\n getCertificatesList: {\r\n call: getCertificatesList,\r\n scope: 'paco_2.0_secvirtual_get_certificates',\r\n } as IApiCall,\r\n getCertificatesDetails: {\r\n call: getCertificatesDetails,\r\n scope: 'paco_2.0_secvirtual_get_student_certificate_details',\r\n } as IApiCall,\r\n getCertificatesDetailsChangeHistory: {\r\n call: getCertificatesDetailsChangeHistory,\r\n scope: 'paco_2.0_secvirtual_get_student_cert_history',\r\n } as IApiCall,\r\n getAllStudentRegistrations: {\r\n call: getAllStudentRegistrations,\r\n scope: 'paco_2.0_secvirtual_get_registrations',\r\n } as IApiCall,\r\n getStudentRegistrationSummary: {\r\n call: getStudentRegistrationSummary,\r\n scope: 'paco_2.0_secvirtual_get_curricular_plan_summary',\r\n } as IApiCall,\r\n getStudentCurricularPlan: {\r\n call: getStudentCurricularPlan,\r\n scope: 'paco_2.0_secvirtual_get_curricular_plan',\r\n } as IApiCall,\r\n getStudentExtraCurricularUcs: {\r\n call: getStudentExtraCurricularUcs,\r\n scope: 'paco_2.0_secvirtual_get_extracurricular_ucs',\r\n } as IApiCall,\r\n getStudentMobilityUcs: {\r\n call: getStudentMobilityUcs,\r\n scope: 'paco_2.0_secvirtual_get_mobility_ucs',\r\n } as IApiCall,\r\n getStudentAccreditedUcs: {\r\n call: getStudentAccreditedUcs,\r\n scope: 'paco_2.0_secvirtual_get_accredited_ucs',\r\n } as IApiCall,\r\n getStudentModuleOptions: {\r\n call: getStudentModuleOptions,\r\n scope: 'paco_2.0_secvirtual_get_options_modules_ucs',\r\n } as IApiCall,\r\n getRegistration: {\r\n call: getRegistration,\r\n scope: 'paco_2.0_secvirtual_get_registration_details',\r\n } as IApiCall,\r\n getApplicationTypes: {\r\n call: getApplicationTypes,\r\n scope: 'paco_2.0_secvirtual_get_applications',\r\n } as IApiCall,\r\n getApplicationForm: {\r\n call: getApplicationForm,\r\n scope: 'paco_2.0_secvirtual_get_application_details',\r\n } as IApiCall,\r\n postApplicationForm: {\r\n call: postApplicationForm,\r\n scope: 'paco_2.0_secvirtual_post_application',\r\n } as IApiCall,\r\n getStudentApplications: {\r\n call: getStudentApplications,\r\n scope: 'paco_2.0_secvirtual_get_student_applications',\r\n } as IApiCall,\r\n getApplicationDetails: {\r\n call: getApplicationDetails,\r\n scope: 'paco_2.0_secvirtual_get_student_application_details',\r\n } as IApiCall,\r\n getStudentsPayments: {\r\n call: getStudentsPayments,\r\n scope: 'paco_2.0_secvirtual_get_payments',\r\n } as IApiCall,\r\n getStudentsUnpaidDebits: {\r\n call: getStudentsUnpaidDebits,\r\n scope: 'paco_2.0_secvirtual_get_unpaid_debits',\r\n } as IApiCall,\r\n getStudentsPendingDebits: {\r\n call: getStudentsPendingDebits,\r\n scope: 'paco_2.0_secvirtual_get_pending_debits',\r\n } as IApiCall,\r\n getCertificateTypes: {\r\n call: getCertificateTypes,\r\n scope: 'paco_2.0_secvirtual_get_certificates',\r\n } as IApiCall,\r\n getCertificateForm: {\r\n call: getCertificateForm,\r\n scope: 'paco_2.0_secvirtual_get_certificate_details',\r\n } as IApiCall,\r\n postCertificateForm: {\r\n call: postCertificateForm,\r\n scope: 'paco_2.0_secvirtual_post_certificate',\r\n } as IApiCall,\r\n postCertificateOptions: {\r\n call: postCertificateOptions,\r\n scope: 'paco_2.0_secvirtual_get_certificate_cost',\r\n } as IApiCall,\r\n getStudentCertificates: {\r\n call: getStudentCertificates,\r\n scope: 'paco_2.0_secvirtual_get_student_certificates',\r\n } as IApiCall,\r\n getStudentCertificatesOnMountState: {\r\n call: getStudentCertificatesOnMountState,\r\n scope: 'paco_2.0_secvirtual_get_student_certificates',\r\n } as IApiCall,\r\n getExamCalendar: {\r\n call: getExamCalendar,\r\n scope: 'paco_2.0_secvirtual_get_calendar',\r\n } as IApiCall,\r\n postPaymentReferenceMbWay: {\r\n call: postPaymentReferenceMbWay,\r\n scope: 'paco_2.0_secvirtual_post_mb_way_ref_payment',\r\n } as IApiCall,\r\n postPaymentReferenceMb: {\r\n call: postPaymentReferenceMb,\r\n scope: 'paco_2.0_secvirtual_post_mb_ref_payment',\r\n } as IApiCall,\r\n getPaymentMbInfo: {\r\n call: getPaymentMbInfo,\r\n scope: 'paco_2.0_secvirtual_get_mb_ref_payment',\r\n } as IApiCall,\r\n deletePaymentMb: {\r\n call: deletePaymentMb,\r\n scope: 'paco_2.0_secvirtual_delete_mb_ref_payment',\r\n } as IApiCall,\r\n getStudentSignups: {\r\n call: getStudentSignups,\r\n scope: 'paco_2.0_secvirtual_get_sign_ups',\r\n } as IApiCall,\r\n getCurricularUnitDetails: {\r\n call: getCurricularUnitDetails,\r\n scope: 'paco_2.0_secvirtual_get_uc_grades',\r\n } as IApiCall,\r\n getCalendarIcsFile: {\r\n call: getCalendarIcsFile,\r\n scope: 'paco_2.0_secvirtual_get_calender_file',\r\n } as IApiCall,\r\n getStudentPictureFile: {\r\n call: getStudentPictureFile,\r\n scope: 'paco_2.0_secvirtual_get_photo',\r\n },\r\n postCertAccessCodeWithRecaptcha: {\r\n call: postCertAccessCodeWithRecaptcha,\r\n },\r\n};\r\n","import axios from 'axios';\r\n\r\nimport Endpoints from 'api/endpoints';\r\n\r\nimport { IApiCall } from '../index';\r\n\r\nconst postFiles = (studentId, registrationId, data, config) => {\r\n return axios\r\n .post(Endpoints.files.postFiles(studentId, registrationId), data, config)\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getFile = (fileType: string, fileId: string, expires: string, signature: string) => {\r\n return axios\r\n .get(Endpoints.files.getFile(fileType, fileId, expires, signature))\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getFileOnTab = (url: string) => {\r\n return axios\r\n .get(url)\r\n .then((res) => {\r\n // res.data is in base64\r\n const byteCharacters = atob(res.data);\r\n let byteNumbers = new Array(byteCharacters.length);\r\n for (let i = 0; i < byteCharacters.length; i++) {\r\n byteNumbers[i] = byteCharacters.charCodeAt(i);\r\n }\r\n const byteArray = new Uint8Array(byteNumbers);\r\n const file = new Blob([byteArray], { type: 'application/pdf;base64' });\r\n const fileURL = URL.createObjectURL(file);\r\n window.open(fileURL);\r\n\r\n return res.data;\r\n })\r\n .catch((err) => {\r\n console.log('err', err);\r\n throw err;\r\n });\r\n};\r\n\r\nconst getFileUint8Array = (url: string) => {\r\n return axios\r\n .get(url)\r\n .then((res) => {\r\n // res.data is in base64\r\n const byteCharacters = atob(res.data);\r\n let byteNumbers = new Array(byteCharacters.length);\r\n for (let i = 0; i < byteCharacters.length; i++) {\r\n byteNumbers[i] = byteCharacters.charCodeAt(i);\r\n }\r\n return new Uint8Array(byteNumbers);\r\n })\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nexport default {\r\n postFiles: {\r\n call: postFiles,\r\n scope: 'paco_2.0_secvirtual_post_file',\r\n } as IApiCall,\r\n getFile: {\r\n call: getFile,\r\n scope: 'paco_2.0_secvirtual_get_file',\r\n } as IApiCall,\r\n getFileOnTab: {\r\n call: getFileOnTab,\r\n scope: 'paco_2.0_secvirtual_get_file',\r\n } as IApiCall,\r\n getFileUint8Array: {\r\n call: getFileUint8Array,\r\n scope: 'paco_2.0_secvirtual_get_file',\r\n } as IApiCall,\r\n};\r\n","import axios from 'axios';\r\nimport Endpoints from 'api/endpoints';\r\nimport { IParams } from '../index';\r\n\r\nimport mockPayments from 'api/schemas/mockPayments';\r\nimport mockUnpaidDebits from 'api/schemas/mockUnpaidDebits';\r\nimport mockSecVirtual from 'api/schemas/mockSecVirtual';\r\n\r\nimport { IApiCall } from '../index';\r\n\r\nconst getTeacherGrades = (params: { period?: string }) => {\r\n return axios\r\n .get(Endpoints.pautas.professorGradesInfo, {\r\n params: {\r\n ...params,\r\n },\r\n })\r\n .then((res) => {\r\n return res.data;\r\n })\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getGradesStats = () => {\r\n return axios\r\n .get(Endpoints.pautas.gradesStatistics)\r\n .then((res) => {\r\n return res.data;\r\n })\r\n .catch((err) => {\r\n throw err;\r\n });\r\n}\r\n\r\nconst getGradeDetails = (codigoPauta) => {\r\n return axios\r\n .get(Endpoints.pautas.gradeDetails(codigoPauta))\r\n .then((res) => {\r\n return res.data;\r\n })\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getGradeHistory = (codigoPauta) => {\r\n return axios\r\n .get(Endpoints.pautas.gradeHistoryInfo(codigoPauta))\r\n .then((res) => {\r\n return res.data;\r\n })\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getDecryptedGrade = (codigoPauta) => {\r\n return axios\r\n .get(Endpoints.pautas.gradeDecryptedInfo(codigoPauta))\r\n .then((res) => {\r\n return res.data;\r\n })\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst putIntermediateGrade = (codigoPauta, data) => {\r\n return axios\r\n .put(Endpoints.pautas.saveIntermediateGrade(codigoPauta), data)\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst putFinalGrade = (codigoPauta, data) => {\r\n return axios\r\n .put(Endpoints.pautas.submitGrade(codigoPauta), data)\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst postGradeFile = (\r\n codigoPauta,\r\n uniqueIdentifierColumn,\r\n gradeColumn,\r\n hasHeader,\r\n sheetNumber,\r\n file\r\n) => {\r\n const formData = new FormData();\r\n formData.append('file', file);\r\n\r\n const endpoint = Endpoints.pautas.uploadGradeFile(\r\n codigoPauta,\r\n uniqueIdentifierColumn,\r\n gradeColumn,\r\n hasHeader,\r\n sheetNumber\r\n );\r\n\r\n return axios\r\n .post(endpoint, formData, {\r\n headers: {\r\n 'Content-type': 'multipart/form-data'\r\n }\r\n })\r\n .then((res) => res.data)\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nconst getGradePdf = (id, signed) => {\r\n return axios\r\n .get(Endpoints.pautas.gradePdf(id, signed), { responseType: 'arraybuffer' })\r\n .then((response) => {\r\n if (response.headers['content-type'] !== 'application/pdf') {\r\n throw new Error('Received non-PDF content');\r\n }\r\n\r\n const blob = new Blob([response.request.response], { type: 'application/pdf' });\r\n const fileURL = URL.createObjectURL(blob);\r\n return fileURL;\r\n })\r\n .catch((err) => {\r\n throw err;\r\n });\r\n};\r\n\r\nexport default {\r\n getTeacherGrades: {\r\n call: getTeacherGrades,\r\n scope: 'paco_2.0_assinatura_pautas',\r\n } as IApiCall,\r\n getGradesStats: {\r\n call: getGradesStats,\r\n scope: 'paco_2.0_assinatura_pautas',\r\n } as IApiCall,\r\n getGradeDetails: {\r\n call: getGradeDetails,\r\n scope: 'paco_2.0_assinatura_pautas',\r\n } as IApiCall,\r\n getGradeHistory: {\r\n call: getGradeHistory,\r\n scope: 'paco_2.0_assinatura_pautas',\r\n } as IApiCall,\r\n getDecryptedGrade: {\r\n call: getDecryptedGrade,\r\n scope: 'paco_2.0_assinatura_pautas',\r\n } as IApiCall,\r\n putIntermediateGrade: {\r\n call: putIntermediateGrade,\r\n scope: 'paco_2.0_assinatura_pautas',\r\n } as IApiCall,\r\n putFinalGrade: {\r\n call: putFinalGrade,\r\n scope: 'paco_2.0_assinatura_pautas',\r\n } as IApiCall,\r\n postGradeFile: {\r\n call: postGradeFile,\r\n scope: 'paco_2.0_assinatura_pautas',\r\n } as IApiCall,\r\n getGradePdf: {\r\n call: getGradePdf,\r\n scope: 'paco_2.0_assinatura_pautas',\r\n } as IApiCall,\r\n};\r\n","import signin from './calls/signin';\r\nimport student from './calls/student';\r\nimport sgh from './calls/sgh';\r\nimport routes from './calls/search';\r\nimport translations from './calls/translations';\r\nimport secVirtual from './calls/secVirtual';\r\nimport files from './calls/files';\r\nimport search from './calls/search';\r\nimport pautas from './calls/pautas';\r\n\r\nimport { IScope } from 'config/types';\r\n\r\n//export { default as Schemas } from './schemas';\r\n\r\nexport interface IApiCall {\r\n call: any;\r\n scope?: IScope[] | IScope;\r\n}\r\n\r\nexport default {\r\n routes,\r\n signin,\r\n student,\r\n sgh,\r\n translations,\r\n secVirtual,\r\n files,\r\n search,\r\n pautas,\r\n};\r\n\r\nexport interface IParams {\r\n search?: string;\r\n type?: string;\r\n state?: string;\r\n offset?: number;\r\n limit?: number;\r\n}\r\n","import API from 'api';\r\nimport { IRole } from 'config/types';\r\n\r\nexport const JSONtoQueryString = (data) =>\r\n Object.keys(data)\r\n .map((k) => k + '=' + data[k])\r\n .join('&');\r\n\r\nexport const listAllScopes = () => {\r\n let result: string[] = [];\r\n\r\n function findAll(obj, key) {\r\n for (let property in obj) {\r\n if (obj.hasOwnProperty(property)) {\r\n if (property === key) {\r\n if (typeof obj[key] === 'string') {\r\n result.push(obj[key]); // returns the value\r\n } else {\r\n result = [...result, ...obj[key]];\r\n }\r\n } else if (typeof obj[property] === 'object') {\r\n findAll(obj[property], key);\r\n }\r\n }\r\n }\r\n }\r\n\r\n findAll(API, 'scope');\r\n return result;\r\n};\r\n\r\nexport const checkBlacklist = (blacklist: IRole[], throwError?: boolean) =>\r\n new Promise((resolve, reject) => {\r\n const user = JSON.parse(localStorage.getItem('user') || '{}');\r\n if (user?.roles.length > 0 && user?.accessToken) {\r\n //throw error if all roles are in blacklist\r\n if (user.roles.every((role) => blacklist.includes(role))) {\r\n if (throwError) {\r\n reject(new Error('BLACKLISTED_REQUEST'));\r\n } else {\r\n reject(new Error('UNHANDLED_BLACKLISTED_REQUEST_EXCEPTION'));\r\n }\r\n }\r\n }\r\n resolve(true);\r\n });\r\n\r\nexport const checkWhitelist = (blacklist: IRole[], throwError?: boolean) =>\r\n new Promise((resolve, reject) => {\r\n const user = JSON.parse(localStorage.getItem('user') || '{}');\r\n if (user?.roles.length > 0 && user?.accessToken) {\r\n //succesd if roles exists\r\n if (user.roles.some((role) => blacklist.includes(role))) {\r\n resolve(true);\r\n }\r\n }\r\n\r\n if (throwError) {\r\n reject(new Error('BLACKLISTED_REQUEST'));\r\n } else {\r\n reject(new Error('UNHANDLED_BLACKLISTED_REQUEST_EXCEPTION'));\r\n }\r\n });\r\n","/**\r\n * NewApplication scene utils\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport React from 'react';\r\nimport ReactMarkdown from 'react-markdown';\r\nimport styled from 'styled-components';\r\n\r\nexport const componentTemplateParser = (\r\n expoFields,\r\n expression,\r\n valueObj,\r\n currentlyInStatementTab: boolean\r\n) => {\r\n // expression = text with parameters\r\n\r\n // match any sequence of

's and remove any surronding spaces of each row\r\n const newLineMatcher = /(

\\1{0,})/g;\r\n let expressionLines: string[] = [];\r\n\r\n // list of expression lines to be rendered\r\n if (expression && !!expression.length) {\r\n expression.split(newLineMatcher).map((item: string) => {\r\n if (item !== '') {\r\n expressionLines.push(item.trim());\r\n }\r\n });\r\n }\r\n\r\n // matches {{varname}} ou {{varname}}, ou {{varname}}.\r\n const templateMatcher = /{{\\s?([^{}\\s]*)\\s?}}(\\.|,)?/g;\r\n\r\n const result: any = [];\r\n\r\n let paragraphSequenceCounter = 0;\r\n expressionLines.forEach((line) => {\r\n const splittedLine = line.split(templateMatcher);\r\n let trimmedSplittedLine: string[] = [];\r\n\r\n // remove empty elements\r\n splittedLine.forEach((item: string) => {\r\n if (item && item !== '') {\r\n trimmedSplittedLine.push(item.trim());\r\n }\r\n });\r\n\r\n if (line === '

') {\r\n paragraphSequenceCounter++;\r\n } else {\r\n if (paragraphSequenceCounter > 1) {\r\n result.push();\r\n }\r\n\r\n // reset counter\r\n paragraphSequenceCounter = 0;\r\n\r\n // large text boxes occupy an entire line, so they are always the first element of the line\r\n const largeTextBoxCandidate = expoFields.find(\r\n (element) => element.nameKey === trimmedSplittedLine[0]\r\n );\r\n\r\n result.push(\r\n \r\n {trimmedSplittedLine.map((piece, index) => {\r\n if (valueObj[piece]) {\r\n const textBoxCandidate = expoFields.find((element) => element.nameKey === piece);\r\n\r\n return (\r\n \r\n {valueObj[piece]}\r\n \r\n );\r\n } else {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n })}\r\n \r\n );\r\n }\r\n });\r\n\r\n return result;\r\n};\r\n\r\nexport const stringTemplateParser = (expression, valueObj) => {\r\n const templateMatcher = /{{\\s?([^{}\\s]*)\\s?}}/g;\r\n let text = expression.replace(templateMatcher, (substring, value, index) => {\r\n value = valueObj[value];\r\n return value;\r\n });\r\n return text;\r\n};\r\n\r\nconst getExpoFields = (expoFieldsValues, data) => {\r\n return expoFieldsValues.map((expoFieldsField) => {\r\n const targetExpoFieldValues = expoFieldsValues.find(\r\n (valueField) => valueField === expoFieldsField\r\n );\r\n return {\r\n nameKey: expoFieldsField.nameKey,\r\n value:\r\n (targetExpoFieldValues && targetExpoFieldValues.value) ||\r\n (targetExpoFieldValues &&\r\n targetExpoFieldValues.type === 'application_dropdown' &&\r\n targetExpoFieldValues.values.find(\r\n (property) => property.valueId === data[expoFieldsField.nameKey]\r\n ) &&\r\n targetExpoFieldValues.values.find(\r\n (property) => property.valueId === data[expoFieldsField.nameKey]\r\n ).nameKey) ||\r\n data[expoFieldsField.nameKey],\r\n };\r\n });\r\n};\r\n\r\nconst getMandatoryDocuments = (mandatoryDocumentsValues, data) => {\r\n return mandatoryDocumentsValues.reduce((acc, mandatoryDocumentField) => {\r\n if (mandatoryDocumentField.type === 'group' && data[mandatoryDocumentField.nameKey]) {\r\n if (\r\n Object.keys(data).some(\r\n (dataField) => data[dataField] && dataField.includes(mandatoryDocumentField.nameKey)\r\n )\r\n ) {\r\n Object.keys(data[mandatoryDocumentField.nameKey]).forEach((itemNameKey) => {\r\n const itemValue = data[mandatoryDocumentField.nameKey][itemNameKey];\r\n\r\n //get each mandatory document doctypeID\r\n const docTypeId = mandatoryDocumentField.values?.find(\r\n (doc) => doc.nameKey === itemNameKey\r\n )?.docTypeId;\r\n\r\n if (itemValue !== null && itemValue !== undefined) {\r\n acc.push({\r\n ...itemValue,\r\n ...(docTypeId ? { docTypeId } : null),\r\n });\r\n }\r\n });\r\n }\r\n } else {\r\n if (\r\n Object.keys(data).some(\r\n (dataField) =>\r\n data[dataField] &&\r\n data[dataField].nameKey &&\r\n data[dataField].nameKey.includes(mandatoryDocumentField.nameKey)\r\n // some namekeys are equal but have more spaces, so this condition might not work everytime\r\n )\r\n ) {\r\n if (data[mandatoryDocumentField.nameKey]) {\r\n //add docTypeId that comes from mandatoryDocumentField here\r\n acc.push({\r\n ...data[mandatoryDocumentField.nameKey],\r\n ...(mandatoryDocumentField?.docTypeId\r\n ? { docTypeId: mandatoryDocumentField?.docTypeId }\r\n : null),\r\n });\r\n }\r\n }\r\n }\r\n\r\n return acc;\r\n }, []);\r\n};\r\n\r\nconst getAdditionalDocuments = (additionalDocumentsValues, data) => {\r\n return additionalDocumentsValues.reduce((acc, additionalDocumentField) => {\r\n const foundNamekey = Object.keys(data).some(\r\n (dataField) =>\r\n data[dataField] &&\r\n data[dataField].nameKey &&\r\n data[dataField].nameKey.includes(additionalDocumentField.nameKey)\r\n );\r\n\r\n if (\r\n foundNamekey &&\r\n data[additionalDocumentField.nameKey] !== undefined &&\r\n data[additionalDocumentField.nameKey] !== null\r\n ) {\r\n //add docTypeId that comes from additionalDocumentField here\r\n acc.push({\r\n ...data[additionalDocumentField.nameKey],\r\n docTypeId: additionalDocumentField?.docTypeId,\r\n });\r\n }\r\n\r\n return acc;\r\n }, []);\r\n};\r\n\r\nexport const getFormValues = (form, data) => {\r\n const { exposition, expoFields, mandatoryDocuments, additionalDocuments } = form;\r\n\r\n return {\r\n statement: exposition.text,\r\n expoFields: getExpoFields(expoFields.values, data),\r\n observations: data.observations,\r\n mandatoryDocuments: getMandatoryDocuments(mandatoryDocuments.values, data),\r\n additionalDocuments: getAdditionalDocuments(additionalDocuments.values, data),\r\n };\r\n};\r\n\r\nconst MarkdownWrapper = styled.div`\r\n white-space: pre-wrap;\r\n display: inline-block;\r\n margin-right: 8px;\r\n line-height: 1.3;\r\n margin-top: 6px;\r\n margin-bottom: 6px;\r\n`;\r\n\r\nconst MarkdownContainer = styled.div<{ isLargeTextBox: boolean }>`\r\n > div {\r\n ${({ isLargeTextBox }) => isLargeTextBox && 'width: 100%'};\r\n }\r\n`;\r\n\r\nconst Paragraph = styled.div<{ height: string }>`\r\n height: ${({ height }) => height};\r\n`;\r\n\r\nconst ValueObjWrapper = styled.div<{ isTextBox: boolean; currentlyInStatementTab?: boolean }>`\r\n display: inline-block;\r\n\r\n > div {\r\n ${({ isTextBox, currentlyInStatementTab }) =>\r\n isTextBox && currentlyInStatementTab && 'width: 600px'};\r\n\r\n ${({ isTextBox, currentlyInStatementTab }) =>\r\n isTextBox &&\r\n currentlyInStatementTab &&\r\n `@media (max-width: 1240px) {\r\n width: 500px;\r\n }`}\r\n\r\n ${({ isTextBox, currentlyInStatementTab }) =>\r\n isTextBox &&\r\n currentlyInStatementTab &&\r\n `@media (max-width: 992px) {\r\n width: 400px;\r\n }`}\r\n\r\n ${({ isTextBox, currentlyInStatementTab }) =>\r\n isTextBox &&\r\n currentlyInStatementTab &&\r\n `@media (max-width: 767px) {\r\n width: 300px;\r\n }`}\r\n }\r\n`;\r\n","/**\r\n * MySchedules scene utils\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport { PayloadAction } from '@reduxjs/toolkit';\r\nimport { IUc } from 'shared/types';\r\nimport moment from 'moment';\r\n\r\nexport const swapSchedules = (schedules, sourceId, targetId) => {\r\n if (!schedules[targetId] || !schedules[sourceId]) return schedules;\r\n if (sourceId === targetId) return schedules;\r\n let newSchedules = schedules.map((schedule, key) => {\r\n if (key === sourceId) {\r\n return { ...schedule, preference: schedules[targetId].preference };\r\n }\r\n\r\n if (sourceId < targetId) {\r\n if (key < sourceId || key > targetId) return schedule;\r\n return { ...schedule, preference: schedule.preference - 1 };\r\n } else {\r\n if (key > sourceId || key < targetId) return schedule;\r\n return { ...schedule, preference: schedule.preference + 1 };\r\n }\r\n });\r\n\r\n const tempObject = newSchedules.splice(sourceId, 1)[0];\r\n newSchedules.splice(targetId, 0, tempObject);\r\n\r\n return newSchedules;\r\n};\r\n\r\nexport const selectClassesToViewSchedule = (state: IUc[], action: PayloadAction) => {\r\n return state.map((eachUc) => {\r\n return {\r\n ...eachUc,\r\n classSchedule: eachUc.classSchedule.map((eachClass) => {\r\n const found = action.payload.find((classId) => classId === eachClass.classId);\r\n if (\r\n found ||\r\n eachClass.allocated.state === 'assigned' ||\r\n eachClass.allocated.state === 'automatic'\r\n ) {\r\n return { ...eachClass, selected: true, filtered: false };\r\n } else {\r\n return { ...eachClass, filtered: true };\r\n }\r\n }),\r\n };\r\n });\r\n};\r\n\r\nexport const sortSchedules = (createdSchedules, activePhase: boolean) => {\r\n let reformatedSchedules = createdSchedules.schedules\r\n .sort((a, b) => (moment(a.phaseEndDate).isBefore(moment(b.phaseEndDate)) ? 1 : -1))\r\n .reduce(\r\n (acc: any, schedule) => {\r\n const { phase, ...scheduleRest } = schedule;\r\n if (activePhase && phase === createdSchedules.currentPhase) {\r\n if (!acc.activePhase) {\r\n acc.activePhase = {\r\n phase: phase,\r\n schedules: [scheduleRest],\r\n };\r\n } else {\r\n acc.activePhase.schedules.push(scheduleRest);\r\n }\r\n } else {\r\n if (phase !== acc.finishedPhases[acc.finishedPhases.length - 1]?.phase) {\r\n acc.finishedPhases.push({\r\n phase: phase,\r\n schedules: [scheduleRest],\r\n });\r\n } else {\r\n acc.finishedPhases[acc.finishedPhases.length - 1].schedules.push(scheduleRest);\r\n }\r\n }\r\n\r\n return acc;\r\n },\r\n { activePhase: null, finishedPhases: [] }\r\n );\r\n\r\n if (reformatedSchedules.activePhase) {\r\n reformatedSchedules.activePhase.schedules = reformatedSchedules.activePhase.schedules.sort(\r\n (a, b) => a.preference - b.preference\r\n );\r\n }\r\n\r\n if (!!reformatedSchedules.finishedPhases.length) {\r\n reformatedSchedules.finishedPhases = reformatedSchedules.finishedPhases.map(\r\n (finishedPhase) => ({\r\n ...finishedPhase,\r\n schedules: finishedPhase.schedules.sort((a, b) => a.preference - b.preference),\r\n })\r\n );\r\n }\r\n\r\n return reformatedSchedules;\r\n};\r\n\r\nexport const getStatusName = (state) => {\r\n switch (state) {\r\n case 'assigned':\r\n return 'assigned';\r\n case 'notAssigned':\r\n return 'notAssigned';\r\n case 'automatic':\r\n return 'automatic';\r\n case 'proposal':\r\n return 'proposal';\r\n }\r\n};\r\n","import { RootState } from 'store/rootSlices';\r\n\r\nexport const getUserNmec = (state: RootState) => state.App.user.nmec;\r\nexport const getUser = (state: RootState) => state.App.user;\r\nexport const getGradesManagementSlice = (state: RootState) => state.GradesManagement;\r\nexport const getSelectedState = (state: RootState) => state.GradesManagement.selectedState;\r\nexport const getPautasLista = (state: RootState) => state.GradesManagement.pautasLista;\r\nexport const getPeriodosDisponiveis = (state: RootState) => state.GradesManagement.periodosDisponiveis;\r\nexport const getFiltrarPorPeriodo = (state: RootState) => state.GradesManagement.filtrarPorPeriodo;\r\nexport const getCurrentLocale = (state: RootState) => state.App.currentLocale;\r\nexport const getPautasStats = (state: RootState) => state.GradesManagement.pautaStats;\r\nexport const getLoadingStatus = (state: RootState) => state.GradesManagement.loadingStatus;\r\n\r\n","/**\r\n * AuthWrapper component tests\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getUser = (state: RootState) => state.App.user;\r\n","/**\r\n * AuthWrapper component tests\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport React from 'react';\r\n\r\nimport { useSelector } from 'react-redux';\r\nimport * as selectors from './selectors';\r\n\r\nimport { IRole, IScope } from 'config';\r\n\r\ninterface IProps {\r\n children?: any;\r\n scopes?: IScope[];\r\n roles?: IRole[];\r\n fallback?: any;\r\n checkSuperUser?: boolean;\r\n}\r\n\r\nconst AuthWrapper: React.FC = ({ roles, scopes, fallback, children, checkSuperUser }) => {\r\n const user = useSelector(selectors.getUser);\r\n let shouldRender = false;\r\n\r\n if (roles) {\r\n shouldRender = roles.some((role) => {\r\n // we verify super user in order to onpy give access to certain routes if impersonating someone\r\n // later we need to check the user we are impersonating roles and not our roles\r\n if (checkSuperUser) {\r\n if (role.toLowerCase().includes('superuser')) {\r\n if (user.impersonate) {\r\n return true;\r\n } \r\n }\r\n }\r\n return user.roles.includes(role);\r\n });\r\n } else {\r\n shouldRender = true;\r\n }\r\n\r\n if (scopes) {\r\n shouldRender =\r\n roles && !shouldRender ? false : scopes.some((scope) => user.scopes.includes(scope));\r\n }\r\n\r\n if (shouldRender) {\r\n if (!children) {\r\n return fallback;\r\n }\r\n return children;\r\n } else {\r\n if (fallback) {\r\n return fallback;\r\n }\r\n return null;\r\n }\r\n};\r\n\r\nexport default AuthWrapper;\r\n","import en from './en.json'\r\nimport pt from './pt.json'\r\nimport { registerNumerals } from './numerals'\r\n\r\nexport default {\r\n en,\r\n pt,\r\n}\r\n\r\nexport const numeralsInit = registerNumerals","import numeral from 'numeral';\r\n\r\nexport const registerNumerals = () => {\r\n numeral.register('locale', 'pt', {\r\n delimiters: {\r\n thousands: ' ',\r\n decimal: ','\r\n },\r\n abbreviations: {\r\n thousand: 'mil',\r\n million: 'milhões',\r\n billion: 'biliões',\r\n trillion: 'triliões'\r\n },\r\n ordinal : function () {\r\n return '.º';\r\n },\r\n ordinalPlural : function () {\r\n return '.ºs';\r\n },\r\n ordinalFemale : function () {\r\n return '.ª';\r\n }, \r\n ordinalFemalePlural : function () {\r\n return '.ªs';\r\n },\r\n currency: {\r\n symbol: '€'\r\n }\r\n });\r\n \r\n // load a format\r\n numeral.register('format', 'ordinalPlural', {\r\n regexps: {\r\n format: /^pn$/\r\n },\r\n format: function(value, format, roundingFunction) {\r\n var locale = numeral.locales[numeral.options.currentLocale],\r\n output,\r\n ordinalPlural = numeral._.includes(format, ' pn') ? ' ' : '';\r\n\r\n // check for space before\r\n format = format.replace(/\\s?pn/, '');\r\n\r\n ordinalPlural += locale.ordinalPlural ? locale.ordinalPlural(value) : locale.ordinal(value);\r\n\r\n output = numeral._.numberToFormat(value, format, roundingFunction);\r\n\r\n return output + ordinalPlural;\r\n }\r\n });\r\n \r\n // load a format\r\n numeral.register('format', 'ordinalFemale', {\r\n regexps: {\r\n format: /^fn$/\r\n },\r\n format: function(value, format, roundingFunction) {\r\n var locale = numeral.locales[numeral.options.currentLocale],\r\n output,\r\n ordinalFemale = numeral._.includes(format, ' fn') ? ' ' : '';\r\n \r\n // check for space before\r\n format = format.replace(/\\s?fn/, '');\r\n \r\n ordinalFemale += locale.ordinalFemale ? locale.ordinalFemale(value) : locale.ordinal(value);\r\n \r\n output = numeral._.numberToFormat(value, format, roundingFunction);\r\n \r\n return output + ordinalFemale;\r\n }\r\n });\r\n\r\n // load a format\r\n numeral.register('format', 'ordinalFemalePlural', {\r\n regexps: {\r\n format: /^fpn$/\r\n },\r\n format: function(value, format, roundingFunction) {\r\n var locale = numeral.locales[numeral.options.currentLocale],\r\n output,\r\n ordinalFemalePlural = numeral._.includes(format, ' fpn') ? ' ' : '';\r\n \r\n // check for space before\r\n format = format.replace(/\\s?fpn/, '');\r\n \r\n ordinalFemalePlural += locale.ordinalFemalePlural ? locale.ordinalFemalePlural(value) : locale.ordinal(value);\r\n \r\n output = numeral._.numberToFormat(value, format, roundingFunction);\r\n \r\n return output + ordinalFemalePlural;\r\n }\r\n });\r\n\r\n}","/**\r\n * App utils\r\n * Please write a description\r\n *\r\n * @author Carlos Silva \r\n *\r\n * @format\r\n */\r\n\r\nimport i18n from 'i18next';\r\nimport moment from 'moment';\r\nimport numeral from 'numeral';\r\nimport { initReactI18next } from 'react-i18next';\r\n//import LanguageDetector from 'i18next-browser-languagedetector';\r\nimport { matchPath } from 'react-router';\r\nimport ReactGA from 'react-ga';\r\n\r\nimport Routes from 'routes';\r\n\r\nimport translations, { numeralsInit } from 'translations';\r\n\r\nimport { createBrowserHistory } from 'history';\r\nimport { useEffect, useRef } from 'react';\r\n\r\nimport config from 'config';\r\n\r\n//longlived variables\r\nlet lastRoutes = [];\r\n\r\nconst _history = createBrowserHistory({\r\n /* pass a configuration object here if needed */\r\n});\r\n\r\nexport const history = _history;\r\n\r\nexport const initLocales = () => {\r\n numeralsInit();\r\n\r\n i18n.use(initReactI18next).init({\r\n lng: 'pt',\r\n fallbackLng: { default: ['pt'] },\r\n resources: translations,\r\n });\r\n\r\n moment.locale(i18n.language);\r\n numeral.locale(i18n.language);\r\n};\r\n\r\nexport const i18nInstance = i18n;\r\n\r\nexport const hasPermission = (scope) => {\r\n const unparsedUser = localStorage.getItem('user');\r\n if (unparsedUser) {\r\n const user = JSON.parse(unparsedUser);\r\n if (user.scope) {\r\n return user.scope.includes(scope);\r\n }\r\n }\r\n\r\n return false;\r\n};\r\n\r\nexport const immutableRemove = (items, index) => {\r\n return [...items.slice(0, index), ...items.slice(index + 1, items.length)];\r\n};\r\n\r\nexport const immutableReplace = (items, index, data) => {\r\n return [\r\n ...items.slice(0, index),\r\n {\r\n ...data,\r\n },\r\n ...items.slice(index + 1),\r\n ];\r\n};\r\n\r\nexport const getStorage = (item) => {\r\n const data = localStorage.getItem(item);\r\n if (data === null) return null;\r\n return JSON.parse(data);\r\n};\r\n\r\nexport const setStorage = (item, data) => {\r\n localStorage.setItem(item, JSON.stringify(data));\r\n};\r\n\r\nexport const hideLogs = () => {\r\n if (process.env.REACT_APP_ENV !== 'development') {\r\n console.log = () => {};\r\n console.warn = () => {};\r\n console.error = () => {};\r\n }\r\n};\r\n\r\nexport const debounce = (func, delay) => {\r\n let timerId;\r\n return (...args) => {\r\n const boundFunc = func.bind(this, ...args);\r\n clearTimeout(timerId);\r\n timerId = setTimeout(boundFunc, delay);\r\n };\r\n};\r\n\r\nexport const getCurrentRoute = () => {\r\n let foundRoute = null;\r\n Routes.forEach((route) => {\r\n if (route.path && !route.disabled) {\r\n Object.keys(route.path).forEach((pathKey) => {\r\n const path = route.path[pathKey];\r\n let match = matchPath(history.location.pathname, {\r\n path: path,\r\n exact: route.exact,\r\n });\r\n if (match) {\r\n foundRoute = { route, params: match.params };\r\n }\r\n });\r\n }\r\n });\r\n\r\n return foundRoute;\r\n};\r\n\r\nexport const getLastRoute = () => {\r\n return lastRoutes[lastRoutes.length - 1];\r\n};\r\n\r\nexport const addRouteToHistory = () => {\r\n if (lastRoutes.length >= 2) {\r\n lastRoutes.pop();\r\n }\r\n lastRoutes.unshift(getCurrentRoute());\r\n};\r\n\r\nexport const usePrevious = (value) => {\r\n const ref = useRef();\r\n useEffect(() => {\r\n ref.current = value;\r\n });\r\n return ref.current;\r\n};\r\n\r\nexport const generateMediaUrl = (uri) => {\r\n //const newURL = MEDIA_BASE_URL.substring(8)\r\n //if (uri.includes(newURL)) return uri\r\n //if (uri.includes('//www')) return uri\r\n //return `${MEDIA_BASE_URL}${uri}`\r\n return uri;\r\n};\r\n\r\nexport const downloadFile = (uri) => {\r\n var link = document.createElement('a');\r\n link.setAttribute('type', 'hidden');\r\n link.download = uri;\r\n link.target = '_blank';\r\n link.href = generateMediaUrl(uri);\r\n document.body.appendChild(link);\r\n link.click();\r\n link.remove();\r\n};\r\n\r\nexport const createAndDownloadFile = (data, format, type) => {\r\n var file = new Blob([data], { type: type });\r\n if (window.navigator.msSaveOrOpenBlob)\r\n // IE10+\r\n window.navigator.msSaveOrOpenBlob(file, uuid() + '.' + format);\r\n else {\r\n // Others\r\n var a = document.createElement('a'),\r\n url = URL.createObjectURL(file);\r\n a.href = url;\r\n a.download = uuid() + '.' + format;\r\n document.body.appendChild(a);\r\n a.click();\r\n setTimeout(function () {\r\n document.body.removeChild(a);\r\n window.URL.revokeObjectURL(url);\r\n }, 0);\r\n }\r\n};\r\n\r\nexport const uuid = () => {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\r\n var r = (Math.random() * 16) | 0,\r\n v = c == 'x' ? r : (r & 0x3) | 0x8;\r\n return v.toString(16);\r\n });\r\n};\r\n\r\nexport const GAEvent = (\r\n data /*: {\r\n category: String;\r\n action: String;\r\n label?: String;\r\n value?: number;\r\n nonInteraction?: Boolean;\r\n transport?: String;\r\n}*/\r\n) => {\r\n if (config.GA_TRACKING_ID) {\r\n ReactGA.event(data);\r\n }\r\n};\r\n","/**\r\n * AplicationDetails scene logic selectors\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getApplicationDetailsSlice = (state: RootState) => state.ApplicationDetails;\r\nexport const getUser = (state: RootState) => state.App.user;\r\nexport const getStatus = (state: RootState) => state.ApplicationDetails.status;\r\nexport const getDetails = (state: RootState) => state.ApplicationDetails.details;\r\nexport const getRegistration = (state: RootState) => state.StudentRegistrationDropdown.registration;\r\n","import { IPagination } from '@paco_ua/pacoui';\r\n\r\nexport interface ICallParams {\r\n offset: number;\r\n limit: number;\r\n}\r\n\r\nexport interface IRegistration {\r\n registrationId: number | null | undefined;\r\n}\r\n\r\nexport const DEFAULT_PAGINATION_PARAMS = {\r\n offset: 0,\r\n limit: 10,\r\n};\r\n\r\nexport const DEFAULT_PAGINATION = (total: number): IPagination => ({\r\n hasNext: total > 5 ? true : false,\r\n hasPrevious: false,\r\n offset: 0,\r\n limit: 10,\r\n total,\r\n});\r\n\r\nexport interface IPaginationInfo {\r\n limit: number;\r\n offset: number;\r\n totalPages: number;\r\n totalRecords: number;\r\n}\r\n\r\nexport interface IFreeOption {\r\n department: string;\r\n id: number;\r\n name: string;\r\n ects: number;\r\n scientificField: number;\r\n totalSlots: number;\r\n availableSlots: number;\r\n workload: {\r\n totalHours: number;\r\n classHours: {\r\n type: string;\r\n hours: number;\r\n }[];\r\n };\r\n irregular?: string;\r\n availableAt: string[];\r\n classes: [\r\n {\r\n type: string;\r\n name: string;\r\n lessons: {\r\n startDate: string;\r\n endDate: string;\r\n }[];\r\n }\r\n ];\r\n}\r\n\r\nexport interface IFreeOptionsPayload {\r\n data: IFreeOption[];\r\n filters: [{ department: string[] }, { course: string[] }, { cycle: string[] }];\r\n limit: number;\r\n offset: number;\r\n totalPages: number;\r\n totalRecords: number;\r\n year: number;\r\n semester: number;\r\n}\r\n","/**\r\n * PersonalData scene utils\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nexport const reformatPersonalDataBlocks = (personalDataBlocks, picture) => {\r\n let personalDataBlocksClone = { ...personalDataBlocks };\r\n Object.keys(personalDataBlocksClone).forEach((personalDataBlockKey) => {\r\n personalDataBlocksClone[personalDataBlockKey] = {\r\n ...personalDataBlocksClone[personalDataBlockKey],\r\n editing: false,\r\n picture: personalDataBlockKey === 'profile' ? picture : null,\r\n showPicture: personalDataBlockKey === 'profile' ? true : false,\r\n };\r\n });\r\n\r\n return personalDataBlocksClone;\r\n};\r\n\r\nexport const updateFormEditingStatus = (personalDataBlocks, block, editing) => ({\r\n ...personalDataBlocks,\r\n [block]: { ...personalDataBlocks[block], editing },\r\n});\r\n\r\nexport const updatePersonalDataBlocks = (personalDataBlocks, block, form, editing) => ({\r\n ...personalDataBlocks,\r\n [block]: {\r\n ...personalDataBlocks[block],\r\n editing: editing,\r\n values: personalDataBlocks[block].values.map((field) => {\r\n let newValue = field;\r\n Object.keys(form).forEach((fieldName) => {\r\n if (fieldName === field.nameKey) {\r\n newValue = { ...field, value: form[fieldName] };\r\n }\r\n });\r\n return newValue;\r\n }),\r\n },\r\n});\r\n","export default {\r\n SHOW_APPTOOLS: false,\r\n ENVIRONMENT: 'PROD',\r\n API_BASE_URL: 'https://api.paco20-play-aws.ua.pt/',\r\n INTERNAL_API_BASE_URL: null,\r\n SOCKET_BASE_URL: 'wss://api.paco20-play-aws.ua.pt/',\r\n SOCKET_SCHEDULES_PATH: 'sgh/websocket/',\r\n API_STUDENT: 'users-api/',\r\n API_SEARCH: 'search/',\r\n API_SCHEDULES_PATH: 'paco_2.0_sgh/v1/',\r\n API_SEC_VIRTUAL_PATH: 'paco_2.0_secvirtual/v1/',\r\n API_PAUTAS_PATH: 'paco_2.0_assinatura_pautas/v1/v1/',\r\n API_PAUTAS_WEBSOCKET: 'pautas/v1/',\r\n //API_SEC_VIRTUAL_PATH: 'secvirtual_dev/',\r\n API_TRANSLATIONS_PATH: 'st/',\r\n WEB_SOCKET_URL: 'wss://api.paco20-play-aws.ua.pt/secvirtual/websocket',\r\n API_WSO2: 'https://wso2-gw.ua.pt/',\r\n GA_TRACKING_ID: 'UA-11801506-36',\r\n HOTJAR_TRACKING_ID: null,\r\n HOTJAR_SNIPPET_VERSION: null,\r\n LOGROCKET_ID: null,\r\n HARDCODED_NMEC: null,\r\n HARDCODED_ROLES: null,\r\n SENTRY_ID: null,\r\n WHITELIST_DEV_NMEC: [\r\n 68160,\r\n 80169,\r\n 500001,\r\n 500002,\r\n 500003,\r\n 500004,\r\n 500005,\r\n 500006,\r\n 500007,\r\n 500008,\r\n 500009,\r\n 500010,\r\n 500011,\r\n 500012,\r\n 500013,\r\n 500014,\r\n 500015,\r\n ],\r\n RECAPTCHA_PUBLIC_KEY: '6Lfqq8UgAAAAANTddAj_0qipNFqVL5YWPCmBs_jE',\r\n WHITELIST_DEV_EMAIL: [\r\n 'cjhs@ua.pt',\r\n 'claudio@ua.pt',\r\n 'rmachado@ubiwhere.com',\r\n 'machado.r@visit.uaveiro.eu',\r\n 'jnvieira@ua.pt',\r\n 'miguel.guimaraes@ua.pt',\r\n 'nmonteiro@ua.pt',\r\n 'ricardosaramago@ua.pt',\r\n 'tpereira@ua.pt',\r\n 'tsousa@ua.pt',\r\n 'ana.trigo@ua.pt',\r\n 'carlos.saraiva@ua.pt',\r\n ],\r\n OIDC_CONFIG: {\r\n clientId: 'TAzfdTs2PhcvoWSKffbqrSS9dq0a',\r\n clientSecret: 'VEF6ZmRUczJQaGN2b1dTS2ZmYnFyU1M5ZHEwYTo5N0xnZUJCdzV3Uk9mRmg2X3hIcTdFV0o0X1Vh',\r\n responseType: 'code',\r\n scope: 'openid profile email',\r\n state: '1234567890',\r\n redirectUri: 'https://paco2.ua.pt',\r\n },\r\n GRADES_MANAGEMENT_ENCRYPT_DATA_PUBLIC_KEY: `-----BEGIN CERTIFICATE-----\r\nMIIDQjCCAioCCQCzT7WtwlLzRDANBgkqhkiG9w0BAQsFADBjMQswCQYDVQQLEwJJ\r\nVDEMMAoGA1UEChMDQU1BMQ8wDQYDVQQHEwZMaXNib24xDzANBgNVBAgTBkxpc2Jv\r\nbjELMAkGA1UEBhMCUFQxFzAVBgNVBAMTDkNNRC5hc3NpbmF0dXJhMB4XDTIzMDQw\r\nNTE0NDkwOVoXDTI2MDQwNDE0NDkwOVowYzELMAkGA1UECxMCSVQxDDAKBgNVBAoT\r\nA0FNQTEPMA0GA1UEBxMGTGlzYm9uMQ8wDQYDVQQIEwZMaXNib24xCzAJBgNVBAYT\r\nAlBUMRcwFQYDVQQDEw5DTUQuYXNzaW5hdHVyYTCCASIwDQYJKoZIhvcNAQEBBQAD\r\nggEPADCCAQoCggEBAMytTBfxV2ezp2lAsAJvv8lH3SdEuNJ57bCUbGF6OcGRUoIj\r\n5vVpaKFBZgTOgudfGopXp2lTyaO/EksHqQYhrTcH/eYwlNvtjwEdrn+WR+X0m5Cm\r\nUvODuSnpbJH/gEKHk+eeYkmUxVqLgvrZjEXK7SRwYUYeJydIj5zUC7/at7NDXTCq\r\njnKQjG2g0CMX12SPZHMeJPE70/+DcQTq0UwxbPWqIyWWlTG+Ikmzdhh2NYt6z2KN\r\nSV9K7VEvnh/zkntfhyUOsm0ffK6lnSESDBoKLGD2Ir23bPBZBetL8lr6RLNr9Pqq\r\noBfrLf4BpO/nodDswLChX2+pC+6wBeQLQ77F+jkCAwEAATANBgkqhkiG9w0BAQsF\r\nAAOCAQEAr+tShuBiayXB143d9oom09g69Pf9X2K3AXQCDwVOIHCYOjST5pdWfoAx\r\nZGB13kuVU0w2kq5MRwtFGCWMXq4jZfeMF7CpyJoxzEtpDgP/SMQUT2mCFqZuRp33\r\nbbggws6Hw5UlhXvkCCltmM5+q0tvefQNHLCQCxdp5LASZ/kNJs7ypQEI6V6ZjIw0\r\nGBCn5kKClDrJICwAaUuEDsD5z7IwRiyAuoKsTtcHconwEZCkZLl5uBgXGXqeiKM4\r\nfJHf4tKrvHmOcPlk1bp1GbXUaO/GiimjYHSvZMV860lKXOGCxgYYZMs0d2/aoQ6h\r\nDnNq6v8qtoPArn7Fb8ZOfvMq/Om3fA==\r\n-----END CERTIFICATE-----`,\r\n};\r\n","import development from './development';\r\nimport staging from './staging';\r\nimport production from './production';\r\n\r\nimport { IConfigs } from './types';\r\n\r\nconst config = () => {\r\n if (process.env.REACT_APP_ENV === 'development') {\r\n return development;\r\n } else if (process.env.REACT_APP_ENV === 'staging') {\r\n return staging;\r\n } else {\r\n return production;\r\n }\r\n};\r\n\r\nconst configs: IConfigs = {\r\n // Add common config values here\r\n ROUTES_ENV: process.env.REACT_APP_ROUTES,\r\n ROLES_RELATIONSHIPS: [\r\n {\r\n role: 'guest',\r\n relationships: [],\r\n },\r\n {\r\n role: 'superUser_ReadOnly',\r\n relationships: [],\r\n },\r\n {\r\n role: 'superUser_FullAccess',\r\n relationships: [],\r\n },\r\n {\r\n role: 'sgh_superUser_ReadOnly',\r\n relationships: [],\r\n },\r\n {\r\n role: 'sgh_superUser_FullAccess',\r\n relationships: [],\r\n },\r\n {\r\n role: 'sec_superUser_ReadOnly',\r\n relationships: [],\r\n },\r\n {\r\n role: 'sec_superUser_FullAccess',\r\n relationships: [],\r\n },\r\n {\r\n role: 'pautas_superUser_ReadOnly',\r\n relationships: [],\r\n },\r\n {\r\n role: 'pautas_superUser_FullAccess',\r\n relationships: [],\r\n },\r\n {\r\n role: 'student',\r\n relationships: ['FI', 'PG'],\r\n },\r\n {\r\n role: 'exStudent',\r\n relationships: ['EA'],\r\n },\r\n {\r\n role: 'scholarship',\r\n relationships: ['B'],\r\n },\r\n {\r\n role: 'researcher',\r\n relationships: ['I', 'IE'],\r\n },\r\n {\r\n role: 'protocol',\r\n relationships: ['PR'],\r\n },\r\n {\r\n role: 'nonProfessor',\r\n relationships: ['CA', 'F'],\r\n },\r\n {\r\n role: 'other',\r\n relationships: ['CI', 'CL', 'REL'],\r\n },\r\n {\r\n role: 'professor',\r\n relationships: ['D'],\r\n },\r\n ],\r\n SCOPES: {\r\n GET: {\r\n SERIATION_RESULTS: 'paco_2.0_sgh_get_seriation_results',\r\n ALL_PHASES: 'paco_2.0_sgh_get_all_phases',\r\n CURRENT_PHASE: 'paco_2.0_sgh_get_current_phase',\r\n FINAL_SCHEDULE: 'paco_2.0_sgh_get_final_schedule',\r\n TEMP_SCHEDULE: 'paco_2.0_sgh_get_temp_schedules',\r\n STUDENT_UCS: 'paco_2.0_sgh_get_student_ucs',\r\n STUDENT_UCS_MANDATORY: 'paco_2.0_sgh_get_student_ucs_mandatory',\r\n STUDENT_UCS_FREE: 'paco_2.0_sgh_get_student_ucs_free',\r\n STUDENT_HISTORY: 'paco_2.0_sgh_get_history',\r\n },\r\n POST: {\r\n TEMP_SCHEDULES: 'paco_2.0_sgh_post_temp_schedules',\r\n },\r\n PATCH: {\r\n TEMP_SCHEDULE: 'paco_2.0_sgh_patch_temp_schedules',\r\n TEMP_SCHEDULES: 'paco_2.0_sgh_patch_temp_schedules',\r\n },\r\n PUT: {\r\n TEMP_SCHEDULES: 'paco_2.0_sgh_put_temp_schedules',\r\n },\r\n DELETE: {\r\n TEMP_SCHEDULE: 'paco_2.0_sgh_delete_temp_schedules',\r\n ALL_SCHEDULES: 'paco_2.0_sgh_delete_all_schedules',\r\n },\r\n },\r\n ...process.env,\r\n ...config(),\r\n};\r\n\r\nexport default configs;\r\nexport { IGroup, IScope, IRole, IService, IHealthChecks } from './types';\r\n","/**\r\n * AplicationsList scene logic selectors\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getApplicationsListSlice = (state: RootState) => state.ApplicationsList;\r\nexport const getRegistrationId = (state: RootState) =>\r\n state.StudentRegistrationDropdown.registration;\r\nexport const getUser = (state: RootState) => state.App.user;\r\nexport const getStudentApplications = (state: RootState) =>\r\n state.ApplicationsList.studentApplications;\r\n","import { RootState } from 'store/rootSlices';\r\n\r\nexport const getPersonalDataSlice = (state: RootState) => state.PersonalData;\r\nexport const getUserNmec = (state: RootState) => state.App.user.nmec;\r\nexport const getUser = (state: RootState) => state.App.user;\r\nexport const getPersonalDataBlocks = (state: RootState) => state.PersonalData.personalDataBlocks;\r\nexport const getHasRegistrationId = (state: RootState) => state.PersonalData.hasRegistrationId;\r\n","/**\r\n * Mandatory Options Dropdown container logic selectors\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getRegistration = (state: RootState) => state.StudentRegistrationDropdown.registration;\r\nexport const getUcs = (state: RootState) => state.Schedules.ucs;\r\nexport const getFreeOptions = (state: RootState) => state.FreeOptionsDropdown;\r\nexport const getSchedulesSlices = (state: RootState) => state.Schedules;\r\n","/**\r\n * ExamsCalendar scene logic selectors\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getExamsCalendarSlice = (state: RootState) => state.ExamsCalendar;\r\nexport const getRegistration = (state: RootState) => state.StudentRegistrationDropdown.registration;\r\nexport const getUserNmec = (state: RootState) => state.App.user.nmec;\r\nexport const getUser = (state: RootState) => state.App.user;\r\n","/**\r\n * StudentRegistrationDropdown scene logic selectors\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getRegistration = (state: RootState) => state.StudentRegistrationDropdown.registration;\r\nexport const getRegistrationSlices = (state: RootState) => state.StudentRegistrationDropdown;\r\nexport const getUser = (state: RootState) => state.App.user;\r\n","/**\r\n * Mandatory Options Dropdown container logic selectors\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getRegistration = (state: RootState) => state.StudentRegistrationDropdown.registration;\r\nexport const getUcs = (state: RootState) => state.Schedules.ucs;\r\nexport const getMandatoryOptions = (state: RootState) => state.MandatoryOptionsDropdown;\r\nexport const getSchedulesSlices = (state: RootState) => state.Schedules;\r\n","/**\r\n * SeriationHistoryDetails scene logic selectors\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getRegistration = (state: RootState) => state.StudentRegistrationDropdown.registration;\r\nexport const getSeriationHistoryDetailsSlice = (state: RootState) => state.SeriationHistoryDetails;\r\n","/**\r\n * ExamsCalendar scene utils\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\nimport moment from 'moment';\r\nimport ical2json from 'ical2json';\r\n\r\nconst setSummaryKey = (label) => {\r\n switch (label) {\r\n case 'Exam':\r\n return 'ex';\r\n case 'Project':\r\n return 'pr';\r\n case 'alternativeExam':\r\n return 'al';\r\n case 'Sign-ups':\r\n return 'si';\r\n case 'm':\r\n return 'm';\r\n default:\r\n return label.substring(0, 2);\r\n }\r\n};\r\n\r\nexport const reformatCalendarEvents = (calendarData) => {\r\n if (!ical2json.convert(calendarData).VCALENDAR[0].hasOwnProperty('VEVENT')) {\r\n return [];\r\n }\r\n\r\n return ical2json.convert(calendarData).VCALENDAR[0].VEVENT.reduce((acc, event, key) => {\r\n const startDate = event['DTSTART'] || event['DTSTART;VALUE=DATE'];\r\n\r\n if (startDate) {\r\n return [\r\n ...acc,\r\n {\r\n id: key,\r\n uuid: event.UID,\r\n title: event.DESCRIPTION,\r\n desc: event.DESCRIPTION,\r\n start: moment(startDate).toDate(),\r\n //end: moment(event.DTEND).toDate(),\r\n end: moment(startDate).toDate(),\r\n icon: setSummaryKey(event.SUMMARY),\r\n location: event.LOCATION,\r\n },\r\n ];\r\n }\r\n\r\n return acc;\r\n }, []);\r\n};\r\n\r\nexport const setEventData = (eventData, getIcon, getFooter) =>\r\n eventData.map((event) => ({\r\n ...event,\r\n icon: getIcon(event.icon),\r\n popupFooter: getFooter(event),\r\n }));\r\n\r\nexport const convertEventToIcs = (event, currentICS) => {\r\n let fullEvent = ical2json.convert(currentICS);\r\n fullEvent.VCALENDAR[0].VEVENT = fullEvent.VCALENDAR[0].VEVENT.filter(\r\n (filteredEvent) => filteredEvent.UID === event.uuid\r\n );\r\n return ical2json.revert(fullEvent);\r\n};\r\n","import { RootState } from 'store/rootSlices';\r\n\r\nexport const getPautaData = (state: RootState) => state.GradesDetails.pautaData;\r\nexport const getDataExame = (state: RootState) => state.GradesDetails.dataExame;\r\nexport const getGradeCounts = (state: RootState) => state.GradesDetails.gradeCounts;\r\nexport const getGradeDetailsSlice = (state: RootState) => state.GradesDetails;\r\nexport const getPdfUrl = (state: RootState) => state.GradesDetails.pdfUrl;\r\nexport const getIsPdfReady = (state: RootState) => state.GradesDetails.isPdfReady;\r\nexport const isPdfModalOpen = (state: RootState) => state.GradesDetails.isPdfModalOpen;\r\nexport const getCurrentLocale = (state: RootState) => state.App.currentLocale;\r\n\r\n","/**\r\n * TitleHeader container logic selectors\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getAppSlice = (state: RootState) => state.App;\r\n","/**\r\n * TitleHeader component\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport React, { useMemo } from 'react';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\n\r\nimport { Header } from '@paco_ua/pacoui';\r\n\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './selectors';\r\n\r\nimport { getCurrentRoute, getLastRoute } from 'utils';\r\n\r\ninterface IProps {\r\n title?: any;\r\n backButton?: boolean;\r\n pullBackButton?: boolean;\r\n loading?: boolean;\r\n onBack?: () => void;\r\n}\r\n\r\nconst TitleHeader: React.FC = ({ backButton, onBack, ...props }) => {\r\n const { user, routingStructure } = useSelector(selectors.getAppSlice);\r\n const { navigateTo, navigateBack } = actions.App;\r\n\r\n const lastRoute = getLastRoute().route.key;\r\n const currentRoute = getCurrentRoute().route.key;\r\n const parentRoute = getCurrentRoute().route.childOf;\r\n\r\n const checkParentNavigation = () => {\r\n const parentRouteFound = routingStructure.find((route) => route.key === parentRoute);\r\n if (!parentRouteFound) {\r\n return false;\r\n }\r\n\r\n //check if user has at least one of the required roles\r\n if (parentRouteFound.roles && !user.impersonate) {\r\n if (\r\n !user.roles.some((userRole) =>\r\n parentRouteFound?.roles?.some((checkRoute) => checkRoute === userRole)\r\n )\r\n ) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n };\r\n\r\n const canNavigateToParent = useMemo(checkParentNavigation, [\r\n user,\r\n props.title,\r\n props.loading,\r\n backButton,\r\n props.pullBackButton,\r\n ]);\r\n\r\n const dispatch = useDispatch();\r\n\r\n //show backbutton if property backbutton exists and if has a navigation history or has a parentRoute associated\r\n if (backButton && (lastRoute !== currentRoute || canNavigateToParent)) {\r\n return (\r\n {\r\n if (onBack) {\r\n onBack();\r\n }\r\n else if (canNavigateToParent) {\r\n dispatch(navigateTo({ key: parentRoute }));\r\n } else {\r\n dispatch(navigateTo({ key: lastRoute }));\r\n }\r\n }}\r\n {...props}\r\n />\r\n );\r\n }\r\n\r\n return

;\r\n};\r\n\r\nexport default TitleHeader;\r\n","/**\r\n * Home logic selectors\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getAppSlice = (state: RootState) => state.App;\r\nexport const getHomeSlice = (state: RootState) => state.Home;\r\n","/**\r\n * MardownRenderer container logic selectors\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getAppSlice = (state: RootState) => state.App;\r\n","/**\r\n * MardownRenderer container\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport React, { useContext, useMemo, useRef, useEffect, useState } from 'react';\r\nimport { useSelector } from 'react-redux';\r\nimport ReactMarkdown from 'react-markdown';\r\nimport gfm from 'remark-gfm';\r\nimport emoji from '@fec/remark-a11y-emoji';\r\nimport { Accordion } from 'semantic-ui-react';\r\n\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport * as selectors from './selectors';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faAngleDown } from '@fortawesome/pro-light-svg-icons';\r\n\r\nimport { Text } from '@paco_ua/pacoui';\r\n\r\nimport PageStructure from 'shared/containers/PageStructure';\r\n\r\nimport { getHeadings } from './utils';\r\n\r\ninterface IProps {\r\n pageStructure?: {\r\n headerLeft?: any;\r\n secondaryContent?: any;\r\n subHeader?: any;\r\n loading?: boolean;\r\n expanded?: boolean;\r\n };\r\n value: string;\r\n valueEn: string;\r\n valueCh: string;\r\n}\r\n\r\nconst MardownRenderer: React.FC = ({ pageStructure, value, valueEn, valueCh }) => {\r\n const [children, setChildren] = useState('');\r\n const [TOC, setTOC] = useState(null as React.ReactNode | null);\r\n const [activeItemTOC, setActiveItemTOC] = useState(null);\r\n const [openItemTOC, seOpenItemTOC] = useState(null);\r\n const usedParam = useRef(false);\r\n\r\n const countHeadings = useRef(0);\r\n const countCaptions = useRef(0);\r\n\r\n const { currentLocale } = useSelector(selectors.getAppSlice);\r\n const theme = useContext(ThemeContext);\r\n\r\n const renderers = {\r\n root: (props) => {\r\n countHeadings.current = 0;\r\n countCaptions.current = 0;\r\n return props.children;\r\n },\r\n break: (props) => {\r\n return props.children;\r\n },\r\n paragraph: (props) => {\r\n return (\r\n \r\n {props.children}\r\n \r\n );\r\n },\r\n strong: (props) => {\r\n return (\r\n \r\n {props.children}\r\n \r\n );\r\n },\r\n listItem: (props) => {\r\n return (\r\n \r\n {props.children}\r\n \r\n );\r\n },\r\n link: (props) => {\r\n return (\r\n \r\n {props.children}\r\n \r\n );\r\n },\r\n image: (props) => {\r\n countCaptions.current++;\r\n return (\r\n \r\n {props.alt\r\n {props.alt && (\r\n \r\n \r\n Fig.{countCaptions.current} {props.alt}\r\n \r\n \r\n )}\r\n \r\n );\r\n },\r\n heading: (props) => {\r\n countHeadings.current++;\r\n return (\r\n \r\n \r\n {props.children}\r\n \r\n \r\n );\r\n },\r\n };\r\n\r\n const renderTOC = (headings) => {\r\n let rootPanels = [] as any;\r\n let firstKey = null;\r\n\r\n let prevLevel = [] as number[];\r\n\r\n const setRootPanels = (key) => {\r\n const heading = headings[key];\r\n\r\n if (heading.level === 1) {\r\n if (firstKey === null) {\r\n firstKey = key;\r\n }\r\n\r\n rootPanels.push({\r\n key: key,\r\n title: {\r\n active: activeItemTOC === key,\r\n\r\n content: (\r\n {\r\n setActiveItemTOC(key);\r\n scrollToOffset(`heading-${key}`);\r\n }}\r\n >\r\n \r\n {heading.value}\r\n \r\n \r\n ),\r\n icon: ,\r\n },\r\n content: { active: openItemTOC === key, content: [] },\r\n });\r\n prevLevel = [key];\r\n }\r\n\r\n if (heading.level === 2 && rootPanels[prevLevel[0]]) {\r\n rootPanels[prevLevel[0]] = {\r\n ...rootPanels[prevLevel[0]],\r\n content: {\r\n ...rootPanels[prevLevel[0]].content,\r\n content: [\r\n ...rootPanels[prevLevel[0]].content.content,\r\n {\r\n key: key,\r\n title: {\r\n active: activeItemTOC === key,\r\n content: (\r\n {\r\n setActiveItemTOC(key);\r\n scrollToOffset(`heading-${key}`);\r\n }}\r\n >\r\n \r\n {heading.value}\r\n \r\n \r\n ),\r\n icon: ,\r\n },\r\n },\r\n ],\r\n },\r\n };\r\n }\r\n\r\n if (headings[key + 1]) {\r\n setRootPanels(key + 1);\r\n }\r\n };\r\n\r\n setRootPanels(0);\r\n rootPanels = rootPanels.map((rootPanel) => {\r\n if (!rootPanel.content.content.length) {\r\n return {\r\n key: rootPanel.key,\r\n title: rootPanel.title,\r\n };\r\n } else {\r\n return {\r\n key: rootPanel.key,\r\n title: {\r\n ...rootPanel.title,\r\n icon: (\r\n {\r\n if (rootPanel.key === openItemTOC) {\r\n seOpenItemTOC(null);\r\n } else {\r\n seOpenItemTOC(rootPanel.key);\r\n }\r\n }}\r\n >\r\n \r\n \r\n ),\r\n },\r\n content: {\r\n ...rootPanel.content,\r\n content: ,\r\n },\r\n };\r\n }\r\n });\r\n\r\n activeItemTOC === null && setActiveItemTOC(firstKey);\r\n setTOC();\r\n };\r\n\r\n const renderContent = (rerender) => {\r\n let tocValue = '';\r\n if (currentLocale === 'pt') {\r\n tocValue = checkTOC(value);\r\n } else if (currentLocale === 'en') {\r\n tocValue = checkTOC(valueEn);\r\n } else if (currentLocale === 'zh') {\r\n tocValue = checkTOC(valueCh);\r\n }\r\n if (rerender) {\r\n setChildren(tocValue);\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (TOC) {\r\n renderContent(false);\r\n }\r\n\r\n if (window.location.hash) {\r\n const headingNr = window.location.hash.match(/\\d+/);\r\n\r\n if (headingNr !== null && headingNr !== undefined) {\r\n if (activeItemTOC !== null && activeItemTOC !== undefined) {\r\n if (activeItemTOC !== parseInt(headingNr[0]) && !usedParam.current) {\r\n usedParam.current = true;\r\n setActiveItemTOC(parseInt(headingNr[0]));\r\n scrollToOffset(window.location.hash.substring(1));\r\n }\r\n }\r\n }\r\n }\r\n\r\n return () => {\r\n setTOC(null);\r\n };\r\n }, [activeItemTOC, children, currentLocale, openItemTOC]);\r\n\r\n const scrollToOffset = (id) => {\r\n const yOffset = 0;\r\n const element = document.getElementById(id);\r\n if (element) {\r\n const y = element.getBoundingClientRect().top + window.pageYOffset + yOffset;\r\n // document.getElementById('appBody')?.scrollTo({ top: y, behavior: 'smooth' });\r\n document.getElementById(id)?.scrollIntoView({ block: 'start', behavior: 'smooth' });\r\n }\r\n };\r\n\r\n const checkTOC = (markdown) => {\r\n const includesTOC = markdown.includes('[[toc]]');\r\n if (includesTOC) {\r\n const headings = getHeadings(markdown);\r\n renderTOC(headings);\r\n markdown = markdown.replace('[[toc]]', '');\r\n }\r\n return markdown;\r\n };\r\n\r\n useEffect(() => {\r\n renderContent(true);\r\n }, [currentLocale, value, valueEn, valueCh]);\r\n\r\n const reactMarkdown = useMemo(\r\n () => (\r\n \r\n \r\n \r\n ),\r\n [children]\r\n );\r\n\r\n return (\r\n {TOC} || pageStructure?.secondaryContent}\r\n mainContent={reactMarkdown}\r\n />\r\n );\r\n};\r\n\r\nexport default MardownRenderer;\r\n\r\nconst HeadingWrapper = styled.div`\r\n display: block;\r\n margin-bottom: 12px;\r\n\r\n &:not(:first-child) {\r\n margin-top: 12px;\r\n }\r\n`;\r\n\r\nconst WrapperMarkdown = styled.div`\r\n &&& {\r\n > div {\r\n padding: 8px 0;\r\n }\r\n\r\n ${HeadingWrapper} {\r\n padding: 0;\r\n }\r\n\r\n ol {\r\n counter-reset: item;\r\n list-style: none;\r\n\r\n li {\r\n display: block;\r\n counter-increment: item;\r\n\r\n div:first-child {\r\n padding-left: 4px;\r\n }\r\n\r\n &::before {\r\n content: counter(item) '.';\r\n color: ${({ theme }) => theme.colors.primary};\r\n font-weight: bold;\r\n display: inline-block;\r\n width: 1em;\r\n margin-left: -1em;\r\n }\r\n\r\n &:not(:last-child) {\r\n margin-bottom: 8px;\r\n }\r\n }\r\n }\r\n\r\n ul {\r\n li {\r\n display: block;\r\n\r\n &::before {\r\n content: '•';\r\n color: ${({ theme }) => theme.colors.primary};\r\n font-weight: bold;\r\n display: inline-block;\r\n width: 1em;\r\n margin-left: -1em;\r\n }\r\n }\r\n }\r\n }\r\n`;\r\n\r\nconst WrapperTOC = styled.div`\r\n &&& {\r\n .accordion {\r\n padding-left: 32px;\r\n .accordion {\r\n padding-left: 0;\r\n margin-top: 0;\r\n }\r\n & .title {\r\n display: flex;\r\n justify-content: flex-start;\r\n align-items: center;\r\n\r\n div {\r\n text-align: left;\r\n }\r\n }\r\n }\r\n }\r\n`;\r\n\r\nconst IconWrapper = styled.div<{ open?: boolean }>`\r\n width: 32px;\r\n height: 32px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n margin-right: 16px;\r\n\r\n transform: rotate(${({ open }) => (open ? '180deg' : '0deg')});\r\n transition: transform linear 0.1s;\r\n\r\n &:hover {\r\n color: ${({ theme }) => theme.colors.primary} !important;\r\n }\r\n`;\r\n\r\nconst TextWrapper = styled.div`\r\n width: 100%;\r\n height: 100%;\r\n\r\n &:hover {\r\n div {\r\n color: ${({ theme }) => theme.colors.primary} !important;\r\n }\r\n }\r\n`;\r\n\r\nconst ImageCaption = styled.div``;\r\n\r\nconst ImageWrapper = styled.div`\r\n width: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n margin: 12px;\r\n\r\n img {\r\n width: 80%;\r\n height: auto;\r\n }\r\n\r\n ${ImageCaption} {\r\n padding-top: 8px;\r\n width: 80%;\r\n height: auto;\r\n }\r\n`;\r\n","/**\r\n * MardownRenderer utils\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nexport const getHeadings = (markdown) => {\r\n const headingRegex = /\\n(#+\\s*)(.*)/g;\r\n\r\n return markdown.match(headingRegex).map((heading) => {\r\n let level = 0;\r\n let didFindSpecialChar = false;\r\n let trimTo = 0;\r\n\r\n for (let key = 0; key < heading.length; key++) {\r\n const char = heading[key];\r\n if (char === '#' && !didFindSpecialChar) {\r\n level++;\r\n if (heading[key + 1] !== '#') {\r\n didFindSpecialChar = true;\r\n trimTo = key + 1;\r\n break;\r\n }\r\n }\r\n }\r\n return { level, value: heading.slice(trimTo).replace(/\\s+/, '') };\r\n });\r\n};\r\n","/**\r\n * Home scene\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\nimport React, { useContext, useEffect } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faSignIn, faTable } from '@fortawesome/pro-light-svg-icons';\r\nimport { Grid } from 'semantic-ui-react';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\n\r\nimport { CallToAction, Button, Text, Card } from '@paco_ua/pacoui';\r\n\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\n\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './logic/selectors';\r\n\r\nimport { redirectAuth } from 'app/utils';\r\n\r\nimport AuthWrapper from 'shared/components/AuthWrapper';\r\nimport ReactMarkdown from 'react-markdown';\r\nimport MarkdownRenderer from 'shared/containers/MarkdownRenderer';\r\n\r\nconst Home = ({ t }) => {\r\n const { onMount } = actions.Home;\r\n const { navigateTo } = actions.App;\r\n const dispatch = useDispatch();\r\n\r\n const theme = useContext(ThemeContext);\r\n const { user } = useSelector(selectors.getAppSlice);\r\n const { phases, loadingPhases, markdown } = useSelector(selectors.getHomeSlice);\r\n\r\n console.log(t('home.cardLoginBody'));\r\n\r\n useEffect(() => {\r\n dispatch(onMount());\r\n }, []);\r\n\r\n return (\r\n }\r\n subHeader={\r\n \r\n {/* {!user?.accessToken && t('home.subtitle')} */}\r\n {user?.accessToken && t('generic.hello', { who: user?.fullName || '' })}\r\n \r\n }\r\n mainContent={\r\n \r\n {!user?.accessToken && (\r\n \r\n \r\n \r\n \r\n \r\n {`${t('home.cardLoginTitle', { textOnly: true })}`}\r\n \r\n \r\n {t('home.cardLoginBody')}\r\n \r\n \r\n \r\n {\r\n redirectAuth();\r\n }}\r\n action\r\n >\r\n {t('generic.enter')}\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n {markdown.map((cards) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n }\r\n />\r\n );\r\n};\r\n\r\nexport default Home;\r\n\r\nconst ContentWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst CardTitle = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n margin-bottom: 22px;\r\n`;\r\n\r\nconst CardButton = styled.div``;\r\n\r\nconst CardWrapper = styled.div`\r\n height: 100%;\r\n\r\n > div {\r\n min-height: 250px;\r\n height: 100%;\r\n }\r\n`;\r\n","/**\r\n * Home logic selectors\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getAppSlice = (state: RootState) => state.App;\r\nexport const getUser = (state: RootState) => state.App.user;\r\nexport const getHelpSlice = (state: RootState) => state.Help;\r\n","/**\r\n * Help scene\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport React, { useContext, useEffect } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { useSelector, useDispatch } from 'react-redux';\r\nimport * as selectors from './logic/selectors';\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport { Text } from '@paco_ua/pacoui';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faAngleDown, faInfoCircle } from '@fortawesome/pro-light-svg-icons';\r\n\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\n\r\nimport { AnimatedBackground, Accordion, SearchBox, Dropdown, NoDataMessage } from '@paco_ua/pacoui';\r\n\r\n//import config from 'config'\r\n\r\nconst Help = ({ t }) => {\r\n const theme = useContext(ThemeContext);\r\n const dispatch = useDispatch();\r\n\r\n const { navigateTo } = actions.App;\r\n const { onMount, onUnmount, setTypeFilter, setSearchFilter, getHelpListing } = actions.Help;\r\n\r\n const { helpListing, filterTypes, filterParams, loadingStatus, errorStatus } = useSelector(\r\n selectors.getHelpSlice\r\n );\r\n\r\n useEffect(() => {\r\n dispatch(onMount());\r\n\r\n return () => {\r\n dispatch(onUnmount());\r\n };\r\n }, [dispatch, onMount, onUnmount]);\r\n\r\n useEffect(() => {\r\n dispatch(getHelpListing(filterParams));\r\n }, [filterParams]);\r\n\r\n const getAccordionParent = (title: string) => {\r\n return (\r\n \r\n \r\n {t(`routes.${title}`, { textOnly: true })}\r\n \r\n \r\n \r\n );\r\n };\r\n\r\n const getAccordionChild = (title: string, description: string) => {\r\n return (\r\n {\r\n dispatch(\r\n navigateTo({\r\n key: title,\r\n })\r\n );\r\n }}\r\n >\r\n \r\n \r\n \r\n {t(`routes.${title}`, { textOnly: true })}\r\n \r\n \r\n \r\n \r\n );\r\n };\r\n\r\n const getStructure = (data) => {\r\n if (Object.keys(data).length <= 0) {\r\n return [];\r\n }\r\n\r\n return Object.keys(data).map((module) => {\r\n return {\r\n parent: getAccordionParent(module),\r\n children: data[module].map((helpRow, index) =>\r\n getAccordionChild(helpRow.key, helpRow.description)\r\n ),\r\n };\r\n });\r\n };\r\n\r\n return (\r\n }\r\n subHeader={\r\n \r\n {t('routes.userHelpDescription', { textOnly: true })} \r\n \r\n }\r\n mainContent={\r\n \r\n {!loadingStatus.loading && !errorStatus.errLoading && (\r\n \r\n {\r\n dispatch(setSearchFilter(value));\r\n dispatch(setTypeFilter(''));\r\n }}\r\n />\r\n {\r\n dispatch(setTypeFilter(value));\r\n }}\r\n onClear={() => {\r\n dispatch(setTypeFilter(''));\r\n }}\r\n />\r\n \r\n )}\r\n\r\n {loadingStatus.loadingSearch && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {!loadingStatus.loading &&\r\n !loadingStatus.loadingSearch &&\r\n Object.keys(helpListing).length <= 0 && (\r\n \r\n )}\r\n\r\n {!loadingStatus.loading &&\r\n !loadingStatus.loadingSearch &&\r\n !errorStatus.errLoading &&\r\n helpListing && (\r\n \r\n \r\n \r\n )}\r\n \r\n }\r\n />\r\n );\r\n};\r\n\r\nexport default Help;\r\n\r\nconst Wrapper = styled.div``;\r\n\r\nconst AccordionParent = styled.div`\r\n height: 61px;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n padding: 0 16px;\r\n color: ${({ theme }) => theme.colors.plusDarkGrey};\r\n background-color: ${({ theme }) => theme.colors.softGrey};\r\n border-bottom: 1px solid ${({ theme }) => theme.colors.softRegularGrey};\r\n border-right: 1px solid ${({ theme }) => theme.colors.softRegularGrey};\r\n border-left: 1px solid ${({ theme }) => theme.colors.softRegularGrey};\r\n border-top: 3px solid ${({ theme }) => theme.colors.primary};\r\n\r\n svg {\r\n font-size: 24px;\r\n }\r\n`;\r\n\r\nconst AccordionChildDescription = styled.div`\r\n display: flex;\r\n flex-grow: 1;\r\n margin-left: 24px;\r\n justify-content: space-between;\r\n`;\r\n\r\nconst AccordionChildColumn = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n padding-right: 16px;\r\n`;\r\n\r\nconst AccordionChild = styled.div`\r\n height: 69px;\r\n display: flex;\r\n align-items: center;\r\n padding: 0 16px;\r\n border-bottom: 1px solid ${({ theme }) => theme.colors.softRegularGrey};\r\n border-right: 1px solid ${({ theme }) => theme.colors.softRegularGrey};\r\n border-left: 1px solid ${({ theme }) => theme.colors.softRegularGrey};\r\n cursor: pointer;\r\n\r\n :hover {\r\n background-color: ${({ theme }) => theme.colors.softGrey};\r\n }\r\n`;\r\n\r\nconst AccordionWrapper = styled.div``;\r\n\r\nconst SearchAndFiltersWrapper = styled.div`\r\n width: 75%;\r\n display: flex;\r\n margin-bottom: 20px;\r\n\r\n > div {\r\n width: 50%;\r\n }\r\n\r\n > div:last-child {\r\n margin-left: 16px;\r\n }\r\n`;\r\n\r\nconst LoadingWrapper = styled.div`\r\n width: 100%;\r\n height: 300px;\r\n\r\n margin-top: 20px;\r\n\r\n * {\r\n margin: 8px 0px;\r\n }\r\n`;\r\n","/**\r\n * NewApplicationSelectRegistration container logic selectors\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getRegistrations = (state: RootState) => state.App.user.registrations;\r\nexport const getNewApplicationData = (state: RootState) => state.NewApplication.applicationData;\r\n","/**\r\n * NewApplicationSelectRegistration container\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport React, { useContext, useEffect } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { t } from 'app';\r\n\r\nimport moment from 'moment';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './selectors';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faEllipsisH } from '@fortawesome/pro-regular-svg-icons';\r\n\r\nimport { Grid } from 'semantic-ui-react';\r\nimport { Text, Segment, Table, Tooltip, StatusLabel } from '@paco_ua/pacoui';\r\n\r\n//import config from 'config'\r\n\r\nconst NewApplicationSelectRegistration = () => {\r\n const theme = useContext(ThemeContext);\r\n\r\n const { setApplicationData, setActiveRegistration } = actions.NewApplication;\r\n\r\n const registrations = useSelector(selectors.getRegistrations);\r\n\r\n const newApplicationData = useSelector(selectors.getNewApplicationData);\r\n const dispatch = useDispatch();\r\n\r\n //to populate active registration input\r\n useEffect(() => {\r\n dispatch(setActiveRegistration());\r\n }, [registrations]);\r\n\r\n const getEligibilityColor = (status: number) => {\r\n if (status === 100) {\r\n return theme.colors.dangerRed;\r\n } else if (status === 1 || status === 2) {\r\n return theme.colors.successGreen;\r\n } else if (status === 25 || status === 50) {\r\n return theme.colors.decisionYellow;\r\n } else if (status === -1) {\r\n return theme.colors.grey;\r\n }\r\n };\r\n\r\n const structure = {\r\n header: {\r\n type: 'columnTitle',\r\n titles: [],\r\n },\r\n rows:\r\n !registrations || !registrations.length\r\n ? []\r\n : registrations\r\n //.filter((registration) => registration.registrationState === 'ACTIVO')\r\n .map((registration) => {\r\n return {\r\n rowProps: {\r\n color: theme.colors.white,\r\n navigatable: true,\r\n onClick: () => {\r\n dispatch(\r\n setApplicationData({\r\n ...newApplicationData,\r\n registrationId: registration.registrationId,\r\n })\r\n );\r\n },\r\n },\r\n cells: [\r\n {\r\n content: (\r\n \r\n \r\n dispatch(\r\n setApplicationData({\r\n ...newApplicationData,\r\n registrationId: registration.registrationId,\r\n })\r\n )\r\n }\r\n checked={\r\n newApplicationData.registrationId === registration.registrationId\r\n }\r\n />\r\n \r\n \r\n {registration.courseCode && registration.courseName ? (\r\n `${registration.courseCode} - ${registration.courseName}`\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n {`\\n${registration.branchName}\\n`}\r\n \r\n \r\n {registration.eligibilityState ||\r\n registration.registrationState === 'activo' ? (\r\n \r\n ) : registration.registrationState === 'comdiploma' ||\r\n registration.registrationState === 'terminado' ? (\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n {`${registration.academicYear} `}\r\n \r\n \r\n {`${t('applications.requestFirstStepTableRegistrationDate', {\r\n textOnly: true,\r\n })}: ${\r\n registration.registrationDate\r\n ? moment(registration.registrationDate,'DD/MM/YYYY').format('DD/MM/YYYY')\r\n : null\r\n }\r\n `}\r\n \r\n \r\n \r\n \r\n ),\r\n cellProps: {\r\n width: 12,\r\n style: {\r\n height: 'auto',\r\n },\r\n },\r\n },\r\n ],\r\n };\r\n }),\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n {t('applications.requestFirstStepTitle')}\r\n \r\n \r\n {t('applications.requestFirstStepDescription')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default NewApplicationSelectRegistration;\r\n\r\nconst TableWrapper = styled.div`\r\n margin-top: 32px;\r\n overflow: auto;\r\n\r\n &&& th {\r\n padding-top: 0px !important;\r\n padding-bottom: 0px !important;\r\n height: 61px;\r\n }\r\n &&& td {\r\n padding-top: 0px !important;\r\n padding-bottom: 0px !important;\r\n height: 76px;\r\n }\r\n`;\r\n\r\nconst SegmentTitleWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst SegmentDescriptionWrapper = styled(Text)`\r\n margin-top: 8px;\r\n`;\r\n\r\nconst TableRowWrapper = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: flex-start;\r\n align-items: center;\r\n gap: 1.25rem;\r\n width: 100%;\r\n height: 100%;\r\n`;\r\n\r\nconst TableRowInfo = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: flex-start;\r\n width: fit-content;\r\n white-space: break-space;\r\n gap: 0.375rem;\r\n padding: 0.5rem 0rem;\r\n\r\n span {\r\n display: inline-flex;\r\n align-items: center;\r\n gap: 0.625rem;\r\n\r\n >div: first-child {\r\n max-width: unset;\r\n }\r\n }\r\n\r\n & div {\r\n :hover {\r\n cursor: pointer;\r\n }\r\n }\r\n`;\r\n\r\nconst Input = styled.input`\r\n /* hide default inner circle */\r\n appearance: none;\r\n\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n\r\n cursor: pointer;\r\n width: 20px;\r\n height: 20px;\r\n border: 1px solid ${({ theme }) => theme.colors.regularGrey};\r\n border-radius: 50%;\r\n outline: none;\r\n\r\n :hover {\r\n border: 1px solid ${({ theme }) => theme.colors.primary};\r\n opacity: 1;\r\n }\r\n\r\n /* inner circle */\r\n :before {\r\n content: '';\r\n display: inline-block;\r\n width: 10px;\r\n height: 10px;\r\n border-radius: 50%;\r\n vertical-align: middle;\r\n }\r\n\r\n :checked:before {\r\n background: ${({ theme }) => theme.colors.primary};\r\n }\r\n\r\n :checked {\r\n border: 1px solid ${({ theme }) => theme.colors.primary} !important;\r\n }\r\n`;\r\n","/**\r\n * NewApplicationSelectType container logic selectors\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getNewApplicationSlice = (state: RootState) => state.NewApplication;\r\n","/**\r\n * NewApplicationSelectType container\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\nimport React, { useContext, useEffect } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { t } from 'app';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faAngleDown, faInfoCircle } from '@fortawesome/pro-light-svg-icons';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './selectors';\r\n\r\nimport { Grid } from 'semantic-ui-react';\r\nimport { AnimatedBackground, Text, Segment, Accordion, Dropdown, SearchBox } from '@paco_ua/pacoui';\r\n\r\nconst NewApplicationSelectType = () => {\r\n const theme = useContext(ThemeContext);\r\n\r\n const {\r\n setApplicationData,\r\n setSearchFilter,\r\n setTypeFilter,\r\n resetApplicationSelection,\r\n getApplicationTypes,\r\n resetStepThree,\r\n setApplicationTypeId,\r\n } = actions.NewApplication;\r\n\r\n const {\r\n loadingStatus,\r\n applicationData,\r\n applicationTypes,\r\n filterParams,\r\n errorStatus,\r\n } = useSelector(selectors.getNewApplicationSlice);\r\n\r\n const dispatch = useDispatch();\r\n\r\n useEffect(() => {\r\n dispatch(getApplicationTypes(filterParams));\r\n }, [filterParams, errorStatus]);\r\n\r\n const getAccordionParent = (title: string) => {\r\n return (\r\n \r\n {title}\r\n \r\n \r\n );\r\n };\r\n\r\n const getAccordionChild = (\r\n themeGroup: string,\r\n title: string,\r\n description: string,\r\n typeId: number\r\n ) => {\r\n return (\r\n {\r\n dispatch(setApplicationTypeId(typeId));\r\n dispatch(\r\n setApplicationData({\r\n ...applicationData,\r\n type: {\r\n theme: themeGroup,\r\n id: typeId,\r\n name: title,\r\n },\r\n })\r\n );\r\n }}\r\n >\r\n {\r\n dispatch(\r\n setApplicationData({\r\n ...applicationData,\r\n type: {\r\n theme: themeGroup,\r\n id: typeId,\r\n name: title,\r\n },\r\n })\r\n );\r\n // when type is selected or changed, the form and data are reset\r\n dispatch(resetStepThree());\r\n }}\r\n checked={applicationData.type.id === typeId}\r\n />\r\n \r\n \r\n {title}\r\n \r\n {description && description !== '' && (\r\n \r\n {description}\r\n \r\n )}\r\n \r\n \r\n );\r\n };\r\n\r\n const structure = Object.keys(applicationTypes.data).map((type) => {\r\n return {\r\n parent: getAccordionParent(applicationTypes.data[type][0].theme),\r\n children: applicationTypes.data[type].map((t) =>\r\n getAccordionChild(t.theme, t.type, t.description, t.applicationId)\r\n ),\r\n };\r\n });\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n {t('applications.requestSecondStepTitle')}\r\n \r\n \r\n {t('applications.requestSecondStepDescription')}\r\n \r\n \r\n\r\n {!loadingStatus.tabLoading && !errorStatus.errLoadingApplicationList && (\r\n \r\n {\r\n dispatch(setSearchFilter(value));\r\n dispatch(resetApplicationSelection());\r\n }}\r\n />\r\n {\r\n dispatch(setTypeFilter(value));\r\n dispatch(resetApplicationSelection());\r\n }}\r\n value={filterParams.type !== '' ? filterParams.type : undefined}\r\n onClear={() => {\r\n dispatch(setTypeFilter(''));\r\n dispatch(resetApplicationSelection());\r\n }}\r\n />\r\n \r\n )}\r\n\r\n {loadingStatus.tabLoading && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {!loadingStatus.tabLoading &&\r\n !errorStatus.errLoadingApplicationList &&\r\n structure.length > 0 && (\r\n \r\n \r\n \r\n )}\r\n\r\n {!loadingStatus.tabLoading &&\r\n errorStatus.errLoadingApplicationList &&\r\n structure.length === 0 && (\r\n \r\n \r\n \r\n \r\n \r\n {t('applications.noApplicationsFound', { textOnly: true })}\r\n \r\n \r\n )}\r\n\r\n {!loadingStatus.tabLoading && errorStatus.errNoApplications && structure.length === 0 && (\r\n \r\n \r\n \r\n \r\n \r\n {t('secVirtualNotifications.newApplication_errorNoApplications', { textOnly: true })}\r\n \r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default NewApplicationSelectType;\r\n\r\nconst Icon = styled.div`\r\n font-size: 60px;\r\n color: ${({ theme }) => theme.colors.primary};\r\n`;\r\n\r\nconst MessageNoApplications = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n text-align: center;\r\n justify-content: center;\r\n margin-top: 60px;\r\n margin-bottom: 20px;\r\n\r\n div:nth-child(2) {\r\n margin-top: 16px;\r\n }\r\n`;\r\n\r\nconst LoadingWrapper = styled.div`\r\n width: 100%;\r\n height: 300px;\r\n margin-top: 32px;\r\n\r\n * {\r\n margin: 8px 0px;\r\n }\r\n`;\r\n\r\nconst AccordionWrapper = styled.div`\r\n margin-top: 32px;\r\n`;\r\n\r\nconst AccordionParent = styled.div`\r\n height: 52px;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n padding: 0 16px;\r\n color: ${({ theme }) => theme.colors.plusDarkGrey};\r\n background-color: ${({ theme }) => theme.colors.lightGrey};\r\n border-bottom: 1px solid ${({ theme }) => theme.colors.softGrey};\r\n border-right: 1px solid ${({ theme }) => theme.colors.softGrey};\r\n border-left: 1px solid ${({ theme }) => theme.colors.softGrey};\r\n border-top: 2px solid ${({ theme }) => theme.colors.darkGrey};\r\n\r\n svg {\r\n font-size: 24px;\r\n }\r\n`;\r\n\r\nconst AccordionChild = styled.div`\r\n height: 69px;\r\n display: flex;\r\n align-items: center;\r\n padding: 0 16px;\r\n border: 1px solid ${({ theme }) => theme.colors.softGrey};\r\n cursor: pointer;\r\n\r\n :hover {\r\n background-color: ${({ theme }) => theme.colors.softGrey};\r\n }\r\n`;\r\n\r\nconst AccordionChildDescription = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n margin-left: 24px;\r\n`;\r\n\r\nconst SegmentTitleWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst SearchAndFiltersWrapper = styled.div`\r\n width: 75%;\r\n display: flex;\r\n margin-bottom: 24px;\r\n margin-top: 32px;\r\n\r\n > div {\r\n width: 50%;\r\n }\r\n\r\n > div:last-child {\r\n margin-left: 16px;\r\n }\r\n`;\r\n\r\nconst AccordionChildDescriptionText = styled(Text)`\r\n margin-top: 4px;\r\n`;\r\n\r\nconst SegmentDescriptionText = styled(Text)`\r\n margin-top: 8px;\r\n line-height: 1.5;\r\n`;\r\n\r\nconst Input = styled.input`\r\n /* hide default inner circle */\r\n appearance: none;\r\n\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n\r\n cursor: pointer;\r\n width: 20px;\r\n height: 20px;\r\n border: 1px solid ${({ theme }) => theme.colors.regularGrey};\r\n border-radius: 50%;\r\n outline: none;\r\n\r\n :hover {\r\n border: 1px solid ${({ theme }) => theme.colors.primary};\r\n opacity: 1;\r\n }\r\n\r\n /* inner circle */\r\n :before {\r\n content: '';\r\n display: inline-block;\r\n width: 10px;\r\n height: 10px;\r\n border-radius: 50%;\r\n vertical-align: middle;\r\n }\r\n\r\n :checked:before {\r\n background: ${({ theme }) => theme.colors.primary};\r\n }\r\n\r\n :checked {\r\n border: 1px solid ${({ theme }) => theme.colors.primary} !important;\r\n }\r\n`;\r\n","/**\r\n * NewApplicationStatement container logic selectors\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getLoadingStatus = (state: RootState) => state.NewApplication.loadingStatus;\r\nexport const getUser = (state: RootState) => state.App.user;\r\nexport const getNewApplicationData = (state: RootState) => state.NewApplication.applicationData;\r\nexport const getNewApplicationNumAdditionalDocs = (state: RootState) =>\r\n state.NewApplication.numAdditionalDocs;\r\nexport const getNewApplicationSlice = (state: RootState) => state.NewApplication;\r\n","/**\r\n * NewApplicationStatement container\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport React, { useContext, useState, useEffect } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { actions } from 'store/rootSlices';\r\nimport { t } from 'app';\r\n\r\nimport { useSelector, useDispatch } from 'react-redux';\r\nimport * as selectors from './selectors';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faFilePdf, faPlus, faInfoCircle } from '@fortawesome/pro-light-svg-icons';\r\n\r\nimport { useFormContext } from 'react-hook-form';\r\n\r\nimport { Grid } from 'semantic-ui-react';\r\nimport { AnimatedBackground, Text, Segment, Button } from '@paco_ua/pacoui';\r\n\r\nimport { componentTemplateParser } from '../../utils';\r\n\r\nconst NewApplicationStatement = ({ formElements, formElementsData, setLoadingFile }) => {\r\n const theme = useContext(ThemeContext);\r\n\r\n const user = useSelector(selectors.getUser);\r\n const newApplicationData = useSelector(selectors.getNewApplicationData);\r\n const newApplicationLoadingStatus = useSelector(selectors.getLoadingStatus);\r\n const newApplicationNumAdditionalDocs = useSelector(selectors.getNewApplicationNumAdditionalDocs);\r\n const { form } = newApplicationData;\r\n\r\n const {\r\n addDocumentToFormSchema,\r\n addAdditionalDoc,\r\n remAdditionalDoc,\r\n removeDocumentFromFormSchema,\r\n setNumAdditionalDocs,\r\n } = actions.NewApplication;\r\n\r\n const { errorStatus } = useSelector(selectors.getNewApplicationSlice);\r\n\r\n const {\r\n formState: { errors },\r\n } = useFormContext();\r\n\r\n const dispatch = useDispatch();\r\n\r\n const [uploadingAdditionalFile, setUploadingAdditionalFile] = useState(false);\r\n\r\n const DEFAULT_MAX_ADDITIONAL_DOCS = 3;\r\n\r\n const [maxAdditionalDocuments, setMaxAdditionalDocuments] = useState(DEFAULT_MAX_ADDITIONAL_DOCS);\r\n\r\n const registration =\r\n user.registrations &&\r\n user.registrations.find(\r\n (registration) => registration.registrationId === newApplicationData.registrationId\r\n );\r\n\r\n const statement = newApplicationData.form && newApplicationData.form.exposition.text;\r\n // Knowing if it's safe to render the form\r\n const formElementsReady = () => {\r\n if (\r\n Object.keys(formElements).length !== 0 &&\r\n formElements.constructor === Object &&\r\n Object.keys(formElementsData).length !== 0 &&\r\n formElementsData.constructor === Object\r\n ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n };\r\n\r\n // To-do: typechecking\r\n const customFormElements = Object.keys(formElements).reduce(\r\n (acc, key) => {\r\n if (form) {\r\n const found = Object.keys(form).find(\r\n (k) =>\r\n form[k].values &&\r\n form[k].values.length &&\r\n form[k].values.find((value) => value.nameKey === key)\r\n );\r\n if (found && found !== 'exposition') {\r\n acc[found] = [...acc[found], { nameKey: key, element: formElements[key] }];\r\n }\r\n }\r\n\r\n return acc;\r\n },\r\n {\r\n expoFields: [] as any,\r\n observations: [] as any,\r\n mandatoryDocuments: [] as any,\r\n additionalDocuments: [] as any,\r\n }\r\n );\r\n\r\n // To-do: typechecking\r\n const customFormElementsData = Object.keys(formElementsData).reduce(\r\n (acc, key) => {\r\n if (form) {\r\n const found = Object.keys(form).find(\r\n (k) =>\r\n form[k].values &&\r\n form[k].values.length &&\r\n form[k].values.find((value) => value.nameKey === key)\r\n );\r\n if (found && found !== 'exposition') {\r\n acc[found] = [...acc[found], formElementsData[key]];\r\n }\r\n }\r\n\r\n return acc;\r\n },\r\n {\r\n expoFields: [] as any,\r\n observations: [] as any,\r\n mandatoryDocuments: [] as any,\r\n additionalDocuments: [] as any,\r\n }\r\n );\r\n\r\n useEffect(() => {\r\n let nNonOtherDocuments = 0;\r\n customFormElementsData.additionalDocuments.forEach((document) => {\r\n if (!document.nameKey.includes('otherDocuments')) {\r\n nNonOtherDocuments++;\r\n }\r\n });\r\n\r\n setMaxAdditionalDocuments(nNonOtherDocuments + DEFAULT_MAX_ADDITIONAL_DOCS);\r\n\r\n let nOtherDocuments = 1;\r\n\r\n if (newApplicationNumAdditionalDocs > 1) {\r\n nOtherDocuments = newApplicationNumAdditionalDocs - nNonOtherDocuments;\r\n }\r\n\r\n dispatch(setNumAdditionalDocs(nOtherDocuments + nNonOtherDocuments));\r\n }, [customFormElementsData.additionalDocuments]);\r\n\r\n const getMandatoryDocumentsData = (\r\n customFormElementsData,\r\n field,\r\n nameKey,\r\n isGroupItem = false\r\n ) => {\r\n let documents;\r\n\r\n if (isGroupItem) {\r\n customFormElementsData[field].some((field) => {\r\n if (field.group) {\r\n const groupDocumentKey = Object.keys(field.group.values).find(\r\n (groupField) => field.group.values[groupField].nameKey === nameKey\r\n );\r\n if (groupDocumentKey) {\r\n documents = field.group.values[groupDocumentKey];\r\n return true;\r\n }\r\n } else {\r\n return false;\r\n }\r\n });\r\n } else {\r\n customFormElementsData[field].some((field) => {\r\n if (field.group) {\r\n if (field.group.value.nameKey === nameKey) {\r\n documents = field.group.value;\r\n return true;\r\n }\r\n } else {\r\n if (field.nameKey === nameKey) {\r\n documents = field;\r\n return true;\r\n }\r\n }\r\n });\r\n }\r\n\r\n return {\r\n hidden: documents && documents.hidden,\r\n placeholderKey: documents && documents.placeholderKey,\r\n maxSize:\r\n documents && documents.validations.find((validation) => validation.type === 'maxFileSize'),\r\n minSize:\r\n documents && documents.validations.find((validation) => validation.type === 'minFileSize'),\r\n acceptTypes:\r\n documents && documents.validations.find((validation) => validation.type === 'fileType'),\r\n };\r\n };\r\n\r\n const getMandatoryDocumentsChildren = (formElements, field) =>\r\n Object.keys(formElements).map((key) => {\r\n const FormElement = formElements[key];\r\n const nameKey = key;\r\n\r\n const { hidden, placeholderKey, maxSize, minSize, acceptTypes } = getMandatoryDocumentsData(\r\n customFormElementsData,\r\n field,\r\n nameKey,\r\n true\r\n );\r\n\r\n if (hidden) {\r\n return undefined;\r\n }\r\n\r\n return (\r\n }\r\n heading={nameKey}\r\n description={placeholderKey ? placeholderKey : ''}\r\n //heading={t(`applications.documentsPlaceholder-${placeholderKey}`)}\r\n studentId={user.nmec}\r\n registrationId={newApplicationData.registrationId}\r\n errorGroup={\r\n errors[nameKey] &&\r\n typeof errors[nameKey].message !== 'string' &&\r\n errors[nameKey].message?.type === 'group' &&\r\n t('forms.' + errors[nameKey].message.message, {\r\n textOnly: true,\r\n })\r\n }\r\n error={\r\n errors[nameKey] &&\r\n typeof errors[nameKey].message === 'string' &&\r\n t('forms.' + errors[nameKey].message, {\r\n textOnly: true,\r\n })\r\n }\r\n maxSize={maxSize && maxSize.params[0]}\r\n minSize={minSize && minSize.params[0]}\r\n accept={acceptTypes && acceptTypes.params[0]}\r\n />\r\n );\r\n });\r\n\r\n if (newApplicationLoadingStatus.tabLoading || !formElementsReady()) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n } else if (errorStatus.errLoadingApplicationForm) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {t('applications.noApplicationsFound', { textOnly: true })}\r\n \r\n \r\n );\r\n } else {\r\n return (\r\n \r\n \r\n \r\n \r\n {t('applications.requestThirdStepTitle')}\r\n \r\n \r\n {t('applications.requestThirdStepDescription')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {t('applications.requestThirdStepName')}\r\n \r\n \r\n \r\n {\r\n customFormElementsData.expoFields.find(\r\n (key) => key.nameKey === 'nomeestudante'\r\n ).value\r\n }\r\n \r\n \r\n \r\n \r\n \r\n {t('applications.requestThirdStepCourse')}\r\n \r\n \r\n \r\n {registration && `${registration.courseCode} - ${registration.courseName}`}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {t('applications.requestThirdStepApplicationType')}\r\n \r\n \r\n \r\n {newApplicationData.type.name}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {t('applications.requestThirdStepStatementHeading')}\r\n \r\n \r\n {t('applications.requestThirdStepStatementDescription')}\r\n \r\n \r\n \r\n {Object.keys(customFormElementsData).map((field, index) => {\r\n if (field === 'expoFields') {\r\n return (\r\n \r\n {componentTemplateParser(\r\n customFormElementsData.expoFields,\r\n statement,\r\n customFormElementsData.expoFields.reduce((acc, statementField, index) => {\r\n const FormElement = formElements[statementField.nameKey];\r\n const getComponent = () => {\r\n if (\r\n statementField.type === 'textbox' ||\r\n statementField.type === 'largetextbox'\r\n ) {\r\n // texto livre\r\n return (\r\n \r\n \r\n \r\n );\r\n } else if (statementField.type !== 'text') {\r\n return (\r\n \r\n \r\n \r\n );\r\n } else {\r\n return (\r\n \r\n {/* Auto fill fields */}\r\n \r\n {t(\r\n `applications.statementDisabledInput-${statementField.nameKey}`\r\n )}\r\n \r\n \r\n {statementField.value}\r\n \r\n \r\n );\r\n }\r\n };\r\n\r\n acc[statementField.nameKey] = getComponent();\r\n return acc;\r\n }, {}),\r\n true\r\n )}\r\n \r\n );\r\n } else if (field === 'observations') {\r\n return (\r\n customFormElements.observations &&\r\n customFormElements.observations.map(({ element, nameKey }, index) => {\r\n const FormElement = element;\r\n const placeholderKey = customFormElementsData.observations.find(\r\n (field) => field.nameKey === nameKey\r\n ).placeholderKey;\r\n return (\r\n \r\n \r\n {t('applications.requestThirdStepStatementObservationsTitle')}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n })\r\n );\r\n } else if (field === 'mandatoryDocuments' && customFormElements[field].length > 0) {\r\n let docVisible = false;\r\n customFormElementsData[field].forEach((doc) => {\r\n if (doc.hidden === false) {\r\n docVisible = true;\r\n } else if (doc.hidden === null || doc.hidden === undefined) {\r\n // meaning a group of files\r\n if (doc.group?.value?.hidden === false) {\r\n docVisible = true;\r\n }\r\n }\r\n });\r\n // if no document is visible, don't render the mandatory doc title\r\n if (!docVisible) {\r\n return [];\r\n }\r\n\r\n return (\r\n \r\n {customFormElements[field] && (\r\n \r\n {field === 'mandatoryDocuments'\r\n ? t('applications.requestThirdStepMandatoryFilesTitle')\r\n : t('applications.requestThirdStepAdditionalFilesTitle')}\r\n \r\n )}\r\n {customFormElements[field] &&\r\n customFormElements[field].map(({ element, nameKey }, index) => {\r\n const FormElement = element?.group ? element.group?.value : element;\r\n const FormChildren = element?.group\r\n ? getMandatoryDocumentsChildren(element.group?.values, field)\r\n : undefined;\r\n\r\n const {\r\n hidden,\r\n placeholderKey,\r\n maxSize,\r\n minSize,\r\n acceptTypes,\r\n } = getMandatoryDocumentsData(customFormElementsData, field, nameKey);\r\n\r\n if (hidden) {\r\n return null;\r\n } else {\r\n return (\r\n \r\n }\r\n heading={nameKey}\r\n description={placeholderKey ? placeholderKey : ''}\r\n studentId={user.nmec}\r\n registrationId={newApplicationData.registrationId}\r\n error={\r\n errors[nameKey] &&\r\n t('forms.' + errors[nameKey].message, {\r\n textOnly: true,\r\n })\r\n }\r\n maxSize={maxSize && maxSize.params[0]}\r\n minSize={minSize && minSize.params[0]}\r\n accept={acceptTypes && acceptTypes.params[0]}\r\n setUploadingFlag={(nameKey: string, value: boolean) => {\r\n setLoadingFile((currentValue) => {\r\n return {\r\n ...currentValue,\r\n [nameKey]: value,\r\n };\r\n });\r\n }}\r\n children={FormChildren}\r\n />\r\n \r\n );\r\n }\r\n })}\r\n \r\n );\r\n } else if (\r\n field === 'additionalDocuments' &&\r\n customFormElements[field].length > 0\r\n ) {\r\n return (\r\n customFormElements.additionalDocuments && (\r\n <>\r\n {customFormElements.additionalDocuments.map(({ element, nameKey }, key) => {\r\n const FormElement = element;\r\n //const defaultValue = formElementsData[key].value;\r\n //const type = customFormElementsData.additionalDocuments[key].type;\r\n const hidden = customFormElementsData.additionalDocuments[key].hidden;\r\n\r\n const maxSize =\r\n customFormElementsData.additionalDocuments[key] &&\r\n customFormElementsData.additionalDocuments[key].validations.find(\r\n (validation) => validation.type === 'maxFileSize'\r\n );\r\n\r\n const minSize =\r\n customFormElementsData.additionalDocuments[key] &&\r\n customFormElementsData.additionalDocuments[key].validations.find(\r\n (validation) => validation.type === 'minFileSize'\r\n );\r\n\r\n const acceptTypes =\r\n customFormElementsData.additionalDocuments[key] &&\r\n customFormElementsData.additionalDocuments[key].validations.find(\r\n (validation) => validation.type === 'fileType'\r\n );\r\n\r\n if (hidden) {\r\n return [];\r\n }\r\n\r\n return (\r\n \r\n {key === 0 && (\r\n \r\n \r\n {t(`applications.otherDocumentsTitle`, { textOnly: true })}\r\n \r\n \r\n )}\r\n \r\n }\r\n heading={\r\n nameKey.includes('otherDocuments')\r\n ? t(`applications.otherDocuments`, { textOnly: true })\r\n : nameKey\r\n }\r\n description={\r\n formElementsData[nameKey].placeholderKey.includes(\r\n 'otherDocumentsPlaceholder'\r\n )\r\n ? t(\r\n `applications.${formElementsData[nameKey].placeholderKey}`\r\n )\r\n : formElementsData[nameKey].placeholderKey\r\n }\r\n studentId={user.nmec}\r\n registrationId={newApplicationData.registrationId}\r\n error={\r\n errors[\r\n customFormElementsData.additionalDocuments[key].nameKey\r\n ] &&\r\n t(\r\n `forms.${\r\n errors[\r\n customFormElementsData.additionalDocuments[key].nameKey\r\n ].message\r\n }`,\r\n {\r\n textOnly: true,\r\n }\r\n )\r\n }\r\n enableRemoveField={\r\n key === 0 ||\r\n key <= maxAdditionalDocuments - DEFAULT_MAX_ADDITIONAL_DOCS\r\n ? false\r\n : true\r\n }\r\n onRemoveField={\r\n key === 0 ||\r\n key <= maxAdditionalDocuments - DEFAULT_MAX_ADDITIONAL_DOCS\r\n ? undefined\r\n : () => {\r\n const payload = {\r\n form: form,\r\n key: nameKey,\r\n };\r\n if (\r\n newApplicationNumAdditionalDocs >\r\n maxAdditionalDocuments - DEFAULT_MAX_ADDITIONAL_DOCS\r\n ) {\r\n dispatch(removeDocumentFromFormSchema(payload));\r\n dispatch(remAdditionalDoc()); // counter\r\n }\r\n }\r\n }\r\n setUploadingFlag={(nameKey: string, value: boolean) => {\r\n setUploadingAdditionalFile(value);\r\n setLoadingFile((currentValue) => {\r\n return {\r\n ...currentValue,\r\n [nameKey]: value,\r\n };\r\n });\r\n }}\r\n maxSize={maxSize && maxSize.params[0]}\r\n minSize={minSize && minSize.params[0]}\r\n accept={acceptTypes && acceptTypes.params[0]}\r\n />\r\n \r\n \r\n );\r\n })}\r\n \r\n = maxAdditionalDocuments\r\n }\r\n onClick={() => {\r\n if (newApplicationNumAdditionalDocs < maxAdditionalDocuments) {\r\n dispatch(addDocumentToFormSchema(form));\r\n dispatch(addAdditionalDoc()); // counter\r\n }\r\n }}\r\n primary\r\n >\r\n }\r\n >\r\n {t('certificates.addDocument')}\r\n \r\n \r\n \r\n \r\n )\r\n );\r\n } else {\r\n return [];\r\n }\r\n })}\r\n \r\n \r\n \r\n \r\n );\r\n }\r\n};\r\n\r\nexport default NewApplicationStatement;\r\n\r\nconst LoadingWrapper = styled.div`\r\n width: 100%;\r\n height: 300px;\r\n\r\n * {\r\n margin: 8px 0px;\r\n }\r\n`;\r\n\r\nconst ApplicationData = styled.div`\r\n margin-top: 56px;\r\n`;\r\n\r\nconst ApplicationDataNameAndCourse = styled.div`\r\n display: flex;\r\n\r\n & > div {\r\n flex: 0 50%;\r\n }\r\n`;\r\n\r\nconst ApplicationDataApplicationType = styled.div`\r\n margin-top: 28px;\r\n`;\r\n\r\nconst ApplicationDataBlock = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst ApplicationDataBlockText = styled.div`\r\n margin-top: 12px;\r\n`;\r\n\r\nconst ApplicationStatementWrapper = styled.div`\r\n margin-top: 48px;\r\n`;\r\n\r\nconst ApplicationStatementHeading = styled.div`\r\n & > div:first-child:after {\r\n content: '*';\r\n color: ${({ theme }) => theme.colors.dangerRed};\r\n }\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst ApplicationStatement = styled.div`\r\n margin-top: 24px;\r\n\r\n .ui.placeholder {\r\n max-width: 80%;\r\n }\r\n`;\r\n\r\nconst ApplicationStatementFiles = styled.div`\r\n margin-top: 40px;\r\n`;\r\n\r\nconst FileUploaderWrapper = styled.div`\r\n margin-top: 12px;\r\n > div > div {\r\n height: unset;\r\n }\r\n`;\r\n\r\nconst FormElementWrapper = styled.div`\r\n display: inline-block;\r\n margin-top: 6px;\r\n margin-bottom: 6px;\r\n margin-right: 8px;\r\n`;\r\n\r\nconst StatementDisabledInputWrapper = styled.div`\r\n display: inline-block;\r\n margin-top: 6px;\r\n margin-bottom: 6px;\r\n margin-right: 8px;\r\n padding: 8px;\r\n background-color: ${({ theme }) => theme.colors.lightGrey};\r\n`;\r\n\r\nconst StatementDisabledInputLabel = styled.div`\r\n color: ${({ theme }) => theme.colors.darkGrey};\r\n margin-bottom: 4px;\r\n font-size: 10px;\r\n`;\r\n\r\nconst ApplicationStatementText = styled(Text)`\r\n & {\r\n display: inline-block !important;\r\n }\r\n`;\r\n\r\nconst ApplicationStatementObservations = styled.div`\r\n margin-top: 40px;\r\n`;\r\n\r\nconst ApplicationStatementObservationsTextAreaWrapper = styled.div`\r\n margin-top: 16px;\r\n`;\r\n\r\nconst SegmentTitleWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst AdditionalDocumentsWrapper = styled.div``;\r\n\r\nconst AdditionalDocumentsTitle = styled.div`\r\n margin-top: 32px;\r\n`;\r\n\r\nconst AddFileButtonWrapper = styled.div`\r\n margin-top: 20px;\r\n`;\r\n\r\nconst FormInputWrapper = styled.div<{ isTextBox?: boolean }>`\r\n margin-right: 8px;\r\n margin-top: 6px;\r\n margin-bottom: 6px;\r\n & input {\r\n background-color: ${({ theme }) => theme.colors.lightGrey};\r\n }\r\n`;\r\n\r\nconst DescriptionWrapper = styled(Text)`\r\n margin-top: 8px;\r\n`;\r\n\r\nconst TextWrapper = styled(Text)`\r\n line-height: 1.3;\r\n`;\r\n\r\nconst Icon = styled.div`\r\n font-size: 60px;\r\n color: ${({ theme }) => theme.colors.primary};\r\n`;\r\n\r\nconst MessageNoApplications = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n text-align: center;\r\n justify-content: center;\r\n margin-top: 60px;\r\n margin-bottom: 20px;\r\n\r\n div:nth-child(2) {\r\n margin-top: 16px;\r\n }\r\n`;\r\n","/**\r\n * NewApplicationSubmission container logic selectors\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getLoading = (state: RootState) => state.NewApplication.loadingStatus.loading;\r\nexport const getUser = (state: RootState) => state.App.user;\r\nexport const getNewApplicationData = (state: RootState) => state.NewApplication.applicationData;\r\nexport const getNewApplicationTabLoading = (state: RootState) =>\r\n state.NewApplication.loadingStatus.tabLoading;\r\nexport const getNewApplicationSlice = (state: RootState) => state.NewApplication;\r\n","/**\r\n * FileDownloader component\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport React, { useContext, useState } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faEye } from '@fortawesome/pro-regular-svg-icons';\r\n\r\nimport { Text, Button } from '@paco_ua/pacoui';\r\n\r\nimport { t } from 'app';\r\n\r\ninterface IFileDownloader {\r\n heading: string;\r\n description?: string;\r\n icon?: JSX.Element;\r\n url: string;\r\n callToEndpoint: (endpoint: string, setLoading: (value) => void) => void;\r\n}\r\n\r\nconst FileDownloader: React.FC = ({\r\n heading,\r\n description,\r\n icon,\r\n url,\r\n callToEndpoint,\r\n}) => {\r\n const theme = useContext(ThemeContext);\r\n\r\n const [showFileLoading, setShowFileLoading] = useState(false);\r\n\r\n return (\r\n \r\n \r\n {icon && {icon}}\r\n \r\n \r\n {heading}\r\n \r\n {description && (\r\n \r\n {description}\r\n \r\n )}\r\n \r\n \r\n }\r\n onClick={() => {\r\n callToEndpoint(url, setShowFileLoading);\r\n }}\r\n >\r\n {t('generic.fileDownloaderButton')}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default FileDownloader;\r\n\r\nconst Wrapper = styled.div`\r\n display: flex;\r\n justify-content: space-between;\r\n padding: 16px;\r\n border: 1px solid ${({ theme }) => theme.colors.softRegularGrey};\r\n`;\r\n\r\nconst FileWrapper = styled.div`\r\n display: flex;\r\n align-items: center;\r\n\r\n & > div:not(:first-child) {\r\n margin-left: 22px;\r\n margin-right: 22px;\r\n }\r\n`;\r\n\r\nconst IconWrapper = styled.div`\r\n svg {\r\n font-size: 26px;\r\n }\r\n`;\r\n\r\nconst FileNameAndDescription = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n`;\r\n\r\nconst FileDescriptionText = styled(Text)`\r\n margin-top: 8px;\r\n`;\r\n\r\nconst HeadingText = styled(Text)``;\r\n","/**\r\n * NewApplicationSubmission container\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport React, { useContext, useEffect } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { t } from 'app';\r\nimport API from 'api';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './selectors';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faFilePdf } from '@fortawesome/pro-light-svg-icons';\r\n\r\nimport { Grid } from 'semantic-ui-react';\r\nimport { AnimatedBackground, Text, Segment } from '@paco_ua/pacoui';\r\n\r\nimport { componentTemplateParser } from '../../utils';\r\n\r\nimport FileDownloader from 'shared/components/FileDownloader';\r\n\r\nconst NewApplicationSubmission = () => {\r\n const theme = useContext(ThemeContext);\r\n\r\n const user = useSelector(selectors.getUser);\r\n const newApplicationData = useSelector(selectors.getNewApplicationData);\r\n const newApplicationTabLoading = useSelector(selectors.getNewApplicationTabLoading);\r\n const { errorStatus } = useSelector(selectors.getNewApplicationSlice);\r\n\r\n const registration =\r\n user.registrations &&\r\n user.registrations.find(\r\n (registration) => registration.registrationId === newApplicationData.registrationId\r\n );\r\n const statement = newApplicationData.form && newApplicationData.form.exposition.text;\r\n const { formValues } = newApplicationData;\r\n\r\n const { setLoadingStatus } = actions.NewApplication;\r\n const dispatch = useDispatch();\r\n\r\n const StudentName = formValues ? formValues.expoFields.find(\r\n (key) => key.nameKey === 'nomeestudante'\r\n ).value : user.name;\r\n\r\n useEffect(() => {\r\n dispatch(\r\n setLoadingStatus({\r\n fieldName: 'loading',\r\n fieldValue: false,\r\n })\r\n );\r\n }, [dispatch, setLoadingStatus]);\r\n\r\n if (newApplicationTabLoading) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n } else {\r\n return (\r\n \r\n \r\n \r\n \r\n {t('applications.requestFourthStepTitle')}\r\n \r\n \r\n {t('applications.requestFourthStepDescription')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {t('applications.requestFourthStepName')}\r\n \r\n \r\n {StudentName}\r\n \r\n \r\n \r\n \r\n {t('applications.requestFourthStepCourse')}\r\n \r\n \r\n {registration && `${registration.courseCode} - ${registration.courseName}`}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {t('applications.requestFourthStepApplicationType')}\r\n \r\n \r\n {newApplicationData.type.name}\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n {t('applications.requestFourthStepStatementHeading')}\r\n \r\n \r\n \r\n \r\n {newApplicationData.form &&\r\n componentTemplateParser(\r\n newApplicationData.form.expoFields.values,\r\n statement,\r\n newApplicationData.form.expoFields.values.reduce((acc, field, index) => {\r\n const formValueField =\r\n newApplicationData.formValues &&\r\n newApplicationData.formValues.expoFields.find(\r\n (expoFieldsField) => expoFieldsField.nameKey === field.nameKey\r\n );\r\n acc[field.nameKey] = (\r\n \r\n {formValueField && `${formValueField.value}\\u00A0`}\r\n \r\n );\r\n return acc;\r\n }, {}),\r\n false\r\n )}\r\n \r\n {formValues && formValues.observations && (\r\n \r\n \r\n {t('applications.requestFourthStepStatementObservationsTitle')}\r\n \r\n \r\n {formValues.observations}\r\n \r\n \r\n )}\r\n\r\n {formValues &&\r\n formValues.mandatoryDocuments &&\r\n !!formValues.mandatoryDocuments.length && (\r\n \r\n \r\n {t('applications.requestFourthStepMandatoryFilesTitle')}\r\n \r\n {formValues.mandatoryDocuments.map((document, index) => (\r\n \r\n }\r\n callToEndpoint={(endpoint, setLoading: (value) => void) => {\r\n setLoading(true);\r\n\r\n API.files.getFileOnTab\r\n .call(endpoint)\r\n .then((value) => {\r\n setLoading(false);\r\n })\r\n .catch((e) => {\r\n setLoading(false);\r\n dispatch(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.general_errorLoadingFile'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n });\r\n }}\r\n />\r\n \r\n ))}\r\n \r\n )}\r\n\r\n {formValues &&\r\n formValues.additionalDocuments &&\r\n !!formValues.additionalDocuments.length && (\r\n \r\n \r\n {t('applications.requestFourthStepAdditionalFilesTitle')}\r\n \r\n {formValues.additionalDocuments.map((document, index) => (\r\n \r\n }\r\n callToEndpoint={(endpoint, setLoading: (value) => void) => {\r\n setLoading(true);\r\n\r\n API.files.getFileOnTab\r\n .call(endpoint)\r\n .then((value) => {\r\n setLoading(false);\r\n })\r\n .catch((e) => {\r\n setLoading(false);\r\n dispatch(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.general_errorLoadingFile'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n });\r\n }}\r\n />\r\n \r\n ))}\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n );\r\n }\r\n};\r\n\r\nexport default NewApplicationSubmission;\r\n\r\nconst LoadingWrapper = styled.div`\r\n width: 100%;\r\n height: 300px;\r\n`;\r\n\r\nconst ApplicationData = styled.div`\r\n margin-top: 56px;\r\n`;\r\n\r\nconst ApplicationDataNameAndCourse = styled.div`\r\n display: flex;\r\n\r\n & > div {\r\n flex: 0 50%;\r\n }\r\n`;\r\n\r\nconst ApplicationDataApplicationType = styled.div`\r\n margin-top: 28px;\r\n`;\r\n\r\nconst ApplicationDataBlock = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst ApplicationStatementWrapper = styled.div`\r\n margin-top: 48px;\r\n`;\r\n\r\nconst ApplicationStatementHeading = styled.div``;\r\n\r\nconst ApplicationStatement = styled.div`\r\n margin-top: 12px;\r\n\r\n .ui.placeholder {\r\n max-width: 80%;\r\n }\r\n`;\r\n\r\nconst ApplicationStatementText = styled(Text)`\r\n display: inline-block;\r\n`;\r\n\r\nconst ApplicationStatementFieldText = styled(Text)`\r\n display: inline-block;\r\n`;\r\n\r\nconst ApplicationStatementObservations = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n margin-top: 40px;\r\n`;\r\n\r\nconst ApplicationMandatoryDocuments = styled.div`\r\n margin-top: 40px;\r\n`;\r\n\r\nconst ApplicationMandatoryDocumentsTitle = styled(Text)`\r\n margin-bottom: 12px;\r\n`;\r\n\r\nconst ApplicationAdditionalDocuments = styled.div`\r\n margin-top: 40px;\r\n`;\r\n\r\nconst ApplicationAdditionalDocumentsTitle = styled(Text)`\r\n margin-bottom: 12px;\r\n`;\r\n\r\nconst FileDownloaderWrapper = styled.div`\r\n margin-top: 12px;\r\n`;\r\n\r\nconst SegmentTitleWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst TextWrapper = styled(Text)`\r\n margin-top: 12px;\r\n`;\r\n\r\nconst RequestText = styled(Text)`\r\n margin-top: 12px;\r\n line-height: 1.3;\r\n`;\r\n\r\nconst DescriptionText = styled(Text)`\r\n margin-top: 8px;\r\n`;\r\n","import * as yup from 'yup';\r\nimport PostalCodes from 'postal-codes-js';\r\nimport PhoneNumber from 'awesome-phonenumber';\r\n\r\n// field can be empty, and the emptiness is validated (required) in the emptyInputField addMethod()\r\nyup.addMethod(yup.object, 'phone', function (param) {\r\n return this.test(this.value, param, (value) => {\r\n const pn = new PhoneNumber(value.input, value.countryValue);\r\n return pn.isValid() || value.input === '';\r\n });\r\n});\r\n\r\nyup.addMethod(yup.object, 'inputFlagTextboxRequired', function (param) {\r\n return this.test(this.value, param, (value) => {\r\n return value.input !== '';\r\n });\r\n});\r\n\r\nyup.addMethod(yup.object, 'postal_code', function (param) {\r\n return this.test(this.value, param, (value) => {\r\n return PostalCodes.validate(value.countryValue, value.input);\r\n });\r\n});\r\n\r\nconst groupValidations = (groupName) => ({\r\n oneOfRequired: (param) => ({\r\n type: 'oneOfRequired',\r\n params: [{ message: param, type: 'group' }, groupName],\r\n }),\r\n});\r\n\r\nyup.addMethod(yup.object, 'oneOfRequired', function (param, groupName) {\r\n return this.test(this.value, param, function (value) {\r\n const group = this?.parent[groupName];\r\n if (group) {\r\n return Object.keys(group).some((item) => {\r\n return group[item] !== undefined && group[item] !== null;\r\n });\r\n }\r\n return true;\r\n });\r\n});\r\n\r\nexport function createYupSchema(schema, config) {\r\n const { id, validationType, validations = [] } = config;\r\n if (!yup[validationType]) {\r\n return schema;\r\n }\r\n let validator = yup[validationType]();\r\n\r\n validations.forEach((validation) => {\r\n const { params, type } = validation;\r\n if (!validator[type]) {\r\n return;\r\n }\r\n validator = validator[type](...params);\r\n });\r\n schema[id] = validator;\r\n\r\n return schema;\r\n}\r\n\r\nexport const createValidationFormData = (formData) => {\r\n let newFormatFormData = [];\r\n\r\n formData.forEach((field, index) => {\r\n if (!field?.hidden) {\r\n //if is a group of values inside another\r\n if (field.type === 'group' && field.values && field.values.length > 0) {\r\n const groupValidation = field.validations.map((validation) =>\r\n groupValidations(field.nameKey)[validation.type](validation.params[0])\r\n );\r\n\r\n field.values.forEach((fieldValue) => {\r\n newFormatFormData.push({\r\n id: fieldValue.nameKey,\r\n validationType: fieldValue.validationType,\r\n validations: [...groupValidation, ...fieldValue.validations],\r\n });\r\n });\r\n } else if (\r\n field.type === 'editableGroupComponent' &&\r\n field.values &&\r\n field.values.length > 0\r\n ) {\r\n const yupSchema = field.values\r\n .map((fieldValue) => {\r\n return {\r\n id: fieldValue.nameKey,\r\n validationType: fieldValue.validationType,\r\n validations: fieldValue.validations,\r\n };\r\n })\r\n .reduce(createYupSchema, {});\r\n\r\n newFormatFormData.push({\r\n id: field.nameKey,\r\n validationType: 'object',\r\n validations: [\r\n {\r\n type: 'shape',\r\n params: [yupSchema],\r\n },\r\n ],\r\n });\r\n } else {\r\n newFormatFormData.push({\r\n id: field.nameKey,\r\n validationType: field.validationType,\r\n validations: field.validations,\r\n });\r\n }\r\n }\r\n });\r\n\r\n return newFormatFormData;\r\n};\r\n","/**\r\n * FormInputWithFlags\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport React from 'react';\r\n\r\nimport styled from 'styled-components';\r\n\r\nimport { getStorage } from 'utils';\r\n\r\nimport { DropdownFlags, FormInput, Text } from '@paco_ua/pacoui';\r\n\r\ninterface IProps {\r\n register?: any;\r\n onChange?: any;\r\n error?: any;\r\n success?: any;\r\n name?: string;\r\n defaultValue?: {\r\n input: string;\r\n countryValue: string;\r\n };\r\n displayLocale?: boolean;\r\n placeholder?: string;\r\n fontSize?:\r\n | 'xxSmall'\r\n | 'xSmall'\r\n | 'small'\r\n | 'article'\r\n | 'mediumSmall'\r\n | 'medium'\r\n | 'large'\r\n | 'xLarge'\r\n | 'xxLarge'\r\n | 'xxxLarge';\r\n showTooltip?: boolean;\r\n}\r\n\r\nconst FormInputWithFlags: React.FC = ({\r\n error,\r\n success,\r\n onChange,\r\n name,\r\n defaultValue,\r\n displayLocale,\r\n placeholder,\r\n fontSize,\r\n showTooltip,\r\n}) => {\r\n const currentLang = () => {\r\n const lang = getStorage('currentLocale');\r\n if (lang === 'pt') return 'pt-PT';\r\n if (lang === 'en') return 'en-UK';\r\n return lang;\r\n };\r\n return (\r\n \r\n \r\n \r\n {\r\n onChange && onChange({ input: defaultValue?.input, countryValue: flagValue });\r\n }}\r\n displayLocale={displayLocale}\r\n showTooltip={showTooltip}\r\n language={showTooltip ? currentLang() : undefined}\r\n />\r\n \r\n\r\n \r\n {\r\n onChange &&\r\n onChange({\r\n input: e.target.value,\r\n countryValue: defaultValue?.countryValue,\r\n });\r\n }}\r\n />\r\n \r\n \r\n\r\n \r\n {error && (\r\n \r\n * {error}\r\n \r\n )}\r\n {success && (\r\n \r\n * {success}\r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default FormInputWithFlags;\r\n\r\nconst Wrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst WrapperFlags = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: space-between;\r\n align-items: center;\r\n border-style: solid;\r\n border-width: thin;\r\n border-color: ${({ theme }) => theme.colors.darkGrey};\r\n`;\r\n\r\nconst DropdownWrapper = styled.div`\r\n /*padding: 0px 8px 0px 8px;*/\r\n height: 40px;\r\n white-space: nowrap;\r\n border-right: 1px solid ${({ theme }) => theme.colors.darkGrey};\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n\r\n /*&&& i:nth-child(3) {\r\n margin-left: 24px;\r\n margin-right: 8px;\r\n }*/\r\n\r\n &&& .ui.search.dropdown > input.search {\r\n height: 20px !important;\r\n margin-top: 10px !important;\r\n min-width: 0px;\r\n max-width: 69px;\r\n left: 8px;\r\n }\r\n\r\n &&& .ui.search.dropdown > .text {\r\n margin-left: 8px;\r\n left: 0px;\r\n }\r\n\r\n /*when input text is not empty*/\r\n &&& .ui.dropdown > .dropdown.icon {\r\n margin-left: 100.4px;\r\n margin-right: 8px;\r\n }\r\n\r\n /*when input text is empty*/\r\n &&& div.divider.text ~ i.dropdown.icon {\r\n margin-left: 24px;\r\n }\r\n\r\n &&& {\r\n min-width: 118px !important;\r\n }\r\n`;\r\n\r\nconst FormInputWrapper = styled.div`\r\n flex-grow: 1;\r\n`;\r\n\r\nconst MessageArea = styled.div`\r\n margin-top: 4px;\r\n`;\r\n","/**\r\n * FormTextArea component\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport React from 'react';\r\n\r\nimport styled from 'styled-components';\r\n\r\nimport { TextArea as SemanticTextArea } from 'semantic-ui-react';\r\n\r\nimport { Text } from '@paco_ua/pacoui';\r\n\r\ninterface IFormTextArea {\r\n register: any;\r\n onChange: (data: any) => void;\r\n error?: any;\r\n success?: any;\r\n name: string;\r\n value: string;\r\n placeholder: string;\r\n defaultValue: string;\r\n}\r\n\r\nconst FormTextArea: React.FC = ({\r\n placeholder,\r\n name,\r\n error,\r\n onChange,\r\n defaultValue,\r\n}) => {\r\n return (\r\n \r\n onChange(data.value)}\r\n name={name}\r\n defaultValue={defaultValue}\r\n />\r\n \r\n {error && (\r\n \r\n {error}\r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\nexport default FormTextArea;\r\n\r\nconst Wrapper = styled.div`\r\n && {\r\n textarea {\r\n min-height: 80px;\r\n max-height: 300px;\r\n width: 100%;\r\n padding: 12px;\r\n border: 1px solid ${({ theme }) => theme.colors.softRegularGrey};\r\n border-radius: 0;\r\n font-size: 14px;\r\n color: ${({ theme }) => theme.colors.plusDarkGrey};\r\n resize: vertical;\r\n }\r\n\r\n textarea::placeholder {\r\n font-size: 14px;\r\n color: ${({ theme }) => theme.colors.darkGrey};\r\n }\r\n\r\n textarea:focus {\r\n outline: none;\r\n }\r\n }\r\n`;\r\n\r\nconst StyledTextArea = styled(SemanticTextArea)``;\r\n\r\nconst MessageArea = styled.div``;\r\n","/**\r\n * FormLargeTextArea component\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport React from 'react';\r\n\r\nimport styled from 'styled-components';\r\n\r\nimport { TextArea as SemanticTextArea } from 'semantic-ui-react';\r\n\r\nimport { Text } from '@paco_ua/pacoui';\r\n\r\ninterface IFormTextArea {\r\n register: any;\r\n onChange: (data: any) => void;\r\n error?: any;\r\n success?: any;\r\n name: string;\r\n value: string;\r\n placeholder: string;\r\n defaultValue: string;\r\n}\r\n\r\nconst FormLargeTextArea: React.FC = ({\r\n placeholder,\r\n name,\r\n error,\r\n onChange,\r\n defaultValue,\r\n}) => {\r\n return (\r\n \r\n onChange(data.value)}\r\n name={name}\r\n defaultValue={defaultValue}\r\n />\r\n \r\n {error && (\r\n \r\n {error}\r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\nexport default FormLargeTextArea;\r\n\r\nconst Wrapper = styled.div`\r\n border: 0px;\r\n`;\r\n\r\nconst StyledTextArea = styled(SemanticTextArea)`\r\n min-height: 80px;\r\n max-height: 300px;\r\n width: 100%;\r\n padding: 12px;\r\n background-color: #f5f5f5;\r\n border: 0px;\r\n font-size: 14px;\r\n line-height: 1.3;\r\n resize: vertical;\r\n\r\n ::placeholder {\r\n width: 100%;\r\n font-size: 14px;\r\n color: ${({ theme }) => theme.colors.darkGrey};\r\n line-height: 1.3;\r\n }\r\n\r\n ::focus {\r\n outline: none;\r\n }\r\n`;\r\n\r\nconst MessageArea = styled.div``;\r\n","/**\r\n * FileUploader component\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport React, { useContext, useState, useEffect, useRef } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\nimport { useDispatch } from 'react-redux';\r\nimport { useFormContext } from 'react-hook-form';\r\n\r\nimport { useDropzone } from 'react-dropzone';\r\nimport { actions } from 'store/rootSlices';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faArrowFromBottom, faTrash, faPlusCircle } from '@fortawesome/pro-light-svg-icons';\r\nimport { faEye } from '@fortawesome/pro-regular-svg-icons';\r\n\r\nimport { Progress } from 'semantic-ui-react';\r\n\r\nimport { t } from 'app';\r\nimport API from 'api';\r\n\r\nimport { Text, Button } from '@paco_ua/pacoui';\r\n\r\nimport config from 'config';\r\n\r\ninterface IFileUploader {\r\n nameKey: string;\r\n register?: any;\r\n heading?: string;\r\n description?: string;\r\n icon?: JSX.Element;\r\n studentId?: number;\r\n onChange: (\r\n value:\r\n | { id: string; nameKey: string; url: string; fileName: string; nBytes: number }\r\n | undefined\r\n ) => void;\r\n registrationId?: number;\r\n minSize?: number; // in bytes\r\n maxSize?: number; // in bytes\r\n accept: string | string[];\r\n error: string;\r\n errorGroup: string;\r\n defaultValue: any;\r\n removable?: boolean;\r\n onRemove?: () => {};\r\n onRemoveField?: () => {};\r\n enableRemoveField?: boolean;\r\n value: any;\r\n setUploadingFlag?: (nameKey: string, value: boolean) => void;\r\n onError?: (string) => void;\r\n}\r\ninterface IUploadedFiles {\r\n file?: any;\r\n name?: string;\r\n progress?: number;\r\n finished: boolean;\r\n error?: boolean;\r\n size?: number;\r\n}\r\n\r\nconst FileUploader: React.FC = ({\r\n nameKey,\r\n heading,\r\n description,\r\n icon,\r\n studentId,\r\n registrationId,\r\n onChange,\r\n minSize,\r\n maxSize,\r\n accept,\r\n error,\r\n errorGroup,\r\n onRemoveField,\r\n enableRemoveField,\r\n defaultValue,\r\n removable,\r\n value,\r\n setUploadingFlag,\r\n onRemove,\r\n onError,\r\n}) => {\r\n const theme = useContext(ThemeContext);\r\n const form = useFormContext();\r\n\r\n const didUpdateValue = useRef(false);\r\n\r\n const [uploadedFiles, setUploadedFiles] = useState([] as IUploadedFiles[]);\r\n\r\n const [uploadedSucceeded, setUploadedSuccess] = useState(null as null | boolean);\r\n\r\n const [disableDropzone, setDisableDropzone] = useState(false as boolean);\r\n const [dropzoneActiveColor, setDropzoneActiveColor] = useState(theme.colors.white as string);\r\n\r\n const [showFileLoading, setShowFileLoading] = useState(false);\r\n\r\n const [errorToDisplay, setErrorToDisplay] = useState(null as null | string);\r\n\r\n const API_SEC_VIRTUAL = config.API_WSO2 + config.API_SEC_VIRTUAL_PATH;\r\n\r\n const dispatch = useDispatch();\r\n\r\n const DEFAULT_FILE_SIZES = {\r\n MIN_SIZE: 1,\r\n MAX_SIZE: 10485760,\r\n };\r\n\r\n // update the uploadedFiles list, knowing that the file upload has finished\r\n useEffect(() => {\r\n // if file upload was successfull\r\n if (uploadedSucceeded) {\r\n setUploadedFiles((prevState) =>\r\n prevState.map((file) => {\r\n // if the current iteration's file hasn't finished, than\r\n // it is the most recently uploaded file\r\n if (!file.finished) {\r\n return { ...file, finished: true, error: false };\r\n } else {\r\n return file;\r\n }\r\n })\r\n );\r\n } else {\r\n // if an error occured while uploading the file\r\n // create a toaster notification to inform the user and remove the\r\n // the entry from the uploadedFiles list\r\n setUploadedFiles((prevState) => {\r\n let newList = [] as any;\r\n\r\n prevState.map((file) => {\r\n if (!file.finished) {\r\n // reset\r\n setUploadedSuccess(null);\r\n } else {\r\n newList.append(file);\r\n }\r\n });\r\n\r\n return newList;\r\n });\r\n }\r\n }, [uploadedSucceeded]);\r\n\r\n useEffect(() => {\r\n onError && onError(errorGroup);\r\n }, [errorGroup]);\r\n\r\n const bytesToMegabytes = (nBytes: number) => {\r\n // if less than 100 KB, present the file size in KB\r\n if (nBytes < 1024 * 100) {\r\n return `${(nBytes / 1024).toFixed(2)} KB`;\r\n } else {\r\n return `${(nBytes / 1024 / 1024).toFixed(2)} MB`;\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (value) {\r\n if (!didUpdateValue.current) {\r\n didUpdateValue.current = true;\r\n }\r\n setUploadedFiles([\r\n {\r\n name: value.fileName,\r\n size: value.nBytes,\r\n progress: 100,\r\n finished: true,\r\n },\r\n ]);\r\n } else {\r\n setUploadedFiles([]);\r\n }\r\n if (didUpdateValue.current) {\r\n form?.trigger && form.trigger(nameKey);\r\n }\r\n }, [value]);\r\n\r\n const { getRootProps, open, getInputProps, fileRejections } = useDropzone({\r\n noClick: true,\r\n disabled: disableDropzone,\r\n multiple: false,\r\n minSize: minSize ? minSize : DEFAULT_FILE_SIZES.MIN_SIZE,\r\n maxSize: maxSize ? maxSize : DEFAULT_FILE_SIZES.MAX_SIZE,\r\n accept,\r\n onDrop(files) {\r\n // garantie that the number of dropped files is not greater than 1.\r\n if (files.length !== 1 || uploadedFiles.length === 1 || uploadedSucceeded !== null) {\r\n return;\r\n }\r\n\r\n // reset\r\n setErrorToDisplay(null);\r\n\r\n setDisableDropzone(true);\r\n\r\n setUploadingFlag && setUploadingFlag(nameKey, true);\r\n\r\n const data = new FormData();\r\n files.forEach((file, index) => {\r\n data.append('files', file);\r\n });\r\n\r\n API.files.postFiles\r\n .call(studentId, registrationId, data, {\r\n onUploadProgress: (progressEvent) => {\r\n const percentageCompleted = Math.round(\r\n (progressEvent.loaded * 100) / progressEvent.total\r\n );\r\n\r\n setUploadedFiles([\r\n ...files.map((file) => {\r\n return {\r\n name: file.name,\r\n size: file.size,\r\n progress: percentageCompleted,\r\n finished: false,\r\n };\r\n }),\r\n ]);\r\n },\r\n })\r\n .then((data) => {\r\n if (data.length === 0) {\r\n throw {\r\n response: {\r\n data: {\r\n error_code: 'errorUploadingFile',\r\n },\r\n },\r\n };\r\n }\r\n\r\n setUploadedSuccess(true);\r\n\r\n onChange({\r\n id: data[0].id,\r\n nameKey: nameKey,\r\n url: API_SEC_VIRTUAL + data[0].url,\r\n fileName: data[0].name,\r\n nBytes: files[0].size,\r\n });\r\n\r\n setUploadingFlag && setUploadingFlag(nameKey, false);\r\n })\r\n .catch((e) => {\r\n // reset\r\n setUploadedSuccess(null);\r\n setUploadedFiles([]);\r\n setDisableDropzone(false);\r\n setUploadingFlag && setUploadingFlag(nameKey, false);\r\n\r\n // TODO capturar erros que vém da api e mostrar no toaster.\r\n // Exemplo: quando o tamanho máximo é excedido e a api retorna o erro correspondente\r\n // Quando isto tiver sido resolvido, apagar o toaster abaixo\r\n dispatch(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.general_errorUploadingFile'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n });\r\n },\r\n onDragEnter() {\r\n if (!disableDropzone) {\r\n setDropzoneActiveColor(theme.colors.lightGrey);\r\n }\r\n },\r\n onDragLeave() {\r\n setDropzoneActiveColor(theme.colors.white);\r\n },\r\n onDropAccepted() {\r\n setDropzoneActiveColor(theme.colors.white);\r\n },\r\n onDropRejected(files, event) {\r\n setDropzoneActiveColor(theme.colors.white);\r\n\r\n if (files.length > 0 && files[0].errors.length > 0) {\r\n setErrorToDisplay(files[0].errors[0].code);\r\n }\r\n },\r\n });\r\n\r\n const removeFile = (index) => {\r\n setUploadedFiles(uploadedFiles.filter((file, i: number) => i !== index));\r\n\r\n setUploadedSuccess(null);\r\n\r\n onChange(undefined);\r\n setDisableDropzone(false);\r\n };\r\n\r\n const files = uploadedFiles.map((file: any, index: number) => {\r\n return (\r\n \r\n \r\n \r\n {file.name}\r\n \r\n\r\n \r\n \r\n \r\n );\r\n });\r\n\r\n const processFilename = (filename: string | undefined) => {\r\n // remove the file name extension\r\n\r\n if (!filename || filename === '') {\r\n return '';\r\n }\r\n\r\n const filenameSplit = filename.split('.');\r\n let filenameHeader = '';\r\n\r\n if (filenameSplit.length === 1) {\r\n return filenameSplit[0];\r\n }\r\n\r\n for (let i = 0; i < filenameSplit.length; i++) {\r\n if (i !== filenameSplit.length - 1) {\r\n if (i === 0) {\r\n filenameHeader += filenameSplit[i];\r\n } else {\r\n filenameHeader += `.${filenameSplit[i]}`;\r\n }\r\n }\r\n }\r\n\r\n return filenameHeader;\r\n };\r\n\r\n const getFileExtension = (filename) => {\r\n if (!filename || filename === '') {\r\n return '...';\r\n }\r\n\r\n const filenameSplit = filename.split('.');\r\n\r\n if (filenameSplit.length === 1 || (filenameSplit.length === 2 && filenameSplit[1] === '')) {\r\n return '...';\r\n }\r\n\r\n return filenameSplit[filenameSplit.length - 1];\r\n };\r\n\r\n const getFilesOrDescriptions = () => {\r\n if (\r\n (value === undefined || value === null) &&\r\n uploadedFiles.length &&\r\n (!uploadedFiles[0].finished || uploadedFiles[0].error)\r\n ) {\r\n return {files};\r\n } else if ((value === undefined || value === null) && !uploadedFiles.length) {\r\n return (\r\n \r\n {icon && {icon}}\r\n \r\n {heading && (\r\n \r\n {heading}\r\n \r\n )}\r\n {description && (\r\n \r\n {description}\r\n \r\n )}\r\n \r\n \r\n );\r\n } else if (value) {\r\n // file upload has finished\r\n return (\r\n \r\n {icon && {icon}}\r\n \r\n {heading && (\r\n \r\n \r\n \r\n {heading}\r\n \r\n \r\n \r\n \r\n {`(${processFilename(value.fileName)}`}\r\n \r\n \r\n
\r\n \r\n {')'}\r\n \r\n
\r\n
\r\n )}\r\n {\r\n \r\n \r\n {`${t('payments.format', { textOnly: true })}:`}\r\n \r\n \r\n {`(${getFileExtension(value.fileName)})`}\r\n \r\n \r\n {'|'}\r\n \r\n \r\n {`${t('payments.fileSize', { textOnly: true })}:`}\r\n \r\n \r\n {`${bytesToMegabytes(value.nBytes)}`}\r\n \r\n \r\n }\r\n
\r\n
\r\n );\r\n } else {\r\n return
;\r\n }\r\n };\r\n\r\n const getErrorMessage = (code: string) => {\r\n if (code === 'file-too-large') {\r\n return t('generic.fileUploaderErrorLarge', {\r\n limit: bytesToMegabytes(maxSize ? maxSize : DEFAULT_FILE_SIZES.MAX_SIZE),\r\n });\r\n } else if (code === 'file-too-small') {\r\n return t('generic.fileUploaderErrorSmall', {\r\n limit: minSize ? minSize : DEFAULT_FILE_SIZES.MAX_SIZE,\r\n });\r\n } else if (code === 'too-many-files') {\r\n return t('generic.tooManyFilesError');\r\n } else if (code === 'file-invalid-type') {\r\n return t('generic.fileInvalidTypeError');\r\n }\r\n };\r\n\r\n return (\r\n \r\n {enableRemoveField && (\r\n \r\n {\r\n onRemoveField && onRemoveField();\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n {/* The disabled can be used to disable the menu open when the 'Upload File' button is clicked */}\r\n \r\n \r\n {(icon || heading || description || files) && (\r\n {getFilesOrDescriptions()}\r\n )}\r\n {!uploadedFiles.length && (\r\n }\r\n color={theme.colors.plusDarkGrey}\r\n onClick={() => {\r\n open();\r\n }}\r\n >\r\n {t('generic.fileUploaderButton')}\r\n \r\n )}\r\n {((uploadedFiles.length > 0 && !uploadedFiles[0].error && uploadedFiles[0].finished) ||\r\n value) && (\r\n \r\n }\r\n color={theme.colors.plusDarkGrey}\r\n onClick={() => {\r\n setShowFileLoading(true);\r\n\r\n API.files.getFileOnTab\r\n .call(value.url)\r\n .then((value) => {\r\n setShowFileLoading(false);\r\n })\r\n .catch((e) => {\r\n setShowFileLoading(false);\r\n dispatch(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.general_errorLoadingFile'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n });\r\n }}\r\n >\r\n {t('generic.viewFile')}\r\n \r\n\r\n {\r\n // 0 because each file field only accepts one file\r\n removeFile(0);\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n {t('generic.fileUploaderNote')}\r\n \r\n \r\n {(!!fileRejections.length || error) && (\r\n \r\n {errorToDisplay !== null /* || fileRejections.length > 0*/ && (\r\n \r\n {getErrorMessage(errorToDisplay)}\r\n \r\n )}\r\n {error && (\r\n \r\n {`* ${error}`}\r\n \r\n )}\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default FileUploader;\r\n\r\nconst Wrapper = styled.div`\r\n position: relative;\r\n`;\r\n\r\nconst InnerWrapper = styled.div<{ backgroundColor: string }>`\r\n border: 1px solid ${({ theme }) => theme.colors.softRegularGrey};\r\n height: 69px;\r\n display: flex;\r\n align-items: center;\r\n background-color: ${({ backgroundColor }) => backgroundColor};\r\n`;\r\n\r\nconst DescriptionAndButtonUploader = styled.div`\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n width: 100%;\r\n`;\r\n\r\nconst RemoveFieldButtonWrapper = styled.div`\r\n position: absolute;\r\n top: -19px;\r\n right: -20px;\r\n z-index: 999;\r\n\r\n svg {\r\n font-size: 18px;\r\n background-color: white;\r\n }\r\n`;\r\n\r\nconst DescriptionWrapper = styled.div`\r\n display: flex;\r\n align-items: center;\r\n`;\r\n\r\nconst IconWrapper = styled.div`\r\n svg {\r\n display: flex;\r\n align-items: center;\r\n\r\n font-size: 26px;\r\n }\r\n`;\r\n\r\nconst UploadedFileHeadingTitle = styled.div`\r\n min-width: 0px;\r\n max-width: 400px;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n`;\r\n\r\nconst UploadedFileHeadingFileName = styled.div`\r\n min-width: 0px;\r\n max-width: 140px;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n`;\r\n\r\nconst UploaderDescription = styled.div`\r\n display: flex;\r\n align-items: center;\r\n padding-left: 5px;\r\n`;\r\n\r\nconst TrashIconWrapper = styled.div`\r\n svg {\r\n font-size: 16px;\r\n }\r\n`;\r\n\r\nconst TextDescription = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n align-items: flex-start;\r\n margin-left: 17px;\r\n max-width: 650px;\r\n justify-content: space-between;\r\n\r\n > div:not(:first-child) {\r\n margin-top: 4px;\r\n }\r\n`;\r\n\r\nconst StyledText = styled(Text)`\r\n line-height: 1.3;\r\n`;\r\n\r\nconst FileWrapper = styled.div`\r\n display: flex;\r\n align-items: center;\r\n`;\r\n\r\nconst FileNameAndProgress = styled.div`\r\n position: relative;\r\n`;\r\n\r\nconst ProgressBar = styled(Progress)`\r\n &&& {\r\n width: 100%;\r\n position: absolute;\r\n bottom: -2px;\r\n left: 0;\r\n margin: 0;\r\n\r\n .bar {\r\n height: 2px;\r\n min-width: 0;\r\n &.success {\r\n background-color: ${({ theme }) => theme.colors.successGreen} !important;\r\n }\r\n }\r\n }\r\n`;\r\n\r\nconst UploadedFileHeading = styled.div`\r\n display: flex;\r\n align-items: center;\r\n\r\n div:nth-child(2) {\r\n margin-left: 4px;\r\n }\r\n`;\r\n\r\nconst UploadedFileSubHeading = styled.div`\r\n display: flex;\r\n div:not(:first-child) {\r\n margin-left: 4px;\r\n }\r\n`;\r\n\r\nconst ButtonDeleteFileWrapper = styled.div<{ removable: boolean }>`\r\n display: flex;\r\n\r\n button:first-child {\r\n margin-right: ${({ removable }) => (removable ? '16px' : '0px')};\r\n }\r\n`;\r\n\r\nconst MessageArea = styled.div`\r\n margin-top: 4px;\r\n`;\r\n\r\nconst UploaderDescriptionText = styled(Text)`\r\n margin-top: 4px;\r\n`;\r\n\r\nconst DropzoneContainer = styled.div`\r\n padding: 16px;\r\n outline: none;\r\n width: 100%;\r\n`;\r\n\r\nconst RemoveFileIconWrapper = styled.div`\r\n svg {\r\n transform: rotate(45deg);\r\n }\r\n`;\r\n\r\nconst StyledButton = styled(Button)`\r\n z-index: 999;\r\n`;\r\n","/**\r\n * FormTable\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport React, { useMemo } from 'react';\r\nimport styled from 'styled-components';\r\nimport { Text, Table } from '@paco_ua/pacoui';\r\n\r\ninterface IProps extends React.HTMLAttributes {\r\n error?: string;\r\n structure: any;\r\n defaultValue?: any;\r\n value: any;\r\n disabledAccordion?: boolean;\r\n onChange: (value: any) => {};\r\n}\r\n\r\nconst FormTable: React.FC = ({\r\n error,\r\n structure,\r\n onChange,\r\n defaultValue,\r\n value,\r\n disabledAccordion,\r\n ...props\r\n}) => {\r\n const createTableStructure = () => {\r\n return structure;\r\n };\r\n\r\n const resetRows = useMemo(() => {\r\n if (defaultValue?.length === 0) return true;\r\n return false;\r\n }, [defaultValue]);\r\n\r\n return (\r\n \r\n \r\n {\r\n {\r\n onChange(data);\r\n }}\r\n resetRows={resetRows}\r\n structure={createTableStructure()}\r\n />\r\n }\r\n \r\n\r\n \r\n {error && (\r\n \r\n {error}\r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default FormTable;\r\n\r\nconst Wrapper = styled.div`\r\n display: flex;\r\n justify-content: flex-start;\r\n flex-direction: column;\r\n`;\r\n\r\nconst MessageArea = styled.div``;\r\n\r\nconst TableWrapper = styled.div<{ hasDescription?: boolean }>`\r\n display: flex;\r\n align-items: center;\r\n flex-wrap: wrap;\r\n flex-grow: 1;\r\n flex: 1;\r\n flex-direction: ${({ hasDescription }) => (hasDescription ? 'column' : 'row')};\r\n\r\n > div {\r\n flex-grow: 1;\r\n }\r\n`;\r\n","/**\r\n * FormDropdown component\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport React from 'react';\r\n\r\nimport styled from 'styled-components';\r\n\r\nimport { Dropdown, Text } from '@paco_ua/pacoui';\r\n\r\ninterface INewCertificateDropdown {\r\n register: any;\r\n onChange: (value: any) => void;\r\n error?: string;\r\n success?: any;\r\n name: string;\r\n placeholder: string;\r\n options: any[];\r\n defaultValue: number;\r\n value: number;\r\n}\r\n\r\nconst FormDropdown: React.FC = ({\r\n error,\r\n name,\r\n defaultValue,\r\n onChange,\r\n value,\r\n options,\r\n}) => {\r\n return (\r\n \r\n \r\n onChange(data.value)}\r\n options={options.map((v, index) => ({\r\n key: `option_${index}`,\r\n text: v.nameKey,\r\n value: v.valueId,\r\n }))}\r\n defaultValue={defaultValue}\r\n />\r\n \r\n {error && (\r\n \r\n \r\n {`* ${error}`}\r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default FormDropdown;\r\n\r\nconst Wrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst DropdownWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n width: 372px;\r\n \r\n &&& {\r\n padding: 0px;\r\n }\r\n \r\n && {\r\n .ui.dropdown {\r\n /*padding: 16px 12px;\r\n background-color: ${({ theme }) => theme.colors.lightGrey};\r\n align-self: flex-start;*/\r\n display: flex;\r\n }\r\n \r\n .ui.dropdown > .text {\r\n color: ${({ theme }) => theme.colors.plusDarkGrey};\r\n font-size: 15px;\r\n font-weight: 400;\r\n margin-right: 8px;\r\n flex-grow: 1;\r\n }\r\n \r\n /*.ui.dropdown > .dropdown.icon {\r\n color: ${({ theme }) => theme.colors.grey};\r\n }*/\r\n \r\n .ui.dropdown .menu > .item {\r\n color: ${({ theme }) => theme.colors.plusDarkGrey};\r\n font-size: 12px;\r\n }\r\n }\r\n `;\r\n\r\nconst MessageArea = styled.div`\r\n margin-top: 4px;\r\n`;\r\n","/**\r\n * FormGroup\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport React, { useState } from 'react';\r\nimport styled from 'styled-components';\r\nimport { Text } from '@paco_ua/pacoui';\r\n\r\nimport { useFormContext } from 'react-hook-form';\r\n\r\nimport { t } from 'app';\r\n\r\ninterface IProps extends React.HTMLAttributes {\r\n structure: any;\r\n onChange?: any;\r\n name: string;\r\n}\r\n\r\nconst FormGroup: React.FC = ({ name, children }) => {\r\n const [error, setError] = useState(null);\r\n const form = useFormContext();\r\n\r\n const childrenValues: any[] = [];\r\n\r\n React.Children.forEach(children, (child: any) => {\r\n const currentValue = form.getValues(`${name}.${child.props.nameKey}`);\r\n if (currentValue) {\r\n childrenValues.push(currentValue);\r\n }\r\n });\r\n\r\n return (\r\n \r\n \r\n \r\n {t('applications.fileUploaderTitle', { textOnly: true })}\r\n \r\n \r\n {t('applications.fileUploaderSubtitle', { textOnly: true })}\r\n \r\n \r\n \r\n {children &&\r\n React.Children.map(children, (child: any) => {\r\n let disabled = false;\r\n\r\n if (form && child.props?.nameKey && !!childrenValues.length) {\r\n const value = form.getValues(`${name}.${child.props.nameKey}`);\r\n if (value !== null && value !== undefined) {\r\n disabled = false;\r\n } else {\r\n disabled = true;\r\n }\r\n }\r\n\r\n return (\r\n \r\n {React.cloneElement(child, {\r\n onError: (error) => {\r\n setError(error);\r\n },\r\n })}\r\n \r\n );\r\n })}\r\n \r\n \r\n {error && (\r\n \r\n * {error}\r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nFormGroup.defaultProps = {\r\n children: [],\r\n};\r\n\r\nexport default FormGroup;\r\n\r\nconst Wrapper = styled.div`\r\n display: flex;\r\n justify-content: flex-start;\r\n flex-direction: column;\r\n margin-top: 24px;\r\n`;\r\n\r\nconst FormGroupTitleWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n div:nth-child(2) {\r\n margin-top: 8px;\r\n margin-top: 8px;\r\n }\r\n`;\r\n\r\nconst FormGroupFilesWrapper = styled.div`\r\n margin-top: 12px;\r\n\r\n > div:not(:first-child) {\r\n margin-top: 12px;\r\n }\r\n`;\r\n\r\nconst MessageArea = styled.div``;\r\n\r\nconst ChildWrapper = styled.div<{ disabled?: boolean }>`\r\n opacity: ${({ disabled }) => (disabled ? 0.5 : 1)};\r\n pointer-events: ${({ disabled }) => (disabled ? 'none' : 'auto')};\r\n cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};\r\n\r\n button {\r\n pointer-events: ${({ disabled }) => (disabled ? 'none' : 'auto')};\r\n }\r\n`;\r\n","/**\r\n * New Application Dropdown component\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport React, { useState } from 'react';\r\n\r\nimport styled from 'styled-components';\r\n\r\nimport { t } from 'app';\r\n\r\nimport { Dropdown } from 'semantic-ui-react';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faChevronDown, faChevronUp } from '@fortawesome/pro-regular-svg-icons';\r\n\r\nimport { Text } from '@paco_ua/pacoui';\r\n\r\ninterface INewApplicationDropdown {\r\n register: any;\r\n onChange: (value: any) => void;\r\n error?: any;\r\n success?: any;\r\n name: string;\r\n placeholder: string;\r\n options: any[];\r\n defaultValue: number;\r\n value: number;\r\n}\r\n\r\nconst NewApplicationDropdown: React.FC = ({\r\n error,\r\n name,\r\n defaultValue,\r\n onChange,\r\n value,\r\n options,\r\n}) => {\r\n const [dropdownOpen, setDropdownOpen] = useState(false);\r\n\r\n return (\r\n \r\n onChange(data.value)}\r\n options={options.map((v, index) => ({\r\n key: `option_${index}`,\r\n text: v.nameKey,\r\n value: v.valueId,\r\n }))}\r\n icon={\r\n \r\n \r\n \r\n }\r\n defaultValue={defaultValue}\r\n onOpen={() => setDropdownOpen(true)}\r\n onClose={() => setDropdownOpen(false)}\r\n />\r\n\r\n \r\n {error && (\r\n \r\n {`* ${error}`}\r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default NewApplicationDropdown;\r\n\r\nconst Wrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n && {\r\n .ui.dropdown {\r\n padding: 16px 8px;\r\n background-color: ${({ theme }) => theme.colors.lightGrey};\r\n align-self: flex-start;\r\n }\r\n\r\n .ui.dropdown > .text {\r\n color: ${({ theme }) => theme.colors.primary};\r\n font-size: 15px;\r\n font-weight: 400;\r\n line-height: 1.3;\r\n max-width: 600px;\r\n }\r\n\r\n .ui.dropdown > .dropdown.icon {\r\n color: ${({ theme }) => theme.colors.grey};\r\n }\r\n\r\n .ui.dropdown .menu {\r\n border-radius: 0;\r\n }\r\n\r\n .ui.dropdown .menu > .item {\r\n color: ${({ theme }) => theme.colors.plusDarkGrey};\r\n font-size: 12px;\r\n }\r\n }\r\n`;\r\n\r\n//const StyledDropdown = styled(Dropdown)``;\r\n\r\nconst DropdownToggleIcon = styled.div`\r\n display: inline-block;\r\n svg {\r\n color: ${({ theme }) => theme.colors.grey};\r\n font-size: 10px;\r\n margin-left: 6px;\r\n }\r\n`;\r\n\r\nconst MessageArea = styled.div`\r\n margin-top: 2px;\r\n`;\r\n","/**\r\n * Component to load components\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport React from 'react';\r\nimport { Controller } from 'react-hook-form';\r\n\r\nimport {\r\n FormInput,\r\n Text,\r\n Checkbox,\r\n RadioList,\r\n Counter,\r\n EditableFieldsGroup,\r\n} from '@paco_ua/pacoui';\r\n\r\nimport FormInputWithFlags from 'shared/components/FormInputWithFlags';\r\nimport FormTextArea from 'shared/components/FormTextArea';\r\nimport FormLargeTextArea from 'shared/components/FormLargeTextArea';\r\nimport FileUploader from 'shared/components/FileUploader';\r\nimport FormTable from 'shared/components/FormTable';\r\nimport FormDropdown from 'shared/components/FormDropdown';\r\nimport FormGroup from 'shared/components/FormGroup';\r\n\r\nimport NewApplicationDropdown from 'scenes/VirtualSecretary/Applications/NewApplication/components/NewApplicationDropdown';\r\n\r\ninterface IProps extends Omit, ''> {\r\n type: string;\r\n}\r\n\r\nconst mappings = {\r\n text: {\r\n component: Text,\r\n type: 'ref',\r\n },\r\n textbox: {\r\n component: FormInput,\r\n type: 'ref',\r\n },\r\n largetextbox: {\r\n component: FormLargeTextArea,\r\n type: 'controller',\r\n },\r\n big_textbox: {\r\n component: FormTextArea,\r\n type: 'controller',\r\n },\r\n file: {\r\n component: FileUploader,\r\n type: 'controller',\r\n },\r\n checkbox: {\r\n component: Checkbox,\r\n type: 'ref',\r\n },\r\n checkbox_table: {\r\n component: FormTable,\r\n type: 'controller',\r\n },\r\n radio_button: {\r\n component: RadioList,\r\n type: 'controller',\r\n },\r\n dropdown: {\r\n component: FormDropdown,\r\n type: 'controller',\r\n },\r\n flag_dropdown_textbox: {\r\n component: FormInputWithFlags,\r\n type: 'controller',\r\n },\r\n application_dropdown: {\r\n component: NewApplicationDropdown,\r\n type: 'controller',\r\n },\r\n counter: {\r\n component: Counter,\r\n type: 'controller',\r\n },\r\n editableGroupComponent: {\r\n component: EditableFieldsGroup,\r\n type: 'groupController',\r\n },\r\n group: {\r\n component: FormGroup,\r\n type: 'groupController',\r\n },\r\n};\r\n\r\nconst FormElement: React.FC = ({\r\n type,\r\n children,\r\n control,\r\n defaultValue,\r\n register,\r\n ...props\r\n}) => {\r\n const Component = mappings[type].component;\r\n const ComponentType = mappings[type].type;\r\n\r\n return (\r\n <>\r\n {ComponentType === 'ref' && (\r\n \r\n )}\r\n\r\n {ComponentType === 'controller' && (\r\n {\r\n return (\r\n \r\n );\r\n }}\r\n />\r\n )}\r\n\r\n {ComponentType === 'groupController' && {children}}\r\n \r\n );\r\n};\r\nexport default FormElement;\r\n","import React from 'react';\r\nimport * as yup from 'yup';\r\nimport { yupResolver } from '@hookform/resolvers/yup';\r\nimport _ from 'lodash';\r\n\r\nimport { createYupSchema, createValidationFormData } from './validations';\r\nimport FormElement from './FormElement';\r\n\r\nexport const getFormElements = (formSchema, form) => {\r\n let formElements = {};\r\n\r\n formSchema.forEach((formElement, index) => {\r\n //if is a group of values inside another\r\n if (formElement.type === 'group' && formElement.values && formElement.values.length > 0) {\r\n formElements[formElement.nameKey] = {\r\n group: {\r\n value: (props) => {\r\n return constructFormElements(form, formElement, props, formElement.nameKey);\r\n },\r\n values: {},\r\n },\r\n };\r\n\r\n formElement.values.forEach((fieldElement) => {\r\n formElements[formElement.nameKey].group.values[fieldElement.nameKey] = (props) => {\r\n return constructFormElements(\r\n form,\r\n fieldElement,\r\n props,\r\n `${formElement.nameKey}.${fieldElement.nameKey}`\r\n );\r\n };\r\n });\r\n } else if (\r\n formElement.type === 'editableGroupComponent' &&\r\n formElement.values &&\r\n formElement.values.length > 0\r\n ) {\r\n formElements[formElement.nameKey] = {\r\n value: (props) => {\r\n return constructFormElements(form, formElement, props, formElement.nameKey);\r\n },\r\n values: {},\r\n };\r\n\r\n formElement.values.forEach((fieldElement) => {\r\n formElements[formElement.nameKey].values[fieldElement.nameKey] = (props) => {\r\n return constructFormElements(\r\n form,\r\n fieldElement,\r\n props,\r\n `${formElement.nameKey}.${fieldElement.nameKey}`\r\n );\r\n };\r\n });\r\n } else {\r\n formElements[formElement.nameKey] = (props) => {\r\n return constructFormElements(form, formElement, props, formElement.nameKey);\r\n };\r\n }\r\n\r\n if (formElement.hidden) {\r\n form.unregister(formElement.nameKey);\r\n }\r\n });\r\n\r\n return formElements;\r\n};\r\n\r\nconst constructFormElements = (form, formElement, props, name) => {\r\n let defaultValue;\r\n\r\n defaultValue =\r\n form.getValues(formElement.nameKey) !== undefined\r\n ? form.getValues(formElement.nameKey)\r\n : typeof formElement.value === 'undefined'\r\n ? undefined\r\n : formElement.value;\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nexport const getFormElementsData = (formSchema, form, hiddenFields) => {\r\n let formElementsData = {};\r\n\r\n formSchema.forEach((formElement) => {\r\n //if is a group of values inside another\r\n if (formElement.type === 'group' && formElement.values && formElement.values.length > 0) {\r\n let hidden: boolean = false;\r\n\r\n if (hiddenFields !== null) {\r\n hidden = hiddenFields.some((field) => {\r\n return field === formElement.nameKey;\r\n });\r\n }\r\n\r\n formElementsData[formElement.nameKey] = {\r\n group: {\r\n value: {\r\n ...formElement,\r\n hidden,\r\n },\r\n values: {},\r\n },\r\n };\r\n\r\n formElement.values.forEach((fieldElement) => {\r\n let hidden: boolean = false;\r\n if (hiddenFields !== null) {\r\n hidden = hiddenFields.some((field) => {\r\n return field === fieldElement.nameKey;\r\n });\r\n }\r\n\r\n formElementsData[formElement.nameKey].group.values[fieldElement.nameKey] = {\r\n ...fieldElement,\r\n hidden,\r\n };\r\n });\r\n } else if (\r\n formElement.type === 'editableGroupComponent' &&\r\n formElement.values &&\r\n formElement.values.length > 0\r\n ) {\r\n //if is a group of values inside another\r\n let hidden: boolean = false;\r\n\r\n if (hiddenFields !== null) {\r\n hidden = hiddenFields.some((field) => {\r\n return field === formElement.nameKey;\r\n });\r\n }\r\n\r\n formElementsData[formElement.nameKey] = {\r\n ...formElement,\r\n hidden,\r\n values: {},\r\n };\r\n\r\n formElement.values.forEach((fieldElement) => {\r\n let hidden: boolean = false;\r\n if (hiddenFields !== null) {\r\n hidden = hiddenFields.some((field) => {\r\n return field === fieldElement.nameKey;\r\n });\r\n }\r\n\r\n formElementsData[formElement.nameKey].values[fieldElement.nameKey] = {\r\n ...fieldElement,\r\n hidden,\r\n };\r\n });\r\n } else {\r\n let hidden: boolean = false;\r\n\r\n if (hiddenFields !== null) {\r\n hidden = hiddenFields.some((field) => {\r\n return field === formElement.nameKey;\r\n });\r\n }\r\n\r\n formElementsData[formElement.nameKey] = {\r\n ...formElement,\r\n hidden,\r\n };\r\n }\r\n });\r\n\r\n return formElementsData;\r\n};\r\n\r\nexport const watchFields = (formSchema) =>\r\n formSchema.reduce((acc: any, formElement: any) => {\r\n let newElementsToWatch: any = [];\r\n\r\n if (\r\n (formElement.type === 'group' || formElement.type === 'editableGroupComponent') &&\r\n formElement.values &&\r\n formElement.values.length > 0\r\n ) {\r\n formElement.values.forEach((fieldElement) => {\r\n if (fieldElement.visibleIf !== null) {\r\n fieldElement.visibleIf.forEach((visibilityRule) => {\r\n Object.keys(visibilityRule).forEach((visibilityItem: any) => {\r\n if (\r\n !acc.some((watchValues) => watchValues === visibilityItem) &&\r\n !newElementsToWatch.some((watchValues) => watchValues === visibilityItem)\r\n ) {\r\n newElementsToWatch.push(visibilityItem);\r\n }\r\n });\r\n });\r\n }\r\n });\r\n }\r\n\r\n if (formElement.visibleIf !== null) {\r\n formElement.visibleIf.forEach((visibilityRule) => {\r\n Object.keys(visibilityRule).forEach((visibilityItem: any) => {\r\n if (\r\n !acc.some((watchValues) => watchValues === visibilityItem) &&\r\n !newElementsToWatch.some((watchValues) => watchValues === visibilityItem)\r\n ) {\r\n newElementsToWatch.push(visibilityItem);\r\n }\r\n });\r\n });\r\n }\r\n return [...acc, ...newElementsToWatch];\r\n }, []);\r\n\r\nconst andReducer = (acc, initalValue: boolean) => {\r\n return acc && initalValue;\r\n};\r\n\r\nconst orReducer = (acc, initalValue: boolean) => {\r\n return acc || initalValue;\r\n};\r\n\r\n// watchForm: o nome, e respetivo valor, dos campos cujos valores são dependencias de outros campos\r\nexport const getHiddenFields = (watchForm, formSchema) => {\r\n if (!watchForm) {\r\n return [];\r\n }\r\n\r\n let hiddenComponents = [] as string[];\r\n\r\n // iterar por cada componente no formSchema\r\n formSchema.forEach((uiComponent) => {\r\n if (uiComponent['visibleIf'] !== null) {\r\n let visibilityResults = [] as boolean[]; // array com os resultados dos vários objectos no visibleIf, correspondentes a um componente no formSchema\r\n\r\n // iterar por todos os visibleIfs, para ir adicionando o resultado de cada um no visibilityResults\r\n uiComponent['visibleIf'].forEach((visibleEntry) => {\r\n // iterar por todos os campos no visibleIf e agregar tudo com a operação AND\r\n const result = Object.keys(visibleEntry)\r\n .map((nameKey) => {\r\n if (watchForm[nameKey] !== null) {\r\n return watchForm[nameKey] === visibleEntry[nameKey];\r\n } else {\r\n return false;\r\n }\r\n })\r\n .reduce(andReducer, true);\r\n\r\n visibilityResults.push(result);\r\n });\r\n\r\n const visibleResult = visibilityResults.reduce(orReducer, false);\r\n\r\n if (!visibleResult) {\r\n hiddenComponents.push(uiComponent['nameKey']);\r\n }\r\n }\r\n });\r\n\r\n return hiddenComponents;\r\n};\r\n\r\nexport const getForm = (formSchema) => {\r\n const formValidation = createValidationFormData(formSchema);\r\n const yupSchema = formValidation.reduce(createYupSchema, {});\r\n const validationSchema = yup.object().shape(yupSchema);\r\n return yupResolver(validationSchema);\r\n};\r\n\r\n//TODO fix in backend\r\nexport const flagInputHotfix = (value) => ({ input: value, countryValue: 'pt' });\r\n","/**\r\n * Form component\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport React, { useEffect, useMemo, useState } from 'react';\r\nimport { FormProvider, useForm } from 'react-hook-form';\r\n\r\nimport { getFormElements, getForm, getHiddenFields, getFormElementsData } from './utils';\r\nimport { history } from 'utils';\r\n\r\nimport _ from 'lodash';\r\n\r\ninterface IProps {\r\n formSchema: any; // values list\r\n children: any;\r\n}\r\n\r\nconst FormManager: React.FC = ({ formSchema, children }) => {\r\n const [dynamicFormSchema, setDynamicFormSchema] = useState(formSchema as any);\r\n\r\n const form = useForm({\r\n resolver: getForm(dynamicFormSchema),\r\n shouldUnregister: history.location.pathname === '/dados-pessoais',\r\n });\r\n\r\n // contains a list with all the fields that the elements in the form depend on\r\n const watchForm = useMemo(() => form.watch(), [form]);\r\n\r\n const verifyHiddenFields = (schema, hiddenFields, updateSchema) => {\r\n let newSchema = [] as any;\r\n\r\n let newHiddenFieldsMatrix = schema.reduce((acc, schemaElement) => {\r\n if (schemaElement?.hidden === true) {\r\n acc.push(schemaElement.nameKey);\r\n }\r\n\r\n if (schemaElement.type === 'group' || schemaElement.type === 'editableGroupComponent') {\r\n if (schemaElement?.values) {\r\n schemaElement.values.forEach((groupChildElement) => {\r\n if (groupChildElement?.hidden) {\r\n acc.push(groupChildElement.nameKey);\r\n }\r\n });\r\n }\r\n }\r\n\r\n return acc;\r\n }, []);\r\n\r\n let newHiddenFields = !_.isEqual(hiddenFields, newHiddenFieldsMatrix);\r\n\r\n if (!newHiddenFields && !updateSchema) {\r\n return;\r\n }\r\n\r\n schema.forEach((schemaElement, elementIndex) => {\r\n let isHidden = hiddenFields.some((hiddenFieldNameKey) => {\r\n return hiddenFieldNameKey === schemaElement.nameKey;\r\n });\r\n\r\n // formSchema[elementIndex] may not correspond to schemaElement after the addition of new form elements to the schema\r\n let formSchemaElem = formSchema.find((element) => element.nameKey === schemaElement.nameKey);\r\n let newSchemaElement = {\r\n ...schemaElement,\r\n validations: isHidden ? ([] as any) : (formSchemaElem?.validations as any) || ([] as any),\r\n hidden: isHidden,\r\n };\r\n\r\n if (schemaElement.type === 'group' || schemaElement.type === 'editableGroupComponent') {\r\n newSchemaElement.values = schemaElement.values.map((groupChild, childKey) => {\r\n let isHiddenChild = hiddenFields.some((hiddenFieldNameKey) => {\r\n return hiddenFieldNameKey === groupChild.nameKey;\r\n });\r\n\r\n return {\r\n ...groupChild,\r\n validations: isHiddenChild\r\n ? ([] as any)\r\n : (formSchemaElem?.values[childKey]?.validations as any) || ([] as any),\r\n hidden: isHiddenChild,\r\n };\r\n });\r\n }\r\n\r\n newSchema.push(newSchemaElement);\r\n });\r\n\r\n if (newHiddenFields || updateSchema) {\r\n setDynamicFormSchema(newSchema);\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (dynamicFormSchema) {\r\n const hiddenFields = getHiddenFields(watchForm, dynamicFormSchema);\r\n verifyHiddenFields(dynamicFormSchema, hiddenFields, false);\r\n }\r\n }, [watchForm]);\r\n\r\n useEffect(() => {\r\n const hiddenFields = getHiddenFields(watchForm, formSchema);\r\n verifyHiddenFields(formSchema, hiddenFields, true);\r\n }, [formSchema]);\r\n\r\n const formElements = useMemo(() => getFormElements(dynamicFormSchema, form), [dynamicFormSchema]);\r\n\r\n const formElementsData = useMemo(() => {\r\n const hiddenFields = getHiddenFields(watchForm, dynamicFormSchema);\r\n return getFormElementsData(dynamicFormSchema, form, hiddenFields);\r\n }, [dynamicFormSchema, form]);\r\n\r\n return {children(form, formElements, formElementsData)};\r\n};\r\n\r\nexport default FormManager;\r\n","/**\r\n * NewApplication scene\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport React, { useEffect, useContext, useState, useMemo } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport * as selectors from './logic/selectors';\r\nimport { actions } from 'store/rootSlices';\r\nimport { history } from 'utils';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faChevronRight } from '@fortawesome/pro-light-svg-icons';\r\nimport { faCheck } from '@fortawesome/pro-solid-svg-icons';\r\n\r\nimport { Text, Button } from '@paco_ua/pacoui';\r\n\r\nimport NewApplicationSelectRegistration from './containers/NewApplicationSelectRegistration';\r\nimport NewApplicationSelectType from './containers/NewApplicationSelectType';\r\nimport NewApplicationStatement from './containers/NewApplicationStatement';\r\nimport NewApplicationSubmission from './containers/NewApplicationSubmission';\r\n\r\nimport FormManager from 'shared/containers/FormManager';\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\n\r\nimport { getFormValues } from './utils';\r\n\r\nconst NewApplication = ({ t }) => {\r\n const theme = useContext(ThemeContext);\r\n\r\n const registrations = useSelector(selectors.getRegistrations);\r\n\r\n const user = useSelector(selectors.getUser);\r\n\r\n const steps = [\r\n t('applications.requestFirstStep'),\r\n t('applications.requestSecondStep'),\r\n t('applications.requestThirdStep'),\r\n t('applications.requestFourthStep'),\r\n ];\r\n\r\n const stepStyles = {\r\n done: {\r\n backgroundColor: theme.colors.primary,\r\n color: theme.colors.white,\r\n fontWeight: 500,\r\n border: 'none',\r\n borderStyle: null,\r\n checkTick: true,\r\n },\r\n current: {\r\n backgroundColor: theme.colors.lightGrey,\r\n color: theme.colors.primary,\r\n fontWeight: 500,\r\n border: 'top',\r\n borderStyle: `2px solid ${theme.colors.primary}`,\r\n checkTick: false,\r\n },\r\n toDo: {\r\n backgroundColor: 'transparent',\r\n color: theme.colors.regularGrey,\r\n fontWeight: 400,\r\n border: 'all',\r\n borderStyle: `1px solid ${theme.colors.regularGrey}`,\r\n checkTick: false,\r\n },\r\n };\r\n\r\n //const { } = useSelector(state => state.NewApplication)\r\n const {\r\n onMount,\r\n onUnmount,\r\n setCurrentStep,\r\n getApplicationForm,\r\n setApplicationData,\r\n getApplicationTypes,\r\n setApplicationTypeId,\r\n submitApplication,\r\n setLoadingStatus,\r\n resetStepThree,\r\n resetApplicationSelection,\r\n setErrorStatus,\r\n resetPage,\r\n } = actions.NewApplication;\r\n\r\n const dispatch = useDispatch();\r\n const currentStep = useSelector(selectors.getCurrentStep);\r\n const newApplicationData = useSelector(selectors.getNewApplicationData);\r\n const { applicationTypes, filterParams } = useSelector(selectors.getNewApplicationSlice);\r\n const newApplicationErrorStatus = useSelector(selectors.getApplicationErrorStatus);\r\n const newApplicationLoading = useSelector(selectors.getApplicationLoading);\r\n const newApplicationTabLoading = useSelector(selectors.getApplicationTabLoading);\r\n const [newApplicationReset, setNewApplicationReset] = useState(false);\r\n\r\n const [loadingFile, setLoadingFile] = useState({});\r\n\r\n useEffect(() => {\r\n if (\r\n history.location.state &&\r\n (!newApplicationData.type.id || !newApplicationData.registrationId)\r\n ) {\r\n if (!newApplicationData.registrationId && registrations) {\r\n dispatch(\r\n setApplicationData({\r\n ...newApplicationData,\r\n registrationId:\r\n history.location.state.registrationId ?? registrations[0].registrationId,\r\n })\r\n );\r\n }\r\n if (applicationTypes.filters.length === 0 && newApplicationData.registrationId) {\r\n dispatch(getApplicationTypes(filterParams));\r\n }\r\n if (registrations && applicationTypes.filters.length > 0) {\r\n let key;\r\n if ('alteraçãoDeDados' in applicationTypes.data) {\r\n key = 'alteraçãoDeDados';\r\n } else if ('changeOfData' in applicationTypes.data) {\r\n key = 'changeOfData';\r\n }\r\n\r\n dispatch(setApplicationTypeId(applicationTypes.data[key][0].applicationId));\r\n if (!newApplicationData.type.id) {\r\n dispatch(\r\n setApplicationData({\r\n ...newApplicationData,\r\n type: {\r\n theme: applicationTypes.data[key][0].theme,\r\n id: applicationTypes.data[key][0].applicationId,\r\n name: applicationTypes.data[key][0].type,\r\n },\r\n })\r\n );\r\n currentStep === 1 && dispatch(setCurrentStep(3));\r\n }\r\n dispatch(\r\n setLoadingStatus({\r\n fieldName: 'loading',\r\n fieldValue: false,\r\n })\r\n );\r\n\r\n //clear history state after this exceptional situation (TODO: review this useEffect)\r\n history.replace();\r\n }\r\n }\r\n }, [\r\n registrations,\r\n newApplicationData.registrationId,\r\n filterParams,\r\n applicationTypes,\r\n applicationTypes.filters.length,\r\n ]);\r\n\r\n useEffect(() => {\r\n dispatch(onMount());\r\n return () => {\r\n dispatch(onUnmount());\r\n };\r\n }, [dispatch, onMount, onUnmount, user.impersonate]);\r\n\r\n useEffect(() => {\r\n if (currentStep === 3 && newApplicationData.form === null) {\r\n dispatch(getApplicationForm());\r\n }\r\n }, [dispatch, currentStep]);\r\n\r\n useEffect(() => {\r\n if (newApplicationReset) {\r\n dispatch(\r\n setLoadingStatus({\r\n fieldName: 'loading',\r\n fieldValue: false,\r\n })\r\n );\r\n setNewApplicationReset(false);\r\n }\r\n }, [dispatch, newApplicationReset]);\r\n\r\n const onSubmitStatement = (data) => {\r\n dispatch(\r\n setLoadingStatus({\r\n fieldName: 'loading',\r\n fieldValue: true,\r\n })\r\n );\r\n dispatch(\r\n setApplicationData({\r\n ...newApplicationData,\r\n formValues: getFormValues(newApplicationData.form, data),\r\n })\r\n );\r\n dispatch(setCurrentStep(currentStep + 1));\r\n };\r\n\r\n const getFormSchema = useMemo(() => {\r\n if (newApplicationData.form) {\r\n const {\r\n expoFields,\r\n observations,\r\n mandatoryDocuments,\r\n additionalDocuments,\r\n } = newApplicationData.form;\r\n\r\n return [\r\n ...(expoFields.values && expoFields.values.length ? expoFields.values : []),\r\n ...(observations.values && observations.values.length ? observations.values : []),\r\n ...(mandatoryDocuments.values && mandatoryDocuments.values.length\r\n ? mandatoryDocuments.values\r\n : []),\r\n ...(additionalDocuments.values && additionalDocuments.values.length\r\n ? additionalDocuments.values\r\n : []),\r\n ];\r\n } else {\r\n return [];\r\n }\r\n }, [newApplicationData.form]);\r\n\r\n const getNextButtonDisabledState = (step) => {\r\n if (step === 1 && newApplicationData.registrationId) {\r\n return false;\r\n } else if (step === 2 && newApplicationData.type.id) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n };\r\n\r\n return (\r\n }\r\n mainContent={\r\n <>\r\n \r\n {steps.map((step, index) => {\r\n if (index + 1 < currentStep) {\r\n return (\r\n \r\n \r\n {step}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n } else if (index + 1 === currentStep) {\r\n return (\r\n \r\n \r\n {step}\r\n \r\n \r\n );\r\n } else {\r\n //if (index + 1 > currentStep) {\r\n return (\r\n \r\n \r\n {step}\r\n \r\n \r\n );\r\n }\r\n })}\r\n \r\n\r\n \r\n {({ handleSubmit, reset }, formElements, formElementsData) => {\r\n return (\r\n <>\r\n {currentStep === 1 && }\r\n {currentStep === 2 && }\r\n {currentStep === 3 && (\r\n \r\n )}\r\n {currentStep === 4 && }\r\n \r\n {currentStep !== 1 && (\r\n {\r\n reset(); // reset form\r\n setLoadingFile({});\r\n dispatch(resetPage());\r\n setNewApplicationReset(true);\r\n }}\r\n >\r\n {t('applications.requestCancelButton')}\r\n \r\n )}\r\n \r\n {currentStep !== 1 && (\r\n {\r\n if (currentStep === 2) {\r\n dispatch(\r\n setErrorStatus({\r\n fieldName: 'errLoadingApplicationList',\r\n fieldValue: false,\r\n })\r\n );\r\n reset(); // reset form\r\n setLoadingFile({});\r\n dispatch(resetApplicationSelection());\r\n }\r\n // solves some form manager validation errors when going back and forth\r\n // selecting diferent application types\r\n else if (currentStep === 3) {\r\n dispatch(\r\n setErrorStatus({\r\n fieldName: 'errLoadingApplicationForm',\r\n fieldValue: false,\r\n })\r\n );\r\n setLoadingFile({});\r\n reset(); // reset form\r\n dispatch(resetStepThree());\r\n }\r\n\r\n dispatch(setCurrentStep(currentStep - 1));\r\n }}\r\n >\r\n {t('applications.requestPreviousButton')}\r\n \r\n )}\r\n {(currentStep === 1 || currentStep === 2) && (\r\n }\r\n onClick={() => {\r\n //dispatch(setLoading(true));\r\n dispatch(setCurrentStep(currentStep + 1));\r\n }}\r\n disabled={\r\n (currentStep === 2 && newApplicationTabLoading) ||\r\n newApplicationErrorStatus.errLoadingApplicationList ||\r\n getNextButtonDisabledState(currentStep)\r\n }\r\n >\r\n {t('applications.requestNextButton')}\r\n \r\n )}\r\n {currentStep === 3 && (\r\n loadingFile[itemKey] === true\r\n )\r\n }\r\n color={theme.colors.primary}\r\n rightIcon={}\r\n onClick={handleSubmit(onSubmitStatement)}\r\n >\r\n {t('applications.requestNextButton')}\r\n \r\n )}\r\n {currentStep === 4 && (\r\n }\r\n onClick={() => {\r\n dispatch(submitApplication());\r\n }}\r\n >\r\n {t('applications.requestSubmitButton')}\r\n \r\n )}\r\n \r\n \r\n \r\n );\r\n }}\r\n \r\n \r\n }\r\n />\r\n );\r\n};\r\n\r\nexport default NewApplication;\r\n\r\nconst ApplicationStepsWrapper = styled.div`\r\n display: flex;\r\n margin-bottom: 32px;\r\n overflow-y: hidden;\r\n overflow-x: auto;\r\n`;\r\n\r\nconst ApplicationStep = styled.div<{\r\n backgroundColor: string;\r\n border?: string;\r\n borderStyle?: string;\r\n}>`\r\n height: 81px;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n flex: 1;\r\n padding: 0 16px;\r\n background-color: ${({ backgroundColor }) => backgroundColor};\r\n ${({ border, borderStyle }) => {\r\n if (border === 'all') {\r\n return `border: ${borderStyle};`;\r\n } else if (border === 'top') {\r\n return `border-top: ${borderStyle};`;\r\n }\r\n }}\r\n\r\n &:not(:last-child) {\r\n margin-right: 8px;\r\n }\r\n`;\r\n\r\nconst CheckTickWrapper = styled.div`\r\n width: 16px;\r\n height: 16px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n background-color: ${({ theme }) => theme.colors.white};\r\n border-radius: 50%;\r\n\r\n &&& {\r\n min-width: 16px;\r\n height: 16px;\r\n }\r\n\r\n svg {\r\n font-size: 10px;\r\n color: ${({ theme }) => theme.colors.primary};\r\n }\r\n`;\r\n\r\nconst NavigationButtonsWrapper = styled.div<{ currentStep: number }>`\r\n display: flex;\r\n justify-content: ${({ currentStep }) => (currentStep === 1 ? `flex-end` : `space-between`)};\r\n margin-top: 32px;\r\n`;\r\n\r\nconst BackwardForwardButtonsWrapper = styled.div`\r\n display: flex;\r\n\r\n > button:last-child {\r\n margin-left: 16px;\r\n }\r\n`;\r\n\r\nconst TabText = styled(Text)`\r\n line-height: 1.2;\r\n`;\r\n","/**\r\n * Registration Details scene logic selectors\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getUser = (state: RootState) => state.App.user;\r\nexport const getRegistration = (state: RootState) => state.StudentRegistrationDropdown.registration;\r\nexport const getLoading = (state: RootState) => state.RegistrationDetails.loading;\r\nexport const getRegistrationGeneralInfo = (state: RootState) =>\r\n state.RegistrationDetails.registrationGeneralInfo;\r\nexport const getEligibility = (state: RootState) => state.RegistrationDetails.eligibility;\r\nexport const getHistory = (state: RootState) => state.RegistrationDetails.history;\r\nexport const getScholarship = (state: RootState) => state.RegistrationDetails.scholarship;\r\nexport const getRegDetailsSlice = (state: RootState) => state.RegistrationDetails;\r\n","/**\r\n * EligibilityGraph container\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport React, { useContext } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { t } from 'app';\r\n\r\nimport { Text } from '@paco_ua/pacoui';\r\n\r\ninterface IEligibilityGraph {\r\n data: {\r\n eligibilityState: number;\r\n signUpsAmount: number;\r\n ectsEarned: number;\r\n minimumECTS: number;\r\n maximumECTS: number;\r\n };\r\n}\r\n\r\nconst EligibilityGraph: React.FC = ({ data }) => {\r\n const theme = useContext(ThemeContext);\r\n\r\n const ectsScale = [60, 120, 180, 240, 300, 360];\r\n const signUpsScale = [3, 4, 5, 6, 7, 8];\r\n const signupsValue =\r\n ectsScale[signUpsScale.indexOf(data.signUpsAmount)] ??\r\n (data.signUpsAmount === 2 ? 30 : data.signUpsAmount ? 15 : 1);\r\n\r\n const getEligibilityColor = (status: number) => {\r\n if (status === 100) {\r\n return theme.colors.dangerRed;\r\n } else if (status === 1 || status === 2) {\r\n return theme.colors.successGreen;\r\n } else if (status === 25 || status === 50) {\r\n return theme.colors.decisionYellow;\r\n } else if (status === -1) {\r\n return theme.colors.grey;\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n {ectsScale.map((value, index) => {\r\n if (index === 0) {\r\n return (\r\n \r\n \r\n {t('registrations.detailsEligibilityGraphAccumulatedECTS')}\r\n \r\n \r\n {ectsScale[index]}\r\n \r\n \r\n );\r\n } else {\r\n return (\r\n \r\n \r\n {index !== 4 ? ectsScale[index] : ''}\r\n \r\n \r\n );\r\n }\r\n })}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {signUpsScale.map((value, index) => {\r\n if (index === 0) {\r\n return (\r\n \r\n \r\n {t('registrations.detailsEligibilityGraphSignupsAmount')}\r\n \r\n \r\n {signUpsScale[index]}\r\n \r\n \r\n );\r\n } else {\r\n return (\r\n \r\n \r\n {index !== 4 ? signUpsScale[index] : ''}\r\n \r\n \r\n );\r\n }\r\n })}\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n {t('registrations.detailsEligibilityGraphMinimumECTS')}\r\n \r\n \r\n \r\n \r\n \r\n {t('registrations.detailsEligibilityGraphMaximumECTS')}\r\n \r\n \r\n \r\n \r\n \r\n {t('registrations.detailsEligibilityGraphSignups')}\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n {t('registrations.detailsEligibilityStatusGreen')}\r\n \r\n \r\n \r\n \r\n \r\n {t('registrations.detailsEligibilityStatusYellow')}\r\n \r\n \r\n \r\n \r\n \r\n {t('registrations.detailsEligibilityStatusRed')}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default EligibilityGraph;\r\n\r\nconst Wrapper = styled.div``;\r\n\r\nconst AxisCaption = styled.div<{ lower?: boolean }>`\r\n display: flex;\r\n\r\n > div {\r\n width: calc(100% / 6);\r\n }\r\n\r\n > div:first-child {\r\n display: flex;\r\n justify-content: space-between;\r\n }\r\n\r\n > div:not(:first-child) {\r\n display: flex;\r\n justify-content: flex-end;\r\n }\r\n\r\n > div:not(:last-child) {\r\n > div:last-child {\r\n margin-right: ${({ lower }) => (lower ? `-2px` : `-7px`)};\r\n }\r\n }\r\n`;\r\n\r\nconst ECTSBar = styled.div`\r\n width: 100%;\r\n height: 55px;\r\n position: relative;\r\n display: flex;\r\n background-color: ${({ theme }) => theme.colors.lightGrey};\r\n`;\r\n\r\nconst ECTSApproved = styled.div<{ width: number; background?: string }>`\r\n width: ${({ width }) => width}%;\r\n height: 100%;\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n background-color: ${({ background }) => (background ? background : `transparent`)};\r\n opacity: 0.7;\r\n`;\r\n\r\nconst ECTSMinimum = styled.div<{ width: number }>`\r\n width: ${({ width }) => width}%;\r\n height: 100%;\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n border-right: 2px solid ${({ theme }) => theme.colors.successGreen};\r\n`;\r\n\r\nconst ECTSMaximum = styled.div<{ width: number }>`\r\n width: ${({ width }) => width}%;\r\n height: 100%;\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n border-right: 2px solid ${({ theme }) => theme.colors.primary};\r\n`;\r\n\r\nconst SignUpsBar = styled.div`\r\n width: 100%;\r\n height: 6px;\r\n margin-top: 1px;\r\n background-color: ${({ theme }) => theme.colors.lightGrey};\r\n`;\r\n\r\nconst SignUpsAmount = styled.div<{ width: number }>`\r\n width: ${({ width }) => width}%;\r\n height: 100%;\r\n background-color: ${({ theme }) => theme.colors.primary};\r\n`;\r\n\r\nconst ECTSValue = styled.div<{ index: number }>``;\r\n\r\nconst SignUpsValue = styled.div``;\r\n\r\nconst GraphCaptions = styled.div`\r\n width: 75%;\r\n display: flex;\r\n margin-top: 24px;\r\n`;\r\n\r\nconst LeftCaptions = styled.div`\r\n margin-right: 50px;\r\n\r\n > div:not(:first-child) {\r\n margin-top: 8px;\r\n }\r\n`;\r\n\r\nconst RightCaptions = styled.div`\r\n > div:not(:first-child) {\r\n margin-top: 8px;\r\n }\r\n`;\r\n\r\nconst CaptionElementWrapper = styled.div`\r\n display: flex;\r\n align-items: center;\r\n\r\n > div:first-child {\r\n margin-right: 8px;\r\n }\r\n`;\r\n\r\nconst CaptionElementColor = styled.div<{ background?: string; divider?: string }>`\r\n width: 40px;\r\n height: 24px;\r\n display: flex;\r\n justify-content: center;\r\n background: ${({ theme, background }) => (background ? background : theme.colors.lightGrey)};\r\n\r\n &:after {\r\n content: '';\r\n width: 2px;\r\n height: 100%;\r\n display: ${({ divider }) => (divider ? 'block' : 'none')};\r\n background-color: ${({ divider }) => divider};\r\n }\r\n`;\r\n\r\nconst CaptionBottomText = styled(Text)`\r\n margin-top: 4px;\r\n`;\r\n\r\nconst CaptionTopText = styled(Text)`\r\n margin-bottom: 4px;\r\n`;\r\n\r\nconst NumText = styled(Text)`\r\n margin-top: 4px;\r\n`;\r\n","/**\r\n * Registrations scene utils\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { t } from 'app';\r\n\r\nexport const getEligibilityState = (status: number) => {\r\n if (status === 100) {\r\n return t('registrations.detailsEligibilityStatusRed');\r\n } else if (status === 1 || status === 2) {\r\n return t('registrations.detailsEligibilityStatusGreen');\r\n } else if (status === 25 || status === 50) {\r\n return t('registrations.detailsEligibilityStatusYellow');\r\n } else if (status === -1) {\r\n return t('registrations.detailsEligibilityStatusGrey');\r\n }\r\n};\r\n\r\n/*\r\n 100 -- 'Prescrito'\r\n 50 -- 'Em risco de prescricao (Ano atual)'\r\n 25 -- 'Em risco de prescricao (Ano seguinte)'\r\n 1 -- 'Não Prescrito'\r\n 2 -- 'Não Prescrito'\r\n -1 -- 'N/D' --> não definido\r\n*/\r\n","/**\r\n * RegistrationDetails scene\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport React, { useEffect, useContext } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './logic/selectors';\r\n\r\nimport { Segment, Text, StatusLabel, Table, InfoBox } from '@paco_ua/pacoui';\r\n\r\nimport EligibilityGraph from './containers/EligibilityGraph';\r\n\r\nimport { getEligibilityState } from '../Registrations/utils';\r\n\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faEllipsisH } from '@fortawesome/pro-regular-svg-icons';\r\n\r\n//import config from 'config'\r\n\r\nconst RegistrationDetails = ({ t, i18n }) => {\r\n const { onMount, onUnmount } = actions.RegistrationDetails;\r\n\r\n const dispatch = useDispatch();\r\n\r\n const theme = useContext(ThemeContext);\r\n\r\n const user = useSelector(selectors.getUser);\r\n\r\n useEffect(() => {\r\n dispatch(onMount());\r\n return () => {\r\n dispatch(onUnmount());\r\n };\r\n }, [dispatch, onMount, onUnmount, user.impersonate]);\r\n\r\n const {\r\n loading,\r\n errorStatus,\r\n registrationGeneralInfo,\r\n scholarship,\r\n eligibility,\r\n history,\r\n } = useSelector(selectors.getRegDetailsSlice);\r\n\r\n const eligibilityHistoryTableTitles = [\r\n {\r\n text: t('registrations.detailsEligibilityHistoryEligibility'),\r\n style: {\r\n textAlign: 'center',\r\n fontWeight: 400,\r\n wordBreak: 'keep-all',\r\n wordWrap: 'normal',\r\n },\r\n },\r\n {\r\n text: t('registrations.detailsEligibilityHistoryScholarYear'),\r\n style: { textAlign: 'center', fontWeight: 400, wordBreak: 'keep-all', wordWrap: 'normal' },\r\n },\r\n {\r\n text: t('registrations.detailsEligibilityHistoryAccumulatedECTS'),\r\n style: { textAlign: 'center', fontWeight: 400, wordBreak: 'keep-all', wordWrap: 'normal' },\r\n },\r\n {\r\n text: t('registrations.detailsEligibilityHistoryECTSEarned'),\r\n style: { textAlign: 'center', fontWeight: 400, wordBreak: 'keep-all', wordWrap: 'normal' },\r\n },\r\n {\r\n text: t('registrations.detailsEligibilityHistoryAccumulatedSignups'),\r\n style: { textAlign: 'center', fontWeight: 400, wordBreak: 'keep-all', wordWrap: 'normal' },\r\n },\r\n {\r\n text: t('registrations.detailsEligibilityHistoryScholarYearCoef'),\r\n style: { textAlign: 'center', fontWeight: 400, wordBreak: 'keep-all', wordWrap: 'normal' },\r\n },\r\n {\r\n text: t('registrations.detailsEligibilityHistoryCoefType'),\r\n style: { textAlign: 'center', fontWeight: 400, wordBreak: 'keep-all', wordWrap: 'normal' },\r\n },\r\n {\r\n text: t('registrations.detailsEligibilityHistoryECTSToRelease'),\r\n style: { textAlign: 'center', fontWeight: 400, wordBreak: 'keep-all', wordWrap: 'normal' },\r\n },\r\n {\r\n text: t('registrations.detailsEligibilityHistoryECTSEnrolled'),\r\n style: { textAlign: 'center', fontWeight: 400, wordBreak: 'keep-all', wordWrap: 'normal' },\r\n },\r\n ];\r\n\r\n const getEligibilityColor = (status: number) => {\r\n if (status === 100) {\r\n return theme.colors.dangerRed;\r\n } else if (status === 1 || status === 2) {\r\n return theme.colors.successGreen;\r\n } else if (status === 25 || status === 50) {\r\n return theme.colors.decisionYellow;\r\n } else if (status === -1) {\r\n return theme.colors.grey;\r\n }\r\n };\r\n\r\n const getWidth = (field) => {\r\n if (field === 'eligibilityState' || field === 'academicYear' || field === 'typeAcademicYear') {\r\n return { width: 2 };\r\n }\r\n\r\n return null;\r\n };\r\n\r\n const eligibilityHistoryTableStructure = {\r\n header: {\r\n type: 'columnTitle',\r\n titles: eligibilityHistoryTableTitles,\r\n },\r\n rows: history.map((item) => {\r\n return {\r\n rowProps: { color: theme.colors.white },\r\n cells: Object.keys(item).map((field, index) => {\r\n return {\r\n content:\r\n field === 'eligibilityState' ? (\r\n item[field] ? (\r\n \r\n \r\n \r\n ) : (\r\n \r\n )\r\n ) : item[field] !== null && item[field] !== undefined ? (\r\n \r\n {item[field]}\r\n \r\n ) : (\r\n \r\n ),\r\n cellProps: {\r\n ...getWidth(field),\r\n textAlign: 'center',\r\n },\r\n };\r\n }),\r\n };\r\n }),\r\n };\r\n\r\n const noData = () => {\r\n return (\r\n \r\n \r\n {t('registrations.noData')}\r\n \r\n \r\n );\r\n };\r\n\r\n return (\r\n }\r\n mainContent={\r\n \r\n \r\n {!registrationGeneralInfo && noData()}\r\n {registrationGeneralInfo && (\r\n \r\n \r\n {`${registrationGeneralInfo.courseCode} - ${registrationGeneralInfo.courseName}`}\r\n \r\n \r\n \r\n \r\n {t('registrations.detailsRegistrationDate')}\r\n \r\n \r\n {registrationGeneralInfo.registrationDate}\r\n \r\n \r\n \r\n \r\n {t('registrations.detailsScholarYear')}\r\n \r\n \r\n {registrationGeneralInfo.registrationAcademicYear}\r\n \r\n \r\n \r\n \r\n {t('registrations.detailsAccessRegime')}\r\n \r\n \r\n {registrationGeneralInfo.accessScheme}\r\n \r\n \r\n {registrationGeneralInfo.registrationStatus === 'ACTIVO' && (\r\n \r\n \r\n {t('registrations.detailsCurricularYear')}\r\n \r\n\r\n \r\n {registrationGeneralInfo.academicYear}\r\n \r\n \r\n )}\r\n\r\n \r\n \r\n {t('registrations.detailsStudentTypology')}\r\n \r\n \r\n {registrationGeneralInfo.typology}\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n\r\n \r\n {scholarship && (\r\n \r\n \r\n {t('registrations.detailsScholarship')}\r\n \r\n \r\n \r\n \r\n {t('registrations.detailsScholarshipStatus')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {t('registrations.detailsScholarshipCategory')}\r\n \r\n \r\n {scholarship.scholarshipCategory}\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n {eligibility && history.length && (\r\n \r\n \r\n {t('registrations.detailsEligibility')}\r\n \r\n \r\n \r\n \r\n {t('registrations.detailsEligibilityInfo')}\r\n \r\n \r\n \r\n \r\n {t('registrations.detailsEligibilityInfoECTSToDo')}\r\n \r\n \r\n {eligibility.totalEctsToDo}\r\n \r\n \r\n \r\n \r\n {t('registrations.detailsEligibilityInfoECTSEarned')}\r\n \r\n \r\n {eligibility.totalEctsEarned}\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n {`${t('registrations.detailsEligibilityCurrentYear', {\r\n textOnly: true,\r\n })} ${\r\n registrationGeneralInfo && registrationGeneralInfo.academicYear\r\n ? registrationGeneralInfo.academicYear\r\n : ''\r\n }`}\r\n \r\n \r\n \r\n \r\n {t('registrations.detailsEligibilityCurrentYearECTSToDo')}\r\n \r\n \r\n {eligibility.currentYearEctsToDo}\r\n \r\n \r\n \r\n \r\n {t('registrations.detailsEligibilityCurrentYearECTSEarned')}\r\n \r\n \r\n {eligibility.currentYearEctsEarned}\r\n \r\n \r\n \r\n \r\n {t('registrations.detailsEligibilityCurrentYearEligibility')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n {eligibility && (\r\n \r\n \r\n \r\n )}\r\n\r\n \r\n \r\n {t('registrations.detailsEligibilityHistory')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n {eligibility && history.length && (\r\n \r\n \r\n {t('registrations.detailsInfoEligibilityBody')}\r\n \r\n \r\n )}\r\n \r\n \r\n }\r\n />\r\n );\r\n};\r\n\r\nexport default RegistrationDetails;\r\n\r\nconst GridWrapper = styled.div`\r\n > div:not(:last-child) {\r\n margin-bottom: 32px;\r\n }\r\n`;\r\n\r\nconst GridInnerWrapper = styled.div``;\r\n\r\nconst StatusLabelWrapper = styled.div`\r\n display: flex;\r\n justify-content: center;\r\n`;\r\n\r\nconst RegistrationGeneralInfo = styled.div`\r\n display: flex;\r\n margin-top: 28px;\r\n\r\n > div:not(:first-child) {\r\n margin-left: 40px;\r\n }\r\n\r\n @media (max-width: 992px) {\r\n flex-direction: column;\r\n\r\n > div:not(:first-child) {\r\n margin: 40px 0 0 0;\r\n }\r\n }\r\n`;\r\n\r\nconst RegistrationGeneralInfoBlock = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n div:first-child {\r\n margin-bottom: 12px;\r\n }\r\n`;\r\n\r\nconst Scholarship = styled.div`\r\n display: flex;\r\n margin-top: 28px;\r\n\r\n > div:not(:first-child) {\r\n margin-left: 40px;\r\n }\r\n`;\r\n\r\nconst ScholarshipBlock = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst ScholarshipLabel = styled.div`\r\n margin-top: 12px;\r\n`;\r\n\r\nconst Eligibility = styled.div`\r\n display: flex;\r\n margin-top: 28px;\r\n overflow: auto;\r\n\r\n > div {\r\n flex: 1;\r\n }\r\n\r\n > div:not(:first-child) {\r\n margin-left: 40px;\r\n }\r\n\r\n @media (max-width: 992px) {\r\n flex-direction: column;\r\n\r\n > div:not(:first-child) {\r\n margin: 40px 0 0 0;\r\n }\r\n }\r\n`;\r\n\r\nconst EligibilityGeneralInfo = styled.div`\r\n display: flex;\r\n margin-top: 26px;\r\n\r\n > div:not(:first-child) {\r\n margin-left: 40px;\r\n }\r\n`;\r\n\r\nconst EligibilityGeneralInfoECTSToDo = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst EligibilityGeneralInfoECTSEarned = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst EligibilityCurrentYear = styled.div`\r\n display: flex;\r\n margin-top: 28px;\r\n\r\n > div:not(:first-child) {\r\n margin-left: 40px;\r\n }\r\n`;\r\n\r\nconst EligibilityCurrentYearECTSToDo = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n white-space: nowrap;\r\n`;\r\n\r\nconst EligibilityCurrentYearECTSEarned = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n white-space: nowrap;\r\n`;\r\n\r\nconst EligibilityState = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst EligibilityStateLabel = styled.div`\r\n margin-top: 14px;\r\n`;\r\n\r\nconst EligibilityGraphWrapper = styled.div`\r\n margin: 28px 0 48px 0;\r\n`;\r\n\r\nconst EligibilityHistory = styled.div``;\r\n\r\nconst EligibilityHistoryTableWrapper = styled.div`\r\n width: 100%;\r\n margin-top: 28px;\r\n overflow: auto;\r\n\r\n &&& th {\r\n padding-top: 0px !important;\r\n padding-bottom: 0px !important;\r\n height: 61px;\r\n }\r\n\r\n &&& td {\r\n padding-top: 0px !important;\r\n padding-bottom: 0px !important;\r\n height: 76px;\r\n }\r\n`;\r\n\r\nconst DetailsWrapper = styled(Text)`\r\n margin-top: 12px;\r\n`;\r\n\r\nconst CategoryText = styled(Text)`\r\n margin-top: 16px;\r\n`;\r\n","/**\r\n * Registration scene selectors\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getUser = (state: RootState) => state.App.user;\r\nexport const getRegistrationId = (state: RootState) =>\r\n state.StudentRegistrationDropdown.registration;\r\nexport const getRegistrationsSlice = (state: RootState) => state.Registrations;\r\n","/**\r\n * Registrations scene\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport React, { useContext, useEffect } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { useSelector, useDispatch } from 'react-redux';\r\nimport * as selectors from './logic/selectors';\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faChevronRight } from '@fortawesome/pro-light-svg-icons';\r\nimport { faEllipsisH } from '@fortawesome/pro-regular-svg-icons';\r\n\r\nimport { Text, Table, StatusLabel } from '@paco_ua/pacoui';\r\n\r\nimport { getEligibilityState } from './utils';\r\n\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\n\r\n//import config from 'config'\r\n\r\nconst Registrations = ({ t }) => {\r\n const theme = useContext(ThemeContext);\r\n\r\n const { navigateTo } = actions.App;\r\n const { onMount, setLoading, onUnmount } = actions.Registrations;\r\n\r\n const dispatch = useDispatch();\r\n\r\n const { loading, errorStatus } = useSelector(selectors.getRegistrationsSlice);\r\n\r\n const user = useSelector(selectors.getUser);\r\n\r\n useEffect(() => {\r\n dispatch(onMount());\r\n return () => {\r\n dispatch(onUnmount());\r\n };\r\n }, [dispatch, onMount, onUnmount, user.impersonate]);\r\n\r\n /*useEffect(() => {\r\n if (user.registrations !== null && user.registrations !== undefined) {\r\n dispatch(setLoading(false));\r\n }\r\n }, [user.registrations]);*/\r\n\r\n const getEligibilityColor = (status: number) => {\r\n if (status === 100) {\r\n return theme.colors.dangerRed;\r\n } else if (status === 1 || status === 2) {\r\n return theme.colors.successGreen;\r\n } else if (status === 25 || status === 50) {\r\n return theme.colors.decisionYellow;\r\n } else if (status === -1) {\r\n return theme.colors.grey;\r\n }\r\n };\r\n\r\n const getTablestructure = () => {\r\n return {\r\n header: {\r\n type: 'columnTitle',\r\n titles: [\r\n {\r\n text: t('registrations.registrationTableTitleCourse', { textOnly: true }),\r\n style: {\r\n fontWeight: 400,\r\n },\r\n },\r\n {\r\n text: t('registrations.registrationTableTitleBranch', { textOnly: true }),\r\n style: {\r\n fontWeight: 400,\r\n },\r\n },\r\n {\r\n text: t('registrations.registrationTableTitleYear', { textOnly: true }),\r\n style: {\r\n fontWeight: 400,\r\n textAlign: 'center',\r\n },\r\n },\r\n {\r\n text: t('registrations.registrationTableRegistrationState', { textOnly: true }),\r\n style: {\r\n fontWeight: 400,\r\n textAlign: 'center',\r\n },\r\n },\r\n {\r\n text: t('registrations.registrationTablePrescription', { textOnly: true }),\r\n style: {\r\n fontWeight: 400,\r\n textAlign: 'center',\r\n },\r\n },\r\n { text: '' },\r\n ],\r\n },\r\n rows: !user.registrations\r\n ? []\r\n : user.registrations.map((registration) => {\r\n return {\r\n rowProps: {\r\n navigatable: true,\r\n onClick: () =>\r\n dispatch(\r\n navigateTo({\r\n key: 'registrationdetails',\r\n params: { id: registration.registrationId },\r\n })\r\n ),\r\n color: theme.colors.white,\r\n },\r\n cells: [\r\n {\r\n content: (\r\n \r\n {`${registration.courseCode}-${registration.courseName}`}\r\n \r\n ),\r\n cellProps: {\r\n width: 7,\r\n singleLine: false,\r\n style: {\r\n whiteSpace: 'break-space',\r\n minWidth: '100px',\r\n },\r\n },\r\n },\r\n {\r\n content: (\r\n \r\n {registration.branchName}\r\n \r\n ),\r\n cellProps: {\r\n width: 3,\r\n style: {\r\n whiteSpace: 'break-space',\r\n minWidth: '100px',\r\n },\r\n },\r\n },\r\n {\r\n content: registration.academicYear ? (\r\n \r\n {registration.academicYear}\r\n \r\n ) : (\r\n \r\n ),\r\n cellProps: { width: 2, singleLine: true, textAlign: 'center' },\r\n },\r\n {\r\n content: (\r\n \r\n {`${t('enrollmentState.' + registration.registrationState, {\r\n textOnly: true,\r\n })}`}\r\n \r\n ),\r\n cellProps: {\r\n width: 1,\r\n singleLine: true,\r\n textAlign: 'center',\r\n },\r\n },\r\n {\r\n content: registration.eligibilityState ? (\r\n \r\n \r\n \r\n ) : (\r\n \r\n ),\r\n cellProps: {\r\n width: 1,\r\n singleLine: true,\r\n textAlign: 'center',\r\n },\r\n },\r\n {\r\n content: ,\r\n cellProps: {\r\n width: 1,\r\n singleLine: true,\r\n },\r\n },\r\n ],\r\n collapsableRows: [],\r\n };\r\n }),\r\n };\r\n };\r\n return (\r\n }\r\n subHeader={\r\n \r\n {t('registrations.description', { textOnly: true })} \r\n \r\n Serviços de Gestão Académica\r\n \r\n \r\n }\r\n mainContent={\r\n <>\r\n \r\n
\r\n \r\n \r\n }\r\n />\r\n );\r\n};\r\n\r\nexport default Registrations;\r\n\r\nconst TableWrapper = styled.div`\r\n width: 100%;\r\n overflow: auto;\r\n\r\n &&& th {\r\n padding-top: 0px !important;\r\n padding-bottom: 0px !important;\r\n height: 61px;\r\n }\r\n\r\n &&& td {\r\n padding-top: 0px !important;\r\n padding-bottom: 0px !important;\r\n height: 76px;\r\n }\r\n`;\r\n\r\nconst StatusLabelWrapper = styled.div`\r\n width: 100%;\r\n display: flex;\r\n justify-content: center;\r\n & div {\r\n :hover {\r\n cursor: pointer;\r\n }\r\n }\r\n`;\r\n","export enum SeriationStatus {\r\n ASSIGNED = 'assigned',\r\n AUTOMATIC = 'automatic',\r\n NOTASSIGNED = 'notAssigned',\r\n NOTASSIGNED_MANDATORY = 'notAssignedMandatory',\r\n PROBABLY_ASSIGNED = 'probably_assigned',\r\n PROBABLY_NOTASSIGNED = 'probably_notAssigned',\r\n}\r\n","/**\r\n * SeriationHistory scene logic selectors\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getRegistration = (state: RootState) => state.StudentRegistrationDropdown.registration;\r\nexport const getSeriationHistorySlice = (state: RootState) => state.SeriationHistory;\r\n","/**\r\n * SeriationHistory scene\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport React, { useEffect, useContext, useMemo } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\nimport numeral from 'numeral';\r\nimport moment from 'moment';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\n\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './logic/selectors';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faHistory, faQuestionCircle, faInfoCircle } from '@fortawesome/pro-light-svg-icons';\r\n\r\nimport { faSmile, faFrown } from '@fortawesome/pro-regular-svg-icons';\r\n\r\nimport StudentRegistrationDropdown from 'shared/containers/StudentRegistrationDropdown';\r\n\r\nimport {\r\n Dropdown,\r\n Table,\r\n NoDataMessage,\r\n Loading,\r\n Text,\r\n StatusLabel,\r\n Button,\r\n} from '@paco_ua/pacoui';\r\n\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\n\r\nimport { SeriationStatus } from './types';\r\n\r\nimport { getCurrentRoute } from 'utils';\r\n\r\n//import config from 'config'\r\n\r\nconst SeriationHistory = ({ t }) => {\r\n const dispatch = useDispatch();\r\n const {\r\n onMount,\r\n onUnmount,\r\n getSeriationHistoryResults,\r\n setCurrentSelectedPhase,\r\n } = actions.SeriationHistory;\r\n\r\n const registration = useSelector(selectors.getRegistration);\r\n\r\n const {\r\n seriationHistoryResults,\r\n currentDetails,\r\n currentSelectedPhase,\r\n phaseFilterList,\r\n loading,\r\n invalidSchedule,\r\n finalSeriation,\r\n seriationId,\r\n } = useSelector(selectors.getSeriationHistorySlice);\r\n\r\n const theme = useContext(ThemeContext);\r\n const { navigateTo } = actions.App;\r\n\r\n const isProvisory =\r\n getCurrentRoute().route.key === 'provisoryseriationhistory' ||\r\n getCurrentRoute().route.key === 'provisoryscheduleseriationhistory';\r\n\r\n useEffect(() => {\r\n dispatch(onMount());\r\n return () => {\r\n dispatch(onUnmount());\r\n };\r\n }, [dispatch, onMount]);\r\n\r\n useEffect(() => {\r\n if (registration !== null) {\r\n registration && dispatch(getSeriationHistoryResults({ registrationId: registration }));\r\n }\r\n }, [registration]);\r\n\r\n const getCurrentHeader = () => {\r\n if (isProvisory) {\r\n let currentRoute = getCurrentRoute().route.key;\r\n\r\n if (currentRoute === 'provisoryseriationhistory') {\r\n let phasename = getCurrentRoute().params.id;\r\n return (\r\n \r\n );\r\n } else if (currentRoute === 'provisoryscheduleseriationhistory') {\r\n return
;\r\n }\r\n } else {\r\n return (\r\n <>\r\n \r\n  \r\n {!!phaseFilterList.length && (\r\n \r\n ({\r\n key: `phase_existing_${key}`,\r\n text: `${t('sgh.phase', { textOnly: true })} ${phase}`,\r\n value: phase,\r\n }))}\r\n value={currentSelectedPhase || ''}\r\n onChange={(e, { value }) => {\r\n if (registration) {\r\n dispatch(setCurrentSelectedPhase(value));\r\n dispatch(\r\n getSeriationHistoryResults({ registrationId: registration, phase: value })\r\n );\r\n }\r\n }}\r\n />\r\n \r\n )}\r\n \r\n );\r\n }\r\n };\r\n\r\n //TODO review this because it simplifies current struture\r\n /*const getScheduleStateLabel = (placed: string, tableState: string | null) => {\r\n if (!tableState) {\r\n switch (placed) {\r\n case SeriationStatus.AUTOMATIC:\r\n return (\r\n \r\n );\r\n case SeriationStatus.ASSIGNED:\r\n return (\r\n \r\n );\r\n case SeriationStatus.PROBABLY_ASSIGNED:\r\n return (\r\n \r\n );\r\n case SeriationStatus.PROBABLY_NOTASSIGNED:\r\n return (\r\n \r\n );\r\n case SeriationStatus.NOTASSIGNED:\r\n case SeriationStatus.NOTASSIGNED_MANDATORY:\r\n return (\r\n \r\n );\r\n }\r\n } else {\r\n switch (tableState) {\r\n case SeriationStatus.PROBABLY_ASSIGNED:\r\n return (\r\n \r\n );\r\n case SeriationStatus.PROBABLY_NOTASSIGNED:\r\n return (\r\n \r\n );\r\n case SeriationStatus.ASSIGNED:\r\n case SeriationStatus.AUTOMATIC:\r\n return (\r\n \r\n );\r\n case SeriationStatus.NOTASSIGNED:\r\n case SeriationStatus.NOTASSIGNED_MANDATORY:\r\n return (\r\n \r\n );\r\n }\r\n }\r\n };*/\r\n\r\n const getScheduleStateLabel = (\r\n placed: string,\r\n tableState: string | null,\r\n tableHeader: boolean = false\r\n ) => {\r\n if (placed === SeriationStatus.AUTOMATIC) {\r\n return (\r\n \r\n );\r\n } else if (placed === SeriationStatus.ASSIGNED) {\r\n if (tableHeader) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n if (tableState === SeriationStatus.ASSIGNED || tableState === SeriationStatus.AUTOMATIC) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n );\r\n } else if (placed === SeriationStatus.PROBABLY_ASSIGNED) {\r\n if (tableHeader) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n );\r\n } else if (placed === SeriationStatus.PROBABLY_NOTASSIGNED) {\r\n if (tableHeader) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n );\r\n } else if (\r\n placed === SeriationStatus.NOTASSIGNED ||\r\n placed === SeriationStatus.NOTASSIGNED_MANDATORY\r\n ) {\r\n if (tableHeader) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n );\r\n }\r\n };\r\n\r\n const getScheduleProbabilityIcon = (allocationProbability) => {\r\n if (allocationProbability === 'high') {\r\n return ;\r\n }\r\n if (allocationProbability === 'low') {\r\n return ;\r\n }\r\n };\r\n\r\n const getScheduleProbabilityTitle = (allocationProbability) => {\r\n if (allocationProbability === 'high') {\r\n return t('sgh.legendAllocationProbable');\r\n }\r\n if (allocationProbability === 'low') {\r\n return t('sgh.legendAllocationImprobable');\r\n }\r\n };\r\n\r\n const getTableStructure = (table) => {\r\n return {\r\n header: {\r\n type: 'tableTitle',\r\n title: (\r\n \r\n {isProvisory ? getScheduleProbabilityTitle(table.allocationProb) : table.name}\r\n \r\n ),\r\n icon: isProvisory ? (\r\n getScheduleProbabilityIcon(table.allocationProb)\r\n ) : (\r\n \r\n ),\r\n label: getScheduleStateLabel(table.state, null, true),\r\n labelOffset: 0,\r\n },\r\n rows: table.classes.map((result) => {\r\n return {\r\n cells: [\r\n {\r\n content: result.idUc,\r\n cellProps: { color: theme.colors.primary, width: 1 },\r\n },\r\n { content: `${result.nameUc} - ${result.nameClass}`, cellProps: { width: 13 } },\r\n {\r\n content: (\r\n \r\n {getScheduleStateLabel(result.state, table.state)}\r\n \r\n ),\r\n cellProps: { width: 1 },\r\n },\r\n ],\r\n };\r\n }),\r\n };\r\n };\r\n\r\n const tableStructure = useMemo(() => {\r\n return seriationHistoryResults.map((table, index) => {\r\n return
;\r\n });\r\n }, [currentDetails, seriationHistoryResults]);\r\n\r\n const resultsAvailable = isProvisory\r\n ? currentDetails?.allocationProb && currentDetails?.seriationDate\r\n : seriationHistoryResults.length > 0;\r\n\r\n return (\r\n \r\n {\r\n dispatch(\r\n navigateTo({\r\n key: isProvisory\r\n ? 'provisoryseriationhistorydetails'\r\n : 'seriationhistorydetails',\r\n params: { id: currentSelectedPhase, seriationId: seriationId },\r\n })\r\n );\r\n }}\r\n icon={\r\n {\r\n dispatch(\r\n navigateTo({\r\n key: isProvisory\r\n ? 'provisoryseriationhistorydetails'\r\n : 'seriationhistorydetails',\r\n params: { id: currentSelectedPhase, seriationId: seriationId },\r\n })\r\n );\r\n }}\r\n >\r\n \r\n \r\n }\r\n >\r\n {t(isProvisory ? 'sgh.provisorySeriation' : 'sgh.finalSeriation')}\r\n {currentDetails?.seriationDate &&\r\n ` ${moment(currentDetails.seriationDate).format('DD/MM/YYYY | HH:mm')}`}\r\n \r\n\r\n \r\n {'|'}\r\n \r\n\r\n \r\n \r\n dispatch(\r\n navigateTo({\r\n key: 'schedulesGuide',\r\n hash: 'heading-6',\r\n })\r\n )\r\n }\r\n icon={\r\n {\r\n dispatch(\r\n navigateTo({\r\n key: 'schedulesGuide',\r\n hash: 'heading-6',\r\n })\r\n );\r\n }}\r\n >\r\n \r\n \r\n }\r\n >\r\n {t('sgh.aboutSeriation', { textOnly: true })}\r\n \r\n \r\n \r\n )\r\n }\r\n mainContent={\r\n <>\r\n \r\n {!loading && !resultsAvailable && (\r\n \r\n )}\r\n {!loading && resultsAvailable && {tableStructure}}\r\n \r\n \r\n }\r\n />\r\n );\r\n};\r\n\r\nexport default SeriationHistory;\r\n\r\nconst ContentWrapper = styled.div`\r\n height: 100%;\r\n display: flex;\r\n position: relative;\r\n flex-direction: column;\r\n`;\r\n\r\nconst StateLabelWrapper = styled.div`\r\n display: flex;\r\n justify-content: center;\r\n`;\r\n\r\nconst TablesWrapper = styled.div`\r\n > div:not(:last-child) {\r\n margin-bottom: 52px;\r\n }\r\n`;\r\n\r\nconst DropdownWrapper = styled.div`\r\n width: 170px;\r\n`;\r\n\r\nconst SeriationDateText = styled(Text)`\r\n cursor: pointer;\r\n\r\n :hover {\r\n text-decoration: underline;\r\n }\r\n`;\r\n\r\nconst AboutSimulationWrapper = styled.div`\r\n align-items: center;\r\n display: flex;\r\n :hover {\r\n text-decoration: underline;\r\n }\r\n`;\r\n\r\nconst AboutSimulationBarText = styled(Text)`\r\n line-height: 1;\r\n margin: 0px 10px;\r\n align-items: center;\r\n display: flex;\r\n`;\r\n\r\nconst SeriationDateWrapper = styled.div`\r\n * {\r\n line-height: 1;\r\n }\r\n display: flex;\r\n align-items: center;\r\n`;\r\n\r\nconst AboutSimulationText = styled(Text)`\r\n :hover {\r\n cursor: pointer;\r\n }\r\n`;\r\n","/**\r\n * SeriationHistoryDetails scene\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport React, { useEffect, useContext } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\nimport moment from 'moment';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\n\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './logic/selectors';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faDownload, faHistory } from '@fortawesome/pro-regular-svg-icons';\r\n\r\nimport { Table, Text, Button } from '@paco_ua/pacoui';\r\n\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\n\r\nimport { getCurrentRoute } from 'utils';\r\n\r\n//import config from 'config'\r\n\r\nconst SeriationHistory = ({ t }) => {\r\n const dispatch = useDispatch();\r\n const { onMount, onUnmount, getSeriationHistoryDetails } = actions.SeriationHistoryDetails;\r\n\r\n const registration = useSelector(selectors.getRegistration);\r\n\r\n const { loading, seriationDate, ranking, log } = useSelector(\r\n selectors.getSeriationHistoryDetailsSlice\r\n );\r\n\r\n const theme = useContext(ThemeContext);\r\n\r\n const regimenMap = {\r\n O: 'sgh.regimen_O',\r\n T: 'sgh.regimen_T',\r\n D: 'sgh.regimen_D',\r\n A: 'sgh.regimen_A',\r\n E: 'sgh.regimen_E',\r\n M: 'sgh.regimen_M',\r\n B: 'sgh.regimen_B',\r\n G: 'sgh.regimen_G',\r\n L: 'sgh.regimen_L',\r\n };\r\n\r\n useEffect(() => {\r\n dispatch(onMount());\r\n return () => {\r\n dispatch(onUnmount());\r\n };\r\n }, [dispatch, onMount, onUnmount]);\r\n\r\n useEffect(() => {\r\n if (registration !== null) {\r\n dispatch(getSeriationHistoryDetails());\r\n }\r\n }, [registration]);\r\n\r\n const getTableStructure = () => {\r\n return {\r\n header: {\r\n type: 'tableTitle',\r\n title: (\r\n \r\n {`${t('sgh.studentRanking', { textOnly: true })}: ${ranking.rankingNumber} ${t(\r\n 'sgh.of',\r\n { textOnly: true }\r\n )} ${ranking.rankingTotal}`}\r\n \r\n ),\r\n },\r\n rows: [\r\n {\r\n cells: [\r\n {\r\n content: (\r\n \r\n \r\n {`${t('sgh.consideredInformation', { textOnly: true })} (REUA)`}\r\n \r\n \r\n {ranking.regimen && (\r\n \r\n {`${t('sgh.regimen', { textOnly: true })}: ${t(\r\n regimenMap[ranking.regimen],\r\n {\r\n textOnly: true,\r\n }\r\n )}`}\r\n \r\n )}\r\n \r\n {`${t('sgh.ectsDone', { textOnly: true })}: ${ranking.totalEcts}`}\r\n \r\n \r\n {`${t('sgh.average', { textOnly: true })}: ${ranking.grade} ${t('sgh.score', {\r\n textOnly: true,\r\n })}`}\r\n \r\n \r\n {`${t('sgh.backloggedUcs', { textOnly: true })}: ${ranking.repeatUcs}`}\r\n \r\n \r\n \r\n ),\r\n cellProps: { width: 1 },\r\n },\r\n ],\r\n },\r\n ],\r\n };\r\n };\r\n\r\n const getTableStructureDetails = () => {\r\n return {\r\n header: {\r\n type: 'tableTitle',\r\n title: (\r\n \r\n \r\n \r\n \r\n \r\n {t('sgh.detailedHistory', { textOnly: true })}\r\n \r\n \r\n ),\r\n },\r\n rows: [\r\n {\r\n cells: [\r\n {\r\n content: (\r\n \r\n {log?.map((item, key) => {\r\n let newLine = '';\r\n for (var i = 0; i < item.length; i++) {\r\n if (item.charAt(i) !== ' ') {\r\n break;\r\n }\r\n newLine += '\\u00a0\\u00a0\\u00a0';\r\n }\r\n\r\n newLine += item.trim();\r\n\r\n return (\r\n \r\n {newLine}\r\n \r\n );\r\n })}\r\n \r\n ),\r\n cellProps: { width: 1 },\r\n },\r\n ],\r\n },\r\n ],\r\n };\r\n };\r\n\r\n const downloadTxtFile = () => {\r\n const element = document.createElement('a');\r\n let textToDownload = '';\r\n log?.forEach((item) => {\r\n textToDownload += `${item}\\r\\n`;\r\n });\r\n\r\n const file = new Blob([textToDownload], { type: 'text/plain' });\r\n element.href = URL.createObjectURL(file);\r\n element.download = `${t('sgh.detailedHistoryFileName', { textOnly: true })} - ${`${t(\r\n getSeriationType(),\r\n {\r\n textOnly: true,\r\n }\r\n )} ${moment(seriationDate).format('DD/MM/YYYY | HH:mm')}`}.txt`;\r\n\r\n // Required for this to work in FireFox\r\n document.body.appendChild(element);\r\n element.click();\r\n };\r\n\r\n const getSeriationType = () => {\r\n if (getCurrentRoute().route.key === 'seriationhistorydetails') {\r\n return 'sgh.finalSeriation';\r\n } else if (getCurrentRoute().route.key === 'provisoryseriationhistorydetails') {\r\n return 'sgh.provisorySeriation';\r\n } else {\r\n return '';\r\n }\r\n };\r\n\r\n return (\r\n \r\n }\r\n headerRight={\r\n log && (\r\n }\r\n onClick={() => downloadTxtFile()}\r\n data-testid=\"schedules_edit_button_remove\"\r\n >\r\n {t('generic.download', { textOnly: true })}\r\n \r\n )\r\n }\r\n mainContent={\r\n <>\r\n \r\n
\r\n\r\n \r\n
\r\n \r\n \r\n \r\n }\r\n />\r\n );\r\n};\r\n\r\nexport default SeriationHistory;\r\n\r\nconst ContentWrapper = styled.div`\r\n height: 100%;\r\n display: flex;\r\n position: relative;\r\n flex-direction: column;\r\n`;\r\n\r\nconst SeriationDetailsTableWrapper = styled.div`\r\n margin-top: 52px;\r\n`;\r\n\r\nconst SeriationDetailsHeaderWrapper = styled.div`\r\n display: flex;\r\n align-items: center;\r\n`;\r\n\r\nconst HistoryIconWrapper = styled.div`\r\n margin-right: 10px;\r\n`;\r\n\r\nconst RankingTextWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n > div:first-child {\r\n margin-bottom: 16px;\r\n }\r\n`;\r\n\r\nconst RankingTextSubWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst DetailedHistoryWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n","import React from 'react';\r\nimport styled from 'styled-components';\r\n\r\nimport { Text } from '@paco_ua/pacoui';\r\nimport { Container } from 'semantic-ui-react';\r\n\r\nimport logoUA from 'assets/images/logo512.png';\r\n\r\nconst PageNotFound = ({ theme, t }) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 404\r\n \r\n \r\n {t('offline.pageNotFound')}...\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default PageNotFound;\r\n\r\nconst FormattedText: React.FC<{\r\n size?: string;\r\n color?: string;\r\n weight?: string;\r\n onClick?: () => void;\r\n}> = ({ children, size, onClick, weight, color }) => (\r\n {\r\n onClick && onClick();\r\n }}\r\n >\r\n \r\n {children}\r\n \r\n \r\n);\r\n\r\nconst Wrapper = styled.div`\r\n display: flex;\r\n flex-grow: 1;\r\n flex-direction: column;\r\n align-items: center;\r\n overflow: auto;\r\n padding: 0 26%;\r\n\r\n ${({ theme }) => theme.medias.sm} {\r\n padding: 0 20%;\r\n }\r\n\r\n ${({ theme }) => theme.medias.xs} {\r\n padding: 0 80px;\r\n }\r\n`;\r\n\r\nconst LogoUA = styled.img`\r\n width: 120px;\r\n height: 120px;\r\n margin: 120px 0 80px;\r\n`;\r\n\r\nconst AlignCenter = styled.div`\r\n display: flex;\r\n justify-content: center;\r\n text-align: center;\r\n`;\r\n\r\nconst WrapperText = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n > div:last-child {\r\n margin-bottom: 48px;\r\n }\r\n`;\r\n","import React from 'react';\r\nimport styled from 'styled-components';\r\n\r\nimport { Text } from '@paco_ua/pacoui';\r\nimport { Container } from 'semantic-ui-react';\r\n\r\nimport logoUA from 'assets/images/logo512.png';\r\n\r\nconst PageNoAccess = ({ theme, t }) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 403\r\n \r\n \r\n {t('offline.pageNoAccess')}...\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default PageNoAccess;\r\n\r\nconst FormattedText: React.FC<{\r\n size?: string;\r\n color?: string;\r\n weight?: string;\r\n onClick?: () => void;\r\n}> = ({ children, size, onClick, weight, color }) => (\r\n {\r\n onClick && onClick();\r\n }}\r\n >\r\n \r\n {children}\r\n \r\n \r\n);\r\n\r\nconst Wrapper = styled.div`\r\n display: flex;\r\n flex-grow: 1;\r\n flex-direction: column;\r\n align-items: center;\r\n overflow: auto;\r\n padding: 0 26%;\r\n\r\n ${({ theme }) => theme.medias.sm} {\r\n padding: 0 20%;\r\n }\r\n\r\n ${({ theme }) => theme.medias.xs} {\r\n padding: 0 80px;\r\n }\r\n`;\r\n\r\nconst LogoUA = styled.img`\r\n width: 120px;\r\n height: 120px;\r\n margin: 120px 0 80px;\r\n`;\r\n\r\nconst AlignCenter = styled.div`\r\n display: flex;\r\n justify-content: center;\r\n text-align: center;\r\n`;\r\n\r\nconst WrapperText = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n > div:last-child {\r\n margin-bottom: 48px;\r\n }\r\n`;\r\n","import React from 'react';\r\nimport styled from 'styled-components';\r\n\r\nimport { Text } from '@paco_ua/pacoui';\r\nimport { Container } from 'semantic-ui-react';\r\n\r\nimport logoUA from 'assets/images/logo512.png';\r\nimport { useDispatch } from 'react-redux';\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faArrowLeft } from '@fortawesome/pro-regular-svg-icons';\r\n//import config from 'config'\r\n\r\nconst PageServerError = ({ t, i18n }) => {\r\n const dispatch = useDispatch();\r\n const { navigateBack } = actions.App;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 500\r\n \r\n \r\n {t('offline.pageServerError')}\r\n \r\n \r\n dispatch(navigateBack())}\r\n />\r\n {t('generic.previous')}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst FormattedText: React.FC<{\r\n size?: string;\r\n color?: string;\r\n weight?: string;\r\n onClick?: () => void;\r\n}> = ({ children, size, onClick, weight, color }) => (\r\n {\r\n onClick && onClick();\r\n }}\r\n >\r\n \r\n {children}\r\n \r\n \r\n);\r\n\r\nexport default PageServerError;\r\n\r\nconst Wrapper = styled.div`\r\n display: flex;\r\n flex-grow: 1;\r\n flex-direction: column;\r\n align-items: center;\r\n overflow: auto;\r\n padding: 0 26%;\r\n\r\n ${({ theme }) => theme.medias.sm} {\r\n padding: 0 20%;\r\n }\r\n\r\n ${({ theme }) => theme.medias.xs} {\r\n padding: 0 80px;\r\n }\r\n`;\r\n\r\nconst BackAction = styled.div`\r\n display: flex;\r\n align-items: center;\r\n gap: 1.25rem;\r\n justify-content: center;\r\n padding: 1.25rem;\r\n cursor: pointer;\r\n\r\n &:hover {\r\n text-decoration: underline;\r\n }\r\n`;\r\n\r\nconst LogoUA = styled.img`\r\n width: 120px;\r\n height: 120px;\r\n margin: 120px 0 80px;\r\n`;\r\n\r\nconst AlignCenter = styled.div`\r\n display: flex;\r\n justify-content: center;\r\n text-align: center;\r\n`;\r\n\r\nconst WrapperText = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n > div:last-child {\r\n margin-bottom: 48px;\r\n }\r\n`;\r\n","import React, { useState } from 'react';\r\nimport styled from 'styled-components';\r\n\r\nimport { Text } from '@paco_ua/pacoui';\r\n\r\nimport { useDispatch } from 'react-redux';\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport logoUA from 'assets/images/logo512.png';\r\nimport { Container } from 'semantic-ui-react';\r\n\r\nconst InMaintenance = ({ t }) => {\r\n const [open, setOpen] = useState(0);\r\n const { navigateTo } = actions.App;\r\n const dispatch = useDispatch();\r\n return (\r\n \r\n \r\n \r\n {\r\n if (open >= 5 && open < 10) {\r\n setOpen(open + 1);\r\n }\r\n if (open >= 10) {\r\n localStorage.setItem('openSystem', 'true');\r\n dispatch(navigateTo({ key: 'home' }));\r\n }\r\n }}\r\n src={logoUA}\r\n alt=\"Universidade de Aveiro\"\r\n />\r\n \r\n \r\n \r\n {\r\n if (open < 5) {\r\n setOpen(open + 1);\r\n }\r\n if (open >= 5) {\r\n setOpen(0);\r\n }\r\n }}\r\n >\r\n A escolha de horários via paco2.0 está concluída.\r\n \r\n \r\n \r\n \r\n Estamos a trabalhar num Portal Académico Online mais estável e com mais\r\n funcionalidades.\r\n \r\n \r\n \r\n \r\n {'Até lá continue a aceder a\\u00A0'}\r\n \r\n {t('links.pacoLegacy', { textOnly: true })}\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\nexport default InMaintenance;\r\n\r\nconst FormattedText: React.FC<{\r\n size?: string;\r\n color?: string;\r\n weight?: string;\r\n onClick?: () => void;\r\n}> = ({ children, size, onClick, weight, color }) => (\r\n {\r\n onClick && onClick();\r\n }}\r\n >\r\n \r\n {children}\r\n \r\n \r\n);\r\n\r\nconst Wrapper = styled.div`\r\n background-color: ${({ theme }) => theme.colors.primary};\r\n min-height: 100vh;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n overflow: auto;\r\n padding: 0 26%;\r\n\r\n ${({ theme }) => theme.medias.sm} {\r\n padding: 0 20%;\r\n }\r\n ${({ theme }) => theme.medias.xs} {\r\n padding: 0 80px;\r\n }\r\n`;\r\n\r\nconst LogoUA = styled.img`\r\n width: 120px;\r\n height: 120px;\r\n margin: 120px 0 80px;\r\n filter: brightness(0) invert(1);\r\n`;\r\n\r\nconst AlignCenter = styled.div`\r\n display: flex;\r\n justify-content: center;\r\n text-align: center;\r\n`;\r\n\r\nconst WrapperText = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n > div {\r\n margin-bottom: 48px;\r\n }\r\n`;\r\n\r\nconst PacoLegacyHref = styled.a`\r\n &:hover {\r\n color: ${({ theme }) => theme.colors.white};\r\n text-decoration: underline;\r\n }\r\n`;\r\n","/**\r\n * StudentRegistrationDropdown container\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport React, { useEffect, useContext, useState } from 'react';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './logic/selectors';\r\nimport { t } from 'app';\r\n\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { AnimatedBackground, Dropdown, StatusLabel, Text } from '@paco_ua/pacoui';\r\n\r\n//import config from 'config'\r\n\r\ninterface IStudentRegistrationDropdown {\r\n onChange?: (value: number) => void;\r\n disabled?: boolean;\r\n loading?: boolean | undefined;\r\n loadingProps?: any;\r\n}\r\n\r\nconst StudentRegistrationDropdown: React.FC = ({\r\n disabled,\r\n onChange,\r\n loading,\r\n loadingProps,\r\n}) => {\r\n const registration = useSelector(selectors.getRegistration);\r\n const user = useSelector(selectors.getUser);\r\n const { setRegistration } = actions.StudentRegistrationDropdown;\r\n const [text, setText] = useState('');\r\n\r\n const dispatch = useDispatch();\r\n\r\n useEffect(() => {\r\n if (!registration && user.registrations && user.registrations.length) {\r\n dispatch(setRegistration(user.registrations[0].registrationId));\r\n }\r\n }, [dispatch, user, setRegistration, registration]);\r\n\r\n const theme = useContext(ThemeContext);\r\n\r\n const registrationsOptions = () => {\r\n if (user.registrations) {\r\n return user.registrations.map((registration, index) => {\r\n return {\r\n key: `registration-${index}`,\r\n text: (\r\n \r\n {` ${registration.courseCode} | ${registration.courseName}`}\r\n {`\\n${registration.branchName}\\n`}\r\n {registration.eligibilityState ||\r\n registration.registrationState === 'activo' ? (\r\n \r\n ) : registration.registrationState === 'comdiploma' || registration.registrationState === 'terminado' ? (\r\n \r\n ):(\r\n \r\n )}\r\n {` * ${registration.academicYear}`}\r\n \r\n ),\r\n value: registration.registrationId,\r\n };\r\n });\r\n } else {\r\n return [];\r\n }\r\n };\r\n\r\n const selectedRegistration = () => {\r\n let reg = '';\r\n if (user.registrations) {\r\n user.registrations.forEach((userRegistrations) => {\r\n if (userRegistrations.registrationId === registration) {\r\n reg = userRegistrations.courseName;\r\n }\r\n });\r\n return reg;\r\n } else {\r\n return reg;\r\n }\r\n };\r\n\r\n // Handlers\r\n const handleRegistrationChange = (registrationId) => {\r\n dispatch(setRegistration(registrationId));\r\n onChange && onChange(registrationId);\r\n if (user.registrations) {\r\n user.registrations.forEach((userRegistrations) => {\r\n if (userRegistrations.registrationId === registrationId) {\r\n setText(\r\n `${userRegistrations.courseCode} | ${userRegistrations.courseName} | ${userRegistrations.academicYear}`\r\n );\r\n }\r\n });\r\n }\r\n };\r\n\r\n const ActiveRegistration = (registrationId) => {\r\n dispatch(setRegistration(registrationId));\r\n if (user.registrations) {\r\n const foundUserRegistration = user.registrations.find(\r\n (userRegistration) => userRegistration.registrationId === registrationId\r\n );\r\n\r\n if (foundUserRegistration) {\r\n const { courseCode, courseName, academicYear } = foundUserRegistration;\r\n setText(`${courseCode} | ${courseName} | ${academicYear}`);\r\n return `${courseCode} | ${courseName} | ${academicYear}`;\r\n }\r\n }\r\n // Handle the case when user.registrations is null or no matching registration was found.\r\n // You can return a default value or handle it as needed.\r\n };\r\n\r\n return (\r\n \r\n
\r\n {loading && }\r\n\r\n {!loading && user.registrations && user.registrations.length === 1 && (\r\n \r\n {user.registrations[0].courseName}\r\n \r\n )}\r\n {!loading && user.registrations && user.registrations.length > 1 && (\r\n <>\r\n {disabled && {selectedRegistration()}}\r\n {!disabled && (\r\n {\r\n handleRegistrationChange(value);\r\n }}\r\n />\r\n )}\r\n \r\n )}\r\n
\r\n );\r\n};\r\n\r\nexport default StudentRegistrationDropdown;\r\n\r\nconst Wrapper = styled.div`\r\n &.visible.menu.transition {\r\n margin-top: 15px !important;\r\n }\r\n`;\r\n\r\nconst CostumDrop = styled(Dropdown)`\r\n &.ui.dropdown > .text {\r\n white-space: break-spaces !important;\r\n }\r\n &.ui.dropdown > .text:first-line {\r\n font-size: medium !important;\r\n font-weight: 500;\r\n }\r\n\r\n &.ui.dropdown .menu > * {\r\n white-space: break-spaces !important;\r\n line-height: 1.4285em;\r\n\r\n span {\r\n font-weight: 700;\r\n }\r\n }\r\n\r\n div > div > div {\r\n display: inline;\r\n }\r\n\r\n .visible.menu.transition {\r\n margin-top: 15px !important;\r\n min-width: fit-content;\r\n }\r\n`;\r\n\r\nconst StatusLabelWrapper = styled(Text)`\r\n & div {\r\n :hover {\r\n cursor: pointer;\r\n }\r\n }\r\n`;\r\n\r\nconst SingleRegistration = styled(Text)``;\r\n","/**\r\n * ApplicationsList scene\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport React, { useEffect, useContext, useState } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport moment from 'moment';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport * as selectors from './logic/selectors';\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport { AnimatedBackground, Table, Text, StatusLabel, SearchBox, Dropdown } from '@paco_ua/pacoui';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faChevronRight, faInfoCircle } from '@fortawesome/pro-light-svg-icons';\r\nimport { faEllipsisH } from '@fortawesome/pro-regular-svg-icons';\r\n\r\nimport StudentRegistrationDropdown from 'shared/containers/StudentRegistrationDropdown';\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\n\r\n//import config from 'config'\r\n\r\nconst ApplicationsList = ({ t }) => {\r\n const theme = useContext(ThemeContext);\r\n\r\n const {\r\n onMount,\r\n onUnmount,\r\n setTypeFilter,\r\n setSearchFilter,\r\n getStudentApplications,\r\n } = actions.ApplicationsList;\r\n\r\n const { navigateTo } = actions.App;\r\n const dispatch = useDispatch();\r\n\r\n const { loadingStatus, errorStatus, applicationFilters, filterParams } = useSelector(\r\n selectors.getApplicationsListSlice\r\n );\r\n\r\n const studentApplications = useSelector(selectors.getStudentApplications);\r\n const registrationId = useSelector(selectors.getRegistrationId);\r\n\r\n const user = useSelector(selectors.getUser);\r\n\r\n const [initialLoading, setInitialLoading] = useState(true);\r\n\r\n useEffect(() => {\r\n dispatch(onMount());\r\n }, [dispatch, onMount, user.impersonate]);\r\n\r\n useEffect(() => {\r\n return () => {\r\n dispatch(onUnmount());\r\n };\r\n }, [dispatch, onUnmount]);\r\n\r\n useEffect(() => {\r\n if (registrationId !== null && registrationId !== undefined) {\r\n dispatch(getStudentApplications(filterParams));\r\n }\r\n }, [dispatch, filterParams, registrationId]);\r\n\r\n useEffect(() => {\r\n if (initialLoading && !loadingStatus.loading) {\r\n setInitialLoading(false);\r\n }\r\n }, [loadingStatus.loading]);\r\n\r\n const APPLICATION_STATUS = {\r\n NC: {\r\n name: t('applications.listTableStatusUnknown', { textOnly: true }),\r\n color: theme.colors.regularGrey,\r\n },\r\n SBMT: {\r\n name: t('applications.listTableStatusDelivered', { textOnly: true }),\r\n color: theme.colors.successGreen,\r\n },\r\n ANL: {\r\n name: t('applications.listTableStatusAnalysis', { textOnly: true }),\r\n color: theme.colors.decisionYellow,\r\n },\r\n PROCSA: {\r\n name: t('applications.listTableStatusResponseSent', { textOnly: true }),\r\n color: theme.colors.successGreen,\r\n },\r\n CANC: {\r\n name: t('applications.listTableStatusCanceled', { textOnly: true }),\r\n color: theme.colors.dangerRed,\r\n },\r\n };\r\n\r\n const tableStructure = {\r\n header: {\r\n type: 'columnTitle',\r\n titles: [\r\n { text: t('applications.listTableReference', { textOnly: true }) },\r\n { text: t('applications.listTableDescription', { textOnly: true }) },\r\n {\r\n text: t('applications.listTableRequestDate', { textOnly: true }),\r\n style: {\r\n textAlign: 'center',\r\n },\r\n },\r\n {\r\n text: t('applications.listTableResponseDate', { textOnly: true }),\r\n style: {\r\n textAlign: 'center',\r\n },\r\n },\r\n {\r\n text: t('applications.listTableStatus', { textOnly: true }),\r\n style: {\r\n textAlign: 'center',\r\n },\r\n },\r\n { text: '' },\r\n ],\r\n },\r\n rows: studentApplications.map((application) => {\r\n return {\r\n rowProps: {\r\n navigatable: true,\r\n color: theme.colors.white,\r\n onClick: () => {\r\n dispatch(\r\n navigateTo({\r\n key: 'applicationdetails',\r\n params: {\r\n registrationId,\r\n id: application.id,\r\n },\r\n })\r\n );\r\n },\r\n },\r\n cells: [\r\n {\r\n content: (\r\n \r\n {application.reference}\r\n \r\n ),\r\n },\r\n {\r\n content: (\r\n \r\n {application.description}\r\n \r\n ),\r\n },\r\n {\r\n content: (\r\n \r\n {moment(application.requestDate).format('DD/MM/YYYY')}\r\n \r\n ),\r\n cellProps: { textAlign: 'center' },\r\n },\r\n {\r\n content: (\r\n \r\n {application.responseDate ? (\r\n moment(application.responseDate).format('DD/MM/YYYY')\r\n ) : (\r\n \r\n )}\r\n \r\n ),\r\n cellProps: { textAlign: 'center' },\r\n },\r\n {\r\n content: (\r\n \r\n \r\n \r\n ),\r\n cellProps: { textAlign: 'center' },\r\n },\r\n {\r\n content: ,\r\n },\r\n ],\r\n };\r\n }),\r\n };\r\n\r\n return (\r\n }\r\n subHeader={}\r\n mainContent={\r\n <>\r\n {!loadingStatus.loading && !errorStatus.errLoadingList && applicationFilters.length > 0 && (\r\n \r\n {\r\n dispatch(setSearchFilter(value));\r\n }}\r\n />\r\n {\r\n dispatch(setTypeFilter(value));\r\n }}\r\n onClear={() => {\r\n dispatch(setTypeFilter(''));\r\n }}\r\n />\r\n \r\n )}\r\n\r\n {(loadingStatus.loadingList || errorStatus.errLoadingList) && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {!loadingStatus.loadingList &&\r\n !errorStatus.errLoadingList &&\r\n tableStructure &&\r\n tableStructure.rows.length > 0 && (\r\n \r\n
\r\n \r\n )}\r\n\r\n {!loadingStatus.loadingList &&\r\n !errorStatus.errLoadingList &&\r\n tableStructure &&\r\n tableStructure.rows.length === 0 && (\r\n \r\n \r\n \r\n \r\n \r\n {t('applications.noApplicationsFound', { textOnly: true })}\r\n \r\n \r\n )}\r\n \r\n }\r\n />\r\n );\r\n};\r\n\r\nexport default ApplicationsList;\r\n\r\nconst SearchAndFiltersWrapper = styled.div`\r\n width: 75%;\r\n display: flex;\r\n margin-bottom: 24px;\r\n\r\n > div {\r\n width: 50%;\r\n }\r\n\r\n > div:last-child {\r\n margin-left: 16px;\r\n }\r\n`;\r\n\r\nconst StatusLabelWrapper = styled.div`\r\n display: flex;\r\n justify-content: center;\r\n`;\r\n\r\nconst LoadingWrapper = styled.div`\r\n width: 100%;\r\n height: 300px;\r\n\r\n margin-top: 32px;\r\n\r\n * {\r\n margin: 8px 0px;\r\n }\r\n`;\r\n\r\nconst MessageNoCertificates = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n text-align: center;\r\n justify-content: center;\r\n margin-top: 60px;\r\n margin-bottom: 20px;\r\n\r\n div:nth-child(2) {\r\n margin-top: 16px;\r\n }\r\n`;\r\n\r\nconst Icon = styled.div`\r\n font-size: 60px;\r\n color: ${({ theme }) => theme.colors.primary};\r\n`;\r\n\r\nconst TableWrapper = styled.div`\r\n overflow: auto;\r\n\r\n &&& th {\r\n padding-top: 0px !important;\r\n padding-bottom: 0px !important;\r\n height: 61px;\r\n }\r\n &&& td {\r\n padding-top: 0px !important;\r\n padding-bottom: 0px !important;\r\n height: 76px;\r\n }\r\n`;\r\n","/**\r\n * ApplicationDetails scene utils\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport React from 'react';\r\nimport styled from 'styled-components';\r\nimport * as DOMPurify from 'dompurify';\r\n\r\n//TODO: add parser package\r\nexport const parseBulletAndBoldElements = (text: string) => {\r\n if (/\\*\\*(.*?)\\*\\*/.test(text)) {\r\n // Replace bold marks with tags\r\n const boldTransformed = text.replace(/\\*\\*(.*?)\\*\\*/g, '$1');\r\n\r\n // Check if the text contains bullet marks\r\n const hasBulletMarks = /^(\\s*)(\\*|-)\\s+(.*?)(\\n|$)/gm.test(boldTransformed);\r\n\r\n if (hasBulletMarks) {\r\n // Replace bullet marks with
  • tags\r\n const bulletTransformed = boldTransformed.replace(\r\n /^(\\s*)(\\*|-)\\s+(.*?)(\\n|$)/gm,\r\n '$1
  • $3
  • '\r\n );\r\n return { __html: DOMPurify.sanitize(`
      ${bulletTransformed}
    `) };\r\n } else {\r\n return { __html: DOMPurify.sanitize(boldTransformed) };\r\n }\r\n } else {\r\n return { __html: DOMPurify.sanitize(text) };\r\n }\r\n};\r\n\r\nexport const textParser = (text) => {\r\n const textWithDelimiters = text.replace(/

    /gi, '

    ');\r\n\r\n let splitArray = textWithDelimiters.split('') as any[];\r\n\r\n splitArray = splitArray.filter((item) => item !== '');\r\n\r\n let result = [] as any[];\r\n let tmpString = '';\r\n\r\n splitArray.forEach((item, index) => {\r\n if (item !== '

    ') {\r\n tmpString += item;\r\n\r\n let paragraphCounter = 0;\r\n for (let i = index + 1; i < splitArray.length; i++) {\r\n if (splitArray[i] !== '

    ') {\r\n break;\r\n } else {\r\n paragraphCounter++;\r\n }\r\n }\r\n\r\n if (paragraphCounter > 0) {\r\n result.push(\r\n \r\n );\r\n result.push();\r\n\r\n // reset\r\n tmpString = '';\r\n paragraphCounter = 0;\r\n } else if (index === splitArray.length - 1) {\r\n result.push(

    {tmpString}
    );\r\n }\r\n }\r\n });\r\n\r\n return result;\r\n};\r\n\r\nconst Paragraph = styled.div<{ height: string }>`\r\n height: ${({ height }) => height};\r\n`;\r\n","/**\r\n * ApplicationDetails scene\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport React, { useContext, useEffect, useState } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './logic/selectors';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faFilePdf, faEllipsisH } from '@fortawesome/pro-light-svg-icons';\r\n\r\nimport moment from 'moment';\r\n\r\nimport { Segment, Text, StatusLabel } from '@paco_ua/pacoui';\r\n\r\nimport FileDownloader from 'shared/components/FileDownloader';\r\n\r\nimport Header from 'shared/containers/TitleHeader';\r\nimport PageStructure from 'shared/containers/PageStructure';\r\n\r\nimport { textParser } from './utils';\r\n\r\nimport API from 'api';\r\n\r\nimport config from 'config';\r\n\r\nconst ApplicationDetails = ({ t }) => {\r\n const theme = useContext(ThemeContext);\r\n\r\n const { onMount, onUnmount, getStatusAndDetails } = actions.ApplicationDetails;\r\n //const { api_t } = actions.App\r\n\r\n const dispatch = useDispatch();\r\n\r\n const API_SEC_VIRTUAL = config.API_WSO2 + config.API_SEC_VIRTUAL_PATH;\r\n\r\n const { loadingStatus, errorStatus } = useSelector(selectors.getApplicationDetailsSlice);\r\n const status = useSelector(selectors.getStatus);\r\n const details = useSelector(selectors.getDetails);\r\n const currentRegistrationId = useSelector(selectors.getRegistration);\r\n const user = useSelector(selectors.getUser);\r\n\r\n const [initialLoading, setInitialLoading] = useState(true);\r\n\r\n useEffect(() => {\r\n setInitialLoading(true);\r\n dispatch(onMount());\r\n return () => {\r\n dispatch(onUnmount());\r\n };\r\n }, [dispatch, onMount, user.impersonate]);\r\n\r\n useEffect(() => {\r\n if (currentRegistrationId) {\r\n dispatch(getStatusAndDetails());\r\n }\r\n }, [currentRegistrationId /*, currentLocale*/]);\r\n\r\n useEffect(() => {\r\n if (initialLoading && !loadingStatus.loading) {\r\n setInitialLoading(false);\r\n }\r\n }, [loadingStatus.loading]);\r\n\r\n const APPLICATION_STATUS = {\r\n NC: {\r\n name: t('applications.listTableStatusUnknown', { textOnly: true }),\r\n color: theme.colors.regularGrey,\r\n },\r\n SBMT: {\r\n name: t('applications.listTableStatusDelivered', { textOnly: true }),\r\n color: theme.colors.successGreen,\r\n },\r\n ANL: {\r\n name: t('applications.listTableStatusAnalysis', { textOnly: true }),\r\n color: theme.colors.decisionYellow,\r\n },\r\n PROCSA: {\r\n name: t('applications.listTableStatusResponseSent', { textOnly: true }),\r\n color: theme.colors.successGreen,\r\n },\r\n CANC: {\r\n name: t('applications.listTableStatusCanceled', { textOnly: true }),\r\n color: theme.colors.dangerRed,\r\n },\r\n };\r\n\r\n return (\r\n \r\n }\r\n mainContent={\r\n <>\r\n {status && (\r\n \r\n \r\n {t('applications.detailsStatusTitle')}\r\n \r\n \r\n \r\n \r\n {t('applications.reference')}\r\n \r\n \r\n {status.ref && status.ref !== '' ? (\r\n status.ref\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n {t('applications.detailsStatusLabel')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {t('applications.detailsDateRequest')}\r\n \r\n \r\n {status.requestDate ? (\r\n moment(status.requestDate).format('DD/MM/YYYY')\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n {t('applications.detailsDateAnswer')}\r\n \r\n \r\n {status.responseDate ? (\r\n moment(status.responseDate).format('DD/MM/YYYY')\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n\r\n \r\n \r\n {t('applications.detailsAnswer')}\r\n \r\n \r\n {status.response && status.response !== '' ? (\r\n status.response\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n )}\r\n\r\n {details && (\r\n \r\n \r\n \r\n {t('applications.detailsDetailsTitle')}\r\n \r\n \r\n \r\n \r\n {t('applications.detailsDetailsStudentName')}\r\n \r\n \r\n \r\n {details.studentName}\r\n \r\n \r\n \r\n \r\n \r\n {t('applications.detailsDetailsCourse')}\r\n \r\n \r\n \r\n {details.course}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {t('applications.detailsDetailsCategory')}\r\n \r\n \r\n \r\n {status && status.type ? (\r\n status.theme ? (\r\n `${status.theme} - ${status.type}`\r\n ) : (\r\n `${status.type}`\r\n )\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n {details.statement && (\r\n \r\n \r\n {t('applications.detailsStatementTitle')}\r\n \r\n
    {textParser(details.statement)}
    \r\n {/*\r\n \r\n {details.statement}\r\n \r\n */}\r\n
    \r\n )}\r\n {details.documents.length > 0 && (\r\n \r\n \r\n {t('applications.detailsFileDownloaderTile')}\r\n \r\n {details.documents.map((document, index) => {\r\n return (\r\n \r\n }\r\n callToEndpoint={(endpoint, setLoading: (value) => void) => {\r\n setLoading(true);\r\n\r\n API.files.getFileOnTab\r\n .call(endpoint)\r\n .then((value) => {\r\n setLoading(false);\r\n })\r\n .catch((e) => {\r\n setLoading(false);\r\n dispatch(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.general_errorLoadingFile'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n });\r\n }}\r\n />\r\n \r\n );\r\n })}\r\n \r\n )}\r\n
    \r\n
    \r\n )}\r\n \r\n }\r\n />\r\n );\r\n};\r\n\r\nexport default ApplicationDetails;\r\n\r\nconst TitleWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n margin-bottom: 20px;\r\n`;\r\n\r\nconst DetailsSegmentWrapper = styled.div`\r\n margin-top: 32px;\r\n`;\r\n\r\nconst StatusAndDate = styled.div`\r\n display: flex;\r\n margin-top: 13px;\r\n\r\n & > div:not(:first-child) {\r\n margin-left: 40px;\r\n }\r\n`;\r\n\r\nconst DateBlock = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n & > div {\r\n margin-top: 12px;\r\n }\r\n`;\r\n\r\nconst FileContainer = styled.div<{ usePadding: boolean }>`\r\n padding-top: ${({ usePadding }) => (usePadding ? '12px' : 'None')};\r\n`;\r\n\r\nconst CategoryBlock = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst StatusAnswer = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n margin-top: 28px;\r\n\r\n & > div:nth-child(2) {\r\n margin-top: 12px;\r\n }\r\n`;\r\n\r\nconst StatusLabelWrapper = styled.div`\r\n display: flex;\r\n`;\r\n\r\nconst DetailsNameAndCourse = styled.div`\r\n display: flex;\r\n margin-top: 13px;\r\n\r\n & > div {\r\n flex: 1;\r\n }\r\n`;\r\n\r\nconst DetailsApplicationCategory = styled.div`\r\n margin-top: 28px;\r\n`;\r\n\r\nconst DetailsStatement = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n margin-top: 48px;\r\n\r\n & > div:nth-child(2) {\r\n margin-top: 12px;\r\n }\r\n`;\r\n\r\nconst FileDownloaderWrapper = styled.div`\r\n margin-top: 48px;\r\n\r\n & > div:nth-child(2) {\r\n margin-top: 12px;\r\n }\r\n`;\r\n\r\nconst DocumentSegmentWrapper = styled.div`\r\n margin-top: 32px;\r\n`;\r\n\r\nconst TextWrapper = styled.div`\r\n line-height: 1.3;\r\n`;\r\n\r\nconst CategoryText = styled.div`\r\n margin-top: 12px;\r\n line-height: 1.3;\r\n`;\r\n\r\nconst InfoText = styled(Text)`\r\n line-height: 1.5;\r\n`;\r\n\r\nconst ResponseText = styled(Text)<{ hasText: boolean }>`\r\n margin-top: ${({ hasText }) => (hasText ? '14px' : '16px')};\r\n line-height: 1.3;\r\n`;\r\n","/**\r\n * Mb icon\r\n *\r\n * @author Nuno Gago \r\n *\r\n */\r\n\r\nimport React from 'react';\r\n\r\ninterface IProps {\r\n width: number;\r\n height: number;\r\n fill?: string;\r\n}\r\n\r\nconst MbIcon = ({ width, height, fill }: IProps) => (\r\n \r\n {/* Mb */}\r\n Mb icon\r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nMbIcon.defaultProps = {\r\n width: 24,\r\n height: 24,\r\n};\r\n\r\nexport default MbIcon;\r\n","/**\r\n * Mb icon\r\n *\r\n * @author Nuno Gago \r\n *\r\n */\r\n\r\nimport React from 'react';\r\n\r\ninterface IProps {\r\n width: number;\r\n height: number;\r\n fill?: string;\r\n}\r\n\r\nconst MbWay = ({ width, height, fill }: IProps) => (\r\n \r\n {/* Mbway */}\r\n Mbway icon\r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nMbWay.defaultProps = {\r\n width: 24,\r\n height: 24,\r\n};\r\n\r\nexport default MbWay;\r\n","/**\r\n * Mb icon\r\n *\r\n * @author Nuno Gago \r\n *\r\n */\r\n\r\nimport React from 'react';\r\n\r\ninterface IProps {\r\n width: number;\r\n height: number;\r\n}\r\n\r\nconst VisaIcon = ({ width, height }: IProps) => (\r\n \r\n Visa\r\n Visa icon\r\n\r\n \r\n \r\n \r\n);\r\n\r\nVisaIcon.defaultProps = {\r\n width: 24,\r\n height: 24,\r\n};\r\n\r\nexport default VisaIcon;\r\n","/**\r\n * Google Calendar icon\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport React from 'react';\r\n\r\ninterface IProps {\r\n width: number;\r\n height: number;\r\n}\r\n\r\nconst GoogleCalendar: React.FC = ({ width, height }) => (\r\n \r\n \r\n \r\n);\r\n\r\nGoogleCalendar.defaultProps = {\r\n width: 24,\r\n height: 24,\r\n};\r\n\r\nexport default GoogleCalendar;\r\n","/**\r\n * Payments Methods Info container\r\n *\r\n * @author Nuno Gago \r\n *\r\n */\r\n\r\nimport React from 'react';\r\nimport styled from 'styled-components';\r\nimport { Text } from '@paco_ua/pacoui';\r\n\r\nimport { MbIcon, MbWayIcon /*, VisaIcon*/ } from 'shared/components/Icons';\r\n\r\nimport { IPaymentMethodsInfoProps } from 'scenes/VirtualSecretary/Payments/types';\r\n\r\nconst PaymenMethodsInfo = ({ t }: IPaymentMethodsInfoProps) => (\r\n \r\n \r\n {t('payments.paymentMethodsTitle', { textOnly: true })}\r\n \r\n\r\n \r\n \r\n {t('payments.paymentMethodsDescription', { textOnly: true })}\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default PaymenMethodsInfo;\r\n\r\nconst Wrapper = styled.div``;\r\n\r\nconst Content = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n margin-top: 18px;\r\n`;\r\n\r\nconst Description = styled(Text)`\r\n line-height: 1.3;\r\n`;\r\n\r\nconst Icons = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: center;\r\n margin-top: 20px;\r\n\r\n svg {\r\n margin-left: 8px;\r\n margin-right: 8px;\r\n }\r\n`;\r\n","/**\r\n * Payments Table container utilities\r\n *\r\n * @author Nuno Gago \r\n *\r\n */\r\n\r\nimport { ITranslations, IPagination } from 'scenes/VirtualSecretary/Payments/types';\r\n\r\nexport const DEFAULT_STRUCTURE = (t: ITranslations) => ({\r\n header: {\r\n type: 'columnTitle',\r\n titles: [\r\n { text: t('payments.historyTableInvoiceNumber', { textOnly: true }) },\r\n { text: t('payments.historyTablePaymentDescription', { textOnly: true }) },\r\n { text: t('payments.historyTablePaymentValue', { textOnly: true }) },\r\n { text: t('payments.historyTablePaymentDate', { textOnly: true }) },\r\n { text: t('payments.historyReceiptState', { textOnly: true }) },\r\n { text: '' },\r\n ],\r\n },\r\n rows: [],\r\n});\r\n\r\nexport const DEFAULT_PAGINATION = (total: number): IPagination => ({\r\n hasNext: total > 5 ? true : false,\r\n hasPrevious: false,\r\n offset: 0,\r\n limit: 5,\r\n total,\r\n});\r\n","/**\r\n * Payments Table container logic\r\n *\r\n * @author Nuno Gago \r\n *\r\n */\r\n\r\nimport { useState, useEffect, useContext } from 'react';\r\nimport { ThemeContext } from 'styled-components';\r\n\r\nimport {\r\n ITranslations,\r\n IPaymentData,\r\n IPagination,\r\n ICallParams,\r\n} from 'scenes/VirtualSecretary/Payments/types';\r\nimport { DEFAULT_STRUCTURE, DEFAULT_PAGINATION } from './utils';\r\n\r\nexport default (\r\n t: ITranslations,\r\n payments: IPaymentData[],\r\n compileTableRow,\r\n total: number,\r\n fetchPayments: (params: ICallParams) => void,\r\n loadingReceipt,\r\n setLoadingReceipt\r\n) => {\r\n const theme = useContext(ThemeContext);\r\n const [structure, setStructure] = useState(DEFAULT_STRUCTURE(t));\r\n const [pagination, setPagination] = useState(DEFAULT_PAGINATION(total));\r\n\r\n const compileTableStructure = (\r\n t: ITranslations,\r\n payments: IPaymentData[],\r\n theme,\r\n loadingReceipt,\r\n setLoadingReceipt\r\n ) => ({\r\n header: {\r\n type: 'columnTitle',\r\n titles: [\r\n {\r\n text: t('payments.historyTableInvoiceNumber', { textOnly: true }),\r\n style: { textAlign: 'center', wordBreak: 'keep-all' },\r\n },\r\n {\r\n text: t('payments.historyTablePaymentDescription', { textOnly: true }),\r\n },\r\n {\r\n text: t('payments.historyTablePaymentValue', { textOnly: true }),\r\n style: { textAlign: 'center', wordBreak: 'keep-all' },\r\n },\r\n {\r\n text: t('payments.historyTablePaymentDate', { textOnly: true }),\r\n style: { textAlign: 'center', wordBreak: 'keep-all' },\r\n },\r\n { text: '' },\r\n ],\r\n },\r\n rows: !payments.length\r\n ? ([] as any)\r\n : payments.map((payment) => {\r\n return compileTableRow(payment, theme, t, loadingReceipt, setLoadingReceipt);\r\n }),\r\n });\r\n\r\n const handlePaginationNavigation = (newPagination: IPagination) => {\r\n const exceedsTotal = newPagination.limit >= newPagination.total;\r\n\r\n if (exceedsTotal) {\r\n newPagination.hasPrevious = false;\r\n newPagination.hasNext = false;\r\n }\r\n\r\n if (!exceedsTotal && newPagination.offset < newPagination.limit) {\r\n newPagination.hasPrevious = false;\r\n newPagination.hasNext = true;\r\n }\r\n\r\n if (!exceedsTotal && newPagination.offset >= newPagination.limit) {\r\n newPagination.hasPrevious = true;\r\n newPagination.hasNext =\r\n newPagination.offset + newPagination.limit >= newPagination.total ? false : true;\r\n }\r\n\r\n setPagination(newPagination);\r\n };\r\n\r\n const onChangeRows = (value: number): void => {\r\n const newPagination = { ...pagination };\r\n newPagination.limit = value;\r\n newPagination.offset = 0;\r\n\r\n handlePaginationNavigation(newPagination);\r\n setPagination(newPagination);\r\n fetchPayments(newPagination);\r\n };\r\n\r\n const onChangePage = (value: string): void => {\r\n const newPagination = { ...pagination };\r\n\r\n switch (value) {\r\n case 'prev':\r\n newPagination.offset -= newPagination.limit;\r\n break;\r\n case 'next':\r\n newPagination.offset += newPagination.limit;\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n handlePaginationNavigation(newPagination);\r\n setPagination(newPagination);\r\n fetchPayments(newPagination);\r\n };\r\n\r\n useEffect(() => {\r\n if (payments.length) {\r\n const tableStructure = compileTableStructure(\r\n t,\r\n payments,\r\n theme,\r\n loadingReceipt,\r\n setLoadingReceipt\r\n );\r\n setStructure(tableStructure);\r\n\r\n if (!pagination.total) {\r\n setPagination(DEFAULT_PAGINATION(total));\r\n }\r\n }\r\n }, [payments, loadingReceipt]);\r\n\r\n return {\r\n theme,\r\n structure,\r\n pagination,\r\n onChangePage,\r\n onChangeRows,\r\n };\r\n};\r\n","/**\r\n * Payments Table container\r\n *\r\n * @author Nuno Gago \r\n *\r\n */\r\n\r\nimport React, { useState } from 'react';\r\nimport moment from 'moment';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faFilePdf, faDownload } from '@fortawesome/pro-regular-svg-icons';\r\nimport { useDispatch } from 'react-redux';\r\nimport { Table, Button as ButtonComponent, Text, StatusLabel } from '@paco_ua/pacoui';\r\nimport styled, { ThemeContext } from 'styled-components';\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport {\r\n IPaymentsTableProps,\r\n ITranslations /*, IPaymentData*/,\r\n} from 'scenes/VirtualSecretary/Payments/types';\r\n\r\nimport useTable from './useTable';\r\nimport config from 'config';\r\nimport API from 'api';\r\n\r\nconst compileTableRow = (\r\n payment: any /*IPaymentData*/,\r\n theme: any,\r\n t: ITranslations,\r\n loadingReceipt,\r\n setLoadingReceipt\r\n) => ({\r\n rowProps: {},\r\n cells: [\r\n {\r\n content: (\r\n \r\n \r\n {payment.paymentId}\r\n \r\n \r\n ),\r\n cellProps: {\r\n width: 2,\r\n singleLine: false,\r\n },\r\n },\r\n {\r\n content: (\r\n \r\n {payment.description}\r\n \r\n ),\r\n cellProps: { width: 5, singleLine: false },\r\n },\r\n {\r\n content: (\r\n \r\n {t('generic.euros', { textOnly: true, \r\n count: payment.value.toFixed(2),\r\n coin: payment.coin })}\r\n \r\n ),\r\n cellProps: {\r\n width: 2,\r\n singleLine: false,\r\n style: { textAlign: 'center' },\r\n },\r\n },\r\n {\r\n content: (\r\n {moment(payment.paymentDate, 'YYYY-MM-DD').format('DD-MM-YYYY')}\r\n ),\r\n cellProps: {\r\n width: 2,\r\n singleLine: true,\r\n style: {\r\n textAlign: 'center',\r\n },\r\n },\r\n },\r\n {\r\n content: payment.receiptState ? (\r\n {\r\n setLoadingReceipt((currentValues) => {\r\n return { ...currentValues, [payment.billReceipt.id]: true };\r\n });\r\n\r\n if (!loadingReceipt[payment.billReceipt.id] && payment.billReceipt.url !== '') {\r\n API.files.getFileOnTab\r\n .call(`${config.API_WSO2}${config.API_SEC_VIRTUAL_PATH}${payment.billReceipt.url}`)\r\n .then((value) => {\r\n setLoadingReceipt((currentValues) => {\r\n return { ...currentValues, [payment.billReceipt.id]: false };\r\n });\r\n })\r\n .catch((e) => {\r\n setLoadingReceipt((currentValues) => {\r\n return { ...currentValues, [payment.billReceipt.id]: false };\r\n });\r\n useDispatch()(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.general_errorLoadingFile'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n });\r\n }\r\n }}\r\n data-testid={`paymentsTable_download_button`}\r\n // leftIcon={}\r\n action\r\n borderless\r\n >\r\n {/* {t(`payments.receipt`)} */}\r\n \r\n \r\n ) : (\r\n <>\r\n ),\r\n cellProps: {\r\n width: 1,\r\n singleLine: false,\r\n style: {\r\n alignItems: 'center',\r\n },\r\n },\r\n },\r\n ],\r\n});\r\n\r\nconst PaymentsTable = ({ t, data, loading, total, fetchPayments }: IPaymentsTableProps) => {\r\n const [loadingReceipt, setLoadingReceipt] = useState({});\r\n\r\n const { structure, pagination, onChangePage, onChangeRows } = useTable(\r\n t,\r\n data,\r\n compileTableRow,\r\n total,\r\n fetchPayments,\r\n loadingReceipt,\r\n setLoadingReceipt\r\n );\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default PaymentsTable;\r\n\r\nconst CellWrapper = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: center;\r\n align-items: center;\r\n svg {\r\n margin-right: 14px;\r\n }\r\n`;\r\n\r\nconst Button = styled(ButtonComponent)`\r\n width: 100%;\r\n`;\r\n\r\nconst PaymentsTableWrapper = styled.div`\r\n overflow: auto;\r\n\r\n &&& th {\r\n padding-right: 14px !important;\r\n padding-left: 14px !important;\r\n padding-top: 0px !important;\r\n padding-bottom: 0px !important;\r\n height: 61px;\r\n }\r\n\r\n &&& td {\r\n padding-right: 14px !important;\r\n padding-left: 14px !important;\r\n padding-top: 0px !important;\r\n padding-bottom: 0px !important;\r\n height: 76px;\r\n }\r\n\r\n &&& .ui.table tfoot tr td {\r\n height: 45px;\r\n }\r\n`;\r\n\r\nconst CurrencyText = styled(Text)`\r\n word-break: keep-all;\r\n`;\r\n\r\nconst PaymentIdText = styled(Text)`\r\n line-height: inherit;\r\n`;\r\n\r\nconst PaymentDescriptionText = styled(Text)`\r\n white-space: nowrap;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n line-height: 1.3;\r\n\r\n @supports (-webkit-line-clamp: 2) {\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: initial;\r\n display: -webkit-box;\r\n -webkit-line-clamp: 2;\r\n -webkit-box-orient: vertical;\r\n }\r\n`;\r\n","/**\r\n * Debits Table container utilities\r\n *\r\n * @author Nuno Gago \r\n *\r\n */\r\n\r\nimport moment from 'moment';\r\nimport {\r\n ITranslations,\r\n IPagination,\r\n IDebitStatus,\r\n IDebitData,\r\n} from 'scenes/VirtualSecretary/Payments/types';\r\n\r\nexport const DEFAULT_STRUCTURE = (t: ITranslations) => ({\r\n header: {\r\n type: 'columnTitle',\r\n titles: [\r\n { text: t('payments.debitsTablePaymentDescription', { textOnly: true }) },\r\n { text: t('payments.debitsTablePaymentValue', { textOnly: true }) },\r\n { text: t('payments.debitsTableDueDate', { textOnly: true }) },\r\n { text: t('payments.debitsTablePaymentStatus', { textOnly: true }) },\r\n { text: '' },\r\n ],\r\n },\r\n rows: [],\r\n});\r\n\r\nexport const DEBIT_STATUS: IDebitStatus = {\r\n UNPAID: 'unpaid',\r\n IN_DEBIT: 'inDebit',\r\n AWAITING_PAYMENT: 'awaitingPayment',\r\n IN_DEBIT_AWAITING_PAYMENT: 'inDebitAwaitingPayment',\r\n};\r\n\r\nexport const DEBIT_STATUS_COLOR = (theme): { [key: string]: string } => ({\r\n [DEBIT_STATUS.UNPAID]: theme.colors.darkGrey,\r\n [DEBIT_STATUS.IN_DEBIT]: theme.colors.dangerRed,\r\n [DEBIT_STATUS.AWAITING_PAYMENT]: theme.colors.decisionYellow,\r\n [DEBIT_STATUS.IN_DEBIT_AWAITING_PAYMENT]: theme.colors.decisionYellow,\r\n});\r\n\r\nexport const getMultipleValue = (multiples: IDebitData[]) => {\r\n return multiples.reduce((acc, curr) => acc + curr.value, 0);\r\n};\r\n\r\nexport const getMultipleDate = (multiples: IDebitData[]) => {\r\n const dates = multiples.map((multiple) => moment(multiple.dueDate));\r\n return moment.min(dates).format('DD-MM-YYYY');\r\n};\r\n\r\nexport const isRowSelected = (multiples, key: number) => {\r\n return multiples.some((item) => item.id === key);\r\n};\r\n\r\nexport const DEFAULT_PAGINATION = (total: number): IPagination => ({\r\n hasNext: total > 20 ? true : false,\r\n hasPrevious: false,\r\n offset: 0,\r\n limit: 20,\r\n total,\r\n});\r\n\r\nexport const findItem = (debitId, preSelectedDebits) =>\r\n preSelectedDebits.some((preSelectedDebit) => preSelectedDebit.debitId === debitId);\r\n","/**\r\n * Debits Table container\r\n *\r\n * @author Nuno Gago \r\n *\r\n */\r\n\r\nimport React, { useState, useEffect } from 'react';\r\nimport moment from 'moment';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faCreditCard, faEye } from '@fortawesome/pro-regular-svg-icons';\r\n\r\nimport {\r\n Table,\r\n Button as ButtonComponent,\r\n Text,\r\n StatusLabel,\r\n SearchBox,\r\n Dropdown,\r\n} from '@paco_ua/pacoui';\r\nimport styled from 'styled-components';\r\n\r\nimport {\r\n IDebitsTableProps,\r\n ITranslations,\r\n IDebitData,\r\n} from 'scenes/VirtualSecretary/Payments/types';\r\nimport { DEBIT_STATUS, DEBIT_STATUS_COLOR } from './utils';\r\n\r\nimport useTable from './useTable';\r\nimport { findItem } from './utils';\r\n\r\nconst ASSOCIATED_COSTS_TYPES = {\r\n lateFeeCost: 'days',\r\n ucCost: 'ucs',\r\n certCost: 'copies',\r\n mailCost: 'mailCost',\r\n};\r\n\r\nconst getCellButton = (\r\n debit: IDebitData[],\r\n status: string,\r\n t: ITranslations,\r\n //openPaymentModal: (data: IDebitData[]) => void,\r\n openPendingDebitsPaymentPage: () => void,\r\n disableButtons?: boolean,\r\n color?: string,\r\n setPreSelectedDebits?: (debit: IDebitData[]) => void\r\n) => {\r\n switch (status) {\r\n case DEBIT_STATUS.UNPAID:\r\n case DEBIT_STATUS.IN_DEBIT:\r\n return (\r\n {\r\n //openPaymentModal(debit);\r\n\r\n // when clicking the button corresponding to a specific debit\r\n if (setPreSelectedDebits) {\r\n setPreSelectedDebits([debit[0]]);\r\n }\r\n\r\n openPendingDebitsPaymentPage();\r\n }}\r\n leftIcon={}\r\n action\r\n disabled={disableButtons}\r\n >\r\n {t('generic.pay', { textOnly: true })}\r\n \r\n );\r\n // TODO: add onClick action\r\n case DEBIT_STATUS.AWAITING_PAYMENT:\r\n return (\r\n true}\r\n leftIcon={}\r\n action\r\n disabled={disableButtons}\r\n >\r\n {t('generic.reference', { textOnly: true })}\r\n \r\n );\r\n case DEBIT_STATUS.IN_DEBIT_AWAITING_PAYMENT:\r\n return (\r\n true}\r\n leftIcon={}\r\n action\r\n disabled={disableButtons}\r\n >\r\n {t('generic.check', { textOnly: true })}\r\n \r\n );\r\n default:\r\n return null;\r\n }\r\n};\r\n\r\nconst compileTableRow = (\r\n debit: IDebitData,\r\n theme,\r\n t: ITranslations,\r\n openPendingDebitsPaymentPage: () => void,\r\n value: number,\r\n selectedDebits: IDebitData[],\r\n isSelected?: boolean,\r\n disableButtons?: boolean,\r\n setPreSelectedDebits?: (debit: IDebitData[]) => void\r\n) => {\r\n const preSelected = findItem(debit.debitId, selectedDebits);\r\n let tableRow: any = {\r\n value: { ...debit, id: value },\r\n defaultSelected: preSelected,\r\n rowProps: {},\r\n cells: [\r\n {\r\n content: (\r\n \r\n {debit.debitType && (\r\n \r\n {t(`debitTypes.${debit.debitType.toLowerCase()}`, { textOnly: true })}\r\n \r\n )}\r\n \r\n {debit.description}\r\n \r\n \r\n ),\r\n cellProps: { width: 6, singleLine: false },\r\n },\r\n {\r\n content: (\r\n \r\n {t('generic.euros', { textOnly: true, count: debit.value.toFixed(2) })}\r\n \r\n ),\r\n cellProps: {\r\n width: 2,\r\n singleLine: false,\r\n style: {\r\n textAlign: 'center',\r\n },\r\n },\r\n },\r\n {\r\n content: (\r\n \r\n {moment(debit.dueDate).format('DD-MM-YYYY')}\r\n \r\n ),\r\n cellProps: {\r\n width: 3,\r\n singleLine: true,\r\n style: {\r\n textAlign: 'center',\r\n },\r\n },\r\n },\r\n {\r\n content: (\r\n \r\n \r\n \r\n ),\r\n cellProps: {\r\n width: 2,\r\n singleLine: false,\r\n style: {\r\n textAlign: 'center',\r\n },\r\n },\r\n },\r\n {\r\n content: getCellButton(\r\n [debit],\r\n debit.debitStatus,\r\n t,\r\n openPendingDebitsPaymentPage,\r\n disableButtons,\r\n '',\r\n setPreSelectedDebits\r\n ),\r\n cellProps: { width: 3, singleLine: false },\r\n },\r\n ],\r\n };\r\n\r\n // if in debit and selected in multiple payment show data below\r\n if (debit.debitStatus === DEBIT_STATUS.IN_DEBIT && isSelected) {\r\n tableRow = {\r\n ...tableRow,\r\n ...{\r\n collapsableOpen: true,\r\n collapsableRows: [\r\n {\r\n cells: [\r\n {\r\n content: (\r\n \r\n \r\n {t('payments.inDebit')}\r\n \r\n \r\n {t('payments.inDebitDescription')}\r\n \r\n \r\n ),\r\n cellProps: { colSpan: 6, singleLine: false },\r\n },\r\n ],\r\n },\r\n ],\r\n },\r\n };\r\n }\r\n\r\n if (debit.associatedCosts !== null && debit.associatedCosts.length > 0 && isSelected) {\r\n tableRow = {\r\n ...tableRow,\r\n ...{\r\n collapsableOpen: true,\r\n collapsableRows: [\r\n ...debit.associatedCosts.map((entry) => {\r\n return {\r\n rowProps: {\r\n bgColor: theme.colors.softLightGrey,\r\n disableHover: true,\r\n },\r\n cells: [\r\n {\r\n cellProps: { colSpan: 1, singleLine: false },\r\n },\r\n {\r\n content: (\r\n \r\n \r\n {ASSOCIATED_COSTS_TYPES[entry.type] ? (\r\n \r\n {t(`payments.${entry.type}`, { textOnly: true })}\r\n \r\n ) : (\r\n {entry.type}\r\n )}\r\n \r\n {entry.type !== ASSOCIATED_COSTS_TYPES.mailCost &&\r\n ASSOCIATED_COSTS_TYPES[entry.type] && (\r\n \r\n \r\n {`${t(`payments.${ASSOCIATED_COSTS_TYPES[entry.type]}`, {\r\n textOnly: true,\r\n count: entry.copies,\r\n })}`}\r\n \r\n \r\n )}\r\n \r\n ),\r\n cellProps: { colSpan: 1, singleLine: false },\r\n },\r\n {\r\n content: (\r\n \r\n \r\n {`${t('generic.euros', {\r\n textOnly: true,\r\n count: entry.value.toFixed(2),\r\n })}`}\r\n \r\n \r\n ),\r\n cellProps: { colSpan: 1, singleLine: false },\r\n },\r\n {\r\n content: '',\r\n cellProps: {\r\n colSpan: '100%',\r\n singleLine: false,\r\n },\r\n },\r\n ],\r\n };\r\n }),\r\n ...(tableRow.collapsableRows ?? []),\r\n ],\r\n },\r\n };\r\n }\r\n\r\n return tableRow;\r\n};\r\n\r\nconst DebitsTable = ({\r\n t,\r\n loading,\r\n data,\r\n preSelectedDebits,\r\n total,\r\n fetchDebits,\r\n setPreSelectedDebits,\r\n openPendingDebitsPaymentPage,\r\n selectedDebits,\r\n addFilters,\r\n filterParams,\r\n}: IDebitsTableProps) => {\r\n const [disablePayButtons, setDisabelPayButtons] = useState(false);\r\n\r\n const [filtersChanged, setFiltersChanged] = useState(false);\r\n\r\n const [numSelectedDebits, setNumSelectedDebits] = useState(0);\r\n\r\n const { structure, pagination, onChangePage, onChangeRows, theme } = useTable(\r\n t,\r\n data,\r\n preSelectedDebits,\r\n compileTableRow,\r\n total,\r\n fetchDebits,\r\n disablePayButtons,\r\n setPreSelectedDebits,\r\n openPendingDebitsPaymentPage,\r\n selectedDebits,\r\n filterParams,\r\n filtersChanged\r\n );\r\n\r\n useEffect(() => {\r\n setFiltersChanged(true);\r\n }, [filterParams]);\r\n\r\n return (\r\n <>\r\n \r\n {\r\n addFilters.onSearch(value);\r\n }}\r\n />\r\n {\r\n addFilters.onFilterChange(value);\r\n }}\r\n onClear={() => {\r\n addFilters.onFilterChange('');\r\n }}\r\n />\r\n \r\n\r\n \r\n {\r\n if (selectedDebitsList.length !== numSelectedDebits) {\r\n setNumSelectedDebits(selectedDebitsList.length);\r\n\r\n if (selectedDebitsList.length > 1) {\r\n setDisabelPayButtons(true);\r\n } else {\r\n setDisabelPayButtons(false);\r\n }\r\n\r\n setPreSelectedDebits(selectedDebitsList);\r\n }\r\n }}\r\n selectedInfoTitle={\r\n \r\n {t('payments.multipaymentsSelection')}\r\n \r\n }\r\n selectedInfoSubTitle={(value) => {\r\n return (\r\n \r\n {t('generic.selectedItem', { textOnly: true, count: value })}\r\n \r\n );\r\n }}\r\n selectedInfoAction={\r\n <>\r\n {getCellButton(\r\n preSelectedDebits,\r\n DEBIT_STATUS.UNPAID,\r\n t,\r\n openPendingDebitsPaymentPage,\r\n undefined,\r\n theme.colors.white,\r\n undefined\r\n )}\r\n \r\n }\r\n pagination={pagination}\r\n onChangeRows={onChangeRows}\r\n onChangePage={onChangePage}\r\n resetSelectedIds={filtersChanged}\r\n setResetSelectedIdsFunction={() => {\r\n setFiltersChanged(false);\r\n }}\r\n translations={t}\r\n collapsedColor={theme.colors.softGrey}\r\n />\r\n \r\n \r\n );\r\n};\r\n\r\nexport default DebitsTable;\r\n\r\nconst Button = styled(ButtonComponent)`\r\n width: 100%;\r\n`;\r\n\r\nconst ContentWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst StatusLabelContainer = styled.div`\r\n div {\r\n margin: 0px auto;\r\n\r\n @media (max-width: 992px) {\r\n width: auto;\r\n max-width: 120px;\r\n }\r\n }\r\n`;\r\n\r\nconst DebitStatusText = styled(Text)`\r\n margin-top: 4px;\r\n line-height: 1.3;\r\n white-space: nowrap;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n\r\n @supports (-webkit-line-clamp: 2) {\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: initial;\r\n display: -webkit-box;\r\n -webkit-line-clamp: 2;\r\n -webkit-box-orient: vertical;\r\n }\r\n`;\r\n\r\nconst CurrencyText = styled(Text)`\r\n word-break: keep-all;\r\n`;\r\n\r\nconst DebitTableWrapper = styled.div`\r\n margin-top: 28px;\r\n overflow: auto;\r\n\r\n &&& th {\r\n padding-right: 14px !important;\r\n padding-left: 14px !important;\r\n padding-top: 0px !important;\r\n padding-bottom: 0px !important;\r\n height: 61px;\r\n }\r\n\r\n &&& td {\r\n padding-right: 14px !important;\r\n padding-left: 14px !important;\r\n padding-top: 0px !important;\r\n padding-bottom: 0px !important;\r\n height: 76px;\r\n }\r\n`;\r\n\r\nconst InDebitDescriptionText = styled(Text)`\r\n margin-top: 8px;\r\n`;\r\n\r\nconst SearchAndFiltersWrapper = styled.div`\r\n display: flex;\r\n margin-bottom: 24px;\r\n justify-content: flex-end;\r\n\r\n > div {\r\n width: 33%;\r\n }\r\n\r\n > div:last-child {\r\n margin-left: 16px;\r\n }\r\n`;\r\n\r\nconst ExtraFeeWrapper = styled.div``;\r\n\r\nconst ExtraFeeCellWrapper = styled.div`\r\n line-height: 1;\r\n`;\r\n\r\nconst ExtraFeeValueCellWrapper = styled.div`\r\n line-height: 1;\r\n margin-top: 4px;\r\n`;\r\n\r\nconst CostCellWrapper = styled.div`\r\n display: flex;\r\n justify-content: center;\r\n text-align: center;\r\n`;\r\n","/**\r\n * Debits Table container logic\r\n *\r\n * @author Nuno Gago \r\n *\r\n */\r\n\r\nimport { useState, useEffect, useContext } from 'react';\r\nimport { useSelector } from 'react-redux';\r\nimport { ThemeContext } from 'styled-components';\r\n\r\nimport { ITranslations, IDebitData, IPagination } from 'scenes/VirtualSecretary/Payments/types';\r\nimport { DEFAULT_STRUCTURE, DEFAULT_PAGINATION, isRowSelected } from './utils';\r\nimport { DEFAULT_UNSELECTED_DEBITS_PARAMS } from '../../utils';\r\n\r\nimport * as selectors from '../../logic/selectors';\r\n\r\nexport default (\r\n t,\r\n debits: IDebitData[],\r\n multiples: IDebitData[],\r\n compileTableRow,\r\n total: number,\r\n fetchDebits,\r\n disableButtons,\r\n setPreSelectedDebits,\r\n openPendingDebitsPaymentPage,\r\n selectedDebits,\r\n filterParams,\r\n filtersChanged\r\n) => {\r\n const theme = useContext(ThemeContext);\r\n const [structure, setStructure] = useState(DEFAULT_STRUCTURE(t));\r\n const [pagination, setPagination] = useState(DEFAULT_PAGINATION(total));\r\n\r\n const registrationId = useSelector(selectors.getRegistrationId);\r\n\r\n const [initialFetch, setInitialFetch] = useState(true);\r\n\r\n // initial debits fetch\r\n useEffect(() => {\r\n if (initialFetch) {\r\n setInitialFetch(false);\r\n } else {\r\n if (registrationId !== null && registrationId !== undefined) {\r\n // fetch new list\r\n fetchDebits(DEFAULT_UNSELECTED_DEBITS_PARAMS);\r\n }\r\n }\r\n }, [filterParams]);\r\n\r\n // reset pagination when filters are changed\r\n useEffect(() => {\r\n if (filtersChanged) {\r\n setPagination(DEFAULT_PAGINATION(total));\r\n }\r\n }, [filtersChanged]);\r\n\r\n // update pagination when total value is changed (when filtering)\r\n useEffect(() => {\r\n let updatePagination = { ...pagination };\r\n updatePagination.total = total;\r\n\r\n setPagination(updatePagination);\r\n }, [total]);\r\n\r\n useEffect(() => {\r\n handlePaginationNavigation(pagination);\r\n }, [pagination]);\r\n\r\n // Update table when new debits are fetched,\r\n // or to disable the payment buttons when multiple debits are selected\r\n useEffect(() => {\r\n const tableStructure = compileTableStructure(t, debits, multiples, theme);\r\n setStructure(tableStructure);\r\n }, [debits, selectedDebits]);\r\n\r\n const compileTableStructure = (\r\n t: ITranslations,\r\n debits: IDebitData[],\r\n multiples: IDebitData[],\r\n theme\r\n ) => ({\r\n header: {\r\n type: 'columnTitle',\r\n titles: [\r\n { text: t('payments.debitsTablePaymentDescription', { textOnly: true }) },\r\n {\r\n text: t('payments.debitsTablePaymentValue', { textOnly: true }),\r\n style: { textAlign: 'center' },\r\n },\r\n {\r\n text: t('payments.debitsTableDueDate', { textOnly: true }),\r\n style: { textAlign: 'center' },\r\n },\r\n {\r\n text: t('payments.debitsTablePaymentStatus', { textOnly: true }),\r\n style: { textAlign: 'center' },\r\n },\r\n { text: '' },\r\n ],\r\n },\r\n rows: !debits.length\r\n ? ([] as any)\r\n : [\r\n ...debits.map((debit, key) =>\r\n compileTableRow(\r\n debit,\r\n theme,\r\n t,\r\n openPendingDebitsPaymentPage,\r\n key,\r\n selectedDebits,\r\n isRowSelected(multiples, key),\r\n disableButtons,\r\n setPreSelectedDebits\r\n )\r\n ),\r\n ],\r\n });\r\n\r\n const handlePaginationNavigation = (newPagination: IPagination) => {\r\n const exceedsTotal = newPagination.limit >= newPagination.total;\r\n\r\n if (exceedsTotal) {\r\n newPagination.hasPrevious = false;\r\n newPagination.hasNext = false;\r\n }\r\n\r\n if (!exceedsTotal && newPagination.offset < newPagination.limit) {\r\n newPagination.hasPrevious = false;\r\n newPagination.hasNext = true;\r\n }\r\n\r\n if (!exceedsTotal && newPagination.offset >= newPagination.limit) {\r\n newPagination.hasPrevious = true;\r\n newPagination.hasNext =\r\n newPagination.offset + newPagination.limit >= newPagination.total ? false : true;\r\n }\r\n\r\n setPagination(newPagination);\r\n };\r\n\r\n const onChangeRows = (value: number): void => {\r\n const newPagination = { ...pagination };\r\n newPagination.limit = value;\r\n newPagination.offset = 0;\r\n\r\n handlePaginationNavigation(newPagination);\r\n setPagination(newPagination);\r\n fetchDebits(newPagination);\r\n };\r\n\r\n const onChangePage = (value: string): void => {\r\n const newPagination = { ...pagination };\r\n\r\n switch (value) {\r\n case 'prev':\r\n newPagination.offset -= newPagination.limit;\r\n break;\r\n case 'next':\r\n newPagination.offset += newPagination.limit;\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n handlePaginationNavigation(newPagination);\r\n setPagination(newPagination);\r\n fetchDebits(newPagination);\r\n };\r\n\r\n return {\r\n theme,\r\n structure,\r\n pagination,\r\n onChangePage,\r\n onChangeRows,\r\n };\r\n};\r\n","/**\r\n * Payments Table container logic\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { useState, useEffect, useContext } from 'react';\r\nimport { ThemeContext } from 'styled-components';\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport * as selectors from '../../logic/selectors';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { ITranslations, IPendingDebitsEntry } from 'scenes/VirtualSecretary/Payments/types';\r\nimport { DEFAULT_STRUCTURE } from './utils';\r\n\r\nexport default (\r\n t: ITranslations,\r\n pendingDebits: IPendingDebitsEntry[],\r\n compileTableRow,\r\n openMbInfoModal,\r\n countdowns,\r\n loadingCancel,\r\n setLoadingCancel\r\n) => {\r\n const theme = useContext(ThemeContext);\r\n const [structure, setStructure] = useState(DEFAULT_STRUCTURE(t));\r\n\r\n const registrationId = useSelector(selectors.getRegistrationId);\r\n\r\n const { setIsCancelPaymentsModalOpened } = actions.Payments;\r\n\r\n const { isCancelPaymentsModalOpened } = useSelector(selectors.getPaymentsSlice);\r\n\r\n const dispatch = useDispatch();\r\n\r\n const compileTableStructure = (\r\n t: ITranslations,\r\n pendingDebits: IPendingDebitsEntry[],\r\n theme,\r\n loadingCancel,\r\n setLoadingCancel\r\n ) => {\r\n let headerTitles = [\r\n { text: t('payments.debitsTablePaymentDescription', { textOnly: true }) },\r\n {\r\n text: t('payments.debitsTablePaymentValue', { textOnly: true }),\r\n style: { textAlign: 'center' },\r\n },\r\n {\r\n text: t('payments.debitsTableDueDate', { textOnly: true }),\r\n style: { textAlign: 'center' },\r\n },\r\n {\r\n text: t('payments.debitsTablePaymentStatus', { textOnly: true }),\r\n style: { textAlign: 'center' },\r\n },\r\n { text: '' },\r\n { text: '' },\r\n { text: '' },\r\n ];\r\n\r\n return {\r\n header: {\r\n type: 'columnTitle',\r\n titles: headerTitles,\r\n },\r\n rows: !pendingDebits.length\r\n ? ([] as any)\r\n : pendingDebits.reduce((acc, cur) => {\r\n let tmp = acc.concat(\r\n compileTableRow(\r\n cur,\r\n theme,\r\n t,\r\n openMbInfoModal,\r\n countdowns[cur.paymentRequestId],\r\n dispatch,\r\n loadingCancel,\r\n setLoadingCancel,\r\n registrationId,\r\n isCancelPaymentsModalOpened,\r\n setIsCancelPaymentsModalOpened\r\n )\r\n );\r\n return tmp;\r\n }, []),\r\n };\r\n };\r\n\r\n useEffect(() => {\r\n const tableStructure = compileTableStructure(\r\n t,\r\n pendingDebits,\r\n theme,\r\n loadingCancel,\r\n setLoadingCancel\r\n );\r\n setStructure(tableStructure);\r\n }, [pendingDebits, countdowns, loadingCancel]);\r\n\r\n return {\r\n theme,\r\n structure,\r\n };\r\n};\r\n","/**\r\n * Payments Table container utilities\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { ITranslations, IPagination } from 'scenes/VirtualSecretary/Payments/types';\r\n\r\nexport const DEFAULT_STRUCTURE = (t: ITranslations) => ({\r\n header: {\r\n type: 'columnTitle',\r\n titles: [\r\n { text: t('payments.historyTableInvoiceNumber', { textOnly: true }) },\r\n { text: t('payments.historyTablePaymentDescription', { textOnly: true }) },\r\n { text: t('payments.historyTablePaymentValue', { textOnly: true }) },\r\n { text: t('payments.historyTablePaymentDate', { textOnly: true }) },\r\n //{ text: t('payments.historyTablePaymentATDate', { textOnly: true }) },\r\n { text: '' },\r\n ],\r\n },\r\n rows: [],\r\n});\r\n\r\nexport const DEFAULT_PAGINATION = (total: number): IPagination => ({\r\n hasNext: total > 5 ? true : false,\r\n hasPrevious: false,\r\n offset: 0,\r\n limit: 5,\r\n total,\r\n});\r\n","/**\r\n * Payments Table container\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport React, { useEffect, useState } from 'react';\r\nimport moment from 'moment';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faEye } from '@fortawesome/pro-regular-svg-icons';\r\n\r\nimport { MbIcon, MbWayIcon /*, VisaIcon*/ } from 'shared/components/Icons';\r\n\r\nimport { Table, Button, Text, StatusLabel, Modal } from '@paco_ua/pacoui';\r\nimport styled from 'styled-components';\r\n\r\nimport { DEFAULT_DEBITS_PARAMS } from 'scenes/VirtualSecretary/Payments/utils';\r\n\r\nimport {\r\n IDebitStatus,\r\n PAYMENT_METHOD,\r\n PENDING_DEBIT_STATE,\r\n} from 'scenes/VirtualSecretary/Payments/types';\r\n\r\nimport API from 'api';\r\n\r\nimport {\r\n IPendingDebitsTableProps,\r\n ITranslations,\r\n IPendingDebitsEntry,\r\n} from 'scenes/VirtualSecretary/Payments/types';\r\n\r\nimport useTable from './useTable';\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\nconst DEBIT_STATUS: IDebitStatus = {\r\n UNPAID: 'unpaid',\r\n IN_DEBIT: 'inDebit',\r\n AWAITING_PAYMENT: 'awaitingPayment',\r\n IN_DEBIT_AWAITING_PAYMENT: 'inDebitAwaitingPayment',\r\n};\r\n\r\nconst DEBIT_STATUS_COLOR = (theme): { [key: string]: string } => ({\r\n [DEBIT_STATUS.UNPAID]: theme.colors.darkGrey,\r\n [DEBIT_STATUS.IN_DEBIT]: theme.colors.dangerRed,\r\n [DEBIT_STATUS.AWAITING_PAYMENT]: theme.colors.decisionYellow,\r\n [DEBIT_STATUS.IN_DEBIT_AWAITING_PAYMENT]: theme.colors.decisionYellow,\r\n});\r\n\r\nconst ASSOCIATED_COSTS_TYPES = {\r\n lateFeeCost: 'days',\r\n ucCost: 'ucs',\r\n certCost: 'copies',\r\n mailCost: 'mailCost',\r\n};\r\n\r\nconst getMultipaymentTableRows = (\r\n t,\r\n theme,\r\n multipayment: IPendingDebitsEntry,\r\n openMbInfoModal,\r\n remainingTime,\r\n dispatch,\r\n loadingCancel,\r\n setLoadingCancel,\r\n registrationId,\r\n setIsCancelPaymentsModalOpened,\r\n isCancelPaymentsModalOpened\r\n) => {\r\n let paymentRows = [] as any;\r\n\r\n paymentRows.push({\r\n rowProps: {\r\n navigatable: true,\r\n },\r\n //collapsableOpen: true,\r\n cells: [\r\n {\r\n content: (\r\n \r\n \r\n {t('payments.multipayment', { textOnly: true })}\r\n \r\n \r\n ),\r\n cellProps: {\r\n colSpan: 1,\r\n width: 5,\r\n singleLine: false,\r\n style: {\r\n justifyContent: 'left',\r\n },\r\n },\r\n },\r\n {\r\n content: (\r\n \r\n \r\n {`${t('generic.euros', {\r\n textOnly: true,\r\n count: multipayment.totalValue,\r\n })}`}\r\n \r\n \r\n ),\r\n cellProps: {\r\n width: 2,\r\n colSpan: 1,\r\n singleLine: false,\r\n },\r\n },\r\n {\r\n content: (\r\n \r\n \r\n {moment(multipayment.dueDate).format('DD-MM-YYYY')}\r\n \r\n \r\n ),\r\n cellProps: {\r\n colSpan: 1,\r\n singleLine: false,\r\n },\r\n },\r\n {\r\n content: (\r\n \r\n \r\n {t(`payments.${multipayment.status}`, { textOnly: true })}\r\n \r\n }\r\n />\r\n \r\n ),\r\n cellProps: {\r\n colSpan: 1,\r\n singleLine: false,\r\n },\r\n },\r\n {\r\n content: (\r\n \r\n {multipayment.paymentMethod === PAYMENT_METHOD.mb ? (\r\n {\r\n openMbInfoModal(multipayment.paymentRequestId);\r\n }}\r\n leftIcon={}\r\n action\r\n //disabled={disableButtons}\r\n >\r\n {t('payments.show', { textOnly: true })}\r\n \r\n ) : (\r\n <>\r\n )}\r\n \r\n ),\r\n cellProps: {\r\n colSpan: 2,\r\n singleLine: false,\r\n },\r\n },\r\n ],\r\n collapsableRows: multipayment.debits.reduce((acc, curDebit) => {\r\n let debitRows = [] as any;\r\n\r\n // main debit collapsed row\r\n debitRows.push({\r\n rowProps: {\r\n bgColor: theme.colors.softGrey,\r\n disableHover: true,\r\n },\r\n cells: [\r\n {\r\n content: (\r\n \r\n {curDebit.description}\r\n \r\n ),\r\n cellProps: { colSpan: 1, singleLine: false },\r\n },\r\n {\r\n content: (\r\n \r\n \r\n {`${t('generic.euros', {\r\n textOnly: true,\r\n count: curDebit.value.toFixed(2),\r\n })}`}\r\n \r\n \r\n ),\r\n cellProps: { colSpan: 1, singleLine: false },\r\n },\r\n {\r\n content: (\r\n \r\n \r\n {moment(curDebit.dueDate).format('DD-MM-YYYY')}\r\n \r\n \r\n ),\r\n cellProps: { colSpan: 1, singleLine: false },\r\n },\r\n {\r\n content: '',\r\n cellProps: { colSpan: '100%', singleLine: false },\r\n },\r\n ],\r\n });\r\n\r\n if (multipayment.debits[0].associatedCosts !== null && curDebit.associatedCosts !== null) {\r\n // sub debit collapsed row with the associated costs\r\n curDebit.associatedCosts.map((costEntry) => {\r\n debitRows.push({\r\n rowProps: {\r\n bgColor: theme.colors.softLightGrey,\r\n disableHover: true,\r\n },\r\n cells: [\r\n {\r\n content: (\r\n \r\n \r\n {ASSOCIATED_COSTS_TYPES[costEntry.type] ? (\r\n \r\n {t(`payments.${costEntry.type}`, { textOnly: true })}\r\n \r\n ) : (\r\n {costEntry.type}\r\n )}\r\n \r\n {costEntry.type !== ASSOCIATED_COSTS_TYPES.mailCost &&\r\n ASSOCIATED_COSTS_TYPES[costEntry.type] && (\r\n \r\n \r\n {`${t(`payments.${ASSOCIATED_COSTS_TYPES[costEntry.type]}`, {\r\n textOnly: true,\r\n count: costEntry.copies,\r\n })}`}\r\n \r\n \r\n )}\r\n \r\n ),\r\n cellProps: { colSpan: 1, singleLine: false },\r\n },\r\n {\r\n content: (\r\n \r\n \r\n {`${t('generic.euros', {\r\n textOnly: true,\r\n count: costEntry.value.toFixed(2),\r\n })}`}\r\n \r\n \r\n ),\r\n cellProps: { colSpan: 1, singleLine: false },\r\n },\r\n {\r\n content: '',\r\n cellProps: {\r\n colSpan: '100%',\r\n singleLine: false,\r\n },\r\n },\r\n ],\r\n });\r\n });\r\n }\r\n\r\n return acc.concat(debitRows);\r\n }, []),\r\n });\r\n\r\n if (multipayment.status === PENDING_DEBIT_STATE.awaitingPayment) {\r\n paymentRows.push({\r\n rowProps: {\r\n disableHover: true,\r\n style: {\r\n backgroundColor: theme.colors.plusDarkGrey,\r\n },\r\n },\r\n cells: [\r\n {\r\n content: (\r\n \r\n {multipayment.paymentMethod === PAYMENT_METHOD.mb && (\r\n \r\n )}\r\n {multipayment.paymentMethod === PAYMENT_METHOD.mbway && (\r\n \r\n )}\r\n \r\n {t(`payments.${multipayment.paymentMethod}`, { textOnly: true })}\r\n \r\n \r\n ),\r\n cellProps: {\r\n colSpan: 2,\r\n singleLine: false,\r\n style: {\r\n backgroundColor: theme.colors.plusDarkGrey,\r\n style: {\r\n justifyContent: 'left',\r\n },\r\n },\r\n },\r\n },\r\n // {\r\n // content: (\r\n // \r\n // <>\r\n // \r\n // {t(`payments.${multipayment.paymentMethod}Limit`, { textOnly: true })}\r\n // \r\n // \r\n // \r\n // ),\r\n // cellProps:{\r\n // colspan: 2,\r\n // singleLine: false,\r\n // style: {\r\n // backgroundColor: theme.colors.plusDarkGrey,\r\n // },\r\n // },\r\n // },\r\n {\r\n // LIMIT DATE CELL\r\n content: (\r\n \r\n <>\r\n \r\n {t(`payments.${multipayment.paymentMethod}Limit`, { textOnly: true })}\r\n \r\n \r\n {multipayment.paymentMethod === PAYMENT_METHOD.mb &&\r\n moment(multipayment.dueDate).format('DD-MM-YYYY | HH:mm')}\r\n {multipayment.paymentMethod === PAYMENT_METHOD.mbway &&\r\n (moment(remainingTime).toDate().getSeconds() > 0 ||\r\n moment(remainingTime).toDate().getMinutes() > 0) &&\r\n moment(remainingTime).format('mm:ss')}\r\n {multipayment.paymentMethod === PAYMENT_METHOD.mbway &&\r\n moment(remainingTime).toDate().getSeconds() === 0 &&\r\n moment(remainingTime).toDate().getMinutes() === 0 &&\r\n t('payments.expired', { textOnly: true })}\r\n \r\n \r\n \r\n ),\r\n cellProps: {\r\n colSpan:\r\n multipayment.paymentMethod === PAYMENT_METHOD.mb\r\n ? 4\r\n : multipayment.debits[0].associatedCosts === null\r\n ? '100%'\r\n : '100%',\r\n singleLine: false,\r\n style: {\r\n backgroundColor: theme.colors.plusDarkGrey,\r\n style: {\r\n justifyContent: 'right',\r\n },\r\n },\r\n },\r\n },\r\n ],\r\n });\r\n }\r\n\r\n if (multipayment.paymentMethod === PAYMENT_METHOD.mb) {\r\n paymentRows[paymentRows.length - 1].cells.push({\r\n content: (\r\n \r\n {<>}\r\n {/* \r\n dispatch(\r\n setIsCancelPaymentsModalOpened({\r\n id: multipayment.paymentRequestId,\r\n status: false,\r\n })\r\n )\r\n }\r\n submitButtonText={t('generic.accept', { textOnly: true })}\r\n cancelButtonText={t('generic.reject', { textOnly: true })}\r\n onCancel={() =>\r\n dispatch(\r\n setIsCancelPaymentsModalOpened({\r\n id: multipayment.paymentRequestId,\r\n status: false,\r\n })\r\n )\r\n }\r\n header={\r\n \r\n <Text size=\"xLarge\" weight=\"medium\" color=\"plusDarkGrey\">\r\n {t('payments.cancelPayment', { textOnly: true })}\r\n </Text>\r\n \r\n }\r\n onSubmit={() => {\r\n setLoadingCancel((currentValues) => {\r\n return { ...currentValues, [multipayment.paymentRequestId]: true };\r\n });\r\n\r\n try {\r\n if (!loadingCancel[multipayment.paymentRequestId]) {\r\n API.secVirtual.deletePaymentMb\r\n .call({ paymentRequestId: multipayment.paymentRequestId, registrationId })\r\n .then((value) => {\r\n dispatch(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.payments_successDeletingDebit'),\r\n icon: 'check',\r\n type: 'success',\r\n })\r\n );\r\n\r\n dispatch(actions.Payments.fetchPendingDebits());\r\n dispatch(actions.Payments.fetchDebits(DEFAULT_DEBITS_PARAMS));\r\n\r\n setLoadingCancel((currentValues) => {\r\n return { ...currentValues, [multipayment.paymentRequestId]: false };\r\n });\r\n });\r\n }\r\n } catch (e) {\r\n setLoadingCancel((currentValues) => {\r\n return { ...currentValues, [multipayment.paymentRequestId]: false };\r\n });\r\n dispatch(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.payments_errorDeletingDebit'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }}\r\n /> */}\r\n \r\n ),\r\n cellProps: {\r\n colSpan: '100%',\r\n singleLine: false,\r\n style: {\r\n backgroundColor: theme.colors.plusDarkGrey,\r\n },\r\n },\r\n });\r\n }\r\n\r\n return paymentRows;\r\n};\r\n\r\nconst getSinglepaymentTableRows = (\r\n t,\r\n theme,\r\n multipayment: IPendingDebitsEntry,\r\n openMbInfoModal,\r\n remainingTime,\r\n dispatch,\r\n loadingCancel,\r\n setLoadingCancel,\r\n registrationId,\r\n isCancelPaymentsModalOpened,\r\n setIsCancelPaymentsModalOpened\r\n) => {\r\n let paymentRows = [] as any;\r\n\r\n paymentRows.push({\r\n rowProps: {\r\n navigatable: multipayment.debits[0].associatedCosts === null ? false : true,\r\n disableHover: multipayment.debits[0].associatedCosts === null ? true : false,\r\n },\r\n //collapsableOpen: true,\r\n cells: [\r\n {\r\n content: (\r\n \r\n {multipayment.debits[0].description}\r\n \r\n ),\r\n cellProps: { colSpan: 1, singleLine: false },\r\n },\r\n {\r\n content: (\r\n \r\n \r\n {`${t('generic.euros', {\r\n textOnly: true,\r\n count: multipayment.debits[0].value.toFixed(2),\r\n })}`}\r\n \r\n \r\n ),\r\n cellProps: { colSpan: 1, width: 2, singleLine: false },\r\n },\r\n {\r\n content: (\r\n \r\n \r\n {moment(multipayment.debits[0].dueDate).format('DD-MM-YYYY')}\r\n \r\n \r\n ),\r\n cellProps: { colSpan: 1, singleLine: false },\r\n },\r\n {\r\n content: (\r\n \r\n \r\n {t(`payments.${multipayment.status}`, { textOnly: true })}\r\n \r\n }\r\n />\r\n \r\n ),\r\n cellProps: {\r\n colSpan: 1,\r\n singleLine: false,\r\n },\r\n },\r\n {\r\n content: (\r\n \r\n {multipayment.paymentMethod === PAYMENT_METHOD.mb ? (\r\n {\r\n openMbInfoModal(multipayment.paymentRequestId);\r\n }}\r\n leftIcon={}\r\n action\r\n //disabled={disableButtons}\r\n >\r\n {t('payments.show', { textOnly: true })}\r\n \r\n ) : (\r\n <>\r\n )}\r\n \r\n ),\r\n cellProps: {\r\n colSpan:\r\n multipayment.debits[0].associatedCosts !== null\r\n ? multipayment.paymentMethod === PAYMENT_METHOD.mbway\r\n ? 2\r\n : 2\r\n : '100%',\r\n singleLine: false,\r\n },\r\n },\r\n ],\r\n collapsableRows: multipayment.debits.reduce((acc, curDebit) => {\r\n let debitRows = [] as any;\r\n\r\n if (multipayment.debits[0].associatedCosts !== null) {\r\n // sub debit collapsed row with the associated costs\r\n multipayment.debits[0].associatedCosts.map((costEntry) => {\r\n debitRows.push({\r\n rowProps: {\r\n bgColor: theme.colors.softLightGrey,\r\n disableHover: true,\r\n },\r\n cells: [\r\n {\r\n content: (\r\n \r\n \r\n {ASSOCIATED_COSTS_TYPES[costEntry.type] ? (\r\n \r\n {t(`payments.${costEntry.type}`, { textOnly: true })}\r\n \r\n ) : (\r\n {costEntry.type}\r\n )}\r\n \r\n {costEntry.type !== ASSOCIATED_COSTS_TYPES.mailCost &&\r\n ASSOCIATED_COSTS_TYPES[costEntry.type] && (\r\n \r\n \r\n {`${t(`payments.${ASSOCIATED_COSTS_TYPES[costEntry.type]}`, {\r\n textOnly: true,\r\n count: costEntry.copies,\r\n })}`}\r\n \r\n \r\n )}\r\n \r\n ),\r\n cellProps: { colSpan: 1, singleLine: false },\r\n },\r\n {\r\n content: (\r\n \r\n \r\n {`${t('generic.euros', {\r\n textOnly: true,\r\n count: costEntry.value.toFixed(2),\r\n })}`}\r\n \r\n \r\n ),\r\n cellProps: { colSpan: 1, singleLine: false },\r\n },\r\n {\r\n content: '',\r\n cellProps: {\r\n colSpan: '100%',\r\n singleLine: false,\r\n },\r\n },\r\n ],\r\n });\r\n });\r\n }\r\n\r\n return acc.concat(debitRows);\r\n }, []),\r\n });\r\n\r\n if (multipayment.status === PENDING_DEBIT_STATE.awaitingPayment) {\r\n paymentRows.push({\r\n rowProps: {\r\n disableHover: true,\r\n style: {\r\n backgroundColor: theme.colors.plusDarkGrey,\r\n },\r\n },\r\n cells: [\r\n {\r\n content: (\r\n \r\n {multipayment.paymentMethod === PAYMENT_METHOD.mb && (\r\n \r\n )}\r\n {multipayment.paymentMethod === PAYMENT_METHOD.mbway && (\r\n \r\n )}\r\n \r\n {t(`payments.${multipayment.paymentMethod}`, { textOnly: true })}\r\n \r\n \r\n ),\r\n cellProps: {\r\n colSpan: 2,\r\n singleLine: false,\r\n style: {\r\n backgroundColor: theme.colors.plusDarkGrey,\r\n style: {\r\n justifyContent: 'left',\r\n },\r\n },\r\n },\r\n },\r\n // {\r\n // content: (\r\n // \r\n // <>\r\n // \r\n // {t(`payments.${multipayment.paymentMethod}Limit`, { textOnly: true })}\r\n // \r\n // \r\n // \r\n // ),\r\n // cellProps:{\r\n // colspan: 2,\r\n // singleLine: false,\r\n // style: {\r\n // backgroundColor: theme.colors.plusDarkGrey,\r\n // },\r\n // },\r\n // },\r\n {\r\n // LIMIT DATE CELL\r\n content: (\r\n \r\n <>\r\n \r\n {t(`payments.${multipayment.paymentMethod}Limit`, { textOnly: true })}\r\n \r\n \r\n {multipayment.paymentMethod === PAYMENT_METHOD.mb &&\r\n moment(multipayment.dueDate).format('DD-MM-YYYY | HH:mm')}\r\n {multipayment.paymentMethod === PAYMENT_METHOD.mbway &&\r\n (moment(remainingTime).toDate().getSeconds() > 0 ||\r\n moment(remainingTime).toDate().getMinutes() > 0) &&\r\n moment(remainingTime).format('mm:ss')}\r\n {multipayment.paymentMethod === PAYMENT_METHOD.mbway &&\r\n moment(remainingTime).toDate().getSeconds() === 0 &&\r\n moment(remainingTime).toDate().getMinutes() === 0 &&\r\n t('payments.expired', { textOnly: true })}\r\n \r\n \r\n \r\n ),\r\n cellProps: {\r\n colSpan:\r\n multipayment.paymentMethod === PAYMENT_METHOD.mb\r\n ? 5\r\n : multipayment.debits[0].associatedCosts === null\r\n ? '100%'\r\n : '100%',\r\n singleLine: false,\r\n style: {\r\n backgroundColor: theme.colors.plusDarkGrey,\r\n style: {\r\n justifyContent: 'right',\r\n },\r\n },\r\n },\r\n },\r\n ],\r\n });\r\n\r\n // if (paymentRows && paymentRows.length > 0 && multipayment.paymentMethod === PAYMENT_METHOD.mb) {\r\n // paymentRows[paymentRows.length - 1].cells.push({\r\n // content: (\r\n // \r\n // { (\r\n // <>\r\n // )}\r\n // {/* {\r\n // setLoadingCancel((currentValues) => {\r\n // return { ...currentValues, [multipayment.paymentRequestId]: true };\r\n // });\r\n\r\n // try {\r\n // if (!loadingCancel[multipayment.paymentRequestId]) {\r\n // API.secVirtual.deletePaymentMb\r\n // .call({ paymentRequestId: multipayment.paymentRequestId, registrationId })\r\n // .then((value) => {\r\n // dispatch(\r\n // actions.Toaster.showToaster({\r\n // title: t('secVirtualNotifications.payments_successDeletingDebit'),\r\n // icon: 'check',\r\n // type: 'success',\r\n // })\r\n // );\r\n\r\n // setLoadingCancel((currentValues) => {\r\n // return { ...currentValues, [multipayment.paymentRequestId]: false };\r\n // });\r\n\r\n // dispatch(actions.Payments.fetchPendingDebits());\r\n // dispatch(actions.Payments.fetchDebits(DEFAULT_DEBITS_PARAMS));\r\n // });\r\n // }\r\n // } catch (e) {\r\n // setLoadingCancel((currentValues) => {\r\n // return { ...currentValues, [multipayment.paymentRequestId]: false };\r\n // });\r\n // dispatch(\r\n // actions.Toaster.showToaster({\r\n // title: t('secVirtualNotifications.general_errorDeletingPaymentRequest'),\r\n // icon: 'error',\r\n // type: 'danger',\r\n // })\r\n // );\r\n // }\r\n // }}\r\n // onClose={() =>\r\n // dispatch(\r\n // setIsCancelPaymentsModalOpened({\r\n // id: multipayment.paymentRequestId,\r\n // status: false,\r\n // })\r\n // )\r\n // }\r\n // submitButtonText={t('payments.yes', { textOnly: true })}\r\n // cancelButtonText={t('payments.no', { textOnly: true })}\r\n // onCancel={() =>\r\n // dispatch(\r\n // setIsCancelPaymentsModalOpened({\r\n // id: multipayment.paymentRequestId,\r\n // status: false,\r\n // })\r\n // )\r\n // }\r\n // header={\r\n // \r\n // <Text size=\"xLarge\" weight=\"medium\" color=\"plusDarkGrey\">\r\n // {t('payments.cancelPayment', { textOnly: true })}\r\n // </Text>\r\n // \r\n // }\r\n // /> */}\r\n // \r\n // ),\r\n // cellProps: {\r\n // colSpan: '100%',\r\n // singleLine: false,\r\n // style: {\r\n // backgroundColor: theme.colors.plusDarkGrey,\r\n // },\r\n // },\r\n // });\r\n // }\r\n }\r\n\r\n return paymentRows;\r\n};\r\n\r\nconst compileTableRow = (\r\n multipayment: IPendingDebitsEntry,\r\n theme: any,\r\n t: ITranslations,\r\n openMbInfoModal: any,\r\n remainingTime,\r\n dispatch,\r\n loadingCancel,\r\n setLoadingCancel,\r\n registrationId,\r\n isCancelPaymentsModalOpened,\r\n setIsCancelPaymentsModalOpened\r\n) => {\r\n // multipayment: it can be a multipayment if IPendingDebitsEntry.debits length > 1, else it's a single payment\r\n if (multipayment.debits.length > 1) {\r\n return getMultipaymentTableRows(\r\n t,\r\n theme,\r\n multipayment,\r\n openMbInfoModal,\r\n remainingTime,\r\n dispatch,\r\n loadingCancel,\r\n setLoadingCancel,\r\n registrationId,\r\n isCancelPaymentsModalOpened,\r\n setIsCancelPaymentsModalOpened\r\n );\r\n } else if (multipayment.debits.length === 1) {\r\n return getSinglepaymentTableRows(\r\n t,\r\n theme,\r\n multipayment,\r\n openMbInfoModal,\r\n remainingTime,\r\n dispatch,\r\n loadingCancel,\r\n setLoadingCancel,\r\n registrationId,\r\n isCancelPaymentsModalOpened,\r\n setIsCancelPaymentsModalOpened\r\n );\r\n }\r\n};\r\n\r\nconst PendingDebitsTable = ({ t, data, loading, openMbInfoModal }: IPendingDebitsTableProps) => {\r\n const [countdowns, setCountdowns] = useState({});\r\n const [loadingCancel, setLoadingCancel] = useState({});\r\n\r\n const toHHMMSS = (timeInSeconds: number) => {\r\n let hours = Math.floor(timeInSeconds / 3600);\r\n let minutes = Math.floor((timeInSeconds - hours * 3600) / 60);\r\n let seconds = timeInSeconds - hours * 3600 - minutes * 60;\r\n let date = new Date();\r\n date.setHours(hours, minutes, seconds);\r\n return date;\r\n };\r\n\r\n useEffect(() => {\r\n let newCountdowns = {};\r\n data.forEach((debitItem) => {\r\n let timeList = debitItem.remainingTime.split('.');\r\n\r\n if (debitItem.paymentMethod === PAYMENT_METHOD.mbway) {\r\n newCountdowns = {\r\n ...newCountdowns,\r\n [debitItem.paymentRequestId]: moment(timeList[0], 'HH:mm:ss').toDate(),\r\n };\r\n }\r\n });\r\n\r\n setCountdowns(newCountdowns);\r\n }, [data]);\r\n\r\n useEffect(() => {\r\n const timer = setInterval(() => {\r\n let newCountdowns = {};\r\n\r\n Object.keys(countdowns).map((countdownKey) => {\r\n let remainingTimeInSeconds =\r\n +0 + // countdowns[countdownKey].getHours() * 60 * 60 +\r\n countdowns[countdownKey].getMinutes() * 60 +\r\n +countdowns[countdownKey].getSeconds();\r\n\r\n if (remainingTimeInSeconds > 0) {\r\n remainingTimeInSeconds -= 1;\r\n }\r\n\r\n newCountdowns[countdownKey] = toHHMMSS(remainingTimeInSeconds);\r\n });\r\n\r\n setCountdowns(newCountdowns);\r\n }, 1000);\r\n\r\n return () => (timer ? clearInterval(timer) : undefined);\r\n }, [countdowns]);\r\n\r\n const { structure } = useTable(\r\n t,\r\n data,\r\n compileTableRow,\r\n openMbInfoModal,\r\n countdowns,\r\n loadingCancel,\r\n setLoadingCancel\r\n );\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default PendingDebitsTable;\r\n\r\nconst CellWrapper = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: center;\r\n align-items: center;\r\n\r\n svg {\r\n margin-right: 14px;\r\n }\r\n`;\r\n\r\nconst TimeLimitText = styled(Text)`\r\n margin-right: 8px;\r\n`;\r\n\r\nconst CellWrapperPayIconMethod = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: left;\r\n align-items: center;\r\n svg {\r\n margin-right: 22px;\r\n margin-left: 16px;\r\n }\r\n`;\r\n\r\nconst CellWrapperPayMethod = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: left;\r\n align-items: center;\r\n svg {\r\n margin-right: 14px;\r\n }\r\n`;\r\n\r\nconst ExtraFeeWrapper = styled.div``;\r\n\r\n/*const Button = styled(ButtonComponent)`\r\n width: 100%;\r\n`;*/\r\n\r\nconst PendingDebitsTableWrapper = styled.div`\r\n overflow: auto;\r\n &&& th {\r\n padding-right: 14px !important;\r\n padding-left: 14px !important;\r\n padding-top: 0px !important;\r\n padding-bottom: 0px !important;\r\n height: 61px;\r\n }\r\n\r\n &&& td {\r\n padding-right: 14px !important;\r\n padding-left: 14px !important;\r\n padding-top: 0px !important;\r\n padding-bottom: 0px !important;\r\n height: 76px;\r\n }\r\n\r\n /*&&& tr {\r\n td:first-child {\r\n border-left: 0px;\r\n }\r\n }*/\r\n\r\n &&& .ui.table tfoot tr td {\r\n height: 45px;\r\n }\r\n`;\r\n\r\nconst ShowButton = styled(Button)`\r\n &&& svg {\r\n margin-right: 0px;\r\n }\r\n\r\n width: 113px;\r\n`;\r\n\r\nconst PaymentIdText = styled(Text)`\r\n line-height: inherit;\r\n`;\r\n\r\nconst CellWrapperMultiPayment = styled.div``;\r\n\r\nconst CostCellWrapper = styled.div`\r\n display: flex;\r\n justify-content: center;\r\n`;\r\n\r\nconst ButtonCellWrapper = styled.div`\r\n display: flex;\r\n justify-content: left;\r\n`;\r\n\r\nconst ExtraFeeCellWrapper = styled.div`\r\n line-height: 1;\r\n`;\r\n\r\nconst ExtraFeeValueCellWrapper = styled.div`\r\n line-height: 1;\r\n margin-top: 4px;\r\n`;\r\n\r\nconst Title = styled.div`\r\n margin-bottom: 20px;\r\n`;\r\n\r\nconst LabelCellWrapper = styled(CellWrapper)`\r\n > div {\r\n max-width: unset;\r\n }\r\n`;\r\n","/**\r\n * Payment Modal container\r\n *\r\n * @author Nuno Gago \r\n * TODO To be finished. Waiting for design mock\r\n */\r\n\r\nimport React, { useContext } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\nimport { useDispatch } from 'react-redux';\r\n\r\nimport moment from 'moment';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faInfoCircle, faEllipsisH } from '@fortawesome/pro-light-svg-icons';\r\n\r\nimport { t } from 'app';\r\n\r\nimport { AnimatedBackground, Button, Modal, Text } from '@paco_ua/pacoui';\r\n\r\nimport { IPaymentDetailMb } from './types';\r\n\r\ninterface IPaymentModal {\r\n open: boolean;\r\n onClose(): void;\r\n mbPaymentDetails: IPaymentDetailMb | null;\r\n currentLocale: string;\r\n loading: boolean;\r\n}\r\n\r\nconst MbPaymentInfoModal = ({\r\n onClose,\r\n open,\r\n mbPaymentDetails,\r\n currentLocale,\r\n loading,\r\n}: IPaymentModal) => {\r\n const dispatch = useDispatch();\r\n const theme = useContext(ThemeContext);\r\n\r\n const getPaymentDetailsTable = (paymentDetails: IPaymentDetailMb) => {\r\n let table = [] as any;\r\n\r\n Object.keys(paymentDetails).forEach((key) => {\r\n if (key !== 'paymentRequestId') {\r\n table.push(\r\n \r\n \r\n \r\n {t(`payments.${key}`)}\r\n \r\n \r\n\r\n {(paymentDetails[key] === '' || paymentDetails[key] === null) && (\r\n \r\n )}\r\n {paymentDetails[key] !== '' && paymentDetails[key] !== null && key === 'dueDate' && (\r\n \r\n {moment(paymentDetails[key]).format('DD-MM-YYYY')}\r\n \r\n )}\r\n {paymentDetails[key] !== '' &&\r\n paymentDetails[key] !== null &&\r\n key !== 'dueDate' &&\r\n key !== 'value' && (\r\n \r\n {paymentDetails[key]}\r\n \r\n )}\r\n {paymentDetails[key] !== '' && paymentDetails[key] !== null && key === 'value' && (\r\n \r\n {`${parseFloat(paymentDetails[key]).toLocaleString(currentLocale, {\r\n minimumFractionDigits: 2,\r\n })} ${t('generic.euros', { textOnly: true })}`}\r\n \r\n )}\r\n \r\n );\r\n }\r\n });\r\n\r\n return table;\r\n };\r\n\r\n return (\r\n {\r\n onClose && onClose();\r\n }}\r\n >\r\n <>\r\n \r\n <Text loading={loading} size=\"xLarge\" weight=\"medium\" color=\"plusDarkGrey\">\r\n {t('payments.atmPaymentDetails', { textOnly: true })}\r\n </Text>\r\n \r\n\r\n {loading && (\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {!loading && mbPaymentDetails && Object.keys(mbPaymentDetails).length > 0 && (\r\n \r\n \r\n \r\n {t('payments.atmReference', { readOnly: true })}\r\n \r\n \r\n {getPaymentDetailsTable(mbPaymentDetails)}\r\n \r\n )}\r\n\r\n {!loading && (mbPaymentDetails === null || Object.keys(mbPaymentDetails).length <= 0) && (\r\n \r\n \r\n \r\n \r\n \r\n {t('payments.nopaymentDetailsInfo', { textOnly: true })}\r\n \r\n \r\n )}\r\n\r\n \r\n {\r\n onClose && onClose();\r\n }}\r\n action\r\n color={theme.colors.primary}\r\n >\r\n {t('generic.close')}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default MbPaymentInfoModal;\r\n\r\nconst Title = styled.div`\r\n margin-bottom: 20px;\r\n`;\r\n\r\nconst ButtonsProgressWrapper = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: flex-end;\r\n\r\n margin-top: 48px;\r\n`;\r\n\r\nconst MbwayResponseWrapper = styled.div`\r\n margin-top: 24px;\r\n background-color: ${({ theme }) => theme.colors.softGrey};\r\n border-style: solid;\r\n border-width: thin;\r\n border-color: ${({ theme }) => theme.colors.softLightGrey};\r\n border-top: 3px solid ${({ theme }) => theme.colors.primary};\r\n padding: 16px 40px;\r\n display: flex;\r\n flex-wrap: wrap;\r\n justify-content: space-between;\r\n`;\r\n\r\nconst MbwayResponseColumn = styled.div``;\r\n\r\nconst TextFieldTitle = styled.div`\r\n margin: 0px 0px 12px 0px;\r\n`;\r\n\r\nconst MessageNoInfo = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n text-align: center;\r\n justify-content: center;\r\n margin-top: 60px;\r\n margin-bottom: 20px;\r\n\r\n div:nth-child(2) {\r\n margin-top: 16px;\r\n }\r\n`;\r\n\r\nconst Icon = styled.div`\r\n font-size: 60px;\r\n color: ${({ theme }) => theme.colors.primary};\r\n`;\r\n\r\nconst MBReferenceTitle = styled.div``;\r\n\r\nconst MbReferenceInfo = styled.div`\r\n margin-top: 48px;\r\n`;\r\n\r\nconst LoadingWrapper = styled.div<{ height: string }>`\r\n width: 100%;\r\n margin-top: 48px;\r\n margin-bottom: 148px;\r\n\r\n height: ${({ height }) => `${height}`};\r\n\r\n &&& div:first-child {\r\n margin-bottom: 24px;\r\n }\r\n`;\r\n","/**\r\n * Payments scene\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport React, { useEffect, useState } from 'react';\r\nimport styled from 'styled-components';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport * as selectors from './logic/selectors';\r\nimport { actions } from 'store/rootSlices';\r\nimport { useLocation } from 'react-router-dom';\r\nimport { CallToAction, Segment, MultiToggle, Text } from '@paco_ua/pacoui';\r\n\r\nimport PaymentMethodsInfo from './containers/PaymenMethodsInfo';\r\nimport PaymentsTable from './containers/PaymentsTable';\r\nimport DebitsTable from './containers/DebitsTable';\r\nimport PendingDebitsTable from './containers/PendingDebitsTable';\r\nimport MbPaymentInfoModal from './containers/MbPaymentInfoModal';\r\n\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport StudentRegistrationDropdown from 'shared/containers/StudentRegistrationDropdown';\r\nimport Header from 'shared/containers/TitleHeader';\r\n\r\nconst Payments = ({ t }) => {\r\n //const theme = useContext(ThemeContext);\r\n\r\n const {\r\n onMount,\r\n onUnmount,\r\n fetchData,\r\n fetchPayments,\r\n fetchDebits,\r\n setSelectedDebits,\r\n setPreSelectedDebits,\r\n resetDebitsList,\r\n setSearchFilter,\r\n setTypeFilter,\r\n setIsMbInfoModalOpened,\r\n setConsultedMbPaymentInfo,\r\n fetchMbPaymentDetails,\r\n } = actions.Payments;\r\n\r\n const dispatch = useDispatch();\r\n\r\n const { navigateTo } = actions.App;\r\n\r\n const {\r\n payments,\r\n debits,\r\n loadingStatus,\r\n errorStatus,\r\n selectedDebits,\r\n preSelectedDebits,\r\n debitsFilterTypes,\r\n filterParams,\r\n pendingDebits,\r\n isMbInfoModalOpened,\r\n consultedMbPaymentInfo,\r\n } = useSelector(selectors.getPaymentsSlice);\r\n\r\n const registrationId = useSelector(selectors.getRegistrationId);\r\n const user = useSelector(selectors.getUser);\r\n const [initialLoading, setInitialLoading] = useState(true);\r\n const [changePaymentTab, setChangePaymentTab] = useState(true); // Change payment Tab\r\n\r\n const appSlice = useSelector(selectors.getAppSlice);\r\n const location = useLocation();\r\n\r\n useEffect(() => {\r\n setInitialLoading(true);\r\n dispatch(onMount(location.state));\r\n return () => {\r\n dispatch(onUnmount());\r\n };\r\n }, [dispatch, onMount, onUnmount, user.impersonate]);\r\n\r\n useEffect(() => {\r\n if (registrationId !== null && registrationId !== undefined) {\r\n dispatch(fetchData());\r\n }\r\n }, [registrationId]);\r\n\r\n const [pageErrorDisplayed, setPageErrorDisplayed] = useState(false);\r\n\r\n // present error notification when an error occurs while fetching information\r\n // for one of the tables\r\n useEffect(() => {\r\n if (!pageErrorDisplayed) {\r\n if (\r\n errorStatus.errorLoadingDebitsTable ||\r\n errorStatus.errorLoadingPendingDebitsTable ||\r\n errorStatus.errorLoadingPaymentsTable\r\n ) {\r\n dispatch(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.payments_errorLoadingPage'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n setPageErrorDisplayed(true);\r\n }\r\n }\r\n }, [errorStatus]);\r\n\r\n // disable initial error after the initial loading is successfull\r\n useEffect(() => {\r\n if (\r\n initialLoading &&\r\n !(\r\n loadingStatus.loading ||\r\n loadingStatus.loadingDebitsTable ||\r\n loadingStatus.loadingPaymentsTable ||\r\n loadingStatus.loadingPendingDebitsTable ||\r\n errorStatus.errorLoadingDebitsTable ||\r\n errorStatus.errorLoadingPendingDebitsTable ||\r\n errorStatus.errorLoadingPaymentsTable\r\n )\r\n ) {\r\n setInitialLoading(false);\r\n }\r\n }, [errorStatus, loadingStatus]);\r\n\r\n return (\r\n }\r\n subHeader={}\r\n secondaryContent={} />}\r\n mainContent={\r\n <>\r\n \r\n {\r\n if (!changePaymentTab) setChangePaymentTab(true);\r\n },\r\n children: t('payments.paymentsTitle', { textOnly: true }),\r\n selected: changePaymentTab ? 'ready' : '',\r\n testId: '',\r\n },\r\n {\r\n onClick: () => {\r\n if (changePaymentTab) setChangePaymentTab(false);\r\n },\r\n children: t('payments.historySectionLabel', { textOnly: true }),\r\n selected: changePaymentTab ? '' : 'ready',\r\n testId: '',\r\n },\r\n ]}\r\n content={'buttons'}\r\n />\r\n \r\n\r\n {changePaymentTab ? (\r\n <>\r\n {pendingDebits.data.length > 0 ? (\r\n \r\n \r\n \r\n \r\n {t('payments.pendingDebitsTableTitle', { textOnly: true })}\r\n \r\n \r\n\r\n {\r\n dispatch(fetchMbPaymentDetails(paymentRequestId));\r\n }}\r\n />\r\n \r\n \r\n ) : (\r\n <>\r\n )}\r\n {isMbInfoModalOpened && (\r\n {\r\n dispatch(setIsMbInfoModalOpened(false));\r\n dispatch(setConsultedMbPaymentInfo(null));\r\n }}\r\n open={isMbInfoModalOpened}\r\n mbPaymentDetails={consultedMbPaymentInfo}\r\n currentLocale={appSlice.currentLocale}\r\n loading={loadingStatus.mbInfoModalLoading}\r\n />\r\n )}\r\n \r\n \r\n \r\n \r\n {t('payments.debitsSectionTitle', { textOnly: true })}\r\n \r\n \r\n\r\n {\r\n dispatch(resetDebitsList());\r\n dispatch(\r\n navigateTo({\r\n key: 'pendingDebitsPayment',\r\n })\r\n );\r\n }}\r\n preSelectedDebits={preSelectedDebits}\r\n fetchDebits={(params) => {\r\n dispatch(fetchDebits(params));\r\n }}\r\n setPreSelectedDebits={(debits) => {\r\n dispatch(setPreSelectedDebits(debits));\r\n dispatch(setSelectedDebits(debits));\r\n }}\r\n selectedDebits={selectedDebits}\r\n addFilters={{\r\n searchPlaceholder: t('forms.searchPlaceholder', { textOnly: true }),\r\n dropdownPlaceholder: t('paymentTool.multiPaymentFilter', {\r\n textOnly: true,\r\n }),\r\n onSearch: (value) => {\r\n dispatch(setSearchFilter(value));\r\n },\r\n onFilterChange: (value) => {\r\n dispatch(setTypeFilter(value));\r\n },\r\n onFilterClear: (value) => {\r\n dispatch(setTypeFilter(value));\r\n },\r\n filterTypes: debitsFilterTypes,\r\n }}\r\n filterParams={filterParams}\r\n {...debits}\r\n />\r\n\r\n \r\n \r\n {`${t('generic.note', { textOnly: true })}:`}\r\n \r\n \r\n {t('payments.pendingDebitsInfo')}\r\n \r\n \r\n \r\n \r\n \r\n ) : (\r\n <>\r\n \r\n \r\n \r\n \r\n {t('payments.historySectionLabel', { textOnly: true })}\r\n \r\n \r\n\r\n dispatch(fetchPayments(params))}\r\n {...payments}\r\n />\r\n \r\n \r\n \r\n )}\r\n \r\n }\r\n />\r\n );\r\n};\r\n\r\nexport default Payments;\r\n\r\nconst Row = styled.div<{ paddingtop?: string; paddingbottom?: string }>`\r\n padding-top: ${({ paddingtop }) => (paddingtop ? paddingtop : '1rem')};\r\n padding-bottom: ${({ paddingbottom }) => (paddingbottom ? paddingbottom : '1rem')};\r\n`;\r\n\r\nconst TableHeader = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n justify-content: space-between;\r\n margin-bottom: 20px;\r\n`;\r\n\r\nconst TableFooter = styled.div`\r\n margin-top: 24px;\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\n/*const WrapperColumn = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst WrapperPayments = styled.div<{ noMargin?: boolean }>`\r\n display: flex;\r\n justify-content: space-between;\r\n margin-top: ${({ noMargin }) => (noMargin ? '0' : '16px')};\r\n\r\n ${WrapperColumn} {\r\n > div:first-child {\r\n padding-bottom: 8px;\r\n }\r\n }\r\n`;*/\r\n\r\nconst TableFooterText = styled(Text)`\r\n margin-top: 8px;\r\n line-height: 1.3;\r\n`;\r\n\r\nconst TableFooterNoteText = styled(Text)``;\r\n\r\nconst MultiToggleWrapper = styled.div`\r\n border-bottom: 1px solid ${({ theme }) => theme.colors.primary};\r\n`;\r\n","export const ASSOCIATED_COSTS_TYPES = {\r\n lateFeeCost: {\r\n name: 'lateFeeCost',\r\n unit: 'days',\r\n },\r\n ucCost: {\r\n name: 'lateFeeCost',\r\n unit: 'ucs',\r\n },\r\n certCost: {\r\n name: 'unit',\r\n unit: 'copies',\r\n },\r\n mailCost: {\r\n name: 'deliveryFee',\r\n unit: 'delivery',\r\n },\r\n};\r\n\r\ninterface IPaymentMethods {\r\n MB: string;\r\n VISA: string;\r\n MBWAY: string;\r\n}\r\n\r\nexport const PAYMENT_METHODS: IPaymentMethods = {\r\n MB: 'mb',\r\n MBWAY: 'mbway',\r\n VISA: 'visa',\r\n};\r\n\r\nexport interface IMbwayResponse {\r\n entity: number;\r\n ref: number;\r\n value: string;\r\n dueDate: string;\r\n}\r\n","/**\r\n * SelectedPayments container\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport React, { useContext } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { t } from 'app';\r\n\r\nimport moment from 'moment';\r\n\r\nimport { Grid } from 'semantic-ui-react';\r\nimport { Text, Segment, StatusLabel } from '@paco_ua/pacoui';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faEllipsisH } from '@fortawesome/pro-light-svg-icons';\r\n\r\nimport { DEBIT_STATUS } from '../../../containers/DebitsTable/utils';\r\nimport { ASSOCIATED_COSTS_TYPES } from '../../types';\r\n\r\nconst SelectedPayments = ({ selectedDebits }) => {\r\n const theme = useContext(ThemeContext);\r\n\r\n const DEBIT_SITUATION_COLOR = {\r\n [DEBIT_STATUS.UNPAID]: theme.colors.darkGrey,\r\n [DEBIT_STATUS.IN_DEBIT]: theme.colors.dangerRed,\r\n [DEBIT_STATUS.AWAITING_PAYMENT]: theme.colors.darkGrey,\r\n [DEBIT_STATUS.IN_DEBIT_AWAITING_PAYMENT]: theme.colors.dangerRed,\r\n };\r\n\r\n const DEBIT_SITUATION = {\r\n unpaid: 'unpaid',\r\n inDebit: 'inDebit',\r\n awaitingPayment: 'unpaid',\r\n inDebitAwaitingPayment: 'inDebit',\r\n };\r\n\r\n const getDebitTitleColor = (debitType: string) => {\r\n return debitType === DEBIT_SITUATION.inDebit ||\r\n debitType === DEBIT_SITUATION.inDebitAwaitingPayment\r\n ? 'dangerRed'\r\n : 'plusDarkGrey';\r\n };\r\n\r\n return (\r\n \r\n {selectedDebits.map((debit, index) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {debit.debitType}\r\n \r\n \r\n {debit.description}\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n {t('payments.value', { textOnly: true })}\r\n \r\n \r\n {`${debit.value.toFixed(2)} ${t('generic.euros', { textOnly: true })}`}\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n {t('payments.debitsTableDueDate', { textOnly: true })}\r\n \r\n {debit.dueDate ? (\r\n \r\n {moment(debit.dueDate).format('DD-MM-YYYY')}\r\n \r\n ) : (\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n\r\n \r\n \r\n \r\n {t('payments.debitsTablePaymentStatus', { textOnly: true })}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {debit.associatedCosts &&\r\n debit.associatedCosts.length > 0 &&\r\n debit.associatedCosts.map((associatedCost, index) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {ASSOCIATED_COSTS_TYPES[associatedCost.type] ? \r\n \r\n {t(`payments.${ASSOCIATED_COSTS_TYPES[associatedCost.type].name}`, {\r\n textOnly: true,\r\n })}\r\n : \r\n \r\n {associatedCost.type}\r\n }\r\n {ASSOCIATED_COSTS_TYPES[associatedCost.type] &&\r\n \r\n {`${t(\r\n `payments.${ASSOCIATED_COSTS_TYPES[associatedCost.type].unit}`,\r\n {\r\n textOnly: true,\r\n count: Number(associatedCost.copies),\r\n }\r\n )}`}\r\n \r\n }\r\n \r\n \r\n\r\n \r\n \r\n \r\n {`${associatedCost.value.toFixed(2)} ${t('generic.euros', {\r\n textOnly: true,\r\n })}`}\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n })}\r\n \r\n );\r\n })}\r\n \r\n );\r\n};\r\n\r\nexport default SelectedPayments;\r\n\r\nconst Wrapper = styled.div``;\r\n\r\nconst DebitSegmentWrapper = styled.div`\r\n margin-bottom: 12px;\r\n`;\r\n\r\nconst PaymentsContainer = styled.div`\r\n display: flex;\r\n\r\n &&& .ui.grid {\r\n margin: 0px !important;\r\n width: 100%;\r\n }\r\n\r\n &&& .ui.grid > .column:not(.row) {\r\n padding: 0px !important;\r\n }\r\n`;\r\n\r\nconst WrapperColumnFeePrice = styled.div`\r\n height: 100%;\r\n display: flex;\r\n align-items: center;\r\n`;\r\n\r\nconst WrapperColumn = styled.div<{ marginTop?: string; maxWidth?: string }>`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n > div:last-child {\r\n margin-top: ${({ marginTop }) => (marginTop ? marginTop : '8px')};\r\n }\r\n`;\r\n\r\nconst TuitionText = styled(Text)`\r\n overflow: hidden;\r\n padding-right: 42px;\r\n`;\r\n\r\nconst TuitionPriceText = styled(Text)``;\r\n\r\nconst EllipsisWrapper = styled.div`\r\n margin-top: 8px;\r\n`;\r\n","/**\r\n * SelectDetails container\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport React, { useContext } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { t } from 'app';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport * as selectors from '../../logic/selectors';\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faInfoCircle } from '@fortawesome/pro-light-svg-icons';\r\n\r\nimport { Grid } from 'semantic-ui-react';\r\nimport { Text, Segment, Checkbox } from '@paco_ua/pacoui';\r\n\r\nimport SelectedPayments from '../../components/SelectedPayments';\r\n\r\nconst SelectDetails = ({ preSelectedDebits, multiPaymentsComponent }) => {\r\n const theme = useContext(ThemeContext);\r\n\r\n const dispatch = useDispatch();\r\n\r\n const { showMorePayments } = useSelector(selectors.getPendingDebitsPaymentSlice);\r\n const { setSelectedDebits } = actions.Payments;\r\n\r\n const { setShowMorePayments } = actions.PendingDebitsPayment;\r\n\r\n return (\r\n \r\n {preSelectedDebits.length > 0 && (\r\n <>\r\n \r\n \r\n {t('payments.performedSelection')}\r\n \r\n \r\n\r\n \r\n\r\n {/* \r\n \r\n <Text size=\"medium\" weight=\"regular\" color=\"plusDarkGrey\">\r\n {t('paymentTool.multipaymentTitle')}\r\n </Text>\r\n \r\n \r\n \r\n {t('paymentTool.multipaymentDescription')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {t('paymentTool.checkboxMultipaymentTitle')}\r\n \r\n \r\n {t('paymentTool.checkboxMultipaymentDesciption')}\r\n \r\n \r\n {\r\n dispatch(setShowMorePayments(!showMorePayments));\r\n\r\n if (showMorePayments) {\r\n dispatch(setSelectedDebits(preSelectedDebits)); // reset selectedDebits to preSelectedDebits\r\n }\r\n }}\r\n />\r\n \r\n \r\n\r\n {showMorePayments && multiPaymentsComponent && (\r\n \r\n {multiPaymentsComponent}\r\n \r\n )}\r\n */}\r\n \r\n )}\r\n\r\n {preSelectedDebits.length === 0 && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {t('payments.noDebitsSelect', { textOnly: true })}\r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default SelectDetails;\r\n\r\nconst SegmentTitleWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n margin-bottom: 16px;\r\n`;\r\n\r\nconst MessageNoApplications = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n text-align: center;\r\n justify-content: center;\r\n margin-top: 60px;\r\n margin-bottom: 20px;\r\n\r\n div:nth-child(2) {\r\n margin-top: 16px;\r\n }\r\n`;\r\n\r\nconst Icon = styled.div`\r\n font-size: 60px;\r\n color: ${({ theme }) => theme.colors.primary};\r\n`;\r\n\r\nconst WrapperColumn = styled.div<{ marginTop?: string; maxWidth?: string }>`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n > div:last-child {\r\n margin-top: ${({ marginTop }) => (marginTop ? marginTop : '8px')};\r\n }\r\n`;\r\n\r\nconst SegmentCheckbox = styled.div<{ checked?: boolean }>`\r\n padding: 18px 48px 18px 24px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n\r\n background-color: ${({ theme, checked }) => (checked ? theme.colors.primary : 'transparent')};\r\n\r\n > div:first-child {\r\n flex: 1;\r\n }\r\n`;\r\n\r\nconst CheckboxMultiPayText = styled(Text)`\r\n margin-top: 8px;\r\n`;\r\n\r\nconst Title = styled.div``;\r\n\r\nconst Description = styled.div``;\r\n\r\nconst WrapperOtherPayments = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n margin-top: 24px;\r\n\r\n line-height: 1.3;\r\n\r\n ${Title} {\r\n margin-bottom: 16px;\r\n }\r\n\r\n ${Description} {\r\n margin-bottom: 16px;\r\n }\r\n`;\r\n\r\nconst WrapperMultiDebts = styled.div`\r\n margin-top: 24px;\r\n`;\r\n","/**\r\n * SelectDetails container\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport React, { useContext } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { t } from 'app';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport * as selectors from '../../logic/selectors';\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faInfoCircle } from '@fortawesome/pro-light-svg-icons';\r\n\r\nimport { Grid } from 'semantic-ui-react';\r\nimport { Text, Segment } from '@paco_ua/pacoui';\r\n\r\nimport { MbIcon, MbWayIcon /*, VisaIcon*/ } from 'shared/components/Icons';\r\n\r\nimport SelectedPayments from '../../components/SelectedPayments';\r\n\r\n//import config from 'config'\r\n\r\nconst SelectPaymentMethod = ({ selectedDebits, totalCost, allowMbwayPayment }) => {\r\n const theme = useContext(ThemeContext);\r\n const dispatch = useDispatch();\r\n\r\n const MBWAY_PAYMENT_LIMIT = 110; // euros\r\n\r\n const { paymentMethod } = useSelector(selectors.getPendingDebitsPaymentSlice);\r\n\r\n const { setPaymentMethod } = actions.PendingDebitsPayment;\r\n\r\n const handleMethodSelection = (type: string) => {\r\n if (type === paymentMethod) {\r\n dispatch(setPaymentMethod(undefined));\r\n return;\r\n }\r\n\r\n dispatch(setPaymentMethod(type));\r\n };\r\n\r\n return (\r\n <>\r\n \r\n {selectedDebits.length > 0 && (\r\n <>\r\n \r\n \r\n {t('payments.performedSelection')}\r\n \r\n \r\n\r\n \r\n \r\n )}\r\n {selectedDebits.length === 0 && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {t('payments.noDebitsSelect', { textOnly: true })}\r\n \r\n \r\n \r\n )}\r\n \r\n\r\n \r\n \r\n \r\n {t('payments.paymentMethodsTitle', { textOnly: true })}\r\n \r\n\r\n \r\n {t('payments.selectPaymentMethodModalSubtitle', { textOnly: true })}\r\n \r\n \r\n\r\n \r\n \r\n MBWAY_PAYMENT_LIMIT || !allowMbwayPayment}\r\n disableCursor={totalCost > MBWAY_PAYMENT_LIMIT || !allowMbwayPayment}\r\n active={\r\n paymentMethod === 'mbway' && totalCost <= MBWAY_PAYMENT_LIMIT && allowMbwayPayment\r\n }\r\n onClick={() => handleMethodSelection('mbway')}\r\n >\r\n MBWAY_PAYMENT_LIMIT || !allowMbwayPayment\r\n ? theme.colors.grey\r\n : undefined\r\n }\r\n />\r\n \r\n {t('payments.mbWay', { textOnly: true })}\r\n \r\n \r\n {/*\r\n \r\n */}\r\n \r\n\r\n {totalCost > MBWAY_PAYMENT_LIMIT && (\r\n \r\n \r\n {t('payments.mbwayDisabledNote', { textOnly: true })}\r\n \r\n \r\n )}\r\n\r\n {!allowMbwayPayment && (\r\n \r\n \r\n {t('payments.mbwayNotAllowedNote', { textOnly: true })}\r\n \r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default SelectPaymentMethod;\r\n\r\nconst WrapperTitlePayment = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n > div:not(:last-child) {\r\n margin-bottom: 16px;\r\n }\r\n`;\r\n\r\nconst MbwayDisabledNote = styled.div``;\r\n\r\nconst SegmentTitleWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n margin-bottom: 16px;\r\n`;\r\n\r\nconst MessageNoApplications = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n text-align: center;\r\n justify-content: center;\r\n margin-top: 60px;\r\n margin-bottom: 20px;\r\n\r\n div:nth-child(2) {\r\n margin-top: 16px;\r\n }\r\n`;\r\n\r\nconst Icon = styled.div`\r\n font-size: 60px;\r\n color: ${({ theme }) => theme.colors.primary};\r\n`;\r\n\r\nconst Option = styled.button<{\r\n active: boolean;\r\n disableCursor?: boolean;\r\n}>`\r\n width: 140px;\r\n height: 140px;\r\n cursor: ${({ theme, disableCursor }) => (disableCursor ? 'default' : 'pointer')};\r\n background: none;\r\n\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n\r\n margin: 12px;\r\n border: 0.5px solid ${({ theme }) => theme.colors.softGrey};\r\n\r\n div {\r\n margin-top: 16px;\r\n }\r\n\r\n // ACTIVE STYLE\r\n\r\n ${({ active, theme }) =>\r\n active &&\r\n `\r\n background: ${theme.colors.primary};\r\n border: none;\r\n\r\n * {\r\n path {\r\n fill: ${theme.colors.white};\r\n }\r\n }\r\n\r\n div {\r\n color: ${theme.colors.white};\r\n }\r\n `}\r\n\r\n // HOVER STYLE\r\n\r\n &:hover:not([disabled]) {\r\n background: ${({ theme }) => theme.colors.primary};\r\n border: none;\r\n\r\n * {\r\n path {\r\n fill: ${({ theme }) => theme.colors.white};\r\n }\r\n }\r\n\r\n div {\r\n color: ${({ theme }) => theme.colors.white};\r\n }\r\n }\r\n\r\n // RESPONSIVENESS\r\n\r\n @media (max-width: 590px) {\r\n width: 100%;\r\n height: 150px;\r\n margin-left: 0;\r\n margin-right: 0;\r\n }\r\n`;\r\n\r\nconst Options = styled.div`\r\n flex: 1;\r\n display: flex;\r\n flex-wrap: wrap;\r\n align-items: center;\r\n justify-content: center;\r\n\r\n padding: 20px 0px;\r\n\r\n @media (max-width: 902px) {\r\n padding-top: 40px;\r\n padding-bottom: 40px;\r\n }\r\n\r\n @media (max-width: 590px) {\r\n padding-top: 24px;\r\n padding-bottom: 24px;\r\n\r\n button {\r\n width: 100%;\r\n }\r\n }\r\n`;\r\n\r\nconst PaymentMethodColumn = styled(Grid.Column)`\r\n margin-top: 40px;\r\n`;\r\n","/**\r\n * SelectDetails container\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport React, { useContext } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { t } from 'app';\r\n\r\nimport { Controller } from 'react-hook-form';\r\nimport FormInputWithFlags from 'shared/components/FormInputWithFlags';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport * as selectors from '../../logic/selectors';\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faInfoCircle, faEllipsisH } from '@fortawesome/pro-light-svg-icons';\r\n\r\nimport moment from 'moment';\r\n\r\nimport { Grid } from 'semantic-ui-react';\r\nimport { Text, Segment } from '@paco_ua/pacoui';\r\n\r\nimport SelectedPayments from '../../components/SelectedPayments';\r\n\r\nconst SubmitPaymentRequest = ({\r\n selectedDebits,\r\n formControl,\r\n formRegister,\r\n formGetValues,\r\n formErrors,\r\n currentLocale,\r\n}) => {\r\n const theme = useContext(ThemeContext);\r\n\r\n const { paymentMethod, mbwayForm, mbwayResponse } = useSelector(\r\n selectors.getPendingDebitsPaymentSlice\r\n );\r\n\r\n const { setMbwayForm } = actions.PendingDebitsPayment;\r\n\r\n const dispatch = useDispatch();\r\n\r\n interface IPaymentMethods {\r\n MB: string;\r\n VISA: string;\r\n MBWAY: string;\r\n }\r\n\r\n const PAYMENT_METHODS: IPaymentMethods = {\r\n MB: 'mb',\r\n MBWAY: 'mbway',\r\n VISA: 'visa',\r\n };\r\n\r\n return (\r\n <>\r\n \r\n {selectedDebits.length > 0 && (\r\n <>\r\n \r\n \r\n {t('payments.performedSelection')}\r\n \r\n \r\n\r\n \r\n \r\n )}\r\n\r\n {selectedDebits.length === 0 && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {t('payments.noDebitsSelect', { textOnly: true })}\r\n \r\n \r\n \r\n )}\r\n \r\n\r\n \r\n {paymentMethod === PAYMENT_METHODS.MBWAY && (\r\n <>\r\n \r\n \r\n {t('payments.paymentMethodsTitle', { readOnly: true })}\r\n \r\n \r\n \r\n \r\n MB WAY\r\n \r\n \r\n\r\n
    \r\n \r\n \r\n \r\n \r\n {t('payments.phoneNumber', { textOnly: true })}\r\n \r\n \r\n {' *'}\r\n \r\n \r\n \r\n {\r\n return (\r\n {\r\n onChange(data);\r\n dispatch(setMbwayForm(formGetValues()));\r\n }}\r\n fontSize={'article'}\r\n defaultValue={mbwayForm.countryDropdown}\r\n error={\r\n formErrors && formErrors.countryDropdown\r\n ? formErrors.countryDropdown.message\r\n : undefined\r\n }\r\n />\r\n );\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n {t('payments.note', { textOnly: true })}\r\n \r\n \r\n \r\n {t('payments.mbwayNoteDescription', { textOnly: true })}\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {paymentMethod === PAYMENT_METHODS.MB && (\r\n <>\r\n \r\n \r\n {t('payments.paymentMethodsTitle', { readOnly: true })}\r\n \r\n \r\n \r\n \r\n \r\n {t('payments.atmReference', { readOnly: true })}\r\n \r\n \r\n\r\n {mbwayResponse && (\r\n \r\n {Object.keys(mbwayResponse)\r\n .filter((key) => key !== 'paymentRequestId')\r\n .map((key) => (\r\n \r\n \r\n \r\n {t(`payments.${key}`)}\r\n \r\n \r\n\r\n {(mbwayResponse[key] === '' || mbwayResponse[key] === null) && (\r\n \r\n )}\r\n {mbwayResponse[key] !== '' &&\r\n mbwayResponse[key] !== null &&\r\n key === 'dueDate' && (\r\n \r\n {moment(mbwayResponse[key]).format('DD-MM-YYYY')}\r\n \r\n )}\r\n {mbwayResponse[key] !== '' &&\r\n mbwayResponse[key] !== null &&\r\n key !== 'dueDate' &&\r\n key !== 'value' && (\r\n \r\n {mbwayResponse[key]}\r\n \r\n )}\r\n {mbwayResponse[key] !== '' &&\r\n mbwayResponse[key] !== null &&\r\n key === 'value' && (\r\n \r\n {`${parseFloat(mbwayResponse[key]).toLocaleString(currentLocale, {\r\n minimumFractionDigits: 2,\r\n })} ${t('generic.euros', { textOnly: true })}`}\r\n \r\n )}\r\n \r\n ))}\r\n \r\n )}\r\n \r\n \r\n {t('payments.note', { textOnly: true })}\r\n \r\n \r\n \r\n {t('payments.mbwayNoteDescription', { textOnly: true })}\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n
    \r\n \r\n );\r\n};\r\n\r\nexport default SubmitPaymentRequest;\r\n\r\nconst MbwayResponseWrapper = styled.div`\r\n margin-top: 24px;\r\n background-color: ${({ theme }) => theme.colors.softGrey};\r\n border-style: solid;\r\n border-width: thin;\r\n border-color: ${({ theme }) => theme.colors.softLightGrey};\r\n border-top: 3px solid ${({ theme }) => theme.colors.primary};\r\n padding: 16px 40px;\r\n display: flex;\r\n justify-content: space-between;\r\n`;\r\n\r\nconst TextFieldTitle = styled.div`\r\n margin: 0px 0px 12px 0px;\r\n`;\r\n\r\nconst MbwayResponseColumn = styled.div``;\r\n\r\nconst SegmentTitleWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n margin-bottom: 16px;\r\n`;\r\n\r\nconst Icon = styled.div`\r\n font-size: 60px;\r\n color: ${({ theme }) => theme.colors.primary};\r\n`;\r\n\r\nconst MessageNoApplications = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n text-align: center;\r\n justify-content: center;\r\n margin-top: 60px;\r\n margin-bottom: 20px;\r\n\r\n div:nth-child(2) {\r\n margin-top: 16px;\r\n }\r\n`;\r\n\r\nconst MbReferenceInfo = styled.div`\r\n padding: 0px 110px;\r\n`;\r\n\r\nconst MbwayTextWrapper = styled.div`\r\n margin-top: 24px;\r\n margin-bottom: 20px;\r\n`;\r\n\r\nconst MbwayDetails = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n`;\r\n\r\nconst CountryWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n width: 312px;\r\n`;\r\n\r\nconst DropdownWrapper = styled.div`\r\n margin-top: 12px;\r\n`;\r\n\r\nconst NoteWrapper = styled.div`\r\n margin-top: 24px;\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst NoteTextWrapper = styled.div`\r\n margin-top: 12px;\r\n margin-bottom: 82px;\r\n`;\r\n\r\nconst DescriptionWrapper = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n\r\n div:first-child {\r\n margin-right: 6px;\r\n }\r\n`;\r\n\r\nconst PaymentMethodTitle = styled.div`\r\n margin-bottom: 24px;\r\n`;\r\n\r\nconst PaymentMethodOperationsColumn = styled(Grid.Column)`\r\n margin-top: 40px;\r\n`;\r\n\r\nconst MBReferenceTitle = styled.div``;\r\n","/**\r\n * Multi Payments Selection container utilities\r\n *\r\n * @author Nuno Gago \r\n *\r\n */\r\n\r\nimport { ITranslations, IPagination } from 'scenes/VirtualSecretary/Payments/types';\r\n\r\nexport const DEFAULT_STRUCTURE = (t: ITranslations) => ({\r\n header: {\r\n type: 'columnTitle',\r\n titles: [\r\n { text: t('payments.debitsTablePaymentDescription', { textOnly: true }) },\r\n { text: t('payments.debitsTablePaymentValue', { textOnly: true }) },\r\n { text: t('payments.debitsTableDueDate', { textOnly: true }) },\r\n { text: t('payments.debitsTablePaymentStatus', { textOnly: true }) },\r\n { text: t('generic.select', { textOnly: true }) },\r\n ],\r\n },\r\n rows: [],\r\n});\r\n\r\nexport const DEFAULT_PAGINATION = (total: number): IPagination => ({\r\n hasNext: total > 5 ? true : false,\r\n hasPrevious: false,\r\n offset: 0,\r\n limit: 5,\r\n total,\r\n});\r\n\r\nexport const findItem = (debitId, preSelectedDebits) =>\r\n preSelectedDebits.some((preSelectedDebit) => preSelectedDebit.debitId === debitId);\r\n","/**\r\n * Multi Payments Selection container\r\n *\r\n * @author Nuno Gago \r\n *\r\n */\r\n\r\nimport React, { useContext, useEffect, useState } from 'react';\r\nimport moment from 'moment';\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { t } from 'app';\r\n\r\nimport { Table, Text, StatusLabel, SearchBox, Dropdown } from '@paco_ua/pacoui';\r\n\r\nimport { IMultiPaymentsSelectionProps, IDebitData } from 'scenes/VirtualSecretary/Payments/types';\r\nimport { DEBIT_STATUS, DEBIT_STATUS_COLOR } from '../DebitsTable/utils';\r\nimport { findItem } from './utils';\r\n\r\nimport useTable from './useTable';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faEllipsisH } from '@fortawesome/pro-regular-svg-icons';\r\n\r\nconst compileTableRow = (\r\n debit: IDebitData,\r\n selectedDebits: IDebitData[],\r\n preSelectedDebits: IDebitData[],\r\n theme,\r\n addDebit,\r\n removeDebit\r\n) => {\r\n const preSelectedDisabled = findItem(debit.debitId, preSelectedDebits);\r\n\r\n const preSelected = findItem(debit.debitId, selectedDebits);\r\n\r\n return {\r\n value: debit,\r\n defaultSelected: preSelectedDisabled || preSelected,\r\n disabled: preSelectedDisabled,\r\n rowProps: {},\r\n cells: [\r\n {\r\n content: (\r\n \r\n {debit.debitType && (\r\n \r\n {t(`debitTypes.${debit.debitType.toLowerCase()}`, { textOnly: true })}\r\n \r\n )}\r\n \r\n {debit.description}\r\n \r\n \r\n ),\r\n cellProps: { width: 7, singleLine: false },\r\n },\r\n {\r\n content: (\r\n \r\n {t('generic.euros', { textOnly: true, count: debit.value.toFixed(2) })}\r\n \r\n ),\r\n cellProps: {\r\n width: 3,\r\n singleLine: false,\r\n style: {\r\n textAlign: 'center',\r\n },\r\n },\r\n },\r\n {\r\n content: (\r\n \r\n {debit.dueDate && debit.dueDate !== '' ? (\r\n moment(debit.dueDate, 'DD-MM-YYYY').format('DD-MM-YYYY')\r\n ) : (\r\n \r\n )}\r\n \r\n ),\r\n cellProps: {\r\n width: 3,\r\n singleLine: true,\r\n style: {\r\n textAlign: 'center',\r\n },\r\n },\r\n },\r\n {\r\n content: (\r\n \r\n \r\n \r\n ),\r\n cellProps: {\r\n width: 3,\r\n singleLine: false,\r\n style: {\r\n textAlign: 'center',\r\n },\r\n },\r\n },\r\n ],\r\n };\r\n};\r\n\r\nconst MultiPaymentsSelection = ({\r\n data,\r\n total,\r\n loading,\r\n fetchUnselectedDebits,\r\n setMultiple,\r\n selectedDebits,\r\n preSelectedDebits,\r\n addFilters,\r\n filterParams,\r\n}: IMultiPaymentsSelectionProps) => {\r\n const theme = useContext(ThemeContext);\r\n\r\n const [filtersChanged, setFiltersChanged] = useState(false);\r\n\r\n const { structure, pagination, onChangePage, onChangeRows } = useTable(\r\n t,\r\n data,\r\n selectedDebits,\r\n preSelectedDebits,\r\n compileTableRow,\r\n total,\r\n fetchUnselectedDebits,\r\n filterParams,\r\n filtersChanged\r\n );\r\n\r\n useEffect(() => {\r\n setFiltersChanged(true);\r\n }, [filterParams]);\r\n\r\n useEffect(() => {}, [structure]);\r\n\r\n return (\r\n <>\r\n {addFilters && (\r\n \r\n {\r\n addFilters.onSearch(value);\r\n }}\r\n />\r\n {\r\n addFilters.onFilterChange(value);\r\n }}\r\n onClear={() => {\r\n addFilters.onFilterChange('');\r\n }}\r\n />\r\n \r\n )}\r\n \r\n {\r\n setMultiple(data, structure);\r\n }}\r\n defaultSelectedRows={selectedDebits.map((debit) => {\r\n return {\r\n value: debit,\r\n };\r\n })}\r\n useValueAsId={'debitId'}\r\n selectedInfoTitle={\r\n \r\n {t('payments.multipaymentsSelection')}\r\n \r\n }\r\n selectedInfoSubTitle={(value) => {\r\n return (\r\n \r\n {t('generic.selectedItem', { textOnly: true, count: value })}\r\n \r\n );\r\n }}\r\n structure={structure}\r\n resetSelectedIds={filtersChanged}\r\n setResetSelectedIdsFunction={() => {\r\n setFiltersChanged(false);\r\n }}\r\n pagination={pagination}\r\n onChangeRows={onChangeRows}\r\n onChangePage={onChangePage}\r\n translations={t}\r\n />\r\n \r\n \r\n );\r\n};\r\n\r\nexport default MultiPaymentsSelection;\r\n\r\nconst StatusLabelContainer = styled.div`\r\n div {\r\n margin: 0px auto;\r\n\r\n @media (max-width: 992px) {\r\n width: auto;\r\n max-width: 120px;\r\n }\r\n }\r\n`;\r\n\r\nconst ContentWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst SearchAndFiltersWrapper = styled.div`\r\n display: flex;\r\n margin-bottom: 24px;\r\n justify-content: flex-end;\r\n\r\n > div {\r\n width: 33%;\r\n }\r\n\r\n > div:last-child {\r\n margin-left: 16px;\r\n }\r\n`;\r\n\r\nconst PaymentsTableWrapper = styled.div`\r\n overflow: auto;\r\n\r\n &&& th {\r\n padding-top: 0px !important;\r\n padding-bottom: 0px !important;\r\n height: 61px;\r\n }\r\n\r\n &&& td {\r\n padding-top: 0px !important;\r\n padding-bottom: 0px !important;\r\n height: 76px;\r\n }\r\n\r\n &&& .ui.table tfoot tr td {\r\n height: 45px;\r\n }\r\n`;\r\n\r\nconst DebitStatusText = styled(Text)`\r\n margin-top: 4px;\r\n line-height: 1.3;\r\n white-space: nowrap;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n\r\n @supports (-webkit-line-clamp: 2) {\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: initial;\r\n display: -webkit-box;\r\n -webkit-line-clamp: 2;\r\n -webkit-box-orient: vertical;\r\n }\r\n`;\r\n","/**\r\n * Multi Payments Selection container logic\r\n *\r\n * @author Nuno Gago \r\n *\r\n */\r\n\r\nimport { useState, useEffect, useContext } from 'react';\r\nimport { ThemeContext } from 'styled-components';\r\n\r\nimport { ITranslations, IDebitData, IPagination } from 'scenes/VirtualSecretary/Payments/types';\r\nimport { DEFAULT_STRUCTURE, DEFAULT_PAGINATION } from './utils';\r\nimport { DEFAULT_UNSELECTED_DEBITS_PARAMS } from '../../utils';\r\n\r\nexport default (\r\n t: ITranslations,\r\n debits: IDebitData[],\r\n selectedDebits: IDebitData[],\r\n preSelectedDebits: IDebitData[],\r\n compileTableRow,\r\n total: number,\r\n fetchUnselectedDebits,\r\n filterParams,\r\n filtersChanged\r\n) => {\r\n const theme = useContext(ThemeContext);\r\n const [structure, setStructure] = useState(DEFAULT_STRUCTURE(t));\r\n const [pagination, setPagination] = useState(DEFAULT_PAGINATION(total));\r\n\r\n useEffect(() => {\r\n let updatePagination = { ...pagination };\r\n updatePagination.total = total;\r\n\r\n setPagination(updatePagination);\r\n }, [total]);\r\n\r\n useEffect(() => {\r\n handlePaginationNavigation(pagination);\r\n }, [pagination]);\r\n\r\n useEffect(() => {\r\n if (filtersChanged) {\r\n setPagination(DEFAULT_PAGINATION(total));\r\n }\r\n }, [filtersChanged]);\r\n\r\n // onMount\r\n useEffect(() => {\r\n // fetch new list\r\n fetchUnselectedDebits(DEFAULT_UNSELECTED_DEBITS_PARAMS);\r\n }, [filterParams]);\r\n\r\n useEffect(() => {\r\n const tableStructure = compileTableStructure(debits, theme, t);\r\n setStructure(tableStructure);\r\n }, [debits]);\r\n\r\n const compileTableStructure = (debits: IDebitData[], theme, t: ITranslations) => ({\r\n header: {\r\n type: 'columnTitle',\r\n titles: [\r\n { text: t('payments.debitsTablePaymentDescription', { textOnly: true }) },\r\n {\r\n text: t('payments.debitsTablePaymentValue', { textOnly: true }),\r\n style: { textAlign: 'center' },\r\n },\r\n {\r\n text: t('payments.debitsTableDueDate', { textOnly: true }),\r\n style: { textAlign: 'center' },\r\n },\r\n {\r\n text: t('payments.debitsTablePaymentStatus', { textOnly: true }),\r\n style: { textAlign: 'center' },\r\n },\r\n ],\r\n },\r\n rows: !debits.length\r\n ? ([] as any)\r\n : [\r\n ...debits.map((debit, key) =>\r\n compileTableRow(debit, selectedDebits, preSelectedDebits, theme, t)\r\n ),\r\n ],\r\n });\r\n\r\n const handlePaginationNavigation = (newPagination: IPagination) => {\r\n const exceedsTotal = newPagination.limit >= newPagination.total;\r\n\r\n if (exceedsTotal) {\r\n newPagination.hasPrevious = false;\r\n newPagination.hasNext = false;\r\n }\r\n\r\n if (!exceedsTotal && newPagination.offset < newPagination.limit) {\r\n newPagination.hasPrevious = false;\r\n newPagination.hasNext = true;\r\n }\r\n\r\n if (!exceedsTotal && newPagination.offset >= newPagination.limit) {\r\n newPagination.hasPrevious = true;\r\n newPagination.hasNext =\r\n newPagination.offset + newPagination.limit >= newPagination.total ? false : true;\r\n }\r\n\r\n setPagination(newPagination);\r\n };\r\n\r\n const onChangeRows = (value: number): void => {\r\n const newPagination = { ...pagination };\r\n newPagination.limit = value;\r\n newPagination.offset = 0;\r\n\r\n setPagination(newPagination);\r\n fetchUnselectedDebits(newPagination);\r\n };\r\n\r\n const onChangePage = (value: string): void => {\r\n const newPagination = { ...pagination };\r\n\r\n switch (value) {\r\n case 'prev':\r\n newPagination.offset -= newPagination.limit;\r\n break;\r\n case 'next':\r\n newPagination.offset += newPagination.limit;\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n setPagination(newPagination);\r\n\r\n fetchUnselectedDebits(newPagination);\r\n };\r\n\r\n return {\r\n theme,\r\n structure,\r\n pagination,\r\n onChangePage,\r\n onChangeRows,\r\n };\r\n};\r\n","/**\r\n * PendingDebitsPayment validations\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport * as yup from 'yup';\r\nimport PhoneNumber from 'awesome-phonenumber';\r\n\r\nexport const yupSchema = (t) => {\r\n return yup.object().shape({\r\n countryDropdown: yup.object()\r\n .required()\r\n .test('phone', t('payments.phoneValidation', { textOnly: true }), function (value) {\r\n const pn = new PhoneNumber(value.input, value.countryValue);\r\n return pn.isValid();\r\n })\r\n .test('phone', \"Apenas 91/96/93/92 são válidos\", function (value) {\r\n const pn = String(value.input).startsWith(\"9\")\r\n return pn;\r\n })\r\n });\r\n}","/**\r\n * PendingDebitsPayment scene\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport React, { useContext, useEffect } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { useLocation } from 'react-router-dom';\r\nimport * as selectors from './logic/selectors';\r\n\r\nimport { Text, Button } from '@paco_ua/pacoui';\r\n\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport { useForm } from 'react-hook-form';\r\nimport { yupResolver } from '@hookform/resolvers/yup';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faChevronRight } from '@fortawesome/pro-light-svg-icons';\r\nimport { faCheck } from '@fortawesome/pro-solid-svg-icons';\r\n\r\nimport SelectDebits from './containers/SelectDebits';\r\nimport SelectPaymentMethod from './containers/SelectPaymentMethod';\r\nimport SubmitPaymentRequest from './containers/SubmitPaymentRequest';\r\n\r\nimport MultiPaymentsSelection from '../containers/MultiPaymentsSelection';\r\n\r\nimport { PAYMENT_METHODS } from './types';\r\n\r\nimport { yupSchema } from './validations';\r\n\r\nconst PendingDebitsPayment = ({ t }) => {\r\n const dispatch = useDispatch();\r\n\r\n const theme = useContext(ThemeContext);\r\n\r\n const { navigateTo } = actions.App;\r\n\r\n const {\r\n onMount,\r\n onUnmount,\r\n setCurrentStep,\r\n resetPendingDebits,\r\n submitMbwayDebitsRequest,\r\n submitMbDebitsRequest,\r\n setSearchFilter,\r\n setTypeFilter,\r\n fetchDebits,\r\n setDebitsSubmissionCompleted,\r\n } = actions.PendingDebitsPayment;\r\n\r\n const { setSelectedDebits, resetDebitsList } = actions.Payments;\r\n\r\n const {\r\n loadingStatus,\r\n errorStatus,\r\n currentStep,\r\n paymentMethod,\r\n debitsFilterTypes,\r\n filterParams,\r\n debitsSubmissionCompleted,\r\n allowMbwayPayment,\r\n } = useSelector(selectors.getPendingDebitsPaymentSlice);\r\n\r\n const currentLocale = useSelector(selectors.getAppSlice);\r\n const location = useLocation();\r\n\r\n useEffect(() => {\r\n dispatch(onMount(location.state));\r\n return () => {\r\n dispatch(onUnmount());\r\n };\r\n }, [dispatch, onMount, onUnmount]);\r\n\r\n useEffect(() => {\r\n if (debitsSubmissionCompleted && paymentMethod === PAYMENT_METHODS.MBWAY) {\r\n dispatch(setDebitsSubmissionCompleted(false));\r\n dispatch(navigateTo({ key: 'payments' }));\r\n }\r\n }, [debitsSubmissionCompleted]);\r\n\r\n const { selectedDebits, preSelectedDebits, debits } = useSelector(selectors.getPaymentsSlice);\r\n\r\n const {\r\n register,\r\n handleSubmit,\r\n control,\r\n getValues,\r\n formState: { errors },\r\n } = useForm({\r\n resolver: yupResolver(yupSchema(t)),\r\n });\r\n\r\n const steps = [\r\n t('payments.requestFirstStep'),\r\n t('payments.requestSecondStep'),\r\n t('payments.requestThirdStep'),\r\n ];\r\n\r\n const stepStyles = {\r\n done: {\r\n backgroundColor: theme.colors.primary,\r\n color: theme.colors.white,\r\n fontWeight: 500,\r\n border: 'none',\r\n borderStyle: null,\r\n checkTick: true,\r\n },\r\n current: {\r\n backgroundColor: theme.colors.lightGrey,\r\n color: theme.colors.primary,\r\n fontWeight: 500,\r\n border: 'top',\r\n borderStyle: `2px solid ${theme.colors.primary}`,\r\n checkTick: false,\r\n },\r\n toDo: {\r\n backgroundColor: 'transparent',\r\n color: theme.colors.regularGrey,\r\n fontWeight: 400,\r\n border: 'all',\r\n borderStyle: `1px solid ${theme.colors.regularGrey}`,\r\n checkTick: false,\r\n },\r\n };\r\n\r\n const onSubmitStatement = (data) => {\r\n if (paymentMethod === PAYMENT_METHODS.MBWAY) {\r\n dispatch(\r\n submitMbwayDebitsRequest({\r\n form: data,\r\n selectedDebits: selectedDebits,\r\n })\r\n );\r\n }\r\n };\r\n\r\n const getNextButtonDisabledState = (step) => {\r\n if (step === 1) {\r\n return false;\r\n } else if (step === 2) {\r\n // if method was selected\r\n if (paymentMethod) {\r\n return false;\r\n }\r\n return true;\r\n } else {\r\n return true;\r\n }\r\n };\r\n\r\n const closeDebitTabs = () => {\r\n dispatch(navigateTo({ key: 'payments' }));\r\n };\r\n\r\n const getTotalCost = (debits) => {\r\n if (debits.length <= 0) return 0;\r\n\r\n let cost = 0;\r\n\r\n debits.forEach((debit) => {\r\n cost += debit.totalValue;\r\n });\r\n\r\n return cost;\r\n };\r\n\r\n return (\r\n }\r\n loading={loadingStatus.loading || errorStatus.errLoadingPendingDebits}\r\n mainContent={\r\n <>\r\n \r\n {steps.map((step, index) => {\r\n if (index + 1 < currentStep) {\r\n return (\r\n \r\n \r\n {step}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n } else if (index + 1 === currentStep) {\r\n return (\r\n \r\n \r\n {step}\r\n \r\n \r\n );\r\n } else if (index + 1 > currentStep) {\r\n return (\r\n \r\n \r\n {step}\r\n \r\n \r\n );\r\n }\r\n })}\r\n \r\n\r\n <>\r\n {currentStep === 1 && (\r\n {\r\n dispatch(fetchDebits(params));\r\n }}\r\n setMultiple={(selected, structure) => {\r\n let updatedSelected = [] as any;\r\n\r\n // add preSelectedItems to the updateSelected list (these can't be removed)\r\n preSelectedDebits.forEach((preSelDebit) => {\r\n updatedSelected.push(preSelDebit);\r\n });\r\n\r\n // iterate through the 'selected' list\r\n // and add to the updatedSelected list all the rows not present in the structure\r\n // and that are not already present in updatedSelected list\r\n selected.forEach((selectedItem) => {\r\n const inUpdatedSelected = updatedSelected.some(\r\n (updatedItem) => selectedItem.debitId === updatedItem.debitId\r\n );\r\n\r\n const inStructure = structure.some(\r\n (structureItem) => selectedItem.debitId === structureItem.value.debitId\r\n );\r\n\r\n if (!inUpdatedSelected && !inStructure) {\r\n updatedSelected.push(selectedItem);\r\n }\r\n });\r\n\r\n structure.forEach((structureItem) => {\r\n const inSelected = selected.some(\r\n (selectedItem) => structureItem.value.debitId === selectedItem.debitId\r\n );\r\n\r\n const inUpdatedSelected = updatedSelected.some(\r\n (updatedItem) => structureItem.value.debitId === updatedItem.debitId\r\n );\r\n\r\n if (!inSelected) {\r\n if (inUpdatedSelected) {\r\n // remove structureItem from updatedSelected\r\n const index = updatedSelected\r\n .map((item) => {\r\n return item.Id;\r\n })\r\n .indexOf(structureItem.value.debitId);\r\n\r\n updatedSelected.splice(index, 1);\r\n }\r\n } else {\r\n if (!inUpdatedSelected) {\r\n updatedSelected.push(structureItem.value);\r\n }\r\n }\r\n });\r\n\r\n dispatch(setSelectedDebits(updatedSelected));\r\n }} // update selectedDebits list\r\n selectedDebits={selectedDebits}\r\n preSelectedDebits={preSelectedDebits}\r\n addFilters={{\r\n searchPlaceholder: t('forms.searchPlaceholder', { textOnly: true }),\r\n dropdownPlaceholder: t('paymentTool.multiPaymentFilter', {\r\n textOnly: true,\r\n }),\r\n onSearch: (value) => {\r\n dispatch(setSearchFilter(value));\r\n },\r\n onFilterChange: (value) => {\r\n dispatch(setTypeFilter(value));\r\n },\r\n onFilterClear: (value) => {\r\n dispatch(setTypeFilter(value));\r\n },\r\n filterTypes: debitsFilterTypes,\r\n }}\r\n filterParams={filterParams}\r\n {...debits}\r\n loading={loadingStatus.loadingPaymentsTable}\r\n />\r\n }\r\n />\r\n )}\r\n {currentStep === 2 && (\r\n \r\n )}\r\n {currentStep === 3 && (\r\n \r\n )}\r\n \r\n\r\n {preSelectedDebits.length > 0 && (\r\n \r\n {!(currentStep === 3 && paymentMethod === PAYMENT_METHODS.MB) && (\r\n {\r\n dispatch(\r\n navigateTo({\r\n key: 'payments',\r\n })\r\n );\r\n dispatch(resetPendingDebits());\r\n }}\r\n >\r\n {t('generic.cancel')}\r\n \r\n )}\r\n \r\n {currentStep === 2 && (\r\n {\r\n dispatch(setCurrentStep(currentStep - 1));\r\n }}\r\n >\r\n {t('generic.previous')}\r\n \r\n )}\r\n {currentStep === 3 && paymentMethod === PAYMENT_METHODS.MBWAY && (\r\n {\r\n dispatch(setCurrentStep(currentStep - 1));\r\n }}\r\n >\r\n {t('generic.previous')}\r\n \r\n )}\r\n {(currentStep === 1 || currentStep === 2) && (\r\n \r\n ) : (\r\n \r\n )\r\n }\r\n loading={currentStep === 2 && loadingStatus.loading}\r\n onClick={() => {\r\n if (currentStep === 1) {\r\n // essential in order for the table to not reload with previous fetched rows, which\r\n // may not correspond to the offset 0\r\n dispatch(resetDebitsList());\r\n dispatch(setCurrentStep(currentStep + 1));\r\n } else if (currentStep === 2) {\r\n if (paymentMethod === PAYMENT_METHODS.MB) {\r\n dispatch(submitMbDebitsRequest(selectedDebits));\r\n // the change to the step 3 is made in the saga, after the post request\r\n } else {\r\n dispatch(setCurrentStep(currentStep + 1));\r\n }\r\n }\r\n }}\r\n disabled={getNextButtonDisabledState(currentStep) || loadingStatus.loading}\r\n >\r\n {currentStep === 2 && paymentMethod === PAYMENT_METHODS.MB\r\n ? t('generic.submit')\r\n : t('generic.next')}\r\n \r\n )}\r\n {currentStep === 3 && (\r\n \r\n ) : undefined\r\n }\r\n onClick={\r\n paymentMethod === PAYMENT_METHODS.MBWAY\r\n ? handleSubmit(onSubmitStatement)\r\n : paymentMethod === PAYMENT_METHODS.MB\r\n ? () => closeDebitTabs()\r\n : undefined /* change page back to the payments*/\r\n }\r\n >\r\n {paymentMethod === PAYMENT_METHODS.MBWAY\r\n ? t('generic.submit')\r\n : t('generic.close')}\r\n \r\n )}\r\n \r\n \r\n )}\r\n \r\n }\r\n secondaryContent={\r\n \r\n \r\n {t('payments.paymentSummary', { textOnly: true })}\r\n \r\n \r\n \r\n {t('payments.numberItens', { textOnly: true })}\r\n \r\n \r\n\r\n \r\n \r\n {`${\r\n selectedDebits.length // ? selectedDebits.length : preSelectedDebits.length\r\n } ${t('payments.selectedItens', { textOnly: true })}`}\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n {t('payments.totalPayment', { textOnly: true })}\r\n \r\n \r\n {`${getTotalCost(selectedDebits).toFixed(2)} ${t('generic.euros', {\r\n textOnly: true,\r\n })}`}\r\n \r\n \r\n \r\n }\r\n />\r\n );\r\n};\r\n\r\nexport default PendingDebitsPayment;\r\n\r\nconst ApplicationStepsWrapper = styled.div`\r\n display: flex;\r\n margin-bottom: 32px;\r\n overflow-y: hidden;\r\n overflow-x: auto;\r\n`;\r\n\r\nconst SecondaryContentWrapper = styled.div`\r\n border: 1px solid ${({ theme }) => theme.colors.lightGrey};\r\n padding: 38px 16px;\r\n min-width: fit-content;\r\n`;\r\nconst NumberItens = styled.div`\r\n margin-top: 16px;\r\n`;\r\n\r\nconst LineSeparator = styled.div`\r\n height: 1px;\r\n background: ${({ theme }) => theme.colors.lightGrey};\r\n margin-top: 64px;\r\n margin-bottom: 22px;\r\n`;\r\n\r\nconst TotalPayWrapper = styled.div`\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n`;\r\n\r\nconst NumberSelectedItens = styled.div`\r\n margin-top: 6px;\r\n`;\r\n\r\nconst ApplicationStep = styled.div<{\r\n backgroundColor: string;\r\n border?: string;\r\n borderStyle?: string;\r\n}>`\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n flex: 1;\r\n padding: 0 16px;\r\n background-color: ${({ backgroundColor }) => backgroundColor};\r\n ${({ border, borderStyle }) => {\r\n if (border === 'all') {\r\n return `border: ${borderStyle};`;\r\n } else if (border === 'top') {\r\n return `border-top: ${borderStyle};`;\r\n }\r\n }}\r\n\r\n &:not(:last-child) {\r\n margin-right: 8px;\r\n }\r\n max-width: 239px;\r\n`;\r\n\r\nconst TabText = styled(Text)`\r\n line-height: 1.2;\r\n`;\r\n\r\nconst CheckTickWrapper = styled.div`\r\n width: 16px;\r\n height: 16px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n background-color: ${({ theme }) => theme.colors.white};\r\n border-radius: 50%;\r\n\r\n &&& {\r\n min-width: 16px;\r\n height: 16px;\r\n }\r\n\r\n svg {\r\n font-size: 10px;\r\n color: ${({ theme }) => theme.colors.primary};\r\n }\r\n`;\r\n\r\nconst BackwardForwardButtonsWrapper = styled.div`\r\n display: flex;\r\n\r\n > button:last-child {\r\n margin-left: 16px;\r\n }\r\n`;\r\n\r\nconst NavigationButtonsWrapper = styled.div<{ currentStep: number; hasOnlyOneButton: boolean }>`\r\n display: flex;\r\n justify-content: ${({ currentStep, hasOnlyOneButton }) =>\r\n currentStep === 1 || hasOnlyOneButton ? `flex-end` : `space-between`};\r\n margin-top: 32px;\r\n`;\r\n","/**\r\n * Grades scene\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n \r\nimport React, { useEffect } from 'react'\r\nimport styled from 'styled-components'\r\n\r\nimport { useDispatch, /*useSelector*/ } from 'react-redux'\r\n\r\nimport { actions } from 'store/rootSlices'\r\n\r\n//import config from 'config'\r\n\r\nconst Grades = ({ t, i18n }) => {\r\n\r\n //const { } = useSelector(state => state.Grades)\r\n\r\n const { onMount, onUnmount} = actions.Grades\r\n //const { api_t } = actions.App\r\n\r\n const dispatch = useDispatch()\r\n\r\n useEffect(() => {\r\n\r\n dispatch(onMount())\r\n return () => {\r\n dispatch(onUnmount())\r\n }\r\n }, [dispatch, onMount, onUnmount]);\r\n\r\n return (\r\n \r\n Grades\r\n \r\n )\r\n}\r\n\r\nexport default Grades\r\n\r\nconst Wrapper = styled.div``","/**\r\n * AssessmentChoice scene\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n \r\nimport React, { useEffect } from 'react'\r\nimport styled from 'styled-components'\r\n\r\nimport { useDispatch, /*useSelector*/ } from 'react-redux'\r\n\r\nimport { actions } from 'store/rootSlices'\r\n\r\n//import config from 'config'\r\n\r\nconst AssessmentChoice = ({ t, i18n }) => {\r\n\r\n //const { } = useSelector(state => state.AssessmentChoice)\r\n\r\n const { onMount, onUnmount} = actions.AssessmentChoice\r\n //const { api_t } = actions.App\r\n\r\n const dispatch = useDispatch()\r\n\r\n useEffect(() => {\r\n\r\n dispatch(onMount())\r\n return () => {\r\n dispatch(onUnmount())\r\n }\r\n }, [dispatch, onMount, onUnmount]);\r\n\r\n return (\r\n \r\n AssessmentChoice\r\n \r\n )\r\n}\r\n\r\nexport default AssessmentChoice\r\n\r\nconst Wrapper = styled.div``","export interface ICourseUC {\r\n gradeType: string | null;\r\n bolonha: number;\r\n courseId: number;\r\n credits: number;\r\n ects: number;\r\n link: string;\r\n grade: number | null;\r\n scientificArea: string;\r\n semester: string;\r\n ucCode: number;\r\n ucName: string;\r\n ucType: number;\r\n mobilityInstitutionName: null | string;\r\n hasOneSignup?: boolean;\r\n yearOfStudy: number;\r\n selectedOption: null | {\r\n ucCode: number;\r\n ucName: string;\r\n };\r\n}\r\n\r\nexport interface Dictionary {\r\n [key: number]: T;\r\n}\r\n\r\nexport interface ICourseSubUCs {\r\n ucCode: number;\r\n ucsList: ICourseUC[];\r\n}\r\n\r\nexport interface ITabItem {\r\n key: string;\r\n value: string;\r\n}\r\n\r\nexport interface IColumnItem {\r\n key: string;\r\n value: string;\r\n}\r\n\r\nexport interface ICurricularPlan {\r\n courseName: string;\r\n courseCode: number;\r\n ucs: Dictionary; // key: curricular year\r\n subUcs: Dictionary; // key: ucCode\r\n extraCurricularUcs: ICourseUC[]; // disciplinas extra curriculares\r\n mobilityUcs: IMobilityUc[]; // disciplinas de mobilidade\r\n accreditedUcs: IAccreditedUcs[]; // disciplinas creditadas\r\n}\r\n\r\nexport interface IMobilityUc {\r\n ucName: string;\r\n grade: number;\r\n academicYear: number;\r\n institutionName: string;\r\n programName: string;\r\n}\r\n\r\nexport interface IAccreditedUcs {\r\n ucCode: number;\r\n ucName: string;\r\n grade: number;\r\n type: string;\r\n academicYear: string;\r\n institutionName: string;\r\n courseName: string;\r\n}\r\n\r\nexport interface ISummary {\r\n grade: number;\r\n summary: {\r\n totalEctsEarned: number;\r\n totalEctsToDo: number;\r\n totalEctsAccredited: number;\r\n totalUcsCompleted: number;\r\n totalUcsToDo: number;\r\n totalUcsAccredited: number;\r\n };\r\n}\r\n\r\nexport interface ITableRawData {\r\n ucs: ICourseUC[];\r\n subUcs: Dictionary;\r\n accreditedUcs: IAccreditedUcs[];\r\n mobilityUcs: IMobilityUc[];\r\n extraCurricularUcs: ICourseUC[];\r\n}\r\n\r\nexport interface ICourseFields {\r\n ACADEMIC_YEAR: string;\r\n CREDITS: string;\r\n ECTS: string;\r\n GRADE: string;\r\n INSTITUTION: string;\r\n PROGRAMME: string;\r\n SEMESTER: string;\r\n TYPE: string;\r\n UC_CODE: string;\r\n UC_NAME: string;\r\n YEAR_STUDY: string;\r\n UC_DETAILS: string;\r\n}\r\n\r\nexport interface ICourseTypes {\r\n FIRST_YEAR: string;\r\n SECOND_YEAR: string;\r\n THIRD_YEAR: string;\r\n FOURTH_YEAR: string;\r\n FIFTH_YEAR: string;\r\n SIXTH_YEAR: string;\r\n EVERY_COURSE_UCS: string;\r\n EXTRA_CURRICULAR_UCS: string;\r\n MOBILITY_UCS: string;\r\n ACCREDITED_UCS: string;\r\n}\r\n\r\nexport const GRADE_TYPE = {\r\n ECTS: 1,\r\n CREDITS: -1,\r\n};\r\n","/**\r\n * LabelledCell component\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport React from 'react';\r\nimport styled from 'styled-components';\r\n\r\nimport { actions } from 'store/rootSlices';\r\nimport { Text } from '@paco_ua/pacoui';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faEye } from '@fortawesome/pro-regular-svg-icons';\r\nimport { useDispatch } from 'react-redux';\r\n\r\ninterface IProps {\r\n content: {\r\n text: string | number | JSX.Element;\r\n props?: any;\r\n };\r\n label: {\r\n text: string | number | JSX.Element;\r\n props?: any;\r\n isLink?: boolean;\r\n ucOptionCode?: number;\r\n };\r\n}\r\n\r\nconst LabeledCell: React.FC = ({ content, label }) => {\r\n const { getUcOptions } = actions.CurricularPlan;\r\n\r\n const dispatch = useDispatch();\r\n\r\n const handleLink = () => {\r\n if (label.ucOptionCode) {\r\n // ucOptions\r\n dispatch(getUcOptions({ name: content.text.toString(), code: label.ucOptionCode }));\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n {content.text}\r\n \r\n \r\n {label.isLink && (\r\n \r\n \r\n \r\n )}\r\n {label.isLink ? (\r\n \r\n \r\n {label.text}\r\n \r\n \r\n ) : (\r\n \r\n {label.text}\r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default LabeledCell;\r\n\r\nconst Wrapper = styled.div``;\r\n\r\nconst LinkContainer = styled.div`\r\n cursor: pointer;\r\n\r\n &:hover {\r\n text-decoration: underline;\r\n }\r\n`;\r\n\r\nconst LabelWrapper = styled.div`\r\n display: flex;\r\n align-items: center;\r\n margin-top: 3px;\r\n`;\r\n\r\nconst LabelIcon = styled.div`\r\n margin-right: 6px;\r\n`;\r\n","/**\r\n * CurricularPlan scene utils\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\nimport React from 'react';\r\n\r\nimport { Theme as theme } from '@paco_ua/pacoui';\r\n\r\nimport {\r\n ICourseUC,\r\n ITableRawData,\r\n ITabItem,\r\n IColumnItem,\r\n Dictionary,\r\n ICurricularPlan,\r\n ICourseFields,\r\n ICourseTypes,\r\n GRADE_TYPE,\r\n} from './types';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faEllipsisH, faChevronRight } from '@fortawesome/pro-regular-svg-icons';\r\n\r\nimport LabeledCell from './components/LabeledCell';\r\n\r\nimport numeral from 'numeral';\r\n\r\n// same keys as the ones received from the endpoint\r\nexport const COURSE_FIELD_KEY: ICourseFields = {\r\n ACADEMIC_YEAR: 'academicYear',\r\n CREDITS: 'credits',\r\n ECTS: 'ects',\r\n GRADE: 'grade',\r\n INSTITUTION: 'institutionName',\r\n PROGRAMME: 'programName',\r\n SEMESTER: 'semester',\r\n TYPE: 'type',\r\n UC_CODE: 'ucCode',\r\n UC_NAME: 'ucName',\r\n YEAR_STUDY: 'yearOfStudy',\r\n UC_DETAILS: 'ucDetails', // for the column containing the right point arrow\r\n};\r\n\r\nexport const COURSE_TYPE_KEY: ICourseTypes = {\r\n FIRST_YEAR: '1',\r\n SECOND_YEAR: '2',\r\n THIRD_YEAR: '3',\r\n FOURTH_YEAR: '4',\r\n FIFTH_YEAR: '5',\r\n SIXTH_YEAR: '6',\r\n EVERY_COURSE_UCS: 'everyCourseUc',\r\n EXTRA_CURRICULAR_UCS: 'extraCurricularUcs',\r\n MOBILITY_UCS: 'mobilityUcs',\r\n ACCREDITED_UCS: 'accreditedUcs',\r\n};\r\n\r\nexport const findTabInList = (courseTypeTabs: ITabItem[], tabKey: string) => {\r\n const item = courseTypeTabs.find((tab: ITabItem) => tab.key === tabKey);\r\n\r\n if (item !== undefined) {\r\n return item.value;\r\n } else {\r\n return '';\r\n }\r\n};\r\n\r\nconst CENTERED_TABLE_TITLES: string[] = [\r\n COURSE_FIELD_KEY.UC_CODE,\r\n COURSE_FIELD_KEY.CREDITS,\r\n COURSE_FIELD_KEY.ECTS,\r\n COURSE_FIELD_KEY.GRADE,\r\n COURSE_FIELD_KEY.ACADEMIC_YEAR,\r\n COURSE_FIELD_KEY.YEAR_STUDY,\r\n COURSE_FIELD_KEY.TYPE,\r\n];\r\n\r\nconst UC_TYPE = {\r\n OPTION: 2 as number,\r\n MODULE: 5 as number,\r\n};\r\n\r\nconst getOnClickRow = (uc, hasDetails, dispatch, navigateTo, currentRegistration) => {\r\n if (hasDetails) {\r\n return {\r\n onClick: () => {\r\n if (uc.hasOneSignup) {\r\n dispatch(\r\n navigateTo({\r\n key: 'ucDetails',\r\n params: {\r\n ucCode: uc.selectedOption ? uc.selectedOption.ucCode : uc.ucCode, // if uc is an option, otherwise\r\n regid: currentRegistration,\r\n },\r\n })\r\n );\r\n }\r\n },\r\n navigatable: uc.hasOneSignup,\r\n };\r\n }\r\n\r\n return {};\r\n};\r\n\r\nexport const getCurricularPlanTableFormat = (\r\n data: ITableRawData,\r\n columnTitles: IColumnItem[],\r\n selectedTabKey: string,\r\n currentLocale: string,\r\n dispatch,\r\n navigateTo,\r\n currentRegistration,\r\n t\r\n) => {\r\n const header = {\r\n type: 'columnTitle' as string,\r\n titles: columnTitles.map((title) => {\r\n if (CENTERED_TABLE_TITLES.indexOf(title.key) > -1) {\r\n return {\r\n text: title.value,\r\n style: {\r\n textAlign: 'center',\r\n fontWeight: 400,\r\n wordBreak: 'keep-all',\r\n wordWrap: 'normal',\r\n },\r\n };\r\n }\r\n\r\n return {\r\n text: title.value,\r\n style: { fontWeight: 400 },\r\n };\r\n }) as any,\r\n };\r\n\r\n let tableRows;\r\n let isTabNum = /^\\d+$/.test(selectedTabKey);\r\n let tmpColumnTitles = [...columnTitles];\r\n\r\n // add empty column, in order to acommodate for the right pointing arrow\r\n header.titles.push({ text: '' });\r\n\r\n if (isTabNum || selectedTabKey === COURSE_TYPE_KEY.EVERY_COURSE_UCS) {\r\n // courseColumnsTitlesList\r\n let tableRowsCellArray = [] as any;\r\n\r\n tableRows = data.ucs.map((uc) => {\r\n return {\r\n rowProps: {\r\n color: theme.colors.white,\r\n ...getOnClickRow(\r\n uc,\r\n uc.ucType !== UC_TYPE.MODULE &&\r\n (uc.ucType !== UC_TYPE.OPTION ||\r\n (uc.ucType === UC_TYPE.OPTION && uc.selectedOption !== null)),\r\n dispatch,\r\n navigateTo,\r\n currentRegistration\r\n ),\r\n navigatable: true,\r\n },\r\n cells: tableRowsCellArray.concat(\r\n ...tmpColumnTitles.map((title) => {\r\n let content = uc[title.key];\r\n if (content === null && title.key !== COURSE_FIELD_KEY.GRADE) {\r\n content = ;\r\n } else if (title.key === COURSE_FIELD_KEY.UC_CODE) {\r\n if (uc.ucType === UC_TYPE.OPTION) {\r\n // it's an option\r\n\r\n if (uc.selectedOption) {\r\n // option with grade\r\n content = uc.selectedOption;\r\n return [createTableCell(content.ucCode, { textAlign: 'center', width: 2 })];\r\n } else {\r\n // option without grade\r\n return [createTableCell(uc.ucCode, { textAlign: 'center', width: 2 })];\r\n }\r\n } else {\r\n return [createTableCell(content, { textAlign: 'center', width: 2 })];\r\n }\r\n } else if (title.key === COURSE_FIELD_KEY.UC_NAME) {\r\n if (uc.ucType === UC_TYPE.OPTION) {\r\n // it's an option\r\n let text: any;\r\n let label: any;\r\n\r\n if (uc.selectedOption) {\r\n // option with grade\r\n content = uc.selectedOption;\r\n text = {\r\n text: content.ucName,\r\n props: {\r\n color: theme.colors.primary,\r\n },\r\n };\r\n label = {\r\n text: `${uc.ucCode} - ${uc.ucName}`,\r\n props: {\r\n color: theme.colors.plusDarkGrey,\r\n },\r\n };\r\n } else {\r\n // option without grade\r\n text = {\r\n text: content,\r\n props: {\r\n color: theme.colors.plusDarkGrey,\r\n },\r\n };\r\n label = {\r\n text: t('curricularPlan.viewOptionsName', { textOnly: true }),\r\n props: {\r\n color: theme.colors.plusDarkGrey,\r\n },\r\n isLink: true,\r\n ucOptionCode: uc.ucCode,\r\n };\r\n }\r\n\r\n return [\r\n createLabeledCell(text, label, {\r\n width: selectedTabKey === COURSE_TYPE_KEY.EVERY_COURSE_UCS ? 5 : 6,\r\n }),\r\n ];\r\n } else if (uc.ucType === UC_TYPE.MODULE) {\r\n // module\r\n return [\r\n createTableCell(content, {\r\n width: selectedTabKey === COURSE_TYPE_KEY.EVERY_COURSE_UCS ? 5 : 6,\r\n }),\r\n ];\r\n } else if (uc.mobilityInstitutionName !== null) {\r\n // mobility uc\r\n let text = {\r\n text: content,\r\n props: {\r\n color: theme.colors.plusDarkGrey,\r\n },\r\n };\r\n let label = {\r\n text: uc.mobilityInstitutionName,\r\n props: {\r\n color: theme.colors.primary,\r\n },\r\n };\r\n\r\n return [\r\n createLabeledCell(text, label, {\r\n width: selectedTabKey === COURSE_TYPE_KEY.EVERY_COURSE_UCS ? 5 : 6,\r\n }),\r\n ];\r\n } else {\r\n return [\r\n createTableCell(content, {\r\n color: theme.colors.primary,\r\n weight: 500,\r\n width: selectedTabKey === COURSE_TYPE_KEY.EVERY_COURSE_UCS ? 5 : 6,\r\n }),\r\n ];\r\n }\r\n } else if (title.key === COURSE_FIELD_KEY.YEAR_STUDY) {\r\n return [\r\n createTableCell(\r\n `${numeral(Math.floor(content)).format('o')} ${t('curricularPlan.yearName', {\r\n textOnly: true,\r\n })}`,\r\n {\r\n textAlign: 'center',\r\n }\r\n ),\r\n ];\r\n } else if (title.key === COURSE_FIELD_KEY.ECTS) {\r\n return [\r\n createTableCell(\r\n parseFloat(content).toLocaleString(currentLocale, { minimumFractionDigits: 1 }),\r\n { textAlign: 'center' }\r\n ),\r\n ];\r\n } else if (title.key === COURSE_FIELD_KEY.CREDITS) {\r\n return [\r\n createTableCell(\r\n parseFloat(content).toLocaleString(currentLocale, { minimumFractionDigits: 1 }),\r\n { textAlign: 'center' }\r\n ),\r\n ];\r\n } else if (title.key === COURSE_FIELD_KEY.SEMESTER) {\r\n let label: string;\r\n if (content > 0 && content <= 2) {\r\n label = t('curricularPlan.semesterName', { textOnly: true });\r\n return [\r\n createTableCell(`${numeral(content).format('o')} ${label}`, {\r\n style: { whiteSpace: 'nowrap' },\r\n }),\r\n ];\r\n } else {\r\n label = t('curricularPlan.anualName', { textOnly: true });\r\n return [createTableCell(label, { style: { whiteSpace: 'nowrap' } })];\r\n }\r\n } else if (title.key === COURSE_FIELD_KEY.GRADE) {\r\n if (uc.ucType !== UC_TYPE.MODULE) {\r\n return [\r\n content === null\r\n ? createTableCell(, {\r\n textAlign: 'center',\r\n })\r\n : createTableCell(content, { textAlign: 'center' }),\r\n createTableCell(\r\n uc.hasOneSignup ? : '',\r\n {\r\n textAlign: 'center',\r\n }\r\n ),\r\n ];\r\n } else {\r\n return [\r\n content === null\r\n ? createTableCell(, {\r\n textAlign: 'center',\r\n })\r\n : createTableCell(content, { textAlign: 'center', colSpan: 1 }),\r\n ];\r\n }\r\n }\r\n\r\n return [createTableCell(content, { textAlign: 'center' })];\r\n })\r\n ),\r\n collapsableOpen: true,\r\n\r\n collapsableRows: createFormattedSubucsRows(\r\n data.subUcs,\r\n uc.ucCode,\r\n tmpColumnTitles,\r\n currentLocale,\r\n dispatch,\r\n navigateTo,\r\n currentRegistration,\r\n t\r\n ),\r\n };\r\n });\r\n } else if (selectedTabKey === 'extraCurricularUcs') {\r\n let tableRowsCellArray = [] as any;\r\n\r\n tableRows = data.extraCurricularUcs.map((uc) => {\r\n return {\r\n rowProps: {\r\n color: theme.colors.white,\r\n onClick: () => {\r\n if (uc.hasOneSignup) {\r\n dispatch(\r\n navigateTo({\r\n key: 'ucDetails',\r\n params: { ucCode: uc.ucCode, regid: currentRegistration },\r\n })\r\n );\r\n }\r\n },\r\n navigatable: uc.hasOneSignup,\r\n },\r\n cells: tableRowsCellArray.concat(\r\n ...tmpColumnTitles.map((title) => {\r\n let content = uc[title.key];\r\n if (title.key === COURSE_FIELD_KEY.UC_CODE) {\r\n return [createTableCell(content, { textAlign: 'center', width: 2 })];\r\n } else if (title.key === COURSE_FIELD_KEY.UC_NAME) {\r\n const text = {\r\n text: content,\r\n props: {\r\n color: 'primary',\r\n },\r\n };\r\n\r\n const label = {\r\n text: uc['department'],\r\n props: {\r\n color: 'plusDarkGrey',\r\n },\r\n };\r\n\r\n return [createLabeledCell(text, label, { width: 6 })];\r\n } else if (\r\n title.key === COURSE_FIELD_KEY.ECTS ||\r\n title.key === COURSE_FIELD_KEY.CREDITS\r\n ) {\r\n return [\r\n createTableCell(\r\n parseFloat(content).toLocaleString(currentLocale, { minimumFractionDigits: 1 }),\r\n { textAlign: 'center' }\r\n ),\r\n ];\r\n } else if (title.key === COURSE_FIELD_KEY.GRADE) {\r\n return [\r\n content === null\r\n ? createTableCell(, {\r\n textAlign: 'center',\r\n })\r\n : createTableCell(Math.floor(content), { textAlign: 'center' }),\r\n createTableCell(uc.hasOneSignup ? : '', {\r\n textAlign: 'center',\r\n }),\r\n ];\r\n } else if (title.key === COURSE_FIELD_KEY.YEAR_STUDY) {\r\n return [\r\n createTableCell(uc[COURSE_FIELD_KEY.ACADEMIC_YEAR], {\r\n textAlign: 'center',\r\n }),\r\n ];\r\n } else if (title.key === COURSE_FIELD_KEY.SEMESTER) {\r\n let label: string;\r\n\r\n if (content > 0 && content <= 2) {\r\n label = t('curricularPlan.semesterName', { textOnly: true });\r\n return createTableCell(`${numeral(content).format('o')} ${label}`, {\r\n style: { whiteSpace: 'nowrap' },\r\n });\r\n } else {\r\n label = t('curricularPlan.anualName', { textOnly: true });\r\n return [\r\n createTableCell(label, {\r\n textAlign: 'center',\r\n style: { whiteSpace: 'nowrap' },\r\n }),\r\n ];\r\n }\r\n }\r\n return [createTableCell(content, { textAlign: 'center' })];\r\n })\r\n ),\r\n };\r\n });\r\n } else if (selectedTabKey === 'mobilityUcs') {\r\n // mobilityColumnTitlesList\r\n let tableRowsCellArray = [] as any;\r\n\r\n tableRows = data.mobilityUcs.map((uc) => {\r\n return {\r\n rowProps: { color: theme.colors.white },\r\n cells: tableRowsCellArray.concat(\r\n ...columnTitles.map((title) => {\r\n let content = uc[title.key];\r\n if (content === null) {\r\n content = ;\r\n } else if (title.key === COURSE_FIELD_KEY.UC_NAME) {\r\n return [\r\n createTableCell(content, {\r\n color: theme.colors.primary,\r\n weight: 500,\r\n width: 6,\r\n }),\r\n ];\r\n } else if (title.key === COURSE_FIELD_KEY.PROGRAMME) {\r\n return [\r\n createTableCell(content, {\r\n style: { textAlign: 'center' },\r\n }),\r\n ];\r\n } else if (title.key === COURSE_FIELD_KEY.INSTITUTION) {\r\n return [\r\n createTableCell(content),\r\n createTableCell('', {\r\n textAlign: 'center',\r\n }),\r\n ];\r\n } else if (title.key === COURSE_FIELD_KEY.GRADE) {\r\n return [createTableCell(Math.floor(content), { textAlign: 'center' })];\r\n } else if (title.key === COURSE_FIELD_KEY.SEMESTER) {\r\n let label: string;\r\n\r\n if (content > 0 && content <= 2) {\r\n label = t('curricularPlan.semesterName', { textOnly: true });\r\n return [createTableCell(`${numeral(content).format('o')} ${label}`)];\r\n } else {\r\n label = t('curricularPlan.anualName', { textOnly: true });\r\n return [createTableCell(label, { textAlign: 'center' })];\r\n }\r\n }\r\n return [createTableCell(content, { textAlign: 'center' })];\r\n })\r\n ),\r\n };\r\n });\r\n } else if (selectedTabKey === 'accreditedUcs') {\r\n // accreditedColumnTitlesList\r\n let tableRowsCellArray = [] as any;\r\n\r\n tableRows = data.accreditedUcs.map((uc) => {\r\n return {\r\n rowProps: { color: theme.colors.white },\r\n cells: tableRowsCellArray.concat(\r\n ...columnTitles.map((title) => {\r\n let content = uc[title.key];\r\n if (title.key === COURSE_FIELD_KEY.UC_CODE) {\r\n return [createTableCell(content, { textAlign: 'center', width: 2 })];\r\n } else if (title.key === COURSE_FIELD_KEY.UC_NAME) {\r\n return [\r\n createTableCell(content, {\r\n color: theme.colors.primary,\r\n weight: 500,\r\n width: 6,\r\n }),\r\n ];\r\n } else if (title.key === COURSE_FIELD_KEY.TYPE) {\r\n return [\r\n createTableCell(\r\n t(`curricularPlan.accrediteUcsType_${content}`, { textOnly: true }),\r\n {\r\n //textAlign: 'center',\r\n style: {\r\n // whiteSpace: 'nowrap',\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n maxWidth: '200px',\r\n },\r\n }\r\n ),\r\n createTableCell('', {\r\n textAlign: 'center',\r\n }),\r\n ];\r\n } else if (title.key === COURSE_FIELD_KEY.INSTITUTION) {\r\n return [createTableCell(content)];\r\n } else if (title.key === COURSE_FIELD_KEY.SEMESTER) {\r\n let label: string;\r\n\r\n if (content > 0 && content <= 2) {\r\n label = t('curricularPlan.semesterName', { textOnly: true });\r\n return [createTableCell(`${numeral(content).format('o')} ${label}`)];\r\n } else {\r\n label = t('curricularPlan.anualName', { textOnly: true });\r\n return [createTableCell(label, { textAlign: 'center' })];\r\n }\r\n }\r\n return [createTableCell(content, { textAlign: 'center' })];\r\n })\r\n ),\r\n };\r\n });\r\n }\r\n\r\n const structure = {\r\n header: header,\r\n rows: tableRows,\r\n };\r\n\r\n return structure;\r\n};\r\n\r\n/*const addEmptyCellToRows = (tableRows) => {\r\n let hasCollapsableRows = false;\r\n\r\n // first check if any row has collapsable rows\r\n tableRows.forEach((element) => {\r\n if (element.collapsableRows) {\r\n hasCollapsableRows = true;\r\n return;\r\n }\r\n });\r\n\r\n if (hasCollapsableRows) {\r\n tableRows.forEach((element) => {\r\n if (!element.collapsableRows) {\r\n element.cells.push(createTableCell(''));\r\n } else {\r\n element.collapsableRows.forEach((collapsedElement) => {\r\n collapsedElement.cells.push(createTableCell(''));\r\n });\r\n }\r\n });\r\n }\r\n\r\n return tableRows;\r\n};*/\r\n\r\nconst createFormattedSubucsRows = (\r\n subucs: Dictionary,\r\n ucCode: number,\r\n columnsTitles: IColumnItem[],\r\n currentLocale: string,\r\n dispatch,\r\n navigateTo,\r\n currentRegistration,\r\n t\r\n) => {\r\n if (\r\n subucs === undefined ||\r\n subucs === null ||\r\n subucs[ucCode] === undefined ||\r\n subucs[ucCode] === null\r\n )\r\n return null;\r\n\r\n let moduleSubUcs = subucs[ucCode];\r\n\r\n let subucsRowsCellArray = [] as any;\r\n\r\n let collapsableRows = moduleSubUcs.map((subuc) => {\r\n return {\r\n rowProps: {\r\n //color: theme.colors.dangerRed,\r\n navigatable: true,\r\n onClick: () => {\r\n dispatch(\r\n navigateTo({\r\n key: 'ucDetails',\r\n params: { ucCode: subuc.ucCode, regid: currentRegistration },\r\n })\r\n );\r\n },\r\n },\r\n cells: subucsRowsCellArray.concat(\r\n ...columnsTitles.map((title) => {\r\n let content = subuc[title.key];\r\n\r\n if (content === null && title.key !== COURSE_FIELD_KEY.GRADE) {\r\n content = ;\r\n } else if (title.key === COURSE_FIELD_KEY.UC_CODE) {\r\n return [createTableCell(content, { textAlign: 'right', width: 2 })];\r\n } else if (title.key === COURSE_FIELD_KEY.UC_NAME) {\r\n if (subuc.ucType === UC_TYPE.OPTION) {\r\n // it's an option\r\n let text: any;\r\n let label: any;\r\n if (subuc['selectedOption']) {\r\n // option with grade\r\n content = subuc['selectedOption'];\r\n\r\n text = {\r\n text: content.ucName,\r\n props: {\r\n color: theme.colors.primary,\r\n },\r\n };\r\n label = {\r\n text: `${subuc.ucCode} ${subuc.ucName}`,\r\n props: {\r\n color: theme.colors.plusDarkGrey,\r\n },\r\n };\r\n } else {\r\n // option without grade\r\n text = {\r\n text: content,\r\n props: {\r\n color: theme.colors.primary,\r\n },\r\n };\r\n label = {\r\n text: t('curricularPlan.viewOptionsName', { textOnly: true }),\r\n props: {\r\n color: theme.colors.plusDarkGrey,\r\n },\r\n isLink: true,\r\n //ucOptionCode: subuc.ucCode,\r\n };\r\n }\r\n\r\n return [createLabeledCell(text, label)];\r\n } else {\r\n return [\r\n createTableCell(content, {\r\n color: theme.colors.primary,\r\n weight: 500,\r\n }),\r\n ];\r\n }\r\n } else if (title.key === COURSE_FIELD_KEY.YEAR_STUDY) {\r\n return [\r\n createTableCell(\r\n `${numeral(Math.floor(content)).format('o')} ${t('curricularPlan.yearName', {\r\n textOnly: true,\r\n })}`,\r\n {\r\n textAlign: 'center',\r\n }\r\n ),\r\n ];\r\n } else if (title.key === COURSE_FIELD_KEY.ECTS) {\r\n return [\r\n createTableCell(\r\n parseFloat(content).toLocaleString(currentLocale, { minimumFractionDigits: 1 }),\r\n {\r\n textAlign: 'center',\r\n }\r\n ),\r\n ];\r\n } else if (title.key === COURSE_FIELD_KEY.CREDITS) {\r\n return [\r\n createTableCell(\r\n parseFloat(content).toLocaleString(currentLocale, { minimumFractionDigits: 1 })\r\n ),\r\n ];\r\n } else if (title.key === COURSE_FIELD_KEY.SEMESTER) {\r\n let label: string;\r\n\r\n if (content > 0 && content <= 2) {\r\n label = t('curricularPlan.semesterName', { textOnly: true });\r\n return [createTableCell(`${numeral(content).format('o')} ${label}`)];\r\n } else {\r\n label = t('curricularPlan.anualName', { textOnly: true });\r\n return [createTableCell(label, { textAlign: 'center' })];\r\n }\r\n } else if (title.key === COURSE_FIELD_KEY.GRADE) {\r\n return [\r\n content === null\r\n ? createTableCell(, {\r\n textAlign: 'center',\r\n })\r\n : createTableCell(content, { textAlign: 'center' }),\r\n createTableCell(content ? : '', {\r\n textAlign: 'center',\r\n colSpan: 2,\r\n }),\r\n ];\r\n }\r\n\r\n return [createTableCell(content, { textAlign: 'center' })];\r\n })\r\n ),\r\n };\r\n });\r\n\r\n return collapsableRows;\r\n};\r\n\r\nconst createTableCell = (content: string | number | JSX.Element, cellProps?: any) => {\r\n if (cellProps) {\r\n return {\r\n content: content,\r\n cellProps: {\r\n ...cellProps,\r\n },\r\n };\r\n } else {\r\n return {\r\n content: content,\r\n };\r\n }\r\n};\r\n\r\nconst createLabeledCell = (content: any, label: any, cellProps?: {}) => {\r\n return {\r\n content: ,\r\n cellProps: cellProps,\r\n };\r\n};\r\n\r\nexport const getTableTabs = (curricularPlan: ICurricularPlan) => {\r\n let visibleTabs = [] as string[];\r\n\r\n Object.keys(curricularPlan.ucs ?? {}).forEach((tabYear) => {\r\n visibleTabs.push(tabYear);\r\n });\r\n\r\n // this chain defines the order os the tabs in the interface\r\n if (visibleTabs.length > 1) {\r\n visibleTabs.push(COURSE_TYPE_KEY.EVERY_COURSE_UCS);\r\n }\r\n if (curricularPlan.accreditedUcs?.length > 0) {\r\n visibleTabs.push(COURSE_TYPE_KEY.ACCREDITED_UCS);\r\n }\r\n if (curricularPlan.extraCurricularUcs?.length > 0) {\r\n visibleTabs.push(COURSE_TYPE_KEY.EXTRA_CURRICULAR_UCS);\r\n }\r\n if (curricularPlan.mobilityUcs?.length > 0) {\r\n visibleTabs.push(COURSE_TYPE_KEY.MOBILITY_UCS);\r\n }\r\n\r\n return visibleTabs;\r\n};\r\n\r\nexport const getTableColumnsForMandatoryUcs = (\r\n mandatoryCourseColumns: IColumnItem[],\r\n ucs: ICourseUC[],\r\n subUcs: any,\r\n isExtraCurricular: boolean,\r\n t\r\n) => {\r\n // mandatory ucs: ua ucs\r\n\r\n let visibleColumns = mandatoryCourseColumns.slice();\r\n let columnsToRemove = [] as number[];\r\n\r\n // elem1: ectsType, elem2: creditsType\r\n let ucsTypesList = findCreditTypes(ucs);\r\n\r\n if (!isExtraCurricular) {\r\n // year of study column\r\n columnsToRemove.unshift(2);\r\n } else {\r\n visibleColumns[2].value = t('curricularPlan.academicName', { textOnly: true });\r\n columnsToRemove.unshift(3);\r\n\r\n const extracurricularTypesList = findCreditTypes(ucs);\r\n ucsTypesList = [extracurricularTypesList[0], extracurricularTypesList[1]];\r\n }\r\n\r\n if (ucsTypesList[0] && !ucsTypesList[1]) {\r\n columnsToRemove.unshift(4);\r\n } else if (ucsTypesList[1] && !ucsTypesList[0]) {\r\n columnsToRemove.unshift(5);\r\n }\r\n\r\n columnsToRemove.forEach((columnIndex) => visibleColumns.splice(columnIndex, 1));\r\n\r\n return visibleColumns;\r\n};\r\n\r\nexport const getTableColumnsForAllCourseUcs = (\r\n mandatoryCourseColumns: IColumnItem[],\r\n ucsDict: Dictionary,\r\n subUcs: Dictionary\r\n) => {\r\n let visibleColumns = mandatoryCourseColumns.slice();\r\n let columnsToRemove = [] as number[];\r\n\r\n let ectsType = false;\r\n let creditsType = false;\r\n let hasCollapsableRows = false;\r\n\r\n for (let key in ucsDict) {\r\n // check if ucs have collapsable rows\r\n for (let i = 0; i < ucsDict[key].length; i++) {\r\n if (ucsDict[key][i].ucCode in subUcs) {\r\n hasCollapsableRows = true;\r\n break;\r\n }\r\n }\r\n\r\n if (hasCollapsableRows) {\r\n break;\r\n }\r\n }\r\n\r\n for (let key in ucsDict) {\r\n // 1 = ECTS\r\n //-1 = Créditos\r\n for (let uc of ucsDict[key]) {\r\n if (!creditsType && uc.bolonha === GRADE_TYPE.CREDITS) {\r\n creditsType = true;\r\n } else if (!ectsType && uc.bolonha === GRADE_TYPE.ECTS) {\r\n ectsType = true;\r\n }\r\n\r\n if (creditsType && ectsType) {\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (ectsType && !creditsType) {\r\n columnsToRemove.unshift(4);\r\n } else if (creditsType && !ectsType) {\r\n columnsToRemove.unshift(5);\r\n }\r\n\r\n columnsToRemove.forEach((columnIndex) => visibleColumns.splice(columnIndex, 1));\r\n\r\n return visibleColumns;\r\n};\r\n\r\nexport const setupOptionsTableContent = (\r\n optionsCourseColumns: IColumnItem[],\r\n ucOptions,\r\n currentLocale: string,\r\n t\r\n) => {\r\n const credits = findCreditTypes(ucOptions.courseList);\r\n\r\n let tmpOptionsList = [...optionsCourseColumns];\r\n\r\n if (!credits[0]) {\r\n const indexToRemove = tmpOptionsList.map((e) => e.key).indexOf(COURSE_FIELD_KEY.ECTS);\r\n\r\n tmpOptionsList.splice(indexToRemove, 1);\r\n } else if (!credits[1]) {\r\n const indexToRemove = tmpOptionsList.map((e) => e.key).indexOf(COURSE_FIELD_KEY.CREDITS);\r\n\r\n tmpOptionsList.splice(indexToRemove, 1);\r\n }\r\n\r\n // remove academic year column\r\n const indexAcademicYear = tmpOptionsList\r\n .map((e) => e.key)\r\n .indexOf(COURSE_FIELD_KEY.ACADEMIC_YEAR);\r\n tmpOptionsList.splice(indexAcademicYear, 1);\r\n\r\n const header = {\r\n type: 'columnTitle' as string,\r\n titles: tmpOptionsList.map((title) => {\r\n if (\r\n title.key === COURSE_FIELD_KEY.UC_CODE ||\r\n title.key === COURSE_FIELD_KEY.ACADEMIC_YEAR ||\r\n title.key === COURSE_FIELD_KEY.YEAR_STUDY\r\n ) {\r\n return {\r\n text: title.value,\r\n style: {\r\n textAlign: 'center',\r\n },\r\n };\r\n } else if (title.key === COURSE_FIELD_KEY.ECTS) {\r\n if (credits[0]) {\r\n return {\r\n text: title.value,\r\n style: {\r\n textAlign: 'center',\r\n },\r\n };\r\n }\r\n } else if (title.key === COURSE_FIELD_KEY.CREDITS) {\r\n if (credits[1]) {\r\n return {\r\n text: title.value,\r\n style: {\r\n textAlign: 'center',\r\n },\r\n };\r\n }\r\n }\r\n\r\n return {\r\n text: title.value,\r\n };\r\n }),\r\n };\r\n\r\n const tableRows = ucOptions.courseList.map((uc) => {\r\n return {\r\n rowProps: { color: theme.colors.white },\r\n cells: tmpOptionsList.map((title) => {\r\n let content = uc[title.key];\r\n\r\n if (content === null) {\r\n content = ;\r\n } else if (title.key === COURSE_FIELD_KEY.UC_NAME) {\r\n return createTableCell(content, {\r\n color: theme.colors.primary,\r\n weight: 500,\r\n });\r\n } else if (title.key === COURSE_FIELD_KEY.ECTS) {\r\n return createTableCell(\r\n parseFloat(content).toLocaleString(currentLocale, { minimumFractionDigits: 1 }),\r\n { textAlign: 'center' }\r\n );\r\n } else if (title.key === COURSE_FIELD_KEY.CREDITS) {\r\n return createTableCell(\r\n parseFloat(content).toLocaleString(currentLocale, { minimumFractionDigits: 1 }),\r\n { textAlign: 'center' }\r\n );\r\n } else if (title.key === COURSE_FIELD_KEY.SEMESTER) {\r\n let label: string;\r\n\r\n if (content > 0 && content <= 2) {\r\n label = t('curricularPlan.semesterName', { textOnly: true });\r\n return createTableCell(`${numeral(content).format('o')} ${label}`);\r\n } else {\r\n label = t('curricularPlan.anualName', { textOnly: true });\r\n return createTableCell(label);\r\n }\r\n }\r\n\r\n return createTableCell(content, { textAlign: 'center' });\r\n }),\r\n };\r\n });\r\n\r\n const structure = {\r\n header: header,\r\n rows: tableRows,\r\n };\r\n\r\n return structure;\r\n};\r\n\r\nconst findCreditTypes = (ucsList: ICourseUC[]) => {\r\n let ectsType = false;\r\n let creditsType = false;\r\n\r\n // 1 = ECTS\r\n //-1 = Créditos\r\n for (let uc of ucsList) {\r\n if (!creditsType && uc.bolonha === GRADE_TYPE.CREDITS) {\r\n creditsType = true;\r\n } else if (!ectsType && uc.bolonha === GRADE_TYPE.ECTS) {\r\n ectsType = true;\r\n }\r\n\r\n if (creditsType && ectsType) break;\r\n }\r\n\r\n return [ectsType, creditsType];\r\n};\r\n","/**\r\n * CurricularPlan scene\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport React, { useEffect, useState } from 'react';\r\nimport styled from 'styled-components';\r\nimport { Grid } from 'semantic-ui-react';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faAngleRight, faInfoCircle } from '@fortawesome/pro-light-svg-icons';\r\n\r\nimport {\r\n AnimatedBackground,\r\n Text,\r\n CallToAction,\r\n MultiToggle,\r\n ITable,\r\n Table,\r\n NoDataMessage,\r\n Loading,\r\n Modal,\r\n} from '@paco_ua/pacoui';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport * as selectors from './logic/selectors';\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport StudentRegistrationDropdown from 'shared/containers/StudentRegistrationDropdown';\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\n\r\nimport {\r\n COURSE_FIELD_KEY,\r\n COURSE_TYPE_KEY,\r\n getTableTabs,\r\n getTableColumnsForMandatoryUcs,\r\n getTableColumnsForAllCourseUcs,\r\n getCurricularPlanTableFormat,\r\n findTabInList,\r\n setupOptionsTableContent,\r\n} from './utils';\r\n\r\nimport { ITableRawData, IColumnItem, ITabItem } from './types';\r\n\r\nimport { Theme as theme } from '@paco_ua/pacoui';\r\n\r\nimport numeral from 'numeral';\r\n\r\nconst CurricularPlan = ({ t }) => {\r\n const { onMount, onUnmount, getCurricularPlan, setUcOptionsModal } = actions.CurricularPlan;\r\n // const { setUserRegistrations } = actions.App;\r\n\r\n const { navigateTo } = actions.App;\r\n\r\n const {\r\n loadingStatus,\r\n errorStatus,\r\n summaries,\r\n curricularPlans,\r\n ucOptionsModal,\r\n ucOptions,\r\n } = useSelector(selectors.getCurricularPlanSlice);\r\n\r\n const user = useSelector(selectors.getUser);\r\n\r\n const registrations = useSelector(selectors.getUserRegistrations);\r\n\r\n const currentLocale = useSelector(selectors.getAppSlice);\r\n\r\n const currentRegistrationId = useSelector(selectors.getRegistration);\r\n\r\n const dispatch = useDispatch();\r\n\r\n const [tabSelectionIndex, setTabSelectionIndex] = useState('');\r\n\r\n const [visibleTabsList, setVisibleTabsList] = useState([] as string[]);\r\n\r\n const [tableContent, setTableContent] = useState(null as any | ITable);\r\n\r\n const [optionsTableContent, setOptionsTableContent] = useState(null as any | ITable);\r\n\r\n const [noDataAvailable, setNoDataAvailable] = useState(false);\r\n\r\n // same keys as the ones received from the endpoint\r\n const COURSE_FIELD = {\r\n ACADEMIC_YEAR: {\r\n key: COURSE_FIELD_KEY.ACADEMIC_YEAR,\r\n value: t('curricularPlan.academicName', { textOnly: true }),\r\n },\r\n CREDITS: {\r\n key: COURSE_FIELD_KEY.CREDITS,\r\n value: t('curricularPlan.creditsName', { textOnly: true }),\r\n },\r\n ECTS: {\r\n key: COURSE_FIELD_KEY.ECTS,\r\n value: t('curricularPlan.ectsName', { textOnly: true }),\r\n },\r\n GRADE: {\r\n key: COURSE_FIELD_KEY.GRADE,\r\n value: t('curricularPlan.classificationName', { textOnly: true }),\r\n },\r\n INSTITUTION: {\r\n key: COURSE_FIELD_KEY.INSTITUTION,\r\n value: t('curricularPlan.institutionName', { textOnly: true }),\r\n },\r\n PROGRAMME: {\r\n key: COURSE_FIELD_KEY.PROGRAMME,\r\n value: t('curricularPlan.programName', { textOnly: true }),\r\n },\r\n SEMESTER: {\r\n key: COURSE_FIELD_KEY.SEMESTER,\r\n value: t('curricularPlan.semesterName', { textOnly: true }),\r\n },\r\n TYPE: {\r\n key: COURSE_FIELD_KEY.TYPE,\r\n value: t('curricularPlan.typeName', { textOnly: true }),\r\n },\r\n UC_CODE: {\r\n key: COURSE_FIELD_KEY.UC_CODE,\r\n value: t('curricularPlan.ucCodeName', { textOnly: true }),\r\n },\r\n UC_NAME: {\r\n key: COURSE_FIELD_KEY.UC_NAME,\r\n value: t('curricularPlan.curricularUnitName', { textOnly: true }),\r\n },\r\n YEAR_STUDY: {\r\n key: COURSE_FIELD_KEY.YEAR_STUDY,\r\n value: t('curricularPlan.schoolYearName', { textOnly: true }),\r\n },\r\n };\r\n\r\n const COURSE_TYPE = {\r\n FIRST_YEAR: {\r\n key: COURSE_TYPE_KEY.FIRST_YEAR,\r\n value: `${numeral(1).format('o')} ${t('curricularPlan.year', { textOnly: true })}`,\r\n },\r\n SECOND_YEAR: {\r\n key: COURSE_TYPE_KEY.SECOND_YEAR,\r\n value: `${numeral(2).format('o')} ${t('curricularPlan.year', { textOnly: true })}`,\r\n },\r\n THIRD_YEAR: {\r\n key: COURSE_TYPE_KEY.THIRD_YEAR,\r\n value: `${numeral(3).format('o')} ${t('curricularPlan.year', { textOnly: true })}`,\r\n },\r\n FOURTH_YEAR: {\r\n key: COURSE_TYPE_KEY.FOURTH_YEAR,\r\n value: `${numeral(4).format('o')} ${t('curricularPlan.year', { textOnly: true })}`,\r\n },\r\n FIFTH_YEAR: {\r\n key: COURSE_TYPE_KEY.FIFTH_YEAR,\r\n value: `${numeral(5).format('o')} ${t('curricularPlan.year', { textOnly: true })}`,\r\n },\r\n SIXTH_YEAR: {\r\n key: COURSE_TYPE_KEY.SIXTH_YEAR,\r\n value: `${numeral(6).format('o')} ${t('curricularPlan.year', { textOnly: true })}`,\r\n },\r\n EVERY_COURSE_UCS: {\r\n key: COURSE_TYPE_KEY.EVERY_COURSE_UCS,\r\n value: t('curricularPlan.everyCourseUc', { textOnly: true }),\r\n },\r\n EXTRA_CURRICULAR_UCS: {\r\n key: COURSE_TYPE_KEY.EXTRA_CURRICULAR_UCS,\r\n value: t('curricularPlan.extraCurricular', { textOnly: true }),\r\n },\r\n MOBILITY_UCS: {\r\n key: COURSE_TYPE_KEY.MOBILITY_UCS,\r\n value: t('curricularPlan.mobility', { textOnly: true }),\r\n },\r\n ACCREDITED_UCS: {\r\n key: COURSE_TYPE_KEY.ACCREDITED_UCS,\r\n value: t('curricularPlan.Accredited', { textOnly: true }),\r\n },\r\n };\r\n\r\n const MANDATORY_COURSE_COLUMNS: IColumnItem[] = [\r\n COURSE_FIELD.UC_CODE,\r\n COURSE_FIELD.UC_NAME,\r\n COURSE_FIELD.YEAR_STUDY,\r\n COURSE_FIELD.SEMESTER,\r\n COURSE_FIELD.CREDITS,\r\n COURSE_FIELD.ECTS,\r\n COURSE_FIELD.GRADE,\r\n ];\r\n\r\n const MOBILITY_COURSE_COLUMNS: IColumnItem[] = [\r\n COURSE_FIELD.PROGRAMME,\r\n COURSE_FIELD.UC_NAME,\r\n COURSE_FIELD.ACADEMIC_YEAR,\r\n COURSE_FIELD.GRADE,\r\n COURSE_FIELD.INSTITUTION,\r\n ];\r\n\r\n const ACCREDITED_COURSE_COLUMNS: IColumnItem[] = [\r\n COURSE_FIELD.UC_CODE,\r\n COURSE_FIELD.UC_NAME,\r\n COURSE_FIELD.ACADEMIC_YEAR,\r\n COURSE_FIELD.GRADE, // may be \"Not Applicable\"\r\n COURSE_FIELD.TYPE,\r\n ];\r\n\r\n const OPTIONS_COURSE_COLUMNS: IColumnItem[] = [\r\n COURSE_FIELD.UC_CODE,\r\n COURSE_FIELD.UC_NAME,\r\n COURSE_FIELD.ACADEMIC_YEAR,\r\n COURSE_FIELD.SEMESTER,\r\n COURSE_FIELD.CREDITS,\r\n COURSE_FIELD.ECTS,\r\n ];\r\n\r\n const COURSE_TYPE_TABS: ITabItem[] = [\r\n COURSE_TYPE.FIRST_YEAR,\r\n COURSE_TYPE.SECOND_YEAR,\r\n COURSE_TYPE.THIRD_YEAR,\r\n COURSE_TYPE.FOURTH_YEAR,\r\n COURSE_TYPE.FIFTH_YEAR,\r\n COURSE_TYPE.EVERY_COURSE_UCS,\r\n COURSE_TYPE.EXTRA_CURRICULAR_UCS,\r\n COURSE_TYPE.MOBILITY_UCS,\r\n COURSE_TYPE.ACCREDITED_UCS,\r\n ];\r\n\r\n const tabButtons = visibleTabsList // exclude mobility_ucs tab\r\n .map((tabKey: string) => {\r\n return {\r\n children: findTabInList(COURSE_TYPE_TABS, tabKey),\r\n onClick: () => {\r\n setTabSelectionIndex(tabKey);\r\n },\r\n selected: tabSelectionIndex === tabKey,\r\n testId: 'curricularplan_multitoggle_curricularUnitTypes',\r\n };\r\n });\r\n\r\n useEffect(() => {\r\n dispatch(onMount());\r\n return () => {\r\n dispatch(onUnmount());\r\n };\r\n }, [dispatch, onMount, onUnmount, user.impersonate]);\r\n\r\n useEffect(() => {\r\n if (\r\n Object.keys(curricularPlans).length > 0 &&\r\n currentRegistrationId &&\r\n currentRegistrationId in curricularPlans &&\r\n registrations\r\n ) {\r\n const visibleTabs = getTableTabs(curricularPlans[currentRegistrationId]);\r\n\r\n if (visibleTabs.length <= 0) {\r\n setNoDataAvailable(true);\r\n }\r\n\r\n setVisibleTabsList(visibleTabs);\r\n }\r\n }, [registrations, curricularPlans]);\r\n\r\n // runs when a registration is selected in the dropdown\r\n useEffect(() => {\r\n if (visibleTabsList.length > 0) {\r\n // selection of the default tab\r\n setTabSelectionIndex(visibleTabsList[0]);\r\n }\r\n }, [visibleTabsList]);\r\n\r\n // runs when a registrationId is selected or the locale is changed\r\n useEffect(() => {\r\n if (currentRegistrationId) {\r\n dispatch(getCurricularPlan());\r\n // dispatch(actions.StudentRegistrationDropdown.getRegistrations());\r\n }\r\n }, [currentRegistrationId, currentLocale]);\r\n\r\n // runs when a new tab is selected or the locale is changed\r\n useEffect(() => {\r\n if (\r\n tabSelectionIndex !== '' &&\r\n currentRegistrationId &&\r\n currentRegistrationId >= 0 &&\r\n Object.keys(curricularPlans).length > 0\r\n ) {\r\n setupTableContent(currentRegistrationId, tabSelectionIndex);\r\n }\r\n }, [tabSelectionIndex, curricularPlans]);\r\n\r\n useEffect(() => {\r\n if (ucOptions.courseList.length > 0) {\r\n setOptionsTableContent(\r\n setupOptionsTableContent(OPTIONS_COURSE_COLUMNS, ucOptions, currentLocale, t)\r\n );\r\n } else {\r\n setOptionsTableContent(null);\r\n }\r\n }, [ucOptions]);\r\n\r\n const setupTableContent = (dropdownOption: number, tabKey: string) => {\r\n let tmpColumnTitlesList = [] as IColumnItem[];\r\n let tableData: ITableRawData = {\r\n ucs: [],\r\n subUcs: {},\r\n accreditedUcs: [],\r\n mobilityUcs: [],\r\n extraCurricularUcs: [],\r\n };\r\n\r\n // check if string is an integer\r\n const isNum = /^\\d+$/.test(tabKey);\r\n\r\n if (isNum) {\r\n tmpColumnTitlesList = getTableColumnsForMandatoryUcs(\r\n MANDATORY_COURSE_COLUMNS,\r\n curricularPlans[dropdownOption].ucs[tabKey],\r\n curricularPlans[dropdownOption].subUcs,\r\n false,\r\n t\r\n );\r\n\r\n tableData.ucs = curricularPlans[dropdownOption].ucs[tabKey];\r\n\r\n tableData.subUcs = curricularPlans[dropdownOption].subUcs;\r\n } else if (tabKey === COURSE_TYPE_KEY.EVERY_COURSE_UCS) {\r\n tmpColumnTitlesList = getTableColumnsForAllCourseUcs(\r\n MANDATORY_COURSE_COLUMNS,\r\n curricularPlans[dropdownOption].ucs,\r\n curricularPlans[dropdownOption].subUcs\r\n );\r\n\r\n tableData.ucs = [];\r\n\r\n for (var key in curricularPlans[dropdownOption].ucs) {\r\n tableData.ucs.push(...curricularPlans[dropdownOption].ucs[key]);\r\n }\r\n\r\n tableData.subUcs = curricularPlans[dropdownOption].subUcs;\r\n } else if (tabKey === COURSE_TYPE_KEY.EXTRA_CURRICULAR_UCS) {\r\n tmpColumnTitlesList = getTableColumnsForMandatoryUcs(\r\n MANDATORY_COURSE_COLUMNS,\r\n curricularPlans[dropdownOption].extraCurricularUcs,\r\n curricularPlans[dropdownOption].subUcs,\r\n true,\r\n t\r\n );\r\n tableData.extraCurricularUcs = curricularPlans[dropdownOption].extraCurricularUcs.slice();\r\n } else if (tabKey === COURSE_TYPE_KEY.MOBILITY_UCS) {\r\n tmpColumnTitlesList = MOBILITY_COURSE_COLUMNS.slice();\r\n tableData.mobilityUcs = curricularPlans[dropdownOption].mobilityUcs.slice();\r\n } else if (tabKey === COURSE_TYPE_KEY.ACCREDITED_UCS) {\r\n tmpColumnTitlesList = ACCREDITED_COURSE_COLUMNS.slice();\r\n tableData.accreditedUcs = curricularPlans[dropdownOption].accreditedUcs.slice();\r\n } else {\r\n console.error('Invalid tab id');\r\n }\r\n\r\n const newTable = getCurricularPlanTableFormat(\r\n tableData,\r\n tmpColumnTitlesList,\r\n tabKey,\r\n currentLocale,\r\n dispatch,\r\n navigateTo,\r\n currentRegistrationId,\r\n t\r\n );\r\n\r\n if (newTable) {\r\n setTableContent(newTable);\r\n }\r\n };\r\n\r\n const handleDropdownSelection = (registrationId) => {\r\n if (!(registrationId in curricularPlans)) {\r\n dispatch(getCurricularPlan());\r\n }\r\n\r\n // reset states\r\n setVisibleTabsList([]);\r\n setTabSelectionIndex('');\r\n setNoDataAvailable(false);\r\n };\r\n\r\n const handleModalOnClose = () => {\r\n dispatch(setUcOptionsModal(false));\r\n };\r\n\r\n return (\r\n }\r\n subHeader={\r\n {\r\n handleDropdownSelection(currentRegistrationId);\r\n }}\r\n data-testid=\"curricularplan_dropdown_registration\"\r\n />\r\n }\r\n mainContent={\r\n <>\r\n {noDataAvailable && (\r\n \r\n \r\n \r\n )}\r\n\r\n {loadingStatus.loading && (\r\n \r\n \r\n \r\n )}\r\n\r\n {!loadingStatus.loading &&\r\n !noDataAvailable &&\r\n currentRegistrationId &&\r\n Object.keys(summaries).length > 0 &&\r\n currentRegistrationId in summaries &&\r\n summaries[currentRegistrationId]?.summary && (\r\n \r\n \r\n \r\n \r\n {t('curricularPlan.summary', { textOnly: true })}\r\n \r\n \r\n \r\n {Object.keys(curricularPlans).length > 0 ? (\r\n \r\n \r\n \r\n \r\n \r\n {t('curricularPlan.totalEctsEarned', { textOnly: true })}\r\n \r\n\r\n \r\n {summaries[currentRegistrationId].summary?.totalEctsEarned}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {t('curricularPlan.totalEctsToDo', { textOnly: true })}\r\n \r\n\r\n \r\n {summaries[currentRegistrationId].summary?.totalEctsToDo}\r\n \r\n \r\n \r\n {summaries[currentRegistrationId] &&\r\n summaries[currentRegistrationId].summary?.totalEctsAccredited !== null &&\r\n summaries[currentRegistrationId].summary?.totalEctsAccredited !==\r\n undefined && (\r\n \r\n \r\n \r\n {t('curricularPlan.totalEctsAccredited', { textOnly: true })}\r\n \r\n\r\n \r\n {summaries[currentRegistrationId].summary?.totalEctsAccredited}\r\n \r\n \r\n \r\n )}\r\n\r\n \r\n \r\n \r\n {t('curricularPlan.totalUcsCompleted', { textOnly: true })}\r\n \r\n\r\n \r\n {summaries[currentRegistrationId].summary?.totalUcsCompleted}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {t('curricularPlan.totalUcsToDo', { textOnly: true })}\r\n \r\n\r\n \r\n {summaries[currentRegistrationId].summary?.totalUcsToDo}\r\n \r\n \r\n \r\n {summaries[currentRegistrationId] &&\r\n summaries[currentRegistrationId].summary?.totalUcsAccredited !== null &&\r\n summaries[currentRegistrationId].summary?.totalUcsAccredited !==\r\n undefined && (\r\n \r\n \r\n \r\n {t('curricularPlan.totalUcsAccredited', { textOnly: true })}\r\n \r\n\r\n \r\n {summaries[currentRegistrationId].summary?.totalUcsAccredited}\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n ) : (\r\n t('curricularPlan.noCurricularUnitsFound', { textOnly: true })\r\n )}\r\n \r\n )}\r\n\r\n {!loadingStatus.loading &&\r\n !noDataAvailable &&\r\n Object.keys(curricularPlans).length > 0 &&\r\n currentRegistrationId &&\r\n summaries[currentRegistrationId] &&\r\n summaries[currentRegistrationId].grade !== null &&\r\n summaries[currentRegistrationId].grade !== undefined &&\r\n summaries[currentRegistrationId].grade !== 0 && (\r\n \r\n \r\n \r\n \r\n \r\n {t('curricularPlan.average', { textOnly: true })}\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {t('curricularPlan.average', { textOnly: true })}\r\n \r\n \r\n \r\n {t('curricularPlan.averageContent', { textOnly: true })}\r\n \r\n \r\n \r\n \r\n {`${summaries[currentRegistrationId].grade.toLocaleString(\r\n currentLocale\r\n )} ${t('curricularPlan.averageValues', { textOnly: true })}`}\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n {t('curricularPlan.averageMoreInformation', { textOnly: true })}\r\n \r\n \r\n \r\n }\r\n onAction={() => {\r\n window.open(\r\n t('links.curricularPlanAverageFormula', { textOnly: true }),\r\n '_blank'\r\n );\r\n }}\r\n />\r\n \r\n )}\r\n\r\n {!loadingStatus.loading && !noDataAvailable && tabButtons.length > 0 && (\r\n \r\n \r\n \r\n )}\r\n\r\n {!loadingStatus.loading &&\r\n !noDataAvailable &&\r\n Object.keys(curricularPlans).length > 0 &&\r\n currentRegistrationId &&\r\n curricularPlans[currentRegistrationId] &&\r\n tableContent && (\r\n \r\n \r\n \r\n )}\r\n\r\n {ucOptionsModal && (\r\n \r\n {ucOptions.name}\r\n \r\n }\r\n onClose={() => handleModalOnClose()}\r\n data-testid=\"curricularplan_modal_options_view\"\r\n >\r\n \r\n <>\r\n {!loadingStatus.loadingModal &&\r\n optionsTableContent /*&& ucOptions.courseList.length > 0*/ && (\r\n \r\n )}\r\n\r\n {!loadingStatus.loadingModal && optionsTableContent === null && (\r\n <>\r\n \r\n \r\n \r\n {t('curricularPlan.noOptionsUcsFound', { textOnly: true })}\r\n \r\n \r\n \r\n )}\r\n\r\n {loadingStatus.loadingModal && (\r\n \r\n )}\r\n \r\n \r\n \r\n )}\r\n \r\n }\r\n />\r\n );\r\n};\r\n\r\nexport default CurricularPlan;\r\n\r\nconst SummaryWrapper = styled.div`\r\n border-style: solid;\r\n border-width: thin;\r\n border-color: ${({ theme }) => theme.colors.softRegularGrey};\r\n margin-bottom: 32px;\r\n margin-top: 16px;\r\n padding: 38px;\r\n\r\n .row {\r\n margin-left: 0px;\r\n }\r\n`;\r\n\r\nconst SummaryItem = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n margin-bottom: 8px;\r\n`;\r\n\r\nconst TableWrapper = styled.div`\r\n overflow: auto;\r\n &&& th {\r\n padding-top: 0px !important;\r\n padding-bottom: 0px !important;\r\n height: 61px;\r\n }\r\n\r\n &&& td {\r\n padding-top: 0px !important;\r\n padding-bottom: 0px !important;\r\n height: 76px;\r\n }\r\n`;\r\n\r\nconst AverageGradeTitleWrapper = styled.div`\r\n border-top: 3px solid ${({ theme }) => theme.colors.primary};\r\n margin-bottom: 0px;\r\n margin-top: 40px;\r\n padding: 14px 19px;\r\n background-color: ${({ theme }) => theme.colors.softGrey};\r\n box-shadow: ${({ theme }) => `0 0 0 1px ${theme.colors.softGrey} inset`};\r\n\r\n .row {\r\n margin-left: 0px;\r\n }\r\n`;\r\n\r\nconst CourseTableWrapper = styled.div`\r\n margin-top: 40px;\r\n`;\r\n\r\nconst AverageGradeBodyWrapper = styled.div`\r\n border: 1px solid ${({ theme }) => theme.colors.lightGrey};\r\n margin: 0px;\r\n padding: 14px 19px;\r\n\r\n .row {\r\n margin-left: 0px;\r\n }\r\n`;\r\n\r\nconst InfoIconWrapper = styled.div``;\r\n\r\nconst AverageSubtitleWrapper = styled.div`\r\n margin-bottom: 2px;\r\n`;\r\n\r\nconst AverageWrapper = styled.div``;\r\n\r\nconst CallToActionWrapper = styled.div`\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n`;\r\n\r\nconst LoadingWrapper = styled.div`\r\n width: 100%;\r\n height: 300px;\r\n position: relative;\r\n`;\r\n\r\nconst NoOptionsListWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n align-items: center;\r\n\r\n div:nth-child(2) {\r\n margin-bottom: 20px;\r\n margin-top: 40px;\r\n }\r\n`;\r\n\r\nconst NoDataMessageWrapper = styled.div`\r\n margin: 100px 0px;\r\n`;\r\n\r\nconst ModalContentWrapper = styled.div`\r\n && .table {\r\n border: 0px solid !important;\r\n overflow: auto;\r\n }\r\n`;\r\n\r\nconst SummaryText = styled(Text)`\r\n margin-bottom: 12px;\r\n`;\r\n\r\nconst SummaryValuesText = styled(Text)`\r\n margin-bottom: 24px;\r\n`;\r\n","/**\r\n * CurricularUnitDetails selector\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getCurricularUnitDetailsSlice = (state: RootState) => state.CurricularUnitDetails;\r\nexport const getRegistration = (state: RootState) => state.StudentRegistrationDropdown.registration;\r\nexport const getUser = (state: RootState) => state.App.user;\r\nexport const getUserRegistrations = (state: RootState) => state.App.user.registrations;\r\nexport const getUserNmec = (state: RootState) => state.App.user.nmec;\r\nexport const getAppSlice = (state: RootState) => state.App.currentLocale;\r\n","/**\r\n * CurricularUnitDetails scene\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport React, { useEffect, useState } from 'react';\r\nimport styled from 'styled-components';\r\nimport { getCurrentRoute } from 'utils';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faFilePdf, faInfoCircle } from '@fortawesome/pro-light-svg-icons';\r\nimport { Text, Segment, Table, Button, StatusLabel } from '@paco_ua/pacoui';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport * as selectors from './logic/selectors';\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\n\r\nimport { Theme as theme } from '@paco_ua/pacoui';\r\n\r\nimport numeral from 'numeral';\r\n\r\nimport API from 'api';\r\n\r\nimport config from 'config';\r\n\r\nconst CurricularUnitDetails = ({ t }) => {\r\n const { onMount, onUnmount, getUcDetails, setSelectedUcCode } = actions.CurricularUnitDetails;\r\n const dispatch = useDispatch();\r\n\r\n const API_SEC_VIRTUAL = config.API_WSO2 + config.API_SEC_VIRTUAL_PATH;\r\n\r\n const { loading, errorStatus, ucDetails } = useSelector(selectors.getCurricularUnitDetailsSlice);\r\n\r\n const [loadingModels, setLoadingModels] = useState({});\r\n\r\n const SUMMARY_COLUMN_TITLES = [\r\n t('curricularUnitDetails.yearOfStudy', { textOnly: true }),\r\n t('curricularUnitDetails.academicYear', { textOnly: true }),\r\n t('curricularUnitDetails.semester', { textOnly: true }),\r\n t('curricularUnitDetails.evaluationType', { textOnly: true }),\r\n t('curricularUnitDetails.evaluationStatus', { textOnly: true }),\r\n ];\r\n\r\n const HISTORY_COLUMN_TITLES = [\r\n t('curricularUnitDetails.yearOfStudy', { textOnly: true }),\r\n /* t('curricularUnitDetails.semester', { textOnly: true }), hide column rows temporarly */\r\n t('curricularUnitDetails.gradeMethod', { textOnly: true }),\r\n t('curricularUnitDetails.gradeDate', { textOnly: true }),\r\n t('curricularUnitDetails.obtainedGrade', { textOnly: true }),\r\n t('curricularUnitDetails.gradeSheet', { textOnly: true }),\r\n ];\r\n\r\n const EVALUATION_METHOD = {\r\n er: t('curricularUnitDetails.erasmus', { textOnly: true }),\r\n eq: t('curricularUnitDetails.equivalence', { textOnly: true }),\r\n ml: t('curricularUnitDetails.improvementExam', { textOnly: true }),\r\n nm: t('curricularUnitDetails.examSeason', { textOnly: true }),\r\n re: t('curricularUnitDetails.improvementSeason', { textOnly: true }),\r\n ex: t('curricularUnitDetails.extraordinary', { textOnly: true }),\r\n es: t('curricularUnitDetails.specialSeason', { textOnly: true }),\r\n };\r\n\r\n const EVALUATION_TYPE = {\r\n finalExam: t('curricularUnitDetails.finalExam', { textOnly: true }),\r\n continuous: t('curricularUnitDetails.continuous', { textOnly: true }),\r\n };\r\n\r\n const EVALUATION_STATUS = {\r\n ongoing: t('curricularUnitDetails.ongoingEvaluation', { textOnly: true }),\r\n done: t('curricularUnitDetails.doneEvaluation', { textOnly: true }),\r\n };\r\n\r\n // get ucCode from the url\r\n const selectedUcCode = getCurrentRoute().params.ucCode;\r\n const registrationId = getCurrentRoute().params.regid;\r\n\r\n const user = useSelector(selectors.getUser);\r\n\r\n useEffect(() => {\r\n dispatch(onMount());\r\n return () => {\r\n dispatch(onUnmount());\r\n };\r\n }, [dispatch, onMount, onUnmount, user.impersonate]);\r\n\r\n useEffect(() => {\r\n if (selectedUcCode !== null) {\r\n dispatch(setSelectedUcCode(selectedUcCode));\r\n dispatch(getUcDetails({ selectedUcCode, registrationId }));\r\n }\r\n }, [selectedUcCode]);\r\n\r\n const getSummaryTableStructure: any = (\r\n signups,\r\n summaryColumnTitles,\r\n evaluationStatus,\r\n evaluationType\r\n ) => {\r\n const structure = {\r\n header: {\r\n type: 'columnTitle' as string,\r\n titles: summaryColumnTitles.map((title) => {\r\n return {\r\n text: title,\r\n style: {\r\n textAlign: 'center',\r\n },\r\n };\r\n }),\r\n },\r\n rows: signups\r\n ? signups.map((entry) => {\r\n return {\r\n rowProps: { color: theme.colors.white },\r\n cells: Object.keys(entry).map((field) => {\r\n if (field === 'evaluationStatus') {\r\n return {\r\n content: (\r\n \r\n \r\n \r\n ),\r\n cellProps: {\r\n textAlign: 'center',\r\n },\r\n };\r\n } else if (field === 'evaluationType') {\r\n return {\r\n content: evaluationType[entry[field]],\r\n cellProps: {\r\n textAlign: 'center',\r\n },\r\n };\r\n } else if (field === 'semester') {\r\n return {\r\n content:\r\n entry[field] === 0\r\n ? t('enrollments.annual', { textOnly: true })\r\n : `${numeral(entry[field]).format('o')} ${t('enrollments.semester', {\r\n textOnly: true,\r\n })}`,\r\n cellProps: {\r\n textAlign: 'center',\r\n style: {\r\n whiteSpace: 'nowrap',\r\n },\r\n },\r\n };\r\n } else if (field === 'yearOfStudy') {\r\n return {\r\n content: `${numeral(entry[field]).format('o')} ${t('enrollments.year', {\r\n textOnly: true,\r\n })}`,\r\n cellProps: {\r\n textAlign: 'center',\r\n },\r\n };\r\n } else {\r\n return {\r\n content: entry[field],\r\n cellProps: {\r\n textAlign: 'center',\r\n },\r\n };\r\n }\r\n }),\r\n };\r\n })\r\n : [\r\n {\r\n cells: [\r\n {\r\n content: '',\r\n },\r\n ],\r\n },\r\n ],\r\n };\r\n\r\n return structure;\r\n };\r\n\r\n const getHistoryTableStructure: any = (history, historyColumnTitles, evaluationMethod) => {\r\n const structure = {\r\n header: {\r\n type: 'columnTitle' as string,\r\n titles: historyColumnTitles.map((title) => {\r\n return {\r\n text: title,\r\n style: {\r\n textAlign: 'center',\r\n },\r\n };\r\n }),\r\n },\r\n rows: history\r\n ? history.map((entry) => {\r\n const fields = Object.keys(entry)\r\n .filter((field) => field !== 'evaluationTypeId')\r\n .filter((field) => field !== 'semester'); //hide semester rows temporarly\r\n return {\r\n rowProps: { color: theme.colors.white },\r\n cells: fields.map((field) => {\r\n if (field === 'examPeriod') {\r\n return {\r\n content: evaluationMethod[entry[field]],\r\n cellProps: {\r\n textAlign: 'center',\r\n },\r\n };\r\n } else if (field === 'grade') {\r\n return {\r\n content:\r\n `${t('suplementaryGrades.' + entry[field], {\r\n textOnly: true,\r\n })}` ===\r\n 'suplementaryGrades.' + entry[field] || entry['evaluationTypeId'] !== 1\r\n ? entry[field]\r\n : `${t('suplementaryGrades.' + entry[field], {\r\n textOnly: true,\r\n })}`,\r\n cellProps: {\r\n color:\r\n Number(entry[field]) > 9 && Number(entry[field]) <= 20\r\n ? theme.colors.successGreen\r\n : theme.colors.dangerRed,\r\n weight: 'bold',\r\n textAlign: 'center',\r\n },\r\n };\r\n } else if (field === 'gradesFile') {\r\n return {\r\n content:\r\n entry.gradesFile.name === null ? (\r\n <>\r\n ) : (\r\n {\r\n if (!loadingModels[entry.gradesFile.id]) {\r\n setLoadingModels((currentValues) => {\r\n return { ...currentValues, [entry.gradesFile.id]: true };\r\n });\r\n API.files.getFileOnTab\r\n .call(`${API_SEC_VIRTUAL}${entry[field].url}`)\r\n .then((value) => {\r\n setLoadingModels((currentValues) => {\r\n return { ...currentValues, [entry.gradesFile.id]: false };\r\n });\r\n })\r\n .catch((e) => {\r\n setLoadingModels((currentValues) => {\r\n return { ...currentValues, [entry.gradesFile.id]: false };\r\n });\r\n dispatch(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.general_errorLoadingFile'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n });\r\n }\r\n }}\r\n >\r\n \r\n \r\n ),\r\n cellProps: {\r\n textAlign: 'center',\r\n style: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n },\r\n },\r\n };\r\n } else {\r\n /* hide semester rows temporarly \r\n else if (field === 'semester') {\r\n return {\r\n content:\r\n entry[field] === 0\r\n ? t('enrollments.annual', { textOnly: true })\r\n : `${numeral(entry[field]).format('o')} ${t('enrollments.semester', {\r\n textOnly: true,\r\n })}`,\r\n cellProps: {\r\n textAlign: 'center',\r\n style: {\r\n whiteSpace: 'nowrap',\r\n },\r\n },\r\n };\r\n } */\r\n return {\r\n content: entry[field],\r\n cellProps: {\r\n textAlign: 'center',\r\n },\r\n };\r\n }\r\n }),\r\n };\r\n })\r\n : [\r\n {\r\n cells: [\r\n {\r\n content: '',\r\n },\r\n ],\r\n },\r\n ],\r\n };\r\n\r\n return structure;\r\n };\r\n\r\n const summaryTableStructure = getSummaryTableStructure(\r\n ucDetails.signups ? ucDetails.signups : null,\r\n SUMMARY_COLUMN_TITLES,\r\n EVALUATION_STATUS,\r\n EVALUATION_TYPE\r\n );\r\n\r\n const historyTableStructure = getHistoryTableStructure(\r\n ucDetails.history ? ucDetails.history : null,\r\n HISTORY_COLUMN_TITLES,\r\n EVALUATION_METHOD\r\n );\r\n\r\n return (\r\n \r\n }\r\n mainContent={\r\n <>\r\n {Object.keys(ucDetails).length > 0 && (\r\n <>\r\n {/*Hide Resumo Matricula*/}\r\n {/* \r\n \r\n \r\n {t(`curricularUnitDetails.enrollmentSummary_title`)}\r\n \r\n\r\n {summaryTableStructure.rows.length > 0 && (\r\n \r\n
    \r\n \r\n )}\r\n\r\n {summaryTableStructure.rows.length === 0 && (\r\n \r\n \r\n \r\n \r\n \r\n {t('curricularUnitDetails.noEnrollmentSummary', { textOnly: true })}\r\n \r\n \r\n )}\r\n \r\n
    */}\r\n\r\n \r\n \r\n \r\n {t(`curricularUnitDetails.enrollmentHistory_title`)}\r\n \r\n\r\n {historyTableStructure.rows.length > 0 && (\r\n \r\n \r\n \r\n )}\r\n\r\n {historyTableStructure.rows.length === 0 && (\r\n \r\n \r\n \r\n \r\n \r\n {t('curricularUnitDetails.noEnrollmentHistory', { textOnly: true })}\r\n \r\n \r\n )}\r\n \r\n \r\n \r\n )}\r\n \r\n }\r\n />\r\n );\r\n};\r\n\r\nexport default CurricularUnitDetails;\r\n\r\nconst EnrollmentSummaryContent = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst SummaryTableWrapper = styled.div`\r\n margin-top: 28px;\r\n overflow: auto;\r\n\r\n &&& th {\r\n padding-top: 0px !important;\r\n padding-bottom: 0px !important;\r\n height: 61px;\r\n }\r\n\r\n &&& td {\r\n padding-top: 0px !important;\r\n padding-bottom: 0px !important;\r\n height: 76px;\r\n }\r\n`;\r\n\r\nconst HistorySegmentWrapper = styled.div`\r\n margin-top: 40px;\r\n`;\r\n\r\nconst StatusLabelWrapper = styled.div`\r\n width: 100%;\r\n display: flex;\r\n justify-content: center;\r\n`;\r\n\r\nconst MessageNoCertificates = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n text-align: center;\r\n justify-content: center;\r\n margin-top: 60px;\r\n margin-bottom: 20px;\r\n\r\n div:nth-child(2) {\r\n margin-top: 16px;\r\n }\r\n`;\r\n\r\nconst Icon = styled.div`\r\n font-size: 60px;\r\n color: ${({ theme }) => theme.colors.primary};\r\n`;\r\n","/**\r\n * PersonalDataBlock component\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport React, { useContext, useState, useEffect } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { Button, Text, Tooltip } from '@paco_ua/pacoui';\r\n\r\nimport { useDispatch } from 'react-redux';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faPen } from '@fortawesome/free-solid-svg-icons';\r\nimport { faEllipsisH } from '@fortawesome/pro-regular-svg-icons';\r\n\r\nimport FormManager from 'shared/containers/FormManager';\r\nimport { Grid } from 'semantic-ui-react';\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport { setValuesStructure } from './utils';\r\n\r\nimport { t } from 'app';\r\n\r\ninterface IProps {\r\n blockKey: string;\r\n title: string;\r\n subtitle?: string;\r\n picture?: any | null;\r\n showPicture?: boolean;\r\n lastUpdated: string;\r\n showEditBlockButton: boolean;\r\n formDataList: any;\r\n editing?: boolean;\r\n loading?: boolean | undefined;\r\n}\r\n\r\nconst PersonalDataBlock: React.FC = ({\r\n blockKey,\r\n title,\r\n subtitle,\r\n picture,\r\n showPicture,\r\n lastUpdated,\r\n showEditBlockButton,\r\n formDataList,\r\n editing,\r\n loading,\r\n}) => {\r\n const theme = useContext(ThemeContext);\r\n\r\n const [editBlockState, setEditBlockState] = useState(false);\r\n\r\n const dispatch = useDispatch();\r\n\r\n const {\r\n patchAddressForm,\r\n patchContactsForm,\r\n resetForm,\r\n setPersonalDataFormEditingState,\r\n } = actions.PersonalData;\r\n\r\n useEffect(() => {\r\n editing !== undefined && setEditBlockState(editing);\r\n }, [editing]);\r\n\r\n const onCancel = (data) => {\r\n dispatch(resetForm({ type: blockKey, payload: data }));\r\n setEditBlockState(false);\r\n };\r\n\r\n const onSubmit = (data) => {\r\n if (blockKey === 'address') {\r\n dispatch(patchAddressForm(data));\r\n } else if (blockKey === 'contacts') {\r\n dispatch(patchContactsForm(data));\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {title}\r\n \r\n {subtitle && blockKey !== 'profile' && blockKey !== 'parents' && (\r\n \r\n {subtitle}\r\n \r\n )}\r\n \r\n\r\n {showEditBlockButton && !editBlockState && (\r\n \r\n {\r\n dispatch(\r\n setPersonalDataFormEditingState({\r\n blockKey: blockKey,\r\n editing: true,\r\n })\r\n ) && setEditBlockState(true);\r\n }}\r\n borderless\r\n data-testid={`personaldata_edit_button`}\r\n action\r\n >\r\n \r\n \r\n }\r\n content={t('generic.update', { textOnly: true })}\r\n />\r\n \r\n )}\r\n \r\n\r\n {showPicture && (\r\n \r\n \r\n \r\n {t('personalData.picture')}\r\n \r\n \r\n {t('personalData.pictureMessage')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {showPicture && }\r\n\r\n \r\n {({ formState: { errors }, getValues, handleSubmit }, FormElements, FormElementsData) => (\r\n <>\r\n {formDataList && (\r\n \r\n {Object.keys(FormElements).map((fieldName, index) => {\r\n const FormElement = FormElements[fieldName];\r\n const defaultValue = FormElementsData[fieldName].value;\r\n const type = FormElementsData[fieldName].type;\r\n const hidden = FormElementsData[fieldName].hidden;\r\n\r\n if (hidden) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n {(editBlockState && fieldName === 'homeCountryName') ||\r\n fieldName === 'photo' ||\r\n fieldName === 'photo_extension' ? (\r\n ''\r\n ) : (\r\n \r\n \r\n {t(`personalData.${fieldName}`)}\r\n \r\n \r\n )}\r\n\r\n {editBlockState && type === 'textbox' && (\r\n \r\n \r\n \r\n )}\r\n\r\n {editBlockState && type === 'flag_dropdown_textbox' && (\r\n \r\n )}\r\n\r\n {editBlockState && type !== 'textbox' && type !== 'flag_dropdown_textbox' && (\r\n \r\n )}\r\n\r\n {!editBlockState &&\r\n fieldName !== 'photo' &&\r\n fieldName !== 'photo_extension' && (\r\n \r\n {!defaultValue ? (\r\n \r\n ) : (\r\n setValuesStructure(getValues(fieldName), defaultValue)\r\n )}\r\n \r\n )}\r\n
    \r\n );\r\n })}\r\n \r\n )}\r\n\r\n {editBlockState && (\r\n \r\n onCancel(FormElementsData)}\r\n disabled={loading}\r\n >\r\n {t('generic.cancel', { textOnly: true })}\r\n \r\n\r\n \r\n {t('generic.save', { textOnly: true })}\r\n \r\n \r\n )}\r\n \r\n )}\r\n \r\n\r\n \r\n\r\n \r\n \r\n {lastUpdated}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst Wrapper = styled.div``;\r\n\r\nconst ContentWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst HeaderWrapper = styled.div<{ picture: any }>`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n justify-content: space-between;\r\n margin-bottom: ${({ picture }) => (picture ? `0` : `32px`)};\r\n`;\r\n\r\nconst TitleWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n align-items: left;\r\n`;\r\n\r\nconst PictureWrapper = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n justify-content: space-between;\r\n`;\r\n\r\nconst PictureDescriptionWrapper = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: left;\r\n\r\n & div:first-child {\r\n margin-right: 120px;\r\n }\r\n`;\r\n\r\nconst PictureFrameWrapper = styled.div`\r\n min-width: 60px;\r\n\r\n .ui.image {\r\n object-fit: cover;\r\n }\r\n`;\r\n\r\nconst LineSeparator = styled.div<{ picture?: any }>`\r\n height: 1px;\r\n background: ${({ theme }) => theme.colors.softRegularGrey};\r\n margin-top: 16px;\r\n margin-bottom: ${({ picture }) => (picture ? `32px` : `12px`)};\r\n`;\r\n\r\nconst EditButtonWrapper = styled.div`\r\n margin-left: auto;\r\n`;\r\n\r\nconst FormTableWrapper = styled(FormManager)`\r\n margin-right: -1rem;\r\n margin-left: -1rem;\r\n`;\r\n\r\nconst ButtonWrapper = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n margin-left: auto;\r\n margin-top: 28px;\r\n\r\n > Button:not(:last-child) {\r\n margin-right: 8px;\r\n }\r\n`;\r\n\r\nconst FormInputWrapper = styled.div`\r\n div:first-child {\r\n padding: 0px 8px 0px 8px;\r\n }\r\n &&& {\r\n line-height: 1;\r\n }\r\n && :only-child {\r\n padding: 0;\r\n }\r\n flex-grow: 1;\r\n`;\r\n\r\nconst TextFieldTitle = styled.div`\r\n margin: 0px 0px 12px 0px;\r\n`;\r\n\r\nconst FooterWrapper = styled.div``;\r\n\r\nconst SubtitleText = styled(Text)`\r\n padding: 8px 0px 0px 0px;\r\n`;\r\n\r\nconst StudentPicture = styled.img`\r\n width: 60px;\r\n height: 60px;\r\n border-radius: 50%;\r\n object-fit: cover;\r\n`;\r\n\r\nexport default PersonalDataBlock;\r\n","export const setValuesStructure = (formValue, defaultValue) => {\r\n if (typeof formValue === 'string') {\r\n return formValue !== defaultValue ? defaultValue : formValue;\r\n }\r\n\r\n if (formValue?.input) {\r\n return formValue.input;\r\n }\r\n\r\n return defaultValue;\r\n};\r\n","/**\r\n * PersonalData scene\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport React, { useContext, useEffect } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport * as selectors from './logic/selectors';\r\nimport { actions } from 'store/rootSlices';\r\nimport moment from 'moment';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faCommentAltEdit, faInfoCircle } from '@fortawesome/pro-light-svg-icons';\r\nimport { faEllipsisH } from '@fortawesome/pro-regular-svg-icons';\r\nimport PersonalDataBlock from './containers/PersonalDataBlock';\r\n\r\nimport { CallToAction, Text, Segment } from '@paco_ua/pacoui';\r\n\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\n\r\nconst PersonalData = ({ t }) => {\r\n const { onMount, onUnmount, setHasRegistrationId } = actions.PersonalData;\r\n\r\n const { navigateTo } = actions.App;\r\n\r\n const { personalDataBlocks, loadingStatus, errorStatus, studentCardBlock } = useSelector(\r\n selectors.getPersonalDataSlice\r\n );\r\n console.log('Personal');\r\n \r\n const dispatch = useDispatch();\r\n\r\n const theme = useContext(ThemeContext);\r\n\r\n const studendId = useSelector(selectors.getUser);\r\n\r\n const footnoteDataPerBlock = {\r\n profile: {\r\n title: 'profileFootnoteTitle',\r\n text: 'profileFootnoteText',\r\n },\r\n parents: {\r\n title: 'parentsFootnoteTitle',\r\n text: 'parentsFootnoteText',\r\n },\r\n };\r\n\r\n const studentCardNotice = t('personalData.studentCardInfo');\r\n const blocksWithEditButton = ['contacts', 'address'];\r\n\r\n const checkIfHasRegistrationId = () => {\r\n const profileData = personalDataBlocks['profile'];\r\n\r\n if (profileData && profileData.values) {\r\n const registrationIdObject = profileData.values.find(\r\n (item) => item.nameKey === 'registration_id'\r\n );\r\n\r\n if (registrationIdObject.value !== '') {\r\n const registrationId = registrationIdObject.value;\r\n\r\n dispatch(\r\n navigateTo({\r\n key: 'newapplication',\r\n state: {\r\n status: 'changePersonalData',\r\n registrationId: registrationId,\r\n },\r\n })\r\n );\r\n } else {\r\n dispatch(setHasRegistrationId(false));\r\n }\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n dispatch(onMount());\r\n\r\n return () => {\r\n dispatch(onUnmount());\r\n };\r\n }, [dispatch, onMount, onUnmount, studendId.impersonate]);\r\n\r\n return (\r\n }\r\n mainContent={\r\n <>\r\n {/*!loadingStatus.loadingPage && errorStatus.errLoadingPersonalData && (\r\n \r\n \r\n \r\n \r\n \r\n {t('personalData.errorLoadingPersonalData', { textOnly: true })}\r\n \r\n \r\n )*/}\r\n\r\n {!loadingStatus.loadingPage &&\r\n !errorStatus.errLoadingPersonalData &&\r\n personalDataBlocks['profile'] &&\r\n Object.keys(personalDataBlocks).map((field, fieldIndex) => {\r\n return (\r\n \r\n \r\n \r\n -1\r\n }\r\n formDataList={personalDataBlocks[field].values}\r\n editing={personalDataBlocks[field].editing}\r\n loading={\r\n personalDataBlocks[field].nameKey === 'address'\r\n ? loadingStatus.loadingAddress\r\n : personalDataBlocks[field].nameKey === 'contacts'\r\n ? loadingStatus.loadingContacts\r\n : undefined\r\n }\r\n />\r\n \r\n \r\n\r\n \r\n {personalDataBlocks[field].nameKey in footnoteDataPerBlock && (\r\n \r\n }\r\n footerArrow\r\n footer={\r\n \r\n \r\n {t(\r\n 'personalData.' +\r\n footnoteDataPerBlock[personalDataBlocks[field].nameKey].title\r\n )}\r\n \r\n \r\n {t(\r\n 'personalData.' +\r\n footnoteDataPerBlock[personalDataBlocks[field].nameKey].text\r\n )}\r\n \r\n \r\n }\r\n onAction={() => {\r\n checkIfHasRegistrationId();\r\n }}\r\n />\r\n )}\r\n \r\n \r\n );\r\n })}\r\n\r\n {!loadingStatus.loadingPage &&\r\n !errorStatus.errLoadingPersonalData &&\r\n personalDataBlocks['profile'] && (\r\n \r\n \r\n \r\n {t('personalData.cardInfo')}\r\n \r\n \r\n \r\n )}\r\n\r\n {!loadingStatus.loadingPage &&\r\n !errorStatus.errLoadingPersonalData &&\r\n !errorStatus.errLoadingCardData &&\r\n personalDataBlocks['profile'] && (\r\n \r\n \r\n {studentCardNotice}\r\n \r\n }\r\n padding={'28px 38px'}\r\n noPointer\r\n />\r\n \r\n )}\r\n\r\n {!loadingStatus.loadingPage &&\r\n !errorStatus.errLoadingPersonalData &&\r\n !errorStatus.errLoadingCardData &&\r\n personalDataBlocks['profile'] && (\r\n \r\n \r\n {Object.keys(studentCardBlock).map((key) => (\r\n \r\n \r\n \r\n {t(`personalData.${key}`)}\r\n \r\n \r\n\r\n {(studentCardBlock[key] === '' || studentCardBlock[key] === null) && (\r\n \r\n )}\r\n\r\n {studentCardBlock[key] !== '' &&\r\n studentCardBlock[key] !== null &&\r\n key === 'reportDate' && (\r\n \r\n {moment(studentCardBlock[key]).format('YYYY-MM-DD')}\r\n \r\n )}\r\n \r\n {studentCardBlock[key] !== '' &&\r\n studentCardBlock[key] !== null &&\r\n key !== 'reportDate' && (\r\n \r\n {studentCardBlock[key]}\r\n \r\n )}\r\n \r\n \r\n ))}\r\n \r\n \r\n )}\r\n\r\n {!loadingStatus.loadingPage &&\r\n !errorStatus.errLoadingPersonalData &&\r\n errorStatus.errLoadingCardData && (\r\n \r\n \r\n \r\n \r\n \r\n {t('personalData.errorLoadingCardData', { textOnly: true })}\r\n \r\n \r\n )}\r\n \r\n }\r\n />\r\n );\r\n};\r\n\r\nexport default PersonalData;\r\n\r\nconst Row = styled.div<{ paddingtop?: string; paddingbottom?: string }>`\r\n padding-top: ${({ paddingtop }) => (paddingtop ? paddingtop : '1rem')};\r\n padding-bottom: ${({ paddingbottom }) => (paddingbottom ? paddingbottom : '1rem')};\r\n`;\r\n\r\nconst CardBlockWrapper = styled.div`\r\n border-style: solid;\r\n border-width: thin;\r\n border-color: ${({ theme }) => theme.colors.softLightGrey};\r\n padding: 16px 38px;\r\n display: flex;\r\n justify-content: space-between;\r\n`;\r\n\r\nconst CardColumn = styled.div``;\r\n\r\nconst CardBlockTitleWrapper = styled.div`\r\n display: flex;\r\n justify-content: left;\r\n`;\r\n\r\nconst TextFieldTitle = styled.div`\r\n margin: 0px 0px 12px 0px;\r\n`;\r\n\r\nconst PageBottom = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n div:first-child {\r\n margin-bottom: 8px;\r\n }\r\n`;\r\n\r\nconst PersonalDataBlockWrapper = styled.div``;\r\n\r\nconst CardInfoField = styled.div`\r\n max-width: 220px;\r\n white-space: normal;\r\n overflow: hidden;\r\n`;\r\n\r\nconst MessageError = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n text-align: center;\r\n justify-content: center;\r\n margin-top: 60px;\r\n margin-bottom: 20px;\r\n\r\n div:nth-child(2) {\r\n margin-top: 16px;\r\n }\r\n`;\r\n\r\nconst Icon = styled.div`\r\n font-size: 60px;\r\n margin-bottom: 20px;\r\n color: ${({ theme }) => theme.colors.primary};\r\n`;\r\n","/**\r\n * CreatedSchedule container\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport React, { useContext } from 'react';\r\nimport { useDispatch } from 'react-redux';\r\nimport moment from 'moment';\r\n\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { t } from 'app';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport {\r\n faSmile,\r\n faFrown,\r\n faEye,\r\n faPen,\r\n faTrash,\r\n faClone,\r\n} from '@fortawesome/pro-regular-svg-icons';\r\n\r\nimport { StatusLabel, Card, Text, Button, Tooltip } from '@paco_ua/pacoui';\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\n//import config from 'config'\r\n\r\ninterface IProps {\r\n id: number;\r\n allocationProb?: 'high' | 'low';\r\n preference: number;\r\n name: string;\r\n onEdit?: () => void;\r\n onCancel?: () => void;\r\n indexKey: number;\r\n status?: 'assigned' | 'automatic' | 'notAssigned' | 'proposal';\r\n assignedClasses?: number;\r\n viewOnly?: boolean;\r\n creationTime?: string;\r\n seriationDate?: string;\r\n finishedPhase: boolean;\r\n showDetails?: boolean | undefined; // undefined => schedule of a not active phase; true/false => schedule of an active phase\r\n}\r\n\r\nconst CreatedSchedule: React.FC = ({\r\n id,\r\n allocationProb,\r\n name,\r\n preference,\r\n status,\r\n assignedClasses,\r\n indexKey,\r\n creationTime,\r\n seriationDate,\r\n viewOnly,\r\n showDetails,\r\n finishedPhase,\r\n}) => {\r\n const dispatch = useDispatch();\r\n const { navigateTo } = actions.App;\r\n const { addScheduleToDelete } = actions.MySchedules;\r\n\r\n const theme = useContext(ThemeContext);\r\n\r\n const getStatusLabel = () => {\r\n switch (status) {\r\n case 'assigned':\r\n return (\r\n \r\n );\r\n case 'automatic':\r\n return (\r\n \r\n );\r\n case 'notAssigned':\r\n return (\r\n \r\n );\r\n case 'proposal':\r\n return ;\r\n default:\r\n return (\r\n \r\n );\r\n }\r\n };\r\n\r\n const getStateData = () => {\r\n if (status === 'proposal') {\r\n return (\r\n \r\n {(showDetails === undefined || showDetails) && (\r\n \r\n dispatch(navigateTo({ key: 'provisoryscheduleseriationhistory', params: { id } }))\r\n }\r\n >\r\n {t('sgh.viewDetails')}\r\n \r\n )}\r\n \r\n );\r\n } else {\r\n return (\r\n \r\n
    \r\n \r\n {t('generic.state')}:\r\n \r\n\r\n \r\n {t('generic.createdAt', { when: moment(creationTime).format('LLL') })}\r\n \r\n
    \r\n
    \r\n );\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n {preference}\r\n \r\n\r\n \r\n \r\n \r\n {name}\r\n \r\n {allocationProb === 'high' && (\r\n }\r\n >\r\n {t('sgh.legendAllocationProbable')}\r\n \r\n )}\r\n\r\n {allocationProb === 'low' && (\r\n }\r\n >\r\n {t('sgh.legendAllocationImprobable')}\r\n \r\n )}\r\n \r\n {getStateData()}\r\n \r\n\r\n \r\n {\r\n dispatch(actions.MySchedules.getScheduleToView({ id, finishedPhase }));\r\n }}\r\n borderless\r\n color={theme.colors.plusDarkGrey}\r\n borderlessHoverColor={theme.colors.primary}\r\n >\r\n \r\n \r\n }\r\n />\r\n {!viewOnly && (\r\n dispatch(navigateTo({ key: 'editSchedule', params: { id } }))}\r\n borderless\r\n color={theme.colors.plusDarkGrey}\r\n borderlessHoverColor={theme.colors.primary}\r\n >\r\n \r\n \r\n }\r\n />\r\n )}\r\n\r\n {!viewOnly && (\r\n dispatch(navigateTo({ key: 'duplicateSchedule', params: { id } }))}\r\n borderless\r\n color={theme.colors.plusDarkGrey}\r\n borderlessHoverColor={theme.colors.primary}\r\n >\r\n \r\n \r\n }\r\n />\r\n )}\r\n\r\n {!viewOnly && (\r\n {\r\n dispatch(addScheduleToDelete({ id, name }));\r\n }}\r\n borderless\r\n color={theme.colors.plusDarkGrey}\r\n borderlessHoverColor={theme.colors.primary}\r\n >\r\n \r\n \r\n }\r\n />\r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default CreatedSchedule;\r\n\r\nconst PreferenceAndEditScheduleWrapper = styled.div`\r\n display: flex;\r\n justify-content: space-between;\r\n position: absolute;\r\n left: 14px;\r\n top: 0px;\r\n right: 0;\r\n z-index: 1;\r\n`;\r\n\r\nconst Preference = styled.div<{ active?: boolean }>`\r\n height: 30px;\r\n width: 30px;\r\n background-color: ${({ active, theme }) => (active ? theme.colors.primary : theme.colors.grey)};\r\n box-shadow: 0px 3px 6px #00000029;\r\n color: ${({ theme }) => theme.colors.white};\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n`;\r\n\r\nconst TopWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: space-between;\r\n height: 194px;\r\n padding: 32px 14px 14px 14px;\r\n`;\r\n\r\nconst TopTitle = styled(Text)`\r\n margin-bottom: 16px;\r\n`;\r\n\r\nconst StateWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n > div:not(:last-child) {\r\n margin-bottom: 16px;\r\n }\r\n`;\r\n\r\nconst BottomWrapper = styled.div`\r\n ${({ theme }) => `\r\n /*height: 38px;*/\r\n padding: 0 2px 0 14px;\r\n background-color: ${theme.colors.softGrey};\r\n display: flex;\r\n align-items: center;\r\n justify-content: flex-start;\r\n `}\r\n`;\r\n\r\nconst TopInnerWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst StateWrapperText = styled(Text)`\r\n margin-right: 6px;\r\n line-height: 1;\r\n`;\r\n\r\nconst StateWrapperSubtext = styled(Text)`\r\n line-height: 1;\r\n`;\r\n","import React from 'react';\r\nimport styled from 'styled-components';\r\n\r\nimport { t } from 'app';\r\n\r\nimport { Caption } from '@paco_ua/pacoui';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faArrowsH } from '@fortawesome/pro-light-svg-icons';\r\nimport { faSmile, faFrown, faMeh } from '@fortawesome/pro-regular-svg-icons';\r\n\r\nimport { hasProvisorySeriation } from '../../MySchedule/utils';\r\n\r\nconst CaptionSchedule: React.FC<{ ucs?: any; hideSmiles?: boolean }> = ({ ucs, hideSmiles }) => {\r\n const captionReferences =\r\n ucs?.length > 0 && !hideSmiles\r\n ? [\r\n { title: t('sgh.legendAllocationProbable'), icon: },\r\n { title: t('sgh.legendAllocationUncertain'), icon: },\r\n { title: t('sgh.legendAllocationImprobable'), icon: },\r\n {\r\n title: t('sgh.legendExpandSchedule'),\r\n icon: (\r\n \r\n \r\n \r\n ),\r\n },\r\n ]\r\n : [\r\n {\r\n title: t('sgh.legendExpandSchedule'),\r\n icon: (\r\n \r\n \r\n \r\n ),\r\n },\r\n ];\r\n\r\n return ;\r\n};\r\n\r\nexport default CaptionSchedule;\r\n\r\nconst ExpandIcon = styled.div`\r\n color: ${({ theme }) => theme.colors.plusDarkGrey};\r\n height: 26px;\r\n width: 26px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n border-radius: 13px;\r\n`;\r\n","/**\r\n * MySchedules scene\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport React, { useState, useEffect } from 'react';\r\nimport styled from 'styled-components';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { GridContextProvider, GridDropZone, GridItem } from 'react-grid-dnd';\r\nimport { withSize } from 'react-sizeme';\r\nimport moment from 'moment';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport {\r\n faHistory,\r\n faPlus,\r\n faAngleDown,\r\n faQuestionCircle,\r\n faExclamationCircle,\r\n} from '@fortawesome/pro-light-svg-icons';\r\n\r\nimport CreatedSchedule from './containers/CreatedSchedule';\r\n\r\nimport StudentRegistrationDropdown from 'shared/containers/StudentRegistrationDropdown';\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\nimport { AnimatedBackground } from '@paco_ua/pacoui';\r\n\r\nimport CaptionSchedule from 'scenes/Schedules/containers/CaptionSchedule';\r\n\r\nimport AuthWrapper from 'shared/components/AuthWrapper';\r\n\r\nimport { t } from 'app';\r\n\r\nimport {\r\n Accordion,\r\n Text,\r\n Loading,\r\n Modal,\r\n Button,\r\n NoDataMessage,\r\n RestrictAccessOverlay,\r\n ScheduleGrid,\r\n} from '@paco_ua/pacoui';\r\n\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './logic/selectors';\r\n\r\n//import config from 'config'\r\nimport { swapSchedules, getStatusName } from './utils';\r\n\r\nconst MySchedules = ({ theme, t, size }) => {\r\n const [cursor, setCursor] = useState('grab');\r\n\r\n const {\r\n createdSchedules,\r\n scheduleToDelete,\r\n deleteModalOpen,\r\n loadingSchedules,\r\n savingMySchedules,\r\n loadingScheduleToView,\r\n dragEnabled,\r\n warningNoAccess,\r\n warningNoAccessMotive,\r\n currentActivePhase,\r\n seriationDate,\r\n viewScheduleModalIsOpen,\r\n ucs,\r\n scheduleGridInterval,\r\n currentPhase,\r\n lastSeriatedPhase,\r\n nextSeriationDate,\r\n showHistory,\r\n viewScheduleHideFaces,\r\n } = useSelector(selectors.getMySchedulesSlice);\r\n const registration = useSelector(selectors.getRegistration);\r\n const {\r\n setDeleteModalOpen,\r\n deleteSchedule,\r\n onMount,\r\n onPhaseUpdate,\r\n updateSchedules,\r\n setDragEnabled,\r\n hideScheduleModalOpening,\r\n setWarningNoAccess,\r\n setWarningNoAccessMotive,\r\n setLoadingSchedules,\r\n } = actions.MySchedules;\r\n const { navigateTo } = actions.App;\r\n\r\n const dispatch = useDispatch();\r\n\r\n const registrations = useSelector(selectors.getRegistrations);\r\n\r\n const boxesPerRow = size.width > 1350 ? 4 : size.width > 880 ? 3 : size.width > 500 ? 2 : 1 || 4;\r\n const rowHeight = 238;\r\n const rowsNumber = Math.ceil(createdSchedules.activePhase?.schedules.length / boxesPerRow);\r\n const rowGap = 24;\r\n const colGap = 64;\r\n\r\n const hasCurrentActivePhase = currentActivePhase !== null && currentActivePhase !== undefined;\r\n // Active phase and finished\r\n const hasFinishedActivePhase = currentPhase?.finished;\r\n\r\n useEffect(() => {\r\n dispatch(onMount());\r\n }, [dispatch, onMount]);\r\n\r\n useEffect(() => {\r\n if (registrations !== null && !registrations?.length) {\r\n dispatch(setWarningNoAccess(true));\r\n dispatch(setWarningNoAccessMotive(t('sgh.noAccessRegistrations', { textOnly: true })));\r\n dispatch(setLoadingSchedules(false));\r\n }\r\n }, [registrations]);\r\n\r\n useEffect(() => {\r\n if (registration) {\r\n dispatch(onPhaseUpdate());\r\n }\r\n }, [dispatch, registration]);\r\n\r\n const onChange = (sourceId, sourceIndex, targetIndex, targetId) => {\r\n //change order of preferences\r\n if (sourceIndex !== targetIndex && createdSchedules.activePhase.schedules.length > 1) {\r\n dispatch(\r\n updateSchedules(\r\n swapSchedules(createdSchedules.activePhase?.schedules, sourceIndex, targetIndex)\r\n )\r\n );\r\n }\r\n };\r\n\r\n const handleScheduleDelete = () => {\r\n dispatch(setDeleteModalOpen(false));\r\n scheduleToDelete && dispatch(deleteSchedule(scheduleToDelete));\r\n };\r\n\r\n const handleModalOnCloseOrOnCancel = () => {\r\n dispatch(hideScheduleModalOpening());\r\n };\r\n\r\n const hasAllocatedSchedule = currentPhase?.hasAllocatedSchedule;\r\n\r\n const getMainContent = () => {\r\n if (warningNoAccess) {\r\n return (\r\n {}}\r\n />\r\n );\r\n }\r\n\r\n if (!warningNoAccess) {\r\n /*if (savingMySchedules || loadingScheduleToView) {\r\n return (\r\n \r\n \r\n \r\n );\r\n }*/\r\n\r\n if (\r\n hasFinishedActivePhase &&\r\n !hasCurrentActivePhase &&\r\n !currentPhase?.seriationFinished &&\r\n (currentPhase?.attemptedSchedule || currentPhase?.phase === 1)\r\n ) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n // ON ACTIVE PHASE AND SERIATION FISINHED\r\n if ((hasFinishedActivePhase && currentPhase?.seriationFinished) || !hasCurrentActivePhase) {\r\n // SCHEDULE NOT SENT NOT ALLOCATED TO STUDENT\r\n if (!currentPhase?.attemptedSchedule && !currentPhase?.hasAllocatedSchedule) {\r\n return (\r\n \r\n );\r\n }\r\n }\r\n\r\n //CHECK IF ALL SHCEDULES WHERE PREALLOCATED\r\n if (\r\n currentPhase?.hasAllocatedSchedule &&\r\n (currentActivePhase !== null || currentActivePhase !== undefined) &&\r\n !createdSchedules.finishedPhases.length &&\r\n !createdSchedules?.activePhase?.schedules.length\r\n ) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n //CHECK IF ALL SHCEDULES WHERE GIVEN SCHEDULE\r\n if (\r\n currentPhase?.hasAllocatedSchedule &&\r\n (currentActivePhase === null || currentActivePhase === undefined) &&\r\n !createdSchedules.finishedPhases.length\r\n ) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n return (\r\n <>\r\n {hasCurrentActivePhase && (\r\n <>\r\n \r\n \r\n \r\n {t('sgh.phase')} {currentActivePhase}\r\n \r\n\r\n \r\n {(seriationDate || nextSeriationDate) && (\r\n {\r\n if (!(!seriationDate && nextSeriationDate)) {\r\n dispatch(\r\n navigateTo({\r\n key: 'provisoryseriationhistory',\r\n params: {\r\n id: currentPhase?.phase,\r\n },\r\n })\r\n );\r\n } else {\r\n dispatch(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.lastProvSeriationIsBehind'),\r\n icon: 'info',\r\n type: 'warning',\r\n })\r\n );\r\n }\r\n }}\r\n >\r\n \r\n \r\n }\r\n onClick={() => {\r\n if (!(!seriationDate && nextSeriationDate)) {\r\n dispatch(\r\n navigateTo({\r\n key: 'provisoryseriationhistory',\r\n params: {\r\n id: currentPhase?.phase,\r\n },\r\n })\r\n );\r\n } else {\r\n dispatch(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.lastProvSeriationIsBehind'),\r\n icon: 'info',\r\n type: 'warning',\r\n })\r\n );\r\n }\r\n }}\r\n >\r\n {seriationDate &&\r\n `${t('sgh.simulatedAttribution', { textOnly: true })} ${moment(\r\n seriationDate\r\n ).format('HH:mm')}`}\r\n {!seriationDate &&\r\n nextSeriationDate &&\r\n `${t('sgh.waitForNextSeriation', { textOnly: true })}`}\r\n \r\n )}\r\n\r\n {(seriationDate || nextSeriationDate) && (\r\n \r\n {'|'}\r\n \r\n )}\r\n\r\n \r\n \r\n dispatch(\r\n navigateTo({\r\n key: 'schedulesGuideSpecific',\r\n params: {\r\n id: 'simulationHelp',\r\n },\r\n })\r\n )\r\n }\r\n icon={\r\n {\r\n dispatch(\r\n navigateTo({\r\n key: 'schedulesGuideSpecific',\r\n params: {\r\n id: 'simulationHelp',\r\n },\r\n })\r\n );\r\n }}\r\n >\r\n \r\n \r\n }\r\n >\r\n {t('sgh.aboutSimulation', { textOnly: true })}\r\n \r\n \r\n \r\n \r\n\r\n {(createdSchedules.activePhase === null ||\r\n !createdSchedules.activePhase?.schedules.length) && (\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {(createdSchedules.activePhase !== null ||\r\n !!createdSchedules.activePhase?.schedules.length) && (\r\n \r\n \r\n {createdSchedules.activePhase.schedules.map((schedule: any, key: number) => (\r\n \r\n {\r\n setCursor('grab');\r\n }}\r\n onMouseDown={() => {\r\n setCursor('grabbing');\r\n }}\r\n padding={(key + 1) % boxesPerRow !== 0 && rowGap}\r\n >\r\n {\r\n dispatch(setDragEnabled(false));\r\n }}\r\n onCancel={() => {\r\n dispatch(setDragEnabled(true));\r\n }}\r\n status={getStatusName(schedule.state)}\r\n name={schedule.name}\r\n id={schedule.id}\r\n allocationProb={schedule.allocationProb}\r\n seriationDate={schedule.seriationDate}\r\n assignedClasses={schedule.currentSelections}\r\n indexKey={key}\r\n showDetails={\r\n currentActivePhase === lastSeriatedPhase && schedule.allocationProb\r\n }\r\n preference={schedule.preference}\r\n />\r\n \r\n \r\n ))}\r\n \r\n \r\n )}\r\n \r\n \r\n )}\r\n {createdSchedules.finishedPhases.length > 0 && (\r\n \r\n {createdSchedules.finishedPhases.map((finishedPhase, key: number) => (\r\n \r\n \r\n {!currentPhase?.seriationFinished &&\r\n currentPhase?.phase === finishedPhase.phase\r\n ? `${t('sgh.phase', { textOnly: true })} ${\r\n finishedPhase.phase\r\n } ${t('sgh.scheduleProcessingAllocation', { textOnly: true })}`\r\n : `${t('sgh.phase', { textOnly: true })} ${finishedPhase.phase}`}\r\n \r\n\r\n \r\n \r\n ),\r\n children: [\r\n \r\n {finishedPhase.schedules.map((schedule: any) => (\r\n \r\n \r\n \r\n ))}\r\n ,\r\n ],\r\n },\r\n ]}\r\n />\r\n ))}\r\n \r\n )}\r\n \r\n );\r\n }\r\n };\r\n\r\n return (\r\n <>\r\n {\r\n handleModalOnCloseOrOnCancel();\r\n }}*/\r\n onClose={() => handleModalOnCloseOrOnCancel()}\r\n data-testid=\"schedules_modal_schedule_view\"\r\n >\r\n \r\n {loadingScheduleToView && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n {!loadingScheduleToView && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n\r\n {\r\n dispatch(setDeleteModalOpen(false));\r\n }}\r\n onCancel={() => {\r\n dispatch(setDeleteModalOpen(false));\r\n }}\r\n onSubmit={() => {\r\n handleScheduleDelete();\r\n }}\r\n data-testid=\"my_schedules_modal_delete_confirmation\"\r\n />\r\n\r\n }\r\n headerRight={\r\n !warningNoAccess &&\r\n !loadingSchedules && (\r\n \r\n \r\n }\r\n onClick={() => dispatch(navigateTo({ key: 'seriationhistory' }))}\r\n data-testid=\"schedules_button_seriation_history\"\r\n >\r\n {t('sgh.finalSeriationHistoryButton')}\r\n \r\n \r\n\r\n {!hasAllocatedSchedule && hasCurrentActivePhase ? (\r\n }\r\n onClick={() => dispatch(navigateTo({ key: 'createSchedule' }))}\r\n data-testid=\"my_schedules_button_new_schedule\"\r\n >\r\n {t('sgh.buttonNewSchedule')}\r\n \r\n ) : (\r\n dispatch(navigateTo({ key: 'mySchedule' }))}\r\n data-testid=\"my_schedules_button_my_schedule\"\r\n >\r\n {t('sgh.mySchedule')}\r\n \r\n )}\r\n \r\n )\r\n }\r\n subHeader={}\r\n mainContent={{getMainContent()}}\r\n />\r\n \r\n );\r\n};\r\n\r\nexport default withSize()(MySchedules);\r\n\r\nconst ContentWrapper = styled.div`\r\n position: relative;\r\n height: 100%;\r\n display: flex;\r\n flex: 1;\r\n flex-direction: column;\r\n`;\r\n\r\nconst GridWrapper = styled.div`\r\n margin-bottom: 80px;\r\n`;\r\n\r\nconst HeaderButtons = styled.div`\r\n display: flex;\r\n justify-content: flex-end;\r\n\r\n button:not(:last-child) {\r\n margin-right: 20px;\r\n }\r\n`;\r\n\r\nconst DropZone = styled(GridDropZone)<{ height: number }>`\r\n height: ${({ height }) => `${height}px`};\r\n margin-top: 40px;\r\n`;\r\n\r\ninterface ICreatedScheduleWrapper {\r\n padding?: number | boolean;\r\n cursor: string;\r\n}\r\n\r\nconst CreatedScheduleWrapper = styled.div`\r\n padding-right: ${({ padding }) => (padding ? `${padding}px` : `0`)};\r\n cursor: ${({ cursor }) => cursor};\r\n`;\r\n\r\nconst LoadingSchedulesWrapper = styled.div`\r\n position: fixed;\r\n display: flex;\r\n top: 0;\r\n height: 100vh;\r\n width: 100vw;\r\n align-items: center;\r\n z-index: 3;\r\n`;\r\nconst StaticGrid = styled.div<{ boxesPerRow: number; colGap: number; rowGap?: number }>`\r\n display: grid;\r\n grid-template-columns: ${({ boxesPerRow }) => `repeat(${boxesPerRow}, 1fr)`};\r\n gap: 24px 0;\r\n margin: ${({ rowGap }) => (rowGap ? `0 -${rowGap / 2}px` : `0`)};\r\n`;\r\n\r\nconst StaticGridItem = styled.div<{ padding?: number }>`\r\n margin-top: 40px;\r\n position: relative;\r\n padding: ${({ padding }) => (padding ? `${padding / 2}px` : `0`)};\r\n`;\r\n\r\nconst FinishedPhases = styled.div`\r\n margin-top: 20px;\r\n\r\n > div:not(:last-child) {\r\n margin-bottom: 32px;\r\n }\r\n`;\r\n\r\nconst AccordionPhaseWrapper = styled.div`\r\n display: flex;\r\n align-items: center;\r\n\r\n > div {\r\n padding-right: 24px;\r\n }\r\n`;\r\n\r\nconst CaptionWrapper = styled.div`\r\n margin-top: -20px;\r\n padding-left: 63px;\r\n`;\r\n\r\nconst LoadingWrapper = styled.div`\r\n width: 100%;\r\n height: 300px;\r\n\r\n margin-top: 32px;\r\n\r\n * {\r\n margin: 8px 0px;\r\n }\r\n`;\r\n\r\nconst ScheduleGridWrapper = styled.div`\r\n min-height: 400px;\r\n`;\r\n\r\nconst SeriationDateText = styled(Text)`\r\n cursor: pointer;\r\n\r\n :hover {\r\n text-decoration: underline;\r\n }\r\n`;\r\n\r\nconst PhaseTitleWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst CurrentActivePhaseText = styled(Text)`\r\n margin-bottom: 8px;\r\n`;\r\n\r\nconst AboutSimulationWrapper = styled.div`\r\n align-items: center;\r\n display: flex;\r\n :hover {\r\n text-decoration: underline;\r\n }\r\n`;\r\n\r\nconst AboutSimulationBarText = styled(Text)`\r\n line-height: 1;\r\n margin: 0px 10px;\r\n align-items: center;\r\n display: flex;\r\n`;\r\n\r\nconst SeriationDateWrapper = styled.div`\r\n * {\r\n line-height: 1;\r\n }\r\n display: flex;\r\n align-items: center;\r\n`;\r\n\r\nconst AboutSimulationText = styled(Text)`\r\n :hover {\r\n cursor: pointer;\r\n }\r\n`;\r\n\r\nconst ScheduleModalContentWrapper = styled.div`\r\n margin-top: 40px;\r\n`;\r\n","/**\r\n * ScheduleConfirmationPreview container logic selectors\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getSchedulesSlice = (state: RootState) => state.Schedules;\r\n","/**\r\n * ScheduleConfirmationPreview container\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport React, { useState } from 'react';\r\nimport { useSelector } from 'react-redux';\r\nimport * as selectors from './selectors';\r\n\r\nimport styled from 'styled-components';\r\n\r\nimport { MultiToggle, ScheduleGrid } from '@paco_ua/pacoui';\r\n\r\nimport CaptionSchedule from 'scenes/Schedules/containers/CaptionSchedule';\r\n\r\nimport { filterUcsByPeriod } from './utils';\r\n\r\nimport { t } from 'app';\r\n\r\n//import config from 'config'\r\n\r\nconst ScheduleConfirmationPreview: React.FC = () => {\r\n const { ucs, periods, period, scheduleGridInterval } = useSelector(selectors.getSchedulesSlice);\r\n\r\n // Preview should show only 'selected' classes\r\n const selectedUcs = ucs.map((eachUc) => {\r\n return {\r\n ...eachUc,\r\n classSchedule: eachUc.classSchedule.map((eachClass) => {\r\n if (!eachClass.selected) {\r\n return { ...eachClass, filtered: true };\r\n } else {\r\n return eachClass;\r\n }\r\n }),\r\n };\r\n });\r\n\r\n // We need to have a 'clone' of ucs and period\r\n // to change periods and filters ucs without impacting\r\n // 'period' and 'ucs' from Schedules' slice\r\n // (if we impact that slice, the buttons and the cards behind the modal will change\r\n // even if we are clicking on Modal's buttons)\r\n const [periodClone, setPeriod] = useState(period);\r\n const [ucsClone, setUcs] = useState(selectedUcs);\r\n\r\n const periodButtons = periods.map((periodItem, key) => ({\r\n children: `Período ${key + 1}`,\r\n onClick: () => {\r\n setPeriod(periodItem);\r\n setUcs(filterUcsByPeriod(ucsClone, periodItem));\r\n },\r\n selected: periodClone === periodItem,\r\n testId: 'schedules_multitoggle_period',\r\n }));\r\n\r\n return (\r\n \r\n {!!periods.length && (\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default ScheduleConfirmationPreview;\r\n\r\nconst Wrapper = styled.div`\r\n padding: 0;\r\n`;\r\n\r\nconst PeriodAndButtonsWrapper = styled.div`\r\n display: flex;\r\n justify-content: space-between;\r\n margin: 0 0 12px 18px;\r\n border-bottom: 1px solid ${({ theme }) => theme.colors.primary};\r\n`;\r\n\r\nconst CaptionWrapper = styled.div`\r\n margin-top: -20px;\r\n padding-left: 63px;\r\n`;\r\n","/**\r\n * ScheduleConfirmationPreview container utils\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { IUc } from 'shared/types';\r\n\r\nexport const filterUcsByPeriod = (ucs: IUc[], period: string) => {\r\n return ucs.map((eachUc) => {\r\n return {\r\n ...eachUc,\r\n classSchedule: eachUc.classSchedule.map((eachClass) => {\r\n if (eachClass.period !== period) {\r\n return { ...eachClass, filtered: true };\r\n } else {\r\n return { ...eachClass, filtered: false };\r\n }\r\n }),\r\n };\r\n });\r\n};\r\n","/**\r\n * ScheduleGridView container\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport React from 'react';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { RootState, actions } from 'store/rootSlices';\r\n\r\nimport styled from 'styled-components';\r\n\r\nimport { ScheduleGrid } from '@paco_ua/pacoui';\r\n\r\nimport { t } from 'app';\r\n\r\n//import config from 'config'\r\n\r\nconst ScheduleGridView: React.FC<{ ucs: any }> = ({ ucs }) => {\r\n const {\r\n loadingSchedule,\r\n scheduleType,\r\n expandedWeekDay,\r\n currentPhase,\r\n scheduleGridInterval,\r\n currentMode,\r\n } = useSelector((state: RootState) => state.Schedules);\r\n\r\n const dispatch = useDispatch();\r\n const { setExpandedWeekDay, setClassSelectionState } = actions.Schedules;\r\n // Scene in view mode?\r\n const viewMode = currentMode === 'view';\r\n\r\n return (\r\n \r\n {\r\n if (expandedWeekDay === null) {\r\n const firstWeekDayWithClasses = classes.findIndex((classItem) => {\r\n return classItem.classes.length > 0;\r\n });\r\n if (firstWeekDayWithClasses >= 0) {\r\n dispatch(setExpandedWeekDay(firstWeekDayWithClasses));\r\n }\r\n }\r\n }}\r\n onToggleWeekDay={(weekday) => {\r\n dispatch(setExpandedWeekDay(weekday));\r\n }}\r\n expandedDay={scheduleType !== 'gridExpanded' ? null : expandedWeekDay}\r\n onSelect={(classItem) => {\r\n dispatch(\r\n setClassSelectionState({\r\n ucId: classItem.ucId,\r\n groupId: classItem.groupId,\r\n classId: classItem.classId,\r\n type: classItem.classType,\r\n })\r\n );\r\n }}\r\n />\r\n \r\n );\r\n};\r\n\r\nexport default ScheduleGridView;\r\n\r\nconst Wrapper = styled.div`\r\n min-height: 422px;\r\n`;\r\n","/**\r\n * ScheduleListView container utils\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport moment from 'moment';\r\nimport { IUc, IScheduleClass, IDropdownOption } from 'shared/types';\r\nimport { getIrregularMessageSmall } from '../../utils';\r\nconst getClassTypeFullName = (type: string, classesTypologies) => {\r\n return classesTypologies.find((typology) => typology.initials === type).name;\r\n};\r\n\r\nconst getWeekday = (dayNumber: number) => {\r\n return moment.weekdays()[dayNumber];\r\n};\r\n\r\nconst removeSeconds = (time: string) => {\r\n return time.replace(/(.*)\\D\\d+/, '$1');\r\n};\r\n\r\nexport const getFirstScheduleType = (uc, classesTypologies) => {\r\n let firstType = '';\r\n\r\n if (classesTypologies) {\r\n firstType = classesTypologies.find((typology) => {\r\n return uc.classSchedule.find(\r\n (classItem) => classItem.classType === typology.initials && !classItem.filtered\r\n );\r\n })?.initials;\r\n }\r\n\r\n debugger;\r\n\r\n return firstType;\r\n};\r\n\r\nexport const getDropdownOptions = (\r\n uc: IUc,\r\n classType: string,\r\n classesTypologies,\r\n getIrregularMessage?: (value: string, infoDropdown: boolean) => any\r\n) => {\r\n const dropdowOptions = uc.classSchedule.reduce(\r\n (typeClassesOption: IDropdownOption[], eachClass: IScheduleClass, index) => {\r\n const classAlreadyAccumulated = typeClassesOption.find((o) => o.id === eachClass.classId);\r\n if (!classAlreadyAccumulated && !eachClass.filtered && eachClass.classType === classType) {\r\n typeClassesOption.push({\r\n key: `${eachClass.classId}-${index}_${uc.ucId}_${uc.groupId || 'noGroup'}`,\r\n id: eachClass.classId,\r\n text: `${getClassTypeFullName(eachClass.classType, classesTypologies)}-${\r\n eachClass.className\r\n }`,\r\n value: eachClass.classId,\r\n disabled: eachClass.disabled,\r\n });\r\n\r\n if (eachClass.irregularSituation && getIrregularMessage) {\r\n const message = getIrregularMessageSmall(eachClass);\r\n\r\n typeClassesOption.push({\r\n key: `${eachClass.classId}-info-${index}_${uc.ucId}_${uc.groupId || 'noGroup'}`,\r\n id: eachClass.classId,\r\n text: getIrregularMessage(message, true),\r\n value: eachClass.classId,\r\n className: 'subItem info',\r\n disabled: true,\r\n });\r\n }\r\n\r\n const descriptions = uc.classSchedule.reduce((result: string[], element) => {\r\n if (eachClass.classId === element.classId) {\r\n result.push(\r\n `${getWeekday(element.weekday)} | ${removeSeconds(\r\n element.startTime\r\n )} - ${removeSeconds(element.endTime)}`\r\n );\r\n }\r\n return result;\r\n }, []);\r\n\r\n if (!!descriptions.length) {\r\n descriptions.forEach((description) => {\r\n typeClassesOption.push({\r\n key: `${description}-${eachClass.classId}-subItem-${index}_${uc.ucId}_${\r\n uc.groupId || 'noGroup'\r\n }`,\r\n value: eachClass.classId,\r\n text: description,\r\n className: 'subItem',\r\n disabled: eachClass.disabled,\r\n });\r\n });\r\n }\r\n }\r\n return typeClassesOption;\r\n },\r\n []\r\n );\r\n\r\n return dropdowOptions;\r\n};\r\n\r\nexport const getDropdownValue = (ucs: IUc[], ucId: number, type: string, classesTypologies) => {\r\n //find uc that matches and is selected, having in mind thatt we have groups this works due to previous implement loging in other controllers\r\n\r\n let selectedClass = null as null | IScheduleClass;\r\n\r\n ucs.some((uc) => {\r\n const classToSelect = uc.classSchedule.find(\r\n (classItem) => classItem.selected && classItem.classType === type\r\n );\r\n if (uc.ucId === ucId && classToSelect) {\r\n selectedClass = classToSelect;\r\n return true;\r\n }\r\n });\r\n\r\n if (selectedClass) {\r\n return selectedClass.classId;\r\n } else {\r\n // undefined should be the returned value to 'reset' the input\r\n // however it doesn't clear the selection + show the placeholder\r\n // returning '' as suggested here\r\n // https://github.com/Semantic-Org/Semantic-UI-React/issues/3625\r\n return '';\r\n }\r\n};\r\n\r\n// Find 'allocated' property of the selected class\r\n// and disable if allocated = true (already allocated so no need to re-select)\r\nexport const getAllocatedState = (ucs: IUc[], ucId: number, type: string) => {\r\n const uc = ucs.find((uc) => uc.ucId === ucId);\r\n if (uc) {\r\n const selectedClass = uc.classSchedule.find(\r\n (eachClass) => eachClass.classType === type && eachClass.selected\r\n );\r\n\r\n if (\r\n (selectedClass && selectedClass?.allocated.state === 'assigned') ||\r\n selectedClass?.allocated.state === 'automatic'\r\n ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n } else {\r\n return false;\r\n }\r\n};\r\n\r\n// Get dropdown border color after final seriation\r\n// to match the logic applied @ \r\n// (highlight it according to 'placed' property - automatic, manual and not placed)\r\nexport const getDropdownBorderColor = (\r\n ucs: IUc[],\r\n ucId: number,\r\n type: string,\r\n allocated: boolean,\r\n colors: { [key: string]: string }\r\n) => {\r\n const uc = ucs.find((uc) => uc.ucId === ucId);\r\n if (uc) {\r\n const selectedClass = uc.classSchedule.find(\r\n (eachClass) => eachClass.classType === type && eachClass.selected\r\n );\r\n\r\n if (selectedClass) {\r\n if (selectedClass.allocated.state === 'automatic') {\r\n return colors.blue;\r\n } else if (selectedClass.allocated.state === 'assigned' || allocated) {\r\n return colors.green;\r\n }\r\n }\r\n }\r\n};\r\n\r\nexport const getScheduleAndLockState = (\r\n ucs: IUc[],\r\n ucId: number,\r\n ucGroupId: number | null | undefined,\r\n type: string\r\n) => {\r\n const uc = ucs.find((uc: IUc) => {\r\n if (ucGroupId !== undefined && ucGroupId !== null) {\r\n return uc.ucId === ucId && uc.groupId === ucGroupId;\r\n }\r\n return uc.ucId === ucId;\r\n });\r\n\r\n if (uc) {\r\n const selectedClasses = uc.classSchedule.reduce((selected: IScheduleClass[], eachClass) => {\r\n if (eachClass.classType === type && eachClass.selected) {\r\n selected.push(eachClass);\r\n }\r\n return selected;\r\n }, []);\r\n\r\n if (selectedClasses && selectedClasses.length) {\r\n return {\r\n allocation: selectedClasses[0].allocation,\r\n locked: selectedClasses[0].locked,\r\n schedule: selectedClasses.map((eachClass) => {\r\n return {\r\n weekDay: getWeekday(eachClass.weekday),\r\n start: removeSeconds(eachClass.startTime),\r\n end: removeSeconds(eachClass.endTime),\r\n locked: eachClass.locked,\r\n };\r\n }),\r\n };\r\n } else {\r\n return null;\r\n }\r\n } else {\r\n return null;\r\n }\r\n};\r\n\r\nexport const getFilteredUcForZommAtScheduleOptions = (\r\n uc: IUc | null,\r\n type: string,\r\n period: string\r\n) => {\r\n if (uc) {\r\n // If there's a class already 'allocated', show it only\r\n // If there's no class 'allocated', show all classes for the selected typology\r\n const classSchedule = (): IScheduleClass[] => {\r\n // Get typologies (T, TP, P, etc) already w/ allocated classes\r\n const allocatedClassesTypologies = [\r\n ...new Set(\r\n uc.classSchedule\r\n .filter(\r\n (eachClass) =>\r\n eachClass.allocated.state === 'assigned' ||\r\n eachClass.allocated.state === 'automatic'\r\n )\r\n .map((allocatedClass) => allocatedClass.classType)\r\n ),\r\n ];\r\n\r\n // Filter all classes with classType included @ allocatedClassesTypologies that are not allocated\r\n // I mean: for class types with classes already 'allocated', show only that one\r\n return uc.classSchedule.reduce((filteredClasses, eachClass) => {\r\n if (\r\n allocatedClassesTypologies.includes(eachClass.classType) &&\r\n (eachClass.allocated.state === 'assigned' || eachClass.allocated.state === 'automatic')\r\n ) {\r\n filteredClasses.push(eachClass);\r\n } else if (!allocatedClassesTypologies.includes(eachClass.classType)) {\r\n filteredClasses.push(eachClass);\r\n }\r\n\r\n return filteredClasses;\r\n }, [] as IScheduleClass[]);\r\n };\r\n\r\n return {\r\n ...uc,\r\n classSchedule: classSchedule().map((eachClass) => {\r\n if (eachClass.period && (eachClass.classType !== type || eachClass.period !== period)) {\r\n return { ...eachClass, filtered: true };\r\n } else if (!eachClass.period && eachClass.classType !== type) {\r\n return { ...eachClass, filtered: true };\r\n } else {\r\n return { ...eachClass, filtered: false };\r\n }\r\n }),\r\n };\r\n } else {\r\n return uc;\r\n }\r\n};\r\n","/**\r\n * ScheduleListView container\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport React, { useState, useContext, useEffect } from 'react';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { RootState, actions } from 'store/rootSlices';\r\nimport { Grid } from 'semantic-ui-react';\r\n\r\nimport { t } from 'app';\r\n\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faExclamationCircle, faEye } from '@fortawesome/pro-regular-svg-icons';\r\n\r\nimport { ScheduleGrid } from '@paco_ua/pacoui';\r\n\r\n//import ScrollDownButton from 'components/ScrollDownButton';\r\nimport {\r\n MultiToggle,\r\n Modal,\r\n Dropdown,\r\n Tooltip,\r\n NoDataMessage,\r\n Button,\r\n Text,\r\n} from '@paco_ua/pacoui';\r\n\r\nimport CaptionSchedule from 'scenes/Schedules/containers/CaptionSchedule';\r\n\r\nimport { IUc } from 'shared/types';\r\n\r\nimport {\r\n getDropdownOptions,\r\n getFirstScheduleType,\r\n getDropdownValue,\r\n getAllocatedState,\r\n getDropdownBorderColor,\r\n getScheduleAndLockState,\r\n getFilteredUcForZommAtScheduleOptions,\r\n} from './utils';\r\n\r\ninterface IScheduleListView {}\r\n\r\ninterface IScheduleAndLock {\r\n allocation?: 'likely' | 'uncertain' | 'unlikely';\r\n locked: boolean;\r\n schedule: {\r\n weekDay: string;\r\n start: string;\r\n end: string;\r\n }[];\r\n}\r\n\r\ninterface IZoomAtScheduleModalState {\r\n open: boolean;\r\n uc: null | IUc;\r\n}\r\n\r\nconst ScheduleListView: React.FC = () => {\r\n const {\r\n period,\r\n ucs,\r\n loadingSchedule,\r\n classesTypologies,\r\n currentPhase,\r\n scheduleGridInterval,\r\n currentMode,\r\n } = useSelector((state: RootState) => state.Schedules);\r\n\r\n const [zoomAtScheduleModalClassType, setZoomAtScheduleModalClassType] = useState('');\r\n const [zoomAtScheduleModalState, setZoomAtScheduleModalState] = useState<\r\n IZoomAtScheduleModalState\r\n >({\r\n open: false,\r\n uc: null,\r\n });\r\n\r\n const dispatch = useDispatch();\r\n const { setClassSelectionState } = actions.Schedules;\r\n const theme = useContext(ThemeContext);\r\n\r\n // Scene in view mode?\r\n const viewMode = currentMode === 'view';\r\n\r\n const zommAtScheduleOptions = classesTypologies\r\n .filter(\r\n (typology) =>\r\n zoomAtScheduleModalState.uc &&\r\n zoomAtScheduleModalState.uc.classSchedule.find(\r\n (classItem) => classItem.classType === typology.initials\r\n )\r\n )\r\n .map((typology, key) => {\r\n return {\r\n onClick: () => {\r\n setZoomAtScheduleModalClassType(typology.initials);\r\n setZoomAtScheduleModalState({\r\n ...zoomAtScheduleModalState,\r\n uc: getFilteredUcForZommAtScheduleOptions(\r\n zoomAtScheduleModalState.uc,\r\n typology.initials,\r\n period\r\n ),\r\n });\r\n },\r\n children: typology.name,\r\n selected: zoomAtScheduleModalClassType === typology.initials,\r\n testId: 'schedule_list_view_multitoggle_zoom',\r\n };\r\n });\r\n\r\n const getIrregularMessage = (message, infoDropdown?: boolean) => {\r\n return (\r\n \r\n \r\n }\r\n color={infoDropdown ? 'grey' : 'plusDarkGrey'}\r\n >\r\n {message}\r\n \r\n \r\n );\r\n };\r\n\r\n const handleUCZoomOnClick = (uc: IUc) => {\r\n const zoomedClassType = getFirstScheduleType(uc, classesTypologies);\r\n setZoomAtScheduleModalState({\r\n open: !zoomAtScheduleModalState.open,\r\n uc: getFilteredUcForZommAtScheduleOptions(uc, zoomedClassType, period),\r\n });\r\n setZoomAtScheduleModalClassType(zoomedClassType);\r\n };\r\n\r\n useEffect(() => {\r\n if (zoomAtScheduleModalState.open) {\r\n const uc = ucs.find((uc) => uc.ucId === zoomAtScheduleModalState?.uc?.ucId);\r\n const zoomedClassType = getFirstScheduleType(zoomAtScheduleModalState.uc, classesTypologies);\r\n if (uc) {\r\n setZoomAtScheduleModalState({\r\n open: zoomAtScheduleModalState.open,\r\n uc: getFilteredUcForZommAtScheduleOptions(uc, zoomedClassType, period),\r\n });\r\n }\r\n }\r\n }, [ucs]);\r\n\r\n const handleUCZoomOnClose = () => {\r\n setZoomAtScheduleModalState({ open: false, uc: null });\r\n };\r\n\r\n const selectedClassScheduleAndLockState = (\r\n selectedClassAndLockData: IScheduleAndLock | null,\r\n allocated: boolean\r\n ) => {\r\n if (selectedClassAndLockData) {\r\n const { /*locked,*/ allocation } = selectedClassAndLockData;\r\n return (\r\n \r\n {/*?\r\n {locked ? : }\r\n \r\n */}\r\n \r\n {selectedClassAndLockData.schedule.map((selectedClass, index) => {\r\n const { weekDay, start, end } = selectedClass;\r\n return (\r\n \r\n {`${weekDay}\\u00A0|`}\r\n {`\\u00A0${start} - ${end}`}\r\n \r\n );\r\n })}\r\n \r\n \r\n );\r\n }\r\n };\r\n\r\n const zommAtScheduleModalHeader = (id: number, name: string, color: string) => {\r\n return (\r\n \r\n {id} | {name}\r\n \r\n );\r\n };\r\n\r\n if (!ucs.length && !loadingSchedule) {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n {zoomAtScheduleModalState && zoomAtScheduleModalState.uc && (\r\n {\r\n handleUCZoomOnClose();\r\n }}*/\r\n header={zommAtScheduleModalHeader(\r\n zoomAtScheduleModalState.uc.ucId,\r\n zoomAtScheduleModalState.uc.ucFullName,\r\n zoomAtScheduleModalState.uc.ucColor\r\n )}\r\n onClose={() => handleUCZoomOnClose()}\r\n submitButtonText={t('generic.confirm')}\r\n onSubmit={() => handleUCZoomOnClose()}\r\n >\r\n <>\r\n \r\n \r\n \r\n {\r\n dispatch(\r\n setClassSelectionState({\r\n ucId: classItem.ucId,\r\n groupId: classItem.groupId,\r\n classId: classItem.classId,\r\n type: classItem.classType,\r\n })\r\n );\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n\r\n \r\n {ucs.map((uc: IUc, index) => {\r\n const { classSchedule } = uc;\r\n if (classSchedule.length && classSchedule.some((eachClass) => !eachClass.filtered)) {\r\n return (\r\n \r\n \r\n {`${uc.ucId} | ${uc.ucInitials} - ${uc.ucFullName}`}\r\n handleUCZoomOnClick(uc)}\r\n data-testid=\"schedule_list_view_button_zoom\"\r\n >\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n {classesTypologies.map((typology, index) => {\r\n const options = getDropdownOptions(\r\n uc,\r\n typology.initials,\r\n classesTypologies,\r\n getIrregularMessage\r\n );\r\n if (options.length) {\r\n const allocated = getAllocatedState(ucs, uc.ucId, typology.initials);\r\n return (\r\n \r\n {\r\n \r\n \r\n dispatch(\r\n setClassSelectionState({\r\n ucId: uc.ucId,\r\n groupId: uc.groupId,\r\n classId: value,\r\n type: typology.initials,\r\n })\r\n )\r\n }\r\n data-testid=\"schedule_list_view_dropdown\"\r\n />\r\n \r\n }\r\n />\r\n }\r\n {uc.full && getIrregularMessage(uc.full)}\r\n\r\n {!uc.full &&\r\n selectedClassScheduleAndLockState(\r\n getScheduleAndLockState(\r\n ucs,\r\n uc.ucId,\r\n uc.groupId,\r\n typology.initials\r\n ),\r\n allocated\r\n )}\r\n \r\n );\r\n } else {\r\n return null;\r\n }\r\n })}\r\n \r\n \r\n \r\n );\r\n } else {\r\n return null;\r\n }\r\n })}\r\n \r\n {/*isWrapperScrollable() && (\r\n \r\n handleOnClick()} />\r\n \r\n )*/}\r\n \r\n );\r\n};\r\n\r\nexport default ScheduleListView;\r\n\r\nconst Wrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n padding-left: 18px;\r\n position: relative;\r\n`;\r\n\r\nconst InnerWrapper = styled.div`\r\n > div {\r\n width: 100%;\r\n margin-bottom: 27px;\r\n }\r\n\r\n // Hide scrollbar\r\n // Chrome, Safari and Opera\r\n &::-webkit-scrollbar {\r\n display: none;\r\n }\r\n\r\n // IE and Edge\r\n -ms-overflow-style: none;\r\n\r\n // Firefox\r\n scrollbar-width: none;\r\n`;\r\n\r\n/*const ScrollDownButtonWrapper = styled.div`\r\n width: 24px;\r\n height: 24px;\r\n position: absolute;\r\n bottom: 0;\r\n left: 50%;\r\n z-index: 1;\r\n`;*/\r\n\r\nconst UCWrapper = styled.div`\r\n margin-bottom: 68px;\r\n`;\r\n\r\nconst UCHeader = styled.div<{ ucColor?: string }>`\r\n width: 100%;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n border-bottom: 3px solid ${({ theme, ucColor }) => ucColor || theme.colors.grey};\r\n`;\r\n\r\nconst UCFullName = styled.h3`\r\n padding: 8px 0;\r\n color: ${({ theme }) => theme.colors.darkGrey};\r\n font-weight: 700;\r\n text-transform: uppercase;\r\n`;\r\n\r\nconst ZommAtScheduleModalHeader = styled.div<{ ucColor: string }>`\r\n margin: 68px 0 62px 48px;\r\n color: ${({ theme }) => theme.colors.darkGrey};\r\n font-size: 18px;\r\n font-weight: 700;\r\n text-transform: uppercase;\r\n\r\n &:after {\r\n content: '';\r\n width: 40px;\r\n height: 123px;\r\n position: absolute;\r\n top: 0;\r\n left: 24px;\r\n background-color: ${({ ucColor }) => ucColor};\r\n }\r\n`;\r\n\r\nconst ZommAtScheduleModalMultiToggle = styled.div`\r\n margin: 0 0 16px 62px;\r\n display: flex;\r\n justify-content: flex-end;\r\n border-bottom: 1px solid ${({ theme }) => theme.colors.lightGrey};\r\n\r\n > div {\r\n border-bottom: 1px solid ${({ theme }) => theme.colors.lightGrey};\r\n }\r\n`;\r\n\r\nconst ClassSelectionWrapper = styled.div`\r\n display: flex;\r\n margin-top: 28px;\r\n\r\n .grid {\r\n width: 100%;\r\n }\r\n`;\r\n\r\nconst SelectedClass = styled.div`\r\n display: flex;\r\n margin-top: 24px;\r\n text-align: left;\r\n`;\r\n\r\nconst SelectedClassLockState = styled.div<{\r\n allocated: boolean;\r\n allocation?: 'likely' | 'uncertain' | 'unlikely';\r\n}>`\r\n width: 18px;\r\n height: 18px;\r\n position: relative;\r\n margin-right: 2px;\r\n\r\n svg {\r\n display: inline-block;\r\n position: absolute;\r\n bottom: 3px;\r\n right: 0;\r\n font-size: 10px;\r\n }\r\n\r\n &:before {\r\n width: 0;\r\n height: 0;\r\n display: ${({ allocated, allocation }) => (!allocated && allocation ? `block` : `none`)};\r\n border-top: 10px solid\r\n ${({ theme, allocation }) => {\r\n if (allocation === 'likely') {\r\n return theme.colors.successGreen;\r\n } else if (allocation === 'uncertain') {\r\n return theme.colors.decisionYellow;\r\n } else if (allocation === 'unlikely') {\r\n return theme.colors.dangerRed;\r\n }\r\n }};\r\n border-right: 10px solid transparent;\r\n content: '';\r\n position: absolute;\r\n left: 0;\r\n top: 0;\r\n }\r\n`;\r\n\r\nconst SelectedClassScheduleWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst SelectedClassSchedule = styled.div``;\r\n\r\nconst SelectedClassWeekDay = styled.span`\r\n color: ${({ theme }) => theme.colors.plusDarkGrey};\r\n font-weight: 700;\r\n`;\r\n\r\nconst SelectedClassHour = styled.span`\r\n color: ${({ theme }) => theme.colors.plusDarkGrey};\r\n font-weight: 300;\r\n`;\r\n\r\nconst NoDataMessageWrapper = styled.div`\r\n height: 422px;\r\n display: flex;\r\n justify-content: center;\r\n padding-top: 100px;\r\n`;\r\n\r\nconst IrregularMessage = styled(Text)`\r\n &&& {\r\n align-items: flex-start;\r\n }\r\n`;\r\n\r\nconst IrregularMessageWrapper = styled.div<{ noMargin?: boolean }>`\r\n margin-top: ${({ noMargin }) => (noMargin ? '0' : '24px')};\r\n`;\r\n\r\nconst CaptionWrapper = styled.div`\r\n margin-top: -20px;\r\n padding-left: 63px;\r\n`;\r\n","/**\r\n * SelectedClasses container\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport React, { useRef, useEffect } from 'react';\r\nimport styled from 'styled-components';\r\nimport { Progress } from 'semantic-ui-react';\r\n\r\nimport { t } from 'app';\r\n\r\nimport { Button } from '@paco_ua/pacoui';\r\n\r\nimport { usePrevious } from 'utils';\r\n\r\ninterface ISelectedClasses {\r\n title: string;\r\n icon: JSX.Element;\r\n selected: number;\r\n seriationFinished: boolean;\r\n placedAmount?: number;\r\n total: number;\r\n children: React.ReactNode;\r\n}\r\n\r\nconst SelectedClasses: React.FC = ({\r\n title,\r\n icon,\r\n selected,\r\n seriationFinished,\r\n placedAmount,\r\n total,\r\n children,\r\n}) => {\r\n const childrenWrapperRef = useRef(null);\r\n const prevSelected = usePrevious(selected);\r\n const progress = Math.round((selected * 100) / total);\r\n\r\n useEffect(() => {\r\n //every time new element showsUp scrollToTop\r\n if ((prevSelected || 0) < selected) {\r\n childrenWrapperRef.current?.scrollTo({\r\n top: 0,\r\n behavior: 'smooth',\r\n });\r\n }\r\n }, [prevSelected, selected]);\r\n\r\n const handleOnClick = () => {\r\n if (childrenWrapperRef.current !== null) {\r\n childrenWrapperRef.current.scrollBy({ top: 220, behavior: 'smooth' });\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n {icon}\r\n {title}\r\n \r\n \r\n \r\n \r\n \r\n {!seriationFinished\r\n ? t('sgh.selected', { textOnly: true })\r\n : `${t('sgh.placedIn', { textOnly: true })}`}\r\n :\r\n \r\n {selected} \r\n \r\n \r\n {t('generic.total', { textOnly: true })}:\r\n {total} \r\n \r\n {/*<\r\n TODO this count should come from api. Some users have more than 190 ucs and they can only select a few from those\r\n Counter>\r\n {`${t('generic.total', { textOnly: true })}: `}\r\n {total}\r\n */}\r\n \r\n\r\n selected} />\r\n\r\n \r\n {children}\r\n \r\n \r\n \r\n handleOnClick()}>\r\n {t('generic.seeMore')}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default SelectedClasses;\r\n\r\nconst Wrapper = styled.div`\r\n border: 1px solid ${({ theme }) => theme.colors.primary};\r\n overflow: hidden;\r\n`;\r\n\r\nconst Title = styled.div`\r\n width: 100%;\r\n height: 40px;\r\n display: flex;\r\n align-items: center;\r\n padding: 10px 0;\r\n background-color: ${({ theme }) => theme.colors.primary};\r\n color: ${({ theme }) => theme.colors.white};\r\n font-size: 18px;\r\n\r\n svg {\r\n margin: 0 18px;\r\n }\r\n`;\r\n\r\nconst InnerWrapper = styled.div<{ classesSelected: number }>`\r\n position: relative;\r\n display: flex;\r\n flex-grow: 1;\r\n flex-direction: column;\r\n min-height: 0;\r\n`;\r\n\r\nconst CounterWrapper = styled.div`\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n flex-direction: row;\r\n padding: 20px 20px 0 20px;\r\n`;\r\n\r\nconst Counter = styled.div`\r\n font-size: 15px;\r\n color: ${({ theme }) => theme.colors.primary};\r\n`;\r\n\r\nconst CounterTitle = styled.span`\r\n font-weight: 300;\r\n`;\r\n\r\nconst CounterAmount = styled.span``;\r\n\r\nconst ChildrenWrapper = styled.div<{ classesSelected: number }>`\r\n overflow: auto;\r\n padding: 26px 20px 20px 20px;\r\n max-height: 446px;\r\n\r\n > div {\r\n width: 100%;\r\n margin-bottom: 27px;\r\n }\r\n\r\n // Hide scrollbar\r\n // Chrome, Safari and Opera\r\n &::-webkit-scrollbar {\r\n display: none;\r\n }\r\n\r\n // IE and Edge\r\n -ms-overflow-style: none;\r\n\r\n // Firefox\r\n scrollbar-width: none;\r\n`;\r\n\r\nconst ScrollDownButtonWrapper = styled.div<{ classesSelected: number }>`\r\n height: 40px;\r\n display: ${({ classesSelected }) => (classesSelected >= 2 ? `flex` : `none`)};\r\n justify-content: center;\r\n align-items: center;\r\n background-color: ${({ theme }) => theme.colors.primary};\r\n color: ${({ theme }) => theme.colors.white};\r\n`;\r\n\r\nconst ProgressBar = styled(Progress)<{ percent: number }>`\r\n &&& {\r\n margin: 10px 20px 8px 20px;\r\n border-radius: 0;\r\n height: 24px;\r\n\r\n .bar {\r\n height: 24px;\r\n border-radius: 0;\r\n background-color: ${({ theme, percent }) =>\r\n percent < 45\r\n ? theme.colors.dangerRed\r\n : percent < 99\r\n ? theme.colors.decisionYellow\r\n : theme.colors.successGreen};\r\n }\r\n }\r\n`;\r\n\r\nconst SeeMoreButton = styled(Button)`\r\n width: 100%;\r\n`;\r\n","/**\r\n * Mandatory Options Dropdown container\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport React, { useEffect, useRef } from 'react';\r\nimport { useSelector, useDispatch } from 'react-redux';\r\nimport styled from 'styled-components';\r\n\r\nimport { t } from 'app';\r\n\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './logic/selectors';\r\n\r\nimport { DropdownSelector, Modal } from '@paco_ua/pacoui';\r\n\r\nimport { getCurrentRoute } from 'utils';\r\n\r\nimport { ucSelectedOtherOption } from './utils';\r\n\r\nconst MandatoryOptionsDropdown: React.FC = () => {\r\n const preselected = useRef(false);\r\n const ucs = useSelector(selectors.getUcs);\r\n\r\n const { options, confirmationModalIsOpen, optionIndexToRemove, ucIdToRemove } = useSelector(\r\n selectors.getMandatoryOptions\r\n );\r\n\r\n const { currentPhase } = useSelector(selectors.getSchedulesSlices);\r\n\r\n const dispatch = useDispatch();\r\n const { setMandatoryOptions, removeMandatoryOptions } = actions.Schedules;\r\n const {\r\n setOptions,\r\n setConfirmationModalOpening,\r\n setOptionIndexToRemove,\r\n setUcIdToRemove,\r\n } = actions.MandatoryOptionsDropdown;\r\n\r\n useEffect(() => {\r\n preselected.current = false;\r\n }, []);\r\n\r\n // Effect Hooks\r\n useEffect(() => {\r\n options.length > 0 &&\r\n !preselected.current &&\r\n ucs.length > 0 &&\r\n getCurrentRoute().route.key === 'editschedules' &&\r\n handleClassPreSelection();\r\n }, [ucs, options]);\r\n\r\n const handleClassPreSelection = () => {\r\n const ucsToPreselect = ucs.reduce((acc: any[], uc: any) => {\r\n let index = 0;\r\n\r\n if (\r\n options.some((option) =>\r\n option.ucs.some((optionUc, key) => {\r\n index = key;\r\n return optionUc.ucId === uc.ucId;\r\n })\r\n )\r\n ) {\r\n if (uc.classSchedule.some((classUnit) => classUnit.selected)) {\r\n return [...acc, { ...uc, optionKey: index }];\r\n }\r\n }\r\n return acc;\r\n }, []);\r\n\r\n if (ucsToPreselect.length > 0) {\r\n preselected.current = true;\r\n\r\n const newOptions = options.map((option) => {\r\n if (ucsToPreselect.some((uc) => option.ucs.some((optionUc) => uc.ucId === optionUc.ucId))) {\r\n let idToSelect = 0;\r\n\r\n ucsToPreselect.forEach((uc, ucKey) => {\r\n uc.classSchedule.forEach((classUnit, key) => {\r\n if (classUnit.selected) {\r\n idToSelect = uc.optionKey;\r\n }\r\n });\r\n });\r\n\r\n return {\r\n ...option,\r\n open: true,\r\n selected: idToSelect,\r\n };\r\n } else {\r\n return option;\r\n }\r\n });\r\n\r\n dispatch(setOptions(newOptions));\r\n }\r\n };\r\n\r\n const handleClassSelection = (selection) => {\r\n const [optionIndex, classIndex] = selection;\r\n const newOptions = options.map((option) => {\r\n if (option.id === optionIndex + 1) {\r\n // attatch selected option classes to the schedule grid\r\n dispatch(\r\n setMandatoryOptions({\r\n ucId: option.ucs[classIndex].ucId,\r\n groupId: option.ucs[classIndex].groupId,\r\n })\r\n );\r\n return {\r\n ...option,\r\n open: true,\r\n selected: classIndex,\r\n };\r\n } else {\r\n return option;\r\n }\r\n });\r\n\r\n dispatch(setOptions(newOptions));\r\n };\r\n\r\n const handleOptionRemoval = (optionIndex: number) => {\r\n const newOptions = options.map((option) => {\r\n if (option.id === optionIndex + 1) {\r\n return {\r\n ...option,\r\n selected: null,\r\n };\r\n } else {\r\n return option;\r\n }\r\n });\r\n dispatch(setOptions(newOptions));\r\n };\r\n\r\n // Check if option to remove contains classes that are, already, selected @ Schedules\r\n // if true, show a confirmation modal before removing\r\n const handleCheckingIfOptionHasSelectedClasses = (\r\n selection,\r\n ucId: number,\r\n groupId: number | null\r\n ) => {\r\n const [optionIndex] = selection;\r\n // Find respective Schedule's state UC\r\n // and evaluate if it has classes selected\r\n const scheduleUcToRemove = ucs.find((uc) => uc.ucId === ucId && uc.groupId === groupId);\r\n if (scheduleUcToRemove) {\r\n const scheduleUcToRemoveHasSelectedClasses = scheduleUcToRemove.classSchedule.find(\r\n (eachClass) => {\r\n return eachClass.selected;\r\n }\r\n );\r\n if (scheduleUcToRemoveHasSelectedClasses) {\r\n // set option index and uc id to remove while waiting for user confirmation\r\n dispatch(setOptionIndexToRemove(optionIndex));\r\n dispatch(setUcIdToRemove({ ucId, groupId }));\r\n // show modal and wait for user confirmation\r\n dispatch(setConfirmationModalOpening(true));\r\n } else {\r\n dispatch(removeMandatoryOptions({ ucId, groupId }));\r\n handleOptionRemoval(optionIndex);\r\n }\r\n }\r\n };\r\n\r\n const handleModalSubmission = () => {\r\n if (optionIndexToRemove !== null && ucIdToRemove !== null) {\r\n handleOptionRemoval(optionIndexToRemove);\r\n dispatch(removeMandatoryOptions({ ucId: ucIdToRemove.ucId, groupId: ucIdToRemove.groupId }));\r\n }\r\n\r\n dispatch(setConfirmationModalOpening(false));\r\n };\r\n\r\n const handleModalOnCloseOrOnCancel = () => {\r\n dispatch(setOptionIndexToRemove(null));\r\n dispatch(setUcIdToRemove(null));\r\n dispatch(setConfirmationModalOpening(false));\r\n };\r\n\r\n if (options.length <= 0) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n handleModalOnCloseOrOnCancel()}\r\n onCancel={() => handleModalOnCloseOrOnCancel()}\r\n onSubmit={() => handleModalSubmission()}\r\n />\r\n\r\n ({\r\n title: option.name,\r\n items: option.ucs.map((eachClass, key) => {\r\n const countSlots = eachClass.availableSlots;\r\n const noClasses = !eachClass?.classSchedule.length;\r\n const noOnline = eachClass.irregular === 'noOnline';\r\n\r\n return {\r\n id: key,\r\n title: eachClass.ucFullName,\r\n selected: option.selected === key,\r\n disabled:\r\n currentPhase?.finished ||\r\n eachClass.disabled ||\r\n noClasses ||\r\n noOnline ||\r\n ucSelectedOtherOption(option, eachClass, options) ||\r\n eachClass.classSchedule.some(\r\n (classItem) =>\r\n classItem?.allocated?.state === 'assigned' ||\r\n classItem?.allocated?.state === 'automatic'\r\n ),\r\n infoType: noClasses === false ? 'warning' : 'danger',\r\n info: noClasses\r\n ? t('sgh.infoAlertDisabledMandatoryNoClasses')\r\n : noOnline\r\n ? t('sgh.infoAlertDisabledOnline')\r\n : eachClass.disabled\r\n ? t('sgh.infoAlertDisabledMandatory', {\r\n context: `${countSlots}`,\r\n count: countSlots,\r\n })\r\n : t('sgh.infoAlertDisabledMandatory', {\r\n context: `${countSlots}`,\r\n count: countSlots,\r\n }),\r\n };\r\n }),\r\n }))}\r\n onRemove={(selection) => {\r\n const [optionId, itemId] = selection;\r\n handleCheckingIfOptionHasSelectedClasses(\r\n selection,\r\n options[optionId].ucs[itemId].ucId,\r\n options[optionId].ucs[itemId].groupId\r\n );\r\n }}\r\n onSelect={(selection) => {\r\n handleClassSelection(selection);\r\n }}\r\n />\r\n \r\n );\r\n};\r\n\r\nexport default MandatoryOptionsDropdown;\r\n\r\nconst Wrapper = styled.div`\r\n max-width: 280px;\r\n min-width: 150px;\r\n border-top: 1px solid #2eb4bd;\r\n border-left: 1px solid #2eb4bd;\r\n border-right: 1px solid #2eb4bd;\r\n width: 280px;\r\n`;\r\n","/**\r\n * FreeOptionsTable container utilities\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { ITranslations } from '@paco_ua/pacoui';\r\n\r\nexport const DEFAULT_STRUCTURE = (t: ITranslations) => ({\r\n header: {\r\n type: 'columnTitle',\r\n titles: [\r\n { text: t('sgh.department', { textOnly: true }) },\r\n { text: t('sgh.scientificField', { textOnly: true }) },\r\n { text: t('sgh.code', { textOnly: true }) },\r\n { text: t('sgh.uc', { textOnly: true }) },\r\n //{ text: t('sgh.workload', { textOnly: true }) },\r\n { text: t('sgh.ects', { textOnly: true }) },\r\n { text: t('sgh.slots', { textOnly: true }) },\r\n { text: t('sgh.freeSlots', { textOnly: true }) },\r\n ],\r\n },\r\n rows: [],\r\n});\r\n\r\nexport const checkHasFilters = (filterParams) => {\r\n if (filterParams !== null && filterParams !== undefined) {\r\n return Object.keys(filterParams).some((filter) => {\r\n return filterParams[filter].trim().length > 0;\r\n });\r\n }\r\n return false;\r\n};\r\n\r\nexport const checkAreAllFiltersFilled = (filterParams) => {\r\n if (filterParams !== null && filterParams !== undefined) {\r\n return Object.keys(filterParams).every((filter) => {\r\n return filterParams[filter].trim().length > 0;\r\n }) || (filterParams?.department !== '' && filterParams?.cycle !== '');\r\n }\r\n return false;\r\n};\r\n\r\nexport const hasSelectedUcId = (ucs, freeOption) => {\r\n return ucs?.some((uc) => uc?.ucId === freeOption?.id);\r\n};\r\n","/**\r\n * FreeOptionsList container\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport React, { useMemo } from 'react';\r\nimport moment from 'moment';\r\n\r\nimport { Table, Button, Text, SearchBox, Dropdown, ITranslations } from '@paco_ua/pacoui';\r\nimport styled from 'styled-components';\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport { IFreeOption } from './types';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faInfoCircle, faEllipsisH } from '@fortawesome/pro-light-svg-icons';\r\nimport { faExclamationCircle } from '@fortawesome/pro-regular-svg-icons';\r\n\r\nimport {\r\n getIrregularMessageFreeOptions,\r\n getIrregularMessageSmallFreeOptions,\r\n} from '../../MySchedule/utils';\r\n\r\nimport { checkAreAllFiltersFilled, checkHasFilters, hasSelectedUcId } from './utils';\r\n\r\nimport useTable from './useTable';\r\n\r\nconst compileTableRow = (\r\n freeOption: IFreeOption,\r\n theme,\r\n t: ITranslations,\r\n registrationId,\r\n onSelectRow,\r\n dispatch,\r\n ucs\r\n) => {\r\n let tableRow = {\r\n rowProps: {},\r\n cells: [\r\n ...Object.keys(freeOption)\r\n .filter((key) =>\r\n ['department', 'scientificField', 'id', 'name', 'ects', 'totalSlots', 'freeSlots'].some(\r\n (item) => key === item\r\n )\r\n )\r\n .map((key, index) => {\r\n let width = 1;\r\n if (key === 'name') {\r\n width = 5;\r\n } else if (key === 'scientificField' || key === 'id' || key === 'workload') {\r\n width = 2;\r\n } else {\r\n width = 1;\r\n }\r\n\r\n if (key === 'workload') {\r\n return {\r\n content: (\r\n \r\n \r\n {`${freeOption[key].totalHours}h / ${t('sgh.week', { textOnly: true })}`}\r\n \r\n \r\n ),\r\n cellProps: { width: width, singleLine: false },\r\n };\r\n } else {\r\n return {\r\n content: (\r\n {\r\n if (key === 'name') e.stopPropagation();\r\n }}\r\n >\r\n \r\n {freeOption[key] === null || freeOption[key] === undefined ? (\r\n \r\n ) : (\r\n freeOption[key]\r\n )}\r\n \r\n \r\n ),\r\n cellProps: {\r\n width: width,\r\n singleLine: false,\r\n },\r\n };\r\n }\r\n }),\r\n ],\r\n collapsableRows: registrationId\r\n ? []\r\n : [\r\n {\r\n rowProps: {\r\n bgColor: theme.colors.softGrey,\r\n disableHover: true,\r\n },\r\n cells: Object.keys(freeOption)\r\n .filter((key) => key === 'availableAt' || key === 'classes')\r\n .map((key) => {\r\n /*if (key === 'workload') {\r\n const workloadList = freeOption.workload.classHours.map((item) => {\r\n return (\r\n \r\n {`${item.type} - ${item.hours}h / ${t('sgh.week', { textOnly: true })}`}\r\n \r\n );\r\n });\r\n return {\r\n content: (\r\n \r\n \r\n {`${t('sgh.workload', { textOnly: true })}`}\r\n \r\n {workloadList.map((item) => item)}\r\n \r\n ),\r\n cellProps: { colSpan: 3, singleLine: false },\r\n };\r\n }*/\r\n if (key === 'availableAt') {\r\n const availableAtList = freeOption.availableAt.map((item) => {\r\n return (\r\n \r\n {item}\r\n \r\n );\r\n });\r\n return {\r\n content: (\r\n \r\n \r\n {`${t('sgh.availableAt', { textOnly: true })}`}\r\n \r\n {availableAtList?.map((item) => item) || (\r\n \r\n )}\r\n \r\n ),\r\n cellProps: { colSpan: 3, singleLine: false },\r\n };\r\n } else {\r\n // classes\r\n let classesList = [] as any;\r\n freeOption.classes.map((item, index) => {\r\n if (item.lessons.length > 0) {\r\n item.lessons\r\n .map((lessonItem) => ({\r\n ...lessonItem,\r\n text: `${\r\n moment.weekdays()[moment(lessonItem.startDate).day()]\r\n } | ${moment(lessonItem.startDate).format('HH:mm')} - ${moment(\r\n lessonItem.endDate\r\n ).format('HH:mm')}`,\r\n }))\r\n .reduce((acc: any, item) => {\r\n if (!acc.some((accLessonItem) => accLessonItem.text === item.text)) {\r\n acc.push(item);\r\n }\r\n return acc;\r\n }, [])\r\n .forEach((lessonItem) => {\r\n classesList.push(\r\n
    \r\n \r\n {item.name}\r\n \r\n \r\n {` - ${lessonItem.text}`}\r\n \r\n
    \r\n );\r\n });\r\n }\r\n });\r\n\r\n return {\r\n content: (\r\n \r\n \r\n {`${t('sgh.classes', { textOnly: true })}`}\r\n \r\n {classesList.length === 0 && }\r\n {classesList.map((item) => item)}\r\n \r\n ),\r\n cellProps: { colSpan: 6, singleLine: false },\r\n };\r\n }\r\n }),\r\n },\r\n ],\r\n };\r\n\r\n if (registrationId) {\r\n tableRow.cells.push({\r\n content: (\r\n \r\n {freeOption?.irregular ? (\r\n {\r\n dispatch(\r\n actions.Toaster.showToaster({\r\n title: getIrregularMessageSmallFreeOptions(freeOption),\r\n body: getIrregularMessageFreeOptions(freeOption),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }}\r\n cursor=\"pointer\"\r\n size=\"lg\"\r\n color={theme.colors.dangerRed}\r\n icon={faExclamationCircle}\r\n />\r\n }\r\n color=\"red\"\r\n >\r\n {getIrregularMessageSmallFreeOptions(freeOption)}\r\n \r\n ) : hasSelectedUcId(ucs, freeOption) ? (\r\n {\r\n dispatch(\r\n actions.Toaster.showToaster({\r\n title: t('sgh.irregularSituationFreeOptionAlreadySelectedSmall'),\r\n body: t('sgh.irregularSituationFreeOptionAlreadySelected'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }}\r\n cursor=\"pointer\"\r\n size=\"lg\"\r\n color={theme.colors.dangerRed}\r\n icon={faExclamationCircle}\r\n />\r\n }\r\n color=\"red\"\r\n >\r\n {t('sgh.irregularSituationFreeOptionAlreadySelectedSmall')}\r\n \r\n ) : (\r\n {\r\n onSelectRow && onSelectRow(freeOption);\r\n }}\r\n primary\r\n full\r\n >\r\n {t('generic.addElement', {\r\n what: t('sgh.uc', { textOnly: true }),\r\n })}\r\n \r\n )}\r\n \r\n ),\r\n cellProps: {\r\n width: 2,\r\n singleLine: false,\r\n },\r\n });\r\n }\r\n return tableRow;\r\n};\r\n\r\nconst FreeOptionsTable = ({\r\n t,\r\n loading,\r\n disableFilters,\r\n data,\r\n total,\r\n fetchFreeOptions,\r\n addFilters,\r\n filterParams,\r\n registrationId,\r\n onSelectRow,\r\n mandatoryFilters,\r\n ucs,\r\n}) => {\r\n const { structure, pagination, onChangePage, onChangeRows, theme } = useTable(\r\n t,\r\n data,\r\n compileTableRow,\r\n total,\r\n fetchFreeOptions,\r\n filterParams,\r\n registrationId,\r\n onSelectRow,\r\n mandatoryFilters,\r\n ucs\r\n );\r\n\r\n const hasFilter = useMemo(() => {\r\n return checkHasFilters(filterParams);\r\n }, [filterParams]);\r\n\r\n const hasMissingFilter = useMemo(() => {\r\n return !checkAreAllFiltersFilled(filterParams);\r\n }, [filterParams]);\r\n\r\n return (\r\n <>\r\n \r\n {\r\n addFilters.onSearch(value);\r\n }}\r\n />\r\n {\r\n addFilters.onDepartmentFilterChange(value);\r\n }}\r\n onClear={() => {\r\n addFilters.onDepartmentFilterChange('');\r\n }}\r\n />\r\n {\r\n addFilters.onCycleFilterChange(value);\r\n }}\r\n onClear={() => {\r\n addFilters.onCycleFilterChange('');\r\n }}\r\n />\r\n \r\n\r\n {mandatoryFilters && !hasFilter && (\r\n \r\n \r\n \r\n \r\n \r\n {t('generic.selectFilterInfo', { textOnly: true })}\r\n \r\n \r\n )}\r\n {mandatoryFilters && hasFilter && hasMissingFilter && (\r\n \r\n \r\n \r\n \r\n \r\n {t('generic.fillAllFilters', { textOnly: true })}\r\n \r\n \r\n )}\r\n\r\n\r\n {((mandatoryFilters && hasFilter) || !mandatoryFilters) && (\r\n <>\r\n {(data.length > 0 || loading) && (\r\n \r\n \r\n \r\n )}\r\n\r\n {data.length === 0 && !loading && !hasMissingFilter && (\r\n \r\n \r\n \r\n \r\n \r\n {t('sgh.noOptionsListFound', { textOnly: true })}\r\n \r\n \r\n )}\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default FreeOptionsTable;\r\n\r\nconst ContentWrapper = styled.div<{ alignCenter?: boolean }>`\r\n display: flex;\r\n flex-direction: column;\r\n align-items: ${({ alignCenter }) => (alignCenter ? 'center' : 'None')};\r\n margin: 26px 0px 26px 0px;\r\n width: fit-content;\r\n`;\r\n\r\nconst WorkloadWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n line-height: 1;\r\n\r\n margin: 20px 0px 20px 0px;\r\n\r\n > div:first-child {\r\n margin-bottom: 8px;\r\n }\r\n\r\n > div:not(:first-child):not(:last-child) {\r\n margin-bottom: 4px;\r\n }\r\n`;\r\n\r\nconst ClassesWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n line-height: 1;\r\n\r\n margin: 20px 0px 20px 0px;\r\n\r\n > div:first-child {\r\n margin-bottom: 8px;\r\n }\r\n\r\n > div:not(:first-child):not(:last-child) {\r\n margin-bottom: 4px;\r\n }\r\n`;\r\n\r\nconst FreeOptionsTableWrapper = styled.div<{ loading: boolean }>`\r\n &&& th {\r\n padding-right: 20px !important;\r\n padding-left: 20px !important;\r\n padding-top: 0px !important;\r\n padding-bottom: 0px !important;\r\n height: 61px;\r\n }\r\n\r\n &&& td {\r\n padding-right: 20px !important;\r\n padding-left: 20px !important;\r\n padding-top: 0px !important;\r\n padding-bottom: 0px !important;\r\n vertical-align: ${({ loading }) => (loading ? 'None' : 'top')};\r\n height: ${({ loading }) => (loading ? '76px' : 'None')};\r\n }\r\n\r\n &&& td:last-child > svg {\r\n margin-top: 28px;\r\n }\r\n\r\n &&& .ui.table tfoot tr td {\r\n height: 45px;\r\n }\r\n`;\r\n\r\nconst SearchAndFiltersWrapper = styled.div`\r\n display: flex;\r\n margin-top: 20px;\r\n margin-bottom: 24px;\r\n justify-content: flex-start;\r\n\r\n > div {\r\n width: 20%;\r\n min-width: 268px;\r\n max-width: 386px;\r\n }\r\n\r\n > div:not(:first-child) {\r\n margin-left: 16px;\r\n }\r\n`;\r\n\r\nconst MessageNoOptions = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n text-align: center;\r\n justify-content: center;\r\n margin-top: 60px;\r\n margin-bottom: 20px;\r\n\r\n div:nth-child(2) {\r\n margin-top: 16px;\r\n }\r\n`;\r\n\r\nconst Icon = styled.div<{ danger?: boolean}>`\r\n font-size: 60px;\r\n color: ${({ theme }) => theme.colors.primary};\r\n\r\n ${({ danger, theme}) => {\r\n if(danger){\r\n return `\r\n svg {\r\n path {\r\n fill: ${theme.colors.dangerRed} !important;\r\n } \r\n }\r\n `\r\n }\r\n }};\r\n`;","/**\r\n * Debits Table container logic\r\n *\r\n * @author Nuno Gago \r\n *\r\n */\r\n\r\nimport { useState, useEffect, useContext } from 'react';\r\nimport { useSelector, useDispatch } from 'react-redux';\r\nimport { ThemeContext } from 'styled-components';\r\n\r\nimport { ITranslations, IPagination } from '@paco_ua/pacoui';\r\nimport { checkAreAllFiltersFilled, DEFAULT_STRUCTURE } from './utils';\r\n\r\nimport { DEFAULT_PAGINATION, IFreeOption } from './types';\r\n\r\nimport * as selectors from './logic/selectors';\r\nimport { actions } from 'store/rootSlices';\r\n\r\nexport default (\r\n t,\r\n freeOptions: IFreeOption[],\r\n compileTableRow,\r\n total: number,\r\n fetchFreeOptions,\r\n filterParams,\r\n registrationId,\r\n onSelectRow,\r\n mandatoryFilters,\r\n ucs\r\n) => {\r\n const theme = useContext(ThemeContext);\r\n const [structure, setStructure] = useState(DEFAULT_STRUCTURE(t));\r\n const [pagination, setPagination] = useState(DEFAULT_PAGINATION(total));\r\n const dispatch = useDispatch();\r\n\r\n const freeOptionsListSlice = useSelector(selectors.getFreeOptionsListSlice);\r\n const {\r\n fetchFreeOptionsFilters,\r\n } = actions.FreeOptionsTable;\r\n\r\n const [initialFetch, setInitialFetch] = useState(true);\r\n\r\n // initial debits fetch\r\n useEffect(() => {\r\n if (initialFetch) {\r\n setInitialFetch(false);\r\n } else {\r\n \r\n if(\r\n !checkAreAllFiltersFilled(freeOptionsListSlice.filterParams)\r\n ){\r\n dispatch(fetchFreeOptionsFilters({\r\n limit: freeOptionsListSlice.freeOptionsPage.limit,\r\n offset: 0,\r\n mandatoryFilters,\r\n registrationId\r\n }))\r\n }\r\n else{\r\n fetchFreeOptions({\r\n limit: freeOptionsListSlice.freeOptionsPage.limit,\r\n offset: 0,\r\n mandatoryFilters,\r\n });\r\n }\r\n }\r\n }, [filterParams]);\r\n\r\n // update pagination when total value is changed (when filtering)\r\n useEffect(() => {\r\n let updatePagination = { ...pagination };\r\n updatePagination.total = total;\r\n\r\n setPagination(updatePagination);\r\n }, [total]);\r\n\r\n useEffect(() => {\r\n handlePaginationNavigation(pagination);\r\n }, [pagination]);\r\n\r\n // Update table when new debits are fetched,\r\n // or to disable the payment buttons when multiple debits are selected\r\n useEffect(() => {\r\n const tableStructure = compileTableStructure(t, freeOptions, theme);\r\n setStructure(tableStructure);\r\n }, [freeOptions]);\r\n\r\n const compileTableStructure = (t: ITranslations, freeOptions: IFreeOption[], theme) => ({\r\n header: {\r\n type: 'columnTitle',\r\n titles: [\r\n { text: t('sgh.department', { textOnly: true }) },\r\n { text: t('sgh.scientificField', { textOnly: true }) },\r\n { text: t('sgh.code', { textOnly: true }) },\r\n { text: t('sgh.uc', { textOnly: true }) },\r\n //{ text: t('sgh.workload', { textOnly: true }) },\r\n { text: t('sgh.ects', { textOnly: true }) },\r\n { text: t('sgh.slots', { textOnly: true }) },\r\n { text: t('sgh.freeSlots', { textOnly: true }) },\r\n { text: '' },\r\n ],\r\n },\r\n rows: !freeOptions.length\r\n ? ([] as any)\r\n : [\r\n ...freeOptions.map((freeOption) =>\r\n compileTableRow(freeOption, theme, t, registrationId, onSelectRow, dispatch, ucs)\r\n ),\r\n ],\r\n });\r\n\r\n const handlePaginationNavigation = (newPagination: IPagination) => {\r\n const exceedsTotal = newPagination.limit >= newPagination.total;\r\n\r\n if (exceedsTotal) {\r\n newPagination.hasPrevious = false;\r\n newPagination.hasNext = false;\r\n }\r\n\r\n if (!exceedsTotal && newPagination.offset < newPagination.limit) {\r\n newPagination.hasPrevious = false;\r\n newPagination.hasNext = true;\r\n }\r\n\r\n if (!exceedsTotal && newPagination.offset >= newPagination.limit) {\r\n newPagination.hasPrevious = true;\r\n newPagination.hasNext =\r\n newPagination.offset + newPagination.limit >= newPagination.total ? false : true;\r\n }\r\n\r\n setPagination(newPagination);\r\n };\r\n\r\n const onChangeRows = (value: number): void => {\r\n const newPagination = { ...pagination };\r\n newPagination.limit = value;\r\n newPagination.offset = 0;\r\n\r\n handlePaginationNavigation(newPagination);\r\n setPagination(newPagination);\r\n fetchFreeOptions({ ...newPagination, mandatoryFilters });\r\n };\r\n\r\n const onChangePage = (value: string): void => {\r\n const newPagination = { ...pagination };\r\n\r\n switch (value) {\r\n case 'prev':\r\n newPagination.offset -= newPagination.limit;\r\n break;\r\n case 'next':\r\n newPagination.offset += newPagination.limit;\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n handlePaginationNavigation(newPagination);\r\n setPagination(newPagination);\r\n fetchFreeOptions({ ...newPagination, mandatoryFilters });\r\n };\r\n\r\n return {\r\n theme,\r\n structure,\r\n pagination,\r\n onChangePage,\r\n onChangeRows,\r\n };\r\n};\r\n","/**\r\n * FreeOptionsList container\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport React, { useEffect, useContext, useMemo } from 'react';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './logic/selectors';\r\nimport { AnimatedBackground } from '@paco_ua/pacoui';\r\n\r\nimport FreeOptionsTableStructure from './structure';\r\nimport { checkAreAllFiltersFilled, checkHasFilters } from './utils';\r\n\r\nconst FreeOptionsTable: React.FC<{\r\n t;\r\n onLoad;\r\n onError;\r\n onPeriod;\r\n registrationId?: number | null;\r\n mandatoryFilters?: boolean;\r\n onSelectRow?: (any) => void;\r\n}> = ({ t, onLoad, onError, onPeriod, mandatoryFilters, registrationId, onSelectRow }) => {\r\n const {\r\n onMount,\r\n setSearchFilter,\r\n setDepartmentFilter,\r\n setCycleFilter,\r\n fetchFreeOptions,\r\n onUnmount,\r\n } = actions.FreeOptionsTable;\r\n\r\n const { currentLocale } = useSelector(selectors.getAppSlice);\r\n\r\n const dispatch = useDispatch();\r\n\r\n const theme = useContext(ThemeContext);\r\n\r\n const {\r\n loadingStatus,\r\n errorStatus,\r\n filterParams,\r\n freeOptionsList,\r\n freeOptionsPage,\r\n departmentFilterList,\r\n cycleFilterList,\r\n year,\r\n semester,\r\n } = useSelector(selectors.getFreeOptionsListSlice);\r\n\r\n const ucs = useSelector(selectors.getUcs);\r\n\r\n useEffect(() => {\r\n dispatch(onMount({ registrationId, mandatoryFilters }));\r\n return () => {\r\n dispatch(onUnmount());\r\n };\r\n }, [currentLocale]);\r\n\r\n useEffect(() => {\r\n onPeriod && onPeriod({ year, semester });\r\n }, [year, semester]);\r\n\r\n useEffect(() => {\r\n onLoad && onLoad(loadingStatus.loading);\r\n }, [loadingStatus]);\r\n\r\n useEffect(() => {\r\n onError && onError(errorStatus.errLoadingFreeOptions);\r\n }, [errorStatus]);\r\n\r\n return (\r\n <>\r\n {loadingStatus.loading && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n {!loadingStatus.loading && !errorStatus.errLoadingFreeOptions && (\r\n {\r\n dispatch(fetchFreeOptions({ ...params, mandatoryFilters, registrationId }));\r\n }}\r\n addFilters={{\r\n searchPlaceholder: t('sgh.searchFreeOptionPlaceholder', { textOnly: true }),\r\n dropdownDepartmentPlaceholder: t('sgh.freeOptionsDropdownDepartmentPlaceholder', {\r\n textOnly: true,\r\n }),\r\n dropdownCoursePlaceholder: t('sgh.freeOptionsDropdownCoursePlaceholder', {\r\n textOnly: true,\r\n }),\r\n onSearch: (value) => {\r\n dispatch(setSearchFilter(value));\r\n },\r\n onCycleFilterChange: (value) => {\r\n dispatch(setCycleFilter(value));\r\n },\r\n onDepartmentFilterChange: (value) => {\r\n dispatch(setDepartmentFilter(value));\r\n },\r\n filterDepartments: departmentFilterList,\r\n filterCycles: cycleFilterList,\r\n }}\r\n filterParams={filterParams}\r\n total={freeOptionsPage.totalRecords}\r\n data={freeOptionsList}\r\n registrationId={registrationId}\r\n onSelectRow={onSelectRow}\r\n ucs={ucs}\r\n />\r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default FreeOptionsTable;\r\n\r\nconst LoadingWrapper = styled.div`\r\n width: 100%;\r\n height: 300px;\r\n\r\n margin-top: 20px;\r\n\r\n * {\r\n margin: 8px 0px;\r\n }\r\n`;\r\n","/**\r\n * FreeOptionsDropdown container\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport React from 'react';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport styled from 'styled-components';\r\nimport numeral from 'numeral';\r\n\r\nimport { t } from 'app';\r\n\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './logic/selectors';\r\n\r\nimport { DropdownSelector, Modal, Text } from '@paco_ua/pacoui';\r\n\r\nimport FreeOptionsTable from 'scenes/Schedules/containers/FreeOptionsTable';\r\n\r\nimport { reformatFreeUcs } from 'scenes/Schedules/MySchedule/utils';\r\n\r\nimport { ucSelectedOtherOption } from './utils';\r\n//import config from 'config'\r\n\r\nconst FreeOptionsDropdown = () => {\r\n const ucs = useSelector(selectors.getUcs);\r\n const registration = useSelector(selectors.getRegistration);\r\n\r\n console.log(registration);\r\n \r\n const { currentPhase } = useSelector(selectors.getSchedulesSlices);\r\n\r\n const {\r\n options,\r\n confirmationModalIsOpen,\r\n freeOptionsSearchModalIsOpen,\r\n optionIndexToRemove,\r\n optionToRemove,\r\n ucIdToRemove,\r\n } = useSelector(selectors.getFreeOptions);\r\n\r\n const dispatch = useDispatch();\r\n const { setFreeOptions, removeFreeOptions } = actions.Schedules;\r\n const {\r\n setOptions,\r\n setConfirmationModalOpening,\r\n setFreeOptionsSearchModalOpening,\r\n setOptionIndexToRemove,\r\n setOptionToRemove,\r\n setUcIdToRemove,\r\n } = actions.FreeOptionsDropdown;\r\n const { removeUcList } = actions.FreeOptionsTable;\r\n\r\n const handleSelection = (selectedOption) => {\r\n const selectedOptionKey = freeOptionsSearchModalIsOpen.option?.['key'][0];\r\n let groupId = null;\r\n let reformatedUc = {};\r\n\r\n const newOptions = options.map((option, key) => {\r\n if (key === selectedOptionKey) {\r\n groupId = option.optionId;\r\n reformatedUc = reformatFreeUcs([selectedOption], currentPhase?.finished, groupId)[0];\r\n return {\r\n ...option,\r\n selected: 0,\r\n ucs: [{ ...reformatedUc }],\r\n };\r\n } else {\r\n return option;\r\n }\r\n });\r\n\r\n if (groupId !== null) {\r\n dispatch(\r\n setFreeOptions({\r\n ucItem: reformatedUc,\r\n })\r\n );\r\n }\r\n\r\n dispatch(setOptions(newOptions));\r\n dispatch(setFreeOptionsSearchModalOpening({ modalOpen: false, option: null }));\r\n };\r\n\r\n const handleRemoval = (selectedOption) => {\r\n const selectedOptionKey = selectedOption?.['key'][0];\r\n let selectedUc: any = null;\r\n\r\n const newOptions = options.map((option, key) => {\r\n if (key === selectedOptionKey) {\r\n selectedUc = option.ucs[0];\r\n return {\r\n ...option,\r\n selected: null,\r\n ucs: [],\r\n };\r\n } else {\r\n return option;\r\n }\r\n });\r\n\r\n dispatch(removeUcList(selectedUc?.ucId));\r\n dispatch(removeFreeOptions(selectedUc?.ucId));\r\n dispatch(setOptions(newOptions));\r\n };\r\n\r\n // Check if option to remove contains classes that are, already, selected @ Schedules\r\n // if true, show a confirmadtion modal before removing\r\n const handleCheckingIfOptionHasSelectedClasses = (selection, selectedOption) => {\r\n const [optionIndex, itemIndex] = selection;\r\n // Find respective Schedule's state UC\r\n // and evaluate if it has classes selected\r\n const ucId = options?.[optionIndex]?.ucs?.[itemIndex]?.ucId || null;\r\n const groupId = options?.[optionIndex]?.ucs?.[itemIndex]?.groupId || null;\r\n\r\n const scheduleUcToRemove = ucs.find((uc) => uc.ucId === ucId && uc.groupId === groupId);\r\n\r\n if (scheduleUcToRemove) {\r\n const scheduleUcToRemoveHasSelectedClasses = scheduleUcToRemove?.classSchedule.find(\r\n (eachClass) => {\r\n return eachClass.selected;\r\n }\r\n );\r\n\r\n if (scheduleUcToRemoveHasSelectedClasses) {\r\n // set option index and uc id to remove while waiting for user confirmation\r\n dispatch(setOptionIndexToRemove(optionIndex));\r\n dispatch(setOptionToRemove(selectedOption));\r\n dispatch(setUcIdToRemove(ucId));\r\n // show modal and wait for user confirmation\r\n dispatch(setConfirmationModalOpening(true));\r\n } else {\r\n handleRemoval(selectedOption);\r\n }\r\n } else {\r\n handleRemoval(selectedOption);\r\n }\r\n };\r\n\r\n const handleModalSubmission = () => {\r\n if (optionIndexToRemove !== null && optionToRemove !== null && ucIdToRemove !== null) {\r\n handleRemoval(optionToRemove);\r\n }\r\n\r\n dispatch(setConfirmationModalOpening(false));\r\n };\r\n\r\n const handleModalOnCloseOrOnCancel = () => {\r\n dispatch(setOptionIndexToRemove(null));\r\n dispatch(setUcIdToRemove(null));\r\n dispatch(setConfirmationModalOpening(false));\r\n };\r\n\r\n if (options.length <= 0) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n handleModalOnCloseOrOnCancel()}\r\n onCancel={() => handleModalOnCloseOrOnCancel()}\r\n onSubmit={() => {\r\n handleModalSubmission();\r\n }}\r\n />\r\n\r\n \r\n \r\n {freeOptionsSearchModalIsOpen?.option?.title || ''}\r\n \r\n {currentPhase?.year && currentPhase?.period && (\r\n \r\n {`${currentPhase.year}/${parseInt(currentPhase.year) + 1}`}\r\n {` - ${numeral(currentPhase.period).format('o')} ${t('generic.semester', {\r\n textOnly: true,\r\n })}`}\r\n \r\n )}\r\n \r\n }\r\n onClose={() => {\r\n dispatch(setFreeOptionsSearchModalOpening({ modalOpen: false, option: null }));\r\n }}\r\n data-testid=\"schedules_modal_free_list_table\"\r\n >\r\n {}}\r\n onError={(_error) => {}}\r\n onPeriod={(period) => {}}\r\n mandatoryFilters\r\n registrationId={registration}\r\n onSelectRow={(option) => {\r\n handleSelection(option);\r\n }}\r\n />\r\n \r\n\r\n {\r\n return {\r\n title: option.name,\r\n disabled: option.irregular,\r\n info: option.irregular && t('sgh.infoAlertDisabledFreeUcGroup'),\r\n items: option.ucs.map((eachClass, key) => {\r\n const countSlots = eachClass.availableSlots;\r\n const noClasses = !eachClass?.classSchedule?.length;\r\n return {\r\n id: key,\r\n title: eachClass.ucFullName,\r\n selected: option.selected === key,\r\n disabled:\r\n currentPhase?.finished ||\r\n eachClass.disabled ||\r\n ucSelectedOtherOption(option, eachClass, options) ||\r\n eachClass.classSchedule.some(\r\n (classItem) =>\r\n classItem?.allocated?.state === 'assigned' ||\r\n classItem?.allocated?.state === 'automatic'\r\n ),\r\n infoType: noClasses === false ? 'warning' : 'danger',\r\n info: eachClass.disabled\r\n ? t('sgh.infoAlertDisabledMandatory', {\r\n context: `${countSlots}`,\r\n count: countSlots,\r\n })\r\n : noClasses\r\n ? t('sgh.infoAlertDisabledMandatoryNoClasses')\r\n : t('sgh.infoAlertDisabledMandatory', {\r\n context: `${countSlots}`,\r\n count: countSlots,\r\n }),\r\n };\r\n }),\r\n };\r\n })}\r\n onRemove={(optionId, option) => {\r\n handleCheckingIfOptionHasSelectedClasses(optionId, option);\r\n }}\r\n onToggleOption={(optionId, option) => {\r\n if (option?.items?.length === 0) {\r\n dispatch(setFreeOptionsSearchModalOpening({ modalOpen: true, option }));\r\n }\r\n }}\r\n />\r\n \r\n );\r\n};\r\n\r\nexport default FreeOptionsDropdown;\r\n\r\nconst Wrapper = styled.div`\r\n max-width: 280px;\r\n min-width: 150px;\r\n border-top: 1px solid #2eb4bd;\r\n border-left: 1px solid #2eb4bd;\r\n border-right: 1px solid #2eb4bd;\r\n width: 280px;\r\n`;\r\n\r\nconst ModalHeader = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n > div {\r\n margin-bottom: 30px;\r\n }\r\n`;\r\n","/**\r\n * ClassCardDetails container\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport React, { useState, useContext } from 'react';\r\nimport moment from 'moment';\r\n\r\nimport { t } from 'app';\r\n\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faInfoCircle, faAngleUp, faAngleDown, faClone } from '@fortawesome/pro-light-svg-icons';\r\n\r\nimport { Text, Accordion } from '@paco_ua/pacoui';\r\n\r\nimport { GAEvent } from 'utils';\r\n\r\ninterface IProps {\r\n locked?: boolean;\r\n overlaps?: boolean;\r\n finalPhase?: boolean;\r\n ranking: {\r\n total?: number;\r\n above?: number;\r\n below?: number;\r\n freeSlots?: number;\r\n };\r\n classItem: {\r\n ucId: number;\r\n ucInitials: string;\r\n ects?: number;\r\n ucFullName: string;\r\n color?: string;\r\n classType: string;\r\n className: string;\r\n classId: number;\r\n locked: boolean;\r\n classesDays: { startTime: string; endTime: string; periodDays: string[] }[];\r\n allocationStatus?: 'likely' | 'uncertain' | 'unlikely';\r\n automaticAllocationHist?: string;\r\n automaticAllocation?: IAutomaticAllocation[];\r\n allocated: {\r\n state: 'assigned' | 'automatic' | 'notAssigned';\r\n previousTries?:\r\n | {\r\n id: number;\r\n phaseName: number;\r\n name: number;\r\n totalSlots: number;\r\n freeSlots: number;\r\n occupiedSlots: number;\r\n selects: number;\r\n hist: string;\r\n }[]\r\n | null;\r\n };\r\n slots?: number;\r\n };\r\n seriationFinalResult?: {\r\n classId: number;\r\n name: string;\r\n freeSlotsStudent: number;\r\n occupiedSlotsStudent: number;\r\n totalSlots: number;\r\n }[];\r\n}\r\n\r\ninterface IAutomaticAllocation {\r\n classId: number;\r\n className: string;\r\n occupiedSlots: number;\r\n totalSlots: number;\r\n freeSlots: number;\r\n}\r\n\r\nconst ClassCardDetails: React.FC = ({ overlaps, ranking, classItem }) => {\r\n const [seriationPlacedResultOpen, setSeriationPlacedResultOpening] = useState(false);\r\n const [rankingResultOpening, setRankingResultOpening] = useState(false);\r\n\r\n const theme = useContext(ThemeContext);\r\n\r\n const hasRankingProvisory =\r\n ranking.total !== undefined &&\r\n ranking.total !== null &&\r\n ranking.freeSlots !== undefined &&\r\n ranking.freeSlots !== null;\r\n\r\n const getSeriationAllocationHeader = (state: 'assigned' | 'automatic') => {\r\n if (state === 'assigned') {\r\n return (\r\n \r\n {t('sgh.placed')}\r\n \r\n );\r\n } else if (state === 'automatic') {\r\n return (\r\n \r\n \r\n \r\n {t('sgh.automaticSeriation')}\r\n \r\n \r\n );\r\n }\r\n };\r\n\r\n const getAccordion = () => {\r\n return (\r\n \r\n \r\n \r\n );\r\n };\r\n\r\n const getAccordionResults = () => {\r\n return (\r\n \r\n \r\n \r\n );\r\n };\r\n\r\n const getClassDetails = () => {\r\n return (\r\n <>\r\n \r\n \r\n {t('sgh.schedule')}:\r\n \r\n {classItem.classesDays.map((classDay, key) => (\r\n \r\n {/*all period days correspond to same day*/}\r\n {`${moment(classDay.periodDays[0]).format('dddd')} | ${moment(\r\n classDay.startTime,\r\n 'HH:mm:ss'\r\n ).format('HH:mm')} - ${moment(classDay.endTime, 'HH:mm:ss').format('HH:mm')}`}\r\n \r\n ))}\r\n \r\n \r\n \r\n {t('sgh.overlap')}:\r\n \r\n \r\n {overlaps ? t('sgh.classHasOverlaps') : t('sgh.classDoesntHaveOverlaps')}\r\n \r\n \r\n \r\n );\r\n };\r\n\r\n //TODO check this container props+ structure\r\n return (\r\n \r\n \r\n \r\n {`${classItem.ucId} - `}\r\n {classItem.ucInitials}\r\n \r\n\r\n \r\n {classItem.className}\r\n \r\n\r\n \r\n {classItem.ucFullName}\r\n \r\n\r\n {classItem?.allocated?.state === 'notAssigned' &&\r\n (!hasRankingProvisory ? (\r\n \r\n {t('sgh.studentAvailableSlots_plural')}: {classItem.slots}\r\n \r\n ) : (\r\n \r\n {t('sgh.studentAvailableSlots_plural')}: {ranking.freeSlots}\r\n \r\n ))}\r\n\r\n {classItem?.allocated?.state === 'notAssigned' && (\r\n \r\n {getClassDetails()}\r\n {hasRankingProvisory && (\r\n \r\n \r\n \r\n {ranking.total}\r\n \r\n \r\n {t('sgh.studentSelectedClass', { count: ranking.total })}\r\n \r\n \r\n \r\n \r\n {ranking?.above || 0}\r\n \r\n \r\n {t('sgh.studentRankingAbove', { count: ranking?.above || 0 })}\r\n \r\n \r\n \r\n \r\n {ranking?.below || 0}\r\n \r\n \r\n {t('sgh.studentRankingBelow', { count: ranking?.below || 0 })}\r\n \r\n \r\n \r\n \r\n {ranking.freeSlots}\r\n \r\n \r\n {t('sgh.studentAvailableSlots', { count: ranking.freeSlots })}\r\n \r\n \r\n \r\n )}\r\n ,\r\n ],\r\n },\r\n ]}\r\n onOpen={() => {\r\n setRankingResultOpening(!rankingResultOpening);\r\n GAEvent({\r\n category: 'Schedules',\r\n action: 'Opened Accordion',\r\n label: 'ClassCardDetails',\r\n });\r\n }}\r\n />\r\n )}\r\n\r\n {(classItem?.allocated?.state === 'assigned' ||\r\n classItem?.allocated?.state === 'automatic') && (\r\n <>\r\n {getSeriationAllocationHeader(classItem?.allocated?.state)}\r\n \r\n \r\n \r\n \r\n {getClassDetails()}\r\n {classItem.allocated.previousTries && (\r\n \r\n \r\n {t('sgh.ranking')}:\r\n \r\n {classItem.allocated.previousTries.map((result, index) => {\r\n return (\r\n \r\n \r\n \r\n {`${index + 1}. `}\r\n {t('sgh.finalSeriationResult', { class: result.name })}.\r\n \r\n \r\n\r\n \r\n \r\n {result.occupiedSlots}\r\n \r\n \r\n ({t('generic.in')} {result.totalSlots})\r\n \r\n \r\n\r\n \r\n \r\n {result.freeSlots} \r\n {t('sgh.studentAvailableSlots', {\r\n count: result.freeSlots,\r\n })}\r\n \r\n \r\n \r\n \r\n {t('sgh.phase')} {result.phaseName}\r\n \r\n \r\n \r\n );\r\n })}\r\n \r\n )}\r\n ,\r\n ],\r\n },\r\n ]}\r\n onOpen={() => {\r\n setSeriationPlacedResultOpening(!seriationPlacedResultOpen);\r\n }}\r\n />\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n {overlaps ? t('sgh.withOverlap') : t('sgh.withoutOverlap')}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default ClassCardDetails;\r\n\r\ninterface IWrapper {\r\n colorId?: string;\r\n}\r\n\r\nconst Wrapper = styled.div`\r\n background-color: ${({ theme }) => theme.colors.white};\r\n box-shadow: 0px 3px 6px #00000029;\r\n display: inline-flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n align-items: center;\r\n position: relative;\r\n\r\n &:hover {\r\n opacity: 1;\r\n }\r\n\r\n &:after {\r\n width: 10px;\r\n background: ${({ colorId, theme }) => (colorId ? colorId : theme.colors.darkGrey)};\r\n height: 100%;\r\n content: '';\r\n position: absolute;\r\n right: 0;\r\n }\r\n`;\r\n\r\nconst ContentWrapper = styled.div<{ paddingBottom?: boolean }>`\r\n width: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n padding: ${({ paddingBottom }) => (paddingBottom ? `14px 18px 18px` : `14px 18px 0`)};\r\n`;\r\n\r\nconst FooterWrapper = styled.div<{\r\n overlaps: number;\r\n}>`\r\n padding: 11px 30px 11px 20px;\r\n width: 100%;\r\n\r\n ${({ overlaps, theme }) =>\r\n !overlaps\r\n ? `background-color: ${theme.colors.softGrey};`\r\n : `background-color: ${theme.colors.primary};`}\r\n`;\r\n\r\nconst FooterDesc = styled.div<{\r\n overlaps: number;\r\n}>`\r\n font-size: 12px;\r\n letter-spacing: 0px;\r\n\r\n ${({ overlaps, theme }) =>\r\n !overlaps ? `color: ${theme.colors.grey};` : `color: ${theme.colors.white};`}\r\n\r\n svg {\r\n margin-right: 14px;\r\n ${({ overlaps, theme }) =>\r\n !overlaps ? `color: ${theme.colors.plusDarkGrey};` : `color: ${theme.colors.white};`}\r\n }\r\n`;\r\n\r\nconst Row = styled.div<{ spaceBetween?: boolean }>`\r\n display: flex;\r\n align-items: center;\r\n justify-content: ${({ spaceBetween }) => (spaceBetween ? 'space-between' : 'flex-start')};\r\n`;\r\n\r\nconst RankingRow = styled.div`\r\n display: flex;\r\n flex-wrap: wrap;\r\n align-items: center;\r\n margin-left: -10px;\r\n margin-bottom: 18px;\r\n justify-content: space-between;\r\n`;\r\n\r\nconst RankingCol = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n text-align: left;\r\n width: 50%;\r\n padding: 5px 10px;\r\n`;\r\n\r\nconst FullTitle = styled.div``;\r\n\r\nconst UCID = styled.span`\r\n font-size: 15px;\r\n line-height: 18px;\r\n font-weight: ${({ theme }) => theme.weight.light};\r\n color: ${({ theme }) => theme.colors.plusDarkGrey};\r\n`;\r\n\r\nconst UCInitials = styled.span`\r\n font-size: 15px;\r\n line-height: 18px;\r\n color: ${({ theme }) => theme.colors.primary};\r\n`;\r\n\r\nconst ClassName = styled(Text)`\r\n margin-top: 20px;\r\n`;\r\n\r\nconst SlotsNumber = styled(Text)`\r\n margin-top: 6px;\r\n text-transform: capitalize;\r\n`;\r\n\r\nconst UCFullName = styled(Text)`\r\n margin-top: 6px;\r\n`;\r\n\r\nconst Ranking = styled(Text)`\r\n line-height: 30px;\r\n letter-spacing: 0px;\r\n`;\r\n\r\nconst RankingDesc = styled(Text)`\r\n line-height: 16px;\r\n letter-spacing: 0px;\r\n`;\r\n\r\nconst AccordionIconWrapper = styled.div`\r\n display: flex;\r\n justify-content: center;\r\n width: 100%;\r\n padding: 0;\r\n border: none;\r\n background: none;\r\n margin-top: 8px;\r\n margin-bottom: 8px;\r\n\r\n &:hover {\r\n color: ${({ theme }) => theme.colors.primary};\r\n cursor: pointer;\r\n }\r\n\r\n svg {\r\n font-size: 24px;\r\n }\r\n`;\r\n\r\nconst ClassDetailsItem = styled.div`\r\n margin-top: 12px;\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst ClassDetailsItemSchedule = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n > div {\r\n margin-top: 8px;\r\n }\r\n\r\n > div:last-child {\r\n margin-bottom: 16px;\r\n }\r\n`;\r\n\r\nconst SeriationPlacedResultWrapper = styled.div`\r\n width: 100%;\r\n`;\r\n\r\nconst SeriationTriesWrapper = styled.div`\r\n margin-left: 6px;\r\n`;\r\n\r\nconst SeriationPlacedResultHeader = styled.div`\r\n margin-top: 12px;\r\n`;\r\n\r\nconst SeriationPlacedAutomaticResult = styled.div`\r\n color: ${({ theme }) => theme.colors.primary};\r\n font-size: 14px;\r\n font-weight: ${({ theme }) => theme.weight.light};\r\n\r\n > svg {\r\n margin-right: 6px;\r\n }\r\n`;\r\n\r\nconst SeriationPlacedManualResult = styled.div`\r\n color: ${({ theme }) => theme.colors.successGreen};\r\n font-size: 14px;\r\n font-weight: ${({ theme }) => theme.weight.light};\r\n`;\r\n\r\nconst SeriationTriesTextWrapper = styled.div``;\r\n\r\nconst SeriationTriesText = styled.div<{\r\n color?: string;\r\n marginTop?: number;\r\n}>`\r\n font-size: 14px;\r\n font-weight: ${({ theme }) => theme.weight.light};\r\n text-align: left;\r\n ${({ marginTop }) => marginTop && `margin-top: ${marginTop}px;`}\r\n ${({ color }) => color && `color: ${color};`}\r\n`;\r\n\r\nconst SeriationPhaseText = styled.div<{\r\n color?: string;\r\n marginTop?: number;\r\n}>`\r\n font-size: 18px;\r\n font-weight: bold;\r\n text-align: left;\r\n ${({ marginTop }) => marginTop && `margin-top: ${marginTop}px;`}\r\n ${({ color }) => color && `color: ${color};`}\r\n`;\r\n\r\nconst NumberSlotsText = styled.div<{ fontWeight?: string }>`\r\n font-size: 28px;\r\n text-align: left;\r\n margin-top: 17px;\r\n margin-right: 10px;\r\n color: ${({ theme }) => theme.colors.plusDarkGrey};\r\n ${({ theme, fontWeight }) => fontWeight && `font-weight: ${theme.weight[fontWeight]};`}\r\n`;\r\n","/**\r\n * SchedulesSystemHelp container selectors\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getUcs = (state: RootState) => state.Schedules.ucs;\r\n","/**\r\n * SchedulesSystemHelp container\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport React, { useContext, useState } from 'react';\r\n\r\nimport { useSelector } from 'react-redux';\r\nimport * as selectors from './selectors';\r\n\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { useForm } from 'react-hook-form';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faInfoCircle } from '@fortawesome/pro-light-svg-icons';\r\n\r\nimport { Modal, Text, Button, Checkbox } from '@paco_ua/pacoui';\r\n\r\nimport { setStorage, getStorage } from 'utils';\r\n\r\nimport { t } from 'app';\r\n\r\n//import config from 'config'\r\n\r\nconst SchedulesSystemHelp = ({ shouldHide }) => {\r\n const ucs = useSelector(selectors.getUcs);\r\n\r\n const [storeHasPreSelections, setStoreHasPreSelections] = useState(null as null | boolean);\r\n\r\n // Local storage store values as strings\r\n // we're converting it to boolean for easier logical comparisons\r\n const showSchedulesSystemHelp =\r\n getStorage('showSchedulesSystemHelp') === null ? true : getStorage('showSchedulesSystemHelp');\r\n\r\n // The system help is, mainly, to explain why the student has some selections by default\r\n // So, we only should show it if there's at least one 'pre-selection'\r\n const hasPreSelections = () => {\r\n // Find from the previous array if there's, at least, 1 'preselected\r\n if (storeHasPreSelections !== null) {\r\n return storeHasPreSelections;\r\n }\r\n\r\n if (ucs.some((uc) => uc.classSchedule.some((eachClass) => eachClass.selected) === true)) {\r\n setStoreHasPreSelections(true);\r\n return true;\r\n } else {\r\n setStoreHasPreSelections(false);\r\n return false;\r\n }\r\n };\r\n\r\n // Hooks\r\n const theme = useContext(ThemeContext);\r\n const [showModal, setShowingModal] = useState(true);\r\n const { register, handleSubmit } = useForm();\r\n\r\n // Handlers\r\n const handleOnSubmit = handleSubmit(({ dontShowAgain }) => {\r\n if (dontShowAgain) {\r\n setStorage('showSchedulesSystemHelp', false);\r\n }\r\n handleOnClose();\r\n });\r\n\r\n const handleOnClose = () => {\r\n setShowingModal(false);\r\n };\r\n\r\n const getHeader = () => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {t('sgh.systemHelpHeader')}\r\n \r\n \r\n );\r\n };\r\n\r\n const hide =\r\n shouldHide ||\r\n !showSchedulesSystemHelp ||\r\n !hasPreSelections() ||\r\n (showSchedulesSystemHelp && !showModal);\r\n\r\n return (\r\n \r\n handleOnClose()}>\r\n \r\n \r\n {t('sgh.systemHelpBody')}\r\n \r\n\r\n \r\n \r\n \r\n {t('generic.dontShowAnymore', { textOnly: true })}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default SchedulesSystemHelp;\r\n\r\nconst Wrapper = styled.div``;\r\n\r\nconst HelpHeader = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n font-size: 28px;\r\n`;\r\n\r\nconst HelpHeaderIcon = styled.div`\r\n color: ${({ theme }) => theme.colors.primary};\r\n font-size: 60px;\r\n margin-bottom: 40px;\r\n`;\r\n\r\nconst HelpBody = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n margin-top: 60px;\r\n white-space: pre-line;\r\n`;\r\n\r\nconst HelpBodyCheckboxAndButton = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n`;\r\n\r\nconst HelpBodyCheckbox = styled.div`\r\n margin-top: 42px;\r\n`;\r\n\r\nconst HelpBodyButton = styled.div`\r\n margin-top: 42px;\r\n`;\r\n","import React from 'react';\r\nimport styled from 'styled-components';\r\n\r\nimport { t } from 'app';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faInfoCircle, faTablet, faMobile, faDesktop } from '@fortawesome/pro-light-svg-icons';\r\n\r\nimport { Text, Button } from '@paco_ua/pacoui';\r\n\r\ninterface IProps {\r\n onEnter?: () => void;\r\n}\r\n\r\nconst MobileSupportModal: React.FC = ({ onEnter }) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {t('generic.availableTabletDesktopTitle')}\r\n \r\n \r\n \r\n {t('generic.availableTabletDesktopBody')}\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n DESKTOP\r\n \r\n \r\n\r\n \r\n \r\n \r\n TABLET\r\n \r\n \r\n\r\n \r\n \r\n \r\n MOBILE\r\n \r\n \r\n \r\n\r\n {\r\n onEnter && onEnter();\r\n }}\r\n >\r\n {t('generic.enter')}\r\n \r\n\r\n
    \r\n {t('generic.mobileInDevelopment')}\r\n
    \r\n
    \r\n );\r\n};\r\n\r\nconst Wrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: space-between;\r\n text-align: center;\r\n margin-top: 20px;\r\n`;\r\n\r\nconst TitleWarpper = styled.div`\r\n margin: 32px 0px;\r\n`;\r\n\r\nconst FiguresWrapper = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n justify-content: center;\r\n margin: 40px 0px;\r\n`;\r\n\r\nconst InfoIcon = styled.div`\r\n font-size: 60px;\r\n color: ${({ theme }) => theme.colors.primary};\r\n`;\r\n\r\nconst HardwareIcon = styled.div`\r\n font-size: 60px;\r\n margin: 20px 0px;\r\n color: ${({ theme }) => theme.colors.plusDarkGrey};\r\n margin-right: 50px;\r\n\r\n && :nth-child(1) {\r\n margin: 10px 10px;\r\n }\r\n`;\r\n\r\nconst MobileIcon = styled.div`\r\n font-size: 60px;\r\n margin: 20px 0px;\r\n color: ${({ theme }) => theme.colors.darkGrey};\r\n\r\n && :nth-child(1) {\r\n margin: 10px 0px;\r\n }\r\n`;\r\n\r\nconst Footer = styled(Text)`\r\n margin-top: 20px;\r\n`;\r\n\r\nexport default MobileSupportModal;\r\n","/**\r\n * Schedules scene\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport React, { useEffect, useContext } from 'react';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './logic/selectors';\r\nimport { Grid } from 'semantic-ui-react';\r\nimport { withSize } from 'react-sizeme';\r\nimport { useForm } from 'react-hook-form';\r\nimport numeral from 'numeral';\r\n\r\nimport { t } from 'app';\r\n\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport {\r\n faExchange,\r\n faTable,\r\n faList,\r\n faUsers,\r\n faInfoCircle,\r\n} from '@fortawesome/pro-light-svg-icons';\r\nimport { faPen, faTrash } from '@fortawesome/pro-regular-svg-icons';\r\n\r\nimport ScheduleConfirmationPreview from './containers/ScheduleConfirmationPreview';\r\nimport ScheduleGridView from './containers/ScheduleGridView';\r\nimport ScheduleListView from './containers/ScheduleListView';\r\nimport SelectedClasses from './containers/SelectedClasses';\r\nimport MandatoryOptionsDropdown from './containers/MandatoryOptionsDropdown';\r\nimport FreeOptionsDropdown from './containers/FreeOptionsDropdown';\r\nimport ClassCardDetails from './containers/ClassCardDetails';\r\nimport SchedulesSystemHelp from './containers/SchedulesSystemHelp';\r\n\r\nimport CaptionSchedule from 'scenes/Schedules/containers/CaptionSchedule';\r\n\r\nimport StudentRegistrationDropdown from 'shared/containers/StudentRegistrationDropdown';\r\nimport MobileSupportModal from 'shared/containers/MobileSupportModal';\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\n\r\nimport {\r\n Tooltip,\r\n Modal,\r\n MultiToggle,\r\n Button,\r\n Text,\r\n RestrictAccessOverlay,\r\n NoDataMessage,\r\n ResponsiveLayout,\r\n StatusLabel,\r\n FormInput,\r\n} from '@paco_ua/pacoui';\r\n\r\nimport { getCurrentRoute } from 'utils';\r\nimport { getSelectedClasses, compareUcs } from './utils';\r\n\r\ninterface ISchedule {\r\n size: any;\r\n}\r\n\r\nconst Schedules: React.FC = ({ size }) => {\r\n const {\r\n restricted,\r\n restrictionMotive,\r\n currentMode,\r\n scheduleToEdit,\r\n ucs,\r\n originalEditingUcs,\r\n scheduleName,\r\n editScheduleName,\r\n exchangeUcs,\r\n isCurrentPhaseActive,\r\n currentPhase,\r\n period,\r\n periods,\r\n studentTotalChoices,\r\n scheduleType,\r\n confirmationModalIsOpen,\r\n disclaimerMobileModalIsOpen,\r\n loadingRestriction,\r\n loadingSchedule,\r\n savingSchedule,\r\n editingSchedule,\r\n } = useSelector(selectors.getSchedulesSlice);\r\n\r\n const currentRegistrationId = useSelector(selectors.getRegistration);\r\n\r\n const dispatch = useDispatch();\r\n const theme = useContext(ThemeContext);\r\n const ScheduleNameForm = useForm();\r\n\r\n const {\r\n onMount,\r\n getAccessAndUcs,\r\n setPeriod,\r\n setScheduleType,\r\n deleteSchedule,\r\n setScheduleName,\r\n setEditScheduleName,\r\n setDisclaimerMobileModalIsOpen,\r\n handleConfirmationModalOpening,\r\n submitSchedule,\r\n editSchedule,\r\n getStudentTotalChoices,\r\n clearSchedule,\r\n setRestriction,\r\n setLoadingRestriction,\r\n } = actions.Schedules;\r\n\r\n const { navigateTo } = actions.App;\r\n const { showToaster } = actions.Toaster;\r\n\r\n const registrations = useSelector(selectors.getRegistrations);\r\n\r\n const periodButtons = periods.map((periodItem, key) => ({\r\n children: `${t('sgh.period', { textOnly: true })} ${key + 1}`,\r\n onClick: () => dispatch(setPeriod(periodItem)),\r\n selected: period === periodItem,\r\n testId: 'schedules_multitoggle_period',\r\n }));\r\n\r\n const scheduleActionButtons = [\r\n /*...currentPhase?.isFree\r\n ? [\r\n {\r\n children: (\r\n }\r\n />\r\n ),\r\n onClick: () => dispatch(setScheduleType('gridExchange')),\r\n selected: scheduleType === 'gridExchange',\r\n testId: 'schedules_multitoggle_grid_exchange',\r\n },\r\n ]\r\n : */ ...[],\r\n {\r\n children: (\r\n } />\r\n ),\r\n onClick: () => dispatch(setScheduleType('grid')),\r\n selected: scheduleType === 'grid',\r\n testId: 'schedules_multitoggle_grid',\r\n },\r\n {\r\n children: (\r\n } />\r\n ),\r\n onClick: () => dispatch(setScheduleType('list')),\r\n selected: scheduleType === 'list',\r\n testId: 'schedules_multitoggle_list',\r\n },\r\n ];\r\n\r\n const selectedClasses = getSelectedClasses(ucs);\r\n //check if no ucs and no classes at all\r\n const noClasses = !ucs.length || !ucs.some((uc) => !!uc.classSchedule.length);\r\n\r\n // Scene in view mode?\r\n const viewMode = currentMode === 'view';\r\n // Scene in view mode?\r\n const createMode = currentMode === 'create';\r\n // Scene in edit mode?\r\n const editMode = currentMode === 'edit';\r\n // Scene in duplicate mode?\r\n const duplicateMode = currentMode === 'duplicate';\r\n\r\n // Active phase and not finished\r\n const hasActivePhase =\r\n currentPhase?.phase !== null && currentPhase?.phase !== undefined && !currentPhase?.finished && isCurrentPhaseActive;\r\n // Active phase and finished\r\n const hasFinishedActivePhase =\r\n ((currentPhase?.phase === null && !currentPhase?.seriationFinished) ||\r\n (currentPhase?.phase !== null && currentPhase?.phase !== undefined)) &&\r\n currentPhase?.finished;\r\n\r\n // Hooks\r\n useEffect(() => {\r\n dispatch(onMount());\r\n }, [dispatch, onMount]);\r\n\r\n useEffect(() => {\r\n if (registrations !== null && !registrations?.length) {\r\n dispatch(setRestriction(true));\r\n dispatch(setLoadingRestriction(false));\r\n }\r\n }, [registrations]);\r\n\r\n useEffect(() => {\r\n if (currentRegistrationId) {\r\n dispatch(getAccessAndUcs());\r\n }\r\n }, [dispatch, currentRegistrationId]);\r\n\r\n // Hooks\r\n useEffect(() => {\r\n dispatch(getStudentTotalChoices(ucs));\r\n }, [ucs]);\r\n\r\n const getScheduleName = () => {\r\n if (editMode) {\r\n if (scheduleToEdit) {\r\n return scheduleName;\r\n } else {\r\n return t('sgh.mySchedule', { textOnly: true });\r\n }\r\n } else {\r\n return scheduleName;\r\n }\r\n };\r\n\r\n const getScheduleToEditLabel = (label) => {\r\n if (label === 'automatic') {\r\n return (\r\n \r\n \r\n \r\n );\r\n } else if (label === 'assigned') {\r\n return (\r\n \r\n \r\n \r\n );\r\n } else if (label === 'proposal') {\r\n return (\r\n \r\n \r\n \r\n );\r\n } else if (label === 'notAssigned') {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n };\r\n\r\n const getScheduleNameContainer = () => {\r\n if (!currentPhase?.phase) {\r\n if (currentPhase?.hasAllocatedSchedule) {\r\n if (currentPhase?.year) {\r\n return `${t('sgh.mySchedule', { textOnly: true })} ${currentPhase.year}/${\r\n parseInt(currentPhase.year) + 1\r\n }`;\r\n } else {\r\n }\r\n return `${t('sgh.mySchedule', { textOnly: true })}`;\r\n } else {\r\n return t('sgh.mySchedule', { textOnly: true });\r\n }\r\n } else {\r\n if (currentPhase?.finished || viewMode || restricted) {\r\n if (currentPhase?.year) {\r\n return (\r\n <>\r\n {`${t('sgh.mySchedule', { textOnly: true })} ${currentPhase.year}/${\r\n parseInt(currentPhase.year) + 1\r\n }`}{' '}\r\n {` - ${numeral(currentPhase.period).format('o')} ${t('generic.semester', {\r\n textOnly: true,\r\n })}`}\r\n \r\n );\r\n } else {\r\n return `${t('sgh.mySchedule', { textOnly: true })}`;\r\n }\r\n } else if (!currentPhase?.finished) {\r\n if (restricted || noClasses) {\r\n return (\r\n <>\r\n {`${t('sgh.mySchedule', { textOnly: true })} ${\r\n currentPhase.year && `${currentPhase.year}/${parseInt(currentPhase.year) + 1}`\r\n }`}{' '}\r\n {` - ${t('sgh.phase', {\r\n textOnly: true,\r\n })} ${currentPhase?.phase}`}\r\n \r\n );\r\n }\r\n return (\r\n \r\n {editScheduleName && (\r\n {\r\n ScheduleNameForm.handleSubmit((formData) => {\r\n dispatch(setScheduleName(formData.scheduleName));\r\n dispatch(setEditScheduleName(false));\r\n })();\r\n }}\r\n onCancel={() => {\r\n dispatch(setEditScheduleName(false));\r\n }}\r\n error={\r\n ScheduleNameForm.formState.errors.scheduleName &&\r\n ScheduleNameForm.formState.errors.scheduleName.message\r\n }\r\n />\r\n )}\r\n {!editScheduleName && (\r\n <>\r\n dispatch(setEditScheduleName(true))}\r\n borderless\r\n >\r\n \r\n \r\n }\r\n />\r\n {getScheduleName()}\r\n  \r\n {` - ${t('sgh.phase', {\r\n textOnly: true,\r\n })} ${currentPhase?.phase}`}\r\n \r\n )}\r\n\r\n {getScheduleToEditLabel(scheduleToEdit?.state)}\r\n \r\n );\r\n }\r\n }\r\n };\r\n\r\n const handleAddSchedule = () => {\r\n if (!selectedClasses.length) {\r\n dispatch(\r\n showToaster({\r\n title: t('sgh.alertIncompleteSchedule'),\r\n body: t('sgh.alertIncompleteScheduleDetails'),\r\n icon: 'info',\r\n type: 'info',\r\n })\r\n );\r\n } else {\r\n dispatch(handleConfirmationModalOpening(true));\r\n }\r\n };\r\n\r\n const handleModalSubmission = () => {\r\n dispatch(handleConfirmationModalOpening(false));\r\n if (editMode) {\r\n const scheduleIdToEdit = getCurrentRoute().params.id;\r\n dispatch(editSchedule(scheduleIdToEdit));\r\n } else {\r\n dispatch(submitSchedule());\r\n }\r\n };\r\n\r\n const handleModalOnCloseOrOnCancel = () => {\r\n dispatch(handleConfirmationModalOpening(false));\r\n };\r\n\r\n const getRestrictionStatus = () => {\r\n if (restricted) {\r\n return 'restricted';\r\n } else if (restricted === false) {\r\n return 'allowed';\r\n } else {\r\n return '';\r\n }\r\n };\r\n\r\n const checkSubmitButtonDisabled = () => {\r\n if (editMode) {\r\n return compareUcs(ucs, originalEditingUcs);\r\n }\r\n\r\n if (createMode || duplicateMode) {\r\n return !selectedClasses.some((classItem) => classItem?.allocated?.state === 'notAssigned');\r\n }\r\n return false;\r\n };\r\n\r\n const getMainContent = () => {\r\n if (restricted) {\r\n return (\r\n {}}\r\n />\r\n );\r\n }\r\n\r\n if (!loadingRestriction) {\r\n if (!loadingSchedule) {\r\n // VIEW MODE\r\n if (viewMode) {\r\n // ON ACTIVE PHASE, NOT FINISHED AND NO ALLOCATED SCHEDULE\r\n if (hasActivePhase && !currentPhase?.hasAllocatedSchedule) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n if (hasActivePhase && noClasses) {\r\n return (\r\n \r\n );\r\n }\r\n }\r\n\r\n // ALL MODES (VIEW | CREATE | DUPLICATE | EDIT)\r\n // ON ACTIVE PHASE, FINISHED AND SERIATION NOT FINISHED\r\n if (hasFinishedActivePhase && !currentPhase?.seriationFinished) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n // ON ACTIVE PHASE AND SERIATION FISINHED\r\n if (hasFinishedActivePhase && currentPhase?.seriationFinished) {\r\n // SCHEDULE NOT SENT NOT ALLOCATED TO STUDENT\r\n if (!currentPhase?.attemptedSchedule && !currentPhase?.hasAllocatedSchedule) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n // SCHEDULE SENT BUT NOT ALLOCATED\r\n if (currentPhase?.attemptedSchedule && !currentPhase?.hasAllocatedSchedule) {\r\n return (\r\n \r\n );\r\n }\r\n }\r\n\r\n // ON PHASE (END|NOT STARTED) AND NO ALLOCATED SCHEDULE\r\n if (\r\n (currentPhase?.phase === null || currentPhase?.phase === undefined) &&\r\n !currentPhase?.hasAllocatedSchedule\r\n ) {\r\n //ON PHASE END\r\n if (currentPhase?.finished) {\r\n return (\r\n \r\n );\r\n //PHASE DIDN'T START\r\n } else {\r\n return (\r\n \r\n );\r\n }\r\n }\r\n\r\n // ON ACTIVE PHASE, NOT FINISHED AND NO CLASSES\r\n if (hasActivePhase && noClasses && !currentPhase?.isFree) {\r\n return ;\r\n }\r\n\r\n // the student has an empty schedule\r\n if (\r\n selectedClasses.length === 0 &&\r\n !createMode &&\r\n !editMode &&\r\n !duplicateMode &&\r\n !currentPhase?.isFree\r\n ) {\r\n return (\r\n \r\n );\r\n }\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n\r\n {!viewMode && !currentPhase?.isFree && }\r\n\r\n {currentPhase?.isFree && !viewMode && }\r\n\r\n \r\n \r\n \r\n \r\n\r\n {(scheduleType === 'grid' || scheduleType === 'gridExpanded') && (\r\n \r\n )}\r\n {scheduleType === 'list' && }\r\n {(!noClasses || currentPhase?.isFree) && hasActivePhase && (\r\n \r\n \r\n \r\n {scheduleType !== 'list' && (\r\n \r\n )}\r\n \r\n\r\n \r\n {!viewMode && (\r\n \r\n dispatch(clearSchedule())}\r\n data-testid=\"schedules_button_cancel_schedule\"\r\n >\r\n {t('generic.clear')}\r\n \r\n handleAddSchedule()}\r\n data-testid=\"schedules_button_add_schedule\"\r\n >\r\n {editMode\r\n ? t('generic.saveElement', {\r\n what: t('generic.change_plural', { textOnly: true }),\r\n })\r\n : t('generic.addElement', {\r\n what: t('sgh.schedule', { textOnly: true }),\r\n })}\r\n \r\n \r\n )}\r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n }\r\n };\r\n\r\n const getSecondaryContent = () => {\r\n if (restricted || size.width < 1055) {\r\n return null;\r\n }\r\n\r\n //quando fase terminar e enquando nao termina a seriação ele não terá acesso ao horario\r\n if (!viewMode) {\r\n if (!currentPhase?.isFree && noClasses) {\r\n return null;\r\n }\r\n } else {\r\n if (!currentPhase?.hasAllocatedSchedule && selectedClasses.length === 0) {\r\n return null;\r\n }\r\n\r\n if (hasFinishedActivePhase && currentPhase?.seriationFinished === false) {\r\n return null;\r\n }\r\n\r\n if (noClasses) {\r\n return null;\r\n }\r\n }\r\n\r\n return (\r\n <>\r\n {(currentPhase?.isFree || !noClasses) &&\r\n selectedClasses.length === 0 &&\r\n !loadingSchedule &&\r\n !loadingRestriction && (\r\n \r\n \r\n \r\n \r\n \r\n {t('sgh.noSelectedClasses')}\r\n \r\n \r\n )}\r\n {selectedClasses.length > 0 && (\r\n }\r\n title={t('sgh.myClass_plural')}\r\n selected={selectedClasses.length}\r\n seriationFinished={currentPhase?.phase && currentPhase?.finished ? true : false}\r\n total={studentTotalChoices}\r\n >\r\n {selectedClasses\r\n .sort((a, b) => (b.selectedAt || 0) - (a.selectedAt || 0))\r\n .map((selectedClass, index) => {\r\n return (\r\n \r\n );\r\n })}\r\n \r\n )}\r\n \r\n );\r\n };\r\n\r\n return (\r\n <>\r\n {!viewMode && (\r\n handleModalOnCloseOrOnCancel()}\r\n onCancel={() => handleModalOnCloseOrOnCancel()}\r\n onSubmit={() => handleModalSubmission()}\r\n data-testid=\"schedules_modal_confirmation\"\r\n >\r\n \r\n \r\n )}\r\n (\r\n dispatch(setDisclaimerMobileModalIsOpen(false))}\r\n >\r\n dispatch(setDisclaimerMobileModalIsOpen(false))} />\r\n \r\n )}\r\n web={() => null}\r\n />\r\n {!viewMode && hasActivePhase && (\r\n \r\n )}\r\n \r\n {getScheduleNameContainer()}\r\n \r\n }\r\n backButton={!viewMode ? true : false}\r\n />\r\n }\r\n headerRight={\r\n \r\n {(editMode || duplicateMode) && hasActivePhase && !restricted && (\r\n <>\r\n {\r\n dispatch(navigateTo({ key: 'createdSchedules' }));\r\n }}\r\n data-testid=\"schedules_edit_button_cancel\"\r\n >\r\n {t('generic.cancel')}\r\n \r\n {editMode && (\r\n }\r\n onClick={() => dispatch(deleteSchedule(getCurrentRoute().params.id))}\r\n data-testid=\"schedules_edit_button_remove\"\r\n >\r\n {t('sgh.deleteSchedule')}\r\n \r\n )}\r\n \r\n )}\r\n {viewMode &&\r\n hasActivePhase &&\r\n !restricted &&\r\n currentPhase?.hasAllocatedSchedule &&\r\n selectedClasses.length < studentTotalChoices && (\r\n dispatch(navigateTo({ key: 'createSchedule' }))}\r\n data-testid=\"schedules_view_button_complete\"\r\n >\r\n {t('sgh.completeSchedule')}\r\n \r\n )}\r\n \r\n }\r\n subHeader={\r\n \r\n }\r\n mainContent={getMainContent()}\r\n secondaryContent={getSecondaryContent()}\r\n />\r\n \r\n );\r\n};\r\n\r\nexport default withSize()(Schedules);\r\n\r\nconst Title = styled(Text)`\r\n display: flex;\r\n align-items: center;\r\n`;\r\n\r\nconst ScheduleNameWrapper = styled.div`\r\n display: flex;\r\n align-items: center;\r\n`;\r\n\r\nconst Name = styled.span<{ editMode: boolean }>`\r\n margin-left: 0;\r\n`;\r\n\r\nconst Phase = styled.span`\r\n text-transform: lowercase;\r\n`;\r\n\r\nconst TopRightButtonWrapper = styled.div`\r\n display: flex;\r\n justify-content: flex-end;\r\n\r\n button:not(:last-child) {\r\n margin-right: 20px;\r\n }\r\n`;\r\n\r\nconst TopScheduleControllers = styled.div`\r\n width: 100%;\r\n display: flex;\r\n position: relative;\r\n margin-bottom: 36px;\r\n\r\n &:after {\r\n content: '';\r\n width: 100%;\r\n position: absolute;\r\n bottom: -1px;\r\n right: 0;\r\n border-top: 1px solid ${({ theme }) => theme.colors.primary};\r\n }\r\n`;\r\n\r\nconst PeriodButtonsWrapper = styled.div``;\r\n\r\nconst ScheduleActionButtonsWrapper = styled.div`\r\n display: flex;\r\n justify-content: flex-end;\r\n align-items: flex-end;\r\n flex: 1;\r\n`;\r\n\r\nconst CaptionAndActionButtons = styled.div<{ padding: number }>`\r\n padding-left: ${({ padding }) => padding}px;\r\n`;\r\n\r\nconst ActionButtons = styled.div`\r\n display: flex;\r\n justify-content: flex-end;\r\n align-items: flex-end;\r\n\r\n > button:first-child {\r\n margin-right: 22px;\r\n }\r\n`;\r\n\r\nconst NoSelectedClassesHelp = styled.div`\r\n padding: 24px 22px;\r\n background-color: ${({ theme }) => theme.colors.white};\r\n border: 1px solid ${({ theme }) => theme.colors.primary};\r\n box-shadow: ${({ theme }) => theme.shadows.medium};\r\n white-space: pre-line;\r\n`;\r\n\r\nconst NoSelectedClassesHelpIcon = styled.div`\r\n margin-bottom: 22px;\r\n font-size: 22px;\r\n color: ${({ theme }) => theme.colors.primary};\r\n`;\r\n\r\nconst EditScheduleLabel = styled.div`\r\n margin-left: 12px;\r\n`;\r\n\r\nconst StudentRegistrationDropdownWrapper = styled.div<{ hidden?: boolean }>`\r\n opacity: ${({ hidden }) => (hidden ? '0' : '1')};\r\n`;\r\n","/**\r\n * Schedules scene\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport React from 'react';\r\n\r\n//import { ResponsiveLayout } from '@paco_ua/pacoui';\r\n\r\n//import SchedulesMobile from './mobile';\r\nimport SchedulesWeb from './web';\r\n\r\nconst Schedules: React.FC = () => {\r\n return ;\r\n //return ;\r\n};\r\n\r\nexport default Schedules;\r\n","/**\r\n * FreeOptionsList scene selectors\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getRegistration = (state: RootState) => state.StudentRegistrationDropdown.registration;\r\nexport const getFreeOptionsListSlice = (state: RootState) => state.FreeOptionsList;\r\nexport const getCurrentLocale = (state: RootState) => state.App.currentLocale;\r\n","/**\r\n * FreeOptionsList scene\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport React from 'react';\r\nimport styled from 'styled-components';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\n\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\n\r\nimport { Text } from '@paco_ua/pacoui';\r\n\r\nimport numeral from 'numeral';\r\n\r\nimport FreeOptionsTable from 'scenes/Schedules/containers/FreeOptionsTable';\r\n\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './logic/selectors';\r\n\r\n//import config from 'config'\r\n\r\nconst FreeOptionsList = ({ t }) => {\r\n const { setError, setLoading, setPeriod } = actions.FreeOptionsList;\r\n\r\n const dispatch = useDispatch();\r\n\r\n const { loading, error, year, semester } = useSelector(selectors.getFreeOptionsListSlice);\r\n\r\n return (\r\n }\r\n subHeader={\r\n year !== null &&\r\n semester !== null && (\r\n \r\n {`${year}/${year + 1} - ${`${numeral(semester).format('o')}`} ${t('sgh.semester', {\r\n textOnly: true,\r\n })}`}\r\n \r\n )\r\n }\r\n mainContent={\r\n \r\n {\r\n dispatch(setLoading(_loading));\r\n }}\r\n onError={(_error) => {\r\n dispatch(setError(_error));\r\n }}\r\n onPeriod={(period) => {\r\n dispatch(setPeriod(period));\r\n }}\r\n />\r\n \r\n }\r\n />\r\n );\r\n};\r\n\r\nexport default FreeOptionsList;\r\n\r\nconst ContentWrapper = styled.div`\r\n position: relative;\r\n height: 100%;\r\n display: flex;\r\n flex: 1;\r\n flex-direction: column;\r\n`;\r\n","/**\r\n * SchedulesHome scene logic selectors\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getSchedulesHomeSlice = (state: RootState) => state.SchedulesHome;\r\n","/**\r\n * Home scene\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\nimport React, { useEffect, useContext, useMemo } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faInfoCircle, faQuestionCircle } from '@fortawesome/pro-light-svg-icons';\r\nimport Masonry, { ResponsiveMasonry } from 'react-responsive-masonry';\r\n\r\nimport moment from 'moment';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\n\r\nimport { Button, Text, Card, StatusLabel } from '@paco_ua/pacoui';\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport * as selectors from './logic/selectors';\r\n\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\n\r\nimport AuthWrapper from 'shared/components/AuthWrapper';\r\n\r\nconst SchedulesHome = ({ t, size }) => {\r\n const { phases, loadingPhases } = useSelector(selectors.getSchedulesHomeSlice);\r\n\r\n const { onMount } = actions.SchedulesHome;\r\n const { navigateTo } = actions.App;\r\n const dispatch = useDispatch();\r\n\r\n const theme = useContext(ThemeContext);\r\n\r\n useEffect(() => {\r\n dispatch(onMount());\r\n }, []);\r\n\r\n const getPhaseDetails = (type: 'normal' | 'queue' | 'automatic' | 'manual') => {\r\n switch (type) {\r\n case 'normal':\r\n return (\r\n <>\r\n \r\n {t('sgh.homeDetailsPhase1and2')}\r\n \r\n \r\n );\r\n case 'queue':\r\n return (\r\n <>\r\n \r\n {t('sgh.homeDetailsPhaseQueue')}\r\n \r\n \r\n );\r\n case 'automatic':\r\n return (\r\n <>\r\n \r\n {t('sgh.homeDetailsPhaseAutomatic')}\r\n \r\n \r\n );\r\n case 'manual':\r\n return (\r\n <>\r\n \r\n {t('sgh.homeDetailsPhaseManual')}\r\n \r\n \r\n );\r\n }\r\n };\r\n\r\n const getPhaseCardSubTitle = (\r\n type: 'normal' | 'queue' | 'automatic' | 'manual',\r\n name: number\r\n ) => {\r\n switch (type) {\r\n case 'normal':\r\n return name === 1 ? t('sgh.homeSchedulesSelection') : t('sgh.homeSchedulesSelection_fase2');\r\n case 'queue':\r\n return t('sgh.homeFreeOptionsSignUp');\r\n case 'automatic':\r\n return t('sgh.homeAutomaticAssignment');\r\n case 'manual':\r\n return t('sgh.homeManualAssignment');\r\n }\r\n };\r\n\r\n const getPhaseLabel = (type: 'active' | 'finished' | 'toOpen') => {\r\n switch (type) {\r\n case 'active':\r\n return (\r\n \r\n );\r\n case 'toOpen':\r\n return ;\r\n case 'finished':\r\n return ;\r\n }\r\n };\r\n\r\n const shoulShowMySchedules = useMemo(() => {\r\n //has had finishedPhase or has active phase\r\n return (\r\n phases.some((phase) => phase.finished === true) ||\r\n phases.some((phase) => phase.isActive === true)\r\n );\r\n }, [phases]);\r\n\r\n return (\r\n }\r\n expanded\r\n headerRight={\r\n \r\n {\r\n dispatch(navigateTo({ key: 'schedulesGuide' }));\r\n }}\r\n leftIcon={}\r\n primary\r\n >\r\n {t('generic.help', { textOnly: true })}\r\n \r\n\r\n \r\n <>\r\n {phases?.some((phase) => phase?.type === 'queue' && phase?.isActive) && (\r\n {\r\n dispatch(navigateTo({ key: 'createSchedule' }));\r\n }}\r\n primary\r\n >\r\n {t('sgh.freeOptions', { textOnly: true })}\r\n \r\n )}\r\n \r\n \r\n\r\n {shoulShowMySchedules && (\r\n \r\n {\r\n dispatch(navigateTo({ key: 'createdSchedules' }));\r\n }}\r\n primary\r\n >\r\n {t('sgh.myScheduleButton')}\r\n \r\n \r\n )}\r\n \r\n }\r\n subHeader={\r\n phases.some((phase) => phase.isActive) ? (\r\n \r\n {`${t('sgh.phase', { textOnly: true })} ${\r\n phases.find((phase) => phase.isActive)?.name\r\n }`}\r\n \r\n ) : (\r\n \r\n {phases[phases.length - 1]\r\n ? `${t('sgh.mySchedule', { textOnly: true })} ${phases[phases.length - 1].year}/${\r\n phases[phases.length - 1].year + 1\r\n }`\r\n : `${t('sgh.mySchedule', { textOnly: true })}`}\r\n \r\n )\r\n }\r\n mainContent={\r\n <>\r\n \r\n \r\n {t('sgh.homePresentation1')}\r\n \r\n \r\n {t('sgh.homePresentation2')}\r\n \r\n \r\n\r\n \r\n {\r\n //setting this verification because of respnsive masonry Bug\r\n !loadingPhases && (\r\n \r\n \r\n {phases.map((phase, key) => {\r\n const phaseType = phase.type;\r\n\r\n const phaseLabel = phase.finished\r\n ? 'finished'\r\n : phase.isActive\r\n ? 'active'\r\n : 'toOpen';\r\n\r\n return (\r\n \r\n \r\n {t('sgh.details')} :\r\n \r\n\r\n \r\n {getPhaseDetails(phaseType)}\r\n \r\n \r\n }\r\n >\r\n \r\n \r\n }\r\n color=\"primary\"\r\n size=\"article\"\r\n weight=\"medium\"\r\n >\r\n {getPhaseCardSubTitle(phaseType,phase.name)}\r\n \r\n \r\n\r\n \r\n \r\n {t('sgh.homePhaseBegin')}: \r\n \r\n {t('generic.dateTime', {\r\n date: moment(phase.beginDate).format('DD/MM/YYYY'),\r\n time: moment(phase.beginDate).format('HH:mm'),\r\n })}{' '}\r\n \r\n \r\n\r\n \r\n {t('sgh.homePhaseEnd')}: \r\n \r\n {t('generic.dateTime', {\r\n date: moment(phase.endDate).format('DD/MM/YYYY'),\r\n time: moment(phase.endDate).format('HH:mm'),\r\n })}{' '}\r\n \r\n \r\n\r\n \r\n {t('sgh.homePhaseAllocations')}: \r\n \r\n {t('generic.dateTime', {\r\n date: moment(phase.seriationDate).format('DD/MM/YYYY'),\r\n time: moment(phase.seriationDate).format('HH:mm'),\r\n })}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n })}\r\n \r\n \r\n )\r\n }\r\n\r\n \r\n \r\n \r\n \r\n {`${t('sgh.homeMoreIngoAtSga', { textOnly: true })}`}\r\n \r\n  \r\n \r\n {t('links.schedulesHome', { textOnly: true })}\r\n \r\n \r\n\r\n \r\n \r\n {`${t('sgh.homeHelpGuide', { textOnly: true })}`}\r\n \r\n  \r\n {\r\n dispatch(navigateTo({ key: 'schedulesGuide' }));\r\n }}\r\n target=\"_blank\"\r\n >\r\n {t('sgh.homeHelpGuideView', { textOnly: true })}\r\n \r\n \r\n\r\n {/*\r\n \r\n {`${t('sgh.homeHelpPersonalizedSupport', { textOnly: true })}`}\r\n \r\n  \r\n \r\n {t('links.helpdesk', { textOnly: true })}\r\n \r\n */}\r\n\r\n \r\n \r\n {`${t('sgh.homeHelpTechnicalSupport', { textOnly: true })}`}\r\n \r\n  \r\n \r\n {t('sgh.accessForm')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n />\r\n );\r\n};\r\n\r\nexport default SchedulesHome;\r\n\r\nconst HeaderButton = styled.div`\r\n display: flex;\r\n justify-content: flex-end;\r\n\r\n button:not(:last-child) {\r\n margin-right: 20px;\r\n }\r\n`;\r\n\r\nconst ContentWrapper = styled.div`\r\n margin-top: 44px;\r\n`;\r\n\r\nconst PresentationWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n > div:not(:last-child) {\r\n margin-bottom: 4px;\r\n }\r\n`;\r\n\r\nconst QuestionMarkIcon = styled(FontAwesomeIcon)`\r\n font-size: 18px;\r\n`;\r\n\r\nconst LinksWrapper = styled.div`\r\n margin-top: 78px;\r\n`;\r\n\r\nconst Links = styled.div`\r\n overflow-wrap: anywhere;\r\n\r\n > div:not(:last-child) {\r\n margin-bottom: 16px;\r\n }\r\n`;\r\n\r\nconst LinkArea = styled.div``;\r\n\r\nconst Link = styled(Text)`\r\n /*text-decoration: underline;*/\r\n`;\r\n\r\nconst PhaseDetails = styled.div``;\r\n\r\nconst PhaseDetailsHeader = styled.div`\r\n margin-bottom: 26px;\r\n`;\r\n\r\nconst PhaseDetailsContent = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n > div:not(:last-child) {\r\n margin-bottom: 8px;\r\n }\r\n`;\r\n\r\nconst PhaseDetailsExpanded = styled.div``;\r\n\r\nconst PhaseDetailsExpandedHeader = styled(Text)`\r\n margin-bottom: 18px;\r\n`;\r\n\r\nconst PhaseDetailsExpandedContent = styled.div`\r\n > div:not(:last-child) {\r\n margin-bottom: 8px;\r\n }\r\n`;\r\n\r\nconst Icon = styled(FontAwesomeIcon)`\r\n font-size: 20px;\r\n`;\r\n\r\nconst FreeOptionsButton = styled(Button)`\r\n padding: 0px 12px;\r\n`;\r\n","/**\r\n * SchedulesGuide scene logic selectors\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getAppSlice = (state: RootState) => state.App;\r\nexport const getSchedulesGuideSlice = (state: RootState) => state.SchedulesGuide;\r\n","/**\r\n * SchedulesGuide scene\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\nimport React, { useEffect, useContext } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\n\r\nimport { Text } from '@paco_ua/pacoui';\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport * as selectors from './logic/selectors';\r\n\r\nimport MarkdownRenderer from 'shared/containers/MarkdownRenderer';\r\nimport Header from 'shared/containers/TitleHeader';\r\n\r\nimport { getCurrentRoute } from 'utils';\r\n\r\nconst SchedulesGuide = ({ t, id }) => {\r\n const { markdown, loadingMarkdown } = useSelector(selectors.getSchedulesGuideSlice);\r\n const { user } = useSelector(selectors.getAppSlice);\r\n\r\n const { onMount, onUnmount } = actions.SchedulesGuide;\r\n const { navigateTo } = actions.App;\r\n const dispatch = useDispatch();\r\n\r\n const theme = useContext(ThemeContext);\r\n\r\n useEffect(() => {\r\n dispatch(onMount(id));\r\n\r\n return () => {\r\n dispatch(onUnmount());\r\n };\r\n }, [dispatch, onMount, onUnmount]);\r\n\r\n //markdown renderer respects already pagestructure\r\n return (\r\n ,\r\n subHeader: (\r\n \r\n {id ? t(`routes.${id}`) : t('routes.schedulesSelection')}\r\n \r\n ),\r\n }}\r\n value={markdown?.value || ''}\r\n valueEn={markdown?.valueEn || ''}\r\n valueCh={markdown?.valueCh || ''}\r\n />\r\n );\r\n};\r\n\r\nexport default SchedulesGuide;\r\n","/**\r\n * AllSchedules scene\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\nimport React from 'react';\r\nimport styled from 'styled-components';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faAngleRight } from '@fortawesome/pro-light-svg-icons';\r\n\r\nimport { Button, NoDataMessage } from '@paco_ua/pacoui';\r\n\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\n\r\nconst AllSchedules = ({ t }) => {\r\n return (\r\n }\r\n expanded\r\n mainContent={\r\n \r\n \r\n\r\n {\r\n window.open(t('links.schedules', { textOnly: true }), '_blank');\r\n }}\r\n rightIcon={}\r\n full\r\n primary\r\n >\r\n {t('sgh.buttonAllSchedulesLink')}\r\n \r\n \r\n }\r\n />\r\n );\r\n};\r\n\r\nexport default AllSchedules;\r\n\r\nconst CenteredWrapper = styled.div`\r\n display: flex;\r\n flex-grow: 1;\r\n flex-direction: column;\r\n justify-content: center;\r\n align-items: center;\r\n height: 100%;\r\n\r\n > div {\r\n flex: 0 !important;\r\n }\r\n\r\n > button {\r\n margin-top: 32px;\r\n }\r\n`;\r\n","/**\r\n * NewCertificateSelectRegistration container logic selectors\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getRegistrations = (state: RootState) => state.App.user.registrations;\r\nexport const getNewCertificateData = (state: RootState) => state.NewCertificate.certificateData;\r\nexport const getNewCertificateSlice = (state: RootState) => state.NewCertificate;\r\n","/**\r\n * NewCertificateSelectRegistration container\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport React, { useContext, useEffect } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { t } from 'app';\r\n\r\nimport moment from 'moment';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './selectors';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faEllipsisH } from '@fortawesome/pro-regular-svg-icons';\r\n\r\nimport { Grid } from 'semantic-ui-react';\r\nimport { AnimatedBackground, Text, Segment, Table, StatusLabel } from '@paco_ua/pacoui';\r\n\r\nconst NewCertificateSelectRegistration = () => {\r\n const theme = useContext(ThemeContext);\r\n\r\n const { setCertificateData, setActiveRegistration } = actions.NewCertificate;\r\n\r\n const registrations = useSelector(selectors.getRegistrations);\r\n const newCertificateData = useSelector(selectors.getNewCertificateData);\r\n const { loadingStatus, errorStatus } = useSelector(selectors.getNewCertificateSlice);\r\n\r\n const dispatch = useDispatch();\r\n\r\n //to populate active registration input\r\n useEffect(() => {\r\n dispatch(setActiveRegistration());\r\n }, [registrations]);\r\n\r\n const getEligibilityColor = (status: number) => {\r\n if (status === 100) {\r\n return theme.colors.dangerRed;\r\n } else if (status === 1 || status === 2) {\r\n return theme.colors.successGreen;\r\n } else if (status === 25 || status === 50) {\r\n return theme.colors.decisionYellow;\r\n } else if (status === -1) {\r\n return theme.colors.grey;\r\n }\r\n };\r\n\r\n const structure = {\r\n header: {\r\n type: 'columnTitle',\r\n titles: [],\r\n },\r\n rows:\r\n !registrations || !registrations.length\r\n ? []\r\n : registrations\r\n //.filter((registration) => registration.registrationState === 'ACTIVO')\r\n .map((registration) => {\r\n return {\r\n rowProps: {\r\n color: theme.colors.white,\r\n navigatable: true,\r\n onClick: () => {\r\n dispatch(\r\n setCertificateData({\r\n ...newCertificateData,\r\n registrationId: registration.registrationId,\r\n })\r\n );\r\n },\r\n },\r\n cells: [\r\n {\r\n cellProps: {\r\n width: 12,\r\n style: {\r\n height: 'auto',\r\n },\r\n },\r\n content: (\r\n \r\n {\r\n dispatch(\r\n // set initial newCertificateData value as specified in the slice\r\n setCertificateData({\r\n ...newCertificateData,\r\n registrationId: registration.registrationId,\r\n })\r\n );\r\n }}\r\n checked={\r\n newCertificateData.registrationId === registration.registrationId\r\n }\r\n />\r\n \r\n \r\n {registration.courseCode && registration.courseName ? (\r\n `${registration.courseCode} - ${registration.courseName}`\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n {`\\n${registration.branchName}\\n`}\r\n \r\n \r\n {registration.eligibilityState ||\r\n registration.registrationState === 'activo' ? (\r\n \r\n ) : registration.registrationState === 'comdiploma' ||\r\n registration.registrationState === 'terminado' ? (\r\n \r\n ) : (\r\n
    \r\n )}\r\n \r\n {`${registration.academicYear} `}\r\n \r\n \r\n {`${t('applications.requestFirstStepTableRegistrationDate', {\r\n textOnly: true,\r\n })}: ${\r\n registration.registrationDate\r\n ? moment(registration.registrationDate,'DD/MM/YYYY').format('DD/MM/YYYY')\r\n : null\r\n }\r\n `}\r\n \r\n \r\n \r\n \r\n ),\r\n },\r\n ],\r\n };\r\n }),\r\n };\r\n\r\n if (loadingStatus.loading || errorStatus.errLoading) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n } else {\r\n return (\r\n \r\n \r\n \r\n \r\n {t('certificates.requestFirstStepTitle')}\r\n \r\n \r\n {t('certificates.requestFirstStepDescription')}\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n};\r\n\r\nexport default NewCertificateSelectRegistration;\r\n\r\nconst LoadingWrapper = styled.div`\r\n width: 100%;\r\n height: 300px;\r\n\r\n margin-top: 32px;\r\n\r\n * {\r\n margin: 8px 0px;\r\n }\r\n`;\r\n\r\nconst TableWrapper = styled.div`\r\n margin-top: 32px;\r\n overflow: auto;\r\n\r\n &&& th {\r\n padding-top: 0px !important;\r\n padding-bottom: 0px !important;\r\n height: 61px;\r\n }\r\n\r\n &&& td {\r\n padding-top: 0px !important;\r\n padding-bottom: 0px !important;\r\n height: 76px;\r\n }\r\n`;\r\n\r\nconst TitleWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst DescriptionText = styled(Text)`\r\n margin-top: 8px;\r\n`;\r\n\r\nconst TableRowWrapper = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: flex-start;\r\n align-items: center;\r\n gap: 1.25rem;\r\n width: 100%;\r\n height: 100%;\r\n`;\r\n\r\nconst TableRowInfo = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: flex-start;\r\n width: fit-content;\r\n white-space: break-space;\r\n gap: 0.375rem;\r\n padding: 0.5rem 0rem;\r\n\r\n span {\r\n display: inline-flex;\r\n align-items: center;\r\n gap: 0.625rem;\r\n\r\n >div: first-child {\r\n max-width: unset;\r\n }\r\n }\r\n\r\n & div {\r\n :hover {\r\n cursor: pointer;\r\n }\r\n }\r\n`;\r\n\r\nconst Input = styled.input`\r\n /* hide default inner circle */\r\n appearance: none;\r\n\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n\r\n cursor: pointer;\r\n width: 20px;\r\n height: 20px;\r\n border: 1px solid ${({ theme }) => theme.colors.regularGrey};\r\n border-radius: 50%;\r\n outline: none;\r\n\r\n :hover {\r\n border: 1px solid ${({ theme }) => theme.colors.primary};\r\n opacity: 1;\r\n }\r\n\r\n /* inner circle */\r\n :before {\r\n content: '';\r\n display: inline-block;\r\n width: 10px;\r\n height: 10px;\r\n border-radius: 50%;\r\n vertical-align: middle;\r\n }\r\n\r\n :checked:before {\r\n background: ${({ theme }) => theme.colors.primary};\r\n }\r\n\r\n :checked {\r\n border: 1px solid ${({ theme }) => theme.colors.primary} !important;\r\n }\r\n`;\r\n\r\nconst StatusLabelWrapper = styled.div`\r\n width: 100%;\r\n display: flex;\r\n justify-content: center;\r\n & div {\r\n :hover {\r\n cursor: pointer;\r\n }\r\n }\r\n`;\r\n","/**\r\n * NewCertificateSelectType container logic selectors\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getLoading = (state: RootState) => state.NewApplication.loadingStatus.loading;\r\nexport const getNewCertificateSlice = (state: RootState) => state.NewCertificate;\r\n","/**\r\n * NewCertificateSelectType container\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport React, { useContext, useEffect, useState } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { t } from 'app';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faAngleDown, faInfoCircle } from '@fortawesome/pro-light-svg-icons';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './selectors';\r\n\r\nimport { Grid } from 'semantic-ui-react';\r\nimport { AnimatedBackground, Text, Segment, Accordion, SearchBox, Dropdown } from '@paco_ua/pacoui';\r\n\r\nimport config from 'config';\r\n\r\nimport API from 'api';\r\n\r\nconst NewCertificateSelectType = () => {\r\n const theme = useContext(ThemeContext);\r\n\r\n const API_SEC_VIRTUAL = config.API_WSO2 + config.API_SEC_VIRTUAL_PATH;\r\n\r\n const {\r\n filterParams,\r\n certificateTypes,\r\n selectedCertificateType,\r\n loadingStatus,\r\n errorStatus,\r\n } = useSelector(selectors.getNewCertificateSlice);\r\n\r\n const {\r\n setSearchFilter,\r\n setTypeFilter,\r\n getCertificateTypes,\r\n resetSelectedCertificateType,\r\n setSelectedCertificatePreviewUrl,\r\n setSelectedCertificateType,\r\n } = actions.NewCertificate;\r\n\r\n const dispatch = useDispatch();\r\n\r\n useEffect(() => {\r\n dispatch(getCertificateTypes(filterParams));\r\n }, [filterParams]);\r\n\r\n const [initialLoading, setInitialLoading] = useState(true);\r\n\r\n useEffect(() => {\r\n if (!loadingStatus.tabLoading && initialLoading) {\r\n setInitialLoading(false);\r\n }\r\n }, [loadingStatus.tabLoading]);\r\n\r\n const getAccordionParent = (title: string) => {\r\n return (\r\n \r\n {title}\r\n \r\n \r\n );\r\n };\r\n\r\n const [loadingModels, setLoadingModels] = useState({});\r\n\r\n const getAccordionChild = (\r\n themeGroup: string,\r\n title: string,\r\n description: string,\r\n code: string,\r\n previewUrl: string,\r\n price: number,\r\n index: number,\r\n id: number | null\r\n ) => {\r\n return (\r\n {\r\n dispatch(setSelectedCertificatePreviewUrl(previewUrl));\r\n dispatch(\r\n setSelectedCertificateType({\r\n theme: themeGroup,\r\n code: code,\r\n name: title,\r\n price: price,\r\n id: id,\r\n description: description,\r\n })\r\n );\r\n }}\r\n >\r\n {\r\n dispatch(setSelectedCertificatePreviewUrl(previewUrl));\r\n dispatch(\r\n setSelectedCertificateType({\r\n theme: themeGroup,\r\n code: code,\r\n name: title,\r\n price: price,\r\n id: id,\r\n description: description,\r\n })\r\n );\r\n }}\r\n checked={selectedCertificateType.code === code}\r\n />\r\n \r\n \r\n \r\n {title}\r\n \r\n {description && description !== '' && (\r\n \r\n {description}\r\n \r\n )}\r\n \r\n \r\n {previewUrl !== '' && (\r\n \r\n {\r\n if (!loadingModels[`${code}-${index}`] && previewUrl !== '') {\r\n setLoadingModels((currentValues) => {\r\n return { ...currentValues, [`${code}-${index}`]: true };\r\n });\r\n try {\r\n API.files.getFileOnTab\r\n .call(previewUrl)\r\n .then((value) => {\r\n if (value) {\r\n setLoadingModels((currentValues) => {\r\n return { ...currentValues, [`${code}-${index}`]: false };\r\n });\r\n } else {\r\n setLoadingModels((currentValues) => {\r\n return { ...currentValues, [`${code}-${index}`]: false };\r\n });\r\n }\r\n })\r\n .catch((err) => {\r\n setLoadingModels((currentValues) => {\r\n return { ...currentValues, [`${code}-${index}`]: false };\r\n });\r\n dispatch(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.general_errorLoadingFile'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n });\r\n } catch (e) {\r\n setLoadingModels((currentValues) => {\r\n return { ...currentValues, [`${code}-${index}`]: false };\r\n });\r\n dispatch(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.general_errorLoadingFile'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n }}\r\n >\r\n {t('certificates.visualizeModel')}\r\n \r\n \r\n )}\r\n \r\n \r\n \r\n {`${price.toFixed(2)}€`}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n };\r\n\r\n const structure = Object.keys(certificateTypes.data).map((type) => {\r\n return {\r\n parent: getAccordionParent(certificateTypes.data[type][0].theme),\r\n children: certificateTypes.data[type].map((t, index) =>\r\n getAccordionChild(\r\n t.theme,\r\n t.type,\r\n t.description,\r\n t.code,\r\n `${API_SEC_VIRTUAL}${t.previewUrl}`,\r\n t.price,\r\n index,\r\n t.id\r\n )\r\n ),\r\n };\r\n });\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n {t('certificates.requestSecondStepTitle')}\r\n \r\n \r\n \r\n {t('certificates.requestSecondStepDescription')}\r\n \r\n \r\n \r\n\r\n {!loadingStatus.tabLoading && !errorStatus.errLoadingCertificateList && !initialLoading && (\r\n \r\n {\r\n dispatch(setSearchFilter(value));\r\n dispatch(resetSelectedCertificateType());\r\n }}\r\n />\r\n {\r\n dispatch(setTypeFilter(value));\r\n dispatch(resetSelectedCertificateType());\r\n }}\r\n onClear={() => {\r\n dispatch(setTypeFilter(''));\r\n dispatch(resetSelectedCertificateType());\r\n }}\r\n />\r\n \r\n )}\r\n\r\n {(loadingStatus.tabLoading || errorStatus.errLoadingCertificateList) && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {!loadingStatus.tabLoading &&\r\n !errorStatus.errLoadingCertificateList &&\r\n structure.length > 0 && (\r\n \r\n \r\n \r\n )}\r\n\r\n {!loadingStatus.tabLoading &&\r\n !errorStatus.errLoadingCertificateList &&\r\n structure.length === 0 && (\r\n \r\n \r\n \r\n \r\n \r\n {t('certificates.noCertificatesFound', { textOnly: true })}\r\n \r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default NewCertificateSelectType;\r\n\r\nconst Icon = styled.div`\r\n font-size: 60px;\r\n color: ${({ theme }) => theme.colors.primary};\r\n`;\r\n\r\nconst TitleDescriptionWrapper = styled.div`\r\n margin-top: 8px;\r\n line-height: 1.3;\r\n`;\r\n\r\nconst MessageNoCertificates = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n text-align: center;\r\n justify-content: center;\r\n margin-top: 60px;\r\n margin-bottom: 20px;\r\n\r\n div:nth-child(2) {\r\n margin-top: 16px;\r\n }\r\n`;\r\n\r\nconst LoadingWrapper = styled.div`\r\n width: 100%;\r\n height: 300px;\r\n\r\n margin-top: 32px;\r\n\r\n * {\r\n margin: 8px 0px;\r\n }\r\n`;\r\n\r\nconst AccordionWrapper = styled.div`\r\n margin-top: 32px;\r\n`;\r\n\r\nconst AccordionParent = styled.div`\r\n height: 52px;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n padding: 0 16px;\r\n color: ${({ theme }) => theme.colors.plusDarkGrey};\r\n background-color: ${({ theme }) => theme.colors.lightGrey};\r\n border-bottom: 1px solid ${({ theme }) => theme.colors.softGrey};\r\n border-right: 1px solid ${({ theme }) => theme.colors.softGrey};\r\n border-left: 1px solid ${({ theme }) => theme.colors.softGrey};\r\n border-top: 2px solid ${({ theme }) => theme.colors.darkGrey};\r\n\r\n svg {\r\n font-size: 24px;\r\n }\r\n`;\r\n\r\nconst AccordionChild = styled.div`\r\n min-height: 69px;\r\n display: flex;\r\n align-items: center;\r\n padding: 0 16px;\r\n border: 1px solid ${({ theme }) => theme.colors.softGrey};\r\n cursor: pointer;\r\n\r\n :hover {\r\n background-color: ${({ theme }) => theme.colors.softGrey};\r\n }\r\n`;\r\n\r\nconst AccordionChildDescription = styled.div`\r\n display: flex;\r\n flex-grow: 1;\r\n margin-left: 24px;\r\n margin-top: 10px;\r\n margin-bottom: 10px;\r\n justify-content: space-between;\r\n`;\r\n\r\nconst AccordionChildColumn = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n padding-right: 16px;\r\n`;\r\n\r\nconst VerticalSeparator = styled.div`\r\n border-left: 1px solid ${({ theme }) => theme.colors.darkGrey};\r\n width: 0px;\r\n margin-left: 20px;\r\n margin-right: 11px;\r\n`;\r\n\r\nconst ModelViewColumn = styled.div`\r\n display: flex;\r\n justify-content: space-between;\r\n`;\r\n\r\nconst ModelWrapper = styled.div`\r\n display: flex;\r\n align-items: center;\r\n white-space: nowrap;\r\n`;\r\n\r\nconst PriceWrapper = styled.div`\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n white-space: nowrap;\r\n min-width: 56px;\r\n\r\n div:last-child {\r\n justify-content: right;\r\n }\r\n`;\r\n\r\nconst SegmentTitleWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst SearchAndFiltersWrapper = styled.div`\r\n width: 75%;\r\n display: flex;\r\n margin-bottom: 24px;\r\n margin-top: 32px;\r\n\r\n > div {\r\n width: 50%;\r\n }\r\n\r\n > div:last-child {\r\n margin-left: 16px;\r\n }\r\n`;\r\n\r\nconst DescriptionText = styled(Text)`\r\n margin-top: 8px;\r\n`;\r\n\r\nconst AccordionChildDescritionText = styled(Text)`\r\n margin-top: 4px;\r\n`;\r\n\r\nconst Input = styled.input`\r\n /* hide default inner circle */\r\n appearance: none;\r\n\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n\r\n cursor: pointer;\r\n min-width: 20px;\r\n min-height: 20px;\r\n border: 1px solid ${({ theme }) => theme.colors.regularGrey};\r\n border-radius: 50%;\r\n outline: none;\r\n\r\n :hover {\r\n border: 1px solid ${({ theme }) => theme.colors.primary};\r\n opacity: 1;\r\n }\r\n\r\n /* inner circle */\r\n :before {\r\n content: '';\r\n display: inline-block;\r\n width: 10px;\r\n height: 10px;\r\n border-radius: 50%;\r\n vertical-align: middle;\r\n }\r\n\r\n :checked:before {\r\n background: ${({ theme }) => theme.colors.primary};\r\n }\r\n\r\n :checked {\r\n border: 1px solid ${({ theme }) => theme.colors.primary} !important;\r\n }\r\n`;\r\n\r\nconst AccordionTitleText = styled(Text)`\r\n line-height: 1.3;\r\n`;\r\n","/**\r\n * NewCertificateStatement container logic selectors\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getUser = (state: RootState) => state.App.user;\r\nexport const getNewCertificateData = (state: RootState) => state.NewCertificate.certificateData;\r\nexport const getNewCertificateNumAdditionalDocs = (state: RootState) =>\r\n state.NewCertificate.numAdditionalDocs;\r\nexport const getNewCertificateSlice = (state: RootState) => state.NewCertificate;\r\n","import React, { useState } from 'react';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport * as selectors from '../logic/selectors';\r\nimport { actions } from 'store/rootSlices';\r\nimport { useTranslation } from 'react-i18next';\r\nimport _ from 'lodash';\r\n\r\ntype Props = {\r\n form: any;\r\n};\r\n\r\nexport const useWarningModal = ({ form }: Props) => {\r\n const [showModal, setShowModal] = useState(false);\r\n let modalContent;\r\n\r\n const { currentStep, showWarningModalOnSubmit, showRepeteadCertModal } = useSelector(\r\n selectors.getNewCertificateSlice\r\n );\r\n\r\n const {\r\n setCurrentStep,\r\n setShowWarningModalOnSubmit,\r\n setShowRepeteadCertWarningModal,\r\n } = actions.NewCertificate;\r\n\r\n const { t } = useTranslation();\r\n const dispatch = useDispatch();\r\n\r\n const submitButtonText = showRepeteadCertModal\r\n ? t('certificateModal.understood')\r\n : t('certificateModal.proceedAnyway');\r\n\r\n if (showWarningModalOnSubmit) {\r\n modalContent = {\r\n title: t('certificateModal.warningTitle'),\r\n markdown: t('certificateModal.text'),\r\n message: t('certificateModal.message'),\r\n };\r\n } else if (showRepeteadCertModal) {\r\n modalContent = {\r\n title: t('certificateModal.warningTitle'),\r\n message: t('certificateModal.warningCertificate'),\r\n };\r\n } else {\r\n modalContent = undefined;\r\n }\r\n\r\n const shouldRenderModal = () => {\r\n return showWarningModalOnSubmit || showRepeteadCertModal;\r\n };\r\n\r\n const sanitizeApiObject = (cert) => {\r\n //return sanitized object\r\n return _.omitBy(cert, _.isNull);\r\n };\r\n\r\n //runs every on form update\r\n const checkActiveCertificates = (data): void => {\r\n const hasRepeatedCertificate = form?.activeCertificates.some((cert) => {\r\n const commonKeys = _.intersection(Object.keys(data), Object.keys(cert));\r\n const sanitizedApiObject = sanitizeApiObject(cert);\r\n\r\n // Compare only common keys\r\n const areKeysEqual = commonKeys.every((key) => data[key] === sanitizedApiObject[key]);\r\n\r\n return areKeysEqual;\r\n });\r\n\r\n if (hasRepeatedCertificate) {\r\n dispatch(setShowRepeteadCertWarningModal(true));\r\n } else {\r\n dispatch(setShowRepeteadCertWarningModal(false));\r\n }\r\n };\r\n\r\n const onClose = (cancel?: boolean) => {\r\n if (cancel) {\r\n dispatch(setShowWarningModalOnSubmit(false));\r\n dispatch(setShowRepeteadCertWarningModal(false));\r\n setShowModal(false);\r\n\r\n return;\r\n }\r\n\r\n if (showWarningModalOnSubmit) {\r\n dispatch(setShowWarningModalOnSubmit(false));\r\n setShowModal(false);\r\n dispatch(setCurrentStep(currentStep + 1));\r\n } else if (showRepeteadCertModal) {\r\n dispatch(setShowRepeteadCertWarningModal(false));\r\n setShowModal(false);\r\n dispatch(setCurrentStep(currentStep + 1));\r\n } else {\r\n dispatch(setCurrentStep(currentStep + 1));\r\n }\r\n };\r\n\r\n return {\r\n onClose,\r\n checkActiveCertificates,\r\n shouldRenderModal,\r\n setShowModal,\r\n showModal,\r\n submitButtonText,\r\n modalContent,\r\n };\r\n};\r\n","/**\r\n * NewCertificateStatement container\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport React, { useEffect, useContext, useState, useCallback } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { actions } from 'store/rootSlices';\r\nimport { t } from 'app';\r\n\r\nimport { useSelector, useDispatch } from 'react-redux';\r\nimport * as selectors from './selectors';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faFilePdf, faPlus, fal, faExclamationTriangle } from '@fortawesome/pro-light-svg-icons';\r\nimport { faInfoCircle } from '@fortawesome/pro-light-svg-icons';\r\n\r\nimport { useFormContext } from 'react-hook-form';\r\n\r\nimport { Grid } from 'semantic-ui-react';\r\nimport {\r\n AnimatedBackground,\r\n Text,\r\n Segment,\r\n Button as ButtonComponent,\r\n Tooltip,\r\n} from '@paco_ua/pacoui';\r\nimport { getFinalResults } from '../../utils';\r\nimport { IFormPostValues } from '../../types';\r\n\r\nimport numeral from 'numeral';\r\n\r\nimport API from 'api';\r\nimport { useWarningModal } from '../../hooks/useWarningModal';\r\n\r\nconst NewCertificateStatement = ({\r\n formElements,\r\n formElementsData,\r\n formElementsWatch,\r\n setLoadingFile,\r\n resetField,\r\n}) => {\r\n const theme = useContext(ThemeContext);\r\n\r\n const user = useSelector(selectors.getUser);\r\n const newCertificateData = useSelector(selectors.getNewCertificateData);\r\n const newCertificateNumAdditionalDocs = useSelector(selectors.getNewCertificateNumAdditionalDocs);\r\n const newCertificateSlice = useSelector(selectors.getNewCertificateSlice);\r\n const { showToaster } = actions.Toaster;\r\n\r\n const {\r\n setLoadingStatus,\r\n setErrorStatus,\r\n setExempt,\r\n setEnglishWarning,\r\n setIsDigital,\r\n postCertificateChosenOptions,\r\n addDocumentToFormSchema,\r\n addAdditionalDoc,\r\n remAdditionalDoc,\r\n setNumAdditionalDocs,\r\n removeDocumentFromFormSchema,\r\n setCertificateCosts,\r\n setNeedsRequirement,\r\n clearWarnings,\r\n } = actions.NewCertificate;\r\n\r\n const DEFAULT_MAX_ADDITIONAL_DOCS = 3;\r\n\r\n const [maxAdditionalDocuments, setMaxAdditionalDocuments] = useState(DEFAULT_MAX_ADDITIONAL_DOCS);\r\n const [uploadingAdditionalFile, setUploadingAdditionalFile] = useState(false);\r\n\r\n const { form } = newCertificateData;\r\n const { selectedCertificatePreviewUrl, loadingStatus, errorStatus } = newCertificateSlice;\r\n\r\n const {\r\n formState: { errors },\r\n } = useFormContext();\r\n const { checkActiveCertificates } = useWarningModal({ form });\r\n\r\n const dispatch = useDispatch();\r\n\r\n const [loadingCertificateModel, setLoadingCertificateModel] = useState(false);\r\n\r\n const registration =\r\n user.registrations &&\r\n user.registrations.find(\r\n (registration) => registration.registrationId === newCertificateData.registrationId\r\n );\r\n\r\n // Knowing if it's safe to render the form\r\n const formElementsReady = () => {\r\n if (\r\n Object.keys(formElements).length !== 0 &&\r\n formElements.constructor === Object &&\r\n Object.keys(formElementsData).length !== 0 &&\r\n formElementsData.constructor === Object\r\n ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n };\r\n\r\n // To-do: typechecking\r\n const customFormElements = Object.keys(formElements).reduce(\r\n (acc, key) => {\r\n if (form) {\r\n const found = Object.keys(form).find(\r\n (k) =>\r\n form[k].values &&\r\n form[k].values.length &&\r\n form[k].values.find((value) => value.nameKey === key)\r\n );\r\n if (found) {\r\n acc[found] = [...acc[found], { nameKey: key, element: formElements[key] }];\r\n }\r\n }\r\n\r\n return acc;\r\n },\r\n {\r\n requestedCertificate: [] as any,\r\n additionalDocuments: [] as any,\r\n details: [] as any,\r\n mandatoryDocuments: [] as any,\r\n } // the order is important\r\n );\r\n\r\n // To-do: typechecking\r\n const customFormElementsData = Object.keys(formElementsData).reduce(\r\n (acc, key) => {\r\n if (form) {\r\n const found = Object.keys(form).find(\r\n (k) =>\r\n form[k].values &&\r\n form[k].values.length &&\r\n form[k].values.find((value) => value.nameKey === key)\r\n );\r\n if (found) {\r\n acc[found] = [...acc[found], formElementsData[key]];\r\n }\r\n }\r\n\r\n return acc;\r\n },\r\n {\r\n requestedCertificate: [] as any,\r\n additionalDocuments: [] as any,\r\n details: [] as any,\r\n mandatoryDocuments: [] as any,\r\n } // the order is important\r\n );\r\n\r\n useEffect(() => {\r\n let nNonOtherDocuments = 0;\r\n customFormElementsData.additionalDocuments.forEach((document) => {\r\n if (!document.nameKey.includes('otherDocuments')) {\r\n nNonOtherDocuments++;\r\n }\r\n });\r\n\r\n setMaxAdditionalDocuments(nNonOtherDocuments + DEFAULT_MAX_ADDITIONAL_DOCS);\r\n\r\n let nOtherDocuments = 1;\r\n\r\n if (newCertificateNumAdditionalDocs > 1) {\r\n nOtherDocuments = newCertificateNumAdditionalDocs - nNonOtherDocuments;\r\n }\r\n\r\n dispatch(setNumAdditionalDocs(nOtherDocuments + nNonOtherDocuments));\r\n\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [customFormElementsData.additionalDocuments]);\r\n\r\n const getUcsTableNamekeys = (formElementsData, formElementsWatch): any => {\r\n const ucsNamekeysList = [] as any;\r\n\r\n //if has one or more dpUcs with unavailable dps but has other dpUcs with dp available\r\n let needsRequirement = false;\r\n\r\n Object.keys(formElementsData).forEach((namekey) => {\r\n if (formElementsData[namekey].placeholderKey === 'ucListPlaceholder') {\r\n ucsNamekeysList.push(namekey);\r\n\r\n const ucs = formElementsData[namekey].values;\r\n const selectedUcs = formElementsWatch(namekey);\r\n\r\n selectedUcs.forEach((selectedUc) => {\r\n if (\r\n ucs.find((uc) => uc.nameKey.isAvailable === false && selectedUc === uc.nameKey.ucCode)\r\n ) {\r\n needsRequirement = true;\r\n }\r\n });\r\n }\r\n });\r\n\r\n let tableNamekeysList;\r\n if (Object.entries(formElementsData).length !== 0) {\r\n ucsNamekeysList.forEach((nk) => {\r\n if (formElementsWatch(nk) !== null && formElementsWatch(nk) !== undefined) {\r\n tableNamekeysList = formElementsWatch(nk);\r\n }\r\n });\r\n }\r\n\r\n if (needsRequirement) {\r\n dispatch(setNeedsRequirement(true));\r\n } else {\r\n dispatch(clearWarnings());\r\n }\r\n\r\n return tableNamekeysList;\r\n };\r\n\r\n const [activatedUcsList, setActivatedUcsList] = useState({} as any);\r\n const watchElements = formElementsWatch();\r\n\r\n const conditionalFormValidation = useCallback(\r\n (row, formValues): boolean => {\r\n //the condition is if the language chosen is english and the year is before 2012\r\n if (\r\n formValues.language === 1 &&\r\n row.nameKey['isAvailableEn'] === false &&\r\n row.nameKey['genericBlock'] === false\r\n ) {\r\n return true;\r\n }\r\n\r\n return false;\r\n },\r\n [watchElements.language]\r\n );\r\n\r\n const getWarning = useCallback(\r\n (row, formValues) => {\r\n let warning = {\r\n warning: null,\r\n message: null,\r\n };\r\n\r\n Object.keys(row.nameKey)\r\n .filter((key) => key === 'genericBlock' || key === 'isAvailable')\r\n .forEach((value) => {\r\n if (value === 'isAvailable' && row.nameKey[value] === false) {\r\n warning = {\r\n warning: t(`certificates.reqNeedWarning`),\r\n message: t(`certificates.reqNeedMessage`),\r\n };\r\n } else if (value === 'genericBlock' && row.nameKey[value] === true) {\r\n warning = {\r\n warning: t(`certificates.certGenericWarning`),\r\n message: t(`certificates.certGenericMessage`),\r\n };\r\n }\r\n });\r\n\r\n if (warning.message !== null) {\r\n return warning;\r\n } else {\r\n return null;\r\n }\r\n },\r\n [watchElements.language]\r\n );\r\n\r\n // used to show a warning for requested certificates in english\r\n useEffect(() => {\r\n //it means the format is english\r\n if (watchElements.language === 1) {\r\n dispatch(setEnglishWarning(true));\r\n } else {\r\n dispatch(setEnglishWarning(false));\r\n }\r\n\r\n resetField('0/1');\r\n }, [watchElements.language]);\r\n\r\n // used to show a warning for requested certificates in digital\r\n useEffect(() => {\r\n //it means the format is digital\r\n if (watchElements.format === 0) {\r\n dispatch(setIsDigital(true));\r\n } else {\r\n dispatch(setIsDigital(false));\r\n }\r\n\r\n resetField('0/1');\r\n }, [watchElements.format]);\r\n\r\n // used to update the cost after changes in the form checkbox table\r\n useEffect(() => {\r\n const activatedTableNameKey = getUcsTableNamekeys(formElementsData, formElementsWatch);\r\n setActivatedUcsList(activatedTableNameKey);\r\n checkActiveCertificates(watchElements);\r\n\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [formElementsWatch()]);\r\n\r\n useEffect(() => {\r\n if (\r\n (customFormElementsData !== null &&\r\n customFormElementsData !== undefined &&\r\n customFormElements !== null &&\r\n customFormElements !== undefined &&\r\n form !== null &&\r\n form !== undefined &&\r\n watchElements.format !== null) ||\r\n (watchElements.pageCounter !== undefined && watchElements.deliveryMethod !== undefined)\r\n ) {\r\n const formChosenOptions: IFormPostValues | null = getFinalResults(\r\n form,\r\n watchElements,\r\n newCertificateSlice.radioBtnMappings\r\n );\r\n\r\n dispatch(postCertificateChosenOptions(formChosenOptions));\r\n\r\n // Update exemption for the submission button in step 4\r\n dispatch(setExempt(Boolean(watchElements.exemption)));\r\n } else {\r\n dispatch(setCertificateCosts({ costs: [], totalCost: 0 }));\r\n dispatch(\r\n setLoadingStatus({\r\n fieldName: 'costLoading',\r\n fieldValue: false,\r\n })\r\n );\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [\r\n form,\r\n watchElements.format,\r\n watchElements.pageCounter,\r\n watchElements.exemption,\r\n activatedUcsList,\r\n //we might need to add deliveryMethod\r\n ]);\r\n\r\n const getChildren = (formElements, formElementsData, groupName) =>\r\n Object.keys(formElements).reduce((acc: any, key: any) => {\r\n const FormElement = formElements[key];\r\n const nameKey = key;\r\n\r\n const { hidden, type, placeholderKey } = formElementsData[key];\r\n\r\n if (hidden) {\r\n return undefined;\r\n }\r\n\r\n if (type === 'textbox') {\r\n return {\r\n ...acc,\r\n [nameKey]: (\r\n \r\n ),\r\n };\r\n }\r\n\r\n return acc;\r\n }, {});\r\n\r\n if (\r\n loadingStatus.tabLoading ||\r\n errorStatus.errLoadingCertificateForm ||\r\n !form ||\r\n !formElementsReady()\r\n ) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n } else {\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n {t('certificates.requestThirdStepTitle')}\r\n \r\n \r\n {t('certificates.requestThirdStepDescription')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {t('certificates.requestThirdStepName')}\r\n \r\n \r\n {form.studentName}\r\n \r\n \r\n \r\n \r\n {t('certificates.requestThirdStepCourse')}\r\n \r\n \r\n {registration && `${registration.courseCode} - ${registration.courseName}`}\r\n \r\n \r\n \r\n \r\n \r\n {t('certificates.requestedCertificate')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {newCertificateSlice.selectedCertificateType.name}\r\n \r\n \r\n {newCertificateSlice.selectedCertificateType.description}\r\n \r\n \r\n {selectedCertificatePreviewUrl !== '' && (\r\n \r\n {\r\n if (\r\n !loadingCertificateModel &&\r\n selectedCertificatePreviewUrl !== ''\r\n ) {\r\n setLoadingCertificateModel(true);\r\n try {\r\n API.files.getFileOnTab\r\n .call(selectedCertificatePreviewUrl)\r\n .then((value) => {\r\n setLoadingCertificateModel(false);\r\n })\r\n .catch((err) => {\r\n setLoadingCertificateModel(false);\r\n dispatch(\r\n showToaster({\r\n title: t(\r\n 'secVirtualNotifications.general_errorLoadingFile'\r\n ),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n });\r\n } catch (e) {\r\n setLoadingCertificateModel(false);\r\n dispatch(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.general_errorLoadingFile'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n }}\r\n >\r\n {t('certificates.visualizeModel')}\r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n {customFormElementsData?.requestedCertificate &&\r\n customFormElementsData?.requestedCertificate?.find(\r\n (field) => field['nameKey'] === 'exemption'\r\n ) && (\r\n \r\n {Object.keys(customFormElementsData).map((field, index) => {\r\n if (field === 'requestedCertificate') {\r\n return (\r\n customFormElements.requestedCertificate &&\r\n customFormElements.requestedCertificate.map(\r\n ({ element, nameKey }, key) => {\r\n let FormElement = element;\r\n //const defaultValue = formElementsData[key].value;\r\n const type = customFormElementsData.requestedCertificate[key].type;\r\n const hidden =\r\n customFormElementsData.requestedCertificate[key].hidden;\r\n if (type === 'radio_button') {\r\n const options =\r\n customFormElementsData.requestedCertificate[key].values;\r\n\r\n if (hidden) {\r\n return [];\r\n }\r\n\r\n return (\r\n \r\n {customFormElementsData.requestedCertificate[key].labelKey && (\r\n \r\n \r\n {t(\r\n `certificates.${customFormElementsData.requestedCertificate[key].labelKey}`\r\n )}\r\n \r\n \r\n {t('*')}\r\n \r\n \r\n }\r\n position=\"right center\"\r\n />\r\n \r\n )}\r\n\r\n \r\n ({\r\n name: option.nameKey,\r\n valueId: option.valueId,\r\n label: t(`certificates.${option.nameKey}`, {\r\n textOnly: true,\r\n }),\r\n }))}\r\n name={nameKey}\r\n error={\r\n errors[\r\n customFormElementsData.requestedCertificate[key].nameKey\r\n ] &&\r\n t(\r\n `forms.${\r\n errors[\r\n customFormElementsData.requestedCertificate[key]\r\n .nameKey\r\n ].message\r\n }`,\r\n {\r\n textOnly: true,\r\n }\r\n )\r\n }\r\n />\r\n \r\n \r\n );\r\n } else if (type === 'dropdown') {\r\n //populate options first\r\n const dropdownOptions = [] as {\r\n key: string;\r\n nameKey: string;\r\n valueId: string;\r\n }[];\r\n\r\n customFormElementsData.requestedCertificate[key].values.forEach(\r\n (option) => {\r\n dropdownOptions.push({\r\n key: `option_${option.valueId}`,\r\n nameKey: option.nameKey,\r\n valueId: option.valueId,\r\n });\r\n }\r\n );\r\n\r\n //check after if its hidden\r\n if (hidden) {\r\n return [];\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n {t(\r\n `certificates.${customFormElementsData.requestedCertificate[key].nameKey}`\r\n )}\r\n \r\n \r\n {t('*')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n } else if (type === 'textbox' || type === 'big_textbox') {\r\n if (hidden) {\r\n return [];\r\n }\r\n\r\n return (\r\n \r\n );\r\n }\r\n }\r\n )\r\n );\r\n } else if (field === 'additionalDocuments') {\r\n return (\r\n customFormElements.additionalDocuments &&\r\n customFormElements.additionalDocuments.map(\r\n ({ element, nameKey }, key) => {\r\n let FormElement = element;\r\n //const defaultValue = formElementsData[key].value;\r\n const type = customFormElementsData.additionalDocuments[key].type;\r\n const hidden = customFormElementsData.additionalDocuments[key].hidden;\r\n\r\n const maxSize =\r\n customFormElementsData.additionalDocuments[key] &&\r\n customFormElementsData.additionalDocuments[key].validations.find(\r\n (validation) => validation.type === 'maxFileSize'\r\n );\r\n\r\n const minSize =\r\n customFormElementsData.additionalDocuments[key] &&\r\n customFormElementsData.additionalDocuments[key].validations.find(\r\n (validation) => validation.type === 'minFileSize'\r\n );\r\n\r\n const acceptTypes =\r\n customFormElementsData.additionalDocuments[key] &&\r\n customFormElementsData.additionalDocuments[key].validations.find(\r\n (validation) => validation.type === 'fileType'\r\n );\r\n\r\n if (hidden) {\r\n return [];\r\n }\r\n\r\n return (\r\n \r\n {key === 0 && (\r\n \r\n \r\n {t(`certificates.${nameKey}`, { textOnly: true })}\r\n \r\n \r\n )}\r\n \r\n }\r\n heading={t(\r\n 'certificates.documentsPlaceholder-otherDocument',\r\n {\r\n textOnly: true,\r\n }\r\n )}\r\n description={\r\n formElementsData[nameKey].placeholderKey.includes(\r\n 'otherDocumentsPlaceholder'\r\n )\r\n ? t(\r\n `certificates.${formElementsData[nameKey].placeholderKey}`\r\n )\r\n : formElementsData[nameKey].placeholderKey\r\n }\r\n studentId={user.nmec}\r\n registrationId={newCertificateData.registrationId}\r\n error={\r\n errors[\r\n customFormElementsData.additionalDocuments[key].nameKey\r\n ] &&\r\n t(\r\n `forms.${\r\n errors[\r\n customFormElementsData.additionalDocuments[key]\r\n .nameKey\r\n ].message\r\n }`,\r\n {\r\n textOnly: true,\r\n }\r\n )\r\n }\r\n enableRemoveField={\r\n key === 0 ||\r\n key <= maxAdditionalDocuments - DEFAULT_MAX_ADDITIONAL_DOCS\r\n ? false\r\n : true\r\n }\r\n onRemoveField={\r\n key === 0 ||\r\n key <= maxAdditionalDocuments - DEFAULT_MAX_ADDITIONAL_DOCS\r\n ? undefined\r\n : () => {\r\n const payload = {\r\n form: form,\r\n key: nameKey,\r\n };\r\n if (\r\n newCertificateNumAdditionalDocs >\r\n maxAdditionalDocuments - DEFAULT_MAX_ADDITIONAL_DOCS\r\n ) {\r\n dispatch(removeDocumentFromFormSchema(payload));\r\n dispatch(remAdditionalDoc()); // counter\r\n }\r\n }\r\n }\r\n setUploadingFlag={(nameKey: string, value: boolean) => {\r\n setUploadingAdditionalFile(value);\r\n setLoadingFile((currentValue) => {\r\n return {\r\n ...currentValue,\r\n [nameKey]: value,\r\n };\r\n });\r\n }}\r\n maxSize={maxSize && maxSize.params[0]}\r\n minSize={minSize && minSize.params[0]}\r\n accept={acceptTypes && acceptTypes.params[0]}\r\n />\r\n \r\n = maxAdditionalDocuments\r\n }\r\n onClick={() => {\r\n if (\r\n newCertificateNumAdditionalDocs < maxAdditionalDocuments\r\n ) {\r\n dispatch(addDocumentToFormSchema(form));\r\n dispatch(addAdditionalDoc());\r\n }\r\n }}\r\n primary\r\n >\r\n }\r\n >\r\n {t('certificates.addDocument')}\r\n \r\n \r\n \r\n );\r\n }\r\n )\r\n );\r\n } else {\r\n return [];\r\n }\r\n })}\r\n \r\n )}\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n {t('certificates.languageFormatsTitle')}\r\n \r\n \r\n {Object.keys(customFormElementsData).map((field, index) => {\r\n if (field === 'details') {\r\n return (\r\n customFormElements[field] &&\r\n customFormElements[field].map(({ element, nameKey }, key) => {\r\n let FormElement = element;\r\n\r\n //const defaultValue = formElementsData[key].value;\r\n const type = customFormElementsData.details[key].type;\r\n const hidden = customFormElementsData.details[key].hidden;\r\n\r\n if (type === 'radio_button') {\r\n const options = customFormElementsData.details[key].values;\r\n if (hidden) {\r\n return [];\r\n }\r\n\r\n return (\r\n \r\n {customFormElementsData.details[key].labelKey && (\r\n \r\n \r\n {t(\r\n `certificates.${customFormElementsData.details[key].labelKey}`\r\n )}\r\n \r\n \r\n {t('*')}\r\n \r\n \r\n )}\r\n\r\n \r\n ({\r\n name: option.nameKey,\r\n valueId: option.valueId,\r\n label: option.nameKey,\r\n descriptionLabel: option.descriptionKey\r\n ? option.descriptionKey\r\n : undefined,\r\n }))}\r\n name={nameKey}\r\n error={\r\n errors[customFormElementsData.details[key].nameKey] &&\r\n t(`forms.validationFieldRequired`, {\r\n //HAMMER: yup might be returning a type error validation because the default value is null and the validationtype is number\r\n textOnly: true,\r\n })\r\n }\r\n />\r\n \r\n \r\n );\r\n } else if (type === 'textbox') {\r\n if (hidden) {\r\n return [];\r\n }\r\n\r\n return (\r\n \r\n );\r\n } else if (type === 'counter') {\r\n if (hidden) {\r\n return [];\r\n }\r\n\r\n return (\r\n \r\n {customFormElementsData.details[key].nameKey && (\r\n \r\n \r\n {t(\r\n `certificates.${customFormElementsData.details[key].nameKey}`\r\n )}\r\n \r\n \r\n {t('*')}\r\n \r\n \r\n )}\r\n \r\n \r\n );\r\n } else if (type === 'editableGroupComponent') {\r\n if (hidden) {\r\n return [];\r\n }\r\n\r\n FormElement = element.value;\r\n const FormChildren = element?.values\r\n ? getChildren(\r\n element?.values,\r\n customFormElementsData.details[key].values,\r\n nameKey\r\n )\r\n : undefined;\r\n\r\n return (\r\n \r\n \r\n {\r\n return nameKeys.reduce((acc, itemNameKey) => {\r\n return {\r\n ...acc,\r\n [itemNameKey]: t(`certificates.${itemNameKey}`, {\r\n textOnly: true,\r\n }),\r\n };\r\n }, {});\r\n }}\r\n children={FormChildren}\r\n errors={(nameSubKeys) => {\r\n const nameKey = customFormElementsData.details[key].nameKey;\r\n\r\n return nameSubKeys.reduce((acc, itemNameKey) => {\r\n if (errors[nameKey] && errors[nameKey][itemNameKey]) {\r\n return {\r\n ...acc,\r\n [itemNameKey]: t(\r\n `forms.${errors[nameKey][itemNameKey].message}`,\r\n {\r\n textOnly: true,\r\n }\r\n ),\r\n };\r\n }\r\n return acc;\r\n }, {});\r\n }}\r\n />\r\n {errors[customFormElementsData.details[key].nameKey] && (\r\n \r\n {t(`certificates.impersonateEmailError`)}\r\n \r\n )}\r\n \r\n );\r\n }\r\n })\r\n );\r\n } else {\r\n return [];\r\n }\r\n })}\r\n \r\n \r\n \r\n\r\n \r\n {Object.keys(customFormElementsData).map((field, index) => {\r\n if (field === 'requestedCertificate') {\r\n return (\r\n customFormElements.requestedCertificate &&\r\n customFormElements.requestedCertificate.map(({ element, nameKey }, key) => {\r\n let FormElement = element;\r\n //const defaultValue = formElementsData[key].value;\r\n const type = customFormElementsData.requestedCertificate[key].type;\r\n const hidden = customFormElementsData.requestedCertificate[key].hidden;\r\n if (type === 'checkbox_table') {\r\n if (hidden) {\r\n return [];\r\n }\r\n\r\n // Concatenate the arrays inside the objects\r\n let concatenatedArray = customFormElementsData.requestedCertificate\r\n .filter((rq) => rq.type === 'checkbox_table')\r\n .reduce((result, obj) => {\r\n // Use the spread operator (...) to concatenate arrays\r\n return result.concat(obj.values);\r\n }, []);\r\n\r\n return (\r\n \r\n \r\n \r\n {t('certificates.frequentedCurricularUnit', { textOnly: true })}\r\n \r\n \r\n \r\n \r\n col !== 'isAvailable' &&\r\n col !== 'genericBlock' &&\r\n col !== 'isAvailableEn'\r\n )\r\n .map((field) => {\r\n return {\r\n text: t(`certificates.${field}`, { textOnly: true }),\r\n style:\r\n field === 'ucName'\r\n ? { textAlign: 'left', fontWeight: 400 }\r\n : { textAlign: 'center', fontWeight: 400 },\r\n };\r\n }),\r\n },\r\n rows: concatenatedArray.map((row) => {\r\n return {\r\n disabled:\r\n conditionalFormValidation(row, watchElements) ||\r\n row.nameKey['genericBlock'] === true,\r\n\r\n value: row.valueId,\r\n rowProps: {\r\n color: theme.colors.white,\r\n textAlign: row.nameKey === 'ucCode' ? 'left' : 'center',\r\n },\r\n cells: Object.keys(row.nameKey)\r\n .filter(\r\n (key) =>\r\n key !== 'isAvailable' &&\r\n key !== 'genericBlock' &&\r\n key !== 'isAvailableEn'\r\n )\r\n .map((key) => {\r\n if (key === 'semester') {\r\n return {\r\n content:\r\n row.nameKey[key] === 0 ? (\r\n {`${t(\r\n 'certificates.anual',\r\n {\r\n textOnly: true,\r\n }\r\n )}`}\r\n ) : row.nameKey[key] === -1 ? (\r\n <>\r\n ) : (\r\n {`${numeral(\r\n row.nameKey[key]\r\n ).format('o')} ${t('certificates.semester', {\r\n textOnly: true,\r\n })}`}\r\n ),\r\n cellProps: { textAlign: 'center' },\r\n };\r\n } else if (key === 'ucCode') {\r\n return {\r\n content: (\r\n \r\n {row.nameKey[key]}\r\n \r\n ),\r\n cellProps: { textAlign: 'center' },\r\n };\r\n } else if (key === 'ucName') {\r\n return {\r\n content: (\r\n <>\r\n \r\n {row.nameKey[key]}\r\n {conditionalFormValidation(\r\n row,\r\n watchElements\r\n ) && (\r\n \r\n \r\n \r\n )}\r\n \r\n {getWarning(row, watchElements) !== null &&\r\n conditionalFormValidation(\r\n row,\r\n watchElements\r\n ) !== true && (\r\n \r\n
    \r\n \r\n \r\n {\r\n getWarning(row, watchElements)\r\n ?.warning\r\n }\r\n \r\n \r\n {\r\n getWarning(row, watchElements)\r\n ?.message\r\n }\r\n \r\n
    \r\n
    \r\n )}\r\n \r\n ),\r\n cellProps: {\r\n textAlign: 'left',\r\n ...(getWarning(row, watchElements) !== null &&\r\n conditionalFormValidation(row, watchElements) !==\r\n true\r\n ? {\r\n className: 'dp-warning',\r\n }\r\n : null),\r\n },\r\n };\r\n } else {\r\n return {\r\n content: (\r\n \r\n {row.nameKey[key]}\r\n \r\n ),\r\n cellProps: { textAlign: 'center' },\r\n };\r\n }\r\n }),\r\n };\r\n }),\r\n }}\r\n error={\r\n errors[\r\n customFormElementsData.requestedCertificate[key].nameKey\r\n ] &&\r\n t(\r\n `forms.${\r\n errors[\r\n customFormElementsData.requestedCertificate[key].nameKey\r\n ].message\r\n }`,\r\n {\r\n textOnly: true,\r\n }\r\n )\r\n }\r\n />\r\n
    \r\n \r\n );\r\n }\r\n })\r\n );\r\n } /*else if (field === 'mandatoryDocuments') {\r\n return <>; // There aren't mandatory documents when requesting certificates\r\n }*/ else {\r\n return [];\r\n }\r\n })}\r\n
    \r\n
    \r\n
    \r\n \r\n );\r\n }\r\n};\r\n\r\nexport default NewCertificateStatement;\r\n\r\nconst Row = styled.div<{ paddingtop?: string; paddingbottom?: string }>`\r\n padding-top: ${({ paddingtop }) => (paddingtop ? paddingtop : '1rem')};\r\n padding-bottom: ${({ paddingbottom }) => (paddingbottom ? paddingbottom : '1rem')};\r\n`;\r\n\r\nconst LoadingWrapper = styled.div`\r\n width: 100%;\r\n height: 300px;\r\n\r\n * {\r\n margin: 8px 0px;\r\n }\r\n`;\r\n\r\nconst CertificateData = styled.div`\r\n margin-top: 56px;\r\n`;\r\n\r\nconst CertificateDataNameAndCourse = styled.div`\r\n display: flex;\r\n\r\n & > div {\r\n flex: 0 50%;\r\n }\r\n`;\r\n\r\nconst PageCounterWrapper = styled.div`\r\n margin-top: 30px;\r\n`;\r\n\r\nconst CertificateDataCertificateType = styled.div`\r\n margin-top: 50px;\r\n`;\r\n\r\nconst CertificateDataBlock = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n & > div {\r\n margin-top: 12px;\r\n }\r\n`;\r\n\r\nconst CertificateSegment = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n margin-top: 17px;\r\n`;\r\n\r\nconst TableTitleWrapper = styled.div`\r\n margin-bottom: 16px;\r\n`;\r\n\r\nconst FileUploaderWrapper = styled.div`\r\n margin-top: 12px;\r\n`;\r\n\r\nconst DropdownWrapper = styled.div`\r\n display: flex;\r\n margin: 16px 0px;\r\n`;\r\n\r\nconst ExemptionReasonWrapper = styled.div`\r\n display: flex;\r\n\r\n div:nth-child(2) {\r\n margin: 0px 7px;\r\n }\r\n margin-top: 24px;\r\n`;\r\n\r\nconst SegmentContent = styled.div`\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n`;\r\n\r\nconst SegmentDescription = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst ExemptionWrapper = styled.div`\r\n display: flex;\r\n\r\n div:nth-child(2) {\r\n margin: 0px 7px;\r\n }\r\n`;\r\n\r\nconst TitleWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst LineSeparator = styled.div`\r\n height: 1px;\r\n background: ${({ theme }) => theme.colors.softRegularGrey};\r\n margin: 16px 0px;\r\n`;\r\n\r\nconst LanguageTitleWrapper = styled.div`\r\n margin-bottom: 8px;\r\n`;\r\n\r\nconst CertificateStatement = styled.div`\r\n margin-top: 20px;\r\n`;\r\n\r\nconst CertificateStatementRequest = styled.div`\r\n margin-top: 30px;\r\n`;\r\n\r\nconst ExemptionRadioListWrapper = styled.div`\r\n margin-top: 12px;\r\n`;\r\n\r\nconst Button = styled(ButtonComponent)`\r\n margin-top: 20px;\r\n`;\r\n\r\nconst AdditionalDocumentsTitle = styled.div`\r\n margin-top: 32px;\r\n`;\r\n\r\nconst ModelWrapper = styled.div`\r\n display: flex;\r\n align-items: center;\r\n white-space: nowrap;\r\n`;\r\n\r\nconst FrequentedUcsTableWrapper = styled.div`\r\n overflow: auto;\r\n\r\n &&& th {\r\n padding-top: 0px !important;\r\n padding-bottom: 0px !important;\r\n height: 61px;\r\n }\r\n\r\n &&& td {\r\n padding-top: 0px !important;\r\n padding-bottom: 0px !important;\r\n height: 76px;\r\n }\r\n\r\n &&& .dp-warning {\r\n height: unset !important;\r\n padding: 20px !important;\r\n }\r\n`;\r\n\r\nconst AnimatedBackgroundTitle = styled(AnimatedBackground)`\r\n margin-bottom: 20px;\r\n`;\r\n\r\nconst DescriptionText = styled(Text)`\r\n margin-top: 8px;\r\n`;\r\n\r\nconst SegmentSubtitleText = styled(Text)`\r\n margin-top: 8px;\r\n`;\r\n\r\nconst DropdownContainer = styled.div``;\r\n\r\nconst CheckboxContainer = styled.div``;\r\n\r\nconst AdditionalDocumentsWrapper = styled.div``;\r\n\r\nconst EditableGroupWrapper = styled.div``;\r\n\r\nconst DataText = styled(Text)`\r\n line-height: 1.3;\r\n`;\r\n\r\nconst WarningContainer = styled.div`\r\n display: flex;\r\n height: 100%;\r\n\r\n >div: first-child {\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n align-items: start;\r\n height: auto;\r\n font-size: 13px;\r\n\r\n svg {\r\n padding-right: 4px;\r\n }\r\n\r\n span {\r\n font-size: 0.75rem !important;\r\n }\r\n }\r\n`;\r\n\r\nconst WarningIcon = styled.span`\r\n padding-left: 8px;\r\n\r\n > svg {\r\n width: 1rem !important;\r\n color: ${({ theme }) => theme.colors.darkGrey} !important;\r\n }\r\n`;\r\n","/**\r\n * NewCertificateSubmission container logic selectors\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getUser = (state: RootState) => state.App.user;\r\nexport const getNewCertificateData = (state: RootState) => state.NewCertificate.certificateData;\r\nexport const getNewCertificateSlice = (state: RootState) => state.NewCertificate;\r\n","/**\r\n * EditableFieldGroup component\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport React, { useContext } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\nimport { Grid } from 'semantic-ui-react';\r\nimport { Text } from '@paco_ua/pacoui';\r\n\r\ninterface IProps {\r\n t?: any;\r\n name: string;\r\n errors?: (nameKeys: string[]) => any;\r\n title?: string;\r\n disableEdit?: boolean;\r\n padding?: string;\r\n form?: any;\r\n values: {\r\n nameKey: string;\r\n type?: string;\r\n disable?: boolean;\r\n placeholderKey?: string;\r\n value: string;\r\n validations?: [];\r\n visibleIf?: any;\r\n }[];\r\n register?: any;\r\n children?: any;\r\n labels: (nameKeys: string[]) => any;\r\n}\r\n\r\nconst FieldsGroupDisplay: React.FC = ({\r\n t,\r\n name,\r\n errors,\r\n values,\r\n title,\r\n padding,\r\n disableEdit,\r\n labels,\r\n form,\r\n children,\r\n register = {},\r\n ...props\r\n}) => {\r\n const theme = useContext(ThemeContext);\r\n const getLabels = labels(Object.keys(values).map((key) => values[key].nameKey));\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n {title}\r\n \r\n \r\n \r\n\r\n \r\n {Object.keys(values).map((key) => {\r\n return (\r\n \r\n \r\n \r\n {getLabels[values[key].nameKey]}\r\n \r\n \r\n \r\n \r\n {values[key].value}\r\n \r\n \r\n \r\n );\r\n })}\r\n \r\n \r\n );\r\n};\r\nexport default FieldsGroupDisplay;\r\n\r\nconst Wrapper = styled.div`\r\n display: flex;\r\n justify-content: flex-start;\r\n flex-direction: column;\r\n\r\n .ui.grid {\r\n flex-grow: 1;\r\n }\r\n`;\r\n\r\nconst VisibilityWrapper = styled.div<{ visible: boolean }>`\r\n display: ${({ visible }) => (visible ? 'block' : 'none')};\r\n`;\r\n\r\nconst Column = styled(Grid.Column)<{ paddingtop?: string; paddingbottom?: string }>`\r\n &&&&& {\r\n padding-top: ${({ paddingtop }) => (paddingtop ? paddingtop : '1rem')};\r\n padding-bottom: ${({ paddingbottom }) => (paddingbottom ? paddingbottom : '1rem')};\r\n }\r\n`;\r\n\r\nconst TextFieldTitle = styled.div`\r\n margin: 0px 0px 12px 0px;\r\n`;\r\n\r\nconst EditableBlockTitle = styled.div`\r\n margin-bottom: 17px;\r\n`;\r\n\r\nconst HeaderWrapper = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: space-between;\r\n`;\r\n","/**\r\n * NewCertificateSubmission container utils\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport { t } from 'app';\r\nimport { ISubmissionTabData, ISubmissionTabRadio, ISubmissionTabEditableGroup } from '../../types';\r\n\r\ninterface ISubmissionRequested {\r\n schoolYear?: string;\r\n ucsCodes: any;\r\n}\r\n\r\ninterface ISubmissionDetails {\r\n address?: ISubmissionTabEditableGroup[];\r\n email?: ISubmissionTabEditableGroup[];\r\n deliveryMethod: ISubmissionTabRadio;\r\n format: ISubmissionTabRadio;\r\n language: ISubmissionTabRadio;\r\n pageCounter?: number;\r\n}\r\n\r\n/**\r\n * Return the form information related to the request certificate section\r\n * for display in the new certificate submission tab.\r\n */\r\nconst getRequestedCertificateSubmission = (\r\n requestCertificateData,\r\n formData\r\n): ISubmissionRequested | undefined => {\r\n let formRequestData = {} as ISubmissionRequested;\r\n\r\n if (requestCertificateData) {\r\n requestCertificateData.forEach((element) => {\r\n if (formData[element.nameKey] !== null && formData[element.nameKey] !== undefined) {\r\n if (element.type === 'dropdown') {\r\n const selectedOption = formData[element.nameKey];\r\n\r\n element.values.forEach((elem) => {\r\n if (elem.valueId === selectedOption) {\r\n formRequestData[element.nameKey] = elem.nameKey;\r\n return;\r\n }\r\n });\r\n } else if (element.type === 'checkbox_table') {\r\n let tableRows = [] as any[];\r\n\r\n formData[element.nameKey].forEach((formDataItem) => {\r\n element.values.forEach((valueItem) => {\r\n if (formDataItem === valueItem.valueId) {\r\n tableRows.push(valueItem.nameKey);\r\n }\r\n });\r\n });\r\n\r\n formRequestData[element.nameKey] = tableRows;\r\n }\r\n }\r\n });\r\n\r\n return formRequestData;\r\n } else {\r\n return undefined;\r\n }\r\n};\r\n\r\n/**\r\n * Return the form information related to the details section for display in the\r\n * new certificate submission tab.\r\n */\r\nconst getDetailsSubmission = (detailsData, formData): ISubmissionDetails => {\r\n let formRequestData = {} as any;\r\n\r\n detailsData.forEach((element) => {\r\n if (element.type === 'radio_button') {\r\n if (formData[element.nameKey] !== null && formData[element.nameKey] !== undefined) {\r\n const selectedOption = formData[element.nameKey];\r\n\r\n const nameKey = element.values[selectedOption].nameKey;\r\n\r\n formRequestData[element.nameKey] = {\r\n value: t(`certificates.${nameKey}`, {\r\n textOnly: true,\r\n }),\r\n valueNameKey: nameKey,\r\n elementNameKey: element.nameKey,\r\n description: element.values[selectedOption].descriptionKey\r\n ? element.values[selectedOption].descriptionKey\r\n : undefined,\r\n };\r\n }\r\n } else if (element.type === 'dropdown') {\r\n if (formData[element.nameKey] !== null && formData[element.nameKey] !== undefined) {\r\n const selectedOption = formData[element.nameKey];\r\n\r\n formRequestData[element.nameKey] = element.values[selectedOption].nameKey;\r\n }\r\n } else if (element.type === 'editableGroupComponent') {\r\n // check if any field is undefined\r\n let ignoreField = false;\r\n\r\n if (formData[element.nameKey] === null || formData[element.nameKey] === undefined) {\r\n ignoreField = true;\r\n }\r\n\r\n if (!ignoreField) {\r\n formRequestData[element.nameKey] = Object.keys(element.values).map((index) => {\r\n const key = element.values[index].nameKey;\r\n\r\n if (\r\n formData[element.nameKey][key] !== null &&\r\n formData[element.nameKey][key] !== undefined\r\n ) {\r\n return {\r\n nameKey: key,\r\n value: formData[element.nameKey][key],\r\n };\r\n }\r\n });\r\n }\r\n } else {\r\n formRequestData[element.nameKey] = formData[element.nameKey];\r\n }\r\n });\r\n\r\n return formRequestData;\r\n};\r\n\r\n/**\r\n * Return the form information for display in the new certificate submission tab.\r\n * @param form slice certificateData.form\r\n * @param formValues slice certificateData.formValues\r\n */\r\nexport const getSubmissionTabData = (form, formValues): ISubmissionTabData => {\r\n const { requestedCertificate, details /*, mandatoryDocuments, additionalDocuments*/ } = form;\r\n\r\n return {\r\n ...getRequestedCertificateSubmission(requestedCertificate.values, formValues),\r\n ...getDetailsSubmission(details.values, formValues),\r\n } as ISubmissionTabData;\r\n};\r\n","/**\r\n * NewCertificateSubmission container\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport React, { useContext, useState } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { t } from 'app';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './selectors';\r\n\r\nimport ReactMarkdown from 'react-markdown';\r\n\r\nimport numeral from 'numeral';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faFilePdf, faExclamationTriangle } from '@fortawesome/pro-light-svg-icons';\r\n\r\nimport { Grid } from 'semantic-ui-react';\r\nimport { AnimatedBackground, Text, Segment, Table } from '@paco_ua/pacoui';\r\nimport FieldsGroupDisplay from 'shared/components/FieldsGroupDisplay';\r\nimport { getSubmissionTabData } from './utils';\r\n\r\nimport FileDownloader from 'shared/components/FileDownloader';\r\n\r\nimport SelectedPayments from 'scenes/VirtualSecretary/Payments/PendingDebitsPayment/components/SelectedPayments';\r\n\r\nimport { IDebitData } from 'scenes/VirtualSecretary/Payments/types';\r\n\r\nimport API from 'api';\r\n\r\nconst NewApplicationSubmission = ({ formElementsGetValues }) => {\r\n const theme = useContext(ThemeContext);\r\n\r\n const user = useSelector(selectors.getUser);\r\n const newCertificateData = useSelector(selectors.getNewCertificateData);\r\n const newCertificateSlice = useSelector(selectors.getNewCertificateSlice);\r\n\r\n const { showToaster } = actions.Toaster;\r\n\r\n const registration =\r\n user.registrations &&\r\n user.registrations.find(\r\n (registration) => registration.registrationId === newCertificateData.registrationId\r\n );\r\n\r\n const { form /*, formValues*/ } = newCertificateData;\r\n\r\n const {\r\n selectedCertificatePreviewUrl,\r\n selectedCertificateType,\r\n loadingStatus,\r\n //errorStatus,\r\n } = newCertificateSlice;\r\n\r\n const submissionTabData = getSubmissionTabData(form, formElementsGetValues());\r\n\r\n const dispatch = useDispatch();\r\n\r\n const [loadingCertificateModel, setLoadingCertificateModel] = useState(false);\r\n\r\n const getUcsListNameKey = () => {\r\n let ucsTableNameKey = '';\r\n\r\n Object.keys(submissionTabData).forEach((nameKey) => {\r\n if (nameKey.includes('0/1')) {\r\n ucsTableNameKey = nameKey;\r\n }\r\n });\r\n\r\n return ucsTableNameKey;\r\n };\r\n\r\n const findFormDataIndex = (nameKey) => {\r\n if (newCertificateData.form) {\r\n return newCertificateData.form.requestedCertificate.values.findIndex(\r\n (item) => item.nameKey === nameKey\r\n );\r\n }\r\n\r\n return null;\r\n };\r\n\r\n const studentName = form ? form.studentName : user.name;\r\n\r\n const mockCertificatePaymentData = [\r\n {\r\n associatedCosts: null,\r\n coin: 'EUR',\r\n debitAcademicYear: -1,\r\n debitDate: null,\r\n debitId: -1,\r\n debitOriginId: -1,\r\n debitStatus: 'unpaid',\r\n debitType: newCertificateSlice.selectedCertificateType.theme\r\n ? newCertificateSlice.selectedCertificateType.theme\r\n : '',\r\n description: newCertificateSlice.selectedCertificateType.name\r\n ? newCertificateSlice.selectedCertificateType.name\r\n : '',\r\n dueDate: null,\r\n totalValue: newCertificateSlice.certificateCosts.totalCost,\r\n value: newCertificateSlice.certificateCosts.totalCost,\r\n },\r\n ] as IDebitData[];\r\n\r\n if (loadingStatus.tabLoading) {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n } else {\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n {t('certificates.requestFourthStepTitle')}\r\n \r\n \r\n {t('certificates.requestFourthStepDescription')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {t('certificates.requestFourthStepName')}\r\n \r\n \r\n {studentName}\r\n \r\n \r\n \r\n \r\n {t('certificates.requestFourthStepCourse')}\r\n \r\n \r\n {registration && `${registration.courseCode} - ${registration.courseName}`}\r\n \r\n \r\n \r\n \r\n \r\n {t('certificates.requestedCertificate')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {selectedCertificateType?.name}\r\n \r\n \r\n {selectedCertificateType?.description}\r\n \r\n \r\n {selectedCertificatePreviewUrl !== '' && (\r\n \r\n {\r\n if (\r\n !loadingCertificateModel &&\r\n selectedCertificatePreviewUrl !== ''\r\n ) {\r\n setLoadingCertificateModel(true);\r\n try {\r\n API.files.getFileOnTab\r\n .call(selectedCertificatePreviewUrl)\r\n .then((value) => {\r\n setLoadingCertificateModel(false);\r\n })\r\n .catch((err) => {\r\n setLoadingCertificateModel(false);\r\n dispatch(\r\n showToaster({\r\n title: t(\r\n 'secVirtualNotifications.general_errorLoadingFile'\r\n ),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n });\r\n } catch (e) {\r\n setLoadingCertificateModel(false);\r\n dispatch(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.general_errorLoadingFile'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n }\r\n }\r\n }}\r\n >\r\n {t('certificates.visualizeModel')}\r\n \r\n \r\n )}\r\n \r\n \r\n \r\n {submissionTabData.schoolYear && (\r\n \r\n \r\n \r\n {t(`certificates.requestedAcademicYear`, { textOnly: true })}\r\n \r\n \r\n {submissionTabData.schoolYear}\r\n \r\n \r\n \r\n )}\r\n {submissionTabData.exemptionMotive && (\r\n \r\n \r\n \r\n {t(`certificates.requestedExemptionMotive`, { textOnly: true })}\r\n \r\n \r\n {submissionTabData.exemptionMotive}\r\n \r\n \r\n \r\n )}\r\n {formElementsGetValues() &&\r\n Object.keys(formElementsGetValues()).filter(\r\n (elementKey) =>\r\n formElementsGetValues()[elementKey] !== null &&\r\n formElementsGetValues()[elementKey] !== undefined &&\r\n formElementsGetValues()[elementKey].fileName !== null &&\r\n formElementsGetValues()[elementKey].fileName !== undefined\r\n ).length > 0 && (\r\n \r\n \r\n \r\n {t('applications.requestFourthStepAdditionalFilesTitle')}\r\n \r\n {formElementsGetValues() &&\r\n Object.keys(formElementsGetValues())\r\n .filter(\r\n (elementKey) =>\r\n formElementsGetValues()[elementKey] !== null &&\r\n formElementsGetValues()[elementKey] !== undefined &&\r\n formElementsGetValues()[elementKey].fileName !== null &&\r\n formElementsGetValues()[elementKey].fileName !== undefined\r\n )\r\n .map((documentKey, index) => (\r\n \r\n }\r\n callToEndpoint={(endpoint, setLoading: (value) => void) => {\r\n setLoading(true);\r\n\r\n API.files.getFileOnTab\r\n .call(endpoint)\r\n .then((value) => {\r\n setLoading(false);\r\n })\r\n .catch((e) => {\r\n setLoading(false);\r\n dispatch(\r\n actions.Toaster.showToaster({\r\n title: t(\r\n 'secVirtualNotifications.general_errorLoadingFile'\r\n ),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n });\r\n }}\r\n />\r\n \r\n ))}\r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n {t('certificates.languageFormatsTitle')}\r\n \r\n \r\n\r\n {submissionTabData && submissionTabData.language && (\r\n \r\n \r\n {t('certificates.requestedLanguage')}\r\n \r\n \r\n {submissionTabData.language.valueNameKey}\r\n \r\n \r\n )}\r\n\r\n {submissionTabData && submissionTabData.format && (\r\n \r\n \r\n {t('certificates.detailsFormat')}\r\n \r\n \r\n {submissionTabData.format.valueNameKey}\r\n \r\n {submissionTabData.format.description && (\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n )}\r\n {submissionTabData && submissionTabData.email && (\r\n <>\r\n \r\n {\r\n return nameKeys.reduce((acc, namekey) => {\r\n return {\r\n ...acc,\r\n [namekey]: t(`certificates.${namekey}`, {\r\n textOnly: true,\r\n }),\r\n };\r\n }, {});\r\n }}\r\n />\r\n \r\n )}\r\n\r\n {submissionTabData && submissionTabData.address && (\r\n <>\r\n \r\n {\r\n return nameKeys.reduce((acc, namekey) => {\r\n return {\r\n ...acc,\r\n [namekey]: t(`certificates.${namekey}`, {\r\n textOnly: true,\r\n }),\r\n };\r\n }, {});\r\n }}\r\n />\r\n \r\n )}\r\n \r\n \r\n \r\n {submissionTabData && submissionTabData[getUcsListNameKey()] && (\r\n <>\r\n \r\n {newCertificateData.form && (\r\n \r\n col !== 'isAvailable' &&\r\n col !== 'genericBlock' &&\r\n col !== 'isAvailableEn'\r\n )\r\n .map((field) => {\r\n return {\r\n text: t(`certificates.${field}`, { textOnly: true }),\r\n style:\r\n field !== 'ucName'\r\n ? { textAlign: 'center', fontWeight: '400' }\r\n : { textAlign: 'left', fontWeight: '400' },\r\n };\r\n }),\r\n },\r\n\r\n rows: submissionTabData[getUcsListNameKey()].map((row) => {\r\n return {\r\n collapsableOpen: true,\r\n rowProps: { color: theme.colors.white },\r\n cells: Object.keys(row)\r\n .filter(\r\n (key) =>\r\n key !== 'isAvailable' &&\r\n key !== 'genericBlock' &&\r\n key !== 'isAvailableEn'\r\n )\r\n .map((key) => {\r\n if (key === 'ucCode') {\r\n return {\r\n content: (\r\n \r\n {row[key].toString()}\r\n \r\n ),\r\n cellProps: { textAlign: 'center' },\r\n };\r\n } else if (key === 'ucName') {\r\n return {\r\n content: (\r\n <>\r\n \r\n {row[key].toString()}\r\n \r\n {row['isAvailable'] === false && (\r\n \r\n
    \r\n \r\n {t(`certificates.reqNeedWarning`)}\r\n \r\n \r\n \r\n {t(`certificates.reqNeedMessage`)}\r\n \r\n
    \r\n
    \r\n )}\r\n \r\n ),\r\n cellProps: {},\r\n };\r\n } else if (key === 'semester') {\r\n if (row[key] === 0) {\r\n return {\r\n content: (\r\n \r\n {t('certificates.anual', { textOnly: true })}\r\n \r\n ),\r\n cellProps: { textAlign: 'center' },\r\n };\r\n } else if (row[key] === -1) {\r\n return <>;\r\n } else {\r\n return {\r\n content: (\r\n \r\n {`${numeral(row[key]).format(\r\n 'o'\r\n )} ${t('certificates.semester', { textOnly: true })}`}\r\n \r\n ),\r\n cellProps: { textAlign: 'center' },\r\n };\r\n }\r\n } else if (key === 'isAvailable') {\r\n return {\r\n content: (\r\n \r\n {row[key]\r\n ? t('certificates.certIsAvailable', {\r\n textOnly: true,\r\n })\r\n : t('certificates.certIsNotAvailable', {\r\n textOnly: true,\r\n })}\r\n \r\n ),\r\n cellProps: { textAlign: 'center' },\r\n };\r\n }\r\n\r\n return {\r\n content: (\r\n \r\n {row[key]}\r\n \r\n ),\r\n cellProps: { textAlign: 'center' },\r\n };\r\n }),\r\n };\r\n }),\r\n }}\r\n />\r\n )}\r\n
    \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {t('certificates.paymentSummary')}\r\n \r\n \r\n\r\n {}\r\n \r\n \r\n \r\n \r\n \r\n\r\n {/*formValues && formValues.otherDocument && (\r\n \r\n \r\n \r\n \r\n \r\n {t('certificates.visualizeCertificate')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n )*/}\r\n \r\n );\r\n }\r\n};\r\n\r\nexport default NewApplicationSubmission;\r\n\r\nconst Row = styled.div<{ paddingtop?: string; paddingbottom?: string }>`\r\n padding-top: ${({ paddingtop }) => (paddingtop ? paddingtop : '1rem')};\r\n padding-bottom: ${({ paddingbottom }) => (paddingbottom ? paddingbottom : '1rem')};\r\n`;\r\n\r\nconst LanguageWrapper = styled.div`\r\n margin-top: 24px;\r\n display: flex;\r\n flex-direction: column;\r\n\r\n div:nth-child(2) {\r\n margin-top: 15px;\r\n }\r\n`;\r\n\r\nconst DescriptionWrapper = styled.div`\r\n && a {\r\n color: ${({ theme }) => theme.colors.primary};\r\n\r\n :hover {\r\n text-decoration: underline;\r\n }\r\n }\r\n`;\r\n\r\nconst FormatWrapper = styled.div`\r\n margin-top: 24px;\r\n display: flex;\r\n flex-direction: column;\r\n\r\n div:nth-child(2) {\r\n margin-top: 15px;\r\n }\r\n div:nth-child(3) {\r\n margin-top: 12px;\r\n }\r\n`;\r\n\r\nconst TitleWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n margin-bottom: 20px;\r\n`;\r\n\r\nconst LoadingWrapper = styled.div`\r\n width: 100%;\r\n height: 300px;\r\n`;\r\n\r\nconst CertificateData = styled.div`\r\n margin-top: 56px;\r\n`;\r\n\r\nconst CertificateDataNameAndCourse = styled.div`\r\n display: flex;\r\n\r\n & > div {\r\n flex: 0 50%;\r\n }\r\n`;\r\n\r\nconst CertificateSegment = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n margin-top: 17px;\r\n`;\r\n\r\nconst CertificateDataCertificateType = styled.div`\r\n margin-top: 50px;\r\n`;\r\n\r\nconst CertificateDataBlock = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n & > div {\r\n margin-top: 12px;\r\n }\r\n`;\r\n\r\nconst SegmentContent = styled.div`\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n`;\r\n\r\nconst SegmentDescription = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst ModelWrapper = styled.div`\r\n display: flex;\r\n align-items: center;\r\n white-space: nowrap;\r\n`;\r\n\r\nconst LineSeparator = styled.div`\r\n height: 1px;\r\n background: ${({ theme }) => theme.colors.lightGrey};\r\n margin: 16px 0px;\r\n`;\r\n\r\nconst RequestedCurricularYearWrapper = styled.div`\r\n margin-top: 24px;\r\n overflow: auto;\r\n`;\r\n\r\nconst RequestedYearWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n margin-top: 24px;\r\n\r\n div:first-child {\r\n margin-bottom: 15px;\r\n }\r\n`;\r\n\r\nconst SegmentTitleWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst DescriptionText = styled(Text)`\r\n margin-top: 8px;\r\n`;\r\n\r\nconst SegmentSubtitleText = styled(Text)`\r\n margin-top: 8px;\r\n`;\r\n\r\nconst CourseText = styled(Text)`\r\n line-height: 1.3;\r\n`;\r\n\r\nconst FourthStepText = styled(Text)`\r\n margin-top: 12px;\r\n`;\r\n\r\nconst CertificateAdditionalDocsWrapper = styled.div``;\r\n\r\nconst FileDownloaderWrapper = styled.div`\r\n margin-top: 12px;\r\n`;\r\n\r\nconst CertificateAdditionalDocumentsTitle = styled(Text)`\r\n margin-bottom: 12px;\r\n`;\r\n\r\nconst CertificateAdditionalDocuments = styled.div`\r\n margin-top: 40px;\r\n`;\r\n\r\nconst WarningContainer = styled.div`\r\n display: flex;\r\n height: 100%;\r\n\r\n >div: first-child {\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n align-items: start;\r\n height: auto;\r\n font-size: 13px;\r\n\r\n svg {\r\n padding-left: 8px;\r\n }\r\n\r\n span {\r\n font-size: 0.75rem !important;\r\n }\r\n }\r\n`;\r\n","/**\r\n * NewCertificate scene\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport React, { useEffect, useContext, useState, useMemo, useCallback } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\nimport { Grid } from 'semantic-ui-react';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport * as selectors from './logic/selectors';\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faChevronRight, faInfoCircle } from '@fortawesome/pro-light-svg-icons';\r\nimport { faCheck } from '@fortawesome/pro-solid-svg-icons';\r\n\r\nimport { AnimatedBackground, Text, Button, Segment, Modal } from '@paco_ua/pacoui';\r\n\r\nimport NewCertificateSelectRegistration from './containers/NewCertificateSelectRegistration';\r\nimport NewCertificateSelectType from './containers/NewCertificateSelectType';\r\nimport NewCertificateStatement from './containers/NewCertificateStatement';\r\nimport NewCertificateSubmission from './containers/NewCertificateSubmission';\r\n\r\nimport FormManager from 'shared/containers/FormManager';\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\n\r\nimport ReactMarkdown from 'react-markdown';\r\nimport { useTranslation } from 'react-i18next';\r\nimport _ from 'lodash';\r\nimport { useWarningModal } from './hooks/useWarningModal';\r\n\r\nconst NewCertificate = () => {\r\n const { t } = useTranslation();\r\n const theme = useContext(ThemeContext);\r\n\r\n const registrations = useSelector(selectors.getRegistrations);\r\n const {\r\n isExempt,\r\n englishWarning,\r\n isDigital,\r\n currentStep,\r\n certificateData,\r\n certificateCosts,\r\n selectedCertificateType,\r\n loadingSubmission,\r\n loadingStatus,\r\n refreshPage,\r\n hasModeration,\r\n } = useSelector(selectors.getNewCertificateSlice);\r\n\r\n const {\r\n onMount,\r\n onUnmount,\r\n getCertificateForm,\r\n setCurrentStep,\r\n submitCertificate,\r\n resetSelectedCertificateType,\r\n resetSubmissionTabData,\r\n resetFormTabData,\r\n setLoadingStatus,\r\n resetPage,\r\n setRefreshPage,\r\n onLoadPage,\r\n setHasModeration,\r\n } = actions.NewCertificate;\r\n\r\n const dispatch = useDispatch();\r\n\r\n const currentLocale = useSelector(selectors.getAppSlice);\r\n const user = useSelector(selectors.getUser);\r\n\r\n const [loadingFile, setLoadingFile] = useState({});\r\n const [newCertificateReset, setNewCertificateReset] = useState(false);\r\n\r\n const {\r\n shouldRenderModal,\r\n onClose,\r\n setShowModal,\r\n submitButtonText,\r\n showModal,\r\n modalContent,\r\n } = useWarningModal({ form: certificateData.form });\r\n\r\n const steps = [\r\n t('certificates.requestFirstStep'),\r\n t('certificates.requestSecondStep'),\r\n t('certificates.requestThirdStep'),\r\n t('certificates.requestFourthStep'),\r\n ];\r\n\r\n const stepStyles = {\r\n done: {\r\n backgroundColor: theme.colors.primary,\r\n color: theme.colors.white,\r\n fontWeight: 500,\r\n border: 'none',\r\n borderStyle: null,\r\n checkTick: true,\r\n },\r\n current: {\r\n backgroundColor: theme.colors.lightGrey,\r\n color: theme.colors.primary,\r\n fontWeight: 500,\r\n border: 'top',\r\n borderStyle: `2px solid ${theme.colors.primary}`,\r\n checkTick: false,\r\n },\r\n toDo: {\r\n backgroundColor: 'transparent',\r\n color: theme.colors.regularGrey,\r\n fontWeight: 400,\r\n border: 'all',\r\n borderStyle: `1px solid ${theme.colors.regularGrey}`,\r\n checkTick: false,\r\n },\r\n };\r\n\r\n useEffect(() => {\r\n dispatch(onMount());\r\n return () => {\r\n dispatch(onUnmount());\r\n };\r\n }, [dispatch, onMount, onUnmount, user.impersonate]);\r\n\r\n useEffect(() => {\r\n if (refreshPage) {\r\n dispatch(resetPage());\r\n dispatch(onMount());\r\n }\r\n }, [refreshPage]);\r\n\r\n useEffect(() => {\r\n if (currentStep === 3 && certificateData.form === null) {\r\n // get formschema when the user goes to the statement tab from the select certificate types tab\r\n dispatch(getCertificateForm());\r\n }\r\n }, [currentStep]);\r\n\r\n useEffect(() => {\r\n if (newCertificateReset) {\r\n dispatch(setLoadingStatus({ fieldName: 'loading', fieldValue: false }));\r\n setNewCertificateReset(false);\r\n }\r\n }, [newCertificateReset]);\r\n\r\n const getFormSchema = useMemo(() => {\r\n if (certificateData.form) {\r\n const {\r\n additionalDocuments,\r\n details,\r\n requestedCertificate,\r\n mandatoryDocuments,\r\n } = certificateData.form;\r\n\r\n return [\r\n ...(additionalDocuments.values && additionalDocuments.values.length\r\n ? additionalDocuments.values\r\n : []),\r\n ...(details.values && details.values.length ? details.values : []),\r\n ...(requestedCertificate.values && requestedCertificate.values.length\r\n ? requestedCertificate.values\r\n : []),\r\n ...(mandatoryDocuments.values && mandatoryDocuments.values.length\r\n ? mandatoryDocuments.values\r\n : []),\r\n ];\r\n } else {\r\n return [];\r\n }\r\n }, [certificateData]);\r\n\r\n const _renderModal = () => {\r\n return (\r\n onClose(true)}\r\n submitButtonText={submitButtonText}\r\n onSubmit={() => onClose()}\r\n >\r\n \r\n \r\n {modalContent?.title}\r\n \r\n {modalContent?.markdown && {`${modalContent?.markdown}`}}\r\n \r\n {modalContent?.message}\r\n \r\n \r\n \r\n );\r\n };\r\n\r\n const onSubmitCertificate = (data) => {\r\n const exemptionHasModeration = certificateData?.form?.requestedCertificate?.values\r\n ?.find((item) => item?.nameKey === 'exemptionMotive')\r\n ?.values?.find((motive) => motive?.valueId === data?.exemptionMotive)?.hasMotivation;\r\n\r\n if (exemptionHasModeration) {\r\n dispatch(setHasModeration(true));\r\n } else {\r\n dispatch(setHasModeration(false));\r\n }\r\n\r\n if (shouldRenderModal()) {\r\n setShowModal(true);\r\n } else {\r\n dispatch(setCurrentStep(currentStep + 1));\r\n }\r\n };\r\n\r\n const getNextButtonDisabledState = (step) => {\r\n if (step === 1 && certificateData.registrationId) {\r\n return false;\r\n } else if (step === 2 && selectedCertificateType.code) {\r\n return false;\r\n } else if (step === 3) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n };\r\n\r\n \r\n\r\n const isPedagogicalDossierCertificate = useMemo(() => {\r\n //checking the id for dpUc certificates. Check with backend if this condition needs to be changed\r\n if (selectedCertificateType.id === 253) return true;\r\n return false;\r\n }, [selectedCertificateType]);\r\n\r\n return (\r\n }\r\n mainContent={\r\n <>\r\n \r\n {steps.map((step, index) => {\r\n if (index + 1 < currentStep) {\r\n return (\r\n \r\n \r\n {step}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n } else if (index + 1 === currentStep) {\r\n return (\r\n \r\n \r\n {step}\r\n \r\n \r\n );\r\n } else if (index + 1 > currentStep) {\r\n return (\r\n \r\n \r\n {step}\r\n \r\n \r\n );\r\n }\r\n })}\r\n \r\n \r\n {(\r\n { handleSubmit, getValues, watch, reset, setValue },\r\n formElements,\r\n formElementsData\r\n ) => {\r\n return (\r\n <>\r\n {currentStep === 1 && }\r\n {currentStep === 2 && }\r\n {currentStep === 3 && formElements && formElementsData && (\r\n {\r\n setValue(field, []);\r\n }}\r\n setLoadingFile={setLoadingFile}\r\n />\r\n )}\r\n\r\n {currentStep === 4 && (\r\n \r\n )}\r\n \r\n \r\n {currentStep !== 1 && (\r\n {\r\n setLoadingFile({});\r\n reset(); // reset form\r\n dispatch(resetPage());\r\n dispatch(setRefreshPage(true));\r\n //dispatch(onLoadPage());\r\n setNewCertificateReset(true);\r\n }}\r\n >\r\n {t('certificates.requestCancelButton')}\r\n \r\n )}\r\n \r\n {currentStep !== 1 && (\r\n {\r\n if (currentStep === 2) {\r\n dispatch(resetSelectedCertificateType());\r\n } else if (currentStep === 3) {\r\n dispatch(\r\n setLoadingStatus({ fieldName: 'tabLoading', fieldValue: true })\r\n );\r\n\r\n setLoadingFile({});\r\n reset(); // reset form\r\n dispatch(resetFormTabData());\r\n } else if (currentStep === 4) {\r\n dispatch(resetSubmissionTabData());\r\n }\r\n dispatch(setCurrentStep(currentStep - 1));\r\n }}\r\n >\r\n {t('certificates.requestPreviousButton')}\r\n \r\n )}\r\n {(currentStep === 1 || currentStep === 2) && (\r\n }\r\n onClick={() => {\r\n dispatch(\r\n setLoadingStatus({ fieldName: 'tabLoading', fieldValue: true })\r\n );\r\n dispatch(resetFormTabData());\r\n dispatch(setCurrentStep(currentStep + 1));\r\n }}\r\n disabled={\r\n getNextButtonDisabledState(currentStep) || loadingStatus.tabLoading\r\n }\r\n >\r\n {t('certificates.requestNextButton')}\r\n \r\n )}\r\n {currentStep === 3 && (\r\n loadingFile[itemKey] === true\r\n )\r\n }\r\n rightIcon={}\r\n onClick={handleSubmit(onSubmitCertificate)}\r\n >\r\n {t('certificates.requestNextButton')}\r\n \r\n )}\r\n {currentStep === 3 && _renderModal()}\r\n {currentStep === 4 && (\r\n \r\n {certificateCosts.totalCost === 0 || hasModeration ? (\r\n }\r\n onClick={() => {\r\n dispatch(\r\n submitCertificate({\r\n certificateData: certificateData,\r\n certificateOptions: watch(),\r\n selectedCertificateType: selectedCertificateType,\r\n payNow: false,\r\n isExempt: isExempt,\r\n })\r\n );\r\n }}\r\n >\r\n {t('certificates.submitWait')}\r\n \r\n ) : (\r\n <>\r\n }\r\n onClick={() => {\r\n dispatch(\r\n submitCertificate({\r\n certificateData: certificateData,\r\n certificateOptions: watch(),\r\n selectedCertificateType: selectedCertificateType,\r\n payNow: false,\r\n })\r\n );\r\n }}\r\n >\r\n {t('certificates.payLater')}\r\n \r\n }\r\n onClick={() => {\r\n dispatch(\r\n submitCertificate({\r\n certificateData: certificateData,\r\n certificateOptions: watch(),\r\n selectedCertificateType: selectedCertificateType,\r\n payNow: true,\r\n })\r\n );\r\n }}\r\n >\r\n {t('certificates.payNow')}\r\n \r\n \r\n )}\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n );\r\n }}\r\n \r\n \r\n }\r\n secondaryContentOffset={113}\r\n secondaryContent={\r\n (currentStep === 3 || currentStep === 4) && (\r\n <>\r\n \r\n \r\n {isDigital && \r\n <>\r\n \r\n \r\n \r\n \r\n {t('certificates.expiredNotice')}\r\n \r\n \r\n \r\n \r\n }\r\n {isExempt ? (\r\n \r\n \r\n \r\n \r\n {t('certificates.costNote')}\r\n \r\n \r\n {t('certificates.costNoteDescription')}\r\n \r\n \r\n \r\n ) : isPedagogicalDossierCertificate && englishWarning ? (\r\n \r\n \r\n \r\n \r\n {t('certificates.certInvalidEngWarning')}\r\n \r\n \r\n {t('certificates.certInvalidEngMessage')}\r\n \r\n \r\n \r\n ) : null}\r\n \r\n }\r\n >\r\n \r\n \r\n {t('certificates.associatedCosts')}\r\n \r\n \r\n\r\n {loadingStatus.costLoading && (\r\n \r\n \r\n \r\n )}\r\n\r\n {!loadingStatus.costLoading &&\r\n Object.keys(certificateCosts.costs).map((key) => {\r\n return (\r\n \r\n \r\n {t(`certificates.${certificateCosts.costs[key].type}`)}\r\n \r\n\r\n {certificateCosts.costs[key].copies > 1 && (\r\n \r\n {`${certificateCosts.costs[key].copies} x ${parseFloat(\r\n certificateCosts.costs[key].value.toFixed(2)\r\n ).toLocaleString(currentLocale, { minimumFractionDigits: 2 })}€`}\r\n \r\n )}\r\n\r\n {certificateCosts.costs[key].copies === 1 && (\r\n \r\n {`${parseFloat(\r\n certificateCosts.costs[key].value.toFixed(2)\r\n ).toLocaleString(currentLocale, { minimumFractionDigits: 2 })}€`}\r\n \r\n )}\r\n \r\n );\r\n })}\r\n\r\n \r\n\r\n {loadingStatus.costLoading && (\r\n \r\n \r\n \r\n )}\r\n\r\n {!loadingStatus.costLoading && (\r\n \r\n \r\n {t('certificates.totalPayment')}\r\n \r\n\r\n {!loadingStatus.costLoading && (\r\n \r\n {`${parseFloat(\r\n certificateCosts.totalCost.toFixed(2)\r\n ).toLocaleString(currentLocale, { minimumFractionDigits: 2 })}€`}\r\n \r\n )}\r\n \r\n )}\r\n \r\n \r\n \r\n )\r\n }\r\n />\r\n );\r\n};\r\n\r\nexport default NewCertificate;\r\n\r\nconst LoadingWrapper = styled.div<{ height: string }>`\r\n width: 100%;\r\n height: ${({ height }) => `${height}`};\r\n`;\r\n\r\nconst ApplicationStepsWrapper = styled.div`\r\n display: flex;\r\n margin-bottom: 32px;\r\n overflow-y: hidden;\r\n overflow-x: auto;\r\n`;\r\n\r\nconst ApplicationStep = styled.div<{\r\n backgroundColor: string;\r\n border?: string;\r\n borderStyle?: string;\r\n}>`\r\n height: 81px;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n flex: 1;\r\n padding: 0 16px;\r\n background-color: ${({ backgroundColor }) => backgroundColor};\r\n ${({ border, borderStyle }) => {\r\n if (border === 'all') {\r\n return `border: ${borderStyle};`;\r\n } else if (border === 'top') {\r\n return `border-top: ${borderStyle};`;\r\n }\r\n }}\r\n\r\n &:not(:last-child) {\r\n margin-right: 8px;\r\n }\r\n`;\r\n\r\nconst CheckTickWrapper = styled.div`\r\n width: 16px;\r\n height: 16px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n background-color: ${({ theme }) => theme.colors.white};\r\n border-radius: 50%;\r\n\r\n &&& {\r\n min-width: 16px;\r\n height: 16px;\r\n }\r\n\r\n svg {\r\n font-size: 10px;\r\n color: ${({ theme }) => theme.colors.primary};\r\n }\r\n`;\r\n\r\nconst Column = styled(Grid.Column)``;\r\n\r\nconst NavigationButtonsWrapper = styled.div<{ currentStep: number }>`\r\n display: flex;\r\n flex: 1;\r\n justify-content: ${({ currentStep }) => (currentStep === 1 ? `flex-end` : `space-between`)};\r\n margin-top: 32px;\r\n`;\r\n\r\nconst BackwardForwardButtonsWrapper = styled.div`\r\n display: flex;\r\n\r\n > button:last-child {\r\n margin-left: 16px;\r\n }\r\n`;\r\n\r\nconst SidebarWrapper = styled.div`\r\n > div:not(:last-child) {\r\n margin-bottom: 20px;\r\n }\r\n`;\r\n\r\nconst SegmentHeader = styled.div`\r\n margin-bottom: 8px;\r\n`;\r\n\r\nconst CertificateCostWrapper = styled.div`\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n\r\n padding-top: 16px;\r\n\r\n & div:first-child {\r\n max-width: 70%;\r\n }\r\n`;\r\n\r\nconst LineSeparator = styled.div`\r\n height: 1px;\r\n background: ${({ theme }) => theme.colors.lightGrey};\r\n margin-top: 56px;\r\n margin-bottom: 22px;\r\n`;\r\n\r\nconst ExemptionWrapper = styled.div`\r\n display: flex;\r\n justify-content: space-between;\r\n background: ${({ theme }) => theme.colors.softLightGrey};\r\n border-width: 1px;\r\n border-style: solid;\r\n border-color: ${({ theme }) => theme.colors.softRegularGrey};\r\n padding: 16px;\r\n\r\n & :first-child {\r\n margin-right: 16px;\r\n }\r\n\r\n & div:last-child {\r\n flex-grow: 1;\r\n }\r\n`;\r\n\r\nconst ExemptionNote = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n & div:first-child {\r\n margin-bottom: 8px;\r\n margin-top: 0px;\r\n }\r\n`;\r\n\r\nconst NoteDescriptionText = styled(Text)`\r\n line-height: 1.3;\r\n`;\r\n\r\nconst SubmitButtonsWrapper = styled.div`\r\n margin-left: 16px;\r\n display: flex;\r\n\r\n button:first-child {\r\n margin-right: 16px;\r\n }\r\n`;\r\n\r\nconst TabText = styled(Text)`\r\n line-height: 1.2;\r\n`;\r\n\r\nconst ModalStatement = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n margin-bottom: 28px;\r\n\r\n & > div:nth-child(2) {\r\n margin-top: 12px;\r\n }\r\n`;\r\n","export enum ECertificateState {\r\n ready = 'ready',\r\n cancelled = 'cancelled',\r\n pending = 'pending',\r\n awaitingPayment = 'awaitingPayment',\r\n rejected = 'rejected',\r\n submitted = 'submitted',\r\n awaitingExemptionDecision = 'awaitingExemptionDecision',\r\n exemptionDenied = 'exemptionDenied',\r\n expired = 'expired'\r\n}\r\n","/**\r\n * Certificate component\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport React, { useContext, useState, useEffect } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\nimport moment from 'moment';\r\nimport i18n from 'i18next';\r\nimport { t } from 'app';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { actions } from 'store/rootSlices';\r\nimport { faEllipsisH } from '@fortawesome/pro-light-svg-icons';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport {\r\n faHistory,\r\n faKey,\r\n faEye,\r\n faCreditCard,\r\n faClock,\r\n faTimes,\r\n} from '@fortawesome/pro-regular-svg-icons';\r\n\r\nimport { ECertificateState } from '../../types';\r\n\r\nimport { MbIcon } from 'shared/components/Icons';\r\n\r\nimport { Button, Segment, CallToAction, Text, StatusLabel, Tooltip, Modal } from '@paco_ua/pacoui';\r\n\r\nimport * as selectors from '../../logic/selectors';\r\nimport { IRegistration } from 'shared/types';\r\n\r\n//import config from 'config'\r\n\r\ninterface IProps {\r\n type: string;\r\n language: string;\r\n id: number;\r\n state?: ECertificateState | string;\r\n format?: string;\r\n requestDate: string;\r\n responseDate: string | null;\r\n registrationId: number;\r\n ready: boolean;\r\n isExempt: boolean;\r\n exemptionMotive: string;\r\n accessKey: string;\r\n expirationDate: string | null;\r\n paymentState?: string | null;\r\n}\r\n\r\nconst Certificate: React.FC = ({\r\n type,\r\n language,\r\n id,\r\n registrationId,\r\n state,\r\n responseDate,\r\n requestDate,\r\n format,\r\n ready,\r\n isExempt,\r\n exemptionMotive,\r\n accessKey,\r\n expirationDate,\r\n paymentState,\r\n}) => {\r\n const theme = useContext(ThemeContext);\r\n const dispatch = useDispatch();\r\n const user = useSelector(selectors.getUser);\r\n\r\n const { showAccesskeyModal } = useSelector(selectors.getCertificatesListSlice);\r\n const { setShowAccessKeyModal } = actions.CertificatesList;\r\n const { navigateTo } = actions.App;\r\n const { showToaster } = actions.Toaster;\r\n const [selectedRegistration, setSelectedRegistration] = useState(null as null | IRegistration);\r\n\r\n useEffect(() => {\r\n if (registrationId !== null && registrationId !== undefined && user.registrations) {\r\n const registration = user.registrations.find((reg) => reg.registrationId === registrationId);\r\n if (registration) {\r\n setSelectedRegistration(registration);\r\n }\r\n }\r\n }, [registrationId]);\r\n\r\n const getColor = (state) => {\r\n switch (state) {\r\n case ECertificateState.awaitingExemptionDecision:\r\n return theme.colors.decisionYellow;\r\n case ECertificateState.awaitingPayment:\r\n return theme.colors.darkGrey;\r\n case ECertificateState.rejected:\r\n case ECertificateState.cancelled:\r\n case ECertificateState.exemptionDenied:\r\n case ECertificateState.expired:\r\n return theme.colors.dangerRed;\r\n case ECertificateState.ready:\r\n return theme.colors.primary;\r\n default:\r\n return theme.colors.softRegularGrey;\r\n }\r\n };\r\n\r\n const getLabelState = () => {\r\n switch (state) {\r\n case ECertificateState.pending:\r\n return paymentState && paymentState !== 'paid' ? (\r\n \r\n }\r\n >\r\n {t('certificates.labelProcessing')}\r\n \r\n }\r\n />\r\n \r\n ) : (\r\n \r\n }\r\n >\r\n {t('certificates.labelPaid')}\r\n \r\n }\r\n />\r\n \r\n );\r\n case ECertificateState.awaitingPayment:\r\n return (\r\n \r\n }\r\n >\r\n {t('certificates.labelAwaitsPayment')}\r\n \r\n }\r\n />\r\n \r\n );\r\n case ECertificateState.awaitingExemptionDecision:\r\n return (\r\n \r\n }\r\n >\r\n {t('certificates.esenta')}\r\n \r\n }\r\n />\r\n \r\n );\r\n case ECertificateState.rejected:\r\n return (\r\n \r\n }\r\n >\r\n {t('certificates.labelRejected')}\r\n \r\n }\r\n />\r\n \r\n );\r\n case ECertificateState.ready:\r\n return (\r\n \r\n }\r\n >\r\n {t('certificates.labelPaid')}\r\n \r\n }\r\n />\r\n \r\n );\r\n }\r\n };\r\n\r\n const getRequestDateLabel = () => {\r\n const date = moment(expirationDate);\r\n if (moment().isAfter(date, 'day')) {\r\n return (\r\n \r\n {date.format('DD-MM-YYYY')}\r\n \r\n );\r\n } else {\r\n return (\r\n \r\n {date.format('DD-MM-YYYY')}\r\n \r\n );\r\n }\r\n };\r\n\r\n return (\r\n \r\n {\r\n dispatch(\r\n navigateTo({\r\n key: 'certificatesdetails',\r\n params: { certificateId: id, registrationId: registrationId },\r\n })\r\n );\r\n }}\r\n borderless\r\n >\r\n \r\n \r\n }\r\n />\r\n {ready && (\r\n \r\n dispatch(setShowAccessKeyModal({ status: true, accessKey: accessKey }))\r\n }\r\n borderless\r\n >\r\n \r\n \r\n }\r\n />\r\n )}\r\n \r\n }\r\n />\r\n }\r\n >\r\n \r\n \r\n \r\n {t('certificates.listFormat', { textOnly: true })}: {format}\r\n \r\n \r\n\r\n \r\n \r\n \r\n {t('certificates.request', { textOnly: true })}: {id} |{' '}\r\n {t('certificates.listRequestDate', { textOnly: true })}:{' '}\r\n {moment(requestDate).format('DD-MM-YYYY')}\r\n \r\n\r\n {selectedRegistration && (\r\n \r\n {`${type} - ${language}`}\r\n \r\n )}\r\n \r\n \r\n {isExempt && (\r\n \r\n \r\n {t('certificates.withExemption', { textOnly: true })}\r\n \r\n \r\n {exemptionMotive}\r\n \r\n \r\n )}\r\n {responseDate && (\r\n \r\n \r\n \r\n {t('certificates.sentDate', { textOnly: true })}\r\n \r\n \r\n {moment(responseDate).format('DD-MM-YYYY')}\r\n \r\n \r\n {expirationDate && (\r\n \r\n \r\n {t('certificates.expirationDate', { textOnly: true })}\r\n \r\n\r\n \r\n {getRequestDateLabel()}\r\n \r\n \r\n )}\r\n \r\n )}\r\n\r\n {!responseDate && (\r\n \r\n \r\n \r\n {t('certificates.state', { textOnly: true })}\r\n \r\n {(state === ECertificateState.pending) && (\r\n \r\n {t('certificates.stateProcessing', { textOnly: true })}\r\n \r\n )}\r\n {(state === ECertificateState.awaitingExemptionDecision) && (\r\n \r\n {t('certificates.stateAwaitingExemptionDecision', { textOnly: true })}\r\n \r\n )}\r\n {(state === ECertificateState.cancelled ||\r\n state === ECertificateState.rejected) && (\r\n \r\n {t('certificates.cancelled', { textOnly: true })}\r\n \r\n )}\r\n {state === ECertificateState.submitted && (\r\n \r\n {t('certificates.submittedRequest', { textOnly: true })}\r\n \r\n )}\r\n {state === ECertificateState.ready && (\r\n \r\n {t('certificates.ready', { textOnly: true })}\r\n \r\n )}\r\n {state === ECertificateState.exemptionDenied && (\r\n \r\n {t('certificates.stateExemptionDenied', { textOnly: true })}\r\n \r\n )}\r\n {state === ECertificateState.expired && (\r\n \r\n {t('certificates.stateExpired', { textOnly: true })}\r\n \r\n )}\r\n {state === ECertificateState.awaitingPayment && (\r\n \r\n )}\r\n \r\n \r\n )}\r\n\r\n {state !== ECertificateState.rejected &&\r\n state !== ECertificateState.cancelled &&\r\n state !== ECertificateState.exemptionDenied &&\r\n state !== ECertificateState.expired &&\r\n paymentState &&\r\n paymentState !== 'noDebits' && (\r\n \r\n \r\n {t('certificates.paymentState', { textOnly: true })}\r\n \r\n {getLabelState()}\r\n \r\n )}\r\n \r\n \r\n \r\n dispatch(setShowAccessKeyModal({ status: false, accessKey: '' }))}\r\n data-testid=\"access-key-modal\"\r\n >\r\n \r\n \r\n {t('certificates.accessKey', { textOnly: true })}\r\n \r\n \r\n {accessKey}\r\n \r\n {\r\n const path =\r\n i18n.language === 'en' ? 'certificate-consultation' : 'consulta-certidao';\r\n\r\n try {\r\n await navigator.clipboard.writeText(`${window.location.host}/${path}/${accessKey}`);\r\n dispatch(\r\n showToaster({\r\n title: t('certificates.copied', { textOnly: true }),\r\n icon: 'check',\r\n type: 'success',\r\n })\r\n );\r\n } catch (err) {}\r\n }}\r\n >\r\n {t('certificates.copyLink', { textOnly: true })}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default Certificate;\r\n\r\nconst SegmentHeader = styled.div`\r\n margin-bottom: 16px;\r\n`;\r\n\r\nconst SegmentSubHeader = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst DateWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst ResponseDateWrapper = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n\r\n > div {\r\n margin-right: 24px;\r\n }\r\n`;\r\n\r\nconst PaymentStateWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst FooterWrapper = styled.div`\r\n display: flex;\r\n justify-content: left;\r\n`;\r\n\r\nconst SegmentBody = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n height: 100%;\r\n`;\r\n\r\nconst SegmentLabels = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n flex-wrap: wrap;\r\n margin-top 8px;\r\n padding-top: -8px;\r\n\r\n > div {\r\n margin-top: 8px;\r\n &:not(:last-child) {\r\n margin-right: 8px;\r\n }\r\n }\r\n`;\r\n\r\nconst SegmentWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: space-between;\r\n flex-grow: 1;\r\n`;\r\n\r\nconst StatusLabelWrapper = styled.div`\r\n margin-top: 4px;\r\n`;\r\n\r\nconst TextWrapper = styled(Text)`\r\n margin-top: 4px;\r\n line-height: 1.3;\r\n`;\r\n\r\nconst TextLabel = styled(Text)`\r\n margin-top: 4px;\r\n`;\r\n\r\nconst ModalStatement = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n > button {\r\n margin-top: 12px;\r\n max-width: 10rem;\r\n }\r\n`;\r\n","/**\r\n * CertificatesList scene\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport React, { useEffect, useContext } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\nimport { Grid } from 'semantic-ui-react';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport { AnimatedBackground, MultiToggle, Text, SearchBox, Dropdown } from '@paco_ua/pacoui';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faInfoCircle } from '@fortawesome/pro-light-svg-icons';\r\n\r\nimport StudentRegistrationDropdown from 'shared/containers/StudentRegistrationDropdown';\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\n\r\nimport Certificate from './components/Certificate';\r\nimport * as selectors from './logic/selectors';\r\n\r\nconst CertificatesList = ({ t }) => {\r\n const {\r\n loadingStatus,\r\n errorStatus,\r\n certificatesList,\r\n certificatesFilters,\r\n requestParams,\r\n } = useSelector(selectors.getCertificatesListSlice);\r\n\r\n const currentRegistrationId = useSelector(selectors.getRegistration);\r\n\r\n const theme = useContext(ThemeContext);\r\n const { onMount, onUnmount, getData } = actions.CertificatesList;\r\n const user = useSelector(selectors.getUser);\r\n\r\n const dispatch = useDispatch();\r\n\r\n const currentLocale = useSelector(selectors.getAppSlice);\r\n\r\n useEffect(() => {\r\n dispatch(onMount());\r\n return () => {\r\n dispatch(onUnmount());\r\n };\r\n }, [dispatch, onMount, onUnmount, user.impersonate, currentLocale]);\r\n\r\n useEffect(() => {\r\n if (currentRegistrationId) {\r\n dispatch(getData());\r\n }\r\n }, [currentRegistrationId, currentLocale]);\r\n\r\n return (\r\n }\r\n subHeader={\r\n \r\n {t('certificates.listPageSubHeader1', {\r\n textOnly: true,\r\n })}\r\n  \r\n \r\n {t('certificates.listPageSubHeader2', {\r\n textOnly: true,\r\n })}\r\n  \r\n \r\n \r\n }\r\n mainContent={\r\n <>\r\n \r\n \r\n \r\n\r\n {!loadingStatus.loading && !errorStatus.errLoadingCertificateList && (\r\n \r\n {\r\n dispatch(getData({ search: value }));\r\n }}\r\n />\r\n {\r\n dispatch(getData({ type: value }));\r\n }}\r\n onClear={() => {\r\n dispatch(getData({ type: '' }));\r\n }}\r\n />\r\n \r\n )}\r\n\r\n {!loadingStatus.loading && !errorStatus.errLoadingCertificateList && }\r\n\r\n {!loadingStatus.loading && !errorStatus.errLoadingCertificateList && (\r\n \r\n {\r\n dispatch(getData({ state: 'ready' }));\r\n },\r\n children: t('certificates.toggleEmitted', { textOnly: true }),\r\n selected: requestParams.state === 'ready',\r\n testId: 'certificates_list_multitoggle_type_emmitedCertificates',\r\n },\r\n {\r\n onClick: () => {\r\n dispatch(getData({ state: 'pending' }));\r\n },\r\n children: t('certificates.toggleProcessing', { textOnly: true }),\r\n selected: requestParams.state === 'pending',\r\n testId: 'certificates_list_multitoggle_type_inProcessing',\r\n },\r\n {\r\n onClick: () => {\r\n dispatch(getData({ state: 'awaitingPayment' }));\r\n },\r\n children: t('certificates.toggleAwaitsPayment', { textOnly: true }),\r\n selected: requestParams.state === 'awaitingPayment',\r\n testId: 'certificates_list_multitoggle_type_awaitsPayment',\r\n },\r\n {\r\n onClick: () => {\r\n dispatch(getData({ state: 'rejected' }));\r\n },\r\n children: t('certificates.toggleRejected', { textOnly: true }),\r\n selected: requestParams.state === 'rejected',\r\n testId: 'certificates_list_multitoggle_type_rejected',\r\n },\r\n {\r\n onClick: () => {\r\n dispatch(getData({ state: 'expired' }));\r\n },\r\n children: t('certificates.toggleExpired', { textOnly: true }),\r\n selected: requestParams.state === 'expired',\r\n testId: 'certificates_list_multitoggle_type_expired',\r\n },\r\n ]}\r\n content={'buttons'}\r\n />\r\n \r\n )}\r\n\r\n {errorStatus.errLoadingCertificateList ||\r\n (!loadingStatus.loading && loadingStatus.loadingCertificatesList && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n\r\n {!loadingStatus.loadingCertificatesList &&\r\n !errorStatus.errLoadingCertificateList &&\r\n certificatesList &&\r\n certificatesList.length > 0 && (\r\n \r\n {certificatesList.map((certificate) => {\r\n return (\r\n \r\n \r\n \r\n );\r\n })}\r\n \r\n )}\r\n\r\n {!loadingStatus.loadingCertificatesList &&\r\n !errorStatus.errLoadingCertificateList &&\r\n certificatesList.length === 0 && (\r\n \r\n \r\n \r\n \r\n \r\n {t('certificates.noCertificateListFound', { textOnly: true })}\r\n \r\n \r\n )}\r\n \r\n }\r\n />\r\n );\r\n};\r\n\r\nexport default CertificatesList;\r\n\r\nconst StudentRegistrationDropdownWrapper = styled.div`\r\n margin-bottom: 32px;\r\n`;\r\n\r\nconst SearchAndFiltersWrapper = styled.div`\r\n width: 75%;\r\n display: flex;\r\n margin-bottom: 24px;\r\n\r\n > div {\r\n width: 50%;\r\n }\r\n\r\n > div:last-child {\r\n margin-left: 16px;\r\n }\r\n`;\r\n\r\nconst Separator = styled.div`\r\n height: 1px;\r\n background-color: ${({ theme }) => theme.colors.softRegularGrey};\r\n margin-top: 16px;\r\n margin-bottom: 24px;\r\n`;\r\n\r\nconst MultiToggleWrapper = styled.div`\r\n border-bottom: 1px solid ${({ theme }) => theme.colors.primary};\r\n overflow-y: hidden;\r\n overflow-x: auto;\r\n`;\r\n\r\nconst CertificatesWrapper = styled(Grid)`\r\n &&& {\r\n margin-top: 24px;\r\n }\r\n`;\r\n\r\nconst LoadingWrapper = styled.div`\r\n width: 100%;\r\n height: 300px;\r\n\r\n margin-top: 32px;\r\n\r\n * {\r\n margin: 8px 0px;\r\n }\r\n`;\r\n\r\nconst CertificateWrapper = styled(Grid.Column)``;\r\n\r\nconst MessageNoCertificates = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n text-align: center;\r\n justify-content: center;\r\n margin-top: 60px;\r\n margin-bottom: 20px;\r\n\r\n div:nth-child(2) {\r\n margin-top: 16px;\r\n }\r\n`;\r\n\r\nconst Icon = styled.div`\r\n font-size: 60px;\r\n color: ${({ theme }) => theme.colors.primary};\r\n`;\r\n","/**\r\n * PdfReader component\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport React, { useState, useEffect } from 'react';\r\nimport styled from 'styled-components';\r\n\r\nimport { Worker, Viewer, OpenFile } from '@react-pdf-viewer/core';\r\nimport { getFilePlugin,RenderDownloadProps } from '@react-pdf-viewer/get-file';\r\nimport { Text } from '@paco_ua/pacoui';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faDownload } from '@fortawesome/pro-light-svg-icons';\r\n\r\n\r\n\r\ninterface IProps {\r\n document: {\r\n url: string | Uint8Array;\r\n name?: string;\r\n };\r\n height?: string;\r\n}\r\n\r\nconst PdfReader: React.FC = ({ document, height }) => {\r\n const [numPages, setNumPages] = useState(null);\r\n const [pageNumber, setPageNumber] = useState(1);\r\n\r\n // TODO: check if the httpHeaders are still necessary\r\n const [httpHeader, setHttpHeader] = useState(\r\n {} as\r\n | {\r\n Authorization: string;\r\n IDToken: string;\r\n 'Access-Control-Allow-Origin': string;\r\n mode: string;\r\n }\r\n | undefined\r\n );\r\n const getFilePluginInstance = getFilePlugin({\r\n fileNameGenerator: (file: OpenFile) => {\r\n // `file.name` is the URL of opened file\r\n const fileName = document.name;\r\n return `${fileName}`;\r\n },\r\n });\r\n const { Download } = getFilePluginInstance;\r\n\r\n const onDocumentLoadSuccess = ({ doc }) => {\r\n setNumPages(doc.numPages);\r\n };\r\n\r\n const onPageChange = ({ currentPage }) => {\r\n setPageNumber(currentPage + 1);\r\n };\r\n\r\n // TODO: check if the httpHeaders are still necessary\r\n useEffect(() => {\r\n const user = JSON.parse(localStorage.getItem('user') || '{}');\r\n\r\n if (user) {\r\n setHttpHeader({\r\n 'Access-Control-Allow-Origin': '*',\r\n mode: 'no-cors',\r\n Authorization: `Bearer ${user.accessToken}`,\r\n IDToken: `Bearer ${user.idToken}`,\r\n });\r\n } else {\r\n setHttpHeader(undefined);\r\n }\r\n }, []);\r\n\r\n return (\r\n \r\n \r\n {document.name && (\r\n \r\n {document.name}\r\n \r\n )}\r\n \r\n {pageNumber}/{numPages}\r\n \r\n \r\n {\r\n (props: RenderDownloadProps) => (\r\n \r\n )\r\n }\r\n \r\n \r\n\r\n {httpHeader !== undefined && (\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default PdfReader;\r\n\r\nconst Wrapper = styled.div<{ height?: string }>`\r\n height: ${({ height }) => (height ? height : '100%')};\r\n`;\r\n\r\nconst PdfWrapper = styled.div<{ height?: string }>`\r\n height: calc(100% - 70px);\r\n background-color: ${({ theme }) => theme.colors.softGrey};\r\n border: 1px solid ${({ theme }) => theme.colors.softRegularGrey};\r\n border-top: none;\r\n\r\n &&& {\r\n .rpv-core-inner-page {\r\n background-color: ${({ theme }) => theme.colors.softGrey};\r\n }\r\n }\r\n`;\r\n\r\nconst PageNumbersWrapper = styled.div`\r\n width: 100%;\r\n height: 70px;\r\n background-color: ${({ theme }) => theme.colors.primary};\r\n border: 1px solid ${({ theme }) => theme.colors.primary};\r\n padding: 0 24px;\r\n display: flex;\r\n align-items: center;\r\n`;\r\n\r\nconst TextLeft = styled(Text)`\r\n text-align: left;\r\n width: 100%;\r\n`;\r\n\r\nconst TextRight = styled(Text)`\r\n text-align: right;\r\n width: 100%;\r\n`;\r\n","/**\r\n * CertificatesDetails scene utils\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\nimport moment from 'moment';\r\nimport { t } from 'app';\r\nimport { ITableStructure, FlagLabel } from '@paco_ua/pacoui';\r\nimport { ICertificateAccessHistory } from './logic/slice';\r\nimport React from 'react';\r\n\r\nexport const getCertificateState = (certificatesDetails) => {\r\n if (certificatesDetails.state.state === 'rejected') {\r\n return 'rejected';\r\n }\r\n\r\n if (!certificatesDetails.history.awaitingPayment) {\r\n return 'pendingPayment';\r\n }\r\n if (!certificatesDetails.history.pending) {\r\n return 'sending';\r\n }\r\n\r\n return 'processing';\r\n};\r\n\r\nexport const getDeliveryMethod = (certificatesDetails) => {\r\n if (\r\n !certificatesDetails.state.method === null &&\r\n certificatesDetails.state.method !== undefined\r\n ) {\r\n return certificatesDetails.state.format;\r\n }\r\n\r\n if (!certificatesDetails.email === null && certificatesDetails.email !== undefined) {\r\n return certificatesDetails.email;\r\n }\r\n\r\n return null;\r\n};\r\n\r\nexport const getCertificatePaymentDate = (certificatesDetails) => {\r\n if (certificatesDetails.history.awaitingPayment) {\r\n return moment(certificatesDetails.history.awaitingPayment).format('DD-MM-YYYY');\r\n }\r\n};\r\n\r\nexport const isPaid = (certificatesDetails) => {\r\n if (certificatesDetails.history.awaitingPayment) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n};\r\n\r\nexport const getRegistration = (id, registrations) => {\r\n return registrations.find((reg) => reg.registrationId === id);\r\n};\r\n\r\nexport const getAccessHistoryModalStructure = (\r\n accessHistory: ICertificateAccessHistory[]\r\n): ITableStructure => {\r\n return {\r\n header: {\r\n type: 'columnTitle' as string,\r\n titles: [\r\n {\r\n text: t('certificates.accessCountry'),\r\n },\r\n {\r\n text: t('certificates.accessDate'),\r\n },\r\n {\r\n text: t('certificates.accessTime'),\r\n },\r\n ],\r\n },\r\n rows: accessHistory.map((el) => {\r\n return {\r\n cells: [\r\n {\r\n content: ,\r\n cellProps: '',\r\n },\r\n {\r\n content: moment(el.accessDate).format('DD-MM-YYYY'),\r\n cellProps: '',\r\n },\r\n {\r\n content: el.accessTime,\r\n cellProps: '',\r\n },\r\n ],\r\n };\r\n }),\r\n };\r\n};\r\n","/**\r\n * CertificateReady container\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport React, { useContext } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\nimport moment from 'moment';\r\nimport numeral from 'numeral';\r\n\r\nimport { t } from 'app';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faFilePdf, faEllipsisH } from '@fortawesome/pro-light-svg-icons';\r\nimport { faCreditCard, faClock, faTimes, faChevronRight } from '@fortawesome/pro-regular-svg-icons';\r\nimport { MbIcon } from 'shared/components/Icons';\r\n\r\nimport { Text, StatusLabel } from '@paco_ua/pacoui';\r\nimport PdfReader from './PdfReader';\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\n\r\nimport { ICertificateDetails } from '../../logic/slice';\r\n\r\nimport { getDeliveryMethod } from '../../utils';\r\nimport CertificateState from '../../components/CertificateState';\r\nimport { ECertificateState } from 'scenes/VirtualSecretary/Certificates/CertificatesList/types';\r\nimport CertificatesDetails from '../..';\r\n\r\nimport config from 'config';\r\nimport API from 'api';\r\nimport { useDispatch } from 'react-redux';\r\nimport { actions } from 'store/rootSlices';\r\n\r\ninterface IProps {\r\n certificatesDetails: ICertificateDetails;\r\n certificateFile?: Uint8Array | string | null;\r\n}\r\n\r\nconst CertificatesReady: React.FC = ({ certificatesDetails, certificateFile }) => {\r\n const theme = useContext(ThemeContext);\r\n const dispatch = useDispatch();\r\n\r\n const PAID_STATUS_COLOR = {\r\n noDebits: theme.colors.darkGrey,\r\n awaitingPayment: theme.colors.decisionYellow,\r\n paid: theme.colors.dangerRed,\r\n };\r\n\r\n const getColor = (state) => {\r\n switch (state) {\r\n case ECertificateState.awaitingExemptionDecision:\r\n return theme.colors.decisionYellow;\r\n case ECertificateState.awaitingPayment:\r\n return theme.colors.darkGrey;\r\n case ECertificateState.rejected:\r\n case ECertificateState.cancelled:\r\n return theme.colors.dangerRed;\r\n case ECertificateState.ready:\r\n return theme.colors.primary;\r\n default:\r\n return theme.colors.softRegularGrey;\r\n }\r\n };\r\n\r\n const getLabelState = () => {\r\n switch (certificatesDetails.state.state) {\r\n case ECertificateState.pending:\r\n return (\r\n \r\n }\r\n >\r\n {t('certificates.labelProcessing')}\r\n \r\n }\r\n />\r\n \r\n );\r\n case ECertificateState.awaitingPayment:\r\n return (\r\n \r\n }\r\n >\r\n {t('certificates.labelAwaitsPayment')}\r\n \r\n }\r\n />\r\n \r\n );\r\n case ECertificateState.awaitingExemptionDecision:\r\n return (\r\n \r\n }\r\n >\r\n {t('certificates.esenta')}\r\n \r\n }\r\n />\r\n \r\n );\r\n case ECertificateState.rejected:\r\n return (\r\n \r\n }\r\n >\r\n {t('certificates.labelRejected')}\r\n \r\n }\r\n />\r\n \r\n );\r\n case ECertificateState.ready:\r\n return (\r\n \r\n }\r\n >\r\n {t('certificates.labelPaid')}\r\n \r\n }\r\n />\r\n \r\n );\r\n }\r\n };\r\n\r\n const getRequestDateLabel = () => {\r\n const date = moment(certificatesDetails.state.expirationDate);\r\n\r\n if (moment().isAfter(date, 'day')) {\r\n return (\r\n \r\n {date.format('DD-MM-YYYY')}\r\n \r\n );\r\n } else {\r\n return (\r\n \r\n {date.format('DD-MM-YYYY')}\r\n \r\n );\r\n }\r\n };\r\n\r\n return (\r\n }\r\n mainContent={\r\n certificateFile && (\r\n \r\n )\r\n }\r\n secondaryContent={\r\n \r\n \r\n \r\n {t('certificates.details')}\r\n \r\n {/* \r\n {`${t('certificates.request', { textOnly: true })}: ${\r\n certificatesDetails.state.id\r\n } | ${moment(certificatesDetails.state.requestDate).format('DD-MM-YYYY')}`}\r\n */}\r\n \r\n \r\n \r\n {t('certificates.request', { textOnly: true })}: {certificatesDetails.state.id} |{' '}\r\n {t('certificates.listRequestDate', { textOnly: true })}:{' '}\r\n {moment(certificatesDetails.state.requestDate).format('DD-MM-YYYY')}\r\n \r\n\r\n \r\n {`${certificatesDetails.state.type}`}\r\n \r\n \r\n \r\n {certificatesDetails.state.responseDate && (\r\n \r\n \r\n \r\n {t('certificates.sentDate', { textOnly: true })}\r\n \r\n \r\n {moment(certificatesDetails.state.responseDate).format('DD-MM-YYYY')}\r\n \r\n \r\n {certificatesDetails.state.expirationDate && (\r\n \r\n \r\n {t('certificates.expirationDate', { textOnly: true })}\r\n \r\n \r\n {getRequestDateLabel()}\r\n \r\n \r\n )}\r\n \r\n )}\r\n\r\n {!certificatesDetails.state.responseDate && (\r\n \r\n \r\n \r\n {t('certificates.state', { textOnly: true })}\r\n \r\n {(certificatesDetails.state.state === ECertificateState.pending ||\r\n certificatesDetails.state.state ===\r\n ECertificateState.awaitingExemptionDecision) && (\r\n \r\n {t('certificates.stateProcessing', { textOnly: true })}\r\n \r\n )}\r\n {(certificatesDetails.state.state === ECertificateState.cancelled ||\r\n certificatesDetails.state.state === ECertificateState.rejected) && (\r\n \r\n {t('certificates.cancelled', { textOnly: true })}\r\n \r\n )}\r\n {certificatesDetails.state.state === ECertificateState.submitted && (\r\n \r\n {t('certificates.submittedRequest', { textOnly: true })}\r\n \r\n )}\r\n {certificatesDetails.state.state === ECertificateState.ready && (\r\n \r\n {t('certificates.ready', { textOnly: true })}\r\n \r\n )}\r\n {certificatesDetails.state.state === ECertificateState.awaitingPayment && (\r\n \r\n )}\r\n \r\n \r\n )}\r\n\r\n {certificatesDetails.state.state !== ECertificateState.rejected &&\r\n certificatesDetails.state.state !== ECertificateState.cancelled && (\r\n \r\n \r\n {t('certificates.paymentState', { textOnly: true })}\r\n \r\n {getLabelState()}\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n {certificatesDetails.certificate.id > 0 && (\r\n <>\r\n \r\n \r\n {t('certificates.actions')}\r\n \r\n \r\n {\r\n dispatch(\r\n actions.CertificatesDetails.openChangeHistoryModal({\r\n certificateId: certificatesDetails.state.id,\r\n registrationId: certificatesDetails.state.registrationId,\r\n })\r\n );\r\n }}\r\n >\r\n \r\n {t('certificates.changeHistory')}\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n\r\n \r\n \r\n \r\n {t('certificates.detailsLang')}\r\n \r\n \r\n {certificatesDetails.state.language}\r\n \r\n \r\n {certificatesDetails.state.format && (\r\n \r\n \r\n {t('certificates.detailsFormat')}\r\n \r\n \r\n {certificatesDetails.state.format}\r\n \r\n \r\n )}\r\n {getDeliveryMethod(certificatesDetails) && (\r\n \r\n \r\n {t('certificates.detailsDeliveryType')}\r\n \r\n \r\n \r\n {getDeliveryMethod(certificatesDetails)}\r\n \r\n {certificatesDetails.state.method === 'deliveryMethodMail' &&\r\n certificatesDetails.history.pending && (\r\n \r\n {t('certificates.shipmentDataDate')}:{' '}\r\n {moment(certificatesDetails.history.pending).format('DD-MM-YYYY')}\r\n \r\n )}\r\n \r\n \r\n )}\r\n \r\n {certificatesDetails.state.format === 'Digital'\r\n ? certificatesDetails.email && (\r\n <>\r\n \r\n \r\n \r\n \r\n {t('certificates.shipmentData')}\r\n \r\n \r\n \r\n {certificatesDetails.email && (\r\n \r\n \r\n {t('certificates.detailsStudentEmail')}\r\n \r\n \r\n {certificatesDetails.email}\r\n \r\n \r\n )}\r\n \r\n \r\n \r\n )\r\n : (certificatesDetails?.address?.homeAddress ||\r\n certificatesDetails?.address?.homeLocality ||\r\n certificatesDetails?.address?.homePostalCode ||\r\n certificatesDetails.email) && (\r\n <>\r\n \r\n \r\n \r\n \r\n {t('certificates.shipmentData')}\r\n \r\n \r\n \r\n {certificatesDetails.email && (\r\n \r\n \r\n {t('certificates.detailsStudentEmail')}\r\n \r\n \r\n {certificatesDetails.email}\r\n \r\n \r\n )}\r\n {(certificatesDetails?.address?.homeAddress ||\r\n certificatesDetails?.address?.homeLocality ||\r\n certificatesDetails?.address?.homePostalCode) && (\r\n <>\r\n \r\n \r\n {t('generic.address')}\r\n \r\n \r\n {certificatesDetails.address.homeAddress}\r\n \r\n \r\n \r\n \r\n \r\n {t('generic.locality')}\r\n \r\n \r\n {certificatesDetails.address.homeLocality}\r\n \r\n \r\n \r\n \r\n {t('generic.postCode')}\r\n \r\n \r\n {certificatesDetails.address.homePostalCode.number}\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n {t('certificates.exemptionTitle')}\r\n \r\n \r\n {certificatesDetails.state.isExempt\r\n ? t('certificates.withExemption')\r\n : t('certificates.withoutExemption')}\r\n \r\n\r\n {certificatesDetails.state.isExempt && (\r\n \r\n {t('certificates.exemptionMotiveShort')}:{' '}\r\n {certificatesDetails.state.exemptionMotive}\r\n \r\n )}\r\n\r\n {!certificatesDetails.state.isExempt ?? (\r\n \r\n {t('certificates.totalPaid')}:  \r\n \r\n {t('generic.euros', {\r\n count: numeral(certificatesDetails.payment?.totalCost).format('0.00'),\r\n })}\r\n \r\n \r\n )}\r\n \r\n {certificatesDetails.certificate !== null && (\r\n }\r\n >\r\n {certificatesDetails.certificate?.name}\r\n \r\n )}\r\n {certificatesDetails.payment?.receipt !== null && certificatesDetails.payment !== null && (\r\n <>\r\n \r\n \r\n \r\n {t('payments.receipt')}\r\n \r\n \r\n {certificatesDetails.payment?.receipt?.id}\r\n \r\n \r\n {\r\n API.files.getFileOnTab\r\n .call(\r\n `${config.API_WSO2}${config.API_SEC_VIRTUAL_PATH}${certificatesDetails.payment?.receipt?.url}`\r\n )\r\n .catch((e) => {\r\n dispatch(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.general_errorLoadingFile'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n });\r\n }}\r\n icon={}\r\n >\r\n {certificatesDetails.payment?.receipt?.name}\r\n \r\n \r\n )}\r\n \r\n }\r\n />\r\n );\r\n};\r\n\r\nexport default CertificatesReady;\r\n\r\nconst DetailsWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst DetailsTitle = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n margin-bottom: 20px;\r\n\r\n div:nth-child(2) {\r\n margin-top: 8px;\r\n }\r\n`;\r\n\r\nconst DetailsItems = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n > div:not(:last-child) {\r\n margin-bottom: 16px;\r\n }\r\n`;\r\n\r\nconst ChangesItem = styled.div`\r\n display: flex;\r\n flex-direction: Row;\r\n justify-content: space-between;\r\n`;\r\n\r\nconst DetailItem = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n > div:not(:last-child) {\r\n margin-bottom: 10px;\r\n }\r\n`;\r\n\r\nconst DetailSubItem = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst DetailsSentTitle = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n margin-bottom: 12px;\r\n`;\r\n\r\nconst DetailsSentItems = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n > div:not(:last-child) {\r\n margin-bottom: 10px;\r\n }\r\n`;\r\n\r\nconst DetailsSentItem = styled.div<{ row?: boolean }>`\r\n display: flex;\r\n flex-direction: ${({ row }) => (row ? 'row' : 'column')};\r\n\r\n > div:not(:last-child) {\r\n margin-right: ${({ row }) => (row ? '24px' : '0')};\r\n }\r\n\r\n div:nth-child(2) {\r\n /* margin-top: 8px; */\r\n }\r\n`;\r\n\r\nconst DetailsSent = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst Separator = styled.div`\r\n height: 1px;\r\n width: 100%;\r\n background-color: ${({ theme }) => theme.colors.softRegularGrey};\r\n margin: 16px 0;\r\n`;\r\n\r\nconst CostDetails = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n > div:not(:first-child) {\r\n margin-top: 4px;\r\n }\r\n\r\n > div:last-child {\r\n margin-bottom: 18px;\r\n }\r\n\r\n div:nth-child(2) {\r\n margin-top: 10px;\r\n }\r\n\r\n div:nth-child(3) {\r\n margin-top: 10px;\r\n }\r\n\r\n div:nth-child(4) {\r\n margin-top: 10px;\r\n }\r\n`;\r\n\r\nconst SegmentLabels = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n flex-wrap: wrap;\r\n margin-top 8px;\r\n padding-top: -8px;\r\n\r\n > div {\r\n margin-top: 8px;\r\n &:not(:last-child) {\r\n margin-right: 8px;\r\n }\r\n }\r\n`;\r\n\r\nconst SegmentWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: space-between;\r\n flex-grow: 1;\r\n`;\r\n\r\nconst StatusLabelWrapper = styled.div`\r\n margin-top: 4px;\r\n`;\r\n\r\nconst TextWrapper = styled(Text)`\r\n margin-top: 4px;\r\n line-height: 1.3;\r\n`;\r\n\r\nconst TextLabel = styled(Text)`\r\n margin-top: 4px;\r\n`;\r\nconst SegmentSubHeader = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst DateWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst ValidDateWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n margin-top: 0px !important;\r\n`;\r\n\r\nconst ResponseDateWrapper = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n\r\n > div {\r\n margin-right: 24px;\r\n }\r\n`;\r\n\r\nconst PaymentStateWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n","/**\r\n * CertificateState component\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport React, { useEffect, useState } from 'react';\r\nimport styled from 'styled-components';\r\n\r\nimport { t } from 'app';\r\nimport moment from 'moment';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faClock, faCreditCard, faPaperPlane, faTimes } from '@fortawesome/pro-light-svg-icons';\r\n\r\nimport { Text, Theme as theme } from '@paco_ua/pacoui';\r\n\r\n//import config from 'config'\r\n\r\ninterface IProps {\r\n certificatesDetails: any;\r\n}\r\n\r\nconst CertificateState: React.FC = ({ certificatesDetails }) => {\r\n const generateStates = (certificatesDetails) => {\r\n let elements = [] as any;\r\n\r\n certificatesDetails.history.forEach((item, index) => {\r\n const isNotLast = index === certificatesDetails.history.length - 1; // Check if it's the last element\r\n\r\n if (item.state === 'awaitingPayment') {\r\n elements.push(\r\n
    \r\n \r\n \r\n \r\n }\r\n //transform=\"uppercase\"\r\n >\r\n {t('certificates.stateAwaitingPayment')}\r\n \r\n \r\n {item.date && (\r\n \r\n \r\n {t('certificates.stateDate')}:{' '}\r\n \r\n {moment(item.date).format(\"DD-MM-YYYY HH:mm\")}\r\n \r\n \r\n \r\n )}\r\n \r\n
    \r\n );\r\n } else if (item.state === 'paymentDone') {\r\n elements.push(\r\n
    \r\n \r\n \r\n \r\n }\r\n //transform=\"uppercase\"\r\n >\r\n {t('certificates.statePaid')}\r\n \r\n \r\n {item.date && (\r\n \r\n \r\n {t('certificates.stateDate')}:{' '}\r\n \r\n {moment(item.date).format(\"DD-MM-YYYY HH:mm\")}\r\n \r\n \r\n \r\n )}\r\n \r\n
    \r\n );\r\n } else if (item.state === 'sent') {\r\n elements.push(\r\n
    \r\n \r\n \r\n \r\n }\r\n //transform=\"uppercase\"\r\n >\r\n {t('certificates.stateSent')}\r\n \r\n \r\n {item.date && (\r\n \r\n \r\n {t('certificates.stateDate')}:{' '}\r\n \r\n {moment(item.date).format(\"DD-MM-YYYY HH:mm\")}\r\n \r\n \r\n \r\n )}\r\n \r\n
    \r\n );\r\n } else if (item.state === 'expired') {\r\n elements.push(\r\n
    \r\n \r\n \r\n \r\n }\r\n //transform=\"uppercase\"\r\n >\r\n {t('certificates.stateExpired')}\r\n \r\n \r\n {item.date && (\r\n \r\n \r\n {t('certificates.stateDate')}:{' '}\r\n \r\n {moment(item.date).format(\"DD-MM-YYYY HH:mm\")}\r\n \r\n \r\n \r\n )}\r\n \r\n
    \r\n );\r\n } else if (item.state === 'exemptionAccepted') {\r\n elements.push(\r\n
    \r\n \r\n \r\n \r\n }\r\n //transform=\"uppercase\"\r\n >\r\n {t('certificates.stateExemptionAccepted')}\r\n \r\n \r\n {item.date && (\r\n \r\n \r\n {t('certificates.stateDate')}:{' '}\r\n \r\n {moment(item.date).format(\"DD-MM-YYYY HH:mm\")}\r\n \r\n \r\n \r\n )}\r\n \r\n
    \r\n );\r\n } else if (item.state === 'exemptionDenied') {\r\n elements.push(\r\n
    \r\n \r\n \r\n \r\n }\r\n //transform=\"uppercase\"\r\n >\r\n {t('certificates.stateExemptionDenied')}\r\n \r\n \r\n {item.date && (\r\n \r\n \r\n {t('certificates.stateDate')}:{' '}\r\n \r\n {moment(item.date).format(\"DD-MM-YYYY HH:mm\")}\r\n \r\n \r\n \r\n )}\r\n \r\n
    \r\n );\r\n } else if (item.state === 'awaitingExemptionDecision') {\r\n elements.push(\r\n
    \r\n \r\n \r\n \r\n }\r\n //transform=\"uppercase\"\r\n >\r\n {t('certificates.stateAwaitingExemptionDecision')}\r\n \r\n \r\n {item.date && (\r\n \r\n \r\n {t('certificates.stateDate')}:{' '}\r\n \r\n {moment(item.date).format(\"DD-MM-YYYY HH:mm\")}\r\n \r\n \r\n \r\n )}\r\n \r\n
    \r\n );\r\n }\r\n else if (item.state === 'rejected') {\r\n elements.push(\r\n
    \r\n \r\n \r\n \r\n }\r\n //transform=\"uppercase\"\r\n >\r\n {t('certificates.rejected')}\r\n \r\n \r\n {item.date && (\r\n \r\n \r\n {t('certificates.stateDate')}:{' '}\r\n \r\n {moment(item.date).format(\"DD-MM-YYYY HH:mm\")}\r\n \r\n \r\n \r\n )}\r\n \r\n
    \r\n );\r\n } else if (item.state === 'pending') {\r\n elements.push(\r\n
    \r\n \r\n \r\n \r\n }\r\n //transform=\"uppercase\"\r\n >\r\n {t('certificates.statePending')}\r\n \r\n \r\n {item.date && (\r\n \r\n \r\n {t('certificates.stateDate')}:{' '}\r\n \r\n {moment(item.date).format(\"DD-MM-YYYY HH:mm\")}\r\n \r\n \r\n \r\n )}\r\n \r\n
    \r\n );\r\n } else if (item.state === 'submitted') {\r\n elements.push(\r\n
    \r\n \r\n \r\n \r\n }\r\n //transform=\"uppercase\"\r\n >\r\n {t('certificates.stateSubmitted')}\r\n \r\n \r\n {item.date && (\r\n \r\n \r\n {t('certificates.stateDate')}:{' '}\r\n \r\n {moment(item.date).format(\"DD-MM-YYYY HH:mm\")}\r\n \r\n \r\n \r\n )}\r\n \r\n
    \r\n );\r\n } \r\n });\r\n\r\n return elements;\r\n };\r\n\r\n return {generateStates(certificatesDetails)};\r\n};\r\n\r\nexport default CertificateState;\r\n\r\nconst Wrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n > div:not(:last-child) {\r\n height: 69px;\r\n }\r\n`;\r\n\r\nconst SituationWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst SituationState = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n`;\r\n\r\nconst SituationDetails = styled.div`\r\n margin-left: 70px;\r\n`;\r\n\r\nconst SituationCircle = styled.div<{\r\n selected?: boolean;\r\n color?: string;\r\n colorVerticalLine?: string;\r\n isNotLast?: boolean;\r\n}>`\r\n width: 13px;\r\n height: 13px;\r\n border-radius: 50%;\r\n border: 1px solid ${({ theme, color }) => (color ? color : theme.colors.primary)};\r\n background-color: ${({ selected, theme, color }) =>\r\n color ? color : selected ? 'transparent' : theme.colors.primary};\r\n margin-right: 18px;\r\n position: relative;\r\n\r\n ${({ selected, theme, colorVerticalLine, isNotLast }) =>\r\n\r\n `\r\n &:after {\r\n content: '';\r\n position: absolute;\r\n top: 11px;\r\n left: 5px;\r\n width: ${(isNotLast ? '1px' : '0')}; // Render only if it's not the last item;\r\n background-color: ${colorVerticalLine ? colorVerticalLine : theme.colors.primary};\r\n height: ${(isNotLast ? '58px' : '0')}; // Set height to 0 if it's the last element;\r\n } \r\n `}\r\n`;\r\n","/**\r\n * CertificatesDetails selectors\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getUser = (state: RootState) => state.App.user;\r\nexport const getRegistrations = (state: RootState) => state.App.user.registrations;\r\nexport const getRegistrationId = (state: RootState) =>\r\n state.StudentRegistrationDropdown.registration;\r\nexport const getCertificatesDetailsSlices = (state: RootState) => state.CertificatesDetails;\r\n","/**\r\n * CertificateReady container\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport React, { useContext, useState, useEffect } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { Grid } from 'semantic-ui-react';\r\nimport numeral from 'numeral';\r\nimport moment from 'moment';\r\nimport { t } from 'app';\r\nimport { actions } from 'store/rootSlices';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faFilePdf, faChevronRight, faMoneyBill } from '@fortawesome/pro-light-svg-icons';\r\nimport { StatusLabel, Segment, Text, Button } from '@paco_ua/pacoui';\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\nimport { MbIcon, MbWayIcon } from 'shared/components/Icons';\r\nimport CertificateState from '../../components/CertificateState';\r\nimport * as selectors from '../../logic/selectors';\r\nimport { getDeliveryMethod, getRegistration } from '../../utils';\r\nimport config from 'config';\r\nimport API from 'api';\r\n\r\n/*\r\n * this Component is used to display certificates that are not ready, but also\r\n * certificates that are ready in paper format\r\n */\r\nconst CertificatesNotReady = ({ certificatesDetails }) => {\r\n const dispatch = useDispatch();\r\n const user = useSelector(selectors.getUser);\r\n\r\n const theme = useContext(ThemeContext);\r\n\r\n const { certificatePayment, certificatePaymentPending } = actions.CertificatesDetails;\r\n\r\n const PAID_STATUS_COLOR = {\r\n noDebits: theme.colors.darkGrey,\r\n awaitingPayment: theme.colors.decisionYellow,\r\n paid: theme.colors.successGreen,\r\n };\r\n\r\n const [selectedRegistration, setSelectedRegistration] = useState(undefined as any);\r\n\r\n const getPaymentLabelColor = (certificatesDetails) => {\r\n if (certificatesDetails.history.awaitingPayment) {\r\n return theme.colors.successGreen;\r\n } else {\r\n return theme.colors.decisionYellow;\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (user.registrations && user.registrations.length > 0) {\r\n setSelectedRegistration(\r\n getRegistration(certificatesDetails.state.registrationId, user.registrations)\r\n );\r\n }\r\n }, [user.registrations]);\r\n\r\n return (\r\n }\r\n mainContent={\r\n \r\n {\r\n \r\n \r\n {t('certificates.detailsState')}\r\n \r\n \r\n \r\n }\r\n \r\n \r\n {t('certificates.requestedCertificate')}\r\n \r\n\r\n \r\n \r\n }\r\n >\r\n {certificatesDetails.model.name}\r\n \r\n \r\n \r\n\r\n \r\n {t('certificates.detailsSubmittedData')}\r\n \r\n\r\n \r\n \r\n \r\n \r\n {t('certificates.detailsStudentName')}\r\n \r\n \r\n {certificatesDetails.studentName}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {t('certificates.registration')}\r\n \r\n {selectedRegistration !== undefined && (\r\n \r\n {selectedRegistration.courseCode}\r\n \r\n - {selectedRegistration.courseName}\r\n \r\n \r\n )}\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n {t('certificates.exemptionTitle')}\r\n \r\n \r\n {certificatesDetails.state.isExempt\r\n ? t('certificates.withExemption')\r\n : t('certificates.withoutExemption')}\r\n \r\n\r\n {certificatesDetails.state.isExempt && (\r\n \r\n {t('certificates.exemptionMotiveShort')}:{' '}\r\n {certificatesDetails.state.exemptionMotive}\r\n \r\n )}\r\n \r\n \r\n \r\n {t('certificates.detailsLang')}\r\n \r\n \r\n {certificatesDetails.state.language}\r\n \r\n \r\n \r\n \r\n {t('certificates.detailsFormat')}\r\n \r\n \r\n {certificatesDetails.state.format}\r\n \r\n \r\n {certificatesDetails.state.deliveryMethod && (\r\n \r\n \r\n {t('certificates.deliveryMethod')}\r\n \r\n \r\n {certificatesDetails.state.deliveryMethod}\r\n \r\n \r\n )}\r\n {getDeliveryMethod(certificatesDetails) && (\r\n \r\n \r\n {t('certificates.detailsDeliveryType')}\r\n \r\n \r\n {getDeliveryMethod(certificatesDetails)}\r\n \r\n \r\n )}\r\n \r\n\r\n {certificatesDetails.email && (\r\n <>\r\n \r\n\r\n \r\n \r\n {t('certificates.email')}\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n {t('certificates.detailsStudentEmail')}\r\n \r\n \r\n {certificatesDetails.email}\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {certificatesDetails?.address?.homeAddress && (\r\n <>\r\n \r\n\r\n \r\n \r\n {t('certificates.address')}\r\n \r\n \r\n\r\n \r\n {certificatesDetails?.address?.homeAddress && (\r\n \r\n \r\n \r\n {t('generic.address')}\r\n \r\n \r\n {certificatesDetails.address.homeAddress}\r\n \r\n \r\n \r\n )}\r\n {certificatesDetails?.address?.homeLocality && (\r\n \r\n \r\n \r\n {t('generic.locality')}\r\n \r\n \r\n {certificatesDetails.address.homeLocality}\r\n \r\n \r\n \r\n )}\r\n {certificatesDetails?.address?.homePostalCode?.number && (\r\n \r\n \r\n \r\n {t('generic.postCode')}\r\n \r\n \r\n {certificatesDetails.address.homePostalCode.number}\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n )}\r\n \r\n\r\n {certificatesDetails &&\r\n certificatesDetails.state &&\r\n certificatesDetails.state.paymentState === 'awaitingPayment' &&\r\n !certificatesDetails.payment.paymentId && (\r\n \r\n \r\n {t('certificates.paymentData')}\r\n \r\n {\r\n dispatch(certificatePayment([certificatesDetails.payment.debit]));\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {'/'}\r\n \r\n \r\n \r\n \r\n \r\n {t('certificates.certificatePayment')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n {/*\r\n \r\n {certificatesDetails.model.name}\r\n \r\n \r\n {t('generic.euros', {\r\n count: numeral(\r\n certificatesDetails.payment.costs.find((item) => item.type === 'certCost')\r\n .value\r\n ).format('0.00'),\r\n })}\r\n \r\n */}\r\n\r\n {certificatesDetails.payment.costs &&\r\n certificatesDetails.payment.costs.map((item) => {\r\n return (\r\n \r\n \r\n \r\n {t(`certificates.${item.type}`)}\r\n \r\n \r\n\r\n \r\n {t('generic.euros', {\r\n count: numeral(item.value).format('0.00'),\r\n })}\r\n \r\n \r\n );\r\n })}\r\n\r\n \r\n \r\n \r\n {t('certificates.totalPayment')}\r\n \r\n \r\n {t('generic.euros', {\r\n count: numeral(certificatesDetails.payment.totalCost).format('0.00'),\r\n })}\r\n \r\n \r\n \r\n )}\r\n\r\n {certificatesDetails &&\r\n certificatesDetails.state &&\r\n certificatesDetails.state.paymentState === 'awaitingPayment' &&\r\n certificatesDetails.payment.paymentId && (\r\n \r\n \r\n {t('certificates.paymentData')}\r\n \r\n {\r\n dispatch(certificatePaymentPending([certificatesDetails.payment.debit]));\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {'/'}\r\n \r\n \r\n \r\n \r\n \r\n {t('certificates.certificatePaymentPending')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {certificatesDetails.payment.costs &&\r\n certificatesDetails.payment.costs.map((item) => {\r\n return (\r\n \r\n \r\n \r\n {t(`certificates.${item.type}`)}\r\n \r\n \r\n\r\n \r\n {t('generic.euros', {\r\n count: numeral(item.value).format('0.00'),\r\n })}\r\n \r\n \r\n );\r\n })}\r\n\r\n \r\n \r\n \r\n {t('certificates.totalPayment')}\r\n \r\n \r\n {t('generic.euros', {\r\n count: numeral(certificatesDetails.payment.totalCost).format('0.00'),\r\n })}\r\n \r\n \r\n \r\n )}\r\n\r\n {certificatesDetails &&\r\n certificatesDetails.state &&\r\n certificatesDetails.state.paymentState === 'paid' && (\r\n \r\n \r\n {t('certificates.paymentData')}\r\n \r\n {\r\n dispatch(certificatePayment([certificatesDetails.payment.debit]));\r\n }} */\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {certificatesDetails.payment.details.type === 'mb' && (\r\n \r\n )}\r\n {certificatesDetails.payment.details.type === 'mbway' && (\r\n \r\n )}\r\n {certificatesDetails.payment.details.type !== 'mbway' &&\r\n certificatesDetails.payment.details.type !== 'mb' && (\r\n \r\n )}\r\n \r\n \r\n {certificatesDetails.payment.details.type === 'mb' &&\r\n t('payments.atmReference')}\r\n {certificatesDetails.payment.details.type === 'mbway' &&\r\n t('payments.mbWay')}\r\n {certificatesDetails.payment.details.type !== 'mbway' &&\r\n certificatesDetails.payment.details.type !== 'mb' &&\r\n t('payments.other')}\r\n \r\n \r\n \r\n\r\n {certificatesDetails.payment.details.type === 'mb' && (\r\n <>\r\n \r\n \r\n \r\n {t('payments.entity', { textOnly: true })}\r\n \r\n \r\n {`${certificatesDetails.payment.details.entity}`}\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n {t('payments.ref', { textOnly: true })}\r\n \r\n \r\n {`${certificatesDetails.payment.details.ref}`}\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {certificatesDetails.payment.details.type === 'mbway' && (\r\n <>\r\n \r\n \r\n \r\n {t('payments.phoneNumber', { textOnly: true })}\r\n \r\n \r\n {`${certificatesDetails.payment.details.phoneNumber}`}\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {certificatesDetails.payment.details.type !== 'mbway' &&\r\n certificatesDetails.payment.details.type !== 'mb' && (\r\n <>\r\n \r\n \r\n \r\n {t('payments.otherMethod', { textOnly: true })}\r\n \r\n \r\n {`${certificatesDetails.payment.details.type}`}\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n {t('payments.receipt', { textOnly: true })}\r\n \r\n \r\n {certificatesDetails.payment.receiptNum !== '' ? \r\n `${certificatesDetails.payment.receiptNum}`:\r\n `${t('payments.receiptNumber', { textOnly: true })}`}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {t('payments.paymentDate', { textOnly: true })}\r\n \r\n \r\n {`${moment(\r\n certificatesDetails.payment.paymentDate,\r\n 'YYYY-MM-DD'\r\n ).format('DD-MM-YYYY')}`}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {certificatesDetails.payment.details.type === 'mb' && (\r\n \r\n )}\r\n {certificatesDetails.payment.details.type === 'mbway' && (\r\n \r\n )}\r\n {certificatesDetails.payment.details.type !== 'mbway' &&\r\n certificatesDetails.payment.details.type !== 'mb' && (\r\n \r\n )}\r\n \r\n {t(`payments.${certificatesDetails.state.paymentState}`, {\r\n textOnly: true,\r\n })}\r\n \r\n \r\n }\r\n background={\r\n PAID_STATUS_COLOR[certificatesDetails.state.paymentState]\r\n }\r\n />\r\n \r\n \r\n {certificatesDetails.payment.receipt && (\r\n \r\n \r\n {\r\n API.files.getFileOnTab\r\n .call(\r\n `${config.API_WSO2}${config.API_SEC_VIRTUAL_PATH}${certificatesDetails.payment.receipt.url}`\r\n )\r\n .catch((e) => {\r\n dispatch(\r\n actions.Toaster.showToaster({\r\n title: t(\r\n 'secVirtualNotifications.general_errorLoadingFile'\r\n ),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n });\r\n }}\r\n data-testid={`paymentsTable_download_button`}\r\n action\r\n borderless\r\n >\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n {certificatesDetails.payment.debit.description}\r\n \r\n \r\n {`${t('generic.euros', {\r\n textOnly: true,\r\n count: numeral(certificatesDetails.payment.debit.value).format('0.00'),\r\n })}`}\r\n \r\n \r\n\r\n {/* {certificatesDetails.state.deliveryMethod && */}\r\n {certificatesDetails.payment.debit.associatedCosts &&\r\n certificatesDetails.payment.debit.associatedCosts.map((item, index) => {\r\n return (\r\n \r\n \r\n \r\n {item.type}\r\n {/* {t(`certificates.${item.type}`)} */}\r\n \r\n {item.type === 'mailCost' && certificatesDetails.history.ready && (\r\n \r\n {`${t('payments.deliveryDateToDestination')} ${\r\n certificatesDetails.history.ready\r\n }`}\r\n \r\n )}\r\n \r\n \r\n {`${t('generic.euros', {\r\n textOnly: true,\r\n count: numeral(item.value).format('0.00'),\r\n })}`}\r\n \r\n \r\n );\r\n })}\r\n \r\n\r\n \r\n \r\n {t('certificates.totalPayment')}\r\n \r\n \r\n {t('generic.euros', {\r\n count: numeral(certificatesDetails.payment.totalCost).format('0.00'),\r\n })}\r\n \r\n \r\n \r\n )}\r\n \r\n }\r\n />\r\n );\r\n};\r\n\r\nexport default CertificatesNotReady;\r\n\r\nconst Wrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n > div:not(:last-child) {\r\n margin-bottom: 40px;\r\n }\r\n`;\r\n\r\nconst DebitSegmentWrapper = styled.div`\r\n margin-bottom: 12px;\r\n`;\r\n\r\nconst WrapperColumnFeePrice = styled.div`\r\n height: 100%;\r\n display: flex;\r\n align-items: center;\r\n`;\r\n\r\nconst PaymentMethodWrapper = styled.div<{ marginTop?: string; maxWidth?: string }>`\r\n display: flex;\r\n align-items: center;\r\n height: 100%;\r\n\r\n > div:nth-child(2) {\r\n margin-left: 10px;\r\n }\r\n`;\r\n\r\nconst LabelContentWrapper = styled.div`\r\n display: flex;\r\n align-items: center;\r\n > svg {\r\n margin-right: 4px;\r\n }\r\n &&& > div {\r\n margin-top: 0px !important;\r\n }\r\n`;\r\n\r\nconst CenteredGridColumn = styled.div`\r\n display: flex;\r\n justify-content: center;\r\n height: 100%;\r\n align-items: center;\r\n`;\r\n\r\nconst WrapperColumn = styled.div<{ marginTop?: string; maxWidth?: string }>`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n > div:last-child {\r\n margin-top: ${({ marginTop }) => (marginTop ? marginTop : '8px')};\r\n }\r\n`;\r\n\r\nconst DeliveryMethodWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst PaymentsContainer = styled.div`\r\n display: flex;\r\n\r\n &&& .ui.grid {\r\n margin: 0px !important;\r\n width: 100%;\r\n }\r\n\r\n &&& .ui.grid > .column:not(.row) {\r\n padding: 0px !important;\r\n }\r\n`;\r\n\r\nconst SegmentTitle = styled(Text)`\r\n &&& {\r\n display: block;\r\n margin-bottom: 24px;\r\n }\r\n`;\r\n\r\nconst SegmentDoc = styled.div`\r\n margin-bottom: 40px;\r\n`;\r\n\r\nconst SegmentPayment = styled.div<{ notButton?: boolean }>`\r\n margin-bottom: 40px;\r\n cursor: ${({ notButton }) => (notButton ? 'default' : 'pointer')};\r\n\r\n :hover {\r\n background-color: ${({ theme, notButton }) => (!notButton ? theme.colors.lightGrey : 'None')};\r\n }\r\n\r\n :active {\r\n background-color: ${({ theme, notButton }) =>\r\n !notButton ? theme.colors.softLightGrey : 'None'};\r\n }\r\n`;\r\n\r\nconst SegmentPaymentWrapper = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: space-between;\r\n align-items: center;\r\n`;\r\n\r\nconst SegmentAreaLeft = styled.div`\r\n flex: 1;\r\n display: flex;\r\n align-items: center;\r\n\r\n -webkit-touch-callout: none; /* iOS Safari */\r\n -webkit-user-select: none; /* Safari */\r\n -khtml-user-select: none; /* Konqueror HTML */\r\n -moz-user-select: none; /* Old versions of Firefox */\r\n -ms-user-select: none; /* Internet Explorer/Edge */\r\n user-select: none;\r\n`;\r\n\r\nconst SegmentPaymentIcons = styled.div`\r\n margin-right: 16px;\r\n display: flex;\r\n align-items: center;\r\n`;\r\n\r\nconst SegmentPaymentIconInstance = styled.div`\r\n display: flex;\r\n align-items: center;\r\n margin: 0px 4px 0px 4px;\r\n`;\r\n\r\nconst SegmentAreaRight = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n\r\n > div:not(:last-child) {\r\n margin-right: 40px;\r\n }\r\n`;\r\n\r\nconst DetailsWrapper = styled(Grid)`\r\n &&& {\r\n .column {\r\n padding-top: 8px;\r\n padding-bottom: 8px;\r\n }\r\n }\r\n`;\r\n\r\nconst DetailsStudentWrapper = styled(Grid)`\r\n &&& {\r\n .column {\r\n padding-top: 18px;\r\n padding-bottom: 18px;\r\n }\r\n }\r\n`;\r\n\r\nconst DetailsType = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n padding-top: 24px;\r\n padding-bottom: 14px;\r\n\r\n > div:not(:last-child) {\r\n margin-bottom: 24px;\r\n }\r\n`;\r\n\r\nconst DetailsTypeItem = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n > div:not(:last-child) {\r\n margin-bottom: 14px;\r\n }\r\n`;\r\n\r\nconst DetailsElement = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n > div:not(:last-child) {\r\n margin-bottom: 8px;\r\n }\r\n`;\r\n\r\nconst ModelText = styled(Text)`\r\n line-height: 1.5;\r\n`;\r\n\r\nconst DetailsElementPayment = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst Separator = styled.div`\r\n height: 1px;\r\n width: 100%;\r\n background-color: ${({ theme }) => theme.colors.softRegularGrey};\r\n margin: 16px 0;\r\n`;\r\n\r\nconst SeparatorPayment = styled.div`\r\n height: 1px;\r\n width: 100%;\r\n background-color: ${({ theme }) => theme.colors.softRegularGrey};\r\n margin: 24px 0;\r\n`;\r\n\r\nconst PaymentRow = styled.div<{ margin?: boolean }>`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: space-between;\r\n align-items: flex-start;\r\n margin-top: ${({ margin }) => (margin ? '24px' : '0')};\r\n`;\r\n\r\nconst ConfirmationTitle = styled.div`\r\n margin-bottom: 18px;\r\n`;\r\n\r\nconst EllipsisWrapper = styled.div`\r\n margin-top: 8px;\r\n`;\r\n\r\nconst TuitionPriceText = styled(Text)``;\r\n\r\nconst TuitionText = styled(Text)`\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n padding-right: 42px;\r\n`;\r\n\r\nconst CostDetails = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n > div:not(:first-child) {\r\n margin-top: 4px;\r\n }\r\n\r\n > div:last-child {\r\n margin-bottom: 18px;\r\n }\r\n\r\n div:nth-child(2) {\r\n margin-top: 10px;\r\n }\r\n\r\n div:nth-child(3) {\r\n margin-top: 10px;\r\n }\r\n\r\n div:nth-child(4) {\r\n margin-top: 10px;\r\n }\r\n`;\r\n","import React, { useContext } from 'react';\r\nimport * as selectors from '../../logic/selectors';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { actions } from 'store/rootSlices';\r\nimport { AnimatedBackground, Modal, Table, Text } from '@paco_ua/pacoui';\r\nimport styled, { ThemeContext } from 'styled-components';\r\nimport { getAccessHistoryModalStructure } from '../../utils';\r\nimport { useTranslation } from 'react-i18next';\r\n\r\nconst AccessHistoryModal: React.FC = () => {\r\n const { t } = useTranslation();\r\n const theme = useContext(ThemeContext);\r\n const dispatch = useDispatch();\r\n\r\n const { loadingStatus, errorStatus, accessHistoryModalVisible, accessHistory } = useSelector(\r\n selectors.getCertificatesDetailsSlices\r\n );\r\n\r\n const { setVisibleAccessHistoryModal } = actions.CertificatesDetails;\r\n\r\n return (\r\n \r\n {t('certificates.changeHistory')}\r\n \r\n }\r\n onClose={() => {\r\n dispatch(setVisibleAccessHistoryModal(false));\r\n }}\r\n submitButtonText={t('generic.close')}\r\n onSubmit={() => {\r\n dispatch(setVisibleAccessHistoryModal(false));\r\n }}\r\n >\r\n \r\n {loadingStatus.loadingAccessHistory && (\r\n <>\r\n \r\n \r\n )}\r\n {!loadingStatus.loadingAccessHistory && (\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default AccessHistoryModal;\r\n\r\nconst ModalStatement = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n margin-bottom: 28px;\r\n\r\n & > div:nth-child(2) {\r\n margin-top: 12px;\r\n }\r\n`;\r\n\r\nconst TableWrapper = styled.div`\r\n overflow: auto;\r\n &&& th {\r\n padding-top: 0px !important;\r\n padding-bottom: 0px !important;\r\n height: 61px;\r\n }\r\n\r\n &&& td {\r\n padding-top: 0px !important;\r\n padding-bottom: 0px !important;\r\n height: 76px;\r\n }\r\n`;\r\n","/**\r\n * CertificatesDetails scene\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport React, { useEffect, useContext } from 'react';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport styled, { ThemeContext } from 'styled-components';\r\nimport { actions } from 'store/rootSlices';\r\nimport { getCurrentRoute } from 'utils';\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport { AnimatedBackground } from '@paco_ua/pacoui';\r\nimport CertificateReady from './containers/CertificateReady';\r\nimport CertificateNotReady from './containers/CertificateNotReady';\r\nimport Header from 'shared/containers/TitleHeader';\r\nimport * as selectors from './logic/selectors';\r\nimport AccessHistoryModal from './components/AccessHistoryModal';\r\n\r\nconst CertificatesDetails = ({ t }) => {\r\n const theme = useContext(ThemeContext);\r\n\r\n const {\r\n loadingStatus,\r\n errorStatus,\r\n certificatesDetails,\r\n certificateFile,\r\n accessHistoryModalVisible,\r\n } = useSelector(selectors.getCertificatesDetailsSlices);\r\n\r\n const { navigateTo } = actions.App;\r\n const registrations = useSelector(selectors.getRegistrations);\r\n\r\n const user = useSelector(selectors.getUser);\r\n\r\n const { onMount, getData, onUnmount } = actions.CertificatesDetails;\r\n\r\n const dispatch = useDispatch();\r\n\r\n useEffect(() => {\r\n dispatch(onMount());\r\n return () => {\r\n dispatch(onUnmount());\r\n };\r\n }, [dispatch, onMount, onUnmount, user.impersonate]);\r\n\r\n // get certificate and regidtration ids from the url\r\n const certificateId = getCurrentRoute().params.certificateId;\r\n const registrationId = getCurrentRoute().params.registrationId;\r\n\r\n useEffect(() => {\r\n if (registrations && certificateId && registrationId !== null && registrationId !== undefined) {\r\n dispatch(\r\n getData({\r\n certificateId,\r\n registrationId,\r\n })\r\n );\r\n }\r\n }, [certificateId, registrations]);\r\n\r\n return (\r\n <>\r\n {(loadingStatus.loadingCertificatesDetails ||\r\n errorStatus.errLoadingCertificatesDetails ||\r\n !certificatesDetails) && (\r\n }\r\n mainContent={\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n />\r\n )}\r\n {certificateId && registrationId && certificatesDetails && (\r\n <>\r\n {!loadingStatus.loadingCertificatesDetails &&\r\n !errorStatus.errLoadingCertificatesDetails &&\r\n certificatesDetails &&\r\n certificatesDetails.isReady &&\r\n certificateFile !== null &&\r\n certificateFile && (\r\n \r\n )}\r\n {!loadingStatus.loadingCertificatesDetails &&\r\n !errorStatus.errLoadingCertificatesDetails &&\r\n (!certificatesDetails?.isReady || !certificateFile) && (\r\n \r\n )}\r\n \r\n )}\r\n {accessHistoryModalVisible && }\r\n \r\n );\r\n};\r\n\r\nconst LoadingWrapper = styled.div`\r\n width: 100%;\r\n height: 300px;\r\n\r\n * {\r\n margin: 8px 0px;\r\n }\r\n`;\r\n\r\nconst MessageNoCertificates = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n text-align: center;\r\n justify-content: center;\r\n margin-top: 60px;\r\n margin-bottom: 20px;\r\n\r\n div:nth-child(2) {\r\n margin-top: 16px;\r\n }\r\n`;\r\n\r\nexport default CertificatesDetails;\r\n","/**\r\n * CertificateValidator scene selectors\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getUserNmec = (state: RootState) => state.App.user.nmec;\r\nexport const getUser = (state: RootState) => state.App.user;\r\nexport const getAppSlice = (state: RootState) => state.App.currentLocale;\r\nexport const getRegistrationId = (state: RootState) =>\r\n state.StudentRegistrationDropdown.registration;\r\nexport const getRegistrations = (state: RootState) => state.App.user.registrations;\r\nexport const getCertificateValidatorSlice = (state: RootState) => state.CertificateValidator;\r\n/* export const getNewCertificateSlice = (state: RootState) => state.NewCertificate;\r\n */\r\n","/**\r\n * CertificatesDetails scene\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport React, { useEffect, useContext, useState } from 'react';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport { getCurrentRoute } from 'utils';\r\n\r\nimport { Grid } from 'semantic-ui-react';\r\nimport moment from 'moment';\r\nimport { Controller } from 'react-hook-form';\r\nimport { faCheck, faRedoAlt, faFilePdf } from '@fortawesome/pro-light-svg-icons';\r\nimport config from 'config';\r\nimport { FormInput, Text, Segment, Button, StatusLabel } from '@paco_ua/pacoui';\r\n\r\nimport ReCAPTCHA from 'react-google-recaptcha';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\n\r\nimport * as yup from 'yup';\r\n\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\n\r\nimport * as selectors from './logic/selectors';\r\n\r\nimport { useForm } from 'react-hook-form';\r\nimport { yupResolver } from '@hookform/resolvers/yup';\r\nimport API from 'api';\r\n\r\nconst CertificateValidator = ({ t }) => {\r\n const theme = useContext(ThemeContext);\r\n\r\n const { onMount, onUnmount } = actions.CertificatesValidator;\r\n\r\n const dispatch = useDispatch();\r\n\r\n const certCode = getCurrentRoute().params.accessKey;\r\n\r\n useEffect(() => {\r\n dispatch(onMount());\r\n return () => {\r\n dispatch(onUnmount());\r\n };\r\n }, [dispatch, onMount, onUnmount]);\r\n\r\n const [recaptchaValue, setRecaptchaValue] = useState(null as string | null);\r\n\r\n const [outlineRecap, setOutlineRecap] = useState(false);\r\n\r\n useEffect(() => {\r\n if (recaptchaValue) {\r\n setOutlineRecap(false);\r\n }\r\n }, [recaptchaValue]);\r\n\r\n const {\r\n setHasValidated,\r\n validateCertificateCode,\r\n setLoadingStatus,\r\n } = actions.CertificatesValidator;\r\n\r\n const schema = yup.object().shape({\r\n certificateCode: yup\r\n .string()\r\n .required(t('forms.validationFieldRequired'))\r\n .test(`certificate-code-type`, function (value) {\r\n const { path, createError } = this;\r\n\r\n return (\r\n /([A-Z0-9]{1,30}-[A-Z0-9]{1,30}-[A-Z0-9]{1,30})/.test(value ? value : '') ||\r\n createError({\r\n path,\r\n message: t('forms.invalidFormat'),\r\n })\r\n );\r\n }),\r\n });\r\n\r\n const {\r\n handleSubmit,\r\n control,\r\n reset,\r\n formState: { errors },\r\n } = useForm({\r\n resolver: yupResolver(schema),\r\n defaultValues: {\r\n certificateCode: certCode ? certCode.toUpperCase() : '',\r\n },\r\n });\r\n\r\n const onChangeRecaptcha = (value: string) => {\r\n setRecaptchaValue(value);\r\n };\r\n\r\n const { hasValidated, certificateData, loadingStatus, errorStatus } = useSelector(\r\n selectors.getCertificateValidatorSlice\r\n );\r\n\r\n const submitForm = (data) => {\r\n if (!recaptchaValue) {\r\n setOutlineRecap(true);\r\n } else {\r\n dispatch(\r\n validateCertificateCode({\r\n accessCode: data.certificateCode,\r\n recaptchaToken: recaptchaValue,\r\n })\r\n );\r\n }\r\n };\r\n\r\n return (\r\n }\r\n subHeader={\r\n \r\n {t('certificates.academicServices')}\r\n \r\n }\r\n mainContent={\r\n \r\n \r\n \r\n \r\n {t('certificates.certCodeValidation')}\r\n \r\n\r\n \r\n \r\n \r\n {hasValidated\r\n ? t('certificates.certificateCode', { textOnly: true })\r\n : t('certificates.insertCertCode', { textOnly: true })}\r\n \r\n {!hasValidated && (\r\n \r\n {' *'}\r\n \r\n )}\r\n \r\n \r\n {\r\n return (\r\n {\r\n onChange && onChange(e.target.value.toUpperCase());\r\n }}\r\n error={\r\n errors && errors.certificateCode\r\n ? errors.certificateCode.message\r\n : undefined\r\n }\r\n />\r\n );\r\n }}\r\n />\r\n {hasValidated && !certificateData?.hasExpired && (\r\n \r\n )}\r\n {hasValidated &&\r\n certificateData?.validAccessKey &&\r\n certificateData?.hasExpired && (\r\n \r\n )}\r\n \r\n \r\n\r\n {hasValidated && !certificateData?.validAccessKey && (\r\n \r\n {t('certificates.invalidCertCodeText')}\r\n \r\n )}\r\n\r\n {hasValidated && certificateData?.validAccessKey && !certificateData.hasExpired && (\r\n \r\n \r\n {t('certificates.infoCertificate')}\r\n \r\n\r\n \r\n \r\n \r\n \r\n {t('certificates.requestFourthStepName')}\r\n \r\n \r\n {certificateData?.details?.studentName}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {t('certificates.nMec')}\r\n \r\n \r\n {certificateData?.details?.studentNumber}\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n {t('certificates.registration')}\r\n \r\n \r\n {`${certificateData?.details?.courseCode} - ${certificateData?.details?.courseName}`}\r\n \r\n \r\n \r\n \r\n\r\n {certificateData?.file && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {certificateData?.file?.name}\r\n \r\n \r\n {certificateData?.file?.description}\r\n \r\n \r\n {\r\n dispatch(\r\n actions.CertificatesValidator.setLoadingStatus({\r\n fieldName: 'loadingCertificateFile',\r\n fieldValue: true,\r\n })\r\n );\r\n\r\n if (certificateData?.file?.url) {\r\n API.files.getFileOnTab\r\n .call(\r\n `${config.API_WSO2}${config.API_SEC_VIRTUAL_PATH}${certificateData?.file?.url}`\r\n )\r\n .then((value) => {\r\n dispatch(\r\n actions.CertificatesValidator.setLoadingStatus({\r\n fieldName: 'loadingCertificateFile',\r\n fieldValue: false,\r\n })\r\n );\r\n })\r\n .catch((e) => {\r\n dispatch(\r\n actions.CertificatesValidator.setLoadingStatus({\r\n fieldName: 'loadingCertificateFile',\r\n fieldValue: false,\r\n })\r\n );\r\n\r\n dispatch(\r\n actions.Toaster.showToaster({\r\n title: t(\r\n 'secVirtualNotifications.general_errorLoadingFile'\r\n ),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n });\r\n }\r\n }}\r\n size=\"xSmall\"\r\n color=\"darkGrey\"\r\n weight=\"regular\"\r\n >\r\n {t('certificates.viewCert')}\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {certificateData?.details?.expirationDate !== null ?? \r\n \r\n \r\n \r\n \r\n {t('certificates.certValidationDate')}\r\n \r\n \r\n {certificateData?.hasExpired\r\n ? t('certificates.certWithExpiredDate')\r\n : `${moment(certificateData?.details?.expirationDate).format(\r\n 'DD/MM/YYYY'\r\n )}`}\r\n \r\n \r\n \r\n \r\n }\r\n\r\n {hasValidated && certificateData?.hasExpired && (\r\n \r\n {t('certificates.certExpiredText')}\r\n \r\n )}\r\n \r\n )}\r\n\r\n {hasValidated && certificateData?.validAccessKey && certificateData?.hasExpired && (\r\n \r\n {t('certificates.expiredCertCodeText')}\r\n \r\n )}\r\n \r\n\r\n {!hasValidated && (\r\n \r\n \r\n {outlineRecap && (\r\n \r\n \r\n {' *'}\r\n \r\n \r\n {t('certificates.recaptchaRequired', { textOnly: true })}\r\n \r\n \r\n )}\r\n \r\n )}\r\n \r\n\r\n {!hasValidated && (\r\n }\r\n onClick={handleSubmit(submitForm)}\r\n >\r\n {t('certificates.validateCode')}\r\n \r\n )}\r\n\r\n {hasValidated && !certificateData?.hasExpired && (\r\n \r\n \r\n \r\n \r\n {t('certificates.viewInformation')}\r\n \r\n \r\n {`${moment().format('DD/MM/YYYY | HH:mm')}`}\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {hasValidated && (\r\n \r\n }\r\n onClick={() => {\r\n reset();\r\n setRecaptchaValue(null);\r\n dispatch(setHasValidated(false));\r\n }}\r\n >\r\n {t('certificates.validateAnotherCode')}\r\n \r\n \r\n )}\r\n \r\n }\r\n />\r\n );\r\n};\r\n\r\nexport default CertificateValidator;\r\n\r\nconst Wrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst SegmentTitleWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst FormWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n margin-top: 32px;\r\n width: 100%;\r\n`;\r\n\r\nconst DescriptionWrapper = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n margin-top: 4px;\r\n\r\n div:first-child {\r\n margin-right: 6px;\r\n }\r\n`;\r\n\r\nconst FormInputWrapper = styled.div<{ backgroundColor?: string }>`\r\n display: flex;\r\n margin-top: 6px;\r\n align-items: center;\r\n\r\n > div:first-child {\r\n margin-right: 35px;\r\n }\r\n\r\n input {\r\n ${({ backgroundColor }) => (backgroundColor ? `background-color: ${backgroundColor}` : '')};\r\n }\r\n`;\r\n\r\nconst CustomFormInput = styled(FormInput)<{ borderColor: string }>`\r\n border-bottom-style: solid !important;\r\n border-bottom-width: 1px !important;\r\n border-color: ${({ borderColor }) => borderColor} !important;\r\n min-width: 300px;\r\n`;\r\n\r\nconst CustomButton = styled(Button)`\r\n margin-top: 40px;\r\n width: 149px;\r\n`;\r\n\r\nconst CustomValAnotherButton = styled(Button)`\r\n margin-top: 40px;\r\n max-width: 200px;\r\n`;\r\n\r\nconst BottomButtonWrapper = styled.div`\r\n width: 100%;\r\n display: flex;\r\n justify-content: right;\r\n`;\r\n\r\nconst ResultWrapper = styled.div`\r\n margin-top: 40px;\r\n`;\r\n\r\nconst DetailsElement = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n > div:not(:last-child) {\r\n margin-bottom: 8px;\r\n }\r\n`;\r\n\r\nconst CertificateInfoWrapper = styled(Grid)`\r\n &&& {\r\n .column {\r\n padding-top: 18px;\r\n padding-bottom: 18px;\r\n }\r\n }\r\n`;\r\n\r\nconst SegmentDoc = styled.div<{ bgColor: string }>`\r\n background-color: ${({ bgColor }) => bgColor};\r\n\r\n margin-top: 24px;\r\n`;\r\n\r\nconst SegmentDocWrapper = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: space-between;\r\n align-items: center;\r\n margin-left: 18px;\r\n width: 100%;\r\n`;\r\n\r\nconst DocSubWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst ModelText = styled(Text)`\r\n line-height: 1.5;\r\n`;\r\n\r\nconst ValidationDateWrapper = styled.div`\r\n margin-top: 16px;\r\n`;\r\n\r\nconst ViewInfoWrapper = styled.div`\r\n margin-top: 16px;\r\n`;\r\n\r\nconst DocLinkText = styled(Text)`\r\n :hover {\r\n text-decoration: underline;\r\n cursor: pointer;\r\n }\r\n`;\r\n\r\nconst OutlineRecaptcha = styled.div<{\r\n outlineRecap: boolean;\r\n}>`\r\n margin-top: 32px;\r\n > div {\r\n > div {\r\n display: flex !important;\r\n justify-content: left !important;\r\n }\r\n }\r\n`;\r\n","import React from 'react';\r\nimport styled from 'styled-components';\r\n\r\nimport { Text } from '@paco_ua/pacoui';\r\nimport { Container } from 'semantic-ui-react';\r\n\r\nimport logoUA from 'assets/images/logo512.png';\r\n\r\nconst PageWarningComponent: React.FC<{ message: string; status?: string }> = ({\r\n message,\r\n status,\r\n}) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {status && (\r\n \r\n {status}\r\n \r\n )}\r\n \r\n {message}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default PageWarningComponent;\r\n\r\nconst FormattedText: React.FC<{\r\n size?: string;\r\n color?: string;\r\n weight?: string;\r\n onClick?: () => void;\r\n}> = ({ children, size, onClick, weight, color }) => (\r\n {\r\n onClick && onClick();\r\n }}\r\n >\r\n \r\n {children}\r\n \r\n \r\n);\r\n\r\nconst Wrapper = styled.div`\r\n display: flex;\r\n flex-grow: 1;\r\n flex-direction: column;\r\n align-items: center;\r\n overflow: auto;\r\n padding: 0 26%;\r\n\r\n ${({ theme }) => theme.medias.sm} {\r\n padding: 0 20%;\r\n overflow: hidden;\r\n }\r\n\r\n ${({ theme }) => theme.medias.xs} {\r\n padding: 0 80px;\r\n overflow: hidden;\r\n }\r\n`;\r\n\r\nconst LogoUA = styled.img`\r\n width: 80px;\r\n height: 80px;\r\n margin: 60px 0 80px;\r\n`;\r\n\r\nconst AlignCenter = styled.div`\r\n display: flex;\r\n justify-content: center;\r\n text-align: center;\r\n`;\r\n\r\nconst WrapperText = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n > div:last-child {\r\n margin-bottom: 48px;\r\n }\r\n`;\r\n","/**\r\n * ExamsCalendar scene\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport React, { useEffect, useContext, useState, useMemo } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\nimport i18n from 'i18next';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { /*faFileDownload,*/ faCalendar } from '@fortawesome/pro-regular-svg-icons';\r\n\r\nimport { EventCalendar, Button, Text, Caption, Segment /*, CallToAction*/ } from '@paco_ua/pacoui';\r\n\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport StudentRegistrationDropdown from 'shared/containers/StudentRegistrationDropdown';\r\nimport Header from 'shared/containers/TitleHeader';\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport * as selectors from './logic/selectors';\r\n\r\nimport { convertEventToIcs, setEventData } from './utils';\r\nimport { createAndDownloadFile } from 'utils';\r\nimport PageWarningComponent from 'shared/containers/PageWarningComponent';\r\n//import config from 'config'\r\n\r\nconst ExamsCalendar = ({ t, size }) => {\r\n const theme = useContext(ThemeContext);\r\n const {\r\n currentICS,\r\n eventsData,\r\n loadingExamsCalendar,\r\n filterParams,\r\n calendarFilterTypes,\r\n calendarCurrentYearMonth,\r\n errorStatus,\r\n initialCalendarDate,\r\n } = useSelector(selectors.getExamsCalendarSlice);\r\n\r\n const currentRegistrationId = useSelector(selectors.getRegistration);\r\n\r\n const {\r\n onMount,\r\n onUnmount,\r\n getExamCalendar,\r\n setSearchFilter,\r\n setTypeFilter,\r\n setCalendarCurrentYearMonth,\r\n setLoadingExamsCalendar,\r\n setInitialCalendarDate,\r\n } = actions.ExamsCalendar;\r\n\r\n const user = useSelector(selectors.getUser);\r\n const dispatch = useDispatch();\r\n const [initialLoading, setInitialLoading] = useState(true);\r\n\r\n //temporary solution to check the users viewport width\r\n const [windowViewportWidth, setWindowViewportWidth] = useState(window.innerWidth);\r\n\r\n //temporaryUseEffect to check the users viewport width\r\n useEffect(() => {\r\n const handleResize = () => {\r\n setWindowViewportWidth(window.innerWidth);\r\n };\r\n\r\n window.addEventListener('resize', handleResize);\r\n\r\n return () => {\r\n window.removeEventListener('resize', handleResize);\r\n };\r\n }, []);\r\n\r\n useEffect(() => {\r\n dispatch(onMount());\r\n return () => {\r\n dispatch(onUnmount());\r\n };\r\n }, [dispatch, onMount, onUnmount, user.impersonate]);\r\n\r\n useEffect(() => {\r\n if (currentRegistrationId) {\r\n dispatch(setLoadingExamsCalendar(true));\r\n dispatch(getExamCalendar(calendarCurrentYearMonth));\r\n }\r\n }, [currentRegistrationId, filterParams]);\r\n\r\n useEffect(() => {\r\n if (initialLoading && !loadingExamsCalendar) {\r\n setInitialLoading(false);\r\n }\r\n }, [loadingExamsCalendar]);\r\n\r\n const Icon = ({ color, label }) => {\r\n return (\r\n \r\n \r\n {label}\r\n \r\n \r\n );\r\n };\r\n\r\n const getIcon = (label) => {\r\n label = label.toLowerCase();\r\n switch (label) {\r\n case 'ex':\r\n return ;\r\n case 'pr':\r\n return ;\r\n case 'al':\r\n return ;\r\n case 'si':\r\n return ;\r\n case 'm':\r\n return ;\r\n default:\r\n return ;\r\n }\r\n };\r\n\r\n const getFooter = (event) => (\r\n {\r\n const icsEvent = convertEventToIcs(event, currentICS);\r\n createAndDownloadFile(escape(icsEvent), 'ics', 'data:text/calendar');\r\n }}\r\n color={theme.colors.darkGrey}\r\n borderless\r\n noPadding\r\n leftIcon={}\r\n >\r\n \r\n {t('examsCalendar.saveToGoogleCalendar')}\r\n \r\n \r\n );\r\n\r\n //this condition is used to prevent the user from visiting this page in mobile devices\r\n if (windowViewportWidth < 700) {\r\n return ;\r\n }\r\n\r\n return (\r\n }\r\n subHeader={\r\n \r\n }\r\n mainContent={\r\n <>\r\n {currentICS && (\r\n {\r\n dispatch(setSearchFilter(value));\r\n },\r\n onFilterChange: (value) => {\r\n dispatch(setTypeFilter(value));\r\n },\r\n onFilterClear: (value) => {\r\n dispatch(setTypeFilter(value));\r\n },\r\n filterTypes: calendarFilterTypes,\r\n }}\r\n onSeeLocation={(event) => {}}\r\n updateCalendarCurrentYearMonth={(date) => {\r\n dispatch(setLoadingExamsCalendar(true));\r\n dispatch(getExamCalendar(date));\r\n dispatch(setCalendarCurrentYearMonth(date));\r\n }}\r\n />\r\n )}\r\n\r\n {!loadingExamsCalendar && (\r\n \r\n \r\n {t('examsCalendar.exams')}\r\n \r\n ),\r\n icon: getIcon('ex'),\r\n },\r\n ]}\r\n />\r\n \r\n )}\r\n \r\n }\r\n secondaryContentOffset={58}\r\n secondaryContent={\r\n \r\n \r\n \r\n \r\n \r\n {t('examsCalendar.availableActions')}\r\n \r\n \r\n \r\n }\r\n color=\"plusDarkGrey\"\r\n size=\"small\"\r\n weight=\"medium\"\r\n as=\"a\"\r\n onClick={() => {\r\n if (currentICS) {\r\n createAndDownloadFile(escape(currentICS), 'ics', 'data:text/calendar');\r\n }\r\n }}\r\n >\r\n {t('examsCalendar.saveToGoogleCalendar')}\r\n \r\n \r\n \r\n \r\n \r\n }\r\n />\r\n );\r\n};\r\n\r\nexport default ExamsCalendar;\r\n\r\nconst EventCaption = styled.div`\r\n margin-top: 8px;\r\n`;\r\n\r\nconst EventIcon = styled.div<{ color: string }>`\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n width: 20px;\r\n height: 20px;\r\n background-color: ${({ color }) => color};\r\n text-transform: uppercase;\r\n`;\r\n\r\nconst SidebarWrapper = styled.div`\r\n > div:not(:last-child) {\r\n margin-bottom: 20px;\r\n }\r\n`;\r\n\r\nconst SegmentHeader = styled.div`\r\n margin-bottom: 24px;\r\n`;\r\n\r\nconst SegmentWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst SegmentWrapperActions = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n > div:not(:last-child) {\r\n margin-bottom: 8px;\r\n }\r\n`;\r\n","/**\r\n * EnrollmentRenewal scene selectors\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getUserNmec = (state: RootState) => state.App.user.nmec;\r\nexport const getEnrollmentRenewalSlice = (state: RootState) => state.EnrollmentRenewal;\r\n","/**\r\n * EnrollmentRenewal scene\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport React, { useEffect } from 'react';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport * as selectors from './logic/selectors';\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\n\r\nconst EnrollmentRenewal = ({ t }) => {\r\n const { onMount, onUnmount } = actions.EnrollmentRenewal;\r\n\r\n const dispatch = useDispatch();\r\n const { loading } = useSelector(selectors.getEnrollmentRenewalSlice);\r\n\r\n useEffect(() => {\r\n dispatch(onMount());\r\n return () => {\r\n dispatch(onUnmount());\r\n };\r\n }, [dispatch, onMount, onUnmount]);\r\n\r\n return (\r\n }\r\n mainContent={<>Enrollment Renewal}\r\n secondaryContentOffset={113}\r\n secondaryContent={<>Secondary content}\r\n />\r\n );\r\n};\r\n\r\nexport default EnrollmentRenewal;\r\n","/**\r\n * ExamEnrollment scene selectors\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getExamEnrollmentSlice = (state: RootState) => state.ExamEnrollment;\r\nexport const getUserNmec = (state: RootState) => state.App.user.nmec;\r\nexport const getRegistration = (state: RootState) => state.StudentRegistrationDropdown.registration;\r\nexport const getUserRegistrations = (state: RootState) => state.App.user.registrations;\r\nexport const getUser = (state: RootState) => state.App.user;\r\n","/**\r\n * ExamEnrollment scene\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport React, { useEffect } from 'react';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport * as selectors from './logic/selectors';\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\nimport styled from 'styled-components';\r\nimport { Card, CallToAction, Text } from '@paco_ua/pacoui';\r\n\r\nconst ExamEnrollment = ({ t }) => {\r\n const { onMount, onUnmount } = actions.ExamEnrollment;\r\n\r\n const dispatch = useDispatch();\r\n const { loading } = useSelector(selectors.getExamEnrollmentSlice);\r\n const user = useSelector(selectors.getUser);\r\n\r\n useEffect(() => {\r\n dispatch(onMount());\r\n return () => {\r\n dispatch(onUnmount());\r\n };\r\n }, [dispatch, onMount, onUnmount]);\r\n\r\n return (\r\n \r\n \r\n {t('generic.iframeBanner')}\r\n \r\n }\r\n padding={'15px 38px'}\r\n noPointer\r\n />\r\n \r\n \r\n );\r\n};\r\nconst Wrapper = styled.div`\r\n text-align: center;\r\n`;\r\nexport default ExamEnrollment;\r\n","/**\r\n * ImprovementExamEnrollment scene selectors\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getImprovementExamEnrollmentSlice = (state: RootState) =>\r\n state.ImprovementExamEnrollment;\r\nexport const getAppSlice = (state: RootState) => state.App;\r\nexport const getUserNmec = (state: RootState) => state.App.user.nmec;\r\nexport const getRegistration = (state: RootState) => state.StudentRegistrationDropdown.registration;\r\nexport const getUserRegistrations = (state: RootState) => state.App.user.registrations;\r\nexport const getUser = (state: RootState) => state.App.user;\r\n","/**\r\n * ImprovementExamEnrollment scene\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport React, { useEffect, useContext, useState } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\nimport moment from 'moment';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport * as selectors from './logic/selectors';\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\n//import { useForm } from 'react-hook-form';\r\nimport numeral from 'numeral';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport {\r\n faExclamationCircle,\r\n //faCircle,\r\n faArrowRight,\r\n faCheck,\r\n //faTimes,\r\n} from '@fortawesome/pro-regular-svg-icons';\r\n\r\nimport { Text, Button, Segment, Dropdown, Modal, Checkbox,CallToAction } from '@paco_ua/pacoui';\r\n\r\nimport StudentRegistrationDropdown from 'shared/containers/StudentRegistrationDropdown';\r\n\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\n\r\nimport { IImprovementExamUc } from './types';\r\n\r\nimport ImprovementExamsTable from './components/ImprovementExamsTable';\r\n\r\nconst ImprovementExamEnrollment = ({ t }) => {\r\n const theme = useContext(ThemeContext);\r\n\r\n const {\r\n onMount,\r\n onUnmount,\r\n setEnrollImprovementExamId,\r\n setRequestImprovementExamId,\r\n } = actions.ImprovementExamEnrollment;\r\n\r\n const { getStudentSignups } = actions.ImprovementExamEnrollment;\r\n const dispatch = useDispatch();\r\n const user = useSelector(selectors.getUser);\r\n\r\n //const { register, handleSubmit } = useForm();\r\n\r\n const { loading, signups, enrollImprovementExamId, requestImprovementExamId } = useSelector(\r\n selectors.getImprovementExamEnrollmentSlice\r\n );\r\n\r\n const currentRegistrationId = useSelector(selectors.getRegistration);\r\n\r\n const [selectedUcData, setSelectedUcData] = useState({} as IImprovementExamUc | undefined);\r\n const [enrollCheckbox, setEnrollCheckbox] = useState(null as boolean | null);\r\n const [filterValues, setFilterValues] = useState({ semester: null, academicYear: null } as {\r\n semester: number | null;\r\n academicYear: string | null;\r\n });\r\n\r\n useEffect(() => {\r\n dispatch(onMount());\r\n return () => {\r\n dispatch(onUnmount());\r\n };\r\n }, [dispatch, onMount, onUnmount]);\r\n\r\n useEffect(() => {\r\n if (signups) {\r\n let ucData;\r\n if (enrollImprovementExamId) {\r\n ucData = signups.data.find((uc) => uc.signupId === enrollImprovementExamId);\r\n setSelectedUcData(ucData);\r\n } else if (requestImprovementExamId !== null) {\r\n ucData = signups.data.find((uc) => uc.signupId === requestImprovementExamId);\r\n setSelectedUcData(ucData);\r\n }\r\n }\r\n }, [enrollImprovementExamId, requestImprovementExamId]);\r\n\r\n useEffect(() => {\r\n if (filterValues.academicYear !== null && filterValues.semester !== null) {\r\n dispatch(getStudentSignups(filterValues));\r\n }\r\n }, [filterValues]);\r\n\r\n const handleDropdownSelection = (registrationId) => {\r\n dispatch(\r\n getStudentSignups({\r\n semester: null,\r\n academicYear: null,\r\n })\r\n );\r\n\r\n // reset\r\n setFilterValues({\r\n semester: null,\r\n academicYear: null,\r\n });\r\n setSelectedUcData(undefined);\r\n setEnrollCheckbox(null);\r\n };\r\n\r\n const handleRequestImprovOnClose = () => {\r\n dispatch(setRequestImprovementExamId(null));\r\n setEnrollCheckbox(null);\r\n };\r\n\r\n // TODO: check if the enroll improvement Exam modal is the same as the modal for the request improvement\r\n const handleEnrollImprovOnClose = () => {\r\n dispatch(setEnrollImprovementExamId(null));\r\n setEnrollCheckbox(null);\r\n };\r\n\r\n // return (\r\n // }\r\n // subHeader={\r\n // <>\r\n // \r\n // \r\n // \r\n // \r\n // \r\n // \r\n // {t('enrollments.attention', { textOnly: true })}\r\n // \r\n // \r\n // {`${t('enrollments.noticeContent_part1', {\r\n // textOnly: true,\r\n // })} ${t('enrollments.noticeContent_link', {\r\n // textOnly: true,\r\n // })} ${t('enrollments.noticeContent_part2', { textOnly: true })}`}\r\n // \r\n // \r\n // \r\n // \r\n // \r\n // \r\n // {\r\n // handleDropdownSelection(currentRegistrationId);\r\n // }}\r\n // data-testid=\"curricularplan_dropdown_registration\"\r\n // />\r\n // \r\n // \r\n // }\r\n // mainContent={\r\n // <>\r\n // \r\n // \r\n // {t('enrollments.improvementEnrollmentsTitle')}\r\n // \r\n // \r\n // \r\n // {`${t('enrollments.academicYear', { textOnly: true })}:`}\r\n // \r\n // {signups && (\r\n // \r\n // {\r\n // setFilterValues({\r\n // ...filterValues,\r\n // academicYear: data.value,\r\n // });\r\n // }}\r\n // icon={null}\r\n // borderless\r\n // options={signups.filters.academicYear.map((item) => {\r\n // return {\r\n // text: item,\r\n // value: item,\r\n // };\r\n // })}\r\n // selectionFontSize={'medium'}\r\n // /*open={results && results.length > 0 ? true : false}*/\r\n // />\r\n // \r\n // )}\r\n\r\n // \r\n // {`${t('enrollments.semester', { textOnly: true })}:`}\r\n // \r\n\r\n // {signups && (\r\n // \r\n // {\r\n // setFilterValues({\r\n // ...filterValues,\r\n // semester: data.value - 1,\r\n // });\r\n // }}\r\n // icon={null}\r\n // borderless\r\n // options={signups.filters.semester.map((item) => {\r\n // return {\r\n // text:\r\n // item === 0\r\n // ? t('enrollments.annual', { textOnly: true })\r\n // : `${numeral(item).format('o')} ${t('enrollments.semester', {\r\n // textOnly: true,\r\n // })}`,\r\n // value: item + 1,\r\n // };\r\n // })}\r\n // selectionFontSize={'medium'}\r\n // /*open={results && results.length > 0 ? true : false}*/\r\n // />\r\n // \r\n // )}\r\n // \r\n // \r\n // \r\n // \r\n // \r\n // \r\n // }\r\n // secondaryContentOffset={0}\r\n // secondaryContent={\r\n // <>\r\n // {enrollImprovementExamId && selectedUcData && Object.keys(selectedUcData).length > 0 && (\r\n // \r\n // \r\n // {t(`enrollments.improvementEnroll`, { textOnly: true })}\r\n // \r\n // \r\n // }\r\n // onClose={() => handleEnrollImprovOnClose()}\r\n // data-testid=\"curricularplan_modal_options_view\"\r\n // >\r\n // \r\n // \r\n // \r\n // {selectedUcData.uc.ucCode}\r\n // \r\n // \r\n // {selectedUcData.uc.ucName}\r\n // \r\n // \r\n // \r\n // \r\n // \r\n // {t(`enrollments.yearOfStudy`, { textOnly: true })}\r\n // \r\n // \r\n // {`${numeral(selectedUcData.uc.yearOfStudy).format('o')} ${t(\r\n // 'enrollments.year',\r\n // {\r\n // textOnly: true,\r\n // }\r\n // )}`}\r\n // \r\n // \r\n // \r\n // \r\n // {t(`enrollments.semester`, { textOnly: true })}\r\n // \r\n // \r\n // {`${numeral(selectedUcData.uc.semester).format('o')} ${t(\r\n // 'enrollments.semester',\r\n // {\r\n // textOnly: true,\r\n // }\r\n // )}`}\r\n // \r\n // \r\n // \r\n // \r\n // {t(`enrollments.ects`, { textOnly: true })}\r\n // \r\n // \r\n // {selectedUcData.uc.ects}\r\n // \r\n // \r\n // \r\n // \r\n // {t(`enrollments.grade`, { textOnly: true })}\r\n // \r\n // \r\n // {selectedUcData.uc.grade}\r\n // \r\n // \r\n // \r\n // \r\n // \r\n // {t('enrollments.improvementEnroll_info', { textOnly: true })}\r\n // \r\n // \r\n // \r\n // \r\n // \r\n // {t(`enrollments.examDate`, { textOnly: true })}\r\n // \r\n // \r\n // {moment(selectedUcData.examTime).format('LLL')}\r\n // \r\n // \r\n // \r\n // \r\n // {t(`enrollments.examRoom`, { textOnly: true })}\r\n // \r\n // \r\n // {selectedUcData.examLocation}\r\n // \r\n // \r\n // \r\n // \r\n // \r\n // {t(`enrollments.enrollDeadline`, { textOnly: true })}\r\n // \r\n // \r\n // {moment(selectedUcData.deadline).format('LLL')}\r\n // \r\n // \r\n // \r\n // \r\n // {`${t(`enrollments.enrollSubmission`, { textOnly: true })} `}\r\n // \r\n // \r\n // {'*'}\r\n // \r\n // \r\n // \r\n // \r\n // {`${t(`enrollments.enrollSubmissionInfo`, { textOnly: true })}`}\r\n // \r\n // \r\n // \r\n // \r\n // \r\n // \r\n // {\r\n // setEnrollCheckbox(event.currentTarget.checked);\r\n // }}\r\n // />\r\n // \r\n // \r\n // \r\n // {`${t(`enrollments.enrollSubmission_text`, { textOnly: true })} ${\r\n // selectedUcData.uc.ucCode\r\n // } ${selectedUcData.uc.ucName}`}\r\n // \r\n // \r\n // {t(`enrollments.enrollSubmission_subtext`, { textOnly: true })}\r\n // \r\n // \r\n // \r\n // \r\n // \r\n // \r\n // }\r\n // onClick={() => {}}\r\n // >\r\n // {t(`enrollments.submitEnroll`, { textOnly: true })}\r\n // \r\n // \r\n // \r\n // \r\n // )}\r\n\r\n // {requestImprovementExamId && selectedUcData && (\r\n // \r\n // {requestImprovementExamId}\r\n // \r\n // }\r\n // onClose={() => handleRequestImprovOnClose()}\r\n // data-testid=\"curricularplan_modal_options_view\"\r\n // >\r\n // <>{requestImprovementExamId}\r\n // \r\n // )}\r\n\r\n // \r\n // \r\n // {t('enrollments.enrollmentConditions', { textOnly: true })}\r\n // \r\n // \r\n // \r\n // {t('enrollments.enrollmentConditions_par1', { textOnly: true })}\r\n // \r\n // \r\n // {t('enrollments.enrollmentConditions_par2', { textOnly: true })}\r\n // \r\n // \r\n // {t('enrollments.enrollmentConditions_par3', { textOnly: true })}\r\n // \r\n\r\n // {/*\r\n // {t('enrollments.enrollmentConditions_par4', { textOnly: true })}\r\n // */}\r\n // \r\n // \r\n // {\r\n // // TODO\r\n // }}\r\n // >\r\n // \r\n // {t('enrollments.knowMore', { textOnly: true })}\r\n // \r\n // \r\n // \r\n // \r\n // \r\n // \r\n // }\r\n // />\r\n // );\r\n\r\n return (\r\n \r\n \r\n {t('generic.iframeBanner')}\r\n \r\n }\r\n padding={'15px 38px'}\r\n noPointer\r\n />\r\n \r\n \r\n );\r\n};\r\n\r\nexport default ImprovementExamEnrollment;\r\n\r\nconst NoticeWrapper = styled.div`\r\n background-color: ${({ theme }) => theme.colors.lightGrey};\r\n`;\r\n\r\nconst NoticeContent = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n margin-left: 18px;\r\n`;\r\n\r\nconst SegmentContent = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n`;\r\n\r\nconst RegistrationDropdownWrapper = styled.div`\r\n margin-top: 30px;\r\n`;\r\n\r\nconst FilterWrapper = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n`;\r\n\r\nconst FilterDropdownWrapper = styled.div`\r\n margin-left: 8px;\r\n margin-right: 24px;\r\n`;\r\n\r\nconst TableWrapper = styled.div`\r\n margin-top: 30px;\r\n`;\r\n\r\nconst SecondaryContentWrapper = styled.div`\r\n border-style: solid;\r\n border-width: 0px;\r\n border-top: 3px solid ${({ theme }) => theme.colors.grey};\r\n background-color: ${({ theme }) => theme.colors.lightGrey};\r\n /*max-height: 480px;*/\r\n\r\n padding: 27px 24px 0px 24px;\r\n`;\r\n\r\nconst SecondaryContentText = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n margin-top: 12px;\r\n\r\n div:not(:first-child) {\r\n margin-top: 10px;\r\n }\r\n\r\n div:nth-child(3) {\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n }\r\n`;\r\n\r\nconst KnowMoreWrapper = styled.div`\r\n padding: 32px 0px;\r\n`;\r\n\r\nconst KnowMoreButton = styled(Button)`\r\n display: flex;\r\n justify-content: space-between;\r\n width: 100%;\r\n padding: 0px;\r\n\r\n > div {\r\n width: 100%;\r\n display: flex;\r\n justify-content: space-between;\r\n }\r\n`;\r\n\r\nconst ModalContentWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst ModalUcTitle = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n\r\n > div {\r\n margin-right: 16px;\r\n }\r\n`;\r\n\r\nconst ModalUcInfo = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n margin-top: 16px;\r\n`;\r\n\r\nconst ModalUcSingleInfo = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n margin-right: 56px;\r\n`;\r\n\r\nconst EnrollInfoTitle = styled.div`\r\n margin-top: 40px;\r\n`;\r\n\r\nconst ModalUcDeadline = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n margin-top: 32px;\r\n`;\r\n\r\nconst EnrollSubmission = styled.div`\r\n margin-top: 24px;\r\n`;\r\n\r\nconst EnrollSubmissionInfo = styled.div`\r\n margin-top: 16px;\r\n`;\r\n\r\nconst ModalSegmentWrapper = styled.div`\r\n margin-top: 16px;\r\n`;\r\n\r\nconst ModalSegmentContent = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n`;\r\n\r\nconst ModalSegmentText = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n min-width: 0;\r\n`;\r\n\r\nconst ModalCheckboxWrapper = styled.div`\r\n margin-right: 16px;\r\n`;\r\n\r\nconst ModalButtonWrapper = styled.div`\r\n display: flex;\r\n align-items: center;\r\n margin-top: 40px;\r\n margin-bottom: 18px;\r\n justify-content: center;\r\n`;\r\n\r\nconst ModalHeaderWrapper = styled.div`\r\n display: flex;\r\n justify-content: space-between;\r\n`;\r\n\r\nconst Wrapper = styled.div`\r\n text-align: center;\r\n`;\r\n","/**\r\n * EvaluationTypeSelection scene selectors\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getUserNmec = (state: RootState) => state.App.user.nmec;\r\nexport const getEvaluationTypeSelectionSlice = (state: RootState) => state.EvaluationTypeSelection;\r\nexport const getUser = (state: RootState) => state.App.user;\r\n","/**\r\n * EvaluationTypeSelection scene\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport React, { useEffect } from 'react';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport * as selectors from './logic/selectors';\r\nimport styled from 'styled-components';\r\n\r\nimport { actions } from 'store/rootSlices';\r\nimport { CallToAction, Text } from '@paco_ua/pacoui';\r\n\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\n\r\nconst EvaluationTypeSelection = ({ t }) => {\r\n const { onMount, onUnmount } = actions.EvaluationTypeSelection;\r\n\r\n const dispatch = useDispatch();\r\n const { loading } = useSelector(selectors.getEvaluationTypeSelectionSlice);\r\n const user = useSelector(selectors.getUser);\r\n\r\n useEffect(() => {\r\n dispatch(onMount());\r\n return () => {\r\n dispatch(onUnmount());\r\n };\r\n }, [dispatch, onMount, onUnmount]);\r\n\r\n return (\r\n // }\r\n // mainContent={<>Evaluation Type Selection}\r\n // secondaryContentOffset={113}\r\n // secondaryContent={<>Secondary content}\r\n // />\r\n \r\n \r\n {t('generic.iframeBanner')}\r\n \r\n }\r\n padding={'15px 38px'}\r\n noPointer\r\n />\r\n \r\n \r\n );\r\n};\r\n\r\nconst Wrapper = styled.div`\r\n text-align: center;\r\n`;\r\nexport default EvaluationTypeSelection;\r\n","import { actions } from 'store/rootSlices';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { useState, useEffect } from 'react';\r\nimport * as selectors from './logic/selectors';\r\nimport { t } from 'app';\r\n\r\nclass GradesManagementUtils {\r\n static useGradesManagement() {\r\n const { pautasLista, periodosDisponiveis, filtrarPorPeriodo, loadingStatus, pautaStats, selectedState: selectedReduxState } = useSelector(selectors.getGradesManagementSlice);\r\n const dispatch = useDispatch();\r\n const [selectedState, setSelectedState] = useState(selectedReduxState);\r\n const [searchText, setSearchText] = useState(\"\");\r\n const [selectedYear, setSelectedYear] = useState(null);\r\n const currentLocale = useSelector(selectors.getCurrentLocale);\r\n const [filteredPautasByState, setFilteredPautasByState] = useState([]);\r\n\r\n const pautaStatsArray = Object.entries(pautaStats).map(([semester, details]) => ({\r\n semester,\r\n ...details,\r\n }));\r\n\r\n const totalPautasStats = pautaStatsArray.reduce((accumulator, current) => {\r\n const toSubmit = current.toSubmit || 0;\r\n const toSign = current.toSign || 0;\r\n const withErrors = current.withErrors || 0;\r\n\r\n return accumulator + toSubmit + toSign + withErrors;\r\n }, 0);\r\n\r\n const handleSearchChange = (searchText: string) => {\r\n setSearchText(searchText);\r\n };\r\n\r\n useEffect(() => {\r\n const updatedFilteredPautasByState = applyFilters(pautasLista ?? [], selectedReduxState, searchText);\r\n \r\n let updatedCountPautasByState = updatedFilteredPautasByState.length;\r\n \r\n if (JSON.stringify(filteredPautasByState) !== JSON.stringify(updatedFilteredPautasByState)) {\r\n setFilteredPautasByState(updatedFilteredPautasByState);\r\n //dispatch(actions.GradesManagement.setPautasLista(updatedFilteredPautasByState));\r\n }\r\n\r\n if (updatedCountPautasByState > 0 && pautasLista?.length !== 0) {\r\n dispatch(\r\n actions.Toaster.showToaster({\r\n title: `${t('pautas.have', { textOnly: true })} ${updatedCountPautasByState} ${t('pautas.homeActionInfoToaster' + selectedReduxState, { textOnly: true })}`,\r\n icon: 'info',\r\n type: 'info',\r\n })\r\n );\r\n }\r\n else{\r\n dispatch(actions.GradesManagement.setSelectedState('Todas'));\r\n setSelectedState('Todas');\r\n }\r\n }, [pautasLista]);\r\n \r\n \r\n\r\n const handleYearChange = (e, data) => {\r\n const selectedValue = data.value;\r\n setSelectedYear(selectedValue);\r\n dispatch(actions.GradesManagement.changeYearRequest({ period: data.value }));\r\n dispatch(actions.GradesManagement.setFiltrarPorPeriodo(data.value));\r\n\r\n const filteredPautasByState = applyFilters(pautasLista ?? [], selectedState, searchText);\r\n const availableStatesForYear = Array.from(new Set(filteredPautasByState.map((item) => item.estadoActual)));\r\n if (!availableStatesForYear.includes(selectedState)) {\r\n handleStateChange({ value: 'Todas' });\r\n return;\r\n }\r\n\r\n //displayInfoToaster(selectedValue);\r\n };\r\n\r\n const applyFilters = (pautas: any[], selectedState: string, searchText: string) => {\r\n\r\n return pautas\r\n .filter((item) => {\r\n const searchString = searchText.toLowerCase();\r\n return (\r\n item.codPauta.toLowerCase().includes(searchString) ||\r\n item.nomeDisciplina.toLowerCase().includes(searchString) ||\r\n item.tipoExame.toLowerCase().includes(searchString) ||\r\n item.dataLimiteLancamento.toLowerCase().includes(searchString) ||\r\n item.ntotalAlunos.toString().includes(searchString) ||\r\n item.estadoActual.toString().includes(searchString)\r\n\r\n );\r\n\r\n })\r\n .filter((item) => {\r\n if (selectedState && selectedState !== 'Todas') {\r\n return item.estadoActual === parseInt(selectedState, 10);\r\n }\r\n return true;\r\n });\r\n };\r\n\r\n const uniqueStatus = Array.isArray(pautasLista)\r\n ? Array.from(new Set(pautasLista.map((item: { estadoActual: any }) => item.estadoActual)))\r\n : [];\r\n\r\n const intersectedPautas = pautasLista\r\n ?.filter((item) => {\r\n const searchString = searchText.toLowerCase();\r\n const matchesSearch =\r\n item.codPauta.toLowerCase().includes(searchString) ||\r\n item.nomeDisciplina.toLowerCase().includes(searchString) ||\r\n item.tipoExame.toLowerCase().includes(searchString) ||\r\n item.dataLimiteLancamento.toLowerCase().includes(searchString) ||\r\n item.ntotalAlunos.toString().includes(searchString)\r\n\r\n if (selectedState && selectedState !== 'Todas')\r\n return matchesSearch && item.estadoActual === parseInt(selectedState, 10);\r\n\r\n return matchesSearch;\r\n }).map((item) => ({ ...item, estadoActual: item.estadoActual, dataLimiteLancamento: new Date(item.dataLimiteLancamento).getFullYear() < 1970 ? '-' : item.dataLimiteLancamento }));\r\n\r\n\r\n const handleStateChange = (selectedItem: { key?: string | number; text?: string; value: string } | undefined) => {\r\n if (selectedItem) {\r\n const selectedValue = selectedItem.value;\r\n\r\n setSelectedState(selectedValue);\r\n dispatch(actions.GradesManagement.setSelectedState(selectedValue));\r\n\r\n let filteredPautasByState;\r\n\r\n if (selectedValue && selectedValue !== 'Todas') {\r\n filteredPautasByState = applyFilters(pautasLista ?? [], selectedValue, searchText);\r\n } else {\r\n filteredPautasByState = applyFilters(pautasLista ?? [], '', searchText);\r\n }\r\n\r\n setFilteredPautasByState(filteredPautasByState);\r\n\r\n displayInfoToaster(selectedValue);\r\n }\r\n };\r\n\r\n\r\n const displayInfoToaster = (selectedState) => {\r\n if (selectedState) {\r\n const updatedFilteredPautasByState = applyFilters(pautasLista ?? [], selectedState, searchText);\r\n setFilteredPautasByState(updatedFilteredPautasByState);\r\n\r\n const updatedCountPautasByState = updatedFilteredPautasByState.length;\r\n\r\n if (updatedCountPautasByState > 0) {\r\n dispatch(\r\n actions.Toaster.showToaster({\r\n title: `${t('pautas.have', { textOnly: true })} ${updatedCountPautasByState} ${t('pautas.homeActionInfoToaster' + selectedState, { textOnly: true })}`,\r\n icon: 'info',\r\n type: 'info',\r\n })\r\n );\r\n }\r\n }\r\n };\r\n\r\n\r\n const handleDashboardClick = (state: string, period: string) => {\r\n dispatch(actions.GradesManagement.setPautasListaState(state));\r\n dispatch(actions.GradesManagement.changeYearRequest({ period: period, changePautasLista: true }));\r\n dispatch(actions.GradesManagement.setFiltrarPorPeriodo(period));\r\n dispatch(actions.GradesManagement.setSelectedState(state));\r\n setSelectedYear(period);\r\n setSelectedState(state);\r\n }\r\n\r\n return {\r\n pautasLista,\r\n pautaStatsArray,\r\n totalPautasStats,\r\n periodosDisponiveis,\r\n filtrarPorPeriodo,\r\n loadingStatus,\r\n selectedReduxState,\r\n searchText,\r\n selectedYear,\r\n handleSearchChange,\r\n handleYearChange,\r\n applyFilters,\r\n uniqueStatus,\r\n filteredPautasByState,\r\n intersectedPautas,\r\n handleStateChange,\r\n currentLocale,\r\n handleDashboardClick\r\n };\r\n }\r\n}\r\n\r\nexport default GradesManagementUtils;\r\n","import { useState, useEffect, Dispatch, SetStateAction } from \"react\";\r\n\r\ninterface Props {\r\n pautasLista: any[];\r\n selectedState: string;\r\n}\r\n\r\nexport interface State {\r\n data: any;\r\n setData: Dispatch>;\r\n originalData: any;\r\n setOriginalData: Dispatch>;\r\n selectedPautaIds: number[];\r\n setSelectedPautaIds: Dispatch>;\r\n showError: boolean;\r\n setShowError: Dispatch>;\r\n isPdfReady: boolean;\r\n setIsPdfReady: Dispatch>;\r\n signingPdfUrl: string | null;\r\n setSigningPdfUrl: Dispatch>;\r\n pdfUrl: string | null;\r\n setPdfUrl: Dispatch>;\r\n showModal: boolean;\r\n setShowModal: Dispatch>;\r\n isLoading: boolean;\r\n setIsLoading: Dispatch>;\r\n isAllSelected: boolean;\r\n setIsAllSelected: Dispatch>;\r\n maxPautasNumber: number;\r\n // navigate: any; // Alterar para onde esta definido o navigate\r\n formatDate: (dateString: string) => string;\r\n handleCheckboxChange: (id: number, isChecked: boolean) => void;\r\n handleSelectAll: ( event: React.ChangeEvent, data: any, selectedRows: number[], setSelectedPautaIds: Dispatch>, maxPautasNumber: number) => void;\r\n handleModal: (id: number | null, selectedPautaIds: number[], closeModal: boolean, setSelectedPautaIds: Dispatch>, setShowModal: Dispatch>, showErrorForDuration: (duration: number) => void) => void;\r\n showErrorForDuration: (duration: number) => void;\r\n}\r\n\r\nexport const useInitializeState = (props: Props): State => {\r\n const { pautasLista, selectedState } = props;\r\n\r\n const [data, setData] = useState(pautasLista);\r\n const [originalData, setOriginalData] = useState(pautasLista);\r\n const [selectedPautaIds, setSelectedPautaIds] = useState([]);\r\n const [showError, setShowError] = useState(false);\r\n const [isPdfReady, setIsPdfReady] = useState(false);\r\n const [signingPdfUrl, setSigningPdfUrl] = useState(null);\r\n const [pdfUrl, setPdfUrl] = useState(null);\r\n const [showModal, setShowModal] = useState(false);\r\n const [isLoading, setIsLoading] = useState(true);\r\n const [isAllSelected, setIsAllSelected] = useState(false);\r\n\r\n // https://github.com/amagovpt/doc-CMD-assinatura/blob/main/AMA%20-%20CCMovel%20Especificação%20de%20Serviços%20Assinatura.pdf\r\n const maxPautasNumber = 100; // value set by AMA for maximum pautas number that can be signed\r\n\r\n // const navigate = useNavigate();\r\n\r\n useEffect(() => {\r\n setOriginalData(props.pautasLista);\r\n setData(props.pautasLista);\r\n }, [props.pautasLista, showModal]);\r\n\r\n const formatDate = (dateString: string) => {\r\n const dateObj = new Date(dateString);\r\n return dateObj.toLocaleDateString(\"en-GB\").replace(/\\//g, \"-\");\r\n };\r\n\r\n const showErrorForDuration = (duration: number) => {\r\n setShowError(true);\r\n \r\n setTimeout(() => {\r\n setShowError(false);\r\n }, duration);\r\n };\r\n\r\n const handleCheckboxChange = (id: number, isChecked: boolean) => {\r\n console.log('Checkbox Change - ID:', id, 'isChecked:', isChecked);\r\n setSelectedPautaIds((prevSelectedIds) => {\r\n let newSelectedIds = prevSelectedIds;\r\n if (isChecked && !prevSelectedIds.includes(id)) {\r\n newSelectedIds = [...prevSelectedIds, id];\r\n } else if (!isChecked) {\r\n newSelectedIds = prevSelectedIds.filter((pid) => pid !== id);\r\n }\r\n \r\n setIsAllSelected(newSelectedIds.length === maxPautasNumber); // update isAllSelected based on the count of selected checkboxes\r\n \r\n return newSelectedIds;\r\n });\r\n };\r\n \r\n return {\r\n data,\r\n setData,\r\n originalData,\r\n setOriginalData,\r\n selectedPautaIds,\r\n setSelectedPautaIds,\r\n showError,\r\n setShowError,\r\n isPdfReady,\r\n setIsPdfReady,\r\n signingPdfUrl,\r\n setSigningPdfUrl,\r\n pdfUrl,\r\n setPdfUrl,\r\n showModal,\r\n setShowModal,\r\n isLoading,\r\n isAllSelected,\r\n setIsAllSelected,\r\n setIsLoading,\r\n // navigate,\r\n formatDate,\r\n handleCheckboxChange,\r\n handleSelectAll, \r\n handleModal,\r\n showErrorForDuration,\r\n maxPautasNumber,\r\n };\r\n};\r\n\r\nexport const handleSelectAll = (\r\n event: React.ChangeEvent,\r\n data: any[],\r\n selectedRows: number[],\r\n setSelectedPautaIds: Dispatch>,\r\n maxPautasNumber: number\r\n) => {\r\n if (event.target.checked) {\r\n const newSelectedIds = data.slice(0, maxPautasNumber).map((item) => item.paraAssinaturaId);\r\n console.log(newSelectedIds)\r\n setSelectedPautaIds(newSelectedIds);\r\n } else {\r\n setSelectedPautaIds([]);\r\n }\r\n};\r\n\r\nexport const handleModal = (\r\n id?: number | null,\r\n selectedPautaIds?: number[],\r\n closeModal?: boolean,\r\n setSelectedPautaIds?: Dispatch>,\r\n setShowModal?: Dispatch>,\r\n showErrorForDuration?: (duration: number) => void\r\n) => {\r\n if (!id && selectedPautaIds?.length === 0) {\r\n showErrorForDuration?.(1500);\r\n return;\r\n }\r\n\r\n if (id && setSelectedPautaIds) {\r\n setSelectedPautaIds([id]);\r\n }\r\n\r\n if (closeModal)\r\n setShowModal?.(false);\r\n else // toggle modal\r\n setShowModal?.((prevShowModal) => !prevShowModal);\r\n};","import React from 'react';\r\nimport { ProgressBar } from 'react-bootstrap';\r\nimport { t } from 'app';\r\n// import 'bootstrap/dist/css/bootstrap.min.css';\r\n\r\nexport function StateProgressBar(state) {\r\n const percentage = state*(100/8);\r\n return (\r\n
    \r\n
    \r\n \r\n
    \r\n

    \r\n {t('pautas.gradeState'+state)}\r\n

    \r\n
    \r\n );\r\n}","import React from \"react\";\r\nimport styled from \"styled-components\";\r\n// import 'animate.css';\r\n\r\nconst Backdrop = styled.div`\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 100vh;\r\n z-index: 2;\r\n background-color: rgba(0, 0, 0, 0.5);\r\n z-index: 31;\r\n z-index: 1102;\r\n\r\n @media (max-width: 768px) {\r\n height: 100%;\r\n }\r\n`;\r\n\r\nconst ModalWrapper = styled.div`\r\n background-color: #fff;\r\n position: fixed;\r\n width: 60%;\r\n padding: 1rem;\r\n z-index: 1103;\r\n top: 0;\r\n left: 0;\r\n margin: 1% 20% 0 20%;\r\n max-width: 100%; // Ensure it doesn't exceed the device width\r\n\r\n @media (max-width: 768px) {\r\n width: 90%;\r\n margin: 5% 5%;\r\n max-width: 90%;\r\n }\r\n`;\r\n\r\ninterface ModalProps {\r\n children: React.ReactNode;\r\n changeModal: (...args: any[]) => void;\r\n}\r\n\r\nconst Modal: React.FC = (props) => {\r\n const hideModal = () => {\r\n props.changeModal();\r\n };\r\n\r\n return (\r\n <>\r\n \r\n {props.children}\r\n \r\n );\r\n};\r\n\r\nexport default Modal;","import React, { useEffect } from 'react';\r\nimport { useDispatch } from 'react-redux';\r\nimport { Button, Table, Checkbox } from \"@paco_ua/pacoui\";\r\nimport { useInitializeState, State } from './utils';\r\nimport { StateProgressBar } from '../StateProgressBar/index';\r\nimport Modal from '../Modal/Modal'\r\nimport SigningModal from '../Modal/SigningModal'\r\nimport { actions } from 'store/rootSlices';\r\nimport { t } from 'app';\r\ninterface TableViewProps {\r\n pautasLista: any[];\r\n selectedState: string;\r\n loading: boolean;\r\n isPT: boolean;\r\n}\r\n\r\nlet data_listaPautas: any[];\r\n\r\n\r\nconst TableView: React.FC void }> = (props) => {\r\n const dispatch = useDispatch();\r\n const { navigateTo } = actions.App;\r\n const array_listaPautas = props.pautasLista;\r\n const loadingStatus = props.loading;\r\n\r\n array_listaPautas.forEach((subarray) => {\r\n if (Array.isArray(subarray) && subarray.length > 0) {\r\n data_listaPautas = subarray;\r\n\r\n }\r\n });\r\n\r\n const formatDate = (dateString: string) => {\r\n const dateObj = new Date(dateString);\r\n return dateObj.toLocaleDateString(\"en-GB\");\r\n };\r\n\r\n\r\n\r\n\r\n const {\r\n data,\r\n selectedPautaIds,\r\n showError,\r\n showModal,\r\n setSelectedPautaIds,\r\n setShowModal,\r\n handleModal,\r\n showErrorForDuration,\r\n handleCheckboxChange,\r\n handleSelectAll,\r\n isAllSelected,\r\n setIsAllSelected,\r\n maxPautasNumber\r\n }: State = useInitializeState(props);\r\n\r\n //Ver onde esta definido o navigate\r\n // const navigate = useNavigate();\r\n // const { handleRowClick, handleEditClick } = handleNavigation(navigate);\r\n\r\n const tooltipText = t('pautas.infoDisabledCheckbox', { textOnly: true });\r\n\r\n\r\n\r\n const tableStructure = {\r\n header: {\r\n titles: [\r\n ...(Number(props.selectedState) === 7\r\n ? [{\r\n text: setIsAllSelected(!isAllSelected)}\r\n onChange={(e) => handleSelectAll(e, data_listaPautas, [], setSelectedPautaIds, maxPautasNumber)}\r\n />,\r\n style: { textAlign: 'left', width: '0.5%' }\r\n }]\r\n : [{ text: '', style: { textAlign: 'left', width: '0.5%', fontSize: \"15px\" } }]),\r\n { text: t('pautas.code'), style: { textAlign: 'left', width: '0%', fontSize: \"15px\", } },\r\n { text: t('pautas.uc'), style: { textAlign: 'left', width: '50%', fontSize: \"15px\", } },\r\n { text: t('pautas.codigoPauta'), style: { textAlign: 'left', width: '5%', fontSize: \"15px\", } },\r\n { text: t('pautas.tipoExame'), style: { textAlign: 'left', width: '2%', fontSize: \"15px\", } },\r\n { text: t('pautas.examDeadline'), style: { textAlign: 'left', width: '8%', fontSize: \"15px\", } },\r\n { text: t('pautas.studentsNumber'), style: { textAlign: 'left', width: '11%', fontSize: \"15px\", } },\r\n { text: t('pautas.gradeState'), style: { textAlign: 'left', width: '20%', fontSize: \"15px\", } },\r\n { text: '', style: { textAlign: 'left', width: '-100%', padding: '0px', fontSize: \"15px\", } },\r\n { text: '', style: { textAlign: 'left', width: '-100%', padding: '0px', fontSize: \"15px\", } },\r\n ],\r\n type: 'columnTitle',\r\n },\r\n rows: Array.isArray(data_listaPautas)\r\n ? data_listaPautas.map((subarrayItem) => {\r\n const isDisabled = selectedPautaIds.length >= 100 && !selectedPautaIds.includes(subarrayItem.paraAssinaturaId);\r\n return {\r\n cells: [\r\n {\r\n cellProps: '',\r\n content: Number(props.selectedState) === 7 || Number(props.selectedState) === 4 ? (\r\n
    \r\n handleCheckboxChange(subarrayItem.paraAssinaturaId, e.target.checked)}\r\n />\r\n
    \r\n ) : null,\r\n },\r\n\r\n { cellProps: '', content: subarrayItem.codDisciplina.toString() },\r\n\r\n {\r\n cellProps: '',\r\n content: (\r\n \r\n {subarrayItem && props.isPT ? subarrayItem.nomeDisciplina : subarrayItem.nomeDisciplinaEng}\r\n \r\n ),\r\n },\r\n { cellProps: '', content: subarrayItem && subarrayItem.codPauta ? subarrayItem.codPauta.toString() : '' },\r\n { cellProps: '', content: subarrayItem && subarrayItem.tipoExame ? subarrayItem.tipoExame : '' },\r\n { cellProps: '', content: subarrayItem && subarrayItem.dataLimiteLancamento !== '-' ? formatDate(subarrayItem.dataLimiteLancamento) :
    {subarrayItem.dataLimiteLancamento}
    },\r\n\r\n {\r\n cellProps: '',\r\n content: subarrayItem?.ntotalAlunos === 1\r\n ? '1' + (subarrayItem.nmecAluno ? ` (${subarrayItem.nmecAluno})` : '')\r\n : `${subarrayItem?.ntotalAlunos || ''}`,\r\n },\r\n\r\n\r\n {\r\n cellProps: '',\r\n content: StateProgressBar(subarrayItem.estadoActual),\r\n },\r\n {\r\n cellProps: '',\r\n content:\r\n subarrayItem.estadoActual === 1 || subarrayItem.estadoActual === 2 || subarrayItem.estadoActual === 6 ? (\r\n \r\n ) : subarrayItem.estadoActual === 7 && !(Number(props.selectedState) === 7) ? (\r\n \r\n ) : null,\r\n },\r\n { cellProps: '', content: },\r\n ],\r\n collapsableRows: [],\r\n };\r\n\r\n })\r\n : [],\r\n };\r\n\r\n\r\n return (\r\n
    \r\n {showModal && (\r\n \r\n {\r\n handleModal(null, selectedPautaIds, true, setSelectedPautaIds, setShowModal, showErrorForDuration);\r\n dispatch(actions.GradesManagement.onMount()); // always reload the table contents\r\n setIsAllSelected(false);\r\n if (success) {\r\n setSelectedPautaIds([]); // clear the selected pautas after signing\r\n props.scrollToTop();\r\n }\r\n }}\r\n pautas={data_listaPautas.filter(pauta => selectedPautaIds.includes(pauta.paraAssinaturaId))} // checked pautas to enumerate\r\n />\r\n \r\n\r\n )}\r\n\r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n {showError && `* ${t('pautas.pautaToSign', {\r\n textOnly: true,\r\n })}`}\r\n
    \r\n\r\n
    \r\n\r\n {\r\n parseInt(props.selectedState) === 7 && parseInt(props.selectedState) !== 4 && (\r\n \r\n )}\r\n
    \r\n \r\n );\r\n};\r\n\r\nexport default TableView;","import React, { SyntheticEvent, useEffect, useState, useRef } from 'react';\r\nimport styled from 'styled-components';\r\n\r\nimport { SearchBox, Dropdown, AnimatedBackground, Card } from '@paco_ua/pacoui';\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\nimport GradesManagementUtils from './utils';\r\nimport TableView from './TableView/index';\r\nimport { faInfoCircle } from '@fortawesome/pro-light-svg-icons';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport * as selectors from './logic/selectors';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { actions } from 'store/rootSlices';\r\n\r\n\r\n\r\nconst LoadingWrapper = styled.div`\r\n width: 100%;\r\n height: 300px;\r\n\r\n * {\r\n margin: 8px 0px;\r\n }\r\n`;\r\n\r\nconst GridContainer = styled.div`\r\n display: grid;\r\n grid-template-columns: repeat(6, 1fr);\r\n grid-auto-rows: minmax(min-content, max-content);\r\n overflow-y: auto;\r\n gap: 10px;\r\n max-height: calc(65vh - 200px);\r\n margin-left: 3rem;\r\n margin-right: 3rem;\r\n`;\r\n\r\nconst SemesterBlock = styled.div`\r\n width: 100%;\r\n box-sizing: border-box;\r\n margin-bottom: 10px;\r\n &:last-child {\r\n margin-bottom: 0;\r\n }\r\n`;\r\n\r\nconst SemesterTitle = styled.div`\r\n font-weight: bold;\r\n margin-bottom: 0.5rem;\r\n`;\r\n\r\nconst StatLine = styled.div`\r\n display: flex;\r\n align-items: center;\r\n &:hover {\r\n > span.statLabel {\r\n color: #000;\r\n }\r\n }\r\n`;\r\n\r\nconst StatLabel = styled.span.attrs({ className: 'statLabel' })`\r\n cursor: pointer;\r\n color: #757575;\r\n text-decoration: underline;\r\n margin-bottom: 0.9rem;\r\n`;\r\n\r\nconst StatCount = styled.p`\r\n cursor: pointer;\r\n color: white;\r\n width: 1.6rem; \r\n height: 1.6rem; \r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n border-radius: 50%;\r\n font-size: 14px;\r\n margin-right: 0.3rem;\r\n`;\r\n\r\nconst Dashboard = styled.div`\r\n display: flex;\r\n margin-left: 30px;\r\n margin-right: 30px;\r\n margin-bottom: 2%;\r\n`;\r\n\r\n\r\nconst GradesManagement = ({ theme, t }) => {\r\n\r\n let year, semester;\r\n let formattedYear;\r\n const {\r\n pautaStatsArray,\r\n totalPautasStats,\r\n periodosDisponiveis,\r\n filtrarPorPeriodo,\r\n loadingStatus,\r\n selectedReduxState,\r\n handleSearchChange,\r\n handleYearChange,\r\n uniqueStatus,\r\n intersectedPautas,\r\n handleStateChange,\r\n currentLocale,\r\n handleDashboardClick\r\n } = GradesManagementUtils.useGradesManagement();\r\n const [year1, semester1] = filtrarPorPeriodo.split('-');\r\n const nextYear = parseInt(year1) + 1;\r\n const formattedFiltrarPorPeriodo = `${year1}/${nextYear.toString().slice(-2)} - ${semester1}º ${t('pautas.semestre', { textOnly: true })}`;\r\n const dropdownOptions = periodosDisponiveis.map((choice, index) => {\r\n [year, semester] = choice.split('-');\r\n\r\n if (semester === '0')\r\n formattedYear = `${parseInt(year)}/${parseInt(year.slice(-2)) + 1} - ${t('pautas.annualPeriod', { textOnly: true })}`; // when semester is 0 it means it's the whole year\r\n else\r\n formattedYear = `${parseInt(year)}/${parseInt(year.slice(-2)) + 1} - ${semester}º ${t('pautas.semestre', { textOnly: true })}`;\r\n\r\n return {\r\n key: choice,\r\n text: formattedYear,\r\n value: choice,\r\n };\r\n });\r\n\r\n const ref = useRef(null);\r\n\r\n const scrollToTop = () => {\r\n ref.current?.scrollTo({ top: 0, behavior: 'smooth' });\r\n };\r\n\r\n const pautasLista = useSelector(selectors.getPautasLista);\r\n\r\n const dispatch = useDispatch(); // Correctly call useDispatch at the top level\r\n\r\n useEffect(() => {\r\n // Dispatch the action on mount\r\n dispatch(actions.GradesManagement.onMount());\r\n\r\n // Return a cleanup function that dispatches another action when the component unmounts\r\n return () => {\r\n dispatch(actions.GradesManagement.onUnmount());\r\n };\r\n }, [dispatch]);\r\n\r\n const placeholderText = dropdownOptions.length > 0 ? dropdownOptions[0].text : \"\";\r\n\r\n return (\r\n }\r\n mainContent={\r\n <>\r\n {loadingStatus.loadingGrades ? (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ) : (\r\n
    \r\n \r\n {(totalPautasStats > 0) ? (\r\n \r\n {loadingStatus.loadingStats ? (\r\n <>\r\n \r\n \r\n \r\n \r\n ) : (\r\n <>\r\n
    \r\n \r\n

    {totalPautasStats} {t('pautas.pendingGrades', { textOnly: true })}!

    \r\n
    \r\n \r\n {pautaStatsArray.map((item, index) => (\r\n \r\n \r\n {item.semester.substring(0, 4)}/{parseInt(item.semester.substring(0, 4).toString().slice(-2)) + 1} - {item.semester.substring(4)}º {t('pautas.semestre', { textOnly: true })}\r\n \r\n {item.withErrors && handleDashboardClick(\"6\", `${item.semester.substring(0, 4)}-${item.semester.substring(4)}`)}>{item.withErrors}{t('pautas.gradesWithErrors', { textOnly: true })}}\r\n {item.toSubmit && handleDashboardClick(\"2\", `${item.semester.substring(0, 4)}-${item.semester.substring(4)}`)}>{item.toSubmit}{t('pautas.gradesToSubmit', { textOnly: true })}}\r\n {item.toSign && handleDashboardClick(\"7\", `${item.semester.substring(0, 4)}-${item.semester.substring(4)}`)}>{item.toSign}{t('pautas.gradesToSign', { textOnly: true })}}\r\n \r\n ))}\r\n \r\n \r\n )}\r\n
    ) :\r\n \r\n
    \r\n \r\n

    {t('pautas.noGradesStats')}

    \r\n
    \r\n
    }\r\n
    \r\n\r\n
    \r\n , data: { [key: string]: any }) => handleYearChange(e, data)}\r\n placeholder={filtrarPorPeriodo ? formattedFiltrarPorPeriodo : placeholderText}\r\n style={{ marginRight: 10 }}\r\n />\r\n\r\n ({\r\n key: choice.toString(),\r\n text: t(`pautas.gradeState${choice}`, { textOnly: true }),\r\n value: choice.toString(),\r\n })),\r\n ]}\r\n value={selectedReduxState}\r\n onChange={(e: any, item: { key: string | number; text: string; value: string } | undefined) => handleStateChange(item)}\r\n placeholder={t('pautas.stateFilter', {\r\n textOnly: true,\r\n })}\r\n style={{ marginRight: 10 }}\r\n />\r\n\r\n \r\n
    \r\n\r\n
    \r\n \r\n
    \r\n
    \r\n )}\r\n \r\n }\r\n />\r\n\r\n );\r\n};\r\n\r\nexport default GradesManagement;\r\n","import { RootState } from 'store/rootSlices';\r\n\r\nexport const getUserNmec = (state: RootState) => state.App.user.nmec;\r\nexport const getUser = (state: RootState) => state.App.user;\r\nexport const selectHDADOS = (state: RootState) => state.EditGrades.HDADOS;\r\nexport const selectDicionarios = (state: RootState) => state.EditGrades.Dicionarios;\r\nexport const selectRegimes = (state: RootState) => state.EditGrades.regimes;\r\nexport const selectGradeData = (state: RootState) => state.EditGrades.gradesData;\r\nexport const selectValidGradeValues = (state: RootState) => state.EditGrades.validGradeValues;\r\nexport const selectGradeEdits = (state: RootState) => state.EditGrades.gradeEdits;\r\nexport const selectIsStatisticsModalOpen = (state: RootState) => state.EditGrades.isStatisticsModalOpen;\r\nexport const isCSVModalOpen = (state: RootState) => state.EditGrades.isCSVModalOpen;\r\nexport const csvFile = (state: RootState) => state.EditGrades.csvFile;\r\nexport const selectIsLabelsModalOpen = (state: RootState) => state.EditGrades.isLabelsModalOpen;\r\nexport const selectDropdownValueSelected = (state: RootState) => state.EditGrades.dropdownValueSelected;\r\nexport const selectIsConfirmPageLeaveModalOpen = (state: RootState) => state.EditGrades.isConfirmPageLeaveModalOpen;\r\nexport const selectIsErrorsModalOpen = (state: RootState) => state.EditGrades.isErrorsModalOpen;\r\nexport const selectImportErrors = (state: RootState) => state.EditGrades.importErrors;\r\nexport const selectImportWarnings = (state: RootState) => state.EditGrades.importWarnings;\r\nexport const selectIsConfirmDiscardChangesModalOpen = (state: RootState) => state.EditGrades.isConfirmDiscardChangesModalOpen;\r\nexport const selectExamDate = (state: RootState) => state.EditGrades.examDate;\r\nexport const selectLoadingStatus = (state: RootState) => state.EditGrades.loadingStatus;\r\nexport const selectGradeDetails = (state: RootState) => state.EditGrades.gradeDetails;\r\n","import React from 'react';\r\nimport styled from \"styled-components\";\r\n\r\nconst Backdrop = styled.div`\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 100vh;\r\n z-index: 2;\r\n background-color: rgba(0, 0, 0, 0.5);\r\n z-index: 31;\r\n z-index: 1102;\r\n`;\r\n\r\nconst ModalWrapper = styled.div`\r\n background-color: #fff;\r\n width: 35%;\r\n position: fixed;\r\n padding: 1rem;\r\n z-index: 1103;\r\n position: fixed;\r\n top: 50%;\r\n left: 50%;\r\n transform: translate(-50%, -50%);\r\n`;\r\n\r\ninterface ModalProps {\r\n children: React.ReactNode;\r\n changeModal: (id?: number) => void;\r\n}\r\n\r\nconst Modal: React.FC = (props) => {\r\n\r\n const hideModal = () => {\r\n props.changeModal();\r\n }\r\n\r\n return (\r\n <>\r\n \r\n {props.children}\r\n \r\n )\r\n}\r\n\r\n\r\nexport default Modal;","import React, { useContext } from \"react\";\r\nimport Modal from \"shared/components/Modal\";\r\nimport styled from 'styled-components';\r\nimport { Button } from '@paco_ua/pacoui';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faInfoCircle } from '@fortawesome/pro-light-svg-icons';\r\nimport { t } from 'app';\r\n\r\nconst ConfirmActionModal = ({ title, body, onClick, onConfirm, confirmButtonText = t('pautas.continuar', { textOnly: true }), cancelButtonText = t('pautas.cancel', { textOnly: true }) }) => {\r\n\r\n const color = \"#333333\";\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {title}\r\n \r\n \r\n {body && (\r\n \r\n

    {body}

    \r\n
    \r\n )}\r\n
    \r\n \r\n \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nexport default ConfirmActionModal;\r\n\r\nconst MessageWrapper = styled.div`\r\n padding-right: 24px;\r\n`;\r\n\r\nconst TitleWrapper = styled.div`\r\n display: flex;\r\n align-items: center;\r\n`;\r\n\r\nconst IconWrapper = styled.div`\r\n margin-left: 12px;\r\n margin-top: 16px;\r\n width: 36px;\r\n height: 36px;\r\n color: ${({ color }) => color};\r\n font-size: 32px;\r\n`;\r\n\r\nconst MessageTitle = styled.div`\r\n margin-left: 24px;\r\n color: ${({ color }) => color};\r\n`;\r\n\r\nconst MessageBody = styled.div`\r\n margin-left: 72px;\r\n color: ${({ theme }) => theme.colors.blackLight};\r\n`;\r\n\r\nconst ButtonsWrapper = styled.div`\r\n width: 100%;\r\n justify-content: flex-end;\r\n gap: 1rem;\r\n margin-top: 2rem;\r\n display: flex;\r\n`;","import { RootState } from 'store/rootSlices';\r\n\r\nexport const getCurrentLocale = (state: RootState) => state.App.currentLocale;\r\n\r\n","import React from 'react';\r\nimport styled from 'styled-components';\r\nimport Header from 'shared/containers/TitleHeader';\r\nimport { t } from 'app';\r\nimport * as selectors from './logic/selectors';\r\nimport { useSelector } from 'react-redux';\r\n\r\ninterface IProps {\r\n codDisciplina: string;\r\n nomeDisciplina: string;\r\n nomeDisciplinaEng: string;\r\n tipoExame: string;\r\n epocaExame: number;\r\n anoLectivo: number;\r\n codPauta: string;\r\n onBack?: () => void;\r\n children?: React.ReactNode;\r\n}\r\n\r\nconst GradeTitle: React.FC = ({\r\n codDisciplina,\r\n nomeDisciplina,\r\n nomeDisciplinaEng,\r\n tipoExame,\r\n epocaExame,\r\n anoLectivo,\r\n codPauta,\r\n onBack,\r\n children\r\n}) => {\r\n\r\n const currentLocale = useSelector(selectors.getCurrentLocale);\r\n\r\n return (\r\n \r\n \r\n
    \r\n {codDisciplina}\r\n \r\n {tipoExame}\r\n \r\n \r\n \r\n \r\n {anoLectivo}/{parseInt(anoLectivo.toString().slice(-2)) + 1} - {epocaExame && epocaExameMap[epocaExame]\r\n ? t(`pautas.${epocaExameMap[epocaExame]}`)\r\n : 'Época de Exame Desconhecido'} - {tipoExame && tipoExameMap[tipoExame]\r\n ? t(`pautas.${tipoExameMap[tipoExame]}`)\r\n : 'Tipo de Exame Desconhecido'} - {codPauta}\r\n \r\n \r\n {children}\r\n \r\n );\r\n};\r\n\r\nexport default GradeTitle;\r\n\r\nexport const tipoExameMap: { [key: string]: string } = {\r\n NM: 'normalExam',\r\n RE: 'appealExam',\r\n ML: 'improvementExam',\r\n DZ: 'specialExam',\r\n SV: 'summerSemesterExam',\r\n SE: 'extraordinarySemesterExam',\r\n ES: 'supplementaryExam',\r\n};\r\n\r\nexport const epocaExameMap: { [key: string]: string } = {\r\n 1: 'firstSemester',\r\n 2: 'secondSemester',\r\n 3: 'appealPeriod',\r\n 4: 'extraordinaryPeriod',\r\n 5: 'specialPeriod',\r\n 6: 'annualPeriod',\r\n};\r\n\r\nconst GradeContainer = styled.div`\r\n display: flex;\r\n`;\r\n\r\nconst DisciplineCode = styled.div`\r\n font-size: 18px;\r\n font-weight: 300;\r\n line-height: 1.5;\r\n color: #292929;\r\n padding-top: 10px;\r\n margin-right: 10px;\r\n margin-left: 10px;\r\n`;\r\n\r\nconst ExameInfo = styled.div`\r\n margin-top: 0.3rem;\r\n display: flex;\r\n`;\r\n\r\nconst ExameType = styled.div`\r\n font-weight: 300;\r\n line-height: 1.5;\r\n color: #292929;\r\n font-size: 18px;\r\n padding-top: 10px;\r\n margin-right: 3px;\r\n`;\r\n\r\nconst YearSemesterCode = styled.div`\r\n font-weight: 300;\r\n line-height: 1.5;\r\n color: #757575;\r\n font-size: 18px;\r\n margin-right: 5px;\r\n`;\r\n\r\nconst GradeTitleWrapper = styled.div`\r\n margin-bottom: 1rem;\r\n`;\r\n","// Util function to transform the column name into a column index\r\nexport function columnNameToIndex(columnName) {\r\n let index = 0;\r\n for (let i = 0; i < columnName.length; i++) {\r\n index *= 26;\r\n index += columnName.charCodeAt(i) - 64;\r\n }\r\n return index - 1;\r\n}\r\n\r\n// Util function to transform a given index to csv column name (ex. A, B, ..., AA, AB, ...)\r\nexport function indexToColumnName(index) {\r\n let columnName = '';\r\n let remainder;\r\n while (index >= 0) {\r\n remainder = index % 26;\r\n columnName = String.fromCharCode(65 + remainder) + columnName;\r\n index = Math.floor(index / 26) - 1;\r\n }\r\n return columnName;\r\n}\r\n\r\nexport const countColumnsInCSV = (csvContent) => {\r\n const detectCSVSeparator = (row) => {\r\n const separators = [',', ';', '\\t'];\r\n let maxCount = 0;\r\n let detectedSeparator = ',';\r\n\r\n separators.forEach((separator) => {\r\n const count = (row.match(new RegExp(separator, \"g\")) || []).length;\r\n if (count > maxCount) {\r\n maxCount = count;\r\n detectedSeparator = separator;\r\n }\r\n });\r\n\r\n return detectedSeparator;\r\n };\r\n\r\n const rows = csvContent.split('\\n');\r\n const firstRow = rows.find(row => row.trim() !== '');\r\n\r\n if (!firstRow) {\r\n console.error('CSV is empty or incorrectly formatted');\r\n return 0;\r\n }\r\n\r\n const separator = detectCSVSeparator(firstRow);\r\n const columns = firstRow.split(separator);\r\n return columns.length;\r\n};\r\n\r\nexport const getColumnNames = (numColumns, columnsList) => {\r\n \r\n for (var num = 0; num < numColumns; num++) {\r\n let columnName = indexToColumnName(num);\r\n columnsList.push(columnName);\r\n } \r\n \r\n const columnOptions = columnsList.map(columnName => ({\r\n key: columnName,\r\n text: columnName,\r\n value: columnName,\r\n }));\r\n return columnOptions\r\n}","import React, { useState, useEffect } from 'react';\r\nimport Modal from 'shared/components/Modal';\r\nimport { useSelector, useDispatch } from 'react-redux';\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from '../logic/selectors';\r\nimport { Button, Checkbox, Dropdown, Text, Loading } from '@paco_ua/pacoui';\r\nimport styled from \"styled-components\";\r\nimport { columnNameToIndex, countColumnsInCSV, getColumnNames } from './utils';\r\nimport { t } from 'app';\r\n\r\nconst ButtonsDiv = styled.div`\r\n width: 100%;\r\n justify-content: flex-end;\r\n gap: 1rem;\r\n margin-top: 2rem;\r\n display: flex;\r\n`;\r\n\r\nconst CheckboxDiv = styled.div`\r\n display: flex;\r\n gap: 0.8rem;\r\n margin-top: 1rem;\r\n margin-left: 10%;\r\n`;\r\n\r\nconst DropdownsDiv = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n gap: 0.5rem;\r\n`;\r\n\r\nconst DropdownsDivWrapper = styled.div`\r\n display: flex;\r\n justify-content: space-between;\r\n padding: 0 10%;\r\n`;\r\n\r\nconst ExcelWarningText = styled(Text)`\r\n font-size: 15px;\r\n`;\r\n\r\nconst CSVModal = ({ changeModal, csvFile, onSubmit, onClose }) => {\r\n const loadingStatus = useSelector(selectors.selectLoadingStatus);\r\n const [loadingLabel, setLoadingLabel] = useState(false);\r\n const [nmecColumnLabel, setnmecColumnLabel] = useState('A');\r\n const [gradeColumnLabel, setgradeColumnLabel] = useState('B');\r\n const [hasHeader, setHasHeader] = useState(false);\r\n const columnsList : string[] = [];\r\n const columnOptions = getColumnNames(26, columnsList);\r\n const dispatch = useDispatch();\r\n\r\n const handleSubmit = () => {\r\n const nmecColumnIndex = columnNameToIndex(nmecColumnLabel);\r\n const gradeColumnIndex = columnNameToIndex(gradeColumnLabel);\r\n onSubmit(nmecColumnIndex, gradeColumnIndex, hasHeader, csvFile);\r\n setLoadingLabel(true);\r\n //onClose();\r\n };\r\n\r\n useEffect(() => {\r\n if (!loadingStatus.loadingCSVData) {\r\n onClose();\r\n dispatch(actions.EditGrades.setLoadingStatus({ fieldName: 'loadingCSVData', fieldValue: !loadingStatus.loadingCSVData }));\r\n }\r\n }, [loadingStatus.loadingCSVData]);\r\n\r\n return (\r\n \r\n

    {t('pautas.selectDataFromFile')}:

    \r\n \r\n \r\n {t('pautas.studentNumberColumn')}: \r\n setnmecColumnLabel(value.toUpperCase())}\r\n style={{width:\"4rem\"}}\r\n />\r\n \r\n \r\n {t('pautas.gradeColumn')}: \r\n setgradeColumnLabel(value.toUpperCase())}\r\n style={{width:\"4rem\"}}\r\n />\r\n \r\n \r\n \r\n {t('pautas.hasHeader')}\r\n setHasHeader(!hasHeader)}>\r\n \r\n \r\n * {t('pautas.excelDefaultPage')}\r\n \r\n \r\n {loadingLabel && (\r\n \r\n )}\r\n \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nexport default CSVModal;","import React, { useEffect, useState } from \"react\";\r\nimport Modal from \"shared/components/Modal\";\r\nimport styled from \"styled-components\";\r\nimport { Text } from '@paco_ua/pacoui';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faTimes } from '@fortawesome/free-solid-svg-icons';\r\nimport { useSelector } from \"react-redux\";\r\nimport * as selectors from '../logic/selectors';\r\nimport { t } from 'app';\r\n\r\nconst LabelsModalHeader = styled.div`\r\ndisplay: flex;\r\njustify-content: space-between;\r\nalign-items: center;\r\nmargin-bottom: 1rem;\r\n`\r\n\r\nconst LabelsModalItem = styled.div`\r\ndisplay: flex;\r\nflex-direction: column;\r\nmargin-bottom: 1rem;\r\n`\r\n\r\nconst HoverCloseIcon = styled.div`\r\n cursor:pointer;\r\n`\r\n\r\n\r\ninterface SpecialGrade {\r\n valor: string;\r\n descricao: string;\r\n}\r\n\r\ninterface Regime {\r\n code: string;\r\n name: string;\r\n}\r\n\r\nconst LabelsModal = ({ onClick }) => {\r\n const dicionarios = useSelector(selectors.selectDicionarios);\r\n const regimes = useSelector(selectors.selectRegimes);\r\n const hdados = useSelector(selectors.selectHDADOS);\r\n const [bodyItems, setBodyItems] = useState([]);\r\n const [regimeItems, setRegimeItems] = useState([]);\r\n\r\n useEffect(() => {\r\n if (dicionarios['data'] && dicionarios['data'].length > 0 && dicionarios['data'][0].bodyItems.length > 0) {\r\n setBodyItems(dicionarios['data'][0].bodyItems);\r\n }\r\n if (regimes['data'] && regimes['data'].length > 0) {\r\n setRegimeItems(regimes['data']);\r\n }\r\n }, [dicionarios, regimes]);\r\n\r\n return (\r\n \r\n \r\n {t('pautas.codes')}\r\n \r\n \r\n \r\n \r\n \r\n {t('pautas.evaluationResultCodes')}: {hdados.tipoAvaliacao.nomeTipoAvaliacao}\r\n {bodyItems.map((item, index) => (\r\n {item.valor} - {t(`pautas.evaluationCode${item.valor}`)}\r\n ))}\r\n \r\n \r\n {t('pautas.examTypes')}:\r\n NM - {t('pautas.normalExam')}\r\n RE - {t('pautas.appealExam')}\r\n ML - {t('pautas.improvementExam')}\r\n DZ - {t('pautas.specialExam')}\r\n SV - {t('pautas.summerSemester')}\r\n SE - {t('pautas.extraordinarySemester')}\r\n RA - {t('pautas.earlyAppeal')}\r\n \r\n \r\n {t('pautas.studentAttendanceRegimes')}\r\n {regimeItems.map((item, index) => (\r\n {item.code} - {t(`pautas.studentAttendanceRegime${item.code}`)}\r\n ))}\r\n \r\n \r\n )\r\n}\r\n\r\nexport default LabelsModal;","export const getPercentage = (value: number, total: number) => {\r\n return (Math.round((value / total) * 100)+'%');\r\n} \r\n\r\nexport const getStats = (gradesData: any) => {\r\n return {\r\n totalStudents: gradesData.length,\r\n positiveGrades: getPositiveGrades(gradesData),\r\n negativeGrades: getNegativeGrades(gradesData),\r\n rnmStudents: getRNMStudents(gradesData),\r\n missingStudents: getMissingStudents(gradesData),\r\n dropOutStudents: getDropOutStudents(gradesData),\r\n failedByMissingStudents: getFailedByMissingStudents(gradesData),\r\n studentsWithoutGrades: getStudentsWithoutGrades(gradesData)\r\n }\r\n} \r\n\r\nconst getPositiveGrades = (gradesData: any) => {\r\n return gradesData.filter((aluno: any) => (parseInt(aluno.nota) >= 10 && parseInt(aluno.nota) <= 20)).length;\r\n} \r\n\r\nconst getNegativeGrades = (gradesData: any) => {\r\n return gradesData.filter((aluno: any) => (parseInt(aluno.nota) >= 0 && parseInt(aluno.nota) < 10)).length;\r\n}\r\n\r\nconst getRNMStudents = (gradesData: any) => {\r\n return gradesData.filter((aluno: any) => parseInt(aluno.nota) === 66).length;\r\n}\r\n\r\nconst getMissingStudents = (gradesData: any) => {\r\n return gradesData.filter((aluno: any) => parseInt(aluno.nota) === 77).length;\r\n}\r\n\r\nconst getDropOutStudents = (gradesData: any) => {\r\n return gradesData.filter((aluno: any) => parseInt(aluno.nota) === 88).length;\r\n}\r\n\r\nconst getFailedByMissingStudents = (gradesData: any) => {\r\n return gradesData.filter((aluno: any) => parseInt(aluno.nota) === 99).length;\r\n}\r\n\r\nconst getStudentsWithoutGrades = (gradesData: any) => {\r\n return gradesData.filter((aluno: any) => aluno.nota === '').length;\r\n}","import React from \"react\";\r\nimport styled from \"styled-components\";\r\n// import 'animate.css';\r\n\r\nconst Backdrop = styled.div`\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 100vh;\r\n z-index: 2;\r\n background-color: rgba(0, 0, 0, 0.5);\r\n z-index: 31;\r\n z-index: 1102;\r\n`;\r\n\r\nconst ModalWrapper = styled.div`\r\n background-color: #fff;\r\n width: 35%;\r\n height: auto;\r\n max-height: 98vh;\r\n padding: 1rem;\r\n z-index: 1103;\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n margin: 1% 32.5% 0 32.5%;\r\n overflow-x: hidden;\r\n overflow-y: auto;\r\n`;\r\n\r\ninterface ModalProps {\r\n children: React.ReactNode;\r\n changeModal: (...args: any[]) => void;\r\n}\r\n\r\n\r\nconst Modal: React.FC = (props) => {\r\n\r\n const hideModal = () => {\r\n props.changeModal();\r\n }\r\n\r\n return (\r\n <>\r\n \r\n {props.children}\r\n \r\n )\r\n}\r\n\r\n\r\nexport default Modal;","import React from 'react'\r\nimport { useDispatch } from 'react-redux';\r\nimport { Text, Table, Button } from '@paco_ua/pacoui';\r\nimport styled from 'styled-components';\r\nimport { actions } from 'store/rootSlices';\r\nimport { getStats, getPercentage } from './utils';\r\nimport ConfirmActionModal from 'shared/components/ConfirmActionModal';\r\nimport { t } from 'app';\r\nimport Modal from './Modal';\r\n\r\nconst Header = styled.div`\r\ndisplay: flex;\r\nflex-direction: column;\r\ngap: 0.2rem;\r\n`\r\n\r\nconst TableWrapper = styled.div`\r\nmargin-top: 0.1rem;\r\nwidth: 100%;\r\noverflow-x: auto;\r\n`\r\n\r\nconst ButtonsWrapper = styled.div`\r\ndisplay: flex;\r\njustify-content: flex-end;\r\ngap: 1rem;\r\nmargin-top: 1rem;\r\nmargin-bottom: 1rem;\r\n`\r\n\r\nconst StatisticsModal = ({ editedGradesData, codigoPauta, gradesEdits }) => {\r\n const dispatch = useDispatch();\r\n const { totalStudents, positiveGrades, negativeGrades, rnmStudents, missingStudents, dropOutStudents, failedByMissingStudents, studentsWithoutGrades } = getStats(editedGradesData);\r\n const [isConfirmSubmitModalOpen, setIsConfirmSubmitModalOpen] = React.useState(false);\r\n\r\n const handleIsConfirmSubmitModalOpen = () => {\r\n setIsConfirmSubmitModalOpen(!isConfirmSubmitModalOpen);\r\n }\r\n\r\n const handleIsConfirmSubmit = () => {\r\n dispatch(actions.EditGrades.setStatisticsModal());\r\n dispatch(actions.EditGrades.saveOrSubmitGrades({ codigoPauta: codigoPauta, gradesEdits: gradesEdits, isSubmission: true }));\r\n //setIsConfirmSubmitModalOpen(false);\r\n }\r\n\r\n const statisticsTableStructure = {\r\n header: {\r\n titles: [\r\n { text: t('pautas.data'), style: { textAlign: 'left', width: '60%' } },\r\n { text: t('pautas.value'), style: { textAlign: 'left', width: '20%' } },\r\n { text: t('pautas.percentage'), style: { textAlign: 'left', width: '20%' } },\r\n ],\r\n type: 'columnTitle'\r\n },\r\n rows: [\r\n {\r\n cells: [\r\n {\r\n cellProps: '',\r\n content: t('pautas.totalNumberOfStudents')\r\n },\r\n {\r\n cellProps: '',\r\n content: totalStudents,\r\n },\r\n {\r\n cellProps: '',\r\n content: '-'\r\n }\r\n ],\r\n collapsableRows: []\r\n },\r\n {\r\n cells: [\r\n {\r\n cellProps: '',\r\n content: t('pautas.studentsWithPositiveGrades')\r\n },\r\n {\r\n cellProps: '',\r\n content: positiveGrades,\r\n },\r\n {\r\n cellProps: '',\r\n content: getPercentage(positiveGrades, totalStudents)\r\n }\r\n ],\r\n collapsableRows: []\r\n },\r\n {\r\n cells: [\r\n {\r\n cellProps: '',\r\n content: t('pautas.studentsWithNegativeGrades')\r\n },\r\n {\r\n cellProps: '',\r\n content: negativeGrades,\r\n },\r\n {\r\n cellProps: '',\r\n content: getPercentage(negativeGrades, totalStudents)\r\n }\r\n ],\r\n collapsableRows: []\r\n },\r\n {\r\n cells: [\r\n {\r\n cellProps: '',\r\n content: t('pautas.rnmStudents')\r\n },\r\n {\r\n cellProps: '',\r\n content: rnmStudents,\r\n },\r\n {\r\n cellProps: '',\r\n content: getPercentage(rnmStudents, totalStudents)\r\n }\r\n ],\r\n collapsableRows: []\r\n },\r\n {\r\n cells: [\r\n {\r\n cellProps: '',\r\n content: t('pautas.absentStudents')\r\n },\r\n {\r\n cellProps: '',\r\n content: missingStudents,\r\n },\r\n {\r\n cellProps: '',\r\n content: getPercentage(missingStudents, totalStudents)\r\n }\r\n ],\r\n collapsableRows: []\r\n },\r\n {\r\n cells: [\r\n {\r\n cellProps: '',\r\n content: t('pautas.droppedOutStudents')\r\n },\r\n {\r\n cellProps: '',\r\n content: dropOutStudents,\r\n },\r\n {\r\n cellProps: '',\r\n content: getPercentage(dropOutStudents, totalStudents)\r\n }\r\n ],\r\n collapsableRows: []\r\n },\r\n {\r\n cells: [\r\n {\r\n cellProps: '',\r\n content: t('pautas.failedStudentsDueToAbsenteeism')\r\n },\r\n {\r\n cellProps: '',\r\n content: failedByMissingStudents,\r\n },\r\n {\r\n cellProps: '',\r\n content: getPercentage(failedByMissingStudents, totalStudents)\r\n }\r\n ],\r\n collapsableRows: []\r\n },\r\n {\r\n cells: [\r\n {\r\n cellProps: '',\r\n content: t('pautas.studentsWithoutGrades')\r\n },\r\n {\r\n cellProps: '',\r\n content: studentsWithoutGrades,\r\n },\r\n {\r\n cellProps: '',\r\n content: getPercentage(studentsWithoutGrades, totalStudents)\r\n }\r\n ],\r\n collapsableRows: []\r\n }\r\n ],\r\n };\r\n\r\n return (\r\n <>\r\n {isConfirmSubmitModalOpen &&\r\n \r\n }\r\n\r\n {!isConfirmSubmitModalOpen &&\r\n { dispatch(actions.EditGrades.setStatisticsModal()) }}>\r\n
    \r\n {studentsWithoutGrades > 0 ? (\r\n <>\r\n {t('pautas.gradingSheetHasUnsavedGrades')}\r\n {t('pautas.gradingSheetIncomplete')}\r\n \r\n ) : (\r\n <>\r\n {t('pautas.gradingSheetComplete')}\r\n {t('pautas.gradingSheetReadyForSubmission')}\r\n \r\n )}\r\n
    \r\n \r\n \r\n \r\n \r\n {studentsWithoutGrades > 0 ? (\r\n <>\r\n \r\n \r\n \r\n ) : (\r\n <>\r\n \r\n \r\n \r\n )}\r\n \r\n
    \r\n }\r\n \r\n )\r\n}\r\n\r\nexport default StatisticsModal;","import React, { useEffect, useState } from \"react\";\r\nimport Modal from \"shared/components/Modal\";\r\nimport styled from \"styled-components\";\r\nimport { Button, Text } from '@paco_ua/pacoui';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faTimesSquare, faExclamationSquare } from '@fortawesome/pro-light-svg-icons';\r\nimport { useSelector } from \"react-redux\";\r\nimport * as selectors from '../logic/selectors';\r\nimport { t } from 'app';\r\n\r\nconst ErrorsModalHeader = styled.div`\r\ndisplay: flex;\r\njustify-content: space-between;\r\nmargin-bottom: 1rem;\r\npadding-bottom: 1rem;\r\nborder-bottom: 1px solid #ccc;\r\n`\r\n\r\nconst ErrorsModalHeaderWrapper = styled.div`\r\ndisplay: flex;\r\nalign-items: center;\r\ngap: 1rem;\r\n`\r\n\r\nconst ErrorsModalItem = styled.div`\r\ndisplay: flex;\r\nflex-direction: column;\r\nmargin-bottom: 1rem;\r\nmax-height: 25rem;\r\noverflow-y: auto;\r\n`\r\n\r\nconst WarningText = styled(Text)`\r\n color: orange;\r\n`;\r\n\r\ninterface Error {\r\n line: number;\r\n nmec: string;\r\n errors: string[];\r\n}\r\n\r\ninterface ImportWarnings {\r\n warning1?: string[];\r\n warning2?: string[];\r\n warning3?: string[];\r\n}\r\n\r\nfunction flattenArray(arr: any[][]): any[] {\r\n return arr.reduce((acc, val) => acc.concat(val), []);\r\n}\r\n\r\nconst ErrorsModal = ({ onClick }) => {\r\n const importErrors = useSelector(selectors.selectImportErrors);\r\n const [errorMessages, setErrorMessages] = useState([]);\r\n const importWarnings: ImportWarnings = useSelector(selectors.selectImportWarnings);\r\n const [warningMessages, setWarningMessages] = useState([]);\r\n\r\n useEffect(() => {\r\n const messages = importErrors.map((error: Error) => \r\n error.errors.map(err => {\r\n const errorCode = err.replace(' ', '');\r\n const translationKey = `pautas.import${errorCode}`;\r\n return `${t('pautas.errorInLine', {textOnly: true})} ${error.line} (${error.nmec}) - ${t(translationKey, {textOnly: true})}`;\r\n })\r\n );\r\n setErrorMessages(flattenArray(messages));\r\n \r\n // Warning 1 - Student doesn't belong to the pauta\r\n // Warning 2 - Student grade was updated (if there was already a grade in the DB)\r\n // Warning 3 - Student grade was not updated because of empty value\r\n \r\n let localWarningMessages: string[] = [];\r\n if (importWarnings.warning1) {\r\n localWarningMessages.push(...importWarnings.warning1.map(nmec => `${t('pautas.studentWithNmec', {textOnly: true})} ${nmec} ${t('pautas.studentDoesntBelongToPauta', {textOnly: true})}`));\r\n }\r\n if (importWarnings.warning3 && importWarnings.warning3.length > 0) { // Warnings of type 3 should be shown before Warnings of type 2 because they are of higher importance\r\n importWarnings.warning3.forEach(warningJson => {\r\n try {\r\n const warningObj = JSON.parse(warningJson);\r\n localWarningMessages.push(`${t('pautas.changeDetectedForStudent', {textOnly: true})} ${warningObj.name} (NMEC ${warningObj.nmec}) ${t('pautas.gradeDidNotChange', {textOnly: true})}`);\r\n } catch (error) {\r\n console.error('Error parsing warning message:', error);\r\n }\r\n })\r\n }\r\n if (importWarnings.warning2 && importWarnings.warning2.length > 0) {\r\n importWarnings.warning2.forEach(warningJson => {\r\n try {\r\n const warningObj = JSON.parse(warningJson);\r\n localWarningMessages.push(`${t('pautas.changeDetectedForStudent', {textOnly: true})} ${warningObj.name} (NMEC ${warningObj.nmec}) ${t('pautas.newGrade', {textOnly: true})} ${warningObj.new_grade}, ${t('pautas.previousGrade', {textOnly: true})} ${warningObj.previous_grade}`);\r\n } catch (error) {\r\n console.error('Error parsing warning message:', error);\r\n }\r\n });\r\n }\r\n\r\n setWarningMessages(localWarningMessages);\r\n }, [importErrors, importWarnings]);\r\n\r\n\r\n return (\r\n \r\n \r\n {(importErrors.length > 0) && ( // If there are errors, show errors header\r\n \r\n \r\n {t('pautas.errorsModalHeader')}\r\n \r\n )}\r\n {(!(importErrors.length > 0) && Object.keys(importWarnings).length > 0) && ( // If there are only warnings show warnings header\r\n \r\n \r\n {t('pautas.warningsModalHeader')}\r\n \r\n )}\r\n \r\n \r\n {errorMessages.map((message, index) => (\r\n {message}\r\n ))}\r\n {warningMessages.map((message, index) => \r\n {message}\r\n )}\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default ErrorsModal;","import { RootState } from 'store/rootSlices';\r\n\r\nexport const getCurrentLocale = (state: RootState) => state.App.currentLocale;","import React, { useState } from 'react';\r\nimport ReactDatePicker from 'react-datepicker';\r\nimport \"react-datepicker/dist/react-datepicker.css\";\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faCalendarAlt } from '@fortawesome/pro-light-svg-icons';\r\n\r\nimport styled from 'styled-components';\r\nimport { registerLocale, setDefaultLocale } from \"react-datepicker\";\r\nimport pt from 'date-fns/locale/pt';\r\nimport format from 'date-fns/format';\r\nimport * as selectors from './logic/selectors';\r\nimport { useSelector } from 'react-redux';\r\n\r\n\r\nconst CalendarIcon = styled(FontAwesomeIcon)`\r\n cursor: pointer;\r\n`;\r\n\r\nconst ExamDatePicker = ({ selectedDate, onDateChange }) => {\r\n const [isOpen, setIsOpen] = useState(false);\r\n const currentLocale = useSelector(selectors.getCurrentLocale);\r\n registerLocale('pt', pt);\r\n\r\n\r\n const isSelectableDate = (date) => {\r\n const today = new Date();\r\n today.setHours(0, 0, 0, 0); // Normalize today's date by removing time\r\n\r\n return date.getDay() !== 0 && date <= today; // Disable Sundays and future dates\r\n };\r\n\r\n const stringToDate = (dateString) => {\r\n const [day, month, year] = dateString.split('-');\r\n return new Date(year, month-1, day);\r\n };\r\n\r\n \r\n return (\r\n <>\r\n \r\n setIsOpen(!isOpen)} />\r\n {isOpen && (\r\n \r\n {\r\n const formattedDate = format(date, \"dd-MM-yyyy\");\r\n onDateChange(formattedDate);\r\n setIsOpen(false);\r\n }}\r\n filterDate={isSelectableDate}\r\n />\r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default ExamDatePicker;\r\n\r\nconst DatePickerContainer = styled.div`\r\n position: relative;\r\n`;\r\n\r\n\r\nconst Wrapper = styled.div`\r\n position: absolute;\r\n z-index: 111;\r\n transform: translateY(-1.5rem) translateX(2rem);\r\n\r\n\r\n > * {\r\n .react-datepicker-popper {\r\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);\r\n border-radius: 8px;\r\n overflow: hidden;\r\n }\r\n\r\n .react-datepicker__input-container {\r\n display: unset;\r\n }\r\n\r\n .react-datepicker__day-name, .react-datepicker__day, .react-datepicker__time-name {\r\n margin: 2px;\r\n width: 32px;\r\n line-height: 32px;\r\n text-align: center;\r\n border-radius: 50%;\r\n font-size: 16px;\r\n color: #333;\r\n font-weight: 500;\r\n\r\n &:hover {\r\n background-color: #f0f0f0;\r\n }\r\n }\r\n\r\n .react-datepicker__day--selected,\r\n .react-datepicker__day--in-range,\r\n .react-datepicker__day--range-start,\r\n .react-datepicker__day--range-end {\r\n background-color: #0eb4bd;\r\n color: white;\r\n font-weight: bold;\r\n }\r\n\r\n .react-datepicker__day--keyboard-selected {\r\n background-color: #bad9f1;\r\n }\r\n\r\n .react-datepicker__day--outside-month {\r\n color: #ccc;\r\n }\r\n\r\n .react-datepicker__header {\r\n background-color: white;\r\n border-bottom: 1px solid #f0f0f0;\r\n padding-top: 8px;\r\n position: relative;\r\n\r\n .react-datepicker__current-month,\r\n .react-datepicker-time__header,\r\n .react-datepicker-year-header {\r\n color: #333;\r\n font-weight: bold;\r\n font-size: 18px;\r\n }\r\n\r\n .react-datepicker__navigation {\r\n top: 20px;\r\n color: #333;\r\n cursor: pointer;\r\n position: absolute;\r\n &.react-datepicker__navigation--previous {\r\n left: 20px;\r\n }\r\n &.react-datepicker__navigation--next {\r\n right: 20px;\r\n }\r\n }\r\n }\r\n\r\n .react-datepicker__day--disabled {\r\n color: #ccc;\r\n cursor: not-allowed;\r\n }\r\n\r\n\r\n }\r\n`;","import React, { useEffect, useState } from 'react';\r\nimport { useParams } from 'react-router-dom';\r\nimport { useSelector, useDispatch } from 'react-redux';\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './logic/selectors';\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\nimport { renderGradeInput, handleGradeChange, handleCSVImport, getDropdownSuplementaryGradesOptions, handleSupplementaryGradeChange, handleSupplementaryGradeClear, getGradesEditValues } from './utils.js'\r\nimport ConfirmActionModal from 'shared/components/ConfirmActionModal';\r\nimport { history } from 'utils';\r\n\r\nimport { Button, Table, Dropdown, AnimatedBackground } from '@paco_ua/pacoui';\r\nimport GradeTitle from 'shared/components/GradeTitle';\r\nimport CSVModal from './CSVModal/index'\r\nimport styled, { css } from 'styled-components';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport LabelsModal from './LabelsModal';\r\nimport { faEye, faUpload } from '@fortawesome/pro-light-svg-icons';\r\nimport StatisticsModal from './StatisticsModal';\r\nimport ErrorsModal from './ErrorsModal';\r\nimport ExamDatePicker from './DatePicker/ExamDatePicker';\r\n\r\nconst ButtonsDiv = styled.div`\r\n margin-top: 20px;\r\n margin-bottom: 10px;\r\n justify-content: flex-end;\r\n display: flex;\r\n`;\r\n\r\nconst FileInputLabel = styled.label`\r\n display: inline-block;\r\n color: black;\r\n padding: 6px 12px;\r\n cursor: pointer;\r\n font-size: 16px;\r\n`;\r\n\r\nconst HiddenFileInput = styled.input`\r\n display: none; // Hide the actual input\r\n`;\r\n\r\nconst TitleGradeExamDateStyle = styled.div`\r\n font-size: 18px;\r\n font-weight: 300;\r\n line-height: 1.5;\r\n color: #757575;\r\n ${(props: { examDate: string, pickedExamDate?: string }) =>\r\n (props.pickedExamDate && props.pickedExamDate !== props.examDate) && css`\r\n text-decoration: underline dotted gold;\r\n text-decoration-thickness: 0.2rem;\r\n `}\r\n`;\r\n\r\nconst ButtonsWrapper = styled.div`\r\ndisplay: flex;\r\njustify-content: flex-end;\r\n`;\r\n\r\nconst LoadingWrapper = styled.div`\r\n width: 100%;\r\n height: 300px;\r\n\r\n * {\r\n margin: 8px 0px;\r\n }\r\n`;\r\n\r\nconst ExamDateWrapper = styled.div`\r\n display: flex;\r\n align-items: center;\r\n gap: 1rem;\r\n`;\r\n\r\nconst EditGrades = ({ theme, t }) => {\r\n const dispatch = useDispatch();\r\n const gradesData = useSelector(selectors.selectGradeData);\r\n const HDADOS = useSelector(selectors.selectHDADOS);\r\n const validGradeValues = useSelector(selectors.selectValidGradeValues);\r\n const gradeEdits = useSelector(selectors.selectGradeEdits);\r\n const isStatisticsModalOpen = useSelector(selectors.selectIsStatisticsModalOpen);\r\n const isLabelsModalOpen = useSelector(selectors.selectIsLabelsModalOpen);\r\n const isConfirmPageLeaveModalOpen = useSelector(selectors.selectIsConfirmPageLeaveModalOpen);\r\n const isConfirmDiscardChangesModalOpen = useSelector(selectors.selectIsConfirmDiscardChangesModalOpen);\r\n const { codigoPauta } = useParams();\r\n const isCSVModalOpen = useSelector(selectors.isCSVModalOpen);\r\n const csvFile = useSelector(selectors.csvFile)\r\n const isErrorsModalOpen = useSelector(selectors.selectIsErrorsModalOpen);\r\n const dicionarios = useSelector(selectors.selectDicionarios);\r\n const dropdownValueSelected = useSelector(selectors.selectDropdownValueSelected);\r\n const pickedExamDate = useSelector(selectors.selectExamDate);\r\n const loadingStatus = useSelector(selectors.selectLoadingStatus);\r\n const gradeDetails = useSelector(selectors.selectGradeDetails);\r\n\r\n useEffect(() => {\r\n dispatch(actions.EditGrades.onMount(codigoPauta));\r\n\r\n return () => {\r\n dispatch(actions.EditGrades.onUnmount());\r\n };\r\n }, [dispatch]);\r\n\r\n useEffect(() => {\r\n const handleBeforeUnload = (event) => {\r\n if (hasEdits()) {\r\n event.preventDefault();\r\n event.returnValue = '';\r\n //dispatch(actions.EditGrades.setIsConfirmPageLeaveModalOpen())\r\n }\r\n };\r\n\r\n window.addEventListener('beforeunload', handleBeforeUnload);\r\n\r\n return () => window.removeEventListener('beforeunload', handleBeforeUnload);\r\n }, [gradeEdits, pickedExamDate]);\r\n\r\n const handleGradeInputChange = handleGradeChange(dispatch, gradesData, gradeEdits, validGradeValues);\r\n\r\n const onCSVImport = (event) => {\r\n handleCSVImport(event, dispatch);\r\n };\r\n\r\n // Verify if gradesData is an array before mapping\r\n let tableStructure;\r\n\r\n const header = {\r\n titles: [\r\n { text: t('pautas.nmec'), style: { textAlign: 'left' } },\r\n { text: t('pautas.name'), style: { textAlign: 'left' } },\r\n { text: t('pautas.course'), style: { textAlign: 'left' } },\r\n { text: t('pautas.regime'), style: { textAlign: 'left' } },\r\n { text: t('pautas.grade'), style: { textAlign: 'center', width: '0.1%' } },\r\n ],\r\n type: 'columnTitle'\r\n }\r\n\r\n if (Array.isArray(gradesData)) {\r\n tableStructure = {\r\n header: header,\r\n rows: gradesData.map((item, index) => ({\r\n cells: [\r\n { cellProps: '', content: item.nmec },\r\n { cellProps: '', content: item.nome },\r\n { cellProps: '', content: item.curso },\r\n { cellProps: '', content: item.regime },\r\n { cellProps: { style: { textAlign: 'center' } }, content: renderGradeInput(item, gradeEdits, handleGradeInputChange, validGradeValues, gradesData) },\r\n ],\r\n key: `row-${index}`,\r\n collapsableRows: [],\r\n })),\r\n };\r\n } else {\r\n tableStructure = {\r\n header: header,\r\n rows: [],\r\n };\r\n }\r\n\r\n const handleLabelsModal = () => {\r\n dispatch(actions.EditGrades.setIsLabelsModalOpen());\r\n }\r\n\r\n const hasEdits = () => {\r\n return Object.keys(gradeEdits).length > 0 || (pickedExamDate && pickedExamDate !== HDADOS.dataExame);\r\n }\r\n\r\n const handleConfirmPageLeaveModal = () => {\r\n if (hasEdits()) {\r\n dispatch(actions.EditGrades.setIsConfirmPageLeaveModalOpen());\r\n } else {\r\n history.goBack();\r\n }\r\n }\r\n\r\n const handleErrorsModal = () => {\r\n dispatch(actions.EditGrades.setIsErrorsModalOpen());\r\n }\r\n\r\n const handleConfirmLeavePage = () => {\r\n history.goBack();\r\n }\r\n\r\n const handleConfirmDiscardChangesModal = () => {\r\n dispatch(actions.EditGrades.setIsConfirmDiscardChangesModalOpen());\r\n }\r\n\r\n const handleConfirmDiscardChanges = () => {\r\n dispatch(actions.EditGrades.clearGradeEdits());\r\n dispatch(actions.EditGrades.clearExamDate());\r\n handleConfirmDiscardChangesModal();\r\n }\r\n\r\n return (\r\n }\r\n mainContent={\r\n <>\r\n {(loadingStatus.loadingGradeData) && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n {(!loadingStatus.loadingGradeData && Object.keys(gradeDetails).length != 0) && (\r\n <>\r\n {isConfirmPageLeaveModalOpen &&\r\n \r\n }\r\n\r\n {isConfirmDiscardChangesModalOpen &&\r\n \r\n }\r\n\r\n {isStatisticsModalOpen && }\r\n {isLabelsModalOpen && }\r\n \r\n \r\n \r\n {t('pautas.examDate')}: {pickedExamDate || HDADOS.dataExame}\r\n \r\n dispatch(actions.EditGrades.setExamDate(date))}\r\n />\r\n \r\n \r\n \r\n {t('pautas.legend')}\r\n
    \r\n {t('pautas.importFile')}\r\n \r\n
    \r\n handleSupplementaryGradeChange(dispatch, gradesData, gradeEdits, value, dicionarios)}\r\n onClear={() => handleSupplementaryGradeClear(dispatch, gradeEdits, dropdownValueSelected)}\r\n style={{ width: \"20rem\" }}\r\n />\r\n
    \r\n {(isCSVModalOpen) && (\r\n dispatch(actions.EditGrades.setIsCSVModalOpen())}\r\n csvFile={csvFile}\r\n onSubmit={(nmecColumnIndex, gradeColumnIndex, hasHeader, csvFile) => {\r\n dispatch(actions.EditGrades.uploadGrades({\r\n codigoPauta: codigoPauta,\r\n nmecColumnIndex: nmecColumnIndex,\r\n gradeColumnIndex: gradeColumnIndex,\r\n hasHeader: hasHeader,\r\n csvFile: csvFile\r\n }));\r\n }}\r\n onClose={() => dispatch(actions.EditGrades.setIsCSVModalOpen())}\r\n />\r\n )}\r\n {isErrorsModalOpen && !isCSVModalOpen && }\r\n
    \r\n
    \r\n \r\n \r\n {hasEdits() && { handleConfirmDiscardChangesModal() }}\r\n >\r\n {t('pautas.cancel', { textOnly: true })}\r\n }\r\n {\r\n dispatch(actions.EditGrades.setStatisticsModal())\r\n }}\r\n >\r\n {t('pautas.save', { textOnly: true })}\r\n \r\n \r\n \r\n )}\r\n \r\n }\r\n />\r\n );\r\n};\r\n\r\nexport default EditGrades;","import { RootState } from 'store/rootSlices';\r\n\r\nexport const getUserNmec = (state: RootState) => state.App.user.nmec;\r\nexport const getUser = (state: RootState) => state.App.user;\r\nexport const getGradeHistorySlice = (state: RootState) => state.GradesHistory;\r\nexport const getGradeHistory = (state: RootState) => state.GradesHistory.historyList;\r\n","import React, { useEffect, useContext } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { Table } from '@paco_ua/pacoui';\r\n\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport { AnimatedBackground } from '@paco_ua/pacoui';\r\nimport Header from 'shared/containers/TitleHeader';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './logic/selectors';\r\nimport { getCurrentRoute } from 'utils';\r\nimport GradeTitle from 'shared/components/GradeTitle';\r\n\r\n\r\nconst LoadingWrapper = styled.div`\r\n width: 100%;\r\n height: 300px;\r\n\r\n * {\r\n margin: 8px 0px;\r\n }\r\n`;\r\n\r\nconst TimeWrapper = styled.div`\r\n margin-top: 4px;\r\n color: #666;\r\n`;\r\n\r\nconst GradesHistory = ({ t }) => {\r\n const theme = useContext(ThemeContext);\r\n\r\n const { historyList, loadingStatus, gradeDetails } = useSelector(selectors.getGradeHistorySlice);\r\n\r\n const dispatch = useDispatch();\r\n\r\n const { getGradeHistory } = actions.GradesHistory;\r\n\r\n const codigoPauta = getCurrentRoute().params.codigoPauta;\r\n\r\n useEffect(() => {\r\n dispatch(actions.GradesHistory.onMount());\r\n\r\n return () => {\r\n dispatch(actions.GradesHistory.onUnmount());\r\n };\r\n }, [dispatch]);\r\n\r\n useEffect(() => {\r\n if (codigoPauta !== null) {\r\n dispatch(\r\n getGradeHistory({\r\n codigoPauta,\r\n })\r\n );\r\n }\r\n }, [codigoPauta]);\r\n\r\n const tableStructure = {\r\n header: {\r\n titles: [\r\n { text: t('pautas.historyDateHour'), style: { textAlign: 'left' } },\r\n { text: t('pautas.gradeState'), style: { textAlign: 'left' } },\r\n { text: t('pautas.actor'), style: { textAlign: 'left' } },\r\n { text: 'Obs.', style: { textAlign: 'left' } },\r\n ],\r\n type: 'columnTitle',\r\n },\r\n rows: historyList.map((item, index) => {\r\n const date = new Date(item.dataHora);\r\n const dateString = date.toLocaleDateString('en-GB', { year: 'numeric', month: '2-digit', day: '2-digit' });\r\n const timeString = date.toLocaleTimeString('en-GB', { hour: '2-digit', minute: '2-digit', second: '2-digit', hour12: false }); // 24-hour format\r\n return {\r\n cells: [\r\n {\r\n cellProps: '', content: (\r\n <>\r\n
    {dateString}
    \r\n {timeString}\r\n \r\n )\r\n },\r\n {\r\n cellProps: '',\r\n content: t('pautas.gradeState' + item.codEstado),\r\n },\r\n { cellProps: '', content: item.nomeUtilizador },\r\n { cellProps: '', content: item.obs },\r\n ],\r\n key: `row-${index}`,\r\n collapsableRows: [],\r\n }\r\n }),\r\n };\r\n\r\n return (\r\n }\r\n mainContent={\r\n <>\r\n {(loadingStatus.loadingGradeHistory) && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n {(!loadingStatus.loadingGradeHistory && gradeDetails) && (\r\n <>\r\n \r\n
    \r\n
    \r\n \r\n \r\n )}\r\n \r\n }\r\n />\r\n );\r\n};\r\n\r\nexport default GradesHistory;\r\n","export const lineToAxisPlugin = {\r\n afterDatasetsDraw: function (chart, easing) {\r\n if (!chart.initialAnimationCompleted) {\r\n chart.initialAnimationCompleted = easing >= 1;\r\n }\r\n\r\n const ctx = chart.ctx;\r\n chart.data.datasets.forEach((dataset, i) => {\r\n const meta = chart.getDatasetMeta(i);\r\n if (!meta.hidden) {\r\n meta.data.forEach((element, index) => {\r\n const backgroundColor = dataset.backgroundColor[index];\r\n const yBottom = chart.scales['y-axis-0'].bottom;\r\n const yCurrent = element.tooltipPosition().y;\r\n \r\n let yInterpolated;\r\n if (chart.initialAnimationCompleted) {\r\n yInterpolated = yBottom; // no animation after initial render\r\n } else {\r\n yInterpolated = yCurrent + (yBottom - yCurrent) * easing; // animate on initial render\r\n }\r\n\r\n ctx.save();\r\n ctx.strokeStyle = backgroundColor;\r\n ctx.lineWidth = 2;\r\n ctx.beginPath();\r\n ctx.moveTo(element._model.x, yCurrent);\r\n ctx.lineTo(element._model.x, yInterpolated);\r\n ctx.stroke();\r\n ctx.restore();\r\n });\r\n }\r\n });\r\n }\r\n};\r\n","import React, { useEffect, useRef } from 'react';\r\nimport { Chart } from 'chart.js';\r\nimport { lineToAxisPlugin } from './utils';\r\nChart.plugins.register(lineToAxisPlugin);\r\n\r\ndeclare global {\r\n interface Window {\r\n myLollipopChart?: Chart;\r\n }\r\n}\r\n\r\ninterface GradesChartProps {\r\n gradeCounts: any;\r\n loadingStatus: {\r\n loadingGradeDetailsCounts: boolean;\r\n loadingGradeDetailsInfo: boolean;\r\n };\r\n setCustomTooltip: React.Dispatch>;\r\n}\r\n\r\nconst GradesChart: React.FC = ({ gradeCounts, loadingStatus, setCustomTooltip }) => {\r\n const canvasRef = useRef(null);\r\n\r\n useEffect(() => {\r\n const updateChart = () => {\r\n if (!gradeCounts || Object.keys(gradeCounts).length === 0) return;\r\n\r\n const specialGrades = ['66', '77', '88', '99'];\r\n const regularGradesRange = Array.from({ length: 21 }, (_, i) => i.toString());\r\n const allValidGradeKeys = [...regularGradesRange, ...specialGrades];\r\n\r\n const validGrades = Object.keys(gradeCounts)\r\n .filter(key => allValidGradeKeys.includes(key))\r\n .reduce((acc, key) => {\r\n acc[key] = gradeCounts[key];\r\n return acc;\r\n }, {});\r\n\r\n const chartLabels = allValidGradeKeys;\r\n\r\n const chartData = chartLabels.map(grade => ({\r\n x: grade,\r\n y: validGrades[grade] || 0,\r\n r: validGrades[grade] ? 6 : 0,\r\n backgroundColor: specialGrades.includes(grade) ? '#FF5733' : '#0EB4BD',\r\n }));\r\n\r\n if (!window.myLollipopChart) {\r\n const canvas = canvasRef.current;\r\n if (canvas && canvas.getContext) {\r\n const ctx = canvas.getContext('2d');\r\n if (ctx) {\r\n window.myLollipopChart = new Chart(ctx, {\r\n type: 'bubble',\r\n data: {\r\n labels: chartLabels,\r\n datasets: [{\r\n label: '',\r\n data: chartData,\r\n backgroundColor: chartData.map(d => d.backgroundColor)\r\n }]\r\n },\r\n options: {\r\n title: {\r\n display: false,\r\n },\r\n legend: {\r\n display: false,\r\n },\r\n responsive: true,\r\n maintainAspectRatio: false,\r\n layout: {\r\n padding: {\r\n right: 90\r\n }\r\n },\r\n scales: {\r\n xAxes: [{\r\n type: 'category',\r\n labels: chartLabels,\r\n scaleLabel: {\r\n display: true,\r\n labelString: 'Notas'\r\n }\r\n }],\r\n yAxes: [{\r\n beginAtZero: true,\r\n scaleLabel: {\r\n display: true,\r\n labelString: 'Número de Estudantes'\r\n },\r\n ticks: {\r\n stepSize: 10\r\n }\r\n }]\r\n },\r\n tooltips: {\r\n enabled: false,\r\n mode: 'point',\r\n intersect: true,\r\n custom: function (tooltipModel) {\r\n if (tooltipModel.opacity === 0) {\r\n setCustomTooltip({ display: false, position: { x: 0, y: 0 }, content: '' });\r\n return;\r\n }\r\n\r\n if (tooltipModel.body) {\r\n let offset = -300;\r\n let offsetH = -20;\r\n const top = tooltipModel.caretY - offset;\r\n const left = tooltipModel.caretX - offsetH;\r\n const tooltipContent = `Número de Estudantes: ${tooltipModel.dataPoints[0].yLabel}`;\r\n\r\n setCustomTooltip({\r\n display: true,\r\n position: { x: left, y: top },\r\n content: tooltipContent\r\n });\r\n }\r\n }\r\n },\r\n plugins: {\r\n lineToAxisPlugin: lineToAxisPlugin\r\n }\r\n },\r\n });\r\n } else {\r\n console.error('2D context not available for the canvas');\r\n }\r\n } else {\r\n console.error('Canvas element not found');\r\n }\r\n } else {\r\n window.myLollipopChart.data.labels = chartLabels;\r\n window.myLollipopChart.data.datasets[0].data = chartData;\r\n window.myLollipopChart.update();\r\n }\r\n };\r\n\r\n if (!loadingStatus.loadingGradeDetailsCounts && !loadingStatus.loadingGradeDetailsInfo) {\r\n updateChart();\r\n }\r\n\r\n return () => {\r\n if (window.myLollipopChart) {\r\n window.myLollipopChart.destroy();\r\n window.myLollipopChart = undefined;\r\n }\r\n };\r\n }, [gradeCounts, loadingStatus.loadingGradeDetailsCounts, loadingStatus.loadingGradeDetailsInfo, setCustomTooltip]);\r\n\r\n const hasValidGradeCounts = gradeCounts && Object.keys(gradeCounts).some(key => {\r\n const grade = parseInt(key);\r\n const specialGrades = ['66', '77', '88', '99'];\r\n return (!isNaN(grade) && grade >= 0 && grade <= 20) || specialGrades.includes(key);\r\n });\r\n\r\n return hasValidGradeCounts ? (\r\n
    \r\n \r\n
    \r\n ) : null;\r\n};\r\n\r\nexport default GradesChart;","import React from 'react';\r\nimport styled from \"styled-components\";\r\nimport PdfReader from \"../../../VirtualSecretary/Certificates/CertificatesDetails/containers/CertificateReady/PdfReader\";\r\n\r\nconst PdfBackdrop = styled.div`\r\n\tposition: fixed;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\twidth: 100%;\r\n\theight: 100vh;\r\n\tz-index: 1102;\r\n\tbackground-color: rgba(0, 0, 0, 0.5);\r\n`;\r\n\r\nconst PdfWrapper = styled.div`\r\n\tposition: fixed;\r\n\ttop: 2.5rem;\r\n left: 18%;\r\n width: 65%;\r\n\tz-index: 1103;\r\n`;\r\ninterface PdfModalProps {\r\n changeModal: () => void;\r\n pdfUrl: string | null;\r\n scale: number;\r\n}\r\n\r\nconst PdfModal: React.FC = (props) => {\r\n\r\n const hideModal = (e: React.MouseEvent) => {\r\n if (e.target === e.currentTarget) {\r\n props.changeModal();\r\n }\r\n };\r\n\r\n return (\r\n <>\r\n \r\n \r\n {props.pdfUrl ? (\r\n \r\n ) : (\r\n
    Loading PDF...
    \r\n )}\r\n
    \r\n \r\n );\r\n};\r\n\r\nexport default PdfModal;\r\n","import React, { useEffect, useState } from 'react';\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\nimport { formatDate } from './utils';\r\nimport * as selectors from './logic/selectors';\r\nimport { Button, Table, AnimatedBackground } from '@paco_ua/pacoui';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { getCurrentRoute } from 'utils';\r\nimport { actions } from 'store/rootSlices';\r\nimport styled from 'styled-components';\r\nimport GradesChart from './Chart/index';\r\nimport PdfModal from './PDFModal';\r\nimport GradeTitle from 'shared/components/GradeTitle';\r\n\r\nconst LoadingWrapper = styled.div`\r\n width: 100%;\r\n height: 300px;\r\n\r\n * {\r\n margin: 8px 0px;\r\n }\r\n`;\r\n\r\nconst GradesDetails = ({ theme, t }) => {\r\n const dispatch = useDispatch();\r\n const { pautaData, dataExame, gradeCounts, loadingStatus, pdfUrl, isPdfReady, isPdfModalOpen } = useSelector(selectors.getGradeDetailsSlice);\r\n const [customTooltip, setCustomTooltip] = useState({\r\n display: false,\r\n position: { x: 0, y: 0 },\r\n content: ''\r\n });\r\n const { navigateTo } = actions.App;\r\n const { getGradeDetails } = actions.GradesDetails;\r\n const codigoPauta = getCurrentRoute().params.codigoPauta;\r\n const formattedDate = dataExame ? formatDate(dataExame) : '';\r\n const currentLocale = useSelector(selectors.getCurrentLocale);\r\n\r\n useEffect(() => {\r\n dispatch(actions.GradesDetails.onMount());\r\n return () => {\r\n dispatch(actions.GradesDetails.onUnmount());\r\n };\r\n }, [dispatch]);\r\n\r\n useEffect(() => {\r\n if (codigoPauta !== null) {\r\n dispatch(getGradeDetails({ codigoPauta }));\r\n }\r\n }, [codigoPauta, getGradeDetails, dispatch]);\r\n\r\n const handleIsPdfModalOpen = () => {\r\n dispatch(actions.GradesDetails.setIsPdfModalOpen());\r\n }\r\n\r\n const handlePreview = () => {\r\n dispatch(actions.GradesDetails.fetchPdf());\r\n dispatch(actions.GradesDetails.setIsPdfModalOpen());\r\n };\r\n\r\n const tableStructure = {\r\n header: {\r\n titles: [\r\n { text: t('pautas.codigoDisciplina'), style: { textAlign: 'left' } },\r\n { text: t('pautas.nomeDisciplina'), style: { textAlign: 'left', width: '12%' } },\r\n { text: t('pautas.codigoPauta'), style: { textAlign: 'left' } },\r\n { text: t('pautas.anoLectivo'), style: { textAlign: 'left' } },\r\n { text: t('pautas.semestre'), style: { textAlign: 'left', width: '2%' } },\r\n { text: t('pautas.tipoExame'), style: { textAlign: 'left', width: '5%' } },\r\n { text: t('pautas.examDate'), style: { textAlign: 'left', width: '10%' } },\r\n { text: t('pautas.studentsNumber'), style: { textAlign: 'left', width: '3%' } },\r\n { text: t('pautas.gradeState'), style: { textAlign: 'left', width: '10%' } },\r\n { text: '', style: { textAlign: 'left' } },\r\n ],\r\n type: 'columnTitle'\r\n },\r\n rows: pautaData.map((item, index) => ({\r\n cells: [\r\n { cellProps: '', content: item.codDisciplina },\r\n { cellProps: '', content: currentLocale === 'pt' ? item.nomeDisciplina : item.nomeDisciplinaEng },\r\n { cellProps: '', content: item.codPauta },\r\n { cellProps: '', content: item.anoLectivo },\r\n { cellProps: '', content: item.semestre },\r\n { cellProps: '', content: item.tipoExame },\r\n { cellProps: '', content: formattedDate },\r\n { cellProps: '', content: item.ntotalAlunos },\r\n { cellProps: '', content: t(`pautas.gradeState` + item.estadoActual) },\r\n {\r\n cellProps: '',\r\n content: (\r\n
    \r\n \r\n {(item.estadoActual === 7 || item.estadoActual === 8) && (\r\n \r\n )}\r\n
    \r\n )\r\n },\r\n ],\r\n key: `row-${index}`,\r\n collapsableRows: [],\r\n })),\r\n };\r\n\r\n return (\r\n }\r\n expanded={true}\r\n mainContent={\r\n <>\r\n {(isPdfReady && isPdfModalOpen) && (\r\n \r\n )}\r\n {customTooltip.display && (\r\n
    \r\n {customTooltip.content}\r\n
    \r\n )}\r\n {(loadingStatus.loadingGradeDetailsInfo || loadingStatus.loadingGradeDetailsCounts) && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n {(\r\n !loadingStatus.loadingGradeDetailsInfo\r\n && pautaData.length !== 0\r\n && !loadingStatus.loadingGradeDetailsCounts\r\n && dataExame !== \"\"\r\n && gradeCounts\r\n && Object.keys(gradeCounts).length > 0)\r\n && (\r\n <>\r\n \r\n
    \r\n
    \r\n \r\n \r\n \r\n )}\r\n \r\n }\r\n />\r\n );\r\n}\r\n\r\nexport default GradesDetails;","import { t } from 'app';\r\n\r\nexport interface StudentData {\r\n nota: string;\r\n}\r\n\r\nexport const formatDate = (dateStr: string) => {\r\n const parts = dateStr.split('-'); // split the string into an array of parts\r\n if (parts.length === 3) {\r\n let [day, month, year] = parts;\r\n\r\n // ddd leading zeros if day or month is a single digit\r\n day = day.length === 1 ? `0${day}` : day;\r\n month = month.length === 1 ? `0${month}` : month;\r\n return `${day}/${month}/${year}`;\r\n }\r\n return dateStr; // return original string if format is unexpected\r\n};","/**\r\n * ExamEnrollment scene selectors\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getExamEnrollmentSlice = (state: RootState) => state.ExamEnrollment;\r\nexport const getUserNmec = (state: RootState) => state.App.user.nmec;\r\nexport const getRegistration = (state: RootState) => state.StudentRegistrationDropdown.registration;\r\nexport const getUserRegistrations = (state: RootState) => state.App.user.registrations;\r\nexport const getUser = (state: RootState) => state.App.user;\r\n","/**\r\n * ExamEnrollment scene\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport React, { useEffect } from 'react';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport * as selectors from './logic/selectors';\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\nimport styled from 'styled-components';\r\nimport { CallToAction, Text } from '@paco_ua/pacoui';\r\n\r\n\r\nconst Exams = ({ t }) => {\r\n const { onMount, onUnmount } = actions.Exams;\r\n\r\n const dispatch = useDispatch();\r\n const { loading } = useSelector(selectors.getExamEnrollmentSlice);\r\n const user = useSelector(selectors.getUser);\r\n\r\n useEffect(() => {\r\n dispatch(onMount());\r\n return () => {\r\n dispatch(onUnmount());\r\n };\r\n }, [dispatch, onMount, onUnmount]);\r\n\r\n return (\r\n \r\n \r\n {t('generic.iframeBanner')}\r\n \r\n }\r\n padding={'15px 38px'}\r\n noPointer\r\n />\r\n \r\n \r\n );\r\n};\r\nconst Wrapper = styled.div`\r\n text-align: center;\r\n`;\r\nexport default Exams;\r\n","/**\r\n * ExamEnrollment scene selectors\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getExamEnrollmentSlice = (state: RootState) => state.ExamEnrollment;\r\nexport const getUserNmec = (state: RootState) => state.App.user.nmec;\r\nexport const getRegistration = (state: RootState) => state.StudentRegistrationDropdown.registration;\r\nexport const getUserRegistrations = (state: RootState) => state.App.user.registrations;\r\nexport const getUser = (state: RootState) => state.App.user;\r\n","/**\r\n * ExamEnrollment scene\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport React, { useEffect } from 'react';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport * as selectors from './logic/selectors';\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\nimport styled from 'styled-components';\r\nimport { CallToAction, Text } from '@paco_ua/pacoui';\r\n\r\nconst TransferalCompetence = ({ t }) => {\r\n const { onMount, onUnmount } = actions.TransferalCompetence;\r\n\r\n const dispatch = useDispatch();\r\n const { loading } = useSelector(selectors.getExamEnrollmentSlice);\r\n const user = useSelector(selectors.getUser);\r\n\r\n useEffect(() => {\r\n dispatch(onMount());\r\n return () => {\r\n dispatch(onUnmount());\r\n };\r\n }, [dispatch, onMount, onUnmount]);\r\n\r\n return (\r\n \r\n \r\n {t('generic.iframeBanner')}\r\n \r\n }\r\n padding={'15px 38px'}\r\n noPointer\r\n />\r\n \r\n \r\n );\r\n};\r\nconst Wrapper = styled.div`\r\n text-align: center;\r\n`;\r\nexport default TransferalCompetence;\r\n","/**\r\n * ExamEnrollment scene selectors\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getExamEnrollmentSlice = (state: RootState) => state.ExamEnrollment;\r\nexport const getUserNmec = (state: RootState) => state.App.user.nmec;\r\nexport const getRegistration = (state: RootState) => state.StudentRegistrationDropdown.registration;\r\nexport const getUserRegistrations = (state: RootState) => state.App.user.registrations;\r\nexport const getUser = (state: RootState) => state.App.user;\r\n","/**\r\n * ClassSupoort scene\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n \r\nimport React, { useEffect } from 'react'\r\nimport styled from 'styled-components'\r\n\r\nimport { useDispatch, useSelector } from 'react-redux'\r\n\r\nimport { actions } from 'store/rootSlices'\r\nimport * as selectors from './logic/selectors';\r\nimport { CallToAction, Text } from '@paco_ua/pacoui';\r\n\r\n//import config from 'config'\r\n\r\nconst ClassSupoort = ({ t, i18n }) => {\r\n\r\n //const { } = useSelector(state => state.ClassSupoort)\r\n\r\n const { onMount, onUnmount} = actions.ClassSupoort\r\n //const { api_t } = actions.App\r\n\r\n const dispatch = useDispatch();\r\n const user = useSelector(selectors.getUser);\r\n\r\n useEffect(() => {\r\n\r\n dispatch(onMount())\r\n return () => {\r\n dispatch(onUnmount())\r\n }\r\n }, [dispatch, onMount, onUnmount]);\r\n\r\n return (\r\n \r\n \r\n {t('generic.iframeBanner')}\r\n \r\n }\r\n padding={'15px 38px'}\r\n noPointer\r\n />\r\n \r\n \r\n )\r\n}\r\n\r\nexport default ClassSupoort\r\n\r\nconst Wrapper = styled.div`\r\n text-align: center;\r\n`","import { RootState } from 'store/rootSlices';\r\n\r\nexport const getAppSlice = (state: RootState) => state.App;\r\nexport const getGradesGuideSlice = (state: RootState) => state.GradesGuide;\r\n","/**\r\n * GradesGuide scene\r\n *\r\n * @author Pedro Monteiro \r\n *\r\n */\r\nimport React, { useEffect, useContext } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\n\r\nimport { Text } from '@paco_ua/pacoui';\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport * as selectors from './logic/selectors';\r\n\r\nimport MarkdownRenderer from 'shared/containers/MarkdownRenderer';\r\nimport Header from 'shared/containers/TitleHeader';\r\n\r\nimport { getCurrentRoute } from 'utils';\r\n\r\nconst GradesGuide = ({ t, id }) => {\r\n const { markdown, loadingMarkdown } = useSelector(selectors.getGradesGuideSlice);\r\n const { user } = useSelector(selectors.getAppSlice);\r\n\r\n const { onMount, onUnmount } = actions.GradesGuide;\r\n const { navigateTo } = actions.App;\r\n const dispatch = useDispatch();\r\n\r\n const theme = useContext(ThemeContext);\r\n\r\n useEffect(() => {\r\n dispatch(onMount(id));\r\n\r\n return () => {\r\n dispatch(onUnmount());\r\n };\r\n }, [dispatch, onMount, onUnmount]);\r\n\r\n //markdown renderer respects already pagestructure\r\n return (\r\n ,\r\n subHeader: (\r\n \r\n {id ? t(`routes.${id}`) : t('routes.pautasSignature')}\r\n \r\n ),\r\n }}\r\n value={markdown?.value || ''}\r\n valueEn={markdown?.valueEn || ''}\r\n valueCh={markdown?.valueCh || ''}\r\n />\r\n );\r\n};\r\n\r\nexport default GradesGuide;\r\n","/**\r\n * ExamEnrollment scene selectors\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getSpecialExamsSlice = (state: RootState) => state.SpecialExams;\r\nexport const getUserNmec = (state: RootState) => state.App.user.nmec;\r\nexport const getRegistration = (state: RootState) => state.StudentRegistrationDropdown.registration;\r\nexport const getUserRegistrations = (state: RootState) => state.App.user.registrations;\r\nexport const getUser = (state: RootState) => state.App.user;\r\n","/**\r\n * ExamEnrollment scene\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport React, { useEffect } from 'react';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport * as selectors from './logic/selectors';\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport Header from 'shared/containers/TitleHeader';\r\nimport styled from 'styled-components';\r\nimport { CallToAction, Text } from '@paco_ua/pacoui';\r\n\r\n\r\nconst SpecialExams = ({ t }) => {\r\n const { onMount, onUnmount } = actions.Exams;\r\n\r\n const dispatch = useDispatch();\r\n const { loading } = useSelector(selectors.getSpecialExamsSlice);\r\n const user = useSelector(selectors.getUser);\r\n\r\n useEffect(() => {\r\n dispatch(onMount());\r\n return () => {\r\n dispatch(onUnmount());\r\n };\r\n }, [dispatch, onMount, onUnmount]);\r\n\r\n return (\r\n \r\n \r\n {t('generic.iframeBanner')}\r\n \r\n }\r\n padding={'15px 38px'}\r\n noPointer\r\n />\r\n \r\n \r\n );\r\n};\r\nconst Wrapper = styled.div`\r\n text-align: center;\r\n`;\r\nexport default SpecialExams;\r\n","enum CommunicationTypes {\r\n STORE_TOASTER_ACTION = 'toaster',\r\n STORE_NAVIGATE_ACTION = 'navigate',\r\n STORE_LOCALE_ACTION = 'currentLocale',\r\n STORE_EXAMPLE_ACTION = 'example',\r\n STORE_OTHER_ACTION = 'other',\r\n IFRAME_HEIGHT = 'height',\r\n CHANGE_LANG = 'lang',\r\n LOGOUT = 'logout'\r\n}\r\n\r\nexport { CommunicationTypes };\r\n","import { RootState } from 'store/rootSlices';\r\n\r\nexport const getAppSlice = (state: RootState) => state.App;\r\nexport const getLogsSlice = (state: RootState) => state.Logs;\r\n","import config from 'config'\r\n\r\nconst targets: any[] = [config.IFRAME_LOGS, config.IFRAME_ENROLL];\r\nconst origins: any[] = [config.IFRAME_LOGS_ORIGIN, config.IFRAME_LOGS, config.IFRAME_ENROLL,config.IFRAME_ENROLL_ORIGIN];\r\n\r\nconst checkIfOriginIsValid = (origin: string | null | undefined) => {\r\n return origins.some((messageOrigin) => messageOrigin === origin);\r\n};\r\n\r\nconst checkIfTargetisValid = (target: string | null | undefined) => {\r\n return targets.some((targetWindow) => targetWindow === target);\r\n};\r\n\r\nexport { checkIfTargetisValid, checkIfOriginIsValid };\r\n","import { CommunicationTypes } from './communicationTypes';\r\nimport { IPostMessageMiddleware, IMessageListener, ICommunicationPayloads } from './types';\r\nimport { checkIfOriginIsValid, checkIfTargetisValid } from './utils';\r\n\r\nexport const usePostMessageMiddleware = (\r\n targetWindow: Window | null | undefined,\r\n url?: string //use only for dev purposes\r\n): IPostMessageMiddleware => {\r\n const listeners: IMessageListener[] = [];\r\n\r\n // Add event listener to handle incoming messages\r\n window.addEventListener('message', handleMessage);\r\n function handleMessage(message: any) {\r\n \r\n if (message.origin && !checkIfOriginIsValid(message.origin)) {\r\n console.warn(`Received message from unexpected origin: ${message.origin}`);\r\n return;\r\n }\r\n\r\n const { type, payload } = message.data;\r\n const listener = listeners.find((l) => l.type === type)?.listener;\r\n if (listener) {\r\n listener(payload);\r\n }\r\n }\r\n\r\n // Function to send a message to the target window\r\n const sendMessage = (\r\n type: T,\r\n payload: ICommunicationPayloads[T]\r\n ) => {\r\n // Check if the target origin is provided and the target window exists\r\n if (targetWindow && checkIfTargetisValid(url ?? targetWindow?.location.origin)) {\r\n targetWindow.postMessage({ type, payload }, url ?? targetWindow?.location.origin);\r\n } else {\r\n console.log('Failed to send message. Target window is not provided.');\r\n }\r\n };\r\n\r\n // Function to add a message listener for a specific message type\r\n const addMessageListener = (\r\n type: T,\r\n listener: (payload: ICommunicationPayloads[T]) => void\r\n ) => {\r\n listeners.push({ type, listener });\r\n };\r\n\r\n // Function to remove a message listener for a specific message type\r\n const removeMessageListener = (type: T) => {\r\n const index = listeners.findIndex((l: IMessageListener) => l.type === type);\r\n\r\n if (index !== -1) {\r\n listeners.splice(index, 1);\r\n }\r\n };\r\n\r\n // Function to cleanup the middleware by removing all message listeners\r\n const cleanup = () => {\r\n window.removeEventListener('message', handleMessage);\r\n listeners.splice(0, listeners.length);\r\n };\r\n\r\n return {\r\n sendMessage,\r\n addMessageListener,\r\n removeMessageListener,\r\n cleanup,\r\n };\r\n};\r\n","/**\r\n * Logs scene\r\n *\r\n * @author Manuel Gil \r\n *\r\n */\r\n \r\nimport React, { useEffect, useMemo, useRef, useState } from 'react'\r\nimport styled from 'styled-components'\r\nimport { useDispatch, useSelector } from 'react-redux'\r\nimport * as selectors from './logic/selectors'\r\nimport { actions } from 'store/rootSlices'\r\nimport { usePostMessageMiddleware } from 'shared/components/ModuleCommunication'\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport { CommunicationTypes } from 'shared/components/ModuleCommunication/communicationTypes'\r\nimport config from 'config'\r\n\r\nconst Logs = ({ t, i18n }) => {\r\n\r\n const { onMount, onUnmount } = actions.Logs\r\n const { signout, navigateTo } = actions.App\r\n const { showToaster } = actions.Toaster;\r\n const { user, currentLocale } = useSelector(selectors.getAppSlice);\r\n\r\n //iframe\r\n const [embeddedModuleLoaded, setEmbeddedModuleLoaded] = useState(false);\r\n const [embeddedModuleHeight, setEmbeddedModuleHeight] = useState(0);\r\n const embeddedModuleRef = useRef(null);\r\n\r\n //trying middleware\r\n const { addMessageListener, sendMessage, removeMessageListener } = usePostMessageMiddleware(\r\n embeddedModuleRef.current?.contentWindow, \r\n config.IFRAME_LOGS\r\n );\r\n\r\n const loadModule = async () => { \r\n setEmbeddedModuleLoaded(true);\r\n };\r\n\r\n useEffect(() => {\r\n const iframeElement = embeddedModuleRef.current;\r\n \r\n if (iframeElement) {\r\n iframeElement.addEventListener('load', loadModule);\r\n }\r\n \r\n return () => {\r\n if (iframeElement) {\r\n iframeElement.removeEventListener('load', loadModule);\r\n }\r\n };\r\n }, []);\r\n\r\n useEffect(()=> {\r\n sendMessage(CommunicationTypes.STORE_OTHER_ACTION, user)\r\n },[user, embeddedModuleLoaded])\r\n\r\n useEffect(()=> {\r\n sendMessage(CommunicationTypes.CHANGE_LANG, {lang: currentLocale})\r\n },[currentLocale, embeddedModuleLoaded])\r\n\r\n useEffect(()=> {\r\n\r\n //here we define the handler for this type (LOGOUT) of message\r\n addMessageListener(CommunicationTypes.STORE_NAVIGATE_ACTION, (payload) => { \r\n dispatch(navigateTo(payload));\r\n });\r\n\r\n //here we define the handler for this type (STORE_TOASTER_ACTION) of message\r\n addMessageListener(CommunicationTypes.STORE_TOASTER_ACTION, (payload) => {\r\n dispatch(showToaster(payload));\r\n });\r\n\r\n //here we define the handler for this type (IFRAME_HEIGHT) of message\r\n addMessageListener(CommunicationTypes.IFRAME_HEIGHT, (payload) => {\r\n setEmbeddedModuleHeight(Number(payload.height) ?? 0);\r\n });\r\n\r\n //here we define the handler for this type (LOGOUT) of message\r\n addMessageListener(CommunicationTypes.LOGOUT, (payload) => {\r\n dispatch(signout());\r\n });\r\n \r\n sendMessage(CommunicationTypes.STORE_OTHER_ACTION, user)\r\n sendMessage(CommunicationTypes.CHANGE_LANG, {lang: currentLocale})\r\n\r\n return () => {\r\n removeMessageListener(CommunicationTypes.STORE_NAVIGATE_ACTION)\r\n }\r\n },[embeddedModuleLoaded])\r\n\r\n\r\n const dispatch = useDispatch()\r\n\r\n useEffect(() => {\r\n\r\n dispatch(onMount())\r\n return () => {\r\n dispatch(onUnmount())\r\n }\r\n }, [dispatch, onMount, onUnmount]);\r\n\r\n return (\r\n \r\n \r\n \r\n }\r\n />\r\n )\r\n}\r\n\r\nexport default Logs\r\n\r\nconst ContentWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n // to compensate PageStructure default margin-top\r\n margin-top: -20px;\r\n`;","import { RootState } from 'store/rootSlices';\r\n\r\nexport const getAppSlice = (state: RootState) => state.App;\r\nexport const getLogsSudentSlice = (state: RootState) => state.LogsStudent;\r\n","/**\r\n * LogsStudent scene\r\n *\r\n * @author Manuel Gil \r\n *\r\n */\r\n \r\nimport React, { useEffect, useRef, useState } from 'react'\r\nimport styled from 'styled-components'\r\nimport { useDispatch, useSelector } from 'react-redux'\r\nimport * as selectors from './logic/selectors'\r\nimport { actions } from 'store/rootSlices'\r\nimport { usePostMessageMiddleware } from 'shared/components/ModuleCommunication'\r\nimport PageStructure from 'shared/containers/PageStructure';\r\nimport { CommunicationTypes } from 'shared/components/ModuleCommunication/communicationTypes'\r\nimport config from 'config'\r\n\r\nconst LogsStudent = ({ t, i18n }) => {\r\n\r\n const { onMount, onUnmount } = actions.LogsStudent\r\n const { showToaster } = actions.Toaster;\r\n const { signout } = actions.App\r\n const { user, currentLocale } = useSelector(selectors.getAppSlice);\r\n\r\n //iframe\r\n const [embeddedModuleLoaded, setEmbeddedModuleLoaded] = useState(false);\r\n const [embeddedModuleHeight, setEmbeddedModuleHeight] = useState(0);\r\n const embeddedModuleRef = useRef(null);\r\n //const { api_t } = actions.App\r\n\r\n const dispatch = useDispatch()\r\n\r\n //trying middleware\r\n const { addMessageListener, sendMessage } = usePostMessageMiddleware(\r\n embeddedModuleRef.current?.contentWindow,\r\n config.IFRAME_LOGS\r\n );\r\n \r\n const loadModule = async () => { \r\n setEmbeddedModuleLoaded(true);\r\n };\r\n \r\n useEffect(() => {\r\n const iframeElement = embeddedModuleRef.current;\r\n \r\n if (iframeElement) {\r\n iframeElement.addEventListener('load', loadModule);\r\n }\r\n \r\n return () => {\r\n if (iframeElement) {\r\n iframeElement.removeEventListener('load', loadModule);\r\n }\r\n };\r\n }, []);\r\n \r\n useEffect(()=> {\r\n sendMessage(CommunicationTypes.STORE_OTHER_ACTION, user)\r\n },[user, embeddedModuleLoaded])\r\n \r\n useEffect(()=> {\r\n sendMessage(CommunicationTypes.CHANGE_LANG, {lang: currentLocale})\r\n },[currentLocale])\r\n\r\n\r\n useEffect(()=> {\r\n //here we define the handler for this type (STORE_TOASTER_ACTION) of message\r\n addMessageListener(CommunicationTypes.STORE_TOASTER_ACTION, (payload) => {\r\n dispatch(showToaster(payload));\r\n });\r\n \r\n //here we define the handler for this type (STORE_TOASTER_ACTION) of message\r\n addMessageListener(CommunicationTypes.IFRAME_HEIGHT, (payload) => {\r\n setEmbeddedModuleHeight(Number(payload.height) ?? 0);\r\n });\r\n\r\n //here we define the handler for this type (LOGOUT) of message\r\n addMessageListener(CommunicationTypes.LOGOUT, (payload) => {\r\n dispatch(signout());\r\n });\r\n \r\n sendMessage(CommunicationTypes.STORE_OTHER_ACTION, user)\r\n sendMessage(CommunicationTypes.STORE_NAVIGATE_ACTION, { key:'/student' })\r\n sendMessage(CommunicationTypes.CHANGE_LANG, {lang: currentLocale})\r\n },[embeddedModuleLoaded])\r\n \r\n useEffect(() => {\r\n \r\n dispatch(onMount())\r\n return () => {\r\n dispatch(onUnmount())\r\n }\r\n }, [dispatch, onMount, onUnmount]);\r\n \r\n return (\r\n \r\n \r\n \r\n }\r\n />\r\n )\r\n}\r\n\r\nexport default LogsStudent\r\n\r\nconst ContentWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n // to compensate PageStructure default margin-top\r\n margin-top: -20px;\r\n`;","/**\r\n * -----------------------------------------------------------------------------\r\n * Copyright (C) Ubiwhere, LDA\r\n * 2012-2018\r\n *\r\n *\r\n * The reproduction, transmission or use of this document or its contents is not\r\n * permitted without express written authorization. All rights, including rights\r\n * created by patent grant or registration of a utility model or design, are\r\n * reserved. Modifications made to this document are restricted to authorized\r\n * personnel only. Technical specifications and features are binding only when\r\n * specifically and expressly agreed upon in a written contract.\r\n * -----------------------------------------------------------------------------\r\n *\r\n * Router\r\n * Add new routes here\r\n */\r\nimport React from 'react';\r\n// Import page components bellow here\r\n// Keep them organized as the routes object\r\n\r\n// WARNING!! Don't erase the nextline as it is necessary for hygen to automatically import your components\r\n// Define imports here\r\nimport Home from 'scenes/Home';\r\nimport Help from 'scenes/Help';\r\nimport NewApplication from 'scenes/VirtualSecretary/Applications/NewApplication';\r\nimport RegistrationDetails from 'scenes/VirtualSecretary/RegistrationDetails';\r\nimport Registrations from 'scenes/VirtualSecretary/Registrations';\r\nimport SeriationHistory from 'scenes/Schedules/SeriationHistory';\r\nimport SeriationHistoryDetails from 'scenes/Schedules/SeriationHistoryDetails';\r\n//import PersonalDataCompliance from 'scenes/PersonalDataCompliance';\r\nimport PageNotFound from 'scenes/PageNotFound';\r\nimport PageNoAccess from 'scenes/PageNoAccess';\r\nimport PageServerError from 'scenes/PageServerError';\r\nimport InMaintenance from 'scenes/InMaintenance';\r\nimport ApplicationsList from 'scenes/VirtualSecretary/Applications/ApplicationsList';\r\nimport ApplicationDetails from 'scenes/VirtualSecretary/Applications/ApplicationDetails';\r\nimport Payments from 'scenes/VirtualSecretary/Payments';\r\nimport PendingDebitsPayment from 'scenes/VirtualSecretary/Payments/PendingDebitsPayment';\r\nimport Grades from 'scenes/VirtualSecretary/Grades';\r\nimport AssessmentChoice from 'scenes/VirtualSecretary/AssessmentChoice';\r\nimport CurricularPlan from 'scenes/VirtualSecretary/CurricularPlan/CurricularPlan';\r\nimport CurricularUnitDetails from 'scenes/VirtualSecretary/CurricularPlan/CurricularUnitDetails';\r\nimport PersonalData from 'scenes/VirtualSecretary/PersonalData';\r\nimport CreatedSchedules from 'scenes/Schedules/CreatedSchedules';\r\nimport MySchedule from 'scenes/Schedules/MySchedule';\r\nimport FreeOptionsList from 'scenes/Schedules/FreeOptionsList';\r\nimport SchedulesHome from 'scenes/Schedules/SchedulesHome';\r\nimport SchedulesGuide from 'scenes/Schedules/SchedulesGuide';\r\nimport AllSchedules from 'scenes/Schedules/AllSchedules';\r\nimport NewCertificate from 'scenes/VirtualSecretary/Certificates/NewCertificate';\r\nimport CertificatesList from 'scenes/VirtualSecretary/Certificates/CertificatesList';\r\nimport CertificatesDetails from 'scenes/VirtualSecretary/Certificates/CertificatesDetails';\r\nimport CertificateValidator from 'scenes/VirtualSecretary/CertificateValidator';\r\nimport ExamsCalendar from 'scenes/VirtualSecretary/ExamsCalendar';\r\nimport EnrollmentRenewal from 'scenes/VirtualSecretary/Enrollments/EnrollmentRenewal';\r\nimport ExamEnrollment from 'scenes/VirtualSecretary/Enrollments/ExamEnrollment';\r\nimport ImprovementExamEnrollment from 'scenes/VirtualSecretary/Enrollments/ImprovementExamEnrollment';\r\nimport EvaluationTypeSelection from 'scenes/VirtualSecretary/Enrollments/EvaluationTypeSelection';\r\n\r\nimport { IRole, IGroup, IService, IHealthChecks } from 'config';\r\nimport GradesManagement from 'scenes/GradesManagement/GradesManagement';\r\nimport EditGrades from 'scenes/GradesManagement/EditGrades';\r\nimport GradesHistory from 'scenes/GradesManagement/GradesHistory';\r\nimport GradesDetails from 'scenes/GradesManagement/GradesDetails';\r\nimport Exams from 'scenes/VirtualSecretary/Enrollments/Exams';\r\nimport TransferalCompetence from 'scenes/VirtualSecretary/Enrollments/TransferalCompetence';\r\nimport ClassSupoort from 'scenes/VirtualSecretary/ClassSupoort';\r\nimport GradesGuide from 'scenes/GradesManagement/GradesGuide';\r\nimport SpecialExams from 'scenes/VirtualSecretary/Enrollments/SpecialExamsEnroll';\r\nimport Logs from 'scenes/Logs';\r\nimport LogsStudent from 'scenes/LogsStudent';\r\n\r\nexport interface IRoutes {\r\n exact: boolean;\r\n key: string;\r\n name: string;\r\n tags?: string[];\r\n description?: { pt: string; en: string };\r\n childOf?: string;\r\n module?: { name: string; service?: IService | String };\r\n path?: { pt: string; en: string };\r\n link?: string;\r\n hideFromSidebar?: boolean;\r\n inMaintenance?: boolean;\r\n detached?: boolean;\r\n disabled?: boolean;\r\n roles?: IRole[];\r\n groups?: IGroup[];\r\n component?: any;\r\n serviceHealthcheck?: IHealthChecks;\r\n}\r\n\r\n// Define routes here\r\n// WARNING!! Don't erase the nextline as it is necessary for hygen to automatically import your components\r\nconst Routes: IRoutes[] = [\r\n {\r\n exact: true,\r\n key: 'inMaintenance',\r\n name: 'inMaintenance',\r\n path: { pt: '/manutencao', en: '/maintenance' },\r\n hideFromSidebar: true,\r\n detached: true,\r\n roles: [\r\n 'guest',\r\n 'nonProfessor',\r\n 'other',\r\n 'protocol',\r\n 'researcher',\r\n 'scholarship',\r\n 'exStudent',\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n component: InMaintenance,\r\n },\r\n {\r\n exact: true,\r\n key: 'home',\r\n name: 'initialPage',\r\n disabled: false,\r\n hideFromSidebar: false,\r\n path: { pt: '/', en: '/' },\r\n inMaintenance: false,\r\n roles: [\r\n 'guest',\r\n 'nonProfessor',\r\n 'other',\r\n 'protocol',\r\n 'researcher',\r\n 'scholarship',\r\n 'exStudent',\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n component: Home,\r\n module: { name: 'paco', service: '' },\r\n },\r\n {\r\n exact: true,\r\n key: 'schedulesselection',\r\n name: 'schedulesSelection',\r\n path: { pt: '/horarios/escolha', en: '/schedules/selection' },\r\n roles: [\r\n 'nonProfessor',\r\n 'other',\r\n 'protocol',\r\n 'researcher',\r\n 'scholarship',\r\n 'exStudent',\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n component: SchedulesHome,\r\n module: { name: 'schedules', service: 'sgh' },\r\n },\r\n {\r\n exact: true,\r\n key: 'createdSchedules',\r\n name: 'createdSchedules',\r\n childOf: 'schedulesselection',\r\n inMaintenance: false,\r\n hideFromSidebar: true,\r\n path: { pt: '/horarios/criados', en: '/schedules/created' },\r\n roles: [\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n component: CreatedSchedules,\r\n module: { name: '', service: 'sgh' },\r\n },\r\n {\r\n exact: true,\r\n key: 'seriationhistory',\r\n name: 'seriationHistory',\r\n childOf: 'createdSchedules',\r\n hideFromSidebar: true,\r\n path: { pt: '/horarios/historico', en: '/schedules/history' },\r\n roles: [\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n component: SeriationHistory,\r\n module: { name: '', service: 'sgh' },\r\n },\r\n {\r\n exact: true,\r\n key: 'provisoryseriationhistory',\r\n name: 'provisorySeriationHistory',\r\n childOf: 'createdSchedules',\r\n hideFromSidebar: true,\r\n path: {\r\n pt: '/horarios/historico_provisorio/:id',\r\n en: '/schedules/provisory_history/:id',\r\n },\r\n roles: [\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n component: SeriationHistory,\r\n module: { name: '', service: 'sgh' },\r\n },\r\n {\r\n exact: true,\r\n key: 'provisoryscheduleseriationhistory',\r\n name: 'provisoryScheduleSeriationHistory',\r\n childOf: 'createdSchedules',\r\n hideFromSidebar: true,\r\n path: {\r\n pt: '/horarios/horario_historico_provisorio/:id',\r\n en: '/schedules/schedule_provisory_history/:id',\r\n },\r\n roles: [\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n component: SeriationHistory,\r\n module: { name: '', service: 'sgh' },\r\n },\r\n {\r\n exact: true,\r\n key: 'provisoryseriationhistorydetails',\r\n name: 'provisorySeriationHistoryDetails',\r\n childOf: 'createdSchedules',\r\n hideFromSidebar: true,\r\n path: {\r\n pt: '/horarios/historico_provisorio/detalhes/:id/:seriationId',\r\n en: '/schedules/provisory_history/details/:id/:seriationId',\r\n },\r\n roles: [\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n component: SeriationHistoryDetails,\r\n module: { name: '', service: 'sgh' },\r\n },\r\n {\r\n exact: true,\r\n key: 'seriationhistorydetails',\r\n name: 'seriationHistoryDetails',\r\n childOf: 'createdSchedules',\r\n hideFromSidebar: true,\r\n path: {\r\n pt: '/horarios/historico/detalhes/:id/:seriationId',\r\n en: '/schedules/history/details/:id/:seriationId',\r\n },\r\n roles: [\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n component: SeriationHistoryDetails,\r\n module: { name: '', service: 'sgh' },\r\n },\r\n {\r\n exact: true,\r\n key: 'mySchedule',\r\n name: 'mySchedule',\r\n inMaintenance: false,\r\n //link: 'https://paco.ua.pt/secvirtual/horarios/c_horario_aluno.asp',\r\n path: { pt: '/horarios/horario', en: '/schedules/schedule' },\r\n roles: [\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n component: MySchedule,\r\n module: { name: 'schedules', service: 'sgh' },\r\n },\r\n {\r\n exact: true,\r\n key: 'createSchedule',\r\n name: 'createSchedule',\r\n childOf: 'createdSchedules',\r\n hideFromSidebar: true,\r\n inMaintenance: false,\r\n path: { pt: '/horarios/criar', en: '/schedules/create' },\r\n roles: [\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n component: MySchedule,\r\n module: { name: '', service: 'sgh' },\r\n },\r\n {\r\n exact: true,\r\n key: 'freeOptionsList',\r\n name: 'freeOptionsList',\r\n childOf: '',\r\n hideFromSidebar: false,\r\n inMaintenance: false,\r\n path: { pt: '/horarios/lista-opcoes-livres', en: '/schedules/free-options-list' },\r\n roles: [\r\n 'guest',\r\n 'nonProfessor',\r\n 'other',\r\n 'protocol',\r\n 'researcher',\r\n 'scholarship',\r\n 'exStudent',\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n component: FreeOptionsList,\r\n module: { name: 'schedules', service: 'sgh' },\r\n },\r\n {\r\n exact: true,\r\n key: 'editSchedule',\r\n name: 'editSchedule',\r\n childOf: 'createdSchedules',\r\n hideFromSidebar: true,\r\n path: { pt: '/horarios/:id/editar', en: '/schedules/:id/edit/' },\r\n roles: [\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n component: MySchedule,\r\n module: { name: '', service: 'sgh' },\r\n },\r\n {\r\n exact: true,\r\n key: 'duplicateSchedule',\r\n name: 'duplicateSchedule',\r\n childOf: 'createdSchedules',\r\n hideFromSidebar: true,\r\n path: { pt: '/horarios/:id/duplicar', en: '/schedules/:id/duplicate' },\r\n roles: [\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n component: MySchedule,\r\n module: { name: '', service: 'sgh' },\r\n },\r\n {\r\n exact: true,\r\n key: 'allschedules',\r\n name: 'allSchedules',\r\n path: { pt: '/horarios/todos-os-horarios', en: '/schedules/all-schedules' },\r\n component: AllSchedules,\r\n roles: [\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: 'schedules', service: 'sgh' },\r\n },\r\n {\r\n exact: true,\r\n key: 'help',\r\n name: 'help',\r\n disabled: false,\r\n hideFromSidebar: false,\r\n path: { pt: '/ajuda', en: '/help' },\r\n inMaintenance: false,\r\n roles: [\r\n 'guest',\r\n 'nonProfessor',\r\n 'other',\r\n 'protocol',\r\n 'researcher',\r\n 'scholarship',\r\n 'exStudent',\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n component: Help,\r\n module: { name: 'paco', service: '' },\r\n },\r\n {\r\n exact: true,\r\n key: 'schedulesGuide',\r\n name: 'guide',\r\n hideFromSidebar: false,\r\n path: { pt: '/horarios/ajuda', en: '/schedules/help' },\r\n groups: ['frontoffice'],\r\n roles: [\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n component: (props) => ,\r\n module: { name: 'schedules', service: 'sgh' },\r\n },\r\n {\r\n exact: true,\r\n key: 'schedulesGuideFreeOptions',\r\n name: 'guide',\r\n hideFromSidebar: true,\r\n path: { pt: '/horarios/ajuda/opcoes_livres', en: '/schedules/free_options' },\r\n groups: ['frontoffice'],\r\n roles: [\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n component: (props) => ,\r\n module: { name: 'schedules', service: 'sgh' },\r\n },\r\n {\r\n exact: true,\r\n key: 'schedulesGuideSpecific',\r\n name: 'guide',\r\n hideFromSidebar: true,\r\n path: { pt: '/horarios/ajuda/simulacao', en: '/schedules/help/simulation' },\r\n groups: ['frontoffice'],\r\n roles: [\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n component: (props) => ,\r\n module: { name: 'schedules', service: 'sgh' },\r\n },\r\n {\r\n exact: true,\r\n key: 'personaldata',\r\n name: 'personalData',\r\n path: { pt: '/dados-pessoais', en: '/personal-data' },\r\n disabled: false,\r\n hideFromSidebar: false,\r\n roles: [\r\n 'student',\r\n 'exStudent',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n component: PersonalData,\r\n module: { name: 'secVirtual', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'registrations',\r\n name: 'registrations',\r\n disabled: false,\r\n hideFromSidebar: false,\r\n path: { pt: '/matriculas', en: '/registrations' },\r\n roles: [\r\n 'student',\r\n 'exStudent',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n component: Registrations,\r\n module: { name: 'secVirtual', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'registrationdetails',\r\n name: 'registrationDetails',\r\n hideFromSidebar: true,\r\n disabled: false,\r\n childOf: 'registrations',\r\n path: { pt: '/matriculas/detalhes/:id', en: '/matriculas/detalhes/:id' },\r\n roles: [\r\n 'student',\r\n 'exStudent',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n component: RegistrationDetails,\r\n module: { name: 'secVirtual', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'curricularPlan',\r\n name: 'curricularPlan',\r\n disabled: false,\r\n hideFromSidebar: false,\r\n path: { pt: '/plano-curricular', en: '/curricular-plan' },\r\n roles: [\r\n 'student',\r\n 'exStudent',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n component: CurricularPlan,\r\n module: { name: 'secVirtual', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'ucDetails',\r\n name: 'ucDetails',\r\n childOf: 'curricularPlan',\r\n inMaintenance: false,\r\n hideFromSidebar: true,\r\n path: {\r\n pt: '/plano-curricular/:ucCode/notas/:regid',\r\n en: '/curricular-plan/:ucCode/grades/:regid',\r\n },\r\n roles: [\r\n 'student',\r\n 'exStudent',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n component: CurricularUnitDetails,\r\n module: { name: 'secVirtual', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'exams',\r\n name: 'exams',\r\n childOf: 'enrollments',\r\n disabled: false,\r\n hideFromSidebar: false,\r\n path: { pt: '/exames', en: '/exams' },\r\n component: Exams,\r\n inMaintenance: false,\r\n roles: [\r\n 'student',\r\n 'exStudent',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: 'secVirtual', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'enrollmentRenewal',\r\n name: 'enrollmentRenewal',\r\n childOf: 'enrollments',\r\n disabled: false,\r\n hideFromSidebar: false,\r\n //path: { pt: '/renovacao-inscricao', en: '/enrollment-renewal' },\r\n link: 'https://paco.ua.pt/Inscricoes',\r\n component: EnrollmentRenewal,\r\n inMaintenance: true,\r\n roles: [\r\n 'student',\r\n 'exStudent',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: 'secVirtual', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'examEnrollment',\r\n name: 'examEnrollment',\r\n childOf: 'enrollments',\r\n disabled: false,\r\n hideFromSidebar: false,\r\n path: { pt: '/inscricao-exames', en: '/exam-enrollment' },\r\n component: ExamEnrollment,\r\n inMaintenance: false,\r\n roles: [\r\n 'student',\r\n 'exStudent',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: 'secVirtual', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'improvementExamEnrollment',\r\n name: 'improvementExamEnrollment',\r\n childOf: 'enrollments',\r\n disabled: false,\r\n hideFromSidebar: false,\r\n path: { pt: '/inscricao-melhorias', en: '/improvement-exam-enrollment' },\r\n component: ImprovementExamEnrollment,\r\n roles: [\r\n 'student',\r\n 'exStudent',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: 'secVirtual', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'specialExams',\r\n name: 'specialExams',\r\n childOf: 'enrollments',\r\n disabled: false,\r\n hideFromSidebar: false,\r\n path: { pt: '/inscricoes-especial', en: '/special-exams' },\r\n component: SpecialExams,\r\n inMaintenance: false,\r\n roles: [\r\n 'student',\r\n 'exStudent',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: 'secVirtual', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'evaluationTypeSelection',\r\n name: 'evaluationTypeSelection',\r\n childOf: 'enrollments',\r\n disabled: false,\r\n hideFromSidebar: false,\r\n path: { pt: '/selecao-avaliacao', en: '/evaluation-selection' },\r\n component: EvaluationTypeSelection,\r\n inMaintenance: false,\r\n roles: [\r\n 'student',\r\n 'exStudent',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: 'secVirtual', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'transferalCompetence',\r\n name: 'transferalCompetence',\r\n childOf: 'enrollments',\r\n disabled: false,\r\n hideFromSidebar: false,\r\n path: { pt: '/competencias-transferiveis', en: '/transferal-competence' },\r\n component: TransferalCompetence,\r\n inMaintenance: false,\r\n roles: [\r\n 'student',\r\n 'exStudent',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: 'secVirtual', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'examsCalendar',\r\n name: 'examsCalendar',\r\n disabled: false,\r\n hideFromSidebar: false,\r\n path: { pt: '/calendario-exames', en: '/exams-calendar' },\r\n roles: [\r\n 'student',\r\n 'exStudent',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n component: ExamsCalendar,\r\n module: { name: 'secVirtual', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'assessmentchoice',\r\n name: 'assessmentChoice',\r\n childOf: 'subscriptions',\r\n path: { pt: '/escolha-avaliacao', en: '/assessment-choice' },\r\n disabled: true,\r\n hideFromSidebar: true,\r\n roles: [\r\n 'student',\r\n 'exStudent',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n component: AssessmentChoice,\r\n module: { name: 'secVirtual', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'classsupport',\r\n name: 'classSupport',\r\n hideFromSidebar: false,\r\n path: { pt: '/apoio-aulas', en: '/class-support' },\r\n // link: 'https://paco.ua.pt/aulas/Default.asp',\r\n disabled: false,\r\n roles: [\r\n 'student',\r\n 'exStudent',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n component: ClassSupoort,\r\n module: { name: 'secVirtual', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'grades',\r\n name: 'grades',\r\n path: { pt: '/notas', en: '/grades' },\r\n disabled: true,\r\n hideFromSidebar: true,\r\n roles: [\r\n 'student',\r\n 'exStudent',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n component: Grades,\r\n module: { name: 'secVirtual', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'payments',\r\n name: 'payments',\r\n path: { pt: '/pagamentos', en: '/payments' },\r\n disabled: false,\r\n hideFromSidebar: false,\r\n roles: [\r\n 'student',\r\n 'exStudent',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n component: Payments,\r\n module: { name: 'secVirtual', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'pendingDebitsPayment',\r\n name: 'pendingDebitsPayment',\r\n childOf: 'payments',\r\n inMaintenance: false,\r\n hideFromSidebar: true,\r\n path: { pt: '/pagamentos/pagamento-debitos', en: '/payments/debit-payment' },\r\n roles: [\r\n 'student',\r\n 'exStudent',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n component: PendingDebitsPayment,\r\n groups: ['frontoffice'],\r\n module: { name: 'secVirtual', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'newapplication',\r\n name: 'newApplication',\r\n childOf: 'applications',\r\n path: { pt: '/novo-requerimento', en: '/new-application' },\r\n disabled: false,\r\n hideFromSidebar: false,\r\n component: NewApplication,\r\n roles: [\r\n 'student',\r\n 'exStudent',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: 'secVirtual', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'applicationslist',\r\n name: 'applicationsList',\r\n childOf: 'applications',\r\n path: { pt: '/lista-requerimentos', en: '/requirement-list' },\r\n disabled: false,\r\n hideFromSidebar: false,\r\n component: ApplicationsList,\r\n roles: [\r\n 'student',\r\n 'exStudent',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: 'secVirtual', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'applicationdetails',\r\n name: 'applicationDetails',\r\n childOf: 'applicationslist',\r\n hideFromSidebar: true,\r\n disabled: false,\r\n path: {\r\n pt: '/lista-requerimentos/:registrationId/:id',\r\n en: '/requirement-list/:registrationId/:id',\r\n },\r\n component: ApplicationDetails,\r\n roles: [\r\n 'student',\r\n 'exStudent',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: 'secVirtual', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'newcertificate',\r\n name: 'newCertificate',\r\n childOf: 'certificates',\r\n disabled: false,\r\n hideFromSidebar: false,\r\n path: { pt: '/nova-certidao', en: '/new-certificate' },\r\n component: NewCertificate,\r\n roles: [\r\n 'student',\r\n 'exStudent',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: 'secVirtual', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'certificateslist',\r\n name: 'certificatesList',\r\n childOf: 'certificates',\r\n disabled: false,\r\n hideFromSidebar: false,\r\n path: { pt: '/lista-certidoes', en: '/certificate-list' },\r\n component: CertificatesList,\r\n roles: [\r\n 'student',\r\n 'exStudent',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: 'secVirtual', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'certificatesdetails',\r\n name: 'certificatesDetails',\r\n childOf: 'certificateslist',\r\n disabled: false,\r\n path: {\r\n pt: '/lista-certidoes/:certificateId/:registrationId',\r\n en: '/certificate-list/:certificateId/:registrationId',\r\n },\r\n component: CertificatesDetails,\r\n roles: [\r\n 'student',\r\n 'exStudent',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n hideFromSidebar: true,\r\n groups: ['frontoffice'],\r\n module: { name: 'secVirtual', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'pageNotFound',\r\n name: 'pageNotFound',\r\n path: { pt: '/pagina-nao-encontrada', en: '/page-not-found' },\r\n hideFromSidebar: true,\r\n detached: false,\r\n roles: [\r\n 'guest',\r\n 'nonProfessor',\r\n 'other',\r\n 'protocol',\r\n 'researcher',\r\n 'scholarship',\r\n 'exStudent',\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n component: PageNotFound,\r\n },\r\n {\r\n exact: true,\r\n key: 'pageServerError',\r\n name: 'pageServerError',\r\n path: { pt: '/erro-servidor', en: '/server-error' },\r\n hideFromSidebar: true,\r\n detached: false,\r\n roles: [\r\n 'guest',\r\n 'nonProfessor',\r\n 'other',\r\n 'protocol',\r\n 'researcher',\r\n 'scholarship',\r\n 'exStudent',\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n component: PageServerError,\r\n },\r\n {\r\n exact: true,\r\n key: 'accessDenied',\r\n name: 'accessDenied',\r\n path: { pt: '/acesso-negado', en: '/access-denied' },\r\n hideFromSidebar: true,\r\n detached: false,\r\n groups: ['frontoffice'],\r\n roles: [\r\n 'guest',\r\n 'nonProfessor',\r\n 'other',\r\n 'protocol',\r\n 'researcher',\r\n 'scholarship',\r\n 'exStudent',\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n component: PageNoAccess,\r\n },\r\n {\r\n exact: true,\r\n key: 'certificateValidator',\r\n name: 'certificateValidator',\r\n childOf: '',\r\n disabled: false,\r\n inMaintenance: false,\r\n path: {\r\n pt: '/consulta-certidao',\r\n en: '/certificate-consultation',\r\n },\r\n component: CertificateValidator,\r\n roles: [\r\n 'guest',\r\n 'nonProfessor',\r\n 'other',\r\n 'protocol',\r\n 'researcher',\r\n 'scholarship',\r\n 'exStudent',\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n hideFromSidebar: false,\r\n groups: ['frontoffice'],\r\n module: { name: '', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'certificateValidatorWithAccessKey',\r\n name: 'certificateValidatorWithAccessKey',\r\n childOf: '',\r\n disabled: false,\r\n inMaintenance: false,\r\n path: {\r\n pt: '/consulta-certidao/:accessKey',\r\n en: '/certificate-consultation/:accessKey',\r\n },\r\n component: CertificateValidator,\r\n roles: [\r\n 'guest',\r\n 'nonProfessor',\r\n 'other',\r\n 'protocol',\r\n 'researcher',\r\n 'scholarship',\r\n 'exStudent',\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n hideFromSidebar: true,\r\n groups: ['frontoffice'],\r\n module: { name: '', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'credits',\r\n name: 'credits',\r\n hideFromSidebar: false,\r\n link: 'https://paco.ua.pt/Creditacoes/Geral/Default.aspx',\r\n disabled: false,\r\n childOf: 'secVirtual',\r\n roles: [\r\n 'student',\r\n 'exStudent',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n },\r\n {\r\n exact: true,\r\n key: 'backofficeSgh',\r\n name: 'backofficeSgh',\r\n hideFromSidebar: false,\r\n link: 'https://api.paco20-play-aws.ua.pt/sgh_backoffice/admin/login/',\r\n disabled: false,\r\n roles: [\r\n 'nonProfessor',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: 'backoffice', service: '' },\r\n },\r\n {\r\n exact: true,\r\n key: 'onlineEnrollments',\r\n name: 'onlineEnrollments',\r\n hideFromSidebar: true,\r\n link: 'https://paco.ua.pt/Matriculas/Geral/Default.aspx',\r\n disabled: true,\r\n roles: [\r\n 'guest',\r\n 'nonProfessor',\r\n 'other',\r\n 'protocol',\r\n 'researcher',\r\n 'scholarship',\r\n 'exStudent',\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: '', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'postGraduationApplication',\r\n name: 'postGraduationApplication',\r\n hideFromSidebar: true,\r\n childOf: 'candidature',\r\n link: 'https://paco.ua.pt/Candidaturas',\r\n disabled: true,\r\n roles: [\r\n 'guest',\r\n 'nonProfessor',\r\n 'other',\r\n 'protocol',\r\n 'researcher',\r\n 'scholarship',\r\n 'exStudent',\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: '', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'm23Applications',\r\n name: 'm23Applications',\r\n hideFromSidebar: true,\r\n childOf: 'candidature',\r\n link: 'https://paco.ua.pt/M23/Geral/Default.aspx',\r\n disabled: true,\r\n roles: [\r\n 'guest',\r\n 'nonProfessor',\r\n 'other',\r\n 'protocol',\r\n 'researcher',\r\n 'scholarship',\r\n 'exStudent',\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: '', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'm23ApplicationsTESP',\r\n name: 'm23ApplicationsTESP',\r\n hideFromSidebar: true,\r\n link: 'https://paco.ua.pt/M23TESP/Geral/Default.aspx',\r\n disabled: true,\r\n childOf: 'candidature',\r\n roles: [\r\n 'guest',\r\n 'nonProfessor',\r\n 'other',\r\n 'protocol',\r\n 'researcher',\r\n 'scholarship',\r\n 'exStudent',\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: '', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'specialApplications',\r\n name: 'specialApplications',\r\n hideFromSidebar: true,\r\n link: 'https://paco.ua.pt/candidaturas',\r\n disabled: true,\r\n childOf: 'candidature',\r\n roles: [\r\n 'guest',\r\n 'nonProfessor',\r\n 'other',\r\n 'protocol',\r\n 'researcher',\r\n 'scholarship',\r\n 'exStudent',\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: '', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'TESPApplications',\r\n name: 'TESPApplications',\r\n hideFromSidebar: true,\r\n link: 'https://paco.ua.pt/candidaturas',\r\n disabled: true,\r\n childOf: 'candidature',\r\n roles: [\r\n 'guest',\r\n 'nonProfessor',\r\n 'other',\r\n 'protocol',\r\n 'researcher',\r\n 'scholarship',\r\n 'exStudent',\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: '', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'isolatedCurricularUnits',\r\n name: 'isolatedCurricularUnits',\r\n hideFromSidebar: true,\r\n link: 'https://paco.ua.pt/Candidaturas',\r\n disabled: true,\r\n childOf: 'candidature',\r\n roles: [\r\n 'guest',\r\n 'nonProfessor',\r\n 'other',\r\n 'protocol',\r\n 'researcher',\r\n 'scholarship',\r\n 'exStudent',\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: '', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'freeCoursesApplications',\r\n name: 'freeCoursesApplications',\r\n hideFromSidebar: true,\r\n link: 'https://www.ua.pt/pt/dlc/cursos-livres-e-ple',\r\n disabled: true,\r\n childOf: 'candidature',\r\n roles: [\r\n 'guest',\r\n 'nonProfessor',\r\n 'other',\r\n 'protocol',\r\n 'researcher',\r\n 'scholarship',\r\n 'exStudent',\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: '', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'internationalStudentsApplications',\r\n name: 'internationalStudentsApplications',\r\n hideFromSidebar: true,\r\n link: 'https://paco.ua.pt/candidaturas',\r\n disabled: true,\r\n childOf: 'candidature',\r\n roles: [\r\n 'guest',\r\n 'nonProfessor',\r\n 'other',\r\n 'protocol',\r\n 'researcher',\r\n 'scholarship',\r\n 'exStudent',\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: '', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'pedagogicalDossier',\r\n name: 'pedagogicalDossier',\r\n hideFromSidebar: true,\r\n link: 'https://paco.ua.pt/DPUC/secure/Default.aspx',\r\n disabled: true,\r\n roles: [\r\n 'guest',\r\n 'nonProfessor',\r\n 'other',\r\n 'protocol',\r\n 'researcher',\r\n 'scholarship',\r\n 'exStudent',\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: 'teachers', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'courseDirectorOnlineCreditations',\r\n name: 'courseDirectorOnlineCreditations',\r\n hideFromSidebar: true,\r\n link: 'https://paco.ua.pt/Creditacoes/Geral/Default.aspx',\r\n disabled: true,\r\n roles: [\r\n 'guest',\r\n 'nonProfessor',\r\n 'other',\r\n 'protocol',\r\n 'researcher',\r\n 'scholarship',\r\n 'exStudent',\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: 'teachers', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'organicDirectorsIsolatedUCs',\r\n name: 'organicDirectorsIsolatedUCs',\r\n hideFromSidebar: true,\r\n link: 'https://paco.ua.pt/candidaturas',\r\n disabled: true,\r\n roles: [\r\n 'guest',\r\n 'nonProfessor',\r\n 'other',\r\n 'protocol',\r\n 'researcher',\r\n 'scholarship',\r\n 'exStudent',\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: 'teachers', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'academicServices',\r\n name: 'academicServices',\r\n hideFromSidebar: true,\r\n link: 'https://www.ua.pt/pt/sga/',\r\n disabled: true,\r\n roles: [\r\n 'guest',\r\n 'nonProfessor',\r\n 'other',\r\n 'protocol',\r\n 'researcher',\r\n 'scholarship',\r\n 'exStudent',\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: '', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'aveiroUniversity',\r\n name: 'aveiroUniversity',\r\n hideFromSidebar: false,\r\n link: 'https://www.ua.pt/',\r\n disabled: false,\r\n roles: [\r\n 'guest',\r\n 'nonProfessor',\r\n 'other',\r\n 'protocol',\r\n 'researcher',\r\n 'scholarship',\r\n 'exStudent',\r\n 'student',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sgh_superUser_ReadOnly',\r\n 'sgh_superUser_FullAccess',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: '', service: 'secVirtual' },\r\n },\r\n {\r\n exact: true,\r\n key: 'gradesManagement',\r\n name: 'gradesManagement',\r\n childOf: 'pautas',\r\n path: { pt: '/pautas/', en: '/grades/' },\r\n roles: [\r\n 'professor',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'pautas_superUser_ReadOnly',\r\n 'pautas_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: '', service: 'pautas' },\r\n component: GradesManagement,\r\n },\r\n {\r\n exact: true,\r\n key: 'editGrades',\r\n name: 'editGrades',\r\n childOf: 'gradesManagement',\r\n hideFromSidebar: true,\r\n disabled: false,\r\n path: { pt: '/pautas/:codigoPauta/editar', en: '/grades/:codigoPauta/edit' },\r\n roles: [\r\n 'professor',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'pautas_superUser_ReadOnly',\r\n 'pautas_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: '', service: 'pautas' },\r\n component: EditGrades,\r\n },\r\n {\r\n exact: true,\r\n key: 'gradeDetails',\r\n name: 'gradeDetails',\r\n childOf: 'gradesManagement',\r\n hideFromSidebar: true,\r\n disabled: false,\r\n path: { pt: '/pautas/:codigoPauta/detalhes/', en: '/grades/:codigoPauta/details/' },\r\n roles: [\r\n 'professor',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'pautas_superUser_ReadOnly',\r\n 'pautas_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: '', service: 'pautas' },\r\n component: GradesDetails,\r\n },\r\n {\r\n exact: true,\r\n key: 'gradeHistory',\r\n name: 'gradeHistory',\r\n childOf: 'gradesManagement',\r\n hideFromSidebar: true,\r\n disabled: false,\r\n path: { pt: '/pautas/:codigoPauta/historico', en: '/grades/:codigoPauta/history' },\r\n roles: [\r\n 'professor',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'pautas_superUser_ReadOnly',\r\n 'pautas_superUser_FullAccess',\r\n ],\r\n groups: ['frontoffice'],\r\n module: { name: '', service: 'pautas' },\r\n component: GradesHistory,\r\n },\r\n {\r\n exact: true,\r\n key: 'pautasHelp',\r\n name: 'pautasHelp',\r\n childOf: 'pautas',\r\n hideFromSidebar: false,\r\n path: { pt: '/pautas-ajuda/', en: '/grades-help/' },\r\n groups: ['frontoffice'],\r\n roles: [\r\n 'professor',\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'pautas_superUser_ReadOnly',\r\n 'pautas_superUser_FullAccess',\r\n ],\r\n component: (props) => ,\r\n module: { name: '', service: 'pautas' },\r\n },\r\n {\r\n exact: true,\r\n key: 'logsGeneral',\r\n name: 'logsGeneral',\r\n detached: false,\r\n disabled: false,\r\n hideFromSidebar: false,\r\n path: { pt: '/accessos-geral', en: '/logs-general' },\r\n groups: ['frontoffice'],\r\n roles: [\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'sec_superUser_ReadOnly',\r\n 'sec_superUser_FullAccess',\r\n ],\r\n module: { name: 'logs', service: '' },\r\n component: Logs,\r\n },\r\n {\r\n exact: true,\r\n key: 'logsStudent',\r\n name: 'logsStudent',\r\n detached: false,\r\n disabled: false,\r\n hideFromSidebar: false,\r\n path: { pt: '/accessos-estudante', en: '/logs-student' },\r\n groups: ['frontoffice'],\r\n roles: [\r\n 'superUser_FullAccess',\r\n 'superUser_ReadOnly',\r\n 'exStudent',\r\n 'student',\r\n ],\r\n module: { name: 'logs', service: '' },\r\n component: LogsStudent,\r\n },\r\n];\r\n\r\nexport default Routes;\r\n","import config from 'config';\r\n\r\nconst API_SCHEDULES = config.API_WSO2 + config.API_SCHEDULES_PATH;\r\n//const API_SCHEDULES = config.API_BASE_URL + config.API_SCHEDULES_PATH_DIRECT;\r\n//const API_SCHEDULES_DIRECT = config.API_BASE_URL + config.API_SCHEDULES_PATH_DIRECT;\r\n\r\nconst API_SEC_VIRTUAL = config.API_WSO2 + config.API_SEC_VIRTUAL_PATH;\r\n\r\nconst API_TRANSLATIONS = config.API_BASE_URL + config.API_TRANSLATIONS_PATH;\r\nconst API_STUDENT = (config.INTERNAL_API_BASE_URL ?? config.API_BASE_URL) + config.API_STUDENT;\r\nconst API_SEARCH = config.API_BASE_URL + config.API_SEARCH;\r\n\r\nconst API_PAUTAS_GRADES_MANAGEMENT = config.API_WSO2 + config.API_PAUTAS_PATH + 'grades-management';\r\nconst API_PAUTAS_GRADES_SIGNATURE = config.API_WSO2 + config.API_PAUTAS_PATH + 'grades-signature';\r\n\r\nexport default {\r\n signin: {\r\n superUser: `${API_STUDENT}rcu/gfuserbymailpaco2`,\r\n rcuGroups: `${API_STUDENT}rcu/gfuserbymailpaco2`,\r\n token: config.API_WSO2 + 'token',\r\n refresh: config.API_WSO2 + 'refresh',\r\n login: `${API_STUDENT}login`,\r\n },\r\n st: {\r\n translations: API_TRANSLATIONS + 'translations/?markdown=false',\r\n markdown: API_TRANSLATIONS + 'translations/?markdown=true',\r\n },\r\n student: {\r\n registration: `${API_STUDENT}students/registrations/`,\r\n },\r\n search: {\r\n functionalities: `${API_SEARCH}functionalities/`,\r\n functionalitiesSearch: `${API_SEARCH}functionalities/search`,\r\n functionalitiesHelp: `${API_SEARCH}functionalities/help`,\r\n },\r\n sgh: {\r\n allStudentRegistrations: `${API_SCHEDULES}Students/`,\r\n schedule: `${API_SCHEDULES}Schedule/`,\r\n studentSchedules: `${API_SCHEDULES}Schedules/`,\r\n freeOptions: `${API_SCHEDULES}FreeOptionsList/`,\r\n studentFreeOptions: `${API_SCHEDULES}FreeOptions/`,\r\n studentAccess: `${API_SCHEDULES}Phase/`,\r\n studentUcs: `${API_SCHEDULES}Ucs/`,\r\n studentSeriation: `${API_SCHEDULES}Students/`,\r\n phases: `${API_SCHEDULES}Phases/`,\r\n history: `${API_SCHEDULES}History/`,\r\n historyDetails: `${API_SCHEDULES}Seriation`,\r\n login: `${API_SCHEDULES}Login`,\r\n },\r\n secVirtual: {\r\n postCertAccessCodeWithRecaptcha: `${API_SEC_VIRTUAL}recaptcha`,\r\n allStudentRegistrations: `${API_SEC_VIRTUAL}registrations/`,\r\n studentCurricularPlan: `${API_SEC_VIRTUAL}curricular-plan/`,\r\n studentRegistrationSummary: `${API_SEC_VIRTUAL}curricular-plan/summary`,\r\n studentExtraCurricularUcs: `${API_SEC_VIRTUAL}curricular-plan/extracurricular-ucs/`,\r\n studentMobilityUcs: `${API_SEC_VIRTUAL}curricular-plan/mobility-ucs/`,\r\n studentAccreditedUcs: `${API_SEC_VIRTUAL}curricular-plan/accredited-ucs/`,\r\n studentModuleOptions: (ucCode) => `${API_SEC_VIRTUAL}curricular-plan/options-modules/${ucCode}`,\r\n getCurricularUnitDetails: (ucCode: number) =>\r\n `${API_SEC_VIRTUAL}curricular-plan/${ucCode}/grades`, // '/plano-curricular/:ucCode/notas?registrationId=:regid'\r\n personalDataForms: `${API_SEC_VIRTUAL}personal-data/`,\r\n personalDataPhoneNumber: `${API_SEC_VIRTUAL}personal-data/contacts`,\r\n certificateCodeValidation: (accessKey: string) =>\r\n `${API_SEC_VIRTUAL}requests/certificates/validate?accessKey=${accessKey}`,\r\n studentCardInfo: `${API_SEC_VIRTUAL}personal-data/card/`,\r\n studentPicture: `${API_SEC_VIRTUAL}personal-data/photo/`,\r\n addressForm: `${API_SEC_VIRTUAL}personal-data/address/`,\r\n contactsForm: `${API_SEC_VIRTUAL}personal-data/contacts/`,\r\n registration: (id: number) => `${API_SEC_VIRTUAL}registrations/${id}`,\r\n payments: `${API_SEC_VIRTUAL}payments/`,\r\n unpaidDebits: `${API_SEC_VIRTUAL}payments/unpaid-debits/`,\r\n pendingDebits: `${API_SEC_VIRTUAL}payments/pending-debits/`,\r\n getExamCalendar: `${API_SEC_VIRTUAL}calendar`,\r\n paymentsMbWay: `${API_SEC_VIRTUAL}payments/mb-way-ref`,\r\n paymentsMb: `${API_SEC_VIRTUAL}payments/mb-ref`,\r\n paymentMbInfo: (paymentRequestId: number) =>\r\n `${API_SEC_VIRTUAL}payments/mb-ref/${paymentRequestId}`,\r\n studentSignups: `${API_SEC_VIRTUAL}signups`,\r\n\r\n studentCertificatesList: `${API_SEC_VIRTUAL}requests/certificates/submitted/`,\r\n studentCertificatesDetails: (certificateId: number) =>\r\n `${API_SEC_VIRTUAL}requests/certificates/submitted/${certificateId}`,\r\n getCertificateTypes: `${API_SEC_VIRTUAL}requests/certificates/`,\r\n getCertificateForm: (id: number, registrationId: number) =>\r\n `${API_SEC_VIRTUAL}requests/certificates/${id}?registrationId=${registrationId}`,\r\n postCertificateForm: (registrationId: number) =>\r\n `${API_SEC_VIRTUAL}requests/certificates?registrationId=${registrationId}`,\r\n postCertificateOptions: (registrationId: number) =>\r\n `${API_SEC_VIRTUAL}requests/certificates/cost?registrationId=${registrationId}`,\r\n getCertificateChangeHistory: (certificateId: number, registrationId: number) =>\r\n `${API_SEC_VIRTUAL}requests/certificates/${certificateId}/access-history?registrationId=${registrationId}`,\r\n getStudentCertificateRequests: `${API_SEC_VIRTUAL}requests/certificates/submitted`,\r\n getStudentCertificateRequestsOnMountState: `${API_SEC_VIRTUAL}requests/certificates/onmountstate`,\r\n\r\n getApplicationTypes: API_SEC_VIRTUAL + 'requests/applications/',\r\n getApplicationForm: (id: number) => `${API_SEC_VIRTUAL}requests/applications/${id}`,\r\n postApplicationForm: `${API_SEC_VIRTUAL}requests/applications`,\r\n getStudentApplications: API_SEC_VIRTUAL + 'requests/applications/submitted',\r\n getApplicationDetails: (id: number) =>\r\n `${API_SEC_VIRTUAL}requests/applications/submitted/${id}`,\r\n },\r\n files: {\r\n postFiles: (studentId: number, registrationId: number) =>\r\n `${API_SEC_VIRTUAL}files?studentId=${studentId}®istrationId=${registrationId}`,\r\n getFile: (fileType: string, fileId: string, expires: string, signature: string) =>\r\n `${API_SEC_VIRTUAL}files/${fileType}/${fileId}/?expires=${expires}&signature=${signature}`,\r\n getFileEndpoint: `${API_SEC_VIRTUAL}files/test`,\r\n },\r\n pautas: {\r\n professorGradesInfo: API_PAUTAS_GRADES_MANAGEMENT,\r\n gradesStatistics: `${API_PAUTAS_GRADES_MANAGEMENT}/statistics`,\r\n gradeDetails: (codigoPauta: string) => `${API_PAUTAS_GRADES_MANAGEMENT}/${codigoPauta}`,\r\n gradeHistoryInfo: (codigoPauta: string) =>\r\n `${API_PAUTAS_GRADES_MANAGEMENT}/${codigoPauta}/history-pauta`,\r\n gradeDecryptedInfo: (codigoPauta: string) =>\r\n `${API_PAUTAS_GRADES_MANAGEMENT}/${codigoPauta}/decrypted-pauta`,\r\n saveIntermediateGrade: (codigoPauta: string) =>\r\n `${API_PAUTAS_GRADES_MANAGEMENT}/${codigoPauta}/save-intermediate-pauta`,\r\n submitGrade: (codigoPauta: string) =>\r\n `${API_PAUTAS_GRADES_MANAGEMENT}/${codigoPauta}/submit-pauta`,\r\n uploadGradeFile: (codigoPauta, uniqueIdentifierColumn, gradeColumn, hasHeader, sheetNumber) =>\r\n `${API_PAUTAS_GRADES_MANAGEMENT}/${codigoPauta}/upload-pauta?uniqueIdentifierColumn=${uniqueIdentifierColumn}\r\n &gradeColumn=${gradeColumn}&hasHeader=${hasHeader}&sheetNumber=${sheetNumber}`,\r\n gradePdf: (id: number, signed: boolean) =>\r\n `${API_PAUTAS_GRADES_SIGNATURE}/download-pdf/${id}/${signed}`,\r\n },\r\n};\r\n","import { PayloadAction } from '@reduxjs/toolkit';\r\n\r\nexport const getSelectedOptionKey = (option) => {\r\n let selectedOptionKey = null;\r\n option.ucs.some((uc, key) => {\r\n uc.classSchedule.some((ucClass) => {\r\n if (ucClass.selected) {\r\n selectedOptionKey = key;\r\n }\r\n });\r\n });\r\n\r\n return selectedOptionKey;\r\n};\r\n\r\nexport const findSelectedOptions = (state, action: PayloadAction) => {\r\n return state.options.map((option) => ({\r\n ...option,\r\n selected: option.ucs.reduce((acc: number | null, uc) => {\r\n const selectedIndex = uc.classSchedule.findIndex((classUnit) =>\r\n action.payload.includes(classUnit.classId)\r\n );\r\n\r\n if (selectedIndex >= 0) {\r\n return selectedIndex;\r\n }\r\n return acc;\r\n }, null),\r\n }));\r\n};\r\n\r\nexport const ucSelectedOtherOption = (currentOption, currentClass, options) => {\r\n return options.some((option) => {\r\n if (option.optionId !== currentOption.optionId) {\r\n if (option.selected !== null && option.selected !== undefined) {\r\n if (option.ucs[option.selected].ucId === currentClass.ucId) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n });\r\n};\r\n","/**\r\n * FreeOptionsDropdown container utils\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nexport const getSelectedOptionKey = (option) => {\r\n let selectedOptionKey = null;\r\n option.ucs.some((uc, key) => {\r\n uc.classSchedule.some((ucClass) => {\r\n if (ucClass.selected) {\r\n selectedOptionKey = key;\r\n }\r\n });\r\n });\r\n\r\n return selectedOptionKey;\r\n};\r\n\r\nexport const ucSelectedOtherOption = (currentOption, currentClass, options) => {\r\n return options.some((option) => {\r\n if (option.optionId !== currentOption.optionId) {\r\n if (option.selected !== null && option.selected !== undefined) {\r\n if (option.ucs[option.selected].ucId === currentClass.ucId) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n });\r\n};\r\n","/**\r\n * NewCertificate scene utils\r\n *\r\n * @author Diogo Gugedes \r\n *\r\n */\r\n\r\nimport { IFormPostValues } from './types';\r\n\r\nconst getRequestedCertificateData = (requestCertificateData, formData, radioBtnMappings) => {\r\n let formRequestData = {} as {\r\n exemption: string;\r\n exemptionMotive: string;\r\n exemptionMotiveOther?: string;\r\n schoolYear?: string;\r\n ucs_codes?: any;\r\n };\r\n if (requestCertificateData) {\r\n requestCertificateData.forEach((element) => {\r\n if (formData[element.nameKey] !== null && formData[element.nameKey] !== undefined) {\r\n if (element.type === 'radio_button') {\r\n if (formData[element.nameKey] !== undefined && formData[element.nameKey] !== null) {\r\n const selectedOption = formData[element.nameKey];\r\n\r\n const nameKey = element.nameKey;\r\n\r\n formRequestData[element.nameKey] = radioBtnMappings[nameKey][formData[nameKey]];\r\n }\r\n } else if (element.type === 'dropdown') {\r\n const selectedOption = formData[element.nameKey];\r\n\r\n element.values.forEach((elem) => {\r\n if (elem.valueId === selectedOption) {\r\n formRequestData[element.nameKey] = elem.valueId;\r\n return;\r\n }\r\n });\r\n } else if (element.type === 'checkbox_table') {\r\n let selectedUcCodes = [] as any[];\r\n\r\n formData[element.nameKey].forEach((formTableCheckbox) => {\r\n element.values.forEach((ucRow) => {\r\n if (ucRow.valueId === formTableCheckbox) {\r\n selectedUcCodes.push({\r\n ucCode: ucRow.nameKey.ucCode,\r\n isAvailable:\r\n ucRow.nameKey.isAvailable !== null ? ucRow.nameKey.isAvailable : true,\r\n });\r\n }\r\n });\r\n });\r\n\r\n formRequestData['ucs_codes'] = selectedUcCodes;\r\n } else {\r\n formRequestData[element.nameKey] = formData[element.nameKey];\r\n }\r\n }\r\n });\r\n\r\n return formRequestData;\r\n } else {\r\n return undefined;\r\n }\r\n};\r\n\r\nconst getDetailsData = (detailsData, formData, radioBtnMappings) => {\r\n let formRequestData = {} as {\r\n language: string;\r\n format: string;\r\n pageCounter?: number;\r\n deliveryMethod?: string;\r\n email?: string;\r\n address?: string;\r\n };\r\n\r\n detailsData.forEach((element) => {\r\n if (element.type === 'radio_button') {\r\n if (formData[element.nameKey] !== undefined && formData[element.nameKey] !== null) {\r\n const selectedOption = formData[element.nameKey];\r\n\r\n // const nameKey = element.values[selectedOption].nameKey;\r\n const valueId = element.values[selectedOption].valueId;\r\n // formRequestData[element.nameKey] = nameKey;\r\n\r\n formRequestData[element.nameKey] = radioBtnMappings[element.nameKey]\r\n ? radioBtnMappings[element.nameKey][valueId]\r\n : -1;\r\n }\r\n } else if (element.type === 'dropdown') {\r\n if (formData[element.nameKey] !== undefined && formData[element.nameKey] !== null) {\r\n const selectedOption = formData[element.nameKey];\r\n\r\n formRequestData[element.nameKey] = element.values[selectedOption].nameKey;\r\n }\r\n } else {\r\n formRequestData[element.nameKey] = formData[element.nameKey];\r\n }\r\n });\r\n\r\n return formRequestData;\r\n};\r\n\r\nconst getAdditionalDocumentsData = (documentsData, formData) => {\r\n let formRequestData = { documents: [] } as {\r\n documents: {\r\n name: string;\r\n id: string;\r\n }[];\r\n };\r\n\r\n Object.keys(formData).forEach((elemNamekey) => {\r\n if (\r\n elemNamekey.includes('otherDocument') &&\r\n formData[elemNamekey] !== null &&\r\n formData[elemNamekey] !== undefined\r\n ) {\r\n formRequestData.documents.push({\r\n name: elemNamekey,\r\n id: formData[elemNamekey].id,\r\n });\r\n }\r\n });\r\n\r\n return formRequestData;\r\n};\r\n\r\n/**\r\n * Returns form data for posting to the form submission endpoint\r\n * @param form slice certificateData.form\r\n * @param formValues slice certificateData.formValues\r\n * @param radioBtnMappings\r\n */\r\nexport const getFinalResults = (form, formValues, radioBtnMappings): IFormPostValues | null => {\r\n const { requestedCertificate, details, /*mandatoryDocuments,*/ additionalDocuments } = form;\r\n\r\n const result = {\r\n ...getRequestedCertificateData(requestedCertificate.values, formValues, radioBtnMappings),\r\n ...getDetailsData(details.values, formValues, radioBtnMappings),\r\n ...getAdditionalDocumentsData(additionalDocuments.values, formValues),\r\n } as IFormPostValues;\r\n\r\n if (formValues) {\r\n return result;\r\n } else {\r\n return null;\r\n }\r\n};\r\n","/**\r\n * PageStructure container\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\nimport React, { useContext } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\nimport { Container, Grid } from 'semantic-ui-react';\r\n\r\nimport { AnimatedBackground, LoadingBackgroundWrapper } from '@paco_ua/pacoui';\r\n\r\ninterface IProps {\r\n loading?: boolean;\r\n expanded?: boolean;\r\n headerLeft?: React.ReactNode;\r\n headerRight?: React.ReactNode;\r\n subHeader?: React.ReactNode;\r\n mainContent: React.ReactNode;\r\n secondaryContent?: React.ReactNode;\r\n secondaryContentNonStickyGrow?: boolean;\r\n secondaryContentOffset?: number;\r\n}\r\n\r\nconst PageStructure: React.FC = ({\r\n loading,\r\n expanded,\r\n headerLeft,\r\n headerRight,\r\n subHeader,\r\n mainContent,\r\n secondaryContent,\r\n secondaryContentOffset,\r\n secondaryContentNonStickyGrow,\r\n}) => {\r\n const theme = useContext(ThemeContext);\r\n\r\n return (\r\n \r\n {(headerLeft || headerRight) && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {headerLeft}\r\n \r\n {loading && headerLeft && (\r\n \r\n )}\r\n \r\n\r\n \r\n \r\n {headerRight}\r\n {loading && headerRight && (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n\r\n {subHeader && (\r\n \r\n {subHeader}\r\n {loading && }\r\n \r\n )}\r\n \r\n \r\n )}\r\n\r\n \r\n \r\n \r\n {loading && (\r\n \r\n )}\r\n {mainContent}\r\n \r\n {secondaryContent && (\r\n \r\n \r\n {loading && }\r\n {secondaryContent}\r\n \r\n \r\n )}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default PageStructure;\r\n\r\nconst Wrapper = styled(Container)<{ expanded?: boolean }>`\r\n &&& {\r\n display: flex;\r\n flex-direction: column;\r\n flex-grow: 1;\r\n width: ${({ expanded }) => (expanded ? '1920px' : '1388px')};\r\n ${({ expanded }) => expanded && `padding:0;`}\r\n }\r\n`;\r\n\r\nconst DisplayableWrapper = styled.div<{ hide?: boolean }>`\r\n display: ${({ hide }) => (hide ? 'none' : 'unset')};\r\n height: 100%;\r\n`;\r\n\r\nconst HeaderWrapper = styled.div``;\r\n\r\nconst HeaderLeftWrapper = styled.div`\r\n display: flex;\r\n justify-content: flex-start;\r\n`;\r\n\r\nconst HeaderRightWrapper = styled.div`\r\n display: flex;\r\n justify-content: flex-end;\r\n`;\r\n\r\nconst SubHeaderWrapper = styled(({ maxWidth, ...rest }) => )<{\r\n maxWidth?: boolean;\r\n}>`\r\n &&& {\r\n padding-top: 0 !important;\r\n padding-bottom: 0 !important;\r\n margin-bottom: 14px;\r\n\r\n ${({ maxWidth }) =>\r\n maxWidth &&\r\n `\r\n @media only screen and (max-width: 1919px) and (min-width: 1200px) {\r\n min-width: 1000px !important;\r\n }\r\n `}\r\n }\r\n`;\r\n\r\nconst ContentHeaderWrapperColumn = styled(({ maxWidth, ...rest }) => )<{\r\n maxWidth?: boolean;\r\n}>`\r\n &&& {\r\n padding-bottom: 0 !important;\r\n margin-bottom: ${({ hassubheader }) => (hassubheader ? `8px` : `15px`)};\r\n\r\n ${({ maxWidth }) =>\r\n maxWidth &&\r\n `\r\n @media only screen and (max-width: 1919px) and (min-width: 1200px) {\r\n min-width: 1000px !important;\r\n }\r\n `}\r\n }\r\n`;\r\n\r\nconst HeaderColumnWrapper = styled(Grid.Column)<{ hassubheader: boolean }>`\r\n &&& {\r\n padding-bottom: 0 !important;\r\n margin-bottom: ${({ hassubheader }) => (hassubheader ? `8px` : `15px`)};\r\n }\r\n`;\r\n\r\nconst ContentWrapper = styled.div`\r\n display: flex;\r\n position: relative;\r\n flex-direction: column;\r\n flex: 1;\r\n\r\n > .grid {\r\n padding-top: 40px;\r\n }\r\n`;\r\n\r\nconst SecondaryContentWrapper = styled.div<{ offset?: number; fix?: boolean }>`\r\n position: sticky;\r\n top: 100px;\r\n margin-top: ${({ offset }) => (offset ? `${offset}px` : `0`)};\r\n\r\n ${({ fix }) =>\r\n fix\r\n ? ` \r\n display: flex;\r\n flex-direction: column;\r\n flex-grow: 1;\r\n height: 100%;\r\n\r\n >div{\r\n height: 0;\r\n display: flex;\r\n flex-direction: column;\r\n flex-grow: 1;\r\n }\r\n `\r\n : ``}\r\n`;\r\n\r\nconst ContentWrapperGrid = styled(Grid)`\r\n &&& {\r\n flex-grow: 1;\r\n padding-top: 0;\r\n margin-top: 20px;\r\n\r\n @media only screen and (max-width: 767px) {\r\n &.ui.grid > .column:not(.row) {\r\n padding-left: 0rem !important;\r\n padding-right: 0rem !important;\r\n }\r\n }\r\n }\r\n`;\r\n\r\nconst ContentWrapperColumn = styled(({ maxWidth, ...rest }) => )<{\r\n maxWidth?: boolean;\r\n}>`\r\n &&& {\r\n ${({ maxWidth }) =>\r\n maxWidth &&\r\n `\r\n @media only screen and (max-width: 1919px) and (min-width: 1200px) {\r\n min-width: 1000px !important;\r\n }\r\n `}\r\n }\r\n`;\r\n","/**\r\n * App reducers\r\n * Please write a description\r\n *\r\n * @author Carlos Silva \r\n *\r\n * @format\r\n */\r\n\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\nimport { IRegistration } from 'shared/types';\r\nimport { IRoutes } from 'routes';\r\n\r\nimport { IRole } from 'config';\r\n\r\nexport interface IUser {\r\n name: string;\r\n fullName?: string;\r\n roles: IRole[];\r\n email?: string;\r\n accessToken: string;\r\n refreshToken?: string;\r\n idToken?: string;\r\n tokenType?: string;\r\n registrations?: IRegistration[] | null;\r\n nmec?: number | string;\r\n scopes: string[];\r\n impersonate?: string;\r\n expiresIn?: any;\r\n}\r\n\r\nexport interface ISignin {\r\n code: string;\r\n state?: string;\r\n sessionState?: string;\r\n}\r\n\r\nexport type ITranslation = any;\r\n\r\nconst initialState = {\r\n user: {\r\n name: '',\r\n roles: ['guest'],\r\n accessToken: '',\r\n registrations: [],\r\n scopes: [],\r\n } as IUser,\r\n routingStructure: [] as IRoutes[],\r\n translationsEdit: false,\r\n currentLocale: '',\r\n apiTranslations: [] as any[],\r\n isSidebarOpen: false,\r\n startingApp: true,\r\n};\r\n\r\nexport default createSlice({\r\n name: 'App',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n setRoutingStructure: (state, action: PayloadAction) => {\r\n state.routingStructure = action.payload;\r\n },\r\n setUser: (state, action: PayloadAction) => {\r\n state.user = action.payload;\r\n },\r\n toggleApiTranslationsEdit: () => {},\r\n setTranslationsEdit: (state, action: PayloadAction) => {\r\n state.translationsEdit = action.payload;\r\n },\r\n setApiTranslations: (state, action: PayloadAction) => {\r\n state.apiTranslations = action.payload;\r\n },\r\n updateApiTranslation: (state, action: PayloadAction) => {},\r\n navigateTo: (\r\n state,\r\n action: PayloadAction<{\r\n key: string;\r\n params?: any;\r\n state?: any;\r\n forceRefresh?: boolean;\r\n hash?: string;\r\n }>\r\n ) => {},\r\n navigateBack: () => {},\r\n changeLocale: (state, action: PayloadAction) => {},\r\n setCurrentLocale: (state, action: PayloadAction) => {\r\n state.currentLocale = action.payload;\r\n },\r\n setStartingApp: (state, action: PayloadAction) => {\r\n state.startingApp = action.payload;\r\n },\r\n onFirstSignIn: () => {},\r\n updateUserRole: (state, action: PayloadAction) => {},\r\n toggleSidebar: (state) => {\r\n state.isSidebarOpen = !state.isSidebarOpen;\r\n },\r\n signout: () => {},\r\n impersonateUser: (state, action: PayloadAction) => {},\r\n cleanImpersonateUser: () => {},\r\n },\r\n});\r\n","/**\r\n * App reducers\r\n * Please write a description\r\n *\r\n * @author Carlos Silva \r\n *\r\n * @format\r\n */\r\n\r\nimport { createSlice } from '@reduxjs/toolkit';\r\nimport config from 'config';\r\nconst { ROLES } = config;\r\n\r\ninterface AppToolsStateI {\r\n roles: {\r\n GUEST: string;\r\n };\r\n}\r\n\r\nconst initialState: AppToolsStateI = {\r\n roles: ROLES,\r\n};\r\n\r\nexport default createSlice({\r\n name: 'AppTools',\r\n initialState,\r\n reducers: {},\r\n});\r\n","/**\r\n * LogsStudent scene slice\r\n *\r\n * @author Manuel Gil \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit'\r\n\r\nconst initialState = {\r\n loadingModule: true\r\n}\r\n\r\nexport default createSlice({\r\n name: 'LogsStudent',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n onUnmount: () => {},\r\n setLoadingModule: (state, action: PayloadAction) => {\r\n state.loadingModule = action.payload;\r\n },\r\n }\r\n})","/**\r\n * Logs scene slice\r\n *\r\n * @author Manuel Gil \r\n *\r\n */\r\nimport { PayloadAction, createSlice } from '@reduxjs/toolkit'\r\n\r\nconst initialState = {\r\n loadingModule: true\r\n}\r\n\r\nexport default createSlice({\r\n name: 'Logs',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n onUnmount: () => {},\r\n setLoadingModule: (state, action: PayloadAction) => {\r\n state.loadingModule = action.payload;\r\n },\r\n }\r\n})","/**\r\n * ExamsCalendar scene slice\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\nimport { IDropdownOption } from 'shared/types';\r\n\r\ninterface IEvent {\r\n uuid: string;\r\n id: number;\r\n title: string;\r\n desc: string;\r\n start: Date;\r\n end: Date;\r\n icon: string;\r\n location: string;\r\n}\r\n\r\nconst initialState = {\r\n loadingExamsCalendar: true as boolean,\r\n eventsData: [] as IEvent[],\r\n currentICS: null as any,\r\n filterParams: {\r\n type: '' as string,\r\n search: '' as string,\r\n },\r\n calendarFilterTypes: [] as IDropdownOption[],\r\n calendarCurrentYearMonth: '' as string,\r\n initialCalendarDate: '' as string,\r\n errorStatus: {\r\n errLoadingCalendarData: false,\r\n },\r\n};\r\n\r\nexport default createSlice({\r\n name: 'ExamsCalendar',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n onUnmount: () => {},\r\n getExamCalendar: (state, action: PayloadAction) => {},\r\n getExamCalendarData: (state, action: PayloadAction) => {},\r\n setLoadingExamsCalendar: (state, action: PayloadAction) => {\r\n state.loadingExamsCalendar = action.payload;\r\n },\r\n setEventsData: (state, action: PayloadAction) => {\r\n state.eventsData = action.payload;\r\n },\r\n setCurrentICS: (state, action: PayloadAction) => {\r\n state.currentICS = action.payload;\r\n },\r\n setSearchFilter: (state, action: PayloadAction) => {\r\n state.filterParams.search = action.payload;\r\n },\r\n setTypeFilter: (state, action: PayloadAction) => {\r\n state.filterParams.type = action.payload;\r\n },\r\n setCalendarFilterTypes: (state, action: PayloadAction) => {\r\n state.calendarFilterTypes = action.payload.map((filter, key) => {\r\n return {\r\n key: key,\r\n text: filter.translation,\r\n value: filter.key,\r\n };\r\n });\r\n },\r\n setCalendarCurrentYearMonth: (state, action: PayloadAction) => {\r\n state.calendarCurrentYearMonth = action.payload;\r\n },\r\n setInitialCalendarDate: (state, action: PayloadAction) => {\r\n state.initialCalendarDate = action.payload;\r\n },\r\n setErrorStatus: (state, action: PayloadAction<{ fieldName: string; fieldValue: boolean }>) => {\r\n state.errorStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n setReset: (state) => initialState,\r\n \r\n },\r\n});\r\n","/**\r\n * ApplicationDetails scene slice\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\n\r\ninterface IStatus {\r\n identifier: number;\r\n ref: string | null;\r\n requestDate: string | null;\r\n responseDate: string | null;\r\n response: string;\r\n state: string;\r\n theme: string | null;\r\n type: string | null;\r\n}\r\n\r\ninterface IDetails {\r\n studentName: string;\r\n course: string;\r\n category: string;\r\n statement: string;\r\n documents: {\r\n id: string;\r\n name: string;\r\n url: string;\r\n description: string;\r\n }[];\r\n applicationDocument:\r\n | { id: string; nameKey: string; url: string; description: string }\r\n | undefined;\r\n}\r\n\r\nconst initialState = {\r\n status: null as null | IStatus,\r\n details: null as null | IDetails,\r\n loadingStatus: {\r\n loading: true,\r\n },\r\n errorStatus: {\r\n errLoading: false,\r\n },\r\n};\r\n\r\nexport default createSlice({\r\n name: 'ApplicationDetails',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n onUnmount: () => {},\r\n getStatusAndDetails: () => {},\r\n setStatus: (state, action: PayloadAction) => {\r\n state.status = action.payload;\r\n },\r\n setDetails: (state, action: PayloadAction) => {\r\n state.details = action.payload;\r\n },\r\n setLoadingStatus: (\r\n state,\r\n action: PayloadAction<{ fieldName: string; fieldValue: boolean }>\r\n ) => {\r\n state.loadingStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n setErrorStatus: (state, action: PayloadAction<{ fieldName: string; fieldValue: boolean }>) => {\r\n state.errorStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n reset: (state) => initialState,\r\n },\r\n});\r\n","/**\r\n * NewApplication scene slice\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\nimport { IApplicationData, IApplicationTypes } from '../types';\r\nimport { IDropdownOption } from 'shared/types';\r\nimport { IParams } from 'api';\r\n\r\nconst initialState = {\r\n currentStep: 1,\r\n applicationTypeId: -1,\r\n applicationData: {\r\n registrationId: null,\r\n type: {\r\n theme: null,\r\n id: null,\r\n name: null,\r\n },\r\n form: null,\r\n formValues: null,\r\n } as IApplicationData,\r\n applicationTypes: {\r\n data: {} as IApplicationTypes,\r\n filters: [] as IDropdownOption[],\r\n },\r\n applicationTypePagination: {\r\n limit: null as null | number,\r\n offset: null as null | number,\r\n totalPages: null as null | number,\r\n totalRecords: null as null | number,\r\n },\r\n filterParams: {\r\n type: '' as string,\r\n search: '' as string,\r\n },\r\n numAdditionalDocs: 1,\r\n loadingStatus: {\r\n loading: true,\r\n tabLoading: true,\r\n },\r\n errorStatus: {\r\n errLoading: false,\r\n errNoApplications: false,\r\n errLoadingApplicationList: false,\r\n errLoadingApplicationForm: false,\r\n errSubmittingForm: false,\r\n },\r\n};\r\n\r\nexport default createSlice({\r\n name: 'NewApplication',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n onUnmount: () => {},\r\n setCurrentStep: (state, action: PayloadAction) => {\r\n state.currentStep = action.payload;\r\n },\r\n setApplicationData: (state, action: PayloadAction) => {\r\n state.applicationData = action.payload;\r\n },\r\n getApplicationTypes: (state, action?: PayloadAction) => {},\r\n setApplicationTypes: (state, action: PayloadAction) => {\r\n state.applicationTypes = {\r\n data: action.payload.data,\r\n filters: action.payload.filters.map((filter, key) => ({\r\n key: key,\r\n text: filter,\r\n value: filter,\r\n })),\r\n };\r\n },\r\n setActiveRegistration: () => {},\r\n setApplicationTypeId: (state, action: PayloadAction) => {\r\n state.applicationTypeId = action.payload;\r\n },\r\n getApplicationForm: () => {},\r\n submitApplication: () => {},\r\n setSearchFilter: (state, action: PayloadAction) => {\r\n state.filterParams.search = action.payload;\r\n },\r\n setTypeFilter: (state, action: PayloadAction) => {\r\n state.filterParams.type = action.payload;\r\n },\r\n setFormSchema: (state, action: PayloadAction) => {\r\n state.applicationData.form = action.payload;\r\n },\r\n setNumAdditionalDocs: (state, action: PayloadAction) => {\r\n state.numAdditionalDocs = action.payload;\r\n },\r\n addAdditionalDoc: (state) => {\r\n state.numAdditionalDocs += 1;\r\n },\r\n remAdditionalDoc: (state) => {\r\n state.numAdditionalDocs -= 1;\r\n },\r\n resetAdditionDocs: (state) => {\r\n state.numAdditionalDocs = initialState.numAdditionalDocs;\r\n },\r\n addDocumentToFormSchema: (state, action: PayloadAction) => {},\r\n removeDocumentFromFormSchema: (state, action: PayloadAction) => {},\r\n resetApplicationSelection: (state) => {\r\n state.applicationData.type = initialState.applicationData.type;\r\n state.applicationData.form = initialState.applicationData.form;\r\n state.applicationData.formValues = initialState.applicationData.formValues;\r\n state.numAdditionalDocs = initialState.numAdditionalDocs;\r\n state.applicationTypes = initialState.applicationTypes;\r\n },\r\n resetStepThree: (state) => {\r\n state.applicationData.form = initialState.applicationData.form;\r\n state.applicationData.formValues = initialState.applicationData.formValues;\r\n state.numAdditionalDocs = initialState.numAdditionalDocs;\r\n },\r\n setLoadingStatus: (\r\n state,\r\n action: PayloadAction<{ fieldName: string; fieldValue: boolean }>\r\n ) => {\r\n state.loadingStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n setErrorStatus: (state, action: PayloadAction<{ fieldName: string; fieldValue: boolean }>) => {\r\n state.errorStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n resetPage: (state) => initialState,\r\n },\r\n});\r\n","/**\r\n * RegistrationDetails scene slice\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\n\r\ninterface IEligibility {\r\n currentYearEctsEarned: number;\r\n currentYearEctsToDo: number;\r\n eligibilityState: number;\r\n totalEctsEarned: number;\r\n totalEctsToDo: number;\r\n numberSignups: number;\r\n graphMinEcts: number;\r\n graphMaxEcts: number;\r\n}\r\n\r\ninterface IHistory {\r\n academicYear: string;\r\n currentYearEctsEarned: number;\r\n currentYearEctsToDo: number;\r\n ectsWaitingApproval: number;\r\n eligibilityState: number;\r\n coefficientType: string;\r\n numberSignups: number;\r\n totalEctsEarned: number;\r\n coefficient: string;\r\n}\r\n\r\ninterface IScholarship {\r\n scholarshipCategory: string;\r\n scholarshipStatus: string;\r\n}\r\n\r\ninterface IRegistrationGeneralInfo {\r\n accessScheme: string;\r\n courseCode: number;\r\n courseName: string;\r\n id: number;\r\n registrationDate: string;\r\n registrationAcademicYear: string;\r\n registrationStatus:\r\n | 'ANULADO'\r\n | 'SUSPENSO (OUTRO)'\r\n | 'TERMINADO'\r\n | 'ACTIVO'\r\n | 'CADUCADO'\r\n | 'SUSPENSO (PROPINAS)';\r\n academicYear: string;\r\n typology: string;\r\n}\r\n\r\nconst initialState = {\r\n loading: true,\r\n eligibility: null as null | IEligibility,\r\n history: [] as IHistory[],\r\n scholarship: null as null | IScholarship,\r\n registrationGeneralInfo: null as null | IRegistrationGeneralInfo,\r\n errorStatus: {\r\n errorRegistrationDetails: false,\r\n },\r\n};\r\n\r\nexport default createSlice({\r\n name: 'RegistrationDetails',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n onUnmount: () => {},\r\n setLoading: (state, action: PayloadAction) => {\r\n state.loading = action.payload;\r\n },\r\n getRegistration: () => {},\r\n setEligibility: (state, action: PayloadAction) => {\r\n state.eligibility = action.payload;\r\n },\r\n setHistory: (state, action: PayloadAction) => {\r\n state.history = action.payload;\r\n },\r\n setScholarship: (state, action: PayloadAction) => {\r\n state.scholarship = action.payload;\r\n },\r\n setRegistrationGeneralInfo: (state, action: PayloadAction) => {\r\n state.registrationGeneralInfo = action.payload;\r\n },\r\n setErrorStatus: (state, action: PayloadAction<{ fieldName: string; fieldValue: boolean }>) => {\r\n state.errorStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n reset: (state) => initialState,\r\n },\r\n});\r\n","/**\r\n * Registration scene slice\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\n\r\nconst initialState = {\r\n loading: true,\r\n errorStatus: {\r\n errLoadingRegistrations: false,\r\n },\r\n};\r\n\r\nexport default createSlice({\r\n name: 'Registrations',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n setLoading: (state, action: PayloadAction) => {\r\n state.loading = action.payload;\r\n },\r\n setErrorStatus: (state, action: PayloadAction<{ fieldName: string; fieldValue: boolean }>) => {\r\n state.errorStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n onUnmount: () => {},\r\n reset: (state) => initialState,\r\n },\r\n});\r\n","/**\r\n * SeriationHistory scene slice\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\n\r\nimport { ISeriationResults } from 'shared/types';\r\n\r\ninterface ICurrentDetails {\r\n currentYear: string;\r\n currentScheduleName: null | string;\r\n allocationProb: null | 'high' | 'low';\r\n seriationDate: null | string;\r\n currentSemester: string;\r\n}\r\n\r\ninterface ICurrentDetailsPayload {\r\n currentYear: string;\r\n currentScheduleName: null | string;\r\n allocationProb: null | 'high' | 'low';\r\n seriationDate: null | string;\r\n seriationId: null | number;\r\n currentSemester: string;\r\n phaseFilterList: string[];\r\n currentPhase: null | number;\r\n finalSeriation: null | boolean;\r\n}\r\n\r\ninterface IGetSeriationPayload {\r\n registrationId: number;\r\n phase?: number;\r\n seriationId?: number;\r\n}\r\n\r\nconst initialState = {\r\n seriationHistoryResults: [] as ISeriationResults[],\r\n currentDetails: {\r\n currentYear: '',\r\n currentScheduleName: null,\r\n allocationProb: null,\r\n seriationDate: null,\r\n currentSemester: '',\r\n existingPhases: [],\r\n } as ICurrentDetails,\r\n currentSelectedPhase: null as null | number,\r\n seriationId: null as null | number,\r\n finalSeriation: null as null | boolean,\r\n loading: true,\r\n invalidSchedule: false,\r\n phaseFilterList: [] as string[],\r\n filterParams: {\r\n phase: '' as string,\r\n },\r\n};\r\n\r\nexport default createSlice({\r\n name: 'SeriationHistory',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n onUnmount: () => {},\r\n getSeriationHistoryResults: (state, action: PayloadAction) => {},\r\n setSeriationHistoryResults: (state, action: PayloadAction) => {\r\n state.seriationHistoryResults = action.payload;\r\n },\r\n setLoading: (state, action: PayloadAction) => {\r\n state.loading = action.payload;\r\n },\r\n setCurrentDetails: (state, action: PayloadAction) => {\r\n const {\r\n phaseFilterList,\r\n currentPhase,\r\n seriationId,\r\n finalSeriation,\r\n ...currentDetails\r\n } = action.payload;\r\n state.currentDetails = currentDetails;\r\n state.phaseFilterList = phaseFilterList;\r\n state.currentSelectedPhase = currentPhase;\r\n state.seriationId = seriationId;\r\n state.finalSeriation = finalSeriation;\r\n },\r\n setCurrentSelectedPhase: (state, action: PayloadAction) => {\r\n state.currentSelectedPhase = action.payload;\r\n },\r\n setIsScheduleInvalid: (state, action: PayloadAction) => {\r\n state.invalidSchedule = action.payload;\r\n },\r\n reset: (state) => initialState,\r\n },\r\n});\r\n","/**\r\n * SeriationHistoryDetails scene slice\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\n\r\nconst initialState = {\r\n loading: true,\r\n seriationDate: null as null | string,\r\n ranking: {\r\n rankingNumber: null as null | number,\r\n rankingTotal: null as null | number,\r\n regimen: null as null | string,\r\n totalEcts: null as null | number,\r\n grade: null as null | number,\r\n repeatUcs: null as null | number,\r\n },\r\n log: null as null | string[],\r\n};\r\n\r\nexport default createSlice({\r\n name: 'SeriationHistoryDetails',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n onUnmount: () => {},\r\n setLoading: (state, action: PayloadAction) => {\r\n state.loading = action.payload;\r\n },\r\n setSeriationDate: (state, action: PayloadAction) => {\r\n state.seriationDate = action.payload;\r\n },\r\n setRanking: (state, action: PayloadAction) => {\r\n state.ranking = action.payload;\r\n },\r\n setLog: (state, action: PayloadAction) => {\r\n state.log = action.payload;\r\n },\r\n getSeriationHistoryDetails: () => {},\r\n reset: (state) => initialState,\r\n },\r\n});\r\n","/**\r\n * FreeOptionsDropdown container slice\r\n *\r\n * @author Carlos Silva \r\n *\r\n * @format\r\n */\r\n\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\n\r\n/*interface IFreeOptionsDropdown {\r\n id: number;\r\n name: string;\r\n items: any[];\r\n optionId: number;\r\n selected: boolean;\r\n open: boolean;\r\n}*/\r\n\r\ntype IFreeOptionsDropdown = any;\r\n\r\nconst initialState = {\r\n options: [] as IFreeOptionsDropdown[],\r\n confirmationModalIsOpen: false,\r\n freeOptionsSearchModalIsOpen: { modalOpen: false, option: null } as {\r\n modalOpen: boolean;\r\n option: any | null;\r\n },\r\n optionIndexToRemove: null as null | number[],\r\n optionToRemove: null as null | any,\r\n ucIdToRemove: null as null | number,\r\n};\r\n\r\nexport default createSlice({\r\n name: 'FreeOptionsDropdown',\r\n initialState,\r\n reducers: {\r\n setOptions: (state, action: PayloadAction) => {\r\n state.options = action.payload;\r\n },\r\n setFreeOptions: (\r\n state,\r\n action: PayloadAction<{ ucs: any[]; options: { name: string; id: number }[] }>\r\n ) => {},\r\n setConfirmationModalOpening: (state, action: PayloadAction) => {\r\n state.confirmationModalIsOpen = action.payload;\r\n },\r\n setFreeOptionsSearchModalOpening: (\r\n state,\r\n action: PayloadAction<{ modalOpen: boolean; option: object | null }>\r\n ) => {\r\n state.freeOptionsSearchModalIsOpen = action.payload;\r\n },\r\n // hold option index to remove while waiting for user confirmation\r\n setOptionIndexToRemove: (state, action: PayloadAction) => {\r\n state.optionIndexToRemove = action.payload;\r\n },\r\n // hold item index to remove while waiting for user confirmation\r\n setOptionToRemove: (state, action: PayloadAction) => {\r\n state.optionToRemove = action.payload;\r\n },\r\n // hold UC id to remove while waiting for user confirmation\r\n setUcIdToRemove: (state, action: PayloadAction) => {\r\n state.ucIdToRemove = action.payload;\r\n },\r\n },\r\n});\r\n","/**\r\n * StudentRegistrationDropdown container slice\r\n *\r\n * @author Carlos Silva \r\n *\r\n * @format\r\n */\r\n\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\n\r\nconst initialState = {\r\n registration: null as null | number,\r\n registrationOptions: [] as any,\r\n loadingRegistrations: true as boolean,\r\n};\r\n\r\nexport default createSlice({\r\n name: 'StudentRegistrationDropdown',\r\n initialState,\r\n reducers: {\r\n getRegistrations: (state) => {\r\n //state.registration = null;\r\n },\r\n setLoadingRestriction: (state, action: PayloadAction) => {\r\n state.loadingRegistrations = action.payload;\r\n },\r\n setRegistration: (state, action: PayloadAction) => {\r\n state.registration = action.payload;\r\n },\r\n },\r\n});\r\n","/**\r\n * ApplicationsList scene slice\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\nimport { IDropdownOption } from 'shared/types';\r\n\r\nimport { IParams } from 'api';\r\n\r\ninterface IStudentApplications {\r\n id: number;\r\n category: string;\r\n description: string;\r\n requestDate: string;\r\n responseDate: string;\r\n status: string;\r\n reference: string\r\n}\r\n\r\nconst initialState = {\r\n studentApplications: [] as IStudentApplications[],\r\n applicationFilters: [] as IDropdownOption[],\r\n filterParams: {\r\n type: '' as string,\r\n search: '' as string,\r\n },\r\n loadingStatus: {\r\n loading: true,\r\n loadingList: true,\r\n },\r\n errorStatus: {\r\n errLoading: false,\r\n errLoadingList: false,\r\n },\r\n};\r\n\r\nexport default createSlice({\r\n name: 'ApplicationsList',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n onUnmount: () => {},\r\n setReset: (state) => initialState,\r\n getStudentApplications: (state, action?: PayloadAction) => {},\r\n setStudentApplications: (state, action: PayloadAction) => {\r\n state.studentApplications = action.payload;\r\n },\r\n setApplicationFilters: (state, action: PayloadAction) => {\r\n state.applicationFilters = action.payload.map((filter, key) => {\r\n return {\r\n key: key,\r\n text: filter,\r\n value: filter,\r\n };\r\n });\r\n },\r\n setSearchFilter: (state, action: PayloadAction) => {\r\n state.filterParams.search = action.payload;\r\n },\r\n setTypeFilter: (state, action: PayloadAction) => {\r\n state.filterParams.type = action.payload;\r\n },\r\n setLoadingStatus: (\r\n state,\r\n action: PayloadAction<{ fieldName: string; fieldValue: boolean }>\r\n ) => {\r\n state.loadingStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n setErrorStatus: (state, action: PayloadAction<{ fieldName: string; fieldValue: boolean }>) => {\r\n state.errorStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n reset: (state) => initialState,\r\n },\r\n});\r\n","/**\r\n * Payments scene slice\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport _ from 'lodash';\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\n\r\nimport { IDebitData, IPaymentData, IInitialState, ICallParams } from '../types';\r\nimport { DEFAULT_PAYMENTS, DEFAULT_DEBITS, DEFAULT_PENDING_DEBITS } from '../utils';\r\n\r\nimport { IWEBSOCKET_PAYLOAD } from 'scenes/VirtualSecretary/Payments/types';\r\n\r\nconst initialState: IInitialState = {\r\n debits: _.cloneDeep(DEFAULT_DEBITS), // debits list for the PendingDebitsPayment page -> allows for the pre selection of debits (before the payment steps)\r\n preSelectedDebits: [], // list of the pre selected debits\r\n selectedDebits: [], // pre seleted + debits selected on the \"Other Debits\" table\r\n payments: _.cloneDeep(DEFAULT_PAYMENTS), // payments already paid\r\n pendingDebits: _.cloneDeep(DEFAULT_PENDING_DEBITS),\r\n\r\n // resettable onUnmount\r\n multiSelectionModal: false, // \"Other debits\" toggle state on the first tab\r\n // debits table filter params\r\n filterParams: {\r\n type: '',\r\n search: '',\r\n },\r\n debitsFilterTypes: [],\r\n isMbInfoModalOpened: false,\r\n consultedMbPaymentInfo: null,\r\n loadingStatus: {\r\n loading: true,\r\n mbInfoModalLoading: true,\r\n loadingDebitsTable: true,\r\n loadingPendingDebitsTable: true,\r\n loadingPaymentsTable: true,\r\n },\r\n errorStatus: {\r\n errorLoadingMbInfo: false,\r\n errorLoadingDebitsTable: false,\r\n errorLoadingPendingDebitsTable: false,\r\n errorLoadingPaymentsTable: false,\r\n },\r\n isSocketActivated: false,\r\n isCancelPaymentsModalOpened: {\r\n id: -1,\r\n status: false,\r\n },\r\n};\r\n\r\ninterface IPaymentsPayload {\r\n data: IPaymentData[];\r\n totalRecords: number;\r\n}\r\n\r\ninterface IDebitsPayload {\r\n data: IDebitData[];\r\n totalRecords: number;\r\n}\r\n\r\nexport default createSlice({\r\n name: 'Payments',\r\n initialState,\r\n reducers: {\r\n onMount: (state, action: PayloadAction) => {},\r\n onUnmount: () => {},\r\n fetchData: () => {},\r\n fetchDebits: (state, action: PayloadAction) => {\r\n state.debits.loading = true;\r\n },\r\n fetchPayments: (state, action: PayloadAction) => {\r\n state.payments.loading = true;\r\n },\r\n fetchPendingDebits: (state) => {\r\n state.pendingDebits.loading = true;\r\n },\r\n setIsCancelPaymentsModalOpened: (\r\n state,\r\n action: PayloadAction<{ id: number; status: boolean }>\r\n ) => {\r\n state.isCancelPaymentsModalOpened = action.payload;\r\n },\r\n setPayments: (state, action: PayloadAction) => {\r\n state.payments.data = action.payload.data;\r\n state.payments.total = action.payload.totalRecords;\r\n state.payments.loading = false;\r\n },\r\n setDebit: (state, action: PayloadAction) => {\r\n state.debits.data = action.payload.data;\r\n state.debits.total = action.payload.totalRecords;\r\n state.debits.loading = false;\r\n },\r\n setPendingDebits: (state, action: PayloadAction) => {\r\n state.pendingDebits.data = action.payload;\r\n state.pendingDebits.loading = false;\r\n },\r\n resetDebitsList: (state) => {\r\n state.debits = initialState.debits;\r\n },\r\n setIsMbInfoModalOpened: (state, action: PayloadAction) => {\r\n state.isMbInfoModalOpened = action.payload;\r\n },\r\n setConsultedMbPaymentInfo: (state, action: PayloadAction) => {\r\n state.consultedMbPaymentInfo = action.payload;\r\n },\r\n setSelectedDebits: (state, action: PayloadAction) => {\r\n state.selectedDebits = action.payload;\r\n },\r\n setPreSelectedDebits: (state, action: PayloadAction) => {\r\n state.preSelectedDebits = action.payload;\r\n },\r\n fetchMbPaymentDetails: (state, action: PayloadAction) => {},\r\n setDebitsFilterTypes: (state, action: PayloadAction) => {\r\n state.debitsFilterTypes = action.payload.map((filter, key) => ({\r\n key: key,\r\n text: filter,\r\n value: filter,\r\n }));\r\n },\r\n setSearchFilter: (state, action: PayloadAction) => {\r\n state.filterParams.search = action.payload;\r\n },\r\n setTypeFilter: (state, action: PayloadAction) => {\r\n state.filterParams.type = action.payload;\r\n },\r\n setIsSocketActivated: (state, action: PayloadAction) => {\r\n state.isSocketActivated = action.payload;\r\n },\r\n onPaymentNotification: (state, action: PayloadAction) => {},\r\n handleWebsocketMessages: () => {},\r\n handleWebsocketConnection: () => {},\r\n deleteDebit: (state, action: PayloadAction) => {},\r\n setLoadingStatus: (\r\n state,\r\n action: PayloadAction<{ fieldName: string; fieldValue: boolean }>\r\n ) => {\r\n state.loadingStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n setErrorStatus: (state, action: PayloadAction<{ fieldName: string; fieldValue: boolean }>) => {\r\n state.errorStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n resetResettableStates: (state) => {\r\n state.multiSelectionModal = initialState.multiSelectionModal;\r\n state.filterParams = initialState.filterParams;\r\n state.debitsFilterTypes = initialState.debitsFilterTypes;\r\n state.isMbInfoModalOpened = initialState.isMbInfoModalOpened;\r\n state.consultedMbPaymentInfo = initialState.consultedMbPaymentInfo;\r\n state.loadingStatus = initialState.loadingStatus;\r\n state.errorStatus = initialState.errorStatus;\r\n state.isSocketActivated = initialState.isSocketActivated;\r\n state.isCancelPaymentsModalOpened = initialState.isCancelPaymentsModalOpened;\r\n },\r\n reset: (state) => initialState,\r\n },\r\n});\r\n","/**\r\n * PendingDebitsPayment slice\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\nimport { IDropdownOption } from 'shared/types';\r\nimport { ICallParams, IDebitData } from '../../types';\r\nimport { IMbwayResponse } from '../types';\r\n\r\nconst initialState = {\r\n currentStep: 1,\r\n showMorePayments: false,\r\n paymentMethod: undefined as string | undefined,\r\n mbwayForm: {\r\n countryDropdown: {\r\n input: '',\r\n countryValue: 'pt',\r\n },\r\n },\r\n // other debits table filters (SelectDetails step)\r\n filterParams: {\r\n type: '' as string,\r\n search: '' as string,\r\n },\r\n debitsFilterTypes: [] as IDropdownOption[],\r\n debitsSubmissionCompleted: false,\r\n mbwayResponse: {} as IMbwayResponse | undefined,\r\n allowMbwayPayment: true as boolean,\r\n loadingStatus: {\r\n loading: true,\r\n loadingPaymentsTable: true,\r\n },\r\n errorStatus: {\r\n errLoadingPhoneNumber: false,\r\n errLoadingPendingDebits: false,\r\n errLoadingDebits: false,\r\n },\r\n};\r\n\r\nexport default createSlice({\r\n name: 'PendingDebitsPayment',\r\n initialState,\r\n reducers: {\r\n onMount: (state, action: PayloadAction) => {},\r\n onUnmount: () => {},\r\n fetchDebits: (state, action: PayloadAction) => {\r\n state.loadingStatus.loadingPaymentsTable = true;\r\n },\r\n setShowMorePayments: (state, action: PayloadAction) => {\r\n state.showMorePayments = action.payload;\r\n },\r\n setCurrentStep: (state, action: PayloadAction) => {\r\n state.currentStep = action.payload;\r\n },\r\n setAllowMbwayPayment: (state, action: PayloadAction) => {\r\n state.allowMbwayPayment = action.payload;\r\n },\r\n setDebitsSubmissionCompleted: (state, action: PayloadAction) => {\r\n state.debitsSubmissionCompleted = action.payload;\r\n },\r\n setPaymentMethod: (state, action: PayloadAction) => {\r\n state.paymentMethod = action.payload;\r\n },\r\n submitMbwayDebitsRequest: (state, action: PayloadAction) => {},\r\n setMbwayResponse: (state, action: PayloadAction) => {\r\n state.mbwayResponse = action.payload;\r\n },\r\n setMbwayForm: (state, action: PayloadAction) => {\r\n state.mbwayForm = action.payload;\r\n },\r\n fetchPhoneNumber: () => {},\r\n fetchPendingDebits: () => {},\r\n submitMbDebitsRequest: (state, action: PayloadAction) => {},\r\n setDebitsFilterTypes: (state, action: PayloadAction) => {\r\n state.debitsFilterTypes = action.payload.map((filter, key) => ({\r\n key: key,\r\n text: filter,\r\n value: filter,\r\n }));\r\n },\r\n setSearchFilter: (state, action: PayloadAction) => {\r\n state.filterParams.search = action.payload;\r\n },\r\n setTypeFilter: (state, action: PayloadAction) => {\r\n state.filterParams.type = action.payload;\r\n },\r\n setLoadingStatus: (\r\n state,\r\n action: PayloadAction<{ fieldName: string; fieldValue: boolean }>\r\n ) => {\r\n state.loadingStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n setErrorStatus: (state, action: PayloadAction<{ fieldName: string; fieldValue: boolean }>) => {\r\n state.errorStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n resetPendingDebits: (state) => initialState,\r\n },\r\n});\r\n","/**\r\n * Grades scene slice\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\nimport { createSlice } from '@reduxjs/toolkit';\r\n\r\nconst initialState = {};\r\n\r\nexport default createSlice({\r\n name: 'Grades',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n onUnmount: () => {},\r\n },\r\n});\r\n","/**\r\n * AssessmentChoice scene slice\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\nimport { createSlice } from '@reduxjs/toolkit';\r\n\r\nconst initialState = {};\r\n\r\nexport default createSlice({\r\n name: 'AssessmentChoice',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n onUnmount: () => {},\r\n },\r\n});\r\n","/**\r\n * ExamRegistration scene slice\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\nimport { createSlice } from '@reduxjs/toolkit';\r\n\r\nconst initialState = {};\r\n\r\nexport default createSlice({\r\n name: 'ExamRegistration',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n onUnmount: () => {},\r\n },\r\n});\r\n","/**\r\n * SubscriptionRenewal scene slice\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\nimport { createSlice } from '@reduxjs/toolkit';\r\n\r\nconst initialState = {};\r\n\r\nexport default createSlice({\r\n name: 'SubscriptionRenewal',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n onUnmount: () => {},\r\n },\r\n});\r\n","/**\r\n * ClassSupoort scene slice\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\nimport { createSlice } from '@reduxjs/toolkit';\r\n\r\nconst initialState = {};\r\n\r\nexport default createSlice({\r\n name: 'ClassSupoort',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n onUnmount: () => {},\r\n },\r\n});\r\n","/**\r\n * CurricularPlan scene slice\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\nimport { boolean } from 'yup/lib/locale';\r\n\r\nimport { Dictionary, ISummary, ICurricularPlan, ICourseUC } from '../types';\r\n\r\nconst initialState = {\r\n summaries: {} as Dictionary, // key: registrationId\r\n curricularPlans: {} as Dictionary, // key: registrationId\r\n defaultDropdownOption: -1,\r\n ucOptionsModal: false,\r\n ucOptions: {\r\n name: '',\r\n courseList: [] as ICourseUC[],\r\n },\r\n loadingStatus: {\r\n loading: true,\r\n loadingModal: false,\r\n },\r\n errorStatus: {\r\n errLoadingSummary: false,\r\n },\r\n};\r\n\r\nexport default createSlice({\r\n name: 'CurricularPlan',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n onUnmount: () => {},\r\n setLoadingStatus: (\r\n state,\r\n action: PayloadAction<{ fieldName: string; fieldValue: boolean }>\r\n ) => {\r\n state.loadingStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n setErrorStatus: (state, action: PayloadAction<{ fieldName: string; fieldValue: boolean }>) => {\r\n state.errorStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n setUcOptionsModal: (state, action: PayloadAction) => {\r\n state.ucOptionsModal = action.payload;\r\n },\r\n getUcOptions: (state, action: PayloadAction<{ name: string; code: number }>) => {},\r\n setUcOptions: (\r\n state,\r\n action: PayloadAction<{\r\n name: string;\r\n courseList: ICourseUC[];\r\n }>\r\n ) => {\r\n state.ucOptions = action.payload;\r\n },\r\n setDefaultDropdownOption: (state, action: PayloadAction) => {\r\n state.defaultDropdownOption = action.payload;\r\n },\r\n getCurricularPlan: () => {},\r\n addCurricularPlanSummary: (state, action: PayloadAction) => {\r\n state.summaries[action.payload['registrationId']] = {\r\n grade: action.payload['grade'],\r\n summary: action.payload['summary'],\r\n };\r\n },\r\n addCurricularPlan: (state, action: PayloadAction) => {\r\n state.curricularPlans[action.payload['registrationId']] = action.payload['curricularPlan'];\r\n },\r\n reset: (state) => initialState,\r\n },\r\n});\r\n","/**\r\n * CurricularUnitDetails slice\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\n\r\nconst initialState = {\r\n loading: true,\r\n selectedUcCode: null as null | number,\r\n ucDetails: {} as any,\r\n errorStatus: {\r\n errLoadingDetails: false,\r\n },\r\n};\r\n\r\nexport default createSlice({\r\n name: 'CurricularUnitDetails',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n onUnmount: () => {},\r\n getUcDetails: (state, action: PayloadAction) => {},\r\n setUcDetails: (state, action: PayloadAction) => {\r\n state.ucDetails = action.payload;\r\n },\r\n setSelectedUcCode: (state, action: PayloadAction) => {\r\n state.selectedUcCode = action.payload;\r\n },\r\n setLoading: (state, action: PayloadAction) => {\r\n state.loading = action.payload;\r\n },\r\n setErrorStatus: (state, action: PayloadAction<{ fieldName: string; fieldValue: boolean }>) => {\r\n state.errorStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n reset: (state) => initialState,\r\n },\r\n});\r\n","/**\r\n * PersonalData scene slice\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\n\r\nimport { updateFormEditingStatus } from '../utils';\r\n\r\ninterface IEditState {\r\n blockKey: string;\r\n editing: boolean;\r\n}\r\ninterface IDataBlock {\r\n description: string;\r\n editing: boolean;\r\n lastUpdated: string;\r\n nameKey: string;\r\n picture: string | null;\r\n showPicture: boolean;\r\n values: IDataBlockField[];\r\n}\r\ninterface IDataBlockField {\r\n nameKey: string;\r\n placeholderKey: string;\r\n type: string;\r\n validationType: string;\r\n validations: IFieldValidation[];\r\n value: string | null;\r\n visible: null;\r\n}\r\ninterface IFieldValidation {\r\n params: [];\r\n type: string;\r\n}\r\ninterface ICardBlock {\r\n fields: {\r\n nameKey: string;\r\n value: string;\r\n }[];\r\n}\r\nexport interface IContactsFields {\r\n type: string;\r\n payload: {\r\n alternativeEmail: string;\r\n // alternativePhoneNumber: {\r\n // countryValue: string;\r\n // input: string;\r\n // };\r\n primaryPhoneNumber: {\r\n countryValue: string;\r\n input: string;\r\n };\r\n };\r\n}\r\nexport interface IAddressFields {\r\n type: string;\r\n payload: {\r\n homeAddress: string;\r\n homeLocality: string;\r\n homePostalCode: {\r\n countryValue: string;\r\n input: string;\r\n };\r\n };\r\n}\r\n\r\nconst initialState = {\r\n personalDataBlocks: {},\r\n studentCardBlock: {},\r\n loadingStatus: {\r\n loadingPage: true,\r\n loadingAddress: false,\r\n loadingContacts: false,\r\n },\r\n errorStatus: {\r\n errLoadingPersonalData: false,\r\n errLoadingCardData: false,\r\n },\r\n hasRegistrationId: true,\r\n};\r\n\r\nexport default createSlice({\r\n name: 'PersonalData',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n onUnmount: () => {},\r\n setPersonalDataBlocks: (state, action: PayloadAction) => {\r\n state.personalDataBlocks = action.payload;\r\n },\r\n setStudentCardBlock: (state, action: PayloadAction) => {\r\n state.studentCardBlock = action.payload;\r\n },\r\n setPersonalDataFormEditingState: (state, action: PayloadAction) => {\r\n const { blockKey, editing } = action.payload;\r\n\r\n state.personalDataBlocks = updateFormEditingStatus(\r\n state.personalDataBlocks,\r\n blockKey,\r\n editing\r\n );\r\n },\r\n setLoadingStatus: (\r\n state,\r\n action: PayloadAction<{ fieldName: string; fieldValue: boolean }>\r\n ) => {\r\n state.loadingStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n setErrorStatus: (state, action: PayloadAction<{ fieldName: string; fieldValue: boolean }>) => {\r\n state.errorStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n setHasRegistrationId: (state, action: PayloadAction) => {},\r\n patchAddressForm: (state, action: PayloadAction) => {},\r\n patchContactsForm: (state, action: PayloadAction) => {},\r\n resetForm: (state, action: PayloadAction) => {},\r\n reset: (state) => initialState,\r\n },\r\n});\r\n","/**\r\n * Created Schedule container\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\n\r\nimport { IUpdateSchedule } from 'scenes/Schedules/CreatedSchedules/containers/CreatedSchedule/types';\r\n\r\nconst initialState = {\r\n isLoading: false,\r\n};\r\n\r\nexport default createSlice({\r\n name: 'CreatedSchedule',\r\n initialState,\r\n reducers: {\r\n updateSchedule: (state, action: PayloadAction) => {\r\n state.isLoading = true;\r\n },\r\n },\r\n});\r\n","/**\r\n * MySchedules scene slice\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\nimport { IMySchedule, IUc } from 'shared/types';\r\nimport { selectClassesToViewSchedule } from '../utils';\r\n\r\nexport interface IScheduleToDelete {\r\n id: number;\r\n name: string;\r\n}\r\nexport interface ICurrentPhase {\r\n phase: number | null;\r\n year: string | null;\r\n period: string | null;\r\n isFree: boolean | null;\r\n finished: boolean | null;\r\n hasAllocatedSchedule: boolean | null;\r\n attemptedSchedule: boolean | null;\r\n seriationFinished: boolean | null;\r\n}\r\n\r\nconst initialState = {\r\n createdSchedules: {\r\n activePhase: null,\r\n finishedPhases: [],\r\n } as any,\r\n currentPhase: null as ICurrentPhase | null,\r\n scheduleToDelete: null as IScheduleToDelete | null,\r\n loadingSchedules: true,\r\n showHistory: false,\r\n loadingScheduleToView: false,\r\n savingMySchedules: false,\r\n deleteModalOpen: false,\r\n dragEnabled: true,\r\n warningNoAccess: false as boolean,\r\n warningNoAccessMotive: null as string | null,\r\n viewScheduleModalIsOpen: false,\r\n currentActivePhase: null as number | null,\r\n seriationDate: null as string | null,\r\n nextSeriationDate: null as string | null,\r\n lastSeriatedPhase: null as number | null,\r\n ucs: [] as IUc[],\r\n viewScheduleHideFaces: false as boolean,\r\n scheduleGridInterval: { min: '8:00', max: '20:00' } as { min: string; max: string },\r\n};\r\n\r\nexport default createSlice({\r\n name: 'MySchedules',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n reset: (state) => initialState,\r\n getSchedules: (\r\n state,\r\n action: PayloadAction<{ registrationId: number; activateLoading: boolean; data?: any }>\r\n ) => {},\r\n onPhaseUpdate: () => {},\r\n addScheduleToDelete: (state, action: PayloadAction) => {\r\n state.deleteModalOpen = true;\r\n state.scheduleToDelete = action.payload;\r\n },\r\n removeScheduleToDelete: (state) => {\r\n state.scheduleToDelete = null;\r\n },\r\n deleteSchedule: (state, action: PayloadAction) => {},\r\n setDeleteModalOpen: (state, action: PayloadAction) => {\r\n state.deleteModalOpen = action.payload;\r\n },\r\n setCurrentActivePhase: (state, action: PayloadAction) => {\r\n state.currentActivePhase = action.payload;\r\n },\r\n setLastSeriatedPhase: (state, action: PayloadAction) => {\r\n state.lastSeriatedPhase = action.payload;\r\n },\r\n setNextSeriationDate: (state, action: PayloadAction) => {\r\n state.nextSeriationDate = action.payload;\r\n },\r\n setSeriationDate: (state, action: PayloadAction) => {\r\n state.seriationDate = action.payload;\r\n },\r\n updateSchedules: (state, action: PayloadAction) => {},\r\n setSchedules: (state, action: PayloadAction) => {\r\n state.createdSchedules = action.payload;\r\n },\r\n setSavingMySchedules: (state, action: PayloadAction) => {\r\n state.savingMySchedules = action.payload;\r\n },\r\n setLoadingScheduleToView: (state, action: PayloadAction) => {\r\n state.loadingScheduleToView = action.payload;\r\n },\r\n setWarningNoAccess: (state, action: PayloadAction) => {\r\n state.warningNoAccess = action.payload;\r\n },\r\n setWarningNoAccessMotive: (state, action: PayloadAction) => {\r\n state.warningNoAccessMotive = action.payload;\r\n },\r\n setShowHistory: (state, action: PayloadAction) => {\r\n state.showHistory = action.payload;\r\n },\r\n setDragEnabled: (state, action: PayloadAction) => {\r\n state.dragEnabled = action.payload;\r\n },\r\n getScheduleToView: (\r\n state,\r\n action: PayloadAction<{\r\n id: number;\r\n finishedPhase: boolean;\r\n }>\r\n ) => {},\r\n setLoadingSchedules: (state, action: PayloadAction) => {\r\n state.loadingSchedules = action.payload;\r\n },\r\n hideScheduleModalOpening: (state) => {\r\n state.viewScheduleModalIsOpen = false;\r\n },\r\n setScheduleGridInterval: (state, action: PayloadAction<{ min: string; max: string }>) => {\r\n state.scheduleGridInterval = action.payload;\r\n },\r\n showScheduleModalOpening: (state) => {\r\n state.viewScheduleModalIsOpen = true;\r\n },\r\n setUcs: (\r\n state,\r\n action: PayloadAction<{\r\n ucs: IUc[];\r\n hideFaces: boolean;\r\n }>\r\n ) => {\r\n state.ucs = action.payload.ucs;\r\n state.viewScheduleHideFaces = action.payload.hideFaces;\r\n },\r\n selectClassesToViewSchedule: (state, action: PayloadAction) => {\r\n state.ucs = selectClassesToViewSchedule(state.ucs, action);\r\n },\r\n setCurrentPhase: (state, action: PayloadAction) => {\r\n state.currentPhase = action.payload;\r\n },\r\n },\r\n});\r\n","/**\r\n * Mandatory Options Dropdown container\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\n\r\nimport { IUc } from 'shared/types';\r\n\r\nimport { findSelectedOptions } from '../utils';\r\n\r\ninterface IMandatoryOptionsDropdown {\r\n id: number;\r\n name: string;\r\n selected: number | null;\r\n ucs: (IUc & { selected: boolean })[];\r\n optionId: number;\r\n}\r\n\r\nconst initialState = {\r\n options: [] as IMandatoryOptionsDropdown[],\r\n confirmationModalIsOpen: false,\r\n optionIndexToRemove: null as null | number,\r\n ucIdToRemove: null as null | { ucId: number; groupId: number | null },\r\n};\r\n\r\nexport default createSlice({\r\n name: 'MandatoryOptionsDropdown',\r\n initialState,\r\n reducers: {\r\n setMandatoryOptions: (state, action: PayloadAction) => {},\r\n setOptions: (state, action: PayloadAction) => {\r\n state.options = action.payload;\r\n },\r\n setConfirmationModalOpening: (state, action: PayloadAction) => {\r\n state.confirmationModalIsOpen = action.payload;\r\n },\r\n // hold option index to remove while waiting for user confirmation\r\n setOptionIndexToRemove: (state, action: PayloadAction) => {\r\n state.optionIndexToRemove = action.payload;\r\n },\r\n // hold UC id to remove while waiting for user confirmation\r\n setUcIdToRemove: (\r\n state,\r\n action: PayloadAction<{ ucId: number; groupId: number | null } | null>\r\n ) => {\r\n state.ucIdToRemove = action.payload;\r\n },\r\n },\r\n});\r\n","/**\r\n * Toaster container slice\r\n *\r\n * @author Rafael Guedes \r\n *\r\n * @format\r\n */\r\n\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\n\r\ninterface IToast {\r\n title: string;\r\n body?: string;\r\n icon?: 'check' | 'info' | 'error';\r\n type?: 'success' | 'danger' | 'warning' | 'info';\r\n}\r\n\r\nconst initialState = {\r\n showing: false,\r\n toast: {} as IToast,\r\n};\r\n\r\nexport default createSlice({\r\n name: 'Toaster',\r\n initialState,\r\n reducers: {\r\n showToaster: (state, action: PayloadAction) => {\r\n state.showing = true;\r\n state.toast = action.payload;\r\n },\r\n closeToaster: (state) => {\r\n state.showing = false;\r\n },\r\n },\r\n});\r\n","/**\r\n * Toaster container slice\r\n *\r\n * @author Rafael Guedes \r\n *\r\n * @format\r\n */\r\n\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\n\r\ninterface IToast {\r\n title: string;\r\n cancelTitle: string;\r\n buttonTitle: string;\r\n onCancel?: Function;\r\n onAccept?: Function;\r\n}\r\n\r\nconst initialState = {\r\n showing: false,\r\n displayToaster: true,\r\n toast: {} as IToast,\r\n};\r\n\r\nexport default createSlice({\r\n name: 'ToasterAction',\r\n initialState,\r\n reducers: {\r\n showToasterAction: (state, action: PayloadAction) => {\r\n state.showing = true;\r\n state.toast = action.payload;\r\n },\r\n unsetDisplayToasterAction: (state) => {\r\n state.displayToaster = false;\r\n },\r\n closeToasterAction: (state) => {\r\n state.showing = false;\r\n },\r\n },\r\n});\r\n","/**\r\n * Schedules scene slice\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\n\r\nimport {\r\n setClassSelectionState,\r\n setClassLockState,\r\n setClassesProvisorySeriationResult,\r\n clearSchedule,\r\n setReformatedClassesTypologies,\r\n} from '../utils';\r\n\r\nimport {\r\n IUc,\r\n IMySchedule,\r\n ICreatedSchedule,\r\n IClassTypology,\r\n IClassSelectionPayload,\r\n IProvisorySeriationResult,\r\n} from 'shared/types';\r\n\r\nexport interface ICurrentPhase {\r\n phase: number | null;\r\n year: string | null;\r\n period: string | null;\r\n isFree: boolean | null;\r\n finished: boolean | null;\r\n hasAllocatedSchedule: boolean | null;\r\n attemptedSchedule: boolean | null;\r\n seriationFinished: boolean | null;\r\n}\r\n\r\nconst initialState = {\r\n ucs: [] as IUc[],\r\n unfilteredUcs: {} as { mandatoryUcs: IUc[]; allUcs: IUc[] },\r\n mandatoryUcs: [] as IUc[],\r\n freeUcs: [] as IUc[],\r\n freeOptionsGroups: [] as any[],\r\n originalEditingUcs: [] as IUc[],\r\n restricted: null as null | boolean,\r\n restrictionMotive: null as null | string,\r\n currentPhase: null as ICurrentPhase | null,\r\n isCurrentPhaseActive: false as Boolean,\r\n currentMode: null as null | 'view' | 'create' | 'edit' | 'duplicate',\r\n scheduleToEdit: null as null | ICreatedSchedule,\r\n schedulesNumber: 0 as number,\r\n exchangeUcs: [] as IUc[],\r\n studentTotalChoices: 0 as number,\r\n confirmationModalIsOpen: false,\r\n mySchedules: null as null | IMySchedule[],\r\n period: '',\r\n scheduleName: null as string | null,\r\n editScheduleName: false as boolean,\r\n periods: [] as any,\r\n classesTypologies: [] as IClassTypology[],\r\n expandedWeekDay: null as null | number,\r\n scheduleType: 'grid' as 'grid' | 'gridExchange' | 'gridExpanded' | 'list',\r\n loadingRestriction: true,\r\n loadingSchedule: true,\r\n savingSchedule: false,\r\n editingSchedule: false,\r\n disclaimerMobileModalIsOpen: true,\r\n scheduleGridInterval: { min: '8:00', max: '20:00' } as { min: string; max: string },\r\n createdSchedules: null as null | number,\r\n};\r\n\r\nexport default createSlice({\r\n name: 'Schedules',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n reset: (state) => initialState,\r\n onPhaseUpdate: () => {},\r\n getAccessAndUcs: () => {},\r\n setCurrentPhase: (state, action: PayloadAction) => {\r\n state.currentPhase = action.payload;\r\n },\r\n setIsCurrentPhaseActive: (state, action: PayloadAction) => {\r\n state.isCurrentPhaseActive = action.payload;\r\n },\r\n getCurrentMode: () => {},\r\n setCurrentMode: (state, action: PayloadAction<'view' | 'create' | 'edit' | 'duplicate'>) => {\r\n state.currentMode = action.payload;\r\n },\r\n handleScheduleCreateMode: () => {},\r\n handleScheduleEditOrDuplicateMode: () => {},\r\n setScheduleToEdit: (state, action: PayloadAction) => {\r\n state.scheduleToEdit = action.payload;\r\n },\r\n setRestriction: (state, action: PayloadAction) => {\r\n state.restricted = action.payload;\r\n },\r\n setRestrictionMotive: (state, action: PayloadAction) => {\r\n state.restrictionMotive = action.payload;\r\n },\r\n setUcs: (state, action: PayloadAction) => {\r\n state.ucs = action.payload;\r\n },\r\n setUnfilteredUcs: (state, action: PayloadAction<{ mandatoryUcs: IUc[]; allUcs: IUc[] }>) => {\r\n state.unfilteredUcs = action.payload;\r\n },\r\n setCreatedSchedules: (state, action: PayloadAction) => {\r\n state.createdSchedules = action.payload;\r\n },\r\n setMandatoryUcs: (state, action: PayloadAction) => {\r\n state.mandatoryUcs = action.payload;\r\n },\r\n setFreeUcs: (state, action: PayloadAction) => {\r\n state.freeUcs = action.payload;\r\n },\r\n setFreeOptionsGroups: (state, action: PayloadAction) => {\r\n state.freeOptionsGroups = action.payload;\r\n },\r\n setSchedulesNumber: (state, action: PayloadAction) => {\r\n state.schedulesNumber = action.payload;\r\n },\r\n setScheduleGridInterval: (state, action: PayloadAction<{ min: string; max: string }>) => {\r\n state.scheduleGridInterval = action.payload;\r\n },\r\n setClassesTypologies: (state, action: PayloadAction) => {\r\n state.classesTypologies = action.payload;\r\n },\r\n getStudentTotalChoices: (state, action: PayloadAction) => {},\r\n setStudentTotalChoices: (state, action: PayloadAction) => {\r\n state.studentTotalChoices = action.payload;\r\n },\r\n setEditScheduleName: (state, action: PayloadAction) => {\r\n state.editScheduleName = action.payload;\r\n },\r\n setScheduleName: (state, action: PayloadAction) => {\r\n state.scheduleName = action.payload;\r\n },\r\n setMandatoryOptions: (\r\n state,\r\n action: PayloadAction<{ ucId: number; groupId?: number | null }>\r\n ) => {\r\n state.ucs = state.ucs.map((uc) => {\r\n let comparator = uc.ucId === action.payload.ucId;\r\n if (action.payload.groupId !== null && action.payload.groupId !== undefined) {\r\n comparator = uc.ucId === action.payload.ucId && uc.groupId === action.payload.groupId;\r\n }\r\n return comparator\r\n ? {\r\n ...uc,\r\n classSchedule: uc.classSchedule.map((classItem) => ({\r\n ...classItem,\r\n filtered: false,\r\n })),\r\n }\r\n : uc;\r\n });\r\n },\r\n removeMandatoryOptions: (\r\n state,\r\n action: PayloadAction<{ ucId: number; groupId: number | null }>\r\n ) => {\r\n state.ucs = state.ucs.map((uc) =>\r\n uc.ucId !== action.payload.ucId && uc.groupId !== action.payload.groupId\r\n ? uc\r\n : {\r\n ...uc,\r\n classSchedule: uc.classSchedule.map((classItem) => ({\r\n ...classItem,\r\n filtered: true,\r\n selected: false,\r\n })),\r\n }\r\n );\r\n },\r\n setFreeOptions: (state, action: PayloadAction<{ ucItem: any }>) => {\r\n const newUcs = [...state.ucs, action.payload.ucItem];\r\n state.ucs = newUcs;\r\n state.classesTypologies = setReformatedClassesTypologies(newUcs);\r\n state.freeUcs = [...state.freeUcs, action.payload.ucItem];\r\n },\r\n removeFreeOptions: (state, action: PayloadAction) => {\r\n state.ucs = state.ucs.reduce((acc: any, uc) => {\r\n if (uc.ucId !== action.payload) {\r\n acc.push(uc);\r\n }\r\n return acc;\r\n }, [] as any);\r\n\r\n state.freeUcs = state.freeUcs.reduce((acc: any, uc) => {\r\n if (uc.ucId !== action.payload) {\r\n acc.push(uc);\r\n }\r\n return acc;\r\n }, [] as any);\r\n },\r\n setPeriods: (state, action: PayloadAction<[]>) => {\r\n state.periods = action.payload;\r\n },\r\n setPeriod: (state, action: PayloadAction) => {\r\n state.period = action.payload;\r\n },\r\n getMySchedules: () => {},\r\n setExpandedWeekDay: (state, action: PayloadAction) => {\r\n state.expandedWeekDay = action.payload;\r\n },\r\n setScheduleType: (\r\n state,\r\n action: PayloadAction<'grid' | 'gridExchange' | 'gridExpanded' | 'list'>\r\n ) => {\r\n state.scheduleType = action.payload;\r\n },\r\n setDisclaimerMobileModalIsOpen: (state, action: PayloadAction) => {\r\n state.disclaimerMobileModalIsOpen = action.payload;\r\n },\r\n setClassSelectionState: (state, action: PayloadAction) => {\r\n state.ucs = setClassSelectionState(state.ucs, action);\r\n },\r\n setClassLockState: (state, action: PayloadAction) => {\r\n state.ucs = setClassLockState(state.ucs, action);\r\n },\r\n handleConfirmationModalOpening: (state, action: PayloadAction) => {\r\n state.confirmationModalIsOpen = action.payload;\r\n },\r\n selectClassesToEditSchedule: (\r\n state,\r\n action: PayloadAction<{ classesId: number[]; freeUcs: IUc[] }>\r\n ) => {\r\n /*\r\n //we need to append freeUcs to ucs on edit because there is no other way to find them out\r\n const newUcs = [\r\n ...selectClassesToEditSchedule(state.ucs, action.payload.classesId),\r\n ...action.payload.freeUcs,\r\n ];\r\n state.ucs = newUcs;\r\n state.mandatoryUcs = setScheduleSelectedMandatoryClasses(\r\n state.mandatoryUcs,\r\n action.payload.classesId\r\n );\r\n state.freeUcs = action.payload.freeUcs;*/\r\n state.originalEditingUcs = [...action.payload.freeUcs];\r\n },\r\n editSchedule: (state, action: PayloadAction) => {},\r\n submitSchedule: () => {},\r\n clearSchedule: (state) => {\r\n state.ucs = clearSchedule(state.ucs);\r\n },\r\n setClassesProvisorySeriationResult: (\r\n state,\r\n action: PayloadAction<{ ucs: IUc[]; seriationResult: IProvisorySeriationResult[] }>\r\n ) => {\r\n const { ucs, seriationResult } = action.payload;\r\n state.ucs = setClassesProvisorySeriationResult(ucs, seriationResult);\r\n },\r\n setLoadingRestriction: (state, action: PayloadAction) => {\r\n state.loadingRestriction = action.payload;\r\n },\r\n setLoadingSchedule: (state, action: PayloadAction) => {\r\n state.loadingSchedule = action.payload;\r\n },\r\n setSavingSchedule: (state, action: PayloadAction) => {\r\n state.savingSchedule = action.payload;\r\n },\r\n setEditingSchedule: (state, action: PayloadAction) => {\r\n state.editingSchedule = action.payload;\r\n },\r\n deleteSchedule: (state, action: PayloadAction) => {},\r\n },\r\n});\r\n","/**\r\n * FreeSlotsList scene slice\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\n\r\nconst initialState = {\r\n year: null as string | null,\r\n semester: null as string | null,\r\n loading: true as boolean,\r\n error: false as boolean,\r\n};\r\n\r\nexport default createSlice({\r\n name: 'FreeOptionsList',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n onUnmount: () => {},\r\n setLoading: (state, action: PayloadAction) => {\r\n state.loading = action.payload;\r\n },\r\n setError: (state, action: PayloadAction) => {\r\n state.error = action.payload;\r\n },\r\n setPeriod: (state, action: PayloadAction<{ year: string; semester: string }>) => {\r\n state.year = action.payload.year;\r\n state.semester = action.payload.semester;\r\n },\r\n reset: () => initialState,\r\n },\r\n});\r\n","/**\r\n * FreeOptionsTable container slice\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\nimport { IDropdownOption } from 'shared/types';\r\nimport {\r\n IFreeOption,\r\n IPaginationInfo,\r\n IFreeOptionsPayload,\r\n ICallParams,\r\n IRegistration,\r\n DEFAULT_PAGINATION_PARAMS,\r\n} from '../types';\r\n\r\nconst initialState = {\r\n freeOptionsList: [] as IFreeOption[],\r\n freeOptionsPage: {\r\n limit: DEFAULT_PAGINATION_PARAMS.limit,\r\n offset: DEFAULT_PAGINATION_PARAMS.offset,\r\n totalPages: 0,\r\n totalRecords: 0,\r\n } as IPaginationInfo,\r\n departmentFilterList: [] as IDropdownOption[],\r\n cycleFilterList: [] as IDropdownOption[],\r\n semester: null as number | null,\r\n year: null as number | null,\r\n filterParams: {\r\n department: '' as string,\r\n cycle: '' as string,\r\n search: '' as string,\r\n },\r\n loadingStatus: {\r\n loading: true as boolean,\r\n loadingTable: true as boolean,\r\n },\r\n errorStatus: {\r\n errLoading: false as boolean,\r\n errLoadingFreeOptions: false as boolean,\r\n },\r\n};\r\n\r\nexport default createSlice({\r\n name: 'FreeOptionsTable',\r\n initialState,\r\n reducers: {\r\n onMount: (state, action: PayloadAction) => {},\r\n fetchFreeOptions: (\r\n state,\r\n action: PayloadAction\r\n ) => {},\r\n fetchFreeOptionsFilters: (\r\n state,\r\n action: PayloadAction\r\n ) => {},\r\n setFreeOptionsData: (state, action: PayloadAction) => {\r\n state.freeOptionsList = action.payload.data;\r\n state.departmentFilterList = action.payload.filters[0].department.map(\r\n (filter: any, key: number) => ({\r\n key: `${key}${filter}`,\r\n text: filter?.key,\r\n value: filter?.value,\r\n })\r\n );\r\n state.cycleFilterList = action.payload.filters[2].cycle.map((filter: any, key: number) => ({\r\n key: `${key}${filter}`,\r\n text: filter?.key,\r\n value: filter?.value,\r\n }));\r\n state.year = action.payload.year;\r\n state.semester = action.payload.semester;\r\n state.freeOptionsPage = {\r\n limit: action.payload.limit,\r\n offset: action.payload.offset,\r\n totalPages: action.payload.totalPages,\r\n totalRecords: action.payload.totalRecords,\r\n };\r\n },\r\n removeUcList: (state, action: PayloadAction) => {\r\n state.freeOptionsList = state.freeOptionsList.reduce((acc: any, uc) => {\r\n if (uc.id !== action.payload) {\r\n acc.push(uc);\r\n }\r\n return acc;\r\n }, [] as any);\r\n },\r\n setSearchFilter: (state, action: PayloadAction) => {\r\n state.filterParams.search = action.payload;\r\n },\r\n setDepartmentFilter: (state, action: PayloadAction) => {\r\n state.filterParams.department = action.payload;\r\n },\r\n setFreeOptionsPage: (\r\n state,\r\n action: PayloadAction<{\r\n limit: number;\r\n offset: number;\r\n totalPages: number;\r\n totalRecords: number;\r\n }>\r\n ) => {\r\n state.freeOptionsPage = {\r\n limit: action.payload.limit,\r\n offset: action.payload.offset,\r\n totalPages: action.payload.totalPages,\r\n totalRecords: action.payload.totalRecords,\r\n };\r\n },\r\n setCycleFilter: (state, action: PayloadAction) => {\r\n state.filterParams.cycle = action.payload;\r\n },\r\n setYear: (state, action: PayloadAction) => {\r\n state.year = action.payload;\r\n },\r\n setSemester: (state, action: PayloadAction) => {\r\n state.semester = action.payload;\r\n },\r\n setLoadingStatus: (\r\n state,\r\n action: PayloadAction<{ fieldName: string; fieldValue: boolean }>\r\n ) => {\r\n state.loadingStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n setErrorStatus: (state, action: PayloadAction<{ fieldName: string; fieldValue: boolean }>) => {\r\n state.errorStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n setDepartmentFilterList: (state, action: PayloadAction) => {\r\n state.departmentFilterList = action.payload.map((filter: string, key: number) => ({\r\n key: `${key}${filter}`,\r\n text: filter,\r\n value: filter,\r\n }));\r\n },\r\n onUnmount: (state) => initialState,\r\n reset: (state) => initialState,\r\n },\r\n});\r\n","/**\r\n * Home scene slice\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\n\r\nexport interface IPhases {\r\n name: number;\r\n year: number;\r\n period: number;\r\n beginDate: string;\r\n endDate: string;\r\n seriationDate: string;\r\n type: 'queue' | 'manual' | 'automatic' | 'normal';\r\n finished: boolean;\r\n final: boolean;\r\n isActive: boolean;\r\n}\r\n\r\nconst initialState = {\r\n phases: [] as IPhases[],\r\n loadingPhases: true as boolean,\r\n};\r\n\r\nexport default createSlice({\r\n name: 'SchedulesHome',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n onUnmount: () => {},\r\n setPhases: (state, action: PayloadAction) => {\r\n state.phases = action.payload;\r\n },\r\n setLoadingPhases: (state, action: PayloadAction) => {\r\n state.loadingPhases = action.payload;\r\n },\r\n },\r\n});\r\n","/**\r\n * Home scene slice\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\n\r\nconst initialState = {\r\n markdown: {\r\n value: '',\r\n valueEn: '',\r\n valueCh: '',\r\n } as {\r\n value: string;\r\n valueEn: string;\r\n valueCh: string;\r\n },\r\n loadingMarkdown: true as boolean,\r\n};\r\n\r\nexport default createSlice({\r\n name: 'SchedulesGuide',\r\n initialState,\r\n reducers: {\r\n onMount: (state, action: PayloadAction) => {},\r\n onUnmount: () => {},\r\n setMarkdown: (state, action: PayloadAction) => {\r\n state.markdown = action.payload;\r\n },\r\n setLoadingMarkdown: (state, action: PayloadAction) => {\r\n state.loadingMarkdown = action.payload;\r\n },\r\n reset: (state) => initialState,\r\n },\r\n});\r\n","import { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\n\r\nconst initialState = {\r\n markdown: {\r\n value: '',\r\n valueEn: '',\r\n valueCh: '',\r\n } as {\r\n value: string;\r\n valueEn: string;\r\n valueCh: string;\r\n },\r\n loadingMarkdown: true as boolean,\r\n};\r\n\r\nexport default createSlice({\r\n name: 'GradesGuide',\r\n initialState,\r\n reducers: {\r\n onMount: (state, action: PayloadAction) => {},\r\n onUnmount: () => {},\r\n setMarkdown: (state, action: PayloadAction) => {\r\n state.markdown = action.payload;\r\n },\r\n setLoadingMarkdown: (state, action: PayloadAction) => {\r\n state.loadingMarkdown = action.payload;\r\n },\r\n reset: (state) => initialState,\r\n },\r\n});\r\n","/**\r\n * Home scene slice\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\nexport interface IPhases {\r\n name: number;\r\n year: number;\r\n period: number;\r\n beginDate: string;\r\n endDate: string;\r\n seriationDate: string;\r\n type: 'queue' | 'manual' | 'automatic' | 'normal';\r\n finished: boolean;\r\n final: boolean;\r\n isActive: boolean;\r\n}\r\n\r\nconst initialState = {\r\n phases: [] as IPhases[],\r\n loadingPhases: true as boolean,\r\n markdown: [] as Array<{\r\n value: string;\r\n valueEn: string;\r\n valueCh: string;\r\n }>,\r\n loadingMarkdown: true as boolean,\r\n};\r\n\r\nexport default createSlice({\r\n name: 'Home',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n onUnmount: () => {},\r\n setPhases: (state, action: PayloadAction) => {\r\n state.phases = action.payload;\r\n },\r\n setLoadingPhases: (state, action: PayloadAction) => {\r\n state.loadingPhases = action.payload;\r\n },\r\n setMarkdown: (state, action: PayloadAction) => {\r\n state.markdown = action.payload;\r\n },\r\n setLoadingMarkdown: (state, action: PayloadAction) => {\r\n state.loadingMarkdown = action.payload;\r\n },\r\n },\r\n});\r\n","import { createSlice } from '@reduxjs/toolkit';\r\nimport { PautasListaResponse, PautaStats } from './types';\r\n\r\nimport { PayloadAction } from '@reduxjs/toolkit';\r\n\r\ninterface HomeState {\r\n pautasLista: PautasListaResponse | null;\r\n pautaStats: object;\r\n periodosDisponiveis: string[];\r\n filtrarPorPeriodo: string;\r\n selectedState: string;\r\n loadingStatus: {\r\n loadingGrades: boolean;\r\n loadingTable: boolean;\r\n loadingStats: boolean;\r\n };\r\n pautasListaChanges: {\r\n filterState: string;\r\n pautasListaChanged: boolean;\r\n };\r\n}\r\n\r\nconst initialState: HomeState = {\r\n pautasLista: null,\r\n pautaStats: {},\r\n periodosDisponiveis: [],\r\n filtrarPorPeriodo: '',\r\n selectedState: '',\r\n loadingStatus: {\r\n loadingGrades: true,\r\n loadingTable: true,\r\n loadingStats: true,\r\n },\r\n pautasListaChanges: {\r\n filterState: '',\r\n pautasListaChanged: false,\r\n },\r\n};\r\n\r\nexport default createSlice({\r\n name: 'GradesManagement',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n onUnmount: () => {},\r\n reset: (state) => initialState,\r\n changeYearRequest: (state, action) => {\r\n state.filtrarPorPeriodo = action.payload;\r\n },\r\n setPautasLista: (state, action) => {\r\n state.pautasLista = action.payload;\r\n },\r\n setPautasStats: (state, action) => {\r\n state.pautaStats = action.payload;\r\n },\r\n setPeriodosDisponiveis: (state, action) => {\r\n state.periodosDisponiveis = action.payload;\r\n },\r\n setFiltrarPorPeriodo: (state, action) => {\r\n state.filtrarPorPeriodo = action.payload;\r\n },\r\n setSelectedState: (state, action) => {\r\n state.selectedState = action.payload;\r\n },\r\n setLoadingStatus: (\r\n state,\r\n action: PayloadAction<{ fieldName: string; fieldValue: boolean }>\r\n ) => {\r\n state.loadingStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n setPautasListaChanged: (state, action) => {\r\n state.pautasListaChanges.pautasListaChanged = action.payload;\r\n },\r\n setPautasListaState: (state, action) => {\r\n state.pautasListaChanges.filterState = action.payload;\r\n },\r\n resetPautasListaChanges: (state) => {\r\n state.pautasListaChanges = initialState.pautasListaChanges;\r\n },\r\n },\r\n});\r\n","import { PayloadAction, createSlice } from '@reduxjs/toolkit';\r\nimport { IGradeDataItem, IHDADOS, IGradeDetail} from './types';\r\n\r\ninterface IinitialState {\r\n gradesData: IGradeDataItem[];\r\n gradeDetails: IGradeDetail;\r\n HDADOS: IHDADOS;\r\n FDADOS: {};\r\n Dicionarios: {};\r\n regimes: {}\r\n validGradeValues: number[];\r\n gradeEdits: Record;\r\n csvFile: File | null;\r\n isStatisticsModalOpen: boolean;\r\n isCSVModalOpen: boolean;\r\n isLabelsModalOpen: boolean;\r\n dropdownValueSelected: string;\r\n isConfirmPageLeaveModalOpen: boolean;\r\n isErrorsModalOpen: boolean;\r\n importErrors: [];\r\n importWarnings: {};\r\n isConfirmDiscardChangesModalOpen: boolean;\r\n examDate: string | null;\r\n loadingStatus: {\r\n loadingGradeData: boolean;\r\n loadingTable: boolean;\r\n loadingCSVData: boolean,\r\n };\r\n}\r\n\r\nconst initialState: IinitialState = {\r\n gradesData: [],\r\n gradeDetails: {} as IGradeDetail,\r\n HDADOS: {\r\n type: '',\r\n dep: '',\r\n codDisciplina: '',\r\n nomeDisciplina: '',\r\n ano: '',\r\n tipoExame: '',\r\n epocaExame: '',\r\n tipoAvaliacao: {\r\n idTipoAvaliacao: '',\r\n nomeTipoAvaliacao: '',\r\n tipo: '',\r\n gama: {}\r\n },\r\n codigoPauta: '',\r\n semestre: '',\r\n x1: '',\r\n x2: '',\r\n dataExame: '',\r\n x3: '',\r\n },\r\n FDADOS: {},\r\n Dicionarios: {},\r\n regimes:{}, \r\n validGradeValues: [],\r\n gradeEdits: {},\r\n csvFile: null,\r\n isStatisticsModalOpen: false,\r\n isCSVModalOpen: false,\r\n isLabelsModalOpen: false,\r\n dropdownValueSelected: '',\r\n isConfirmPageLeaveModalOpen: false,\r\n isErrorsModalOpen: false,\r\n importErrors: [],\r\n importWarnings: {},\r\n isConfirmDiscardChangesModalOpen: false,\r\n examDate: null,\r\n loadingStatus: {\r\n loadingGradeData: true,\r\n loadingTable: true,\r\n loadingCSVData: true,\r\n }\r\n};\r\n\r\nexport default createSlice({\r\n name: 'EditGrades',\r\n initialState,\r\n reducers: {\r\n onMount: (state, action) => {\r\n state.gradesData = action.payload;\r\n },\r\n onUnmount: () => { },\r\n reset: (state) => initialState,\r\n fetchGradeData: state => {},\r\n setGradeData: (state, action: PayloadAction) => {\r\n state.gradesData = action.payload;\r\n },\r\n setGradeDetails: (state, action) => {\r\n state.gradeDetails = action.payload;\r\n },\r\n setHDADOS: (state, action) => {\r\n state.HDADOS = action.payload;\r\n },\r\n setFDADOS: (state, action) => {\r\n state.FDADOS = action.payload;\r\n },\r\n setDicionarios: (state, action) => {\r\n state.Dicionarios = action.payload;\r\n },\r\n setRegimes: (state, action) => {\r\n state.regimes = action.payload;\r\n },\r\n setValidGradeValues: (state, action) => {\r\n state.validGradeValues = action.payload;\r\n },\r\n setGradeEdits: (state, action: PayloadAction>) => {\r\n state.gradeEdits = action.payload;\r\n },\r\n clearGradeEdits: (state) => {\r\n state.gradeEdits = {};\r\n },\r\n clearExamDate: (state) => {\r\n state.examDate = null;\r\n },\r\n uploadGrades: (state, action) => {},\r\n setCSVFile: (state, action: PayloadAction) => {\r\n state.csvFile = action.payload;\r\n },\r\n saveOrSubmitGrades: (state, action) => {},\r\n setStatisticsModal: (state) => {\r\n state.isStatisticsModalOpen = !state.isStatisticsModalOpen;\r\n },\r\n setIsCSVModalOpen: (state) => {\r\n state.isCSVModalOpen = !state.isCSVModalOpen;\r\n },\r\n setIsLabelsModalOpen:(state) => {\r\n state.isLabelsModalOpen = !state.isLabelsModalOpen;\r\n },\r\n setDropdownValueSelected:(state, action) => {\r\n state.dropdownValueSelected = action.payload;\r\n },\r\n setIsConfirmPageLeaveModalOpen: (state) => {\r\n state.isConfirmPageLeaveModalOpen = !state.isConfirmPageLeaveModalOpen;\r\n },\r\n setIsErrorsModalOpen: (state) => {\r\n state.isErrorsModalOpen = !state.isErrorsModalOpen;\r\n },\r\n setImportErrors: (state, action) => {\r\n state.importErrors = action.payload;\r\n },\r\n setImportWarnings: (state, action) => {\r\n state.importWarnings = action.payload;\r\n },\r\n setIsConfirmDiscardChangesModalOpen: (state) => {\r\n state.isConfirmDiscardChangesModalOpen = !state.isConfirmDiscardChangesModalOpen;\r\n },\r\n setExamDate: (state, action) => {\r\n state.examDate = action.payload;\r\n },\r\n setLoadingStatus: (\r\n state,\r\n action: PayloadAction<{ fieldName: string; fieldValue: boolean }>\r\n ) => {\r\n state.loadingStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n },\r\n});","import { createSlice } from '@reduxjs/toolkit';\r\nimport { PayloadAction } from '@reduxjs/toolkit';\r\n\r\ninterface GradeDetail {\r\n codDisciplina: number;\r\n nomeDisciplina: string;\r\n nomeDisciplinaEng: string;\r\n codPauta: string;\r\n anoLectivo: number;\r\n semestre: number;\r\n tipoExame: string;\r\n epocaExame: number;\r\n ntotalAlunos: number;\r\n estadoActual: number;\r\n}\r\n\r\ninterface GradesDetailsState {\r\n pautaData: GradeDetail[];\r\n dataExame: string | null;\r\n gradeCounts: {} | null;\r\n loadingStatus: {\r\n loadingGradeDetailsInfo: boolean;\r\n loadingGradeDetailsCounts: boolean;\r\n };\r\n pdfUrl: string | null;\r\n isPdfReady: boolean;\r\n isPdfModalOpen: boolean;\r\n}\r\n\r\nconst initialState: GradesDetailsState = {\r\n pautaData: [],\r\n dataExame: null,\r\n gradeCounts: {},\r\n loadingStatus: {\r\n loadingGradeDetailsInfo: true,\r\n loadingGradeDetailsCounts: true\r\n },\r\n pdfUrl: null,\r\n isPdfReady: false,\r\n isPdfModalOpen: false\r\n};\r\n\r\nexport default createSlice({\r\n name: 'GradesDetails',\r\n initialState,\r\n reducers: {\r\n onMount: () => { },\r\n onUnmount: () => { },\r\n reset: (state) => initialState,\r\n setGradeDetails: (state, action) => {\r\n state.pautaData = Array.isArray(action.payload) ? action.payload : [action.payload];\r\n },\r\n getGradeDetails: (state, action: PayloadAction<{ codigoPauta: string }>) => {},\r\n setDataExame: (state, action) => {\r\n state.dataExame = action.payload;\r\n },\r\n setGradeCounts: (state, action) => {\r\n state.gradeCounts = action.payload;\r\n },\r\n setLoadingStatus: (\r\n state,\r\n action: PayloadAction<{ fieldName: string; fieldValue: boolean }>\r\n ) => {\r\n state.loadingStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n fetchPdf: () => {},\r\n setPdfUrl: (state, action) => {\r\n state.pdfUrl = action.payload;\r\n },\r\n setIsPdfReady: (state, action) => {\r\n state.isPdfReady = action.payload;\r\n },\r\n setIsPdfModalOpen: (state) => {\r\n state.isPdfModalOpen = !state.isPdfModalOpen;\r\n }\r\n },\r\n});\r\n","import { createSlice } from '@reduxjs/toolkit';\r\nimport { GradeHistoryListResponse, GradeItem } from './types';\r\n\r\nimport { PayloadAction } from '@reduxjs/toolkit';\r\n\r\ninterface GradeHistoryState {\r\n historyList: GradeHistoryListResponse;\r\n gradeDetails: GradeItem | null;\r\n loadingStatus: {\r\n loadingGradeHistory: boolean;\r\n loadingGradeDetails: boolean;\r\n };\r\n}\r\n\r\nconst initialState: GradeHistoryState = {\r\n historyList: [],\r\n gradeDetails: null,\r\n loadingStatus: {\r\n loadingGradeHistory: true,\r\n loadingGradeDetails: true,\r\n }\r\n};\r\n\r\nexport default createSlice({\r\n name: 'GradeHistory',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n onUnmount: () => {},\r\n reset: (state) => initialState,\r\n setGradeHistory: (state, action) => {\r\n state.historyList = action.payload;\r\n },\r\n setGradeDetails: (state, action) => {\r\n state.gradeDetails = action.payload;\r\n },\r\n getGradeHistory: (state, action: PayloadAction<{ codigoPauta: string }>) => {},\r\n setLoadingStatus: (\r\n state,\r\n action: PayloadAction<{ fieldName: string; fieldValue: boolean }>\r\n ) => {\r\n state.loadingStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n },\r\n});\r\n","/**\r\n * Help scene slice\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\nimport { IDropdownOption } from 'shared/types';\r\nimport { t } from 'app';\r\nimport { IParams } from 'api';\r\n\r\nconst initialState = {\r\n helpListing: [] as any,\r\n filterTypes: [] as IDropdownOption[],\r\n filterParams: {\r\n type: '' as string,\r\n search: '' as string,\r\n },\r\n loadingStatus: {\r\n loading: true as boolean,\r\n loadingSearch: true as boolean,\r\n },\r\n errorStatus: {\r\n errLoading: false,\r\n },\r\n};\r\n\r\nexport default createSlice({\r\n name: 'Help',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n setLoadingStatus: (\r\n state,\r\n action: PayloadAction<{ fieldName: string; fieldValue: boolean }>\r\n ) => {\r\n state.loadingStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n setSearchFilter: (state, action: PayloadAction) => {\r\n state.filterParams.search = action.payload;\r\n },\r\n setTypeFilter: (state, action: PayloadAction) => {\r\n state.filterParams.type = action.payload;\r\n },\r\n setHelpListing: (state, action: PayloadAction) => {\r\n state.helpListing = action.payload;\r\n },\r\n setFilterTypes: (state, action: PayloadAction) => {\r\n state.filterTypes = action.payload.map((filter, key) => {\r\n return {\r\n key: key,\r\n text: t(`routes.${filter}`, { textOnly: true }),\r\n value: filter,\r\n };\r\n });\r\n },\r\n setErrorStatus: (state, action: PayloadAction<{ fieldName: string; fieldValue: boolean }>) => {\r\n state.errorStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n onUnmount: () => {},\r\n getHelpListing: (state, action?: PayloadAction) => {},\r\n reset: (state) => initialState,\r\n },\r\n});\r\n","import { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\n\r\nimport { overridePath } from '../utils';\r\n\r\ninterface IPathElem {\r\n key: string;\r\n name: string;\r\n url: string;\r\n}\r\n\r\ninterface IPathElemOverride {\r\n key: string;\r\n name?: string;\r\n url?: string;\r\n}\r\n\r\nconst initialState = {\r\n pathElemsList: [] as IPathElem[],\r\n};\r\n\r\nexport default createSlice({\r\n name: 'Breadcrumb',\r\n initialState,\r\n reducers: {\r\n setPath: (state, action: PayloadAction) => {\r\n state.pathElemsList = action.payload;\r\n },\r\n overridePath: (state, action: PayloadAction) => {\r\n state.pathElemsList = overridePath(state.pathElemsList, action.payload);\r\n },\r\n },\r\n});\r\n","/**\r\n * NewCertificate scene slice\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\nimport { ICosts, IFormPostValues } from '../types';\r\nimport { IDropdownOption } from 'shared/types';\r\nimport { IParams } from 'api';\r\nimport _ from 'lodash';\r\n\r\ninterface ICertificateData {\r\n registrationId: null | number;\r\n type: {\r\n theme: null | string;\r\n code: string;\r\n name: null | string;\r\n price: number;\r\n };\r\n form: null | { [key: string]: any };\r\n //formValues: null | { [key: string]: any };\r\n submissionTabData: null | { [key: string]: any };\r\n}\r\n\r\ninterface ICertificateTypes {\r\n [key: string]: {\r\n description: string;\r\n theme: string;\r\n type: string;\r\n code: string;\r\n paymentExemption: boolean;\r\n previewUrl: string;\r\n price: number;\r\n id: number;\r\n }[];\r\n}\r\n\r\nconst initialState = {\r\n currentStep: 1,\r\n isExempt: false,\r\n hasModeration: false,\r\n englishWarning: false,\r\n isDigital: false,\r\n needsRequirement: false,\r\n showWarningModalOnSubmit: false,\r\n showRepeteadCertModal: false,\r\n selectedCertificatePreviewUrl: '',\r\n selectedCertificateType: {\r\n theme: null,\r\n code: '',\r\n name: null,\r\n price: -1,\r\n id: null as null | number,\r\n description: null as null | string,\r\n },\r\n certificateData: {\r\n registrationId: null,\r\n form: null,\r\n submissionTabData: null, // processed form values for display in the submission tab page\r\n } as ICertificateData,\r\n radioBtnMappings: {} as any,\r\n certificateTypes: {\r\n data: {} as ICertificateTypes,\r\n filters: [] as IDropdownOption[],\r\n },\r\n certificateCosts: {\r\n costs: [],\r\n totalCost: 0,\r\n } as ICosts,\r\n numAdditionalDocs: 1,\r\n filterParams: {\r\n type: '' as string,\r\n search: '' as string,\r\n },\r\n certificateSubmitted: false,\r\n loadingSubmission: {\r\n payNow: false,\r\n payLater: false,\r\n },\r\n refreshPage: false,\r\n loadingStatus: {\r\n loading: true,\r\n tabLoading: true,\r\n costLoading: true,\r\n },\r\n errorStatus: {\r\n errLoading: false,\r\n errLoadingCertificateList: false,\r\n errLoadingCertificateForm: false,\r\n errSubmittingForm: false,\r\n },\r\n};\r\n\r\nexport default createSlice({\r\n name: 'NewCertificate',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n onUnmount: () => {},\r\n onLoadPage: (state) => {},\r\n setExempt: (state, action: PayloadAction) => {\r\n state.isExempt = action.payload;\r\n },\r\n setHasModeration: (state, action: PayloadAction) => {\r\n state.hasModeration = action.payload;\r\n },\r\n setEnglishWarning: (state, action: PayloadAction) => {\r\n state.englishWarning = action.payload;\r\n },\r\n setIsDigital: (state, action: PayloadAction) => {\r\n state.isDigital = action.payload;\r\n },\r\n setNeedsRequirement: (state, action: PayloadAction) => {\r\n state.needsRequirement = action.payload;\r\n state.showWarningModalOnSubmit = true;\r\n },\r\n clearWarnings: (state) => {\r\n state.needsRequirement = false;\r\n state.showWarningModalOnSubmit = false;\r\n },\r\n setShowWarningModalOnSubmit: (state, action: PayloadAction) => {\r\n state.showWarningModalOnSubmit = action.payload;\r\n },\r\n setShowRepeteadCertWarningModal: (state, action: PayloadAction) => {\r\n state.showRepeteadCertModal = action.payload;\r\n },\r\n setCurrentStep: (state, action: PayloadAction) => {\r\n state.currentStep = action.payload;\r\n },\r\n setActiveRegistration: () => {},\r\n setCertificateData: (state, action: PayloadAction) => {},\r\n setProcessedCertificateData: (state, action: PayloadAction) => {\r\n // make radio button value_ids mappings to array indices\r\n state.certificateData = action.payload;\r\n },\r\n setRadioBtnMappings: (state, action: PayloadAction) => {\r\n state.radioBtnMappings = action.payload;\r\n },\r\n setSelectedCertificatePreviewUrl: (state, action: PayloadAction) => {\r\n state.selectedCertificatePreviewUrl = action.payload;\r\n },\r\n setSearchFilter: (state, action: PayloadAction) => {\r\n state.filterParams.search = action.payload;\r\n },\r\n setTypeFilter: (state, action: PayloadAction) => {\r\n state.filterParams.type = action.payload;\r\n },\r\n getCertificateTypes: (state, action?: PayloadAction) => {},\r\n setCertificateTypes: (state, action: PayloadAction) => {\r\n state.certificateTypes = {\r\n data: action.payload.data,\r\n filters: action.payload.filters.map((filter, key) => ({\r\n key: key,\r\n text: filter,\r\n value: filter,\r\n })),\r\n };\r\n },\r\n setFormSchema: (state, action: PayloadAction) => {\r\n state.certificateData.form = action.payload;\r\n },\r\n setNumAdditionalDocs: (state, action: PayloadAction) => {\r\n state.numAdditionalDocs = action.payload;\r\n },\r\n addDocumentToFormSchema: (state, action: PayloadAction) => {},\r\n remAdditionalDoc: (state) => {\r\n state.numAdditionalDocs -= 1;\r\n },\r\n removeDocumentFromFormSchema: (state, action: PayloadAction) => {},\r\n resetAdditionDocs: (state) => {\r\n state.numAdditionalDocs = initialState.numAdditionalDocs;\r\n },\r\n postCertificateChosenOptions: (state, action: PayloadAction) => {},\r\n setCertificateCosts: (state, action: PayloadAction) => {\r\n state.certificateCosts = action.payload;\r\n },\r\n getCertificateForm: () => {},\r\n addAdditionalDoc: (state) => {\r\n state.numAdditionalDocs += 1;\r\n },\r\n setSelectedCertificateType: (state, action: PayloadAction) => {\r\n state.selectedCertificateType = action.payload;\r\n },\r\n resetSelectedCertificateType: (state) => {\r\n state.selectedCertificateType = initialState.selectedCertificateType;\r\n },\r\n submitCertificate: (state, action: PayloadAction) => {},\r\n resetSubmissionTabData: (state) => {\r\n state.certificateData.submissionTabData = initialState.certificateData.submissionTabData;\r\n },\r\n resetFormTabData: (state) => {\r\n state.loadingStatus.costLoading = initialState.loadingStatus.costLoading;\r\n state.isExempt = initialState.isExempt;\r\n\r\n state.certificateData.form = initialState.certificateData.form;\r\n state.numAdditionalDocs = initialState.numAdditionalDocs;\r\n state.certificateCosts = initialState.certificateCosts;\r\n },\r\n setCertificateSubmitted: (state, action: PayloadAction) => {\r\n state.certificateSubmitted = action.payload;\r\n },\r\n setLoadingSubmission: (\r\n state,\r\n action: PayloadAction<{ payNow: boolean; payLater: boolean }>\r\n ) => {\r\n state.loadingSubmission = action.payload;\r\n },\r\n setRefreshPage: (state, action: PayloadAction) => {\r\n state.refreshPage = action.payload;\r\n },\r\n setLoadingStatus: (\r\n state,\r\n action: PayloadAction<{ fieldName: string; fieldValue: boolean }>\r\n ) => {\r\n state.loadingStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n setErrorStatus: (state, action: PayloadAction<{ fieldName: string; fieldValue: boolean }>) => {\r\n state.errorStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n resetPage: (state) => initialState,\r\n },\r\n});\r\n","/**\r\n * CertificatesList scene slice\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\nimport { IParams } from 'api';\r\n\r\ninterface ICertificate {\r\n id: number;\r\n theme: 'Certidões - De aprovação' | string;\r\n type: 'Certidões - Certidão de situação de prescrição' | string;\r\n requestDate: string;\r\n format: 'digitalFormat' | string;\r\n state: 'awaitingProcessing' | string;\r\n language: 'en' | 'pt' | string;\r\n ready: boolean;\r\n registrationId: number;\r\n responseDate: string | null;\r\n isExempt: boolean;\r\n exemptionMotive: string;\r\n accessKey: string;\r\n expirationDate: string | null;\r\n paymentState: string | null;\r\n}\r\n\r\nconst initialState = {\r\n certificatesList: [] as ICertificate[],\r\n certificatesFilters: [] as any[],\r\n requestParams: {} as IParams,\r\n showAccesskeyModal: { status: false, accessKey: '' },\r\n loadingStatus: {\r\n loading: true as boolean,\r\n loadingCertificatesList: true as boolean,\r\n },\r\n errorStatus: {\r\n errLoading: false,\r\n errLoadingCertificateList: false,\r\n },\r\n};\r\n\r\nexport default createSlice({\r\n name: 'CertificatesList',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n getData: (state, action: PayloadAction<{} | undefined>) => {},\r\n setCertificatesList: (state, action: PayloadAction) => {\r\n state.certificatesList = action.payload;\r\n },\r\n setRequestParams: (state, action: PayloadAction) => {\r\n state.requestParams = { ...state.requestParams, ...action.payload };\r\n },\r\n setCertificatesFilters: (state, action: PayloadAction) => {\r\n state.certificatesFilters = action.payload;\r\n },\r\n setLoadingStatus: (\r\n state,\r\n action: PayloadAction<{ fieldName: string; fieldValue: boolean }>\r\n ) => {\r\n state.loadingStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n setErrorStatus: (state, action: PayloadAction<{ fieldName: string; fieldValue: boolean }>) => {\r\n state.errorStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n setShowAccessKeyModal: (\r\n state,\r\n action: PayloadAction<{ status: boolean; accessKey: string }>\r\n ) => {\r\n state.showAccesskeyModal = action.payload;\r\n },\r\n reset: (state) => initialState,\r\n onUnmount: () => {},\r\n },\r\n});\r\n","/**\r\n * CertificatesDetails scene slice\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\n\r\nexport interface ICertificateDetails {\r\n certName: string;\r\n isReady: boolean;\r\n email: string;\r\n address: {\r\n homeAddress: string;\r\n homeLocality: string;\r\n homePostalCode: {\r\n number: string;\r\n prefix: string;\r\n };\r\n };\r\n history: {\r\n awaitingPayment: string | null;\r\n cancelled: string | null;\r\n rejected: string | null;\r\n pending: string | null;\r\n ready: string | null;\r\n };\r\n certificate: {\r\n id: number;\r\n name: string;\r\n url: string | null;\r\n };\r\n payment: {\r\n paymentId: number;\r\n debitId: number;\r\n costs: {\r\n costCertificate: string;\r\n mailCost: string;\r\n };\r\n totalCost: number;\r\n receipt: {\r\n id: number;\r\n name: string;\r\n url: string;\r\n };\r\n };\r\n model: {\r\n id: number;\r\n name: string;\r\n url: string;\r\n };\r\n state: {\r\n id: number;\r\n registrationId: number;\r\n theme: string;\r\n type: string;\r\n requestDate: string;\r\n format: string;\r\n state: string;\r\n language: string;\r\n method: string;\r\n ready: boolean;\r\n exemptionMotive: string;\r\n isExempt: boolean;\r\n responseDate: null | string;\r\n expirationDate: null | string;\r\n };\r\n loadingStatus: {\r\n loadingCertificatesDetails: boolean;\r\n };\r\n errorStatus: {\r\n errLoadingCertificateDetails: boolean;\r\n };\r\n}\r\n\r\nexport interface ICertificateAccessHistory {\r\n accessDate: string;\r\n accessTime: string;\r\n countryIso2: string;\r\n ipAddress: string;\r\n country: string;\r\n}\r\n\r\nconst initialState = {\r\n accessHistoryModalVisible: false,\r\n accessHistory: [] as ICertificateAccessHistory[],\r\n loadingStatus: {\r\n loadingCertificatesDetails: true,\r\n loadingAccessHistory: false,\r\n },\r\n errorStatus: {\r\n errLoadingCertificatesDetails: false,\r\n errorLoadingAccessHistory: false,\r\n },\r\n certificatesDetails: null as null | ICertificateDetails,\r\n certificateFile: undefined as Uint8Array | undefined,\r\n};\r\n\r\nexport default createSlice({\r\n name: 'CertificatesDetails',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n setCertificatesDetails: (state, action: PayloadAction) => {\r\n state.certificatesDetails = action.payload;\r\n },\r\n setCertificateFile: (state, action: PayloadAction) => {\r\n state.certificateFile = action.payload;\r\n },\r\n\r\n getData: (\r\n state,\r\n action: PayloadAction<{ certificateId: number; registrationId: number }>\r\n ) => {},\r\n certificatePayment: (state, action: PayloadAction) => {},\r\n certificatePaymentPending: (state, action: PayloadAction) => {},\r\n setLoadingStatus: (\r\n state,\r\n action: PayloadAction<{ fieldName: string; fieldValue: boolean }>\r\n ) => {\r\n state.loadingStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n setErrorStatus: (state, action: PayloadAction<{ fieldName: string; fieldValue: boolean }>) => {\r\n state.errorStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n openChangeHistoryModal: (\r\n state,\r\n action: PayloadAction<{ certificateId: number; registrationId: number }>\r\n ) => {},\r\n setVisibleAccessHistoryModal: (state, action: PayloadAction) => {\r\n state.accessHistoryModalVisible = action.payload;\r\n },\r\n setAccessHistory: (state, action: PayloadAction) => {\r\n state.accessHistory = action.payload;\r\n },\r\n reset: (state) => initialState,\r\n onUnmount: () => {},\r\n },\r\n});\r\n","/**\r\n * CertificateValidator scene slice\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\n\r\nexport interface ICertificateDetails {\r\n certificateData: any;\r\n hasValidated: boolean;\r\n loadingStatus: {\r\n loadingCertificateValidation: boolean;\r\n };\r\n errorStatus: {\r\n errLoadingCertificateValidation: boolean;\r\n };\r\n}\r\n\r\nconst initialState = {\r\n certificateData: undefined as any,\r\n hasValidated: false,\r\n loadingStatus: {\r\n loadingCertificateValidation: false,\r\n loadingCertificateFile: false,\r\n },\r\n errorStatus: {\r\n errLoadingCertificateValidation: false,\r\n },\r\n};\r\n\r\nexport default createSlice({\r\n name: 'CertificateValidator',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n setCertificateData: (state, action: PayloadAction) => {\r\n state.certificateData = action.payload;\r\n },\r\n setHasValidated: (state, action: PayloadAction) => {\r\n state.hasValidated = action.payload;\r\n },\r\n validateCertificateCode: (\r\n state,\r\n action: PayloadAction<{\r\n recaptchaToken: string;\r\n accessCode: string;\r\n }>\r\n ) => {},\r\n setLoadingStatus: (\r\n state,\r\n action: PayloadAction<{ fieldName: string; fieldValue: boolean }>\r\n ) => {\r\n state.loadingStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n setErrorStatus: (state, action: PayloadAction<{ fieldName: string; fieldValue: boolean }>) => {\r\n state.errorStatus[action.payload.fieldName] = action.payload.fieldValue;\r\n },\r\n reset: (state) => initialState,\r\n onUnmount: () => {},\r\n },\r\n});\r\n","/**\r\n * ImprovementExamEnrollment scene slice\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\nimport { IImprovementExamsSignupData } from '../types';\r\n\r\nconst initialState = {\r\n loading: true as boolean,\r\n enrollImprovementExamId: null as null | number, // inscrever ou editar\r\n requestImprovementExamId: null as null | number, // solicitar\r\n signups: null as null | IImprovementExamsSignupData,\r\n};\r\n\r\nexport default createSlice({\r\n name: 'ImprovementExamEnrollment',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n onUnmount: () => {},\r\n getStudentSignups: (state, action: PayloadAction) => {},\r\n setLoading: (state, action: PayloadAction) => {\r\n state.loading = action.payload;\r\n },\r\n setData: (state, action: PayloadAction) => {\r\n state.signups = action.payload;\r\n },\r\n setEnrollImprovementExamId: (state, action: PayloadAction) => {\r\n state.enrollImprovementExamId = action.payload;\r\n },\r\n setRequestImprovementExamId: (state, action: PayloadAction) => {\r\n state.requestImprovementExamId = action.payload;\r\n },\r\n reset: (state) => initialState,\r\n },\r\n});\r\n","/**\r\n * ExamEnrollment scene slice\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\n\r\nconst initialState = {\r\n loading: true,\r\n};\r\n\r\nexport default createSlice({\r\n name: 'ExamEnrollment',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n onUnmount: () => {},\r\n setLoading: (state, action: PayloadAction) => {\r\n state.loading = action.payload;\r\n },\r\n reset: (state) => initialState,\r\n },\r\n});\r\n","/**\r\n * EvaluationTypeSelection scene slice\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\n\r\nconst initialState = {\r\n loading: true,\r\n};\r\n\r\nexport default createSlice({\r\n name: 'EvaluationTypeSelection',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n onUnmount: () => {},\r\n setLoading: (state, action: PayloadAction) => {\r\n state.loading = action.payload;\r\n },\r\n reset: (state) => initialState,\r\n },\r\n});\r\n","/**\r\n * EnrollmentRenewal scene slice\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\n\r\nconst initialState = {\r\n loading: true,\r\n};\r\n\r\nexport default createSlice({\r\n name: 'EnrollmentRenewal',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n onUnmount: () => {},\r\n setLoading: (state, action: PayloadAction) => {\r\n state.loading = action.payload;\r\n },\r\n reset: (state) => initialState,\r\n },\r\n});\r\n","/**\r\n * ExamEnrollment scene slice\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\n\r\nconst initialState = {\r\n loading: true,\r\n};\r\n\r\nexport default createSlice({\r\n name: 'Exams',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n onUnmount: () => {},\r\n setLoading: (state, action: PayloadAction) => {\r\n state.loading = action.payload;\r\n },\r\n reset: (state) => initialState,\r\n },\r\n});\r\n","/**\r\n * ExamEnrollment scene slice\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\n\r\nconst initialState = {\r\n loading: true,\r\n};\r\n\r\nexport default createSlice({\r\n name: 'TransferalCompetence',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n onUnmount: () => {},\r\n setLoading: (state, action: PayloadAction) => {\r\n state.loading = action.payload;\r\n },\r\n reset: (state) => initialState,\r\n },\r\n});\r\n","/**\r\n * ExamEnrollment scene slice\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\r\n\r\nconst initialState = {\r\n loading: true,\r\n};\r\n\r\nexport default createSlice({\r\n name: 'specialExams',\r\n initialState,\r\n reducers: {\r\n onMount: () => {},\r\n onUnmount: () => {},\r\n setLoading: (state, action: PayloadAction) => {\r\n state.loading = action.payload;\r\n },\r\n reset: (state) => initialState,\r\n },\r\n});\r\n","import { combineReducers } from '@reduxjs/toolkit';\r\n\r\nimport appSlice from 'app/logic/slice';\r\nimport appToolsSlice from 'app/AppTools/logic/slice';\r\n\r\n// WARNING!! Don't erase the nextline as it is necessary for hygen to automatically import your components\r\n// Define imports heree'\r\nimport logsstudentSlice from 'scenes/LogsStudent/logic/slice'\r\nimport logsSlice from 'scenes/Logs/logic/slice'\r\nimport examsCalendarlSlice from 'scenes/VirtualSecretary/ExamsCalendar/logic/slice';\r\nimport applicationdetailsSlice from 'scenes/VirtualSecretary/Applications/ApplicationDetails/logic/slice';\r\nimport newapplicationSlice from 'scenes/VirtualSecretary/Applications/NewApplication/logic/slice';\r\nimport registrationdetailsSlice from 'scenes/VirtualSecretary/RegistrationDetails/logic/slice';\r\nimport registrationsSlice from 'scenes/VirtualSecretary/Registrations/logic/slice';\r\nimport seriationhistorySlice from 'scenes/Schedules/SeriationHistory/logic/slice';\r\nimport seriationhistorydetailsSlice from 'scenes/Schedules/SeriationHistoryDetails/logic/slice';\r\nimport freeOptionsDropdownSlice from 'scenes/Schedules/MySchedule/containers/FreeOptionsDropdown/logic/slice';\r\nimport studentregistrationdropdownSlice from 'shared/containers/StudentRegistrationDropdown/logic/slice';\r\nimport applicationslistSlice from 'scenes/VirtualSecretary/Applications/ApplicationsList/logic/slice';\r\nimport paymentsSlice from 'scenes/VirtualSecretary/Payments/logic/slice';\r\nimport pendingDebitsPaymentSlice from 'scenes/VirtualSecretary/Payments/PendingDebitsPayment/logic/slice';\r\nimport gradesSlice from 'scenes/VirtualSecretary/Grades/logic/slice';\r\nimport assessmentchoiceSlice from 'scenes/VirtualSecretary/AssessmentChoice/logic/slice';\r\nimport examregistrationSlice from 'scenes/VirtualSecretary/ExamRegistration/logic/slice';\r\nimport subscriptionrenewalSlice from 'scenes/VirtualSecretary/SubscriptionRenewal/logic/slice';\r\nimport classsupoortSlice from 'scenes/VirtualSecretary/ClassSupoort/logic/slice';\r\nimport curricularplanSlice from 'scenes/VirtualSecretary/CurricularPlan/CurricularPlan/logic/slice';\r\nimport curricularUnitDetailsSlice from 'scenes/VirtualSecretary/CurricularPlan/CurricularUnitDetails/logic/slice';\r\nimport personaldataSlice from 'scenes/VirtualSecretary/PersonalData/logic/slice';\r\nimport createdScheduleSlice from 'scenes/Schedules/CreatedSchedules/containers/CreatedSchedule/logic/slice';\r\nimport myschedulesSlice from 'scenes/Schedules/CreatedSchedules/logic/slice';\r\nimport mandatoryOptionsDropdownSlice from 'scenes/Schedules/MySchedule/containers/MandatoryOptionsDropdown/logic/slice';\r\nimport toasterSlice from 'shared/containers/Toaster/logic/slice';\r\nimport toasterActionSlice from 'shared/containers/ToasterAction/logic/slice';\r\nimport schedulesSlice from 'scenes/Schedules/MySchedule/logic/slice';\r\nimport freeOptionsListSlice from 'scenes/Schedules/FreeOptionsList/logic/slice';\r\nimport freeOptionsTableSlice from 'scenes/Schedules/containers/FreeOptionsTable/logic/slice';\r\nimport schedulesHomeSlice from 'scenes/Schedules/SchedulesHome/logic/slice';\r\nimport schedulesGuideSlice from 'scenes/Schedules/SchedulesGuide/logic/slice';\r\nimport gradesGuideSlice from 'scenes/GradesManagement/GradesGuide/logic/slice';\r\nimport homeSlice from 'scenes/Home/logic/slice';\r\nimport gradesManagementSlice from 'scenes/GradesManagement/GradesManagement/logic/slice';\r\nimport editGradesSlice from 'scenes/GradesManagement/EditGrades/logic/slice';\r\nimport gradesDetailsSlice from 'scenes/GradesManagement/GradesDetails/logic/slice';\r\nimport gradesHistorySlice from 'scenes/GradesManagement/GradesHistory/logic/slice';\r\nimport helpSlice from 'scenes/Help/logic/slice';\r\nimport breadcrumbSlice from 'shared/containers/Breadcrumb/logic/slice';\r\nimport newcertificateSlice from 'scenes/VirtualSecretary/Certificates/NewCertificate/logic/slice';\r\nimport certificateslistSlice from 'scenes/VirtualSecretary/Certificates/CertificatesList/logic/slice';\r\nimport certificatesdetailsSlice from 'scenes/VirtualSecretary/Certificates/CertificatesDetails/logic/slice';\r\nimport certificateValidatorSlice from 'scenes/VirtualSecretary/CertificateValidator/logic/slice';\r\nimport improvementExamEnrollmentSlice from 'scenes/VirtualSecretary/Enrollments/ImprovementExamEnrollment/logic/slice';\r\nimport examEnrollmentSlice from 'scenes/VirtualSecretary/Enrollments/ExamEnrollment/logic/slice';\r\nimport evaluationTypeSelectionSlice from 'scenes/VirtualSecretary/Enrollments/EvaluationTypeSelection/logic/slice';\r\nimport enrollmentRenewalSlice from 'scenes/VirtualSecretary/Enrollments/EnrollmentRenewal/logic/slice';\r\nimport exams from 'scenes/VirtualSecretary/Enrollments/Exams/logic/slice';\r\nimport transferalCompetence from 'scenes/VirtualSecretary/Enrollments/TransferalCompetence/logic/slice';\r\nimport specialExams from 'scenes/VirtualSecretary/Enrollments/SpecialExamsEnroll/logic/slice';\r\n\r\n\r\nexport const rootReducer = combineReducers({\r\n LogsStudent: logsstudentSlice.reducer,\r\n Logs: logsSlice.reducer,\r\n ExamsCalendar: examsCalendarlSlice.reducer,\r\n ApplicationDetails: applicationdetailsSlice.reducer,\r\n NewApplication: newapplicationSlice.reducer,\r\n RegistrationDetails: registrationdetailsSlice.reducer,\r\n Registrations: registrationsSlice.reducer,\r\n SeriationHistory: seriationhistorySlice.reducer,\r\n SeriationHistoryDetails: seriationhistorydetailsSlice.reducer,\r\n FreeOptionsDropdown: freeOptionsDropdownSlice.reducer,\r\n StudentRegistrationDropdown: studentregistrationdropdownSlice.reducer,\r\n ApplicationsList: applicationslistSlice.reducer,\r\n Payments: paymentsSlice.reducer,\r\n PendingDebitsPayment: pendingDebitsPaymentSlice.reducer,\r\n Grades: gradesSlice.reducer,\r\n AssessmentChoice: assessmentchoiceSlice.reducer,\r\n ExamRegistration: examregistrationSlice.reducer,\r\n SubscriptionRenewal: subscriptionrenewalSlice.reducer,\r\n ClassSupoort: classsupoortSlice.reducer,\r\n CurricularPlan: curricularplanSlice.reducer,\r\n CurricularUnitDetails: curricularUnitDetailsSlice.reducer,\r\n PersonalData: personaldataSlice.reducer,\r\n CreatedSchedule: createdScheduleSlice.reducer,\r\n MySchedules: myschedulesSlice.reducer,\r\n FreeOptionsList: freeOptionsListSlice.reducer,\r\n FreeOptionsTable: freeOptionsTableSlice.reducer,\r\n MandatoryOptionsDropdown: mandatoryOptionsDropdownSlice.reducer,\r\n Toaster: toasterSlice.reducer,\r\n ToasterAction: toasterActionSlice.reducer,\r\n Schedules: schedulesSlice.reducer,\r\n SchedulesHome: schedulesHomeSlice.reducer,\r\n SchedulesGuide: schedulesGuideSlice.reducer,\r\n GradesGuide: gradesGuideSlice.reducer,\r\n Home: homeSlice.reducer,\r\n GradesManagement: gradesManagementSlice.reducer,\r\n EditGrades: editGradesSlice.reducer,\r\n GradesDetails: gradesDetailsSlice.reducer,\r\n GradesHistory: gradesHistorySlice.reducer,\r\n Help: helpSlice.reducer,\r\n App: appSlice.reducer,\r\n AppTools: appToolsSlice.reducer,\r\n Breadcrumb: breadcrumbSlice.reducer,\r\n NewCertificate: newcertificateSlice.reducer,\r\n CertificatesList: certificateslistSlice.reducer,\r\n CertificatesDetails: certificatesdetailsSlice.reducer,\r\n CertificateValidator: certificateValidatorSlice.reducer,\r\n ImprovementExamEnrollment: improvementExamEnrollmentSlice.reducer,\r\n ExamEnrollment: examEnrollmentSlice.reducer,\r\n EvaluationTypeSelection: evaluationTypeSelectionSlice.reducer,\r\n EnrollmentRenewal: enrollmentRenewalSlice.reducer,\r\n Exams: exams.reducer,\r\n TransferalCompetence: transferalCompetence.reducer,\r\n SpecialExams: specialExams.reducer,\r\n});\r\n\r\nexport type RootState = ReturnType;\r\n\r\nexport const actions = {\r\n LogsStudent: logsstudentSlice.actions,\r\n Logs: logsSlice.actions,\r\n ExamsCalendar: examsCalendarlSlice.actions,\r\n ApplicationDetails: applicationdetailsSlice.actions,\r\n NewApplication: newapplicationSlice.actions,\r\n NewCertificate: newcertificateSlice.actions,\r\n RegistrationDetails: registrationdetailsSlice.actions,\r\n Registrations: registrationsSlice.actions,\r\n SeriationHistory: seriationhistorySlice.actions,\r\n SeriationHistoryDetails: seriationhistorydetailsSlice.actions,\r\n FreeOptionsDropdown: freeOptionsDropdownSlice.actions,\r\n StudentRegistrationDropdown: studentregistrationdropdownSlice.actions,\r\n ApplicationsList: applicationslistSlice.actions,\r\n CertificatesList: certificateslistSlice.actions,\r\n CertificatesDetails: certificatesdetailsSlice.actions,\r\n CertificatesValidator: certificateValidatorSlice.actions,\r\n Payments: paymentsSlice.actions,\r\n PendingDebitsPayment: pendingDebitsPaymentSlice.actions,\r\n Grades: gradesSlice.actions,\r\n AssessmentChoice: assessmentchoiceSlice.actions,\r\n ExamRegistration: examregistrationSlice.actions,\r\n SubscriptionRenewal: subscriptionrenewalSlice.actions,\r\n ClassSupoort: classsupoortSlice.actions,\r\n CurricularPlan: curricularplanSlice.actions,\r\n CurricularUnitDetails: curricularUnitDetailsSlice.actions,\r\n PersonalData: personaldataSlice.actions,\r\n CreatedSchedule: createdScheduleSlice.actions,\r\n MySchedules: myschedulesSlice.actions,\r\n FreeOptionsList: freeOptionsListSlice.actions,\r\n FreeOptionsTable: freeOptionsTableSlice.actions,\r\n MandatoryOptionsDropdown: mandatoryOptionsDropdownSlice.actions,\r\n Toaster: toasterSlice.actions,\r\n ToasterAction: toasterActionSlice.actions,\r\n Schedules: schedulesSlice.actions,\r\n SchedulesHome: schedulesHomeSlice.actions,\r\n SchedulesGuide: schedulesGuideSlice.actions,\r\n GradesGuide: gradesGuideSlice.actions,\r\n Home: homeSlice.actions,\r\n GradesManagement: gradesManagementSlice.actions,\r\n EditGrades: editGradesSlice.actions,\r\n GradesDetails: gradesDetailsSlice.actions,\r\n GradesHistory: gradesHistorySlice.actions,\r\n Help: helpSlice.actions,\r\n App: appSlice.actions,\r\n AppTools: appToolsSlice.actions,\r\n Breadcrumb: breadcrumbSlice.actions,\r\n ImprovementExamEnrollment: improvementExamEnrollmentSlice.actions,\r\n ExamEnrollment: examEnrollmentSlice.actions,\r\n EvaluationTypeSelection: evaluationTypeSelectionSlice.actions,\r\n EnrollmentRenewal: enrollmentRenewalSlice.actions,\r\n Exams: exams.actions,\r\n SpecialExams: specialExams.actions,\r\n TransferalCompetence: transferalCompetence.actions,\r\n};\r\n","import React, { useEffect, useState } from 'react';\r\nimport config from 'config';\r\nimport styled from 'styled-components';\r\nimport { Button, DropdownFlags, Loading } from '@paco_ua/pacoui';\r\nimport crypto from 'crypto-browserify';\r\nimport useSignalRConnection from './useSignalRConnection';\r\nimport { HubConnectionState } from '@microsoft/signalr';\r\nimport { t } from 'app';\r\nimport { useDispatch } from 'react-redux';\r\nimport { actions } from 'store/rootSlices';\r\nimport AmaLogo from './CMD-assinatura-2.png';\r\n\r\nconst ModalWrapper = styled.div<{ height?: string }>`\r\n display: flex;\r\n flex-direction: column;\r\n gap: 1rem;\r\n height: ${(props) => props.height || 'auto'};\r\n width: 100%;\r\n position: relative;\r\n flex-grow: 1;\r\n\r\n @media (max-width: 768px) {\r\n gap: 0.5rem;\r\n }\r\n`;\r\n\r\nconst ContentWrapper = styled.div`\r\n display: flex;\r\n gap: 2rem;\r\n flex-grow: 1;\r\n\r\n @media (max-width: 768px) {\r\n flex-direction: column;\r\n gap: 1rem;\r\n }\r\n`;\r\n\r\nconst RightSide = styled.div`\r\n flex: 1;\r\n display: flex;\r\n flex-direction: column;\r\n\r\n @media (max-width: 768px) {\r\n order: 2;\r\n }\r\n`;\r\n\r\nconst StyledContainer = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n gap: 10px;\r\n flex-grow: 1;\r\n justify-content: flex-end;\r\n\r\n @media (max-width: 768px) {\r\n gap: 5px;\r\n }\r\n`;\r\n\r\nconst ModalButtonsContainer = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n gap: 10px;\r\n margin-top: auto;\r\n\r\n @media (max-width: 768px) {\r\n gap: 5px;\r\n }\r\n`;\r\n\r\nconst ModalButtons = styled.div`\r\n display: flex;\r\n justify-content: flex-end;\r\n gap: 1rem;\r\n\r\n @media (max-width: 768px) {\r\n justify-content: center;\r\n gap: 0.5rem;\r\n }\r\n`;\r\n\r\nconst ModalHeader = styled.div`\r\n display: flex;\r\n color: #5e81a9;\r\n justify-content: space-between;\r\n align-items: center;\r\n\r\n @media (max-width: 768px) {\r\n flex-direction: column;\r\n gap: 0.5rem;\r\n }\r\n`;\r\n\r\nconst LeftSide = styled.div`\r\n flex: 1;\r\n\r\n @media (max-width: 768px) {\r\n order: 1;\r\n }\r\n`;\r\n\r\nconst AmaLogoWrapper = styled.div`\r\n width: 4rem;\r\n height: 3rem;\r\n object-fit: container;\r\n\r\n > img {\r\n width: 100%;\r\n height: 100%;\r\n }\r\n`;\r\n\r\nconst FormInputWrapper = styled.div`\r\n margin-bottom: 1rem;\r\n\r\n @media (max-width: 768px) {\r\n margin-bottom: 0.5rem;\r\n }\r\n`;\r\n\r\nconst AmaDescLink = styled.a`\r\n color: #0000ee;\r\n text-decoration: underline;\r\n`;\r\n\r\nconst AmaDesc = styled.div`\r\n background-color: rgba(60, 93, 188, 0.2);\r\n margin-bottom: 1rem;\r\n display: flex;\r\n flex-direction: column;\r\n gap: 0.5rem;\r\n padding: 1rem 0.6rem;\r\n\r\n @media (max-width: 768px) {\r\n padding: 0.5rem 0.3rem;\r\n gap: 0.25rem;\r\n }\r\n`;\r\n\r\nconst FormLabel = styled.label`\r\n display: block;\r\n margin-bottom: 0.5rem;\r\n\r\n @media (max-width: 768px) {\r\n margin-bottom: 0.25rem;\r\n }\r\n`;\r\n\r\nconst FormInput = styled.input`\r\n width: 100%;\r\n padding: 1rem 0.5rem;\r\n border: 1px solid #ccc;\r\n outline: none;\r\n\r\n @media (max-width: 768px) {\r\n padding: 0.5rem 0.25rem;\r\n }\r\n`;\r\n\r\nconst ErrorsWrapper = styled.div`\r\n margin-bottom: 1rem;\r\n\r\n @media (max-width: 768px) {\r\n margin-bottom: 0.5rem;\r\n }\r\n`;\r\n\r\nconst ErrorMessage = styled.p`\r\n color: red;\r\n`;\r\n\r\nconst RedirectToAma = styled.a`\r\n color: #5e81a9;\r\n font-style: italic;\r\n font-size: 0.9em;\r\n`;\r\n\r\nconst PautasList = styled.div`\r\n max-height: 8rem;\r\n overflow-y: auto; padding: 0.5rem;\r\n\r\n @media (max-width: 768px) {\r\n max-height: 6rem;\r\n }\r\n`;\r\n\r\nconst PautaItem = styled.div`\r\n font-size: 0.9em;\r\n padding: 0.1rem 0.3rem 0.1rem 0.1rem;\r\n margin-bottom: 0.2rem;\r\n background-color: #f0f0f0;\r\n`;\r\n\r\nconst PautasListHeader = styled.div`\r\n font-size: 0.9em;\r\n color: #5e81a9;\r\n padding: 0.1rem 0.3rem 0.1rem 0.1rem;\r\n`;\r\n\r\n\r\nconst PautasListWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n gap: 0.5rem;\r\n border: solid 2px #f0f0f0;\r\n padding 0.5rem;\r\n\r\n @media (max-width: 768px) {\r\n gap: 0.25rem;\r\n }\r\n`;\r\n\r\nconst PautasListContainer = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\n\r\nconst AmaSMS = styled.div`\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n border: solid 1px #f0f0f0;\r\n padding: 0.3rem;\r\n margin-top: 1rem;\r\n\r\n > span {\r\n font-size: 0.9em;\r\n }\r\n\r\n @media (max-width: 768px) {\r\n flex-direction: column;\r\n gap: 0.5rem;\r\n padding: 0.15rem;\r\n }\r\n`;\r\n\r\nconst AmaWarning = styled.span`\r\n font-weight: bold;\r\n font-size: 0.9em;\r\n`;\r\n\r\ninterface Props {\r\n onClose: (success?: boolean) => void;\r\n pautas: { paraAssinaturaId: number; codPauta: string }[];\r\n}\r\n\r\nconst SigningModal: React.FC = (props) => {\r\n const { connection, initiateConnection } = useSignalRConnection();\r\n const [phoneNumber, setPhoneNumber] = useState('');\r\n const [selectedCountryCode, setSelectedCountryCode] = useState('+351'); // default to Portugal\r\n const [pin, setPin] = useState('');\r\n const [otp, setOtp] = useState('');\r\n const [processId, setProcessId] = useState(null);\r\n const [errorMessage, setErrorMessage] = useState(null); // State to handle error messages\r\n const [detailErrorMessage, setDetailErrorMessage] = useState(null); // State to handle error messages\r\n const [isLoading, setIsLoading] = useState(false); // state to toggle loading spinner\r\n const dispatch = useDispatch();\r\n\r\n // Regex patterns for validation\r\n const phonePattern = /^[+][0-9]{1,4} [0-9]{5,15}$/; // e.g. +351 912345678\r\n\r\n useEffect(() => {\r\n initiateConnection();\r\n }, []);\r\n\r\n useEffect(() => {\r\n let wsConnClosedWithSuccess = false;\r\n\r\n // Handle the received process ID\r\n connection?.on('ReceiveProcessId', (processId: React.SetStateAction) => {\r\n setProcessId(processId);\r\n setIsLoading(false); // Stop loading spinner after receiving the process ID\r\n });\r\n\r\n // Handle the received PDF data\r\n connection?.on('ReceiveSignedPdf', (data) => {\r\n setIsLoading(false); // Stop loading spinner after receiving the PDF\r\n\r\n const base64Data = data.data;\r\n const fileName = data.fileName;\r\n\r\n const bytes = Uint8Array.from(atob(base64Data), (c) => c.charCodeAt(0));\r\n\r\n // Determine the content type based on file extension\r\n const contentType = fileName.endsWith('.zip') ? 'application/zip' : 'application/pdf';\r\n const blob = new Blob([bytes], { type: contentType });\r\n const link = document.createElement('a');\r\n link.href = window.URL.createObjectURL(blob);\r\n link.download = fileName;\r\n link.click();\r\n window.URL.revokeObjectURL(link.href);\r\n\r\n props.onClose(true);\r\n\r\n // Close the connection after receiving the PDF\r\n if (connection) {\r\n wsConnClosedWithSuccess = true;\r\n\r\n connection\r\n .stop()\r\n .then(() => {\r\n console.log('Connection closed after receiving PDF.');\r\n })\r\n .catch((err: any) => console.error('Error while closing the connection:', err));\r\n }\r\n });\r\n\r\n // Handle the received error messages\r\n connection?.on('Error', (errorMessage: string) => {\r\n setErrorMessage(t('pautas.errorHelpDesk'));\r\n setDetailErrorMessage(processErrorMessage(errorMessage));\r\n setIsLoading(false); // Stop loading spinner in case of an error\r\n });\r\n\r\n // This event handler listens for the connection closing.\r\n // This can be triggered for various reasons such as server restarts,\r\n // network disruptions, or the server intentionally closing the connection.\r\n connection?.onclose(() => {\r\n console.log('WS Connection was closed.');\r\n setErrorMessage(t('pautas.wsConnectionClosed'));\r\n setIsLoading(false);\r\n props.onClose(false);\r\n\r\n // Show toaster only if the connection was closed unexpectedly\r\n if (!wsConnClosedWithSuccess) {\r\n dispatch(actions.Toaster.showToaster({\r\n title: t('pautas.wsConnectionClosed'),\r\n icon: 'info',\r\n type: 'info',\r\n }));\r\n }\r\n });\r\n\r\n // Cleanup: remove the event listeners when the component unmounts\r\n return () => {\r\n connection?.off('ReceiveProcessId');\r\n connection?.off('ReceiveSignedPdf');\r\n connection?.off('Error');\r\n };\r\n }, [connection]);\r\n\r\n const handleInitiateSigning = async () => {\r\n console.log('HandleInitiateSigning Connection ID:', connection?.connectionId);\r\n\r\n if (!config.GRADES_MANAGEMENT_ENCRYPT_DATA_PUBLIC_KEY) {\r\n console.error('Public key not found in environment variables.');\r\n return;\r\n }\r\n\r\n // Clear the previous error message\r\n setErrorMessage(null);\r\n setDetailErrorMessage(null);\r\n\r\n // Validate phone number\r\n const completePhoneNumber = `${selectedCountryCode} ${phoneNumber}`;\r\n\r\n if (!phonePattern.test(completePhoneNumber)) {\r\n setErrorMessage(t('pautas.invalidPhoneNumber'));\r\n return;\r\n }\r\n\r\n // Call the InitiateSigning method on the server\r\n const encryptedPhoneNumber = encryptWithPublicKey(completePhoneNumber, config.GRADES_MANAGEMENT_ENCRYPT_DATA_PUBLIC_KEY);\r\n const encryptedPin = encryptWithPublicKey(pin, config.GRADES_MANAGEMENT_ENCRYPT_DATA_PUBLIC_KEY);\r\n const pautaIds = props.pautas.map(pauta => pauta.paraAssinaturaId);\r\n\r\n setIsLoading(true); // Start loading spinner while waiting for the response\r\n\r\n connection?.invoke('InitiateSigning', encryptedPhoneNumber, encryptedPin, pautaIds).catch((err) => {\r\n setErrorMessage(t('pautas.errorHelpDesk'));\r\n console.error('Error initiating signing:', err);\r\n setIsLoading(false); // Stop loading spinner in case of an error\r\n });\r\n };\r\n\r\n const handleCompleteSigning = async () => {\r\n // Clear the previous error message\r\n setErrorMessage(null);\r\n\r\n if (!processId) {\r\n setErrorMessage(t('pautas.errorHelpDesk'));\r\n console.error('ProcessID is missing. Please initiate signing first.');\r\n return;\r\n }\r\n\r\n // Call the InitiateSigning method on the server\r\n const pautaIds = props.pautas.map(pauta => pauta.paraAssinaturaId);\r\n const encryptedOtp = encryptWithPublicKey(otp, config.GRADES_MANAGEMENT_ENCRYPT_DATA_PUBLIC_KEY);\r\n setIsLoading(true); // Start loading spinner while waiting for the response\r\n\r\n connection?.invoke('CompleteSigning', processId, encryptedOtp, pautaIds).catch((err) => {\r\n setErrorMessage(t('pautas.errorHelpDesk'));\r\n console.error(err);\r\n setIsLoading(false); // Stop loading spinner in case of an error\r\n });\r\n };\r\n\r\n const handleForceSms = async () => {\r\n const completePhoneNumber = `${selectedCountryCode} ${phoneNumber}`;\r\n const encryptedPhoneNumber = encryptWithPublicKey(completePhoneNumber, config.GRADES_MANAGEMENT_ENCRYPT_DATA_PUBLIC_KEY);\r\n\r\n connection?.invoke('ForceSms', processId, encryptedPhoneNumber).catch((err) => {\r\n setErrorMessage(t('pautas.errorHelpDesk'));\r\n console.error(err);\r\n });\r\n }\r\n\r\n const encryptWithPublicKey = (data: string, publicKey: string): string => {\r\n const buffer: Buffer = Buffer.from(data, 'utf8');\r\n const encrypted: Buffer = crypto.publicEncrypt(\r\n {\r\n key: publicKey,\r\n padding: crypto.constants.RSA_PKCS1_PADDING,\r\n },\r\n buffer\r\n );\r\n\r\n return encrypted.toString('base64');\r\n };\r\n\r\n // If the error message contains white spaces, it is from AMA\r\n // If not, it comes from our backend and there should be a key in the translations\r\n const processErrorMessage = (errorMessage: string): string => {\r\n return containsWhitespace(errorMessage) ? errorMessage : t(`pautas.${errorMessage}`)\r\n }\r\n\r\n const containsWhitespace = (str: string): boolean => {\r\n return /\\s/.test(str);\r\n }\r\n\r\n return (\r\n <>\r\n {connection?.state !== HubConnectionState.Connected ? () :\r\n (\r\n \r\n \r\n

    {t('pautas.signingModalTitle')}

    \r\n \r\n AMA Logo\r\n \r\n
    \r\n \r\n \r\n {processId ? (\r\n <>\r\n \r\n \r\n {t('pautas.signAma')}\r\n \r\n {props.pautas.map((pauta) => (\r\n {pauta.codPauta}\r\n ))}\r\n \r\n \r\n \r\n {t('pautas.confirmAmaSign')}\r\n \r\n {t('pautas.sendSmsWarning')}.\r\n \r\n \r\n \r\n ) : (\r\n <>\r\n \r\n {t('pautas.digitalSign')} {t('pautas.digitalKey')}\r\n {t('pautas.digitalSign2')} https://www.autenticacao.gov.pt/\r\n {t('pautas.AmaUaInfo')} \r\n {t('pautas.AmaUaInfoI')} {t('pautas.AmaUaInfoIII')}{t('pautas.AmaUaInfoII')}\r\n \r\n \r\n \r\n {t('pautas.signAma')}\r\n \r\n {props.pautas.map((pauta) => (\r\n {pauta.codPauta}\r\n ))}\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n {processId ? (\r\n <>\r\n \r\n Código de segurança\r\n setOtp(event.target.value)}\r\n value={otp}\r\n />\r\n \r\n\r\n {t('pautas.warningSign')}.\r\n\r\n \r\n {/* Display error message if there's any */}\r\n {(errorMessage || detailErrorMessage) && (\r\n \r\n {detailErrorMessage && {detailErrorMessage}}\r\n {errorMessage && {errorMessage}}\r\n \r\n )}\r\n\r\n {isLoading ? (\r\n \r\n ) : (\r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n ) : (\r\n <>\r\n \r\n {t('pautas.signingModalNumberPlaceholder')}\r\n
    \r\n
    \r\n \r\n
    \r\n setPhoneNumber(event.target.value)}\r\n value={phoneNumber}\r\n />\r\n
    \r\n
    \r\n\r\n \r\n {t('pautas.insertPin')}\r\n setPin(event.target.value)}\r\n value={pin}\r\n />\r\n \r\n\r\n \r\n {/* Display errors messages if there's any */}\r\n {(errorMessage || detailErrorMessage) && (\r\n \r\n {detailErrorMessage && {detailErrorMessage}}\r\n {errorMessage && {errorMessage}}\r\n \r\n )}\r\n\r\n {isLoading ? (\r\n \r\n ) : (\r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n )}\r\n
    \r\n
    \r\n
    \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default SigningModal;","// useSignalRConnection.ts\r\n\r\nimport { useState, useEffect, useRef } from 'react';\r\nimport config from 'config';\r\nimport * as signalR from \"@microsoft/signalr\";\r\n\r\nconst useSignalRConnection = () => {\r\n const [connection, setConnection] = useState(null);\r\n const connectionInitialized = useRef(false);\r\n const user = JSON.parse(localStorage.getItem(\"user\") || \"{}\");\r\n const initiateConnection = async () => {\r\n if (connectionInitialized.current) {\r\n console.warn(\"Connection is already being initialized. No need to re-initiate.\");\r\n return connection;\r\n }\r\n\r\n connectionInitialized.current = true;\r\n\r\n\r\n if (connection && connection.state === signalR.HubConnectionState.Connected) {\r\n console.warn(\"Connection is already established. No need to reconnect.\");\r\n return connection;\r\n }\r\n\r\n // Create a new SignalR connection\r\n const newConnection = new signalR.HubConnectionBuilder()\r\n .withUrl(`${config.API_BASE_URL + config.API_PAUTAS_WEBSOCKET}signingHub`, { accessTokenFactory: () => user.idToken })\r\n .build();\r\n\r\n try {\r\n await newConnection.start();\r\n console.log(\"SignalR connection established. Connection ID:\", newConnection.connectionId);\r\n } catch (err) {\r\n console.error(\"Error while establishing connection:\", err);\r\n }\r\n\r\n setConnection(newConnection);\r\n return newConnection;\r\n };\r\n\r\n useEffect(() => {\r\n return () => {\r\n if (connection && connection.state === signalR.HubConnectionState.Connected) {\r\n connection.stop()\r\n .then(() => console.log(\"Connection closed on hook cleanup\"))\r\n .catch(err => console.error(\"Error while closing the connection on hook cleanup:\", err));\r\n }\r\n };\r\n }, [connection]);\r\n\r\n return {\r\n connection,\r\n initiateConnection\r\n };\r\n};\r\n\r\nexport default useSignalRConnection;\r\n","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAS8AAADeCAYAAABsZ4bQAAAACXBIWXMAABcSAAAXEgFnn9JSAAAKnGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDYgNzkuZGFiYWNiYiwgMjAyMS8wNC8xNC0wMDozOTo0NCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYW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8RaSWVl4i0UtXltaLi84tIvd6wDrBa1eW1uOLzi0h9lqfMv2QdYrWqy2tRxecXkfo06ue56vK6veLzi0h9onWAoaour+sBLRki0huusg4wVKXllTL/GnBFlTNEpBa3psw/YR1iqDpulZgPvFXDHBGpxiAw1zrEcJWXV8r80zTwLy4iY3Zpyvw91iGGq+sm1fOABTXNEpHyLAJOtQ4xklrKK2V+FZ3NDR6oY56IlGIJcHTKfCNvNq/t40Hdi/fTgTvqmikiuS0CDkmZf846yGhq/Wxjt8COAOYB2uRTpHkGgYuBA1Pmn7cOsy4Dg4OD1Z18YGDU77kQ96BTYjPRB8RFmmABcHbK/P3relKVnTEeZuW1mgtxR2AWnVdk+wKTKwskIkMtAx6ic+f8NSnzT43lIJXXergQ8x8sIqNKmS/0Q98X5SUiUhVdaxKRVlJ5iUgrqbxEpJVUXiLSSiovEWkllZeItJLKS0RaSeUlIq2k8hKRVlJ5iUgrqbxEpJVUXiLSSv8PlUfQ+uQAJ+EAAAAASUVORK5CYII=\"","module.exports = __webpack_public_path__ + \"static/media/cc-reta_white.d7bf625f.png\";","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAFZhJREFUeNrs3T92G0eeB/AC5WCzxQ0MnWCpbDNBJzAdTmToBKZPQOgEtMONSJ+A8gkIZZuRk01GKNtMnGw30naZhTeUJVEgge6uP5/Pe/UkvZlngtWFrm/9uro7BAAAAAAAAAAAAAAAAAAgUxNdAL2ade3nrh2lv9933bXbrq279j79e53+BAAKtejah659fEK76tpZ1467dqgrAaAMR0+c+L/WYpC4SIFgpnsBID/THVb+27abrp2qDgBAPo57nvy/FgZUBgBgRJcDB4C/7h1YOAQAMLy+y//b7hlYqgoAwHA+ZtbOBAEAaC8ACAIA0HAAuB8Epg4TALQVAO7vEQAAGgoA928hnDtkANBWAHBZAAAaDgCbywJHDh8AtB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v0XOSj4s79N1YCV8QjAAGL1uaid/g95Vvjnj2WY37v2z3D3OuF/Mz4B2LN1uHuy33917X9r+aUmFR2gWbi7JDA3VgHY46r/TShwl39LAWAj7g04DV4rDMDTrbr2S6ik3N9KANhYdu3nYJMgANtbh7tNfqvaf9FnFf9u8eDF6zX/F+6eG2B/AAAPTfy/pMl/3cIvPGnkwMYqwCJVBGbGOQD3Fou/hbs7y5oyafBgxz0CPwUvGAJo1W2a8OPEf91qJ0waHgCzFAJUBQDaECf9P9Kft613xsR4+FPcIzBPlQHvGQAw6QsADZqmMPAy/SkQAJRj1bV36c+V7hAAdrUJAt+nP2fBZQOAMV2nFX2c7Nfp39e6RQAYslpw+MC/Adh9Rf/QvwEAAAAAAAAAAAAAACr3/wIMAFV+uN1GjdkIAAAAAElFTkSuQmCC\"","import { IPagination, ITranslations } from '@paco_ua/pacoui';\r\nimport { IDropdownOption } from 'shared/types';\r\nimport { BooleanLocale } from 'yup/lib/locale';\r\nexport interface ICallParams {\r\n offset: number;\r\n limit: number;\r\n}\r\n\r\nexport interface IPaymentData {\r\n paymentId: number;\r\n value: number;\r\n paymentType: string;\r\n description: string;\r\n dueDate: string;\r\n paymentDate: string;\r\n billReceiptLink: string;\r\n aTSubmissionDate: string;\r\n receiptState: string;\r\n debitType: string;\r\n}\r\n\r\nexport interface IWEBSOCKET_PAYMENT_MSG {\r\n type: number;\r\n target?: string;\r\n arguments?: IWEBSOCKET_PAYLOAD[];\r\n}\r\n\r\nexport interface IWEBSOCKET_PAYLOAD {\r\n request_payment_id: number;\r\n result: EWEBSOCKET_RESULT;\r\n operation: EWEBSOCKET_PAYMENT_TYPE;\r\n}\r\n\r\nexport enum EWEBSOCKET_PAYMENT_TYPE {\r\n mbway_payment = 'mbway_payment',\r\n mb_payment = 'mb_payment',\r\n}\r\n\r\nexport enum EWEBSOCKET_RESULT {\r\n expired = 'expired',\r\n cancel = 'cancel',\r\n success = 'success',\r\n}\r\n\r\nexport interface IPayments {\r\n data: IPaymentData[];\r\n loading: boolean;\r\n total: number;\r\n}\r\n\r\nexport interface IDebitData {\r\n debitId: number;\r\n debitOriginId: number;\r\n debitAcademicYear: number;\r\n debitDate: string | null;\r\n debitType: string;\r\n description: string;\r\n debitStatus: string;\r\n value: number;\r\n totalValue: number;\r\n coin: string;\r\n dueDate: string | null;\r\n associatedCosts:\r\n | null\r\n | [\r\n {\r\n type: string;\r\n value: number;\r\n copies: number;\r\n debitId: number;\r\n }\r\n ];\r\n //tuitionNumber: number;\r\n}\r\n\r\nexport interface IDebits {\r\n data: IDebitData[];\r\n loading: boolean;\r\n total: number;\r\n}\r\n\r\nexport enum PENDING_DEBIT_STATE {\r\n awaitingPayment = 'awaitingPayment',\r\n awaitingReceiptEmission = 'awaitingReceiptEmission',\r\n}\r\n\r\nexport enum PAYMENT_METHOD {\r\n mb = 'mb',\r\n mbway = 'mbway',\r\n visa = 'visa',\r\n}\r\n\r\nexport interface IPendingDebitsEntry {\r\n debits: IDebitData[];\r\n dueDate: string;\r\n paymentRequestId: number;\r\n totalValue: number;\r\n status: PENDING_DEBIT_STATE.awaitingPayment | PENDING_DEBIT_STATE.awaitingReceiptEmission;\r\n paymentMethod: PAYMENT_METHOD.mb | PAYMENT_METHOD.mbway | PAYMENT_METHOD.visa;\r\n remainingTime: string;\r\n}\r\n\r\nexport interface IInitialState {\r\n payments: IPayments;\r\n debits: IDebits;\r\n multiSelectionModal: boolean;\r\n selectedDebits: IDebitData[];\r\n preSelectedDebits: IDebitData[];\r\n filterParams: {\r\n type: string;\r\n search: string;\r\n };\r\n debitsFilterTypes: IDropdownOption[];\r\n pendingDebits: IPendingDebits;\r\n isMbInfoModalOpened: boolean;\r\n isCancelPaymentsModalOpened: {\r\n id: number;\r\n status: boolean;\r\n };\r\n consultedMbPaymentInfo: {\r\n paymentRequestId: number;\r\n entity: number;\r\n ref: number;\r\n value: string;\r\n dueDate: string;\r\n } | null;\r\n loadingStatus: {\r\n loading: boolean;\r\n mbInfoModalLoading: boolean;\r\n loadingDebitsTable: boolean;\r\n loadingPendingDebitsTable: boolean;\r\n loadingPaymentsTable: boolean;\r\n };\r\n errorStatus: {\r\n errorLoadingMbInfo: boolean;\r\n errorLoadingDebitsTable: boolean;\r\n errorLoadingPendingDebitsTable: boolean;\r\n errorLoadingPaymentsTable: boolean;\r\n };\r\n isSocketActivated: boolean;\r\n}\r\n\r\nexport interface IPaymentMethodsInfoProps {\r\n t: ITranslations;\r\n}\r\n\r\nexport interface IPaymentsTableProps extends IPayments {\r\n t: ITranslations;\r\n fetchPayments(params: ICallParams): void;\r\n}\r\n\r\nexport interface IPendingDebits {\r\n data: IPendingDebitsEntry[];\r\n loading: boolean;\r\n //total: number;\r\n}\r\n\r\nexport interface IPendingDebitsTableProps extends IPendingDebits {\r\n t: ITranslations;\r\n openMbInfoModal: (paymentRequestId) => void;\r\n}\r\n\r\nexport interface IDebitsTableProps extends IDebits {\r\n t: ITranslations;\r\n preSelectedDebits: IDebitData[];\r\n fetchDebits(params: ICallParams): void;\r\n setPreSelectedDebits: (debits) => void;\r\n openPendingDebitsPaymentPage: any;\r\n selectedDebits: IDebitData[];\r\n addFilters: any;\r\n filterParams: any;\r\n}\r\n\r\nexport interface IMultiPaymentsSelectionProps extends IDebits {\r\n setMultiple: (multiple: IDebitData[], any) => void;\r\n fetchUnselectedDebits(params: ICallParams): void;\r\n selectedDebits: IDebitData[];\r\n preSelectedDebits: IDebitData[];\r\n addFilters: any;\r\n filterParams: any;\r\n}\r\n\r\nexport interface IDebitStatus {\r\n UNPAID: string;\r\n IN_DEBIT: string;\r\n AWAITING_PAYMENT: string;\r\n IN_DEBIT_AWAITING_PAYMENT: string;\r\n}\r\n\r\nexport { ITranslations, IPagination };\r\n","import { createGlobalStyle } from 'styled-components';\r\n\r\nexport default createGlobalStyle`\r\n &&&{\r\n html,body {\r\n font-family: ${({ theme }) => theme.type.base};\r\n font-size:16px;\r\n }\r\n\r\n a{\r\n color:inherit;\r\n }\r\n\r\n h1,\r\n h2,\r\n h3,\r\n h4,\r\n h5 {\r\n font-family: ${({ theme }) => theme.type.base};\r\n font-weight: 500;\r\n margin: 0;\r\n }\r\n\r\n }\r\n`;\r\n","/**\r\n * AppTools scene logic selectors\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getAppSlice = (state: RootState) => state.App;\r\nexport const getRoles = (state: RootState) => state.AppTools.roles;\r\n","/**\r\n * AppTools Container\r\n *\r\n * @author Hugo Fonseca \r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport React, { useState } from 'react';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport styled from 'styled-components';\r\nimport { withTranslation, WithTranslation } from 'react-i18next';\r\n\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './logic/selectors';\r\n\r\ninterface IProps extends WithTranslation {\r\n roles?: object;\r\n translationMode?: boolean;\r\n}\r\n\r\nconst AppTools: React.FC = ({ i18n }) => {\r\n const { user, translationsEdit } = useSelector(selectors.getAppSlice);\r\n const roles = useSelector(selectors.getRoles);\r\n const { updateUserRole, impersonateUser, changeLocale, toggleApiTranslationsEdit } = actions.App;\r\n\r\n const dispatch = useDispatch();\r\n\r\n const [openTools, setOpenTools] = useState(false);\r\n const [impersonate, setImpersonate] = useState('');\r\n\r\n return (\r\n \r\n setOpenTools(!openTools)}>\r\n Tools\r\n {'>'}\r\n \r\n \r\n
    \r\n Impersonate User\r\n
    \r\n {\r\n setImpersonate(target.value);\r\n }}\r\n placeholder=\"NMEC\"\r\n />\r\n {\r\n dispatch(impersonateUser(impersonate));\r\n }}\r\n >\r\n OK\r\n \r\n
    \r\n
    \r\n {/*
    \r\n Users\r\n ) => {\r\n dispatch(updateUserRole(event.currentTarget.value));\r\n }}\r\n defaultValue={user.role}\r\n >\r\n \r\n {Object.keys(roles).map((role, key) => (\r\n \r\n ))}\r\n \r\n
    */}\r\n
    \r\n View translations\r\n \r\n
    \r\n\r\n
    \r\n Language\r\n ) => {\r\n dispatch(changeLocale(event.currentTarget.value));\r\n }}\r\n value={i18n.language}\r\n >\r\n \r\n {i18n.options.resources &&\r\n Object.keys(i18n.options.resources).map((key) => (\r\n \r\n ))}\r\n \r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default withTranslation()(AppTools);\r\n\r\nconst Wrapper = styled.div<{ openTools: boolean }>`\r\n display: flex;\r\n flex-direction: row;\r\n position: fixed;\r\n bottom: 10px;\r\n width: 100%;\r\n left: ${({ openTools }) => (openTools ? 'calc(100% - 500px)' : 'calc(100% - 64px)')};\r\n background-color: #1b57fd;\r\n box-shadow: 0 5px 16px 0 rgba(34, 36, 38, 0.46);\r\n z-index: 9999999;\r\n align-items: center;\r\n border-top-left-radius: 5px;\r\n border-bottom-left-radius: 5px;\r\n transition: all 0.3s;\r\n\r\n span {\r\n color: #fce661;\r\n font-size: 12px;\r\n display: block;\r\n margin-bottom: 5px;\r\n }\r\n\r\n button {\r\n margin-left: 5px;\r\n }\r\n`;\r\n\r\nconst Icon = styled.div<{ openTools: boolean }>`\r\n transition: all 0.3s;\r\n transform: rotate(${({ openTools }) => (openTools ? '0deg' : '180deg')});\r\n`;\r\n\r\nconst Tools = styled.div`\r\n padding: 0 10px;\r\n display: flex;\r\n flex-direction: row;\r\n\r\n > div:not(:first-child) {\r\n margin-left: 10px;\r\n }\r\n`;\r\n\r\nconst CloseButton = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n cursor: pointer;\r\n color: #fce661;\r\n font-weight: bold;\r\n padding: 10px 16px;\r\n box-shadow: 5px 0 20px -5px rgba(0, 0, 0, 0.3);\r\n font-size: 14px;\r\n border-top-left-radius: 5px;\r\n border-bottom-left-radius: 5px;\r\n transition: all 0.3s;\r\n\r\n :hover {\r\n background-color: rgba(0, 0, 0, 0.2);\r\n box-shadow: 10px 0 20px -5px rgba(0, 0, 0, 0.5);\r\n }\r\n`;\r\n\r\nconst Switcher = styled.select``;\r\n","/**\r\n * SuperUserTools scene logic selectors\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getAppSlice = (state: RootState) => state.App;\r\nexport const getRoles = (state: RootState) => state.AppTools.roles;\r\n","/**\r\n * SuperUserTools Container\r\n *\r\n * @author Hugo Fonseca \r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport React, { useState } from 'react';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport styled from 'styled-components';\r\nimport { withTranslation, WithTranslation } from 'react-i18next';\r\n\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './logic/selectors';\r\n\r\ninterface IProps extends WithTranslation {\r\n roles?: object;\r\n translationMode?: boolean;\r\n}\r\n\r\nconst SuperUserTools: React.FC = ({ i18n }) => {\r\n const { user } = useSelector(selectors.getAppSlice);\r\n const { impersonateUser, cleanImpersonateUser } = actions.App;\r\n\r\n const dispatch = useDispatch();\r\n\r\n const [openTools, setOpenTools] = useState(false);\r\n const [impersonate, setImpersonate] = useState('');\r\n\r\n return (\r\n \r\n setOpenTools(!openTools)}>\r\n \r\n {user.impersonate && 'USER'} {!user.impersonate && 'SUPERUSER'}\r\n \r\n \r\n {user.impersonate && ({user.impersonate})}\r\n \r\n {'>'}\r\n \r\n \r\n
    \r\n Impersonate User\r\n
    \r\n {\r\n setImpersonate(target.value);\r\n }}\r\n placeholder=\"NMEC\"\r\n />\r\n {\r\n dispatch(impersonateUser(impersonate));\r\n }}\r\n >\r\n OK\r\n \r\n
    \r\n
    \r\n\r\n
    \r\n Restore\r\n
    \r\n {\r\n dispatch(cleanImpersonateUser());\r\n }}\r\n >\r\n Clear\r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default withTranslation()(SuperUserTools);\r\n\r\nconst Wrapper = styled.div<{ openTools: boolean }>`\r\n display: flex;\r\n flex-direction: row;\r\n position: fixed;\r\n bottom: 10px;\r\n width: 100%;\r\n left: ${({ openTools }) => (openTools ? 'calc(100% - 330px)' : 'calc(100% - 100px)')};\r\n background-color: #0eb4bd;\r\n\r\n box-shadow: 0 5px 8px 0 rgba(34, 36, 38, 0.46);\r\n z-index: 9999999;\r\n align-items: center;\r\n transition: all 0.3s;\r\n\r\n span {\r\n color: #fff;\r\n font-size: 12px;\r\n display: block;\r\n margin-bottom: 5px;\r\n }\r\n\r\n input {\r\n width: 80px;\r\n }\r\n\r\n button {\r\n margin-left: 5px;\r\n }\r\n`;\r\n\r\nconst ImpersonatingWrapper = styled.div`\r\n position: absolute;\r\n top: 24px;\r\n font-size:12px;\r\n font-weight\r\n`;\r\n\r\nconst Icon = styled.div<{ openTools: boolean }>`\r\n transition: all 0.3s;\r\n transform: rotate(${({ openTools }) => (openTools ? '0deg' : '180deg')});\r\n`;\r\n\r\nconst Tools = styled.div`\r\n padding: 0 10px;\r\n display: flex;\r\n flex-direction: row;\r\n\r\n > div:not(:first-child) {\r\n margin-left: 10px;\r\n }\r\n`;\r\n\r\nconst CloseButton = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n cursor: pointer;\r\n color: #fff;\r\n font-weight: bold;\r\n padding: 10px 16px;\r\n box-shadow: 5px 0 20px -5px rgba(0, 0, 0, 0.3);\r\n font-size: 14px;\r\n transition: all 0.3s;\r\n width: 100px;\r\n\r\n :hover {\r\n background-color: rgba(0, 0, 0, 0.2);\r\n box-shadow: 10px 0 20px -5px rgba(0, 0, 0, 0.5);\r\n }\r\n`;\r\n","/**\r\n * HelpMessage Component\r\n *\r\n * @author Hugo Fonseca \r\n * @author Nuno Silva \r\n * @author Carlos Silva \r\n */\r\nimport React, { useState } from 'react';\r\nimport styled from 'styled-components';\r\nimport { useForm } from 'react-hook-form';\r\n\r\ninterface IProps {\r\n transKey: string;\r\n onUpdateKeys?: (name: string, form: object) => void;\r\n className?: string;\r\n i18n: any;\r\n}\r\n\r\nconst HelpMessage: React.FC = ({ transKey, i18n, className, onUpdateKeys }) => {\r\n const [isMouseInside, setIsMouseInside] = useState(false);\r\n const [isMouseInsideMessage, setIsMouseInsideMessage] = useState(false);\r\n\r\n const { handleSubmit, register } = useForm();\r\n\r\n const mouseEnter = () => {\r\n setIsMouseInside(true);\r\n };\r\n\r\n const mouseLeave = () => {\r\n setTimeout(() => {\r\n if (!isMouseInsideMessage) {\r\n setIsMouseInside(false);\r\n }\r\n }, 300);\r\n };\r\n\r\n const mouseEnterInside = () => {\r\n setIsMouseInsideMessage(true);\r\n };\r\n\r\n const mouseLeaveInside = () => {\r\n setIsMouseInsideMessage(false);\r\n setIsMouseInside(false);\r\n };\r\n\r\n const onClick = (e) => {\r\n e.stopPropagation();\r\n };\r\n\r\n const name = transKey.split('.')[0];\r\n let translationKeys: any[] = [];\r\n Object.keys(i18n.options.resources).forEach((language) => {\r\n const properties = i18n.options.resources[language].translation[name];\r\n translationKeys = Object.keys(properties).filter((property) =>\r\n property.includes(transKey.split('.')[1])\r\n );\r\n });\r\n\r\n return (\r\n \r\n {isMouseInside && (\r\n \r\n \r\n {translationKeys.map((translationKey, id) => (\r\n \r\n {translationKey}\r\n
    \r\n {Object.keys(i18n.options.resources).map((key) => (\r\n \r\n {key}:\r\n \r\n \r\n ))}\r\n
    \r\n ))}\r\n
    \r\n {\r\n onUpdateKeys && handleSubmit((values) => onUpdateKeys(name, values))();\r\n }}\r\n >\r\n UPDATE\r\n \r\n
    \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default HelpMessage;\r\n\r\nconst IconWrapper = styled.span`\r\n position: absolute;\r\n left: -10px;\r\n top: -10px;\r\n right: -10px;\r\n bottom: -10px;\r\n border: 2px dashed cornflowerblue;\r\n z-index: 999999;\r\n`;\r\n\r\nconst IconMessage = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n width: 100%;\r\n color: #616161;\r\n font-size: 14px;\r\n line-height: 20px;\r\n text-align: center;\r\n font-weight: normal;\r\n\r\n &:not(:last-child) {\r\n border-right: 1px solid black;\r\n padding-right: 10px;\r\n }\r\n\r\n &:not(:first-child) {\r\n padding-left: 10px;\r\n }\r\n`;\r\n\r\nconst OverlayWrapper = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n position: absolute;\r\n background-color: #ffffff;\r\n border-radius: 4px;\r\n height: auto;\r\n border: 1px solid rgba(212, 212, 213, 0.28);\r\n box-shadow: 0px 0px 7px rgba(204, 204, 204, 0.39);\r\n`;\r\n\r\nconst KeysWrapper = styled.div`\r\n display: flex;\r\n padding: 5px;\r\n`;\r\n\r\nconst Flex = styled.div`\r\n display: flex;\r\n`;\r\n","/**\r\n * Translation Container\r\n *\r\n * @author Hugo Fonseca \r\n * @author Carlos Silva \r\n */\r\nimport React from 'react';\r\nimport styled from 'styled-components';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { withTranslation, WithTranslation } from 'react-i18next';\r\nimport { Trans } from 'react-i18next';\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport { Text } from '@paco_ua/pacoui';\r\n\r\nimport HelpMessage from './message';\r\nimport * as selectors from '../logic/selectors';\r\n\r\ninterface IProps extends WithTranslation {\r\n tKey: string;\r\n options?: any;\r\n}\r\n\r\nconst Translation: React.FC = ({ t, i18n, tKey, options }) => {\r\n const translationsEdit = useSelector(selectors.getTranslationsEdit);\r\n\r\n const { updateApiTranslation } = actions.App;\r\n\r\n const dispatch = useDispatch();\r\n\r\n return (\r\n \r\n ,\r\n link: ,\r\n a: ,\r\n strong: ,\r\n b: ,\r\n //p:

    ,\r\n }}\r\n />\r\n\r\n {translationsEdit && (\r\n \r\n dispatch(updateApiTranslation({ name, form }))\r\n }\r\n transKey={tKey}\r\n />\r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default withTranslation()(Translation);\r\n\r\nconst Wrapper = styled.span`\r\n position: relative;\r\n`;\r\n\r\nconst Link = styled.a`\r\n color: ${({ theme }) => theme.colors.primary} !important;\r\n`;\r\n","/**\r\n * Toaster container logic selectors\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getToasterSlice = (state: RootState) => state.Toaster;\r\n","/**\r\n * Toaster container\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\nimport React, { useContext, useEffect, useRef } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\n\r\nimport { ResponsiveLayout } from '@paco_ua/pacoui';\r\n\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './logic/selectors';\r\n\r\nimport { Message, Transition } from 'semantic-ui-react';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faTimes } from '@fortawesome/pro-regular-svg-icons';\r\nimport { faCheckCircle, faInfoCircle, faTimesSquare } from '@fortawesome/pro-light-svg-icons';\r\n\r\nconst Toaster: React.FC = () => {\r\n const timeout = useRef(null);\r\n const dispatch = useDispatch();\r\n const theme = useContext(ThemeContext);\r\n const { showing, toast } = useSelector(selectors.getToasterSlice);\r\n\r\n const { title, body, icon, type } = toast;\r\n const { closeToaster } = actions.Toaster;\r\n\r\n const getIcon = () => {\r\n switch (icon) {\r\n case 'check':\r\n return faCheckCircle;\r\n case 'info':\r\n return faInfoCircle;\r\n case 'error':\r\n return faTimesSquare;\r\n default:\r\n return faInfoCircle;\r\n }\r\n };\r\n\r\n const getTypeColor = () => {\r\n switch (type) {\r\n case 'success':\r\n return theme.colors.successGreen;\r\n case 'danger':\r\n return theme.colors.dangerRed;\r\n case 'warning':\r\n return theme.colors.decisionYellow;\r\n case 'info':\r\n return theme.colors.regularGrey;\r\n default:\r\n return theme.colors.regularGrey;\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (showing) {\r\n if (timeout.current !== null) {\r\n clearTimeout(timeout.current);\r\n timeout.current = null;\r\n }\r\n timeout.current = setTimeout(() => {\r\n clearTimeout(timeout.current);\r\n timeout.current = null;\r\n dispatch(closeToaster());\r\n }, 8000);\r\n }\r\n }, [showing]);\r\n\r\n const ToastContent = (\r\n <>\r\n dispatch(closeToaster())}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {title}\r\n \r\n \r\n {body && (\r\n \r\n

    {body}

    \r\n \r\n )}\r\n \r\n \r\n );\r\n\r\n return (\r\n \r\n \r\n {ToastContent}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default Toaster;\r\n\r\nconst Wrapper = styled.div<{ toastsize: string }>`\r\n position: absolute;\r\n top: 0;\r\n left: calc(50% - ${({ toastsize }) => toastsize} / 2);\r\n z-index: 9999;\r\n`;\r\n\r\nconst Toast = styled(Message)<{ toastsize: string }>`\r\n &&& {\r\n width: ${({ toastsize }) => toastsize};\r\n margin: 0;\r\n padding: 32px;\r\n background-color: ${({ theme }) => theme.colors.white};\r\n color: ${({ theme }) => theme.colors.regularGrey};\r\n border-radius: 0;\r\n box-shadow: ${({ theme }) => theme.shadows.strong};\r\n z-index: 9999;\r\n }\r\n`;\r\n\r\nconst CloseIconWrapper = styled.div`\r\n position: absolute;\r\n top: 13px;\r\n right: 13px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n width: 22px;\r\n height: 22px;\r\n color: ${({ theme }) => theme.colors.grey};\r\n font-size: 18px;\r\n cursor: pointer;\r\n`;\r\n\r\nconst MessageWrapper = styled.div``;\r\n\r\nconst TitleWrapper = styled.div`\r\n display: flex;\r\n align-items: center;\r\n\r\n span {\r\n font-size: 15px;\r\n }\r\n`;\r\n\r\nconst IconWrapper = styled.div`\r\n width: 48px;\r\n height: 48px;\r\n color: ${({ color }) => color};\r\n font-size: 48px;\r\n`;\r\n\r\nconst MessageTitle = styled.div`\r\n margin-left: 24px;\r\n color: ${({ color }) => color};\r\n`;\r\n\r\nconst MessageBody = styled.div`\r\n margin-left: 72px;\r\n color: ${({ theme }) => theme.colors.blackLight};\r\n font-weight: 400;\r\n font-size: ${({ theme }) => theme.sizes.small};\r\n`;\r\n","/**\r\n * Toaster container logic selectors\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getToasterActionSlice = (state: RootState) => state.ToasterAction;\r\n","/**\r\n * ToasterAction container\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\nimport React, { useContext } from 'react';\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { useDispatch, useSelector } from 'react-redux';\r\n\r\nimport { Button } from '@paco_ua/pacoui';\r\n\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './logic/selectors';\r\n\r\nimport { Message, Transition } from 'semantic-ui-react';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faCookieBite } from '@fortawesome/pro-light-svg-icons';\r\n\r\nconst ToasterAction: React.FC = () => {\r\n const dispatch = useDispatch();\r\n const theme = useContext(ThemeContext);\r\n const { showing, toast, displayToaster } = useSelector(selectors.getToasterActionSlice);\r\n\r\n const { title, buttonTitle, cancelTitle, onAccept, onCancel } = toast;\r\n const { closeToasterAction } = actions.ToasterAction;\r\n\r\n const ToastContent = (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n {title}\r\n \r\n \r\n {\r\n onCancel && onCancel();\r\n dispatch(closeToasterAction());\r\n }}\r\n >\r\n {cancelTitle}\r\n \r\n {\r\n onAccept && onAccept();\r\n dispatch(closeToasterAction());\r\n }}\r\n >\r\n {buttonTitle}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n\r\n if (!displayToaster) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n {ToastContent}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default ToasterAction;\r\n\r\nconst Wrapper = styled.div`\r\n &&& {\r\n position: fixed;\r\n bottom: 30px;\r\n z-index: 9999;\r\n display: flex !important;\r\n justify-content: center;\r\n width: 100%;\r\n padding: 0 3rem;\r\n }\r\n`;\r\n\r\nconst BodyWrapper = styled.div``;\r\n\r\nconst Toast = styled(Message)<{ toastsize: string }>`\r\n &&& {\r\n padding: 0;\r\n width: ${({ toastsize }) => toastsize};\r\n background-color: ${({ theme }) => theme.colors.white};\r\n color: ${({ theme }) => theme.colors.regularGrey};\r\n border-radius: 0;\r\n box-shadow: ${({ theme }) => theme.shadows.strong};\r\n z-index: 9999;\r\n }\r\n`;\r\n\r\nconst MessageWrapper = styled.div`\r\n display: flex;\r\n`;\r\n\r\nconst TitleWrapper = styled.div`\r\n display: flex;\r\n align-items: center;\r\n padding: 24px;\r\n display: flex;\r\n justify-content: center;\r\n color: ${({ color }) => color};\r\n font-weight: 300;\r\n`;\r\n\r\nconst IconWrapper = styled.div`\r\n padding: 0 12px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n background-color: ${({ color }) => color};\r\n color: ${({ theme }) => theme.colors.white};\r\n font-size: 48px;\r\n`;\r\n\r\nconst MessageBody = styled.div`\r\n margin: 0;\r\n padding: 0 24px 24px 24px;\r\n display: flex;\r\n justify-content: flex-end;\r\n color: ${({ color }) => color};\r\n\r\n > button:not(:last-child) {\r\n margin-right: 24px;\r\n }\r\n`;\r\n","import { RootState } from 'store/rootSlices';\r\n\r\nexport const getBreadcrumbSelector = (state: RootState) => state.Breadcrumb;","import React, { useEffect } from 'react';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\n\r\nimport { Breadcrumb as BreadcrumbUi } from '@paco_ua/pacoui';\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport * as selectors from './logic/selectors';\r\nimport * as appSelectors from 'app/logic/selectors';\r\n\r\nimport { getPathToPage } from './utils';\r\n\r\nimport { history, getCurrentRoute } from 'utils';\r\n\r\ninterface IProps {\r\n loading?: boolean;\r\n}\r\n\r\nconst Breadcrumb: React.FC = ({ loading }) => {\r\n const { pathElemsList } = useSelector(selectors.getBreadcrumbSelector);\r\n const user = useSelector(appSelectors.getUser);\r\n const { routingStructure } = useSelector(appSelectors.getAppSlice);\r\n\r\n const userRoles = user.roles;\r\n\r\n const dispatch = useDispatch();\r\n const { navigateTo } = actions.App;\r\n\r\n // run onMount and when userRole changes value\r\n useEffect(() => {\r\n const currentRoute = getCurrentRoute();\r\n currentRoute && dispatch(actions.Breadcrumb.setPath(getRoutes(currentRoute.route)));\r\n }, [dispatch, userRoles, routingStructure]);\r\n\r\n history.listen(() => {\r\n const currentRoute = getCurrentRoute();\r\n currentRoute && dispatch(actions.Breadcrumb.setPath(getRoutes(currentRoute.route)));\r\n });\r\n\r\n const getRoutes = (location) => {\r\n return getPathToPage(location, routingStructure);\r\n };\r\n\r\n return (\r\n {\r\n dispatch(navigateTo({ key: key }));\r\n }}\r\n paths={pathElemsList}\r\n />\r\n );\r\n};\r\n\r\nexport default Breadcrumb;\r\n","/**\r\n * Header container logic selectors\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getAppSlice = (state: RootState) => state.App;\r\n","/**\r\n * Header utils\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport { t } from 'app';\r\n\r\nexport const getLanguageName = (locale) => {\r\n if (locale.includes('pt')) {\r\n return 'EN';\r\n } else {\r\n return 'PT';\r\n }\r\n};\r\n\r\nexport const getResults = (query, user, Routes) =>\r\n query &&\r\n Routes.filter(\r\n (route) =>\r\n !route.disabled &&\r\n (!route.roles ||\r\n route?.roles.some((role) => user.roles.some((userRole) => userRole === role)))\r\n )\r\n .map((route) => ({\r\n key: route.key,\r\n text: t(`routes.${route.name}`, { textOnly: true }),\r\n value: route.key,\r\n }))\r\n .filter(\r\n (route) =>\r\n route.text.toLowerCase().includes(query.toLowerCase()) && !route.text.includes('routes.')\r\n );\r\n","/**\r\n * Header component\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport React, { useContext, useState } from 'react';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\n\r\nimport { t } from 'app';\r\n\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './selectors';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faBars } from '@fortawesome/pro-regular-svg-icons';\r\nimport { faSearch } from '@fortawesome/pro-light-svg-icons';\r\n\r\nimport {\r\n AnimatedBackground,\r\n Tooltip,\r\n ResponsiveLayout,\r\n Text,\r\n Logo,\r\n Button,\r\n Dropdown,\r\n SearchInput,\r\n} from '@paco_ua/pacoui';\r\n\r\nimport { getLanguageName } from './utils';\r\n\r\nimport { getPathToPage } from 'shared/containers/Breadcrumb/utils';\r\n\r\nimport API from 'api';\r\n\r\nconst Header: React.FC<{ hasSidebar?: boolean }> = ({ hasSidebar }) => {\r\n const [search, setSearch] = useState(false);\r\n const [searchResults, setSearchResults] = useState([] as any);\r\n\r\n const { toggleSidebar, navigateTo, signout, changeLocale } = actions.App;\r\n const dispatch = useDispatch();\r\n const { user, currentLocale, startingApp, routingStructure } = useSelector(selectors.getAppSlice);\r\n\r\n const [loadingSearchResults, setLoadingSearchResults] = useState(false);\r\n\r\n const theme = useContext(ThemeContext);\r\n\r\n interface ISearchResult {\r\n childOf: string | null;\r\n description: string;\r\n service: undefined | string;\r\n key: string;\r\n name: string;\r\n path: string;\r\n pathEn: string;\r\n roles: string[];\r\n tags: string[];\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n {startingApp && }\r\n\r\n {!startingApp && hasSidebar && (\r\n dispatch(toggleSidebar())}\r\n data-testid=\"header_button_hamburguer\"\r\n >\r\n \r\n \r\n )}\r\n\r\n \r\n {startingApp && }\r\n {!startingApp && (\r\n \r\n )}\r\n \r\n \r\n\r\n (\r\n {\r\n if (!startingApp) {\r\n dispatch(navigateTo({ key: 'home' }));\r\n }\r\n }}\r\n >\r\n {startingApp && }\r\n {!startingApp && 'paco'}\r\n \r\n )}\r\n tablet={() => null}\r\n mobile={() => null}\r\n />\r\n \r\n\r\n \r\n {startingApp && }\r\n {!startingApp && (\r\n <>\r\n \r\n {\r\n setSearch(false);\r\n }}\r\n onSelect={(data) => {\r\n setSearch(false);\r\n setSearchResults([]);\r\n let value = {\r\n name: data.value.split(' , ')[0],\r\n link: data.value.split(' , ')[1],\r\n };\r\n\r\n if (value.link !== '') {\r\n window.open(value.link, '_self');\r\n } else {\r\n dispatch(navigateTo({ key: value.name }));\r\n }\r\n }}\r\n loadingSearchResults={loadingSearchResults}\r\n setLoadingSearchResults={(state) => {\r\n setLoadingSearchResults(state);\r\n }}\r\n onSearch={(value) => {\r\n //proceed only if value length is > 3\r\n if (value.length < 3) {\r\n setLoadingSearchResults(false);\r\n return;\r\n }\r\n try {\r\n API.search.getFunctionalitiesSearch.call(value).then((value: any[]) => {\r\n let dropdownValues = [] as any[];\r\n\r\n for (let i = 0; i < value.length; i++) {\r\n let text = '';\r\n\r\n const searchRoute = routingStructure.find(\r\n (route) => route.key === value[i].key\r\n );\r\n\r\n if (searchRoute) {\r\n const breadcrumbPath = getPathToPage(searchRoute, routingStructure);\r\n\r\n if (breadcrumbPath.length === 1) {\r\n text += `${breadcrumbPath[0].name}`;\r\n } else if (breadcrumbPath.length > 1) {\r\n text += `${breadcrumbPath[0].name} > ${\r\n breadcrumbPath[breadcrumbPath.length - 1].name\r\n }`;\r\n } else {\r\n text = `${t(`routes.${value[i].name}`, {\r\n textOnly: true,\r\n })}`;\r\n }\r\n\r\n dropdownValues.push({\r\n key: value[i].key,\r\n text: (\r\n \r\n {text}\r\n {value[i].description !== '' && (\r\n \r\n {t(`routes.${value[i].description}`, { textOnly: true })}\r\n \r\n )}\r\n \r\n ),\r\n value: `${value[i].key} , ${value[i].link}`,\r\n });\r\n }\r\n }\r\n setSearchResults(dropdownValues);\r\n setLoadingSearchResults(false);\r\n });\r\n } catch (e) {\r\n dispatch(\r\n actions.Toaster.showToaster({\r\n title: t('secVirtualNotifications.general_errorSearch'),\r\n icon: 'error',\r\n type: 'danger',\r\n })\r\n );\r\n\r\n setLoadingSearchResults(false);\r\n }\r\n }}\r\n resetSearchResults={() => {\r\n setSearchResults([]);\r\n }}\r\n results={searchResults}\r\n placeholder={t('generic.pacoSearchPlaceholder', { textOnly: true })}\r\n />\r\n \r\n {!search && (\r\n <>\r\n \r\n
    \r\n {currentLocale && (\r\n {\r\n let currentLang = getLanguageName(currentLocale);\r\n if (currentLang === 'EN') {\r\n dispatch(changeLocale('en'));\r\n } else {\r\n dispatch(changeLocale('pt'));\r\n }\r\n dispatch(navigateTo({ key: 'home' }));\r\n }}\r\n color={theme.colors.white}\r\n >\r\n {getLanguageName(currentLocale)}\r\n \r\n }\r\n />\r\n )}\r\n
    \r\n
    \r\n {\r\n setSearch(true);\r\n }}\r\n color={theme.colors.white}\r\n >\r\n \r\n \r\n }\r\n />\r\n
    \r\n
    \r\n \r\n )}\r\n \r\n )}\r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default Header;\r\n\r\nconst Wrapper = styled.div<{ search: boolean }>`\r\n width: 100%;\r\n height: ${({ theme }) => theme.header.height};\r\n display: flex;\r\n align-items: center;\r\n padding: 0 40px;\r\n background-color: ${({ search, theme }) => (search ? theme.colors.white : theme.colors.primary)};\r\n color: ${({ search, theme }) => (search ? theme.colors.plusDarkGrey : theme.colors.white)};\r\n transition: background 0.3s ease-in, color 0.2s ease-in;\r\n\r\n svg {\r\n transition: background 0.3s ease-in, color 0.2s ease-in, fill 0.2s ease-in;\r\n }\r\n\r\n /* ${({ theme }) => theme.medias.xs} {\r\n max-height: 60px;\r\n } */\r\n\r\n @media(max-width: 915px) {\r\n max-height: 60px;\r\n }\r\n\r\n /* ${({ theme }) => theme.medias.sm} {\r\n max-height: 60px;\r\n } */\r\n`;\r\n\r\nconst LogoWrapper = styled.div`\r\n height: auto;\r\n margin-left: 38px;\r\n display: flex;\r\n justify-content: flex-start;\r\n align-items: center;\r\n`;\r\n\r\nconst SidebarAreaWrapper = styled.div`\r\n display: flex;\r\n justify-content: flex-start;\r\n align-items: center;\r\n width: calc(${({ theme }) => theme.sidebar.width} - 40px);\r\n`;\r\n\r\nconst LeftAreaWrapper = styled.div`\r\n display: flex;\r\n justify-content: flex-start;\r\n align-items: center;\r\n`;\r\n\r\nconst RightAreaWrapper = styled.div`\r\n flex: 1;\r\n display: flex;\r\n justify-content: flex-end;\r\n align-items: center;\r\n`;\r\n\r\nconst SearchInputWrapper = styled.div`\r\n position: absolute;\r\n`;\r\n\r\nconst Tools = styled.div`\r\n display: flex;\r\n justify-content: flex-end;\r\n align-items: center;\r\n\r\n > div {\r\n &:first-child {\r\n border-right: ${({ theme }) => `1px solid ${theme.colors.softRegularGrey}`};\r\n }\r\n\r\n &:not(last-child) {\r\n padding: 0 12px 0 12px;\r\n }\r\n\r\n &:last-child {\r\n padding: 0 0 0 12px;\r\n }\r\n }\r\n`;\r\n\r\nconst Hamburger = styled(Button)``;\r\n\r\nconst BrandName = styled.div<{ padding?: boolean }>`\r\n font-size: 1.75rem;\r\n margin-left: 40px;\r\n font-weight: 200;\r\n padding-top: ${({ padding }) => (padding ? '8px' : '0')};\r\n cursor: pointer;\r\n`;\r\n\r\nconst SearchTextWrapper = styled.div<{ hasDescription: boolean }>`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n div:first-child {\r\n margin-bottom: ${({ hasDescription }) => (hasDescription ? '4px' : '0px')};\r\n }\r\n`;\r\n\r\nconst DropdownUser = styled(Dropdown)`\r\n margin-left: 24px;\r\n`;\r\n","/**\r\n * SystemBar container logic selectors\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getAppSlice = (state: RootState) => state.App;\r\n","import React, { useContext } from 'react';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\n\r\nimport styled, { ThemeContext } from 'styled-components';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faUser } from '@fortawesome/free-solid-svg-icons';\r\n\r\nimport * as selectors from './selectors';\r\n\r\n//import '@uaveiro/systems-bar';\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport { AnimatedBackground, Text } from '@paco_ua/pacoui';\r\n\r\nimport { redirectAuth } from 'app/utils';\r\nimport { t } from 'app';\r\n\r\nconst SystemBar = () => {\r\n const { signout } = actions.App;\r\n\r\n const { user, startingApp } = useSelector(selectors.getAppSlice);\r\n const dispatch = useDispatch();\r\n\r\n const theme = useContext(ThemeContext);\r\n\r\n return (\r\n \r\n \r\n {startingApp && }\r\n {!startingApp && (\r\n <>\r\n \r\n {\r\n window.open('https://www.ua.pt/noticias', '_blank');\r\n }}\r\n >\r\n Notícias\r\n \r\n \r\n \r\n {\r\n window.open('https://www.ua.pt/agenda', '_blank');\r\n }}\r\n >\r\n Agenda\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n {startingApp && }\r\n {!startingApp && (\r\n <>\r\n {!user.accessToken && (\r\n \r\n {\r\n redirectAuth();\r\n }}\r\n data-testid=\"header_button_login\"\r\n >\r\n entrar\r\n \r\n \r\n \r\n )}\r\n {user.accessToken && (\r\n <>\r\n {user.fullName && (\r\n <>\r\n \r\n {user.fullName}\r\n \r\n \r\n \r\n |\r\n \r\n \r\n \r\n )}\r\n \r\n {\r\n dispatch(signout());\r\n }}\r\n >\r\n {t('generic.logout')}\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default SystemBar;\r\n\r\nconst Wrapper = styled.div`\r\n max-height: 40px;\r\n min-height: 40px;\r\n height: 40px;\r\n width: 100%;\r\n background-color: ${({ theme }) => theme.colors.white};\r\n display: flex;\r\n justify-content: space-between;\r\n display: flex;\r\n align-items: center;\r\n padding: 0 40px;\r\n`;\r\n\r\nconst LinksWrapper = styled.div`\r\n display: flex;\r\n align-items: center;\r\n\r\n div:not(:last-child) {\r\n border-right: 1px solid ${({ theme }) => theme.colors.systemBar.grey};\r\n padding-right: 10px;\r\n }\r\n\r\n div:not(:first-child) {\r\n padding-left: 10px;\r\n }\r\n`;\r\n\r\nconst Link = styled.div`\r\n padding: 3px 0;\r\n\r\n &:hover {\r\n text-decoration: underline;\r\n text-decoration-color: ${({ theme }) => theme.colors.black};\r\n\r\n cursor: pointer;\r\n opacity: 0.8;\r\n }\r\n`;\r\n\r\nconst UserWrapper = styled.div`\r\n display: flex;\r\n align-items: center;\r\n\r\n svg {\r\n margin-left: 8px;\r\n color: ${({ theme }) => theme.colors.institutional};\r\n }\r\n`;\r\n\r\nconst LinkWrapper = styled.div`\r\n &:hover {\r\n text-decoration: underline;\r\n text-decoration-color: ${({ theme }) => theme.colors.institutional};\r\n\r\n cursor: pointer;\r\n opacity: 0.8;\r\n }\r\n`;\r\n\r\nconst Separator = styled.div`\r\n margin: 0 10px;\r\n`;\r\n","/**\r\n * Sidebar container logic selectors\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getAppSlice = (state: RootState) => state.App;\r\nexport const getSidebarOpening = (state: RootState) => state.App.isSidebarOpen;\r\n","/**\r\n * Sidebar mobile component\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport React from 'react';\r\nimport styled from 'styled-components';\r\n\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faAngleDown } from '@fortawesome/pro-light-svg-icons';\r\n\r\ninterface IProps {\r\n isSidebarOpen: boolean;\r\n sidebarLinks: {\r\n title: string;\r\n collapsed: boolean;\r\n path: string | null;\r\n key: string | null;\r\n link: string | null;\r\n selected: boolean;\r\n disabled: boolean;\r\n subLinks: {\r\n id: number;\r\n title: string;\r\n collapsed?: boolean;\r\n path: string | null;\r\n link: string | null;\r\n selected: boolean;\r\n disabled: boolean;\r\n subLinks?: any;\r\n }[];\r\n }[];\r\n collapseLink: (id: number, value?: boolean) => {};\r\n collapseSubLink: Function;\r\n goTo: (path: string | null, link: string | null) => {};\r\n}\r\n\r\nconst Sidebar: React.FC = ({\r\n isSidebarOpen,\r\n sidebarLinks,\r\n collapseLink,\r\n collapseSubLink,\r\n goTo,\r\n}) => {\r\n return (\r\n \r\n \r\n \r\n \r\n {sidebarLinks.map((link, index) => (\r\n
    \r\n {\r\n link.subLinks\r\n ? collapseLink(index, undefined)\r\n : !link.disabled && goTo(link.path, link.link);\r\n }}\r\n >\r\n {link.title}\r\n {link.subLinks && (\r\n \r\n \r\n \r\n )}\r\n \r\n {link.subLinks && (\r\n \r\n {link.subLinks.map((subLink, subLinkIndex) => (\r\n \r\n {\r\n subLink.subLinks\r\n ? collapseSubLink(index, subLinkIndex)\r\n : !subLink.disabled && goTo(subLink.path, subLink.link);\r\n }}\r\n >\r\n {subLink.title}\r\n {subLink.subLinks && (\r\n \r\n \r\n \r\n )}\r\n \r\n {subLink.subLinks &&\r\n subLink.subLinks.map((subSubLink, i) => (\r\n {\r\n !subSubLink.disabled && goTo(subSubLink.path, subSubLink.link);\r\n }}\r\n >\r\n {subSubLink.title}\r\n \r\n ))}\r\n \r\n ))}\r\n \r\n )}\r\n
    \r\n ))}\r\n
    \r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n\r\nexport default Sidebar;\r\n\r\nconst Wrapper = styled.div`\r\n position: relative;\r\n top: 0;\r\n bottom: 0;\r\n z-index: 900;\r\n`;\r\n\r\nconst Content = styled.div<{ isSidebarOpen: boolean }>`\r\n position: absolute;\r\n top: 0;\r\n bottom: 0;\r\n width: ${({ theme }) => theme.sidebar.width};\r\n margin-left: ${({ isSidebarOpen }) => (isSidebarOpen ? '0' : '-380px')};\r\n transition: margin 0.3s ease-in-out;\r\n background-color: ${({ theme }) => theme.colors.plusDarkGrey};\r\n`;\r\n\r\nconst StickyWrapper = styled.div`\r\n position: sticky;\r\n top: ${({ theme }) => theme.header.height};\r\n`;\r\n\r\nconst RefLinks = styled.div`\r\n margin-top: 16px;\r\n display: flex;\r\n flex-direction: column;\r\n overflow-x: auto;\r\n height: calc(100% - 112px);\r\n max-height: calc(90vh - 36px);\r\n\r\n ::-webkit-scrollbar {\r\n width: 0; /* Remove scrollbar space */\r\n background: transparent; /* Optional: just make scrollbar invisible */\r\n }\r\n\r\n // IE and Edge\r\n -ms-overflow-style: none;\r\n\r\n // Firefox\r\n scrollbar-width: none;\r\n`;\r\n\r\ninterface IRefLink {\r\n selected: boolean;\r\n collapsed: boolean;\r\n disabled: boolean;\r\n}\r\n\r\nconst RefLink = styled.div`\r\n position: relative;\r\n height: 48px;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n cursor: pointer;\r\n padding: 0 16px 0 24px;\r\n font-size: 14px;\r\n font-weight: ${({ collapsed, selected }) => (collapsed || selected ? '500' : '400')};\r\n color: ${({ theme, selected, collapsed }) =>\r\n selected || collapsed\r\n ? selected\r\n ? theme.colors.white\r\n : theme.colors.white\r\n : theme.colors.regularGrey};\r\n text-transform: uppercase;\r\n\r\n &:hover {\r\n color: ${({ theme, disabled }) => !disabled && theme.colors.white};\r\n }\r\n\r\n &:after {\r\n content: '';\r\n background-color: ${({ theme, disabled }) =>\r\n !disabled ? theme.colors.primary : `rgba(0,0,0,0.5)`};\r\n cursor: not-allowed;\r\n position: absolute;\r\n left: 0;\r\n width: ${({ disabled }) => (!disabled ? `4px` : `100%`)};\r\n transform: scaleY(${({ selected, disabled }) => (!disabled ? (selected ? '1' : '0') : '1')});\r\n position: absolute;\r\n top: ${({ disabled }) => (!disabled ? `14px` : `0`)};\r\n bottom: ${({ disabled }) => (!disabled ? `14px` : `0`)};\r\n transition: transform 0.2s ease-in-out;\r\n }\r\n`;\r\n\r\nconst Angle = styled.div<{ collapsed: boolean }>`\r\n transform: ${({ collapsed }) => (collapsed ? 'rotate(180deg)' : 'rotate(0deg);')};\r\n transition: transform 0.4s ease-in-out;\r\n`;\r\n\r\nconst RefSubLinks = styled.div<{ collapsed: boolean }>`\r\n display: flex;\r\n flex-direction: column;\r\n opacity: ${({ collapsed }) => (collapsed ? '1' : '0')};\r\n transition: opacity 0.1s ease-in-out;\r\n background-color: ${({ theme }) => theme.colors.sideBar.subItemColor};\r\n text-transform: lowercase;\r\n`;\r\n\r\ninterface IRefSubLink {\r\n collapsed: boolean;\r\n selected: boolean;\r\n disabled: boolean;\r\n lighter?: boolean;\r\n}\r\n\r\nconst RefSubLink = styled.div`\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n position: relative;\r\n height: ${({ collapsed }) => (collapsed ? '48px' : '0')};\r\n opacity: ${({ collapsed }) => (collapsed ? '1' : '0')};\r\n font-size: 14px;\r\n font-weight: 300;\r\n transition: height 0.2s ease-in-out, opacity 0.1s ease-in-out;\r\n cursor: pointer;\r\n padding: 0 16px 0 40px;\r\n color: ${({ theme, selected, lighter }) =>\r\n selected ? theme.colors.white : lighter ? theme.colors.regularGrey : theme.colors.darkGrey};\r\n background-color: ${({ theme, lighter }) =>\r\n lighter ? theme.colors.sideBar.subSubItemColor : 'transparent'};\r\n\r\n &:hover {\r\n color: ${({ theme, disabled }) => !disabled && theme.colors.white};\r\n }\r\n &:after {\r\n content: '';\r\n background-color: ${({ theme, disabled }) =>\r\n !disabled ? theme.colors.primary : `rgba(0,0,0,0.4)`};\r\n cursor: not-allowed;\r\n position: absolute;\r\n left: 0;\r\n width: ${({ disabled }) => (!disabled ? `4px` : `100%`)};\r\n transform: scaleY(${({ selected, disabled }) => (!disabled ? (selected ? '1' : '0') : '1')});\r\n position: absolute;\r\n top: ${({ disabled }) => (!disabled ? `14px` : `0`)};\r\n bottom: ${({ disabled }) => (!disabled ? `14px` : `0`)};\r\n transition: transform 0.2s ease-in-out;\r\n }\r\n`;\r\n","/**\r\n * Sidebar web component\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport React from 'react';\r\nimport styled from 'styled-components';\r\nimport { useDispatch } from 'react-redux';\r\n\r\nimport { Icon } from '@fortawesome/fontawesome-svg-core';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport { faAngleDown } from '@fortawesome/pro-light-svg-icons';\r\n\r\nimport { actions } from 'store/rootSlices';\r\n\r\ninterface IProps {\r\n isSidebarOpen: boolean;\r\n sidebarLinks: {\r\n title: string;\r\n collapsed: boolean;\r\n icon: null | Icon;\r\n path: string | null;\r\n key: string | null;\r\n link: string | null;\r\n selected: boolean;\r\n disabled: boolean;\r\n subLinks: {\r\n id: number;\r\n title: string;\r\n icon: null | Icon;\r\n collapsed?: boolean;\r\n path: string | null;\r\n link: string | null;\r\n selected: boolean;\r\n disabled: boolean;\r\n subLinks?: any;\r\n }[];\r\n }[];\r\n collapseLink: (id: number, value?: boolean) => {};\r\n setSkipSeletectItems: (value: boolean) => {};\r\n collapseSubLink: Function;\r\n goTo: (path: string | null, link: string | null) => {};\r\n}\r\n\r\nconst Sidebar: React.FC = ({\r\n isSidebarOpen,\r\n sidebarLinks,\r\n collapseLink,\r\n collapseSubLink,\r\n goTo,\r\n setSkipSeletectItems,\r\n}) => {\r\n const dispatch = useDispatch();\r\n const { toggleSidebar } = actions.App;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n {sidebarLinks.map((link, index) => (\r\n \r\n {!isSidebarOpen && link.icon && (\r\n {\r\n if (link.subLinks) {\r\n setSkipSeletectItems(true);\r\n collapseLink(index, true);\r\n dispatch(toggleSidebar());\r\n } else {\r\n !link.disabled && goTo(link.path, link.link);\r\n }\r\n }}\r\n >\r\n \r\n {link.title}\r\n \r\n )}\r\n\r\n {isSidebarOpen && (\r\n <>\r\n {\r\n link.subLinks\r\n ? collapseLink(index, undefined)\r\n : !link.disabled && goTo(link.path, link.link);\r\n }}\r\n >\r\n {link.title}\r\n {link.subLinks && (\r\n \r\n \r\n \r\n )}\r\n \r\n {link.subLinks && (\r\n \r\n {link.subLinks.map((subLink, subLinkIndex) => (\r\n \r\n {\r\n subLink.subLinks\r\n ? collapseSubLink(index, subLinkIndex)\r\n : !subLink.disabled && goTo(subLink.path, subLink.link);\r\n }}\r\n >\r\n {subLink.title}\r\n {subLink.subLinks && (\r\n \r\n \r\n \r\n )}\r\n \r\n {subLink.subLinks &&\r\n subLink.collapsed &&\r\n subLink.subLinks.map((subSubLink, i) => (\r\n {\r\n !subSubLink.disabled && goTo(subSubLink.path, subSubLink.link);\r\n }}\r\n >\r\n {subSubLink.title}\r\n \r\n ))}\r\n \r\n ))}\r\n \r\n )}\r\n \r\n )}\r\n \r\n ))}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default Sidebar;\r\n\r\nconst Wrapper = styled.div<{ isSidebarOpen: boolean }>`\r\n width: ${({ theme }) => theme.sidebar.width};\r\n min-width: ${({ theme }) => theme.sidebar.width};\r\n margin-left: ${({ theme, isSidebarOpen }) =>\r\n isSidebarOpen\r\n ? '0'\r\n : `-${parseInt(theme.sidebar.width) - parseInt(theme.sidebar.collapsedWidth)}px`};\r\n z-index: 900;\r\n transition: margin 0.3s ease-in-out;\r\n background-color: ${({ theme }) => theme.colors.plusDarkGrey};\r\n position: relative;\r\n`;\r\n\r\nconst StickyWrapper = styled.div`\r\n position: sticky;\r\n top: ${({ theme }) => theme.header.height};\r\n overflow-y: auto;\r\n`;\r\n\r\nconst Heightblock = styled.div`\r\n height: 24px;\r\n width: 100%;\r\n`;\r\n\r\nconst RefLinks = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n overflow-x: visible;\r\n max-height: calc(90vh - 36px);\r\n\r\n ::-webkit-scrollbar {\r\n width: 0; /* Remove scrollbar space */\r\n background: transparent; /* Optional: just make scrollbar invisible */\r\n }\r\n\r\n // IE and Edge\r\n -ms-overflow-style: none;\r\n\r\n // Firefox\r\n scrollbar-width: none;\r\n`;\r\n\r\nconst RefLinkItem = styled.div<{ isSidebarOpen: boolean }>`\r\n display: flex;\r\n flex-direction: column;\r\n overflow: visible;\r\n align-items: ${({ isSidebarOpen }) => (isSidebarOpen ? 'unset' : 'flex-end')};\r\n`;\r\n\r\ninterface IRefLink {\r\n selected: boolean;\r\n collapsed: boolean;\r\n disabled: boolean;\r\n}\r\n\r\nconst RefLink = styled.div`\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n position: relative;\r\n height: 48px;\r\n cursor: pointer;\r\n padding: 0 16px 0 40px;\r\n font-size: 14px;\r\n font-weight: ${({ collapsed, selected }) => (collapsed || selected ? '500' : '400')};\r\n color: ${({ theme, selected, collapsed }) =>\r\n selected || collapsed\r\n ? selected\r\n ? theme.colors.white\r\n : theme.colors.white\r\n : theme.colors.regularGrey};\r\n text-transform: uppercase;\r\n\r\n &:hover {\r\n color: ${({ theme, disabled }) => !disabled && theme.colors.white};\r\n }\r\n\r\n &:after {\r\n content: '';\r\n background-color: ${({ theme, disabled }) =>\r\n !disabled ? theme.colors.primary : `rgba(0,0,0,0.5)`};\r\n cursor: not-allowed;\r\n position: absolute;\r\n left: 0;\r\n width: ${({ disabled }) => (!disabled ? `4px` : `100%`)};\r\n transform: scaleY(${({ selected, disabled }) => (!disabled ? (selected ? '1' : '0') : '1')});\r\n position: absolute;\r\n top: ${({ disabled }) => (!disabled ? `14px` : `0`)};\r\n bottom: ${({ disabled }) => (!disabled ? `14px` : `0`)};\r\n transition: transform 0.2s ease-in-out;\r\n }\r\n`;\r\n\r\nconst RefLinkIconName = styled.div`\r\n display: flex;\r\n justify-contente: center;\r\n align-items: center;\r\n position: absolute;\r\n left: ${({ theme }) => theme.sidebar.collapsedWidth};\r\n height: 48px;\r\n background-color: ${({ theme }) => theme.colors.black};\r\n font-size: 14px;\r\n font-weight: 300;\r\n text-transform: capitalize;\r\n padding: 12px 18px;\r\n border-left: 1px solid ${({ theme }) => theme.colors.darkGrey};\r\n white-space: nowrap;\r\n`;\r\n\r\nconst RefLinkIcon = styled.div`\r\n display: flex;\r\n width: ${({ theme }) => theme.sidebar.collapsedWidth};\r\n align-items: center;\r\n justify-content: center;\r\n position: relative;\r\n height: 48px;\r\n padding: 0 16px;\r\n cursor: pointer;\r\n font-size: 14px;\r\n font-weight: ${({ collapsed, selected }) => (collapsed || selected ? '500' : '400')};\r\n color: ${({ theme, selected, collapsed }) =>\r\n selected || collapsed ? theme.colors.primary : theme.colors.white};\r\n\r\n text-transform: uppercase;\r\n\r\n &:hover {\r\n background-color: ${({ theme }) => theme.colors.black};\r\n\r\n ${RefLinkIconName} {\r\n display: flex;\r\n }\r\n }\r\n\r\n ${RefLinkIconName} {\r\n display: none;\r\n color: ${({ theme, selected }) => (selected ? theme.colors.primary : theme.colors.white)};\r\n }\r\n`;\r\n\r\nconst Angle = styled.div<{ collapsed: boolean }>`\r\n transform: ${({ collapsed }) => (collapsed ? 'rotate(180deg)' : 'rotate(0deg);')};\r\n transition: transform 0.4s ease-in-out;\r\n`;\r\n\r\nconst RefSubLinks = styled.div<{ collapsed: boolean }>`\r\n display: flex;\r\n visibility: ${({ collapsed }) => (collapsed ? 'visible' : 'hidden')};\r\n flex-direction: column;\r\n opacity: ${({ collapsed }) => (collapsed ? '1' : '0')};\r\n background-color: ${({ theme }) => theme.colors.sideBar.subItemColor};\r\n text-transform: lowercase;\r\n transition: opacity 0.1s ease-in-out;\r\n`;\r\n\r\ninterface IRefSubLink {\r\n collapsed: boolean;\r\n selected: boolean;\r\n disabled: boolean;\r\n lighter?: boolean;\r\n}\r\n\r\nconst RefSubLink = styled.div`\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n position: relative;\r\n height: ${({ collapsed }) => (collapsed ? '48px' : '0')};\r\n transition: height 0.2s ease-in-out, opacity 0.1s ease-in-out;\r\n opacity: ${({ collapsed }) => (collapsed ? '1' : '0')};\r\n font-size: 14px;\r\n transition: height 0.2s ease-in-out, opacity 0.1s ease-in-out;\r\n cursor: pointer;\r\n font-weight: 300;\r\n padding: 0 16px 0 40px;\r\n color: ${({ theme, selected, lighter }) =>\r\n selected ? theme.colors.white : lighter ? theme.colors.regularGrey : theme.colors.darkGrey};\r\n background-color: ${({ theme, lighter }) =>\r\n lighter ? theme.colors.sideBar.subSubItemColor : 'transparent'};\r\n\r\n &:hover {\r\n color: ${({ theme, disabled }) => !disabled && theme.colors.white};\r\n }\r\n\r\n &:after {\r\n content: '';\r\n background-color: ${({ theme, disabled }) =>\r\n !disabled ? theme.colors.primary : `rgba(0,0,0,0.4)`};\r\n cursor: not-allowed;\r\n position: absolute;\r\n left: 0;\r\n width: ${({ disabled }) => (!disabled ? `4px` : `100%`)};\r\n transform: scaleY(${({ selected, disabled }) => (!disabled ? (selected ? '1' : '0') : '1')});\r\n position: absolute;\r\n top: ${({ disabled }) => (!disabled ? `14px` : `0`)};\r\n bottom: ${({ disabled }) => (!disabled ? `14px` : `0`)};\r\n transition: transform 0.2s ease-in-out;\r\n }\r\n`;\r\n","import { t } from 'app';\r\nimport {\r\n faGraduationCap,\r\n faUserGraduate,\r\n faCabinetFiling,\r\n faTh,\r\n faUsersCog,\r\n faChalkboardTeacher,\r\n faPenSquare,\r\n faAddressCard,\r\n} from '@fortawesome/pro-light-svg-icons';\r\nimport { getPathToPage } from 'shared/containers/Breadcrumb/utils';\r\nimport { IRole } from 'config';\r\nimport { IRoutes } from 'routes';\r\n\r\nexport const LinksList = (userRoles: IRole[], currentPath, routes: IRoutes[], isImpersonating) => {\r\n const orderedRoutes: any = [];\r\n\r\n routes\r\n .filter((route) => {\r\n if (route.hideFromSidebar) return false;\r\n if (!route.roles) return false;\r\n // if (\r\n // process.env.REACT_APP_ENV === 'production' &&\r\n // (route.childOf === 'enrollments' || route.key === 'examsCalendar')\r\n // )\r\n // return false;\r\n\r\n //UPDATE: We don't really wanna do this, we eant to check all including super users\r\n //check all but super user\r\n if (\r\n route?.roles.some((routeRole) =>\r\n userRoles\r\n //.filter((userRole) => !userRole.toLowerCase().includes('superuser'))\r\n .includes(routeRole)\r\n )\r\n ) {\r\n return true;\r\n }\r\n\r\n const isWasStudent = route?.roles.some(\r\n (routeRole) => routeRole === 'student' || routeRole === 'exStudent'\r\n );\r\n\r\n if (isWasStudent && isImpersonating) return true;\r\n if (!isWasStudent && userRoles.some((role) => role.toLowerCase().includes('superuser')))\r\n return true;\r\n })\r\n .forEach((filteredRoute) => {\r\n const routeStructure = {\r\n title: t(`routes.${filteredRoute.name}`, { textOnly: true }),\r\n icon: routeIcons[filteredRoute.name] || null,\r\n path: filteredRoute.path ? filteredRoute.key : null,\r\n link: filteredRoute.link ? filteredRoute.link : null,\r\n disabled: filteredRoute.disabled,\r\n selected: filteredRoute.key === currentPath,\r\n };\r\n\r\n const routeStructureSubLinks = (name, subRoute, key) => ({\r\n title: name,\r\n icon: routeIcons[key] || null,\r\n collapsed: false,\r\n subLinks: [subRoute],\r\n });\r\n\r\n if (!filteredRoute?.module?.name) {\r\n if (!filteredRoute.childOf) {\r\n orderedRoutes.push(routeStructure);\r\n } else {\r\n //if has childOf property has a subsublik of a button\r\n //first check if path exists before adding subsublinks\r\n let indexOfPath = orderedRoutes.findIndex(\r\n (orderedRoute) =>\r\n orderedRoute.title === t(`routes.${filteredRoute.childOf}`, { textOnly: true })\r\n );\r\n\r\n if (indexOfPath < 0) {\r\n orderedRoutes.push(\r\n routeStructureSubLinks(\r\n t(`routes.${filteredRoute.childOf}`, { textOnly: true }),\r\n routeStructure,\r\n filteredRoute.childOf\r\n )\r\n );\r\n } else {\r\n orderedRoutes[indexOfPath].subLinks.push(routeStructure);\r\n }\r\n }\r\n } else {\r\n //if has module property has a sublik of a button\r\n //first check if path exists before adding sublinks\r\n let indexOfModule = orderedRoutes.findIndex((orderedRoute) => {\r\n return (\r\n orderedRoute.title === t(`routes.${filteredRoute?.module?.name}`, { textOnly: true })\r\n );\r\n });\r\n\r\n if (indexOfModule < 0) {\r\n if (!filteredRoute.childOf) {\r\n orderedRoutes.push(\r\n routeStructureSubLinks(\r\n t(`routes.${filteredRoute.module.name}`, { textOnly: true }),\r\n routeStructure,\r\n filteredRoute.module.name\r\n )\r\n );\r\n } else {\r\n //if has childOf property has a subsublik of a button\r\n //first check if path exists before adding subsublinks\r\n let indexOfPath = orderedRoutes.findIndex(\r\n (orderedRoute) =>\r\n orderedRoute.title === t(`routes.${filteredRoute.childOf}`, { textOnly: true })\r\n );\r\n\r\n if (indexOfPath < 0) {\r\n orderedRoutes.push(\r\n routeStructureSubLinks(\r\n t(`routes.${filteredRoute.childOf}`, { textOnly: true }),\r\n routeStructure,\r\n filteredRoute.childOf\r\n )\r\n );\r\n } else {\r\n orderedRoutes[indexOfPath].subLinks.push(routeStructure);\r\n }\r\n }\r\n } else {\r\n if (!filteredRoute.childOf) {\r\n orderedRoutes[indexOfModule].subLinks.push(routeStructure);\r\n } else {\r\n //if has childOf property has a subsublik of a button\r\n //first check if path exists before adding subsublinks\r\n let indexOfPath = orderedRoutes[indexOfModule].subLinks.findIndex(\r\n (orderedRoute) =>\r\n orderedRoute.title === t(`routes.${filteredRoute.childOf}`, { textOnly: true })\r\n );\r\n\r\n if (indexOfPath < 0) {\r\n orderedRoutes[indexOfModule].subLinks.push(\r\n routeStructureSubLinks(\r\n t(`routes.${filteredRoute.childOf}`, { textOnly: true }),\r\n routeStructure,\r\n filteredRoute.childOf\r\n )\r\n );\r\n } else {\r\n orderedRoutes[indexOfModule].subLinks[indexOfPath].subLinks.push(routeStructure);\r\n }\r\n }\r\n }\r\n }\r\n });\r\n\r\n return orderedRoutes;\r\n};\r\n\r\nexport const setSelectedItems = (location, sidebarLinks, routes) => {\r\n const breadcrumbPath = getPathToPage(location, routes);\r\n\r\n let newSideBarLink = [...sidebarLinks];\r\n newSideBarLink.forEach((link) => {\r\n let found = false;\r\n let foundSublink = false;\r\n\r\n if (link.subLinks) {\r\n link.subLinks.forEach((subLink) => {\r\n if (subLink.subLinks) {\r\n foundSublink = false;\r\n\r\n subLink.subLinks.forEach((subSubLink) => {\r\n if (breadcrumbPath.some((breadcrumb) => breadcrumb.key === subSubLink.path)) {\r\n found = true;\r\n foundSublink = true;\r\n subSubLink.selected = true;\r\n } else {\r\n subSubLink.selected = false;\r\n }\r\n });\r\n\r\n if (foundSublink) {\r\n subLink.collapsed = true;\r\n subLink.selected = false;\r\n } else {\r\n subLink.collapsed = false;\r\n subLink.selected = false;\r\n }\r\n } else {\r\n if (breadcrumbPath.some((breadcrumb) => breadcrumb.key === subLink.path)) {\r\n found = true;\r\n subLink.selected = true;\r\n } else {\r\n subLink.selected = false;\r\n }\r\n }\r\n });\r\n\r\n if (found) {\r\n link.collapsed = true;\r\n link.selected = true;\r\n } else {\r\n if (breadcrumbPath.some((breadcrumb) => breadcrumb.name === link.title)) {\r\n link.selected = true;\r\n link.collapsed = false;\r\n } else {\r\n link.selected = false;\r\n link.collapsed = false;\r\n }\r\n }\r\n } else {\r\n if (breadcrumbPath.some((breadcrumb) => breadcrumb.key === link.path)) {\r\n found = true;\r\n link.selected = true;\r\n } else {\r\n link.selected = false;\r\n }\r\n }\r\n }, []);\r\n\r\n return newSideBarLink;\r\n};\r\n\r\nconst routeIcons = {\r\n paco: faGraduationCap,\r\n secVirtual: faCabinetFiling,\r\n schedules: faTh,\r\n personalData: faUserGraduate,\r\n backoffice: faUsersCog,\r\n teachers: faChalkboardTeacher,\r\n candidature: faAddressCard,\r\n onlineEnrollments: faPenSquare,\r\n};\r\n","/**\r\n * Sidebar component\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport React, { useState, useRef, useEffect, useMemo } from 'react';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\n\r\nimport { actions } from 'store/rootSlices';\r\nimport * as selectors from './selectors';\r\n\r\nimport { ResponsiveLayout } from '@paco_ua/pacoui';\r\n\r\nimport SidebarMobile from './mobile';\r\nimport SidebarWeb from './web';\r\n\r\nimport { LinksList, setSelectedItems } from './utils';\r\nimport { history, getCurrentRoute } from 'utils';\r\nimport { IRole } from 'config';\r\n\r\ninterface IProps {\r\n userRoles: IRole[];\r\n onReady?: (hasRoutes: boolean) => void;\r\n}\r\n\r\nconst Sidebar: React.FC = ({ userRoles, onReady }) => {\r\n const [sidebarLinks, setSidebar] = useState([]);\r\n const isSidebarOpen = useSelector(selectors.getSidebarOpening);\r\n const { currentLocale, routingStructure, user } = useSelector(selectors.getAppSlice);\r\n\r\n const { toggleSidebar } = actions.App;\r\n const skipSeletectItems = useRef(false);\r\n\r\n const dispatch = useDispatch();\r\n const setLinks = () => {\r\n if (getCurrentRoute()) {\r\n return setSidebar(\r\n LinksList(\r\n userRoles,\r\n getCurrentRoute().route.key,\r\n routingStructure,\r\n user.impersonate ? true : false\r\n )\r\n );\r\n }\r\n };\r\n useMemo(setLinks, [userRoles, routingStructure, currentLocale]);\r\n\r\n const { navigateTo } = actions.App;\r\n\r\n useEffect(() => {\r\n if (isSidebarOpen && !skipSeletectItems.current) {\r\n skipSeletectItems.current = false;\r\n setSidebar(setSelectedItems(getCurrentRoute().route, sidebarLinks, routingStructure));\r\n }\r\n if (!isSidebarOpen) {\r\n skipSeletectItems.current = false;\r\n setSidebar(setSelectedItems(getCurrentRoute().route, sidebarLinks, routingStructure));\r\n }\r\n }, [isSidebarOpen]);\r\n\r\n history.listen(() => {\r\n setSidebar(setSelectedItems(getCurrentRoute().route, sidebarLinks, routingStructure));\r\n });\r\n\r\n useEffect(() => {\r\n onReady && onReady(sidebarLinks.length > 0);\r\n }, [sidebarLinks]);\r\n\r\n const collapseLink = (index: number, value) => {\r\n setSidebar(\r\n sidebarLinks.map((link, linkIndex) => {\r\n if (linkIndex === index) {\r\n if (link.subLinks) {\r\n return {\r\n ...link,\r\n subLinks: link.subLinks.map((subLink) => {\r\n if (subLink.collapsed === undefined) {\r\n return subLink;\r\n } else {\r\n return {\r\n ...subLink,\r\n collapsed: false,\r\n };\r\n }\r\n }),\r\n collapsed: value !== undefined ? value : !link.collapsed,\r\n };\r\n } else {\r\n return {\r\n ...link,\r\n collapsed: value !== undefined ? value : !link.collapsed,\r\n };\r\n }\r\n } else {\r\n if (link.subLinks) {\r\n return {\r\n ...link,\r\n subLinks: link.subLinks.map((subLink) => {\r\n if (subLink.collapsed === undefined) {\r\n return subLink;\r\n } else {\r\n return {\r\n ...subLink,\r\n collapsed: false,\r\n };\r\n }\r\n }),\r\n collapsed: false,\r\n };\r\n } else {\r\n return {\r\n ...link,\r\n collapsed: false,\r\n };\r\n }\r\n }\r\n })\r\n );\r\n };\r\n\r\n const collapseSubLink = (index: number, subLinkIndex: number) => {\r\n const sidebarLinksCopy = [...sidebarLinks];\r\n sidebarLinksCopy[index].subLinks = sidebarLinksCopy[index].subLinks.map((link, linkIndex) => {\r\n if (linkIndex === subLinkIndex) {\r\n return {\r\n ...link,\r\n collapsed: !link.collapsed,\r\n };\r\n } else {\r\n return {\r\n ...link,\r\n collapsed: false,\r\n };\r\n }\r\n });\r\n\r\n setSidebar(sidebarLinksCopy);\r\n };\r\n\r\n return (\r\n <>\r\n {\r\n skipSeletectItems.current = value;\r\n }}\r\n goTo={(path, link) => {\r\n if (path) {\r\n dispatch(navigateTo({ key: path }));\r\n dispatch(toggleSidebar());\r\n } else {\r\n if (link) {\r\n window.open(link, '_blank');\r\n }\r\n }\r\n }}\r\n sidebarLinks={sidebarLinks}\r\n />\r\n \r\n );\r\n};\r\n\r\nexport default Sidebar;\r\n","/**\r\n * Footer selectors\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getCurrentLocale = (state: RootState) => state.App.currentLocale;\r\n","/**\r\n * Footer component\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport React from 'react';\r\nimport styled from 'styled-components';\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\r\nimport {\r\n faFacebookF,\r\n faInstagram,\r\n faTwitter,\r\n faLinkedinIn,\r\n faYoutube,\r\n} from '@fortawesome/free-brands-svg-icons';\r\n\r\nimport { useSelector } from 'react-redux';\r\nimport * as selectors from './selectors';\r\n\r\nimport { t } from 'app';\r\nimport { IconProp } from '@fortawesome/fontawesome-svg-core';\r\nimport EasyPayLogo from \"./cc-reta_white.png\";\r\n\r\ninterface IProps {\r\n // example: string;\r\n}\r\n\r\nconst SOCIAL = [\r\n {\r\n name: 'Facebook',\r\n url: 'https://www.facebook.com/universidadedeaveiro/',\r\n icon: faFacebookF,\r\n },\r\n {\r\n name: 'Instagram',\r\n url: 'https://www.instagram.com/universidadedeaveiro/',\r\n icon: faInstagram,\r\n },\r\n {\r\n name: 'Twitter',\r\n url: 'https://twitter.com/univaveiro',\r\n icon: faTwitter,\r\n },\r\n {\r\n name: 'Linkedin',\r\n url: 'https://www.linkedin.com/school/universidade-de-aveiro/?originalSubdomain=pt',\r\n icon: faLinkedinIn,\r\n },\r\n {\r\n name: 'YouTube',\r\n url: 'https://www.youtube.com/channel/UCJnxPIxMHdxcYhRIIw_ztEg',\r\n icon: faYoutube,\r\n },\r\n];\r\n\r\nconst Footer: React.FC = () => {\r\n const currentLocale = useSelector(selectors.getCurrentLocale);\r\n return (\r\n
    \r\n \r\n \r\n {t('generic.footerFollow')}\r\n \r\n \r\n {SOCIAL.map((social, index) => (\r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {t('generic.footerQuestions')}\r\n
      \r\n
    • \r\n \r\n {t('generic.footerRector')}\r\n \r\n
    • \r\n
    • \r\n \r\n {t('generic.footerAskStudent')}\r\n \r\n
    • \r\n
    \r\n
    \r\n \r\n {t('generic.footerLinks')}\r\n
      \r\n
    • \r\n \r\n {t('generic.footerAbout')}\r\n \r\n
    • \r\n
    • \r\n \r\n {t('generic.footerCourses')}\r\n \r\n
    • \r\n
    • \r\n \r\n {t('generic.footerApplications')}\r\n \r\n
    • \r\n
    • \r\n \r\n {t('generic.footerDepSchools')}\r\n \r\n
    • \r\n
    • \r\n \r\n {t('generic.footerServices')}\r\n \r\n
    • \r\n
    • \r\n \r\n {t('generic.footerResearchUnits')}\r\n \r\n
    • \r\n
    • \r\n \r\n {t('generic.footerLibrary')}\r\n \r\n
    • \r\n
    \r\n
    \r\n \r\n {t('generic.footerPublics')}\r\n
      \r\n
    • \r\n \r\n {t('generic.footerProspectiveStudents')}\r\n \r\n
    • \r\n
    • \r\n \r\n {t('generic.footerUaStudents')}\r\n \r\n
    • \r\n
    • \r\n \r\n {t('generic.footerIntStudents')}\r\n \r\n
    • \r\n
    • \r\n \r\n {t('generic.footerAlumni')}\r\n \r\n
    • \r\n
    • \r\n \r\n {t('generic.footerPeople')}\r\n \r\n
    • \r\n
    • \r\n \r\n {t('generic.footerSociety')}\r\n \r\n
    • \r\n
    \r\n
    \r\n \r\n {t('generic.footerContacts')}\r\n \r\n

    \r\n Campus Universitário de Santiago
    3810-193 Aveiro
    Portugal\r\n

    \r\n
    \r\n +351 234 370 200\r\n
    \r\n \r\n {t('generic.footerGeneralContacts')}\r\n \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n {t('generic.footerDataProtection')}\r\n \r\n \r\n {t('generic.footerTermsOfService')}\r\n \r\n \r\n {t('generic.footerAccessibility')}\r\n \r\n \r\n {t('generic.footerSiteMap')}\r\n \r\n \r\n {`Universidade de Aveiro ${new Date().getFullYear()}`}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nexport default Footer;\r\n\r\nconst SocialLinksContacts = styled.div`\r\n width: 100%;\r\n display: flex;\r\n flex-wrap: wrap;\r\n padding: 40px 15px;\r\n margin: auto;\r\n justify-content: space-between;\r\n\r\n @media (min-width: 576px) {\r\n max-width: 540px;\r\n }\r\n\r\n @media (min-width: 768px) {\r\n max-width: 720px;\r\n }\r\n\r\n @media (min-width: 992px) {\r\n max-width: 960px;\r\n }\r\n\r\n @media (min-width: 1200px) {\r\n max-width: 1140px;\r\n }\r\n\r\n @media (max-width: 1200px) {\r\n padding-bottom: 0;\r\n }\r\n`;\r\n\r\nconst Column = styled.div`\r\n margin: 0;\r\n flex: 0 0 50%;\r\n\r\n & ul {\r\n margin: 0;\r\n padding-inline-start: 0;\r\n }\r\n\r\n & li {\r\n line-height: normal;\r\n list-style-type: none;\r\n margin-bottom: 5px;\r\n }\r\n\r\n & a {\r\n font-size: 14px;\r\n }\r\n\r\n & p {\r\n font-size: 0.875rem;\r\n color: rgb(255, 255, 255);\r\n line-height: 1.4;\r\n font-weight: 300;\r\n margin-bottom: 20px;\r\n word-break: break-word;\r\n font-family: Roboto, sans-serif;\r\n }\r\n\r\n @media (min-width: 576px) {\r\n flex: 0 0 auto;\r\n }\r\n\r\n @media (min-width: 1200px) {\r\n flex-basis: 0;\r\n flex-grow: 1;\r\n max-width: 100%;\r\n }\r\n\r\n @media (max-width: 1199px) {\r\n &:not(:first-of-type) {\r\n margin-top: 25px;\r\n }\r\n &:first-of-type,\r\n &:last-of-type {\r\n padding-bottom: 25px;\r\n border-bottom: 1px solid rgba(255, 255, 255, 0.2);\r\n }\r\n &:last-of-type {\r\n padding-top: 25px;\r\n border-top: 1px solid rgba(255, 255, 255, 0.2);\r\n }\r\n }\r\n\r\n @media (max-width: 575px) {\r\n &:nth-of-type(4) {\r\n padding-top: 25px;\r\n padding-bottom: 25px;\r\n border-top: 1px solid rgba(255, 255, 255, 0.2);\r\n border-bottom: 1px solid rgba(255, 255, 255, 0.2);\r\n }\r\n }\r\n\r\n &:first-of-type {\r\n flex: 0 0 25%;\r\n\r\n @media (max-width: 1199px) {\r\n flex: 0 0 100%;\r\n }\r\n\r\n & h3 {\r\n @media (max-width: 576px) {\r\n display: none;\r\n }\r\n }\r\n }\r\n\r\n &:nth-of-type(2) {\r\n @media (min-width: 1200px) {\r\n flex: 0 0 16.666667%;\r\n }\r\n }\r\n\r\n &:last-of-type {\r\n @media (max-width: 575px) {\r\n flex: 0 0 50%;\r\n }\r\n\r\n @media (min-width: 576px) and (max-width: 1199px) {\r\n flex: 0 0 100%;\r\n }\r\n }\r\n`;\r\n\r\nconst ColumnTitle = styled.h3`\r\n font-size: 0.875rem;\r\n color: ${({ theme }) => theme.colors.white};\r\n line-height: 1.5;\r\n font-weight: 500;\r\n text-transform: uppercase;\r\n word-break: break-word;\r\n font-family: Roboto, sans-serif;\r\n margin-bottom: 20px;\r\n`;\r\n\r\nconst SocialLinksWrapper = styled.div`\r\n display: flex;\r\n flex-wrap: wrap;\r\n column-gap: 15px;\r\n font-size: 24px;\r\n flex: 0 0 50%;\r\n\r\n & a:hover {\r\n color: rgb(26, 26, 26);\r\n opacity: 0.5;\r\n & svg {\r\n color: rgb(128, 128, 128);\r\n }\r\n }\r\n\r\n @media (min-width: 576px) {\r\n flex: 0 0 66.666667%;\r\n }\r\n\r\n @media (min-width: 768px) {\r\n flex: 0 0 75%;\r\n }\r\n\r\n @media (min-width: 992px) {\r\n flex: 0 0 83.333333%;\r\n }\r\n\r\n @media (min-width: 1200px) {\r\n flex: 0 0 100%;\r\n margin-bottom: 30px;\r\n }\r\n\r\n & svg {\r\n font-size: 24px;\r\n }\r\n`;\r\n\r\nconst FirstColumnWrapper = styled.div`\r\n display: flex;\r\n gap: 15px;\r\n justify-content: space-between;\r\n & img {\r\n height: 100px;\r\n\r\n @media (max-width: 1200px) {\r\n margin-top: -20px;\r\n height: 60px;\r\n }\r\n }\r\n\r\n @media (min-width: 1200px) {\r\n flex-direction: column;\r\n }\r\n\r\n & > a {\r\n flex: 0 0 50%;\r\n @media (min-width: 576px) {\r\n flex: 0 0 33.333333%;\r\n }\r\n\r\n @media (min-width: 768px) {\r\n flex: 0 0 25%;\r\n }\r\n\r\n @media (min-width: 992px) {\r\n flex: 0 0 16.666667%;\r\n }\r\n }\r\n`;\r\n\r\nconst ContactsWrapper = styled.div`\r\n display: flex;\r\n flex-wrap: wrap;\r\n\r\n & p {\r\n margin-bottom: 0;\r\n }\r\n\r\n @media (max-width: 1199px) {\r\n gap: 30px;\r\n }\r\n\r\n @media (max-width: 575px) {\r\n flex-direction: column;\r\n gap: 20px;\r\n }\r\n\r\n @media (min-width: 1200px) {\r\n flex-direction: column;\r\n gap: 20px;\r\n }\r\n`;\r\n\r\nconst EmailLink = styled.a`\r\n pointer-events: auto;\r\n color: rgb(255, 255, 255);\r\n font-size: 14px;\r\n line-height: 1.4;\r\n font-weight: 400;\r\n text-decoration: none;\r\n cursor: pointer;\r\n display: block;\r\n\r\n &:hover {\r\n color: ${({ theme }) => theme.colors.white};\r\n text-decoration: underline;\r\n }\r\n`;\r\n\r\nconst PhoneLink = styled.a`\r\n pointer-events: auto;\r\n color: rgb(255, 255, 255);\r\n font-size: 14px;\r\n font-weight: 300;\r\n text-decoration: none;\r\n cursor: pointer;\r\n display: block;\r\n\r\n @media (max-width: 575px) {\r\n width: 100%;\r\n }\r\n\r\n &:hover {\r\n color: ${({ theme }) => theme.colors.white};\r\n text-decoration: underline;\r\n }\r\n`;\r\n\r\nconst LogoLinks = styled.div`\r\n padding: 20px 0;\r\n\r\n @media (max-width: 991px) {\r\n padding-top: 0px;\r\n }\r\n\r\n @media (min-width: 576px) {\r\n margin: auto;\r\n max-width: 540px;\r\n }\r\n\r\n @media (min-width: 768px) {\r\n margin: auto;\r\n max-width: 720px;\r\n }\r\n\r\n @media (min-width: 992px) {\r\n margin: auto;\r\n max-width: 960px;\r\n }\r\n\r\n @media (min-width: 1200px) {\r\n border-top: 1px solid rgba(255, 255, 255, 0.2);\r\n max-width: 100%;\r\n }\r\n`;\r\n\r\nconst BottomFooterWrapper = styled.div`\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n margin: auto;\r\n padding: 0 15px;\r\n\r\n @media (max-width: 1199px) {\r\n flex-direction: column;\r\n padding-bottom: 20px;\r\n }\r\n\r\n @media (min-width: 576px) {\r\n max-width: 540px;\r\n }\r\n\r\n @media (min-width: 768px) {\r\n max-width: 720px;\r\n }\r\n\r\n @media (min-width: 992px) {\r\n max-width: 960px;\r\n }\r\n\r\n @media (min-width: 1200px) {\r\n max-width: 1340px;\r\n }\r\n`;\r\n\r\nconst LinksBrandWrapper = styled.div`\r\n width: 100%;\r\n\r\n @media (max-width: 1199px) {\r\n margin-top: 25px;\r\n margin-bottom: 25px;\r\n padding-bottom: 25px;\r\n border-bottom: 1px solid rgba(255, 255, 255, 0.2);\r\n }\r\n`;\r\n\r\nconst LinksWrapper = styled.div`\r\n display: flex;\r\n column-gap: 26px;\r\n margin-bottom: 4px;\r\n flex-wrap: wrap;\r\n`;\r\n\r\nconst Link = styled.a`\r\n font-size: 11px;\r\n cursor: pointer;\r\n font-weight: 300;\r\n color: ${({ theme }) => theme.colors.white};\r\n\r\n &:hover {\r\n color: ${({ theme }) => theme.colors.white};\r\n text-decoration: underline;\r\n }\r\n`;\r\n\r\nconst Brand = styled.span`\r\n color: rgb(117, 117, 117);\r\n font-size: 11px;\r\n`;\r\n\r\nconst LogosWrapper = styled.div`\r\n width: 100%;\r\n display: flex;\r\n flex-wrap: wrap;\r\n align-items: flex-end;\r\n column-gap: 30px;\r\n\r\n @media (min-width: 768px) {\r\n justify-content: space-between;\r\n }\r\n`;\r\n\r\nconst Logo = styled.img`\r\n height: ${(p) => (p.height ? p.height : '30px')}};\r\n width: auto;\r\n object-fit: cover;\r\n font-weight: 300;\r\n`;\r\n","import React from 'react';\r\nimport styled from 'styled-components';\r\nimport { Container } from 'semantic-ui-react';\r\n\r\nimport { Text } from '@paco_ua/pacoui';\r\n\r\nimport logoUA from 'assets/images/logo512.png';\r\n\r\nconst InMaintenanceScene = ({ t }) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {t('generic.maintenance')}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\nexport default InMaintenanceScene;\r\n\r\nconst FormattedText: React.FC<{\r\n size?: string;\r\n color?: string;\r\n weight?: string;\r\n onClick?: () => void;\r\n}> = ({ children, size, weight, color }) => (\r\n \r\n {children}\r\n \r\n);\r\n\r\nconst Wrapper = styled.div`\r\n min-height: 100vh;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n overflow: auto;\r\n padding: 0 26%;\r\n\r\n ${({ theme }) => theme.medias.sm} {\r\n padding: 0 20%;\r\n }\r\n ${({ theme }) => theme.medias.xs} {\r\n padding: 0 80px;\r\n }\r\n`;\r\n\r\nconst LogoUA = styled.img`\r\n width: 120px;\r\n height: 120px;\r\n margin: 120px 0 80px;\r\n`;\r\n\r\nconst AlignCenter = styled.div`\r\n display: flex;\r\n justify-content: center;\r\n text-align: center;\r\n`;\r\n\r\nconst WrapperText = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n\r\n > div {\r\n margin-bottom: 48px;\r\n }\r\n`;\r\n\r\n/*const PacoLegacyHref = styled.a`\r\n &:hover {\r\n color: ${({ theme }) => theme.colors.white};\r\n text-decoration: underline;\r\n }\r\n`;*/\r\n","/**\r\n * App\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport React, { useState, useRef, useEffect, useCallback } from 'react';\r\nimport styled, { ThemeProvider } from 'styled-components';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { Switch, Route, withRouter, Redirect } from 'react-router';\r\n\r\nimport { ThemeProvider as UAThemeProvider, Theme, GoToTopButton } from '@paco_ua/pacoui';\r\n\r\nimport GlobalStyles from 'ui/globalStyles';\r\nimport config from 'config';\r\nimport { actions } from 'store/rootSlices';\r\n\r\nimport AppTools from 'app/AppTools';\r\nimport SuperUserTools from 'app/SuperUserTools';\r\nimport Translation from 'app/Translation';\r\n\r\nimport Toaster from 'shared/containers/Toaster';\r\nimport ToasterAction from 'shared/containers/ToasterAction';\r\nimport Breadcrumb from 'shared/containers/Breadcrumb';\r\nimport Header from 'shared/containers/Header';\r\nimport SystemBar from 'shared/containers/SystemBar';\r\nimport PageStructure from 'shared/containers/PageStructure';\r\n\r\nimport Sidebar from 'shared/components/Sidebar';\r\nimport Footer from 'shared/components/Footer';\r\nimport AuthWrapper from 'shared/components/AuthWrapper';\r\n\r\nimport InMaintenanceScene from 'scenes/InMaintenanceScene';\r\n\r\nimport { i18nInstance, addRouteToHistory, getCurrentRoute } from 'utils';\r\n\r\nimport { redirectAuthUrl } from './utils';\r\n\r\nimport * as selectors from './logic/selectors';\r\n\r\nexport const t = (key, options?: any) => {\r\n if (options && options.textOnly) {\r\n let { textOnly, ...tOptions } = options;\r\n return i18nInstance.t(key, tOptions);\r\n } else {\r\n return ;\r\n }\r\n};\r\n\r\nfunction App({ location }) {\r\n const { onMount } = actions.App;\r\n const user = useSelector(selectors.getUser);\r\n const { startingApp, routingStructure } = useSelector(selectors.getAppSlice);\r\n\r\n const dispatch = useDispatch();\r\n\r\n const [showGoToTopButton, setShowGoToTopButton] = useState(false);\r\n const showGoToTopButtonRef = useRef(false);\r\n\r\n const [shoulRenderSideBar, setShoulRenderSideBar] = useState(false);\r\n\r\n const [ref, setRef] = useState(null as null | HTMLDivElement);\r\n\r\n const handleOnScroll = (evt) => {\r\n const scrollTop = evt.target.scrollTop;\r\n if (scrollTop > 120 && !showGoToTopButtonRef.current) {\r\n setShowGoToTopButton(true);\r\n } else if (scrollTop <= 120 && showGoToTopButtonRef.current) {\r\n setShowGoToTopButton(false);\r\n }\r\n };\r\n\r\n const onRefSet = useCallback((node) => {\r\n if (node !== null) {\r\n setRef(node);\r\n node.addEventListener('scroll', handleOnScroll);\r\n }\r\n }, []);\r\n\r\n const onSystemBarSet = useCallback((node) => {\r\n if (node !== null) {\r\n if (node.__authConfig) {\r\n //TODO UA needs to refactor this asap... it is not working because requires login to be done with their clientId\r\n //node.__authConfig.login = redirectAuthUrl() + '&/null="';\r\n node.__authConfig.clientId = '';\r\n node.__authConfig.callbackUri = '"';\r\n }\r\n }\r\n }, []);\r\n\r\n useEffect(() => {\r\n dispatch(onMount());\r\n return () => {\r\n if (ref !== null) {\r\n ref.removeEventListener('scroll', handleOnScroll);\r\n }\r\n };\r\n }, [dispatch, onMount]);\r\n\r\n useEffect(() => {\r\n showGoToTopButtonRef.current = showGoToTopButton;\r\n }, [showGoToTopButton]);\r\n\r\n useEffect(() => {\r\n addRouteToHistory();\r\n }, [location]);\r\n\r\n const routingRules = (route) => {\r\n if (route) {\r\n if (getCurrentRoute().route.key === 'inMaintenance') {\r\n return ;\r\n }\r\n\r\n return (\r\n }\r\n >\r\n {verifyRoute(route)}\r\n \r\n );\r\n } else {\r\n if (location.pathname === '/backoffice/sgh') {\r\n window.open('https://api.paco20-play-aws.ua.pt/sgh_backoffice/admin', '_self');\r\n return ;\r\n } else if (!getCurrentRoute()) {\r\n return ;\r\n }\r\n }\r\n };\r\n\r\n const verifyRoute = (route) => {\r\n const now = new Date();\r\n const currentHour = now.getHours();\r\n if (!route.component || route.inMaintenance) {\r\n return ;\r\n }\r\n return ;\r\n };\r\n\r\n const handleGoToTop = () => {\r\n if (ref !== null) {\r\n ref.scrollTo({ top: 0, behavior: 'smooth' });\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n handleGoToTop();\r\n }, [location.pathname]);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n {/* */}\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n {routingStructure\r\n .filter((route) => route.detached && !route.disabled && route.path)\r\n .map((route) => (\r\n \r\n key && route.path ? route.path[key] : null\r\n )\r\n }\r\n render={() => routingRules(route)}\r\n />\r\n ))}\r\n {/*localStorage.getItem('openSystem') !== 'true' && */}\r\n\r\n \r\n \r\n
    \r\n \r\n\r\n \r\n {!startingApp && (\r\n {\r\n setShoulRenderSideBar(hasRoutes);\r\n }}\r\n userRoles={user.roles}\r\n />\r\n )}\r\n\r\n \r\n \r\n\r\n {startingApp && (\r\n }\r\n mainContent={
    }\r\n />\r\n )}\r\n {!startingApp && (\r\n <>\r\n {routingStructure\r\n .filter((route) => !route.detached && !route.disabled && route.path)\r\n .map((route) => (\r\n \r\n key && route.path ? route.path[key] : null\r\n )\r\n }\r\n render={() => routingRules(route)}\r\n />\r\n ))}\r\n \r\n
    \r\n \r\n \r\n )}\r\n \r\n handleGoToTop()} />\r\n \r\n routingRules(null)} />\r\n \r\n \r\n \r\n\r\n {config.SHOW_APPTOOLS && }\r\n \r\n \r\n \r\n \r\n \r\n );\r\n}\r\n\r\nexport default withRouter(App);\r\n\r\nconst AppWrapper = styled.div`\r\n width: 100vw;\r\n height: 100vh;\r\n display: flex;\r\n flex-direction: column;\r\n background-color: ${({ theme }) => theme.colors.white};\r\n overflow-y: auto;\r\n`;\r\n\r\nconst RouteContainer = styled.div`\r\n display: flex;\r\n flex: 1;\r\n max-width: 100vw;\r\n`;\r\n\r\nconst RouteWrapper = styled.div`\r\n display: flex;\r\n flex-grow: 1;\r\n width: 0;\r\n flex-direction: column;\r\n padding: 0px 40px;\r\n\r\n @media only screen and (max-width: 767px) {\r\n padding: 0px 10px;\r\n }\r\n`;\r\n\r\nconst FooterWrapper = styled.footer`\r\n margin: 120px -40px 0;\r\n background-color: rgb(0, 0, 0);\r\n\r\n @media only screen and (max-width: 767px) {\r\n margin: 120px -10px 0;\r\n }\r\n`;\r\n\r\nconst StickyHeader = styled.div`\r\n position: sticky;\r\n top: 0;\r\n z-index: 999;\r\n`;\r\n\r\nconst StickyToaster = styled.div`\r\n position: sticky;\r\n top: 0;\r\n z-index: 9999;\r\n`;\r\n","/**\r\n * Schedules scene utils\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport { PayloadAction } from '@reduxjs/toolkit';\r\nimport { t } from 'app';\r\n\r\nimport moment from 'moment';\r\n\r\nimport { IUc, ISelectedClasses, IClassTypology, IProvisorySeriationResult } from 'shared/types';\r\n\r\ninterface ISelectedClassesScheduleSubmission {\r\n classId: number;\r\n locked: boolean;\r\n ucId: number;\r\n group: number | null;\r\n aggregator: number | null;\r\n}\r\n\r\nexport const reformatUcs = (\r\n ucs: { normal: []; mandatory: []; free: [] },\r\n phaseFinished,\r\n showDisabled?: boolean,\r\n showAllocated?: boolean,\r\n showAllocatedState?: boolean,\r\n hideAllocationProb?: boolean\r\n) => {\r\n const normalUcs = reformatUcsUtil(\r\n ucs.normal,\r\n null,\r\n showDisabled,\r\n showAllocated,\r\n showAllocatedState,\r\n hideAllocationProb,\r\n phaseFinished\r\n );\r\n\r\n const mandatoryUcs =\r\n ucs?.mandatory?.map((mandatoryUc: any) => ({\r\n ...mandatoryUc,\r\n ucs: reformatUcsUtil(\r\n mandatoryUc.ucs,\r\n mandatoryUc.id,\r\n showDisabled,\r\n showAllocated,\r\n showAllocatedState,\r\n hideAllocationProb,\r\n phaseFinished\r\n ),\r\n })) || [];\r\n\r\n //Free ucs are always already allocated because they are too many to be added to the list at first\r\n const freeUcs: any = ucs.free.map((freeUc: any) => ({\r\n ...freeUc,\r\n ucs: reformatFreeUcs([freeUc], phaseFinished, freeUc.id),\r\n }));\r\n\r\n const freeOptions: { name: string; id: number; irregular?: boolean }[] = ucs.free.map(\r\n (ucUnit: any) => ({\r\n name: ucUnit.name,\r\n id: ucUnit.id,\r\n irregular: ucUnit?.irregular,\r\n })\r\n );\r\n\r\n const allUcs = [\r\n ...filterAllocatedClasses(normalUcs, phaseFinished, hideAllocationProb),\r\n ...getSelectedOrAllocatedMandatoryOptionUcs(mandatoryUcs, phaseFinished, false),\r\n ...freeUcs.reduce((acc, freeUc) => {\r\n return [...acc, ...freeUc.ucs.map((ucUnit) => ucUnit)];\r\n }, []),\r\n ];\r\n\r\n return { normalUcs, mandatoryUcs, freeUcs, freeOptions, allUcs };\r\n};\r\n\r\nexport const reformatFreeUcs = (ucs: any[], phaseFinished, groupId) => {\r\n const freeUcs = ucs\r\n ?.map((freeUc: any) => {\r\n //TODO esta martelada deveria ser freeUc.name mas o backend está a mandar isto trocado\r\n if (freeUc.typologies !== null) {\r\n return {\r\n ...freeUc,\r\n ucs: reformatUcsUtil(ucs, groupId, null, null, null, null, null),\r\n };\r\n } else {\r\n return null;\r\n }\r\n })\r\n .filter((uc) => uc !== null);\r\n\r\n return [...getSelectedOrAllocatedMandatoryOptionUcs(freeUcs, phaseFinished, true)];\r\n};\r\n\r\nconst reformatUcsUtil = (\r\n ucs,\r\n groupId,\r\n showDisabled,\r\n showAllocated,\r\n showAllocatedState,\r\n hideAllocationProb,\r\n phaseFinished\r\n) => {\r\n return (\r\n ucs?.map((uc) => ({\r\n typologies: uc?.typologies || {},\r\n ucInitials: uc.initials,\r\n //TODO (HOTFIX) isto é apenas para resolver um problema para produção por causa da estrutura do backend.\r\n ucId: uc.uc || uc.id,\r\n irregular: uc.irregular,\r\n groupId: groupId === null || groupId === undefined ? null : groupId,\r\n ucColor: uc.color,\r\n ucFullName: uc.name,\r\n ucTotalChoices: uc.totalChoices,\r\n disabled: uc.disabled,\r\n full: uc.disabled ? t('sgh.infoAlertDisabledMandatory_0') : null,\r\n availableSlots: uc?.availableSlots || uc?.freeSlots || 0,\r\n classSchedule: uc.classes\r\n ? organizedClassesByPeriod(\r\n uc.classes,\r\n showDisabled !== null && showDisabled !== undefined ? showDisabled : uc.disabled,\r\n showAllocated,\r\n showAllocatedState,\r\n hideAllocationProb,\r\n phaseFinished\r\n )\r\n : [],\r\n })) || []\r\n );\r\n};\r\n\r\nconst organizedClassesByPeriod = (\r\n classes,\r\n disabled,\r\n viewAllocated?: boolean,\r\n viewAllocatedState?: string,\r\n hideAllocationProb?: boolean,\r\n phaseFinished?: boolean\r\n) => {\r\n return classes.reduce((acc, classItem) => {\r\n let newClassItems: any = [];\r\n classItem.lessons.forEach((lesson) => {\r\n //check if exists class already and return it\r\n const accToUpdate = newClassItems.find((accClassItem) => {\r\n return (\r\n accClassItem.classRoom === lesson.room &&\r\n accClassItem.weekday === moment(lesson.startDate).day() &&\r\n accClassItem.startTime === moment(lesson.startDate).format('HH:mm:ss') &&\r\n accClassItem.endTime === moment(lesson.endDate).format('HH:mm:ss')\r\n );\r\n });\r\n\r\n if (accToUpdate !== undefined) {\r\n accToUpdate.periodDays.push(moment(lesson.startDate).format('YYYY-MM-DD'));\r\n } else {\r\n newClassItems.push({\r\n classId: classItem.id,\r\n weekday: moment(lesson.startDate).day(),\r\n startTime: moment(lesson.startDate).format('HH:mm:ss'),\r\n endTime: moment(lesson.endDate).format('HH:mm:ss'),\r\n //period: classItem.period,\r\n periodDays: [moment(lesson.startDate).format('YYYY-MM-DD')],\r\n classType: classItem.type,\r\n className: viewAllocated ? classItem.number : classItem.name,\r\n irregularMessage:\r\n !phaseFinished &&\r\n !hideAllocationProb &&\r\n classItem?.allocated?.state === 'notAssigned' &&\r\n getIrregularMessageClass(classItem),\r\n irregularSituation: !phaseFinished && !hideAllocationProb && classItem.irregular,\r\n classRoom: lesson.room,\r\n disabled:\r\n disabled ||\r\n classItem.irregular === 'noLessons' ||\r\n classItem.irregular === 'noSlots' ||\r\n classItem.irregular === 'restrictionCourse' ||\r\n classItem.irregular === 'restrictionYear',\r\n full: disabled ? t('sgh.infoAlertDisabledMandatory_0') : null,\r\n selected:\r\n viewAllocated ||\r\n classItem.preSelected ||\r\n classItem?.allocated?.state === 'assigned' ||\r\n classItem?.allocated?.state === 'automatic',\r\n filtered: false,\r\n associatedClasses: classItem.associatedClasses,\r\n allocated:\r\n viewAllocated && viewAllocatedState\r\n ? classItem.allocated\r\n : classItem.allocated || { state: 'notAssigned' },\r\n allocation:\r\n hideAllocationProb !== true\r\n ? getAllocationValue[classItem?.allocated?.prob] || null\r\n : null,\r\n selectedStudents: classItem?.allocated?.selects || null,\r\n freeSlots: classItem?.allocated?.freeSlots || null,\r\n studentsLowerRanking: classItem?.allocated?.lowerRanking || null,\r\n studentsHigherRanking: classItem?.allocated?.higherRanking || null,\r\n slots: classItem.slots || 0,\r\n });\r\n }\r\n });\r\n\r\n return [...acc, ...newClassItems];\r\n }, []);\r\n};\r\n\r\nconst getAllocationValue = {\r\n high: 'likely',\r\n medium: 'uncertain',\r\n low: 'unlikely',\r\n};\r\n\r\nexport const filterAllocatedClasses = (ucs, phaseFinished, showPreselected) => {\r\n return ucs.map((uc) => ({\r\n ...uc,\r\n classSchedule: uc?.classSchedule?.map((classItem) => ({\r\n ...classItem,\r\n filtered:\r\n classItem?.allocated?.state === 'notAssigned'\r\n ? phaseFinished\r\n ? true\r\n : showPreselected\r\n ? classItem?.selected\r\n ? false\r\n : true\r\n : uc.classSchedule.some(\r\n (classesFilter) =>\r\n classesFilter.classType === classItem.classType &&\r\n (classesFilter.allocated.state === 'assigned' ||\r\n classesFilter.allocated.state === 'automatic')\r\n )\r\n : false,\r\n })),\r\n }));\r\n};\r\n\r\nexport const getSelectedOrAllocatedMandatoryOptionUcs = (mandatoryUcs, phaseFinished, unfilter) => {\r\n //we can not filter all mandatory if at least on is selected or assigned.\r\n return (\r\n mandatoryUcs?.reduce((acc, mandatoryUc) => {\r\n const selectedUcs = mandatoryUc.ucs.map((uc) => ({\r\n ...uc,\r\n classSchedule: uc.classSchedule.map((ucClass) => {\r\n if (phaseFinished) {\r\n if (ucClass.allocated.state === 'assigned' || ucClass.allocated.state === 'automatic') {\r\n return { ...ucClass, filtered: false };\r\n } else {\r\n return { ...ucClass, filtered: true };\r\n }\r\n } else {\r\n if (\r\n unfilter ||\r\n ucClass.selected ||\r\n ucClass.allocated.state === 'assigned' ||\r\n ucClass.allocated.state === 'automatic' ||\r\n uc.classSchedule.some(\r\n (classItem) =>\r\n classItem.selected ||\r\n classItem?.allocated?.state === 'assigned' ||\r\n classItem?.allocated?.state === 'automatic'\r\n )\r\n ) {\r\n return { ...ucClass, filtered: false };\r\n } else {\r\n return { ...ucClass, filtered: true };\r\n }\r\n }\r\n }),\r\n }));\r\n\r\n return [...acc, ...selectedUcs];\r\n }, []) || []\r\n );\r\n};\r\n\r\nexport const setReformatedClassesTypologies = (reformattedUcs) => {\r\n let existingTypologies = [] as IClassTypology[];\r\n reformattedUcs?.forEach((uc) => {\r\n Object.keys(uc.typologies) &&\r\n Object.keys(uc.typologies).forEach((typologyInitials) => {\r\n const typologyName = uc.typologies[typologyInitials].replace(/[|&:;$%@\"<>()+,]/g, '');\r\n let exists = existingTypologies.some(\r\n (typology) =>\r\n typology.name === typologyName && typology.initials === typologyInitials.toUpperCase()\r\n );\r\n if (!exists) {\r\n existingTypologies.push({ name: typologyName, initials: typologyInitials.toUpperCase() });\r\n }\r\n });\r\n });\r\n\r\n return existingTypologies;\r\n};\r\n\r\nexport const setClassesTypologies = (ucs) => {\r\n let existingTypologies = [] as IClassTypology[];\r\n\r\n ucs?.normal?.forEach((uc) => {\r\n Object.keys(uc.typologies) &&\r\n Object.keys(uc.typologies).forEach((typologyInitials) => {\r\n const typologyName = uc.typologies[typologyInitials].replace(/[|&:;$%@\"<>()+,]/g, '');\r\n let exists = existingTypologies.some(\r\n (typology) =>\r\n typology.name === typologyName && typology.initials === typologyInitials.toUpperCase()\r\n );\r\n if (!exists) {\r\n existingTypologies.push({ name: typologyName, initials: typologyInitials.toUpperCase() });\r\n }\r\n });\r\n });\r\n\r\n ucs?.mandatory?.forEach((groupUc) => {\r\n groupUc.ucs.forEach((uc) => {\r\n Object.keys(uc.typologies) &&\r\n Object.keys(uc.typologies).forEach((typologyInitials) => {\r\n const typologyName = uc.typologies[typologyInitials].replace(/[|&:;$%@\"<>()+,]/g, '');\r\n let exists = existingTypologies.some(\r\n (typology) =>\r\n typology.name === typologyName && typology.initials === typologyInitials.toUpperCase()\r\n );\r\n if (!exists) {\r\n existingTypologies.push({\r\n name: typologyName,\r\n initials: typologyInitials.toUpperCase(),\r\n });\r\n }\r\n });\r\n });\r\n });\r\n\r\n ucs?.free?.forEach((uc) => {\r\n uc?.typologies &&\r\n Object.keys(uc?.typologies) &&\r\n Object.keys(uc?.typologies).forEach((typologyInitials) => {\r\n const typologyName = uc?.typologies[typologyInitials].replace(/[|&:;$%@\"<>()+,]/g, '');\r\n let exists = existingTypologies.some(\r\n (typology) =>\r\n typology.name === typologyName && typology.initials === typologyInitials.toUpperCase()\r\n );\r\n if (!exists) {\r\n existingTypologies.push({\r\n name: typologyName,\r\n initials: typologyInitials.toUpperCase(),\r\n });\r\n }\r\n });\r\n });\r\n\r\n return existingTypologies;\r\n};\r\n\r\nexport const getUcFullName = (ucs: IUc[], selectedClass: number) => {\r\n let fullName = '';\r\n ucs.forEach((uc) => {\r\n if (uc.classSchedule.find((eachClass) => eachClass.classId === selectedClass)) {\r\n fullName = uc.ucFullName;\r\n }\r\n });\r\n return fullName;\r\n};\r\n\r\nexport const setClassSelectionState = (\r\n state: IUc[],\r\n action: PayloadAction<{ ucId: number; groupId?: number | null; classId: number; type: string }>\r\n) => {\r\n const associatedClasses = state\r\n .reduce((associatedClasses, eachUc) => {\r\n const comparisson =\r\n action.payload.groupId !== null || action.payload.groupId !== undefined\r\n ? eachUc.ucId === action.payload.ucId && eachUc.groupId === action.payload.groupId\r\n : eachUc.ucId === action.payload.ucId;\r\n if (comparisson) {\r\n eachUc.classSchedule.forEach((eachClass) => {\r\n if (\r\n eachClass.classId === action.payload.classId &&\r\n eachClass.associatedClasses?.classes\r\n ) {\r\n const stateClone = eachClass.associatedClasses.classes;\r\n associatedClasses = stateClone;\r\n }\r\n });\r\n }\r\n return associatedClasses;\r\n }, [] as number[])\r\n .filter((assoc) => assoc !== action.payload.classId);\r\n\r\n const classesOfThisUc = state.reduce((allClasses, eachUc) => {\r\n const comparisson =\r\n action.payload.groupId !== null || action.payload.groupId !== undefined\r\n ? eachUc.ucId === action.payload.ucId && eachUc.groupId === action.payload.groupId\r\n : eachUc.ucId === action.payload.ucId;\r\n\r\n if (comparisson) {\r\n eachUc.classSchedule.forEach((eachClass) => allClasses.push(eachClass.classId));\r\n }\r\n return allClasses;\r\n }, [] as number[]);\r\n\r\n // The class that triggered this function (the class clicked on)\r\n // was already selected?\r\n // If yes, the user wants to remove its selection\r\n const wantsToRemoveSelection = () => {\r\n const ucFound = state.find((uc) => uc.ucId === action.payload.ucId);\r\n if (ucFound) {\r\n const classFound = ucFound.classSchedule.find(\r\n (eachClass) => eachClass.classId === action.payload.classId\r\n );\r\n if (classFound) {\r\n return classFound.selected ? true : false;\r\n }\r\n }\r\n };\r\n\r\n return state.map((eachUc) => {\r\n return {\r\n ...eachUc,\r\n classSchedule: eachUc.classSchedule.map((eachClass) => {\r\n const comparisson =\r\n action.payload.groupId !== null || action.payload.groupId !== undefined\r\n ? eachClass.classId === action.payload.classId &&\r\n eachUc.groupId === action.payload.groupId\r\n : eachClass.classId === action.payload.classId;\r\n\r\n if (comparisson) {\r\n if (!eachClass.selected) {\r\n return {\r\n ...eachClass,\r\n selected: true,\r\n selectedAt: Date.now(),\r\n };\r\n } else {\r\n return {\r\n ...eachClass,\r\n selected: false,\r\n selectedAt: null,\r\n };\r\n }\r\n } else if (associatedClasses.includes(eachClass.classId) && !wantsToRemoveSelection()) {\r\n // If the class from this iteration it's associated with the selected one\r\n // it should be selected as well\r\n return {\r\n ...eachClass,\r\n selected: true,\r\n selectedAt: Date.now(),\r\n };\r\n } else if (associatedClasses.includes(eachClass.classId) && wantsToRemoveSelection()) {\r\n // If the class from this iteration it's associated with the selected one\r\n // but the user triggered this event because he wants to remove a selection\r\n // the associated classes should, also, be cleared/deselected\r\n return {\r\n ...eachClass,\r\n selected: false,\r\n selectedAt: null,\r\n };\r\n } else if (\r\n eachClass.selected &&\r\n eachClass.associatedClasses &&\r\n eachClass.associatedClasses.classes.length &&\r\n classesOfThisUc.includes(eachClass.classId) &&\r\n !associatedClasses.includes(eachClass.classId)\r\n ) {\r\n // (this solves the 'incremental associated classes' bug when changing selections)\r\n // If the class from this iteration is selected,\r\n // has 'associated classes',\r\n // belongs to the same uc of the selected one,\r\n // but is NOT associated with the class selected\r\n // it should lose its selection\r\n // I.E: deselect previous 'associated classes' whenever you change a class\r\n return {\r\n ...eachClass,\r\n selected: false,\r\n selectedAt: null,\r\n };\r\n } else if (\r\n (action.payload.groupId !== null || action.payload.groupId !== undefined\r\n ? eachUc.ucId === action.payload.ucId && eachUc.groupId === action.payload.groupId\r\n : eachUc.ucId === action.payload.ucId) &&\r\n eachClass.classType === action.payload.type &&\r\n eachClass.selected\r\n ) {\r\n // 'selected' should switch to false for all other classes (with the same type)\r\n // that belongs to the same ucId (payload)\r\n return { ...eachClass, selected: false, selectedAt: null };\r\n } else {\r\n return eachClass;\r\n }\r\n }),\r\n };\r\n });\r\n};\r\n\r\nexport const getSelectedClasses = (ucs: IUc[]) => {\r\n let selectedClassesArray = ucs.reduce((selected: ISelectedClasses[], uc) => {\r\n uc.classSchedule.forEach((eachClass) => {\r\n if (\r\n eachClass.selected &&\r\n !eachClass.filtered &&\r\n eachClass.allocated.state === 'notAssigned'\r\n ) {\r\n selected.push({\r\n ucId: uc.ucId,\r\n ucColor: uc.ucColor,\r\n ucInitials: uc.ucInitials,\r\n ucFullName: uc.ucFullName,\r\n classType: eachClass.classType,\r\n className: eachClass.className,\r\n classId: eachClass.classId,\r\n classesDays: [],\r\n locked: eachClass.locked,\r\n selectedStudents: eachClass.selectedStudents,\r\n freeSlots: eachClass.freeSlots,\r\n studentsLowerRanking: eachClass.studentsLowerRanking,\r\n studentsHigherRanking: eachClass.studentsHigherRanking,\r\n allocated: eachClass.allocated,\r\n slots: eachClass.slots,\r\n selectedAt: eachClass.selectedAt,\r\n });\r\n } else if (\r\n eachClass.selected &&\r\n !eachClass.filtered &&\r\n (eachClass.allocated.state === 'assigned' || eachClass.allocated.state === 'automatic')\r\n ) {\r\n selected.push({\r\n ucId: uc.ucId,\r\n ucColor: uc.ucColor,\r\n ucInitials: uc.ucInitials,\r\n ucFullName: uc.ucFullName,\r\n classType: eachClass.classType,\r\n className: eachClass.className,\r\n classesDays: [],\r\n classId: eachClass.classId,\r\n locked: eachClass.locked,\r\n selectedStudents: eachClass.selectedStudents,\r\n freeSlots: eachClass.freeSlots,\r\n studentsLowerRanking: eachClass.studentsLowerRanking,\r\n studentsHigherRanking: eachClass.studentsHigherRanking,\r\n allocated: eachClass.allocated,\r\n selectedAt: eachClass.selectedAt,\r\n });\r\n }\r\n });\r\n return selected;\r\n }, []);\r\n\r\n return (\r\n selectedClassesArray\r\n .map((selectedClass) => ({\r\n ...selectedClass,\r\n overlaps: hasOverlaps(selectedClass, ucs),\r\n classesDays: ucs.reduce((acc: any, uc: any) => {\r\n let accData: any = [];\r\n uc.classSchedule.forEach((eachClass) => {\r\n if (eachClass.classId === selectedClass.classId) {\r\n accData = [\r\n ...accData,\r\n {\r\n startTime: eachClass.startTime,\r\n endTime: eachClass.endTime,\r\n periodDays: eachClass.periodDays,\r\n },\r\n ];\r\n }\r\n });\r\n\r\n return [...acc, ...accData];\r\n }, []),\r\n }))\r\n // Return accumulator but filter duplicated items\r\n // Selecting 1 class from '1-3' period should select,\r\n // as well, the same class from '2-4' period\r\n // and this creates duplication because both classes has 'selected' property\r\n .filter(\r\n (eachClass: ISelectedClasses, index: number, self: ISelectedClasses[]) =>\r\n self.findIndex((c) => c.classId === eachClass.classId) === index\r\n )\r\n );\r\n};\r\n\r\nexport const setScheduleSelectedMandatoryClasses = (mandatoryUcs, selectedClasses) => {\r\n return mandatoryUcs.map((mandatoryUc) => ({\r\n ...mandatoryUc,\r\n ucs: mandatoryUc.ucs.map((uc) => ({\r\n ...uc,\r\n classSchedule: uc.classSchedule.map((classItem) => ({\r\n ...classItem,\r\n selected: selectedClasses.some((selectedClass) => {\r\n if (selectedClass.groupId !== null && selectedClass.groupId !== undefined) {\r\n return (\r\n selectedClass.classId === classItem.classId && selectedClass.groupId === uc.groupId\r\n );\r\n }\r\n return selectedClass.classId === classItem.classId;\r\n }),\r\n })),\r\n })),\r\n }));\r\n};\r\n\r\nexport const setClassLockState = (state: IUc[], action: PayloadAction) => {\r\n return state.map((eachUc) => {\r\n return {\r\n ...eachUc,\r\n classSchedule: eachUc.classSchedule.map((eachClass) => {\r\n if (action.payload === eachClass.classId) {\r\n return { ...eachClass, locked: !eachClass.locked };\r\n } else {\r\n return eachClass;\r\n }\r\n }),\r\n };\r\n });\r\n};\r\n\r\nexport const setClassesProvisorySeriationResult = (\r\n ucs: IUc[],\r\n seriationResult: IProvisorySeriationResult[]\r\n) => {\r\n return ucs.map((eachUc) => {\r\n return {\r\n ...eachUc,\r\n classSchedule: eachUc.classSchedule.map((eachClass) => {\r\n const found = seriationResult.find(\r\n (eachSeriatedClass) => eachSeriatedClass.classId === eachClass.classId\r\n );\r\n\r\n if (found) {\r\n return {\r\n ...eachClass,\r\n allocation: found.allocation,\r\n selectedStudents: found.selectedStudents,\r\n freeSlots: found.freeSlots,\r\n studentsLowerRanking: found.studentsLowerRanking,\r\n studentsHigherRanking: found.studentsHigherRanking,\r\n placed: found.placed,\r\n };\r\n } else {\r\n //if response final we need to filter typologies if one allocated exists as well in ucs\r\n const hideClass = eachUc.classSchedule.some(\r\n (eachOtherClass) =>\r\n eachOtherClass.allocated &&\r\n eachOtherClass.classId !== eachClass.classId &&\r\n eachOtherClass.classType === eachClass.classType\r\n );\r\n return { ...eachClass, filtered: hideClass };\r\n }\r\n }),\r\n };\r\n });\r\n};\r\n\r\nexport const clearSchedule = (state: IUc[]) => {\r\n return state.map((eachUc) => {\r\n return {\r\n ...eachUc,\r\n classSchedule: eachUc.classSchedule.map((eachClass) => {\r\n if (\r\n eachClass.selected &&\r\n eachClass.allocated.state === 'notAssigned' &&\r\n !eachClass.disabled\r\n ) {\r\n return { ...eachClass, selected: false };\r\n } else {\r\n return eachClass;\r\n }\r\n }),\r\n };\r\n });\r\n};\r\n\r\nexport const selectClassesToEditSchedule = (state: IUc[], classes: any[]) => {\r\n let newUcs = [...state];\r\n\r\n newUcs = state.map((eachUc) => {\r\n return {\r\n ...eachUc,\r\n classSchedule: eachUc.classSchedule.map((eachClass) => {\r\n const found = classes.some((classItem) => {\r\n if (classItem.mandatoryGroupId !== null && classItem.mandatoryGroupId !== undefined) {\r\n return (\r\n classItem.classId === eachClass.classId &&\r\n classItem.mandatoryGroupId === eachUc.groupId\r\n );\r\n }\r\n return classItem.classId === eachClass.classId;\r\n });\r\n if (found) {\r\n return { ...eachClass, selected: true, filtered: false };\r\n } else {\r\n return eachClass;\r\n }\r\n }),\r\n };\r\n });\r\n\r\n return newUcs.map((eachUc) => {\r\n return {\r\n ...eachUc,\r\n classSchedule: eachUc.classSchedule.map((eachClass) => {\r\n //we reiterate the class to check select mandatoryGroups\r\n if (eachUc.groupId !== null && eachUc.groupId !== undefined) {\r\n const findClassSelected = eachUc.classSchedule.some(\r\n (eachClassToFind) => eachClassToFind.selected\r\n );\r\n if (findClassSelected) {\r\n return { ...eachClass, selected: eachClass.selected, filtered: false };\r\n }\r\n }\r\n return eachClass;\r\n }),\r\n };\r\n });\r\n};\r\n\r\nexport const getScheduleSelectedClasses = (ucs: IUc[], submit?: boolean) => {\r\n // Selecting 1 class from '1-3' period should select the same class from '2-4' period\r\n // This creates a duplication because both classes has 'selected' property\r\n // That's why the reduce returned value is filtered, in the end\r\n return ucs\r\n .reduce((selected: ISelectedClassesScheduleSubmission[], uc: IUc) => {\r\n uc.classSchedule.forEach((eachClass) => {\r\n if (eachClass.selected && eachClass.allocated.state === 'notAssigned') {\r\n selected.push({\r\n classId: eachClass.classId,\r\n locked: eachClass.locked,\r\n ucId: uc.ucId,\r\n group: uc.groupId,\r\n aggregator: eachClass?.associatedClasses?.aggregator || null,\r\n });\r\n }\r\n });\r\n\r\n return selected;\r\n }, [])\r\n .filter(\r\n (\r\n eachClass: ISelectedClassesScheduleSubmission,\r\n index: number,\r\n self: ISelectedClassesScheduleSubmission[]\r\n ) =>\r\n self.findIndex((c) => {\r\n if (c.group !== null && c.group !== undefined) {\r\n return c.classId === eachClass.classId && c.group === eachClass.group;\r\n }\r\n return c.classId === eachClass.classId;\r\n }) === index\r\n );\r\n};\r\n\r\nconst isBefore = (startTime, endTime) => {\r\n if (startTime === endTime) return true;\r\n return moment(startTime, 'HH:mm').isBefore(moment(endTime, 'HH:mm'));\r\n};\r\n\r\nconst isAfter = (startTime, endTime) => {\r\n if (startTime === endTime) return true;\r\n return moment(startTime, 'HH:mm').isAfter(moment(endTime, 'HH:mm'));\r\n};\r\n\r\nconst hasOverlaps = (currentClass, selectedClasses) => {\r\n return selectedClasses.some((eachUc) => {\r\n let shouldOverlap = eachUc.classSchedule\r\n .filter(\r\n (allClassesItem) =>\r\n allClassesItem.classId === currentClass.classId &&\r\n (allClassesItem.weekday !== currentClass.weekday ||\r\n (isBefore(allClassesItem.endTime, currentClass.startTime) &&\r\n isAfter(allClassesItem.startTime, currentClass.endTime)))\r\n )\r\n .some((allClassesItem) => {\r\n return verifyOverlaps(allClassesItem, selectedClasses);\r\n });\r\n\r\n if (!shouldOverlap) {\r\n shouldOverlap = eachUc.classSchedule.some((allClassesItem) => {\r\n return (\r\n allClassesItem.classId !== currentClass.classId &&\r\n allClassesItem.selected &&\r\n !allClassesItem.filtered &&\r\n allClassesItem.weekday === currentClass.weekday &&\r\n !isBefore(allClassesItem.endTime, currentClass.startTime) &&\r\n !isAfter(allClassesItem.startTime, currentClass.endTime)\r\n );\r\n });\r\n }\r\n return shouldOverlap;\r\n });\r\n};\r\n\r\nconst verifyOverlaps = (currentClass, selectedClasses) => {\r\n return selectedClasses.some((eachUc) => {\r\n return eachUc.classSchedule.some((allClassesItem) => {\r\n return (\r\n allClassesItem.classId !== currentClass.classId &&\r\n allClassesItem.selected &&\r\n !allClassesItem.filtered &&\r\n allClassesItem.weekday === currentClass.weekday &&\r\n !isBefore(allClassesItem.endTime, currentClass.startTime) &&\r\n !isAfter(allClassesItem.startTime, currentClass.endTime)\r\n );\r\n });\r\n });\r\n};\r\n\r\nexport const hasProvisorySeriation = (ucs) => {\r\n return ucs.some((eachUc) =>\r\n eachUc.classSchedule.some(\r\n (eachClass) =>\r\n eachClass.studentsLowerRanking || eachClass.studentsHigherRanking || eachClass.freeSlots\r\n )\r\n );\r\n};\r\n\r\nexport const compareUcs = (ucs, ucsOriginal) => {\r\n const selectedClassesId = [] as number[];\r\n const originalSelectedClassesId = [] as number[];\r\n\r\n ucs.forEach((uc) =>\r\n uc?.classSchedule?.forEach((classItem) => {\r\n if (classItem.selected && classItem?.allocated?.state === 'notAssigned') {\r\n selectedClassesId.push(classItem.classId);\r\n }\r\n })\r\n );\r\n\r\n if (!selectedClassesId.length) {\r\n return true;\r\n }\r\n\r\n ucsOriginal.forEach((uc) =>\r\n uc.classSchedule.forEach((classItem) => {\r\n if (classItem.selected && classItem?.allocated?.state === 'notAssigned') {\r\n originalSelectedClassesId.push(classItem.classId);\r\n }\r\n })\r\n );\r\n\r\n return (\r\n selectedClassesId.every((selectedClass) =>\r\n originalSelectedClassesId.some(\r\n (originalSelectedClass) => selectedClass === originalSelectedClass\r\n )\r\n ) &&\r\n originalSelectedClassesId.every((selectedClass) =>\r\n selectedClassesId.some((originalSelectedClass) => selectedClass === originalSelectedClass)\r\n )\r\n );\r\n};\r\n\r\nexport const getIrregularMessageClass = (classItem) => {\r\n if (!classItem?.irregular) return null;\r\n\r\n return classItem?.irregular === 'noSlots'\r\n ? t('sgh.irregularSituationClassNoSlots')\r\n : classItem?.irregular\r\n ? t('sgh.irregularSituationClass')\r\n : null;\r\n};\r\n\r\nexport const getIrregularMessageUC = (classItem) => {\r\n if (!classItem?.irregular) return null;\r\n\r\n return classItem?.irregular === 'noSlots'\r\n ? t('sgh.irregularSituationClassNoSlots')\r\n : classItem?.irregular\r\n ? t('sgh.irregularSituationClass')\r\n : null;\r\n};\r\n\r\nexport const getIrregularMessageFreeOptions = (classItem) => {\r\n if (!classItem?.irregular) return null;\r\n\r\n switch (classItem?.irregular) {\r\n case 'noSlots':\r\n return t('sgh.irregularSituationClassNoSlotsFreeOptions'); //-> Esta turma não possui vagas. Contacte a secretaria do departamento,\r\n case 'noClasses':\r\n return t('sgh.irregularSituationNoClasses');\r\n case 'invalidCycle':\r\n return t('sgh.irregularSituationInvalidCycle');\r\n case 'invalidEcts':\r\n return t('sgh.irregularSituationInvalidEcts');\r\n case 'invalidPlan':\r\n return t('sgh.irregularSituationInvalidPlan');\r\n default:\r\n return t('sgh.irregularSituationClass');\r\n }\r\n};\r\n\r\nexport const getIrregularMessageSmallFreeOptions = (classItem) => {\r\n if (!classItem?.irregular) return null;\r\n\r\n switch (classItem?.irregular) {\r\n case 'noSlots':\r\n return t('sgh.irregularSituationClassNoSlotsSmall');\r\n case 'noClasses':\r\n return t('sgh.irregularSituationNoClassesSmall');\r\n case 'invalidCycle':\r\n return t('sgh.irregularSituationInvalidCycleSmall');\r\n case 'invalidEcts':\r\n return t('sgh.irregularSituationInvalidEctsSmall');\r\n case 'invalidPlan':\r\n return t('sgh.irregularSituationInvalidPlanSmall');\r\n default:\r\n return t('sgh.infoIrregularGeneral');\r\n }\r\n};\r\n\r\nexport const getIrregularMessageSmall = (classItem) => {\r\n if (!classItem?.irregularSituation) return null;\r\n\r\n return classItem.irregularSituation === 'noSlots'\r\n ? t('sgh.infoIrregularNoSlots')\r\n : classItem.irregularSituation === 'noLessons'\r\n ? t('sgh.infoIrregularNoLessons')\r\n : classItem.irregularSituation\r\n ? t('sgh.infoIrregularGeneral')\r\n : null;\r\n};\r\n","/**\r\n * Payments scene selectors\r\n *\r\n * @author Nuno Gago \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getUser = (state: RootState) => state.App.user;\r\nexport const getPaymentsSlice = (state: RootState) => state.Payments;\r\nexport const getPendingDebitsPaymentSlice = (state: RootState) => state.PendingDebitsPayment;\r\nexport const getRegistrationId = (state: RootState) =>\r\n state.StudentRegistrationDropdown.registration;\r\nexport const getStudentRegistrationDropdown = (state: RootState) =>\r\n state.StudentRegistrationDropdown;\r\nexport const getAppSlice = (state: RootState) => state.App;\r\n","/**\r\n * Schedules scene logic selectors\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getSchedulesSlice = (state: RootState) => state.Schedules;\r\nexport const getRegistration = (state: RootState) => state.StudentRegistrationDropdown.registration;\r\nexport const getMySchedules = (state: RootState) => state.MySchedules.createdSchedules;\r\nexport const getCurrentPhase = (state: RootState) => state.Schedules.currentPhase;\r\nexport const getUcs = (state: RootState) => state.Schedules.ucs;\r\nexport const getMandatoryOptions = (state: RootState) => state.MandatoryOptionsDropdown.options;\r\nexport const getLoadingSchedule = (state: RootState) => state.Schedules.loadingSchedule;\r\nexport const getRegistrations = (state: RootState) => state.App.user.registrations;\r\n","/**\r\n * PendingDebitsPayment selector\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getPendingDebitsPaymentSlice = (state: RootState) => state.PendingDebitsPayment;\r\nexport const getPaymentsSlice = (state: RootState) => state.Payments;\r\nexport const getRegistrationId = (state: RootState) =>\r\n state.StudentRegistrationDropdown.registration;\r\nexport const getAppSlice = (state: RootState) => state.App;\r\nexport const getUser = (state: RootState) => state.App.user;\r\n","import ReactGA from 'react-ga';\r\nimport { hotjar } from 'react-hotjar';\r\nimport LogRocket from 'logrocket';\r\nimport * as Sentry from '@sentry/react';\r\nimport { Integrations } from '@sentry/tracing';\r\n\r\nimport { eventChannel } from 'redux-saga';\r\n\r\nimport config, { IRole } from 'config';\r\n\r\nimport { listAllScopes } from 'api/utils';\r\nimport { history, getCurrentRoute } from 'utils';\r\n\r\nimport { put, call, takeLatest } from 'redux-saga/effects';\r\nimport API from 'api';\r\n\r\nexport const createTranslationBundles = (translations) => {\r\n let translationBundles = { pt: {}, en: {}, zh: {} };\r\n\r\n translations.forEach((module) => {\r\n module.fields.properties.forEach((property) => {\r\n if (property.key) {\r\n translationBundles.pt[module.fields.name] = {\r\n ...translationBundles.pt[module.fields.name],\r\n [property.key]: property.value,\r\n };\r\n translationBundles.en[module.fields.name] = {\r\n ...translationBundles.en[module.fields.name],\r\n [property.key]: property.valueEn,\r\n };\r\n translationBundles.zh[module.fields.name] = {\r\n ...translationBundles.zh[module.fields.name],\r\n [property.key]: property.valueCh,\r\n };\r\n }\r\n });\r\n });\r\n\r\n return translationBundles;\r\n};\r\n\r\nexport const initWebSocket = () => {\r\n //const url = config.SOCKET_BASE_URL + config.SOCKET_SCHEDULES_PATH;\r\n //return new WebSocket(url);\r\n};\r\n\r\nexport const initWebSocketChannel = (socket) => {\r\n return eventChannel((emitter) => {\r\n const escape_char = '\u001e';\r\n\r\n socket.onopen = function () {\r\n console.log('Connected.');\r\n socket.send('{\"protocol\":\"json\",\"version\":1}' + escape_char);\r\n };\r\n\r\n socket.onmessage = function (event) {\r\n const regx = new RegExp(`${escape_char}(?=.*${escape_char})`, 'g');\r\n const text = event.data.replace(regx, ',');\r\n\r\n const data = JSON.parse(`[${text.slice(0, -1)}]`);\r\n\r\n // keepalive message and response\r\n if (data[0].type === 6) {\r\n socket.send('{\"type\":6}' + escape_char);\r\n }\r\n\r\n const { route } = getCurrentRoute();\r\n\r\n // system state information\r\n if (data[0].type === 1) {\r\n switch (data[0].target) {\r\n case 'ranking_update':\r\n if (\r\n route.key === 'schedules' ||\r\n route.key === 'editschedules' ||\r\n route.key === 'duplicateschedules'\r\n ) {\r\n return emitter({\r\n type: 'Schedules/getSeriationResultRealTime',\r\n payload: '',\r\n });\r\n }\r\n break;\r\n case 'phase_start':\r\n if (\r\n route.key === 'schedules' ||\r\n route.key === 'editschedules' ||\r\n route.key === 'duplicateschedules'\r\n ) {\r\n return emitter({\r\n type: 'Schedules/onPhaseUpdate',\r\n payload: '',\r\n });\r\n }\r\n\r\n if (route.key === 'myschedules') {\r\n return emitter({\r\n type: 'MySchedules/onPhaseUpdate',\r\n payload: '',\r\n });\r\n }\r\n\r\n if (route.key === 'seriationhistory') {\r\n return emitter({\r\n type: 'SeriationHistory/onPhaseUpdate',\r\n payload: '',\r\n });\r\n }\r\n break;\r\n case 'phase_finished':\r\n //TODO get new phase and new data\r\n if (\r\n route.key === 'schedules' ||\r\n route.key === 'editschedules' ||\r\n route.key === 'duplicateschedules'\r\n ) {\r\n return emitter({\r\n type: 'Schedules/onPhaseUpdate',\r\n payload: '',\r\n });\r\n }\r\n\r\n if (route.key === 'myschedules') {\r\n return emitter({\r\n type: 'MySchedules/onPhaseUpdate',\r\n payload: '',\r\n });\r\n }\r\n\r\n if (route.key === 'seriationhistory') {\r\n return emitter({\r\n type: 'SeriationHistory/onPhaseUpdate',\r\n payload: '',\r\n });\r\n }\r\n break;\r\n default:\r\n console.log('Event not supported: ' + data[0].type);\r\n }\r\n\r\n /*return emitter({\r\n type: 'Toaster/showToaster',\r\n payload: {\r\n title: data['arguments'][0]['stage'],\r\n icon: 'info',\r\n type: 'warning',\r\n },\r\n });*/\r\n }\r\n };\r\n\r\n socket.onerror = function (error) {\r\n console.log('WebSocket error: ' + error.message);\r\n };\r\n\r\n socket.onclose = function (event) {\r\n if (event.wasClean) {\r\n console.log('Disconnected.');\r\n } else {\r\n console.log('Connection lost.'); // for example if server processes is killed\r\n }\r\n console.log('Code: ' + event.code + '. Reason: ' + event.reason);\r\n };\r\n\r\n return () => {\r\n console.log('Socket off');\r\n socket.close();\r\n };\r\n });\r\n};\r\n\r\nexport const initTracking = () => {\r\n if (config.SENTRY_ID) {\r\n Sentry.init({\r\n dsn: config.SENTRY_ID,\r\n integrations: [new Integrations.BrowserTracing()],\r\n tracesSampleRate: 1.0,\r\n });\r\n }\r\n\r\n if (config.LOGROCKET_ID) {\r\n LogRocket.init(config.LOGROCKET_ID);\r\n }\r\n\r\n if (config.HOTJAR_TRACKING_ID && config.HOTJAR_SNIPPET_VERSION) {\r\n hotjar.initialize(config.HOTJAR_TRACKING_ID, config.HOTJAR_SNIPPET_VERSION);\r\n }\r\n\r\n if (config.GA_TRACKING_ID) {\r\n ReactGA.initialize(config.GA_TRACKING_ID);\r\n\r\n //record firstpage interaction / entryPoint\r\n ReactGA.set({ page: history.location.pathname });\r\n ReactGA.pageview(history.location.pathname);\r\n\r\n history.listen((location) => {\r\n ReactGA.set({ page: location.pathname });\r\n ReactGA.pageview(location.pathname);\r\n });\r\n }\r\n};\r\n\r\nexport const redirectAuthUrl = (scopes) => {\r\n const WSO2url = `${config.API_WSO2}authorize?response_type=${config.OIDC_CONFIG.responseType}&client_id=${config.OIDC_CONFIG.clientId}&state=${config.OIDC_CONFIG.state}&scope=${config.OIDC_CONFIG.scope} ${scopes}&redirect_uri=${config.OIDC_CONFIG.redirectUri}`;\r\n return WSO2url;\r\n};\r\n\r\nexport const redirectAuth = () => {\r\n const allScopes = listAllScopes();\r\n window.location.replace(redirectAuthUrl(allScopes.join(' ')));\r\n};\r\n\r\nexport const shouldSignin = () => {\r\n const code = (window.location.search.match(/code=([^&]+)/) || [])[1];\r\n const state = (window.location.search.match(/state=([^&]+)/) || [])[1];\r\n const sessionState = (window.location.search.match(/session_state=([^&]+)/) || [])[1];\r\n\r\n if (code) {\r\n return {\r\n code,\r\n state,\r\n sessionState,\r\n };\r\n }\r\n\r\n return null;\r\n};\r\n\r\nexport const hasTokenParameter = () => {\r\n const accessToken = (window.location.search.match(/access_token_parameter=([^&]+)/) || [])[1];\r\n const idToken = (window.location.search.match(/id_token_parameter=([^&]+)/) || [])[1];\r\n const refreshToken = (window.location.search.match(/refresh_token_parameter=([^&]+)/) || [])[1];\r\n\r\n if (accessToken && idToken && refreshToken) {\r\n return {\r\n accessToken,\r\n idToken,\r\n refreshToken,\r\n };\r\n }\r\n\r\n return null;\r\n};\r\n\r\nexport const decodeJWT = (token) => {\r\n let base64Url = token.split('.')[1];\r\n const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');\r\n const jsonPayload = decodeURIComponent(\r\n atob(base64)\r\n .split('')\r\n .map(function (c) {\r\n return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);\r\n })\r\n .join('')\r\n );\r\n\r\n return JSON.parse(jsonPayload);\r\n};\r\n\r\nexport const getUserRoles = (userGroups, superUserData): IRole[] => {\r\n const { ROLES_RELATIONSHIPS } = config;\r\n let roles: IRole[] = [];\r\n\r\n if (userGroups) {\r\n ROLES_RELATIONSHIPS.forEach((roleRelationship) => {\r\n if (\r\n roleRelationship.relationships.some((relationship) => userGroups.includes(relationship))\r\n ) {\r\n roles.push(roleRelationship.role);\r\n }\r\n });\r\n }\r\n\r\n superUserData.forEach((group) => {\r\n let relation;\r\n if (group.includes('sgh_superUser_FullAccess')) {\r\n relation = ROLES_RELATIONSHIPS.find((roleRelation) =>\r\n roleRelation.role.includes('sgh_superUser_FullAccess')\r\n );\r\n } else if (group.includes('sec_superUser_FullAccess')) {\r\n relation = ROLES_RELATIONSHIPS.find((roleRelation) =>\r\n roleRelation.role.includes('sec_superUser_FullAccess')\r\n );\r\n } else if (group.includes('sgh_superUser_ReadOnly')) {\r\n relation = ROLES_RELATIONSHIPS.find((roleRelation) =>\r\n roleRelation.role.includes('sgh_superUser_ReadOnly')\r\n );\r\n } else if (group.includes('sec_superUser_ReadOnly')) {\r\n relation = ROLES_RELATIONSHIPS.find((roleRelation) =>\r\n roleRelation.role.includes('sec_superUser_ReadOnly')\r\n );\r\n } else if (group.includes('superUser_ReadOnly')) {\r\n relation = ROLES_RELATIONSHIPS.find((roleRelation) =>\r\n roleRelation.role.includes('superUser_ReadOnly')\r\n );\r\n } else if (group.includes('superUser_FullAccess')) {\r\n relation = ROLES_RELATIONSHIPS.find((roleRelation) =>\r\n roleRelation.role.includes('superUser_FullAccess')\r\n );\r\n } else if (group.includes('sec_superUser_FullAccess')) {\r\n relation = ROLES_RELATIONSHIPS.find((roleRelation) =>\r\n roleRelation.role.includes('sec_superUser_FullAccess')\r\n );\r\n } else if (group.includes('pautas_superUser_ReadOnly')) {\r\n relation = ROLES_RELATIONSHIPS.find((roleRelation) =>\r\n roleRelation.role.includes('pautas_superUser_ReadOnly')\r\n );\r\n } else if (group.includes('pautas_superUser_FullAccess')) {\r\n relation = ROLES_RELATIONSHIPS.find((roleRelation) =>\r\n roleRelation.role.includes('pautas_superUser_FullAccess')\r\n );\r\n }\r\n if (relation) {\r\n roles.push(relation.role);\r\n }\r\n });\r\n\r\n return roles;\r\n};\r\n","/**\r\n * NewApplication scene logic selectors\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getCurrentStep = (state: RootState) => state.NewApplication.currentStep;\r\nexport const getUserNmec = (state: RootState) => state.App.user.nmec;\r\nexport const getNewApplicationData = (state: RootState) => state.NewApplication.applicationData;\r\nexport const getNewApplicationSlice = (state: RootState) => state.NewApplication;\r\nexport const getApplicationRequestParams = (state: RootState) => state.NewApplication.filterParams;\r\nexport const getApplicationTypeId = (state: RootState) => state.NewApplication.applicationTypeId;\r\nexport const getApplicationLoading = (state: RootState) =>\r\n state.NewApplication.loadingStatus.loading;\r\nexport const getApplicationTabLoading = (state: RootState) =>\r\n state.NewApplication.loadingStatus.tabLoading;\r\nexport const getApplicationErrorStatus = (state: RootState) => state.NewApplication.errorStatus;\r\nexport const getRegistrations = (state: RootState) => state.App.user.registrations;\r\nexport const getUser = (state: RootState) => state.App.user;\r\n","/**\r\n * Payments scene utils\r\n *\r\n * @author Carlos Silva \r\n *\r\n */\r\n\r\nimport _ from 'lodash';\r\nimport {\r\n IPayments,\r\n IDebits,\r\n IPendingDebitsEntry,\r\n IDebitData,\r\n IPendingDebits,\r\n ICallParams,\r\n} from './types';\r\n\r\nexport const DEFAULT_PAYMENTS: IPayments = {\r\n data: [],\r\n loading: true,\r\n total: 0,\r\n};\r\n\r\nexport const DEFAULT_DEBITS: IDebits = {\r\n data: [],\r\n loading: true,\r\n total: 0,\r\n};\r\n\r\nexport const DEFAULT_PENDING_DEBITS: IPendingDebits = {\r\n data: [] as IPendingDebitsEntry[],\r\n loading: true,\r\n};\r\n\r\nexport const DEFAULT_PARAMS: ICallParams = {\r\n offset: 0,\r\n limit: 5,\r\n};\r\n\r\nexport const DEFAULT_DEBITS_PARAMS: ICallParams = {\r\n offset: 0,\r\n limit: 20,\r\n};\r\n\r\nexport const DEFAULT_UNSELECTED_DEBITS_PARAMS: ICallParams = {\r\n offset: 0,\r\n limit: 5,\r\n};\r\n\r\nexport const removeDebits = (debits: IDebitData[], multiples: IDebitData[]) => {\r\n const newDebits: IDebitData[] = [];\r\n\r\n debits.forEach((debit: IDebitData) => {\r\n if (!_.find(multiples, { debitId: debit.debitId })) {\r\n newDebits.push(debit);\r\n }\r\n });\r\n\r\n return newDebits;\r\n};\r\n\r\nexport const getPaymentInfo = (selectedDebits) => {\r\n return selectedDebits.map((debit) => ({\r\n id: debit.debitId,\r\n value: debit.value,\r\n associatedCosts: debit.associatedCosts,\r\n }));\r\n};\r\n","/**\r\n * NewCertificate scene selectors\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getUserNmec = (state: RootState) => state.App.user.nmec;\r\nexport const getUser = (state: RootState) => state.App.user;\r\nexport const getAppSlice = (state: RootState) => state.App.currentLocale;\r\nexport const getRegistrationId = (state: RootState) =>\r\n state.StudentRegistrationDropdown.registration;\r\nexport const getRegistrations = (state: RootState) => state.App.user.registrations;\r\nexport const getNewCertificateSlice = (state: RootState) => state.NewCertificate;\r\n","/**\r\n * App logic selectors\r\n *\r\n * @author Rafael Guedes \r\n *\r\n */\r\n\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getAppSlice = (state: RootState) => state.App;\r\nexport const getUser = (state: RootState) => state.App.user;\r\nexport const getTranslationsEdit = (state: RootState) => state.App.translationsEdit;\r\n","/**\r\n * CertificatesList selectors\r\n *\r\n * @author Diogo Guedes \r\n *\r\n */\r\nimport { RootState } from 'store/rootSlices';\r\n\r\nexport const getUserNmec = (state: RootState) => state.App.user.nmec;\r\nexport const getCertificatesListSlice = (state: RootState) => state.CertificatesList;\r\nexport const getUser = (state: RootState) => state.App.user;\r\nexport const getRegistration = (state: RootState) => state.StudentRegistrationDropdown.registration;\r\nexport const getAppSlice = (state: RootState) => state.App.currentLocale;\r\n"],"sourceRoot":""}