@mseva/digit-ui-module-ndc 1.0.72-dev.1.1 → 1.0.72-dev.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +279 -1042
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -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,
|
|
1
|
+
import { Card, Banner, ActionBar, SubmitBar as SubmitBar$1, PrivateRoute, BreadCrumb, AppContainer, Dropdown, UploadFile, Modal, FormComposer, Toast, Loader as Loader$1, MultiLink, 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';
|
|
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,
|
|
6
|
+
import { useForm, Controller, useFormContext, FormProvider, useFieldArray } from 'react-hook-form';
|
|
7
7
|
import 'react-query';
|
|
8
8
|
import { combineReducers } from 'redux';
|
|
9
9
|
|
|
@@ -2153,7 +2153,9 @@ function NewApplicationTimeline({
|
|
|
2153
2153
|
workflowDetails,
|
|
2154
2154
|
t,
|
|
2155
2155
|
tenantId = Digit.ULBService.getCurrentTenantId(),
|
|
2156
|
-
timeObj
|
|
2156
|
+
timeObj,
|
|
2157
|
+
empUserName = null,
|
|
2158
|
+
handleSetEmpDesignation = () => {}
|
|
2157
2159
|
}) {
|
|
2158
2160
|
var _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _employeeData$data, _employeeData$data$Em;
|
|
2159
2161
|
const {
|
|
@@ -2228,6 +2230,9 @@ function NewApplicationTimeline({
|
|
|
2228
2230
|
const translationKey = `COMMON_MASTERS_DESIGNATION_${assignment === null || assignment === void 0 ? void 0 : assignment.designation}`;
|
|
2229
2231
|
deptMap[emp === null || emp === void 0 ? void 0 : emp.code] = translationKey;
|
|
2230
2232
|
});
|
|
2233
|
+
if (employeeData && empUserName) {
|
|
2234
|
+
handleSetEmpDesignation(t(deptMap[empUserName]));
|
|
2235
|
+
}
|
|
2231
2236
|
if (isLoading) return /*#__PURE__*/React.createElement(Loader$1, null);
|
|
2232
2237
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
2233
2238
|
className: "custom-timeline-container"
|
|
@@ -2551,7 +2556,7 @@ const availableOptions = [{
|
|
|
2551
2556
|
name: "No"
|
|
2552
2557
|
}];
|
|
2553
2558
|
const ApplicationOverview = () => {
|
|
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$
|
|
2559
|
+
var _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _applicationDetails$A2, _applicationDetails$A3, _applicationDetails$A4, _applicationDetails$A5, _user, _user$info, _user$info$roles, _user2, _user2$info, _user2$info$roles$fin, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetailsTemp$, _workflowDetailsTemp$2, _applicationDetails$A0, _applicationDetails$A1, _propertyDetailsFetch3, _Object$entries, _displayData$NdcDetai2, _displayData$Document, _applicationDetails$A24, _applicationDetails$A25, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$data11, _applicationDetails$A26, _applicationDetails$A27, _workflowDetails$data12;
|
|
2555
2560
|
const {
|
|
2556
2561
|
id
|
|
2557
2562
|
} = useParams();
|
|
@@ -2584,6 +2589,7 @@ const ApplicationOverview = () => {
|
|
|
2584
2589
|
const [showModal, setShowModal] = useState(false);
|
|
2585
2590
|
const [getPropertyId, setPropertyId] = useState(null);
|
|
2586
2591
|
const [approver, setApprover] = useState(null);
|
|
2592
|
+
const [showOptions, setShowOptions] = useState(false);
|
|
2587
2593
|
const handleMarkPending = (consumerCode, value, index) => {
|
|
2588
2594
|
setMarkedPending(prev => {
|
|
2589
2595
|
const updated = {
|
|
@@ -2662,6 +2668,68 @@ const ApplicationOverview = () => {
|
|
|
2662
2668
|
const empData = EmployeeData(tenantId, approver);
|
|
2663
2669
|
console.log("approver for ndc", approver);
|
|
2664
2670
|
console.log("officerData", empData);
|
|
2671
|
+
const {
|
|
2672
|
+
data: reciept_data,
|
|
2673
|
+
isLoading: recieptDataLoading
|
|
2674
|
+
} = Digit.Hooks.useRecieptSearch({
|
|
2675
|
+
tenantId: tenantId,
|
|
2676
|
+
businessService: "NDC",
|
|
2677
|
+
consumerCodes: id,
|
|
2678
|
+
isEmployee: false
|
|
2679
|
+
}, {
|
|
2680
|
+
enabled: id ? true : false
|
|
2681
|
+
});
|
|
2682
|
+
async function getRecieptSearch({
|
|
2683
|
+
tenantId,
|
|
2684
|
+
payments,
|
|
2685
|
+
...params
|
|
2686
|
+
}) {
|
|
2687
|
+
setLoader(true);
|
|
2688
|
+
try {
|
|
2689
|
+
var _applicationDetails$A, _response;
|
|
2690
|
+
let response = null;
|
|
2691
|
+
let application = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A = applicationDetails.Applications) === null || _applicationDetails$A === void 0 ? void 0 : _applicationDetails$A[0];
|
|
2692
|
+
if (payments !== null && payments !== void 0 && payments.fileStoreId) {
|
|
2693
|
+
response = {
|
|
2694
|
+
filestoreIds: [payments === null || payments === void 0 ? void 0 : payments.fileStoreId]
|
|
2695
|
+
};
|
|
2696
|
+
} else {
|
|
2697
|
+
response = await Digit.PaymentService.generatePdf(tenantId, {
|
|
2698
|
+
Payments: [{
|
|
2699
|
+
...(payments || {}),
|
|
2700
|
+
...application
|
|
2701
|
+
}]
|
|
2702
|
+
}, "ndc-receipt");
|
|
2703
|
+
}
|
|
2704
|
+
const fileStore = await Digit.PaymentService.printReciept(tenantId, {
|
|
2705
|
+
fileStoreIds: response.filestoreIds[0]
|
|
2706
|
+
});
|
|
2707
|
+
window.open(fileStore[(_response = response) === null || _response === void 0 ? void 0 : _response.filestoreIds[0]], "_blank");
|
|
2708
|
+
setLoader(false);
|
|
2709
|
+
} catch (error) {
|
|
2710
|
+
console.error(error);
|
|
2711
|
+
setLoader(false);
|
|
2712
|
+
}
|
|
2713
|
+
}
|
|
2714
|
+
const dowloadOptions = [];
|
|
2715
|
+
if ((applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A2 = applicationDetails.Applications) === null || _applicationDetails$A2 === void 0 ? void 0 : (_applicationDetails$A3 = _applicationDetails$A2[0]) === null || _applicationDetails$A3 === void 0 ? void 0 : _applicationDetails$A3.applicationStatus) === "APPROVED" || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A4 = applicationDetails.Applications) === null || _applicationDetails$A4 === void 0 ? void 0 : (_applicationDetails$A5 = _applicationDetails$A4[0]) === null || _applicationDetails$A5 === void 0 ? void 0 : _applicationDetails$A5.applicationStatus) === "REJECTED") {
|
|
2716
|
+
dowloadOptions.push({
|
|
2717
|
+
label: t("DOWNLOAD_CERTIFICATE"),
|
|
2718
|
+
onClick: () => handleDownloadPdf()
|
|
2719
|
+
});
|
|
2720
|
+
if (reciept_data && (reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments.length) > 0 && !recieptDataLoading) {
|
|
2721
|
+
dowloadOptions.push({
|
|
2722
|
+
label: t("PTR_FEE_RECIEPT"),
|
|
2723
|
+
onClick: () => {
|
|
2724
|
+
var _reciept_data$Payment;
|
|
2725
|
+
return getRecieptSearch({
|
|
2726
|
+
tenantId: reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment = reciept_data.Payments[0]) === null || _reciept_data$Payment === void 0 ? void 0 : _reciept_data$Payment.tenantId,
|
|
2727
|
+
payments: reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments[0]
|
|
2728
|
+
});
|
|
2729
|
+
}
|
|
2730
|
+
});
|
|
2731
|
+
}
|
|
2732
|
+
}
|
|
2665
2733
|
let user = Digit.UserService.getUser();
|
|
2666
2734
|
const menuRef = useRef();
|
|
2667
2735
|
if (window.location.href.includes("/obps") || window.location.href.includes("/noc")) {
|
|
@@ -2704,8 +2772,8 @@ const ApplicationOverview = () => {
|
|
|
2704
2772
|
});
|
|
2705
2773
|
};
|
|
2706
2774
|
useEffect(() => {
|
|
2707
|
-
var _applicationDetails$
|
|
2708
|
-
const ndcObject = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
2775
|
+
var _applicationDetails$A6;
|
|
2776
|
+
const ndcObject = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A6 = applicationDetails.Applications) === null || _applicationDetails$A6 === void 0 ? void 0 : _applicationDetails$A6[0];
|
|
2709
2777
|
if (ndcObject) {
|
|
2710
2778
|
var _ndcObject$owners, _ndcObject$owners$, _ndcObject$owners2, _ndcObject$owners2$, _ndcObject$owners3, _ndcObject$owners3$, _ndcObject$NdcDetails, _ndcObject$NdcDetails2, _ndcObject$NdcDetails3, _removeDuplicatesByUU;
|
|
2711
2779
|
const applicantData = {
|
|
@@ -2770,9 +2838,9 @@ const ApplicationOverview = () => {
|
|
|
2770
2838
|
}
|
|
2771
2839
|
};
|
|
2772
2840
|
function onActionSelect(action) {
|
|
2773
|
-
var _action$state, _applicationDetails$
|
|
2841
|
+
var _action$state, _applicationDetails$A8, _applicationDetails$A9, _action$state2, _action$state2$action, _filterNexState$, _filterRoles$, _displayData$applican;
|
|
2774
2842
|
console.log("action====???", action === null || action === void 0 ? void 0 : (_action$state = action.state) === null || _action$state === void 0 ? void 0 : _action$state.actions);
|
|
2775
|
-
const ndcDetails = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
2843
|
+
const ndcDetails = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A8 = applicationDetails.Applications) === null || _applicationDetails$A8 === void 0 ? void 0 : (_applicationDetails$A9 = _applicationDetails$A8[0]) === null || _applicationDetails$A9 === void 0 ? void 0 : _applicationDetails$A9.NdcDetails) || [];
|
|
2776
2844
|
const hasDuePending = ndcDetails === null || ndcDetails === void 0 ? void 0 : ndcDetails.some(item => item.isDuePending === true);
|
|
2777
2845
|
console.log("hasDuePending", hasDuePending);
|
|
2778
2846
|
const filterNexState = action === null || action === void 0 ? void 0 : (_action$state2 = action.state) === null || _action$state2 === void 0 ? void 0 : (_action$state2$action = _action$state2.actions) === null || _action$state2$action === void 0 ? void 0 : _action$state2$action.filter(item => item.action == (action === null || action === void 0 ? void 0 : action.action));
|
|
@@ -2911,7 +2979,7 @@ const ApplicationOverview = () => {
|
|
|
2911
2979
|
enabled: getPropertyId ? true : false,
|
|
2912
2980
|
privacy: Digit.Utils.getPrivacyObject()
|
|
2913
2981
|
});
|
|
2914
|
-
console.log("applicationDetails", applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
2982
|
+
console.log("applicationDetails", applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A0 = applicationDetails.Applications) === null || _applicationDetails$A0 === void 0 ? void 0 : (_applicationDetails$A1 = _applicationDetails$A0[0]) === null || _applicationDetails$A1 === void 0 ? void 0 : _applicationDetails$A1.NdcDetails);
|
|
2915
2983
|
useEffect(() => {
|
|
2916
2984
|
const handleClickOutside = event => {
|
|
2917
2985
|
if (toastRef.current && !toastRef.current.contains(event.target)) {
|
|
@@ -2931,7 +2999,7 @@ const ApplicationOverview = () => {
|
|
|
2931
2999
|
address = propertyDetailsFetch.Properties[0].address;
|
|
2932
3000
|
formattedAddress = [(_address = address) === null || _address === void 0 ? void 0 : _address.doorNo, (_address2 = address) === null || _address2 === void 0 ? void 0 : _address2.buildingName, (_address3 = address) === null || _address3 === void 0 ? void 0 : _address3.street, (_address4 = address) === null || _address4 === void 0 ? void 0 : (_address4$locality = _address4.locality) === null || _address4$locality === void 0 ? void 0 : _address4$locality.name, (_address5 = address) === null || _address5 === void 0 ? void 0 : _address5.city].filter(Boolean).join(", ");
|
|
2933
3001
|
}
|
|
2934
|
-
if (isLoading || isDetailsLoading) {
|
|
3002
|
+
if (isLoading || isDetailsLoading || recieptDataLoading) {
|
|
2935
3003
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
2936
3004
|
}
|
|
2937
3005
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -2943,16 +3011,19 @@ const ApplicationOverview = () => {
|
|
|
2943
3011
|
alignItems: "center",
|
|
2944
3012
|
padding: "16px"
|
|
2945
3013
|
}
|
|
2946
|
-
}, isCemp &&
|
|
2947
|
-
className: "
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
3014
|
+
}, isCemp && /*#__PURE__*/React.createElement("div", {
|
|
3015
|
+
className: "cardHeaderWithOptions ral-app-details-header"
|
|
3016
|
+
}, getLoader && /*#__PURE__*/React.createElement(Loader, null), dowloadOptions && dowloadOptions.length > 0 && /*#__PURE__*/React.createElement(MultiLink, {
|
|
3017
|
+
className: "multilinkWrapper",
|
|
3018
|
+
onHeadClick: () => setShowOptions(!showOptions),
|
|
3019
|
+
displayOptions: showOptions,
|
|
3020
|
+
options: dowloadOptions
|
|
3021
|
+
}))), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("NDC_APPLICATION_DETAILS_OVERVIEW")), /*#__PURE__*/React.createElement(StatusTable, null, (displayData === null || displayData === void 0 ? void 0 : displayData.applicantData) && ((_Object$entries = Object.entries(displayData === null || displayData === void 0 ? void 0 : displayData.applicantData)) === null || _Object$entries === void 0 ? void 0 : _Object$entries.map(([key, value]) => /*#__PURE__*/React.createElement(Row, {
|
|
2951
3022
|
key: key,
|
|
2952
3023
|
label: t(`${key === null || key === void 0 ? void 0 : key.toUpperCase()}`),
|
|
2953
3024
|
text: Array.isArray(value) ? value.map(item => typeof item === "object" ? t((item === null || item === void 0 ? void 0 : item.code) || "N/A") : t(item || "N/A")).join(", ") : typeof value === "object" ? t((value === null || value === void 0 ? void 0 : value.code) || "N/A") : t(value || "N/A")
|
|
2954
3025
|
}))))), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("NDC_APPLICATION_NDC_DETAILS_OVERVIEW")), displayData === null || displayData === void 0 ? void 0 : (_displayData$NdcDetai2 = displayData.NdcDetails) === null || _displayData$NdcDetai2 === void 0 ? void 0 : _displayData$NdcDetai2.map((detail, index) => {
|
|
2955
|
-
var _applicationDetails$
|
|
3026
|
+
var _applicationDetails$A10, _applicationDetails$A11, _applicationDetails$A12, _applicationDetails$A13, _applicationDetails$A14, _applicationDetails$A15, _applicationDetails$A16, _applicationDetails$A17, _applicationDetails$A18, _propertyDetailsFetch4, _propertyDetailsFetch5, _propertyDetailsFetch6, _propertyDetailsFetch7, _propertyDetailsFetch8, _propertyDetailsFetch9, _propertyDetailsFetch0, _propertyDetailsFetch1, _propertyDetailsFetch10, _propertyDetailsFetch11, _propertyDetailsFetch12, _propertyDetailsFetch13, _propertyDetailsFetch14, _propertyDetailsFetch15, _propertyDetailsFetch16, _propertyDetailsFetch17, _propertyDetailsFetch18, _propertyDetailsFetch19, _propertyDetailsFetch20, _propertyDetailsFetch21, _applicationDetails$A19, _applicationDetails$A20, _applicationDetails$A21, _applicationDetails$A22, _applicationDetails$A23;
|
|
2956
3027
|
const isPT = (detail === null || detail === void 0 ? void 0 : detail.businessService) === "NDC_PROPERTY_TAX";
|
|
2957
3028
|
const isSW = (detail === null || detail === void 0 ? void 0 : detail.businessService) === "NDC_SEWERAGE_SERVICE_CONNECTION";
|
|
2958
3029
|
const isWS = (detail === null || detail === void 0 ? void 0 : detail.businessService) === "NDC_WATER_SERVICE_CONNECTION";
|
|
@@ -3011,7 +3082,7 @@ const ApplicationOverview = () => {
|
|
|
3011
3082
|
text: t(detail.propertyType) || detail.propertyType
|
|
3012
3083
|
}), isPT && (propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : propertyDetailsFetch.Properties) && /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(Row, {
|
|
3013
3084
|
label: t("CHB_DISCOUNT_REASON"),
|
|
3014
|
-
text: t(`${(applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
3085
|
+
text: t(`${(applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A10 = applicationDetails.Applications) === null || _applicationDetails$A10 === void 0 ? void 0 : (_applicationDetails$A11 = _applicationDetails$A10[0]) === null || _applicationDetails$A11 === void 0 ? void 0 : _applicationDetails$A11.reason) == "OTHERS" ? applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A12 = applicationDetails.Applications) === null || _applicationDetails$A12 === void 0 ? void 0 : (_applicationDetails$A13 = _applicationDetails$A12[0]) === null || _applicationDetails$A13 === void 0 ? void 0 : (_applicationDetails$A14 = _applicationDetails$A13.NdcDetails) === null || _applicationDetails$A14 === void 0 ? void 0 : (_applicationDetails$A15 = _applicationDetails$A14.find(item => (item === null || item === void 0 ? void 0 : item.businessService) === "PT")) === null || _applicationDetails$A15 === void 0 ? void 0 : (_applicationDetails$A16 = _applicationDetails$A15.additionalDetails) === null || _applicationDetails$A16 === void 0 ? void 0 : _applicationDetails$A16.reason : applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A17 = applicationDetails.Applications) === null || _applicationDetails$A17 === void 0 ? void 0 : (_applicationDetails$A18 = _applicationDetails$A17[0]) === null || _applicationDetails$A18 === void 0 ? void 0 : _applicationDetails$A18.reason}`)
|
|
3015
3086
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
3016
3087
|
label: t("City"),
|
|
3017
3088
|
text: propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch4 = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch4 === void 0 ? void 0 : (_propertyDetailsFetch5 = _propertyDetailsFetch4[0]) === null || _propertyDetailsFetch5 === void 0 ? void 0 : (_propertyDetailsFetch6 = _propertyDetailsFetch5.address) === null || _propertyDetailsFetch6 === void 0 ? void 0 : _propertyDetailsFetch6.city
|
|
@@ -3035,7 +3106,7 @@ const ApplicationOverview = () => {
|
|
|
3035
3106
|
text: propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch19 = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch19 === void 0 ? void 0 : (_propertyDetailsFetch20 = _propertyDetailsFetch19[0]) === null || _propertyDetailsFetch20 === void 0 ? void 0 : (_propertyDetailsFetch21 = _propertyDetailsFetch20.additionalDetails) === null || _propertyDetailsFetch21 === void 0 ? void 0 : _propertyDetailsFetch21.yearConstruction
|
|
3036
3107
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
3037
3108
|
label: t("Remarks"),
|
|
3038
|
-
text: (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
3109
|
+
text: (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A19 = applicationDetails.Applications) === null || _applicationDetails$A19 === void 0 ? void 0 : (_applicationDetails$A20 = _applicationDetails$A19[0]) === null || _applicationDetails$A20 === void 0 ? void 0 : (_applicationDetails$A21 = _applicationDetails$A20.NdcDetails) === null || _applicationDetails$A21 === void 0 ? void 0 : (_applicationDetails$A22 = _applicationDetails$A21.find(item => (item === null || item === void 0 ? void 0 : item.businessService) === "PT")) === null || _applicationDetails$A22 === void 0 ? void 0 : (_applicationDetails$A23 = _applicationDetails$A22.additionalDetails) === null || _applicationDetails$A23 === void 0 ? void 0 : _applicationDetails$A23.remarks) || "N/A"
|
|
3039
3110
|
}))), canRaiseFlag && /*#__PURE__*/React.createElement("div", {
|
|
3040
3111
|
className: "mychallan-custom"
|
|
3041
3112
|
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
@@ -3063,7 +3134,7 @@ const ApplicationOverview = () => {
|
|
|
3063
3134
|
}) : /*#__PURE__*/React.createElement("div", null, t("TL_NO_DOCUMENTS_MSG")))), /*#__PURE__*/React.createElement(NewApplicationTimeline, {
|
|
3064
3135
|
workflowDetails: workflowDetails,
|
|
3065
3136
|
t: t
|
|
3066
|
-
}), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
3137
|
+
}), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A24 = applicationDetails.Applications) === null || _applicationDetails$A24 === void 0 ? void 0 : (_applicationDetails$A25 = _applicationDetails$A24[0]) === null || _applicationDetails$A25 === void 0 ? void 0 : _applicationDetails$A25.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, {
|
|
3067
3138
|
localeKeyPrefix: `WF_EDITRENEWAL`,
|
|
3068
3139
|
options: actions,
|
|
3069
3140
|
optionKey: "action",
|
|
@@ -3073,11 +3144,11 @@ const ApplicationOverview = () => {
|
|
|
3073
3144
|
ref: menuRef,
|
|
3074
3145
|
label: t("WF_TAKE_ACTION"),
|
|
3075
3146
|
onSubmit: () => setDisplayMenu(!displayMenu)
|
|
3076
|
-
})), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
3147
|
+
})), (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A26 = applicationDetails.Applications) === null || _applicationDetails$A26 === void 0 ? void 0 : (_applicationDetails$A27 = _applicationDetails$A26[0]) === null || _applicationDetails$A27 === void 0 ? void 0 : _applicationDetails$A27.applicationStatus) == "INITIATED" && /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar$1, {
|
|
3077
3148
|
label: t("COMMON_EDIT"),
|
|
3078
3149
|
onSubmit: () => {
|
|
3079
|
-
var _applicationDetails$
|
|
3080
|
-
const id = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
3150
|
+
var _applicationDetails$A28, _applicationDetails$A29;
|
|
3151
|
+
const id = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A28 = applicationDetails.Applications) === null || _applicationDetails$A28 === void 0 ? void 0 : (_applicationDetails$A29 = _applicationDetails$A28[0]) === null || _applicationDetails$A29 === void 0 ? void 0 : _applicationDetails$A29.applicationNo;
|
|
3081
3152
|
history.push(`/digit-ui/employee/ndc/create/${id}`);
|
|
3082
3153
|
}
|
|
3083
3154
|
})), showModal ? /*#__PURE__*/React.createElement(NDCModal, {
|
|
@@ -10420,7 +10491,7 @@ var lodash = createCommonjsModule(function (module, exports) {
|
|
|
10420
10491
|
});
|
|
10421
10492
|
|
|
10422
10493
|
const CitizenApplicationOverview = () => {
|
|
10423
|
-
var _user, _user$info, _user$info$roles, _propertyDetailsFetch3, _propertyDetailsFetch4, _propertyDetailsFetch5, _ownerForName$map, _ownerForName$map$fil, _applicationDetails$
|
|
10494
|
+
var _applicationDetails$A2, _applicationDetails$A3, _applicationDetails$A4, _applicationDetails$A5, _user, _user$info, _user$info$roles, _propertyDetailsFetch3, _propertyDetailsFetch4, _propertyDetailsFetch5, _ownerForName$map, _ownerForName$map$fil, _applicationDetails$A8, _applicationDetails$A9, _applicationDetails$A0, _applicationDetails$A1, _applicationDetails$A10, _Object$entries, _Object$entries$filte, _displayData$NdcDetai2, _displayData$Document;
|
|
10424
10495
|
const {
|
|
10425
10496
|
id
|
|
10426
10497
|
} = useParams();
|
|
@@ -10433,6 +10504,7 @@ const CitizenApplicationOverview = () => {
|
|
|
10433
10504
|
const [appDetails, setAppDetails] = useState({});
|
|
10434
10505
|
const [showToast, setShowToast] = useState(null);
|
|
10435
10506
|
const [approver, setApprover] = useState(null);
|
|
10507
|
+
const [showOptions, setShowOptions] = useState(false);
|
|
10436
10508
|
const [ndcDatils, setNdcDetails] = useState([]);
|
|
10437
10509
|
const [displayData, setDisplayData] = useState({});
|
|
10438
10510
|
const [getLoader, setLoader] = useState(false);
|
|
@@ -10478,6 +10550,68 @@ const CitizenApplicationOverview = () => {
|
|
|
10478
10550
|
const userInfo = userInfos ? JSON.parse(userInfos) : {};
|
|
10479
10551
|
user = userInfo === null || userInfo === void 0 ? void 0 : userInfo.value;
|
|
10480
10552
|
}
|
|
10553
|
+
const {
|
|
10554
|
+
data: reciept_data,
|
|
10555
|
+
isLoading: recieptDataLoading
|
|
10556
|
+
} = Digit.Hooks.useRecieptSearch({
|
|
10557
|
+
tenantId: tenantId,
|
|
10558
|
+
businessService: "NDC",
|
|
10559
|
+
consumerCodes: id,
|
|
10560
|
+
isEmployee: false
|
|
10561
|
+
}, {
|
|
10562
|
+
enabled: id ? true : false
|
|
10563
|
+
});
|
|
10564
|
+
async function getRecieptSearch({
|
|
10565
|
+
tenantId,
|
|
10566
|
+
payments,
|
|
10567
|
+
...params
|
|
10568
|
+
}) {
|
|
10569
|
+
setLoader(true);
|
|
10570
|
+
try {
|
|
10571
|
+
var _applicationDetails$A, _response;
|
|
10572
|
+
let response = null;
|
|
10573
|
+
let application = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A = applicationDetails.Applications) === null || _applicationDetails$A === void 0 ? void 0 : _applicationDetails$A[0];
|
|
10574
|
+
if (payments !== null && payments !== void 0 && payments.fileStoreId) {
|
|
10575
|
+
response = {
|
|
10576
|
+
filestoreIds: [payments === null || payments === void 0 ? void 0 : payments.fileStoreId]
|
|
10577
|
+
};
|
|
10578
|
+
} else {
|
|
10579
|
+
response = await Digit.PaymentService.generatePdf(tenantId, {
|
|
10580
|
+
Payments: [{
|
|
10581
|
+
...(payments || {}),
|
|
10582
|
+
...application
|
|
10583
|
+
}]
|
|
10584
|
+
}, "ndc-receipt");
|
|
10585
|
+
}
|
|
10586
|
+
const fileStore = await Digit.PaymentService.printReciept(tenantId, {
|
|
10587
|
+
fileStoreIds: response.filestoreIds[0]
|
|
10588
|
+
});
|
|
10589
|
+
window.open(fileStore[(_response = response) === null || _response === void 0 ? void 0 : _response.filestoreIds[0]], "_blank");
|
|
10590
|
+
setLoader(false);
|
|
10591
|
+
} catch (error) {
|
|
10592
|
+
console.error(error);
|
|
10593
|
+
setLoader(false);
|
|
10594
|
+
}
|
|
10595
|
+
}
|
|
10596
|
+
const dowloadOptions = [];
|
|
10597
|
+
if ((applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A2 = applicationDetails.Applications) === null || _applicationDetails$A2 === void 0 ? void 0 : (_applicationDetails$A3 = _applicationDetails$A2[0]) === null || _applicationDetails$A3 === void 0 ? void 0 : _applicationDetails$A3.applicationStatus) === "APPROVED" || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A4 = applicationDetails.Applications) === null || _applicationDetails$A4 === void 0 ? void 0 : (_applicationDetails$A5 = _applicationDetails$A4[0]) === null || _applicationDetails$A5 === void 0 ? void 0 : _applicationDetails$A5.applicationStatus) === "REJECTED") {
|
|
10598
|
+
dowloadOptions.push({
|
|
10599
|
+
label: t("DOWNLOAD_CERTIFICATE"),
|
|
10600
|
+
onClick: () => handleDownloadPdf()
|
|
10601
|
+
});
|
|
10602
|
+
}
|
|
10603
|
+
if (reciept_data && (reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments.length) > 0 && !recieptDataLoading) {
|
|
10604
|
+
dowloadOptions.push({
|
|
10605
|
+
label: t("PTR_FEE_RECIEPT"),
|
|
10606
|
+
onClick: () => {
|
|
10607
|
+
var _reciept_data$Payment;
|
|
10608
|
+
return getRecieptSearch({
|
|
10609
|
+
tenantId: reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment = reciept_data.Payments[0]) === null || _reciept_data$Payment === void 0 ? void 0 : _reciept_data$Payment.tenantId,
|
|
10610
|
+
payments: reciept_data === null || reciept_data === void 0 ? void 0 : reciept_data.Payments[0]
|
|
10611
|
+
});
|
|
10612
|
+
}
|
|
10613
|
+
});
|
|
10614
|
+
}
|
|
10481
10615
|
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);
|
|
10482
10616
|
const removeDuplicatesByUUID = arr => {
|
|
10483
10617
|
const seen = new Set();
|
|
@@ -10491,8 +10625,8 @@ const CitizenApplicationOverview = () => {
|
|
|
10491
10625
|
});
|
|
10492
10626
|
};
|
|
10493
10627
|
useEffect(() => {
|
|
10494
|
-
var _applicationDetails$
|
|
10495
|
-
const ndcObject = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
10628
|
+
var _applicationDetails$A6;
|
|
10629
|
+
const ndcObject = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A6 = applicationDetails.Applications) === null || _applicationDetails$A6 === void 0 ? void 0 : _applicationDetails$A6[0];
|
|
10496
10630
|
console.log("ndcObject", ndcObject);
|
|
10497
10631
|
if (ndcObject) {
|
|
10498
10632
|
var _ndcObject$owners, _ndcObject$owners2, _removeDuplicatesByUU;
|
|
@@ -10597,14 +10731,14 @@ const CitizenApplicationOverview = () => {
|
|
|
10597
10731
|
address = propertyDetailsFetch.Properties[0].address;
|
|
10598
10732
|
formattedAddress = [(_address = address) === null || _address === void 0 ? void 0 : _address.doorNo, (_address2 = address) === null || _address2 === void 0 ? void 0 : _address2.buildingName, (_address3 = address) === null || _address3 === void 0 ? void 0 : _address3.street, (_address4 = address) === null || _address4 === void 0 ? void 0 : (_address4$locality = _address4.locality) === null || _address4$locality === void 0 ? void 0 : _address4$locality.name, (_address5 = address) === null || _address5 === void 0 ? void 0 : _address5.city].filter(Boolean).join(", ");
|
|
10599
10733
|
}
|
|
10600
|
-
if (isLoading || isDetailsLoading) {
|
|
10734
|
+
if (isLoading || isDetailsLoading || recieptDataLoading) {
|
|
10601
10735
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
10602
10736
|
}
|
|
10603
10737
|
console.log("propertyDetailsFetch", propertyDetailsFetch);
|
|
10604
10738
|
console.log("displayData?.applicantData", displayData);
|
|
10605
10739
|
const ownerForName = (propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch4 = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch4 === void 0 ? void 0 : (_propertyDetailsFetch5 = _propertyDetailsFetch4[0]) === null || _propertyDetailsFetch5 === void 0 ? void 0 : _propertyDetailsFetch5.owners) || [];
|
|
10606
10740
|
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(", ");
|
|
10607
|
-
console.log("applicationDetails?.[0]", applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
10741
|
+
console.log("applicationDetails?.[0]", applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A8 = applicationDetails.Applications) === null || _applicationDetails$A8 === void 0 ? void 0 : _applicationDetails$A8[0]);
|
|
10608
10742
|
return /*#__PURE__*/React.createElement("div", {
|
|
10609
10743
|
className: "employee-main-application-details"
|
|
10610
10744
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -10616,15 +10750,18 @@ const CitizenApplicationOverview = () => {
|
|
|
10616
10750
|
alignItems: "center",
|
|
10617
10751
|
padding: "16px"
|
|
10618
10752
|
}
|
|
10619
|
-
},
|
|
10620
|
-
className: "
|
|
10621
|
-
|
|
10622
|
-
|
|
10623
|
-
|
|
10753
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
10754
|
+
className: "cardHeaderWithOptions ral-app-details-header"
|
|
10755
|
+
}, getLoader && /*#__PURE__*/React.createElement(Loader, null), dowloadOptions && dowloadOptions.length > 0 && /*#__PURE__*/React.createElement(MultiLink, {
|
|
10756
|
+
className: "multilinkWrapper",
|
|
10757
|
+
onHeadClick: () => setShowOptions(!showOptions),
|
|
10758
|
+
displayOptions: showOptions,
|
|
10759
|
+
options: dowloadOptions
|
|
10760
|
+
}))), ((applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A9 = applicationDetails.Applications) === null || _applicationDetails$A9 === void 0 ? void 0 : (_applicationDetails$A0 = _applicationDetails$A9[0]) === null || _applicationDetails$A0 === void 0 ? void 0 : _applicationDetails$A0.applicationStatus) == "INITIATED" || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A1 = applicationDetails.Applications) === null || _applicationDetails$A1 === void 0 ? void 0 : (_applicationDetails$A10 = _applicationDetails$A1[0]) === null || _applicationDetails$A10 === void 0 ? void 0 : _applicationDetails$A10.applicationStatus) == "CITIZENACTIONREQUIRED") && /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar$1, {
|
|
10624
10761
|
label: t("COMMON_EDIT"),
|
|
10625
10762
|
onSubmit: () => {
|
|
10626
|
-
var _applicationDetails$
|
|
10627
|
-
const id = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
10763
|
+
var _applicationDetails$A11, _applicationDetails$A12;
|
|
10764
|
+
const id = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A11 = applicationDetails.Applications) === null || _applicationDetails$A11 === void 0 ? void 0 : (_applicationDetails$A12 = _applicationDetails$A11[0]) === null || _applicationDetails$A12 === void 0 ? void 0 : _applicationDetails$A12.applicationNo;
|
|
10628
10765
|
history.push(`/digit-ui/citizen/ndc/new-application/${id}`);
|
|
10629
10766
|
}
|
|
10630
10767
|
}))), /*#__PURE__*/React.createElement(Card, {
|
|
@@ -10643,7 +10780,7 @@ const CitizenApplicationOverview = () => {
|
|
|
10643
10780
|
}, /*#__PURE__*/React.createElement(CardSubHeader, {
|
|
10644
10781
|
className: "ndc_label"
|
|
10645
10782
|
}, t("NDC_APPLICATION_NDC_DETAILS_OVERVIEW")), displayData === null || displayData === void 0 ? void 0 : (_displayData$NdcDetai2 = displayData.NdcDetails) === null || _displayData$NdcDetai2 === void 0 ? void 0 : _displayData$NdcDetai2.map((detail, index) => {
|
|
10646
|
-
var _detail$dueAmount, _applicationDetails$
|
|
10783
|
+
var _detail$dueAmount, _applicationDetails$A13, _applicationDetails$A14, _applicationDetails$A15, _applicationDetails$A16, _applicationDetails$A17, _applicationDetails$A18, _applicationDetails$A19, _applicationDetails$A20, _applicationDetails$A21, _propertyDetailsFetch6, _propertyDetailsFetch7, _propertyDetailsFetch8, _propertyDetailsFetch9, _propertyDetailsFetch0, _propertyDetailsFetch1, _propertyDetailsFetch10, _propertyDetailsFetch11, _propertyDetailsFetch12, _propertyDetailsFetch13, _propertyDetailsFetch14, _propertyDetailsFetch15, _propertyDetailsFetch16, _propertyDetailsFetch17, _propertyDetailsFetch18, _propertyDetailsFetch19, _propertyDetailsFetch20, _propertyDetailsFetch21, _propertyDetailsFetch22, _propertyDetailsFetch23, _applicationDetails$A22, _applicationDetails$A23, _applicationDetails$A24, _applicationDetails$A25, _applicationDetails$A26;
|
|
10647
10784
|
console.log("detail", detail);
|
|
10648
10785
|
const isRed = detail.dueAmount > 0;
|
|
10649
10786
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -10673,7 +10810,7 @@ const CitizenApplicationOverview = () => {
|
|
|
10673
10810
|
text: t(detail.propertyType) || detail.propertyType
|
|
10674
10811
|
}), (detail === null || detail === void 0 ? void 0 : detail.businessService) == "NDC_PROPERTY_TAX" && (propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : propertyDetailsFetch.Properties) && /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(Row, {
|
|
10675
10812
|
label: t("CHB_DISCOUNT_REASON"),
|
|
10676
|
-
text: t(`${(applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
10813
|
+
text: t(`${(applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A13 = applicationDetails.Applications) === null || _applicationDetails$A13 === void 0 ? void 0 : (_applicationDetails$A14 = _applicationDetails$A13[0]) === null || _applicationDetails$A14 === void 0 ? void 0 : _applicationDetails$A14.reason) === "OTHERS" ? applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A15 = applicationDetails.Applications) === null || _applicationDetails$A15 === void 0 ? void 0 : (_applicationDetails$A16 = _applicationDetails$A15[0]) === null || _applicationDetails$A16 === void 0 ? void 0 : (_applicationDetails$A17 = _applicationDetails$A16.NdcDetails) === null || _applicationDetails$A17 === void 0 ? void 0 : (_applicationDetails$A18 = _applicationDetails$A17.find(item => (item === null || item === void 0 ? void 0 : item.businessService) === "PT")) === null || _applicationDetails$A18 === void 0 ? void 0 : (_applicationDetails$A19 = _applicationDetails$A18.additionalDetails) === null || _applicationDetails$A19 === void 0 ? void 0 : _applicationDetails$A19.reason : applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A20 = applicationDetails.Applications) === null || _applicationDetails$A20 === void 0 ? void 0 : (_applicationDetails$A21 = _applicationDetails$A20[0]) === null || _applicationDetails$A21 === void 0 ? void 0 : _applicationDetails$A21.reason}`)
|
|
10677
10814
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
10678
10815
|
label: t("City"),
|
|
10679
10816
|
text: (propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch6 = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch6 === void 0 ? void 0 : (_propertyDetailsFetch7 = _propertyDetailsFetch6[0]) === null || _propertyDetailsFetch7 === void 0 ? void 0 : (_propertyDetailsFetch8 = _propertyDetailsFetch7.address) === null || _propertyDetailsFetch8 === void 0 ? void 0 : _propertyDetailsFetch8.city) || "N/A"
|
|
@@ -10697,7 +10834,7 @@ const CitizenApplicationOverview = () => {
|
|
|
10697
10834
|
text: propertyDetailsFetch === null || propertyDetailsFetch === void 0 ? void 0 : (_propertyDetailsFetch21 = propertyDetailsFetch.Properties) === null || _propertyDetailsFetch21 === void 0 ? void 0 : (_propertyDetailsFetch22 = _propertyDetailsFetch21[0]) === null || _propertyDetailsFetch22 === void 0 ? void 0 : (_propertyDetailsFetch23 = _propertyDetailsFetch22.additionalDetails) === null || _propertyDetailsFetch23 === void 0 ? void 0 : _propertyDetailsFetch23.yearConstruction
|
|
10698
10835
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
10699
10836
|
label: t("Remarks"),
|
|
10700
|
-
text: (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
10837
|
+
text: (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A22 = applicationDetails.Applications) === null || _applicationDetails$A22 === void 0 ? void 0 : (_applicationDetails$A23 = _applicationDetails$A22[0]) === null || _applicationDetails$A23 === void 0 ? void 0 : (_applicationDetails$A24 = _applicationDetails$A23.NdcDetails) === null || _applicationDetails$A24 === void 0 ? void 0 : (_applicationDetails$A25 = _applicationDetails$A24.find(item => (item === null || item === void 0 ? void 0 : item.businessService) === "PT")) === null || _applicationDetails$A25 === void 0 ? void 0 : (_applicationDetails$A26 = _applicationDetails$A25.additionalDetails) === null || _applicationDetails$A26 === void 0 ? void 0 : _applicationDetails$A26.remarks) || "N/A"
|
|
10701
10838
|
}))));
|
|
10702
10839
|
})), /*#__PURE__*/React.createElement(Card, {
|
|
10703
10840
|
className: "ndc_card_main"
|
|
@@ -10808,7 +10945,7 @@ function _extends() {
|
|
|
10808
10945
|
}, _extends.apply(null, arguments);
|
|
10809
10946
|
}
|
|
10810
10947
|
|
|
10811
|
-
const
|
|
10948
|
+
const SearchFormFieldsComponents = ({
|
|
10812
10949
|
registerRef,
|
|
10813
10950
|
searchFormState,
|
|
10814
10951
|
searchFieldComponents
|
|
@@ -10817,6 +10954,7 @@ const NewSearchFormFieldsComponent = ({
|
|
|
10817
10954
|
t
|
|
10818
10955
|
} = useTranslation();
|
|
10819
10956
|
const isMobile = window.Digit.Utils.browser.isMobile();
|
|
10957
|
+
console.log("searchFieldComponents", searchFieldComponents);
|
|
10820
10958
|
if (!isMobile) {
|
|
10821
10959
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
10822
10960
|
className: "search-container ndc-search-container-custom"
|
|
@@ -10834,7 +10972,7 @@ const NewSearchFormFieldsComponent = ({
|
|
|
10834
10972
|
className: "search-action-wrapper ndc-search-action-wrapper"
|
|
10835
10973
|
}, searchFieldComponents)))));
|
|
10836
10974
|
}
|
|
10837
|
-
return /*#__PURE__*/React.createElement(
|
|
10975
|
+
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, {
|
|
10838
10976
|
name: "applicationNo",
|
|
10839
10977
|
inputRef: registerRef({})
|
|
10840
10978
|
})), /*#__PURE__*/React.createElement(SearchField, null, /*#__PURE__*/React.createElement("label", null, t("CORE_COMMON_PHONE_NUMBER")), /*#__PURE__*/React.createElement(TextInput, {
|
|
@@ -10843,7 +10981,7 @@ const NewSearchFormFieldsComponent = ({
|
|
|
10843
10981
|
})));
|
|
10844
10982
|
};
|
|
10845
10983
|
|
|
10846
|
-
const
|
|
10984
|
+
const FilterFormFieldsComponent = ({
|
|
10847
10985
|
statuses,
|
|
10848
10986
|
controlFilterForm,
|
|
10849
10987
|
applicationTypesOfBPA,
|
|
@@ -10852,7 +10990,15 @@ const NewFilterFormFieldsComponent = ({
|
|
|
10852
10990
|
const {
|
|
10853
10991
|
t
|
|
10854
10992
|
} = useTranslation();
|
|
10855
|
-
const
|
|
10993
|
+
const tenantId = Digit.ULBService.getStateId();
|
|
10994
|
+
const [tlfilters, setTLFilters] = useState({
|
|
10995
|
+
applicationStatus: []
|
|
10996
|
+
});
|
|
10997
|
+
useEffect(() => {
|
|
10998
|
+
if (tlfilters) {
|
|
10999
|
+
handleFilter(tlfilters);
|
|
11000
|
+
}
|
|
11001
|
+
}, [tlfilters]);
|
|
10856
11002
|
const availableOptions = [{
|
|
10857
11003
|
code: "ASSIGNED_TO_ME",
|
|
10858
11004
|
name: `${t("ES_INBOX_ASSIGNED_TO_ME")}`
|
|
@@ -10864,128 +11010,43 @@ const NewFilterFormFieldsComponent = ({
|
|
|
10864
11010
|
type.name = t(`WF_BPA_${type.code}`);
|
|
10865
11011
|
type.i18nKey = t(`WF_BPA_${type.code}`);
|
|
10866
11012
|
});
|
|
10867
|
-
|
|
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({
|
|
11013
|
+
return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(FilterFormField, null, /*#__PURE__*/React.createElement(Controller, {
|
|
10881
11014
|
name: "assignee",
|
|
10882
|
-
control: controlFilterForm
|
|
10883
|
-
|
|
10884
|
-
|
|
10885
|
-
|
|
10886
|
-
|
|
11015
|
+
control: controlFilterForm,
|
|
11016
|
+
render: props => /*#__PURE__*/React.createElement(RadioButtons, {
|
|
11017
|
+
onSelect: e => {
|
|
11018
|
+
props.onChange(e.code);
|
|
11019
|
+
},
|
|
11020
|
+
selectedOption: availableOptions.filter(option => option.code === props.value)[0],
|
|
11021
|
+
optionsKey: "name",
|
|
11022
|
+
options: availableOptions
|
|
11023
|
+
})
|
|
11024
|
+
})), /*#__PURE__*/React.createElement(FilterFormField, null, /*#__PURE__*/React.createElement(Controller, {
|
|
10887
11025
|
name: "applicationStatus",
|
|
10888
11026
|
control: controlFilterForm,
|
|
10889
|
-
defaultValue: []
|
|
10890
|
-
|
|
10891
|
-
|
|
10892
|
-
|
|
10893
|
-
|
|
10894
|
-
|
|
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
|
-
}
|
|
11027
|
+
defaultValue: [],
|
|
11028
|
+
render: props => {
|
|
11029
|
+
const toggleStatus = statusCode => {
|
|
11030
|
+
console.log(statusCode, "statusCode");
|
|
11031
|
+
if (props.value.includes(statusCode)) {
|
|
11032
|
+
props.onChange(props.value.filter(code => code !== statusCode));
|
|
10954
11033
|
} else {
|
|
10955
|
-
|
|
10956
|
-
}
|
|
10957
|
-
}
|
|
10958
|
-
|
|
10959
|
-
|
|
10960
|
-
|
|
10961
|
-
|
|
10962
|
-
|
|
10963
|
-
|
|
10964
|
-
|
|
10965
|
-
|
|
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
|
|
11034
|
+
props.onChange([...props.value, statusCode]);
|
|
11035
|
+
}
|
|
11036
|
+
};
|
|
11037
|
+
return /*#__PURE__*/React.createElement(Fragment$1, null, statuses === null || statuses === void 0 ? void 0 : statuses.map((status, index) => /*#__PURE__*/React.createElement(CheckBox, {
|
|
11038
|
+
key: status.applicationstatus,
|
|
11039
|
+
label: `${t(status.applicationstatus)} - ${status.count}`,
|
|
11040
|
+
value: status.applicationstatus,
|
|
11041
|
+
checked: props.value.includes(status.applicationstatus),
|
|
11042
|
+
onChange: () => toggleStatus(status.applicationstatus),
|
|
11043
|
+
index: index
|
|
11044
|
+
})));
|
|
10976
11045
|
}
|
|
10977
|
-
}
|
|
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)));
|
|
11046
|
+
})));
|
|
10986
11047
|
};
|
|
10987
11048
|
|
|
10988
|
-
const
|
|
11049
|
+
const useInboxTableConfig = ({
|
|
10989
11050
|
parentRoute,
|
|
10990
11051
|
onPageSizeChange,
|
|
10991
11052
|
formState,
|
|
@@ -10998,87 +11059,33 @@ const useNewInboxTableConfig = ({
|
|
|
10998
11059
|
const {
|
|
10999
11060
|
t
|
|
11000
11061
|
} = useTranslation();
|
|
11001
|
-
const
|
|
11002
|
-
|
|
11003
|
-
|
|
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
|
-
};
|
|
11062
|
+
const GetCell = value => /*#__PURE__*/React.createElement("span", {
|
|
11063
|
+
className: "cell-text styled-cell"
|
|
11064
|
+
}, value);
|
|
11054
11065
|
const tableColumnConfig = useMemo(() => {
|
|
11055
11066
|
return [{
|
|
11056
11067
|
Header: t("NOC_HOME_SEARCH_RESULTS_APP_NO_LABEL"),
|
|
11057
|
-
accessor: "
|
|
11068
|
+
accessor: "uuid",
|
|
11058
11069
|
disableSortBy: true,
|
|
11059
|
-
className: "ndc-new-table-app",
|
|
11060
11070
|
Cell: ({
|
|
11061
11071
|
row
|
|
11062
11072
|
}) => {
|
|
11063
|
-
var _row$original, _row$original2
|
|
11064
|
-
|
|
11065
|
-
|
|
11066
|
-
|
|
11067
|
-
|
|
11068
|
-
className: "
|
|
11069
|
-
}, (
|
|
11070
|
-
className: "ndc-new-cell-secondary"
|
|
11071
|
-
}, (_row$original5 = row.original) === null || _row$original5 === void 0 ? void 0 : _row$original5.locality) : null);
|
|
11073
|
+
var _row$original, _row$original2;
|
|
11074
|
+
console.log("row", row);
|
|
11075
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Link, {
|
|
11076
|
+
to: `${parentRoute}/inbox/application-overview/${(_row$original = row.original) === null || _row$original === void 0 ? void 0 : _row$original.applicationId}`
|
|
11077
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
11078
|
+
className: "link"
|
|
11079
|
+
}, (_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : _row$original2.applicationId)));
|
|
11072
11080
|
}
|
|
11073
11081
|
}, {
|
|
11074
11082
|
Header: t("TL_COMMON_TABLE_COL_APP_DATE"),
|
|
11075
|
-
accessor: "
|
|
11083
|
+
accessor: "createdtime",
|
|
11076
11084
|
Cell: ({
|
|
11077
11085
|
row
|
|
11078
11086
|
}) => {
|
|
11079
|
-
var _row$
|
|
11080
|
-
|
|
11081
|
-
return dateValue ? format(new Date(dateValue), "dd/MM/yyyy") : "-";
|
|
11087
|
+
var _row$original3, _row$original4;
|
|
11088
|
+
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")) : "";
|
|
11082
11089
|
}
|
|
11083
11090
|
}, {
|
|
11084
11091
|
Header: t("PT_COMMON_TABLE_COL_STATUS_LABEL"),
|
|
@@ -11086,56 +11093,18 @@ const useNewInboxTableConfig = ({
|
|
|
11086
11093
|
Cell: ({
|
|
11087
11094
|
row
|
|
11088
11095
|
}) => {
|
|
11089
|
-
var _row$
|
|
11090
|
-
|
|
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
|
-
}))));
|
|
11096
|
+
var _row$original5;
|
|
11097
|
+
return t((_row$original5 = row.original) === null || _row$original5 === void 0 ? void 0 : _row$original5.status);
|
|
11125
11098
|
}
|
|
11126
11099
|
}];
|
|
11127
|
-
}
|
|
11100
|
+
});
|
|
11128
11101
|
return {
|
|
11129
|
-
getCellProps:
|
|
11130
|
-
style: {
|
|
11131
|
-
padding: "16px 20px",
|
|
11132
|
-
fontSize: "14px"
|
|
11133
|
-
}
|
|
11134
|
-
}),
|
|
11135
|
-
getRowProps: row => {
|
|
11136
|
-
var _row$original1, _row$original10;
|
|
11102
|
+
getCellProps: cellInfo => {
|
|
11137
11103
|
return {
|
|
11138
|
-
|
|
11104
|
+
style: {
|
|
11105
|
+
padding: "20px 18px",
|
|
11106
|
+
fontSize: "16px"
|
|
11107
|
+
}
|
|
11139
11108
|
};
|
|
11140
11109
|
},
|
|
11141
11110
|
disableSort: false,
|
|
@@ -11190,7 +11159,7 @@ const useNewInboxTableConfig = ({
|
|
|
11190
11159
|
};
|
|
11191
11160
|
};
|
|
11192
11161
|
|
|
11193
|
-
const
|
|
11162
|
+
const useInboxMobileCardsData = ({
|
|
11194
11163
|
parentRoute,
|
|
11195
11164
|
table
|
|
11196
11165
|
}) => {
|
|
@@ -11240,37 +11209,33 @@ const useNewInboxMobileCardsData = ({
|
|
|
11240
11209
|
};
|
|
11241
11210
|
};
|
|
11242
11211
|
|
|
11243
|
-
const
|
|
11244
|
-
parentRoute
|
|
11245
|
-
tableColumns
|
|
11212
|
+
const Inbox = ({
|
|
11213
|
+
parentRoute
|
|
11246
11214
|
}) => {
|
|
11247
|
-
var _formState$filterForm3, _formState$filterForm4, _formState$filterForm5, _formState$tableForm5, _formState$tableForm6, _formState$tableForm7, _formState$tableForm8, _formState$tableForm9, _formState$tableForm0, _formState$tableForm1;
|
|
11248
11215
|
const {
|
|
11249
11216
|
t
|
|
11250
11217
|
} = useTranslation();
|
|
11251
11218
|
const tenantId = window.localStorage.getItem("Employee.tenant-id");
|
|
11252
|
-
const [
|
|
11253
|
-
const
|
|
11254
|
-
const
|
|
11255
|
-
const searchFormDefaultValues = useMemo(() => ({}), []);
|
|
11256
|
-
const filterFormDefaultValues = useMemo(() => ({
|
|
11219
|
+
const [getFilter, setFilter] = useState();
|
|
11220
|
+
const searchFormDefaultValues = {};
|
|
11221
|
+
const filterFormDefaultValues = {
|
|
11257
11222
|
moduleName: "ndc-services",
|
|
11258
11223
|
applicationStatus: [],
|
|
11259
11224
|
businessService: null,
|
|
11260
11225
|
locality: [],
|
|
11261
11226
|
assignee: "ASSIGNED_TO_ALL",
|
|
11262
|
-
businessServiceArray:
|
|
11263
|
-
}
|
|
11264
|
-
const tableOrderFormDefaultValues =
|
|
11227
|
+
businessServiceArray: businessServiceList(true) || []
|
|
11228
|
+
};
|
|
11229
|
+
const tableOrderFormDefaultValues = {
|
|
11265
11230
|
sortBy: "",
|
|
11266
11231
|
limit: window.Digit.Utils.browser.isMobile() ? 50 : 10,
|
|
11267
11232
|
offset: 0,
|
|
11268
11233
|
sortOrder: "DESC"
|
|
11269
|
-
}
|
|
11234
|
+
};
|
|
11270
11235
|
function formReducer(state, payload) {
|
|
11271
11236
|
switch (payload.action) {
|
|
11272
11237
|
case "mutateSearchForm":
|
|
11273
|
-
Digit.SessionStorage.set("NDC.
|
|
11238
|
+
Digit.SessionStorage.set("NDC.INBOX", {
|
|
11274
11239
|
...state,
|
|
11275
11240
|
searchForm: payload.data
|
|
11276
11241
|
});
|
|
@@ -11279,7 +11244,7 @@ const NewNDCInbox = ({
|
|
|
11279
11244
|
searchForm: payload.data
|
|
11280
11245
|
};
|
|
11281
11246
|
case "mutateFilterForm":
|
|
11282
|
-
Digit.SessionStorage.set("NDC.
|
|
11247
|
+
Digit.SessionStorage.set("NDC.INBOX", {
|
|
11283
11248
|
...state,
|
|
11284
11249
|
filterForm: payload.data
|
|
11285
11250
|
});
|
|
@@ -11288,7 +11253,7 @@ const NewNDCInbox = ({
|
|
|
11288
11253
|
filterForm: payload.data
|
|
11289
11254
|
};
|
|
11290
11255
|
case "mutateTableForm":
|
|
11291
|
-
Digit.SessionStorage.set("NDC.
|
|
11256
|
+
Digit.SessionStorage.set("NDC.INBOX", {
|
|
11292
11257
|
...state,
|
|
11293
11258
|
tableForm: payload.data
|
|
11294
11259
|
});
|
|
@@ -11298,7 +11263,7 @@ const NewNDCInbox = ({
|
|
|
11298
11263
|
};
|
|
11299
11264
|
}
|
|
11300
11265
|
}
|
|
11301
|
-
const InboxObjectInSessionStorage = Digit.SessionStorage.get("NDC.
|
|
11266
|
+
const InboxObjectInSessionStorage = Digit.SessionStorage.get("NDC.INBOX");
|
|
11302
11267
|
const onSearchFormReset = setSearchFormValue => {
|
|
11303
11268
|
setSearchFormValue("sourceRefId", null);
|
|
11304
11269
|
setSearchFormValue("applicationNo", null);
|
|
@@ -11309,8 +11274,8 @@ const NewNDCInbox = ({
|
|
|
11309
11274
|
});
|
|
11310
11275
|
};
|
|
11311
11276
|
const onFilterFormReset = setFilterFormValue => {
|
|
11312
|
-
setFilterFormValue("moduleName", "
|
|
11313
|
-
setFilterFormValue("applicationStatus",
|
|
11277
|
+
setFilterFormValue("moduleName", "bpa-services");
|
|
11278
|
+
setFilterFormValue("applicationStatus", "");
|
|
11314
11279
|
setFilterFormValue("locality", []);
|
|
11315
11280
|
setFilterFormValue("assignee", "ASSIGNED_TO_ALL");
|
|
11316
11281
|
setFilterFormValue("applicationType", []);
|
|
@@ -11343,26 +11308,6 @@ const NewNDCInbox = ({
|
|
|
11343
11308
|
}
|
|
11344
11309
|
});
|
|
11345
11310
|
};
|
|
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
|
-
};
|
|
11366
11311
|
const onSortingByData = e => {
|
|
11367
11312
|
if (e.length > 0) {
|
|
11368
11313
|
const [{
|
|
@@ -11399,54 +11344,17 @@ const NewNDCInbox = ({
|
|
|
11399
11344
|
data: localitiesForEmployeesCurrentTenant,
|
|
11400
11345
|
isLoading: loadingLocalitiesForEmployeesCurrentTenant
|
|
11401
11346
|
} = Digit.Hooks.useBoundaryLocalities(tenantId, "revenue", {}, t);
|
|
11402
|
-
const {
|
|
11403
|
-
|
|
11404
|
-
|
|
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]);
|
|
11347
|
+
const handleFilter = filterStatus => {
|
|
11348
|
+
setFilter(filterStatus);
|
|
11349
|
+
};
|
|
11441
11350
|
const {
|
|
11442
11351
|
isLoading: isInboxLoading,
|
|
11443
11352
|
data
|
|
11444
11353
|
} = Digit.Hooks.ndc.useInbox({
|
|
11445
11354
|
tenantId,
|
|
11446
11355
|
filters: {
|
|
11447
|
-
|
|
11448
|
-
|
|
11449
|
-
tableForm: (formState === null || formState === void 0 ? void 0 : formState.tableForm) || tableOrderFormDefaultValues
|
|
11356
|
+
...formState,
|
|
11357
|
+
getFilter
|
|
11450
11358
|
}
|
|
11451
11359
|
});
|
|
11452
11360
|
const [table, setTable] = useState([]);
|
|
@@ -11472,7 +11380,7 @@ const NewNDCInbox = ({
|
|
|
11472
11380
|
registerRef,
|
|
11473
11381
|
searchFormState,
|
|
11474
11382
|
searchFieldComponents
|
|
11475
|
-
}) => /*#__PURE__*/React.createElement(
|
|
11383
|
+
}) => /*#__PURE__*/React.createElement(SearchFormFieldsComponents, {
|
|
11476
11384
|
registerRef,
|
|
11477
11385
|
searchFormState,
|
|
11478
11386
|
searchFieldComponents
|
|
@@ -11482,7 +11390,7 @@ const NewNDCInbox = ({
|
|
|
11482
11390
|
controlFilterForm,
|
|
11483
11391
|
setFilterFormValue,
|
|
11484
11392
|
getFilterFormValue
|
|
11485
|
-
}) => /*#__PURE__*/React.createElement(
|
|
11393
|
+
}) => /*#__PURE__*/React.createElement(FilterFormFieldsComponent, Object.assign({}, {
|
|
11486
11394
|
statuses,
|
|
11487
11395
|
isInboxLoading,
|
|
11488
11396
|
registerRef,
|
|
@@ -11535,7 +11443,7 @@ const NewNDCInbox = ({
|
|
|
11535
11443
|
resetFilterFormDefaultValues: filterFormDefaultValues,
|
|
11536
11444
|
onFilterFormReset
|
|
11537
11445
|
};
|
|
11538
|
-
const propsForInboxTable =
|
|
11446
|
+
const propsForInboxTable = useInboxTableConfig({
|
|
11539
11447
|
...{
|
|
11540
11448
|
parentRoute,
|
|
11541
11449
|
onPageSizeChange,
|
|
@@ -11546,7 +11454,7 @@ const NewNDCInbox = ({
|
|
|
11546
11454
|
onSortingByData
|
|
11547
11455
|
}
|
|
11548
11456
|
});
|
|
11549
|
-
const propsForInboxMobileCards =
|
|
11457
|
+
const propsForInboxMobileCards = useInboxMobileCardsData({
|
|
11550
11458
|
parentRoute,
|
|
11551
11459
|
table
|
|
11552
11460
|
});
|
|
@@ -11555,689 +11463,18 @@ const NewNDCInbox = ({
|
|
|
11555
11463
|
sortFormDefaultValues: formState === null || formState === void 0 ? void 0 : formState.tableForm,
|
|
11556
11464
|
onSortFormReset
|
|
11557
11465
|
};
|
|
11558
|
-
|
|
11559
|
-
|
|
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"
|
|
11466
|
+
return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(Header, null, t("ES_COMMON_INBOX"), totalCount ? /*#__PURE__*/React.createElement("p", {
|
|
11467
|
+
className: "inbox-count"
|
|
12136
11468
|
}, totalCount) : null), /*#__PURE__*/React.createElement("div", {
|
|
12137
|
-
className: "
|
|
12138
|
-
}, /*#__PURE__*/React.createElement(
|
|
12139
|
-
|
|
12140
|
-
|
|
12141
|
-
|
|
12142
|
-
|
|
12143
|
-
|
|
12144
|
-
|
|
12145
|
-
}
|
|
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
|
-
});
|
|
11469
|
+
className: "NDCSection"
|
|
11470
|
+
}, /*#__PURE__*/React.createElement(InboxComposer, _extends({
|
|
11471
|
+
isInboxLoading,
|
|
11472
|
+
PropsForInboxLinks
|
|
11473
|
+
}, propsForSearchForm, propsForFilterForm, propsForMobileSortForm, {
|
|
11474
|
+
propsForInboxTable,
|
|
11475
|
+
propsForInboxMobileCards,
|
|
11476
|
+
formState
|
|
11477
|
+
}))));
|
|
12241
11478
|
};
|
|
12242
11479
|
|
|
12243
11480
|
const SearchFormFieldsComponent = props => {
|
|
@@ -13917,15 +13154,15 @@ const PropertyDetailsForm$1 = ({
|
|
|
13917
13154
|
}));
|
|
13918
13155
|
}
|
|
13919
13156
|
try {
|
|
13920
|
-
var _result$Bill;
|
|
13157
|
+
var _result$Bill$, _result$Bill;
|
|
13921
13158
|
const result = await Digit.PaymentService.fetchBill(tenantId, {
|
|
13922
13159
|
businessService: bussinessService,
|
|
13923
13160
|
consumerCode: consumercodes
|
|
13924
13161
|
});
|
|
13925
13162
|
setPropertyLoader(false);
|
|
13163
|
+
const amount = (result === null || result === void 0 ? void 0 : (_result$Bill$ = result.Bill[0]) === null || _result$Bill$ === void 0 ? void 0 : _result$Bill$.totalAmount) ?? 0;
|
|
13926
13164
|
if ((result === null || result === void 0 ? void 0 : (_result$Bill = result.Bill) === null || _result$Bill === void 0 ? void 0 : _result$Bill.length) > 0) {
|
|
13927
|
-
|
|
13928
|
-
if ((result === null || result === void 0 ? void 0 : (_result$Bill$ = result.Bill[0]) === null || _result$Bill$ === void 0 ? void 0 : _result$Bill$.totalAmount) > 0) {
|
|
13165
|
+
if (amount > 0) {
|
|
13929
13166
|
setShowToast({
|
|
13930
13167
|
error: true,
|
|
13931
13168
|
label: t("NDC_MESSAGE_DUES_FOUND_PLEASE_PAY")
|
|
@@ -15534,7 +14771,7 @@ const PayWSBillModal = ({
|
|
|
15534
14771
|
d: "M0 0h24v24H0V0z",
|
|
15535
14772
|
fill: "none"
|
|
15536
14773
|
}), /*#__PURE__*/React.createElement("path", {
|
|
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
|
|
14774
|
+
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"
|
|
15538
14775
|
}));
|
|
15539
14776
|
const CloseBtn = ({
|
|
15540
14777
|
onClick
|