{"version":3,"sources":["store/actions/accessControl.ts","store/actions/accountSettings.ts","store/actions/api.ts","store/actions/auth.ts","store/actions/broadcastMessages.ts","store/actions/cameraDevice.ts","store/actions/caseLogs.ts","store/actions/cohorts.ts","store/actions/company.ts","store/actions/customFields.ts","store/actions/enrollments.ts","store/actions/evaluations.ts","store/actions/evaluationsSchedulers.ts","store/actions/evaluationsTemplates.ts","store/actions/feedbackForm.ts","store/actions/fileCategories.ts","store/actions/files.ts","store/actions/guideLineTutorial.ts","store/actions/importData.ts","store/actions/institutions.ts","store/actions/invitations.ts","store/actions/localStore.ts","store/actions/metrics.ts","store/actions/notifications.ts","store/actions/periods.ts","store/actions/programs.ts","store/actions/reports.ts","store/actions/rotations.ts","store/actions/routerBeforeTransitions.ts","store/actions/routerManager.ts","store/actions/serviceWorker.ts","store/actions/tenantSettings.ts","store/actions/terms.ts","store/actions/users.ts","store/actions/usersManager.ts","store/actions/portfolio.ts","components/evaluations/EvaluationsPermissions.js","utils/local-storage/localStore.ts","utils/index.ts","store/api/Auth.ts","components/company/CompaniesPermissions.js","components/shared/Loader.tsx","components/admin-portal/AdminPortalPermissions.js","components/reports/queries/query-params/query-utils/queryUtils.js","store/reducers/evaluations.ts","store/reducers/tenantSettings.ts","store/api/Reports.ts","store/sagas/reports.ts","components/files/FilesPermissions.js","images/iconUserEmpty.svg","components/reports/queries/query-params/models/index.ts","store/reducers/accountSettings.ts","store/sagas/accountSettings.ts","store/reducers/broadcastMessages.ts","images/iconInstitutionEmpty.svg","components/evaluations-templates/edit/_EvaluationsTemplates.utils.ts","images/iconCompanyEmpty.svg","components/institutions/InstitutionsPermissions.js","components/rotations/RotationsPermissions.js","components/shared/ErrorComponent.tsx","store/reducers/rotations.ts","components/user-invitation-manager/UserInvitationsPermissions.js","store/reducers/caseLogs.ts","components/camera/CameraWarning.container.tsx","components/user-manager/UsersPermissions.js","store/reducers/reports.ts","components/user-manager/UserManagerFilters.js","components/reports/ReportsPermissions.js","store/reducers/accessControl.ts","store/api/API.ts","store/reducers/api.ts","store/reducers/auth.ts","store/reducers/cameraDevice.ts","store/reducers/cohorts.ts","store/reducers/company.ts","store/reducers/config.ts","store/reducers/customFields.ts","store/reducers/enrollments.ts","store/reducers/evaluationsSchedulers.ts","store/reducers/evaluationsTemplates.ts","store/reducers/feedbackForm.ts","store/reducers/fileCategories.ts","store/reducers/guideLineTutorial.ts","store/reducers/importData.ts","store/reducers/institutions.ts","store/reducers/invitations.ts","store/reducers/localStore.ts","store/reducers/metrics.ts","utils/socket/serviceSocket.ts","store/reducers/notifications.ts","store/reducers/periods.ts","store/reducers/programs.ts","store/reducers/routerBeforeTransitions.ts","store/reducers/routerManager.ts","store/reducers/serviceWorker.ts","store/reducers/terms.ts","store/reducers/usersManager.ts","store/reducers/users.ts","store/reducers/portfolio.ts","store/reducers/index.ts","store/sagas/logger.ts","store/api/AccessControl.ts","store/sagas/accessControl.ts","store/sagas/auth.ts","store/api/BroadcastMessages.ts","store/sagas/broadcastMessages.ts","store/api/CaseLogs.ts","store/sagas/caseLogs.ts","store/api/Cohorts.ts","store/sagas/cohorts.ts","store/api/Company.ts","store/api/FileCategories.ts","store/sagas/company.ts","store/api/CustomFields.ts","store/sagas/customFields.ts","store/api/Enrollments.ts","store/sagas/enrollments.ts","store/api/Evaluations.ts","store/sagas/evaluations.ts","store/sagas/evaluationsSchedulers.ts","store/sagas/evaluationsTemplates.ts","store/api/FeedbackForm.ts","store/sagas/feedbackForm.ts","store/api/Files.ts","store/sagas/files.ts","store/sagas/fileCategories.ts","store/api/ImportData.ts","store/sagas/importData.ts","store/api/Invitations.ts","store/sagas/invitations.ts","store/api/Institutions.ts","store/sagas/institutions.ts","store/api/Metrics.ts","store/sagas/metrics.ts","store/api/Notifications.ts","store/sagas/notifications.ts","store/api/Periods.ts","store/sagas/periods.ts","store/api/Programs.ts","store/sagas/programs.ts","store/api/Rotations.ts","store/sagas/rotations.ts","store/api/TenantSettings.ts","store/sagas/tenantSettings.ts","store/api/Terms.ts","store/sagas/terms.ts","store/api/Users.ts","store/sagas/users.ts","store/api/Portfolio.ts","store/sagas/portfolio.ts","store/sagas/index.ts","store/index.ts","components/guide-line-tutorial/GuideLineTutorialContainer.js","components/notifications/NotificationsPermissions.js","components/menu/components/MenuTutorial.js","components/evaluations/answers/EvaluationAnswersPermissions.js","components/user-portfolio/UserPortfolioPermissions.js","components/notifications/utils/_Notifications.utils.ts","components/notifications/components/NotificationsFilters.tsx","components/notifications/components/NotificationsActionsInBulk.tsx","images/iconUserEmptyFill.svg","components/notifications/components/NotificationsActions.tsx","components/notifications/components/NotificationsDate.tsx","components/notifications/components/NotificationUserAccount.js","components/notifications/components/NotificationCustomFields.js","images/iconInstitutionEmptyFill.svg","components/notifications/components/NotificationInstitutionAccount.js","components/notifications/components/NotificationRotation.js","components/notifications/components/NotificationCaseLog.tsx","components/notifications/components/NotificationPeriod.js","components/notifications/components/NotificationEvaluation.tsx","components/notifications/components/NotificationDocuments.js","components/notifications/components/NotificationDocumentCategory.js","components/notifications/components/NotificationImportData.js","components/notifications/components/NotificationReport.js","components/notifications/components/Notifications.js","components/broadcast/broadcast-messages-list/BroadcastMessagesList.tsx","components/broadcast/broadcast-schedulers/BroadcastSchedulers.tsx","components/broadcast/broadcast-sent-message/BroadcastSentMessagePresentational.js","components/broadcast/broadcast-sent-message/BroadcastSentMessageContainer.js","components/broadcast/Broadcast.tsx","components/notifications/NotificationsPresentational.js","components/notifications/NotificationsContainer.js","components/menu/components/SubMenu.js","components/menu/MenuPresentational.js","components/menu/MenuContainer.tsx","components/emulate-user/EmulateUserPresentational.js","components/emulate-user/EmulateUserContainer.js","components/feedback-form/FeedbackForm.view.tsx","components/feedback-form/FeedbackForm.container.tsx","components/shared/LoadedRoute.js","components/route-loaded/RouteLoadedCompoundContainer.js","components/manager/RouteManagerCompoundContainer.js","components/shared/ProtectedRoute.js","components/redirects/RedirectsRoute.js","components/manager/ManagerRoute.js","components/home/HomeRoute.js","components/my-profile/MyProfileRoute.js","components/company/CompanyRoute.js","components/institutions/InstitutionsRoute.js","components/institutions/MyInstitutionRoute.js","components/rotations/RotationsRoute.js","components/evaluations-templates/EvaluationsTemplatesRoute.js","components/evaluations-schedulers/EvaluationsSchedulersRoute.js","components/evaluations/EvaluationsRoute.js","components/case-logs/CaseLogsRoute.js","components/reports/ReportsRoute.js","components/account-settings/AccountSettingsRoute.js","components/admin-portal/AdminPortalRoute.js","utils/service-worker/serviceWorkerRegistration.ts","components/signout/SignOutContainer.js","components/signout/SignOutRoute.js","components/broadcast/broadcast-messages/BroadcastMessages.view.tsx","components/broadcast/broadcast-messages/BroadcastMessages.container.tsx","components/fields-warning/FieldsWarningPresentational.js","components/fields-warning/FieldsWarningContainer.js","components/files/files-required-warning/FilesRequiredWarningPresentational.js","components/files/files-required-warning/FilesRequiredWarningContainer.js","components/reports/warning/ReportsWarningPresentational.js","components/reports/warning/ReportsWarningContainer.js","components/service-worker/ServiceWorkerPresentational.js","components/service-worker/ServiceWorkerContainer.js","router/index.tsx","components/AppMain.tsx","components/error-boundary/ErrorBoundary.js","utils/web-vitals/reportWebVitals.ts","index.tsx","components/manager/ManagerPermissions.js","components/evaluations-schedulers/EvaluationSchedulersPermissions.js","components/import/ImportDataPermissions.js","components/case-logs/CaseLogsPermissions.ts","components/evaluations-templates/EvaluationTemplatesPermissions.js"],"names":["ACCESS_CONTROL_INIT","initAccesControl","createAction","ACCESS_CONTROL_ROLE_SELECTED","accesControlRoleSelected","resolve","payload","ACCESS_CONTROL_FETCH_ROLES","ACCESS_CONTROL_FETCH_ROLES_REQUEST","ACCESS_CONTROL_FETCH_ROLES_SUCCESS","ACCESS_CONTROL_FETCH_ROLES_FAILURE","accessControlFetchRoles","accessControlFetchRolesRequest","accessControlFetchRolesSuccess","accessControlFetchRolesFailure","ACCESS_CONTROL_CREATE_ROLE","ACCESS_CONTROL_CREATE_ROLE_REQUEST","ACCESS_CONTROL_CREATE_ROLE_SUCCESS","ACCESS_CONTROL_CREATE_ROLE_FAILURE","accessControlCreateRole","accessControlCreateRoleRequest","accessControlCreateRoleSuccess","accessControlCreateRoleFailure","ACCESS_CONTROL_UPDATE_ROLE_RESOURCE","ACCESS_CONTROL_UPDATE_ROLE_RESOURCE_REQUEST","ACCESS_CONTROL_UPDATE_ROLE_RESOURCE_SUCCESS","ACCESS_CONTROL_UPDATE_ROLE_RESOURCE_FAILURE","accessControlUpdateRoleResource","accessControlUpdateRoleResourceRequest","accessControlUpdateRoleResourceSuccess","accessControlUpdateRoleResourceFailure","ACCESS_CONTROL_DELETE_ROLE","ACCESS_CONTROL_DELETE_ROLE_REQUEST","ACCESS_CONTROL_DELETE_ROLE_SUCCESS","ACCESS_CONTROL_DELETE_ROLE_FAILURE","accessControlDeleteRole","accessControlDeleteRoleRequest","accessControlDeleteRoleSuccess","accessControlDeleteRoleFailure","ACCESS_CONTROL_FETCH_DYNAMIC_RULES","ACCESS_CONTROL_FETCH_DYNAMIC_RULES_REQUEST","ACCESS_CONTROL_FETCH_DYNAMIC_RULES_SUCCESS","ACCESS_CONTROL_FETCH_DYNAMIC_RULES_FAILURE","accessControlFetchDynamicRules","accessControlFetchDynamicRulesRequest","accessControlFetchDynamicRulesSuccess","accessControlFetchDynamicRulesFailure","ACCESS_CONTROL_CREATE_DYNAMIC_RULE","ACCESS_CONTROL_CREATE_DYNAMIC_RULE_REQUEST","ACCESS_CONTROL_CREATE_DYNAMIC_RULE_SUCCESS","ACCESS_CONTROL_CREATE_DYNAMIC_RULE_FAILURE","accessControlCreateDynamicRule","accessControlCreateDynamicRuleRequest","accessControlCreateDynamicRuleSuccess","accessControlCreateDynamicRuleFailure","ACCESS_CONTROL_EDIT_DYNAMIC_RULE","ACCESS_CONTROL_EDIT_DYNAMIC_RULE_REQUEST","ACCESS_CONTROL_EDIT_DYNAMIC_RULE_SUCCESS","ACCESS_CONTROL_EDIT_DYNAMIC_RULE_FAILURE","accessControlEditDynamicRule","accessControlEditDynamicRuleRequest","accessControlEditDynamicRuleSuccess","accessControlEditDynamicRuleFailure","ACCESS_CONTROL_DELETE_DYNAMIC_RULE","ACCESS_CONTROL_DELETE_DYNAMIC_RULE_REQUEST","ACCESS_CONTROL_DELETE_DYNAMIC_RULE_SUCCESS","ACCESS_CONTROL_DELETE_DYNAMIC_RULE_FAILURE","accessControlDeleteDynamicRule","accessControlDeleteDynamicRuleRequest","accessControlDeleteDynamicRuleSuccess","accessControlDeleteDynamicRuleFailure","ACCOUNT_SETTINGS_UPDATE_SETTING_NAME","accountSettingsUpdateSettingName","ACCOUNT_SETTINGS_UPDATE_APP_NEW_FEATURES","accountSettingsUpdateAppNewFeatures","ACCOUNT_SETTINGS_UPDATE_FRONTEND_PERSONALIZATION","accountSettingsUpdateFrontendPersonalization","ACCOUNT_SETTINGS_RESET_FRONTEND_PERSONALIZATION","accountSettingsResetFrontendPersonalization","ACCOUNT_SETTINGS_FETCH","ACCOUNT_SETTINGS_FETCH_REQUEST","ACCOUNT_SETTINGS_FETCH_SUCCESS","ACCOUNT_SETTINGS_FETCH_FAILURE","accountSettingsFetchMySettings","accountSettingsFetchMySettingsRequest","accountSettingsFetchMySettingsSuccess","accountSettingsFetchMySettingsFailure","ACCOUNT_SETTINGS_EDIT","ACCOUNT_SETTINGS_EDIT_REQUEST","ACCOUNT_SETTINGS_EDIT_SUCCESS","ACCOUNT_SETTINGS_EDIT_FAILURE","ACCOUNT_SETTINGS_EDIT_DONE","accountSettingsEditMySettings","accountSettingsEditMySettingsRequest","accountSettingsEditMySettingsSuccess","accountSettingsEditMySettingsFailure","accountSettingsEditMySettingsDone","INIT_API","initAPI","ADD_CANCEL_TOKEN_API","addCancelTokenAPI","REMOVE_CANCEL_TOKEN_API","removeCancelTokenAPI","AUTH_SIGNIN_APP","AUTH_SIGNIN_REQUEST_APP","AUTH_SIGNIN_SUCCESS_APP","AUTH_SIGNIN_FAILURE_APP","authSignInApp","authSignInRequestApp","authSignInSuccessApp","authSignInFailureApp","AUTH_SWITCH_ACCOUNT","AUTH_SWITCH_ACCOUNT_REQUEST_APP","AUTH_SWITCH_ACCOUNT_SUCCESS_APP","AUTH_SWITCH_ACCOUNT_FAILURE_APP","authSwithcAccount","authSwithcAccountRequest","authSwithcAccountSuccess","authSwithcAccountFailure","AUTH_UPDATE_MY_USER_ACCOUNT","AUTH_UPDATE_MY_USER_ACCOUNT_REQUEST","AUTH_UPDATE_MY_USER_ACCOUNT_SUCCESS","AUTH_UPDATE_MY_USER_ACCOUNT_FAILURE","authUpdateMyUserAccount","authUpdateMyUserAccountRequest","authUpdateMyUserAccountSuccess","authUpdateMyUserAccountFailure","AUTH_EDIT_MY_SETTINGS","AUTH_EDIT_MY_SETTINGS_REQUEST","AUTH_EDIT_MY_SETTINGS_SUCCESS","AUTH_EDIT_MY_SETTINGS_FAILURE","authEditMySettings","authEditMySettingsRequest","authEditMySettingsSuccess","authEditMySettingsFailure","AUTH_FETCH_MY_FILES","AUTH_FETCH_MY_FILES_REQUEST","AUTH_FETCH_MY_FILES_SUCCESS","AUTH_FETCH_MY_FILES_FAILURE","authFetchMyFiles","authFetchMyFilesRequest","authFetchMyFilesSuccess","authFetchMyFilesFailure","AUTH_FETCH_MY_INSTITUTION","AUTH_FETCH_MY_INSTITUTION_REQUEST","AUTH_FETCH_MY_INSTITUTION_SUCCESS","AUTH_FETCH_MY_INSTITUTION_FAILURE","authFetchMyInstitution","authFetchMyInstitutionRequest","authFetchMyInstitutionSuccess","authFetchMyInstitutionFailure","AUTH_CHECK_SESSION_EXPIRED_APP","authCheckSessionExpiredApp","AUTH_SESSION_EXPIRED_APP","authSessionExpiredApp","AUTH_SIGNOUT_APP","AUTH_SIGNOUT_REQUEST_APP","AUTH_SIGNOUT_SUCCESS_APP","AUTH_SIGNOUT_FAILURE_APP","authSignOutApp","authSignOutRequestApp","authSignOutSuccessApp","authSignOutFailureApp","BROADCAST_MESSAGES_FETCH_MESSAGES","BROADCAST_MESSAGES_FETCH_MESSAGES_REQUEST","BROADCAST_MESSAGES_FETCH_MESSAGES_SUCCESS","BROADCAST_MESSAGES_FETCH_MESSAGES_FAILURE","broadcastMessagesFetchMessages","broadcastMessagesFetchMessagesRequest","broadcastMessagesFetchMessagesSuccess","broadcastMessagesFetchMessagesFailure","BROADCAST_MESSAGES_SET_MESSAGES","BROADCAST_MESSAGES_SAVE_MESSAGES","broadcastMessagesSetMessages","broadcastMessagesSaveMessages","BROADCAST_MESSAGES_CREATE","BROADCAST_MESSAGES_CREATE_REQUEST","BROADCAST_MESSAGES_CREATE_SUCCESS","BROADCAST_MESSAGES_CREATE_FAILURE","broadcastMessagesCreate","broadcastMessagesCreateRequest","broadcastMessagesCreateSuccess","broadcastMessagesCreateFailure","BROADCAST_MESSAGES_EDIT","BROADCAST_MESSAGES_EDIT_REQUEST","BROADCAST_MESSAGES_EDIT_SUCCESS","BROADCAST_MESSAGES_EDIT_FAILURE","broadcastMessagesEdit","broadcastMessagesEditRequest","broadcastMessagesEditSuccess","broadcastMessagesEditFailure","BROADCAST_MESSAGES_DELETE","BROADCAST_MESSAGES_DELETE_REQUEST","BROADCAST_MESSAGES_DELETE_SUCCESS","BROADCAST_MESSAGES_DELETE_FAILURE","broadcastMessagesDelete","broadcastMessagesDeleteRequest","broadcastMessagesDeleteSuccess","broadcastMessagesDeleteFailure","CAMERA_DEVICE_SHOW_WARNING_MSG","cameraDeviceShowWarningMsg","CAMERA_DEVICE_HIDE_WARNING_MSG","cameraDeviceHideWarningMsg","CASELOGS_FETCH_ALL","CASELOGS_FETCH_ALL_REQUEST","CASELOGS_FETCH_ALL_SUCCESS","CASELOGS_FETCH_ALL_FAILURE","caseLogsFetchAll","caseLogsFetchAllRequest","caseLogsFetchAllSuccess","caseLogsFetchAllFailure","CASELOGS_FETCH_KPIS","CASELOGS_FETCH_KPIS_REQUEST","CASELOGS_FETCH_KPIS_SUCCESS","CASELOGS_FETCH_KPIS_FAILURE","caseLogsFetchKpis","caseLogsFetchKpisRequest","caseLogsFetchKpisSuccess","caseLogsFetchKpisFailure","CASELOGS_CREATE","CASELOGS_CREATE_REQUEST","CASELOGS_CREATE_SUCCESS","CASELOGS_CREATE_FAILURE","caseLogsCreate","caseLogsCreateRequest","caseLogsCreateSuccess","caseLogsCreateFailure","CASELOGS_CREATE_DUMMY","CASELOGS_CREATE_DUMMY_REQUEST","CASELOGS_CREATE_DUMMY_SUCCESS","CASELOGS_CREATE_DUMMY_FAILURE","caseLogsCreateDummy","caseLogsCreateDummyRequest","caseLogsCreateDummySuccess","caseLogsCreateDummyFailure","CASELOGS_SET_CASELOGID","caseLogsSetcaseLogId","CASELOGS_UNSET_CASELOGID","caseLogsUnsetcaseLogId","CASELOGS_FETCH_CASELOG","CASELOGS_FETCH_CASELOG_REQUEST","CASELOGS_FETCH_CASELOG_SUCCESS","CASELOGS_FETCH_CASELOG_FAILURE","caseLogsFetchCaseLog","caseLogsFetchCaseLogRequest","caseLogsFetchCaseLogSuccess","caseLogsFetchCaseLogFailure","CASELOGS_EDIT","CASELOGS_EDIT_REQUEST","CASELOGS_EDIT_SUCCESS","CASELOGS_EDIT_FAILURE","caseLogsEdit","caseLogsEditRequest","caseLogsEditSuccess","caseLogsEditFailure","CASELOGS_DELETE","CASELOGS_DELETE_REQUEST","CASELOGS_DELETE_SUCCESS","CASELOGS_DELETE_FAILURE","caseLogsDelete","caseLogsDeleteRequest","caseLogsDeleteSuccess","caseLogsDeleteFailure","CASELOGS_REVIEW","CASELOGS_REVIEW_REQUEST","CASELOGS_REVIEW_SUCCESS","CASELOGS_REVIEW_FAILURE","caseLogsReview","caseLogsReviewRequest","caseLogsReviewSuccess","caseLogsReviewFailure","CASELOGS_RESET_CASELOG_LOADED","caseLogsResetCaseLogsLoaded","CASELOGS_CREATE_EDIT_UPDATE","caseLogsCreateEditUpdate","CASELOGS_CREATE_EDIT_STEP","caseLogsCreateEditStep","COHORTS_FETCH_COHORTS","COHORTS_FETCH_COHORTS_REQUEST","COHORTS_FETCH_COHORTS_SUCCESS","COHORTS_FETCH_COHORTS_FAILURE","cohortsFetchCohorts","cohortsFetchCohortsRequest","cohortsFetchCohortsSuccess","cohortsFetchCohortsFailure","COHORTS_CREATE","COHORTS_CREATE_REQUEST","COHORTS_CREATE_SUCCESS","COHORTS_CREATE_FAILURE","cohortsCreate","cohortsCreateRequest","cohortsCreateSuccess","cohortsCreateFailure","COHORTS_EDIT_COHORT","COHORTS_EDIT_COHORT_REQUEST","COHORTS_EDIT_COHORT_SUCCESS","COHORTS_EDIT_COHORT_FAILURE","cohortsEditCohort","cohortsEditCohortRequest","cohortsEditCohortSuccess","cohortsEditCohortFailure","COHORTS_DELETE","COHORTS_DELETE_REQUEST","COHORTS_DELETE_SUCCESS","COHORTS_DELETE_FAILURE","cohortsDelete","cohortsDeleteRequest","cohortsDeleteSuccess","cohortsDeleteFailure","COMPANY_FETCH_COMPANY","COMPANY_FETCH_COMPANY_REQUEST","COMPANY_FETCH_COMPANY_SUCCESS","COMPANY_FETCH_COMPANY_FAILURE","companyFetchCompany","companyFetchCompanyRequest","companyFetchCompanySuccess","companyFetchCompanyFailure","COMPANY_EDIT_COMPANY","COMPANY_EDIT_COMPANY_REQUEST","COMPANY_EDIT_COMPANY_SUCCESS","COMPANY_EDIT_COMPANY_FAILURE","companyEditCompany","companyEditCompanyRequest","companyEditCompanySuccess","companyEditCompanyFailure","COMPANY_FETCH_COMPANY_FILES","COMPANY_FETCH_COMPANY_FILES_REQUEST","COMPANY_FETCH_COMPANY_FILES_SUCCESS","COMPANY_FETCH_COMPANY_FILES_FAILURE","companyFetchCompanyFiles","companyFetchCompanyFilesRequest","companyFetchCompanyFilesSuccess","companyFetchCompanyFilesFailure","COMPANY_FETCH_COMPANY_FILES_EXPIRED","COMPANY_FETCH_COMPANY_FILES_EXPIRED_REQUEST","COMPANY_FETCH_COMPANY_FILES_EXPIRED_SUCCESS","COMPANY_FETCH_COMPANY_FILES_EXPIRED_FAILURE","companyFetchCompanyFilesExpired","companyFetchCompanyFilesExpiredRequest","companyFetchCompanyFilesExpiredSuccess","companyFetchCompanyFilesExpiredFailure","COMPANY_UPLOAD_COMPANY_FILES","COMPANY_UPLOAD_COMPANY_FILES_REQUEST","COMPANY_UPLOAD_COMPANY_FILES_SUCCESS","COMPANY_UPLOAD_COMPANY_FILES_FAILURE","companyUploadCompanyFiles","companyUploadCompanyFilesRequest","companyUploadCompanyFilesSuccess","companyUploadCompanyFilesFailure","CUSTOM_FIELDS_FETCH_CUSTOM_FIELDS","CUSTOM_FIELDS_FETCH_CUSTOM_FIELDS_REQUEST","CUSTOM_FIELDS_FETCH_CUSTOM_FIELDS_SUCCESS","CUSTOM_FIELDS_FETCH_CUSTOM_FIELDS_FAILURE","customFieldsFetchCustomFields","customFieldsFetchCustomFieldsRequest","customFieldsFetchCustomFieldsSuccess","customFieldsFetchCustomFieldsFailure","CUSTOM_FIELDS_CREATE","CUSTOM_FIELDS_CREATE_REQUEST","CUSTOM_FIELDS_CREATE_SUCCESS","CUSTOM_FIELDS_CREATE_FAILURE","customFieldsCreate","customFieldsCreateRequest","customFieldsCreateSuccess","customFieldsCreateFailure","CUSTOM_FIELDS_EDIT_FIELD","CUSTOM_FIELDS_EDIT_FIELD_REQUEST","CUSTOM_FIELDS_EDIT_FIELD_SUCCESS","CUSTOM_FIELDS_EDIT_FIELD_FAILURE","customFieldsEditField","customFieldsEditFieldRequest","customFieldsEditFieldSuccess","customFieldsEditFieldFailure","CUSTOM_FIELDS_DELETE_FIELD","CUSTOM_FIELDS_DELETE_FIELD_REQUEST","CUSTOM_FIELDS_DELETE_FIELD_SUCCESS","CUSTOM_FIELDS_DELETE_FIELD_FAILURE","customFieldsDeleteField","customFieldsDeleteFieldRequest","customFieldsDeleteFieldSuccess","customFieldsDeleteFieldFailure","CUSTOM_FIELDS_REQUIRED_TRIGER_ANIMATION","customFieldsRequiredTriggerAnimation","STUDENTS_ENROLLMENTS_FETCH","STUDENTS_ENROLLMENTS_FETCH_REQUEST","STUDENTS_ENROLLMENTS_FETCH_SUCCESS","STUDENTS_ENROLLMENTS_FETCH_FAILURE","studentEnrollmentsFetch","studentEnrollmentsFetchRequest","studentEnrollmentsFetchSuccess","studentEnrollmentsFetchFailure","STUDENT_ENROLLMENT_CREATE","STUDENT_ENROLLMENT_CREATE_REQUEST","STUDENT_ENROLLMENT_CREATE_SUCCESS","STUDENT_ENROLLMENT_CREATE_FAILURE","studentEnrollmentCreate","studentEnrollmentCreateRequest","studentEnrollmentCreateSuccess","studentEnrollmentCreateFailure","STUDENT_ENROLLMENT_EDIT","STUDENT_ENROLLMENT_EDIT_REQUEST","STUDENT_ENROLLMENT_EDIT_SUCCESS","STUDENT_ENROLLMENT_EDIT_FAILURE","studentEnrollmentEdit","studentEnrollmentEditRequest","studentEnrollmentEditSuccess","studentEnrollmentEditFailure","STUDENT_ENROLLMENT_DELETE","STUDENT_ENROLLMENT_DELETE_REQUEST","STUDENT_ENROLLMENT_DELETE_SUCCESS","STUDENT_ENROLLMENT_DELETE_FAILURE","studentEnrollmentDelete","studentEnrollmentDeleteRequest","studentEnrollmentDeleteSuccess","studentEnrollmentDeleteFailure","EVALUATIONS_SET_TAB_SELECTED","evaluationsSetTabSelected","EVALUATIONS_FETCH_ALL","EVALUATIONS_FETCH_ALL_REQUEST","EVALUATIONS_FETCH_ALL_SUCCESS","EVALUATIONS_FETCH_ALL_FAILURE","evaluationsFetchAll","evaluationsFetchAllRequest","evaluationsFetchAllSuccess","evaluationsFetchAllFailure","EVALUATIONS_FETCH_BY_FILTERS","EVALUATIONS_FETCH_BY_FILTERS_REQUEST","EVALUATIONS_FETCH_BY_FILTERS_SUCCESS","EVALUATIONS_FETCH_BY_FILTERS_FAILURE","evaluationsFetchByFilters","evaluationsFetchByFiltersRequest","evaluationsFetchByFiltersSuccess","evaluationsFetchByFiltersFailure","EVALUATIONS_FETCH_KPIS","EVALUATIONS_FETCH_KPIS_REQUEST","EVALUATIONS_FETCH_KPIS_SUCCESS","EVALUATIONS_FETCH_KPIS_FAILURE","evaluationsFetchKpis","evaluationsFetchKpisRequest","evaluationsFetchKpisSuccess","evaluationsFetchKpisFailure","EVALUATIONS_ANSWERS_FETCH_KPIS","EVALUATIONS_ANSWERS_FETCH_KPIS_REQUEST","EVALUATIONS_ANSWERS_FETCH_KPIS_SUCCESS","EVALUATIONS_ANSWERS_FETCH_KPIS_FAILURE","evaluationsAnswersFetchKpis","evaluationsAnswersFetchKpisRequest","evaluationsAnswersFetchKpisSuccess","evaluationsAnswersFetchKpisFailure","EVALUATIONS_SET_EVALUATION_ID","evaluationsSetEvaluationId","EVALUATIONS_UNSET_EVALUATION_ID","evaluationsUnsetEvaluationId","EVALUATIONS_FETCH_EVALUATION","EVALUATIONS_FETCH_EVALUATION_REQUEST","EVALUATIONS_FETCH_EVALUATION_SUCCESS","EVALUATIONS_FETCH_EVALUATION_FAILURE","evaluationsFetchEvaluation","evaluationsFetchEvaluationRequest","evaluationsFetchEvaluationSuccess","evaluationsFetchEvaluationFailure","EVALUATIONS_CREATE","EVALUATIONS_CREATE_REQUEST","EVALUATIONS_CREATE_SUCCESS","EVALUATIONS_CREATE_FAILURE","evaluationsCreate","evaluationsCreateRequest","evaluationsCreateSuccess","evaluationsCreateFailure","EVALUATIONS_EDIT","EVALUATIONS_EDIT_REQUEST","EVALUATIONS_EDIT_SUCCESS","EVALUATIONS_EDIT_FAILURE","evaluationsEdit","evaluationsEditRequest","evaluationsEditSuccess","evaluationsEditFailure","EVALUATIONS_DELETE","EVALUATIONS_DELETE_REQUEST","EVALUATIONS_DELETE_SUCCESS","EVALUATIONS_DELETE_FAILURE","evaluationsDelete","evaluationsDeleteRequest","evaluationsDeleteSuccess","evaluationsDeleteFailure","EVALUATIONS_FETCH_ANSWERS","EVALUATIONS_FETCH_ANSWERS_REQUEST","EVALUATIONS_FETCH_ANSWERS_SUCCESS","EVALUATIONS_FETCH_ANSWERS_FAILURE","evaluationsFetchAnswers","evaluationsFetchAnswersRequest","evaluationsFetchAnswersSuccess","evaluationsFetchAnswersFailure","EVALUATIONS_FETCH_EVALUATION_ANSWERS","EVALUATIONS_FETCH_EVALUATION_ANSWERS_REQUEST","EVALUATIONS_FETCH_EVALUATION_ANSWERS_SUCCESS","EVALUATIONS_FETCH_EVALUATION_ANSWERS_FAILURE","evaluationsFetchEvaluationAnswers","evaluationsFetchEvaluationAnswersRequest","evaluationsFetchEvaluationAnswersSuccess","evaluationsFetchEvaluationAnswersFailure","EVALUATIONS_SET_ANSWER_ID","evaluationsSetAnswerId","EVALUATIONS_UNSET_ANSWER_ID","evaluationsUnsetAnswerId","EVALUATIONS_FETCH_EVALUATION_ANSWER","EVALUATIONS_FETCH_EVALUATION_ANSWER_REQUEST","EVALUATIONS_FETCH_EVALUATION_ANSWER_SUCCESS","EVALUATIONS_FETCH_EVALUATION_ANSWER_FAILURE","evaluationsFetchEvaluationAnswer","evaluationsFetchEvaluationAnswerRequest","evaluationsFetchEvaluationAnswerSuccess","evaluationsFetchEvaluationAnswerFailure","EVALUATIONS_RESET_ANSWER_LOADED","evaluationsResetAnswerLoaded","EVALUATIONS_RESPONSE_EVALUATION_ANSWERS","EVALUATIONS_RESPONSE_EVALUATION_ANSWERS_REQUEST","EVALUATIONS_RESPONSE_EVALUATION_ANSWERS_SUCCESS","EVALUATIONS_RESPONSE_EVALUATION_ANSWERS_FAILURE","evaluationsResponseEvaluationAnswers","evaluationsResponseEvaluationAnswersRequest","evaluationsResponseEvaluationAnswersSuccess","evaluationsResponseEvaluationAnswersFailure","EVALUATIONS_RESET_EVALUATION_LOADED","evaluationsResetEvaluationLoaded","EVALUATIONS_DELETE_EVALUATION_ANSWER","EVALUATIONS_DELETE_EVALUATION_ANSWER_REQUEST","EVALUATIONS_DELETE_EVALUATION_ANSWER_SUCCESS","EVALUATIONS_DELETE_EVALUATION_ANSWER_FAILURE","evaluationsDeleteEvaluationAnswer","evaluationsDeleteEvaluationAnswerRequest","evaluationsDeleteEvaluationAnswerSuccess","evaluationsDeleteEvaluationAnswerFailure","EVALUATIONS_SCHEDULERS_SET_TAB_SELECTED","evaluationsSchedulersSetTabSelected","EVALUATIONS_SCHEDULERS_FETCH_EVALUATIONS_SCHEDULERS","EVALUATIONS_SCHEDULERS_FETCH_EVALUATIONS_SCHEDULERS_REQUEST","EVALUATIONS_SCHEDULERS_FETCH_EVALUATIONS_SCHEDULERS_SUCCESS","EVALUATIONS_SCHEDULERS_FETCH_EVALUATIONS_SCHEDULERS_FAILURE","evaluationsSchedulersFetchEvaluationsSchedulers","evaluationsSchedulersFetchEvaluationsSchedulersRequest","evaluationsSchedulersFetchEvaluationsSchedulersSuccess","evaluationsSchedulersFetchEvaluationsSchedulersFailure","EVALUATIONS_SCHEDULERS_CREATE","EVALUATIONS_SCHEDULERS_CREATE_REQUEST","EVALUATIONS_SCHEDULERS_CREATE_SUCCESS","EVALUATIONS_SCHEDULERS_CREATE_FAILURE","evaluationsSchedulersCreate","evaluationsSchedulersCreateRequest","evaluationsSchedulersCreateSuccess","evaluationsSchedulersCreateFailure","EVALUATIONS_SCHEDULERS_EDIT","EVALUATIONS_SCHEDULERS_EDIT_REQUEST","EVALUATIONS_SCHEDULERS_EDIT_SUCCESS","EVALUATIONS_SCHEDULERS_EDIT_FAILURE","evaluationsSchedulersEdit","evaluationsSchedulersEditRequest","evaluationsSchedulersEditSuccess","evaluationsSchedulersEditFailure","EVALUATIONS_SCHEDULERS_DELETE","EVALUATIONS_SCHEDULERS_DELETE_REQUEST","EVALUATIONS_SCHEDULERS_DELETE_SUCCESS","EVALUATIONS_SCHEDULERS_DELETE_FAILURE","evaluationsSchedulersDelete","evaluationsSchedulersDeleteRequest","evaluationsSchedulersDeleteSuccess","evaluationsSchedulersDeleteFailure","EVALUATIONS_SCHEDULERS_SET_EVALUATION_SCHEDULER_ID","evaluationsSchedulersSetEvaluationSchedulerId","EVALUATIONS_SCHEDULERS_UNSET_EVALUATION_SCHEDULER_ID","evaluationsSchedulersUnsetEvaluationSchedulerId","EVALUATIONS_SCHEDULERS_FETCH_EVALUATION_SCHEDULER","EVALUATIONS_SCHEDULERS_FETCH_EVALUATION_SCHEDULER_REQUEST","EVALUATIONS_SCHEDULERS_FETCH_EVALUATION_SCHEDULER_SUCCESS","EVALUATIONS_SCHEDULERS_FETCH_EVALUATION_SCHEDULER_FAILURE","evaluationsSchedulersFetchEvaluationScheduler","evaluationsSchedulersFetchEvaluationSchedulerRequest","evaluationsSchedulersFetchEvaluationSchedulerSuccess","evaluationsSchedulersFetchEvaluationSchedulerFailure","EVALUATIONS_SCHEDULERS_RESET_EVALUATION_SCHEDULERS_LOADED","evaluationsSchedulersResetEvaluationSchedulersLoaded","EVALUATIONS_SCHEDULERS_EVALUATION_CREATE_UPDATE_STEP","evaluationsSchedulersEvaluationCreateUpdateStep","EVALUATIONS_SCHEDULERS_EVALUATION_CREATE_RESET","evaluationsSchedulersEvaluationCreateReset","EVALUATIONS_TEMPLATES_FETCH_FORMS","EVALUATIONS_TEMPLATES_FETCH_FORMS_REQUEST","EVALUATIONS_TEMPLATES_FETCH_FORMS_SUCCESS","EVALUATIONS_TEMPLATES_FETCH_FORMS_FAILURE","evaluationsTemplatesFetchForms","evaluationsTemplatesFetchFormsRequest","evaluationsTemplatesFetchFormsSuccess","evaluationsTemplatesFetchFormsFailure","EVALUATIONS_TEMPLATES_CREATE","EVALUATIONS_TEMPLATES_CREATE_REQUEST","EVALUATIONS_TEMPLATES_CREATE_SUCCESS","EVALUATIONS_TEMPLATES_CREATE_FAILURE","evaluationsTemplatesCreate","evaluationsTemplatesCreateRequest","evaluationsTemplatesCreateSuccess","evaluationsTemplatesCreateFailure","EVALUATIONS_TEMPLATES_SET_EVALUATION_TEMPLATE_ID","evaluationsTemplatesSetEvaluationTemplateId","EVALUATIONS_TEMPLATES_UNSET_EVALUATION_TEMPLATE_ID","evaluationsTemplatesUnsetEvaluationTemplateId","EVALUATIONS_TEMPLATES_FETCH_FORM","EVALUATIONS_TEMPLATES_FETCH_FORM_REQUEST","EVALUATIONS_TEMPLATES_FETCH_FORM_SUCCESS","EVALUATIONS_TEMPLATES_FETCH_FORM_FAILURE","evaluationsTemplatesFetchForm","evaluationsTemplatesFetchFormRequest","evaluationsTemplatesFetchFormSuccess","evaluationsTemplatesFetchFormFailure","EVALUATIONS_TEMPLATES_EDIT","EVALUATIONS_TEMPLATES_EDIT_REQUEST","EVALUATIONS_TEMPLATES_EDIT_SUCCESS","EVALUATIONS_TEMPLATES_EDIT_FAILURE","evaluationsTemplatesEdit","evaluationsTemplatesEditRequest","evaluationsTemplatesEditSuccess","evaluationsTemplatesEditFailure","EVALUATIONS_TEMPLATES_DELETE","EVALUATIONS_TEMPLATES_DELETE_REQUEST","EVALUATIONS_TEMPLATES_DELETE_SUCCESS","EVALUATIONS_TEMPLATES_DELETE_FAILURE","evaluationsTemplatesDelete","evaluationsTemplatesDeleteRequest","evaluationsTemplatesDeleteSuccess","evaluationsTemplatesDeleteFailure","EVALUATIONS_TEMPLATES_RESET_EVALUATION_TEMPLATE_LOADED","evaluationsTemplatesResetTemplateLoaded","EVALUATIONS_TEMPLATES_FORM_OPTIONS_ADD","evaluationsTemplatesFormOptionAdd","EVALUATIONS_TEMPLATES_FORM_OPTIONS_UPDATE","evaluationsTemplatesFormOptionUpdate","FEEDBACK_FORM_OPEN_CLOSE","feedbackFormOpenClose","FEEDBACK_FORM_SEND","FEEDBACK_FORM_SEND_REQUEST","FEEDBACK_FORM_SEND_SUCCESS","FEEDBACK_FORM_SEND_FAILURE","feedbackFormSend","feedbackFormSendRequest","feedbackFormSendSuccess","feedbackFormSendFailure","FILE_CATEGORIES_FETCH_FILE_CATEGORIES","FILE_CATEGORIES_FETCH_FILE_CATEGORIES_REQUEST","FILE_CATEGORIES_FETCH_FILE_CATEGORIES_SUCCESS","FILE_CATEGORIES_FETCH_FILE_CATEGORIES_FAILURE","fileCategoriesFetchFileCategories","fileCategoriesFetchFileCategoriesRequest","fileCategoriesFetchFileCategoriesSuccess","fileCategoriesFetchFileCategoriesFailure","FILE_CATEGORIES_CREATE","FILE_CATEGORIES_CREATE_REQUEST","FILE_CATEGORIES_CREATE_SUCCESS","FILE_CATEGORIES_CREATE_FAILURE","fileCategoriesCreate","fileCategoriesCreateRequest","fileCategoriesCreateSuccess","fileCategoriesCreateFailure","FILE_CATEGORIES_EDIT","FILE_CATEGORIES_EDIT_REQUEST","FILE_CATEGORIES_EDIT_SUCCESS","FILE_CATEGORIES_EDIT_FAILURE","fileCategoriesEdit","fileCategoriesEditRequest","fileCategoriesEditSuccess","fileCategoriesEditFailure","FILE_CATEGORIES_DELETE","FILE_CATEGORIES_DELETE_REQUEST","FILE_CATEGORIES_DELETE_SUCCESS","FILE_CATEGORIES_DELETE_FAILURE","fileCategoriesDelete","fileCategoriesDeleteRequest","fileCategoriesDeleteSuccess","fileCategoriesDeleteFailure","FILES_EDIT","FILES_EDIT_REQUEST","FILES_EDIT_SUCCESS","FILES_EDIT_FAILURE","filesEdit","filesEditRequest","filesEditSuccess","filesEditFailure","FILES_DELETE","FILES_DELETE_REQUEST","FILES_DELETE_SUCCESS","FILES_DELETE_FAILURE","filesDelete","filesDeleteRequest","filesDeleteSuccess","filesDeleteFailure","FILES_DOWNLOAD","FILES_DOWNLOAD_REQUEST","FILES_DOWNLOAD_SUCCESS","FILES_DOWNLOAD_FAILURE","filesDownload","filesDownloadRequest","filesDownloadSuccess","filesDownloadFailure","FILES_PREVIEW","FILES_PREVIEW_REQUEST","FILES_PREVIEW_SUCCESS","FILES_PREVIEW_FAILURE","filesPreview","filesPreviewRequest","filesPreviewSuccess","filesPreviewFailure","GUIDE_LINE_TUTORIAL_INITIALIZE","guideLineTutorialInitialize","GUIDE_LINE_TUTORIAL_ON_OFF","guideLineTutorialOnOff","GUIDE_LINE_TUTORIAL_START","guideLineTutorialStart","GUIDE_LINE_TUTORIAL_STOP","guideLineTutorialStop","GUIDE_LINE_TUTORIAL_PAUSE","guideLineTutorialPause","GUIDE_LINE_TUTORIAL_PLAY","guideLineTutorialPlay","GUIDE_LINE_TUTORIAL_NEXT","guideLineTutorialNext","GUIDE_LINE_TUTORIAL_PREV","guideLineTutorialPrev","GUIDE_LINE_TUTORIAL_COMPLETED","guideLineTutorialCompleted","GUIDE_LINE_TUTORIAL_MENU","GUIDE_LINE_TUTORIAL_HOME","GUIDE_LINE_TUTORIAL_USER_MANAGER","GUIDE_LINE_TUTORIAL_USER_MANAGER_INVITATIONS","GUIDE_LINE_TUTORIAL_INSTITUTIONS","GUIDE_LINE_TUTORIAL_ROTATIONS","GUIDE_LINE_TUTORIAL_ROTATIONS_CREATE","GUIDE_LINE_TUTORIAL_CASE_LOGS","GUIDE_LINE_TUTORIAL_EVALUATIONS","GUIDE_LINE_TUTORIAL_ACCOUNT_SETTINGS","IMPORT_DATA_FETCH","IMPORT_DATA_FETCH_REQUEST","IMPORT_DATA_FETCH_SUCCESS","IMPORT_DATA_FETCH_FAILURE","importDataFetch","importDataFetchRequest","importDataFetchSuccess","importDataFetchFailure","IMPORT_DATA_SEND","IMPORT_DATA_SEND_REQUEST","IMPORT_DATA_SEND_SUCCESS","IMPORT_DATA_SEND_FAILURE","importDataSend","importDataSendRequest","importDataSendSuccess","importDataSendFailure","IMPORT_GENERATE_CSV","IMPORT_GENERATE_CSV_REQUEST","IMPORT_GENERATE_CSV_SUCCESS","IMPORT_GENERATE_CSV_FAILURE","importGenerateCSV","importGenerateCSVRequest","importGenerateCSVSuccess","importGenerateCSVFailure","IMPORT_DATA_SHOW_NOTIFICATION","importDataShowNotification","IMPORT_DATA_HIDE_NOTIFICATION","importDataHideNotification","INSTITUTIONS_FETCH_INSTITUTIONS","INSTITUTIONS_FETCH_INSTITUTIONS_REQUEST","INSTITUTIONS_FETCH_INSTITUTIONS_SUCCESS","INSTITUTIONS_FETCH_INSTITUTIONS_FAILURE","institutionsFetchInstitutions","institutionsFetchInstitutionsRequest","institutionsFetchInstitutionsSuccess","institutionsFetchInstitutionsFailure","INSTITUTIONS_CREATE","INSTITUTIONS_CREATE_REQUEST","INSTITUTIONS_CREATE_SUCCESS","INSTITUTIONS_CREATE_FAILURE","institutionsCreate","institutionsCreateRequest","institutionsCreateSuccess","institutionsCreateFailure","INSTITUTIONS_SET_INSTITUTION_ID","institutionsSetInstitutionId","INSTITUTIONS_UNSET_INSTITUTION_ID","institutionsUnsetInstitutionId","INSTITUTIONS_FETCH_INSTITUTION","INSTITUTIONS_FETCH_INSTITUTION_REQUEST","INSTITUTIONS_FETCH_INSTITUTION_SUCCESS","INSTITUTIONS_FETCH_INSTITUTION_FAILURE","institutionsFetchInstitution","institutionsFetchInstitutionRequest","institutionsFetchInstitutionSuccess","institutionsFetchInstitutionFailure","INSTITUTIONS_FETCH_INSTITUTION_AVAILABILITIES","INSTITUTIONS_FETCH_INSTITUTION_AVAILABILITIES_REQUEST","INSTITUTIONS_FETCH_INSTITUTION_AVAILABILITIES_SUCCESS","INSTITUTIONS_FETCH_INSTITUTION_AVAILABILITIES_FAILURE","institutionsFetchInstitutionAvailabilities","institutionsFetchInstitutionAvailabilitiesRequest","institutionsFetchInstitutionAvailabilitiesSuccess","institutionsFetchInstitutionAvailabilitiesFailure","INSTITUTIONS_EDIT_INSTITUTION","INSTITUTIONS_EDIT_INSTITUTION_REQUEST","INSTITUTIONS_EDIT_INSTITUTION_SUCCESS","INSTITUTIONS_EDIT_INSTITUTION_FAILURE","institutionsEditInstitution","institutionsEditInstitutionRequest","institutionsEditInstitutionSuccess","institutionsEditInstitutionFailure","INSTITUTIONS_EDIT_INSTITUTION_AVAILABILITIES","INSTITUTIONS_EDIT_INSTITUTION_AVAILABILITIES_REQUEST","INSTITUTIONS_EDIT_INSTITUTION_AVAILABILITIES_SUCCESS","INSTITUTIONS_EDIT_INSTITUTION_AVAILABILITIES_FAILURE","institutionsEditInstitutionAvailabilities","institutionsEditInstitutionAvailabilitiesRequest","institutionsEditInstitutionAvailabilitiesSuccess","institutionsEditInstitutionAvailabilitiesFailure","INSTITUTIONS_FETCH_INSTITUTION_FILES","INSTITUTIONS_FETCH_INSTITUTION_FILES_REQUEST","INSTITUTIONS_FETCH_INSTITUTION_FILES_SUCCESS","INSTITUTIONS_FETCH_INSTITUTION_FILES_FAILURE","institutionsFetchInstitutionFiles","institutionsFetchInstitutionFilesRequest","institutionsFetchInstitutionFilesSuccess","institutionsFetchInstitutionFilesFailure","INSTITUTIONS_FETCH_INSTITUTION_FILES_EXPIRED","INSTITUTIONS_FETCH_INSTITUTION_FILES_EXPIRED_REQUEST","INSTITUTIONS_FETCH_INSTITUTION_FILES_EXPIRED_SUCCESS","INSTITUTIONS_FETCH_INSTITUTION_FILES_EXPIRED_FAILURE","institutionsFetchInstitutionFilesExpired","institutionsFetchInstitutionFilesExpiredRequest","institutionsFetchInstitutionFilesExpiredSuccess","institutionsFetchInstitutionFilesExpiredFailure","INSTITUTIONS_UPLOAD_INSTITUTION_FILES","INSTITUTIONS_UPLOAD_INSTITUTION_FILES_REQUEST","INSTITUTIONS_UPLOAD_INSTITUTION_FILES_SUCCESS","INSTITUTIONS_UPLOAD_INSTITUTION_FILES_FAILURE","institutionsUploadInstitutionFiles","institutionsUploadInstitutionFilesRequest","institutionsUploadInstitutionFilesSuccess","institutionsUploadInstitutionFilesFailure","INSTITUTIONS_DELETE","INSTITUTIONS_DELETE_REQUEST","INSTITUTIONS_DELETE_SUCCESS","INSTITUTIONS_DELETE_FAILURE","institutionsDelete","institutionsDeleteRequest","institutionsDeleteSuccess","institutionsDeleteFailure","INVITATIONS_FETCH_INVITATIONS","INVITATIONS_FETCH_INVITATIONS_REQUEST","INVITATIONS_FETCH_INVITATIONS_SUCCESS","INVITATIONS_FETCH_INVITATIONS_FAILURE","invitationsFetchInvitations","invitationsFetchInvitationsRequest","invitationsFetchInvitationsSuccess","invitationsFetchInvitationsFailure","INVITATIONS_CREATE","INVITATIONS_CREATE_REQUEST","INVITATIONS_CREATE_SUCCESS","INVITATIONS_CREATE_FAILURE","invitationsCreate","invitationsCreateRequest","invitationsCreateSuccess","invitationsCreateFailure","INVITATIONS_RESEND","INVITATIONS_RESEND_REQUEST","INVITATIONS_RESEND_SUCCESS","INVITATIONS_RESEND_FAILURE","invitationsResend","invitationsResendRequest","invitationsResendSuccess","invitationsResendFailure","INVITATIONS_ACTIVE","INVITATIONS_ACTIVE_REQUEST","INVITATIONS_ACTIVE_SUCCESS","INVITATIONS_ACTIVE_FAILURE","invitationsActive","invitationsActiveRequest","invitationsActiveSuccess","invitationsActiveFailure","INVITATIONS_DELETE","INVITATIONS_DELETE_REQUEST","INVITATIONS_DELETE_SUCCESS","INVITATIONS_DELETE_FAILURE","invitationsDelete","invitationsDeleteRequest","invitationsDeleteSuccess","invitationsDeleteFailure","INVITATIONS_RESET_INVITATION_LOADED","invitationsResetInvitationLoaded","LOCALSTORE_SAVE","saveLocalStore","LOCALSTORE_CLEAR_ALL","clearAllLocalStore","METRICS_FETCH_METRICS_PAGES","METRICS_FETCH_METRICS_PAGES_REQUEST","METRICS_FETCH_METRICS_PAGES_SUCCESS","METRICS_FETCH_METRICS_PAGES_FAILURE","metricsFetchMetricsPages","metricsFetchMetricsPagesRequest","metricsFetchMetricsPagesSuccess","metricsFetchMetricsPagesFailure","METRICS_CREATE_METRIC_PAGE","METRICS_CREATE_METRIC_PAGE_REQUEST","METRICS_CREATE_METRIC_PAGE_SUCCESS","METRICS_CREATE_METRIC_PAGE_FAILURE","metricsCreateMetricPage","metricsCreateMetricPageRequest","metricsCreateMetricPageSuccess","metricsCreateMetricPageFailure","METRICS_SET_PAGE_ID","metricsSetPageId","METRICS_UNSET_PAGE_ID","metricsUnsetPageId","METRICS_FETCH_METRIC_PAGE","METRICS_FETCH_METRIC_PAGE_REQUEST","METRICS_FETCH_METRIC_PAGE_SUCCESS","METRICS_FETCH_METRIC_PAGE_FAILURE","metricsFetchMetricPage","metricsFetchMetricPageRequest","metricsFetchMetricPageSuccess","metricsFetchMetricPageFailure","METRICS_EDIT_METRIC_PAGE","METRICS_EDIT_METRIC_PAGE_REQUEST","METRICS_EDIT_METRIC_PAGE_SUCCESS","METRICS_EDIT_METRIC_PAGE_FAILURE","metricsEditMetricPage","metricsEditMetricPageRequest","metricsEditMetricPageSuccess","metricsEditMetricPageFailure","METRICS_DELETE_METRIC_PAGE","METRICS_DELETE_METRIC_PAGE_REQUEST","METRICS_DELETE_METRIC_PAGE_SUCCESS","METRICS_DELETE_METRIC_PAGE_FAILURE","metricsDeleteMetricPage","metricsDeleteMetricPageRequest","metricsDeleteMetricPageSuccess","metricsDeleteMetricPageFailure","METRICS_FETCH_METRIC_PAGE_CHARTS","METRICS_FETCH_METRIC_PAGE_CHARTS_REQUEST","METRICS_FETCH_METRIC_PAGE_CHARTS_SUCCESS","METRICS_FETCH_METRIC_PAGE_CHARTS_FAILURE","metricsFetchMetricPageCharts","metricsFetchMetricPageChartsRequest","metricsFetchMetricPageChartsSuccess","metricsFetchMetricPageChartsFailure","METRICS_CREATE_METRIC_PAGE_CHART","METRICS_CREATE_METRIC_PAGE_CHART_REQUEST","METRICS_CREATE_METRIC_PAGE_CHART_SUCCESS","METRICS_CREATE_METRIC_PAGE_CHART_FAILURE","metricsCreateMetricPageChart","metricsCreateMetricPageChartRequest","metricsCreateMetricPageChartSuccess","metricsCreateMetricPageChartFailure","METRICS_SET_CHART_ID","metricsSetChartId","METRICS_UNSET_CHART_ID","metricsUnsetChartId","METRICS_FETCH_METRIC_PAGE_CHART","METRICS_FETCH_METRIC_PAGE_CHART_REQUEST","METRICS_FETCH_METRIC_PAGE_CHART_SUCCESS","METRICS_FETCH_METRIC_PAGE_CHART_FAILURE","metricsFetchMetricPageChart","metricsFetchMetricPageChartRequest","metricsFetchMetricPageChartSuccess","metricsFetchMetricPageChartFailure","METRICS_EDIT_METRIC_PAGE_CHART","METRICS_EDIT_METRIC_PAGE_CHART_REQUEST","METRICS_EDIT_METRIC_PAGE_CHART_SUCCESS","METRICS_EDIT_METRIC_PAGE_CHART_FAILURE","metricsEditMetricPageChart","metricsEditMetricPageChartRequest","metricsEditMetricPageChartSuccess","metricsEditMetricPageChartFailure","METRICS_DELETE_METRIC_PAGE_CHART","METRICS_DELETE_METRIC_PAGE_CHART_REQUEST","METRICS_DELETE_METRIC_PAGE_CHART_SUCCESS","METRICS_DELETE_METRIC_PAGE_CHART_FAILURE","metricsDeleteMetricPageChart","metricsDeleteMetricPageChartRequest","metricsDeleteMetricPageChartSuccess","metricsDeleteMetricPageChartFailure","NOTIFICATIONS_REGISTER_SOCKET","NOTIFICATIONS_REGISTER_SOCKET_REQUEST","NOTIFICATIONS_REGISTER_SOCKET_SUCCESS","NOTIFICATIONS_REGISTER_SOCKET_FAILURE","notificationsRegisterSocket","notificationsRegisterSocketRequest","notificationsRegisterSocketSuccess","notificationsRegisterSocketFailure","NOTIFICATIONS_SET_SOCKET_CONNECTION_ID","NOTIFICATIONS_SET_SOCKET_CONNECTION_ID_REQUEST","NOTIFICATIONS_SET_SOCKET_CONNECTION_ID_SUCCESS","NOTIFICATIONS_SET_SOCKET_CONNECTION_ID_FAILURE","notificationsSetSocketConnectionId","notificationsSetSocketConnectionIdRequest","notificationsSetSocketConnectionIdSuccess","notificationsSetSocketConnectionIdFailure","NOTIFICATIONS_DISCONNECT_SOCKET","notificationsDisconnectSocket","NOTIFICATIONS_SOCKET_ADD_NOTIFICATION","notificationsSocketAddNotification","NOTIFICATIONS_FETCH_NOTIFICATIONS","NOTIFICATIONS_FETCH_NOTIFICATIONS_REQUEST","NOTIFICATIONS_FETCH_NOTIFICATIONS_SUCCESS","NOTIFICATIONS_FETCH_NOTIFICATIONS_FAILURE","notificationsFetchNotifications","notificationsFetchNotificationsRequest","notificationsFetchNotificationsSuccess","notificationsFetchNotificationsFailure","NOTIFICATIONS_SET_NOTIFICATIONS_CATEGORIES","notificationsSetNotificationsCategories","NOTIFICATIONS_CLEAR_NOTIFICATIONS_CATEGORIES","notificationsClearNotificationsCategories","NOTIFICATIONS_MARK_AS_READ_NOTIFICATIONS","NOTIFICATIONS_MARK_AS_READ_NOTIFICATIONS_REQUEST","NOTIFICATIONS_MARK_AS_READ_NOTIFICATIONS_SUCCESS","NOTIFICATIONS_MARK_AS_READ_NOTIFICATIONS_FAILURE","notificationsMarkAsReadNotifications","notificationsMarkAsReadNotificationsRequest","notificationsMarkAsReadNotificationsSuccess","notificationsMarkAsReadNotificationsFailure","NOTIFICATIONS_LAST_SEEN_NOTIFICATION","NOTIFICATIONS_LAST_SEEN_NOTIFICATION_REQUEST","NOTIFICATIONS_LAST_SEEN_NOTIFICATION_SUCCESS","NOTIFICATIONS_LAST_SEEN_NOTIFICATION_FAILURE","notificationsLastSeenNotification","notificationsLastSeenNotificationRequest","notificationsLastSeenNotificationSuccess","notificationsLastSeenNotificationFailure","NOTIFICATIONS_DELETE","NOTIFICATIONS_DELETE_REQUEST","NOTIFICATIONS_DELETE_SUCCESS","NOTIFICATIONS_DELETE_FAILURE","notificationsDelete","notificationsDeleteRequest","notificationsDeleteSuccess","notificationsDeleteFailure","NOTIFICATIONS_CREATE_REMINDERS","NOTIFICATIONS_CREATE_REMINDERS_REQUEST","NOTIFICATIONS_CREATE_REMINDERS_SUCCESS","NOTIFICATIONS_CREATE_REMINDERS_FAILURE","notificationsCreateReminders","notificationsCreateRemindersRequest","notificationsCreateRemindersSuccess","notificationsCreateRemindersFailure","PERIODS_FETCH_ALL","PERIODS_FETCH_ALL_REQUEST","PERIODS_FETCH_ALL_SUCCESS","PERIODS_FETCH_ALL_FAILURE","periodsFetchAll","periodsFetchAllRequest","periodsFetchAllSuccess","periodsFetchAllFailure","PERIODS_CREATE","PERIODS_CREATE_REQUEST","PERIODS_CREATE_SUCCESS","PERIODS_CREATE_FAILURE","periodsCreate","periodsCreateRequest","periodsCreateSuccess","periodsCreateFailure","PERIODS_EDIT","PERIODS_EDIT_REQUEST","PERIODS_EDIT_SUCCESS","PERIODS_EDIT_FAILURE","periodsEdit","periodsEditRequest","periodsEditSuccess","periodsEditFailure","PERIODS_DELETE","PERIODS_DELETE_REQUEST","PERIODS_DELETE_SUCCESS","PERIODS_DELETE_FAILURE","periodsDelete","periodsDeleteRequest","periodsDeleteSuccess","periodsDeleteFailure","PROGRAMS_FETCH_PROGRAMS","PROGRAMS_FETCH_PROGRAMS_REQUEST","PROGRAMS_FETCH_PROGRAMS_SUCCESS","PROGRAMS_FETCH_PROGRAMS_FAILURE","programsFetchPrograms","programsFetchProgramsRequest","programsFetchProgramsSuccess","programsFetchProgramsFailure","PROGRAMS_CREATE","PROGRAMS_CREATE_REQUEST","PROGRAMS_CREATE_SUCCESS","PROGRAMS_CREATE_FAILURE","programsCreate","programsCreateRequest","programsCreateSuccess","programsCreateFailure","PROGRAMS_EDIT_PROGRAM","PROGRAMS_EDIT_PROGRAM_REQUEST","PROGRAMS_EDIT_PROGRAM_SUCCESS","PROGRAMS_EDIT_PROGRAM_FAILURE","programsEditProgram","programsEditProgramRequest","programsEditProgramSuccess","programsEditProgramFailure","PROGRAMS_DELETE","PROGRAMS_DELETE_REQUEST","PROGRAMS_DELETE_SUCCESS","PROGRAMS_DELETE_FAILURE","programsDelete","programsDeleteRequest","programsDeleteSuccess","programsDeleteFailure","REPORTS_FETCH_QUERIES","REPORTS_FETCH_QUERIES_REQUEST","REPORTS_FETCH_QUERIES_SUCCESS","REPORTS_FETCH_QUERIES_FAILURE","reportsFetchQueries","reportsFetchQueriesRequest","reportsFetchQueriesSuccess","reportsFetchQueriesFailure","REPORTS_CREATE_QUERY","REPORTS_CREATE_QUERY_REQUEST","REPORTS_CREATE_QUERY_SUCCESS","REPORTS_CREATE_QUERY_FAILURE","reportsCreateQuery","reportsCreateQueryRequest","reportsCreateQuerySuccess","reportsCreateQueryFailure","REPORTS_SET_QUERY_ID","reportsSetQueryId","REPORTS_UNSET_QUERY_ID","reportsUnsetQueryId","REPORTS_FETCH_QUERY","REPORTS_FETCH_QUERY_REQUEST","REPORTS_FETCH_QUERY_SUCCESS","REPORTS_FETCH_QUERY_FAILURE","reportsFetchQuery","reportsFetchQueryRequest","reportsFetchQuerySuccess","reportsFetchQueryFailure","REPORTS_EDIT_QUERY","REPORTS_EDIT_QUERY_REQUEST","REPORTS_EDIT_QUERY_SUCCESS","REPORTS_EDIT_QUERY_FAILURE","reportsEditQuery","reportsEditQueryRequest","reportsEditQuerySuccess","reportsEditQueryFailure","REPORTS_DELETE_QUERY","REPORTS_DELETE_QUERY_REQUEST","REPORTS_DELETE_QUERY_SUCCESS","REPORTS_DELETE_QUERY_FAILURE","reportsDeleteQuery","reportsDeleteQueryRequest","reportsDeleteQuerySuccess","reportsDeleteQueryFailure","REPORTS_RUN_QUERY","REPORTS_RUN_QUERY_REQUEST","REPORTS_RUN_QUERY_SUCCESS","REPORTS_RUN_QUERY_FAILURE","reportsRunQuery","reportsRunQueryRequest","reportsRunQuerySuccess","reportsRunQueryFailure","REPORTS_RESET_QUERY_LOADED","reportsResetQueryLoaded","REPORTS_QUERY_CREATE_EDIT_UPDATE","reportsQueryCreateEditUpdate","REPORTS_QUERY_CREATE_EDIT_RESET","reportsQueryCreateEditReset","REPORTS_FETCH_REPORTS","REPORTS_FETCH_REPORTS_REQUEST","REPORTS_FETCH_REPORTS_SUCCESS","REPORTS_FETCH_REPORTS_FAILURE","reportsFetchReports","reportsFetchReportsRequest","reportsFetchReportsSuccess","reportsFetchReportsFailure","REPORTS_QUERIES_FETCH_REPORTS","REPORTS_QUERIES_FETCH_REPORTS_REQUEST","REPORTS_QUERIES_FETCH_REPORTS_SUCCESS","REPORTS_QUERIES_FETCH_REPORTS_FAILURE","reportsQueriesFetchReports","reportsQueriesFetchReportsRequest","reportsQueriesFetchReportsSuccess","reportsQueriesFetchReportsFailure","REPORTS_QUERIES_SHOW_REPORT_WARNING","reportsQueriesShowReportWarning","REPORTS_QUERIES_HIDE_REPORT_WARNING","reportsQueriesHideReportWarning","REPORTS_QUERIES_SET_REPORT_ID","reportsQueriesSetReportId","REPORTS_QUERIES_UNSET_REPORT_ID","reportsQueriesUnsetReportId","REPORTS_QUERIES_FETCH_REPORT","REPORTS_QUERIES_FETCH_REPORT_REQUEST","REPORTS_QUERIES_FETCH_REPORT_SUCCESS","REPORTS_QUERIES_FETCH_REPORT_FAILURE","reportsQueriesFetchReport","reportsQueriesFetchReportRequest","reportsQueriesFetchReportSuccess","reportsQueriesFetchReportFailure","REPORTS_QUERIES_EDIT_REPORT","REPORTS_QUERIES_EDIT_REPORT_REQUEST","REPORTS_QUERIES_EDIT_REPORT_SUCCESS","REPORTS_QUERIES_EDIT_REPORT_FAILURE","reportsQueriesEditReport","reportsQueriesEditReportRequest","reportsQueriesEditReportSuccess","reportsQueriesEditReportFailure","REPORTS_QUERIES_DELETE_REPORT","REPORTS_QUERIES_DELETE_REPORT_REQUEST","REPORTS_QUERIES_DELETE_REPORT_SUCCESS","REPORTS_QUERIES_DELETE_REPORT_FAILURE","reportsQueriesDeleteReport","reportsQueriesDeleteReportRequest","reportsQueriesDeleteReportSuccess","reportsQueriesDeleteReportFailure","REPORTS_QUERIES_TRANSFORM_REPORT","REPORTS_QUERIES_TRANSFORM_REPORT_REQUEST","REPORTS_QUERIES_TRANSFORM_REPORT_SUCCESS","REPORTS_QUERIES_TRANSFORM_REPORT_FAILURE","reportsQueriesTransformReport","reportsQueriesTransformReportRequest","reportsQueriesTransformReportSuccess","reportsQueriesTransformReportFailure","REPORTS_QUERIES_GENERATE_CSV","REPORTS_QUERIES_GENERATE_CSV_REQUEST","REPORTS_QUERIES_GENERATE_CSV_SUCCESS","REPORTS_QUERIES_GENERATE_CSV_FAILURE","reportsQueriesGenerateCSV","reportsQueriesGenerateCSVRequest","reportsQueriesGenerateCSVSuccess","reportsQueriesGenerateCSVFailure","REPORTS_QUERIES_TRANSFORM_REPORT_GENERATE_CSV","REPORTS_QUERIES_TRANSFORM_REPORT_GENERATE_CSV_REQUEST","REPORTS_QUERIES_TRANSFORM_REPORT_GENERATE_CSV_SUCCESS","REPORTS_QUERIES_TRANSFORM_REPORT_GENERATE_CSV_FAILURE","reportsQueriesTransformReportGenerateCSV","reportsQueriesTransformReportGenerateCSVRequest","reportsQueriesTransformReportGenerateCSVSuccess","reportsQueriesTransformReportGenerateCSVFailure","ROTATIONS_FETCH_BY_FILTERS","ROTATIONS_FETCH_BY_FILTERS_REQUEST","ROTATIONS_FETCH_BY_FILTERS_SUCCESS","ROTATIONS_FETCH_BY_FILTERS_FAILURE","rotationsFetchByFilters","rotationsFetchByFiltersRequest","rotationsFetchByFiltersSuccess","rotationsFetchByFiltersFailure","ROTATIONS_FETCH_KPIS","ROTATIONS_FETCH_KPIS_REQUEST","ROTATIONS_FETCH_KPIS_SUCCESS","ROTATIONS_FETCH_KPIS_FAILURE","rotationsFetchKpis","rotationsFetchKpisRequest","rotationsFetchKpisSuccess","rotationsFetchKpisFailure","ROTATIONS_CREATE_ROTATIONS","ROTATIONS_CREATE_ROTATIONS_REQUEST","ROTATIONS_CREATE_ROTATIONS_SUCCESS","ROTATIONS_CREATE_ROTATIONS_FAILURE","rotationsCreateRotations","rotationsCreateRotationsRequest","rotationsCreateRotationsSuccess","rotationsCreateRotationsFailure","ROTATIONS_EDIT_ROTATIONS","ROTATIONS_EDIT_ROTATIONS_REQUEST","ROTATIONS_EDIT_ROTATIONS_SUCCESS","ROTATIONS_EDIT_ROTATIONS_FAILURE","rotationsEditRotations","rotationsEditRotationsRequest","rotationsEditRotationsSuccess","rotationsEditRotationsFailure","ROTATIONS_SET_AUTOMATIC_ROTATIONS","ROTATIONS_SET_AUTOMATIC_ROTATIONS_REQUEST","ROTATIONS_SET_AUTOMATIC_ROTATIONS_SUCCESS","ROTATIONS_SET_AUTOMATIC_ROTATIONS_FAILURE","rotationsSetAutomaticRotations","rotationsSetAutomaticRotationsRequest","rotationsSetAutomaticRotationsSuccess","rotationsSetAutomaticRotationsFailure","ROTATIONS_UPDATE_AUTOMATIC_ROTATIONS","rotationsUpdateAutomaticRotations","ROTATIONS_UNSET_AUTOMATIC_ROTATIONS","rotationsUnsetAutomaticRotations","ROTATIONS_SET_ROTATION_ID","rotationsSetRotationId","ROTATIONS_FETCH_ROTATION","ROTATIONS_FETCH_ROTATION_REQUEST","ROTATIONS_FETCH_ROTATION_SUCCESS","ROTATIONS_FETCH_ROTATION_FAILURE","rotationsFetchRotation","rotationsFetchRotationRequest","rotationsFetchRotationSuccess","rotationsFetchRotationFailure","ROTATIONS_EDIT","ROTATIONS_EDIT_REQUEST","ROTATIONS_EDIT_SUCCESS","ROTATIONS_EDIT_FAILURE","rotationsEdit","rotationsEditRequest","rotationsEditSuccess","rotationsEditFailure","ROTATIONS_DELETE","ROTATIONS_DELETE_REQUEST","ROTATIONS_DELETE_SUCCESS","ROTATIONS_DELETE_FAILURE","rotationsDelete","rotationsDeleteRequest","rotationsDeleteSuccess","rotationsDeleteFailure","ROTATIONS_CREATE_EDIT_UPDATE","rotationsCreateEditUpdate","ROTATIONS_CREATE_EDIT_RESET","rotationsCreateEditReset","ROUTER_BEFORE_TRANSITIONS","routerBeforeTransitions","ROUTER_MANAGER_BEFORE","routerManagerBefore","ROUTER_MANAGER_LOADED","routerManagerLoaded","ROUTER_MANAGER_RESET","routerManagerReset","SERVICE_WORKER_INIT","serviceWorkerInit","SERVICE_WORKER_REFRESH_BUTTON_SHOW","serviceWorkerRefreshButtonShow","TENANT_SETTINGS_FETCH_ALL","TENANT_SETTINGS_FETCH_ALL_REQUEST","TENANT_SETTINGS_FETCH_ALL_SUCCESS","TENANT_SETTINGS_FETCH_ALL_FAILURE","tenantSettingsFetchAll","tenantSettingsFetchAllRequest","tenantSettingsFetchAllSuccess","tenantSettingsFetchAllFailure","TENANT_SETTINGS_CUD_TENANT_SETTING","TENANT_SETTINGS_CUD_TENANT_SETTING_REQUEST","TENANT_SETTINGS_CUD_TENANT_SETTING_SUCCESS","TENANT_SETTINGS_CUD_TENANT_SETTING_FAILURE","tenantSettingsCUDTenantSetting","tenantSettingsCUDTenantSettingRequest","tenantSettingsCUDTenantSettingSuccess","tenantSettingsCUDTenantSettingFailure","TENANT_SETTINGS_UPDATE_TENANT_SETTING_NAME","tenantSettingsUpdateTenantSettingName","TERMS_FETCH_ALL","TERMS_FETCH_ALL_REQUEST","TERMS_FETCH_ALL_SUCCESS","TERMS_FETCH_ALL_FAILURE","termsFetchAll","termsFetchAllRequest","termsFetchAllSuccess","termsFetchAllFailure","TERMS_CREATE","TERMS_CREATE_REQUEST","TERMS_CREATE_SUCCESS","TERMS_CREATE_FAILURE","termsCreate","termsCreateRequest","termsCreateSuccess","termsCreateFailure","TERMS_EDIT","TERMS_EDIT_REQUEST","TERMS_EDIT_SUCCESS","TERMS_EDIT_FAILURE","termsEdit","termsEditRequest","termsEditSuccess","termsEditFailure","TERMS_DELETE","TERMS_DELETE_REQUEST","TERMS_DELETE_SUCCESS","TERMS_DELETE_FAILURE","termsDelete","termsDeleteRequest","termsDeleteSuccess","termsDeleteFailure","USERS_FETCH_USERS_KPIS","USERS_FETCH_USERS_KPIS_REQUEST","USERS_FETCH_USERS_KPIS_SUCCESS","USERS_FETCH_USERS_KPIS_FAILURE","usersFetchUsersKpis","usersFetchUsersKpisRequest","usersFetchUsersKpisSuccess","usersFetchUsersKpisFailure","USERS_FETCH_ALL","USERS_FETCH_ALL_REQUEST","USERS_FETCH_ALL_SUCCESS","USERS_FETCH_ALL_FAILURE","usersFetchAll","usersFetchAllRequest","usersFetchAllSuccess","usersFetchAllFailure","USERS_FETCH_USERS_ROLES","USERS_FETCH_USERS_ROLES_REQUEST","USERS_FETCH_USERS_ROLES_SUCCESS","USERS_FETCH_USERS_ROLES_FAILURE","usersFetchUsersRoles","usersFetchUsersRolesRequest","usersFetchUsersRolesSuccess","usersFetchUsersRolesFailure","USERS_SET_USERID","usersSetUserId","USERS_UNSET_USERID","usersUnsetUserId","USERS_FETCH_USER","USERS_FETCH_USER_REQUEST","USERS_FETCH_USER_SUCCESS","USERS_FETCH_USER_FAILURE","usersFetchUser","usersFetchUserRequest","usersFetchUserSuccess","usersFetchUserFailure","USERS_FETCH_USER_KPIS","USERS_FETCH_USER_KPIS_REQUEST","USERS_FETCH_USER_KPIS_SUCCESS","USERS_FETCH_USER_KPIS_FAILURE","usersFetchUserKpis","usersFetchUserKpisRequest","usersFetchUserKpisSuccess","usersFetchUserKpisFailure","USERS_FETCH_USER_AVAILABILITIES","USERS_FETCH_USER_AVAILABILITIES_REQUEST","USERS_FETCH_USER_AVAILABILITIES_SUCCESS","USERS_FETCH_USER_AVAILABILITIES_FAILURE","usersFetchUserAvailabilities","usersFetchUserAvailabilitiesRequest","usersFetchUserAvailabilitiesSuccess","usersFetchUserAvailabilitiesFailure","USERS_EDIT_USERS","USERS_EDIT_USERS_REQUEST","USERS_EDIT_USERS_SUCCESS","USERS_EDIT_USERS_FAILURE","usersEditUsers","usersEditUsersRequest","usersEditUsersSuccess","usersEditUsersFailure","USERS_EDIT_USER","USERS_EDIT_USER_REQUEST","USERS_EDIT_USER_SUCCESS","USERS_EDIT_USER_FAILURE","usersEditUser","usersEditUserRequest","usersEditUserSuccess","usersEditUserFailure","USERS_EDIT_USER_AVAILABILITIES","USERS_EDIT_USER_AVAILABILITIES_REQUEST","USERS_EDIT_USER_AVAILABILITIES_SUCCESS","USERS_EDIT_USER_AVAILABILITIES_FAILURE","usersEditUserAvailabilities","usersEditUserAvailabilitiesRequest","usersEditUserAvailabilitiesSuccess","usersEditUserAvailabilitiesFailure","USERS_SET_USER","usersSetUser","USERS_FETCH_USER_FILES","USERS_FETCH_USER_FILES_REQUEST","USERS_FETCH_USER_FILES_SUCCESS","USERS_FETCH_USER_FILES_FAILURE","usersFetchUserFiles","usersFetchUserFilesRequest","usersFetchUserFilesSuccess","usersFetchUserFilesFailure","USERS_FETCH_USER_FILES_EXPIRED","USERS_FETCH_USER_FILES_EXPIRED_REQUEST","USERS_FETCH_USER_FILES_EXPIRED_SUCCESS","USERS_FETCH_USER_FILES_EXPIRED_FAILURE","usersFetchUserFilesExpired","usersFetchUserFilesExpiredRequest","usersFetchUserFilesExpiredSuccess","usersFetchUserFilesExpiredFailure","USERS_UPLOAD_USER_FILES","USERS_UPLOAD_USER_FILES_REQUEST","USERS_UPLOAD_USER_FILES_SUCCESS","USERS_UPLOAD_USER_FILES_FAILURE","usersUploadUserFiles","usersUploadUserFilesRequest","usersUploadUserFilesSuccess","usersUploadUserFilesFailure","USERS_EMULATE_USER","USERS_EMULATE_USER_REQUEST","USERS_EMULATE_USER_SUCCESS","USERS_EMULATE_USER_FAILURE","usersEmulateUser","usersEmulateUserRequest","usersEmulateUserSuccess","usersEmulateUserFailure","USERS_MANAGER_FILTERS_SAVE_FILTERS","usersManagerFiltersSaveFilters","USERS_MANAGER_FILTERS_SET_PAGES","usersManagerFiltersSetPages","USERS_MANAGER_FILTERS_SET_SEARCH","usersManagerFiltersSetSearch","USERS_MANAGER_FILTERS_SET_SORTBY","usersManagerFiltersSetSortBy","USERS_MANAGER_FILTERS_CLEAR","usersManagerFiltersClear","USERS_MANAGER_FILTERS_SET_ROLES","usersManagerFiltersSetRoles","USERS_MANAGER_FILTERS_SET_ROLE_SELECTED","usersManagerFiltersSetRoleSelected","USERS_MANAGER_FILTERS_SEARCH","usersManagerFiltersSearch","USERS_MANAGER_FILTERS_SET_USER_STATUS","usersManagerFiltersSetUserStatus","USERS_MANAGER_FILTERS_USER_STATUS","usersManagerFiltersUserStatus","USERS_MANAGER_FILTERS_ROTATIONS_ACTIVE","usersManagerFiltersRotations","USERS_MANAGER_FILTERS_PROGRAMS","usersManagerFiltersPrograms","USERS_MANAGER_FILTERS_COHORTS","usersManagerFiltersCohorts","USERS_MANAGER_FILTERS_INSTITUTIONS","usersManagerFiltersInstitutions","USERS_MANAGER_UPDATE_STORE_USERS","usersManagerUpdateStoreUsers","USERS_MANAGER_SAVE_USERS","usersManagerSaveUsers","PORTFOLIO_FETCH_PORTFOLIO","PORTFOLIO_FETCH_PORTFOLIO_REQUEST","PORTFOLIO_FETCH_PORTFOLIO_SUCCESS","PORTFOLIO_FETCH_PORTFOLIO_FAILURE","portfolioFetchPortfolio","portfolioFetchPortfolioRequest","portfolioFetchPortfolioSuccess","portfolioFetchPortfolioFailure","PORTFOLIO_EDIT","PORTFOLIO_EDIT_REQUEST","PORTFOLIO_EDIT_SUCCESS","PORTFOLIO_EDIT_FAILURE","portfolioEdit","portfolioEditRequest","portfolioEditSuccess","portfolioEditFailure","PORTFOLIO_TESTIMONIALS","PORTFOLIO_TESTIMONIALS_REQUEST","PORTFOLIO_TESTIMONIALS_SUCCESS","PORTFOLIO_TESTIMONIALS_FAILURE","portfolioTestimonials","portfolioTestimonialsRequest","portfolioTestimonialsSuccess","portfolioTestimonialsFailure","PORTFOLIO_TESTIMONIALS_NOTIFICATIONS","PORTFOLIO_TESTIMONIALS_NOTIFICATIONS_REQUEST","PORTFOLIO_TESTIMONIALS_NOTIFICATIONS_SUCCESS","PORTFOLIO_TESTIMONIALS_NOTIFICATIONS_FAILURE","portfolioTestimonialsNotifications","portfolioTestimonialsNotificationsRequest","portfolioTestimonialsNotificationsSuccess","portfolioTestimonialsNotificationsFailure","PORTFOLIO_SUBMIT_TESTIMONIALS","PORTFOLIO_SUBMIT_TESTIMONIALS_REQUEST","PORTFOLIO_SUBMIT_TESTIMONIALS_SUCCESS","PORTFOLIO_SUBMIT_TESTIMONIALS_FAILURE","portfolioSubmitTestimonials","portfolioSubmitTestimonialsRequest","portfolioSubmitTestimonialsSuccess","portfolioSubmitTestimonialsFailure","PORTFOLIO_DELETE_TESTIMONIALS","PORTFOLIO_DELETE_TESTIMONIALS_REQUEST","PORTFOLIO_DELETE_TESTIMONIALS_SUCCESS","PORTFOLIO_DELETE_TESTIMONIALS_FAILURE","portfolioDeleteTestimonials","portfolioDeleteTestimonialsRequest","portfolioDeleteTestimonialsSuccess","portfolioDeleteTestimonialsFailure","onCheckResource","apiResource","resources","resource","indexOf","onCheckEvaluationsPermissions","permissions","Evaluations","apiValue","onCheckReadEvaluationsPermissions","onCheckEditEvaluationsPermissions","onCheckDeleteEvaluationsPermissions","onCheckReadMyEvaluationsPermissions","LocalStore","key","value","localStorage","setItem","JSON","stringify","err","removeItem","getItem","parse","clear","length","isDevelopmentReactAppEnv","appJson","appEnv","isMobileBrowser","isMobile","test","navigator","userAgent","substr","isTouchableDevice","isTouchable","window","isURL","text","onGetUrlDomain","location","host","split","hostname","protocol","slice","join","onGetTenant","tenant","onGetToken","Read","auth","token","parseApiName","apiName","replace","str","parseName","name","onSetRoleName","roleName","capitalizeFirstLetter","setUserRole","role","type","toLowerCase","isValidISODate","date","match","getCurrentTimeInMs","Date","getTime","setHoursInMs","hour","setMoment","moment","setMomentDate","setTokenExpired","utcOffset","startOf","add","format","checkTokenExpired","isSameOrAfter","setParseUTCtimeToLocale","utc","parseZone","setUTCtime","setUTCtimeOffset","utcTimeOffset","getHours","setUTCtime00","minute","second","millisecond","setUTCtime235959","setLocaleTime","utcDate","setUTC_Offset","offSet","onChekValueDate","toString","onSetDateTime","isoDate","diffDateTime","diff","onParseToOrdinalSuffix","num","int","parseInt","digits","ordinals","includes","onSelectedItems","selectType","itemSelected","isItemSelected","items","itemsSelected","newItemsSelected","filter","_id","onSortByStatus","status","sortBy","input","sort","compare","a","b","left","right","isNumeric","parseFloat","updateArrayWithElement","array","element","index","map","string","charAt","toUpperCase","downloadFile","href","link","document","createElement","style","display","download","body","appendChild","click","removeChild","isNaN","Number","lightenDarkenColor","col","amt","usePound","r","g","onCheckTooltip","event","eventTarget","target","firstElementChild","title","classList","contains","remove","offsetWidth","scrollWidth","innerText","onParseCountToString","count","toFixed","onSetCategoryWord","disciplineWord","apiBaseAuth","Auth","api","data","config","POST","userId","GET","PATCH","belongsTo","ownerId","institutionId","onCheckReadMyCompaniesPermissions","Companies","onCheckEditMyCompaniesPermissions","Loader","className","textLoading","id","open","basic","dimmer","size","Content","active","inline","textAlign","onCheckReadProgramsPermissions","Programs","onCheckCUDProgramsPermissions","onCheckCreateProgramsPermissions","onCheckEditProgramsPermissions","onCheckDeleteProgramsPermissions","onCheckReadCohortsPermissions","Cohorts","onCheckCUDCohortsPermissions","onCheckCreateCohortsPermissions","onCheckEditCohortsPermissions","onCheckDeleteCohortsPermissions","onCheckReadFileCategoriesPermissions","FileCategories","onCheckCUDFileCategoriesPermissions","onCheckCreateFileCategoriesPermissions","onCheckEditFileCategoriesPermissions","onCheckDeleteFileCategoriesPermissions","onCheckAllCustomFieldsPermissions","CustomFields","onCheckReadCustomFieldsPermissions","onCheckCUDCustomFieldsPermissions","onCheckCreateCustomFieldsPermissions","onCheckEditCustomFieldsPermissions","onCheckDeleteCustomFieldsPermissions","onCheckReadRolesPermissions","Roles","onCheckCUDRolesPermissions","onCheckEditRolesPermissions","onCheckChangeRolesPermissions","onCheckReadDynamicRulesPermissions","DynamicRules","onCheckCreateDynamicRulesPermissions","onCheckEditDynamicRulesPermissions","onCheckDeleteDynamicRulesPermissions","onCheckReadTenantSettingsPermissions","TenantSettings","onCheckCUDTenantSettingsPermissions","onCheckCreateTenantSettingsPermissions","onCheckEditTenantSettingsPermissions","onCheckDeleteTenantSettingsPermissions","optionsPropsList","Users","gender","Enrollments","Institutions","Rotations","CaseLogs","reasonForVisit","preceptor","evaluationType","onCreateOptionsProps","roles","accessControl","filters","usersManager","templates","evaluationsTemplates","tenantSettings","caseLogsLanguagesList","CASELOGS_LANGUAGE_LIST","values","caseLogsInsurancesList","CASELOGS_INSURANCE_LIST","caseLogsRacesList","CASELOGS_RACES_LIST","caseLogsReasonsForVisitList","CASELOGS_REASONS_FOR_VISIT_LIST","caseLogsDisciplinesListForDiagnostics","CASELOGS_DISCIPLINES_LIST_FOR_DIAGNOSTICS","caseLogsDiagnosticsList","CASELOGS_DIAGNOSTICS_LIST","valuesApi","caseLogsDisciplinesListForProcedures","CASELOGS_DISCIPLINES_LIST_FOR_PROCEDURES","caseLogsProceduresList","CASELOGS_PROCEDURES_LIST","caseLogsTeethList","CASELOGS_TOOTH_LIST","institutionsTypes","INSTITUTIONS_TYPES_LIST","users","institutions","periods","myRoles","isActive","apiRoles","myUsers","myUsersPreceptors","i","section","onClick","cursor","disabled","push","firstName","lastName","optionsProps","genders","programs","options","cohorts","rotationsStatus","caseLogsStatus","patientTypeAges","patientGenders","patientRaces","race","language","insurance","caseLogsReasonForVisits","discipline","diagnostic","elem","procedure","toothName","toothReference","evaluationsStatus","icon","color","evaluationTemplates","evaluationsAnswer","usersPreceptors","onParseObjectValue","obj","Object","keys","onParseArrayValue","v","onParseOptionsProps","model","fieldName","valuesArray","onParseDynamicFilters","dynamicFilters","filtersDynamic","modelDynamic","filteredArrayModelDynamic","val","conditions","from","to","isDynamic","_gt","_lt","_eq","EVALUATIONS_LIMIT","initialStateEvaluationsMetadata","numTotalEvaluations","numTotalEvaluationsInCourse","numTotalEvaluationsCompleted","numTotalEvaluationsClosed","totalPages","initialStateAnswersMetadata","numTotalAnswers","numTotalAnswersDraft","numTotalAnswersCompleted","totalPagesByAnswersCompleted","initialState","evaluationTabs","panes","menuItem","selected","evaluation","answers","evaluationId","evaluations","all","UserEvaluations","InstitutionEvaluations","CompanyEvaluations","CustomEvaluations","metadata","kpis","fetching","evaluationsFilters","completed","draft","EvaluationsAnswers","answer","answerId","produce","action","evaluationsTabSelected","getEvaluationsMetadata","getAnswersMetadata","evaluationAnswers","EvaluationsTemplates","newMetadata","incourse","closed","evaluationTypeToCheck","caseLogsRequiredFields","CASELOGS_AGE_REQUIRED_FIELD","CASELOGS_FIRST_LANGUAGE_REQUIRED_FIELD","CASELOGS_GENDER_REQUIRED_FIELD","CASELOGS_CLINIC_RECORD_NUMBER_REQUIRED_FIELD","CASELOGS_RACE_REQUIRED_FIELD","CASELOGS_PMCC_REQUIRED_FIELD","CASELOGS_INSURANCE_REQUIRED_FIELD","CASELOGS_APPOINTMENT_DATE_REQUIRED_FIELD","CASELOGS_CHIEF_COMPLAINT_REQUIRED_FIELD","CASELOGS_TIME_WITH_PATIENT_REQUIRED_FIELD","CASELOGS_REASON_FOR_VISIT_REQUIRED_FIELD","CASELOGS_CONSULT_WITH_PRECEPTOR_REQUIRED_FIELD","CASELOGS_DIAGNOSIS_AND_PROCEDURE_NOTES_REQUIRED_FIELD","CASELOGS_PROCEDURE_STATUS_REQUIRED_FIELD","caseLogsEnabledFields","CASELOGS_AGE_ENABLED_FIELD","CASELOGS_FIRST_LANGUAGE_ENABLED_FIELD","CASELOGS_GENDER_ENABLED_FIELD","CASELOGS_CLINIC_RECORD_NUMBER_ENABLED_FIELD","CASELOGS_RACE_ENABLED_FIELD","CASELOGS_PMCC_ENABLED_FIELD","CASELOGS_INSURANCE_ENABLED_FIELD","CASELOGS_APPOINTMENT_DATE_ENABLED_FIELD","CASELOGS_CHIEF_COMPLAINT_ENABLED_FIELD","CASELOGS_TIME_WITH_PATIENT_ENABLED_FIELD","CASELOGS_REASON_FOR_VISIT_ENABLED_FIELD","CASELOGS_CONSULT_WITH_PRECEPTOR_ENABLED_FIELD","CASELOGS_DIAGNOSIS_AND_PROCEDURE_NOTES_ENABLED_FIELD","CASELOGS_DISCIPLINE_FOR_DIAGNOSES_AND_DIAGNOSIS_ENABLED_FIELD","CASELOGS_PROCEDURE_STATUS_ENABLED_FIELD","tenantSettingsNameCaseLogs","onSetDefaultCaseLogsRequiredEnabledFields","caseLogsRequiredEnabledFields","caseLogsFieldsObject","forEach","tenantSettingsName","s","isFetchingTenantSettings","lastFetchingTenantSettings","SHOW_DEACTIVATED_USERS","RETROACTIVE_DATE","ACCOUNTS_COMPANY_REQUIRED_FIELDS","ACCOUNTS_INSTITUTION_REQUIRED_FIELDS","ACCOUNTS_PROFILE_REQUIRED_FIELDS","CASELOGS_DESIGN_VERSION","EDIT_PENDING_CASELOGS","CASELOGS_AUTO_APPROVAL","ENABLE_DUPLICATED_CASE_LOG_CHECKS","CASELOGS_GENDER_LIST","ALLOW_ALPHANUMERICS_CLINIC_RECORD_NUMBER","CASELOGS_PROCEDURES_STATUS_LIST","CASELOGS_QUESTIONS_REVIEW","EVALUATIONS_NOTIFICATIONS_EMAIL","emails","enabled","ROTATIONS_OVERLAPPING_VALIDATION","ALLOW_AUTOMATIC_ROTATIONS_SCHEDULING_PARAMETERS","AUTOMATIC_ROTATIONS_SCHEDULING_PARAMETERS","BROADCAST_MESSAGES","NOTIFICATIONS_SETTINGS","description","rolesAvailableToSend","receivers","channels","state","assign","newState","apiCaseLogsFields","required","diagnosticDiscipline","diagnosticDisciplineId","procedureDiscipline","procedureDisciplineId","procedureStatus","notificationSettingsId","notificationSetting","callbackEnd","apiBaseReports","Reports","queryId","DELETE","reportId","updateResults","queryParams","DOWNLOAD","doReportsFetchQueries","doReportsCreateQuery","doReportsFetchQuery","doReportsEditQuery","doReportsDeleteQuery","doReportsRunQuery","doReportsFetchReports","doReportsQueriesFetchReports","doReportsQueriesFetchReport","doReportsQueriesEditReport","doReportsQueriesDeleteReport","doReportsQueriesTransformReport","doReportsQueriesGenerateCSVReport","doReportsQueriesTransformReportGenerateCSVReport","reportsSagas","put","logger","log","callbackSuccess","callbackError","select","call","ReportsApi","GetReportsQueries","queries","errors","error","user","createdBy","CreateReportsQuery","query","message","details","errorMsg","msg","onCreateQueryParams","modelSelected","projection","hasDynamicFilter","queryModelSelected","item","itemVal","fieldNameSelected","onCreateOptions","itemValue","onCreateFilter","isCustomField","GetReportsQuery","EditReportsQuery","DeleteReportsQuery","RunReportsQuery","report","GetReports","reports","GetReportsQueryResults","GetReportsQueryResult","EditReportsQueryResult","DeleteReportsQueryReport","vApi","TransformReportsQueryResult","template","reportName","GenerateCSVReport","blob","GenerateCSVTransformReportsQueryResult","takeLatest","takeEvery","onCheckFilesPermissions","Files","onCheckUsersFilesPermissions","onCheckReadUsersRoleFiles","onChecReadkMyFilesPermissions","onCheckReadSuperCompanyAdministratorsFilesPermissions","onCheckReadCompanyAdministratorsFilesPermissions","onCheckReadCoordinatorsFilesPermissions","onCheckReadFacultiesFilesPermissions","onCheckReadInstitutionAdministratorsFilesPermissions","onCheckReadMyInstitutionAdministratorsFilesPermissions","onCheckReadPreceptorsFilesPermissions","onCheckReadMyPreceptorsFilesPermissions","onCheckReadStudentsFilesPermissions","onCheckReadMyStudentsFilesPermissions","onCheckCreateUsersRoleFiles","onCheckCreateMyFilesPermissions","onCheckCreateSuperCompanyAdministratorsFilesPermissions","onCheckCreateCompanyAdministratorsFilesPermissions","onCheckCreateCoordinatorsFilesPermissions","onCheckCreateFacultiesFilesPermissions","onCheckCreateInstitutionAdministratorsFilesPermissions","onCheckCreateMyInstitutionAdministratorsFilesPermissions","onCheckCreatePreceptorsFilesPermissions","onCheckCreateMyPreceptorsFilesPermissions","onCheckCreateStudentsFilesPermissions","onCheckCreateMyStudentsFilesPermissions","onCheckEditUsersRoleFiles","onCheckEditMyFilesPermissions","onCheckEditSuperCompanyAdministratorsFilesPermissions","onCheckEditCompanyAdministratorsFilesPermissions","onCheckEditCoordinatorsFilesPermissions","onCheckEditFacultiesFilesPermissions","onCheckEditInstitutionAdministratorsFilesPermissions","onCheckEditMyInstitutionAdministratorsFilesPermissions","onCheckEditPreceptorsFilesPermissions","onCheckEditMyPreceptorsFilesPermissions","onCheckEditStudentsFilesPermissions","onCheckEditMyStudentsFilesPermissions","onCheckDeleteUsersRoleFiles","onCheckDeleteMyFilesPermissions","onCheckDeleteSuperCompanyAdministratorsFilesPermissions","onCheckDeleteCompanyAdministratorsFilesPermissions","onCheckDeleteCoordinatorsFilesPermissions","onCheckDeleteFacultiesFilesPermissions","onCheckDeleteInstitutionAdministratorsFilesPermissions","onCheckDeleteMyInstitutionAdministratorsFilesPermissions","onCheckDeletePreceptorsFilesPermissions","onCheckDeleteMyPreceptorsFilesPermissions","onCheckDeleteStudentsFilesPermissions","onCheckDeleteMyStudentsFilesPermissions","onCheckMyCompaniesFilesPermissions","onCheckReadMyCompaniesFilesPermissions","onCheckCreateMyCompaniesFilesPermissions","onCheckEditMyCompaniesFilesPermissions","onCheckDeleteMyCompaniesFilesPermissions","onCheckInstitutionsFilesPermissions","onCheckReadInstitutionsFilesPermissions","onCheckCreateInstitutionsFilesPermissions","onCheckEditInstitutionsFilesPermissions","onCheckDeleteInstitutionsFilesPermissions","onCheckMyInstitutionsFilesPermissions","onCheckReadMyInstitutionsFilesPermissions","onCheckCreateMyInstitutionsFilesPermissions","onCheckEditMyInstitutionsFilesPermissions","onCheckDeleteMyInstitutionsFilesPermissions","onCheckAllUsersFilesPermissions","onCheckReadAllUsersFilesPermissions","onCheckCreateAllUsersFilesPermissions","onCheckMyFilesPermissions","onParseFieldName","parseField","onParseItemCustomField","customField","fieldType","label","as","onlyProjection","nameProp","allowAdditions","onNestedFieldName","nestedFieldName","onParseAsNestedFieldName","asFieldName","parsedAsFieldName","parsedNestedFieldName","onCreateItemsCustomFieldsReportSchema","Items","itemsCustomField","itemKey","itemCustomField","onCreateUsersGeneralReportSchema","nested","onlyProjectionRole","onCreateUsersStudentsReportSchema","onCreateUsersReportSchema","usersSchema","group","onCreateEnrollmentsGeneralReportSchema","onCreateEnrollmentsProgramsReportSchema","onCreateEnrollmentsCohortsReportSchema","onCreateEnrollmentsReportSchema","enrollmentsSchema","onCreateInstitutionsGeneralReportSchema","onlyMatch","onCreateInstitutionsReportSchema","institutionsSchema","onCreateRotationsGeneralReportSchema","onCreateRotationsReportSchema","rotationsSchema","onCreateCaseLogsReportSchema","caseLogsSchema","onCreateEvaluationsAnswersGeneralReportSchema","onCreateEvaluationsReportSchema","evaluationsSchema","appNewFeaturesState","features","createdAt","toISOString","readAt","accountSettingsNames","appNewFeatures","frontendPersonalization","HOME_SETTINGS","widgetsToShow","BROADCAST_MESSAGES_SETTINGS","messagesWatched","USER_MANAGER_SETTINGS","enrollment","institution","sortByName","userStatus","ROTATIONS_SETTINGS","student","start_end","CASE_LOGS_SETTINGS","EVALUATIONS_SETTINGS","evaluator","closingDate","isFetchingAccountSettings","statusUpdateAccountSettings","accountSettings","AccountSettings","accountSettingsName","newSetting","doCallAccountsSettingsFetchMySettings","doAccountsSettingsFetchMySettings","doAccountsSettingsEditMySettings","doAccountsSettingsResetMySettings","doAccountsSettingsSynchronizeMySettings","accountSettingsSagas","delay","ms","Promise","res","setTimeout","onSetHomeSettings","userRoleType","widgetCaseLogs","showBy","selectedBy","statusToShow","widgetEvaluations","widgetEvaluationsAnswers","onSetAccountSettings","onSetBroadcastMessagesSettings","AuthApi","GetMySettingsAccount","userSettings","onboardingGuidelinesStatus","sectionsCompleted","GuideLineTutorial","EditMySettingsAccount","guideLineTutorial","broadcastMessages","broadcastMessagesWatched","BroadcastMessages","hasBroadcastMessages","DROPDOWN_FROM_LIST_OPTIONS","onSetFormOptions","formOptions","option","headerDescription","allowDescription","onSetFormOptionsApiPayload","optionPayload","onSetFormOptionsTags","templateTag","tags","o","onCheckInstitutionsPermissions","onCheckReadInstitutionsPermissions","onCheckEditInstitutionsPermissions","onCheckCreateInstitutionsPermissions","onCheckReadMyInstitutionsPermissions","onCheckEditMyInstitutionsPermissions","onCheckAllRotationsPermissions","onCheckRotationsPermissions","onCheckReadRotationsPermissions","onCheckReadAllRotationsPermissions","onCheckCreateRotationsPermissions","onCheckEditRotationsPermissions","onCheckDeleteRotationsPermissions","onCheckReadTermsPermissions","Terms","onCheckCUDTermsPermissions","onCheckCreateTermsPermissions","onCheckEditTermsPermissions","onCheckDeleteTermsPermissions","onCheckPeriodsPermissions","Periods","onCheckReadPeriodsPermissions","onCheckCUDPeriodsPermissions","onCheckCreatePeriodsPermissions","onCheckEditPeriodsPermissions","onCheckDeletePeriodsPermissions","ErrorComponent","textError","ROTATIONS_LIMIT","initialStateRotationCreateEdit","isEditRotation","students","period","start","end","canConfirmRotation","rotation","rotationId","rotations","rotationsMetaData","numTotalRotations","numTotalRotationsInCourse","numTotalRotationsUpcoming","numTotalRotationsFinished","fetchingRotations","rotationCreateEdit","rotationsAutomatic","automaticRotationsParameterSelected","draftRotations","upcoming","finished","newRotationCreateEdit","hasStudentsSelected","rotationUpdateIndex","newListUpdatedRotations","onCheckReadAllUserInvitationsPermissions","UserInvitations","onCheckCreateAllUserInvitationsPermissions","onCheckCreateInstitutionAdministratorsUserInvitationsPermissions","onCheckCreatePreceptorsUserInvitationsPermissions","onCheckResendUserInvitationsPermissions","roleApiName","onCheckResendSuperCompanyAdministratorsUserInvitationsPermissions","onCheckResendCompanyAdministratorsUserInvitationsPermissions","onCheckResendCoordinatorsUserInvitationsPermissions","onCheckResendFacultiesUserInvitationsPermissions","onCheckResendInstitutionAdministratorsUserInvitationsPermissions","onCheckResendPreceptorsUserInvitationsPermissions","onCheckResendStudentsUserInvitationsPermissions","onCheckActiveAllUserInvitationsPermissions","onCheckDeleteUserInvitationsPermissions","onCheckDeleteSuperCompanyAdministratorsUserInvitationsPermissions","onCheckDeleteCompanyAdministratorsUserInvitationsPermissions","onCheckDeleteCoordinatorsUserInvitationsPermissions","onCheckDeleteFacultiesUserInvitationsPermissions","onCheckDeleteInstitutionAdministratorsUserInvitationsPermissions","onCheckDeletePreceptorsUserInvitationsPermissions","onCheckDeleteStudentsUserInvitationsPermissions","CASELOGS_LIMIT","caseLog","caseLogId","caseLogs","caseLogsCache","caseLogsMetaData","numTotalCaseLogs","numTotalCaseLogsPending","numTotalCaseLogsDenied","numTotalCaseLogsApproved","numTotalCaseLogsDraft","fetchingCaseLogs","caseLogCreateEdit","patientDemographics","age","typeAge","firstLanguage","institutionRecordNumber","clinicalInfo","appointmentDate","minutesWithPatient","minutesWithPreceptor","chiefComplaint","diagnosesAndProcedures","allTeeth","upperRightTeeth","upperLeftTeeth","lowerLeftTeeth","lowerRightTeeth","medication","medicationTaken","prescriptionThisVisit","psychosocialTopics","otherPsychosocialTopic","pmcc","customFields","notes","review","preceptorComments","step","pending","denied","approved","caseLogCreateToAdd","newListCaseLogs","newNumTotalCaseLogs","newNumTotalCaseLogsPending","caseLogCacheUpdateIndex","newCaseLogsCache","caseLogUpdateIndex","newListUpdatedCaseLogs","caseLogStatusOld","caseLogDeleteIndex","caseLogDelete","newStateCaseLogCreateEdit","CameraWarningView","zIndex","position","top","warning","Header","CameraWarningContainer","useSelector","cameraDevice","showCameraWarningMsg","onCheckReadUsersRoleProfile","onCheckReadMyProfileUsersPermissions","onCheckReadAllSuperCompanyAdministratorsUsersPermissions","onCheckReadAllCompanyAdministratorsUsersPermissions","onCheckReadAllCoordinatorsUsersPermissions","onCheckReadAllFacultiesUsersPermissions","onCheckReadAllInstitutionAdministratorsUsersPermissions","onCheckReadAllPreceptorsUsersPermissions","onCheckReadAllStudentsUsersPermissions","onCheckReadBasicStudentsUsersPermissions","onCheckEditUsersRoleProfile","onCheckEditMyProfileUsersPermissions","onCheckEditAllSuperCompanyAdministratorsUsersPermissions","onCheckEditAllCompanyAdministratorsUsersPermissions","onCheckEditAllCoordinatorsUsersPermissions","onCheckEditAllFacultiesUsersPermissions","onCheckEditAllInstitutionAdministratorsUsersPermissions","onCheckEditAllPreceptorsUsersPermissions","onCheckEditAllStudentsUsersPermissions","onCheckReadEnrollmentStudentsUsersPermissions","onCheckCreateEnrollmentStudentsUsersPermissions","onCheckEditEnrollmentStudentsUsersPermissions","onCheckDeleteEnrollmentStudentsUsersPermissions","onCheckReadBasicPreceptorsUsersPermissions","onCheckReadMyProfileUsersEnrollmentsPermissions","reportsStandardNames","standardId","reportDescription","reportModel","reportsStandardIds","initialStateQueryParams","isFetchingQueries","isFetchingReports","lastFetchingQueries","lastFetchingQueryReports","lastFetchingReports","queriesStandard","queryCreateEdit","queryDescription","queryIsPublic","queryName","show","reportsShowWarning","results","q","queryStandard","isPrivate","undefined","reverse","hasToShowReportsWarning","queryParamsResult","newReport","updatedAt","UserManagerFilters","fetchingByCohorts","fetchingByInstitutions","fetchingByPrograms","fetchingByRotations","fetchingByUserStatus","onFiltersBySearch","debounce","props","updateStoreUsers","onSearch","renderSearch","cohortsSelected","fromModal","onClearFilters","onOpenClose","programsSelected","roleSelected","rotationSelected","searchTxt","usersFound","disabledClearFilters","Event","fluid","placeholder","onChange","classNames","pb20","pb15","onGetUsersByRoles","formValues","resetFilters","callbacks","renderRoles","isFetchingRoles","isFetching","arrayRoles","Title","isFetched","fontWeight","totalUsers","onGetUsersByUserStatus","setState","onFiltersByUserStatus","onSelectedUserStatus","statusSelected","onFiltersSetUserStatus","newUserStatus","cancel","renderFilterUserStatus","checked","bold","onFiltersBy","filterState","onFiltersByRotations","onFiltersByPrograms","onFiltersByCohorts","onFiltersByInstitutions","renderRotations","activeRotation","minHeight","minWidth","renderPrograms","canReadAllStudentsProfile","arrayPrograms","selectOnBlur","upward","innerHeight","search","selection","multiple","renderCohorts","arrayCohorts","renderInstitutions","arrayInstitutions","institutionsSelected","this","exclusive","React","connect","SuperCompanyAdministrators","CompanyAdministrators","Coordinators","Faculties","InstitutionAdministrators","Preceptors","Students","dispatch","UsersManager","onCheckAllReportsPermissions","onCheckReportsPermissions","onCheckQueriesPermissions","onCheckChartsPermissions","onCheckReadAllReportsPermissions","onCheckEditReportsPermissions","onCheckDeleteReportsPermissions","onCheckDownloadReportsPermissions","Queries","onCheckReadQueriesPermissions","onCheckCreateQueriesPermissions","onCheckEditQueriesPermissions","onCheckDeleteQueriesPermissions","onCheckRunQueriesPermissions","Charts","onCheckReadChartsPermissions","onCheckCreateChartsPermissions","onCheckEditChartsPermissions","onCheckDeleteChartsPermissions","initAccessControl","dynamicRules","AccessControl","rolesWithoutAlumnis","rolAlumnis","newArrayRoles","dynamicRule","dynamicRuleId","API","ready","_setHeaders","isPostPutPatch","headers","Accept","Authorization","_setConfigGet","cancelToken","timeout","validateStatus","_validateStatus","_setConfigPostPutPatch","method","_setConfigDel","_setErrorAPI","_setFullURL","url","https","apiBase","fullURL","_validResponse","response","ok","_parseResponse","reject","success","apiConfig","__configDefault__","axios","get","then","catch","isAPICancelled","isCancel","extension","responseType","URL","createObjectURL","Blob","envApi","app","apiEnv","appURL","cancelRequests","Api","cancelRequest","updatingProfile","fetchingMyFiles","isAuthenticated","expiredToken","emulation","onBehalfUser","files","filesRequired","myInstitution","loaded","hasMyInstitutionCustomFieldsRequiredNull","hasContactInfoAddressesFieldsRequiredNull","hasEmergencyContactFieldsRequiredNull","hasCustomFieldsRequiredNull","getElementById","category","isRequired","CameraDevice","lastFetching","cohort","cohortId","myCompanyLoaded","myCompanyStatus","myCompany","myCompanyFiles","myCompanyFilesExpired","company","Company","filesExpired","initAPP","origin","port","websitename","baseDomain","suffix","companyDomain","baseImg","base","version","socketUri","buildDate","appBuildDate","addModelsCustomfields","newModels","modelsRoles","union","modelsOthers","models","triggerAnimation","customFieldId","customFieldModel","enrollments","studentEnrollments","studentEnrollment","studentEnrollmentId","initialStateEvaluationsSchedulersCreate","stepCreateEvaluationsSchedulers","triggeringCriteria","multipleAnswers","evaluatorsRole","targetsRole","targets","evaluatorsFrom","targetsFrom","evaluators","evaluationTemplateId","reminderMessageBeforeOpen","daysBeforeOpenToSendReminder","reminderMessageBeforeClose","daysBeforeCloseToSendReminder","openDaysBefore","keepEvaluationsOpen","every","evaluationsSchedulersTabs","evaluationScheduler","evaluationSchedulerId","evaluationsSchedulers","EvaluationsSchedulers","evaluationSchedulers","tabEvSchedSelected","newEvaluationsSchedulers","evaluationTemplate","form","newFormOption","newFormOptions","feedbackForm","FeedbackForm","openCloseFeedbackForm","fileCategories","fileCategory","fileCategoryId","intialStateJoyrideProps","run","steps","joyrideProps","sectionRunning","sections","stepIndex","initialStateImport","imports","importDataNotification","toShow","hasErrors","typeImport","importData","ImportData","importDataType","isFetchingInstitutions","institutionFiles","institutionFilesExpired","hasInstitutionCustomFieldsRequiredNull","invitations","Invitations","deletedInvitationRoleSelected","invitationId","newStateInvitations","numKeys","localstore","localStore","LocalStoreActions","keyStringify","Save","ClearAll","pageId","metricPage","metricsPages","chartId","chart","charts","Metrics","pages","page","_","WeakMap","bindActions","registerSocket","uri","Notifications","setConnectionIdSuccess","setConnectionIdFailure","addNotification","disconnectSocket","showImportDataNotification","getReports","showReportWarning","SocketService","initSocket","set","socket","actions","connectedSocket","toLocaleString","socketConnectionId","io","reconnectionAttempts","transports","socketService","on","emit","notification","disconnect","dispatchAction","attemptNumber","socketClosed","_listeners","import","notifications","reminders","isFetchingNotifications","notificationsCategories","totalNotifications","unseenNotifications","lastSeenNotificationId","markAsReadNotifications","stateNotifications","notificationId","readBy","notificationsFiltersByCategories","newNotifications","currentListNotifications","currentNotification","shift","n","notificationType","filterNotifications","notificationsCategory","nNotificationsUpdated","deleteNotifications","periodId","program","programId","pathname","hash","Router","before","namePage","routerManager","RouterManager","initServiceWorker","refreshButtonShow","serviceWorker","ServiceWorker","terms","term","termId","USER_MANAGER_USER_LIMIT","initialStateOptionsSelected","initialStateUserStatus","initialStateFilters","limit","usersManagerSelected","errorAPI","newFilters","rotationsActive","usersSelected","userFiles","userFilesExpired","allUsersSystem","lastFetchingAllUsersSystem","totalUsersSystem","usersObjectAll","countAllUsers","userRole","newUsersStateAll","usersObject","newUsersState","stateRole","newStateUsers","findIndex","update","$set","publicUrl","caseLogsKPI","institutionsWorked","workExperience","educationalBackground","publications","volunteers","skills","testimonials","usersPortfolio","UsersPortfolio","info","warn","console","styles","apiBaseAccessControlRoles","apiBaseAccessControlDynamicRules","doAccessControlReturnRoles","doAccessControlFetchRoles","doAccessControlCreateRole","doAccessControlUpdateRoleResource","doAccessControlDeleteRole","doAccessControlFetchDynamicRules","doAccessControlCreateDynamicRule","doAccessControlEditDynamicRule","doAccessControlDeleteDynamicRule","accessControlSagas","parseAlias","alias","actionResource","newActionResource","checkDisabled","parsePermissions","newPermissions","resourceName","AccessControlApi","GetAccessControlRoles","rolesApi","rolesState","roleApi","CreateRole","EditRole","newResourceUpdated","DeleteRole","GetAccessControlDynamicRules","CreateDynamicRule","EditDynamicRule","DeleteDynamicRule","doAuthGetMyAccounts","doAuthSwitchAccount","doAuthSignInApp","doMergeMyUserAccount","doAuthUpdateMyUserAccount","doAuthFetchMyFiles","doMergeMyInstitutionAccount","doAuthFetchMyInstitution","doAuthCheckSessionExpiredApp","doAuthSignOutApp","authSagas","getMyOptionsRoles","myRole","email","GetMyAccounts","accountsAvailable","apiToken","SwitchMyAccount","localhost","Cookies","removeDomain","domain","GetMyUserAccount","onCheckUsersManagerPermissions","hasToCheckRequiredFields","getContactInfoAddressesFieldsRequiredNull","getEmergencyContactFieldsRequiredNull","getCustomFieldsRequiredNull","companyId","customFieldsRequired","field","contactInfo","addresses","indexFieldCellPhone","address1","city","zipCode","emergencyContact","contactPerson","phoneNumber1","accessControlRoleUser","loadedNotifications","GetMyFiles","getRolesInstitutionCustomFieldsRequiredNull","rolesWrite","j","roleWrite","institutionRequired","GetMyInstitution","goToSignOut","SignOut","apiBaseBroadcastMessages","expirationDate","broadcastMessageId","doBroadcastMessagesFetchMessages","doBroadcastMessagesSetMessages","doBroadcastMessagesCreate","doBroadcastMessagesEdit","doBroadcastMessagesDelete","broadcastMessagesSagas","BroadcastMessagesApi","GetBroadcastMessages","broadcastMessagesSettings","broadcastMessagesSettingsValue","authUser","currentEnrollment","messagesBelongToThisUser","CreateBroadcastMessage","EditBroadcastMessage","DeleteBroadcastMessage","apiBaseCaseLogs","populated","skip","preceptors","procedures","startDate","endDate","appointmentDateFrom","appointmentDateTo","sortByParams","sortKey","sortName","UPLOAD","doCaseLogsFetchAll","doCaseLogsFetchKpis","doCaseLogsCreate","doCaseLogsCreateDummy","doCaseLogsCheckCaseLogsCacheData","doCaseLogsFetchCaseLog","doCaseLogsEdit","doCaseLogsDelete","doCaseLogsReview","caseLogsSagas","caseLogsSortBy","source","CancelToken","CaseLogsApi","GetCaseLogs","GetCaseLogsKpis","CaseLogsKPIS","CreateCaseLog","GetCaseLog","dataCaseLog","onCheckClinicalInfoReasonForVisit","onSetCaseLogCreateEdit","patient","caseLogsCacheDataStore","isAfter","EditCaseLog","caseLogDataStore","DeleteCaseLog","ReviewCaseLog","apiBaseCohorts","doCohortsFetchCohorts","doCohortsCreate","doCohortsEditCohort","doCohortsDelete","cohortsSagas","CohortsApi","GetCohorts","cohortsSortByName","CreateCohort","EditCohort","DeleteCohort","apiBaseCompany","isUpload","apiBaseFileCategories","doCompanyFetchCompany","doCompanyEditCompany","doCompanyFetchCompanyFiles","doCompanyFetchCompanyFilesExpired","doCompanyUploadCompanyFiles","companySagas","CompanyApi","GetCompany","isPostFile","EditCompany","FileCategoriesApi","GetFileCategories","dataFileCategories","categories","GetCompanyFiles","GetCompanyFilesExpired","UploadCompanyFiles","apiBaseCustomFields","doCustomFieldsFetchCustomFields","doCustomFieldsCreate","doCustomFieldsEditCustomField","doCustomFieldsDeleteCustomField","customFieldsSagas","CustomFieldsApi","GetCustomFields","CreateCustomField","EditCustomField","DeleteCustomField","apiBaseEnrollments","doStudentEnrollmentsFetchEnrollments","doStudentEnrollmentCreateEnrollment","doStudentEnrollmentEditEnrollment","doStudentEnrollmentDelete","enrollmentsSagas","EnrollmentsApi","GetStudentEnrollment","CreateStudentEnrollment","EditStudentEnrollment","DeleteStudentEnrollment","apiBaseEvaluations","apiBaseEvaluationsSchedulers","apiBaseEvaluationsTemplates","evaluationTypes","answerStatus","unique","getAnswers","doEvaluationsFetchAll","doEvaluationsFetchEvaluationsByFilters","doEvaluationsFetchKpis","doEvaluationsAnswersFetchKpis","doEvaluationsFetchEvaluation","doEvaluationsCreate","doEvaluationsEdit","doEvaluationsDelete","doEvaluationsFetchAnswers","doEvaluationsFetchEvaluationAnswers","doEvaluationsFetchEvaluationAnswer","doEvaluationsResponseEvaluationAnswers","doEvaluationsDeleteEvaluationAnswer","evaluationsSagas","getFiltersEvaluations","filtersEvaluations","statusEvaluation","EvaluationsApi","GetEvaluations","dataEvaluations","evaluationsByType","allEvaluations","evaluationsSortBy","evaluationTypeSelected","dataEvaluationsMetadata","allMetaData","GetEvaluationsKpis","EvaluationsKPIS","GetEvaluationsAnswersKpis","EvaluationsAnswersKPIs","GetEvaluation","CreateEvaluation","evaluationUpdated","EditEvaluation","DeleteEvaluation","parseAnswers","UserEvaluationAnswers","InstitutionEvaluationsAnswers","CompanyEvaluationsAnswers","CustomEvaluationsAnswers","answersParsed","filtersAnswers","statusAnswer","evaluationAnswerType","GetEvaluationAnswers","dataAnswers","ResponseEvaluationAnswer","DeleteEvaluationAnswer","doEvaluationsSchedulersFetchEvaluationsSchedulers","doEvaluationsSchedulersFetchEvaluationScheduler","doEvaluationsSchedulersCreate","doEvaluationsSchedulersEdit","doEvaluationsSchedulersDelete","evaluationsSchedulersSagas","GetEvaluationsSchedulers","GetEvaluationSchedulers","CreateEvaluationSchedulers","EditEvaluationSchedulers","DeleteEvaluationSchedulers","doEvaluationsTemplatesFetchForms","doEvaluationsTemplatesCreate","doEvaluationsTemplatesFetchForm","doEvaluationsTemplatesEdit","doEvaluationsTemplatesDelete","evaluationsTemplatesSagas","GetEvaluationsTemplates","userFirstName","userLastName","CreateEvaluationTemplates","parseTemplate","lastUpdatedBy","GetEvaluationTemplates","evaluationTemplateData","EditEvaluationTemplates","DeleteEvaluationTemplates","apiBaseFeedbackForm","doFeedbackFormSend","feedbackFormSagas","FeedbackFormApi","SendFeedbackForm","apiBaseFiles","fileId","doFilesEdit","doFilesDelete","doFilesDownload","doFilesPreview","filesSagas","onParseEditFiles","file","fileIndex","FilesApi","EditFile","fileCategoryArray","newFiles","DeleteFile","filesIDs","fileName","DownloadFile","blobURL","doFileCategoriesFetchFileCategories","doFileCategoriesCreate","doFileCategoriesEdit","doFileCategoriesDelete","fileCategoriesSagas","CreateFileCategory","EditFileCategory","DeleteFileCategory","apiBaseImportData","typesImport","doImportDataFetch","doImportDataSend","doImportGenerateCSV","importDataSagas","cbs","cbe","ImportDataApi","GetImportData","SendImportData","importName","GenerateCSVImportData","apiBaseInvitations","groupBy","PUT","doInvitationsFetchInvitations","doInvitationsCreate","doInvitationsResend","doInvitationsActive","doInvitationsDelete","invitationsSagas","InvitationsApi","GetInvitations","remainUserInvitations","userInvitation","CreateInvitations","userInvitations","ResendInvitations","ActiveInvitation","DeleteInvitation","apiBaseInstitutions","availabilityId","actionApi","doInstitutionsFetchInstitutions","doInstitutionsCreate","doMergeInstitutionAccount","doInstitutionsFetchInstitution","doInstitutionsFetchInstitutionAvailabilities","doInstitutionsEditInstitution","doInstitutionsEditInstitutionAvailabilities","doInstitutionsFetchInstitutionFiles","doInstitutionsFetchInstitutionFilesExpired","doInstitutionsUploadInstitutionFiles","doInstitutionsDelete","institutionsSagas","InstitutionsApi","GetInstitutions","institutionsSortByName","CreateInstitution","isEdit","GetInstitution","GetInstitutionAvailabilities","availabilities","isMyInstitution","EditInstitution","EditInstitutionAvailabilities","GetInstitutionFiles","GetInstitutionFilesExpired","UploadInstitutionFiles","DeleteInstitution","apiBaseMetrics","doMetricsFetchMetricsPages","doMetricsCreateMetricPage","doMetricsFetchMetricPage","doMetricsEditMetricPage","doMetricsDeleteMetricPage","doMetricsFetchMetricPageCharts","doMetricsCreateMetricPageChart","doMetricsFetchMetricPageChart","doMetricsEditMetricPageChart","doMetricsDeleteMetricPageChart","MetricsApi","GetMetricsPages","CreateMetricPage","GetMetricPage","EditMetricPage","DeleteMetricPage","GetMetricPageCharts","CreateMetricPageChart","GetMetricPageChart","EditMetricPageChart","DeleteMetricPageChart","apiBaseNotifications","doNotificationsRegisterSocket","doNotificationsSetSocketConnectionId","doNotificationsFetchNotifications","doNotificationsMarkAsReadNotifications","doNotificationsLastSeenNotification","doNotificationsDelete","doNotificationsCreateReminders","notificationsSagas","NotificationsApi","RegisterSocketConnectionID","GetNotifications","total","unseen","markAll","notificationCategory","reduce","ac","MarkAsReadNotifications","LastSeenNotification","DeleteNotification","DeleteNotifications","nNotificationsDeleted","CreateRemindersNotification","apiBasePeriods","doPeriodsFetchPeriods","doPeriodsCreate","doPeriodsEdit","doPeriodsDelete","periodsSagas","PeriodsApi","GetPeriods","periodsSortByName","CreatePeriod","EditPeriod","DeletePeriod","apiBasePrograms","doProgramsFetchPrograms","doProgramsCreate","doProgramsEditProgram","doProgramsDelete","programsSagas","ProgramsApi","GetPrograms","programsSortByName","CreateProgram","EditProgram","DeleteProgram","apiBaseRotations","doRotationsFetchByFilters","doRotationsFetchKpis","doRotationsCreateRotations","doRotationsEditRotations","doRotationsSetAutomaticRotations","doRotationsFetchRotation","doRotationsEdit","doRotationsDelete","rotationsSagas","rotationsSortBy","RotationsApi","GetRotations","GetRotationsKpis","RotationsKPIS","CreateRotations","allRotationsSelected","batch","rotationsFilters","rotationsSelected","startEndDate","EditRotations","rotationsRequestAccepted","SetAutomaticRotations","rotationsWithErrors","GetRotation","EditRotation","dataRotation","DeleteRotation","apiBaseTenantSettings","tenantSettingName","tenantSettingValue","tenantSetting","apiEndPoint","apiRoute","retroactiveDate","design","languages","insurances","races","reasonsForVisit","diagnosticDisciplines","diagnostics","procedureDisciplines","proceduresStatus","proceduresReviews","teeth","automaticRotationsParameters","automaticRotationsParameter","institutionType","_onGetEndPoint","doTenantSettingsFetchAll","doTenantSettingsCUDTenantSettings","tenantSettingsSagas","TenantSettingsApi","GetTenantSettings","CUDTenantSetting","tenantSettingNew","apiBaseTerms","doTermsFetchAll","doTermsCreate","doTermsEdit","doTermsDelete","termsSagas","TermsApi","GetTerms","CreateTerm","EditTerm","DeleteTerm","apiBaseUsers","sortParam","sortByFieldName","onSetSortParam","doUsersGetUsers","doUsersFetchUsersKpis","doUsersFetchAll","doUsersUpdateStoreUsers","doUsersFetchUsersByFilters","doUsersFetchUsersRoles","doUsersGetAccounts","doUsersFetchUser","doUsersFetchUserKpis","doUsersFetchUserAvailabilities","doUsersEditUsers","doUsersEditUser","doUsersEditUserAvailabilities","doUsersSetUser","doUsersFetchUserFiles","doUsersFetchUserFilesExpired","doUsersUploadUserFiles","doUsersEmulateUser","usersSagas","usersManagerSortBy","usersManagerSortByName","usersManagerUserStatus","UsersApi","GetUsers","remainUsers","usersManagerFilters","newRoleSelected","errorsDetails","GetUserAccounts","GetUser","GetUserKpis","GetUserAvailabilities","bulkAction","allUsersSelected","userManagerFilters","EditUsers","usersRoles","isMyProfile","EditUser","profileImage320","profileImageOriginal","EditUserAvailabilities","userToLoad","stateUsers","userArray","GetUserFiles","GetUserFilesExpired","UploadUserFiles","stopEmulation","EmulateUser","pathToAppReload","apiBasePortfolio","Portfolio","doUsersPortfolioFetchPortfolio","doUsersPortfolioEditPortfolio","doUsersPortfolioRequestPortfolioTestimonials","doUsersPortfolioRequestPortfolioTestimonialsNotifications","doUsersPortfolioSubmitPortfolioTestimonials","doUsersPortfolioDeletePortfolioTestimonials","usersPortfolioSagas","PortfolioApi","GetPorfolio","portfolio","portfolioId","owner","EditPortfolio","RequestPortfolioTestimonials","SubmitPortfolioTestimonials","DeletePortfolioTestimonials","readySaga","sagas","fork","metricsSagas","history","createBrowserHistory","beforeTransitionsMiddleware","store","next","getState","router","routerManagerTransitionsMiddleware","nextAction","localStoreMiddleware","GuideLineTutorialContainer","_handleJoyrideCallback","callback","CallbackProps","finishTutorial","EVENTS","TOUR_END","STATUS","FINISHED","SKIPPED","canRenderTutorial","continuous","showProgress","showSkipButton","primaryColor","onCheckNotificationsPermissions","MenuTutorial","_onStartTutorial","startTutorial","userName","content","placement","placementBeacon","STEP_AFTER","TARGET_NOT_FOUND","el","lastChild","render","prevProps","prevState","stopTutorial","updateState","onCheckReadMyUsersPortfolioPermissions","Portfolios","onCheckSubmitMyUsersPortfolioPermissions","ALL_NOTIFICATIONS_CATEGORIES","onCreateNotificationsCategories","allNotificationsCategories","onCheckAllCaseLogsPermissions","EvaluationAnswers","onCheckReadAllEvaluationAnswersPermissions","onCheckImportDataPermissions","onCheckAllUserPortfolioPermissions","useState","NotificationsFilters","authPermissions","useDispatch","NOTIFICATIONS_CATEGORIES","timerId","setTimerId","onFilterNotificationsByCategories","successMsg","onSetNotificationsByCategories","clearTimeout","Button","Group","mr5","Icon","circular","opacity","NotificationsActionsInBulk","_canDoInActionsInBulk_","canDoInActionsInBulk","hasNotificationsCategories","inAction","setInAction","onAction","canDeleteAllInBulk","Popup","loading","hoverable","trigger","NotificationsActions","isMarkAsRead","NotificationsDate","NotificationUserAccount","setImg","goToUserProfile","new","Grid","columns","Row","Column","mobile","tablet","computer","Image","src","iconUserEmptyFill","alt","centered","NotificationCustomFields","goToProfile","NotificationInstitutionAccount","goToInstitutionProfile","logo","iconInstitutionEmptyFill","NotificationRotation","goTo","rotationNumber","indexInsti","LinkToPreceptor","children","LinkToCaseLog","onCheckReadCaseLogsPermissions","NotificationCaseLog","caseLogNumber","NotificationPeriod","NotificationEvaluation","evaluationAnswer","targetName","evaluationNumber","reminderMessage","header","Divider","NotificationDocuments","NotificationDocumentCategory","goToDocumentsCategory","NotificationImportData","goToImportStatus","NotificationReport","InfiniteScroll","onLoadMoreNotifications","onEnter","getMoreNotifications","Tab","Pane","attached","horizontal","indeterminate","Wrapper","styled","p","DateTime","span","BroadcastMessagesList","expirationDateWithFormat","broadcastMsgIsExpired","isBefore","whiteSpace","Label","ListItem","List","Item","BroadcastSchedulers","onLoadBroadCastMessage","broadcastSchedulers","onParseArraySelected","propKey","keyToSearch","arraySelected","arrayToSearch","arrayToParse","valueToFind","rolesSelected","bulleted","BroadcastSentMessagePresentational","renderCreateBroadcastMessage","Form","renderButtonLink","renderRecipients","renderExpirationDate","renderMessage","renderActions","goToBroadcastSettings","broadcastMessage","onChangeDropdown","canSelectProgramsAndCohorts","canSelectInstitutions","allInstitutions","Container","Dropdown","noResultsMessage","renderLabel","defaultLabelProps","renderFilterUsersRoles","usersRolesOptions","usersOptions","onChangeInputField","min","dateSelected","strDate","time","TextArea","rows","errorSuccessBroadcastMessage","isCreatingBroadcastMessage","onSaveBroadcastMessage","successApi","negative","errorApi","BroadcastSentMessageContainer","_onInitialStateBroadcastMessage","onEndCallback","_onSavingBroadcastMessage","createBroadcastMessage","editBroadcastMessage","parseError","canFetchAllUsers","getUsers","canCreateNewBroadcastMessages","showSendBroadCastMessages","setShowSendBroadCastMessages","bottom","NotificationsPresentational","renderPanes","Menu","Broadcast","activeNotifications","initializeNotifications","ref","visible","grid","paneWidth","tabWidth","menu","pointing","secondary","vertical","tabular","Dimmer","background","NotificationsContainer","notificationsRef","onSeeAllNotifications","lastNotificationId","updateLastSeenNotification","onGettingMoreNotifications","getNotifications","onGetMoreNotifications","handleOutsideClick","dataset","icono","popup","btn","onCloseNotifications","removeEventListener","onInitNotifications","activeNotificationsOld","activeNotificationsNew","addEventListener","ownProps","SubMenu","isModalOpen","Modal","closeIcon","MenuPresentational","_onCheckActiveMenu","path","activePath","onErrorCompanyImage","iconCompanyEmpty","onErrorInstitutionImage","iconInstitutionEmpty","onErrorUserImage","iconUserEmpty","renderMenu","onChangeMenu","onOpenCloseNotifications","onCheckPermissions","menusTail","menus","manager","renderSubMenuProfile","MyPayments","hasPortfolio","pathAdmin","renderImage","renderSubMenuMyProfile","renderSubmenuSchool","renderSubmenuClinic","renderSubmenuMyPortfolio","renderSubmenuMySettings","renderSubmenuAdminPortal","renderSubmenuChangePassword","renderSubmenuFeedbackForm","small","onError","corner","onOpenFeedbackForm","showSidebarMenu","onShowMenu","onOpenCloseSubMenu","goBack","sidebarmenu","MenuContainer","_loadingMyPayments","authRoleType","default","onCheckManagerPermissions","onCheckUserInvitationsManagerPermissions","onCheckCaseLogsPermissions","onCheckEvaluationSchedulersPermissions","onCheckEvaluationTemplatesPermissions","ev","onGoTo","toggleSidebarVisibility","isClose","stopPropagation","showMenuOld","showMenu","showMenuNew","openFeedbackForm","withRouter","_img","EmulateUserPresentational","onStopEmulation","stoppingEmulation","tooltip","floated","EmulateUserContainer","_onAddBodyClass","emulationActiveOld","emulationActiveNew","emulationActive","renderDropDownField","onChangePriority","Field","renderInputField","meta","touched","maxLength","Input","accept","maxSize","onDrop","filesToUpload","filesToRejected","profilePic","Message","FeedbackFormView","renderPriority","component","renderInputFile","appVersion","confirmSubmit","onCancel","onSubmit","submitting","valid","stackable","stretched","verticalAlign","positive","Confirm","cancelButton","confirmButton","lineHeight","useEffect","reduxForm","validate","feedbackFormPriority","feedbackFormDescription","setConfirmSubmit","metaTagVersion","querySelector","setAttribute","_onSendFeedbackFormRequest","feedbackFormFile","FormData","append","priority","errorFeedbackForm","FeedbackFormActions","formData","SubmissionError","feedbackFormTitle","_error","onCleanErrorImage","change","clearAsyncError","clearSubmit","reset","handleSubmit","submitSucceeded","LoadedRoute","Component","restProps","isAllowedRoute","rest","fallback","HomeContainer","loadable","MyProfileContainer","UserProfileContainer","UserFilesContainer","UserPortfolioContainer","CompanyContainer","InstitutionsContainer","RotationsContainer","EvaluationsContainer","EvaluationsTemplatesContainer","CaseLogsContainer","ReportsContainer","AccountSettingsContainer","AdminPortalContainer","lastComponentLoaded","saveComponent","stateProps","RouteLoadedCompoundContainer","authCookie","_imgOrUrl_","defaultHomeContainer","canReadMyPortfolio","canSubmitPortfolioTestimonials","canReadMyCompany","canReadMyFiles","canReadMyCompaniesFiles","canReadMyInstitutionsFiles","canReadInstitutionsFiles","canReadStudentsFiles","canReadUsersFiles","canReadRotations","canReadMyInstitution","canReadCaseLogs","canSubmitCaseLogs","onCheckSubmitCaseLogsPermissions","canReadEvaluations","myProfile","authRoleApiName","hasMyInstitution","authUserId","hasActiveRotations","studentsInstitutions","isAllowedEvaluationsRoute","onCheckReadEvaluationSchedulersPermissions","userProfileImageOriginalSrc","onCheckCreateEvaluationSchedulersPermissions","setPublicUrl","publicToken","ManagerContainer","UserManagerContainer","UserInvitationManagerContainer","UsersImportDataContainer","RouteManagerCompoundContainer","defaultManagerContainer","components","baseClassName","openUserManager","canInviteUsers","canImportUsers","canCreateEditRotations","onCheckUserManagerActionCreateEditRotationPermissions","canCreateEvaluationSchedulers","openUploadDocuments","canReadAllInstitutions","canReadMyInstitutions","ProtectedRoute","redirectTo","RedirectsRoute","computedMatch","ManagerRoute","params","storedUserId","HomeRoute","MyProfileRoute","isAllowedRole","CompanyRoute","InstitutionsRoute","create_view","documents","upload","allowedInstitutionsRoute","storedinstitutionId","MyInstitutionRoute","RotationsRoute","create_edit_confirm","allowedRole","redirectToAllowed","allowedRotationsRoute","storedRotationId","EvaluationsTemplatesRoute","create_edit_view","templateId","onCheckCreateEvaluationTemplatesPermissions","onCheckEditEvaluationTemplatesPermissions","onCheckReadEvaluationTemplatesPermissions","storedEvaluationTemplateId","EvaluationsSchedulersRoute","EvaluationsRoute","answers_review","allowedEvaluationsRoute","storedEvaluationId","storedAnswerId","CaseLogsRoute","create_edit_re_view","allowedCaseLogsRoute","onCheckEditCaseLogsPermissions","onCheckReviewCaseLogsPermissions","storedCaseLogId","ReportsRoute","storedQueryId","storedReportId","AccountSettingsRoute","AdminPortalRoute","Boolean","unregister","registration","SignOutContainer","onDoingSignOut","signOut","serviceWorkerRegistration","onSignOut","pathToWebsite","isTokenExpired","SignOutRoute","createRef","BroadcastMessagesView","messages","onConfirm","sliderRef","indexSliderSelected","setIndexSliderSelected","setBroadcastMessagesWatched","totalMessages","sliderToShow","adaptiveHeight","arrows","beforeChange","current","dots","infinite","Actions","slickPrev","slickNext","Checkbox","broadcastMessageWatched","newBroadcastMessagesWatched","broadcastMessageWatchedToRemove","BroadcastMessagesContainer","isSameOrBefore","hideModal","setHideModal","newMessagesWatched","FieldsWarningPresentational","Transition","animation","duration","FieldsWarningContainer","showWarning","FilesRequiredWarningPresentational","onDismissMessage","onDismiss","FilesRequiredWarningContainer","hideMessage","visibleForRoles","ReportsWarningPresentational","ReportsWarningContainer","hideReportWarning","ServiceWorkerPresentational","counter","closeOnDimmerClick","ServiceWorkerContainer","_onSetCountDown","_onCountDown","onRefreshButtonShow","reload","snapshot","lazy","Suspense","ImportDataNotification","AppRouter","exact","RouterApp","useLocation","baseClass","AppMain","ErrorBoundary","isOffline","onErrorOfflineOnline","reportWebVitals","onPerfEntry","Function","getCLS","getFID","getFCP","getLCP","getTTFB","locale","week","dow","doy","momentLocalizer","simpleNumberLocalizer","sagaMiddleware","createSagaMiddleware","middlewares","routerMiddleware","composeEnhancers","compose","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","enhancer","applyMiddleware","preloadedState","createStore","combineReducers","connectRouter","reduxFormReducer","metrics","configureStore","ReactDOM","EvaluationSchedulers","onCheckEditEvaluationSchedulersPermissions","onCheckDeleteEvaluationSchedulersPermissions","onCheckReadAllCaseLogsPermissions","onCheckCreateCaseLogsPermissions","onCheckDeleteCaseLogsPermissions","EvaluationTemplates","onCheckDeleteEvaluationTemplatesPermissions"],"mappings":"k0kGAGaA,EAA8B,sBAC9BC,EAAmBC,YAAaF,GAIhCG,EACX,+BACWC,EAA2BF,YACtCC,GACA,SAACE,GAAD,OAAa,SAACC,GAAD,OAAsBD,EAAQC,OAGhCC,EAAqC,6BACrCC,EAC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AHb,CAAC,gCAOR+lB,EAA8C,SACzDjmB,GAEA,IACQmiB,GAAUniB,GAAe,IAAzBmiB,MACR,SAAIA,IAASA,EAAMjiB,WACVR,EAAgByiB,EAAMjiB,SAHb,CAAC,kCAORgmB,EAA4C,SACvDlmB,GAEA,IACQmiB,GAAUniB,GAAe,IAAzBmiB,MACR,SAAIA,IAASA,EAAMjiB,WACVR,EAAgByiB,EAAMjiB,SAHb,CAAC,kCAORimB,EAA8C,SACzDnmB,GAEA,IACQmiB,GAAUniB,GAAe,IAAzBmiB,MACR,SAAIA,IAASA,EAAMjiB,WACVR,EAAgByiB,EAAMjiB,SAHb,CAAC,kCASRkmB,EAAkC,SAC7CpmB,GAEA,IA0CQmiB,GAAUniB,GAAe,IAAzBmiB,MACR,SAAIA,IAASA,EAAMjiB,WACVR,EAAgByiB,EAAMjiB,SA5Cb,CAChB,0CACA,wCACA,0CACA,0CACA,qCACA,mCACA,qCACA,qCACA,4BACA,0BACA,4BACA,4BACA,yBACA,uBACA,yBACA,yBACA,wBACA,sBACA,wBACA,wBACA,yCACA,uCACA,yCACA,yCACA,0BACA,wBACA,0BACA,0BACA,2BACA,yBACA,2BACA,2BACA,4CACA,0CACA,4CACA,4CACA,6BACA,2BACA,6BACA,gCAQSmmB,EAAsC,SACjDrmB,GAEA,IAYQmiB,GAAUniB,GAAe,IAAzBmiB,MACR,SAAIA,IAASA,EAAMjiB,WACVR,EAAgByiB,EAAMjiB,SAdb,CAChB,wCACA,mCACA,0BACA,uBACA,sBACA,uCACA,wBACA,yBACA,0CACA,8BAQSomB,EAAwC,SACnDtmB,GAEA,IAYQmiB,GAAUniB,GAAe,IAAzBmiB,MACR,SAAIA,IAASA,EAAMjiB,WACVR,EAAgByiB,EAAMjiB,SAdb,CAChB,0CACA,qCACA,4BACA,yBACA,wBACA,yCACA,0BACA,2BACA,4CACA,gCAmDSqiB,EAAwD,SACnEviB,GAEA,IACQmiB,GAAUniB,GAAe,IAAzBmiB,MACR,SAAIA,IA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/E,EAAoBl/E,SAH3B,CAAC,6BAA8B,8BAQtC+2E,EAA4C,SACvDj3E,GAEA,IACQo/E,GAAwBp/E,GAAe,IAAvCo/E,oBACR,SAAIA,IAAuBA,EAAoBl/E,WACtCR,EAAgB0/E,EAAoBl/E,SAH3B,CAAC,8BAQR62E,EAA8C,SACzD/2E,GAEA,IACQo/E,GAAwBp/E,GAAe,IAAvCo/E,oBACR,SAAIA,IAAuBA,EAAoBl/E,WACtCR,EAAgB0/E,EAAoBl/E,SAH3B,CAAC,gCAQR82E,EAA4C,SACvDh3E,GAEA,IACQo/E,GAAwBp/E,GAAe,IAAvCo/E,oBACR,SAAIA,IAAuBA,EAAoBl/E,WACtCR,EAAgB0/E,EAAoBl/E,SAH3B,CAAC,gCAQRm/E,EAA8C,SACzDr/E,GAEA,IACQo/E,GAAwBp/E,GAAe,IAAvCo/E,oBACR,SAAIA,IAAuBA,EAAoBl/E,WACtCR,EAAgB0/E,EAAoBl/E,SAH3B,CAAC,iC","file":"static/js/main.cdd6970d.chunk.js","sourcesContent":["import { createAction } from \"deox\";\n\n// Actions for Access Control\nexport const ACCESS_CONTROL_INIT: string = \"ACCESS_CONTROL/INIT\";\nexport const initAccesControl = createAction(ACCESS_CONTROL_INIT);\n\n// Actions for Roles\n// Role Selected\nexport const ACCESS_CONTROL_ROLE_SELECTED: string =\n \"ACCESS_CONTROL/ROLE/SELECTED\";\nexport const accesControlRoleSelected = createAction(\n ACCESS_CONTROL_ROLE_SELECTED,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Fetch all roles\nexport const ACCESS_CONTROL_FETCH_ROLES: string = \"ACCESS_CONTROL/FETCH/ROLES\";\nexport const ACCESS_CONTROL_FETCH_ROLES_REQUEST: string =\n \"ACCESS_CONTROL/FETCH/ROLES/REQUEST\";\nexport const ACCESS_CONTROL_FETCH_ROLES_SUCCESS: string =\n \"ACCESS_CONTROL/FETCH/ROLES/SUCCESS\";\nexport const ACCESS_CONTROL_FETCH_ROLES_FAILURE: string =\n \"ACCESS_CONTROL/FETCH/ROLES/FAILURE\";\nexport const accessControlFetchRoles = createAction(\n ACCESS_CONTROL_FETCH_ROLES,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const accessControlFetchRolesRequest = createAction(\n ACCESS_CONTROL_FETCH_ROLES_REQUEST\n);\nexport const accessControlFetchRolesSuccess = createAction(\n ACCESS_CONTROL_FETCH_ROLES_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const accessControlFetchRolesFailure = createAction(\n ACCESS_CONTROL_FETCH_ROLES_FAILURE,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Create a Role\nexport const ACCESS_CONTROL_CREATE_ROLE: string = \"ACCESS_CONTROL/CREATE/ROLE\";\nexport const ACCESS_CONTROL_CREATE_ROLE_REQUEST: string =\n \"ACCESS_CONTROL/CREATE/ROLE/REQUEST\";\nexport const ACCESS_CONTROL_CREATE_ROLE_SUCCESS: string =\n \"ACCESS_CONTROL/CREATE/ROLE/SUCCESS\";\nexport const ACCESS_CONTROL_CREATE_ROLE_FAILURE: string =\n \"ACCESS_CONTROL/CREATE/ROLE/FAILURE\";\nexport const accessControlCreateRole = createAction(\n ACCESS_CONTROL_CREATE_ROLE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const accessControlCreateRoleRequest = createAction(\n ACCESS_CONTROL_CREATE_ROLE_REQUEST\n);\nexport const accessControlCreateRoleSuccess = createAction(\n ACCESS_CONTROL_CREATE_ROLE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const accessControlCreateRoleFailure = createAction(\n ACCESS_CONTROL_CREATE_ROLE_FAILURE\n);\n// Update a Resource from some Role\nexport const ACCESS_CONTROL_UPDATE_ROLE_RESOURCE: string =\n \"ACCESS_CONTROL/UPDATE/ROLE/RESOURCE\";\nexport const ACCESS_CONTROL_UPDATE_ROLE_RESOURCE_REQUEST: string =\n \"ACCESS_CONTROL/UPDATE/ROLE/RESOURCE/REQUEST\";\nexport const ACCESS_CONTROL_UPDATE_ROLE_RESOURCE_SUCCESS: string =\n \"ACCESS_CONTROL/UPDATE/ROLE/RESOURCE/SUCCESS\";\nexport const ACCESS_CONTROL_UPDATE_ROLE_RESOURCE_FAILURE: string =\n \"ACCESS_CONTROL/UPDATE/ROLE/RESOURCE/FAILURE\";\nexport const accessControlUpdateRoleResource = createAction(\n ACCESS_CONTROL_UPDATE_ROLE_RESOURCE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const accessControlUpdateRoleResourceRequest = createAction(\n ACCESS_CONTROL_UPDATE_ROLE_RESOURCE_REQUEST\n);\nexport const accessControlUpdateRoleResourceSuccess = createAction(\n ACCESS_CONTROL_UPDATE_ROLE_RESOURCE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const accessControlUpdateRoleResourceFailure = createAction(\n ACCESS_CONTROL_UPDATE_ROLE_RESOURCE_FAILURE\n);\n// Delete a Role\nexport const ACCESS_CONTROL_DELETE_ROLE: string = \"ACCESS_CONTROL/DELETE/ROLE\";\nexport const ACCESS_CONTROL_DELETE_ROLE_REQUEST: string =\n \"ACCESS_CONTROL/DELETE/ROLE/REQUEST\";\nexport const ACCESS_CONTROL_DELETE_ROLE_SUCCESS: string =\n \"ACCESS_CONTROL/DELETE/ROLE/SUCCESS\";\nexport const ACCESS_CONTROL_DELETE_ROLE_FAILURE: string =\n \"ACCESS_CONTROL/DELETE/ROLE/FAILURE\";\nexport const accessControlDeleteRole = createAction(\n ACCESS_CONTROL_DELETE_ROLE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const accessControlDeleteRoleRequest = createAction(\n ACCESS_CONTROL_DELETE_ROLE_REQUEST\n);\nexport const accessControlDeleteRoleSuccess = createAction(\n ACCESS_CONTROL_DELETE_ROLE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const accessControlDeleteRoleFailure = createAction(\n ACCESS_CONTROL_DELETE_ROLE_FAILURE\n);\n\n// Actions for Dynamic Rules\n// Fetch all dynamic rules\nexport const ACCESS_CONTROL_FETCH_DYNAMIC_RULES: string =\n \"ACCESS_CONTROL/FETCH/DYNAMIC_RULES\";\nexport const ACCESS_CONTROL_FETCH_DYNAMIC_RULES_REQUEST: string =\n \"ACCESS_CONTROL/FETCH/DYNAMIC_RULES/REQUEST\";\nexport const ACCESS_CONTROL_FETCH_DYNAMIC_RULES_SUCCESS: string =\n \"ACCESS_CONTROL/FETCH/DYNAMIC_RULES/SUCCESS\";\nexport const ACCESS_CONTROL_FETCH_DYNAMIC_RULES_FAILURE: string =\n \"ACCESS_CONTROL/FETCH/DYNAMIC_RULES/FAILURE\";\nexport const accessControlFetchDynamicRules = createAction(\n ACCESS_CONTROL_FETCH_DYNAMIC_RULES,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const accessControlFetchDynamicRulesRequest = createAction(\n ACCESS_CONTROL_FETCH_DYNAMIC_RULES_REQUEST\n);\nexport const accessControlFetchDynamicRulesSuccess = createAction(\n ACCESS_CONTROL_FETCH_DYNAMIC_RULES_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const accessControlFetchDynamicRulesFailure = createAction(\n ACCESS_CONTROL_FETCH_DYNAMIC_RULES_FAILURE\n);\n// Create a Dynamic Rule\nexport const ACCESS_CONTROL_CREATE_DYNAMIC_RULE: string =\n \"ACCESS_CONTROL/CREATE/DYNAMIC_RULE\";\nexport const ACCESS_CONTROL_CREATE_DYNAMIC_RULE_REQUEST: string =\n \"ACCESS_CONTROL/CREATE/DYNAMIC_RULE/REQUEST\";\nexport const ACCESS_CONTROL_CREATE_DYNAMIC_RULE_SUCCESS: string =\n \"ACCESS_CONTROL/CREATE/DYNAMIC_RULE/SUCCESS\";\nexport const ACCESS_CONTROL_CREATE_DYNAMIC_RULE_FAILURE: string =\n \"ACCESS_CONTROL/CREATE/DYNAMIC_RULE/FAILURE\";\nexport const accessControlCreateDynamicRule = createAction(\n ACCESS_CONTROL_CREATE_DYNAMIC_RULE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const accessControlCreateDynamicRuleRequest = createAction(\n ACCESS_CONTROL_CREATE_DYNAMIC_RULE_REQUEST\n);\nexport const accessControlCreateDynamicRuleSuccess = createAction(\n ACCESS_CONTROL_CREATE_DYNAMIC_RULE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const accessControlCreateDynamicRuleFailure = createAction(\n ACCESS_CONTROL_CREATE_DYNAMIC_RULE_FAILURE\n);\n// Edit a Dynamic Rule\nexport const ACCESS_CONTROL_EDIT_DYNAMIC_RULE: string =\n \"ACCESS_CONTROL/EDIT/DYNAMIC_RULE\";\nexport const ACCESS_CONTROL_EDIT_DYNAMIC_RULE_REQUEST: string =\n \"ACCESS_CONTROL/EDIT/DYNAMIC_RULE/REQUEST\";\nexport const ACCESS_CONTROL_EDIT_DYNAMIC_RULE_SUCCESS: string =\n \"ACCESS_CONTROL/EDIT/DYNAMIC_RULE/SUCCESS\";\nexport const ACCESS_CONTROL_EDIT_DYNAMIC_RULE_FAILURE: string =\n \"ACCESS_CONTROL/EDIT/DYNAMIC_RULE/FAILURE\";\nexport const accessControlEditDynamicRule = createAction(\n ACCESS_CONTROL_EDIT_DYNAMIC_RULE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const accessControlEditDynamicRuleRequest = createAction(\n ACCESS_CONTROL_EDIT_DYNAMIC_RULE_REQUEST\n);\nexport const accessControlEditDynamicRuleSuccess = createAction(\n ACCESS_CONTROL_EDIT_DYNAMIC_RULE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const accessControlEditDynamicRuleFailure = createAction(\n ACCESS_CONTROL_EDIT_DYNAMIC_RULE_FAILURE\n);\n// Delete a Dynamic Rule\nexport const ACCESS_CONTROL_DELETE_DYNAMIC_RULE: string =\n \"ACCESS_CONTROL/DELETE/DYNAMIC_RULE\";\nexport const ACCESS_CONTROL_DELETE_DYNAMIC_RULE_REQUEST: string =\n \"ACCESS_CONTROL/DELETE/DYNAMIC_RULE/REQUEST\";\nexport const ACCESS_CONTROL_DELETE_DYNAMIC_RULE_SUCCESS: string =\n \"ACCESS_CONTROL/DELETE/DYNAMIC_RULE/SUCCESS\";\nexport const ACCESS_CONTROL_DELETE_DYNAMIC_RULE_FAILURE: string =\n \"ACCESS_CONTROL/DELETE/DYNAMIC_RULE/FAILURE\";\nexport const accessControlDeleteDynamicRule = createAction(\n ACCESS_CONTROL_DELETE_DYNAMIC_RULE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const accessControlDeleteDynamicRuleRequest = createAction(\n ACCESS_CONTROL_DELETE_DYNAMIC_RULE_REQUEST\n);\nexport const accessControlDeleteDynamicRuleSuccess = createAction(\n ACCESS_CONTROL_DELETE_DYNAMIC_RULE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const accessControlDeleteDynamicRuleFailure = createAction(\n ACCESS_CONTROL_DELETE_DYNAMIC_RULE_FAILURE\n);\n","import { createAction } from \"deox\";\n\n// Actions for Account (My) Settings\n\nexport const ACCOUNT_SETTINGS_UPDATE_SETTING_NAME: string =\n \"ACCOUNT_SETTINGS/UPDATE/SETTING_NAME\";\nexport const accountSettingsUpdateSettingName = createAction(\n ACCOUNT_SETTINGS_UPDATE_SETTING_NAME,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const ACCOUNT_SETTINGS_UPDATE_APP_NEW_FEATURES: string =\n \"ACCOUNT_SETTINGS/UPDATE/APP_NEW_FEATURES\";\nexport const accountSettingsUpdateAppNewFeatures = createAction(\n ACCOUNT_SETTINGS_UPDATE_APP_NEW_FEATURES,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const ACCOUNT_SETTINGS_UPDATE_FRONTEND_PERSONALIZATION: string =\n \"ACCOUNT_SETTINGS/UPDATE/FRONTEND_PERSONALIZATION\";\nexport const accountSettingsUpdateFrontendPersonalization = createAction(\n ACCOUNT_SETTINGS_UPDATE_FRONTEND_PERSONALIZATION,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const ACCOUNT_SETTINGS_RESET_FRONTEND_PERSONALIZATION: string =\n \"ACCOUNT_SETTINGS/RESET/FRONTEND_PERSONALIZATION\";\nexport const accountSettingsResetFrontendPersonalization = createAction(\n ACCOUNT_SETTINGS_RESET_FRONTEND_PERSONALIZATION,\n (resolve) => (payload?: object) => resolve(payload)\n);\n\n// Fetch My Settings\nexport const ACCOUNT_SETTINGS_FETCH: string = \"ACCOUNT_SETTINGS/FETCH\";\nexport const ACCOUNT_SETTINGS_FETCH_REQUEST: string =\n \"ACCOUNT_SETTINGS/FETCH/REQUEST\";\nexport const ACCOUNT_SETTINGS_FETCH_SUCCESS: string =\n \"ACCOUNT_SETTINGS/FETCH/SUCCESS\";\nexport const ACCOUNT_SETTINGS_FETCH_FAILURE: string =\n \"ACCOUNT_SETTINGS/FETCH/FAILURE\";\nexport const accountSettingsFetchMySettings = createAction(\n ACCOUNT_SETTINGS_FETCH,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const accountSettingsFetchMySettingsRequest = createAction(\n ACCOUNT_SETTINGS_FETCH_REQUEST\n);\nexport const accountSettingsFetchMySettingsSuccess = createAction(\n ACCOUNT_SETTINGS_FETCH_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const accountSettingsFetchMySettingsFailure = createAction(\n ACCOUNT_SETTINGS_FETCH_FAILURE\n);\n\n// Edit My Settings\nexport const ACCOUNT_SETTINGS_EDIT: string = \"ACCOUNT_SETTINGS/EDIT\";\nexport const ACCOUNT_SETTINGS_EDIT_REQUEST: string =\n \"ACCOUNT_SETTINGS/EDIT/REQUEST\";\nexport const ACCOUNT_SETTINGS_EDIT_SUCCESS: string =\n \"ACCOUNT_SETTINGS/EDIT/SUCCESS\";\nexport const ACCOUNT_SETTINGS_EDIT_FAILURE: string =\n \"ACCOUNT_SETTINGS/EDIT/FAILURE\";\nexport const ACCOUNT_SETTINGS_EDIT_DONE: string = \"ACCOUNT_SETTINGS/EDIT/DONE\";\nexport const accountSettingsEditMySettings = createAction(\n ACCOUNT_SETTINGS_EDIT,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const accountSettingsEditMySettingsRequest = createAction(\n ACCOUNT_SETTINGS_EDIT_REQUEST\n);\nexport const accountSettingsEditMySettingsSuccess = createAction(\n ACCOUNT_SETTINGS_EDIT_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const accountSettingsEditMySettingsFailure = createAction(\n ACCOUNT_SETTINGS_EDIT_FAILURE\n);\nexport const accountSettingsEditMySettingsDone = createAction(\n ACCOUNT_SETTINGS_EDIT_DONE\n);\n","import { createAction } from \"deox\";\n// Actions for API\n// Init Api\nexport const INIT_API: string = \"API/INIT_API\";\nexport const initAPI = createAction(\n INIT_API,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const ADD_CANCEL_TOKEN_API: string = \"API/ADD/CANCEL_TOKEN_API\";\nexport const addCancelTokenAPI = createAction(\n ADD_CANCEL_TOKEN_API,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const REMOVE_CANCEL_TOKEN_API: string = \"API/REMOVE/CANCEL_TOKEN_API\";\nexport const removeCancelTokenAPI = createAction(\n REMOVE_CANCEL_TOKEN_API,\n (resolve) => (payload?: object) => resolve(payload)\n);\n","import { createAction } from \"deox\";\n\n// Actions for AUTH (authorized user after sign in successfully)\n\n// Sign in into the App\nexport const AUTH_SIGNIN_APP: string = \"AUTH/SIGNIN/APP\";\nexport const AUTH_SIGNIN_REQUEST_APP: string = \"AUTH/SIGNIN/REQUEST/APP\";\nexport const AUTH_SIGNIN_SUCCESS_APP: string = \"AUTH/SIGNIN/SUCCESS/APP\";\nexport const AUTH_SIGNIN_FAILURE_APP: string = \"AUTH/SIGNIN/FAILURE/APP\";\nexport const authSignInApp = createAction(\n AUTH_SIGNIN_APP,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const authSignInRequestApp = createAction(AUTH_SIGNIN_REQUEST_APP);\nexport const authSignInSuccessApp = createAction(\n AUTH_SIGNIN_SUCCESS_APP,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const authSignInFailureApp = createAction(AUTH_SIGNIN_FAILURE_APP);\n\n// Switch Account into the app\nexport const AUTH_SWITCH_ACCOUNT: string = \"AUTH/SWITCH/ACCOUNT\";\nexport const AUTH_SWITCH_ACCOUNT_REQUEST_APP: string =\n \"AUTH/SWITCH/ACCOUNT/REQUEST/APP\";\nexport const AUTH_SWITCH_ACCOUNT_SUCCESS_APP: string =\n \"AUTH/SWITCH/ACCOUNT/SUCCESS/APP\";\nexport const AUTH_SWITCH_ACCOUNT_FAILURE_APP: string =\n \"AUTH/SWITCH/ACCOUNT/FAILURE/APP\";\nexport const authSwithcAccount = createAction(\n AUTH_SWITCH_ACCOUNT,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const authSwithcAccountRequest = createAction(\n AUTH_SWITCH_ACCOUNT_REQUEST_APP\n);\nexport const authSwithcAccountSuccess = createAction(\n AUTH_SWITCH_ACCOUNT_SUCCESS_APP\n);\nexport const authSwithcAccountFailure = createAction(\n AUTH_SWITCH_ACCOUNT_FAILURE_APP\n);\n\n// Update My account\nexport const AUTH_UPDATE_MY_USER_ACCOUNT: string =\n \"AUTH/UPDATE_MY_USER_ACCOUNT\";\nexport const AUTH_UPDATE_MY_USER_ACCOUNT_REQUEST: string =\n \"AUTH/UPDATE_MY_USER_ACCOUNT/REQUEST\";\nexport const AUTH_UPDATE_MY_USER_ACCOUNT_SUCCESS: string =\n \"AUTH/UPDATE_MY_USER_ACCOUNT/SUCCESS\";\nexport const AUTH_UPDATE_MY_USER_ACCOUNT_FAILURE: string =\n \"AUTH/UPDATE_MY_USER_ACCOUNT/FAILURE\";\nexport const authUpdateMyUserAccount = createAction(\n AUTH_UPDATE_MY_USER_ACCOUNT,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const authUpdateMyUserAccountRequest = createAction(\n AUTH_UPDATE_MY_USER_ACCOUNT_REQUEST\n);\nexport const authUpdateMyUserAccountSuccess = createAction(\n AUTH_UPDATE_MY_USER_ACCOUNT_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const authUpdateMyUserAccountFailure = createAction(\n AUTH_UPDATE_MY_USER_ACCOUNT_FAILURE\n);\n\n// Edit My Settings\nexport const AUTH_EDIT_MY_SETTINGS: string = \"AUTH/EDIT/MY_SETTINGS\";\nexport const AUTH_EDIT_MY_SETTINGS_REQUEST: string =\n \"AUTH/EDIT/MY_SETTINGS/REQUEST\";\nexport const AUTH_EDIT_MY_SETTINGS_SUCCESS: string =\n \"AUTH/EDIT/MY_SETTINGS/SUCCESS\";\nexport const AUTH_EDIT_MY_SETTINGS_FAILURE: string =\n \"AUTH/EDIT/MY_SETTINGS/FAILURE\";\nexport const authEditMySettings = createAction(\n AUTH_EDIT_MY_SETTINGS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const authEditMySettingsRequest = createAction(\n AUTH_EDIT_MY_SETTINGS_REQUEST\n);\nexport const authEditMySettingsSuccess = createAction(\n AUTH_EDIT_MY_SETTINGS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const authEditMySettingsFailure = createAction(\n AUTH_EDIT_MY_SETTINGS_FAILURE\n);\n\n// Fetch my Files\nexport const AUTH_FETCH_MY_FILES: string = \"AUTH/FETCH/MY_FILES\";\nexport const AUTH_FETCH_MY_FILES_REQUEST: string =\n \"AUTH/FETCH/MY_FILES/REQUEST\";\nexport const AUTH_FETCH_MY_FILES_SUCCESS: string =\n \"AUTH/FETCH/MY_FILES/SUCCESS\";\nexport const AUTH_FETCH_MY_FILES_FAILURE: string =\n \"AUTH/FETCH/MY_FILES/FAILURE\";\nexport const authFetchMyFiles = createAction(\n AUTH_FETCH_MY_FILES,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const authFetchMyFilesRequest = createAction(\n AUTH_FETCH_MY_FILES_REQUEST\n);\nexport const authFetchMyFilesSuccess = createAction(\n AUTH_FETCH_MY_FILES_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const authFetchMyFilesFailure = createAction(\n AUTH_FETCH_MY_FILES_FAILURE\n);\n\n// Fetch my Institution\nexport const AUTH_FETCH_MY_INSTITUTION: string = \"AUTH/FETCH/MY_INSTITUTION\";\nexport const AUTH_FETCH_MY_INSTITUTION_REQUEST: string =\n \"AUTH/FETCH/MY_INSTITUTION/REQUEST\";\nexport const AUTH_FETCH_MY_INSTITUTION_SUCCESS: string =\n \"AUTH/FETCH/MY_INSTITUTION/SUCCESS\";\nexport const AUTH_FETCH_MY_INSTITUTION_FAILURE: string =\n \"AUTH/FETCH/MY_INSTITUTION/FAILURE\";\nexport const authFetchMyInstitution = createAction(\n AUTH_FETCH_MY_INSTITUTION,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const authFetchMyInstitutionRequest = createAction(\n AUTH_FETCH_MY_INSTITUTION_REQUEST\n);\nexport const authFetchMyInstitutionSuccess = createAction(\n AUTH_FETCH_MY_INSTITUTION_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const authFetchMyInstitutionFailure = createAction(\n AUTH_FETCH_MY_INSTITUTION_FAILURE\n);\n\n// Session Expired\n// CHECK\nexport const AUTH_CHECK_SESSION_EXPIRED_APP: string =\n \"AUTH/CHECK/SESSION_EXPIRED/APP\";\nexport const authCheckSessionExpiredApp = createAction(\n AUTH_CHECK_SESSION_EXPIRED_APP,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// The session was espired\nexport const AUTH_SESSION_EXPIRED_APP: string = \"AUTH/SESSION_EXPIRED/APP\";\nexport const authSessionExpiredApp = createAction(AUTH_SESSION_EXPIRED_APP);\n\n// Sign out\nexport const AUTH_SIGNOUT_APP: string = \"AUTH/SIGNOUT/APP\";\nexport const AUTH_SIGNOUT_REQUEST_APP: string = \"AUTH/SIGNOUT/REQUEST/APP\";\nexport const AUTH_SIGNOUT_SUCCESS_APP: string = \"AUTH/SIGNOUT/SUCCESS/APP\";\nexport const AUTH_SIGNOUT_FAILURE_APP: string = \"AUTH/SIGNOUT/FAILURE/APP\";\nexport const authSignOutApp = createAction(\n AUTH_SIGNOUT_APP,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const authSignOutRequestApp = createAction(AUTH_SIGNOUT_REQUEST_APP);\nexport const authSignOutSuccessApp = createAction(AUTH_SIGNOUT_SUCCESS_APP);\nexport const authSignOutFailureApp = createAction(AUTH_SIGNOUT_FAILURE_APP);\n","import { createAction } from \"deox\";\n\n// Actions for Broadcast Messages\n\n// Fetch all Broadcast Messages\nexport const BROADCAST_MESSAGES_FETCH_MESSAGES: string =\n \"BROADCAST_MESSAGES/FETCH/BROADCAST_MESSAGES\";\nexport const BROADCAST_MESSAGES_FETCH_MESSAGES_REQUEST: string =\n \"BROADCAST_MESSAGES/FETCH/BROADCAST_MESSAGES/REQUEST\";\nexport const BROADCAST_MESSAGES_FETCH_MESSAGES_SUCCESS: string =\n \"BROADCAST_MESSAGES/FETCH/BROADCAST_MESSAGES/SUCCESS\";\nexport const BROADCAST_MESSAGES_FETCH_MESSAGES_FAILURE: string =\n \"BROADCAST_MESSAGES/FETCH/BROADCAST_MESSAGES/FAILURE\";\nexport const broadcastMessagesFetchMessages = createAction(\n BROADCAST_MESSAGES_FETCH_MESSAGES,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const broadcastMessagesFetchMessagesRequest = createAction(\n BROADCAST_MESSAGES_FETCH_MESSAGES_REQUEST\n);\nexport const broadcastMessagesFetchMessagesSuccess = createAction(\n BROADCAST_MESSAGES_FETCH_MESSAGES_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const broadcastMessagesFetchMessagesFailure = createAction(\n BROADCAST_MESSAGES_FETCH_MESSAGES_FAILURE\n);\n// Set/Save all Broadcast Messages\nexport const BROADCAST_MESSAGES_SET_MESSAGES: string =\n \"BROADCAST_MESSAGES/SET/MESSAGES\";\nexport const BROADCAST_MESSAGES_SAVE_MESSAGES: string =\n \"BROADCAST_MESSAGES/SAVE/MESSAGES\";\nexport const broadcastMessagesSetMessages = createAction(\n BROADCAST_MESSAGES_SET_MESSAGES,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const broadcastMessagesSaveMessages = createAction(\n BROADCAST_MESSAGES_SAVE_MESSAGES,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Create a Broadcast Message\nexport const BROADCAST_MESSAGES_CREATE: string = \"BROADCAST_MESSAGES/CREATE\";\nexport const BROADCAST_MESSAGES_CREATE_REQUEST: string =\n \"BROADCAST_MESSAGES/CREATE/REQUEST\";\nexport const BROADCAST_MESSAGES_CREATE_SUCCESS: string =\n \"BROADCAST_MESSAGES/CREATE/SUCCESS\";\nexport const BROADCAST_MESSAGES_CREATE_FAILURE: string =\n \"BROADCAST_MESSAGES/CREATE/FAILURE\";\nexport const broadcastMessagesCreate = createAction(\n BROADCAST_MESSAGES_CREATE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const broadcastMessagesCreateRequest = createAction(\n BROADCAST_MESSAGES_CREATE_REQUEST\n);\nexport const broadcastMessagesCreateSuccess = createAction(\n BROADCAST_MESSAGES_CREATE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const broadcastMessagesCreateFailure = createAction(\n BROADCAST_MESSAGES_CREATE_FAILURE\n);\n// Edit a Broadcast Message\nexport const BROADCAST_MESSAGES_EDIT: string = \"BROADCAST_MESSAGES/EDIT\";\nexport const BROADCAST_MESSAGES_EDIT_REQUEST: string =\n \"BROADCAST_MESSAGES/EDIT/REQUEST\";\nexport const BROADCAST_MESSAGES_EDIT_SUCCESS: string =\n \"BROADCAST_MESSAGES/EDIT/SUCCESS\";\nexport const BROADCAST_MESSAGES_EDIT_FAILURE: string =\n \"BROADCAST_MESSAGES/EDIT/FAILURE\";\nexport const broadcastMessagesEdit = createAction(\n BROADCAST_MESSAGES_EDIT,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const broadcastMessagesEditRequest = createAction(\n BROADCAST_MESSAGES_EDIT_REQUEST\n);\nexport const broadcastMessagesEditSuccess = createAction(\n BROADCAST_MESSAGES_EDIT_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const broadcastMessagesEditFailure = createAction(\n BROADCAST_MESSAGES_EDIT_FAILURE\n);\n// Delete a Broadcast Message\nexport const BROADCAST_MESSAGES_DELETE: string = \"BROADCAST_MESSAGES/DELETE\";\nexport const BROADCAST_MESSAGES_DELETE_REQUEST: string =\n \"BROADCAST_MESSAGES/DELETE/REQUEST\";\nexport const BROADCAST_MESSAGES_DELETE_SUCCESS: string =\n \"BROADCAST_MESSAGES/DELETE/SUCCESS\";\nexport const BROADCAST_MESSAGES_DELETE_FAILURE: string =\n \"BROADCAST_MESSAGES/DELETE/FAILURE\";\nexport const broadcastMessagesDelete = createAction(\n BROADCAST_MESSAGES_DELETE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const broadcastMessagesDeleteRequest = createAction(\n BROADCAST_MESSAGES_DELETE_REQUEST\n);\nexport const broadcastMessagesDeleteSuccess = createAction(\n BROADCAST_MESSAGES_DELETE_SUCCESS\n);\nexport const broadcastMessagesDeleteFailure = createAction(\n BROADCAST_MESSAGES_DELETE_FAILURE\n);\n","import { createAction } from \"deox\";\n// Actions for Camera Device\n// SHOW WARNING MESSAGE\nexport const CAMERA_DEVICE_SHOW_WARNING_MSG: string =\n \"CAMERA_DEVICE/SHOW_WARNING_MSG\";\nexport const cameraDeviceShowWarningMsg = createAction(\n CAMERA_DEVICE_SHOW_WARNING_MSG\n);\n// HIDE WARNING MESSAGE\nexport const CAMERA_DEVICE_HIDE_WARNING_MSG: string =\n \"CAMERA_DEVICE/HIDE_WARNING_MSG\";\nexport const cameraDeviceHideWarningMsg = createAction(\n CAMERA_DEVICE_HIDE_WARNING_MSG\n);\n","import { createAction } from \"deox\";\n\n// Actions for Case Logs\n// Fetch all case logs\nexport const CASELOGS_FETCH_ALL: string = \"CASELOGS/FETCH/ALL\";\nexport const CASELOGS_FETCH_ALL_REQUEST: string = \"CASELOGS/FETCH/ALL/REQUEST\";\nexport const CASELOGS_FETCH_ALL_SUCCESS: string = \"CASELOGS/FETCH/ALL/SUCCESS\";\nexport const CASELOGS_FETCH_ALL_FAILURE: string = \"CASELOGS/FETCH/ALL/FAILURE\";\nexport const caseLogsFetchAll = createAction(\n CASELOGS_FETCH_ALL,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const caseLogsFetchAllRequest = createAction(CASELOGS_FETCH_ALL_REQUEST);\nexport const caseLogsFetchAllSuccess = createAction(\n CASELOGS_FETCH_ALL_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const caseLogsFetchAllFailure = createAction(CASELOGS_FETCH_ALL_FAILURE);\n// Fetch Case Logs KPIS\nexport const CASELOGS_FETCH_KPIS: string = \"CASELOGS/FETCH/KPIS\";\nexport const CASELOGS_FETCH_KPIS_REQUEST: string =\n \"CASELOGS/FETCH/KPIS/REQUEST\";\nexport const CASELOGS_FETCH_KPIS_SUCCESS: string =\n \"CASELOGS/FETCH/KPIS/SUCCESS\";\nexport const CASELOGS_FETCH_KPIS_FAILURE: string =\n \"CASELOGS/FETCH/KPIS/FAILURE\";\nexport const caseLogsFetchKpis = createAction(\n CASELOGS_FETCH_KPIS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const caseLogsFetchKpisRequest = createAction(\n CASELOGS_FETCH_KPIS_REQUEST\n);\nexport const caseLogsFetchKpisSuccess = createAction(\n CASELOGS_FETCH_KPIS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const caseLogsFetchKpisFailure = createAction(\n CASELOGS_FETCH_KPIS_FAILURE,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Create a Case log\nexport const CASELOGS_CREATE: string = \"CASELOGS/CREATE\";\nexport const CASELOGS_CREATE_REQUEST: string = \"CASELOGS/CREATE/REQUEST\";\nexport const CASELOGS_CREATE_SUCCESS: string = \"CASELOGS/CREATE/SUCCESS\";\nexport const CASELOGS_CREATE_FAILURE: string = \"CASELOGS/CREATE/FAILURE\";\nexport const caseLogsCreate = createAction(\n CASELOGS_CREATE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const caseLogsCreateRequest = createAction(CASELOGS_CREATE_REQUEST);\nexport const caseLogsCreateSuccess = createAction(\n CASELOGS_CREATE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const caseLogsCreateFailure = createAction(CASELOGS_CREATE_FAILURE);\n// Create a Dummy Case log\nexport const CASELOGS_CREATE_DUMMY: string = \"CASELOGS/CREATE_DUMMY\";\nexport const CASELOGS_CREATE_DUMMY_REQUEST: string =\n \"CASELOGS/CREATE_DUMMY/REQUEST\";\nexport const CASELOGS_CREATE_DUMMY_SUCCESS: string =\n \"CASELOGS/CREATE_DUMMY/SUCCESS\";\nexport const CASELOGS_CREATE_DUMMY_FAILURE: string =\n \"CASELOGS/CREATE_DUMMY/FAILURE\";\nexport const caseLogsCreateDummy = createAction(\n CASELOGS_CREATE_DUMMY,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const caseLogsCreateDummyRequest = createAction(\n CASELOGS_CREATE_DUMMY_REQUEST\n);\nexport const caseLogsCreateDummySuccess = createAction(\n CASELOGS_CREATE_DUMMY_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const caseLogsCreateDummyFailure = createAction(\n CASELOGS_CREATE_DUMMY_FAILURE\n);\n// Set caseLogId to Fetch this case log\nexport const CASELOGS_SET_CASELOGID: string = \"CASELOGS/SET/CASELOGID\";\nexport const caseLogsSetcaseLogId = createAction(\n CASELOGS_SET_CASELOGID,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Unset caseLogId\nexport const CASELOGS_UNSET_CASELOGID: string = \"CASELOGS/UNSET/CASELOGID\";\nexport const caseLogsUnsetcaseLogId = createAction(\n CASELOGS_UNSET_CASELOGID,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Fetch a Case log\nexport const CASELOGS_FETCH_CASELOG: string = \"CASELOGS/FETCH/CASELOG\";\nexport const CASELOGS_FETCH_CASELOG_REQUEST: string =\n \"CASELOGS/FETCH/CASELOG/REQUEST\";\nexport const CASELOGS_FETCH_CASELOG_SUCCESS: string =\n \"CASELOGS/FETCH/CASELOG/SUCCESS\";\nexport const CASELOGS_FETCH_CASELOG_FAILURE: string =\n \"CASELOGS/FETCH/CASELOG/FAILURE\";\nexport const caseLogsFetchCaseLog = createAction(\n CASELOGS_FETCH_CASELOG,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const caseLogsFetchCaseLogRequest = createAction(\n CASELOGS_FETCH_CASELOG_REQUEST\n);\nexport const caseLogsFetchCaseLogSuccess = createAction(\n CASELOGS_FETCH_CASELOG_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const caseLogsFetchCaseLogFailure = createAction(\n CASELOGS_FETCH_CASELOG_FAILURE\n);\n// Edit Case log\nexport const CASELOGS_EDIT: string = \"CASELOGS/EDIT\";\nexport const CASELOGS_EDIT_REQUEST: string = \"CASELOGS/EDIT/REQUEST\";\nexport const CASELOGS_EDIT_SUCCESS: string = \"CASELOGS/EDIT/SUCCESS\";\nexport const CASELOGS_EDIT_FAILURE: string = \"CASELOGS/EDIT/FAILURE\";\nexport const caseLogsEdit = createAction(\n CASELOGS_EDIT,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const caseLogsEditRequest = createAction(CASELOGS_EDIT_REQUEST);\nexport const caseLogsEditSuccess = createAction(\n CASELOGS_EDIT_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const caseLogsEditFailure = createAction(CASELOGS_EDIT_FAILURE);\n// Delete Case Log\nexport const CASELOGS_DELETE: string = \"CASELOGS/DELETE\";\nexport const CASELOGS_DELETE_REQUEST: string = \"CASELOGS/DELETE/REQUEST\";\nexport const CASELOGS_DELETE_SUCCESS: string = \"CASELOGS/DELETE/SUCCESS\";\nexport const CASELOGS_DELETE_FAILURE: string = \"CASELOGS/DELETE/FAILURE\";\nexport const caseLogsDelete = createAction(\n CASELOGS_DELETE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const caseLogsDeleteRequest = createAction(CASELOGS_DELETE_REQUEST);\nexport const caseLogsDeleteSuccess = createAction(\n CASELOGS_DELETE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const caseLogsDeleteFailure = createAction(CASELOGS_DELETE_FAILURE);\n// Review Case log\nexport const CASELOGS_REVIEW: string = \"CASELOGS/REVIEW\";\nexport const CASELOGS_REVIEW_REQUEST: string = \"CASELOGS/REVIEW/REQUEST\";\nexport const CASELOGS_REVIEW_SUCCESS: string = \"CASELOGS/REVIEW/SUCCESS\";\nexport const CASELOGS_REVIEW_FAILURE: string = \"CASELOGS/REVIEW/FAILURE\";\nexport const caseLogsReview = createAction(\n CASELOGS_REVIEW,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const caseLogsReviewRequest = createAction(CASELOGS_REVIEW_REQUEST);\nexport const caseLogsReviewSuccess = createAction(\n CASELOGS_REVIEW_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const caseLogsReviewFailure = createAction(CASELOGS_REVIEW_FAILURE);\n// Reset Case log Loaded\nexport const CASELOGS_RESET_CASELOG_LOADED: string =\n \"CASELOGS/RESET/CASELOG_LOADED\";\nexport const caseLogsResetCaseLogsLoaded = createAction(\n CASELOGS_RESET_CASELOG_LOADED,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Create or Edit Update\nexport const CASELOGS_CREATE_EDIT_UPDATE: string =\n \"CASELOGS/CREATE_EDIT/UPDATE\";\nexport const caseLogsCreateEditUpdate = createAction(\n CASELOGS_CREATE_EDIT_UPDATE,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Create or Edit Next step\nexport const CASELOGS_CREATE_EDIT_STEP: string = \"CASELOGS/CREATE_EDIT/STEP\";\nexport const caseLogsCreateEditStep = createAction(\n CASELOGS_CREATE_EDIT_STEP,\n (resolve) => (payload?: object) => resolve(payload)\n);\n","import { createAction } from \"deox\";\n\n// Actions for Cohorts\n\n// Fetch all Cohorts\nexport const COHORTS_FETCH_COHORTS: string = \"COHORTS/FETCH/COHORTS\";\nexport const COHORTS_FETCH_COHORTS_REQUEST: string =\n \"COHORTS/FETCH/COHORTS/REQUEST\";\nexport const COHORTS_FETCH_COHORTS_SUCCESS: string =\n \"COHORTS/FETCH/COHORTS/SUCCESS\";\nexport const COHORTS_FETCH_COHORTS_FAILURE: string =\n \"COHORTS/FETCH/COHORTS/FAILURE\";\nexport const cohortsFetchCohorts = createAction(\n COHORTS_FETCH_COHORTS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const cohortsFetchCohortsRequest = createAction(\n COHORTS_FETCH_COHORTS_REQUEST\n);\nexport const cohortsFetchCohortsSuccess = createAction(\n COHORTS_FETCH_COHORTS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const cohortsFetchCohortsFailure = createAction(\n COHORTS_FETCH_COHORTS_FAILURE\n);\n// Create a Cohort\nexport const COHORTS_CREATE: string = \"COHORTS/CREATE\";\nexport const COHORTS_CREATE_REQUEST: string = \"COHORTS/CREATE/REQUEST\";\nexport const COHORTS_CREATE_SUCCESS: string = \"COHORTS/CREATE/SUCCESS\";\nexport const COHORTS_CREATE_FAILURE: string = \"COHORTS/CREATE/FAILURE\";\nexport const cohortsCreate = createAction(\n COHORTS_CREATE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const cohortsCreateRequest = createAction(COHORTS_CREATE_REQUEST);\nexport const cohortsCreateSuccess = createAction(\n COHORTS_CREATE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const cohortsCreateFailure = createAction(COHORTS_CREATE_FAILURE);\n// Edit a Cohort\nexport const COHORTS_EDIT_COHORT: string = \"COHORTS/EDIT/COHORT\";\nexport const COHORTS_EDIT_COHORT_REQUEST: string =\n \"COHORTS/EDIT/COHORT/REQUEST\";\nexport const COHORTS_EDIT_COHORT_SUCCESS: string =\n \"COHORTS/EDIT/COHORT/SUCCESS\";\nexport const COHORTS_EDIT_COHORT_FAILURE: string =\n \"COHORTS/EDIT/COHORT/FAILURE\";\nexport const cohortsEditCohort = createAction(\n COHORTS_EDIT_COHORT,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const cohortsEditCohortRequest = createAction(\n COHORTS_EDIT_COHORT_REQUEST\n);\nexport const cohortsEditCohortSuccess = createAction(\n COHORTS_EDIT_COHORT_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const cohortsEditCohortFailure = createAction(\n COHORTS_EDIT_COHORT_FAILURE\n);\n// Delete a Cohort\nexport const COHORTS_DELETE: string = \"COHORTS/DELETE\";\nexport const COHORTS_DELETE_REQUEST: string = \"COHORTS/DELETE/REQUEST\";\nexport const COHORTS_DELETE_SUCCESS: string = \"COHORTS/DELETE/SUCCESS\";\nexport const COHORTS_DELETE_FAILURE: string = \"COHORTS/DELETE/FAILURE\";\nexport const cohortsDelete = createAction(\n COHORTS_DELETE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const cohortsDeleteRequest = createAction(COHORTS_DELETE_REQUEST);\nexport const cohortsDeleteSuccess = createAction(\n COHORTS_DELETE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const cohortsDeleteFailure = createAction(COHORTS_DELETE_FAILURE);\n","import { createAction } from \"deox\";\n\n// Actions for company\n\n// Fetch Company\nexport const COMPANY_FETCH_COMPANY: string = \"COMPANY/FETCH/COMPANY\";\nexport const COMPANY_FETCH_COMPANY_REQUEST: string =\n \"COMPANY/FETCH/COMPANY/REQUEST\";\nexport const COMPANY_FETCH_COMPANY_SUCCESS: string =\n \"COMPANY/FETCH/COMPANY/SUCCESS\";\nexport const COMPANY_FETCH_COMPANY_FAILURE: string =\n \"COMPANY/FETCH/COMPANY/FAILURE\";\nexport const companyFetchCompany = createAction(\n COMPANY_FETCH_COMPANY,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const companyFetchCompanyRequest = createAction(\n COMPANY_FETCH_COMPANY_REQUEST\n);\nexport const companyFetchCompanySuccess = createAction(\n COMPANY_FETCH_COMPANY_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const companyFetchCompanyFailure = createAction(\n COMPANY_FETCH_COMPANY_FAILURE\n);\n// Edit Company\nexport const COMPANY_EDIT_COMPANY: string = \"COMPANY/EDIT/COMPANY\";\nexport const COMPANY_EDIT_COMPANY_REQUEST: string =\n \"COMPANY/EDIT/COMPANY/REQUEST\";\nexport const COMPANY_EDIT_COMPANY_SUCCESS: string =\n \"COMPANY/EDIT/COMPANY/SUCCESS\";\nexport const COMPANY_EDIT_COMPANY_FAILURE: string =\n \"COMPANY/EDIT/COMPANY/FAILURE\";\nexport const companyEditCompany = createAction(\n COMPANY_EDIT_COMPANY,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const companyEditCompanyRequest = createAction(\n COMPANY_EDIT_COMPANY_REQUEST\n);\nexport const companyEditCompanySuccess = createAction(\n COMPANY_EDIT_COMPANY_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const companyEditCompanyFailure = createAction(\n COMPANY_EDIT_COMPANY_FAILURE\n);\n// Fetch Company Files\nexport const COMPANY_FETCH_COMPANY_FILES: string =\n \"COMPANY/FETCH/COMPANY_FILES\";\nexport const COMPANY_FETCH_COMPANY_FILES_REQUEST: string =\n \"COMPANY/FETCH/COMPANY_FILES/REQUEST\";\nexport const COMPANY_FETCH_COMPANY_FILES_SUCCESS: string =\n \"COMPANY/FETCH/COMPANY_FILES/SUCCESS\";\nexport const COMPANY_FETCH_COMPANY_FILES_FAILURE: string =\n \"COMPANY/FETCH/COMPANY_FILES/FAILURE\";\nexport const companyFetchCompanyFiles = createAction(\n COMPANY_FETCH_COMPANY_FILES,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const companyFetchCompanyFilesRequest = createAction(\n COMPANY_FETCH_COMPANY_FILES_REQUEST\n);\nexport const companyFetchCompanyFilesSuccess = createAction(\n COMPANY_FETCH_COMPANY_FILES_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const companyFetchCompanyFilesFailure = createAction(\n COMPANY_FETCH_COMPANY_FILES_FAILURE\n);\n\n// Fetch all Company Files Expired\nexport const COMPANY_FETCH_COMPANY_FILES_EXPIRED: string =\n \"COMPANY/FETCH/COMPANY_FILES_EXPIRED\";\nexport const COMPANY_FETCH_COMPANY_FILES_EXPIRED_REQUEST: string =\n \"COMPANY/FETCH/COMPANY_FILES_EXPIRED/REQUEST\";\nexport const COMPANY_FETCH_COMPANY_FILES_EXPIRED_SUCCESS: string =\n \"COMPANY/FETCH/COMPANY_FILES_EXPIRED/SUCCESS\";\nexport const COMPANY_FETCH_COMPANY_FILES_EXPIRED_FAILURE: string =\n \"COMPANY/FETCH/COMPANY_FILES_EXPIRED/FAILURE\";\nexport const companyFetchCompanyFilesExpired = createAction(\n COMPANY_FETCH_COMPANY_FILES_EXPIRED,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const companyFetchCompanyFilesExpiredRequest = createAction(\n COMPANY_FETCH_COMPANY_FILES_EXPIRED_REQUEST\n);\nexport const companyFetchCompanyFilesExpiredSuccess = createAction(\n COMPANY_FETCH_COMPANY_FILES_EXPIRED_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const companyFetchCompanyFilesExpiredFailure = createAction(\n COMPANY_FETCH_COMPANY_FILES_EXPIRED_FAILURE\n);\n// Upload Company Files\nexport const COMPANY_UPLOAD_COMPANY_FILES: string =\n \"COMPANY/UPLOAD/COMPANY_FILES\";\nexport const COMPANY_UPLOAD_COMPANY_FILES_REQUEST: string =\n \"COMPANY/UPLOAD/COMPANY_FILES/REQUEST\";\nexport const COMPANY_UPLOAD_COMPANY_FILES_SUCCESS: string =\n \"COMPANY/UPLOAD/COMPANY_FILES/SUCCESS\";\nexport const COMPANY_UPLOAD_COMPANY_FILES_FAILURE: string =\n \"COMPANY/UPLOAD/COMPANY_FILES/FAILURE\";\nexport const companyUploadCompanyFiles = createAction(\n COMPANY_UPLOAD_COMPANY_FILES,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const companyUploadCompanyFilesRequest = createAction(\n COMPANY_UPLOAD_COMPANY_FILES_REQUEST\n);\nexport const companyUploadCompanyFilesSuccess = createAction(\n COMPANY_UPLOAD_COMPANY_FILES_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const companyUploadCompanyFilesFailure = createAction(\n COMPANY_UPLOAD_COMPANY_FILES_FAILURE\n);\n","import { createAction } from \"deox\";\n\n// Actions for Custom Fields\n\n// Fetch all Custom Fields\nexport const CUSTOM_FIELDS_FETCH_CUSTOM_FIELDS: string =\n \"CUSTOM_FIELDS/FETCH/CUSTOM_FIELDS\";\nexport const CUSTOM_FIELDS_FETCH_CUSTOM_FIELDS_REQUEST: string =\n \"CUSTOM_FIELDS/FETCH/CUSTOM_FIELDS/REQUEST\";\nexport const CUSTOM_FIELDS_FETCH_CUSTOM_FIELDS_SUCCESS: string =\n \"CUSTOM_FIELDS/FETCH/CUSTOM_FIELDS/SUCCESS\";\nexport const CUSTOM_FIELDS_FETCH_CUSTOM_FIELDS_FAILURE: string =\n \"CUSTOM_FIELDS/FETCH/CUSTOM_FIELDS/FAILURE\";\nexport const customFieldsFetchCustomFields = createAction(\n CUSTOM_FIELDS_FETCH_CUSTOM_FIELDS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const customFieldsFetchCustomFieldsRequest = createAction(\n CUSTOM_FIELDS_FETCH_CUSTOM_FIELDS_REQUEST\n);\nexport const customFieldsFetchCustomFieldsSuccess = createAction(\n CUSTOM_FIELDS_FETCH_CUSTOM_FIELDS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const customFieldsFetchCustomFieldsFailure = createAction(\n CUSTOM_FIELDS_FETCH_CUSTOM_FIELDS_FAILURE\n);\n// Create a Custom Field\nexport const CUSTOM_FIELDS_CREATE: string = \"CUSTOM_FIELDS/CREATE\";\nexport const CUSTOM_FIELDS_CREATE_REQUEST: string =\n \"CUSTOM_FIELDS/CREATE/REQUEST\";\nexport const CUSTOM_FIELDS_CREATE_SUCCESS: string =\n \"CUSTOM_FIELDS/CREATE/SUCCESS\";\nexport const CUSTOM_FIELDS_CREATE_FAILURE: string =\n \"CUSTOM_FIELDS/CREATE/FAILURE\";\nexport const customFieldsCreate = createAction(\n CUSTOM_FIELDS_CREATE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const customFieldsCreateRequest = createAction(\n CUSTOM_FIELDS_CREATE_REQUEST\n);\nexport const customFieldsCreateSuccess = createAction(\n CUSTOM_FIELDS_CREATE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const customFieldsCreateFailure = createAction(\n CUSTOM_FIELDS_CREATE_FAILURE\n);\n// Edit a Custom Field\nexport const CUSTOM_FIELDS_EDIT_FIELD: string =\n \"CUSTOM_FIELDS/EDIT/CUSTOM_FIELD\";\nexport const CUSTOM_FIELDS_EDIT_FIELD_REQUEST: string =\n \"CUSTOM_FIELDS/EDIT/CUSTOM_FIELD/REQUEST\";\nexport const CUSTOM_FIELDS_EDIT_FIELD_SUCCESS: string =\n \"CUSTOM_FIELDS/EDIT/CUSTOM_FIELD/SUCCESS\";\nexport const CUSTOM_FIELDS_EDIT_FIELD_FAILURE: string =\n \"CUSTOM_FIELDS/EDIT/CUSTOM_FIELD/FAILURE\";\nexport const customFieldsEditField = createAction(\n CUSTOM_FIELDS_EDIT_FIELD,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const customFieldsEditFieldRequest = createAction(\n CUSTOM_FIELDS_EDIT_FIELD_REQUEST\n);\nexport const customFieldsEditFieldSuccess = createAction(\n CUSTOM_FIELDS_EDIT_FIELD_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const customFieldsEditFieldFailure = createAction(\n CUSTOM_FIELDS_EDIT_FIELD_FAILURE\n);\n// Delete a Custom Field\nexport const CUSTOM_FIELDS_DELETE_FIELD: string =\n \"CUSTOM_FIELDS/DELETE/CUSTOM_FIELD\";\nexport const CUSTOM_FIELDS_DELETE_FIELD_REQUEST: string =\n \"CUSTOM_FIELDS/DELETE/CUSTOM_FIELD/REQUEST\";\nexport const CUSTOM_FIELDS_DELETE_FIELD_SUCCESS: string =\n \"CUSTOM_FIELDS/DELETE/CUSTOM_FIELD/SUCCESS\";\nexport const CUSTOM_FIELDS_DELETE_FIELD_FAILURE: string =\n \"CUSTOM_FIELDS/DELETE/CUSTOM_FIELD/FAILURE\";\nexport const customFieldsDeleteField = createAction(\n CUSTOM_FIELDS_DELETE_FIELD,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const customFieldsDeleteFieldRequest = createAction(\n CUSTOM_FIELDS_DELETE_FIELD_REQUEST\n);\nexport const customFieldsDeleteFieldSuccess = createAction(\n CUSTOM_FIELDS_DELETE_FIELD_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const customFieldsDeleteFieldFailure = createAction(\n CUSTOM_FIELDS_DELETE_FIELD_FAILURE\n);\n\n// Edit a Custom Field\nexport const CUSTOM_FIELDS_REQUIRED_TRIGER_ANIMATION: string =\n \"CUSTOM_FIELDS/REQUIRED/TRIGER_ANIMATION\";\nexport const customFieldsRequiredTriggerAnimation = createAction(\n CUSTOM_FIELDS_REQUIRED_TRIGER_ANIMATION\n);\n","import { createAction } from \"deox\";\n\n// Actions for Enrollment\n\n// STUDENTS ENROLLMENTS ACTION\n// Fetch all Student Enrollments\nexport const STUDENTS_ENROLLMENTS_FETCH: string = \"STUDENT_ENROLLMENTS/FETCH\";\nexport const STUDENTS_ENROLLMENTS_FETCH_REQUEST: string =\n \"STUDENT_ENROLLMENTS/FETCH/REQUEST\";\nexport const STUDENTS_ENROLLMENTS_FETCH_SUCCESS: string =\n \"STUDENT_ENROLLMENTS/FETCH/SUCCESS\";\nexport const STUDENTS_ENROLLMENTS_FETCH_FAILURE: string =\n \"STUDENT_ENROLLMENTS/FETCH/FAILURE\";\nexport const studentEnrollmentsFetch = createAction(\n STUDENTS_ENROLLMENTS_FETCH,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const studentEnrollmentsFetchRequest = createAction(\n STUDENTS_ENROLLMENTS_FETCH_REQUEST\n);\nexport const studentEnrollmentsFetchSuccess = createAction(\n STUDENTS_ENROLLMENTS_FETCH_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const studentEnrollmentsFetchFailure = createAction(\n STUDENTS_ENROLLMENTS_FETCH_FAILURE\n);\n// Create a Student Enrollment\nexport const STUDENT_ENROLLMENT_CREATE: string = \"STUDENT_ENROLLMENT/CREATE\";\nexport const STUDENT_ENROLLMENT_CREATE_REQUEST: string =\n \"STUDENT_ENROLLMENT/CREATE/REQUEST\";\nexport const STUDENT_ENROLLMENT_CREATE_SUCCESS: string =\n \"STUDENT_ENROLLMENT/CREATE/SUCCESS\";\nexport const STUDENT_ENROLLMENT_CREATE_FAILURE: string =\n \"STUDENT_ENROLLMENT/CREATE/FAILURE\";\nexport const studentEnrollmentCreate = createAction(\n STUDENT_ENROLLMENT_CREATE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const studentEnrollmentCreateRequest = createAction(\n STUDENT_ENROLLMENT_CREATE_REQUEST\n);\nexport const studentEnrollmentCreateSuccess = createAction(\n STUDENT_ENROLLMENT_CREATE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const studentEnrollmentCreateFailure = createAction(\n STUDENT_ENROLLMENT_CREATE_FAILURE\n);\n// Edit a Student Enrollment\nexport const STUDENT_ENROLLMENT_EDIT: string = \"STUDENT_ENROLLMENT/EDIT\";\nexport const STUDENT_ENROLLMENT_EDIT_REQUEST: string =\n \"STUDENT_ENROLLMENT/EDIT/REQUEST\";\nexport const STUDENT_ENROLLMENT_EDIT_SUCCESS: string =\n \"STUDENT_ENROLLMENT/EDIT/SUCCESS\";\nexport const STUDENT_ENROLLMENT_EDIT_FAILURE: string =\n \"STUDENT_ENROLLMENT/EDIT/FAILURE\";\nexport const studentEnrollmentEdit = createAction(\n STUDENT_ENROLLMENT_EDIT,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const studentEnrollmentEditRequest = createAction(\n STUDENT_ENROLLMENT_EDIT_REQUEST\n);\nexport const studentEnrollmentEditSuccess = createAction(\n STUDENT_ENROLLMENT_EDIT_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const studentEnrollmentEditFailure = createAction(\n STUDENT_ENROLLMENT_EDIT_FAILURE\n);\n// Delete a Student Enrollment\nexport const STUDENT_ENROLLMENT_DELETE: string = \"STUDENT_ENROLLMENTS/DELETE\";\nexport const STUDENT_ENROLLMENT_DELETE_REQUEST: string =\n \"STUDENT_ENROLLMENTS/DELETE/REQUEST\";\nexport const STUDENT_ENROLLMENT_DELETE_SUCCESS: string =\n \"STUDENT_ENROLLMENTS/DELETE/SUCCESS\";\nexport const STUDENT_ENROLLMENT_DELETE_FAILURE: string =\n \"STUDENT_ENROLLMENTS/DELETE/FAILURE\";\nexport const studentEnrollmentDelete = createAction(\n STUDENT_ENROLLMENT_DELETE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const studentEnrollmentDeleteRequest = createAction(\n STUDENT_ENROLLMENT_DELETE_REQUEST\n);\nexport const studentEnrollmentDeleteSuccess = createAction(\n STUDENT_ENROLLMENT_DELETE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const studentEnrollmentDeleteFailure = createAction(\n STUDENT_ENROLLMENT_DELETE_FAILURE\n);\n","import { createAction } from \"deox\";\n// Actions for Evaluations\n// Set evaluationSchedulersTab to Get propely evaluation schedulers list\nexport const EVALUATIONS_SET_TAB_SELECTED: string =\n \"EVALUATIONS_/SET/TAB_SELECTED\";\nexport const evaluationsSetTabSelected = createAction(\n EVALUATIONS_SET_TAB_SELECTED,\n (resolve) => (payload?: object) => resolve(payload)\n);\n//////\n// EVALUATIONS\n//////\n// Fetch all evaluations\nexport const EVALUATIONS_FETCH_ALL: string = \"EVALUATIONS/FETCH/ALL\";\nexport const EVALUATIONS_FETCH_ALL_REQUEST: string =\n \"EVALUATIONS/FETCH/ALL/REQUEST\";\nexport const EVALUATIONS_FETCH_ALL_SUCCESS: string =\n \"EVALUATIONS/FETCH/ALL/SUCCESS\";\nexport const EVALUATIONS_FETCH_ALL_FAILURE: string =\n \"EVALUATIONS/FETCH/ALL/FAILURE\";\nexport const evaluationsFetchAll = createAction(\n EVALUATIONS_FETCH_ALL,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsFetchAllRequest = createAction(\n EVALUATIONS_FETCH_ALL_REQUEST\n);\nexport const evaluationsFetchAllSuccess = createAction(\n EVALUATIONS_FETCH_ALL_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsFetchAllFailure = createAction(\n EVALUATIONS_FETCH_ALL_FAILURE\n);\n// Fetch Evaluations by Filters\nexport const EVALUATIONS_FETCH_BY_FILTERS: string =\n \"EVALUATIONS/FETCH/BY_FILTERS\";\nexport const EVALUATIONS_FETCH_BY_FILTERS_REQUEST: string =\n \"EVALUATIONS/FETCH/BY_FILTERS/REQUEST\";\nexport const EVALUATIONS_FETCH_BY_FILTERS_SUCCESS: string =\n \"EVALUATIONS/FETCH/BY_FILTERS/SUCCESS\";\nexport const EVALUATIONS_FETCH_BY_FILTERS_FAILURE: string =\n \"EVALUATIONS/FETCH/BY_FILTERS/FAILURE\";\nexport const evaluationsFetchByFilters = createAction(\n EVALUATIONS_FETCH_BY_FILTERS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsFetchByFiltersRequest = createAction(\n EVALUATIONS_FETCH_BY_FILTERS_REQUEST\n);\nexport const evaluationsFetchByFiltersSuccess = createAction(\n EVALUATIONS_FETCH_BY_FILTERS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsFetchByFiltersFailure = createAction(\n EVALUATIONS_FETCH_BY_FILTERS_FAILURE\n);\n// Fetch Evaluations KPIS\nexport const EVALUATIONS_FETCH_KPIS: string = \"EVALUATIONS/FETCH/KPIS\";\nexport const EVALUATIONS_FETCH_KPIS_REQUEST: string =\n \"EVALUATIONS/FETCH/KPIS/REQUEST\";\nexport const EVALUATIONS_FETCH_KPIS_SUCCESS: string =\n \"EVALUATIONS/FETCH/KPIS/SUCCESS\";\nexport const EVALUATIONS_FETCH_KPIS_FAILURE: string =\n \"EVALUATIONS/FETCH/KPIS/FAILURE\";\nexport const evaluationsFetchKpis = createAction(\n EVALUATIONS_FETCH_KPIS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsFetchKpisRequest = createAction(\n EVALUATIONS_FETCH_KPIS_REQUEST\n);\nexport const evaluationsFetchKpisSuccess = createAction(\n EVALUATIONS_FETCH_KPIS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsFetchKpisFailure = createAction(\n EVALUATIONS_FETCH_KPIS_FAILURE,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Fetch Evaluations Answers KPIS\nexport const EVALUATIONS_ANSWERS_FETCH_KPIS: string =\n \"EVALUATIONS/ANSWERS/FETCH/KPIS\";\nexport const EVALUATIONS_ANSWERS_FETCH_KPIS_REQUEST: string =\n \"EVALUATIONS/ANSWERS/FETCH/KPIS/REQUEST\";\nexport const EVALUATIONS_ANSWERS_FETCH_KPIS_SUCCESS: string =\n \"EVALUATIONS/ANSWERS/FETCH/KPIS/SUCCESS\";\nexport const EVALUATIONS_ANSWERS_FETCH_KPIS_FAILURE: string =\n \"EVALUATIONS/ANSWERS/FETCH/KPIS/FAILURE\";\nexport const evaluationsAnswersFetchKpis = createAction(\n EVALUATIONS_ANSWERS_FETCH_KPIS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsAnswersFetchKpisRequest = createAction(\n EVALUATIONS_ANSWERS_FETCH_KPIS_REQUEST\n);\nexport const evaluationsAnswersFetchKpisSuccess = createAction(\n EVALUATIONS_ANSWERS_FETCH_KPIS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsAnswersFetchKpisFailure = createAction(\n EVALUATIONS_ANSWERS_FETCH_KPIS_FAILURE,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Set evaluationId to Fetch this evaluation\nexport const EVALUATIONS_SET_EVALUATION_ID: string =\n \"EVALUATIONS/SET/EVALUATION_ID\";\nexport const evaluationsSetEvaluationId = createAction(\n EVALUATIONS_SET_EVALUATION_ID,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Unset evaluationId\nexport const EVALUATIONS_UNSET_EVALUATION_ID: string =\n \"EVALUATIONS/UNSET/EVALUATION_ID\";\nexport const evaluationsUnsetEvaluationId = createAction(\n EVALUATIONS_UNSET_EVALUATION_ID,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Fetch a Evaluation\nexport const EVALUATIONS_FETCH_EVALUATION: string =\n \"EVALUATIONS/FETCH/EVALUATION\";\nexport const EVALUATIONS_FETCH_EVALUATION_REQUEST: string =\n \"EVALUATIONS/FETCH/EVALUATION/REQUEST\";\nexport const EVALUATIONS_FETCH_EVALUATION_SUCCESS: string =\n \"EVALUATIONS/FETCH/EVALUATION/SUCCESS\";\nexport const EVALUATIONS_FETCH_EVALUATION_FAILURE: string =\n \"EVALUATIONS/FETCH/EVALUATION/FAILURE\";\nexport const evaluationsFetchEvaluation = createAction(\n EVALUATIONS_FETCH_EVALUATION,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsFetchEvaluationRequest = createAction(\n EVALUATIONS_FETCH_EVALUATION_REQUEST\n);\nexport const evaluationsFetchEvaluationSuccess = createAction(\n EVALUATIONS_FETCH_EVALUATION_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsFetchEvaluationFailure = createAction(\n EVALUATIONS_FETCH_EVALUATION_FAILURE\n);\n// Create a Evaluation\nexport const EVALUATIONS_CREATE: string = \"EVALUATIONS/CREATE\";\nexport const EVALUATIONS_CREATE_REQUEST: string = \"EVALUATIONS/CREATE/REQUEST\";\nexport const EVALUATIONS_CREATE_SUCCESS: string = \"EVALUATIONS/CREATE/SUCCESS\";\nexport const EVALUATIONS_CREATE_FAILURE: string = \"EVALUATIONS/CREATE/FAILURE\";\nexport const evaluationsCreate = createAction(\n EVALUATIONS_CREATE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsCreateRequest = createAction(\n EVALUATIONS_CREATE_REQUEST\n);\nexport const evaluationsCreateSuccess = createAction(\n EVALUATIONS_CREATE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsCreateFailure = createAction(\n EVALUATIONS_CREATE_FAILURE\n);\n// Edit a Evaluation\nexport const EVALUATIONS_EDIT: string = \"EVALUATIONS/EDIT\";\nexport const EVALUATIONS_EDIT_REQUEST: string = \"EVALUATIONS/EDIT/REQUEST\";\nexport const EVALUATIONS_EDIT_SUCCESS: string = \"EVALUATIONS/EDIT/SUCCESS\";\nexport const EVALUATIONS_EDIT_FAILURE: string = \"EVALUATIONS/EDIT/FAILURE\";\nexport const evaluationsEdit = createAction(\n EVALUATIONS_EDIT,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsEditRequest = createAction(EVALUATIONS_EDIT_REQUEST);\nexport const evaluationsEditSuccess = createAction(\n EVALUATIONS_EDIT_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsEditFailure = createAction(EVALUATIONS_EDIT_FAILURE);\n// Delete Evaluation\nexport const EVALUATIONS_DELETE: string = \"EVALUATIONS/DELETE\";\nexport const EVALUATIONS_DELETE_REQUEST: string = \"EVALUATIONS/DELETE/REQUEST\";\nexport const EVALUATIONS_DELETE_SUCCESS: string = \"EVALUATIONS/DELETE/SUCCESS\";\nexport const EVALUATIONS_DELETE_FAILURE: string = \"EVALUATIONS/DELETE/FAILURE\";\nexport const evaluationsDelete = createAction(\n EVALUATIONS_DELETE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsDeleteRequest = createAction(\n EVALUATIONS_DELETE_REQUEST\n);\nexport const evaluationsDeleteSuccess = createAction(\n EVALUATIONS_DELETE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsDeleteFailure = createAction(\n EVALUATIONS_DELETE_FAILURE\n);\n//////\n// EVALUATIONS > ANSWERS\n//////\n// Fetch all Evaluation Answers\nexport const EVALUATIONS_FETCH_ANSWERS: string = \"EVALUATIONS/FETCH/ANSWERS\";\nexport const EVALUATIONS_FETCH_ANSWERS_REQUEST: string =\n \"EVALUATIONS/FETCH/ANSWERS/REQUEST\";\nexport const EVALUATIONS_FETCH_ANSWERS_SUCCESS: string =\n \"EVALUATIONS/FETCH/ANSWERS/SUCCESS\";\nexport const EVALUATIONS_FETCH_ANSWERS_FAILURE: string =\n \"EVALUATIONS/FETCH/ANSWERS/FAILURE\";\nexport const evaluationsFetchAnswers = createAction(\n EVALUATIONS_FETCH_ANSWERS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsFetchAnswersRequest = createAction(\n EVALUATIONS_FETCH_ANSWERS_REQUEST\n);\nexport const evaluationsFetchAnswersSuccess = createAction(\n EVALUATIONS_FETCH_ANSWERS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsFetchAnswersFailure = createAction(\n EVALUATIONS_FETCH_ANSWERS_FAILURE\n);\n// Fetch all Evaluation Answers from some specific evaluationId\nexport const EVALUATIONS_FETCH_EVALUATION_ANSWERS: string =\n \"EVALUATIONS/FETCH/EVALUATION_ANSWERS\";\nexport const EVALUATIONS_FETCH_EVALUATION_ANSWERS_REQUEST: string =\n \"EVALUATIONS/FETCH/EVALUATION_ANSWERS/REQUEST\";\nexport const EVALUATIONS_FETCH_EVALUATION_ANSWERS_SUCCESS: string =\n \"EVALUATIONS/FETCH/EVALUATION_ANSWERS/SUCCESS\";\nexport const EVALUATIONS_FETCH_EVALUATION_ANSWERS_FAILURE: string =\n \"EVALUATIONS/FETCH/EVALUATION_ANSWERS/FAILURE\";\nexport const evaluationsFetchEvaluationAnswers = createAction(\n EVALUATIONS_FETCH_EVALUATION_ANSWERS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsFetchEvaluationAnswersRequest = createAction(\n EVALUATIONS_FETCH_EVALUATION_ANSWERS_REQUEST\n);\nexport const evaluationsFetchEvaluationAnswersSuccess = createAction(\n EVALUATIONS_FETCH_EVALUATION_ANSWERS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsFetchEvaluationAnswersFailure = createAction(\n EVALUATIONS_FETCH_EVALUATION_ANSWERS_FAILURE\n);\n// Set answerId to Fetch only one answer from some evaluation\nexport const EVALUATIONS_SET_ANSWER_ID: string = \"EVALUATIONS/SET/ANSWER_ID\";\nexport const evaluationsSetAnswerId = createAction(\n EVALUATIONS_SET_ANSWER_ID,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Unset answerId\nexport const EVALUATIONS_UNSET_ANSWER_ID: string =\n \"EVALUATIONS/UNSET/ANSWER_ID\";\nexport const evaluationsUnsetAnswerId = createAction(\n EVALUATIONS_UNSET_ANSWER_ID,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Fetch only one answer from some evaluation\nexport const EVALUATIONS_FETCH_EVALUATION_ANSWER: string =\n \"EVALUATIONS/FETCH/EVALUATION_ANSWER\";\nexport const EVALUATIONS_FETCH_EVALUATION_ANSWER_REQUEST: string =\n \"EVALUATIONS/FETCH/EVALUATION_ANSWER/REQUEST\";\nexport const EVALUATIONS_FETCH_EVALUATION_ANSWER_SUCCESS: string =\n \"EVALUATIONS/FETCH/EVALUATION_ANSWER/SUCCESS\";\nexport const EVALUATIONS_FETCH_EVALUATION_ANSWER_FAILURE: string =\n \"EVALUATIONS/FETCH/EVALUATION_ANSWER/FAILURE\";\nexport const evaluationsFetchEvaluationAnswer = createAction(\n EVALUATIONS_FETCH_EVALUATION_ANSWER,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsFetchEvaluationAnswerRequest = createAction(\n EVALUATIONS_FETCH_EVALUATION_ANSWER_REQUEST\n);\nexport const evaluationsFetchEvaluationAnswerSuccess = createAction(\n EVALUATIONS_FETCH_EVALUATION_ANSWER_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsFetchEvaluationAnswerFailure = createAction(\n EVALUATIONS_FETCH_EVALUATION_ANSWER_FAILURE\n);\n// Reset Answer Loaded\nexport const EVALUATIONS_RESET_ANSWER_LOADED: string =\n \"EVALUATIONS/RESET/ANSWER_LOADED\";\nexport const evaluationsResetAnswerLoaded = createAction(\n EVALUATIONS_RESET_ANSWER_LOADED\n);\n// Response some evaluation\nexport const EVALUATIONS_RESPONSE_EVALUATION_ANSWERS: string =\n \"EVALUATIONS/RESPONSE/EVALUATION_ANSWERS\";\nexport const EVALUATIONS_RESPONSE_EVALUATION_ANSWERS_REQUEST: string =\n \"EVALUATIONS/RESPONSE/EVALUATION_ANSWERS/REQUEST\";\nexport const EVALUATIONS_RESPONSE_EVALUATION_ANSWERS_SUCCESS: string =\n \"EVALUATIONS/RESPONSE/EVALUATION_ANSWERS/SUCCESS\";\nexport const EVALUATIONS_RESPONSE_EVALUATION_ANSWERS_FAILURE: string =\n \"EVALUATIONS/RESPONSE/EVALUATION_ANSWERS/FAILURE\";\nexport const evaluationsResponseEvaluationAnswers = createAction(\n EVALUATIONS_RESPONSE_EVALUATION_ANSWERS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsResponseEvaluationAnswersRequest = createAction(\n EVALUATIONS_RESPONSE_EVALUATION_ANSWERS_REQUEST\n);\nexport const evaluationsResponseEvaluationAnswersSuccess = createAction(\n EVALUATIONS_RESPONSE_EVALUATION_ANSWERS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsResponseEvaluationAnswersFailure = createAction(\n EVALUATIONS_RESPONSE_EVALUATION_ANSWERS_FAILURE\n);\n// Reset Evaluation Loaded\nexport const EVALUATIONS_RESET_EVALUATION_LOADED: string =\n \"EVALUATIONS/RESET/EVALUATION_LOADED\";\nexport const evaluationsResetEvaluationLoaded = createAction(\n EVALUATIONS_RESET_EVALUATION_LOADED\n);\n// Delete Evaluation Answer\nexport const EVALUATIONS_DELETE_EVALUATION_ANSWER: string =\n \"EVALUATIONS/DELETE/EVALUATION_ANSWER\";\nexport const EVALUATIONS_DELETE_EVALUATION_ANSWER_REQUEST: string =\n \"EVALUATIONS/DELETE/EVALUATION_ANSWER/REQUEST\";\nexport const EVALUATIONS_DELETE_EVALUATION_ANSWER_SUCCESS: string =\n \"EVALUATIONS/DELETE/EVALUATION_ANSWER/SUCCESS\";\nexport const EVALUATIONS_DELETE_EVALUATION_ANSWER_FAILURE: string =\n \"EVALUATIONS/DELETE/EVALUATION_ANSWER/FAILURE\";\nexport const evaluationsDeleteEvaluationAnswer = createAction(\n EVALUATIONS_DELETE_EVALUATION_ANSWER,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsDeleteEvaluationAnswerRequest = createAction(\n EVALUATIONS_DELETE_EVALUATION_ANSWER_REQUEST\n);\nexport const evaluationsDeleteEvaluationAnswerSuccess = createAction(\n EVALUATIONS_DELETE_EVALUATION_ANSWER_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsDeleteEvaluationAnswerFailure = createAction(\n EVALUATIONS_DELETE_EVALUATION_ANSWER_FAILURE\n);\n","import { createAction } from \"deox\";\n\n// Actions for Evaluations Schedulers\n\n// Set evaluationSchedulersTab to Get propely evaluation schedulers list\nexport const EVALUATIONS_SCHEDULERS_SET_TAB_SELECTED: string =\n \"EVALUATIONS_SCHEDULERS/SET/TAB_SELECTED\";\nexport const evaluationsSchedulersSetTabSelected = createAction(\n EVALUATIONS_SCHEDULERS_SET_TAB_SELECTED,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Fetch all evaluations schedulers\nexport const EVALUATIONS_SCHEDULERS_FETCH_EVALUATIONS_SCHEDULERS: string =\n \"EVALUATIONS_SCHEDULERS/FETCH/EVALUATIONS_SCHEDULERS\";\nexport const EVALUATIONS_SCHEDULERS_FETCH_EVALUATIONS_SCHEDULERS_REQUEST: string =\n \"EVALUATIONS_SCHEDULERS/FETCH/EVALUATIONS_SCHEDULERS/REQUEST\";\nexport const EVALUATIONS_SCHEDULERS_FETCH_EVALUATIONS_SCHEDULERS_SUCCESS: string =\n \"EVALUATIONS_SCHEDULERS/FETCH/EVALUATIONS_SCHEDULERS/SUCCESS\";\nexport const EVALUATIONS_SCHEDULERS_FETCH_EVALUATIONS_SCHEDULERS_FAILURE: string =\n \"EVALUATIONS_SCHEDULERS/FETCH/EVALUATIONS_SCHEDULERS/FAILURE\";\nexport const evaluationsSchedulersFetchEvaluationsSchedulers = createAction(\n EVALUATIONS_SCHEDULERS_FETCH_EVALUATIONS_SCHEDULERS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsSchedulersFetchEvaluationsSchedulersRequest =\n createAction(EVALUATIONS_SCHEDULERS_FETCH_EVALUATIONS_SCHEDULERS_REQUEST);\nexport const evaluationsSchedulersFetchEvaluationsSchedulersSuccess =\n createAction(\n EVALUATIONS_SCHEDULERS_FETCH_EVALUATIONS_SCHEDULERS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n );\nexport const evaluationsSchedulersFetchEvaluationsSchedulersFailure =\n createAction(EVALUATIONS_SCHEDULERS_FETCH_EVALUATIONS_SCHEDULERS_FAILURE);\n// Create a Evaluation Schedulers\nexport const EVALUATIONS_SCHEDULERS_CREATE: string =\n \"EVALUATIONS_SCHEDULERS/CREATE\";\nexport const EVALUATIONS_SCHEDULERS_CREATE_REQUEST: string =\n \"EVALUATIONS_SCHEDULERS/CREATE/REQUEST\";\nexport const EVALUATIONS_SCHEDULERS_CREATE_SUCCESS: string =\n \"EVALUATIONS_SCHEDULERS/CREATE/SUCCESS\";\nexport const EVALUATIONS_SCHEDULERS_CREATE_FAILURE: string =\n \"EVALUATIONS_SCHEDULERS/CREATE/FAILURE\";\nexport const evaluationsSchedulersCreate = createAction(\n EVALUATIONS_SCHEDULERS_CREATE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsSchedulersCreateRequest = createAction(\n EVALUATIONS_SCHEDULERS_CREATE_REQUEST\n);\nexport const evaluationsSchedulersCreateSuccess = createAction(\n EVALUATIONS_SCHEDULERS_CREATE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsSchedulersCreateFailure = createAction(\n EVALUATIONS_SCHEDULERS_CREATE_FAILURE\n);\n// Edit a Evaluation\nexport const EVALUATIONS_SCHEDULERS_EDIT: string =\n \"EVALUATIONS_SCHEDULERS/EDIT\";\nexport const EVALUATIONS_SCHEDULERS_EDIT_REQUEST: string =\n \"EVALUATIONS_SCHEDULERS/EDIT/REQUEST\";\nexport const EVALUATIONS_SCHEDULERS_EDIT_SUCCESS: string =\n \"EVALUATIONS_SCHEDULERS/EDIT/SUCCESS\";\nexport const EVALUATIONS_SCHEDULERS_EDIT_FAILURE: string =\n \"EVALUATIONS_SCHEDULERS/EDIT/FAILURE\";\nexport const evaluationsSchedulersEdit = createAction(\n EVALUATIONS_SCHEDULERS_EDIT,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsSchedulersEditRequest = createAction(\n EVALUATIONS_SCHEDULERS_EDIT_REQUEST\n);\nexport const evaluationsSchedulersEditSuccess = createAction(\n EVALUATIONS_SCHEDULERS_EDIT_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsSchedulersEditFailure = createAction(\n EVALUATIONS_SCHEDULERS_EDIT_FAILURE\n);\n// Delete Evaluation\nexport const EVALUATIONS_SCHEDULERS_DELETE: string =\n \"EVALUATIONS_SCHEDULERS/DELETE\";\nexport const EVALUATIONS_SCHEDULERS_DELETE_REQUEST: string =\n \"EVALUATIONS_SCHEDULERS/DELETE/REQUEST\";\nexport const EVALUATIONS_SCHEDULERS_DELETE_SUCCESS: string =\n \"EVALUATIONS_SCHEDULERS/DELETE/SUCCESS\";\nexport const EVALUATIONS_SCHEDULERS_DELETE_FAILURE: string =\n \"EVALUATIONS_SCHEDULERS/DELETE/FAILURE\";\nexport const evaluationsSchedulersDelete = createAction(\n EVALUATIONS_SCHEDULERS_DELETE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsSchedulersDeleteRequest = createAction(\n EVALUATIONS_SCHEDULERS_DELETE_REQUEST\n);\nexport const evaluationsSchedulersDeleteSuccess = createAction(\n EVALUATIONS_SCHEDULERS_DELETE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsSchedulersDeleteFailure = createAction(\n EVALUATIONS_SCHEDULERS_DELETE_FAILURE\n);\n// Set evaluationSchedulerId to Fetch this evaluation schedulers\nexport const EVALUATIONS_SCHEDULERS_SET_EVALUATION_SCHEDULER_ID: string =\n \"EVALUATIONS_SCHEDULERS/SET/EVALUATION_SCHEDULER_ID\";\nexport const evaluationsSchedulersSetEvaluationSchedulerId = createAction(\n EVALUATIONS_SCHEDULERS_SET_EVALUATION_SCHEDULER_ID,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Unset evaluationSchedulerId\nexport const EVALUATIONS_SCHEDULERS_UNSET_EVALUATION_SCHEDULER_ID: string =\n \"EVALUATIONS_SCHEDULERS/UNSET/EVALUATION_SCHEDULER_ID\";\nexport const evaluationsSchedulersUnsetEvaluationSchedulerId = createAction(\n EVALUATIONS_SCHEDULERS_UNSET_EVALUATION_SCHEDULER_ID,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Fetch a Evaluation\nexport const EVALUATIONS_SCHEDULERS_FETCH_EVALUATION_SCHEDULER: string =\n \"EVALUATIONS_SCHEDULERS/FETCH/EVALUATION_SCHEDULER\";\nexport const EVALUATIONS_SCHEDULERS_FETCH_EVALUATION_SCHEDULER_REQUEST: string =\n \"EVALUATIONS_SCHEDULERS/FETCH/EVALUATION_SCHEDULER/REQUEST\";\nexport const EVALUATIONS_SCHEDULERS_FETCH_EVALUATION_SCHEDULER_SUCCESS: string =\n \"EVALUATIONS_SCHEDULERS/FETCH/EVALUATION_SCHEDULER/SUCCESS\";\nexport const EVALUATIONS_SCHEDULERS_FETCH_EVALUATION_SCHEDULER_FAILURE: string =\n \"EVALUATIONS_SCHEDULERS/FETCH/EVALUATION_SCHEDULER/FAILURE\";\nexport const evaluationsSchedulersFetchEvaluationScheduler = createAction(\n EVALUATIONS_SCHEDULERS_FETCH_EVALUATION_SCHEDULER,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsSchedulersFetchEvaluationSchedulerRequest =\n createAction(EVALUATIONS_SCHEDULERS_FETCH_EVALUATION_SCHEDULER_REQUEST);\nexport const evaluationsSchedulersFetchEvaluationSchedulerSuccess =\n createAction(\n EVALUATIONS_SCHEDULERS_FETCH_EVALUATION_SCHEDULER_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n );\nexport const evaluationsSchedulersFetchEvaluationSchedulerFailure =\n createAction(EVALUATIONS_SCHEDULERS_FETCH_EVALUATION_SCHEDULER_FAILURE);\n// Reset Evaluation Schedulers Loaded\nexport const EVALUATIONS_SCHEDULERS_RESET_EVALUATION_SCHEDULERS_LOADED: string =\n \"EVALUATIONS_SCHEDULERS/RESET/EVALUATION_SCHEDULERS_LOADED\";\nexport const evaluationsSchedulersResetEvaluationSchedulersLoaded =\n createAction(EVALUATIONS_SCHEDULERS_RESET_EVALUATION_SCHEDULERS_LOADED);\n\n// Evaluation Schedulers Create:\nexport const EVALUATIONS_SCHEDULERS_EVALUATION_CREATE_UPDATE_STEP: string =\n \"EVALUATIONS_SCHEDULERS/EVALUATION/CREATE/UPDATE_STEP\";\nexport const evaluationsSchedulersEvaluationCreateUpdateStep = createAction(\n EVALUATIONS_SCHEDULERS_EVALUATION_CREATE_UPDATE_STEP,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Evaluation Schedulers Create Reset process\nexport const EVALUATIONS_SCHEDULERS_EVALUATION_CREATE_RESET: string =\n \"EVALUATIONS_SCHEDULERS/EVALUATION/CREATE/RESET\";\nexport const evaluationsSchedulersEvaluationCreateReset = createAction(\n EVALUATIONS_SCHEDULERS_EVALUATION_CREATE_RESET\n);\n","import { createAction } from \"deox\";\n\n// Actions for Evaulations Templates Forms\n\n// Fetch all evaluations TEMPLATES form\nexport const EVALUATIONS_TEMPLATES_FETCH_FORMS: string =\n \"EVALUATIONS/TEMPLATES/FETCH/FORMS\";\nexport const EVALUATIONS_TEMPLATES_FETCH_FORMS_REQUEST: string =\n \"EVALUATIONS/TEMPLATES/FETCH/FORMS/REQUEST\";\nexport const EVALUATIONS_TEMPLATES_FETCH_FORMS_SUCCESS: string =\n \"EVALUATIONS/TEMPLATES/FETCH/FORMS/SUCCESS\";\nexport const EVALUATIONS_TEMPLATES_FETCH_FORMS_FAILURE: string =\n \"EVALUATIONS/TEMPLATES/FETCH/FORMS/FAILURE\";\nexport const evaluationsTemplatesFetchForms = createAction(\n EVALUATIONS_TEMPLATES_FETCH_FORMS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsTemplatesFetchFormsRequest = createAction(\n EVALUATIONS_TEMPLATES_FETCH_FORMS_REQUEST\n);\nexport const evaluationsTemplatesFetchFormsSuccess = createAction(\n EVALUATIONS_TEMPLATES_FETCH_FORMS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsTemplatesFetchFormsFailure = createAction(\n EVALUATIONS_TEMPLATES_FETCH_FORMS_FAILURE\n);\n// Create a Evaluation TEMPLATE form\nexport const EVALUATIONS_TEMPLATES_CREATE: string =\n \"EVALUATIONS/TEMPLATES/CREATE\";\nexport const EVALUATIONS_TEMPLATES_CREATE_REQUEST: string =\n \"EVALUATIONS/TEMPLATES/CREATE/REQUEST\";\nexport const EVALUATIONS_TEMPLATES_CREATE_SUCCESS: string =\n \"EVALUATIONS/TEMPLATES/CREATE/SUCCESS\";\nexport const EVALUATIONS_TEMPLATES_CREATE_FAILURE: string =\n \"EVALUATIONS/TEMPLATES/CREATE/FAILURE\";\nexport const evaluationsTemplatesCreate = createAction(\n EVALUATIONS_TEMPLATES_CREATE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsTemplatesCreateRequest = createAction(\n EVALUATIONS_TEMPLATES_CREATE_REQUEST\n);\nexport const evaluationsTemplatesCreateSuccess = createAction(\n EVALUATIONS_TEMPLATES_CREATE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsTemplatesCreateFailure = createAction(\n EVALUATIONS_TEMPLATES_CREATE_FAILURE\n);\n// Set evaluationTemplateId to Fetch this evaluation TEMPLATE form\nexport const EVALUATIONS_TEMPLATES_SET_EVALUATION_TEMPLATE_ID: string =\n \"EVALUATIONS/TEMPLATES/SET/EVALUATION_TEMPLATE_ID\";\nexport const evaluationsTemplatesSetEvaluationTemplateId = createAction(\n EVALUATIONS_TEMPLATES_SET_EVALUATION_TEMPLATE_ID,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Unset evaluationTemplateId\nexport const EVALUATIONS_TEMPLATES_UNSET_EVALUATION_TEMPLATE_ID: string =\n \"EVALUATIONS/TEMPLATES/UNSET/EVALUATION_TEMPLATE_ID\";\nexport const evaluationsTemplatesUnsetEvaluationTemplateId = createAction(\n EVALUATIONS_TEMPLATES_UNSET_EVALUATION_TEMPLATE_ID,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Fetch a Evaluation TEMPLATE form\nexport const EVALUATIONS_TEMPLATES_FETCH_FORM: string =\n \"EVALUATIONS/TEMPLATES/FETCH/EVALUATION\";\nexport const EVALUATIONS_TEMPLATES_FETCH_FORM_REQUEST: string =\n \"EVALUATIONS/TEMPLATES/FETCH/EVALUATION/REQUEST\";\nexport const EVALUATIONS_TEMPLATES_FETCH_FORM_SUCCESS: string =\n \"EVALUATIONS/TEMPLATES/FETCH/EVALUATION/SUCCESS\";\nexport const EVALUATIONS_TEMPLATES_FETCH_FORM_FAILURE: string =\n \"EVALUATIONS/TEMPLATES/FETCH/EVALUATION/FAILURE\";\nexport const evaluationsTemplatesFetchForm = createAction(\n EVALUATIONS_TEMPLATES_FETCH_FORM,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsTemplatesFetchFormRequest = createAction(\n EVALUATIONS_TEMPLATES_FETCH_FORM_REQUEST\n);\nexport const evaluationsTemplatesFetchFormSuccess = createAction(\n EVALUATIONS_TEMPLATES_FETCH_FORM_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsTemplatesFetchFormFailure = createAction(\n EVALUATIONS_TEMPLATES_FETCH_FORM_FAILURE\n);\n// Edit a Evaluation TEMPLATE form\nexport const EVALUATIONS_TEMPLATES_EDIT: string = \"EVALUATIONS/TEMPLATES/EDIT\";\nexport const EVALUATIONS_TEMPLATES_EDIT_REQUEST: string =\n \"EVALUATIONS/TEMPLATES/EDIT/REQUEST\";\nexport const EVALUATIONS_TEMPLATES_EDIT_SUCCESS: string =\n \"EVALUATIONS/TEMPLATES/EDIT/SUCCESS\";\nexport const EVALUATIONS_TEMPLATES_EDIT_FAILURE: string =\n \"EVALUATIONS/TEMPLATES/EDIT/FAILURE\";\nexport const evaluationsTemplatesEdit = createAction(\n EVALUATIONS_TEMPLATES_EDIT,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsTemplatesEditRequest = createAction(\n EVALUATIONS_TEMPLATES_EDIT_REQUEST\n);\nexport const evaluationsTemplatesEditSuccess = createAction(\n EVALUATIONS_TEMPLATES_EDIT_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsTemplatesEditFailure = createAction(\n EVALUATIONS_TEMPLATES_EDIT_FAILURE\n);\n// Delete Evaluation TEMPLATE form\nexport const EVALUATIONS_TEMPLATES_DELETE: string =\n \"EVALUATIONS/TEMPLATES/DELETE\";\nexport const EVALUATIONS_TEMPLATES_DELETE_REQUEST: string =\n \"EVALUATIONS/TEMPLATES/DELETE/REQUEST\";\nexport const EVALUATIONS_TEMPLATES_DELETE_SUCCESS: string =\n \"EVALUATIONS/TEMPLATES/DELETE/SUCCESS\";\nexport const EVALUATIONS_TEMPLATES_DELETE_FAILURE: string =\n \"EVALUATIONS/TEMPLATES/DELETE/FAILURE\";\nexport const evaluationsTemplatesDelete = createAction(\n EVALUATIONS_TEMPLATES_DELETE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsTemplatesDeleteRequest = createAction(\n EVALUATIONS_TEMPLATES_DELETE_REQUEST\n);\nexport const evaluationsTemplatesDeleteSuccess = createAction(\n EVALUATIONS_TEMPLATES_DELETE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const evaluationsTemplatesDeleteFailure = createAction(\n EVALUATIONS_TEMPLATES_DELETE_FAILURE\n);\n// Reset Template Loaded\nexport const EVALUATIONS_TEMPLATES_RESET_EVALUATION_TEMPLATE_LOADED: string =\n \"EVALUATIONS/TEMPLATES/RESET/EVALUATION_TEMPLATE_LOADED\";\nexport const evaluationsTemplatesResetTemplateLoaded = createAction(\n EVALUATIONS_TEMPLATES_RESET_EVALUATION_TEMPLATE_LOADED\n);\n// Create/Edit new Form template actions\n// Add option to array formOptions\nexport const EVALUATIONS_TEMPLATES_FORM_OPTIONS_ADD: string =\n \"EVALUATIONS/TEMPLATES/FORM/OPTIONS/ADD\";\nexport const evaluationsTemplatesFormOptionAdd = createAction(\n EVALUATIONS_TEMPLATES_FORM_OPTIONS_ADD,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Sort array formOptions\nexport const EVALUATIONS_TEMPLATES_FORM_OPTIONS_UPDATE: string =\n \"EVALUATIONS/TEMPLATES/FORM/OPTIONS/UPDATE\";\nexport const evaluationsTemplatesFormOptionUpdate = createAction(\n EVALUATIONS_TEMPLATES_FORM_OPTIONS_UPDATE,\n (resolve) => (payload?: object) => resolve(payload)\n);\n","import { createAction } from \"deox\";\n// Actions for Feedback Form\n// OPEN or CLOSE Feedback Form\nexport const FEEDBACK_FORM_OPEN_CLOSE: string = \"FEEDBACK_FORM/OPEN_CLOSE\";\nexport const feedbackFormOpenClose = createAction(FEEDBACK_FORM_OPEN_CLOSE);\n// Send Feedback Form\nexport const FEEDBACK_FORM_SEND: string = \"FEEDBACK_FORM/SEND\";\nexport const FEEDBACK_FORM_SEND_REQUEST: string = \"FEEDBACK_FORM/SEND/REQUEST\";\nexport const FEEDBACK_FORM_SEND_SUCCESS: string = \"FEEDBACK_FORM/SEND/SUCCESS\";\nexport const FEEDBACK_FORM_SEND_FAILURE: string = \"FEEDBACK_FORM/SEND/FAILURE\";\nexport const feedbackFormSend = createAction(\n FEEDBACK_FORM_SEND,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const feedbackFormSendRequest = createAction(FEEDBACK_FORM_SEND_REQUEST);\nexport const feedbackFormSendSuccess = createAction(\n FEEDBACK_FORM_SEND_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const feedbackFormSendFailure = createAction(FEEDBACK_FORM_SEND_FAILURE);\n","import { createAction } from \"deox\";\n\n// Actions for File Categories\n// Fetch all file categories\nexport const FILE_CATEGORIES_FETCH_FILE_CATEGORIES: string =\n \"FILE_CATEGORIES/FETCH/FILE_CATEGORIES\";\nexport const FILE_CATEGORIES_FETCH_FILE_CATEGORIES_REQUEST: string =\n \"FILE_CATEGORIES/FETCH/FILE_CATEGORIES/REQUEST\";\nexport const FILE_CATEGORIES_FETCH_FILE_CATEGORIES_SUCCESS: string =\n \"FILE_CATEGORIES/FETCH/FILE_CATEGORIES/SUCCESS\";\nexport const FILE_CATEGORIES_FETCH_FILE_CATEGORIES_FAILURE: string =\n \"FILE_CATEGORIES/FETCH/FILE_CATEGORIES/FAILURE\";\nexport const fileCategoriesFetchFileCategories = createAction(\n FILE_CATEGORIES_FETCH_FILE_CATEGORIES,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const fileCategoriesFetchFileCategoriesRequest = createAction(\n FILE_CATEGORIES_FETCH_FILE_CATEGORIES_REQUEST\n);\nexport const fileCategoriesFetchFileCategoriesSuccess = createAction(\n FILE_CATEGORIES_FETCH_FILE_CATEGORIES_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const fileCategoriesFetchFileCategoriesFailure = createAction(\n FILE_CATEGORIES_FETCH_FILE_CATEGORIES_FAILURE\n);\n// Create a file category\nexport const FILE_CATEGORIES_CREATE: string = \"FILE_CATEGORIES/CREATE\";\nexport const FILE_CATEGORIES_CREATE_REQUEST: string =\n \"FILE_CATEGORIES/CREATE/REQUEST\";\nexport const FILE_CATEGORIES_CREATE_SUCCESS: string =\n \"FILE_CATEGORIES/CREATE/SUCCESS\";\nexport const FILE_CATEGORIES_CREATE_FAILURE: string =\n \"FILE_CATEGORIES/CREATE/FAILURE\";\nexport const fileCategoriesCreate = createAction(\n FILE_CATEGORIES_CREATE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const fileCategoriesCreateRequest = createAction(\n FILE_CATEGORIES_CREATE_REQUEST\n);\nexport const fileCategoriesCreateSuccess = createAction(\n FILE_CATEGORIES_CREATE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const fileCategoriesCreateFailure = createAction(\n FILE_CATEGORIES_CREATE_FAILURE\n);\n// Edit a file category\nexport const FILE_CATEGORIES_EDIT: string = \"FILE_CATEGORIES/EDIT\";\nexport const FILE_CATEGORIES_EDIT_REQUEST: string =\n \"FILE_CATEGORIES/EDIT/REQUEST\";\nexport const FILE_CATEGORIES_EDIT_SUCCESS: string =\n \"FILE_CATEGORIES/EDIT/SUCCESS\";\nexport const FILE_CATEGORIES_EDIT_FAILURE: string =\n \"FILE_CATEGORIES/EDIT/FAILURE\";\nexport const fileCategoriesEdit = createAction(\n FILE_CATEGORIES_EDIT,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const fileCategoriesEditRequest = createAction(\n FILE_CATEGORIES_EDIT_REQUEST\n);\nexport const fileCategoriesEditSuccess = createAction(\n FILE_CATEGORIES_EDIT_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const fileCategoriesEditFailure = createAction(\n FILE_CATEGORIES_EDIT_FAILURE\n);\n// Delete a file category\nexport const FILE_CATEGORIES_DELETE: string = \"FILE_CATEGORIES/DELETE\";\nexport const FILE_CATEGORIES_DELETE_REQUEST: string =\n \"FILE_CATEGORIES/DELETE/REQUEST\";\nexport const FILE_CATEGORIES_DELETE_SUCCESS: string =\n \"FILE_CATEGORIES/DELETE/SUCCESS\";\nexport const FILE_CATEGORIES_DELETE_FAILURE: string =\n \"FILE_CATEGORIES/DELETE/FAILURE\";\nexport const fileCategoriesDelete = createAction(\n FILE_CATEGORIES_DELETE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const fileCategoriesDeleteRequest = createAction(\n FILE_CATEGORIES_DELETE_REQUEST\n);\nexport const fileCategoriesDeleteSuccess = createAction(\n FILE_CATEGORIES_DELETE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const fileCategoriesDeleteFailure = createAction(\n FILE_CATEGORIES_DELETE_FAILURE\n);\n","import { createAction } from \"deox\";\n\n// Actions for Files\n// Edit a file\nexport const FILES_EDIT: string = \"FILES/EDIT\";\nexport const FILES_EDIT_REQUEST: string = \"FILES/EDIT/REQUEST\";\nexport const FILES_EDIT_SUCCESS: string = \"FILES/EDIT/SUCCESS\";\nexport const FILES_EDIT_FAILURE: string = \"FILES/EDIT/FAILURE\";\nexport const filesEdit = createAction(\n FILES_EDIT,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const filesEditRequest = createAction(FILES_EDIT_REQUEST);\nexport const filesEditSuccess = createAction(\n FILES_EDIT_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const filesEditFailure = createAction(FILES_EDIT_FAILURE);\n// Delete a file\nexport const FILES_DELETE: string = \"FILES/DELETE\";\nexport const FILES_DELETE_REQUEST: string = \"FILES/DELETE/REQUEST\";\nexport const FILES_DELETE_SUCCESS: string = \"FILES/DELETE/SUCCESS\";\nexport const FILES_DELETE_FAILURE: string = \"FILES/DELETE/FAILURE\";\nexport const filesDelete = createAction(\n FILES_DELETE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const filesDeleteRequest = createAction(FILES_DELETE_REQUEST);\nexport const filesDeleteSuccess = createAction(\n FILES_DELETE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const filesDeleteFailure = createAction(FILES_DELETE_FAILURE);\n// Download a file\nexport const FILES_DOWNLOAD: string = \"FILES/DOWNLOAD\";\nexport const FILES_DOWNLOAD_REQUEST: string = \"FILES/DOWNLOAD/REQUEST\";\nexport const FILES_DOWNLOAD_SUCCESS: string = \"FILES/DOWNLOAD/SUCCESS\";\nexport const FILES_DOWNLOAD_FAILURE: string = \"FILES/DOWNLOAD/FAILURE\";\nexport const filesDownload = createAction(\n FILES_DOWNLOAD,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const filesDownloadRequest = createAction(FILES_DOWNLOAD_REQUEST);\nexport const filesDownloadSuccess = createAction(\n FILES_DOWNLOAD_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const filesDownloadFailure = createAction(FILES_DOWNLOAD_FAILURE);\n// Preview a file\nexport const FILES_PREVIEW: string = \"FILES/PREVIEW\";\nexport const FILES_PREVIEW_REQUEST: string = \"FILES/PREVIEW/REQUEST\";\nexport const FILES_PREVIEW_SUCCESS: string = \"FILES/PREVIEW/SUCCESS\";\nexport const FILES_PREVIEW_FAILURE: string = \"FILES/PREVIEW/FAILURE\";\nexport const filesPreview = createAction(\n FILES_PREVIEW,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const filesPreviewRequest = createAction(FILES_PREVIEW_REQUEST);\nexport const filesPreviewSuccess = createAction(\n FILES_PREVIEW_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const filesPreviewFailure = createAction(FILES_PREVIEW_FAILURE);\n","import { createAction } from \"deox\";\n// Import Types\nimport type {\n TYPE_GUIDE_LINE_TUTORIAL_MENU,\n TYPE_GUIDE_LINE_TUTORIAL_HOME,\n TYPE_GUIDE_LINE_TUTORIAL_USER_MANAGER,\n TYPE_GUIDE_LINE_TUTORIAL_USER_MANAGER_INVITATIONS,\n TYPE_GUIDE_LINE_TUTORIAL_INSTITUTIONS,\n TYPE_GUIDE_LINE_TUTORIAL_ROTATIONS,\n TYPE_GUIDE_LINE_TUTORIAL_ROTATIONS_CREATE,\n TYPE_GUIDE_LINE_TUTORIAL_CASE_LOGS,\n TYPE_GUIDE_LINE_TUTORIAL_EVALUATIONS,\n TYPE_GUIDE_LINE_TUTORIAL_ACCOUNT_SETTINGS,\n} from \"../../types/guideLineTutorial.types\";\n\n// Actions for Guide Line Tutorial\nexport const GUIDE_LINE_TUTORIAL_INITIALIZE: string =\n \"GUIDE_LINE_TUTORIAL/INITIALIZE\";\nexport const guideLineTutorialInitialize = createAction(\n GUIDE_LINE_TUTORIAL_INITIALIZE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const GUIDE_LINE_TUTORIAL_ON_OFF: string = \"GUIDE_LINE_TUTORIAL/ON_OFF\";\nexport const guideLineTutorialOnOff = createAction(GUIDE_LINE_TUTORIAL_ON_OFF);\n\n// Actions React Joyride\nexport const GUIDE_LINE_TUTORIAL_START: string = \"GUIDE_LINE_TUTORIAL/START\";\nexport const guideLineTutorialStart = createAction(\n GUIDE_LINE_TUTORIAL_START,\n (resolve) => (payload?: object) => resolve(payload)\n);\n\nexport const GUIDE_LINE_TUTORIAL_STOP: string = \"GUIDE_LINE_TUTORIAL/STOP\";\nexport const guideLineTutorialStop = createAction(\n GUIDE_LINE_TUTORIAL_STOP,\n (resolve) => (payload?: object) => resolve(payload)\n);\n\nexport const GUIDE_LINE_TUTORIAL_PAUSE: string = \"GUIDE_LINE_TUTORIAL/PAUSE\";\nexport const guideLineTutorialPause = createAction(\n GUIDE_LINE_TUTORIAL_PAUSE,\n (resolve) => (payload?: object) => resolve(payload)\n);\n\nexport const GUIDE_LINE_TUTORIAL_PLAY: string = \"GUIDE_LINE_TUTORIAL/PLAY\";\nexport const guideLineTutorialPlay = createAction(\n GUIDE_LINE_TUTORIAL_PLAY,\n (resolve) => (payload?: object) => resolve(payload)\n);\n\nexport const GUIDE_LINE_TUTORIAL_NEXT: string = \"GUIDE_LINE_TUTORIAL/NEXT\";\nexport const guideLineTutorialNext = createAction(\n GUIDE_LINE_TUTORIAL_NEXT,\n (resolve) => (payload?: object) => resolve(payload)\n);\n\nexport const GUIDE_LINE_TUTORIAL_PREV: string = \"GUIDE_LINE_TUTORIAL/PREV\";\nexport const guideLineTutorialPrev = createAction(\n GUIDE_LINE_TUTORIAL_PREV,\n (resolve) => (payload?: object) => resolve(payload)\n);\n\nexport const GUIDE_LINE_TUTORIAL_COMPLETED: string =\n \"GUIDE_LINE_TUTORIAL/COMPLETED\";\nexport const guideLineTutorialCompleted = createAction(\n GUIDE_LINE_TUTORIAL_COMPLETED\n);\n\n//MENU\nexport const GUIDE_LINE_TUTORIAL_MENU: TYPE_GUIDE_LINE_TUTORIAL_MENU = \"MENU\";\n//HOME\nexport const GUIDE_LINE_TUTORIAL_HOME: TYPE_GUIDE_LINE_TUTORIAL_HOME = \"HOME\";\n//USER_MANAGER\nexport const GUIDE_LINE_TUTORIAL_USER_MANAGER: TYPE_GUIDE_LINE_TUTORIAL_USER_MANAGER =\n \"USER_MANAGER\";\nexport const GUIDE_LINE_TUTORIAL_USER_MANAGER_INVITATIONS: TYPE_GUIDE_LINE_TUTORIAL_USER_MANAGER_INVITATIONS =\n \"USER_MANAGER_INVITATIONS\";\n//INSTITUTIONS\nexport const GUIDE_LINE_TUTORIAL_INSTITUTIONS: TYPE_GUIDE_LINE_TUTORIAL_INSTITUTIONS =\n \"INSTITUTIONS\";\n//ROTATIONS\nexport const GUIDE_LINE_TUTORIAL_ROTATIONS: TYPE_GUIDE_LINE_TUTORIAL_ROTATIONS =\n \"ROTATIONS\";\nexport const GUIDE_LINE_TUTORIAL_ROTATIONS_CREATE: TYPE_GUIDE_LINE_TUTORIAL_ROTATIONS_CREATE =\n \"ROTATIONS_CREATE\";\n//CASE_LOGS\nexport const GUIDE_LINE_TUTORIAL_CASE_LOGS: TYPE_GUIDE_LINE_TUTORIAL_CASE_LOGS =\n \"CASE_LOGS\";\n//EVALUATIONS\nexport const GUIDE_LINE_TUTORIAL_EVALUATIONS: TYPE_GUIDE_LINE_TUTORIAL_EVALUATIONS =\n \"EVALUATIONS\";\n//ACCOUNT_SETTINGS\nexport const GUIDE_LINE_TUTORIAL_ACCOUNT_SETTINGS: TYPE_GUIDE_LINE_TUTORIAL_ACCOUNT_SETTINGS =\n \"ACCOUNT_SETTINGS\";\n","import { createAction } from \"deox\";\n\n// Actions for Import Users or rotations\n\n// Fetch latest Import Data: Users and Rotations\nexport const IMPORT_DATA_FETCH: string = \"IMPORT/DATA/FETCH\";\nexport const IMPORT_DATA_FETCH_REQUEST: string = \"IMPORT/DATA/FETCH/REQUEST\";\nexport const IMPORT_DATA_FETCH_SUCCESS: string = \"IMPORT/DATA/FETCH/SUCCESS\";\nexport const IMPORT_DATA_FETCH_FAILURE: string = \"IMPORT/DATA/FETCH/FAILURE\";\nexport const importDataFetch = createAction(\n IMPORT_DATA_FETCH,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const importDataFetchRequest = createAction(IMPORT_DATA_FETCH_REQUEST);\nexport const importDataFetchSuccess = createAction(\n IMPORT_DATA_FETCH_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const importDataFetchFailure = createAction(IMPORT_DATA_FETCH_FAILURE);\n// Import Data: Users or Rotations\nexport const IMPORT_DATA_SEND: string = \"IMPORT/DATA/SEND\";\nexport const IMPORT_DATA_SEND_REQUEST: string = \"IMPORT/DATA/SEND/REQUEST\";\nexport const IMPORT_DATA_SEND_SUCCESS: string = \"IMPORT/DATA/SEND/SUCCESS\";\nexport const IMPORT_DATA_SEND_FAILURE: string = \"IMPORT/DATA/SEND/FAILURE\";\nexport const importDataSend = createAction(\n IMPORT_DATA_SEND,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const importDataSendRequest = createAction(IMPORT_DATA_SEND_REQUEST);\nexport const importDataSendSuccess = createAction(\n IMPORT_DATA_SEND_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const importDataSendFailure = createAction(IMPORT_DATA_SEND_FAILURE);\n// Generate CSV depend on Data: Users role or Rotations\nexport const IMPORT_GENERATE_CSV: string = \"IMPORT/GENERATE_CSV\";\nexport const IMPORT_GENERATE_CSV_REQUEST: string =\n \"IMPORT/GENERATE_CSV/REQUEST\";\nexport const IMPORT_GENERATE_CSV_SUCCESS: string =\n \"IMPORT/GENERATE_CSV/SUCCESS\";\nexport const IMPORT_GENERATE_CSV_FAILURE: string =\n \"IMPORT/GENERATE_CSV/FAILURE\";\nexport const importGenerateCSV = createAction(\n IMPORT_GENERATE_CSV,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const importGenerateCSVRequest = createAction(\n IMPORT_GENERATE_CSV_REQUEST\n);\nexport const importGenerateCSVSuccess = createAction(\n IMPORT_GENERATE_CSV_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const importGenerateCSVFailure = createAction(\n IMPORT_GENERATE_CSV_FAILURE\n);\n// Show or Hide report warning message to let you know there are reports\n// to check it into reports views\nexport const IMPORT_DATA_SHOW_NOTIFICATION: string =\n \"IMPORT/DATA/SHOW_NOTIFICATION\";\nexport const importDataShowNotification = createAction(\n IMPORT_DATA_SHOW_NOTIFICATION,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const IMPORT_DATA_HIDE_NOTIFICATION: string =\n \"IMPORT/DATA/HIDE_NOTIFICATION\";\nexport const importDataHideNotification = createAction(\n IMPORT_DATA_HIDE_NOTIFICATION,\n (resolve) => (payload?: object) => resolve(payload)\n);\n","import { createAction } from \"deox\";\n// Actions for Institutions\n// Fetch all institutions\nexport const INSTITUTIONS_FETCH_INSTITUTIONS: string =\n \"INSTITUTIONS/FETCH/INSTITUTIONS\";\nexport const INSTITUTIONS_FETCH_INSTITUTIONS_REQUEST: string =\n \"INSTITUTIONS/FETCH/INSTITUTIONS/REQUEST\";\nexport const INSTITUTIONS_FETCH_INSTITUTIONS_SUCCESS: string =\n \"INSTITUTIONS/FETCH/INSTITUTIONS/SUCCESS\";\nexport const INSTITUTIONS_FETCH_INSTITUTIONS_FAILURE: string =\n \"INSTITUTIONS/FETCH/INSTITUTIONS/FAILURE\";\nexport const institutionsFetchInstitutions = createAction(\n INSTITUTIONS_FETCH_INSTITUTIONS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const institutionsFetchInstitutionsRequest = createAction(\n INSTITUTIONS_FETCH_INSTITUTIONS_REQUEST\n);\nexport const institutionsFetchInstitutionsSuccess = createAction(\n INSTITUTIONS_FETCH_INSTITUTIONS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const institutionsFetchInstitutionsFailure = createAction(\n INSTITUTIONS_FETCH_INSTITUTIONS_FAILURE\n);\n// Create Institution\nexport const INSTITUTIONS_CREATE: string = \"INSTITUTIONS/CREATE\";\nexport const INSTITUTIONS_CREATE_REQUEST: string =\n \"INSTITUTIONS/CREATE/REQUEST\";\nexport const INSTITUTIONS_CREATE_SUCCESS: string =\n \"INSTITUTIONS/CREATE/SUCCESS\";\nexport const INSTITUTIONS_CREATE_FAILURE: string =\n \"INSTITUTIONS/CREATE/FAILURE\";\nexport const institutionsCreate = createAction(\n INSTITUTIONS_CREATE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const institutionsCreateRequest = createAction(\n INSTITUTIONS_CREATE_REQUEST\n);\nexport const institutionsCreateSuccess = createAction(\n INSTITUTIONS_CREATE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const institutionsCreateFailure = createAction(\n INSTITUTIONS_CREATE_FAILURE\n);\n// Set institutionId to Fetch this institution\nexport const INSTITUTIONS_SET_INSTITUTION_ID: string =\n \"INSTITUTIONS/SET/INSTITUTION_ID\";\nexport const institutionsSetInstitutionId = createAction(\n INSTITUTIONS_SET_INSTITUTION_ID,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Unset institutionId to clean institution reducer\nexport const INSTITUTIONS_UNSET_INSTITUTION_ID: string =\n \"INSTITUTIONS/UNSET/INSTITUTION_ID\";\nexport const institutionsUnsetInstitutionId = createAction(\n INSTITUTIONS_UNSET_INSTITUTION_ID,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Fetch Institution\nexport const INSTITUTIONS_FETCH_INSTITUTION: string =\n \"INSTITUTIONS/FETCH/INSTITUTION\";\nexport const INSTITUTIONS_FETCH_INSTITUTION_REQUEST: string =\n \"INSTITUTIONS/FETCH/INSTITUTION/REQUEST\";\nexport const INSTITUTIONS_FETCH_INSTITUTION_SUCCESS: string =\n \"INSTITUTIONS/FETCH/INSTITUTION/SUCCESS\";\nexport const INSTITUTIONS_FETCH_INSTITUTION_FAILURE: string =\n \"INSTITUTIONS/FETCH/INSTITUTION/FAILURE\";\nexport const institutionsFetchInstitution = createAction(\n INSTITUTIONS_FETCH_INSTITUTION,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const institutionsFetchInstitutionRequest = createAction(\n INSTITUTIONS_FETCH_INSTITUTION_REQUEST\n);\nexport const institutionsFetchInstitutionSuccess = createAction(\n INSTITUTIONS_FETCH_INSTITUTION_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const institutionsFetchInstitutionFailure = createAction(\n INSTITUTIONS_FETCH_INSTITUTION_FAILURE\n);\n// Fetch institution AVAILABILITIES\nexport const INSTITUTIONS_FETCH_INSTITUTION_AVAILABILITIES: string =\n \"INSTITUTIONS/FETCH/INSTITUTION_AVAILABILITIES\";\nexport const INSTITUTIONS_FETCH_INSTITUTION_AVAILABILITIES_REQUEST: string =\n \"INSTITUTIONS/FETCH/INSTITUTION_AVAILABILITIES/REQUEST\";\nexport const INSTITUTIONS_FETCH_INSTITUTION_AVAILABILITIES_SUCCESS: string =\n \"INSTITUTIONS/FETCH/INSTITUTION_AVAILABILITIES/SUCCESS\";\nexport const INSTITUTIONS_FETCH_INSTITUTION_AVAILABILITIES_FAILURE: string =\n \"INSTITUTIONS/FETCH/INSTITUTION_AVAILABILITIES/FAILURE\";\nexport const institutionsFetchInstitutionAvailabilities = createAction(\n INSTITUTIONS_FETCH_INSTITUTION_AVAILABILITIES,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const institutionsFetchInstitutionAvailabilitiesRequest = createAction(\n INSTITUTIONS_FETCH_INSTITUTION_AVAILABILITIES_REQUEST\n);\nexport const institutionsFetchInstitutionAvailabilitiesSuccess = createAction(\n INSTITUTIONS_FETCH_INSTITUTION_AVAILABILITIES_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const institutionsFetchInstitutionAvailabilitiesFailure = createAction(\n INSTITUTIONS_FETCH_INSTITUTION_AVAILABILITIES_FAILURE\n);\n// Edit Institution\nexport const INSTITUTIONS_EDIT_INSTITUTION: string =\n \"INSTITUTIONS/EDIT/INSTITUTION\";\nexport const INSTITUTIONS_EDIT_INSTITUTION_REQUEST: string =\n \"INSTITUTIONS/EDIT/INSTITUTION/REQUEST\";\nexport const INSTITUTIONS_EDIT_INSTITUTION_SUCCESS: string =\n \"INSTITUTIONS/EDIT/INSTITUTION/SUCCESS\";\nexport const INSTITUTIONS_EDIT_INSTITUTION_FAILURE: string =\n \"INSTITUTIONS/EDIT/INSTITUTION/FAILURE\";\nexport const institutionsEditInstitution = createAction(\n INSTITUTIONS_EDIT_INSTITUTION,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const institutionsEditInstitutionRequest = createAction(\n INSTITUTIONS_EDIT_INSTITUTION_REQUEST\n);\nexport const institutionsEditInstitutionSuccess = createAction(\n INSTITUTIONS_EDIT_INSTITUTION_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const institutionsEditInstitutionFailure = createAction(\n INSTITUTIONS_EDIT_INSTITUTION_FAILURE\n);\n// Edit institution AVAILABILITIES\nexport const INSTITUTIONS_EDIT_INSTITUTION_AVAILABILITIES: string =\n \"INSTITUTIONS/EDIT/INSTITUTION_AVAILABILITIES\";\nexport const INSTITUTIONS_EDIT_INSTITUTION_AVAILABILITIES_REQUEST: string =\n \"INSTITUTIONS/EDIT/INSTITUTION_AVAILABILITIES/REQUEST\";\nexport const INSTITUTIONS_EDIT_INSTITUTION_AVAILABILITIES_SUCCESS: string =\n \"INSTITUTIONS/EDIT/INSTITUTION_AVAILABILITIES/SUCCESS\";\nexport const INSTITUTIONS_EDIT_INSTITUTION_AVAILABILITIES_FAILURE: string =\n \"INSTITUTIONS/EDIT/INSTITUTION_AVAILABILITIES/FAILURE\";\nexport const institutionsEditInstitutionAvailabilities = createAction(\n INSTITUTIONS_EDIT_INSTITUTION_AVAILABILITIES,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const institutionsEditInstitutionAvailabilitiesRequest = createAction(\n INSTITUTIONS_EDIT_INSTITUTION_AVAILABILITIES_REQUEST\n);\nexport const institutionsEditInstitutionAvailabilitiesSuccess = createAction(\n INSTITUTIONS_EDIT_INSTITUTION_AVAILABILITIES_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const institutionsEditInstitutionAvailabilitiesFailure = createAction(\n INSTITUTIONS_EDIT_INSTITUTION_AVAILABILITIES_FAILURE\n);\n// Fetch Institution Files\nexport const INSTITUTIONS_FETCH_INSTITUTION_FILES: string =\n \"INSTITUTIONS/FETCH/INSTITUTION_FILES\";\nexport const INSTITUTIONS_FETCH_INSTITUTION_FILES_REQUEST: string =\n \"INSTITUTIONS/FETCH/INSTITUTION_FILES/REQUEST\";\nexport const INSTITUTIONS_FETCH_INSTITUTION_FILES_SUCCESS: string =\n \"INSTITUTIONS/FETCH/INSTITUTION_FILES/SUCCESS\";\nexport const INSTITUTIONS_FETCH_INSTITUTION_FILES_FAILURE: string =\n \"INSTITUTIONS/FETCH/INSTITUTION_FILES/FAILURE\";\nexport const institutionsFetchInstitutionFiles = createAction(\n INSTITUTIONS_FETCH_INSTITUTION_FILES,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const institutionsFetchInstitutionFilesRequest = createAction(\n INSTITUTIONS_FETCH_INSTITUTION_FILES_REQUEST\n);\nexport const institutionsFetchInstitutionFilesSuccess = createAction(\n INSTITUTIONS_FETCH_INSTITUTION_FILES_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const institutionsFetchInstitutionFilesFailure = createAction(\n INSTITUTIONS_FETCH_INSTITUTION_FILES_FAILURE\n);\n// Fetch all Institution Files Expired\nexport const INSTITUTIONS_FETCH_INSTITUTION_FILES_EXPIRED: string =\n \"INSTITUTIONS/FETCH/INSTITUTION_FILES_EXPIRED\";\nexport const INSTITUTIONS_FETCH_INSTITUTION_FILES_EXPIRED_REQUEST: string =\n \"INSTITUTIONS/FETCH/INSTITUTION_FILES_EXPIRED/REQUEST\";\nexport const INSTITUTIONS_FETCH_INSTITUTION_FILES_EXPIRED_SUCCESS: string =\n \"INSTITUTIONS/FETCH/INSTITUTION_FILES_EXPIRED/SUCCESS\";\nexport const INSTITUTIONS_FETCH_INSTITUTION_FILES_EXPIRED_FAILURE: string =\n \"INSTITUTIONS/FETCH/INSTITUTION_FILES_EXPIRED/FAILURE\";\nexport const institutionsFetchInstitutionFilesExpired = createAction(\n INSTITUTIONS_FETCH_INSTITUTION_FILES_EXPIRED,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const institutionsFetchInstitutionFilesExpiredRequest = createAction(\n INSTITUTIONS_FETCH_INSTITUTION_FILES_EXPIRED_REQUEST\n);\nexport const institutionsFetchInstitutionFilesExpiredSuccess = createAction(\n INSTITUTIONS_FETCH_INSTITUTION_FILES_EXPIRED_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const institutionsFetchInstitutionFilesExpiredFailure = createAction(\n INSTITUTIONS_FETCH_INSTITUTION_FILES_EXPIRED_FAILURE\n);\n// Upload Institution Files\nexport const INSTITUTIONS_UPLOAD_INSTITUTION_FILES: string =\n \"INSTITUTIONS/UPLOAD/INSTITUTION_FILES\";\nexport const INSTITUTIONS_UPLOAD_INSTITUTION_FILES_REQUEST: string =\n \"INSTITUTIONS/UPLOAD/INSTITUTION_FILES/REQUEST\";\nexport const INSTITUTIONS_UPLOAD_INSTITUTION_FILES_SUCCESS: string =\n \"INSTITUTIONS/UPLOAD/INSTITUTION_FILES/SUCCESS\";\nexport const INSTITUTIONS_UPLOAD_INSTITUTION_FILES_FAILURE: string =\n \"INSTITUTIONS/UPLOAD/INSTITUTION_FILES/FAILURE\";\nexport const institutionsUploadInstitutionFiles = createAction(\n INSTITUTIONS_UPLOAD_INSTITUTION_FILES,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const institutionsUploadInstitutionFilesRequest = createAction(\n INSTITUTIONS_UPLOAD_INSTITUTION_FILES_REQUEST\n);\nexport const institutionsUploadInstitutionFilesSuccess = createAction(\n INSTITUTIONS_UPLOAD_INSTITUTION_FILES_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const institutionsUploadInstitutionFilesFailure = createAction(\n INSTITUTIONS_UPLOAD_INSTITUTION_FILES_FAILURE\n);\n// Delete Institution\nexport const INSTITUTIONS_DELETE: string = \"INSTITUTIONS/DELETE\";\nexport const INSTITUTIONS_DELETE_REQUEST: string =\n \"INSTITUTIONS/DELETE/REQUEST\";\nexport const INSTITUTIONS_DELETE_SUCCESS: string =\n \"INSTITUTIONS/DELETE/SUCCESS\";\nexport const INSTITUTIONS_DELETE_FAILURE: string =\n \"INSTITUTIONS/DELETE/FAILURE\";\nexport const institutionsDelete = createAction(\n INSTITUTIONS_DELETE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const institutionsDeleteRequest = createAction(\n INSTITUTIONS_DELETE_REQUEST\n);\nexport const institutionsDeleteSuccess = createAction(\n INSTITUTIONS_DELETE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const institutionsDeleteFailure = createAction(\n INSTITUTIONS_DELETE_FAILURE\n);\n","import { createAction } from \"deox\";\n// Actions for INVITATIONS\n\n// Fetch all Invitations\nexport const INVITATIONS_FETCH_INVITATIONS: string =\n \"INVITATIONS/FETCH/INVITATIONS\";\nexport const INVITATIONS_FETCH_INVITATIONS_REQUEST: string =\n \"INVITATIONS/FETCH/INVITATIONS/REQUEST\";\nexport const INVITATIONS_FETCH_INVITATIONS_SUCCESS: string =\n \"INVITATIONS/FETCH/INVITATIONS/SUCCESS\";\nexport const INVITATIONS_FETCH_INVITATIONS_FAILURE: string =\n \"INVITATIONS/FETCH/INVITATIONS/FAILURE\";\nexport const invitationsFetchInvitations = createAction(\n INVITATIONS_FETCH_INVITATIONS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const invitationsFetchInvitationsRequest = createAction(\n INVITATIONS_FETCH_INVITATIONS_REQUEST\n);\nexport const invitationsFetchInvitationsSuccess = createAction(\n INVITATIONS_FETCH_INVITATIONS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const invitationsFetchInvitationsFailure = createAction(\n INVITATIONS_FETCH_INVITATIONS_FAILURE\n);\n// Create a Invitation for Users\nexport const INVITATIONS_CREATE: string = \"INVITATIONS/CREATE\";\nexport const INVITATIONS_CREATE_REQUEST: string = \"INVITATIONS/CREATE/REQUEST\";\nexport const INVITATIONS_CREATE_SUCCESS: string = \"INVITATIONS/CREATE/SUCCESS\";\nexport const INVITATIONS_CREATE_FAILURE: string = \"INVITATIONS/CREATE/FAILURE\";\nexport const invitationsCreate = createAction(\n INVITATIONS_CREATE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const invitationsCreateRequest = createAction(\n INVITATIONS_CREATE_REQUEST\n);\nexport const invitationsCreateSuccess = createAction(\n INVITATIONS_CREATE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const invitationsCreateFailure = createAction(\n INVITATIONS_CREATE_FAILURE\n);\n// Resend invitation(s)\nexport const INVITATIONS_RESEND: string = \"INVITATIONS/RESEND\";\nexport const INVITATIONS_RESEND_REQUEST: string = \"INVITATIONS/RESEND/REQUEST\";\nexport const INVITATIONS_RESEND_SUCCESS: string = \"INVITATIONS/RESEND/SUCCESS\";\nexport const INVITATIONS_RESEND_FAILURE: string = \"INVITATIONS/RESEND/FAILURE\";\nexport const invitationsResend = createAction(\n INVITATIONS_RESEND,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const invitationsResendRequest = createAction(\n INVITATIONS_RESEND_REQUEST\n);\nexport const invitationsResendSuccess = createAction(\n INVITATIONS_RESEND_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const invitationsResendFailure = createAction(\n INVITATIONS_RESEND_FAILURE\n);\n// Active a invitation\nexport const INVITATIONS_ACTIVE: string = \"INVITATIONS/ACTIVE\";\nexport const INVITATIONS_ACTIVE_REQUEST: string = \"INVITATIONS/ACTIVE/REQUEST\";\nexport const INVITATIONS_ACTIVE_SUCCESS: string = \"INVITATIONS/ACTIVE/SUCCESS\";\nexport const INVITATIONS_ACTIVE_FAILURE: string = \"INVITATIONS/ACTIVE/FAILURE\";\nexport const invitationsActive = createAction(\n INVITATIONS_ACTIVE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const invitationsActiveRequest = createAction(\n INVITATIONS_ACTIVE_REQUEST\n);\nexport const invitationsActiveSuccess = createAction(\n INVITATIONS_ACTIVE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const invitationsActiveFailure = createAction(\n INVITATIONS_ACTIVE_FAILURE\n);\n// Delete a invitation\nexport const INVITATIONS_DELETE: string = \"INVITATIONS/DELETE\";\nexport const INVITATIONS_DELETE_REQUEST: string = \"INVITATIONS/DELETE/REQUEST\";\nexport const INVITATIONS_DELETE_SUCCESS: string = \"INVITATIONS/DELETE/SUCCESS\";\nexport const INVITATIONS_DELETE_FAILURE: string = \"INVITATIONS/DELETE/FAILURE\";\nexport const invitationsDelete = createAction(\n INVITATIONS_DELETE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const invitationsDeleteRequest = createAction(\n INVITATIONS_DELETE_REQUEST\n);\nexport const invitationsDeleteSuccess = createAction(\n INVITATIONS_DELETE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const invitationsDeleteFailure = createAction(\n INVITATIONS_DELETE_FAILURE\n);\n// Reset Invitation Loaded\nexport const INVITATIONS_RESET_INVITATION_LOADED: string =\n \"INVITATIONS/RESET/INVITATION_LOADED\";\nexport const invitationsResetInvitationLoaded = createAction(\n INVITATIONS_RESET_INVITATION_LOADED\n);\n","import { createAction } from \"deox\";\n\n// Actions for LocalStore\nexport const LOCALSTORE_SAVE: string = \"LOCALSTORE/SAVE\";\nexport const saveLocalStore = createAction(\n LOCALSTORE_SAVE,\n (resolve) => (payload?: object) => resolve(payload)\n);\n\nexport const LOCALSTORE_CLEAR_ALL: string = \"LOCALSTORE/CLEAR_ALL\";\nexport const clearAllLocalStore = createAction(LOCALSTORE_CLEAR_ALL);\n","import { createAction } from \"deox\";\n\n// Actions for Metrics\n\n// METRICS\n// METRICS PAGES\n// Fetch all metrics pages\nexport const METRICS_FETCH_METRICS_PAGES: string =\n \"METRICS/FETCH/METRICS_PAGES\";\nexport const METRICS_FETCH_METRICS_PAGES_REQUEST: string =\n \"METRICS/FETCH/METRICS_PAGES/REQUEST\";\nexport const METRICS_FETCH_METRICS_PAGES_SUCCESS: string =\n \"METRICS/FETCH/METRICS_PAGES/SUCCESS\";\nexport const METRICS_FETCH_METRICS_PAGES_FAILURE: string =\n \"METRICS/FETCH/METRICS_PAGES/FAILURE\";\nexport const metricsFetchMetricsPages = createAction(\n METRICS_FETCH_METRICS_PAGES,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const metricsFetchMetricsPagesRequest = createAction(\n METRICS_FETCH_METRICS_PAGES_REQUEST\n);\nexport const metricsFetchMetricsPagesSuccess = createAction(\n METRICS_FETCH_METRICS_PAGES_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const metricsFetchMetricsPagesFailure = createAction(\n METRICS_FETCH_METRICS_PAGES_FAILURE\n);\n// Create a Metric Page to show Charts for that\nexport const METRICS_CREATE_METRIC_PAGE: string = \"METRICS/CREATE/METRIC_PAGE\";\nexport const METRICS_CREATE_METRIC_PAGE_REQUEST: string =\n \"METRICS/CREATE/METRIC_PAGE/REQUEST\";\nexport const METRICS_CREATE_METRIC_PAGE_SUCCESS: string =\n \"METRICS/CREATE/METRIC_PAGE/SUCCESS\";\nexport const METRICS_CREATE_METRIC_PAGE_FAILURE: string =\n \"METRICS/CREATE/METRIC_PAGE/FAILURE\";\nexport const metricsCreateMetricPage = createAction(\n METRICS_CREATE_METRIC_PAGE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const metricsCreateMetricPageRequest = createAction(\n METRICS_CREATE_METRIC_PAGE_REQUEST\n);\nexport const metricsCreateMetricPageSuccess = createAction(\n METRICS_CREATE_METRIC_PAGE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const metricsCreateMetricPageFailure = createAction(\n METRICS_CREATE_METRIC_PAGE_FAILURE\n);\n// Set pageId to Fetch some metric page\nexport const METRICS_SET_PAGE_ID: string = \"METRICS/SET/PAGE_ID\";\nexport const metricsSetPageId = createAction(\n METRICS_SET_PAGE_ID,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Unset pageId\nexport const METRICS_UNSET_PAGE_ID: string = \"METRICS/UNSET/PAGE_ID\";\nexport const metricsUnsetPageId = createAction(\n METRICS_UNSET_PAGE_ID,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Fetch a Metric Page\nexport const METRICS_FETCH_METRIC_PAGE: string = \"METRICS/FETCH/METRIC_PAGE\";\nexport const METRICS_FETCH_METRIC_PAGE_REQUEST: string =\n \"METRICS/FETCH/METRIC_PAGE/REQUEST\";\nexport const METRICS_FETCH_METRIC_PAGE_SUCCESS: string =\n \"METRICS/FETCH/METRIC_PAGE/SUCCESS\";\nexport const METRICS_FETCH_METRIC_PAGE_FAILURE: string =\n \"METRICS/FETCH/METRIC_PAGE/FAILURE\";\nexport const metricsFetchMetricPage = createAction(\n METRICS_FETCH_METRIC_PAGE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const metricsFetchMetricPageRequest = createAction(\n METRICS_FETCH_METRIC_PAGE_REQUEST\n);\nexport const metricsFetchMetricPageSuccess = createAction(\n METRICS_FETCH_METRIC_PAGE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const metricsFetchMetricPageFailure = createAction(\n METRICS_FETCH_METRIC_PAGE_FAILURE\n);\n// Edit a Metric Page\nexport const METRICS_EDIT_METRIC_PAGE: string = \"METRICS/EDIT/METRIC_PAGE\";\nexport const METRICS_EDIT_METRIC_PAGE_REQUEST: string =\n \"METRICS/EDIT/METRIC_PAGE/REQUEST\";\nexport const METRICS_EDIT_METRIC_PAGE_SUCCESS: string =\n \"METRICS/EDIT/METRIC_PAGE/SUCCESS\";\nexport const METRICS_EDIT_METRIC_PAGE_FAILURE: string =\n \"METRICS/EDIT/METRIC_PAGE/FAILURE\";\nexport const metricsEditMetricPage = createAction(\n METRICS_EDIT_METRIC_PAGE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const metricsEditMetricPageRequest = createAction(\n METRICS_EDIT_METRIC_PAGE_REQUEST\n);\nexport const metricsEditMetricPageSuccess = createAction(\n METRICS_EDIT_METRIC_PAGE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const metricsEditMetricPageFailure = createAction(\n METRICS_EDIT_METRIC_PAGE_FAILURE\n);\n// Delete a Metric Page\nexport const METRICS_DELETE_METRIC_PAGE: string = \"METRICS/DELETE/METRIC_PAGE\";\nexport const METRICS_DELETE_METRIC_PAGE_REQUEST: string =\n \"METRICS/DELETE/METRIC_PAGE/REQUEST\";\nexport const METRICS_DELETE_METRIC_PAGE_SUCCESS: string =\n \"METRICS/DELETE/METRIC_PAGE/SUCCESS\";\nexport const METRICS_DELETE_METRIC_PAGE_FAILURE: string =\n \"METRICS/DELETE/METRIC_PAGE/FAILURE\";\nexport const metricsDeleteMetricPage = createAction(\n METRICS_DELETE_METRIC_PAGE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const metricsDeleteMetricPageRequest = createAction(\n METRICS_DELETE_METRIC_PAGE_REQUEST\n);\nexport const metricsDeleteMetricPageSuccess = createAction(\n METRICS_DELETE_METRIC_PAGE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const metricsDeleteMetricPageFailure = createAction(\n METRICS_DELETE_METRIC_PAGE_FAILURE\n);\n// END METRICS PAGES />\n\n// METRICS PAGES - CHARTS\n// Fetch all charts from some Metric Page with that specific pageId\nexport const METRICS_FETCH_METRIC_PAGE_CHARTS: string =\n \"METRICS/FETCH/METRIC_PAGE/CHARTS\";\nexport const METRICS_FETCH_METRIC_PAGE_CHARTS_REQUEST: string =\n \"METRICS/FETCH/METRIC_PAGE/CHARTS/REQUEST\";\nexport const METRICS_FETCH_METRIC_PAGE_CHARTS_SUCCESS: string =\n \"METRICS/FETCH/METRIC_PAGE/CHARTS/SUCCESS\";\nexport const METRICS_FETCH_METRIC_PAGE_CHARTS_FAILURE: string =\n \"METRICS/FETCH/METRIC_PAGE/CHARTS/FAILURE\";\nexport const metricsFetchMetricPageCharts = createAction(\n METRICS_FETCH_METRIC_PAGE_CHARTS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const metricsFetchMetricPageChartsRequest = createAction(\n METRICS_FETCH_METRIC_PAGE_CHARTS_REQUEST\n);\nexport const metricsFetchMetricPageChartsSuccess = createAction(\n METRICS_FETCH_METRIC_PAGE_CHARTS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const metricsFetchMetricPageChartsFailure = createAction(\n METRICS_FETCH_METRIC_PAGE_CHARTS_FAILURE\n);\n// Create a Chart from some specific Metric Page to show it\nexport const METRICS_CREATE_METRIC_PAGE_CHART: string =\n \"METRICS/CREATE/METRIC_PAGE/CHART\";\nexport const METRICS_CREATE_METRIC_PAGE_CHART_REQUEST: string =\n \"METRICS/CREATE/METRIC_PAGE/CHART/REQUEST\";\nexport const METRICS_CREATE_METRIC_PAGE_CHART_SUCCESS: string =\n \"METRICS/CREATE/METRIC_PAGE/CHART/SUCCESS\";\nexport const METRICS_CREATE_METRIC_PAGE_CHART_FAILURE: string =\n \"METRICS/CREATE/METRIC_PAGE/CHART/FAILURE\";\nexport const metricsCreateMetricPageChart = createAction(\n METRICS_CREATE_METRIC_PAGE_CHART,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const metricsCreateMetricPageChartRequest = createAction(\n METRICS_CREATE_METRIC_PAGE_CHART_REQUEST\n);\nexport const metricsCreateMetricPageChartSuccess = createAction(\n METRICS_CREATE_METRIC_PAGE_CHART_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const metricsCreateMetricPageChartFailure = createAction(\n METRICS_CREATE_METRIC_PAGE_CHART_FAILURE\n);\n// Set chartId to Fetch some metric page with some chart\nexport const METRICS_SET_CHART_ID: string = \"METRICS/SET/CHART_ID\";\nexport const metricsSetChartId = createAction(\n METRICS_SET_CHART_ID,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Unset chartId\nexport const METRICS_UNSET_CHART_ID: string = \"METRICS/UNSET/CHART_ID\";\nexport const metricsUnsetChartId = createAction(\n METRICS_UNSET_CHART_ID,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Fetch a Chart from specific Metric Page\nexport const METRICS_FETCH_METRIC_PAGE_CHART: string =\n \"METRICS/FETCH/METRIC_PAGE/CHART\";\nexport const METRICS_FETCH_METRIC_PAGE_CHART_REQUEST: string =\n \"METRICS/FETCH/METRIC_PAGE/CHART/REQUEST\";\nexport const METRICS_FETCH_METRIC_PAGE_CHART_SUCCESS: string =\n \"METRICS/FETCH/METRIC_PAGE/CHART/SUCCESS\";\nexport const METRICS_FETCH_METRIC_PAGE_CHART_FAILURE: string =\n \"METRICS/FETCH/METRIC_PAGE/CHART/FAILURE\";\nexport const metricsFetchMetricPageChart = createAction(\n METRICS_FETCH_METRIC_PAGE_CHART,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const metricsFetchMetricPageChartRequest = createAction(\n METRICS_FETCH_METRIC_PAGE_CHART_REQUEST\n);\nexport const metricsFetchMetricPageChartSuccess = createAction(\n METRICS_FETCH_METRIC_PAGE_CHART_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const metricsFetchMetricPageChartFailure = createAction(\n METRICS_FETCH_METRIC_PAGE_CHART_FAILURE\n);\n// Edit a Chart from some Metric Page\nexport const METRICS_EDIT_METRIC_PAGE_CHART: string =\n \"METRICS/EDIT/METRIC_PAGE/CHART\";\nexport const METRICS_EDIT_METRIC_PAGE_CHART_REQUEST: string =\n \"METRICS/EDIT/METRIC_PAGE/CHART/REQUEST\";\nexport const METRICS_EDIT_METRIC_PAGE_CHART_SUCCESS: string =\n \"METRICS/EDIT/METRIC_PAGE/CHART/SUCCESS\";\nexport const METRICS_EDIT_METRIC_PAGE_CHART_FAILURE: string =\n \"METRICS/EDIT/METRIC_PAGE/CHART/FAILURE\";\nexport const metricsEditMetricPageChart = createAction(\n METRICS_EDIT_METRIC_PAGE_CHART,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const metricsEditMetricPageChartRequest = createAction(\n METRICS_EDIT_METRIC_PAGE_CHART_REQUEST\n);\nexport const metricsEditMetricPageChartSuccess = createAction(\n METRICS_EDIT_METRIC_PAGE_CHART_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const metricsEditMetricPageChartFailure = createAction(\n METRICS_EDIT_METRIC_PAGE_CHART_FAILURE\n);\n// Delete a Chart from some Metric Page\nexport const METRICS_DELETE_METRIC_PAGE_CHART: string =\n \"METRICS/DELETE/METRIC_PAGE/CHART\";\nexport const METRICS_DELETE_METRIC_PAGE_CHART_REQUEST: string =\n \"METRICS/DELETE/METRIC_PAGE/CHART/REQUEST\";\nexport const METRICS_DELETE_METRIC_PAGE_CHART_SUCCESS: string =\n \"METRICS/DELETE/METRIC_PAGE/CHART/SUCCESS\";\nexport const METRICS_DELETE_METRIC_PAGE_CHART_FAILURE: string =\n \"METRICS/DELETE/METRIC_PAGE/CHART/FAILURE\";\nexport const metricsDeleteMetricPageChart = createAction(\n METRICS_DELETE_METRIC_PAGE_CHART,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const metricsDeleteMetricPageChartRequest = createAction(\n METRICS_DELETE_METRIC_PAGE_CHART_REQUEST\n);\nexport const metricsDeleteMetricPageChartSuccess = createAction(\n METRICS_DELETE_METRIC_PAGE_CHART_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const metricsDeleteMetricPageChartFailure = createAction(\n METRICS_DELETE_METRIC_PAGE_CHART_FAILURE\n);\n// END METRICS PAGES - CHARTS />\n","import { createAction } from \"deox\";\n// Actions for Notification\n\n// SOCKET\n// Register Socket\nexport const NOTIFICATIONS_REGISTER_SOCKET: string =\n \"NOTIFICATIONS/REGISTER/SOCKET\";\nexport const NOTIFICATIONS_REGISTER_SOCKET_REQUEST: string =\n \"NOTIFICATIONS/REGISTER/SOCKET/REQUEST\";\nexport const NOTIFICATIONS_REGISTER_SOCKET_SUCCESS: string =\n \"NOTIFICATIONS/REGISTER/SOCKET/SUCCESS\";\nexport const NOTIFICATIONS_REGISTER_SOCKET_FAILURE: string =\n \"NOTIFICATIONS/REGISTER/SOCKET/FAILURE\";\nexport const notificationsRegisterSocket = createAction(\n NOTIFICATIONS_REGISTER_SOCKET,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const notificationsRegisterSocketRequest = createAction(\n NOTIFICATIONS_REGISTER_SOCKET_REQUEST\n);\nexport const notificationsRegisterSocketSuccess = createAction(\n NOTIFICATIONS_REGISTER_SOCKET_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const notificationsRegisterSocketFailure = createAction(\n NOTIFICATIONS_REGISTER_SOCKET_FAILURE\n);\n// Set socket to start getting notifications with one socketConnectionId\nexport const NOTIFICATIONS_SET_SOCKET_CONNECTION_ID: string =\n \"NOTIFICATIONS/SET/SOCKET/CONNECTION_ID\";\nexport const NOTIFICATIONS_SET_SOCKET_CONNECTION_ID_REQUEST: string =\n \"NOTIFICATIONS/SET/SOCKET/CONNECTION_ID/REQUEST\";\nexport const NOTIFICATIONS_SET_SOCKET_CONNECTION_ID_SUCCESS: string =\n \"NOTIFICATIONS/SET/SOCKET/CONNECTION_ID/SUCCESS\";\nexport const NOTIFICATIONS_SET_SOCKET_CONNECTION_ID_FAILURE: string =\n \"NOTIFICATIONS/SET/SOCKET/CONNECTION_ID/FAILURE\";\nexport const notificationsSetSocketConnectionId = createAction(\n NOTIFICATIONS_SET_SOCKET_CONNECTION_ID,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const notificationsSetSocketConnectionIdRequest = createAction(\n NOTIFICATIONS_SET_SOCKET_CONNECTION_ID_REQUEST,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const notificationsSetSocketConnectionIdSuccess = createAction(\n NOTIFICATIONS_SET_SOCKET_CONNECTION_ID_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const notificationsSetSocketConnectionIdFailure = createAction(\n NOTIFICATIONS_SET_SOCKET_CONNECTION_ID_FAILURE\n);\n// Disconnect socket\nexport const NOTIFICATIONS_DISCONNECT_SOCKET: string =\n \"NOTIFICATIONS/DISCONNECT/SOCKET\";\nexport const notificationsDisconnectSocket = createAction(\n NOTIFICATIONS_DISCONNECT_SOCKET,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Add some notification from socket\nexport const NOTIFICATIONS_SOCKET_ADD_NOTIFICATION: string =\n \"NOTIFICATIONS/SOCKET/ADD/NOTIFICATION\";\nexport const notificationsSocketAddNotification = createAction(\n NOTIFICATIONS_SOCKET_ADD_NOTIFICATION,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// NOTIFICATIONS\n// Fetch Notifications\nexport const NOTIFICATIONS_FETCH_NOTIFICATIONS: string =\n \"NOTIFICATIONS/FETCH/NOTIFICATIONS\";\nexport const NOTIFICATIONS_FETCH_NOTIFICATIONS_REQUEST: string =\n \"NOTIFICATIONS/FETCH/NOTIFICATIONS/REQUEST\";\nexport const NOTIFICATIONS_FETCH_NOTIFICATIONS_SUCCESS: string =\n \"NOTIFICATIONS/FETCH/NOTIFICATIONS/SUCCESS\";\nexport const NOTIFICATIONS_FETCH_NOTIFICATIONS_FAILURE: string =\n \"NOTIFICATIONS/FETCH/NOTIFICATIONS/FAILURE\";\nexport const notificationsFetchNotifications = createAction(\n NOTIFICATIONS_FETCH_NOTIFICATIONS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const notificationsFetchNotificationsRequest = createAction(\n NOTIFICATIONS_FETCH_NOTIFICATIONS_REQUEST,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const notificationsFetchNotificationsSuccess = createAction(\n NOTIFICATIONS_FETCH_NOTIFICATIONS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const notificationsFetchNotificationsFailure = createAction(\n NOTIFICATIONS_FETCH_NOTIFICATIONS_FAILURE\n);\n// Set Notifications Categories\nexport const NOTIFICATIONS_SET_NOTIFICATIONS_CATEGORIES: string =\n \"NOTIFICATIONS/SET/NOTIFICATIONS_CATEGORIES\";\nexport const notificationsSetNotificationsCategories = createAction(\n NOTIFICATIONS_SET_NOTIFICATIONS_CATEGORIES,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Clear Notifications Categories\nexport const NOTIFICATIONS_CLEAR_NOTIFICATIONS_CATEGORIES: string =\n \"NOTIFICATIONS/CLEAR/NOTIFICATIONS_CATEGORIES\";\nexport const notificationsClearNotificationsCategories = createAction(\n NOTIFICATIONS_CLEAR_NOTIFICATIONS_CATEGORIES,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Mark as read a list of notifications\nexport const NOTIFICATIONS_MARK_AS_READ_NOTIFICATIONS: string =\n \"NOTIFICATIONS/MARK_AS_READ/NOTIFICATIONS\";\nexport const NOTIFICATIONS_MARK_AS_READ_NOTIFICATIONS_REQUEST: string =\n \"NOTIFICATIONS/MARK_AS_READ/NOTIFICATIONS/REQUEST\";\nexport const NOTIFICATIONS_MARK_AS_READ_NOTIFICATIONS_SUCCESS: string =\n \"NOTIFICATIONS/MARK_AS_READ/NOTIFICATIONS/SUCCESS\";\nexport const NOTIFICATIONS_MARK_AS_READ_NOTIFICATIONS_FAILURE: string =\n \"NOTIFICATIONS/MARK_AS_READ/NOTIFICATIONS/FAILURE\";\nexport const notificationsMarkAsReadNotifications = createAction(\n NOTIFICATIONS_MARK_AS_READ_NOTIFICATIONS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const notificationsMarkAsReadNotificationsRequest = createAction(\n NOTIFICATIONS_MARK_AS_READ_NOTIFICATIONS_REQUEST\n);\nexport const notificationsMarkAsReadNotificationsSuccess = createAction(\n NOTIFICATIONS_MARK_AS_READ_NOTIFICATIONS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const notificationsMarkAsReadNotificationsFailure = createAction(\n NOTIFICATIONS_MARK_AS_READ_NOTIFICATIONS_FAILURE\n);\n// Update last seen notification\nexport const NOTIFICATIONS_LAST_SEEN_NOTIFICATION: string =\n \"NOTIFICATIONS/LAST_SEEN/NOTIFICATION\";\nexport const NOTIFICATIONS_LAST_SEEN_NOTIFICATION_REQUEST: string =\n \"NOTIFICATIONS/LAST_SEEN/NOTIFICATION/REQUEST\";\nexport const NOTIFICATIONS_LAST_SEEN_NOTIFICATION_SUCCESS: string =\n \"NOTIFICATIONS/LAST_SEEN/NOTIFICATION/SUCCESS\";\nexport const NOTIFICATIONS_LAST_SEEN_NOTIFICATION_FAILURE: string =\n \"NOTIFICATIONS/LAST_SEEN/NOTIFICATION/FAILURE\";\nexport const notificationsLastSeenNotification = createAction(\n NOTIFICATIONS_LAST_SEEN_NOTIFICATION,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const notificationsLastSeenNotificationRequest = createAction(\n NOTIFICATIONS_LAST_SEEN_NOTIFICATION_REQUEST\n);\nexport const notificationsLastSeenNotificationSuccess = createAction(\n NOTIFICATIONS_LAST_SEEN_NOTIFICATION_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const notificationsLastSeenNotificationFailure = createAction(\n NOTIFICATIONS_LAST_SEEN_NOTIFICATION_FAILURE\n);\n// Delete a list of notifications or a notification\nexport const NOTIFICATIONS_DELETE: string = \"NOTIFICATIONS/DELETE\";\nexport const NOTIFICATIONS_DELETE_REQUEST: string =\n \"NOTIFICATIONS/DELETE/REQUEST\";\nexport const NOTIFICATIONS_DELETE_SUCCESS: string =\n \"NOTIFICATIONS/DELETE/SUCCESS\";\nexport const NOTIFICATIONS_DELETE_FAILURE: string =\n \"NOTIFICATIONS/DELETE/FAILURE\";\nexport const notificationsDelete = createAction(\n NOTIFICATIONS_DELETE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const notificationsDeleteRequest = createAction(\n NOTIFICATIONS_DELETE_REQUEST\n);\nexport const notificationsDeleteSuccess = createAction(\n NOTIFICATIONS_DELETE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const notificationsDeleteFailure = createAction(\n NOTIFICATIONS_DELETE_FAILURE\n);\n// TODO:\n// Delete Reminders, it is not being used\n// Create a Reminders Notification\nexport const NOTIFICATIONS_CREATE_REMINDERS: string =\n \"NOTIFICATIONS/CREATE/REMINDERS\";\nexport const NOTIFICATIONS_CREATE_REMINDERS_REQUEST: string =\n \"NOTIFICATIONS/CREATE/REMINDERS/REQUEST\";\nexport const NOTIFICATIONS_CREATE_REMINDERS_SUCCESS: string =\n \"NOTIFICATIONS/CREATE/REMINDERS/SUCCESS\";\nexport const NOTIFICATIONS_CREATE_REMINDERS_FAILURE: string =\n \"NOTIFICATIONS/CREATE/REMINDERS/FAILURE\";\nexport const notificationsCreateReminders = createAction(\n NOTIFICATIONS_CREATE_REMINDERS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const notificationsCreateRemindersRequest = createAction(\n NOTIFICATIONS_CREATE_REMINDERS_REQUEST\n);\nexport const notificationsCreateRemindersSuccess = createAction(\n NOTIFICATIONS_CREATE_REMINDERS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const notificationsCreateRemindersFailure = createAction(\n NOTIFICATIONS_CREATE_REMINDERS_FAILURE\n);\n","import { createAction } from \"deox\";\n// Actions for Periods\n// Fetch all periods\nexport const PERIODS_FETCH_ALL: string = \"PERIODS/FETCH/ALL\";\nexport const PERIODS_FETCH_ALL_REQUEST: string = \"PERIODS/FETCH/ALL/REQUEST\";\nexport const PERIODS_FETCH_ALL_SUCCESS: string = \"PERIODS/FETCH/ALL/SUCCESS\";\nexport const PERIODS_FETCH_ALL_FAILURE: string = \"PERIODS/FETCH/ALL/FAILURE\";\nexport const periodsFetchAll = createAction(\n PERIODS_FETCH_ALL,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const periodsFetchAllRequest = createAction(PERIODS_FETCH_ALL_REQUEST);\nexport const periodsFetchAllSuccess = createAction(\n PERIODS_FETCH_ALL_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const periodsFetchAllFailure = createAction(PERIODS_FETCH_ALL_FAILURE);\n// Create a Period\nexport const PERIODS_CREATE: string = \"PERIODS/CREATE\";\nexport const PERIODS_CREATE_REQUEST: string = \"PERIODS/CREATE/REQUEST\";\nexport const PERIODS_CREATE_SUCCESS: string = \"PERIODS/CREATE/SUCCESS\";\nexport const PERIODS_CREATE_FAILURE: string = \"PERIODS/CREATE/FAILURE\";\nexport const periodsCreate = createAction(\n PERIODS_CREATE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const periodsCreateRequest = createAction(PERIODS_CREATE_REQUEST);\nexport const periodsCreateSuccess = createAction(\n PERIODS_CREATE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const periodsCreateFailure = createAction(PERIODS_CREATE_FAILURE);\n// Edit a Period\nexport const PERIODS_EDIT: string = \"PERIODS/EDIT\";\nexport const PERIODS_EDIT_REQUEST: string = \"PERIODS/EDIT/REQUEST\";\nexport const PERIODS_EDIT_SUCCESS: string = \"PERIODS/EDIT/SUCCESS\";\nexport const PERIODS_EDIT_FAILURE: string = \"PERIODS/EDIT/FAILURE\";\nexport const periodsEdit = createAction(\n PERIODS_EDIT,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const periodsEditRequest = createAction(PERIODS_EDIT_REQUEST);\nexport const periodsEditSuccess = createAction(\n PERIODS_EDIT_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const periodsEditFailure = createAction(PERIODS_EDIT_FAILURE);\n// Delete a Period\nexport const PERIODS_DELETE: string = \"PERIODS/DELETE\";\nexport const PERIODS_DELETE_REQUEST: string = \"PERIODS/DELETE/REQUEST\";\nexport const PERIODS_DELETE_SUCCESS: string = \"PERIODS/DELETE/SUCCESS\";\nexport const PERIODS_DELETE_FAILURE: string = \"PERIODS/DELETE/FAILURE\";\nexport const periodsDelete = createAction(\n PERIODS_DELETE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const periodsDeleteRequest = createAction(PERIODS_DELETE_REQUEST);\nexport const periodsDeleteSuccess = createAction(\n PERIODS_DELETE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const periodsDeleteFailure = createAction(PERIODS_DELETE_FAILURE);\n","import { createAction } from \"deox\";\n\n// Actions for Programs\n\n// Fetch all Programs\nexport const PROGRAMS_FETCH_PROGRAMS: string = \"PROGRAMS/FETCH/PROGRAMS\";\nexport const PROGRAMS_FETCH_PROGRAMS_REQUEST: string =\n \"PROGRAMS/FETCH/PROGRAMS/REQUEST\";\nexport const PROGRAMS_FETCH_PROGRAMS_SUCCESS: string =\n \"PROGRAMS/FETCH/PROGRAMS/SUCCESS\";\nexport const PROGRAMS_FETCH_PROGRAMS_FAILURE: string =\n \"PROGRAMS/FETCH/PROGRAMS/FAILURE\";\nexport const programsFetchPrograms = createAction(\n PROGRAMS_FETCH_PROGRAMS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const programsFetchProgramsRequest = createAction(\n PROGRAMS_FETCH_PROGRAMS_REQUEST\n);\nexport const programsFetchProgramsSuccess = createAction(\n PROGRAMS_FETCH_PROGRAMS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const programsFetchProgramsFailure = createAction(\n PROGRAMS_FETCH_PROGRAMS_FAILURE\n);\n// Create a Program\nexport const PROGRAMS_CREATE: string = \"PROGRAMS/CREATE\";\nexport const PROGRAMS_CREATE_REQUEST: string = \"PROGRAMS/CREATE/REQUEST\";\nexport const PROGRAMS_CREATE_SUCCESS: string = \"PROGRAMS/CREATE/SUCCESS\";\nexport const PROGRAMS_CREATE_FAILURE: string = \"PROGRAMS/CREATE/FAILURE\";\nexport const programsCreate = createAction(\n PROGRAMS_CREATE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const programsCreateRequest = createAction(PROGRAMS_CREATE_REQUEST);\nexport const programsCreateSuccess = createAction(\n PROGRAMS_CREATE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const programsCreateFailure = createAction(PROGRAMS_CREATE_FAILURE);\n// Edit a Program\nexport const PROGRAMS_EDIT_PROGRAM: string = \"PROGRAMS/EDIT/PROGRAM\";\nexport const PROGRAMS_EDIT_PROGRAM_REQUEST: string =\n \"PROGRAMS/EDIT/PROGRAM/REQUEST\";\nexport const PROGRAMS_EDIT_PROGRAM_SUCCESS: string =\n \"PROGRAMS/EDIT/PROGRAM/SUCCESS\";\nexport const PROGRAMS_EDIT_PROGRAM_FAILURE: string =\n \"PROGRAMS/EDIT/PROGRAM/FAILURE\";\nexport const programsEditProgram = createAction(\n PROGRAMS_EDIT_PROGRAM,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const programsEditProgramRequest = createAction(\n PROGRAMS_EDIT_PROGRAM_REQUEST\n);\nexport const programsEditProgramSuccess = createAction(\n PROGRAMS_EDIT_PROGRAM_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const programsEditProgramFailure = createAction(\n PROGRAMS_EDIT_PROGRAM_FAILURE\n);\n// Delete a Program\nexport const PROGRAMS_DELETE: string = \"PROGRAMS/DELETE\";\nexport const PROGRAMS_DELETE_REQUEST: string = \"PROGRAMS/DELETE/REQUEST\";\nexport const PROGRAMS_DELETE_SUCCESS: string = \"PROGRAMS/DELETE/SUCCESS\";\nexport const PROGRAMS_DELETE_FAILURE: string = \"PROGRAMS/DELETE/FAILURE\";\nexport const programsDelete = createAction(\n PROGRAMS_DELETE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const programsDeleteRequest = createAction(PROGRAMS_DELETE_REQUEST);\nexport const programsDeleteSuccess = createAction(\n PROGRAMS_DELETE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const programsDeleteFailure = createAction(PROGRAMS_DELETE_FAILURE);\n","import { createAction } from \"deox\";\n\n// Actions for Reports and Queries\n\n// QUERIES\n// Fetch all queries\nexport const REPORTS_FETCH_QUERIES: string = \"REPORTS/FETCH/QUERIES\";\nexport const REPORTS_FETCH_QUERIES_REQUEST: string =\n \"REPORTS/FETCH/QUERIES/REQUEST\";\nexport const REPORTS_FETCH_QUERIES_SUCCESS: string =\n \"REPORTS/FETCH/QUERIES/SUCCESS\";\nexport const REPORTS_FETCH_QUERIES_FAILURE: string =\n \"REPORTS/FETCH/QUERIES/FAILURE\";\nexport const reportsFetchQueries = createAction(\n REPORTS_FETCH_QUERIES,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const reportsFetchQueriesRequest = createAction(\n REPORTS_FETCH_QUERIES_REQUEST\n);\nexport const reportsFetchQueriesSuccess = createAction(\n REPORTS_FETCH_QUERIES_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const reportsFetchQueriesFailure = createAction(\n REPORTS_FETCH_QUERIES_FAILURE\n);\n// Create a Query to run Reports for that\nexport const REPORTS_CREATE_QUERY: string = \"REPORTS/CREATE/QUERY\";\nexport const REPORTS_CREATE_QUERY_REQUEST: string =\n \"REPORTS/CREATE/QUERY/REQUEST\";\nexport const REPORTS_CREATE_QUERY_SUCCESS: string =\n \"REPORTS/CREATE/QUERY/SUCCESS\";\nexport const REPORTS_CREATE_QUERY_FAILURE: string =\n \"REPORTS/CREATE/QUERY/FAILURE\";\nexport const reportsCreateQuery = createAction(\n REPORTS_CREATE_QUERY,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const reportsCreateQueryRequest = createAction(\n REPORTS_CREATE_QUERY_REQUEST\n);\nexport const reportsCreateQuerySuccess = createAction(\n REPORTS_CREATE_QUERY_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const reportsCreateQueryFailure = createAction(\n REPORTS_CREATE_QUERY_FAILURE\n);\n// Set queryId to Fetch some query\nexport const REPORTS_SET_QUERY_ID: string = \"REPORTS/SET/QUERY_ID\";\nexport const reportsSetQueryId = createAction(\n REPORTS_SET_QUERY_ID,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Unset queryId\nexport const REPORTS_UNSET_QUERY_ID: string = \"REPORTS/UNSET/QUERY_ID\";\nexport const reportsUnsetQueryId = createAction(\n REPORTS_UNSET_QUERY_ID,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Fetch a Query\nexport const REPORTS_FETCH_QUERY: string = \"REPORTS/FETCH/QUERY\";\nexport const REPORTS_FETCH_QUERY_REQUEST: string =\n \"REPORTS/FETCH/QUERY/REQUEST\";\nexport const REPORTS_FETCH_QUERY_SUCCESS: string =\n \"REPORTS/FETCH/QUERY/SUCCESS\";\nexport const REPORTS_FETCH_QUERY_FAILURE: string =\n \"REPORTS/FETCH/QUERY/FAILURE\";\nexport const reportsFetchQuery = createAction(\n REPORTS_FETCH_QUERY,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const reportsFetchQueryRequest = createAction(\n REPORTS_FETCH_QUERY_REQUEST\n);\nexport const reportsFetchQuerySuccess = createAction(\n REPORTS_FETCH_QUERY_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const reportsFetchQueryFailure = createAction(\n REPORTS_FETCH_QUERY_FAILURE\n);\n// Edit a Query\nexport const REPORTS_EDIT_QUERY: string = \"REPORTS/EDIT/QUERY\";\nexport const REPORTS_EDIT_QUERY_REQUEST: string = \"REPORTS/EDIT/QUERY/REQUEST\";\nexport const REPORTS_EDIT_QUERY_SUCCESS: string = \"REPORTS/EDIT/QUERY/SUCCESS\";\nexport const REPORTS_EDIT_QUERY_FAILURE: string = \"REPORTS/EDIT/QUERY/FAILURE\";\nexport const reportsEditQuery = createAction(\n REPORTS_EDIT_QUERY,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const reportsEditQueryRequest = createAction(REPORTS_EDIT_QUERY_REQUEST);\nexport const reportsEditQuerySuccess = createAction(\n REPORTS_EDIT_QUERY_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const reportsEditQueryFailure = createAction(REPORTS_EDIT_QUERY_FAILURE);\n// Delete Query\nexport const REPORTS_DELETE_QUERY: string = \"REPORTS/DELETE/QUERY\";\nexport const REPORTS_DELETE_QUERY_REQUEST: string =\n \"REPORTS/DELETE/QUERY/REQUEST\";\nexport const REPORTS_DELETE_QUERY_SUCCESS: string =\n \"REPORTS/DELETE/QUERY/SUCCESS\";\nexport const REPORTS_DELETE_QUERY_FAILURE: string =\n \"REPORTS/DELETE/QUERY/FAILURE\";\nexport const reportsDeleteQuery = createAction(\n REPORTS_DELETE_QUERY,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const reportsDeleteQueryRequest = createAction(\n REPORTS_DELETE_QUERY_REQUEST\n);\nexport const reportsDeleteQuerySuccess = createAction(\n REPORTS_DELETE_QUERY_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const reportsDeleteQueryFailure = createAction(\n REPORTS_DELETE_QUERY_FAILURE\n);\n// Run this query to get report result\nexport const REPORTS_RUN_QUERY: string = \"REPORTS/RUN/QUERY\";\nexport const REPORTS_RUN_QUERY_REQUEST: string = \"REPORTS/RUN/QUERY/REQUEST\";\nexport const REPORTS_RUN_QUERY_SUCCESS: string = \"REPORTS/RUN/QUERY/SUCCESS\";\nexport const REPORTS_RUN_QUERY_FAILURE: string = \"REPORTS/RUN/QUERY/FAILURE\";\nexport const reportsRunQuery = createAction(\n REPORTS_RUN_QUERY,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const reportsRunQueryRequest = createAction(REPORTS_RUN_QUERY_REQUEST);\nexport const reportsRunQuerySuccess = createAction(\n REPORTS_RUN_QUERY_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const reportsRunQueryFailure = createAction(REPORTS_RUN_QUERY_FAILURE);\n// Reset Query Loaded\nexport const REPORTS_RESET_QUERY_LOADED: string = \"REPORTS/RESET/QUERY_LOADED\";\nexport const reportsResetQueryLoaded = createAction(REPORTS_RESET_QUERY_LOADED);\n// Query Create and Edit:\nexport const REPORTS_QUERY_CREATE_EDIT_UPDATE: string =\n \"REPORTS/QUERY/CREATE/UPDATE\";\nexport const reportsQueryCreateEditUpdate = createAction(\n REPORTS_QUERY_CREATE_EDIT_UPDATE,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Create and Edit Query Reset process\nexport const REPORTS_QUERY_CREATE_EDIT_RESET: string =\n \"REPORTS/QUERY/CREATE/RESET\";\nexport const reportsQueryCreateEditReset = createAction(\n REPORTS_QUERY_CREATE_EDIT_RESET\n);\n// END QUERIES />\n\n// REPORTS\n// Fetch all reports\nexport const REPORTS_FETCH_REPORTS: string = \"REPORTS/FETCH/REPORTS\";\nexport const REPORTS_FETCH_REPORTS_REQUEST: string =\n \"REPORTS/FETCH/REPORTS/REQUEST\";\nexport const REPORTS_FETCH_REPORTS_SUCCESS: string =\n \"REPORTS/FETCH/REPORTS/SUCCESS\";\nexport const REPORTS_FETCH_REPORTS_FAILURE: string =\n \"REPORTS/FETCH/REPORTS/FAILURE\";\nexport const reportsFetchReports = createAction(\n REPORTS_FETCH_REPORTS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const reportsFetchReportsRequest = createAction(\n REPORTS_FETCH_REPORTS_REQUEST\n);\nexport const reportsFetchReportsSuccess = createAction(\n REPORTS_FETCH_REPORTS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const reportsFetchReportsFailure = createAction(\n REPORTS_FETCH_REPORTS_FAILURE\n);\n// END REPORTS />\n\n// REPORTS QUERIES\n// Fetch all reports from some query set up before\nexport const REPORTS_QUERIES_FETCH_REPORTS: string =\n \"REPORTS/QUERIES/FETCH/REPORTS\";\nexport const REPORTS_QUERIES_FETCH_REPORTS_REQUEST: string =\n \"REPORTS/QUERIES/FETCH/REPORTS/REQUEST\";\nexport const REPORTS_QUERIES_FETCH_REPORTS_SUCCESS: string =\n \"REPORTS/QUERIES/FETCH/REPORTS/SUCCESS\";\nexport const REPORTS_QUERIES_FETCH_REPORTS_FAILURE: string =\n \"REPORTS/QUERIES/FETCH/REPORTS/FAILURE\";\nexport const reportsQueriesFetchReports = createAction(\n REPORTS_QUERIES_FETCH_REPORTS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const reportsQueriesFetchReportsRequest = createAction(\n REPORTS_QUERIES_FETCH_REPORTS_REQUEST\n);\nexport const reportsQueriesFetchReportsSuccess = createAction(\n REPORTS_QUERIES_FETCH_REPORTS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const reportsQueriesFetchReportsFailure = createAction(\n REPORTS_QUERIES_FETCH_REPORTS_FAILURE\n);\n// Show or Hide report warning message to let you know there are reports\n// to check it into reports views\nexport const REPORTS_QUERIES_SHOW_REPORT_WARNING: string =\n \"REPORTS/QUERIES/SHOW/REPORT_WARNING\";\nexport const reportsQueriesShowReportWarning = createAction(\n REPORTS_QUERIES_SHOW_REPORT_WARNING,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const REPORTS_QUERIES_HIDE_REPORT_WARNING: string =\n \"REPORTS/QUERIES/HIDE/REPORT_WARNING\";\nexport const reportsQueriesHideReportWarning = createAction(\n REPORTS_QUERIES_HIDE_REPORT_WARNING,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Set reportId to Fetch results from some historic reports\nexport const REPORTS_QUERIES_SET_REPORT_ID: string =\n \"REPORTS/QUERIES/SET/REPORT_ID\";\nexport const reportsQueriesSetReportId = createAction(\n REPORTS_QUERIES_SET_REPORT_ID,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Unset reportId\nexport const REPORTS_QUERIES_UNSET_REPORT_ID: string =\n \"REPORTS/QUERIES/UNSET/REPORT_ID\";\nexport const reportsQueriesUnsetReportId = createAction(\n REPORTS_QUERIES_UNSET_REPORT_ID,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Fetch results from some historic reports\nexport const REPORTS_QUERIES_FETCH_REPORT: string =\n \"REPORTS/QUERIES/FETCH/REPORT\";\nexport const REPORTS_QUERIES_FETCH_REPORT_REQUEST: string =\n \"REPORTS/QUERIES/FETCH/REPORT/REQUEST\";\nexport const REPORTS_QUERIES_FETCH_REPORT_SUCCESS: string =\n \"REPORTS/QUERIES/FETCH/REPORT/SUCCESS\";\nexport const REPORTS_QUERIES_FETCH_REPORT_FAILURE: string =\n \"REPORTS/QUERIES/FETCH/REPORT/FAILURE\";\nexport const reportsQueriesFetchReport = createAction(\n REPORTS_QUERIES_FETCH_REPORT,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const reportsQueriesFetchReportRequest = createAction(\n REPORTS_QUERIES_FETCH_REPORT_REQUEST\n);\nexport const reportsQueriesFetchReportSuccess = createAction(\n REPORTS_QUERIES_FETCH_REPORT_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const reportsQueriesFetchReportFailure = createAction(\n REPORTS_QUERIES_FETCH_REPORT_FAILURE\n);\n// Update some report from some historics reports\n// Edit a Report\nexport const REPORTS_QUERIES_EDIT_REPORT: string =\n \"REPORTS/QUERIES/EDIT/REPORT\";\nexport const REPORTS_QUERIES_EDIT_REPORT_REQUEST: string =\n \"REPORTS/QUERIES/EDIT/REPORT/REQUEST\";\nexport const REPORTS_QUERIES_EDIT_REPORT_SUCCESS: string =\n \"REPORTS/QUERIES/EDIT/REPORT/SUCCESS\";\nexport const REPORTS_QUERIES_EDIT_REPORT_FAILURE: string =\n \"REPORTS/QUERIES/EDIT/REPORT/FAILURE\";\nexport const reportsQueriesEditReport = createAction(\n REPORTS_QUERIES_EDIT_REPORT,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const reportsQueriesEditReportRequest = createAction(\n REPORTS_QUERIES_EDIT_REPORT_REQUEST\n);\nexport const reportsQueriesEditReportSuccess = createAction(\n REPORTS_QUERIES_EDIT_REPORT_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const reportsQueriesEditReportFailure = createAction(\n REPORTS_QUERIES_EDIT_REPORT_FAILURE\n);\n// Delete Report\nexport const REPORTS_QUERIES_DELETE_REPORT: string =\n \"REPORTS/QUERIES/DELETE/REPORT\";\nexport const REPORTS_QUERIES_DELETE_REPORT_REQUEST: string =\n \"REPORTS/QUERIES/DELETE/REPORT/REQUEST\";\nexport const REPORTS_QUERIES_DELETE_REPORT_SUCCESS: string =\n \"REPORTS/QUERIES/DELETE/REPORT/SUCCESS\";\nexport const REPORTS_QUERIES_DELETE_REPORT_FAILURE: string =\n \"REPORTS/QUERIES/DELETE/REPORT/FAILURE\";\nexport const reportsQueriesDeleteReport = createAction(\n REPORTS_QUERIES_DELETE_REPORT,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const reportsQueriesDeleteReportRequest = createAction(\n REPORTS_QUERIES_DELETE_REPORT_REQUEST\n);\nexport const reportsQueriesDeleteReportSuccess = createAction(\n REPORTS_QUERIES_DELETE_REPORT_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const reportsQueriesDeleteReportFailure = createAction(\n REPORTS_QUERIES_DELETE_REPORT_FAILURE\n);\n// Transform a Report (Counting Feature)\nexport const REPORTS_QUERIES_TRANSFORM_REPORT: string =\n \"REPORTS/QUERIES/CREATE/REPORT\";\nexport const REPORTS_QUERIES_TRANSFORM_REPORT_REQUEST: string =\n \"REPORTS/QUERIES/CREATE/REPORT/REQUEST\";\nexport const REPORTS_QUERIES_TRANSFORM_REPORT_SUCCESS: string =\n \"REPORTS/QUERIES/CREATE/REPORT/SUCCESS\";\nexport const REPORTS_QUERIES_TRANSFORM_REPORT_FAILURE: string =\n \"REPORTS/QUERIES/CREATE/REPORT/FAILURE\";\nexport const reportsQueriesTransformReport = createAction(\n REPORTS_QUERIES_TRANSFORM_REPORT,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const reportsQueriesTransformReportRequest = createAction(\n REPORTS_QUERIES_TRANSFORM_REPORT_REQUEST\n);\nexport const reportsQueriesTransformReportSuccess = createAction(\n REPORTS_QUERIES_TRANSFORM_REPORT_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const reportsQueriesTransformReportFailure = createAction(\n REPORTS_QUERIES_TRANSFORM_REPORT_FAILURE\n);\n// Generate CSV reports depend on query and report\nexport const REPORTS_QUERIES_GENERATE_CSV: string =\n \"REPORTS/QUERIES/GENERATE_CSV\";\nexport const REPORTS_QUERIES_GENERATE_CSV_REQUEST: string =\n \"REPORTS/QUERIES/GENERATE_CSV/REQUEST\";\nexport const REPORTS_QUERIES_GENERATE_CSV_SUCCESS: string =\n \"REPORTS/QUERIES/GENERATE_CSV/SUCCESS\";\nexport const REPORTS_QUERIES_GENERATE_CSV_FAILURE: string =\n \"REPORTS/QUERIES/GENERATE_CSV/FAILURE\";\nexport const reportsQueriesGenerateCSV = createAction(\n REPORTS_QUERIES_GENERATE_CSV,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const reportsQueriesGenerateCSVRequest = createAction(\n REPORTS_QUERIES_GENERATE_CSV_REQUEST\n);\nexport const reportsQueriesGenerateCSVSuccess = createAction(\n REPORTS_QUERIES_GENERATE_CSV_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const reportsQueriesGenerateCSVFailure = createAction(\n REPORTS_QUERIES_GENERATE_CSV_FAILURE\n);\n// Generate CSV from Transform a Report (Counting Feature)\nexport const REPORTS_QUERIES_TRANSFORM_REPORT_GENERATE_CSV: string =\n \"REPORTS/QUERIES/TRANSFORM_REPORT/GENERATE_CSV\";\nexport const REPORTS_QUERIES_TRANSFORM_REPORT_GENERATE_CSV_REQUEST: string =\n \"REPORTS/QUERIES/TRANSFORM_REPORT/GENERATE_CSV/REQUEST\";\nexport const REPORTS_QUERIES_TRANSFORM_REPORT_GENERATE_CSV_SUCCESS: string =\n \"REPORTS/QUERIES/TRANSFORM_REPORT/GENERATE_CSV/SUCCESS\";\nexport const REPORTS_QUERIES_TRANSFORM_REPORT_GENERATE_CSV_FAILURE: string =\n \"REPORTS/QUERIES/TRANSFORM_REPORT/GENERATE_CSV/FAILURE\";\nexport const reportsQueriesTransformReportGenerateCSV = createAction(\n REPORTS_QUERIES_TRANSFORM_REPORT_GENERATE_CSV,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const reportsQueriesTransformReportGenerateCSVRequest = createAction(\n REPORTS_QUERIES_TRANSFORM_REPORT_GENERATE_CSV_REQUEST\n);\nexport const reportsQueriesTransformReportGenerateCSVSuccess = createAction(\n REPORTS_QUERIES_TRANSFORM_REPORT_GENERATE_CSV_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const reportsQueriesTransformReportGenerateCSVFailure = createAction(\n REPORTS_QUERIES_TRANSFORM_REPORT_GENERATE_CSV_FAILURE\n);\n// END REPORTS />\n","import { createAction } from \"deox\";\n// Actions for Rotations\n// Fetch rotations by filters\nexport const ROTATIONS_FETCH_BY_FILTERS: string = \"ROTATIONS/FETCH/BY_FILTERS\";\nexport const ROTATIONS_FETCH_BY_FILTERS_REQUEST: string =\n \"ROTATIONS/FETCH/BY_FILTERS/REQUEST\";\nexport const ROTATIONS_FETCH_BY_FILTERS_SUCCESS: string =\n \"ROTATIONS/FETCH/BY_FILTERS/SUCCESS\";\nexport const ROTATIONS_FETCH_BY_FILTERS_FAILURE: string =\n \"ROTATIONS/FETCH/BY_FILTERS/FAILURE\";\nexport const rotationsFetchByFilters = createAction(\n ROTATIONS_FETCH_BY_FILTERS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const rotationsFetchByFiltersRequest = createAction(\n ROTATIONS_FETCH_BY_FILTERS_REQUEST\n);\nexport const rotationsFetchByFiltersSuccess = createAction(\n ROTATIONS_FETCH_BY_FILTERS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const rotationsFetchByFiltersFailure = createAction(\n ROTATIONS_FETCH_BY_FILTERS_FAILURE\n);\n// Fetch Rotations KPIS\nexport const ROTATIONS_FETCH_KPIS: string = \"ROTATIONS/FETCH/KPIS\";\nexport const ROTATIONS_FETCH_KPIS_REQUEST: string =\n \"ROTATIONS/FETCH/KPIS/REQUEST\";\nexport const ROTATIONS_FETCH_KPIS_SUCCESS: string =\n \"ROTATIONS/FETCH/KPIS/SUCCESS\";\nexport const ROTATIONS_FETCH_KPIS_FAILURE: string =\n \"ROTATIONS/FETCH/KPIS/FAILURE\";\nexport const rotationsFetchKpis = createAction(\n ROTATIONS_FETCH_KPIS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const rotationsFetchKpisRequest = createAction(\n ROTATIONS_FETCH_KPIS_REQUEST\n);\nexport const rotationsFetchKpisSuccess = createAction(\n ROTATIONS_FETCH_KPIS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const rotationsFetchKpisFailure = createAction(\n ROTATIONS_FETCH_KPIS_FAILURE,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Create Rotations\nexport const ROTATIONS_CREATE_ROTATIONS: string = \"ROTATIONS/CREATE/ROTATIONS\";\nexport const ROTATIONS_CREATE_ROTATIONS_REQUEST: string =\n \"ROTATIONS/CREATE/ROTATIONS/REQUEST\";\nexport const ROTATIONS_CREATE_ROTATIONS_SUCCESS: string =\n \"ROTATIONS/CREATE/ROTATIONS/SUCCESS\";\nexport const ROTATIONS_CREATE_ROTATIONS_FAILURE: string =\n \"ROTATIONS/CREATE/ROTATIONS/FAILURE\";\nexport const rotationsCreateRotations = createAction(\n ROTATIONS_CREATE_ROTATIONS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const rotationsCreateRotationsRequest = createAction(\n ROTATIONS_CREATE_ROTATIONS_REQUEST\n);\nexport const rotationsCreateRotationsSuccess = createAction(\n ROTATIONS_CREATE_ROTATIONS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const rotationsCreateRotationsFailure = createAction(\n ROTATIONS_CREATE_ROTATIONS_FAILURE\n);\n// Edit Rotations (bulk actions)\nexport const ROTATIONS_EDIT_ROTATIONS: string = \"ROTATIONS/EDIT/ROTATIONS\";\nexport const ROTATIONS_EDIT_ROTATIONS_REQUEST: string =\n \"ROTATIONS/EDIT/ROTATIONS/REQUEST\";\nexport const ROTATIONS_EDIT_ROTATIONS_SUCCESS: string =\n \"ROTATIONS/EDIT/ROTATIONS/SUCCESS\";\nexport const ROTATIONS_EDIT_ROTATIONS_FAILURE: string =\n \"ROTATIONS/EDIT/ROTATIONS/FAILURE\";\nexport const rotationsEditRotations = createAction(\n ROTATIONS_EDIT_ROTATIONS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const rotationsEditRotationsRequest = createAction(\n ROTATIONS_EDIT_ROTATIONS_REQUEST\n);\nexport const rotationsEditRotationsSuccess = createAction(\n ROTATIONS_EDIT_ROTATIONS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const rotationsEditRotationsFailure = createAction(\n ROTATIONS_EDIT_ROTATIONS_FAILURE\n);\n// Set Automatic Rotations\nexport const ROTATIONS_SET_AUTOMATIC_ROTATIONS: string =\n \"ROTATIONS/SET/AUTOMATIC_ROTATIONS\";\nexport const ROTATIONS_SET_AUTOMATIC_ROTATIONS_REQUEST: string =\n \"ROTATIONS/SET/AUTOMATIC_ROTATIONS/REQUEST\";\nexport const ROTATIONS_SET_AUTOMATIC_ROTATIONS_SUCCESS: string =\n \"ROTATIONS/SET/AUTOMATIC_ROTATIONS/SUCCESS\";\nexport const ROTATIONS_SET_AUTOMATIC_ROTATIONS_FAILURE: string =\n \"ROTATIONS/SET/AUTOMATIC_ROTATIONS/FAILURE\";\nexport const rotationsSetAutomaticRotations = createAction(\n ROTATIONS_SET_AUTOMATIC_ROTATIONS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const rotationsSetAutomaticRotationsRequest = createAction(\n ROTATIONS_SET_AUTOMATIC_ROTATIONS_REQUEST\n);\nexport const rotationsSetAutomaticRotationsSuccess = createAction(\n ROTATIONS_SET_AUTOMATIC_ROTATIONS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const rotationsSetAutomaticRotationsFailure = createAction(\n ROTATIONS_SET_AUTOMATIC_ROTATIONS_FAILURE\n);\n// Update Automatic Rotations\nexport const ROTATIONS_UPDATE_AUTOMATIC_ROTATIONS: string =\n \"ROTATIONS/UPDATE/AUTOMATIC_ROTATIONS\";\nexport const rotationsUpdateAutomaticRotations = createAction(\n ROTATIONS_UPDATE_AUTOMATIC_ROTATIONS,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Unset Automatic Rotations\nexport const ROTATIONS_UNSET_AUTOMATIC_ROTATIONS: string =\n \"ROTATIONS/UNSET/AUTOMATIC_ROTATIONS\";\nexport const rotationsUnsetAutomaticRotations = createAction(\n ROTATIONS_UNSET_AUTOMATIC_ROTATIONS,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Set rotationId to Fetch this rotation\nexport const ROTATIONS_SET_ROTATION_ID: string = \"ROTATIONS/SET/ROTATION_ID\";\nexport const rotationsSetRotationId = createAction(\n ROTATIONS_SET_ROTATION_ID,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Fetch a Rotation\nexport const ROTATIONS_FETCH_ROTATION: string = \"ROTATIONS/FETCH/ROTATION\";\nexport const ROTATIONS_FETCH_ROTATION_REQUEST: string =\n \"ROTATIONS/FETCH/ROTATION/REQUEST\";\nexport const ROTATIONS_FETCH_ROTATION_SUCCESS: string =\n \"ROTATIONS/FETCH/ROTATION/SUCCESS\";\nexport const ROTATIONS_FETCH_ROTATION_FAILURE: string =\n \"ROTATIONS/FETCH/ROTATION/FAILURE\";\nexport const rotationsFetchRotation = createAction(\n ROTATIONS_FETCH_ROTATION,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const rotationsFetchRotationRequest = createAction(\n ROTATIONS_FETCH_ROTATION_REQUEST\n);\nexport const rotationsFetchRotationSuccess = createAction(\n ROTATIONS_FETCH_ROTATION_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const rotationsFetchRotationFailure = createAction(\n ROTATIONS_FETCH_ROTATION_FAILURE\n);\n// Edit a Rotation\nexport const ROTATIONS_EDIT: string = \"ROTATIONS/EDIT\";\nexport const ROTATIONS_EDIT_REQUEST: string = \"ROTATIONS/EDIT/REQUEST\";\nexport const ROTATIONS_EDIT_SUCCESS: string = \"ROTATIONS/EDIT/SUCCESS\";\nexport const ROTATIONS_EDIT_FAILURE: string = \"ROTATIONS/EDIT/FAILURE\";\nexport const rotationsEdit = createAction(\n ROTATIONS_EDIT,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const rotationsEditRequest = createAction(ROTATIONS_EDIT_REQUEST);\nexport const rotationsEditSuccess = createAction(\n ROTATIONS_EDIT_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const rotationsEditFailure = createAction(ROTATIONS_EDIT_FAILURE);\n// Delete a Rotation\nexport const ROTATIONS_DELETE: string = \"ROTATIONS/DELETE\";\nexport const ROTATIONS_DELETE_REQUEST: string = \"ROTATIONS/DELETE/REQUEST\";\nexport const ROTATIONS_DELETE_SUCCESS: string = \"ROTATIONS/DELETE/SUCCESS\";\nexport const ROTATIONS_DELETE_FAILURE: string = \"ROTATIONS/DELETE/FAILURE\";\nexport const rotationsDelete = createAction(\n ROTATIONS_DELETE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const rotationsDeleteRequest = createAction(ROTATIONS_DELETE_REQUEST);\nexport const rotationsDeleteSuccess = createAction(\n ROTATIONS_DELETE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const rotationsDeleteFailure = createAction(ROTATIONS_DELETE_FAILURE);\n// Create or Edit Update\nexport const ROTATIONS_CREATE_EDIT_UPDATE: string =\n \"ROTATIONS/CREATE_EDIT/UPDATE\";\nexport const rotationsCreateEditUpdate = createAction(\n ROTATIONS_CREATE_EDIT_UPDATE,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Create or Edit Reset process\nexport const ROTATIONS_CREATE_EDIT_RESET: string =\n \"ROTATIONS/CREATE_EDIT/RESET\";\nexport const rotationsCreateEditReset = createAction(\n ROTATIONS_CREATE_EDIT_RESET\n);\n","import { createAction } from \"deox\";\n\n// Actions for router before transitions\nexport const ROUTER_BEFORE_TRANSITIONS: string =\n \"ROUTER/ROUTER_BEFORE_TRANSITIONS\";\n\nexport const routerBeforeTransitions = createAction(\n ROUTER_BEFORE_TRANSITIONS,\n (resolve) => (payload?: object) => resolve(payload)\n);\n","import { createAction } from \"deox\";\n\n// Actions to save last router manager loaded\nexport const ROUTER_MANAGER_BEFORE: string = \"ROUTER/MANAGER/BEFORE\";\nexport const routerManagerBefore = createAction(\n ROUTER_MANAGER_BEFORE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const ROUTER_MANAGER_LOADED: string = \"ROUTER/MANAGER/LOADED\";\nexport const routerManagerLoaded = createAction(\n ROUTER_MANAGER_LOADED,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const ROUTER_MANAGER_RESET: string = \"ROUTER/MANAGER/RESET\";\nexport const routerManagerReset = createAction(ROUTER_MANAGER_RESET);\n","import { createAction } from \"deox\";\n\n// Actions for API\nexport const SERVICE_WORKER_INIT: string = \"SERVICE_WORKER/INIT\";\nexport const serviceWorkerInit = createAction(SERVICE_WORKER_INIT);\n\nexport const SERVICE_WORKER_REFRESH_BUTTON_SHOW: string =\n \"SERVICE_WORKER/REFRESH/BUTTON_SHOW\";\nexport const serviceWorkerRefreshButtonShow = createAction(\n SERVICE_WORKER_REFRESH_BUTTON_SHOW\n);\n","import { createAction } from \"deox\";\n// Actions for Tenant Settings\n// Fetch all Tenant Settings\nexport const TENANT_SETTINGS_FETCH_ALL: string = \"TENANT_SETTINGS/FETCH/ALL\";\nexport const TENANT_SETTINGS_FETCH_ALL_REQUEST: string =\n \"TENANT_SETTINGS/FETCH/ALL/REQUEST\";\nexport const TENANT_SETTINGS_FETCH_ALL_SUCCESS: string =\n \"TENANT_SETTINGS/FETCH/ALL/SUCCESS\";\nexport const TENANT_SETTINGS_FETCH_ALL_FAILURE: string =\n \"TENANT_SETTINGS/FETCH/ALL/FAILURE\";\nexport const tenantSettingsFetchAll = createAction(\n TENANT_SETTINGS_FETCH_ALL,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const tenantSettingsFetchAllRequest = createAction(\n TENANT_SETTINGS_FETCH_ALL_REQUEST\n);\nexport const tenantSettingsFetchAllSuccess = createAction(\n TENANT_SETTINGS_FETCH_ALL_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const tenantSettingsFetchAllFailure = createAction(\n TENANT_SETTINGS_FETCH_ALL_FAILURE\n);\n// CUD a Tenant Setting\nexport const TENANT_SETTINGS_CUD_TENANT_SETTING: string =\n \"TENANT_SETTINGS/CUD/TENANT_SETTING\";\nexport const TENANT_SETTINGS_CUD_TENANT_SETTING_REQUEST: string =\n \"TENANT_SETTINGS/CUD/TENANT_SETTING/REQUEST\";\nexport const TENANT_SETTINGS_CUD_TENANT_SETTING_SUCCESS: string =\n \"TENANT_SETTINGS/CUD/TENANT_SETTING/SUCCESS\";\nexport const TENANT_SETTINGS_CUD_TENANT_SETTING_FAILURE: string =\n \"TENANT_SETTINGS/CUD/TENANT_SETTING/FAILURE\";\nexport const tenantSettingsCUDTenantSetting = createAction(\n TENANT_SETTINGS_CUD_TENANT_SETTING,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const tenantSettingsCUDTenantSettingRequest = createAction(\n TENANT_SETTINGS_CUD_TENANT_SETTING_REQUEST\n);\nexport const tenantSettingsCUDTenantSettingSuccess = createAction(\n TENANT_SETTINGS_CUD_TENANT_SETTING_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const tenantSettingsCUDTenantSettingFailure = createAction(\n TENANT_SETTINGS_CUD_TENANT_SETTING_FAILURE\n);\n//CaseLogsSettings\nexport const TENANT_SETTINGS_UPDATE_TENANT_SETTING_NAME: string =\n \"TENANT_SETTINGS/UPDATE/TENANT_SETTING_NAME\";\nexport const tenantSettingsUpdateTenantSettingName = createAction(\n TENANT_SETTINGS_UPDATE_TENANT_SETTING_NAME,\n (resolve) => (payload?: object) => resolve(payload)\n);\n","import { createAction } from \"deox\";\n// Actions for Terms\n// Fetch all Terms\nexport const TERMS_FETCH_ALL: string = \"TERMS/FETCH/ALL\";\nexport const TERMS_FETCH_ALL_REQUEST: string = \"TERMS/FETCH/ALL/REQUEST\";\nexport const TERMS_FETCH_ALL_SUCCESS: string = \"TERMS/FETCH/ALL/SUCCESS\";\nexport const TERMS_FETCH_ALL_FAILURE: string = \"TERMS/FETCH/ALL/FAILURE\";\nexport const termsFetchAll = createAction(\n TERMS_FETCH_ALL,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const termsFetchAllRequest = createAction(TERMS_FETCH_ALL_REQUEST);\nexport const termsFetchAllSuccess = createAction(\n TERMS_FETCH_ALL_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const termsFetchAllFailure = createAction(TERMS_FETCH_ALL_FAILURE);\n// Create a Term\nexport const TERMS_CREATE: string = \"TERMS/CREATE\";\nexport const TERMS_CREATE_REQUEST: string = \"TERMS/CREATE/REQUEST\";\nexport const TERMS_CREATE_SUCCESS: string = \"TERMS/CREATE/SUCCESS\";\nexport const TERMS_CREATE_FAILURE: string = \"TERMS/CREATE/FAILURE\";\nexport const termsCreate = createAction(\n TERMS_CREATE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const termsCreateRequest = createAction(TERMS_CREATE_REQUEST);\nexport const termsCreateSuccess = createAction(\n TERMS_CREATE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const termsCreateFailure = createAction(TERMS_CREATE_FAILURE);\n// Edit a Term\nexport const TERMS_EDIT: string = \"TERMS/EDIT\";\nexport const TERMS_EDIT_REQUEST: string = \"TERMS/EDIT/REQUEST\";\nexport const TERMS_EDIT_SUCCESS: string = \"TERMS/EDIT/SUCCESS\";\nexport const TERMS_EDIT_FAILURE: string = \"TERMS/EDIT/FAILURE\";\nexport const termsEdit = createAction(\n TERMS_EDIT,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const termsEditRequest = createAction(TERMS_EDIT_REQUEST);\nexport const termsEditSuccess = createAction(\n TERMS_EDIT_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const termsEditFailure = createAction(TERMS_EDIT_FAILURE);\n// Delete a Term\nexport const TERMS_DELETE: string = \"TERMS/DELETE\";\nexport const TERMS_DELETE_REQUEST: string = \"TERMS/DELETE/REQUEST\";\nexport const TERMS_DELETE_SUCCESS: string = \"TERMS/DELETE/SUCCESS\";\nexport const TERMS_DELETE_FAILURE: string = \"TERMS/DELETE/FAILURE\";\nexport const termsDelete = createAction(\n TERMS_DELETE,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const termsDeleteRequest = createAction(TERMS_DELETE_REQUEST);\nexport const termsDeleteSuccess = createAction(\n TERMS_DELETE_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const termsDeleteFailure = createAction(TERMS_DELETE_FAILURE);\n","import { createAction } from \"deox\";\n// Actions for USERS\n\n// Fetch users KPIS (Numbers of users by role)\nexport const USERS_FETCH_USERS_KPIS: string = \"USERS/FETCH/USERS_KPIS\";\nexport const USERS_FETCH_USERS_KPIS_REQUEST: string =\n \"USERS/FETCH/USERS_KPIS/REQUEST\";\nexport const USERS_FETCH_USERS_KPIS_SUCCESS: string =\n \"USERS/FETCH/USERS_KPIS/SUCCESS\";\nexport const USERS_FETCH_USERS_KPIS_FAILURE: string =\n \"USERS/FETCH/USERS_KPIS/FAILURE\";\nexport const usersFetchUsersKpis = createAction(\n USERS_FETCH_USERS_KPIS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const usersFetchUsersKpisRequest = createAction(\n USERS_FETCH_USERS_KPIS_REQUEST\n);\nexport const usersFetchUsersKpisSuccess = createAction(\n USERS_FETCH_USERS_KPIS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const usersFetchUsersKpisFailure = createAction(\n USERS_FETCH_USERS_KPIS_FAILURE\n);\n// Fetch all Users (without roles)\nexport const USERS_FETCH_ALL: string = \"USERS/FETCH/ALL\";\nexport const USERS_FETCH_ALL_REQUEST: string = \"USERS/FETCH/ALL/REQUEST\";\nexport const USERS_FETCH_ALL_SUCCESS: string = \"USERS/FETCH/ALL/SUCCESS\";\nexport const USERS_FETCH_ALL_FAILURE: string = \"USERS/FETCH/ALL/FAILURE\";\nexport const usersFetchAll = createAction(\n USERS_FETCH_ALL,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const usersFetchAllRequest = createAction(USERS_FETCH_ALL_REQUEST);\nexport const usersFetchAllSuccess = createAction(\n USERS_FETCH_ALL_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const usersFetchAllFailure = createAction(USERS_FETCH_ALL_FAILURE);\n// Fetch all Users (with Roles)\nexport const USERS_FETCH_USERS_ROLES: string = \"USERS/FETCH/USERS_ROLES\";\nexport const USERS_FETCH_USERS_ROLES_REQUEST: string =\n \"USERS/FETCH/USERS_ROLES/REQUEST\";\nexport const USERS_FETCH_USERS_ROLES_SUCCESS: string =\n \"USERS/FETCH/USERS_ROLES/SUCCESS\";\nexport const USERS_FETCH_USERS_ROLES_FAILURE: string =\n \"USERS/FETCH/USERS_ROLES/FAILURE\";\nexport const usersFetchUsersRoles = createAction(\n USERS_FETCH_USERS_ROLES,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const usersFetchUsersRolesRequest = createAction(\n USERS_FETCH_USERS_ROLES_REQUEST\n);\nexport const usersFetchUsersRolesSuccess = createAction(\n USERS_FETCH_USERS_ROLES_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const usersFetchUsersRolesFailure = createAction(\n USERS_FETCH_USERS_ROLES_FAILURE,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Set UserId to Fetch this users\nexport const USERS_SET_USERID: string = \"USERS/SET/USERID\";\nexport const usersSetUserId = createAction(\n USERS_SET_USERID,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Unset UserId\nexport const USERS_UNSET_USERID: string = \"USERS/UNSET/USERID\";\nexport const usersUnsetUserId = createAction(\n USERS_UNSET_USERID,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Fetch user\nexport const USERS_FETCH_USER: string = \"USERS/FETCH/USER\";\nexport const USERS_FETCH_USER_REQUEST: string = \"USERS/FETCH/USER/REQUEST\";\nexport const USERS_FETCH_USER_SUCCESS: string = \"USERS/FETCH/USER/SUCCESS\";\nexport const USERS_FETCH_USER_FAILURE: string = \"USERS/FETCH/USER/FAILURE\";\nexport const usersFetchUser = createAction(\n USERS_FETCH_USER,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const usersFetchUserRequest = createAction(USERS_FETCH_USER_REQUEST);\nexport const usersFetchUserSuccess = createAction(\n USERS_FETCH_USER_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const usersFetchUserFailure = createAction(USERS_FETCH_USER_FAILURE);\n// Fetch user KPIS\nexport const USERS_FETCH_USER_KPIS: string = \"USERS/FETCH/USER_KPIS\";\nexport const USERS_FETCH_USER_KPIS_REQUEST: string =\n \"USERS/FETCH/USER_KPIS/REQUEST\";\nexport const USERS_FETCH_USER_KPIS_SUCCESS: string =\n \"USERS/FETCH/USER_KPIS/SUCCESS\";\nexport const USERS_FETCH_USER_KPIS_FAILURE: string =\n \"USERS/FETCH/USER_KPIS/FAILURE\";\nexport const usersFetchUserKpis = createAction(\n USERS_FETCH_USER_KPIS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const usersFetchUserKpisRequest = createAction(\n USERS_FETCH_USER_KPIS_REQUEST\n);\nexport const usersFetchUserKpisSuccess = createAction(\n USERS_FETCH_USER_KPIS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const usersFetchUserKpisFailure = createAction(\n USERS_FETCH_USER_KPIS_FAILURE\n);\n// Fetch user AVAILABILITIES\nexport const USERS_FETCH_USER_AVAILABILITIES: string =\n \"USERS/FETCH/USER_AVAILABILITIES\";\nexport const USERS_FETCH_USER_AVAILABILITIES_REQUEST: string =\n \"USERS/FETCH/USER_AVAILABILITIES/REQUEST\";\nexport const USERS_FETCH_USER_AVAILABILITIES_SUCCESS: string =\n \"USERS/FETCH/USER_AVAILABILITIES/SUCCESS\";\nexport const USERS_FETCH_USER_AVAILABILITIES_FAILURE: string =\n \"USERS/FETCH/USER_AVAILABILITIES/FAILURE\";\nexport const usersFetchUserAvailabilities = createAction(\n USERS_FETCH_USER_AVAILABILITIES,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const usersFetchUserAvailabilitiesRequest = createAction(\n USERS_FETCH_USER_AVAILABILITIES_REQUEST\n);\nexport const usersFetchUserAvailabilitiesSuccess = createAction(\n USERS_FETCH_USER_AVAILABILITIES_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const usersFetchUserAvailabilitiesFailure = createAction(\n USERS_FETCH_USER_AVAILABILITIES_FAILURE\n);\n// Edit users (bulk actions)\nexport const USERS_EDIT_USERS: string = \"USERS/EDIT/USERS\";\nexport const USERS_EDIT_USERS_REQUEST: string = \"USERS/EDIT/USERS/REQUEST\";\nexport const USERS_EDIT_USERS_SUCCESS: string = \"USERS/EDIT/USERS/SUCCESS\";\nexport const USERS_EDIT_USERS_FAILURE: string = \"USERS/EDIT/USERS/FAILURE\";\nexport const usersEditUsers = createAction(\n USERS_EDIT_USERS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const usersEditUsersRequest = createAction(USERS_EDIT_USERS_REQUEST);\nexport const usersEditUsersSuccess = createAction(\n USERS_EDIT_USERS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const usersEditUsersFailure = createAction(USERS_EDIT_USERS_FAILURE);\n// Edit user\nexport const USERS_EDIT_USER: string = \"USERS/EDIT/USER\";\nexport const USERS_EDIT_USER_REQUEST: string = \"USERS/EDIT/USER/REQUEST\";\nexport const USERS_EDIT_USER_SUCCESS: string = \"USERS/EDIT/USER/SUCCESS\";\nexport const USERS_EDIT_USER_FAILURE: string = \"USERS/EDIT/USER/FAILURE\";\nexport const usersEditUser = createAction(\n USERS_EDIT_USER,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const usersEditUserRequest = createAction(USERS_EDIT_USER_REQUEST);\nexport const usersEditUserSuccess = createAction(\n USERS_EDIT_USER_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const usersEditUserFailure = createAction(USERS_EDIT_USER_FAILURE);\n// Edit user AVAILABILITIES\nexport const USERS_EDIT_USER_AVAILABILITIES: string =\n \"USERS/EDIT/USER_AVAILABILITIES\";\nexport const USERS_EDIT_USER_AVAILABILITIES_REQUEST: string =\n \"USERS/EDIT/USER_AVAILABILITIES/REQUEST\";\nexport const USERS_EDIT_USER_AVAILABILITIES_SUCCESS: string =\n \"USERS/EDIT/USER_AVAILABILITIES/SUCCESS\";\nexport const USERS_EDIT_USER_AVAILABILITIES_FAILURE: string =\n \"USERS/EDIT/USER_AVAILABILITIES/FAILURE\";\nexport const usersEditUserAvailabilities = createAction(\n USERS_EDIT_USER_AVAILABILITIES,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const usersEditUserAvailabilitiesRequest = createAction(\n USERS_EDIT_USER_AVAILABILITIES_REQUEST\n);\nexport const usersEditUserAvailabilitiesSuccess = createAction(\n USERS_EDIT_USER_AVAILABILITIES_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const usersEditUserAvailabilitiesFailure = createAction(\n USERS_EDIT_USER_AVAILABILITIES_FAILURE\n);\n// Set User to State Users into key user\nexport const USERS_SET_USER: string = \"USERS/SET/USER\";\nexport const usersSetUser = createAction(\n USERS_SET_USER,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Fetch user Files\nexport const USERS_FETCH_USER_FILES: string = \"USERS/FETCH/USER_FILES\";\nexport const USERS_FETCH_USER_FILES_REQUEST: string =\n \"USERS/FETCH/USER_FILES/REQUEST\";\nexport const USERS_FETCH_USER_FILES_SUCCESS: string =\n \"USERS/FETCH/USER_FILES/SUCCESS\";\nexport const USERS_FETCH_USER_FILES_FAILURE: string =\n \"USERS/FETCH/USER_FILES/FAILURE\";\nexport const usersFetchUserFiles = createAction(\n USERS_FETCH_USER_FILES,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const usersFetchUserFilesRequest = createAction(\n USERS_FETCH_USER_FILES_REQUEST\n);\nexport const usersFetchUserFilesSuccess = createAction(\n USERS_FETCH_USER_FILES_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const usersFetchUserFilesFailure = createAction(\n USERS_FETCH_USER_FILES_FAILURE\n);\n// Fetch all user Files Expired\nexport const USERS_FETCH_USER_FILES_EXPIRED: string =\n \"USERS/FETCH/USER_FILES_EXPIRED\";\nexport const USERS_FETCH_USER_FILES_EXPIRED_REQUEST: string =\n \"USERS/FETCH/USER_FILES_EXPIRED/REQUEST\";\nexport const USERS_FETCH_USER_FILES_EXPIRED_SUCCESS: string =\n \"USERS/FETCH/USER_FILES_EXPIRED/SUCCESS\";\nexport const USERS_FETCH_USER_FILES_EXPIRED_FAILURE: string =\n \"USERS/FETCH/USER_FILES_EXPIRED/FAILURE\";\nexport const usersFetchUserFilesExpired = createAction(\n USERS_FETCH_USER_FILES_EXPIRED,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const usersFetchUserFilesExpiredRequest = createAction(\n USERS_FETCH_USER_FILES_EXPIRED_REQUEST\n);\nexport const usersFetchUserFilesExpiredSuccess = createAction(\n USERS_FETCH_USER_FILES_EXPIRED_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const usersFetchUserFilesExpiredFailure = createAction(\n USERS_FETCH_USER_FILES_EXPIRED_FAILURE\n);\n// Upload user Files\nexport const USERS_UPLOAD_USER_FILES: string = \"USERS/UPLOAD/USER_FILES\";\nexport const USERS_UPLOAD_USER_FILES_REQUEST: string =\n \"USERS/UPLOAD/USER_FILES/REQUEST\";\nexport const USERS_UPLOAD_USER_FILES_SUCCESS: string =\n \"USERS/UPLOAD/USER_FILES/SUCCESS\";\nexport const USERS_UPLOAD_USER_FILES_FAILURE: string =\n \"USERS/UPLOAD/USER_FILES/FAILURE\";\nexport const usersUploadUserFiles = createAction(\n USERS_UPLOAD_USER_FILES,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const usersUploadUserFilesRequest = createAction(\n USERS_UPLOAD_USER_FILES_REQUEST\n);\nexport const usersUploadUserFilesSuccess = createAction(\n USERS_UPLOAD_USER_FILES_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const usersUploadUserFilesFailure = createAction(\n USERS_UPLOAD_USER_FILES_FAILURE\n);\n// Emulate user\nexport const USERS_EMULATE_USER: string = \"USERS/EMULATE/USER\";\nexport const USERS_EMULATE_USER_REQUEST: string = \"USERS/EMULATE/USER/REQUEST\";\nexport const USERS_EMULATE_USER_SUCCESS: string = \"USERS/EMULATE/USER/SUCCESS\";\nexport const USERS_EMULATE_USER_FAILURE: string = \"USERS/EMULATE/USER/FAILURE\";\nexport const usersEmulateUser = createAction(\n USERS_EMULATE_USER,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const usersEmulateUserRequest = createAction(USERS_EMULATE_USER_REQUEST);\nexport const usersEmulateUserSuccess = createAction(\n USERS_EMULATE_USER_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const usersEmulateUserFailure = createAction(USERS_EMULATE_USER_FAILURE);\n","import { createAction } from \"deox\";\n// Actions for USERS_MANAGER\n\n// User Manager Filters:\nexport const USERS_MANAGER_FILTERS_SAVE_FILTERS: string =\n \"USERS/MANAGER/FILTERS/SAVE/FILTERS\";\nexport const usersManagerFiltersSaveFilters = createAction(\n USERS_MANAGER_FILTERS_SAVE_FILTERS,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Set Pages Filters\nexport const USERS_MANAGER_FILTERS_SET_PAGES: string =\n \"USERS/MANAGER/FILTERS/SET/PAGES\";\nexport const usersManagerFiltersSetPages = createAction(\n USERS_MANAGER_FILTERS_SET_PAGES,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Search\nexport const USERS_MANAGER_FILTERS_SET_SEARCH: string =\n \"USERS/MANAGER/FILTERS/SET/SEARCH\";\nexport const usersManagerFiltersSetSearch = createAction(\n USERS_MANAGER_FILTERS_SET_SEARCH,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Set SortBy Filters\nexport const USERS_MANAGER_FILTERS_SET_SORTBY: string =\n \"USERS/MANAGER/FILTERS/SET/SORTBY\";\nexport const usersManagerFiltersSetSortBy = createAction(\n USERS_MANAGER_FILTERS_SET_SORTBY,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Clear Filters\nexport const USERS_MANAGER_FILTERS_CLEAR: string =\n \"USERS/MANAGER/FILTERS/CLEAR\";\nexport const usersManagerFiltersClear = createAction(\n USERS_MANAGER_FILTERS_CLEAR\n);\n// Set Roles Filters\nexport const USERS_MANAGER_FILTERS_SET_ROLES: string =\n \"USERS/MANAGER/FILTERS/SET/ROLES\";\nexport const usersManagerFiltersSetRoles = createAction(\n USERS_MANAGER_FILTERS_SET_ROLES,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Set Role Selected for Rotations\nexport const USERS_MANAGER_FILTERS_SET_ROLE_SELECTED: string =\n \"USERS/MANAGER/FILTERS/SET/ROLE_SELECTED\";\nexport const usersManagerFiltersSetRoleSelected = createAction(\n USERS_MANAGER_FILTERS_SET_ROLE_SELECTED,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Search Filters\nexport const USERS_MANAGER_FILTERS_SEARCH: string =\n \"USERS/MANAGER/FILTERS/SEARCH\";\nexport const usersManagerFiltersSearch = createAction(\n USERS_MANAGER_FILTERS_SEARCH,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// User Status Filters\nexport const USERS_MANAGER_FILTERS_SET_USER_STATUS: string =\n \"USERS/MANAGER/FILTERS/SET/USER_STATUS\";\nexport const usersManagerFiltersSetUserStatus = createAction(\n USERS_MANAGER_FILTERS_SET_USER_STATUS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const USERS_MANAGER_FILTERS_USER_STATUS: string =\n \"USERS/MANAGER/FILTERS/USER_STATUS\";\nexport const usersManagerFiltersUserStatus = createAction(\n USERS_MANAGER_FILTERS_USER_STATUS,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Rotations Filters\nexport const USERS_MANAGER_FILTERS_ROTATIONS_ACTIVE: string =\n \"USERS/MANAGER/FILTERS/ROTATIONS_ACTIVE\";\nexport const usersManagerFiltersRotations = createAction(\n USERS_MANAGER_FILTERS_ROTATIONS_ACTIVE,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Programs Filters\nexport const USERS_MANAGER_FILTERS_PROGRAMS: string =\n \"USERS/MANAGER/FILTERS/PROGRAMS\";\nexport const usersManagerFiltersPrograms = createAction(\n USERS_MANAGER_FILTERS_PROGRAMS,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Cohorts Filters\nexport const USERS_MANAGER_FILTERS_COHORTS: string =\n \"USERS/MANAGER/FILTERS/COHORTS\";\nexport const usersManagerFiltersCohorts = createAction(\n USERS_MANAGER_FILTERS_COHORTS,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Institutions Filters\nexport const USERS_MANAGER_FILTERS_INSTITUTIONS: string =\n \"USERS/MANAGER/FILTERS/INSTITUTIONS\";\nexport const usersManagerFiltersInstitutions = createAction(\n USERS_MANAGER_FILTERS_INSTITUTIONS,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// User Manager Filters END />\n// User Manage Update Users after some action like change role or import data\nexport const USERS_MANAGER_UPDATE_STORE_USERS: string =\n \"USERS/MANAGER/UPDATE/STORE/USERS\";\nexport const usersManagerUpdateStoreUsers = createAction(\n USERS_MANAGER_UPDATE_STORE_USERS,\n (resolve) => (payload?: object) => resolve(payload)\n);\n// Save usersManager and userSelected to remain same state before leave user manager\nexport const USERS_MANAGER_SAVE_USERS: string = \"USERS/MANAGER/SAVE/USERS\";\nexport const usersManagerSaveUsers = createAction(\n USERS_MANAGER_SAVE_USERS,\n (resolve) => (payload?: object) => resolve(payload)\n);\n","import { createAction } from \"deox\";\n\n// Actions for Portfolio\n// Fetch portfolio\nexport const PORTFOLIO_FETCH_PORTFOLIO: string = \"PORTFOLIO/FETCH/PORTFOLIO\";\nexport const PORTFOLIO_FETCH_PORTFOLIO_REQUEST: string =\n \"PORTFOLIO/FETCH/PORTFOLIO/REQUEST\";\nexport const PORTFOLIO_FETCH_PORTFOLIO_SUCCESS: string =\n \"PORTFOLIO/FETCH/PORTFOLIO/SUCCESS\";\nexport const PORTFOLIO_FETCH_PORTFOLIO_FAILURE: string =\n \"PORTFOLIO/FETCH/PORTFOLIO/FAILURE\";\nexport const portfolioFetchPortfolio = createAction(\n PORTFOLIO_FETCH_PORTFOLIO,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const portfolioFetchPortfolioRequest = createAction(\n PORTFOLIO_FETCH_PORTFOLIO_REQUEST\n);\nexport const portfolioFetchPortfolioSuccess = createAction(\n PORTFOLIO_FETCH_PORTFOLIO_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const portfolioFetchPortfolioFailure = createAction(\n PORTFOLIO_FETCH_PORTFOLIO_FAILURE\n);\n// Edit portfolio\nexport const PORTFOLIO_EDIT: string = \"PORTFOLIO/EDIT\";\nexport const PORTFOLIO_EDIT_REQUEST: string = \"PORTFOLIO/EDIT/REQUEST\";\nexport const PORTFOLIO_EDIT_SUCCESS: string = \"PORTFOLIO/EDIT/SUCCESS\";\nexport const PORTFOLIO_EDIT_FAILURE: string = \"PORTFOLIO/EDIT/FAILURE\";\nexport const portfolioEdit = createAction(\n PORTFOLIO_EDIT,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const portfolioEditRequest = createAction(PORTFOLIO_EDIT_REQUEST);\nexport const portfolioEditSuccess = createAction(\n PORTFOLIO_EDIT_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const portfolioEditFailure = createAction(PORTFOLIO_EDIT_FAILURE);\n// Request portfolio testimonials\nexport const PORTFOLIO_TESTIMONIALS: string = \"PORTFOLIO/TESTIMONIALS\";\nexport const PORTFOLIO_TESTIMONIALS_REQUEST: string =\n \"PORTFOLIO/TESTIMONIALS/REQUEST\";\nexport const PORTFOLIO_TESTIMONIALS_SUCCESS: string =\n \"PORTFOLIO/TESTIMONIALS/SUCCESS\";\nexport const PORTFOLIO_TESTIMONIALS_FAILURE: string =\n \"PORTFOLIO/TESTIMONIALS/FAILURE\";\nexport const portfolioTestimonials = createAction(\n PORTFOLIO_TESTIMONIALS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const portfolioTestimonialsRequest = createAction(\n PORTFOLIO_TESTIMONIALS_REQUEST\n);\nexport const portfolioTestimonialsSuccess = createAction(\n PORTFOLIO_TESTIMONIALS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const portfolioTestimonialsFailure = createAction(\n PORTFOLIO_TESTIMONIALS_FAILURE\n);\n// Request portfolio testimonials notifications\nexport const PORTFOLIO_TESTIMONIALS_NOTIFICATIONS: string =\n \"PORTFOLIO/TESTIMONIALS_NOTIFICATIONS\";\nexport const PORTFOLIO_TESTIMONIALS_NOTIFICATIONS_REQUEST: string =\n \"PORTFOLIO/TESTIMONIALS_NOTIFICATIONS/REQUEST\";\nexport const PORTFOLIO_TESTIMONIALS_NOTIFICATIONS_SUCCESS: string =\n \"PORTFOLIO/TESTIMONIALS_NOTIFICATIONS/SUCCESS\";\nexport const PORTFOLIO_TESTIMONIALS_NOTIFICATIONS_FAILURE: string =\n \"PORTFOLIO/TESTIMONIALS_NOTIFICATIONS/FAILURE\";\nexport const portfolioTestimonialsNotifications = createAction(\n PORTFOLIO_TESTIMONIALS_NOTIFICATIONS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const portfolioTestimonialsNotificationsRequest = createAction(\n PORTFOLIO_TESTIMONIALS_NOTIFICATIONS_REQUEST\n);\nexport const portfolioTestimonialsNotificationsSuccess = createAction(\n PORTFOLIO_TESTIMONIALS_NOTIFICATIONS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const portfolioTestimonialsNotificationsFailure = createAction(\n PORTFOLIO_TESTIMONIALS_NOTIFICATIONS_FAILURE\n);\n// Submit portfolio testimonials\nexport const PORTFOLIO_SUBMIT_TESTIMONIALS: string =\n \"PORTFOLIO/SUBMIT_TESTIMONIALS\";\nexport const PORTFOLIO_SUBMIT_TESTIMONIALS_REQUEST: string =\n \"PORTFOLIO/SUBMIT_TESTIMONIALS/REQUEST\";\nexport const PORTFOLIO_SUBMIT_TESTIMONIALS_SUCCESS: string =\n \"PORTFOLIO/SUBMIT_TESTIMONIALS/SUCCESS\";\nexport const PORTFOLIO_SUBMIT_TESTIMONIALS_FAILURE: string =\n \"PORTFOLIO/SUBMIT_TESTIMONIALS/FAILURE\";\nexport const portfolioSubmitTestimonials = createAction(\n PORTFOLIO_SUBMIT_TESTIMONIALS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const portfolioSubmitTestimonialsRequest = createAction(\n PORTFOLIO_SUBMIT_TESTIMONIALS_REQUEST\n);\nexport const portfolioSubmitTestimonialsSuccess = createAction(\n PORTFOLIO_SUBMIT_TESTIMONIALS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const portfolioSubmitTestimonialsFailure = createAction(\n PORTFOLIO_SUBMIT_TESTIMONIALS_FAILURE\n);\n// Delete portfolio testimonials\nexport const PORTFOLIO_DELETE_TESTIMONIALS: string =\n \"PORTFOLIO/DELETE_TESTIMONIALS\";\nexport const PORTFOLIO_DELETE_TESTIMONIALS_REQUEST: string =\n \"PORTFOLIO/DELETE_TESTIMONIALS/REQUEST\";\nexport const PORTFOLIO_DELETE_TESTIMONIALS_SUCCESS: string =\n \"PORTFOLIO/DELETE_TESTIMONIALS/SUCCESS\";\nexport const PORTFOLIO_DELETE_TESTIMONIALS_FAILURE: string =\n \"PORTFOLIO/DELETE_TESTIMONIALS/FAILURE\";\nexport const portfolioDeleteTestimonials = createAction(\n PORTFOLIO_DELETE_TESTIMONIALS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const portfolioDeleteTestimonialsRequest = createAction(\n PORTFOLIO_DELETE_TESTIMONIALS_REQUEST\n);\nexport const portfolioDeleteTestimonialsSuccess = createAction(\n PORTFOLIO_DELETE_TESTIMONIALS_SUCCESS,\n (resolve) => (payload?: object) => resolve(payload)\n);\nexport const portfolioDeleteTestimonialsFailure = createAction(\n PORTFOLIO_DELETE_TESTIMONIALS_FAILURE\n);\n","// @flow\n\n/* PERMISSIONS */\nconst onCheckResource = (apiResource: Object, resources: Array) => {\n for (let resource in apiResource) {\n if (\n resources.indexOf(resource) !== -1 &&\n apiResource[resource]['isEnabled']\n ) {\n return true;\n }\n }\n return false;\n};\n\nexport const onCheckEvaluationsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = ['Evaluations:read', 'my#Evaluations:read'];\n const { Evaluations } = permissions || {};\n if (Evaluations && Evaluations.apiValue) {\n return onCheckResource(Evaluations.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckReadEvaluationsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = ['Evaluations:read'];\n const { Evaluations } = permissions || {};\n if (Evaluations && Evaluations.apiValue) {\n return onCheckResource(Evaluations.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckEditEvaluationsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = ['Evaluations:update'];\n const { Evaluations } = permissions || {};\n if (Evaluations && Evaluations.apiValue) {\n return onCheckResource(Evaluations.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckDeleteEvaluationsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = ['Evaluations:delete'];\n const { Evaluations } = permissions || {};\n if (Evaluations && Evaluations.apiValue) {\n return onCheckResource(Evaluations.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckReadMyEvaluationsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = ['my#Evaluations:read'];\n const { Evaluations } = permissions || {};\n if (Evaluations && Evaluations.apiValue) {\n return onCheckResource(Evaluations.apiValue, resources);\n }\n return false;\n};\n","// Local Storage to save local information into the browser.\nexport class LocalStore {\n static Save(key: string, value: string | number | object): string {\n try {\n localStorage.setItem(key, JSON.stringify(value));\n return JSON.stringify(value);\n } catch (err) {\n // Ignore error\n return \"\";\n }\n }\n static Delete(key: string): void {\n try {\n localStorage.removeItem(key);\n } catch (err) {\n // Ignore error\n }\n }\n static Read(key: string): any | string | number | object | undefined | null {\n try {\n const value = localStorage.getItem(key) || \"null\";\n return JSON.parse(value);\n } catch (err) {\n return null;\n }\n }\n static ClearAll() {\n try {\n localStorage.clear();\n } catch (err) {\n // Ignore error\n }\n }\n static numKeys(): number {\n return localStorage.length;\n }\n}\n","// Utils\nimport moment from \"moment\";\nimport { app as appJson } from \"../app.json\";\nimport { LocalStore } from \"./local-storage/localStore\";\n// Types\nimport type { Moment } from \"moment\";\nimport type { UsersRole } from \"../types/users.types\";\n/* eslint-disable no-useless-escape */\n// Utils Environment\nexport const isDevelopmentEnv = () => process.env.NODE_ENV === \"development\";\nexport const isDevelopmentReactAppEnv = () => appJson.appEnv !== \"production\";\nexport const emptyVoid = () => {};\nexport const emptyVoidVoid = () => () => {};\nexport const isMobileBrowser = () => {\n let isMobile = false; //initiate as false\n // device detection\n if (\n /(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(\n navigator.userAgent\n ) ||\n /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(\n navigator.userAgent.substr(0, 4)\n )\n )\n isMobile = true;\n return isMobile;\n};\nexport const isTouchableDevice = () => {\n let isTouchable = false; //initiate as false\n // device detection\n if (typeof window === \"object\" && \"ontouchstart\" in window)\n isTouchable = true;\n return isTouchable;\n};\nexport const isURL = (text: string) =>\n /^(?:(?:(?:https?|ftp):)?\\/\\/)?[\\w.-]+\\.[a-z]{2,}(?:\\/\\S*)?$/i.test(text);\nexport const onComparePath = (regex: RegExp, pathname: string): boolean => {\n const [path] = pathname.match(regex) || [];\n if (path && path === pathname) {\n return true;\n }\n return false;\n};\nexport const onGetUrlDomain = () => {\n const [hostname] = window.location.host.split(\":\");\n return `${window.location.protocol}//${hostname\n .split(\".\")\n .slice(1)\n .join(\".\")}`;\n};\nexport const onGetTenant = () => {\n const [hostname] = window.location.host.split(\":\");\n let tenant = \"\";\n if (hostname) {\n [tenant] = hostname.split(\".\");\n }\n return tenant;\n};\nexport const onGetToken = () => {\n const {\n auth: { token = \"\" },\n } = LocalStore.Read(\"authState\") || {\n auth: {\n token: \"\",\n },\n };\n return token;\n};\nexport const parseApiName = (apiName: string) =>\n apiName.replace(\n /(Company|Companies|Institution|Institutions|Administrator|Administrators|Faculties|File|Files)/gi,\n (str: string) => {\n switch (str) {\n case \"Company\":\n return \"School\";\n case \"Companies\":\n return \"Schools\";\n case \"Institution\":\n return \"Clinic\";\n case \"Institutions\":\n return \"Clinics\";\n case \"Administrators\":\n return \"Admins\";\n case \"Administrator\":\n return \"Admin\";\n case \"Faculties\":\n return \"Faculty\";\n case \"Files\":\n return \"Documents\";\n case \"File\":\n return \"Document\";\n default:\n return str;\n }\n }\n );\nexport const parseName = (name: UsersRole | string = \"\") =>\n name.split(/(?=[A-Z])/).join(\" \");\nexport const onSetRoleName = (roleName: string = \"\"): string => {\n if (roleName?.length && roleName[roleName.length - 1] === \"s\") {\n return capitalizeFirstLetter(roleName).slice(0, -1);\n }\n return roleName;\n};\nexport function parseQueryParams(query: string): object {\n let queryParams: any = {\n length: 0,\n };\n if (query) {\n const queryArray = query.split(\"?\")[1].split(\"&\");\n for (let i = 0; i < queryArray.length; i++) {\n const [key, val] = queryArray[i].split(\"=\");\n queryParams[key] = val;\n }\n queryParams.length = queryArray.length;\n }\n return queryParams;\n}\nexport function setUserRole(role: string): {\n apiName: string;\n type: string;\n name: string;\n} {\n return {\n apiName: role,\n type: role.replace(/\\s/g, \"\").toLowerCase(),\n name: parseApiName(parseName(role)),\n };\n}\n// Utils for Date\nexport const generateRandomDates = (\n startDate: Date,\n endDate: Date,\n count: number\n): string[] => {\n const randomDates: string[] = [];\n\n const startDateTimestamp = startDate.getTime();\n const endDateTimestamp = endDate.getTime();\n\n for (let i = 0; i < count; i++) {\n const randomTimestamp = Math.floor(\n Math.random() * (endDateTimestamp - startDateTimestamp + 1) +\n startDateTimestamp\n );\n const randomDate = new Date(randomTimestamp);\n const dateString = randomDate.toISOString().split(\"T\")[0];\n if (!randomDates.includes(dateString)) {\n randomDates.push(dateString);\n }\n }\n return randomDates.sort();\n};\nexport function isValidISODate(date: string) {\n return !!date.match(\n /^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(.[0-9]+)?(Z)?$/\n );\n}\nexport const parseDateToLocaleString = (\n timeStamp: number,\n withTime: boolean = false\n): string => {\n const dateJs = new Date(timeStamp * 1000);\n const hour = dateJs.getHours(),\n minutes = dateJs.getMinutes();\n let strMonth = \"\";\n switch (dateJs.getMonth()) {\n case 0:\n strMonth = \"Jan\";\n break;\n case 1:\n strMonth = \"Feb\";\n break;\n case 2:\n strMonth = \"Mar\";\n break;\n case 3:\n strMonth = \"Apr\";\n break;\n case 4:\n strMonth = \"May\";\n break;\n case 5:\n strMonth = \"Jun\";\n break;\n case 6:\n strMonth = \"Jul\";\n break;\n case 7:\n strMonth = \"Aug\";\n break;\n case 8:\n strMonth = \"Sep\";\n break;\n case 9:\n strMonth = \"Oct\";\n break;\n case 10:\n strMonth = \"Nov\";\n break;\n case 11:\n strMonth = \"Dec\";\n break;\n default:\n break;\n }\n let time = \"\";\n if (withTime) {\n time = ` at ${hour > 9 ? hour : \"0\" + hour}:${\n minutes > 9 ? minutes : \"0\" + minutes\n }`;\n }\n const fullDateString = `${dateJs.getDate()} ${strMonth}, ${dateJs.getFullYear()}${time}`;\n return fullDateString;\n};\nexport const parseDateToMMDDYYYY = (timeStamp: number): string => {\n const dateJs = new Date(timeStamp);\n const year = dateJs.getFullYear(),\n month = dateJs.getMonth() + 1,\n day = dateJs.getDate();\n return `${month < 10 ? \"0\" + month : month}/${\n day < 10 ? \"0\" + day : day\n }/${year}`;\n};\nexport const getCurrentTimeInMs = () => new Date().getTime();\nexport const setSecondsInMs = (seconds: number = 60) => seconds * 1000;\nexport const setMinutesInMs = (minutes: number = 60) => minutes * 60 * 1000;\nexport const setHoursInMs = (hour: number = 1) => hour * 60 * 60 * 1000;\nexport const setDaysInMs = (day: number = 1) => day * 24 * 60 * 60 * 1000;\n// Moment\nexport const setMoment = () => {\n return moment;\n};\nexport const setMomentDate = (date?: string | Date | Moment) => {\n return moment(date);\n};\nexport function setTokenExpired() {\n return moment().utcOffset(0).startOf(\"day\").add(7, \"d\").format();\n}\nexport function checkTokenExpired(date: string) {\n return moment().isSameOrAfter(date);\n}\nexport function setParseUTCtimeToLocale(date?: string | Date | Moment) {\n // @ts-ignore\n return moment(date).utc(moment.parseZone().utcOffset());\n}\nexport function setUTCtime(date?: string | Date | Moment) {\n return moment(date).utc();\n}\nexport function setUTCtimeOffset(date?: string | Date | Moment) {\n let utcTimeOffset: any = moment(date)\n .add(-1 * moment.parseZone().utcOffset(), \"m\")\n .utc();\n // In Summer we have one hour less ==> moment.parseZone().utcOffset() not get hour 00:00:00.000.Z\n if (new Date(utcTimeOffset).getHours() === 23) {\n utcTimeOffset.add(1, \"h\");\n }\n return utcTimeOffset;\n}\nexport function setUTCtime00(date?: string | Date | Moment) {\n return (\n moment(date)\n .hour(0)\n .minute(0)\n .second(0)\n .millisecond(0)\n // @ts-ignore\n .utc(moment.parseZone().utcOffset())\n );\n}\nexport function setUTCtime235959(date?: string | Date | Moment) {\n return (\n moment(date)\n .hour(23)\n .minute(59)\n .second(59)\n .millisecond(999)\n // @ts-ignore\n .utc(moment.parseZone().utcOffset())\n );\n}\nexport function setLocaleTime(utcDate: string | Date | Moment) {\n let offSet = moment.parseZone().utcOffset();\n if (offSet < 0) {\n return setUTCtime00(moment(utcDate).add(2, \"d\")).format();\n }\n return setUTCtime00(utcDate).format();\n}\nexport function setUTC_Offset(date?: string | Date) {\n let offSet = moment.parseZone().utcOffset();\n if (offSet < 0) {\n offSet *= -1;\n }\n return moment(date).utcOffset(offSet);\n}\nexport function set_Offset(offset: number | string, date?: string | Date) {\n return moment(date).utcOffset(offset);\n}\nexport const onChekValueDate = (\n value: any,\n format: string = \"MM/DD/YYYY\"\n): any => {\n if (\n value &&\n value !== \"Undefined\" &&\n value.toString().split(/([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9])/gi)\n .length === 3 &&\n value\n .toString()\n .split(/([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9])/gi)[2][0] === \"T\" &&\n setUTC_Offset(value.toString()).format(format) !== \"Invalid date\"\n ) {\n return setUTC_Offset(value.toString()).format(format);\n }\n return value;\n};\nexport const onSetDateTime = (isoDate: string): string => {\n let diffDateTime = moment().diff(moment(isoDate), \"hours\");\n if (diffDateTime >= 1) {\n return diffDateTime >= 24\n ? setParseUTCtimeToLocale(isoDate).format(\"MMM DD [at] HH:mm\")\n : `${diffDateTime} h`;\n }\n diffDateTime = moment().diff(moment(isoDate), \"minutes\");\n if (diffDateTime >= 1) {\n return `${diffDateTime} m`;\n }\n return `${moment().diff(moment(isoDate), \"seconds\")} s`;\n};\n// Utils for Array (like lodash)\nexport const groupBy = (input: any[], key: string) => {\n return [...input].reduce((acc, currentValue) => {\n let groupKey = currentValue[key];\n if (!acc[groupKey]) {\n acc[groupKey] = [];\n }\n acc[groupKey].push(currentValue);\n return acc;\n }, {});\n};\nexport const onParseToOrdinalSuffix = (num: any) => {\n const int = parseInt(num, 10),\n digits = [int % 10, int % 100],\n ordinals = [\"st\", \"nd\", \"rd\", \"th\"],\n oPattern = [1, 2, 3, 4],\n tPattern = [11, 12, 13, 14, 15, 16, 17, 18, 19];\n return oPattern.includes(digits[0]) && !tPattern.includes(digits[1])\n ? int + ordinals[digits[0] - 1]\n : int + ordinals[3];\n};\nexport const onSelectedItems =\n (\n selectType: \"select-all\" | \"select-none\" | \"select-one\",\n itemSelected: { [key: string]: any } | undefined,\n isItemSelected: boolean | undefined\n ) =>\n (items: object[] = [], itemsSelected: object[] = []): Array => {\n let newItemsSelected: object[] = [];\n switch (selectType) {\n case \"select-all\":\n // Select All Items\n newItemsSelected = [...items];\n break;\n case \"select-none\":\n // Select none Items\n break;\n default:\n // Add or Remove item selected\n if (isItemSelected) {\n // Remove\n newItemsSelected = itemsSelected.filter(\n ({ _id }: { [key: string]: any }) =>\n itemSelected && itemSelected._id !== _id\n );\n } else if (itemSelected) {\n // Add\n newItemsSelected = [...itemsSelected, itemSelected];\n }\n }\n return newItemsSelected;\n };\nexport const onSortByStatus = (status: \"ascending\" | \"descending\" | \"\") => {\n switch (status) {\n case \"ascending\":\n return \"descending\";\n case \"descending\":\n return \"\";\n default:\n return \"ascending\";\n }\n};\nexport const sortBy = (\n input: any[],\n key: string,\n sort: \"asc\" | \"desc\" | undefined = \"asc\"\n) => {\n const compare = (a: string | number, b: string | number) =>\n a < b ? -1 : a > b ? 1 : 0;\n return [...input].sort((left, right) => {\n let a = left[key],\n b = right[key];\n if (isNumeric(a)) {\n a = parseFloat(a);\n }\n if (isNumeric(b)) {\n b = parseFloat(b);\n }\n return sort === \"asc\" ? compare(b, a) : compare(a, b);\n });\n};\nexport function updateArrayWithElement(\n array: Array,\n element: any\n): Array {\n const index: string = array\n .map(({ _id }) => _id)\n .indexOf(element._id)\n .toString();\n return [\n ...array.slice(0, parseInt(index, 10)),\n element,\n ...array.slice(parseInt(index, 10) + 1),\n ];\n}\n// Utils others\nexport const capitalizeFirstLetter = (string: string): any => {\n return string.charAt(0).toUpperCase() + string.slice(1);\n};\nexport const capitalizeURLFirstLetter = (url: string): string => {\n return capitalizeFirstLetter(url.slice(1));\n};\nexport function downloadFile(name: string, href: string): void {\n //this trick will generate a temp tag to download the file\n const link = document.createElement(\"a\");\n link.href = href;\n link.style.display = \"none\";\n link.download = name;\n if (document.body && link) {\n document.body.appendChild(link);\n link.click();\n }\n if (document.body && link) {\n document.body.removeChild(link);\n }\n}\nexport const hexToRgb = (hex: string): any => {\n const rgb = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n window.logger.log(\"hexToRgb\", hex, \"to\", rgb);\n return rgb && rgb.length > 1\n ? {\n r: parseInt(rgb[1], 16),\n g: parseInt(rgb[2], 16),\n b: parseInt(rgb[3], 16),\n }\n : null;\n};\nexport const isNumeric = (str: string): boolean => {\n if (typeof str !== \"string\") {\n return false;\n } else {\n return !isNaN(Number(str)) && !isNaN(parseFloat(str));\n }\n};\nexport const lightenDarkenColor = (col: string, amt: number): string => {\n var usePound = false;\n if (col[0] === \"#\") {\n col = col.slice(1);\n usePound = true;\n }\n var num = parseInt(col, 16);\n var r = (num >> 16) + amt;\n if (r > 255) {\n r = 255;\n } else if (r < 0) {\n r = 0;\n }\n var b = ((num >> 8) & 0x00ff) + amt;\n if (b > 255) {\n b = 255;\n } else if (b < 0) {\n b = 0;\n }\n var g = (num & 0x0000ff) + amt;\n if (g > 255) {\n g = 255;\n } else if (g < 0) {\n g = 0;\n }\n return (usePound ? \"#\" : \"\") + (g | (b << 8) | (r << 16)).toString(16);\n};\nexport const onCheckTooltip = (event: Event) => {\n const eventTarget: any = event.target;\n // $FlowFixMe\n const { firstElementChild } = eventTarget;\n // $FlowFixMe\n eventTarget.title = \"\";\n // $FlowFixMe\n if (eventTarget.classList.contains(\"tooltip\")) {\n // $FlowFixMe\n eventTarget.classList.remove(\"tooltip\");\n }\n if (firstElementChild) {\n if (firstElementChild.offsetWidth < firstElementChild.scrollWidth) {\n // $FlowFixMe\n eventTarget.title = eventTarget.innerText;\n // $FlowFixMe\n eventTarget.classList.add(\"tooltip\");\n return;\n }\n }\n};\nexport const onGetHexRandomColor = (): string =>\n `#${Math.floor(Math.random() * (0xffffff << 0)).toString(16)}${Math.floor(\n Math.random() * (0xffffff << 0)\n ).toString(16)}`.slice(0, 7);\nexport const onParseCountToString = (count: number): string => {\n if (count > 999999) {\n return parseFloat((count / 1000000).toFixed(2)) + \"M\";\n } else if (count > 99999) {\n return parseFloat((count / 1000).toFixed(1)) + \"k\";\n }\n return count.toString();\n};\n// Dictionary\nexport const onSetCategoryWord = (\n disciplineWord: \"Discipline\" | \"discipline\" | \"Disciplines\" | \"disciplines\"\n): string => {\n if (\n onGetTenant() === \"uwslr\" ||\n onGetTenant() === \"uwride\" ||\n onGetTenant() === \"uwsandbox\"\n ) {\n switch (disciplineWord) {\n case \"Discipline\":\n return \"Category\";\n case \"discipline\":\n return \"category\";\n case \"Disciplines\":\n return \"Categories\";\n case \"disciplines\":\n return \"categories\";\n default:\n }\n }\n return disciplineWord;\n};\n","import type { Config, tAPI } from \"./API\";\n// API Auth static class\n\nconst apiBaseAuth = \"/users\";\nexport default class Auth {\n // Get All My Accounts Available\n static GetMyAccounts(api: tAPI, data: object, config?: Config) {\n return api.POST(`${apiBaseAuth}/accounts`, data, { ...config, tenant: \"\" });\n }\n static SwitchMyAccount(api: tAPI, data: object, config?: Config) {\n return api.POST(`${apiBaseAuth}/switchAccount`, data, config);\n }\n // Sign in App or Update my user account from userId\n static GetMyUserAccount(api: tAPI, userId: string, config?: Config) {\n return api.GET(`${apiBaseAuth}/${userId}?populated=true`, config);\n }\n static GetMySettingsAccount(api: tAPI, userId: string, config?: Config) {\n return api.GET(`${apiBaseAuth}/${userId}/settings`, config);\n }\n static EditMySettingsAccount(\n api: tAPI,\n userId: string,\n data: object,\n config?: Config\n ) {\n return api.PATCH(`${apiBaseAuth}/${userId}/settings`, data, config);\n }\n // Get a my user/company/institution files from ownerId\n static GetMyFiles(\n api: tAPI,\n belongsTo: \"Users\" | \"Companies\" | \"Institutions\",\n ownerId: string,\n config?: Config\n ) {\n return api.GET(\n `/files?populated=true&belongsTo=${belongsTo}&owner=${ownerId}`,\n config\n );\n }\n // Get my institution for that institutionId\n static GetMyInstitution(api: tAPI, institutionId: string, config?: Config) {\n return api.GET(`/institutions/${institutionId}`, config);\n }\n // Sign out\n static SignOut(api: tAPI, config?: Config) {\n return api.GET(`${apiBaseAuth}/signout`, config);\n }\n}\n","// @flow\n\n/* PERMISSIONS */\nconst onCheckResource = (apiResource: Object, resources: Array) => {\n for (let resource in apiResource) {\n if (\n resources.indexOf(resource) !== -1 &&\n apiResource[resource]['isEnabled']\n ) {\n return true;\n }\n }\n return false;\n};\n\nexport const onCheckAllCompaniesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n 'Companies:read',\n 'Companies:update',\n 'my#Companies:read',\n 'my#Companies:update'\n ];\n const { Companies } = permissions || {};\n if (Companies && Companies.apiValue) {\n return onCheckResource(Companies.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckReadMyCompaniesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = ['my#Companies:read'];\n const { Companies } = permissions || {};\n if (Companies && Companies.apiValue) {\n return onCheckResource(Companies.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckEditMyCompaniesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = ['my#Companies:update'];\n const { Companies } = permissions || {};\n if (Companies && Companies.apiValue) {\n return onCheckResource(Companies.apiValue, resources);\n }\n return false;\n};\n","// Import Features\nimport * as React from \"react\";\nimport { Modal, Loader as LoaderSemantic } from \"semantic-ui-react\";\n// Component generic while loading some info.\ntype Props = {\n className: string;\n textLoading: string;\n};\nconst Loader = ({ className, textLoading }: React.PropsWithChildren) => (\n
\n \n \n \n

{textLoading}

\n
\n
\n
\n);\nexport default Loader;\n","// @flow\n\n/* PERMISSIONS */\nconst onCheckResource = (apiResource: Object, resources: Array) => {\n for (let resource in apiResource) {\n if (\n resources.indexOf(resource) !== -1 &&\n apiResource[resource][\"isEnabled\"]\n ) {\n return true;\n }\n }\n return false;\n};\n\n// PROGRAMS\nexport const onCheckAllProgramsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"Programs:create\",\n \"Programs:read\",\n \"Programs:update\",\n \"Programs:delete\",\n ];\n const { Programs } = permissions || {};\n if (Programs && Programs.apiValue) {\n return onCheckResource(Programs.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadProgramsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Programs:read\"];\n const { Programs } = permissions || {};\n if (Programs && Programs.apiValue) {\n return onCheckResource(Programs.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCUDProgramsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Programs:create\", \"Programs:update\", \"Programs:delete\"];\n const { Programs } = permissions || {};\n if (Programs && Programs.apiValue) {\n return onCheckResource(Programs.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCreateProgramsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Programs:create\"];\n const { Programs } = permissions || {};\n if (Programs && Programs.apiValue) {\n return onCheckResource(Programs.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditProgramsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Programs:update\"];\n const { Programs } = permissions || {};\n if (Programs && Programs.apiValue) {\n return onCheckResource(Programs.apiValue, resources);\n }\n return false;\n};\nexport const onCheckDeleteProgramsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Programs:delete\"];\n const { Programs } = permissions || {};\n if (Programs && Programs.apiValue) {\n return onCheckResource(Programs.apiValue, resources);\n }\n return false;\n};\n// />\n// COHORTS\nexport const onCheckAllCohortsPermissions = (permissions: ?Object): boolean => {\n const resources = [\n \"Cohorts:create\",\n \"Cohorts:read\",\n \"Cohorts:update\",\n \"Cohorts:delete\",\n ];\n const { Cohorts } = permissions || {};\n if (Cohorts && Cohorts.apiValue) {\n return onCheckResource(Cohorts.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadCohortsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Cohorts:read\"];\n const { Cohorts } = permissions || {};\n if (Cohorts && Cohorts.apiValue) {\n return onCheckResource(Cohorts.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCUDCohortsPermissions = (permissions: ?Object): boolean => {\n const resources = [\"Cohorts:create\", \"Cohorts:update\", \"Cohorts:delete\"];\n const { Cohorts } = permissions || {};\n if (Cohorts && Cohorts.apiValue) {\n return onCheckResource(Cohorts.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCreateCohortsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Cohorts:create\"];\n const { Cohorts } = permissions || {};\n if (Cohorts && Cohorts.apiValue) {\n return onCheckResource(Cohorts.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditCohortsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Cohorts:update\"];\n const { Cohorts } = permissions || {};\n if (Cohorts && Cohorts.apiValue) {\n return onCheckResource(Cohorts.apiValue, resources);\n }\n return false;\n};\nexport const onCheckDeleteCohortsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Cohorts:delete\"];\n const { Cohorts } = permissions || {};\n if (Cohorts && Cohorts.apiValue) {\n return onCheckResource(Cohorts.apiValue, resources);\n }\n return false;\n};\n// />\n// FILES CATEGORIES\nexport const onCheckAllFileCategoriesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"FileCategories:create\",\n \"FileCategories:read\",\n \"FileCategories:update\",\n \"FileCategories:delete\",\n \"my#FileCategories:read\",\n ];\n const { FileCategories } = permissions || {};\n if (FileCategories && FileCategories.apiValue) {\n return onCheckResource(FileCategories.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadFileCategoriesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"FileCategories:read\"];\n const { FileCategories } = permissions || {};\n if (FileCategories && FileCategories.apiValue) {\n return onCheckResource(FileCategories.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCUDFileCategoriesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"FileCategories:create\",\n \"FileCategories:update\",\n \"FileCategories:delete\",\n ];\n const { FileCategories } = permissions || {};\n if (FileCategories && FileCategories.apiValue) {\n return onCheckResource(FileCategories.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCreateFileCategoriesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"FileCategories:create\"];\n const { FileCategories } = permissions || {};\n if (FileCategories && FileCategories.apiValue) {\n return onCheckResource(FileCategories.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditFileCategoriesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"FileCategories:update\"];\n const { FileCategories } = permissions || {};\n if (FileCategories && FileCategories.apiValue) {\n return onCheckResource(FileCategories.apiValue, resources);\n }\n return false;\n};\nexport const onCheckDeleteFileCategoriesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"FileCategories:delete\"];\n const { FileCategories } = permissions || {};\n if (FileCategories && FileCategories.apiValue) {\n return onCheckResource(FileCategories.apiValue, resources);\n }\n return false;\n};\n// />\n// CUSTOM FIELDS\nexport const onCheckAllCustomFieldsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"CustomFields:create\",\n \"CustomFields:read\",\n \"CustomFields:update\",\n \"CustomFields:delete\",\n \"my#CustomFields:read\",\n ];\n const { CustomFields } = permissions || {};\n if (CustomFields && CustomFields.apiValue) {\n return onCheckResource(CustomFields.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadCustomFieldsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"CustomFields:read\"];\n const { CustomFields } = permissions || {};\n if (CustomFields && CustomFields.apiValue) {\n return onCheckResource(CustomFields.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCUDCustomFieldsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"CustomFields:create\",\n \"CustomFields:update\",\n \"CustomFields:delete\",\n ];\n const { CustomFields } = permissions || {};\n if (CustomFields && CustomFields.apiValue) {\n return onCheckResource(CustomFields.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadMyCustomFieldsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my#CustomFields:read\"];\n const { CustomFields } = permissions || {};\n if (CustomFields && CustomFields.apiValue) {\n return onCheckResource(CustomFields.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCreateCustomFieldsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"CustomFields:create\"];\n const { CustomFields } = permissions || {};\n if (CustomFields && CustomFields.apiValue) {\n return onCheckResource(CustomFields.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditCustomFieldsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"CustomFields:update\"];\n const { CustomFields } = permissions || {};\n if (CustomFields && CustomFields.apiValue) {\n return onCheckResource(CustomFields.apiValue, resources);\n }\n return false;\n};\nexport const onCheckDeleteCustomFieldsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"CustomFields:delete\"];\n const { CustomFields } = permissions || {};\n if (CustomFields && CustomFields.apiValue) {\n return onCheckResource(CustomFields.apiValue, resources);\n }\n return false;\n};\n// />\n// ROLES - Access Control\nexport const onCheckAllRolesPermissions = (permissions: ?Object): boolean => {\n const resources = [\n \"Roles:read\",\n \"Roles:update\",\n \"Roles:change\",\n \"my:Users#Roles:change\",\n ];\n const { Roles } = permissions || {};\n if (Roles && Roles.apiValue) {\n return onCheckResource(Roles.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadRolesPermissions = (permissions: ?Object): boolean => {\n const resources = [\"Roles:read\"];\n const { Roles } = permissions || {};\n if (Roles && Roles.apiValue) {\n return onCheckResource(Roles.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCUDRolesPermissions = (permissions: ?Object): boolean => {\n const resources = [\"Roles:update\", \"Roles:change\", \"my:Users#Roles:change\"];\n const { Roles } = permissions || {};\n if (Roles && Roles.apiValue) {\n return onCheckResource(Roles.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditRolesPermissions = (permissions: ?Object): boolean => {\n const resources = [\"Roles:update\"];\n const { Roles } = permissions || {};\n if (Roles && Roles.apiValue) {\n return onCheckResource(Roles.apiValue, resources);\n }\n return false;\n};\nexport const onCheckChangeRolesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Roles:change\", \"my:Users#Roles:change\"];\n const { Roles } = permissions || {};\n if (Roles && Roles.apiValue) {\n return onCheckResource(Roles.apiValue, resources);\n }\n return false;\n};\n// />\n// DYNAMIC RULES - Access Control\nexport const onCheckAllDynamicRulesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"DynamicRules:create\",\n \"DynamicRules:read\",\n \"DynamicRules:update\",\n \"DynamicRules:delete\",\n ];\n const { DynamicRules } = permissions || {};\n if (DynamicRules && DynamicRules.apiValue) {\n return onCheckResource(DynamicRules.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadDynamicRulesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"DynamicRules:read\"];\n const { DynamicRules } = permissions || {};\n if (DynamicRules && DynamicRules.apiValue) {\n return onCheckResource(DynamicRules.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCUDDynamicRulesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"DynamicRules:create\",\n \"DynamicRules:update\",\n \"DynamicRules:delete\",\n ];\n const { DynamicRules } = permissions || {};\n if (DynamicRules && DynamicRules.apiValue) {\n return onCheckResource(DynamicRules.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCreateDynamicRulesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"DynamicRules:create\"];\n const { DynamicRules } = permissions || {};\n if (DynamicRules && DynamicRules.apiValue) {\n return onCheckResource(DynamicRules.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditDynamicRulesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"DynamicRules:update\"];\n const { DynamicRules } = permissions || {};\n if (DynamicRules && DynamicRules.apiValue) {\n return onCheckResource(DynamicRules.apiValue, resources);\n }\n return false;\n};\nexport const onCheckDeleteDynamicRulesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"DynamicRules:delete\"];\n const { DynamicRules } = permissions || {};\n if (DynamicRules && DynamicRules.apiValue) {\n return onCheckResource(DynamicRules.apiValue, resources);\n }\n return false;\n};\n// />\n// TENANT SETTINGS\nexport const onCheckAllTenantSettingsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"TenantSettings:read\",\n \"TenantSettings:create\",\n \"TenantSettings:update\",\n \"TenantSettings:delete\",\n ];\n const { TenantSettings } = permissions || {};\n if (TenantSettings && TenantSettings.apiValue) {\n return onCheckResource(TenantSettings.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadTenantSettingsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"TenantSettings:read\"];\n const { TenantSettings } = permissions || {};\n if (TenantSettings && TenantSettings.apiValue) {\n return onCheckResource(TenantSettings.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCUDTenantSettingsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"TenantSettings:create\",\n \"TenantSettings:update\",\n \"TenantSettings:delete\",\n ];\n const { TenantSettings } = permissions || {};\n if (TenantSettings && TenantSettings.apiValue) {\n return onCheckResource(TenantSettings.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCreateTenantSettingsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"TenantSettings:create\"];\n const { TenantSettings } = permissions || {};\n if (TenantSettings && TenantSettings.apiValue) {\n return onCheckResource(TenantSettings.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditTenantSettingsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"TenantSettings:update\"];\n const { TenantSettings } = permissions || {};\n if (TenantSettings && TenantSettings.apiValue) {\n return onCheckResource(TenantSettings.apiValue, resources);\n }\n return false;\n};\nexport const onCheckDeleteTenantSettingsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"TenantSettings:delete\"];\n const { TenantSettings } = permissions || {};\n if (TenantSettings && TenantSettings.apiValue) {\n return onCheckResource(TenantSettings.apiValue, resources);\n }\n return false;\n};\n// />\n","// @flow\n// Utils for queries and reports related with queries.\n\nexport type OptionsProps = {\n optionsProps: {\n roles: Array<{ key: string, value: string, text: string }>,\n genders: Array<{ key: string, value: string, text: string }>,\n programs: Array<{ key: string, value: string, text: string }>,\n cohorts: Array<{ key: string, value: string, text: string }>,\n terms: Array<{ key: string, value: string, text: string }>,\n institutions: Array<{ key: string, value: string, text: string }>,\n institutionsTypes: Array<{ key: string, value: string, text: string }>,\n rotationsStatus: Array<{ key: string, value: string, text: string }>,\n periods: Array<{ key: string, value: string, text: string }>,\n caseLogsStatus: Array<{ key: string, value: string, text: string }>,\n patientTypeAges: Array<{ key: string, value: string, text: string }>,\n patientGenders: Array<{ key: string, value: string, text: string }>,\n patientRaces: Array<{ key: string, value: string, text: string }>,\n caseLogsLanguagesList: Array<{ key: string, value: string, text: string }>,\n caseLogsInsurancesList: Array<{ key: string, value: string, text: string }>,\n caseLogsReasonForVisits: Array<{\n key: string,\n value: string,\n text: string,\n }>,\n caseLogsDisciplinesListForDiagnostics: Array<{\n key: string,\n value: string,\n text: string,\n }>,\n caseLogsDiagnosticsList: Array<{\n key: string,\n value: string,\n text: string,\n }>,\n caseLogsDisciplinesListForProcedures: Array<{\n key: string,\n value: string,\n text: string,\n }>,\n caseLogsProceduresList: Array<{ key: string, value: string, text: string }>,\n caseLogsTeethList: Array<{ key: string, value: string, text: string }>,\n evaluationsStatus: Array<{ key: string, value: string, text: string }>,\n evaluationType: Array<{ key: string, value: string, text: string }>,\n evaluationTemplates: Array<{ key: string, value: string, text: string }>,\n evaluationsAnswer: Array<{ key: string, value: string, text: string }>,\n users: Array<{ key: string, value: string, text: string }>,\n },\n};\n\nexport const optionsPropsList = {\n Users: {\n role: \"roles\",\n gender: \"genders\",\n },\n Enrollments: {\n \"program._id\": \"programs\",\n \"cohort._id\": \"cohorts\",\n //Users:\n \"student.gender\": \"genders\",\n },\n Institutions: {\n _id: \"institutions\",\n type: \"institutionsTypes\",\n },\n Rotations: {\n status: \"rotationsStatus\",\n \"period._id\": \"periods\",\n //Users:\n \"student.gender\": \"genders\",\n //Institutions:\n \"institution._id\": \"institutions\",\n \"institutions._id\": \"institutions\",\n \"institutions.type\": \"institutionsTypes\",\n //Enrollments:\n \"enrollment.program._id\": \"programs\",\n \"enrollment.cohort._id\": \"cohorts\",\n },\n CaseLogs: {\n status: \"caseLogsStatus\",\n \"patient.typeAge\": \"patientTypeAges\",\n \"patient.gender\": \"patientGenders\",\n \"patient.race\": \"patientRaces\",\n \"patient.firstLanguage\": \"caseLogsLanguagesList\",\n \"patient.insurance\": \"caseLogsInsurancesList\",\n reasonForVisit: \"caseLogsReasonForVisits\",\n preceptor: \"usersPreceptors\",\n \"diagnosesAndProcedures.toothReference\": \"caseLogsTeethList\",\n \"diagnosesAndProcedures.diagnosticDiscipline\":\n \"caseLogsDisciplinesListForDiagnostics\",\n \"diagnosesAndProcedures.diagnostic\": \"caseLogsDiagnosticsList\",\n \"diagnosesAndProcedures.procedureDiscipline\":\n \"caseLogsDisciplinesListForProcedures\",\n \"diagnosesAndProcedures.procedure\": \"caseLogsProceduresList\",\n //Users:\n \"student.gender\": \"genders\",\n \"preceptor.gender\": \"genders\",\n //Institutions:\n \"institution._id\": \"institutions\",\n \"institution.type\": \"institutionsTypes\",\n //Rotations:\n \"rotation.status\": \"rotationsStatus\",\n \"rotation.period._id\": \"periods\",\n //Enrollments:\n \"rotation.enrollment.program._id\": \"programs\",\n \"rotation.enrollment.cohort._id\": \"cohorts\",\n },\n Evaluations: {\n status: \"evaluationsStatus\",\n evaluationType: \"evaluationType\",\n \"evaluationScheduler.evaluationTemplate.name\": \"evaluationTemplates\",\n \"answer.answer\": \"evaluationsAnswer\",\n //Institutions:\n \"rotation.institution._id\": \"institutions\",\n \"rotation.institutions._id\": \"institutions\",\n \"rotation.institutions.type\": \"institutionsTypes\",\n //Users:\n \"evaluator.role\": \"roles\",\n \"evaluator.gender\": \"genders\",\n \"target.role\": \"roles\",\n \"target.gender\": \"genders\",\n //Enrollments:\n \"rotation.enrollment.program._id\": \"programs\",\n \"rotation.enrollment.cohort._id\": \"cohorts\",\n },\n};\n\nexport const onCreateOptionsProps = ({\n accessControl: { roles },\n usersManager: { filters },\n evaluationsTemplates: { templates },\n tenantSettings: {\n tenantSettings: {\n CASELOGS_LANGUAGE_LIST: { values: caseLogsLanguagesList },\n CASELOGS_INSURANCE_LIST: { values: caseLogsInsurancesList },\n CASELOGS_RACES_LIST: { values: caseLogsRacesList },\n CASELOGS_REASONS_FOR_VISIT_LIST: { values: caseLogsReasonsForVisitList },\n CASELOGS_DISCIPLINES_LIST_FOR_DIAGNOSTICS: {\n values: caseLogsDisciplinesListForDiagnostics,\n },\n CASELOGS_DIAGNOSTICS_LIST: { valuesApi: caseLogsDiagnosticsList },\n CASELOGS_DISCIPLINES_LIST_FOR_PROCEDURES: {\n values: caseLogsDisciplinesListForProcedures,\n },\n CASELOGS_PROCEDURES_LIST: { valuesApi: caseLogsProceduresList },\n CASELOGS_TOOTH_LIST: { values: caseLogsTeethList },\n INSTITUTIONS_TYPES_LIST: { valuesApi: institutionsTypes },\n },\n },\n users,\n institutions: { institutions },\n periods: { periods },\n}: Object) => {\n const myRoles = roles\n .filter(({ isActive }) => isActive)\n .map(({ apiName, name }) => ({\n key: apiName,\n value: apiName,\n text: name,\n }));\n const apiRoles = myRoles.map(({ value }) => value);\n let myUsers = [],\n myUsersPreceptors = [];\n for (let i = 0; i < apiRoles.length; i++) {\n if (users && users[apiRoles[i]]) {\n const section = {\n key: apiRoles[i],\n text: `${myRoles[i].text}`,\n onClick: null,\n style: { cursor: \"default\" },\n disabled: true,\n };\n myUsers.push(section);\n if (apiRoles[i] === \"Preceptors\") {\n myUsersPreceptors = users[apiRoles[i]].users.map(\n ({ _id, firstName, lastName }) => ({\n key: _id,\n value: _id,\n text: `${firstName} ${lastName}`,\n })\n );\n myUsers = [...myUsers, ...myUsersPreceptors];\n } else {\n myUsers = [\n ...myUsers,\n ...users[apiRoles[i]].users.map(({ _id, firstName, lastName }) => ({\n key: _id,\n value: _id,\n text: `${firstName} ${lastName}`,\n })),\n ];\n }\n }\n }\n return {\n optionsProps: {\n roles: myRoles,\n genders: [\n {\n key: \"male\",\n value: \"male\",\n text: \"Male\",\n },\n {\n key: \"female\",\n value: \"female\",\n text: \"Female\",\n },\n ],\n programs:\n filters && filters.programs\n ? filters.programs.options.map(({ _id, name }) => ({\n key: _id,\n value: _id,\n text: name,\n }))\n : [],\n cohorts:\n filters && filters.cohorts\n ? filters.cohorts.options.map(({ _id, name }) => ({\n key: _id,\n value: _id,\n text: name,\n }))\n : [],\n institutions: institutions.map(({ _id, name }) => ({\n key: _id,\n value: _id,\n text: name,\n })),\n institutionsTypes: institutionsTypes.map(({ _id, type }, index) => ({\n key: `institutionType-${type}-${_id}-${index}`,\n value: _id,\n text: type,\n })),\n rotationsStatus: [\n {\n key: \"upcoming\",\n value: \"upcoming\",\n text: \"Upcoming\",\n },\n {\n key: \"incourse\",\n value: \"incourse\",\n text: \"In Progress\",\n },\n {\n key: \"finished\",\n value: \"finished\",\n text: \"Finished\",\n },\n ],\n periods: periods.map(({ _id, name }) => ({\n key: _id,\n value: _id,\n text: name,\n })),\n caseLogsStatus: [\n {\n key: \"pending\",\n value: \"pending\",\n text: \"Pending\",\n },\n {\n key: \"denied\",\n value: \"denied\",\n text: \"Rejected\",\n },\n {\n key: \"approved\",\n value: \"approved\",\n text: \"Approved\",\n },\n ],\n patientTypeAges: [\n { key: \"years\", value: \"years\", text: \"Years\" },\n { key: \"months\", value: \"months\", text: \"Months\" },\n { key: \"weeks\", value: \"weeks\", text: \"Weeks\" },\n ],\n patientGenders: [\n { key: \"male\", value: \"Male\", text: \"Male\" },\n { key: \"female\", value: \"Female\", text: \"Female\" },\n { key: \"other\", value: \"Other\", text: \"Other\" },\n ],\n patientRaces: caseLogsRacesList.map((race) => ({\n key: race,\n value: race,\n text: race,\n })),\n caseLogsLanguagesList: caseLogsLanguagesList.map((language) => ({\n key: language,\n value: language,\n text: language,\n })),\n caseLogsInsurancesList: caseLogsInsurancesList.map((insurance) => ({\n key: insurance,\n value: insurance,\n text: insurance,\n })),\n caseLogsReasonForVisits: caseLogsReasonsForVisitList.map(\n (reasonForVisit) => ({\n key: reasonForVisit,\n value: reasonForVisit,\n text: reasonForVisit,\n })\n ),\n caseLogsDisciplinesListForDiagnostics:\n caseLogsDisciplinesListForDiagnostics.map((discipline) => ({\n key: discipline,\n value: discipline,\n text: discipline,\n })),\n caseLogsDiagnosticsList: caseLogsDiagnosticsList\n .map(({ diagnostic }) => diagnostic)\n .filter((elem, index, array) => array.indexOf(elem) === index)\n .map((diagnostic) => ({\n key: diagnostic,\n value: diagnostic,\n text: diagnostic,\n })),\n caseLogsDisciplinesListForProcedures:\n caseLogsDisciplinesListForProcedures.map((discipline) => ({\n key: discipline,\n value: discipline,\n text: discipline,\n })),\n caseLogsProceduresList: caseLogsProceduresList\n .map(({ procedure }) => procedure)\n .filter((elem, index, array) => array.indexOf(elem) === index)\n .map((procedure) => ({\n key: procedure,\n value: procedure,\n text: procedure,\n })),\n caseLogsTeethList: caseLogsTeethList.map(\n ({ toothName, toothReference }) => ({\n key: toothReference,\n value: toothReference,\n text: `${toothReference}: ${toothName}`,\n })\n ),\n evaluationsStatus: [\n {\n key: \"completed\",\n value: \"completed\",\n text: \"Completed\",\n icon: {\n name: \"circle\",\n size: \"tiny\",\n color: \"green\",\n },\n },\n {\n key: \"incourse\",\n value: \"incourse\",\n text: \"In Progress\",\n icon: {\n name: \"circle\",\n size: \"tiny\",\n color: \"orange\",\n },\n },\n {\n key: \"closed\",\n value: \"closed\",\n text: \"Closed\",\n icon: {\n name: \"circle\",\n size: \"tiny\",\n color: \"red\",\n },\n },\n ],\n evaluationType: [\n {\n key: \"UserEvaluations\",\n value: \"UserEvaluations\",\n text: \"User Evaluations\",\n },\n {\n key: \"InstitutionEvaluations\",\n value: \"InstitutionEvaluations\",\n text: \"Clinic Evaluations\",\n },\n {\n key: \"CompanyEvaluations\",\n value: \"CompanyEvaluations\",\n text: \"School Evaluations\",\n },\n {\n key: \"CustomEvaluations\",\n value: \"CustomEvaluations\",\n text: \"Custom Evaluations\",\n },\n ],\n evaluationTemplates: templates.map(({ _id, name }, index) => ({\n key: `template-${_id}-${index}`,\n value: name,\n text: name,\n })),\n evaluationsAnswer: [\n {\n key: \"positive_answers\",\n value: \"option_positive,option_singleChoice_positive\",\n text: \"Goal Met\",\n },\n {\n key: \"negative_answers\",\n value: \"option_negative,option_singleChoice_negative\",\n text: \"Standard Not Met\",\n },\n ],\n users: myUsers,\n usersPreceptors: myUsersPreceptors,\n },\n };\n};\n\nexport const onParseObjectValue = (obj: Object) => {\n let value = \"\";\n Object.keys(obj)\n .filter((key) => key !== \"label\")\n .map((key) => {\n value += `${key.charAt(0).toUpperCase() + key.slice(1)}: ${\n obj[key] || \"Not provided\"\n }; `;\n return key;\n });\n return value;\n};\n\nexport const onParseArrayValue = (array: Array) => {\n let value = \"\";\n array.map((v) => {\n if (v instanceof Object) {\n value += onParseObjectValue(v);\n } else {\n value += value;\n }\n return v;\n });\n return value;\n};\n\nexport const onParseOptionsProps = (\n value: any,\n // optionsProps: $PropertyType,\n optionsProps: Object,\n model:\n | \"Users\"\n | \"Enrollments\"\n | \"Institutions\"\n | \"Rotations\"\n | \"CaseLogs\"\n | \"Evaluations\",\n fieldName: string\n): any => {\n if (\n value &&\n value !== \"Undefined\" &&\n optionsPropsList &&\n optionsPropsList[model] &&\n optionsPropsList[model][fieldName] &&\n optionsProps &&\n optionsProps[optionsPropsList[model][fieldName]]\n ) {\n const valuesArray = optionsProps[optionsPropsList[model][fieldName]].filter(\n (filter) => filter.value === value\n );\n if (valuesArray.length > 0) {\n value = valuesArray[0][\"text\"];\n }\n }\n return value;\n};\n\nexport const onParseDynamicFilters = (dynamicFilters: {\n Users: Array,\n Enrollments: Array,\n Institutions: Array,\n Rotations: Array,\n CaseLogs: Array,\n Evaluations: Array,\n}) => {\n let filtersDynamic = [];\n for (let modelDynamic in dynamicFilters) {\n if (\n dynamicFilters[modelDynamic] &&\n dynamicFilters[modelDynamic].length > 0\n ) {\n const arrayModelDynamic = dynamicFilters[modelDynamic];\n const filteredArrayModelDynamic = arrayModelDynamic.filter(\n ({ match: { type, val, conditions, from, to, isDynamic } }) => {\n if (!isDynamic) {\n return false;\n }\n switch (type) {\n case \"string\":\n case \"id\":\n if (val && val.length) {\n return true;\n }\n break;\n case \"number\":\n if (conditions && (conditions._gt || conditions._lt)) {\n return true;\n } else if (conditions && conditions._eq) {\n return true;\n }\n break;\n case \"date\":\n if (from || to) {\n return true;\n }\n break;\n case \"boolean\":\n if (val !== null) {\n return true;\n }\n break;\n default:\n }\n return false;\n }\n );\n if (filteredArrayModelDynamic.length > 0) {\n filtersDynamic = [\n ...filtersDynamic,\n ...filteredArrayModelDynamic.map(({ match }) => match),\n ];\n }\n }\n }\n return filtersDynamic;\n};\n","// Features\nimport produce from \"immer\";\nimport { Evaluations, EvaluationsTemplates } from \"../actions/\";\nimport { updateArrayWithElement } from \"../../utils/\";\n// Types\n// import type { Action } from \"../../types/common.types\";\nimport type { Action } from \"deox\";\nimport type {\n EvaluationsTypes,\n EvaluationsMetadata,\n AnswersMetadata,\n StateEvaluations as State,\n} from \"../../types/evaluations.types\";\ntype EvaluationsActionReducers = Action<\n string,\n {\n answer: State[\"answer\"];\n answerId: State[\"answerId\"];\n answers: State[\"answers\"];\n evaluation: State[\"evaluation\"];\n evaluationAnswers: State[\"evaluation\"][\"answers\"];\n evaluationId: State[\"evaluationId\"];\n evaluations: State[\"evaluations\"];\n evaluationsFilters: State[\"evaluationsFilters\"];\n kpis: State[\"evaluations\"][\"kpis\"] | State[\"answers\"][\"kpis\"];\n metadata: { [k in EvaluationsTypes]: number };\n selected: State[\"evaluationTabs\"][\"selected\"];\n }\n>;\n// Evaluations Reducer\nexport const EVALUATIONS_LIMIT = 20;\nconst initialStateEvaluationTabs: State[\"evaluationTabs\"] = {\n panes: [\n { menuItem: \"User Evaluations\", name: \"UserEvaluations\" },\n { menuItem: \"Clinic Evaluations\", name: \"InstitutionEvaluations\" },\n { menuItem: \"School Evaluations\", name: \"CompanyEvaluations\" },\n { menuItem: \"Custom Evaluations\", name: \"CustomEvaluations\" },\n ],\n selected: 0,\n};\nconst initialStateEvaluationsMetadata: EvaluationsMetadata = {\n numTotalEvaluations: 0,\n numTotalEvaluationsInCourse: 0,\n numTotalEvaluationsCompleted: 0,\n numTotalEvaluationsClosed: 0,\n totalPages: 1,\n};\nconst initialStateAnswersMetadata: AnswersMetadata = {\n numTotalAnswers: 0,\n numTotalAnswersDraft: 0,\n numTotalAnswersCompleted: 0,\n totalPagesByAnswersCompleted: 1,\n totalPages: 1,\n};\nconst initialState: State = {\n // Evaluations\n evaluationTabs: initialStateEvaluationTabs,\n evaluation: {\n data: null,\n answers: [],\n },\n evaluationId: null,\n evaluations: {\n all: [],\n UserEvaluations: [],\n InstitutionEvaluations: [],\n CompanyEvaluations: [],\n CustomEvaluations: [],\n metadata: {\n UserEvaluations: initialStateEvaluationsMetadata,\n InstitutionEvaluations: initialStateEvaluationsMetadata,\n CompanyEvaluations: initialStateEvaluationsMetadata,\n CustomEvaluations: initialStateEvaluationsMetadata,\n },\n kpis: {\n fetching: false,\n Evaluations: null,\n },\n },\n evaluationsFilters: null,\n // Answers\n answers: {\n all: [],\n completed: {\n UserEvaluations: [],\n InstitutionEvaluations: [],\n CompanyEvaluations: [],\n CustomEvaluations: [],\n },\n draft: {\n UserEvaluations: [],\n InstitutionEvaluations: [],\n CompanyEvaluations: [],\n CustomEvaluations: [],\n },\n metadata: {\n UserEvaluations: initialStateAnswersMetadata,\n InstitutionEvaluations: initialStateAnswersMetadata,\n CompanyEvaluations: initialStateAnswersMetadata,\n CustomEvaluations: initialStateAnswersMetadata,\n },\n kpis: {\n fetching: false,\n EvaluationsAnswers: [],\n },\n },\n answer: null,\n answerId: null,\n};\nconst evaluations: (state: State, action: EvaluationsActionReducers) => State =\n produce((draft: State, action: EvaluationsActionReducers) => {\n const evaluationsTabSelected =\n draft.evaluationTabs.panes[draft.evaluationTabs.selected].name;\n switch (action.type) {\n case Evaluations.EVALUATIONS_SET_TAB_SELECTED:\n draft.evaluationTabs.selected = action.payload.selected;\n break;\n case Evaluations.EVALUATIONS_FETCH_ALL_SUCCESS:\n draft.evaluations.metadata = getEvaluationsMetadata(action);\n break;\n case Evaluations.EVALUATIONS_FETCH_BY_FILTERS_SUCCESS:\n draft.evaluations = {\n ...action.payload.evaluations,\n kpis: draft.evaluations.kpis,\n };\n draft.evaluations.metadata = getEvaluationsMetadata(action);\n draft.evaluationsFilters = action.payload.evaluationsFilters;\n break;\n case Evaluations.EVALUATIONS_FETCH_KPIS_REQUEST:\n if (!draft.evaluations.kpis) {\n // Compatibility v2.21.0\n draft.evaluations = {\n ...draft.evaluations,\n kpis: {\n ...initialState.evaluations.kpis,\n fetching: true,\n },\n };\n } else {\n draft.evaluations.kpis.fetching = true;\n }\n break;\n case Evaluations.EVALUATIONS_FETCH_KPIS_SUCCESS:\n case Evaluations.EVALUATIONS_FETCH_KPIS_FAILURE:\n draft.evaluations.kpis = action.payload\n .kpis as State[\"evaluations\"][\"kpis\"];\n draft.evaluations.kpis.fetching = false;\n break;\n case Evaluations.EVALUATIONS_ANSWERS_FETCH_KPIS_REQUEST:\n if (!draft.answers.kpis) {\n // Compatibility v2.21.0\n draft.answers.kpis = {\n ...initialState.answers.kpis,\n fetching: true,\n };\n } else {\n draft.answers.kpis.fetching = true;\n }\n break;\n case Evaluations.EVALUATIONS_ANSWERS_FETCH_KPIS_SUCCESS:\n case Evaluations.EVALUATIONS_ANSWERS_FETCH_KPIS_FAILURE:\n draft.answers.kpis = action.payload.kpis as State[\"answers\"][\"kpis\"];\n draft.answers.kpis.fetching = false;\n break;\n case Evaluations.EVALUATIONS_EDIT_SUCCESS:\n draft.evaluations.all = updateArrayWithElement(\n draft.evaluations.all,\n action.payload.evaluation\n );\n draft.evaluations[evaluationsTabSelected] = updateArrayWithElement(\n draft.evaluations[evaluationsTabSelected],\n action.payload.evaluation\n );\n break;\n case Evaluations.EVALUATIONS_DELETE_SUCCESS:\n draft.evaluations.all = draft.evaluations.all.filter(\n ({ _id }) => _id !== action.payload.evaluationId\n );\n draft.evaluations[evaluationsTabSelected] = draft.evaluations[\n evaluationsTabSelected\n ].filter(({ _id }) => _id !== action.payload.evaluationId);\n break;\n case Evaluations.EVALUATIONS_FETCH_ANSWERS_SUCCESS:\n draft.answers = {\n ...action.payload.answers,\n kpis: draft.answers.kpis,\n };\n draft.answers.metadata = getAnswersMetadata(action);\n break;\n case Evaluations.EVALUATIONS_SET_EVALUATION_ID:\n draft.evaluationId = action.payload.evaluationId;\n break;\n case Evaluations.EVALUATIONS_FETCH_EVALUATION_SUCCESS:\n draft.evaluation.data = action.payload.evaluation;\n break;\n case Evaluations.EVALUATIONS_FETCH_EVALUATION_ANSWERS_SUCCESS:\n draft.evaluation.answers = action.payload.evaluationAnswers;\n break;\n case Evaluations.EVALUATIONS_SET_ANSWER_ID:\n draft.answerId = action.payload.answerId;\n break;\n case Evaluations.EVALUATIONS_FETCH_EVALUATION_ANSWER_SUCCESS:\n draft.answer = action.payload.answer;\n break;\n case Evaluations.EVALUATIONS_RESET_ANSWER_LOADED:\n draft.answer = initialState.answer;\n draft.answerId = initialState.answerId;\n break;\n case Evaluations.EVALUATIONS_RESET_EVALUATION_LOADED:\n draft.evaluation = initialState.evaluation;\n draft.evaluationId = initialState.evaluationId;\n break;\n case EvaluationsTemplates.EVALUATIONS_TEMPLATES_RESET_EVALUATION_TEMPLATE_LOADED:\n return {\n ...initialState,\n evaluationTabs: draft.evaluationTabs,\n evaluations: draft.evaluations,\n answers: draft.answers,\n };\n }\n }, initialState);\n// GET EvaluationsMetadata\nconst getEvaluationsMetadata = (action: EvaluationsActionReducers) => {\n const { metadata, evaluations } = action.payload;\n let newMetadata = {\n UserEvaluations: initialStateEvaluationsMetadata,\n InstitutionEvaluations: initialStateEvaluationsMetadata,\n CompanyEvaluations: initialStateEvaluationsMetadata,\n CustomEvaluations: initialStateEvaluationsMetadata,\n };\n for (let evaluationType in evaluations) {\n if (evaluationType !== \"all\") {\n const {\n incourse = 0,\n completed = 0,\n closed = 0,\n } = {\n incourse: evaluations[evaluationType as EvaluationsTypes].filter(\n ({ status }) => status === \"incourse\"\n ).length,\n completed: (\n evaluations[\n evaluationType as EvaluationsTypes\n ] as State[\"evaluations\"][\"all\"]\n ).filter(({ status }) => status === \"completed\").length,\n closed: (\n evaluations[\n evaluationType as EvaluationsTypes\n ] as State[\"evaluations\"][\"all\"]\n ).filter(({ status }) => status === \"closed\").length,\n };\n let numTotalEvaluations = incourse + completed + closed;\n if (metadata && metadata[evaluationType as EvaluationsTypes]) {\n numTotalEvaluations = metadata[evaluationType as EvaluationsTypes];\n }\n newMetadata = {\n ...newMetadata,\n [evaluationType]: {\n numTotalEvaluations,\n numTotalEvaluationsInCourse: incourse,\n numTotalEvaluationsCompleted: completed,\n numTotalEvaluationsClosed: closed,\n totalPages:\n 1 +\n parseInt(\n ((numTotalEvaluations - 1) / EVALUATIONS_LIMIT).toString(),\n 10\n ),\n },\n };\n }\n }\n return newMetadata;\n};\n// GET AnswersMetadata\nconst getAnswersMetadata = (action: EvaluationsActionReducers) => {\n const { metadata, answers } = action.payload;\n let newMetadata = {\n UserEvaluations: initialStateAnswersMetadata,\n InstitutionEvaluations: initialStateAnswersMetadata,\n CompanyEvaluations: initialStateAnswersMetadata,\n CustomEvaluations: initialStateAnswersMetadata,\n };\n for (let evaluationType in answers.completed) {\n const { draft = 0 } = {\n draft: answers.draft[evaluationType as EvaluationsTypes].length,\n };\n const { completed = 0 } = {\n completed: answers.completed[evaluationType as EvaluationsTypes].length,\n };\n let numTotalAnswers = draft + completed;\n const evaluationTypeToCheck = `${evaluationType.slice(\n 0,\n evaluationType.length - 1\n )}Answers`;\n if (metadata && metadata[evaluationTypeToCheck as EvaluationsTypes]) {\n numTotalAnswers = metadata[evaluationTypeToCheck as EvaluationsTypes];\n }\n newMetadata = {\n ...newMetadata,\n [evaluationType]: {\n numTotalAnswers,\n numTotalAnswersDraft: draft,\n numTotalAnswersCompleted: completed,\n totalPagesByAnswersCompleted:\n 1 +\n parseInt(((numTotalAnswers - 1) / EVALUATIONS_LIMIT).toString(), 10),\n totalPages:\n 1 +\n parseInt(((numTotalAnswers - 1) / EVALUATIONS_LIMIT).toString(), 10),\n },\n };\n }\n return newMetadata;\n};\nexport default evaluations;\n","import { TenantSettings } from \"../actions/\";\nimport {\n onGetTenant,\n onSetCategoryWord,\n parseApiName,\n parseName,\n} from \"../../utils/\";\n\n// Types\nimport type { PayloadObject, UndefinedNull } from \"../../types/common.types\";\n// TenantSettings Reducer\nexport type TenantSettingsNameCaseLogsRequiredFields =\n | \"CASELOGS_AGE_REQUIRED_FIELD\"\n | \"CASELOGS_FIRST_LANGUAGE_REQUIRED_FIELD\"\n | \"CASELOGS_GENDER_REQUIRED_FIELD\"\n | \"CASELOGS_CLINIC_RECORD_NUMBER_REQUIRED_FIELD\"\n | \"CASELOGS_RACE_REQUIRED_FIELD\"\n | \"CASELOGS_PMCC_REQUIRED_FIELD\"\n | \"CASELOGS_INSURANCE_REQUIRED_FIELD\"\n | \"CASELOGS_APPOINTMENT_DATE_REQUIRED_FIELD\"\n | \"CASELOGS_CHIEF_COMPLAINT_REQUIRED_FIELD\"\n | \"CASELOGS_TIME_WITH_PATIENT_REQUIRED_FIELD\"\n | \"CASELOGS_REASON_FOR_VISIT_REQUIRED_FIELD\"\n | \"CASELOGS_CONSULT_WITH_PRECEPTOR_REQUIRED_FIELD\"\n | \"CASELOGS_DIAGNOSIS_AND_PROCEDURE_NOTES_REQUIRED_FIELD\"\n | \"CASELOGS_PROCEDURE_STATUS_REQUIRED_FIELD\";\nexport type TenantSettingsNameCaseLogsRequiredFieldsKeys =\n | \"age\"\n | \"firstLanguage\"\n | \"gender\"\n | \"institutionRecordNumber\"\n | \"race\"\n | \"pmcc\"\n | \"insurance\"\n | \"appointmentDate\"\n | \"chiefComplaint\"\n | \"minutesWithPatient\"\n | \"reasonForVisit\"\n | \"minutesWithPreceptor\"\n | \"comments\"\n | \"procedureStatus\";\nexport type TenantSettingsNameCaseLogsEnabledFields =\n | \"CASELOGS_AGE_ENABLED_FIELD\"\n | \"CASELOGS_FIRST_LANGUAGE_ENABLED_FIELD\"\n | \"CASELOGS_GENDER_ENABLED_FIELD\"\n | \"CASELOGS_CLINIC_RECORD_NUMBER_ENABLED_FIELD\"\n | \"CASELOGS_RACE_ENABLED_FIELD\"\n | \"CASELOGS_PMCC_ENABLED_FIELD\"\n | \"CASELOGS_INSURANCE_ENABLED_FIELD\"\n | \"CASELOGS_APPOINTMENT_DATE_ENABLED_FIELD\"\n | \"CASELOGS_CHIEF_COMPLAINT_ENABLED_FIELD\"\n | \"CASELOGS_TIME_WITH_PATIENT_ENABLED_FIELD\"\n | \"CASELOGS_REASON_FOR_VISIT_ENABLED_FIELD\"\n | \"CASELOGS_CONSULT_WITH_PRECEPTOR_ENABLED_FIELD\"\n | \"CASELOGS_DISCIPLINE_FOR_DIAGNOSES_AND_DIAGNOSIS_ENABLED_FIELD\"\n | \"CASELOGS_DIAGNOSIS_AND_PROCEDURE_NOTES_ENABLED_FIELD\"\n | \"CASELOGS_PROCEDURE_STATUS_ENABLED_FIELD\";\nexport type TenantSettingsNameCaseLogsEnabledFieldsKeys =\n | TenantSettingsNameCaseLogsRequiredFieldsKeys\n | \"diagnosticId\";\nexport type TenantSettingNameCaseLogs =\n | \"CASELOGS_DESIGN_VERSION\"\n | \"EDIT_PENDING_CASELOGS\"\n | \"CASELOGS_AUTO_APPROVAL\"\n | \"ENABLE_DUPLICATED_CASE_LOG_CHECKS\"\n | TenantSettingsNameCaseLogsRequiredFields\n | TenantSettingsNameCaseLogsEnabledFields\n | \"CASELOGS_LANGUAGE_LIST\"\n | \"CASELOGS_GENDER_LIST\"\n | \"CASELOGS_INSURANCE_LIST\"\n | \"CASELOGS_RACES_LIST\"\n | \"ALLOW_ALPHANUMERICS_CLINIC_RECORD_NUMBER\"\n | \"CASELOGS_REASONS_FOR_VISIT_LIST\"\n | \"CASELOGS_DISCIPLINES_LIST_FOR_DIAGNOSTICS\"\n | \"CASELOGS_DIAGNOSTICS_LIST\"\n | \"CASELOGS_DISCIPLINES_LIST_FOR_PROCEDURES\"\n | \"CASELOGS_PROCEDURES_LIST\"\n | \"CASELOGS_PROCEDURES_STATUS_LIST\"\n | \"CASELOGS_QUESTIONS_REVIEW\"\n | \"CASELOGS_TOOTH_LIST\";\nexport type TenantSettingName =\n // GENERAL\n | \"SHOW_DEACTIVATED_USERS\"\n | \"RETROACTIVE_DATE\"\n // ACCOUNTS (only FrontEnd)\n | \"ACCOUNTS_COMPANY_REQUIRED_FIELDS\"\n | \"ACCOUNTS_INSTITUTION_REQUIRED_FIELDS\"\n | \"ACCOUNTS_PROFILE_REQUIRED_FIELDS\"\n // CASE LOGS\n | TenantSettingNameCaseLogs\n // EVALUATIONS\n | \"EVALUATIONS_NOTIFICATIONS_EMAIL\"\n // ROTATIONS\n | \"ROTATIONS_OVERLAPPING_VALIDATION\"\n | \"ALLOW_AUTOMATIC_ROTATIONS_SCHEDULING_PARAMETERS\"\n | \"AUTOMATIC_ROTATIONS_SCHEDULING_PARAMETERS\"\n // INSTITUTIONS\n | \"INSTITUTIONS_TYPES_LIST\"\n // BROADCAST MESSAGES\n | \"BROADCAST_MESSAGES\"\n // NOTIFICATIONS\n | \"NOTIFICATIONS_SETTINGS\";\nexport type ArrayTenantSettingsNameCaseLogsRequiredFields = [\n TenantSettingsNameCaseLogsRequiredFields\n];\nexport type ArrayTenantSettingsNameCaseLogsEnabledFields = [\n TenantSettingsNameCaseLogsEnabledFields\n];\nexport type TenantSetting = {\n type:\n | \"General\"\n | \"Account\"\n | \"CaseLogs\"\n | \"Evaluations\"\n | \"Rotations\"\n | \"Institutions\"\n | \"Notifications\";\n keys: string[];\n _id: string | UndefinedNull;\n name: TenantSettingName;\n valuesApi: any;\n values: any;\n text: string;\n};\nexport type State = {\n isFetchingTenantSettings: boolean;\n lastFetchingTenantSettings: number | UndefinedNull;\n tenantSettings: { [key in TenantSettingName]: TenantSetting };\n tenantSettingsName: TenantSettingName[];\n};\ntype TenantSettingsRequiredFields = Pick<\n State[\"tenantSettings\"],\n | TenantSettingsNameCaseLogsRequiredFields\n | TenantSettingsNameCaseLogsEnabledFields\n>;\ntype CaseLogsRequiredEnabledFields =\n | {\n [key in TypeNames as TenantSettingsNameCaseLogsRequiredFields]: TenantSettingsNameCaseLogsRequiredFieldsKeys;\n }\n | {\n [key in TypeNames as TenantSettingsNameCaseLogsEnabledFields]: TenantSettingsNameCaseLogsEnabledFieldsKeys;\n };\ntype OnSetDefaultCaseLogsRequiredEnabledFields = (\n caseLogsRequiredEnabledFields:\n | CaseLogsRequiredEnabledFields\n | CaseLogsRequiredEnabledFields\n) => TenantSettingsRequiredFields;\ntype Action = {\n type: string;\n payload: PayloadObject;\n};\nexport const caseLogsRequiredFields: CaseLogsRequiredEnabledFields =\n {\n CASELOGS_AGE_REQUIRED_FIELD: \"age\",\n CASELOGS_FIRST_LANGUAGE_REQUIRED_FIELD: \"firstLanguage\",\n CASELOGS_GENDER_REQUIRED_FIELD: \"gender\",\n CASELOGS_CLINIC_RECORD_NUMBER_REQUIRED_FIELD: \"institutionRecordNumber\",\n CASELOGS_RACE_REQUIRED_FIELD: \"race\",\n CASELOGS_PMCC_REQUIRED_FIELD: \"pmcc\",\n CASELOGS_INSURANCE_REQUIRED_FIELD: \"insurance\",\n CASELOGS_APPOINTMENT_DATE_REQUIRED_FIELD: \"appointmentDate\",\n CASELOGS_CHIEF_COMPLAINT_REQUIRED_FIELD: \"chiefComplaint\",\n CASELOGS_TIME_WITH_PATIENT_REQUIRED_FIELD: \"minutesWithPatient\",\n CASELOGS_REASON_FOR_VISIT_REQUIRED_FIELD: \"reasonForVisit\",\n CASELOGS_CONSULT_WITH_PRECEPTOR_REQUIRED_FIELD: \"minutesWithPreceptor\",\n CASELOGS_DIAGNOSIS_AND_PROCEDURE_NOTES_REQUIRED_FIELD: \"comments\",\n CASELOGS_PROCEDURE_STATUS_REQUIRED_FIELD: \"procedureStatus\",\n };\nexport const caseLogsEnabledFields: CaseLogsRequiredEnabledFields =\n {\n CASELOGS_AGE_ENABLED_FIELD: \"age\",\n CASELOGS_FIRST_LANGUAGE_ENABLED_FIELD: \"firstLanguage\",\n CASELOGS_GENDER_ENABLED_FIELD: \"gender\",\n CASELOGS_CLINIC_RECORD_NUMBER_ENABLED_FIELD: \"institutionRecordNumber\",\n CASELOGS_RACE_ENABLED_FIELD: \"race\",\n CASELOGS_PMCC_ENABLED_FIELD: \"pmcc\",\n CASELOGS_INSURANCE_ENABLED_FIELD: \"insurance\",\n CASELOGS_APPOINTMENT_DATE_ENABLED_FIELD: \"appointmentDate\",\n CASELOGS_CHIEF_COMPLAINT_ENABLED_FIELD: \"chiefComplaint\",\n CASELOGS_TIME_WITH_PATIENT_ENABLED_FIELD: \"minutesWithPatient\",\n CASELOGS_REASON_FOR_VISIT_ENABLED_FIELD: \"reasonForVisit\",\n CASELOGS_CONSULT_WITH_PRECEPTOR_ENABLED_FIELD: \"comments\",\n CASELOGS_DIAGNOSIS_AND_PROCEDURE_NOTES_ENABLED_FIELD:\n \"minutesWithPreceptor\",\n CASELOGS_DISCIPLINE_FOR_DIAGNOSES_AND_DIAGNOSIS_ENABLED_FIELD:\n \"diagnosticId\",\n CASELOGS_PROCEDURE_STATUS_ENABLED_FIELD: \"procedureStatus\",\n };\nexport const tenantSettingsNameCaseLogs: TenantSettingNameCaseLogs[] = [\n \"CASELOGS_DESIGN_VERSION\",\n \"EDIT_PENDING_CASELOGS\",\n \"CASELOGS_AUTO_APPROVAL\",\n \"ENABLE_DUPLICATED_CASE_LOG_CHECKS\",\n ...(Object.keys(\n caseLogsRequiredFields\n ) as ArrayTenantSettingsNameCaseLogsRequiredFields),\n ...(Object.keys(\n caseLogsEnabledFields\n ) as ArrayTenantSettingsNameCaseLogsEnabledFields),\n \"CASELOGS_LANGUAGE_LIST\",\n \"CASELOGS_GENDER_LIST\",\n \"CASELOGS_INSURANCE_LIST\",\n \"CASELOGS_RACES_LIST\",\n \"ALLOW_ALPHANUMERICS_CLINIC_RECORD_NUMBER\",\n \"CASELOGS_REASONS_FOR_VISIT_LIST\",\n \"CASELOGS_DISCIPLINES_LIST_FOR_DIAGNOSTICS\",\n \"CASELOGS_DIAGNOSTICS_LIST\",\n \"CASELOGS_DISCIPLINES_LIST_FOR_PROCEDURES\",\n \"CASELOGS_PROCEDURES_LIST\",\n \"CASELOGS_PROCEDURES_STATUS_LIST\",\n \"CASELOGS_QUESTIONS_REVIEW\",\n \"CASELOGS_TOOTH_LIST\",\n];\nconst onSetDefaultCaseLogsRequiredEnabledFields: OnSetDefaultCaseLogsRequiredEnabledFields =\n (caseLogsRequiredEnabledFields) => {\n let caseLogsFieldsObject = {};\n Object.keys(caseLogsRequiredEnabledFields).forEach((tenantSettingsName) => {\n let text = tenantSettingsName\n .replace(/^CASELOGS_|_ENABLED|_REQUIRED_FIELD$/g, \"\")\n .replace(/_/g, \" \")\n .split(\" \")\n .map((s) => s.charAt(0) + s.toLowerCase().slice(1))\n .join(\" \");\n if (tenantSettingsName.includes(\"PMCC\")) {\n text = \"People with Medically Complex Conditions\";\n }\n if (tenantSettingsName.includes(\"ENABLED\")) {\n text = `Show ${text.replace(\n /Discipline/g,\n onSetCategoryWord(\"Discipline\")\n )}`;\n }\n caseLogsFieldsObject = {\n ...caseLogsFieldsObject,\n [tenantSettingsName as keyof typeof caseLogsRequiredEnabledFields]: {\n type: \"CaseLogs\",\n keys: [\n caseLogsRequiredEnabledFields[\n tenantSettingsName as keyof typeof caseLogsRequiredEnabledFields\n ],\n ],\n _id: null,\n name: tenantSettingsName,\n valuesApi: false,\n values: false,\n text,\n },\n };\n });\n return caseLogsFieldsObject as TenantSettingsRequiredFields;\n };\nconst initialStateTenantSettings: State[\"tenantSettings\"] = {\n SHOW_DEACTIVATED_USERS: {\n type: \"General\",\n keys: [],\n _id: null,\n name: \"SHOW_DEACTIVATED_USERS\",\n valuesApi: false,\n values: false,\n text: \"Show Deactivated Users\",\n },\n RETROACTIVE_DATE: {\n type: \"General\",\n keys: [],\n _id: null,\n name: \"RETROACTIVE_DATE\",\n valuesApi: null,\n values: null,\n text: \"Retroactive Date\",\n },\n ACCOUNTS_COMPANY_REQUIRED_FIELDS: {\n type: \"Account\",\n keys: [],\n _id: \"ACCOUNTS_COMPANY_REQUIRED_FIELDS\",\n name: \"ACCOUNTS_COMPANY_REQUIRED_FIELDS\",\n valuesApi: onGetTenant().includes(\"udm\"),\n values: onGetTenant().includes(\"udm\"),\n text: \"My School Profile with Required Fields\",\n },\n ACCOUNTS_INSTITUTION_REQUIRED_FIELDS: {\n type: \"Account\",\n keys: [],\n _id: \"ACCOUNTS_INSTITUTION_REQUIRED_FIELDS\",\n name: \"ACCOUNTS_INSTITUTION_REQUIRED_FIELDS\",\n valuesApi: onGetTenant().includes(\"udm\"),\n values: onGetTenant().includes(\"udm\"),\n text: \"My School Profile with Required Fields\",\n },\n ACCOUNTS_PROFILE_REQUIRED_FIELDS: {\n type: \"Account\",\n keys: [],\n _id: \"ACCOUNTS_PROFILE_REQUIRED_FIELDS\",\n name: \"ACCOUNTS_PROFILE_REQUIRED_FIELDS\",\n valuesApi: onGetTenant().includes(\"udm\"),\n values: onGetTenant().includes(\"udm\"),\n text: \"My School Profile with Required Fields\",\n },\n CASELOGS_DESIGN_VERSION: {\n type: \"CaseLogs\",\n keys: [],\n _id: null,\n name: \"CASELOGS_DESIGN_VERSION\",\n valuesApi: \"\",\n values: \"\",\n text: \"Case Logs Form Design\",\n },\n EDIT_PENDING_CASELOGS: {\n type: \"CaseLogs\",\n keys: [],\n _id: null,\n name: \"EDIT_PENDING_CASELOGS\",\n valuesApi: false,\n values: false,\n text: \"Edit Pending Case Logs\",\n },\n CASELOGS_AUTO_APPROVAL: {\n type: \"CaseLogs\",\n keys: [],\n _id: null,\n name: \"CASELOGS_AUTO_APPROVAL\",\n valuesApi: false,\n values: false,\n text: \"Auto Approve Case Logs\",\n },\n ENABLE_DUPLICATED_CASE_LOG_CHECKS: {\n type: \"CaseLogs\",\n keys: [],\n _id: null,\n name: \"ENABLE_DUPLICATED_CASE_LOG_CHECKS\",\n valuesApi: false,\n values: false,\n text: \"Show Duplicated Case Logs\",\n },\n ...onSetDefaultCaseLogsRequiredEnabledFields(caseLogsRequiredFields),\n ...onSetDefaultCaseLogsRequiredEnabledFields(caseLogsEnabledFields),\n CASELOGS_LANGUAGE_LIST: {\n type: \"CaseLogs\",\n keys: [\"_id\", \"language\"],\n _id: null,\n name: \"CASELOGS_LANGUAGE_LIST\",\n valuesApi: [],\n values: [],\n text: \"Languages\",\n },\n CASELOGS_GENDER_LIST: {\n type: \"CaseLogs\",\n keys: [\"_id\", \"gender\"],\n _id: null,\n name: \"CASELOGS_GENDER_LIST\",\n valuesApi: [],\n values: [],\n text: \"Gender\",\n },\n CASELOGS_INSURANCE_LIST: {\n type: \"CaseLogs\",\n keys: [\"_id\", \"insurance\"],\n _id: null,\n name: \"CASELOGS_INSURANCE_LIST\",\n valuesApi: [],\n values: [],\n text: \"Insurances\",\n },\n CASELOGS_RACES_LIST: {\n type: \"CaseLogs\",\n keys: [\"_id\", \"race\"],\n _id: null,\n name: \"CASELOGS_RACES_LIST\",\n valuesApi: [],\n values: [],\n text: \"Races\",\n },\n ALLOW_ALPHANUMERICS_CLINIC_RECORD_NUMBER: {\n type: \"CaseLogs\",\n keys: [],\n _id: null,\n name: \"ALLOW_ALPHANUMERICS_CLINIC_RECORD_NUMBER\",\n valuesApi: false,\n values: false,\n text: \"Clinic Record Number type\",\n },\n CASELOGS_REASONS_FOR_VISIT_LIST: {\n type: \"CaseLogs\",\n keys: [\"_id\", \"reasonForVisit\"],\n _id: null,\n name: \"CASELOGS_REASONS_FOR_VISIT_LIST\",\n valuesApi: [],\n values: [],\n text: \"Reasons for Visit\",\n },\n CASELOGS_DISCIPLINES_LIST_FOR_DIAGNOSTICS: {\n type: \"CaseLogs\",\n keys: [\"_id\", \"diagnosticDiscipline\"],\n _id: null,\n name: \"CASELOGS_DISCIPLINES_LIST_FOR_DIAGNOSTICS\",\n valuesApi: [],\n values: [],\n text: `${onSetCategoryWord(\"Disciplines\")} for Diagnoses`,\n },\n CASELOGS_DIAGNOSTICS_LIST: {\n type: \"CaseLogs\",\n keys: [\n \"_id\",\n \"diagnosticDisciplineId\",\n \"diagnosticDiscipline\",\n \"diagnostic\",\n \"description\",\n ],\n _id: null,\n name: \"CASELOGS_DIAGNOSTICS_LIST\",\n valuesApi: [],\n values: [],\n text: \"Diagnosis\",\n },\n CASELOGS_DISCIPLINES_LIST_FOR_PROCEDURES: {\n type: \"CaseLogs\",\n keys: [\"_id\", \"procedureDiscipline\"],\n _id: null,\n name: \"CASELOGS_DISCIPLINES_LIST_FOR_PROCEDURES\",\n valuesApi: [],\n values: [],\n text: `${onSetCategoryWord(\"Disciplines\")} for Procedures`,\n },\n CASELOGS_PROCEDURES_LIST: {\n type: \"CaseLogs\",\n keys: [\n \"_id\",\n \"procedureDisciplineId\",\n \"procedureDiscipline\",\n \"procedure\",\n \"cpu\",\n ],\n _id: null,\n name: \"CASELOGS_PROCEDURES_LIST\",\n valuesApi: [],\n values: [],\n text: \"Procedures\",\n },\n CASELOGS_PROCEDURES_STATUS_LIST: {\n type: \"CaseLogs\",\n keys: [\"_id\", \"procedureStatus\"],\n _id: null,\n name: \"CASELOGS_PROCEDURES_STATUS_LIST\",\n valuesApi: [],\n values: [],\n text: \"Procedures Status\",\n },\n CASELOGS_QUESTIONS_REVIEW: {\n type: \"CaseLogs\",\n keys: [\n \"_id\",\n \"isEnabled\",\n \"procedureCodes\",\n \"criteriaList\",\n \"evaluationProcedure\",\n \"filters\",\n ],\n _id: null,\n name: \"CASELOGS_QUESTIONS_REVIEW\",\n valuesApi: [],\n values: [],\n text: \"Procedures Review\",\n },\n CASELOGS_TOOTH_LIST: {\n type: \"CaseLogs\",\n keys: [\"_id\", \"toothName\", \"toothReference\"],\n _id: null,\n name: \"CASELOGS_TOOTH_LIST\",\n valuesApi: [],\n values: [],\n text: \"Teeth\",\n },\n EVALUATIONS_NOTIFICATIONS_EMAIL: {\n type: \"Evaluations\",\n keys: [\"emails\", \"enabled\"],\n _id: null,\n name: \"EVALUATIONS_NOTIFICATIONS_EMAIL\",\n valuesApi: {\n emails: [],\n enabled: false,\n },\n values: {\n emails: [],\n enabled: false,\n },\n text: \"Evaluations notifications by email\",\n },\n ROTATIONS_OVERLAPPING_VALIDATION: {\n type: \"Rotations\",\n keys: [],\n _id: null,\n name: \"ROTATIONS_OVERLAPPING_VALIDATION\",\n valuesApi: false,\n values: false,\n text: \"Allow overlapping Rotations\",\n },\n ALLOW_AUTOMATIC_ROTATIONS_SCHEDULING_PARAMETERS: {\n type: \"Rotations\",\n keys: [],\n _id: null,\n name: \"ALLOW_AUTOMATIC_ROTATIONS_SCHEDULING_PARAMETERS\",\n valuesApi: false,\n values: false,\n text: \"Allow Automatic Rotations\",\n },\n AUTOMATIC_ROTATIONS_SCHEDULING_PARAMETERS: {\n type: \"Rotations\",\n keys: [],\n _id: null,\n name: \"AUTOMATIC_ROTATIONS_SCHEDULING_PARAMETERS\",\n valuesApi: [],\n values: [],\n text: \"Automatic Rotations > parameters\",\n },\n INSTITUTIONS_TYPES_LIST: {\n type: \"Institutions\",\n keys: [\"_id\", \"institutionType\"],\n _id: null,\n name: \"INSTITUTIONS_TYPES_LIST\",\n valuesApi: [],\n values: [],\n text: parseApiName(parseName(\"InstitutionTypes\")),\n },\n BROADCAST_MESSAGES: {\n type: \"Notifications\",\n keys: [\n \"_id\",\n \"roles\",\n \"users\",\n \"programs\",\n \"cohorts\",\n \"institutions\",\n \"message\",\n ],\n _id: null,\n name: \"BROADCAST_MESSAGES\",\n valuesApi: [],\n values: [],\n text: \"Messages\",\n },\n NOTIFICATIONS_SETTINGS: {\n type: \"Notifications\",\n keys: [\n \"CASE_LOG_SUBMITED\",\n \"CASE_LOG_DENIED\",\n \"CASE_LOG_APPROVED\",\n \"ROTATION_CREATED\",\n \"ROTATION_UPDATED\",\n ],\n _id: null,\n name: \"NOTIFICATIONS_SETTINGS\",\n valuesApi: [],\n values: [\n // CASE LOGS\n {\n name: \"New one\",\n description: \"New case log submitted\",\n rolesAvailableToSend: [\n \"SuperCompanyAdministrators\",\n \"CompanyAdministrators\",\n \"InstitutionAdministrators\",\n \"Preceptors\",\n ],\n receivers: [],\n channels: [\"App\"],\n type: \"CASELOGS\",\n _id: \"CASE_LOG_SUBMITED\",\n },\n {\n name: \"Rejected\",\n description: \"Case log has been rejected\",\n rolesAvailableToSend: [\n \"SuperCompanyAdministrators\",\n \"CompanyAdministrators\",\n \"InstitutionAdministrators\",\n \"Students\",\n ],\n receivers: [],\n channels: [\"App\"],\n type: \"CASELOGS\",\n _id: \"CASE_LOG_DENIED\",\n },\n {\n name: \"Approved\",\n description: \"Case log has been approved\",\n rolesAvailableToSend: [\n \"SuperCompanyAdministrators\",\n \"CompanyAdministrators\",\n \"InstitutionAdministrators\",\n \"Students\",\n ],\n receivers: [],\n channels: [\"App\"],\n type: \"CASELOGS\",\n _id: \"CASE_LOG_APPROVED\",\n },\n // ROTATIONS\n {\n name: \"New one\",\n description: \"New rotation created\",\n rolesAvailableToSend: [\n \"SuperCompanyAdministrators\",\n \"CompanyAdministrators\",\n \"InstitutionAdministrators\",\n \"Students\",\n ],\n receivers: [],\n channels: [\"App\"],\n type: \"ROTATIONS\",\n _id: \"ROTATION_CREATED\",\n },\n {\n name: \"Edit\",\n description: \"Rotation has been edited\",\n rolesAvailableToSend: [\n \"SuperCompanyAdministrators\",\n \"CompanyAdministrators\",\n \"InstitutionAdministrators\",\n \"Students\",\n ],\n receivers: [],\n channels: [\"App\"],\n type: \"ROTATIONS\",\n _id: \"ROTATION_UPDATED\",\n },\n ],\n text: \"Notifications\",\n },\n};\nconst initialState: State = {\n isFetchingTenantSettings: false,\n lastFetchingTenantSettings: null,\n tenantSettings: initialStateTenantSettings,\n tenantSettingsName: [\n \"SHOW_DEACTIVATED_USERS\",\n \"RETROACTIVE_DATE\",\n \"ACCOUNTS_COMPANY_REQUIRED_FIELDS\",\n \"ACCOUNTS_INSTITUTION_REQUIRED_FIELDS\",\n \"ACCOUNTS_PROFILE_REQUIRED_FIELDS\",\n ...tenantSettingsNameCaseLogs,\n \"EVALUATIONS_NOTIFICATIONS_EMAIL\",\n \"ROTATIONS_OVERLAPPING_VALIDATION\",\n \"ALLOW_AUTOMATIC_ROTATIONS_SCHEDULING_PARAMETERS\",\n \"AUTOMATIC_ROTATIONS_SCHEDULING_PARAMETERS\",\n \"INSTITUTIONS_TYPES_LIST\",\n \"BROADCAST_MESSAGES\",\n \"NOTIFICATIONS_SETTINGS\",\n ],\n};\nexport default function tenantSettings(\n state: State = initialState,\n action: Action\n): State {\n switch (action.type) {\n //TenantSettings\n case TenantSettings.TENANT_SETTINGS_FETCH_ALL:\n return Object.assign({}, state, {\n isFetchingTenantSettings: true,\n });\n case TenantSettings.TENANT_SETTINGS_FETCH_ALL_FAILURE:\n return Object.assign({}, state, {\n isFetchingTenantSettings: false,\n });\n case TenantSettings.TENANT_SETTINGS_FETCH_ALL_SUCCESS:\n let newState: State[\"tenantSettings\"] = {\n ...state.tenantSettings,\n };\n for (let index in action.payload.tenantSettings) {\n const name = action.payload.tenantSettings[index][\"name\"] as\n | TenantSettingName\n | \"MODELS_FIELDS\";\n if (name === \"MODELS_FIELDS\") {\n const apiCaseLogsFields =\n action.payload.tenantSettings[index][\"value\"]?.CaseLogs || {};\n Object.keys(caseLogsRequiredFields).forEach((tenantSettingsName) => {\n newState[\n tenantSettingsName as TenantSettingsNameCaseLogsRequiredFields\n ] = {\n ...newState[\n tenantSettingsName as TenantSettingsNameCaseLogsRequiredFields\n ],\n _id: action.payload.tenantSettings[index][\"_id\"],\n valuesApi:\n apiCaseLogsFields[\n caseLogsRequiredFields[\n tenantSettingsName as keyof typeof caseLogsRequiredFields\n ]\n ] || false,\n values:\n apiCaseLogsFields[\n caseLogsRequiredFields[\n tenantSettingsName as keyof typeof caseLogsRequiredFields\n ]\n ]?.required || false,\n };\n });\n Object.keys(caseLogsEnabledFields).forEach((tenantSettingsName) => {\n newState[\n tenantSettingsName as TenantSettingsNameCaseLogsEnabledFields\n ] = {\n ...newState[\n tenantSettingsName as TenantSettingsNameCaseLogsEnabledFields\n ],\n _id: action.payload.tenantSettings[index][\"_id\"],\n valuesApi:\n apiCaseLogsFields[\n caseLogsEnabledFields[\n tenantSettingsName as keyof typeof caseLogsEnabledFields\n ]\n ] || false,\n values:\n apiCaseLogsFields[\n caseLogsEnabledFields[\n tenantSettingsName as keyof typeof caseLogsEnabledFields\n ]\n ]?.enabled || false,\n };\n });\n continue;\n }\n let values = [];\n switch (name) {\n case \"CASELOGS_LANGUAGE_LIST\":\n values = action.payload.tenantSettings[index][\"value\"].map(\n ({ language }: any) => language\n );\n break;\n case \"CASELOGS_GENDER_LIST\":\n values = action.payload.tenantSettings[index][\"value\"].map(\n ({ gender }: any) => gender\n );\n break;\n case \"CASELOGS_INSURANCE_LIST\":\n values = action.payload.tenantSettings[index][\"value\"].map(\n ({ insurance }: any) => insurance\n );\n break;\n case \"CASELOGS_RACES_LIST\":\n values = action.payload.tenantSettings[index][\"value\"].map(\n ({ race }: any) => race\n );\n break;\n case \"CASELOGS_REASONS_FOR_VISIT_LIST\":\n values = action.payload.tenantSettings[index][\"value\"].map(\n ({ reasonForVisit }: any) => reasonForVisit\n );\n break;\n case \"CASELOGS_DISCIPLINES_LIST_FOR_DIAGNOSTICS\":\n values = action.payload.tenantSettings[index][\"value\"].map(\n ({ diagnosticDiscipline }: any) => diagnosticDiscipline\n );\n break;\n case \"CASELOGS_DIAGNOSTICS_LIST\":\n values = action.payload.tenantSettings[index][\"value\"]\n .map(\n ({ diagnostic, diagnosticDisciplineId }: any) =>\n `${diagnosticDisciplineId}: ${diagnostic}`\n )\n .filter(\n (elem: any, index: number, array: any[]) =>\n array.indexOf(elem) === index\n );\n break;\n case \"CASELOGS_DISCIPLINES_LIST_FOR_PROCEDURES\":\n values = action.payload.tenantSettings[index][\"value\"].map(\n ({ procedureDiscipline }: any) => procedureDiscipline\n );\n break;\n case \"CASELOGS_PROCEDURES_LIST\":\n action.payload.tenantSettings[index][\"value\"].sort(\n (a: any, b: any) => {\n if (a.procedure < b.procedure) {\n return -1;\n }\n if (a.procedure > b.procedure) {\n return 1;\n }\n return 0;\n }\n );\n values = action.payload.tenantSettings[index][\"value\"]\n .map(\n ({ procedure, procedureDisciplineId }: any) =>\n `${procedureDisciplineId}: ${procedure}`\n )\n .filter(\n (elem: any, index: number, array: any[]) =>\n array.indexOf(elem) === index\n );\n break;\n case \"CASELOGS_PROCEDURES_STATUS_LIST\":\n values = action.payload.tenantSettings[index][\"value\"].map(\n ({ procedureStatus }: any) => procedureStatus\n );\n break;\n case \"INSTITUTIONS_TYPES_LIST\":\n values = action.payload.tenantSettings[index][\"value\"].map(\n ({ type }: any) => type\n );\n break;\n case \"NOTIFICATIONS_SETTINGS\":\n values = action.payload.tenantSettings[index][\"value\"]\n .map(\n ({\n _id: notificationSettingsId,\n receivers,\n channels = [\"App\"],\n }: any) => {\n const [notificationSetting] = state.tenantSettings[\n \"NOTIFICATIONS_SETTINGS\"\n ].values.filter(\n ({ _id }: any) => _id === notificationSettingsId\n );\n if (notificationSetting) {\n return {\n ...notificationSetting,\n receivers,\n channels,\n };\n }\n return null;\n }\n )\n .filter((v: any) => v);\n break;\n default:\n values = action.payload.tenantSettings[index][\"value\"];\n }\n newState[name as TenantSettingName] = {\n ...newState[name as TenantSettingName],\n _id: action.payload.tenantSettings[index][\"_id\"],\n valuesApi: action.payload.tenantSettings[index][\"value\"],\n values,\n };\n }\n return Object.assign({}, state, {\n isFetchingTenantSettings: false,\n lastFetchingTenantSettings: new Date().getTime(),\n tenantSettings: newState,\n });\n case TenantSettings.TENANT_SETTINGS_UPDATE_TENANT_SETTING_NAME:\n action.payload.callbackEnd();\n return Object.assign({}, state, {\n tenantSettings: action.payload.tenantSettings,\n lastFetchingTenantSettings: new Date().getTime(),\n });\n // same state (not change)\n default:\n return state;\n }\n}\n","import type { Config, tAPI } from \"./API\";\n// API Reports and Queries static class\n\nconst apiBaseReports = \"/queries\";\nexport default class Reports {\n // API QUERIES\n // Get a list of queries to use getting reports\n static GetReportsQueries(api: tAPI, config?: Config) {\n return api.GET(`${apiBaseReports}?populated=true`, config);\n }\n // Create a query to use on Reports\n static CreateReportsQuery(api: tAPI, data: object, config?: Config) {\n return api.POST(`${apiBaseReports}`, data, config);\n }\n // Get a query\n static GetReportsQuery(api: tAPI, queryId: string, config?: Config) {\n return api.GET(`${apiBaseReports}/${queryId}`, config);\n }\n // Edit a query to use on Reports\n static EditReportsQuery(\n api: tAPI,\n queryId: string,\n data: object,\n config?: Config\n ) {\n return api.PATCH(`${apiBaseReports}/${queryId}`, data, config);\n }\n // Delete a query\n static DeleteReportsQuery(api: tAPI, queryId: string, config?: Config) {\n return api.DELETE(`${apiBaseReports}/${queryId}`, config);\n }\n // Run a query and save report result to get historics on Reports\n static RunReportsQuery(\n api: tAPI,\n queryId: string,\n data: object,\n config?: Config\n ) {\n return api.POST(`${apiBaseReports}/${queryId}/run`, data, config);\n }\n\n // API REPORTS\n // API to get all Reports\n static GetReports(api: tAPI, config?: Config) {\n return api.GET(`${apiBaseReports}/reports?populated=true`, config);\n }\n\n // API REPORTS QUERIES\n // API to get Reports depend on query set up before\n static GetReportsQueryResults(api: tAPI, queryId: string, config?: Config) {\n let queryParams = \"?populated=true\";\n return api.GET(\n `${apiBaseReports}/${queryId}/reports${queryParams}`,\n config\n );\n }\n // Get a saved report result\n static GetReportsQueryResult(\n api: tAPI,\n queryId: string,\n reportId: string,\n config?: Config\n ) {\n return api.GET(\n `${apiBaseReports}/${queryId}/reports/${reportId}?populated=true`,\n config\n );\n }\n // Update a saved report result\n static EditReportsQueryResult(\n api: tAPI,\n queryId: string,\n reportId: string,\n updateResults: boolean = false,\n data: object,\n config?: Config\n ) {\n let queryParams = \"\";\n if (updateResults) {\n queryParams = \"?updateResults=true\";\n }\n return api.PATCH(\n `${apiBaseReports}/${queryId}/reports/${reportId}${queryParams}`,\n data,\n config\n );\n }\n // Delete a report\n static DeleteReportsQueryReport(\n api: tAPI,\n queryId: string,\n reportId: string,\n config?: Config\n ) {\n return api.DELETE(\n `${apiBaseReports}/${queryId}/reports/${reportId}`,\n config\n );\n }\n // Transform a saved report result (Counting Feature)\n static TransformReportsQueryResult(\n api: tAPI,\n queryId: string,\n reportId: string,\n data: object,\n config?: Config\n ) {\n return api.POST(\n `${apiBaseReports}/${queryId}/reports/${reportId}/transformReport`,\n data,\n config\n );\n }\n // Generate CSV from Report\n static GenerateCSVReport(\n api: tAPI,\n queryId: string,\n reportId: string,\n config?: Config\n ) {\n return api.DOWNLOAD(\n `${apiBaseReports}/${queryId}/reports/${reportId}/generateCSV`,\n {},\n \"text/csv\",\n config\n );\n }\n // Generate CSV Transform a saved report result (Counting Feature)\n static GenerateCSVTransformReportsQueryResult(\n api: tAPI,\n queryId: string,\n reportId: string,\n config?: Config\n ) {\n return api.DOWNLOAD(\n `${apiBaseReports}/${queryId}/reports/${reportId}/transformReport/generateCSV`,\n {},\n \"text/csv\",\n config\n );\n }\n}\n","import {\n put,\n select,\n call,\n all,\n takeEvery,\n takeLatest,\n} from \"redux-saga/effects\";\nimport ReportsApi from \"../api/Reports\";\nimport { Auth, Reports } from \"../actions/\";\nimport {\n onCreateOptions,\n onCreateFilter,\n} from \"../../components/reports/queries/query-params/models/index\";\nimport { optionsPropsList } from \"../../components/reports/queries/query-params/query-utils/queryUtils\";\nimport { downloadFile } from \"../../utils/\";\n// Type\nimport type { Action } from \"deox\";\nimport type { Config, tAPI } from \"../api/API\";\nimport type { Models } from \"../../types/reports.types\";\n//Sagas for Reports and Queries\n// QUERIES\nfunction* doReportsFetchQueries(\n action: Action<\n string,\n {\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Reports.reportsFetchQueriesRequest());\n window.logger.log(\"doReportsFetchQueries\", action);\n const { callbackSuccess = null, callbackError = null } = action.payload || {};\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get all queries for this company\n const {\n data: { queries },\n } = yield call(ReportsApi.GetReportsQueries, api, { token });\n yield put(\n Reports.reportsFetchQueriesSuccess({\n queries,\n })\n );\n if (callbackSuccess) {\n callbackSuccess(queries);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doReportsFetchQueries\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Reports.reportsFetchQueriesFailure());\n if (callbackError) {\n callbackError(error);\n }\n }\n}\n\nfunction* doReportsCreateQuery(\n action: Action<\n string,\n {\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Reports.reportsCreateQueryRequest());\n window.logger.log(\"doReportsCreateQuery\", action);\n const { body, callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n const createdBy: { [k: string]: any } = yield select(\n ({ auth: { user } }) => ({\n _id: user._id,\n firstName: user.firstName,\n lastName: user.lastName,\n role: user.role,\n })\n );\n // call the api to create a new query to use getting reports\n const {\n data: { query },\n } = yield call(ReportsApi.CreateReportsQuery, api, body, { token });\n yield put(\n Reports.reportsCreateQuerySuccess({\n query: { ...query, createdBy },\n })\n );\n if (callbackSuccess) {\n callbackSuccess({ ...query, createdBy });\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doReportsCreateQuery\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Reports.reportsCreateQueryFailure());\n const { message, details } = errors || \"\";\n if (callbackError) {\n let errorMsg = message;\n if (details && details.length > 0) {\n errorMsg = `${errorMsg}: ${details[0].msg}`;\n }\n callbackError(errorMsg);\n }\n }\n}\n\nexport const onCreateQueryParams = (query: {\n [k: string]: any;\n}): {\n modelSelected: Models | undefined | null;\n match: {\n [k: string /*Models*/]: { [k: string]: any }[];\n };\n projection: {\n [k: string /*Models*/]: { [k: string]: any }[];\n };\n hasDynamicFilter: boolean;\n} => {\n let queryParams = {\n modelSelected: null,\n match: {\n Users: [],\n Enrollments: [],\n Institutions: [],\n Rotations: [],\n CaseLogs: [],\n Evaluations: [],\n },\n projection: {\n Users: [],\n Enrollments: [],\n Institutions: [],\n Rotations: [],\n CaseLogs: [],\n Evaluations: [],\n },\n hasDynamicFilter: false,\n };\n if (query.query) {\n let queryModelSelected = query.query.model;\n if (queryModelSelected === \"EvaluationAnswers\") {\n queryModelSelected = \"Evaluations\";\n }\n const match = query.query.match;\n let hasDynamicFilter = false;\n queryParams = {\n ...queryParams,\n modelSelected: queryModelSelected,\n match: {\n ...queryParams.match,\n // eslint-disable-next-line\n [queryModelSelected]: match.map((item: any) => {\n let itemVal,\n options = null,\n fieldNameSelected = item.fieldName;\n switch (item.type) {\n case \"boolean\":\n itemVal = item.val;\n break;\n case \"date\":\n itemVal = { from: item.from, to: item.to };\n break;\n case \"number\":\n options = {\n selected: null,\n };\n itemVal = item.conditions;\n const { conditions } = item;\n if (conditions && conditions._gt && conditions._lt) {\n options = {\n selected: \"_gt_lt\",\n };\n } else if (conditions && conditions._gt) {\n options = {\n selected: \"_gt\",\n };\n } else if (conditions && conditions._lt) {\n options = {\n selected: \"_lt\",\n };\n } else if (conditions && conditions._eq) {\n options = {\n selected: \"_eq\",\n };\n }\n break;\n default:\n itemVal = item.val;\n if (\n optionsPropsList &&\n // @ts-ignore\n optionsPropsList[queryModelSelected] &&\n // @ts-ignore\n optionsPropsList[queryModelSelected][fieldNameSelected]\n ) {\n options = onCreateOptions(\n // @ts-ignore\n optionsPropsList[queryModelSelected][fieldNameSelected],\n false\n );\n } else {\n if (!itemVal) {\n itemVal = [];\n }\n options = onCreateOptions(\n null,\n true,\n itemVal.map((itemValue: any) => ({\n key: itemValue,\n value: itemValue,\n text: itemValue,\n }))\n );\n }\n }\n if (!hasDynamicFilter && item.isDynamic) {\n hasDynamicFilter = true;\n }\n return {\n match: onCreateFilter(\n item.type,\n fieldNameSelected,\n itemVal,\n item.isDynamic,\n item.isCustomField\n ),\n options,\n };\n }),\n },\n hasDynamicFilter,\n };\n const projection = query.query.projection;\n queryParams = {\n ...queryParams,\n projection: {\n ...queryParams.projection,\n [queryModelSelected]: projection,\n },\n };\n }\n return queryParams;\n};\n\nfunction* doReportsFetchQuery(\n action: Action<\n string,\n {\n queryId: string;\n callbackSuccess?: (data: any, metadata: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Reports.reportsFetchQueryRequest());\n window.logger.log(\"doReportsFetchQuery\", action);\n const {\n queryId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get a query for that specific queryId\n const {\n data: { query },\n } = yield call(ReportsApi.GetReportsQuery, api, queryId, { token });\n const queryParams = onCreateQueryParams(query);\n yield put(\n Reports.reportsFetchQuerySuccess({\n query,\n queryParams,\n })\n );\n if (callbackSuccess) {\n callbackSuccess(query, queryParams);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doReportsFetchQuery\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Reports.reportsFetchQueryFailure());\n if (callbackError) {\n callbackError(error);\n }\n }\n}\n\nfunction* doReportsEditQuery(\n action: Action<\n string,\n {\n queryId: string;\n body: object;\n callbackSuccess?: (data: any, metadata: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Reports.reportsEditQueryRequest());\n window.logger.log(\"doReportsEditQuery\", action);\n const {\n queryId,\n body,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to update a query for that specific queryId\n const {\n data: { query },\n } = yield call(ReportsApi.EditReportsQuery, api, queryId, body, { token });\n const queryParams = onCreateQueryParams(query);\n yield put(\n Reports.reportsEditQuerySuccess({\n query,\n queryParams,\n })\n );\n if (callbackSuccess) {\n yield put(Reports.reportsFetchQueries());\n callbackSuccess(query, queryParams);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doReportsEditQuery\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Reports.reportsEditQueryFailure());\n const { message, details } = errors || \"\";\n if (callbackError) {\n let errorMsg = message;\n if (details && details.length > 0) {\n errorMsg = `${errorMsg}: ${details[0].msg}`;\n }\n callbackError(errorMsg);\n }\n }\n}\n\nfunction* doReportsDeleteQuery(\n action: Action<\n string,\n {\n queryId: string;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Reports.reportsDeleteQueryRequest());\n window.logger.log(\"doReportsDeleteQuery\", action);\n const {\n queryId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to delete every query from those specific array queryId\n yield call(ReportsApi.DeleteReportsQuery, api, queryId, { token });\n yield put(\n Reports.reportsDeleteQuerySuccess({\n queryId,\n })\n );\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doReportsDeleteQuery\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Reports.reportsDeleteQueryFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doReportsRunQuery(\n action: Action<\n string,\n {\n queryId: string;\n query: object;\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Reports.reportsRunQueryRequest());\n window.logger.log(\"doReportsRunQuery\", action);\n const {\n queryId,\n query,\n body,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n const createdBy: { [k: string]: any } = yield select(\n ({ auth: { user } }) => ({\n _id: user._id,\n firstName: user.firstName,\n lastName: user.lastName,\n role: user.role,\n })\n );\n // call the api to save this report to get from some historic datas\n const {\n data: { report },\n } = yield call(ReportsApi.RunReportsQuery, api, queryId, body, { token });\n yield put(\n Reports.reportsRunQuerySuccess({\n report: { ...report, query, createdBy },\n })\n );\n if (callbackSuccess) {\n callbackSuccess({ ...report, query, createdBy });\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doReportsRunQuery\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Reports.reportsRunQueryFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n// END QUERIES />\n\n// REPORTS\nfunction* doReportsFetchReports(\n action: Action<\n string,\n {\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Reports.reportsFetchReportsRequest());\n window.logger.log(\"doReportsFetchReports\", action);\n const { callbackSuccess = null, callbackError = null } = action.payload || {};\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get all reports\n const {\n data: { reports },\n } = yield call(ReportsApi.GetReports, api, { token });\n yield put(\n Reports.reportsFetchReportsSuccess({\n reports,\n })\n );\n if (callbackSuccess) {\n callbackSuccess(reports);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doReportsFetchReports\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Reports.reportsFetchReportsFailure());\n if (callbackError) {\n callbackError(error);\n }\n }\n}\n// END REPORTS />\n\n// REPORTS QUERIES\nfunction* doReportsQueriesFetchReports(\n action: Action<\n string,\n {\n queryId: string;\n callbackSuccess?: (data: any, metadata: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Reports.reportsQueriesFetchReportsRequest());\n window.logger.log(\"doReportsQueriesFetchReports\", action);\n const {\n queryId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload || {};\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get all reports from some specific query set up before\n const {\n data: { query },\n } = yield call(ReportsApi.GetReportsQuery, api, queryId, { token });\n const queryParams = onCreateQueryParams(query);\n yield put(\n Reports.reportsFetchQuerySuccess({\n query,\n queryParams,\n })\n );\n const {\n data: { reports },\n } = yield call(ReportsApi.GetReportsQueryResults, api, queryId, { token });\n yield put(\n Reports.reportsQueriesFetchReportsSuccess({\n reports,\n })\n );\n if (callbackSuccess) {\n callbackSuccess(reports, queryParams);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doReportsQueriesFetchReports\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Reports.reportsFetchQueryFailure());\n yield put(Reports.reportsQueriesFetchReportsFailure());\n if (callbackError) {\n callbackError(error);\n }\n }\n}\n\nfunction* doReportsQueriesFetchReport(\n action: Action<\n string,\n {\n queryId: string;\n reportId: string;\n callbackSuccess?: (data: any, metadata: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Reports.reportsQueriesFetchReportRequest());\n window.logger.log(\"doReportsQueriesFetchReport\", action);\n const {\n queryId,\n reportId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get a report for that specific reportId\n const {\n data: { report },\n } = yield call(ReportsApi.GetReportsQueryResult, api, queryId, reportId, {\n token,\n });\n const queryParams = onCreateQueryParams(report.query);\n yield put(\n Reports.reportsQueriesFetchReportSuccess({\n report,\n query: report.query,\n queryParams,\n })\n );\n if (callbackSuccess) {\n callbackSuccess(report, queryParams);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doReportsQueriesFetchReport\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Reports.reportsQueriesFetchReportFailure());\n if (callbackError) {\n callbackError(error);\n }\n }\n}\n\nfunction* doReportsQueriesEditReport(\n action: Action<\n string,\n {\n queryId: string;\n reportId: string;\n updateResults: boolean;\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Reports.reportsQueriesEditReportRequest());\n window.logger.log(\"doReportsQueriesEditReport\", action);\n const {\n queryId,\n reportId,\n updateResults = false,\n body,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to update a report for that specific queryId\n yield call(\n ReportsApi.EditReportsQueryResult,\n api,\n queryId,\n reportId,\n updateResults,\n body,\n { token }\n );\n const {\n data: { report },\n } = yield call(ReportsApi.GetReportsQueryResult, api, queryId, reportId, {\n token,\n });\n yield put(\n Reports.reportsQueriesEditReportSuccess({\n report,\n })\n );\n if (callbackSuccess) {\n callbackSuccess(report);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doReportsQueriesEditReport\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Reports.reportsQueriesEditReportFailure());\n const { message, details } = errors || \"\";\n if (callbackError) {\n let errorMsg = message;\n if (details && details.length > 0) {\n errorMsg = `${errorMsg}: ${details[0].msg}`;\n }\n callbackError(errorMsg);\n }\n }\n}\n\nfunction* doReportsQueriesDeleteReport(\n action: Action<\n string,\n {\n queryId: string;\n reportId: string;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Reports.reportsQueriesDeleteReportRequest());\n window.logger.log(\"doReportsQueriesDeleteReport\", action);\n const {\n queryId,\n reportId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to delete a report from specific queryId\n yield call(ReportsApi.DeleteReportsQueryReport, api, queryId, reportId, {\n token,\n });\n yield put(\n Reports.reportsQueriesDeleteReportSuccess({\n reportId,\n })\n );\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doReportsQueriesDeleteReport\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Reports.reportsQueriesDeleteReportFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doReportsQueriesTransformReport(\n action: Action<\n string,\n {\n queryId: string;\n reportId: string;\n body: object;\n vApi: Config[\"vApi\"];\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Reports.reportsQueriesTransformReportRequest());\n window.logger.log(\"doReportsQueriesTransformReport\", action);\n const {\n queryId,\n reportId,\n body,\n vApi = \"v1\",\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to update a report for that specific queryId\n const {\n data: { template, report },\n } = yield call(\n ReportsApi.TransformReportsQueryResult,\n api,\n queryId,\n reportId,\n body,\n { token, vApi }\n );\n yield put(Reports.reportsQueriesTransformReportSuccess());\n if (callbackSuccess) {\n callbackSuccess(vApi === \"v1\" ? report : template);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doReportsQueriesTransformReport\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Reports.reportsQueriesTransformReportFailure());\n const { message, details } = errors || \"\";\n if (callbackError) {\n let errorMsg = message;\n if (details && details.length > 0) {\n errorMsg = `${errorMsg}: ${details[0].msg}`;\n }\n callbackError(errorMsg);\n }\n }\n}\n\nfunction* doReportsQueriesGenerateCSVReport(\n action: Action<\n string,\n {\n reportName: string;\n queryId: string;\n reportId: string;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Reports.reportsQueriesGenerateCSVRequest());\n window.logger.log(\"doReportsQueriesGenerateCSVReport\", action);\n const {\n reportName,\n queryId,\n reportId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to generate a csv from some report for specific queryId\n const {\n data: { blob },\n } = yield call(ReportsApi.GenerateCSVReport, api, queryId, reportId, {\n token,\n });\n downloadFile(`${reportName}.csv`, blob);\n yield put(Reports.reportsQueriesGenerateCSVSuccess());\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doReportsQueriesGenerateCSVReport\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Reports.reportsQueriesGenerateCSVFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doReportsQueriesTransformReportGenerateCSVReport(\n action: Action<\n string,\n {\n queryId: string;\n reportId: string;\n body: object;\n reportName: string;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Reports.reportsQueriesTransformReportGenerateCSVRequest());\n window.logger.log(\"doReportsQueriesTransformReportGenerateCSVReport\", action);\n const {\n queryId,\n reportId,\n body,\n reportName,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // 1st call the api to update the cache report in transformReport\n yield call(\n ReportsApi.TransformReportsQueryResult,\n api,\n queryId,\n reportId,\n body,\n {\n token,\n vApi: \"v2\",\n }\n );\n // 2nd call the api to generate a csv from some transformReport cached\n const {\n data: { blob },\n } = yield call(\n ReportsApi.GenerateCSVTransformReportsQueryResult,\n api,\n queryId,\n reportId,\n {\n token,\n vApi: \"v2\",\n }\n );\n downloadFile(`${reportName}.csv`, blob);\n yield put(Reports.reportsQueriesTransformReportGenerateCSVSuccess());\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doReportsQueriesTransformReportGenerateCSVReport\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Reports.reportsQueriesTransformReportGenerateCSVFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n// END REPORTS />\n\nexport default function* reportsSagas(): Generator {\n yield all([\n // Queries\n takeLatest(Reports.REPORTS_FETCH_QUERIES, doReportsFetchQueries),\n takeLatest(Reports.REPORTS_CREATE_QUERY, doReportsCreateQuery),\n takeLatest(Reports.REPORTS_FETCH_QUERY, doReportsFetchQuery),\n takeLatest(Reports.REPORTS_EDIT_QUERY, doReportsEditQuery),\n takeEvery(Reports.REPORTS_DELETE_QUERY, doReportsDeleteQuery),\n takeEvery(Reports.REPORTS_RUN_QUERY, doReportsRunQuery),\n // Reports\n takeLatest(Reports.REPORTS_FETCH_REPORTS, doReportsFetchReports),\n // Reports Queries\n takeLatest(\n Reports.REPORTS_QUERIES_FETCH_REPORTS,\n doReportsQueriesFetchReports\n ),\n takeEvery(\n Reports.REPORTS_QUERIES_FETCH_REPORT,\n doReportsQueriesFetchReport\n ),\n takeEvery(\n Reports.REPORTS_QUERIES_TRANSFORM_REPORT,\n doReportsQueriesTransformReport\n ),\n takeLatest(Reports.REPORTS_QUERIES_EDIT_REPORT, doReportsQueriesEditReport),\n takeLatest(\n Reports.REPORTS_QUERIES_DELETE_REPORT,\n doReportsQueriesDeleteReport\n ),\n takeLatest(\n Reports.REPORTS_QUERIES_GENERATE_CSV,\n doReportsQueriesGenerateCSVReport\n ),\n takeLatest(\n Reports.REPORTS_QUERIES_TRANSFORM_REPORT_GENERATE_CSV,\n doReportsQueriesTransformReportGenerateCSVReport\n ),\n ]);\n}\n","// @flow\n\n/* PERMISSIONS */\nconst onCheckResource = (apiResource: Object, resources: Array) => {\n for (let resource in apiResource) {\n if (\n resources.indexOf(resource) !== -1 &&\n apiResource[resource][\"isEnabled\"]\n ) {\n return true;\n }\n }\n return false;\n};\n\nexport const onCheckFilesPermissions = (permissions: ?Object): boolean => {\n const resources = [\n \"SuperCompanyAdministrators#Files:create\",\n \"SuperCompanyAdministrators#Files:read\",\n \"SuperCompanyAdministrators#Files:update\",\n \"SuperCompanyAdministrators#Files:delete\",\n \"CompanyAdministrators#Files:create\",\n \"CompanyAdministrators#Files:read\",\n \"CompanyAdministrators#Files:update\",\n \"CompanyAdministrators#Files:delete\",\n \"Coordinators#Files:create\",\n \"Coordinators#Files:read\",\n \"Coordinators#Files:update\",\n \"Coordinators#Files:delete\",\n \"Faculties#Files:create\",\n \"Faculties#Files:read\",\n \"Faculties#Files:update\",\n \"Faculties#Files:delete\",\n \"Students#Files:create\",\n \"Students#Files:read\",\n \"Students#Files:update\",\n \"Students#Files:delete\",\n \"InstitutionAdministrators#Files:create\",\n \"InstitutionAdministrators#Files:read\",\n \"InstitutionAdministrators#Files:update\",\n \"InstitutionAdministrators#Files:delete\",\n \"Preceptors#Files:create\",\n \"Preceptors#Files:read\",\n \"Preceptors#Files:update\",\n \"Preceptors#Files:delete\",\n \"Companies#Files:create\",\n \"Companies#Files:read\",\n \"Companies#Files:update\",\n \"Companies#Files:delete\",\n \"Institutions#Files:create\",\n \"Institutions#Files:read\",\n \"Institutions#Files:update\",\n \"Institutions#Files:delete\",\n \"my:Students#Files:create\",\n \"my:Students#Files:read\",\n \"my:Students#Files:update\",\n \"my:Students#Files:delete\",\n \"my:InstitutionAdministrators#Files:create\",\n \"my:InstitutionAdministrators#Files:read\",\n \"my:InstitutionAdministrators#Files:update\",\n \"my:InstitutionAdministrators#Files:delete\",\n \"my:Preceptors#Files:create\",\n \"my:Preceptors#Files:read\",\n \"my:Preceptors#Files:update\",\n \"my:Preceptors#Files:delete\",\n \"my:Companies#Files:create\",\n \"my:Companies#Files:read\",\n \"my:Companies#Files:update\",\n \"my:Companies#Files:delete\",\n \"my:Institutions#Files:create\",\n \"my:Institutions#Files:read\",\n \"my:Institutions#Files:update\",\n \"my:Institutions#Files:delete\",\n \"my#Files:create\",\n \"my#Files:read\",\n \"my#Files:update\",\n \"my#Files:delete\",\n ];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\n// USERS FILES\nexport const onCheckUsersFilesPermissions = (permissions: ?Object): boolean => {\n const resources = [\n \"SuperCompanyAdministrators#Files:create\",\n \"SuperCompanyAdministrators#Files:read\",\n \"SuperCompanyAdministrators#Files:update\",\n \"SuperCompanyAdministrators#Files:delete\",\n \"CompanyAdministrators#Files:create\",\n \"CompanyAdministrators#Files:read\",\n \"CompanyAdministrators#Files:update\",\n \"CompanyAdministrators#Files:delete\",\n \"Coordinators#Files:create\",\n \"Coordinators#Files:read\",\n \"Coordinators#Files:update\",\n \"Coordinators#Files:delete\",\n \"Faculties#Files:create\",\n \"Faculties#Files:read\",\n \"Faculties#Files:update\",\n \"Faculties#Files:delete\",\n \"Students#Files:create\",\n \"Students#Files:read\",\n \"Students#Files:update\",\n \"Students#Files:delete\",\n \"InstitutionAdministrators#Files:create\",\n \"InstitutionAdministrators#Files:read\",\n \"InstitutionAdministrators#Files:update\",\n \"InstitutionAdministrators#Files:delete\",\n \"Preceptors#Files:create\",\n \"Preceptors#Files:read\",\n \"Preceptors#Files:update\",\n \"Preceptors#Files:delete\",\n \"my:Students#Files:create\",\n \"my:Students#Files:read\",\n \"my:Students#Files:update\",\n \"my:Students#Files:delete\",\n \"my:InstitutionAdministrators#Files:create\",\n \"my:InstitutionAdministrators#Files:read\",\n \"my:InstitutionAdministrators#Files:update\",\n \"my:InstitutionAdministrators#Files:delete\",\n \"my:Preceptors#Files:create\",\n \"my:Preceptors#Files:read\",\n \"my:Preceptors#Files:update\",\n \"my:Preceptors#Files:delete\",\n ];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadUsersRoleFiles = (\n { type: roleType }: { type: string },\n permissions: ?Object\n) => {\n switch (roleType) {\n case \"myprofile\":\n return onChecReadkMyFilesPermissions(permissions);\n case \"supercompanyadministrators\":\n return onCheckReadSuperCompanyAdministratorsFilesPermissions(permissions);\n case \"companyadministrators\":\n return onCheckReadCompanyAdministratorsFilesPermissions(permissions);\n case \"coordinators\":\n return onCheckReadCoordinatorsFilesPermissions(permissions);\n case \"faculties\":\n return onCheckReadFacultiesFilesPermissions(permissions);\n case \"institutionadministrators\":\n return (\n onCheckReadInstitutionAdministratorsFilesPermissions(permissions) ||\n onCheckReadMyInstitutionAdministratorsFilesPermissions(permissions)\n );\n case \"preceptors\":\n return (\n onCheckReadPreceptorsFilesPermissions(permissions) ||\n onCheckReadMyPreceptorsFilesPermissions(permissions)\n );\n case \"students\":\n return (\n onCheckReadStudentsFilesPermissions(permissions) ||\n onCheckReadMyStudentsFilesPermissions(permissions)\n );\n\n default:\n }\n return false;\n};\nexport const onCheckCreateUsersRoleFiles = (\n { type: roleType }: { type: string },\n permissions: ?Object\n) => {\n switch (roleType) {\n case \"myprofile\":\n return onCheckCreateMyFilesPermissions(permissions);\n case \"supercompanyadministrators\":\n return onCheckCreateSuperCompanyAdministratorsFilesPermissions(\n permissions\n );\n case \"companyadministrators\":\n return onCheckCreateCompanyAdministratorsFilesPermissions(permissions);\n case \"coordinators\":\n return onCheckCreateCoordinatorsFilesPermissions(permissions);\n case \"faculties\":\n return onCheckCreateFacultiesFilesPermissions(permissions);\n case \"institutionadministrators\":\n return (\n onCheckCreateInstitutionAdministratorsFilesPermissions(permissions) ||\n onCheckCreateMyInstitutionAdministratorsFilesPermissions(permissions)\n );\n case \"preceptors\":\n return (\n onCheckCreatePreceptorsFilesPermissions(permissions) ||\n onCheckCreateMyPreceptorsFilesPermissions(permissions)\n );\n case \"students\":\n return (\n onCheckCreateStudentsFilesPermissions(permissions) ||\n onCheckCreateMyStudentsFilesPermissions(permissions)\n );\n default:\n }\n return false;\n};\nexport const onCheckEditUsersRoleFiles = (\n { type: roleType }: { type: string },\n permissions: ?Object\n) => {\n switch (roleType) {\n case \"myprofile\":\n return onCheckEditMyFilesPermissions(permissions);\n case \"supercompanyadministrators\":\n return onCheckEditSuperCompanyAdministratorsFilesPermissions(permissions);\n case \"companyadministrators\":\n return onCheckEditCompanyAdministratorsFilesPermissions(permissions);\n case \"coordinators\":\n return onCheckEditCoordinatorsFilesPermissions(permissions);\n case \"faculties\":\n return onCheckEditFacultiesFilesPermissions(permissions);\n case \"institutionadministrators\":\n return (\n onCheckEditInstitutionAdministratorsFilesPermissions(permissions) ||\n onCheckEditMyInstitutionAdministratorsFilesPermissions(permissions)\n );\n case \"preceptors\":\n return (\n onCheckEditPreceptorsFilesPermissions(permissions) ||\n onCheckEditMyPreceptorsFilesPermissions(permissions)\n );\n case \"students\":\n return (\n onCheckEditStudentsFilesPermissions(permissions) ||\n onCheckEditMyStudentsFilesPermissions(permissions)\n );\n default:\n }\n return false;\n};\nexport const onCheckDeleteUsersRoleFiles = (\n { type: roleType }: { type: string },\n permissions: ?Object\n) => {\n switch (roleType) {\n case \"myprofile\":\n return onCheckDeleteMyFilesPermissions(permissions);\n case \"supercompanyadministrators\":\n return onCheckDeleteSuperCompanyAdministratorsFilesPermissions(\n permissions\n );\n case \"companyadministrators\":\n return onCheckDeleteCompanyAdministratorsFilesPermissions(permissions);\n case \"coordinators\":\n return onCheckDeleteCoordinatorsFilesPermissions(permissions);\n case \"faculties\":\n return onCheckDeleteFacultiesFilesPermissions(permissions);\n case \"institutionadministrators\":\n return (\n onCheckDeleteInstitutionAdministratorsFilesPermissions(permissions) ||\n onCheckDeleteMyInstitutionAdministratorsFilesPermissions(permissions)\n );\n case \"preceptors\":\n return (\n onCheckDeletePreceptorsFilesPermissions(permissions) ||\n onCheckDeleteMyPreceptorsFilesPermissions(permissions)\n );\n case \"students\":\n return (\n onCheckDeleteStudentsFilesPermissions(permissions) ||\n onCheckDeleteMyStudentsFilesPermissions(permissions)\n );\n default:\n }\n return false;\n};\n// />\n// COMPANIES FILES\nexport const onCheckCompaniesFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"Companies#Files:create\",\n \"Companies#Files:read\",\n \"Companies#Files:update\",\n \"Companies#Files:delete\",\n ];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadCompaniesFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Companies#Files:read\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCreateCompaniesFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Companies#Files:create\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditCompaniesFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Companies#Files:update\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckDeleteCompaniesFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Companies#Files:delete\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\n// />\n// MY COMPANIES FILES\nexport const onCheckMyCompaniesFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"my:Companies#Files:create\",\n \"my:Companies#Files:read\",\n \"my:Companies#Files:update\",\n \"my:Companies#Files:delete\",\n ];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadMyCompaniesFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my:Companies#Files:read\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCreateMyCompaniesFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my:Companies#Files:create\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditMyCompaniesFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my:Companies#Files:update\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckDeleteMyCompaniesFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my:Companies#Files:delete\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\n// />\n// INSTITUTIONS FILES\nexport const onCheckInstitutionsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"Institutions#Files:create\",\n \"Institutions#Files:read\",\n \"Institutions#Files:update\",\n \"Institutions#Files:delete\",\n ];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadInstitutionsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Institutions#Files:read\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCreateInstitutionsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Institutions#Files:create\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditInstitutionsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Institutions#Files:update\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckDeleteInstitutionsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Institutions#Files:delete\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\n// />\n// MY INSTITUTIONS FILES\nexport const onCheckMyInstitutionsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"my:Institutions#Files:create\",\n \"my:Institutions#Files:read\",\n \"my:Institutions#Files:update\",\n \"my:Institutions#Files:delete\",\n ];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadMyInstitutionsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my:Institutions#Files:read\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCreateMyInstitutionsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my:Institutions#Files:create\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditMyInstitutionsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my:Institutions#Files:update\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckDeleteMyInstitutionsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my:Institutions#Files:delete\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\n// />\n// USERS FILES\nexport const onCheckAllUsersFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"SuperCompanyAdministrators#Files:create\",\n \"SuperCompanyAdministrators#Files:read\",\n \"SuperCompanyAdministrators#Files:update\",\n \"SuperCompanyAdministrators#Files:delete\",\n \"CompanyAdministrators#Files:create\",\n \"CompanyAdministrators#Files:read\",\n \"CompanyAdministrators#Files:update\",\n \"CompanyAdministrators#Files:delete\",\n \"Coordinators#Files:create\",\n \"Coordinators#Files:read\",\n \"Coordinators#Files:update\",\n \"Coordinators#Files:delete\",\n \"Faculties#Files:create\",\n \"Faculties#Files:read\",\n \"Faculties#Files:update\",\n \"Faculties#Files:delete\",\n \"Students#Files:create\",\n \"Students#Files:read\",\n \"Students#Files:update\",\n \"Students#Files:delete\",\n \"InstitutionAdministrators#Files:create\",\n \"InstitutionAdministrators#Files:read\",\n \"InstitutionAdministrators#Files:update\",\n \"InstitutionAdministrators#Files:delete\",\n \"Preceptors#Files:create\",\n \"Preceptors#Files:read\",\n \"Preceptors#Files:update\",\n \"Preceptors#Files:delete\",\n \"my:Students#Files:create\",\n \"my:Students#Files:read\",\n \"my:Students#Files:update\",\n \"my:Students#Files:delete\",\n \"my:InstitutionAdministrators#Files:create\",\n \"my:InstitutionAdministrators#Files:read\",\n \"my:InstitutionAdministrators#Files:update\",\n \"my:InstitutionAdministrators#Files:delete\",\n \"my:Preceptors#Files:create\",\n \"my:Preceptors#Files:read\",\n \"my:Preceptors#Files:update\",\n \"my:Preceptors#Files:delete\",\n ];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadAllUsersFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"SuperCompanyAdministrators#Files:read\",\n \"CompanyAdministrators#Files:read\",\n \"Coordinators#Files:read\",\n \"Faculties#Files:read\",\n \"Students#Files:read\",\n \"InstitutionAdministrators#Files:read\",\n \"Preceptors#Files:read\",\n \"my:Students#Files:read\",\n \"my:InstitutionAdministrators#Files:read\",\n \"my:Preceptors#Files:read\",\n ];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCreateAllUsersFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"SuperCompanyAdministrators#Files:create\",\n \"CompanyAdministrators#Files:create\",\n \"Coordinators#Files:create\",\n \"Faculties#Files:create\",\n \"Students#Files:create\",\n \"InstitutionAdministrators#Files:create\",\n \"Preceptors#Files:create\",\n \"my:Students#Files:create\",\n \"my:InstitutionAdministrators#Files:create\",\n \"my:Preceptors#Files:create\",\n ];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditAllUsersFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"SuperCompanyAdministrators#Files:update\",\n \"CompanyAdministrators#Files:update\",\n \"Coordinators#Files:update\",\n \"Faculties#Files:update\",\n \"Students#Files:update\",\n \"InstitutionAdministrators#Files:update\",\n \"Preceptors#Files:update\",\n \"my:Students#Files:update\",\n \"my:InstitutionAdministrators#Files:update\",\n \"my:Preceptors#Files:update\",\n ];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckDeleteAllUsersFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"SuperCompanyAdministrators#Files:delete\",\n \"CompanyAdministrators#Files:delete\",\n \"Coordinators#Files:delete\",\n \"Faculties#Files:delete\",\n \"Students#Files:delete\",\n \"InstitutionAdministrators#Files:delete\",\n \"Preceptors#Files:delete\",\n \"my:Students#Files:delete\",\n \"my:InstitutionAdministrators#Files:delete\",\n \"my:Preceptors#Files:delete\",\n ];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\n// SuperCompanyAdministrators\nexport const onCheckReadSuperCompanyAdministratorsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"SuperCompanyAdministrators#Files:read\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCreateSuperCompanyAdministratorsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"SuperCompanyAdministrators#Files:create\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditSuperCompanyAdministratorsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"SuperCompanyAdministrators#Files:update\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckDeleteSuperCompanyAdministratorsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"SuperCompanyAdministrators#Files:delete\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\n// CompanyAdministrators\nexport const onCheckReadCompanyAdministratorsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"CompanyAdministrators#Files:read\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCreateCompanyAdministratorsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"CompanyAdministrators#Files:create\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditCompanyAdministratorsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"CompanyAdministrators#Files:update\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckDeleteCompanyAdministratorsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"CompanyAdministrators#Files:delete\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\n// Coordinators\nexport const onCheckReadCoordinatorsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Coordinators#Files:read\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCreateCoordinatorsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Coordinators#Files:create\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditCoordinatorsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Coordinators#Files:update\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckDeleteCoordinatorsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Coordinators#Files:delete\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\n// Faculties\nexport const onCheckReadFacultiesFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Faculties#Files:read\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCreateFacultiesFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Faculties#Files:create\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditFacultiesFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Faculties#Files:update\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckDeleteFacultiesFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Faculties#Files:delete\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\n// Students\nexport const onCheckReadStudentsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Students#Files:read\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadMyStudentsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my:Students#Files:read\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCreateStudentsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Students#Files:create\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCreateMyStudentsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my:Students#Files:create\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditStudentsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Students#Files:update\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditMyStudentsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my:Students#Files:update\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckDeleteStudentsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Students#Files:delete\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckDeleteMyStudentsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my:Students#Files:delete\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\n// InstitutionAdministrators\nexport const onCheckReadInstitutionAdministratorsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"InstitutionAdministrators#Files:read\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadMyInstitutionAdministratorsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my:InstitutionAdministrators#Files:read\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCreateInstitutionAdministratorsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"InstitutionAdministrators#Files:create\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCreateMyInstitutionAdministratorsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my:InstitutionAdministrators#Files:create\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditInstitutionAdministratorsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"InstitutionAdministrators#Files:update\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditMyInstitutionAdministratorsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my:InstitutionAdministrators#Files:update\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckDeleteInstitutionAdministratorsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"InstitutionAdministrators#Files:delete\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckDeleteMyInstitutionAdministratorsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my:InstitutionAdministrators#Files:delete\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\n// Preceptors\nexport const onCheckReadPreceptorsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Preceptors#Files:read\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadMyPreceptorsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my:Preceptors#Files:read\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCreatePreceptorsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Preceptors#Files:create\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCreateMyPreceptorsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my:Preceptors#Files:create\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditPreceptorsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Preceptors#Files:update\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditMyPreceptorsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my:Preceptors#Files:update\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckDeletePreceptorsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Preceptors#Files:delete\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckDeleteMyPreceptorsFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my:Preceptors#Files:delete\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\n// />\n// MY FILES\nexport const onCheckMyFilesPermissions = (permissions: ?Object): boolean => {\n const resources = [\n \"my#Files:create\",\n \"my#Files:read\",\n \"my#Files:update\",\n \"my#Files:delete\",\n ];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onChecReadkMyFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my#Files:read\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCreateMyFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my#Files:create\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditMyFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my#Files:update\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\nexport const onCheckDeleteMyFilesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my#Files:delete\"];\n const { Files } = permissions || {};\n if (Files && Files.apiValue) {\n return onCheckResource(Files.apiValue, resources);\n }\n return false;\n};\n// />\n","export default __webpack_public_path__ + \"static/media/iconUserEmpty.b481172a.svg\";","// Manager to get different models.\n// Types\nimport type { ModelsSchemaGroupItems } from \"../_ReportsCreateEditQueryParams.types\";\nimport type {\n PayloadObject,\n UndefinedNull,\n} from \"../../../../../types/common.types\";\n//FILTERS\nexport const onParseFieldName = (\n fieldName: string,\n model:\n | \"Users\"\n | \"Enrollments\"\n | \"Institutions\"\n | \"Rotations\"\n | \"CaseLogs\"\n | \"Evaluations\",\n isCustomField: boolean = false\n) => {\n if (isCustomField) {\n return fieldName;\n }\n return parseField(\n fieldName.charAt(0).toUpperCase() +\n fieldName\n .slice(1)\n .split(/(?=[A-Z])/)\n .join(\" \"),\n model\n );\n};\nconst parseField = (\n fieldName: string,\n model:\n | \"Users\"\n | \"Enrollments\"\n | \"Institutions\"\n | \"Rotations\"\n | \"CaseLogs\"\n | \"Evaluations\"\n) =>\n fieldName.replace(\n /(Answer.answer|Patient.institution|Institution._id|Institution.type|Institution.name|Student.student Number|Rotation.enrollment|Rotation.institutions|Evaluation Scheduler.evaluation Template.name|Evaluation Answer Type|Start|At|._id|_id|.)/gi,\n (str: string) => {\n switch (str) {\n case \"Answer.answer\":\n return \"Evaluation > Goals\";\n case \"Patient.institution\":\n case \"Institution._id\":\n return \"Clinic\";\n case \"Institution.type\":\n return \"Clinic Type\";\n case \"Institution.name\":\n return \"Clinic name\";\n case \"Student.student Number\":\n return \"Student Number\";\n case \"Rotation.institutions\":\n return \"Clinic\";\n case \"Rotation.enrollment\":\n return \"Enrollment\";\n case \"Evaluation Scheduler.evaluation Template.name\":\n return \"Evaluation Template Name\";\n case \"Evaluation Answer Type\":\n return \"Evaluation Type\";\n case \"Start\":\n return \"Begin\";\n case \"At\":\n return \"On\";\n case \"._id\":\n return \"\";\n case \"_id\":\n if (model === \"Institutions\") {\n return \"Clinics\";\n } else {\n return \"id\";\n }\n case \".\":\n return \" \";\n default:\n return str;\n }\n }\n );\nconst onParseItemCustomField = (\n customField: {\n fieldType:\n | \"string\"\n | \"number\"\n | \"date\"\n | \"boolean\"\n | \"dropdown\"\n | \"radiobutton\"\n | \"checkbox\";\n label: string;\n name: string;\n },\n model?: string\n): PayloadObject | UndefinedNull => {\n const { fieldType, label, name } = customField;\n let item = {};\n let fieldName = label;\n // NOTE: API does not allow this fieldName\n // if (model) {\n // fieldName = `${label} ${model}`;\n // }\n switch (fieldType) {\n case \"string\":\n return {\n match: onCreateFilter(\"string\", fieldName, [], true, true),\n options: onCreateOptions(null, true),\n fieldName,\n as: name,\n isCustomField: true,\n };\n case \"number\":\n return {\n ...item,\n match: onCreateFilter(\"number\", fieldName, null, true, true),\n options: {\n selected: null,\n },\n fieldName,\n as: name,\n isCustomField: true,\n };\n case \"date\":\n return {\n ...item,\n match: onCreateFilter(\n \"date\",\n fieldName,\n { from: null, to: null },\n true,\n true\n ),\n fieldName,\n as: name,\n isCustomField: true,\n };\n case \"boolean\":\n return {\n match: onCreateFilter(\"boolean\", fieldName, null, true, true),\n options: onCreateOptions(null, false),\n fieldName,\n as: name,\n isCustomField: true,\n };\n case \"dropdown\":\n case \"radiobutton\":\n case \"checkbox\":\n return {\n match: onCreateFilter(\"string\", fieldName, [], true, true),\n options: onCreateOptions(null, false, []),\n fieldName,\n as: name,\n isCustomField: true,\n onlyProjection: true,\n };\n default:\n return null;\n }\n};\nexport const onCreateFilter = (\n type: \"string\" | \"date\" | \"number\" | \"boolean\" | \"id\" | \"evaluation-tag\",\n fieldName: string,\n val: any,\n isDynamic: boolean = true,\n isCustomField: boolean = false\n): PayloadObject | UndefinedNull => {\n switch (type) {\n case \"date\":\n return {\n type,\n fieldName,\n from: val.from,\n to: val.to,\n isDynamic,\n isCustomField,\n };\n case \"number\":\n return {\n type,\n fieldName,\n conditions: val,\n isDynamic,\n isCustomField,\n };\n default:\n return {\n type,\n fieldName,\n val,\n isDynamic,\n isCustomField,\n };\n }\n};\nexport const onCreateOptions = (\n nameProp: string | UndefinedNull,\n allowAdditions: boolean,\n values: Array<{ key: string; value: string | boolean; text: string }> = []\n): PayloadObject | UndefinedNull => {\n return {\n nameProp,\n allowAdditions,\n values,\n };\n};\nconst onNestedFieldName = (\n fieldName: string,\n nestedFieldName:\n | \"student\"\n | \"preceptor\"\n | \"evaluator\"\n | \"target\"\n | \"enrollment\"\n | \"institution\"\n | \"institutions\"\n | \"rotation\"\n | \"rotation.enrollment\"\n | \"rotation.institutions\"\n | \"answer\"\n | \"\" = \"\"\n) => {\n if (nestedFieldName) {\n return `${nestedFieldName}.${fieldName}`;\n }\n return fieldName;\n};\nconst onParseAsNestedFieldName = (\n asFieldName: string,\n nestedFieldName:\n | \"student\"\n | \"preceptor\"\n | \"evaluator\"\n | \"target\"\n | \"enrollment\"\n | \"rotation\"\n | \"rotation.enrollment\"\n | \"answer\"\n | \"\" = \"\"\n) => {\n if (nestedFieldName) {\n let parsedAsFieldName = asFieldName;\n if (\n nestedFieldName === \"student\" &&\n parsedAsFieldName === \"Student Number\"\n ) {\n parsedAsFieldName = \"Number\";\n }\n const parsedNestedFieldName = nestedFieldName.replace(\n /rotation.enrollment/g,\n \"enrollment\"\n );\n return `${\n parsedNestedFieldName.charAt(0).toUpperCase() +\n parsedNestedFieldName.slice(1)\n } ${parsedAsFieldName}`;\n }\n return asFieldName;\n};\n// MODELS\nconst onCreateItemsCustomFieldsReportSchema = (\n Items: PayloadObject,\n isUsersCustomFields: boolean = false\n): PayloadObject[] => {\n let itemsCustomField = [];\n for (let itemKey in Items) {\n for (let i = 0; i < Items[itemKey].length; i++) {\n let itemCustomField = isUsersCustomFields\n ? onParseItemCustomField(Items[itemKey][i], itemKey)\n : onParseItemCustomField(Items[itemKey][i]);\n if (itemCustomField) {\n if (i === 0) {\n itemCustomField = {\n ...itemCustomField,\n section: itemKey,\n };\n }\n itemsCustomField.push(itemCustomField);\n }\n }\n }\n return itemsCustomField;\n};\n// \nconst onCreateUsersGeneralReportSchema = (\n nested: \"student\" | \"preceptor\" | \"evaluator\" | \"target\" | \"\" = \"\",\n onlyProjectionRole: boolean = false\n): PayloadObject[] => [\n {\n match: onCreateFilter(\"date\", onNestedFieldName(\"createdAt\", nested), {\n from: null,\n to: null,\n }),\n fieldName: onNestedFieldName(\"createdAt\", nested),\n as: onParseAsNestedFieldName(\"Created On\", nested),\n },\n {\n match: onCreateFilter(\"string\", onNestedFieldName(\"role\", nested), []),\n options: onCreateOptions(\"roles\", false),\n fieldName: onNestedFieldName(\"role\", nested),\n as: onParseAsNestedFieldName(\"Role\", nested),\n onlyProjection: onlyProjectionRole,\n },\n {\n match: onCreateFilter(\"string\", onNestedFieldName(\"email\", nested), []),\n options: onCreateOptions(null, true),\n fieldName: onNestedFieldName(\"email\", nested),\n as: onParseAsNestedFieldName(\"Email\", nested),\n },\n {\n match: onCreateFilter(\"string\", onNestedFieldName(\"firstName\", nested), []),\n options: onCreateOptions(null, true),\n fieldName: onNestedFieldName(\"firstName\", nested),\n as: onParseAsNestedFieldName(\"First Name\", nested),\n },\n {\n match: onCreateFilter(\"string\", onNestedFieldName(\"lastName\", nested), []),\n options: onCreateOptions(null, true),\n fieldName: onNestedFieldName(\"lastName\", nested),\n as: onParseAsNestedFieldName(\"Last Name\", nested),\n },\n {\n match: onCreateFilter(\"date\", onNestedFieldName(\"birthdate\", nested), {\n from: null,\n to: null,\n }),\n fieldName: onNestedFieldName(\"birthdate\", nested),\n as: onParseAsNestedFieldName(\"Birthdate\", nested),\n },\n {\n match: onCreateFilter(\"string\", onNestedFieldName(\"gender\", nested), []),\n options: onCreateOptions(\"genders\", false),\n fieldName: onNestedFieldName(\"gender\", nested),\n as: onParseAsNestedFieldName(\"Gender\", nested),\n },\n {\n match: onCreateFilter(\"string\", onNestedFieldName(\"addresses\", nested), []),\n options: onCreateOptions(null, true),\n fieldName: onNestedFieldName(\"addresses\", nested),\n as: onParseAsNestedFieldName(\"Address information\", nested),\n onlyProjection: true,\n },\n];\nconst onCreateUsersStudentsReportSchema = (\n nested: \"student\" | \"evaluator\" | \"target\" | \"\" = \"\",\n section: \"Student\" | \"\" = \"\"\n): PayloadObject[] => [\n {\n match: onCreateFilter(\n \"string\",\n onNestedFieldName(\"studentNumber\", nested),\n []\n ),\n options: onCreateOptions(null, true),\n section,\n fieldName: onNestedFieldName(\"studentNumber\", nested),\n as: onParseAsNestedFieldName(\"Student Number\", nested),\n },\n {\n match: onCreateFilter(\n \"number\",\n onNestedFieldName(\"matriculationYear\", nested),\n null\n ),\n options: {\n selected: null,\n },\n fieldName: onNestedFieldName(\"matriculationYear\", nested),\n as: onParseAsNestedFieldName(\"Matriculation year\", nested),\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\n \"number\",\n onNestedFieldName(\"expectedGraduationYear\", nested),\n null\n ),\n options: {\n selected: null,\n },\n fieldName: onNestedFieldName(\"expectedGraduationYear\", nested),\n as: onParseAsNestedFieldName(\"Expected graduation year\", nested),\n onlyProjection: true,\n },\n];\nexport const onCreateUsersReportSchema = (\n Users: PayloadObject | UndefinedNull\n): ModelsSchemaGroupItems[] => {\n let usersSchema = [\n {\n group: \"User\",\n items: [\n ...onCreateUsersGeneralReportSchema(),\n ...onCreateUsersStudentsReportSchema(\"\", \"Student\"),\n {\n match: onCreateFilter(\"string\", \"jobTitle\", []),\n options: onCreateOptions(null, true),\n section:\n \"Super School Admin, School Admin, Faculty, Clinic Admin, Preceptor\",\n fieldName: \"jobTitle\",\n as: \"Job title\",\n onlyProjection: true,\n },\n ],\n },\n ];\n if (Users) {\n usersSchema.push({\n group: \"Custom Fields\",\n items: onCreateItemsCustomFieldsReportSchema(Users, true),\n });\n }\n return usersSchema;\n};\n// \n// \nconst onCreateEnrollmentsGeneralReportSchema = (\n nested: \"enrollment\" | \"rotation.enrollment\" | \"\" = \"\",\n section: \"Enrollment\" | \"\" = \"\"\n): PayloadObject[] => [\n {\n match: onCreateFilter(\"date\", onNestedFieldName(\"createdAt\", nested), {\n from: null,\n to: null,\n }),\n section,\n fieldName: onNestedFieldName(\"createdAt\", nested),\n as: onParseAsNestedFieldName(\"Created On\", nested),\n },\n {\n match: onCreateFilter(\"date\", onNestedFieldName(\"start\", nested), {\n from: null,\n to: null,\n }),\n fieldName: onNestedFieldName(\"start\", nested),\n as: onParseAsNestedFieldName(\"Begin\", nested),\n },\n {\n match: onCreateFilter(\"date\", onNestedFieldName(\"end\", nested), {\n from: null,\n to: null,\n }),\n fieldName: onNestedFieldName(\"end\", nested),\n as: onParseAsNestedFieldName(\"End\", nested),\n },\n];\nconst onCreateEnrollmentsProgramsReportSchema = (\n nested: \"enrollment\" | \"rotation.enrollment\" | \"\" = \"\"\n): PayloadObject[] => [\n {\n match: onCreateFilter(\"id\", onNestedFieldName(\"program._id\", nested), []),\n options: onCreateOptions(\"programs\", false),\n fieldName: onNestedFieldName(\"program.name\", nested),\n as: onParseAsNestedFieldName(\"Program\", nested),\n },\n];\nconst onCreateEnrollmentsCohortsReportSchema = (\n nested: \"enrollment\" | \"rotation.enrollment\" | \"\" = \"\"\n): PayloadObject[] => [\n {\n match: onCreateFilter(\"id\", onNestedFieldName(\"cohort._id\", nested), []),\n options: onCreateOptions(\"cohorts\", false),\n fieldName: onNestedFieldName(\"cohort.name\", nested),\n as: onParseAsNestedFieldName(\"Cohort\", nested),\n },\n];\nexport const onCreateEnrollmentsReportSchema = (): ModelsSchemaGroupItems[] => {\n let enrollmentsSchema = [\n {\n group: \"Enrollment\",\n items: [\n ...onCreateEnrollmentsGeneralReportSchema(),\n ...onCreateEnrollmentsProgramsReportSchema(),\n ...onCreateEnrollmentsCohortsReportSchema(),\n ],\n },\n ];\n enrollmentsSchema.push({\n group: \"Student\",\n items: [\n ...onCreateUsersGeneralReportSchema(\"student\", true),\n ...onCreateUsersStudentsReportSchema(\"student\"),\n ],\n });\n return enrollmentsSchema;\n};\n// \n// \nconst onCreateInstitutionsGeneralReportSchema = (\n nested:\n | \"institution\"\n | \"institutions\"\n | \"rotation.institutions\"\n | \"target\"\n | \"\" = \"\"\n): PayloadObject[] => [\n {\n match: onCreateFilter(\"date\", onNestedFieldName(\"createdAt\", nested), {\n from: null,\n to: null,\n }),\n fieldName: onNestedFieldName(\"createdAt\", nested),\n as: \"Clinic Created On\",\n },\n {\n match: onCreateFilter(\"id\", onNestedFieldName(\"_id\", nested), []),\n options: onCreateOptions(\"institutions\", false),\n fieldName: onNestedFieldName(\"_id\", nested),\n as: \"Clinics\",\n onlyMatch: true,\n },\n {\n match: onCreateFilter(\"string\", onNestedFieldName(\"name\", nested), []),\n options: onCreateOptions(null, true),\n fieldName: onNestedFieldName(\"name\", nested),\n as: \"Clinic Name\",\n },\n {\n match: onCreateFilter(\n \"string\",\n onNestedFieldName(\"description\", nested),\n []\n ),\n options: onCreateOptions(null, true),\n fieldName: onNestedFieldName(\"description\", nested),\n as: \"Clinic Description\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\"id\", onNestedFieldName(\"type\", nested), []),\n options: onCreateOptions(\"institutionsTypes\", false),\n fieldName: onNestedFieldName(\"type\", nested),\n as: \"Clinic Type\",\n },\n {\n match: onCreateFilter(\"string\", onNestedFieldName(\"website\", nested), []),\n options: onCreateOptions(null, true),\n fieldName: onNestedFieldName(\"website\", nested),\n as: \"Clinic Website\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\"string\", onNestedFieldName(\"addresses\", nested), []),\n options: onCreateOptions(null, true),\n fieldName: onNestedFieldName(\"addresses\", nested),\n as: \"Clinic Address information\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\n \"string\",\n onNestedFieldName(\"scheduleInfo\", nested),\n []\n ),\n options: onCreateOptions(null, true),\n fieldName: onNestedFieldName(\"scheduleInfo\", nested),\n as: \"Clinic Hours\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\"string\", onNestedFieldName(\"reportTo\", nested), []),\n options: onCreateOptions(null, true),\n fieldName: onNestedFieldName(\"reportTo\", nested),\n as: \"Clinic Reporting To\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\n \"string\",\n onNestedFieldName(\"equipmentInfo\", nested),\n []\n ),\n options: onCreateOptions(null, true),\n fieldName: onNestedFieldName(\"equipmentInfo\", nested),\n as: \"Clinic Equipment Info\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\n \"string\",\n onNestedFieldName(\"parkingInfo\", nested),\n []\n ),\n options: onCreateOptions(null, true),\n fieldName: onNestedFieldName(\"parkingInfo\", nested),\n as: \"Clinic Parking Info\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\n \"string\",\n onNestedFieldName(\"securityInfo\", nested),\n []\n ),\n options: onCreateOptions(null, true),\n fieldName: onNestedFieldName(\"securityInfo\", nested),\n as: \"Clinic Security Info\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\n \"string\",\n onNestedFieldName(\"studentsInfo\", nested),\n []\n ),\n options: onCreateOptions(null, true),\n fieldName: onNestedFieldName(\"studentsInfo\", nested),\n as: \"Clinic Student Info\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\"string\", onNestedFieldName(\"hotelInfo\", nested), []),\n options: onCreateOptions(null, true),\n fieldName: onNestedFieldName(\"hotelInfo\", nested),\n as: \"Clinic Hotel Info\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\n \"string\",\n onNestedFieldName(\"foodAvailability\", nested),\n []\n ),\n options: onCreateOptions(null, true),\n fieldName: onNestedFieldName(\"foodAvailability\", nested),\n as: \"Clinic Food Availability\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\n \"string\",\n onNestedFieldName(\"travelReimbursement\", nested),\n []\n ),\n options: onCreateOptions(null, true),\n fieldName: onNestedFieldName(\"travelReimbursement\", nested),\n as: \"Clinic Travel Reimbursement\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\n \"string\",\n onNestedFieldName(\"otherConsiderations\", nested),\n []\n ),\n options: onCreateOptions(null, true),\n fieldName: onNestedFieldName(\"otherConsiderations\", nested),\n as: \"Clinic Other Considerations\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\n \"string\",\n onNestedFieldName(\"contract.date\", nested),\n []\n ),\n options: onCreateOptions(null, true),\n fieldName: onNestedFieldName(\"contract.date\", nested),\n as: \"Clinic Contract Date\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\n \"string\",\n onNestedFieldName(\"contract.expiration\", nested),\n []\n ),\n options: onCreateOptions(null, true),\n fieldName: onNestedFieldName(\"contract.expiration\", nested),\n as: \"Clinic Contract Expiration\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\n \"string\",\n onNestedFieldName(\"contract.terminationTerms\", nested),\n []\n ),\n options: onCreateOptions(null, true),\n fieldName: onNestedFieldName(\"contract.terminationTerms\", nested),\n as: \"Clinic contract Termination Terms\",\n onlyProjection: true,\n },\n];\nexport const onCreateInstitutionsReportSchema = (\n Institutions: PayloadObject | UndefinedNull\n): ModelsSchemaGroupItems[] => {\n let institutionsSchema = [\n {\n group: \"Clinic\",\n items: onCreateInstitutionsGeneralReportSchema(),\n },\n ];\n if (Institutions) {\n institutionsSchema.push({\n group: \"Custom Fields\",\n items: onCreateItemsCustomFieldsReportSchema(Institutions),\n });\n }\n return institutionsSchema;\n};\n// \n// \nconst onCreateRotationsGeneralReportSchema = (\n nested: \"rotation\" | \"\" = \"\"\n): PayloadObject[] => [\n {\n match: onCreateFilter(\"date\", onNestedFieldName(\"createdAt\", nested), {\n from: null,\n to: null,\n }),\n fieldName: onNestedFieldName(\"createdAt\", nested),\n as: onParseAsNestedFieldName(\"Created On\", nested),\n },\n {\n match: onCreateFilter(\"date\", onNestedFieldName(\"start\", nested), {\n from: null,\n to: null,\n }),\n fieldName: onNestedFieldName(\"start\", nested),\n as: onParseAsNestedFieldName(\"Begin\", nested),\n },\n {\n match: onCreateFilter(\"date\", onNestedFieldName(\"end\", nested), {\n from: null,\n to: null,\n }),\n fieldName: onNestedFieldName(\"end\", nested),\n as: onParseAsNestedFieldName(\"End\", nested),\n },\n {\n match: onCreateFilter(\"id\", onNestedFieldName(\"period._id\", nested), []),\n options: onCreateOptions(\"periods\", false),\n fieldName: onNestedFieldName(\"period.name\", nested),\n as: onParseAsNestedFieldName(\"Period\", nested),\n },\n {\n match: onCreateFilter(\n \"string\",\n onNestedFieldName(\"rotationNumber\", nested),\n []\n ),\n options: onCreateOptions(null, true),\n fieldName: onNestedFieldName(\"rotationNumber\", nested),\n as: \"Rotation ID\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\"string\", onNestedFieldName(\"status\", nested), []),\n options: onCreateOptions(\"rotationsStatus\", false),\n fieldName: onNestedFieldName(\"status\", nested),\n as: \"Rotation Status\",\n },\n];\nexport const onCreateRotationsReportSchema = (): ModelsSchemaGroupItems[] => {\n let rotationsSchema = [\n {\n group: \"Rotation\",\n items: onCreateRotationsGeneralReportSchema(),\n },\n ];\n rotationsSchema.push({\n group: \"Student\",\n items: [\n ...onCreateUsersGeneralReportSchema(\"student\", true),\n ...onCreateUsersStudentsReportSchema(\"student\"),\n ],\n });\n rotationsSchema.push({\n group: \"Clinic\",\n items: onCreateInstitutionsGeneralReportSchema(\"institutions\"),\n });\n rotationsSchema.push({\n group: \"Enrollment\",\n items: [\n ...onCreateEnrollmentsGeneralReportSchema(\"enrollment\"),\n ...onCreateEnrollmentsProgramsReportSchema(\"enrollment\"),\n ...onCreateEnrollmentsCohortsReportSchema(\"enrollment\"),\n ],\n });\n return rotationsSchema;\n};\n// \n// \nconst onCreateCaseLogsGeneralReportSchema = (): PayloadObject[] => [\n {\n match: onCreateFilter(\"date\", \"createdAt\", { from: null, to: null }),\n fieldName: \"createdAt\",\n as: \"Created On\",\n },\n {\n match: onCreateFilter(\"string\", \"caseLogNumber\", []),\n options: onCreateOptions(null, true),\n fieldName: \"caseLogNumber\",\n as: \"Case Log ID\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\"string\", \"status\", []),\n options: onCreateOptions(\"caseLogsStatus\", false),\n fieldName: \"status\",\n as: \"Case Log Status\",\n },\n {\n match: onCreateFilter(\"number\", \"patient.age\", null),\n options: {\n selected: null,\n },\n fieldName: \"patient.age\",\n as: \"Patient Age\",\n },\n {\n match: onCreateFilter(\"string\", \"patient.typeAge\", []),\n options: onCreateOptions(\"patientTypeAges\", false),\n fieldName: \"patient.typeAge\",\n as: \"Patient Age Type\",\n },\n {\n match: onCreateFilter(\"string\", \"patient.gender\", []),\n options: onCreateOptions(\"patientGenders\", false),\n fieldName: \"patient.gender\",\n as: \"Patient Gender\",\n },\n {\n match: onCreateFilter(\"string\", \"patient.race\", []),\n options: onCreateOptions(\"patientRaces\", false),\n fieldName: \"patient.race\",\n as: \"Patient Race\",\n },\n {\n match: onCreateFilter(\"string\", \"patient.firstLanguage\", []),\n options: onCreateOptions(\"caseLogsLanguagesList\", false),\n fieldName: \"patient.firstLanguage\",\n as: \"Patient First Language\",\n },\n {\n match: onCreateFilter(\"string\", \"patient.insurance\", []),\n options: onCreateOptions(\"caseLogsInsurancesList\", false),\n fieldName: \"patient.insurance\",\n as: \"Patient Insurance\",\n },\n {\n match: onCreateFilter(\"string\", \"patient.institutionRecordNumber\", []),\n options: onCreateOptions(null, true),\n fieldName: \"patient.institutionRecordNumber\",\n as: \"Clinic Record Number\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\"string\", \"reasonForVisit\", []),\n options: onCreateOptions(\"caseLogsReasonForVisits\", false),\n fieldName: \"reasonForVisit\",\n as: \"Reason for Visit\",\n },\n {\n match: onCreateFilter(\"number\", \"minutesWithPatient\", null),\n options: {\n selected: null,\n },\n fieldName: \"minutesWithPatient\",\n as: \"Time with Patient\",\n },\n {\n match: onCreateFilter(\"number\", \"minutesWithPreceptor\", null),\n options: {\n selected: null,\n },\n fieldName: \"minutesWithPreceptor\",\n as: \"Consult with Preceptor\",\n },\n {\n match: onCreateFilter(\"date\", \"appointmentDate\", {\n from: null,\n to: null,\n }),\n fieldName: \"appointmentDate\",\n as: \"Appointment Date\",\n },\n {\n match: onCreateFilter(\"string\", \"preceptorComments\", []),\n options: onCreateOptions(null, true),\n fieldName: \"preceptorComments\",\n as: \"Preceptor Comments\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\"string\", \"chiefComplaint\", []),\n options: onCreateOptions(null, true),\n fieldName: \"chiefComplaint\",\n as: \"Chief Complaint\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\"string\", \"medicationTaken\", []),\n options: onCreateOptions(null, true),\n fieldName: \"medicationTaken\",\n as: \"Medication Taken\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\"string\", \"prescriptionThisVisit\", []),\n options: onCreateOptions(null, true),\n fieldName: \"prescriptionThisVisit\",\n as: \"Prescription This Visit\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\"string\", \"psychosocialTopics\", []),\n options: onCreateOptions(null, true),\n fieldName: \"psychosocialTopics\",\n as: \"Psychosocial Topics\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\"string\", \"otherPsychosocialTopic\", []),\n options: onCreateOptions(null, true),\n fieldName: \"otherPsychosocialTopic\",\n as: \"Other Psychosocial Topic\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\"string\", \"notes\", []),\n options: onCreateOptions(null, true),\n fieldName: \"notes\",\n as: \"Student Notes\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\n \"string\",\n \"diagnosesAndProcedures.toothReference\",\n []\n ),\n section: \"Diagnoses and Procedures\",\n options: onCreateOptions(\"caseLogsTeethList\", false),\n fieldName: \"diagnosesAndProcedures.toothReference\",\n as: \"Tooth Reference\",\n },\n {\n match: onCreateFilter(\n \"string\",\n \"diagnosesAndProcedures.diagnosticDiscipline\",\n []\n ),\n options: onCreateOptions(\"caseLogsDisciplinesListForDiagnostics\", false),\n fieldName: \"diagnosesAndProcedures.diagnosticDiscipline\",\n as: \"Discipline for Diagnosis\",\n },\n {\n match: onCreateFilter(\"string\", \"diagnosesAndProcedures.diagnostic\", []),\n options: onCreateOptions(\"caseLogsDiagnosticsList\", false),\n fieldName: \"diagnosesAndProcedures.diagnostic\",\n as: \"Diagnosis\",\n },\n {\n match: onCreateFilter(\n \"string\",\n \"diagnosesAndProcedures.diagnosticDescription\",\n []\n ),\n options: onCreateOptions(null, true),\n fieldName: \"diagnosesAndProcedures.diagnosticDescription\",\n as: \"Diagnosis Description\",\n },\n {\n match: onCreateFilter(\n \"string\",\n \"diagnosesAndProcedures.procedureDiscipline\",\n []\n ),\n options: onCreateOptions(\"caseLogsDisciplinesListForProcedures\", false),\n fieldName: \"diagnosesAndProcedures.procedureDiscipline\",\n as: \"Discipline for Procedure\",\n },\n {\n match: onCreateFilter(\"string\", \"diagnosesAndProcedures.uniqueId\", []),\n options: onCreateOptions(null, true),\n fieldName: \"diagnosesAndProcedures.uniqueId\",\n as: \"Procedure ID\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\"string\", \"diagnosesAndProcedures.procedure\", []),\n options: onCreateOptions(\"caseLogsProceduresList\", false),\n fieldName: \"diagnosesAndProcedures.procedure\",\n as: \"Procedure\",\n },\n {\n match: onCreateFilter(\n \"string\",\n \"diagnosesAndProcedures.procedureDescription\",\n []\n ),\n options: onCreateOptions(null, true),\n fieldName: \"diagnosesAndProcedures.procedureDescription\",\n as: \"Procedure Description\",\n },\n {\n match: onCreateFilter(\n \"string\",\n \"diagnosesAndProcedures.procedureStatus\",\n []\n ),\n options: onCreateOptions(null, true),\n fieldName: \"diagnosesAndProcedures.procedureStatus\",\n as: \"Procedure Status\",\n },\n {\n match: onCreateFilter(\"number\", \"diagnosesAndProcedures.cpu\", null),\n options: {\n selected: null,\n },\n fieldName: \"diagnosesAndProcedures.cpu\",\n as: \"Procedure CPU\",\n },\n];\nexport const onCreateCaseLogsReportSchema = (\n CaseLogs: PayloadObject | UndefinedNull\n): ModelsSchemaGroupItems[] => {\n let caseLogsSchema = [\n {\n group: \"Case Log\",\n items: onCreateCaseLogsGeneralReportSchema(),\n },\n ];\n caseLogsSchema.push({\n group: \"Student\",\n items: [\n ...onCreateUsersGeneralReportSchema(\"student\", true),\n ...onCreateUsersStudentsReportSchema(\"student\"),\n ],\n });\n caseLogsSchema.push({\n group: \"Preceptor\",\n items: [\n ...onCreateUsersGeneralReportSchema(\"preceptor\", true),\n {\n match: onCreateFilter(\"string\", \"preceptor.jobTitle\", []),\n options: onCreateOptions(null, true),\n fieldName: \"preceptor.jobTitle\",\n as: \"Preceptor Job title\",\n onlyProjection: true,\n },\n ],\n });\n caseLogsSchema.push({\n group: \"Clinic\",\n items: onCreateInstitutionsGeneralReportSchema(\"institution\"),\n });\n caseLogsSchema.push({\n group: \"Rotation\",\n items: [\n ...onCreateRotationsGeneralReportSchema(\"rotation\"),\n ...onCreateEnrollmentsGeneralReportSchema(\n \"rotation.enrollment\",\n \"Enrollment\"\n ),\n ...onCreateEnrollmentsProgramsReportSchema(\"rotation.enrollment\"),\n ...onCreateEnrollmentsCohortsReportSchema(\"rotation.enrollment\"),\n ],\n });\n if (CaseLogs) {\n caseLogsSchema.push({\n group: \"Custom Fields\",\n items: onCreateItemsCustomFieldsReportSchema(CaseLogs),\n });\n }\n return caseLogsSchema;\n};\n// \n// \nconst onCreateEvaluationsGeneralReportSchema = (): PayloadObject[] => [\n {\n match: onCreateFilter(\"date\", \"createdAt\", { from: null, to: null }),\n fieldName: \"createdAt\",\n as: \"Created On\",\n },\n {\n match: onCreateFilter(\"string\", \"evaluationNumber\", []),\n options: onCreateOptions(null, true),\n fieldName: \"evaluationNumber\",\n as: \"Evaluation No\",\n },\n {\n match: onCreateFilter(\"string\", \"evaluationType\", []),\n options: onCreateOptions(\"evaluationType\", false),\n fieldName: \"evaluationType\",\n as: \"Evaluation Type\",\n },\n {\n match: onCreateFilter(\"string\", \"status\", []),\n options: onCreateOptions(\"evaluationsStatus\", false),\n fieldName: \"status\",\n as: \"Evaluation Status\",\n },\n {\n match: onCreateFilter(\"string\", \"evaluationScheduler.name\", []),\n options: onCreateOptions(null, true),\n fieldName: \"evaluationScheduler.name\",\n as: \"Evaluation Scheduler\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\n \"string\",\n \"evaluationScheduler.evaluationTemplate.name\",\n []\n ),\n options: onCreateOptions(\"evaluationTemplates\", false),\n fieldName: \"evaluationScheduler.evaluationTemplate.name\",\n as: \"Evaluation Template\",\n },\n {\n match: onCreateFilter(\"evaluation-tag\", \"answer.answer\", []),\n options: onCreateOptions(\"evaluationsAnswer\", false),\n fieldName: \"answer.answer.options.tags\",\n as: \"Evaluation > Goals\",\n },\n];\nconst onCreateEvaluationsAnswersGeneralReportSchema = (\n nested: \"answer\" | \"\" = \"\"\n): PayloadObject[] => [\n {\n match: onCreateFilter(\"date\", onNestedFieldName(\"createdAt\", nested), {\n from: null,\n to: null,\n }),\n section: \"Answer\",\n fieldName: onNestedFieldName(\"createdAt\", nested),\n as: onParseAsNestedFieldName(\"Created On\", nested),\n },\n {\n match: onCreateFilter(\n \"string\",\n onNestedFieldName(\"evaluationAnswerNumber\", nested),\n []\n ),\n options: onCreateOptions(null, false),\n fieldName: onNestedFieldName(\"evaluationAnswerNumber\", nested),\n as: \"Answer No\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\n \"string\",\n onNestedFieldName(\"answer.type\", nested),\n []\n ),\n options: onCreateOptions(null, true),\n fieldName: onNestedFieldName(\"answer.type\", nested),\n as: \"Question Type\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\n \"string\",\n onNestedFieldName(\"answer.question\", nested),\n []\n ),\n options: onCreateOptions(null, true),\n fieldName: onNestedFieldName(\"answer.question\", nested),\n as: \"Question or Text\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\n \"string\",\n onNestedFieldName(\"answer.answer\", nested),\n []\n ),\n options: onCreateOptions(null, true),\n fieldName: onNestedFieldName(\"answer.answer\", nested),\n as: \"Response\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\n \"string\",\n onNestedFieldName(\"answer.header\", nested),\n []\n ),\n options: onCreateOptions(null, true),\n fieldName: onNestedFieldName(\"answer.header\", nested),\n as: \"Single/Multiple Choice > Question or Text\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\n \"string\",\n onNestedFieldName(\"answer.options.header\", nested),\n []\n ),\n options: onCreateOptions(null, true),\n fieldName: onNestedFieldName(\"answer.options.header\", nested),\n as: \"Single/Multiple Choice > Option\",\n onlyProjection: true,\n },\n {\n match: onCreateFilter(\n \"string\",\n onNestedFieldName(\"answer.options.selected\", nested),\n []\n ),\n options: onCreateOptions(null, true),\n fieldName: onNestedFieldName(\"answer.options.selected\", nested),\n as: \"Single/Multiple Choice > Option Selected\",\n onlyProjection: true,\n },\n];\nexport const onCreateEvaluationsReportSchema = (): ModelsSchemaGroupItems[] => {\n let evaluationsSchema = [\n {\n group: \"Evaluation\",\n items: [\n ...onCreateEvaluationsGeneralReportSchema(),\n ...onCreateEvaluationsAnswersGeneralReportSchema(\"answer\"),\n ],\n },\n ];\n evaluationsSchema.push({\n group: \"Clinic\",\n items: onCreateInstitutionsGeneralReportSchema(\"rotation.institutions\"),\n });\n evaluationsSchema.push({\n group: \"Evaluator\",\n items: [\n ...onCreateUsersGeneralReportSchema(\"evaluator\"),\n ...onCreateUsersStudentsReportSchema(\"evaluator\", \"Student\"),\n {\n match: onCreateFilter(\"string\", \"evaluator.jobTitle\", []),\n options: onCreateOptions(null, true),\n section:\n \"Super School Admin, School Admin, Faculty, Clinic Admin, Preceptor\",\n fieldName: \"evaluator.jobTitle\",\n as: \"Evaluator Job title\",\n onlyProjection: true,\n },\n ],\n });\n evaluationsSchema.push({\n group: \"Target\",\n items: [\n ...onCreateUsersGeneralReportSchema(\"target\"),\n ...onCreateUsersStudentsReportSchema(\"target\", \"Student\"),\n {\n match: onCreateFilter(\"string\", \"target.jobTitle\", []),\n options: onCreateOptions(null, true),\n section:\n \"Super School Admin, School Admin, Faculty, Clinic Admin, Preceptor\",\n fieldName: \"target.jobTitle\",\n as: \"Target Job title\",\n onlyProjection: true,\n },\n ],\n });\n evaluationsSchema.push({\n group: \"Enrollment\",\n items: [\n ...onCreateEnrollmentsGeneralReportSchema(\"rotation.enrollment\"),\n ...onCreateEnrollmentsProgramsReportSchema(\"rotation.enrollment\"),\n ...onCreateEnrollmentsCohortsReportSchema(\"rotation.enrollment\"),\n ],\n });\n return evaluationsSchema;\n};\n// \n","import { AccountSettings } from \"../actions/\";\n// Import Types\nimport type { Action } from \"../../types/common.types\";\nimport type { StateAccountSettings as State } from \"../../types/accountSettings.types\";\n// AccountSettings Reducer\nexport const appNewFeaturesState: State[\"appNewFeatures\"] = {\n features: [\"APP_FEATURES_MY_SETTINGS\"],\n createdAt: new Date(\"2022-12-15\").toISOString(),\n readAt: null,\n roles: [\n \"SuperCompanyAdministrators\",\n \"CompanyAdministrators\",\n \"Coordinators\",\n \"Faculties\",\n \"InstitutionAdministrators\",\n \"Preceptors\",\n \"Students\",\n \"Alumnis\",\n ],\n};\nconst initialState: State = {\n accountSettingsNames: [\n \"HOME_SETTINGS\",\n \"BROADCAST_MESSAGES_SETTINGS\",\n \"ROTATIONS_SETTINGS\",\n \"CASE_LOGS_SETTINGS\",\n \"EVALUATIONS_SETTINGS\",\n ],\n appNewFeatures: appNewFeaturesState,\n frontendPersonalization: {\n HOME_SETTINGS: {\n widgetsToShow: [],\n },\n BROADCAST_MESSAGES_SETTINGS: {\n messagesWatched: [],\n },\n USER_MANAGER_SETTINGS: {\n sortBy: {\n name: \"descending\",\n enrollment: \"\",\n institution: \"\",\n },\n sortByName: \"firstName\",\n userStatus: [\"active\"],\n },\n ROTATIONS_SETTINGS: {\n sortBy: {\n student: \"\",\n institution: \"\",\n start_end: \"\",\n status: \"\",\n },\n userStatus: [\"active\"],\n },\n CASE_LOGS_SETTINGS: {\n sortBy: {\n student: \"\",\n preceptor: \"\",\n institution: \"\",\n createdAt: \"\",\n status: \"\",\n },\n userStatus: [\"active\"],\n },\n EVALUATIONS_SETTINGS: {\n sortBy: {\n target: \"\",\n evaluator: \"\",\n createdAt: \"\",\n closingDate: \"\",\n status: \"\",\n },\n userStatus: [\"active\"],\n },\n },\n isFetchingAccountSettings: false,\n statusUpdateAccountSettings: \"\",\n};\nexport default function accountSettings(\n state: State = initialState,\n action: Action\n): State {\n switch (action.type) {\n //AccountSettings\n case AccountSettings.ACCOUNT_SETTINGS_UPDATE_SETTING_NAME:\n return Object.assign({}, state, {\n frontendPersonalization: {\n ...state.frontendPersonalization,\n [action.payload.accountSettingsName]: action.payload.newSetting,\n },\n });\n case AccountSettings.ACCOUNT_SETTINGS_UPDATE_APP_NEW_FEATURES:\n return Object.assign({}, state, {\n appNewFeatures: {\n ...state.appNewFeatures,\n readAt: new Date().toISOString(),\n },\n });\n // FETCH\n case AccountSettings.ACCOUNT_SETTINGS_FETCH:\n return Object.assign({}, state, {\n isFetchingAccountSettings: true,\n });\n case AccountSettings.ACCOUNT_SETTINGS_FETCH_SUCCESS:\n let appNewFeatures = action.payload.appNewFeatures\n ? action.payload.appNewFeatures\n : state.appNewFeatures;\n if (initialState.appNewFeatures.createdAt > appNewFeatures.createdAt) {\n appNewFeatures = {\n ...initialState.appNewFeatures,\n };\n }\n return Object.assign({}, state, {\n appNewFeatures,\n frontendPersonalization: action.payload.frontendPersonalization,\n isFetchingAccountSettings: false,\n });\n case AccountSettings.ACCOUNT_SETTINGS_FETCH_FAILURE:\n return Object.assign({}, state, {\n isFetchingAccountSettings: false,\n });\n // EDIT\n case AccountSettings.ACCOUNT_SETTINGS_EDIT:\n return Object.assign({}, state, {\n statusUpdateAccountSettings: \"updating\",\n });\n case AccountSettings.ACCOUNT_SETTINGS_EDIT_SUCCESS:\n return Object.assign({}, state, {\n appNewFeatures: action.payload.appNewFeatures\n ? action.payload.appNewFeatures\n : state.appNewFeatures,\n frontendPersonalization: action.payload.frontendPersonalization,\n statusUpdateAccountSettings: \"updated\",\n });\n case AccountSettings.ACCOUNT_SETTINGS_EDIT_FAILURE:\n return Object.assign({}, state, {\n statusUpdateAccountSettings: \"failed\",\n });\n case AccountSettings.ACCOUNT_SETTINGS_EDIT_DONE:\n return Object.assign({}, state, {\n statusUpdateAccountSettings: \"\",\n });\n // same state (not change)\n default:\n return state;\n }\n}\n","import { put, select, call, all, takeLatest } from \"redux-saga/effects\";\nimport AuthApi from \"../api/Auth\";\nimport { Auth, AccountSettings, GuideLineTutorial } from \"../actions/\";\nimport { appNewFeaturesState } from \"../reducers/accountSettings\";\nimport { onSetBroadcastMessagesSettings } from \"../reducers/broadcastMessages\";\n// Type\nimport type { Action } from \"deox\";\nimport type { tAPI } from \"../api/API\";\nimport type { UsersRoleType } from \"../../types/users.types\";\n//Sagas for Account (My) Settings\nconst delay = (ms: number) => new Promise((res) => setTimeout(res, ms));\n\nexport const onSetHomeSettings = (userRoleType: UsersRoleType) => {\n switch (userRoleType) {\n case \"supercompanyadministrators\":\n case \"companyadministrators\":\n return {\n widgetsToShow: [\n \"widgetCaseLogs\",\n \"widgetEvaluations\",\n \"widgetEvaluationsAnswers\",\n \"widgetAdminFiles\",\n ],\n widgetCaseLogs: {\n showBy: \"cohorts\",\n selectedBy: [],\n statusToShow: [\"pending\", \"approved\", \"denied\"],\n },\n widgetEvaluations: {\n statusToShow: [\"incourse\", \"completed\", \"closed\"],\n },\n widgetEvaluationsAnswers: {\n showBy: \"responses\",\n selectedBy: [],\n },\n };\n case \"coordinators\":\n case \"faculties\":\n return {\n widgetsToShow: [\"widgetEvaluations\", \"widgetFiles\"],\n widgetEvaluations: {\n statusToShow: [\"incourse\", \"completed\", \"closed\"],\n },\n };\n case \"institutionadministrators\":\n case \"preceptors\":\n return {\n widgetsToShow: [\n \"widgetCaseLogs\",\n \"widgetEvaluations\",\n \"widgetFiles\",\n \"widgetInstitutionRotations\",\n ],\n widgetCaseLogs: {\n showBy: \"cohorts\",\n statusToShow: [\"pending\", \"approved\", \"denied\"],\n },\n widgetEvaluations: {\n statusToShow: [\"incourse\", \"completed\", \"closed\"],\n },\n };\n case \"students\":\n case \"alumnis\":\n return {\n widgetsToShow: [\n \"widgetCaseLogs\",\n \"widgetEvaluations\",\n \"widgetFiles\",\n \"widgetStudentRotations\",\n ],\n widgetCaseLogs: {\n showBy: \"cohorts\",\n statusToShow: [\"pending\", \"approved\", \"denied\"],\n },\n widgetEvaluations: {\n statusToShow: [\"incourse\", \"completed\", \"closed\"],\n },\n };\n default:\n return {\n widgetsToShow: [],\n };\n }\n};\n\nconst onSetAccountSettings = (userRoleType: UsersRoleType) => {\n return {\n HOME_SETTINGS: onSetHomeSettings(userRoleType),\n BROADCAST_MESSAGES_SETTINGS: onSetBroadcastMessagesSettings(),\n USER_MANAGER_SETTINGS: {\n sortBy: {\n name: \"descending\",\n enrollment: \"\",\n institution: \"\",\n },\n sortByName: \"firstName\",\n userStatus: [\"active\"],\n },\n ROTATIONS_SETTINGS: {\n sortBy: {\n student: \"\",\n institution: \"\",\n start_end: \"\",\n status: \"\",\n },\n userStatus: [\"active\"],\n },\n CASE_LOGS_SETTINGS: {\n sortBy: {\n student: \"\",\n preceptor: \"\",\n institution: \"\",\n createdAt: \"\",\n status: \"\",\n },\n userStatus: [\"active\"],\n },\n EVALUATIONS_SETTINGS: {\n sortBy: {\n target: \"\",\n evaluator: \"\",\n createdAt: \"\",\n closingDate: \"\",\n status: \"\",\n },\n userStatus: [\"active\"],\n },\n };\n};\n\nexport function* doCallAccountsSettingsFetchMySettings(\n action: Action<\n string,\n {\n userId: string;\n userRoleType: UsersRoleType;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n): Generator {\n yield call(doAccountsSettingsFetchMySettings, action);\n return;\n}\n\nfunction* doAccountsSettingsFetchMySettings(\n action: Action<\n string,\n {\n userId: string;\n userRoleType: UsersRoleType;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(AccountSettings.accountSettingsFetchMySettingsRequest());\n window.logger.log(\"doAccountsSettingsFetchMySettings\", action);\n const {\n userId,\n userRoleType,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload || {};\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get my settings\n const {\n data: { userSettings: settings = null },\n } = yield call(AuthApi.GetMySettingsAccount, api, userId, { token });\n const { frontendPersonalization, onboardingGuidelinesStatus } =\n settings || {};\n const { appNewFeatures, sectionsCompleted = [] } =\n onboardingGuidelinesStatus || {};\n if (sectionsCompleted.length > 0) {\n yield put(\n GuideLineTutorial.guideLineTutorialInitialize({\n sectionsCompleted: onboardingGuidelinesStatus.sectionsCompleted,\n })\n );\n }\n yield put(\n AccountSettings.accountSettingsFetchMySettingsSuccess({\n appNewFeatures,\n frontendPersonalization: frontendPersonalization\n ? frontendPersonalization\n : onSetAccountSettings(userRoleType),\n })\n );\n if (callbackSuccess) {\n callbackSuccess(frontendPersonalization);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doAccountsSettingsFetchMySettings\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(AccountSettings.accountSettingsFetchMySettingsFailure());\n if (callbackError) {\n callbackError(error);\n }\n }\n}\n\nfunction* doAccountsSettingsEditMySettings(\n action: Action<\n string,\n {\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(AccountSettings.accountSettingsEditMySettingsRequest());\n window.logger.log(\"doAccountsSettingsEditMySettings\", action);\n const { body, callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n const { userId } = yield select(({ auth: { user } }) => ({\n userId: user._id,\n }));\n // call the api to update my settings\n const {\n data: { userSettings: settings = null },\n } = yield call(AuthApi.EditMySettingsAccount, api, userId, body, { token });\n const { frontendPersonalization, onboardingGuidelinesStatus } =\n settings || {};\n const { appNewFeatures } = onboardingGuidelinesStatus || {};\n yield put(\n AccountSettings.accountSettingsEditMySettingsSuccess({\n appNewFeatures,\n frontendPersonalization,\n })\n );\n if (callbackSuccess) {\n callbackSuccess(frontendPersonalization);\n }\n yield delay(3000);\n yield put(AccountSettings.accountSettingsEditMySettingsDone());\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doAccountsSettingsEditMySettings\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(AccountSettings.accountSettingsEditMySettingsFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doAccountsSettingsResetMySettings(action: Action) {\n window.logger.log(\"doAccountsSettingsResetMySettings\", action);\n try {\n const { userRoleType } = yield select(({ auth: { role } }) => ({\n userRoleType: role.type,\n }));\n const { appNewFeatures } = yield select(\n ({ accountSettings: { appNewFeatures } }) => ({\n appNewFeatures,\n })\n );\n const frontendPersonalization = onSetAccountSettings(userRoleType);\n const { sectionsCompleted } = yield select(\n ({ guideLineTutorial: { sectionsCompleted } }) => ({\n sectionsCompleted,\n })\n );\n yield put(\n AccountSettings.accountSettingsEditMySettings({\n body: {\n frontendPersonalization,\n onboardingGuidelinesStatus: {\n appNewFeatures:\n appNewFeatures && appNewFeatures.readAt\n ? appNewFeatures\n : appNewFeaturesState,\n sectionsCompleted,\n },\n },\n })\n );\n } catch (error) {\n window.logger.error(\"ErrorSaga - doAccountsSettingsResetMySettings\", error);\n }\n}\n\nfunction* doAccountsSettingsSynchronizeMySettings(action: Action) {\n window.logger.log(\"doAccountsSettingsSynchronizeMySettings\", action);\n try {\n const { appNewFeatures, frontendPersonalization } = yield select(\n ({ accountSettings: { appNewFeatures, frontendPersonalization } }) => ({\n appNewFeatures,\n frontendPersonalization,\n })\n );\n const { sectionsCompleted } = yield select(\n ({ guideLineTutorial: { sectionsCompleted } }) => ({\n sectionsCompleted,\n })\n );\n yield put(\n AccountSettings.accountSettingsEditMySettings({\n body: {\n frontendPersonalization,\n onboardingGuidelinesStatus: {\n appNewFeatures,\n sectionsCompleted,\n },\n },\n })\n );\n } catch (error) {\n window.logger.error(\n \"ErrorSaga - doAccountsSettingsSynchronizeMySettings\",\n error\n );\n }\n}\n\nexport default function* accountSettingsSagas(): Generator {\n yield all([\n takeLatest(\n AccountSettings.ACCOUNT_SETTINGS_FETCH,\n doAccountsSettingsFetchMySettings\n ),\n takeLatest(\n AccountSettings.ACCOUNT_SETTINGS_EDIT,\n doAccountsSettingsEditMySettings\n ),\n takeLatest(\n AccountSettings.ACCOUNT_SETTINGS_RESET_FRONTEND_PERSONALIZATION,\n doAccountsSettingsResetMySettings\n ),\n takeLatest(\n [\n AccountSettings.ACCOUNT_SETTINGS_UPDATE_APP_NEW_FEATURES,\n AccountSettings.ACCOUNT_SETTINGS_UPDATE_FRONTEND_PERSONALIZATION,\n GuideLineTutorial.GUIDE_LINE_TUTORIAL_COMPLETED,\n GuideLineTutorial.GUIDE_LINE_TUTORIAL_ON_OFF,\n ],\n doAccountsSettingsSynchronizeMySettings\n ),\n ]);\n}\n","// Features\nimport produce from \"immer\";\nimport { AccountSettings, BroadcastMessages } from \"../actions/\";\n// Types\nimport type { Action } from \"deox\";\nimport type { StateAccountSettings } from \"../../types/accountSettings.types\";\nimport type { UsersRole } from \"../../types/users.types\";\nexport type PayloadBroadCastMessage = {\n _id: string;\n createdAt: string;\n updatedAt?: string;\n roles: UsersRole[];\n message: string;\n programs?: string[];\n cohorts?: string[];\n institutions?: string[];\n expirationDate?: string;\n};\nexport type State = {\n broadcastMessages: PayloadBroadCastMessage[];\n broadcastMessagesWatched: string[];\n hasBroadcastMessages: boolean;\n};\ntype BroadcastMessagesActionReducers = Action<\n string,\n {\n broadcastMessages: State[\"broadcastMessages\"];\n frontendPersonalization: StateAccountSettings[\"frontendPersonalization\"];\n }\n>;\n// Broadcast Messages Reducer\nconst initialState: State = {\n broadcastMessages: [],\n broadcastMessagesWatched: [],\n hasBroadcastMessages: false,\n};\nexport const onSetBroadcastMessagesSettings =\n (): StateAccountSettings[\"frontendPersonalization\"][\"BROADCAST_MESSAGES_SETTINGS\"] => ({\n messagesWatched: [],\n });\nconst broadcastMessages: (\n state: State,\n action: BroadcastMessagesActionReducers\n) => State = produce(\n (draft: State, action: BroadcastMessagesActionReducers) => {\n switch (action.type) {\n case AccountSettings.ACCOUNT_SETTINGS_FETCH_SUCCESS:\n const {\n BROADCAST_MESSAGES_SETTINGS = onSetBroadcastMessagesSettings(),\n } = action.payload.frontendPersonalization;\n const messagesWatched = BROADCAST_MESSAGES_SETTINGS?.messagesWatched;\n draft.broadcastMessagesWatched = messagesWatched;\n break;\n case BroadcastMessages.BROADCAST_MESSAGES_SAVE_MESSAGES:\n draft.broadcastMessages = action.payload.broadcastMessages;\n draft.hasBroadcastMessages =\n action.payload.broadcastMessages.length > 0;\n break;\n }\n },\n initialState\n);\nexport default broadcastMessages;\n","export default __webpack_public_path__ + \"static/media/iconInstitutionEmpty.16e20969.svg\";","// Types\nimport { State as StateReducers } from \"../../../store/reducers/evaluationsTemplates\";\n// Utils\nexport const DROPDOWN_FROM_LIST_OPTIONS = [\n {\n key: \"option-1\",\n text: \"John Doe\",\n value: \"option-1\",\n },\n {\n key: \"option-2\",\n text: \"Jane Doe\",\n value: \"option-2\",\n },\n {\n key: \"option-3\",\n text: \"Mary Johnson\",\n value: \"option-3\",\n },\n { key: \"option-4\", text: \"Other\", value: \"other\" },\n];\nexport const onSetFormOptions = (formOptions: StateReducers[\"formOptions\"]) =>\n formOptions.map((option) => {\n const { type } = option;\n switch (type) {\n case \"multipleChoice\":\n case \"singleChoice\":\n const { id: formOptionId } = option;\n const [id, headerDescription, description = \"\"] =\n formOptionId.split(\"::\"),\n allowDescription = headerDescription === \"allowDescription\";\n return {\n ...option,\n id,\n allowDescription,\n description,\n };\n default:\n return option;\n }\n });\nexport const onSetFormOptionsApiPayload = (\n formOptions: StateReducers[\"formOptions\"]\n) =>\n formOptions.map((option) => {\n const { type } = option;\n switch (type) {\n case \"multipleChoice\":\n case \"singleChoice\":\n const { allowDescription, description, ...optionPayload } = option;\n let id = optionPayload.id;\n if (allowDescription && description) {\n id = id + \"::allowDescription::\" + description;\n }\n return {\n ...optionPayload,\n id,\n };\n default:\n return option;\n }\n });\nexport const onSetFormOptionsTags = (\n templateTag: string,\n formOptions: StateReducers[\"formOptions\"]\n) =>\n formOptions.map((option) => {\n const { type } = option;\n switch (type) {\n case \"question\":\n case \"range\":\n return {\n ...option,\n tags: [templateTag, `option_${type}`, option.id.replace(/-/g, \"_\")],\n };\n case \"multipleChoice\":\n case \"singleChoice\":\n return {\n ...option,\n options: option.options.map((o, index) => {\n if (type === \"singleChoice\" && option.style === \"normal\") {\n // SingleChoice && Style: normal\n if (index === 0) {\n return {\n ...o,\n tags: [\n templateTag,\n `option_${type}`,\n `option_${type}_positive`,\n option.id.replace(/-/g, \"_\"),\n `${option.id.replace(/-/g, \"_\")}_positive`,\n o.id.replace(/-/g, \"_\"),\n `${o.id.replace(/-/g, \"_\")}_positive`,\n ],\n };\n } else if (index + 1 === option.options.length) {\n return {\n ...o,\n tags: [\n templateTag,\n `option_${type}`,\n `option_${type}_negative`,\n option.id.replace(/-/g, \"_\"),\n `${option.id.replace(/-/g, \"_\")}_negative`,\n o.id.replace(/-/g, \"_\"),\n `${o.id.replace(/-/g, \"_\")}_negative`,\n ],\n };\n }\n }\n return {\n ...o,\n tags: [\n templateTag,\n `option_${type}`,\n option.id.replace(/-/g, \"_\"),\n o.id.replace(/-/g, \"_\"),\n ],\n };\n }),\n };\n default:\n return option;\n }\n });\n","export default __webpack_public_path__ + \"static/media/iconCompanyEmpty.589691a4.svg\";","// @flow\n\n/* PERMISSIONS */\nconst onCheckResource = (apiResource: Object, resources: Array) => {\n for (let resource in apiResource) {\n if (\n resources.indexOf(resource) !== -1 &&\n apiResource[resource]['isEnabled']\n ) {\n return true;\n }\n }\n return false;\n};\n\nexport const onCheckAllInstitutionsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n 'Institutions:create',\n 'Institutions:read',\n 'Institutions:update',\n 'my:Students#Institutions:*',\n 'my#Institutions:read',\n 'my#Institutions:update'\n ];\n const { Institutions } = permissions || {};\n if (Institutions && Institutions.apiValue) {\n return onCheckResource(Institutions.apiValue, resources);\n }\n return false;\n};\n// INSTITUTIONS\nexport const onCheckInstitutionsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = ['Institutions:create', 'Institutions:read'];\n const { Institutions } = permissions || {};\n if (Institutions && Institutions.apiValue) {\n return onCheckResource(Institutions.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadInstitutionsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = ['Institutions:read'];\n const { Institutions } = permissions || {};\n if (Institutions && Institutions.apiValue) {\n return onCheckResource(Institutions.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditInstitutionsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = ['Institutions:update'];\n const { Institutions } = permissions || {};\n if (Institutions && Institutions.apiValue) {\n return onCheckResource(Institutions.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCreateInstitutionsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = ['Institutions:create'];\n const { Institutions } = permissions || {};\n if (Institutions && Institutions.apiValue) {\n return onCheckResource(Institutions.apiValue, resources);\n }\n return false;\n};\n// />\n// MY INSTITUTIONS\nexport const onCheckReadMyInstitutionsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = ['my#Institutions:read'];\n const { Institutions } = permissions || {};\n if (Institutions && Institutions.apiValue) {\n return onCheckResource(Institutions.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditMyInstitutionsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = ['my#Institutions:update'];\n const { Institutions } = permissions || {};\n if (Institutions && Institutions.apiValue) {\n return onCheckResource(Institutions.apiValue, resources);\n }\n return false;\n};\n// />\n","/* PERMISSIONS */\nconst onCheckResource = (apiResource: Object, resources: Array) => {\n for (let resource in apiResource) {\n if (\n resources.indexOf(resource) !== -1 &&\n apiResource[resource][\"isEnabled\"]\n ) {\n return true;\n }\n }\n return false;\n};\n/* ROTATIONS */\nexport const onCheckAllRotationsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"Rotations:create\",\n \"Rotations:read\",\n \"Rotations:update\",\n \"Rotations:delete\",\n \"my:Students#Rotations:read\",\n \"my#Rotations:read\",\n ];\n const { Rotations } = permissions || {};\n if (Rotations && Rotations.apiValue) {\n return onCheckResource(Rotations.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckRotationsPermissions = (permissions: ?Object): boolean => {\n const resources = [\n \"Rotations:create\",\n \"Rotations:read\",\n \"my:Students#Rotations:read\",\n \"my#Rotations:read\",\n ];\n const { Rotations } = permissions || {};\n if (Rotations && Rotations.apiValue) {\n return onCheckResource(Rotations.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckReadRotationsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"Rotations:read\",\n \"my:Students#Rotations:read\",\n \"my#Rotations:read\",\n ];\n const { Rotations } = permissions || {};\n if (Rotations && Rotations.apiValue) {\n return onCheckResource(Rotations.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckReadAllRotationsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Rotations:read\"];\n const { Rotations } = permissions || {};\n if (Rotations && Rotations.apiValue) {\n return onCheckResource(Rotations.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckCreateRotationsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Rotations:create\"];\n const { Rotations } = permissions || {};\n if (Rotations && Rotations.apiValue) {\n return onCheckResource(Rotations.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckEditRotationsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Rotations:update\"];\n const { Rotations } = permissions || {};\n if (Rotations && Rotations.apiValue) {\n return onCheckResource(Rotations.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckDeleteRotationsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Rotations:delete\"];\n const { Rotations } = permissions || {};\n if (Rotations && Rotations.apiValue) {\n return onCheckResource(Rotations.apiValue, resources);\n }\n return false;\n};\n\n/* TERMS */\nexport const onCheckTermsPermissions = (permissions: ?Object): boolean => {\n const resources = [\"Terms:create\", \"Terms:read\"];\n const { Terms } = permissions || {};\n if (Terms && Terms.apiValue) {\n return onCheckResource(Terms.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckReadTermsPermissions = (permissions: ?Object): boolean => {\n const resources = [\"Terms:read\"];\n const { Terms } = permissions || {};\n if (Terms && Terms.apiValue) {\n return onCheckResource(Terms.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckCUDTermsPermissions = (permissions: ?Object): boolean => {\n const resources = [\"Terms:create\", \"Terms:update\", \"Terms:delete\"];\n const { Terms } = permissions || {};\n if (Terms && Terms.apiValue) {\n return onCheckResource(Terms.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckCreateTermsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Terms:create\"];\n const { Terms } = permissions || {};\n if (Terms && Terms.apiValue) {\n return onCheckResource(Terms.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditTermsPermissions = (permissions: ?Object): boolean => {\n const resources = [\"Terms:update\"];\n const { Terms } = permissions || {};\n if (Terms && Terms.apiValue) {\n return onCheckResource(Terms.apiValue, resources);\n }\n return false;\n};\nexport const onCheckDeleteTermsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Terms:delete\"];\n const { Terms } = permissions || {};\n if (Terms && Terms.apiValue) {\n return onCheckResource(Terms.apiValue, resources);\n }\n return false;\n};\n\n/* PERIODS */\nexport const onCheckPeriodsPermissions = (permissions: ?Object): boolean => {\n const resources = [\"Periods:create\", \"Periods:read\"];\n const { Periods } = permissions || {};\n if (Periods && Periods.apiValue) {\n return onCheckResource(Periods.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckReadPeriodsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Periods:read\"];\n const { Periods } = permissions || {};\n if (Periods && Periods.apiValue) {\n return onCheckResource(Periods.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckCUDPeriodsPermissions = (permissions: ?Object): boolean => {\n const resources = [\"Periods:create\", \"Periods:update\", \"Periods:delete\"];\n const { Periods } = permissions || {};\n if (Periods && Periods.apiValue) {\n return onCheckResource(Periods.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckCreatePeriodsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Periods:create\"];\n const { Periods } = permissions || {};\n if (Periods && Periods.apiValue) {\n return onCheckResource(Periods.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditPeriodsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Periods:update\"];\n const { Periods } = permissions || {};\n if (Periods && Periods.apiValue) {\n return onCheckResource(Periods.apiValue, resources);\n }\n return false;\n};\nexport const onCheckDeletePeriodsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Periods:delete\"];\n const { Periods } = permissions || {};\n if (Periods && Periods.apiValue) {\n return onCheckResource(Periods.apiValue, resources);\n }\n return false;\n};\n","// @flow\nimport * as React from \"react\";\nimport { Modal } from \"semantic-ui-react\";\n// Component generic for some error info.\nconst ErrorComponent = ({\n className,\n textError,\n}: React.PropsWithChildren<{\n className: string;\n textError: string;\n}>) => (\n
\n \n \n

{textError}

\n
\n
\n
\n);\nexport default ErrorComponent;\n","// Features\nimport { Rotations } from \"../actions/\";\n// Types\nimport type { Action, PayloadObject } from \"../../types/common.types\";\nimport type { StateRotations as State } from \"../../types/rotations.types\";\n// Rotations Reducer:\nexport const ROTATIONS_LIMIT = 20;\nconst initialStateRotationCreateEdit: State[\"rotationCreateEdit\"] = {\n isEditRotation: false,\n institutions: {\n options: [],\n selected: [],\n },\n students: null,\n student: null,\n period: null,\n start: \"\",\n end: \"\",\n canConfirmRotation: false,\n};\nconst initialState: State = {\n rotation: null,\n rotationId: \"\",\n rotations: [],\n rotationsStatus: [],\n rotationsMetaData: {\n numTotalRotations: 0,\n numTotalRotationsInCourse: 0,\n numTotalRotationsUpcoming: 0,\n numTotalRotationsFinished: 0,\n totalPages: 1,\n },\n fetchingRotations: false,\n rotationCreateEdit: initialStateRotationCreateEdit,\n kpis: {\n fetching: false,\n Rotations: null,\n },\n rotationsAutomatic: {\n automaticRotationsParameterSelected: null,\n draftRotations: [],\n createdAt: null,\n },\n};\nexport default function rotations(\n state: State = initialState,\n action: Action\n): State {\n switch (action.type) {\n case Rotations.ROTATIONS_FETCH_BY_FILTERS:\n return Object.assign({}, state, {\n fetchingRotations: true,\n });\n case Rotations.ROTATIONS_FETCH_BY_FILTERS_FAILURE:\n return Object.assign({}, state, {\n fetchingRotations: false,\n });\n case Rotations.ROTATIONS_FETCH_BY_FILTERS_SUCCESS:\n const {\n incourse = 0,\n upcoming = 0,\n finished = 0,\n } = action.payload.metadata || {\n incourse: action.payload.rotations.filter(\n ({ status }: PayloadObject) => status === \"incourse\"\n ).length,\n upcoming: action.payload.rotations.filter(\n ({ status }: PayloadObject) => status === \"upcoming\"\n ).length,\n finished: action.payload.rotations.filter(\n ({ status }: PayloadObject) => status === \"finished\"\n ).length,\n };\n const numTotalRotations = incourse + upcoming + finished;\n return Object.assign({}, state, {\n rotations: action.payload.rotations,\n rotationsStatus: action.payload.rotationsStatus,\n rotationsMetaData: {\n numTotalRotations,\n numTotalRotationsInCourse: incourse,\n numTotalRotationsUpcoming: upcoming,\n numTotalRotationsFinished: finished,\n totalPages:\n 1 +\n parseInt(\n ((numTotalRotations - 1) / ROTATIONS_LIMIT).toString(),\n 10\n ),\n },\n fetchingRotations: false,\n });\n case Rotations.ROTATIONS_FETCH_KPIS_REQUEST:\n return Object.assign({}, state, {\n kpis: {\n ...state.kpis,\n fetching: true,\n },\n });\n case Rotations.ROTATIONS_FETCH_KPIS_SUCCESS:\n case Rotations.ROTATIONS_FETCH_KPIS_FAILURE:\n return Object.assign({}, state, {\n kpis: {\n ...state.kpis,\n ...action.payload.kpis,\n fetching: false,\n },\n });\n case Rotations.ROTATIONS_SET_AUTOMATIC_ROTATIONS_SUCCESS:\n case Rotations.ROTATIONS_UPDATE_AUTOMATIC_ROTATIONS:\n return Object.assign({}, state, {\n rotationsAutomatic: {\n automaticRotationsParameterSelected:\n action.payload.automaticRotationsParameterSelected,\n draftRotations: action.payload.rotations,\n createdAt: new Date(),\n },\n });\n case Rotations.ROTATIONS_UNSET_AUTOMATIC_ROTATIONS:\n return Object.assign({}, state, {\n rotationsAutomatic: {\n automaticRotationsParameterSelected:\n initialState.rotationsAutomatic.automaticRotationsParameterSelected,\n draftRotations: initialState.rotationsAutomatic.draftRotations,\n createdAt: initialState.rotationsAutomatic.createdAt,\n },\n });\n case Rotations.ROTATIONS_CREATE_EDIT_UPDATE:\n const newRotationCreateEdit = {\n ...state.rotationCreateEdit,\n ...action.payload.data,\n };\n let hasStudentsSelected = false;\n if (\n state.rotation &&\n state.rotationId &&\n newRotationCreateEdit.isEditRotation\n ) {\n if (newRotationCreateEdit.student) {\n hasStudentsSelected = true;\n }\n } else {\n hasStudentsSelected =\n Object.keys(newRotationCreateEdit.students || {}).length > 0;\n }\n newRotationCreateEdit.canConfirmRotation =\n hasStudentsSelected &&\n newRotationCreateEdit.institutions.selected.length > 0 &&\n newRotationCreateEdit.start &&\n newRotationCreateEdit.end\n ? true\n : false;\n return Object.assign({}, state, {\n rotationCreateEdit: newRotationCreateEdit,\n });\n case Rotations.ROTATIONS_CREATE_EDIT_RESET:\n return Object.assign({}, state, {\n rotation: null,\n rotationId: null,\n rotationCreateEdit: initialStateRotationCreateEdit,\n });\n case Rotations.ROTATIONS_SET_ROTATION_ID:\n return Object.assign({}, state, {\n rotationId: action.payload.rotationId,\n });\n case Rotations.ROTATIONS_FETCH_ROTATION_SUCCESS:\n return Object.assign({}, state, {\n rotation: action.payload.rotation,\n });\n case Rotations.ROTATIONS_EDIT_SUCCESS:\n const rotationUpdateIndex = state.rotations\n .map(({ _id }) => _id)\n .indexOf(action.payload.rotation._id);\n let newListUpdatedRotations = [...state.rotations];\n if (rotationUpdateIndex >= 0) {\n if (\n state.rotationsStatus.indexOf(action.payload.rotation.status) !== -1\n ) {\n newListUpdatedRotations = [\n ...state.rotations.slice(0, rotationUpdateIndex),\n action.payload.rotation,\n ...state.rotations.slice(rotationUpdateIndex + 1),\n ];\n } else {\n newListUpdatedRotations = [\n ...state.rotations.slice(0, rotationUpdateIndex),\n ...state.rotations.slice(rotationUpdateIndex + 1),\n ];\n }\n }\n return Object.assign({}, state, {\n rotation: action.payload.rotation,\n rotations: newListUpdatedRotations,\n rotationsMetaData: {\n ...state.rotationsMetaData,\n numTotalRotationsInCourse:\n state.rotation &&\n action.payload.rotation &&\n state.rotation.status === action.payload.rotation.status\n ? state.rotationsMetaData.numTotalRotationsInCourse\n : action.payload.rotation.status === \"incourse\"\n ? state.rotationsMetaData.numTotalRotationsInCourse + 1\n : state.rotationsMetaData.numTotalRotationsInCourse - 1,\n numTotalRotationsUpcoming:\n state.rotation &&\n action.payload.rotation &&\n state.rotation.status === action.payload.rotation.status\n ? state.rotationsMetaData.numTotalRotationsUpcoming\n : action.payload.rotation.status === \"upcoming\"\n ? state.rotationsMetaData.numTotalRotationsUpcoming + 1\n : state.rotationsMetaData.numTotalRotationsUpcoming - 1,\n },\n });\n case Rotations.ROTATIONS_DELETE_SUCCESS:\n return Object.assign({}, state, {\n rotations: state.rotations.filter(\n ({ _id }) => _id !== action.payload.rotationId\n ),\n });\n // same state (not change)\n default:\n return state;\n }\n}\n","// @flow\n\n/* PERMISSIONS */\nconst onCheckResource = (apiResource: Object, resources: Array) => {\n for (let resource in apiResource) {\n if (\n resources.indexOf(resource) !== -1 &&\n apiResource[resource][\"isEnabled\"]\n ) {\n return true;\n }\n }\n return false;\n};\n\nexport const onCheckAllUserInvitationsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"SuperCompanyAdministrators#Invitations:create\",\n \"SuperCompanyAdministrators#Invitations:read\",\n \"SuperCompanyAdministrators#Invitations:resend\",\n \"SuperCompanyAdministrators#Invitations:delete\",\n \"CompanyAdministrators#Invitations:create\",\n \"CompanyAdministrators#Invitations:read\",\n \"CompanyAdministrators#Invitations:resend\",\n \"CompanyAdministrators#Invitations:delete\",\n \"Coordinators#Invitations:create\",\n \"Coordinators#Invitations:read\",\n \"Coordinators#Invitations:resend\",\n \"Coordinators#Invitations:delete\",\n \"Faculties#Invitations:create\",\n \"Faculties#Invitations:read\",\n \"Faculties#Invitations:resend\",\n \"Faculties#Invitations:delete\",\n \"Students#Invitations:create\",\n \"Students#Invitations:read\",\n \"Students#Invitations:resend\",\n \"Students#Invitations:delete\",\n \"InstitutionAdministrators#Invitations:create\",\n \"InstitutionAdministrators#Invitations:read\",\n \"InstitutionAdministrators#Invitations:resend\",\n \"InstitutionAdministrators#Invitations:delete\",\n \"Preceptors#Invitations:create\",\n \"Preceptors#Invitations:read\",\n \"Preceptors#Invitations:resend\",\n \"Preceptors#Invitations:delete\",\n \"my:InstitutionAdministrators#Invitations:create\",\n \"my:InstitutionAdministrators#Invitations:read\",\n \"my:InstitutionAdministrators#Invitations:resend\",\n \"my:InstitutionAdministrators#Invitations:delete\",\n \"my:Preceptors#Invitations:create\",\n \"my:Preceptors#Invitations:read\",\n \"my:Preceptors#Invitations:resend\",\n \"my:Preceptors#Invitations:delete\",\n ];\n const { UserInvitations } = permissions || {};\n if (UserInvitations && UserInvitations.apiValue) {\n return onCheckResource(UserInvitations.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckReadAllUserInvitationsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"SuperCompanyAdministrators#Invitations:read\",\n \"CompanyAdministrators#Invitations:read\",\n \"Coordinators#Invitations:read\",\n \"Faculties#Invitations:read\",\n \"Students#Invitations:read\",\n \"InstitutionAdministrators#Invitations:read\",\n \"Preceptors#Invitations:read\",\n \"my:InstitutionAdministrators#Invitations:read\",\n \"my:Preceptors#Invitations:read\",\n ];\n const { UserInvitations } = permissions || {};\n if (UserInvitations && UserInvitations.apiValue) {\n return onCheckResource(UserInvitations.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckCreateAllUserInvitationsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"SuperCompanyAdministrators#Invitations:create\",\n \"CompanyAdministrators#Invitations:create\",\n \"Coordinators#Invitations:create\",\n \"Faculties#Invitations:create\",\n \"Students#Invitations:create\",\n \"InstitutionAdministrators#Invitations:create\",\n \"Preceptors#Invitations:create\",\n \"my:InstitutionAdministrators#Invitations:create\",\n \"my:Preceptors#Invitations:create\",\n ];\n const { UserInvitations } = permissions || {};\n if (UserInvitations && UserInvitations.apiValue) {\n return onCheckResource(UserInvitations.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckCreateInstitutionAdministratorsUserInvitationsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"InstitutionAdministrators#Invitations:create\",\n \"my:InstitutionAdministrators#Invitations:create\",\n ];\n const { UserInvitations } = permissions || {};\n if (UserInvitations && UserInvitations.apiValue) {\n return onCheckResource(UserInvitations.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckCreatePreceptorsUserInvitationsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"Preceptors#Invitations:create\",\n \"my:Preceptors#Invitations:create\",\n ];\n const { UserInvitations } = permissions || {};\n if (UserInvitations && UserInvitations.apiValue) {\n return onCheckResource(UserInvitations.apiValue, resources);\n }\n return false;\n};\n\n// RESEND\nexport const onCheckResendUserInvitationsPermissions = (\n roleApiName: string,\n permissions: ?Object\n) => {\n switch (roleApiName) {\n case \"SuperCompanyAdministrators\":\n return onCheckResendSuperCompanyAdministratorsUserInvitationsPermissions(\n permissions\n );\n case \"CompanyAdministrators\":\n return onCheckResendCompanyAdministratorsUserInvitationsPermissions(\n permissions\n );\n case \"Coordinators\":\n return onCheckResendCoordinatorsUserInvitationsPermissions(permissions);\n case \"Faculties\":\n return onCheckResendFacultiesUserInvitationsPermissions(permissions);\n case \"InstitutionAdministrators\":\n return onCheckResendInstitutionAdministratorsUserInvitationsPermissions(\n permissions\n );\n case \"Preceptors\":\n return onCheckResendPreceptorsUserInvitationsPermissions(permissions);\n case \"Students\":\n return onCheckResendStudentsUserInvitationsPermissions(permissions);\n default:\n }\n return false;\n};\n\nexport const onCheckResendSuperCompanyAdministratorsUserInvitationsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"SuperCompanyAdministrators#Invitations:resend\"];\n const { UserInvitations } = permissions || {};\n if (UserInvitations && UserInvitations.apiValue) {\n return onCheckResource(UserInvitations.apiValue, resources);\n }\n return false;\n};\nexport const onCheckResendCompanyAdministratorsUserInvitationsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"CompanyAdministrators#Invitations:resend\"];\n const { UserInvitations } = permissions || {};\n if (UserInvitations && UserInvitations.apiValue) {\n return onCheckResource(UserInvitations.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckResendCoordinatorsUserInvitationsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Coordinators#Invitations:resend\"];\n const { UserInvitations } = permissions || {};\n if (UserInvitations && UserInvitations.apiValue) {\n return onCheckResource(UserInvitations.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckResendFacultiesUserInvitationsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Faculties#Invitations:resend\"];\n const { UserInvitations } = permissions || {};\n if (UserInvitations && UserInvitations.apiValue) {\n return onCheckResource(UserInvitations.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckResendStudentsUserInvitationsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Students#Invitations:resend\"];\n const { UserInvitations } = permissions || {};\n if (UserInvitations && UserInvitations.apiValue) {\n return onCheckResource(UserInvitations.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckResendInstitutionAdministratorsUserInvitationsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"InstitutionAdministrators#Invitations:resend\",\n \"my:InstitutionAdministrators#Invitations:resend\",\n ];\n const { UserInvitations } = permissions || {};\n if (UserInvitations && UserInvitations.apiValue) {\n return onCheckResource(UserInvitations.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckResendPreceptorsUserInvitationsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"Preceptors#Invitations:resend\",\n \"my:Preceptors#Invitations:resend\",\n ];\n const { UserInvitations } = permissions || {};\n if (UserInvitations && UserInvitations.apiValue) {\n return onCheckResource(UserInvitations.apiValue, resources);\n }\n return false;\n};\n\n// ACTIVE\nexport const onCheckActiveAllUserInvitationsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"SuperCompanyAdministrators#Invitations:active\",\n \"CompanyAdministrators#Invitations:active\",\n \"Faculties#Invitations:active\",\n \"Coordinators#Invitations:active\",\n \"Students#Invitations:active\",\n \"InstitutionAdministrators#Invitations:active\",\n \"Preceptors#Invitations:active\",\n \"my:InstitutionAdministrators#Invitations:active\",\n \"my:Preceptors#Invitations:active\",\n ];\n const { UserInvitations } = permissions || {};\n if (UserInvitations && UserInvitations.apiValue) {\n return onCheckResource(UserInvitations.apiValue, resources);\n }\n return false;\n};\n\n// DELETE\nexport const onCheckDeleteUserInvitationsPermissions = (\n roleApiName: string,\n permissions: ?Object\n) => {\n switch (roleApiName) {\n case \"SuperCompanyAdministrators\":\n return onCheckDeleteSuperCompanyAdministratorsUserInvitationsPermissions(\n permissions\n );\n case \"CompanyAdministrators\":\n return onCheckDeleteCompanyAdministratorsUserInvitationsPermissions(\n permissions\n );\n case \"Coordinators\":\n return onCheckDeleteCoordinatorsUserInvitationsPermissions(permissions);\n case \"Faculties\":\n return onCheckDeleteFacultiesUserInvitationsPermissions(permissions);\n case \"InstitutionAdministrators\":\n return onCheckDeleteInstitutionAdministratorsUserInvitationsPermissions(\n permissions\n );\n case \"Preceptors\":\n return onCheckDeletePreceptorsUserInvitationsPermissions(permissions);\n case \"Students\":\n return onCheckDeleteStudentsUserInvitationsPermissions(permissions);\n default:\n }\n return false;\n};\n\nexport const onCheckDeleteSuperCompanyAdministratorsUserInvitationsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"SuperCompanyAdministrators#Invitations:delete\"];\n const { UserInvitations } = permissions || {};\n if (UserInvitations && UserInvitations.apiValue) {\n return onCheckResource(UserInvitations.apiValue, resources);\n }\n return false;\n};\nexport const onCheckDeleteCompanyAdministratorsUserInvitationsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"CompanyAdministrators#Invitations:delete\"];\n const { UserInvitations } = permissions || {};\n if (UserInvitations && UserInvitations.apiValue) {\n return onCheckResource(UserInvitations.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckDeleteCoordinatorsUserInvitationsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Coordinators#Invitations:delete\"];\n const { UserInvitations } = permissions || {};\n if (UserInvitations && UserInvitations.apiValue) {\n return onCheckResource(UserInvitations.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckDeleteFacultiesUserInvitationsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Faculties#Invitations:delete\"];\n const { UserInvitations } = permissions || {};\n if (UserInvitations && UserInvitations.apiValue) {\n return onCheckResource(UserInvitations.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckDeleteStudentsUserInvitationsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Students#Invitations:delete\"];\n const { UserInvitations } = permissions || {};\n if (UserInvitations && UserInvitations.apiValue) {\n return onCheckResource(UserInvitations.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckDeleteInstitutionAdministratorsUserInvitationsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"InstitutionAdministrators#Invitations:delete\",\n \"my:InstitutionAdministrators#Invitations:delete\",\n ];\n const { UserInvitations } = permissions || {};\n if (UserInvitations && UserInvitations.apiValue) {\n return onCheckResource(UserInvitations.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckDeletePreceptorsUserInvitationsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"Preceptors#Invitations:delete\",\n \"my:Preceptors#Invitations:delete\",\n ];\n const { UserInvitations } = permissions || {};\n if (UserInvitations && UserInvitations.apiValue) {\n return onCheckResource(UserInvitations.apiValue, resources);\n }\n return false;\n};\n","import { setUTCtime00 } from \"../../utils/\";\nimport { CaseLogs } from \"../actions\";\n// Import Types\nimport type { Action } from \"../../types/common.types\";\nimport type { StateCaseLogs as State } from \"../../types/caseLogs.types\";\n// Case Logs Reducer\nexport const CASELOGS_LIMIT = 20;\nconst initialStateCaseLogCreateEdit: State[\"caseLogCreateEdit\"] = {\n patientDemographics: {\n age: null,\n typeAge: \"years\",\n gender: null,\n race: null,\n firstLanguage: null,\n institutionRecordNumber: null,\n insurance: null,\n },\n clinicalInfo: {\n appointmentDate: setUTCtime00().format(),\n reasonForVisit: [],\n minutesWithPatient: null,\n minutesWithPreceptor: null,\n chiefComplaint: null,\n },\n diagnosesAndProcedures: {\n allTeeth: [],\n upperRightTeeth: [],\n upperLeftTeeth: [],\n lowerLeftTeeth: [],\n lowerRightTeeth: [],\n },\n medication: {\n medicationTaken: [],\n prescriptionThisVisit: [],\n },\n psychosocialTopics: {\n psychosocialTopics: [],\n otherPsychosocialTopic: null,\n pmcc: null,\n },\n customFields: {\n customFields: [],\n },\n notes: {\n notes: null,\n },\n review: {\n status: null,\n preceptorComments: null,\n },\n step: \"patientDemographics\",\n};\n\nconst initialState: State = {\n caseLog: null,\n caseLogId: null,\n caseLogs: [],\n caseLogsCache: [],\n caseLogsStatus: [],\n caseLogsMetaData: {\n numTotalCaseLogs: 0,\n numTotalCaseLogsPending: 0,\n numTotalCaseLogsDenied: 0,\n numTotalCaseLogsApproved: 0,\n numTotalCaseLogsDraft: 0,\n totalPages: 1,\n },\n fetchingCaseLogs: false,\n caseLogCreateEdit: initialStateCaseLogCreateEdit,\n kpis: {\n fetching: false,\n CaseLogs: [],\n },\n};\nexport default function caseLogs(\n state: State = initialState,\n action: Action\n): State {\n switch (action.type) {\n case CaseLogs.CASELOGS_FETCH_ALL:\n return Object.assign({}, state, {\n caseLogsCache: [],\n fetchingCaseLogs: true,\n });\n case CaseLogs.CASELOGS_FETCH_ALL_FAILURE:\n return Object.assign({}, state, {\n fetchingCaseLogs: false,\n });\n case CaseLogs.CASELOGS_FETCH_ALL_SUCCESS:\n const {\n pending = 0,\n denied = 0,\n approved = 0,\n draft = 0,\n } = action.payload.metadata || {\n pending: action.payload.caseLogs.filter(\n ({ status }: any) => status === \"pending\"\n ).length,\n denied: action.payload.caseLogs.filter(\n ({ status }: any) => status === \"denied\"\n ).length,\n approved: action.payload.caseLogs.filter(\n ({ status }: any) => status === \"approved\"\n ).length,\n draft: action.payload.caseLogs.filter(\n ({ status }: any) => status === \"draft\"\n ).length,\n };\n const numTotalCaseLogs = pending + denied + approved + draft;\n return Object.assign({}, state, {\n caseLogs: action.payload.caseLogs,\n caseLogsStatus: action.payload.caseLogsStatus,\n caseLogsMetaData: {\n numTotalCaseLogs,\n numTotalCaseLogsPending: pending,\n numTotalCaseLogsDenied: denied,\n numTotalCaseLogsApproved: approved,\n numTotalCaseLogsDraft: draft,\n totalPages:\n 1 +\n parseInt(((numTotalCaseLogs - 1) / CASELOGS_LIMIT).toString(), 10),\n },\n fetchingCaseLogs: false,\n });\n case CaseLogs.CASELOGS_FETCH_KPIS_REQUEST:\n return Object.assign({}, state, {\n kpis: {\n ...state.kpis,\n fetching: true,\n },\n });\n case CaseLogs.CASELOGS_FETCH_KPIS_SUCCESS:\n case CaseLogs.CASELOGS_FETCH_KPIS_FAILURE:\n return Object.assign({}, state, {\n kpis: {\n ...state.kpis,\n ...action.payload.kpis,\n fetching: false,\n },\n });\n case CaseLogs.CASELOGS_SET_CASELOGID:\n return Object.assign({}, state, { caseLogId: action.payload.caseLogId });\n case CaseLogs.CASELOGS_CREATE_SUCCESS:\n const caseLogCreateToAdd = action.payload.caseLog;\n let newListCaseLogs = [...state.caseLogs],\n newNumTotalCaseLogs = state.caseLogsMetaData.numTotalCaseLogs,\n newNumTotalCaseLogsPending =\n state.caseLogsMetaData.numTotalCaseLogsPending;\n if (\n caseLogCreateToAdd.status === \"pending\" &&\n state.caseLogsStatus.indexOf(\"pending\") !== -1\n ) {\n newListCaseLogs = [action.payload.caseLog, ...state.caseLogs];\n newNumTotalCaseLogs = state.caseLogsMetaData.numTotalCaseLogs + 1;\n newNumTotalCaseLogsPending =\n state.caseLogsMetaData.numTotalCaseLogsPending + 1;\n }\n return Object.assign({}, state, {\n caseLogs: newListCaseLogs,\n caseLogsCache: [caseLogCreateToAdd, ...state.caseLogsCache],\n caseLogsMetaData: {\n ...state.caseLogsMetaData,\n numTotalCaseLogs: newNumTotalCaseLogs,\n numTotalCaseLogsPending: newNumTotalCaseLogsPending,\n },\n });\n case CaseLogs.CASELOGS_FETCH_CASELOG_SUCCESS:\n return Object.assign({}, state, {\n caseLog: action.payload.caseLog,\n caseLogsCache: [action.payload.caseLog, ...state.caseLogsCache],\n caseLogCreateEdit: action.payload.caseLogCreateEdit,\n });\n case CaseLogs.CASELOGS_EDIT_SUCCESS:\n case CaseLogs.CASELOGS_REVIEW_SUCCESS:\n const caseLogCacheUpdateIndex = state.caseLogsCache\n .map(({ _id }) => _id)\n .indexOf(action.payload.caseLog._id);\n let newCaseLogsCache = [...state.caseLogsCache];\n if (caseLogCacheUpdateIndex >= 0) {\n newCaseLogsCache = [\n ...newCaseLogsCache.slice(0, caseLogCacheUpdateIndex),\n action.payload.caseLog,\n ...newCaseLogsCache.slice(caseLogCacheUpdateIndex + 1),\n ];\n }\n const caseLogUpdateIndex = state.caseLogs\n .map(({ _id }) => _id)\n .indexOf(action.payload.caseLog._id);\n if (caseLogUpdateIndex >= 0) {\n let newListUpdatedCaseLogs = [...state.caseLogs];\n if (\n state.caseLogsStatus.indexOf(action.payload.caseLog.status) !== -1\n ) {\n newListUpdatedCaseLogs = [\n ...state.caseLogs.slice(0, caseLogUpdateIndex),\n action.payload.caseLog,\n ...state.caseLogs.slice(caseLogUpdateIndex + 1),\n ];\n } else {\n newListUpdatedCaseLogs = [\n ...state.caseLogs.slice(0, caseLogUpdateIndex),\n ...state.caseLogs.slice(caseLogUpdateIndex + 1),\n ];\n }\n return Object.assign({}, state, {\n caseLog: action.payload.caseLog,\n caseLogCreateEdit: {\n ...action.payload.caseLogCreateEdit,\n step: state.caseLogCreateEdit.step,\n },\n caseLogs: newListUpdatedCaseLogs,\n caseLogsCache: newCaseLogsCache,\n caseLogsMetaData: {\n ...state.caseLogsMetaData,\n numTotalCaseLogsPending:\n action.payload.caseLog &&\n action.payload.caseLog.status === \"pending\"\n ? state.caseLogsMetaData.numTotalCaseLogsPending + 1\n : action.payload.caseLogStatusOld === \"pending\"\n ? state.caseLogsMetaData.numTotalCaseLogsPending - 1\n : state.caseLogsMetaData.numTotalCaseLogsPending,\n numTotalCaseLogsDenied:\n action.payload.caseLog &&\n action.payload.caseLog.status === \"denied\"\n ? state.caseLogsMetaData.numTotalCaseLogsDenied + 1\n : action.payload.caseLogStatusOld === \"denied\"\n ? state.caseLogsMetaData.numTotalCaseLogsDenied - 1\n : state.caseLogsMetaData.numTotalCaseLogsDenied,\n numTotalCaseLogsApproved:\n action.payload.caseLog &&\n action.payload.caseLog.status === \"approved\"\n ? state.caseLogsMetaData.numTotalCaseLogsApproved + 1\n : action.payload.caseLogStatusOld === \"approved\"\n ? state.caseLogsMetaData.numTotalCaseLogsApproved - 1\n : state.caseLogsMetaData.numTotalCaseLogsApproved,\n numTotalCaseLogsDraft:\n action.payload.caseLog &&\n action.payload.caseLog.status === \"draft\"\n ? state.caseLogsMetaData.numTotalCaseLogsDraft + 1\n : action.payload.caseLogStatusOld === \"draft\"\n ? state.caseLogsMetaData.numTotalCaseLogsDraft - 1\n : state.caseLogsMetaData.numTotalCaseLogsDraft,\n },\n });\n }\n return Object.assign({}, state, {\n caseLogsCache: newCaseLogsCache,\n });\n case CaseLogs.CASELOGS_DELETE_SUCCESS:\n const caseLogDeleteIndex = state.caseLogs\n .map(({ _id }) => _id)\n .indexOf(action.payload.caseLogId);\n if (caseLogDeleteIndex >= 0) {\n const caseLogDelete = state.caseLogs[caseLogDeleteIndex];\n return Object.assign({}, state, {\n caseLogs: [\n ...state.caseLogs.slice(0, caseLogDeleteIndex),\n ...state.caseLogs.slice(caseLogDeleteIndex + 1),\n ],\n caseLogsMetaData: {\n ...state.caseLogsMetaData,\n numTotalCaseLogs: state.caseLogsMetaData.numTotalCaseLogs - 1,\n numTotalCaseLogsPending:\n caseLogDelete && caseLogDelete.status === \"pending\"\n ? state.caseLogsMetaData.numTotalCaseLogsPending - 1\n : state.caseLogsMetaData.numTotalCaseLogsPending,\n numTotalCaseLogsDenied:\n caseLogDelete && caseLogDelete.status === \"denied\"\n ? state.caseLogsMetaData.numTotalCaseLogsDenied - 1\n : state.caseLogsMetaData.numTotalCaseLogsDenied,\n numTotalCaseLogsApproved:\n caseLogDelete && caseLogDelete.status === \"approved\"\n ? state.caseLogsMetaData.numTotalCaseLogsApproved - 1\n : state.caseLogsMetaData.numTotalCaseLogsApproved,\n numTotalCaseLogsDraft:\n action.payload.caseLog &&\n action.payload.caseLog.status === \"draft\"\n ? state.caseLogsMetaData.numTotalCaseLogsDraft - 1\n : state.caseLogsMetaData.numTotalCaseLogsDraft,\n },\n });\n }\n return state;\n case CaseLogs.CASELOGS_RESET_CASELOG_LOADED:\n return Object.assign({}, state, {\n ...initialState,\n caseLogs: state.caseLogs,\n caseLogsCache: state.caseLogsCache,\n caseLogsStatus: state.caseLogsStatus,\n caseLogsMetaData: state.caseLogsMetaData,\n kpis: state.kpis,\n });\n case CaseLogs.CASELOGS_CREATE_EDIT_UPDATE:\n let newStateCaseLogCreateEdit = {\n ...state.caseLogCreateEdit,\n };\n newStateCaseLogCreateEdit[\n action.payload.step as State[\"caseLogCreateEdit\"][\"step\"]\n ] = action.payload.data;\n action.payload.callbackEnd();\n return Object.assign({}, state, {\n caseLogCreateEdit: newStateCaseLogCreateEdit,\n });\n case CaseLogs.CASELOGS_CREATE_EDIT_STEP:\n return Object.assign({}, state, {\n caseLogCreateEdit: {\n ...state.caseLogCreateEdit,\n step: action.payload.step,\n },\n });\n // same state (not change)\n default:\n return state;\n }\n}\n","// Features\nimport * as React from \"react\";\nimport { useSelector } from \"react-redux\";\n// Components\nimport { Icon, Message } from \"semantic-ui-react\";\n// Types\nimport type { RootState } from \"../../store/reducers\";\nimport type { State as StateCameraDevice } from \"../../store/reducers/cameraDevice\";\n//\nconst CameraWarningContainer: React.FC = () => {\n // STORE - Camera Device\n const { showCameraWarningMsg = false }: StateCameraDevice = useSelector(\n ({ cameraDevice }: RootState) => cameraDevice\n );\n if (showCameraWarningMsg) {\n return ;\n }\n return null;\n};\nconst CameraWarningView: React.FC = () => (\n \n \n \n {\" \"}\n Allow camera access\n \n \n \n);\nexport default CameraWarningContainer;\n","// @flow\n\n/* PERMISSIONS */\nconst onCheckResource = (apiResource: Object, resources: Array) => {\n for (let resource in apiResource) {\n if (\n resources.indexOf(resource) !== -1 &&\n apiResource[resource][\"isEnabled\"]\n ) {\n return true;\n }\n }\n return false;\n};\n\nexport const onCheckUsersPermissions = (permissions: ?Object): boolean => {\n const resources = [\n \"SuperCompanyAdministrators#Profiles:read\",\n \"SuperCompanyAdministrators#Profiles:update\",\n \"CompanyAdministrators#Profiles:read\",\n \"CompanyAdministrators#Profiles:update\",\n \"Coordinators#Profiles:read\",\n \"Coordinators#Profiles:update\",\n \"Faculties#Profiles:read\",\n \"Faculties#Profiles:update\",\n \"Students#Profiles:read\",\n \"Students#Profiles:update\",\n \"InstitutionAdministrators#Profiles:read\",\n \"InstitutionAdministrators#Profiles:update\",\n \"Preceptors#Profiles:read\",\n \"Preceptors#Profiles:update\",\n \"my:SuperCompanyAdministrators#Profiles:read\",\n \"my:SuperCompanyAdministrators#Profiles:update\",\n \"my:CompanyAdministrators#Profiles:read\",\n \"my:CompanyAdministrators#Profiles:update\",\n \"my:Coordinators#Profiles:read\",\n \"my:Coordinators#Profiles:update\",\n \"my:Faculties#Profiles:read\",\n \"my:Faculties#Profiles:update\",\n \"my:Students#Profiles:read\",\n \"my:Students#Profiles:update\",\n \"my:InstitutionAdministrators#Profiles:read\",\n \"my:InstitutionAdministrators#Profiles:update\",\n \"my:Preceptors#Profiles:read\",\n \"my:Preceptors#Profiles:update\",\n \"my#Profiles:read\",\n \"my#Profiles:update\",\n ];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadUsersRoleProfile = (\n { type: roleType }: { type: string },\n permissions: ?Object\n) => {\n switch (roleType) {\n case \"myprofile\":\n return onCheckReadMyProfileUsersPermissions(permissions);\n case \"supercompanyadministrators\":\n return onCheckReadAllSuperCompanyAdministratorsUsersPermissions(\n permissions\n );\n case \"companyadministrators\":\n return onCheckReadAllCompanyAdministratorsUsersPermissions(permissions);\n case \"coordinators\":\n return onCheckReadAllCoordinatorsUsersPermissions(permissions);\n case \"faculties\":\n return onCheckReadAllFacultiesUsersPermissions(permissions);\n case \"institutionadministrators\":\n return onCheckReadAllInstitutionAdministratorsUsersPermissions(\n permissions\n );\n case \"preceptors\":\n return onCheckReadAllPreceptorsUsersPermissions(permissions);\n case \"students\":\n return (\n onCheckReadAllStudentsUsersPermissions(permissions) ||\n onCheckReadBasicStudentsUsersPermissions(permissions)\n );\n default:\n }\n return false;\n};\nexport const onCheckEditUsersRoleProfile = (\n { type: roleType }: { type: string },\n permissions: ?Object\n) => {\n switch (roleType) {\n case \"myprofile\":\n return onCheckEditMyProfileUsersPermissions(permissions);\n case \"supercompanyadministrators\":\n return onCheckEditAllSuperCompanyAdministratorsUsersPermissions(\n permissions\n );\n case \"companyadministrators\":\n return onCheckEditAllCompanyAdministratorsUsersPermissions(permissions);\n case \"coordinators\":\n return onCheckEditAllCoordinatorsUsersPermissions(permissions);\n case \"faculties\":\n return onCheckEditAllFacultiesUsersPermissions(permissions);\n case \"institutionadministrators\":\n return onCheckEditAllInstitutionAdministratorsUsersPermissions(\n permissions\n );\n case \"preceptors\":\n return onCheckEditAllPreceptorsUsersPermissions(permissions);\n case \"students\":\n return onCheckEditAllStudentsUsersPermissions(permissions);\n default:\n }\n return false;\n};\n// USERS SUPER COMPANY ADMINS\nexport const onCheckReadAllSuperCompanyAdministratorsUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"SuperCompanyAdministrators#Profiles:read\",\n \"my:SuperCompanyAdministrators#Profiles:read\",\n ];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadSuperCompanyAdministratorsUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"SuperCompanyAdministrators#Profiles:read\"];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadMySuperCompanyAdministratorsUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my:SuperCompanyAdministrators#Profiles:read\"];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditAllSuperCompanyAdministratorsUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"SuperCompanyAdministrators#Profiles:update\",\n \"my:SuperCompanyAdministrators#Profiles:update\",\n ];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\n// />\n// USERS COMPANY ADMINS\nexport const onCheckReadAllCompanyAdministratorsUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"CompanyAdministrators#Profiles:read\",\n \"my:CompanyAdministrators#Profiles:read\",\n ];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadCompanyAdministratorsUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"CompanyAdministrators#Profiles:read\"];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadMyCompanyAdministratorsUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my:CompanyAdministrators#Profiles:read\"];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditAllCompanyAdministratorsUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"CompanyAdministrators#Profiles:update\",\n \"my:CompanyAdministrators#Profiles:update\",\n ];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\n// />\n// USERS COORDINATORS\nexport const onCheckReadAllCoordinatorsUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"Coordinators#Profiles:read\",\n \"my:Coordinators#Profiles:read\",\n ];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadCoordinatorsUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Coordinators#Profiles:read\"];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadMyCoordinatorsUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my:Coordinators#Profiles:read\"];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditAllCoordinatorsUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"Coordinators#Profiles:update\",\n \"my:Coordinators#Profiles:update\",\n ];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\n// />\n// USERS FACULTIES\nexport const onCheckReadAllFacultiesUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Faculties#Profiles:read\", \"my:Faculties#Profiles:read\"];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadFacultiesUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Faculties#Profiles:read\"];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadMyFacultiesUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my:Faculties#Profiles:read\"];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditAllFacultiesUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"Faculties#Profiles:update\",\n \"my:Faculties#Profiles:update\",\n ];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\n// />\n// USERS STUDENTS\nexport const onCheckReadAllStudentsUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Students#Profiles:read\", \"my:Students#Profiles:read\"];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadBasicStudentsUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my:Students#ProfilesBasic:read\"];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadStudentsUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Students#Profiles:read\"];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadMyStudentsUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my:Students#Profiles:read\"];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditAllStudentsUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Students#Profiles:update\", \"my:Students#Profiles:update\"];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\n// --> STUDENTS ENROLLMENTS\nexport const onCheckReadEnrollmentStudentsUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Enrollments:read\"];\n const { Enrollments } = permissions || {};\n if (Enrollments && Enrollments.apiValue) {\n return onCheckResource(Enrollments.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCreateEnrollmentStudentsUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Enrollments:create\"];\n const { Enrollments } = permissions || {};\n if (Enrollments && Enrollments.apiValue) {\n return onCheckResource(Enrollments.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditEnrollmentStudentsUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Enrollments:update\"];\n const { Enrollments } = permissions || {};\n if (Enrollments && Enrollments.apiValue) {\n return onCheckResource(Enrollments.apiValue, resources);\n }\n return false;\n};\nexport const onCheckDeleteEnrollmentStudentsUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Enrollments:delete\"];\n const { Enrollments } = permissions || {};\n if (Enrollments && Enrollments.apiValue) {\n return onCheckResource(Enrollments.apiValue, resources);\n }\n return false;\n};\n// />\n// USERS INSTITUTIONS ADMINS\nexport const onCheckReadAllInstitutionAdministratorsUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"InstitutionAdministrators#Profiles:read\",\n \"my:InstitutionAdministrators#Profiles:read\",\n ];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadInstitutionAdministratorsUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"InstitutionAdministrators#Profiles:read\"];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadMyInstitutionAdministratorsUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my:InstitutionAdministrators#Profiles:read\"];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditAllInstitutionAdministratorsUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"InstitutionAdministrators#Profiles:update\",\n \"my:InstitutionAdministrators#Profiles:update\",\n ];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\n// />\n// USERS PRECEPTORS\nexport const onCheckReadAllPreceptorsUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Preceptors#Profiles:read\", \"my:Preceptors#Profiles:read\"];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadBasicPreceptorsUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my:Preceptors#ProfilesBasic:read\"];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadPreceptorsUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Preceptors#Profiles:read\"];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadMyPreceptorsUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my:Preceptors#Profiles:read\"];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditAllPreceptorsUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"Preceptors#Profiles:update\",\n \"my:Preceptors#Profiles:update\",\n ];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\n// />\n// MY PROFILE\nexport const onCheckReadMyProfileUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my#Profiles:read\"];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditMyProfileUsersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my#Profiles:update\"];\n const { Users } = permissions || {};\n if (Users && Users.apiValue) {\n return onCheckResource(Users.apiValue, resources);\n }\n return false;\n};\n// --> STUDENTS ENROLLMENTS\nexport const onCheckReadMyProfileUsersEnrollmentsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my#Enrollments:read\", \"my:Users#Enrollments:read\"];\n const { Enrollments } = permissions || {};\n if (Enrollments && Enrollments.apiValue) {\n return onCheckResource(Enrollments.apiValue, resources);\n }\n return false;\n};\n// />\n","// Features\nimport produce from \"immer\";\nimport { Reports } from \"../actions/\";\nimport {\n isDevelopmentReactAppEnv,\n sortBy,\n updateArrayWithElement,\n} from \"../../utils/\";\n// Types\nimport type { Action } from \"deox\";\nimport type { ReportStandardProps } from \"../../components/reports/standard/_ReportsStandard.types\";\nimport type { PayloadObject } from \"../../types/common.types\";\nimport type { StateReports as State } from \"../../types/reports.types\";\ntype ReportsActionReducers = Action<\n string,\n {\n data: State[\"queryCreateEdit\"];\n hasToShowReportsWarning: State[\"reportsShowWarning\"];\n queries: State[\"queries\"];\n query: PayloadObject;\n queryId: State[\"queryId\"];\n queryParams: State[\"queryCreateEdit\"][\"queryParams\"];\n report: PayloadObject;\n reports: State[\"reports\"];\n reportId: State[\"reportId\"];\n }\n>;\n// Reports and Queries Reducer\nexport const QUERIES_STANDARD_PREFIX = \"reports_standard_report_\";\nconst reportsStandardNames: State[\"queriesStandard\"] = [\n // ALL TENANTS\n \"Student Report\",\n \"Axium Transfer\",\n \"Case Logs - Procedures\",\n \"Case Logs - Unique Patient\",\n \"Case Logs - Patient Visits\",\n \"Site Report - Procedure Counts\",\n \"Site Report - Evaluations\",\n // ONLY FOR UDM TENANT\n \"Site Report - Evaluations > Goals\",\n \"Student Report - Goals\",\n // ONLY FOR IUDENTAL TENANT\n \"Case Logs - Daily Patient\",\n \"Student Report - Pre Rotations Survey\",\n \"Student Report - Post Rotations Survey\",\n \"Student Report - Post Cultural Competency Survey\",\n // ONLY FOR UW TENANT\n \"UW: Patient Report\",\n \"UW: Patient Report\",\n // ALL TENANTS\n \"Rotations Report\",\n // ONLY FOR IUDENTAL TENANT\n \"Rotations - axiUm\",\n \"Case Logs > Diagnoses & Procedures\",\n // ONLY FOR ACESHEALTH TENANTS\n \"Reports > Evaluations - Survey\",\n // ONLY FOR UDM TENANT\n \"Student Report - Post Rotations Survey\",\n \"Preceptor Report - Goals\",\n // ALL TENANTS\n \"Student Report - Procedure Counts\",\n].map((reportName: string, index: number) => ({\n _id: `${QUERIES_STANDARD_PREFIX}${index + 1}` as ReportStandardProps[\"_id\"],\n standardId: (index + 1) as ReportStandardProps[\"standardId\"],\n queryId: \"\",\n query: null,\n reportName,\n reportDescription: \"\",\n reportModel: \"\",\n reports: [],\n}));\nconst reportsStandardIds = reportsStandardNames.map(({ _id }) => _id);\n// Initial States\nexport const initialStateQueryParams: State[\"queryCreateEdit\"][\"queryParams\"] =\n {\n match: {\n Users: [],\n Enrollments: [],\n Institutions: [],\n Rotations: [],\n CaseLogs: [],\n Evaluations: [],\n },\n modelSelected: null,\n projection: {\n Users: [],\n Enrollments: [],\n Institutions: [],\n Rotations: [],\n CaseLogs: [],\n Evaluations: [],\n },\n };\nconst initialState: State = {\n isFetchingQueries: false,\n isFetchingReports: false,\n lastFetchingQueries: null,\n lastFetchingQueryReports: null,\n lastFetchingReports: null,\n queries: [],\n queriesStandard: reportsStandardNames,\n query: null,\n queryCreateEdit: {\n queryDescription: \"\",\n queryIsPublic: true,\n queryName: \"\",\n queryParams: initialStateQueryParams,\n show: \"query-info\",\n },\n queryId: null,\n report: null,\n reportId: null,\n reports: [],\n reportsShowWarning: false,\n results: [],\n};\nconst reports: (state: State, action: ReportsActionReducers) => State = produce(\n (draft: State, action: ReportsActionReducers) => {\n switch (action.type) {\n // QUERIES\n case Reports.REPORTS_FETCH_QUERIES:\n draft.isFetchingQueries = true;\n break;\n case Reports.REPORTS_FETCH_QUERIES_SUCCESS:\n draft.isFetchingQueries = false;\n draft.lastFetchingQueries = new Date();\n draft.queries = action.payload.queries.filter(\n (q) => !reportsStandardIds.includes(q.name)\n );\n if (action.payload.queries.length > 0) {\n draft.queriesStandard = sortBy(\n action.payload.queries\n .filter(\n (q) =>\n reportsStandardIds.indexOf(q.name) >= 0 &&\n reportsStandardIds.indexOf(q.name) < reportsStandardIds.length\n )\n .map((query) => {\n const queriesStandard = draft.queriesStandard.filter(\n (q) => query.name === q._id\n );\n const [queryStandard] = queriesStandard;\n return {\n ...queryStandard,\n queryId: query._id,\n query,\n reportDescription: query.description,\n reportModel: query?.query?.model || \"\",\n reports: [],\n };\n }),\n \"standardId\",\n \"desc\"\n );\n }\n draft.results = [];\n // To show all queries (Standard Queries included), only for dev and test\n if (isDevelopmentReactAppEnv()) {\n draft.queries = action.payload.queries;\n }\n draft.queries = action.payload.queries;\n break;\n case Reports.REPORTS_FETCH_QUERIES_FAILURE:\n draft.isFetchingQueries = false;\n break;\n case Reports.REPORTS_CREATE_QUERY_SUCCESS:\n draft.lastFetchingQueries = draft.lastFetchingQueries\n ? new Date()\n : null;\n draft.query = action.payload.query;\n draft.queries = [action.payload.query, ...draft.queries];\n draft.report = null;\n draft.lastFetchingQueryReports = null;\n draft.lastFetchingReports = null;\n draft.reports = action.payload.query?.reports || [];\n draft.results = [];\n break;\n case Reports.REPORTS_SET_QUERY_ID:\n draft.lastFetchingQueryReports =\n draft.queryId === action.payload.queryId\n ? draft.lastFetchingQueryReports\n : null;\n draft.queryId = action.payload.queryId;\n break;\n case Reports.REPORTS_FETCH_QUERY_SUCCESS:\n case Reports.REPORTS_EDIT_QUERY_SUCCESS:\n let queryParams = initialStateQueryParams;\n queryParams = {\n ...queryParams,\n ...action.payload.queryParams,\n };\n draft.query = action.payload.query;\n draft.queryCreateEdit = {\n ...draft.queryCreateEdit,\n queryName: action.payload.query.name,\n queryDescription: action.payload.query.description,\n queryParams,\n queryIsPublic:\n action.payload.query.isPrivate !== null ||\n action.payload.query.isPrivate !== undefined\n ? !action.payload.query.isPrivate\n : true,\n show: \"query-params\",\n };\n draft.report = null;\n draft.results = [];\n break;\n case Reports.REPORTS_DELETE_QUERY_SUCCESS:\n draft.lastFetchingQueries = new Date();\n draft.queries = draft.queries.filter(\n ({ _id }) => _id !== action.payload.queryId\n );\n break;\n case Reports.REPORTS_RUN_QUERY_SUCCESS:\n draft.lastFetchingQueryReports = draft.lastFetchingQueryReports\n ? new Date()\n : null;\n if (\n reportsStandardIds.indexOf(action.payload.report.query?.name) === -1\n ) {\n draft.reports = [...draft.reports, action.payload.report];\n draft.report = action.payload.report;\n draft.results = action.payload.report?.results || [];\n } else {\n draft.queriesStandard = draft.queriesStandard.map(\n (queryStandard: ReportStandardProps) => {\n if (queryStandard._id === action.payload.report.query?.name) {\n return {\n ...queryStandard,\n reports: [action.payload.report, ...queryStandard.reports],\n };\n }\n return queryStandard;\n }\n );\n }\n break;\n case Reports.REPORTS_QUERY_CREATE_EDIT_UPDATE:\n draft.queryCreateEdit = {\n ...draft.queryCreateEdit,\n ...action.payload.data,\n };\n break;\n case Reports.REPORTS_RESET_QUERY_LOADED:\n return {\n ...initialState,\n lastFetchingQueries: draft.lastFetchingQueries,\n queries: draft.queries,\n queriesStandard: draft.queriesStandard,\n };\n // REPORTS\n // REPORTS QUERIES\n case Reports.REPORTS_FETCH_REPORTS:\n draft.isFetchingReports = true;\n break;\n case Reports.REPORTS_FETCH_REPORTS_SUCCESS:\n case Reports.REPORTS_QUERIES_FETCH_REPORTS_SUCCESS:\n draft.isFetchingReports = false;\n draft.lastFetchingReports =\n Reports.REPORTS_FETCH_REPORTS_SUCCESS === action.type\n ? new Date()\n : null;\n draft.lastFetchingQueryReports =\n Reports.REPORTS_QUERIES_FETCH_REPORTS_SUCCESS === action.type\n ? new Date()\n : draft.lastFetchingQueryReports;\n draft.reports = action.payload.reports.filter(\n (r) => reportsStandardIds.indexOf(r.query?.name) === -1\n );\n draft.queriesStandard = draft.queriesStandard.map(\n (queryStandard: ReportStandardProps) => {\n const reports = action.payload.reports\n .filter((r) => r.query?.name === queryStandard._id)\n .reverse();\n return {\n ...queryStandard,\n reports,\n };\n }\n );\n draft.results = [];\n // To show all reports (Standard Reports included), only for dev and test\n if (isDevelopmentReactAppEnv()) {\n draft.reports = action.payload.reports;\n }\n break;\n case Reports.REPORTS_FETCH_REPORTS_FAILURE:\n draft.isFetchingReports = false;\n break;\n case Reports.REPORTS_QUERIES_SHOW_REPORT_WARNING:\n case Reports.REPORTS_QUERIES_HIDE_REPORT_WARNING:\n draft.reportsShowWarning = action.payload.hasToShowReportsWarning;\n break;\n case Reports.REPORTS_QUERIES_SET_REPORT_ID:\n draft.reportId = action.payload.reportId;\n break;\n case Reports.REPORTS_QUERIES_FETCH_REPORT_SUCCESS:\n let queryParamsResult = initialStateQueryParams;\n queryParamsResult = {\n ...queryParamsResult,\n ...action.payload.queryParams,\n };\n draft.report = action.payload.report;\n draft.query = action.payload.query;\n draft.queryCreateEdit = {\n ...draft.queryCreateEdit,\n queryName: action.payload.query.name,\n queryDescription: action.payload.query.description,\n queryParams: queryParamsResult,\n queryIsPublic:\n action.payload.query.isPrivate !== null ||\n action.payload.query.isPrivate !== undefined\n ? !action.payload.query.isPrivate\n : true,\n show: \"query-params\",\n };\n draft.results = action.payload.report?.results || [];\n break;\n case Reports.REPORTS_QUERIES_EDIT_REPORT_SUCCESS:\n let newReport = draft.report;\n if (action.payload.report) {\n newReport = {\n ...newReport,\n name: action.payload.report.name,\n results: action.payload.report.results,\n updatedAt: action.payload.report.updatedAt,\n };\n }\n draft.report = newReport;\n draft.reports = updateArrayWithElement(draft.reports, newReport);\n draft.results = action.payload.report?.results || [];\n break;\n case Reports.REPORTS_QUERIES_DELETE_REPORT_SUCCESS:\n draft.lastFetchingQueryReports = new Date();\n draft.reports = draft.reports.filter(\n ({ _id }) => _id !== action.payload.reportId\n );\n }\n },\n initialState\n);\nexport default reports;\n","// @flow\n/* eslint-disable jsx-a11y/anchor-is-valid */\n// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md\n// Import Features\nimport * as React from \"react\";\nimport { connect } from \"react-redux\";\nimport classNames from \"classnames\";\nimport debounce from \"lodash/debounce\";\n// Import Components\nimport {\n Accordion,\n Checkbox,\n Dropdown,\n Loader,\n Icon,\n Input,\n} from \"semantic-ui-react\";\nimport { Users, UsersManager } from \"../../store/actions/\";\n// Import Types\nimport type {\n PropsUserManagerFilters as Props,\n StateUserManagerFilters as State,\n} from \"../../types/users.types\";\nclass UserManagerFilters extends React.Component {\n state = {\n fetchingByCohorts: false,\n fetchingByInstitutions: false,\n fetchingByPrograms: false,\n fetchingByRotations: false,\n fetchingByUserStatus: false,\n };\n render() {\n const {\n fromModal,\n roles: { selected: roleSelected },\n } = this.props;\n return (\n \n {this.renderSearch()}\n \n {this.renderRoles()}\n {roleSelected && this.renderFilterUserStatus()}\n {roleSelected &&\n roleSelected.type === \"students\" && [\n this.renderRotations(),\n this.renderPrograms(),\n this.renderCohorts(),\n ]}\n {roleSelected &&\n (roleSelected.type === \"institutionadministrators\" ||\n roleSelected.type === \"preceptors\") &&\n this.renderInstitutions()}\n \n \n );\n }\n // SEARCH COMPONENT\n onFiltersBySearch = debounce(() => {\n const { onFiltersBySearch } = this.props;\n onFiltersBySearch({ updateStoreUsers: true });\n }, 500);\n onSearch = (event: Object, { value: name }) => {\n window.logger.log(\"onSearch\", name);\n const { onSearch } = this.props;\n onSearch(name);\n this.onFiltersBySearch();\n };\n renderSearch = () => {\n const {\n cohorts: { selected: cohortsSelected },\n fromModal,\n onClearFilters,\n onOpenClose,\n programs: { selected: programsSelected },\n roles: { selected: roleSelected },\n rotations: { selected: rotationSelected },\n searchTxt,\n usersFound,\n } = this.props;\n let disabledClearFilters = true;\n if (\n roleSelected ||\n rotationSelected ||\n programsSelected.length ||\n cohortsSelected.length\n ) {\n disabledClearFilters = false;\n }\n let icon = \"search\";\n if (searchTxt) {\n icon = (\n this.onSearch(new Event(\"Empty\"), { value: \"\" })}\n />\n );\n }\n return (\n \n \n 0,\n })}\n >\n \n \n Clear Filters\n \n \n {searchTxt.length > 0 && usersFound !== undefined && (\n
\n
\n Found {usersFound}\n match.\n \n {fromModal && (\n \n View result.\n \n )}\n \n
\n
\n )}\n
\n );\n };\n // ROLES COMPONENT\n onGetUsersByRoles = (role) => () => {\n const { status = [], onGetUsersByRoles } = this.props;\n return new Promise((resolve) => {\n const formValues = {\n roles: [role.apiName],\n selected: role,\n updateStoreUsers: true,\n status,\n resetFilters: true,\n };\n const callbacks = {\n callbackError: (msg) => {\n window.logger.log(\"errors\", msg);\n resolve();\n },\n callbackSuccess: () => {\n resolve();\n },\n };\n const payload = Object.assign({}, formValues, callbacks);\n onGetUsersByRoles(payload);\n });\n };\n renderRoles = () => {\n const {\n isFetchingRoles,\n roles: { isFetching, options: arrayRoles, selected: roleSelected },\n } = this.props;\n return [\n \n \n Users\n {/**/}\n this.props[apiName]).length ===\n 0 &&\n isFetchingRoles)\n }\n />\n ,\n \n {arrayRoles\n .filter(({ apiName }) => this.props[apiName])\n .map((role, index) => (\n {}\n }\n >\n \n \n {role.name}{\" \"}\n {this.props[role.apiName] &&\n this.props[role.apiName].isFetched &&\n `(${this.props[role.apiName].totalUsers})`}\n \n \n ))}\n ,\n ];\n };\n // USERS STATUS\n onGetUsersByUserStatus = debounce(() => {\n return new Promise((resolve, error) => {\n const { onFiltersByUserStatus } = this.props;\n const formValues = { updateStoreUsers: true };\n const callbacks = {\n callbackError: (msg) => {\n window.logger.log(\"errors - onFiltersByUserStatus\", msg);\n this.setState({ fetchingByUserStatus: false });\n error();\n },\n callbackSuccess: () => {\n window.logger.log(\"Success - onFiltersByUserStatus\");\n this.setState({ fetchingByUserStatus: false });\n },\n };\n const payload = Object.assign({}, formValues, callbacks);\n onFiltersByUserStatus(payload);\n });\n }, 500);\n onSelectedUserStatus = (event: Object, { name: statusSelected }) => {\n window.logger.log(\"onSelectedUserStatus\", statusSelected);\n const { status: userStatus = [], onFiltersSetUserStatus } = this.props;\n let newUserStatus = [...userStatus];\n if (newUserStatus.indexOf(statusSelected) === -1) {\n newUserStatus = [...newUserStatus, statusSelected];\n } else {\n newUserStatus = newUserStatus.filter(\n (status) => status !== statusSelected\n );\n }\n onFiltersSetUserStatus({ status: newUserStatus });\n this.setState(\n {\n fetchingByUserStatus: true,\n fetchingByCohorts: false,\n fetchingByInstitutions: false,\n fetchingByPrograms: false,\n fetchingByRotations: false,\n },\n () => {\n this.onGetUsersByUserStatus.cancel();\n this.onGetUsersByUserStatus(newUserStatus);\n }\n );\n };\n renderFilterUserStatus = () => {\n const {\n SHOW_DEACTIVATED_USERS,\n status: userStatus = SHOW_DEACTIVATED_USERS\n ? [\"active\", \"inactive\"]\n : [\"active\"],\n } = this.props;\n return (\n <>\n \n \n Status\n \n \n \n
\n \n \n Active\n \n }\n name=\"active\"\n onClick={\n userStatus.length === 1 && userStatus.indexOf(\"active\") !== -1\n ? undefined\n : this.onSelectedUserStatus\n }\n />\n
\n
\n \n \n Not Active\n \n }\n name=\"inactive\"\n onClick={\n userStatus.length === 1 && userStatus.indexOf(\"inactive\") !== -1\n ? undefined\n : this.onSelectedUserStatus\n }\n />\n
\n
\n \n );\n };\n // STUDENTS FILTERS COMPONENT\n onFiltersBy = (\n event: Event,\n { name: filter, value }: { name: string, value: string }\n ) => {\n let filterState, query, onFiltersBy;\n switch (filter) {\n case \"rotations\":\n filterState = \"fetchingByRotations\";\n query = `activeRotation=${value}`;\n const { onFiltersByRotations } = this.props;\n onFiltersBy = onFiltersByRotations;\n break;\n case \"programs\":\n filterState = \"fetchingByPrograms\";\n query = `programs=${value}`;\n const { onFiltersByPrograms } = this.props;\n onFiltersBy = onFiltersByPrograms;\n break;\n case \"cohorts\":\n filterState = \"fetchingByCohorts\";\n query = `cohorts=${value}`;\n const { onFiltersByCohorts } = this.props;\n onFiltersBy = onFiltersByCohorts;\n break;\n case \"institutions\":\n filterState = \"fetchingByInstitutions\";\n query = `institutions=${value}`;\n const { onFiltersByInstitutions } = this.props;\n onFiltersBy = onFiltersByInstitutions;\n break;\n default:\n }\n if (filterState) {\n let newState = {\n fetchingByCohorts: false,\n fetchingByInstitutions: false,\n fetchingByPrograms: false,\n fetchingByRotations: false,\n fetchingByUserStatus: false,\n };\n newState[filterState] = true;\n this.setState(newState);\n return new Promise((resolve) => {\n const formValues = {\n query: query,\n selected: value,\n updateStoreUsers: true,\n };\n const callbacks = {\n callbackError: (msg) => {\n window.logger.log(\"errors - onFiltersBy\", msg);\n if (filterState) {\n newState[filterState] = false;\n this.setState(newState);\n }\n resolve();\n },\n callbackSuccess: () => {\n window.logger.log(\"Success - onFiltersBy\", filter, value);\n if (filterState) {\n newState[filterState] = false;\n this.setState(newState);\n }\n resolve();\n },\n };\n const payload = Object.assign({}, formValues, callbacks);\n onFiltersBy(payload);\n });\n }\n };\n renderRotations = () => {\n const {\n rotations: { activeRotation },\n } = this.props;\n return [\n \n \n Rotations\n \n ,\n \n \n this.onFiltersBy(new Event(\"empty\"), {\n name: \"rotations\",\n value: !activeRotation,\n })\n }\n >\n \n Active Rotations\n \n ,\n ];\n };\n renderPrograms = () => {\n const {\n canReadAllStudentsProfile,\n programs: { options: arrayPrograms, selected: programsSelected },\n } = this.props;\n if (!canReadAllStudentsProfile) {\n return null;\n }\n return [\n \n \n Programs\n \n ,\n \n ({\n key: _id,\n value: _id,\n text: name,\n }))}\n value={programsSelected}\n onChange={this.onFiltersBy}\n />\n ,\n ];\n };\n renderCohorts = () => {\n const {\n canReadAllStudentsProfile,\n cohorts: { options: arrayCohorts, selected: cohortsSelected },\n } = this.props;\n if (!canReadAllStudentsProfile) {\n return null;\n }\n return [\n \n \n Cohorts\n \n ,\n \n ({\n key: _id,\n value: _id,\n text: name,\n }))}\n value={cohortsSelected}\n onChange={this.onFiltersBy}\n />\n ,\n ];\n };\n renderInstitutions = (upward: boolean = false) => {\n const {\n institutions: {\n options: arrayInstitutions,\n selected: institutionsSelected,\n },\n } = this.props;\n if (arrayInstitutions.length === 0) {\n return null;\n }\n return [\n \n \n Clinics\n \n ,\n \n ({\n key: _id,\n value: _id,\n text: name,\n }))}\n value={institutionsSelected}\n onChange={this.onFiltersBy}\n />\n ,\n ];\n };\n}\nexport const studentFounded = (\n student: Object,\n elementToFind: string,\n valueToFind: string\n): boolean => {\n let { currentEnrollment } = student;\n if (currentEnrollment) {\n if (elementToFind === \"program\" && currentEnrollment.program) {\n return currentEnrollment.program._id === valueToFind;\n } else if (elementToFind === \"cohort\" && currentEnrollment.cohort) {\n return currentEnrollment.cohort._id === valueToFind;\n }\n }\n return false;\n};\n\nconst bindActions = (dispatch) => {\n return {\n onClearFilters: () => dispatch(UsersManager.usersManagerFiltersClear()),\n onFiltersByCohorts: (payload) =>\n dispatch(UsersManager.usersManagerFiltersCohorts(payload)),\n onFiltersByInstitutions: (payload) =>\n dispatch(UsersManager.usersManagerFiltersInstitutions(payload)),\n onFiltersByPrograms: (payload) =>\n dispatch(UsersManager.usersManagerFiltersPrograms(payload)),\n onFiltersByRotations: (payload) =>\n dispatch(UsersManager.usersManagerFiltersRotations(payload)),\n onFiltersBySearch: (payload) =>\n dispatch(UsersManager.usersManagerFiltersSearch(payload)),\n onFiltersSetUserStatus: (payload) =>\n dispatch(UsersManager.usersManagerFiltersSetUserStatus(payload)),\n onFiltersByUserStatus: (payload) =>\n dispatch(UsersManager.usersManagerFiltersUserStatus(payload)),\n onGetUsersByRoles: (payload) =>\n dispatch(Users.usersFetchUsersRoles(payload)),\n onSearch: (name: string) =>\n dispatch(UsersManager.usersManagerFiltersSetSearch({ searchTxt: name })),\n };\n};\n\nexport default connect(\n ({\n accessControl: { isFetchingRoles },\n tenantSettings: {\n tenantSettings: { SHOW_DEACTIVATED_USERS },\n },\n users,\n usersManager: { filters },\n }) => {\n const {\n SuperCompanyAdministrators,\n CompanyAdministrators,\n Coordinators,\n Faculties,\n InstitutionAdministrators,\n Preceptors,\n Students,\n } = users;\n let usersManager = [],\n usersFound = undefined;\n if (\n users &&\n filters.roles.selected &&\n !filters.roles.isFetching &&\n users[filters.roles.selected.apiName]\n ) {\n usersManager = users[filters.roles.selected.apiName].users;\n if (filters.searchTxt.length > 0) {\n usersFound = usersManager.length;\n }\n }\n return {\n ...filters,\n isFetchingRoles,\n usersFound,\n SuperCompanyAdministrators,\n CompanyAdministrators,\n Coordinators,\n Faculties,\n InstitutionAdministrators,\n Preceptors,\n Students,\n SHOW_DEACTIVATED_USERS: SHOW_DEACTIVATED_USERS?.values || false,\n };\n },\n bindActions\n)(UserManagerFilters);\n","// @flow\n\n/* PERMISSIONS */\nconst onCheckResource = (apiResource: Object, resources: Array) => {\n for (let resource in apiResource) {\n if (\n resources.indexOf(resource) !== -1 &&\n apiResource[resource][\"isEnabled\"]\n ) {\n return true;\n }\n }\n return false;\n};\n\nexport const onCheckAllReportsPermissions = (permissions: ?Object): boolean => {\n return (\n onCheckReportsPermissions(permissions) ||\n onCheckQueriesPermissions(permissions) ||\n onCheckChartsPermissions(permissions)\n );\n};\n\n// REPORTS\nexport const onCheckReportsPermissions = (permissions: ?Object): boolean => {\n const resources = [\n \"Reports:read\",\n \"Reports:update\",\n \"Reports:delete\",\n \"my:Reports:read\",\n \"Reports:download\"\n ];\n const { Reports } = permissions || {};\n if (Reports && Reports.apiValue) {\n return onCheckResource(Reports.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckReadAllReportsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Reports:read\", \"my:Reports:read\"];\n const { Reports } = permissions || {};\n if (Reports && Reports.apiValue) {\n return onCheckResource(Reports.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckReadReportsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Reports:read\"];\n const { Reports } = permissions || {};\n if (Reports && Reports.apiValue) {\n return onCheckResource(Reports.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckEditReportsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Reports:update\"];\n const { Reports } = permissions || {};\n if (Reports && Reports.apiValue) {\n return onCheckResource(Reports.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckDeleteReportsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Reports:delete\"];\n const { Reports } = permissions || {};\n if (Reports && Reports.apiValue) {\n return onCheckResource(Reports.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckDownloadReportsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Reports:download\"];\n const { Reports } = permissions || {};\n if (Reports && Reports.apiValue) {\n return onCheckResource(Reports.apiValue, resources);\n }\n return false;\n};\n\n// QUERIES\nexport const onCheckQueriesPermissions = (permissions: ?Object): boolean => {\n const resources = [\n \"Queries:create\",\n \"Queries:read\",\n \"Queries:update\",\n \"Queries:delete\",\n \"Queries:run\"\n ];\n const { Queries } = permissions || {};\n if (Queries && Queries.apiValue) {\n return onCheckResource(Queries.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckReadQueriesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Queries:read\"];\n const { Queries } = permissions || {};\n if (Queries && Queries.apiValue) {\n return onCheckResource(Queries.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckCreateQueriesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Queries:create\"];\n const { Queries } = permissions || {};\n if (Queries && Queries.apiValue) {\n return onCheckResource(Queries.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckEditQueriesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Queries:update\"];\n const { Queries } = permissions || {};\n if (Queries && Queries.apiValue) {\n return onCheckResource(Queries.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckDeleteQueriesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Queries:delete\"];\n const { Queries } = permissions || {};\n if (Queries && Queries.apiValue) {\n return onCheckResource(Queries.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckRunQueriesPermissions = (permissions: ?Object): boolean => {\n const resources = [\"Queries:run\"];\n const { Queries } = permissions || {};\n if (Queries && Queries.apiValue) {\n return onCheckResource(Queries.apiValue, resources);\n }\n return false;\n};\n\n// CHARTS\nexport const onCheckChartsPermissions = (permissions: ?Object): boolean => {\n const resources = [\n \"Charts:create\",\n \"Charts:read\",\n \"Charts:update\",\n \"Charts:delete\"\n ];\n const { Charts } = permissions || {};\n if (Charts && Charts.apiValue) {\n return onCheckResource(Charts.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckReadChartsPermissions = (permissions: ?Object): boolean => {\n const resources = [\"Charts:read\"];\n const { Charts } = permissions || {};\n if (Charts && Charts.apiValue) {\n return onCheckResource(Charts.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckCreateChartsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Charts:create\"];\n const { Charts } = permissions || {};\n if (Charts && Charts.apiValue) {\n return onCheckResource(Charts.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckEditChartsPermissions = (permissions: ?Object): boolean => {\n const resources = [\"Charts:update\"];\n const { Charts } = permissions || {};\n if (Charts && Charts.apiValue) {\n return onCheckResource(Charts.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckDeleteChartsPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Charts:delete\"];\n const { Charts } = permissions || {};\n if (Charts && Charts.apiValue) {\n return onCheckResource(Charts.apiValue, resources);\n }\n return false;\n};\n","// Access Control Reducer\nimport { AccessControl, Users } from \"../actions/\";\nimport { updateArrayWithElement } from \"../../utils/\";\n\nexport type ApiName =\n | \"Alumnis\"\n | \"CompanyAdministrators\"\n | \"Coordinators\"\n | \"Faculties\"\n | \"InstitutionAdministrators\"\n | \"Preceptors\"\n | \"Students\"\n | \"SuperCompanyAdministrators\";\nexport type DynamicRule = {\n _id: string;\n createdAt?: Date;\n updatedAt?: Date;\n user: Object;\n conditions: {\n programs: Array;\n cohorts: Array;\n };\n};\nexport type ResourceAction = {\n resource: string;\n resourceName: string;\n actions: {\n alias: string;\n label: string;\n value: boolean;\n disabled: boolean;\n };\n apiValue: {\n key: boolean;\n };\n};\nexport type Role = {\n _id: string;\n updatedAt: Date;\n apiName: ApiName;\n type: string;\n name: string;\n isActive: boolean;\n permissions: {\n //Active\n Companies: ResourceAction | undefined;\n CaseLogs: ResourceAction | undefined;\n Rotations: ResourceAction | undefined;\n Periods: ResourceAction | undefined;\n Users: ResourceAction | undefined;\n Institutions: ResourceAction | undefined;\n UserInvitations: ResourceAction | undefined;\n Queries: ResourceAction | undefined;\n Reports: ResourceAction | undefined;\n Files: ResourceAction | undefined;\n FileCategories: ResourceAction | undefined;\n Programs: ResourceAction | undefined;\n Enrollments: ResourceAction | undefined;\n Notifications: ResourceAction | undefined;\n CustomFields: ResourceAction | undefined;\n EvaluationTemplates: ResourceAction | undefined;\n EvaluationSchedulers: ResourceAction | undefined;\n Evaluations: ResourceAction | undefined;\n EvaluationAnswers: ResourceAction | undefined;\n ImportData: ResourceAction | undefined;\n Roles: ResourceAction | undefined;\n };\n};\ntype State = {\n initAccessControl: boolean;\n isFetchingRoles: boolean;\n roles: Array;\n roleSelected: number;\n dynamicRules: Array;\n};\ntype Action = {\n type: string;\n payload: object | any;\n};\n\n// The initial application state\nconst initialState = {\n initAccessControl: false,\n isFetchingRoles: false,\n roles: [],\n roleSelected: 0,\n dynamicRules: [],\n};\n\nexport default function accessControl(\n state: State = initialState,\n action: Action\n): State {\n switch (action.type) {\n case AccessControl.ACCESS_CONTROL_INIT:\n return Object.assign({}, state, {\n initAccessControl: true,\n });\n // case AccessControl.ACCESS_CONTROL_FETCH_ROLES:\n case Users.USERS_FETCH_USERS_KPIS:\n return Object.assign({}, state, {\n isFetchingRoles: true,\n });\n case Users.USERS_FETCH_USERS_KPIS_SUCCESS:\n case Users.USERS_FETCH_USERS_KPIS_FAILURE:\n return Object.assign({}, state, {\n isFetchingRoles: false,\n });\n case AccessControl.ACCESS_CONTROL_FETCH_ROLES_SUCCESS:\n const rolesWithoutAlumnis = action.payload.roles.filter(\n ({ apiName }: any) => apiName !== \"Alumnis\"\n );\n const rolAlumnis = action.payload.roles.filter(\n ({ apiName }: any) => apiName === \"Alumnis\"\n );\n return Object.assign({}, state, {\n roles: [...rolesWithoutAlumnis, ...rolAlumnis],\n });\n case AccessControl.ACCESS_CONTROL_ROLE_SELECTED:\n return Object.assign({}, state, {\n roleSelected: action.payload.roleSelected,\n });\n case AccessControl.ACCESS_CONTROL_UPDATE_ROLE_RESOURCE_SUCCESS:\n const newArrayRoles = [...state.roles];\n newArrayRoles[state.roleSelected] = action.payload.role;\n return Object.assign({}, state, {\n roles: newArrayRoles,\n });\n //Dynamic Rules\n case AccessControl.ACCESS_CONTROL_FETCH_DYNAMIC_RULES_SUCCESS:\n return Object.assign({}, state, {\n dynamicRules: action.payload.dynamicRules,\n });\n case AccessControl.ACCESS_CONTROL_CREATE_DYNAMIC_RULE_SUCCESS:\n return Object.assign({}, state, {\n dynamicRules: [...state.dynamicRules, action.payload.dynamicRule],\n });\n case AccessControl.ACCESS_CONTROL_EDIT_DYNAMIC_RULE_SUCCESS:\n return Object.assign({}, state, {\n dynamicRules: updateArrayWithElement(\n state.dynamicRules,\n action.payload.dynamicRule\n ),\n });\n case AccessControl.ACCESS_CONTROL_DELETE_DYNAMIC_RULE_SUCCESS:\n return Object.assign({}, state, {\n dynamicRules: state.dynamicRules.filter(\n ({ _id }) => _id !== action.payload.dynamicRuleId\n ),\n });\n // current state\n default:\n return state;\n }\n}\n","//Class to manage all api calls\nimport axios from \"axios\";\nimport type { AxiosResponse } from \"axios\";\nimport { app } from \"../../app.json\";\nimport { onGetTenant, onGetToken } from \"../../utils\";\n// Types\nimport type { AxiosRequestConfig, CancelToken } from \"axios\";\nexport type Config = {\n https?: \"https\" | \"http\";\n tenant?: \"\" | string;\n envApi?: \"\" | \"dev\" | \"test\" | string;\n apiBase?: \"getinclusive.io\" | string;\n vApi?: \"v1\" | \"v2\";\n token?: string;\n cancelToken?: CancelToken;\n};\nexport interface tAPI {\n GET: (url: string, config?: Config) => Promise;\n POST: (url: string, data: any, config?: Config) => Promise;\n PUT: (url: string, data: any, config?: Config) => Promise;\n PATCH: (url: string, data: any, config?: Config) => Promise;\n DELETE: (url: string, config?: Config, data?: any) => Promise;\n UPLOAD: (\n url: string,\n data: any,\n method: \"POST\" | \"PUT\" | \"PATCH\",\n config?: Config\n ) => Promise;\n DOWNLOAD: (\n url: string,\n data: any,\n extension: string,\n config?: Config\n ) => Promise;\n}\nexport class API {\n // Private properties:\n ready: boolean;\n constructor() {\n this.ready = true;\n }\n static __configDefault__: Config = {\n https: \"https\",\n tenant: onGetTenant(),\n envApi: app.apiEnv,\n apiBase: app.appURL,\n vApi: \"v1\",\n token: onGetToken(),\n cancelToken: undefined,\n };\n // Private Methods:\n _setHeaders = (token: string, isPostPutPatch: boolean = false): object => {\n let headers: object = {\n Accept: \"application/json\",\n };\n if (token && token.length) {\n headers = {\n ...headers,\n Authorization: `Bearer ${token}`,\n };\n }\n if (isPostPutPatch) {\n headers = {\n ...headers,\n \"Content-type\": \"application/json\",\n };\n }\n return headers;\n };\n _setConfigGet = (\n token: Config[\"token\"],\n cancelToken: Config[\"cancelToken\"]\n ): AxiosRequestConfig => {\n let config: AxiosRequestConfig = {\n cancelToken,\n headers: this._setHeaders(token as string),\n timeout: 100000,\n validateStatus: this._validateStatus,\n };\n return config;\n };\n _setConfigPostPutPatch = (\n method: \"POST\" | \"PUT\" | \"PATCH\",\n data: any,\n token: Config[\"token\"]\n ): AxiosRequestConfig => {\n let config: AxiosRequestConfig = {\n data: JSON.stringify(data),\n headers: this._setHeaders(token as string, true),\n method: method,\n timeout: 100000,\n validateStatus: this._validateStatus,\n };\n return config;\n };\n _setConfigDel = (token: Config[\"token\"], data?: any): AxiosRequestConfig => {\n let config: AxiosRequestConfig = {\n method: \"DELETE\",\n headers: this._setHeaders(token as string),\n timeout: 100000,\n validateStatus: this._validateStatus,\n };\n if (data) {\n config = {\n ...config,\n data: JSON.stringify(data),\n };\n }\n return config;\n };\n _setErrorAPI = (error: string, message: string = \"Server error 500\") => {\n return {\n name: error,\n message,\n };\n };\n _setFullURL = (url: string, config: Config): string => {\n const { https, tenant, apiBase, vApi } = config;\n let fullURL = `${https}://`;\n if (tenant) {\n fullURL += `${tenant}.`;\n }\n fullURL += `${apiBase}/api/${vApi}${url}`;\n return fullURL;\n };\n _validResponse = (\n response: AxiosResponse\n ): { data?: any; ok: boolean } => {\n if (response.headers[\"content-type\"].indexOf(\"application/json\") > -1) {\n return response.data;\n }\n return {\n ok: false,\n ...this._setErrorAPI(\n \"Internal Error\",\n \"content-type is not application/json\"\n ),\n };\n };\n _validateStatus = (status: number) => status >= 200 && status < 500;\n _parseResponse = (response: { data?: any; ok: boolean }): Promise => {\n return new Promise((resolve, reject) => {\n if (response.ok) {\n resolve({ success: true, data: response });\n } else {\n reject({ success: false, data: response });\n }\n });\n };\n // Public Methods:\n GET(url: string, config?: Config): Promise {\n const apiConfig = { ...API.__configDefault__, ...config };\n return axios\n .get(\n this._setFullURL(url, apiConfig),\n this._setConfigGet(apiConfig.token || \"\", apiConfig.cancelToken)\n )\n .then(this._validResponse)\n .catch((error) => {\n let isAPICancelled = false;\n // Checking Cancel Request was cancelled\n if (axios.isCancel(error)) {\n isAPICancelled = true;\n }\n window.logger.error(\n \"ERROR 500 from server - GET\",\n error,\n isAPICancelled\n );\n return {\n ok: false,\n status: isAPICancelled ? \"cancelled\" : \"error\",\n ...this._setErrorAPI(\n \"Internal Error\",\n error && error.message ? error.message : error\n ),\n };\n })\n .then(this._parseResponse);\n }\n POST(url: string, data: any, config?: Config): Promise {\n const apiConfig = { ...API.__configDefault__, ...config };\n return axios(\n this._setFullURL(url, apiConfig),\n this._setConfigPostPutPatch(\"POST\", data, apiConfig.token || \"\")\n )\n .then(this._validResponse)\n .catch((error) => {\n window.logger.error(\"ERROR 500 from server - POST\", error);\n return {\n ok: false,\n ...this._setErrorAPI(\n \"Internal Error\",\n error && error.message ? error.message : error\n ),\n };\n })\n .then(this._parseResponse);\n }\n PUT(url: string, data: any, config?: Config): Promise {\n const apiConfig = { ...API.__configDefault__, ...config };\n return axios(\n this._setFullURL(url, apiConfig),\n this._setConfigPostPutPatch(\"PUT\", data, apiConfig.token || \"\")\n )\n .then(this._validResponse)\n .catch((error) => {\n window.logger.error(\"ERROR 500 from server - PUT\", error);\n return {\n ok: false,\n ...this._setErrorAPI(\n \"Internal Error\",\n error && error.message ? error.message : error\n ),\n };\n })\n .then(this._parseResponse);\n }\n PATCH(url: string, data: any, config?: Config): Promise {\n const apiConfig = { ...API.__configDefault__, ...config };\n return axios(\n this._setFullURL(url, apiConfig),\n this._setConfigPostPutPatch(\"PATCH\", data, apiConfig.token || \"\")\n )\n .then(this._validResponse)\n .catch((error) => {\n window.logger.error(\"ERROR 500 from server - PATCH\", error);\n return {\n ok: false,\n ...this._setErrorAPI(\n \"Internal Error\",\n error && error.message ? error.message : error\n ),\n };\n })\n .then(this._parseResponse);\n }\n DELETE(url: string, config?: Config, data?: any): Promise {\n const apiConfig = { ...API.__configDefault__, ...config };\n return axios(\n this._setFullURL(url, apiConfig),\n this._setConfigDel(apiConfig.token || \"\", data)\n )\n .then(this._validResponse)\n .catch((error) => {\n window.logger.error(\"ERROR 500 from server - DELETE\", error);\n return {\n ok: false,\n ...this._setErrorAPI(\n \"Internal Error\",\n error && error.message ? error.message : error\n ),\n };\n })\n .then(this._parseResponse);\n }\n UPLOAD(\n url: string,\n data: any,\n method: \"POST\" | \"PUT\" | \"PATCH\",\n config?: Config\n ): Promise {\n const apiConfig = { ...API.__configDefault__, ...config };\n return axios(this._setFullURL(url, apiConfig), {\n method,\n timeout: 100000,\n headers: this._setHeaders(apiConfig.token || \"\"),\n data,\n validateStatus: this._validateStatus,\n })\n .then(this._validResponse)\n .catch((error) => {\n window.logger.error(\"ERROR 500 from server - UPLOAD\", error);\n return {\n ok: false,\n ...this._setErrorAPI(\n \"Internal Error\",\n error && error.message ? error.message : error\n ),\n };\n })\n .then(this._parseResponse);\n }\n DOWNLOAD(\n url: string,\n data: any,\n extension: string,\n config?: Config\n ): Promise {\n const apiConfig = { ...API.__configDefault__, ...config };\n return axios(this._setFullURL(url, apiConfig), {\n method: \"POST\",\n timeout: 100000,\n headers: {\n ...this._setHeaders(apiConfig.token || \"\", true),\n Accept: extension,\n },\n data: JSON.stringify(data),\n responseType: \"blob\",\n validateStatus: this._validateStatus,\n })\n .then((response: { [k: string]: any }) => {\n if (response.headers[\"content-type\"].indexOf(extension) > -1) {\n return {\n ok: true,\n blob: window.URL.createObjectURL(\n new Blob([response.data], {\n type: extension || \"application/octet-stream\",\n })\n ),\n };\n }\n return {\n ok: false,\n ...this._setErrorAPI(\n \"Internal Error\",\n `content-type is not ${extension}`\n ),\n };\n })\n .catch((error) => {\n window.logger.error(\"ERROR 500 from server - UPLOAD\", error);\n return {\n ok: false,\n ...this._setErrorAPI(\n \"Internal Error\",\n error && error.message ? error.message : error\n ),\n };\n })\n .then(this._parseResponse);\n }\n}\n","// Import Features\nimport produce from \"immer\";\nimport { API } from \"../api/API\";\nimport { Api } from \"../actions/\";\nimport { onGetToken } from \"../../utils\";\n// Types\nimport type { CancelTokenSource } from \"axios\";\nimport type { Action } from \"deox\";\nexport type CancelRequest = {\n key: \"GET_CASE_LOGS\" | \"GET_ROTATIONS\" | \"GET_EVALUATIONS\";\n source?: CancelTokenSource;\n};\ntype ApiActionReducers = Action<\n string,\n {\n cancelRequest: CancelRequest;\n token: string;\n }\n>;\nexport type State = {\n initAPI: boolean;\n api: {\n ready: boolean;\n };\n cancelRequests: CancelRequest[];\n token: string;\n};\n// Api Reducer\nconst initialState: State = {\n initAPI: false,\n api: {\n ready: false,\n },\n cancelRequests: [],\n token: onGetToken(),\n};\nconst api: (state: State, action: ApiActionReducers) => State = produce(\n (draft: State, action: ApiActionReducers) => {\n switch (action.type) {\n case Api.INIT_API:\n draft.initAPI = true;\n if (action.payload.token) {\n draft.token = action.payload.token;\n }\n draft.api = new API();\n break;\n case Api.ADD_CANCEL_TOKEN_API:\n draft.cancelRequests = [\n ...draft.cancelRequests,\n action.payload.cancelRequest,\n ];\n break;\n case Api.REMOVE_CANCEL_TOKEN_API:\n draft.cancelRequests = draft.cancelRequests.filter(\n (cancelRequest: CancelRequest) =>\n cancelRequest.key !== action.payload.cancelRequest.key\n );\n break;\n }\n },\n initialState\n);\nexport default api;\n","import { Auth, AccessControl, Files } from \"../actions/\";\n// Auth Reducer\ntype StateMyInstitution = {\n loaded: boolean;\n data: object | undefined | null;\n hasMyInstitutionCustomFieldsRequiredNull: object | undefined | null;\n};\ntype AuthUser = {\n accountsAvailable: object[];\n [key: string]: any;\n};\ntype State = {\n updatingProfile: boolean;\n fetchingMyFiles: boolean;\n isAuthenticated: boolean;\n token: string;\n expiredToken: object | undefined | null;\n role: object | undefined | null;\n user: AuthUser | undefined | null;\n emulation: {\n isActive: boolean;\n onBehalfUser: string | undefined | null;\n };\n files: object[];\n filesRequired: object[];\n myInstitution: StateMyInstitution | undefined | null;\n hasContactInfoAddressesFieldsRequiredNull: boolean;\n hasEmergencyContactFieldsRequiredNull: boolean;\n hasCustomFieldsRequiredNull: boolean;\n};\ntype Action = {\n type: string;\n payload: Object;\n};\nconst initialStateMyInstitution: StateMyInstitution = {\n loaded: false,\n data: null,\n hasMyInstitutionCustomFieldsRequiredNull: null,\n};\n\nconst initialState: State = {\n updatingProfile: false,\n fetchingMyFiles: false,\n isAuthenticated: false,\n token: \"\",\n expiredToken: null,\n role: null,\n user: null,\n emulation: {\n isActive: false,\n onBehalfUser: null,\n },\n files: [],\n filesRequired: [],\n myInstitution: initialStateMyInstitution,\n hasContactInfoAddressesFieldsRequiredNull: false,\n hasEmergencyContactFieldsRequiredNull: false,\n hasCustomFieldsRequiredNull: false,\n};\n\nexport default function auth(\n state: State = initialState,\n action: Action\n): State {\n switch (action.type) {\n case Auth.AUTH_SIGNIN_APP:\n case Auth.AUTH_UPDATE_MY_USER_ACCOUNT:\n return Object.assign({}, state, {\n updatingProfile: true,\n fetchingMyFiles: true,\n });\n case Auth.AUTH_UPDATE_MY_USER_ACCOUNT_FAILURE:\n return Object.assign({}, state, {\n updatingProfile: false,\n fetchingMyFiles: false,\n });\n case Auth.AUTH_FETCH_MY_FILES:\n return Object.assign({}, state, {\n fetchingMyFiles: true,\n });\n case Auth.AUTH_FETCH_MY_FILES_FAILURE:\n return Object.assign({}, state, {\n fetchingMyFiles: false,\n });\n case Auth.AUTH_SIGNIN_SUCCESS_APP:\n if (action.payload.role && action.payload.role.type) {\n window.document\n .getElementById(\"heto-app-website\")\n .classList.add(action.payload.role.type);\n }\n return Object.assign({}, state, {\n updatingProfile: false,\n isAuthenticated: true,\n token: action.payload.token,\n expiredToken: action.payload.expiredToken,\n role: action.payload.role,\n user: action.payload.user,\n emulation: action.payload.emulation,\n hasContactInfoAddressesFieldsRequiredNull:\n action.payload.hasContactInfoAddressesFieldsRequiredNull,\n hasEmergencyContactFieldsRequiredNull:\n action.payload.hasEmergencyContactFieldsRequiredNull,\n hasCustomFieldsRequiredNull: action.payload.hasCustomFieldsRequiredNull,\n });\n case Auth.AUTH_UPDATE_MY_USER_ACCOUNT_SUCCESS:\n return Object.assign({}, state, {\n updatingProfile: false,\n role: action.payload.role,\n user: action.payload.user,\n hasContactInfoAddressesFieldsRequiredNull:\n action.payload.hasContactInfoAddressesFieldsRequiredNull,\n hasEmergencyContactFieldsRequiredNull:\n action.payload.hasEmergencyContactFieldsRequiredNull,\n hasCustomFieldsRequiredNull: action.payload.hasCustomFieldsRequiredNull,\n });\n case Auth.AUTH_FETCH_MY_FILES_SUCCESS:\n case Files.FILES_EDIT_SUCCESS:\n case Files.FILES_DELETE_SUCCESS:\n return Object.assign({}, state, {\n fetchingMyFiles: false,\n files: action.payload.files,\n filesRequired: action.payload.files.filter(\n ({ category }) => category && category.isRequired\n ),\n });\n case Auth.AUTH_FETCH_MY_INSTITUTION_SUCCESS:\n return Object.assign({}, state, {\n myInstitution: {\n loaded: true,\n data: action.payload.institution,\n hasMyInstitutionCustomFieldsRequiredNull:\n action.payload.hasMyInstitutionCustomFieldsRequiredNull,\n },\n });\n case Auth.AUTH_SESSION_EXPIRED_APP:\n return Object.assign({}, state, {\n expiredToken: null,\n });\n case AccessControl.ACCESS_CONTROL_FETCH_ROLES_SUCCESS:\n if (state.isAuthenticated) {\n return Object.assign({}, state, {\n role: action.payload.roles.filter(\n ({ apiName }) => state.role && state.role.apiName === apiName\n )[0],\n });\n }\n return state;\n case AccessControl.ACCESS_CONTROL_UPDATE_ROLE_RESOURCE_SUCCESS:\n if (\n state.isAuthenticated &&\n state.role &&\n state.role.type === action.payload.role.type\n ) {\n return Object.assign({}, state, {\n role: action.payload.role,\n });\n }\n return state;\n case Auth.AUTH_SIGNIN_FAILURE_APP:\n case Auth.AUTH_SIGNOUT_SUCCESS_APP:\n case Auth.AUTH_SIGNOUT_FAILURE_APP:\n return initialState;\n // same state (not change)\n default:\n return state;\n }\n}\n","// Features\nimport produce from \"immer\";\nimport { CameraDevice } from \"../actions\";\n// Types\nimport type { Action } from \"deox\";\ntype CameraDeviceActionReducers = Action;\nexport type State = {\n showCameraWarningMsg: boolean;\n};\n// Camera Device Reducer\nconst initialState: State = {\n showCameraWarningMsg: false,\n};\nconst cameraDevice: (\n state: State,\n action: CameraDeviceActionReducers\n) => State = produce((draft: State, action: CameraDeviceActionReducers) => {\n switch (action.type) {\n case CameraDevice.CAMERA_DEVICE_SHOW_WARNING_MSG:\n draft.showCameraWarningMsg = true;\n break;\n case CameraDevice.CAMERA_DEVICE_HIDE_WARNING_MSG:\n draft.showCameraWarningMsg = false;\n break;\n }\n}, initialState);\nexport default cameraDevice;\n","// Import Features\nimport { Cohorts } from \"../actions/\";\nimport { updateArrayWithElement } from \"../../utils/\";\nimport type { PayloadObject } from \"../../types/common.types\";\n// Cohorts Reducer\ntype State = {\n isFetching: boolean;\n lastFetching: Date | undefined | null;\n cohorts: object[];\n};\ntype Action = {\n type: string;\n payload: PayloadObject;\n};\n\nconst initialState: State = {\n isFetching: false,\n lastFetching: null,\n cohorts: [],\n};\n\nexport default function cohorts(\n state: State = initialState,\n action: Action\n): State {\n switch (action.type) {\n //Cohorts\n case Cohorts.COHORTS_FETCH_COHORTS:\n return Object.assign({}, state, {\n isFetching: true,\n });\n case Cohorts.COHORTS_FETCH_COHORTS_SUCCESS:\n return Object.assign({}, state, {\n isFetching: false,\n lastFetching: new Date(),\n cohorts: action.payload.cohorts,\n });\n case Cohorts.COHORTS_FETCH_COHORTS_FAILURE:\n return Object.assign({}, state, {\n isFetching: false,\n });\n case Cohorts.COHORTS_CREATE_SUCCESS:\n return Object.assign({}, state, {\n lastFetching: new Date(),\n cohorts: [...state.cohorts, action.payload.cohort],\n });\n case Cohorts.COHORTS_EDIT_COHORT_SUCCESS:\n return Object.assign({}, state, {\n cohorts: updateArrayWithElement(state.cohorts, action.payload.cohort),\n });\n case Cohorts.COHORTS_DELETE_SUCCESS:\n return Object.assign({}, state, {\n lastFetching: new Date(),\n cohorts: state.cohorts.filter(\n ({ _id }: any) => _id !== action.payload.cohortId\n ),\n });\n // same state (not change)\n default:\n return state;\n }\n}\n","// Features\nimport produce from \"immer\";\nimport { Company, Files } from \"../actions/\";\n// Types\nimport type {\n CompanyActionReducers as Action,\n StateCompany as State,\n} from \"../../types/company.types\";\n// Company Reducer\nconst initialState: State = {\n myCompanyLoaded: false,\n myCompanyStatus: \"ready\",\n myCompany: undefined,\n myCompanyFiles: [],\n myCompanyFilesExpired: [],\n};\nconst company: (state: State, action: Action) => State = produce(\n (draft: State, action: Action) => {\n switch (action.type) {\n case Company.COMPANY_FETCH_COMPANY:\n case Company.COMPANY_FETCH_COMPANY_FILES:\n case Company.COMPANY_FETCH_COMPANY_FILES_EXPIRED:\n draft.myCompanyStatus = \"requesting\";\n break;\n case Company.COMPANY_FETCH_COMPANY_SUCCESS:\n case Company.COMPANY_EDIT_COMPANY_SUCCESS:\n draft.myCompany = action.payload.myCompany;\n draft.myCompanyLoaded = true;\n draft.myCompanyStatus = \"success\";\n break;\n case Company.COMPANY_FETCH_COMPANY_FILES_SUCCESS:\n case Files.FILES_EDIT_SUCCESS:\n case Files.FILES_DELETE_SUCCESS:\n draft.myCompanyFiles = action.payload.files;\n draft.myCompanyStatus = \"success\";\n break;\n case Company.COMPANY_FETCH_COMPANY_FILES_EXPIRED_SUCCESS:\n draft.myCompanyFilesExpired = action.payload.filesExpired;\n draft.myCompanyStatus = \"success\";\n break;\n case Company.COMPANY_FETCH_COMPANY_FAILURE:\n case Company.COMPANY_FETCH_COMPANY_FILES_FAILURE:\n case Company.COMPANY_FETCH_COMPANY_FILES_EXPIRED_FAILURE:\n draft.myCompanyStatus = \"error\";\n break;\n }\n },\n initialState\n);\nexport default company;\n","// Import Features\nimport produce from \"immer\";\nimport { app as appJson } from \"../../app.json\";\nimport {\n isMobileBrowser,\n isTouchableDevice,\n onGetUrlDomain,\n onGetTenant,\n} from \"../../utils\";\n// Types\nimport type { Action } from \"deox\";\ntype State = {};\n// CONFIG Reducer\nconst initialState: State = {\n initAPP: true,\n ...appJson,\n origin: window.location.origin\n ? window.location.origin\n : `${window.location.protocol}//${window.location.host}`,\n protocol: `${window.location.protocol}//`,\n hostname: window.location.hostname,\n port: window.location.port.length > 0 ? `:${window.location.port}` : \"\",\n websitename: appJson.name,\n baseDomain: onGetUrlDomain(),\n suffix: \".com\",\n companyDomain: onGetTenant(),\n baseImg: `https://${onGetTenant()}.${appJson.appURL}`,\n api: {\n protocol: \"https://\",\n tenant: onGetTenant(),\n base: `${appJson.appURL}`,\n version: \"v1\",\n },\n socketUri: `wss://ws.${appJson.appURL}`,\n isMobileBrowser: isMobileBrowser(),\n isTouchableDevice: isTouchableDevice(),\n version: appJson.version,\n buildDate: appJson.appBuildDate,\n};\nconst config: (state: State, action: Action) => State = produce(\n (draft: State, action: Action) => draft,\n initialState\n);\nexport default config;\n","// Import Features\nimport { AccessControl, CustomFields } from \"../actions/\";\nimport union from \"lodash/union\";\nimport { updateArrayWithElement } from \"../../utils/\";\n// Types\nimport type { UsersRole } from \"../../types/users.types\";\ntype StateModelsAvailable = UsersRole | \"Institutions\" | \"CaseLogs\";\ntype PayloadCustomFields = {\n _id: string;\n name: string;\n label: string;\n isRequired: boolean;\n model: StateModelsAvailable;\n fieldType:\n | \"boolean\"\n | \"string\"\n | \"number\"\n | \"date\"\n | \"dropdown\"\n | \"radiobutton\"\n | \"checkbox\"\n | \"file\";\n\n conditions: {\n programs: string[];\n cohorts: string[];\n };\n permissions: {\n [key in UsersRole]: \"read\" | \"write\";\n };\n createdAt: Date;\n updatedAt: Date;\n};\nexport type State = {\n lastFetching: Date;\n models: Array;\n customFields: {\n all: PayloadCustomFields[];\n SuperCompanyAdministrators: PayloadCustomFields[];\n CompanyAdministrators: PayloadCustomFields[];\n Coordinators: PayloadCustomFields[];\n Faculties: PayloadCustomFields[];\n Students: PayloadCustomFields[];\n InstitutionAdministrators: PayloadCustomFields[];\n Preceptors: PayloadCustomFields[];\n Institutions: PayloadCustomFields[];\n CaseLogs: PayloadCustomFields[];\n };\n triggerAnimation: boolean;\n};\ntype Action = {\n type: string;\n payload: Object;\n};\n// Custom Fields Reducer\nconst addModelsCustomfields = (newModels: object[] = []) => {\n let modelsRoles = [\n \"SuperCompanyAdministrators\",\n \"CompanyAdministrators\",\n \"Coordinators\",\n \"Faculties\",\n \"Students\",\n \"InstitutionAdministrators\",\n \"Preceptors\",\n ].filter((model) => newModels.indexOf(model) !== -1);\n modelsRoles = union(modelsRoles, newModels);\n let modelsOthers = [\"Institutions\", \"CaseLogs\"];\n return [...modelsRoles, ...modelsOthers];\n};\nconst initialStateModels = [];\nconst initialState: State = {\n lastFetching: new Date(),\n models: initialStateModels,\n customFields: {\n all: [],\n SuperCompanyAdministrators: [],\n CompanyAdministrators: [],\n Coordinators: [],\n Faculties: [],\n Students: [],\n InstitutionAdministrators: [],\n Preceptors: [],\n Institutions: [],\n CaseLogs: [],\n },\n triggerAnimation: false,\n};\n\nexport default function customFields(\n state: State = initialState,\n action: Action\n): State {\n switch (action.type) {\n //initialState\n case AccessControl.ACCESS_CONTROL_FETCH_ROLES_SUCCESS:\n return Object.assign({}, state, {\n lastFetching: new Date(),\n models: addModelsCustomfields(\n action.payload.roles\n .filter(({ apiName }) => apiName !== \"Alumnis\")\n .map(({ apiName }) => apiName)\n ),\n });\n //Custom Fields\n case CustomFields.CUSTOM_FIELDS_FETCH_CUSTOM_FIELDS_SUCCESS:\n let customFields = {\n ...state.customFields,\n all: action.payload.customFields,\n };\n for (let i = 0; i < state.models.length; i++) {\n customFields[state.models[i]] = action.payload.customFields.filter(\n ({ model }) => model === state.models[i]\n );\n }\n return Object.assign({}, state, {\n lastFetching: new Date(),\n customFields,\n });\n case CustomFields.CUSTOM_FIELDS_CREATE_SUCCESS:\n return Object.assign({}, state, {\n lastFetching: new Date(),\n customFields: {\n ...state.customFields,\n all: [...state.customFields.all, action.payload.customField],\n [action.payload.customField.model]: [\n ...state.customFields[action.payload.customField.model],\n action.payload.customField,\n ],\n },\n });\n case CustomFields.CUSTOM_FIELDS_EDIT_FIELD_SUCCESS:\n return Object.assign({}, state, {\n lastFetching: new Date(),\n customFields: {\n ...state.customFields,\n all: updateArrayWithElement(\n state.customFields.all,\n action.payload.customField\n ),\n [action.payload.customField.model]: updateArrayWithElement(\n state.customFields[action.payload.customField.model],\n action.payload.customField\n ),\n },\n });\n case CustomFields.CUSTOM_FIELDS_DELETE_FIELD_SUCCESS:\n return Object.assign({}, state, {\n lastFetching: new Date(),\n customFields: {\n ...state.customFields,\n all: state.customFields.all.filter(\n ({ _id }) => _id !== action.payload.customFieldId\n ),\n [action.payload.customFieldModel]: state.customFields[\n action.payload.customFieldModel\n ].filter(({ _id }) => _id !== action.payload.customFieldId),\n },\n });\n case CustomFields.CUSTOM_FIELDS_REQUIRED_TRIGER_ANIMATION:\n return Object.assign({}, state, {\n triggerAnimation: !state.triggerAnimation,\n });\n // same state (not change)\n default:\n return state;\n }\n}\n","// Import Features\nimport { Enrollments, Users } from \"../actions/\";\nimport { updateArrayWithElement } from \"../../utils/\";\n// Enrollments Reducer\ntype State = {\n enrollments: object[];\n studentEnrollments: object[];\n};\ntype Action = {\n type: string;\n payload: Object;\n};\n\nconst initialState: State = {\n enrollments: [],\n studentEnrollments: [],\n};\n\nexport default function enrollments(\n state: State = initialState,\n action: Action\n): State {\n switch (action.type) {\n //Student Enrollments\n case Enrollments.STUDENTS_ENROLLMENTS_FETCH_SUCCESS:\n return Object.assign({}, state, {\n studentEnrollments: action.payload.studentEnrollments,\n });\n case Users.USERS_UNSET_USERID:\n return Object.assign({}, state, {\n studentEnrollments: [],\n });\n case Enrollments.STUDENT_ENROLLMENT_CREATE_SUCCESS:\n return Object.assign({}, state, {\n studentEnrollments: [\n ...state.studentEnrollments,\n action.payload.studentEnrollment,\n ],\n });\n case Enrollments.STUDENT_ENROLLMENT_EDIT_SUCCESS:\n return Object.assign({}, state, {\n studentEnrollments: updateArrayWithElement(\n state.studentEnrollments,\n action.payload.studentEnrollment\n ),\n });\n case Enrollments.STUDENT_ENROLLMENT_DELETE_SUCCESS:\n return Object.assign({}, state, {\n studentEnrollments: state.studentEnrollments.filter(\n ({ _id }) => _id !== action.payload.studentEnrollmentId\n ),\n });\n // same state (not change)\n default:\n return state;\n }\n}\n","// Features\nimport produce from \"immer\";\nimport { EvaluationsSchedulers, EvaluationsTemplates } from \"../actions/\";\n// Types\nimport type { Action } from \"deox\";\nimport type { PayloadObject, UndefinedNull } from \"../../types/common.types\";\nimport type { EvaluationsTypes } from \"../../types/evaluations.types\";\nexport type StateEvaluationsSchedulersCreate = {\n stepCreateEvaluationsSchedulers: //Init: (Shared Autogenerate & Flexible)\n | \"select-evaluation-schedulers\"\n //Autogenerate: Based At the start-end rotations | Based On every case log\n | \"setup-autogenerate-select-type\"\n | \"setup-autogenerate-select-type-evaluators\"\n | \"setup-autogenerate-select-criterias\"\n //Flexible: Based On specific date\n | \"setup-flexible-select-type\"\n | \"setup-flexible-select-evaluators\"\n | \"setup-flexible-select-targets\"\n //Last Steps: (Shared Autogenerate & Flexible)\n | \"setup-template-reminders\"\n | \"setup-name-description-date-options\"\n | \"summary-evaluation-schedulers-create\";\n \"select-evaluation-schedulers\": {\n triggeringCriteria:\n | \"start_rotation\"\n | \"end_rotation\"\n | \"every_case_log\"\n | \"custom_period\"\n | UndefinedNull;\n };\n //Autogenerate: Based At the start-end rotations | Based On every case log\n \"setup-autogenerate-select-type\": {\n multipleAnswers: boolean;\n type:\n | \"UserEvaluations\"\n | \"InstitutionEvaluations\"\n | \"CustomEvaluations\"\n | UndefinedNull;\n evaluatorsRole: \"Students\" | \"Preceptors\" | UndefinedNull;\n targetsRole: \"Students\" | \"Preceptors\" | UndefinedNull;\n targets: [] | [\"Others\"];\n };\n \"setup-autogenerate-select-type-evaluators\": {\n evaluatorsFrom:\n | \"all\"\n | \"only_evaluators\"\n | \"only_from_case_logs\"\n | UndefinedNull;\n targetsFrom:\n | \"all\"\n | \"only_evaluators\"\n | \"only_from_case_logs\"\n | UndefinedNull;\n };\n \"setup-autogenerate-select-criterias\": {\n cohorts: PayloadObject[];\n programs: PayloadObject[];\n institutions: PayloadObject[];\n rotations: PayloadObject[];\n };\n //Flexible: Based On specific date\n \"setup-flexible-select-type\": {\n multipleAnswers: boolean;\n type:\n | \"UserEvaluations\"\n | \"InstitutionEvaluations\"\n | \"CompanyEvaluations\"\n | \"CustomEvaluations\"\n | UndefinedNull;\n };\n \"setup-flexible-select-evaluators\": {\n evaluators: PayloadObject[];\n evaluatorsRole:\n | \"Students\"\n | \"Preceptors\"\n | \"CompanyAdministrators\"\n | \"InstitutionAdministrators\"\n | UndefinedNull;\n };\n \"setup-flexible-select-targets\": {\n targets: PayloadObject[];\n targetsRole:\n | \"Students\"\n | \"Preceptors\"\n | \"CompanyAdministrators\"\n | \"InstitutionAdministrators\"\n | UndefinedNull;\n };\n //Last Steps: (Shared Autogenerate & Flexible)\n \"setup-template-reminders\": {\n evaluationTemplateId: string | UndefinedNull;\n reminderMessageBeforeOpen: string | UndefinedNull;\n daysBeforeOpenToSendReminder: number | UndefinedNull;\n reminderMessageBeforeClose: string | UndefinedNull;\n daysBeforeCloseToSendReminder: number | UndefinedNull;\n };\n \"setup-name-description-date-options\": {\n isActive: boolean;\n name: string | UndefinedNull;\n description: string | UndefinedNull;\n options: {\n openDaysBefore: number | UndefinedNull;\n keepEvaluationsOpen: number | UndefinedNull;\n period: \"date_range\" | \"every_week_day\" | \"every_month\";\n from: string | UndefinedNull;\n to: string | UndefinedNull;\n every: string | UndefinedNull;\n };\n };\n};\nexport type StateEvaluationsSchedulersTabs = {\n panes: Array<{\n menuItem: string;\n name: EvaluationsTypes;\n }>;\n selected: number;\n};\ntype State = {\n lastFetching: Date | UndefinedNull;\n evaluationsSchedulersTabs: StateEvaluationsSchedulersTabs;\n evaluationScheduler: PayloadObject | UndefinedNull;\n evaluationSchedulerId: string | UndefinedNull;\n evaluationsSchedulers: {\n UserEvaluations: PayloadObject[];\n InstitutionEvaluations: PayloadObject[];\n CompanyEvaluations: PayloadObject[];\n CustomEvaluations: PayloadObject[];\n };\n evaluationsSchedulersCreate: StateEvaluationsSchedulersCreate;\n};\ntype EvaluationsSchedulersActionReducers = Action<\n string,\n {\n evaluationScheduler: State[\"evaluationScheduler\"];\n evaluationSchedulerId: State[\"evaluationSchedulerId\"];\n evaluationSchedulers: State[\"evaluationsSchedulers\"];\n data: StateEvaluationsSchedulersCreate;\n selected: State[\"evaluationsSchedulersTabs\"][\"selected\"];\n }\n>;\n// Evaluations Schedulers Reducer\nexport const initialStateEvaluationsSchedulersCreate: StateEvaluationsSchedulersCreate =\n {\n stepCreateEvaluationsSchedulers: \"select-evaluation-schedulers\",\n \"select-evaluation-schedulers\": {\n triggeringCriteria: null,\n },\n \"setup-autogenerate-select-type\": {\n multipleAnswers: false,\n type: null,\n evaluatorsRole: null,\n targetsRole: null,\n targets: [],\n },\n \"setup-autogenerate-select-type-evaluators\": {\n evaluatorsFrom: null,\n targetsFrom: null,\n },\n \"setup-autogenerate-select-criterias\": {\n cohorts: [],\n programs: [],\n institutions: [],\n rotations: [],\n },\n \"setup-flexible-select-type\": {\n multipleAnswers: false,\n type: null,\n },\n \"setup-flexible-select-evaluators\": {\n evaluators: [],\n evaluatorsRole: null,\n },\n \"setup-flexible-select-targets\": {\n targets: [],\n targetsRole: null,\n },\n \"setup-template-reminders\": {\n evaluationTemplateId: null,\n reminderMessageBeforeOpen: null,\n daysBeforeOpenToSendReminder: null,\n reminderMessageBeforeClose: null,\n daysBeforeCloseToSendReminder: null,\n },\n \"setup-name-description-date-options\": {\n isActive: true,\n name: null,\n description: null,\n options: {\n openDaysBefore: null,\n keepEvaluationsOpen: null,\n period: \"date_range\",\n from: null,\n to: null,\n every: null,\n },\n },\n };\nconst initialStateEvaluationsSchedulersTabs: StateEvaluationsSchedulersTabs = {\n panes: [\n { menuItem: \"User Evaluations\", name: \"UserEvaluations\" },\n { menuItem: \"Clinic Evaluations\", name: \"InstitutionEvaluations\" },\n { menuItem: \"School Evaluations\", name: \"CompanyEvaluations\" },\n { menuItem: \"Custom Evaluations\", name: \"CustomEvaluations\" },\n ],\n selected: 0,\n};\nconst initialState: State = {\n lastFetching: null,\n evaluationsSchedulersTabs: initialStateEvaluationsSchedulersTabs,\n evaluationScheduler: null,\n evaluationSchedulerId: null,\n evaluationsSchedulers: {\n UserEvaluations: [],\n InstitutionEvaluations: [],\n CompanyEvaluations: [],\n CustomEvaluations: [],\n },\n evaluationsSchedulersCreate: initialStateEvaluationsSchedulersCreate,\n};\nconst evaluationsSchedulers: (\n state: State,\n action: EvaluationsSchedulersActionReducers\n) => State = produce(\n (draft: State, action: EvaluationsSchedulersActionReducers) => {\n switch (action.type) {\n case EvaluationsSchedulers.EVALUATIONS_SCHEDULERS_SET_TAB_SELECTED:\n draft.evaluationsSchedulersTabs.selected = action.payload.selected;\n break;\n case EvaluationsSchedulers.EVALUATIONS_SCHEDULERS_FETCH_EVALUATIONS_SCHEDULERS_SUCCESS:\n draft.lastFetching = new Date();\n draft.evaluationsSchedulers = action.payload.evaluationSchedulers;\n break;\n case EvaluationsSchedulers.EVALUATIONS_SCHEDULERS_SET_EVALUATION_SCHEDULER_ID:\n draft.evaluationSchedulerId = action.payload.evaluationSchedulerId;\n break;\n case EvaluationsSchedulers.EVALUATIONS_SCHEDULERS_FETCH_EVALUATION_SCHEDULER_SUCCESS:\n case EvaluationsSchedulers.EVALUATIONS_SCHEDULERS_EDIT_SUCCESS:\n draft.evaluationScheduler = action.payload.evaluationScheduler;\n break;\n case EvaluationsSchedulers.EVALUATIONS_SCHEDULERS_DELETE_SUCCESS:\n const tabEvSchedSelected =\n draft.evaluationsSchedulersTabs.panes[\n draft.evaluationsSchedulersTabs.selected\n ][\"name\"];\n const newEvaluationsSchedulers = {\n ...draft.evaluationsSchedulers,\n [tabEvSchedSelected]: draft.evaluationsSchedulers[\n tabEvSchedSelected\n ].filter(({ _id }) => _id !== action.payload.evaluationSchedulerId),\n };\n draft.lastFetching = new Date();\n draft.evaluationsSchedulers = newEvaluationsSchedulers;\n break;\n case EvaluationsSchedulers.EVALUATIONS_SCHEDULERS_RESET_EVALUATION_SCHEDULERS_LOADED:\n case EvaluationsTemplates.EVALUATIONS_TEMPLATES_RESET_EVALUATION_TEMPLATE_LOADED:\n draft.evaluationSchedulerId = initialState.evaluationSchedulerId;\n draft.evaluationsSchedulersCreate =\n initialState.evaluationsSchedulersCreate;\n break;\n // Evaluation Schedulers Create or Update:\n case EvaluationsSchedulers.EVALUATIONS_SCHEDULERS_CREATE_SUCCESS:\n draft.lastFetching = null;\n break;\n case EvaluationsSchedulers.EVALUATIONS_SCHEDULERS_EVALUATION_CREATE_UPDATE_STEP:\n draft.evaluationsSchedulersCreate = {\n ...draft.evaluationsSchedulersCreate,\n ...action.payload.data,\n };\n break;\n case EvaluationsSchedulers.EVALUATIONS_SCHEDULERS_EVALUATION_CREATE_RESET:\n draft.evaluationsSchedulersCreate =\n initialStateEvaluationsSchedulersCreate;\n break;\n }\n },\n initialState\n);\nexport default evaluationsSchedulers;\n","import { EvaluationsTemplates } from \"../actions/\";\n// Types\nimport type { PayloadObject, UndefinedNull } from \"../../types/common.types\";\n\n// Evaluations Templates Reducer\ntype StateOptionHeader = {\n id: string;\n type: \"header\";\n header: string | UndefinedNull;\n};\ntype StateSingleMultipleChoice = {\n id: string;\n header: string | UndefinedNull;\n content: string | UndefinedNull;\n notify: boolean;\n commentsRequired: boolean;\n selected: boolean;\n optionComments: string | UndefinedNull;\n tags: string[];\n};\ntype StateOptionSingleChoice = {\n id: string;\n type: \"singleChoice\";\n isColorized: boolean;\n isRequired: boolean;\n allowComments: boolean;\n allowDescription: boolean;\n style: \"dropdown\" | \"normal\";\n header: string | UndefinedNull;\n description: string | UndefinedNull;\n options: Array;\n comments: string | UndefinedNull;\n};\ntype StateOptionMultipleChoice = {\n id: string;\n type: \"multipleChoice\";\n isRequired: boolean;\n allowComments: boolean;\n allowDescription: boolean;\n header: string | UndefinedNull;\n description: string | UndefinedNull;\n options: Array;\n comments: string | UndefinedNull;\n};\ntype StateOptionQuestion = {\n id: string;\n type: \"question\";\n isRequired: boolean;\n question: string | UndefinedNull;\n answer: string | UndefinedNull;\n notify: boolean;\n tags: string[];\n};\ntype StateOptionRange = {\n id: string;\n type: \"range\";\n isRequired: boolean;\n allowComments: boolean;\n header: string | UndefinedNull;\n min: number | UndefinedNull;\n max: number | UndefinedNull;\n value: string | UndefinedNull;\n comments: string | UndefinedNull;\n tags: string[];\n};\ntype StateFormOptions =\n | StateOptionHeader\n | StateOptionSingleChoice\n | StateOptionMultipleChoice\n | StateOptionQuestion\n | StateOptionRange;\nexport type State = {\n lastFetching: Date | UndefinedNull;\n template: PayloadObject | UndefinedNull;\n evaluationTemplateId: string | UndefinedNull;\n templates: PayloadObject[];\n formOptions: Array;\n};\ntype Action = {\n type: string;\n payload: PayloadObject;\n};\nconst initialState: State = {\n lastFetching: null,\n template: null,\n evaluationTemplateId: null,\n templates: [],\n formOptions: [],\n};\n\nexport default function evaluationsTemplates(\n state: State = initialState,\n action: Action\n): State {\n switch (action.type) {\n case EvaluationsTemplates.EVALUATIONS_TEMPLATES_FETCH_FORMS_SUCCESS:\n return Object.assign({}, state, {\n lastFetching: new Date(),\n templates: action.payload.evaluationTemplates,\n });\n case EvaluationsTemplates.EVALUATIONS_TEMPLATES_CREATE_SUCCESS:\n return Object.assign({}, state, {\n lastFetching: new Date(),\n templates: [action.payload.evaluationTemplate, ...state.templates],\n template: action.payload.evaluationTemplate,\n formOptions: [],\n });\n case EvaluationsTemplates.EVALUATIONS_TEMPLATES_SET_EVALUATION_TEMPLATE_ID:\n return Object.assign({}, state, {\n evaluationTemplateId: action.payload.evaluationTemplateId,\n });\n case EvaluationsTemplates.EVALUATIONS_TEMPLATES_FETCH_FORM_SUCCESS:\n case EvaluationsTemplates.EVALUATIONS_TEMPLATES_EDIT_SUCCESS:\n return Object.assign({}, state, {\n template: action.payload.evaluationTemplate,\n formOptions: action.payload.evaluationTemplate.form,\n });\n case EvaluationsTemplates.EVALUATIONS_TEMPLATES_DELETE_SUCCESS:\n return Object.assign({}, state, {\n lastFetching: new Date(),\n templates: state.templates.filter(\n ({ _id }) => _id !== action.payload.evaluationTemplateId\n ),\n });\n case EvaluationsTemplates.EVALUATIONS_TEMPLATES_RESET_EVALUATION_TEMPLATE_LOADED:\n return Object.assign({}, state, {\n ...initialState,\n lastFetching: state.lastFetching,\n templates: state.templates,\n });\n // Actions for edit form templates:\n case EvaluationsTemplates.EVALUATIONS_TEMPLATES_FORM_OPTIONS_ADD:\n return Object.assign({}, state, {\n formOptions: [...state.formOptions, action.payload.newFormOption],\n });\n case EvaluationsTemplates.EVALUATIONS_TEMPLATES_FORM_OPTIONS_UPDATE:\n return Object.assign({}, state, {\n formOptions: action.payload.newFormOptions,\n });\n // same state (not change)\n default:\n return state;\n }\n}\n","// Features\nimport produce from \"immer\";\nimport { FeedbackForm } from \"../actions\";\n// Types\nimport type { Action } from \"deox\";\ntype FeedbackFormActionReducers = Action;\nexport type State = {\n openCloseFeedbackForm: boolean;\n};\n// Feedback Form Reducer\nconst initialState: State = {\n openCloseFeedbackForm: false,\n};\nconst feedbackForm: (\n state: State,\n action: FeedbackFormActionReducers\n) => State = produce((draft: State, action: FeedbackFormActionReducers) => {\n switch (action.type) {\n case FeedbackForm.FEEDBACK_FORM_OPEN_CLOSE:\n draft.openCloseFeedbackForm = !draft.openCloseFeedbackForm;\n break;\n }\n}, initialState);\nexport default feedbackForm;\n","// Import Features\nimport { FileCategories } from \"../actions/\";\nimport { updateArrayWithElement } from \"../../utils/\";\n// FileCategories Reducer\ntype State = {\n fileCategories: object[];\n};\ntype Action = {\n type: string;\n payload: Object;\n};\n\nconst initialState: State = {\n fileCategories: [],\n};\n\nexport default function fileCategories(\n state: State = initialState,\n action: Action\n): State {\n switch (action.type) {\n //FileCategories\n case FileCategories.FILE_CATEGORIES_FETCH_FILE_CATEGORIES_SUCCESS:\n return Object.assign({}, state, {\n fileCategories: action.payload.fileCategories,\n });\n case FileCategories.FILE_CATEGORIES_CREATE_SUCCESS:\n return Object.assign({}, state, {\n fileCategories: [...state.fileCategories, action.payload.fileCategory],\n });\n case FileCategories.FILE_CATEGORIES_EDIT_SUCCESS:\n return Object.assign({}, state, {\n fileCategories: updateArrayWithElement(\n state.fileCategories,\n action.payload.fileCategory\n ),\n });\n case FileCategories.FILE_CATEGORIES_DELETE_SUCCESS:\n return Object.assign({}, state, {\n fileCategories: state.fileCategories.filter(\n ({ _id }) => _id !== action.payload.fileCategoryId\n ),\n });\n // same state (not change)\n default:\n return state;\n }\n}\n","import { GuideLineTutorial } from \"../actions/\";\n// Import Types\nimport type { Action } from \"../../types/common.types\";\nimport type { StateGuideLineTutorial as State } from \"../../types/guideLineTutorial.types\";\n// Guide Line Tutorial Reducer\nconst intialStateJoyrideProps = {\n run: false,\n steps: [],\n};\nconst initialState: State = {\n joyrideProps: intialStateJoyrideProps,\n sectionRunning: null,\n sections: [\n GuideLineTutorial.GUIDE_LINE_TUTORIAL_MENU,\n GuideLineTutorial.GUIDE_LINE_TUTORIAL_HOME,\n GuideLineTutorial.GUIDE_LINE_TUTORIAL_USER_MANAGER,\n GuideLineTutorial.GUIDE_LINE_TUTORIAL_USER_MANAGER_INVITATIONS,\n GuideLineTutorial.GUIDE_LINE_TUTORIAL_INSTITUTIONS,\n GuideLineTutorial.GUIDE_LINE_TUTORIAL_ROTATIONS,\n GuideLineTutorial.GUIDE_LINE_TUTORIAL_ROTATIONS_CREATE,\n GuideLineTutorial.GUIDE_LINE_TUTORIAL_CASE_LOGS,\n GuideLineTutorial.GUIDE_LINE_TUTORIAL_EVALUATIONS,\n GuideLineTutorial.GUIDE_LINE_TUTORIAL_ACCOUNT_SETTINGS,\n ],\n sectionsCompleted: [],\n};\nexport default function guideLineTutorial(\n state: State = initialState,\n action: Action\n): State {\n let newState = {};\n switch (action.type) {\n //GuideLineTutorial\n case GuideLineTutorial.GUIDE_LINE_TUTORIAL_INITIALIZE:\n newState = {\n ...state,\n sectionsCompleted: action.payload.sectionsCompleted,\n };\n if (newState.sections.length === newState.sectionsCompleted.length) {\n newState = {\n ...initialState,\n sectionsCompleted: action.payload.sectionsCompleted,\n };\n }\n return newState;\n case GuideLineTutorial.GUIDE_LINE_TUTORIAL_START:\n return Object.assign({}, state, {\n joyrideProps: action.payload.joyrideProps,\n sectionRunning: action.payload.sectionRunning,\n });\n case GuideLineTutorial.GUIDE_LINE_TUTORIAL_STOP:\n if (\n state.sectionRunning &&\n state.sectionRunning !== GuideLineTutorial.GUIDE_LINE_TUTORIAL_MENU\n ) {\n return Object.assign({}, state, {\n joyrideProps: intialStateJoyrideProps,\n sectionRunning: null,\n });\n } else {\n return state;\n }\n case GuideLineTutorial.GUIDE_LINE_TUTORIAL_PAUSE:\n if (\n state.sectionRunning &&\n state.sectionRunning !== GuideLineTutorial.GUIDE_LINE_TUTORIAL_MENU\n ) {\n return Object.assign({}, state, {\n joyrideProps: {\n ...state.joyrideProps,\n run: false,\n },\n });\n } else {\n return state;\n }\n case GuideLineTutorial.GUIDE_LINE_TUTORIAL_PLAY:\n if (\n state.sectionRunning &&\n state.sectionRunning !== GuideLineTutorial.GUIDE_LINE_TUTORIAL_MENU\n ) {\n return Object.assign({}, state, {\n joyrideProps: {\n ...state.joyrideProps,\n run: true,\n },\n });\n } else {\n return state;\n }\n case GuideLineTutorial.GUIDE_LINE_TUTORIAL_NEXT:\n return Object.assign({}, state, {\n joyrideProps: {\n ...state.joyrideProps,\n stepIndex: state.joyrideProps.stepIndex + 1,\n },\n });\n case GuideLineTutorial.GUIDE_LINE_TUTORIAL_PREV:\n return Object.assign({}, state, {\n joyrideProps: {\n ...state.joyrideProps,\n stepIndex: state.joyrideProps.stepIndex - 1,\n },\n });\n case GuideLineTutorial.GUIDE_LINE_TUTORIAL_COMPLETED:\n newState = {\n joyrideProps: intialStateJoyrideProps,\n sectionRunning: null,\n };\n if (state.sectionRunning) {\n newState = {\n ...newState,\n sectionsCompleted: [state.sectionRunning, ...state.sectionsCompleted],\n };\n }\n return Object.assign({}, state, newState);\n // same state (not change)\n default:\n return state;\n }\n}\n","// Import Features\nimport produce from \"immer\";\nimport { ImportData } from \"../actions\";\nimport { getCurrentTimeInMs } from \"../../utils/\";\n// Types\nimport type { Action } from \"deox\";\nimport type {\n StateImportData as State,\n TypeImportData,\n} from \"../../types/importData.types\";\ntype ImportDataActionReducers = Action<\n string,\n {\n importData: State[\"imports\"][\n | \"users\"\n | \"rotations\"\n | \"tenantSettings\"][\"data\"];\n importDataType: \"users\" | \"rotations\" | \"tenantSettings\";\n hasErrors: State[\"importDataNotification\"][\"hasErrors\"];\n typeImport: TypeImportData;\n }\n>;\n// Import Data: (Users or rotations)\nconst initialStateImport = {\n data: [],\n lastFetching: 0,\n};\nconst initialState: State = {\n imports: {\n users: initialStateImport,\n rotations: initialStateImport,\n tenantSettings: initialStateImport,\n },\n importDataNotification: {\n toShow: false,\n hasErrors: false,\n typeImport: \"\",\n },\n};\nconst importData: (state: State, action: ImportDataActionReducers) => State =\n produce((draft: State, action: ImportDataActionReducers) => {\n switch (action.type) {\n case ImportData.IMPORT_DATA_FETCH_SUCCESS:\n draft.imports[action.payload.importDataType].data =\n action.payload.importData;\n draft.imports[action.payload.importDataType].lastFetching =\n getCurrentTimeInMs();\n break;\n case ImportData.IMPORT_DATA_SHOW_NOTIFICATION:\n draft.importDataNotification.toShow = true;\n draft.importDataNotification.hasErrors = action.payload.hasErrors;\n draft.importDataNotification.typeImport = action.payload.typeImport;\n draft.imports.users.lastFetching = 0;\n draft.imports.rotations.lastFetching = 0;\n draft.imports.tenantSettings.lastFetching = 0;\n break;\n case ImportData.IMPORT_DATA_HIDE_NOTIFICATION:\n draft.importDataNotification.toShow = false;\n draft.importDataNotification.hasErrors = false;\n draft.importDataNotification.typeImport = \"\";\n }\n }, initialState);\nexport default importData;\n","// Features\nimport produce from \"immer\";\nimport { Institutions, Files } from \"../actions/\";\n// Types\nimport type { Action } from \"deox\";\nimport type { PayloadObject, UndefinedNull } from \"../../types/common.types\";\nexport type State = {\n lastFetching: Date | UndefinedNull;\n isFetchingInstitutions: boolean;\n institutionId: string | UndefinedNull;\n institution: PayloadObject | UndefinedNull;\n institutionFiles: PayloadObject[];\n institutionFilesExpired: PayloadObject[];\n institutions: PayloadObject[];\n hasInstitutionCustomFieldsRequiredNull: PayloadObject | UndefinedNull;\n};\ntype InstitutionsActionReducers = Action<\n string,\n {\n files: State[\"institutionFiles\"];\n filesExpired: State[\"institutionFilesExpired\"];\n institution: NonNullable;\n institutionId: NonNullable;\n institutions: State[\"institutions\"];\n hasInstitutionCustomFieldsRequiredNull: NonNullable<\n State[\"hasInstitutionCustomFieldsRequiredNull\"]\n >;\n }\n>;\n// Institutions Reducer\nconst initialState: State = {\n lastFetching: null,\n isFetchingInstitutions: false,\n institutionId: null,\n institution: null,\n institutionFiles: [],\n institutionFilesExpired: [],\n institutions: [],\n hasInstitutionCustomFieldsRequiredNull: null,\n};\nconst institutions: (\n state: State,\n action: InstitutionsActionReducers\n) => State = produce((draft: State, action: InstitutionsActionReducers) => {\n switch (action.type) {\n case Institutions.INSTITUTIONS_FETCH_INSTITUTIONS:\n draft.isFetchingInstitutions = true;\n break;\n case Institutions.INSTITUTIONS_FETCH_INSTITUTIONS_SUCCESS:\n draft.lastFetching = new Date();\n draft.isFetchingInstitutions = false;\n draft.institutions = action.payload.institutions;\n break;\n case Institutions.INSTITUTIONS_FETCH_INSTITUTIONS_FAILURE:\n draft.isFetchingInstitutions = false;\n break;\n case Institutions.INSTITUTIONS_SET_INSTITUTION_ID:\n draft.institutionId = action.payload.institutionId;\n break;\n case Institutions.INSTITUTIONS_UNSET_INSTITUTION_ID:\n draft.institutionId = initialState.institutionId;\n draft.institution = initialState.institution;\n draft.hasInstitutionCustomFieldsRequiredNull =\n initialState.hasInstitutionCustomFieldsRequiredNull;\n draft.institutionFiles = initialState.institutionFiles;\n draft.institutionFilesExpired = initialState.institutionFilesExpired;\n break;\n case Institutions.INSTITUTIONS_FETCH_INSTITUTION_SUCCESS:\n case Institutions.INSTITUTIONS_EDIT_INSTITUTION_SUCCESS:\n if (\n draft.institutionId &&\n draft.institutionId === action.payload.institution?._id\n ) {\n draft.institution = action.payload.institution;\n draft.hasInstitutionCustomFieldsRequiredNull =\n action.payload.hasInstitutionCustomFieldsRequiredNull;\n }\n break;\n case Institutions.INSTITUTIONS_CREATE_SUCCESS:\n draft.lastFetching = new Date();\n draft.institutions = [action.payload.institution, ...draft.institutions];\n break;\n case Institutions.INSTITUTIONS_FETCH_INSTITUTION_FILES_SUCCESS:\n case Files.FILES_EDIT_SUCCESS:\n case Files.FILES_DELETE_SUCCESS:\n draft.institutionFiles = action.payload.files;\n break;\n case Institutions.INSTITUTIONS_FETCH_INSTITUTION_FILES_EXPIRED_SUCCESS:\n draft.institutionFilesExpired = action.payload.filesExpired;\n break;\n }\n}, initialState);\nexport default institutions;\n","import { Invitations } from \"../actions/\";\n\n// Invitations Reducer\ntype State = {\n lastFetching: Date | undefined | null;\n invitations:\n | {\n User: object[];\n }\n | undefined\n | null;\n};\ntype Action = {\n type: string;\n payload: Object;\n};\nconst initialState: State = {\n lastFetching: null,\n invitations: null,\n};\n\nexport default function invitations(\n state: State = initialState,\n action: Action\n): State {\n switch (action.type) {\n case Invitations.INVITATIONS_FETCH_INVITATIONS_SUCCESS:\n return Object.assign({}, state, {\n lastFetching: new Date(),\n invitations: action.payload.invitations,\n });\n case Invitations.INVITATIONS_DELETE_SUCCESS:\n if (state.invitations) {\n const deletedInvitationRoleSelected = state.invitations[\n action.payload.roleSelected\n ].filter(({ _id }) => _id !== action.payload.invitationId);\n let newStateInvitations = {\n ...state.invitations,\n [action.payload.roleSelected]: deletedInvitationRoleSelected,\n };\n if (deletedInvitationRoleSelected.length === 0) {\n delete newStateInvitations[action.payload.roleSelected];\n }\n return Object.assign({}, state, {\n lastFetching: new Date(),\n invitations: newStateInvitations,\n });\n }\n return state;\n case Invitations.INVITATIONS_RESET_INVITATION_LOADED:\n return Object.assign({}, state, {\n lastFetching: new Date(),\n invitations: state.invitations,\n });\n // same state (not change)\n default:\n return state;\n }\n}\n","import { LocalStoreActions } from \"../actions/\";\nimport { LocalStore } from \"../../utils/local-storage/localStore\";\n// LocalStore reducer\n\n// The initial application state\ntype State = {\n numKeys: number;\n keys: Array;\n localstore:\n | {\n [key: string]: string;\n }\n | undefined\n | null;\n};\ntype Action = {\n type: string;\n payload: Object;\n};\n\nlet initialState = {\n numKeys: 0,\n keys: [],\n localstore: null,\n};\n\nexport default function localStore(\n state: State = initialState,\n action: Action\n): State {\n switch (action.type) {\n case LocalStoreActions.LOCALSTORE_SAVE:\n const { key, value } = action.payload;\n const keyStringify = LocalStore.Save(key, value);\n return Object.assign({}, state, {\n numKeys:\n state.keys.indexOf(key) === -1\n ? state.keys.length + 1\n : state.numKeys,\n keys:\n state.keys.indexOf(key) === -1 ? [...state.keys, key] : state.keys,\n localstore: {\n ...state.localstore,\n [key]: keyStringify,\n },\n });\n case LocalStoreActions.LOCALSTORE_CLEAR_ALL:\n LocalStore.ClearAll();\n return initialState;\n // same state (not change)\n default:\n return state;\n }\n}\n","import { Metrics } from \"../actions/\";\n\n// Metrics and Queries Reducer\ntype State = {\n pageId: string | undefined | null;\n metricPage: object | undefined | null;\n metricsPages: object[];\n chartId: string | undefined | null;\n chart: object | undefined | null;\n charts: object[];\n};\ntype Action = {\n type: string;\n payload: Object;\n};\nconst initialState: State = {\n pageId: null,\n metricPage: null,\n metricsPages: [],\n chartId: null,\n chart: null,\n charts: [],\n};\n\nexport default function charts(\n state: State = initialState,\n action: Action\n): State {\n switch (action.type) {\n // METRICS PAGES\n case Metrics.METRICS_FETCH_METRICS_PAGES_SUCCESS:\n return Object.assign({}, state, {\n metricsPages: action.payload.pages,\n chartId: null,\n chart: null,\n charts: [],\n });\n case Metrics.METRICS_CREATE_METRIC_PAGE_SUCCESS:\n return Object.assign({}, state, {\n pageId: action.payload.page._id,\n metricPage: action.payload.page,\n metricsPages: [...state.metricsPages, action.payload.page],\n });\n case Metrics.METRICS_SET_PAGE_ID:\n return Object.assign({}, state, {\n pageId: action.payload.pageId,\n chartId: null,\n chart: null,\n charts: [],\n });\n case Metrics.METRICS_FETCH_METRIC_PAGE_SUCCESS:\n return Object.assign({}, state, {\n metricPage: action.payload.page,\n chartId: null,\n chart: null,\n charts: [],\n });\n case Metrics.METRICS_EDIT_METRIC_PAGE_SUCCESS:\n return Object.assign({}, state, {\n metricPage: action.payload.page,\n metricsPages: state.metricsPages.map((page) =>\n page._id !== action.payload.page._id ? page : action.payload.page\n ),\n });\n case Metrics.METRICS_DELETE_METRIC_PAGE_SUCCESS:\n return Object.assign({}, state, {\n metricsPages: state.metricsPages.filter(\n ({ _id }) => _id !== action.payload.pageId\n ),\n pageId:\n state.metricsPages.length > 0 ? state.metricsPages[0]._id : null,\n charts: [],\n });\n // METRICS PAGES - CHARTS\n case Metrics.METRICS_FETCH_METRIC_PAGE_CHARTS_SUCCESS:\n return Object.assign({}, state, {\n charts: action.payload.charts,\n });\n case Metrics.METRICS_CREATE_METRIC_PAGE_CHART_SUCCESS:\n return Object.assign({}, state, {\n chart: action.payload.chart,\n charts: [...state.charts, action.payload.chart],\n });\n case Metrics.METRICS_SET_CHART_ID:\n return Object.assign({}, state, {\n chartId: action.payload.chartId,\n });\n case Metrics.METRICS_FETCH_METRIC_PAGE_CHART_SUCCESS:\n case Metrics.METRICS_EDIT_METRIC_PAGE_CHART_SUCCESS:\n return Object.assign({}, state, {\n chart: action.payload.chart,\n });\n case Metrics.METRICS_DELETE_METRIC_PAGE_CHART_SUCCESS:\n return Object.assign({}, state, {\n charts: state.charts.filter(\n ({ _id }) => _id !== action.payload.chartId\n ),\n });\n // same state (not change)\n default:\n return state;\n }\n}\n","// Services to manage all socket methods into app\nimport io from \"socket.io-client\";\nimport { ImportData, Notifications, Reports } from \"../../store/actions/\";\n// Types\nimport type { StateImportData as State } from \"../../types/importData.types\";\n// Private properties (problem with memory leak, we'll finder another solution)\n// variables:\nlet _: Object = new WeakMap();\n\nconst bindActions = (dispatch) => {\n return {\n registerSocket: (uri) =>\n dispatch(\n Notifications.notificationsRegisterSocket({\n uri,\n dispatch,\n })\n ),\n setConnectionIdSuccess: (payload) =>\n dispatch(\n Notifications.notificationsSetSocketConnectionIdSuccess(payload)\n ),\n setConnectionIdFailure: (payload) =>\n dispatch(Notifications.notificationsSetSocketConnectionIdFailure()),\n addNotification: (payload) =>\n dispatch(Notifications.notificationsSocketAddNotification(payload)),\n disconnectSocket: (payload) =>\n dispatch(Notifications.notificationsDisconnectSocket(payload)),\n // IMPORT DATA (USERS | ROTATIONS)\n showImportDataNotification: (\n typeImport: State[\"importDataNotification\"][\"typeImport\"],\n hasErrors: State[\"importDataNotification\"][\"hasErrors\"] = false\n ) =>\n dispatch(\n ImportData.importDataShowNotification({\n toShow: true,\n hasErrors,\n typeImport,\n })\n ),\n //REPORTS\n getReports: (payload) => dispatch(Reports.reportsFetchReports(payload)),\n showReportWarning: () =>\n dispatch(\n Reports.reportsQueriesShowReportWarning({\n hasToShowReportsWarning: true,\n })\n ),\n };\n};\n\nconst _listeners = (\n socketService: Object,\n userId: string,\n socketConnectionId: string\n) => {\n const { socket, actions, uri } = _.get(socketService);\n const {\n registerSocket,\n setConnectionIdSuccess,\n setConnectionIdFailure,\n addNotification,\n } = actions;\n //Connect\n socket.on(\"connect\", () => {\n socket.emit(\"register\", userId, socketConnectionId);\n _.set(socketService, { socket, actions, uri, connectedSocket: true });\n window.logger.log(\"SocketService - Connected\", new Date().toLocaleString());\n });\n //My notifications\n socket.on(\"message\", (notification: Object | string) => {\n if (typeof notification === \"object\") {\n const { type = \"\" } = notification || {};\n if (type === \"success\") {\n setConnectionIdSuccess({ socket: socketService });\n } else if (type === \"error\") {\n setConnectionIdFailure();\n socketService.disconnect();\n } else {\n addNotification({ notification });\n socketService.dispatchAction(notification);\n }\n }\n window.logger.log(\"SocketService - Notification: \", notification);\n });\n //Reconnect\n socket.on(\"reconnect_attempt\", (attemptNumber: number) => {\n window.logger.log(\n \"SocketService - reconnect_attempt: \",\n attemptNumber,\n new Date().toLocaleString()\n );\n });\n socket.on(\"reconnect\", (attemptNumber: number) => {\n registerSocket(uri);\n window.logger.log(\n \"SocketService - reconnect: \",\n attemptNumber,\n new Date().toLocaleString()\n );\n });\n //Errors\n socket.on(\"connect_error\", (error) => {\n setConnectionIdFailure();\n window.logger.log(\n \"SocketService - connect_error\",\n error,\n new Date().toLocaleString()\n );\n });\n socket.on(\"error\", (error) =>\n window.logger.log(\n \"SocketService - error\",\n error,\n new Date().toLocaleString()\n )\n );\n socket.on(\"disconnect\", (socketClosed) =>\n window.logger.log(\n \"SocketService - disconnect\",\n socketClosed,\n new Date().toLocaleString()\n )\n );\n};\n\nexport class SocketService {\n initSocket: boolean;\n constructor(uri: string, dispatch: (payload: any) => void) {\n _.set(this, {\n socket: null,\n actions: bindActions(dispatch),\n uri,\n connectedSocket: false,\n });\n this.initSocket = true;\n window.logger.log(\"SocketService Ready!\", new Date().toLocaleString());\n }\n\n connect(userId: string, socketConnectionId: string) {\n const { actions, uri } = _.get(this);\n _.set(this, {\n // Socket Io put their headers owner.\n // socket: io.connect(uri, {\n // reconnect: true,\n // transports: ['websocket', 'polling']\n // }),\n socket: io.connect(uri, {\n reconnectionAttempts: 5,\n transports: [\"websocket\"],\n }),\n actions,\n uri,\n });\n _listeners(this, userId, socketConnectionId);\n }\n\n dispatchAction(notification: any) {\n window.logger.log(\n \"SocketService - Action to dispatch:\",\n notification,\n new Date().toLocaleString()\n );\n const { actions } = _.get(this);\n const { getReports, showReportWarning, showImportDataNotification } =\n actions;\n const { action } = notification;\n switch (action) {\n case \"REPORT_CREATED\":\n const callbacks = {\n callbackError: (error) => {\n window.logger.log(\n \"error - _onGettingReports: onSocketService\",\n error\n );\n },\n callbackSuccess: () => {\n window.logger.log(\"success - _onGettingReports: onSocketService\");\n },\n };\n const payload = Object.assign({}, callbacks);\n getReports(payload);\n showReportWarning();\n break;\n case \"IMPORT_CREATED\":\n showImportDataNotification(notification.metadata.import.model);\n break;\n case \"IMPORT_ERROR\":\n showImportDataNotification(notification.metadata.import.model, true);\n break;\n default:\n }\n }\n\n disconnect() {\n const { socket, actions, uri } = _.get(this);\n if (socket) {\n const { disconnectSocket } = actions;\n socket.disconnect();\n _.set(this, { socket: null, actions, uri, connectedSocket: false });\n disconnectSocket({ socket: this });\n }\n }\n}\n","// Features\nimport produce from \"immer\";\nimport { Notifications } from \"../actions/\";\nimport { SocketService } from \"../../utils/socket/serviceSocket\";\n// Types\nimport type { Action } from \"deox\";\nimport type { Dispatch } from \"redux\";\nimport type { PayloadObject, UndefinedNull } from \"../../types/common.types\";\nexport type NotificationType =\n | \"notifications\"\n | \"reminders\"\n | \"testimonial-request\";\nexport type NotificationsCategories =\n | \"ROTATIONS\"\n | \"CASE_LOGS\"\n | \"EVALUATIONS,EVALUATION_SCHEDULES\"\n | \"EVALUATION_ANSWERS\"\n | \"REPORTS\"\n | \"DOCUMENTS\"\n | \"CUSTOM_FIELDS,PERIODS,IMPORT_DATA,PORTFOLIOS\"\n | \"INSTITUTIONS\"\n | \"USERS\";\ntype StateNotifications = {\n all: PayloadObject[];\n notifications: PayloadObject[];\n reminders: PayloadObject[];\n isFetchingNotifications: boolean;\n};\nexport type State = {\n notifications: StateNotifications;\n notificationsCategories: NotificationsCategories[];\n totalNotifications: number;\n unseenNotifications: number;\n lastSeenNotificationId: string | UndefinedNull;\n socketConnectionId: string | UndefinedNull;\n socket: PayloadObject | UndefinedNull;\n};\ntype NotificationsActionReducers = Action<\n string,\n {\n dispatch: Dispatch;\n nNotificationsUpdated: number;\n notification: PayloadObject;\n notificationId: string;\n notifications: PayloadObject[];\n notificationsCategory: NotificationsCategories;\n notificationsFiltersByCategories: boolean;\n notificationType: NotificationType;\n socket: PayloadObject;\n socketConnectionId: string;\n totalNotifications: State[\"totalNotifications\"];\n unseenNotifications: State[\"unseenNotifications\"];\n uri: string;\n }\n>;\n// Notifications Reducer\nconst initialState: State = {\n notifications: {\n all: [],\n notifications: [],\n reminders: [],\n isFetchingNotifications: false,\n },\n notificationsCategories: [],\n totalNotifications: 0,\n unseenNotifications: 0,\n lastSeenNotificationId: undefined,\n socketConnectionId: undefined,\n socket: undefined,\n};\nconst filterNotifications = (\n stateNotifications: StateNotifications,\n newNotifications: PayloadObject[]\n) => {\n let currentListNotifications = [...newNotifications];\n let all = [...stateNotifications.all];\n let notifications = [...stateNotifications.notifications];\n let reminders = [...stateNotifications.reminders];\n while (currentListNotifications.length > 0) {\n let currentNotification = currentListNotifications.shift();\n if (\n currentNotification &&\n all.filter((n) => n._id === (currentNotification as PayloadObject)._id)\n .length === 0\n ) {\n all.push(currentNotification);\n if (currentNotification.notificationType === \"notifications\") {\n notifications.push(currentNotification);\n } else {\n reminders.push(currentNotification);\n }\n }\n }\n return {\n all,\n notifications,\n reminders,\n isFetchingNotifications: false,\n };\n};\nconst markAsReadNotifications = (\n stateNotifications: StateNotifications,\n notificationId?: string\n) => {\n let notifications = [...stateNotifications.notifications];\n if (notificationId) {\n notifications = notifications.map((notification) => ({\n ...notification,\n readBy:\n notificationId === notification._id\n ? [{ readAt: new Date().toISOString() }]\n : notification.readBy,\n }));\n } else {\n notifications = notifications.map((notification) => ({\n ...notification,\n readBy:\n !notification.readBy || notification.readBy?.length === 0\n ? [{ readAt: new Date().toISOString() }]\n : notification.readBy,\n }));\n }\n return {\n all: [...notifications, ...stateNotifications.reminders],\n notifications,\n reminders: stateNotifications.reminders,\n isFetchingNotifications: false,\n };\n};\nconst deleteNotifications = (\n stateNotifications: StateNotifications,\n notificationId?: string\n) => {\n let notifications: StateNotifications[\"notifications\"] = [];\n if (notificationId) {\n notifications = stateNotifications.all.filter(\n (notification) => notification._id !== notificationId\n );\n }\n return {\n all: [...notifications, ...stateNotifications.reminders],\n notifications,\n reminders: stateNotifications.reminders,\n isFetchingNotifications: false,\n };\n};\nconst notifications: (\n state: State,\n action: NotificationsActionReducers\n) => State = produce((draft: State, action: NotificationsActionReducers) => {\n switch (action.type) {\n // SOCKET\n case Notifications.NOTIFICATIONS_REGISTER_SOCKET:\n draft.socket = new SocketService(\n action.payload.uri,\n action.payload.dispatch\n );\n break;\n case Notifications.NOTIFICATIONS_REGISTER_SOCKET_SUCCESS:\n draft.socketConnectionId = action.payload.socketConnectionId;\n break;\n case Notifications.NOTIFICATIONS_SET_SOCKET_CONNECTION_ID_SUCCESS:\n case Notifications.NOTIFICATIONS_DISCONNECT_SOCKET:\n draft.socket = action.payload.socket;\n break;\n case Notifications.NOTIFICATIONS_SOCKET_ADD_NOTIFICATION:\n // draft.notifications.all = [\n // action.payload.notification,\n // ...draft.notifications.all,\n // ];\n // draft.notifications[\n // action.payload.notification.notificationType as Exclude<\n // NotificationType,\n // \"testimonial-request\"\n // >\n // ] = [\n // action.payload.notification,\n // ...draft.notifications[\n // action.payload.notification.notificationType as Exclude<\n // NotificationType,\n // \"testimonial-request\"\n // >\n // ],\n // ];\n // draft.totalNotifications += 1;\n // draft.unseenNotifications += 1;\n break;\n // NOTIFICATIONS\n case Notifications.NOTIFICATIONS_FETCH_NOTIFICATIONS_REQUEST:\n if (action.payload.notificationsFiltersByCategories) {\n draft.notifications = {\n ...initialState.notifications,\n isFetchingNotifications: true,\n };\n } else {\n draft.notifications.isFetchingNotifications = true;\n }\n break;\n case Notifications.NOTIFICATIONS_FETCH_NOTIFICATIONS_SUCCESS:\n draft.notifications = filterNotifications(\n draft.notifications,\n action.payload.notifications\n );\n draft.totalNotifications = action.payload.totalNotifications || 0;\n draft.unseenNotifications = action.payload.unseenNotifications || 0;\n break;\n case Notifications.NOTIFICATIONS_FETCH_NOTIFICATIONS_FAILURE:\n draft.notifications.isFetchingNotifications = false;\n break;\n case Notifications.NOTIFICATIONS_SET_NOTIFICATIONS_CATEGORIES:\n if (\n draft.notificationsCategories.indexOf(\n action.payload.notificationsCategory\n ) === -1\n ) {\n draft.notificationsCategories = [\n ...draft.notificationsCategories,\n action.payload.notificationsCategory,\n ];\n } else {\n draft.notificationsCategories = draft.notificationsCategories.filter(\n (notificationsCategory) =>\n notificationsCategory !== action.payload.notificationsCategory\n );\n }\n break;\n case Notifications.NOTIFICATIONS_CLEAR_NOTIFICATIONS_CATEGORIES:\n draft.notificationsCategories = initialState.notificationsCategories;\n break;\n case Notifications.NOTIFICATIONS_MARK_AS_READ_NOTIFICATIONS_SUCCESS:\n draft.notifications = markAsReadNotifications(\n draft.notifications,\n action.payload.notificationId\n );\n draft.unseenNotifications -= action.payload.nNotificationsUpdated;\n break;\n case Notifications.NOTIFICATIONS_LAST_SEEN_NOTIFICATION_SUCCESS:\n draft.notifications = markAsReadNotifications(draft.notifications);\n draft.unseenNotifications -= action.payload.nNotificationsUpdated;\n draft.lastSeenNotificationId = action.payload.notificationId;\n break;\n case Notifications.NOTIFICATIONS_DELETE_SUCCESS:\n draft.notifications = deleteNotifications(\n draft.notifications,\n action.payload.notificationId\n );\n draft.unseenNotifications -= action.payload.nNotificationsUpdated;\n break;\n }\n}, initialState);\nexport default notifications;\n","// Features\nimport produce from \"immer\";\nimport { Periods } from \"../actions\";\nimport { updateArrayWithElement } from \"../../utils\";\n// Types\nimport type { Action } from \"deox\";\nimport type { UndefinedNull } from \"../../types/common.types\";\ntype PayloadPeriod = {\n _id?: string;\n name: string;\n createdAt?: Date;\n updatedAt?: Date;\n};\nexport type StatePeriods = {\n lastFetching: Date | UndefinedNull;\n periods: PayloadPeriod[];\n};\nexport type PeriodsActionReducers = Action<\n string,\n {\n period: PayloadPeriod;\n periodId: string;\n periods: StatePeriods[\"periods\"];\n }\n>;\n// Periods Reducer\nconst initialState: StatePeriods = {\n lastFetching: null,\n periods: [],\n};\nconst periods: (\n state: StatePeriods,\n action: PeriodsActionReducers\n) => StatePeriods = produce(\n (draft: StatePeriods, action: PeriodsActionReducers) => {\n switch (action.type) {\n case Periods.PERIODS_FETCH_ALL_SUCCESS:\n draft.lastFetching = new Date();\n draft.periods = action.payload.periods;\n break;\n case Periods.PERIODS_CREATE_SUCCESS:\n draft.lastFetching = new Date();\n draft.periods = [...draft.periods, action.payload.period];\n break;\n case Periods.PERIODS_EDIT_SUCCESS:\n draft.periods = updateArrayWithElement(\n draft.periods,\n action.payload.period\n );\n break;\n case Periods.PERIODS_DELETE_SUCCESS:\n draft.periods = draft.periods.filter(\n ({ _id }) => _id !== action.payload.periodId\n );\n break;\n }\n },\n initialState\n);\nexport default periods;\n","// Import Features\nimport { Programs } from \"../actions/\";\nimport { updateArrayWithElement } from \"../../utils/\";\nimport type { PayloadObject } from \"../../types/common.types\";\n// Programs Reducer\ntype State = {\n isFetching: boolean;\n lastFetching: Date | undefined | null;\n programs: object[];\n};\ntype Action = {\n type: string;\n payload: PayloadObject;\n};\n\nconst initialState: State = {\n isFetching: false,\n lastFetching: null,\n programs: [],\n};\n\nexport default function programs(\n state: State = initialState,\n action: Action\n): State {\n switch (action.type) {\n //Programs\n case Programs.PROGRAMS_FETCH_PROGRAMS:\n return Object.assign({}, state, {\n isFetching: true,\n });\n case Programs.PROGRAMS_FETCH_PROGRAMS_SUCCESS:\n return Object.assign({}, state, {\n isFetching: false,\n lastFetching: new Date(),\n programs: action.payload.programs,\n });\n case Programs.PROGRAMS_FETCH_PROGRAMS_FAILURE:\n return Object.assign({}, state, {\n isFetching: false,\n });\n case Programs.PROGRAMS_CREATE_SUCCESS:\n return Object.assign({}, state, {\n lastFetching: new Date(),\n programs: [...state.programs, action.payload.program],\n });\n case Programs.PROGRAMS_EDIT_PROGRAM_SUCCESS:\n return Object.assign({}, state, {\n programs: updateArrayWithElement(\n state.programs,\n action.payload.program\n ),\n });\n case Programs.PROGRAMS_DELETE_SUCCESS:\n return Object.assign({}, state, {\n lastFetching: new Date(),\n programs: state.programs.filter(\n ({ _id }: any) => _id !== action.payload.programId\n ),\n });\n // same state (not change)\n default:\n return state;\n }\n}\n","import { Router } from \"../actions/\";\n// Router Before Transitions Reducer\ntype State = {\n pathname: string;\n search: string;\n hash: string;\n state: string;\n key: string;\n};\ntype Action = {\n type: string;\n payload: State;\n};\n\nconst initialState: State = {\n pathname: \"/\",\n search: \"\",\n hash: \"\",\n state: \"\",\n key: \"\",\n};\n\nexport default function routerBeforeTransitions(\n state: State = initialState,\n action: Action\n): State {\n switch (action.type) {\n case Router.ROUTER_BEFORE_TRANSITIONS:\n return action.payload;\n // initial state\n default:\n return state;\n }\n}\n","import { RouterManager } from \"../actions/\";\n// Router Manager to save last manager route loaded Reducer\ntype StateBase = {\n pathname: string;\n search: string;\n hash: string;\n state: Object;\n key: string;\n};\ntype State = {\n before: StateBase;\n loaded: StateBase;\n};\ntype Action = {\n type: string;\n payload: State;\n};\n\nconst initialState: State = {\n before: {\n pathname: \"/manager\",\n search: \"\",\n hash: \"\",\n state: { namePage: \"Manager\" },\n key: \"\",\n },\n loaded: {\n pathname: \"/manager\",\n search: \"\",\n hash: \"\",\n state: { namePage: \"Manager\" },\n key: \"\",\n },\n};\n\nexport default function routerManager(\n state: State = initialState,\n action: Action\n): State {\n switch (action.type) {\n case RouterManager.ROUTER_MANAGER_BEFORE:\n return Object.assign({}, state, { before: action.payload.before });\n case RouterManager.ROUTER_MANAGER_LOADED:\n return Object.assign({}, state, { loaded: action.payload.loaded });\n case RouterManager.ROUTER_MANAGER_RESET:\n return initialState;\n // initial state\n default:\n return state;\n }\n}\n","// Service Worker Reducer\nimport { ServiceWorker } from \"../actions/\";\n\ntype State = {\n initServiceWorker: boolean;\n refreshButtonShow: boolean;\n};\ntype Action = {\n type: string;\n payload: Object;\n};\n\n// The initial application state\nconst initialState: State = {\n initServiceWorker: false,\n refreshButtonShow: false,\n};\n\nexport default function serviceWorker(\n state: State = initialState,\n action: Action\n): State {\n switch (action.type) {\n case ServiceWorker.SERVICE_WORKER_INIT:\n return Object.assign({}, state, { initServiceWorker: true });\n case ServiceWorker.SERVICE_WORKER_REFRESH_BUTTON_SHOW:\n return Object.assign({}, state, {\n refreshButtonShow: !state.refreshButtonShow,\n });\n // initial state\n default:\n return state;\n }\n}\n","// Features\nimport produce from \"immer\";\nimport { Terms } from \"../actions\";\nimport { updateArrayWithElement } from \"../../utils\";\n// Types\nimport type { Action } from \"deox\";\nimport type { UndefinedNull } from \"../../types/common.types\";\ntype PayloadTerm = {\n _id?: string;\n name: string;\n start: string | Date;\n end: string | Date;\n createdAt?: Date;\n updatedAt?: Date;\n};\nexport type StateTerms = {\n lastFetching: Date | UndefinedNull;\n terms: PayloadTerm[];\n};\nexport type TermsActionReducers = Action<\n string,\n {\n term: PayloadTerm;\n termId: string;\n terms: StateTerms[\"terms\"];\n }\n>;\n// Terms Reducer\nconst initialState: StateTerms = {\n lastFetching: null,\n terms: [],\n};\nconst terms: (state: StateTerms, action: TermsActionReducers) => StateTerms =\n produce((draft: StateTerms, action: TermsActionReducers) => {\n switch (action.type) {\n case Terms.TERMS_FETCH_ALL_SUCCESS:\n draft.lastFetching = new Date();\n draft.terms = action.payload.terms;\n break;\n case Terms.TERMS_CREATE_SUCCESS:\n draft.lastFetching = new Date();\n draft.terms = [...draft.terms, action.payload.term];\n break;\n case Terms.TERMS_EDIT_SUCCESS:\n draft.terms = updateArrayWithElement(draft.terms, action.payload.term);\n break;\n case Terms.TERMS_DELETE_SUCCESS:\n draft.terms = draft.terms.filter(\n ({ _id }) => _id !== action.payload.termId\n );\n break;\n }\n }, initialState);\nexport default terms;\n","// Import Features\nimport {\n AccountSettings,\n Users,\n UsersManager,\n Institutions,\n Programs,\n Cohorts,\n} from \"../actions/\";\nimport { updateArrayWithElement } from \"../../utils/\";\n// Import Types\nimport type { Action, PayloadObject } from \"../../types/common.types\";\nimport type {\n StateUsersManagerFilters,\n StateUsersManager as State,\n SortBy,\n} from \"../../types/users.types\";\n// Users Reducer\nexport const USER_MANAGER_USER_LIMIT = 20;\n// Initial States\nconst initialStateRoles = {\n options: [],\n isFetching: false,\n selected: null,\n};\nconst initialStateOptionsSelected = {\n options: [],\n selected: [],\n};\nconst initialStatePrograms = initialStateOptionsSelected;\nconst initialStateCohorts = initialStateOptionsSelected;\nconst initialStateInstitutions = initialStateOptionsSelected;\nconst initialStateSortBy: SortBy = {\n name: \"descending\",\n enrollment: \"\",\n institution: \"\",\n },\n initialStateUserStatus: StateUsersManagerFilters[\"status\"] = [\"active\"];\nconst initialStateFilters: StateUsersManagerFilters = {\n pages: 1,\n limit: USER_MANAGER_USER_LIMIT,\n searchTxt: \"\",\n roles: initialStateRoles,\n status: initialStateUserStatus,\n rotations: {\n activeRotation: false,\n },\n programs: initialStatePrograms,\n cohorts: initialStateCohorts,\n institutions: initialStateInstitutions,\n sortBy: initialStateSortBy,\n};\nconst initialState: State = {\n initialStateFilters,\n usersManagerSelected: null,\n errorAPI: null,\n filters: initialStateFilters,\n};\nexport default function usersManager(\n state: State = initialState,\n action: Action\n): State {\n let filters: StateUsersManagerFilters;\n switch (action.type) {\n case UsersManager.USERS_MANAGER_FILTERS_SAVE_FILTERS:\n return Object.assign({}, state, {\n filters: {\n ...state.filters,\n ...action.payload.filters,\n },\n });\n case UsersManager.USERS_MANAGER_FILTERS_SET_ROLES:\n filters = Object.assign({}, state.filters, {\n roles: {\n ...state.filters.roles,\n options: action.payload.roles,\n },\n });\n return Object.assign({}, state, {\n filters: filters,\n });\n case UsersManager.USERS_MANAGER_FILTERS_SET_PAGES:\n filters = Object.assign({}, state.filters, {\n pages: action.payload.pages,\n });\n return Object.assign({}, state, {\n filters: filters,\n });\n case UsersManager.USERS_MANAGER_FILTERS_SET_SEARCH:\n filters = Object.assign({}, state.filters, {\n searchTxt: action.payload.searchTxt,\n });\n return Object.assign({}, state, {\n filters: filters,\n });\n case UsersManager.USERS_MANAGER_FILTERS_SET_SORTBY:\n filters = Object.assign({}, state.filters, {\n sortBy: action.payload.sortBy,\n });\n return Object.assign({}, state, {\n filters: filters,\n });\n case AccountSettings.ACCOUNT_SETTINGS_UPDATE_SETTING_NAME:\n if (action.payload.accountSettingsName === \"USER_MANAGER_SETTINGS\") {\n return Object.assign({}, state, {\n initialStateFilters: {\n ...state.initialStateFilters,\n sortBy: action.payload.newSetting.sortBy,\n status: action.payload.newSetting.userStatus,\n },\n });\n }\n return state;\n case AccountSettings.ACCOUNT_SETTINGS_FETCH_SUCCESS:\n if (action.payload.frontendPersonalization?.USER_MANAGER_SETTINGS) {\n filters = Object.assign({}, state.filters, {\n sortBy:\n action.payload.frontendPersonalization[\"USER_MANAGER_SETTINGS\"]\n .sortBy,\n status:\n action.payload.frontendPersonalization[\"USER_MANAGER_SETTINGS\"]\n .userStatus || initialStateUserStatus,\n });\n return Object.assign({}, state, {\n initialStateFilters: {\n ...state.initialStateFilters,\n sortBy:\n action.payload.frontendPersonalization[\"USER_MANAGER_SETTINGS\"]\n .sortBy,\n status:\n action.payload.frontendPersonalization[\"USER_MANAGER_SETTINGS\"]\n .userStatus || initialStateUserStatus,\n },\n filters,\n });\n }\n return state;\n case UsersManager.USERS_MANAGER_FILTERS_CLEAR:\n return Object.assign({}, state, {\n ...initialState,\n initialStateFilters: state.initialStateFilters,\n filters: {\n ...state.initialStateFilters,\n roles: {\n ...state.filters.roles,\n selected: null,\n },\n programs: {\n ...state.filters.programs,\n selected: [],\n },\n cohorts: {\n ...state.filters.cohorts,\n selected: [],\n },\n institutions: {\n ...state.filters.institutions,\n selected: [],\n },\n },\n });\n // Fetch Users for UsersManager by Roles\n case Users.USERS_FETCH_USERS_ROLES:\n if (action.payload && action.payload.selected) {\n let resetFilters = {};\n if (action.payload.resetFilters) {\n resetFilters = {\n ...state.initialStateFilters,\n status: action.payload.status,\n programs: {\n ...state.filters.programs,\n selected: [],\n },\n cohorts: {\n ...state.filters.cohorts,\n selected: [],\n },\n institutions: {\n ...state.filters.institutions,\n selected: [],\n },\n };\n if (action.payload.newFilters) {\n const { institutionsSelected, rotationsActive } =\n action.payload.newFilters;\n if (rotationsActive) {\n resetFilters = Object.assign({}, resetFilters, {\n rotations: {\n activeRotation: rotationsActive,\n },\n });\n }\n if (institutionsSelected && institutionsSelected.length) {\n resetFilters = Object.assign({}, resetFilters, {\n institutions: {\n ...state.filters.institutions,\n selected: institutionsSelected,\n },\n });\n }\n }\n }\n filters = Object.assign({}, state.filters, {\n ...resetFilters,\n roles: {\n ...state.filters.roles,\n isFetching: true,\n selected: action.payload.selected,\n },\n });\n return Object.assign({}, state, {\n errorAPI: null,\n filters: filters,\n });\n }\n return state;\n case Users.USERS_FETCH_USERS_ROLES_SUCCESS:\n case Users.USERS_FETCH_USERS_ROLES_FAILURE:\n if (action.payload && action.payload.selected) {\n filters = Object.assign({}, state.filters, {\n roles: { ...state.filters.roles, isFetching: false },\n });\n let errorAPI = null;\n if (action.payload.errorAPI) {\n errorAPI = action.payload.errorAPI;\n }\n return Object.assign({}, state, { errorAPI, filters });\n }\n return state;\n case UsersManager.USERS_MANAGER_FILTERS_SET_ROLE_SELECTED:\n if (action.payload && action.payload.selected) {\n filters = Object.assign({}, state.filters, {\n roles: {\n ...state.filters.roles,\n isFetching: false,\n selected: action.payload.selected,\n },\n });\n let errorAPI = null;\n if (action.payload.errorAPI) {\n errorAPI = action.payload.errorAPI;\n }\n return Object.assign({}, state, {\n errorAPI,\n filters,\n });\n }\n return state;\n // Fetch Users for UsersManager active rotation filter (only Students)\n case UsersManager.USERS_MANAGER_FILTERS_SEARCH:\n filters = Object.assign({}, state.filters, {\n pages: 1,\n });\n return Object.assign({}, state, {\n filters: filters,\n });\n case UsersManager.USERS_MANAGER_FILTERS_SET_USER_STATUS:\n filters = Object.assign({}, state.filters, {\n pages: 1,\n status: action.payload.status,\n });\n return Object.assign({}, state, {\n filters: filters,\n });\n case UsersManager.USERS_MANAGER_FILTERS_ROTATIONS_ACTIVE:\n filters = Object.assign({}, state.filters, {\n pages: 1,\n rotations: {\n activeRotation: !state.filters.rotations.activeRotation,\n },\n });\n return Object.assign({}, state, {\n filters: filters,\n });\n // Fetch Users for UsersManager by programs filter (only Students)\n case UsersManager.USERS_MANAGER_FILTERS_PROGRAMS:\n filters = Object.assign({}, state.filters, {\n pages: 1,\n programs: {\n ...state.filters.programs,\n selected: action.payload.selected,\n },\n });\n return Object.assign({}, state, {\n filters: filters,\n });\n // Fetch Users for UsersManager by cohorts filter (only Students)\n case UsersManager.USERS_MANAGER_FILTERS_COHORTS:\n filters = Object.assign({}, state.filters, {\n pages: 1,\n cohorts: {\n ...state.filters.cohorts,\n selected: action.payload.selected,\n },\n });\n return Object.assign({}, state, {\n filters: filters,\n });\n // Fetch Users for UsersManager by institutions filter (only InstitutionAdministrators and Preceptors)\n case UsersManager.USERS_MANAGER_FILTERS_INSTITUTIONS:\n filters = Object.assign({}, state.filters, {\n pages: 1,\n institutions: {\n ...state.filters.institutions,\n selected: action.payload.selected,\n },\n });\n return Object.assign({}, state, {\n filters: filters,\n });\n // Save Users Selected into User Manager\n case UsersManager.USERS_MANAGER_SAVE_USERS:\n return Object.assign({}, state, {\n usersManagerSelected: action.payload.usersSelected,\n });\n // PROGRAMS ACTIONS\n case Programs.PROGRAMS_FETCH_PROGRAMS_SUCCESS:\n filters = Object.assign({}, state.filters, {\n programs: {\n ...state.filters.programs,\n options: action.payload.programs,\n },\n });\n return Object.assign({}, state, {\n filters: filters,\n });\n case Programs.PROGRAMS_CREATE_SUCCESS:\n filters = Object.assign({}, state.filters, {\n programs: {\n ...state.filters.programs,\n options: [...state.filters.programs.options, action.payload.program],\n },\n });\n return Object.assign({}, state, {\n filters: filters,\n });\n case Programs.PROGRAMS_EDIT_PROGRAM_SUCCESS:\n filters = Object.assign({}, state.filters, {\n programs: {\n ...state.filters.programs,\n options: updateArrayWithElement(\n state.filters.programs.options,\n action.payload.program\n ),\n },\n });\n return Object.assign({}, state, {\n filters: filters,\n });\n case Programs.PROGRAMS_DELETE_SUCCESS:\n filters = Object.assign({}, state.filters, {\n programs: {\n ...state.filters.programs,\n options: state.filters.programs.options.filter(\n ({ _id }: PayloadObject) => _id !== action.payload.programId\n ),\n },\n });\n return Object.assign({}, state, {\n filters: filters,\n });\n // COHORTS ACTIONS\n case Cohorts.COHORTS_FETCH_COHORTS_SUCCESS:\n filters = Object.assign({}, state.filters, {\n cohorts: {\n ...state.filters.cohorts,\n options: action.payload.cohorts,\n },\n });\n return Object.assign({}, state, {\n filters: filters,\n });\n case Cohorts.COHORTS_CREATE_SUCCESS:\n filters = Object.assign({}, state.filters, {\n cohorts: {\n ...state.filters.cohorts,\n options: [...state.filters.cohorts.options, action.payload.cohort],\n },\n });\n return Object.assign({}, state, {\n filters: filters,\n });\n case Cohorts.COHORTS_EDIT_COHORT_SUCCESS:\n filters = Object.assign({}, state.filters, {\n cohorts: {\n ...state.filters.cohorts,\n options: updateArrayWithElement(\n state.filters.cohorts.options,\n action.payload.cohort\n ),\n },\n });\n return Object.assign({}, state, {\n filters: filters,\n });\n case Cohorts.COHORTS_DELETE_SUCCESS:\n filters = Object.assign({}, state.filters, {\n cohorts: {\n ...state.filters.cohorts,\n options: state.filters.cohorts.options.filter(\n ({ _id }: PayloadObject) => _id !== action.payload.cohortId\n ),\n },\n });\n return Object.assign({}, state, {\n filters: filters,\n });\n // INSTITUTIONS ACTIONS\n case Institutions.INSTITUTIONS_FETCH_INSTITUTIONS_SUCCESS:\n filters = Object.assign({}, state.filters, {\n institutions: {\n ...state.filters.institutions,\n options: action.payload.institutions,\n },\n });\n return Object.assign({}, state, {\n filters: filters,\n });\n // same state (not change)\n default:\n return state;\n }\n}\n","import findIndex from \"lodash/findIndex\";\nimport update from \"immutability-helper\";\nimport { Users, Files } from \"../actions/\";\nimport { USER_MANAGER_USER_LIMIT } from \"./usersManager\";\n// Import Types\nimport type { Action, PayloadObject } from \"../../types/common.types\";\nimport type { StateUsers as State } from \"../../types/users.types\";\n// Users Reducer\n// Initial States\nconst initialState: State = {\n userId: null,\n user: null,\n userFiles: [],\n userFilesExpired: [],\n allUsersSystem: null,\n lastFetchingAllUsersSystem: null,\n totalUsersSystem: null,\n};\nexport default function users(\n state: State = initialState,\n action: Action\n): State {\n switch (action.type) {\n case Users.USERS_FETCH_USERS_KPIS_SUCCESS:\n let usersObjectAll = {},\n totalUsersSystem = 0;\n const countAllUsers = action.payload.metadata || {};\n for (let userRole in action.payload.users) {\n usersObjectAll = {\n ...usersObjectAll,\n [userRole]: {\n isFetched: true,\n users: [],\n totalUsers:\n countAllUsers && countAllUsers[userRole]\n ? countAllUsers[userRole] || users.length\n : users.length,\n totalPages:\n countAllUsers && countAllUsers[userRole]\n ? 1 +\n parseInt(\n (\n ((countAllUsers[userRole] || users.length) - 1) /\n USER_MANAGER_USER_LIMIT\n ).toString(),\n 10\n )\n : 1 +\n parseInt(\n ((users.length - 1) / USER_MANAGER_USER_LIMIT).toString(),\n 10\n ),\n },\n };\n totalUsersSystem +=\n countAllUsers && countAllUsers[userRole]\n ? countAllUsers[userRole] || users.length\n : users.length;\n }\n let newUsersStateAll = Object.assign({}, state, {\n ...usersObjectAll,\n });\n return {\n ...newUsersStateAll,\n totalUsersSystem: totalUsersSystem,\n };\n case Users.USERS_FETCH_ALL_SUCCESS:\n return Object.assign({}, state, {\n allUsersSystem: action.payload.users,\n lastFetchingAllUsersSystem: new Date(),\n });\n case Users.USERS_FETCH_USERS_ROLES_SUCCESS:\n if (!action.payload.updateStoreUsers) {\n return state;\n }\n let usersObject = {};\n const count = action.payload.metadata || {};\n for (let userRole in action.payload.users) {\n const users =\n action.payload.roles.indexOf(userRole) > -1 ||\n action.payload.roles.length === 0\n ? [...action.payload.users[userRole]]\n : state[userRole]\n ? state[userRole].users\n : [];\n usersObject = {\n ...usersObject,\n [userRole]: {\n isFetched: true,\n users,\n totalUsers:\n count && count[userRole]\n ? count[userRole] || users.length\n : users.length,\n totalPages:\n count && count[userRole]\n ? 1 +\n parseInt(\n (\n ((count[userRole] || users.length) - 1) /\n USER_MANAGER_USER_LIMIT\n ).toString(),\n 10\n )\n : 1 +\n parseInt(\n ((users.length - 1) / USER_MANAGER_USER_LIMIT).toString(),\n 10\n ),\n },\n };\n }\n let newUsersState = Object.assign({}, state, {\n ...usersObject,\n });\n return {\n ...newUsersState,\n };\n case Users.USERS_SET_USERID:\n return Object.assign({}, state, { userId: action.payload.userId });\n case Users.USERS_UNSET_USERID:\n return Object.assign({}, state, {\n userId: null,\n user: null,\n userFiles: [],\n });\n case Users.USERS_FETCH_USER_SUCCESS:\n return Object.assign({}, state, { user: action.payload.user });\n case Users.USERS_EDIT_USER_SUCCESS:\n if (state.user && state.userId) {\n const stateRole = state.user.role;\n let newStateUsers = {\n ...state[stateRole],\n };\n let index = findIndex(\n newStateUsers.users,\n (user: PayloadObject) => user._id === state.userId\n );\n if (index > -1) {\n newStateUsers.users = update(newStateUsers.users, {\n [index]: {\n $set: {\n ...state.user,\n ...action.payload.body,\n },\n },\n });\n }\n return Object.assign({}, state, {\n user: { ...state.user, ...action.payload.body },\n [stateRole]: newStateUsers,\n });\n }\n return state;\n case Users.USERS_FETCH_USER_FILES_SUCCESS:\n case Files.FILES_EDIT_SUCCESS:\n case Files.FILES_DELETE_SUCCESS:\n return Object.assign({}, state, { userFiles: action.payload.files });\n case Users.USERS_FETCH_USER_FILES_EXPIRED_SUCCESS:\n return Object.assign({}, state, {\n userFilesExpired: action.payload.filesExpired,\n });\n // initial state\n // return initialState;\n // same state (not change)\n default:\n return state;\n }\n}\n","import { UsersPortfolio } from \"../actions/\";\n// Import Types\nimport type { Action } from \"../../types/common.types\";\nimport type { StateUsersPortfolio as State } from \"../../types/usersPortfolio.types\";\n// Portfolio Reducer\nconst initialState: State = {\n publicUrl: null,\n caseLogsKPI: null,\n institutionsWorked: [],\n workExperience: [],\n educationalBackground: [],\n publications: [],\n volunteers: [],\n skills: [],\n testimonials: [],\n};\n\nexport default function usersPortfolio(\n state: State = initialState,\n action: Action\n): State {\n switch (action.type) {\n // Portfolio\n case UsersPortfolio.PORTFOLIO_FETCH_PORTFOLIO_SUCCESS:\n case UsersPortfolio.PORTFOLIO_EDIT_SUCCESS:\n case UsersPortfolio.PORTFOLIO_TESTIMONIALS_SUCCESS:\n return Object.assign({}, state, {\n ...state,\n ...action.payload.newState,\n });\n case UsersPortfolio.PORTFOLIO_DELETE_TESTIMONIALS_SUCCESS:\n return Object.assign({}, state, {\n testimonials: state.testimonials.filter(\n ({ institution }) => institution._id !== action.payload.institutionId\n ),\n });\n // same state (not change)\n default:\n return state;\n }\n}\n","// Inclusive reducers\nimport { combineReducers } from \"redux\";\nimport accessControl from \"./accessControl\";\nimport accountSettings from \"./accountSettings\";\nimport api from \"./api\";\nimport auth from \"./auth\";\nimport broadcastMessages from \"./broadcastMessages\";\nimport cameraDevice from \"./cameraDevice\";\nimport caseLogs from \"./caseLogs\";\nimport cohorts from \"./cohorts\";\nimport company from \"./company\";\nimport config from \"./config\";\nimport customFields from \"./customFields\";\nimport enrollments from \"./enrollments\";\nimport evaluations from \"./evaluations\";\nimport evaluationsSchedulers from \"./evaluationsSchedulers\";\nimport evaluationsTemplates from \"./evaluationsTemplates\";\nimport feedbackForm from \"./feedbackForm\";\nimport fileCategories from \"./fileCategories\";\nimport guideLineTutorial from \"./guideLineTutorial\";\nimport importData from \"./importData\";\nimport institutions from \"./institutions\";\nimport invitations from \"./invitations\";\nimport localStore from \"./localStore\";\nimport metrics from \"./metrics\";\nimport notifications from \"./notifications\";\nimport periods from \"./periods\";\nimport programs from \"./programs\";\nimport { reducer as reduxFormReducer } from \"redux-form\";\nimport reports from \"./reports\";\nimport rotations from \"./rotations\";\nimport routerBeforeTransitions from \"./routerBeforeTransitions\";\nimport routerManager from \"./routerManager\";\nimport { connectRouter } from \"connected-react-router\";\nimport serviceWorker from \"./serviceWorker\";\nimport tenantSettings from \"./tenantSettings\";\nimport terms from \"./terms\";\nimport users from \"./users\";\nimport usersManager from \"./usersManager\";\nimport usersPortfolio from \"./portfolio\";\n// main reducers\nexport const createRootReducer = (history: any) =>\n combineReducers({\n router: connectRouter(history),\n // rest of your reducers\n accessControl,\n accountSettings,\n api,\n auth,\n broadcastMessages,\n cameraDevice,\n caseLogs,\n cohorts,\n config,\n company,\n customFields,\n enrollments,\n evaluations,\n evaluationsSchedulers,\n evaluationsTemplates,\n feedbackForm,\n fileCategories,\n form: reduxFormReducer,\n guideLineTutorial,\n importData,\n institutions,\n invitations,\n localStore,\n metrics,\n notifications,\n periods,\n programs,\n reports,\n rotations,\n routerBeforeTransitions,\n routerManager,\n serviceWorker,\n tenantSettings,\n terms,\n users,\n usersManager,\n usersPortfolio,\n });\n// export const reducers: any = combineReducers({\n// accessControl,\n// accountSettings,\n// api,\n// auth,\n// broadcastMessages,\n// caseLogs,\n// cohorts,\n// config,\n// company,\n// customFields,\n// enrollments,\n// evaluations,\n// evaluationsSchedulers,\n// evaluationsTemplates,\n// feedbackForm,\n// fileCategories,\n// form: reduxFormReducer,\n// guideLineTutorial,\n// institutions,\n// invitations,\n// localStore,\n// metrics,\n// notifications,\n// periods,\n// programs,\n// reports,\n// rotations,\n// routerBeforeTransitions,\n// routerManager,\n// serviceWorker,\n// tenantSettings,\n// terms,\n// users,\n// usersManager,\n// usersPortfolio,\n// });\nexport type RootState = ReturnType;\n","import { isDevelopmentReactAppEnv } from \"../../utils\";\n//Logger for different type messages.\nexport const logger = () => {\n let logger = {\n log: () => {},\n info: () => {},\n warn: () => {},\n error: () => {},\n test: () => {},\n };\n if (isDevelopmentReactAppEnv()) {\n logger = {\n log: (...args: any[]) => console.log(...args),\n info: (...args: any[]) => console.info(...args),\n warn: (...args: any[]) => console.warn(...args),\n error: (...args: any[]) => console.error(...args),\n test: (...args: any[]) => {\n let styles = \"padding:5px;background:green;color:white\";\n console.log(\"%cTEST\", styles);\n console.log(...args);\n console.log(\"%cEND\", styles);\n },\n };\n }\n window.logger = logger;\n};\n","import type { Config, tAPI } from \"./API\";\n// API Access Control static class\nconst apiBaseAccessControlRoles = \"/roles\",\n apiBaseAccessControlDynamicRules = \"/dynamic-rules\";\nexport default class AccessControl {\n // Get a list of roles\n static GetAccessControlRoles(\n api: tAPI,\n roles: string[] = [],\n config?: Config\n ) {\n let queryParams = \"\";\n if (roles.length > 0) {\n queryParams += `?roles=${roles.join()}`;\n }\n return api.GET(`${apiBaseAccessControlRoles}${queryParams}`, config);\n }\n // Create a Role\n static CreateRole(api: tAPI, data: object, config?: Config) {\n return api.POST(`${apiBaseAccessControlRoles}`, data, config);\n }\n // Edit a role from some specific list of roles\n static EditRole(api: tAPI, role: string, data: object, config?: Config) {\n return api.PATCH(`${apiBaseAccessControlRoles}/${role}`, data, config);\n }\n // Delete a Role\n static DeleteRole(api: tAPI, role: string, config?: Config) {\n return api.DELETE(`${apiBaseAccessControlRoles}/${role}`, config);\n }\n // Get a list of Dynamic Rules\n static GetAccessControlDynamicRules(api: tAPI, config?: Config) {\n return api.GET(\n `${apiBaseAccessControlDynamicRules}?populated=true`,\n config\n );\n }\n // Create a Dynamic Rule\n static CreateDynamicRule(api: tAPI, data: object, config?: Config) {\n return api.POST(`${apiBaseAccessControlDynamicRules}`, data, config);\n }\n // Edit a dynamic rule from some specific dynamic rule Id\n static EditDynamicRule(\n api: tAPI,\n dynamicRuleId: string,\n data: object,\n config?: Config\n ) {\n return api.PATCH(\n `${apiBaseAccessControlDynamicRules}/${dynamicRuleId}`,\n data,\n config\n );\n }\n // Delete a Dynamic Rule\n static DeleteDynamicRule(api: tAPI, dynamicRuleId: string, config?: Config) {\n return api.DELETE(\n `${apiBaseAccessControlDynamicRules}/${dynamicRuleId}`,\n config\n );\n }\n}\n","import { put, select, call, all, takeLatest } from \"redux-saga/effects\";\nimport AccessControlApi from \"../api/AccessControl\";\nimport { Auth, AccessControl } from \"../actions/\";\nimport { parseName, parseApiName } from \"../../utils/\";\n// Type\nimport type { Action } from \"deox\";\nimport type { tAPI } from \"../api/API\";\n//Sagas for AccessControl\n// ROLES\nconst parseAlias = (alias: string) =>\n alias\n .replace(\"my:\", \"their \")\n .split(\":\")\n .reverse()\n .map((actionResource, index) => {\n switch (index) {\n case 0:\n if (actionResource.indexOf(\"CSV\") !== -1) {\n return (\n actionResource.charAt(0).toUpperCase() +\n actionResource.slice(1).toLowerCase().replace(\"csv\", \" CSV\")\n );\n }\n if (actionResource.indexOf(\"submitTestimonial\") !== -1) {\n return actionResource.replace(\n \"submitTestimonial\",\n \"SUBMIT Recommendation\"\n );\n }\n if (actionResource.indexOf(\"submitTestimonial\") !== -1) {\n return actionResource.replace(\n \"submitTestimonial\",\n \"SUBMIT Recommendation\"\n );\n }\n if (actionResource.indexOf(\"activateDeactivate\") !== -1) {\n return actionResource.replace(\n \"activateDeactivate\",\n \"ACTIVATE/DISABLE\"\n );\n }\n return actionResource\n .split(/(?=[A-Z])/)\n .join(\" \")\n .toUpperCase();\n default:\n let newActionResource = actionResource;\n if (newActionResource.indexOf(\"my#\") !== -1) {\n newActionResource = actionResource.replace(\"my#\", \"his/her\");\n }\n if (newActionResource.indexOf(\"my\") !== -1) {\n newActionResource = actionResource.replace(\"my\", \"\");\n }\n if (newActionResource.indexOf(\"#\") !== -1) {\n newActionResource = newActionResource.replace(\"#\", \" \");\n }\n return parseApiName(parseName(newActionResource));\n }\n })\n .join(\" \");\nconst checkDisabled = (\n alias: string,\n apiName:\n | \"Alumnis\"\n | \"CompanyAdministrators\"\n | \"Coordinators\"\n | \"Faculties\"\n | \"InstitutionAdministrators\"\n | \"Preceptors\"\n | \"Students\"\n | \"SuperCompanyAdministrators\"\n) => {\n switch (alias) {\n case \"Terms:read\":\n case \"Periods:read\":\n case \"my:Students#ProfilesBasic:read\":\n case \"my:Preceptors#ProfilesBasic:read\":\n case \"my#Profiles:read\":\n case \"my#FileCategories:read\":\n case \"Programs:read\":\n case \"Cohorts:read\":\n case \"my#Enrollments:read\":\n case \"my#CustomFields:read\":\n case \"Roles:read\":\n case \"TenantSettings:read\":\n case \"my#Portfolios:read\":\n case \"my#Portfolios:update\":\n case \"my#UserSettings:read\":\n case \"my#UserSettings:update\":\n return true;\n case \"my:Preceptors#Profiles:read\":\n case \"my:Students#Portfolios:submitTestimonial\":\n if (apiName === \"InstitutionAdministrators\") {\n return true;\n }\n return false;\n case \"my#CaseLogs:review\":\n case \"my:Students#Profiles:read\":\n if (apiName === \"Preceptors\") {\n return true;\n }\n return false;\n default:\n return false;\n }\n};\nconst parsePermissions = (\n permissions: { [k: string]: any },\n apiName:\n | \"Alumnis\"\n | \"CompanyAdministrators\"\n | \"Coordinators\"\n | \"Faculties\"\n | \"InstitutionAdministrators\"\n | \"Preceptors\"\n | \"Students\"\n | \"SuperCompanyAdministrators\"\n) => {\n const newPermissions: { [k: string]: any } = {};\n for (let resource in permissions) {\n newPermissions[resource] = {\n resource,\n resourceName: parseApiName(parseName(resource)),\n actions: Object.keys(permissions[resource]).map((alias) => ({\n alias,\n label: parseAlias(alias),\n value: permissions[resource][alias][\"isEnabled\"],\n disabled: checkDisabled(alias, apiName),\n })),\n apiValue: {\n ...permissions[resource],\n },\n };\n }\n return newPermissions;\n};\n\nexport function* doAccessControlReturnRoles(\n action: Action<\n string,\n {\n roles: any[];\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n): Generator {\n const roles = yield call(doAccessControlFetchRoles, action);\n yield put(AccessControl.initAccesControl());\n return roles;\n}\nfunction* doAccessControlFetchRoles(\n action: Action<\n string,\n {\n roles: any[];\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(AccessControl.accessControlFetchRolesRequest());\n window.logger.log(\"doAccessControlFetchRoles\", action);\n const {\n roles = [],\n callbackSuccess = null,\n callbackError = null,\n } = action.payload || {};\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get all roles for this company\n const { data } = yield call(\n AccessControlApi.GetAccessControlRoles,\n api,\n roles,\n { token }\n );\n const { roles: rolesApi } = data;\n window.logger.warn(\"Saga Roles Api:\", rolesApi);\n const rolesState = Object.keys(rolesApi).map((roleApi) => ({\n ...rolesApi[roleApi],\n apiName: rolesApi[roleApi].name,\n type: rolesApi[roleApi].name.replace(/\\s/g, \"\").toLowerCase(),\n name: parseApiName(\n rolesApi[roleApi].label || parseName(rolesApi[roleApi].name)\n ),\n isActive: true,\n permissions: parsePermissions(\n rolesApi[roleApi].permissions,\n rolesApi[roleApi].name\n ),\n }));\n yield put(\n AccessControl.accessControlFetchRolesSuccess({\n roles: rolesState,\n })\n );\n if (callbackSuccess) {\n callbackSuccess(rolesState);\n }\n return rolesState;\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doAccessControlFetchRoles\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(AccessControl.accessControlFetchRolesFailure());\n if (callbackError) {\n callbackError(error);\n }\n return [];\n }\n}\n\nfunction* doAccessControlCreateRole(\n action: Action<\n string,\n {\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(AccessControl.accessControlCreateRoleRequest());\n window.logger.log(\"doAccessControlCreateRole\", action);\n const { body, callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to create a new role\n const { data } = yield call(AccessControlApi.CreateRole, api, body, {\n token,\n });\n const { role } = data;\n yield put(AccessControl.accessControlCreateRoleSuccess({ role }));\n if (callbackSuccess) {\n callbackSuccess(role);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doAccessControlCreateRoles\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(AccessControl.accessControlCreateRoleFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doAccessControlUpdateRoleResource(\n action: Action<\n string,\n {\n role: { [k: string]: any };\n body: { [k: string]: any };\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(AccessControl.accessControlUpdateRoleResourceRequest());\n window.logger.log(\"doAccessControlUpdateRoleResource\", action);\n const {\n role,\n body,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to update a resource from some role\n const { data } = yield call(\n AccessControlApi.EditRole,\n api,\n role.apiName,\n body,\n { token }\n );\n const { role: roleApi } = data;\n let newResourceUpdated: { [k: string]: any } = {\n apiValue: {\n ...role.permissions[body.resource].apiValue,\n [body.action]: {\n ...roleApi.permissions[body.resource][body.action],\n },\n },\n };\n newResourceUpdated = {\n ...newResourceUpdated,\n actions: Object.keys(newResourceUpdated.apiValue).map((alias) => ({\n alias,\n label: parseAlias(alias),\n value: newResourceUpdated.apiValue[alias][\"isEnabled\"],\n disabled: checkDisabled(alias, role.apiName),\n })),\n };\n yield put(\n AccessControl.accessControlUpdateRoleResourceSuccess({\n role: {\n ...role,\n permissions: {\n ...role.permissions,\n [body.resource]: {\n ...role.permissions[body.resource],\n ...newResourceUpdated,\n },\n },\n },\n })\n );\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doAccessControlUpdateRoleResource\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(AccessControl.accessControlUpdateRoleResourceFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doAccessControlDeleteRole(\n action: Action<\n string,\n {\n role: string;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(AccessControl.accessControlDeleteRoleRequest());\n window.logger.log(\"doAccessControlDeleteRole\", action);\n const { role, callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to delete a role\n yield call(AccessControlApi.DeleteRole, api, role, { token });\n yield put(AccessControl.accessControlDeleteRoleSuccess({ role }));\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doAccessControlDeleteRole\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(AccessControl.accessControlDeleteRoleFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\n// DYNAMIC RULES\nfunction* doAccessControlFetchDynamicRules(\n action: Action<\n string,\n {\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(AccessControl.accessControlFetchDynamicRulesRequest());\n window.logger.log(\"doAccessControlFetchDynamicRules\", action);\n const { callbackSuccess = null, callbackError = null } = action.payload || {};\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get all roles for this company\n const {\n data: { dynamicRules },\n } = yield call(AccessControlApi.GetAccessControlDynamicRules, api, {\n token,\n });\n yield put(\n AccessControl.accessControlFetchDynamicRulesSuccess({ dynamicRules })\n );\n if (callbackSuccess) {\n callbackSuccess(dynamicRules);\n }\n return;\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doAccessControlFetchDynamicRules\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(AccessControl.accessControlFetchDynamicRulesFailure());\n if (callbackError) {\n callbackError(error);\n }\n return;\n }\n}\n\nfunction* doAccessControlCreateDynamicRule(\n action: Action<\n string,\n {\n user: object;\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(AccessControl.accessControlCreateDynamicRuleRequest());\n window.logger.log(\"doAccessControlCreateDynamicRule\", action);\n const {\n user,\n body,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to create a new dynamic rule\n const { data } = yield call(AccessControlApi.CreateDynamicRule, api, body, {\n token,\n });\n const { dynamicRule } = data;\n yield put(\n AccessControl.accessControlCreateDynamicRuleSuccess({\n dynamicRule: { ...dynamicRule, user },\n })\n );\n if (callbackSuccess) {\n callbackSuccess({ ...dynamicRule, user });\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doAccessControlCreateDynamicRule\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(AccessControl.accessControlCreateDynamicRuleFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doAccessControlEditDynamicRule(\n action: Action<\n string,\n {\n dynamicRuleId: string;\n user: object;\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(AccessControl.accessControlEditDynamicRuleRequest());\n window.logger.log(\"doAccessControlEditDynamicRule\", action);\n const {\n dynamicRuleId,\n user,\n body,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to edit a dynamic rule for that specific dynamicRuleId\n const { data } = yield call(\n AccessControlApi.EditDynamicRule,\n api,\n dynamicRuleId,\n body,\n { token }\n );\n const { dynamicRule } = data;\n yield put(\n AccessControl.accessControlEditDynamicRuleSuccess({\n dynamicRule: { ...dynamicRule, user },\n })\n );\n if (callbackSuccess) {\n callbackSuccess({ ...dynamicRule, user });\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doAccessControlEditDynamicRule\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(AccessControl.accessControlEditDynamicRuleFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doAccessControlDeleteDynamicRule(\n action: Action<\n string,\n {\n dynamicRuleId: string;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(AccessControl.accessControlDeleteDynamicRuleRequest());\n window.logger.log(\"doAccessControlDeleteDynamicRule\", action);\n const {\n dynamicRuleId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to delete a dynamic rule for that specific dynamicRuleId\n yield call(AccessControlApi.DeleteDynamicRule, api, dynamicRuleId, {\n token,\n });\n yield put(\n AccessControl.accessControlDeleteDynamicRuleSuccess({ dynamicRuleId })\n );\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doAccessControlDeleteDynamicRule\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(AccessControl.accessControlDeleteDynamicRuleFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nexport default function* accessControlSagas(): Generator {\n yield all([\n // ROLES\n takeLatest(\n AccessControl.ACCESS_CONTROL_FETCH_ROLES,\n doAccessControlFetchRoles\n ),\n takeLatest(\n AccessControl.ACCESS_CONTROL_CREATE_ROLE,\n doAccessControlCreateRole\n ),\n takeLatest(\n AccessControl.ACCESS_CONTROL_UPDATE_ROLE_RESOURCE,\n doAccessControlUpdateRoleResource\n ),\n takeLatest(\n AccessControl.ACCESS_CONTROL_DELETE_ROLE,\n doAccessControlDeleteRole\n ),\n // DYNAMIC RULES\n takeLatest(\n AccessControl.ACCESS_CONTROL_FETCH_DYNAMIC_RULES,\n doAccessControlFetchDynamicRules\n ),\n takeLatest(\n AccessControl.ACCESS_CONTROL_CREATE_DYNAMIC_RULE,\n doAccessControlCreateDynamicRule\n ),\n takeLatest(\n AccessControl.ACCESS_CONTROL_EDIT_DYNAMIC_RULE,\n doAccessControlEditDynamicRule\n ),\n takeLatest(\n AccessControl.ACCESS_CONTROL_DELETE_DYNAMIC_RULE,\n doAccessControlDeleteDynamicRule\n ),\n ]);\n}\n","import { put, select, call, all, takeLatest } from \"redux-saga/effects\";\nimport { push } from \"connected-react-router\";\nimport * as Cookies from \"js-cookie\";\nimport { doAccessControlReturnRoles } from \"./accessControl\";\nimport { doCallAccountsSettingsFetchMySettings } from \"./accountSettings\";\nimport AuthApi from \"../api/Auth\";\nimport {\n AccessControl,\n AccountSettings,\n Auth,\n Cohorts,\n Company,\n CustomFields,\n FileCategories,\n Institutions,\n Notifications,\n Programs,\n TenantSettings,\n Users,\n UsersManager,\n} from \"../actions/\";\nimport {\n parseName,\n parseApiName,\n setTokenExpired,\n checkTokenExpired,\n} from \"../../utils/\";\n//PERMISSIONS\nimport { onCheckUsersManagerPermissions } from \"../../components/manager/ManagerPermissions\";\nimport {\n onCheckReadProgramsPermissions,\n onCheckReadCohortsPermissions,\n} from \"../../components/admin-portal/AdminPortalPermissions\";\nimport { onCheckReadInstitutionsPermissions } from \"../../components/institutions/InstitutionsPermissions\";\nimport { onChecReadkMyFilesPermissions } from \"../../components/files/FilesPermissions\";\nimport { USER_MANAGER_USER_LIMIT } from \"../reducers/usersManager\";\n// Type\nimport type { Action } from \"deox\";\nimport type { tAPI } from \"../api/API\";\n//Sagas for Auth\nconst getMyOptionsRoles = (myRole: { [k: string]: any }) => {\n const { Users } = myRole.permissions || {};\n if (Users && Users.actions && Users.actions.length > 0) {\n const optionsRoles = Users.actions\n .filter(\n ({ alias, value }: { alias: string; value: any }) =>\n alias !== \"my#Profiles:read\" &&\n (alias.indexOf(\"#Profiles:read\") !== -1 ||\n alias.indexOf(\"#ProfilesBasic:read\") !== -1) &&\n value\n )\n .map(({ alias }: { alias: string }) => ({\n apiName: alias\n .replace(\"my:\", \"\")\n .replace(\"#Profiles:read\", \"\")\n .replace(\"#ProfilesBasic:read\", \"\"),\n type: alias\n .replace(\"my:\", \"\")\n .replace(\"#Profiles:read\", \"\")\n .replace(\"#ProfilesBasic:read\", \"\")\n .replace(/\\s/g, \"\")\n .toLowerCase(),\n name: parseApiName(\n parseName(\n alias\n .replace(\"my:\", \"\")\n .replace(\"#Profiles:read\", \"\")\n .replace(\"#ProfilesBasic:read\", \"\")\n )\n ),\n }))\n .filter(\n (\n elem: { [k: string]: any },\n index: number,\n array: { [k: string]: any }[]\n ) => array.map(({ apiName }) => apiName).indexOf(elem.apiName) === index\n );\n return optionsRoles;\n }\n return [];\n};\n\nfunction* doAuthGetMyAccounts(email: string): Generator {\n window.logger.log(\"doAuthGetMyAccounts\", email);\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n const { companyDomain } = yield select(({ config }) => config);\n const { data } = yield call(\n AuthApi.GetMyAccounts,\n api,\n {\n email,\n tenant: companyDomain,\n },\n { token }\n );\n const { accountsAvailable } = data;\n return accountsAvailable;\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doAuthGetMyAccounts\", error, errors);\n return [];\n }\n}\n\nfunction* doAuthSwitchAccount(\n action: Action<\n string,\n {\n user: object;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Auth.authSwithcAccountRequest());\n window.logger.log(\"doAuthSwitchAccount\", action);\n const { user, callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token: apiToken }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to switch account\n const { data } = yield call(\n AuthApi.SwitchMyAccount,\n api,\n {\n user,\n },\n { token: apiToken }\n );\n const { user: userId, token } = data;\n const { localhost, hostname } = yield select(({ config }) => config);\n if (localhost) {\n Cookies.set(\n \"authCookie\",\n { token, user: userId, removeDomain: `${hostname}` },\n { domain: `${hostname}` }\n );\n }\n yield put(Auth.authSwithcAccountSuccess());\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doAuthSwitchAccount\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Auth.authSwithcAccountFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doAuthSignInApp(\n action: Action<\n string,\n {\n userId: string;\n emulation: { isActive: boolean; onBehalfUser: object | null };\n callbackSuccess: (data: any) => void;\n callbackError: (error: any) => void;\n }\n >\n) {\n yield put(Auth.authSignInRequestApp());\n window.logger.log(\"doAuthSignInApp\", action);\n const { userId, emulation, callbackSuccess, callbackError } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to sign in into account\n // First Sign In, we are waiting to get all permission for this role.\n const roles: any[] = yield call(\n // @ts-ignore\n doAccessControlReturnRoles,\n AccessControl.accessControlFetchRoles()\n );\n const { data } = yield call(AuthApi.GetMyUserAccount, api, userId, {\n token,\n });\n const { user } = data;\n const myRole =\n roles && roles.length > 0\n ? roles.filter(\n ({\n apiName,\n }: {\n apiName:\n | \"Alumnis\"\n | \"CompanyAdministrators\"\n | \"Coordinators\"\n | \"Faculties\"\n | \"InstitutionAdministrators\"\n | \"Preceptors\"\n | \"Students\"\n | \"SuperCompanyAdministrators\";\n }) => apiName === user.role\n )[0]\n : null;\n // We need User and myRole to success Sign In\n if (user.status === \"active\" && myRole) {\n // From here we need minimun all these tasks\n yield put(CustomFields.customFieldsFetchCustomFields());\n yield call(\n // @ts-ignore\n doCallAccountsSettingsFetchMySettings,\n AccountSettings.accountSettingsFetchMySettings({\n userId: user._id,\n userRoleType: myRole.type,\n })\n );\n const myRoles = getMyOptionsRoles(myRole);\n if (myRoles && myRoles.length > 0) {\n if (onCheckUsersManagerPermissions(myRole.permissions)) {\n yield put(\n UsersManager.usersManagerFiltersSetRoles({ roles: myRoles })\n );\n yield put(\n Users.usersFetchUsersKpis({ limit: USER_MANAGER_USER_LIMIT })\n );\n }\n if (\n myRoles.filter(\n ({\n apiName,\n }: {\n apiName:\n | \"Alumnis\"\n | \"CompanyAdministrators\"\n | \"Coordinators\"\n | \"Faculties\"\n | \"InstitutionAdministrators\"\n | \"Preceptors\"\n | \"Students\"\n | \"SuperCompanyAdministrators\";\n }) => apiName === \"Students\"\n ).length > 0\n ) {\n if (onCheckReadProgramsPermissions(myRole.permissions)) {\n yield put(Programs.programsFetchPrograms());\n }\n if (onCheckReadCohortsPermissions(myRole.permissions)) {\n yield put(Cohorts.cohortsFetchCohorts());\n }\n }\n if (onCheckReadInstitutionsPermissions(myRole.permissions)) {\n yield put(Institutions.institutionsFetchInstitutions());\n }\n }\n const accountsAvailable: object[] = yield doAuthGetMyAccounts(user.email);\n const { tenantSettings }: { tenantSettings: any } = yield select(\n ({ tenantSettings }) => tenantSettings\n );\n const hasToCheckRequiredFields =\n tenantSettings[\"ACCOUNTS_PROFILE_REQUIRED_FIELDS\"].valuesApi;\n const hasContactInfoAddressesFieldsRequiredNull = hasToCheckRequiredFields\n ? getContactInfoAddressesFieldsRequiredNull(user)\n : false;\n const hasEmergencyContactFieldsRequiredNull = hasToCheckRequiredFields\n ? getEmergencyContactFieldsRequiredNull(user)\n : false;\n const hasCustomFieldsRequiredNull = hasToCheckRequiredFields\n ? getCustomFieldsRequiredNull(user)\n : false;\n window.logger.warn(\n \"doAuthSignInApp\",\n user,\n emulation,\n \"hasContactInfoAddressesFieldsRequiredNull\",\n hasContactInfoAddressesFieldsRequiredNull,\n \"hasEmergencyContactFieldsRequiredNull\",\n hasEmergencyContactFieldsRequiredNull,\n \"hasCustomFieldsRequiredNull: \",\n hasCustomFieldsRequiredNull\n );\n yield put(\n Auth.authSignInSuccessApp({\n token,\n expiredToken: setTokenExpired(),\n user: {\n ...user,\n accountsAvailable,\n },\n emulation,\n role: myRole,\n hasContactInfoAddressesFieldsRequiredNull,\n hasEmergencyContactFieldsRequiredNull,\n hasCustomFieldsRequiredNull,\n })\n );\n // After here we can load resto of tasks\n yield put(Notifications.notificationsFetchNotifications());\n if (user.company) {\n yield put(Company.companyFetchCompany({ companyId: user.company._id }));\n }\n // Load Institution\n if (user.institution) {\n yield call(doMergeMyInstitutionAccount, user.institution);\n yield put(\n Auth.authFetchMyInstitution({ institutionId: user.institution._id })\n );\n }\n if (\n user.activeRotation &&\n user.activeRotation.institutions &&\n user.activeRotation.institutions.length > 0\n ) {\n yield call(\n doMergeMyInstitutionAccount,\n user.activeRotation.institutions[0]\n );\n }\n // Load Files\n if (onChecReadkMyFilesPermissions(myRole.permissions)) {\n yield put(\n Auth.authFetchMyFiles({ belongsTo: \"Users\", ownerId: user._id })\n );\n }\n yield put(TenantSettings.tenantSettingsFetchAll());\n yield put(FileCategories.fileCategoriesFetchFileCategories());\n if (callbackSuccess) {\n callbackSuccess(hasCustomFieldsRequiredNull);\n }\n if (hasCustomFieldsRequiredNull) {\n yield put(CustomFields.customFieldsRequiredTriggerAnimation());\n yield put(\n push({\n pathname: `/my-profile`,\n state: {\n namePage: \"My Profile\",\n },\n })\n );\n }\n } else {\n yield put(Auth.authSignInFailureApp());\n callbackError(\"Not user active\");\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doAuthSignInApp\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Auth.authSignInFailureApp());\n if (callbackError) {\n callbackError(errors);\n }\n }\n}\n\nconst getCustomFieldsRequiredNull = ({ customFields }: any) => {\n if (customFields && customFields.length) {\n const customFieldsRequired = customFields.filter(\n ({ field }: any) => field && field.isRequired\n );\n for (let i = 0; i < customFieldsRequired.length; i++) {\n const {\n field: { model, permissions },\n value,\n } = customFieldsRequired[i];\n if (\n permissions[model] === \"write\" &&\n (value === null || value === undefined)\n ) {\n return true;\n }\n }\n }\n return false;\n};\n\nconst getContactInfoAddressesFieldsRequiredNull = ({\n contactInfo,\n addresses,\n}: any) => {\n if (!contactInfo || !addresses) {\n return true;\n } else {\n if (contactInfo && contactInfo.length > 0) {\n const indexFieldCellPhone = contactInfo\n .map(({ label }: any) => label)\n .indexOf(\"Cell Phone\");\n if (indexFieldCellPhone > -1) {\n const { value } = contactInfo[indexFieldCellPhone];\n if (!value) {\n return true;\n }\n }\n }\n if (addresses && addresses.length > 0) {\n const { address1, city, state, zipCode } = addresses[0];\n if (!address1) {\n return true;\n } else if (!city) {\n return true;\n } else if (!state) {\n return true;\n } else if (!zipCode) {\n return true;\n }\n }\n }\n return false;\n};\n\nconst getEmergencyContactFieldsRequiredNull = ({\n role,\n emergencyContact,\n}: any) => {\n if (role && role === \"Students\") {\n if (!emergencyContact) {\n return true;\n } else if (emergencyContact && !emergencyContact.contactPerson) {\n return true;\n } else if (emergencyContact && !emergencyContact.phoneNumber1) {\n return true;\n } else if (emergencyContact && !emergencyContact.email) {\n return true;\n } else if (emergencyContact && !emergencyContact.address1) {\n return true;\n } else if (emergencyContact && !emergencyContact.city) {\n return true;\n } else if (emergencyContact && !emergencyContact.state) {\n return true;\n } else if (emergencyContact && !emergencyContact.zipCode) {\n return true;\n }\n }\n return false;\n};\n\nfunction* doMergeMyUserAccount(user: any) {\n const accessControlRoleUser: any[] = yield select(\n ({ accessControl: { roles } }) =>\n roles.filter(({ apiName }: any) => apiName === user.role)\n );\n const { tenantSettings }: { tenantSettings: any } = yield select(\n ({ tenantSettings }) => tenantSettings\n );\n const hasToCheckRequiredFields =\n tenantSettings[\"ACCOUNTS_PROFILE_REQUIRED_FIELDS\"].valuesApi;\n const hasContactInfoAddressesFieldsRequiredNull = hasToCheckRequiredFields\n ? getContactInfoAddressesFieldsRequiredNull(user)\n : false;\n const hasEmergencyContactFieldsRequiredNull = hasToCheckRequiredFields\n ? getEmergencyContactFieldsRequiredNull(user)\n : false;\n const hasCustomFieldsRequiredNull = hasToCheckRequiredFields\n ? getCustomFieldsRequiredNull(user)\n : false;\n window.logger.warn(\n \"doMergeMyUserAccount\",\n user,\n accessControlRoleUser,\n \"hasContactInfoAddressesFieldsRequiredNull\",\n hasContactInfoAddressesFieldsRequiredNull,\n \"hasEmergencyContactFieldsRequiredNull\",\n hasEmergencyContactFieldsRequiredNull,\n \"hasCustomFieldsRequiredNull: \",\n hasCustomFieldsRequiredNull\n );\n yield put(\n Auth.authUpdateMyUserAccountSuccess({\n user,\n role:\n accessControlRoleUser && accessControlRoleUser.length === 1\n ? accessControlRoleUser[0]\n : null,\n hasContactInfoAddressesFieldsRequiredNull,\n hasEmergencyContactFieldsRequiredNull,\n hasCustomFieldsRequiredNull,\n })\n );\n}\n\nfunction* doAuthUpdateMyUserAccount(action: Action) {\n yield put(Auth.authUpdateMyUserAccountRequest());\n window.logger.log(\"doAuthUpdateMyUserAccount\", action);\n try {\n yield call(\n // @ts-ignore\n doAccessControlReturnRoles,\n AccessControl.accessControlFetchRoles()\n );\n yield put(CustomFields.customFieldsFetchCustomFields());\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n const { userId, myRole } = yield select(({ auth: { user, role } }) => ({\n userId: user._id,\n myRole: role,\n }));\n yield put(\n AccountSettings.accountSettingsFetchMySettings({\n userId,\n userRoleType: myRole.type,\n })\n );\n const myRoles = getMyOptionsRoles(myRole);\n if (myRoles && myRoles.length > 0) {\n if (onCheckUsersManagerPermissions(myRole.permissions)) {\n yield put(UsersManager.usersManagerFiltersSetRoles({ roles: myRoles }));\n yield put(\n Users.usersFetchUsersKpis({ limit: USER_MANAGER_USER_LIMIT })\n );\n }\n if (\n myRoles.filter(\n ({ apiName }: any) => apiName === \"Students\" || apiName === \"Alumnis\"\n ).length > 0\n ) {\n if (onCheckReadProgramsPermissions(myRole.permissions)) {\n yield put(Programs.programsFetchPrograms());\n }\n if (onCheckReadCohortsPermissions(myRole.permissions)) {\n yield put(Cohorts.cohortsFetchCohorts());\n }\n }\n if (onCheckReadInstitutionsPermissions(myRole.permissions)) {\n yield put(Institutions.institutionsFetchInstitutions());\n }\n }\n // call the api to update my user account from specific userId\n const { data } = yield call(AuthApi.GetMyUserAccount, api, userId, {\n token,\n });\n const { user } = data;\n const accountsAvailable: object[] = yield doAuthGetMyAccounts(user.email);\n const {\n notifications: {\n all: { length: loadedNotifications },\n },\n totalNotifications,\n } = yield select(({ notifications }) => notifications);\n if (totalNotifications === 0 || totalNotifications > loadedNotifications) {\n yield put(Notifications.notificationsFetchNotifications());\n }\n if (user.company) {\n yield put(Company.companyFetchCompany({ companyId: user.company._id }));\n }\n if (user.institution) {\n yield call(doMergeMyInstitutionAccount, user.institution);\n yield put(\n Auth.authFetchMyInstitution({ institutionId: user.institution._id })\n );\n }\n if (\n user.activeRotation &&\n user.activeRotation.institutions &&\n user.activeRotation.institutions.length > 0\n ) {\n yield call(\n doMergeMyInstitutionAccount,\n user.activeRotation.institutions[0]\n );\n }\n yield call(doMergeMyUserAccount, { ...user, accountsAvailable });\n // Load Files\n if (onChecReadkMyFilesPermissions(myRole.permissions)) {\n yield put(\n Auth.authFetchMyFiles({ belongsTo: \"Users\", ownerId: user._id })\n );\n }\n yield put(TenantSettings.tenantSettingsFetchAll());\n yield put(FileCategories.fileCategoriesFetchFileCategories());\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doAuthUpdateMyUserAccount\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Auth.authUpdateMyUserAccountFailure());\n }\n}\n\nfunction* doAuthFetchMyFiles(\n action: Action<\n string,\n {\n belongsTo: \"Users\" | \"Companies\" | \"Institutions\";\n ownerId: string;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Auth.authFetchMyFilesRequest());\n window.logger.log(\"doAuthFetchMyFiles\", action);\n const {\n belongsTo,\n ownerId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to fetch my files\n const { data } = yield call(AuthApi.GetMyFiles, api, belongsTo, ownerId, {\n token,\n });\n const { files } = data;\n yield put(Auth.authFetchMyFilesSuccess({ files }));\n if (callbackSuccess) {\n callbackSuccess(files);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doAuthFetchMyFiles\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Auth.authFetchMyFilesFailure());\n if (callbackError) {\n callbackError(errors);\n }\n }\n}\n\nconst getRolesInstitutionCustomFieldsRequiredNull = ({ customFields }: any) => {\n if (customFields && customFields.length) {\n const customFieldsRequired = customFields.filter(\n ({ field }: any) => field && field.isRequired\n );\n for (let i = 0; i < customFieldsRequired.length; i++) {\n const {\n field: { permissions },\n value,\n } = customFieldsRequired[i];\n const rolesWrite = Object.keys(permissions).filter(\n (role) => permissions[role] === \"write\"\n );\n for (let j = 0; j < rolesWrite.length; j++) {\n const roleWrite = rolesWrite[j];\n if (\n permissions[roleWrite] === \"write\" &&\n (value === null || value === undefined)\n ) {\n return rolesWrite;\n }\n }\n }\n }\n return [];\n};\n\nfunction* doMergeMyInstitutionAccount(institution: Object) {\n const { tenantSettings }: { tenantSettings: any } = yield select(\n ({ tenantSettings }) => tenantSettings\n );\n const hasToCheckRequiredFields =\n tenantSettings[\"ACCOUNTS_INSTITUTION_REQUIRED_FIELDS\"].valuesApi;\n const hasMyInstitutionCustomFieldsRequiredNull = hasToCheckRequiredFields\n ? getRolesInstitutionCustomFieldsRequiredNull(institution)\n : false;\n window.logger.warn(\n \"doMergeMyInstitutionAccount\",\n institution,\n \"hasMyInstitutionCustomFieldsRequiredNull: \",\n hasMyInstitutionCustomFieldsRequiredNull\n );\n yield put(\n Auth.authFetchMyInstitutionSuccess({\n institution,\n hasMyInstitutionCustomFieldsRequiredNull:\n hasMyInstitutionCustomFieldsRequiredNull &&\n hasMyInstitutionCustomFieldsRequiredNull.length\n ? {\n institutionRequired: institution,\n rolesWrite: hasMyInstitutionCustomFieldsRequiredNull,\n isRequired: true,\n }\n : null,\n })\n );\n}\n\nfunction* doAuthFetchMyInstitution(\n action: Action<\n string,\n {\n institutionId: string;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Auth.authFetchMyInstitutionRequest());\n window.logger.log(\"doAuthFetchMyInstitution\", action);\n const { institutionId } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to fetch my institution from specific\n const { data } = yield call(AuthApi.GetMyInstitution, api, institutionId, {\n token,\n });\n const { institution } = data;\n yield call(doMergeMyInstitutionAccount, institution);\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doAuthFetchMyInstitution\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Auth.authFetchMyInstitutionFailure());\n }\n}\n\nfunction* doAuthCheckSessionExpiredApp(\n action: Action void; errors?: any }>\n) {\n window.logger.log(\"doAuthCheckSessionExpiredApp\", action);\n try {\n const { expiredToken } = yield select(({ auth: { expiredToken } }) => ({\n expiredToken,\n }));\n if (expiredToken && checkTokenExpired(expiredToken)) {\n window.logger.warn(\n \"doAuthCheckSessionExpiredApp - expiredToken\",\n expiredToken,\n true\n );\n action.payload.goToSignOut();\n yield put(Auth.authSessionExpiredApp());\n } else if (action && action.payload && action.payload.errors) {\n const { error } = action.payload.errors;\n if (error === \"Unauthorized\") {\n window.logger.warn(\n \"doAuthCheckSessionExpiredApp - expiredToken\",\n action.payload.errors\n );\n yield put(\n push({\n pathname: `/signout/session-expired`,\n state: {\n namePage: \"Sign Out\",\n },\n })\n );\n yield put(Auth.authSessionExpiredApp());\n }\n }\n } catch (errors) {\n window.logger.error(\"ErrorSaga - doAuthCheckSessionExpiredApp\", errors);\n return;\n }\n}\n\nfunction* doAuthSignOutApp(\n action: Action<\n string,\n {\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Auth.authSignOutRequestApp());\n window.logger.log(\"doSignOutApp\", action);\n const { callbackSuccess, callbackError } = action.payload;\n const socket: { [k: string]: any } = yield select(\n ({ notifications: { socket } }) => socket\n );\n if (socket) {\n socket.disconnect();\n }\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to sign out some user\n yield call(AuthApi.SignOut, api, { token });\n yield put(Auth.authSignOutSuccessApp());\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (errors) {\n window.logger.error(\"ErrorSaga - doAuthSignOutApp\", errors);\n yield put(Auth.authSignOutFailureApp());\n if (callbackError) {\n callbackError(errors);\n }\n }\n}\n\nexport default function* authSagas(): Generator {\n yield all([\n takeLatest(Auth.AUTH_SWITCH_ACCOUNT, doAuthSwitchAccount),\n takeLatest(Auth.AUTH_SIGNIN_APP, doAuthSignInApp),\n takeLatest(Auth.AUTH_UPDATE_MY_USER_ACCOUNT, doAuthUpdateMyUserAccount),\n takeLatest(Auth.AUTH_FETCH_MY_FILES, doAuthFetchMyFiles),\n takeLatest(Auth.AUTH_FETCH_MY_INSTITUTION, doAuthFetchMyInstitution),\n takeLatest(\n Auth.AUTH_CHECK_SESSION_EXPIRED_APP,\n doAuthCheckSessionExpiredApp\n ),\n takeLatest(Auth.AUTH_SIGNOUT_APP, doAuthSignOutApp),\n ]);\n}\n","import type { Config, tAPI } from \"./API\";\n// API Broadcast Messages static class\n\nconst apiBaseBroadcastMessages = \"/tenant-settings/broadcast-messages\";\nexport default class BroadcastMessages {\n // Get a list of Broadcast Messages expired\n static GetBroadcastMessages(\n api: tAPI,\n expirationDate: string,\n config?: Config\n ) {\n let queryParams = \"\";\n if (expirationDate) {\n queryParams += `&expirationDate=${expirationDate}`;\n }\n return api.GET(\n `/tenant-settings?name=BROADCAST_MESSAGES${queryParams}`,\n config\n );\n }\n // Create a Broadcast Message\n static CreateBroadcastMessage(api: tAPI, data: object, config?: Config) {\n return api.POST(`${apiBaseBroadcastMessages}`, data, config);\n }\n // Edit a Broadcast Message\n static EditBroadcastMessage(\n api: tAPI,\n broadcastMessageId: string,\n data: object,\n config?: Config\n ) {\n return api.PATCH(\n `${apiBaseBroadcastMessages}/${broadcastMessageId}`,\n data,\n config\n );\n }\n // Delete a Broadcast Message\n static DeleteBroadcastMessage(\n api: tAPI,\n broadcastMessageId: string,\n config?: Config\n ) {\n return api.DELETE(\n `${apiBaseBroadcastMessages}/${broadcastMessageId}`,\n config\n );\n }\n}\n","import { put, select, call, all, takeLatest } from \"redux-saga/effects\";\nimport BroadcastMessagesApi from \"../api/BroadcastMessages\";\nimport { Auth, BroadcastMessages, TenantSettings } from \"../actions/\";\n// Type\nimport type { Action } from \"deox\";\nimport type { tAPI } from \"../api/API\";\n//Sagas for broadcast Messages\nfunction* doBroadcastMessagesFetchMessages(\n action: Action<\n string,\n {\n expirationDate: string;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n try {\n window.logger.log(\"doBroadcastMessagesFetchMessages\", action);\n const { expirationDate = \"\", callbackSuccess = null } =\n action.payload || {};\n yield put(BroadcastMessages.broadcastMessagesFetchMessagesRequest());\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get all broadcast messages\n const { data } = yield call(\n BroadcastMessagesApi.GetBroadcastMessages,\n api,\n expirationDate,\n { token }\n );\n const { tenantSettings: broadcastMessages } = data;\n yield put(\n BroadcastMessages.broadcastMessagesFetchMessagesSuccess({\n broadcastMessages,\n })\n );\n if (callbackSuccess) {\n callbackSuccess(broadcastMessages);\n }\n } catch (error: any) {\n const { callbackError = null } = action.payload || {};\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doBroadcastMessagesFetchMessages\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(BroadcastMessages.broadcastMessagesFetchMessagesFailure());\n if (callbackError) {\n callbackError(error);\n }\n }\n}\nfunction* doBroadcastMessagesSetMessages(\n action: Action<\n string,\n {\n broadcastMessagesSettings: { [k: string]: any }[];\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n window.logger.log(\"doBroadcastMessagesSetMessages\", action);\n const {\n broadcastMessagesSettings = [],\n callbackSuccess = null,\n callbackError = null,\n } = action.payload || {};\n let broadcastMessages = [],\n broadcastMessagesSettingsValue = [];\n try {\n const { role: userRole, ...authUser } = yield select(\n ({ auth: { user } }) => user\n );\n if (broadcastMessagesSettings.length > 0) {\n ({ value: broadcastMessagesSettingsValue } =\n broadcastMessagesSettings[0]);\n broadcastMessagesSettingsValue = broadcastMessagesSettingsValue.filter(\n ({ roles }: any) => roles.indexOf(userRole) !== -1\n );\n switch (userRole) {\n case \"Students\":\n const { activeRotation, currentEnrollment } = authUser;\n for (let index in broadcastMessagesSettingsValue) {\n const {\n programs = [],\n cohorts = [],\n institutions = [],\n } = broadcastMessagesSettingsValue[index];\n let messagesBelongToThisUser = true;\n if (programs.length > 0) {\n if (currentEnrollment) {\n const { program } = currentEnrollment;\n if (programs.indexOf(program._id) === -1) {\n messagesBelongToThisUser = false;\n }\n } else {\n messagesBelongToThisUser = false;\n }\n }\n if (cohorts.length > 0) {\n if (currentEnrollment) {\n const { cohort } = currentEnrollment;\n if (cohorts.indexOf(cohort._id) === -1) {\n messagesBelongToThisUser = false;\n } else {\n messagesBelongToThisUser = true;\n }\n } else {\n messagesBelongToThisUser = false;\n }\n }\n if (institutions.length > 0) {\n if (activeRotation) {\n const { institutions: studentsInstitutions = [] } =\n activeRotation;\n if (\n studentsInstitutions.filter(\n ({ _id: institutionId }: any) =>\n institutions.indexOf(institutionId) !== -1\n ).length === 0\n ) {\n messagesBelongToThisUser = false;\n } else {\n messagesBelongToThisUser = true;\n }\n }\n }\n if (messagesBelongToThisUser) {\n broadcastMessages.push(broadcastMessagesSettingsValue[index]);\n }\n }\n break;\n case \"InstitutionAdministrators\":\n case \"Preceptors\":\n const { institution } = authUser;\n for (let index in broadcastMessagesSettingsValue) {\n const { institutions = [] } = broadcastMessagesSettingsValue[index];\n let messagesBelongToThisUser = true;\n if (institutions.length > 0) {\n const { _id: institutionId } = institution;\n if (institutions.indexOf(institutionId) === -1) {\n messagesBelongToThisUser = false;\n }\n }\n if (messagesBelongToThisUser) {\n broadcastMessages.push(broadcastMessagesSettingsValue[index]);\n }\n }\n break;\n default:\n broadcastMessages = [...broadcastMessagesSettingsValue];\n break;\n }\n }\n yield put(\n BroadcastMessages.broadcastMessagesSaveMessages({ broadcastMessages })\n );\n if (callbackSuccess) {\n callbackSuccess(broadcastMessages);\n }\n } catch (error: any) {\n window.logger.error(\"ErrorSaga - doBroadcastMessagesSetMessages\", error);\n if (callbackError) {\n callbackError(error);\n }\n }\n}\n\nfunction* doBroadcastMessagesCreate(\n action: Action<\n string,\n {\n body: object;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(BroadcastMessages.broadcastMessagesCreateRequest());\n window.logger.log(\"doBroadcastMessagesCreate\", action);\n const { body, callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to create a new broadcast Message\n yield call(BroadcastMessagesApi.CreateBroadcastMessage, api, body, {\n token,\n });\n yield put(BroadcastMessages.broadcastMessagesCreateSuccess());\n yield put(TenantSettings.tenantSettingsFetchAll());\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doBroadcastMessagesCreate\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(BroadcastMessages.broadcastMessagesCreateFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doBroadcastMessagesEdit(\n action: Action<\n string,\n {\n broadcastMessageId: string;\n body: object;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(BroadcastMessages.broadcastMessagesEditRequest());\n window.logger.log(\"doBroadcastMessagesEdit\", action);\n const {\n broadcastMessageId,\n body,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to update a broadcast Message for that specific broadcastMessageId\n yield call(\n BroadcastMessagesApi.EditBroadcastMessage,\n api,\n broadcastMessageId,\n body,\n { token }\n );\n yield put(BroadcastMessages.broadcastMessagesEditSuccess());\n yield put(TenantSettings.tenantSettingsFetchAll());\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doBroadcastMessagesEdit\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(BroadcastMessages.broadcastMessagesEditFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doBroadcastMessagesDelete(\n action: Action<\n string,\n {\n broadcastMessageId: string;\n callbackSuccess?: () => void;\n callbackError?: (error: any, details: any) => void;\n }\n >\n) {\n yield put(BroadcastMessages.broadcastMessagesDeleteRequest());\n window.logger.log(\"doBroadcastMessagesDelete\", action);\n const {\n broadcastMessageId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to delete a broadcast Message for that specific broadcastMessageId\n yield call(\n BroadcastMessagesApi.DeleteBroadcastMessage,\n api,\n broadcastMessageId,\n { token }\n );\n yield put(BroadcastMessages.broadcastMessagesDeleteSuccess());\n yield put(TenantSettings.tenantSettingsFetchAll());\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doBroadcastMessagesDelete\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(BroadcastMessages.broadcastMessagesDeleteFailure());\n const { message, details } = errors || \"\";\n if (callbackError) {\n callbackError(message, details);\n }\n }\n}\n\nexport default function* broadcastMessagesSagas(): Generator {\n yield all([\n takeLatest(\n BroadcastMessages.BROADCAST_MESSAGES_FETCH_MESSAGES,\n doBroadcastMessagesFetchMessages\n ),\n takeLatest(\n BroadcastMessages.BROADCAST_MESSAGES_SET_MESSAGES,\n doBroadcastMessagesSetMessages\n ),\n takeLatest(\n BroadcastMessages.BROADCAST_MESSAGES_CREATE,\n doBroadcastMessagesCreate\n ),\n takeLatest(\n BroadcastMessages.BROADCAST_MESSAGES_EDIT,\n doBroadcastMessagesEdit\n ),\n takeLatest(\n BroadcastMessages.BROADCAST_MESSAGES_DELETE,\n doBroadcastMessagesDelete\n ),\n ]);\n}\n","import type { Config, tAPI } from \"./API\";\nimport type { StateUsersManager } from \"../../types/users.types\";\n// API CaseLogs static class\nconst apiBaseCaseLogs = \"/case-logs\";\nexport default class CaseLogs {\n // Get a list of case logs depend on case:\n // student: UserID, preceptor: UserID, institution: InstitutionID)\n static GetCaseLogs(\n api: tAPI,\n populated: boolean,\n skip: number,\n limit: number,\n status: string[],\n userStatus: StateUsersManager[\"filters\"][\"status\"],\n students: string[],\n programs: string[],\n cohorts: string[],\n preceptors: string[],\n institutions: string[],\n procedures: string[],\n institutionRecordNumber: string[],\n search: string,\n startDate: string,\n endDate: string,\n appointmentDateFrom: string,\n appointmentDateTo: string,\n sortBy: {\n student: \"ascending\" | \"descending\" | \"\";\n preceptor: \"ascending\" | \"descending\" | \"\";\n institution: \"ascending\" | \"descending\" | \"\";\n createdAt: \"ascending\" | \"descending\" | \"\";\n status: \"ascending\" | \"descending\" | \"\";\n },\n config?: Config\n ) {\n let queryParams = \"\";\n if (skip >= 0) {\n queryParams += `&skip=${skip}`;\n }\n if (limit > 0) {\n queryParams += `&limit=${limit}`;\n }\n if (status.length > 0) {\n queryParams += `&status=${status.join()}`;\n }\n if (userStatus.length > 0) {\n queryParams += `&userStatus=${userStatus.join()}`;\n }\n if (students.length > 0) {\n queryParams += `&students=${students.join()}`;\n }\n if (programs.length > 0) {\n queryParams += `&programs=${programs.join()}`;\n }\n if (cohorts.length > 0) {\n queryParams += `&cohorts=${cohorts.join()}`;\n }\n if (preceptors.length > 0) {\n queryParams += `&preceptors=${preceptors.join()}`;\n }\n if (institutions.length > 0) {\n queryParams += `&institutions=${institutions.join()}`;\n }\n if (procedures.length > 0) {\n queryParams += `&procedures=${procedures.join()}`;\n }\n if (institutionRecordNumber.length > 0) {\n queryParams += `&clinicRecordNumber=${institutionRecordNumber.join()}`;\n }\n if (search) {\n queryParams += `&search=${search}`;\n }\n if (startDate) {\n queryParams += `&from=${startDate}`;\n }\n if (endDate) {\n queryParams += `&to=${endDate}`;\n }\n if (appointmentDateFrom) {\n queryParams += `&appointmentDateFrom=${appointmentDateFrom}`;\n }\n if (appointmentDateTo) {\n queryParams += `&appointmentDateTo=${appointmentDateTo}`;\n }\n if (populated) {\n let sortByParams = Object.keys(sortBy)\n // @ts-ignore\n .filter((sortKey) => sortBy[sortKey])\n .map(\n (sortName) =>\n // @ts-ignore\n `sort_${sortName}=${sortBy[sortName] === \"ascending\" ? 1 : -1}`\n )\n .join(\"&\");\n if (sortByParams) {\n sortByParams = \"&\" + sortByParams;\n }\n queryParams = \"?populated=true\" + queryParams + sortByParams;\n } else if (queryParams.length > 0) {\n queryParams = \"?\" + queryParams.slice(1);\n }\n return api.GET(`${apiBaseCaseLogs}${queryParams}`, config);\n }\n // Get Case Logs KPIS\n static GetCaseLogsKpis(api: tAPI, config?: Config) {\n return api.GET(`${apiBaseCaseLogs}/kpis`, config);\n }\n // Create a Case Log\n static CreateCaseLog(api: tAPI, data: object, config?: Config) {\n return api.UPLOAD(`${apiBaseCaseLogs}`, data, \"POST\", config);\n // return api.POST(`${apiBaseCaseLogs}`, data, config);\n }\n // Get a Case Log\n static GetCaseLog(api: tAPI, caseLogId: string, config?: Config) {\n return api.GET(`${apiBaseCaseLogs}/${caseLogId}?populated=true`, config);\n }\n // Edit a Case Log\n static EditCaseLog(\n api: tAPI,\n caseLogId: string,\n data: object,\n config?: Config\n ) {\n return api.PATCH(`${apiBaseCaseLogs}/${caseLogId}`, data, config);\n }\n // Delete a Case Log\n static DeleteCaseLog(api: tAPI, caseLogId: string, config?: Config) {\n return api.DELETE(`${apiBaseCaseLogs}/${caseLogId}`, config);\n }\n // Review a Case Log\n static ReviewCaseLog(\n api: tAPI,\n caseLogId: string,\n data: object,\n config?: Config\n ) {\n return api.PATCH(`${apiBaseCaseLogs}/${caseLogId}/review`, data, config);\n }\n}\n","import axios from \"axios\";\nimport {\n put,\n select,\n call,\n all,\n takeEvery,\n takeLatest,\n} from \"redux-saga/effects\";\nimport CaseLogsApi from \"../api/CaseLogs\";\nimport { Api, Auth, CaseLogs } from \"../actions/\";\nimport { setUTCtime } from \"../../utils/\";\n// Type\nimport type { Action } from \"deox\";\nimport type { tAPI } from \"../api/API\";\nimport type { CancelRequest, State } from \"../reducers/api\";\nimport type { StateUsersManager } from \"../../types/users.types\";\n//Sagas for CaseLogs\nfunction* doCaseLogsFetchAll(\n action: Action<\n string,\n {\n populated?: boolean;\n page?: number;\n limit?: number;\n searchTxt?: string;\n status?: string[];\n userStatus?: StateUsersManager[\"filters\"][\"status\"];\n students?: string[];\n programs?: string[];\n cohorts?: string[];\n preceptors?: string[];\n institutions?: string[];\n procedures?: string[];\n institutionRecordNumber?: string[];\n startDate?: string;\n endDate?: string;\n appointmentDateFrom?: string;\n appointmentDateTo?: string;\n sortBy?: {\n student: \"ascending\" | \"descending\" | \"\";\n preceptor: \"ascending\" | \"descending\" | \"\";\n institution: \"ascending\" | \"descending\" | \"\";\n createdAt: \"ascending\" | \"descending\" | \"\";\n status: \"ascending\" | \"descending\" | \"\";\n };\n callbackSuccess?: (data: any, metadata: any) => void;\n callbackError?: (\n error: any,\n details: any,\n isAPICancelled: boolean\n ) => void;\n }\n >\n) {\n yield put(CaseLogs.caseLogsFetchAllRequest());\n window.logger.log(\"doCaseLogsFetchAll\", action);\n const {\n callbackSuccess = null,\n callbackError = null,\n ...payload\n } = action.payload || {};\n try {\n const { frontendPersonalization } = yield select(\n ({ accountSettings }) => accountSettings\n );\n let caseLogsSortBy: {\n student: \"ascending\" | \"descending\" | \"\";\n preceptor: \"ascending\" | \"descending\" | \"\";\n institution: \"ascending\" | \"descending\" | \"\";\n createdAt: \"ascending\" | \"descending\" | \"\";\n status: \"ascending\" | \"descending\" | \"\";\n } = {\n student: \"\",\n preceptor: \"\",\n institution: \"\",\n createdAt: \"\",\n status: \"\",\n };\n if (\n frontendPersonalization &&\n frontendPersonalization[\"CASE_LOGS_SETTINGS\"]\n ) {\n caseLogsSortBy = frontendPersonalization[\"CASE_LOGS_SETTINGS\"].sortBy;\n }\n const {\n populated = true,\n page = 1,\n limit = 0,\n searchTxt = \"\",\n status = [],\n userStatus = [],\n students = [],\n programs = [],\n cohorts = [],\n preceptors = [],\n institutions = [],\n procedures = [],\n institutionRecordNumber = [],\n startDate = \"\",\n endDate = \"\",\n appointmentDateFrom = \"\",\n appointmentDateTo = \"\",\n sortBy = caseLogsSortBy,\n } = payload || {};\n const skip = (page - 1) * limit;\n // Api\n const {\n api,\n cancelRequests,\n token,\n }: {\n api: tAPI;\n cancelRequests: State[\"cancelRequests\"];\n token: State[\"token\"];\n } = yield select(({ api }) => api);\n const [cancelRequest] = cancelRequests.filter(\n (cancelRequest: CancelRequest) => cancelRequest.key === \"GET_CASE_LOGS\"\n );\n if (cancelRequest && cancelRequest.source) {\n cancelRequest.source.cancel(\"Request has been cancelled\");\n yield put(\n Api.removeCancelTokenAPI({\n cancelRequest: {\n key: \"GET_CASE_LOGS\",\n },\n })\n );\n }\n // Call the api to get all caseLogs for this company\n const CancelToken = axios.CancelToken,\n source = CancelToken.source();\n yield put(\n Api.addCancelTokenAPI({\n cancelRequest: {\n key: \"GET_CASE_LOGS\",\n source,\n },\n })\n );\n const { data } = yield call(\n CaseLogsApi.GetCaseLogs,\n api,\n populated,\n skip,\n limit,\n status,\n userStatus,\n students,\n programs,\n cohorts,\n preceptors,\n institutions,\n procedures,\n institutionRecordNumber,\n searchTxt,\n startDate,\n endDate,\n appointmentDateFrom,\n appointmentDateTo,\n sortBy,\n { cancelToken: source.token, token }\n );\n yield put(\n Api.removeCancelTokenAPI({\n cancelRequest: {\n key: \"GET_CASE_LOGS\",\n },\n })\n );\n const { caseLogs, metadata } = data;\n yield put(\n CaseLogs.caseLogsFetchAllSuccess({\n caseLogs,\n caseLogsStatus: status,\n metadata,\n })\n );\n if (callbackSuccess) {\n callbackSuccess(caseLogs, metadata);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doCaseLogsFetchAll\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n const { message, details, status } = errors || \"\";\n const isAPICancelled = status === \"cancelled\";\n if (isAPICancelled) {\n yield put(\n Api.removeCancelTokenAPI({\n cancelRequest: {\n key: \"GET_CASE_LOGS\",\n },\n })\n );\n }\n yield put(CaseLogs.caseLogsFetchAllFailure());\n if (callbackError) {\n callbackError(message, details, isAPICancelled);\n }\n }\n}\n\nfunction* doCaseLogsFetchKpis(action: Action) {\n yield put(CaseLogs.caseLogsFetchKpisRequest());\n window.logger.log(\"doCaseLogsFetchKpis\", action);\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n const {\n data: { kpis: CaseLogsKPIS },\n } = yield call(CaseLogsApi.GetCaseLogsKpis, api, { token });\n yield put(\n CaseLogs.caseLogsFetchKpisSuccess({\n kpis: {\n fetching: true,\n CaseLogs: CaseLogsKPIS,\n },\n })\n );\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doCaseLogsFetchKpis\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n const CaseLogsKPIS: object = yield select(({ caseLogs: { kpis } }) => kpis);\n yield put(\n CaseLogs.caseLogsFetchKpisFailure({\n kpis: CaseLogsKPIS,\n })\n );\n }\n}\n\nfunction* doCaseLogsCreate(\n action: Action<\n string,\n {\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any, details: any) => void;\n }\n >\n) {\n yield put(CaseLogs.caseLogsCreateRequest());\n window.logger.log(\"doCaseLogsCreate\", action);\n const { body, callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to create a new case log\n const { data } = yield call(CaseLogsApi.CreateCaseLog, api, body, {\n token,\n });\n const {\n caseLog: { _id },\n } = data;\n // We need to call again because this data is not populated\n const { data: dataCaseLog } = yield call(CaseLogsApi.GetCaseLog, api, _id, {\n token,\n });\n let { caseLog } = dataCaseLog;\n caseLog = {\n ...caseLog,\n lastFetching: new Date(),\n };\n yield put(CaseLogs.caseLogsCreateSuccess({ caseLog }));\n if (callbackSuccess) {\n callbackSuccess(caseLog);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doCaseLogsCreate\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(CaseLogs.caseLogsCreateFailure());\n const { message, details } = errors || \"\";\n if (callbackError) {\n callbackError(message, details);\n }\n }\n}\n\nfunction* doCaseLogsCreateDummy(\n action: Action<\n string,\n {\n body: object;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(CaseLogs.caseLogsCreateDummyRequest());\n window.logger.log(\"doCaseLogsCreateDummy\", action);\n const { body, callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to create a new case log\n yield call(CaseLogsApi.CreateCaseLog, api, body, { token });\n yield put(CaseLogs.caseLogsCreateDummySuccess());\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doCaseLogsCreateDummy\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(CaseLogs.caseLogsCreateDummyFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nconst onCheckClinicalInfoReasonForVisit = (\n reasonForVisit: string | string[]\n) => {\n if (typeof reasonForVisit === \"string\") {\n return [reasonForVisit];\n }\n return reasonForVisit || [];\n};\n\nconst onSetCaseLogCreateEdit = (\n caseLog: { [k: string]: any },\n step: string\n) => {\n const {\n patient,\n appointmentDate,\n reasonForVisit,\n minutesWithPatient,\n minutesWithPreceptor,\n chiefComplaint,\n // diagnosesAndProcedures,\n medicationTaken,\n prescriptionThisVisit,\n psychosocialTopics,\n otherPsychosocialTopic,\n pmcc,\n customFields,\n notes,\n status,\n preceptorComments,\n } = caseLog;\n const {\n age,\n typeAge,\n gender,\n race,\n firstLanguage,\n institutionRecordNumber,\n insurance,\n } = patient || {};\n const caseLogCreateEdit = {\n patientDemographics: {\n age: age || null,\n typeAge: typeAge || \"years\",\n gender: gender || null,\n race: race || null,\n firstLanguage: firstLanguage || null,\n institutionRecordNumber: institutionRecordNumber || null,\n insurance: insurance || null,\n },\n clinicalInfo: {\n appointmentDate: appointmentDate ?? null,\n reasonForVisit: onCheckClinicalInfoReasonForVisit(reasonForVisit),\n minutesWithPatient:\n minutesWithPatient !== undefined && minutesWithPatient !== null\n ? minutesWithPatient.toString()\n : null,\n minutesWithPreceptor:\n minutesWithPreceptor !== undefined && minutesWithPreceptor !== null\n ? minutesWithPreceptor.toString()\n : null,\n chiefComplaint: chiefComplaint ?? null,\n },\n diagnosesAndProcedures: {\n allTeeth: [],\n upperRightTeeth: [],\n upperLeftTeeth: [],\n lowerLeftTeeth: [],\n lowerRightTeeth: [],\n },\n medication: {\n medicationTaken: medicationTaken || [],\n prescriptionThisVisit: prescriptionThisVisit || [],\n },\n psychosocialTopics: {\n psychosocialTopics: psychosocialTopics || [],\n otherPsychosocialTopic: otherPsychosocialTopic || null,\n pmcc: pmcc || null,\n },\n customFields: {\n customFields: customFields\n ? customFields.map(({ fieldType, field, value }: any) => ({\n field: field._id,\n value:\n fieldType === \"number\"\n ? Number(value)\n : fieldType === \"boolean\" && value === null\n ? false\n : value,\n }))\n : [],\n },\n notes: {\n notes: notes || null,\n },\n review: {\n status: status || null,\n preceptorComments: preceptorComments || null,\n },\n step,\n };\n return caseLogCreateEdit;\n};\n\nfunction* doCaseLogsCheckCaseLogsCacheData(\n action: Action<\n string,\n {\n caseLogId: string;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n window.logger.log(\"doCaseLogsCheckCaseLogsCacheData\", action);\n const { caseLogId } = action.payload;\n try {\n const caseLogsCacheDataStore: { [k: string]: any } = yield select(\n ({ caseLogs: { caseLogsCache } }) => caseLogsCache\n );\n let caseLog = caseLogsCacheDataStore.filter(\n ({ _id }: typeof caseLogsCacheDataStore) => _id === caseLogId\n );\n if (caseLog.length) {\n caseLog = caseLog[0];\n if (setUTCtime().isAfter(setUTCtime(caseLog.lastFetching).add(5, \"m\"))) {\n caseLog = null;\n }\n } else {\n caseLog = null;\n }\n return caseLog;\n } catch (error: any) {\n window.logger.error(\"ErrorSaga - doCaseLogsCheckCaseLogsCacheData\", error);\n return null;\n }\n}\n\nfunction* doCaseLogsFetchCaseLog(\n action: Action<\n string,\n {\n caseLogId: string;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(CaseLogs.caseLogsFetchCaseLogRequest());\n window.logger.log(\"doCaseLogsFetchCaseLog\", action);\n const {\n caseLogId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n let caseLog: { [k: string]: any } = yield call(\n doCaseLogsCheckCaseLogsCacheData,\n action\n );\n if (!caseLog) {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get a case log\n const { data } = yield call(CaseLogsApi.GetCaseLog, api, caseLogId, {\n token,\n });\n caseLog = data.caseLog;\n }\n caseLog = {\n ...caseLog,\n lastFetching: new Date(),\n };\n yield put(\n CaseLogs.caseLogsFetchCaseLogSuccess({\n caseLog,\n caseLogCreateEdit: onSetCaseLogCreateEdit(\n caseLog,\n \"patientDemographics\"\n ),\n })\n );\n if (callbackSuccess) {\n callbackSuccess(caseLog);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doCaseLogsFetchCaseLog\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(CaseLogs.caseLogsFetchCaseLogFailure());\n if (callbackError) {\n callbackError(error);\n }\n }\n}\n\nfunction* doCaseLogsEdit(\n action: Action<\n string,\n {\n caseLogId: string;\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any, details: any) => void;\n }\n >\n) {\n yield put(CaseLogs.caseLogsEditRequest());\n window.logger.log(\"doCaseLogsEdit\", action);\n const {\n caseLogId,\n body,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to edit a a case Log for that specific caseLogId\n yield call(CaseLogsApi.EditCaseLog, api, caseLogId, body, { token });\n // We need to call again because this data is not populated\n const { data: dataCaseLog } = yield call(\n CaseLogsApi.GetCaseLog,\n api,\n caseLogId,\n { token }\n );\n let { caseLog } = dataCaseLog;\n caseLog = {\n ...caseLog,\n lastFetching: new Date(),\n };\n const caseLogDataStore: { [k: string]: any } = yield select(\n ({ caseLogs: { caseLog } }) => caseLog\n );\n yield put(\n CaseLogs.caseLogsEditSuccess({\n caseLog,\n caseLogStatusOld: caseLogDataStore.status,\n caseLogCreateEdit: onSetCaseLogCreateEdit(\n caseLog,\n \"patientDemographics\"\n ),\n })\n );\n if (callbackSuccess) {\n callbackSuccess(caseLog);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doCaseLogsEdit\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(CaseLogs.caseLogsEditFailure());\n const { message, details } = errors || \"\";\n if (callbackError) {\n callbackError(message, details);\n }\n }\n}\n\nfunction* doCaseLogsDelete(\n action: Action<\n string,\n {\n caseLogId: string;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(CaseLogs.caseLogsDeleteRequest());\n window.logger.log(\"doCaseLogsDelete\", action);\n const {\n caseLogId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to delete a case Log for that specific caseLogId\n yield call(CaseLogsApi.DeleteCaseLog, api, caseLogId, { token });\n yield put(CaseLogs.caseLogsDeleteSuccess({ caseLogId }));\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doCaseLogsDelete\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(CaseLogs.caseLogsDeleteFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doCaseLogsReview(\n action: Action<\n string,\n {\n caseLogId: string;\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(CaseLogs.caseLogsReviewRequest());\n window.logger.log(\"doCaseLogsReview\", action);\n const {\n caseLogId,\n body,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to review a case log for that caseLogId and status: denied or approved\n yield call(CaseLogsApi.ReviewCaseLog, api, caseLogId, body, { token });\n // We need to call again because this data is not populated\n const { data: dataCaseLog } = yield call(\n CaseLogsApi.GetCaseLog,\n api,\n caseLogId,\n { token }\n );\n let { caseLog } = dataCaseLog;\n caseLog = {\n ...caseLog,\n lastFetching: new Date(),\n };\n const caseLogDataStore: { [k: string]: any } = yield select(\n ({ caseLogs: { caseLog } }) => caseLog\n );\n yield put(\n CaseLogs.caseLogsReviewSuccess({\n caseLog,\n caseLogStatusOld: caseLogDataStore.status,\n caseLogCreateEdit: onSetCaseLogCreateEdit(\n caseLog,\n \"patientDemographics\"\n ),\n })\n );\n if (callbackSuccess) {\n callbackSuccess(caseLog);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doCaseLogsReview\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(CaseLogs.caseLogsReviewFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nexport default function* caseLogsSagas(): Generator {\n yield all([\n takeLatest(CaseLogs.CASELOGS_FETCH_ALL, doCaseLogsFetchAll),\n takeLatest(CaseLogs.CASELOGS_FETCH_KPIS, doCaseLogsFetchKpis),\n takeLatest(CaseLogs.CASELOGS_CREATE, doCaseLogsCreate),\n takeEvery(CaseLogs.CASELOGS_CREATE_DUMMY, doCaseLogsCreateDummy),\n takeLatest(CaseLogs.CASELOGS_FETCH_CASELOG, doCaseLogsFetchCaseLog),\n takeLatest(CaseLogs.CASELOGS_EDIT, doCaseLogsEdit),\n takeLatest(CaseLogs.CASELOGS_DELETE, doCaseLogsDelete),\n takeLatest(CaseLogs.CASELOGS_REVIEW, doCaseLogsReview),\n ]);\n}\n","import type { Config, tAPI } from \"./API\";\n// API Cohorts static class\n\nconst apiBaseCohorts = \"/cohorts\";\nexport default class Cohorts {\n // Get a list of cohorts\n static GetCohorts(api: tAPI, config?: Config) {\n return api.GET(`${apiBaseCohorts}`, config);\n }\n // Create a Cohort\n static CreateCohort(api: tAPI, data: object, config?: Config) {\n return api.POST(`${apiBaseCohorts}`, data, config);\n }\n // Edit a Cohort\n static EditCohort(\n api: tAPI,\n cohortId: string,\n data: object,\n config?: Config\n ) {\n return api.PATCH(`${apiBaseCohorts}/${cohortId}`, data, config);\n }\n // Delete a Cohort\n static DeleteCohort(api: tAPI, cohortId: string, config?: Config) {\n return api.DELETE(`${apiBaseCohorts}/${cohortId}`, config);\n }\n}\n","import { put, select, call, all, takeLatest } from \"redux-saga/effects\";\nimport sortBy from \"lodash/sortBy\";\nimport CohortsApi from \"../api/Cohorts\";\nimport { Auth, Cohorts } from \"../actions/\";\n// Type\nimport type { Action } from \"deox\";\nimport type { tAPI } from \"../api/API\";\n//Sagas for Cohorts\nfunction* doCohortsFetchCohorts(\n action: Action<\n string,\n {\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Cohorts.cohortsFetchCohortsRequest());\n window.logger.log(\"doCohortsFetchCohorts\", action);\n const { callbackSuccess = null, callbackError = null } = action.payload || {};\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get all cohorts for this company\n const { data } = yield call(CohortsApi.GetCohorts, api, { token });\n const { cohorts } = data;\n const cohortsSortByName = sortBy(cohorts, [\"name\"]).reverse();\n yield put(\n Cohorts.cohortsFetchCohortsSuccess({ cohorts: cohortsSortByName })\n );\n if (callbackSuccess) {\n callbackSuccess(cohortsSortByName);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doCohortsFetchCohorts\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Cohorts.cohortsFetchCohortsFailure());\n if (callbackError) {\n callbackError(error);\n }\n }\n}\n\nfunction* doCohortsCreate(\n action: Action<\n string,\n {\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Cohorts.cohortsCreateRequest());\n window.logger.log(\"doCohortsCreate\", action);\n const { body, callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to create a new cohort\n const { data } = yield call(CohortsApi.CreateCohort, api, body, { token });\n const { cohort } = data;\n yield put(Cohorts.cohortsCreateSuccess({ cohort }));\n if (callbackSuccess) {\n callbackSuccess(cohort);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doCohortsCreate\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Cohorts.cohortsCreateFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doCohortsEditCohort(\n action: Action<\n string,\n {\n cohortId: string;\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Cohorts.cohortsEditCohortRequest());\n window.logger.log(\"doCohortsEditCohort\", action);\n const {\n cohortId,\n body,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to update a cohort for that specific cohortId\n const { data } = yield call(CohortsApi.EditCohort, api, cohortId, body, {\n token,\n });\n const { cohort } = data;\n yield put(Cohorts.cohortsEditCohortSuccess({ cohort }));\n if (callbackSuccess) {\n callbackSuccess(cohort);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doCohortsEditCohort\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Cohorts.cohortsEditCohortFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doCohortsDelete(\n action: Action<\n string,\n {\n cohortId: string;\n callbackSuccess?: () => void;\n callbackError?: (error: any, details: any) => void;\n }\n >\n) {\n yield put(Cohorts.cohortsDeleteRequest());\n window.logger.log(\"doCohortsDelete\", action);\n const {\n cohortId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to delete a cohort for that specific cohortId\n yield call(CohortsApi.DeleteCohort, api, cohortId, { token });\n yield put(Cohorts.cohortsDeleteSuccess({ cohortId }));\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doCohortsDelete\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Cohorts.cohortsDeleteFailure());\n const { message, details } = errors || \"\";\n if (callbackError) {\n callbackError(message, details);\n }\n }\n}\n\nexport default function* cohortsSagas(): Generator {\n yield all([\n takeLatest(Cohorts.COHORTS_FETCH_COHORTS, doCohortsFetchCohorts),\n takeLatest(Cohorts.COHORTS_CREATE, doCohortsCreate),\n takeLatest(Cohorts.COHORTS_EDIT_COHORT, doCohortsEditCohort),\n takeLatest(Cohorts.COHORTS_DELETE, doCohortsDelete),\n ]);\n}\n","import type { Config, tAPI } from \"./API\";\n// API Company static class\n\nconst apiBaseCompany = \"/companies\";\nexport default class Company {\n // Get a company for that companyId\n static GetCompany(api: tAPI, companyId: string, config?: Config) {\n return api.GET(`${apiBaseCompany}/${companyId}`, config);\n }\n // Edit a company from companyId\n static EditCompany(\n api: tAPI,\n companyId: string,\n data: object,\n isUpload: boolean = false,\n config?: Config\n ) {\n if (isUpload) {\n return api.UPLOAD(\n `${apiBaseCompany}/${companyId}`,\n data,\n \"PATCH\",\n config\n );\n }\n return api.PATCH(`${apiBaseCompany}/${companyId}`, data, config);\n }\n // Get a Company files for that companyId\n static GetCompanyFiles(api: tAPI, companyId: string, config?: Config) {\n return api.GET(\n `/files?populated=true&belongsTo=Companies&owner=${companyId}`,\n config\n );\n }\n // Get all Company files expired\n static GetCompanyFilesExpired(api: tAPI, config?: Config) {\n return api.GET(\n `/files?populated=true&aboutExpire=true&belongsTo=Companies`,\n config\n );\n }\n // Upload a company files\n static UploadCompanyFiles(api: tAPI, data: object, config?: Config) {\n return api.UPLOAD(`/files`, data, \"POST\", config);\n }\n}\n","import type { Config, tAPI } from \"./API\";\n// API File Categories static class\n\nconst apiBaseFileCategories = \"/file-categories\";\nexport default class FileCategories {\n // Get a list of file categories\n static GetFileCategories(api: tAPI, config?: Config) {\n return api.GET(`${apiBaseFileCategories}`, config);\n }\n // Create a file category\n static CreateFileCategory(api: tAPI, data: object, config?: Config) {\n return api.POST(`${apiBaseFileCategories}`, data, config);\n }\n // Edit a file category\n static EditFileCategory(\n api: tAPI,\n fileCategoryId: string,\n data: object,\n config?: Config\n ) {\n return api.PATCH(\n `${apiBaseFileCategories}/${fileCategoryId}`,\n data,\n config\n );\n }\n // Delete a file category\n static DeleteFileCategory(\n api: tAPI,\n fileCategoryId: string,\n config?: Config\n ) {\n return api.DELETE(`${apiBaseFileCategories}/${fileCategoryId}`, config);\n }\n}\n","import { put, select, call, all, takeLatest } from \"redux-saga/effects\";\nimport CompanyApi from \"../api/Company\";\nimport FileCategoriesApi from \"../api/FileCategories\";\nimport { Auth, Company } from \"../actions/\";\n// Type\nimport type { Action } from \"deox\";\nimport type { tAPI } from \"../api/API\";\n//Sagas for company\nfunction* doCompanyFetchCompany(\n action: Action<\n string,\n {\n companyId: string;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Company.companyFetchCompanyRequest());\n window.logger.log(\"doCompanyFetchCompany\", action);\n const { companyId } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get my company\n const { data } = yield call(CompanyApi.GetCompany, api, companyId, {\n token,\n });\n const { company } = data;\n yield put(Company.companyFetchCompanySuccess({ myCompany: company }));\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doCompanyFetchCompany\", error, error);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Company.companyFetchCompanyFailure());\n }\n}\n\nfunction* doCompanyEditCompany(\n action: Action<\n string,\n {\n companyId: string;\n body: object;\n isPostFile?: boolean;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Company.companyEditCompanyRequest());\n window.logger.log(\"doCompanyEditCompany\", action);\n const {\n companyId,\n body,\n isPostFile: isUpload = false,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to update the company profile\n const { data } = yield call(\n CompanyApi.EditCompany,\n api,\n companyId,\n body,\n isUpload,\n { token }\n );\n const { company } = data;\n yield put(Company.companyEditCompanySuccess({ myCompany: company }));\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doCompanyEditCompany\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Company.companyEditCompanyFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doCompanyFetchCompanyFiles(\n action: Action<\n string,\n {\n id: string;\n callbackSuccess?: (data: any, extradata: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Company.companyFetchCompanyFilesRequest());\n window.logger.log(\"doCompanyFetchCompanyFiles\", action);\n const { id, callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get all files from this company from specific id\n const { data: dataFileCategories } = yield call(\n FileCategoriesApi.GetFileCategories,\n api,\n { token }\n );\n const { categories: fileCategories } = dataFileCategories;\n const { data } = yield call(CompanyApi.GetCompanyFiles, api, id, { token });\n const { files } = data;\n yield put(Company.companyFetchCompanyFilesSuccess({ files }));\n if (callbackSuccess) {\n callbackSuccess(files, fileCategories);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doCompanyFetchCompanyFiles\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Company.companyFetchCompanyFilesFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doCompanyFetchCompanyFilesExpired(\n action: Action<\n string,\n {\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Company.companyFetchCompanyFilesExpiredRequest());\n window.logger.log(\"doCompanyFetchCompanyFilesExpired\", action);\n const { callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n const { data } = yield call(CompanyApi.GetCompanyFilesExpired, api, {\n token,\n });\n const { files: filesExpired } = data;\n yield put(Company.companyFetchCompanyFilesExpiredSuccess({ filesExpired }));\n if (callbackSuccess) {\n callbackSuccess(filesExpired);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doCompanyFetchCompanyFilesExpired\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Company.companyFetchCompanyFilesExpiredFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doCompanyUploadCompanyFiles(\n action: Action<\n string,\n {\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Company.companyUploadCompanyFilesRequest());\n window.logger.log(\"doCompanyUploadCompanyFiles\", action);\n const { body, callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to upload all files for this company\n const { data } = yield call(CompanyApi.UploadCompanyFiles, api, body, {\n token,\n });\n const { files } = data;\n yield put(Company.companyUploadCompanyFilesSuccess());\n if (callbackSuccess) {\n callbackSuccess(files);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doCompanyUploadCompanyFiles\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Company.companyUploadCompanyFilesFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nexport default function* companySagas(): Generator {\n yield all([\n takeLatest(Company.COMPANY_FETCH_COMPANY, doCompanyFetchCompany),\n takeLatest(Company.COMPANY_EDIT_COMPANY, doCompanyEditCompany),\n takeLatest(Company.COMPANY_FETCH_COMPANY_FILES, doCompanyFetchCompanyFiles),\n takeLatest(\n Company.COMPANY_FETCH_COMPANY_FILES_EXPIRED,\n doCompanyFetchCompanyFilesExpired\n ),\n takeLatest(\n Company.COMPANY_UPLOAD_COMPANY_FILES,\n doCompanyUploadCompanyFiles\n ),\n ]);\n}\n","import type { Config, tAPI } from \"./API\";\n// API Custom Fields static class\n\nconst apiBaseCustomFields = \"/custom-fields\";\nexport default class CustomFields {\n // Get a list of Custom Fields\n static GetCustomFields(api: tAPI, config?: Config) {\n return api.GET(`${apiBaseCustomFields}`, config);\n }\n // Create a Custom Field\n static CreateCustomField(api: tAPI, data: object, config?: Config) {\n return api.POST(`${apiBaseCustomFields}`, data, config);\n }\n // Edit a Custom Field\n static EditCustomField(\n api: tAPI,\n customFieldId: string,\n data: object,\n config?: Config\n ) {\n return api.PATCH(`${apiBaseCustomFields}/${customFieldId}`, data, config);\n }\n // Delete a Custom Field\n static DeleteCustomField(api: tAPI, customFieldId: string, config?: Config) {\n return api.DELETE(`${apiBaseCustomFields}/${customFieldId}`, config);\n }\n}\n","import { put, select, call, all, takeLatest } from \"redux-saga/effects\";\nimport sortBy from \"lodash/sortBy\";\nimport CustomFieldsApi from \"../api/CustomFields\";\nimport { Auth, CustomFields } from \"../actions/\";\n// Type\nimport type { Action } from \"deox\";\nimport type { tAPI } from \"../api/API\";\n//Sagas for Custom Fields\nfunction* doCustomFieldsFetchCustomFields(\n action: Action<\n string,\n {\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(CustomFields.customFieldsFetchCustomFieldsRequest());\n window.logger.log(\"doCustomFieldsFetchCustomFields\", action);\n const { callbackSuccess = null, callbackError = null } = action.payload || {};\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get all custom fields for this company\n const { data } = yield call(CustomFieldsApi.GetCustomFields, api, {\n token,\n });\n const { customFields } = data;\n yield put(\n CustomFields.customFieldsFetchCustomFieldsSuccess({\n customFields: sortBy(customFields, \"createdAt\"),\n })\n );\n if (callbackSuccess) {\n callbackSuccess(customFields);\n }\n return customFields;\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doCustomFieldsFetchCustomFields\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(CustomFields.customFieldsFetchCustomFieldsFailure());\n if (callbackError) {\n callbackError(error);\n }\n return [];\n }\n}\n\nfunction* doCustomFieldsCreate(\n action: Action<\n string,\n {\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(CustomFields.customFieldsCreateRequest());\n window.logger.log(\"doCustomFieldsCreate\", action);\n const { body, callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to create a new custom field\n const { data } = yield call(CustomFieldsApi.CreateCustomField, api, body, {\n token,\n });\n const { customField } = data;\n yield put(CustomFields.customFieldsCreateSuccess({ customField }));\n if (callbackSuccess) {\n callbackSuccess(customField);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doCustomFieldsCreate\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(CustomFields.customFieldsCreateFailure());\n const { message, details } = errors || \"\";\n if (callbackError) {\n let errorMsg = message;\n if (details && details.length > 0) {\n errorMsg = `${errorMsg}: ${details[0].msg}`;\n }\n callbackError(errorMsg);\n }\n }\n}\n\nfunction* doCustomFieldsEditCustomField(\n action: Action<\n string,\n {\n customFieldId: string;\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(CustomFields.customFieldsEditFieldRequest());\n window.logger.log(\"doCustomFieldsEditCustomField\", action);\n const {\n customFieldId,\n body,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to update a custom field for that specific customFieldId\n const { data } = yield call(\n CustomFieldsApi.EditCustomField,\n api,\n customFieldId,\n body,\n {\n token,\n }\n );\n const { customField } = data;\n yield put(CustomFields.customFieldsEditFieldSuccess({ customField }));\n if (callbackSuccess) {\n yield put(CustomFields.customFieldsFetchCustomFields());\n callbackSuccess(customField);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doCustomFieldsEditCustomField\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(CustomFields.customFieldsEditFieldFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doCustomFieldsDeleteCustomField(\n action: Action<\n string,\n {\n customFieldId: string;\n customFieldModel: string;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(CustomFields.customFieldsDeleteFieldRequest());\n window.logger.log(\"doCustomFieldsDelete\", action);\n const {\n customFieldId,\n customFieldModel,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to delete a custom field for that specific customFieldId\n yield call(CustomFieldsApi.DeleteCustomField, api, customFieldId, {\n token,\n });\n yield put(\n CustomFields.customFieldsDeleteFieldSuccess({\n customFieldId,\n customFieldModel,\n })\n );\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doCustomFieldsDeleteCustomField\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(CustomFields.customFieldsDeleteFieldFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nexport default function* customFieldsSagas(): Generator {\n yield all([\n takeLatest(\n CustomFields.CUSTOM_FIELDS_FETCH_CUSTOM_FIELDS,\n doCustomFieldsFetchCustomFields\n ),\n takeLatest(CustomFields.CUSTOM_FIELDS_CREATE, doCustomFieldsCreate),\n takeLatest(\n CustomFields.CUSTOM_FIELDS_EDIT_FIELD,\n doCustomFieldsEditCustomField\n ),\n takeLatest(\n CustomFields.CUSTOM_FIELDS_DELETE_FIELD,\n doCustomFieldsDeleteCustomField\n ),\n ]);\n}\n","import type { Config, tAPI } from \"./API\";\n// API Enrollments static class\n\nconst apiBaseEnrollments = \"/enrollments\";\nexport default class Enrollments {\n // STUDENTS ENROLLMENTS API\n // Get all student enrollments for userId\n static GetStudentEnrollment(\n api: tAPI,\n programs: string[],\n cohorts: string[],\n students: string[],\n config?: Config\n ) {\n let queryParams = \"?populated=true\";\n if (programs.length > 0) {\n queryParams += `&programs=${programs.join()}`;\n }\n if (cohorts.length > 0) {\n queryParams += `&cohorts=${cohorts.join()}`;\n }\n if (students.length > 0) {\n queryParams += `&students=${students.join()}`;\n }\n return api.GET(`${apiBaseEnrollments}${queryParams}`, config);\n }\n // Create a student enrollment for userId\n static CreateStudentEnrollment(api: tAPI, data: object, config?: Config) {\n return api.POST(`${apiBaseEnrollments}`, data, config);\n }\n // Edit a student enrollment for userId from studentEnrollmentId\n static EditStudentEnrollment(\n api: tAPI,\n studentEnrollmentId: string,\n data: object,\n config?: Config\n ) {\n return api.PATCH(\n `${apiBaseEnrollments}/${studentEnrollmentId}`,\n data,\n config\n );\n }\n // Edit a student enrollment for userId from studentEnrollmentId\n static DeleteStudentEnrollment(\n api: tAPI,\n studentEnrollmentId: string,\n config?: Config\n ) {\n return api.DELETE(`${apiBaseEnrollments}/${studentEnrollmentId}`, config);\n }\n}\n","import { put, select, call, all, takeLatest } from \"redux-saga/effects\";\nimport EnrollmentsApi from \"../api/Enrollments\";\nimport { Auth, Enrollments } from \"../actions/\";\n// Type\nimport type { Action } from \"deox\";\nimport type { tAPI } from \"../api/API\";\n//Sagas for Enrollments\n// STUDENTS ENROLLMENTS SAGAS\nfunction* doStudentEnrollmentsFetchEnrollments(\n action: Action<\n string,\n {\n programs: string[];\n cohorts: string[];\n students: string[];\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Enrollments.studentEnrollmentsFetchRequest());\n window.logger.log(\"doStudentEnrollmentsFetchEnrollments\", action);\n const {\n programs = [],\n cohorts = [],\n students = [],\n callbackSuccess = null,\n callbackError = null,\n } = action.payload || {};\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get all student enrollments for this student\n const { data } = yield call(\n EnrollmentsApi.GetStudentEnrollment,\n api,\n programs,\n cohorts,\n students,\n { token }\n );\n const { enrollments: studentEnrollments } = data;\n yield put(\n Enrollments.studentEnrollmentsFetchSuccess({ studentEnrollments })\n );\n if (callbackSuccess) {\n callbackSuccess(studentEnrollments);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doStudentEnrollmentsFetchEnrollments\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Enrollments.studentEnrollmentsFetchFailure());\n if (callbackError) {\n callbackError(error);\n }\n }\n}\n\nfunction* doStudentEnrollmentCreateEnrollment(\n action: Action<\n string,\n {\n student: object;\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Enrollments.studentEnrollmentCreateRequest());\n window.logger.log(\"doStudentEnrollmentCreateEnrollment\", action);\n const {\n student,\n body,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to create a new student enrollment\n const { data } = yield call(\n EnrollmentsApi.CreateStudentEnrollment,\n api,\n body,\n { token }\n );\n const { enrollment: studentEnrollment } = data;\n const program: object = yield select(\n ({ programs: { programs } }) =>\n // @ts-ignore\n programs.filter(({ _id: programId }) => programId === body.program)[0]\n );\n const cohort: object = yield select(\n ({ cohorts: { cohorts } }) =>\n // @ts-ignore\n cohorts.filter(({ _id: cohortId }) => cohortId === body.cohort)[0]\n );\n yield put(\n Enrollments.studentEnrollmentCreateSuccess({\n studentEnrollment: {\n ...studentEnrollment,\n program,\n cohort,\n student,\n },\n })\n );\n if (callbackSuccess) {\n callbackSuccess(studentEnrollment);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doStudentEnrollmentCreateEnrollment\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Enrollments.studentEnrollmentCreateFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doStudentEnrollmentEditEnrollment(\n action: Action<\n string,\n {\n studentEnrollmentId: string;\n student: object;\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Enrollments.studentEnrollmentEditRequest());\n window.logger.log(\"doStudentEnrollmentEditEnrollment\", action);\n const {\n studentEnrollmentId,\n student,\n body,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to update a student enrollment for that specific studentEnrollmentId\n const { data } = yield call(\n EnrollmentsApi.EditStudentEnrollment,\n api,\n studentEnrollmentId,\n body,\n { token }\n );\n let { enrollment: studentEnrollment } = data;\n const program: object = yield select(\n ({ programs: { programs } }) =>\n // @ts-ignore\n programs.filter(({ _id: programId }) => programId === body.program)[0]\n );\n const cohort: object = yield select(\n ({ cohorts: { cohorts } }) =>\n // @ts-ignore\n cohorts.filter(({ _id: cohortId }) => cohortId === body.cohort)[0]\n );\n yield put(\n Enrollments.studentEnrollmentEditSuccess({\n studentEnrollment: {\n ...studentEnrollment,\n program,\n cohort,\n student,\n },\n })\n );\n if (callbackSuccess) {\n callbackSuccess(studentEnrollment);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doStudentEnrollmentEditEnrollment\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Enrollments.studentEnrollmentEditFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\nfunction* doStudentEnrollmentDelete(\n action: Action<\n string,\n {\n studentEnrollmentId: string;\n callbackSuccess?: () => void;\n callbackError?: (error: any, details: any) => void;\n }\n >\n) {\n yield put(Enrollments.studentEnrollmentDeleteRequest());\n window.logger.log(\"doStudentEnrollmentDelete\", action);\n const {\n studentEnrollmentId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to delete a student enrollment for that specific studentEnrollmentId\n yield call(\n EnrollmentsApi.DeleteStudentEnrollment,\n api,\n studentEnrollmentId,\n { token }\n );\n yield put(\n Enrollments.studentEnrollmentDeleteSuccess({ studentEnrollmentId })\n );\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doStudentEnrollmentDelete\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Enrollments.studentEnrollmentDeleteFailure());\n const { message, details } = errors || \"\";\n if (callbackError) {\n callbackError(message, details);\n }\n }\n}\n\nexport default function* enrollmentsSagas(): Generator {\n yield all([\n // Students Enrollments Sagas\n takeLatest(\n Enrollments.STUDENTS_ENROLLMENTS_FETCH,\n doStudentEnrollmentsFetchEnrollments\n ),\n takeLatest(\n Enrollments.STUDENT_ENROLLMENT_CREATE,\n doStudentEnrollmentCreateEnrollment\n ),\n takeLatest(\n Enrollments.STUDENT_ENROLLMENT_EDIT,\n doStudentEnrollmentEditEnrollment\n ),\n takeLatest(\n Enrollments.STUDENT_ENROLLMENT_DELETE,\n doStudentEnrollmentDelete\n ),\n ]);\n}\n","import type { Config, tAPI } from \"./API\";\nimport type { StateUsersManager } from \"../../types/users.types\";\n// API Evaluations static class\nconst apiBaseEvaluations = \"/evaluations\";\nconst apiBaseEvaluationsSchedulers = \"/evaluation-schedulers\";\nconst apiBaseEvaluationsTemplates = \"/evaluation-templates\";\nexport default class Evaluations {\n //////\n // API EVALUATIONS\n //////\n // Get a list of evaluations depend on case:\n // student: UserID, preceptor: UserID, institution: InstitutionID)\n static GetEvaluations(\n api: tAPI,\n populated: boolean,\n skip: number,\n limit: number,\n evaluationTypes: string[],\n status: string[],\n userStatus: StateUsersManager[\"filters\"][\"status\"],\n answerStatus: string[],\n tags: string[],\n evaluators: string[],\n targets: string[],\n programs: string[],\n cohorts: string[],\n institutions: string[],\n search: string,\n startDate: string,\n endDate: string,\n sortBy: {\n target: \"ascending\" | \"descending\" | \"\";\n evaluator: \"ascending\" | \"descending\" | \"\";\n createdAt: \"ascending\" | \"descending\" | \"\";\n closingDate: \"ascending\" | \"descending\" | \"\";\n status: \"ascending\" | \"descending\" | \"\";\n },\n config?: Config\n ) {\n let queryParams = \"\";\n if (skip >= 0) {\n queryParams += `&skip=${skip}`;\n }\n if (limit > 0) {\n queryParams += `&limit=${limit}`;\n }\n if (evaluationTypes.length > 0) {\n queryParams += `&evaluationTypes=${evaluationTypes.join()}`;\n }\n if (answerStatus.length > 0) {\n queryParams += `&answerStatus=${answerStatus.join()}`;\n if (evaluators.length > 0) {\n queryParams += `&evaluators=${evaluators.join()}`;\n }\n if (targets.length > 0) {\n queryParams += `&targets=${targets.join()}`;\n }\n }\n if (status.length > 0) {\n queryParams += `&status=${status.join()}`;\n }\n if (userStatus.length > 0) {\n queryParams += `&userStatus=${userStatus.join()}`;\n }\n if (tags.length > 0) {\n queryParams += `&tags=${tags.join()}`;\n }\n if (programs.length > 0) {\n queryParams += `&programs=${programs.join()}`;\n }\n if (cohorts.length > 0) {\n queryParams += `&cohorts=${cohorts.join()}`;\n }\n if (institutions.length > 0) {\n queryParams += `&institutions=${institutions.join()}`;\n }\n if (search) {\n queryParams += `&search=${search}`;\n }\n if (startDate) {\n queryParams += `&start=${startDate}`;\n }\n if (endDate) {\n queryParams += `&end=${endDate}`;\n }\n if (populated) {\n let sortByParams = Object.keys(sortBy)\n // @ts-ignore\n .filter((sortKey) => sortBy[sortKey])\n .map(\n (sortName) =>\n // @ts-ignore\n `sort_${sortName}=${sortBy[sortName] === \"ascending\" ? 1 : -1}`\n )\n .join(\"&\");\n if (sortByParams) {\n sortByParams = \"&\" + sortByParams;\n }\n queryParams = \"?populated=true\" + queryParams + sortByParams;\n } else if (queryParams.length > 0) {\n queryParams = \"?\" + queryParams.slice(1);\n }\n return api.GET(`${apiBaseEvaluations}${queryParams}`, config);\n }\n // Get Evaluations KPIS\n static GetEvaluationsKpis(api: tAPI, config?: Config) {\n return api.GET(`${apiBaseEvaluations}/kpis`, config);\n }\n // Get Evaluations Answers KPIS\n static GetEvaluationsAnswersKpis(\n api: tAPI,\n tags: string[],\n unique: boolean,\n config?: Config\n ) {\n return api.GET(\n `${apiBaseEvaluations}/answers/kpis?unique=${unique}&tags=${tags.join()}`,\n config\n );\n }\n // Get a evaluation\n static GetEvaluation(\n api: tAPI,\n evaluationId: string,\n getAnswers: boolean = false,\n answerId?: string,\n config?: Config\n ) {\n return api.GET(\n `${apiBaseEvaluations}/${evaluationId}${\n getAnswers ? `/answers${answerId ? \"/\" + answerId : \"\"}` : \"\"\n }?populated=true`,\n config\n );\n }\n // Create a Evaluations depend on case:\n // Rotations (Finished) or CaseLogs (Approved)\n static CreateEvaluation(api: tAPI, data: object, config?: Config) {\n return api.POST(`${apiBaseEvaluations}`, data, config);\n }\n // Edit a Evaluation (closing date expired)\n static EditEvaluation(\n api: tAPI,\n evaluationId: string,\n data: object,\n config?: Config\n ) {\n return api.PATCH(`${apiBaseEvaluations}/${evaluationId}`, data, config);\n }\n // Delete a Evaluation\n static DeleteEvaluation(api: tAPI, evaluationId: string, config?: Config) {\n return api.DELETE(`${apiBaseEvaluations}/${evaluationId}`, config);\n }\n //////\n // API EVALUATIONS > ANSWERS\n //////\n // Api for Evaluations Answers\n // Get a evaluation\n static GetEvaluationAnswers(\n api: tAPI,\n populated: boolean,\n skip: number,\n limit: number,\n evaluationTypes: string[],\n status: string[],\n evaluators: string[],\n search: string,\n startDate: string,\n endDate: string,\n config?: Config\n ) {\n let queryParams = \"\";\n if (skip >= 0) {\n queryParams += `&skip=${skip}`;\n }\n if (limit > 0) {\n queryParams += `&limit=${limit}`;\n }\n if (evaluationTypes.length > 0) {\n queryParams += `&evaluationAnswerTypes=${evaluationTypes.join()}`;\n }\n // if (status.length > 0) {\n // queryParams += `&status=${status.join()}`;\n // }\n // if (evaluators.length > 0) {\n // queryParams += `&status=${status.join()}`;\n // }\n if (search) {\n queryParams += `&search=${search}`;\n }\n if (startDate) {\n queryParams += `&start=${startDate}`;\n }\n if (endDate) {\n queryParams += `&end=${endDate}`;\n }\n if (populated) {\n queryParams = \"?populated=true\" + queryParams;\n } else if (queryParams.length > 0) {\n queryParams = \"?\" + queryParams.slice(1);\n }\n return api.GET(`${apiBaseEvaluations}/answers${queryParams}`, config);\n }\n static ResponseEvaluationAnswer(\n api: tAPI,\n evaluationId: string,\n answerId: string,\n data: object,\n config?: Config\n ) {\n if (answerId) {\n return api.PATCH(\n `${apiBaseEvaluations}/${evaluationId}/answers/${answerId}`,\n data,\n config\n );\n }\n return api.POST(\n `${apiBaseEvaluations}/${evaluationId}/answers`,\n data,\n config\n );\n }\n // Delete a Evaluation Answer\n static DeleteEvaluationAnswer(\n api: tAPI,\n evaluationId: string,\n answerId: string,\n config?: Config\n ) {\n return api.DELETE(\n `${apiBaseEvaluations}/${evaluationId}/answers/${answerId}`,\n config\n );\n }\n //////\n // API EVALUATIONS SCHEDULERS\n //////\n // API for Evaluations SCHEDULERS form\n static GetEvaluationsSchedulers(\n api: tAPI,\n evaluationTypes: string[],\n config?: Config\n ) {\n let queryParams = \"?populated=true\";\n if (evaluationTypes.length > 0) {\n queryParams += `&evaluationTypes=${evaluationTypes.join()}`;\n }\n return api.GET(`${apiBaseEvaluationsSchedulers}${queryParams}`, config);\n }\n // Create a evaluation schedulers form for some evaluators\n static CreateEvaluationSchedulers(api: tAPI, data: object, config?: Config) {\n return api.POST(`${apiBaseEvaluationsSchedulers}`, data, config);\n }\n // Get a evaluation schedulers form\n static GetEvaluationSchedulers(\n api: tAPI,\n evaluationSchedulerId: string,\n config?: Config\n ) {\n return api.GET(\n `${apiBaseEvaluationsSchedulers}/${evaluationSchedulerId}?populated=true`,\n config\n );\n }\n // Edit a Evaluation schedulers form\n static EditEvaluationSchedulers(\n api: tAPI,\n evaluationSchedulerId: string,\n data: object,\n config?: Config\n ) {\n return api.PATCH(\n `${apiBaseEvaluationsSchedulers}/${evaluationSchedulerId}`,\n data,\n config\n );\n }\n // Delete a Evaluation schedulers form\n static DeleteEvaluationSchedulers(\n api: tAPI,\n evaluationSchedulerId: string,\n config?: Config\n ) {\n return api.DELETE(\n `${apiBaseEvaluationsSchedulers}/${evaluationSchedulerId}`,\n config\n );\n }\n //////\n // API EVALUATIONS TEMPLATES\n //////\n // API for Evaluations TEMPLATES form\n static GetEvaluationsTemplates(api: tAPI, config?: Config) {\n return api.GET(`${apiBaseEvaluationsTemplates}?populated=true`, config);\n }\n // Create a evaluation template form for some students evaluations\n static CreateEvaluationTemplates(api: tAPI, data: object, config?: Config) {\n return api.POST(`${apiBaseEvaluationsTemplates}`, data, config);\n }\n // Get a evaluation template form\n static GetEvaluationTemplates(\n api: tAPI,\n evaluationTemplateId: string,\n config?: Config\n ) {\n return api.GET(\n `${apiBaseEvaluationsTemplates}/${evaluationTemplateId}?populated=true`,\n config\n );\n }\n // Edit a Evaluation template form\n static EditEvaluationTemplates(\n api: tAPI,\n evaluationTemplateId: string,\n data: object,\n config?: Config\n ) {\n return api.PATCH(\n `${apiBaseEvaluationsTemplates}/${evaluationTemplateId}`,\n data,\n config\n );\n }\n // Delete a Evaluation template form\n static DeleteEvaluationTemplates(\n api: tAPI,\n evaluationTemplateId: string,\n config?: Config\n ) {\n return api.DELETE(\n `${apiBaseEvaluationsTemplates}/${evaluationTemplateId}`,\n config\n );\n }\n}\n","import axios from \"axios\";\nimport { put, select, call, all, takeLatest } from \"redux-saga/effects\";\nimport EvaluationsApi from \"../api/Evaluations\";\nimport { Api, Auth, Evaluations } from \"../actions/\";\nimport { EVALUATIONS_LIMIT } from \"../reducers/evaluations\";\n// Type\nimport type { Action } from \"deox\";\nimport type { tAPI } from \"../api/API\";\nimport type { CancelRequest, State as StateApi } from \"../reducers/api\";\nimport type { StateUsersManager } from \"../../types/users.types\";\n//Sagas for Evaluations\n//////\n// EVALUATIONS\n//////\nconst getFiltersEvaluations = (evaluations: { [k: string]: any }[]) => {\n let filtersEvaluations: { [k: string]: any } = {\n evaluators: {},\n targets: {},\n };\n // All Evaluations\n for (let i = 0; i < evaluations.length; i++) {\n const evaluation = evaluations[i];\n const {\n status: statusEvaluation,\n evaluationType,\n evaluatorsRole,\n targetsRole,\n } = evaluation;\n if (statusEvaluation) {\n if (!filtersEvaluations.evaluators[evaluatorsRole]) {\n filtersEvaluations.evaluators[evaluatorsRole] = true;\n }\n if (evaluationType === \"UserEvaluations\") {\n if (!filtersEvaluations.targets[targetsRole]) {\n filtersEvaluations.targets[targetsRole] = true;\n }\n }\n }\n }\n return {\n filtersEvaluations,\n };\n};\nfunction* doEvaluationsFetchAll(\n action: Action<\n string,\n {\n callbackSuccess?: (data: any, metadata: any) => void;\n callbackError?: (error: any, details: any) => void;\n }\n >\n) {\n yield put(Evaluations.evaluationsFetchAllRequest());\n window.logger.log(\"doEvaluationsFetchAll\", action);\n const { callbackSuccess = null, callbackError = null } = action.payload || {};\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get all evaluations for this company\n const { data: dataEvaluations } = yield call(\n EvaluationsApi.GetEvaluations,\n api,\n true,\n 0,\n 1,\n [],\n [],\n [],\n [],\n [],\n [],\n [],\n [],\n [],\n [],\n \"\",\n \"\",\n \"\",\n {\n target: \"\",\n evaluator: \"\",\n createdAt: \"\",\n closingDate: \"\",\n status: \"\",\n },\n { token }\n );\n const { evaluations: evaluationsByType, metadata } = dataEvaluations || {\n evaluations: {},\n };\n const {\n UserEvaluations = [],\n InstitutionEvaluations = [],\n CompanyEvaluations = [],\n CustomEvaluations = [],\n } = evaluationsByType;\n let allEvaluations = [\n ...UserEvaluations,\n ...InstitutionEvaluations,\n ...CompanyEvaluations,\n ...CustomEvaluations,\n ];\n const evaluations = {\n all: allEvaluations,\n UserEvaluations,\n InstitutionEvaluations,\n CompanyEvaluations,\n CustomEvaluations,\n };\n yield put(\n Evaluations.evaluationsFetchAllSuccess({ evaluations, metadata })\n );\n if (callbackSuccess) {\n callbackSuccess(evaluations, metadata);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doEvaluationsFetchAll\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Evaluations.evaluationsFetchAllFailure());\n const { message, details } = errors || \"\";\n if (callbackError) {\n callbackError(message, details);\n }\n }\n}\nfunction* doEvaluationsFetchEvaluationsByFilters(\n action: Action<\n string,\n {\n populated?: boolean;\n page?: number;\n limit?: number;\n searchTxt?: string;\n status?: string[];\n userStatus?: StateUsersManager[\"filters\"][\"status\"];\n answerStatus?: string[];\n tags?: string[];\n evaluators?: string[];\n targets?: string[];\n programs?: string[];\n cohorts?: string[];\n institutions?: string[];\n startDate: string;\n endDate: string;\n sortBy?: {\n target: \"ascending\" | \"descending\" | \"\";\n evaluator: \"ascending\" | \"descending\" | \"\";\n createdAt: \"ascending\" | \"descending\" | \"\";\n closingDate: \"ascending\" | \"descending\" | \"\";\n status: \"ascending\" | \"descending\" | \"\";\n };\n callbackSuccess?: (data: any, filters: any, metadata: any) => void;\n callbackError?: (\n error: any,\n details: any,\n isAPICancelled: boolean\n ) => void;\n }\n >\n) {\n yield put(Evaluations.evaluationsFetchByFiltersRequest());\n window.logger.log(\"doEvaluationsFetchEvaluationsByFilters\", action);\n const {\n callbackSuccess = null,\n callbackError = null,\n ...payload\n } = action.payload || {};\n try {\n const { frontendPersonalization } = yield select(\n ({ accountSettings }) => accountSettings\n );\n let evaluationsSortBy: {\n target: \"ascending\" | \"descending\" | \"\";\n evaluator: \"ascending\" | \"descending\" | \"\";\n createdAt: \"ascending\" | \"descending\" | \"\";\n closingDate: \"ascending\" | \"descending\" | \"\";\n status: \"ascending\" | \"descending\" | \"\";\n } = {\n target: \"\",\n evaluator: \"\",\n createdAt: \"\",\n closingDate: \"\",\n status: \"\",\n };\n if (\n frontendPersonalization &&\n frontendPersonalization[\"EVALUATIONS_SETTINGS\"]\n ) {\n evaluationsSortBy =\n frontendPersonalization[\"EVALUATIONS_SETTINGS\"].sortBy;\n }\n const {\n populated = true,\n page = 1,\n limit = EVALUATIONS_LIMIT,\n searchTxt = \"\",\n status = [],\n userStatus = [],\n answerStatus = [],\n tags = [],\n evaluators = [],\n targets = [],\n programs = [],\n cohorts = [],\n institutions = [],\n startDate,\n endDate,\n sortBy = evaluationsSortBy,\n } = payload || {};\n const skip = (page - 1) * limit;\n const { evaluationTabs } = yield select(({ evaluations }) => evaluations);\n const evaluationTypeSelected =\n evaluationTabs.panes[evaluationTabs.selected].name;\n // Api\n const {\n api,\n cancelRequests,\n token,\n }: {\n api: tAPI;\n cancelRequests: StateApi[\"cancelRequests\"];\n token: StateApi[\"token\"];\n } = yield select(({ api }) => api);\n const [cancelRequest] = cancelRequests.filter(\n (cancelRequest: CancelRequest) => cancelRequest.key === \"GET_EVALUATIONS\"\n );\n if (cancelRequest && cancelRequest.source) {\n cancelRequest.source.cancel(\"Request has been cancelled\");\n yield put(\n Api.removeCancelTokenAPI({\n cancelRequest: {\n key: \"GET_EVALUATIONS\",\n },\n })\n );\n }\n const CancelToken = axios.CancelToken,\n source = CancelToken.source();\n yield put(\n Api.addCancelTokenAPI({\n cancelRequest: {\n key: \"GET_EVALUATIONS\",\n source,\n },\n })\n );\n // call the api to get all evaluations and answers for this company\n // Evaluations:\n const { data: dataEvaluationsMetadata } = yield call(\n EvaluationsApi.GetEvaluations,\n api,\n false,\n 0,\n 1,\n [],\n [],\n [],\n [],\n [],\n [],\n [],\n [],\n [],\n [],\n \"\",\n \"\",\n \"\",\n {\n target: \"\",\n evaluator: \"\",\n createdAt: \"\",\n closingDate: \"\",\n status: \"\",\n },\n { token }\n );\n const { metadata: allMetaData } = dataEvaluationsMetadata || {\n evaluations: {},\n };\n const { data: dataEvaluations } = yield call(\n EvaluationsApi.GetEvaluations,\n api,\n populated,\n skip,\n limit,\n [evaluationTypeSelected],\n status,\n userStatus,\n answerStatus,\n tags,\n evaluators,\n targets,\n programs,\n cohorts,\n institutions,\n searchTxt,\n startDate,\n endDate,\n sortBy,\n { cancelToken: source.token, token }\n );\n yield put(\n Api.removeCancelTokenAPI({\n cancelRequest: {\n key: \"GET_EVALUATIONS\",\n },\n })\n );\n const { evaluations: evaluationsByType, metadata } = dataEvaluations || {\n evaluations: {},\n };\n const {\n UserEvaluations = [],\n InstitutionEvaluations = [],\n CompanyEvaluations = [],\n CustomEvaluations = [],\n } = evaluationsByType;\n let allEvaluations = [\n ...UserEvaluations,\n ...InstitutionEvaluations,\n ...CompanyEvaluations,\n ...CustomEvaluations,\n ];\n const { filtersEvaluations } = getFiltersEvaluations(allEvaluations);\n const evaluations = {\n all: allEvaluations,\n UserEvaluations,\n InstitutionEvaluations,\n CompanyEvaluations,\n CustomEvaluations,\n };\n yield put(\n Evaluations.evaluationsFetchByFiltersSuccess({\n evaluations,\n evaluationsFilters: payload,\n metadata: {\n ...allMetaData,\n [evaluationTypeSelected]: metadata[evaluationTypeSelected],\n },\n })\n );\n if (callbackSuccess) {\n callbackSuccess(evaluations, filtersEvaluations, metadata);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doEvaluationsFetchEvaluationsByFilters\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n const { message, details, status } = errors || \"\";\n const isAPICancelled = status === \"cancelled\";\n if (isAPICancelled) {\n yield put(\n Api.removeCancelTokenAPI({\n cancelRequest: {\n key: \"GET_EVALUATIONS\",\n },\n })\n );\n }\n yield put(Evaluations.evaluationsFetchByFiltersFailure());\n if (callbackError) {\n callbackError(message, details, isAPICancelled);\n }\n }\n}\nfunction* doEvaluationsFetchKpis(\n action: Action<\n string,\n {\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n try {\n yield put(Evaluations.evaluationsFetchKpisRequest());\n window.logger.log(\"doEvaluationsFetchKpis\", action);\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n const {\n data: { kpis: EvaluationsKPIS },\n } = yield call(EvaluationsApi.GetEvaluationsKpis, api, { token });\n yield put(\n Evaluations.evaluationsFetchKpisSuccess({\n kpis: {\n fetching: true,\n Evaluations: EvaluationsKPIS,\n },\n })\n );\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doEvaluationsFetchKpis\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n const EvaluationsKPIS: object = yield select(\n ({\n evaluations: {\n evaluations: { kpis },\n },\n }) => kpis\n );\n yield put(\n Evaluations.evaluationsFetchKpisFailure({\n kpis: EvaluationsKPIS,\n })\n );\n }\n}\nfunction* doEvaluationsAnswersFetchKpis(\n action: Action\n) {\n yield put(Evaluations.evaluationsAnswersFetchKpisRequest());\n window.logger.log(\"doEvaluationsAnswersFetchKpis\", action);\n try {\n const { tags = [], unique = false } = action.payload;\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n const {\n data: { kpis: EvaluationsAnswersKPIs = [] },\n } = yield call(\n EvaluationsApi.GetEvaluationsAnswersKpis,\n api,\n tags,\n unique,\n {\n token,\n }\n );\n yield put(\n Evaluations.evaluationsAnswersFetchKpisSuccess({\n kpis: {\n fetching: true,\n EvaluationsAnswers: EvaluationsAnswersKPIs,\n },\n })\n );\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doEvaluationsAnswersFetchKpis\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n const EvaluationsAnswersKPIs: object = yield select(\n ({\n evaluations: {\n answers: { kpis },\n },\n }) => kpis\n );\n yield put(\n Evaluations.evaluationsAnswersFetchKpisFailure({\n kpis: EvaluationsAnswersKPIs,\n })\n );\n }\n}\nfunction* doEvaluationsFetchEvaluation(\n action: Action<\n string,\n {\n evaluationId: string;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Evaluations.evaluationsFetchEvaluationRequest());\n window.logger.log(\"doEvaluationsFetchEvaluation\", action);\n const {\n evaluationId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get a evaluation\n const { data } = yield call(\n EvaluationsApi.GetEvaluation,\n api,\n evaluationId,\n false,\n \"\",\n { token }\n );\n const { evaluation } = data;\n yield put(Evaluations.evaluationsFetchEvaluationSuccess({ evaluation }));\n if (callbackSuccess) {\n callbackSuccess(evaluation);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doEvaluationsFetchEvaluation\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Evaluations.evaluationsFetchEvaluationFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\nfunction* doEvaluationsCreate(\n action: Action<\n string,\n {\n body: object;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Evaluations.evaluationsCreateRequest());\n window.logger.log(\"doEvaluationsCreate\", action);\n const { body, callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to create new evaluations\n yield call(EvaluationsApi.CreateEvaluation, api, body, { token });\n yield put(Evaluations.evaluationsCreateSuccess());\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doEvaluationsCreate\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Evaluations.evaluationsCreateFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\nfunction* doEvaluationsEdit(\n action: Action<\n string,\n {\n evaluationUpdated: { [k: string]: any };\n body: object;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Evaluations.evaluationsEditRequest());\n window.logger.log(\"doEvaluationsEdit\", action);\n const {\n evaluationUpdated,\n body,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // Call the api to update a evaluation with specific evaluationId\n // · Closing date\n // · Evaluator\n yield call(\n EvaluationsApi.EditEvaluation,\n api,\n evaluationUpdated._id,\n body,\n { token }\n );\n yield put(\n Evaluations.evaluationsEditSuccess({ evaluation: evaluationUpdated })\n );\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doEvaluationsEdit\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Evaluations.evaluationsEditFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\nfunction* doEvaluationsDelete(\n action: Action<\n string,\n {\n evaluationId: string;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Evaluations.evaluationsDeleteRequest());\n window.logger.log(\"doEvaluationsDelete\", action);\n const {\n evaluationId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to delete a evaluation for that specific evaluationId\n yield call(EvaluationsApi.DeleteEvaluation, api, evaluationId, { token });\n yield put(\n Evaluations.evaluationsDeleteSuccess({\n evaluationId,\n })\n );\n if (callbackSuccess) {\n // ToDo: LOAD ALL EVALUATIONS\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doEvaluationsDelete\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Evaluations.evaluationsDeleteFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n//////\n// EVALUATIONS > ANSWERS\n//////\nconst parseAnswers = (\n UserEvaluationAnswers: { [k: string]: any }[],\n InstitutionEvaluationsAnswers: { [k: string]: any }[],\n CompanyEvaluationsAnswers: { [k: string]: any }[],\n CustomEvaluationsAnswers: { [k: string]: any }[]\n) => {\n let answersParsed = {\n all: [\n ...UserEvaluationAnswers,\n ...InstitutionEvaluationsAnswers,\n ...CompanyEvaluationsAnswers,\n ...CustomEvaluationsAnswers,\n ],\n completed: {\n UserEvaluations: UserEvaluationAnswers.filter(\n ({ status: statusAnswer }) => statusAnswer === \"completed\"\n ),\n InstitutionEvaluations: InstitutionEvaluationsAnswers.filter(\n ({ status: statusAnswer }) => statusAnswer === \"completed\"\n ),\n CompanyEvaluations: CompanyEvaluationsAnswers.filter(\n ({ status: statusAnswer }) => statusAnswer === \"completed\"\n ),\n CustomEvaluations: CustomEvaluationsAnswers.filter(\n ({ status: statusAnswer }) => statusAnswer === \"completed\"\n ),\n },\n draft: {\n UserEvaluations: UserEvaluationAnswers.filter(\n ({ status: statusAnswer }) => statusAnswer === \"draft\"\n ),\n InstitutionEvaluations: InstitutionEvaluationsAnswers.filter(\n ({ status: statusAnswer }) => statusAnswer === \"draft\"\n ),\n CompanyEvaluations: CompanyEvaluationsAnswers.filter(\n ({ status: statusAnswer }) => statusAnswer === \"draft\"\n ),\n CustomEvaluations: CustomEvaluationsAnswers.filter(\n ({ status: statusAnswer }) => statusAnswer === \"draft\"\n ),\n },\n };\n let filtersAnswers: { [k: string]: any } = {\n evaluators: {},\n targets: {},\n };\n // Completed\n for (let i = 0; i < answersParsed.all.length; i++) {\n const {\n status: statusAnswer, // completed | draft\n evaluationAnswerType: evaluationType,\n evaluator: { role: evaluatorsRole },\n target: { role: targetsRole },\n } = answersParsed.all[i];\n if (statusAnswer === \"completed\") {\n if (!filtersAnswers.evaluators[evaluatorsRole]) {\n filtersAnswers.evaluators[evaluatorsRole] = true;\n }\n if (evaluationType === \"UserEvaluationAnswers\") {\n if (!filtersAnswers.targets[targetsRole]) {\n filtersAnswers.targets[targetsRole] = true;\n }\n }\n }\n }\n return {\n answers: answersParsed,\n filtersAnswers,\n };\n};\nfunction* doEvaluationsFetchAnswers(\n action: Action<\n string,\n {\n populated?: boolean;\n page?: number;\n limit?: number;\n searchTxt?: string;\n status?: string[];\n evaluators?: string[];\n startDate: string;\n endDate: string;\n callbackSuccess?: (data: any, filters: any, metadata: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Evaluations.evaluationsFetchAnswersRequest());\n window.logger.log(\"doEvaluationsFetchAnswers\", action);\n const {\n populated = true,\n page = 1,\n limit = EVALUATIONS_LIMIT,\n searchTxt = \"\",\n status = [\"completed\"],\n evaluators = [],\n startDate,\n endDate,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload || {};\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n const { evaluationTabs } = yield select(({ evaluations }) => evaluations);\n const evaluationTypeSelected =\n evaluationTabs.panes[evaluationTabs.selected].name;\n // call the api to get answers for this company\n // Answers\n const skip = (page - 1) * limit;\n const { data: dataAnswers } = yield call(\n EvaluationsApi.GetEvaluationAnswers,\n api,\n populated,\n skip,\n limit,\n [\n `${evaluationTypeSelected.slice(\n 0,\n evaluationTypeSelected.length - 1\n )}Answers`,\n ],\n status,\n evaluators,\n searchTxt,\n startDate,\n endDate,\n { token }\n );\n const {\n metadata,\n answers: {\n UserEvaluationAnswers = [],\n InstitutionEvaluationsAnswers = [],\n CompanyEvaluationsAnswers = [],\n CustomEvaluationsAnswers = [],\n },\n } = dataAnswers;\n const { answers, filtersAnswers } = parseAnswers(\n UserEvaluationAnswers,\n InstitutionEvaluationsAnswers,\n CompanyEvaluationsAnswers,\n CustomEvaluationsAnswers\n );\n yield put(\n Evaluations.evaluationsFetchAnswersSuccess({\n answers,\n metadata,\n })\n );\n if (callbackSuccess) {\n callbackSuccess(answers, filtersAnswers, metadata);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doEvaluationsFetchAnswers\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Evaluations.evaluationsFetchAnswersFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\nfunction* doEvaluationsFetchEvaluationAnswers(\n action: Action<\n string,\n {\n evaluationId: string;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Evaluations.evaluationsFetchEvaluationAnswersRequest());\n window.logger.log(\"doEvaluationsFetchEvaluationAnswers\", action);\n const {\n evaluationId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get all evaluation answers from some specific evaluationId\n const { data } = yield call(\n EvaluationsApi.GetEvaluation,\n api,\n evaluationId,\n true,\n \"\",\n { token }\n );\n const { answers: evaluationAnswers } = data;\n yield put(\n Evaluations.evaluationsFetchEvaluationAnswersSuccess({\n evaluationAnswers,\n })\n );\n if (callbackSuccess) {\n callbackSuccess(evaluationAnswers);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doEvaluationsFetchEvaluationAnswers\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Evaluations.evaluationsFetchEvaluationAnswersFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\nfunction* doEvaluationsFetchEvaluationAnswer(\n action: Action<\n string,\n {\n evaluationId: string;\n answerId: string;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Evaluations.evaluationsFetchEvaluationAnswerRequest());\n window.logger.log(\"doEvaluationsFetchEvaluationAnswer\", action);\n const {\n evaluationId,\n answerId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get one answer evaluation from some specific evaluationId\n const { data } = yield call(\n EvaluationsApi.GetEvaluation,\n api,\n evaluationId,\n true,\n answerId,\n { token }\n );\n const { answer } = data;\n yield put(Evaluations.evaluationsFetchEvaluationAnswerSuccess({ answer }));\n if (callbackSuccess) {\n callbackSuccess(answer);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doEvaluationsFetchEvaluationAnswer\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Evaluations.evaluationsFetchEvaluationAnswerFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\nfunction* doEvaluationsResponseEvaluationAnswers(\n action: Action<\n string,\n {\n evaluationId: string;\n answerId: string;\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Evaluations.evaluationsResponseEvaluationAnswersRequest());\n window.logger.log(\"doEvaluationsResponseEvaluation\", action);\n const {\n evaluationId,\n answerId = \"\",\n body,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get a evaluation\n const { data } = yield call(\n EvaluationsApi.ResponseEvaluationAnswer,\n api,\n evaluationId,\n answerId,\n body,\n { token }\n );\n const { answer } = data;\n const { evaluationsFilters = {} } = yield select(\n ({ evaluations }) => evaluations\n );\n yield put(Evaluations.evaluationsFetchByFilters(evaluationsFilters));\n yield put(\n Evaluations.evaluationsResponseEvaluationAnswersSuccess({ answer })\n );\n if (callbackSuccess) {\n callbackSuccess(answer);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doEvaluationsResponseEvaluationAnswers\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Evaluations.evaluationsResponseEvaluationAnswersFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\nfunction* doEvaluationsDeleteEvaluationAnswer(\n action: Action<\n string,\n {\n evaluationId: string;\n answerId: string;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Evaluations.evaluationsDeleteEvaluationAnswerRequest());\n window.logger.log(\"doEvaluationsDeleteEvaluationAnswer\", action);\n const {\n evaluationId,\n answerId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to delete a evaluation answer for that specific evaluationId and answerId\n yield call(\n EvaluationsApi.DeleteEvaluationAnswer,\n api,\n evaluationId,\n answerId,\n { token }\n );\n yield put(\n Evaluations.evaluationsDeleteEvaluationAnswerSuccess({\n evaluationId,\n answerId,\n })\n );\n if (callbackSuccess) {\n yield put(Evaluations.evaluationsFetchAnswers());\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doEvaluationsDeleteEvaluationAnswer\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Evaluations.evaluationsDeleteEvaluationAnswerFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\nexport default function* evaluationsSagas(): Generator {\n yield all([\n //////\n // EVALUATIONS\n //////\n takeLatest(Evaluations.EVALUATIONS_FETCH_KPIS, doEvaluationsFetchKpis),\n takeLatest(Evaluations.EVALUATIONS_FETCH_ALL, doEvaluationsFetchAll),\n takeLatest(\n Evaluations.EVALUATIONS_FETCH_BY_FILTERS,\n doEvaluationsFetchEvaluationsByFilters\n ),\n takeLatest(\n Evaluations.EVALUATIONS_FETCH_EVALUATION,\n doEvaluationsFetchEvaluation\n ),\n takeLatest(Evaluations.EVALUATIONS_CREATE, doEvaluationsCreate),\n takeLatest(Evaluations.EVALUATIONS_EDIT, doEvaluationsEdit),\n takeLatest(Evaluations.EVALUATIONS_DELETE, doEvaluationsDelete),\n //////\n // EVALUATIONS > ANSWERS\n //////\n takeLatest(\n Evaluations.EVALUATIONS_ANSWERS_FETCH_KPIS,\n doEvaluationsAnswersFetchKpis\n ),\n takeLatest(\n Evaluations.EVALUATIONS_FETCH_ANSWERS,\n doEvaluationsFetchAnswers\n ),\n takeLatest(\n Evaluations.EVALUATIONS_FETCH_EVALUATION_ANSWERS,\n doEvaluationsFetchEvaluationAnswers\n ),\n takeLatest(\n Evaluations.EVALUATIONS_FETCH_EVALUATION_ANSWER,\n doEvaluationsFetchEvaluationAnswer\n ),\n takeLatest(\n Evaluations.EVALUATIONS_RESPONSE_EVALUATION_ANSWERS,\n doEvaluationsResponseEvaluationAnswers\n ),\n takeLatest(\n Evaluations.EVALUATIONS_DELETE_EVALUATION_ANSWER,\n doEvaluationsDeleteEvaluationAnswer\n ),\n ]);\n}\n","import { put, select, call, all, takeLatest } from \"redux-saga/effects\";\nimport EvaluationsApi from \"../api/Evaluations\";\nimport { Auth, EvaluationsSchedulers } from \"../actions/\";\n// Type\nimport type { Action } from \"deox\";\nimport type { tAPI } from \"../api/API\";\n//Sagas for Evaluations Schedulers\nfunction* doEvaluationsSchedulersFetchEvaluationsSchedulers(\n action: Action<\n string,\n {\n evaluationTypes?: string[];\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(\n EvaluationsSchedulers.evaluationsSchedulersFetchEvaluationsSchedulersRequest()\n );\n window.logger.log(\n \"doEvaluationsSchedulersFetchEvaluationsSchedulers\",\n action\n );\n const {\n evaluationTypes = [],\n callbackSuccess = null,\n callbackError = null,\n } = action.payload || {};\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get all evaluations for this company\n const { data } = yield call(\n EvaluationsApi.GetEvaluationsSchedulers,\n api,\n evaluationTypes,\n { token }\n );\n const { evaluationSchedulers } = data;\n yield put(\n EvaluationsSchedulers.evaluationsSchedulersFetchEvaluationsSchedulersSuccess(\n { evaluationSchedulers }\n )\n );\n if (callbackSuccess) {\n callbackSuccess(evaluationSchedulers);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doEvaluationsSchedulersFetchEvaluationsSchedulers\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(\n EvaluationsSchedulers.evaluationsSchedulersFetchEvaluationsSchedulersFailure()\n );\n if (callbackError) {\n callbackError(error);\n }\n }\n}\n\nfunction* doEvaluationsSchedulersFetchEvaluationScheduler(\n action: Action<\n string,\n {\n evaluationSchedulerId: string;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(\n EvaluationsSchedulers.evaluationsSchedulersFetchEvaluationSchedulerRequest()\n );\n window.logger.log(\"doEvaluationsSchedulersFetchEvaluationScheduler\", action);\n const {\n evaluationSchedulerId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get a evaluation schedulers\n const { data } = yield call(\n EvaluationsApi.GetEvaluationSchedulers,\n api,\n evaluationSchedulerId,\n { token }\n );\n const { evaluationSchedulers } = data;\n yield put(\n EvaluationsSchedulers.evaluationsSchedulersFetchEvaluationSchedulerSuccess(\n { evaluationSchedulers }\n )\n );\n if (callbackSuccess) {\n callbackSuccess(evaluationSchedulers);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doEvaluationsSchedulersFetchEvaluationScheduler\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(\n EvaluationsSchedulers.evaluationsSchedulersFetchEvaluationSchedulerFailure()\n );\n if (callbackError) {\n callbackError(error);\n }\n }\n}\n\nfunction* doEvaluationsSchedulersCreate(\n action: Action<\n string,\n {\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(EvaluationsSchedulers.evaluationsSchedulersCreateRequest());\n window.logger.log(\"doEvaluationsSchedulersCreate\", action);\n const { body, callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to create new evaluations schedulers\n const { data } = yield call(\n EvaluationsApi.CreateEvaluationSchedulers,\n api,\n body,\n { token }\n );\n const { evaluationSchedulers } = data;\n yield put(EvaluationsSchedulers.evaluationsSchedulersCreateSuccess());\n if (callbackSuccess) {\n callbackSuccess(evaluationSchedulers);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doEvaluationsSchedulersCreate\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(EvaluationsSchedulers.evaluationsSchedulersCreateFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doEvaluationsSchedulersEdit(\n action: Action<\n string,\n {\n evaluationSchedulerId: string;\n evaluationTemplate: object;\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(EvaluationsSchedulers.evaluationsSchedulersEditRequest());\n window.logger.log(\"doEvaluationsSchedulersEdit\", action);\n const {\n evaluationSchedulerId,\n evaluationTemplate,\n body,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to update a evaluation schedulers for that evaluationSchedulerId\n const { data } = yield call(\n EvaluationsApi.EditEvaluationSchedulers,\n api,\n evaluationSchedulerId,\n body,\n { token }\n );\n const { evaluationScheduler } = data;\n yield put(\n EvaluationsSchedulers.evaluationsSchedulersEditSuccess({\n evaluationScheduler: {\n ...evaluationScheduler,\n evaluationTemplate,\n },\n })\n );\n if (callbackSuccess) {\n yield put(\n EvaluationsSchedulers.evaluationsSchedulersFetchEvaluationsSchedulers()\n );\n callbackSuccess({\n ...evaluationScheduler,\n evaluationTemplate,\n });\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doEvaluationsSchedulersEdit\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(EvaluationsSchedulers.evaluationsSchedulersEditFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doEvaluationsSchedulersDelete(\n action: Action<\n string,\n {\n evaluationSchedulerId: string;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(EvaluationsSchedulers.evaluationsSchedulersDeleteRequest());\n window.logger.log(\"doEvaluationsSchedulersDelete\", action);\n const {\n evaluationSchedulerId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to delete a evaluation schedulers for that specific evaluationSchedulerId\n yield call(\n EvaluationsApi.DeleteEvaluationSchedulers,\n api,\n evaluationSchedulerId,\n { token }\n );\n yield put(\n EvaluationsSchedulers.evaluationsSchedulersDeleteSuccess({\n evaluationSchedulerId,\n })\n );\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doEvaluationsSchedulersDelete\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(EvaluationsSchedulers.evaluationsSchedulersDeleteFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nexport default function* evaluationsSchedulersSagas(): Generator<\n any,\n any,\n any\n> {\n yield all([\n takeLatest(\n EvaluationsSchedulers.EVALUATIONS_SCHEDULERS_FETCH_EVALUATIONS_SCHEDULERS,\n doEvaluationsSchedulersFetchEvaluationsSchedulers\n ),\n takeLatest(\n EvaluationsSchedulers.EVALUATIONS_SCHEDULERS_CREATE,\n doEvaluationsSchedulersCreate\n ),\n takeLatest(\n EvaluationsSchedulers.EVALUATIONS_SCHEDULERS_FETCH_EVALUATION_SCHEDULER,\n doEvaluationsSchedulersFetchEvaluationScheduler\n ),\n takeLatest(\n EvaluationsSchedulers.EVALUATIONS_SCHEDULERS_EDIT,\n doEvaluationsSchedulersEdit\n ),\n takeLatest(\n EvaluationsSchedulers.EVALUATIONS_SCHEDULERS_DELETE,\n doEvaluationsSchedulersDelete\n ),\n ]);\n}\n","import { put, select, call, all, takeLatest } from \"redux-saga/effects\";\nimport EvaluationsApi from \"../api/Evaluations\";\nimport { Auth, EvaluationsTemplates } from \"../actions/\";\nimport { onSetFormOptions } from \"../../components/evaluations-templates/edit/_EvaluationsTemplates.utils\";\n// Type\nimport type { Action } from \"deox\";\nimport type { tAPI } from \"../api/API\";\n//Sagas for Evaluations TEMPLATES form\nfunction* doEvaluationsTemplatesFetchForms(\n action: Action<\n string,\n {\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(EvaluationsTemplates.evaluationsTemplatesFetchFormsRequest());\n window.logger.log(\"doEvaluationsTemplatesFetchForms\", action);\n const { callbackSuccess = null, callbackError = null } = action.payload || {};\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get all evaluations TEMPLATES forms for this company\n const { data } = yield call(EvaluationsApi.GetEvaluationsTemplates, api, {\n token,\n });\n const { evaluationTemplates } = data;\n yield put(\n EvaluationsTemplates.evaluationsTemplatesFetchFormsSuccess({\n evaluationTemplates,\n })\n );\n if (callbackSuccess) {\n callbackSuccess(evaluationTemplates);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doEvaluationsTemplatesFetchForms\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(EvaluationsTemplates.evaluationsTemplatesFetchFormsFailure());\n if (callbackError) {\n callbackError(error);\n }\n }\n}\n\nfunction* doEvaluationsTemplatesCreate(\n action: Action<\n string,\n {\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(EvaluationsTemplates.evaluationsTemplatesCreateRequest());\n window.logger.log(\"doEvaluationsTemplatesCreate\", action);\n const { body, callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n const { userId, userFirstName, userLastName } = yield select(\n ({ auth: { user } }) => ({\n userId: user._id,\n userFirstName: user.firstName,\n userLastName: user.lastName,\n })\n );\n // call the api to create a new evaluation template form\n const { data } = yield call(\n EvaluationsApi.CreateEvaluationTemplates,\n api,\n body,\n { token }\n );\n const { evaluationTemplate } = data;\n let parseTemplate = {\n ...evaluationTemplate,\n };\n if (\n parseTemplate &&\n parseTemplate.lastUpdatedBy &&\n !parseTemplate.lastUpdatedBy.firstName &&\n !parseTemplate.lastUpdatedBy.lastName &&\n parseTemplate.lastUpdatedBy === userId\n ) {\n parseTemplate = {\n ...parseTemplate,\n lastUpdatedBy: {\n firstName: userFirstName,\n lastName: userLastName,\n },\n };\n }\n yield put(\n EvaluationsTemplates.evaluationsTemplatesCreateSuccess({\n evaluationTemplate: parseTemplate,\n })\n );\n if (callbackSuccess) {\n callbackSuccess(parseTemplate);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doEvaluationsTemplatesCreate\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(EvaluationsTemplates.evaluationsTemplatesCreateFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doEvaluationsTemplatesFetchForm(\n action: Action<\n string,\n {\n evaluationTemplateId: string;\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(EvaluationsTemplates.evaluationsTemplatesFetchFormRequest());\n window.logger.log(\"doEvaluationsTemplatesFetchForm\", action);\n const {\n evaluationTemplateId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get a evaluation template form for that specific evaluationTemplateId\n const { data } = yield call(\n EvaluationsApi.GetEvaluationTemplates,\n api,\n evaluationTemplateId,\n { token }\n );\n const { evaluationTemplate: evaluationTemplateData } = data;\n const evaluationTemplate = {\n ...evaluationTemplateData,\n form: onSetFormOptions(evaluationTemplateData.form),\n };\n yield put(\n EvaluationsTemplates.evaluationsTemplatesFetchFormSuccess({\n evaluationTemplate,\n })\n );\n if (callbackSuccess) {\n callbackSuccess(evaluationTemplate);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doEvaluationsTemplatesFetchForm\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(EvaluationsTemplates.evaluationsTemplatesFetchFormFailure());\n if (callbackError) {\n callbackError(error);\n }\n }\n}\n\nfunction* doEvaluationsTemplatesEdit(\n action: Action<\n string,\n {\n evaluationTemplateId: string;\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(EvaluationsTemplates.evaluationsTemplatesEditRequest());\n window.logger.log(\"doEvaluationsTemplatesEdit\", action);\n const {\n evaluationTemplateId,\n body,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to update a evaluation template form for that specific evaluationTemplateId\n const { data } = yield call(\n EvaluationsApi.EditEvaluationTemplates,\n api,\n evaluationTemplateId,\n body,\n { token }\n );\n const { evaluationTemplate: evaluationTemplateData } = data;\n const evaluationTemplate = {\n ...evaluationTemplateData,\n form: onSetFormOptions(evaluationTemplateData.form),\n };\n yield put(\n EvaluationsTemplates.evaluationsTemplatesEditSuccess({\n evaluationTemplate,\n })\n );\n if (callbackSuccess) {\n yield put(EvaluationsTemplates.evaluationsTemplatesFetchForms());\n callbackSuccess(evaluationTemplate);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doEvaluationsTemplatesEdit\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(EvaluationsTemplates.evaluationsTemplatesEditFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doEvaluationsTemplatesDelete(\n action: Action<\n string,\n {\n evaluationTemplateId: string;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(EvaluationsTemplates.evaluationsTemplatesDeleteRequest());\n window.logger.log(\"doEvaluationsTemplatesDelete\", action);\n const {\n evaluationTemplateId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to delete a evaluation for that specific evaluationTemplateId\n yield call(\n EvaluationsApi.DeleteEvaluationTemplates,\n api,\n evaluationTemplateId,\n { token }\n );\n yield put(\n EvaluationsTemplates.evaluationsTemplatesDeleteSuccess({\n evaluationTemplateId,\n })\n );\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doEvaluationsTemplatesDelete\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(EvaluationsTemplates.evaluationsTemplatesDeleteFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nexport default function* evaluationsTemplatesSagas(): Generator {\n yield all([\n takeLatest(\n EvaluationsTemplates.EVALUATIONS_TEMPLATES_FETCH_FORMS,\n doEvaluationsTemplatesFetchForms\n ),\n takeLatest(\n EvaluationsTemplates.EVALUATIONS_TEMPLATES_CREATE,\n doEvaluationsTemplatesCreate\n ),\n takeLatest(\n EvaluationsTemplates.EVALUATIONS_TEMPLATES_FETCH_FORM,\n doEvaluationsTemplatesFetchForm\n ),\n takeLatest(\n EvaluationsTemplates.EVALUATIONS_TEMPLATES_EDIT,\n doEvaluationsTemplatesEdit\n ),\n takeLatest(\n EvaluationsTemplates.EVALUATIONS_TEMPLATES_DELETE,\n doEvaluationsTemplatesDelete\n ),\n ]);\n}\n","import type { Config, tAPI } from \"./API\";\n\n// API Feedback Report or Bugs static class\nconst apiBaseFeedbackForm = \"/feedback-reports\";\nexport default class FeedbackForm {\n // Send feedback form\n static SendFeedbackForm(\n api: tAPI,\n data: object,\n isUpload: boolean = false,\n config?: Config\n ) {\n if (isUpload) {\n return api.UPLOAD(`${apiBaseFeedbackForm}`, data, \"POST\", config);\n }\n return api.POST(`${apiBaseFeedbackForm}`, data, config);\n }\n}\n","import { put, select, call, all, takeLatest } from \"redux-saga/effects\";\nimport FeedbackFormApi from \"../api/FeedbackForm\";\nimport { Auth, FeedbackForm } from \"../actions\";\n// Type\nimport type { Action } from \"deox\";\nimport type { tAPI } from \"../api/API\";\n// Sagas for Feedback Form\nfunction* doFeedbackFormSend(\n action: Action<\n string,\n {\n body: object;\n isPostFile?: boolean;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n try {\n yield put(FeedbackForm.feedbackFormSendRequest());\n window.logger.log(\"doFeedbackFormSend\", action);\n const {\n body,\n isPostFile: isUpload = false,\n callbackSuccess = undefined,\n } = action.payload;\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to sent feedback form\n yield call(FeedbackFormApi.SendFeedbackForm, api, body, isUpload, {\n token,\n });\n yield put(FeedbackForm.feedbackFormSendSuccess());\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doFeedbackFormSend\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(FeedbackForm.feedbackFormSendFailure());\n const { message } = errors || \"\";\n const { callbackError = undefined } = action.payload;\n if (callbackError) {\n callbackError(message);\n }\n }\n}\nexport default function* feedbackFormSagas(): Generator {\n yield all([takeLatest(FeedbackForm.FEEDBACK_FORM_SEND, doFeedbackFormSend)]);\n}\n","import type { Config, tAPI } from \"./API\";\n// API Files static class\n\nconst apiBaseFiles = \"/files\";\nexport default class Files {\n // Edit a file\n static EditFile(api: tAPI, fileId: string, data: object, config?: Config) {\n return api.PATCH(`${apiBaseFiles}/${fileId}`, data, config);\n }\n // Delete a file\n static DeleteFile(api: tAPI, fileId: string, config?: Config) {\n return api.DELETE(`${apiBaseFiles}/${fileId}`, config);\n }\n // Download a file\n static DownloadFile(\n api: tAPI,\n data: object,\n extension: string,\n config?: Config\n ) {\n return api.DOWNLOAD(`${apiBaseFiles}/download`, data, extension, config);\n }\n}\n","import { put, select, call, all, takeLatest } from \"redux-saga/effects\";\nimport FilesApi from \"../api/Files\";\nimport { Auth, Files } from \"../actions/\";\nimport { downloadFile } from \"../../utils/\";\n// Type\nimport type { Action } from \"deox\";\nimport type { tAPI } from \"../api/API\";\n//Sagas for Files\nconst onParseEditFiles = (\n files: { [k: string]: any }[],\n fileId: string,\n body: object\n): object[] | undefined | null => {\n let file = null,\n fileIndex = -1;\n for (let i = 0; i < files.length; i++) {\n file = files[i];\n if (fileId === file._id) {\n fileIndex = i;\n break;\n }\n }\n if (fileIndex > -1) {\n const newFiles = [\n ...files.slice(0, fileIndex),\n { ...file, ...body },\n ...files.slice(fileIndex + 1),\n ];\n return newFiles;\n }\n return files;\n};\n\nfunction* doFilesEdit(\n action: Action<\n string,\n {\n files: { [k: string]: any }[];\n fileId: string;\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Files.filesEditRequest());\n window.logger.log(\"doFilesEdit\", action);\n const {\n files,\n fileId,\n body,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to update a file for that specific fileId\n const { data } = yield call(FilesApi.EditFile, api, fileId, body, {\n token,\n });\n const { file } = data;\n const fileCategoryArray: any[] = yield select(\n ({ fileCategories: { fileCategories } }) =>\n fileCategories.filter(({ _id }: any) => _id === file.category)\n );\n const newFiles = onParseEditFiles(files, fileId, {\n ...body,\n category: fileCategoryArray[0],\n });\n yield put(\n Files.filesEditSuccess({\n files: newFiles,\n })\n );\n if (callbackSuccess) {\n callbackSuccess(newFiles);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doFilesEdit\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Files.filesEditFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doFilesDelete(\n action: Action<\n string,\n {\n files: { [k: string]: any }[];\n fileId: string;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Files.filesDeleteRequest());\n window.logger.log(\"doFilesDelete\", action);\n const {\n files,\n fileId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to delete a file for that specific fileId\n yield call(FilesApi.DeleteFile, api, fileId, { token });\n const newFiles = files.filter(({ _id }) => _id !== fileId);\n yield put(Files.filesDeleteSuccess({ files: newFiles }));\n if (callbackSuccess) {\n callbackSuccess(newFiles);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doFilesDelete\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Files.filesDeleteFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doFilesDownload(\n action: Action<\n string,\n {\n filesIDs: string[];\n fileName: string;\n extension: string;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Files.filesDownloadRequest());\n window.logger.log(\"doFilesDownload\", action);\n const {\n filesIDs,\n fileName,\n extension,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to download a file for that specific fileId\n const {\n data: { blob: blobURL },\n } = yield call(FilesApi.DownloadFile, api, { files: filesIDs }, extension, {\n token,\n });\n downloadFile(fileName, blobURL);\n yield put(Files.filesDownloadSuccess());\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doFilesDownload\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Files.filesDownloadFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doFilesPreview(\n action: Action<\n string,\n {\n filesIDs: string[];\n extension: string;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Files.filesPreviewRequest());\n window.logger.log(\"doFilesPreview\", action);\n const {\n filesIDs,\n extension,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to download a file for that specific fileId and show in a viewer\n const {\n data: { blob: blobURL },\n } = yield call(FilesApi.DownloadFile, api, { files: filesIDs }, extension, {\n token,\n });\n yield put(Files.filesPreviewSuccess());\n if (callbackSuccess) {\n callbackSuccess(blobURL);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doFilesPreview\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Files.filesPreviewFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nexport default function* filesSagas(): Generator {\n yield all([\n takeLatest(Files.FILES_EDIT, doFilesEdit),\n takeLatest(Files.FILES_DELETE, doFilesDelete),\n takeLatest(Files.FILES_DOWNLOAD, doFilesDownload),\n takeLatest(Files.FILES_PREVIEW, doFilesPreview),\n ]);\n}\n","import { put, select, call, all, takeLatest } from \"redux-saga/effects\";\nimport FileCategoriesApi from \"../api/FileCategories\";\nimport { Auth, FileCategories } from \"../actions/\";\n// Type\nimport type { Action } from \"deox\";\nimport type { tAPI } from \"../api/API\";\n//Sagas for File Categories\nfunction* doFileCategoriesFetchFileCategories(\n action: Action<\n string,\n {\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(FileCategories.fileCategoriesFetchFileCategoriesRequest());\n window.logger.log(\"doFileCategoriesFetchFileCategories\", action);\n const { callbackSuccess = null, callbackError = null } = action.payload || {};\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get all file categories for this company\n const { data } = yield call(FileCategoriesApi.GetFileCategories, api, {\n token,\n });\n const { categories: fileCategories } = data;\n yield put(\n FileCategories.fileCategoriesFetchFileCategoriesSuccess({\n fileCategories,\n })\n );\n if (callbackSuccess) {\n callbackSuccess(fileCategories);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doFileCategoriesFetchFileCategories\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(FileCategories.fileCategoriesFetchFileCategoriesFailure());\n if (callbackError) {\n callbackError(error);\n }\n }\n}\n\nfunction* doFileCategoriesCreate(\n action: Action<\n string,\n {\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(FileCategories.fileCategoriesCreateRequest());\n window.logger.log(\"doFileCategoriesCreate\", action);\n const { body, callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to create a new file category\n const { data } = yield call(\n FileCategoriesApi.CreateFileCategory,\n api,\n body,\n { token }\n );\n const { category: fileCategory } = data;\n yield put(FileCategories.fileCategoriesCreateSuccess({ fileCategory }));\n if (callbackSuccess) {\n callbackSuccess(fileCategory);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doFileCategoriesCreate\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(FileCategories.fileCategoriesCreateFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doFileCategoriesEdit(\n action: Action<\n string,\n {\n fileCategoryId: string;\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(FileCategories.fileCategoriesEditRequest());\n window.logger.log(\"doFileCategoriesEdit\", action);\n const {\n fileCategoryId,\n body,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to update a program for that specific programId\n const { data } = yield call(\n FileCategoriesApi.EditFileCategory,\n api,\n fileCategoryId,\n body,\n { token }\n );\n const { category: fileCategory } = data;\n yield put(FileCategories.fileCategoriesEditSuccess({ fileCategory }));\n if (callbackSuccess) {\n callbackSuccess(fileCategory);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doFileCategoriesEdit\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(FileCategories.fileCategoriesEditFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doFileCategoriesDelete(\n action: Action<\n string,\n {\n fileCategoryId: string;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(FileCategories.fileCategoriesDeleteRequest());\n window.logger.log(\"doFileCategoriesDelete\", action);\n const {\n fileCategoryId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to delete a file category for that specific fileCategoryId\n yield call(FileCategoriesApi.DeleteFileCategory, api, fileCategoryId, {\n token,\n });\n yield put(FileCategories.fileCategoriesDeleteSuccess({ fileCategoryId }));\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doFileCategoriesDelete\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(FileCategories.fileCategoriesDeleteFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nexport default function* fileCategoriesSagas(): Generator {\n yield all([\n takeLatest(\n FileCategories.FILE_CATEGORIES_FETCH_FILE_CATEGORIES,\n doFileCategoriesFetchFileCategories\n ),\n takeLatest(FileCategories.FILE_CATEGORIES_CREATE, doFileCategoriesCreate),\n takeLatest(FileCategories.FILE_CATEGORIES_EDIT, doFileCategoriesEdit),\n takeLatest(FileCategories.FILE_CATEGORIES_DELETE, doFileCategoriesDelete),\n ]);\n}\n","import type { Config, tAPI } from \"./API\";\nimport type { TypeImportData } from \"../../types/importData.types\";\n// API Import Data: Users or Rotations static class\nconst apiBaseImportData = \"/import-data\";\nexport default class ImportData {\n // Get a list of latest import data uploaded\n static GetImportData(\n api: tAPI,\n typesImport: TypeImportData[],\n config?: Config\n ) {\n return api.GET(`${apiBaseImportData}?models=${typesImport.join()}`, config);\n }\n // Send import data: users or rotations\n static SendImportData(api: tAPI, data: object, config?: Config) {\n return api.UPLOAD(`${apiBaseImportData}`, data, \"POST\", config);\n }\n // Generate CSV\n static GenerateCSVImportData(api: tAPI, data: object, config?: Config) {\n return api.DOWNLOAD(\n `${apiBaseImportData}/generateCSV`,\n data,\n \"text/csv\",\n config\n );\n }\n}\n","import { put, select, call, all, takeLatest } from \"redux-saga/effects\";\nimport ImportDataApi from \"../api/ImportData\";\nimport { Auth, ImportData } from \"../actions/\";\nimport { downloadFile, setParseUTCtimeToLocale } from \"../../utils/\";\n// Type\nimport type { Action } from \"deox\";\nimport type { tAPI } from \"../api/API\";\nimport type { TypeImportData } from \"../../types/importData.types\";\n//Sagas for Import Data: users or rotations\nfunction* doImportDataFetch(\n action: Action<\n string,\n {\n typeImport: \"Users\" | \"Rotations\" | \"TenantSettings\";\n cbs?: (data: any) => void;\n cbe?: (error: any) => void;\n }\n >\n) {\n window.logger.log(\"doImportDataFetch\", action);\n yield put(ImportData.importDataFetchRequest());\n const { typeImport, cbs = null, cbe = null } = action.payload || {};\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get latest import data uploaded\n const models: TypeImportData[] =\n typeImport === \"Rotations\"\n ? [\"Rotations\"]\n : [\n \"SuperCompanyAdministrators\",\n \"CompanyAdministrators\",\n \"Faculties\",\n \"InstitutionAdministrators\",\n \"Preceptors\",\n \"Students\",\n ];\n const {\n data: { imports: importData = [] },\n } = yield call(ImportDataApi.GetImportData, api, models, { token });\n yield put(\n ImportData.importDataFetchSuccess({\n importData,\n importDataType: typeImport.toLowerCase(),\n })\n );\n if (cbs) {\n cbs(importData);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doImportDataFetch\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(ImportData.importDataFetchFailure());\n if (cbe) {\n cbe(error);\n }\n }\n}\nfunction* doImportDataSend(\n action: Action<\n string,\n {\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any, details: any) => void;\n }\n >\n) {\n window.logger.log(\"doImportDataSend\", action);\n yield put(ImportData.importDataSendRequest());\n const { body, callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to sent import data\n const { data } = yield call(ImportDataApi.SendImportData, api, body, {\n token,\n });\n const { import: importData } = data;\n yield put(ImportData.importDataSendSuccess());\n if (callbackSuccess) {\n callbackSuccess(importData);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doImportDataSend\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(ImportData.importDataSendFailure());\n const { message, details } = errors || \"\";\n if (callbackError) {\n callbackError(message, details);\n }\n }\n}\n\nfunction* doImportGenerateCSV(\n action: Action<\n string,\n {\n body: object;\n importName: string;\n callbackSuccess?: () => void;\n callbackError?: (error: any, details: any) => void;\n }\n >\n) {\n window.logger.log(\"doImportGenerateCSV\", action);\n yield put(ImportData.importGenerateCSVRequest());\n const {\n body,\n importName = \"\",\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to generate CSV to import data: users or rotations\n const {\n data: { blob },\n } = yield call(ImportDataApi.GenerateCSVImportData, api, body, { token });\n downloadFile(\n `Import ${importName} - ${setParseUTCtimeToLocale().format(\n \"MMM DD of YYYY [at] HH:mm\"\n )}.csv`,\n blob\n );\n yield put(ImportData.importGenerateCSVSuccess());\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doImportGenerateCSV\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(ImportData.importGenerateCSVFailure());\n const { message, details } = errors || \"\";\n if (callbackError) {\n callbackError(message, details);\n }\n }\n}\n\nexport default function* importDataSagas(): Generator {\n yield all([\n takeLatest(ImportData.IMPORT_DATA_FETCH, doImportDataFetch),\n takeLatest(ImportData.IMPORT_DATA_SEND, doImportDataSend),\n takeLatest(ImportData.IMPORT_GENERATE_CSV, doImportGenerateCSV),\n ]);\n}\n","import type { Config, tAPI } from \"./API\";\n// API Invitations static class\n\nconst apiBaseInvitations = \"/user-invitations\";\nexport default class Invitations {\n // Get a list of invitations invtations by roles | institutions\n static GetInvitations(\n api: tAPI,\n roles: string[],\n emails: string[],\n institutions: string[],\n groupBy: string[],\n status: string[],\n config?: Config\n ) {\n let queryParams = \"?populated=true\";\n if (roles.length > 0) {\n queryParams += `&roles=${roles.join()}`;\n }\n if (emails.length > 0) {\n queryParams += `&email=${emails.join()}`;\n }\n if (institutions.length > 0) {\n queryParams += `&institutions=${institutions.join()}`;\n }\n if (status.length > 0) {\n queryParams += `&status=${status.join()}`;\n }\n return api.GET(`${apiBaseInvitations}${queryParams}`, config);\n }\n // Create a list of Invitations\n static CreateInvitations(api: tAPI, data: object, config?: Config) {\n return api.POST(`${apiBaseInvitations}`, data, { ...config, vApi: \"v2\" });\n }\n // Resend invitation(s)\n static ResendInvitations(api: tAPI, data: object, config?: Config) {\n return api.POST(`${apiBaseInvitations}/resend`, data, config);\n }\n // Active invitation\n static ActiveInvitation(\n api: tAPI,\n invitationId: string,\n data: object,\n config?: Config\n ) {\n return api.PUT(\n `${apiBaseInvitations}/${invitationId}/active`,\n data,\n config\n );\n }\n // Delete a Invitation\n static DeleteInvitation(api: tAPI, invitationId: string, config?: Config) {\n return api.DELETE(`${apiBaseInvitations}/${invitationId}`, config);\n }\n //DEPRECATED\n // static ResendInvitation(api: tAPI, invitationId: string, data: object) {\n // return api.PUT(`${apiBaseInvitations}/${invitationId}`, data);\n // }\n}\n","import { put, select, call, all, takeLatest } from \"redux-saga/effects\";\nimport InvitationsApi from \"../api/Invitations\";\nimport { Auth, Invitations } from \"../actions/\";\n// Type\nimport type { Action } from \"deox\";\nimport type { tAPI } from \"../api/API\";\n//Sagas for Invitations\nfunction* doInvitationsFetchInvitations(\n action: Action<\n string,\n {\n roles?: string[];\n emails?: string[];\n institutions?: string[];\n groupBy?: string[];\n status?: string[];\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Invitations.invitationsFetchInvitationsRequest());\n window.logger.log(\"doInvitationsFetchInvitations\", action);\n const {\n roles = [],\n emails = [],\n institutions = [],\n groupBy = [],\n status = [],\n callbackSuccess = null,\n callbackError = null,\n } = action.payload || {};\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get all invitations for this company\n const {\n data: { ok, ...remainUserInvitations },\n } = yield call(\n InvitationsApi.GetInvitations,\n api,\n roles,\n emails,\n institutions,\n groupBy,\n status,\n { token }\n );\n yield put(\n Invitations.invitationsFetchInvitationsSuccess({\n invitations:\n Object.keys(remainUserInvitations || {}).map(\n (userInvitation) => userInvitation\n ).length > 0\n ? {\n ...remainUserInvitations,\n }\n : null,\n })\n );\n if (callbackSuccess) {\n callbackSuccess({\n invitations: {\n ...remainUserInvitations,\n },\n });\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doInvitationsFetchInvitations\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Invitations.invitationsFetchInvitationsFailure());\n if (callbackError) {\n callbackError(error);\n }\n }\n}\nfunction* doInvitationsCreate(\n action: Action<\n string,\n {\n body: object;\n callbackSuccess?: (data: any, errors: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Invitations.invitationsCreateRequest());\n window.logger.log(\"doInvitationsCreate\", action);\n const { body, callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to create new invitations\n const { data } = yield call(InvitationsApi.CreateInvitations, api, body, {\n token,\n });\n const { userInvitations = [], errors = [] } = data || {};\n yield put(Invitations.invitationsCreateSuccess());\n yield put(\n Invitations.invitationsFetchInvitations({\n status: [\"pending\", \"expired\"],\n })\n );\n if (callbackSuccess) {\n callbackSuccess(userInvitations, errors);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doInvitationsCreate\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Invitations.invitationsCreateFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\nfunction* doInvitationsResend(\n action: Action<\n string,\n {\n body: object;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Invitations.invitationsResendRequest());\n window.logger.log(\"doInvitationsResend\", action);\n const { body, callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to resend some invitations\n yield call(InvitationsApi.ResendInvitations, api, body, { token });\n yield put(Invitations.invitationsResendSuccess());\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doInvitationsResend\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Invitations.invitationsResendFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\nfunction* doInvitationsActive(\n action: Action<\n string,\n {\n invitationId: string;\n body: object;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Invitations.invitationsActiveRequest());\n window.logger.log(\"doInvitationsActive\", action);\n const {\n invitationId,\n body,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to active some invitations\n yield call(InvitationsApi.ActiveInvitation, api, invitationId, body, {\n token,\n });\n yield put(Invitations.invitationsActiveSuccess());\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doInvitationsActive\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Invitations.invitationsActiveFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\nfunction* doInvitationsDelete(\n action: Action<\n string,\n {\n invitationId: string;\n roleSelected: object;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Invitations.invitationsDeleteRequest());\n window.logger.log(\"doInvitationsDelete\", action);\n const {\n invitationId,\n roleSelected,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to delete a invitation for that specific invitationId\n yield call(InvitationsApi.DeleteInvitation, api, invitationId, { token });\n yield put(\n Invitations.invitationsDeleteSuccess({ invitationId, roleSelected })\n );\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doInvitationsDelete\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Invitations.invitationsDeleteFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\nexport default function* invitationsSagas(): Generator {\n yield all([\n takeLatest(\n Invitations.INVITATIONS_FETCH_INVITATIONS,\n doInvitationsFetchInvitations\n ),\n takeLatest(Invitations.INVITATIONS_CREATE, doInvitationsCreate),\n takeLatest(Invitations.INVITATIONS_RESEND, doInvitationsResend),\n takeLatest(Invitations.INVITATIONS_ACTIVE, doInvitationsActive),\n takeLatest(Invitations.INVITATIONS_DELETE, doInvitationsDelete),\n ]);\n}\n","import type { Config, tAPI } from \"./API\";\n// API Institutions static class\n\nconst apiBaseInstitutions = \"/institutions\";\nexport default class Institutions {\n // Get a list of institutions for this company and filter by name (if exist)\n static GetInstitutions(\n api: tAPI,\n status: string,\n name: string,\n config?: Config\n ) {\n let queryParams = \"\";\n if (status) {\n queryParams += `status=${status}`;\n }\n if (name) {\n if (queryParams.length > 0) {\n queryParams += `&`;\n }\n queryParams += `name=${name}`;\n }\n if (queryParams.length > 0) {\n queryParams = `?` + queryParams;\n }\n return api.GET(`${apiBaseInstitutions}${queryParams}`, config);\n }\n // Create Institution\n static CreateInstitution(api: tAPI, data: object, config?: Config) {\n return api.POST(`${apiBaseInstitutions}`, data, config);\n }\n // Get a Institution for that institutionId\n static GetInstitution(api: tAPI, institutionId: string, config?: Config) {\n return api.GET(`${apiBaseInstitutions}/${institutionId}`, config);\n }\n static GetInstitutionAvailabilities(\n api: tAPI,\n institutionId: string,\n config?: Config\n ) {\n return api.GET(`/availabilities?institution=${institutionId}`, config);\n }\n static CreateInstitutionAvailabilities(\n api: tAPI,\n data: object,\n config?: Config\n ) {\n return api.POST(`/availabilities`, data, config);\n }\n static EditInstitutionAvailabilities(\n api: tAPI,\n availabilityId: string,\n data: object,\n config?: Config\n ) {\n return api.PATCH(`/availabilities/${availabilityId}`, data, config);\n }\n // Edit a institution from institutionId\n static EditInstitution(\n api: tAPI,\n actionApi: \"ACTIVATE_DEACTIVATE_INSTITUTION\" | \"EDIT_INSTITUTION\",\n institutionId: string,\n data: object,\n isUpload: boolean = false,\n config?: Config\n ) {\n switch (actionApi) {\n case \"ACTIVATE_DEACTIVATE_INSTITUTION\":\n return api.PATCH(\n `${apiBaseInstitutions}/${institutionId}/activateDeactivate`,\n data,\n config\n );\n default:\n if (isUpload) {\n return api.UPLOAD(\n `${apiBaseInstitutions}/${institutionId}`,\n data,\n \"PATCH\",\n config\n );\n }\n return api.PATCH(\n `${apiBaseInstitutions}/${institutionId}`,\n data,\n config\n );\n }\n }\n // Get a Institution files for that institutionId\n static GetInstitutionFiles(\n api: tAPI,\n institutionId: string,\n config?: Config\n ) {\n return api.GET(\n `/files?populated=true&belongsTo=Institutions&owner=${institutionId}`,\n config\n );\n }\n // Get all Institution files expired\n static GetInstitutionFilesExpired(api: tAPI, config?: Config) {\n return api.GET(\n `/files?populated=true&aboutExpire=true&belongsTo=Institutions`,\n config\n );\n }\n // Upload a Institution files\n static UploadInstitutionFiles(api: tAPI, data: object, config?: Config) {\n return api.UPLOAD(`/files`, data, \"POST\", config);\n }\n // Delete a Institution\n static DeleteInstitution(api: tAPI, institutionId: string, config?: Config) {\n return api.DELETE(`${apiBaseInstitutions}/${institutionId}`, config);\n }\n}\n","import { put, select, call, all, takeLatest } from \"redux-saga/effects\";\nimport sortBy from \"lodash/sortBy\";\nimport InstitutionsApi from \"../api/Institutions\";\nimport { Auth, Institutions } from \"../actions/\";\n// Type\nimport type { Action } from \"deox\";\nimport type { tAPI } from \"../api/API\";\n//Sagas for institutions\nfunction* doInstitutionsFetchInstitutions(\n action: Action<\n string,\n {\n status?: string;\n name?: string;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Institutions.institutionsFetchInstitutionsRequest());\n window.logger.log(\"doInstitutionsFetchInstitutions\", action);\n const {\n status = \"\",\n name = \"\",\n callbackSuccess = null,\n callbackError = null,\n } = action.payload || {};\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get all institutions for this company\n const { data } = yield call(\n InstitutionsApi.GetInstitutions,\n api,\n status,\n name,\n { token }\n );\n const { institutions } = data;\n const institutionsSortByName = sortBy(institutions, [\"name\"]);\n yield put(\n Institutions.institutionsFetchInstitutionsSuccess({\n institutions: institutionsSortByName,\n })\n );\n if (callbackSuccess) {\n callbackSuccess(institutionsSortByName);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doInstitutionsFetchInstitutions\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Institutions.institutionsFetchInstitutionsFailure());\n if (callbackError) {\n callbackError(error);\n }\n }\n}\n\nfunction* doInstitutionsCreate(\n action: Action<\n string,\n {\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Institutions.institutionsCreateRequest());\n window.logger.log(\"doInstitutionsCreate\", action);\n const { body, callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to create new institution\n const { data } = yield call(InstitutionsApi.CreateInstitution, api, body, {\n token,\n });\n const { institution } = data;\n yield put(Institutions.institutionsCreateSuccess({ institution }));\n if (callbackSuccess) {\n callbackSuccess(institution);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doInstitutionsCreate\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Institutions.institutionsCreateFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nconst getRolesInstitutionCustomFieldsRequiredNull = ({ customFields }: any) => {\n if (customFields.length) {\n const customFieldsRequired = customFields.filter(\n ({ isRequired }: any) => isRequired\n );\n for (let i = 0; i < customFieldsRequired.length; i++) {\n const { permissions, value } = customFieldsRequired[i];\n const rolesWrite = Object.keys(permissions).filter(\n (role) => permissions[role] === \"write\"\n );\n for (let j = 0; j < rolesWrite.length; j++) {\n const roleWrite = rolesWrite[j];\n if (\n permissions[roleWrite] === \"write\" &&\n (value === null || value === undefined)\n ) {\n return rolesWrite;\n }\n }\n }\n }\n return [];\n};\n\nexport function* doMergeInstitutionAccount(\n institution: Object,\n isEdit: boolean\n): Generator {\n const { tenantSettings }: { tenantSettings: any } = yield select(\n ({ tenantSettings }) => tenantSettings\n );\n const hasToCheckRequiredFields =\n tenantSettings[\"ACCOUNTS_INSTITUTION_REQUIRED_FIELDS\"].valuesApi;\n const hasInstitutionCustomFieldsRequiredNull = hasToCheckRequiredFields\n ? getRolesInstitutionCustomFieldsRequiredNull(institution)\n : false;\n window.logger.log(\n \"doMergeInstitutionAccount\",\n institution,\n isEdit,\n \"hasInstitutionCustomFieldsRequiredNull: \",\n hasInstitutionCustomFieldsRequiredNull\n );\n if (!isEdit) {\n yield put(\n Institutions.institutionsFetchInstitutionSuccess({\n institution,\n hasInstitutionCustomFieldsRequiredNull:\n hasInstitutionCustomFieldsRequiredNull.length\n ? {\n institutionRequired: institution,\n rolesWrite: hasInstitutionCustomFieldsRequiredNull,\n isRequired: true,\n }\n : null,\n })\n );\n } else {\n yield put(\n Institutions.institutionsEditInstitutionSuccess({\n institution,\n hasInstitutionCustomFieldsRequiredNull:\n hasInstitutionCustomFieldsRequiredNull\n ? {\n institutionRequired: institution,\n rolesWrite: hasInstitutionCustomFieldsRequiredNull,\n isRequired: true,\n }\n : null,\n })\n );\n }\n}\n\nfunction* doInstitutionsFetchInstitution(\n action: Action<\n string,\n {\n institutionId: string;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Institutions.institutionsFetchInstitutionRequest());\n window.logger.log(\"doInstitutionsFetchInstitution\", action);\n const {\n institutionId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get a institution for that institutionId\n const { data } = yield call(\n InstitutionsApi.GetInstitution,\n api,\n institutionId,\n { token }\n );\n const { institution } = data;\n yield call(doMergeInstitutionAccount, institution, false);\n if (callbackSuccess) {\n callbackSuccess(institution);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doInstitutionsFetchInstitution\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Institutions.institutionsFetchInstitutionFailure());\n if (callbackError) {\n callbackError(error);\n }\n }\n}\n\nfunction* doInstitutionsFetchInstitutionAvailabilities(\n action: Action<\n string,\n {\n institutionId: string;\n cbs?: (data: any) => void;\n cbe?: (error: any) => void;\n }\n >\n) {\n window.logger.log(\"doInstitutionsFetchInstitutionAvailabilities\", action);\n yield put(Institutions.institutionsFetchInstitutionAvailabilitiesRequest());\n const { institutionId, cbs = null, cbe = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get a institution availabilities from specific institutionId\n const {\n data: { availabilities = [] },\n } = yield call(\n InstitutionsApi.GetInstitutionAvailabilities,\n api,\n institutionId,\n { token }\n );\n yield put(Institutions.institutionsFetchInstitutionAvailabilitiesSuccess());\n if (cbs) {\n cbs(availabilities);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doInstitutionsFetchInstitutionAvailabilities\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Institutions.institutionsFetchInstitutionAvailabilitiesFailure());\n const { message } = errors || \"\";\n if (cbe) {\n cbe(message);\n }\n }\n}\n\nfunction* doInstitutionsEditInstitution(\n action: Action<\n string,\n {\n actionApi: \"ACTIVATE_DEACTIVATE_INSTITUTION\" | \"EDIT_INSTITUTION\";\n institutionId: string;\n body: object;\n isPostFile?: boolean;\n isMyInstitution?: boolean;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Institutions.institutionsEditInstitutionRequest());\n window.logger.log(\"doInstitutionsEditInstitution\", action);\n const {\n actionApi = \"EDIT_INSTITUTION\",\n institutionId,\n body,\n isPostFile: isUpload = false,\n isMyInstitution = false,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to update the institution profile\n const { data } = yield call(\n InstitutionsApi.EditInstitution,\n api,\n actionApi,\n institutionId,\n body,\n isUpload,\n { token }\n );\n const { institution } = data;\n if (isMyInstitution) {\n yield put(\n Auth.authFetchMyInstitution({ institutionId: institution._id })\n );\n } else {\n yield call(doMergeInstitutionAccount, institution, true);\n }\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doInstitutionsEditInstitution\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Institutions.institutionsEditInstitutionFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doInstitutionsEditInstitutionAvailabilities(\n action: Action<\n string,\n {\n availabilityId: string;\n body: any;\n cbs?: () => void;\n cbe?: (error: any) => void;\n }\n >\n) {\n window.logger.log(\"doInstitutionsEditInstitutionAvailabilities\", action);\n yield put(Institutions.institutionsEditInstitutionAvailabilitiesRequest());\n const { availabilityId, body, cbs = null, cbe = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to edit a institution availabilities from specific institutionId\n yield call(\n InstitutionsApi.EditInstitutionAvailabilities,\n api,\n availabilityId,\n body,\n {\n token,\n }\n );\n yield put(Institutions.institutionsEditInstitutionAvailabilitiesSuccess());\n if (cbs) {\n cbs();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doInstitutionsEditInstitutionAvailabilities\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Institutions.institutionsEditInstitutionAvailabilitiesFailure());\n const { message } = errors || \"\";\n if (cbe) {\n cbe(message);\n }\n }\n}\n\nfunction* doInstitutionsFetchInstitutionFiles(\n action: Action<\n string,\n {\n id: string;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Institutions.institutionsFetchInstitutionFilesRequest());\n window.logger.log(\"doInstitutionsFetchInstitutionFiles\", action);\n const { id, callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get a institution for that institutionId\n const { data } = yield call(InstitutionsApi.GetInstitutionFiles, api, id, {\n token,\n });\n const { files } = data;\n yield put(Institutions.institutionsFetchInstitutionFilesSuccess({ files }));\n if (callbackSuccess) {\n callbackSuccess(files);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doInstitutionsFetchInstitutionFiles\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Institutions.institutionsFetchInstitutionFilesFailure());\n if (callbackError) {\n callbackError(error);\n }\n }\n}\n\nfunction* doInstitutionsFetchInstitutionFilesExpired(\n action: Action<\n string,\n {\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Institutions.institutionsFetchInstitutionFilesExpiredRequest());\n window.logger.log(\"doInstitutionsFetchInstitutionFilesExpired\", action);\n const { callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n const { data } = yield call(\n InstitutionsApi.GetInstitutionFilesExpired,\n api,\n { token }\n );\n const { files: filesExpired } = data;\n yield put(\n Institutions.institutionsFetchInstitutionFilesExpiredSuccess({\n filesExpired,\n })\n );\n if (callbackSuccess) {\n callbackSuccess(filesExpired);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doInstitutionsFetchInstitutionFilesExpired\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Institutions.institutionsFetchInstitutionFilesExpiredFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doInstitutionsUploadInstitutionFiles(\n action: Action<\n string,\n {\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Institutions.institutionsUploadInstitutionFilesRequest());\n window.logger.log(\"doInstitutionsUploadInstitutionFiles\", action);\n const { body, callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to upload all files for this institution\n const { data } = yield call(\n InstitutionsApi.UploadInstitutionFiles,\n api,\n body,\n { token }\n );\n const { files } = data;\n yield put(Institutions.institutionsUploadInstitutionFilesSuccess());\n if (callbackSuccess) {\n callbackSuccess(files);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doInstitutionsUploadInstitutionFiles\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Institutions.institutionsUploadInstitutionFilesFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doInstitutionsDelete(\n action: Action<\n string,\n {\n institutionId: string;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Institutions.institutionsDeleteRequest());\n window.logger.log(\"doInstitutionsDelete\", action);\n const {\n institutionId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to delete a institution for that specific institutionId\n yield call(InstitutionsApi.DeleteInstitution, api, institutionId, {\n token,\n });\n yield put(Institutions.institutionsDeleteSuccess({ institutionId }));\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.log(\"ErrorSaga - doInstitutionsDelete\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Institutions.institutionsDeleteFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nexport default function* institutionsSagas(): Generator {\n yield all([\n takeLatest(\n Institutions.INSTITUTIONS_FETCH_INSTITUTIONS,\n doInstitutionsFetchInstitutions\n ),\n takeLatest(Institutions.INSTITUTIONS_CREATE, doInstitutionsCreate),\n takeLatest(\n Institutions.INSTITUTIONS_FETCH_INSTITUTION,\n doInstitutionsFetchInstitution\n ),\n takeLatest(\n Institutions.INSTITUTIONS_FETCH_INSTITUTION_AVAILABILITIES,\n doInstitutionsFetchInstitutionAvailabilities\n ),\n takeLatest(\n Institutions.INSTITUTIONS_EDIT_INSTITUTION,\n doInstitutionsEditInstitution\n ),\n takeLatest(\n Institutions.INSTITUTIONS_EDIT_INSTITUTION_AVAILABILITIES,\n doInstitutionsEditInstitutionAvailabilities\n ),\n takeLatest(\n Institutions.INSTITUTIONS_FETCH_INSTITUTION_FILES,\n doInstitutionsFetchInstitutionFiles\n ),\n takeLatest(\n Institutions.INSTITUTIONS_FETCH_INSTITUTION_FILES_EXPIRED,\n doInstitutionsFetchInstitutionFilesExpired\n ),\n takeLatest(\n Institutions.INSTITUTIONS_UPLOAD_INSTITUTION_FILES,\n doInstitutionsUploadInstitutionFiles\n ),\n takeLatest(Institutions.INSTITUTIONS_DELETE, doInstitutionsDelete),\n ]);\n}\n","import type { Config, tAPI } from \"./API\";\n// API Metrics and Charts static class\n\nconst apiBaseMetrics = \"/metric-pages\";\nexport default class Metrics {\n // API METRICS PAGES\n // Get a list of metrics pages to use getting charts\n static GetMetricsPages(api: tAPI, config?: Config) {\n let queryParams = \"?populated=true\";\n return api.GET(`${apiBaseMetrics}${queryParams}`, config);\n }\n // Create a metric page to use on Reports Stats\n static CreateMetricPage(api: tAPI, data: object, config?: Config) {\n return api.POST(`${apiBaseMetrics}`, data, config);\n }\n // Get a metric page from specific pageId\n static GetMetricPage(api: tAPI, pageId: string, config?: Config) {\n return api.GET(`${apiBaseMetrics}/${pageId}`, config);\n }\n // Edit a metric page to use on Reports Stats\n static EditMetricPage(\n api: tAPI,\n pageId: string,\n data: object,\n config?: Config\n ) {\n return api.PATCH(`${apiBaseMetrics}/${pageId}`, data, config);\n }\n // Delete a metric page\n static DeleteMetricPage(api: tAPI, pageId: string, config?: Config) {\n return api.DELETE(`${apiBaseMetrics}/${pageId}`, config);\n }\n // API METRICS PAGES - CHARTS\n // API to get all Charts from some metric page\n static GetMetricPageCharts(api: tAPI, pageId: string, config?: Config) {\n return api.GET(`${apiBaseMetrics}/${pageId}/charts?populated=true`, config);\n }\n // Create a chart for some metric page to use on Reports Stats\n static CreateMetricPageChart(\n api: tAPI,\n pageId: string,\n data: object,\n config?: Config\n ) {\n return api.POST(`${apiBaseMetrics}/${pageId}/charts`, data, config);\n }\n // Get a saved report result\n static GetMetricPageChart(\n api: tAPI,\n pageId: string,\n chartId: string,\n config?: Config\n ) {\n return api.GET(\n `${apiBaseMetrics}/${pageId}/charts/${chartId}?populated=true`,\n config\n );\n }\n // Edit a chart from some metric page to use on Reports Stats\n static EditMetricPageChart(\n api: tAPI,\n pageId: string,\n chartId: string,\n data: object,\n config?: Config\n ) {\n return api.PATCH(\n `${apiBaseMetrics}/${pageId}/charts/${chartId}`,\n data,\n config\n );\n }\n // Delete a metric page\n static DeleteMetricPageChart(\n api: tAPI,\n pageId: string,\n chartId: string,\n config?: Config\n ) {\n return api.DELETE(`${apiBaseMetrics}/${pageId}/charts/${chartId}`, config);\n }\n}\n","import { put, select, call, all, takeLatest } from \"redux-saga/effects\";\nimport MetricsApi from \"../api/Metrics\";\nimport { Auth, Metrics } from \"../actions/\";\n// Type\nimport type { Action } from \"deox\";\nimport type { tAPI } from \"../api/API\";\n//Sagas for Metrics\n// METRICS PAGES\nfunction* doMetricsFetchMetricsPages(\n action: Action<\n string,\n {\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Metrics.metricsFetchMetricsPagesRequest());\n window.logger.log(\"doMetricsFetchMetricsPages\", action);\n const { callbackSuccess = null, callbackError = null } = action.payload || {};\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get all metric pages for this company\n const {\n data: { pages },\n } = yield call(MetricsApi.GetMetricsPages, api, { token });\n yield put(\n Metrics.metricsFetchMetricsPagesSuccess({\n pages,\n })\n );\n if (callbackSuccess) {\n callbackSuccess(pages);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doMetricsFetchMetricsPages\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Metrics.metricsFetchMetricsPagesFailure());\n if (callbackError) {\n callbackError(error);\n }\n }\n}\n\nfunction* doMetricsCreateMetricPage(\n action: Action<\n string,\n {\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Metrics.metricsCreateMetricPageRequest());\n window.logger.log(\"doMetricsCreateMetricPage\", action);\n const { body, callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to create a new metric page to use getting charts\n const {\n data: { page },\n } = yield call(MetricsApi.CreateMetricPage, api, body, { token });\n yield put(\n Metrics.metricsCreateMetricPageSuccess({\n page,\n })\n );\n if (callbackSuccess) {\n callbackSuccess(page);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doMetricsCreateMetricPage\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Metrics.metricsCreateMetricPageFailure());\n const { message, details } = errors || \"\";\n if (callbackError) {\n let errorMsg = message;\n if (details && details.length > 0) {\n errorMsg = `${errorMsg}: ${details[0].msg}`;\n }\n callbackError(errorMsg);\n }\n }\n}\n\nfunction* doMetricsFetchMetricPage(\n action: Action<\n string,\n {\n pageId: string;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Metrics.metricsFetchMetricPageRequest());\n window.logger.log(\"doMetricsFetchMetricPage\", action);\n const {\n pageId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get a metric page for that specific pageId\n const {\n data: { page },\n } = yield call(MetricsApi.GetMetricPage, api, pageId, { token });\n yield put(\n Metrics.metricsFetchMetricPageSuccess({\n page,\n })\n );\n if (callbackSuccess) {\n callbackSuccess(page);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doMetricsFetchMetricPage\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Metrics.metricsFetchMetricPageFailure());\n if (callbackError) {\n callbackError(error);\n }\n }\n}\n\nfunction* doMetricsEditMetricPage(\n action: Action<\n string,\n {\n pageId: string;\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Metrics.metricsEditMetricPageRequest());\n window.logger.log(\"doMetricsEditMetricPage\", action);\n const {\n pageId,\n body,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to update a metric page for that specific pageId\n const {\n data: { page },\n } = yield call(MetricsApi.EditMetricPage, api, pageId, body, { token });\n yield put(\n Metrics.metricsEditMetricPageSuccess({\n page,\n })\n );\n if (callbackSuccess) {\n yield put(Metrics.metricsFetchMetricPageCharts({ pageId }));\n callbackSuccess(page);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doMetricsEditMetricPage\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Metrics.metricsEditMetricPageFailure());\n const { message, details } = errors || \"\";\n if (callbackError) {\n let errorMsg = message;\n if (details && details.length > 0) {\n errorMsg = `${errorMsg}: ${details[0].msg}`;\n }\n callbackError(errorMsg);\n }\n }\n}\n\nfunction* doMetricsDeleteMetricPage(\n action: Action<\n string,\n {\n pageId: string;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Metrics.metricsDeleteMetricPageRequest());\n window.logger.log(\"doMetricsDeleteMetricPage\", action);\n const {\n pageId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to delete a page from some specific pageId\n yield call(MetricsApi.DeleteMetricPage, api, pageId, { token });\n yield put(\n Metrics.metricsDeleteMetricPageSuccess({\n pageId,\n })\n );\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doMetricsDeleteMetricPage\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Metrics.metricsDeleteMetricPageFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n// END METRICS PAGES />\n\n// METRICS PAGES - CHARTS\nfunction* doMetricsFetchMetricPageCharts(\n action: Action<\n string,\n {\n pageId: string;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Metrics.metricsFetchMetricPageChartsRequest());\n window.logger.log(\"doMetricsFetchMetricPageCharts\", action);\n const {\n pageId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload || {};\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get all charts from some metric page\n const {\n data: { charts },\n } = yield call(MetricsApi.GetMetricPageCharts, api, pageId, { token });\n yield put(\n Metrics.metricsFetchMetricPageChartsSuccess({\n charts,\n })\n );\n if (callbackSuccess) {\n callbackSuccess(charts);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doMetricsFetchMetricPageCharts\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Metrics.metricsFetchMetricPageChartsFailure());\n if (callbackError) {\n callbackError(error);\n }\n }\n}\n\nfunction* doMetricsCreateMetricPageChart(\n action: Action<\n string,\n {\n pageId: string;\n body: object;\n query: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Metrics.metricsCreateMetricPageChartRequest());\n window.logger.log(\"doMetricsCreateMetricPageChart\", action);\n const {\n pageId,\n body,\n query,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to create a new chart for some metric page\n const {\n data: { chart },\n } = yield call(MetricsApi.CreateMetricPageChart, api, pageId, body, {\n token,\n });\n yield put(\n Metrics.metricsCreateMetricPageChartSuccess({\n chart: {\n ...chart,\n query,\n },\n })\n );\n if (callbackSuccess) {\n yield put(Metrics.metricsFetchMetricPageCharts({ pageId }));\n callbackSuccess(chart);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doMetricsCreateMetricPageChart\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Metrics.metricsCreateMetricPageChartFailure());\n const { message, details } = errors || \"\";\n if (callbackError) {\n let errorMsg = message;\n if (details && details.length > 0) {\n errorMsg = `${errorMsg}: ${details[0].msg}`;\n }\n callbackError(errorMsg);\n }\n }\n}\n\nfunction* doMetricsFetchMetricPageChart(\n action: Action<\n string,\n {\n pageId: string;\n chartId: string;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Metrics.metricsFetchMetricPageChartRequest());\n window.logger.log(\"doMetricsFetchMetricPageChart\", action);\n const {\n pageId,\n chartId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get a chart from some specific chartId for some metric page\n const {\n data: { chart },\n } = yield call(MetricsApi.GetMetricPageChart, api, pageId, chartId, {\n token,\n });\n\n yield put(\n Metrics.metricsFetchMetricPageChartSuccess({\n chart,\n })\n );\n if (callbackSuccess) {\n callbackSuccess(chart);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doMetricsFetchMetricPageChart\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Metrics.metricsFetchMetricPageChartFailure());\n if (callbackError) {\n callbackError(error);\n }\n }\n}\n\nfunction* doMetricsEditMetricPageChart(\n action: Action<\n string,\n {\n pageId: string;\n chartId: string;\n body: object;\n query: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Metrics.metricsEditMetricPageChartRequest());\n window.logger.log(\"doMetricsEditMetricPageChart\", action);\n const {\n pageId,\n chartId,\n body,\n query,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to update a chart from some specific chartId for some metric page\n const {\n data: { chart },\n } = yield call(MetricsApi.EditMetricPageChart, api, pageId, chartId, body, {\n token,\n });\n yield put(\n Metrics.metricsEditMetricPageChartSuccess({\n chart: {\n ...chart,\n query,\n },\n })\n );\n if (callbackSuccess) {\n yield put(Metrics.metricsFetchMetricPageCharts({ pageId }));\n callbackSuccess(chart);\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doMetricsEditMetricPageChart\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Metrics.metricsEditMetricPageChartFailure());\n const { message, details } = errors || \"\";\n if (callbackError) {\n let errorMsg = message;\n if (details && details.length > 0) {\n errorMsg = `${errorMsg}: ${details[0].msg}`;\n }\n callbackError(errorMsg);\n }\n }\n}\n\nfunction* doMetricsDeleteMetricPageChart(\n action: Action<\n string,\n {\n pageId: string;\n chartId: string;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Metrics.metricsDeleteMetricPageChartRequest());\n window.logger.log(\"doMetricsDeleteMetricPageChart\", action);\n const {\n pageId,\n chartId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to delete a chart from some specific chartId for some metric page\n yield call(MetricsApi.DeleteMetricPageChart, api, pageId, chartId, {\n token,\n });\n yield put(\n Metrics.metricsDeleteMetricPageChartSuccess({\n chartId,\n })\n );\n if (callbackSuccess) {\n yield put(Metrics.metricsFetchMetricPageCharts({ pageId }));\n callbackSuccess();\n }\n } catch (error) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doMetricsDeleteMetricPageChart\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Metrics.metricsDeleteMetricPageChartFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n// END METRICS PAGES -CHARTS />\n\nexport default function* reportsSagas(): Generator {\n yield all([\n // Metrics Pages\n takeLatest(Metrics.METRICS_FETCH_METRICS_PAGES, doMetricsFetchMetricsPages),\n takeLatest(Metrics.METRICS_CREATE_METRIC_PAGE, doMetricsCreateMetricPage),\n takeLatest(Metrics.METRICS_FETCH_METRIC_PAGE, doMetricsFetchMetricPage),\n takeLatest(Metrics.METRICS_EDIT_METRIC_PAGE, doMetricsEditMetricPage),\n takeLatest(Metrics.METRICS_DELETE_METRIC_PAGE, doMetricsDeleteMetricPage),\n // Metrics Pages - Charts\n takeLatest(\n Metrics.METRICS_FETCH_METRIC_PAGE_CHARTS,\n doMetricsFetchMetricPageCharts\n ),\n takeLatest(\n Metrics.METRICS_CREATE_METRIC_PAGE_CHART,\n doMetricsCreateMetricPageChart\n ),\n takeLatest(\n Metrics.METRICS_FETCH_METRIC_PAGE_CHART,\n doMetricsFetchMetricPageChart\n ),\n takeLatest(\n Metrics.METRICS_EDIT_METRIC_PAGE_CHART,\n doMetricsEditMetricPageChart\n ),\n takeLatest(\n Metrics.METRICS_DELETE_METRIC_PAGE_CHART,\n doMetricsDeleteMetricPageChart\n ),\n ]);\n}\n","import type { Config, tAPI } from \"./API\";\nimport type { State as StateNotifications } from \"../../store/reducers/notifications\";\n// API Notifications static class\nconst apiBaseNotifications = \"/notifications\";\nexport default class Notifications {\n // Get a list of notifications\n static GetNotifications(\n api: tAPI,\n userId: string,\n notificationType: \"notifications\" | \"reminders\" | \"testimonial-request\",\n notificationsCategories: StateNotifications[\"notificationsCategories\"],\n skip: number,\n limit: number,\n config?: Config\n ) {\n let queryParams = `?user=${userId}`;\n if (notificationType) {\n queryParams += `¬ificationType=${notificationType}`;\n }\n if (notificationsCategories.length > 0) {\n queryParams += `¬ificationCategory=${notificationsCategories.join()}`;\n }\n if (skip) {\n queryParams += `&skip=${skip}`;\n }\n if (limit) {\n queryParams += `&limit=${limit}`;\n }\n return api.GET(`${apiBaseNotifications}${queryParams}`, config);\n }\n // Mark as read a list of notifications\n static MarkAsReadNotifications(api: tAPI, data: object, config?: Config) {\n return api.POST(`${apiBaseNotifications}/markAsRead`, data, config);\n }\n // Update last seen notification\n static LastSeenNotification(api: tAPI, data: object, config?: Config) {\n return api.POST(`${apiBaseNotifications}/lastSeen`, data, config);\n }\n // Delete a list of notifications\n static DeleteNotifications(\n api: tAPI,\n notificationsCategories: StateNotifications[\"notificationsCategories\"],\n config?: Config\n ) {\n let queryParams = \"\";\n if (notificationsCategories.length > 0) {\n queryParams += `?notificationCategory=${notificationsCategories.join()}`;\n }\n return api.DELETE(`${apiBaseNotifications}${queryParams}`, config);\n }\n // Delete a notification\n static DeleteNotification(\n api: tAPI,\n notificationId: string,\n config?: Config\n ) {\n return api.DELETE(`${apiBaseNotifications}/${notificationId}`, config);\n }\n // Create a Reminders Notification\n static CreateRemindersNotification(api: tAPI, data: object, config?: Config) {\n return api.POST(`${apiBaseNotifications}/reminders`, data, config);\n }\n // Socket\n // Register a Socket with some connection ID\n static RegisterSocketConnectionID(api: tAPI, config?: Config) {\n return api.PUT(`${apiBaseNotifications}/register`, {}, config);\n }\n}\n","import { put, select, call, all, takeLatest } from \"redux-saga/effects\";\nimport NotificationsApi from \"../api/Notifications\";\nimport { Auth, Notifications } from \"../actions/\";\n// Type\nimport type { Action } from \"deox\";\nimport type { tAPI } from \"../api/API\";\nimport type { State as StateNotifications } from \"../../store/reducers/notifications\";\n//Sagas for Notifications\n// SOCKET\nfunction* doNotificationsRegisterSocket(\n action: Action<\n string,\n {\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Notifications.notificationsRegisterSocketRequest());\n window.logger.log(\"doNotificationsRegisterSocket\", action);\n const { callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get a socket connection ID to start get notifications by socket\n const { data } = yield call(\n NotificationsApi.RegisterSocketConnectionID,\n api,\n { token }\n );\n const { socketConnectionId } = data;\n yield put(\n Notifications.notificationsRegisterSocketSuccess({ socketConnectionId })\n );\n yield put(Notifications.notificationsSetSocketConnectionId());\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doNotificationsRegisterSocket\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Notifications.notificationsRegisterSocketFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doNotificationsSetSocketConnectionId(action: Action) {\n yield put(Notifications.notificationsSetSocketConnectionIdRequest());\n window.logger.log(\"doNotificationsSetSocketConnectionId\", action);\n const userId: string = yield select(({ auth: { user } }) => user._id);\n const { socketConnectionId, socket } = yield select(\n ({ notifications: { socketConnectionId, socket } }) => ({\n socketConnectionId,\n socket,\n })\n );\n socket.connect(userId, socketConnectionId);\n}\n\n// NOTIFICATIONS\nfunction* doNotificationsFetchNotifications(\n action: Action<\n string,\n {\n skip: number;\n limit: number;\n notificationType: \"notifications\" | \"reminders\" | \"testimonial-request\";\n notificationsFiltersByCategories: boolean;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n window.logger.log(\"doNotificationsFetchNotifications\", action);\n try {\n const {\n skip = 0,\n limit = 20,\n notificationType = \"notifications\",\n notificationsFiltersByCategories = false,\n callbackSuccess = null,\n } = action.payload || {};\n yield put(\n Notifications.notificationsFetchNotificationsRequest({\n notificationsFiltersByCategories,\n })\n );\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n const userId: string = yield select(({ auth: { user } }) => user._id);\n const notificationsCategories: StateNotifications[\"notificationsCategories\"] =\n yield select(\n ({ notifications: { notificationsCategories } }) =>\n notificationsCategories\n );\n // call the api to get all notifications for this company\n const { data } = yield call(\n NotificationsApi.GetNotifications,\n api,\n userId,\n notificationType,\n notificationsCategories,\n skip,\n limit,\n { token }\n );\n const { notifications, total, unseen } = data;\n yield put(\n Notifications.notificationsFetchNotificationsSuccess({\n notifications,\n notificationsFiltersByCategories,\n totalNotifications: total,\n unseenNotifications: unseen,\n })\n );\n if (callbackSuccess) {\n callbackSuccess(notifications);\n }\n } catch (error: any) {\n const { callbackError = null } = action.payload || {};\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doNotificationsFetchNotifications\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Notifications.notificationsFetchNotificationsFailure());\n if (callbackError) {\n callbackError(error);\n }\n }\n}\n\nfunction* doNotificationsMarkAsReadNotifications(\n action: Action<\n string,\n {\n notificationId?: string;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n window.logger.log(\"doNotificationsMarkAsReadNotifications\", action);\n try {\n yield put(Notifications.notificationsMarkAsReadNotificationsRequest());\n const { notificationId, callbackSuccess = null } = action.payload || {};\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n let body = {};\n if (notificationId) {\n body = {\n notifications: [notificationId],\n };\n } else {\n body = {\n markAll: true,\n };\n const notificationsCategories: StateNotifications[\"notificationsCategories\"] =\n yield select(\n ({ notifications: { notificationsCategories } }) =>\n notificationsCategories\n );\n if (notificationsCategories.length > 0) {\n body = {\n notificationCategory: notificationsCategories\n .map((notificationCategory) => notificationCategory.split(\",\"))\n .reduce((ac, v) => [...ac, ...v], []),\n };\n }\n }\n // call the api to mark as read a list of notifications\n const { data } = yield call(\n NotificationsApi.MarkAsReadNotifications,\n api,\n body,\n { token }\n );\n const { nNotificationsUpdated } = data;\n yield put(\n Notifications.notificationsMarkAsReadNotificationsSuccess({\n notificationId,\n nNotificationsUpdated,\n })\n );\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doNotificationsMarkAsReadNotifications\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Notifications.notificationsMarkAsReadNotificationsFailure());\n const { message } = errors || \"\";\n const { callbackError = null } = action.payload || {};\n if (callbackError) {\n callbackError(message);\n }\n }\n}\nfunction* doNotificationsLastSeenNotification(\n action: Action<\n string,\n {\n notificationId: string;\n body: object;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Notifications.notificationsLastSeenNotificationRequest());\n window.logger.log(\"doNotificationsLastSeenNotification\", action);\n const {\n notificationId,\n body,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to update last seen notification\n const { data } = yield call(\n NotificationsApi.LastSeenNotification,\n api,\n body,\n { token }\n );\n const { nNotificationsUpdated } = data;\n yield put(\n Notifications.notificationsLastSeenNotificationSuccess({\n notificationId,\n nNotificationsUpdated,\n })\n );\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doNotificationsLastSeenNotification\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Notifications.notificationsLastSeenNotificationFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\nfunction* doNotificationsDelete(\n action: Action<\n string,\n {\n notificationId: string;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n window.logger.log(\"doNotificationsDelete\", action);\n try {\n yield put(Notifications.notificationsDeleteRequest());\n const { notificationId, callbackSuccess = null } = action.payload || {};\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n let nNotificationsUpdated = 0;\n if (notificationId) {\n // call the api to delete a notification\n yield call(NotificationsApi.DeleteNotification, api, notificationId, {\n token,\n });\n nNotificationsUpdated = 1;\n } else {\n const notificationsCategories: StateNotifications[\"notificationsCategories\"] =\n yield select(\n ({ notifications: { notificationsCategories } }) =>\n notificationsCategories\n );\n // call the api to delete a list of notifications\n const { data } = yield call(\n NotificationsApi.DeleteNotifications,\n api,\n notificationsCategories,\n { token }\n );\n ({ nNotificationsDeleted: nNotificationsUpdated } = data);\n }\n yield put(\n Notifications.notificationsDeleteSuccess({\n notificationId,\n nNotificationsUpdated,\n })\n );\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doNotificationsDelete\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Notifications.notificationsDeleteFailure());\n const { message } = errors || \"\";\n const { callbackError = null } = action.payload || {};\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doNotificationsCreateReminders(\n action: Action<\n string,\n {\n body: object;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Notifications.notificationsCreateRemindersRequest());\n window.logger.log(\"doNotificationsCreateReminders\", action);\n const { body, callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to create a new reminders notification\n yield call(NotificationsApi.CreateRemindersNotification, api, body, {\n token,\n });\n yield put(Notifications.notificationsCreateRemindersSuccess());\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doNotificationsCreateReminders\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Notifications.notificationsCreateRemindersFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nexport default function* notificationsSagas(): Generator {\n yield all([\n // SOCKET\n takeLatest(\n Notifications.NOTIFICATIONS_REGISTER_SOCKET,\n doNotificationsRegisterSocket\n ),\n takeLatest(\n Notifications.NOTIFICATIONS_SET_SOCKET_CONNECTION_ID,\n doNotificationsSetSocketConnectionId\n ),\n // NOTIFICATIONS\n takeLatest(\n Notifications.NOTIFICATIONS_FETCH_NOTIFICATIONS,\n doNotificationsFetchNotifications\n ),\n takeLatest(\n Notifications.NOTIFICATIONS_MARK_AS_READ_NOTIFICATIONS,\n doNotificationsMarkAsReadNotifications\n ),\n takeLatest(\n Notifications.NOTIFICATIONS_LAST_SEEN_NOTIFICATION,\n doNotificationsLastSeenNotification\n ),\n takeLatest(Notifications.NOTIFICATIONS_DELETE, doNotificationsDelete),\n takeLatest(\n Notifications.NOTIFICATIONS_CREATE_REMINDERS,\n doNotificationsCreateReminders\n ),\n ]);\n}\n","import type { Config, tAPI } from \"./API\";\n// API Periods static class\n\nconst apiBasePeriods = \"/periods\";\nexport default class Periods {\n // Get a list of periods\n static GetPeriods(api: tAPI, config?: Config) {\n return api.GET(`${apiBasePeriods}`, config);\n }\n // Create a Period\n static CreatePeriod(api: tAPI, data: object, config?: Config) {\n return api.POST(`${apiBasePeriods}`, data, config);\n }\n // Edit a Period\n static EditPeriod(\n api: tAPI,\n periodId: string,\n data: object,\n config?: Config\n ) {\n return api.PATCH(`${apiBasePeriods}/${periodId}`, data, config);\n }\n // Delete a Period\n static DeletePeriod(api: tAPI, periodId: string, config?: Config) {\n return api.DELETE(`${apiBasePeriods}/${periodId}`, config);\n }\n}\n","import { put, select, call, all, takeLatest } from \"redux-saga/effects\";\nimport sortBy from \"lodash/sortBy\";\nimport PeriodsApi from \"../api/Periods\";\nimport { Auth, Periods } from \"../actions/\";\n// Type\nimport type { Action } from \"deox\";\nimport type { tAPI } from \"../api/API\";\n//Sagas for Periods\nfunction* doPeriodsFetchPeriods(\n action: Action<\n string,\n {\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Periods.periodsFetchAllRequest());\n window.logger.log(\"doPeriodsFetchPeriods\", action);\n const { callbackSuccess = null, callbackError = null } = action.payload || {};\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get all periods for this company\n const { data } = yield call(PeriodsApi.GetPeriods, api, { token });\n const { periods } = data;\n const periodsSortByName = sortBy(periods, [\"name\"]).reverse();\n yield put(Periods.periodsFetchAllSuccess({ periods: periodsSortByName }));\n if (callbackSuccess) {\n callbackSuccess(periodsSortByName);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doPeriodsFetchPeriods\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Periods.periodsFetchAllFailure());\n if (callbackError) {\n callbackError(error);\n }\n }\n}\n\nfunction* doPeriodsCreate(\n action: Action<\n string,\n {\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Periods.periodsCreateRequest());\n window.logger.log(\"doPeriodsCreate\", action);\n const { body, callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to create a new period\n const { data } = yield call(PeriodsApi.CreatePeriod, api, body, { token });\n const { period } = data;\n yield put(Periods.periodsCreateSuccess({ period }));\n if (callbackSuccess) {\n callbackSuccess(period);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doPeriodsCreate\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Periods.periodsCreateFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doPeriodsEdit(\n action: Action<\n string,\n {\n periodId: string;\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Periods.periodsEditRequest());\n window.logger.log(\"doPeriodsEdit\", action);\n const {\n periodId,\n body,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to edit a period for that specific periodId\n const { data } = yield call(PeriodsApi.EditPeriod, api, periodId, body, {\n token,\n });\n const { period } = data;\n yield put(Periods.periodsEditSuccess({ period }));\n if (callbackSuccess) {\n callbackSuccess(period);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doPeriodsEdit\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Periods.periodsEditFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doPeriodsDelete(\n action: Action<\n string,\n {\n periodId: string;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Periods.periodsDeleteRequest());\n window.logger.log(\"doPeriodsDelete\", action);\n const {\n periodId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to delete a period for that specific periodId\n yield call(PeriodsApi.DeletePeriod, api, periodId, { token });\n yield put(Periods.periodsDeleteSuccess({ periodId }));\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doPeriodsDelete\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Periods.periodsDeleteFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nexport default function* periodsSagas(): Generator {\n yield all([\n takeLatest(Periods.PERIODS_FETCH_ALL, doPeriodsFetchPeriods),\n takeLatest(Periods.PERIODS_CREATE, doPeriodsCreate),\n takeLatest(Periods.PERIODS_EDIT, doPeriodsEdit),\n takeLatest(Periods.PERIODS_DELETE, doPeriodsDelete),\n ]);\n}\n","import type { Config, tAPI } from \"./API\";\n// API Programs static class\n\nconst apiBasePrograms = \"/programs\";\nexport default class Programs {\n // Get a list of programs\n static GetPrograms(api: tAPI, config?: Config) {\n return api.GET(`${apiBasePrograms}`, config);\n }\n // Create a Program\n static CreateProgram(api: tAPI, data: object, config?: Config) {\n return api.POST(`${apiBasePrograms}`, data, config);\n }\n // Edit a Program\n static EditProgram(\n api: tAPI,\n programId: string,\n data: object,\n config?: Config\n ) {\n return api.PATCH(`${apiBasePrograms}/${programId}`, data, config);\n }\n // Delete a Program\n static DeleteProgram(api: tAPI, programId: string, config?: Config) {\n return api.DELETE(`${apiBasePrograms}/${programId}`, config);\n }\n}\n","import { put, select, call, all, takeLatest } from \"redux-saga/effects\";\nimport sortBy from \"lodash/sortBy\";\nimport ProgramsApi from \"../api/Programs\";\nimport { Auth, Programs } from \"../actions/\";\n// Type\nimport type { Action } from \"deox\";\nimport type { tAPI } from \"../api/API\";\n//Sagas for Programs\nfunction* doProgramsFetchPrograms(\n action: Action<\n string,\n {\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Programs.programsFetchProgramsRequest());\n window.logger.log(\"doProgramsFetchPrograms\", action);\n const { callbackSuccess = null, callbackError = null } = action.payload || {};\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get all programs for this company\n const { data } = yield call(ProgramsApi.GetPrograms, api, { token });\n const { programs } = data;\n const programsSortByName = sortBy(programs, [\"name\"]).reverse();\n yield put(\n Programs.programsFetchProgramsSuccess({ programs: programsSortByName })\n );\n if (callbackSuccess) {\n callbackSuccess(programsSortByName);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doProgramsFetchPrograms\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Programs.programsFetchProgramsFailure());\n if (callbackError) {\n callbackError(error);\n }\n }\n}\n\nfunction* doProgramsCreate(\n action: Action<\n string,\n {\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Programs.programsCreateRequest());\n window.logger.log(\"doProgramsCreate\", action);\n const { body, callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to create a new program\n const { data } = yield call(ProgramsApi.CreateProgram, api, body, {\n token,\n });\n const { program } = data;\n yield put(Programs.programsCreateSuccess({ program }));\n if (callbackSuccess) {\n callbackSuccess(program);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doProgramsCreate\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Programs.programsCreateFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doProgramsEditProgram(\n action: Action<\n string,\n {\n programId: string;\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Programs.programsEditProgramRequest());\n window.logger.log(\"doProgramsEditProgram\", action);\n const {\n programId,\n body,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to update a program for that specific programId\n const { data } = yield call(ProgramsApi.EditProgram, api, programId, body, {\n token,\n });\n const { program } = data;\n yield put(Programs.programsEditProgramSuccess({ program }));\n if (callbackSuccess) {\n callbackSuccess(program);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doProgramsEditProgram\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Programs.programsEditProgramFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doProgramsDelete(\n action: Action<\n string,\n {\n programId: string;\n callbackSuccess?: () => void;\n callbackError?: (error: any, details: any) => void;\n }\n >\n) {\n yield put(Programs.programsDeleteRequest());\n window.logger.log(\"doProgramsDelete\", action);\n const {\n programId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to delete a program for that specific programId\n yield call(ProgramsApi.DeleteProgram, api, programId, { token });\n yield put(Programs.programsDeleteSuccess({ programId }));\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doProgramsDelete\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Programs.programsDeleteFailure());\n const { message, details } = errors || \"\";\n if (callbackError) {\n callbackError(message, details);\n }\n }\n}\n\nexport default function* programsSagas(): Generator {\n yield all([\n takeLatest(Programs.PROGRAMS_FETCH_PROGRAMS, doProgramsFetchPrograms),\n takeLatest(Programs.PROGRAMS_CREATE, doProgramsCreate),\n takeLatest(Programs.PROGRAMS_EDIT_PROGRAM, doProgramsEditProgram),\n takeLatest(Programs.PROGRAMS_DELETE, doProgramsDelete),\n ]);\n}\n","import type { Config, tAPI } from \"./API\";\nimport type { StateUsersManager } from \"../../types/users.types\";\n// API Rotations static class\nconst apiBaseRotations = \"/rotations\";\nexport default class Rotations {\n // Get a list of rotations depend on case:\n // student: UserID, preceptor: UserID, institution: InstitutionID,\n // period: periodID, start, end\n static GetRotations(\n api: tAPI,\n populated: boolean,\n skip: number,\n limit: number,\n status: string[],\n userStatus: StateUsersManager[\"filters\"][\"status\"],\n students: string[],\n programs: string[],\n cohorts: string[],\n institutions: string[],\n periods: string[],\n search: string,\n startDate: string,\n endDate: string,\n sortBy: {\n student: \"ascending\" | \"descending\" | \"\";\n institution: \"ascending\" | \"descending\" | \"\";\n start_end: \"ascending\" | \"descending\" | \"\";\n status: \"ascending\" | \"descending\" | \"\";\n },\n config?: Config\n ) {\n let queryParams = \"\";\n if (skip >= 0) {\n queryParams += `&skip=${skip}`;\n }\n if (limit > 0) {\n queryParams += `&limit=${limit}`;\n }\n if (status.length > 0) {\n queryParams += `&status=${status.join()}`;\n }\n if (userStatus.length > 0) {\n queryParams += `&userStatus=${userStatus.join()}`;\n }\n if (students.length > 0) {\n queryParams += `&students=${students.join()}`;\n }\n if (programs.length > 0) {\n queryParams += `&programs=${programs.join()}`;\n }\n if (cohorts.length > 0) {\n queryParams += `&cohorts=${cohorts.join()}`;\n }\n if (institutions.length > 0) {\n queryParams += `&institutions=${institutions.join()}`;\n }\n if (periods.length > 0) {\n queryParams += `&periods=${periods.join()}`;\n }\n if (search) {\n queryParams += `&search=${search}`;\n }\n if (startDate) {\n queryParams += `&start=${startDate}`;\n }\n if (endDate) {\n queryParams += `&end=${endDate}`;\n }\n if (populated) {\n let sortByParams = Object.keys(sortBy)\n // @ts-ignore\n .filter((sortKey) => sortBy[sortKey])\n .map(\n (sortName) =>\n // @ts-ignore\n `sort_${sortName}=${sortBy[sortName] === \"ascending\" ? 1 : -1}`\n )\n .join(\"&\");\n if (sortByParams) {\n sortByParams = \"&\" + sortByParams;\n }\n queryParams = \"?populated=true\" + queryParams + sortByParams;\n } else if (queryParams.length > 0) {\n queryParams = \"?\" + queryParams.slice(1);\n }\n return api.GET(`${apiBaseRotations}${queryParams}`, config);\n }\n // Get Rotations KPIS\n static GetRotationsKpis(api: tAPI, config?: Config) {\n return api.GET(`${apiBaseRotations}/kpis`, config);\n }\n // Create Rotations\n static CreateRotations(api: tAPI, data: object, config?: Config) {\n return api.POST(`${apiBaseRotations}`, data, config);\n }\n // Edit in bulk a group of rotations based on filters\n static EditRotations(api: tAPI, data: object, config?: Config) {\n return api.PATCH(`${apiBaseRotations}`, data, config);\n }\n // Set Automatic Rotations\n static SetAutomaticRotations(api: tAPI, data: object, config?: Config) {\n return api.POST(`${apiBaseRotations}/automatic`, data, config);\n }\n // Get a Rotation\n static GetRotation(api: tAPI, rotationId: string, config?: Config) {\n return api.GET(`${apiBaseRotations}/${rotationId}?populated=true`, config);\n }\n // Edit a Rotation\n static EditRotation(\n api: tAPI,\n rotationId: string,\n data: object,\n config?: Config\n ) {\n return api.PATCH(`${apiBaseRotations}/${rotationId}`, data, config);\n }\n // Delete a Rotation\n static DeleteRotation(api: tAPI, rotationId: string, config?: Config) {\n return api.DELETE(`${apiBaseRotations}/${rotationId}`, config);\n }\n}\n","import axios from \"axios\";\nimport { put, select, call, all, takeLatest } from \"redux-saga/effects\";\nimport sortBy from \"lodash/sortBy\";\nimport RotationsApi from \"../api/Rotations\";\nimport { Api, Auth, Rotations } from \"../actions/\";\n// Types\nimport type { Action } from \"deox\";\nimport type { tAPI } from \"../api/API\";\nimport type { CancelRequest, State as StateApi } from \"../reducers/api\";\nimport type { StateRotationsListGridContainer } from \"../../components/rotations/_Rotations.types\";\nimport type { StateUsersManager } from \"../../types/users.types\";\nimport type { StateRotations } from \"../../types/rotations.types\";\n//Sagas for Rotations\nfunction* doRotationsFetchByFilters(\n action: Action<\n string,\n {\n populated?: boolean;\n page?: number;\n limit?: number;\n searchTxt?: string;\n status?: string[];\n userStatus?: StateUsersManager[\"filters\"][\"status\"];\n students?: string[];\n programs?: string[];\n cohorts?: string[];\n preceptors?: string[];\n institutions?: string[];\n periods?: string[];\n startDate: string;\n endDate: string;\n sortBy?: {\n student: \"ascending\" | \"descending\" | \"\";\n institution: \"ascending\" | \"descending\" | \"\";\n start_end: \"ascending\" | \"descending\" | \"\";\n status: \"ascending\" | \"descending\" | \"\";\n };\n callbackSuccess?: (data: any, metadata: any) => void;\n callbackError?: (\n error: any,\n details: any,\n isAPICancelled: boolean\n ) => void;\n }\n >\n) {\n yield put(Rotations.rotationsFetchByFiltersRequest());\n window.logger.log(\"doRotationsFetchByFilters\", action);\n const {\n callbackSuccess = null,\n callbackError = null,\n ...payload\n } = action.payload || {};\n try {\n const { frontendPersonalization } = yield select(\n ({ accountSettings }) => accountSettings\n );\n let rotationsSortBy: {\n student: \"ascending\" | \"descending\" | \"\";\n institution: \"ascending\" | \"descending\" | \"\";\n start_end: \"ascending\" | \"descending\" | \"\";\n status: \"ascending\" | \"descending\" | \"\";\n } = {\n student: \"\",\n institution: \"\",\n start_end: \"\",\n status: \"\",\n };\n if (\n frontendPersonalization &&\n frontendPersonalization[\"ROTATIONS_SETTINGS\"]\n ) {\n rotationsSortBy = frontendPersonalization[\"ROTATIONS_SETTINGS\"].sortBy;\n }\n const {\n populated = true,\n page = 1,\n limit = 1000,\n searchTxt = \"\",\n status = [],\n userStatus = [],\n students = [],\n programs = [],\n cohorts = [],\n institutions = [],\n periods = [],\n startDate,\n endDate,\n sortBy = rotationsSortBy,\n } = payload || {};\n const skip = (page - 1) * limit;\n // Api\n const {\n api,\n cancelRequests,\n token,\n }: {\n api: tAPI;\n cancelRequests: StateApi[\"cancelRequests\"];\n token: StateApi[\"token\"];\n } = yield select(({ api }) => api);\n const [cancelRequest] = cancelRequests.filter(\n (cancelRequest: CancelRequest) => cancelRequest.key === \"GET_ROTATIONS\"\n );\n if (cancelRequest && cancelRequest.source) {\n cancelRequest.source.cancel(\"Request has been cancelled\");\n yield put(\n Api.removeCancelTokenAPI({\n cancelRequest: {\n key: \"GET_ROTATIONS\",\n },\n })\n );\n }\n // call the api to get all rotations for this company\n const CancelToken = axios.CancelToken,\n source = CancelToken.source();\n yield put(\n Api.addCancelTokenAPI({\n cancelRequest: {\n key: \"GET_ROTATIONS\",\n source,\n },\n })\n );\n const { data } = yield call(\n RotationsApi.GetRotations,\n api,\n populated,\n skip,\n limit,\n status,\n userStatus,\n students,\n programs,\n cohorts,\n institutions,\n periods,\n searchTxt,\n startDate,\n endDate,\n sortBy,\n { cancelToken: source.token, token }\n );\n yield put(\n Api.removeCancelTokenAPI({\n cancelRequest: {\n key: \"GET_CASE_LOGS\",\n },\n })\n );\n const { rotations, metadata } = data;\n yield put(\n Rotations.rotationsFetchByFiltersSuccess({\n rotations: rotations,\n rotationsStatus: status,\n metadata,\n })\n );\n if (callbackSuccess) {\n callbackSuccess(rotations, metadata);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doRotationsFetchByFilters\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n const { message, details, status } = errors || \"\";\n const isAPICancelled = status === \"cancelled\";\n if (isAPICancelled) {\n yield put(\n Api.removeCancelTokenAPI({\n cancelRequest: {\n key: \"GET_CASE_LOGS\",\n },\n })\n );\n }\n yield put(Rotations.rotationsFetchByFiltersFailure());\n if (callbackError) {\n callbackError(message, details, isAPICancelled);\n }\n }\n}\nfunction* doRotationsFetchKpis(action: Action) {\n yield put(Rotations.rotationsFetchKpisRequest());\n window.logger.log(\"doRotationsFetchKpis\", action);\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n const {\n data: { kpis: RotationsKPIS },\n } = yield call(RotationsApi.GetRotationsKpis, api, { token });\n yield put(\n Rotations.rotationsFetchKpisSuccess({\n kpis: {\n fetching: true,\n Rotations: RotationsKPIS,\n },\n })\n );\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doRotationsFetchKpis\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n const RotationsKPIS: object = yield select(\n ({ rotations: { kpis } }) => kpis\n );\n yield put(\n Rotations.rotationsFetchKpisFailure({\n kpis: RotationsKPIS,\n })\n );\n }\n}\nfunction* doRotationsCreateRotations(\n action: Action<\n \"ROTATIONS/CREATE/ROTATIONS\",\n {\n body: { rotations: object[] };\n cbs: () => void;\n cbe: (error: any) => void;\n }\n >\n) {\n yield put(Rotations.rotationsCreateRotationsRequest());\n window.logger.log(\"doRotationsCreateRotations\", action);\n const {\n body: { rotations = [] },\n cbs,\n cbe,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to create a new rotation\n yield call(RotationsApi.CreateRotations, api, { rotations }, { token });\n yield put(Rotations.rotationsCreateRotationsSuccess());\n cbs();\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doRotationsCreateRotations\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Rotations.rotationsCreateRotationsFailure());\n const { message } = errors || \"\";\n cbe(message);\n }\n}\nfunction* doRotationsEditRotations(\n action: Action<\n \"ROTATIONS/EDIT/ROTATIONS\",\n {\n allRotationsSelected: boolean;\n batch: { [k: string]: any };\n filters: StateRotationsListGridContainer[\"filtersRotations\"];\n rotationsSelected: StateRotationsListGridContainer[\"rotationsSelected\"];\n cbs?: (\n errors: { [k: string]: any }[],\n numRequestAccepted: number\n ) => void;\n cbe?: (error: any) => void;\n }\n >\n) {\n window.logger.log(\"doRotationsEditRotations\", action);\n yield put(Rotations.rotationsEditRotationsRequest());\n const {\n allRotationsSelected = false,\n batch,\n filters: rotationsFilters,\n rotationsSelected,\n cbs = null,\n cbe = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n let rotations: string[] = [];\n if (!allRotationsSelected) {\n rotations = rotationsSelected.map(\n (rotation: { [k: string]: any }) => rotation._id\n );\n }\n let filters: {\n rotations?: string[];\n status?: StateRotationsListGridContainer[\"filtersRotations\"][\"status\"][\"selected\"];\n programs?: StateRotationsListGridContainer[\"filtersRotations\"][\"programs\"][\"selected\"];\n cohorts?: StateRotationsListGridContainer[\"filtersRotations\"][\"cohorts\"][\"selected\"];\n institutions?: StateRotationsListGridContainer[\"filtersRotations\"][\"institutions\"][\"selected\"];\n periods?: StateRotationsListGridContainer[\"filtersRotations\"][\"periods\"][\"selected\"];\n start?: StateRotationsListGridContainer[\"filtersRotations\"][\"startEndDate\"][\"start\"];\n end?: StateRotationsListGridContainer[\"filtersRotations\"][\"startEndDate\"][\"end\"];\n } = {\n rotations,\n };\n if (allRotationsSelected) {\n filters = {\n status: rotationsFilters.status.selected,\n };\n if (rotationsFilters.programs.selected.length) {\n filters = {\n ...filters,\n programs: rotationsFilters.programs.selected,\n };\n }\n if (rotationsFilters.cohorts.selected.length) {\n filters = {\n ...filters,\n cohorts: rotationsFilters.cohorts.selected,\n };\n }\n if (rotationsFilters.institutions.selected.length) {\n filters = {\n ...filters,\n institutions: rotationsFilters.institutions.selected,\n };\n }\n if (rotationsFilters.periods.selected.length) {\n filters = {\n ...filters,\n periods: rotationsFilters.periods.selected,\n };\n }\n if (rotationsFilters.startEndDate.start) {\n filters = {\n ...filters,\n start: rotationsFilters.startEndDate.start,\n };\n }\n if (rotationsFilters.startEndDate.end) {\n filters = {\n ...filters,\n end: rotationsFilters.startEndDate.end,\n };\n }\n }\n // call the api to edit users in bulk\n const {\n data: { errors = [], rotations: rotationsRequestAccepted = [] },\n } = yield call(\n RotationsApi.EditRotations,\n api,\n {\n filters,\n batch,\n },\n { token }\n );\n Rotations.rotationsEditRotationsSuccess();\n if (cbs) {\n cbs(errors, rotationsRequestAccepted.length);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doRotationsEditRotations\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Rotations.rotationsEditRotationsFailure());\n const { message } = errors || \"\";\n if (cbe) {\n cbe(message);\n }\n }\n}\nfunction* doRotationsSetAutomaticRotations(\n action: Action<\n \"ROTATIONS/SET/AUTOMATIC_ROTATIONS_PARAMETERS\",\n {\n automaticRotationsParameterSelected: object;\n body: object;\n cbs: (data: any) => void;\n cbe: (error: any) => void;\n }\n >\n) {\n yield put(Rotations.rotationsSetAutomaticRotationsRequest());\n window.logger.log(\"doRotationsSetAutomaticRotations\", action);\n const { automaticRotationsParameterSelected, body, cbs, cbe } =\n action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to create a new rotation\n const {\n data: { rotations = [] },\n } = yield call(RotationsApi.SetAutomaticRotations, api, body, { token });\n let rotationsWithErrors = rotations.map(\n (\n rotation: StateRotations[\"rotationsAutomatic\"][\"draftRotations\"][number]\n ) => {\n if (\n rotation?.institutions?.length === 0 &&\n !rotation?.start &&\n !rotation?.end\n ) {\n return {\n ...rotation,\n error: \"Could not find proper match. Manual adjustment needed\",\n };\n }\n return rotation;\n }\n );\n yield put(\n Rotations.rotationsSetAutomaticRotationsSuccess({\n automaticRotationsParameterSelected,\n rotations: sortBy(rotationsWithErrors, [\n \"student.firstName\",\n \"student.lastName\",\n ]),\n })\n );\n cbs(rotations);\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doRotationsSetAutomaticRotations\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Rotations.rotationsSetAutomaticRotationsFailure());\n const { message } = errors || \"\";\n cbe(message);\n }\n}\nfunction* doRotationsFetchRotation(\n action: Action<\n string,\n {\n rotationId: string;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Rotations.rotationsFetchRotationRequest());\n window.logger.log(\"doRotationsFetchRotation\", action);\n const {\n rotationId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload || {};\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get a rotation\n const { data } = yield call(RotationsApi.GetRotation, api, rotationId, {\n token,\n });\n const { rotation } = data;\n yield put(Rotations.rotationsFetchRotationSuccess({ rotation }));\n if (callbackSuccess) {\n callbackSuccess(rotation);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doRotationsFetchRotation\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Rotations.rotationsFetchRotationFailure());\n if (callbackError) {\n callbackError(error);\n }\n }\n}\nfunction* doRotationsEdit(\n action: Action<\n string,\n {\n rotationId: string;\n body: object;\n cbs?: (data: any) => void;\n cbe?: (error: any) => void;\n }\n >\n) {\n yield put(Rotations.rotationsEditRequest());\n window.logger.log(\"doRotationsEdit\", action);\n const { rotationId, body, cbs = null, cbe = null } = action.payload || {};\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to update a rotation for that rotationId\n yield call(RotationsApi.EditRotation, api, rotationId, body, { token });\n const { data: dataRotation } = yield call(\n RotationsApi.GetRotation,\n api,\n rotationId,\n { token }\n );\n const { rotation } = dataRotation;\n yield put(Rotations.rotationsEditSuccess({ rotation }));\n if (cbs) {\n cbs(rotation);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doRotationsEdit\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Rotations.rotationsEditFailure());\n const { message } = errors || \"\";\n if (cbe) {\n cbe(message);\n }\n }\n}\nfunction* doRotationsDelete(\n action: Action<\n string,\n {\n rotationId: string;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Rotations.rotationsDeleteRequest());\n window.logger.log(\"doRotationsDelete\", action);\n const {\n rotationId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload || {};\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to delete a rotation for that specific rotationId\n yield call(RotationsApi.DeleteRotation, api, rotationId, { token });\n yield put(Rotations.rotationsDeleteSuccess({ rotationId }));\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doRotationsDelete\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Rotations.rotationsDeleteFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\nexport default function* rotationsSagas(): Generator {\n yield all([\n takeLatest(Rotations.ROTATIONS_FETCH_BY_FILTERS, doRotationsFetchByFilters),\n takeLatest(Rotations.ROTATIONS_FETCH_KPIS, doRotationsFetchKpis),\n takeLatest(\n Rotations.ROTATIONS_CREATE_ROTATIONS,\n doRotationsCreateRotations\n ),\n takeLatest(Rotations.ROTATIONS_EDIT_ROTATIONS, doRotationsEditRotations),\n takeLatest(\n Rotations.ROTATIONS_SET_AUTOMATIC_ROTATIONS,\n doRotationsSetAutomaticRotations\n ),\n takeLatest(Rotations.ROTATIONS_FETCH_ROTATION, doRotationsFetchRotation),\n takeLatest(Rotations.ROTATIONS_EDIT, doRotationsEdit),\n takeLatest(Rotations.ROTATIONS_DELETE, doRotationsDelete),\n ]);\n}\n","import {\n caseLogsRequiredFields,\n caseLogsEnabledFields,\n} from \"../reducers/tenantSettings\";\n// Types\nimport type { Config, tAPI } from \"./API\";\nimport type { TenantSettingName } from \"../reducers/tenantSettings\";\n// API Tenant Settings static class\nconst apiBaseTenantSettings = \"/tenant-settings\";\n//METHODS\nconst _onGetEndPoint = (\n method: \"POST\" | \"PATCH\" | \"DELETE\",\n tenantSettingName: TenantSettingName,\n tenantSettingValue: any,\n tenantSetting: any\n) => {\n let apiEndPoint: any = { apiRoute: \"\", body: null };\n switch (tenantSettingName) {\n case \"SHOW_DEACTIVATED_USERS\":\n apiEndPoint = {\n apiRoute: \"/show-deactivated-users\",\n body: {\n show: tenantSettingValue,\n },\n };\n break;\n case \"RETROACTIVE_DATE\":\n apiEndPoint = {\n apiRoute: \"/retroactive-date\",\n body: {\n retroactiveDate: tenantSettingValue,\n },\n };\n break;\n case \"CASELOGS_DESIGN_VERSION\":\n apiEndPoint = {\n apiRoute: \"/caselogs-design-version\",\n body: {\n design: tenantSettingValue,\n },\n };\n break;\n case \"EDIT_PENDING_CASELOGS\":\n case \"CASELOGS_AUTO_APPROVAL\":\n case \"ENABLE_DUPLICATED_CASE_LOG_CHECKS\":\n case \"ALLOW_ALPHANUMERICS_CLINIC_RECORD_NUMBER\":\n const apiRoutesEndpoints = {\n EDIT_PENDING_CASELOGS: \"/pending-caselogs-editon\",\n CASELOGS_AUTO_APPROVAL: \"/caselogs-auto-approval\",\n ENABLE_DUPLICATED_CASE_LOG_CHECKS: \"/enable-duplicated-caselogs-check\",\n ALLOW_ALPHANUMERICS_CLINIC_RECORD_NUMBER:\n \"/allow-alphanumeric-record-numbers\",\n };\n apiEndPoint = {\n apiRoute: apiRoutesEndpoints[tenantSettingName],\n body: {\n enabled: tenantSettingValue,\n },\n };\n break;\n case \"CASELOGS_AGE_REQUIRED_FIELD\":\n case \"CASELOGS_FIRST_LANGUAGE_REQUIRED_FIELD\":\n case \"CASELOGS_GENDER_REQUIRED_FIELD\":\n case \"CASELOGS_CLINIC_RECORD_NUMBER_REQUIRED_FIELD\":\n case \"CASELOGS_RACE_REQUIRED_FIELD\":\n case \"CASELOGS_PMCC_REQUIRED_FIELD\":\n case \"CASELOGS_INSURANCE_REQUIRED_FIELD\":\n case \"CASELOGS_APPOINTMENT_DATE_REQUIRED_FIELD\":\n case \"CASELOGS_CHIEF_COMPLAINT_REQUIRED_FIELD\":\n case \"CASELOGS_TIME_WITH_PATIENT_REQUIRED_FIELD\":\n case \"CASELOGS_REASON_FOR_VISIT_REQUIRED_FIELD\":\n case \"CASELOGS_CONSULT_WITH_PRECEPTOR_REQUIRED_FIELD\":\n case \"CASELOGS_PROCEDURE_STATUS_REQUIRED_FIELD\":\n case \"CASELOGS_DIAGNOSIS_AND_PROCEDURE_NOTES_REQUIRED_FIELD\":\n case \"CASELOGS_AGE_ENABLED_FIELD\":\n case \"CASELOGS_FIRST_LANGUAGE_ENABLED_FIELD\":\n case \"CASELOGS_GENDER_ENABLED_FIELD\":\n case \"CASELOGS_CLINIC_RECORD_NUMBER_ENABLED_FIELD\":\n case \"CASELOGS_RACE_ENABLED_FIELD\":\n case \"CASELOGS_PMCC_ENABLED_FIELD\":\n case \"CASELOGS_INSURANCE_ENABLED_FIELD\":\n case \"CASELOGS_APPOINTMENT_DATE_ENABLED_FIELD\":\n case \"CASELOGS_CHIEF_COMPLAINT_ENABLED_FIELD\":\n case \"CASELOGS_TIME_WITH_PATIENT_ENABLED_FIELD\":\n case \"CASELOGS_REASON_FOR_VISIT_ENABLED_FIELD\":\n case \"CASELOGS_CONSULT_WITH_PRECEPTOR_ENABLED_FIELD\":\n case \"CASELOGS_DISCIPLINE_FOR_DIAGNOSES_AND_DIAGNOSIS_ENABLED_FIELD\":\n case \"CASELOGS_DIAGNOSIS_AND_PROCEDURE_NOTES_ENABLED_FIELD\":\n case \"CASELOGS_PROCEDURE_STATUS_ENABLED_FIELD\":\n let field =\n caseLogsRequiredFields[\n tenantSettingName as keyof typeof caseLogsRequiredFields\n ];\n if (tenantSettingName.includes(\"ENABLED\")) {\n field =\n caseLogsEnabledFields[\n tenantSettingName as keyof typeof caseLogsEnabledFields\n ];\n }\n apiEndPoint = {\n apiRoute: \"/models-fields\",\n body: {\n model: \"CaseLogs\",\n field,\n ...tenantSettingValue,\n },\n };\n break;\n case \"CASELOGS_LANGUAGE_LIST\":\n switch (method) {\n case \"POST\":\n apiEndPoint = {\n apiRoute: `/caselogs-language`,\n body: {\n languages: [tenantSettingValue],\n },\n };\n break;\n case \"PATCH\":\n apiEndPoint = {\n apiRoute: `/caselogs-language/${tenantSettingValue._id}`,\n body: {\n language: tenantSettingValue.value,\n },\n };\n break;\n case \"DELETE\":\n apiEndPoint = {\n apiRoute: `/caselogs-language/${tenantSettingValue._id}`,\n body: null,\n };\n break;\n default:\n }\n break;\n case \"CASELOGS_GENDER_LIST\":\n switch (method) {\n case \"POST\":\n apiEndPoint = {\n apiRoute: `/caselogs-gender`,\n body: {\n genders: [tenantSettingValue],\n },\n };\n break;\n case \"PATCH\":\n apiEndPoint = {\n apiRoute: `/caselogs-gender/${tenantSettingValue._id}`,\n body: {\n gender: tenantSettingValue.value,\n },\n };\n break;\n case \"DELETE\":\n apiEndPoint = {\n apiRoute: `/caselogs-gender/${tenantSettingValue._id}`,\n body: null,\n };\n break;\n default:\n }\n break;\n case \"CASELOGS_INSURANCE_LIST\":\n switch (method) {\n case \"POST\":\n apiEndPoint = {\n apiRoute: `/caselogs-insurance`,\n body: {\n insurances: [tenantSettingValue],\n },\n };\n break;\n case \"PATCH\":\n apiEndPoint = {\n apiRoute: `/caselogs-insurance/${tenantSettingValue._id}`,\n body: {\n insurance: tenantSettingValue.value,\n },\n };\n break;\n case \"DELETE\":\n apiEndPoint = {\n apiRoute: `/caselogs-insurance/${tenantSettingValue._id}`,\n body: null,\n };\n break;\n default:\n }\n break;\n case \"CASELOGS_RACES_LIST\":\n switch (method) {\n case \"POST\":\n apiEndPoint = {\n apiRoute: `/caselogs-races`,\n body: {\n races: [tenantSettingValue],\n },\n };\n break;\n case \"PATCH\":\n apiEndPoint = {\n apiRoute: `/caselogs-races/${tenantSettingValue._id}`,\n body: {\n race: tenantSettingValue.value,\n },\n };\n break;\n case \"DELETE\":\n apiEndPoint = {\n apiRoute: `/caselogs-races/${tenantSettingValue._id}`,\n body: null,\n };\n break;\n default:\n }\n break;\n case \"CASELOGS_REASONS_FOR_VISIT_LIST\":\n switch (method) {\n case \"POST\":\n apiEndPoint = {\n apiRoute: `/caselogs-reasons-for-visit`,\n body: {\n reasonsForVisit: [tenantSettingValue],\n },\n };\n break;\n case \"PATCH\":\n apiEndPoint = {\n apiRoute: `/caselogs-reasons-for-visit/${tenantSettingValue._id}`,\n body: {\n reasonForVisit: tenantSettingValue.value,\n },\n };\n break;\n case \"DELETE\":\n apiEndPoint = {\n apiRoute: `/caselogs-reasons-for-visit/${tenantSettingValue._id}`,\n body: null,\n };\n break;\n default:\n }\n break;\n case \"CASELOGS_DISCIPLINES_LIST_FOR_DIAGNOSTICS\":\n switch (method) {\n case \"POST\":\n apiEndPoint = {\n apiRoute: `/caselogs-diagnostic-disciplines`,\n body: {\n diagnosticDisciplines: [tenantSettingValue],\n },\n };\n break;\n case \"PATCH\":\n apiEndPoint = {\n apiRoute: `/caselogs-diagnostic-disciplines/${tenantSettingValue._id}`,\n body: {\n diagnosticDiscipline: tenantSettingValue.value,\n },\n };\n break;\n case \"DELETE\":\n apiEndPoint = {\n apiRoute: `/caselogs-diagnostic-disciplines/${tenantSettingValue._id}`,\n body: null,\n };\n break;\n default:\n }\n break;\n case \"CASELOGS_DIAGNOSTICS_LIST\":\n switch (method) {\n case \"POST\":\n apiEndPoint = {\n apiRoute: `/caselogs-diagnostics`,\n body: {\n diagnostics: [tenantSettingValue],\n },\n };\n break;\n case \"PATCH\":\n apiEndPoint = {\n apiRoute: `/caselogs-diagnostics/${tenantSettingValue._id}`,\n body: tenantSettingValue.value,\n };\n break;\n case \"DELETE\":\n apiEndPoint = {\n apiRoute: `/caselogs-diagnostics/${tenantSettingValue._id}`,\n body: null,\n };\n break;\n default:\n }\n break;\n case \"CASELOGS_DISCIPLINES_LIST_FOR_PROCEDURES\":\n switch (method) {\n case \"POST\":\n apiEndPoint = {\n apiRoute: `/caselogs-procedure-disciplines`,\n body: {\n procedureDisciplines: [tenantSettingValue],\n },\n };\n break;\n case \"PATCH\":\n apiEndPoint = {\n apiRoute: `/caselogs-procedure-disciplines/${tenantSettingValue._id}`,\n body: {\n procedureDiscipline: tenantSettingValue.value,\n },\n };\n break;\n case \"DELETE\":\n apiEndPoint = {\n apiRoute: `/caselogs-procedure-disciplines/${tenantSettingValue._id}`,\n body: null,\n };\n break;\n default:\n }\n break;\n case \"CASELOGS_PROCEDURES_LIST\":\n switch (method) {\n case \"POST\":\n apiEndPoint = {\n apiRoute: `/caselogs-procedures`,\n body: {\n procedures: [tenantSettingValue],\n },\n };\n break;\n case \"PATCH\":\n apiEndPoint = {\n apiRoute: `/caselogs-procedures/${tenantSettingValue._id}`,\n body: tenantSettingValue.value,\n };\n break;\n case \"DELETE\":\n apiEndPoint = {\n apiRoute: `/caselogs-procedures/${tenantSettingValue._id}`,\n body: null,\n };\n break;\n default:\n }\n break;\n case \"CASELOGS_PROCEDURES_STATUS_LIST\":\n switch (method) {\n case \"POST\":\n apiEndPoint = {\n apiRoute: `/caselogs-procedure-status`,\n body: {\n proceduresStatus: [tenantSettingValue],\n },\n };\n break;\n case \"PATCH\":\n apiEndPoint = {\n apiRoute: `/caselogs-procedure-status/${tenantSettingValue._id}`,\n body: {\n procedureStatus: tenantSettingValue.value,\n },\n };\n break;\n case \"DELETE\":\n apiEndPoint = {\n apiRoute: `/caselogs-procedure-status/${tenantSettingValue._id}`,\n body: null,\n };\n break;\n default:\n }\n break;\n case \"CASELOGS_QUESTIONS_REVIEW\":\n switch (method) {\n case \"POST\":\n apiEndPoint = {\n apiRoute: `/caselogs-questions-review`,\n body: {\n proceduresReviews: [tenantSettingValue],\n },\n };\n break;\n case \"PATCH\":\n apiEndPoint = {\n apiRoute: `/caselogs-questions-review/${tenantSettingValue._id}`,\n body: tenantSettingValue.value,\n };\n break;\n case \"DELETE\":\n apiEndPoint = {\n apiRoute: `/caselogs-questions-review/${tenantSettingValue._id}`,\n body: null,\n };\n break;\n default:\n }\n break;\n case \"CASELOGS_TOOTH_LIST\":\n switch (method) {\n case \"POST\":\n apiEndPoint = {\n apiRoute: `/caselogs-tooth`,\n body: { teeth: [tenantSettingValue] },\n };\n break;\n case \"PATCH\":\n apiEndPoint = {\n apiRoute: `/caselogs-tooth/${tenantSettingValue._id}`,\n body: tenantSettingValue.value,\n };\n break;\n case \"DELETE\":\n apiEndPoint = {\n apiRoute: `/caselogs-tooth/${tenantSettingValue._id}`,\n body: null,\n };\n break;\n default:\n }\n break;\n case \"EVALUATIONS_NOTIFICATIONS_EMAIL\":\n apiEndPoint = {\n apiRoute: \"/evaluations-notifications-email\",\n body: {\n emails: tenantSettingValue.emails,\n enabled: tenantSettingValue.enabled,\n },\n };\n break;\n case \"ROTATIONS_OVERLAPPING_VALIDATION\":\n apiEndPoint = {\n apiRoute: \"/rotations-overlapping-validation\",\n body: {\n enabled: tenantSettingValue,\n },\n };\n break;\n case \"ALLOW_AUTOMATIC_ROTATIONS_SCHEDULING_PARAMETERS\":\n apiEndPoint = {\n apiRoute: \"/allow-automatic-rotations-parameters\",\n body: {\n enabled: tenantSettingValue,\n },\n };\n break;\n case \"AUTOMATIC_ROTATIONS_SCHEDULING_PARAMETERS\":\n switch (method) {\n case \"POST\":\n apiEndPoint = {\n apiRoute: `/automatic-rotations-parameters`,\n body: {\n automaticRotationsParameters: [tenantSettingValue],\n },\n };\n break;\n case \"PATCH\":\n apiEndPoint = {\n apiRoute: `/automatic-rotations-parameters/${tenantSettingValue._id}`,\n body: {\n automaticRotationsParameter: tenantSettingValue.value,\n },\n };\n break;\n case \"DELETE\":\n apiEndPoint = {\n apiRoute: `/automatic-rotations-parameters/${tenantSettingValue._id}`,\n body: null,\n };\n break;\n default:\n }\n break;\n case \"INSTITUTIONS_TYPES_LIST\":\n switch (method) {\n case \"POST\":\n apiEndPoint = {\n apiRoute: `/institutions-types`,\n body: {\n institutionsTypes: tenantSettingValue,\n },\n };\n break;\n case \"PATCH\":\n apiEndPoint = {\n apiRoute: `/institutions-types/${tenantSettingValue._id}`,\n body: {\n institutionType: tenantSettingValue.type,\n },\n };\n break;\n case \"DELETE\":\n apiEndPoint = {\n apiRoute: `/institutions-types/${tenantSettingValue._id}`,\n body: null,\n };\n break;\n default:\n }\n break;\n case \"NOTIFICATIONS_SETTINGS\":\n apiEndPoint = {\n apiRoute: `/notifications-settings/${tenantSettingValue._id}`,\n body: {\n receivers: tenantSettingValue.receivers,\n channels: tenantSettingValue.channels,\n },\n };\n break;\n default:\n }\n return apiEndPoint;\n};\nexport default class TenantSettings {\n // Get a list of Tenant Settings\n static GetTenantSettings(\n api: tAPI,\n tenantSettingName?: TenantSettingName,\n config?: Config\n ) {\n if (tenantSettingName) {\n return api.GET(\n `${apiBaseTenantSettings}?name=${tenantSettingName}`,\n config\n );\n }\n return api.GET(`${apiBaseTenantSettings}`, config);\n }\n // Create - Update - Delete a Tenant Setting\n static CUDTenantSetting(\n api: tAPI,\n method: \"POST\" | \"PATCH\" | \"DELETE\",\n tenantSettingName: TenantSettingName,\n tenantSettingValue: any,\n tenantSetting: any,\n config?: Config\n ) {\n const { apiRoute, body } = _onGetEndPoint(\n method,\n tenantSettingName,\n tenantSettingValue,\n tenantSetting\n );\n if (method === \"DELETE\") {\n return api.DELETE(`${apiBaseTenantSettings}${apiRoute}`, config);\n }\n return api[method](`${apiBaseTenantSettings}${apiRoute}`, body, config);\n }\n}\n","import { put, select, call, all, takeLatest } from \"redux-saga/effects\";\nimport TenantSettingsApi from \"../api/TenantSettings\";\nimport { Auth, BroadcastMessages, TenantSettings } from \"../actions/\";\n// Types\nimport type { Action } from \"deox\";\nimport type { tAPI } from \"../api/API\";\nimport type { TenantSettingName } from \"../reducers/tenantSettings\";\n//Sagas for Tenant Settings\nfunction* doTenantSettingsFetchAll(\n action: Action<\n string,\n {\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(TenantSettings.tenantSettingsFetchAllRequest());\n window.logger.log(\"doTenantSettingsFetchAll\", action);\n const { callbackSuccess = null, callbackError = null } = action.payload || {};\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get all tenant Settings for this company\n const { data } = yield call(\n TenantSettingsApi.GetTenantSettings,\n api,\n undefined,\n {\n token,\n }\n );\n const { tenantSettings } = data;\n yield put(\n TenantSettings.tenantSettingsFetchAllSuccess({\n tenantSettings,\n })\n );\n yield put(\n BroadcastMessages.broadcastMessagesSetMessages({\n broadcastMessagesSettings: tenantSettings.filter(\n ({ name }: any) => name === \"BROADCAST_MESSAGES\"\n ),\n })\n );\n if (callbackSuccess) {\n callbackSuccess(tenantSettings);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doTenantSettingsFetchAll\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(TenantSettings.tenantSettingsFetchAllFailure());\n if (callbackError) {\n callbackError(error);\n }\n }\n}\nfunction* doTenantSettingsCUDTenantSettings(\n action: Action<\n string,\n {\n method: \"POST\" | \"PATCH\" | \"DELETE\";\n tenantSettingName: TenantSettingName;\n tenantSettingValue: any;\n tenantSetting: any;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(TenantSettings.tenantSettingsCUDTenantSettingRequest());\n window.logger.log(\"doTenantSettingsCUDTenantSettings\", action);\n const {\n method,\n tenantSettingName,\n tenantSettingValue,\n tenantSetting,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to update a tenant Setting for that specific tenantSettingName\n const { data: tenantSettingNew } = yield call(\n TenantSettingsApi.CUDTenantSetting,\n api,\n method,\n tenantSettingName,\n tenantSettingValue,\n tenantSetting,\n { token }\n );\n yield put(\n TenantSettings.tenantSettingsCUDTenantSettingSuccess({\n tenantSetting: tenantSettingNew,\n })\n );\n if (callbackSuccess) {\n yield put(TenantSettings.tenantSettingsFetchAll());\n callbackSuccess(tenantSettingNew);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doTenantSettingsCUDTenantSettings\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(TenantSettings.tenantSettingsCUDTenantSettingFailure());\n const { message, details } = errors || \"\";\n if (callbackError) {\n let errorMsg = message;\n if (details && details.length > 0) {\n errorMsg = `${errorMsg}: ${details[0].msg}`;\n }\n callbackError(errorMsg);\n }\n }\n}\nexport default function* tenantSettingsSagas(): Generator {\n yield all([\n takeLatest(\n TenantSettings.TENANT_SETTINGS_FETCH_ALL,\n doTenantSettingsFetchAll\n ),\n takeLatest(\n TenantSettings.TENANT_SETTINGS_CUD_TENANT_SETTING,\n doTenantSettingsCUDTenantSettings\n ),\n ]);\n}\n","import type { Config, tAPI } from \"./API\";\n// API Terms static class\nconst apiBaseTerms = \"/terms\";\nexport default class Terms {\n // Get a list of Terms\n static GetTerms(api: tAPI, config?: Config) {\n return api.GET(`${apiBaseTerms}`, config);\n }\n // Create a Term\n static CreateTerm(api: tAPI, data: object, config?: Config) {\n return api.POST(`${apiBaseTerms}`, data, config);\n }\n // Edit a Term\n static EditTerm(api: tAPI, termId: string, data: object, config?: Config) {\n return api.PATCH(`${apiBaseTerms}/${termId}`, data, config);\n }\n // Delete a Term\n static DeleteTerm(api: tAPI, termId: string, config?: Config) {\n return api.DELETE(`${apiBaseTerms}/${termId}`, config);\n }\n}\n","import { put, select, call, all, takeLatest } from \"redux-saga/effects\";\nimport TermsApi from \"../api/Terms\";\nimport { Auth, Terms } from \"../actions\";\n// Types\nimport type { Action } from \"deox\";\nimport type { tAPI } from \"../api/API\";\n//Sagas for Terms\nfunction* doTermsFetchAll(\n action: Action<\n string,\n {\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Terms.termsFetchAllRequest());\n window.logger.log(\"doTermsFetchAll\", action);\n const { callbackSuccess = null, callbackError = null } = action.payload || {};\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get all terms for this company\n const { data } = yield call(TermsApi.GetTerms, api, { token });\n const { terms } = data;\n yield put(Terms.termsFetchAllSuccess({ terms }));\n if (callbackSuccess) {\n callbackSuccess(terms);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doTermsFetchAll\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Terms.termsFetchAllFailure());\n if (callbackError) {\n callbackError(error);\n }\n }\n}\nfunction* doTermsCreate(\n action: Action<\n string,\n {\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Terms.termsCreateRequest());\n window.logger.log(\"doTermsCreate\", action);\n const { body, callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to create a new term\n const { data } = yield call(TermsApi.CreateTerm, api, body, { token });\n const { term } = data;\n yield put(Terms.termsCreateSuccess({ term }));\n if (callbackSuccess) {\n callbackSuccess(term);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doTermsCreate\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Terms.termsCreateFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\nfunction* doTermsEdit(\n action: Action<\n string,\n {\n termId: string;\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Terms.termsEditRequest());\n window.logger.log(\"doTermsEdit\", action);\n const {\n termId,\n body,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to edit a term for that specific termId\n const { data } = yield call(TermsApi.EditTerm, api, termId, body, {\n token,\n });\n const { term } = data;\n yield put(Terms.termsEditSuccess({ term }));\n if (callbackSuccess) {\n callbackSuccess(term);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doTermsEdit\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Terms.termsEditFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\nfunction* doTermsDelete(\n action: Action<\n string,\n {\n termId: string;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Terms.termsDeleteRequest());\n window.logger.log(\"doTermsDelete\", action);\n const {\n termId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to delete a term for that specific termId\n yield call(TermsApi.DeleteTerm, api, termId, { token });\n yield put(Terms.termsDeleteSuccess({ termId }));\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doTermsDelete\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Terms.termsDeleteFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\nexport default function* termsSagas(): Generator {\n yield all([\n takeLatest(Terms.TERMS_FETCH_ALL, doTermsFetchAll),\n takeLatest(Terms.TERMS_CREATE, doTermsCreate),\n takeLatest(Terms.TERMS_EDIT, doTermsEdit),\n takeLatest(Terms.TERMS_DELETE, doTermsDelete),\n ]);\n}\n","import type { Config, tAPI } from \"./API\";\nimport type { StateAccountSettings } from \"../../types/accountSettings.types\";\nimport type { StateUsersManager, SortBy } from \"../../types/users.types\";\n// API Users static class\nconst apiBaseUsers = \"/users\";\nconst onSetSortParam = (\n sortParam: keyof SortBy,\n sortByFieldName: StateAccountSettings[\"frontendPersonalization\"][\"USER_MANAGER_SETTINGS\"][\"sortByName\"]\n) => {\n if (sortParam === \"name\") {\n if (sortByFieldName === \"lastName\") {\n return \"last_name\";\n }\n return \"first_name\";\n }\n return sortParam;\n};\nexport default class Users {\n // Get a list of users by roles | programs | rotations | cohorts | terms\n static GetUsers(\n api: tAPI,\n populated: boolean,\n skip: number,\n limit: number,\n roles: string[],\n institutions: string[],\n search: string,\n status: StateUsersManager[\"filters\"][\"status\"],\n activeRotation: boolean,\n programs: string[],\n cohorts: string[],\n sortBy: SortBy,\n sortByName: StateAccountSettings[\"frontendPersonalization\"][\"USER_MANAGER_SETTINGS\"][\"sortByName\"],\n config?: Config\n ) {\n let queryParams = \"\";\n if (skip >= 0) {\n queryParams += `&skip=${skip}`;\n }\n if (limit > 0) {\n queryParams += `&limit=${limit}`;\n }\n if (roles.length > 0) {\n queryParams += `&roles=${roles.join()}`;\n }\n if (institutions.length > 0) {\n queryParams += `&institutions=${institutions.join()}`;\n }\n if (search) {\n queryParams += `&search=${search}`;\n }\n if (status.length > 0) {\n queryParams += `&status=${status.join()}`;\n }\n if (activeRotation) {\n queryParams += `&activeRotation=true`;\n }\n if (programs.length > 0) {\n queryParams += `&programs=${programs.join()}`;\n }\n if (cohorts.length > 0) {\n queryParams += `&cohorts=${cohorts.join()}`;\n }\n if (populated) {\n let sortByParams = Object.keys(sortBy)\n .filter((sortKey) => sortBy[sortKey as keyof SortBy])\n .map(\n (sortParam) =>\n `sort_${onSetSortParam(sortParam as keyof SortBy, sortByName)}=${\n sortBy[sortParam as keyof SortBy] === \"ascending\" ? 1 : -1\n }`\n )\n .join(\"&\");\n if (sortByParams) {\n sortByParams = \"&\" + sortByParams;\n }\n queryParams = \"?populated=true\" + queryParams + sortByParams;\n } else if (queryParams.length > 0) {\n queryParams = \"?\" + queryParams.slice(1);\n }\n return api.GET(`${apiBaseUsers}${queryParams}`, config);\n }\n // Get All User Accounts Available from this userEmail\n static GetUserAccounts(api: tAPI, data: object, config?: Config) {\n return api.POST(`${apiBaseUsers}/accounts`, data, {\n ...config,\n tenant: \"\",\n });\n }\n // Get a user from userId\n static GetUser(api: tAPI, userId: string, config?: Config) {\n return api.GET(`${apiBaseUsers}/${userId}?populated=true`, config);\n }\n static GetUserKpis(api: tAPI, userId: string, config?: Config) {\n return api.GET(`/case-logs/kpis?user=${userId}`, config);\n }\n static GetUserAvailabilities(api: tAPI, userId: string, config?: Config) {\n return api.GET(`/availabilities?user=${userId}`, config);\n }\n static CreateUserAvailabilities(api: tAPI, data: object, config?: Config) {\n return api.POST(`/availabilities`, data, config);\n }\n static EditUserAvailabilities(\n api: tAPI,\n availabilityId: string,\n data: object,\n config?: Config\n ) {\n return api.PATCH(`/availabilities/${availabilityId}`, data, config);\n }\n // Edit in bulk a group of users based on filters\n static EditUsers(api: tAPI, data: object, config?: Config) {\n return api.PATCH(`${apiBaseUsers}`, data, config);\n }\n // Edit a user from userId (include activate, deactivate, or change role)\n static EditUser(\n api: tAPI,\n actionApi:\n | \"ACTIVATE_DEACTIVATE_USER\"\n | \"ADD_ROLE_USER\"\n | \"TRANSFER_USER\"\n | \"EDIT_USER\",\n userId: string,\n data: object,\n isUpload: boolean = false,\n config?: Config\n ) {\n switch (actionApi) {\n case \"ACTIVATE_DEACTIVATE_USER\":\n return api.PATCH(\n `${apiBaseUsers}/${userId}/activateDeactivate`,\n data,\n config\n );\n case \"ADD_ROLE_USER\":\n return api.PATCH(`${apiBaseUsers}/${userId}/roles`, data, config);\n case \"TRANSFER_USER\":\n return api.PATCH(\n `${apiBaseUsers}/${userId}/transferClinic`,\n data,\n config\n );\n default:\n if (isUpload) {\n return api.UPLOAD(`${apiBaseUsers}/${userId}`, data, \"PATCH\", config);\n }\n return api.PATCH(`${apiBaseUsers}/${userId}`, data, config);\n }\n }\n // Get a user files from userId\n static GetUserFiles(api: tAPI, userId: string, config?: Config) {\n return api.GET(\n `/files?populated=true&belongsTo=Users&owner=${userId}`,\n config\n );\n }\n // Get all user files expired\n static GetUserFilesExpired(api: tAPI, config?: Config) {\n return api.GET(\n `/files?populated=true&aboutExpire=true&belongsTo=Users`,\n config\n );\n }\n // Upload a user files\n static UploadUserFiles(api: tAPI, data: object, config?: Config) {\n return api.UPLOAD(`/files`, data, \"POST\", config);\n }\n // Emulate User from userId\n static EmulateUser(api: tAPI, data: object, config?: Config) {\n return api.POST(`${apiBaseUsers}/emulateAccount`, data, config);\n }\n}\n","import { put, select, call, all, takeLatest } from \"redux-saga/effects\";\nimport * as Cookies from \"js-cookie\";\nimport UsersApi from \"../api/Users\";\nimport { Auth, LocalStoreActions, Users, UsersManager } from \"../actions/\";\n//PERMISSIONS\nimport { USER_MANAGER_USER_LIMIT } from \"../reducers/usersManager\";\n// Type\nimport type { Action } from \"deox\";\nimport type { tAPI } from \"../api/API\";\nimport type { EditUsersActions } from \"../../components/user-manager/UserManagerPresentational\";\nimport type { StateAccountSettings } from \"../../types/accountSettings.types\";\nimport type {\n SortBy,\n StateUsersManager,\n UsersRole,\n} from \"../../types/users.types\";\n//Sagas for users\n// API call Get Users\nfunction* doUsersGetUsers(payload: {\n populated?: boolean;\n page?: number;\n limit?: number;\n roles?: string[];\n institutions?: string[];\n searchTxt?: string;\n status?: StateUsersManager[\"filters\"][\"status\"];\n activeRotation?: boolean;\n programsSelected?: string[];\n cohortsSelected?: string[];\n sortBy?: SortBy;\n}): Generator {\n window.logger.log(\"doUsersGetUsers\", payload);\n try {\n const {\n tenantSettings: { SHOW_DEACTIVATED_USERS },\n } = yield select(({ tenantSettings }) => tenantSettings),\n { frontendPersonalization } = yield select(\n ({ accountSettings }) => accountSettings\n );\n let usersManagerSortBy: SortBy = {\n name: \"descending\",\n enrollment: \"\",\n institution: \"\",\n },\n usersManagerSortByName: StateAccountSettings[\"frontendPersonalization\"][\"USER_MANAGER_SETTINGS\"][\"sortByName\"] =\n \"firstName\",\n usersManagerUserStatus: StateUsersManager[\"filters\"][\"status\"] =\n SHOW_DEACTIVATED_USERS?.values || false\n ? [\"active\", \"inactive\"]\n : [\"active\"];\n if (frontendPersonalization?.USER_MANAGER_SETTINGS) {\n usersManagerSortBy =\n frontendPersonalization[\"USER_MANAGER_SETTINGS\"].sortBy;\n usersManagerSortByName =\n frontendPersonalization[\"USER_MANAGER_SETTINGS\"].sortByName;\n usersManagerUserStatus =\n frontendPersonalization[\"USER_MANAGER_SETTINGS\"].userStatus ||\n usersManagerUserStatus;\n }\n const {\n populated = true,\n page = 1,\n limit = USER_MANAGER_USER_LIMIT,\n roles = [],\n institutions = [],\n searchTxt = \"\",\n status = usersManagerUserStatus,\n activeRotation = false,\n programsSelected = [],\n cohortsSelected = [],\n sortBy = usersManagerSortBy,\n } = payload || {};\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get users\n const skip: number = (page - 1) * limit;\n const {\n data: {\n metadata,\n users: { ...remainUsers },\n },\n } = yield call(\n UsersApi.GetUsers,\n api,\n populated,\n skip,\n limit,\n roles,\n institutions,\n searchTxt,\n status,\n activeRotation,\n programsSelected,\n cohortsSelected,\n sortBy,\n usersManagerSortByName,\n { token }\n );\n return { remainUsers, metadata };\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doUsersGetUsers\", error, errors);\n throw error;\n }\n}\n//Actions to get all users kpis (without roles)\nfunction* doUsersFetchUsersKpis(\n action: Action<\n string,\n {\n limit: number;\n callbackSuccess?: (data: any, metadata: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Users.usersFetchUsersKpisRequest());\n window.logger.log(\"doUsersFetchUsersKpis\", action);\n const {\n limit = -1,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload || {};\n try {\n const { remainUsers, metadata } = yield doUsersGetUsers({\n populated: false,\n limit,\n });\n yield put(\n Users.usersFetchUsersKpisSuccess({\n users: remainUsers,\n metadata,\n })\n );\n if (callbackSuccess) {\n callbackSuccess(remainUsers, metadata);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doUsersFetchAll\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Users.usersFetchUsersKpisFailure());\n if (callbackError) {\n callbackError(error);\n }\n }\n}\n//Actions to get all users (without roles)\nfunction* doUsersFetchAll(\n action: Action<\n string,\n {\n roles: string[];\n status?: StateUsersManager[\"filters\"][\"status\"];\n limit: number;\n callbackSuccess?: (data: any, metadata: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Users.usersFetchAllRequest());\n window.logger.log(\"doUsersFetchAll\", action);\n const {\n roles = [],\n status,\n limit = -1,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload || {};\n try {\n const { remainUsers, metadata } = yield doUsersGetUsers({\n populated: false,\n limit,\n roles,\n status,\n });\n yield put(\n Users.usersFetchAllSuccess({\n users: remainUsers,\n metadata,\n })\n );\n if (callbackSuccess) {\n callbackSuccess(remainUsers, metadata);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doUsersFetchAll\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Users.usersFetchAllFailure());\n if (callbackError) {\n callbackError(error);\n }\n }\n}\n//Update Users after action like Change role or Import Data\nfunction* doUsersUpdateStoreUsers(\n action: Action<\n string,\n {\n roles: string[];\n callbackSuccess?: (data: any, metadata: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n window.logger.log(\"doUsersUpdateStoreUsers\", action);\n const { roles } = action.payload || {};\n try {\n const usersManagerFilters: {\n pages: number;\n searchTxt?: string;\n status?: StateUsersManager[\"filters\"][\"status\"];\n roles: { options: object[]; selected: any };\n rotations: { activeRotation: boolean };\n programs: { selected: string };\n cohorts: { selected: string };\n institutions: { selected: string };\n sortBy: SortBy;\n } = yield select(({ usersManager }) => usersManager.filters);\n const {\n pages: page,\n searchTxt,\n status,\n roles: { options: arrayRoles, selected: roleSelected },\n rotations: { activeRotation },\n programs: { selected: programsSelected },\n cohorts: { selected: cohortsSelected },\n institutions: { selected: institutionsSelected },\n sortBy,\n } = usersManagerFilters;\n if (roleSelected && roles.indexOf(roleSelected.apiName) !== -1) {\n // Same Role\n const formValues = {\n page,\n roles,\n selected: roleSelected,\n searchTxt,\n status,\n activeRotation,\n programsSelected,\n cohortsSelected,\n institutions: institutionsSelected,\n sortBy,\n updateStoreUsers: true,\n };\n const callbacks = {\n callbackError: null,\n callbackSuccess: null,\n };\n const payload = Object.assign({}, formValues, callbacks);\n yield put(Users.usersFetchUsersRoles(payload));\n } else if (roleSelected) {\n // Not Same Role and Role is selected\n const newRoleSelected = arrayRoles.filter(\n ({ apiName }: any) => apiName === roles[0]\n )[0];\n yield put(\n Users.usersFetchUsersRoles({\n roles,\n selected: newRoleSelected,\n updateStoreUsers: true,\n resetFilters: true,\n })\n );\n } else {\n // Not Role is selected\n yield put(Users.usersFetchAll({ limit: USER_MANAGER_USER_LIMIT }));\n }\n } catch (error: any) {\n window.logger.error(\"ErrorSaga - doUsersUpdateStoreUsers\", error);\n }\n}\n//Actions to get users by filters params\nfunction* doUsersFetchUsersByFilters(\n action: Action<\n string,\n {\n updateStoreUsers?: boolean;\n callbackSuccess?: (data: any, metadata: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n window.logger.log(\"doUsersFetchUsersByFilters\", action);\n const {\n updateStoreUsers = false,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload || {};\n try {\n const usersManagerFilters: {\n pages: number;\n searchTxt?: string;\n status?: StateUsersManager[\"filters\"][\"status\"];\n roles: { options: object[]; selected: any };\n rotations: { activeRotation: boolean };\n programs: { selected: string };\n cohorts: { selected: string };\n institutions: { selected: string };\n sortBy: SortBy;\n } = yield select(({ usersManager }) => usersManager.filters);\n const {\n pages: page,\n searchTxt,\n status,\n roles: { selected: roleSelected },\n rotations: { activeRotation },\n programs: { selected: programsSelected },\n cohorts: { selected: cohortsSelected },\n institutions: { selected: institutionsSelected },\n sortBy,\n } = usersManagerFilters;\n const formValues = {\n page,\n roles: [roleSelected.apiName],\n selected: roleSelected,\n searchTxt,\n status,\n activeRotation,\n programsSelected,\n cohortsSelected,\n institutions: institutionsSelected,\n sortBy,\n updateStoreUsers,\n };\n const callbacks = {\n callbackError,\n callbackSuccess,\n };\n const payload = Object.assign({}, formValues, callbacks);\n yield put(Users.usersFetchUsersRoles(payload));\n } catch (error: any) {\n window.logger.error(\"ErrorSaga - doUsersFetchUsersByFilters\", error);\n }\n}\n//Actions to get users by roles\nfunction* doUsersFetchUsersRoles(\n action: Action<\n string,\n {\n selected?: any;\n updateStoreUsers?: boolean;\n populated?: boolean;\n page?: number;\n limit?: number;\n roles?: string[];\n institutions?: string[];\n searchTxt?: string;\n status?: StateUsersManager[\"filters\"][\"status\"];\n activeRotation?: boolean;\n programsSelected?: string[];\n cohortsSelected?: string[];\n sortBy?: SortBy;\n callbackSuccess?: (data: any, metadata: any) => void;\n callbackError?: (error: any, details: any) => void;\n }\n >\n) {\n yield put(Users.usersFetchUsersRolesRequest());\n window.logger.log(\"doUsersFetchUsersRoles\", action);\n const {\n roles = [],\n selected = null,\n updateStoreUsers = false,\n callbackSuccess = null,\n callbackError = null,\n ...payload\n } = action.payload || {};\n try {\n const {\n tenantSettings: { SHOW_DEACTIVATED_USERS },\n } = yield select(({ tenantSettings }) => tenantSettings),\n { frontendPersonalization } = yield select(\n ({ accountSettings }) => accountSettings\n );\n let usersManagerSortBy: SortBy = {\n name: \"descending\",\n enrollment: \"\",\n institution: \"\",\n },\n usersManagerUserStatus: StateUsersManager[\"filters\"][\"status\"] =\n SHOW_DEACTIVATED_USERS?.values || false\n ? [\"active\", \"inactive\"]\n : [\"active\"];\n if (\n frontendPersonalization &&\n frontendPersonalization[\"USER_MANAGER_SETTINGS\"]\n ) {\n usersManagerSortBy =\n frontendPersonalization[\"USER_MANAGER_SETTINGS\"].sortBy;\n usersManagerUserStatus =\n frontendPersonalization[\"USER_MANAGER_SETTINGS\"].userStatus ||\n usersManagerUserStatus;\n }\n const {\n populated = true,\n institutions = [],\n page = 1,\n limit = USER_MANAGER_USER_LIMIT,\n searchTxt,\n status = usersManagerUserStatus,\n activeRotation = false,\n programsSelected = [],\n cohortsSelected = [],\n sortBy = usersManagerSortBy,\n } = payload || {};\n const { remainUsers, metadata } = yield doUsersGetUsers({\n populated,\n page,\n limit,\n roles,\n institutions,\n searchTxt,\n status,\n activeRotation,\n programsSelected,\n cohortsSelected,\n sortBy,\n });\n let usersObject = remainUsers;\n if (\n usersObject &&\n roles.length &&\n selected &&\n remainUsers &&\n remainUsers[selected.apiName]\n ) {\n usersObject = {};\n for (let i = 0; i < roles.length; i++) {\n usersObject = {\n ...usersObject,\n [roles[i]]: remainUsers[roles[i]],\n };\n }\n }\n yield put(\n Users.usersFetchUsersRolesSuccess({\n users: usersObject,\n metadata,\n roles,\n selected,\n updateStoreUsers,\n })\n );\n if (callbackSuccess) {\n callbackSuccess(remainUsers, metadata);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doUsersFetchUsersRoles\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n const { message, details } = errors || \"\";\n yield put(\n Users.usersFetchUsersRolesFailure({\n roles,\n selected,\n updateStoreUsers,\n errorAPI: {\n action: \"get\",\n on: \"users\",\n errorMsg: message,\n errorsDetails: details,\n },\n })\n );\n if (callbackError) {\n callbackError(message, details);\n }\n }\n}\n\nfunction* doUsersGetAccounts(email: string): Generator {\n window.logger.log(\"doUsersGetAccounts\", email);\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n const { companyDomain } = yield select(({ config }) => config);\n const { data } = yield call(\n UsersApi.GetUserAccounts,\n api,\n {\n email,\n tenant: companyDomain,\n },\n { token }\n );\n const { accountsAvailable } = data;\n return accountsAvailable;\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doUsersGetAccounts\", error, errors);\n return [];\n }\n}\n\nfunction* doUsersFetchUser(\n action: Action<\n string,\n {\n userId: string;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Users.usersFetchUserRequest());\n window.logger.log(\"doUsersFetchUser\", action);\n const {\n userId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get a user from specific userId\n const { data } = yield call(UsersApi.GetUser, api, userId, { token });\n const { user } = data;\n const accountsAvailable: object[] = yield doUsersGetAccounts(user.email);\n yield put(\n Users.usersFetchUserSuccess({\n user: { ...user, accountsAvailable },\n })\n );\n if (callbackSuccess) {\n callbackSuccess({ ...user, accountsAvailable });\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doUsersFetchUser\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Users.usersFetchUserFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doUsersFetchUserKpis(\n action: Action<\n string,\n {\n userId: string;\n callbackSuccess?: (data: any) => void;\n callbackError?: (roles: object, error: any) => void;\n }\n >\n) {\n window.logger.log(\"doUsersFetchUserKpis\", action);\n yield put(Users.usersFetchUserKpisRequest());\n const {\n userId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get a user kpis from specific userId\n const {\n data: { kpis: CaseLogs },\n } = yield call(UsersApi.GetUserKpis, api, userId, { token });\n yield put(Users.usersFetchUserKpisSuccess());\n if (callbackSuccess) {\n callbackSuccess({ CaseLogs });\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doUsersFetchUserKpis\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Users.usersFetchUserKpisFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(\n {\n CaseLogs: [],\n Evaluations: null,\n Rotations: null,\n },\n message\n );\n }\n }\n}\n\nfunction* doUsersFetchUserAvailabilities(\n action: Action<\n string,\n {\n userId: string;\n payloadAvailabilities: any;\n cbs?: (data: any) => void;\n cbe?: (error: any) => void;\n }\n >\n) {\n window.logger.log(\"doUsersFetchUserAvailabilities\", action);\n yield put(Users.usersFetchUserAvailabilitiesRequest());\n const { userId, cbs = null, cbe = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get a user availabilities from specific userId\n // yield call(UsersApi.CreateUserAvailabilities, api, payloadAvailabilities, {\n // token,\n // });\n const {\n data: { availabilities = [] },\n } = yield call(UsersApi.GetUserAvailabilities, api, userId, { token });\n yield put(Users.usersFetchUserAvailabilitiesSuccess());\n // yield call(\n // UsersApi.EditUserAvailabilities,\n // api,\n // { availabilityDays: payloadAvailabilities.availabilityDays },\n // {\n // token,\n // }\n // );\n if (cbs) {\n cbs(availabilities);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doUsersFetchUserAvailabilities\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Users.usersFetchUserAvailabilitiesFailure());\n const { message } = errors || \"\";\n if (cbe) {\n cbe(message);\n }\n }\n}\n\nfunction* doUsersEditUsers(\n action: Action<\n \"USERS/EDIT/USERS\",\n {\n action: EditUsersActions;\n allUsersSelected: boolean;\n batch: { [k: string]: any };\n cbs?: (\n errors: { [k: string]: any }[],\n numRequestAccepted: number,\n usersRoles?: { [k: string]: any }[]\n ) => void;\n cbe?: (error: any) => void;\n }\n >\n) {\n window.logger.log(\"doUsersEditUsers\", action);\n yield put(Users.usersEditUsersRequest());\n const {\n action: bulkAction,\n allUsersSelected = false,\n batch,\n cbs = null,\n cbe = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n const {\n filters: userManagerFilters,\n usersManagerSelected,\n }: {\n filters: StateUsersManager[\"initialStateFilters\"];\n usersManagerSelected: StateUsersManager[\"usersManagerSelected\"];\n } = yield select(({ usersManager }) => usersManager);\n let users: string[] = [];\n if (\n !allUsersSelected &&\n userManagerFilters.roles.selected?.apiName &&\n usersManagerSelected &&\n usersManagerSelected[userManagerFilters.roles.selected.apiName]\n ) {\n const usersSelected =\n usersManagerSelected[userManagerFilters.roles.selected.apiName];\n Object.keys(usersSelected).map((page) =>\n users.push(\n ...usersSelected[page].map((user: { [k: string]: any }) => user._id)\n )\n );\n }\n let filters: {\n role: UsersRole;\n users?: string[];\n status?: StateUsersManager[\"initialStateFilters\"][\"status\"];\n // Students\n activeRotation?: StateUsersManager[\"initialStateFilters\"][\"rotations\"][\"activeRotation\"];\n programs?: StateUsersManager[\"initialStateFilters\"][\"programs\"][\"selected\"];\n cohorts?: StateUsersManager[\"initialStateFilters\"][\"cohorts\"][\"selected\"];\n // InstitutionAdministrators | Preceptors\n institutions?: StateUsersManager[\"initialStateFilters\"][\"institutions\"][\"selected\"];\n } = {\n role: userManagerFilters.roles.selected?.apiName || \"Alumnis\",\n status: userManagerFilters.status,\n };\n if (userManagerFilters.status.length > 0) {\n filters = {\n ...filters,\n status: userManagerFilters.status,\n };\n }\n if (!allUsersSelected) {\n filters = {\n ...filters,\n users,\n };\n } else {\n if (filters.role === \"Students\") {\n if (userManagerFilters.rotations.activeRotation) {\n filters = {\n ...filters,\n activeRotation: userManagerFilters.rotations.activeRotation,\n };\n }\n if (userManagerFilters.programs.selected?.length) {\n filters = {\n ...filters,\n programs: userManagerFilters.programs.selected,\n };\n }\n if (userManagerFilters.cohorts.selected?.length) {\n filters = {\n ...filters,\n cohorts: userManagerFilters.cohorts.selected,\n };\n }\n } else if (\n filters.role === \"InstitutionAdministrators\" ||\n filters.role === \"Preceptors\"\n ) {\n if (userManagerFilters.institutions.selected?.length) {\n filters = {\n ...filters,\n institutions: userManagerFilters.institutions.selected,\n };\n }\n }\n }\n // call the api to edit users in bulk\n const {\n data: { errors = [], users: usersRoles = [], enrollments = [] },\n } = yield call(\n UsersApi.EditUsers,\n api,\n {\n filters,\n batch,\n },\n { token }\n );\n Users.usersEditUsersSuccess();\n if (\n bulkAction === \"change-users-status\" ||\n bulkAction === \"add-new-enrollment\" ||\n bulkAction === \"add-new-institution\"\n ) {\n yield put(\n UsersManager.usersManagerUpdateStoreUsers({\n roles: [userManagerFilters.roles.selected?.apiName || \"Alumnis\"],\n })\n );\n } else if (bulkAction === \"add-users-role\") {\n yield put(Users.usersFetchUsersKpis({ limit: USER_MANAGER_USER_LIMIT }));\n }\n if (cbs) {\n cbs(\n errors,\n bulkAction === \"add-new-enrollment\"\n ? enrollments.length\n : usersRoles.length,\n usersRoles\n );\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doUsersEditUsers\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Users.usersEditUsersFailure());\n const { message } = errors || \"\";\n if (cbe) {\n cbe(message);\n }\n }\n}\nfunction* doUsersEditUser(\n action: Action<\n string,\n {\n actionApi:\n | \"ACTIVATE_DEACTIVATE_USER\"\n | \"ADD_ROLE_USER\"\n | \"TRANSFER_USER\"\n | \"EDIT_USER\";\n userId: string;\n body: object;\n isPostFile?: boolean;\n isMyProfile?: boolean;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Users.usersEditUserRequest());\n window.logger.log(\"doUsersEditUser\", action);\n const {\n actionApi = \"EDIT_USER\",\n userId,\n body,\n isPostFile: isUpload = false,\n isMyProfile = false,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to create new institution\n const { data } = yield call(\n UsersApi.EditUser,\n api,\n actionApi,\n userId,\n body,\n isUpload,\n { token }\n );\n if (isMyProfile) {\n yield put(Auth.authUpdateMyUserAccount());\n }\n if (isUpload) {\n const { user } = data;\n const { updatedAt, profileImage320, profileImageOriginal } = user;\n yield put(\n Users.usersEditUserSuccess({\n body: { updatedAt, profileImage320, profileImageOriginal },\n })\n );\n } else {\n if (actionApi === \"ADD_ROLE_USER\") {\n const { user } = yield select(({ users }) => users);\n const accountsAvailable: object[] = yield doUsersGetAccounts(\n user.email\n );\n yield put(\n Users.usersEditUserSuccess({\n body: { updatedAt: new Date().toISOString(), accountsAvailable },\n })\n );\n } else if (actionApi === \"TRANSFER_USER\") {\n Users.usersEditUserSuccess();\n } else {\n const { updatedAt, customFields } = data.user;\n yield put(\n Users.usersEditUserSuccess({\n body: { updatedAt, ...body, customFields },\n })\n );\n }\n }\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doUsersEditUser\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Users.usersEditUserFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doUsersEditUserAvailabilities(\n action: Action<\n string,\n {\n availabilityId: string;\n body: any;\n cbs?: () => void;\n cbe?: (error: any) => void;\n }\n >\n) {\n window.logger.log(\"doUsersEditUserAvailabilities\", action);\n yield put(Users.usersEditUserAvailabilitiesRequest());\n const { availabilityId, body, cbs = null, cbe = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to edit a user availabilities from specific userId\n yield call(UsersApi.EditUserAvailabilities, api, availabilityId, body, {\n token,\n });\n yield put(Users.usersEditUserAvailabilitiesSuccess());\n if (cbs) {\n cbs();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doUsersEditUserAvailabilities\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Users.usersEditUserAvailabilitiesFailure());\n const { message } = errors || \"\";\n if (cbe) {\n cbe(message);\n }\n }\n}\n\nfunction* doUsersSetUser(\n action: Action<\n string,\n {\n user: { [k: string]: any };\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n window.logger.log(\"doUsersSetUser\", action);\n const { user } = action.payload || {};\n try {\n let userToLoad = null;\n const stateUsers: { [k: string]: any } = yield select(({ users }) => users);\n if (\n user &&\n user.role &&\n stateUsers &&\n stateUsers[user.role] &&\n stateUsers[user.role].isFetched\n ) {\n let userArray = stateUsers[user.role].users.filter(\n ({ _id: userId }: any) => userId === user._id\n );\n if (userArray && userArray.length) {\n userToLoad = userArray[0];\n }\n }\n yield put(Users.usersFetchUserSuccess({ user: userToLoad }));\n } catch (error: any) {\n window.logger.error(\"ErrorSaga - doUsersSetUser\", error);\n }\n}\n\nfunction* doUsersFetchUserFiles(\n action: Action<\n string,\n {\n id: string;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Users.usersFetchUserFilesRequest());\n window.logger.log(\"doUsersFetchUserFiles\", action);\n const { id, callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to get all files from this user from specific userId\n const { data } = yield call(UsersApi.GetUserFiles, api, id, { token });\n const { files } = data;\n yield put(Users.usersFetchUserFilesSuccess({ files }));\n if (callbackSuccess) {\n callbackSuccess(files);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doUsersFetchUserFiles\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Users.usersFetchUserFilesFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doUsersFetchUserFilesExpired(\n action: Action<\n string,\n {\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Users.usersFetchUserFilesExpiredRequest());\n window.logger.log(\"doUsersFetchUserFilesExpired\", action);\n const { callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n const { data } = yield call(UsersApi.GetUserFilesExpired, api, { token });\n const { files: filesExpired } = data;\n yield put(Users.usersFetchUserFilesExpiredSuccess({ filesExpired }));\n if (callbackSuccess) {\n callbackSuccess(filesExpired);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doUsersFetchUserFilesExpired\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Users.usersFetchUserFilesExpiredFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doUsersUploadUserFiles(\n action: Action<\n string,\n {\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Users.usersUploadUserFilesRequest());\n window.logger.log(\"doUsersUploadUserFiles\", action);\n const { body, callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to upload all files for this user\n const { data } = yield call(UsersApi.UploadUserFiles, api, body, { token });\n const { files } = data;\n yield put(Users.usersUploadUserFilesSuccess());\n if (callbackSuccess) {\n callbackSuccess(files);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doUsersUploadUserFiles\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Users.usersUploadUserFilesFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doUsersEmulateUser(\n action: Action<\n string,\n {\n user: object;\n stopEmulation?: boolean;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(Users.usersEmulateUserRequest());\n window.logger.log(\"doUsersEmulateUser\", action);\n const {\n user,\n stopEmulation = false,\n callbackSuccess,\n callbackError,\n } = action.payload;\n try {\n const { api, token: apiToken }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to switch User\n const { data } = yield call(\n UsersApi.EmulateUser,\n api,\n {\n user,\n stopEmulation,\n },\n { token: apiToken }\n );\n const { user: userId, token, emulation } = data;\n const { localhost, hostname, origin, protocol, port } = yield select(\n ({ config }) => config\n );\n if (localhost) {\n Cookies.set(\n \"authCookie\",\n { token, user: userId, emulation, removeDomain: `${hostname}` },\n { domain: `${hostname}` }\n );\n }\n let pathToAppReload = origin;\n if (!pathToAppReload) {\n pathToAppReload = `${protocol}${hostname}${port ? \":3001\" : \"\"}`;\n }\n yield put(LocalStoreActions.clearAllLocalStore());\n yield put(Users.usersEmulateUserSuccess());\n if (callbackSuccess) {\n callbackSuccess();\n }\n setTimeout(() => window.location.replace(pathToAppReload), 500);\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\"ErrorSaga - doUsersEmulateUser\", error, errors);\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(Users.usersEmulateUserFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nexport default function* usersSagas(): Generator {\n yield all([\n takeLatest(Users.USERS_FETCH_USERS_KPIS, doUsersFetchUsersKpis),\n takeLatest(Users.USERS_FETCH_ALL, doUsersFetchAll),\n takeLatest(\n UsersManager.USERS_MANAGER_UPDATE_STORE_USERS,\n doUsersUpdateStoreUsers\n ),\n takeLatest(\n [\n UsersManager.USERS_MANAGER_FILTERS_SET_PAGES,\n UsersManager.USERS_MANAGER_FILTERS_SEARCH,\n UsersManager.USERS_MANAGER_FILTERS_USER_STATUS,\n UsersManager.USERS_MANAGER_FILTERS_ROTATIONS_ACTIVE,\n UsersManager.USERS_MANAGER_FILTERS_PROGRAMS,\n UsersManager.USERS_MANAGER_FILTERS_COHORTS,\n UsersManager.USERS_MANAGER_FILTERS_INSTITUTIONS,\n UsersManager.USERS_MANAGER_FILTERS_SET_SORTBY,\n ],\n doUsersFetchUsersByFilters\n ),\n takeLatest(Users.USERS_FETCH_USERS_ROLES, doUsersFetchUsersRoles),\n takeLatest(Users.USERS_FETCH_USER, doUsersFetchUser),\n takeLatest(Users.USERS_FETCH_USER_KPIS, doUsersFetchUserKpis),\n takeLatest(\n Users.USERS_FETCH_USER_AVAILABILITIES,\n doUsersFetchUserAvailabilities\n ),\n takeLatest(Users.USERS_EDIT_USERS, doUsersEditUsers),\n takeLatest(Users.USERS_EDIT_USER, doUsersEditUser),\n takeLatest(\n Users.USERS_EDIT_USER_AVAILABILITIES,\n doUsersEditUserAvailabilities\n ),\n takeLatest(Users.USERS_SET_USER, doUsersSetUser),\n takeLatest(Users.USERS_FETCH_USER_FILES, doUsersFetchUserFiles),\n takeLatest(\n Users.USERS_FETCH_USER_FILES_EXPIRED,\n doUsersFetchUserFilesExpired\n ),\n takeLatest(Users.USERS_UPLOAD_USER_FILES, doUsersUploadUserFiles),\n takeLatest(Users.USERS_EMULATE_USER, doUsersEmulateUser),\n ]);\n}\n","import type { Config, tAPI } from \"./API\";\n// API Portfolio static class\n\nconst apiBasePortfolio = \"/portfolios\";\nexport default class Portfolio {\n // Get Portfolio info\n static GetPorfolio(api: tAPI, userId: string, config?: Config) {\n return api.GET(`${apiBasePortfolio}/${userId}`, config);\n }\n // Edit Portfolio info\n static EditPortfolio(\n api: tAPI,\n userId: string,\n data: object,\n config?: Config\n ) {\n return api.PATCH(`${apiBasePortfolio}/${userId}`, data, config);\n }\n // Request Portfolio testimonials\n static RequestPortfolioTestimonials(\n api: tAPI,\n userId: string,\n data: object,\n config?: Config\n ) {\n return api.POST(`${apiBasePortfolio}/${userId}/testimonials`, data, config);\n }\n // Submit Portfolio testimonials\n static SubmitPortfolioTestimonials(\n api: tAPI,\n userId: string,\n institutionId: string,\n data: object,\n config?: Config\n ) {\n return api.PATCH(\n `${apiBasePortfolio}/${userId}/testimonials/${institutionId}`,\n data,\n config\n );\n }\n // Delete Portfolio testimonials\n static DeletePortfolioTestimonials(\n api: tAPI,\n userId: string,\n institutionId: string,\n config?: Config\n ) {\n return api.DELETE(\n `${apiBasePortfolio}/${userId}/testimonials/${institutionId}`,\n config\n );\n }\n}\n","import { put, select, call, all, takeLatest } from \"redux-saga/effects\";\nimport NotificationsApi from \"../api/Notifications\";\nimport PortfolioApi from \"../api/Portfolio\";\nimport { Auth, UsersPortfolio } from \"../actions/\";\n// Type\nimport type { Action } from \"deox\";\nimport type { tAPI } from \"../api/API\";\n//Sagas for User Portfolio\nfunction* doUsersPortfolioFetchPortfolio(\n action: Action<\n string,\n {\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(UsersPortfolio.portfolioFetchPortfolioRequest());\n window.logger.log(\"doUsersPortfolioFetchPortfolio\", action);\n const { callbackSuccess = null, callbackError = null } = action.payload || {};\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n const { userId } = yield select(({ auth: { user } }) => ({\n userId: user._id,\n }));\n const config: { [k: string]: any } = yield select(({ config }) => config);\n // call the api to get my portfolio info\n const {\n data: { portfolio },\n } = yield call(PortfolioApi.GetPorfolio, api, userId, { token });\n const {\n _id: portfolioId,\n owner,\n workExperience = [],\n caseLogsKPI,\n institutionsWorked = [],\n educationalBackground = [],\n publications = [],\n testimonials = [],\n volunteers = [],\n skills = [],\n } = portfolio;\n const { companyDomain, baseDomain, port } = config;\n const publicUrl: string = `${baseDomain}${\n port ? \":3000\" : \"\"\n }/public/${companyDomain}/portfolios/${portfolioId}`;\n yield put(\n UsersPortfolio.portfolioFetchPortfolioSuccess({\n newState: {\n publicUrl,\n workExperience,\n caseLogsKPI,\n institutionsWorked,\n educationalBackground,\n publications,\n testimonials,\n volunteers,\n skills,\n },\n })\n );\n if (callbackSuccess) {\n callbackSuccess(owner);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doUsersPortfolioFetchPortfolio\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(UsersPortfolio.portfolioFetchPortfolioFailure());\n if (callbackError) {\n callbackError(error);\n }\n }\n}\n\nfunction* doUsersPortfolioEditPortfolio(\n action: Action<\n string,\n {\n body: object;\n fieldName: string;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(UsersPortfolio.portfolioEditRequest());\n window.logger.log(\"doUsersPortfolioEditPortfolio\", action);\n const {\n body,\n fieldName,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n const { userId } = yield select(({ auth: { user } }) => ({\n userId: user._id,\n }));\n // call the api to edit my portfolio\n const {\n data: { portfolio },\n } = yield call(PortfolioApi.EditPortfolio, api, userId, body, { token });\n yield put(\n UsersPortfolio.portfolioEditSuccess({\n newState: {\n [fieldName]: portfolio[fieldName],\n },\n })\n );\n if (callbackSuccess) {\n callbackSuccess(portfolio[fieldName]);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doUsersPortfolioEditPortfolio\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(UsersPortfolio.portfolioEditFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doUsersPortfolioRequestPortfolioTestimonials(\n action: Action<\n string,\n {\n body: object;\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(UsersPortfolio.portfolioTestimonialsRequest());\n window.logger.log(\"doUsersPortfolioRequestPortfolioTestimonials\", action);\n const { body, callbackSuccess = null, callbackError = null } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n const { userId } = yield select(({ auth: { user } }) => ({\n userId: user._id,\n }));\n // call the api to edit my portfolio\n const {\n data: { portfolio },\n } = yield call(\n PortfolioApi.RequestPortfolioTestimonials,\n api,\n userId,\n body,\n { token }\n );\n yield put(\n UsersPortfolio.portfolioTestimonialsSuccess({\n newState: {\n testimonials: portfolio.testimonials,\n },\n })\n );\n if (callbackSuccess) {\n callbackSuccess(portfolio);\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doUsersPortfolioRequestPortfolioTestimonials\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(UsersPortfolio.portfolioTestimonialsFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doUsersPortfolioRequestPortfolioTestimonialsNotifications(\n action: Action<\n string,\n {\n callbackSuccess?: (data: any) => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(UsersPortfolio.portfolioTestimonialsNotificationsRequest());\n window.logger.log(\n \"doUsersPortfolioRequestPortfolioTestimonialsNotifications\",\n action\n );\n const { callbackSuccess = null, callbackError = null } = action.payload || {};\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n const { userId } = yield select(({ auth: { user } }) => ({\n userId: user._id,\n }));\n // call the api to get all notifications for this company\n const { data } = yield call(\n NotificationsApi.GetNotifications,\n api,\n userId,\n \"testimonial-request\",\n [],\n 0,\n 0,\n { token }\n );\n const { notifications, total, unseen } = data;\n yield put(UsersPortfolio.portfolioTestimonialsNotificationsSuccess());\n if (callbackSuccess) {\n callbackSuccess({\n notifications,\n totalNotifications: total,\n unseenNotifications: unseen,\n });\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doUsersPortfolioRequestPortfolioTestimonialsNotifications\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(UsersPortfolio.portfolioTestimonialsNotificationsFailure());\n if (callbackError) {\n callbackError(error);\n }\n }\n}\n\nfunction* doUsersPortfolioSubmitPortfolioTestimonials(\n action: Action<\n string,\n {\n userId: string;\n institutionId: string;\n body: object;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(UsersPortfolio.portfolioSubmitTestimonialsRequest());\n window.logger.log(\"doUsersPortfolioSubmitPortfolioTestimonials\", action);\n const {\n userId,\n institutionId,\n body,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n // call the api to edit my portfolio\n yield call(\n PortfolioApi.SubmitPortfolioTestimonials,\n api,\n userId,\n institutionId,\n body,\n { token }\n );\n yield put(UsersPortfolio.portfolioSubmitTestimonialsSuccess());\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doUsersPortfolioSubmitPortfolioTestimonials\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(UsersPortfolio.portfolioSubmitTestimonialsFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nfunction* doUsersPortfolioDeletePortfolioTestimonials(\n action: Action<\n string,\n {\n institutionId: string;\n body: object;\n callbackSuccess?: () => void;\n callbackError?: (error: any) => void;\n }\n >\n) {\n yield put(UsersPortfolio.portfolioDeleteTestimonialsRequest());\n window.logger.log(\"doUsersPortfolioDeletePortfolioTestimonials\", action);\n const {\n institutionId,\n callbackSuccess = null,\n callbackError = null,\n } = action.payload;\n try {\n const { api, token }: { api: tAPI; token: string } = yield select(\n ({ api }) => api\n );\n const { userId } = yield select(({ auth: { user } }) => ({\n userId: user._id,\n }));\n // call the api to delete portfolio testimonial from some specific institutionId\n yield call(\n PortfolioApi.DeletePortfolioTestimonials,\n api,\n userId,\n institutionId,\n { token }\n );\n yield put(\n UsersPortfolio.portfolioDeleteTestimonialsSuccess({\n institutionId,\n })\n );\n if (callbackSuccess) {\n callbackSuccess();\n }\n } catch (error: any) {\n const { data: errors } = error;\n window.logger.error(\n \"ErrorSaga - doUsersPortfolioDeletePortfolioTestimonials\",\n error,\n errors\n );\n if (errors) {\n yield put(Auth.authCheckSessionExpiredApp({ errors }));\n }\n yield put(UsersPortfolio.portfolioDeleteTestimonialsFailure());\n const { message } = errors || \"\";\n if (callbackError) {\n callbackError(message);\n }\n }\n}\n\nexport default function* usersPortfolioSagas(): Generator {\n yield all([\n takeLatest(\n UsersPortfolio.PORTFOLIO_FETCH_PORTFOLIO,\n doUsersPortfolioFetchPortfolio\n ),\n takeLatest(UsersPortfolio.PORTFOLIO_EDIT, doUsersPortfolioEditPortfolio),\n takeLatest(\n UsersPortfolio.PORTFOLIO_TESTIMONIALS,\n doUsersPortfolioRequestPortfolioTestimonials\n ),\n takeLatest(\n UsersPortfolio.PORTFOLIO_TESTIMONIALS_NOTIFICATIONS,\n doUsersPortfolioRequestPortfolioTestimonialsNotifications\n ),\n takeLatest(\n UsersPortfolio.PORTFOLIO_SUBMIT_TESTIMONIALS,\n doUsersPortfolioSubmitPortfolioTestimonials\n ),\n takeLatest(\n UsersPortfolio.PORTFOLIO_DELETE_TESTIMONIALS,\n doUsersPortfolioDeletePortfolioTestimonials\n ),\n ]);\n}\n","// Inclusive sagas\nimport { all, fork } from \"redux-saga/effects\";\nimport { logger } from \"./logger\";\nimport accessControlSagas from \"./accessControl\";\nimport accountSettings from \"./accountSettings\";\nimport authSagas from \"./auth\";\nimport broadcastMessagesSagas from \"./broadcastMessages\";\nimport caseLogsSagas from \"./caseLogs\";\nimport cohortsSagas from \"./cohorts\";\nimport companySagas from \"./company\";\nimport customFieldsSagas from \"./customFields\";\nimport enrollmentsSagas from \"./enrollments\";\nimport evaluationsSagas from \"./evaluations\";\nimport evaluationsSchedulersSagas from \"./evaluationsSchedulers\";\nimport evaluationsTemplatesSagas from \"./evaluationsTemplates\";\nimport feedbackFormSagas from \"./feedbackForm\";\nimport files from \"./files\";\nimport fileCategoriesSagas from \"./fileCategories\";\nimport importDataSagas from \"./importData\";\nimport invitationsSagas from \"./invitations\";\nimport institutionsSagas from \"./institutions\";\nimport metricsSagas from \"./metrics\";\nimport notificationsSagas from \"./notifications\";\nimport periodsSagas from \"./periods\";\nimport programsSagas from \"./programs\";\nimport reportsSagas from \"./reports\";\nimport rotationsSagas from \"./rotations\";\nimport tenantSettingsSagas from \"./tenantSettings\";\nimport termsSagas from \"./terms\";\nimport usersSagas from \"./users\";\nimport usersPortfolioSagas from \"./portfolio\";\n\nfunction* readySaga() {\n // init logger:\n yield logger();\n yield window.logger.log(\"Sagas Heto App Ready!\");\n}\n\nexport function* sagas(): Generator {\n yield all([\n fork(readySaga),\n fork(accessControlSagas),\n fork(accountSettings),\n fork(authSagas),\n fork(broadcastMessagesSagas),\n fork(companySagas),\n fork(usersSagas),\n fork(tenantSettingsSagas),\n fork(customFieldsSagas),\n fork(notificationsSagas),\n fork(institutionsSagas),\n fork(programsSagas),\n fork(cohortsSagas),\n fork(fileCategoriesSagas),\n fork(files),\n fork(enrollmentsSagas),\n fork(rotationsSagas),\n fork(termsSagas),\n fork(periodsSagas),\n fork(caseLogsSagas),\n fork(evaluationsSagas),\n fork(evaluationsSchedulersSagas),\n fork(evaluationsTemplatesSagas),\n fork(reportsSagas),\n fork(metricsSagas),\n fork(invitationsSagas),\n fork(usersPortfolioSagas),\n fork(importDataSagas),\n fork(feedbackFormSagas),\n ]);\n}\n","// Inclusive Redux Store\n/* eslint-disable no-useless-escape */\nimport { createStore, applyMiddleware, compose } from \"redux\";\nimport createSagaMiddleware from \"redux-saga\";\nimport { createBrowserHistory } from \"history\";\nimport { routerMiddleware } from \"connected-react-router\";\nimport * as Cookies from \"js-cookie\";\nimport {\n AccessControl,\n AccountSettings,\n Api,\n Auth,\n CaseLogs,\n CustomFields,\n Evaluations,\n GuideLineTutorial,\n LocalStoreActions,\n Notifications,\n Router,\n RouterManager,\n} from \"./actions/\";\n// import { reducers } from \"./reducers\";\nimport { createRootReducer } from \"./reducers\";\nimport { sagas } from \"./sagas\";\nimport { isDevelopmentReactAppEnv } from \"../utils\";\nimport { LocalStore } from \"../utils/local-storage/localStore\";\ndeclare global {\n interface Window {\n __REDUX_DEVTOOLS_EXTENSION_COMPOSE__?: typeof compose;\n logger: {\n log: (...args: any[]) => void;\n info: (...args: any[]) => void;\n warn: (...args: any[]) => void;\n error: (...args: any[]) => void;\n test: (...args: any[]) => void;\n };\n }\n}\n// Create a browser history\nconst history: any = createBrowserHistory();\n// Middleware:\nconst beforeTransitionsMiddleware =\n (store: any) => (next: any) => (action: any) => {\n if (action.type === \"@@router/LOCATION_CHANGE\") {\n const { location } = store.getState().router;\n if (location) {\n if (location.pathname.indexOf(\"/manager\") === -1) {\n store.dispatch(Router.routerBeforeTransitions(location));\n } else {\n store.dispatch(\n RouterManager.routerManagerBefore({ before: location })\n );\n }\n } else {\n if (action.payload.pathname.indexOf(\"/manager\") === -1) {\n store.dispatch(Router.routerBeforeTransitions(action.payload));\n } else {\n store.dispatch(\n RouterManager.routerManagerBefore({ before: action.payload })\n );\n }\n }\n }\n return next(action);\n };\n\nconst routerManagerTransitionsMiddleware =\n (store: any) => (next: any) => (action: any) => {\n const nextAction = next(action);\n if (action.type === \"@@router/LOCATION_CHANGE\") {\n const { location } = store.getState().router;\n if (location) {\n if (location.pathname.indexOf(\"/manager\") === 0) {\n store.dispatch(\n RouterManager.routerManagerLoaded({ loaded: location })\n );\n }\n } else {\n if (action.payload.pathname.indexOf(\"/manager\") === 0) {\n store.dispatch(\n RouterManager.routerManagerLoaded({ loaded: action.payload })\n );\n }\n }\n // Custom Fields Institution Required My Institution\n if (\n location.pathname !== \"/signout\" &&\n location.pathname !== \"/signout/session-expired\" &&\n store.getState().auth.myInstitution\n .hasMyInstitutionCustomFieldsRequiredNull &&\n store.getState().auth.myInstitution\n .hasMyInstitutionCustomFieldsRequiredNull.isRequired &&\n store.getState().auth.myInstitution\n .hasMyInstitutionCustomFieldsRequiredNull.institutionRequired &&\n store.getState().auth.myInstitution\n .hasMyInstitutionCustomFieldsRequiredNull.institutionRequired\n .status === \"active\" &&\n store.getState().auth.role &&\n store\n .getState()\n .auth.myInstitution.hasMyInstitutionCustomFieldsRequiredNull.rolesWrite.indexOf(\n store.getState().auth.role.apiName\n ) !== -1 &&\n location.pathname === \"/my-clinic\"\n ) {\n store.dispatch(CustomFields.customFieldsRequiredTriggerAnimation());\n return;\n }\n }\n return nextAction;\n };\nconst localStoreMiddleware = (store: any) => (next: any) => (action: any) => {\n const nextAction = next(action);\n if (\n action.type === Auth.AUTH_SIGNOUT_SUCCESS_APP ||\n action.type === Auth.AUTH_SIGNOUT_FAILURE_APP ||\n action.type === Auth.AUTH_SESSION_EXPIRED_APP\n ) {\n store.dispatch(LocalStoreActions.clearAllLocalStore());\n } else if (\n action.type === Auth.AUTH_SIGNIN_SUCCESS_APP ||\n action.type === Auth.AUTH_UPDATE_MY_USER_ACCOUNT_SUCCESS ||\n action.type === Auth.AUTH_FETCH_MY_INSTITUTION_SUCCESS ||\n action.type === AccessControl.ACCESS_CONTROL_FETCH_ROLES_SUCCESS ||\n action.type === AccessControl.ACCESS_CONTROL_UPDATE_ROLE_RESOURCE_SUCCESS\n ) {\n const { auth, accessControl } = store.getState();\n const { expiredToken, role, user } = auth;\n if (expiredToken && role && user) {\n store.dispatch(\n LocalStoreActions.saveLocalStore({\n key: \"authState\",\n value: {\n auth: {\n ...auth,\n updatingProfile: false,\n fetchingMyFiles: false,\n },\n },\n })\n );\n store.dispatch(\n LocalStoreActions.saveLocalStore({\n key: \"accessControlState\",\n value: { accessControl },\n })\n );\n }\n } else if (action.type === AccountSettings.ACCOUNT_SETTINGS_FETCH_SUCCESS) {\n const { auth, accountSettings } = store.getState();\n const { expiredToken, role, user } = auth;\n if (expiredToken && role && user) {\n store.dispatch(\n LocalStoreActions.saveLocalStore({\n key: \"accountSettingsState\",\n value: {\n accountSettings: {\n ...accountSettings,\n isFetchingAccountSettings: false,\n statusUpdateAccountSettings: \"\",\n },\n },\n })\n );\n }\n } else if (action.type === CaseLogs.CASELOGS_FETCH_KPIS_SUCCESS) {\n const { auth, caseLogs } = store.getState();\n const { expiredToken, role, user } = auth;\n if (expiredToken && role && user) {\n store.dispatch(\n LocalStoreActions.saveLocalStore({\n key: \"caseLogsState\",\n value: { caseLogs },\n })\n );\n }\n } else if (action.type === Evaluations.EVALUATIONS_FETCH_KPIS_SUCCESS) {\n const { auth, evaluations } = store.getState();\n const { expiredToken, role, user } = auth;\n if (expiredToken && role && user) {\n store.dispatch(\n LocalStoreActions.saveLocalStore({\n key: \"evaluationsState\",\n value: { evaluations },\n })\n );\n }\n } else if (action.type === GuideLineTutorial.GUIDE_LINE_TUTORIAL_INITIALIZE) {\n const { guideLineTutorial } = store.getState();\n store.dispatch(\n LocalStoreActions.saveLocalStore({\n key: \"guideLineTutorialState\",\n value: { guideLineTutorial },\n })\n );\n } else if (action.type === GuideLineTutorial.GUIDE_LINE_TUTORIAL_COMPLETED) {\n const { auth, guideLineTutorial } = store.getState();\n const { expiredToken, role, user } = auth;\n if (expiredToken && role && user) {\n store.dispatch(\n LocalStoreActions.saveLocalStore({\n key: \"guideLineTutorialState\",\n value: { guideLineTutorial },\n })\n );\n }\n }\n return nextAction;\n};\nconst configureStore = () => {\n // Add the saga middleware\n const sagaMiddleware: any = createSagaMiddleware();\n // Build the middleware for intercepting and dispatching navigation actions\n let middlewares: any[] = [\n routerMiddleware(history),\n sagaMiddleware,\n beforeTransitionsMiddleware,\n routerManagerTransitionsMiddleware,\n localStoreMiddleware,\n ];\n let composeEnhancers: Function = compose;\n // Add freeze and redux dev tools, only production\n if (isDevelopmentReactAppEnv()) {\n composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;\n }\n const enhancer = composeEnhancers(applyMiddleware(...middlewares));\n let preloadedState: any = {\n ...LocalStore.Read(\"authState\"),\n ...LocalStore.Read(\"accessControlState\"),\n ...LocalStore.Read(\"accountSettingsState\"),\n ...LocalStore.Read(\"caseLogsState\"),\n ...LocalStore.Read(\"evaluationsState\"),\n ...LocalStore.Read(\"guideLineTutorialState\"),\n };\n const authCookie = Cookies.getJSON(\"authCookie\");\n if (preloadedState && authCookie) {\n const { token, user: userId } = authCookie;\n const { auth } = preloadedState;\n if (\n token &&\n userId &&\n auth &&\n auth.isAuthenticated &&\n ((auth.user && auth.user._id && auth.user._id !== userId) ||\n (auth.emulation && auth.emulation.isActive))\n ) {\n preloadedState = {};\n }\n }\n const store: any = createStore(\n createRootReducer(history),\n preloadedState,\n enhancer\n );\n sagaMiddleware.run(sagas);\n store.dispatch(Api.initAPI({ token: authCookie?.token || \"\" }));\n if (preloadedState && preloadedState.auth) {\n const { socketUri } = store.getState().config;\n store.dispatch(\n Notifications.notificationsRegisterSocket({\n uri: socketUri,\n dispatch: store.dispatch,\n })\n );\n store.dispatch(Auth.authUpdateMyUserAccount());\n }\n return store;\n};\n// export\nexport { configureStore, history };\n","// @flow\n// Import Features\nimport * as React from \"react\";\nimport { connect } from \"react-redux\";\nimport ReactJoyride from \"react-joyride\";\nimport { GuideLineTutorial } from \"../../store/actions/\";\nimport { EVENTS, STATUS } from \"react-joyride\";\n// Import Types\nimport type { PropsGuideLineTutorialContainer as Props } from \"../../types/guideLineTutorial.types\";\nclass GuideLineTutorialContainer extends React.Component {\n // {\n const {\n joyrideProps: { callback = (CallbackProps: any) => CallbackProps },\n finishTutorial,\n } = this.props;\n callback(data);\n const { type, status } = data;\n if (\n EVENTS.TOUR_END === type &&\n (STATUS.FINISHED === status || STATUS.SKIPPED === status)\n ) {\n finishTutorial();\n }\n };\n // END />\n render() {\n const { canRenderTutorial, joyrideProps } = this.props;\n if (canRenderTutorial && joyrideProps.run) {\n return (\n \n );\n }\n return null;\n }\n}\n\nexport default connect(\n ({\n accountSettings: { isFetchingAccountSettings },\n guideLineTutorial: { joyrideProps, sections, sectionsCompleted },\n }) => ({\n canRenderTutorial:\n !isFetchingAccountSettings && sections.length > sectionsCompleted.length,\n joyrideProps,\n }),\n (dispatch) => ({\n finishTutorial: () =>\n dispatch(GuideLineTutorial.guideLineTutorialCompleted()),\n })\n)(GuideLineTutorialContainer);\n","// @flow\n\n/* PERMISSIONS */\nconst onCheckResource = (apiResource: Object, resources: Array) => {\n for (let resource in apiResource) {\n if (\n resources.indexOf(resource) !== -1 &&\n apiResource[resource]['isEnabled']\n ) {\n return true;\n }\n }\n return false;\n};\n\nexport const onCheckNotificationsPermissions = (\n permissions: ?Object\n): boolean => {\n // REGLA 'my#Notificatons:read' witten wrong\n const resources = [\n 'my#Notificatons:read',\n 'my#Notifications:read',\n 'my#Notifications:update'\n ];\n const { Notifications } = permissions || {};\n if (Notifications && Notifications.apiValue) {\n return onCheckResource(Notifications.apiValue, resources);\n }\n return false;\n};\n","// @flow\n// Import Features\nimport * as React from \"react\";\nimport { connect } from \"react-redux\";\nimport { GuideLineTutorial } from \"../../../store/actions/\";\nimport { EVENTS, STATUS } from \"react-joyride\";\n// Import Types\nimport type { PropsMenuTutorial as Props } from \"../../../types/guideLineTutorial.types\";\nclass MenuTutorial extends React.Component {\n componentDidMount() {\n this._onStartTutorial();\n }\n _onStartTutorial = () => {\n const { canRenderTutorial, startTutorial, userName } = this.props;\n if (canRenderTutorial) {\n startTutorial({\n joyrideProps: {\n run: true,\n steps: [\n {\n target: \"main#heto-app-website\",\n content: (\n
\n Welcome {userName} to Heto.\n
\n There will be some tutorial to let you know the main points\n for every section.
\n You can skip or disable all these tutorial in 'Your Settings'.\n
\n ),\n placement: \"center\",\n title: \"Welcome to Heto\",\n },\n {\n target: \".menu .sidebarmenu.visible div.menu\",\n content: (\n
\n From the menu sidebar, you can navigate through the different\n sections on Heto. Starting with Home, where we are right now,\n passing through Notifications, User Manager, and other\n sections.\n
\n ),\n placement: \"right\",\n placementBeacon: \"right\",\n title: \"Navigation Menu\",\n },\n {\n target: \".menu .sidebarmenu.visible div.dropdown.user-avatar img\",\n content: (\n
\n This \"user menu\" is always available on the bottom left\n screen.\n
\n ),\n styles: {\n options: {\n zIndex: 1000,\n },\n },\n title: \"User Menu\",\n },\n {\n target:\n \".menu .sidebarmenu.visible div.dropdown.user-avatar div.menu.dropdown-menu-user-avatar\",\n content: (\n
\n The \"user menu\" give you direct access to 'Your Profile', and\n other sections.\n
\n ),\n placement: \"right\",\n placementBeacon: \"right\",\n title: \"User Menu\",\n },\n ],\n continuous: true,\n showProgress: true,\n showSkipButton: true,\n callback: this._handleJoyrideCallback,\n styles: {\n options: {\n primaryColor: \"#77c0cf\",\n zIndex: 1000,\n },\n },\n },\n sectionRunning: GuideLineTutorial.GUIDE_LINE_TUTORIAL_MENU,\n });\n }\n };\n // {\n const { action, index, type, status } = data;\n if (\n EVENTS.TOUR_END === type &&\n (STATUS.FINISHED === status || STATUS.SKIPPED === status)\n ) {\n const el = window.document.getElementById(\"dropdown-user-avatar\");\n el.classList.remove(\"active\", \"visible\");\n el.lastChild.classList.remove(\"visible\");\n } else if ([EVENTS.STEP_AFTER, EVENTS.TARGET_NOT_FOUND].includes(type)) {\n if (action === \"next\" && index === 2) {\n const el = window.document.getElementById(\"dropdown-user-avatar\");\n el.classList.add(\"active\", \"visible\");\n el.lastChild.classList.add(\"visible\");\n }\n }\n };\n // END />\n render = () => null;\n getSnapshotBeforeUpdate(prevProps: Props, prevState: any) {\n if (prevProps.canRenderTutorial !== this.props.canRenderTutorial) {\n if (this.props.canRenderTutorial) {\n return true;\n }\n this.props.stopTutorial();\n }\n return false;\n }\n componentDidUpdate(prevProps: Props, prevState: any, updateState: boolean) {\n if (updateState) {\n setTimeout(() => {\n this._onStartTutorial();\n }, 100);\n }\n }\n componentWillUnmount() {\n this.props.stopTutorial();\n }\n}\n\nexport default connect(\n ({ auth: { user }, guideLineTutorial: { sections, sectionsCompleted } }) => ({\n canRenderTutorial:\n sections.length > sectionsCompleted.length &&\n sectionsCompleted.indexOf(GuideLineTutorial.GUIDE_LINE_TUTORIAL_MENU) ===\n -1,\n userName: user ? `${user.firstName} ${user.lastName}` : \"\",\n }),\n (dispatch) => ({\n startTutorial: (payload) =>\n dispatch(GuideLineTutorial.guideLineTutorialStart(payload)),\n stopTutorial: () => dispatch(GuideLineTutorial.guideLineTutorialStop()),\n })\n)(MenuTutorial);\n","// @flow\n\n/* PERMISSIONS */\nconst onCheckResource = (apiResource: Object, resources: Array) => {\n for (let resource in apiResource) {\n if (\n resources.indexOf(resource) !== -1 &&\n apiResource[resource][\"isEnabled\"]\n ) {\n return true;\n }\n }\n return false;\n};\n\nexport const onCheckEvaluationAnswersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"EvaluationAnswers:read\",\n \"EvaluationAnswers:delete\",\n \"my#EvaluationAnswers:create\",\n \"my#EvaluationAnswers:read\",\n \"my#EvaluationAnswers:update\",\n ];\n const { EvaluationAnswers } = permissions || {};\n if (EvaluationAnswers && EvaluationAnswers.apiValue) {\n return onCheckResource(EvaluationAnswers.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadAllEvaluationAnswersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"EvaluationAnswers:read\"];\n const { EvaluationAnswers } = permissions || {};\n if (EvaluationAnswers && EvaluationAnswers.apiValue) {\n return onCheckResource(EvaluationAnswers.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadMyEvaluationAnswersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my#EvaluationAnswers:read\"];\n const { EvaluationAnswers } = permissions || {};\n if (EvaluationAnswers && EvaluationAnswers.apiValue) {\n return onCheckResource(EvaluationAnswers.apiValue, resources);\n }\n return false;\n};\nexport const onCheckDeleteEvaluationsAnswersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"EvaluationAnswers:delete\"];\n const { EvaluationAnswers } = permissions || {};\n if (EvaluationAnswers && EvaluationAnswers.apiValue) {\n return onCheckResource(EvaluationAnswers.apiValue, resources);\n }\n return false;\n};\n","// @flow\n\n/* PERMISSIONS */\nconst onCheckResource = (apiResource: Object, resources: Array) => {\n for (let resource in apiResource) {\n if (\n resources.indexOf(resource) !== -1 &&\n apiResource[resource][\"isEnabled\"]\n ) {\n return true;\n }\n }\n return false;\n};\n\nexport const onCheckAllUserPortfolioPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n \"Portfolios:read\",\n \"Portfolios:update\",\n \"my:Students#Portfolios:submitTestimonial\",\n \"my#Portfolios:read\",\n \"my#Portfolios:update\",\n \"my#Portfolios:delete\",\n ];\n const { Portfolios } = permissions || {};\n if (Portfolios && Portfolios.apiValue) {\n return onCheckResource(Portfolios.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckReadPortfoliosPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Portfolios:read\", \"my#Portfolios:read\"];\n const { Portfolios } = permissions || {};\n if (Portfolios && Portfolios.apiValue) {\n return onCheckResource(Portfolios.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckReadAllPortfoliosPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Portfolios:read\"];\n const { Portfolios } = permissions || {};\n if (Portfolios && Portfolios.apiValue) {\n return onCheckResource(Portfolios.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditAllPortfoliosPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"Portfolios:update\"];\n const { Portfolios } = permissions || {};\n if (Portfolios && Portfolios.apiValue) {\n return onCheckResource(Portfolios.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckReadMyUsersPortfolioPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my#Portfolios:read\"];\n const { Portfolios } = permissions || {};\n if (Portfolios && Portfolios.apiValue) {\n return onCheckResource(Portfolios.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckEditMyUsersPortfolioPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my#Portfolios:update\"];\n const { Portfolios } = permissions || {};\n if (Portfolios && Portfolios.apiValue) {\n return onCheckResource(Portfolios.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckDeleteMyUsersPortfolioPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my#Portfolios:delete\"];\n const { Portfolios } = permissions || {};\n if (Portfolios && Portfolios.apiValue) {\n return onCheckResource(Portfolios.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckSubmitMyUsersPortfolioPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\"my:Students#Portfolios:submitTestimonial\"];\n const { Portfolios } = permissions || {};\n if (Portfolios && Portfolios.apiValue) {\n return onCheckResource(Portfolios.apiValue, resources);\n }\n return false;\n};\n","// Permissions\nimport {\n onCheckAllRotationsPermissions,\n onCheckPeriodsPermissions,\n} from \"../../rotations/RotationsPermissions\";\nimport { onCheckAllCaseLogsPermissions } from \"../../case-logs/CaseLogsPermissions\";\nimport { onCheckEvaluationsPermissions } from \"../../evaluations/EvaluationsPermissions\";\nimport { onCheckReadAllEvaluationAnswersPermissions } from \"../../evaluations/answers/EvaluationAnswersPermissions\";\nimport { onCheckAllReportsPermissions } from \"../../reports/ReportsPermissions\";\nimport {\n onCheckFilesPermissions,\n onCheckUsersFilesPermissions,\n} from \"../../files/FilesPermissions\";\nimport { onCheckAllCustomFieldsPermissions } from \"../../admin-portal/AdminPortalPermissions\";\nimport { onCheckImportDataPermissions } from \"../../import/ImportDataPermissions\";\nimport { onCheckAllUserPortfolioPermissions } from \"../../user-portfolio/UserPortfolioPermissions\";\n// Types\nimport type { SemanticICONS } from \"semantic-ui-react\";\nimport type { PayloadObject } from \"../../../types/common.types\";\nimport type { NotificationsCategories } from \"../../../store/reducers/notifications\";\ntype PayloadNotificationCategory = {\n _id: NotificationsCategories;\n name: string;\n icon: SemanticICONS;\n categories: string[];\n};\n// Notifications Filters (Categories):\nconst ALL_NOTIFICATIONS_CATEGORIES: PayloadNotificationCategory[] = [\n {\n _id: \"ROTATIONS\",\n name: \"Rotations\",\n icon: \"calendar\",\n categories: [\n \"ROTATION_CREATED\",\n \"ROTATION_UPDATED\",\n \"ROTATION_ABOUT_START\",\n \"ROTATION_STARTED\",\n \"ROTATION_ABOUT_FINISH\",\n \"ROTATION_FINISHED\",\n ],\n },\n {\n _id: \"CASE_LOGS\",\n name: \"Case Logs\",\n icon: \"file alternate\",\n categories: [\"CASE_LOG_SUBMITTED\", \"CASE_LOG_DENIED\", \"CASE_LOG_APPROVED\"],\n },\n {\n _id: \"EVALUATIONS,EVALUATION_SCHEDULES\",\n name: \"Evaluations\",\n icon: \"clipboard\",\n categories: [\n \"EVALUATION_CREATED\",\n \"EVALUATION_FINISHED\",\n \"EVALUATION_ABOUT_FINISH\",\n \"EVALUATION_ANSWER_SUBMITTED\",\n ],\n },\n {\n _id: \"EVALUATION_ANSWERS\",\n name: \"Evaluations > Goals\",\n icon: \"clipboard\",\n categories: [\"EVALUATION_ANSWER_SUBMITTED\"],\n },\n {\n _id: \"REPORTS\",\n name: \"Reports\",\n icon: \"chart bar\",\n categories: [\"REPORT_CREATED\", \"REPORT_ERROR\"],\n },\n {\n _id: \"DOCUMENTS\",\n name: \"Documents\",\n icon: \"folder open\",\n categories: [\"FILE_UPLOADED\", \"FILE_EXPIRED\", \"FILE_CATEGORY_DELETED\"],\n },\n {\n _id: \"CUSTOM_FIELDS,PERIODS,IMPORT_DATA,PORTFOLIOS\",\n name: \"Others\",\n icon: \"list alternate\",\n categories: [\n \"CUSTOM_FIELD_DELETED\",\n \"PERIOD_DELETED\",\n \"IMPORT_CREATED\",\n \"IMPORT_ERROR\",\n ],\n },\n // Not in use\n {\n _id: \"INSTITUTIONS\",\n name: \"Clinics\",\n icon: \"hospital\",\n categories: [\"INSTITUTION_DELETED\"],\n },\n {\n _id: \"USERS\",\n name: \"Users\",\n icon: \"users\",\n categories: [\"USER_ACCOUNT_DELETED\"],\n },\n // Deprecated\n {\n _id: \"INSTITUTIONS\",\n name: \"Clinics\",\n icon: \"hospital\",\n categories: [\"INSTITUTION_CREATED\"],\n },\n {\n _id: \"USERS\",\n name: \"Users\",\n icon: \"users\",\n categories: [\"USER_ACCOUNT_CREATED\"],\n },\n {\n _id: \"DOCUMENTS\",\n name: \"Documents\",\n icon: \"folder open\",\n categories: [\"FILE_CATEGORY_CREATED\"],\n },\n {\n _id: \"CUSTOM_FIELDS,PERIODS,IMPORT_DATA,PORTFOLIOS\",\n name: \"Others\",\n icon: \"list alternate\",\n categories: [\"CUSTOM_FIELD_CREATED\", \"PERIOD_CREATED\"],\n },\n];\nexport const onCreateNotificationsCategories = (\n permissions: PayloadObject\n): PayloadNotificationCategory[] => {\n let allNotificationsCategories: PayloadNotificationCategory[] = [];\n if (onCheckAllRotationsPermissions(permissions)) {\n allNotificationsCategories = [\n ...allNotificationsCategories,\n ALL_NOTIFICATIONS_CATEGORIES[0],\n ];\n }\n if (onCheckAllCaseLogsPermissions(permissions)) {\n allNotificationsCategories = [\n ...allNotificationsCategories,\n ALL_NOTIFICATIONS_CATEGORIES[1],\n ];\n }\n if (onCheckEvaluationsPermissions(permissions)) {\n allNotificationsCategories = [\n ...allNotificationsCategories,\n ALL_NOTIFICATIONS_CATEGORIES[2],\n ];\n }\n if (onCheckReadAllEvaluationAnswersPermissions(permissions)) {\n allNotificationsCategories = [\n ...allNotificationsCategories,\n ALL_NOTIFICATIONS_CATEGORIES[3],\n ];\n }\n if (onCheckAllReportsPermissions(permissions)) {\n allNotificationsCategories = [\n ...allNotificationsCategories,\n ALL_NOTIFICATIONS_CATEGORIES[4],\n ];\n }\n if (\n onCheckFilesPermissions(permissions) ||\n onCheckUsersFilesPermissions(permissions)\n ) {\n allNotificationsCategories = [\n ...allNotificationsCategories,\n ALL_NOTIFICATIONS_CATEGORIES[5],\n ];\n }\n if (\n onCheckAllCustomFieldsPermissions(permissions) ||\n onCheckPeriodsPermissions(permissions) ||\n onCheckImportDataPermissions(permissions) ||\n onCheckAllUserPortfolioPermissions(permissions)\n ) {\n allNotificationsCategories = [\n ...allNotificationsCategories,\n ALL_NOTIFICATIONS_CATEGORIES[6],\n ];\n }\n return allNotificationsCategories;\n};\n//\n","// Features\nimport * as React from \"react\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport classNames from \"classnames\";\nimport { Notifications } from \"../../../store/actions\";\nimport { onCreateNotificationsCategories } from \"../utils/_Notifications.utils\";\n// Components\nimport { Button, Icon } from \"semantic-ui-react\";\n// Types\nimport type { RootState } from \"../../../store/reducers\";\nimport type {\n NotificationsCategories,\n State as StateNotifications,\n} from \"../../../store/reducers/notifications\";\nimport type {\n ErrorType,\n PayloadObject,\n UndefinedNull,\n} from \"../../../types/common.types\";\n// Notifications Filters (Categories):\nconst { useState } = React;\n//\nconst NotificationsFilters = ({\n authPermissions,\n}: React.PropsWithChildren<{\n authPermissions: PayloadObject;\n}>) => {\n const dispatch = useDispatch();\n // STORE NOTIFICATIONS\n const notificationsCategories: StateNotifications[\"notificationsCategories\"] =\n useSelector(\n ({ notifications }: RootState) => notifications.notificationsCategories\n );\n // Constants\n const NOTIFICATIONS_CATEGORIES =\n onCreateNotificationsCategories(authPermissions);\n // State\n const [timerId, setTimerId] = useState(\n undefined\n );\n // GET Notifications by Categories\n const _onFilterNotificationsByCategoriesRequest = () => {\n return new Promise((resolve, reject) => {\n const formValues = {\n notificationsCategories,\n notificationsFiltersByCategories: true,\n };\n const callbacks = {\n cbe: (error: ErrorType) => {\n window.logger.log(\n \"_onFilterNotificationsByCategoriesRequest - failed\"\n );\n reject(error);\n },\n cbs: () => {\n window.logger.log(\n \"_onFilterNotificationsByCategoriesRequest - success\"\n );\n resolve(\"_onFilterNotificationsByCategoriesRequest - success\");\n },\n };\n const payload = Object.assign({}, formValues, callbacks);\n dispatch(Notifications.notificationsFetchNotifications(payload));\n });\n };\n const onFilterNotificationsByCategories = async () => {\n await _onFilterNotificationsByCategoriesRequest()\n .then((successMsg) => {\n window.logger.log(\n \"onFilterNotificationsByCategories then \",\n successMsg\n );\n })\n .catch((error: any) =>\n window.logger.log(\"onFilterNotificationsByCategories - error\", error)\n );\n setTimerId(undefined);\n };\n // Set Notifications By Categories and call to API\n const onSetNotificationsByCategories = (\n notificationsCategory?: NotificationsCategories\n ) => {\n if (notificationsCategory) {\n dispatch(\n Notifications.notificationsSetNotificationsCategories({\n notificationsCategory,\n })\n );\n } else {\n dispatch(Notifications.notificationsClearNotificationsCategories());\n }\n if (timerId) {\n clearTimeout(timerId);\n }\n setTimerId(setTimeout(() => onFilterNotificationsByCategories(), 1000));\n };\n // RENDERS\n return (\n <>\n \n {NOTIFICATIONS_CATEGORIES.map(({ _id, name, icon }, index) => (\n onSetNotificationsByCategories(_id)}\n size=\"mini\"\n >\n \n {name}\n \n \n ))}\n \n 0,\n },\n \"right\"\n )}\n onClick={\n notificationsCategories.length > 0\n ? () => onSetNotificationsByCategories()\n : undefined\n }\n style={{\n opacity: notificationsCategories.length > 0 ? 1 : 0.45,\n }}\n >\n Clear\n \n \n );\n};\nexport default NotificationsFilters;\n","// Features\nimport * as React from \"react\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport classNames from \"classnames\";\nimport { Notifications } from \"../../../store/actions\";\n// Components\nimport { Button, Loader, Popup } from \"semantic-ui-react\";\n// Types\nimport type { RootState } from \"../../../store/reducers\";\n// Notifications Actions in Bulk:\nconst { useState } = React;\n//\nconst NotificationsActionsInBulk = ({\n canDoInActionsInBulk: _canDoInActionsInBulk_,\n}: React.PropsWithChildren<{\n canDoInActionsInBulk: boolean;\n}>) => {\n const dispatch = useDispatch();\n // STORE NOTIFICATIONS\n const hasNotificationsCategories: boolean = useSelector(\n ({ notifications }: RootState) =>\n notifications.notificationsCategories.length > 0\n );\n // State\n const [inAction, setInAction] = useState<\n \"\" | \"markAsRead-all\" | \"delete-all\"\n >(\"\");\n // Methods\n const onAction = (action: \"markAsRead-all\" | \"delete-all\") => () => {\n setInAction(action);\n if (action === \"markAsRead-all\") {\n dispatch(\n Notifications.notificationsMarkAsReadNotifications({\n callbackSuccess: () => setInAction(\"\"),\n callbackError: () => setInAction(\"\"),\n })\n );\n } else if (action === \"delete-all\") {\n dispatch(\n Notifications.notificationsDelete({\n callbackSuccess: () => setInAction(\"\"),\n callbackError: () => setInAction(\"\"),\n })\n );\n }\n };\n // RENDERS\n const canDoInActionsInBulk = _canDoInActionsInBulk_ && !inAction,\n canDeleteAllInBulk = canDoInActionsInBulk && hasNotificationsCategories;\n return (\n \n \n Confirm Delete all notifications\n \n ) : (\n \"Delete all notifications\"\n )\n }\n data-popup=\"is-popup-notification\"\n hoverable={canDeleteAllInBulk}\n on={canDeleteAllInBulk ? [\"hover\", \"click\"] : undefined}\n position=\"bottom center\"\n trigger={\n \n Delete all\n {inAction === \"delete-all\" && (\n \n )}\n \n }\n />\n \n Mark all as read\n {inAction === \"markAsRead-all\" && (\n \n )}\n \n }\n />\n \n );\n};\nexport default NotificationsActionsInBulk;\n","export default __webpack_public_path__ + \"static/media/iconUserEmptyFill.a76027d7.svg\";","// Features\nimport * as React from \"react\";\nimport { useDispatch } from \"react-redux\";\nimport { Notifications } from \"../../../store/actions\";\n// Components\nimport { Button, Icon, Popup } from \"semantic-ui-react\";\n// Notifications Individual Action:\nconst { useState } = React;\n//\nconst NotificationsActions = ({\n isMarkAsRead,\n notificationId,\n}: React.PropsWithChildren<{\n isMarkAsRead: boolean;\n notificationId: string;\n}>) => {\n const dispatch = useDispatch();\n // State\n const [inAction, setInAction] = useState<\"\" | \"markAsRead\" | \"delete\">(\"\");\n // Methods\n const onAction = (action: \"markAsRead\" | \"delete\") => () => {\n setInAction(action);\n if (action === \"markAsRead\") {\n dispatch(\n Notifications.notificationsMarkAsReadNotifications({\n notificationId,\n callbackSuccess: () => setInAction(\"\"),\n callbackError: () => setInAction(\"\"),\n })\n );\n } else if (action === \"delete\") {\n dispatch(\n Notifications.notificationsDelete({\n notificationId,\n callbackSuccess: () => setInAction(\"\"),\n callbackError: () => setInAction(\"\"),\n })\n );\n }\n };\n // RENDERS\n return (\n
\n {!isMarkAsRead && (\n \n }\n />\n )}\n \n Confirm Delete\n \n }\n data-popup=\"is-popup-notification\"\n hoverable\n on={[\"hover\", \"click\"]}\n position=\"bottom center\"\n trigger={\n \n }\n />\n
\n );\n};\nexport default NotificationsActions;\n","// Features\nimport * as React from \"react\";\nimport { onSetDateTime } from \"../../../utils/index\";\n// Components\nimport NotificationsActions from \"./NotificationsActions\";\n// Notifications To show a Date:\nconst NotificationsDate = ({\n createdAt,\n isMarkAsRead,\n notificationId,\n}: React.PropsWithChildren<{\n createdAt: string;\n isMarkAsRead: boolean;\n notificationId: string;\n}>) => (\n
\n {onSetDateTime(createdAt)}\n \n
\n);\nexport default NotificationsDate;\n","// @flow\n/* eslint-disable jsx-a11y/anchor-is-valid */\n// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md\n// Features\nimport * as React from \"react\";\nimport classNames from \"classnames\";\nimport { setUserRole } from \"../../../utils\";\n// Assets\nimport iconUserEmptyFill from \"../../../images/iconUserEmptyFill.svg\";\n// Components\nimport { Grid, Image } from \"semantic-ui-react\";\nimport NotificationsDate from \"./NotificationsDate\";\nconst NotificationUserAccount = ({\n _id,\n readBy,\n user,\n institution,\n message,\n createdAt,\n setImg,\n goToUserProfile,\n}: Object): React$Element => (\n \n \n \n \n \n \n \n
\n {message\n .replace(/{role}/gi, setUserRole(user.role).name)\n .split(/({userName}|{institutionName})/gi)\n .map((el, index) => {\n if (el === \"{userName}\") {\n const userName = `${user.firstName || \"Not Name\"} ${\n user.lastName || \"Not Last Name\"\n }`;\n return (\n {\n // DEBUG: We need to debugger this action, because when\n // it's called one time and manager profile is open\n // the action User.setUserId is called two times, because of\n // ManagerRoute component is launched two times before route change\n goToUserProfile(`/manager/profile/${user._id}`, {\n namePage: \"Profile\",\n role: setUserRole(user.role),\n user: null,\n })(event);\n setTimeout(() => {\n goToUserProfile(`/manager/profile/${user._id}`, {\n namePage: \"Profile\",\n role: setUserRole(user.role),\n user: null,\n })(event);\n }, 500);\n }}\n >\n {userName}\n \n );\n } else if (el === \"{institutionName}\") {\n return (\n \n {institution && institution.name}\n \n );\n }\n return el;\n })}\n
\n 0}\n notificationId={_id}\n />\n
\n
\n
\n \n);\n\nexport default NotificationUserAccount;\n","// @flow\n/* eslint-disable jsx-a11y/anchor-is-valid */\n// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md\n// Features\nimport * as React from \"react\";\nimport classNames from \"classnames\";\nimport { parseName, parseApiName } from \"../../../utils/index\";\n// Components\nimport { Grid } from \"semantic-ui-react\";\nimport NotificationsDate from \"./NotificationsDate\";\nconst NotificationCustomFields = ({\n _id,\n readBy,\n customField,\n user,\n message,\n createdAt,\n goToProfile,\n}: Object): React$Element => (\n \n \n \n \n \n \n \n
\n {message\n .split(/({userName}|{dataModel}|{customFieldName})/gi)\n .map((el, index) => {\n if (el === \"{userName}\") {\n return (\n {\n // DEBUG: We need to debugger this action, because when\n // it's called one time and manager profile is open\n // the action User.setUserId is called two times, because of\n // ManagerRoute component is launched two times before route change\n goToProfile(`/manager/profile/${user._id}`)(event);\n setTimeout(() => {\n goToProfile(`/manager/profile/${user._id}`)(event);\n }, 500);\n }}\n >{`${user.firstName || \"\"} ${user.lastName || \"\"}`}\n );\n } else if (el === \"{dataModel}\") {\n return (\n \n {parseApiName(parseName(customField.model))}\n \n );\n } else if (el === \"{customFieldName}\") {\n return (\n \n {customField.name.length > 25\n ? customField.name.slice(0, 25) + \" ...\"\n : customField.name}\n \n );\n }\n return el;\n })}\n
\n 0}\n notificationId={_id}\n />\n
\n
\n
\n \n);\n\nexport default NotificationCustomFields;\n","export default __webpack_public_path__ + \"static/media/iconInstitutionEmptyFill.4b185f51.svg\";","// @flow\n/* eslint-disable jsx-a11y/anchor-is-valid */\n// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md\n// Features\nimport * as React from \"react\";\nimport classNames from \"classnames\";\n// Assets\nimport iconInstitutionEmptyFill from \"../../../images/iconInstitutionEmptyFill.svg\";\n// Components\nimport { Grid, Image } from \"semantic-ui-react\";\nimport NotificationsDate from \"./NotificationsDate\";\nconst NotificationInstitutionAccount = ({\n _id,\n readBy,\n institution,\n message,\n createdAt,\n setImg,\n goToInstitutionProfile,\n}: Object): React$Element => (\n \n \n \n \n \n \n \n
\n {message.split(/({institutionName})/gi).map((el, index) => {\n if (el === \"{institutionName}\") {\n return (\n \n {institution.name}\n \n );\n }\n return el;\n })}\n
\n 0}\n notificationId={_id}\n />\n
\n
\n
\n \n);\n\nexport default NotificationInstitutionAccount;\n","// @flow\n/* eslint-disable jsx-a11y/anchor-is-valid */\n// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md\n// Features\nimport * as React from \"react\";\nimport classNames from \"classnames\";\nimport { setUserRole } from \"../../../utils\";\n// Components\nimport { Grid } from \"semantic-ui-react\";\nimport NotificationsDate from \"./NotificationsDate\";\nconst NotificationRotation = ({\n _id,\n readBy,\n rotation,\n institutions,\n student,\n message,\n createdAt,\n goTo,\n}: Object): React$Element => (\n \n \n \n \n \n \n \n
\n {message\n .split(/({rotationNumber}|{institutionName}|{studentName})/gi)\n .map((el, index) => {\n if (el === \"{rotationNumber}\") {\n return (\n \n #{rotation.rotationNumber}\n \n );\n } else if (el === \"{studentName}\") {\n return (\n {\n // DEBUG: We need to debugger this action, because when\n // it's called one time and manager profile is open\n // the action User.setUserId is called two times, because of\n // ManagerRoute component is launched two times before route change\n goTo(`/manager/profile/${student._id}`, {\n namePage: \"Profile\",\n role: setUserRole(student.role),\n user: null,\n })(event);\n setTimeout(() => {\n goTo(`/manager/profile/${student._id}`, {\n namePage: \"Profile\",\n role: setUserRole(student.role),\n user: null,\n })(event);\n }, 500);\n }}\n >{`${student.firstName || \"Not Name\"} ${\n student.lastName || \"Not Last Name\"\n }`}\n );\n } else if (el === \"{institutionName}\") {\n return institutions.map((institution, indexInsti) => (\n \n {institution.name}\n {indexInsti + 1 < institutions.length && \", \"}\n \n ));\n }\n return el;\n })}\n
\n 0}\n notificationId={_id}\n />\n
\n
\n
\n \n);\n\nexport default NotificationRotation;\n","/* eslint-disable jsx-a11y/anchor-is-valid */\n// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md\n// Features\nimport * as React from \"react\";\nimport { useSelector } from \"react-redux\";\nimport classNames from \"classnames\";\nimport { setUserRole } from \"../../../utils/\";\n// Permissions\nimport { onCheckReadUsersRoleProfile } from \"../../user-manager/UsersPermissions\";\nimport { onCheckReadCaseLogsPermissions } from \"../../case-logs/CaseLogsPermissions\";\n// Components\nimport { Grid } from \"semantic-ui-react\";\nimport NotificationsDate from \"./NotificationsDate\";\n// Type\nimport type { RootState } from \"../../../store/reducers\";\nimport type { UndefinedNull, PayloadObject } from \"../../../types/common.types\";\ntype PropsNotificationsCaseLogs = {\n _id: string;\n readBy: PayloadObject[] | UndefinedNull;\n caseLog: PayloadObject;\n institution: PayloadObject;\n student: PayloadObject;\n preceptor: PayloadObject;\n message: string;\n createdAt: string;\n goToProfile: (pathname: string, state?: PayloadObject) => any;\n};\n// Notifications for CASE_LOGS\nconst NotificationCaseLog = ({\n _id,\n readBy,\n caseLog,\n institution,\n student,\n preceptor,\n message,\n createdAt,\n goToProfile,\n}: React.PropsWithChildren) => (\n \n \n \n \n \n \n \n
\n {message\n .split(\n /({studentName}|{institutionName}|{preceptorName}|{caseLogNumber}|a new Case Log)/gi\n )\n .map((el: string, index: number) => {\n if (el === \"{studentName}\") {\n return (\n {\n // DEBUG: We need to debugger this action, because when\n // it's called one time and manager profile is open\n // the action User.setUserId is called two times, because of\n // ManagerRoute component is launched two times before route change\n goToProfile(`/manager/profile/${student._id}`)(event);\n setTimeout(() => {\n goToProfile(`/manager/profile/${student._id}`)(event);\n }, 500);\n }}\n >{`${student.firstName || \"\"} ${\n student.lastName || \"\"\n }`}\n );\n } else if (el === \"{institutionName}\") {\n return (\n \n {institution.name}\n \n );\n } else if (el === \"{preceptorName}\") {\n return (\n {\n // DEBUG: We need to debugger this action, because when\n // it's called one time and manager profile is open\n // the action User.setUserId is called two times, because of\n // ManagerRoute component is launched two times before route change\n goToProfile(`/manager/profile/${preceptor._id}`)(event);\n setTimeout(() => {\n goToProfile(`/manager/profile/${preceptor._id}`)(\n event\n );\n }, 500);\n }}\n >\n {`${preceptor.firstName || \"\"} ${\n preceptor.lastName || \"\"\n }`}\n \n );\n } else if (el === \"{caseLogNumber}\") {\n return (\n \n #{caseLog.caseLogNumber}\n \n );\n } else if (el === \"a new Case Log\") {\n return (\n \n a new Case Log\n \n );\n }\n return el;\n })}\n
\n 0}\n notificationId={_id}\n />\n
\n
\n
\n \n);\nconst LinkToPreceptor = ({\n children,\n ...props\n}: React.PropsWithChildren>) => {\n // STORE AUTH\n const canGoToPreceptorProfile: boolean = useSelector(\n ({ auth: { role } }: RootState) =>\n onCheckReadUsersRoleProfile(setUserRole(\"Preceptors\"), role.permissions)\n );\n if (canGoToPreceptorProfile) {\n return {children};\n }\n return <>{children};\n};\nconst LinkToCaseLog = ({\n children,\n ...props\n}: React.PropsWithChildren>) => {\n // STORE AUTH\n const canReadCaseLogs: boolean = useSelector(\n ({ auth: { role } }: RootState) =>\n onCheckReadCaseLogsPermissions(role.permissions)\n );\n if (canReadCaseLogs) {\n return {children};\n }\n return <>{children};\n};\nexport default NotificationCaseLog;\n","// @flow\n// Features\nimport * as React from \"react\";\nimport classNames from \"classnames\";\n// Components\nimport { Grid } from \"semantic-ui-react\";\nimport NotificationsDate from \"./NotificationsDate\";\nconst NotificationPeriod = ({\n _id,\n readBy,\n period,\n message,\n createdAt,\n}: Object): React$Element => (\n \n \n \n \n \n \n \n
\n {message.split(/({periodName})/gi).map((el, index) => {\n if (el === \"{periodName}\") {\n return (\n \n {period.name}\n \n );\n }\n return el;\n })}\n
\n 0}\n notificationId={_id}\n />\n
\n
\n
\n \n);\n\nexport default NotificationPeriod;\n","/* eslint-disable jsx-a11y/anchor-is-valid */\n// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md\n// Features\nimport * as React from \"react\";\nimport classNames from \"classnames\";\nimport { setUserRole } from \"../../../utils\";\n// Components\nimport { Divider, Grid, Popup } from \"semantic-ui-react\";\nimport NotificationsDate from \"./NotificationsDate\";\n// Type\nimport type { UndefinedNull, PayloadObject } from \"../../../types/common.types\";\ntype PropsNotificationsEvaluations = {\n _id: string;\n readBy: PayloadObject[] | UndefinedNull;\n evaluation: PayloadObject;\n evaluationAnswer: PayloadObject;\n evaluator: PayloadObject;\n options: PayloadObject[];\n targetName: string;\n message: string;\n createdAt: string;\n goTo: (pathname: string, state?: PayloadObject) => any;\n};\n// Notifications for EVALUATIONS\n// evaluationName\n// reminderMessage\n// evaluatorName\n// targetName\n\nconst NotificationEvaluation = ({\n _id,\n readBy,\n evaluation,\n evaluationAnswer,\n evaluator,\n options = [],\n targetName,\n message,\n createdAt,\n goTo,\n}: React.PropsWithChildren) => (\n \n \n \n \n \n \n \n
\n {message\n .split(\n /({evaluationName}|{evaluatorName}|{targetName}|{reminderMessage}| to be notified)/gi\n )\n .map((el, index) => {\n if (el === \"{evaluationName}\") {\n return (\n \n #{evaluation.evaluationNumber}\n \n );\n } else if (el === \"{evaluatorName}\") {\n return (\n {\n // DEBUG: We need to debugger this action, because when\n // it's called one time and manager profile is open\n // the action User.setUserId is called two times, because of\n // ManagerRoute component is launched two times before route change\n goTo(`/manager/profile/${evaluator._id}`, {\n namePage: \"Profile\",\n role: setUserRole(evaluator.role),\n user: null,\n })(event);\n setTimeout(() => {\n goTo(`/manager/profile/${evaluator._id}`, {\n namePage: \"Profile\",\n role: setUserRole(evaluator.role),\n user: null,\n })(event);\n }, 500);\n }}\n >{`${evaluator.firstName || \"\"} ${\n evaluator.lastName || \"\"\n }`}\n );\n } else if (el === \"{targetName}\") {\n return (\n \n {targetName}\n \n );\n } else if (el === \"{reminderMessage}\") {\n return (\n \n {evaluation.reminderMessage}\n \n );\n } else if (el === \" to be notified\") {\n if (options?.length > 0) {\n return (\n 4,\n })}\n data-popup=\"is-popup-notification\"\n >\n {options.map((option, index) => (\n \n \n {option.header}\n \n \n {option.option}\n \n {index + 1 < options.length && (\n \n )}\n
\n ))}\n \n }\n data-popup=\"is-popup-notification\"\n id=\"broadcast-message-popup\"\n on=\"click\"\n position=\"bottom center\"\n trigger={\n \n {el}\n \n }\n />\n );\n }\n }\n return el;\n })}\n \n 0}\n notificationId={_id}\n />\n
\n
\n
\n \n);\n\nexport default NotificationEvaluation;\n","// @flow\n/* eslint-disable jsx-a11y/anchor-is-valid */\n// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md\n// Features\nimport * as React from \"react\";\nimport classNames from \"classnames\";\n// Components\nimport { Grid } from \"semantic-ui-react\";\nimport NotificationsDate from \"./NotificationsDate\";\nconst NotificationDocuments = ({\n _id,\n readBy,\n user,\n files,\n message,\n createdAt,\n goToProfile,\n}: Object): React$Element => (\n \n \n \n \n \n \n \n
\n {message.split(/({fileName}|{userName})/gi).map((el, index) => {\n if (el === \"{userName}\") {\n return (\n {\n // DEBUG: We need to debugger this action, because when\n // it's called one time and manager profile is open\n // the action User.setUserId is called two times, because of\n // ManagerRoute component is launched two times before route change\n goToProfile(`/manager/profile/${user._id}`)(event);\n setTimeout(() => {\n goToProfile(`/manager/profile/${user._id}`)(event);\n }, 500);\n }}\n >{`${user.firstName || \"\"} ${user.lastName || \"\"}`}\n );\n } else if (el === \"{fileName}\") {\n return (\n \n {files[0].name.length > 25\n ? files[0].name.slice(0, 25) + \" ...\"\n : files[0].name}\n \n );\n }\n return el;\n })}\n
\n 0}\n notificationId={_id}\n />\n
\n
\n
\n \n);\n\nexport default NotificationDocuments;\n","// @flow\n/* eslint-disable jsx-a11y/anchor-is-valid */\n// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md\n// Features\nimport * as React from \"react\";\nimport classNames from \"classnames\";\n// Components\nimport { Grid } from \"semantic-ui-react\";\nimport NotificationsDate from \"./NotificationsDate\";\nconst NotificationDocumentCategory = ({\n _id,\n readBy,\n fileCategory,\n message,\n createdAt,\n goToDocumentsCategory,\n}: Object): React$Element => (\n \n \n \n \n \n \n \n
\n {message.split(/({fileCategory})/gi).map((el, index) => {\n if (el === \"{fileCategory}\") {\n return (\n \n {fileCategory.name}\n \n );\n }\n return el;\n })}\n
\n 0}\n notificationId={_id}\n />\n
\n
\n
\n \n);\n\nexport default NotificationDocumentCategory;\n","// @flow\n/* eslint-disable jsx-a11y/anchor-is-valid */\n// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md\n// Features\nimport * as React from \"react\";\nimport classNames from \"classnames\";\n// Components\nimport { Grid } from \"semantic-ui-react\";\nimport NotificationsDate from \"./NotificationsDate\";\nconst NotificationImportData = ({\n _id,\n readBy,\n fileName,\n model,\n message,\n createdAt,\n goToImportStatus,\n}: Object): React$Element => (\n \n \n \n \n \n \n \n
{message}
\n
\n File:{\" \"}\n \n {fileName}\n \n
\n 0}\n notificationId={_id}\n />\n
\n
\n
\n \n);\nexport default NotificationImportData;\n","// @flow\n/* eslint-disable jsx-a11y/anchor-is-valid */\n// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md\n// Features\nimport * as React from \"react\";\nimport classNames from \"classnames\";\n// Components\nimport { Grid } from \"semantic-ui-react\";\nimport NotificationsDate from \"./NotificationsDate\";\nconst NotificationReport = ({\n _id,\n readBy,\n report,\n message,\n createdAt,\n goTo,\n}: Object): React$Element => (\n \n \n \n \n \n \n \n
\n {message.split(/({reportName})/gi).map((el, index) => {\n if (el === \"{reportName}\") {\n return (\n \n {report && report.name}\n \n );\n }\n return el;\n })}\n
\n 0}\n notificationId={_id}\n />\n
\n
\n
\n \n);\n\nexport default NotificationReport;\n","// Features\nimport * as React from \"react\";\nimport { Waypoint } from \"react-waypoint\";\n// Components\nimport { Divider, Header, Icon, Loader, Tab } from \"semantic-ui-react\";\nimport NotificationsFilters from \"./NotificationsFilters\";\nimport NotificationsActionsInBulk from \"./NotificationsActionsInBulk\";\nimport NotificationUserAccount from \"./NotificationUserAccount\";\nimport NotificationCustomFields from \"./NotificationCustomFields\";\nimport NotificationInstitutionAccount from \"./NotificationInstitutionAccount\";\nimport NotificationRotation from \"./NotificationRotation\";\nimport NotificationCaseLog from \"./NotificationCaseLog\";\nimport NotificationPeriod from \"./NotificationPeriod\";\nimport NotificationEvaluation from \"./NotificationEvaluation\";\nimport NotificationDocuments from \"./NotificationDocuments\";\nimport NotificationDocumentCategory from \"./NotificationDocumentCategory\";\nimport NotificationImportData from \"./NotificationImportData\";\nimport NotificationReport from \"./NotificationReport\";\n// Types\nimport type { PayloadObject } from \"../../../types/common.types\";\ntype Props = {\n authPermissions: PayloadObject,\n isFetchingNotifications: boolean,\n notifications: Array,\n setImg: (_img: string, updatedAt: string) => string,\n goTo: (pathname: string, state: Object) => void,\n getMoreNotifications: (lastNotificationId: string) => () => void,\n};\n// Notifications:\nconst InfiniteScroll = ({\n onLoadMoreNotifications,\n}: {\n onLoadMoreNotifications: () => void,\n}): React$Element => ;\n\nconst Notifications = ({\n authPermissions,\n isFetchingNotifications,\n notifications,\n setImg,\n goTo,\n getMoreNotifications,\n}: Props): React$Element => (\n \n \n
\n

Notifications

\n
\n Filters notifications by categories\n
\n \n \n
\n \n {notifications.filter((n) => !n.readBy).length > 0\n ? `NEW (${notifications.filter((n) => !n.readBy).length}/${\n notifications.length\n })`\n : `PREVIOUS (${notifications.length})`}\n
\n
\n 0}\n />\n
\n
\n {notifications.map((notification, index) => {\n switch (notification.action) {\n case \"USER_ACCOUNT_CREATED\":\n case \"USER_ACCOUNT_DELETED\":\n return [\n index === notifications.length - 1 ? (\n \n ) : null,\n ,\n ];\n case \"CUSTOM_FIELD_CREATED\":\n case \"CUSTOM_FIELD_DELETED\":\n return [\n index === notifications.length - 1 ? (\n \n ) : null,\n ,\n ];\n case \"INSTITUTION_CREATED\":\n case \"INSTITUTION_DELETED\":\n return [\n index === notifications.length - 1 ? (\n \n ) : null,\n ,\n ];\n case \"ROTATION_CREATED\":\n case \"ROTATION_UPDATED\":\n case \"ROTATION_ABOUT_START\":\n case \"ROTATION_STARTED\":\n case \"ROTATION_ABOUT_FINISH\":\n case \"ROTATION_FINISHED\":\n return [\n index === notifications.length - 1 ? (\n \n ) : null,\n ,\n ];\n case \"CASE_LOG_SUBMITTED\":\n case \"CASE_LOG_DENIED\":\n case \"CASE_LOG_APPROVED\":\n return [\n index === notifications.length - 1 ? (\n \n ) : null,\n ,\n ];\n case \"PERIOD_CREATED\":\n case \"PERIOD_DELETED\":\n return [\n index === notifications.length - 1 ? (\n \n ) : null,\n ,\n ];\n case \"EVALUATION_CREATED\":\n case \"EVALUATION_FINISHED\":\n case \"EVALUATION_ABOUT_FINISH\":\n case \"EVALUATION_ANSWER_SUBMITTED\":\n return [\n index === notifications.length - 1 ? (\n \n ) : null,\n ,\n ];\n case \"FILE_UPLOADED\":\n case \"FILE_EXPIRED\":\n return [\n index === notifications.length - 1 ? (\n \n ) : null,\n ,\n ];\n case \"FILE_CATEGORY_CREATED\":\n case \"FILE_CATEGORY_DELETED\":\n return [\n index === notifications.length - 1 ? (\n \n ) : null,\n ,\n ];\n case \"IMPORT_CREATED\":\n case \"IMPORT_ERROR\":\n return [\n index === notifications.length - 1 ? (\n \n ) : null,\n ,\n ];\n case \"REPORT_CREATED\":\n case \"REPORT_ERROR\":\n return [\n index === notifications.length - 1 ? (\n \n ) : null,\n ,\n ];\n default:\n return null;\n }\n })}\n {isFetchingNotifications && (\n 0 ? 0 : \"125px\", left: \"-30px\" }}\n active\n inline=\"centered\"\n size=\"large\"\n indeterminate\n className=\"m10 pl50 pr10\"\n >\n

\n Loading Notifications ...\n

\n \n )}\n
\n {/*notifications-list*/}\n \n);\n\nexport default Notifications;\n","// Features\nimport * as React from \"react\";\nimport { useSelector } from \"react-redux\";\nimport styled from \"styled-components\";\nimport { onSetDateTime, setMomentDate, setUTCtime } from \"../../../utils\";\n// Components\nimport { Divider, Header, Icon, Loader, Popup, Label } from \"semantic-ui-react\";\n// Types\nimport type { RootState } from \"../../../store/reducers\";\nimport type { State as StateBroadcastMessages } from \"../../../store/reducers/broadcastMessages\";\n// Broadcast Messages List:\n// Styled Components\nconst Wrapper = styled.p`\n color: #999999;\n cursor: pointer;\n float: left;\n min-width: 100%;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n width: 0;\n &:hover > span.wrap-content {\n color: #3765b3;\n text-decoration: underline;\n }\n`;\nconst DateTime = styled.span`\n font-size: 0.9rem;\n`;\n//\nconst BroadcastMessagesList = () => {\n // STORE - Broadcast Messages\n const { broadcastMessages = [] }: StateBroadcastMessages = useSelector(\n ({ broadcastMessages }: RootState) => broadcastMessages\n );\n // STORE TENANT SETTING - Broadcast Messages\n const { isFetching }: { isFetching: boolean } = useSelector(\n ({ tenantSettings }: RootState) => ({\n isFetching: tenantSettings.isFetchingTenantSettings,\n })\n );\n // RENDERS\n return (\n
\n \n
\n \n MESSAGES\n
\n
\n
\n {isFetching && (\n \n

\n Loading Messages ...\n

\n \n )}\n {!isFetching &&\n broadcastMessages.map(\n ({ _id, createdAt, updatedAt, message, expirationDate }, index) => {\n const expirationDateWithFormat = expirationDate\n ? setUTCtime(expirationDate).format(\"MM/DD/YY\")\n : \"--\";\n const broadcastMsgIsExpired = setMomentDate(\n expirationDateWithFormat\n ).isBefore(setMomentDate(setUTCtime().format(\"MM/DD/YY\")));\n return (\n \n \n \n \n Message\n
\n \n {message}\n
\n \n \n }\n data-popup=\"is-popup-notification\"\n id=\"broadcast-message-popup\"\n on=\"click\"\n position=\"bottom center\"\n trigger={\n \n Message:\n {message}\n \n }\n />\n
\n \n Expiration Date:\n \n \n {expirationDateWithFormat}\n {broadcastMsgIsExpired && (\n \n Expired\n \n )}\n \n \n {onSetDateTime(updatedAt || createdAt)}\n \n
\n \n \n );\n }\n )}\n \n \n );\n};\nexport default BroadcastMessagesList;\n","// Features\nimport * as React from \"react\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport styled from \"styled-components\";\nimport { BroadcastMessages } from \"../../../store/actions/\";\nimport { setMomentDate, setUTCtime } from \"../../../utils/\";\n// Components\nimport {\n Button,\n Divider,\n Header,\n Icon,\n List,\n Loader,\n Popup,\n Label,\n} from \"semantic-ui-react\";\n// Types\nimport type { PropsPresentational as PropsBroadcastSentMessage } from \"../broadcast-sent-message/BroadcastSentMessageContainer\";\nimport type { PayloadObject } from \"../../../types/common.types\";\nimport type { RootState } from \"../../../store/reducers/\";\nimport type { State as StateBroadcastMessages } from \"../../../store/reducers/broadcastMessages\";\n// Notifications Individual Action:\nconst { useState } = React;\n// Styled Components\nconst Wrapper = styled.p`\n color: #999999;\n cursor: pointer;\n float: left;\n min-width: 100%;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n width: 0;\n &:hover > span.wrap-content {\n color: #3765b3;\n text-decoration: underline;\n }\n`;\nconst ListItem = styled(List.Item)`\n color: #999999 !important;\n`;\n//\nconst BroadcastSchedulers = ({\n onLoadBroadCastMessage,\n ...props\n}: React.PropsWithChildren) => {\n const dispatch = useDispatch();\n // STORE TENANT SETTING - Broadcast Messages\n const {\n broadcastMessages,\n isFetching,\n }: {\n broadcastMessages: StateBroadcastMessages[\"broadcastMessages\"];\n isFetching: boolean;\n } = useSelector(({ tenantSettings }: RootState) => ({\n broadcastMessages:\n tenantSettings.tenantSettings[\"BROADCAST_MESSAGES\"].valuesApi,\n isFetching: tenantSettings.isFetchingTenantSettings,\n }));\n const broadcastSchedulers = broadcastMessages.filter(\n ({ expirationDate }) => !!expirationDate\n );\n // State\n const [inAction, setInAction] = useState<\"\" | \"deleteBroadcastSchedulers\">(\n \"\"\n );\n // METHODS\n const onDeleteBroadcastSchedulers = (broadcastMessageId: string) => {\n setInAction(\"deleteBroadcastSchedulers\");\n dispatch(\n BroadcastMessages.broadcastMessagesDelete({\n broadcastMessageId,\n callbackSuccess: () => {\n onLoadBroadCastMessage();\n setInAction(\"\");\n },\n callbackError: () => setInAction(\"\"),\n })\n );\n };\n const onParseArraySelected = (\n propKey: \"cohorts\" | \"institutions\" | \"programs\" | \"roles\",\n keyToSearch: \"apiName\" | \"_id\",\n arraySelected: Array = []\n ) => {\n const arrayToSearch: PayloadObject[] = props[propKey];\n let arrayToParse: PayloadObject[] = [];\n if (arraySelected.length && arrayToSearch.length) {\n arrayToParse = arraySelected.map((value) => {\n if (typeof value === \"string\") {\n return arrayToSearch.filter(\n (valueToFind) => valueToFind && valueToFind[keyToSearch] === value\n )[0];\n }\n return value;\n });\n }\n return arrayToParse;\n };\n // RENDERS\n return (\n
\n \n
\n \n SCHEDULERS\n
\n
\n
\n {isFetching && (\n \n

\n Loading Schedulers ...\n

\n \n )}\n {!isFetching &&\n broadcastSchedulers.map(\n (\n {\n _id,\n message,\n roles,\n cohorts,\n expirationDate,\n institutions,\n programs,\n },\n index\n ) => {\n const rolesSelected = onParseArraySelected(\n \"roles\",\n \"apiName\",\n roles\n );\n const programsSelected = onParseArraySelected(\n \"programs\",\n \"_id\",\n programs\n );\n const cohortsSelected = onParseArraySelected(\n \"cohorts\",\n \"_id\",\n cohorts\n );\n const institutionsSelected = onParseArraySelected(\n \"institutions\",\n \"_id\",\n institutions\n );\n const expirationDateWithFormat =\n setUTCtime(expirationDate).format(\"MM/DD/YY\");\n const broadcastMsgIsExpired = setMomentDate(\n expirationDateWithFormat\n ).isBefore(setMomentDate(setUTCtime().format(\"MM/DD/YY\")));\n return (\n \n \n \n \n Message\n
\n \n {message}\n
\n \n \n }\n data-popup=\"is-popup-notification\"\n id=\"broadcast-message-popup\"\n on=\"click\"\n position=\"bottom center\"\n trigger={\n \n Message:\n {message}\n \n }\n />\n
\n Send to:\n
\n
\n Roles:\n \n {rolesSelected.map(({ name }) => name).join(\", \")}\n \n
\n {(programsSelected?.length > 0 ||\n cohortsSelected?.length > 0) && (\n
\n \n Programs - Cohorts:\n \n \n {programsSelected.map(({ name }) => name).join(\", \")}\n {programsSelected.length > 0 && \" - \"}\n {cohortsSelected.map(({ name }) => name).join(\", \")}\n \n
\n )}\n {institutionsSelected?.length > 0 && (\n \n \n \n Clinics\n \n \n {institutionsSelected.map(\n ({ _id, name }, index) => (\n \n {name}\n \n )\n )}\n \n \n \n }\n data-popup=\"is-popup-notification\"\n id=\"broadcast-message-popup\"\n on=\"click\"\n position=\"bottom center\"\n trigger={\n \n \n Clinics:\n \n \n {institutionsSelected\n .map(({ name }) => name)\n .join(\", \")}\n \n \n }\n />\n )}\n
\n \n Expiration Date:\n \n \n {expirationDateWithFormat}\n {broadcastMsgIsExpired && (\n \n Expired\n \n )}\n \n
\n {!broadcastMsgIsExpired && (\n \n onLoadBroadCastMessage({\n _id: _id,\n cohorts: cohortsSelected.map(\n ({ _id }) => _id\n ),\n institutions: institutionsSelected.map(\n ({ _id }) => _id\n ),\n programs: programsSelected.map(\n ({ _id }) => _id\n ),\n roles: rolesSelected.map(\n ({ apiName }) => apiName\n ),\n users: [],\n expirationDate: expirationDateWithFormat,\n message,\n })\n }\n size=\"tiny\"\n />\n }\n />\n )}\n \n onLoadBroadCastMessage({\n _id: \"\",\n cohorts: cohortsSelected.map(({ _id }) => _id),\n institutions: institutionsSelected.map(\n ({ _id }) => _id\n ),\n programs: programsSelected.map(\n ({ _id }) => _id\n ),\n roles: rolesSelected.map(\n ({ apiName }) => apiName\n ),\n users: [],\n expirationDate: expirationDateWithFormat,\n message,\n })\n }\n size=\"tiny\"\n />\n }\n />\n onDeleteBroadcastSchedulers(_id)}\n >\n Confirm Delete\n \n }\n data-popup=\"is-popup-notification\"\n hoverable\n on={[\"hover\", \"click\"]}\n position=\"bottom center\"\n trigger={\n \n }\n />\n
\n
\n \n \n );\n }\n )}\n \n \n );\n};\nexport default BroadcastSchedulers;\n","// Features\nimport * as React from \"react\";\nimport classNames from \"classnames\";\nimport sortBy from \"lodash/sortBy\";\nimport { parseApiName, parseName, setUTCtimeOffset } from \"../../../utils/\";\n// Components\nimport {\n Button,\n Container,\n Divider,\n Dropdown,\n Form,\n Grid,\n Icon,\n TextArea,\n} from \"semantic-ui-react\";\n//@ts-ignore\nimport { DateTimePicker } from \"react-widgets\";\nimport BroadcastSchedulers from \"../broadcast-schedulers/BroadcastSchedulers\";\n// Types\nimport type {\n PropsPresentational,\n State,\n} from \"./BroadcastSentMessageContainer\";\ntype Props = {\n onChangeDropdown: (\n event: Event,\n {\n name: \"cohorts\" | \"institutions\" | \"programs\" | \"roles\" | \"users\",\n value: Array,\n }\n ) => void,\n onChangeInputField: (event: Object, { name: string, value: string }) => void,\n onSaveBroadcastMessage: () => void,\n} & PropsPresentational &\n State;\n// Broadcast Sent Messages & Scheduler\nclass BroadcastSentMessagePresentational extends React.Component {\n render() {\n return this.renderCreateBroadcastMessage();\n }\n renderCreateBroadcastMessage = () => {\n return (\n <>\n
\n {this.renderButtonLink()}\n {this.renderRecipients()}\n {this.renderExpirationDate()}\n {this.renderMessage()}\n {this.renderActions()}\n
\n \n \n );\n };\n renderButtonLink = () => (\n \n See all your broadcast messages\n \n );\n renderRecipients = () => {\n const {\n broadcastMessage,\n cohorts,\n institutions,\n onChangeDropdown,\n programs,\n roles,\n } = this.props;\n const {\n cohorts: cohortsSelected = [],\n institutions: institutionsSelected = [],\n programs: programsSelected = [],\n roles: rolesSelected = [],\n } = broadcastMessage;\n const canSelectProgramsAndCohorts =\n rolesSelected.indexOf(\"Students\") !== -1;\n const canSelectInstitutions =\n rolesSelected.filter(\n (role) =>\n [\"Students\", \"InstitutionAdministrators\", \"Preceptors\"].indexOf(\n role\n ) !== -1\n ).length > 0;\n let allInstitutions = [];\n if (canSelectInstitutions) {\n allInstitutions = sortBy(\n institutions.filter(({ status }) => status === \"active\"),\n [\"name\"]\n );\n }\n return (\n
\n \n \n
\n ({\n key: apiName,\n text: name,\n value: apiName,\n }))}\n value={rolesSelected}\n onChange={onChangeDropdown}\n renderLabel={(item, index, defaultLabelProps) => ({\n ...defaultLabelProps,\n content: item.text,\n })}\n />\n
\n {/*{this.renderFilterUsersRoles()}*/}\n {canSelectProgramsAndCohorts && (\n \n \n ({\n key: _id,\n text: name,\n value: _id,\n }))}\n value={programsSelected}\n onChange={onChangeDropdown}\n renderLabel={(item, index, defaultLabelProps) => ({\n ...defaultLabelProps,\n content: item.text,\n })}\n />\n \n \n ({\n key: _id,\n text: name,\n value: _id,\n }))}\n value={cohortsSelected}\n onChange={onChangeDropdown}\n renderLabel={(item, index, defaultLabelProps) => ({\n ...defaultLabelProps,\n content: item.text,\n })}\n />\n \n \n )}\n {canSelectInstitutions && (\n
\n ({\n key: _id,\n text: name,\n value: _id,\n }))}\n value={institutionsSelected}\n onChange={onChangeDropdown}\n renderLabel={(item, index, defaultLabelProps) => ({\n ...defaultLabelProps,\n content: item.text,\n })}\n />\n
\n )}\n
\n
\n );\n };\n renderFilterUsersRoles = () => {\n const {\n broadcastMessage: { users: usersSelected },\n onChangeDropdown,\n usersRoles,\n } = this.props;\n let usersRolesOptions = [];\n if (usersRoles) {\n Object.keys(usersRoles).forEach((role) => {\n if (usersRoles[role] && usersRoles[role].length > 0) {\n const section = {\n key: role,\n text: (\n \n {parseApiName(parseName(role))} ({usersRoles[role].length})\n \n ),\n disabled: true,\n style: { opacity: 1 },\n className: \"lemming\",\n };\n const usersOptions = usersRoles[role].map(\n ({ _id, firstName, lastName }, index) => ({\n key: _id,\n text: `${firstName} ${lastName}`,\n value: _id,\n })\n );\n usersRolesOptions = [...usersRolesOptions, section, ...usersOptions];\n }\n return role;\n });\n }\n return (\n
\n ({\n ...defaultLabelProps,\n content: item.text,\n })}\n value={usersSelected}\n />\n
\n );\n };\n renderExpirationDate = () => {\n const {\n broadcastMessage: { expirationDate },\n onChangeInputField,\n } = this.props;\n return (\n
\n \n \n \n \n \n onChangeInputField(new Event(\"Empty\"), {\n name: \"expirationDate\",\n value: strDate,\n })\n }\n placeholder=\"MM/DD/YY\"\n time={false}\n value={\n (expirationDate || null) &&\n new Date(setUTCtimeOffset(expirationDate).format())\n }\n />\n \n \n {expirationDate && (\n \n onChangeInputField(new Event(\"Empty\"), {\n name: \"expirationDate\",\n value: \"\",\n })\n }\n data-clear=\"is-clear-expiration-date\"\n style={{\n cursor: \"pointer\",\n position: \"relative\",\n top: \"9px\",\n right: \"105px\",\n }}\n />\n )}\n \n \n \n
\n );\n };\n renderMessage = () => {\n const {\n broadcastMessage: { message },\n onChangeInputField,\n } = this.props;\n return (\n
\n \n \n
\n \n
\n
\n
\n );\n };\n renderActions = () => {\n const {\n broadcastMessage: { _id, message, roles: rolesSelected = [] },\n errorSuccessBroadcastMessage,\n isCreatingBroadcastMessage,\n onLoadBroadCastMessage,\n onSaveBroadcastMessage,\n } = this.props;\n return (\n
\n \n {!errorSuccessBroadcastMessage\n ? \"Message Here\"\n : errorSuccessBroadcastMessage.successApi ||\n errorSuccessBroadcastMessage.errorApi}\n
\n onLoadBroadCastMessage()}\n >\n Cancel\n \n \n {_id ? \"Save\" : \"Send\"}\n \n \n );\n };\n}\n\nexport default BroadcastSentMessagePresentational;\n","// Features\nimport * as React from \"react\";\nimport { connect } from \"react-redux\";\nimport { push } from \"connected-react-router\";\nimport { BroadcastMessages, Users } from \"../../../store/actions/\";\nimport { setUTCtime, setUTCtime235959 } from \"../../../utils/\";\n// Components\nimport BroadcastSentMessagePresentational from \"./BroadcastSentMessagePresentational\";\n// Styles\nimport \"./BroadcastSentMessage.scss\";\n// Types\nexport type State = {\n broadcastMessage: {\n _id: string,\n cohorts: Array,\n institutions: Array,\n programs: Array,\n roles: Array,\n users: Array,\n expirationDate: string,\n message: string,\n },\n errorSuccessBroadcastMessage: ?Object,\n isCreatingBroadcastMessage: boolean,\n};\ntype PropsContainer = {\n canFetchAllUsers: boolean,\n createBroadcastMessage: (payload: Object) => void,\n editBroadcastMessage: (payload: Object) => void,\n getUsers: () => void,\n};\nexport type PropsPresentational = {\n cohorts: Array,\n goToBroadcastSettings: () => void,\n institutions: Array,\n programs: Array,\n roles: Array,\n usersRoles: ?{ [string]: Array },\n onLoadBroadCastMessage: (\n broadcastMessage?: State[\"broadcastMessage\"]\n ) => void,\n};\ntype Props = PropsContainer & PropsPresentational;\n// Sent Broadcast Messages\nclass BroadcastSentMessageContainer extends React.Component {\n state = {\n broadcastMessage:\n BroadcastSentMessageContainer._onInitialStateBroadcastMessage(),\n errorSuccessBroadcastMessage: null,\n isCreatingBroadcastMessage: false,\n };\n static _onInitialStateBroadcastMessage = () => ({\n _id: \"\",\n cohorts: [],\n institutions: [],\n programs: [],\n roles: [],\n users: [],\n expirationDate: \"\",\n message: \"\",\n });\n componentDidMount() {\n const { canFetchAllUsers, getUsers } = this.props;\n if (canFetchAllUsers) {\n getUsers();\n }\n }\n // {\n this.setState({\n isCreatingBroadcastMessage: true,\n errorSuccessBroadcastMessage: null,\n });\n const onEndCallback = () => {\n this.setState({\n isCreatingBroadcastMessage: false,\n });\n };\n this._onSavingBroadcastMessage().then(onEndCallback).catch(onEndCallback);\n };\n _onSavingBroadcastMessage = () => {\n const {\n _id: broadcastMessageId,\n cohorts,\n institutions,\n programs,\n roles,\n users,\n expirationDate,\n message,\n } = this.state.broadcastMessage;\n const { createBroadcastMessage, editBroadcastMessage } = this.props;\n return new Promise((resolve, reject) => {\n let body = {\n message,\n roles,\n };\n if (users.length > 0) {\n body = {\n ...body,\n users,\n };\n }\n if (programs.length > 0 && roles.indexOf(\"Students\") !== -1) {\n body = {\n ...body,\n programs,\n };\n }\n if (cohorts.length > 0 && roles.indexOf(\"Students\") !== -1) {\n body = {\n ...body,\n cohorts,\n };\n }\n if (\n institutions.length > 0 &&\n roles.filter(\n (role) =>\n [\"Students\", \"InstitutionAdministrators\", \"Preceptors\"].indexOf(\n role\n ) !== -1\n )\n ) {\n body = {\n ...body,\n institutions,\n };\n }\n if (expirationDate) {\n body = {\n ...body,\n expirationDate: setUTCtime235959(expirationDate).format(),\n };\n }\n const formValues = {\n broadcastMessageId,\n body,\n };\n const callbacks = {\n callbackError: (errorSuccessBroadcastMessage) => {\n window.logger.log(\n \"error - _onSavingBroadcastMessage\",\n errorSuccessBroadcastMessage\n );\n let parseError = errorSuccessBroadcastMessage;\n if (parseError === \"Request failed with status code 500\") {\n parseError = `Looks like something went wrong when ${\n broadcastMessageId ? \"saving\" : \"sending\"\n } a new broadcast message. Try again, please.`;\n }\n this.setState({\n errorSuccessBroadcastMessage: {\n successApi: null,\n errorApi: parseError,\n },\n });\n reject();\n },\n callbackSuccess: () => {\n this.setState({\n broadcastMessage:\n BroadcastSentMessageContainer._onInitialStateBroadcastMessage(),\n errorSuccessBroadcastMessage: {\n successApi: \"Submit Message sent successfully.\",\n errorApi: null,\n },\n });\n setTimeout(() => {\n this.setState({\n errorSuccessBroadcastMessage: null,\n });\n }, 5000);\n resolve();\n },\n };\n const payload = Object.assign({}, formValues, callbacks);\n if (broadcastMessageId) {\n editBroadcastMessage(payload);\n } else {\n createBroadcastMessage(payload);\n }\n });\n };\n onLoadBroadCastMessage = (broadcastMessage?: State[\"broadcastMessage\"]) =>\n this.setState({\n broadcastMessage:\n broadcastMessage ||\n BroadcastSentMessageContainer._onInitialStateBroadcastMessage(),\n errorSuccessBroadcastMessage: null,\n });\n onChangeDropdown = (\n event: Event,\n {\n name,\n value,\n }: {\n name: \"cohorts\" | \"institutions\" | \"programs\" | \"roles\" | \"users\",\n value: Array,\n }\n ) => {\n this.setState({\n broadcastMessage: { ...this.state.broadcastMessage, [name]: value },\n });\n };\n onChangeInputField = (\n event: Object,\n { name, value }: { name: string, value: string }\n ) => {\n this.setState({\n broadcastMessage: { ...this.state.broadcastMessage, [name]: value },\n });\n };\n // END />\n render() {\n const {\n goToBroadcastSettings,\n cohorts,\n institutions,\n programs,\n roles,\n usersRoles,\n } = this.props;\n return (\n \n );\n }\n}\n\nexport default connect(\n ({\n accessControl: { roles },\n cohorts: { cohorts },\n institutions: { institutions },\n programs: { programs },\n users: { allUsersSystem, lastFetchingAllUsersSystem },\n }) => ({\n canFetchAllUsers: lastFetchingAllUsersSystem\n ? setUTCtime().isAfter(\n setUTCtime(lastFetchingAllUsersSystem).add(30, \"m\")\n )\n : true,\n cohorts,\n institutions,\n programs,\n roles: roles.filter(\n ({ isActive, apiName }) => isActive && apiName !== \"Alumnis\"\n ),\n usersRoles: allUsersSystem,\n }),\n (dispatch) => ({\n createBroadcastMessage: (payload) =>\n dispatch(BroadcastMessages.broadcastMessagesCreate(payload)),\n editBroadcastMessage: (payload) =>\n dispatch(BroadcastMessages.broadcastMessagesEdit(payload)),\n getUsers: () => dispatch(Users.usersFetchAll({ status: [\"active\"] })),\n goToBroadcastSettings: () =>\n dispatch(\n push({\n pathname: \"/admin/broadcast-settings\",\n state: {\n namePage: \"Admin Portal\",\n },\n })\n ),\n })\n)(BroadcastSentMessageContainer);\n","// Features\nimport * as React from \"react\";\n// Components\nimport { Icon, Popup, Tab } from \"semantic-ui-react\";\nimport BroadcastMessagesList from \"./broadcast-messages-list/BroadcastMessagesList\";\nimport BroadcastSentMessage from \"./broadcast-sent-message/BroadcastSentMessageContainer\";\n// Broadcast Messages:\nconst { useState } = React;\n//\nconst BroadcastMessages = ({\n canCreateNewBroadcastMessages,\n ...props\n}: React.PropsWithChildren) => {\n // State\n const [showSendBroadCastMessages, setShowSendBroadCastMessages] =\n useState(false);\n // RENDER\n const renderPaneHeader = () => (\n
\n

\n {showSendBroadCastMessages && \"Send \"}Broadcast Message\n {!showSendBroadCastMessages && \"s\"}\n {canCreateNewBroadcastMessages && (\n \n setShowSendBroadCastMessages(!showSendBroadCastMessages)\n }\n style={\n showSendBroadCastMessages ? undefined : { bottom: \"-1px\" }\n }\n name={\n showSendBroadCastMessages\n ? \"arrow alternate circle left\"\n : \"plus circle\"\n }\n />\n }\n />\n )}\n

\n
\n {showSendBroadCastMessages\n ? \"Keep your users informed with broadcast messages\"\n : \"Keep informed with the broadcast messages\"}\n
\n
\n );\n return (\n \n \n {renderPaneHeader()}\n {!showSendBroadCastMessages && }\n {showSendBroadCastMessages && }\n \n );\n};\nexport default BroadcastMessages;\n","// @flow\nimport * as React from \"react\";\nimport classNames from \"classnames\";\nimport { Dimmer, Menu, Tab } from \"semantic-ui-react\";\nimport Notifications from \"./components/Notifications\";\nimport Broadcast from \"../broadcast/Broadcast\";\nimport {\n onCheckReadRolesPermissions,\n onCheckReadTenantSettingsPermissions,\n onCheckCreateTenantSettingsPermissions,\n} from \"../admin-portal/AdminPortalPermissions\";\n\ntype Props = {\n authPermissions: Object,\n activeNotifications: boolean,\n unseenNotifications: number,\n notifications: {\n all: Array,\n notifications: Array,\n reminders: Array,\n isFetchingNotifications: boolean,\n },\n initializeNotifications: Function,\n setImg: (_img: string, updatedAt: string) => string,\n goTo: (pathname: string, state: Object) => void,\n getMoreNotifications: (lastNotificationId: string) => () => void,\n};\n\nclass NotificationsPresentational extends React.Component {\n renderPanes = () => {\n const {\n authPermissions,\n /*unseenNotifications,*/ notifications,\n setImg,\n goTo,\n getMoreNotifications,\n } = this.props;\n const notificationsPane = {\n menuItem: (\n \n \n \n ),\n render: () => (\n \n ),\n },\n broadcastMessagesPane = {\n menuItem: (\n \n \n \n ),\n render: () => (\n \n ),\n };\n return [notificationsPane, broadcastMessagesPane];\n };\n render() {\n const { activeNotifications, initializeNotifications } = this.props;\n return (\n <>\n \n {/*
*/}\n \n
\n \n \n );\n }\n}\n\nexport default NotificationsPresentational;\n","// @flow\nimport * as React from \"react\";\nimport { connect } from \"react-redux\";\nimport { push } from \"connected-react-router\";\nimport { Notifications } from \"../../store/actions/\";\nimport NotificationsPresentational from \"./NotificationsPresentational\";\n// Styles\nimport \"./Notifications.scss\";\n\ntype Props = {\n authPermissions: Object,\n activeNotifications: boolean,\n notifications: {\n all: Array,\n notifications: Array,\n reminders: Array,\n isFetchingNotifications: boolean,\n },\n totalNotifications: number,\n unseenNotifications: number,\n setImg: (_img: string, updatedAt: string) => string,\n getNotifications: (payload: Object) => void,\n updateLastSeenNotification: (payload: Object) => void,\n onCloseNotifications: () => void,\n goTo: (pathname: string, state: Object) => void,\n};\n\nclass NotificationsContainer extends React.Component {\n notificationsRef = null;\n onSeeAllNotifications = (lastNotificationId: ?string) => {\n const {\n notifications: { all },\n unseenNotifications,\n updateLastSeenNotification,\n } = this.props;\n if (all.length && unseenNotifications > 0) {\n let notificationId = lastNotificationId;\n if (!notificationId) {\n notificationId = all[all.length - 1]._id;\n }\n updateLastSeenNotification({\n notificationId,\n body: {\n notification: notificationId,\n },\n });\n }\n };\n onGettingMoreNotifications = (skip: number) => {\n const { getNotifications } = this.props;\n return new Promise((resolve, reject) => {\n const formValues = {\n skip,\n };\n const callbacks = {\n callbackError: (error) => {\n window.logger.log(\"error - onGettingMoreNotifications\", error);\n reject();\n },\n callbackSuccess: () => {\n resolve();\n },\n };\n const payload = Object.assign({}, formValues, callbacks);\n getNotifications(payload);\n });\n };\n onGetMoreNotifications = (lastNotificationId: string) => () => {\n const {\n notifications: {\n all: { length: loadedNotifications },\n },\n totalNotifications,\n } = this.props;\n if (totalNotifications > loadedNotifications) {\n this.onSeeAllNotifications(lastNotificationId);\n this.onGettingMoreNotifications(loadedNotifications).catch((error) => {\n window.logger.log(\"onGetMoreNotifications\", error);\n });\n } else {\n this.onSeeAllNotifications(lastNotificationId);\n }\n };\n handleOutsideClick = (event: Object) => {\n // ignore clicks on the component itself\n if (\n (event?.target?.dataset?.icono !== \"is-icono-close\" &&\n this.notificationsRef &&\n this.notificationsRef.contains(event.target)) ||\n event?.target?.firstElementChild?.dataset?.popup ===\n \"is-popup-notification\" ||\n event?.target?.dataset?.popup === \"is-popup-notification\" ||\n event?.target?.dataset?.btn === \"is-popup-notification\" ||\n event?.target?.dataset?.clear === \"is-clear-expiration-date\"\n ) {\n return;\n }\n const { onCloseNotifications } = this.props;\n onCloseNotifications();\n document.removeEventListener(\"click\", this.handleOutsideClick, false);\n };\n onInitNotifications = (notificationsRef: Object) => {\n this.notificationsRef = notificationsRef;\n };\n getSnapshotBeforeUpdate(prevProps: Props, prevState: any) {\n const { activeNotifications: activeNotificationsOld } = prevProps;\n const { activeNotifications: activeNotificationsNew } = this.props;\n if (\n activeNotificationsOld !== activeNotificationsNew &&\n activeNotificationsNew\n ) {\n return activeNotificationsNew;\n }\n return null;\n }\n componentDidUpdate(\n prevProps: Props,\n prevState: any,\n activeNotificationsNew: any\n ) {\n if (activeNotificationsNew) {\n this.onSeeAllNotifications();\n document.addEventListener(\"click\", this.handleOutsideClick, false);\n }\n }\n render() {\n const { activeNotifications } = this.props;\n if (activeNotifications) {\n return (\n \n );\n }\n return null;\n }\n}\n\nconst bindActions = (dispatch, ownProps) => {\n return {\n getNotifications: (payload) =>\n dispatch(Notifications.notificationsFetchNotifications(payload)),\n updateLastSeenNotification: (payload) =>\n dispatch(Notifications.notificationsLastSeenNotification(payload)),\n goTo: (pathname: string, state: Object) => () => {\n ownProps.onCloseNotifications();\n dispatch(\n push({\n pathname,\n state,\n })\n );\n },\n };\n};\n\nexport default connect(\n ({ auth: { role } }) => ({\n authPermissions: role.permissions,\n }),\n bindActions\n)(NotificationsContainer);\n","// @flow\nimport * as React from 'react';\nimport { Modal } from 'semantic-ui-react';\nimport UserManagerFilters from '../../user-manager/UserManagerFilters';\n\ntype Props = {\n isModalOpen: boolean,\n onOpenClose: Function\n};\nconst SubMenu = ({ isModalOpen, onOpenClose }: Props): React$Element => (\n
\n \n }\n className=\"seriously-fullscreen filters\"\n dimmer={false}\n size={'fullscreen'}\n closeIcon\n >\n \n \n \n \n
\n);\n\nexport default SubMenu;\n","// @flow\nimport * as React from \"react\";\nimport classNames from \"classnames\";\nimport { Dropdown, Icon, Image, Label, Menu } from \"semantic-ui-react\";\nimport MenuTutorial from \"./components/MenuTutorial\";\nimport NotificationsContainer from \"../notifications/NotificationsContainer\";\nimport SubMenu from \"./components/SubMenu\";\nimport iconUserEmpty from \"../../images/iconUserEmpty.svg\";\nimport iconCompanyEmpty from \"../../images/iconCompanyEmpty.svg\";\nimport iconInstitutionEmpty from \"../../images/iconInstitutionEmpty.svg\";\n\ntype Props = {\n role: Object,\n user: ?Object,\n myCompany: ?Object,\n myInstitution: ?Object,\n MyPayments: ?React.ComponentType,\n namePage: string,\n activePath: string,\n activeNotifications: boolean,\n isModalOpen: boolean,\n showSidebarMenu: boolean,\n notifications: Array,\n totalNotifications: number,\n unseenNotifications: number,\n onOpenFeedbackForm: () => void,\n setImg: (_img: string, updatedAt: string) => string,\n onChangeMenu: Function,\n onOpenCloseNotifications: (isClose: ?boolean) => () => void,\n onShowMenu: Function,\n onOpenCloseSubMenu: Function,\n goTo: (location: Object) => () => void,\n goBack: Function,\n onCheckPermissions: (resource: string) => ?string,\n};\nclass MenuPresentational extends React.Component {\n _onCheckActiveMenu = (\n path:\n | \"/home\"\n | \"/manager\"\n | \"/clinics\"\n | \"/rotations\"\n | \"/case-logs\"\n | \"/evaluations\"\n | \"/reports\"\n | \"/reports/dashboard/queries\"\n ) => {\n const { activePath } = this.props;\n if (path === \"/manager\" && activePath.indexOf(\"manager\") > -1) {\n return true;\n } else if (path === activePath) {\n return true;\n }\n return false;\n };\n onErrorCompanyImage = (event: Object) => {\n event.target.src = iconCompanyEmpty;\n event.target.classList.remove(\"small\");\n };\n onErrorInstitutionImage = (event: Object) => {\n event.target.src = iconInstitutionEmpty;\n event.target.classList.remove(\"small\");\n };\n onErrorUserImage = (event: Object) => {\n event.target.src = iconUserEmpty;\n //event.target.classList.remove('small');\n };\n // RENDERS:\n render() {\n const {\n namePage,\n isModalOpen,\n showSidebarMenu,\n onShowMenu,\n onOpenCloseSubMenu,\n goBack,\n } = this.props;\n return (\n
\n
\n
\n {!isModalOpen && (\n onShowMenu()}\n />\n )}\n
\n
{namePage}
\n {namePage && namePage === \"Manager\" && (\n \n )}\n {namePage &&\n (namePage.indexOf(\"Invitations\") > -1 ||\n namePage.indexOf(\"Profile\") > -1 ||\n namePage.indexOf(\"My School\") > -1 ||\n namePage.indexOf(\"My Clinic\") > -1 ||\n namePage.indexOf(\"Documents\") > -1) && (\n
\n \n
\n )}\n
\n \n {this.renderMenu()}\n {this.renderSubMenuProfile()}\n
\n \n \n );\n }\n renderMenu = () => {\n const {\n activeNotifications,\n onChangeMenu,\n onOpenCloseNotifications,\n notifications,\n totalNotifications,\n unseenNotifications,\n setImg,\n onCheckPermissions,\n } = this.props;\n const menusHead = [{ path: \"/home\", icon: \"house\" }];\n let menusTail = [];\n if (onCheckPermissions(\"Notifications\")) {\n menusTail.push({ path: \"/notifications\", icon: \"bell\" });\n }\n if (onCheckPermissions(\"UserManager\")) {\n menusTail.push({ path: \"/manager\", icon: \"circles\" });\n }\n if (onCheckPermissions(\"Institutions\")) {\n menusTail.push({ path: \"/clinics\", icon: \"building\" });\n }\n if (onCheckPermissions(\"Rotations\")) {\n menusTail.push({ path: \"/rotations\", icon: \"calendar\" });\n }\n if (onCheckPermissions(\"CaseLogs\")) {\n menusTail.push({ path: \"/case-logs\", icon: \"clipboard\" });\n }\n if (onCheckPermissions(\"Evaluations\")) {\n menusTail.push({ path: onCheckPermissions(\"Evaluations\"), icon: \"file\" });\n }\n if (onCheckPermissions(\"Reports\")) {\n menusTail.push({\n path: onCheckPermissions(\"Reports\"),\n icon: \"statistics\",\n });\n }\n let menus = [...menusHead, ...menusTail];\n return (\n \n {menus.map(({ path, icon }) => (\n \n \n {path === \"/notifications\" && (\n \n {unseenNotifications > 0 && (\n \n {unseenNotifications > 99 ? \"+99\" : unseenNotifications}\n \n )}\n \n \n )}\n \n ))}\n \n );\n };\n renderSubMenuProfile = () => {\n const { MyPayments, user, setImg, onCheckPermissions, goTo } = this.props;\n const hasPortfolio = onCheckPermissions(\"MyPortfolio\") && true;\n const pathAdmin = onCheckPermissions(\"Admin\");\n return (\n \n \n {this.renderSubMenuMyProfile()}\n {onCheckPermissions(\"MySchool\") &&\n user &&\n user.company &&\n this.renderSubmenuSchool()}\n {onCheckPermissions(\"MyClinic\") &&\n user &&\n (user.institution || user.activeRotation) &&\n this.renderSubmenuClinic()}\n {hasPortfolio && this.renderSubmenuMyPortfolio()}\n {MyPayments && }\n {this.renderSubmenuMySettings()}\n {pathAdmin && this.renderSubmenuAdminPortal(pathAdmin)}\n {this.renderSubmenuChangePassword()}\n {this.renderSubmenuFeedbackForm()}\n \n \n }\n onClick={goTo({\n pathname: `/signout`,\n state: {\n namePage: \"Sign Out\",\n },\n })}\n text=\"Sign Out\"\n />\n \n \n );\n };\n renderSubMenuMyProfile = () => {\n const { user, setImg, goTo } = this.props;\n return (\n \n {this.renderImage(\n \"user-logged-in\",\n user && user.profileImageOriginal\n ? setImg(user.profileImageOriginal, user.updatedAt)\n : iconUserEmpty,\n user ? `${user.firstName} ${user.lastName}` : \"user avatar\",\n user ? `${user.firstName} ${user.lastName}` : \"user avatar\",\n true /*user && user.profileImageOriginal ? true : false,*/,\n this.onErrorUserImage\n )}{\" \"}\n My Profile\n \n );\n };\n renderSubmenuSchool = () => {\n const { myCompany, setImg, goTo } = this.props;\n return (\n \n \n \n {this.renderImage(\n \"company\",\n myCompany && myCompany.logo\n ? setImg(myCompany.logo, myCompany.updatedAt)\n : iconCompanyEmpty,\n \"icon school avatar\",\n \"sub-menu-school\",\n myCompany && myCompany.logo ? true : false,\n this.onErrorCompanyImage\n )}\n My School\n \n \n );\n };\n renderSubmenuClinic = () => {\n const { myInstitution, setImg, goTo } = this.props;\n return (\n \n \n \n {this.renderImage(\n \"institution\",\n myInstitution && myInstitution.logo\n ? setImg(myInstitution.logo, myInstitution.updatedAt)\n : iconInstitutionEmpty,\n \"icon clinic avatar\",\n \"sub-menu-clinic\",\n myInstitution && myInstitution.logo ? true : false,\n this.onErrorInstitutionImage\n )}\n My Clinic\n \n \n );\n };\n renderImage = (\n type: \"user-logged-in\" | \"company\" | \"institution\",\n src: any,\n alt: string,\n title: string,\n small: boolean,\n onError: (event: Object) => void\n ) => {\n return (\n \n );\n };\n renderSubmenuMyPortfolio = () => {\n const { goTo } = this.props;\n return (\n \n \n }\n onClick={goTo({\n pathname: `/my-profile/portfolio`,\n state: {\n namePage: \"My Portfolio\",\n },\n })}\n text=\"My Portfolio\"\n />\n \n );\n };\n renderSubmenuMySettings = () => {\n const { goTo } = this.props;\n return (\n \n \n }\n onClick={goTo({\n pathname: `/account-settings/general`,\n state: {\n namePage: \"My Settings\",\n },\n })}\n text=\"My Settings\"\n />\n \n );\n };\n renderSubmenuAdminPortal = (pathAdmin: string) => {\n const { goTo } = this.props;\n return (\n \n \n \n \n \n \n }\n onClick={goTo({\n pathname: pathAdmin,\n state: {\n namePage: \"Admin Portal\",\n },\n })}\n text=\"Admin\"\n />\n \n );\n };\n renderSubmenuChangePassword = () => {\n const { goTo } = this.props;\n return (\n \n \n }\n onClick={goTo({\n pathname: `/my-profile/change-password`,\n state: {\n namePage: \"My Profile\",\n },\n })}\n text=\"Change Password\"\n />\n \n );\n };\n renderSubmenuFeedbackForm = () => {\n const { onOpenFeedbackForm } = this.props;\n return (\n \n \n }\n onClick={onOpenFeedbackForm}\n text=\"Feedback\"\n />\n \n );\n };\n}\n\nexport default MenuPresentational;\n","import * as React from \"react\";\nimport { withRouter } from \"react-router-dom\";\nimport { connect } from \"react-redux\";\nimport { onCheckNotificationsPermissions } from \"../notifications/NotificationsPermissions\";\nimport {\n onCheckUsersManagerPermissions,\n onCheckUserInvitationsManagerPermissions,\n} from \"../manager/ManagerPermissions\";\nimport { onCheckImportDataPermissions } from \"../import/ImportDataPermissions\";\nimport {\n onCheckInstitutionsPermissions,\n onCheckReadMyInstitutionsPermissions,\n} from \"../institutions/InstitutionsPermissions\";\nimport {\n onCheckRotationsPermissions,\n onCheckReadPeriodsPermissions,\n onCheckCUDPeriodsPermissions,\n} from \"../rotations/RotationsPermissions\";\nimport { onCheckCaseLogsPermissions } from \"../case-logs/CaseLogsPermissions\";\nimport { onCheckEvaluationsPermissions } from \"../evaluations/EvaluationsPermissions\";\nimport { onCheckEvaluationSchedulersPermissions } from \"../evaluations-schedulers/EvaluationSchedulersPermissions\";\nimport { onCheckEvaluationTemplatesPermissions } from \"../evaluations-templates/EvaluationTemplatesPermissions\";\nimport {\n onCheckReadChartsPermissions,\n onCheckReadQueriesPermissions,\n onCheckReadAllReportsPermissions,\n} from \"../reports/ReportsPermissions\";\nimport { onCheckReadMyCompaniesPermissions } from \"../company/CompaniesPermissions\";\nimport {\n onCheckReadProgramsPermissions,\n onCheckCUDProgramsPermissions,\n onCheckReadCohortsPermissions,\n onCheckCUDCohortsPermissions,\n onCheckReadFileCategoriesPermissions,\n onCheckCUDFileCategoriesPermissions,\n onCheckReadCustomFieldsPermissions,\n onCheckCUDCustomFieldsPermissions,\n onCheckReadRolesPermissions,\n onCheckCUDRolesPermissions,\n onCheckReadTenantSettingsPermissions,\n onCheckCUDTenantSettingsPermissions,\n onCheckEditTenantSettingsPermissions,\n} from \"../admin-portal/AdminPortalPermissions\";\nimport { FeedbackForm } from \"../../store/actions/\";\nimport MenuPresentational from \"./MenuPresentational\";\nimport \"./Menu.scss\";\n\ntype Props = {\n showMenu: boolean;\n location: object;\n routerBeforeTransitions: object;\n routerManagerLoaded: object;\n user: object;\n myCompany: object | undefined | null;\n myInstitution: object | undefined | null;\n role: object;\n notifications: Array;\n totalNotifications: number;\n unseenNotifications: number;\n openFeedbackForm: () => void;\n setImg: (_img: string, updatedAt: string) => string;\n history: any;\n};\ntype State = {\n activeNotifications: boolean;\n isModalOpen: boolean;\n MyPayments: React.ComponentType | undefined | null;\n showSidebarMenu: boolean;\n};\n\nclass MenuContainer extends React.Component {\n state = {\n activeNotifications: false,\n isModalOpen: false,\n MyPayments: null,\n showSidebarMenu: true,\n };\n _loadingMyPayments = async (authRoleType: string | undefined | null) => {\n const { MyPayments } = this.state;\n window.logger.log(\"loading Component MyPayments\", authRoleType);\n if (!MyPayments && authRoleType === \"alumnis\") {\n let MyPayments = await import(`../shared/Payments`);\n MyPayments = MyPayments.default;\n this.setState({\n MyPayments,\n });\n }\n };\n static menus = {\n \"/home\": {\n to: {\n pathname: \"/home\",\n state: { namePage: \"Dashboard\" },\n },\n },\n \"/manager\": {\n to: {\n pathname: \"/manager\",\n state: { namePage: \"Manager\" },\n },\n },\n \"/clinics\": {\n to: {\n pathname: \"/clinics\",\n state: { namePage: \"Clinics\" },\n },\n },\n \"/rotations\": {\n to: {\n pathname: \"/rotations\",\n state: { namePage: \"Rotations\" },\n },\n },\n \"/case-logs\": {\n to: {\n pathname: \"/case-logs\",\n state: { namePage: \"Case Logs List\" },\n },\n },\n \"/evaluations\": {\n to: {\n pathname: \"/evaluations\",\n state: { namePage: \"Evaluations\" },\n },\n },\n \"/reports\": {\n to: {\n pathname: \"/reports\",\n state: { namePage: \"Dashboard\" },\n },\n },\n \"/my-school\": {\n to: {\n pathname: \"/my-school\",\n state: { namePage: \"My School\" },\n },\n },\n \"/my-clinic\": {\n to: {\n pathname: \"/my-clinic\",\n state: { namePage: \"My Clinic\" },\n },\n },\n };\n onCheckManagerPermissions = (permissions: Object): boolean => {\n return (\n onCheckUsersManagerPermissions(permissions) ||\n onCheckUserInvitationsManagerPermissions(permissions) ||\n onCheckImportDataPermissions(permissions)\n );\n };\n onCheckPermissions = (resource: string): string | undefined | null => {\n const {\n user,\n role: { permissions, type },\n } = this.props;\n switch (resource) {\n case \"UserManager\":\n if (this.onCheckManagerPermissions(permissions)) {\n return \"/manager\";\n }\n break;\n case \"Notifications\":\n if (onCheckNotificationsPermissions(permissions)) {\n return \"/notifications\";\n }\n break;\n case \"Institutions\":\n if (onCheckInstitutionsPermissions(permissions)) {\n return \"/clinics\";\n }\n break;\n case \"Rotations\":\n if (\n onCheckRotationsPermissions(permissions) ||\n onCheckImportDataPermissions(permissions)\n ) {\n return \"/rotations\";\n }\n break;\n case \"CaseLogs\":\n if (onCheckCaseLogsPermissions(permissions)) {\n return \"/case-logs\";\n }\n break;\n case \"Evaluations\":\n if (\n onCheckEvaluationsPermissions(permissions) ||\n onCheckEvaluationSchedulersPermissions(permissions) ||\n onCheckEvaluationTemplatesPermissions(permissions)\n ) {\n return \"/evaluations\";\n }\n break;\n case \"Reports\":\n if (onCheckReadAllReportsPermissions(permissions)) {\n return \"/reports\";\n } else if (onCheckReadChartsPermissions(permissions)) {\n delete MenuContainer.menus[\"/reports\"];\n MenuContainer.menus = {\n ...MenuContainer.menus,\n \"/reports/dashboard\": {\n to: {\n pathname: \"/reports/dashboard\",\n state: { namePage: \"Dashboard\" },\n },\n },\n };\n return \"/reports/dashboard\";\n } else if (onCheckReadQueriesPermissions(permissions)) {\n delete MenuContainer.menus[\"/reports\"];\n MenuContainer.menus = {\n ...MenuContainer.menus,\n \"/reports/dashboard/queries\": {\n to: {\n pathname: \"/reports/dashboard/queries\",\n state: { namePage: \"Queries\" },\n },\n },\n };\n return \"/reports/dashboard/queries\";\n }\n break;\n case \"MyPortfolio\":\n if (type === \"students\" || type === \"alumnis\") {\n return \"/my-profile/portfolio\";\n }\n break;\n case \"MySchool\":\n if (onCheckReadMyCompaniesPermissions(permissions)) {\n return \"/my-school\";\n }\n break;\n case \"MyClinic\":\n if (\n onCheckReadMyInstitutionsPermissions(permissions) &&\n (user.institution || user.activeRotation)\n ) {\n return \"/my-clinic\";\n }\n break;\n case \"Admin\":\n if (\n type === \"supercompanyadministrators\" &&\n onCheckReadTenantSettingsPermissions(permissions)\n ) {\n return \"/admin/general-settings\";\n } else if (\n (onCheckReadProgramsPermissions(permissions) &&\n onCheckCUDProgramsPermissions(permissions)) ||\n (onCheckReadCohortsPermissions(permissions) &&\n onCheckCUDCohortsPermissions(permissions))\n ) {\n return \"/admin/programs-cohorts\";\n } else if (\n onCheckReadFileCategoriesPermissions(permissions) &&\n onCheckCUDFileCategoriesPermissions(permissions)\n ) {\n return \"/admin/document-settings\";\n } else if (\n onCheckReadCustomFieldsPermissions(permissions) &&\n onCheckCUDCustomFieldsPermissions(permissions)\n ) {\n return \"/admin/custom-fields\";\n } else if (\n onCheckReadRolesPermissions(permissions) &&\n onCheckCUDRolesPermissions(permissions)\n ) {\n return \"/admin/access-control\";\n } else if (\n onCheckReadTenantSettingsPermissions(permissions) &&\n onCheckCUDTenantSettingsPermissions(permissions)\n ) {\n return \"/admin/case-logs-settings\";\n } else if (\n onCheckReadPeriodsPermissions(permissions) &&\n onCheckCUDPeriodsPermissions(permissions)\n ) {\n return \"/admin/rotations-settings\";\n } else if (\n onCheckReadRolesPermissions(permissions) &&\n onCheckReadTenantSettingsPermissions(permissions) &&\n onCheckEditTenantSettingsPermissions(permissions)\n ) {\n return \"/admin/broadcast-settings\";\n }\n break;\n default:\n }\n return \"\";\n };\n onChangeMenu = (ev: Event, { path }: { path: string }) => {\n if (this.state.activeNotifications) {\n this.onOpenCloseNotifications()();\n }\n const { location, history } = this.props;\n if (\n path === \"/manager\" &&\n location &&\n location.pathname &&\n location.pathname.indexOf(\"manager\") > -1\n ) {\n const { routerBeforeTransitions } = this.props;\n history.push(routerBeforeTransitions);\n } else if (\n location &&\n location.pathname !== path &&\n MenuContainer.menus[path].to\n ) {\n const { routerManagerLoaded } = this.props;\n if (path === \"/manager\") {\n history.push(routerManagerLoaded);\n } else {\n history.push(MenuContainer.menus[path].to);\n }\n }\n };\n onGoTo = (location: Object) => () => {\n const { history } = this.props;\n if (this.state.activeNotifications) {\n this.onOpenCloseNotifications()();\n }\n history.push(location);\n };\n toggleSidebarVisibility = () => {\n this.setState({ showSidebarMenu: !this.state.showSidebarMenu });\n };\n onOpenCloseSubMenu = () =>\n this.setState({ isModalOpen: !this.state.isModalOpen });\n onOpenCloseNotifications =\n (isClose: boolean = false) =>\n (ev?: Event) => {\n ev?.stopPropagation();\n this.setState({\n activeNotifications: isClose ? false : !this.state.activeNotifications,\n });\n };\n componentDidMount() {\n const { role } = this.props;\n this._loadingMyPayments(role && role.type);\n }\n getSnapshotBeforeUpdate(prevProps: Props, prevState: State) {\n const { showMenu: showMenuOld } = prevProps;\n const { showMenu: showMenuNew } = this.props;\n if (showMenuOld !== showMenuNew && showMenuNew) {\n return showMenuNew;\n }\n return null;\n }\n componentDidUpdate(prevProps: Props, prevState: State, showMenu: boolean) {\n if (showMenu) {\n const { role } = this.props;\n this._loadingMyPayments(role && role.type);\n }\n }\n render() {\n window.logger.log(\"menu\", this.props, this.state);\n let namePage = \"Heto\";\n const {\n history,\n location,\n myCompany,\n myInstitution,\n notifications,\n openFeedbackForm,\n role,\n setImg,\n showMenu,\n totalNotifications,\n unseenNotifications,\n user,\n } = this.props;\n const { activeNotifications, isModalOpen, MyPayments, showSidebarMenu } =\n this.state;\n if (location.state && location.state.namePage) {\n namePage = location.state.namePage;\n if (namePage === \"Profile\" && location.state.role) {\n namePage = `${location.state.role.name} ${namePage}`;\n }\n }\n return showMenu ? (\n \n ) : null;\n }\n}\n\nconst bindActions = (dispatch) => {\n return {\n openFeedbackForm: (payload) =>\n dispatch(FeedbackForm.feedbackFormOpenClose()),\n };\n};\nconst Menu: React.ComponentType = withRouter(\n connect(\n ({\n routerBeforeTransitions,\n routerManager: { loaded },\n config: { companyDomain, baseImg },\n auth: {\n isAuthenticated,\n user,\n role,\n myInstitution: { data: myInstitution },\n },\n company: { myCompany },\n notifications: { totalNotifications, notifications, unseenNotifications },\n }) => {\n return {\n showMenu: companyDomain.length > 0 && isAuthenticated ? true : false,\n user,\n role,\n myCompany,\n myInstitution,\n totalNotifications,\n notifications,\n unseenNotifications,\n routerBeforeTransitions,\n routerManagerLoaded: loaded,\n setImg: (_img: string, updatedAt: string) =>\n [baseImg, _img, `&updatedAt=${updatedAt}`].join(\"\"),\n };\n },\n bindActions\n )(MenuContainer)\n);\n\nexport default Menu;\n","// @flow\nimport * as React from \"react\";\nimport classNames from \"classnames\";\nimport { Button, Grid } from \"semantic-ui-react\";\nimport type { Props, State } from \"./EmulateUserContainer\";\nclass EmulateUserPresentational extends React.Component<\n Props & {\n onStopEmulation: () => void,\n } & State\n> {\n // RENDERS:\n render() {\n const { onStopEmulation, stoppingEmulation, userName } = this.props;\n return (\n \n \n Currently emulating\n {userName}\n \n \n \n );\n }\n}\n\nexport default EmulateUserPresentational;\n","// @flow\nimport * as React from \"react\";\nimport { connect } from \"react-redux\";\nimport { Users } from \"../../store/actions/\";\nimport EmulateUserPresentational from \"./EmulateUserPresentational\";\nimport \"./EmulateUser.scss\";\n\nexport type Props = {\n emulation: {\n isActive: boolean,\n onBehalfUser: ?string,\n },\n stopEmulation: (userId: string) => void,\n userName: ?string,\n};\nexport type State = {\n stoppingEmulation: boolean,\n};\n\nclass EmulateUserContainer extends React.Component {\n state = {\n stoppingEmulation: false,\n };\n _onAddBodyClass = () => {\n const { emulation } = this.props;\n if (emulation && emulation.isActive && document.body) {\n document.body.classList.add(\"emulate-active-heto\");\n }\n };\n componentDidMount() {\n this._onAddBodyClass();\n }\n onStopEmulation = () => {\n const { emulation, stopEmulation } = this.props;\n if (emulation && emulation.isActive) {\n const userId = emulation.onBehalfUser || \"\";\n if (userId) {\n this.setState({ stoppingEmulation: true });\n stopEmulation(userId);\n }\n }\n };\n render() {\n return this.props.emulation && this.props.emulation.isActive ? (\n \n ) : null;\n }\n getSnapshotBeforeUpdate(prevProps: Props, prevState: State) {\n const {\n emulation: { isActive: emulationActiveOld },\n } = prevProps;\n const {\n emulation: { isActive: emulationActiveNew },\n } = this.props;\n if (emulationActiveOld !== emulationActiveNew && emulationActiveNew) {\n return true;\n }\n return null;\n }\n componentDidUpdate(\n prevProps: Props,\n prevState: State,\n emulationActive: boolean\n ) {\n if (emulationActive) {\n this._onAddBodyClass();\n }\n }\n}\n\nexport default connect(\n ({ auth: { role, user, emulation } }) => ({\n emulation,\n userName: user && `${user.firstName || \"\"} ${user.lastName || \"\"}`,\n }),\n (dispatch) => ({\n stopEmulation: (userId: string) =>\n dispatch(Users.usersEmulateUser({ user: userId, stopEmulation: true })),\n })\n)(EmulateUserContainer);\n","// Features\nimport * as React from \"react\";\nimport { Field } from \"redux-form\";\n// Components\nimport {\n Button,\n Confirm,\n Container,\n Dropdown,\n Form,\n Grid,\n Message,\n Modal,\n} from \"semantic-ui-react\";\n//@ts-ignore\nimport Dropzone from \"react-dropzone\";\n// Types\nimport type {\n FeedbackFormViewProps,\n RenderDropDownFieldProps,\n RenderInputFieldProps,\n} from \"./_FeedbackForm.types\";\n// Feedback Form View:\nconst renderDropDownField: React.ComponentType = ({\n input,\n onChangePriority,\n}) => (\n \n \n \n);\nconst renderInputField: React.ComponentType = ({\n input,\n placeholder,\n type,\n meta: { touched, error },\n}) => (\n \n {type === \"textArea\" ? (\n 0 && error && true}\n maxLength=\"500\"\n placeholder={placeholder}\n rows={8}\n />\n ) : input?.value?.name ? (\n input.onChange(null)}\n />\n )\n }\n fluid\n placeholder={placeholder}\n type={\"text\"}\n />\n ) : (\n {\n if (filesToRejected.length) {\n window.logger.log(\"Rejected\", filesToRejected, error.target);\n return input.onChange(\"errorPic\");\n }\n if (filesToUpload.length) {\n window.logger.log(\"Success\", filesToUpload);\n const [profilePic] = filesToUpload;\n return input.onChange(profilePic);\n }\n }}\n >\n \n \n )}\n {input.value && input.value === \"errorPic\" && (\n \n Image not allowed or too big.\n \n )}\n {type === \"textArea\" && (\n \n )}\n \n);\n\nconst FeedbackFormView: React.FC = (props) => {\n const renderPriority = () => {\n const { onChangePriority } = props;\n return (\n \n
\n
Priority
\n
\n \n \n \n \n \n
\n );\n };\n const renderDescription = () => {\n return (\n \n
\n
Description
\n
\n \n
\n \n
\n
\n );\n };\n const renderInputFile = () => {\n const { appVersion } = props;\n return (\n \n
\n
Upload Image
\n
\n \n
\n \n
\n
\n
Heto Version: {appVersion}
\n
\n
\n );\n };\n const render = () => {\n const {\n confirmSubmit,\n errorApi,\n openCloseFeedbackForm,\n onCancel,\n onSubmit,\n submitting,\n successApi,\n valid,\n } = props;\n return (\n
\n \n \n \n \n \n

Feedback Report

\n \n \n
\n
\n
\n \n
\n \n \n \n
\n

Submit Feedback

\n
\n
\n \n Please help us improve Heto by sharing your product\n related feedback and/or by reporting any bugs/issues you\n may encounter.\n \n
\n \n
\n \n \n {renderPriority()}\n {renderDescription()}\n {renderInputFile()}\n \n \n \n \n \n \n \n \n Cancel\n \n \n \n \n Submit\n \n \n \n \n \n \n {successApi && (\n \n \n Submit Feedback sent successfully.\n \n \n )}\n {!confirmSubmit && errorApi && errorApi !== \"errorPic\" && (\n \n \n Submit Feedback Error.{\" \"}\n \n Something went wrong when submitting your\n feedback.\n \n \n {errorApi && (\n {errorApi}\n )}{\" \"}\n Try again, please.\n \n )}\n \n \n \n \n \n \n
\n \n \n Cancel\n \n }\n className=\"confirm-msg\"\n confirmButton={\n \n Submit\n \n }\n content={\n \n There is still some error when you have uploaded your image. Do\n you want to submit the feedback form anyway ?\n
\n }\n open={confirmSubmit && errorApi === \"errorPic\"}\n size=\"tiny\"\n />\n \n );\n };\n return render();\n};\nexport default FeedbackFormView;\n","// Features\nimport * as React from \"react\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { reduxForm, SubmissionError } from \"redux-form\";\nimport { FeedbackForm as FeedbackFormActions } from \"../../store/actions\";\n// Components\nimport FeedbackFormView from \"./FeedbackForm.view\";\n// Styles\nimport \"./FeedbackForm.scss\";\n// Types\nimport type { FormErrors, FormSubmitHandler } from \"redux-form\";\nimport type {\n FeedbackFormData,\n FeedbackFormContainerProps,\n FeedbackFormViewProps,\n} from \"./_FeedbackForm.types\";\nimport type { RootState } from \"../../store/reducers\";\n// Feedback Form Container:\nconst { useEffect, useState } = React;\n//\nconst FeedbackFormContainer: React.FC = (props) => {\n const dispatch = useDispatch();\n // Store\n const appVersion: FeedbackFormViewProps[\"appVersion\"] = useSelector(\n ({ config: { version } }: RootState) => version\n );\n const openCloseFeedbackForm: FeedbackFormViewProps[\"openCloseFeedbackForm\"] =\n useSelector(\n ({ feedbackForm: { openCloseFeedbackForm } }: RootState) =>\n openCloseFeedbackForm\n );\n // State\n const [confirmSubmit, setConfirmSubmit] =\n useState(false);\n // Mounted\n useEffect(() => {\n const metaTagVersion = document.querySelector(\"meta[version]\");\n if (metaTagVersion?.setAttribute) {\n metaTagVersion.setAttribute(\"version\", appVersion);\n }\n }, [appVersion]);\n // SEND Feedback Form\n const _onSendFeedbackFormRequest = ({\n feedbackFormPriority,\n feedbackFormDescription,\n feedbackFormFile,\n }: FeedbackFormData) => {\n return new Promise((resolve, reject) => {\n let body = undefined,\n isPostFile = false;\n if (\n feedbackFormFile &&\n feedbackFormFile !== \"errorPic\" &&\n typeof feedbackFormFile !== \"string\"\n ) {\n body = new FormData();\n body.append(\"attachment\", feedbackFormFile, feedbackFormFile.name);\n body.append(\"description\", feedbackFormDescription);\n if (feedbackFormPriority) {\n body.append(\"priority\", feedbackFormPriority);\n }\n isPostFile = true;\n } else {\n body = {\n description: feedbackFormDescription,\n };\n if (feedbackFormPriority) {\n body = {\n ...body,\n priority: feedbackFormPriority,\n };\n }\n }\n const formValues = {\n body,\n isPostFile,\n };\n const callbacks = {\n callbackError: (errorFeedbackForm: string) => reject(errorFeedbackForm),\n callbackSuccess: () => resolve(\"SendFeedbackForm - success\"),\n };\n const payload = Object.assign({}, formValues, callbacks);\n dispatch(FeedbackFormActions.feedbackFormSend(payload));\n });\n };\n const onSubmit: FormSubmitHandler = async (formData) => {\n const { feedbackFormFile } = formData;\n if (!confirmSubmit && feedbackFormFile === \"errorPic\") {\n setConfirmSubmit(true);\n throw new SubmissionError({\n feedbackFormTitle: \"Form Failed\",\n _error: \"errorPic\",\n });\n }\n if (confirmSubmit) {\n if (feedbackFormFile === \"errorPic\") {\n onCleanErrorImage();\n }\n setConfirmSubmit(false);\n }\n await _onSendFeedbackFormRequest(formData)\n .then((successMsg) =>\n window.logger.log(\"onSendFeedbackForm then \", successMsg)\n )\n .catch((errorFeedbackForm: any) => {\n window.logger.log(\"onSendFeedbackForm - error\", errorFeedbackForm);\n throw new SubmissionError({\n feedbackFormTitle: \"Form Failed\",\n _error: errorFeedbackForm,\n });\n });\n };\n //\n // METHODS\n const onCleanErrorImage = () => {\n const { change, clearAsyncError, clearSubmit } = props;\n clearSubmit();\n clearAsyncError(\"feedbackFormFile\");\n change(\"feedbackFormFile\", undefined);\n };\n const onCancel = () => {\n if (confirmSubmit) {\n onCleanErrorImage();\n return setConfirmSubmit(false);\n }\n const { reset } = props;\n reset();\n dispatch(FeedbackFormActions.feedbackFormOpenClose());\n };\n const onChangePriority: FeedbackFormViewProps[\"onChangePriority\"] =\n (onChange) =>\n (ev, { value }) =>\n onChange(value);\n const render = () => {\n const { error, handleSubmit, submitting, submitSucceeded, valid } = props;\n return (\n \n );\n };\n return render();\n};\n// Decorate Form Component\nconst FeedbackForm = reduxForm({\n form: \"feedback-form\",\n validate: (values) => {\n const errors: FormErrors = {};\n if (!values.feedbackFormPriority) {\n errors.feedbackFormPriority = \"Priority Required\";\n }\n if (!values.feedbackFormDescription) {\n errors.feedbackFormDescription = \"Description Required\";\n }\n return errors;\n },\n})(FeedbackFormContainer);\nexport default FeedbackForm;\n","// @flow\nimport * as React from \"react\";\nimport { Route } from \"react-router-dom\";\n// Component generic to manage routes loaded.\n// * component - React Component\n// * restProps - inject our Props\n// * isAllowedRoute -- boolean\nconst LoadedRoute = ({\n component: Component,\n restProps,\n isAllowedRoute,\n ...rest\n}: Object): React$Element => (\n \n isAllowedRoute ? : null\n }\n />\n);\n\nexport default LoadedRoute;\n","// Import Features\nimport * as React from \"react\";\nimport { connect } from \"react-redux\";\nimport { withRouter } from \"react-router-dom\";\nimport loadable from \"@loadable/component\";\nimport * as Cookies from \"js-cookie\";\n// Import Components\nimport Loader from \"../shared/Loader\";\nimport LoadedRoute from \"../shared/LoadedRoute\";\n\n// PERMISSIONS\nimport { onCheckReadMyCompaniesPermissions } from \"../company/CompaniesPermissions\";\nimport { onCheckReadMyProfileUsersPermissions } from \"../user-manager/UsersPermissions\";\nimport {\n onCheckReadMyUsersPortfolioPermissions,\n onCheckSubmitMyUsersPortfolioPermissions,\n} from \"../user-portfolio/UserPortfolioPermissions\";\nimport {\n onCheckInstitutionsPermissions,\n onCheckReadInstitutionsPermissions,\n onCheckReadMyInstitutionsPermissions,\n} from \"../institutions/InstitutionsPermissions\";\nimport {\n onCheckReadAllUsersFilesPermissions,\n onCheckReadUsersRoleFiles,\n onCheckMyCompaniesFilesPermissions,\n onCheckCreateMyCompaniesFilesPermissions,\n onCheckReadInstitutionsFilesPermissions,\n onCheckMyInstitutionsFilesPermissions,\n onCheckCreateMyInstitutionsFilesPermissions,\n onCheckInstitutionsFilesPermissions,\n onCheckReadMyInstitutionsFilesPermissions,\n} from \"../files/FilesPermissions\";\nimport { onCheckImportDataPermissions } from \"../import/ImportDataPermissions\";\nimport {\n onCheckRotationsPermissions,\n onCheckReadRotationsPermissions,\n} from \"../rotations/RotationsPermissions\";\nimport {\n onCheckCaseLogsPermissions,\n onCheckReadCaseLogsPermissions,\n onCheckSubmitCaseLogsPermissions,\n} from \"../case-logs/CaseLogsPermissions\";\nimport { onCheckEvaluationsPermissions } from \"../evaluations/EvaluationsPermissions\";\nimport {\n onCheckEvaluationSchedulersPermissions,\n onCheckReadEvaluationSchedulersPermissions,\n onCheckCreateEvaluationSchedulersPermissions,\n} from \"../evaluations-schedulers/EvaluationSchedulersPermissions\";\nimport { onCheckEvaluationTemplatesPermissions } from \"../evaluations-templates/EvaluationTemplatesPermissions\";\nimport { onCheckAllReportsPermissions } from \"../reports/ReportsPermissions\";\n// />\n// Import basic Styles - it is need for App working fine.\n// TODO: Split basic styles into different css files.\nimport \"../home/Home.scss\";\nimport \"../files/shared/file-categories/FileCategories.scss\";\n// Dynamic Import (Code Splitting):\nconst fallback = (\n \n);\nconst HomeContainer = loadable(() => import(\"../home/HomeContainer\"), {\n fallback,\n});\nconst MyProfileContainer = loadable(\n () => import(\"../my-profile/MyProfileContainer\"),\n {\n fallback,\n }\n);\nconst UserProfileContainer = loadable(\n () => import(\"../user-profile/UserProfileContainer\"),\n {\n fallback,\n }\n);\nconst UserFilesContainer = loadable(\n () => import(\"../user-files/UserFilesContainer\"),\n {\n fallback,\n }\n);\nconst UserPortfolioContainer = loadable(\n () => import(\"../user-portfolio/UserPortfolioContainer\"),\n {\n fallback,\n }\n);\nconst CompanyContainer = loadable(() => import(\"../company/CompanyContainer\"), {\n fallback,\n});\nconst InstitutionsContainer = loadable(\n () => import(\"../institutions/InstitutionsContainer\"),\n {\n fallback,\n }\n);\nconst RotationsContainer = loadable(\n () => import(\"../rotations/RotationsContainer\"),\n {\n fallback,\n }\n);\nconst EvaluationsContainer = loadable(\n () => import(\"../evaluations/EvaluationsContainer\"),\n {\n fallback,\n }\n);\nconst EvaluationsTemplatesContainer = loadable(\n () => import(\"../evaluations-templates/EvaluationsTemplatesContainer\"),\n {\n fallback,\n }\n);\nconst CaseLogsContainer = loadable(\n () => import(\"../case-logs/CaseLogsContainer\"),\n {\n fallback,\n }\n);\nconst ReportsContainer = loadable(() => import(\"../reports/ReportsContainer\"), {\n fallback,\n});\nconst AccountSettingsContainer = loadable(\n () => import(\"../account-settings/AccountSettingsContainer\"),\n {\n fallback,\n }\n);\nconst AdminPortalContainer = loadable(\n () => import(\"../admin-portal/AdminPortalContainer\"),\n {\n fallback,\n }\n);\n///////////////////////////////////\nlet lastComponentLoaded: Object = {};\nconst saveComponent = (stateProps: Object) => {\n lastComponentLoaded = stateProps;\n return stateProps;\n};\nconst mapStateToProps = (state: Object, ownProps: Object) => {\n const { location } = ownProps;\n const {\n routerBeforeTransitions,\n config,\n auth: {\n updatingProfile,\n fetchingMyFiles,\n isAuthenticated,\n user,\n files,\n role,\n myInstitution,\n },\n } = state;\n const authCookie = Cookies.getJSON(\"authCookie\");\n const setImg = (_imgOrUrl_: string, updatedAt: string): string => {\n if (_imgOrUrl_.indexOf(\"http\") !== -1) {\n return _imgOrUrl_;\n }\n return [config.baseImg, _imgOrUrl_, `&updatedAt=${updatedAt}`].join(\"\");\n };\n const defaultHomeContainer = () => {\n return saveComponent({\n component: HomeContainer,\n restProps: {\n updatingProfile,\n fetchingMyFiles,\n config,\n user,\n files,\n myInstitution,\n authRoleType: isAuthenticated ? role.type : null,\n authCookie: authCookie && !isAuthenticated ? authCookie : null,\n setImg,\n canReadMyPortfolio:\n isAuthenticated &&\n (role.type === \"students\" || role.type === \"alumnis\") &&\n onCheckReadMyUsersPortfolioPermissions(role.permissions),\n canSubmitPortfolioTestimonials:\n isAuthenticated &&\n role.type !== \"students\" &&\n onCheckSubmitMyUsersPortfolioPermissions(role.permissions),\n canReadMyCompany:\n isAuthenticated &&\n onCheckReadMyCompaniesPermissions(role.permissions) &&\n user.company,\n canReadMyFiles:\n isAuthenticated &&\n onCheckReadUsersRoleFiles({ type: \"myprofile\" }, role.permissions),\n canReadMyCompaniesFiles:\n isAuthenticated &&\n onCheckMyCompaniesFilesPermissions(role.permissions),\n canReadMyInstitutionsFiles:\n isAuthenticated &&\n onCheckReadMyInstitutionsFilesPermissions(role.permissions),\n canReadInstitutionsFiles:\n isAuthenticated &&\n onCheckReadInstitutionsFilesPermissions(role.permissions),\n canReadStudentsFiles:\n isAuthenticated &&\n onCheckReadUsersRoleFiles({ type: \"students\" }, role.permissions),\n canReadUsersFiles:\n isAuthenticated &&\n onCheckReadAllUsersFilesPermissions(role.permissions),\n canReadRotations:\n isAuthenticated && onCheckReadRotationsPermissions(role.permissions),\n canReadMyInstitution:\n isAuthenticated &&\n onCheckReadMyInstitutionsPermissions(role.permissions),\n canReadCaseLogs:\n isAuthenticated && onCheckReadCaseLogsPermissions(role.permissions),\n canSubmitCaseLogs:\n isAuthenticated && onCheckSubmitCaseLogsPermissions(role.permissions),\n canReadEvaluations:\n isAuthenticated && onCheckEvaluationsPermissions(role.permissions),\n },\n isAllowedRoute:\n config.companyDomain.length > 0 && (isAuthenticated || authCookie),\n });\n };\n if (\n isAuthenticated &&\n location.pathname &&\n location.pathname.indexOf(\"/manager\") === -1\n ) {\n let pathname = location.pathname;\n //Check routes clinics\n if (\n pathname !== \"/clinics/view/\" &&\n pathname.indexOf(\"/clinics/view/\") !== -1 &&\n pathname.indexOf(\"/documents\") === -1\n ) {\n pathname = \"/clinics/view\";\n } else if (\n pathname !== \"/clinics/view/\" &&\n pathname.indexOf(\"/clinics/view/\") !== -1 &&\n pathname.indexOf(\"/documents\") !== -1\n ) {\n pathname = \"/clinics/view/documents\";\n } else if (\n pathname !== \"/admin/clinics-settings\" &&\n pathname !== \"/admin/clinics-settings/\" &&\n pathname.indexOf(\"/clinics\") !== -1\n ) {\n pathname = \"/clinics\";\n }\n //Check routes rotations\n if (\n pathname !== \"/account-settings/rotations\" &&\n pathname !== \"/account-settings/rotations/\" &&\n pathname !== \"/admin/rotations-settings\" &&\n pathname !== \"/admin/rotations-settings/\" &&\n pathname.indexOf(\"/rotations\") !== -1\n ) {\n pathname = \"/rotations\";\n }\n //Check routes evaluations and evaluations templates\n if (\n pathname !== \"/account-settings/evaluations\" &&\n pathname !== \"/account-settings/evaluations/\" &&\n pathname !== \"/admin/evaluations-settings\" &&\n pathname !== \"/admin/evaluations-settings/\"\n ) {\n if (pathname.indexOf(\"/evaluations/templates\") !== -1) {\n pathname = \"/evaluations/templates\";\n } else if (pathname === \"/evaluations/schedulers\") {\n pathname = \"/evaluations\";\n } else if (pathname.indexOf(\"/evaluations/schedulers/\") !== -1) {\n pathname = \"/evaluations/schedulers\";\n } else if (pathname.indexOf(\"/evaluations\") !== -1) {\n pathname = \"/evaluations\";\n }\n }\n //Check routes case-logs\n if (\n pathname !== \"/account-settings/case-logs\" &&\n pathname !== \"/account-settings/case-logs/\" &&\n pathname !== \"/admin/case-logs-settings\" &&\n pathname !== \"/admin/case-logs-settings/\" &&\n pathname.indexOf(\"/case-logs\") !== -1\n ) {\n pathname = \"/case-logs\";\n }\n //Check routes reports\n if (pathname.indexOf(\"/reports\") !== -1) {\n pathname = \"/reports\";\n }\n //Check routes account-settings\n if (pathname.indexOf(\"/account-settings\") !== -1) {\n pathname = \"/account-settings\";\n }\n //Check routes admin\n if (pathname.indexOf(\"/admin\") !== -1) {\n pathname = \"/admin\";\n }\n switch (pathname) {\n case \"/my-profile\":\n case \"/my-profile/change-password\":\n return saveComponent({\n component: MyProfileContainer,\n restProps: {\n UserProfileContainer,\n isMyProfile: true,\n routerBeforeTransitions,\n myProfile: user,\n authPermissions: isAuthenticated ? role.permissions : null,\n authRoleType: isAuthenticated ? role.type : null,\n authRoleApiName: isAuthenticated ? role.apiName : null,\n hasMyInstitution: myInstitution && myInstitution.loaded && true,\n setImg,\n },\n isAllowedRoute: config.companyDomain.length > 0 && isAuthenticated,\n });\n case \"/my-profile/documents\":\n case \"/my-profile/documents/upload\":\n if (\n isAuthenticated &&\n onCheckReadMyProfileUsersPermissions(role.permissions)\n ) {\n return saveComponent({\n component: MyProfileContainer,\n restProps: {\n UserFilesContainer,\n isMyProfile: true,\n routerBeforeTransitions,\n myProfile: user,\n authUserId: isAuthenticated ? user._id : null,\n authPermissions: role.permissions,\n authRoleType: role.type,\n setImg,\n },\n isAllowedRoute:\n config.companyDomain.length > 0 &&\n isAuthenticated &&\n onCheckReadMyProfileUsersPermissions(role.permissions),\n });\n }\n return defaultHomeContainer();\n case \"/my-profile/portfolio\":\n if (isAuthenticated) {\n return saveComponent({\n component: MyProfileContainer,\n restProps: {\n UserPortfolioContainer,\n isMyProfile: true,\n routerBeforeTransitions,\n myProfile: user,\n authPermissions: role.permissions,\n authRoleType: role.type,\n setImg,\n },\n isAllowedRoute:\n config.companyDomain.length > 0 &&\n isAuthenticated &&\n onCheckReadMyProfileUsersPermissions(role.permissions),\n });\n }\n return defaultHomeContainer();\n case \"/my-school\":\n if (\n isAuthenticated &&\n onCheckReadMyCompaniesPermissions(role.permissions) &&\n user.company\n ) {\n return saveComponent({\n component: CompanyContainer,\n restProps: {\n authPermissions: role.permissions,\n authRoleType: isAuthenticated ? role.type : null,\n routerBeforeTransitions,\n setImg,\n },\n isAllowedRoute:\n config.companyDomain.length > 0 &&\n isAuthenticated &&\n onCheckReadMyCompaniesPermissions(role.permissions) &&\n user.company &&\n true,\n });\n }\n return defaultHomeContainer();\n case \"/my-school/documents\":\n if (\n isAuthenticated &&\n onCheckMyCompaniesFilesPermissions(role.permissions) &&\n user.company\n ) {\n return saveComponent({\n component: CompanyContainer,\n restProps: {\n authPermissions: role.permissions,\n authRoleType: isAuthenticated ? role.type : null,\n routerBeforeTransitions,\n setImg,\n },\n isAllowedRoute:\n config.companyDomain.length > 0 &&\n isAuthenticated &&\n onCheckMyCompaniesFilesPermissions(role.permissions) &&\n user.company &&\n true,\n });\n }\n return defaultHomeContainer();\n case \"/my-school/documents/upload\":\n if (\n isAuthenticated &&\n onCheckCreateMyCompaniesFilesPermissions(role.permissions) &&\n user.company\n ) {\n return saveComponent({\n component: CompanyContainer,\n restProps: {\n authPermissions: role.permissions,\n authRoleType: isAuthenticated ? role.type : null,\n routerBeforeTransitions,\n setImg,\n },\n isAllowedRoute:\n config.companyDomain.length > 0 &&\n isAuthenticated &&\n onCheckCreateMyCompaniesFilesPermissions(role.permissions) &&\n user.company &&\n true,\n });\n }\n return defaultHomeContainer();\n case \"/clinics\":\n if (\n isAuthenticated &&\n onCheckInstitutionsPermissions(role.permissions)\n ) {\n return saveComponent({\n component: InstitutionsContainer,\n restProps: {\n authPermissions: role.permissions,\n authRoleType: isAuthenticated ? role.type : null,\n authRoleApiName: isAuthenticated ? role.apiName : null,\n routerBeforeTransitions,\n setImg,\n },\n isAllowedRoute:\n config.companyDomain.length > 0 &&\n isAuthenticated &&\n onCheckInstitutionsPermissions(role.permissions),\n });\n }\n return defaultHomeContainer();\n case \"/clinics/view\":\n if (\n isAuthenticated &&\n (onCheckReadInstitutionsPermissions(role.permissions) ||\n onCheckReadMyInstitutionsPermissions(role.permissions))\n ) {\n return saveComponent({\n component: InstitutionsContainer,\n restProps: {\n authPermissions: role.permissions,\n authRoleType: isAuthenticated ? role.type : null,\n authRoleApiName: isAuthenticated ? role.apiName : null,\n routerBeforeTransitions,\n setImg,\n },\n isAllowedRoute:\n config.companyDomain.length > 0 &&\n isAuthenticated &&\n (onCheckReadInstitutionsPermissions(role.permissions) ||\n onCheckReadMyInstitutionsPermissions(role.permissions)),\n });\n }\n return defaultHomeContainer();\n case \"/clinics/view/documents\":\n if (\n isAuthenticated &&\n (onCheckInstitutionsFilesPermissions(role.permissions) ||\n onCheckMyInstitutionsFilesPermissions(role.permissions))\n ) {\n return saveComponent({\n component: InstitutionsContainer,\n restProps: {\n authPermissions: role.permissions,\n authRoleType: isAuthenticated ? role.type : null,\n authRoleApiName: isAuthenticated ? role.apiName : null,\n routerBeforeTransitions,\n setImg,\n },\n isAllowedRoute:\n config.companyDomain.length > 0 &&\n isAuthenticated &&\n (onCheckInstitutionsFilesPermissions(role.permissions) ||\n onCheckMyInstitutionsFilesPermissions(role.permissions)),\n });\n }\n return defaultHomeContainer();\n case \"/my-clinic\":\n if (\n isAuthenticated &&\n onCheckReadMyInstitutionsPermissions(role.permissions) &&\n (user.institution || user.activeRotation)\n ) {\n return saveComponent({\n component: InstitutionsContainer,\n restProps: {\n authPermissions: role.permissions,\n authRoleType: isAuthenticated ? role.type : null,\n authRoleApiName: isAuthenticated ? role.apiName : null,\n routerBeforeTransitions,\n setImg,\n },\n isAllowedRoute:\n config.companyDomain.length > 0 &&\n isAuthenticated &&\n onCheckReadMyInstitutionsPermissions(role.permissions) &&\n (user.institution || user.activeRotation) &&\n true,\n });\n }\n return defaultHomeContainer();\n case \"/my-clinic/documents\":\n if (\n isAuthenticated &&\n onCheckMyInstitutionsFilesPermissions(role.permissions) &&\n (user.institution || user.activeRotation)\n ) {\n return saveComponent({\n component: InstitutionsContainer,\n restProps: {\n authPermissions: role.permissions,\n authRoleType: isAuthenticated ? role.type : null,\n authRoleApiName: isAuthenticated ? role.apiName : null,\n routerBeforeTransitions,\n setImg,\n },\n isAllowedRoute:\n config.companyDomain.length > 0 &&\n isAuthenticated &&\n onCheckMyInstitutionsFilesPermissions(role.permissions) &&\n (user.institution || user.activeRotation) &&\n true,\n });\n }\n return defaultHomeContainer();\n case \"/my-clinic/documents/upload\":\n if (\n isAuthenticated &&\n onCheckCreateMyInstitutionsFilesPermissions(role.permissions) &&\n (user.institution || user.activeRotation)\n ) {\n return saveComponent({\n component: InstitutionsContainer,\n restProps: {\n authPermissions: role.permissions,\n authRoleType: isAuthenticated ? role.type : null,\n routerBeforeTransitions,\n setImg,\n },\n isAllowedRoute:\n config.companyDomain.length > 0 &&\n isAuthenticated &&\n onCheckCreateMyInstitutionsFilesPermissions(role.permissions) &&\n (user.institution || user.activeRotation) &&\n true,\n });\n }\n return defaultHomeContainer();\n case \"/rotations\":\n if (\n isAuthenticated &&\n (onCheckRotationsPermissions(role.permissions) ||\n onCheckImportDataPermissions(role.permissions))\n ) {\n return saveComponent({\n component: RotationsContainer,\n restProps: {\n authPermissions: role.permissions,\n authRoleType: isAuthenticated ? role.type : null,\n userId: isAuthenticated ? user._id : null,\n institutionId:\n isAuthenticated && user.institution\n ? user.institution._id\n : null,\n setImg,\n },\n isAllowedRoute:\n config.companyDomain.length > 0 &&\n isAuthenticated &&\n (onCheckRotationsPermissions(role.permissions) ||\n onCheckImportDataPermissions(role.permissions)),\n });\n }\n return defaultHomeContainer();\n case \"/case-logs\":\n if (isAuthenticated && onCheckCaseLogsPermissions(role.permissions)) {\n return saveComponent({\n component: CaseLogsContainer,\n restProps: {\n authPermissions: role.permissions,\n authRoleType: isAuthenticated ? role.type : null,\n hasActiveRotations:\n isAuthenticated && user.activeRotation ? true : false,\n institutionId:\n isAuthenticated && user.institution\n ? user.institution._id\n : null,\n myInstitution,\n studentsInstitutions:\n isAuthenticated && user.rotations && user.rotations.length > 0\n ? user.rotations\n .filter(({ status }) => status === \"incourse\")\n .map(({ institutions }) => institutions)\n .reduce(\n (ac, institutions) => [...ac, ...institutions],\n []\n )\n : [],\n setImg,\n userId: isAuthenticated ? user._id : null,\n },\n isAllowedRoute:\n config.companyDomain.length > 0 &&\n isAuthenticated &&\n onCheckCaseLogsPermissions(role.permissions),\n });\n }\n return defaultHomeContainer();\n case \"/evaluations\":\n let isAllowedEvaluationsRoute = false;\n if (\n isAuthenticated &&\n pathname === \"/evaluations/schedulers\" &&\n onCheckReadEvaluationSchedulersPermissions(role.permissions)\n ) {\n isAllowedEvaluationsRoute = true;\n } else if (\n isAuthenticated &&\n (onCheckEvaluationsPermissions(role.permissions) ||\n onCheckEvaluationSchedulersPermissions(role.permissions) ||\n onCheckEvaluationTemplatesPermissions(role.permissions))\n ) {\n isAllowedEvaluationsRoute = true;\n }\n if (isAllowedEvaluationsRoute) {\n return saveComponent({\n component: EvaluationsContainer,\n restProps: {\n isAllowedEvaluationsRoute,\n authPermissions: role.permissions,\n authRoleType: isAuthenticated ? role.type : null,\n userId: isAuthenticated ? user._id : null,\n userProfileImageOriginalSrc:\n isAuthenticated && user.profileImageOriginal\n ? [\n config.baseImg,\n user.profileImageOriginal,\n `&updatedAt=${user.updatedAt}`,\n ].join(\"\")\n : null,\n institutionId:\n isAuthenticated && user.institution\n ? user.institution._id\n : null,\n setImg,\n },\n isAllowedRoute:\n config.companyDomain.length > 0 &&\n isAuthenticated &&\n isAllowedEvaluationsRoute,\n });\n }\n return defaultHomeContainer();\n case \"/evaluations/schedulers\":\n if (\n isAuthenticated &&\n onCheckCreateEvaluationSchedulersPermissions(role.permissions)\n ) {\n return saveComponent({\n component: EvaluationsContainer,\n restProps: {\n isAllowedEvaluationsRoute: true,\n authPermissions: role.permissions,\n setImg,\n },\n isAllowedRoute:\n config.companyDomain.length > 0 &&\n isAuthenticated &&\n onCheckCreateEvaluationSchedulersPermissions(role.permissions),\n });\n }\n return defaultHomeContainer();\n case \"/evaluations/templates\":\n if (\n isAuthenticated &&\n onCheckEvaluationTemplatesPermissions(role.permissions)\n ) {\n return saveComponent({\n component: EvaluationsTemplatesContainer,\n restProps: {\n authPermissions: role.permissions,\n setImg,\n },\n isAllowedRoute:\n config.companyDomain.length > 0 &&\n isAuthenticated &&\n onCheckEvaluationTemplatesPermissions(role.permissions),\n });\n }\n return defaultHomeContainer();\n case \"/reports\":\n if (isAuthenticated && onCheckAllReportsPermissions(role.permissions)) {\n return saveComponent({\n component: ReportsContainer,\n restProps: {\n authPermissions: role.permissions,\n setPublicUrl: (publicToken: string) =>\n `${config.baseDomain}${config.port ? \":3000\" : \"\"}/public/${\n config.companyDomain\n }/metric-pages/${publicToken}`,\n setImg,\n },\n isAllowedRoute:\n config.companyDomain.length > 0 &&\n isAuthenticated &&\n onCheckAllReportsPermissions(role.permissions),\n });\n }\n return defaultHomeContainer();\n case \"/account-settings\":\n if (isAuthenticated) {\n return saveComponent({\n component: AccountSettingsContainer,\n restProps: {\n authPermissions: role.permissions,\n authRoleType: isAuthenticated ? role.type : null,\n setImg,\n },\n isAllowedRoute: config.companyDomain.length > 0 && isAuthenticated,\n });\n }\n return defaultHomeContainer();\n case \"/admin\":\n if (isAuthenticated) {\n return saveComponent({\n component: AdminPortalContainer,\n restProps: {\n authPermissions: role.permissions,\n authRoleType: isAuthenticated ? role.type : null,\n setImg,\n },\n isAllowedRoute: config.companyDomain.length > 0 && isAuthenticated,\n });\n }\n return defaultHomeContainer();\n default:\n // case '/home' || case '/'\n return defaultHomeContainer();\n }\n }\n if (!lastComponentLoaded.component) {\n return defaultHomeContainer();\n }\n return lastComponentLoaded;\n};\n\nconst RouteLoadedCompoundContainer: React.ComponentType = withRouter(\n connect(mapStateToProps)(LoadedRoute)\n);\n\nexport default RouteLoadedCompoundContainer;\n","// @flow\nimport * as React from \"react\";\nimport { connect } from \"react-redux\";\nimport { withRouter } from \"react-router-dom\";\nimport loadable from \"@loadable/component\";\n// Import Components\nimport Loader from \"../shared/Loader\";\nimport LoadedRoute from \"../shared/LoadedRoute\";\n// PERMISSIONS\nimport {\n onCheckUsersManagerPermissions,\n onCheckUserInvitationsManagerPermissions,\n onCheckUserManagerActionCreateEditRotationPermissions,\n} from \"./ManagerPermissions\";\nimport { onCheckImportDataPermissions } from \"../import/ImportDataPermissions\";\nimport { onCheckCreateEvaluationSchedulersPermissions } from \"../evaluations-schedulers/EvaluationSchedulersPermissions\";\nimport {\n onCheckMyCompaniesFilesPermissions,\n onCheckReadInstitutionsFilesPermissions,\n onCheckReadMyInstitutionsFilesPermissions,\n onCheckAllUsersFilesPermissions,\n} from \"../files/FilesPermissions\";\nimport {\n onCheckReadInstitutionsPermissions,\n onCheckReadMyInstitutionsPermissions,\n} from \"../institutions/InstitutionsPermissions\";\n// />\n// Dynamic Import (Code Splitting):\nconst fallback = (\n \n);\nconst ManagerContainer = loadable(() => import(\"./ManagerContainer\"), {\n fallback,\n});\nconst UserManagerContainer = loadable(\n () => import(\"../user-manager/UserManagerContainer\"),\n {\n fallback,\n }\n);\nconst UserProfileContainer = loadable(\n () => import(\"../user-profile/UserProfileContainer\"),\n {\n fallback,\n }\n);\nconst UserFilesContainer = loadable(\n () => import(\"../user-files/UserFilesContainer\"),\n {\n fallback,\n }\n);\nconst UserPortfolioContainer = loadable(\n () => import(\"../user-portfolio/UserPortfolioContainer\"),\n {\n fallback,\n }\n);\nconst UserInvitationManagerContainer = loadable(\n () => import(\"../user-invitation-manager/UserInvitationManagerContainer\"),\n {\n fallback,\n }\n);\nconst UsersImportDataContainer = loadable(\n () => import(\"../users-import-data/UsersImportDataContainer\"),\n {\n fallback,\n }\n);\n///////////////////////////////////\nlet lastComponentLoaded: Object = {};\nconst saveComponent = (stateProps: Object) => {\n lastComponentLoaded = stateProps;\n return stateProps;\n};\nconst mapStateToProps = (state: Object, ownProps: Object) => {\n const { location } = ownProps;\n const {\n routerBeforeTransitions,\n config,\n auth: { isAuthenticated, user, role, myInstitution },\n } = state;\n const setImg = (_imgOrUrl_: string, updatedAt: string): string => {\n if (_imgOrUrl_.indexOf(\"http\") !== -1) {\n return _imgOrUrl_;\n }\n return [config.baseImg, _imgOrUrl_, `&updatedAt=${updatedAt}`].join(\"\");\n };\n const defaultManagerContainer = () => {\n return saveComponent({\n component: ManagerContainer,\n restProps: {\n components: lastComponentLoaded.restProps\n ? [lastComponentLoaded.restProps.components[0]]\n : [UserManagerContainer],\n baseClassName: lastComponentLoaded.restProps\n ? lastComponentLoaded.restProps.baseClassName\n : \"usermanager\",\n openUserManager: false,\n setImg,\n },\n isAllowedRoute:\n config.companyDomain.length > 0 &&\n isAuthenticated &&\n onCheckUsersManagerPermissions(role.permissions),\n });\n };\n if (location.pathname && location.pathname.indexOf(\"/manager\") > -1) {\n let pathname = location.pathname;\n //Check routes clinics\n if (location.pathname.indexOf(\"/manager/profile/\") !== -1) {\n pathname = \"/manager/profile/\";\n }\n switch (pathname) {\n case \"/manager\":\n return saveComponent({\n component: ManagerContainer,\n restProps: {\n components: [UserManagerContainer],\n baseClassName: \"usermanager\",\n openUserManager: true,\n routerBeforeTransitions,\n authUserId: isAuthenticated ? user._id : null,\n authPermissions: isAuthenticated ? role.permissions : null,\n authRoleType: isAuthenticated ? role.type : null,\n setImg,\n canInviteUsers:\n isAuthenticated &&\n onCheckUserInvitationsManagerPermissions(role.permissions),\n canImportUsers:\n isAuthenticated && onCheckImportDataPermissions(role.permissions),\n canCreateEditRotations:\n isAuthenticated &&\n onCheckUserManagerActionCreateEditRotationPermissions(\n role.permissions\n ),\n canCreateEvaluationSchedulers:\n isAuthenticated &&\n onCheckCreateEvaluationSchedulersPermissions(role.permissions),\n },\n isAllowedRoute:\n config.companyDomain.length > 0 &&\n isAuthenticated &&\n onCheckUsersManagerPermissions(role.permissions),\n });\n case \"/manager/profile/\":\n if (location.pathname.indexOf(\"/documents\") !== -1) {\n const { before } = state.routerManager;\n return saveComponent({\n component: ManagerContainer,\n restProps: {\n components: [UserFilesContainer],\n baseClassName: \"userfiles\",\n openUserManager: true,\n routerBeforeTransitions,\n openUploadDocuments:\n location.pathname.indexOf(\"/documents/upload\") !== -1,\n routerManagerBefore: before,\n authUserId: isAuthenticated ? user._id : null,\n authPermissions: isAuthenticated ? role.permissions : null,\n authRoleType: isAuthenticated ? role.type : null,\n authRoleApiName: isAuthenticated ? role.apiName : null,\n setImg,\n },\n isAllowedRoute:\n config.companyDomain.length > 0 &&\n isAuthenticated &&\n onCheckAllUsersFilesPermissions(role.permissions),\n });\n } else if (location.pathname.indexOf(\"/portfolio\") !== -1) {\n const { before } = state.routerManager;\n return saveComponent({\n component: ManagerContainer,\n restProps: {\n components: [UserPortfolioContainer],\n baseClassName: \"userportfolio\",\n openUserManager: true,\n routerBeforeTransitions,\n routerManagerBefore: before,\n authPermissions: isAuthenticated ? role.permissions : null,\n authRoleType: isAuthenticated ? role.type : null,\n authRoleApiName: isAuthenticated ? role.apiName : null,\n setImg,\n },\n isAllowedRoute: config.companyDomain.length > 0 && isAuthenticated,\n });\n }\n return saveComponent({\n component: ManagerContainer,\n restProps: {\n components: [UserProfileContainer],\n baseClassName: \"userprofile\",\n openUserManager: true,\n routerBeforeTransitions,\n authUserId: isAuthenticated ? user._id : null,\n authPermissions: isAuthenticated ? role.permissions : null,\n authRoleType: isAuthenticated ? role.type : null,\n authRoleApiName: isAuthenticated ? role.apiName : null,\n hasMyInstitution: myInstitution && myInstitution.loaded && true,\n setImg,\n canReadAllInstitutions:\n isAuthenticated &&\n onCheckReadInstitutionsPermissions(role.permissions),\n canReadMyInstitutions:\n isAuthenticated &&\n onCheckReadMyInstitutionsPermissions(role.permissions) &&\n (user.institution || user.activeRotation),\n canReadMyCompaniesFiles:\n isAuthenticated &&\n onCheckMyCompaniesFilesPermissions(role.permissions),\n canReadInstitutionsFiles:\n isAuthenticated &&\n (onCheckReadInstitutionsFilesPermissions(role.permissions) ||\n onCheckReadMyInstitutionsFilesPermissions(role.permissions)),\n canReadMyInstitutionsFiles:\n isAuthenticated &&\n onCheckReadMyInstitutionsFilesPermissions(role.permissions),\n canReadMyFiles: false,\n },\n isAllowedRoute:\n config.companyDomain.length > 0 &&\n isAuthenticated &&\n onCheckUsersManagerPermissions(role.permissions),\n });\n case \"/manager/invitations\":\n case \"/manager/invitations/create\":\n return saveComponent({\n component: ManagerContainer,\n restProps: {\n components: [UserInvitationManagerContainer],\n baseClassName: \"userinvitation\",\n openUserManager: true,\n routerBeforeTransitions,\n authPermissions: isAuthenticated ? role.permissions : null,\n authRoleType: isAuthenticated ? role.type : null,\n institutionId:\n isAuthenticated && user.institution ? user.institution._id : null,\n setImg,\n },\n isAllowedRoute:\n config.companyDomain.length > 0 &&\n isAuthenticated &&\n onCheckUserInvitationsManagerPermissions(role.permissions),\n });\n case \"/manager/import-users\":\n case \"/manager/import-users/generate-csv\":\n case \"/manager/import-users/status\":\n return saveComponent({\n component: ManagerContainer,\n restProps: {\n components: [UserManagerContainer, UsersImportDataContainer],\n baseClassName: \"usermanager\",\n openUserManager: true,\n routerBeforeTransitions,\n authPermissions: isAuthenticated ? role.permissions : null,\n authRoleType: isAuthenticated ? role.type : null,\n setImg,\n },\n isAllowedRoute:\n config.companyDomain.length > 0 &&\n isAuthenticated &&\n onCheckImportDataPermissions(role.permissions),\n });\n default:\n return defaultManagerContainer();\n }\n }\n return defaultManagerContainer();\n};\n\nconst RouteManagerCompoundContainer: React.ComponentType = withRouter(\n connect(mapStateToProps)(LoadedRoute)\n);\n\nexport default RouteManagerCompoundContainer;\n","// @flow\nimport * as React from \"react\";\nimport { Route, Redirect } from \"react-router-dom\";\n// Component generic to manage routes protected.\n// * component - React Component\n// * restProps - inject our Props\n// * isAllowedRoute -- boolean\n// * redirectTo - location descriptor\nconst ProtectedRoute = ({\n component: Component,\n restProps,\n isAllowedRoute,\n redirectTo,\n ...rest\n}: Object): React$Element => (\n \n isAllowedRoute ? (\n Component ? (\n \n ) : null\n ) : (\n \n )\n }\n />\n);\n\nexport default ProtectedRoute;\n","// @flow\nimport * as React from \"react\";\nimport { connect } from \"react-redux\";\nimport { withRouter } from \"react-router-dom\";\nimport ProtectedRoute from \"../shared/ProtectedRoute\";\n\nconst RedirectsRoute: React.ComponentType = withRouter(\n connect(\n (\n { config, auth: { isAuthenticated } },\n { path, computedMatch: { url } }\n ) => {\n let redirectTo = \"/home\";\n let isAllowedRoute = config.companyDomain.length > 0 && isAuthenticated;\n if (isAllowedRoute && path && url) {\n isAllowedRoute = false;\n redirectTo = url.slice(0, url.length - 1);\n }\n return {\n component: null,\n restProps: null,\n isAllowedRoute,\n redirectTo,\n };\n }\n )(ProtectedRoute)\n);\n\nexport default RedirectsRoute;\n","// @flow\nimport * as React from \"react\";\nimport { connect } from \"react-redux\";\nimport { withRouter } from \"react-router-dom\";\nimport {\n onCheckAllUsersFilesPermissions,\n onCheckCreateAllUsersFilesPermissions,\n} from \"../files/FilesPermissions\";\nimport {\n onCheckUsersManagerPermissions,\n onCheckUserInvitationsManagerPermissions,\n} from \"./ManagerPermissions\";\nimport { onCheckImportDataPermissions } from \"../import/ImportDataPermissions\";\nimport { store } from \"../../index\";\nimport { Users, RouterManager } from \"../../store/actions/\";\nimport ProtectedRoute from \"../shared/ProtectedRoute\";\n\nconst mapDispatchToProps = (dispatch: Function, ownProps: Object) => {\n const {\n computedMatch: {\n params: { userId },\n },\n location: { state },\n } = ownProps;\n const { userId: storedUserId } = store.getState().users;\n if (userId && userId !== storedUserId) {\n dispatch(Users.usersSetUserId({ userId }));\n if (state && state.user) {\n dispatch(\n Users.usersSetUser({\n user: state.user,\n })\n );\n }\n }\n return { dispatch };\n};\n\nconst ManagerRoute: React.ComponentType = withRouter(\n connect(\n (\n { config: { companyDomain }, auth: { isAuthenticated, role } },\n {\n path,\n computedMatch: {\n params: { userId },\n },\n }\n ) => {\n let isAllowedRoute =\n isAuthenticated &&\n (onCheckUsersManagerPermissions(role.permissions) ||\n onCheckUserInvitationsManagerPermissions(role.permissions) ||\n onCheckImportDataPermissions(role.permissions));\n let redirectTo = \"/manager\";\n if (!isAllowedRoute) {\n redirectTo = \"/home\";\n }\n if (\n path &&\n (path === \"/manager\" ||\n (path.indexOf(\"/manager/profile/\") !== -1 &&\n userId &&\n path.indexOf(\"/portfolio\") === -1 &&\n path.indexOf(\"/documents\") === -1)) &&\n isAuthenticated &&\n isAllowedRoute &&\n !onCheckUsersManagerPermissions(role.permissions)\n ) {\n isAllowedRoute = false;\n } else if (\n path &&\n path.indexOf(\"/manager/profile/\") !== -1 &&\n userId &&\n path.indexOf(\"/portfolio\") !== -1 &&\n !isAllowedRoute\n ) {\n isAllowedRoute = false;\n } else if (\n path &&\n path.indexOf(\"/manager/profile/\") !== -1 &&\n userId &&\n path.indexOf(\"/documents\") !== -1 &&\n path.indexOf(\"/documents/upload\") === -1 &&\n isAuthenticated &&\n isAllowedRoute &&\n !onCheckAllUsersFilesPermissions(role.permissions)\n ) {\n isAllowedRoute = false;\n } else if (\n path &&\n path.indexOf(\"/manager/profile/\") !== -1 &&\n userId &&\n path.indexOf(\"/documents\") !== -1 &&\n path.indexOf(\"/documents/upload\") !== -1 &&\n isAuthenticated &&\n isAllowedRoute &&\n !onCheckCreateAllUsersFilesPermissions(role.permissions)\n ) {\n isAllowedRoute = false;\n } else if (\n path &&\n (path === \"/manager/invitations\" ||\n path === \"/manager/invitations/create\") &&\n isAuthenticated &&\n isAllowedRoute &&\n !onCheckUserInvitationsManagerPermissions(role.permissions)\n ) {\n isAllowedRoute = false;\n } else if (\n path &&\n (path === \"/manager/import-users\" ||\n path === \"/manager/import-users/generate-csv\" ||\n path === \"/manager/import-users/status\") &&\n isAuthenticated &&\n isAllowedRoute &&\n !onCheckImportDataPermissions(role.permissions)\n ) {\n isAllowedRoute = false;\n }\n if (!isAllowedRoute) {\n store.dispatch(RouterManager.routerManagerReset());\n }\n return {\n component: null,\n restProps: null,\n isAllowedRoute:\n companyDomain.length > 0 && isAuthenticated && isAllowedRoute,\n redirectTo,\n };\n },\n mapDispatchToProps\n )(ProtectedRoute)\n);\n\nexport default ManagerRoute;\n","// @flow\n// Import Features\nimport * as React from \"react\";\nimport { connect } from \"react-redux\";\nimport { withRouter } from \"react-router-dom\";\nimport * as Cookies from \"js-cookie\";\n// Import Components\nimport ProtectedRoute from \"../shared/ProtectedRoute\";\nconst HomeRoute: React.ComponentType = withRouter(\n connect(({ config, auth: { isAuthenticated } }) => {\n const authCookie = Cookies.getJSON(\"authCookie\");\n return {\n component: null,\n restProps: null,\n isAllowedRoute:\n config.companyDomain.length > 0 && (isAuthenticated || authCookie),\n redirectTo:\n config.companyDomain.length > 0 && (isAuthenticated || authCookie)\n ? \"/\"\n : \"/signout\",\n };\n })(ProtectedRoute)\n);\nexport default HomeRoute;\n","// @flow\nimport * as React from \"react\";\nimport { connect } from \"react-redux\";\nimport { withRouter } from \"react-router-dom\";\nimport { onCheckReadMyProfileUsersPermissions } from \"../user-manager/UsersPermissions\";\nimport {\n onCheckMyFilesPermissions,\n onCheckCreateMyFilesPermissions,\n} from \"../files/FilesPermissions\";\nimport { Auth } from \"../../store/actions/\";\nimport ProtectedRoute from \"../shared/ProtectedRoute\";\n\nconst mapDispatchToProps = (dispatch: Function) => {\n dispatch(Auth.authUpdateMyUserAccount());\n return { dispatch };\n};\n\nconst MyProfileRoute: React.ComponentType = withRouter(\n connect(({ config, auth: { isAuthenticated, role } }, { path }) => {\n let isAllowedRole = false;\n if (\n path &&\n (path === \"/my-profile\" || path === \"/my-profile/change-password\") &&\n isAuthenticated &&\n onCheckReadMyProfileUsersPermissions(role.permissions)\n ) {\n isAllowedRole = true;\n } else if (\n path &&\n path === \"/my-profile/portfolio\" &&\n isAuthenticated &&\n onCheckReadMyProfileUsersPermissions(role.permissions)\n ) {\n isAllowedRole = true;\n } else if (\n path &&\n path === \"/my-profile/documents\" &&\n isAuthenticated &&\n onCheckReadMyProfileUsersPermissions(role.permissions) &&\n onCheckMyFilesPermissions(role.permissions)\n ) {\n isAllowedRole = true;\n } else if (\n path &&\n path === \"/my-profile/documents/upload\" &&\n isAuthenticated &&\n onCheckReadMyProfileUsersPermissions(role.permissions) &&\n onCheckCreateMyFilesPermissions(role.permissions)\n ) {\n isAllowedRole = true;\n }\n return {\n component: null,\n restProps: null,\n isAllowedRoute:\n config.companyDomain.length > 0 && isAuthenticated && isAllowedRole,\n redirectTo: \"/home\",\n };\n }, mapDispatchToProps)(ProtectedRoute)\n);\n\nexport default MyProfileRoute;\n","// @flow\nimport * as React from \"react\";\nimport { connect } from \"react-redux\";\nimport { withRouter } from \"react-router-dom\";\nimport { onCheckReadMyCompaniesPermissions } from \"./CompaniesPermissions\";\nimport {\n onCheckMyCompaniesFilesPermissions,\n onCheckCreateMyCompaniesFilesPermissions,\n} from \"../files/FilesPermissions\";\nimport ProtectedRoute from \"../shared/ProtectedRoute\";\n\nconst CompanyRoute: React.ComponentType = withRouter(\n connect(({ config, auth: { isAuthenticated, role, user } }, { path }) => {\n let isAllowedRole = false;\n if (\n path &&\n path === \"/my-school\" &&\n isAuthenticated &&\n onCheckReadMyCompaniesPermissions(role.permissions)\n ) {\n isAllowedRole = true;\n } else if (\n path &&\n path === \"/my-school/documents\" &&\n isAuthenticated &&\n onCheckMyCompaniesFilesPermissions(role.permissions)\n ) {\n isAllowedRole = true;\n } else if (\n path &&\n path === \"/my-school/documents/upload\" &&\n isAuthenticated &&\n onCheckCreateMyCompaniesFilesPermissions(role.permissions)\n ) {\n isAllowedRole = true;\n }\n return {\n component: null,\n restProps: null,\n isAllowedRoute:\n config.companyDomain.length > 0 &&\n isAuthenticated &&\n isAllowedRole &&\n user.company &&\n true,\n redirectTo: \"/home\",\n };\n })(ProtectedRoute)\n);\n\nexport default CompanyRoute;\n","// @flow\nimport * as React from \"react\";\nimport { connect } from \"react-redux\";\nimport { withRouter } from \"react-router-dom\";\nimport {\n onCheckInstitutionsPermissions,\n onCheckReadInstitutionsPermissions,\n onCheckCreateInstitutionsPermissions,\n onCheckReadMyInstitutionsPermissions,\n} from \"./InstitutionsPermissions\";\nimport {\n onCheckInstitutionsFilesPermissions,\n onCheckCreateInstitutionsFilesPermissions,\n onCheckMyInstitutionsFilesPermissions,\n onCheckCreateMyInstitutionsFilesPermissions,\n} from \"../files/FilesPermissions\";\nimport { store } from \"../../index\";\nimport { Institutions } from \"../../store/actions/\";\nimport ProtectedRoute from \"../shared/ProtectedRoute\";\nimport { doMergeInstitutionAccount } from \"../../store/sagas/institutions\";\n\nconst mapStateToProps = (\n { config: { companyDomain }, auth: { isAuthenticated, role } },\n {\n path,\n computedMatch: {\n params: { create_view, institutionId, documents, upload },\n },\n }\n) => {\n let allowedInstitutionsRoute =\n isAuthenticated &&\n (onCheckInstitutionsPermissions(role.permissions) ||\n onCheckReadMyInstitutionsPermissions(role.permissions));\n if (!create_view && !onCheckInstitutionsPermissions(role.permissions)) {\n allowedInstitutionsRoute = false;\n }\n if (allowedInstitutionsRoute && create_view) {\n if (create_view === \"create\" || create_view === \"view\") {\n if (create_view === \"create\") {\n if (\n institutionId ||\n !onCheckCreateInstitutionsPermissions(role.permissions)\n ) {\n allowedInstitutionsRoute = false;\n }\n } else if (create_view === \"view\") {\n if (!institutionId) {\n allowedInstitutionsRoute = false;\n } else if (\n !onCheckReadInstitutionsPermissions(role.permissions) &&\n !onCheckReadMyInstitutionsPermissions(role.permissions)\n ) {\n allowedInstitutionsRoute = false;\n } else if (documents) {\n if (documents !== \"documents\") {\n allowedInstitutionsRoute = false;\n } else {\n if (\n !onCheckInstitutionsFilesPermissions(role.permissions) &&\n !onCheckMyInstitutionsFilesPermissions(role.permissions)\n ) {\n allowedInstitutionsRoute = false;\n } else if (upload) {\n if (upload !== \"upload\") {\n allowedInstitutionsRoute = false;\n } else if (\n !onCheckCreateInstitutionsFilesPermissions(role.permissions) &&\n !onCheckCreateMyInstitutionsFilesPermissions(role.permissions)\n ) {\n allowedInstitutionsRoute = false;\n }\n }\n }\n }\n }\n } else {\n allowedInstitutionsRoute = false;\n }\n }\n return {\n component: null,\n restProps: null,\n isAllowedRoute:\n companyDomain.length > 0 && isAuthenticated && allowedInstitutionsRoute,\n redirectTo: \"/home\",\n };\n};\nconst mapDispatchToProps = (dispatch: Function, ownProps: Object) => {\n const {\n computedMatch: {\n params: { institutionId },\n },\n location: { state },\n } = ownProps;\n const { institutionId: storedinstitutionId } = store.getState().institutions;\n if (institutionId && institutionId !== storedinstitutionId) {\n dispatch(Institutions.institutionsSetInstitutionId({ institutionId }));\n if (state && state.institution) {\n doMergeInstitutionAccount(state.institution, false);\n }\n }\n return { dispatch };\n};\nconst InstitutionsRoute: React.ComponentType = withRouter(\n connect(mapStateToProps, mapDispatchToProps)(ProtectedRoute)\n);\n\nexport default InstitutionsRoute;\n","// @flow\nimport * as React from \"react\";\nimport { connect } from \"react-redux\";\nimport { withRouter } from \"react-router-dom\";\nimport { onCheckReadMyInstitutionsPermissions } from \"./InstitutionsPermissions\";\nimport {\n onCheckMyInstitutionsFilesPermissions,\n onCheckCreateMyInstitutionsFilesPermissions,\n} from \"../files/FilesPermissions\";\nimport { store } from \"../../index\";\nimport { Auth } from \"../../store/actions/\";\nimport ProtectedRoute from \"../shared/ProtectedRoute\";\n\nconst mapStateToProps = (\n { config, auth: { isAuthenticated, role, user } },\n { path }\n) => {\n let isAllowedRole = false;\n if (\n path &&\n path === \"/my-clinic\" &&\n isAuthenticated &&\n onCheckReadMyInstitutionsPermissions(role.permissions)\n ) {\n isAllowedRole = true;\n } else if (\n path &&\n path === \"/my-clinic/documents\" &&\n isAuthenticated &&\n onCheckMyInstitutionsFilesPermissions(role.permissions)\n ) {\n isAllowedRole = true;\n } else if (\n path &&\n path === \"/my-clinic/documents/upload\" &&\n isAuthenticated &&\n onCheckCreateMyInstitutionsFilesPermissions(role.permissions)\n ) {\n isAllowedRole = true;\n }\n return {\n component: null,\n restProps: null,\n isAllowedRoute:\n config.companyDomain.length > 0 &&\n isAuthenticated &&\n isAllowedRole &&\n (user.institution || user.activeRotation) &&\n true,\n redirectTo: \"/home\",\n };\n};\nconst mapDispatchToProps = (dispatch: Function) => {\n const { myInstitution } = store.getState().auth;\n if (myInstitution.loaded) {\n dispatch(\n Auth.authFetchMyInstitution({ institutionId: myInstitution.data._id })\n );\n }\n return { dispatch };\n};\nconst MyInstitutionRoute: React.ComponentType = withRouter(\n connect(mapStateToProps, mapDispatchToProps)(ProtectedRoute)\n);\n\nexport default MyInstitutionRoute;\n","// @flow\nimport * as React from \"react\";\nimport { connect } from \"react-redux\";\nimport { withRouter } from \"react-router-dom\";\nimport {\n onCheckRotationsPermissions,\n onCheckCreateRotationsPermissions,\n onCheckEditRotationsPermissions,\n onCheckReadPeriodsPermissions,\n} from \"./RotationsPermissions\";\nimport { onCheckReadInstitutionsPermissions } from \"../institutions/InstitutionsPermissions\";\nimport { onCheckReadAllStudentsUsersPermissions } from \"../user-manager/UsersPermissions\";\nimport { onCheckImportDataPermissions } from \"../import/ImportDataPermissions\";\nimport { store } from \"../../index\";\nimport { Rotations } from \"../../store/actions/\";\nimport ProtectedRoute from \"../shared/ProtectedRoute\";\n\nconst mapDispatchToProps = (dispatch: Function, ownProps: Object) => {\n const {\n computedMatch: {\n params: { rotationId },\n },\n location: { state },\n } = ownProps;\n const { rotationId: storedRotationId } = store.getState().rotations;\n if (rotationId && rotationId !== storedRotationId) {\n if (state && state.rotation) {\n dispatch(\n Rotations.rotationsFetchRotationSuccess({ rotation: state.rotation })\n );\n }\n dispatch(Rotations.rotationsSetRotationId({ rotationId }));\n }\n return { dispatch };\n};\nconst RotationsRoute: React.ComponentType = withRouter(\n connect(\n (\n {\n config: { companyDomain },\n auth: { isAuthenticated, role },\n rotations: {\n rotation,\n rotationCreateEdit: { canConfirmRotation },\n },\n },\n {\n path,\n computedMatch: {\n params: { create_edit_confirm, rotationId },\n },\n }\n ) => {\n let allowedRole =\n isAuthenticated &&\n (onCheckRotationsPermissions(role.permissions) ||\n onCheckImportDataPermissions(role.permissions));\n let redirectToAllowed = \"/rotations\";\n if (!allowedRole) {\n redirectToAllowed = \"/home\";\n }\n let allowedRotationsRoute = allowedRole;\n if (allowedRotationsRoute && create_edit_confirm) {\n if (\n isAuthenticated &&\n (onCheckCreateRotationsPermissions(role.permissions) ||\n onCheckEditRotationsPermissions(role.permissions))\n ) {\n if (\n create_edit_confirm === \"create\" ||\n create_edit_confirm === \"edit\" ||\n create_edit_confirm === \"confirm\"\n ) {\n if (create_edit_confirm === \"create\") {\n if (\n rotationId ||\n (!onCheckCreateRotationsPermissions(role.permissions) &&\n !onCheckReadPeriodsPermissions(role.permissions) &&\n !onCheckReadInstitutionsPermissions(role.permissions) &&\n !onCheckReadAllStudentsUsersPermissions(role.permissions))\n ) {\n allowedRotationsRoute = false;\n }\n }\n if (create_edit_confirm === \"edit\") {\n if (\n !rotationId ||\n (!onCheckEditRotationsPermissions(role.permissions) &&\n !onCheckReadPeriodsPermissions(role.permissions) &&\n !onCheckReadInstitutionsPermissions(role.permissions) &&\n !onCheckReadAllStudentsUsersPermissions(role.permissions))\n ) {\n allowedRotationsRoute = false;\n }\n }\n if (create_edit_confirm === \"confirm\" && !canConfirmRotation) {\n if (rotation && rotation._id) {\n redirectToAllowed = `/rotations/edit/${rotation._id}`;\n }\n allowedRotationsRoute = false;\n }\n } else {\n allowedRotationsRoute = false;\n }\n } else {\n allowedRotationsRoute = false;\n }\n }\n if (\n (path === \"/rotations/import\" ||\n path === \"/rotations/import/generate-csv\" ||\n path === \"/rotations/import/status\") &&\n isAuthenticated &&\n !onCheckImportDataPermissions(role.permissions)\n ) {\n allowedRole = false;\n }\n if (\n (path === \"/rotations/schedulers\" ||\n path === \"/rotations/schedulers/automatic\" ||\n path === \"/rotations/schedulers/automatic/confirm\") &&\n isAuthenticated &&\n !onCheckCreateRotationsPermissions(role.permissions)\n ) {\n allowedRole = false;\n }\n return {\n component: null,\n restProps: null,\n isAllowedRoute:\n companyDomain.length > 0 &&\n isAuthenticated &&\n allowedRole &&\n allowedRotationsRoute,\n redirectTo:\n companyDomain.length > 0 && isAuthenticated && allowedRole\n ? redirectToAllowed\n : \"/home\",\n };\n },\n mapDispatchToProps\n )(ProtectedRoute)\n);\n\nexport default RotationsRoute;\n","// @flow\nimport * as React from \"react\";\nimport { connect } from \"react-redux\";\nimport { withRouter } from \"react-router-dom\";\nimport { onCheckEvaluationsPermissions } from \"../evaluations/EvaluationsPermissions\";\nimport { onCheckEvaluationSchedulersPermissions } from \"../evaluations-schedulers/EvaluationSchedulersPermissions\";\nimport {\n onCheckEvaluationTemplatesPermissions,\n onCheckReadEvaluationTemplatesPermissions,\n onCheckCreateEvaluationTemplatesPermissions,\n onCheckEditEvaluationTemplatesPermissions,\n} from \"./EvaluationTemplatesPermissions\";\nimport { store } from \"../../index\";\nimport { EvaluationsTemplates } from \"../../store/actions/\";\nimport ProtectedRoute from \"../shared/ProtectedRoute\";\n\nconst mapDispatchToProps = (dispatch: Function, ownProps: Object) => {\n const {\n computedMatch: {\n params: { templateId },\n },\n location: { state },\n } = ownProps;\n const { evaluationTemplateId: storedEvaluationTemplateId } =\n store.getState().evaluationsTemplates;\n if (templateId && templateId !== storedEvaluationTemplateId) {\n if (state && state.template) {\n dispatch(\n EvaluationsTemplates.evaluationsTemplatesFetchFormSuccess({\n evaluationTemplate: state.template,\n })\n );\n }\n dispatch(\n EvaluationsTemplates.evaluationsTemplatesSetEvaluationTemplateId({\n evaluationTemplateId: templateId,\n })\n );\n }\n return { dispatch };\n};\nconst EvaluationsTemplatesRoute: React.ComponentType = withRouter(\n connect(\n (\n { config, auth: { isAuthenticated, role } },\n {\n computedMatch: {\n params: { create_edit_view, templateId },\n },\n }\n ) => {\n let isAllowedRoute =\n isAuthenticated &&\n onCheckEvaluationTemplatesPermissions(role.permissions);\n let isAllowedEvaluationsRoute =\n isAuthenticated &&\n (onCheckEvaluationsPermissions(role.permissions) ||\n onCheckEvaluationSchedulersPermissions(role.permissions) ||\n onCheckEvaluationTemplatesPermissions(role.permissions));\n let redirectTo = \"/home\";\n if (isAllowedEvaluationsRoute) {\n redirectTo = \"/evaluations\";\n }\n if (isAllowedRoute && create_edit_view) {\n if (create_edit_view === \"create\") {\n if (templateId) {\n isAllowedRoute = false;\n } else if (\n create_edit_view === \"create\" &&\n !onCheckCreateEvaluationTemplatesPermissions(role.permissions)\n ) {\n isAllowedRoute = false;\n }\n } else if (create_edit_view === \"edit\" || create_edit_view === \"view\") {\n if (!templateId) {\n isAllowedRoute = false;\n } else if (\n create_edit_view === \"edit\" &&\n !onCheckEditEvaluationTemplatesPermissions(role.permissions)\n ) {\n isAllowedRoute = false;\n } else if (\n create_edit_view === \"view\" &&\n !onCheckReadEvaluationTemplatesPermissions(role.permissions)\n ) {\n isAllowedRoute = false;\n }\n } else {\n isAllowedRoute = false;\n }\n }\n return {\n component: null,\n restProps: null,\n isAllowedRoute:\n config.companyDomain.length > 0 && isAuthenticated && isAllowedRoute,\n redirectTo,\n };\n },\n mapDispatchToProps\n )(ProtectedRoute)\n);\n\nexport default EvaluationsTemplatesRoute;\n","// @flow\nimport * as React from \"react\";\nimport { connect } from \"react-redux\";\nimport { withRouter } from \"react-router-dom\";\nimport { onCheckEvaluationsPermissions } from \"../evaluations/EvaluationsPermissions\";\nimport {\n onCheckEvaluationSchedulersPermissions,\n onCheckCreateEvaluationSchedulersPermissions,\n} from \"./EvaluationSchedulersPermissions\";\nimport { onCheckEvaluationTemplatesPermissions } from \"../evaluations-templates/EvaluationTemplatesPermissions\";\nimport ProtectedRoute from \"../shared/ProtectedRoute\";\n\nconst EvaluationsSchedulersRoute: React.ComponentType = withRouter(\n connect(({ config, auth: { isAuthenticated, role } }) => {\n let isAllowedRoute =\n isAuthenticated &&\n onCheckCreateEvaluationSchedulersPermissions(role.permissions);\n let isAllowedEvaluationsRoute =\n isAuthenticated &&\n (onCheckEvaluationsPermissions(role.permissions) ||\n onCheckEvaluationSchedulersPermissions(role.permissions) ||\n onCheckEvaluationTemplatesPermissions(role.permissions));\n let redirectTo = \"/home\";\n if (isAllowedEvaluationsRoute) {\n redirectTo = \"/evaluations\";\n }\n return {\n component: null,\n restProps: null,\n isAllowedRoute:\n config.companyDomain.length > 0 && isAuthenticated && isAllowedRoute,\n redirectTo,\n };\n })(ProtectedRoute)\n);\n\nexport default EvaluationsSchedulersRoute;\n","// @flow\nimport * as React from \"react\";\nimport { connect } from \"react-redux\";\nimport { withRouter } from \"react-router-dom\";\nimport { onCheckEvaluationsPermissions } from \"./EvaluationsPermissions\";\nimport {\n onCheckEvaluationSchedulersPermissions,\n onCheckReadEvaluationSchedulersPermissions,\n} from \"../evaluations-schedulers/EvaluationSchedulersPermissions\";\nimport { onCheckEvaluationTemplatesPermissions } from \"../evaluations-templates/EvaluationTemplatesPermissions\";\nimport { store } from \"../../index\";\nimport { Evaluations } from \"../../store/actions/\";\nimport ProtectedRoute from \"../shared/ProtectedRoute\";\n\nconst mapDispatchToProps = (dispatch: Function, ownProps: Object) => {\n const {\n computedMatch: {\n params: { evaluationId, answerId },\n },\n location: { state },\n } = ownProps;\n const { evaluationId: storedEvaluationId, answerId: storedAnswerId } =\n store.getState().evaluations;\n if (evaluationId && evaluationId !== storedEvaluationId) {\n if (state && state.evaluation) {\n dispatch(\n Evaluations.evaluationsFetchEvaluationSuccess({\n evaluation: state.evaluation,\n })\n );\n }\n dispatch(Evaluations.evaluationsSetEvaluationId({ evaluationId }));\n }\n if (answerId && answerId !== storedAnswerId) {\n if (state && state.answer) {\n dispatch(\n Evaluations.evaluationsFetchEvaluationAnswerSuccess({\n answer: state.answer,\n })\n );\n }\n dispatch(Evaluations.evaluationsSetAnswerId({ answerId }));\n }\n return { dispatch };\n};\nconst EvaluationsRoute: React.ComponentType = withRouter(\n connect(\n (\n { config, auth: { isAuthenticated, role } },\n {\n path,\n computedMatch: {\n params: { evaluationId, answers_review, answerId },\n url,\n },\n }\n ) => {\n let allowedEvaluationsRoute =\n config.companyDomain.length > 0 &&\n isAuthenticated &&\n (onCheckEvaluationsPermissions(role.permissions) ||\n onCheckEvaluationSchedulersPermissions(role.permissions) ||\n onCheckEvaluationTemplatesPermissions(role.permissions));\n let redirectTo = allowedEvaluationsRoute ? \"/evaluations\" : \"/home\";\n if (\n allowedEvaluationsRoute &&\n path &&\n path === \"/evaluations/schedulers\" &&\n !onCheckReadEvaluationSchedulersPermissions(role.permissions)\n ) {\n allowedEvaluationsRoute = false;\n } else if (\n allowedEvaluationsRoute &&\n path &&\n path ===\n \"/evaluations/:evaluationId(\\\\w+)?/:answers_review?/:answerId(\\\\w+)?\" &&\n url\n ) {\n if (allowedEvaluationsRoute && evaluationId) {\n if (!answers_review) {\n allowedEvaluationsRoute = false;\n } else {\n if (answers_review !== \"answers\" && answers_review !== \"review\") {\n allowedEvaluationsRoute = false;\n } else if (answers_review === \"answers\" && !answerId) {\n allowedEvaluationsRoute = false;\n }\n }\n }\n }\n return {\n component: null,\n restProps: null,\n isAllowedRoute:\n config.companyDomain.length > 0 &&\n isAuthenticated &&\n allowedEvaluationsRoute,\n redirectTo,\n };\n },\n mapDispatchToProps\n )(ProtectedRoute)\n);\n\nexport default EvaluationsRoute;\n","// @flow\nimport * as React from \"react\";\nimport { connect } from \"react-redux\";\nimport { withRouter } from \"react-router-dom\";\nimport {\n onCheckCaseLogsPermissions,\n onCheckSubmitCaseLogsPermissions,\n onCheckEditCaseLogsPermissions,\n onCheckReviewCaseLogsPermissions,\n} from \"./CaseLogsPermissions\";\nimport { store } from \"../../index\";\nimport { CaseLogs } from \"../../store/actions/\";\nimport ProtectedRoute from \"../shared/ProtectedRoute\";\n\nconst mapDispatchToProps = (dispatch: Function, ownProps: Object) => {\n const {\n computedMatch: {\n params: { caseLogId },\n },\n } = ownProps;\n const { caseLogId: storedCaseLogId } = store.getState().caseLogs;\n if (caseLogId && caseLogId !== storedCaseLogId) {\n dispatch(CaseLogs.caseLogsSetcaseLogId({ caseLogId }));\n }\n return { dispatch };\n};\nconst CaseLogsRoute: React.ComponentType = withRouter(\n connect(\n (\n { config: { companyDomain }, auth: { isAuthenticated, role, user } },\n {\n computedMatch: {\n params: { create_edit_re_view, caseLogId },\n url,\n },\n }\n ) => {\n let allowedCaseLogsRoute =\n isAuthenticated && onCheckCaseLogsPermissions(role.permissions);\n let redirectTo = allowedCaseLogsRoute ? \"/case-logs\" : \"/home\";\n if (allowedCaseLogsRoute && create_edit_re_view) {\n if (\n create_edit_re_view === \"create\" ||\n create_edit_re_view === \"edit\" ||\n create_edit_re_view === \"review\" ||\n create_edit_re_view === \"view\"\n ) {\n if (create_edit_re_view === \"create\") {\n if (caseLogId) {\n allowedCaseLogsRoute = false;\n } else if (\n isAuthenticated &&\n !onCheckSubmitCaseLogsPermissions(role.permissions)\n ) {\n allowedCaseLogsRoute = false;\n }\n }\n if (\n create_edit_re_view === \"edit\" ||\n create_edit_re_view === \"review\" ||\n create_edit_re_view === \"view\"\n ) {\n if (!caseLogId) {\n allowedCaseLogsRoute = false;\n } else if (\n create_edit_re_view === \"edit\" &&\n !onCheckEditCaseLogsPermissions(role.permissions)\n ) {\n allowedCaseLogsRoute = false;\n } else if (\n create_edit_re_view === \"review\" &&\n !onCheckReviewCaseLogsPermissions(role.permissions)\n ) {\n allowedCaseLogsRoute = false;\n }\n }\n } else {\n allowedCaseLogsRoute = false;\n }\n }\n return {\n component: null,\n restProps: null,\n isAllowedRoute:\n companyDomain.length > 0 && isAuthenticated && allowedCaseLogsRoute,\n redirectTo,\n };\n },\n mapDispatchToProps\n )(ProtectedRoute)\n);\n\nexport default CaseLogsRoute;\n","// @flow\nimport * as React from \"react\";\nimport { connect } from \"react-redux\";\nimport { withRouter } from \"react-router-dom\";\nimport { store } from \"../../index\";\nimport {\n onCheckReadChartsPermissions,\n onCheckReadQueriesPermissions,\n onCheckReadAllReportsPermissions,\n onCheckCreateQueriesPermissions,\n onCheckEditQueriesPermissions,\n} from \"./ReportsPermissions\";\nimport { Reports } from \"../../store/actions/\";\nimport { onCreateQueryParams } from \"../../store/sagas/reports\";\nimport ProtectedRoute from \"../shared/ProtectedRoute\";\n\nconst mapDispatchToProps = (dispatch: Function, ownProps: Object) => {\n const {\n computedMatch: {\n params: { queryId, reportId },\n },\n location: { state },\n } = ownProps;\n const { queryId: storedQueryId, reportId: storedReportId } =\n store.getState().reports;\n if (queryId && queryId !== storedQueryId) {\n if (state && state.query) {\n dispatch(\n Reports.reportsFetchQuerySuccess({\n query: state.query,\n queryParams: onCreateQueryParams(state.query),\n })\n );\n }\n dispatch(\n Reports.reportsSetQueryId({\n queryId,\n })\n );\n }\n if (reportId && reportId !== storedReportId) {\n if (state && state.report) {\n dispatch(\n Reports.reportsQueriesFetchReportSuccess({\n report: state.report,\n query: state.report.query,\n queryParams: onCreateQueryParams(state.report.query),\n })\n );\n }\n dispatch(\n Reports.reportsQueriesSetReportId({\n reportId,\n })\n );\n }\n return { dispatch };\n};\nconst ReportsRoute: React.ComponentType = withRouter(\n connect(\n (\n { config, auth: { isAuthenticated, role } },\n {\n path,\n computedMatch: {\n params: { queryId, reportId },\n },\n }\n ) => {\n let isAllowedRoute = isAuthenticated && role.permissions ? true : false;\n let redirectTo = \"/home\";\n if (isAllowedRoute) {\n if (onCheckReadAllReportsPermissions(role.permissions)) {\n redirectTo = \"/reports\";\n } else if (onCheckReadChartsPermissions(role.permissions)) {\n redirectTo = \"/reports/dashboard\";\n } else if (onCheckReadQueriesPermissions(role.permissions)) {\n redirectTo = \"/reports/dashboard/queries\";\n } else {\n redirectTo = \"/home\";\n isAllowedRoute = false;\n }\n }\n if (\n isAllowedRoute &&\n path &&\n path ===\n \"/reports/dashboard/query/:queryId(\\\\w+)/result/:reportId(\\\\w+)\" &&\n queryId &&\n reportId &&\n !onCheckReadAllReportsPermissions(role.permissions)\n ) {\n // CHECK PERMISSIONS\n isAllowedRoute = false;\n } else if (\n isAllowedRoute &&\n path &&\n path === \"/reports/dashboard/query/:queryId(\\\\w+)/results\" &&\n queryId &&\n !onCheckReadAllReportsPermissions(role.permissions)\n ) {\n // CHECK PERMISSIONS\n isAllowedRoute = false;\n } else if (\n isAllowedRoute &&\n path &&\n path === \"/reports/dashboard/query/:queryId(\\\\w+)/edit\" &&\n queryId &&\n !onCheckEditQueriesPermissions(role.permissions)\n ) {\n // CHECK PERMISSIONS\n isAllowedRoute = false;\n } else if (\n isAllowedRoute &&\n path &&\n path === \"/reports/dashboard/query/create\" &&\n !onCheckCreateQueriesPermissions(role.permissions)\n ) {\n // CHECK PERMISSIONS\n isAllowedRoute = false;\n } else if (\n isAllowedRoute &&\n path &&\n path === \"/reports/dashboard/queries\" &&\n !onCheckReadQueriesPermissions(role.permissions)\n ) {\n // CHECK PERMISSIONS\n isAllowedRoute = false;\n } else if (\n isAllowedRoute &&\n path &&\n path === \"/reports/dashboard/custom-reports\" &&\n !onCheckReadAllReportsPermissions(role.permissions)\n ) {\n // CHECK PERMISSIONS\n isAllowedRoute = false;\n } else if (\n isAllowedRoute &&\n path &&\n path === \"/reports/dashboard\" &&\n !onCheckReadChartsPermissions(role.permissions)\n ) {\n // CHECK PERMISSIONS\n isAllowedRoute = false;\n } else if (\n isAllowedRoute &&\n path &&\n (path === \"/reports\" ||\n path === \"/reports/case/:standardId([1-9][0-9]*)\" ||\n path ===\n \"/reports/case/:standardId([1-9][0-9]*)/:reportId([a-zA-Z0-9]{24})\") &&\n !onCheckReadAllReportsPermissions(role.permissions)\n ) {\n // CHECK PERMISSIONS\n isAllowedRoute = false;\n }\n return {\n component: null,\n restProps: null,\n isAllowedRoute:\n config.companyDomain.length > 0 && isAuthenticated && isAllowedRoute,\n redirectTo,\n };\n },\n mapDispatchToProps\n )(ProtectedRoute)\n);\n\nexport default ReportsRoute;\n","// @flow\nimport * as React from \"react\";\nimport { connect } from \"react-redux\";\nimport { withRouter } from \"react-router-dom\";\nimport ProtectedRoute from \"../shared/ProtectedRoute\";\nconst AccountSettingsRoute: React.ComponentType = withRouter(\n connect(({ config, auth: { isAuthenticated, role } }) => {\n let redirectTo = \"/home\";\n return {\n component: null,\n restProps: null,\n isAllowedRoute:\n config.companyDomain.length > 0 && isAuthenticated && role.permissions,\n redirectTo,\n };\n })(ProtectedRoute)\n);\nexport default AccountSettingsRoute;\n","// @flow\nimport * as React from \"react\";\nimport { connect } from \"react-redux\";\nimport {\n onCheckReadProgramsPermissions,\n onCheckCUDProgramsPermissions,\n onCheckReadCohortsPermissions,\n onCheckCUDCohortsPermissions,\n onCheckReadFileCategoriesPermissions,\n onCheckCUDFileCategoriesPermissions,\n onCheckReadCustomFieldsPermissions,\n onCheckCUDCustomFieldsPermissions,\n onCheckReadRolesPermissions,\n onCheckCUDRolesPermissions,\n onCheckReadTenantSettingsPermissions,\n onCheckCUDTenantSettingsPermissions,\n onCheckEditTenantSettingsPermissions,\n} from \"./AdminPortalPermissions\";\nimport { onCheckReadMyCompaniesPermissions } from \"../company/CompaniesPermissions\";\nimport {\n onCheckReadPeriodsPermissions,\n onCheckCUDPeriodsPermissions,\n} from \"../rotations/RotationsPermissions\";\nimport { withRouter } from \"react-router-dom\";\nimport ProtectedRoute from \"../shared/ProtectedRoute\";\n\nconst AdminPortalRoute: React.ComponentType = withRouter(\n connect(({ config, auth: { isAuthenticated, role } }, { path }) => {\n let isAllowedRoute = false;\n let redirectTo = \"/home\";\n if (isAuthenticated && role.permissions) {\n const authPermissions = role.permissions;\n switch (path) {\n case \"/admin\":\n if (\n role.type === \"supercompanyadministrators\" &&\n onCheckReadTenantSettingsPermissions(authPermissions)\n ) {\n redirectTo = \"/admin/general-settings\";\n } else if (\n (onCheckReadProgramsPermissions(authPermissions) &&\n onCheckCUDProgramsPermissions(authPermissions)) ||\n (onCheckReadCohortsPermissions(authPermissions) &&\n onCheckCUDCohortsPermissions(authPermissions))\n ) {\n redirectTo = \"/admin/programs-cohorts\";\n } else if (\n onCheckReadFileCategoriesPermissions(authPermissions) &&\n onCheckCUDFileCategoriesPermissions(authPermissions)\n ) {\n redirectTo = \"/admin/documents-settings\";\n } else if (\n onCheckReadCustomFieldsPermissions(authPermissions) &&\n onCheckCUDCustomFieldsPermissions(authPermissions)\n ) {\n redirectTo = \"/admin/custom-fields\";\n } else if (\n onCheckReadRolesPermissions(authPermissions) &&\n onCheckCUDRolesPermissions(authPermissions)\n ) {\n redirectTo = \"/admin/access-control\";\n } else if (\n onCheckReadTenantSettingsPermissions(authPermissions) &&\n onCheckCUDTenantSettingsPermissions(authPermissions)\n ) {\n redirectTo = \"/admin/case-logs-settings\";\n } else if (\n onCheckReadPeriodsPermissions(authPermissions) &&\n onCheckCUDPeriodsPermissions(authPermissions)\n ) {\n redirectTo = \"/admin/rotations-settings\";\n } else if (\n onCheckReadRolesPermissions(authPermissions) &&\n onCheckReadTenantSettingsPermissions(authPermissions) &&\n onCheckEditTenantSettingsPermissions(authPermissions)\n ) {\n redirectTo = \"/admin/broadcast-settings\";\n }\n break;\n case \"/admin/general-settings\":\n if (\n role.type === \"supercompanyadministrators\" &&\n onCheckReadTenantSettingsPermissions(authPermissions)\n ) {\n isAllowedRoute = true;\n }\n break;\n case \"/admin/programs-cohorts\":\n if (\n (onCheckReadProgramsPermissions(authPermissions) &&\n onCheckCUDProgramsPermissions(authPermissions)) ||\n (onCheckReadCohortsPermissions(authPermissions) &&\n onCheckCUDCohortsPermissions(authPermissions))\n ) {\n isAllowedRoute = true;\n }\n break;\n case \"/admin/documents-settings\":\n if (\n onCheckReadFileCategoriesPermissions(authPermissions) &&\n onCheckCUDFileCategoriesPermissions(authPermissions)\n ) {\n isAllowedRoute = true;\n }\n break;\n case \"/admin/custom-fields\":\n if (\n onCheckReadCustomFieldsPermissions(authPermissions) &&\n onCheckCUDCustomFieldsPermissions(authPermissions)\n ) {\n isAllowedRoute = true;\n }\n break;\n case \"/admin/access-control\":\n if (\n onCheckReadRolesPermissions(authPermissions) &&\n onCheckCUDRolesPermissions(authPermissions)\n ) {\n isAllowedRoute = true;\n }\n break;\n case \"/admin/case-logs-settings\":\n case \"/admin/evaluations-settings\":\n case \"/admin/clinics-settings\":\n if (\n onCheckReadTenantSettingsPermissions(authPermissions) &&\n onCheckCUDTenantSettingsPermissions(authPermissions)\n ) {\n isAllowedRoute = true;\n }\n break;\n case \"/admin/rotations-settings\":\n if (\n (onCheckReadTenantSettingsPermissions(authPermissions) &&\n onCheckCUDTenantSettingsPermissions(authPermissions)) ||\n (onCheckReadPeriodsPermissions(authPermissions) &&\n onCheckCUDPeriodsPermissions(authPermissions))\n ) {\n isAllowedRoute = true;\n }\n break;\n case \"/admin/broadcast-settings\":\n case \"/admin/notifications-settings\":\n if (\n onCheckReadRolesPermissions(authPermissions) &&\n onCheckReadTenantSettingsPermissions(authPermissions) &&\n onCheckEditTenantSettingsPermissions(authPermissions)\n ) {\n isAllowedRoute = true;\n }\n break;\n case \"/admin/subscription\":\n if (\n role.type === \"supercompanyadministrators\" &&\n onCheckReadTenantSettingsPermissions(authPermissions) &&\n onCheckReadMyCompaniesPermissions(authPermissions)\n ) {\n isAllowedRoute = true;\n }\n break;\n default:\n }\n }\n return {\n component: null,\n restProps: null,\n isAllowedRoute:\n config.companyDomain.length > 0 &&\n isAuthenticated &&\n role.permissions &&\n isAllowedRoute,\n redirectTo,\n };\n })(ProtectedRoute)\n);\n\nexport default AdminPortalRoute;\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://cra.link/PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(/^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)\n);\n\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://cra.link/PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n navigator.serviceWorker\n .register(swUrl)\n .then((registration) => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://cra.link/PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch((error) => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' },\n })\n .then((response) => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then((registration) => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log('No internet connection found. App is running in offline mode.');\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready\n .then((registration) => {\n registration.unregister();\n })\n .catch((error) => {\n console.error(error.message);\n });\n }\n}\n","// @flow\nimport * as React from \"react\";\nimport { connect } from \"react-redux\";\nimport { Auth } from \"../../store/actions/\";\nimport * as serviceWorkerRegistration from \"../../utils/service-worker/serviceWorkerRegistration\";\nimport Loader from \"../shared/Loader\";\n\ntype Props = {\n config: Object,\n isTokenExpired: boolean,\n signOut: (payload: Object) => void,\n};\n\nclass SignOutContainer extends React.Component {\n onDoingSignOut = () => {\n const { signOut } = this.props;\n return new Promise((resolve, reject) => {\n const callbacks = {\n callbackError: (error) => {\n serviceWorkerRegistration.unregister();\n window.logger.log(\"error\", error);\n reject(error);\n },\n callbackSuccess: () => {\n serviceWorkerRegistration.unregister();\n resolve();\n },\n };\n const payload = Object.assign({}, callbacks);\n signOut(payload);\n });\n };\n onSignOut = () => {\n const { baseDomain, port } = this.props.config;\n const pathToWebsite: string = `${baseDomain}${port ? \":3000\" : \"\"}/signin`;\n this.onDoingSignOut()\n .then(() => {\n window.location.replace(pathToWebsite);\n })\n .catch((error) => {\n window.logger.log(\"onSignOut\", error);\n window.location.replace(pathToWebsite);\n });\n };\n componentDidMount() {\n const { isTokenExpired } = this.props;\n if (isTokenExpired) {\n setTimeout(() => {\n this.onSignOut();\n }, 3000);\n } else {\n this.onSignOut();\n }\n }\n render() {\n const { isTokenExpired } = this.props;\n return (\n \n );\n }\n}\n\nconst bindActions = (dispatch) => {\n return {\n signOut: (payload) => dispatch(Auth.authSignOutApp(payload)),\n };\n};\n\nexport default connect(null, bindActions)(SignOutContainer);\n","// @flow\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { withRouter } from 'react-router-dom';\nimport SignOutContainer from './SignOutContainer';\nimport ProtectedRoute from '../shared/ProtectedRoute';\n\nconst SignOutRoute: React.ComponentType = withRouter(\n connect(({ config, auth: { isAuthenticated, expiredToken } }, { path }) => {\n return {\n component: SignOutContainer,\n restProps: {\n isAuthenticated,\n config,\n isTokenExpired: path === '/signout/session-expired' ? true : false\n },\n isAllowedRoute: true,\n redirectTo: '/home'\n };\n })(ProtectedRoute)\n);\n\nexport default SignOutRoute;\n","// Features\nimport * as React from \"react\";\nimport { setParseUTCtimeToLocale } from \"../../../utils/index\";\n// Components\nimport { Icon, Modal, Button, Checkbox } from \"semantic-ui-react\";\nimport Slider from \"react-slick\";\n// Types\n// Import Types\nimport type { ButtonProps, CheckboxProps } from \"semantic-ui-react\";\nimport type { State as StateBroadcastMessages } from \"../../../store/reducers/broadcastMessages\";\n// Broadcast Show Messages View:\nconst { createRef, useState } = React;\n//\nconst BroadcastMessagesView = ({\n messages,\n onConfirm,\n}: React.PropsWithChildren<{\n messages: StateBroadcastMessages[\"broadcastMessages\"];\n onConfirm: (\n ev: React.MouseEvent,\n data: ButtonProps\n ) => void;\n}>) => {\n // Ref\n const sliderRef = createRef();\n // State\n const [indexSliderSelected, setIndexSliderSelected] = useState(0);\n const [broadcastMessagesWatched, setBroadcastMessagesWatched] = useState<\n string[]\n >([]);\n // METHODS\n const onNextMessage = () => sliderRef.current?.slickNext();\n const onPrevMessage = () => sliderRef.current?.slickPrev();\n const onSelectedSlider = (\n event: React.MouseEvent,\n { value }: CheckboxProps\n ) => {\n const broadcastMessageWatched = value as string;\n window.logger.log(\n \"onSelectedSlider\",\n broadcastMessagesWatched,\n broadcastMessageWatched\n );\n let newBroadcastMessagesWatched = [...broadcastMessagesWatched];\n if (broadcastMessagesWatched.indexOf(broadcastMessageWatched) === -1) {\n newBroadcastMessagesWatched.push(broadcastMessageWatched);\n } else {\n newBroadcastMessagesWatched = newBroadcastMessagesWatched.filter(\n (broadcastMessageWatchedToRemove) =>\n broadcastMessageWatchedToRemove !== broadcastMessageWatched\n );\n }\n setBroadcastMessagesWatched(newBroadcastMessagesWatched);\n };\n // Constants\n const totalMessages = messages.length,\n sliderToShow = messages[indexSliderSelected]._id;\n // RENDERS\n return (\n
\n \n \n \n Important Message\n {totalMessages > 1 &&\n ` (${indexSliderSelected + 1}/${totalMessages})`}\n \n \n setIndexSliderSelected(next)}\n dots={false}\n infinite={false}\n ref={sliderRef}\n >\n {messages.map(({ _id, message, createdAt, updatedAt }, index) => (\n \n
{message}
\n
\n {setParseUTCtimeToLocale(updatedAt || createdAt).format(\n \"MMM DD [at] HH:mm\"\n )}\n
\n
\n ))}\n \n
\n \n {totalMessages > 1 && (\n \n Back\n \n )}\n {indexSliderSelected < totalMessages - 1 && (\n \n Next\n \n \n )}\n {indexSliderSelected === totalMessages - 1 && (\n \n Confirm\n \n \n )}\n
\n \n
\n
\n \n
\n );\n};\n\nexport default BroadcastMessagesView;\n","// Features\nimport * as React from \"react\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { AccountSettings } from \"../../../store/actions/\";\nimport { setMomentDate } from \"../../../utils\";\n// Components\nimport BroadcastMessagesView from \"./BroadcastMessages.view\";\n// Styles\nimport \"./BroadcastMessages.scss\";\n// Types\nimport type { ButtonProps } from \"semantic-ui-react\";\nimport type { RootState } from \"../../../store/reducers\";\nimport type { State as StateBroadcastMessages } from \"../../../store/reducers/broadcastMessages\";\nimport type { StateAccountSettings } from \"../../../types/accountSettings.types\";\n// Broadcast Show Messages Container:\nconst { useState } = React;\n//\nconst BroadcastMessagesContainer = () => {\n const dispatch = useDispatch();\n // STORE - Broadcast Messages\n const {\n hasBroadcastMessages,\n broadcastMessages = [],\n broadcastMessagesWatched = [],\n }: StateBroadcastMessages = useSelector(\n ({ broadcastMessages }: RootState) => broadcastMessages\n );\n let messages: StateBroadcastMessages[\"broadcastMessages\"] = [];\n if (hasBroadcastMessages) {\n messages = broadcastMessages.filter(({ _id, expirationDate }) => {\n if (\n (!expirationDate ||\n (expirationDate && setMomentDate().isSameOrBefore(expirationDate))) &&\n broadcastMessagesWatched.indexOf(_id) === -1\n ) {\n return true;\n }\n return false;\n });\n }\n // State\n const [hideModal, setHideModal] = useState(false);\n //\n // METHODS\n const onConfirm = (\n ev: React.MouseEvent,\n { value: newMessagesWatched }: ButtonProps\n ) => {\n setHideModal(true);\n if (newMessagesWatched.length) {\n const messagesWatched = [\n ...broadcastMessagesWatched,\n ...newMessagesWatched,\n ],\n payload: {\n accountSettingsName: \"BROADCAST_MESSAGES_SETTINGS\";\n newSetting: StateAccountSettings[\"frontendPersonalization\"][\"BROADCAST_MESSAGES_SETTINGS\"];\n } = {\n accountSettingsName: \"BROADCAST_MESSAGES_SETTINGS\",\n newSetting: { messagesWatched },\n };\n dispatch(AccountSettings.accountSettingsUpdateSettingName(payload));\n dispatch(AccountSettings.accountSettingsUpdateFrontendPersonalization());\n }\n };\n // RENDERS\n const showModal = !hideModal && messages.length > 0;\n if (!showModal) {\n return null;\n }\n return ;\n};\nexport default BroadcastMessagesContainer;\n","// @flow\n// Import Features\nimport * as React from 'react';\n// Import Components\nimport { Message, Transition } from 'semantic-ui-react';\n// Import Types\nimport type { PropsPresentational as Props } from './FieldsWarningContainer';\n\nclass FieldsWarningPresentational extends React.Component {\n render() {\n const styles = {\n zIndex: '9999',\n position: 'absolute',\n bottom: '10px',\n right: '5px'\n };\n const { triggerAnimation } = this.props;\n return (\n \n \n Please complete all required fields.\n \n \n );\n }\n}\n\nexport default FieldsWarningPresentational;\n","// @flow\n// Import Features\nimport * as React from \"react\";\nimport { connect } from \"react-redux\";\n// Import Components\nimport FieldsWarningPresentational from \"./FieldsWarningPresentational\";\n// Import Styles\nimport \"./FieldsWarning.scss\";\n\ntype PropsContainer = {\n showWarning: boolean,\n};\nexport type PropsPresentational = {\n triggerAnimation: boolean,\n};\ntype Props = PropsContainer & PropsPresentational;\n\nclass FieldsWarningContainer extends React.Component {\n render() {\n const { showWarning, triggerAnimation } = this.props;\n if (!showWarning) {\n return null;\n }\n return ;\n }\n}\n\nexport default connect(\n ({\n auth: {\n role,\n hasContactInfoAddressesFieldsRequiredNull,\n hasEmergencyContactFieldsRequiredNull,\n hasCustomFieldsRequiredNull,\n myInstitution: { hasMyInstitutionCustomFieldsRequiredNull },\n },\n institutions: { hasInstitutionCustomFieldsRequiredNull },\n customFields: { triggerAnimation },\n router: { location },\n }) => ({\n showWarning:\n hasContactInfoAddressesFieldsRequiredNull ||\n hasEmergencyContactFieldsRequiredNull ||\n hasCustomFieldsRequiredNull ||\n (hasInstitutionCustomFieldsRequiredNull &&\n hasInstitutionCustomFieldsRequiredNull.isRequired &&\n hasInstitutionCustomFieldsRequiredNull.institutionRequired &&\n hasInstitutionCustomFieldsRequiredNull.institutionRequired.status ===\n \"active\" &&\n role &&\n (role.apiName === \"InstitutionAdministrators\" ||\n role.apiName === \"Preceptors\") &&\n hasInstitutionCustomFieldsRequiredNull.rolesWrite.indexOf(\n role.apiName\n ) !== -1\n ? true\n : false) ||\n (location &&\n location.pathname &&\n location.pathname === \"/my-clinic\" &&\n hasMyInstitutionCustomFieldsRequiredNull &&\n hasMyInstitutionCustomFieldsRequiredNull.isRequired &&\n hasMyInstitutionCustomFieldsRequiredNull.institutionRequired &&\n hasMyInstitutionCustomFieldsRequiredNull.institutionRequired.status ===\n \"active\" &&\n role &&\n (role.apiName === \"InstitutionAdministrators\" ||\n role.apiName === \"Preceptors\") &&\n hasMyInstitutionCustomFieldsRequiredNull.rolesWrite.indexOf(\n role.apiName\n ) !== -1\n ? true\n : false),\n triggerAnimation,\n }),\n null\n)(FieldsWarningContainer);\n","// @flow\n// Import Features\nimport * as React from \"react\";\n// Import Components\nimport { Message, Transition } from \"semantic-ui-react\";\n// Import Types\ntype Props = {\n onDismissMessage: () => void\n};\nclass FilesRequiredWarningPresentational extends React.Component {\n render() {\n const styles = {\n zIndex: \"9999\",\n position: \"absolute\",\n bottom: \"10px\",\n right: \"5px\"\n };\n const { onDismissMessage } = this.props;\n return (\n \n \n \n You have not uploaded all the required documents. Please check.\n \n \n \n );\n }\n}\n\nexport default FilesRequiredWarningPresentational;\n","// @flow\n// Import Features\nimport * as React from \"react\";\nimport { connect } from \"react-redux\";\n// Import Components\nimport FilesRequiredWarningPresentational from \"./FilesRequiredWarningPresentational\";\n// Import Styles\nimport \"./FilesRequiredWarning.scss\";\n// Types\ntype Props = {\n showWarning: boolean,\n};\ntype State = {\n hideMessage: boolean,\n};\nclass FilesRequiredWarningContainer extends React.Component {\n state = {\n hideMessage: false,\n };\n onDismissMessage = () => this.setState({ hideMessage: true });\n render() {\n const { showWarning } = this.props;\n const { hideMessage } = this.state;\n if (!showWarning || hideMessage) {\n return null;\n }\n return (\n \n );\n }\n}\n\nexport default connect(\n ({\n auth: { fetchingMyFiles, filesRequired = [], isAuthenticated, role },\n fileCategories: { fileCategories },\n }) => ({\n showWarning:\n isAuthenticated &&\n role &&\n role.apiName &&\n !fetchingMyFiles &&\n fileCategories.filter(\n ({ _id: fileCategoryId, isRequired, visibleForRoles }) =>\n isRequired &&\n visibleForRoles.indexOf(role.apiName) !== -1 &&\n filesRequired\n .map(({ category }) => category._id)\n .indexOf(fileCategoryId) === -1\n ).length > 0,\n }),\n null\n)(FilesRequiredWarningContainer);\n","// @flow\n// Import Features\nimport * as React from \"react\";\n// Import Components\nimport { Message, Transition } from \"semantic-ui-react\";\n// Import Types\nimport type { PropsReportsWarningPresentational as Props } from \"../../../types/reports.types\";\nclass ReportsWarningPresentational extends React.Component {\n render() {\n const styles = {\n zIndex: \"9999\",\n position: \"absolute\",\n bottom: \"10px\",\n right: \"5px\",\n };\n const { showWarning } = this.props;\n return (\n \n \n There are new reports generated.\n \n \n );\n }\n}\nexport default ReportsWarningPresentational;\n","// @flow\n// Import Features\nimport * as React from \"react\";\nimport { connect } from \"react-redux\";\nimport { Reports } from \"../../../store/actions/\";\n// Import Components\nimport ReportsWarningPresentational from \"./ReportsWarningPresentational\";\n// Import Styles\nimport \"./ReportsWarning.scss\";\n// Import Types\nimport type { PropsReportsWarningContainer as Props } from \"../../../types/reports.types\";\nclass ReportsWarningContainer extends React.Component {\n getSnapshotBeforeUpdate(prevProps: Props, prevState: any) {\n if (\n prevProps.showWarning !== this.props.showWarning &&\n this.props.showWarning\n ) {\n return true;\n }\n return null;\n }\n render() {\n const { showWarning } = this.props;\n if (!showWarning) {\n return null;\n }\n return ;\n }\n componentDidUpdate(prevProps: Props, prevState: any, showWarning: boolean) {\n if (showWarning) {\n setTimeout(() => {\n this.props.hideReportWarning();\n }, 10000);\n }\n }\n}\nexport default connect(\n ({ reports: { reportsShowWarning }, router: { location } }) => ({\n showWarning:\n reportsShowWarning &&\n location &&\n location.pathname &&\n location.pathname !== \"/reports/dashboard/custom-reports\" &&\n !location.pathname.match(\n /\\/reports\\/dashboard\\/query\\/[a-zA-Z0-9]+\\/results/gi\n ),\n }),\n (dispatch) => ({\n hideReportWarning: () =>\n dispatch(\n Reports.reportsQueriesShowReportWarning({\n hasToShowReportsWarning: false,\n })\n ),\n })\n)(ReportsWarningContainer);\n","// @flow\nimport * as React from 'react';\nimport { Button, Confirm } from 'semantic-ui-react';\n\ntype Props = {\n counter: number,\n onConfirm: () => void\n};\n\nclass ServiceWorkerPresentational extends React.Component {\n render() {\n const { counter, onConfirm } = this.props;\n return (\n \n

New content is available. Heto will refresh in ...

\n

{counter}

\n \n }\n cancelButton={null}\n closeOnDimmerClick={false}\n confirmButton={\n \n }\n onConfirm={onConfirm}\n />\n );\n }\n}\n\nexport default ServiceWorkerPresentational;\n","// @flow\nimport * as React from \"react\";\nimport { connect } from \"react-redux\";\nimport { ServiceWorker } from \"../../store/actions/\";\nimport ServiceWorkerPresentational from \"./ServiceWorkerPresentational\";\nimport \"./ServiceWorker.scss\";\n\ntype Props = {\n refreshButtonShow: boolean,\n onRefreshButtonShow: () => void,\n};\ntype State = {\n counter: number,\n timerId: ?TimeoutID,\n};\n\nclass ServiceWorkerContainer extends React.Component {\n state = {\n counter: 5,\n timerId: null,\n };\n _onSetCountDown = () => {\n this._onCountDown();\n };\n _onCountDown = () => {\n if (this.state.counter === 0) {\n this.onConfirm();\n } else {\n this.setState({ counter: this.state.counter - 1 });\n const timerId = setTimeout(() => {\n this._onCountDown();\n }, 1000);\n this.setState({ timerId });\n }\n };\n onConfirm = () => {\n const { timerId } = this.state;\n if (timerId) {\n clearTimeout(timerId);\n }\n this.setState({\n counter: 5,\n timerId: null,\n });\n const { onRefreshButtonShow } = this.props;\n onRefreshButtonShow();\n window.location.reload();\n };\n componentDidUpdate(prevProps: Props, prevState: any, snapshot: any) {\n if (this.props.refreshButtonShow) {\n if (document.body) {\n document.body.classList.add(\"confirm-service-worker\");\n }\n if (prevProps.refreshButtonShow !== this.props.refreshButtonShow) {\n if (prevState.counter === 5) {\n this._onSetCountDown();\n }\n }\n } else {\n if (prevProps.refreshButtonShow && document.body) {\n document.body.classList.remove(\"confirm-service-worker\");\n }\n }\n }\n render() {\n const { refreshButtonShow } = this.props;\n if (!refreshButtonShow) {\n return null;\n }\n return (\n \n );\n }\n}\n\nconst bindActions = (dispatch) => {\n return {\n onRefreshButtonShow: () =>\n dispatch(ServiceWorker.serviceWorkerRefreshButtonShow()),\n };\n};\n\nexport default connect(\n ({ serviceWorker: { refreshButtonShow } }) => ({ refreshButtonShow }),\n bindActions\n)(ServiceWorkerContainer);\n","//Heto Router\nimport * as React from \"react\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { Redirect, Switch, useLocation } from \"react-router-dom\";\nimport { push } from \"connected-react-router\";\n// Import Components\nimport Loader from \"../components/shared/Loader\";\nimport GuideLineTutorialContainer from \"../components/guide-line-tutorial/GuideLineTutorialContainer\";\nimport Menu from \"../components/menu/MenuContainer\";\nimport EmulateUser from \"../components/emulate-user/EmulateUserContainer\";\nimport FeedbackForm from \"../components/feedback-form/FeedbackForm.container\";\nimport RouteLoadedCompoundContainer from \"../components/route-loaded/RouteLoadedCompoundContainer\";\nimport RouteManagerCompoundContainer from \"../components/manager/RouteManagerCompoundContainer\";\nimport RedirectsRoute from \"../components/redirects/RedirectsRoute\";\nimport ManagerRoute from \"../components/manager/ManagerRoute\";\nimport HomeRoute from \"../components/home/HomeRoute\";\nimport MyProfileRoute from \"../components/my-profile/MyProfileRoute\";\nimport MyCompanyRoute from \"../components/company/CompanyRoute\";\nimport InstitutionsRoute from \"../components/institutions/InstitutionsRoute\";\nimport MyInstitutionRoute from \"../components/institutions/MyInstitutionRoute\";\nimport RotationsRoute from \"../components/rotations/RotationsRoute\";\nimport EvaluationsTemplatesRoute from \"../components/evaluations-templates/EvaluationsTemplatesRoute\";\nimport EvaluationsSchedulersRoute from \"../components/evaluations-schedulers/EvaluationsSchedulersRoute\";\nimport EvaluationsRoute from \"../components/evaluations/EvaluationsRoute\";\nimport CaseLogsRoute from \"../components/case-logs/CaseLogsRoute\";\nimport ReportsRoute from \"../components/reports/ReportsRoute\";\nimport AccountSettingsRoute from \"../components/account-settings/AccountSettingsRoute\";\nimport AdminPortalRoute from \"../components/admin-portal/AdminPortalRoute\";\nimport SignOutRoute from \"../components/signout/SignOutRoute\";\n// Warning Messages\nimport BroadcastMessages from \"../components/broadcast/broadcast-messages/BroadcastMessages.container\";\nimport CameraWarning from \"../components/camera/CameraWarning.container\";\nimport FieldsWarningContainer from \"../components/fields-warning/FieldsWarningContainer\";\nimport FilesRequiredWarningContainer from \"../components/files/files-required-warning/FilesRequiredWarningContainer\";\nimport ReportsWarningContainer from \"../components/reports/warning/ReportsWarningContainer\";\nimport ServiceWorker from \"../components/service-worker/ServiceWorkerContainer\";\n// Actions\nimport { Auth, CustomFields } from \"../store/actions/\";\n// Types\nimport type { RootState } from \"../store/reducers\";\nimport type { StateImportData as State } from \"../types/importData.types\";\n// ROUTER:\nconst { lazy, useEffect, Suspense } = React;\nconst ImportDataNotification = lazy(\n () =>\n import(\"../components/import/notification/ImportDataNotification.container\")\n);\n// Import Routes Dynamic:\nconst AppRouter = ({ location }: any): any => [\n ,\n // @ts-ignore\n ,\n ,\n ,\n ,\n \n {/* ROUTE REDIRECTS */}\n \n \n \n \n \n \n \n \n \n \n {/* HOME */}\n \n {/* ROUTE MyPROFILE */}\n \n \n \n \n \n {/* ROUTE MyCOMPANY */}\n \n \n \n {/* ROUTE MANAGER */}\n \n \n \n \n \n \n \n \n \n \n {/* ROUTE INSTITUTIONS */}\n \n {/* ROUTE MyINSTITUTION */}\n \n \n \n {/* ROUTE ROTATIONS */}\n \n \n \n \n \n \n \n {/* ROUTE CASELOGS */}\n \n \n {/* ROUTE EVALUATIONS */}\n \n \n \n \n \n \n {/* ROUTE REPORTS */}\n \n \n \n \n \n \n \n \n \n \n \n {/* ROUTE ACCOUNT SETTINGS */}\n \n \n \n \n \n \n \n {/* ROUTE ADMIN PORTAL */}\n \n \n \n \n \n \n \n \n \n \n \n \n \n {/* ROUTE SIGN OUT */}\n \n \n \n ,\n ,\n];\n\nconst RouterApp = (): any => {\n const location = useLocation();\n const dispatch = useDispatch();\n const { type: baseClass = \"\" } = useSelector(\n ({ auth }: RootState) => auth.role || { type: \"\" }\n );\n const {\n hasCustomFieldsRequiredNull,\n hasContactInfoAddressesFieldsRequiredNull,\n hasEmergencyContactFieldsRequiredNull,\n } = useSelector(\n ({\n auth: {\n hasCustomFieldsRequiredNull,\n hasContactInfoAddressesFieldsRequiredNull,\n hasEmergencyContactFieldsRequiredNull,\n },\n }: RootState) => ({\n hasCustomFieldsRequiredNull,\n hasContactInfoAddressesFieldsRequiredNull,\n hasEmergencyContactFieldsRequiredNull,\n })\n );\n const { toShow }: State[\"importDataNotification\"] = useSelector(\n ({ importData }: RootState) => importData.importDataNotification\n );\n useEffect(() => {\n window.logger.log(\"RouterApp\", location);\n });\n useEffect(() => {\n dispatch(\n Auth.authCheckSessionExpiredApp({\n goToSignOut: () =>\n dispatch(\n push({\n pathname: `/signout/session-expired`,\n state: {\n namePage: \"Sign Out\",\n },\n })\n ),\n })\n );\n // Contact Info Fields,\n // Addresses Fields,\n // Emergency Contac Fieldst,\n // Custom Fields Users\n // Required\n if (\n location.pathname !== \"/signout\" &&\n location.pathname !== \"/signout/session-expired\" &&\n (hasCustomFieldsRequiredNull ||\n hasContactInfoAddressesFieldsRequiredNull ||\n hasEmergencyContactFieldsRequiredNull) &&\n location.pathname !== \"/my-profile\"\n ) {\n dispatch(\n push({\n pathname: `/my-profile`,\n state: {\n namePage: \"My Profile\",\n },\n })\n );\n setTimeout(\n () => dispatch(CustomFields.customFieldsRequiredTriggerAnimation()),\n 500\n );\n }\n }, [\n location.pathname,\n hasCustomFieldsRequiredNull,\n hasContactInfoAddressesFieldsRequiredNull,\n hasEmergencyContactFieldsRequiredNull,\n dispatch,\n ]);\n return (\n
\n \n \n }\n >\n \n {toShow && (\n \n )}\n \n {/* @ts-ignore */}\n \n {/* @ts-ignore */}\n \n \n \n \n
\n );\n};\nexport default RouterApp;\n","// Import Features\nimport * as React from \"react\";\n// Import Components\n// import { BrowserRouter as Router } from \"react-router-dom\";\nimport RouterApp from \"../router/\";\n// APP MAIN:\nconst AppMain = () => (\n <>\n \n \n);\nexport default AppMain;\n","// @flow\nimport * as React from 'react';\nimport ErrorComponent from '../shared/ErrorComponent';\n// SIMPLE ErrorBoundary\nclass ErrorBoundary extends React.Component {\n state = {\n isOffline: false\n };\n\n onErrorOfflineOnline = () => {\n this.setState({ isOffline: !this.state.isOffline });\n };\n\n componentDidMount() {\n window.addEventListener('offline', this.onErrorOfflineOnline);\n window.addEventListener('online', this.onErrorOfflineOnline);\n }\n\n componentDidCatch(error: any, info: any) {\n window.logger.error('ErrorBooundary: ', error, 'Info: ', info);\n }\n\n render() {\n const { isOffline } = this.state;\n if (isOffline) {\n return (\n \n );\n }\n return this.props.children;\n }\n}\n\nexport default ErrorBoundary;\n","import { ReportHandler } from 'web-vitals';\n\nconst reportWebVitals = (onPerfEntry?: ReportHandler) => {\n if (onPerfEntry && onPerfEntry instanceof Function) {\n import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\n getCLS(onPerfEntry);\n getFID(onPerfEntry);\n getFCP(onPerfEntry);\n getLCP(onPerfEntry);\n getTTFB(onPerfEntry);\n });\n }\n};\n\nexport default reportWebVitals;\n","import \"react-app-polyfill/ie11\";\nimport \"react-app-polyfill/stable\";\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport moment from \"moment\";\nimport momentLocalizer from \"react-widgets-moment\";\n// @ts-ignore\nimport simpleNumberLocalizer from \"react-widgets-simple-number\";\nimport { Provider } from \"react-redux\";\nimport { ConnectedRouter } from \"connected-react-router\";\nimport { configureStore, history } from \"./store\";\nimport AppMain from \"./components/AppMain\";\nimport ErrorBoundary from \"./components/error-boundary/ErrorBoundary\";\nimport * as serviceWorkerRegistration from \"./utils/service-worker/serviceWorkerRegistration\";\nimport reportWebVitals from \"./utils/web-vitals/reportWebVitals\";\n// Styles Generic\nimport \"./styles/styles.scss\";\n//Config react-widgets:\nmoment.locale(\"en\", {\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // Used to determine first week of the year.\n },\n});\nmomentLocalizer();\nsimpleNumberLocalizer();\n// Init Redux Store\nexport const store = configureStore();\n\nReactDOM.render(\n \n \n \n \n \n \n \n \n ,\n document.getElementById(\"root\")\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://cra.link/PWA\nserviceWorkerRegistration.unregister();\n// TODO: Issue with Service Worker\n// Deactivate Service Worker\n// It is not working well after updating\n// if (\n// navigator.userAgent.toLowerCase().indexOf(\"safari\") !== -1 &&\n// navigator.userAgent.toLowerCase().indexOf(\"chrome\") === -1\n// ) {\n// // NOT safari browser\n// unRegisterServiceWorker();\n// } else {\n// registerServiceWorker(store);\n// }\n\n// If you want to start measuring performance in your app, pass a function\n// to log results (for example: reportWebVitals(console.log))\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\nreportWebVitals();\n","// @flow\n/* PERMISSIONS */\nimport {\n onCheckReadAllSuperCompanyAdministratorsUsersPermissions,\n onCheckReadAllCompanyAdministratorsUsersPermissions,\n onCheckReadAllCoordinatorsUsersPermissions,\n onCheckReadAllFacultiesUsersPermissions,\n onCheckReadBasicStudentsUsersPermissions,\n onCheckReadAllStudentsUsersPermissions,\n onCheckReadAllInstitutionAdministratorsUsersPermissions,\n onCheckReadAllPreceptorsUsersPermissions,\n} from \"../user-manager/UsersPermissions\";\nimport { onCheckReadAllUserInvitationsPermissions } from \"../user-invitation-manager/UserInvitationsPermissions\";\nimport {\n onCheckCreateRotationsPermissions,\n onCheckReadPeriodsPermissions,\n onCheckEditRotationsPermissions,\n} from \"../rotations/RotationsPermissions\";\nimport { onCheckReadInstitutionsPermissions } from \"../institutions/InstitutionsPermissions\";\n\nexport const onCheckUsersManagerPermissions = (\n permissions: ?Object\n): boolean => {\n if (\n onCheckReadAllSuperCompanyAdministratorsUsersPermissions(permissions) ||\n onCheckReadAllCompanyAdministratorsUsersPermissions(permissions) ||\n onCheckReadAllCoordinatorsUsersPermissions(permissions) ||\n onCheckReadAllFacultiesUsersPermissions(permissions) ||\n onCheckReadBasicStudentsUsersPermissions(permissions) ||\n onCheckReadAllStudentsUsersPermissions(permissions) ||\n onCheckReadAllInstitutionAdministratorsUsersPermissions(permissions) ||\n onCheckReadAllPreceptorsUsersPermissions(permissions)\n ) {\n return true;\n }\n return false;\n};\nexport const onCheckUserInvitationsManagerPermissions = (\n permissions: ?Object\n): boolean => {\n return onCheckReadAllUserInvitationsPermissions(permissions);\n};\n\nexport const onCheckUserManagerActionCreateEditRotationPermissions = (\n permissions: ?Object\n): boolean => {\n return (\n (onCheckCreateRotationsPermissions(permissions) &&\n onCheckReadPeriodsPermissions(permissions) &&\n onCheckReadInstitutionsPermissions(permissions) &&\n onCheckReadAllStudentsUsersPermissions(permissions)) ||\n (onCheckEditRotationsPermissions(permissions) &&\n onCheckReadPeriodsPermissions(permissions))\n );\n};\n","// @flow\n\n/* PERMISSIONS */\nconst onCheckResource = (apiResource: Object, resources: Array) => {\n for (let resource in apiResource) {\n if (\n resources.indexOf(resource) !== -1 &&\n apiResource[resource]['isEnabled']\n ) {\n return true;\n }\n }\n return false;\n};\nexport const onCheckAllEvaluationSchedulersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n 'EvaluationSchedulers:create',\n 'EvaluationSchedulers:read',\n 'EvaluationSchedulers:update',\n 'EvaluationSchedulers:delete'\n ];\n const { EvaluationSchedulers } = permissions || {};\n if (EvaluationSchedulers && EvaluationSchedulers.apiValue) {\n return onCheckResource(EvaluationSchedulers.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEvaluationSchedulersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n 'EvaluationSchedulers:create',\n 'EvaluationSchedulers:read'\n ];\n const { EvaluationSchedulers } = permissions || {};\n if (EvaluationSchedulers && EvaluationSchedulers.apiValue) {\n return onCheckResource(EvaluationSchedulers.apiValue, resources);\n }\n return false;\n};\nexport const onCheckReadEvaluationSchedulersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = ['EvaluationSchedulers:read'];\n const { EvaluationSchedulers } = permissions || {};\n if (EvaluationSchedulers && EvaluationSchedulers.apiValue) {\n return onCheckResource(EvaluationSchedulers.apiValue, resources);\n }\n return false;\n};\nexport const onCheckCreateEvaluationSchedulersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = ['EvaluationSchedulers:create'];\n const { EvaluationSchedulers } = permissions || {};\n if (EvaluationSchedulers && EvaluationSchedulers.apiValue) {\n return onCheckResource(EvaluationSchedulers.apiValue, resources);\n }\n return false;\n};\nexport const onCheckEditEvaluationSchedulersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = ['EvaluationSchedulers:update'];\n const { EvaluationSchedulers } = permissions || {};\n if (EvaluationSchedulers && EvaluationSchedulers.apiValue) {\n return onCheckResource(EvaluationSchedulers.apiValue, resources);\n }\n return false;\n};\nexport const onCheckDeleteEvaluationSchedulersPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = ['EvaluationSchedulers:delete'];\n const { EvaluationSchedulers } = permissions || {};\n if (EvaluationSchedulers && EvaluationSchedulers.apiValue) {\n return onCheckResource(EvaluationSchedulers.apiValue, resources);\n }\n return false;\n};\n","// @flow\n\n/* PERMISSIONS */\n\nexport const onCheckImportDataPermissions = (permissions: ?Object): boolean => {\n const { ImportData } = permissions || {};\n if (\n ImportData &&\n ImportData.apiValue &&\n ImportData.apiValue['ImportData:generateCSV'] &&\n ImportData.apiValue['ImportData:generateCSV']['isEnabled'] &&\n ImportData.apiValue['ImportData:uploadCSV'] &&\n ImportData.apiValue['ImportData:uploadCSV']['isEnabled']\n ) {\n return true;\n }\n return false;\n};\n","import type { PayloadObject } from \"../../types/common.types\";\n/* PERMISSIONS */\nconst onCheckResource = (apiResource: PayloadObject, resources: string[]) => {\n for (let resource in apiResource) {\n if (\n resources.indexOf(resource) !== -1 &&\n apiResource[resource][\"isEnabled\"]\n ) {\n return true;\n }\n }\n return false;\n};\n\nexport const onCheckAllCaseLogsPermissions = (\n permissions?: PayloadObject\n): boolean => {\n const resources = [\n \"CaseLogs:create\",\n \"CaseLogs:read\",\n \"CaseLogs:update\",\n \"CaseLogs:delete\",\n \"CaseLogs:review\",\n \"my:Students#CaseLogs:read\",\n \"my#CaseLogs:create\",\n \"my#CaseLogs:read\",\n \"my#CaseLogs:update\",\n \"my#CaseLogs:review\",\n ];\n const { CaseLogs } = permissions || {};\n if (CaseLogs && CaseLogs.apiValue) {\n return onCheckResource(CaseLogs.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckCaseLogsPermissions = (\n permissions?: PayloadObject\n): boolean => {\n const resources = [\n \"CaseLogs:create\",\n \"CaseLogs:read\",\n \"my:Students#CaseLogs:read\",\n \"my#CaseLogs:create\",\n \"my#CaseLogs:read\",\n ];\n const { CaseLogs } = permissions || {};\n if (CaseLogs && CaseLogs.apiValue) {\n return onCheckResource(CaseLogs.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckReadCaseLogsPermissions = (\n permissions?: PayloadObject\n): boolean => {\n const resources = [\n \"CaseLogs:read\",\n \"my:Students#CaseLogs:read\",\n \"my#CaseLogs:read\",\n ];\n const { CaseLogs } = permissions || {};\n if (CaseLogs && CaseLogs.apiValue) {\n return onCheckResource(CaseLogs.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckReadAllCaseLogsPermissions = (\n permissions?: PayloadObject\n): boolean => {\n const resources = [\"CaseLogs:read\"];\n const { CaseLogs } = permissions || {};\n if (CaseLogs && CaseLogs.apiValue) {\n return onCheckResource(CaseLogs.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckCreateCaseLogsPermissions = (\n permissions?: PayloadObject\n): boolean => {\n const resources = [\"CaseLogs:create\"];\n const { CaseLogs } = permissions || {};\n if (CaseLogs && CaseLogs.apiValue) {\n return onCheckResource(CaseLogs.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckSubmitCaseLogsPermissions = (\n permissions?: PayloadObject\n): boolean => {\n const resources = [\"my#CaseLogs:create\"];\n const { CaseLogs } = permissions || {};\n if (CaseLogs && CaseLogs.apiValue) {\n return onCheckResource(CaseLogs.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckEditCaseLogsPermissions = (\n permissions?: PayloadObject\n): boolean => {\n const resources = [\"CaseLogs:update\", \"my#CaseLogs:update\"];\n const { CaseLogs } = permissions || {};\n if (CaseLogs && CaseLogs.apiValue) {\n return onCheckResource(CaseLogs.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckDeleteCaseLogsPermissions = (\n permissions?: PayloadObject\n): boolean => {\n const resources = [\"CaseLogs:delete\"];\n const { CaseLogs } = permissions || {};\n if (CaseLogs && CaseLogs.apiValue) {\n return onCheckResource(CaseLogs.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckReviewCaseLogsPermissions = (\n permissions?: PayloadObject\n): boolean => {\n const resources = [\"CaseLogs:review\", \"my#CaseLogs:review\"];\n const { CaseLogs } = permissions || {};\n if (CaseLogs && CaseLogs.apiValue) {\n return onCheckResource(CaseLogs.apiValue, resources);\n }\n return false;\n};\n","// @flow\n\n/* PERMISSIONS */\nconst onCheckResource = (apiResource: Object, resources: Array) => {\n for (let resource in apiResource) {\n if (\n resources.indexOf(resource) !== -1 &&\n apiResource[resource]['isEnabled']\n ) {\n return true;\n }\n }\n return false;\n};\n\nexport const onCheckAllEvaluationTemplatesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = [\n 'EvaluationTemplates:create',\n 'EvaluationTemplates:read',\n 'EvaluationTemplates:update'\n ];\n const { EvaluationTemplates } = permissions || {};\n if (EvaluationTemplates && EvaluationTemplates.apiValue) {\n return onCheckResource(EvaluationTemplates.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckEvaluationTemplatesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = ['EvaluationTemplates:create', 'EvaluationTemplates:read'];\n const { EvaluationTemplates } = permissions || {};\n if (EvaluationTemplates && EvaluationTemplates.apiValue) {\n return onCheckResource(EvaluationTemplates.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckReadEvaluationTemplatesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = ['EvaluationTemplates:read'];\n const { EvaluationTemplates } = permissions || {};\n if (EvaluationTemplates && EvaluationTemplates.apiValue) {\n return onCheckResource(EvaluationTemplates.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckCreateEvaluationTemplatesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = ['EvaluationTemplates:create'];\n const { EvaluationTemplates } = permissions || {};\n if (EvaluationTemplates && EvaluationTemplates.apiValue) {\n return onCheckResource(EvaluationTemplates.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckEditEvaluationTemplatesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = ['EvaluationTemplates:update'];\n const { EvaluationTemplates } = permissions || {};\n if (EvaluationTemplates && EvaluationTemplates.apiValue) {\n return onCheckResource(EvaluationTemplates.apiValue, resources);\n }\n return false;\n};\n\nexport const onCheckDeleteEvaluationTemplatesPermissions = (\n permissions: ?Object\n): boolean => {\n const resources = ['EvaluationTemplates:delete'];\n const { EvaluationTemplates } = permissions || {};\n if (EvaluationTemplates && EvaluationTemplates.apiValue) {\n return onCheckResource(EvaluationTemplates.apiValue, resources);\n }\n return false;\n};\n"],"sourceRoot":""}