@djb25/digit-ui-module-ekyc 1.0.41 → 1.0.42

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.
@@ -1,7 +1,7 @@
1
- import React, { useRef, useEffect, useMemo, useState, createContext, isValidElement, cloneElement, createElement, useContext, useCallback, useReducer, Fragment } from 'react';
1
+ import React, { useRef, useEffect, useMemo, useState, createContext, useContext, isValidElement, cloneElement, createElement, useCallback, useReducer, Fragment } from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
3
  import { useHistory, Link, useLocation, useParams, useRouteMatch, Switch, Route, Redirect } from 'react-router-dom';
4
- import { PersonIcon, EmployeeModuleCard, Loader, Card, InboxLinks, Table, HomeIcon, TextInput, Header, SubmitBar, DetailsCard, FilterForm, FilterFormField, Dropdown, Label, CustomTooltip, CardLabelError, InboxComposer, EditIcon, DeleteIcon, CardHeader, CardText, LabelFieldPair, CardLabel, ActionBar, Modal, Toast, RadioButtons, CardSubHeader, StatusTable, Row, GenericFileIcon, CheckBox, Menu, LinkButton, UploadFile, FormComposer, VerticalTimeline, Close, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, LayoutWrapper, CitizenHomeCard, DocumentIcon, BackButton } from '@djb25/digit-ui-react-components';
4
+ import { PersonIcon, EmployeeModuleCard, Loader, Card, InboxLinks, Table, HomeIcon, TextInput, Header, SubmitBar, DetailsCard, FilterForm, FilterFormField, Dropdown, Label, CustomTooltip, CardLabelError, SearchField, RadioButtons, InboxComposer, EditIcon, DeleteIcon, CardHeader, CardText, LabelFieldPair, CardLabel, ActionBar, Modal, Toast, CardSubHeader, StatusTable, Row, GenericFileIcon, CheckBox, Menu, LinkButton, UploadFile, FormComposer, VerticalTimeline, Close, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, LayoutWrapper, CitizenHomeCard, DocumentIcon, BackButton } from '@djb25/digit-ui-react-components';
5
5
  import * as Chartjs from 'chart.js/auto';
6
6
  import Chartjs__default, { Chart } from 'chart.js/auto';
7
7
  import { FaUsers, FaCheckCircle, FaClock, FaExclamationTriangle, FaUserTie, FaChartLine, FaSearch, FaArrowRight, FaMapMarkedAlt } from 'react-icons/fa';
@@ -329,7 +329,7 @@ const DesktopInbox = _ref => {
329
329
  Cell: _ref4 => {
330
330
  var _row$original4;
331
331
  let row = _ref4.row;
332
- const status = ((_row$original4 = row.original) === null || _row$original4 === void 0 ? void 0 : _row$original4.status) || "DEFAULT";
332
+ const status = (((_row$original4 = row.original) === null || _row$original4 === void 0 ? void 0 : _row$original4.status) || "DEFAULT").toUpperCase();
333
333
  return /*#__PURE__*/React.createElement("span", {
334
334
  className: "ekyc-status-tag " + status
335
335
  }, t("" + status));
@@ -2442,7 +2442,7 @@ const useInboxTableConfig = _ref => {
2442
2442
  Cell: _ref4 => {
2443
2443
  var _row$original4;
2444
2444
  let row = _ref4.row;
2445
- const status = ((_row$original4 = row.original) === null || _row$original4 === void 0 ? void 0 : _row$original4.status) || "DEFAULT";
2445
+ const status = (((_row$original4 = row.original) === null || _row$original4 === void 0 ? void 0 : _row$original4.status) || "DEFAULT").toUpperCase();
2446
2446
  return /*#__PURE__*/React.createElement("span", {
2447
2447
  className: "ekyc-status-tag " + status
2448
2448
  }, t("" + status));
@@ -2816,6 +2816,92 @@ const SearchFormFieldsComponents = _ref => {
2816
2816
  }), (errors === null || errors === void 0 ? void 0 : errors.kNumber) && /*#__PURE__*/React.createElement(CardLabelError, null, errors.kNumber.message)));
2817
2817
  };
2818
2818
 
2819
+ const useInboxMobileCardsData = _ref => {
2820
+ var _Digit$SessionStorage, _Digit$SessionStorage2, _Digit$SessionStorage3;
2821
+ let table = _ref.table,
2822
+ tenantId = _ref.tenantId;
2823
+ const _useTranslation = useTranslation(),
2824
+ t = _useTranslation.t;
2825
+ const history = useHistory();
2826
+ const _useState = useState(""),
2827
+ selectedKno = _useState[0],
2828
+ setSelectedKno = _useState[1];
2829
+ const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycAPI("review", tenantId),
2830
+ reviewData = _Digit$Hooks$ekyc$use.data,
2831
+ getReview = _Digit$Hooks$ekyc$use.getReview;
2832
+ const userType = ((_Digit$SessionStorage = Digit.SessionStorage.get("User")) === null || _Digit$SessionStorage === void 0 ? void 0 : (_Digit$SessionStorage2 = _Digit$SessionStorage.info) === null || _Digit$SessionStorage2 === void 0 ? void 0 : (_Digit$SessionStorage3 = _Digit$SessionStorage2.type) === null || _Digit$SessionStorage3 === void 0 ? void 0 : _Digit$SessionStorage3.toLowerCase()) || "citizen";
2833
+ React.useEffect(() => {
2834
+ if (reviewData) {
2835
+ history.push("/digit-ui/" + userType + "/ekyc/review/" + selectedKno, {
2836
+ aadhaarData: reviewData === null || reviewData === void 0 ? void 0 : reviewData.aadhaarData,
2837
+ reviewData
2838
+ });
2839
+ }
2840
+ }, [reviewData]);
2841
+ const handleReview = kno => {
2842
+ setSelectedKno(kno);
2843
+ getReview({
2844
+ kno
2845
+ });
2846
+ };
2847
+ const dataForMobileInboxCards = table === null || table === void 0 ? void 0 : table.map(item => {
2848
+ const kno = item.kno || item.applicationNumber || "NA";
2849
+ const status = (item.status || "DEFAULT").toUpperCase();
2850
+ const ekycStatus = (item.ekycStatus || item.ekycstatus || "NA").toUpperCase();
2851
+ return {
2852
+ [t("EKYC_APPLICATION_NO")]: /*#__PURE__*/React.createElement("span", {
2853
+ className: "link",
2854
+ onClick: () => handleReview(kno)
2855
+ }, kno),
2856
+ [t("EKYC_CITIZEN_NAME")]: item.citizenName || "NA",
2857
+ [t("EKYC_STATUS")]: /*#__PURE__*/React.createElement("span", {
2858
+ className: "ekyc-status-tag " + status
2859
+ }, t("" + status)),
2860
+ [t("SUBMITTED_AT")]: item.submittedAt ? Digit.DateUtils.ConvertEpochToDate(item.submittedAt) : "-",
2861
+ [t("ASSIGNED_AT")]: item.assignedAt ? Digit.DateUtils.ConvertEpochToDate(item.assignedAt) : "-",
2862
+ [t("EKYC_EKYC_STATUS")]: /*#__PURE__*/React.createElement("span", {
2863
+ className: "ekyc-status-tag " + ekycStatus
2864
+ }, t("" + ekycStatus))
2865
+ };
2866
+ });
2867
+ const MobileSortFormValues = () => {
2868
+ const sortOrderOptions = [{
2869
+ code: "DESC",
2870
+ i18nKey: "ES_INBOX_DATE_LATEST_FIRST"
2871
+ }, {
2872
+ code: "ASC",
2873
+ i18nKey: "ES_INBOX_DATE_LATEST_LAST"
2874
+ }];
2875
+ const _useFormContext = useFormContext(),
2876
+ controlSortForm = _useFormContext.control;
2877
+ return /*#__PURE__*/React.createElement(SearchField, null, /*#__PURE__*/React.createElement(Controller, {
2878
+ name: "sortOrder",
2879
+ control: controlSortForm,
2880
+ render: _ref2 => {
2881
+ let onChange = _ref2.onChange,
2882
+ value = _ref2.value;
2883
+ return /*#__PURE__*/React.createElement(RadioButtons, {
2884
+ onSelect: e => {
2885
+ onChange(e.code);
2886
+ },
2887
+ selectedOption: sortOrderOptions.filter(option => option.code === value)[0],
2888
+ optionsKey: "i18nKey",
2889
+ name: "sortOrder",
2890
+ options: sortOrderOptions
2891
+ });
2892
+ }
2893
+ }));
2894
+ };
2895
+ return {
2896
+ data: dataForMobileInboxCards,
2897
+ isTwoDynamicPrefix: true,
2898
+ getRedirectionLink: () => {},
2899
+ handleClickEnabled: false,
2900
+ serviceRequestIdKey: "applicationNo",
2901
+ MobileSortFormValues
2902
+ };
2903
+ };
2904
+
2819
2905
  const Inbox = _ref => {
2820
2906
  var _formState$tableForm3, _formState$tableForm4, _formState$searchForm3, _formState$searchForm4;
2821
2907
  let parentRoute = _ref.parentRoute;
@@ -3039,13 +3125,39 @@ const Inbox = _ref => {
3039
3125
  width: "70%"
3040
3126
  }
3041
3127
  }));
3128
+ const onMobileSortOrderData = data => {
3129
+ const sortOrder = data.sortOrder;
3130
+ dispatch({
3131
+ action: "mutateTableForm",
3132
+ data: _extends({}, formState.tableForm, {
3133
+ sortOrder
3134
+ })
3135
+ });
3136
+ };
3137
+ const onSortFormReset = setSortFormValue => {
3138
+ setSortFormValue("sortOrder", "DESC");
3139
+ dispatch({
3140
+ action: "mutateTableForm",
3141
+ data: tableOrderFormDefaultValues
3142
+ });
3143
+ };
3144
+ const propsForMobileSortForm = {
3145
+ onMobileSortOrderData,
3146
+ sortFormDefaultValues: formState === null || formState === void 0 ? void 0 : formState.tableForm,
3147
+ onSortFormReset
3148
+ };
3149
+ const propsForInboxMobileCards = useInboxMobileCardsData({
3150
+ table: filteredData,
3151
+ tenantId
3152
+ });
3042
3153
  const isInboxLoading = isListLoading || isSearchLoading;
3043
3154
  return /*#__PURE__*/React.createElement("div", {
3044
3155
  className: "app-container"
3045
3156
  }, /*#__PURE__*/React.createElement(InboxComposer, _extends({
3046
3157
  isInboxLoading
3047
- }, propsForSearchForm, {
3158
+ }, propsForSearchForm, propsForMobileSortForm, {
3048
3159
  propsForInboxTable,
3160
+ propsForInboxMobileCards,
3049
3161
  formState,
3050
3162
  countData: listData
3051
3163
  })));
@@ -5536,6 +5648,70 @@ const SupervisorInboxTableConfig = _ref => {
5536
5648
  };
5537
5649
  };
5538
5650
 
5651
+ const useSupervisorInboxMobileCardsData = _ref => {
5652
+ var _Digit$SessionStorage, _Digit$SessionStorage2, _Digit$SessionStorage3;
5653
+ let table = _ref.table;
5654
+ const _useTranslation = useTranslation(),
5655
+ t = _useTranslation.t;
5656
+ const history = useHistory();
5657
+ const userType = ((_Digit$SessionStorage = Digit.SessionStorage.get("User")) === null || _Digit$SessionStorage === void 0 ? void 0 : (_Digit$SessionStorage2 = _Digit$SessionStorage.info) === null || _Digit$SessionStorage2 === void 0 ? void 0 : (_Digit$SessionStorage3 = _Digit$SessionStorage2.type) === null || _Digit$SessionStorage3 === void 0 ? void 0 : _Digit$SessionStorage3.toLowerCase()) || "citizen";
5658
+ const handleReview = id => {
5659
+ history.push("/digit-ui/" + userType + "/ekyc/assign/surveyor-details/" + id);
5660
+ };
5661
+ const dataForMobileInboxCards = table === null || table === void 0 ? void 0 : table.map(item => {
5662
+ var _item$owner;
5663
+ const id = item.id;
5664
+ const status = item.status || "DEFAULT";
5665
+ return {
5666
+ [t("SURVEYOR_NAME")]: /*#__PURE__*/React.createElement("span", {
5667
+ className: "link",
5668
+ onClick: () => handleReview(id)
5669
+ }, item.surveyorName || item.name || "NA"),
5670
+ [t("MOBILE_NUMBER")]: item.mobileNo || ((_item$owner = item.owner) === null || _item$owner === void 0 ? void 0 : _item$owner.mobileNumber) || "NA",
5671
+ [t("STATUS")]: /*#__PURE__*/React.createElement("span", {
5672
+ className: "ekyc-status-tag " + status
5673
+ }, t(status)),
5674
+ [t("SERVICE_TYPE")]: item.serviceType || "NA"
5675
+ };
5676
+ });
5677
+ const MobileSortFormValues = () => {
5678
+ const sortOrderOptions = [{
5679
+ code: "DESC",
5680
+ i18nKey: "ES_INBOX_DATE_LATEST_FIRST"
5681
+ }, {
5682
+ code: "ASC",
5683
+ i18nKey: "ES_INBOX_DATE_LATEST_LAST"
5684
+ }];
5685
+ const _useFormContext = useFormContext(),
5686
+ controlSortForm = _useFormContext.control;
5687
+ return /*#__PURE__*/React.createElement(SearchField, null, /*#__PURE__*/React.createElement(Controller, {
5688
+ name: "sortOrder",
5689
+ control: controlSortForm,
5690
+ render: _ref2 => {
5691
+ let onChange = _ref2.onChange,
5692
+ value = _ref2.value;
5693
+ return /*#__PURE__*/React.createElement(RadioButtons, {
5694
+ onSelect: e => {
5695
+ onChange(e.code);
5696
+ },
5697
+ selectedOption: sortOrderOptions.filter(option => option.code === value)[0],
5698
+ optionsKey: "i18nKey",
5699
+ name: "sortOrder",
5700
+ options: sortOrderOptions
5701
+ });
5702
+ }
5703
+ }));
5704
+ };
5705
+ return {
5706
+ data: dataForMobileInboxCards,
5707
+ isTwoDynamicPrefix: true,
5708
+ getRedirectionLink: () => {},
5709
+ handleClickEnabled: false,
5710
+ serviceRequestIdKey: "id",
5711
+ MobileSortFormValues
5712
+ };
5713
+ };
5714
+
5539
5715
  const AssignEkyc = () => {
5540
5716
  var _formState$tableForm, _formState$tableForm2, _formState$tableForm3, _formState$tableForm4, _formState$searchForm, _dashboardData$dashbo;
5541
5717
  let tenantId = Digit.ULBService.getCurrentTenantId();
@@ -5693,12 +5869,37 @@ const AssignEkyc = () => {
5693
5869
  }
5694
5870
  }));
5695
5871
  const isInboxLoading = isLoading;
5872
+ const onMobileSortOrderData = data => {
5873
+ const sortOrder = data.sortOrder;
5874
+ dispatch({
5875
+ action: "mutateTableForm",
5876
+ data: _extends({}, formState.tableForm, {
5877
+ sortOrder
5878
+ })
5879
+ });
5880
+ };
5881
+ const onSortFormReset = setSortFormValue => {
5882
+ setSortFormValue("sortOrder", "DESC");
5883
+ dispatch({
5884
+ action: "mutateTableForm",
5885
+ data: tableOrderFormDefaultValues
5886
+ });
5887
+ };
5888
+ const propsForMobileSortForm = {
5889
+ onMobileSortOrderData,
5890
+ sortFormDefaultValues: formState === null || formState === void 0 ? void 0 : formState.tableForm,
5891
+ onSortFormReset
5892
+ };
5893
+ const propsForInboxMobileCards = useSupervisorInboxMobileCardsData({
5894
+ table: filteredData
5895
+ });
5696
5896
  return /*#__PURE__*/React.createElement("div", {
5697
5897
  className: "app-container"
5698
5898
  }, /*#__PURE__*/React.createElement(InboxComposer, _extends({
5699
5899
  isInboxLoading
5700
- }, propsForSearchForm, {
5900
+ }, propsForSearchForm, propsForMobileSortForm, {
5701
5901
  propsForInboxTable,
5902
+ propsForInboxMobileCards,
5702
5903
  formState,
5703
5904
  countData: dashboardData === null || dashboardData === void 0 ? void 0 : dashboardData.dashboardInfo,
5704
5905
  isCardLoading: isDataSearchLoading
@@ -5866,14 +6067,7 @@ const AdminDashboard = () => {
5866
6067
  }, mobileNumber))), /*#__PURE__*/React.createElement("button", {
5867
6068
  className: "download-excel-btn",
5868
6069
  disabled: ekycDownloadLoading,
5869
- onClick: handleDownloadEkycData,
5870
- style: {
5871
- margin: 0,
5872
- padding: "8px 16px",
5873
- height: "auto",
5874
- minHeight: "36px",
5875
- width: "auto"
5876
- }
6070
+ onClick: handleDownloadEkycData
5877
6071
  }, /*#__PURE__*/React.createElement("svg", {
5878
6072
  width: "16",
5879
6073
  height: "16",
@@ -5882,10 +6076,7 @@ const AdminDashboard = () => {
5882
6076
  stroke: "currentColor",
5883
6077
  strokeWidth: "2.5",
5884
6078
  strokeLinecap: "round",
5885
- strokeLinejoin: "round",
5886
- style: {
5887
- marginRight: "8px"
5888
- }
6079
+ strokeLinejoin: "round"
5889
6080
  }, /*#__PURE__*/React.createElement("path", {
5890
6081
  d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"
5891
6082
  }), /*#__PURE__*/React.createElement("polyline", {
@@ -5896,189 +6087,56 @@ const AdminDashboard = () => {
5896
6087
  x2: "12",
5897
6088
  y2: "3"
5898
6089
  })), ekycDownloadLoading ? t("DOWNLOADING") || "Downloading..." : t("DOWNLOAD_EXCEL") || "Download Excel")), /*#__PURE__*/React.createElement("div", {
5899
- style: {
5900
- marginTop: "32px"
5901
- }
6090
+ className: "admin-performance-section"
5902
6091
  }, /*#__PURE__*/React.createElement("h3", {
5903
- style: {
5904
- fontSize: "20px",
5905
- fontWeight: "700",
5906
- color: "#101828",
5907
- marginBottom: "20px"
5908
- }
6092
+ className: "section-title"
5909
6093
  }, t("EKYC_VENDORS_PERFORMANCE") || "eKYC Vendors Performance"), isVendorSearchLoading || isProgressLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", {
5910
- style: {
5911
- display: "grid",
5912
- gridTemplateColumns: "repeat(3, 1fr)",
5913
- gap: "24px",
5914
- width: "100%"
5915
- }
6094
+ className: "vendors-grid"
5916
6095
  }, vendorsList.length === 0 ? /*#__PURE__*/React.createElement("div", {
5917
- style: {
5918
- gridColumn: "span 3",
5919
- textAlign: "center",
5920
- padding: "40px",
5921
- color: "#64748B",
5922
- fontSize: "16px"
5923
- }
6096
+ className: "no-vendors"
5924
6097
  }, t("NO_VENDORS_FOUND") || "No vendors found.") : vendorsList.map(vendor => /*#__PURE__*/React.createElement("div", {
5925
6098
  key: vendor.id,
5926
- onClick: () => history.push("/digit-ui/employee/ekyc/vendors/" + vendor.id),
5927
- style: {
5928
- background: "#ffffff",
5929
- border: "1px solid #E2E8F0",
5930
- borderRadius: "16px",
5931
- padding: "24px",
5932
- boxShadow: "0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03)",
5933
- cursor: "pointer",
5934
- transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",
5935
- display: "flex",
5936
- flexDirection: "column",
5937
- justifyContent: "space-between",
5938
- gap: "16px"
5939
- },
5940
- onMouseEnter: e => {
5941
- e.currentTarget.style.transform = "translateY(-4px)";
5942
- e.currentTarget.style.boxShadow = "0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04)";
5943
- e.currentTarget.style.borderColor = "#CBD5E1";
5944
- },
5945
- onMouseLeave: e => {
5946
- e.currentTarget.style.transform = "translateY(0)";
5947
- e.currentTarget.style.boxShadow = "0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03)";
5948
- e.currentTarget.style.borderColor = "#E2E8F0";
5949
- }
6099
+ className: "vendor-perf-card",
6100
+ onClick: () => history.push("/digit-ui/employee/ekyc/vendors/" + vendor.id)
5950
6101
  }, /*#__PURE__*/React.createElement("div", {
5951
- style: {
5952
- display: "flex",
5953
- justifyContent: "space-between",
5954
- alignItems: "flex-start"
5955
- }
5956
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h4", {
5957
- style: {
5958
- fontSize: "18px",
5959
- fontWeight: "700",
5960
- color: "#0B2559",
5961
- margin: 0
5962
- }
5963
- }, vendor.name), /*#__PURE__*/React.createElement("p", {
5964
- style: {
5965
- fontSize: "12px",
5966
- color: "#64748B",
5967
- marginTop: "2px",
5968
- marginBottom: 0
5969
- }
5970
- }, t("MOBILE") || "Mobile", ": ", vendor.mobileNumber)), /*#__PURE__*/React.createElement("span", {
5971
- style: {
5972
- background: "#E0F2FE",
5973
- color: "#0369A1",
5974
- padding: "6px 12px",
5975
- borderRadius: "999px",
5976
- fontSize: "13px",
5977
- fontWeight: "700"
5978
- }
6102
+ className: "card-header"
6103
+ }, /*#__PURE__*/React.createElement("div", {
6104
+ className: "vendor-info"
6105
+ }, /*#__PURE__*/React.createElement("h4", null, vendor.name), /*#__PURE__*/React.createElement("p", null, t("MOBILE") || "Mobile", ": ", vendor.mobileNumber)), /*#__PURE__*/React.createElement("span", {
6106
+ className: "progress-badge"
5979
6107
  }, vendor.progress, "%")), /*#__PURE__*/React.createElement("div", {
5980
- style: {
5981
- width: "100%",
5982
- height: "8px",
5983
- background: "#F1F5F9",
5984
- borderRadius: "999px",
5985
- overflow: "hidden"
5986
- }
6108
+ className: "progress-bar-container"
5987
6109
  }, /*#__PURE__*/React.createElement("div", {
6110
+ className: "progress-bar-fill",
5988
6111
  style: {
5989
- width: vendor.progress + "%",
5990
- height: "100%",
5991
- background: "linear-gradient(90deg, #3B82F6 0%, #10B981 100%)",
5992
- borderRadius: "999px"
6112
+ width: vendor.progress + "%"
5993
6113
  }
5994
6114
  })), /*#__PURE__*/React.createElement("div", {
5995
- style: {
5996
- display: "grid",
5997
- gridTemplateColumns: "repeat(3, 1fr)",
5998
- gap: "12px"
5999
- }
6115
+ className: "stats-grid"
6000
6116
  }, /*#__PURE__*/React.createElement("div", {
6001
- style: {
6002
- background: "#F8FAFC",
6003
- padding: "12px 8px",
6004
- borderRadius: "10px",
6005
- textAlign: "center"
6006
- }
6117
+ className: "stat-item"
6007
6118
  }, /*#__PURE__*/React.createElement("div", {
6008
- style: {
6009
- fontSize: "16px",
6010
- fontWeight: "700",
6011
- color: "#1E293B"
6012
- }
6119
+ className: "value"
6013
6120
  }, vendor.supervisors), /*#__PURE__*/React.createElement("div", {
6014
- style: {
6015
- fontSize: "10px",
6016
- fontWeight: "600",
6017
- color: "#64748B",
6018
- textTransform: "uppercase",
6019
- marginTop: "4px"
6020
- }
6121
+ className: "label"
6021
6122
  }, t("SUPERVISORS") || "Supervisors")), /*#__PURE__*/React.createElement("div", {
6022
- style: {
6023
- background: "#F8FAFC",
6024
- padding: "12px 8px",
6025
- borderRadius: "10px",
6026
- textAlign: "center"
6027
- }
6123
+ className: "stat-item"
6028
6124
  }, /*#__PURE__*/React.createElement("div", {
6029
- style: {
6030
- fontSize: "16px",
6031
- fontWeight: "700",
6032
- color: "#1E293B"
6033
- }
6125
+ className: "value"
6034
6126
  }, vendor.surveyors), /*#__PURE__*/React.createElement("div", {
6035
- style: {
6036
- fontSize: "10px",
6037
- fontWeight: "600",
6038
- color: "#64748B",
6039
- textTransform: "uppercase",
6040
- marginTop: "4px"
6041
- }
6127
+ className: "label"
6042
6128
  }, t("SURVEYORS") || "Surveyors")), /*#__PURE__*/React.createElement("div", {
6043
- style: {
6044
- background: "#F8FAFC",
6045
- padding: "12px 8px",
6046
- borderRadius: "10px",
6047
- textAlign: "center"
6048
- }
6129
+ className: "stat-item"
6049
6130
  }, /*#__PURE__*/React.createElement("div", {
6050
- style: {
6051
- fontSize: "16px",
6052
- fontWeight: "700",
6053
- color: "#10B981"
6054
- }
6131
+ className: "value completed-val"
6055
6132
  }, vendor.completed), /*#__PURE__*/React.createElement("div", {
6056
- style: {
6057
- fontSize: "10px",
6058
- fontWeight: "600",
6059
- color: "#64748B",
6060
- textTransform: "uppercase",
6061
- marginTop: "4px"
6062
- }
6133
+ className: "label"
6063
6134
  }, t("COMPLETED") || "Completed"))), /*#__PURE__*/React.createElement("div", {
6064
- style: {
6065
- display: "flex",
6066
- justifyContent: "space-between",
6067
- fontSize: "12px",
6068
- color: "#64748B",
6069
- borderTop: "1px solid #F1F5F9",
6070
- paddingTop: "12px"
6071
- }
6135
+ className: "card-footer"
6072
6136
  }, /*#__PURE__*/React.createElement("span", null, t("PENDING") || "Pending", ": ", /*#__PURE__*/React.createElement("span", {
6073
- style: {
6074
- fontWeight: "700",
6075
- color: "#F59E0B"
6076
- }
6137
+ className: "pending-count"
6077
6138
  }, vendor.pending)), /*#__PURE__*/React.createElement("span", null, t("REJECTED") || "Rejected", ": ", /*#__PURE__*/React.createElement("span", {
6078
- style: {
6079
- fontWeight: "700",
6080
- color: "#EF4444"
6081
- }
6139
+ className: "rejected-count"
6082
6140
  }, vendor.rejected))))))));
6083
6141
  };
6084
6142
 
@@ -6962,7 +7020,10 @@ const AssignEkycModal = _ref => {
6962
7020
  accessor: "ekycStatus",
6963
7021
  Cell: _ref5 => {
6964
7022
  let value = _ref5.value;
6965
- return value || "-";
7023
+ const status = (value || "NA").toUpperCase();
7024
+ return value ? /*#__PURE__*/React.createElement("span", {
7025
+ className: "ekyc-status-tag " + status
7026
+ }, t(status)) : "-";
6966
7027
  }
6967
7028
  }], [selectedKnos, tableData]);
6968
7029
  const handleSelect = kno => {
@@ -7197,7 +7258,10 @@ const SurveyorDetailsDashboard = () => {
7197
7258
  accessor: "ekycStatus",
7198
7259
  Cell: _ref => {
7199
7260
  let value = _ref.value;
7200
- return value || "-";
7261
+ const status = (value || "NA").toUpperCase();
7262
+ return value ? /*#__PURE__*/React.createElement("span", {
7263
+ className: "ekyc-status-tag " + status
7264
+ }, t(status)) : "-";
7201
7265
  }
7202
7266
  }, {
7203
7267
  Header: t("SUBMITTED_AT") || "Submitted At",
@@ -9392,13 +9456,39 @@ const Inbox$1 = _ref => {
9392
9456
  width: "70%"
9393
9457
  }
9394
9458
  }));
9459
+ const onMobileSortOrderData = data => {
9460
+ const sortOrder = data.sortOrder;
9461
+ dispatch({
9462
+ action: "mutateTableForm",
9463
+ data: _extends({}, formState.tableForm, {
9464
+ sortOrder
9465
+ })
9466
+ });
9467
+ };
9468
+ const onSortFormReset = setSortFormValue => {
9469
+ setSortFormValue("sortOrder", "DESC");
9470
+ dispatch({
9471
+ action: "mutateTableForm",
9472
+ data: tableOrderFormDefaultValues
9473
+ });
9474
+ };
9475
+ const propsForMobileSortForm = {
9476
+ onMobileSortOrderData,
9477
+ sortFormDefaultValues: formState === null || formState === void 0 ? void 0 : formState.tableForm,
9478
+ onSortFormReset
9479
+ };
9480
+ const propsForInboxMobileCards = useInboxMobileCardsData({
9481
+ table: filteredData,
9482
+ tenantId
9483
+ });
9395
9484
  const isInboxLoading = isLoading || isSearchLoading;
9396
9485
  return /*#__PURE__*/React.createElement("div", {
9397
9486
  className: "app-container"
9398
9487
  }, /*#__PURE__*/React.createElement(InboxComposer, _extends({
9399
9488
  isInboxLoading
9400
- }, propsForSearchForm, {
9489
+ }, propsForSearchForm, propsForMobileSortForm, {
9401
9490
  propsForInboxTable,
9491
+ propsForInboxMobileCards,
9402
9492
  formState
9403
9493
  })));
9404
9494
  };