@mseva/digit-ui-module-ndc 1.0.71 → 1.0.72-dev.1.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.
@@ -1,9 +1,9 @@
1
- import { Card, Banner, ActionBar, SubmitBar as SubmitBar$1, PrivateRoute, BreadCrumb, AppContainer, Dropdown, UploadFile, Modal, FormComposer, Toast, Loader as Loader$1, LinkButton, CardSubHeader, StatusTable, Row, TextInput, CardLabel, FilterFormField, RadioButtons, Menu, EmployeeModuleCard, SearchField, CheckBox, ComplaintIcon, Header, InboxComposer, MobileNumber, CardLabelError, SearchAction, PopUp, DetailsCard, SearchForm, CloseSvg, Table, CardHeader, LabelFieldPair, DeleteIcon, KeyNote } from '@mseva/digit-ui-react-components';
1
+ import { Card, Banner, ActionBar, SubmitBar as SubmitBar$1, PrivateRoute, BreadCrumb, AppContainer, Dropdown, UploadFile, Modal, FormComposer, Toast, Loader as Loader$1, LinkButton, CardSubHeader, StatusTable, Row, TextInput, CardLabel, FilterFormField, RadioButtons, Menu, EmployeeModuleCard, SearchField, ComplaintIcon, InboxComposer, FilterForm, Table, MobileNumber, CardLabelError, SearchAction, PopUp, DetailsCard, SearchForm, CloseSvg, CardHeader, LabelFieldPair, DeleteIcon, Header, KeyNote } from '@mseva/digit-ui-react-components';
2
2
  import React, { Fragment as Fragment$1, useState, useEffect, useMemo, useRef, useReducer, useCallback, forwardRef } from 'react';
3
3
  import { useHistory, useLocation, Switch, Route, useRouteMatch, useParams, Link } from 'react-router-dom';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import { useDispatch, useSelector } from 'react-redux';
6
- import { useForm, Controller, useFormContext, FormProvider, useFieldArray } from 'react-hook-form';
6
+ import { useForm, Controller, useController, useFormContext, FormProvider, useFieldArray } from 'react-hook-form';
7
7
  import 'react-query';
8
8
  import { combineReducers } from 'redux';
9
9
 
@@ -2030,6 +2030,7 @@ const getTimelineAcknowledgementData = (workflowDetails, tenantInfo, pdfFiles =
2030
2030
  const formats = (downloadLink === null || downloadLink === void 0 ? void 0 : (_downloadLink$split = downloadLink.split(",")) === null || _downloadLink$split === void 0 ? void 0 : _downloadLink$split.filter(Boolean)) || [];
2031
2031
  return (formats === null || formats === void 0 ? void 0 : formats.find(link => !(link !== null && link !== void 0 && link.includes("large")) && !(link !== null && link !== void 0 && link.includes("medium")) && !(link !== null && link !== void 0 && link.includes("small")))) || (formats === null || formats === void 0 ? void 0 : formats[0]) || "";
2032
2032
  };
2033
+ const pattern = /\[#\?.*?\*\*\]/;
2033
2034
  const timelineRows = timeline.map((item, index) => {
2034
2035
  var _item$auditDetails, _item$auditDetails2, _item$assigner, _item$assigner2, _item$assigner3, _item$wfComment;
2035
2036
  const createdDate = (item === null || item === void 0 ? void 0 : (_item$auditDetails = item.auditDetails) === null || _item$auditDetails === void 0 ? void 0 : _item$auditDetails.created) || "N/A";
@@ -2039,7 +2040,8 @@ const getTimelineAcknowledgementData = (workflowDetails, tenantInfo, pdfFiles =
2039
2040
  const mobileNumber = (item === null || item === void 0 ? void 0 : (_item$assigner3 = item.assigner) === null || _item$assigner3 === void 0 ? void 0 : _item$assigner3.mobileNumber) || "N/A";
2040
2041
  const action = (item === null || item === void 0 ? void 0 : item.performedAction) || "N/A";
2041
2042
  const status = (item === null || item === void 0 ? void 0 : item.status) || (item === null || item === void 0 ? void 0 : item.state) || "N/A";
2042
- const comment = (item === null || item === void 0 ? void 0 : (_item$wfComment = item.wfComment) === null || _item$wfComment === void 0 ? void 0 : _item$wfComment[0]) || "-";
2043
+ const rawComment = (item === null || item === void 0 ? void 0 : (_item$wfComment = item.wfComment) === null || _item$wfComment === void 0 ? void 0 : _item$wfComment[0]) || "-";
2044
+ const comment = typeof rawComment === "string" ? rawComment.split(pattern)[0] : rawComment;
2043
2045
  const documents = (item === null || item === void 0 ? void 0 : item.wfDocuments) || [];
2044
2046
  const sla = (item === null || item === void 0 ? void 0 : item.sla) || "N/A";
2045
2047
  const assignedTo = Array.isArray(item === null || item === void 0 ? void 0 : item.assignes) ? item.assignes.map(a => a === null || a === void 0 ? void 0 : a.name).filter(Boolean).join(", ") : "";
@@ -2549,7 +2551,7 @@ const availableOptions = [{
2549
2551
  name: "No"
2550
2552
  }];
2551
2553
  const ApplicationOverview = () => {
2552
- var _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _user, _user$info, _user$info$roles, _user2, _user2$info, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetailsTemp$, _workflowDetailsTemp$2, _applicationDetails$A5, _applicationDetails$A6, _propertyDetailsFetch3, _applicationDetails$A7, _applicationDetails$A8, _Object$entries, _displayData$NdcDetai2, _displayData$Document, _applicationDetails$A21, _applicationDetails$A22, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$data11, _applicationDetails$A23, _applicationDetails$A24, _workflowDetails$data12;
2554
+ var _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _user, _user$info, _user$info$roles, _user2, _user2$info, _user2$info$roles$fin, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetailsTemp$, _workflowDetailsTemp$2, _applicationDetails$A5, _applicationDetails$A6, _propertyDetailsFetch3, _applicationDetails$A7, _applicationDetails$A8, _Object$entries, _displayData$NdcDetai2, _displayData$Document, _applicationDetails$A21, _applicationDetails$A22, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$data11, _applicationDetails$A23, _applicationDetails$A24, _workflowDetails$data12;
2553
2555
  const {
2554
2556
  id
2555
2557
  } = useParams();
@@ -2668,7 +2670,7 @@ const ApplicationOverview = () => {
2668
2670
  user = userInfo === null || userInfo === void 0 ? void 0 : userInfo.value;
2669
2671
  }
2670
2672
  const userRoles = (_user = user) === null || _user === void 0 ? void 0 : (_user$info = _user.info) === null || _user$info === void 0 ? void 0 : (_user$info$roles = _user$info.roles) === null || _user$info$roles === void 0 ? void 0 : _user$info$roles.map(e => e.code);
2671
- const isCemp = (_user2 = user) === null || _user2 === void 0 ? void 0 : (_user2$info = _user2.info) === null || _user2$info === void 0 ? void 0 : _user2$info.roles.filter(role => role.code === "CEMP");
2673
+ const isCemp = (_user2 = user) === null || _user2 === void 0 ? void 0 : (_user2$info = _user2.info) === null || _user2$info === void 0 ? void 0 : (_user2$info$roles$fin = _user2$info.roles.find(role => role.code === "CEMP")) === null || _user2$info$roles$fin === void 0 ? void 0 : _user2$info$roles$fin.code;
2672
2674
  let actions = (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data6 = workflowDetails.data) === null || _workflowDetails$data6 === void 0 ? void 0 : (_workflowDetails$data7 = _workflowDetails$data6.actionState) === null || _workflowDetails$data7 === void 0 ? void 0 : (_workflowDetails$data8 = _workflowDetails$data7.nextActions) === null || _workflowDetails$data8 === void 0 ? void 0 : _workflowDetails$data8.filter(e => {
2673
2675
  return (userRoles === null || userRoles === void 0 ? void 0 : userRoles.some(role => {
2674
2676
  var _e$roles;
@@ -3061,7 +3063,7 @@ const ApplicationOverview = () => {
3061
3063
  }) : /*#__PURE__*/React.createElement("div", null, t("TL_NO_DOCUMENTS_MSG")))), /*#__PURE__*/React.createElement(NewApplicationTimeline, {
3062
3064
  workflowDetails: workflowDetails,
3063
3065
  t: t
3064
- }), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A21 = applicationDetails.Applications) === null || _applicationDetails$A21 === void 0 ? void 0 : (_applicationDetails$A22 = _applicationDetails$A21[0]) === null || _applicationDetails$A22 === void 0 ? void 0 : _applicationDetails$A22.applicationStatus) !== "INITIATED" && actions && /*#__PURE__*/React.createElement(ActionBar, null, displayMenu && (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data1 = workflowDetails.data) !== null && _workflowDetails$data1 !== void 0 && (_workflowDetails$data10 = _workflowDetails$data1.actionState) !== null && _workflowDetails$data10 !== void 0 && _workflowDetails$data10.nextActions || workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data11 = workflowDetails.data) !== null && _workflowDetails$data11 !== void 0 && _workflowDetails$data11.nextActions) ? /*#__PURE__*/React.createElement(Menu, {
3066
+ }), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A21 = applicationDetails.Applications) === null || _applicationDetails$A21 === void 0 ? void 0 : (_applicationDetails$A22 = _applicationDetails$A21[0]) === null || _applicationDetails$A22 === void 0 ? void 0 : _applicationDetails$A22.applicationStatus) !== "INITIATED" && (actions === null || actions === void 0 ? void 0 : actions.length) > 0 && /*#__PURE__*/React.createElement(ActionBar, null, displayMenu && (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data1 = workflowDetails.data) !== null && _workflowDetails$data1 !== void 0 && (_workflowDetails$data10 = _workflowDetails$data1.actionState) !== null && _workflowDetails$data10 !== void 0 && _workflowDetails$data10.nextActions || workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data11 = workflowDetails.data) !== null && _workflowDetails$data11 !== void 0 && _workflowDetails$data11.nextActions) ? /*#__PURE__*/React.createElement(Menu, {
3065
3067
  localeKeyPrefix: `WF_EDITRENEWAL`,
3066
3068
  options: actions,
3067
3069
  optionKey: "action",
@@ -10806,7 +10808,7 @@ function _extends() {
10806
10808
  }, _extends.apply(null, arguments);
10807
10809
  }
10808
10810
 
10809
- const SearchFormFieldsComponents = ({
10811
+ const NewSearchFormFieldsComponent = ({
10810
10812
  registerRef,
10811
10813
  searchFormState,
10812
10814
  searchFieldComponents
@@ -10815,7 +10817,6 @@ const SearchFormFieldsComponents = ({
10815
10817
  t
10816
10818
  } = useTranslation();
10817
10819
  const isMobile = window.Digit.Utils.browser.isMobile();
10818
- console.log("searchFieldComponents", searchFieldComponents);
10819
10820
  if (!isMobile) {
10820
10821
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
10821
10822
  className: "search-container ndc-search-container-custom"
@@ -10833,7 +10834,7 @@ const SearchFormFieldsComponents = ({
10833
10834
  className: "search-action-wrapper ndc-search-action-wrapper"
10834
10835
  }, searchFieldComponents)))));
10835
10836
  }
10836
- return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(SearchField, null, /*#__PURE__*/React.createElement("label", null, t("NOC_HOME_SEARCH_RESULTS_APP_NO_LABEL")), /*#__PURE__*/React.createElement(TextInput, {
10837
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SearchField, null, /*#__PURE__*/React.createElement("label", null, t("NOC_HOME_SEARCH_RESULTS_APP_NO_LABEL")), /*#__PURE__*/React.createElement(TextInput, {
10837
10838
  name: "applicationNo",
10838
10839
  inputRef: registerRef({})
10839
10840
  })), /*#__PURE__*/React.createElement(SearchField, null, /*#__PURE__*/React.createElement("label", null, t("CORE_COMMON_PHONE_NUMBER")), /*#__PURE__*/React.createElement(TextInput, {
@@ -10842,7 +10843,7 @@ const SearchFormFieldsComponents = ({
10842
10843
  })));
10843
10844
  };
10844
10845
 
10845
- const FilterFormFieldsComponent = ({
10846
+ const NewFilterFormFieldsComponent = ({
10846
10847
  statuses,
10847
10848
  controlFilterForm,
10848
10849
  applicationTypesOfBPA,
@@ -10851,15 +10852,7 @@ const FilterFormFieldsComponent = ({
10851
10852
  const {
10852
10853
  t
10853
10854
  } = useTranslation();
10854
- const tenantId = Digit.ULBService.getStateId();
10855
- const [tlfilters, setTLFilters] = useState({
10856
- applicationStatus: []
10857
- });
10858
- useEffect(() => {
10859
- if (tlfilters) {
10860
- handleFilter(tlfilters);
10861
- }
10862
- }, [tlfilters]);
10855
+ const [showAllStatuses, setShowAllStatuses] = useState(false);
10863
10856
  const availableOptions = [{
10864
10857
  code: "ASSIGNED_TO_ME",
10865
10858
  name: `${t("ES_INBOX_ASSIGNED_TO_ME")}`
@@ -10871,43 +10864,128 @@ const FilterFormFieldsComponent = ({
10871
10864
  type.name = t(`WF_BPA_${type.code}`);
10872
10865
  type.i18nKey = t(`WF_BPA_${type.code}`);
10873
10866
  });
10874
- return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(FilterFormField, null, /*#__PURE__*/React.createElement(Controller, {
10867
+ const getVariantFromCode = code => {
10868
+ const value = String(code || "").toLowerCase();
10869
+ if (value.includes("approved")) return "success";
10870
+ if (value.includes("rejected")) return "danger";
10871
+ if (value.includes("pending")) return "warning";
10872
+ if (value.includes("inbox")) return "primary";
10873
+ if (value.includes("assigned")) return "primary";
10874
+ return "info";
10875
+ };
10876
+ const colorVariants = ["primary", "success", "warning", "danger", "info", "indigo", "teal", "pink", "amber", "slate"];
10877
+ const getVariantByIndex = (index, fallback) => colorVariants[index % colorVariants.length] || fallback;
10878
+ const {
10879
+ field: assigneeField
10880
+ } = useController({
10875
10881
  name: "assignee",
10876
- control: controlFilterForm,
10877
- render: props => /*#__PURE__*/React.createElement(RadioButtons, {
10878
- onSelect: e => {
10879
- props.onChange(e.code);
10880
- },
10881
- selectedOption: availableOptions.filter(option => option.code === props.value)[0],
10882
- optionsKey: "name",
10883
- options: availableOptions
10884
- })
10885
- })), /*#__PURE__*/React.createElement(FilterFormField, null, /*#__PURE__*/React.createElement(Controller, {
10882
+ control: controlFilterForm
10883
+ });
10884
+ const {
10885
+ field: statusField
10886
+ } = useController({
10886
10887
  name: "applicationStatus",
10887
10888
  control: controlFilterForm,
10888
- defaultValue: [],
10889
- render: props => {
10890
- const toggleStatus = statusCode => {
10891
- console.log(statusCode, "statusCode");
10892
- if (props.value.includes(statusCode)) {
10893
- props.onChange(props.value.filter(code => code !== statusCode));
10889
+ defaultValue: []
10890
+ });
10891
+ const statusValues = Array.isArray(statusField.value) ? statusField.value : [];
10892
+ const toggleStatus = statusCode => {
10893
+ let newStatusValues;
10894
+ if (statusValues.includes(statusCode)) {
10895
+ newStatusValues = statusValues.filter(code => code !== statusCode);
10896
+ } else {
10897
+ newStatusValues = [...statusValues, statusCode];
10898
+ }
10899
+ statusField.onChange(newStatusValues);
10900
+ if (typeof handleFilter === "function") {
10901
+ handleFilter({
10902
+ applicationStatus: newStatusValues.map(code => ({
10903
+ code
10904
+ }))
10905
+ });
10906
+ }
10907
+ };
10908
+ const cards = [...availableOptions.map(option => ({
10909
+ key: option.code,
10910
+ type: "assignee",
10911
+ label: option.name,
10912
+ subtitle: t("ES_INBOX_ASSIGNED"),
10913
+ count: null,
10914
+ code: option.code,
10915
+ icon: "⌂"
10916
+ })), ...(statuses || []).map(status => ({
10917
+ key: status.applicationstatus,
10918
+ type: "status",
10919
+ label: t(status.applicationstatus),
10920
+ subtitle: null,
10921
+ count: status.totalCount ?? status.count ?? status.noOfRecords ?? status.totalRecords ?? status.applicationCount ?? 0,
10922
+ code: status.applicationstatus,
10923
+ icon: "◎"
10924
+ }))];
10925
+ const visibleCards = showAllStatuses ? cards : cards.slice(0, 6);
10926
+ return /*#__PURE__*/React.createElement("div", {
10927
+ className: "ndc-new-inbox-filter-card",
10928
+ style: {
10929
+ marginTop: 16,
10930
+ marginBottom: 16
10931
+ }
10932
+ }, /*#__PURE__*/React.createElement(FilterFormField, null, /*#__PURE__*/React.createElement("div", {
10933
+ className: "ndc-new-filter-status-wrapper"
10934
+ }, /*#__PURE__*/React.createElement("div", {
10935
+ className: "ndc-new-filter-status-grid ndc-new-filter-card-grid"
10936
+ }, visibleCards.map((card, index) => {
10937
+ const isActive = card.type === "assignee" ? assigneeField.value === card.code : statusValues.includes(card.code);
10938
+ const variant = getVariantByIndex(index, getVariantFromCode(card.code));
10939
+ return /*#__PURE__*/React.createElement("button", {
10940
+ key: card.key,
10941
+ type: "button",
10942
+ className: `ndc-new-filter-status-card ndc-new-filter-option-card ndc-new-filter-card ${variant} ${isActive ? "active" : ""}`,
10943
+ onClick: () => {
10944
+ if (card.type === "assignee") {
10945
+ assigneeField.onChange(card.code);
10946
+ if (typeof handleFilter === "function") {
10947
+ handleFilter({
10948
+ assignee: card.code,
10949
+ applicationStatus: statusValues.map(code => ({
10950
+ code
10951
+ }))
10952
+ });
10953
+ }
10894
10954
  } else {
10895
- props.onChange([...props.value, statusCode]);
10896
- }
10897
- };
10898
- return /*#__PURE__*/React.createElement(Fragment$1, null, statuses === null || statuses === void 0 ? void 0 : statuses.map((status, index) => /*#__PURE__*/React.createElement(CheckBox, {
10899
- key: status.applicationstatus,
10900
- label: `${t(status.applicationstatus)} - ${status.count}`,
10901
- value: status.applicationstatus,
10902
- checked: props.value.includes(status.applicationstatus),
10903
- onChange: () => toggleStatus(status.applicationstatus),
10904
- index: index
10905
- })));
10955
+ toggleStatus(card.code);
10956
+ }
10957
+ }
10958
+ }, isActive ? /*#__PURE__*/React.createElement("span", {
10959
+ className: "ndc-new-filter-card-check",
10960
+ "aria-hidden": "true"
10961
+ }, "\u2713") : null, /*#__PURE__*/React.createElement("div", {
10962
+ className: "ndc-new-filter-status-title ndc-new-filter-option-title"
10963
+ }, card.label), card.subtitle ? /*#__PURE__*/React.createElement("div", {
10964
+ className: "ndc-new-filter-option-subtitle"
10965
+ }, card.subtitle) : /*#__PURE__*/React.createElement("div", {
10966
+ className: "ndc-new-filter-status-count"
10967
+ }, card.count !== null && card.count !== undefined ? card.count : ""), /*#__PURE__*/React.createElement("span", {
10968
+ className: "ndc-new-filter-card-icon",
10969
+ "aria-hidden": "true"
10970
+ }, /*#__PURE__*/React.createElement("span", null, card.icon)));
10971
+ })), cards.length > 6 ? /*#__PURE__*/React.createElement("div", {
10972
+ style: {
10973
+ display: "flex",
10974
+ justifyContent: "center",
10975
+ marginTop: 8
10906
10976
  }
10907
- })));
10977
+ }, /*#__PURE__*/React.createElement("button", {
10978
+ type: "button",
10979
+ className: "ndc-new-filter-show-more",
10980
+ onClick: () => setShowAllStatuses(prev => !prev),
10981
+ "aria-label": showAllStatuses ? t("ES_COMMON_SHOW_LESS") : t("ES_COMMON_SHOW_MORE")
10982
+ }, /*#__PURE__*/React.createElement("span", {
10983
+ className: "ndc-new-filter-show-more-icon",
10984
+ "aria-hidden": "true"
10985
+ }, showAllStatuses ? "▲" : "▼"))) : null)));
10908
10986
  };
10909
10987
 
10910
- const useInboxTableConfig = ({
10988
+ const useNewInboxTableConfig = ({
10911
10989
  parentRoute,
10912
10990
  onPageSizeChange,
10913
10991
  formState,
@@ -10920,33 +10998,87 @@ const useInboxTableConfig = ({
10920
10998
  const {
10921
10999
  t
10922
11000
  } = useTranslation();
10923
- const GetCell = value => /*#__PURE__*/React.createElement("span", {
10924
- className: "cell-text styled-cell"
10925
- }, value);
11001
+ const getStatusClass = status => {
11002
+ const value = String(status || "").toLowerCase();
11003
+ if (value.includes("approved")) return "approved";
11004
+ if (value.includes("rejected")) return "rejected";
11005
+ if (value.includes("forward")) return "forwarded";
11006
+ if (value.includes("process")) return "in-progress";
11007
+ if (value.includes("pending")) return "pending";
11008
+ if (value.includes("new")) return "new";
11009
+ return "default";
11010
+ };
11011
+ const renderStatusIcon = statusClass => {
11012
+ switch (statusClass) {
11013
+ case "approved":
11014
+ return /*#__PURE__*/React.createElement("svg", {
11015
+ viewBox: "0 0 24 24",
11016
+ width: "14",
11017
+ height: "14",
11018
+ fill: "none",
11019
+ stroke: "currentColor",
11020
+ strokeWidth: "2"
11021
+ }, /*#__PURE__*/React.createElement("path", {
11022
+ d: "M20 6L9 17l-5-5"
11023
+ }));
11024
+ case "rejected":
11025
+ return /*#__PURE__*/React.createElement("svg", {
11026
+ viewBox: "0 0 24 24",
11027
+ width: "14",
11028
+ height: "14",
11029
+ fill: "none",
11030
+ stroke: "currentColor",
11031
+ strokeWidth: "2"
11032
+ }, /*#__PURE__*/React.createElement("path", {
11033
+ d: "M18 6L6 18"
11034
+ }), /*#__PURE__*/React.createElement("path", {
11035
+ d: "M6 6l12 12"
11036
+ }));
11037
+ case "forwarded":
11038
+ return /*#__PURE__*/React.createElement("svg", {
11039
+ viewBox: "0 0 24 24",
11040
+ width: "14",
11041
+ height: "14",
11042
+ fill: "none",
11043
+ stroke: "currentColor",
11044
+ strokeWidth: "2"
11045
+ }, /*#__PURE__*/React.createElement("path", {
11046
+ d: "M5 12h14"
11047
+ }), /*#__PURE__*/React.createElement("path", {
11048
+ d: "M13 5l7 7-7 7"
11049
+ }));
11050
+ default:
11051
+ return null;
11052
+ }
11053
+ };
10926
11054
  const tableColumnConfig = useMemo(() => {
10927
11055
  return [{
10928
11056
  Header: t("NOC_HOME_SEARCH_RESULTS_APP_NO_LABEL"),
10929
- accessor: "uuid",
11057
+ accessor: "applicationId",
10930
11058
  disableSortBy: true,
11059
+ className: "ndc-new-table-app",
10931
11060
  Cell: ({
10932
11061
  row
10933
11062
  }) => {
10934
- var _row$original, _row$original2;
10935
- console.log("row", row);
10936
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Link, {
10937
- to: `${parentRoute}/inbox/application-overview/${(_row$original = row.original) === null || _row$original === void 0 ? void 0 : _row$original.applicationId}`
10938
- }, /*#__PURE__*/React.createElement("span", {
10939
- className: "link"
10940
- }, (_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : _row$original2.applicationId)));
11063
+ var _row$original, _row$original2, _row$original3, _row$original4, _row$original5;
11064
+ return /*#__PURE__*/React.createElement("div", {
11065
+ className: "ndc-new-cell-stack"
11066
+ }, /*#__PURE__*/React.createElement(Link, {
11067
+ to: `${parentRoute}/inbox/application-overview/${(_row$original = row.original) === null || _row$original === void 0 ? void 0 : _row$original.applicationId}`,
11068
+ className: "ndc-new-app-link"
11069
+ }, ((_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : _row$original2.applicationId) || ((_row$original3 = row.original) === null || _row$original3 === void 0 ? void 0 : _row$original3.applicationNo) || "-"), (_row$original4 = row.original) !== null && _row$original4 !== void 0 && _row$original4.locality ? /*#__PURE__*/React.createElement("div", {
11070
+ className: "ndc-new-cell-secondary"
11071
+ }, (_row$original5 = row.original) === null || _row$original5 === void 0 ? void 0 : _row$original5.locality) : null);
10941
11072
  }
10942
11073
  }, {
10943
11074
  Header: t("TL_COMMON_TABLE_COL_APP_DATE"),
10944
- accessor: "createdtime",
11075
+ accessor: "date",
10945
11076
  Cell: ({
10946
11077
  row
10947
11078
  }) => {
10948
- var _row$original3, _row$original4;
10949
- return (_row$original3 = row.original) !== null && _row$original3 !== void 0 && _row$original3.date ? GetCell(format(new Date((_row$original4 = row.original) === null || _row$original4 === void 0 ? void 0 : _row$original4.date), "dd/MM/yyyy")) : "";
11079
+ var _row$original6, _row$original7;
11080
+ const dateValue = ((_row$original6 = row.original) === null || _row$original6 === void 0 ? void 0 : _row$original6.date) || ((_row$original7 = row.original) === null || _row$original7 === void 0 ? void 0 : _row$original7.createdTime);
11081
+ return dateValue ? format(new Date(dateValue), "dd/MM/yyyy") : "-";
10950
11082
  }
10951
11083
  }, {
10952
11084
  Header: t("PT_COMMON_TABLE_COL_STATUS_LABEL"),
@@ -10954,18 +11086,56 @@ const useInboxTableConfig = ({
10954
11086
  Cell: ({
10955
11087
  row
10956
11088
  }) => {
10957
- var _row$original5;
10958
- return t((_row$original5 = row.original) === null || _row$original5 === void 0 ? void 0 : _row$original5.status);
11089
+ var _row$original8, _row$original9;
11090
+ const statusValue = ((_row$original8 = row.original) === null || _row$original8 === void 0 ? void 0 : _row$original8.status) || ((_row$original9 = row.original) === null || _row$original9 === void 0 ? void 0 : _row$original9.applicationStatus) || "-";
11091
+ const statusClass = getStatusClass(statusValue);
11092
+ return /*#__PURE__*/React.createElement("span", {
11093
+ className: `ndc-new-status-pill ${statusClass}`
11094
+ }, renderStatusIcon(statusClass), /*#__PURE__*/React.createElement("span", null, String(statusValue || "-").toLowerCase()));
11095
+ }
11096
+ }, {
11097
+ Header: t("CS_COMMON_ACTION"),
11098
+ accessor: "action",
11099
+ disableSortBy: true,
11100
+ className: "ndc-new-table-action",
11101
+ Cell: ({
11102
+ row
11103
+ }) => {
11104
+ var _row$original0;
11105
+ return /*#__PURE__*/React.createElement("span", {
11106
+ className: "ndc-new-action-group"
11107
+ }, /*#__PURE__*/React.createElement(Link, {
11108
+ to: `${parentRoute}/inbox/application-overview/${(_row$original0 = row.original) === null || _row$original0 === void 0 ? void 0 : _row$original0.applicationId}`,
11109
+ className: "ndc-new-icon ndc-new-icon-link",
11110
+ "aria-label": t("ES_COMMON_VIEW")
11111
+ }, /*#__PURE__*/React.createElement("svg", {
11112
+ viewBox: "0 0 24 24",
11113
+ width: "18",
11114
+ height: "18",
11115
+ fill: "none",
11116
+ stroke: "currentColor",
11117
+ strokeWidth: "2"
11118
+ }, /*#__PURE__*/React.createElement("path", {
11119
+ d: "M1 12s4-7 11-7 11 7 11 7-4 7-11 7S1 12 1 12z"
11120
+ }), /*#__PURE__*/React.createElement("circle", {
11121
+ cx: "12",
11122
+ cy: "12",
11123
+ r: "3"
11124
+ }))));
10959
11125
  }
10960
11126
  }];
10961
- });
11127
+ }, [parentRoute, t]);
10962
11128
  return {
10963
- getCellProps: cellInfo => {
11129
+ getCellProps: () => ({
11130
+ style: {
11131
+ padding: "16px 20px",
11132
+ fontSize: "14px"
11133
+ }
11134
+ }),
11135
+ getRowProps: row => {
11136
+ var _row$original1, _row$original10;
10964
11137
  return {
10965
- style: {
10966
- padding: "20px 18px",
10967
- fontSize: "16px"
10968
- }
11138
+ className: `ndc-new-row ${getStatusClass((row === null || row === void 0 ? void 0 : (_row$original1 = row.original) === null || _row$original1 === void 0 ? void 0 : _row$original1.status) || (row === null || row === void 0 ? void 0 : (_row$original10 = row.original) === null || _row$original10 === void 0 ? void 0 : _row$original10.applicationStatus))}`
10969
11139
  };
10970
11140
  },
10971
11141
  disableSort: false,
@@ -11020,7 +11190,7 @@ const useInboxTableConfig = ({
11020
11190
  };
11021
11191
  };
11022
11192
 
11023
- const useInboxMobileCardsData = ({
11193
+ const useNewInboxMobileCardsData = ({
11024
11194
  parentRoute,
11025
11195
  table
11026
11196
  }) => {
@@ -11070,33 +11240,37 @@ const useInboxMobileCardsData = ({
11070
11240
  };
11071
11241
  };
11072
11242
 
11073
- const Inbox = ({
11074
- parentRoute
11243
+ const NewNDCInbox = ({
11244
+ parentRoute,
11245
+ tableColumns
11075
11246
  }) => {
11247
+ var _formState$filterForm3, _formState$filterForm4, _formState$filterForm5, _formState$tableForm5, _formState$tableForm6, _formState$tableForm7, _formState$tableForm8, _formState$tableForm9, _formState$tableForm0, _formState$tableForm1;
11076
11248
  const {
11077
11249
  t
11078
11250
  } = useTranslation();
11079
11251
  const tenantId = window.localStorage.getItem("Employee.tenant-id");
11080
- const [getFilter, setFilter] = useState();
11081
- const searchFormDefaultValues = {};
11082
- const filterFormDefaultValues = {
11252
+ const [activeStatusTab, setActiveStatusTab] = useState("ALL");
11253
+ const [topBarSearch, setTopBarSearch] = useState("");
11254
+ const businessServices = useMemo(() => businessServiceList(true) || [], []);
11255
+ const searchFormDefaultValues = useMemo(() => ({}), []);
11256
+ const filterFormDefaultValues = useMemo(() => ({
11083
11257
  moduleName: "ndc-services",
11084
11258
  applicationStatus: [],
11085
11259
  businessService: null,
11086
11260
  locality: [],
11087
11261
  assignee: "ASSIGNED_TO_ALL",
11088
- businessServiceArray: businessServiceList(true) || []
11089
- };
11090
- const tableOrderFormDefaultValues = {
11262
+ businessServiceArray: businessServices
11263
+ }), [businessServices]);
11264
+ const tableOrderFormDefaultValues = useMemo(() => ({
11091
11265
  sortBy: "",
11092
11266
  limit: window.Digit.Utils.browser.isMobile() ? 50 : 10,
11093
11267
  offset: 0,
11094
11268
  sortOrder: "DESC"
11095
- };
11269
+ }), []);
11096
11270
  function formReducer(state, payload) {
11097
11271
  switch (payload.action) {
11098
11272
  case "mutateSearchForm":
11099
- Digit.SessionStorage.set("NDC.INBOX", {
11273
+ Digit.SessionStorage.set("NDC.NEW_INBOX", {
11100
11274
  ...state,
11101
11275
  searchForm: payload.data
11102
11276
  });
@@ -11105,7 +11279,7 @@ const Inbox = ({
11105
11279
  searchForm: payload.data
11106
11280
  };
11107
11281
  case "mutateFilterForm":
11108
- Digit.SessionStorage.set("NDC.INBOX", {
11282
+ Digit.SessionStorage.set("NDC.NEW_INBOX", {
11109
11283
  ...state,
11110
11284
  filterForm: payload.data
11111
11285
  });
@@ -11114,7 +11288,7 @@ const Inbox = ({
11114
11288
  filterForm: payload.data
11115
11289
  };
11116
11290
  case "mutateTableForm":
11117
- Digit.SessionStorage.set("NDC.INBOX", {
11291
+ Digit.SessionStorage.set("NDC.NEW_INBOX", {
11118
11292
  ...state,
11119
11293
  tableForm: payload.data
11120
11294
  });
@@ -11124,7 +11298,7 @@ const Inbox = ({
11124
11298
  };
11125
11299
  }
11126
11300
  }
11127
- const InboxObjectInSessionStorage = Digit.SessionStorage.get("NDC.INBOX");
11301
+ const InboxObjectInSessionStorage = Digit.SessionStorage.get("NDC.NEW_INBOX");
11128
11302
  const onSearchFormReset = setSearchFormValue => {
11129
11303
  setSearchFormValue("sourceRefId", null);
11130
11304
  setSearchFormValue("applicationNo", null);
@@ -11135,8 +11309,8 @@ const Inbox = ({
11135
11309
  });
11136
11310
  };
11137
11311
  const onFilterFormReset = setFilterFormValue => {
11138
- setFilterFormValue("moduleName", "bpa-services");
11139
- setFilterFormValue("applicationStatus", "");
11312
+ setFilterFormValue("moduleName", "ndc-services");
11313
+ setFilterFormValue("applicationStatus", []);
11140
11314
  setFilterFormValue("locality", []);
11141
11315
  setFilterFormValue("assignee", "ASSIGNED_TO_ALL");
11142
11316
  setFilterFormValue("applicationType", []);
@@ -11169,6 +11343,26 @@ const Inbox = ({
11169
11343
  }
11170
11344
  });
11171
11345
  };
11346
+ const onNextPage = () => {
11347
+ var _formState$tableForm, _formState$tableForm2;
11348
+ return dispatch({
11349
+ action: "mutateTableForm",
11350
+ data: {
11351
+ ...formState.tableForm,
11352
+ offset: parseInt((_formState$tableForm = formState.tableForm) === null || _formState$tableForm === void 0 ? void 0 : _formState$tableForm.offset) + parseInt((_formState$tableForm2 = formState.tableForm) === null || _formState$tableForm2 === void 0 ? void 0 : _formState$tableForm2.limit)
11353
+ }
11354
+ });
11355
+ };
11356
+ const onPrevPage = () => {
11357
+ var _formState$tableForm3, _formState$tableForm4;
11358
+ return dispatch({
11359
+ action: "mutateTableForm",
11360
+ data: {
11361
+ ...formState.tableForm,
11362
+ offset: parseInt((_formState$tableForm3 = formState.tableForm) === null || _formState$tableForm3 === void 0 ? void 0 : _formState$tableForm3.offset) - parseInt((_formState$tableForm4 = formState.tableForm) === null || _formState$tableForm4 === void 0 ? void 0 : _formState$tableForm4.limit)
11363
+ }
11364
+ });
11365
+ };
11172
11366
  const onSortingByData = e => {
11173
11367
  if (e.length > 0) {
11174
11368
  const [{
@@ -11205,17 +11399,54 @@ const Inbox = ({
11205
11399
  data: localitiesForEmployeesCurrentTenant,
11206
11400
  isLoading: loadingLocalitiesForEmployeesCurrentTenant
11207
11401
  } = Digit.Hooks.useBoundaryLocalities(tenantId, "revenue", {}, t);
11208
- const handleFilter = filterStatus => {
11209
- setFilter(filterStatus);
11210
- };
11402
+ const {
11403
+ register: registerFilterFormField,
11404
+ control: controlFilterForm,
11405
+ handleSubmit: handleFilterFormSubmit,
11406
+ setValue: setFilterFormValue,
11407
+ getValues: getFilterFormValue,
11408
+ reset: resetFilterForm
11409
+ } = useForm({
11410
+ defaultValues: {
11411
+ ...filterFormDefaultValues
11412
+ }
11413
+ });
11414
+ const handleFilter = useCallback(filterData => {
11415
+ var _filterData$applicati, _formState$filterForm, _formState$filterForm2;
11416
+ if (filterData.applicationStatus) {
11417
+ setFilterFormValue("applicationStatus", filterData.applicationStatus.map(item => item.code || item));
11418
+ }
11419
+ if (filterData.assignee) {
11420
+ setFilterFormValue("assignee", filterData.assignee);
11421
+ }
11422
+ dispatch({
11423
+ action: "mutateFilterForm",
11424
+ data: {
11425
+ ...(formState === null || formState === void 0 ? void 0 : formState.filterForm),
11426
+ applicationStatus: ((_filterData$applicati = filterData.applicationStatus) === null || _filterData$applicati === void 0 ? void 0 : _filterData$applicati.map(item => item.code || item)) || (formState === null || formState === void 0 ? void 0 : (_formState$filterForm = formState.filterForm) === null || _formState$filterForm === void 0 ? void 0 : _formState$filterForm.applicationStatus) || [],
11427
+ assignee: filterData.assignee || (formState === null || formState === void 0 ? void 0 : (_formState$filterForm2 = formState.filterForm) === null || _formState$filterForm2 === void 0 ? void 0 : _formState$filterForm2.assignee) || "ASSIGNED_TO_ALL"
11428
+ }
11429
+ });
11430
+ }, [formState === null || formState === void 0 ? void 0 : formState.filterForm, setFilterFormValue]);
11431
+ const prevFilterRef = useRef("");
11432
+ const searchDebounceRef = useRef(null);
11433
+ const hasInitializedFilterForm = useRef(false);
11434
+ useEffect(() => {
11435
+ if (formState !== null && formState !== void 0 && formState.filterForm) {
11436
+ setFilterFormValue("assignee", formState.filterForm.assignee || "ASSIGNED_TO_ALL");
11437
+ setFilterFormValue("applicationStatus", formState.filterForm.applicationStatus || []);
11438
+ setFilterFormValue("moduleName", formState.filterForm.moduleName || "ndc-services");
11439
+ }
11440
+ }, [formState === null || formState === void 0 ? void 0 : (_formState$filterForm3 = formState.filterForm) === null || _formState$filterForm3 === void 0 ? void 0 : _formState$filterForm3.assignee, formState === null || formState === void 0 ? void 0 : (_formState$filterForm4 = formState.filterForm) === null || _formState$filterForm4 === void 0 ? void 0 : _formState$filterForm4.applicationStatus, formState === null || formState === void 0 ? void 0 : (_formState$filterForm5 = formState.filterForm) === null || _formState$filterForm5 === void 0 ? void 0 : _formState$filterForm5.moduleName, setFilterFormValue]);
11211
11441
  const {
11212
11442
  isLoading: isInboxLoading,
11213
11443
  data
11214
11444
  } = Digit.Hooks.ndc.useInbox({
11215
11445
  tenantId,
11216
11446
  filters: {
11217
- ...formState,
11218
- getFilter
11447
+ filterForm: (formState === null || formState === void 0 ? void 0 : formState.filterForm) || filterFormDefaultValues,
11448
+ searchForm: (formState === null || formState === void 0 ? void 0 : formState.searchForm) || searchFormDefaultValues,
11449
+ tableForm: (formState === null || formState === void 0 ? void 0 : formState.tableForm) || tableOrderFormDefaultValues
11219
11450
  }
11220
11451
  });
11221
11452
  const [table, setTable] = useState([]);
@@ -11241,7 +11472,7 @@ const Inbox = ({
11241
11472
  registerRef,
11242
11473
  searchFormState,
11243
11474
  searchFieldComponents
11244
- }) => /*#__PURE__*/React.createElement(SearchFormFieldsComponents, {
11475
+ }) => /*#__PURE__*/React.createElement(NewSearchFormFieldsComponent, {
11245
11476
  registerRef,
11246
11477
  searchFormState,
11247
11478
  searchFieldComponents
@@ -11251,7 +11482,7 @@ const Inbox = ({
11251
11482
  controlFilterForm,
11252
11483
  setFilterFormValue,
11253
11484
  getFilterFormValue
11254
- }) => /*#__PURE__*/React.createElement(FilterFormFieldsComponent, Object.assign({}, {
11485
+ }) => /*#__PURE__*/React.createElement(NewFilterFormFieldsComponent, Object.assign({}, {
11255
11486
  statuses,
11256
11487
  isInboxLoading,
11257
11488
  registerRef,
@@ -11304,7 +11535,7 @@ const Inbox = ({
11304
11535
  resetFilterFormDefaultValues: filterFormDefaultValues,
11305
11536
  onFilterFormReset
11306
11537
  };
11307
- const propsForInboxTable = useInboxTableConfig({
11538
+ const propsForInboxTable = useNewInboxTableConfig({
11308
11539
  ...{
11309
11540
  parentRoute,
11310
11541
  onPageSizeChange,
@@ -11315,7 +11546,7 @@ const Inbox = ({
11315
11546
  onSortingByData
11316
11547
  }
11317
11548
  });
11318
- const propsForInboxMobileCards = useInboxMobileCardsData({
11549
+ const propsForInboxMobileCards = useNewInboxMobileCardsData({
11319
11550
  parentRoute,
11320
11551
  table
11321
11552
  });
@@ -11324,18 +11555,689 @@ const Inbox = ({
11324
11555
  sortFormDefaultValues: formState === null || formState === void 0 ? void 0 : formState.tableForm,
11325
11556
  onSortFormReset
11326
11557
  };
11327
- return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(Header, null, t("ES_COMMON_INBOX"), totalCount ? /*#__PURE__*/React.createElement("p", {
11328
- className: "inbox-count"
11558
+ const resolvedTableColumns = tableColumns || (propsForInboxTable === null || propsForInboxTable === void 0 ? void 0 : propsForInboxTable.columns);
11559
+ useEffect(() => {
11560
+ const serialized = JSON.stringify((formState === null || formState === void 0 ? void 0 : formState.filterForm) || {});
11561
+ if (prevFilterRef.current === serialized) return;
11562
+ prevFilterRef.current = serialized;
11563
+ }, [formState]);
11564
+ useEffect(() => {
11565
+ if (searchDebounceRef.current) clearTimeout(searchDebounceRef.current);
11566
+ searchDebounceRef.current = setTimeout(() => {
11567
+ const value = String(topBarSearch || "").trim();
11568
+ const nextSearchForm = value ? {
11569
+ applicationNo: value
11570
+ } : {};
11571
+ dispatch({
11572
+ action: "mutateTableForm",
11573
+ data: {
11574
+ ...tableOrderFormDefaultValues
11575
+ }
11576
+ });
11577
+ dispatch({
11578
+ action: "mutateSearchForm",
11579
+ data: nextSearchForm
11580
+ });
11581
+ }, 400);
11582
+ return () => clearTimeout(searchDebounceRef.current);
11583
+ }, [topBarSearch, tableOrderFormDefaultValues]);
11584
+ const onResetFilterForm = () => {
11585
+ onFilterFormReset(setFilterFormValue);
11586
+ };
11587
+ const normalizeStatus = useCallback(value => String(value || "").replace(/[\s-_]+/g, "").toUpperCase(), []);
11588
+ const onStatusTabClick = useCallback((label, statusCode) => {
11589
+ setActiveStatusTab(statusCode || label);
11590
+ if (label === "CLEAR") {
11591
+ setTopBarSearch("");
11592
+ return;
11593
+ }
11594
+ if (label === "ALL") {
11595
+ setFilterFormValue("applicationStatus", [], {
11596
+ shouldDirty: true,
11597
+ shouldTouch: true
11598
+ });
11599
+ handleFilterFormSubmit(onFilterFormSubmit)();
11600
+ return;
11601
+ }
11602
+ const resolvedCode = statusCode || label;
11603
+ setFilterFormValue("applicationStatus", [resolvedCode], {
11604
+ shouldDirty: true,
11605
+ shouldTouch: true
11606
+ });
11607
+ handleFilterFormSubmit(onFilterFormSubmit)();
11608
+ }, [handleFilterFormSubmit, onFilterFormSubmit, setFilterFormValue]);
11609
+ useEffect(() => {
11610
+ if (hasInitializedFilterForm.current) return;
11611
+ if (resetFilterForm && formState) {
11612
+ resetFilterForm(formState === null || formState === void 0 ? void 0 : formState.filterForm);
11613
+ hasInitializedFilterForm.current = true;
11614
+ }
11615
+ }, [formState, resetFilterForm]);
11616
+ const isMobile = window.Digit.Utils.browser.isMobile();
11617
+ if (isMobile) {
11618
+ return /*#__PURE__*/React.createElement("div", {
11619
+ className: "ndc-new-inbox"
11620
+ }, /*#__PURE__*/React.createElement(InboxComposer, _extends({
11621
+ isInboxLoading,
11622
+ PropsForInboxLinks
11623
+ }, propsForSearchForm, propsForFilterForm, propsForMobileSortForm, {
11624
+ propsForInboxTable,
11625
+ propsForInboxMobileCards,
11626
+ formState
11627
+ })));
11628
+ }
11629
+ return /*#__PURE__*/React.createElement("div", {
11630
+ className: "ndc-new-inbox"
11631
+ }, /*#__PURE__*/React.createElement("style", null, `
11632
+ .ndc-new-inbox {
11633
+ margin-top: 32px;
11634
+ padding: 20px;
11635
+ background: #f8fafc;
11636
+ border-radius: 12px;
11637
+ }
11638
+ .ndc-new-inbox .ndc-new-header {
11639
+ display: flex;
11640
+ align-items: center;
11641
+ gap: 10px;
11642
+ font-size: 24px;
11643
+ font-weight: 700;
11644
+ margin-bottom: 12px;
11645
+ }
11646
+ .ndc-new-inbox .ndc-new-count-pill {
11647
+ display: inline-flex;
11648
+ align-items: center;
11649
+ justify-content: center;
11650
+ min-width: 28px;
11651
+ height: 28px;
11652
+ padding: 0 8px;
11653
+ border-radius: 999px;
11654
+ background: #2563eb;
11655
+ color: #ffffff;
11656
+ font-size: 12px;
11657
+ font-weight: 700;
11658
+ }
11659
+
11660
+ .ndc-new-inbox .ndc-new-filter-card-grid {
11661
+ display: grid;
11662
+ grid-template-columns: repeat(6, 1fr);
11663
+ gap: 14px;
11664
+ }
11665
+ .ndc-new-inbox .ndc-new-filter-option-card {
11666
+ background: #f8fafc;
11667
+ border: 1px solid #e5e7eb;
11668
+ border-radius: 12px;
11669
+ padding: 16px;
11670
+ min-height: 88px;
11671
+ text-align: left;
11672
+ cursor: pointer;
11673
+ transition: all 0.2s ease;
11674
+ position: relative;
11675
+ overflow: hidden;
11676
+ }
11677
+ .ndc-new-inbox .ndc-new-filter-option-card.active {
11678
+ background: #e0f2fe;
11679
+ border-color: #38bdf8;
11680
+ box-shadow: 0 4px 12px rgba(2, 132, 199, 0.18);
11681
+ }
11682
+ .ndc-new-inbox .ndc-new-filter-option-title {
11683
+ font-weight: 700;
11684
+ font-size: 14px;
11685
+ }
11686
+ .ndc-new-inbox .ndc-new-filter-option-subtitle {
11687
+ font-size: 12px;
11688
+ margin-top: 6px;
11689
+ color: white;
11690
+ }
11691
+ .ndc-new-inbox .ndc-new-filter-status-grid {
11692
+ display: grid;
11693
+ grid-template-columns: repeat(6, 1fr);
11694
+ gap: 14px;
11695
+ }
11696
+ .ndc-new-inbox .ndc-new-filter-status-card {
11697
+ background: #ffffff;
11698
+ border: 1px solid #e5e7eb;
11699
+ border-radius: 12px;
11700
+ padding: 16px;
11701
+ min-height: 88px;
11702
+ text-align: left;
11703
+ cursor: pointer;
11704
+ transition: all 0.2s ease;
11705
+ width: 100%;
11706
+ box-sizing: border-box;
11707
+ position: relative;
11708
+ overflow: hidden;
11709
+ }
11710
+ .ndc-new-inbox .ndc-new-filter-status-card.active {
11711
+ background: #e0f2fe;
11712
+ border-color: #38bdf8;
11713
+ box-shadow: 0 4px 12px rgba(2, 132, 199, 0.18);
11714
+ }
11715
+ .ndc-new-inbox .ndc-new-filter-status-title {
11716
+ font-weight: 700;
11717
+ font-size: 14px;
11718
+ }
11719
+ .ndc-new-inbox .ndc-new-filter-status-count {
11720
+ font-size: 22px;
11721
+ font-weight: 700;
11722
+ margin-top: 8px;
11723
+ color: inherit;
11724
+ }
11725
+ .ndc-new-inbox .ndc-new-filter-card-icon {
11726
+ position: absolute;
11727
+ top: 12px;
11728
+ right: 12px;
11729
+ width: 36px;
11730
+ height: 36px;
11731
+ border-radius: 999px;
11732
+ background: rgba(255, 255, 255, 0.2);
11733
+ display: inline-flex;
11734
+ align-items: center;
11735
+ justify-content: center;
11736
+ color: #ffffff;
11737
+ font-size: 16px;
11738
+ }
11739
+ .ndc-new-inbox .ndc-new-filter-card-check {
11740
+ position: absolute;
11741
+ top: 10px;
11742
+ left: 12px;
11743
+ width: 22px;
11744
+ height: 22px;
11745
+ border-radius: 999px;
11746
+ display: inline-flex;
11747
+ align-items: center;
11748
+ justify-content: center;
11749
+ font-size: 12px;
11750
+ font-weight: 700;
11751
+ background: rgba(255, 255, 255, 0.9);
11752
+ color: #111827;
11753
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
11754
+ }
11755
+ .ndc-new-inbox .ndc-new-filter-card {
11756
+ color: #ffffff;
11757
+ border-color: transparent;
11758
+ }
11759
+ .ndc-new-inbox .ndc-new-filter-card.primary {
11760
+ background: #2563eb;
11761
+ }
11762
+ .ndc-new-inbox .ndc-new-filter-card.success {
11763
+ background: #16a34a;
11764
+ }
11765
+ .ndc-new-inbox .ndc-new-filter-card.warning {
11766
+ background: #ea580c;
11767
+ }
11768
+ .ndc-new-inbox .ndc-new-filter-card.info {
11769
+ background: #7c3aed;
11770
+ }
11771
+ .ndc-new-inbox .ndc-new-filter-card.danger {
11772
+ background: #dc2626;
11773
+ }
11774
+ .ndc-new-inbox .ndc-new-filter-card.indigo {
11775
+ background: #4f46e5;
11776
+ }
11777
+ .ndc-new-inbox .ndc-new-filter-card.teal {
11778
+ background: #0f766e;
11779
+ }
11780
+ .ndc-new-inbox .ndc-new-filter-card.pink {
11781
+ background: #db2777;
11782
+ }
11783
+ .ndc-new-inbox .ndc-new-filter-card.amber {
11784
+ background: #d97706;
11785
+ }
11786
+ .ndc-new-inbox .ndc-new-filter-card.slate {
11787
+ background: #475569;
11788
+ }
11789
+ .ndc-new-inbox .ndc-new-filter-card.active {
11790
+ box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
11791
+ transform: translateY(-1px);
11792
+ }
11793
+ .ndc-new-inbox .ndc-new-filter-show-more {
11794
+ margin-top: 12px;
11795
+ cursor: pointer;
11796
+ font-weight: 600;
11797
+ font-size: 12px;
11798
+ color: #2563eb;
11799
+ display: inline-flex;
11800
+ align-items: center;
11801
+ gap: 6px;
11802
+ transition: all 0.2s ease;
11803
+ }
11804
+ .ndc-new-inbox .ndc-new-filter-show-more-icon {
11805
+ width: 28px;
11806
+ height: 28px;
11807
+ border-radius: 999px;
11808
+ display: inline-flex;
11809
+ align-items: center;
11810
+ justify-content: center;
11811
+ font-size: 12px;
11812
+ color: #457fff;
11813
+ background: #eff6ff;
11814
+ }
11815
+ .ndc-new-inbox .ndc-new-filter-show-more:hover {
11816
+ background: #eff6ff;
11817
+ border-color: #bfdbfe;
11818
+ }
11819
+ .ndc-new-inbox .ndc-new-layout {
11820
+ display: block;
11821
+ }
11822
+ .ndc-new-inbox .filter-card .heading {
11823
+ display: none;
11824
+ }
11825
+ .ndc-new-inbox .filter-card .submit-bar,
11826
+ .ndc-new-inbox .filter-card button[type="submit"] {
11827
+ display: none;
11828
+ }
11829
+ .ndc-new-inbox .ndc-new-top-filters {
11830
+ margin: 12px 0 16px;
11831
+ background: #ffffff;
11832
+ border: 1px solid #e2e8f0;
11833
+ border-radius: 16px;
11834
+ padding: 18px;
11835
+ box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
11836
+ }
11837
+ .ndc-new-inbox .ndc-new-inbox-filter-card {
11838
+ margin: 0;
11839
+ }
11840
+ .ndc-new-inbox .ndc-new-filter-card-grid {
11841
+ grid-template-columns: repeat(6, 1fr);
11842
+ }
11843
+ .ndc-new-inbox .ndc-new-filter-status-grid {
11844
+ grid-template-columns: repeat(6, 1fr);
11845
+ }
11846
+ @media (max-width: 1400px) {
11847
+ .ndc-new-inbox .ndc-new-filter-card-grid,
11848
+ .ndc-new-inbox .ndc-new-filter-status-grid {
11849
+ grid-template-columns: repeat(4, minmax(140px, 1fr));
11850
+ }
11851
+ }
11852
+ @media (max-width: 1100px) {
11853
+ .ndc-new-inbox .ndc-new-filter-card-grid,
11854
+ .ndc-new-inbox .ndc-new-filter-status-grid {
11855
+ grid-template-columns: repeat(3, minmax(140px, 1fr));
11856
+ }
11857
+ }
11858
+ @media (max-width: 900px) {
11859
+ .ndc-new-inbox .ndc-new-filter-card-grid,
11860
+ .ndc-new-inbox .ndc-new-filter-status-grid {
11861
+ grid-template-columns: repeat(2, minmax(140px, 1fr));
11862
+ }
11863
+ }
11864
+ @media (max-width: 640px) {
11865
+ .ndc-new-inbox .ndc-new-filter-card-grid,
11866
+ .ndc-new-inbox .ndc-new-filter-status-grid {
11867
+ grid-template-columns: 1fr;
11868
+ }
11869
+ }
11870
+ .ndc-new-inbox .ndc-new-table-card {
11871
+ margin-top: 16px;
11872
+ background: #ffffff;
11873
+ border: 1px solid #e2e8f0;
11874
+ border-radius: 16px;
11875
+ box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
11876
+ overflow: hidden;
11877
+ }
11878
+ .ndc-new-inbox .ndc-new-table-topbar {
11879
+ display: flex;
11880
+ align-items: center;
11881
+ justify-content: space-between;
11882
+ gap: 16px;
11883
+ padding: 16px;
11884
+ border-radius: 16px;
11885
+ border: 1px solid #e2e8f0;
11886
+ background: #ffffff;
11887
+ box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
11888
+ }
11889
+ .ndc-new-inbox .ndc-new-tabs {
11890
+ display: flex;
11891
+ gap: 8px;
11892
+ flex-wrap: nowrap;
11893
+ overflow-x: auto;
11894
+ max-width: calc(100% - 280px);
11895
+ padding-bottom: 4px;
11896
+ scrollbar-width: none;
11897
+ }
11898
+ .ndc-new-inbox .ndc-new-tabs::-webkit-scrollbar {
11899
+ width: 0;
11900
+ height: 0;
11901
+ }
11902
+ .ndc-new-inbox .ndc-new-tab {
11903
+ padding: 6px 10px;
11904
+ border-radius: 999px;
11905
+ border: 1px solid #e5e7eb;
11906
+ background: #f8fafc;
11907
+ font-weight: 600;
11908
+ font-size: 11px;
11909
+ cursor: pointer;
11910
+ white-space: nowrap;
11911
+ }
11912
+ .ndc-new-inbox .ndc-new-tab.active {
11913
+ background: #2563eb;
11914
+ color: #ffffff;
11915
+ border-color: #2563eb;
11916
+ box-shadow: 0 6px 14px rgba(37, 99, 235, 0.25);
11917
+ }
11918
+ .ndc-new-inbox .ndc-new-search {
11919
+ display: flex;
11920
+ align-items: center;
11921
+ gap: 8px;
11922
+ padding: 10px 14px;
11923
+ border: 1px solid #e2e8f0;
11924
+ border-radius: 10px;
11925
+ min-width: 260px;
11926
+ background: #f8fafc;
11927
+ color: #6b7280;
11928
+ font-size: 12px;
11929
+ }
11930
+ .ndc-new-inbox .ndc-new-search input {
11931
+ border: none;
11932
+ outline: none;
11933
+ background: transparent;
11934
+ width: 100%;
11935
+ font-size: 12px;
11936
+ color: #111827;
11937
+ }
11938
+ .ndc-new-inbox .ndc-new-table-header {
11939
+ padding: 18px 20px;
11940
+ font-size: 18px;
11941
+ font-weight: 700;
11942
+ border-bottom: 1px solid #e2e8f0;
11943
+ }
11944
+ .ndc-new-inbox .ndc-new-table-wrapper {
11945
+ display: block;
11946
+ overflow-x: auto;
11947
+ }
11948
+ .ndc-new-inbox .ndc-new-table {
11949
+ width: 100%;
11950
+ border-collapse: collapse;
11951
+ }
11952
+ .ndc-new-inbox .ndc-new-table th {
11953
+ text-align: left;
11954
+ font-size: 12px;
11955
+ letter-spacing: 0.08em;
11956
+ color: #6b7280;
11957
+ padding: 14px 20px;
11958
+ background: #f8fafc;
11959
+ border-bottom: 1px solid #e2e8f0;
11960
+ }
11961
+ .ndc-new-inbox .ndc-new-table td {
11962
+ padding: 16px 20px;
11963
+ border-bottom: 1px solid #eef2f7;
11964
+ font-size: 14px;
11965
+ color: #334155;
11966
+ }
11967
+ .ndc-new-inbox .ndc-new-cell-stack {
11968
+ display: flex;
11969
+ flex-direction: column;
11970
+ gap: 4px;
11971
+ }
11972
+ .ndc-new-inbox .ndc-new-cell-primary {
11973
+ font-weight: 600;
11974
+ color: #111827;
11975
+ }
11976
+ .ndc-new-inbox .ndc-new-cell-secondary {
11977
+ font-size: 12px;
11978
+ color: #64748b;
11979
+ }
11980
+ .ndc-new-inbox .ndc-new-row.pending {
11981
+ background: #fff7ed;
11982
+ }
11983
+ .ndc-new-inbox .ndc-new-row.rejected {
11984
+ background: #fef2f2;
11985
+ }
11986
+ .ndc-new-inbox .ndc-new-row.approved {
11987
+ background: #f0fdf4;
11988
+ }
11989
+ .ndc-new-inbox .ndc-new-table-app {
11990
+ font-weight: 600;
11991
+ color: #111827;
11992
+ }
11993
+ .ndc-new-inbox .ndc-new-table-action {
11994
+ text-align: left;
11995
+ white-space: nowrap;
11996
+ }
11997
+ .ndc-new-inbox .ndc-new-status-pill {
11998
+ display: inline-flex;
11999
+ align-items: center;
12000
+ gap: 6px;
12001
+ padding: 4px 10px;
12002
+ border-radius: 999px;
12003
+ font-size: 12px;
12004
+ font-weight: 600;
12005
+ background: #e2e8f0;
12006
+ color: #111827;
12007
+ border: 1px solid transparent;
12008
+ }
12009
+ .ndc-new-inbox .ndc-new-status-pill.approved {
12010
+ background: #f0fdf4;
12011
+ color: #15803d;
12012
+ border-color: #86efac;
12013
+ }
12014
+ .ndc-new-inbox .ndc-new-status-pill.rejected {
12015
+ background: #fef2f2;
12016
+ color: #b91c1c;
12017
+ border-color: #fecaca;
12018
+ }
12019
+ .ndc-new-inbox .ndc-new-status-pill.forwarded {
12020
+ background: #eff6ff;
12021
+ color: #1d4ed8;
12022
+ border-color: #bfdbfe;
12023
+ }
12024
+ .ndc-new-inbox .ndc-new-status-pill.in-progress {
12025
+ background: #dbeafe;
12026
+ color: #1d4ed8;
12027
+ }
12028
+ .ndc-new-inbox .ndc-new-status-pill.pending {
12029
+ background: #ffedd5;
12030
+ color: #c2410c;
12031
+ }
12032
+ .ndc-new-inbox .ndc-new-status-pill.new {
12033
+ background: #f3f4f6;
12034
+ color: #111827;
12035
+ }
12036
+ .ndc-new-inbox .ndc-new-icon {
12037
+ display: inline-flex;
12038
+ align-items: center;
12039
+ justify-content: center;
12040
+ width: 28px;
12041
+ height: 28px;
12042
+ margin-left: 8px;
12043
+ border-radius: 50%;
12044
+ border: 1px solid #e5e7eb;
12045
+ color: #94a3b8;
12046
+ }
12047
+ .ndc-new-inbox .ndc-new-action-group {
12048
+ display: inline-flex;
12049
+ align-items: center;
12050
+ gap: 8px;
12051
+ }
12052
+ .ndc-new-inbox .ndc-new-icon-link {
12053
+ text-decoration: none;
12054
+ }
12055
+ .ndc-new-inbox .ndc-new-app-link {
12056
+ color: #2563eb;
12057
+ text-decoration: none;
12058
+ }
12059
+ .ndc-new-inbox .ndc-new-app-link:hover {
12060
+ text-decoration: underline;
12061
+ }
12062
+ .ndc-new-inbox .ndc-new-pagination {
12063
+ display: flex;
12064
+ align-items: center;
12065
+ justify-content: flex-end;
12066
+ gap: 12px;
12067
+ padding: 12px 20px 18px;
12068
+ border-top: 1px solid #eef2f7;
12069
+ font-size: 12px;
12070
+ color: #6b7280;
12071
+ }
12072
+ .ndc-new-inbox .ndc-new-pagination button {
12073
+ border: 1px solid #e5e7eb;
12074
+ background: #ffffff;
12075
+ border-radius: 8px;
12076
+ padding: 4px 8px;
12077
+ cursor: pointer;
12078
+ }
12079
+ .ndc-new-inbox .ndc-new-pagination button:disabled {
12080
+ opacity: 0.5;
12081
+ cursor: not-allowed;
12082
+ }
12083
+ .ndc-new-inbox .ndc-new-pagination select {
12084
+ border: 1px solid #e5e7eb;
12085
+ border-radius: 8px;
12086
+ padding: 4px 8px;
12087
+ background: #ffffff;
12088
+ }
12089
+ @media (max-width: 768px) {
12090
+ .ndc-new-inbox .ndc-new-top-filters {
12091
+ padding: 0;
12092
+ }
12093
+ .ndc-new-inbox .ndc-new-table-topbar {
12094
+ flex-wrap: wrap;
12095
+ }
12096
+ .ndc-new-inbox .ndc-new-tabs {
12097
+ max-width: 100%;
12098
+ overflow-x: visible;
12099
+ flex-wrap: wrap;
12100
+ }
12101
+ .ndc-new-inbox .ndc-new-search {
12102
+ width: 100%;
12103
+ min-width: 0;
12104
+ }
12105
+ .ndc-new-inbox .ndc-new-table-header {
12106
+ font-size: 16px;
12107
+ padding: 14px 16px;
12108
+ }
12109
+ .ndc-new-inbox .ndc-new-table th,
12110
+ .ndc-new-inbox .ndc-new-table td {
12111
+ padding: 12px 14px;
12112
+ font-size: 12px;
12113
+ }
12114
+ .ndc-new-inbox .ndc-new-status-pill {
12115
+ font-size: 11px;
12116
+ padding: 3px 8px;
12117
+ }
12118
+ }
12119
+ .ndc-new-inbox .ndc-new-tab-count {
12120
+ margin-left: 6px;
12121
+ padding: 2px 6px;
12122
+ border-radius: 999px;
12123
+ background: #e2e8f0;
12124
+ color: #475569;
12125
+ font-size: 11px;
12126
+ font-weight: 700;
12127
+ }
12128
+ .ndc-new-inbox .ndc-new-tab.active .ndc-new-tab-count {
12129
+ background: rgba(255, 255, 255, 0.2);
12130
+ color: #ffffff;
12131
+ }
12132
+ `), /*#__PURE__*/React.createElement("div", {
12133
+ className: "ndc-new-header"
12134
+ }, /*#__PURE__*/React.createElement("span", null, t("NDC Inbox")), totalCount ? /*#__PURE__*/React.createElement("span", {
12135
+ className: "ndc-new-count-pill"
11329
12136
  }, totalCount) : null), /*#__PURE__*/React.createElement("div", {
11330
- className: "NDCSection"
11331
- }, /*#__PURE__*/React.createElement(InboxComposer, _extends({
11332
- isInboxLoading,
11333
- PropsForInboxLinks
11334
- }, propsForSearchForm, propsForFilterForm, propsForMobileSortForm, {
11335
- propsForInboxTable,
11336
- propsForInboxMobileCards,
11337
- formState
11338
- }))));
12137
+ className: "ndc-new-layout"
12138
+ }, /*#__PURE__*/React.createElement("div", {
12139
+ className: "ndc-new-top-filters"
12140
+ }, /*#__PURE__*/React.createElement(FilterForm, {
12141
+ onSubmit: onFilterFormSubmit,
12142
+ handleSubmit: handleFilterFormSubmit,
12143
+ id: "filter-form",
12144
+ onResetFilterForm: onResetFilterForm
12145
+ }, /*#__PURE__*/React.createElement(NewFilterFormFieldsComponent, Object.assign({
12146
+ registerRef: registerFilterFormField
12147
+ }, {
12148
+ controlFilterForm,
12149
+ handleFilterFormSubmit,
12150
+ setFilterFormValue,
12151
+ getFilterFormValue,
12152
+ statuses
12153
+ }, {
12154
+ handleFilter: handleFilter
12155
+ })))), /*#__PURE__*/React.createElement("div", {
12156
+ className: "ndc-new-table-topbar"
12157
+ }, /*#__PURE__*/React.createElement("div", {
12158
+ className: "ndc-new-tabs"
12159
+ }, /*#__PURE__*/React.createElement("button", {
12160
+ type: "button",
12161
+ className: `ndc-new-tab ${activeStatusTab === "ALL" ? "active" : ""}`,
12162
+ onClick: () => onStatusTabClick("ALL")
12163
+ }, t("ALL"), /*#__PURE__*/React.createElement("span", {
12164
+ className: "ndc-new-tab-count"
12165
+ }, totalCount || 0)), (statuses || []).map(status => /*#__PURE__*/React.createElement("button", {
12166
+ key: status === null || status === void 0 ? void 0 : status.applicationstatus,
12167
+ type: "button",
12168
+ className: `ndc-new-tab ${activeStatusTab === (status === null || status === void 0 ? void 0 : status.applicationstatus) ? "active" : ""}`,
12169
+ onClick: () => onStatusTabClick(status === null || status === void 0 ? void 0 : status.applicationstatus, status === null || status === void 0 ? void 0 : status.applicationstatus)
12170
+ }, t(status === null || status === void 0 ? void 0 : status.applicationstatus), /*#__PURE__*/React.createElement("span", {
12171
+ className: "ndc-new-tab-count"
12172
+ }, (status === null || status === void 0 ? void 0 : status.count) ?? 0))), /*#__PURE__*/React.createElement("button", {
12173
+ type: "button",
12174
+ className: `ndc-new-tab ${activeStatusTab === "CLEAR" ? "active" : ""}`,
12175
+ onClick: () => onStatusTabClick("CLEAR")
12176
+ }, t("CLEAR"))), /*#__PURE__*/React.createElement("div", {
12177
+ className: "ndc-new-search"
12178
+ }, /*#__PURE__*/React.createElement("span", {
12179
+ "aria-hidden": "true"
12180
+ }, /*#__PURE__*/React.createElement("svg", {
12181
+ width: "16",
12182
+ height: "16",
12183
+ viewBox: "0 0 24 24",
12184
+ fill: "none",
12185
+ xmlns: "http://www.w3.org/2000/svg"
12186
+ }, /*#__PURE__*/React.createElement("circle", {
12187
+ cx: "11",
12188
+ cy: "11",
12189
+ r: "7",
12190
+ stroke: "#6B7280",
12191
+ strokeWidth: "2"
12192
+ }), /*#__PURE__*/React.createElement("line", {
12193
+ x1: "16.65",
12194
+ y1: "16.65",
12195
+ x2: "21",
12196
+ y2: "21",
12197
+ stroke: "#6B7280",
12198
+ strokeWidth: "2",
12199
+ strokeLinecap: "round"
12200
+ }))), /*#__PURE__*/React.createElement("input", {
12201
+ type: "text",
12202
+ value: topBarSearch,
12203
+ onChange: e => setTopBarSearch(e.target.value),
12204
+ placeholder: "Search by application no..."
12205
+ }))), isInboxLoading ? /*#__PURE__*/React.createElement(Loader$1, null) : (table === null || table === void 0 ? void 0 : table.length) < 1 ? /*#__PURE__*/React.createElement(Card, {
12206
+ className: "margin-unset text-align-center"
12207
+ }, t("CS_MYAPPLICATIONS_NO_APPLICATION")) : /*#__PURE__*/React.createElement("div", {
12208
+ className: "ndc-new-table-card"
12209
+ }, /*#__PURE__*/React.createElement("div", {
12210
+ className: "ndc-new-table-header"
12211
+ }, t("Assigned Applications")), /*#__PURE__*/React.createElement(Table, Object.assign({
12212
+ className: "ndc-new-table",
12213
+ customTableWrapperClassName: "ndc-new-table-wrapper",
12214
+ isPaginationRequired: false
12215
+ }, propsForInboxTable, {
12216
+ columns: resolvedTableColumns,
12217
+ getRowProps: propsForInboxTable === null || propsForInboxTable === void 0 ? void 0 : propsForInboxTable.getRowProps
12218
+ }))), totalCount > 0 ? /*#__PURE__*/React.createElement("div", {
12219
+ className: "ndc-new-pagination"
12220
+ }, t("CS_COMMON_ROWS_PER_PAGE"), ":", /*#__PURE__*/React.createElement("select", {
12221
+ value: (_formState$tableForm5 = formState.tableForm) === null || _formState$tableForm5 === void 0 ? void 0 : _formState$tableForm5.limit,
12222
+ onChange: onPageSizeChange
12223
+ }, [10, 20, 30, 40, 50].map(pageSize => /*#__PURE__*/React.createElement("option", {
12224
+ key: pageSize,
12225
+ value: pageSize
12226
+ }, pageSize))), /*#__PURE__*/React.createElement("span", null, ((_formState$tableForm6 = formState.tableForm) === null || _formState$tableForm6 === void 0 ? void 0 : _formState$tableForm6.offset) + 1, "-", Math.min(((_formState$tableForm7 = formState.tableForm) === null || _formState$tableForm7 === void 0 ? void 0 : _formState$tableForm7.offset) + ((_formState$tableForm8 = formState.tableForm) === null || _formState$tableForm8 === void 0 ? void 0 : _formState$tableForm8.limit), totalCount), " of ", totalCount), /*#__PURE__*/React.createElement("button", {
12227
+ onClick: onPrevPage,
12228
+ disabled: ((_formState$tableForm9 = formState.tableForm) === null || _formState$tableForm9 === void 0 ? void 0 : _formState$tableForm9.offset) <= 0
12229
+ }, "\u2039"), /*#__PURE__*/React.createElement("button", {
12230
+ onClick: onNextPage,
12231
+ disabled: ((_formState$tableForm0 = formState.tableForm) === null || _formState$tableForm0 === void 0 ? void 0 : _formState$tableForm0.offset) + ((_formState$tableForm1 = formState.tableForm) === null || _formState$tableForm1 === void 0 ? void 0 : _formState$tableForm1.limit) >= totalCount
12232
+ }, "\u203A")) : null));
12233
+ };
12234
+
12235
+ const Inbox = ({
12236
+ parentRoute
12237
+ }) => {
12238
+ return /*#__PURE__*/React.createElement(NewNDCInbox, {
12239
+ parentRoute: parentRoute
12240
+ });
11339
12241
  };
11340
12242
 
11341
12243
  const SearchFormFieldsComponent = props => {
@@ -12704,14 +13606,25 @@ function SelectNDCReason({
12704
13606
  }, [ndcReason]);
12705
13607
  useEffect(() => {
12706
13608
  if (apiDataCheck && (ndcReasonOptions === null || ndcReasonOptions === void 0 ? void 0 : ndcReasonOptions.length) > 0) {
13609
+ var _formData$NDCReason;
12707
13610
  console.log("check apiDataCheck", apiDataCheck);
12708
13611
  const matchedOption = ndcReasonOptions.find(opt => {
12709
13612
  var _apiDataCheck$;
12710
13613
  return (opt === null || opt === void 0 ? void 0 : opt.code) === (apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$ = apiDataCheck[0]) === null || _apiDataCheck$ === void 0 ? void 0 : _apiDataCheck$.reason);
12711
13614
  });
12712
- if (matchedOption) {
12713
- setNDCReason(matchedOption);
12714
- setValue("NDCReason", matchedOption);
13615
+ if (matchedOption && (lodash.isEmpty(formData === null || formData === void 0 ? void 0 : formData.NDCReason) || !(formData !== null && formData !== void 0 && (_formData$NDCReason = formData.NDCReason) !== null && _formData$NDCReason !== void 0 && _formData$NDCReason.code))) {
13616
+ let updatedOption = {
13617
+ ...matchedOption
13618
+ };
13619
+ if (matchedOption.code === "OTHERS") {
13620
+ var _apiDataCheck$2, _apiDataCheck$2$NdcDe, _ptDetail$additionalD;
13621
+ const ptDetail = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$2 = apiDataCheck[0]) === null || _apiDataCheck$2 === void 0 ? void 0 : (_apiDataCheck$2$NdcDe = _apiDataCheck$2.NdcDetails) === null || _apiDataCheck$2$NdcDe === void 0 ? void 0 : _apiDataCheck$2$NdcDe.find(detail => detail.businessService === "PT");
13622
+ if (ptDetail !== null && ptDetail !== void 0 && (_ptDetail$additionalD = ptDetail.additionalDetails) !== null && _ptDetail$additionalD !== void 0 && _ptDetail$additionalD.reason) {
13623
+ updatedOption.reason = ptDetail.additionalDetails.reason;
13624
+ }
13625
+ }
13626
+ setNDCReason(updatedOption);
13627
+ setValue("NDCReason", updatedOption);
12715
13628
  }
12716
13629
  }
12717
13630
  }, [apiDataCheck, ndcReasonOptions]);
@@ -12775,7 +13688,7 @@ const PropertyDetailsForm$1 = ({
12775
13688
  formState,
12776
13689
  clearErrors
12777
13690
  }) => {
12778
- var _formData$cpt, _formData$cpt$details, _checkApiDataCheck$Ap, _formData$cpt4, _Digit, _Digit$ComponentRegis, _formData$cpt5, _apiDataCheck$7, _propertyDetails$wate, _propertyDetails$sewe, _formData$cpt6, _formData$cpt6$detail;
13691
+ var _formData$cpt, _formData$cpt$details, _checkApiDataCheck$Ap, _formData$cpt4, _Digit, _Digit$ComponentRegis, _formData$cpt5, _apiDataCheck$8, _propertyDetails$wate, _propertyDetails$sewe, _formData$cpt6, _formData$cpt6$detail;
12779
13692
  const {
12780
13693
  control,
12781
13694
  formState: localFormState,
@@ -12866,7 +13779,7 @@ const PropertyDetailsForm$1 = ({
12866
13779
  }
12867
13780
  }];
12868
13781
  useEffect(() => {
12869
- var _formData$cpt3, _formData$cpt3$detail, _ownerForName$map, _ownerForName$map$fil, _apiDataCheck$, _apiDataCheck$$owners, _apiDataCheck$$owners2, _formData$PropertyDet, _formData$PropertyDet2, _formData$PropertyDet3;
13782
+ var _formData$cpt3, _formData$cpt3$detail, _ownerForName$map, _ownerForName$map$fil, _apiDataCheck$, _apiDataCheck$$owners, _apiDataCheck$$owners2, _formData$PropertyDet, _formData$PropertyDet2, _formData$PropertyDet3, _apiDataCheck$2, _apiDataCheck$2$NdcDe, _ptDetail$additionalD, _formData$PropertyDet4;
12870
13783
  const ownerForName = (formData === null || formData === void 0 ? void 0 : (_formData$cpt3 = formData.cpt) === null || _formData$cpt3 === void 0 ? void 0 : (_formData$cpt3$detail = _formData$cpt3.details) === null || _formData$cpt3$detail === void 0 ? void 0 : _formData$cpt3$detail.owners) || [];
12871
13784
  const ownerNames = ownerForName === null || ownerForName === void 0 ? void 0 : (_ownerForName$map = ownerForName.map(owner => owner === null || owner === void 0 ? void 0 : owner.name)) === null || _ownerForName$map === void 0 ? void 0 : (_ownerForName$map$fil = _ownerForName$map.filter(Boolean)) === null || _ownerForName$map$fil === void 0 ? void 0 : _ownerForName$map$fil.join(", ");
12872
13785
  const ownerObj = selectedRow;
@@ -12887,6 +13800,10 @@ const PropertyDetailsForm$1 = ({
12887
13800
  isLoading: false,
12888
13801
  billData: (formData === null || formData === void 0 ? void 0 : (_formData$PropertyDet2 = formData.PropertyDetails) === null || _formData$PropertyDet2 === void 0 ? void 0 : (_formData$PropertyDet3 = _formData$PropertyDet2.propertyBillData) === null || _formData$PropertyDet3 === void 0 ? void 0 : _formData$PropertyDet3.billData) || {}
12889
13802
  };
13803
+ const ptDetail = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$2 = apiDataCheck[0]) === null || _apiDataCheck$2 === void 0 ? void 0 : (_apiDataCheck$2$NdcDe = _apiDataCheck$2.NdcDetails) === null || _apiDataCheck$2$NdcDe === void 0 ? void 0 : _apiDataCheck$2$NdcDe.find(detail => detail.businessService === "PT");
13804
+ if (ptDetail !== null && ptDetail !== void 0 && (_ptDetail$additionalD = ptDetail.additionalDetails) !== null && _ptDetail$additionalD !== void 0 && _ptDetail$additionalD.remarks && !(formData !== null && formData !== void 0 && (_formData$PropertyDet4 = formData.PropertyDetails) !== null && _formData$PropertyDet4 !== void 0 && _formData$PropertyDet4.remarks)) {
13805
+ combinedObject.remarks = ptDetail.additionalDetails.remarks;
13806
+ }
12890
13807
  setPropertyDetails(prev => {
12891
13808
  return {
12892
13809
  ...prev,
@@ -12895,11 +13812,11 @@ const PropertyDetailsForm$1 = ({
12895
13812
  });
12896
13813
  }, [formData === null || formData === void 0 ? void 0 : (_formData$cpt4 = formData.cpt) === null || _formData$cpt4 === void 0 ? void 0 : _formData$cpt4.details, apiDataCheck, selectedRow]);
12897
13814
  useEffect(() => {
12898
- var _apiDataCheck$2;
13815
+ var _apiDataCheck$3;
12899
13816
  let waterConnection;
12900
- if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$2 = apiDataCheck[0]) !== null && _apiDataCheck$2 !== void 0 && _apiDataCheck$2.NdcDetails) {
12901
- var _apiDataCheck$3, _apiDataCheck$3$NdcDe;
12902
- const resData = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$3 = apiDataCheck[0]) === null || _apiDataCheck$3 === void 0 ? void 0 : (_apiDataCheck$3$NdcDe = _apiDataCheck$3.NdcDetails) === null || _apiDataCheck$3$NdcDe === void 0 ? void 0 : _apiDataCheck$3$NdcDe.filter(item => {
13817
+ if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$3 = apiDataCheck[0]) !== null && _apiDataCheck$3 !== void 0 && _apiDataCheck$3.NdcDetails) {
13818
+ var _apiDataCheck$4, _apiDataCheck$4$NdcDe;
13819
+ const resData = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$4 = apiDataCheck[0]) === null || _apiDataCheck$4 === void 0 ? void 0 : (_apiDataCheck$4$NdcDe = _apiDataCheck$4.NdcDetails) === null || _apiDataCheck$4$NdcDe === void 0 ? void 0 : _apiDataCheck$4$NdcDe.filter(item => {
12903
13820
  return item.businessService == "WS";
12904
13821
  });
12905
13822
  waterConnection = (resData === null || resData === void 0 ? void 0 : resData.map(item => ({
@@ -12924,11 +13841,11 @@ const PropertyDetailsForm$1 = ({
12924
13841
  }));
12925
13842
  }, [waterConnectionData, apiDataCheck]);
12926
13843
  useEffect(() => {
12927
- var _apiDataCheck$4;
13844
+ var _apiDataCheck$5;
12928
13845
  let sewerageConnection;
12929
- if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$4 = apiDataCheck[0]) !== null && _apiDataCheck$4 !== void 0 && _apiDataCheck$4.NdcDetails) {
12930
- var _apiDataCheck$5, _apiDataCheck$5$NdcDe;
12931
- const resData = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$5 = apiDataCheck[0]) === null || _apiDataCheck$5 === void 0 ? void 0 : (_apiDataCheck$5$NdcDe = _apiDataCheck$5.NdcDetails) === null || _apiDataCheck$5$NdcDe === void 0 ? void 0 : _apiDataCheck$5$NdcDe.filter(item => {
13846
+ if (apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$5 = apiDataCheck[0]) !== null && _apiDataCheck$5 !== void 0 && _apiDataCheck$5.NdcDetails) {
13847
+ var _apiDataCheck$6, _apiDataCheck$6$NdcDe;
13848
+ const resData = apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$6 = apiDataCheck[0]) === null || _apiDataCheck$6 === void 0 ? void 0 : (_apiDataCheck$6$NdcDe = _apiDataCheck$6.NdcDetails) === null || _apiDataCheck$6$NdcDe === void 0 ? void 0 : _apiDataCheck$6$NdcDe.filter(item => {
12932
13849
  return item.businessService == "SW";
12933
13850
  });
12934
13851
  sewerageConnection = (resData === null || resData === void 0 ? void 0 : resData.map(item => ({
@@ -13212,8 +14129,8 @@ const PropertyDetailsForm$1 = ({
13212
14129
  useEffect(() => {
13213
14130
  var _checkApiDataCheck$Ap2;
13214
14131
  if (checkApiDataCheck !== null && checkApiDataCheck !== void 0 && (_checkApiDataCheck$Ap2 = checkApiDataCheck.Applications) !== null && _checkApiDataCheck$Ap2 !== void 0 && _checkApiDataCheck$Ap2[0] || apiDataCheck !== null && apiDataCheck !== void 0 && apiDataCheck[0]) {
13215
- var _checkApiDataCheck$Ap3, _checkApiDataCheck$Ap4, _apiDataCheck$6;
13216
- const checkOwners = (checkApiDataCheck === null || checkApiDataCheck === void 0 ? void 0 : (_checkApiDataCheck$Ap3 = checkApiDataCheck.Applications) === null || _checkApiDataCheck$Ap3 === void 0 ? void 0 : (_checkApiDataCheck$Ap4 = _checkApiDataCheck$Ap3[0]) === null || _checkApiDataCheck$Ap4 === void 0 ? void 0 : _checkApiDataCheck$Ap4.owners) || (apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$6 = apiDataCheck[0]) === null || _apiDataCheck$6 === void 0 ? void 0 : _apiDataCheck$6.owners);
14132
+ var _checkApiDataCheck$Ap3, _checkApiDataCheck$Ap4, _apiDataCheck$7;
14133
+ const checkOwners = (checkApiDataCheck === null || checkApiDataCheck === void 0 ? void 0 : (_checkApiDataCheck$Ap3 = checkApiDataCheck.Applications) === null || _checkApiDataCheck$Ap3 === void 0 ? void 0 : (_checkApiDataCheck$Ap4 = _checkApiDataCheck$Ap3[0]) === null || _checkApiDataCheck$Ap4 === void 0 ? void 0 : _checkApiDataCheck$Ap4.owners) || (apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$7 = apiDataCheck[0]) === null || _apiDataCheck$7 === void 0 ? void 0 : _apiDataCheck$7.owners);
13217
14134
  const filterRow = checkOwners === null || checkOwners === void 0 ? void 0 : checkOwners.find(owner => owner === null || owner === void 0 ? void 0 : owner.isPrimaryOwner);
13218
14135
  console.log("filterRow===", filterRow);
13219
14136
  setSelectedRow(filterRow);
@@ -13223,7 +14140,7 @@ const PropertyDetailsForm$1 = ({
13223
14140
  style: {
13224
14141
  marginBottom: "16px"
13225
14142
  }
13226
- }, ((formData === null || formData === void 0 ? void 0 : (_formData$cpt5 = formData.cpt) === null || _formData$cpt5 === void 0 ? void 0 : _formData$cpt5.details) || (apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$7 = apiDataCheck[0]) === null || _apiDataCheck$7 === void 0 ? void 0 : _apiDataCheck$7.NdcDetails)) && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, {
14143
+ }, ((formData === null || formData === void 0 ? void 0 : (_formData$cpt5 = formData.cpt) === null || _formData$cpt5 === void 0 ? void 0 : _formData$cpt5.details) || (apiDataCheck === null || apiDataCheck === void 0 ? void 0 : (_apiDataCheck$8 = apiDataCheck[0]) === null || _apiDataCheck$8 === void 0 ? void 0 : _apiDataCheck$8.NdcDetails)) && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, {
13227
14144
  style: {
13228
14145
  marginTop: "40px"
13229
14146
  }
@@ -13238,7 +14155,7 @@ const PropertyDetailsForm$1 = ({
13238
14155
  width: "100%"
13239
14156
  }
13240
14157
  }, propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$wate = propertyDetails.waterConnection) === null || _propertyDetails$wate === void 0 ? void 0 : _propertyDetails$wate.map((item, index) => {
13241
- var _apiDataCheck$8, _item$billData, _item$billData2, _item$billData3, _item$billData4;
14158
+ var _apiDataCheck$9, _item$billData, _item$billData2, _item$billData3, _item$billData4;
13242
14159
  return /*#__PURE__*/React.createElement("div", {
13243
14160
  className: "ndc_property_search",
13244
14161
  key: index,
@@ -13279,7 +14196,7 @@ const PropertyDetailsForm$1 = ({
13279
14196
  alignItems: "center",
13280
14197
  gap: "12px"
13281
14198
  }
13282
- }, !(apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$8 = apiDataCheck[0]) !== null && _apiDataCheck$8 !== void 0 && _apiDataCheck$8.NdcDetails) && (item === null || item === void 0 ? void 0 : item.connectionNo) && !(item !== null && item !== void 0 && (_item$billData = item.billData) !== null && _item$billData !== void 0 && _item$billData.id) && (item === null || item === void 0 ? void 0 : (_item$billData2 = item.billData) === null || _item$billData2 === void 0 ? void 0 : _item$billData2.totalAmount) != 0 && /*#__PURE__*/React.createElement("button", {
14199
+ }, !(apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$9 = apiDataCheck[0]) !== null && _apiDataCheck$9 !== void 0 && _apiDataCheck$9.NdcDetails) && (item === null || item === void 0 ? void 0 : item.connectionNo) && !(item !== null && item !== void 0 && (_item$billData = item.billData) !== null && _item$billData !== void 0 && _item$billData.id) && (item === null || item === void 0 ? void 0 : (_item$billData2 = item.billData) === null || _item$billData2 === void 0 ? void 0 : _item$billData2.totalAmount) != 0 && /*#__PURE__*/React.createElement("button", {
13283
14200
  className: "submit-bar",
13284
14201
  type: "button",
13285
14202
  style: {
@@ -13346,7 +14263,7 @@ const PropertyDetailsForm$1 = ({
13346
14263
  width: "100%"
13347
14264
  }
13348
14265
  }, propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$sewe = propertyDetails.sewerageConnection) === null || _propertyDetails$sewe === void 0 ? void 0 : _propertyDetails$sewe.map((item, index) => {
13349
- var _apiDataCheck$9, _item$billData5, _item$billData6, _item$billData7, _item$billData8;
14266
+ var _apiDataCheck$0, _item$billData5, _item$billData6, _item$billData7, _item$billData8;
13350
14267
  return /*#__PURE__*/React.createElement("div", {
13351
14268
  className: "ndc_property_search",
13352
14269
  key: index,
@@ -13387,7 +14304,7 @@ const PropertyDetailsForm$1 = ({
13387
14304
  alignItems: "center",
13388
14305
  gap: "12px"
13389
14306
  }
13390
- }, !(apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$9 = apiDataCheck[0]) !== null && _apiDataCheck$9 !== void 0 && _apiDataCheck$9.NdcDetails) && (item === null || item === void 0 ? void 0 : item.connectionNo) && !(item !== null && item !== void 0 && (_item$billData5 = item.billData) !== null && _item$billData5 !== void 0 && _item$billData5.id) && (item === null || item === void 0 ? void 0 : (_item$billData6 = item.billData) === null || _item$billData6 === void 0 ? void 0 : _item$billData6.totalAmount) != 0 && /*#__PURE__*/React.createElement("button", {
14307
+ }, !(apiDataCheck !== null && apiDataCheck !== void 0 && (_apiDataCheck$0 = apiDataCheck[0]) !== null && _apiDataCheck$0 !== void 0 && _apiDataCheck$0.NdcDetails) && (item === null || item === void 0 ? void 0 : item.connectionNo) && !(item !== null && item !== void 0 && (_item$billData5 = item.billData) !== null && _item$billData5 !== void 0 && _item$billData5.id) && (item === null || item === void 0 ? void 0 : (_item$billData6 = item.billData) === null || _item$billData6 === void 0 ? void 0 : _item$billData6.totalAmount) != 0 && /*#__PURE__*/React.createElement("button", {
13391
14308
  className: "submit-bar",
13392
14309
  type: "button",
13393
14310
  style: {
@@ -14617,7 +15534,7 @@ const PayWSBillModal = ({
14617
15534
  d: "M0 0h24v24H0V0z",
14618
15535
  fill: "none"
14619
15536
  }), /*#__PURE__*/React.createElement("path", {
14620
- d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 \r 17.59 19 19 17.59 13.41 12 19 6.41z"
15537
+ d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
14621
15538
  }));
14622
15539
  const CloseBtn = ({
14623
15540
  onClick
@@ -15237,7 +16154,7 @@ const NDCNewFormSummaryStepThreeEmployee = ({
15237
16154
  }
15238
16155
  };
15239
16156
  function mapToNDCPayload(inputData, actionStatus) {
15240
- var _Digit$UserService$ge, _ref, _inputData$apiData, _inputData$apiData$Ap, _inputData$apiData$Ap2, _formData$responseDat, _formData$apiData, _formData$apiData$App, _inputData$DocummentD, _inputData$DocummentD2;
16157
+ var _Digit$UserService$ge, _ref, _inputData$apiData, _inputData$apiData$Ap, _inputData$apiData$Ap2, _formData$responseDat, _formData$apiData, _formData$apiData$App, _baseApplication$NdcD, _formData$NDCDetails4, _formData$NDCDetails5, _inputData$DocummentD, _inputData$DocummentD2;
15241
16158
  const applicant = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
15242
16159
  console.log("checkFormData", formData);
15243
16160
  const owners = (_ref = (inputData === null || inputData === void 0 ? void 0 : (_inputData$apiData = inputData.apiData) === null || _inputData$apiData === void 0 ? void 0 : (_inputData$apiData$Ap = _inputData$apiData.Applications) === null || _inputData$apiData$Ap === void 0 ? void 0 : (_inputData$apiData$Ap2 = _inputData$apiData$Ap[0]) === null || _inputData$apiData$Ap2 === void 0 ? void 0 : _inputData$apiData$Ap2.owners) || []) === null || _ref === void 0 ? void 0 : _ref.map(({
@@ -15252,7 +16169,21 @@ const NDCNewFormSummaryStepThreeEmployee = ({
15252
16169
  action: actionStatus
15253
16170
  },
15254
16171
  owners: owners,
15255
- NdcDetails: baseApplication === null || baseApplication === void 0 ? void 0 : baseApplication.NdcDetails,
16172
+ NdcDetails: baseApplication === null || baseApplication === void 0 ? void 0 : (_baseApplication$NdcD = baseApplication.NdcDetails) === null || _baseApplication$NdcD === void 0 ? void 0 : _baseApplication$NdcD.map(detail => {
16173
+ if (detail.businessService === "PT") {
16174
+ var _formData$NDCDetails, _formData$NDCDetails$, _formData$NDCDetails2, _formData$NDCDetails3;
16175
+ return {
16176
+ ...detail,
16177
+ additionalDetails: {
16178
+ ...detail.additionalDetails,
16179
+ reason: formData === null || formData === void 0 ? void 0 : (_formData$NDCDetails = formData.NDCDetails) === null || _formData$NDCDetails === void 0 ? void 0 : (_formData$NDCDetails$ = _formData$NDCDetails.NDCReason) === null || _formData$NDCDetails$ === void 0 ? void 0 : _formData$NDCDetails$.reason,
16180
+ remarks: formData === null || formData === void 0 ? void 0 : (_formData$NDCDetails2 = formData.NDCDetails) === null || _formData$NDCDetails2 === void 0 ? void 0 : (_formData$NDCDetails3 = _formData$NDCDetails2.PropertyDetails) === null || _formData$NDCDetails3 === void 0 ? void 0 : _formData$NDCDetails3.remarks
16181
+ }
16182
+ };
16183
+ }
16184
+ return detail;
16185
+ }),
16186
+ reason: formData === null || formData === void 0 ? void 0 : (_formData$NDCDetails4 = formData.NDCDetails) === null || _formData$NDCDetails4 === void 0 ? void 0 : (_formData$NDCDetails5 = _formData$NDCDetails4.NDCReason) === null || _formData$NDCDetails5 === void 0 ? void 0 : _formData$NDCDetails5.code,
15256
16187
  Documents: []
15257
16188
  };
15258
16189
  ((inputData === null || inputData === void 0 ? void 0 : (_inputData$DocummentD = inputData.DocummentDetails) === null || _inputData$DocummentD === void 0 ? void 0 : (_inputData$DocummentD2 = _inputData$DocummentD.documents) === null || _inputData$DocummentD2 === void 0 ? void 0 : _inputData$DocummentD2.documents) || []).forEach(doc => {