@argusoft/medplat-app-shell 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +139 -141
- package/src/GlobalErrorBoundary.jsx +31 -0
- package/src/SilentErrorFallback.jsx +68 -0
- package/src/TrackingProviderWrapper.jsx +40 -0
- package/src/_tests_/__mocks__/MockTranslationProvider.jsx +21 -0
- package/src/_tests_/__mocks__/ckeditor.js +45 -0
- package/src/_tests_/__mocks__/fileMock.js +1 -0
- package/src/_tests_/__mocks__/useranalytics.js +5 -0
- package/src/_tests_/views/components/Dashboard/DashboardUI.test.jsx +137 -0
- package/src/_tests_/views/components/Dashboard/DashboardUIMock.js +877 -0
- package/src/_tests_/views/components/ForgotPassword/ForgotPassword.test.jsx +314 -0
- package/src/_tests_/views/components/LocationDirective/LocationDirective.test.jsx.disable +229 -0
- package/src/_tests_/views/components/LocationDirective/mockLocationDirective.js +810 -0
- package/src/_tests_/views/components/LocationType/MockLocationType.js +42259 -0
- package/src/_tests_/views/components/LocationType/addlocationtype.test.jsx.disable +276 -0
- package/src/_tests_/views/components/LocationType/editlocationtype.test.jsx.disable +262 -0
- package/src/_tests_/views/components/LocationType/locationtype.test.jsx.disable +148 -0
- package/src/_tests_/views/components/Profile/UpdateProfileModalData.js +4396 -0
- package/src/_tests_/views/components/Profile/updateprofilemodal.test.jsx +282 -0
- package/src/_tests_/views/components/SideBar/MockSideBar.js +1379 -0
- package/src/_tests_/views/components/SideBar/SideBar.test.jsx +98 -0
- package/src/_tests_/views/components/SystemConfig/ManageSystemConfig/AddManageSystemConfig.test.jsx.disable +164 -0
- package/src/_tests_/views/components/SystemConfig/ManageSystemConfig/UpdateManageSystemConfig.test.jsx.disable +157 -0
- package/src/_tests_/views/components/SystemConfig/MockSystemConfig.js +1280 -0
- package/src/_tests_/views/components/SystemConfig/SystemConfig.test.jsx.disable +165 -0
- package/src/_tests_/views/components/login/Login.test.jsx +276 -0
- package/src/_tests_/views/components/login/MockAuthorise.js +2414 -0
- package/src/_tests_/views/components/login/ServiceResponse.js +595 -0
- package/src/_tests_/views/components/user/MockManageUser.js +7965 -0
- package/src/_tests_/views/components/user/manageuser.test.jsx.disable +989 -0
- package/src/_tests_/views/components/user/mockUsersData.js +582 -0
- package/src/assets/img/OASISLogin.png +0 -0
- package/src/assets/img/bahaarNew.png +0 -0
- package/src/assets/img/dnhdd4K.png +0 -0
- package/src/assets/img/govtofup.png +0 -0
- package/src/assets/img/sewarural4K.png +0 -0
- package/src/assets/img/techo4K.png +0 -0
- package/src/assets/img/up4K.png +0 -0
- package/src/common/HolidayList.jsx +573 -0
- package/src/common/MalaciaousInputUtil.js +23 -0
- package/src/common/SafeHtml.jsx +17 -0
- package/src/common/VersionManager.jsx +109 -0
- package/src/common/constants/PerformanceDashboard.js +514 -0
- package/src/common/constants/app.constant.js +781 -0
- package/src/common/constants/cccVerificationConstants.js +18 -0
- package/src/common/constants/fhsrConstant.js +33 -0
- package/src/common/constants/gvk-verification.constant.js +76 -0
- package/src/common/constants/search.constant.js +23 -0
- package/src/common/constants/teleconsulatationConstant.jsx +1339 -0
- package/src/common/directives/SearchTemplate.jsx +784 -0
- package/src/common/directives/SearchTemplate.scss +14 -0
- package/src/common/dynamicView/DynamicView.jsx +353 -0
- package/src/common/dynamicView/InputFieldComponent.jsx +1501 -0
- package/src/common/dynamicView/InputViewComponent.jsx +298 -0
- package/src/common/dynamicView/InputViewComponent.scss +15 -0
- package/src/common/env.js +5 -0
- package/src/common/filters/locationNameFilter.js +26 -0
- package/src/common/fontAwesomeIcons/FontAwesomeIcons.jsx +27 -0
- package/src/common/fontAwesomeIcons/FontAwesomeIconsNames.js +1968 -0
- package/src/common/fontPreferences/fontSizeProvider.jsx +34 -0
- package/src/common/fontPreferences/fontSizeSelector.jsx +116 -0
- package/src/common/getAssignedFeature/getAssignedFeature.js +32 -0
- package/src/common/interceptors/AxiosInterceptor.js +216 -0
- package/src/common/languageTranslator/TranslationContext.js +5 -0
- package/src/common/languageTranslator/TranslationProvider.jsx +24 -0
- package/src/common/languageTranslator/i18n.js +49 -0
- package/src/common/services/AuthenticateService.js +116 -0
- package/src/common/services/DownloadFile.js +35 -0
- package/src/common/services/ForgotPassword.js +18 -0
- package/src/common/services/FormConfiguratorService.js +195 -0
- package/src/common/services/GlobalApis.js +84 -0
- package/src/common/services/InterceptorNavigationService.js +17 -0
- package/src/common/services/LocationService.js +65 -0
- package/src/common/services/LocationType.js +11 -0
- package/src/common/services/QueryBuilder.js +36 -0
- package/src/common/services/Roles.js +28 -0
- package/src/common/services/SyncWithServer.js +15 -0
- package/src/common/services/SystemConfig.js +15 -0
- package/src/common/services/TranslationService.js +70 -0
- package/src/common/services/TwoFactorService.js +7 -0
- package/src/common/services/Users.js +91 -0
- package/src/common/services/Webtasks.js +27 -0
- package/src/common/services/util/Convert-pad-data-to-API-format.jsx +167 -0
- package/src/common/services/util/Convert-to-UI-format.jsx +82 -0
- package/src/common/services/util/EmptyPrescriptionPadData.jsx +11 -0
- package/src/common/services/util/GeneralUtil.js +456 -0
- package/src/common/services/util/Prescription-pad-util.js +339 -0
- package/src/common/services/util/PrescriptionPadData.js +67 -0
- package/src/common/services/util/PrescriptionpadCommonUtil.js +96 -0
- package/src/common/services/util/ReportFieldUtil.jsx +398 -0
- package/src/common/services/util/WebSocketContext.jsx +261 -0
- package/src/common/syncWithServer/SyncWithServerDialog.jsx +170 -0
- package/src/common/syncWithServer/SyncWithServerDialogSkeleton.jsx +67 -0
- package/src/common/tests/CustomWrapper.jsx +49 -0
- package/src/common/tests/TranslationWrapper.jsx +38 -0
- package/src/common/themeProvider/ColorInputs.jsx +97 -0
- package/src/common/themeProvider/EditableColorInput.jsx +128 -0
- package/src/common/themeProvider/ThemeEditor.jsx +319 -0
- package/src/common/themeProvider/ThemeProvider.jsx +210 -0
- package/src/common/themeProvider/themeConfig.js +558 -0
- package/src/common/toaster/toaster.jsx +30 -0
- package/src/firebaseConfig.js +24 -0
- package/src/global.scss +221 -0
- package/src/hooks/.gitkeep +0 -0
- package/src/hooks/useAESEncryption.js +56 -0
- package/src/hooks/useCaching.js +43 -0
- package/src/hooks/useDebounce.js +34 -0
- package/src/hooks/useDebounceFn.js +50 -0
- package/src/hooks/useDownloadPdf.js +358 -0
- package/src/hooks/useDownloadXlsx.js +55 -0
- package/src/hooks/useListValueFieldValues.js +30 -0
- package/src/hooks/useLocationHierarchies.js +63 -0
- package/src/hooks/useLocationHierarchyTranslate.js +16 -0
- package/src/hooks/useOnline.js +27 -0
- package/src/hooks/usePagination.js +63 -0
- package/src/hooks/useRefreshToken.js +87 -0
- package/src/hooks/useScript.js +25 -0
- package/src/hooks/useStopwatch.js +75 -0
- package/src/hooks/useTrackEvent.js +22 -0
- package/src/hooks/useWebAudioRecorder.js +115 -0
- package/src/layout/LoaderComponet.jsx +22 -0
- package/src/layout/LoaderContext.jsx +29 -0
- package/src/layout/mainLayout/AdaptiveZoom.jsx +27 -0
- package/src/layout/mainLayout/Chatbot.jsx +243 -0
- package/src/layout/mainLayout/Layout.jsx +445 -0
- package/src/layout/mainLayout/Profile/UpdateProfileModal.jsx +684 -0
- package/src/layout/mainLayout/header/LogoutModal.jsx +131 -0
- package/src/layout/mainLayout/header/Navbar.jsx +1677 -0
- package/src/layout/mainLayout/header/Navbar.scss +4 -0
- package/src/layout/mainLayout/header/index.js +0 -0
- package/src/layout/mainLayout/sidebar/SideBar.jsx +1402 -0
- package/src/layout/mainLayout/sidebar/Sidebar.css +159 -0
- package/src/layout/mainLayout/sidebar/index.js +0 -0
- package/src/logo.svg +1 -0
- package/src/reportWebVitals.js +13 -0
- package/src/setupFirebaseMessaging.js +28 -0
- package/src/setupTests.js +8 -0
- package/src/store/actions/AuthenticationActions.js +0 -0
- package/src/store/actions/ReportsActions.js +0 -0
- package/src/store/actions/TranslationAction.js +0 -0
- package/src/store/index.js +8 -0
- package/src/store/reducer.js +46 -0
- package/src/store/reducers/AuthenticationReducer.js +50 -0
- package/src/store/reducers/CalendarEventReducer.js +41 -0
- package/src/store/reducers/ConditionClipboardReducer.js +45 -0
- package/src/store/reducers/FeatureReducer.js +27 -0
- package/src/store/reducers/FormConfiguratorReducer.js +38 -0
- package/src/store/reducers/LoadingReducer.js +20 -0
- package/src/store/reducers/MembersAuthenticationReducer.js +28 -0
- package/src/store/reducers/PrescriptionPadReducer.js +329 -0
- package/src/store/reducers/QuestionaireReducer.js +29 -0
- package/src/store/reducers/ReportsReducer.js +24 -0
- package/src/store/reducers/SkeletonReducer.js +20 -0
- package/src/store/reducers/ThemeReducer.js +106 -0
- package/src/store/reducers/TranslationReducer.js +126 -0
- package/src/store/reducers/dashboardEditorSlice.js +77 -0
- package/src/store/reducers/districtHealthDashboardSlice.js +58 -0
- package/src/store/reducers/immunizationSlice.js +234 -0
- package/src/store/slices/dashboardPagesSlice.js +51 -0
- package/src/utils/.gitkeep +0 -0
- package/src/utils/FormConstants.js +2629 -0
- package/src/utils/GujaratTopoChart.jsx +483 -0
- package/src/utils/UUIDgenerator.js +8 -0
- package/src/utils/appointment-utils/appointment-utils.js +123 -0
- package/src/utils/feature.js +42 -0
- package/src/utils/getThemeColor.js +12 -0
- package/src/utils/localStorageHelper.js +11 -0
- package/src/utils/notifications/enable-push-notifications.js +27 -0
- package/src/utils/resolveAppliedStyle.js +11 -0
- package/src/utils/themeConfigs.js +1483 -0
- package/src/views/custom-components/.gitkeep +0 -0
- package/src/views/custom-components/AgIconButton/RIf.jsx +14 -0
- package/src/views/custom-components/AgIconButton/button.jsx +108 -0
- package/src/views/custom-components/AgIconButton/waterDrop.jsx +95 -0
- package/src/views/custom-components/AgIconButton/waterDrop.scss +37 -0
- package/src/views/custom-components/AlertPlaceholder.jsx +32 -0
- package/src/views/custom-components/AllFaIconsSelector.jsx +56 -0
- package/src/views/custom-components/CkEditor/CkEditor.js +102 -0
- package/src/views/custom-components/CustomAccordion.jsx +72 -0
- package/src/views/custom-components/CustomActionIcons.jsx +118 -0
- package/src/views/custom-components/CustomAutoComplete.jsx +188 -0
- package/src/views/custom-components/CustomCheckBox.jsx +60 -0
- package/src/views/custom-components/CustomConfirmationModal.jsx +118 -0
- package/src/views/custom-components/CustomCountrySelect.jsx +129 -0
- package/src/views/custom-components/CustomDatePicker.jsx +122 -0
- package/src/views/custom-components/CustomDropdown.jsx +191 -0
- package/src/views/custom-components/CustomFileUpload.jsx +387 -0
- package/src/views/custom-components/CustomFullCalendar.jsx +514 -0
- package/src/views/custom-components/CustomInfiniteScroll.jsx +126 -0
- package/src/views/custom-components/CustomRadioComponent.jsx +65 -0
- package/src/views/custom-components/CustomStatsComponent.jsx +114 -0
- package/src/views/custom-components/CustomSvgUpload.jsx +170 -0
- package/src/views/custom-components/CustomSwitch.jsx +37 -0
- package/src/views/custom-components/CustomTabPanel.jsx +19 -0
- package/src/views/custom-components/CustomTextArea.jsx +62 -0
- package/src/views/custom-components/CustomTextArea.scss +27 -0
- package/src/views/custom-components/CustomTextField.jsx +116 -0
- package/src/views/custom-components/CustomToggleSwitch.jsx +138 -0
- package/src/views/custom-components/CustomTooltip.jsx +51 -0
- package/src/views/custom-components/CustomZoomImage.jsx +134 -0
- package/src/views/custom-components/CustomizedTable/CustomizedTableV2.jsx +1407 -0
- package/src/views/custom-components/CustomizedTable/VirtualizeTableBody.jsx +295 -0
- package/src/views/custom-components/CustomizedTable/helper.jsx +159 -0
- package/src/views/custom-components/CustomizedTable.jsx +532 -0
- package/src/views/custom-components/EditInputField.jsx +174 -0
- package/src/views/custom-components/FieldDescription.jsx +22 -0
- package/src/views/custom-components/FileDisplayComponent.jsx +138 -0
- package/src/views/custom-components/FormItem.jsx +53 -0
- package/src/views/custom-components/GenericChart.jsx +80 -0
- package/src/views/custom-components/InfoBadge.jsx +60 -0
- package/src/views/custom-components/PostgresEditor.jsx +801 -0
- package/src/views/custom-components/ResizableEditAutocompleteField.jsx +249 -0
- package/src/views/custom-components/ResizableEditInputField.jsx +215 -0
- package/src/views/custom-components/ResizeableEditSelectField.jsx +197 -0
- package/src/views/custom-components/SideOverlay.jsx +113 -0
- package/src/views/custom-components/SideOverlay.scss +42 -0
- package/src/views/custom-components/calendar.scss +571 -0
- package/src/views/feature-components/.gitkeep +0 -0
- package/src/views/feature-components/Dashboard/DashboardUI.jsx +1043 -0
- package/src/views/feature-components/Dashboard/DhnddModal/AshaDataQualityVerificationModal.jsx +278 -0
- package/src/views/feature-components/Dashboard/PinFeatureModal.jsx +143 -0
- package/src/views/feature-components/Dashboard/QuickLinks.jsx +163 -0
- package/src/views/feature-components/Dashboard/Taskbar.jsx +56 -0
- package/src/views/feature-components/Dashboard/WebtasksFilterForm.jsx +109 -0
- package/src/views/feature-components/Dashboard/WidgetCard.jsx +161 -0
- package/src/views/feature-components/Dashboard/actionModal.jsx +263 -0
- package/src/views/feature-components/Dashboard/ekavachModal/HealthWorkerIncorrectDetailsModal.jsx +332 -0
- package/src/views/feature-components/Dashboard/ekavachModal/MoMaternalDeathVerifcationModal.jsx +275 -0
- package/src/views/feature-components/Dashboard/ekavachModal/MoVerficationForChildScreeningMoadal.jsx +566 -0
- package/src/views/feature-components/FeatureUsageAnalytics/FeatureUsageAnalytics.jsx +989 -0
- package/src/views/feature-components/Features/NewServerManagement.jsx +217 -0
- package/src/views/feature-components/Features/ServerManagement.scss +120 -0
- package/src/views/feature-components/ForgotPassword/ForgotPassword.jsx +226 -0
- package/src/views/feature-components/LocationDirective/LocationDirective.jsx +992 -0
- package/src/views/feature-components/LocationDirective/LocationDirectiveV2.jsx +909 -0
- package/src/views/feature-components/NotFound.jsx +66 -0
- package/src/views/feature-components/Onboarding/Onboarding.jsx +1400 -0
- package/src/views/feature-components/Skeletons.js +115 -0
- package/src/views/feature-components/Unauthorized.jsx +48 -0
- package/src/views/feature-components/VerifyRoute.jsx +88 -0
- package/src/views/feature-components/YearlyRecap/YearlyRecap.jsx +357 -0
- package/src/views/feature-components/YearlyRecap/components/RecapSlide.jsx +183 -0
- package/src/views/feature-components/YearlyRecap/languageTranslator/TranslationContext.js +5 -0
- package/src/views/feature-components/YearlyRecap/languageTranslator/TranslationProvider.jsx +26 -0
- package/src/views/feature-components/YearlyRecap/languageTranslator/i18n.js +46 -0
- package/src/views/feature-components/YearlyRecap/languageTranslator/translations.json +167 -0
- package/src/views/feature-components/YearlyRecap/slides/IntroSlide.jsx +233 -0
- package/src/views/feature-components/YearlyRecap/slides/MaternalHealthSlide.jsx +146 -0
- package/src/views/feature-components/YearlyRecap/slides/MetricSlide.jsx +227 -0
- package/src/views/feature-components/YearlyRecap/slides/OutroSlide.jsx +701 -0
- package/src/views/feature-components/YearlyRecap/slides/ReachSlide.jsx +273 -0
- package/src/views/feature-components/login/Login.jsx +840 -0
- package/src/views/feature-components/login/Login.scss +154 -0
- package/src/views/feature-components/login/LoginConfigurator.jsx +1149 -0
- package/src/views/feature-components/login/TwoFactorSetupModal.jsx +411 -0
- package/src/views/feature-components/login/simplifyMenu.js +45 -0
- package/src/views/feature-components/system-config/ManageSystemConfigs.jsx +284 -0
- package/src/views/feature-components/system-config/SystemConfig.jsx +299 -0
- package/src/views/feature-components/users/ChangePasswordModal.jsx +243 -0
- package/src/views/feature-components/users/PasswordField.jsx +56 -0
- package/dist/index.css +0 -1
- package/dist/index.js +0 -32001
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { api } from '@/common/interceptors/AxiosInterceptor';
|
|
2
|
+
|
|
3
|
+
const basePath = '/medplatform/v2';
|
|
4
|
+
|
|
5
|
+
export const FormConfiguratorService = {
|
|
6
|
+
getFormConfig: (formCode, version) => {
|
|
7
|
+
const url = `${basePath}/form`;
|
|
8
|
+
return api.get(url, {
|
|
9
|
+
params: { type: 'RENDER', formCode, version, uuid: null },
|
|
10
|
+
});
|
|
11
|
+
},
|
|
12
|
+
getMedplatFormConfigByUuidForEdit: (formUUID) => {
|
|
13
|
+
const url = `${basePath}/form`;
|
|
14
|
+
return api.get(url, {
|
|
15
|
+
params: { type: 'DRAFT', uuid: formUUID, formCode: null, version: null },
|
|
16
|
+
});
|
|
17
|
+
},
|
|
18
|
+
getFilteredFormData: (formCode, params) =>
|
|
19
|
+
api.get(`${basePath}/exceptions`, {
|
|
20
|
+
params: { ...params, formCode },
|
|
21
|
+
}),
|
|
22
|
+
updateStructure: (data) =>
|
|
23
|
+
api.put(basePath + '/form', data, { params: { type: 'VERSION_HISTORY_UPDATE', field: 'FORM_OBJECT' } }),
|
|
24
|
+
updateFormTemplateConfig: (data, config = {}) =>
|
|
25
|
+
api.put(basePath + '/form', data, {
|
|
26
|
+
...config,
|
|
27
|
+
params: { ...config?.params, type: 'VERSION_HISTORY_UPDATE', field: 'FORM_TEMPLATE_CONFIG' },
|
|
28
|
+
}),
|
|
29
|
+
updateUtilities: (data) =>
|
|
30
|
+
api.put(basePath + '/form', data, { params: { type: 'VERSION_HISTORY_UPDATE', field: 'FORM_VM' } }),
|
|
31
|
+
updateAPIs: (data) =>
|
|
32
|
+
api.put(basePath + '/form', data, { params: { type: 'VERSION_HISTORY_UPDATE', field: 'FORM_API' } }),
|
|
33
|
+
updateBackend: (data) =>
|
|
34
|
+
api.put(basePath + '/form', data, {
|
|
35
|
+
params: { type: 'VERSION_HISTORY_UPDATE', field: 'FORM_QUERY_CONFIG' },
|
|
36
|
+
}),
|
|
37
|
+
updateReturnObject: (data) =>
|
|
38
|
+
api.put(basePath + '/form', data, {
|
|
39
|
+
params: { type: 'VERSION_HISTORY_UPDATE', field: 'RETURN_OBJECT' },
|
|
40
|
+
}),
|
|
41
|
+
updateFieldConfig: (data) =>
|
|
42
|
+
api.put(basePath + '/form', data, {
|
|
43
|
+
params: { type: 'VERSION_HISTORY_UPDATE', field: 'FIELD_CONFIG' },
|
|
44
|
+
}),
|
|
45
|
+
updateExecutionSequence: (data) =>
|
|
46
|
+
api.put(basePath + '/form', data, {
|
|
47
|
+
params: { type: 'VERSION_HISTORY_UPDATE', field: 'EXECUTION_SEQUENCE' },
|
|
48
|
+
}),
|
|
49
|
+
executeForFormConfigurator: (data) => api.post(`/resource/getdataforformconfigurator/${data.code}`, data),
|
|
50
|
+
getFieldKeyMap: () => api.get(basePath + '/fieldkeymap'),
|
|
51
|
+
getAllForms: (showInactives) => api.get(basePath + '/forms', { params: { showInactives } }),
|
|
52
|
+
saveForm: (formData) =>
|
|
53
|
+
api.post(basePath + '/form', formData, {
|
|
54
|
+
headers: { 'Content-Type': 'multipart/form-data' },
|
|
55
|
+
}),
|
|
56
|
+
updateMobileTemplateConfig: (medplatMobileTemplateDto) =>
|
|
57
|
+
api.put(`${basePath}/form`, medplatMobileTemplateDto, {
|
|
58
|
+
params: { type: 'VERSION_HISTORY_UPDATE', field: 'MOBILE_TEMPLATE_CONFIG' },
|
|
59
|
+
}),
|
|
60
|
+
saveStableForm: (data) =>
|
|
61
|
+
api.post(basePath + '/form', data, { params: { uuid: null, version: null, type: 'STABLE' } }),
|
|
62
|
+
validateWebQuery: (dto) => api.post(basePath + '/validate', dto),
|
|
63
|
+
getMedplatFormConfigByUuidAndVersion: (formUUID, version) =>
|
|
64
|
+
api.get(`${basePath}/form`, {
|
|
65
|
+
params: { type: 'STABLE', uuid: formUUID, version, formCode: null },
|
|
66
|
+
}),
|
|
67
|
+
getFormQueriesByVersionHistoryUUID: (versionHistoryUUID, queryType) =>
|
|
68
|
+
api.get(`${basePath}/queries`, {
|
|
69
|
+
params: { versionHistoryUUID, queryType },
|
|
70
|
+
}),
|
|
71
|
+
saveFormQueries: (formQueryDtoList, versionHistoryUUID, queryType) =>
|
|
72
|
+
api.post(`${basePath}/queries`, formQueryDtoList, {
|
|
73
|
+
params: {
|
|
74
|
+
versionHistoryUUID,
|
|
75
|
+
queryType,
|
|
76
|
+
},
|
|
77
|
+
}),
|
|
78
|
+
updateFormVersion: (dto) => api.put(basePath + '/form', dto, { params: { type: 'VERSION_CHANGE', field: null } }),
|
|
79
|
+
executeFormQuery: (formQueryDto, config) => api.post(basePath + '/executeFormQuery', formQueryDto, config),
|
|
80
|
+
evaluateChipQueries: (chips) => api.post(basePath + '/component/chip-queries', { chips }),
|
|
81
|
+
updatePageParams: (data) =>
|
|
82
|
+
api.put(basePath + '/form', data, {
|
|
83
|
+
params: { type: 'VERSION_HISTORY_UPDATE', field: 'PAGE_PARAMS' },
|
|
84
|
+
}),
|
|
85
|
+
submitForm: ({ formCode, versionHistoryUUID, flowUUID, formDataUUID, data }) => {
|
|
86
|
+
return api.post(`${basePath}/submit`, data, {
|
|
87
|
+
params: {
|
|
88
|
+
formCode,
|
|
89
|
+
versionHistoryUUID,
|
|
90
|
+
flowUUID,
|
|
91
|
+
formDataUUID,
|
|
92
|
+
},
|
|
93
|
+
});
|
|
94
|
+
},
|
|
95
|
+
updateFormDetails: (dto) => api.put(basePath + '/form', dto, { params: { type: 'FORM_MASTER', field: null } }),
|
|
96
|
+
updateBuilderType: (formMasterUuid) =>
|
|
97
|
+
api.put(basePath + '/form', { formMasterUuid }, { params: { type: 'BUILDER_TYPE', field: null } }),
|
|
98
|
+
resetDraftConfig: (formMasterUUID, version) =>
|
|
99
|
+
api.post(
|
|
100
|
+
`${basePath}/form`,
|
|
101
|
+
{},
|
|
102
|
+
{
|
|
103
|
+
params: { type: 'RESET', uuid: formMasterUUID, version, formCode: null },
|
|
104
|
+
}
|
|
105
|
+
),
|
|
106
|
+
convertPostgreSQLToSQLite: (llmDto, showLoaderToggle = false) =>
|
|
107
|
+
api.post(basePath + '/convertQuery', llmDto, { showLoader: showLoaderToggle }),
|
|
108
|
+
getQueryColumns: (llmDto) => api.post(basePath + '/returnColumnsQuery', llmDto),
|
|
109
|
+
getRegexFromNaturalLanguage: (llmDto) => api.post(basePath + '/naturalLanguageToRegex', llmDto),
|
|
110
|
+
deleteFormQueries: (queryList) => api.delete(basePath + '/queries', { data: queryList }),
|
|
111
|
+
checkQueryCodeAvailability: (formVersionHistoryUuid, queryCode, loader = false) =>
|
|
112
|
+
api.get(`${basePath}/checkQueryCodeAvailability`, {
|
|
113
|
+
params: { formVersionHistoryUuid, queryCode },
|
|
114
|
+
showLoader: loader,
|
|
115
|
+
}),
|
|
116
|
+
checkQueryCodesAvailability: (formVersionHistoryUuid, queryCodes, loader = false) =>
|
|
117
|
+
api.post(`${basePath}/checkQueryCodesAvailability`, queryCodes, {
|
|
118
|
+
params: { formVersionHistoryUuid },
|
|
119
|
+
showLoader: loader,
|
|
120
|
+
}),
|
|
121
|
+
returnColumnsByQueryCode: (requestBody) => api.post(`${basePath}/returnColumnsByQueryCode`, requestBody),
|
|
122
|
+
returnColumnsByQueryCodeForMobile: (requestBody) =>
|
|
123
|
+
api.post(`${basePath}/returnColumnsByQueryCodeForMobile`, requestBody),
|
|
124
|
+
getFile: (versionReferenceUUID, mediaUUID) =>
|
|
125
|
+
api.get(`${basePath}/document/retrieve`, {
|
|
126
|
+
params: { versionReferenceUUID, mediaUUID },
|
|
127
|
+
responseType: 'blob',
|
|
128
|
+
}),
|
|
129
|
+
getFormFileByUUID: (mediaUUID, isThumbnail = false) =>
|
|
130
|
+
api.get(`${basePath}/document/retrieveByUUID`, {
|
|
131
|
+
params: { mediaUUID, isThumbnail },
|
|
132
|
+
responseType: 'blob',
|
|
133
|
+
}),
|
|
134
|
+
getFileByMediaName: (mediaName, mediaUUID) =>
|
|
135
|
+
api.get(`${basePath}/document/retrieveByMediaName`, {
|
|
136
|
+
params: { mediaName, mediaUUID },
|
|
137
|
+
responseType: 'blob',
|
|
138
|
+
}),
|
|
139
|
+
getFileByUUID: (uuid) =>
|
|
140
|
+
api.get(`document/getfilebyuuid`, {
|
|
141
|
+
params: { uuid },
|
|
142
|
+
responseType: 'blob',
|
|
143
|
+
}),
|
|
144
|
+
getThumbnailByUUID: (uuid) =>
|
|
145
|
+
api.get(`document/getthumbnailbyuuid`, {
|
|
146
|
+
params: { uuid },
|
|
147
|
+
responseType: 'blob',
|
|
148
|
+
}),
|
|
149
|
+
duplicateForm: (uuid, version, data) =>
|
|
150
|
+
api.post(`${basePath}/form`, data, {
|
|
151
|
+
params: { uuid, version, type: 'DUPLICATE' },
|
|
152
|
+
}),
|
|
153
|
+
checkFormCodeAvailability: (formCode) =>
|
|
154
|
+
api.get(`${basePath}/checkFormCodeAvailability`, {
|
|
155
|
+
params: { formCode },
|
|
156
|
+
showLoader: false,
|
|
157
|
+
}),
|
|
158
|
+
executeMigrations: (migrationUUIDs) => api.post(basePath + `/executeMigrations`, migrationUUIDs),
|
|
159
|
+
createShallowMediaReference: (documentDto) => api.post(basePath + '/createShallowMediaReference', documentDto),
|
|
160
|
+
getAllStandardFields: () => api.get(basePath + '/standardFields'),
|
|
161
|
+
saveStandardField: (standardFieldDto) => api.post(basePath + '/standardField', standardFieldDto),
|
|
162
|
+
updateStandardField: (standardFieldDto) => api.put(basePath + '/standardField', standardFieldDto),
|
|
163
|
+
executeFlywayForStandardField: (queryString) =>
|
|
164
|
+
api.post(basePath + '/executeFlywayForStandardField', queryString, { headers: { 'Content-Type': 'text/plain' } }),
|
|
165
|
+
saveRouteGraphs: (graphDto) => api.post(basePath + '/routeGraphs', graphDto),
|
|
166
|
+
getAllLinkedFormsByMenuConfigId: (menuConfigId) =>
|
|
167
|
+
api.get(`${basePath}/linkedFormsByMenuConfigId`, {
|
|
168
|
+
params: { menuConfigId },
|
|
169
|
+
}),
|
|
170
|
+
getAllParentRouteGraphs: (destinationFormCode) =>
|
|
171
|
+
api.get(`${basePath}/parentRouteGraphs`, {
|
|
172
|
+
params: { destinationFormCode },
|
|
173
|
+
}),
|
|
174
|
+
getMigrationQueriesByFormMasterUUID: (formMasterUUID) =>
|
|
175
|
+
api.get(`${basePath}/migrationQueries`, {
|
|
176
|
+
params: { formMasterUUID, isExecuted: false },
|
|
177
|
+
}),
|
|
178
|
+
getExecutedMigrationQueriesByFormMasterUUID: (formMasterUUID) =>
|
|
179
|
+
api.get(`${basePath}/migrationQueries`, {
|
|
180
|
+
params: { formMasterUUID, isExecuted: true },
|
|
181
|
+
}),
|
|
182
|
+
saveMigrationQueryByFormMasterUUID: (migrationQueryDto) => api.post(basePath + '/migrationQuery', migrationQueryDto),
|
|
183
|
+
updateMigrationQueryByUUID: (migrationQueryDto) => api.put(basePath + '/migrationQuery', migrationQueryDto),
|
|
184
|
+
executeMigrationsInDraft: (migrationDto) =>
|
|
185
|
+
api.post(basePath + '/executeMigrations', migrationDto, { params: { type: 'IN_DRAFT' } }),
|
|
186
|
+
executeMigrationsFromDraftToStable: (migrationDto) =>
|
|
187
|
+
api.post(basePath + '/executeMigrations', migrationDto, { params: { type: 'VERSION_CHANGE' } }),
|
|
188
|
+
getAllFormDataStates: () => api.get(basePath + '/formDataStates', { showLoader: false }),
|
|
189
|
+
getAllGlobalVariables: () => api.get(basePath + '/global-variables/list'),
|
|
190
|
+
createGlobalVariable: (globalVariableDto) => api.post(basePath + '/global-variables', globalVariableDto),
|
|
191
|
+
updateGlobalVariable: (uuid, globalVariableDto) =>
|
|
192
|
+
api.put(basePath + '/global-variables', globalVariableDto, {
|
|
193
|
+
params: { uuid },
|
|
194
|
+
}),
|
|
195
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import GeneralUtil from "@/common/services/util/GeneralUtil";
|
|
2
|
+
import { api } from '@/common/interceptors/AxiosInterceptor';
|
|
3
|
+
|
|
4
|
+
export const getLocationTypes = () => api.get('/location/locationtypes');
|
|
5
|
+
|
|
6
|
+
export const getRoleList = () => api.get('/role?is_active=true');
|
|
7
|
+
|
|
8
|
+
export const getAllRoleList = () => api.get('/role');
|
|
9
|
+
|
|
10
|
+
export const execute = (params, config) => {
|
|
11
|
+
return api.post(`/resource/getdatabycode`, params, { ...config, showLoader: config?.showLoader !== false });
|
|
12
|
+
};
|
|
13
|
+
export const executeQuery = (data) => api.post('/resource/getdata', data);
|
|
14
|
+
|
|
15
|
+
export const executeAll = (dataList, config) =>
|
|
16
|
+
api.post('/resource/getalldata', dataList, { ...config, showLoader: config?.showLoader !== false });
|
|
17
|
+
|
|
18
|
+
export const getRecapDetails = (userId) => api.get(`/recap/getRecapDetails`, { params: { userId } });
|
|
19
|
+
|
|
20
|
+
export const createOrUpdateRecapAnalytics = (recapAnalyticsDto) =>
|
|
21
|
+
api.post(`/recap/createOrUpdateRecapAnalytics`, recapAnalyticsDto);
|
|
22
|
+
|
|
23
|
+
export const downloadExcel = (queryUUID, reportExcelDto, title) =>
|
|
24
|
+
api.post(`/report/downloadexcel/${queryUUID}`, reportExcelDto, {
|
|
25
|
+
headers: {
|
|
26
|
+
'Content-Type': 'application/json;charset=UTF-8',
|
|
27
|
+
title: title, // Optional custom header
|
|
28
|
+
},
|
|
29
|
+
responseType: 'arraybuffer',
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export const retrieveAllNotifications = (isActive) => api.get(`/notificationtype`, { is_active: isActive });
|
|
33
|
+
|
|
34
|
+
export const retrieveAllConfigured = (isActive) => api.get('/resource', { params: { is_active: isActive } });
|
|
35
|
+
|
|
36
|
+
export const getNotificationTypeList = () => api.get(`push`);
|
|
37
|
+
|
|
38
|
+
export const getUserDetails = (params) => api.get(`user?userId=${params}`);
|
|
39
|
+
|
|
40
|
+
export const getCourseCompletionDate = (trainingStartDate, courseId) =>
|
|
41
|
+
api.get('course/completiondate', {
|
|
42
|
+
params: { trainingStartDate, courseId },
|
|
43
|
+
showLoader: true,
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export const retrieveById = async (locationId) => {
|
|
47
|
+
try {
|
|
48
|
+
const res = await api.get('/location/byid', { params: { location_id: locationId } });
|
|
49
|
+
return res.data;
|
|
50
|
+
} catch (error) {
|
|
51
|
+
throw new Error(error.message);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export const getCourseById = (courseId) => api.get(GeneralUtil.isTecho? `course/id?id=${courseId}` : `course/${courseId}`, { showLoader: true });
|
|
56
|
+
|
|
57
|
+
export const retrieveAllCourse = (isActive) => {
|
|
58
|
+
const params = isActive !== undefined ? { isActive } : {};
|
|
59
|
+
return api.get('course/all', { params, showLoader: true });
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export const getFileById = (fileId) =>
|
|
63
|
+
api.get(GeneralUtil.isTecho ? `/document/getFileById?id=${fileId}` : `/document/getfile/${fileId}`, {
|
|
64
|
+
responseType: 'blob',
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
export const getNotifications = () => api.get('notificationtype');
|
|
68
|
+
|
|
69
|
+
export const removedDocument = (payload, documentId) => api.put(GeneralUtil.isTecho ? `document/removedocument?id=${documentId}` : `document/removedocument/${documentId}`, payload);
|
|
70
|
+
|
|
71
|
+
export const uploadDocument = (params, moduleName) =>
|
|
72
|
+
api.post(GeneralUtil.isTecho ? `document/uploaddocument?moduleName=${moduleName}&isTemporary=false` : `document/uploaddocument/${moduleName}/false`, { ...params }, { type: 'fileUpload', showLoader: false });
|
|
73
|
+
|
|
74
|
+
export const executeAllQuery = (dataList) => api.post('/resource/getdatas', dataList);
|
|
75
|
+
|
|
76
|
+
export const getReportsList = (params) => api.get('report/getreportlist', { params: { ...params }, showLoader: false });
|
|
77
|
+
|
|
78
|
+
export const getQueryBasedData = (params, showLoader) =>
|
|
79
|
+
api.post('querymanagement/retrieve', params, {
|
|
80
|
+
headers: { 'Content-Type': 'application/json' },
|
|
81
|
+
transformRequest: [(data) => data],
|
|
82
|
+
showLoader: showLoader !== undefined ? showLoader : true,
|
|
83
|
+
});
|
|
84
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//Contains logic to enable route navigation in axios interceptor service
|
|
2
|
+
|
|
3
|
+
import { showToast } from '@/common/toaster/toaster';
|
|
4
|
+
|
|
5
|
+
let navigator = null;
|
|
6
|
+
|
|
7
|
+
export const setNavigator = (nav) => {
|
|
8
|
+
navigator = nav;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const navigate = (to, options) => {
|
|
12
|
+
if (navigator) {
|
|
13
|
+
navigator(to, options);
|
|
14
|
+
} else {
|
|
15
|
+
showToast({ message: 'Navigation function not set', type: 'error' });
|
|
16
|
+
}
|
|
17
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { api } from '@/common/interceptors/AxiosInterceptor';
|
|
2
|
+
import { showToast } from '@/common/toaster/toaster';
|
|
3
|
+
|
|
4
|
+
export const retrieveNextLevel = async (locationIds, level, fetchAccordingToUserAOI, languagePreference) => {
|
|
5
|
+
const ids = Array.isArray(locationIds) ? locationIds : [locationIds];
|
|
6
|
+
|
|
7
|
+
const params = {
|
|
8
|
+
level,
|
|
9
|
+
fetchAccordingToUserAOI,
|
|
10
|
+
languagePreference,
|
|
11
|
+
};
|
|
12
|
+
if (ids.length) {
|
|
13
|
+
params.locationIds = ids.join(',');
|
|
14
|
+
params.locationId = ids[0];
|
|
15
|
+
}
|
|
16
|
+
try {
|
|
17
|
+
const res = await api.get('/location/hierarchy', { params, showLoader: false });
|
|
18
|
+
return res.data;
|
|
19
|
+
} catch (error) {
|
|
20
|
+
console.error(error);
|
|
21
|
+
showToast({ type: 'error', message: 'Can not fetch next level locations' });
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const getParent = async (locationId, languagePreference) => {
|
|
26
|
+
try {
|
|
27
|
+
const res = await api.get('/location/parent', {
|
|
28
|
+
params: { languagePreference, locationId },
|
|
29
|
+
showLoader: false,
|
|
30
|
+
});
|
|
31
|
+
return res.data;
|
|
32
|
+
} catch (error) {
|
|
33
|
+
console.error(error);
|
|
34
|
+
showToast({ type: 'error', message: 'Can not fetch parent details' });
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const createOrUpdate = async (location) => {
|
|
39
|
+
try {
|
|
40
|
+
await api.post('/location', location);
|
|
41
|
+
} catch (error) {
|
|
42
|
+
showToast({ type: '' });
|
|
43
|
+
throw new Error(error.message);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const retrieveNextLevelOfGivenLocationId = async (locationId) => {
|
|
48
|
+
try {
|
|
49
|
+
const res = await api.get('/location/childlocations', { params: { locationId } });
|
|
50
|
+
return res.data;
|
|
51
|
+
} catch (error) {
|
|
52
|
+
throw new Error(error.message);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export const retrieveById = async (locationId) => {
|
|
57
|
+
try {
|
|
58
|
+
const res = await api.get('/location/byid', { params: { location_id: locationId } });
|
|
59
|
+
return res.data;
|
|
60
|
+
} catch (error) {
|
|
61
|
+
throw new Error(error.message);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const retrieveLocationByRoleId = (roleId) => api.get('/location/byroleid', { params: { role_id: roleId } });
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { api } from '@/common/interceptors/AxiosInterceptor';
|
|
2
|
+
|
|
3
|
+
export const retriveLocationType = (params, config) => api.get('/location/locationtypes', { params, ...config });
|
|
4
|
+
|
|
5
|
+
export const createLocationType = (data) => api.post('/resource/getdata/create_location_type', data);
|
|
6
|
+
|
|
7
|
+
export const getLocationTypeById = (data) => api.post('/resource/getdata/retrieve_location_type_by_id', data);
|
|
8
|
+
|
|
9
|
+
export const updateLocationType = (data) => api.post('/resource/getdata/update_location_type', data);
|
|
10
|
+
|
|
11
|
+
export const toggleLocationTypeStatus = (data) => api.post('/resource/getdata/toggle_location_type_status', data);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { api } from '@/common/interceptors/AxiosInterceptor';
|
|
2
|
+
|
|
3
|
+
export const retrieveAllConfigured = (isActive) => api.get('/resource', { params: { is_active: isActive } });
|
|
4
|
+
|
|
5
|
+
export const toggleState = (data) => api.put('/resource', data);
|
|
6
|
+
|
|
7
|
+
export const executeQuery = (data) => api.post('/resource/getdata', data);
|
|
8
|
+
|
|
9
|
+
export const executeForFormConfigurator = (data) => api.post(`/resource/getdataforformconfigurator/${data.code}`, data);
|
|
10
|
+
|
|
11
|
+
export const execute = (params, config) => api.post(`/resource/getdatabycode`, params, config);
|
|
12
|
+
|
|
13
|
+
export const executeWithTimeout = (params) => api.post('/resource/getdatawithtimeout', params);
|
|
14
|
+
|
|
15
|
+
export const executeQueryForFamilyReport = (data) => api.post('/resource/getdata', data);
|
|
16
|
+
|
|
17
|
+
export const executeAllQuery = (dataList) => api.post('/resource/getdatas', dataList);
|
|
18
|
+
|
|
19
|
+
export const executeAll = (dataList) => api.post('/resource/getalldata', dataList);
|
|
20
|
+
|
|
21
|
+
export const getQueryHistory = (data) =>
|
|
22
|
+
api.post('/resource/getdata/retrieve_logged_actions_by_table_name_query_code', data);
|
|
23
|
+
|
|
24
|
+
export const getServerList = () =>
|
|
25
|
+
api.post('/resource/getdata', {
|
|
26
|
+
code: 'get_runqueryactive_server_list',
|
|
27
|
+
parameters: {},
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export const saveOrUpdate = (data) => api.post('/resource', data);
|
|
31
|
+
|
|
32
|
+
export const runQuery = (query) =>
|
|
33
|
+
api.post('/resource/runquery', query, {
|
|
34
|
+
headers: { 'Content-Type': 'application/json' },
|
|
35
|
+
transformRequest: [(data) => data],
|
|
36
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { api } from '@/common/interceptors/AxiosInterceptor';
|
|
2
|
+
import GeneralUtil from './util/GeneralUtil';
|
|
3
|
+
|
|
4
|
+
export const getRoleList = () => api.get('/role?is_active=true');
|
|
5
|
+
|
|
6
|
+
export const getAllRoleList = () => api.get('/role');
|
|
7
|
+
|
|
8
|
+
export const deleteRoleFeature = (id) => api.delete(`/menuconfig/usermenuitem/${id}`);
|
|
9
|
+
|
|
10
|
+
export const getRoleById = (id) => api.get(GeneralUtil.isTecho ? `/role/retrieveById?id=${id}` : `/role/${id}`);
|
|
11
|
+
|
|
12
|
+
// export const getAllTypesForRoles = () =>
|
|
13
|
+
// api.post('/resource/getdata/team_all_types_for_roles', {
|
|
14
|
+
// code: 'team_all_types_for_roles',
|
|
15
|
+
// parameters: {},
|
|
16
|
+
// });
|
|
17
|
+
|
|
18
|
+
// export const getValuesForFormFields = (params) =>
|
|
19
|
+
// api.post('/resource/getdata/retrieve_field_values_for_form_field', {
|
|
20
|
+
// ...params,
|
|
21
|
+
// });
|
|
22
|
+
|
|
23
|
+
export const postRole = (params) => api.post('/role', { ...params });
|
|
24
|
+
export const putRole = (params => GeneralUtil.isTecho ? api.put('/role/update', { ...params }) : api.post('/role', { ...params }))
|
|
25
|
+
|
|
26
|
+
export const ToggleState = (params) =>
|
|
27
|
+
api.put(`role/?is_active=${params.state === 'INACTIVE' ? 'true' : 'false'}`, { ...params });
|
|
28
|
+
export const postNewFeature = (params, id) => api.post(`/menuconfig/assignnewfeature?roleId=${id}`, { ...params });
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { api } from '@/common/interceptors/AxiosInterceptor';
|
|
2
|
+
|
|
3
|
+
export const getServerList = (data) => api.post('/resource/getdata', data);
|
|
4
|
+
export const syncWithServer = (data) => api.post('/server/save/sync-with-server', data);
|
|
5
|
+
export const syncMenuConfigFormsWithServer = (data) =>
|
|
6
|
+
api.post('/sync/commitFromSource/feature', data, {
|
|
7
|
+
withCredentials: true, // Important!
|
|
8
|
+
});
|
|
9
|
+
export const getAllServer = () => api.get('sync/servers');
|
|
10
|
+
export const addServer = (data) => api.post('sync/server', data);
|
|
11
|
+
export const updateServer = (data) => api.put('sync/server', data);
|
|
12
|
+
export const getAllServerDetails = (data) => api.get('sync/serverMappings', data);
|
|
13
|
+
export const addServerMappingList = (data) => api.post('sync/serverMappingList', data);
|
|
14
|
+
export const updateServerMappingList = (data) => api.put('sync/serverMappingList', data);
|
|
15
|
+
export const downloadFeature = (data) => api.post('sync/downloadFeature', data, { responseType: 'blob' });
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { api } from '@/common/interceptors/AxiosInterceptor';
|
|
2
|
+
|
|
3
|
+
export const checkSystemConfigExists = (params) =>
|
|
4
|
+
api.post('resource/getdata/check_if_system_configuration_exists', {
|
|
5
|
+
...params,
|
|
6
|
+
});
|
|
7
|
+
export const postSystemConfig = (params) => api.post('resource/getdata/system_config_add', { ...params });
|
|
8
|
+
export const getSystemConfigsByKey = (params) =>
|
|
9
|
+
api.post('resource/getdata/retrieve_system_configuration_by_key', {
|
|
10
|
+
...params,
|
|
11
|
+
});
|
|
12
|
+
export const updateSystemConfig = (params) =>
|
|
13
|
+
api.post('resource/getdata/system_config_update', { ...params }, { showLoader: false });
|
|
14
|
+
export const getSystemConfigs = (params) =>
|
|
15
|
+
api.post('/resource/getdata/system_configs_retrieve_all', { ...params }, { showLoader: false });
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { api } from '@/common/interceptors/AxiosInterceptor';
|
|
2
|
+
import { execute } from '@/common/services/QueryBuilder';
|
|
3
|
+
|
|
4
|
+
export const createLanguage = (languageDto) => api.post('/translation/languages', languageDto);
|
|
5
|
+
|
|
6
|
+
export const createOrUpdateLanguages = (languageList) => api.post('/translation/languages', languageList);
|
|
7
|
+
|
|
8
|
+
export const updateLanguage = (languageDto) => api.put('/translation/languages', languageDto);
|
|
9
|
+
|
|
10
|
+
export const getAllLanguages = () => api.get('/translation/languages');
|
|
11
|
+
|
|
12
|
+
export const createApp = (appDto) => api.post('/translation/apps', appDto);
|
|
13
|
+
|
|
14
|
+
export const updateApp = (appDto) => api.post('/translation/apps', appDto);
|
|
15
|
+
|
|
16
|
+
export const getAllApps = () => api.get('/translation/apps');
|
|
17
|
+
|
|
18
|
+
export const creatingLabel = (dtoList) => api.post('/translation/labels', dtoList);
|
|
19
|
+
|
|
20
|
+
export const translationMap = (dtoList) => api.post('/translation/map', dtoList);
|
|
21
|
+
|
|
22
|
+
export const addtranslationMap = (dtoList) => api.post('/translation/mapUpdate', dtoList);
|
|
23
|
+
|
|
24
|
+
export const getAppsById = (ids) => api.get('/translation/apps-selected', { params: { ids } });
|
|
25
|
+
|
|
26
|
+
export const getLanguagesById = (ids) => api.get('/translation/languages-selected', { params: { ids } });
|
|
27
|
+
|
|
28
|
+
export const toggleActive = (key, isActive, app) => {
|
|
29
|
+
const params = new URLSearchParams({
|
|
30
|
+
key,
|
|
31
|
+
isActive,
|
|
32
|
+
app,
|
|
33
|
+
}).toString();
|
|
34
|
+
return api.put(`/translation/toggleActive?${params}`, { key, isActive, app });
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export const getAvailableLanguages = () => api.get('/translation/languages-available');
|
|
38
|
+
|
|
39
|
+
export const translateText = (targetLangs, englishText) =>
|
|
40
|
+
api.get('/translation/translate', { params: { targetLangs, englishText } });
|
|
41
|
+
|
|
42
|
+
export const getTranslation = async (preferredLanguage) => {
|
|
43
|
+
try {
|
|
44
|
+
const { data: languages } = await getAllLanguages();
|
|
45
|
+
const preferredLanguageId = languages.find(
|
|
46
|
+
(lang) => lang.active && preferredLanguage !== 'en' && lang.languageKey === preferredLanguage
|
|
47
|
+
)?.id;
|
|
48
|
+
|
|
49
|
+
const { data: response } = await execute({
|
|
50
|
+
code: 'translation_from_language_key',
|
|
51
|
+
parameters: {
|
|
52
|
+
languageId: Number(preferredLanguageId),
|
|
53
|
+
appId: 2,
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const translations = response.result.reduce((acc, translation) => {
|
|
58
|
+
acc[translation.key] = translation.value;
|
|
59
|
+
return acc;
|
|
60
|
+
}, {});
|
|
61
|
+
|
|
62
|
+
return translations;
|
|
63
|
+
} catch (error) {
|
|
64
|
+
console.error('API call failed:', error);
|
|
65
|
+
throw error;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const getTranslationByKey = (formCode) =>
|
|
70
|
+
api.get('/translation/getTranslationsByFormcode', { params: { formCode } });
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { api } from '@/common/interceptors/AxiosInterceptor';
|
|
2
|
+
|
|
3
|
+
// Generates (or re-uses) a TOTP secret and returns the QR provisioning data for the given user.
|
|
4
|
+
export const setupTwoFactor = (userId) => api.post('2fa/setup', null, { params: { userId } });
|
|
5
|
+
|
|
6
|
+
// Verifies the first 6-digit code and marks the user as Google Authenticator verified.
|
|
7
|
+
export const verifyTwoFactor = (userId, code) => api.post('2fa/verify', null, { params: { userId, code } });
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { api } from '@/common/interceptors/AxiosInterceptor';
|
|
2
|
+
|
|
3
|
+
export const getUsersList = (params) =>
|
|
4
|
+
api.get('user/retrievebycriteria', {
|
|
5
|
+
params,
|
|
6
|
+
showLoader: false,
|
|
7
|
+
paramsSerializer: (params) => {
|
|
8
|
+
const searchParams = new URLSearchParams();
|
|
9
|
+
for (const key in params) {
|
|
10
|
+
const value = params[key];
|
|
11
|
+
if (Array.isArray(value)) {
|
|
12
|
+
value.forEach((item) => searchParams.append(key, item));
|
|
13
|
+
} else if (value !== undefined && value !== null) {
|
|
14
|
+
searchParams.append(key, value);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return searchParams.toString();
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
export const toggleUserStatus = (data, params) => api.put('user', data, { params });
|
|
21
|
+
|
|
22
|
+
export const updateUser = (data) => api.post('user', data);
|
|
23
|
+
|
|
24
|
+
export const generateSOHCode = (params) => api.get('user/generateLoginCode', { params });
|
|
25
|
+
|
|
26
|
+
export const getRoles = (params, config) => api.get('role/byroleid', { params, ...config });
|
|
27
|
+
|
|
28
|
+
export const getRoleDetails = (params, config) => api.get('location/byroleid', { params, ...config });
|
|
29
|
+
export const getUserDetails = (params) => api.get(`user?userId=${params}`);
|
|
30
|
+
|
|
31
|
+
export const getPreferredLanguage = (params) => api.get('translation/activeLanguages', { params });
|
|
32
|
+
|
|
33
|
+
export const getBankNamesForPBI = (params) => api.post('resource/getdatabycode', params);
|
|
34
|
+
|
|
35
|
+
export const getLocationTypes = (params) => api.get('location/locationtypes', { params });
|
|
36
|
+
|
|
37
|
+
export const getLocation = (params) => api.get('location/hierarchy', { params });
|
|
38
|
+
|
|
39
|
+
export const checkBankAccountNumberExist = (params) =>
|
|
40
|
+
api.post('resource/getdatabycode', { params: { ...params }, showLoader: false });
|
|
41
|
+
|
|
42
|
+
export const retrieveInfraByRoleLocation = (params) => api.post('resource/getdatabycode', params);
|
|
43
|
+
|
|
44
|
+
export const checkUserAction = ({ action, ...params }) =>
|
|
45
|
+
api.get(`user/${action}`, { params: { ...params }, showLoader: false });
|
|
46
|
+
|
|
47
|
+
export const getResource = (params) => api.post(`resource/getdatabycode`, params, { showLoader: false });
|
|
48
|
+
|
|
49
|
+
export const changePassword = (params) =>
|
|
50
|
+
api.put('user/changepassword', params, {
|
|
51
|
+
withCredentials: true, // Important!
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
export const changePasswordOldtoNew = (params) =>
|
|
55
|
+
api.put('user/selfchangepassword', params, {
|
|
56
|
+
withCredentials: true,
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
export const validateAOI = ({ locationIds, roleId, toBeAdded }) => {
|
|
60
|
+
if (locationIds)
|
|
61
|
+
return api.get(`user/validateaoi?locationIds=${locationIds}&roleId=${roleId}&toBeAdded=${toBeAdded}`);
|
|
62
|
+
else return api.get(`user/validateaoi?roleId=${roleId}&toBeAdded=${toBeAdded}`);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const validateHealthInfra = (infraid, id) =>
|
|
66
|
+
api.get(`user/validateHealthInfra?healthInfraIds=${infraid}&toBeRemoved=${id}`);
|
|
67
|
+
|
|
68
|
+
export const retrieveById = (userId) => api.get(`user?userId=${userId}`);
|
|
69
|
+
|
|
70
|
+
export const retrieveByUserId = (userId) => api.get(`user?userId=${userId}`);
|
|
71
|
+
export const uploadDoctorSignature = (userName, file) => {
|
|
72
|
+
const formData = new FormData();
|
|
73
|
+
formData.append('userName', userName);
|
|
74
|
+
formData.append('file', file);
|
|
75
|
+
|
|
76
|
+
return api
|
|
77
|
+
.post('/doctors/signature', formData, {
|
|
78
|
+
headers: {
|
|
79
|
+
'Content-Type': 'multipart/form-data',
|
|
80
|
+
},
|
|
81
|
+
})
|
|
82
|
+
.then((res) => res.data);
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export const getDoctorSignature = (id) => {
|
|
86
|
+
return api
|
|
87
|
+
.get(`/doctors/signature?doctorId=${id}`, {
|
|
88
|
+
responseType: 'arraybuffer', // <-- important
|
|
89
|
+
})
|
|
90
|
+
.then((res) => res.data);
|
|
91
|
+
};
|