├── 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 |
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 |
16 |
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 |
19 |
20 | );
21 | };
22 |
23 | Switch.propTypes = {
24 | id: PropTypes.string.isRequired,
25 | className: PropTypes.string,
26 | labelClass: PropTypes.string,
27 | };
28 |
29 | Switch.defaultProps = {
30 | className: 'common-switch ',
31 | labelClass: '',
32 | };
33 |
34 | export default Switch;
35 |
--------------------------------------------------------------------------------
/src/screens/Reports/redux/ReportsReduxConstants.js:
--------------------------------------------------------------------------------
1 | export const REPORTS_REDUX_CONSTANTS = {
2 | GET_REPORT_LIST_SUCCESS: 'GET_REPORT_LIST_SUCCESS',
3 | RESET_REPORT_LIST_DATA: 'RESET_REPORT_LIST_DATA',
4 | INITIALIZE_FILTERS: 'INITIALIZE_FILTERS',
5 |
6 | GET_REPORT_COLUMN_LIST: 'GET_REPORT_COLUMN_LIST',
7 | GET_REPORT_DEFAULT_COLUMN_LIST: 'GET_REPORT_DEFAULT_COLUMN_LIST',
8 | UPDATE_REPORT_COLUMN_LIST: 'UPDATE_REPORT_COLUMN_LIST',
9 |
10 | GET_DROPDOWN_CLIENT_LIST: 'GET_DROPDOWN_CLIENT_LIST',
11 | GET_DROPDOWN_LIST_BY_SEARCH: 'GET_DROPDOWN_LIST_BY_SEARCH',
12 | GET_ALERT_FILTER_DROPDOWN_DATA: 'GET_ALERT_FILTER_DROPDOWN_DATA',
13 |
14 | UPDATE_REPORT_FILTER_FIELDS: 'UPDATE_REPORT_FILTER_FIELDS',
15 | APPLY_REPORT_FILTER_ACTION: 'APPLY_REPORT_FILTER_ACTION',
16 | CLOSE_REPORT_FILTER_ACTION: 'CLOSE_REPORT_FILTER_ACTION',
17 |
18 | RESET_REPORT_FILTER: 'RESET_REPORT_FILTER',
19 | };
20 |
--------------------------------------------------------------------------------
/src/common/Layout/Layout.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import PropTypes from 'prop-types';
3 | import { useSelector } from 'react-redux';
4 | import SideMenu from '../SideMenu/SideMenu';
5 | import Header from '../Header/Header';
6 |
7 | const Layout = props => {
8 | const { children } = props;
9 | const loggedUserDetails = useSelector(({ loggedUserProfile }) => loggedUserProfile);
10 |
11 | if (!loggedUserDetails?.email) {
12 | return children;
13 | }
14 |
15 | return (
16 |
17 |
18 |
19 |
20 |
{children}
21 |
22 |
23 | );
24 | };
25 |
26 | Layout.propTypes = {
27 | children: PropTypes.node,
28 | };
29 |
30 | Layout.defaultProps = {
31 | children: null,
32 | };
33 |
34 | export default Layout;
35 |
--------------------------------------------------------------------------------
/src/screens/Settings/services/SettingDocumentTypeApiServices.js:
--------------------------------------------------------------------------------
1 | import ApiService from '../../../services/api-service/ApiService';
2 | import { SETTING_URL } from '../../../constants/UrlConstants';
3 |
4 | const SettingDocumentTypeApiServices = {
5 | getDocumentListData: params =>
6 | ApiService.getData(SETTING_URL.DOCUMENT_TYPE.DOCUMENT_TYPE_LIST, { params }),
7 | addNewDocumentType: data =>
8 | ApiService.postData(SETTING_URL.DOCUMENT_TYPE.ADD_NEW_DOCUMENT_TYPE_LIST, data),
9 | getDocumentTypeDetailsById: id =>
10 | ApiService.getData(`${SETTING_URL.DOCUMENT_TYPE.GET_DOCTYPE_DETAIL}${id}`),
11 | editDocumentTypeById: (id, data) =>
12 | ApiService.putData(`${SETTING_URL.DOCUMENT_TYPE.UPDATE_DOCUMENT_BY_ID}${id}`, data),
13 | deleteDocumentType: id =>
14 | ApiService.deleteData(`${SETTING_URL.DOCUMENT_TYPE.DELETE_DOCUMENT_BY_ID}${id}`),
15 | };
16 | export default SettingDocumentTypeApiServices;
17 |
--------------------------------------------------------------------------------
/src/screens/Clients/ViewClient/_ViewClient.scss:
--------------------------------------------------------------------------------
1 | .client-details-container {
2 | display: grid !important;
3 | grid-template-columns: 15% calc(35% - 22px) 15% calc(35% - 22px);
4 | padding: 25px 30px;
5 | gap: 15px;
6 |
7 | > span {
8 | margin-top: 7px;
9 | color: $primary-color;
10 | }
11 |
12 | .client-detail {
13 | padding: 0.344rem;
14 | min-width: 170px;
15 | color: $field-color;
16 | }
17 |
18 | input {
19 | cursor: default !important;
20 | }
21 | }
22 |
23 | .react-select--is-disabled.view-client-select.react-select-container .react-select__control{
24 | padding: 2px 5px;
25 | }
26 |
27 | .view-client-select .react-select__control--is-disabled {
28 | .react-select__single-value {
29 | font: $subtitle $font-regular;
30 | }
31 | }
32 |
33 | view-client-automate-application-switch:disabled ~ .view-client-automate-application-switch-label {
34 | cursor: not-allowed;
35 | }
36 |
--------------------------------------------------------------------------------
/src/common/BigInput/_BigInput.scss:
--------------------------------------------------------------------------------
1 | .big-input-container {
2 | display: flex;
3 | justify-content: space-between;
4 | align-items: center;
5 | height: 3.5rem;
6 | padding: 1.125rem;
7 | background-color: #ffffff;
8 | border: 0.063rem solid $border-color;
9 | border-radius: 0.625rem;
10 |
11 | span {
12 | width: 2.5rem;
13 | }
14 |
15 | input {
16 | flex: 1;
17 | border: none;
18 | outline: none;
19 | }
20 | }
21 |
22 | .big-input {
23 | font: $title $font-regular;
24 | color: $field-color !important;
25 | }
26 |
27 | .big-input:-webkit-autofill,
28 | .big-input:-webkit-autofill:hover,
29 | .big-input:-webkit-autofill:focus,
30 | .big-input:-webkit-autofill:active {
31 | font: $title $font-regular !important;
32 | transition: background-color 5000s;
33 | -webkit-text-fill-color: $field-color !important;
34 | }
35 |
36 | .suffix {
37 | text-align: right;
38 | cursor: pointer;
39 | }
40 |
--------------------------------------------------------------------------------
/src/screens/Clients/ClientList/_ClientList.scss:
--------------------------------------------------------------------------------
1 | .client-list-row {
2 | cursor: pointer;
3 | }
4 |
5 | .add-to-crm-modal {
6 | width: 60vw;
7 | }
8 |
9 | .crm-checkbox-list-container {
10 | max-height: 250px;
11 | margin-top: 10px;
12 | overflow-y: auto;
13 | }
14 |
15 | .check-all-crmList {
16 | label {
17 | font: $subtitle $font-bold;
18 | }
19 | margin-top: 10px;
20 | padding-left: 8px;
21 | }
22 |
23 | .crm-checkbox-list {
24 | padding: 8px;
25 |
26 | &:nth-child(even) {
27 | background-color: $background-color;
28 | }
29 | }
30 |
31 | .contacts-grid {
32 | display: grid;
33 | grid-template-columns: 200px 1fr;
34 | gap: 20px 10px;
35 | font: $subtitle $font-medium;
36 | color: $primary-color;
37 | padding: 20px;
38 | overflow: hidden;
39 |
40 | .title {
41 | font-family: $font-regular;
42 | color: $field-color;
43 | }
44 | }
45 |
46 | .client-filter-title {
47 | width: 180px !important;
48 | }
49 |
--------------------------------------------------------------------------------
/src/screens/Debtors/services/DebtorsReportsApiServices.js:
--------------------------------------------------------------------------------
1 | import ApiService from '../../../services/api-service/ApiService';
2 | import { DEBTORS_URLS } from '../../../constants/UrlConstants';
3 |
4 | const DebtorApplicationApiServices = {
5 | getDebtorsReportListData: (id, params) =>
6 | ApiService.getData(`${DEBTORS_URLS.REPORTS.DEBTOR_REPORTS_LIST}${id}`, { params }),
7 | getDebtorsReportListDataForFetch: debtorId =>
8 | ApiService.getData(`${DEBTORS_URLS.REPORTS.DEBTOR_REPORTS_LIST_FOR_FETCH}${debtorId}`),
9 | fetchSelectedReportsForDebtor: data =>
10 | ApiService.putData(`${DEBTORS_URLS.REPORTS.FETCH_SELECTED_REPORTS_FOR_DEBTOR}`, data),
11 | getDebtorReportColumnNameList: () =>
12 | ApiService.getData(DEBTORS_URLS.REPORTS.COLUMN_NAME_LIST_URL),
13 | updateDebtorReportColumnNameList: data =>
14 | ApiService.putData(`${DEBTORS_URLS.REPORTS.UPDATE_COLUMN_NAME_LIST_URL}`, data),
15 | };
16 | export default DebtorApplicationApiServices;
17 |
--------------------------------------------------------------------------------
/src/screens/Overdues/services/OverdueApiServices.js:
--------------------------------------------------------------------------------
1 | import ApiService from '../../../services/api-service/ApiService';
2 | import { OVERDUE_URLS } from '../../../constants/UrlConstants';
3 |
4 | export const OverdueApiServices = {
5 | getOverdueList: params => ApiService.getData(OVERDUE_URLS.GET_OVERDUE_LIST, { params }),
6 | getOverdueListByDate: params =>
7 | ApiService.getData(OVERDUE_URLS.GET_OVERDUE_LIST_BY_DATE, { params }),
8 | getEntityListData: () => ApiService.getData(OVERDUE_URLS.GET_ENTITY_LIST),
9 | changeOverdueStatus: (id, data) =>
10 | ApiService.putData(`${OVERDUE_URLS.CHANGE_OVERDUE_STATUS}${id}`, data),
11 | saveOverdueList: data => ApiService.putData(OVERDUE_URLS.SAVE_OVERDUE_LIST, data),
12 | downloadOverdues: params =>
13 | ApiService.request({
14 | url: `${OVERDUE_URLS.DOWNLOAD_OVERDUES}`,
15 | params,
16 | method: 'GET',
17 | responseType: 'blob',
18 | timeout: 60000,
19 | }),
20 | };
21 |
--------------------------------------------------------------------------------
/src/screens/Reports/_Reports.scss:
--------------------------------------------------------------------------------
1 | .report-container {
2 | display: grid;
3 | grid-template-columns: repeat(4, minmax(100px, 1fr));
4 | gap: 20px;
5 | margin-top: 20px;
6 | }
7 |
8 | .report {
9 | min-height: 180px;
10 | padding: 25px;
11 | background-color: #ffffff;
12 | border-radius: 10px;
13 | cursor: pointer;
14 | text-decoration: none;
15 |
16 | .icon {
17 | margin-bottom: 20px;
18 | padding: 10px;
19 | color: #ffffff;
20 | background-color: $primary-color;
21 | border-radius: 10px;
22 | }
23 |
24 | .report-title {
25 | font: $h4 $font-medium;
26 | color: $primary-color;
27 | }
28 | }
29 |
30 | .report:hover {
31 | background-color: $primary-color;
32 | color: #ffffff;
33 |
34 | .icon {
35 | color: $primary-color;
36 | background-color: #ffffff;
37 | }
38 |
39 | .report-title {
40 | color: #ffffff;
41 | }
42 | }
43 |
44 | .report-tooltip {
45 | text-transform: lowercase;
46 | }
47 |
--------------------------------------------------------------------------------
/src/common/DropdownMenu/_DropdownMenu.scss:
--------------------------------------------------------------------------------
1 | .dropdown-menu-overlay {
2 | position: fixed;
3 | top: 0;
4 | right: 0;
5 | bottom: 0;
6 | left: 0;
7 | z-index: 9999;
8 | }
9 |
10 | .dropdown-menu {
11 | position: absolute;
12 | top: 30px;
13 | min-width: 100px;
14 | line-height: 1;
15 | background-color: $background-color;
16 | border: 1px solid white;
17 | border-radius: 10px;
18 | box-shadow: 0px 0px 1.875rem #82828229;
19 | overflow: hidden;
20 | color: $field-color;
21 |
22 | .menu-name {
23 | display: flex;
24 | align-items: center;
25 | height: 32px;
26 | width: 100%;
27 | padding: 5px 10px;
28 | border-bottom: 1px solid white;
29 | cursor: pointer;
30 |
31 | span {
32 | font-size: 18px;
33 | margin-right: 5px;
34 | }
35 | }
36 |
37 | .menu-name:last-child {
38 | border-bottom: 0;
39 | }
40 |
41 | .menu-name:hover {
42 | background-color: $primary-color-1;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/routes/AuthenticatedRoutes.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 AuthenticatedRoute = ({ component, ...options }) => {
6 | const loggedUserDetails = useSelector(({ loggedUserProfile }) => loggedUserProfile);
7 |
8 | if (!loggedUserDetails?.email) {
9 | return (
10 |
11 |
12 |
13 | );
14 | }
15 |
16 | if (options.path !== '/dashboard' && !component) {
17 | return (
18 |
19 |
20 |
21 | );
22 | }
23 |
24 | return ;
25 | };
26 |
27 | AuthenticatedRoute.propTypes = {
28 | component: PropTypes.oneOfType([PropTypes.object, PropTypes.func]),
29 | };
30 |
31 | AuthenticatedRoute.defaultProps = {
32 | component: null,
33 | };
34 |
--------------------------------------------------------------------------------
/src/screens/Clients/services/ClientApplicationApiService.js:
--------------------------------------------------------------------------------
1 | import ApiService from '../../../services/api-service/ApiService';
2 | import { CLIENT_URLS } from '../../../constants/UrlConstants';
3 |
4 | const ClientApplicationApiService = {
5 | downloadApplicationCSVFile: id =>
6 | ApiService.request({
7 | url: `${CLIENT_URLS.APPLICATION.DOWNLOAD_APPLICATION_CSV}${id}?listFor=client-application`,
8 | method: 'GET',
9 | responseType: 'blob',
10 | timeout: 60000,
11 | }),
12 | getApplicationListData: (id, params) =>
13 | ApiService.getData(`${CLIENT_URLS.APPLICATION.APPLICATION_LIST}${id}`, { params }),
14 | getClientApplicationColumnNameList: params =>
15 | ApiService.getData(CLIENT_URLS.APPLICATION.COLUMN_NAME_LIST_URL, { params }),
16 | updateClientApplicationColumnNameList: data =>
17 | ApiService.putData(`${CLIENT_URLS.APPLICATION.UPDATE_COLUMN_NAME_LIST_URL}`, data),
18 | };
19 | export default ClientApplicationApiService;
20 |
--------------------------------------------------------------------------------
/src/screens/Reports/services/ReportsApiService.js:
--------------------------------------------------------------------------------
1 | import ApiService from '../../../services/api-service/ApiService';
2 | import { REPORTS_URLS } from '../../../constants/UrlConstants';
3 |
4 | export const ReportsApiService = {
5 | getReportsList: params => ApiService.getData(REPORTS_URLS.GET_REPORTS_LIST, { params }),
6 | getReportsColumnList: params =>
7 | ApiService.getData(REPORTS_URLS.GET_REPORTS_COLUMN_LIST, { params }),
8 | updateReportsColumnList: data =>
9 | ApiService.putData(REPORTS_URLS.UPDATE_REPORTS_COLUMN_LIST, data),
10 |
11 | getReportClientList: () => ApiService.getData(REPORTS_URLS.GET_REPORT_CLIENT_LIST),
12 | getAlertFilterDropdownData: () => ApiService.getData(REPORTS_URLS.GET_ALERT_FILTER_DATA),
13 | downloadReportList: params =>
14 | ApiService.request({
15 | url: `${REPORTS_URLS.DOWNLOAD_REPORT}`,
16 | params,
17 | method: 'GET',
18 | responseType: 'blob',
19 | timeout: 60000,
20 | }),
21 | };
22 |
--------------------------------------------------------------------------------
/src/helpers/debtorErrorHelper.js:
--------------------------------------------------------------------------------
1 | import { errorNotification } from '../common/Toast';
2 |
3 | export const debtorErrorHelper = response => {
4 | const data = {
5 | isModal: false,
6 | modalType: '',
7 | message: '',
8 | resData: {},
9 | };
10 | if (response?.messageCode === 'APPROVED_DEBTOR_ALREADY_EXISTS') {
11 | return {
12 | ...data,
13 | isModal: true,
14 | modalType: 'WARNING',
15 | message: response?.message,
16 | resData: response?.data,
17 | };
18 | }
19 | if (response?.data?.messageCode === 'DEBTOR_ALREADY_EXISTS') {
20 | return {
21 | ...data,
22 | isModal: true,
23 | message: response?.data?.message,
24 | modalType: 'ERROR',
25 | };
26 | }
27 | if (response?.data?.messageCode === 'NO_DATA_FOUND') {
28 | errorNotification(response?.data?.message || 'Error');
29 | return false;
30 | }
31 | return {
32 | ...data,
33 | resData: response?.data,
34 | };
35 | };
36 |
--------------------------------------------------------------------------------
/src/screens/Debtors/services/DebtorApplicationApiServices.js:
--------------------------------------------------------------------------------
1 | import ApiService from '../../../services/api-service/ApiService';
2 | import { DEBTORS_URLS } from '../../../constants/UrlConstants';
3 |
4 | const DebtorApplicationApiServices = {
5 | downloadApplicationCSVFile: id =>
6 | ApiService.request({
7 | url: `${DEBTORS_URLS.APPLICATION.DOWNLOAD_APPLICATION_CSV}${id}?listFor=debtor-application`,
8 | method: 'GET',
9 | responseType: 'blob',
10 | timeout: 60000,
11 | }),
12 | getApplicationListData: (id, params) =>
13 | ApiService.getData(`${DEBTORS_URLS.APPLICATION.APPLICATION_LIST}${id}`, { params }),
14 | getDebtorApplicationColumnNameList: params =>
15 | ApiService.getData(DEBTORS_URLS.APPLICATION.COLUMN_NAME_LIST_URL, { params }),
16 | updateDebtorApplicationColumnNameList: data =>
17 | ApiService.putData(`${DEBTORS_URLS.APPLICATION.UPDATE_COLUMN_NAME_LIST_URL}`, data),
18 | };
19 | export default DebtorApplicationApiServices;
20 |
--------------------------------------------------------------------------------
/src/screens/Insurer/services/InsurerPoliciesApiServices.js:
--------------------------------------------------------------------------------
1 | import ApiService from '../../../services/api-service/ApiService';
2 | import { INSURER_URLS } from '../../../constants/UrlConstants';
3 |
4 | const InsurerPoliciesApiServices = {
5 | getInsurerPoliciesList: (id, params) =>
6 | ApiService.getData(`${INSURER_URLS.POLICIES.POLICIES_LIST}${id}`, { params }),
7 | getInsurerPoliciesColumnListName: () =>
8 | ApiService.getData(`${INSURER_URLS.POLICIES.COLUMN_NAME_LIST_URL}?columnFor=insurer-policy`),
9 | updateInsurerPoliciesColumnListName: data =>
10 | ApiService.putData(INSURER_URLS.POLICIES.COLUMN_NAME_LIST_URL, data),
11 | syncInsurerPolicyList: (id, data) =>
12 | ApiService.putData(`${INSURER_URLS.POLICIES.SYNC_CLIENT_POLICIES_DATA_URL}${id}`, data),
13 | getPolicySyncListBySearch: (id, data) =>
14 | ApiService.getData(`${INSURER_URLS.POLICIES.SYNC_LIST_BY_SEARCH}${id}?searchKeyword=${data}`),
15 | };
16 | export default InsurerPoliciesApiServices;
17 |
--------------------------------------------------------------------------------
/src/helpers/applicationErrorHelper.js:
--------------------------------------------------------------------------------
1 | import { errorNotification } from '../common/Toast';
2 |
3 | export const applicationErrorHelper = response => {
4 | const data = {
5 | isModal: false,
6 | modalType: '',
7 | message: '',
8 | resData: {},
9 | };
10 | if (response?.messageCode === 'APPROVED_APPLICATION_ALREADY_EXISTS') {
11 | return {
12 | ...data,
13 | isModal: true,
14 | modalType: 'WARNING',
15 | message: response?.message,
16 | resData: response?.data,
17 | };
18 | }
19 | if (response?.data?.messageCode === 'APPLICATION_ALREADY_EXISTS') {
20 | return {
21 | ...data,
22 | isModal: true,
23 | message: response?.data?.message,
24 | modalType: 'ERROR',
25 | };
26 | }
27 | if (response?.data?.messageCode === 'NO_DATA_FOUND') {
28 | errorNotification(response?.data?.message || 'Error');
29 | return false;
30 | }
31 | return {
32 | ...data,
33 | resData: response?.data,
34 | };
35 | };
36 |
--------------------------------------------------------------------------------
/src/common/Header/component/_FileUpload.scss:
--------------------------------------------------------------------------------
1 | .user-dp-upload {
2 | display: flex;
3 | flex-direction: row;
4 | align-items: center;
5 | justify-content: flex-start;
6 |
7 | .profile-dp-upload{
8 | position: relative;
9 | .user-dp {
10 | margin-left: 0;
11 | cursor: default;
12 | }
13 | .profile-close-btn {
14 | position: absolute;
15 | top: -7px;
16 | right: -7px;
17 | display: flex;
18 | justify-content: center;
19 | align-items: center;
20 | width: 16px;
21 | height: 16px;
22 | font-size: $title;
23 | color: $primary-color;
24 | border-radius: 50%;
25 | cursor: pointer;
26 | background: #fff;
27 | }
28 | }
29 |
30 | .user-dp-upload {
31 | background: none;
32 | border: none;
33 | color: $field-color;
34 | }
35 | p {
36 | font-size: 12px;
37 | color: $field-color;
38 | word-break: break-all;
39 | overflow: hidden;
40 | cursor: pointer;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/common/Switch/_Switch.scss:
--------------------------------------------------------------------------------
1 | .common-switch {
2 | display: none;
3 | }
4 |
5 | .common-switch + label {
6 | position: relative;
7 | display: block;
8 | width: 48px;
9 | height: 24px;
10 | background: $border-color;
11 | border-radius: 40px;
12 | cursor: pointer;
13 | }
14 |
15 | .common-switch + label div {
16 | content: '';
17 | position: absolute;
18 | top: 0px;
19 | left: 0px;
20 | width: 24px;
21 | height: 24px;
22 | background: #fff;
23 | border: 1px solid $border-color;
24 | border-radius: 50%;
25 | -webkit-transition: all 300ms ease-in-out;
26 | -moz-transition: all 300ms ease-in-out;
27 | transition: all 300ms ease-in-out;
28 | }
29 |
30 | .common-switch:checked + label {
31 | background: $primary-color;
32 | }
33 |
34 | .common-switch:checked + label div {
35 | left: 100%;
36 | border: 1px solid $primary-color;
37 | -webkit-transform: translate3d(-100%, 0, 0);
38 | -moz-transform: translate3d(-100%, 0, 0);
39 | transform: translate3d(-100%, 0, 0);
40 | }
41 |
--------------------------------------------------------------------------------
/src/common/PageNotFound/PageNotFound.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Link } from 'react-router-dom';
3 | import errorImage from '../../assets/images/page-not-found.svg';
4 | import { getAuthTokenLocalStorage } from '../../helpers/LocalStorageHelper';
5 | import Button from '../Button/Button';
6 |
7 | const PageNotFound = () => {
8 | const token = getAuthTokenLocalStorage();
9 | return (
10 |
11 |

12 |
The page you are looking for was not found.
13 |
14 | Please check your URL or return to {token ? 'dashboard' : 'login'}.
15 |
16 |
17 |
21 |
22 |
23 | );
24 | };
25 |
26 | export default PageNotFound;
27 |
--------------------------------------------------------------------------------
/src/utilities/_typography.scss:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'GoogleSans-Medium';
3 | src: local('GoogleSans-Medium'), url(../assets/fonts/GoogleSans-Medium.ttf) format('truetype');
4 | font-weight: normal;
5 | }
6 | @font-face {
7 | font-family: 'GoogleSans-Regular';
8 | src: local('GoogleSans-Regular'), url(../assets/fonts/GoogleSans-Regular.ttf) format('truetype');
9 | font-weight: normal;
10 | }
11 | @font-face {
12 | font-family: 'GoogleSans-Bold';
13 | src: local('GoogleSans-Bold'), url(../assets/fonts/GoogleSans-Bold.ttf) format('truetype');
14 | font-weight: normal;
15 | }
16 | $h1: 3.75rem;
17 | $h2: 3rem;
18 | $h3: 2.125rem;
19 | $h4: 1.5rem;
20 | $h5: 1.25rem;
21 | $h6: 1.125rem;
22 | $title: 1rem;
23 | $subtitle: 0.875rem;
24 | $text: 0.75rem;
25 | $font-regular: 'GoogleSans-Regular', sans-serif;
26 | $font-medium: 'GoogleSans-Medium', sans-serif;
27 | $font-bold: 'GoogleSans-Bold', sans-serif;
28 | $header: $h3 $font-medium;
29 | $field-name: $title $font-medium;
30 | $sub-text: $subtitle $font-regular;
31 |
--------------------------------------------------------------------------------
/src/screens/Insurer/services/InsurerApiService.js:
--------------------------------------------------------------------------------
1 | import ApiService from '../../../services/api-service/ApiService';
2 | import { INSURER_URLS } from '../../../constants/UrlConstants';
3 |
4 | const InsurerApiService = {
5 | getInsurerColumnListName: () => ApiService.getData(INSURER_URLS.INSURER_COLUMN_NAME_LIST_URL),
6 | getSelectedInsurerData: id =>
7 | ApiService.getData(`${INSURER_URLS.SELECTED_INSURER_DETAILS_URL}${id}`),
8 | updateInsurerColumnListName: data =>
9 | ApiService.putData(INSURER_URLS.UPDATE_INSURER_COLUMN_NAME_LIST_URL, data),
10 | getAllInsurerListData: params => ApiService.getData(INSURER_URLS.INSURER_LIST_URL, { params }),
11 | getListFromCRM: data =>
12 | ApiService.getData(`${INSURER_URLS.GET_DATA_FROM_CRM_URL}?searchKeyword=${data}`),
13 | addInsurerListFromCrm: data => ApiService.postData(INSURER_URLS.ADD_DATA_FROM_CRM_URL, data),
14 | syncInsurerDataWithCrm: id => ApiService.putData(`${INSURER_URLS.SYNC_DATA_WITH_CRM_URL}${id}`),
15 | };
16 |
17 | export default InsurerApiService;
18 |
--------------------------------------------------------------------------------
/src/screens/Application/services/ApplicationDocumentStepApiServices.js:
--------------------------------------------------------------------------------
1 | import ApiService from '../../../services/api-service/ApiService';
2 | import { APPLICATION_URLS, CLIENT_URLS } from '../../../constants/UrlConstants';
3 |
4 | const ApplicationDocumentStepApiServices = {
5 | getApplicationDocumentDataList: (id, params) =>
6 | ApiService.getData(`${CLIENT_URLS.DOCUMENTS.DOCUMENTS_LIST}${id}`, { params }),
7 | getDocumentTypeListData: params =>
8 | ApiService.getData(APPLICATION_URLS.DOCUMENTS.GET_DOCUMENT_TYPE_LIST_URL, { params }),
9 | uploadDocument: (data, config, params) =>
10 | ApiService.request({
11 | url: `${APPLICATION_URLS.DOCUMENTS.UPLOAD_DOCUMENT_URL}`,
12 | data,
13 | params,
14 | config,
15 | method: 'POST',
16 | timeout: 60000,
17 | }),
18 | deleteApplicationDocument: (id, params) =>
19 | ApiService.deleteData(`${APPLICATION_URLS.DOCUMENTS.APPLICATION_DELETE_DOCUMENT}${id}`, {
20 | params,
21 | }),
22 | };
23 | export default ApplicationDocumentStepApiServices;
24 |
--------------------------------------------------------------------------------
/src/screens/auth/resetPassword/redux/ResetPasswordAction.js:
--------------------------------------------------------------------------------
1 | import AuthApiService from '../../services/AuthApiService';
2 | import { successNotification } from '../../../../common/Toast';
3 | import {
4 | startGeneralLoaderOnRequest,
5 | stopGeneralLoaderOnSuccessOrFail,
6 | } from '../../../../common/GeneralLoader/redux/GeneralLoaderAction';
7 | import { displayErrors } from '../../../../helpers/ErrorNotifyHelper';
8 |
9 | export const resetPassword = async (token, password) => {
10 | try {
11 | startGeneralLoaderOnRequest('resetPasswordButtonLoaderAction');
12 | const data = { token, password };
13 | const response = await AuthApiService.resetPassword(data);
14 |
15 | if (response?.data?.status === 'SUCCESS') {
16 | successNotification('Password changed successfully.');
17 | stopGeneralLoaderOnSuccessOrFail('resetPasswordButtonLoaderAction');
18 | }
19 | } catch (e) {
20 | stopGeneralLoaderOnSuccessOrFail('resetPasswordButtonLoaderAction');
21 | displayErrors(e);
22 | throw Error();
23 | }
24 | };
25 |
--------------------------------------------------------------------------------
/src/helpers/ErrorNotifyHelper.js:
--------------------------------------------------------------------------------
1 | import { errorNotification } from '../common/Toast';
2 |
3 | export const displayErrors = e => {
4 | if (e?.code === 'ECONNABORTED') {
5 | errorNotification('Request Timeout, Make sure you are connected to network.');
6 | } else if (e?.status === 'ERROR') {
7 | errorNotification(e?.message);
8 | } else {
9 | switch (e?.response?.data?.status) {
10 | case 'INTERNAL_SERVER_ERROR':
11 | errorNotification('Internal server error');
12 | break;
13 | case 'ERROR':
14 | errorNotification(
15 | e?.response?.data?.message ?? 'It seems like server is down, Please try again later.'
16 | );
17 | break;
18 | case 'BAD_REQUEST':
19 | errorNotification(e?.response?.data?.message || 'Bad request');
20 | break;
21 | default:
22 | if (e?.message !== 'Previous same call cancellation') {
23 | errorNotification('Something went wrong, Please try again later.');
24 | throw e;
25 | }
26 | }
27 | }
28 | };
29 |
--------------------------------------------------------------------------------
/src/screens/Overdues/redux/OverduesReduxConstants.js:
--------------------------------------------------------------------------------
1 | export const OVERDUE_REDUX_CONSTANTS = {
2 | GET_OVERDUE_LIST: 'GET_OVERDUE_LIST',
3 | GET_ENTITY_LIST: 'GET_ENTITY_LIST',
4 | RESET_OVERDUE_LIST_PAGINATION_DATA: 'RESET_OVERDUE_LIST_PAGINATION_DATA',
5 |
6 | GET_OVERDUE_ENTITY_DATA_BY_SEARCH: 'GET_OVERDUE_ENTITY_DATA_BY_SEARCH',
7 |
8 | OVERDUE_CRUD_CONSTANTS: {
9 | UPDATE_OVERDUE_LIST_AFTER_AMEND: 'UPDATE_OVERDUE_LIST_AFTER_AMEND',
10 | UPDATE_OVERDUE_LIST_AFTER_ADD: 'UPDATE_OVERDUE_LIST_AFTER_ADD',
11 | CHANGE_OVERDUE_DETAILS_ACTION: 'CHANGE_OVERDUE_DETAILS_ACTION',
12 | GET_OVERDUE_DETAILS: 'GET_OVERDUE_DETAILS',
13 | GET_OVERDUE_LIST_BY_DATE: 'GET_OVERDUE_LIST_BY_DATE',
14 | COPY_OVERDUE_LIST_BY_DATE: 'COPY_OVERDUE_LIST_BY_DATE',
15 | UPDATE_OVERDUE_LIST_BY_DATE: 'UPDATE_OVERDUE_LIST_BY_DATE',
16 | UPDATE_COPY_OVERDUE_LIST_BY_DATE: 'UPDATE_COPY_OVERDUE_LIST_BY_DATE',
17 | CHANGE_OVERDUE_FIELD_VALUE: 'CHANGE_OVERDUE_FIELD_VALUE',
18 | RESET_OVERDUE_FORM_DATA: 'RESET_OVERDUE_FORM_DATA',
19 | },
20 | };
21 |
--------------------------------------------------------------------------------
/src/helpers/reportTypeHelper.js:
--------------------------------------------------------------------------------
1 | export const reportType = [
2 | {
3 | url: 'client-list',
4 | name: 'Client List',
5 | filter: 'clientList',
6 | },
7 | {
8 | url: 'limit-list',
9 | name: 'Limit List',
10 | filter: 'limitList',
11 | },
12 | {
13 | url: 'pending-application',
14 | name: 'Pending Applications',
15 | filter: 'pendingApplications',
16 | },
17 | {
18 | url: 'review',
19 | name: 'Review Report',
20 | filter: 'reviewReport',
21 | },
22 | {
23 | url: 'usage',
24 | name: 'Usage Report',
25 | filter: 'usageReport',
26 | },
27 | {
28 | url: 'usage-per-client',
29 | name: 'Usage per Client Report',
30 | filter: 'usagePerClient',
31 | },
32 | {
33 | url: 'limit-history',
34 | name: 'Limit History Report',
35 | filter: 'limitHistory',
36 | },
37 | {
38 | url: 'claims',
39 | name: 'Claims Report',
40 | filter: 'claimsReport',
41 | },
42 | {
43 | url: 'alert',
44 | name: 'Alert Report',
45 | filter: 'alert',
46 | },
47 | ];
48 |
--------------------------------------------------------------------------------
/src/screens/auth/forgotPassword/redux/ForgotPasswordAction.js:
--------------------------------------------------------------------------------
1 | import AuthApiService from '../../services/AuthApiService';
2 | import { successNotification } from '../../../../common/Toast';
3 | import {
4 | startGeneralLoaderOnRequest,
5 | stopGeneralLoaderOnSuccessOrFail,
6 | } from '../../../../common/GeneralLoader/redux/GeneralLoaderAction';
7 | import { displayErrors } from '../../../../helpers/ErrorNotifyHelper';
8 |
9 | export const forgotPassword = async email => {
10 | try {
11 | startGeneralLoaderOnRequest('forgotPasswordButtonLoaderAction');
12 | const data = { email };
13 | const response = await AuthApiService.forgotPassword(data);
14 |
15 | if (response?.data?.status === 'SUCCESS') {
16 | successNotification('OTP has been sent successfully to your registered email address.');
17 | stopGeneralLoaderOnSuccessOrFail('forgotPasswordButtonLoaderAction');
18 | }
19 | } catch (e) {
20 | displayErrors(e);
21 | stopGeneralLoaderOnSuccessOrFail('forgotPasswordButtonLoaderAction');
22 | throw Error();
23 | }
24 | };
25 |
--------------------------------------------------------------------------------
/src/screens/Clients/component/_clientTabs.scss:
--------------------------------------------------------------------------------
1 | .upload-document-modal,
2 | .add-task-modal {
3 | width: 60vw;
4 | .document-upload-popup-container > span {
5 | font-size: $subtitle;
6 | }
7 | }
8 |
9 | .document-upload-popup-container,
10 | .add-notes-popup-container,
11 | .modify-credit-limit-container {
12 | display: grid;
13 | grid-template-columns: 180px 2fr;
14 | gap: 15px 5px;
15 |
16 | > span {
17 | color: $primary-color;
18 | }
19 |
20 | .upload-document-input {
21 | width: 180px;
22 | }
23 | .switch-container {
24 | width: 180px;
25 | }
26 | .document-upload-input {
27 | display: flex;
28 | flex-direction: row;
29 | align-items: center;
30 | justify-content: flex-start;
31 | border: 0.063rem solid #e7ecf2;
32 | height: 32px;
33 | width: 180px;
34 | button {
35 | border: none;
36 | color: #b2b9bf;
37 | background: none;
38 | }
39 | p {
40 | color: #b2b9bf;
41 | }
42 | }
43 | }
44 |
45 | .tab-table-container {
46 | width: 100%;
47 | overflow-x: auto;
48 | }
49 |
--------------------------------------------------------------------------------
/src/hooks/userPrivileges/useModulePrivilegesHook.js:
--------------------------------------------------------------------------------
1 | import { useSelector } from 'react-redux';
2 | import { useMemo } from 'react';
3 |
4 | export const useModulePrivileges = moduleName => {
5 | const userPrivilegesData = useSelector(({ userPrivileges }) => userPrivileges);
6 |
7 | const foundModule = useMemo(
8 | () => userPrivilegesData.find(module => module.name === moduleName),
9 | [userPrivilegesData, moduleName]
10 | );
11 |
12 | const access = {
13 | hasWriteAccess: false,
14 | hasReadAccess: false,
15 | hasFullAccess: false,
16 | };
17 |
18 | if (foundModule && foundModule.accessTypes) {
19 | foundModule.accessTypes.forEach(e => {
20 | switch (e) {
21 | case 'read':
22 | access.hasReadAccess = true;
23 | break;
24 | case 'write':
25 | access.hasWriteAccess = true;
26 | break;
27 | case 'full-access':
28 | access.hasFullAccess = true;
29 | break;
30 | default:
31 | break;
32 | }
33 | });
34 | }
35 |
36 | return access;
37 | };
38 |
--------------------------------------------------------------------------------
/src/screens/auth/setPassword/redux/SetPasswordAction.js:
--------------------------------------------------------------------------------
1 | import AuthApiService from '../../services/AuthApiService';
2 | import { successNotification } from '../../../../common/Toast';
3 | import {
4 | startGeneralLoaderOnRequest,
5 | stopGeneralLoaderOnSuccessOrFail,
6 | } from '../../../../common/GeneralLoader/redux/GeneralLoaderAction';
7 | import { displayErrors } from '../../../../helpers/ErrorNotifyHelper';
8 |
9 | export const setPassword = async (token, password, cb) => {
10 | try {
11 | startGeneralLoaderOnRequest('setPasswordButtonLoaderAction');
12 | const data = { token, password };
13 |
14 | const response = await AuthApiService.setPassword(data);
15 |
16 | if (response?.data?.status === 'SUCCESS') {
17 | successNotification('Password set successfully.');
18 | stopGeneralLoaderOnSuccessOrFail('setPasswordButtonLoaderAction');
19 | if (cb) {
20 | cb();
21 | }
22 | }
23 | } catch (e) {
24 | stopGeneralLoaderOnSuccessOrFail('setPasswordButtonLoaderAction');
25 | displayErrors(e);
26 | throw Error();
27 | }
28 | };
29 |
--------------------------------------------------------------------------------
/src/screens/auth/common/CommonAuthScreen/AuthScreenContainer.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import PropTypes from 'prop-types';
3 | import logo from '../../../../assets/images/logo.svg';
4 |
5 | function AuthScreenContainer(props) {
6 | const { children } = props;
7 | return (
8 |
9 |
10 |
11 |

12 |
13 |
Welcome To
14 |
PSC Trade Credit Risk
15 |
16 | {children}
17 |
22 |

23 |
24 |
25 |
26 | );
27 | }
28 |
29 | AuthScreenContainer.propTypes = {
30 | children: PropTypes.node.isRequired,
31 | };
32 |
33 | export default AuthScreenContainer;
34 |
--------------------------------------------------------------------------------
/src/common/ListFilters/Filter.js:
--------------------------------------------------------------------------------
1 | const initialFilterState = {
2 | tempFilter: {},
3 | finalFilter: {},
4 | };
5 |
6 | export const LIST_FILTER_REDUCER_ACTIONS = {
7 | UPDATE_DATA: 'UPDATE_DATA',
8 | RESET_STATE: 'RESET_STATE',
9 | APPLY_DATA: 'APPLY_DATA',
10 | CLOSE_FILTER: 'CLOSE_FILTER',
11 | };
12 |
13 | export function filterReducer(state, action) {
14 | switch (action.type) {
15 | case LIST_FILTER_REDUCER_ACTIONS.UPDATE_DATA:
16 | return {
17 | ...state,
18 | tempFilter: {
19 | ...state.tempFilter,
20 | [`${action.name}`]: action.value,
21 | },
22 | };
23 | case LIST_FILTER_REDUCER_ACTIONS.APPLY_DATA:
24 | return {
25 | ...state,
26 | finalFilter: { ...state.tempFilter },
27 | };
28 | case LIST_FILTER_REDUCER_ACTIONS.CLOSE_FILTER:
29 | return {
30 | ...state,
31 | tempFilter: { ...state.finalFilter },
32 | };
33 | case LIST_FILTER_REDUCER_ACTIONS.RESET_STATE:
34 | return { ...initialFilterState };
35 | default:
36 | return state;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/screens/Application/ImportApplication/Components/ImportAplicationImportStep/ImportApplicationImportStepValidations.js:
--------------------------------------------------------------------------------
1 | import {
2 | importApplicationUploadDump,
3 | updateImportApplicationData,
4 | } from '../../../redux/ApplicationAction';
5 |
6 | export const importApplicationImportStepValidations = async (dispatch, data) => {
7 | let error = '';
8 | let validated = true;
9 |
10 | // eslint-disable-next-line no-prototype-builtins
11 | if (!data?.file) {
12 | validated = false;
13 | error = 'Please import file to continue';
14 | }
15 |
16 | if (validated) {
17 | const { file } = data;
18 | const formData = new FormData();
19 | formData.append('dump-file', file);
20 | const config = {
21 | headers: {
22 | 'content-type': 'multipart/form-data',
23 | },
24 | };
25 | try {
26 | await dispatch(importApplicationUploadDump(formData, config));
27 | validated = true;
28 | } catch (e) {
29 | throw Error();
30 | }
31 | }
32 | dispatch(updateImportApplicationData('importFile', error));
33 | return validated;
34 | };
35 |
--------------------------------------------------------------------------------
/src/screens/Application/GenerateApplication/component/ApplicationCreditLimitStep/_ApplicationCreditLimitStep.scss:
--------------------------------------------------------------------------------
1 | .if-yes-row,
2 | .credit-limits-note,
3 | .upload-document-row {
4 | span {
5 | font-size: $subtitle;
6 | }
7 |
8 | .input-container {
9 | flex: 1;
10 | margin-top: 10px;
11 | }
12 | }
13 |
14 | .step-content textarea {
15 | grid-column: 2/ 7;
16 | width: 100%;
17 | margin-top: 5px;
18 | font: $subtitle $font-regular;
19 | color: $field-color;
20 | word-break: break-all;
21 | }
22 |
23 | .credit-limit-amount {
24 | display: grid;
25 | grid-template-columns: 75px 1fr 155px 1fr;
26 | gap: 0 10px;
27 | width: 100%;
28 | margin: 10px 0 20px 0;
29 |
30 | span {
31 | margin-top: 7px;
32 | white-space: nowrap;
33 | font-size: $subtitle;
34 | }
35 |
36 | .input-container {
37 | width: 100%;
38 | }
39 | }
40 |
41 | .application-credit-limits-grid {
42 | display: grid;
43 | grid-template-columns: calc(50% - 15px) calc(50% - 15px);
44 | gap: 20px 30px;
45 | }
46 |
47 | .outstanding-amount-container {
48 | grid-column-start: 1;
49 | }
50 |
--------------------------------------------------------------------------------
/src/common/DropdownMenu/DropdownMenu.js:
--------------------------------------------------------------------------------
1 | import React, { useRef } from 'react';
2 | import PropTypes from 'prop-types';
3 | import ReactDOM from 'react-dom';
4 | import { useOnClickOutside } from '../../hooks/UserClickOutsideHook';
5 |
6 | const menuRoot = document.getElementById('menu-root');
7 |
8 | const DropdownMenu = props => {
9 | const { children, toggleMenu, menuClass, ...restProps } = props;
10 | const dropdownClass = `dropdown-menu ${menuClass}`;
11 | const actionMenuRef = useRef();
12 | useOnClickOutside(actionMenuRef, () => toggleMenu(false));
13 |
14 | return ReactDOM.createPortal(
15 |
16 |
17 | {children}
18 |
19 |
,
20 | menuRoot
21 | );
22 | };
23 |
24 | DropdownMenu.propTypes = {
25 | children: PropTypes.element,
26 | toggleMenu: PropTypes.func,
27 | menuClass: PropTypes.string,
28 | };
29 |
30 | DropdownMenu.defaultProps = {
31 | children: null,
32 | toggleMenu: () => {},
33 | menuClass: '',
34 | };
35 |
36 | export default DropdownMenu;
37 |
--------------------------------------------------------------------------------
/src/screens/Application/services/ImportApplicationApiServices.js:
--------------------------------------------------------------------------------
1 | import ApiService from '../../../services/api-service/ApiService';
2 | import { APPLICATION_URLS } from '../../../constants/UrlConstants';
3 |
4 | const ImportApplicationApiServices = {
5 | downloadSample: () =>
6 | ApiService.request({
7 | url: `${APPLICATION_URLS.IMPORT_APPLICATION_URLS.DOWNLOAD_SAMPLE}`,
8 | method: 'GET',
9 | responseType: 'blob',
10 | timeout: 60000,
11 | }),
12 | deleteApplicationDump: id =>
13 | ApiService.deleteData(`${APPLICATION_URLS.IMPORT_APPLICATION_URLS.UPLOAD_DUMP}${id}`),
14 | uploadApplicationDump: (data, config) =>
15 | ApiService.postData(APPLICATION_URLS.IMPORT_APPLICATION_URLS.UPLOAD_DUMP, data, {
16 | ...config,
17 | timeout: 2 * 60 * 1000,
18 | }),
19 | importApplicationSaveAndNext: (id, stepName) =>
20 | ApiService.putData(
21 | `${APPLICATION_URLS.IMPORT_APPLICATION_URLS.UPLOAD_DUMP}${id}?stepName=${stepName}`,
22 | {},
23 | {
24 | timeout: 2 * 60 * 1000,
25 | }
26 | ),
27 | };
28 | export default ImportApplicationApiServices;
29 |
--------------------------------------------------------------------------------
/src/screens/Alerts/services/AlertsApiService.js:
--------------------------------------------------------------------------------
1 | import ApiService from '../../../services/api-service/ApiService';
2 | import { ALERTS_URLS } from '../../../constants/UrlConstants';
3 |
4 | export const AlertsApiService = {
5 | getAlertsList: params => ApiService.getData(ALERTS_URLS.GET_ALERTS_LIST, { params }),
6 | getAlertsColumnList: params => ApiService.getData(ALERTS_URLS.GET_ALERTS_COLUMN_LIST, { params }),
7 | updateAlertsColumnList: data => ApiService.putData(ALERTS_URLS.UPDATE_ALERTS_COLUMN_LIST, data),
8 |
9 | getAlertClientList: () => ApiService.getData(ALERTS_URLS.GET_ALERT_CLIENT_LIST),
10 | getAlertFilterDropdownData: () => ApiService.getData(ALERTS_URLS.GET_ALERT_FILTER_DATA),
11 | getAlertDetails: id => ApiService.getData(`${ALERTS_URLS.GET_ALERT_DETAIL}${id}`),
12 | updateAlertStatus: (id, data) =>
13 | ApiService.putData(`${ALERTS_URLS.UPDATE_ALERT_STATUS}${id}`, data),
14 | downloadAlertList: params =>
15 | ApiService.request({
16 | url: `${ALERTS_URLS.DOWNLOAD_ALERT}`,
17 | params,
18 | method: 'GET',
19 | responseType: 'blob',
20 | timeout: 60000,
21 | }),
22 | };
23 |
--------------------------------------------------------------------------------
/src/screens/Reports/reportFilterValidations.js:
--------------------------------------------------------------------------------
1 | import moment from 'moment';
2 | import { errorNotification } from '../../common/Toast';
3 |
4 | export const filterDateValidations = (appliedFilter, appliedParams) => {
5 | if (appliedFilter === 'clientList') {
6 | if (appliedParams?.inceptionEndDate || appliedParams?.inceptionStartDate) {
7 | if (moment(appliedParams?.inceptionEndDate)?.isBefore(appliedParams?.inceptionStartDate)) {
8 | errorNotification('Please enter valid inception date range');
9 | return false;
10 | }
11 | }
12 |
13 | if (appliedParams?.expiryEndDate || appliedParams?.expiryStartDate) {
14 | if (moment(appliedParams?.expiryEndDate)?.isBefore(appliedParams?.expiryStartDate)) {
15 | errorNotification('Please enter valid expiry date range');
16 | return false;
17 | }
18 | }
19 | }
20 |
21 | if (appliedParams?.endDate || appliedParams?.startDate) {
22 | if (moment(appliedParams?.endDate)?.isBefore(appliedParams?.startDate)) {
23 | errorNotification('Please enter valid date range');
24 | return false;
25 | }
26 | }
27 | return true;
28 | };
29 |
--------------------------------------------------------------------------------
/src/common/Modal/_Modal.scss:
--------------------------------------------------------------------------------
1 | .modal {
2 | position: absolute;
3 | top: 0;
4 | left: 0;
5 | right: 0;
6 | bottom: 0;
7 | display: flex;
8 | align-items: center;
9 | justify-content: center;
10 | width: 100%;
11 | height: 100%;
12 | overflow: hidden;
13 | background-color: rgba(0, 0, 0, 0.25);
14 | background-blend-mode: screen;
15 | z-index: 10;
16 | }
17 |
18 | .modal-content {
19 | min-width: 400px;
20 | background-color: white;
21 | border-radius: 10px;
22 | }
23 |
24 | .modal-header {
25 | display: flex;
26 | align-items: center;
27 | padding: 20px 30px;
28 | font: $h4 $font-medium;
29 | color: $primary-color;
30 | border-bottom: 1px solid $border-color;
31 |
32 | > div {
33 | display: flex;
34 | align-items: center;
35 | justify-content: center;
36 | width: 100%;
37 | }
38 | }
39 |
40 | .modal-body {
41 | padding: 20px 30px 0 30px;
42 |
43 | //tr:hover {background-color: $background-color}
44 | }
45 |
46 | .modal-footer {
47 | display: flex;
48 | justify-content: flex-end;
49 | width: 100%;
50 | padding: 20px 30px;
51 | }
52 |
53 | .modal-footer-buttons {
54 | margin-left: 10px;
55 | }
56 |
--------------------------------------------------------------------------------
/src/screens/Users/UserList/_UserList.scss:
--------------------------------------------------------------------------------
1 | .common-list-container {
2 | position: relative;
3 | width: 100%;
4 | max-height: calc(100vh - 14.751rem);
5 | margin-top: 0.625rem;
6 | overflow-y: auto;
7 | }
8 |
9 | .common-list-pagination {
10 | border-bottom-left-radius: 0.625rem;
11 | border-bottom-right-radius: 0.625rem;
12 | }
13 |
14 | .filter-modal {
15 | width: fit-content;
16 | max-width: 900px;
17 | min-width: 650px;
18 | }
19 |
20 | .filter-modal-row {
21 | display: flex;
22 | align-items: center;
23 | margin-bottom: 10px;
24 | gap: 0 20px;
25 | .react-dropdown-select {
26 | width: 200px;
27 | height: 32px;
28 | }
29 | }
30 |
31 | .filter-select {
32 | width: 200px;
33 | }
34 |
35 | .filter-date-picker-container {
36 | width: 200px;
37 | margin-right: 20px;
38 | }
39 |
40 | .filter-date-picker-container:last-child {
41 | margin-right: 0;
42 | }
43 |
44 | .custom-field-modal {
45 | width: 60vw;
46 | min-width: 500px;
47 | max-width: 600px;
48 | }
49 |
50 | .custom-field-content {
51 | display: flex;
52 | > div {
53 | margin-right: 60px;
54 | label {
55 | margin: 10px 0;
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/src/screens/Alerts/redux/AlertsReduxConstants.js:
--------------------------------------------------------------------------------
1 | export const ALERTS_REDUX_CONSTANTS = {
2 | GET_ALERT_LIST_SUCCESS: 'GET_ALERT_LIST_SUCCESS',
3 | RESET_ALERT_LIST_DATA: 'RESET_ALERT_LIST_DATA',
4 | INITIALIZE_FILTERS: 'INITIALIZE_FILTERS',
5 | INITIALIZE_ALERTS: 'INITIALIZE_ALERTS',
6 |
7 | GET_ALERT_COLUMN_LIST: 'GET_ALERT_COLUMN_LIST',
8 | GET_ALERT_DEFAULT_COLUMN_LIST: 'GET_ALERT_DEFAULT_COLUMN_LIST',
9 | UPDATE_ALERT_COLUMN_LIST: 'UPDATE_ALERT_COLUMN_LIST',
10 |
11 | GET_DROPDOWN_CLIENT_LIST: 'GET_DROPDOWN_CLIENT_LIST',
12 | GET_DROPDOWN_LIST_BY_SEARCH: 'GET_DROPDOWN_LIST_BY_SEARCH',
13 | GET_ALERT_FILTER_DROPDOWN_DATA: 'GET_ALERT_FILTER_DROPDOWN_DATA',
14 |
15 | UPDATE_ALERT_FILTER_FIELDS: 'UPDATE_ALERT_FILTER_FIELDS',
16 | APPLY_ALERT_FILTER_ACTION: 'APPLY_ALERT_FILTER_ACTION',
17 | CLOSE_ALERT_FILTER_ACTION: 'CLOSE_ALERT_FILTER_ACTION',
18 |
19 | RESET_ALERT_FILTER: 'RESET_ALERT_FILTER',
20 |
21 | GET_ALERT_DETAILS: 'GET_ALERT_DETAILS',
22 | CLEAR_ALERT_DETAILS: 'CLEAR_ALERT_DETAILS',
23 |
24 | SAVE_ALERT_ID: 'SAVE_ALERT_ID',
25 | REMOVE_ALERT_ID: 'REMOVE_ALERT_ID',
26 | UPDATE_ALERT_DETAILS_STATUS: 'UPDATE_ALERT_DETAILS_STATUS',
27 | };
28 |
--------------------------------------------------------------------------------
/src/screens/Reports/Reports.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Tooltip from 'rc-tooltip';
3 | import 'rc-tooltip/assets/bootstrap.css';
4 | import { Link } from 'react-router-dom';
5 | import { reportType } from '../../helpers/reportTypeHelper';
6 |
7 | const Reports = () => {
8 | return (
9 | <>
10 |
11 |
Select Report Type
12 |
13 |
14 | {reportType.map(report => (
15 |
21 | Click to view {`${report.name}`}
22 | >
23 | }
24 | >
25 |
26 | assignment
27 | {report.name}
28 |
29 |
30 | ))}
31 |
32 | >
33 | );
34 | };
35 |
36 | export default Reports;
37 |
--------------------------------------------------------------------------------
/src/common/Button/Button.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import PropTypes from 'prop-types';
3 |
4 | const Button = props => {
5 | const { isLoading, isDisabled, title, buttonType, className, children, ...restProps } = props;
6 | const buttonClass = `button ${buttonType}-button ${className}`;
7 |
8 | return (
9 |
13 | );
14 | };
15 |
16 | Button.propTypes = {
17 | title: PropTypes.string.isRequired,
18 | buttonType: PropTypes.oneOf([
19 | 'primary',
20 | 'secondary',
21 | 'success',
22 | 'danger',
23 | 'primary-1',
24 | 'outlined-primary',
25 | 'outlined-secondary',
26 | 'outlined-primary-small',
27 | 'outlined-red-small',
28 | 'outlined-red',
29 | ]).isRequired,
30 | className: PropTypes.string,
31 | isLoading: PropTypes.bool,
32 | isDisabled: PropTypes.bool,
33 | children: PropTypes.element.isRequired,
34 | };
35 |
36 | Button.defaultProps = {
37 | className: '',
38 | isLoading: false,
39 | isDisabled: false,
40 | };
41 |
42 | export default Button;
43 |
--------------------------------------------------------------------------------
/src/common/_common-combined.scss:
--------------------------------------------------------------------------------
1 | @import 'Accordion/Accordion';
2 | @import 'BigInput/BigInput';
3 | @import 'Button/Button';
4 | @import 'Checkbox/Checkbox';
5 | @import 'CustomSelect/CustomSelect';
6 | @import 'Drawer/Drawer';
7 | @import 'DropdownMenu/DropdownMenu';
8 | @import 'ForbiddenAccessPage/ForbiddenAccessPage';
9 | @import 'Header/Header';
10 | @import 'Header/component/FileUpload';
11 | @import 'IconButton/IconButton';
12 | @import 'Input/Input';
13 | @import 'Layout/Layout';
14 | @import 'Loader/Loader';
15 | @import 'Modal/Modal';
16 | @import 'Modal/CustomFieldModal/CustomFieldModal';
17 | @import 'Modal/FilterModal/Filter';
18 | @import 'Pagination/Pagination';
19 | @import 'RadioButton/RadioButton';
20 | @import 'SideMenu/SideMenu';
21 | @import 'Stepper/Stepper';
22 | @import 'Switch/Switch';
23 | @import 'Tab/Tab';
24 | @import 'Tab/ApplicationTab/ApplicationTab';
25 | @import 'Tab/ClaimsTab/ClaimsTab';
26 | @import 'Tab/ContactsTab/ContactsTab';
27 | @import 'Tab/CreditLimitTab/CreditLimitTab';
28 | @import 'Tab/DocumentsTab/DocumentsTab';
29 | @import 'Tab/NotesTab/NotesTab';
30 | @import 'Tab/OverduesTab/OverduesTab';
31 | @import 'Tab/PoliciesTab/PoliciesTab';
32 | @import 'Tab/TasksTab/TasksTab';
33 | @import 'Table/Table';
34 |
--------------------------------------------------------------------------------
/src/screens/Debtors/services/DebtorsCompanyStepApiServices.js:
--------------------------------------------------------------------------------
1 | import ApiService from '../../../services/api-service/ApiService';
2 | import { DEBTORS_URLS } from '../../../constants/UrlConstants';
3 |
4 | const DebtorsCompanyStepApiServices = {
5 | getDebtorsCompanyStepDropdownData: params =>
6 | ApiService.getData(DEBTORS_URLS.COMPANY.DROP_DOWN_DATA_URL, { params }),
7 | getDebtorsCompanyDataFromDebtor: (id, params) =>
8 | ApiService.getData(`${DEBTORS_URLS.COMPANY.SEARCH_APPLICATION_BY_DEBTOR_DETAILS}${id}`, {
9 | params,
10 | }),
11 | getDebtorsCompanyDataFromABNorACN: params =>
12 | ApiService.getData(`${DEBTORS_URLS.COMPANY.SEARCH_APPLICATION_BY_ABN_ACN_DETAILS}`, {
13 | params,
14 | }),
15 | searchDebtorsCompanyEntityName: params =>
16 | ApiService.getData(`${DEBTORS_URLS.COMPANY.SEARCH_APPLICATION_ENTITY_TYPE}`, {
17 | params,
18 | }),
19 | deleteDebtorsPersonIndividualData: personId =>
20 | ApiService.deleteData(`${DEBTORS_URLS.COMPANY.DELETE_APPLICATION_PERSONS}${personId}`),
21 | generateRandomRegistrationNumber: params =>
22 | ApiService.getData(DEBTORS_URLS.COMPANY.GENERATE_RANDOM_REGISTRATION_NUMBER, { params }),
23 | };
24 | export default DebtorsCompanyStepApiServices;
25 |
--------------------------------------------------------------------------------
/src/screens/Application/ImportApplication/Components/ImportApplicationDownloadSample/ImportApplicationDownloadSample.js:
--------------------------------------------------------------------------------
1 | import { useCallback } from 'react';
2 | import { useSelector } from 'react-redux';
3 | import IconButton from '../../../../../common/IconButton/IconButton';
4 | import { downloadAll } from '../../../../../helpers/DownloadHelper';
5 | import { downloadIASample } from '../../../redux/ApplicationAction';
6 |
7 | const ImportApplicationDownloadSample = () => {
8 | const { downloadIASampleFileLoaderButton } = useSelector(
9 | ({ generalLoaderReducer }) => generalLoaderReducer ?? false
10 | );
11 | const downloadSampleFile = useCallback(async () => {
12 | const res = await downloadIASample();
13 | if (res) downloadAll(res);
14 | }, []);
15 | return (
16 |
17 |
18 |
24 | Download Sample File
25 |
26 |
27 | );
28 | };
29 | export default ImportApplicationDownloadSample;
30 |
--------------------------------------------------------------------------------
/src/screens/Application/services/ApplicationCompanyStepApiServices.js:
--------------------------------------------------------------------------------
1 | import ApiService from '../../../services/api-service/ApiService';
2 | import { APPLICATION_URLS } from '../../../constants/UrlConstants';
3 |
4 | const ApplicationCompanyStepApiServices = {
5 | getApplicationCompanyStepDropdownData: params =>
6 | ApiService.getData(APPLICATION_URLS.COMPANY.DROP_DOWN_DATA_URL, { params }),
7 | getApplicationCompanyDataFromDebtor: (id, params) =>
8 | ApiService.getData(`${APPLICATION_URLS.COMPANY.SEARCH_APPLICATION_BY_DEBTOR_DETAILS}${id}`, {
9 | params,
10 | }),
11 | getApplicationCompanyDataFromABNorACN: params =>
12 | ApiService.getData(`${APPLICATION_URLS.COMPANY.SEARCH_APPLICATION_BY_ABN_ACN_DETAILS}`, {
13 | params,
14 | }),
15 | searchApplicationCompanyEntityName: params =>
16 | ApiService.getData(`${APPLICATION_URLS.COMPANY.SEARCH_APPLICATION_ENTITY_TYPE}`, {
17 | params,
18 | }),
19 | deleteApplicationPersonIndividualData: personId =>
20 | ApiService.deleteData(`${APPLICATION_URLS.COMPANY.DELETE_APPLICATION_PERSONS}${personId}`),
21 | generateRandomRegistrationNumber: params =>
22 | ApiService.getData(APPLICATION_URLS.COMPANY.GENERATE_RANDOM_REGISTRATION_NUMBER, { params }),
23 | };
24 | export default ApplicationCompanyStepApiServices;
25 |
--------------------------------------------------------------------------------
/src/common/SideMenu/_SideMenu.scss:
--------------------------------------------------------------------------------
1 | .side-menu-container {
2 | width: 13.438rem;
3 | height: calc(100vh - 2rem);
4 | background-color: #ffffff;
5 | border-radius: 0.625rem;
6 | box-shadow: 0px 0px 1.875rem #82828229;
7 | }
8 |
9 | .side-menu-logo {
10 | display: flex;
11 | align-items: center;
12 | justify-content: center;
13 | height: 3.438rem;
14 | margin: 0.438rem;
15 | border-bottom: 0.063rem solid $border-color;
16 |
17 | img {
18 | height: 2.188rem;
19 | }
20 | }
21 |
22 | .menu-container {
23 | max-height: calc(100% - 4.313rem);
24 | padding: 0.625rem 0 0 0.438rem;
25 | overflow-y: auto;
26 | }
27 |
28 | .menu {
29 | display: flex;
30 | align-items: center;
31 | width: calc(100% - 0.438rem);
32 | margin-bottom: 0.625rem;
33 | padding: 0.625rem;
34 | font: $subtitle $font-regular;
35 | color: $placeholder-color;
36 | border-radius: 0.625rem;
37 | text-decoration: none;
38 |
39 | span {
40 | margin-right: 0.313rem;
41 | font-size: $h4;
42 | color: $placeholder-color;
43 | }
44 | }
45 |
46 | .menu:hover:not(.active) {
47 | color: $primary-color;
48 | span {
49 | color: $primary-color;
50 | }
51 | }
52 |
53 | .active {
54 | background-color: $primary-color;
55 | color: white;
56 | span {
57 | color: white;
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/src/routes/Routes.js:
--------------------------------------------------------------------------------
1 | import { BrowserRouter as Router, Switch } from 'react-router-dom';
2 | import { Suspense } from 'react';
3 | import Loader from '../common/Loader/Loader';
4 | import { AuthenticatedRoute } from './AuthenticatedRoutes';
5 | import { ROUTES_CONSTANTS } from './constants/RoutesConstants';
6 | import { NonAuthenticatedRoute } from './NonAuthenticatedRoutes';
7 | import Layout from '../common/Layout/Layout';
8 |
9 | function Routes() {
10 | // useEffect(() => {
11 | // saveTokenFromLocalStorageToSession();
12 | // }, []);
13 |
14 | return (
15 |
16 |
17 | }>
18 |
19 | {ROUTES_CONSTANTS.map(({ path, component, authenticated, escapeRedirect }) => {
20 | const Component = authenticated ? AuthenticatedRoute : NonAuthenticatedRoute;
21 |
22 | return (
23 |
30 | );
31 | })}
32 |
33 |
34 |
35 |
36 | );
37 | }
38 |
39 | export default Routes;
40 |
--------------------------------------------------------------------------------
/src/screens/Clients/services/ClientDocumentsApiService.js:
--------------------------------------------------------------------------------
1 | import ApiService from '../../../services/api-service/ApiService';
2 | import { CLIENT_URLS } from '../../../constants/UrlConstants';
3 |
4 | const ClientDocumentsApiService = {
5 | getClientDocumentsList: (id, params) =>
6 | ApiService.getData(`${CLIENT_URLS.DOCUMENTS.DOCUMENTS_LIST}${id}`, { params }),
7 | getClientDocumentsColumnNamesList: params =>
8 | ApiService.getData(`${CLIENT_URLS.DOCUMENTS.COLUMN_NAME_LIST_URL}`, { params }),
9 | updateClientDocumentColumnListName: data =>
10 | ApiService.putData(`${CLIENT_URLS.DOCUMENTS.COLUMN_NAME_LIST_URL}`, data),
11 | getDocumentTypeList: params =>
12 | ApiService.getData(`${CLIENT_URLS.DOCUMENTS.GET_DOCUMENT_TYPE_URL}`, { params }),
13 | uploadDocument: (data, config) =>
14 | ApiService.postData(CLIENT_URLS.DOCUMENTS.UPLOAD_DOCUMENT_URL, data, {
15 | ...config,
16 | timeout: 60000,
17 | }),
18 | downloadDocuments: params =>
19 | ApiService.request({
20 | url: `${CLIENT_URLS.DOCUMENTS.DOWNLOAD_DOCUMENTS_URL}`,
21 | params,
22 | method: 'GET',
23 | responseType: 'blob',
24 | timeout: 60000,
25 | }),
26 | deleteClientDocument: id => ApiService.deleteData(`${CLIENT_URLS.DOCUMENTS.DOCUMENTS_LIST}${id}`),
27 | };
28 | export default ClientDocumentsApiService;
29 |
--------------------------------------------------------------------------------
/src/helpers/LocalStorageHelper.js:
--------------------------------------------------------------------------------
1 | import { SESSION_VARIABLES } from '../constants/SessionStorage';
2 |
3 | export const AUTH_TOKEN = 'userToken';
4 |
5 | export const saveAuthTokenLocalStorage = authToken => {
6 | SESSION_VARIABLES.USER_TOKEN = authToken;
7 | localStorage.setItem(AUTH_TOKEN, authToken);
8 | };
9 |
10 | // export const saveTokenToSession = authToken => {
11 | // sessionStorage.setItem(AUTH_TOKEN, authToken);
12 | // SESSION_VARIABLES.USER_TOKEN = authToken;
13 | // };
14 |
15 | // export const saveTokenFromLocalStorageToSession = () => {
16 | // const authToken = localStorage.getItem(AUTH_TOKEN);
17 | // if (authToken) {
18 | // SESSION_VARIABLES.USER_TOKEN = authToken;
19 | // }
20 | // };
21 |
22 | export const getAuthTokenLocalStorage = () => {
23 | // if (SESSION_VARIABLES.USER_TOKEN) {
24 | // return SESSION_VARIABLES.USER_TOKEN;
25 | // }
26 |
27 | // const tokenFromSession = sessionStorage.getItem(AUTH_TOKEN);
28 | //
29 | // if (tokenFromSession) {
30 | // SESSION_VARIABLES.USER_TOKEN = tokenFromSession;
31 | // return tokenFromSession;
32 | // }
33 | return localStorage.getItem(AUTH_TOKEN);
34 | };
35 |
36 | export const clearAuthToken = () => {
37 | SESSION_VARIABLES.USER_TOKEN = null;
38 | sessionStorage.removeItem(AUTH_TOKEN);
39 | localStorage.removeItem(AUTH_TOKEN);
40 | };
41 |
--------------------------------------------------------------------------------
/src/screens/Clients/services/ClientTaskApiService.js:
--------------------------------------------------------------------------------
1 | import ApiService from '../../../services/api-service/ApiService';
2 | import { CLIENT_URLS } from '../../../constants/UrlConstants';
3 |
4 | const ClientTaskApiService = {
5 | getClientTaskListData: params => ApiService.getData(CLIENT_URLS.TASK.TASK_LIST_URL, { params }),
6 | getClientTaskColumnNameList: params =>
7 | ApiService.getData(CLIENT_URLS.TASK.TASK_COLUMN_NAME_LIST_URL, { params }),
8 | updateClientTaskColumnNameList: data =>
9 | ApiService.putData(CLIENT_URLS.TASK.TASK_COLUMN_NAME_LIST_URL, data),
10 |
11 | // delete task
12 | deleteTask: taskId => ApiService.deleteData(`${CLIENT_URLS.TASK.TASK_LIST_URL}${taskId}`),
13 |
14 | // add task
15 | getAssigneeDropDownData: () =>
16 | ApiService.getData(CLIENT_URLS.TASK.ADD_TASK.ASSIGNEE_DROP_DOWN_DATA),
17 | getEntityDropDownData: params =>
18 | ApiService.getData(CLIENT_URLS.TASK.ADD_TASK.ENTITY_DROP_DOWN_DATA, { params }),
19 | saveNewTask: data => ApiService.postData(CLIENT_URLS.TASK.ADD_TASK.SAVE_NEW_TASK, data),
20 |
21 | // edit task
22 | getClientTaskDetailById: id =>
23 | ApiService.getData(`${CLIENT_URLS.TASK.EDIT_TASK.GET_CLIENT_TASK_DETAIL}${id}`),
24 | updateTask: (id, data) =>
25 | ApiService.putData(`${CLIENT_URLS.TASK.ADD_TASK.SAVE_NEW_TASK}${id}`, data),
26 | };
27 | export default ClientTaskApiService;
28 |
--------------------------------------------------------------------------------
/src/screens/MyWork/_MyWork.scss:
--------------------------------------------------------------------------------
1 | @import '../Clients/ViewClient/ViewClient';
2 |
3 | .my-work-add-task-container {
4 | @extend .client-details-container;
5 | }
6 |
7 | .my-work-view-task-container {
8 | display: grid !important;
9 | grid-template-columns: 15% calc(35% - 22px) 15% calc(35% - 22px);
10 | padding: 25px 30px;
11 | gap: 15px;
12 |
13 | > span {
14 | color: $primary-color;
15 | }
16 |
17 | .client-detail {
18 | padding: 0.344rem;
19 | min-width: 170px;
20 | color: $field-color;
21 | cursor: not-allowed;
22 | }
23 |
24 | input {
25 | cursor: default !important;
26 | }
27 | }
28 |
29 | .my-work-tab-button-row {
30 | display: flex;
31 | justify-content: space-between;
32 | align-items: center;
33 | }
34 |
35 | .my-work-tab {
36 | width: fit-content !important;
37 | background-color: white !important;
38 | }
39 |
40 | .my-work-tab-content-container {
41 | margin-top: -55px;
42 | flex-direction: column;
43 | }
44 |
45 | .my-work-tab-button-row .react-datepicker-popper {
46 | left: unset !important;
47 | right: 0;
48 | }
49 | .common-white-container.notification-white-container {
50 | max-height: calc(100vh - 11rem);
51 | display: block;
52 | margin-top: 20px;
53 | overflow: auto;
54 | }
55 | .my-work-task-action-row {
56 | display: flex;
57 | justify-content: flex-end;
58 | width: 100%;
59 | }
60 |
--------------------------------------------------------------------------------
/src/screens/Debtors/services/DebtorTaskApiServices.js:
--------------------------------------------------------------------------------
1 | import ApiService from '../../../services/api-service/ApiService';
2 | import { DEBTORS_URLS } from '../../../constants/UrlConstants';
3 |
4 | const DebtorTaskApiService = {
5 | getDebtorTaskListData: params => ApiService.getData(DEBTORS_URLS.TASK.TASK_LIST_URL, { params }),
6 | getDebtorTaskColumnNameList: params =>
7 | ApiService.getData(DEBTORS_URLS.TASK.TASK_COLUMN_NAME_LIST_URL, { params }),
8 | updateDebtorTaskColumnNameList: data =>
9 | ApiService.putData(DEBTORS_URLS.TASK.TASK_COLUMN_NAME_LIST_URL, data),
10 |
11 | // delete task
12 | deleteTask: taskId => ApiService.deleteData(`${DEBTORS_URLS.TASK.TASK_LIST_URL}${taskId}`),
13 |
14 | // add task
15 | getAssigneeDropDownData: () =>
16 | ApiService.getData(DEBTORS_URLS.TASK.ADD_TASK.ASSIGNEE_DROP_DOWN_DATA),
17 | getEntityDropDownData: params =>
18 | ApiService.getData(DEBTORS_URLS.TASK.ADD_TASK.ENTITY_DROP_DOWN_DATA, { params }),
19 | saveNewTask: data => ApiService.postData(DEBTORS_URLS.TASK.ADD_TASK.SAVE_NEW_TASK, data),
20 |
21 | // edit task
22 | getDebtorTaskDetailById: id =>
23 | ApiService.getData(`${DEBTORS_URLS.TASK.EDIT_TASK.GET_DEBTOR_TASK_DETAIL}${id}`),
24 | updateTask: (id, data) =>
25 | ApiService.putData(`${DEBTORS_URLS.TASK.ADD_TASK.SAVE_NEW_TASK}${id}`, data),
26 | };
27 | export default DebtorTaskApiService;
28 |
--------------------------------------------------------------------------------
/src/screens/Clients/services/ClientApiService.js:
--------------------------------------------------------------------------------
1 | import ApiService from '../../../services/api-service/ApiService';
2 | import { CLIENT_URLS } from '../../../constants/UrlConstants';
3 |
4 | const ClientApiService = {
5 | getAllClientList: params => ApiService.getData(CLIENT_URLS.CLIENT_LIST_URL, { params }),
6 | getClientById: id => ApiService.getData(CLIENT_URLS.CLIENT_BY_ID_URL + id),
7 | getClientColumnListName: () => ApiService.getData(CLIENT_URLS.CLIENT_COLUMN_NAME_LIST_URL),
8 | updateClientColumnListName: data =>
9 | ApiService.putData(CLIENT_URLS.UPDATE_CLIENT_COLUMN_NAME_LIST_URL, data),
10 | updateSelectedClientData: (id, data) =>
11 | ApiService.putData(CLIENT_URLS.CLIENT_BY_ID_URL + id, data),
12 | getClientFilter: () => ApiService.getData(CLIENT_URLS.CLIENT_FILTER_LIST_URL),
13 | syncClientData: id => ApiService.putData(`${CLIENT_URLS.SYNC_CLIENT_DATA_URL}${id}`),
14 | getListFromCrm: data =>
15 | ApiService.getData(`${CLIENT_URLS.GET_DATA_FROM_CRM_URL}?searchKeyword=${data}`),
16 | updateClientListFromCrm: data => ApiService.postData(CLIENT_URLS.CLIENT_LIST_URL, data),
17 | downloadClientsList: params =>
18 | ApiService.request({
19 | url: `${CLIENT_URLS.DOWNLOAD_CLIENTS}`,
20 | params,
21 | method: 'GET',
22 | responseType: 'blob',
23 | timeout: 60000,
24 | }),
25 | };
26 |
27 | export default ClientApiService;
28 |
--------------------------------------------------------------------------------
/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": ["airbnb", "prettier", "prettier/react", "plugin:prettier/recommended", "eslint-config-prettier"],
3 | "parser": "babel-eslint",
4 | "rules": {
5 | "import/no-unresolved": "off",
6 | "no-console": [
7 | "error",
8 | {
9 | "allow": ["log", "warn", "error"]
10 | }
11 | ],
12 | "react/jsx-props-no-spreading": "off",
13 | "jsx-a11y/control-has-associated-label": "off",
14 | "jsx-a11y/label-has-associated-control": "off",
15 | "jsx-a11y/click-events-have-key-events": "off",
16 | "jsx-a11y/no-static-element-interactions": "off",
17 | "jsx-a11y/no-noninteractive-element-interactions": "off",
18 | "import/prefer-default-export": "off",
19 | "no-underscore-dangle": "off",
20 | "jsx-a11y/alt-text": "off",
21 | "react/react-in-jsx-scope": "off",
22 | "react/forbid-prop-types": "off",
23 | "react/jsx-filename-extension": [
24 | 1,
25 | {
26 | "extensions": [".js", ".jsx"]
27 | }
28 | ],
29 | "prettier/prettier": [
30 | "warn",
31 | {
32 | "trailingComma": "es5",
33 | "singleQuote": true,
34 | "endOfLine": "auto",
35 | "printWidth": 100
36 | }
37 | ]
38 | },
39 | "plugins": ["prettier"],
40 | "env": {
41 | "browser": true,
42 | "node": true,
43 | "jest": true,
44 | "es6": true
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/src/common/Header/redux/HeaderConstants.js:
--------------------------------------------------------------------------------
1 | export const EDIT_PROFILE_CONSTANT = {
2 | GET_LOGGED_USER_DETAILS: 'GET_LOGGED_USER_DETAILS',
3 | USER_EDIT_PROFILE_DATA_CHANGE: 'USER_EDIT_PROFILE_DATA_CHANGE',
4 | UPDATE_USER_PROFILE_PICTURE: 'UPDATE_USER_PROFILE_PICTURE',
5 | };
6 |
7 | export const HEADER_NOTIFICATION_REDUX_CONSTANTS = {
8 | GET_HEADER_NOTIFICATION: 'GET_HEADER_NOTIFICATION',
9 | TASK_DELETED_READ: 'TASK_DELETED_READ',
10 | ADD_NOTIFICATION: 'ADD_NOTIFICATION',
11 | TASK_ASSIGNED: 'TASK_ASSIGNED',
12 | TASK_UPDATED: 'TASK_UPDATED',
13 | REPORT_EXPIRING: 'REPORT_EXPIRING',
14 | ALERT: 'ALERT',
15 | APPLICATION_APPROVED: 'APPLICATION_APPROVED',
16 | APPLICATION_DECLINED: 'APPLICATION_DECLINED',
17 | APPLICATION_GENERATED: 'APPLICATION_GENERATED',
18 | CLAIM_ADDED: 'CLAIM_ADDED',
19 | CREDIT_LIMIT_EXPIRING: 'CREDIT_LIMIT_EXPIRING',
20 | DUE_TASK: 'DUE_TASK',
21 | OFF_NOTIFIRE: 'OFF_NOTIFIRE',
22 | REVIEW_DEBTOR: 'REVIEW_DEBTOR',
23 | GET_NOTIFICATION_ALERTS_DETAILS: 'GET_NOTIFICATION_ALERTS_DETAILS',
24 | CLEAR_NOTIFICATION_ALERTS_DETAILS: 'CLEAR_NOTIFICATION_ALERTS_DETAILS',
25 | MARKED_ALL_AS_READ: 'MARKED_ALL_AS_READ',
26 | REPORT_NOTIFICATION: 'REPORT_NOTIFICATION',
27 | };
28 |
29 | export const HEADER_GLOBAL_SEARCH_REDUX_CONSTANTS = {
30 | GET_SEARCH_RESULT_LIST: 'GET_SEARCH_RESULT_LIST',
31 | CLEAR_SEARCHED_DATA_LIST: 'CLEAR_SEARCHED_DATA_LIST',
32 | };
33 |
--------------------------------------------------------------------------------
/src/utilities/_basic-styles.scss:
--------------------------------------------------------------------------------
1 | html,
2 | body {
3 | height: 100%;
4 | }
5 |
6 | body {
7 | margin: 0;
8 | font-family: $font-regular;
9 | -webkit-font-smoothing: antialiased;
10 | -moz-osx-font-smoothing: grayscale;
11 | }
12 |
13 | body * {
14 | box-sizing: border-box;
15 | }
16 |
17 | code {
18 | font-family: $font-regular;
19 | }
20 |
21 | input::placeholder,
22 | textarea::placeholder,
23 | .react-select__placeholder {
24 | font: $subtitle $font-regular;
25 | color: $placeholder-color !important;
26 | }
27 |
28 | input:-webkit-autofill,
29 | input:-webkit-autofill:hover,
30 | input:-webkit-autofill:focus,
31 | input:-webkit-autofill:active {
32 | font: $subtitle $font-regular;
33 | transition: background-color 5000s;
34 | -webkit-text-fill-color: $field-color !important;
35 | }
36 |
37 | /* scrollbar starts here */
38 | * {
39 | scrollbar-color: $primary-color white;
40 | scrollbar-width: thin;
41 | }
42 | /* width */
43 | ::-webkit-scrollbar {
44 | height: 5px;
45 | width: 5px;
46 | }
47 |
48 | /* Track */
49 | ::-webkit-scrollbar-track {
50 | background: #ffffff;
51 | border-radius: 10px;
52 | }
53 |
54 | /* Handle */
55 | ::-webkit-scrollbar-thumb {
56 | background: $primary-color;
57 | border-radius: 10px;
58 | }
59 |
60 | /* Handle on hover */
61 | ::-webkit-scrollbar-thumb:hover {
62 | background: $primary-variant-color;
63 | }
64 | /* scrollbar ends here */
65 |
--------------------------------------------------------------------------------
/src/screens/auth/login/redux/LoginAction.js:
--------------------------------------------------------------------------------
1 | import AuthApiService from '../../services/AuthApiService';
2 | import { successNotification } from '../../../../common/Toast';
3 | import { saveAuthTokenLocalStorage } from '../../../../helpers/LocalStorageHelper';
4 | import { getLoggedUserDetails } from '../../../../common/Header/redux/HeaderAction';
5 | import {
6 | startGeneralLoaderOnRequest,
7 | stopGeneralLoaderOnSuccessOrFail,
8 | } from '../../../../common/GeneralLoader/redux/GeneralLoaderAction';
9 | import { displayErrors } from '../../../../helpers/ErrorNotifyHelper';
10 |
11 | export const loginUser = ({ email, password }) => {
12 | return async dispatch => {
13 | try {
14 | startGeneralLoaderOnRequest('logInButtonLoaderAction');
15 | const data = { userId: email.toLowerCase().trim(), password: password.trim() };
16 | const response = await AuthApiService.loginUser(data);
17 |
18 | if (response?.data?.status === 'SUCCESS') {
19 | const { token } = response?.data?.data;
20 | saveAuthTokenLocalStorage(token);
21 |
22 | successNotification('Login successfully.');
23 | await dispatch(getLoggedUserDetails());
24 | stopGeneralLoaderOnSuccessOrFail('logInButtonLoaderAction');
25 | }
26 | } catch (e) {
27 | stopGeneralLoaderOnSuccessOrFail('logInButtonLoaderAction');
28 | displayErrors(e);
29 | throw Error();
30 | }
31 | };
32 | };
33 |
--------------------------------------------------------------------------------
/src/screens/Dashboard/_Dashboard.scss:
--------------------------------------------------------------------------------
1 | .react-select-container.dashboard-select-container {
2 | min-height: 56px;
3 | width: 100%;
4 |
5 | .react-select__control {
6 | max-height: unset !important;
7 | min-height: 56px !important;
8 | border-radius: 10px;
9 | }
10 |
11 | .react-select__dropdown-indicator {
12 | padding: 15px !important;
13 | }
14 | }
15 |
16 | .dashboard-grid {
17 | display: grid;
18 | grid-template-columns: 1fr 1fr;
19 | gap: 40px;
20 | margin-top: 25px;
21 | color: $primary-color;
22 |
23 | .title {
24 | margin-top: 15px;
25 | font: $h4 $font-medium;
26 | }
27 |
28 | .readings {
29 | margin: 10px 0 20px 0;
30 | font: $h1 $font-bold;
31 | }
32 | }
33 |
34 | .dashboard-white-container {
35 | position: relative;
36 | padding: 25px;
37 | background-color: #fff;
38 | border-radius: 10px;
39 | overflow: hidden;
40 | }
41 |
42 | .dashboard-white-container-icon {
43 | display: flex;
44 | align-items: center;
45 | justify-content: center;
46 | height: 46px;
47 | width: 46px;
48 | font-size: 26px;
49 | color: white;
50 | background-color: $primary-color;
51 | border-radius: 10px;
52 | }
53 |
54 | .dashboard-white-container-stripe {
55 | position: absolute;
56 | bottom: 0;
57 | left: 0;
58 | right: 0;
59 | height: 15px;
60 | background: transparent linear-gradient(90deg, $primary-color 0%, #fff 100%) 0% 0% no-repeat padding-box;
61 | }
62 |
--------------------------------------------------------------------------------
/src/screens/Users/AddUser/_AddUser.scss:
--------------------------------------------------------------------------------
1 | .common-detail-container {
2 | width: 100%;
3 | margin-top: 25px;
4 | padding: 20px;
5 | font: $sub-text;
6 | background-color: white;
7 | border-radius: 10px;
8 | }
9 |
10 | .common-detail-grid {
11 | display: grid;
12 | grid-template-columns: calc(50% - 5%) calc(50% - 5%);
13 | grid-template-areas: 'r1c1 r1c2' 'r2c1 r2c2' 'r3c1 r3c1';
14 | gap: 15px 10%;
15 | }
16 |
17 | .common-detail-field.user-select-client {
18 | grid-column: 1 / span 2;
19 | }
20 |
21 | .common-detail-field {
22 | display: grid;
23 | align-items: center;
24 | grid-template-columns: 175px 1fr;
25 | }
26 |
27 | .common-detail-title {
28 | min-width: 120px;
29 | margin-right: 20px;
30 | color: $primary-color;
31 | }
32 |
33 | .module-container {
34 | display: grid;
35 | display: -ms-grid;
36 | grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
37 | gap: 15px;
38 | margin-top: 15px;
39 | }
40 |
41 | .module {
42 | padding: 20px 15px;
43 | background-color: white;
44 | border-radius: 10px;
45 |
46 | label {
47 | margin: 5px 0;
48 | }
49 | }
50 |
51 | .module-title {
52 | margin-bottom: 10px;
53 | font: $h5 $font-medium;
54 | color: $primary-color;
55 | }
56 |
57 | .checkbox-disabled {
58 | * {
59 | cursor: not-allowed;
60 | }
61 | }
62 |
63 | .add-user-detail-container span {
64 | padding: 0 10px;
65 | font: $subtitle $font-medium;
66 | color: $field-color;
67 | }
68 |
--------------------------------------------------------------------------------
/src/screens/Claims/services/ClaimsApiService.js:
--------------------------------------------------------------------------------
1 | import ApiService from '../../../services/api-service/ApiService';
2 | import { CLAIMS_URLS } from '../../../constants/UrlConstants';
3 |
4 | export const ClaimsApiServices = {
5 | getClaimsListByFilter: params => ApiService.getData(CLAIMS_URLS.CLAIMS_LIST, { params }),
6 | getClaimsColumnList: params => ApiService.getData(CLAIMS_URLS.CLAIMS_COLUMN_LIST, { params }),
7 | updateClaimsColumnList: data => ApiService.putData(CLAIMS_URLS.UPDATE_CLAIMS_COLUMN_LIST, data),
8 |
9 | getClaimsEntityList: () => ApiService.getData(CLAIMS_URLS.GET_CLAIMS_ENTITY_LIST),
10 | addClaim: data => ApiService.postData(CLAIMS_URLS.ADD_CLAIM, data),
11 | getClaimDetails: id => ApiService.getData(CLAIMS_URLS.GET_CLAIM_DETAILS + id),
12 |
13 | ClaimsDocumentServices: {
14 | getClaimsDocumentsList: (id, params) =>
15 | ApiService.getData(`${CLAIMS_URLS.DOCUMENTS.DOCUMENTS_LIST}${id}`, { params }),
16 | uploadClaimDocument: (data, config) =>
17 | ApiService.postData(CLAIMS_URLS.DOCUMENTS.DOCUMENTS_LIST, data, {
18 | ...config,
19 | timeout: 60000,
20 | }),
21 | downloadClaimDocument: id =>
22 | ApiService.request({
23 | url: `${CLAIMS_URLS.DOCUMENTS.DOWNLOAD_DOCUMENTS}${id}`,
24 | method: 'GET',
25 | responseType: 'blob',
26 | timeout: 60000,
27 | }),
28 | },
29 | getClaimsManagerList: () => ApiService.getData(CLAIMS_URLS.GET_CLAIMS_MANAGER_LIST),
30 | };
31 |
--------------------------------------------------------------------------------
/src/screens/Clients/services/ClientCreditLimitApiService.js:
--------------------------------------------------------------------------------
1 | import ApiService from '../../../services/api-service/ApiService';
2 | import { CLIENT_URLS } from '../../../constants/UrlConstants';
3 |
4 | const ClientCreditLimitApiService = {
5 | getClientCreditLimitList: (id, params) =>
6 | ApiService.getData(`${CLIENT_URLS.CREDIT_LIMIT.CREDIT_LIMIT_LIST}${id}`, { params }),
7 | getClientCreditLimitColumnNameList: () =>
8 | ApiService.getData(CLIENT_URLS.CREDIT_LIMIT.COLUMN_NAME_LIST_URL),
9 | updateClientCreditLimitColumnNameList: data =>
10 | ApiService.putData(`${CLIENT_URLS.CREDIT_LIMIT.UPDATE_COLUMN_NAME_LIST_URL}`, data),
11 | modifyClientCreditLimitData: (id, data) =>
12 | ApiService.putData(`${CLIENT_URLS.CREDIT_LIMIT.CREDIT_LIMIT_ACTIONS}${id}`, data),
13 | surrenderClientCreditLimitData: (id, data) =>
14 | ApiService.putData(`${CLIENT_URLS.CREDIT_LIMIT.CREDIT_LIMIT_ACTIONS}${id}`, data),
15 | downloadCreditLimitCSVFile: id =>
16 | ApiService.request({
17 | url: `${CLIENT_URLS.CREDIT_LIMIT.DOWNLOAD_CLIENT_CREDIT_LIMIT_CSV}${id}`,
18 | method: 'GET',
19 | responseType: 'blob',
20 | timeout: 60000,
21 | }),
22 | downloadCreditLimitDecisionLetter: id =>
23 | ApiService.request({
24 | url: `${CLIENT_URLS.CREDIT_LIMIT.DOWNLOAD_CLIENT_CREDIT_LIMIT_DECISION_LETTER}${id}`,
25 | method: 'GET',
26 | responseType: 'blob',
27 | timeout: 60000,
28 | }),
29 | };
30 | export default ClientCreditLimitApiService;
31 |
--------------------------------------------------------------------------------
/src/screens/Debtors/services/DebtorCreditLimitApiServices.js:
--------------------------------------------------------------------------------
1 | import ApiService from '../../../services/api-service/ApiService';
2 | import { DEBTORS_URLS } from '../../../constants/UrlConstants';
3 |
4 | const DebtorCreditLimitApiServices = {
5 | getDebtorCreditLimitList: (id, params) =>
6 | ApiService.getData(`${DEBTORS_URLS.CREDIT_LIMIT.CREDIT_LIMIT_LIST}${id}`, { params }),
7 | getDebtorCreditLimitColumnNameList: params =>
8 | ApiService.getData(DEBTORS_URLS.CREDIT_LIMIT.COLUMN_NAME_LIST_URL, { params }),
9 | updateDebtorCreditLimitColumnNameList: data =>
10 | ApiService.putData(`${DEBTORS_URLS.CREDIT_LIMIT.UPDATE_COLUMN_NAME_LIST_URL}`, data),
11 | modifyDebtorCreditLimitData: (id, data) =>
12 | ApiService.putData(`${DEBTORS_URLS.CREDIT_LIMIT.CREDIT_LIMIT_ACTIONS}${id}`, data),
13 | surrenderDebtorCreditLimitData: (id, data) =>
14 | ApiService.putData(`${DEBTORS_URLS.CREDIT_LIMIT.CREDIT_LIMIT_ACTIONS}${id}`, data),
15 | downloadCreditLimitCSVFile: id =>
16 | ApiService.request({
17 | url: `${DEBTORS_URLS.CREDIT_LIMIT.DOWNLOAD_DEBTOR_CREDIT_LIMIT_CSV}${id}`,
18 | method: 'GET',
19 | responseType: 'blob',
20 | timeout: 60000,
21 | }),
22 | downloadCreditLimitDecisionLetter: id =>
23 | ApiService.request({
24 | url: `${DEBTORS_URLS.CREDIT_LIMIT.DOWNLOAD_DEBTOR_CREDIT_LIMIT_DECISION_LETTER}${id}`,
25 | method: 'GET',
26 | responseType: 'blob',
27 | timeout: 60000,
28 | }),
29 | };
30 | export default DebtorCreditLimitApiServices;
31 |
--------------------------------------------------------------------------------
/src/common/Drawer/_Drawer.scss:
--------------------------------------------------------------------------------
1 | .drawer-overlay {
2 | position: fixed;
3 | top: 0;
4 | left: 0;
5 | right: 0;
6 | bottom: 0;
7 | width: 100%;
8 | height: 100%;
9 | overflow: hidden;
10 | background-color: rgba(0, 0, 0, 0.25);
11 | background-blend-mode: screen;
12 | transition: all 0.3s ease-in-out;
13 | z-index: 10;
14 | }
15 |
16 | .drawer-container {
17 | position: fixed;
18 | top: 15px;
19 | right: 0;
20 | bottom: 0;
21 | width: 0;
22 | height: calc(100vh - 15px);
23 | background-color: white;
24 | border-radius: 10px 0 0 0;
25 | transition: all 0.5s ease-in-out;
26 | box-shadow: 0 0 30px #7272724d;
27 | overflow: hidden;
28 | z-index: 11;
29 | }
30 |
31 | .drawer-wrapper {
32 | min-width: 550px;
33 | }
34 |
35 | .drawer-opened {
36 | width: 550px;
37 | }
38 |
39 | .drawer-header-container {
40 | display: flex;
41 | align-items: center;
42 | justify-content: space-between;
43 | height: 60px;
44 | min-width: 100%;
45 | padding: 20px 40px 20px 20px;
46 | font: $h5 $font-medium;
47 | color: white;
48 | background-color: $primary-color;
49 |
50 | * {
51 | width: fit-content !important;
52 | overflow: hidden;
53 | white-space: nowrap;
54 | }
55 | }
56 |
57 | .close-drawer {
58 | padding: 3px;
59 | font-size: 14px;
60 | font-weight: 700;
61 | color: $primary-color;
62 | background-color: white;
63 | border-radius: 50%;
64 | cursor: pointer;
65 | }
66 |
67 | .drawer-content {
68 | max-height: calc(100vh - 75px);
69 | overflow-y: auto;
70 | }
71 |
--------------------------------------------------------------------------------
/src/screens/Users/services/UserManagementApiService.js:
--------------------------------------------------------------------------------
1 | import ApiService from '../../../services/api-service/ApiService';
2 | import { ORGANISATION_MODULE_URLS, USER_MANAGEMENT_URLS } from '../../../constants/UrlConstants';
3 |
4 | const UserManagementApiService = {
5 | getAllUserPrivileges: params =>
6 | ApiService.getData(USER_MANAGEMENT_URLS.USER_PRIVILEGES_URL, { params }),
7 | getUserColumnListName: () => ApiService.getData(USER_MANAGEMENT_URLS.USER_COLUMN_NAME_LIST_URL),
8 | getAllOrganisationModuleList: () =>
9 | ApiService.getData(ORGANISATION_MODULE_URLS.GET_ORGANIZATION_MODULE_LIST_URL),
10 | getSelectedUserData: id =>
11 | ApiService.getData(`${USER_MANAGEMENT_URLS.SELECTED_USER_DETAILS_URL}${id}`),
12 | getClientList: () => ApiService.getData(USER_MANAGEMENT_URLS.USER_CLIENT_LIST_URL),
13 | addNewUser: data => ApiService.postData(USER_MANAGEMENT_URLS.SELECTED_USER_DETAILS_URL, data),
14 | updateUser: (id, data) =>
15 | ApiService.putData(`${USER_MANAGEMENT_URLS.SELECTED_USER_DETAILS_URL}${id}`, data),
16 | deleteUser: id => ApiService.deleteData(`${USER_MANAGEMENT_URLS.SELECTED_USER_DETAILS_URL}${id}`),
17 | updateUserColumnListName: data =>
18 | ApiService.putData(USER_MANAGEMENT_URLS.UPDATE_USER_COLUMN_NAME_LIST_URL, data),
19 | getAllUserListByFilter: params =>
20 | ApiService.getData(USER_MANAGEMENT_URLS.USER_LIST_URL, { params }),
21 | resendMail: userId => ApiService.getData(`${USER_MANAGEMENT_URLS.RESEND_MAIL}${userId}`),
22 | };
23 |
24 | export default UserManagementApiService;
25 |
--------------------------------------------------------------------------------
/src/common/Accordion/_Accordion.scss:
--------------------------------------------------------------------------------
1 | .accordion-container {
2 | border-radius: 5px;
3 | }
4 |
5 | .accordion-item {
6 | margin-bottom: 10px;
7 | border-radius: 5px;
8 | }
9 |
10 | .accordion-item:last-child {
11 | margin-bottom: 0;
12 | }
13 |
14 | .accordion-item-header-container {
15 | display: flex;
16 | align-items: center;
17 | justify-content: space-between;
18 | color: $primary-color;
19 | padding: 8px 10px;
20 | background-color: $background-color;
21 | border-radius: 5px;
22 | cursor: pointer;
23 |
24 | span {
25 | font-size: 24px;
26 | font-weight: 500;
27 | transition: transform 0.3s ease-in-out;
28 | }
29 |
30 | label {
31 | margin-left: 10px;
32 | font: $subtitle $font-medium;
33 | }
34 | }
35 |
36 | .accordion-item-header-container:hover {
37 | background-color: #dbe3ec;
38 | }
39 |
40 | .accordion-body-container {
41 | max-height: 0;
42 | background-color: $background-color;
43 | border-radius: 5px;
44 | overflow: hidden;
45 | transition: all 0.5s ease-in-out;
46 |
47 | > *:first-child {
48 | margin-top: 10px;
49 | }
50 | }
51 |
52 | .active-accordion {
53 | max-height: 2000px;
54 | }
55 |
56 | .accordion-body-container.active-accordion {
57 | overflow: unset !important;
58 | }
59 |
60 | .rotate-icon {
61 | transform: rotate(180deg);
62 | }
63 |
64 | .accordion-item-count {
65 | margin-left: 10px;
66 | padding: 5px;
67 | font-size: $subtitle !important;
68 | color: white;
69 | background-color: $primary-color;
70 | border-radius: 5px;
71 | }
72 |
--------------------------------------------------------------------------------
/src/common/RadioButton/_RadioButton.scss:
--------------------------------------------------------------------------------
1 | /* completely hiding radio button */
2 | input[type='radio'] {
3 | display: none;
4 | }
5 |
6 | /* simulate radiobutton appearance using pseudo selector */
7 | input[type='radio'] + label:before {
8 | content: '';
9 | /* create custom radiobutton appearance */
10 | display: inline-block;
11 | height: 18px;
12 | width: 18px;
13 | min-height: 18px;
14 | min-width: 18px;
15 | padding: 3px;
16 | margin-right: 5px;
17 | /* background-color only for content */
18 | background-clip: content-box;
19 | border: 1px solid $placeholder-color;
20 | background-color: $placeholder-color;
21 | border-radius: 50%;
22 | }
23 |
24 | input[type='radio']:disabled ~ .radio-button {
25 | cursor: not-allowed;
26 |
27 | &:hover:before {
28 | border: 1px solid $border-color;
29 | background-color: #e7e6e7;
30 | }
31 | }
32 |
33 | /* appearance of checked radiobutton */
34 | input[type='radio']:checked + .radio-button:before, input[type='radio']:checked:disabled + .radio-button:before {
35 | background-color: $primary-color;
36 | border-color: $primary-color;
37 | }
38 |
39 | /* resetting default box-sizing */
40 | *,
41 | *:before,
42 | *:after {
43 | box-sizing: border-box;
44 | }
45 |
46 | /* optional styles for centering radio buttons */
47 | .radio-button {
48 | display: inline-flex;
49 | align-items: center;
50 | font-weight: 400;
51 | color: $field-color;
52 | cursor: pointer;
53 | }
54 |
55 | .radio-button:hover:before {
56 | background-color: $field-color;
57 | border-color: $field-color;
58 | }
--------------------------------------------------------------------------------
/src/screens/Overdues/OverduesList/_OverduesList.scss:
--------------------------------------------------------------------------------
1 | .react-select-container.overdue-month-picker {
2 | min-height: 47px;
3 | max-height: 47px;
4 | width: 200px;
5 | margin-right: 10px;
6 |
7 | .react-select__indicators {
8 | align-self: center;
9 | }
10 |
11 | .react-select__control {
12 | min-height: 47px;
13 | max-height: 47px;
14 | border-radius: 10px;
15 | }
16 | }
17 |
18 | .new-submission-modal {
19 | .date-picker-container,
20 | .react-select-container,
21 | .react-select-container .react-select__control {
22 | min-height: 47px;
23 | max-height: 47px;
24 | margin: 10px 0 10px 0;
25 | }
26 | }
27 |
28 | .overdue-download-modal {
29 | @extend .filter-modal;
30 | }
31 |
32 | .overdue-download-modal-row {
33 | display: flex;
34 | align-items: center;
35 | margin-bottom: 10px;
36 | gap: 0 20px;
37 | .title {
38 | font: $subtitle $font-regular;
39 | color: $primary-color;
40 | }
41 | }
42 |
43 | .overdue-filter-modal {
44 | .form-title {
45 | width: 215px;
46 | }
47 |
48 | .input-container,
49 | .date-picker-container {
50 | width: 200px;
51 | }
52 | }
53 |
54 | .expandable-table {
55 | tr:nth-child(1) td:first-child,
56 | tr:nth-child(1) td:last-child {
57 | border-radius: unset;
58 | }
59 | tbody tr {
60 | cursor: pointer;
61 | }
62 | tbody tr:hover {
63 | background-color: $primary-color-1-variant-color;
64 | td {
65 | color: black;
66 | }
67 | }
68 |
69 | tbody tr:last-child {
70 | border-bottom: 1px solid $background-color;
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/src/common/BigInput/BigInput.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import PropTypes from 'prop-types';
3 |
4 | const BigInput = React.forwardRef((props, ref) => {
5 | const {
6 | prefix,
7 | prefixClass,
8 | suffix,
9 | suffixClass,
10 | placeholder,
11 | type,
12 | borderClass,
13 | className,
14 | ...restProps
15 | } = props;
16 | const inputClass = `big-input ${className}`;
17 | const prefixClassName = `material-icons-round prefix ${prefixClass}`;
18 | const suffixClassName = `material-icons-round suffix ${suffixClass}`;
19 | const inputBorderClass = `big-input-container ${borderClass}`;
20 | return (
21 |
22 | {prefix && {prefix}}
23 |
31 | {suffix && {suffix}}
32 |
33 | );
34 | });
35 |
36 | BigInput.propTypes = {
37 | prefix: PropTypes.string,
38 | prefixClass: PropTypes.string,
39 | suffix: PropTypes.string,
40 | suffixClass: PropTypes.string,
41 | placeholder: PropTypes.string,
42 | type: PropTypes.string.isRequired,
43 | className: PropTypes.string,
44 | borderClass: PropTypes.string,
45 | };
46 |
47 | BigInput.defaultProps = {
48 | prefix: '',
49 | prefixClass: '',
50 | suffix: '',
51 | suffixClass: '',
52 | placeholder: '',
53 | className: '',
54 | borderClass: '',
55 | };
56 |
57 | export default BigInput;
58 |
--------------------------------------------------------------------------------
/src/common/Stepper/_Stepper.scss:
--------------------------------------------------------------------------------
1 | .stepper-container {
2 | display: flex;
3 | align-items: center;
4 | padding: 5px 15px;
5 | background-color: $primary-color-1;
6 | border-radius: 10px;
7 |
8 | .arrow {
9 | margin-right: 5px;
10 | color: $placeholder-color;
11 | }
12 | }
13 |
14 | .step-container {
15 | display: flex;
16 | align-items: center;
17 | }
18 |
19 | .step-container:first-child .arrow {
20 | display: none;
21 | }
22 |
23 | .step {
24 | display: flex;
25 | align-items: center;
26 | margin-right: 7px;
27 | padding: 15px;
28 | font: $title $font-medium;
29 | color: $placeholder-color;
30 | border-radius: 10px;
31 | overflow: hidden;
32 |
33 | span {
34 | font-weight: 400;
35 | margin-right: 10px;
36 | color: $placeholder-color;
37 | }
38 | }
39 |
40 | .selected-step {
41 | color: white;
42 | background-color: $primary-color;
43 | }
44 |
45 | .done-step {
46 | .step {
47 | background-color: $success-color;
48 | color: white;
49 | }
50 | span {
51 | color: white;
52 | }
53 | .arrow {
54 | color: $primary-color;
55 | }
56 | }
57 |
58 | .step-container.active-step {
59 | .step {
60 | color: white;
61 | background-color: $primary-color;
62 | span {
63 | color: white;
64 | }
65 | }
66 |
67 | .arrow {
68 | color: $primary-color;
69 | }
70 | }
71 | .step-content {
72 | width: 100%;
73 | margin-top: 10px;
74 | padding: 20px;
75 | background-color: white;
76 | border-radius: 10px;
77 | }
78 |
79 | .stepper-buttons-row {
80 | display: flex;
81 | justify-content: space-between;
82 | margin-top: 10px;
83 | }
84 |
--------------------------------------------------------------------------------
/src/common/Loader/_Loader.scss:
--------------------------------------------------------------------------------
1 | .loader-container {
2 | display: flex;
3 | align-items: center;
4 | justify-content: center;
5 | height: 200px;
6 | width: 100%;
7 | padding: 20px;
8 | }
9 |
10 | .loader,
11 | .loader:before,
12 | .loader:after {
13 | width: 1em;
14 | height: 4em;
15 | -webkit-animation: load1 1s infinite ease-in-out;
16 | animation: load1 1s infinite ease-in-out;
17 | }
18 | .loader:before {
19 | background-color: $primary-color;
20 | color: $primary-color;
21 | }
22 | .loader:after {
23 | background-color: $secondary-color;
24 | color: $secondary-color;
25 | }
26 | .loader {
27 | position: relative;
28 | text-indent: -9999em;
29 | margin: 88px auto;
30 | -webkit-transform: translateZ(0);
31 | -ms-transform: translateZ(0);
32 | transform: translateZ(0);
33 | -webkit-animation-delay: -0.16s;
34 | animation-delay: -0.16s;
35 | font-size: 11px;
36 | color: $primary-variant-color;
37 | background-color: $primary-variant-color;
38 | }
39 | .loader:before,
40 | .loader:after {
41 | position: absolute;
42 | top: 0;
43 | content: '';
44 | }
45 | .loader:before {
46 | left: -1.5em;
47 | -webkit-animation-delay: -0.32s;
48 | animation-delay: -0.32s;
49 | }
50 | .loader:after {
51 | left: 1.5em;
52 | }
53 | @-webkit-keyframes load1 {
54 | 0%,
55 | 80%,
56 | 100% {
57 | box-shadow: 0 0;
58 | height: 4em;
59 | }
60 | 40% {
61 | box-shadow: 0 -2em;
62 | height: 5em;
63 | }
64 | }
65 | @keyframes load1 {
66 | 0%,
67 | 80%,
68 | 100% {
69 | box-shadow: 0 0;
70 | height: 4em;
71 | }
72 | 40% {
73 | box-shadow: 0 -2em;
74 | height: 5em;
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/src/common/Tab/_Tab.scss:
--------------------------------------------------------------------------------
1 | .tab-wrapper {
2 | position: relative;
3 | width: 100%;
4 | overflow-x: hidden;
5 | overflow-y: hidden;
6 | border-radius: 10px;
7 | }
8 |
9 | .tab-container {
10 | display: flex;
11 | align-items: center;
12 | width: 100%;
13 | padding: 7px 10px;
14 | background-color: $primary-color-1;
15 | overflow: hidden;
16 | -webkit-overflow-scrolling: touch;
17 | }
18 |
19 | .tab {
20 | margin-right: 10px;
21 | padding: 15px;
22 | font: $title $font-medium;
23 | color: $field-color;
24 | white-space: nowrap;
25 | border-radius: 10px;
26 | cursor: pointer;
27 | }
28 |
29 | .tab:last-child {
30 | margin-right: 0;
31 | }
32 |
33 | .active-tab {
34 | color: white;
35 | background-color: $primary-color;
36 | }
37 |
38 | .tab-content-header-row {
39 | display: flex;
40 | justify-content: space-between;
41 | align-items: center;
42 | width: 100%;
43 | margin-bottom: 20px;
44 | }
45 |
46 | .tab:hover:not(.active-tab) {
47 | color: $primary-color;
48 | }
49 |
50 | .tab-prev-next-button {
51 | position: absolute;
52 | top: 0;
53 | bottom: 0;
54 | display: flex;
55 | align-items: center;
56 | justify-content: center;
57 | height: 100%;
58 | color: #ffffff;
59 | background-color: $primary-color;
60 | cursor: pointer;
61 | }
62 |
63 | .tab-prev-button {
64 | left: 0;
65 | border-right: 1px solid $background-color;
66 | }
67 |
68 | .tab-next-button {
69 | right: 0;
70 | border-left: 1px solid $background-color;
71 | }
72 |
73 | .hidden-tab-paddle {
74 | display: none;
75 | }
76 |
77 | .dummy-tab-div {
78 | height: 50px;
79 | width: 50px;
80 | padding: 0 10px;
81 | }
82 |
--------------------------------------------------------------------------------
/src/screens/Application/services/ApplicationApiServices.js:
--------------------------------------------------------------------------------
1 | import ApiService from '../../../services/api-service/ApiService';
2 | import { APPLICATION_URLS } from '../../../constants/UrlConstants';
3 |
4 | const ApplicationApiServices = {
5 | getApplicationListByFilter: params =>
6 | ApiService.getData(APPLICATION_URLS.APPLICATION_LIST_URL, { params }),
7 | getApplicationColumnNameList: () =>
8 | ApiService.getData(APPLICATION_URLS.APPLICATION_COLUMN_NAME_LIST_URL),
9 | updateApplicationColumnNameList: data =>
10 | ApiService.putData(APPLICATION_URLS.APPLICATION_COLUMN_NAME_LIST_UPDATE_URL, data),
11 | getApplicationFilter: () => ApiService.getData(APPLICATION_URLS.APPLICATION_FILTER_LIST_URL),
12 | deleteApplication: (id, params) =>
13 | ApiService.deleteData(`${APPLICATION_URLS.APPLICATION_LIST_URL}${id}`, {
14 | params,
15 | }),
16 | saveApplicationStepDataToBackend: data =>
17 | ApiService.putData(`${APPLICATION_URLS.APPLICATION_SAVE_STEP_DATA}`, data),
18 | getApplicationDetail: appId =>
19 | ApiService.getData(`${APPLICATION_URLS.GET_APPLICATION_DETAILS_URL}${appId}`),
20 | downloadApplicationList: params =>
21 | ApiService.request({
22 | url: `${APPLICATION_URLS.DOWNLOAD_APPLICATION}`,
23 | params,
24 | method: 'GET',
25 | responseType: 'blob',
26 | timeout: 60000,
27 | }),
28 | downloadDocument: params =>
29 | ApiService.request({
30 | url: `${APPLICATION_URLS.VIEW_APPLICATION.DOWNLOAD_DOCUMENTS_URL}`,
31 | params,
32 | method: 'GET',
33 | responseType: 'blob',
34 | timeout: 60000,
35 | }),
36 | };
37 | export default ApplicationApiServices;
38 |
--------------------------------------------------------------------------------
/src/common/Header/services/HeaderApiService.js:
--------------------------------------------------------------------------------
1 | import ApiService from '../../../services/api-service/ApiService';
2 | import { HEADER_URLS } from '../../../constants/UrlConstants';
3 |
4 | const HeaderApiService = {
5 | loggedUserDetails: () => ApiService.getData(HEADER_URLS.LOGGED_USER_DETAILS_URL),
6 | updateUserProfile: data => ApiService.putData(HEADER_URLS.LOGGED_USER_DETAILS_URL, data),
7 | uploadUserProfilePicture: (data, config) =>
8 | ApiService.postData(HEADER_URLS.UPLOAD_PROFILE_PICTURE, data, config),
9 | removeProfilePicture: () => ApiService.deleteData(HEADER_URLS.DELETE_PROFILE_PICTURE),
10 | changePassword: data => ApiService.putData(HEADER_URLS.CHANGE_PASSWORD_URL, data),
11 | logoutUser: () => ApiService.deleteData(HEADER_URLS.LOGOUT_URL),
12 |
13 | notificationApiServices: {
14 | getHeaderNotificationList: params =>
15 | ApiService.getData(HEADER_URLS.HEADER_NOTIFICATIONS.GET_HEADER_NOTIFICATION_LIST_URL, {
16 | params,
17 | }),
18 | markNotificationAsReadAndDelete: notificationId =>
19 | ApiService.putData(
20 | `${HEADER_URLS.HEADER_NOTIFICATIONS.MARK_AS_READ_NOTIFICATION_URL}${notificationId}`
21 | ),
22 | getNotificationAlertsDetails: id =>
23 | ApiService.getData(`${HEADER_URLS.HEADER_NOTIFICATIONS.NOTIFICATION_ALERTS_DETAILS}${id}`),
24 | markAllAsRead: () =>
25 | ApiService.getData(HEADER_URLS.HEADER_NOTIFICATIONS.MARK_ALL_NOTIFICATIONS_AS_READ),
26 | },
27 |
28 | globalSearchApiServices: {
29 | getGlobalSearchData: params =>
30 | ApiService.getData(`${HEADER_URLS.HEADER_GLOBAL_SEARCH}`, { params }),
31 | },
32 | };
33 |
34 | export default HeaderApiService;
35 |
--------------------------------------------------------------------------------
/src/screens/auth/otpScreen/redux/VerifyOtpAction.js:
--------------------------------------------------------------------------------
1 | import AuthApiService from '../../services/AuthApiService';
2 | import { successNotification } from '../../../../common/Toast';
3 | import {
4 | startGeneralLoaderOnRequest,
5 | stopGeneralLoaderOnSuccessOrFail,
6 | } from '../../../../common/GeneralLoader/redux/GeneralLoaderAction';
7 | import { displayErrors } from '../../../../helpers/ErrorNotifyHelper';
8 |
9 | export const verifyOtp = async (email, verificationOtp) => {
10 | try {
11 | startGeneralLoaderOnRequest('verifyOTPButtonLoaderAction');
12 |
13 | const data = { email, verificationOtp };
14 | const response = await AuthApiService.verifyOtp(data);
15 |
16 | if (response?.data?.status === 'SUCCESS') {
17 | const { token } = response.data;
18 | successNotification('OTP verified successfully.');
19 | stopGeneralLoaderOnSuccessOrFail('verifyOTPButtonLoaderAction');
20 | return token;
21 | }
22 |
23 | return null;
24 | } catch (e) {
25 | displayErrors(e);
26 | stopGeneralLoaderOnSuccessOrFail('verifyOTPButtonLoaderAction');
27 | throw Error();
28 | }
29 | };
30 |
31 | export const resendOtp = async email => {
32 | try {
33 | startGeneralLoaderOnRequest('resendOTPButtonLoaderAction');
34 | const data = { email };
35 | const response = await AuthApiService.resentOtp(data);
36 |
37 | if (response?.data?.status === 'SUCCESS') {
38 | successNotification('OTP sent successfully.');
39 | stopGeneralLoaderOnSuccessOrFail('resendOTPButtonLoaderAction');
40 | }
41 | } catch (e) {
42 | stopGeneralLoaderOnSuccessOrFail('resendOTPButtonLoaderAction');
43 | displayErrors(e);
44 | throw Error();
45 | }
46 | };
47 |
--------------------------------------------------------------------------------
/src/screens/Settings/Settings.js:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from 'react';
2 | import { useSelector } from 'react-redux';
3 | import Tab from '../../common/Tab/Tab';
4 | import SettingsDocumentTypeTab from './Components/SettingsDocumentTypeTab';
5 | import SettingsApiIntegrationTab from './Components/SettingsApiIntegrationTab';
6 | import SettingsOrganizationDetailsTab from './Components/SettingsOrganizationDetailsTab';
7 | import SettingsAuditLogTab from './Components/SettingsAuditLogTab';
8 | import { setSettingActiveTabIndex } from './redux/SettingAction';
9 |
10 | const Settings = () => {
11 | const settingsTabs = ['Document Type', 'API Integration', 'Organization Details', 'Audit log'];
12 | const settingsTabContent = [
13 | ,
14 | ,
15 | ,
16 | ,
17 | ];
18 | const [activeTabIndex, setActiveTabIndex] = useState(0);
19 | const tabActive = index => {
20 | setSettingActiveTabIndex(index);
21 | setActiveTabIndex(index);
22 | };
23 |
24 | const settingTabActiveIndex = useSelector(
25 | ({ settingReducer }) => settingReducer?.settingTabActiveIndex ?? 0
26 | );
27 |
28 | useEffect(() => {
29 | return () => setSettingActiveTabIndex(0);
30 | }, []);
31 |
32 | useEffect(() => {
33 | tabActive(settingTabActiveIndex);
34 | }, [settingTabActiveIndex]);
35 |
36 | return (
37 | <>
38 |
44 | {settingsTabContent[activeTabIndex]}
45 | >
46 | );
47 | };
48 |
49 | export default Settings;
50 |
--------------------------------------------------------------------------------
/src/common/SideMenu/SideMenu.js:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useMemo } from 'react';
2 | import { NavLink } from 'react-router-dom';
3 | import { useDispatch, useSelector } from 'react-redux';
4 | import logo from '../../assets/images/logo.svg';
5 | import { SIDEBAR_URLS } from '../../constants/SidebarConstants';
6 | import { getAllUserPrivileges } from '../../screens/Users/redux/UserManagementAction';
7 | import { SESSION_VARIABLES } from '../../constants/SessionStorage';
8 |
9 | const SideMenu = () => {
10 | const dispatch = useDispatch();
11 |
12 | const userPrivilegesData = useSelector(({ userPrivileges }) => userPrivileges);
13 | const userAccessibleMenu = useMemo(() => {
14 | let accessibleModules =
15 | userPrivilegesData?.filter(module => module.accessTypes.length > 0) ?? [];
16 | accessibleModules =
17 | SIDEBAR_URLS.filter(e =>
18 | accessibleModules?.some(
19 | f => e.name === f.name || e.name === 'myWork' || e.name === 'alerts'
20 | )
21 | ) ?? [];
22 |
23 | return accessibleModules;
24 | }, [userPrivilegesData]);
25 |
26 | useEffect(() => {
27 | dispatch(getAllUserPrivileges());
28 | }, [SESSION_VARIABLES.USER_TOKEN]);
29 |
30 | return (
31 |
32 |
33 |

34 |
35 |
36 | {userAccessibleMenu.map(item => (
37 |
38 | {item.icon}
39 | {item.label}
40 |
41 | ))}
42 |
43 |
44 | );
45 | };
46 |
47 | export default SideMenu;
48 |
--------------------------------------------------------------------------------
/src/common/IconButton/IconButton.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import PropTypes from 'prop-types';
3 |
4 | const IconButton = props => {
5 | const {
6 | isLoading,
7 | isBadge,
8 | badgeCount,
9 | title,
10 | buttonType,
11 | iconColor,
12 | className,
13 | buttonTitle,
14 | disabled,
15 | ...restProps
16 | } = props;
17 | const buttonClass = `button ${buttonType}-button icon-button ${className}`;
18 |
19 | return (
20 |
34 | );
35 | };
36 |
37 | IconButton.propTypes = {
38 | title: PropTypes.string.isRequired,
39 | buttonType: PropTypes.oneOf([
40 | 'primary',
41 | 'secondary',
42 | 'success',
43 | 'primary-1',
44 | 'outlined-primary',
45 | 'outlined-secondary',
46 | 'outlined-red',
47 | 'outlined-bg',
48 | ]).isRequired,
49 | className: PropTypes.string,
50 | iconColor: PropTypes.string,
51 | buttonTitle: PropTypes.string,
52 | isLoading: PropTypes.bool,
53 | isBadge: PropTypes.bool,
54 | badgeCount: PropTypes.number,
55 | disabled: PropTypes.bool,
56 | };
57 |
58 | IconButton.defaultProps = {
59 | className: '',
60 | iconColor: '',
61 | buttonTitle: '',
62 | isLoading: false,
63 | isBadge: false,
64 | badgeCount: 0,
65 | disabled: false,
66 | };
67 |
68 | export default IconButton;
69 |
--------------------------------------------------------------------------------
/src/screens/Claims/components/ClaimsTabContainer.js:
--------------------------------------------------------------------------------
1 | import { useSelector } from 'react-redux';
2 | import { useCallback, useMemo, useState } from 'react';
3 | import Tab from '../../../common/Tab/Tab';
4 | import ClaimsDocumentsTab from './ClaimsDocumentsTab';
5 |
6 | const CLAIMS_TABS_CONSTANTS = [
7 | { label: 'Documents', component: , name: 'document' },
8 | ];
9 |
10 | const ClaimsTabContainer = () => {
11 | const [activeTabIndex, setActiveTabIndex] = useState(0);
12 | const tabActive = index => {
13 | // setViewDebtorActiveTabIndex(index);
14 | setActiveTabIndex(index);
15 | };
16 | const userPrivilegesData = useSelector(({ userPrivileges }) => userPrivileges);
17 |
18 | const checkAccess = useCallback(
19 | accessFor => {
20 | const availableAccess =
21 | userPrivilegesData.filter(module => module.accessTypes.length > 0) ?? [];
22 | const isAccessible = availableAccess.filter(module => module?.name === accessFor);
23 | return isAccessible?.length > 0;
24 | },
25 | [userPrivilegesData]
26 | );
27 |
28 | const finalTabs = useMemo(() => {
29 | const tabs = [];
30 | CLAIMS_TABS_CONSTANTS.forEach(tab => {
31 | if (checkAccess(tab.name)) {
32 | tabs.push(tab);
33 | }
34 | });
35 | return tabs ?? [];
36 | }, [CLAIMS_TABS_CONSTANTS, checkAccess]);
37 |
38 | // tabs end
39 | return (
40 | <>
41 | tab?.label)}
43 | tabActive={tabActive}
44 | activeTabIndex={activeTabIndex}
45 | className="mt-15"
46 | />
47 | {finalTabs?.[activeTabIndex]?.component}
48 | >
49 | );
50 | };
51 |
52 | export default ClaimsTabContainer;
53 |
--------------------------------------------------------------------------------
/src/screens/Debtors/services/DebtorsApiServices.js:
--------------------------------------------------------------------------------
1 | import ApiService from '../../../services/api-service/ApiService';
2 | import { DEBTORS_URLS } from '../../../constants/UrlConstants';
3 |
4 | const DebtorsApiServices = {
5 | getAllDebtorsList: params => ApiService.getData(DEBTORS_URLS.DEBTORS_LIST_URL, { params }),
6 | getDebtorsColumnNameList: params =>
7 | ApiService.getData(DEBTORS_URLS.DEBTORS_COLUMNS_NAME_LIST_URL, { params }),
8 | updateDebtorsColumnNameList: data =>
9 | ApiService.putData(DEBTORS_URLS.DEBTORS_COLUMNS_NAME_LIST_URL, data),
10 | getDebtorDetailById: id =>
11 | ApiService.getData(`${DEBTORS_URLS.SELECTED_DEBTOR_DETAILS_BY_ID_URL}${id}`),
12 | getDebtorDetail: debtorId =>
13 | ApiService.getData(`${DEBTORS_URLS.SELECTED_DEBTOR_DETAILS_URL}${debtorId}`),
14 | getDebtorDropdownDataList: () => ApiService.getData(DEBTORS_URLS.DROP_DOWN_DATA_URL),
15 | updateDebtorDetailById: (id, data) =>
16 | ApiService.putData(`${DEBTORS_URLS.SELECTED_DEBTOR_DETAILS_URL}${id}`, data),
17 | getDebtorFilter: () => ApiService.getData(DEBTORS_URLS.DROP_DOWN_DATA_URL),
18 | downloadDebtorList: params =>
19 | ApiService.request({
20 | url: `${DEBTORS_URLS.DOWNLOAD_DEBTOR}`,
21 | params,
22 | method: 'GET',
23 | responseType: 'blob',
24 | timeout: 60000,
25 | }),
26 | debtorReportsApi: {
27 | downloadDebtorReport: id =>
28 | ApiService.request({
29 | url: `${DEBTORS_URLS.REPORTS.DOWNLOAD_REPORTS_FOR_DEBTOR}${id}`,
30 | method: 'GET',
31 | responseType: 'blob',
32 | timeout: 60000,
33 | }),
34 | },
35 | saveDebtorStepDataToBackend: data =>
36 | ApiService.putData(`${DEBTORS_URLS.DEBTORS_SAVE_STEP_DATA}`, data),
37 | };
38 | export default DebtorsApiServices;
39 |
--------------------------------------------------------------------------------
/src/screens/Dashboard/redux/DashboardAction.js:
--------------------------------------------------------------------------------
1 | import { DashboardApiService } from '../services/DashboardApiService';
2 | import { DASHBOARD_REDUX_CONSTANTS } from './DashboardReduxConstants';
3 | import { displayErrors } from '../../../helpers/ErrorNotifyHelper';
4 | import {
5 | startGeneralLoaderOnRequest,
6 | stopGeneralLoaderOnSuccessOrFail,
7 | } from '../../../common/GeneralLoader/redux/GeneralLoaderAction';
8 |
9 | export const getDashboardUserList = () => {
10 | return async dispatch => {
11 | try {
12 | const response = await DashboardApiService.getDashboardUserList();
13 | if (response?.data?.status === 'SUCCESS') {
14 | dispatch({
15 | type: DASHBOARD_REDUX_CONSTANTS.DASHBOARD_USER_LIST_DETAILS,
16 | data: response.data.data,
17 | });
18 | }
19 | } catch (e) {
20 | displayErrors(e);
21 | }
22 | };
23 | };
24 |
25 | export const getDashboardDetails = param => {
26 | return async dispatch => {
27 | const params = { users: param };
28 | try {
29 | startGeneralLoaderOnRequest('dashboardDetailsLoader');
30 | const response = await DashboardApiService.getDashboardDetails(params);
31 | if (response?.data?.status === 'SUCCESS') {
32 | dispatch({
33 | type: DASHBOARD_REDUX_CONSTANTS.DASHBOARD_DETAILS,
34 | data: response.data.data,
35 | });
36 | stopGeneralLoaderOnSuccessOrFail('dashboardDetailsLoader');
37 | }
38 | } catch (e) {
39 | stopGeneralLoaderOnSuccessOrFail('dashboardDetailsLoader');
40 | displayErrors(e);
41 | }
42 | };
43 | };
44 |
45 | export const resetDashboardDetails = () => {
46 | return dispatch => {
47 | dispatch({
48 | type: DASHBOARD_REDUX_CONSTANTS.RESET_DASHBOARD_DETAILS,
49 | });
50 | };
51 | };
52 |
--------------------------------------------------------------------------------
/src/screens/MyWork/services/MyWorkApiServices.js:
--------------------------------------------------------------------------------
1 | import ApiService from '../../../services/api-service/ApiService';
2 | import { MY_WORK_URL } from '../../../constants/UrlConstants';
3 |
4 | const MyWorkApiServices = {
5 | getTaskListData: params => ApiService.getData(MY_WORK_URL.TASK.TASK_LIST_URL, { params }),
6 | getAssigneeDropDownData: () => ApiService.getData(MY_WORK_URL.TASK.ASSIGNEE_DROP_DOWN_DATA),
7 | getEntityDropDownData: params =>
8 | ApiService.getData(MY_WORK_URL.TASK.ENTITY_DROP_DOWN_DATA, { params }),
9 | saveNewTask: data => ApiService.postData(MY_WORK_URL.TASK.SAVE_NEW_TASK, data),
10 | getColumnNameList: params =>
11 | ApiService.getData(MY_WORK_URL.TASK.COLUMN_NAME_LIST_URL, { params }),
12 | saveColumnNameList: data => ApiService.putData(MY_WORK_URL.TASK.COLUMN_NAME_LIST_URL, data),
13 | getTaskFilterListData: () => ApiService.getData(MY_WORK_URL.TASK.ASSIGNEE_DROP_DOWN_DATA),
14 | deleteTask: taskId => ApiService.deleteData(`${MY_WORK_URL.TASK.TASK_LIST_URL}${taskId}`),
15 | getTaskDetailById: id => ApiService.getData(`${MY_WORK_URL.TASK.TASK_DETAIL_BY_ID_URL}${id}`),
16 | updateTask: (id, data) => ApiService.putData(`${MY_WORK_URL.TASK.UPDATE_TASK}${id}`, data),
17 | downloadTask: params =>
18 | ApiService.request({
19 | url: MY_WORK_URL.TASK.DOWNLOAD_TASK,
20 | params,
21 | method: 'GET',
22 | responseType: 'blob',
23 | timeout: 60000,
24 | }),
25 |
26 | notification: {
27 | getMyWorkNotificationListData: params =>
28 | ApiService.getData(MY_WORK_URL.MY_WORK_NOTIFICATION.MY_WORK_NOTIFICATION_LIST, { params }),
29 | deleteMyWorkNotificationData: id =>
30 | ApiService.deleteData(`${MY_WORK_URL.MY_WORK_NOTIFICATION.MY_WORK_DELETE_NOTIFICATION}${id}`),
31 | },
32 | };
33 | export default MyWorkApiServices;
34 |
--------------------------------------------------------------------------------
/src/common/Drawer/Drawer.js:
--------------------------------------------------------------------------------
1 | import PropTypes from 'prop-types';
2 | import React, { useRef } from 'react';
3 | import { useOnClickOutside } from '../../hooks/UserClickOutsideHook';
4 |
5 | const Drawer = props => {
6 | const { drawerState, closeDrawer, header, className, children, onDrawerScroll, ...restProps } =
7 | props;
8 | const drawerMenuRef = useRef();
9 | useOnClickOutside(drawerMenuRef, () => {
10 | if (drawerState) closeDrawer();
11 | });
12 | const drawerClasses = `drawer-container ${drawerState ? 'drawer-opened' : ''} ${className}`;
13 |
14 | return (
15 | <>
16 |
17 |
18 |
19 |
20 | {header}
21 |
26 | close
27 |
28 |
29 |
30 | {children}
31 |
32 |
33 |
34 | >
35 | );
36 | };
37 |
38 | Drawer.propTypes = {
39 | header: PropTypes.oneOfType([PropTypes.element, PropTypes.string]),
40 | className: PropTypes.string,
41 | children: PropTypes.element,
42 | drawerState: PropTypes.bool,
43 | closeDrawer: PropTypes.func,
44 | onDrawerScroll: PropTypes.func,
45 | };
46 |
47 | Drawer.defaultProps = {
48 | header: null,
49 | className: '',
50 | drawerState: false,
51 | children: null,
52 | closeDrawer: () => {},
53 | onDrawerScroll: () => {},
54 | };
55 |
56 | export default Drawer;
57 |
--------------------------------------------------------------------------------
/src/screens/Application/ImportApplication/Components/ImportApplicationValidateStep/ImportApplicationValidateStep.js:
--------------------------------------------------------------------------------
1 | import React, { useMemo } from 'react';
2 | import Tooltip from 'rc-tooltip';
3 | import { useSelector } from 'react-redux';
4 | import Table from '../../../../../common/Table/Table';
5 |
6 | const ImportApplicationValidateStep = () => {
7 | const { docs, headers, toBeProcessedApplicationCount } = useSelector(
8 | ({ application }) => application?.importApplication?.importData ?? {}
9 | );
10 | const ReasonColumn = useMemo(
11 | () => [
12 | data => (
13 |
14 | {data?.reason ?? 'No value'}}
18 | placement="topLeft"
19 | >
20 | error
21 |
22 |
23 | ),
24 | ],
25 | []
26 | );
27 | return (
28 |
29 |
30 |
{`To Be Processed : ${
31 | toBeProcessedApplicationCount ?? 0
32 | }`}
33 |
{`Rejected : ${docs?.length ?? 0}`}
34 |
35 | {docs?.length > 0 && (
36 |
46 | )}
47 |
48 | );
49 | };
50 |
51 | export default ImportApplicationValidateStep;
52 |
--------------------------------------------------------------------------------
/src/screens/Application/ImportApplication/Components/ImportApplicationABNLookUpStep/ImportApplicationABNLookUpStep.js:
--------------------------------------------------------------------------------
1 | import React, { useMemo } from 'react';
2 | import Tooltip from 'rc-tooltip';
3 | import { useSelector } from 'react-redux';
4 | import Table from '../../../../../common/Table/Table';
5 |
6 | const ImportApplicationABNLookUpStep = () => {
7 | const { docs, headers, toBeProcessedApplicationCount } = useSelector(
8 | ({ application }) => application?.importApplication?.importData ?? {}
9 | );
10 | const ReasonColumn = useMemo(
11 | () => [
12 | data => (
13 |
14 | {data?.reason ?? 'No value'}}
18 | placement="topLeft"
19 | >
20 | error
21 |
22 |
23 | ),
24 | ],
25 | []
26 | );
27 | return (
28 |
29 |
30 |
{`To Be Processed : ${
31 | toBeProcessedApplicationCount ?? 0
32 | }`}
33 |
{`Rejected : ${docs?.length ?? 0}`}
34 |
35 | {docs?.length > 0 && (
36 |
47 | )}
48 |
49 | );
50 | };
51 |
52 | export default ImportApplicationABNLookUpStep;
53 |
--------------------------------------------------------------------------------
/src/common/Pagination/_Pagination.scss:
--------------------------------------------------------------------------------
1 | .pagination-container {
2 | display: flex;
3 | align-items: center;
4 | justify-content: space-between;
5 | width: 100%;
6 | padding: 1.25rem;
7 | background-color: #ffffff;
8 | .react-dropdown-select {
9 | height: 35px !important;
10 | }
11 | }
12 |
13 | .pagination-container .react-select__control {
14 | height: 35px !important;
15 | width: 80px !important;
16 | .react-select__value-container {
17 | font: $title $font-medium !important;
18 | }
19 | }
20 |
21 | .records-per-page-container {
22 | display: flex;
23 | align-items: center;
24 | font: $title $font-medium;
25 | color: $placeholder-color;
26 | }
27 |
28 | .pagination {
29 | display: flex;
30 | align-items: center;
31 | font: $title $font-medium;
32 | color: $placeholder-color;
33 | }
34 |
35 | .page-handler {
36 | display: flex;
37 | height: 2.188rem;
38 | border: 0.063rem solid $border-color;
39 | }
40 |
41 | .first-page,
42 | .last-page,
43 | .prev-page,
44 | .next-page,
45 | .page-number {
46 | display: flex;
47 | align-items: center;
48 | justify-content: center;
49 | height: 100%;
50 | min-width: 2.188rem;
51 | padding: 0 10px;
52 | cursor: pointer;
53 |
54 | span {
55 | font-size: $title;
56 | color: $field-color;
57 | }
58 |
59 | :disabled {
60 | cursor: not-allowed !important;
61 | }
62 | }
63 |
64 | .pagination-button-disabled {
65 | cursor: not-allowed;
66 | }
67 |
68 | .first-page span,
69 | .last-page span {
70 | font-size: $h5;
71 | }
72 |
73 | .first-page span {
74 | transform: rotate(180deg);
75 | }
76 |
77 | .page-number {
78 | font-size: $title;
79 | color: $field-color;
80 | border-left: 0.063rem solid $border-color;
81 | border-right: 0.063rem solid $border-color;
82 | cursor: text;
83 | }
84 |
85 | .pagination-button-disabled span {
86 | color: $border-color;
87 | }
88 |
--------------------------------------------------------------------------------
/src/common/Modal/FilterModal/FilterModal.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import PropTypes from 'prop-types';
3 | import Modal from '../Modal';
4 | import Checkbox from '../../Checkbox/Checkbox';
5 |
6 | const FilterModal = props => {
7 | const { defaultFields, customFields, buttons, onChangeSelectedColumn, hideModal } = props;
8 |
9 | return (
10 |
17 |
18 |
19 |
Default Fields
20 | {defaultFields.map(data => (
21 |
onChangeSelectedColumn('defaultFields', data.name, e.target.checked)}
26 | />
27 | ))}
28 |
29 |
30 |
Custom Fields
31 | {customFields.map(data => (
32 |
onChangeSelectedColumn('customFields', data.name, e.target.checked)}
36 | />
37 | ))}
38 |
39 |
40 |
41 | );
42 | };
43 |
44 | FilterModal.propTypes = {
45 | customFields: PropTypes.array,
46 | defaultFields: PropTypes.array,
47 | buttons: PropTypes.array,
48 | onChangeSelectedColumn: PropTypes.func,
49 | hideModal: PropTypes.func.isRequired,
50 | };
51 |
52 | FilterModal.defaultProps = {
53 | customFields: [],
54 | defaultFields: [],
55 | buttons: [],
56 | onChangeSelectedColumn: () => {},
57 | };
58 |
59 | export default FilterModal;
60 |
--------------------------------------------------------------------------------
/src/screens/Users/redux/UserManagementReduxConstants.js:
--------------------------------------------------------------------------------
1 | export const USER_MANAGEMENT_REDUX_CONSTANTS = {
2 | USER_MANAGEMENT_LIST_USER_ACTION: 'USER_MANAGEMENT_LIST_USER_ACTION',
3 | FETCH_USER_MANAGEMENT_LIST_REQUEST: 'FETCH_USER_MANAGEMENT_LIST_REQUEST',
4 | FETCH_USER_MANAGEMENT_LIST_SUCCESS: 'FETCH_USER_MANAGEMENT_LIST_SUCCESS',
5 | FETCH_USER_MANAGEMENT_LIST_FAILURE: 'FETCH_USER_MANAGEMENT_LIST_FAILURE',
6 | RESET_USERLIST_PAGINATION_DATA: 'RESET_USERLIST_PAGINATION_DATA',
7 | RESET_USER_LIST_DATA: 'RESET_USER_LIST_DATA',
8 | PRIVILEGES: {
9 | GET_ALL_USER_PRIVILEGES: 'GET_ALL_USER_PRIVILEGES',
10 | UPDATE_USER_PRIVILEGE: 'UPDATE_USER_PRIVILEGE',
11 | },
12 | };
13 |
14 | export const USER_MANAGEMENT_COLUMN_LIST_REDUX_CONSTANTS = {
15 | USER_MANAGEMENT_COLUMN_LIST_ACTION: 'USER_MANAGEMENT_COLUMN_LIST_ACTION',
16 | USER_MANAGEMENT_DEFAULT_COLUMN_LIST_ACTION: 'USER_MANAGEMENT_DEFAULT_COLUMN_LIST_ACTION',
17 | UPDATE_USER_MANAGEMENT_COLUMN_LIST_ACTION: 'UPDATE_USER_MANAGEMENT_COLUMN_LIST_ACTION',
18 | };
19 |
20 | export const USER_MANAGEMENT_CLIENT_LIST_REDUX_CONSTANTS = {
21 | USER_MANAGEMENT_CLIENT_LIST_ACTION: 'USER_MANAGEMENT_CLIENT_LIST_ACTION',
22 | };
23 |
24 | export const USER_MANAGEMENT_CRUD_REDUX_CONSTANTS = {
25 | USER_MANAGEMENT_GET_USER_ACTION: 'USER_MANAGEMENT_GET_USER_ACTION',
26 | USER_MANAGEMENT_UPDATE_USER_ACTION: 'USER_MANAGEMENT_UPDATE_USER_ACTION',
27 | USER_MANAGEMENT_CHANGE_MANAGE_ACCESS_USER_ACTION:
28 | 'USER_MANAGEMENT_CHANGE_MANAGE_ACCESS_USER_ACTION',
29 | USER_MANAGEMENT_UPDATE_DUPLICATE_MODULE_ACCESS: 'USER_MANAGEMENT_UPDATE_DUPLICATE_MODULE_ACCESS',
30 | USER_MANAGEMENT_UNDO_SELECTED_USER_DATA_ON_CLOSE:
31 | 'USER_MANAGEMENT_UNDO_SELECTED_USER_DATA_ON_CLOSE',
32 | RESET_VIEW_USER_DATA: 'RESET_VIEW_USER_DATA',
33 | };
34 |
35 | export const ORGANISATION_MODULE_REDUX_CONSTANTS = {
36 | GET_ORGANISATION_MODULE_REDUX_ACTION: 'GET_ORGANISATION_MODULE_REDUX_ACTION',
37 | };
38 |
--------------------------------------------------------------------------------
/src/screens/MyWork/redux/MyWorkReduxConstants.js:
--------------------------------------------------------------------------------
1 | export const MY_WORK_REDUX_CONSTANTS = {
2 | MY_WORK_TASK_REDUX_CONSTANTS: {
3 | GET_TASK_LIST_SUCCESS_ACTION: 'GET_TASK_LIST_SUCCESS_ACTION',
4 | TASK_COLUMN_NAME_LIST_ACTION: 'TASK_COLUMN_NAME_LIST_ACTION',
5 | TASK_DEFAULT_COLUMN_NAME_LIST_ACTION: 'TASK_DEFAULT_COLUMN_NAME_LIST_ACTION',
6 | UPDATE_TASK_COLUMN_NAME_LIST_ACTION: 'UPDATE_TASK_COLUMN_NAME_LIST_ACTION',
7 | ASSIGNEE_DROP_DOWN_DATA_FOR_FILTER: 'ASSIGNEE_DROP_DOWN_DATA_FOR_FILTER',
8 | RESET_MY_WORK_TASK_PAGINATION_DATA: 'RESET_MY_WORK_TASK_PAGINATION_DATA',
9 | RESET_MY_WORK_TASK_DATA: 'RESET_MY_WORK_TASK_DATA',
10 |
11 | // ADD new task
12 | MY_WORK_UPDATE_ADD_TASK_FIELD_ACTION: 'MY_WORK_UPDATE_ADD_TASK_FIELD_ACTION',
13 | MY_WORK_ASSIGNEE_DROP_DOWN_DATA_ACTION: 'MY_WORK_ASSIGNEE_DROP_DOWN_DATA_ACTION',
14 | MY_WORK_ENTITY_DROP_DOWN_DATA_ACTION: 'MY_WORK_ENTITY_DROP_DOWN_DATA_ACTION',
15 | RESET_ADD_TASK_STATE_ACTION: 'RESET_ADD_TASK_STATE_ACTION',
16 | RESET_MY_WORK_ADD_TASK_ENTITY_ID: 'RESET_MY_WORK_ADD_TASK_ENTITY_ID',
17 |
18 | // EDIT task
19 | GET_TASK_DETAIL_BY_ID_ACTION: 'GET_TASK_DETAIL_BY_ID_ACTION',
20 | RESET_MY_WORK_TASK_UPDATE_ENTITY_ID: 'RESET_MY_WORK_TASK_UPDATE_ENTITY_ID',
21 | UPDATE_EDIT_TASK_FIELD_ACTION: 'UPDATE_EDIT_TASK_FIELD_ACTION',
22 | RESET_EDIT_TASK_STATE_ACTION: 'RESET_EDIT_TASK_STATE_ACTION',
23 | },
24 | MY_WORK_NOTIFICATION_REDUX_CONSTANTS: {
25 | GET_MY_WORK_NOTIFICATION_LIST_REQUEST_ACTION: 'GET_MY_WORK_NOTIFICATION_LIST_REQUEST_ACTION',
26 | GET_MY_WORK_NOTIFICATION_LIST_SUCCESS_ACTION: 'GET_MY_WORK_NOTIFICATION_LIST_SUCCESS_ACTION',
27 | GET_MY_WORK_NOTIFICATION_LIST_FAIL_ACTION: 'GET_MY_WORK_NOTIFICATION_LIST_FAIL_ACTION',
28 | DELETE_MY_WORK_NOTIFICATION_ACTION: 'DELETE_MY_WORK_NOTIFICATION_ACTION',
29 | CLEAR_NOTIFICATION_DATA: 'CLEAR_NOTIFICATION_DATA',
30 | GET_NOTIFICATION_FROM_SOCKET: 'GET_NOTIFICATION_FROM_SOCKET',
31 | },
32 | };
33 |
--------------------------------------------------------------------------------
/src/logo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/screens/Application/ViewApplication/component/applicationNotesAccordion/NotesDescription.js:
--------------------------------------------------------------------------------
1 | import React, { useLayoutEffect, useMemo, useRef, useState } from 'react';
2 | import _ from 'lodash';
3 | import PropTypes from 'prop-types';
4 |
5 | const NotesDescription = props => {
6 | const noteRef = useRef();
7 | const { description } = props;
8 |
9 | const [isReadMore, setIsReadMore] = useState(false);
10 | const [windowWidth, setWindowWidth] = useState(0);
11 | useLayoutEffect(() => {
12 | window.addEventListener(
13 | 'resize',
14 | _.throttle(() => setWindowWidth(window.innerWidth), 500)
15 | );
16 | }, []);
17 | const noteHeight = useMemo(
18 | () => (description?.toString()?.trim().length > 0 ? noteRef?.current?.offsetHeight : 0),
19 | [noteRef?.current, windowWidth, description]
20 | );
21 |
22 | const isReadMoreNeeded = useMemo(() => noteHeight > 92, [noteHeight, description, windowWidth]);
23 | return (
24 | <>
25 | {description?.toString()?.trim().length > 0 && (
26 |
27 |
31 |
32 | Description:
33 | {description || '-'}
34 |
35 |
36 | {isReadMoreNeeded && !isReadMore &&
...}
37 | {isReadMoreNeeded && (
38 |
setIsReadMore(e => !e)}>
39 | {isReadMore ? 'Read less' : 'Read more'}
40 |
41 | )}
42 |
43 | )}
44 | >
45 | );
46 | };
47 |
48 | NotesDescription.propTypes = {
49 | description: PropTypes.string.isRequired,
50 | };
51 |
52 | export default NotesDescription;
53 |
--------------------------------------------------------------------------------
/src/screens/MyWork/MyWork.js:
--------------------------------------------------------------------------------
1 | import React, { useCallback, useMemo, useState } from 'react';
2 | import { useSelector } from 'react-redux';
3 | import Tab from '../../common/Tab/Tab';
4 | import MyWorkTasks from './MyWorkTasks/MyWorkTasks';
5 |
6 | import MyWorkNotifications from './MyWorkNotifications/MyWorkNotifications';
7 | import Loader from '../../common/Loader/Loader';
8 |
9 | const MyWork = () => {
10 | const userPrivilegesData = useSelector(({ userPrivileges }) => userPrivileges);
11 | const access = useCallback(
12 | accessFor => {
13 | const availableAccess =
14 | userPrivilegesData.filter(module => module.accessTypes.length > 0) ?? [];
15 | const isAccessible = availableAccess.filter(module => module?.name === accessFor);
16 | return isAccessible?.length > 0;
17 | },
18 | [userPrivilegesData]
19 | );
20 |
21 | const [activeTabIndex, setActiveTabIndex] = useState(0);
22 |
23 | const myWorkTabs = useMemo(
24 | () => (access('task') ? ['Tasks', 'Notifications'] : ['Notifications']),
25 | [access]
26 | );
27 | const myWorkTabContent = useMemo(
28 | () => (access('task') ? [, ] : []),
29 | [access]
30 | );
31 | const tabActive = useCallback(
32 | index => {
33 | setActiveTabIndex(index);
34 | },
35 | [setActiveTabIndex]
36 | );
37 |
38 | return (
39 | <>
40 | {myWorkTabs.length > 0 ? (
41 | <>
42 |
43 |
49 |
50 | {myWorkTabContent[activeTabIndex]}
{' '}
51 | >
52 | ) : (
53 |
54 | )}
55 | >
56 | );
57 | };
58 |
59 | export default MyWork;
60 |
--------------------------------------------------------------------------------
/src/assets/images/logo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/screens/Application/ViewApplication/component/ApplicationLogsAccordion.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { useSelector } from 'react-redux';
3 | import moment from 'moment';
4 | import PropTypes from 'prop-types';
5 | import AccordionItem from '../../../../common/Accordion/AccordionItem';
6 |
7 | const ApplicationLogsAccordion = props => {
8 | const applicationLogsList = useSelector(
9 | ({ application }) => application?.viewApplication?.applicationModulesList?.logs || []
10 | );
11 |
12 | const { index } = props;
13 |
14 | return (
15 | <>
16 | {applicationLogsList !== undefined && (
17 |
27 | {applicationLogsList &&
28 | applicationLogsList.map(log => (
29 |
30 |
31 | Date:
32 | {moment(log.createdAt).format('MMMM Do YYYY')}
33 |
34 | Time:
35 | {moment(log.createdAt).format('h:mm:ss a')}
36 |
37 |
38 |
Description:
39 |
{log.logDescription || '-'}
40 |
41 |
42 | ))}
43 |
44 | )}
45 | >
46 | );
47 | };
48 |
49 | export default React.memo(ApplicationLogsAccordion);
50 |
51 | ApplicationLogsAccordion.propTypes = {
52 | index: PropTypes.number.isRequired,
53 | };
54 |
--------------------------------------------------------------------------------
/src/common/Checkbox/_Checkbox.scss:
--------------------------------------------------------------------------------
1 | .checkbox-container {
2 | display: flex;
3 | align-items: center;
4 | position: relative;
5 | height: 24px;
6 | padding-left: 35px;
7 | font: $subtitle $font-regular;
8 | color: $field-color;
9 | -webkit-user-select: none;
10 | -moz-user-select: none;
11 | -ms-user-select: none;
12 | user-select: none;
13 | }
14 |
15 | /* Hide the browser's default checkbox */
16 | .checkbox-container input {
17 | position: absolute;
18 | opacity: 0;
19 | height: 0;
20 | width: 0;
21 | }
22 |
23 | .checkbox-container input:disabled ~ .checkmark {
24 | cursor: not-allowed;
25 | }
26 |
27 | .checkbox-container:hover input:disabled ~ .checkmark {
28 | background-color: #fff;
29 | }
30 |
31 | /* Create a custom checkbox */
32 | .checkmark {
33 | position: absolute;
34 | top: 0;
35 | left: 0;
36 | height: 24px;
37 | width: 24px;
38 | background-color: #fff;
39 | border: 1px solid $placeholder-color;
40 | border-radius: 6px;
41 | cursor: pointer;
42 | }
43 |
44 | /* On mouse-over, add a grey background color */
45 | .checkbox-container:hover input ~ .checkmark {
46 | background-color: $background-color;
47 | }
48 |
49 | /* When the checkbox is checked, add a blue background */
50 | .checkbox-container input:checked ~ .checkmark, .checkbox-container:hover input:disabled:checked ~ .checkmark {
51 | background-color: $primary-color;
52 | }
53 |
54 | /* Create the checkmark/indicator (hidden when not checked) */
55 | .checkmark:after {
56 | content: '';
57 | position: absolute;
58 | display: none;
59 | }
60 |
61 | /* Show the checkmark when checked */
62 | .checkbox-container input:checked ~ .checkmark:after {
63 | display: block;
64 | }
65 |
66 | /* Style the checkmark/indicator */
67 | .checkbox-container .checkmark:after {
68 | left: 8px;
69 | top: 4px;
70 | width: 6px;
71 | height: 11px;
72 | border: solid white;
73 | border-width: 0 2px 2px 0;
74 | -webkit-transform: rotate(45deg);
75 | -ms-transform: rotate(45deg);
76 | transform: rotate(45deg);
77 | }
78 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # TRAD admin panel
2 |
3 | ### Web App for Credit Risk Assessment
4 |
5 | ##Introduction:
6 | The TRAD is a financial services company who provides credit assessments for large businesses to protect financial health of the business.
7 |
8 | - Purpose of this project:
9 |
10 | - Decrease the financial risk for large businesses with the system that allow to send information to the customers about their clients.
11 | - Automations on the credit limit.
12 | - Good user interface (UI).
13 |
14 | - What we have archived with this project:
15 | - A dynamic system with integration of different services like ABR Lookup, New Zealand Lookup, RSS, Illion.
16 |
17 | ##Module:
18 |
19 | - TRAD Risk Portal
20 |
21 | ###1. Purpose of the module:
22 |
23 | - TRAD Risk Portal is an admin panel which will manage the flow of the business. It connects backend & third-party services.
24 | - Clients will be managed by using TRAD Risk Portal.
25 |
26 | ###2. Features of the module:
27 |
28 | - All modules are managed here like Dashboard, Users, Insurer, Clients, Debtors, Applications, Tasks, Overdues, Claims, Reports.
29 | - Access management is there for different modules and users.
30 | - Logging of all the activities is here.
31 |
32 | ###3. Technical stack of module:
33 |
34 | - Front-end Framework: ReactJS
35 |
36 | ###4. Configure Module:
37 |
38 | - Configure back-end point
39 | - In **source/admin-panel/. env-cmdrc** (environment file) replace the ‘REACT_APP_BASE_URL’ with the generated Api URL pointing to your backend according to environments.
40 |
41 | ###5. Get up and running:
42 |
43 | - Install Requirements
44 | - Go to source/admin-panel directory and open terminal for that directory
45 | - Run **“npm I”** to install dependencies.
46 | - Run **“npm run ”** to run project and admin-panel loads on port available with your system default is port: 3000, **ex: npm run dev**.
47 | - Login into panel from browser at **“localhost:”** by providing credentials.
48 | - Dashboard will load once authentication done.
49 |
--------------------------------------------------------------------------------
/src/common/Input/_Input.scss:
--------------------------------------------------------------------------------
1 | .input-container {
2 | display: flex;
3 | justify-content: space-between;
4 | align-items: center;
5 | height: 2rem;
6 | background-color: #ffffff;
7 | border: 0.063rem solid $border-color;
8 | border-radius: 0.313rem;
9 | overflow: hidden;
10 |
11 | > * {
12 | height: 100%;
13 | }
14 |
15 | input {
16 | flex: 1;
17 | padding: 2px 2px 2px 8px;
18 | font: $subtitle $font-regular;
19 | color: $field-color !important;
20 | background-color: #ffffff;
21 | border: none;
22 | outline: none;
23 | white-space: nowrap;
24 | overflow: hidden;
25 | text-overflow: ellipsis;
26 | }
27 |
28 | .prefix {
29 | padding: 2px;
30 | }
31 |
32 | .suffix {
33 | display: flex;
34 | align-items: center;
35 | justify-content: center;
36 | height: 100%;
37 | padding: 0 5px;
38 | }
39 | }
40 |
41 | .disabled-control input {
42 | font: $subtitle $font-medium !important;
43 | cursor: default;
44 | }
45 |
46 | .chips-container {
47 | display: flex;
48 | align-items: center;
49 | gap: 15px;
50 |
51 | > div {
52 | padding: 5px 10px;
53 |
54 | .close {
55 | display: none;
56 | }
57 | }
58 | }
59 |
60 | .editable-chip {
61 | display: flex;
62 | align-items: center;
63 | padding: 5px 30px 5px 10px;
64 | font: $text $field-color;
65 | color: white;
66 | background-color: $primary-color;
67 | border-radius: 5px;
68 |
69 | .close {
70 | position: absolute;
71 | top: 5px;
72 | right: 10px;
73 | display: flex;
74 | align-items: center;
75 | justify-content: center;
76 | height: 12px;
77 | min-height: 12px;
78 | width: 12px;
79 | min-width: 12px;
80 | background-color: white;
81 | border-radius: 50%;
82 | }
83 | }
84 |
85 | textarea {
86 | padding: 2px 5px 2px 8px;
87 | font: $subtitle $font-regular;
88 | color: $field-color;
89 | background-color: #ffffff;
90 | border: 0.063rem solid #e7ecf2;
91 | border-radius: 0.313rem;
92 | resize: none;
93 | }
94 |
95 | textarea:focus {
96 | outline: none;
97 | }
98 |
--------------------------------------------------------------------------------
/src/screens/MyWork/MyWorkNotifications/_MyWorkNotifications.scss:
--------------------------------------------------------------------------------
1 | .notification-container {
2 | margin-top: 10px;
3 | }
4 |
5 | .notification-row {
6 | display: flex;
7 | margin: 0 0 5px 25px;
8 | }
9 |
10 | .notification-detail-row {
11 | flex: 1;
12 | display: grid;
13 | grid-template-columns: calc(70% - 40px) 20% 10%;
14 | gap: 0 20px;
15 | padding: 10px;
16 | background-color: $background-color;
17 | border-radius: 5px;
18 |
19 | .material-icons-round {
20 | margin-right: 7px;
21 | font-size: $h4;
22 | color: $error-color;
23 | text-align: right;
24 | cursor: pointer;
25 | }
26 |
27 | .material-icons-round:hover {
28 | color: $error-variant-color;
29 | }
30 | }
31 |
32 | .notification-row:last-child {
33 | margin-bottom: 0;
34 | }
35 |
36 | .notification-date {
37 | width: fit-content;
38 | margin-top: 30px;
39 | padding: 10px;
40 | font-size: $text;
41 | color: white;
42 | background-color: $primary-color;
43 | border-radius: 5px;
44 | z-index: 1;
45 | }
46 |
47 | .notification-date:first-child {
48 | margin-top: 10px;
49 | }
50 |
51 | .notification-time {
52 | font: $subtitle $font-medium;
53 | color: $primary-color;
54 | text-align: center;
55 | }
56 |
57 | .notification-circle-container {
58 | position: relative;
59 | display: flex;
60 | justify-content: center;
61 | align-items: center;
62 | margin-right: 10px;
63 | }
64 |
65 | .notification-circle {
66 | display: flex;
67 | align-items: center;
68 | justify-content: center;
69 | height: 26px;
70 | width: 26px;
71 | min-height: 26px;
72 | min-width: 26px;
73 | border-radius: 50%;
74 | background-color: white;
75 | box-shadow: 0px 3px 6px #00000029;
76 | z-index: 1;
77 | img {
78 | width: 18px;
79 | }
80 | }
81 |
82 | .notification-vertical-line {
83 | position: absolute;
84 | left: 50%;
85 | height: calc(100% + 20px);
86 | width: 1px;
87 | background-color: $primary-color-1-variant-color;
88 | }
89 |
90 | .notification-row:last-child .notification-vertical-line {
91 | bottom: 50%;
92 | height: calc(28% + 20px);
93 | }
94 |
--------------------------------------------------------------------------------
/src/screens/Application/ImportApplication/_ImportApplicationModal.scss:
--------------------------------------------------------------------------------
1 | .import-application-modal {
2 | width: 80%;
3 | display: flex;
4 | flex-direction: column;
5 | }
6 |
7 | //stepper-progress
8 | .ia-stepper-container {
9 | width: 100%;
10 | display: flex;
11 | justify-content: space-between;
12 | }
13 | .ia-stepper-item {
14 | position: relative;
15 | display: flex;
16 | flex-direction: column;
17 | align-items: center;
18 | flex: 1;
19 | }
20 | .ia-stepper-item::before {
21 | position: absolute;
22 | content: '';
23 | border-bottom: 2px solid $border-color;
24 | width: 100%;
25 | top: 10px;
26 | left: -50%;
27 | }
28 | .ia-stepper-item::after {
29 | position: absolute;
30 | content: '';
31 | border-bottom: 2px solid $border-color;
32 | //width: 100%;
33 | top: 10px;
34 | left: 50%;
35 | }
36 | .ia-stepper-item .ia-step-circle {
37 | position: relative;
38 | display: flex;
39 | justify-content: center;
40 | align-items: center;
41 | width: 20px;
42 | height: 20px;
43 | border-radius: 50%;
44 | border: 2px solid $primary-color;
45 | background-color: white;
46 | z-index: 1;
47 | }
48 | .ia-step-name {
49 | font-size: $field-name;
50 | color: $placeholder-color;
51 | }
52 | .ia-step-name.ia-done-step {
53 | color: $primary-color;
54 | }
55 | .ia-stepper-item:first-child::before {
56 | content: none;
57 | }
58 | .ia-stepper-item:last-child::after {
59 | content: none;
60 | }
61 | .ia-stepper-item.ia-done-step::before {
62 | border-color: $primary-color;
63 | }
64 | .ia-stepper-item.ia-done-step::after {
65 | border-color: $primary-color;
66 | }
67 | .ia-step-circle.ia-done-step {
68 | background-color: $primary-color;
69 | }
70 | //end
71 |
72 | .ia-step-content {
73 | width: 100%;
74 | height: 50vh;
75 | max-height: 50vh;
76 | margin-top: 10px;
77 | padding: 10px;
78 | background-color: white;
79 | border-radius: 10px;
80 | overflow: auto;
81 | }
82 | .ia-step-button-row {
83 | width: 100%;
84 | margin-top: 10px;
85 | padding-right: 10px;
86 | display: flex;
87 | justify-content: flex-end;
88 | bottom: 0;
89 | }
90 |
--------------------------------------------------------------------------------
/src/screens/Insurer/redux/InsurerReduxConstants.js:
--------------------------------------------------------------------------------
1 | export const INSURER_REDUX_CONSTANTS = {
2 | INSURER_LIST_USER_REQUEST_ACTION: 'INSURER_LIST_USER_REQUEST_ACTION',
3 | INSURER_LIST_USER_SUCCESS_ACTION: 'INSURER_LIST_USER_SUCCESS_ACTION',
4 | INSURER_LIST_USER_FAIL_ACTION: 'INSURER_LIST_USER_FAIL_ACTION',
5 | RESET_INSURER_LIST_PAGINATION_DATA: 'RESET_INSURER_LIST_PAGINATION_DATA',
6 | };
7 |
8 | export const INSURER_CRM_REDUX_CONSTANTS = {
9 | INSURER_GET_LIST_FROM_CRM_ACTION: 'INSURER_GET_LIST_FROM_CRM_ACTION',
10 | INSURER_GET_SEARCH_LIST_FROM_CRM_ACTION: 'INSURER_GET_SEARCH_LIST_FROM_CRM_ACTION',
11 | };
12 |
13 | export const INSURER_COLUMN_LIST_REDUX_CONSTANTS = {
14 | INSURER_COLUMN_LIST_ACTION: 'INSURER_COLUMN_LIST_ACTION',
15 | INSURER_DEFAULT_COLUMN_LIST_ACTION: 'INSURER_DEFAULT_COLUMN_LIST_ACTION',
16 | UPDATE_INSURER_COLUMN_LIST_ACTION: 'UPDATE_INSURER_COLUMN_LIST_ACTION',
17 | };
18 | export const INSURER_VIEW_REDUX_CONSTANT = {
19 | VIEW_INSURER_DATA: 'VIEW_INSURER_DATA',
20 | VIEW_INSURER_ACTIVE_TAB_INDEX: 'VIEW_INSURER_ACTIVE_TAB_INDEX',
21 | RESET_INSURER_LIST_DATA: 'RESET_INSURER_LIST_DATA',
22 | RESET_VIEW_INSURER_DATA: 'RESET_VIEW_INSURER_DATA',
23 | CONTACT: {
24 | INSURER_CONTACT_LIST_USER_ACTION: 'INSURER_CONTACT_LIST_USER_ACTION',
25 | INSURER_CONTACT_COLUMN_LIST_ACTION: 'INSURER_CONTACT_COLUMN_LIST_ACTION',
26 | INSURER_CONTACT_DEFAULT_COLUMN_LIST_ACTION: 'INSURER_CONTACT_DEFAULT_COLUMN_LIST_ACTION',
27 | UPDATE_INSURER_CONTACT_COLUMN_LIST_ACTION: 'UPDATE_INSURER_CONTACT_COLUMN_LIST_ACTION',
28 | },
29 | POLICIES: {
30 | INSURER_POLICIES_LIST_USER_ACTION: 'INSURER_POLICIES_LIST_USER_ACTION',
31 | INSURER_POLICIES_COLUMN_LIST_ACTION: 'INSURER_POLICIES_COLUMN_LIST_ACTION',
32 | INSURER_POLICIES_DEFAULT_COLUMN_LIST_ACTION: 'INSURER_POLICIES_DEFAULT_COLUMN_LIST_ACTION',
33 | UPDATE_POLICIES_CONTACT_COLUMN_LIST_ACTION: 'UPDATE_POLICIES_CONTACT_COLUMN_LIST_ACTION',
34 | INSURER_POLICY_SYNC_LIST_BY_SEARCH: 'INSURER_POLICY_SYNC_LIST_BY_SEARCH',
35 | },
36 | MATRIX: {
37 | INSURER_MATRIX_GET_DATA: 'INSURER_MATRIX_GET_DATA',
38 | },
39 | };
40 |
--------------------------------------------------------------------------------
/src/common/Input/Input.js:
--------------------------------------------------------------------------------
1 | import React, { useRef } from 'react';
2 | import PropTypes from 'prop-types';
3 |
4 | const Input = props => {
5 | const inputRef = useRef();
6 | const {
7 | prefix,
8 | prefixType,
9 | prefixClass,
10 | suffix,
11 | suffixClick,
12 | suffixClass,
13 | placeholder,
14 | type,
15 | borderClass,
16 | className,
17 | ...restProps
18 | } = props;
19 | const inputClass = `input ${className}`;
20 | const prefixIconClassName = `material-icons-round prefix ${prefixClass}`;
21 | const prefixClassName = `prefix ${prefixClass}`;
22 | const suffixClassName = `material-icons-round suffix ${suffixClass}`;
23 | const inputBorderClass = `input-container ${borderClass}`;
24 |
25 | return (
26 |
27 | {prefix && prefixType === 'icon' && {prefix}}
28 | {prefix && prefixType === 'pincode' && (
29 |
30 | )}
31 |
39 | {suffix && (
40 | suffixClick(inputRef.current)}>
41 | {suffix}
42 |
43 | )}
44 |
45 | );
46 | };
47 |
48 | Input.propTypes = {
49 | prefix: PropTypes.string,
50 | prefixType: PropTypes.oneOf(['icon', 'pincode', 'chip', '']),
51 | prefixClass: PropTypes.string,
52 | suffix: PropTypes.string,
53 | suffixClick: PropTypes.func,
54 | suffixClass: PropTypes.string,
55 | placeholder: PropTypes.string,
56 | type: PropTypes.string.isRequired,
57 | className: PropTypes.string,
58 | borderClass: PropTypes.string,
59 | };
60 |
61 | Input.defaultProps = {
62 | prefix: '',
63 | prefixType: '',
64 | prefixClass: '',
65 | suffix: '',
66 | suffixClick: () => {},
67 | suffixClass: '',
68 | placeholder: '',
69 | className: '',
70 | borderClass: '',
71 | };
72 |
73 | export default Input;
74 |
--------------------------------------------------------------------------------
/src/common/Header/component/FileUpload.js:
--------------------------------------------------------------------------------
1 | import { useRef } from 'react';
2 | /* import { uploadProfilePicture } from '../redux/HeaderAction'; */
3 | import PropTypes from 'prop-types';
4 | import IconButton from '../../IconButton/IconButton';
5 | import dummy from '../../../assets/images/dummy.svg';
6 |
7 | const FileUpload = props => {
8 | const {
9 | isProfile,
10 | handleChange,
11 | profilePictureUrl,
12 | fileName,
13 | className,
14 | file,
15 | isDeleteIcon,
16 | onDeleteClick,
17 | } = props;
18 |
19 | const hiddenFileInput = useRef(null);
20 |
21 | const handleClick = () => {
22 | hiddenFileInput.current.click();
23 | };
24 |
25 | let url = '';
26 | if (file) {
27 | url = URL.createObjectURL(file);
28 | }
29 |
30 | return (
31 |
32 | {isProfile ? (
33 |
34 |

35 | {isDeleteIcon && (
36 |
37 | cancel
38 |
39 | )}
40 |
41 | ) : (
42 | ''
43 | )}
44 |
45 |
51 |
{fileName}
52 |
53 | );
54 | };
55 | FileUpload.propTypes = {
56 | fileName: PropTypes.string.isRequired,
57 | isProfile: PropTypes.bool,
58 | handleChange: PropTypes.func,
59 | profilePictureUrl: PropTypes.string.isRequired,
60 | className: PropTypes.object.isRequired,
61 | file: PropTypes.object.isRequired,
62 | isDeleteIcon: PropTypes.bool,
63 | onDeleteClick: PropTypes.func,
64 | };
65 |
66 | FileUpload.defaultProps = {
67 | isProfile: false,
68 | handleChange: () => {},
69 | isDeleteIcon: false,
70 | onDeleteClick: () => {},
71 | };
72 |
73 | export default FileUpload;
74 |
--------------------------------------------------------------------------------