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

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.
@@ -29,7 +29,7 @@ const EKYCCard = () => {
29
29
  kpis: [{
30
30
  count: totalCount,
31
31
  label: t("TOTAL_EKYC"),
32
- link: "/digit-ui/employee/ekyc/dashboard"
32
+ link: "/digit-ui/employee/ekyc/admin-dashboard"
33
33
  }],
34
34
  links: [{
35
35
  label: t("CEO_M.F_DOR_FINANCE_VIEW"),
@@ -2819,7 +2819,9 @@ const SearchFormFieldsComponents = _ref => {
2819
2819
  const useInboxMobileCardsData = _ref => {
2820
2820
  var _Digit$SessionStorage, _Digit$SessionStorage2, _Digit$SessionStorage3;
2821
2821
  let table = _ref.table,
2822
- tenantId = _ref.tenantId;
2822
+ tenantId = _ref.tenantId,
2823
+ _ref$isSupervisor = _ref.isSupervisor,
2824
+ isSupervisor = _ref$isSupervisor === void 0 ? false : _ref$isSupervisor;
2823
2825
  const _useTranslation = useTranslation(),
2824
2826
  t = _useTranslation.t;
2825
2827
  const history = useHistory();
@@ -2831,38 +2833,58 @@ const useInboxMobileCardsData = _ref => {
2831
2833
  getReview = _Digit$Hooks$ekyc$use.getReview;
2832
2834
  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
2835
  React.useEffect(() => {
2834
- if (reviewData) {
2836
+ if (!isSupervisor && reviewData) {
2835
2837
  history.push("/digit-ui/" + userType + "/ekyc/review/" + selectedKno, {
2836
2838
  aadhaarData: reviewData === null || reviewData === void 0 ? void 0 : reviewData.aadhaarData,
2837
2839
  reviewData
2838
2840
  });
2839
2841
  }
2840
- }, [reviewData]);
2842
+ }, [reviewData, isSupervisor]);
2841
2843
  const handleReview = kno => {
2842
2844
  setSelectedKno(kno);
2843
2845
  getReview({
2844
2846
  kno
2845
2847
  });
2846
2848
  };
2849
+ const handleSupervisorReview = id => {
2850
+ history.push("/digit-ui/" + userType + "/ekyc/assign/surveyor-details/" + id);
2851
+ };
2847
2852
  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
- };
2853
+ if (isSupervisor) {
2854
+ var _item$owner;
2855
+ const id = item.id;
2856
+ const status = item.status || "DEFAULT";
2857
+ return {
2858
+ [t("SURVEYOR_NAME")]: /*#__PURE__*/React.createElement("span", {
2859
+ className: "link",
2860
+ onClick: () => handleSupervisorReview(id)
2861
+ }, item.surveyorName || item.name || "NA"),
2862
+ [t("MOBILE_NUMBER")]: item.mobileNo || ((_item$owner = item.owner) === null || _item$owner === void 0 ? void 0 : _item$owner.mobileNumber) || "NA",
2863
+ [t("STATUS")]: /*#__PURE__*/React.createElement("span", {
2864
+ className: "ekyc-status-tag " + status
2865
+ }, t(status)),
2866
+ [t("SERVICE_TYPE")]: item.serviceType || "NA"
2867
+ };
2868
+ } else {
2869
+ const kno = item.kno || item.applicationNumber || "NA";
2870
+ const status = (item.status || "DEFAULT").toUpperCase();
2871
+ const ekycStatus = (item.ekycStatus || item.ekycstatus || "NA").toUpperCase();
2872
+ return {
2873
+ [t("EKYC_APPLICATION_NO")]: /*#__PURE__*/React.createElement("span", {
2874
+ className: "link",
2875
+ onClick: () => handleReview(kno)
2876
+ }, kno),
2877
+ [t("EKYC_CITIZEN_NAME")]: item.citizenName || "NA",
2878
+ [t("EKYC_STATUS")]: /*#__PURE__*/React.createElement("span", {
2879
+ className: "ekyc-status-tag " + status
2880
+ }, t("" + status)),
2881
+ [t("SUBMITTED_AT")]: item.submittedAt ? Digit.DateUtils.ConvertEpochToDate(item.submittedAt) : "-",
2882
+ [t("ASSIGNED_AT")]: item.assignedAt ? Digit.DateUtils.ConvertEpochToDate(item.assignedAt) : "-",
2883
+ [t("EKYC_EKYC_STATUS")]: /*#__PURE__*/React.createElement("span", {
2884
+ className: "ekyc-status-tag " + ekycStatus
2885
+ }, t("" + ekycStatus))
2886
+ };
2887
+ }
2866
2888
  });
2867
2889
  const MobileSortFormValues = () => {
2868
2890
  const sortOrderOptions = [{
@@ -2897,7 +2919,7 @@ const useInboxMobileCardsData = _ref => {
2897
2919
  isTwoDynamicPrefix: true,
2898
2920
  getRedirectionLink: () => {},
2899
2921
  handleClickEnabled: false,
2900
- serviceRequestIdKey: "applicationNo",
2922
+ serviceRequestIdKey: isSupervisor ? "id" : "applicationNo",
2901
2923
  MobileSortFormValues
2902
2924
  };
2903
2925
  };
@@ -5648,70 +5670,6 @@ const SupervisorInboxTableConfig = _ref => {
5648
5670
  };
5649
5671
  };
5650
5672
 
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
-
5715
5673
  const AssignEkyc = () => {
5716
5674
  var _formState$tableForm, _formState$tableForm2, _formState$tableForm3, _formState$tableForm4, _formState$searchForm, _dashboardData$dashbo;
5717
5675
  let tenantId = Digit.ULBService.getCurrentTenantId();
@@ -5890,8 +5848,9 @@ const AssignEkyc = () => {
5890
5848
  sortFormDefaultValues: formState === null || formState === void 0 ? void 0 : formState.tableForm,
5891
5849
  onSortFormReset
5892
5850
  };
5893
- const propsForInboxMobileCards = useSupervisorInboxMobileCardsData({
5894
- table: filteredData
5851
+ const propsForInboxMobileCards = useInboxMobileCardsData({
5852
+ table: filteredData,
5853
+ isSupervisor: true
5895
5854
  });
5896
5855
  return /*#__PURE__*/React.createElement("div", {
5897
5856
  className: "app-container"
@@ -6086,7 +6045,7 @@ const AdminDashboard = () => {
6086
6045
  y1: "15",
6087
6046
  x2: "12",
6088
6047
  y2: "3"
6089
- })), ekycDownloadLoading ? t("DOWNLOADING") || "Downloading..." : t("DOWNLOAD_EXCEL") || "Download Excel")), /*#__PURE__*/React.createElement("div", {
6048
+ })), ekycDownloadLoading ? t("DOWNLOADING") || "Downloading..." : t("DOWNLOAD_EXCEL") || "Download Excel")), /*#__PURE__*/React.createElement(Dashboard, null), /*#__PURE__*/React.createElement("div", {
6090
6049
  className: "admin-performance-section"
6091
6050
  }, /*#__PURE__*/React.createElement("h3", {
6092
6051
  className: "section-title"