├── src ├── common │ ├── Tab │ │ ├── NotesTab │ │ │ └── _NotesTab.scss │ │ ├── TasksTab │ │ │ └── _TasksTab.scss │ │ ├── ClaimsTab │ │ │ └── _ClaimsTab.scss │ │ ├── DocumentsTab │ │ │ └── _DocumentsTab.scss │ │ ├── OverduesTab │ │ │ └── _OverduesTab.scss │ │ ├── PoliciesTab │ │ │ └── _PoliciesTab.scss │ │ ├── ApplicationTab │ │ │ └── _ApplicationTab.scss │ │ ├── CreditLimitTab │ │ │ └── _CreditLimitTab.scss │ │ ├── ContactsTab │ │ │ └── _ContactsTab.scss │ │ └── _Tab.scss │ ├── Modal │ │ ├── FilterModal │ │ │ ├── _Filter.scss │ │ │ └── FilterModal.js │ │ ├── CustomFieldModal │ │ │ └── _CustomFieldModal.scss │ │ └── _Modal.scss │ ├── ListFilters │ │ ├── redux │ │ │ ├── ListFiltersReduxConstants.js │ │ │ ├── ListFiltersAction.js │ │ │ └── ListFiltersReducer.js │ │ └── Filter.js │ ├── Loader │ │ ├── Loader.js │ │ └── _Loader.scss │ ├── ForbiddenAccessPage │ │ ├── _ForbiddenAccessPage.scss │ │ └── ForbiddenAccessPage.js │ ├── GeneralLoader │ │ └── redux │ │ │ ├── GeneralLoaderReduxConstants.js │ │ │ ├── GeneralLoaderAction.js │ │ │ └── GeneralLoaderReducer.js │ ├── Table │ │ └── TableApiService.js │ ├── Layout │ │ ├── _Layout.scss │ │ └── Layout.js │ ├── UserPrivilegeWrapper │ │ └── UserPrivilegeWrapper.js │ ├── IconButton │ │ ├── _IconButton.scss │ │ └── IconButton.js │ ├── Checkbox │ │ ├── Checkbox.js │ │ └── _Checkbox.scss │ ├── RadioButton │ │ ├── RadioButton.js │ │ └── _RadioButton.scss │ ├── Toast.js │ ├── Accordion │ │ ├── Accordion.js │ │ └── _Accordion.scss │ ├── Switch │ │ ├── Switch.js │ │ └── _Switch.scss │ ├── BigInput │ │ ├── _BigInput.scss │ │ └── BigInput.js │ ├── DropdownMenu │ │ ├── _DropdownMenu.scss │ │ └── DropdownMenu.js │ ├── Header │ │ ├── component │ │ │ ├── _FileUpload.scss │ │ │ └── FileUpload.js │ │ ├── redux │ │ │ └── HeaderConstants.js │ │ └── services │ │ │ └── HeaderApiService.js │ ├── PageNotFound │ │ └── PageNotFound.js │ ├── Button │ │ └── Button.js │ ├── _common-combined.scss │ ├── SideMenu │ │ ├── _SideMenu.scss │ │ └── SideMenu.js │ ├── Drawer │ │ ├── _Drawer.scss │ │ └── Drawer.js │ ├── Stepper │ │ └── _Stepper.scss │ ├── Pagination │ │ └── _Pagination.scss │ └── Input │ │ ├── _Input.scss │ │ └── Input.js ├── screens │ ├── Claims │ │ ├── ClaimsList │ │ │ └── _ClaimsList.scss │ │ ├── AddViewClaims │ │ │ └── _AddViewClaims.scss │ │ ├── redux │ │ │ └── ClaimsReduxConstants.js │ │ ├── services │ │ │ └── ClaimsApiService.js │ │ └── components │ │ │ └── ClaimsTabContainer.js │ ├── MyWork │ │ ├── MyWorkTasks │ │ │ ├── _MyWorkTasks.scss │ │ │ └── MyWorkAddTask │ │ │ │ └── _MyWorkAddTask.scss │ │ ├── _MyWork.scss │ │ ├── services │ │ │ └── MyWorkApiServices.js │ │ ├── redux │ │ │ └── MyWorkReduxConstants.js │ │ ├── MyWork.js │ │ └── MyWorkNotifications │ │ │ └── _MyWorkNotifications.scss │ ├── Insurer │ │ ├── InsurerList │ │ │ └── _InsurerList.scss │ │ ├── services │ │ │ ├── InsurerMatrixApiServices.js │ │ │ ├── InsurerContactApiServices.js │ │ │ ├── InsurerPoliciesApiServices.js │ │ │ └── InsurerApiService.js │ │ ├── ViewInsurer │ │ │ └── _ViewInsurer.scss │ │ └── redux │ │ │ └── InsurerReduxConstants.js │ ├── Debtors │ │ ├── GenerateDebtor │ │ │ └── component │ │ │ │ ├── components │ │ │ │ └── DebtorEntityNameModal │ │ │ │ │ ├── DebtorEntityNameModal.js │ │ │ │ │ └── _DebtorEntityNameModal.scss │ │ │ │ ├── DebtorConfirmationStep │ │ │ │ ├── _DebtorConfirmationStep.scss │ │ │ │ └── validations │ │ │ │ │ └── DebtorConfirmationStepValidation.js │ │ │ │ └── DebtorDocumentsStep │ │ │ │ ├── _ApplicationDocumentStep.scss │ │ │ │ └── validations │ │ │ │ └── DebtorDocumentStepValidations.js │ │ ├── DebtorsList │ │ │ └── _DebtorsList.scss │ │ ├── services │ │ │ ├── DebtorAlertsApiServices.js │ │ │ ├── DebtorOverdueApiServices.js │ │ │ ├── DebtorsNotesApiService.js │ │ │ ├── DebtorsReportsApiServices.js │ │ │ ├── DebtorApplicationApiServices.js │ │ │ ├── DebtorsCompanyStepApiServices.js │ │ │ ├── DebtorTaskApiServices.js │ │ │ ├── DebtorCreditLimitApiServices.js │ │ │ └── DebtorsApiServices.js │ │ ├── ViewDebtor │ │ │ └── _ViewDebtor.scss │ │ └── components │ │ │ ├── DebtorsClaimsTab.js │ │ │ └── DebtorsOverduesTab.js │ ├── Application │ │ ├── GenerateApplication │ │ │ └── component │ │ │ │ ├── components │ │ │ │ └── ApplicationEntityNameModal │ │ │ │ │ ├── ApplicationEntityNameModal.js │ │ │ │ │ └── _ApplicationEntityNameModal.scss │ │ │ │ ├── ApplicationConfirmationStep │ │ │ │ ├── _ApplicationConfirmationStep.scss │ │ │ │ └── validations │ │ │ │ │ └── ApplicationConfirmationStepValidation.js │ │ │ │ ├── ApplicationDocumentsStep │ │ │ │ ├── _ApplicationDocumentStep.scss │ │ │ │ └── validations │ │ │ │ │ └── ApplicationDocumentStepValidations.js │ │ │ │ └── ApplicationCreditLimitStep │ │ │ │ └── _ApplicationCreditLimitStep.scss │ │ ├── ApplicationList │ │ │ └── _ApplicationList.scss │ │ ├── ImportApplication │ │ │ ├── Components │ │ │ │ ├── ImportApplicationValidateStep │ │ │ │ │ ├── _ImportApplicationValidateStep.scss │ │ │ │ │ └── ImportApplicationValidateStep.js │ │ │ │ ├── ImportApplicationDownloadSample │ │ │ │ │ ├── _ImportApplicationDownloadSample.scss │ │ │ │ │ └── ImportApplicationDownloadSample.js │ │ │ │ ├── ImportAplicationImportStep │ │ │ │ │ ├── _ImportApplicationImportStep.scss │ │ │ │ │ └── ImportApplicationImportStepValidations.js │ │ │ │ ├── ImportApplicationGenerateApplicationStep │ │ │ │ │ └── _ImportApplicationGenerateApplication.scss │ │ │ │ └── ImportApplicationABNLookUpStep │ │ │ │ │ └── ImportApplicationABNLookUpStep.js │ │ │ └── _ImportApplicationModal.scss │ │ ├── services │ │ │ ├── ApplicationDocumentStepApiServices.js │ │ │ ├── ImportApplicationApiServices.js │ │ │ ├── ApplicationCompanyStepApiServices.js │ │ │ └── ApplicationApiServices.js │ │ └── ViewApplication │ │ │ └── component │ │ │ ├── applicationNotesAccordion │ │ │ └── NotesDescription.js │ │ │ └── ApplicationLogsAccordion.js │ ├── auth │ │ ├── login │ │ │ ├── _LoginScreen.scss │ │ │ └── redux │ │ │ │ ├── LoginReduxConstants.js │ │ │ │ └── LoginAction.js │ │ ├── setPassword │ │ │ ├── _SetPassword.scss │ │ │ └── redux │ │ │ │ └── SetPasswordAction.js │ │ ├── forgotPassword │ │ │ ├── _ForgotPassword.scss │ │ │ └── redux │ │ │ │ └── ForgotPasswordAction.js │ │ ├── resetPassword │ │ │ ├── _ResetPassword.scss │ │ │ └── redux │ │ │ │ └── ResetPasswordAction.js │ │ ├── otpScreen │ │ │ ├── _VerifyOtp.scss │ │ │ └── redux │ │ │ │ └── VerifyOtpAction.js │ │ ├── services │ │ │ └── AuthApiService.js │ │ └── common │ │ │ └── CommonAuthScreen │ │ │ └── AuthScreenContainer.js │ ├── Dashboard │ │ ├── redux │ │ │ ├── DashboardReduxConstants.js │ │ │ ├── DashboardReducer.js │ │ │ └── DashboardAction.js │ │ ├── services │ │ │ └── DashboardApiService.js │ │ └── _Dashboard.scss │ ├── Alerts │ │ ├── alertFilterValidations.js │ │ ├── services │ │ │ └── AlertsApiService.js │ │ └── redux │ │ │ └── AlertsReduxConstants.js │ ├── Clients │ │ ├── services │ │ │ ├── ClientOverdueApiService.js │ │ │ ├── ClientClaimsApiService.js │ │ │ ├── ClientNotesApiService.js │ │ │ ├── ClientContactApiService.js │ │ │ ├── ClientPoliciesApiService.js │ │ │ ├── ClientApplicationApiService.js │ │ │ ├── ClientDocumentsApiService.js │ │ │ ├── ClientTaskApiService.js │ │ │ ├── ClientApiService.js │ │ │ └── ClientCreditLimitApiService.js │ │ ├── ViewClient │ │ │ └── _ViewClient.scss │ │ ├── ClientList │ │ │ └── _ClientList.scss │ │ └── component │ │ │ └── _clientTabs.scss │ ├── Settings │ │ ├── services │ │ │ ├── SettingOrganizationDetailsApiService.js │ │ │ ├── SettingApiIntegrationService.js │ │ │ ├── SettingAuditLogApiService.js │ │ │ └── SettingDocumentTypeApiServices.js │ │ └── Settings.js │ ├── Reports │ │ ├── ViewReports │ │ │ └── _ViewReports.scss │ │ ├── redux │ │ │ └── ReportsReduxConstants.js │ │ ├── _Reports.scss │ │ ├── services │ │ │ └── ReportsApiService.js │ │ ├── reportFilterValidations.js │ │ └── Reports.js │ ├── Overdues │ │ ├── services │ │ │ └── OverdueApiServices.js │ │ ├── redux │ │ │ └── OverduesReduxConstants.js │ │ └── OverduesList │ │ │ └── _OverduesList.scss │ └── Users │ │ ├── UserList │ │ └── _UserList.scss │ │ ├── AddUser │ │ └── _AddUser.scss │ │ ├── services │ │ └── UserManagementApiService.js │ │ └── redux │ │ └── UserManagementReduxConstants.js ├── constants │ ├── SessionStorage.js │ ├── DateFormatConstants.js │ ├── UserlistConstants.js │ ├── EntitySearchConstants.js │ └── RegexConstants.js ├── routes │ ├── History.js │ ├── NonAuthenticatedRoutes.js │ ├── AuthenticatedRoutes.js │ └── Routes.js ├── index.scss ├── assets │ ├── fonts │ │ ├── GoogleSans-Bold.ttf │ │ ├── GoogleSans-Medium.ttf │ │ └── GoogleSans-Regular.ttf │ ├── images │ │ ├── login-background.jpg │ │ ├── page-not-found.svg │ │ └── logo.svg │ └── Sounds │ │ └── notification_high-intensity.wav ├── helpers │ ├── entityiTypeHelper.js │ ├── ValidationHelper.js │ ├── NumberCommaSeparator.js │ ├── AlertHelper.js │ ├── DownloadHelper.js │ ├── Mappers.js │ ├── debtorErrorHelper.js │ ├── applicationErrorHelper.js │ ├── ErrorNotifyHelper.js │ ├── reportTypeHelper.js │ └── LocalStorageHelper.js ├── setupTests.js ├── App.test.js ├── hooks │ ├── GetQueryParamHook.js │ ├── OnWindowResizeGetElementWidthHook.js │ ├── useUrlParamsUpdate.js │ ├── UserClickOutsideHook.js │ └── userPrivileges │ │ └── useModulePrivilegesHook.js ├── reportWebVitals.js ├── redux │ └── store.js ├── App.js ├── index.js ├── utilities │ ├── _color-palette.scss │ ├── _typography.scss │ └── _basic-styles.scss └── logo.svg ├── .eslintignore ├── public ├── robots.txt ├── favicon.ico ├── logo192.png ├── logo512.png ├── favicon-16x16.png ├── favicon-32x32.png ├── apple-touch-icon.png ├── android-chrome-192x192.png ├── android-chrome-512x512.png └── manifest.json ├── .prettierrc ├── .gitignore ├── .env-cmdrc ├── .eslintrc.json └── README.md /src/common/Tab/NotesTab/_NotesTab.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/common/Tab/TasksTab/_TasksTab.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/common/Modal/FilterModal/_Filter.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/common/Tab/ClaimsTab/_ClaimsTab.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/common/Tab/DocumentsTab/_DocumentsTab.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/common/Tab/OverduesTab/_OverduesTab.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/common/Tab/PoliciesTab/_PoliciesTab.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/screens/Claims/ClaimsList/_ClaimsList.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/screens/MyWork/MyWorkTasks/_MyWorkTasks.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/common/Tab/ApplicationTab/_ApplicationTab.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/common/Tab/CreditLimitTab/_CreditLimitTab.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/screens/Insurer/InsurerList/_InsurerList.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .vscode 3 | node_modules 4 | coverage 5 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /src/screens/Debtors/GenerateDebtor/component/components/DebtorEntityNameModal/DebtorEntityNameModal.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/screens/Debtors/GenerateDebtor/component/components/DebtorEntityNameModal/_DebtorEntityNameModal.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mickey9315/financial-risk-admin-panel/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mickey9315/financial-risk-admin-panel/HEAD/public/logo192.png -------------------------------------------------------------------------------- /public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mickey9315/financial-risk-admin-panel/HEAD/public/logo512.png -------------------------------------------------------------------------------- /public/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mickey9315/financial-risk-admin-panel/HEAD/public/favicon-16x16.png -------------------------------------------------------------------------------- /public/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mickey9315/financial-risk-admin-panel/HEAD/public/favicon-32x32.png -------------------------------------------------------------------------------- /src/constants/SessionStorage.js: -------------------------------------------------------------------------------- 1 | export const SESSION_VARIABLES = { 2 | USER_TOKEN: null, 3 | USER_ID: null, 4 | }; 5 | -------------------------------------------------------------------------------- /src/routes/History.js: -------------------------------------------------------------------------------- 1 | import { createBrowserHistory } from 'history'; 2 | 3 | export default createBrowserHistory(); 4 | -------------------------------------------------------------------------------- /src/screens/Application/GenerateApplication/component/components/ApplicationEntityNameModal/ApplicationEntityNameModal.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mickey9315/financial-risk-admin-panel/HEAD/public/apple-touch-icon.png -------------------------------------------------------------------------------- /src/index.scss: -------------------------------------------------------------------------------- 1 | @import 'src/utilities/utility'; 2 | @import 'src/common/common-combined'; 3 | @import 'src/screens/Screens'; 4 | -------------------------------------------------------------------------------- /src/screens/Application/GenerateApplication/component/components/ApplicationEntityNameModal/_ApplicationEntityNameModal.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mickey9315/financial-risk-admin-panel/HEAD/public/android-chrome-192x192.png -------------------------------------------------------------------------------- /public/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mickey9315/financial-risk-admin-panel/HEAD/public/android-chrome-512x512.png -------------------------------------------------------------------------------- /src/assets/fonts/GoogleSans-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mickey9315/financial-risk-admin-panel/HEAD/src/assets/fonts/GoogleSans-Bold.ttf -------------------------------------------------------------------------------- /src/assets/fonts/GoogleSans-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mickey9315/financial-risk-admin-panel/HEAD/src/assets/fonts/GoogleSans-Medium.ttf -------------------------------------------------------------------------------- /src/assets/fonts/GoogleSans-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mickey9315/financial-risk-admin-panel/HEAD/src/assets/fonts/GoogleSans-Regular.ttf -------------------------------------------------------------------------------- /src/assets/images/login-background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mickey9315/financial-risk-admin-panel/HEAD/src/assets/images/login-background.jpg -------------------------------------------------------------------------------- /src/common/ListFilters/redux/ListFiltersReduxConstants.js: -------------------------------------------------------------------------------- 1 | export const LIST_FILTERS_REDUX_CONSTANTS = { 2 | SAVE_APPLIED_FILTERS: 'SAVE_APPLIED_FILTERS', 3 | }; 4 | -------------------------------------------------------------------------------- /src/assets/Sounds/notification_high-intensity.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mickey9315/financial-risk-admin-panel/HEAD/src/assets/Sounds/notification_high-intensity.wav -------------------------------------------------------------------------------- /src/screens/MyWork/MyWorkTasks/MyWorkAddTask/_MyWorkAddTask.scss: -------------------------------------------------------------------------------- 1 | .my-work-add-task-container .material-icons-round { 2 | font-size: $h4; 3 | color: $placeholder-color; 4 | } 5 | -------------------------------------------------------------------------------- /src/common/Modal/CustomFieldModal/_CustomFieldModal.scss: -------------------------------------------------------------------------------- 1 | .custom-filed-modal-body { 2 | max-height: 50vh; 3 | margin-top: 30px; 4 | padding: 0 30px; 5 | overflow-y: auto; 6 | } 7 | -------------------------------------------------------------------------------- /src/common/Tab/ContactsTab/_ContactsTab.scss: -------------------------------------------------------------------------------- 1 | .tab-search { 2 | height: 47px; 3 | } 4 | 5 | .tab-table-header { 6 | font: $subtitle $font-regular; 7 | background-color: white; 8 | } 9 | -------------------------------------------------------------------------------- /src/screens/auth/login/_LoginScreen.scss: -------------------------------------------------------------------------------- 1 | .login-module-link, 2 | .login-module-link:visited, 3 | .login-module-link:focus { 4 | font-size: $subtitle; 5 | color: $primary-color; 6 | } 7 | -------------------------------------------------------------------------------- /src/screens/auth/login/redux/LoginReduxConstants.js: -------------------------------------------------------------------------------- 1 | export const LOGIN_REDUX_CONSTANTS = { 2 | LOGIN_USER_ACTION: 'LOGIN_USER_ACTION', 3 | LOGOUT_USER_ACTION: 'LOGOUT_USER_ACTION', 4 | }; 5 | -------------------------------------------------------------------------------- /src/helpers/entityiTypeHelper.js: -------------------------------------------------------------------------------- 1 | export const getLabelFromValues = (value, mapObject) => { 2 | const found = mapObject.find(e => e.value === value); 3 | return (found && found.label) ?? ''; 4 | }; 5 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all", 4 | "printWidth": 120, 5 | "endOfLine": "lf", 6 | "tabWidth": 2, 7 | "bracketSpacing": true, 8 | "arrowParens": "avoid" 9 | } 10 | -------------------------------------------------------------------------------- /src/screens/Debtors/GenerateDebtor/component/DebtorConfirmationStep/_DebtorConfirmationStep.scss: -------------------------------------------------------------------------------- 1 | .gray-label { 2 | padding: 5px 10px; 3 | font: $subtitle $font-regular; 4 | color: $field-color; 5 | background-color: $background-color; 6 | } 7 | -------------------------------------------------------------------------------- /src/common/Loader/Loader.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const Loader = () => { 4 | return ( 5 |
6 |
7 |
8 | ); 9 | }; 10 | 11 | export default Loader; 12 | -------------------------------------------------------------------------------- /src/screens/Application/GenerateApplication/component/ApplicationConfirmationStep/_ApplicationConfirmationStep.scss: -------------------------------------------------------------------------------- 1 | .gray-label { 2 | padding: 5px 10px; 3 | font: $subtitle $font-regular; 4 | color: $field-color; 5 | background-color: $background-color; 6 | } 7 | -------------------------------------------------------------------------------- /src/helpers/ValidationHelper.js: -------------------------------------------------------------------------------- 1 | export const replaceHiddenCharacters = string => { 2 | return string?.toString()?.replace(/[\u200c\u200b]/g, ''); 3 | }; 4 | 5 | export const checkForEmail = emailAddress => { 6 | return /.+@.+\.[A-Za-z]+$/.test(emailAddress); 7 | }; 8 | -------------------------------------------------------------------------------- /src/screens/Dashboard/redux/DashboardReduxConstants.js: -------------------------------------------------------------------------------- 1 | export const DASHBOARD_REDUX_CONSTANTS = { 2 | DASHBOARD_DETAILS: 'DASHBOARD_DETAILS', 3 | DASHBOARD_USER_LIST_DETAILS: 'DASHBOARD_USER_LIST_DETAILS', 4 | RESET_DASHBOARD_DETAILS: 'RESET_DASHBOARD_DETAILS', 5 | }; 6 | -------------------------------------------------------------------------------- /src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /src/common/ForbiddenAccessPage/_ForbiddenAccessPage.scss: -------------------------------------------------------------------------------- 1 | .forbidden-access-container { 2 | display: flex; 3 | align-items: center; 4 | justify-content: center; 5 | flex-direction: column; 6 | height: 100vh; 7 | 8 | button { 9 | margin-top: 10px; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/helpers/NumberCommaSeparator.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line import/prefer-default-export 2 | export const NumberCommaSeparator = number => { 3 | return number?.toString()?.trim()?.length > 0 4 | ? number?.toString()?.replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,') 5 | : ''; 6 | }; 7 | -------------------------------------------------------------------------------- /src/constants/DateFormatConstants.js: -------------------------------------------------------------------------------- 1 | export const DATE_FORMAT_CONSTANT_FOR_CALENDER = { 2 | sameDay: '[Today]', 3 | nextDay: '[Tomorrow]', 4 | nextWeek: 'dddd', 5 | lastDay: '[Yesterday]', 6 | lastWeek: '[Last] dddd', 7 | sameElse: 'DD/MM/YYYY', 8 | }; 9 | 10 | export const DATE_FORMAT = 'DD/MM/YYYY'; 11 | -------------------------------------------------------------------------------- /src/screens/Debtors/DebtorsList/_DebtorsList.scss: -------------------------------------------------------------------------------- 1 | .application-filter-modal { 2 | .form-title { 3 | width: 215px; 4 | } 5 | 6 | .input-container, 7 | .date-picker-container { 8 | width: 200px; 9 | } 10 | } 11 | 12 | .application-status-select .custom-select__control { 13 | width: 200px; 14 | } 15 | -------------------------------------------------------------------------------- /src/screens/Application/ApplicationList/_ApplicationList.scss: -------------------------------------------------------------------------------- 1 | .application-filter-modal { 2 | .form-title { 3 | width: 215px; 4 | } 5 | 6 | .input-container, 7 | .date-picker-container { 8 | width: 200px; 9 | } 10 | } 11 | 12 | .application-status-select .custom-select__control { 13 | width: 200px; 14 | } 15 | -------------------------------------------------------------------------------- /src/common/GeneralLoader/redux/GeneralLoaderReduxConstants.js: -------------------------------------------------------------------------------- 1 | export const GENERAL_LOADER_REDUX_CONSTANTS = { 2 | START_GENERAL_LOADER_ON_REQUEST: 'START_GENERAL_LOADER_ON_REQUEST', 3 | STOP_GENERAL_LOADER_ON_SUCCESS_OR_FAIL: 'STOP_GENERAL_LOADER_ON_SUCCESS_OR_FAIL', 4 | // STOP_LOADER_BUTTON_ON_FAIL: 'STOP_LOADER_BUTTON_ON_FAIL', 5 | }; 6 | -------------------------------------------------------------------------------- /src/hooks/GetQueryParamHook.js: -------------------------------------------------------------------------------- 1 | import { useLocation } from 'react-router-dom'; 2 | 3 | export const useQueryParams = () => { 4 | const search = new URLSearchParams(useLocation().search); 5 | const params = {}; 6 | Array.from(search.entries()).forEach(([k, v]) => { 7 | params[`${k}`] = v; 8 | }); 9 | 10 | return params; 11 | }; 12 | -------------------------------------------------------------------------------- /src/common/ListFilters/redux/ListFiltersAction.js: -------------------------------------------------------------------------------- 1 | import { LIST_FILTERS_REDUX_CONSTANTS } from './ListFiltersReduxConstants'; 2 | 3 | export const saveAppliedFilters = (filterFor, filters) => { 4 | return dispatch => { 5 | dispatch({ 6 | type: LIST_FILTERS_REDUX_CONSTANTS.SAVE_APPLIED_FILTERS, 7 | filterFor, 8 | filters, 9 | }); 10 | }; 11 | }; 12 | -------------------------------------------------------------------------------- /src/screens/Insurer/services/InsurerMatrixApiServices.js: -------------------------------------------------------------------------------- 1 | import ApiService from '../../../services/api-service/ApiService'; 2 | import { INSURER_URLS } from '../../../constants/UrlConstants'; 3 | 4 | const InsurerMatrixApiServices = { 5 | getInsurerMatrixData: id => ApiService.getData(`${INSURER_URLS.MATRIX.MATRIX_DATA}${id}`), 6 | }; 7 | 8 | export default InsurerMatrixApiServices; 9 | -------------------------------------------------------------------------------- /src/screens/auth/setPassword/_SetPassword.scss: -------------------------------------------------------------------------------- 1 | .otp-row { 2 | display: flex; 3 | 4 | > div { 5 | justify-content: center; 6 | flex: 1 0 calc(16% - 0.563rem); 7 | margin-right: 0.938rem; 8 | } 9 | input { 10 | flex: 0; 11 | width: 1.25rem; 12 | font: $title $font-regular; 13 | color: $primary-color; 14 | } 15 | 16 | input::placeholder { 17 | color: $primary-color; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/screens/auth/forgotPassword/_ForgotPassword.scss: -------------------------------------------------------------------------------- 1 | .otp-row { 2 | display: flex; 3 | 4 | > div { 5 | justify-content: center; 6 | flex: 1 0 calc(16% - 0.563rem); 7 | margin-right: 0.938rem; 8 | } 9 | input { 10 | flex: 0; 11 | width: 1.25rem; 12 | font: $title $font-regular; 13 | color: $primary-color; 14 | } 15 | 16 | input::placeholder { 17 | color: $primary-color; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/screens/auth/resetPassword/_ResetPassword.scss: -------------------------------------------------------------------------------- 1 | .otp-row { 2 | display: flex; 3 | 4 | > div { 5 | justify-content: center; 6 | flex: 1 0 calc(16% - 0.563rem); 7 | margin-right: 0.938rem; 8 | } 9 | input { 10 | flex: 0; 11 | width: 1.25rem; 12 | font: $title $font-regular; 13 | color: $primary-color; 14 | } 15 | 16 | input::placeholder { 17 | color: $primary-color; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /src/constants/UserlistConstants.js: -------------------------------------------------------------------------------- 1 | export const USER_ROLES = [ 2 | { label: 'Risk Analyst', value: 'riskAnalyst' }, 3 | { label: 'Service Manager', value: 'serviceManager' }, 4 | { label: 'Super Admin', value: 'superAdmin' }, 5 | ]; 6 | 7 | export const USER_MODULE_ACCESS = [ 8 | { label: 'Read Access', value: 'read' }, 9 | { label: 'Write Access', value: 'write' }, 10 | { label: 'All Access', value: 'full-access' }, 11 | ]; 12 | -------------------------------------------------------------------------------- /src/screens/Alerts/alertFilterValidations.js: -------------------------------------------------------------------------------- 1 | import moment from 'moment'; 2 | import { errorNotification } from '../../common/Toast'; 3 | 4 | export const filterDateValidations = appliedParams => { 5 | if (appliedParams?.endDate || appliedParams?.startDate) { 6 | if (moment(appliedParams?.endDate)?.isBefore(appliedParams?.startDate)) { 7 | errorNotification('Please enter valid date range'); 8 | return false; 9 | } 10 | } 11 | return true; 12 | }; 13 | -------------------------------------------------------------------------------- /src/redux/store.js: -------------------------------------------------------------------------------- 1 | import { applyMiddleware, createStore } from 'redux'; 2 | import thunkMiddleware from 'redux-thunk'; 3 | import { persistStore } from 'redux-persist'; 4 | import { composeWithDevTools } from 'redux-devtools-extension'; 5 | import persistedReducer from './RootReducer'; 6 | 7 | export const store = createStore( 8 | persistedReducer, 9 | composeWithDevTools(applyMiddleware(thunkMiddleware)) 10 | ); 11 | 12 | export const persistStoreData = persistStore(store); 13 | -------------------------------------------------------------------------------- /src/common/Table/TableApiService.js: -------------------------------------------------------------------------------- 1 | import ApiService from '../../services/api-service/ApiService'; 2 | import { BASE_URL } from '../../constants/UrlConstants'; 3 | 4 | const TableApiService = { 5 | tableActions: ({ url, id, method, params = {}, data }) => 6 | ApiService.request({ url: `${BASE_URL}${url}/${id}`, method, params, data }), 7 | viewDocument: ({ url, id, method }) => 8 | ApiService.request({ url: `${BASE_URL}${url}${id}`, method }), 9 | }; 10 | 11 | export default TableApiService; 12 | -------------------------------------------------------------------------------- /src/screens/Debtors/services/DebtorAlertsApiServices.js: -------------------------------------------------------------------------------- 1 | import ApiService from '../../../services/api-service/ApiService'; 2 | import { DEBTORS_URLS } from '../../../constants/UrlConstants'; 3 | 4 | const DebtorAlertsApiServices = { 5 | getAlertsListData: (id, params) => 6 | ApiService.getData(`${DEBTORS_URLS.ALERTS.ALERTS_LIST}${id}`, { params }), 7 | getDebtorAlertsDetails: id => ApiService.getData(`${DEBTORS_URLS.ALERTS.ALERTS_DETAILS}${id}`), 8 | }; 9 | export default DebtorAlertsApiServices; 10 | -------------------------------------------------------------------------------- /src/screens/Clients/services/ClientOverdueApiService.js: -------------------------------------------------------------------------------- 1 | import ApiService from '../../../services/api-service/ApiService'; 2 | import { CLIENT_URLS } from '../../../constants/UrlConstants'; 3 | 4 | export const ClientOverdueApiServices = { 5 | getClientOverdueList: (params, id) => 6 | ApiService.getData(`${CLIENT_URLS.CLIENT_OVERDUE.GET_CLIENT_OVERDUE_LIST}${id}`, { params }), 7 | getClientOverdueEntityListData: () => 8 | ApiService.getData(CLIENT_URLS.CLIENT_OVERDUE.GET_CLIENT_CLAIMS_ENTITY_LIST), 9 | }; 10 | -------------------------------------------------------------------------------- /src/screens/Debtors/services/DebtorOverdueApiServices.js: -------------------------------------------------------------------------------- 1 | import ApiService from '../../../services/api-service/ApiService'; 2 | import { DEBTORS_URLS } from '../../../constants/UrlConstants'; 3 | 4 | export const DebtorOverdueApiServices = { 5 | getDebtorOverdueList: (params, id) => 6 | ApiService.getData(`${DEBTORS_URLS.DEBTOR_OVERDUE.GET_DEBTOR_OVERDUE_LIST}${id}`, { params }), 7 | getDebtorOverdueEntityListData: () => 8 | ApiService.getData(DEBTORS_URLS.DEBTOR_OVERDUE.GET_DEBTOR_OVERDUE_ENTITY_LIST), 9 | }; 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | #IDES 12 | .vscode 13 | .idea 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | .env.local 21 | .env.development.local 22 | .env.test.local 23 | .env.production.local 24 | .eslintcache 25 | 26 | npm-debug.log* 27 | yarn-debug.log* 28 | yarn-error.log* 29 | yarn.lock 30 | package-lock.json 31 | 32 | debug.log -------------------------------------------------------------------------------- /src/screens/Dashboard/services/DashboardApiService.js: -------------------------------------------------------------------------------- 1 | import ApiService from '../../../services/api-service/ApiService'; 2 | import { DASHBOARD_URLS } from '../../../constants/UrlConstants'; 3 | 4 | export const DashboardApiService = { 5 | getDashboardUserList: () => ApiService.getData(DASHBOARD_URLS.DASHBOARD_USER_LIST), 6 | getDashboardDetails: params => ApiService.getData(DASHBOARD_URLS.DASHBOARD_DETAILS, { params }), 7 | 8 | getEntitiesBySearch: params => ApiService.getData(DASHBOARD_URLS.SEARCH_ENTITIES, { params }), 9 | }; 10 | -------------------------------------------------------------------------------- /src/screens/Debtors/GenerateDebtor/component/DebtorDocumentsStep/_ApplicationDocumentStep.scss: -------------------------------------------------------------------------------- 1 | .documents-table { 2 | width: 100%; 3 | font-size: $subtitle; 4 | color: $field-color; 5 | border-collapse: collapse; 6 | td, 7 | th { 8 | padding: 0.313rem 1.25rem; 9 | } 10 | } 11 | 12 | .documents-table tr:nth-child(even) { 13 | background-color: $background-color; 14 | } 15 | 16 | .documents-table tr:nth-child(odd) { 17 | background-color: #ffffff; 18 | } 19 | 20 | .upload-document-row { 21 | margin-bottom: 30px; 22 | } 23 | -------------------------------------------------------------------------------- /src/constants/EntitySearchConstants.js: -------------------------------------------------------------------------------- 1 | export const SEARCH_ENTITIES = { 2 | client: 'clients', 3 | debtor: 'debtors', 4 | application: 'applications', 5 | }; 6 | 7 | export const FIELD_NAME_BY_ENTITY = { 8 | clients: 'clientId', 9 | debtors: 'debtorId', 10 | // applications: 'applications', 11 | }; 12 | 13 | export const REPORTS_SEARCH_ENTITIES = { 14 | clientIds: 'clients', 15 | debtorId: 'debtors', 16 | }; 17 | 18 | export const REPORTS_FIELD_NAME_BY_ENTITIES = { 19 | clients: 'clientIds', 20 | debtors: 'debtorId', 21 | }; 22 | -------------------------------------------------------------------------------- /src/hooks/OnWindowResizeGetElementWidthHook.js: -------------------------------------------------------------------------------- 1 | import { useLayoutEffect, useState } from 'react'; 2 | 3 | export const useWindowResizeGetElementWidth = element => { 4 | const [width, setWidth] = useState([0, 0]); 5 | useLayoutEffect(() => { 6 | function updateWidth() { 7 | setWidth([element?.scrollWidth, element?.offsetWidth]); 8 | } 9 | window.addEventListener('resize', updateWidth); 10 | updateWidth(); 11 | return () => window.removeEventListener('resize', updateWidth); 12 | }, [element]); 13 | return width; 14 | }; 15 | -------------------------------------------------------------------------------- /src/screens/Application/GenerateApplication/component/ApplicationDocumentsStep/_ApplicationDocumentStep.scss: -------------------------------------------------------------------------------- 1 | .documents-table { 2 | width: 100%; 3 | font-size: $subtitle; 4 | color: $field-color; 5 | border-collapse: collapse; 6 | td, 7 | th { 8 | padding: 0.313rem 1.25rem; 9 | } 10 | } 11 | 12 | .documents-table tr:nth-child(even) { 13 | background-color: $background-color; 14 | } 15 | 16 | .documents-table tr:nth-child(odd) { 17 | background-color: #ffffff; 18 | } 19 | 20 | .upload-document-row { 21 | margin-bottom: 30px; 22 | } 23 | -------------------------------------------------------------------------------- /src/App.js: -------------------------------------------------------------------------------- 1 | import { Provider } from 'react-redux'; 2 | import Notifications from 'react-notify-toast'; 3 | import { PersistGate } from 'redux-persist/integration/react'; 4 | import { persistStoreData, store } from './redux/store'; 5 | import Routes from './routes/Routes'; 6 | 7 | function App() { 8 | return ( 9 | 10 | 11 | 12 | 13 | 14 | 15 | ); 16 | } 17 | 18 | export default App; 19 | -------------------------------------------------------------------------------- /src/common/Layout/_Layout.scss: -------------------------------------------------------------------------------- 1 | .dashboard-container { 2 | display: flex; 3 | justify-content: space-between; 4 | height: 100vh; 5 | width: 100%; 6 | padding: 1rem 0 1rem 1rem; 7 | background-color: $background-color; 8 | overflow: hidden; 9 | } 10 | 11 | .right-side-container { 12 | width: calc(100% - 15.313rem); 13 | height: calc(100vh - 2rem); 14 | background-color: $background-color; 15 | } 16 | 17 | .page-container { 18 | height: calc(100vh - 100px); 19 | padding-right: 2rem; 20 | overflow-y: auto; 21 | overflow-x: hidden; 22 | } 23 | -------------------------------------------------------------------------------- /src/screens/auth/otpScreen/_VerifyOtp.scss: -------------------------------------------------------------------------------- 1 | .code-container { 2 | display: flex; 3 | align-items: center; 4 | margin-top: 10px; 5 | 6 | input { 7 | flex: 0; 8 | width: 56px !important; 9 | height: 56px !important; 10 | margin-right: 0.625rem; 11 | font: $h5 $font-regular; 12 | color: $primary-color; 13 | border: 0.063rem solid $border-color !important; 14 | border-radius: 0.625rem !important; 15 | outline: none; 16 | } 17 | 18 | input::placeholder { 19 | font: $h4 $font-medium; 20 | color: $primary-color; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.scss'; 4 | import App from './App'; 5 | import reportWebVitals from './reportWebVitals'; 6 | 7 | ReactDOM.render( 8 | 9 | 10 | , 11 | document.getElementById('root') 12 | ); 13 | 14 | // If you want to start measuring performance in your app, pass a function 15 | // to log results (for example: reportWebVitals(console.log)) 16 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 17 | reportWebVitals(); 18 | -------------------------------------------------------------------------------- /src/screens/Application/ImportApplication/Components/ImportApplicationValidateStep/_ImportApplicationValidateStep.scss: -------------------------------------------------------------------------------- 1 | .ia-validate-step { 2 | display: flex; 3 | flex-direction: column; 4 | align-items: center; 5 | .ia-validate-count { 6 | width: 100%; 7 | padding: 10px; 8 | background-color: $background-color; 9 | border-radius: 10px; 10 | text-align: left; 11 | } 12 | .ia-validate-table { 13 | width: 100%; 14 | max-height: 280px; 15 | background-color: $background-color; 16 | border-radius: 10px; 17 | overflow: auto; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/screens/Settings/services/SettingOrganizationDetailsApiService.js: -------------------------------------------------------------------------------- 1 | import ApiService from '../../../services/api-service/ApiService'; 2 | import { SETTING_URL } from '../../../constants/UrlConstants'; 3 | 4 | const SettingOrganizationDetailsApiServices = { 5 | getOrganizationDetails: data => 6 | ApiService.getData(SETTING_URL.ORGANIZATION_DETAILS.GET_ORGANIZATION_DETAILS, data), 7 | updateOrganizationDetails: data => 8 | ApiService.putData(SETTING_URL.ORGANIZATION_DETAILS.UPDATE_ORGANIZATION_DETAILS, data), 9 | }; 10 | export default SettingOrganizationDetailsApiServices; 11 | -------------------------------------------------------------------------------- /.env-cmdrc: -------------------------------------------------------------------------------- 1 | { 2 | "development":{ 3 | "REACT_APP_BASE_URL": "https://client.trad.dev.humanpixel.com.au/app/rp/", 4 | "REACT_APP_SOCKET_URL": "https://client.trad.dev.humanpixel.com.au" 5 | }, 6 | "test":{ 7 | "REACT_APP_BASE_URL": "https://client.trad.test.humanpixel.com.au/app/rp/", 8 | "REACT_APP_SOCKET_URL": "https://client.trad.test.humanpixel.com.au" 9 | }, 10 | "production":{ 11 | "REACT_APP_BASE_URL": "https://client.tcrportal.com.au/app/rp/", 12 | "REACT_APP_SOCKET_URL": "https://client.tcrportal.com.au" 13 | } 14 | } -------------------------------------------------------------------------------- /src/common/GeneralLoader/redux/GeneralLoaderAction.js: -------------------------------------------------------------------------------- 1 | import { GENERAL_LOADER_REDUX_CONSTANTS } from './GeneralLoaderReduxConstants'; 2 | import { store } from '../../../redux/store'; 3 | 4 | export const startGeneralLoaderOnRequest = loaderFor => { 5 | store.dispatch({ 6 | type: GENERAL_LOADER_REDUX_CONSTANTS.START_GENERAL_LOADER_ON_REQUEST, 7 | loaderFor, 8 | }); 9 | }; 10 | export const stopGeneralLoaderOnSuccessOrFail = loaderFor => { 11 | store.dispatch({ 12 | type: GENERAL_LOADER_REDUX_CONSTANTS.STOP_GENERAL_LOADER_ON_SUCCESS_OR_FAIL, 13 | loaderFor, 14 | }); 15 | }; 16 | -------------------------------------------------------------------------------- /src/screens/Insurer/ViewInsurer/_ViewInsurer.scss: -------------------------------------------------------------------------------- 1 | .common-detail-field.view-insurer-website { 2 | grid-column: 1 / span 2; 3 | 4 | a { 5 | padding: 2px 5px; 6 | text-decoration: none; 7 | font: $subtitle $font-medium; 8 | color: $field-color; 9 | } 10 | } 11 | 12 | .view-insurer-grid .common-detail-field { 13 | grid-template-columns: 130px 1fr; 14 | align-items: baseline; 15 | .common-detail-title { 16 | margin-top: 5px; 17 | } 18 | } 19 | 20 | .view-insurer-value { 21 | @extend .view-debtor-value; 22 | min-height: unset; 23 | padding: 2px 5px; 24 | } 25 | -------------------------------------------------------------------------------- /src/hooks/useUrlParamsUpdate.js: -------------------------------------------------------------------------------- 1 | import { useEffect, useMemo } from 'react'; 2 | import { useHistory } from 'react-router-dom'; 3 | 4 | export const useUrlParamsUpdate = params => { 5 | const history = useHistory(); 6 | 7 | const dependencies = useMemo(() => Object.values(params), [params]); 8 | 9 | useEffect(() => { 10 | const url = Object.entries(params) 11 | .filter(arr => arr[1] !== undefined) 12 | .map(([key, value]) => `${key}=${value}`) 13 | .join('&'); 14 | 15 | history.replace(`${history?.location?.pathname}?${url}`); 16 | }, [history, ...dependencies]); 17 | }; 18 | -------------------------------------------------------------------------------- /src/screens/Application/ImportApplication/Components/ImportApplicationDownloadSample/_ImportApplicationDownloadSample.scss: -------------------------------------------------------------------------------- 1 | .ia-download-step { 2 | display: flex; 3 | padding-top: 10px; 4 | flex-direction: column; 5 | align-items: center; 6 | } 7 | 8 | .ia-file-icon { 9 | height: 200px; 10 | width: 100%; 11 | padding: 20px; 12 | border: 1px solid $border-color; 13 | border-radius: 10px; 14 | display: flex; 15 | flex-direction: column; 16 | align-items: center; 17 | justify-content: center; 18 | } 19 | .ia-file-text { 20 | font-size: $field-name; 21 | color: $primary-color; 22 | } 23 | -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "TRAD Risk Portal", 3 | "name": "TRAD - Risk Portal", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /src/utilities/_color-palette.scss: -------------------------------------------------------------------------------- 1 | $primary-color: #0073ab; 2 | $primary-variant-color: #38558f; 3 | $primary-color-1: #e2e9f0; 4 | $primary-color-1-variant-color: #cbd7e4; 5 | $secondary-color: #f6a457; 6 | $secondary-color-light: #fdf0e4; 7 | $secondary-variant-color: #f49745; 8 | $border-color: #e7ecf2; 9 | $placeholder-color: #b8c1cc; 10 | $field-color: #66737f; 11 | $background-color: #f2f5f8; 12 | $success-color: #82a998; 13 | $success-variant-color: #62d493; 14 | $error-color: #fe5050; 15 | $error-variant-color: #fe6767; 16 | $error-color-light: #feebeb; 17 | $alert-blue: #206dff; 18 | $alert-blue-light: #e8f0ff; 19 | -------------------------------------------------------------------------------- /src/screens/Debtors/ViewDebtor/_ViewDebtor.scss: -------------------------------------------------------------------------------- 1 | .debtors-modal-header { 2 | text-align: left !important; 3 | } 4 | 5 | .view-debtor-detail-container { 6 | @extend .add-overdue-content; 7 | gap: 10px 5%; 8 | width: 100%; 9 | padding: 15px; 10 | } 11 | 12 | .view-debtor-value { 13 | min-height: 32px; 14 | padding: 0.344rem; 15 | font: $subtitle $font-medium; 16 | color: $field-color; 17 | } 18 | 19 | .view-debtor-detail-field-container { 20 | display: grid; 21 | grid-template-columns: 155px 1fr; 22 | } 23 | 24 | .view-debtor-detail-title { 25 | margin-top: 5px; 26 | color: $primary-color; 27 | } 28 | -------------------------------------------------------------------------------- /src/common/ForbiddenAccessPage/ForbiddenAccessPage.js: -------------------------------------------------------------------------------- 1 | import React, { useCallback } from 'react'; 2 | import { useHistory } from 'react-router-dom'; 3 | import Button from '../Button/Button'; 4 | 5 | const ForbiddenAccessPage = () => { 6 | const history = useHistory(); 7 | 8 | const goBack = useCallback(() => { 9 | history.replace('/dashboard'); 10 | }, [history]); 11 | 12 | return ( 13 |
14 | Forbidden Access 15 |
17 | ); 18 | }; 19 | 20 | export default ForbiddenAccessPage; 21 | -------------------------------------------------------------------------------- /src/screens/Clients/services/ClientClaimsApiService.js: -------------------------------------------------------------------------------- 1 | import ApiService from '../../../services/api-service/ApiService'; 2 | import { CLIENT_URLS } from '../../../constants/UrlConstants'; 3 | 4 | export const ClientClaimsApiServices = { 5 | getClientClaimsListByFilter: params => 6 | ApiService.getData(CLIENT_URLS.CLIENT_CLAIMS.CLIENT_CLAIMS_LIST, { params }), 7 | getClientClaimsColumnList: params => 8 | ApiService.getData(CLIENT_URLS.CLIENT_CLAIMS.CLIENT_CLAIMS_COLUMN_LIST, { params }), 9 | updateClientClaimsColumnList: data => 10 | ApiService.putData(CLIENT_URLS.CLIENT_CLAIMS.UPDATE_CLIENT_CLAIMS_COLUMN_LIST, data), 11 | }; 12 | -------------------------------------------------------------------------------- /src/hooks/UserClickOutsideHook.js: -------------------------------------------------------------------------------- 1 | import { useEffect } from 'react'; 2 | 3 | export const useOnClickOutside = (ref, handler) => { 4 | useEffect(() => { 5 | const listener = event => { 6 | if (!ref.current || ref.current.contains(event.target)) { 7 | return; 8 | } 9 | 10 | handler(event); 11 | }; 12 | 13 | document.addEventListener('mousedown', listener); 14 | document.addEventListener('touchstart', listener); 15 | 16 | return () => { 17 | document.removeEventListener('mousedown', listener); 18 | document.removeEventListener('touchstart', listener); 19 | }; 20 | }, [ref, handler]); 21 | }; 22 | -------------------------------------------------------------------------------- /src/common/GeneralLoader/redux/GeneralLoaderReducer.js: -------------------------------------------------------------------------------- 1 | import { GENERAL_LOADER_REDUX_CONSTANTS } from './GeneralLoaderReduxConstants'; 2 | 3 | export const generalLoaderReducer = (state = {}, action) => { 4 | switch (action.type) { 5 | case GENERAL_LOADER_REDUX_CONSTANTS.START_GENERAL_LOADER_ON_REQUEST: 6 | return { ...state, [`${action?.loaderFor}`]: true }; 7 | case GENERAL_LOADER_REDUX_CONSTANTS.STOP_GENERAL_LOADER_ON_SUCCESS_OR_FAIL: { 8 | const temp = { ...state }; 9 | delete temp[`${action?.loaderFor}`]; 10 | 11 | return { ...temp }; 12 | } 13 | default: 14 | return { 15 | ...state, 16 | }; 17 | } 18 | }; 19 | -------------------------------------------------------------------------------- /src/common/UserPrivilegeWrapper/UserPrivilegeWrapper.js: -------------------------------------------------------------------------------- 1 | import PropTypes from 'prop-types'; 2 | import { useModulePrivileges } from '../../hooks/userPrivileges/useModulePrivilegesHook'; 3 | 4 | const UserPrivilegeWrapper = props => { 5 | const { moduleName, children } = props; 6 | 7 | const { hasWriteAccess, hasFullAccess } = useModulePrivileges(moduleName); 8 | 9 | if (hasWriteAccess || hasFullAccess) { 10 | return children; 11 | } 12 | 13 | return null; 14 | }; 15 | 16 | UserPrivilegeWrapper.propTypes = { 17 | moduleName: PropTypes.string.isRequired, 18 | children: PropTypes.element.isRequired, 19 | }; 20 | 21 | export default UserPrivilegeWrapper; 22 | -------------------------------------------------------------------------------- /src/helpers/AlertHelper.js: -------------------------------------------------------------------------------- 1 | import moment from 'moment'; 2 | import { NumberCommaSeparator } from './NumberCommaSeparator'; 3 | 4 | export const ALERT_TYPE_ROW = { 5 | Moderate: 'red-tag', 6 | High: 'secondary-tag', 7 | Low: 'alert-blue-tag', 8 | }; 9 | 10 | export const checkAlertValue = row => { 11 | switch (row.type) { 12 | case 'dollar': 13 | return row?.value ? `$ ${NumberCommaSeparator(row?.value)}` : '-'; 14 | case 'percent': 15 | return row?.value ? `${row?.value} %` : '-'; 16 | case 'date': 17 | return row?.value ? moment(row?.value)?.format('DD-MMM-YYYY') : '-'; 18 | default: 19 | return row?.value || '-'; 20 | } 21 | }; 22 | -------------------------------------------------------------------------------- /src/screens/Clients/services/ClientNotesApiService.js: -------------------------------------------------------------------------------- 1 | import ApiService from '../../../services/api-service/ApiService'; 2 | import { CLIENT_URLS } from '../../../constants/UrlConstants'; 3 | 4 | const ClientNotesApiService = { 5 | getClientNotesList: (id, params) => 6 | ApiService.getData(`${CLIENT_URLS.NOTES.NOTES_LIST}${id}`, { params }), 7 | addClientNote: data => ApiService.postData(`${CLIENT_URLS.NOTES.NOTES_LIST}`, data), 8 | updateClientNote: (id, data) => ApiService.putData(`${CLIENT_URLS.NOTES.NOTES_LIST}${id}`, data), 9 | deleteClientNote: id => ApiService.deleteData(`${CLIENT_URLS.NOTES.NOTES_LIST}${id}`), 10 | }; 11 | 12 | export default ClientNotesApiService; 13 | -------------------------------------------------------------------------------- /src/common/IconButton/_IconButton.scss: -------------------------------------------------------------------------------- 1 | .outlined-bg-button { 2 | background-color: $background-color; 3 | border: 1px solid white; 4 | } 5 | 6 | .outlined-bg-button:hover { 7 | background-color: $border-color; 8 | } 9 | 10 | .button.icon-button { 11 | display: flex; 12 | align-items: center; 13 | justify-content: center; 14 | padding: 10px; 15 | } 16 | .notification-badge { 17 | position: absolute; 18 | top: -7px; 19 | right: -7px; 20 | display: flex; 21 | justify-content: center; 22 | align-items: center; 23 | width: 25px; 24 | height: 25px; 25 | background-color: $secondary-color; 26 | color: white; 27 | font-size: $text; 28 | border-radius: 50%; 29 | } 30 | -------------------------------------------------------------------------------- /src/screens/Application/ImportApplication/Components/ImportAplicationImportStep/_ImportApplicationImportStep.scss: -------------------------------------------------------------------------------- 1 | .ia-import-file-step { 2 | display: flex; 3 | padding-top: 10px; 4 | flex-direction: column; 5 | align-items: center; 6 | .ia-import-file-name { 7 | display: flex; 8 | align-items: center; 9 | justify-content: space-between; 10 | height: auto; 11 | width: 100%; 12 | padding: 10px 15px; 13 | background-color: $background-color; 14 | border-radius: 10px; 15 | .ia-file-name { 16 | font-size: $field-name; 17 | color: $primary-color; 18 | } 19 | } 20 | .import-error { 21 | width: 100%; 22 | text-align: left; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/screens/Reports/ViewReports/_ViewReports.scss: -------------------------------------------------------------------------------- 1 | .filter-modal-row .custom-select { 2 | .custom-select__control { 3 | height: 32px; 4 | width: 200px; 5 | border-radius: 5px; 6 | } 7 | 8 | .custom-select-dropdown { 9 | top: 40px; 10 | } 11 | } 12 | 13 | .filter-modal-row .title { 14 | font: $subtitle $font-regular; 15 | color: $primary-color; 16 | } 17 | 18 | .review-report-month-picker { 19 | height: auto; 20 | } 21 | .disclaimer-title{ 22 | font: 14px $font-medium; 23 | color: rgba(0,58,120, .85); 24 | padding-left: 10px; 25 | } 26 | .disclaimer-body{ 27 | padding: 5px 10px 0; 28 | text-align: justify; 29 | color: $field-color; 30 | font-size: 14px; 31 | } 32 | -------------------------------------------------------------------------------- /src/screens/Debtors/services/DebtorsNotesApiService.js: -------------------------------------------------------------------------------- 1 | import ApiService from '../../../services/api-service/ApiService'; 2 | import { DEBTORS_URLS } from '../../../constants/UrlConstants'; 3 | 4 | const DebtorsNotesApiService = { 5 | getDebtorsNotesList: (id, params) => 6 | ApiService.getData(`${DEBTORS_URLS.NOTES.NOTES_LIST}${id}`, { params }), 7 | addDebtorsNote: data => ApiService.postData(`${DEBTORS_URLS.NOTES.NOTES_LIST}`, data), 8 | updateDebtorsNote: (id, data) => 9 | ApiService.putData(`${DEBTORS_URLS.NOTES.NOTES_LIST}${id}`, data), 10 | deleteDebtorsNote: id => ApiService.deleteData(`${DEBTORS_URLS.NOTES.NOTES_LIST}${id}`), 11 | }; 12 | 13 | export default DebtorsNotesApiService; 14 | -------------------------------------------------------------------------------- /src/helpers/DownloadHelper.js: -------------------------------------------------------------------------------- 1 | export const downloadAll = response => { 2 | try { 3 | const blob = new Blob([response?.data], { type: response?.headers?.['content-type'] }); 4 | const url = URL.createObjectURL(blob); 5 | const link = document.createElement('a'); 6 | 7 | const fileName = 8 | response?.headers?.['content-disposition']?.split('filename=')[1] || 9 | `credit_limit_${new Date().getTime()}.csv`; 10 | 11 | link.setAttribute('download', fileName); 12 | link.setAttribute('target', '__blank'); 13 | link.style.display = 'none'; 14 | 15 | document.body.appendChild(link); 16 | 17 | link.setAttribute('href', url); 18 | link.click(); 19 | } catch (e) { 20 | /**/ 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /src/helpers/Mappers.js: -------------------------------------------------------------------------------- 1 | export const entityTypeMapperObjectForPersonStep = [ 2 | { label: 'Add Director', value: 'PROPRIETARY_LIMITED' }, 3 | { label: 'Add Director', value: 'LIMITED_COMPANY' }, 4 | { label: 'Add Trustee', value: 'TRUST' }, 5 | { label: 'Add Partner', value: 'PARTNERSHIP' }, 6 | { label: 'Add Sole Trader', value: 'SOLE_TRADER' }, 7 | { label: 'Add Proprietor ', value: 'BUSINESS' }, 8 | { label: 'Add Director', value: 'CORPORATION' }, 9 | { label: 'Add Director', value: 'GOVERNMENT' }, 10 | { label: 'Add Director', value: 'INCORPORATED' }, 11 | { label: 'Add Director', value: 'NO_LIABILITY' }, 12 | { label: 'Add Director', value: 'PROPRIETARY' }, 13 | { label: 'Add Director', value: 'REGISTERED_BODY' }, 14 | ]; 15 | -------------------------------------------------------------------------------- /src/screens/Settings/services/SettingApiIntegrationService.js: -------------------------------------------------------------------------------- 1 | import ApiService from '../../../services/api-service/ApiService'; 2 | import { SETTING_URL } from '../../../constants/UrlConstants'; 3 | 4 | const SettingApiIntegrationServices = { 5 | getApiIntegrationDetails: data => 6 | ApiService.getData(SETTING_URL.API_INTEGRATION.GET_API_INTEGRATION, data), 7 | updateApiIntegrationDetails: data => 8 | ApiService.putData(SETTING_URL.API_INTEGRATION.UPDATE_API_INTEGRATION, data), 9 | testApiIntegrationDetails: params => 10 | ApiService.request({ 11 | url: SETTING_URL.API_INTEGRATION.TEST_API_INTEGRATION, 12 | params, 13 | method: 'GET', 14 | timeout: 60000, 15 | }), 16 | }; 17 | export default SettingApiIntegrationServices; 18 | -------------------------------------------------------------------------------- /src/screens/Application/ImportApplication/Components/ImportApplicationGenerateApplicationStep/_ImportApplicationGenerateApplication.scss: -------------------------------------------------------------------------------- 1 | .ia-generate-step { 2 | display: flex; 3 | flex-direction: column; 4 | align-items: center; 5 | .ia-generate-status-count { 6 | display: flex; 7 | align-items: center; 8 | justify-content: space-between; 9 | width: 100%; 10 | padding: 10px; 11 | background-color: $background-color; 12 | border-radius: 10px; 13 | .ia-import-status { 14 | display: flex; 15 | align-items: center; 16 | } 17 | } 18 | .ia-validate-table { 19 | width: 100%; 20 | max-height: 280px; 21 | background-color: $background-color; 22 | border-radius: 10px; 23 | overflow: auto; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/screens/Clients/services/ClientContactApiService.js: -------------------------------------------------------------------------------- 1 | import ApiService from '../../../services/api-service/ApiService'; 2 | import { CLIENT_URLS } from '../../../constants/UrlConstants'; 3 | 4 | const ClientContactApiService = { 5 | getClientContactList: (id, params) => 6 | ApiService.getData(`${CLIENT_URLS.CONTACT.CONTACT_LIST}${id}`, { params }), 7 | getClientContactColumnListName: () => 8 | ApiService.getData(CLIENT_URLS.CONTACT.COLUMN_NAME_LIST_URL), 9 | updateClientContactColumnListName: data => 10 | ApiService.putData(CLIENT_URLS.CONTACT.COLUMN_NAME_LIST_URL, data), 11 | syncClientContactData: id => 12 | ApiService.putData(`${CLIENT_URLS.CONTACT.SYNC_CLIENT_CONTACT_DATA_URL}${id}`), 13 | }; 14 | 15 | export default ClientContactApiService; 16 | -------------------------------------------------------------------------------- /src/screens/Settings/services/SettingAuditLogApiService.js: -------------------------------------------------------------------------------- 1 | import ApiService from '../../../services/api-service/ApiService'; 2 | import { SETTING_URL } from '../../../constants/UrlConstants'; 3 | 4 | const SettingAuditLogServices = { 5 | getAuditLogList: params => 6 | ApiService.getData(SETTING_URL.AUDIT_LOG.GET_AUDIT_LOG_LIST, { params }), 7 | getAuditLogColumnNameList: data => 8 | ApiService.getData(SETTING_URL.AUDIT_LOG.GET_AUDIT_LOG_COLUMN_LIST_NAME, data), 9 | updateAuditLogColumnNameList: data => 10 | ApiService.putData(SETTING_URL.AUDIT_LOG.UPDATE_AUDIT_LOG_COLUMN_NAME_LIST, data), 11 | getAuditUserNameList: data => 12 | ApiService.getData(SETTING_URL.AUDIT_LOG.GET_AUDIT_USER_TYPE_LIST, data), 13 | }; 14 | export default SettingAuditLogServices; 15 | -------------------------------------------------------------------------------- /src/screens/Insurer/services/InsurerContactApiServices.js: -------------------------------------------------------------------------------- 1 | import ApiService from '../../../services/api-service/ApiService'; 2 | import { INSURER_URLS } from '../../../constants/UrlConstants'; 3 | 4 | const InsurerContactApiServices = { 5 | getInsurerContactList: (id, params) => 6 | ApiService.getData(`${INSURER_URLS.CONTACT.CONTACT_LIST}${id}`, { params }), 7 | getInsurerContactColumnListName: () => 8 | ApiService.getData(`${INSURER_URLS.CONTACT.COLUMN_NAME_LIST_URL}`), 9 | updateInsurerContactColumnNameList: data => 10 | ApiService.putData(`${INSURER_URLS.CONTACT.UPDATE_COLUMN_NAME_LIST_URL}`, data), 11 | syncInsurerContactList: id => 12 | ApiService.putData(`${INSURER_URLS.CONTACT.SYNC_CONTACT_LIST_URL}${id}`), 13 | }; 14 | export default InsurerContactApiServices; 15 | -------------------------------------------------------------------------------- /src/screens/Debtors/GenerateDebtor/component/DebtorDocumentsStep/validations/DebtorDocumentStepValidations.js: -------------------------------------------------------------------------------- 1 | import { saveDebtorStepDataToBackend } from '../../../../redux/DebtorsAction'; 2 | 3 | export const debtorDocumentsStepValidations = async (dispatch, data, editDebtorData) => { 4 | let validated = true; 5 | if (validated) { 6 | const finalData = { 7 | stepper: 'documents', 8 | debtorId: editDebtorData?._id, 9 | /* entityType: editDebtorData.companyStep.entityType[0].value, 10 | ...data, */ 11 | }; 12 | try { 13 | await dispatch(saveDebtorStepDataToBackend(finalData)); 14 | } catch (e) { 15 | throw Error(); 16 | } 17 | validated = true; 18 | } 19 | /* dispatch(updateEditDebtorData('documents', { })); */ 20 | return validated; 21 | }; 22 | -------------------------------------------------------------------------------- /src/screens/Clients/services/ClientPoliciesApiService.js: -------------------------------------------------------------------------------- 1 | import ApiService from '../../../services/api-service/ApiService'; 2 | import { CLIENT_URLS } from '../../../constants/UrlConstants'; 3 | 4 | const ClientPoliciesApiService = { 5 | getClientPoliciesList: (id, params) => 6 | ApiService.getData(`${CLIENT_URLS.POLICIES.POLICIES_LIST}${id}`, { params }), 7 | getClientPoliciesColumnListName: () => 8 | ApiService.getData(`${CLIENT_URLS.POLICIES.COLUMN_NAME_LIST_URL}?columnFor=client-policy`), 9 | updateClientPoliciesColumnListName: data => 10 | ApiService.putData(CLIENT_URLS.POLICIES.COLUMN_NAME_LIST_URL, data), 11 | syncClientContactData: id => 12 | ApiService.putData(`${CLIENT_URLS.POLICIES.SYNC_CLIENT_POLICIES_DATA_URL}${id}`), 13 | }; 14 | 15 | export default ClientPoliciesApiService; 16 | -------------------------------------------------------------------------------- /src/screens/Debtors/GenerateDebtor/component/DebtorConfirmationStep/validations/DebtorConfirmationStepValidation.js: -------------------------------------------------------------------------------- 1 | import { getDebtorFilter, saveDebtorStepDataToBackend } from '../../../../redux/DebtorsAction'; 2 | 3 | export const debtorConfirmationStepValidations = async ( 4 | dispatch, 5 | data, 6 | editDebtorData, 7 | history 8 | ) => { 9 | let validated = true; 10 | if (validated) { 11 | const finalData = { 12 | stepper: 'confirmation', 13 | debtorId: editDebtorData?._id, 14 | }; 15 | try { 16 | await dispatch(saveDebtorStepDataToBackend(finalData)); 17 | history.replace('/debtors'); 18 | await dispatch(getDebtorFilter()); 19 | } catch (e) { 20 | throw Error(); 21 | } 22 | validated = true; 23 | } 24 | 25 | return validated; 26 | }; 27 | -------------------------------------------------------------------------------- /src/screens/auth/services/AuthApiService.js: -------------------------------------------------------------------------------- 1 | import ApiService from '../../../services/api-service/ApiService'; 2 | import { AUTH_URLS } from '../../../constants/UrlConstants'; 3 | 4 | const AuthApiService = { 5 | loginUser: data => ApiService.postData(AUTH_URLS.LOGIN_URL, data), 6 | forgotPassword: data => ApiService.postData(AUTH_URLS.FORGOT_PASSWORD_URL, data), 7 | verifyOtp: data => ApiService.postData(AUTH_URLS.VERIFY_OTP_URL, data), 8 | resentOtp: data => ApiService.postData(AUTH_URLS.RESEND_OTP_URL, data), 9 | resetPassword: data => ApiService.postData(AUTH_URLS.RESET_PASSWORD_URL, data), 10 | setPassword: data => 11 | ApiService.postData(AUTH_URLS.SET_PASSWORD_URL, { 12 | signUpToken: data.token, 13 | password: data.password, 14 | }), 15 | }; 16 | 17 | export default AuthApiService; 18 | -------------------------------------------------------------------------------- /src/common/Checkbox/Checkbox.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | 4 | const Checkbox = props => { 5 | const { title, className, ...restProps } = props; 6 | const checkboxClasses = `d-flex align-center ${className}`; 7 | return ( 8 |
e.stopPropagation()}> 9 | 14 |
15 | ); 16 | }; 17 | 18 | Checkbox.propTypes = { 19 | title: PropTypes.string, 20 | className: PropTypes.string, 21 | }; 22 | 23 | Checkbox.defaultProps = { 24 | title: '', 25 | className: '', 26 | }; 27 | export default Checkbox; 28 | -------------------------------------------------------------------------------- /src/common/RadioButton/RadioButton.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | 4 | const RadioButton = props => { 5 | const { id, label, value, name, className, ...restProps } = props; 6 | return ( 7 |
8 | 9 | 12 |
13 | ); 14 | }; 15 | 16 | RadioButton.propTypes = { 17 | id: PropTypes.string.isRequired, 18 | className: PropTypes.string, 19 | name: PropTypes.string.isRequired, 20 | label: PropTypes.string, 21 | value: PropTypes.string.isRequired, 22 | }; 23 | 24 | RadioButton.defaultProps = { 25 | label: '', 26 | className: '', 27 | }; 28 | 29 | export default RadioButton; 30 | -------------------------------------------------------------------------------- /src/common/Toast.js: -------------------------------------------------------------------------------- 1 | import { notify } from 'react-notify-toast'; 2 | 3 | export const TOAST_TYPE = { 4 | success: 'success', 5 | error: 'error', 6 | warning: 'warning', 7 | }; 8 | 9 | export const SUCCESS_TOAST_COLOR = '#00A65A'; 10 | export const ERROR_TOAST_COLOR = '#DD4B39'; 11 | export const WARNING_TOAST_COLOR = '#F39C12'; 12 | export const TOAST_TIMEOUT = 3000; 13 | 14 | export const successNotification = (message, timeOut = TOAST_TIMEOUT) => { 15 | notify.show(message, TOAST_TYPE.success, timeOut, SUCCESS_TOAST_COLOR); 16 | }; 17 | 18 | export const errorNotification = (message, timeOut = TOAST_TIMEOUT) => { 19 | notify.show(message, TOAST_TYPE.error, timeOut, ERROR_TOAST_COLOR); 20 | }; 21 | 22 | export const warningNotification = message => { 23 | notify.show(message, TOAST_TYPE.warning, TOAST_TIMEOUT, WARNING_TOAST_COLOR); 24 | }; 25 | -------------------------------------------------------------------------------- /src/screens/Claims/AddViewClaims/_AddViewClaims.scss: -------------------------------------------------------------------------------- 1 | .add-claims-save-button { 2 | @extend .add-overdues-save-button; 3 | } 4 | 5 | .add-claims-content { 6 | @extend .add-overdue-content; 7 | width: 100%; 8 | padding: 30px; 9 | 10 | .react-select-container, 11 | .react-select-container .react-select__control, 12 | .date-picker-container, 13 | > div > div { 14 | width: 100%; 15 | max-width: 300px; 16 | } 17 | } 18 | 19 | .add-claims-content.view-claim-content { 20 | gap: 20px; 21 | } 22 | 23 | .claims-title { 24 | width: 190px; 25 | margin-right: 10px; 26 | font: $subtitle $font-regular; 27 | color: $primary-color; 28 | } 29 | 30 | .view-claim-detail { 31 | font: $subtitle $font-regular; 32 | color: $field-color; 33 | } 34 | 35 | .view-claim-switch-disabled.common-switch + label { 36 | cursor: default; 37 | } 38 | -------------------------------------------------------------------------------- /src/assets/images/page-not-found.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/screens/Claims/redux/ClaimsReduxConstants.js: -------------------------------------------------------------------------------- 1 | export const CLAIMS_REDUX_CONSTANTS = { 2 | CLAIMS_LIST_SUCCESS: 'CLAIMS_LIST_SUCCESS', 3 | RESET_CLAIM_LIST_DATA: 'RESET_CLAIM_LIST_DATA', 4 | 5 | GET_CLAIMS_COLUMNS_LIST: 'GET_CLAIMS_COLUMNS_LIST', 6 | GET_CLAIMS_DEFAULT_COLUMN_LIST: 'GET_CLAIMS_DEFAULT_COLUMN_LIST', 7 | UPDATE_CLAIMS_COLUMNS_LIST: 'UPDATE_CLAIMS_COLUMNS_LIST', 8 | 9 | GET_CLAIMS_ENTITY_LIST: 'GET_CLAIMS_ENTITY_LIST', 10 | GET_CLAIMS_ENTITY_LIST_BY_SEARCH: 'GET_CLAIMS_ENTITY_LIST_BY_SEARCH', 11 | 12 | ADD_CLAIMS_VALUE_CHANGE: 'ADD_CLAIMS_VALUE_CHANGE', 13 | GET_CLAIM_DETAILS: 'GET_CLAIM_DETAILS', 14 | RESET_CLAIMS_DETAILS: 'RESET_CLAIMS_DETAILS', 15 | 16 | GET_CLAIMS_MANAGER_LIST: 'GET_CLAIMS_MANAGER_LIST', 17 | 18 | DOCUMENTS: { 19 | FETCH_CLAIMS_DOCUMENTS_LIST: 'FETCH_CLAIMS_DOCUMENTS_LIST', 20 | }, 21 | }; 22 | -------------------------------------------------------------------------------- /src/screens/Dashboard/redux/DashboardReducer.js: -------------------------------------------------------------------------------- 1 | import { DASHBOARD_REDUX_CONSTANTS } from './DashboardReduxConstants'; 2 | 3 | const initialDashboardData = { 4 | dashboardDetails: {}, 5 | dashboardUserList: [], 6 | }; 7 | 8 | export const dashboard = (state = initialDashboardData, action) => { 9 | switch (action.type) { 10 | case DASHBOARD_REDUX_CONSTANTS.DASHBOARD_USER_LIST_DETAILS: 11 | return { 12 | ...state, 13 | dashboardUserList: action.data, 14 | }; 15 | 16 | case DASHBOARD_REDUX_CONSTANTS.DASHBOARD_DETAILS: 17 | return { 18 | ...state, 19 | dashboardDetails: action.data, 20 | }; 21 | 22 | case DASHBOARD_REDUX_CONSTANTS.RESET_DASHBOARD_DETAILS: 23 | return { 24 | ...initialDashboardData, 25 | }; 26 | 27 | default: 28 | return state; 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /src/screens/Application/GenerateApplication/component/ApplicationDocumentsStep/validations/ApplicationDocumentStepValidations.js: -------------------------------------------------------------------------------- 1 | import { saveApplicationStepDataToBackend } from '../../../../redux/ApplicationAction'; 2 | 3 | export const applicationDocumentsStepValidations = async (dispatch, data, editApplicationData) => { 4 | let validated = true; 5 | if (validated) { 6 | const finalData = { 7 | stepper: 'documents', 8 | applicationId: editApplicationData?._id, 9 | /* entityType: editApplicationData.companyStep.entityType[0].value, 10 | ...data, */ 11 | }; 12 | try { 13 | await dispatch(saveApplicationStepDataToBackend(finalData)); 14 | } catch (e) { 15 | throw Error(); 16 | } 17 | validated = true; 18 | } 19 | /* dispatch(updateEditApplicationData('documents', { })); */ 20 | return validated; 21 | }; 22 | -------------------------------------------------------------------------------- /src/common/ListFilters/redux/ListFiltersReducer.js: -------------------------------------------------------------------------------- 1 | import { LOGIN_REDUX_CONSTANTS } from '../../../screens/auth/login/redux/LoginReduxConstants'; 2 | import { LIST_FILTERS_REDUX_CONSTANTS } from './ListFiltersReduxConstants'; 3 | 4 | export const listFilterReducer = ( 5 | state = { 6 | applicationListFilters: { 7 | status: 8 | 'PENDING_WITH_INSURER,REVIEW_APPLICATION,PENDING_DIRECT_APPROACH,AWAITING_INFORMATION,DRAFT,REVIEW_SURRENDERED', 9 | }, 10 | }, 11 | action 12 | ) => { 13 | switch (action.type) { 14 | case LIST_FILTERS_REDUX_CONSTANTS.SAVE_APPLIED_FILTERS: 15 | return { 16 | ...state, 17 | [action?.filterFor]: action?.filters, 18 | }; 19 | 20 | case LOGIN_REDUX_CONSTANTS.LOGOUT_USER_ACTION: 21 | return {}; 22 | 23 | default: 24 | return { 25 | ...state, 26 | }; 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /src/constants/RegexConstants.js: -------------------------------------------------------------------------------- 1 | export const EMAIL_ADDRESS_REGEX = 2 | /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; 3 | export const MOBILE_NUMBER_REGEX = /^([+0]?)(?:\d\s?){8,15}$/; 4 | export const NUMBER_REGEX = /^\d+$/; 5 | export const SPECIAL_CHARACTER_REGEX = /[^A-Za-z 0-9]/; 6 | export const PASSWORD_REGEX = /^(?=.*\d)(?=.*[!@#$%^&*])(?=.*[a-z])(?=.*[A-Z]).{8,}$/; 7 | export const DECIMAL_REGEX = /^[0-9]*(\.\d{0,2})?$/; 8 | export const ALPHA_NEUMERIC_REGEX = /^[A-Za-z0-9]+$/; 9 | 10 | export const usdConverter = number => { 11 | const numberToUSD = new Intl.NumberFormat('en-US', { 12 | style: 'currency', 13 | currency: 'USD', 14 | minimumFractionDigits: 0, 15 | maximumFractionDigits: 2, 16 | }); 17 | return numberToUSD.format(number); 18 | }; 19 | -------------------------------------------------------------------------------- /src/common/Accordion/Accordion.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | 4 | export const AccordionContext = React.createContext(); 5 | 6 | const Accordion = props => { 7 | const { children, className } = props; 8 | const [openIndex, setIndex] = React.useState(-1); 9 | const accordion = `accordion-container ${className}`; 10 | 11 | return ( 12 |
13 | 19 | {children} 20 | 21 |
22 | ); 23 | }; 24 | 25 | Accordion.propTypes = { 26 | className: PropTypes.string, 27 | children: PropTypes.element, 28 | }; 29 | 30 | Accordion.defaultProps = { 31 | className: '', 32 | children: null, 33 | }; 34 | 35 | export default Accordion; 36 | -------------------------------------------------------------------------------- /src/screens/Debtors/components/DebtorsClaimsTab.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import BigInput from '../../../common/BigInput/BigInput'; 4 | import IconButton from '../../../common/IconButton/IconButton'; 5 | 6 | const DebtorsClaimsTab = () => { 7 | return ( 8 | <> 9 |
10 |
Claims
11 |
12 | 20 | 21 |
22 |
23 | 24 | ); 25 | }; 26 | 27 | export default DebtorsClaimsTab; 28 | -------------------------------------------------------------------------------- /src/screens/Application/GenerateApplication/component/ApplicationConfirmationStep/validations/ApplicationConfirmationStepValidation.js: -------------------------------------------------------------------------------- 1 | import { 2 | getApplicationFilter, 3 | saveApplicationStepDataToBackend, 4 | } from '../../../../redux/ApplicationAction'; 5 | 6 | export const applicationConfirmationStepValidations = async ( 7 | dispatch, 8 | data, 9 | editApplicationData, 10 | history 11 | ) => { 12 | let validated = true; 13 | if (validated) { 14 | const finalData = { 15 | stepper: 'confirmation', 16 | applicationId: editApplicationData?._id, 17 | }; 18 | try { 19 | await dispatch(saveApplicationStepDataToBackend(finalData)); 20 | history.replace('/applications'); 21 | await dispatch(getApplicationFilter()); 22 | } catch (e) { 23 | throw Error(); 24 | } 25 | validated = true; 26 | } 27 | return validated; 28 | }; 29 | -------------------------------------------------------------------------------- /src/screens/Debtors/components/DebtorsOverduesTab.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import BigInput from '../../../common/BigInput/BigInput'; 4 | import IconButton from '../../../common/IconButton/IconButton'; 5 | 6 | const DebtorsOverduesTab = () => { 7 | return ( 8 | <> 9 |
10 |
Overdues
11 |
12 | 20 | 21 |
22 |
23 | 24 | ); 25 | }; 26 | 27 | export default DebtorsOverduesTab; 28 | -------------------------------------------------------------------------------- /src/routes/NonAuthenticatedRoutes.js: -------------------------------------------------------------------------------- 1 | import { Redirect, Route } from 'react-router-dom'; 2 | import PropTypes from 'prop-types'; 3 | import { useSelector } from 'react-redux'; 4 | 5 | export const NonAuthenticatedRoute = ({ escapeRedirect, component: Component, ...options }) => { 6 | const loggedUserDetails = useSelector(({ loggedUserProfile }) => loggedUserProfile); 7 | 8 | if (loggedUserDetails?.email && !escapeRedirect) { 9 | return ( 10 | 11 | 12 | 13 | ); 14 | } 15 | 16 | return ; 17 | }; 18 | 19 | NonAuthenticatedRoute.propTypes = { 20 | component: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), 21 | escapeRedirect: PropTypes.bool, 22 | }; 23 | NonAuthenticatedRoute.defaultProps = { 24 | component: null, 25 | escapeRedirect: false, 26 | }; 27 | -------------------------------------------------------------------------------- /src/common/Switch/Switch.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | 4 | const Switch = props => { 5 | const { id, className, labelClass, ...restProps } = props; 6 | const switchClass = `common-switch ${className}`; 7 | return ( 8 | 9 | 16 |