@eka-care/abdm-dashboard-stg 0.0.1

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.
Files changed (49) hide show
  1. package/README.md +73 -0
  2. package/eslint.config.js +23 -0
  3. package/index.html +27 -0
  4. package/package.json +46 -0
  5. package/postcss.config.js +6 -0
  6. package/public/headerImg.png +0 -0
  7. package/public/iphoneStep2.png +0 -0
  8. package/public/iphoneStep3.png +0 -0
  9. package/public/vite.svg +1 -0
  10. package/src/abdm-dashboard.tsx +18 -0
  11. package/src/app/store.ts +15 -0
  12. package/src/appointment-token-pdf/pdf-page1.tsx +324 -0
  13. package/src/appointment-token-pdf/pdf-page2.tsx +346 -0
  14. package/src/assets/react.svg +1 -0
  15. package/src/components/abha-metric.tsx +322 -0
  16. package/src/components/abha-workflows.tsx +225 -0
  17. package/src/components/automate-strip.tsx +29 -0
  18. package/src/components/cards/metric-card.tsx +75 -0
  19. package/src/components/cards/request-card.tsx +23 -0
  20. package/src/components/cards/request-cards.tsx +24 -0
  21. package/src/components/cards/workflow-card.tsx +55 -0
  22. package/src/components/custom/calendar.tsx +59 -0
  23. package/src/components/custom/switch.tsx +32 -0
  24. package/src/components/loader/abdm-dash-loader.tsx +21 -0
  25. package/src/components/loader/card-loader.tsx +20 -0
  26. package/src/components/modal/automateTaks-modal.tsx +110 -0
  27. package/src/components/modal/modal.tsx +67 -0
  28. package/src/components/modal/select-lang-modal.tsx +38 -0
  29. package/src/components/notification-header.tsx +11 -0
  30. package/src/features/api/baseApi.ts +23 -0
  31. package/src/features/cardApis/cardApi.ts +15 -0
  32. package/src/features/landingApi/landingApi.ts +20 -0
  33. package/src/features/slice/landingApiSlice.ts +49 -0
  34. package/src/features/tasksApis/taskGetApi.ts +12 -0
  35. package/src/features/tasksApis/taskUpdateApi.ts +15 -0
  36. package/src/home.tsx +132 -0
  37. package/src/index.css +297 -0
  38. package/src/main.tsx +107 -0
  39. package/src/tailwind-theme-config/pds2/border.ts +69 -0
  40. package/src/tailwind-theme-config/pds2/colors.ts +88 -0
  41. package/src/tailwind-theme-config/pds2/spacing.ts +1007 -0
  42. package/src/types/pagify-sdk.d.ts +17 -0
  43. package/src/utils/constants.ts +19 -0
  44. package/src/utils/helpers.ts +32 -0
  45. package/tailwind.config.ts +131 -0
  46. package/tsconfig.app.json +28 -0
  47. package/tsconfig.json +7 -0
  48. package/tsconfig.node.json +26 -0
  49. package/vite.config.ts +62 -0
@@ -0,0 +1,24 @@
1
+ import RequestCard from "./request-card";
2
+
3
+ const RequestCards = () => {
4
+ return (
5
+ <div className="abhaDash-flex abhaDash-flex-wrap abhaDash-p-25 abahDash-w-full abhaDash-justify-between">
6
+ <RequestCard
7
+ bodyText="Request all patients without ABHA to create KYC ABHA"
8
+ btnText="Request Now"
9
+ bodyColor="abhaDash-bg-bg-primary-light"
10
+ />
11
+ <RequestCard
12
+ bodyText="Request patients to complete KYC if not done already"
13
+ btnText="Request Now"
14
+ bodyColor="abhaDash-bg-bg-green-light"
15
+ />
16
+ <RequestCard
17
+ bodyText="Auto-Raise consent for patients when they visit clinic"
18
+ btnText="Enable"
19
+ bodyColor="abhaDash-bg-bg-yellow-light"
20
+ />
21
+ </div>
22
+ );
23
+ };
24
+ export default RequestCards;
@@ -0,0 +1,55 @@
1
+ import { faCircleArrowRight } from "@fortawesome/free-solid-svg-icons";
2
+ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
3
+
4
+ const WorkFlowCard = ({
5
+ bodyColor,
6
+ bodyText,
7
+ icon,
8
+ iconBgGradColorFrom,
9
+ iconBgGradColorTo,
10
+ btnText,
11
+ cta,
12
+ disabled,
13
+ mobileStyling,
14
+ }: {
15
+ bodyColor: string;
16
+ bodyText: string;
17
+ icon: any;
18
+ iconBgGradColorFrom: string;
19
+ iconBgGradColorTo: string;
20
+ btnText: string;
21
+ cta: (() => void) | string;
22
+ disabled: boolean;
23
+ mobileStyling?: string;
24
+ }) => {
25
+ return (
26
+ <div className="abhaDash-flex abhaDash-flex-col abhaDash-h-full">
27
+ <div
28
+ className={`${bodyColor} ${mobileStyling} abhaDash-w-260 abhaDash-border-1 abhaDash-rounded-t-20 abhaDash-border-bg-neutral-100-bg-dark abhaDash-p-20`}
29
+ >
30
+ <div
31
+ className={`${iconBgGradColorFrom} ${iconBgGradColorTo} abhaDash-bg-gradient-to-r abhaDash-text-center abhaDash-rounded-16 abhaDash-p-16 abhaDash-w-64 abhaDash-h-64`}
32
+ >
33
+ <FontAwesomeIcon
34
+ className="abhaDash-w-32 abhaDash-h-32 abhaDash-text-text-white"
35
+ icon={icon}
36
+ />
37
+ </div>
38
+ <div className="AbhaBody2Regular abhaDash-pt-10">{bodyText}</div>
39
+ </div>
40
+ <div
41
+ onClick={() => {
42
+ if (disabled) return;
43
+ if (typeof cta === "function") {
44
+ cta();
45
+ }
46
+ }}
47
+ className="max-md:AbhaTitle2Headline AbhaTitle4Headline abhaDash-cursor-pointer abhaDash-bg-bg-doc abhaDash-text-text-white abhaDash-px-20 abhaDash-py-10 abhaDash-rounded-b-20 abhaDash-flex abhaDash-justify-between abhaDash-items-center"
48
+ >
49
+ {btnText}
50
+ <FontAwesomeIcon icon={faCircleArrowRight} />
51
+ </div>
52
+ </div>
53
+ );
54
+ };
55
+ export default WorkFlowCard;
@@ -0,0 +1,59 @@
1
+ import DatePicker from "react-date-picker";
2
+ import "react-date-picker/dist/DatePicker.css";
3
+ import "react-calendar/dist/Calendar.css";
4
+ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
5
+ import { faCalendar } from "@fortawesome/free-regular-svg-icons";
6
+
7
+ type ValuePiece = Date | null;
8
+ type Value = ValuePiece | [ValuePiece, ValuePiece];
9
+
10
+ type CustomCalendarProps = {
11
+ value: Value;
12
+ onChange: (value: Value) => void;
13
+ placeholder: string;
14
+ disabled: boolean;
15
+ minDate?: Date;
16
+ isOpen?: boolean;
17
+ onCalendarClose?: () => void;
18
+ };
19
+
20
+ const CustomCalendar = ({
21
+ value,
22
+ onChange,
23
+ placeholder,
24
+ disabled,
25
+ minDate,
26
+ isOpen,
27
+ onCalendarClose,
28
+ }: CustomCalendarProps) => {
29
+ const isEmpty = value === null || Array.isArray(value);
30
+
31
+ return (
32
+ <div className={`custom-date-wrapper ${isEmpty ? "date-empty" : ""}`}>
33
+ {isEmpty && <div className="custom-date-placeholder">{placeholder}</div>}
34
+
35
+ <DatePicker
36
+ isOpen={isOpen}
37
+ disabled={disabled}
38
+ returnValue="start"
39
+ maxDate={new Date()}
40
+ minDate={minDate}
41
+ calendarIcon={
42
+ <FontAwesomeIcon
43
+ className={`${disabled ? "abhaDash-text-text-disabled" : "abhaDash-text-text-01"}`}
44
+ icon={faCalendar}
45
+ />
46
+ }
47
+ clearIcon={null}
48
+ onChange={onChange}
49
+ value={value}
50
+ dayPlaceholder=""
51
+ monthPlaceholder=""
52
+ yearPlaceholder=""
53
+ onCalendarClose={onCalendarClose}
54
+ />
55
+ </div>
56
+ );
57
+ };
58
+
59
+ export default CustomCalendar;
@@ -0,0 +1,32 @@
1
+ import { useState } from "react";
2
+
3
+ const SwitchBtn = () => {
4
+ const [isChecked, setIsChecked] = useState(false);
5
+
6
+ return (
7
+ <label className="abhaDash-inline-flex abhaDash-cursor-pointer abhaDash-items-center">
8
+ <div className="abhaDash-relative">
9
+ <input
10
+ type="checkbox"
11
+ checked={isChecked}
12
+ onChange={() => setIsChecked(!isChecked)}
13
+ className="abhaDash-sr-only"
14
+ />
15
+
16
+ <div
17
+ className={`abhaDash-h-8 abhaDash-w-14 abhaDash-rounded-full abhaDash-transition-colors ${
18
+ isChecked ? "abhaDash-bg-bg-doc" : "abhaDash-bg-bg-invert"
19
+ }`}
20
+ />
21
+
22
+ <div
23
+ className={`abhaDash-absolute abhaDash-left-1 abhaDash-top-1 abhaDash-h-6 abhaDash-w-6 abhaDash-rounded-full abhaDash-bg-white abhaDash-transition-transform ${
24
+ isChecked ? "abhaDash-translate-x-6" : ""
25
+ }`}
26
+ />
27
+ </div>
28
+ </label>
29
+ );
30
+ };
31
+
32
+ export default SwitchBtn;
@@ -0,0 +1,21 @@
1
+ const Loader = ({ bgColor }: { bgColor?: string }) => {
2
+ return (
3
+ <div
4
+ className={`abhaDash-w-full abhaDash-h-full abhaDash-flex abhaDash-items-center abhaDash-justify-center ${bgColor ? bgColor : "abhaDash-bg-bg-01"}`}
5
+ >
6
+ <div className="abhaDash_loading">
7
+ <svg width="64px" height="48px">
8
+ <polyline
9
+ points="0.157 23.954, 14 23.954, 21.843 48, 43 0, 50 24, 64 24"
10
+ id="back"
11
+ ></polyline>
12
+ <polyline
13
+ points="0.157 23.954, 14 23.954, 21.843 48, 43 0, 50 24, 64 24"
14
+ id="front"
15
+ ></polyline>
16
+ </svg>
17
+ </div>
18
+ </div>
19
+ );
20
+ };
21
+ export default Loader;
@@ -0,0 +1,20 @@
1
+ interface CardLoaderProps {
2
+ value: number;
3
+ total: number;
4
+ }
5
+
6
+ const CardLoader = ({ value, total }: CardLoaderProps) => {
7
+ const percent =
8
+ total > 0 && value >= 0 ? Math.min((value / total) * 100, 100) : 100;
9
+
10
+ return (
11
+ <div className="abhaDash-w-full abhaDash-h-12 abhaDash-bg-[#DBE5FF] abhaDash-rounded-full abhaDash-mt-10">
12
+ <div
13
+ className="abhaDash-h-full abhaDash-rounded-full abhaDash-bg-[#4D7CFE] transition-all duration-500"
14
+ style={{ width: `${percent}%` }}
15
+ ></div>
16
+ </div>
17
+ );
18
+ };
19
+
20
+ export default CardLoader;
@@ -0,0 +1,110 @@
1
+ import ReactSwitch from "react-switch";
2
+ import { useTaskGetApiQuery } from "../../features/tasksApis/taskGetApi";
3
+ import { useEffect, useState } from "react";
4
+ import { useTaskUpdateApiMutation } from "../../features/tasksApis/taskUpdateApi";
5
+ import { useDispatch, useSelector } from "react-redux";
6
+ import {
7
+ getClinicId,
8
+ setShowAutomateStrip,
9
+ } from "../../features/slice/landingApiSlice";
10
+ import { switchList } from "../../utils/constants";
11
+
12
+ const AutomateTasksModal = ({
13
+ setShowAutomateModal,
14
+ }: {
15
+ setShowAutomateModal: (show: boolean) => void;
16
+ }) => {
17
+ const dispatch = useDispatch();
18
+ const clinicId = useSelector(getClinicId);
19
+ const { data, isSuccess } = useTaskGetApiQuery(clinicId ?? "");
20
+ const [updateTasksApi] = useTaskUpdateApiMutation();
21
+
22
+ const [taskState, setTaskState] = useState({
23
+ kyc: false,
24
+ abha: false,
25
+ consent: false,
26
+ });
27
+
28
+ useEffect(() => {
29
+ if (isSuccess && data?.messaging) {
30
+ setTaskState({
31
+ kyc: data.messaging.kyc,
32
+ abha: data.messaging.abha,
33
+ consent: data.messaging.consent,
34
+ });
35
+ }
36
+ }, [isSuccess, data]);
37
+
38
+ const toggleSwitch = (key: "kyc" | "abha" | "consent") => {
39
+ setTaskState((prev) => ({
40
+ ...prev,
41
+ [key]: !prev[key],
42
+ }));
43
+ };
44
+
45
+ const handleProceed = () => {
46
+ updateTasksApi({
47
+ clinicId: clinicId ?? "",
48
+ body: {
49
+ messaging: {
50
+ kyc: taskState.kyc,
51
+ abha: taskState.abha,
52
+ consent: taskState.consent,
53
+ },
54
+ },
55
+ });
56
+ if (taskState.kyc && taskState.abha && taskState.consent) {
57
+ dispatch(setShowAutomateStrip(false));
58
+ }
59
+ setShowAutomateModal(false);
60
+ };
61
+
62
+ return (
63
+ <div
64
+ className="abhaDash-bg-bg-white abhaDash-rounded-20 abhaDash-border-bg-neutral-100-bg-dark max-md:abhaDash-w-10/12"
65
+ onClick={(e) => e.stopPropagation()}
66
+ >
67
+ <div className="AbhaTitle4Headline abhaDash-text-center abhaDash-w-full abhaDash-px-50 abhaDash-py-15 abhaDash-bg-text-primary-dark abhaDash-text-text-white abhaDash-rounded-t-20">
68
+ Automate tasks & maximise your earnings.
69
+ </div>
70
+
71
+ <div className="abhaDash-p-20">
72
+ {switchList.map(({ label, key }) => (
73
+ <div
74
+ key={key}
75
+ className="abhaDash-flex abhaDash-justify-between abhaDash-gap-10 abhaDash-p-10"
76
+ >
77
+ <label>{label}</label>
78
+ <ReactSwitch
79
+ checked={taskState[key]}
80
+ onChange={() => toggleSwitch(key)}
81
+ onColor="#215fff"
82
+ offColor="#bababa"
83
+ onHandleColor="#FFFFFF"
84
+ offHandleColor="#FFFFFF"
85
+ handleDiameter={18}
86
+ height={22}
87
+ width={42}
88
+ borderRadius={9999}
89
+ activeBoxShadow="0 0 0 0"
90
+ uncheckedIcon={false}
91
+ checkedIcon={false}
92
+ />
93
+ </div>
94
+ ))}
95
+
96
+ {/* Proceed Button */}
97
+ <div className="md:abhaDash-flex md:abhaDash-justify-end max-md:abhaDash-w-full">
98
+ <div
99
+ className="AbhaTitle3Headline max-md:abhaDash-w-full abhaDash-w-1/4 abhaDash-mt-4 abhaDash-py-10 abhaDash-text-center abhaDash-rounded-8 abhaDash-bg-bg-doc abhaDash-text-text-white abhaDash-cursor-pointer"
100
+ onClick={handleProceed}
101
+ >
102
+ Proceed
103
+ </div>
104
+ </div>
105
+ </div>
106
+ </div>
107
+ );
108
+ };
109
+
110
+ export default AutomateTasksModal;
@@ -0,0 +1,67 @@
1
+ import Loader from "../loader/abdm-dash-loader";
2
+ import AutomateTasksModal from "./automateTaks-modal";
3
+ import SelectLangModal from "./select-lang-modal";
4
+
5
+ const Modal = ({
6
+ showAbhaSDK,
7
+ setShowAbhaSDK,
8
+ setShowModal,
9
+ setShowAutomateModal,
10
+ showAutomateModal,
11
+ showModal,
12
+ setShowWorkflowIframe,
13
+ showWorkflowIframe,
14
+ }: {
15
+ showAutomateModal: boolean;
16
+ showModal: boolean;
17
+ setShowModal: (show: boolean) => void;
18
+ showAbhaSDK: boolean;
19
+ setShowWorkflowIframe: (show: boolean) => void;
20
+ showWorkflowIframe: boolean;
21
+ setShowAbhaSDK: (show: boolean) => void;
22
+ setShowAutomateModal: (show: boolean) => void;
23
+ }) => {
24
+ return (
25
+ <div
26
+ className="abhaDash-w-full abhaDash-h-full abhaDash-fixed abhaDash-inset-0 abhaDash-bg-bg-modal-black abhaDash-flex abhaDash-justify-center abhaDash-items-center abhaDash-z-20"
27
+ onClick={() => {
28
+ setShowModal(false);
29
+ setShowAutomateModal(false);
30
+ setShowAbhaSDK(false);
31
+ setShowWorkflowIframe(false);
32
+ }}
33
+ >
34
+ {showAbhaSDK && (
35
+ <div
36
+ className="abhaDash-w-1/3 abhaDash-h-5/6 abhaDash-bg-bg-01 abhaDash-overflow-hidden abhaDash-rounded-8"
37
+ onClick={(e) => e.stopPropagation()}
38
+ >
39
+ <div
40
+ id="abha-container"
41
+ className="abhaDash-h-full abhaDash-overflow-auto"
42
+ ></div>
43
+ </div>
44
+ )}
45
+ {showModal && <SelectLangModal />}
46
+ {showAutomateModal && (
47
+ <AutomateTasksModal setShowAutomateModal={setShowAutomateModal} />
48
+ )}
49
+ {showWorkflowIframe && (
50
+ <div
51
+ className="abhaDash-w-4/5 abhaDash-h-4/5 abhaDash-bg-bg-01 abhaDash-overflow-hidden abhaDash-rounded-8"
52
+ onClick={(e) => e.stopPropagation()}
53
+ >
54
+ <div
55
+ id="iframe-container"
56
+ className="abhaDash-h-full abhaDash-w-full abhaDash-overflow-auto "
57
+ >
58
+ <div className="abhaDash-w-full abhaDash-h-full">
59
+ <Loader />
60
+ </div>
61
+ </div>
62
+ </div>
63
+ )}
64
+ </div>
65
+ );
66
+ };
67
+ export default Modal;
@@ -0,0 +1,38 @@
1
+ const SelectLangModal = () => {
2
+ const list = [
3
+ "English",
4
+ "bengali",
5
+ "hindi",
6
+ "gujarati",
7
+ "marathi",
8
+ "kannada",
9
+ "telugu",
10
+ "punjabi",
11
+ "tamil",
12
+ ];
13
+
14
+ return (
15
+ <div
16
+ className="abhaDash-w-1/5 abhaDash-bg-bg-white abhaDash-rounded-20 abhaDash-border-bg-neutral-100-bg-dark"
17
+ onClick={(e) => e.stopPropagation()} // DO NOT REMOVE
18
+ >
19
+ <div className="AbhaTitle4Headline abhaDash-bg-text-primary-dark abhaDash-text-text-white abhaDash-px-20 abhaDash-py-10 abhaDash-rounded-t-20">
20
+ Select language and download
21
+ </div>
22
+
23
+ <div className="abhaDash-p-20">
24
+ {list.map((val) => (
25
+ <div key={val} className="abhaDash-flex abhaDash-gap-5 abhaDash-p-10">
26
+ <input type="radio" name="language" id={val} />
27
+ <label htmlFor={val}>{val}</label>
28
+ </div>
29
+ ))}
30
+
31
+ <div className="AbhaTitle3Headline abhaDash-mt-4 abhaDash-py-10 abhaDash-text-center abhaDash-rounded-8 abhaDash-bg-bg-doc abhaDash-text-text-white abhaDash-cursor-pointer">
32
+ Download
33
+ </div>
34
+ </div>
35
+ </div>
36
+ );
37
+ };
38
+ export default SelectLangModal;
@@ -0,0 +1,11 @@
1
+ const NotificationHeader = () => {
2
+ return (
3
+ <div className="Body2Regular abhaDash-bg-[#95EAC1] abhaDash-py-6">
4
+ <div className="abhaDash-mx-auto abhaDash-text-center">
5
+ Earn incentives by creating records for patients registered on ABHA
6
+ </div>
7
+ </div>
8
+ );
9
+ };
10
+
11
+ export default NotificationHeader;
@@ -0,0 +1,23 @@
1
+ // src/features/api/baseApi.ts
2
+ import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";
3
+
4
+ export const baseApi = createApi({
5
+ reducerPath: "baseApi",
6
+
7
+ baseQuery: fetchBaseQuery({
8
+ baseUrl:
9
+ import.meta.env.VITE_APP_ENV === "PROD"
10
+ ? "https://ndhm.eka.care"
11
+ : "https://ndhm.dev.eka.care",
12
+
13
+ credentials: "include",
14
+
15
+ prepareHeaders: (headers) => {
16
+ headers.set("client-id", "doc-web");
17
+
18
+ return headers;
19
+ },
20
+ }),
21
+
22
+ endpoints: () => ({}),
23
+ });
@@ -0,0 +1,15 @@
1
+ import { baseApi } from "../api/baseApi";
2
+
3
+ export const cardApi = baseApi.injectEndpoints({
4
+ endpoints: (builder) => ({
5
+ getCard: builder.mutation<any, { clinicId: string; body: any }>({
6
+ query: ({ clinicId, body }) => ({
7
+ url: `/v2/hmis/metrics/cards/${clinicId}`,
8
+ method: "POST",
9
+ body,
10
+ }),
11
+ }),
12
+ }),
13
+ });
14
+
15
+ export const { useGetCardMutation } = cardApi;
@@ -0,0 +1,20 @@
1
+ import { baseApi } from "../api/baseApi";
2
+
3
+ export const landingApi = baseApi.injectEndpoints({
4
+ endpoints: (builder) => ({
5
+ landingApi: builder.query<any, string>({
6
+ query: (clinicId) => `/v2/hmis/${clinicId}/details`,
7
+
8
+ transformResponse: (response, meta) => {
9
+ return {
10
+ data: response,
11
+ httpStatus: meta?.response?.status,
12
+ };
13
+ },
14
+
15
+ keepUnusedDataFor: 60,
16
+ }),
17
+ }),
18
+ });
19
+
20
+ export const { useLandingApiQuery } = landingApi;
@@ -0,0 +1,49 @@
1
+ import { createSlice } from "@reduxjs/toolkit";
2
+ import type { RootState } from "../../app/store";
3
+
4
+ const landingSlice = createSlice({
5
+ name: "landing",
6
+ initialState: {
7
+ clinicName: null,
8
+ hfrId: null,
9
+ clinicId: null,
10
+ dashboardData: {},
11
+ qrURL: null,
12
+ showAutomateStrip: true,
13
+ },
14
+ reducers: {
15
+ setDashboardData(state, action) {
16
+ state.dashboardData = action.payload;
17
+ state.clinicName = action.payload?.name;
18
+ },
19
+ setQrUrl(state, action) {
20
+ state.qrURL = action.payload;
21
+ },
22
+ setHfrId(state, action) {
23
+ state.hfrId = action.payload;
24
+ },
25
+ setClinicId(state, action) {
26
+ state.clinicId = action.payload;
27
+ },
28
+ setShowAutomateStrip(state, action) {
29
+ state.showAutomateStrip = action.payload;
30
+ },
31
+ },
32
+ });
33
+
34
+ export const {
35
+ setDashboardData,
36
+ setQrUrl,
37
+ setClinicId,
38
+ setShowAutomateStrip,
39
+ setHfrId,
40
+ } = landingSlice.actions;
41
+ export const getDashboardData = (state: RootState) =>
42
+ state.landing.dashboardData;
43
+ export const getQrURl = (state: RootState) => state.landing.qrURL;
44
+ export const getClinicName = (state: RootState) => state.landing.clinicName;
45
+ export const getHfrId = (state: RootState) => state.landing.hfrId;
46
+ export const getClinicId = (state: RootState) => state.landing.clinicId;
47
+ export const getShowAutomateStrip = (state: RootState) =>
48
+ state.landing.showAutomateStrip;
49
+ export default landingSlice.reducer;
@@ -0,0 +1,12 @@
1
+ import { baseApi } from "../api/baseApi";
2
+
3
+ export const taskGetApi = baseApi.injectEndpoints({
4
+ endpoints: (builder) => ({
5
+ taskGetApi: builder.query<any, string>({
6
+ query: (clinicId) => `/v1/hmis/${clinicId}/custom-config`,
7
+ keepUnusedDataFor: 0,
8
+ }),
9
+ }),
10
+ });
11
+
12
+ export const { useTaskGetApiQuery } = taskGetApi;
@@ -0,0 +1,15 @@
1
+ import { baseApi } from "../api/baseApi";
2
+
3
+ export const taskUpdateApi = baseApi.injectEndpoints({
4
+ endpoints: (builder) => ({
5
+ taskUpdateApi: builder.mutation<any, { clinicId: string; body: any }>({
6
+ query: ({ clinicId, body }) => ({
7
+ url: `/v1/hmis/${clinicId}/custom-config`,
8
+ method: "PATCH",
9
+ body,
10
+ }),
11
+ }),
12
+ }),
13
+ });
14
+
15
+ export const { useTaskUpdateApiMutation } = taskUpdateApi;