@egovernments/digit-ui-libraries 1.4.0 → 1.5.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2477 -530
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +2478 -531
- package/dist/index.modern.js.map +1 -1
- package/package.json +20 -19
package/dist/index.js
CHANGED
|
@@ -9,9 +9,11 @@ var reactI18next = require('react-i18next');
|
|
|
9
9
|
var ReactPostprocessor = _interopDefault(require('i18next-react-postprocessor'));
|
|
10
10
|
var dateFns = require('date-fns');
|
|
11
11
|
var html2canvas = _interopDefault(require('html2canvas'));
|
|
12
|
-
|
|
12
|
+
require('jspdf');
|
|
13
13
|
var XLSX = _interopDefault(require('xlsx'));
|
|
14
|
+
var domtoimage = _interopDefault(require('dom-to-image'));
|
|
14
15
|
require('date-fns/esm');
|
|
16
|
+
var reactRouterDom = require('react-router-dom');
|
|
15
17
|
|
|
16
18
|
function _extends() {
|
|
17
19
|
_extends = Object.assign || function (target) {
|
|
@@ -220,7 +222,6 @@ var actionHandler = function actionHandler(action, id, fieldList) {
|
|
|
220
222
|
var index = getIndex(id, fieldList);
|
|
221
223
|
|
|
222
224
|
if (!action) {
|
|
223
|
-
console.error("no action found");
|
|
224
225
|
return;
|
|
225
226
|
}
|
|
226
227
|
|
|
@@ -310,6 +311,7 @@ var Urls = {
|
|
|
310
311
|
Authenticate: "/user/oauth/token",
|
|
311
312
|
RegisterUser: "/user/citizen/_create",
|
|
312
313
|
ChangePassword: "/user/password/nologin/_update",
|
|
314
|
+
ChangePassword1: "/user/password/_update",
|
|
313
315
|
UserProfileUpdate: "/user/profile/_update",
|
|
314
316
|
EmployeeSearch: "/egov-hrms/employees/_search",
|
|
315
317
|
InboxSearch: "/inbox/v1/_search",
|
|
@@ -347,7 +349,9 @@ var Urls = {
|
|
|
347
349
|
update: "/property-services/property/_update",
|
|
348
350
|
pt_calculation_estimate: "/pt-calculator-v2/propertytax/v2/_estimate",
|
|
349
351
|
assessment_create: "/property-services/assessment/_create",
|
|
350
|
-
assessment_search: "/property-services/assessment/_search"
|
|
352
|
+
assessment_search: "/property-services/assessment/_search",
|
|
353
|
+
payment_search: "/collection-services/payments/PT/_search",
|
|
354
|
+
pt_calculate_mutation: "/pt-calculator-v2/propertytax/mutation/_calculate"
|
|
351
355
|
},
|
|
352
356
|
dss: {
|
|
353
357
|
dashboardConfig: "/dashboard-analytics/dashboard/getDashboardConfig",
|
|
@@ -362,6 +366,7 @@ var Urls = {
|
|
|
362
366
|
update: "/echallan-services/eChallan/v1/_update",
|
|
363
367
|
download_pdf: "/egov-pdf/download/UC/mcollect-challan",
|
|
364
368
|
receipt_download: "/egov-pdf/download/PAYMENT/consolidatedreceipt",
|
|
369
|
+
bill_download: "/egov-pdf/download/bills/consolidatedbill",
|
|
365
370
|
count: "/echallan-services/eChallan/v1/_count"
|
|
366
371
|
},
|
|
367
372
|
hrms: {
|
|
@@ -405,9 +410,14 @@ var Urls = {
|
|
|
405
410
|
search: "/egov-user-event/v1/events/_search",
|
|
406
411
|
update: "/egov-user-event/v1/events/lat/_update",
|
|
407
412
|
updateEvent: "/egov-user-event/v1/events/_update",
|
|
413
|
+
updateEventCDG: "/egov-user-event/v1/events/lat/_update",
|
|
408
414
|
count: "/egov-user-event/v1/events/notifications/_count",
|
|
409
415
|
create: "/egov-user-event/v1/events/_create"
|
|
410
416
|
},
|
|
417
|
+
ws: {
|
|
418
|
+
water_search: "/ws-services/wc/_search",
|
|
419
|
+
sewarage_search: "/sw-services/swc/_search"
|
|
420
|
+
},
|
|
411
421
|
engagement: {
|
|
412
422
|
document: {
|
|
413
423
|
search: "/egov-document-uploader/egov-du/document/_search",
|
|
@@ -524,20 +534,26 @@ Axios.interceptors.response.use(function (res) {
|
|
|
524
534
|
});
|
|
525
535
|
|
|
526
536
|
var requestInfo = function requestInfo() {
|
|
537
|
+
var _Digit$UserService$ge;
|
|
538
|
+
|
|
527
539
|
return {
|
|
528
|
-
authToken: Digit.UserService.getUser().access_token
|
|
540
|
+
authToken: ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.access_token) || null
|
|
529
541
|
};
|
|
530
542
|
};
|
|
531
543
|
|
|
532
544
|
var authHeaders = function authHeaders() {
|
|
545
|
+
var _Digit$UserService$ge2;
|
|
546
|
+
|
|
533
547
|
return {
|
|
534
|
-
"auth-token": Digit.UserService.getUser().access_token
|
|
548
|
+
"auth-token": ((_Digit$UserService$ge2 = Digit.UserService.getUser()) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.access_token) || null
|
|
535
549
|
};
|
|
536
550
|
};
|
|
537
551
|
|
|
538
552
|
var userServiceData = function userServiceData() {
|
|
553
|
+
var _Digit$UserService$ge3;
|
|
554
|
+
|
|
539
555
|
return {
|
|
540
|
-
userInfo: Digit.UserService.getUser().info
|
|
556
|
+
userInfo: (_Digit$UserService$ge3 = Digit.UserService.getUser()) === null || _Digit$UserService$ge3 === void 0 ? void 0 : _Digit$UserService$ge3.info
|
|
541
557
|
};
|
|
542
558
|
};
|
|
543
559
|
|
|
@@ -624,10 +640,6 @@ var Request = function Request(_ref) {
|
|
|
624
640
|
apiId: "Rainmaker"
|
|
625
641
|
};
|
|
626
642
|
|
|
627
|
-
if (noRequestInfo) {
|
|
628
|
-
delete data.RequestInfo;
|
|
629
|
-
}
|
|
630
|
-
|
|
631
643
|
if (auth) {
|
|
632
644
|
data.RequestInfo = _extends({}, data.RequestInfo, requestInfo());
|
|
633
645
|
}
|
|
@@ -641,11 +653,15 @@ var Request = function Request(_ref) {
|
|
|
641
653
|
msgId: ts + "|" + Digit.StoreData.getCurrentLanguage()
|
|
642
654
|
});
|
|
643
655
|
}
|
|
656
|
+
|
|
657
|
+
if (noRequestInfo) {
|
|
658
|
+
delete data.RequestInfo;
|
|
659
|
+
}
|
|
644
660
|
}
|
|
645
661
|
|
|
646
662
|
var headers1 = {
|
|
647
663
|
"Content-Type": "application/json",
|
|
648
|
-
Accept: (_window2 = window) !== null && _window2 !== void 0 && (_window2$globalConfig = _window2.globalConfigs) !== null && _window2$globalConfig !== void 0 && _window2$globalConfig.getConfig("ENABLE_SINGLEINSTANCE") ? "
|
|
664
|
+
Accept: (_window2 = window) !== null && _window2 !== void 0 && (_window2$globalConfig = _window2.globalConfigs) !== null && _window2$globalConfig !== void 0 && _window2$globalConfig.getConfig("ENABLE_SINGLEINSTANCE") ? "application/pdf,application/json" : "application/pdf"
|
|
649
665
|
};
|
|
650
666
|
if (authHeader) headers = _extends({}, headers, authHeaders());
|
|
651
667
|
if (userDownload) headers = _extends({}, headers, headers1);
|
|
@@ -671,6 +687,8 @@ var Request = function Request(_ref) {
|
|
|
671
687
|
|
|
672
688
|
var _temp4 = function () {
|
|
673
689
|
if (multipartFormData) {
|
|
690
|
+
var _Digit$UserService$ge4;
|
|
691
|
+
|
|
674
692
|
return Promise.resolve(Axios({
|
|
675
693
|
method: method,
|
|
676
694
|
url: _url,
|
|
@@ -678,7 +696,7 @@ var Request = function Request(_ref) {
|
|
|
678
696
|
params: params,
|
|
679
697
|
headers: {
|
|
680
698
|
"Content-Type": "multipart/form-data",
|
|
681
|
-
"auth-token": Digit.UserService.getUser().access_token
|
|
699
|
+
"auth-token": ((_Digit$UserService$ge4 = Digit.UserService.getUser()) === null || _Digit$UserService$ge4 === void 0 ? void 0 : _Digit$UserService$ge4.access_token) || null
|
|
682
700
|
}
|
|
683
701
|
})).then(function (multipartFormDataRes) {
|
|
684
702
|
_exit2 = true;
|
|
@@ -1566,6 +1584,20 @@ var getRentalDetailsCategoryCriteria = function getRentalDetailsCategoryCriteria
|
|
|
1566
1584
|
};
|
|
1567
1585
|
};
|
|
1568
1586
|
|
|
1587
|
+
var getChargeSlabsCategoryCriteria = function getChargeSlabsCategoryCriteria(tenantId, moduleCode) {
|
|
1588
|
+
return {
|
|
1589
|
+
details: {
|
|
1590
|
+
tenantId: tenantId,
|
|
1591
|
+
moduleDetails: [{
|
|
1592
|
+
moduleName: moduleCode,
|
|
1593
|
+
masterDetails: [{
|
|
1594
|
+
name: "ChargeSlabs"
|
|
1595
|
+
}]
|
|
1596
|
+
}]
|
|
1597
|
+
}
|
|
1598
|
+
};
|
|
1599
|
+
};
|
|
1600
|
+
|
|
1569
1601
|
var getGenderTypeList = function getGenderTypeList(tenantId, moduleCode, type) {
|
|
1570
1602
|
return {
|
|
1571
1603
|
type: type,
|
|
@@ -1765,6 +1797,54 @@ var getTradeTypeRoleCriteria = function getTradeTypeRoleCriteria(tenantId, modul
|
|
|
1765
1797
|
};
|
|
1766
1798
|
};
|
|
1767
1799
|
|
|
1800
|
+
var getFSTPORejectionReasonCriteria = function getFSTPORejectionReasonCriteria(tenantId, moduleCode, type) {
|
|
1801
|
+
return {
|
|
1802
|
+
type: type,
|
|
1803
|
+
details: {
|
|
1804
|
+
tenantId: tenantId,
|
|
1805
|
+
moduleDetails: [{
|
|
1806
|
+
moduleName: moduleCode,
|
|
1807
|
+
masterDetails: [{
|
|
1808
|
+
name: "FSTPORejectionReason",
|
|
1809
|
+
filter: null
|
|
1810
|
+
}]
|
|
1811
|
+
}]
|
|
1812
|
+
}
|
|
1813
|
+
};
|
|
1814
|
+
};
|
|
1815
|
+
|
|
1816
|
+
var getFSMPaymentTypeCriteria = function getFSMPaymentTypeCriteria(tenantId, moduleCode, type) {
|
|
1817
|
+
return {
|
|
1818
|
+
type: type,
|
|
1819
|
+
details: {
|
|
1820
|
+
tenantId: tenantId,
|
|
1821
|
+
moduleDetails: [{
|
|
1822
|
+
moduleName: moduleCode,
|
|
1823
|
+
masterDetails: [{
|
|
1824
|
+
name: "PaymentType",
|
|
1825
|
+
filter: null
|
|
1826
|
+
}]
|
|
1827
|
+
}]
|
|
1828
|
+
}
|
|
1829
|
+
};
|
|
1830
|
+
};
|
|
1831
|
+
|
|
1832
|
+
var getFSMTripNumberCriteria = function getFSMTripNumberCriteria(tenantId, moduleCode, type) {
|
|
1833
|
+
return {
|
|
1834
|
+
type: type,
|
|
1835
|
+
details: {
|
|
1836
|
+
tenantId: tenantId,
|
|
1837
|
+
moduleDetails: [{
|
|
1838
|
+
moduleName: moduleCode,
|
|
1839
|
+
masterDetails: [{
|
|
1840
|
+
name: "TripNumber",
|
|
1841
|
+
filter: null
|
|
1842
|
+
}]
|
|
1843
|
+
}]
|
|
1844
|
+
}
|
|
1845
|
+
};
|
|
1846
|
+
};
|
|
1847
|
+
|
|
1768
1848
|
var GetEgovLocations = function GetEgovLocations(MdmsRes) {
|
|
1769
1849
|
return MdmsRes["egov-location"].TenantBoundary[0].boundary.children.map(function (obj) {
|
|
1770
1850
|
return {
|
|
@@ -2007,6 +2087,14 @@ var getRentalDetailsCategory = function getRentalDetailsCategory(MdmsRes) {
|
|
|
2007
2087
|
});
|
|
2008
2088
|
};
|
|
2009
2089
|
|
|
2090
|
+
var getChargeSlabsCategory = function getChargeSlabsCategory(MdmsRes) {
|
|
2091
|
+
MdmsRes["PropertyTax"].ChargeSlabs.filter(function (category) {
|
|
2092
|
+
return category.active;
|
|
2093
|
+
}).map(function (ChargeSlabsInfo) {
|
|
2094
|
+
return _extends({}, ChargeSlabsInfo);
|
|
2095
|
+
});
|
|
2096
|
+
};
|
|
2097
|
+
|
|
2010
2098
|
var getGenderType = function getGenderType(MdmsRes) {
|
|
2011
2099
|
return MdmsRes["common-masters"].GenderType.filter(function (GenderType) {
|
|
2012
2100
|
return GenderType.active;
|
|
@@ -2063,7 +2151,45 @@ var GetMCollectApplicationStatus = function GetMCollectApplicationStatus(MdmsRes
|
|
|
2063
2151
|
});
|
|
2064
2152
|
};
|
|
2065
2153
|
|
|
2066
|
-
var
|
|
2154
|
+
var getFSMGenderType = function getFSMGenderType(MdmsRes) {
|
|
2155
|
+
return MdmsRes["common-masters"].GenderType.map(function (genderDetails) {
|
|
2156
|
+
return _extends({}, genderDetails, {
|
|
2157
|
+
i18nKey: "COMMON_GENDER_" + genderDetails.code
|
|
2158
|
+
});
|
|
2159
|
+
});
|
|
2160
|
+
};
|
|
2161
|
+
|
|
2162
|
+
var GetFSTPORejectionReason = function GetFSTPORejectionReason(MdmsRes) {
|
|
2163
|
+
return MdmsRes["Vehicle"].FSTPORejectionReason.filter(function (reason) {
|
|
2164
|
+
return reason.active;
|
|
2165
|
+
}).map(function (reasonDetails) {
|
|
2166
|
+
return _extends({}, reasonDetails, {
|
|
2167
|
+
i18nKey: "ES_ACTION_REASON_" + reasonDetails.code
|
|
2168
|
+
});
|
|
2169
|
+
});
|
|
2170
|
+
};
|
|
2171
|
+
|
|
2172
|
+
var GetPaymentType = function GetPaymentType(MdmsRes) {
|
|
2173
|
+
return MdmsRes["FSM"].PaymentType.filter(function (option) {
|
|
2174
|
+
return option.active;
|
|
2175
|
+
}).map(function (reasonDetails) {
|
|
2176
|
+
return _extends({}, reasonDetails, {
|
|
2177
|
+
i18nKey: "ES_ACTION_" + reasonDetails.code
|
|
2178
|
+
});
|
|
2179
|
+
});
|
|
2180
|
+
};
|
|
2181
|
+
|
|
2182
|
+
var GetTripNumber = function GetTripNumber(MdmsRes) {
|
|
2183
|
+
return MdmsRes["FSM"].TripNumber.filter(function (option) {
|
|
2184
|
+
return option.active;
|
|
2185
|
+
}).map(function (reasonDetails) {
|
|
2186
|
+
return _extends({}, reasonDetails, {
|
|
2187
|
+
i18nKey: "ES_ACTION_TRIP_" + reasonDetails.code
|
|
2188
|
+
});
|
|
2189
|
+
});
|
|
2190
|
+
};
|
|
2191
|
+
|
|
2192
|
+
var getDssDashboard = function getDssDashboard(MdmsRes) {
|
|
2067
2193
|
return MdmsRes["dss-dashboard"]["dashboard-config"];
|
|
2068
2194
|
};
|
|
2069
2195
|
|
|
@@ -2184,8 +2310,11 @@ var transformResponse = function transformResponse(type, MdmsRes, moduleCode, te
|
|
|
2184
2310
|
case "RentalDeatils":
|
|
2185
2311
|
return getRentalDetailsCategory(MdmsRes);
|
|
2186
2312
|
|
|
2313
|
+
case "ChargeSlabs":
|
|
2314
|
+
return getChargeSlabsCategory(MdmsRes);
|
|
2315
|
+
|
|
2187
2316
|
case "DssDashboard":
|
|
2188
|
-
return getDssDashboard();
|
|
2317
|
+
return getDssDashboard(MdmsRes);
|
|
2189
2318
|
|
|
2190
2319
|
case "BusinessService":
|
|
2191
2320
|
return GetMCollectBusinessService(MdmsRes);
|
|
@@ -2214,6 +2343,18 @@ var transformResponse = function transformResponse(type, MdmsRes, moduleCode, te
|
|
|
2214
2343
|
case "CheckList":
|
|
2215
2344
|
return GetChecklist(MdmsRes);
|
|
2216
2345
|
|
|
2346
|
+
case "FSMGenderType":
|
|
2347
|
+
return getFSMGenderType(MdmsRes);
|
|
2348
|
+
|
|
2349
|
+
case "FSTPORejectionReason":
|
|
2350
|
+
return GetFSTPORejectionReason(MdmsRes);
|
|
2351
|
+
|
|
2352
|
+
case "PaymentType":
|
|
2353
|
+
return GetPaymentType(MdmsRes);
|
|
2354
|
+
|
|
2355
|
+
case "TripNumber":
|
|
2356
|
+
return GetTripNumber(MdmsRes);
|
|
2357
|
+
|
|
2217
2358
|
default:
|
|
2218
2359
|
return MdmsRes;
|
|
2219
2360
|
}
|
|
@@ -2443,6 +2584,9 @@ var MdmsService = {
|
|
|
2443
2584
|
getRentalDetails: function getRentalDetails(tenantId, moduleCode) {
|
|
2444
2585
|
return MdmsService.getDataByCriteria(tenantId, getRentalDetailsCategoryCriteria(tenantId, moduleCode), moduleCode);
|
|
2445
2586
|
},
|
|
2587
|
+
getChargeSlabs: function getChargeSlabs(tenantId, moduleCode) {
|
|
2588
|
+
return MdmsService.getDataByCriteria(tenantId, getChargeSlabsCategoryCriteria(tenantId, moduleCode), moduleCode);
|
|
2589
|
+
},
|
|
2446
2590
|
getDssDashboard: function getDssDashboard(tenantId, moduleCode) {
|
|
2447
2591
|
return MdmsService.getDataByCriteria(tenantId, getDssDashboardCriteria(tenantId, moduleCode), moduleCode);
|
|
2448
2592
|
},
|
|
@@ -2502,6 +2646,18 @@ var MdmsService = {
|
|
|
2502
2646
|
},
|
|
2503
2647
|
getTradeTypeRoleTypes: function getTradeTypeRoleTypes(tenantId, moduleCode, type) {
|
|
2504
2648
|
return MdmsService.getDataByCriteria(tenantId, getTradeTypeRoleCriteria(tenantId, moduleCode, type), moduleCode);
|
|
2649
|
+
},
|
|
2650
|
+
getFSMGenderType: function getFSMGenderType(tenantId, moduleCode, type) {
|
|
2651
|
+
return MdmsService.getDataByCriteria(tenantId, getGenderTypeList(tenantId, moduleCode, type), moduleCode);
|
|
2652
|
+
},
|
|
2653
|
+
getFSTPORejectionReason: function getFSTPORejectionReason(tenantId, moduleCode, type) {
|
|
2654
|
+
return MdmsService.getDataByCriteria(tenantId, getFSTPORejectionReasonCriteria(tenantId, moduleCode, type), moduleCode);
|
|
2655
|
+
},
|
|
2656
|
+
getFSMPaymentType: function getFSMPaymentType(tenantId, moduleCode, type) {
|
|
2657
|
+
return MdmsService.getDataByCriteria(tenantId, getFSMPaymentTypeCriteria(tenantId, moduleCode, type), moduleCode);
|
|
2658
|
+
},
|
|
2659
|
+
getFSMTripNumber: function getFSMTripNumber(tenantId, moduleCode, type) {
|
|
2660
|
+
return MdmsService.getDataByCriteria(tenantId, getFSMTripNumberCriteria(tenantId, moduleCode, type), moduleCode);
|
|
2505
2661
|
}
|
|
2506
2662
|
};
|
|
2507
2663
|
|
|
@@ -2577,7 +2733,7 @@ var StoreService = {
|
|
|
2577
2733
|
digitInitData: function (stateCode, enabledModules) {
|
|
2578
2734
|
try {
|
|
2579
2735
|
return Promise.resolve(MdmsService.init(stateCode)).then(function (_ref) {
|
|
2580
|
-
var _MdmsRes$tenant, _MdmsRes$DIGITUI, _MdmsRes$tenant2;
|
|
2736
|
+
var _MdmsRes$tenant, _MdmsRes$tenant$citym, _MdmsRes$DIGITUI, _MdmsRes$tenant2;
|
|
2581
2737
|
|
|
2582
2738
|
var MdmsRes = _ref.MdmsRes;
|
|
2583
2739
|
var stateInfo = MdmsRes["common-masters"].StateInfo[0];
|
|
@@ -2597,10 +2753,12 @@ var StoreService = {
|
|
|
2597
2753
|
bannerUrl: stateInfo.bannerUrl
|
|
2598
2754
|
},
|
|
2599
2755
|
localizationModules: stateInfo.localizationModules,
|
|
2600
|
-
modules: MdmsRes === null || MdmsRes === void 0 ? void 0 : (_MdmsRes$tenant = MdmsRes.tenant) === null || _MdmsRes$tenant === void 0 ? void 0 : _MdmsRes$tenant.citymodule.filter(function (module) {
|
|
2601
|
-
return module.active;
|
|
2756
|
+
modules: MdmsRes === null || MdmsRes === void 0 ? void 0 : (_MdmsRes$tenant = MdmsRes.tenant) === null || _MdmsRes$tenant === void 0 ? void 0 : (_MdmsRes$tenant$citym = _MdmsRes$tenant.citymodule.filter(function (module) {
|
|
2757
|
+
return module === null || module === void 0 ? void 0 : module.active;
|
|
2602
2758
|
}).filter(function (module) {
|
|
2603
|
-
return enabledModules.includes(module.code);
|
|
2759
|
+
return enabledModules === null || enabledModules === void 0 ? void 0 : enabledModules.includes(module === null || module === void 0 ? void 0 : module.code);
|
|
2760
|
+
})) === null || _MdmsRes$tenant$citym === void 0 ? void 0 : _MdmsRes$tenant$citym.sort(function (x, y) {
|
|
2761
|
+
return (x === null || x === void 0 ? void 0 : x.order) - (y === null || y === void 0 ? void 0 : y.order);
|
|
2604
2762
|
})
|
|
2605
2763
|
};
|
|
2606
2764
|
initData.selectedLanguage = Digit.SessionStorage.get("locale") || initData.languages[0].value;
|
|
@@ -2612,11 +2770,7 @@ var StoreService = {
|
|
|
2612
2770
|
return item.code === ele.code;
|
|
2613
2771
|
}) ? unique : [].concat(unique, [ele]);
|
|
2614
2772
|
}, []);
|
|
2615
|
-
initData.tenants = MdmsRes === null || MdmsRes === void 0 ? void 0 : (_MdmsRes$tenant2 = MdmsRes.tenant) === null || _MdmsRes$tenant2 === void 0 ? void 0 : _MdmsRes$tenant2.tenants.
|
|
2616
|
-
return !!moduleTenants.find(function (mt) {
|
|
2617
|
-
return mt.code === item.code;
|
|
2618
|
-
});
|
|
2619
|
-
}).map(function (tenant) {
|
|
2773
|
+
initData.tenants = MdmsRes === null || MdmsRes === void 0 ? void 0 : (_MdmsRes$tenant2 = MdmsRes.tenant) === null || _MdmsRes$tenant2 === void 0 ? void 0 : _MdmsRes$tenant2.tenants.map(function (tenant) {
|
|
2620
2774
|
return _extends({
|
|
2621
2775
|
i18nKey: "TENANT_TENANTS_" + tenant.code.replace(".", "_").toUpperCase()
|
|
2622
2776
|
}, tenant);
|
|
@@ -2754,7 +2908,7 @@ var initI18n = function initI18n(callback) {
|
|
|
2754
2908
|
var UploadServices = {
|
|
2755
2909
|
Filestorage: function (module, filedata, tenantId) {
|
|
2756
2910
|
try {
|
|
2757
|
-
var _window, _window$globalConfigs;
|
|
2911
|
+
var _window, _window$globalConfigs, _Digit$UserService$ge;
|
|
2758
2912
|
|
|
2759
2913
|
var formData = new FormData();
|
|
2760
2914
|
formData.append("file", filedata, filedata.name);
|
|
@@ -2764,7 +2918,10 @@ var UploadServices = {
|
|
|
2764
2918
|
var config = {
|
|
2765
2919
|
method: "post",
|
|
2766
2920
|
url: "" + Urls.FileStore + tenantInfo,
|
|
2767
|
-
data: formData
|
|
2921
|
+
data: formData,
|
|
2922
|
+
headers: {
|
|
2923
|
+
"auth-token": Digit.UserService.getUser() ? (_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.access_token : null
|
|
2924
|
+
}
|
|
2768
2925
|
};
|
|
2769
2926
|
return Promise.resolve(Axios(config));
|
|
2770
2927
|
} catch (e) {
|
|
@@ -2773,6 +2930,8 @@ var UploadServices = {
|
|
|
2773
2930
|
},
|
|
2774
2931
|
MultipleFilesStorage: function (module, filesData, tenantId) {
|
|
2775
2932
|
try {
|
|
2933
|
+
var _window2, _window2$globalConfig;
|
|
2934
|
+
|
|
2776
2935
|
var formData = new FormData();
|
|
2777
2936
|
var filesArray = Array.from(filesData);
|
|
2778
2937
|
filesArray === null || filesArray === void 0 ? void 0 : filesArray.forEach(function (fileData, index) {
|
|
@@ -2780,12 +2939,14 @@ var UploadServices = {
|
|
|
2780
2939
|
});
|
|
2781
2940
|
formData.append("tenantId", tenantId);
|
|
2782
2941
|
formData.append("module", module);
|
|
2942
|
+
var tenantInfo = (_window2 = window) !== null && _window2 !== void 0 && (_window2$globalConfig = _window2.globalConfigs) !== null && _window2$globalConfig !== void 0 && _window2$globalConfig.getConfig("ENABLE_SINGLEINSTANCE") ? "?tenantId=" + tenantId : "";
|
|
2783
2943
|
var config = {
|
|
2784
2944
|
method: "post",
|
|
2785
|
-
url: Urls.FileStore,
|
|
2945
|
+
url: "" + Urls.FileStore + tenantInfo,
|
|
2786
2946
|
data: formData,
|
|
2787
2947
|
headers: {
|
|
2788
|
-
'Content-Type': 'multipart/form-data'
|
|
2948
|
+
'Content-Type': 'multipart/form-data',
|
|
2949
|
+
"auth-token": Digit.UserService.getUser().access_token
|
|
2789
2950
|
}
|
|
2790
2951
|
};
|
|
2791
2952
|
return Promise.resolve(Axios(config));
|
|
@@ -2795,9 +2956,12 @@ var UploadServices = {
|
|
|
2795
2956
|
},
|
|
2796
2957
|
Filefetch: function (filesArray, tenantId) {
|
|
2797
2958
|
try {
|
|
2959
|
+
var _window3, _window3$globalConfig;
|
|
2960
|
+
|
|
2961
|
+
var tenantInfo = (_window3 = window) !== null && _window3 !== void 0 && (_window3$globalConfig = _window3.globalConfigs) !== null && _window3$globalConfig !== void 0 && _window3$globalConfig.getConfig("ENABLE_SINGLEINSTANCE") ? "?tenantId=" + tenantId : "";
|
|
2798
2962
|
var config = {
|
|
2799
2963
|
method: "get",
|
|
2800
|
-
url: Urls.FileFetch,
|
|
2964
|
+
url: "" + Urls.FileFetch + tenantInfo,
|
|
2801
2965
|
params: {
|
|
2802
2966
|
tenantId: tenantId,
|
|
2803
2967
|
fileStoreIds: filesArray === null || filesArray === void 0 ? void 0 : filesArray.join(",")
|
|
@@ -3132,7 +3296,7 @@ var FSMService = {
|
|
|
3132
3296
|
});
|
|
3133
3297
|
},
|
|
3134
3298
|
vehicleUpdate: function vehicleUpdate(details) {
|
|
3135
|
-
Request({
|
|
3299
|
+
return Request({
|
|
3136
3300
|
url: Urls.fsm.vehilceUpdate,
|
|
3137
3301
|
data: details,
|
|
3138
3302
|
useCache: false,
|
|
@@ -3319,7 +3483,7 @@ var ConvertTimestampToDate = function ConvertTimestampToDate(timestamp, dateForm
|
|
|
3319
3483
|
return timestamp ? dateFns.format(dateFns.toDate(timestamp), dateFormat) : null;
|
|
3320
3484
|
};
|
|
3321
3485
|
var ConvertEpochToDate = function ConvertEpochToDate(dateEpoch) {
|
|
3322
|
-
if (dateEpoch == null || dateEpoch == undefined || dateEpoch ==
|
|
3486
|
+
if (dateEpoch == null || dateEpoch == undefined || dateEpoch == "") {
|
|
3323
3487
|
return "NA";
|
|
3324
3488
|
}
|
|
3325
3489
|
|
|
@@ -3331,11 +3495,26 @@ var ConvertEpochToDate = function ConvertEpochToDate(dateEpoch) {
|
|
|
3331
3495
|
day = (day > 9 ? "" : "0") + day;
|
|
3332
3496
|
return day + "/" + month + "/" + year;
|
|
3333
3497
|
};
|
|
3498
|
+
var ConvertEpochToTimeInHours = function ConvertEpochToTimeInHours(dateEpoch) {
|
|
3499
|
+
if (dateEpoch == null || dateEpoch == undefined || dateEpoch == "") {
|
|
3500
|
+
return "NA";
|
|
3501
|
+
}
|
|
3502
|
+
|
|
3503
|
+
var dateFromApi = new Date(dateEpoch);
|
|
3504
|
+
var hour = dateFromApi.getHours();
|
|
3505
|
+
var min = dateFromApi.getMinutes();
|
|
3506
|
+
var period = hour > 12 ? "PM" : "AM";
|
|
3507
|
+
hour = hour > 12 ? hour - 12 : hour;
|
|
3508
|
+
hour = (hour > 9 ? "" : "0") + hour;
|
|
3509
|
+
min = (min > 9 ? "" : "0") + min;
|
|
3510
|
+
return hour + ":" + min + " " + period;
|
|
3511
|
+
};
|
|
3334
3512
|
|
|
3335
3513
|
var dateUtils = {
|
|
3336
3514
|
__proto__: null,
|
|
3337
3515
|
ConvertTimestampToDate: ConvertTimestampToDate,
|
|
3338
|
-
ConvertEpochToDate: ConvertEpochToDate
|
|
3516
|
+
ConvertEpochToDate: ConvertEpochToDate,
|
|
3517
|
+
ConvertEpochToTimeInHours: ConvertEpochToTimeInHours
|
|
3339
3518
|
};
|
|
3340
3519
|
|
|
3341
3520
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -33911,6 +34090,22 @@ var reactDom = createCommonjsModule(function (module) {
|
|
|
33911
34090
|
}
|
|
33912
34091
|
});
|
|
33913
34092
|
|
|
34093
|
+
var changeClasses = function changeClasses(class1, class2) {
|
|
34094
|
+
var elements = document.getElementsByClassName(class1);
|
|
34095
|
+
Array.prototype.map.call(elements, function (testElement) {
|
|
34096
|
+
testElement.classList.add(class2);
|
|
34097
|
+
testElement.classList.remove(class1);
|
|
34098
|
+
});
|
|
34099
|
+
};
|
|
34100
|
+
|
|
34101
|
+
var revertCss = function revertCss() {
|
|
34102
|
+
changeClasses("dss-white-pre-temp", 'dss-white-pre-line');
|
|
34103
|
+
};
|
|
34104
|
+
|
|
34105
|
+
var applyCss = function applyCss() {
|
|
34106
|
+
changeClasses('dss-white-pre-line', "dss-white-pre-temp");
|
|
34107
|
+
};
|
|
34108
|
+
|
|
33914
34109
|
var Download = {
|
|
33915
34110
|
Image: function Image(node, fileName, share, resolve) {
|
|
33916
34111
|
if (resolve === void 0) {
|
|
@@ -33953,36 +34148,105 @@ var Download = {
|
|
|
33953
34148
|
wb.Sheets[filename] = ws;
|
|
33954
34149
|
XLSX.writeFile(wb, filename + ".xlsx");
|
|
33955
34150
|
},
|
|
33956
|
-
PDF: function PDF(node, fileName, share) {
|
|
33957
|
-
|
|
33958
|
-
|
|
33959
|
-
|
|
33960
|
-
|
|
33961
|
-
|
|
33962
|
-
|
|
34151
|
+
PDF: function PDF(node, fileName, share, resolve) {
|
|
34152
|
+
if (resolve === void 0) {
|
|
34153
|
+
resolve = null;
|
|
34154
|
+
}
|
|
34155
|
+
|
|
34156
|
+
var saveAs = function saveAs(uri, filename) {
|
|
34157
|
+
var link = document.createElement("a");
|
|
34158
|
+
|
|
34159
|
+
if (typeof link.download === "string") {
|
|
34160
|
+
link.href = uri;
|
|
34161
|
+
link.download = filename;
|
|
34162
|
+
document.body.appendChild(link);
|
|
34163
|
+
link.click();
|
|
34164
|
+
document.body.removeChild(link);
|
|
34165
|
+
} else {
|
|
34166
|
+
window.open(uri);
|
|
34167
|
+
}
|
|
33963
34168
|
};
|
|
33964
34169
|
|
|
34170
|
+
var dataURItoBlob = function dataURItoBlob(dataURI) {
|
|
34171
|
+
var binary = atob(dataURI.split(',')[1]);
|
|
34172
|
+
var array = [];
|
|
34173
|
+
|
|
34174
|
+
for (var i = 0; i < binary.length; i++) {
|
|
34175
|
+
array.push(binary.charCodeAt(i));
|
|
34176
|
+
}
|
|
34177
|
+
|
|
34178
|
+
return new Blob([new Uint8Array(array)], {
|
|
34179
|
+
type: 'image/jpeg'
|
|
34180
|
+
});
|
|
34181
|
+
};
|
|
34182
|
+
|
|
34183
|
+
changeClasses('dss-white-pre-line', "dss-white-pre-temp");
|
|
34184
|
+
applyCss();
|
|
33965
34185
|
var element = reactDom.findDOMNode(node.current);
|
|
33966
|
-
return
|
|
33967
|
-
|
|
33968
|
-
|
|
33969
|
-
|
|
33970
|
-
|
|
33971
|
-
|
|
33972
|
-
|
|
33973
|
-
|
|
33974
|
-
|
|
33975
|
-
|
|
33976
|
-
|
|
33977
|
-
|
|
33978
|
-
|
|
33979
|
-
|
|
33980
|
-
var
|
|
33981
|
-
|
|
33982
|
-
|
|
33983
|
-
|
|
33984
|
-
|
|
33985
|
-
|
|
34186
|
+
return domtoimage.toJpeg(element, {
|
|
34187
|
+
quality: 1,
|
|
34188
|
+
bgcolor: 'white',
|
|
34189
|
+
filter: function filter(node) {
|
|
34190
|
+
var _node$className, _node$className$inclu;
|
|
34191
|
+
|
|
34192
|
+
return !(node !== null && node !== void 0 && (_node$className = node.className) !== null && _node$className !== void 0 && (_node$className$inclu = _node$className.includes) !== null && _node$className$inclu !== void 0 && _node$className$inclu.call(_node$className, "divToBeHidden"));
|
|
34193
|
+
},
|
|
34194
|
+
style: {
|
|
34195
|
+
margin: '25px'
|
|
34196
|
+
}
|
|
34197
|
+
}).then(function (dataUrl) {
|
|
34198
|
+
changeClasses("dss-white-pre-temp", 'dss-white-pre-line');
|
|
34199
|
+
revertCss();
|
|
34200
|
+
var blobData = dataURItoBlob(dataUrl);
|
|
34201
|
+
revertCss();
|
|
34202
|
+
return share ? resolve(new File([blobData], fileName + ".jpeg", {
|
|
34203
|
+
type: "image/jpeg"
|
|
34204
|
+
})) : saveAs(dataUrl, fileName + ".jpeg");
|
|
34205
|
+
});
|
|
34206
|
+
},
|
|
34207
|
+
IndividualChartImage: function IndividualChartImage(node, fileName, share, resolve) {
|
|
34208
|
+
if (resolve === void 0) {
|
|
34209
|
+
resolve = null;
|
|
34210
|
+
}
|
|
34211
|
+
|
|
34212
|
+
var saveAs = function saveAs(uri, filename) {
|
|
34213
|
+
var link = document.createElement("a");
|
|
34214
|
+
|
|
34215
|
+
if (typeof link.download === "string") {
|
|
34216
|
+
link.href = uri;
|
|
34217
|
+
link.download = filename;
|
|
34218
|
+
document.body.appendChild(link);
|
|
34219
|
+
link.click();
|
|
34220
|
+
document.body.removeChild(link);
|
|
34221
|
+
} else {
|
|
34222
|
+
window.open(uri);
|
|
34223
|
+
}
|
|
34224
|
+
};
|
|
34225
|
+
|
|
34226
|
+
var dataURItoBlob = function dataURItoBlob(dataURI) {
|
|
34227
|
+
var binary = atob(dataURI.split(',')[1]);
|
|
34228
|
+
var array = [];
|
|
34229
|
+
|
|
34230
|
+
for (var i = 0; i < binary.length; i++) {
|
|
34231
|
+
array.push(binary.charCodeAt(i));
|
|
34232
|
+
}
|
|
34233
|
+
|
|
34234
|
+
return new Blob([new Uint8Array(array)], {
|
|
34235
|
+
type: 'image/jpeg'
|
|
34236
|
+
});
|
|
34237
|
+
};
|
|
34238
|
+
|
|
34239
|
+
changeClasses('dss-white-pre-line', "dss-white-pre-temp");
|
|
34240
|
+
var element = reactDom.findDOMNode(node.current);
|
|
34241
|
+
return domtoimage.toJpeg(element, {
|
|
34242
|
+
quality: 1,
|
|
34243
|
+
bgcolor: 'white'
|
|
34244
|
+
}).then(function (dataUrl) {
|
|
34245
|
+
var blobData = dataURItoBlob(dataUrl);
|
|
34246
|
+
changeClasses("dss-white-pre-temp", 'dss-white-pre-line');
|
|
34247
|
+
return share ? resolve(new File([blobData], fileName + ".jpeg", {
|
|
34248
|
+
type: "image/jpeg"
|
|
34249
|
+
})) : saveAs(dataUrl, fileName + ".jpeg");
|
|
33986
34250
|
});
|
|
33987
34251
|
}
|
|
33988
34252
|
};
|
|
@@ -34303,6 +34567,19 @@ function _catch(body, recover) {
|
|
|
34303
34567
|
|
|
34304
34568
|
return result;
|
|
34305
34569
|
}
|
|
34570
|
+
function _finallyRethrows(body, finalizer) {
|
|
34571
|
+
try {
|
|
34572
|
+
var result = body();
|
|
34573
|
+
} catch (e) {
|
|
34574
|
+
return finalizer(true, e);
|
|
34575
|
+
}
|
|
34576
|
+
|
|
34577
|
+
if (result && result.then) {
|
|
34578
|
+
return result.then(finalizer.bind(null, false), finalizer.bind(null, true));
|
|
34579
|
+
}
|
|
34580
|
+
|
|
34581
|
+
return finalizer(false, result);
|
|
34582
|
+
}
|
|
34306
34583
|
|
|
34307
34584
|
function listCacheClear() {
|
|
34308
34585
|
this.__data__ = [];
|
|
@@ -35329,8 +35606,8 @@ function initCloneArray(array) {
|
|
|
35329
35606
|
|
|
35330
35607
|
var _initCloneArray = initCloneArray;
|
|
35331
35608
|
|
|
35332
|
-
var Uint8Array = _root.Uint8Array;
|
|
35333
|
-
var _Uint8Array = Uint8Array;
|
|
35609
|
+
var Uint8Array$1 = _root.Uint8Array;
|
|
35610
|
+
var _Uint8Array = Uint8Array$1;
|
|
35334
35611
|
|
|
35335
35612
|
function cloneArrayBuffer(arrayBuffer) {
|
|
35336
35613
|
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
@@ -35618,6 +35895,7 @@ var cloneDeep_1 = cloneDeep;
|
|
|
35618
35895
|
|
|
35619
35896
|
var getThumbnails = function getThumbnails(ids, tenantId) {
|
|
35620
35897
|
try {
|
|
35898
|
+
tenantId = window.location.href.includes("/obps/") ? Digit.ULBService.getStateId() : tenantId;
|
|
35621
35899
|
return Promise.resolve(Digit.UploadServices.Filefetch(ids, tenantId)).then(function (res) {
|
|
35622
35900
|
if (res.data.fileStoreIds && res.data.fileStoreIds.length !== 0) {
|
|
35623
35901
|
return {
|
|
@@ -35722,7 +36000,8 @@ var WorkflowService = {
|
|
|
35722
36000
|
var tenantId = _ref.tenantId,
|
|
35723
36001
|
id = _ref.id,
|
|
35724
36002
|
moduleCode = _ref.moduleCode,
|
|
35725
|
-
role = _ref.role
|
|
36003
|
+
role = _ref.role,
|
|
36004
|
+
getTripData = _ref.getTripData;
|
|
35726
36005
|
|
|
35727
36006
|
try {
|
|
35728
36007
|
return Promise.resolve(Digit.WorkflowService.getByBusinessId(tenantId, id)).then(function (workflow) {
|
|
@@ -35736,13 +36015,13 @@ var WorkflowService = {
|
|
|
35736
36015
|
|
|
35737
36016
|
var _exit = false;
|
|
35738
36017
|
|
|
35739
|
-
function
|
|
36018
|
+
function _temp14(_result2) {
|
|
35740
36019
|
return _exit ? _result2 : {};
|
|
35741
36020
|
}
|
|
35742
36021
|
|
|
35743
36022
|
var businessServiceResponse = _Digit$WorkflowServic === null || _Digit$WorkflowServic === void 0 ? void 0 : (_Digit$WorkflowServic2 = _Digit$WorkflowServic.BusinessServices[0]) === null || _Digit$WorkflowServic2 === void 0 ? void 0 : _Digit$WorkflowServic2.states;
|
|
35744
36023
|
|
|
35745
|
-
var
|
|
36024
|
+
var _temp13 = function () {
|
|
35746
36025
|
if (workflow && workflow.ProcessInstances) {
|
|
35747
36026
|
var _processInstances$, _businessServiceRespo;
|
|
35748
36027
|
|
|
@@ -35770,7 +36049,7 @@ var WorkflowService = {
|
|
|
35770
36049
|
});
|
|
35771
36050
|
|
|
35772
36051
|
if (currentState && currentState !== null && currentState !== void 0 && currentState.isStateUpdatable) {
|
|
35773
|
-
if (moduleCode === "FSM" || moduleCode === "FSM_VEHICLE_TRIP" || moduleCode === "PGR" || moduleCode === "OBPS") null;else nextActions.push({
|
|
36052
|
+
if (moduleCode === "FSM" || moduleCode === "FSM_POST_PAY_SERVICE" || moduleCode === "FSM_VEHICLE_TRIP" || moduleCode === "PGR" || moduleCode === "OBPS") null;else nextActions.push({
|
|
35774
36053
|
action: "EDIT",
|
|
35775
36054
|
state: currentState
|
|
35776
36055
|
});
|
|
@@ -35823,7 +36102,36 @@ var WorkflowService = {
|
|
|
35823
36102
|
return function () {
|
|
35824
36103
|
if (processInstances.length > 0) {
|
|
35825
36104
|
return Promise.resolve(makeCommentsSubsidariesOfPreviousActions(processInstances)).then(function (TLEnrichedWithWorflowData) {
|
|
35826
|
-
|
|
36105
|
+
function _temp12() {
|
|
36106
|
+
var _workflow$ProcessInst, _workflow$ProcessInst2;
|
|
36107
|
+
|
|
36108
|
+
var nextActions = actionRolePair;
|
|
36109
|
+
|
|
36110
|
+
if (role !== "CITIZEN" && moduleCode === "PGR") {
|
|
36111
|
+
var _timeline;
|
|
36112
|
+
|
|
36113
|
+
var onlyPendingForAssignmentStatusArray = (_timeline = timeline) === null || _timeline === void 0 ? void 0 : _timeline.filter(function (e) {
|
|
36114
|
+
return (e === null || e === void 0 ? void 0 : e.status) === "PENDINGFORASSIGNMENT";
|
|
36115
|
+
});
|
|
36116
|
+
var duplicateCheckpointOfPendingForAssignment = onlyPendingForAssignmentStatusArray.at(-1);
|
|
36117
|
+
timeline.push(_extends({}, duplicateCheckpointOfPendingForAssignment, {
|
|
36118
|
+
status: "COMPLAINT_FILED"
|
|
36119
|
+
}));
|
|
36120
|
+
}
|
|
36121
|
+
|
|
36122
|
+
if (timeline[timeline.length - 1].status !== "CREATED" && (moduleCode === "FSM" || moduleCode === "FSM_POST_PAY_SERVICE")) timeline.push({
|
|
36123
|
+
status: "CREATED"
|
|
36124
|
+
});
|
|
36125
|
+
var details = {
|
|
36126
|
+
timeline: timeline,
|
|
36127
|
+
nextActions: nextActions,
|
|
36128
|
+
actionState: actionState,
|
|
36129
|
+
applicationBusinessService: workflow === null || workflow === void 0 ? void 0 : (_workflow$ProcessInst = workflow.ProcessInstances) === null || _workflow$ProcessInst === void 0 ? void 0 : (_workflow$ProcessInst2 = _workflow$ProcessInst[0]) === null || _workflow$ProcessInst2 === void 0 ? void 0 : _workflow$ProcessInst2.businessService,
|
|
36130
|
+
processInstances: applicationProcessInstance
|
|
36131
|
+
};
|
|
36132
|
+
_exit = true;
|
|
36133
|
+
return details;
|
|
36134
|
+
}
|
|
35827
36135
|
|
|
35828
36136
|
var timeline = TLEnrichedWithWorflowData.map(function (instance, ind) {
|
|
35829
36137
|
var _instance$thumbnailsT, _instance$thumbnailsT2;
|
|
@@ -35861,40 +36169,148 @@ var WorkflowService = {
|
|
|
35861
36169
|
};
|
|
35862
36170
|
return checkPoint;
|
|
35863
36171
|
});
|
|
35864
|
-
var nextActions = actionRolePair;
|
|
35865
36172
|
|
|
35866
|
-
|
|
35867
|
-
|
|
35868
|
-
|
|
35869
|
-
|
|
35870
|
-
|
|
35871
|
-
|
|
35872
|
-
|
|
35873
|
-
|
|
35874
|
-
|
|
36173
|
+
var _temp11 = function () {
|
|
36174
|
+
if (getTripData) {
|
|
36175
|
+
var _temp15 = _catch(function () {
|
|
36176
|
+
var filters = {
|
|
36177
|
+
businessService: 'FSM_VEHICLE_TRIP',
|
|
36178
|
+
refernceNos: id
|
|
36179
|
+
};
|
|
36180
|
+
return Promise.resolve(Digit.FSMService.vehicleSearch(tenantId, filters)).then(function (tripSearchResp) {
|
|
36181
|
+
var _temp9 = function () {
|
|
36182
|
+
if (tripSearchResp && tripSearchResp.vehicleTrip && tripSearchResp.vehicleTrip.length) {
|
|
36183
|
+
var _temp16 = function _temp16() {
|
|
36184
|
+
var tripTimeline = [];
|
|
36185
|
+
var disposalInProgressPosition = timeline.findIndex(function (data) {
|
|
36186
|
+
return data.status === "DISPOSAL_IN_PROGRESS";
|
|
36187
|
+
});
|
|
36188
|
+
|
|
36189
|
+
if (disposalInProgressPosition !== -1) {
|
|
36190
|
+
var _timeline2;
|
|
36191
|
+
|
|
36192
|
+
timeline[disposalInProgressPosition].numberOfTrips = _numberOfTrips;
|
|
36193
|
+
|
|
36194
|
+
(_timeline2 = timeline).splice.apply(_timeline2, [disposalInProgressPosition + 1, 0].concat(_waitingForDisposedAction));
|
|
36195
|
+
|
|
36196
|
+
tripTimeline = _disposedAction;
|
|
36197
|
+
} else {
|
|
36198
|
+
tripTimeline = _disposedAction.concat(_waitingForDisposedAction);
|
|
36199
|
+
}
|
|
36200
|
+
|
|
36201
|
+
var feedbackPosition = timeline.findIndex(function (data) {
|
|
36202
|
+
return data.status === "CITIZEN_FEEDBACK_PENDING";
|
|
36203
|
+
});
|
|
36204
|
+
|
|
36205
|
+
if (feedbackPosition !== -1) {
|
|
36206
|
+
var _timeline3;
|
|
36207
|
+
|
|
36208
|
+
(_timeline3 = timeline).splice.apply(_timeline3, [feedbackPosition + 1, 0].concat(tripTimeline));
|
|
36209
|
+
} else {
|
|
36210
|
+
timeline = tripTimeline.concat(timeline);
|
|
36211
|
+
}
|
|
36212
|
+
};
|
|
36213
|
+
|
|
36214
|
+
var _numberOfTrips = tripSearchResp.vehicleTrip.length;
|
|
36215
|
+
var cretaedTime = 0;
|
|
36216
|
+
var lastModifiedTime = 0;
|
|
36217
|
+
var waitingForDisposedCount = 0;
|
|
36218
|
+
var disposedCount = 0;
|
|
36219
|
+
var _waitingForDisposedAction = [];
|
|
36220
|
+
var _disposedAction = [];
|
|
36221
|
+
|
|
36222
|
+
var _temp17 = _forOf(tripSearchResp.vehicleTrip, function (data) {
|
|
36223
|
+
return Promise.resolve(Digit.WorkflowService.getByBusinessId(tenantId, data.applicationNo)).then(function (resp) {
|
|
36224
|
+
var _resp$ProcessInstance;
|
|
36225
|
+
|
|
36226
|
+
resp === null || resp === void 0 ? void 0 : (_resp$ProcessInstance = resp.ProcessInstances) === null || _resp$ProcessInstance === void 0 ? void 0 : _resp$ProcessInstance.map(function (instance, ind) {
|
|
36227
|
+
if (instance.state.applicationStatus === "WAITING_FOR_DISPOSAL") {
|
|
36228
|
+
var _instance$thumbnailsT3, _instance$thumbnailsT4;
|
|
36229
|
+
|
|
36230
|
+
waitingForDisposedCount++;
|
|
36231
|
+
cretaedTime = Digit.DateUtils.ConvertEpochToDate(instance.auditDetails.createdTime);
|
|
36232
|
+
lastModifiedTime = Digit.DateUtils.ConvertEpochToDate(instance.auditDetails.lastModifiedTime);
|
|
36233
|
+
_waitingForDisposedAction = [{
|
|
36234
|
+
performedAction: instance.action,
|
|
36235
|
+
status: instance.state.applicationStatus,
|
|
36236
|
+
state: instance.state.state,
|
|
36237
|
+
assigner: instance === null || instance === void 0 ? void 0 : instance.assigner,
|
|
36238
|
+
rating: instance === null || instance === void 0 ? void 0 : instance.rating,
|
|
36239
|
+
thumbnailsToShow: {
|
|
36240
|
+
thumbs: instance === null || instance === void 0 ? void 0 : (_instance$thumbnailsT3 = instance.thumbnailsToShow) === null || _instance$thumbnailsT3 === void 0 ? void 0 : _instance$thumbnailsT3.thumbs,
|
|
36241
|
+
fullImage: instance === null || instance === void 0 ? void 0 : (_instance$thumbnailsT4 = instance.thumbnailsToShow) === null || _instance$thumbnailsT4 === void 0 ? void 0 : _instance$thumbnailsT4.images
|
|
36242
|
+
},
|
|
36243
|
+
assignes: instance.assignes,
|
|
36244
|
+
caption: instance.assignes ? instance.assignes.map(function (assignee) {
|
|
36245
|
+
return {
|
|
36246
|
+
name: assignee.name,
|
|
36247
|
+
mobileNumber: assignee.mobileNumber
|
|
36248
|
+
};
|
|
36249
|
+
}) : null,
|
|
36250
|
+
auditDetails: {
|
|
36251
|
+
created: cretaedTime,
|
|
36252
|
+
lastModified: lastModifiedTime
|
|
36253
|
+
},
|
|
36254
|
+
numberOfTrips: _numberOfTrips
|
|
36255
|
+
}];
|
|
36256
|
+
}
|
|
36257
|
+
|
|
36258
|
+
if (instance.state.applicationStatus === "DISPOSED") {
|
|
36259
|
+
var _instance$thumbnailsT5, _instance$thumbnailsT6;
|
|
36260
|
+
|
|
36261
|
+
disposedCount++;
|
|
36262
|
+
cretaedTime = instance.auditDetails.createdTime > cretaedTime ? Digit.DateUtils.ConvertEpochToDate(instance.auditDetails.createdTime) : cretaedTime;
|
|
36263
|
+
lastModifiedTime = instance.auditDetails.lastModifiedTime > lastModifiedTime ? Digit.DateUtils.ConvertEpochToDate(instance.auditDetails.lastModifiedTime) : lastModifiedTime;
|
|
36264
|
+
_disposedAction = [{
|
|
36265
|
+
performedAction: instance.action,
|
|
36266
|
+
status: instance.state.applicationStatus,
|
|
36267
|
+
state: instance.state.state,
|
|
36268
|
+
assigner: instance === null || instance === void 0 ? void 0 : instance.assigner,
|
|
36269
|
+
rating: instance === null || instance === void 0 ? void 0 : instance.rating,
|
|
36270
|
+
thumbnailsToShow: {
|
|
36271
|
+
thumbs: instance === null || instance === void 0 ? void 0 : (_instance$thumbnailsT5 = instance.thumbnailsToShow) === null || _instance$thumbnailsT5 === void 0 ? void 0 : _instance$thumbnailsT5.thumbs,
|
|
36272
|
+
fullImage: instance === null || instance === void 0 ? void 0 : (_instance$thumbnailsT6 = instance.thumbnailsToShow) === null || _instance$thumbnailsT6 === void 0 ? void 0 : _instance$thumbnailsT6.images
|
|
36273
|
+
},
|
|
36274
|
+
assignes: instance.assignes,
|
|
36275
|
+
caption: instance.assignes ? instance.assignes.map(function (assignee) {
|
|
36276
|
+
return {
|
|
36277
|
+
name: assignee.name,
|
|
36278
|
+
mobileNumber: assignee.mobileNumber
|
|
36279
|
+
};
|
|
36280
|
+
}) : null,
|
|
36281
|
+
auditDetails: {
|
|
36282
|
+
created: cretaedTime,
|
|
36283
|
+
lastModified: lastModifiedTime
|
|
36284
|
+
},
|
|
36285
|
+
numberOfTrips: disposedCount
|
|
36286
|
+
}];
|
|
36287
|
+
}
|
|
36288
|
+
});
|
|
36289
|
+
});
|
|
36290
|
+
});
|
|
36291
|
+
|
|
36292
|
+
return _temp17 && _temp17.then ? _temp17.then(_temp16) : _temp16(_temp17);
|
|
36293
|
+
}
|
|
36294
|
+
}();
|
|
36295
|
+
|
|
36296
|
+
if (_temp9 && _temp9.then) return _temp9.then(function () {});
|
|
36297
|
+
});
|
|
36298
|
+
}, function () {});
|
|
36299
|
+
|
|
36300
|
+
if (_temp15 && _temp15.then) return _temp15.then(function () {});
|
|
36301
|
+
}
|
|
36302
|
+
}();
|
|
35875
36303
|
|
|
35876
|
-
|
|
35877
|
-
status: "CREATED"
|
|
35878
|
-
});
|
|
35879
|
-
var details = {
|
|
35880
|
-
timeline: timeline,
|
|
35881
|
-
nextActions: nextActions,
|
|
35882
|
-
actionState: actionState,
|
|
35883
|
-
applicationBusinessService: workflow === null || workflow === void 0 ? void 0 : (_workflow$ProcessInst = workflow.ProcessInstances) === null || _workflow$ProcessInst === void 0 ? void 0 : (_workflow$ProcessInst2 = _workflow$ProcessInst[0]) === null || _workflow$ProcessInst2 === void 0 ? void 0 : _workflow$ProcessInst2.businessService,
|
|
35884
|
-
processInstances: applicationProcessInstance
|
|
35885
|
-
};
|
|
35886
|
-
_exit = true;
|
|
35887
|
-
return details;
|
|
36304
|
+
return _temp11 && _temp11.then ? _temp11.then(_temp12) : _temp12(_temp11);
|
|
35888
36305
|
});
|
|
35889
36306
|
}
|
|
35890
36307
|
}();
|
|
35891
36308
|
} else {
|
|
35892
|
-
console.warn("error fetching workflow services");
|
|
35893
36309
|
throw new Error("error fetching workflow services");
|
|
35894
36310
|
}
|
|
35895
36311
|
}();
|
|
35896
36312
|
|
|
35897
|
-
return
|
|
36313
|
+
return _temp13 && _temp13.then ? _temp13.then(_temp14) : _temp14(_temp13);
|
|
35898
36314
|
});
|
|
35899
36315
|
});
|
|
35900
36316
|
} catch (e) {
|
|
@@ -35991,6 +36407,7 @@ var Complaint = {
|
|
|
35991
36407
|
documentUid: "",
|
|
35992
36408
|
additionalDetails: {}
|
|
35993
36409
|
}] : null;
|
|
36410
|
+
if (!uploadedDocument) complaintDetails.workflow.verificationDocuments = [];
|
|
35994
36411
|
return Promise.resolve(Digit.PGRService.update(complaintDetails, tenantId));
|
|
35995
36412
|
} catch (e) {
|
|
35996
36413
|
return Promise.reject(e);
|
|
@@ -36050,19 +36467,22 @@ var UserService = {
|
|
|
36050
36467
|
try {
|
|
36051
36468
|
var userType = UserService.getType();
|
|
36052
36469
|
|
|
36053
|
-
var _temp2 =
|
|
36054
|
-
return
|
|
36055
|
-
|
|
36056
|
-
|
|
36470
|
+
var _temp2 = _finallyRethrows(function () {
|
|
36471
|
+
return _catch(function () {
|
|
36472
|
+
return Promise.resolve(UserService.logoutUser()).then(function () {});
|
|
36473
|
+
}, function () {});
|
|
36474
|
+
}, function (_wasThrown, _result) {
|
|
36475
|
+
window.localStorage.clear();
|
|
36476
|
+
window.sessionStorage.clear();
|
|
36057
36477
|
|
|
36058
|
-
|
|
36059
|
-
|
|
36060
|
-
|
|
36061
|
-
|
|
36062
|
-
|
|
36063
|
-
|
|
36064
|
-
|
|
36065
|
-
|
|
36478
|
+
if (userType === "citizen") {
|
|
36479
|
+
window.location.replace("/digit-ui/citizen");
|
|
36480
|
+
} else {
|
|
36481
|
+
window.location.replace("/digit-ui/employee/user/language-selection");
|
|
36482
|
+
}
|
|
36483
|
+
|
|
36484
|
+
if (_wasThrown) throw _result;
|
|
36485
|
+
return _result;
|
|
36066
36486
|
});
|
|
36067
36487
|
|
|
36068
36488
|
return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
|
|
@@ -36135,8 +36555,9 @@ var UserService = {
|
|
|
36135
36555
|
changePassword: function changePassword(details, stateCode) {
|
|
36136
36556
|
return ServiceRequest({
|
|
36137
36557
|
serviceName: "changePassword",
|
|
36138
|
-
url: Urls.
|
|
36558
|
+
url: Urls.ChangePassword1,
|
|
36139
36559
|
data: _extends({}, details),
|
|
36560
|
+
auth: true,
|
|
36140
36561
|
params: {
|
|
36141
36562
|
tenantId: stateCode
|
|
36142
36563
|
}
|
|
@@ -36191,13 +36612,15 @@ var PTService = {
|
|
|
36191
36612
|
},
|
|
36192
36613
|
fetchPaymentDetails: function fetchPaymentDetails(_ref2) {
|
|
36193
36614
|
var tenantId = _ref2.tenantId,
|
|
36194
|
-
consumerCodes = _ref2.consumerCodes
|
|
36615
|
+
consumerCodes = _ref2.consumerCodes,
|
|
36616
|
+
_ref2$auth = _ref2.auth,
|
|
36617
|
+
auth = _ref2$auth === void 0 ? true : _ref2$auth;
|
|
36195
36618
|
return Request({
|
|
36196
36619
|
url: Urls.pt.fetch_payment_details,
|
|
36197
36620
|
useCache: false,
|
|
36198
36621
|
method: "POST",
|
|
36199
|
-
auth: true,
|
|
36200
|
-
userService: true,
|
|
36622
|
+
auth: auth === false ? auth : true,
|
|
36623
|
+
userService: auth === false ? auth : true,
|
|
36201
36624
|
params: {
|
|
36202
36625
|
tenantId: tenantId,
|
|
36203
36626
|
consumerCode: consumerCodes,
|
|
@@ -36268,6 +36691,53 @@ var PTService = {
|
|
|
36268
36691
|
tenantId: tenantId
|
|
36269
36692
|
}, filters)
|
|
36270
36693
|
});
|
|
36694
|
+
},
|
|
36695
|
+
paymentsearch: function paymentsearch(_ref4) {
|
|
36696
|
+
var tenantId = _ref4.tenantId,
|
|
36697
|
+
filters = _ref4.filters,
|
|
36698
|
+
auth = _ref4.auth;
|
|
36699
|
+
return Request({
|
|
36700
|
+
url: Urls.pt.payment_search,
|
|
36701
|
+
useCache: false,
|
|
36702
|
+
method: "POST",
|
|
36703
|
+
auth: auth === false ? auth : true,
|
|
36704
|
+
userService: auth === false ? auth : true,
|
|
36705
|
+
params: _extends({
|
|
36706
|
+
tenantId: tenantId
|
|
36707
|
+
}, filters)
|
|
36708
|
+
});
|
|
36709
|
+
},
|
|
36710
|
+
ptCalculateMutation: function ptCalculateMutation(details, tenantId) {
|
|
36711
|
+
return Request({
|
|
36712
|
+
url: Urls.pt.pt_calculate_mutation,
|
|
36713
|
+
data: details,
|
|
36714
|
+
useCache: false,
|
|
36715
|
+
userService: true,
|
|
36716
|
+
method: "POST",
|
|
36717
|
+
params: {
|
|
36718
|
+
tenantId: tenantId
|
|
36719
|
+
},
|
|
36720
|
+
auth: true
|
|
36721
|
+
});
|
|
36722
|
+
}
|
|
36723
|
+
};
|
|
36724
|
+
|
|
36725
|
+
var WSService = {
|
|
36726
|
+
search: function search(_ref) {
|
|
36727
|
+
var tenantId = _ref.tenantId,
|
|
36728
|
+
filters = _ref.filters,
|
|
36729
|
+
businessService = _ref.businessService;
|
|
36730
|
+
return Request({
|
|
36731
|
+
url: businessService === "WS" ? Urls.ws.water_search : Urls.ws.sewarage_search,
|
|
36732
|
+
useCache: false,
|
|
36733
|
+
method: "POST",
|
|
36734
|
+
auth: filters !== null && filters !== void 0 && filters.locality ? false : true,
|
|
36735
|
+
userService: filters !== null && filters !== void 0 && filters.locality ? false : true,
|
|
36736
|
+
setTimeParam: false,
|
|
36737
|
+
params: _extends({
|
|
36738
|
+
tenantId: tenantId
|
|
36739
|
+
}, filters)
|
|
36740
|
+
});
|
|
36271
36741
|
}
|
|
36272
36742
|
};
|
|
36273
36743
|
|
|
@@ -36594,8 +37064,10 @@ var Events = {
|
|
|
36594
37064
|
});
|
|
36595
37065
|
},
|
|
36596
37066
|
Update: function Update(data) {
|
|
37067
|
+
var _window, _window$globalConfigs;
|
|
37068
|
+
|
|
36597
37069
|
return Request({
|
|
36598
|
-
url: Urls.events.updateEvent,
|
|
37070
|
+
url: (_window = window) !== null && _window !== void 0 && (_window$globalConfigs = _window.globalConfigs) !== null && _window$globalConfigs !== void 0 && _window$globalConfigs.getConfig("ENABLE_SINGLEINSTANCE") ? Urls.events.updateEventCDG : Urls.events.updateEvent,
|
|
36599
37071
|
useCache: false,
|
|
36600
37072
|
method: "POST",
|
|
36601
37073
|
auth: true,
|
|
@@ -36667,7 +37139,7 @@ var ShareFiles = {
|
|
|
36667
37139
|
try {
|
|
36668
37140
|
return Promise.resolve(UploadServices.Filestorage("DSS", data, tenantId)).then(function (fileUploadId) {
|
|
36669
37141
|
return Promise.resolve(UploadServices.Filefetch([fileUploadId.data.files[0].fileStoreId], fileUploadId.data.files[0].tenantId)).then(function (fileUrl) {
|
|
36670
|
-
return UrlShortener(fileUrl.data[fileUploadId.data.files[0].fileStoreId]
|
|
37142
|
+
return UrlShortener(Digit.Utils.getFileUrl(fileUrl.data[fileUploadId.data.files[0].fileStoreId]));
|
|
36671
37143
|
});
|
|
36672
37144
|
});
|
|
36673
37145
|
} catch (e) {
|
|
@@ -36703,6 +37175,38 @@ var ShareFiles = {
|
|
|
36703
37175
|
} catch (e) {
|
|
36704
37176
|
return Promise.reject(e);
|
|
36705
37177
|
}
|
|
37178
|
+
},
|
|
37179
|
+
IndividualChartImage: function (tenantId, node, filename, target) {
|
|
37180
|
+
try {
|
|
37181
|
+
return Promise.resolve(new Promise(function (resolve) {
|
|
37182
|
+
return Download.IndividualChartImage(node, filename, true, resolve);
|
|
37183
|
+
})).then(function (imageData) {
|
|
37184
|
+
return !target && navigator.share ? navigator.share({
|
|
37185
|
+
files: [imageData],
|
|
37186
|
+
title: filename
|
|
37187
|
+
}) : Promise.resolve(ShareFiles.getShortener(tenantId, imageData)).then(function (shortUrl) {
|
|
37188
|
+
ShareFiles.targetLink(target, shortUrl);
|
|
37189
|
+
});
|
|
37190
|
+
});
|
|
37191
|
+
} catch (e) {
|
|
37192
|
+
return Promise.reject(e);
|
|
37193
|
+
}
|
|
37194
|
+
},
|
|
37195
|
+
DownloadImage: function (tenantId, node, filename, target) {
|
|
37196
|
+
try {
|
|
37197
|
+
return Promise.resolve(new Promise(function (resolve) {
|
|
37198
|
+
return Download.PDF(node, filename, true, resolve);
|
|
37199
|
+
})).then(function (imageData) {
|
|
37200
|
+
return !target && navigator.share ? navigator.share({
|
|
37201
|
+
files: [imageData],
|
|
37202
|
+
title: filename
|
|
37203
|
+
}) : Promise.resolve(ShareFiles.getShortener(tenantId, imageData)).then(function (shortUrl) {
|
|
37204
|
+
ShareFiles.targetLink(target, shortUrl);
|
|
37205
|
+
});
|
|
37206
|
+
});
|
|
37207
|
+
} catch (e) {
|
|
37208
|
+
return Promise.reject(e);
|
|
37209
|
+
}
|
|
36706
37210
|
}
|
|
36707
37211
|
};
|
|
36708
37212
|
|
|
@@ -36773,7 +37277,7 @@ var GetServiceDefinitions = {
|
|
|
36773
37277
|
|
|
36774
37278
|
var ULBService = {
|
|
36775
37279
|
getCurrentTenantId: function getCurrentTenantId() {
|
|
36776
|
-
var _user$info, _user$info2, _user$info3;
|
|
37280
|
+
var _user$info, _user$info2, _user$info3, _window;
|
|
36777
37281
|
|
|
36778
37282
|
var user = UserService.getUser();
|
|
36779
37283
|
|
|
@@ -36787,13 +37291,13 @@ var ULBService = {
|
|
|
36787
37291
|
}
|
|
36788
37292
|
}
|
|
36789
37293
|
|
|
36790
|
-
var tenantId = (user === null || user === void 0 ? void 0 : (_user$info = user.info) === null || _user$info === void 0 ? void 0 : _user$info.type) === "EMPLOYEE" && user !== null && user !== void 0 && (_user$info2 = user.info) !== null && _user$info2 !== void 0 && _user$info2.tenantId ? user === null || user === void 0 ? void 0 : (_user$info3 = user.info) === null || _user$info3 === void 0 ? void 0 : _user$info3.tenantId : globalConfigs.getConfig("STATE_LEVEL_TENANT_ID");
|
|
37294
|
+
var tenantId = (user === null || user === void 0 ? void 0 : (_user$info = user.info) === null || _user$info === void 0 ? void 0 : _user$info.type) === "EMPLOYEE" && user !== null && user !== void 0 && (_user$info2 = user.info) !== null && _user$info2 !== void 0 && _user$info2.tenantId ? user === null || user === void 0 ? void 0 : (_user$info3 = user.info) === null || _user$info3 === void 0 ? void 0 : _user$info3.tenantId : (_window = window) === null || _window === void 0 ? void 0 : _window.globalConfigs.getConfig("STATE_LEVEL_TENANT_ID");
|
|
36791
37295
|
return tenantId;
|
|
36792
37296
|
},
|
|
36793
37297
|
getStateId: function getStateId() {
|
|
36794
|
-
var
|
|
37298
|
+
var _window2, _window2$globalConfig;
|
|
36795
37299
|
|
|
36796
|
-
return (
|
|
37300
|
+
return (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$globalConfig = _window2.globalConfigs) === null || _window2$globalConfig === void 0 ? void 0 : _window2$globalConfig.getConfig("STATE_LEVEL_TENANT_ID");
|
|
36797
37301
|
},
|
|
36798
37302
|
getCurrentUlb: function getCurrentUlb() {
|
|
36799
37303
|
var initData = StoreService.getInitData();
|
|
@@ -36801,6 +37305,88 @@ var ULBService = {
|
|
|
36801
37305
|
return initData.tenants.find(function (tenant) {
|
|
36802
37306
|
return tenant.code === tenantId;
|
|
36803
37307
|
});
|
|
37308
|
+
},
|
|
37309
|
+
getCitizenCurrentTenant: function getCitizenCurrentTenant() {
|
|
37310
|
+
var _Digit$SessionStorage, _Digit$UserService$ge, _Digit$UserService$ge2;
|
|
37311
|
+
|
|
37312
|
+
return ((_Digit$SessionStorage = Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.code) || ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : (_Digit$UserService$ge2 = _Digit$UserService$ge.info) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.permanentCity) || ULBService.getStateId();
|
|
37313
|
+
},
|
|
37314
|
+
getUserUlbs: function getUserUlbs(userRole) {
|
|
37315
|
+
if (userRole === void 0) {
|
|
37316
|
+
userRole = "";
|
|
37317
|
+
}
|
|
37318
|
+
|
|
37319
|
+
var stringReplaceAll = function stringReplaceAll(str, searcher, replaceWith) {
|
|
37320
|
+
if (str === void 0) {
|
|
37321
|
+
str = "";
|
|
37322
|
+
}
|
|
37323
|
+
|
|
37324
|
+
if (searcher === void 0) {
|
|
37325
|
+
searcher = "";
|
|
37326
|
+
}
|
|
37327
|
+
|
|
37328
|
+
if (replaceWith === void 0) {
|
|
37329
|
+
replaceWith = "";
|
|
37330
|
+
}
|
|
37331
|
+
|
|
37332
|
+
if (searcher == "") return str;
|
|
37333
|
+
|
|
37334
|
+
while ((_str = str) !== null && _str !== void 0 && _str.includes(searcher)) {
|
|
37335
|
+
var _str, _str2;
|
|
37336
|
+
|
|
37337
|
+
str = (_str2 = str) === null || _str2 === void 0 ? void 0 : _str2.replace(searcher, replaceWith);
|
|
37338
|
+
}
|
|
37339
|
+
|
|
37340
|
+
return str;
|
|
37341
|
+
};
|
|
37342
|
+
|
|
37343
|
+
var userloggedValues = Digit.SessionStorage.get("citizen.userRequestObject");
|
|
37344
|
+
var teantsArray = [],
|
|
37345
|
+
filteredArray = [];
|
|
37346
|
+
|
|
37347
|
+
if (userRole === "") {
|
|
37348
|
+
var _userloggedValues$inf, _userloggedValues$inf2;
|
|
37349
|
+
|
|
37350
|
+
userloggedValues === null || userloggedValues === void 0 ? void 0 : (_userloggedValues$inf = userloggedValues.info) === null || _userloggedValues$inf === void 0 ? void 0 : (_userloggedValues$inf2 = _userloggedValues$inf.roles) === null || _userloggedValues$inf2 === void 0 ? void 0 : _userloggedValues$inf2.forEach(function (role) {
|
|
37351
|
+
return teantsArray.push(role.tenantId);
|
|
37352
|
+
});
|
|
37353
|
+
var unique = teantsArray.filter(function (item, i, ar) {
|
|
37354
|
+
return ar.indexOf(item) === i;
|
|
37355
|
+
});
|
|
37356
|
+
unique === null || unique === void 0 ? void 0 : unique.forEach(function (uniCode) {
|
|
37357
|
+
var _stringReplaceAll;
|
|
37358
|
+
|
|
37359
|
+
filteredArray.push({
|
|
37360
|
+
i18nKey: "TENANT_TENANTS_" + ((_stringReplaceAll = stringReplaceAll(uniCode, ".", "_")) === null || _stringReplaceAll === void 0 ? void 0 : _stringReplaceAll.toUpperCase()),
|
|
37361
|
+
value: uniCode,
|
|
37362
|
+
code: uniCode,
|
|
37363
|
+
name: uniCode.substring(uniCode.indexOf(".") + 1)
|
|
37364
|
+
});
|
|
37365
|
+
});
|
|
37366
|
+
return filteredArray;
|
|
37367
|
+
} else {
|
|
37368
|
+
var _userloggedValues$inf3, _userloggedValues$inf4;
|
|
37369
|
+
|
|
37370
|
+
userloggedValues === null || userloggedValues === void 0 ? void 0 : (_userloggedValues$inf3 = userloggedValues.info) === null || _userloggedValues$inf3 === void 0 ? void 0 : (_userloggedValues$inf4 = _userloggedValues$inf3.roles) === null || _userloggedValues$inf4 === void 0 ? void 0 : _userloggedValues$inf4.forEach(function (role) {
|
|
37371
|
+
if (userRole === role.code) teantsArray.push(role.tenantId);
|
|
37372
|
+
});
|
|
37373
|
+
|
|
37374
|
+
var _unique = teantsArray.filter(function (item, i, ar) {
|
|
37375
|
+
return ar.indexOf(item) === i;
|
|
37376
|
+
});
|
|
37377
|
+
|
|
37378
|
+
_unique === null || _unique === void 0 ? void 0 : _unique.forEach(function (uniCode) {
|
|
37379
|
+
var _stringReplaceAll2;
|
|
37380
|
+
|
|
37381
|
+
filteredArray.push({
|
|
37382
|
+
i18nKey: "TENANT_TENANTS_" + ((_stringReplaceAll2 = stringReplaceAll(uniCode, ".", "_")) === null || _stringReplaceAll2 === void 0 ? void 0 : _stringReplaceAll2.toUpperCase()),
|
|
37383
|
+
value: uniCode,
|
|
37384
|
+
code: uniCode,
|
|
37385
|
+
name: uniCode.substring(uniCode.indexOf(".") + 1)
|
|
37386
|
+
});
|
|
37387
|
+
});
|
|
37388
|
+
return filteredArray;
|
|
37389
|
+
}
|
|
36804
37390
|
}
|
|
36805
37391
|
};
|
|
36806
37392
|
|
|
@@ -36886,7 +37472,9 @@ var useWorkflowDetails = function useWorkflowDetails(_ref) {
|
|
|
36886
37472
|
_ref$role = _ref.role,
|
|
36887
37473
|
role = _ref$role === void 0 ? "CITIZEN" : _ref$role,
|
|
36888
37474
|
getStaleData = _ref.getStaleData,
|
|
36889
|
-
config = _ref.config
|
|
37475
|
+
config = _ref.config,
|
|
37476
|
+
_ref$getTripData = _ref.getTripData,
|
|
37477
|
+
getTripData = _ref$getTripData === void 0 ? false : _ref$getTripData;
|
|
36890
37478
|
var queryClient = reactQuery.useQueryClient();
|
|
36891
37479
|
var staleDataConfig = {
|
|
36892
37480
|
staleTime: Infinity
|
|
@@ -36897,7 +37485,8 @@ var useWorkflowDetails = function useWorkflowDetails(_ref) {
|
|
|
36897
37485
|
tenantId: tenantId,
|
|
36898
37486
|
id: id,
|
|
36899
37487
|
moduleCode: moduleCode,
|
|
36900
|
-
role: role
|
|
37488
|
+
role: role,
|
|
37489
|
+
getTripData: getTripData
|
|
36901
37490
|
});
|
|
36902
37491
|
}, getStaleData ? _extends({}, staleDataConfig, config) : config),
|
|
36903
37492
|
isLoading = _useQuery.isLoading,
|
|
@@ -36939,9 +37528,7 @@ var useSessionStorage = function useSessionStorage(key, initialValue) {
|
|
|
36939
37528
|
var valueToStore = value instanceof Function ? value(storedValue) : value;
|
|
36940
37529
|
setStoredValue(valueToStore);
|
|
36941
37530
|
Digit.SessionStorage.set(key, valueToStore);
|
|
36942
|
-
} catch (err) {
|
|
36943
|
-
console.error(err);
|
|
36944
|
-
}
|
|
37531
|
+
} catch (err) {}
|
|
36945
37532
|
};
|
|
36946
37533
|
|
|
36947
37534
|
var clearValue = function clearValue() {
|
|
@@ -36962,16 +37549,20 @@ var useQueryParams = function useQueryParams() {
|
|
|
36962
37549
|
return params;
|
|
36963
37550
|
};
|
|
36964
37551
|
|
|
36965
|
-
var useOnClickOutside = function useOnClickOutside(ref, handler, isActive) {
|
|
37552
|
+
var useOnClickOutside = function useOnClickOutside(ref, handler, isActive, eventParam) {
|
|
37553
|
+
if (eventParam === void 0) {
|
|
37554
|
+
eventParam = false;
|
|
37555
|
+
}
|
|
37556
|
+
|
|
36966
37557
|
React.useEffect(function () {
|
|
36967
37558
|
if (isActive) {
|
|
36968
|
-
document.addEventListener("click", handleClickOutSide,
|
|
37559
|
+
document.addEventListener("click", handleClickOutSide, eventParam);
|
|
36969
37560
|
} else {
|
|
36970
|
-
document.removeEventListener("click", handleClickOutSide,
|
|
37561
|
+
document.removeEventListener("click", handleClickOutSide, eventParam);
|
|
36971
37562
|
}
|
|
36972
37563
|
|
|
36973
37564
|
return function () {
|
|
36974
|
-
document.removeEventListener("click", handleClickOutSide,
|
|
37565
|
+
document.removeEventListener("click", handleClickOutSide, eventParam);
|
|
36975
37566
|
};
|
|
36976
37567
|
}, [isActive]);
|
|
36977
37568
|
|
|
@@ -37057,7 +37648,6 @@ var useFetchBillsForBuissnessService = function useFetchBillsForBuissnessService
|
|
|
37057
37648
|
return Digit.PaymentService.fetchBill(_tenantId, params);
|
|
37058
37649
|
}, _extends({
|
|
37059
37650
|
retry: function retry(count, err) {
|
|
37060
|
-
console.error(err, "inside the payment hook");
|
|
37061
37651
|
return false;
|
|
37062
37652
|
}
|
|
37063
37653
|
}, config)),
|
|
@@ -37086,10 +37676,56 @@ var useFetchPayment = function useFetchPayment(_ref4, config) {
|
|
|
37086
37676
|
|
|
37087
37677
|
var fetchBill = function fetchBill() {
|
|
37088
37678
|
try {
|
|
37089
|
-
|
|
37090
|
-
|
|
37091
|
-
|
|
37092
|
-
|
|
37679
|
+
if (businessService !== null && businessService !== void 0 && businessService.includes("PT")) {
|
|
37680
|
+
return Promise.resolve(Digit.PaymentService.fetchBill(tenantId, {
|
|
37681
|
+
consumerCode: consumerCode,
|
|
37682
|
+
businessService: businessService
|
|
37683
|
+
})).then(function (fetchedBill) {
|
|
37684
|
+
var _fetchedBill$Bill, _fetchedBill$Bill$, _fetchedBill$Bill$$bi, _fetchedBill$Bill$$bi2, _fetchedBill$Bill3, _fetchedBill$Bill3$, _fetchedBill$Bill3$$b;
|
|
37685
|
+
|
|
37686
|
+
var billdetail = (fetchedBill === null || fetchedBill === void 0 ? void 0 : (_fetchedBill$Bill = fetchedBill.Bill) === null || _fetchedBill$Bill === void 0 ? void 0 : (_fetchedBill$Bill$ = _fetchedBill$Bill[0]) === null || _fetchedBill$Bill$ === void 0 ? void 0 : (_fetchedBill$Bill$$bi = _fetchedBill$Bill$.billDetails) === null || _fetchedBill$Bill$$bi === void 0 ? void 0 : (_fetchedBill$Bill$$bi2 = _fetchedBill$Bill$$bi.sort(function (a, b) {
|
|
37687
|
+
return b.fromPeriod - a.fromPeriod;
|
|
37688
|
+
})) === null || _fetchedBill$Bill$$bi2 === void 0 ? void 0 : _fetchedBill$Bill$$bi2[0]) || {};
|
|
37689
|
+
fetchedBill.Bill[0].billDetails = fetchedBill.Bill[0].billDetails.map(function (ele) {
|
|
37690
|
+
var _fetchedBill$Bill2, _fetchedBill$Bill2$;
|
|
37691
|
+
|
|
37692
|
+
return _extends({}, ele, {
|
|
37693
|
+
currentBillNo: fetchedBill === null || fetchedBill === void 0 ? void 0 : (_fetchedBill$Bill2 = fetchedBill.Bill) === null || _fetchedBill$Bill2 === void 0 ? void 0 : (_fetchedBill$Bill2$ = _fetchedBill$Bill2[0]) === null || _fetchedBill$Bill2$ === void 0 ? void 0 : _fetchedBill$Bill2$.billNumber,
|
|
37694
|
+
currentExpiryDate: billdetail === null || billdetail === void 0 ? void 0 : billdetail.expiryDate
|
|
37695
|
+
});
|
|
37696
|
+
});
|
|
37697
|
+
|
|
37698
|
+
if (fetchedBill && (fetchedBill === null || fetchedBill === void 0 ? void 0 : (_fetchedBill$Bill3 = fetchedBill.Bill) === null || _fetchedBill$Bill3 === void 0 ? void 0 : (_fetchedBill$Bill3$ = _fetchedBill$Bill3[0]) === null || _fetchedBill$Bill3$ === void 0 ? void 0 : (_fetchedBill$Bill3$$b = _fetchedBill$Bill3$.billDetails) === null || _fetchedBill$Bill3$$b === void 0 ? void 0 : _fetchedBill$Bill3$$b.length) > 1) {
|
|
37699
|
+
var _fetchedBill$Bill4, _fetchedBill$Bill4$, _fetchedBill$Bill4$$b;
|
|
37700
|
+
|
|
37701
|
+
fetchedBill === null || fetchedBill === void 0 ? void 0 : (_fetchedBill$Bill4 = fetchedBill.Bill) === null || _fetchedBill$Bill4 === void 0 ? void 0 : (_fetchedBill$Bill4$ = _fetchedBill$Bill4[0]) === null || _fetchedBill$Bill4$ === void 0 ? void 0 : (_fetchedBill$Bill4$$b = _fetchedBill$Bill4$.billDetails) === null || _fetchedBill$Bill4$$b === void 0 ? void 0 : _fetchedBill$Bill4$$b.map(function (billdet) {
|
|
37702
|
+
try {
|
|
37703
|
+
return Promise.resolve(Digit.PaymentService.searchBill(tenantId, {
|
|
37704
|
+
consumerCode: consumerCode,
|
|
37705
|
+
fromPeriod: billdet === null || billdet === void 0 ? void 0 : billdet.fromPeriod,
|
|
37706
|
+
toPeriod: billdet === null || billdet === void 0 ? void 0 : billdet.toPeriod,
|
|
37707
|
+
service: businessService,
|
|
37708
|
+
retrieveOldest: true
|
|
37709
|
+
})).then(function (searchBill) {
|
|
37710
|
+
var _searchBill$Bill, _searchBill$Bill$, _searchBill$Bill$$bil, _searchBill$Bill$$bil2, _searchBill$Bill2, _searchBill$Bill2$;
|
|
37711
|
+
|
|
37712
|
+
billdet.expiryDate = searchBill === null || searchBill === void 0 ? void 0 : (_searchBill$Bill = searchBill.Bill) === null || _searchBill$Bill === void 0 ? void 0 : (_searchBill$Bill$ = _searchBill$Bill[0]) === null || _searchBill$Bill$ === void 0 ? void 0 : (_searchBill$Bill$$bil = _searchBill$Bill$.billDetails) === null || _searchBill$Bill$$bil === void 0 ? void 0 : (_searchBill$Bill$$bil2 = _searchBill$Bill$$bil[0]) === null || _searchBill$Bill$$bil2 === void 0 ? void 0 : _searchBill$Bill$$bil2.expiryDate;
|
|
37713
|
+
billdet.billNumber = searchBill === null || searchBill === void 0 ? void 0 : (_searchBill$Bill2 = searchBill.Bill) === null || _searchBill$Bill2 === void 0 ? void 0 : (_searchBill$Bill2$ = _searchBill$Bill2[0]) === null || _searchBill$Bill2$ === void 0 ? void 0 : _searchBill$Bill2$.billNumber;
|
|
37714
|
+
});
|
|
37715
|
+
} catch (e) {
|
|
37716
|
+
return Promise.reject(e);
|
|
37717
|
+
}
|
|
37718
|
+
});
|
|
37719
|
+
}
|
|
37720
|
+
|
|
37721
|
+
return fetchedBill;
|
|
37722
|
+
});
|
|
37723
|
+
} else {
|
|
37724
|
+
return Promise.resolve(Digit.PaymentService.fetchBill(tenantId, {
|
|
37725
|
+
consumerCode: consumerCode,
|
|
37726
|
+
businessService: businessService
|
|
37727
|
+
}));
|
|
37728
|
+
}
|
|
37093
37729
|
} catch (e) {
|
|
37094
37730
|
return Promise.reject(e);
|
|
37095
37731
|
}
|
|
@@ -37279,6 +37915,20 @@ var refObj = function refObj(tenantId, filters) {
|
|
|
37279
37915
|
key: "consumerCode",
|
|
37280
37916
|
label: "UC_CHALLAN_NO"
|
|
37281
37917
|
},
|
|
37918
|
+
ws: {
|
|
37919
|
+
searchFn: function searchFn() {
|
|
37920
|
+
return advtApplications(tenantId, filters);
|
|
37921
|
+
},
|
|
37922
|
+
key: "consumerCode",
|
|
37923
|
+
label: "WS_MYCONNECTIONS_CONSUMER_NO"
|
|
37924
|
+
},
|
|
37925
|
+
sw: {
|
|
37926
|
+
searchFn: function searchFn() {
|
|
37927
|
+
return advtApplications(tenantId, filters);
|
|
37928
|
+
},
|
|
37929
|
+
key: "consumerCode",
|
|
37930
|
+
label: "WS_MYCONNECTIONS_CONSUMER_NO"
|
|
37931
|
+
},
|
|
37282
37932
|
TL: {
|
|
37283
37933
|
searchFn: function searchFn() {
|
|
37284
37934
|
return tlApplications(tenantId, filters);
|
|
@@ -37739,12 +38389,11 @@ var defaultRawSearchHandler = function defaultRawSearchHandler(_ref2, searchKey,
|
|
|
37739
38389
|
};
|
|
37740
38390
|
|
|
37741
38391
|
var defaultCatchSearch = function defaultCatchSearch(Err) {
|
|
37742
|
-
var _Err$response, _Err$response$data, _Err$response$data$Er
|
|
38392
|
+
var _Err$response, _Err$response$data, _Err$response$data$Er;
|
|
37743
38393
|
|
|
37744
38394
|
if (Err !== null && Err !== void 0 && (_Err$response = Err.response) !== null && _Err$response !== void 0 && (_Err$response$data = _Err$response.data) !== null && _Err$response$data !== void 0 && (_Err$response$data$Er = _Err$response$data.Errors) !== null && _Err$response$data$Er !== void 0 && _Err$response$data$Er.some(function (e) {
|
|
37745
38395
|
return e.code === "EG_PT_INVALID_SEARCH" && e.message === " Search is not allowed on empty Criteria, Atleast one criteria should be provided with tenantId for EMPLOYEE";
|
|
37746
38396
|
})) return [];
|
|
37747
|
-
console.error(Err === null || Err === void 0 ? void 0 : (_Err$response2 = Err.response) === null || _Err$response2 === void 0 ? void 0 : _Err$response2.data, " this is error");
|
|
37748
38397
|
throw Err;
|
|
37749
38398
|
};
|
|
37750
38399
|
|
|
@@ -37976,11 +38625,13 @@ var useModuleTenants = function useModuleTenants(module, config) {
|
|
|
37976
38625
|
ddr: data.modules.find(function (e) {
|
|
37977
38626
|
return e.module === module;
|
|
37978
38627
|
}).tenants.map(function (tenant) {
|
|
38628
|
+
var _tenant$code, _tenant$code$toUpperC, _tenant$code$toUpperC2, _data$tenants$filter, _data$tenants$filter$, _data$tenants$filter$2, _data$tenants$filter$3;
|
|
38629
|
+
|
|
37979
38630
|
return _extends({}, tenant, {
|
|
37980
|
-
ulbKey: t("TENANT_TENANTS_" + tenant.code.toUpperCase().replace(".", "_")),
|
|
37981
|
-
ddrKey: t("DDR_" + data.tenants.filter(function (t) {
|
|
38631
|
+
ulbKey: t("TENANT_TENANTS_" + (tenant === null || tenant === void 0 ? void 0 : (_tenant$code = tenant.code) === null || _tenant$code === void 0 ? void 0 : (_tenant$code$toUpperC = _tenant$code.toUpperCase) === null || _tenant$code$toUpperC === void 0 ? void 0 : (_tenant$code$toUpperC2 = _tenant$code$toUpperC.call(_tenant$code)) === null || _tenant$code$toUpperC2 === void 0 ? void 0 : _tenant$code$toUpperC2.replace(".", "_"))),
|
|
38632
|
+
ddrKey: t("DDR_" + ((_data$tenants$filter = data.tenants.filter(function (t) {
|
|
37982
38633
|
return t.code === tenant.code;
|
|
37983
|
-
})[0].city
|
|
38634
|
+
})) === null || _data$tenants$filter === void 0 ? void 0 : (_data$tenants$filter$ = _data$tenants$filter[0].city) === null || _data$tenants$filter$ === void 0 ? void 0 : (_data$tenants$filter$2 = _data$tenants$filter$.districtTenantCode) === null || _data$tenants$filter$2 === void 0 ? void 0 : (_data$tenants$filter$3 = _data$tenants$filter$2.toUpperCase) === null || _data$tenants$filter$3 === void 0 ? void 0 : _data$tenants$filter$3.call(_data$tenants$filter$2).replace(".", "_")))
|
|
37984
38635
|
});
|
|
37985
38636
|
}).filter(function (item, i, arr) {
|
|
37986
38637
|
return i === arr.findIndex(function (t) {
|
|
@@ -37990,11 +38641,13 @@ var useModuleTenants = function useModuleTenants(module, config) {
|
|
|
37990
38641
|
ulb: data.modules.find(function (e) {
|
|
37991
38642
|
return e.module === module;
|
|
37992
38643
|
}).tenants.map(function (tenant) {
|
|
38644
|
+
var _tenant$code2, _tenant$code2$toUpper, _tenant$code2$toUpper2, _data$tenants$filter2, _data$tenants$filter3, _data$tenants$filter4, _data$tenants$filter5;
|
|
38645
|
+
|
|
37993
38646
|
return _extends({}, tenant, {
|
|
37994
|
-
ulbKey: t("TENANT_TENANTS_" + tenant.code.toUpperCase().replace(".", "_")),
|
|
37995
|
-
ddrKey: t("DDR_" + data.tenants.filter(function (t) {
|
|
38647
|
+
ulbKey: t("TENANT_TENANTS_" + (tenant === null || tenant === void 0 ? void 0 : (_tenant$code2 = tenant.code) === null || _tenant$code2 === void 0 ? void 0 : (_tenant$code2$toUpper = _tenant$code2.toUpperCase) === null || _tenant$code2$toUpper === void 0 ? void 0 : (_tenant$code2$toUpper2 = _tenant$code2$toUpper.call(_tenant$code2)) === null || _tenant$code2$toUpper2 === void 0 ? void 0 : _tenant$code2$toUpper2.replace(".", "_"))),
|
|
38648
|
+
ddrKey: t("DDR_" + ((_data$tenants$filter2 = data.tenants.filter(function (t) {
|
|
37996
38649
|
return t.code === tenant.code;
|
|
37997
|
-
})[0].city.districtTenantCode.toUpperCase().replace(".", "_"))
|
|
38650
|
+
})) === null || _data$tenants$filter2 === void 0 ? void 0 : (_data$tenants$filter3 = _data$tenants$filter2[0].city) === null || _data$tenants$filter3 === void 0 ? void 0 : (_data$tenants$filter4 = _data$tenants$filter3.districtTenantCode) === null || _data$tenants$filter4 === void 0 ? void 0 : (_data$tenants$filter5 = _data$tenants$filter4.toUpperCase) === null || _data$tenants$filter5 === void 0 ? void 0 : _data$tenants$filter5.call(_data$tenants$filter4).replace(".", "_")))
|
|
37998
38651
|
});
|
|
37999
38652
|
})
|
|
38000
38653
|
};
|
|
@@ -38102,7 +38755,10 @@ var fetchImageLinksFromFilestoreIds = function fetchImageLinksFromFilestoreIds(f
|
|
|
38102
38755
|
};
|
|
38103
38756
|
|
|
38104
38757
|
var getTransformedLocale = function getTransformedLocale(label) {
|
|
38758
|
+
var _label;
|
|
38759
|
+
|
|
38105
38760
|
if (typeof label === "number") return label;
|
|
38761
|
+
label = (_label = label) === null || _label === void 0 ? void 0 : _label.trim();
|
|
38106
38762
|
return label && label.toUpperCase().replace(/[.:-\s\/]/g, "_");
|
|
38107
38763
|
};
|
|
38108
38764
|
|
|
@@ -38584,7 +39240,6 @@ var fetchComplaintDetails = function fetchComplaintDetails(tenantId, id) {
|
|
|
38584
39240
|
}) : null;
|
|
38585
39241
|
return ids ? Promise.resolve(getThumbnails$1(ids, service.tenantId)).then(_temp2) : _temp2(null);
|
|
38586
39242
|
} else {
|
|
38587
|
-
console.error("error fetching complaint details or service defs");
|
|
38588
39243
|
return {};
|
|
38589
39244
|
}
|
|
38590
39245
|
});
|
|
@@ -39045,18 +39700,18 @@ var useApplicationStatus = function useApplicationStatus(select, isEnabled, stat
|
|
|
39045
39700
|
var userRoles = userInfo.info.roles.map(function (roleData) {
|
|
39046
39701
|
return roleData.code;
|
|
39047
39702
|
});
|
|
39048
|
-
var workflowOrder = ["CREATED", "PENDING_APPL_FEE_PAYMENT", "ASSING_DSO", "PENDING_DSO_APPROVAL", "DSO_REJECTED", "DSO_INPROGRESS", "REJECTED", "CANCELED", "COMPLETED", "CITIZEN_FEEDBACK_PENDING"];
|
|
39703
|
+
var workflowOrder = ["CREATED", "PENDING_APPL_FEE_PAYMENT", "ASSING_DSO", "PENDING_DSO_APPROVAL", "DSO_REJECTED", "DSO_INPROGRESS", "REJECTED", "CANCELED", "COMPLETED", "CITIZEN_FEEDBACK_PENDING", "DISPOSAL_IN_PROGRESS"];
|
|
39049
39704
|
var DSO = Digit.UserService.hasAccess(["FSM_DSO"]);
|
|
39050
39705
|
var allowedStatusForDSO = ["PENDING_DSO_APPROVAL", "DSO_INPROGRESS", "COMPLETED", "DSO_REJECTED"];
|
|
39051
39706
|
var tenantId = Digit.ULBService.getCurrentTenantId();
|
|
39052
39707
|
|
|
39053
39708
|
var fetch = function fetch() {
|
|
39054
39709
|
try {
|
|
39055
|
-
return Promise.resolve(Digit.WorkflowService.init(tenantId, "FSM")).then(function (WorkflowService) {
|
|
39710
|
+
return Promise.resolve(Digit.WorkflowService.init(tenantId, "FSM,FSM_POST_PAY_SERVICE")).then(function (WorkflowService) {
|
|
39056
39711
|
return workflowOrder.map(function (status) {
|
|
39057
|
-
var
|
|
39712
|
+
var _getStates;
|
|
39058
39713
|
|
|
39059
|
-
return (
|
|
39714
|
+
return (_getStates = getStates(WorkflowService.BusinessServices)) === null || _getStates === void 0 ? void 0 : _getStates.filter(function (workflowDetails) {
|
|
39060
39715
|
return status === (workflowDetails === null || workflowDetails === void 0 ? void 0 : workflowDetails.state);
|
|
39061
39716
|
})[0];
|
|
39062
39717
|
});
|
|
@@ -39066,6 +39721,14 @@ var useApplicationStatus = function useApplicationStatus(select, isEnabled, stat
|
|
|
39066
39721
|
}
|
|
39067
39722
|
};
|
|
39068
39723
|
|
|
39724
|
+
var getStates = function getStates(businessServices) {
|
|
39725
|
+
var states = [];
|
|
39726
|
+
businessServices.map(function (data) {
|
|
39727
|
+
states = states.concat(data.states);
|
|
39728
|
+
});
|
|
39729
|
+
return states;
|
|
39730
|
+
};
|
|
39731
|
+
|
|
39069
39732
|
var roleWiseSelect = function roleWiseSelect(WorkflowService) {
|
|
39070
39733
|
var response = WorkflowService.filter(function (state) {
|
|
39071
39734
|
return state.applicationStatus;
|
|
@@ -39089,9 +39752,9 @@ var useApplicationStatus = function useApplicationStatus(select, isEnabled, stat
|
|
|
39089
39752
|
return {
|
|
39090
39753
|
name: t("CS_COMMON_FSM_" + state.applicationStatus),
|
|
39091
39754
|
code: state.applicationStatus,
|
|
39092
|
-
id: (_statusMap = statusMap) === null || _statusMap === void 0 ? void 0 : (_statusMap$filter = _statusMap.filter(function (e) {
|
|
39755
|
+
id: ((_statusMap = statusMap) === null || _statusMap === void 0 ? void 0 : (_statusMap$filter = _statusMap.filter(function (e) {
|
|
39093
39756
|
return e.applicationstatus === state.applicationStatus;
|
|
39094
|
-
})) === null || _statusMap$filter === void 0 ? void 0 : (_statusMap$filter$ = _statusMap$filter[0]) === null || _statusMap$filter$ === void 0 ? void 0 : _statusMap$filter$.statusid,
|
|
39757
|
+
})) === null || _statusMap$filter === void 0 ? void 0 : (_statusMap$filter$ = _statusMap$filter[0]) === null || _statusMap$filter$ === void 0 ? void 0 : _statusMap$filter$.statusid) || state.uuid,
|
|
39095
39758
|
roles: roles
|
|
39096
39759
|
};
|
|
39097
39760
|
});
|
|
@@ -39110,9 +39773,9 @@ var useApplicationStatus = function useApplicationStatus(select, isEnabled, stat
|
|
|
39110
39773
|
return {
|
|
39111
39774
|
name: t("CS_COMMON_FSM_" + state.applicationStatus),
|
|
39112
39775
|
code: state.applicationStatus,
|
|
39113
|
-
id: (_statusMap2 = statusMap) === null || _statusMap2 === void 0 ? void 0 : (_statusMap2$filter = _statusMap2.filter(function (e) {
|
|
39776
|
+
id: ((_statusMap2 = statusMap) === null || _statusMap2 === void 0 ? void 0 : (_statusMap2$filter = _statusMap2.filter(function (e) {
|
|
39114
39777
|
return e.applicationstatus === state.applicationStatus;
|
|
39115
|
-
})) === null || _statusMap2$filter === void 0 ? void 0 : (_statusMap2$filter$ = _statusMap2$filter[0]) === null || _statusMap2$filter$ === void 0 ? void 0 : _statusMap2$filter$.statusid,
|
|
39778
|
+
})) === null || _statusMap2$filter === void 0 ? void 0 : (_statusMap2$filter$ = _statusMap2$filter[0]) === null || _statusMap2$filter$ === void 0 ? void 0 : _statusMap2$filter$.statusid) || state.uuid,
|
|
39116
39779
|
roles: roles
|
|
39117
39780
|
};
|
|
39118
39781
|
});
|
|
@@ -39243,6 +39906,30 @@ var useMDMS$1 = function useMDMS(tenantId, moduleCode, type, config, payload) {
|
|
|
39243
39906
|
});
|
|
39244
39907
|
};
|
|
39245
39908
|
|
|
39909
|
+
var useGenderDetails = function useGenderDetails() {
|
|
39910
|
+
return reactQuery.useQuery("FSM_GENDER_DETAILS", function () {
|
|
39911
|
+
return MdmsService.getFSMGenderType(tenantId, moduleCode, type);
|
|
39912
|
+
}, config);
|
|
39913
|
+
};
|
|
39914
|
+
|
|
39915
|
+
var useFSTPORejectionReason = function useFSTPORejectionReason() {
|
|
39916
|
+
return reactQuery.useQuery("FSM_FSTPO_REJECTION", function () {
|
|
39917
|
+
return MdmsService.getFSTPORejectionReason(tenantId, moduleCode, type);
|
|
39918
|
+
}, queryConfig);
|
|
39919
|
+
};
|
|
39920
|
+
|
|
39921
|
+
var usePaymentType = function usePaymentType() {
|
|
39922
|
+
return reactQuery.useQuery("FSM_PAYMENT_TYPE", function () {
|
|
39923
|
+
return MdmsService.getFSMPaymentType(tenantId, moduleCode, type);
|
|
39924
|
+
}, queryConfig);
|
|
39925
|
+
};
|
|
39926
|
+
|
|
39927
|
+
var useTripNumber = function useTripNumber() {
|
|
39928
|
+
return reactQuery.useQuery("FSM_TRIP_NUMBER", function () {
|
|
39929
|
+
return MdmsService.getFSMTripNumber(tenantId, moduleCode, type);
|
|
39930
|
+
}, queryConfig);
|
|
39931
|
+
};
|
|
39932
|
+
|
|
39246
39933
|
switch (type) {
|
|
39247
39934
|
case "SanitationType":
|
|
39248
39935
|
return useSanitationType();
|
|
@@ -39285,6 +39972,21 @@ var useMDMS$1 = function useMDMS(tenantId, moduleCode, type, config, payload) {
|
|
|
39285
39972
|
|
|
39286
39973
|
case "PostFieldsConfig":
|
|
39287
39974
|
return usePostFieldsConfig();
|
|
39975
|
+
|
|
39976
|
+
case "FSMGenderType":
|
|
39977
|
+
return useGenderDetails();
|
|
39978
|
+
|
|
39979
|
+
case "FSTPORejectionReason":
|
|
39980
|
+
return useFSTPORejectionReason();
|
|
39981
|
+
|
|
39982
|
+
case "PaymentType":
|
|
39983
|
+
return usePaymentType();
|
|
39984
|
+
|
|
39985
|
+
case "TripNumber":
|
|
39986
|
+
return useTripNumber();
|
|
39987
|
+
|
|
39988
|
+
default:
|
|
39989
|
+
return null;
|
|
39288
39990
|
}
|
|
39289
39991
|
};
|
|
39290
39992
|
|
|
@@ -39437,6 +40139,9 @@ var Search = {
|
|
|
39437
40139
|
}, {
|
|
39438
40140
|
title: "ES_APPLICATION_DETAILS_APPLICANT_MOBILE_NO",
|
|
39439
40141
|
value: response === null || response === void 0 ? void 0 : (_response$citizen2 = response.citizen) === null || _response$citizen2 === void 0 ? void 0 : _response$citizen2.mobileNumber
|
|
40142
|
+
}, {
|
|
40143
|
+
title: "ES_FSM_PAYMENT_PREFERENCE",
|
|
40144
|
+
value: "ES_ACTION_" + (response === null || response === void 0 ? void 0 : response.paymentPreference)
|
|
39440
40145
|
}]
|
|
39441
40146
|
}, {
|
|
39442
40147
|
title: "ES_APPLICATION_DETAILS_PROPERTY_DETAILS",
|
|
@@ -39508,20 +40213,31 @@ var Search = {
|
|
|
39508
40213
|
values: [{
|
|
39509
40214
|
title: "ES_APPLICATION_DETAILS_ASSIGNED_DSO",
|
|
39510
40215
|
value: ((_dsoDetails = dsoDetails) === null || _dsoDetails === void 0 ? void 0 : _dsoDetails.displayName) || "N/A"
|
|
39511
|
-
}, {
|
|
39512
|
-
title: "ES_APPLICATION_DETAILS_VEHICLE_MAKE",
|
|
39513
|
-
value: vehicleMake || "N/A"
|
|
39514
40216
|
}, {
|
|
39515
40217
|
title: "ES_APPLICATION_DETAILS_VEHICLE_NO",
|
|
39516
40218
|
value: ((_vehicle2 = vehicle) === null || _vehicle2 === void 0 ? void 0 : _vehicle2.registrationNumber) || "N/A"
|
|
39517
40219
|
}, {
|
|
39518
40220
|
title: "ES_APPLICATION_DETAILS_VEHICLE_CAPACITY",
|
|
39519
|
-
value: vehicleCapacity || "N/A"
|
|
40221
|
+
value: (response === null || response === void 0 ? void 0 : response.vehicleCapacity) || "N/A"
|
|
39520
40222
|
}, {
|
|
39521
40223
|
title: "ES_APPLICATION_DETAILS_POSSIBLE_SERVICE_DATE",
|
|
39522
40224
|
value: displayServiceDate(response === null || response === void 0 ? void 0 : response.possibleServiceDate) || "N/A"
|
|
39523
40225
|
}]
|
|
39524
40226
|
}];
|
|
40227
|
+
|
|
40228
|
+
if (userType !== "CITIZEN" && userType !== "DSO") {
|
|
40229
|
+
employeeResponse.map(function (data) {
|
|
40230
|
+
if (data.title === "ES_TITLE_APPLICANT_DETAILS" || data.title === "Applicant Details") {
|
|
40231
|
+
var _response$citizen3;
|
|
40232
|
+
|
|
40233
|
+
data.values.push({
|
|
40234
|
+
title: "COMMON_APPLICANT_GENDER",
|
|
40235
|
+
value: response === null || response === void 0 ? void 0 : (_response$citizen3 = response.citizen) === null || _response$citizen3 === void 0 ? void 0 : _response$citizen3.gender
|
|
40236
|
+
});
|
|
40237
|
+
}
|
|
40238
|
+
});
|
|
40239
|
+
}
|
|
40240
|
+
|
|
39525
40241
|
if (userType !== "CITIZEN") return {
|
|
39526
40242
|
tenantId: response.tenantId,
|
|
39527
40243
|
applicationDetails: employeeResponse,
|
|
@@ -39551,6 +40267,7 @@ var Search = {
|
|
|
39551
40267
|
});
|
|
39552
40268
|
}
|
|
39553
40269
|
|
|
40270
|
+
var paymentPreference = response === null || response === void 0 ? void 0 : response.paymentPreference;
|
|
39554
40271
|
var slumLabel = "";
|
|
39555
40272
|
|
|
39556
40273
|
var _temp = function () {
|
|
@@ -39691,9 +40408,9 @@ var useSearchAll = function useSearchAll(tenantId, filters, queryFn, config) {
|
|
|
39691
40408
|
var defaultSelect = function defaultSelect(data) {
|
|
39692
40409
|
return {
|
|
39693
40410
|
data: {
|
|
39694
|
-
table: data.fsm
|
|
40411
|
+
table: data.fsm ? data.fsm : [data]
|
|
39695
40412
|
},
|
|
39696
|
-
totalCount: data.totalCount
|
|
40413
|
+
totalCount: data.totalCount ? data.totalCount : 1
|
|
39697
40414
|
};
|
|
39698
40415
|
};
|
|
39699
40416
|
|
|
@@ -39741,12 +40458,12 @@ var useFSMInbox = function useFSMInbox(tenantId, filters, config, overRideUUID)
|
|
|
39741
40458
|
var _filters = {
|
|
39742
40459
|
tenantId: tenantId,
|
|
39743
40460
|
processSearchCriteria: _extends({
|
|
39744
|
-
businessService: ["FSM"]
|
|
40461
|
+
businessService: ["FSM", "FSM_POST_PAY_SERVICE"]
|
|
39745
40462
|
}, (filters === null || filters === void 0 ? void 0 : (_filters$applicationS = filters.applicationStatus) === null || _filters$applicationS === void 0 ? void 0 : _filters$applicationS.length) > 0 ? {
|
|
39746
|
-
status: filters.applicationStatus
|
|
39747
|
-
|
|
39748
|
-
|
|
39749
|
-
}
|
|
40463
|
+
status: getIds(filters.applicationStatus)
|
|
40464
|
+
} : {}, {
|
|
40465
|
+
moduleName: "fsm"
|
|
40466
|
+
}),
|
|
39750
40467
|
moduleSearchCriteria: _extends({}, mobileNumber ? {
|
|
39751
40468
|
mobileNumber: mobileNumber
|
|
39752
40469
|
} : {}, applicationNos ? {
|
|
@@ -39768,30 +40485,10 @@ var useFSMInbox = function useFSMInbox(tenantId, filters, config, overRideUUID)
|
|
|
39768
40485
|
filters: _filters,
|
|
39769
40486
|
config: _extends({
|
|
39770
40487
|
select: function select(data) {
|
|
39771
|
-
var _data$items;
|
|
39772
|
-
|
|
39773
40488
|
return {
|
|
39774
40489
|
totalCount: data.totalCount,
|
|
39775
40490
|
statuses: data.statusMap,
|
|
39776
|
-
table:
|
|
39777
|
-
var _application$ProcessI, _application$ProcessI2, _application$ProcessI3, _application$ProcessI4, _application$ProcessI5, _application$ProcessI6;
|
|
39778
|
-
|
|
39779
|
-
return {
|
|
39780
|
-
tenantId: application.businessObject.tenantId,
|
|
39781
|
-
totalCount: application.businessObject.totalCount,
|
|
39782
|
-
applicationNo: application.businessObject.applicationNo,
|
|
39783
|
-
createdTime: new Date(application.businessObject.auditDetails.createdTime),
|
|
39784
|
-
locality: application.businessObject.address.locality.code,
|
|
39785
|
-
status: application.businessObject.applicationStatus,
|
|
39786
|
-
citizen: {
|
|
39787
|
-
name: (_application$ProcessI = application.ProcessInstance) === null || _application$ProcessI === void 0 ? void 0 : (_application$ProcessI2 = _application$ProcessI.assigner) === null || _application$ProcessI2 === void 0 ? void 0 : _application$ProcessI2.name,
|
|
39788
|
-
mobileNumber: (_application$ProcessI3 = application.ProcessInstance) === null || _application$ProcessI3 === void 0 ? void 0 : (_application$ProcessI4 = _application$ProcessI3.assigner) === null || _application$ProcessI4 === void 0 ? void 0 : _application$ProcessI4.mobileNumber
|
|
39789
|
-
},
|
|
39790
|
-
propertyUsage: application.businessObject.propertyUsage,
|
|
39791
|
-
sla: Math.round(((_application$ProcessI5 = application.ProcessInstance) === null || _application$ProcessI5 === void 0 ? void 0 : _application$ProcessI5.businesssServiceSla) / (24 * 60 * 60 * 1000)) || "-",
|
|
39792
|
-
mathsla: (_application$ProcessI6 = application.ProcessInstance) === null || _application$ProcessI6 === void 0 ? void 0 : _application$ProcessI6.businesssServiceSla
|
|
39793
|
-
};
|
|
39794
|
-
})
|
|
40491
|
+
table: tableData(data)
|
|
39795
40492
|
};
|
|
39796
40493
|
}
|
|
39797
40494
|
}, config)
|
|
@@ -39811,6 +40508,43 @@ var useFSMInbox = function useFSMInbox(tenantId, filters, config, overRideUUID)
|
|
|
39811
40508
|
return _extends({}, appList);
|
|
39812
40509
|
};
|
|
39813
40510
|
|
|
40511
|
+
var getIds = function getIds(status) {
|
|
40512
|
+
var ids = [];
|
|
40513
|
+
status === null || status === void 0 ? void 0 : status.map(function (data) {
|
|
40514
|
+
var temp = data.id.split(',');
|
|
40515
|
+
ids.push.apply(ids, temp);
|
|
40516
|
+
});
|
|
40517
|
+
return ids;
|
|
40518
|
+
};
|
|
40519
|
+
|
|
40520
|
+
var tableData = function tableData(data) {
|
|
40521
|
+
var result = [];
|
|
40522
|
+
|
|
40523
|
+
if (data && data.items && data.items.length) {
|
|
40524
|
+
data.items.map(function (application) {
|
|
40525
|
+
var _application$business, _application$business2, _application$business3, _application$business4, _application$business5, _application$business6, _application$business7, _application$business8, _application$business9, _application$ProcessI, _application$ProcessI2, _application$ProcessI3, _application$ProcessI4, _application$business10, _application$ProcessI5, _application$ProcessI6;
|
|
40526
|
+
|
|
40527
|
+
result.push({
|
|
40528
|
+
tenantId: (application === null || application === void 0 ? void 0 : (_application$business = application.businessObject) === null || _application$business === void 0 ? void 0 : _application$business.tenantId) || '',
|
|
40529
|
+
totalCount: (application === null || application === void 0 ? void 0 : (_application$business2 = application.businessObject) === null || _application$business2 === void 0 ? void 0 : _application$business2.totalCount) || '',
|
|
40530
|
+
applicationNo: (application === null || application === void 0 ? void 0 : (_application$business3 = application.businessObject) === null || _application$business3 === void 0 ? void 0 : _application$business3.applicationNo) || '',
|
|
40531
|
+
createdTime: application !== null && application !== void 0 && (_application$business4 = application.businessObject) !== null && _application$business4 !== void 0 && (_application$business5 = _application$business4.auditDetails) !== null && _application$business5 !== void 0 && _application$business5.createdTime ? new Date(application.businessObject.auditDetails.createdTime) : new Date(),
|
|
40532
|
+
locality: (application === null || application === void 0 ? void 0 : (_application$business6 = application.businessObject) === null || _application$business6 === void 0 ? void 0 : (_application$business7 = _application$business6.address) === null || _application$business7 === void 0 ? void 0 : (_application$business8 = _application$business7.locality) === null || _application$business8 === void 0 ? void 0 : _application$business8.code) || '',
|
|
40533
|
+
status: (application === null || application === void 0 ? void 0 : (_application$business9 = application.businessObject) === null || _application$business9 === void 0 ? void 0 : _application$business9.applicationStatus) || '',
|
|
40534
|
+
citizen: {
|
|
40535
|
+
name: (application === null || application === void 0 ? void 0 : (_application$ProcessI = application.ProcessInstance) === null || _application$ProcessI === void 0 ? void 0 : (_application$ProcessI2 = _application$ProcessI.assigner) === null || _application$ProcessI2 === void 0 ? void 0 : _application$ProcessI2.name) || '',
|
|
40536
|
+
mobileNumber: (application === null || application === void 0 ? void 0 : (_application$ProcessI3 = application.ProcessInstance) === null || _application$ProcessI3 === void 0 ? void 0 : (_application$ProcessI4 = _application$ProcessI3.assigner) === null || _application$ProcessI4 === void 0 ? void 0 : _application$ProcessI4.mobileNumber) || ''
|
|
40537
|
+
},
|
|
40538
|
+
propertyUsage: (application === null || application === void 0 ? void 0 : (_application$business10 = application.businessObject) === null || _application$business10 === void 0 ? void 0 : _application$business10.propertyUsage) || '',
|
|
40539
|
+
sla: Math.round((application === null || application === void 0 ? void 0 : (_application$ProcessI5 = application.ProcessInstance) === null || _application$ProcessI5 === void 0 ? void 0 : _application$ProcessI5.businesssServiceSla) / (24 * 60 * 60 * 1000)) || "-",
|
|
40540
|
+
mathsla: (application === null || application === void 0 ? void 0 : (_application$ProcessI6 = application.ProcessInstance) === null || _application$ProcessI6 === void 0 ? void 0 : _application$ProcessI6.businesssServiceSla) || ''
|
|
40541
|
+
});
|
|
40542
|
+
});
|
|
40543
|
+
}
|
|
40544
|
+
|
|
40545
|
+
return result;
|
|
40546
|
+
};
|
|
40547
|
+
|
|
39814
40548
|
var useApplicationUpdate = function useApplicationUpdate(tenantId) {
|
|
39815
40549
|
return reactQuery.useMutation(function (details) {
|
|
39816
40550
|
return FSMService.update(details, tenantId);
|
|
@@ -39874,11 +40608,11 @@ var usePropertySearch = function usePropertySearch(_ref, config) {
|
|
|
39874
40608
|
};
|
|
39875
40609
|
|
|
39876
40610
|
var defaultSelect = function defaultSelect(data) {
|
|
39877
|
-
data.Properties[0].units = data.Properties[0].units || [];
|
|
39878
|
-
data.Properties[0].units = data.Properties[0].units.filter(function (unit) {
|
|
40611
|
+
if (data.Properties.length > 0) data.Properties[0].units = data.Properties[0].units || [];
|
|
40612
|
+
if (data.Properties.length > 0) data.Properties[0].units = data.Properties[0].units.filter(function (unit) {
|
|
39879
40613
|
return unit.active;
|
|
39880
40614
|
});
|
|
39881
|
-
data.Properties[0].owners = data.Properties[0].owners || [];
|
|
40615
|
+
if (data.Properties.length > 0) data.Properties[0].owners = data.Properties[0].owners || [];
|
|
39882
40616
|
|
|
39883
40617
|
if (searchedFrom == "myPropertyCitizen") {
|
|
39884
40618
|
data.Properties.map(function (property) {
|
|
@@ -39898,18 +40632,108 @@ var usePropertySearch = function usePropertySearch(_ref, config) {
|
|
|
39898
40632
|
}, config)),
|
|
39899
40633
|
isLoading = _useQuery.isLoading,
|
|
39900
40634
|
error = _useQuery.error,
|
|
39901
|
-
data = _useQuery.data
|
|
40635
|
+
data = _useQuery.data,
|
|
40636
|
+
isSuccess = _useQuery.isSuccess;
|
|
39902
40637
|
|
|
39903
40638
|
return {
|
|
39904
40639
|
isLoading: isLoading,
|
|
39905
40640
|
error: error,
|
|
39906
40641
|
data: data,
|
|
40642
|
+
isSuccess: isSuccess,
|
|
39907
40643
|
revalidate: function revalidate() {
|
|
39908
40644
|
return client.invalidateQueries(["propertySearchList", tenantId, filters, auth]);
|
|
39909
40645
|
}
|
|
39910
40646
|
};
|
|
39911
40647
|
};
|
|
39912
40648
|
|
|
40649
|
+
var usePropertySearchWithDue = function usePropertySearchWithDue(_ref) {
|
|
40650
|
+
var _data$ConsumerCodes;
|
|
40651
|
+
|
|
40652
|
+
var tenantId = _ref.tenantId,
|
|
40653
|
+
filters = _ref.filters,
|
|
40654
|
+
_ref$auth = _ref.auth,
|
|
40655
|
+
auth = _ref$auth === void 0 ? true : _ref$auth,
|
|
40656
|
+
configs = _ref.configs;
|
|
40657
|
+
var client = reactQuery.useQueryClient();
|
|
40658
|
+
|
|
40659
|
+
var defaultSelect = function defaultSelect(data) {
|
|
40660
|
+
var consumerCodes = [];
|
|
40661
|
+
var formattedData = {};
|
|
40662
|
+
data.Properties.map(function (property) {
|
|
40663
|
+
var _property$units, _property$owners, _property$owners2, _property$tenantId, _property$tenantId$re, _property$address, _property$address$loc;
|
|
40664
|
+
|
|
40665
|
+
property.status == "ACTIVE" && consumerCodes.push(property.propertyId);
|
|
40666
|
+
property.units = property === null || property === void 0 ? void 0 : (_property$units = property.units) === null || _property$units === void 0 ? void 0 : _property$units.filter(function (unit) {
|
|
40667
|
+
return unit.active;
|
|
40668
|
+
});
|
|
40669
|
+
property.owners = property === null || property === void 0 ? void 0 : (_property$owners = property.owners) === null || _property$owners === void 0 ? void 0 : _property$owners.filter(function (owner) {
|
|
40670
|
+
return owner.status === (property === null || property === void 0 ? void 0 : property.status) === "INWORKFLOW" && (property === null || property === void 0 ? void 0 : property.creationReason) === "MUTATION" ? "INACTIVE" : "ACTIVE";
|
|
40671
|
+
});
|
|
40672
|
+
formattedData[property.propertyId] = {
|
|
40673
|
+
propertyId: property === null || property === void 0 ? void 0 : property.propertyId,
|
|
40674
|
+
name: property === null || property === void 0 ? void 0 : (_property$owners2 = property.owners) === null || _property$owners2 === void 0 ? void 0 : _property$owners2[0].name,
|
|
40675
|
+
status: property === null || property === void 0 ? void 0 : property.status,
|
|
40676
|
+
due: false,
|
|
40677
|
+
locality: (property === null || property === void 0 ? void 0 : (_property$tenantId = property.tenantId) === null || _property$tenantId === void 0 ? void 0 : (_property$tenantId$re = _property$tenantId.replace(".", "_")) === null || _property$tenantId$re === void 0 ? void 0 : _property$tenantId$re.toUpperCase()) + "_REVENUE_" + (property === null || property === void 0 ? void 0 : (_property$address = property.address) === null || _property$address === void 0 ? void 0 : (_property$address$loc = _property$address.locality) === null || _property$address$loc === void 0 ? void 0 : _property$address$loc.code),
|
|
40678
|
+
owners: property === null || property === void 0 ? void 0 : property.owners,
|
|
40679
|
+
documents: property === null || property === void 0 ? void 0 : property.documents
|
|
40680
|
+
};
|
|
40681
|
+
});
|
|
40682
|
+
data["ConsumerCodes"] = consumerCodes;
|
|
40683
|
+
data["FormattedData"] = formattedData;
|
|
40684
|
+
return data;
|
|
40685
|
+
};
|
|
40686
|
+
|
|
40687
|
+
var _useQuery = reactQuery.useQuery(["propertySearchList", tenantId, filters, auth], function () {
|
|
40688
|
+
return configs.enabled && Digit.PTService.search({
|
|
40689
|
+
tenantId: tenantId,
|
|
40690
|
+
filters: filters,
|
|
40691
|
+
auth: auth
|
|
40692
|
+
});
|
|
40693
|
+
}, _extends({}, configs, {
|
|
40694
|
+
select: defaultSelect
|
|
40695
|
+
})),
|
|
40696
|
+
isLoading = _useQuery.isLoading,
|
|
40697
|
+
error = _useQuery.error,
|
|
40698
|
+
data = _useQuery.data;
|
|
40699
|
+
|
|
40700
|
+
var consumerCodes = (data === null || data === void 0 ? void 0 : (_data$ConsumerCodes = data.ConsumerCodes) === null || _data$ConsumerCodes === void 0 ? void 0 : _data$ConsumerCodes.join(",")) || "";
|
|
40701
|
+
|
|
40702
|
+
var _useQuery2 = reactQuery.useQuery(["propertySearchBillList", tenantId, filters, data, auth, consumerCodes], function () {
|
|
40703
|
+
return configs.enabled && data && Digit.PTService.fetchPaymentDetails({
|
|
40704
|
+
tenantId: tenantId,
|
|
40705
|
+
consumerCodes: consumerCodes,
|
|
40706
|
+
auth: auth
|
|
40707
|
+
});
|
|
40708
|
+
}, _extends({}, configs, {
|
|
40709
|
+
select: function select(billResp) {
|
|
40710
|
+
var _billResp$Bill;
|
|
40711
|
+
|
|
40712
|
+
data["Bill"] = (billResp === null || billResp === void 0 ? void 0 : (_billResp$Bill = billResp.Bill) === null || _billResp$Bill === void 0 ? void 0 : _billResp$Bill.reduce(function (curr, acc) {
|
|
40713
|
+
curr[acc === null || acc === void 0 ? void 0 : acc.consumerCode] = acc === null || acc === void 0 ? void 0 : acc.totalAmount;
|
|
40714
|
+
data["FormattedData"][acc === null || acc === void 0 ? void 0 : acc.consumerCode]["due"] = acc === null || acc === void 0 ? void 0 : acc.totalAmount;
|
|
40715
|
+
return curr;
|
|
40716
|
+
}, {})) || {};
|
|
40717
|
+
return billResp;
|
|
40718
|
+
}
|
|
40719
|
+
})),
|
|
40720
|
+
billLoading = _useQuery2.isLoading,
|
|
40721
|
+
billData = _useQuery2.data,
|
|
40722
|
+
isSuccess = _useQuery2.isSuccess;
|
|
40723
|
+
|
|
40724
|
+
return {
|
|
40725
|
+
isLoading: isLoading || billLoading,
|
|
40726
|
+
error: error,
|
|
40727
|
+
data: data,
|
|
40728
|
+
billData: billData,
|
|
40729
|
+
isSuccess: isSuccess,
|
|
40730
|
+
revalidate: function revalidate() {
|
|
40731
|
+
client.invalidateQueries(["propertySearchBillList", tenantId, filters, auth]);
|
|
40732
|
+
client.invalidateQueries(["propertySearchList", tenantId, filters, auth]);
|
|
40733
|
+
}
|
|
40734
|
+
};
|
|
40735
|
+
};
|
|
40736
|
+
|
|
39913
40737
|
var usePropertyPayment = function usePropertyPayment(_ref) {
|
|
39914
40738
|
var tenantId = _ref.tenantId,
|
|
39915
40739
|
consumerCodes = _ref.consumerCodes;
|
|
@@ -40146,6 +40970,12 @@ var usePropertyMDMS = function usePropertyMDMS(tenantId, moduleCode, type, confi
|
|
|
40146
40970
|
}, config);
|
|
40147
40971
|
};
|
|
40148
40972
|
|
|
40973
|
+
var useChargeSlabs = function useChargeSlabs() {
|
|
40974
|
+
return reactQuery.useQuery("PT_RENTAL_DETAILS", function () {
|
|
40975
|
+
return MdmsService.getChargeSlabs(tenantId, moduleCode);
|
|
40976
|
+
}, config);
|
|
40977
|
+
};
|
|
40978
|
+
|
|
40149
40979
|
var useFloorList = function useFloorList() {
|
|
40150
40980
|
return reactQuery.useQuery("PT_FLOOR_LIST", function () {
|
|
40151
40981
|
return MdmsService.getFloorList(tenantId, moduleCode);
|
|
@@ -40192,6 +41022,9 @@ var usePropertyMDMS = function usePropertyMDMS(tenantId, moduleCode, type, confi
|
|
|
40192
41022
|
case "MapConfig":
|
|
40193
41023
|
return useMapConfig();
|
|
40194
41024
|
|
|
41025
|
+
case "ChargeSlabs":
|
|
41026
|
+
return useChargeSlabs();
|
|
41027
|
+
|
|
40195
41028
|
default:
|
|
40196
41029
|
return _default();
|
|
40197
41030
|
}
|
|
@@ -40213,6 +41046,37 @@ var usePropertyAPI = function usePropertyAPI(tenantId, type) {
|
|
|
40213
41046
|
}
|
|
40214
41047
|
};
|
|
40215
41048
|
|
|
41049
|
+
var usePropertyCreateNUpdateAPI = function usePropertyCreateNUpdateAPI(tenantId, update) {
|
|
41050
|
+
if (update === void 0) {
|
|
41051
|
+
update = false;
|
|
41052
|
+
}
|
|
41053
|
+
|
|
41054
|
+
var mutation = reactQuery.useMutation(function (data) {
|
|
41055
|
+
try {
|
|
41056
|
+
return Promise.resolve(PTService.create(data, tenantId)).then(function (createdProp) {
|
|
41057
|
+
var _temp2 = function () {
|
|
41058
|
+
var _createdProp$Response;
|
|
41059
|
+
|
|
41060
|
+
if (createdProp !== null && createdProp !== void 0 && createdProp.ResponseInfo && (createdProp === null || createdProp === void 0 ? void 0 : (_createdProp$Response = createdProp.ResponseInfo) === null || _createdProp$Response === void 0 ? void 0 : _createdProp$Response.status) === "successful") {
|
|
41061
|
+
var _temp3 = function () {
|
|
41062
|
+
if (update) {
|
|
41063
|
+
return Promise.resolve(PTService.update(createdProp === null || createdProp === void 0 ? void 0 : createdProp.Properties[0], tenantId)).then(function () {});
|
|
41064
|
+
}
|
|
41065
|
+
}();
|
|
41066
|
+
|
|
41067
|
+
if (_temp3 && _temp3.then) return _temp3.then(function () {});
|
|
41068
|
+
}
|
|
41069
|
+
}();
|
|
41070
|
+
|
|
41071
|
+
if (_temp2 && _temp2.then) return _temp2.then(function () {});
|
|
41072
|
+
});
|
|
41073
|
+
} catch (e) {
|
|
41074
|
+
return Promise.reject(e);
|
|
41075
|
+
}
|
|
41076
|
+
});
|
|
41077
|
+
return mutation;
|
|
41078
|
+
};
|
|
41079
|
+
|
|
40216
41080
|
var usePropertyDocumentSearch = function usePropertyDocumentSearch(_ref, config) {
|
|
40217
41081
|
var _property$documents;
|
|
40218
41082
|
|
|
@@ -40260,6 +41124,102 @@ var getPropertyTypeLocale$1 = function getPropertyTypeLocale(value) {
|
|
|
40260
41124
|
var getPropertySubtypeLocale$1 = function getPropertySubtypeLocale(value) {
|
|
40261
41125
|
return "PROPERTYTAX_BILLING_SLAB_" + value;
|
|
40262
41126
|
};
|
|
41127
|
+
var stringReplaceAll$1 = function stringReplaceAll(str, searcher, replaceWith) {
|
|
41128
|
+
if (str === void 0) {
|
|
41129
|
+
str = "";
|
|
41130
|
+
}
|
|
41131
|
+
|
|
41132
|
+
if (searcher === void 0) {
|
|
41133
|
+
searcher = "";
|
|
41134
|
+
}
|
|
41135
|
+
|
|
41136
|
+
if (replaceWith === void 0) {
|
|
41137
|
+
replaceWith = "";
|
|
41138
|
+
}
|
|
41139
|
+
|
|
41140
|
+
if (searcher === "") return str;
|
|
41141
|
+
|
|
41142
|
+
while (str.includes(searcher)) {
|
|
41143
|
+
str = str.replace(searcher, replaceWith);
|
|
41144
|
+
}
|
|
41145
|
+
|
|
41146
|
+
return str;
|
|
41147
|
+
};
|
|
41148
|
+
var checkForNotNull = function checkForNotNull(value) {
|
|
41149
|
+
if (value === void 0) {
|
|
41150
|
+
value = "";
|
|
41151
|
+
}
|
|
41152
|
+
|
|
41153
|
+
return value && value != null && value != undefined && value != "" ? true : false;
|
|
41154
|
+
};
|
|
41155
|
+
var convertDotValues = function convertDotValues(value) {
|
|
41156
|
+
if (value === void 0) {
|
|
41157
|
+
value = "";
|
|
41158
|
+
}
|
|
41159
|
+
|
|
41160
|
+
return checkForNotNull(value) && (value.replaceAll && value.replaceAll(".", "_") || value.replace && stringReplaceAll$1(value, ".", "_")) || "NA";
|
|
41161
|
+
};
|
|
41162
|
+
var convertToLocale = function convertToLocale(value, key) {
|
|
41163
|
+
if (value === void 0) {
|
|
41164
|
+
value = "";
|
|
41165
|
+
}
|
|
41166
|
+
|
|
41167
|
+
if (key === void 0) {
|
|
41168
|
+
key = "";
|
|
41169
|
+
}
|
|
41170
|
+
|
|
41171
|
+
var convertedValue = convertDotValues(value);
|
|
41172
|
+
|
|
41173
|
+
if (convertedValue === "NA") {
|
|
41174
|
+
return "PT_NA";
|
|
41175
|
+
}
|
|
41176
|
+
|
|
41177
|
+
return key + "_" + convertedValue;
|
|
41178
|
+
};
|
|
41179
|
+
var getMohallaLocale = function getMohallaLocale(value, tenantId) {
|
|
41180
|
+
if (value === void 0) {
|
|
41181
|
+
value = "";
|
|
41182
|
+
}
|
|
41183
|
+
|
|
41184
|
+
if (tenantId === void 0) {
|
|
41185
|
+
tenantId = "";
|
|
41186
|
+
}
|
|
41187
|
+
|
|
41188
|
+
var convertedValue = convertDotValues(tenantId);
|
|
41189
|
+
|
|
41190
|
+
if (convertedValue === "NA" || !checkForNotNull(value)) {
|
|
41191
|
+
return "PT_NA";
|
|
41192
|
+
}
|
|
41193
|
+
|
|
41194
|
+
convertedValue = convertedValue.toUpperCase();
|
|
41195
|
+
return convertToLocale(value, convertedValue + "_REVENUE");
|
|
41196
|
+
};
|
|
41197
|
+
var getCityLocale = function getCityLocale(value) {
|
|
41198
|
+
if (value === void 0) {
|
|
41199
|
+
value = "";
|
|
41200
|
+
}
|
|
41201
|
+
|
|
41202
|
+
var convertedValue = convertDotValues(value);
|
|
41203
|
+
|
|
41204
|
+
if (convertedValue === "NA" || !checkForNotNull(value)) {
|
|
41205
|
+
return "PT_NA";
|
|
41206
|
+
}
|
|
41207
|
+
|
|
41208
|
+
convertedValue = convertedValue.toUpperCase();
|
|
41209
|
+
return convertToLocale(convertedValue, "TENANT_TENANTS");
|
|
41210
|
+
};
|
|
41211
|
+
|
|
41212
|
+
var pt = {
|
|
41213
|
+
__proto__: null,
|
|
41214
|
+
getPropertyTypeLocale: getPropertyTypeLocale$1,
|
|
41215
|
+
getPropertySubtypeLocale: getPropertySubtypeLocale$1,
|
|
41216
|
+
stringReplaceAll: stringReplaceAll$1,
|
|
41217
|
+
checkForNotNull: checkForNotNull,
|
|
41218
|
+
convertDotValues: convertDotValues,
|
|
41219
|
+
convertToLocale: convertToLocale,
|
|
41220
|
+
getMohallaLocale: getMohallaLocale,
|
|
41221
|
+
getCityLocale: getCityLocale
|
|
41222
|
+
};
|
|
40263
41223
|
|
|
40264
41224
|
var PTSearch = {
|
|
40265
41225
|
all: function (tenantId, filters) {
|
|
@@ -40276,6 +41236,112 @@ var PTSearch = {
|
|
|
40276
41236
|
return Promise.reject(e);
|
|
40277
41237
|
}
|
|
40278
41238
|
},
|
|
41239
|
+
genericPropertyDetails: function (t, tenantId, propertyIds) {
|
|
41240
|
+
try {
|
|
41241
|
+
var filters = {
|
|
41242
|
+
propertyIds: propertyIds
|
|
41243
|
+
};
|
|
41244
|
+
return Promise.resolve(PTSearch.application(tenantId, filters)).then(function (property) {
|
|
41245
|
+
var _property$address, _property$address2, _property$tenantId, _property$tenantId$to, _property$tenantId$to2, _property$address3, _property$address3$lo, _property$address4, _property$address5, _property$owners$, _property$owners;
|
|
41246
|
+
|
|
41247
|
+
var addressDetails = {
|
|
41248
|
+
title: "PT_PROPERTY_ADDRESS_SUB_HEADER",
|
|
41249
|
+
asSectionHeader: true,
|
|
41250
|
+
values: [{
|
|
41251
|
+
title: "PT_PROPERTY_ADDRESS_PINCODE",
|
|
41252
|
+
value: property === null || property === void 0 ? void 0 : (_property$address = property.address) === null || _property$address === void 0 ? void 0 : _property$address.pincode
|
|
41253
|
+
}, {
|
|
41254
|
+
title: "PT_PROPERTY_ADDRESS_CITY",
|
|
41255
|
+
value: property === null || property === void 0 ? void 0 : (_property$address2 = property.address) === null || _property$address2 === void 0 ? void 0 : _property$address2.city
|
|
41256
|
+
}, {
|
|
41257
|
+
title: "PT_PROPERTY_ADDRESS_MOHALLA",
|
|
41258
|
+
value: (property === null || property === void 0 ? void 0 : (_property$tenantId = property.tenantId) === null || _property$tenantId === void 0 ? void 0 : (_property$tenantId$to = _property$tenantId.toUpperCase()) === null || _property$tenantId$to === void 0 ? void 0 : (_property$tenantId$to2 = _property$tenantId$to.split(".")) === null || _property$tenantId$to2 === void 0 ? void 0 : _property$tenantId$to2.join("_")) + "_REVENUE_" + (property === null || property === void 0 ? void 0 : (_property$address3 = property.address) === null || _property$address3 === void 0 ? void 0 : (_property$address3$lo = _property$address3.locality) === null || _property$address3$lo === void 0 ? void 0 : _property$address3$lo.code)
|
|
41259
|
+
}, {
|
|
41260
|
+
title: "PT_PROPERTY_ADDRESS_HOUSE_NO",
|
|
41261
|
+
value: property === null || property === void 0 ? void 0 : (_property$address4 = property.address) === null || _property$address4 === void 0 ? void 0 : _property$address4.doorNo
|
|
41262
|
+
}, {
|
|
41263
|
+
title: "PT_PROPERTY_ADDRESS_STREET_NAME",
|
|
41264
|
+
value: property === null || property === void 0 ? void 0 : (_property$address5 = property.address) === null || _property$address5 === void 0 ? void 0 : _property$address5.street
|
|
41265
|
+
}]
|
|
41266
|
+
};
|
|
41267
|
+
var assessmentDetails = {
|
|
41268
|
+
title: "PT_ASSESMENT_INFO_SUB_HEADER",
|
|
41269
|
+
values: [{
|
|
41270
|
+
title: "PT_ASSESMENT_INFO_TYPE_OF_BUILDING",
|
|
41271
|
+
value: getPropertyTypeLocale$1(property === null || property === void 0 ? void 0 : property.propertyType)
|
|
41272
|
+
}, {
|
|
41273
|
+
title: "PT_ASSESMENT_INFO_USAGE_TYPE",
|
|
41274
|
+
value: getPropertySubtypeLocale$1(property === null || property === void 0 ? void 0 : property.usageCategory)
|
|
41275
|
+
}, {
|
|
41276
|
+
title: "PT_ASSESMENT_INFO_PLOT_SIZE",
|
|
41277
|
+
value: property === null || property === void 0 ? void 0 : property.landArea
|
|
41278
|
+
}, {
|
|
41279
|
+
title: "PT_ASSESMENT_INFO_NO_OF_FLOOR",
|
|
41280
|
+
value: property === null || property === void 0 ? void 0 : property.noOfFloors
|
|
41281
|
+
}]
|
|
41282
|
+
};
|
|
41283
|
+
var propertyDetail = {
|
|
41284
|
+
title: "PT_DETAILS",
|
|
41285
|
+
values: [{
|
|
41286
|
+
title: "TL_PROPERTY_ID",
|
|
41287
|
+
value: (property === null || property === void 0 ? void 0 : property.propertyId) || "NA"
|
|
41288
|
+
}, {
|
|
41289
|
+
title: "PT_OWNER_NAME",
|
|
41290
|
+
value: (property === null || property === void 0 ? void 0 : (_property$owners$ = property.owners[0]) === null || _property$owners$ === void 0 ? void 0 : _property$owners$.name) || "NA"
|
|
41291
|
+
}, {
|
|
41292
|
+
title: "PT_SEARCHPROPERTY_TABEL_STATUS",
|
|
41293
|
+
value: Digit.Utils.locale.getTransformedLocale("WF_PT_" + (property === null || property === void 0 ? void 0 : property.status)) || "NA"
|
|
41294
|
+
}]
|
|
41295
|
+
};
|
|
41296
|
+
var ownerdetails = {
|
|
41297
|
+
title: "PT_OWNERSHIP_INFO_SUB_HEADER",
|
|
41298
|
+
additionalDetails: {
|
|
41299
|
+
owners: property === null || property === void 0 ? void 0 : (_property$owners = property.owners) === null || _property$owners === void 0 ? void 0 : _property$owners.filter(function (owner) {
|
|
41300
|
+
return owner.status === "ACTIVE";
|
|
41301
|
+
}).map(function (owner, index) {
|
|
41302
|
+
return {
|
|
41303
|
+
status: owner.status,
|
|
41304
|
+
title: "ES_OWNER",
|
|
41305
|
+
values: [{
|
|
41306
|
+
title: "PT_OWNERSHIP_INFO_NAME",
|
|
41307
|
+
value: owner === null || owner === void 0 ? void 0 : owner.name
|
|
41308
|
+
}, {
|
|
41309
|
+
title: "PT_OWNERSHIP_INFO_GENDER",
|
|
41310
|
+
value: owner === null || owner === void 0 ? void 0 : owner.gender
|
|
41311
|
+
}, {
|
|
41312
|
+
title: "PT_OWNERSHIP_INFO_MOBILE_NO",
|
|
41313
|
+
value: owner === null || owner === void 0 ? void 0 : owner.mobileNumber
|
|
41314
|
+
}, {
|
|
41315
|
+
title: "PT_OWNERSHIP_INFO_USER_CATEGORY",
|
|
41316
|
+
value: "COMMON_MASTERS_OWNERTYPE_" + (owner === null || owner === void 0 ? void 0 : owner.ownerType) || "NA"
|
|
41317
|
+
}, {
|
|
41318
|
+
title: "PT_SEARCHPROPERTY_TABEL_GUARDIANNAME",
|
|
41319
|
+
value: owner === null || owner === void 0 ? void 0 : owner.fatherOrHusbandName
|
|
41320
|
+
}, {
|
|
41321
|
+
title: "PT_FORM3_OWNERSHIP_TYPE",
|
|
41322
|
+
value: property === null || property === void 0 ? void 0 : property.ownershipCategory
|
|
41323
|
+
}, {
|
|
41324
|
+
title: "PT_OWNERSHIP_INFO_EMAIL_ID",
|
|
41325
|
+
value: owner === null || owner === void 0 ? void 0 : owner.emailId
|
|
41326
|
+
}, {
|
|
41327
|
+
title: "PT_OWNERSHIP_INFO_CORR_ADDR",
|
|
41328
|
+
value: owner === null || owner === void 0 ? void 0 : owner.correspondenceAddress
|
|
41329
|
+
}]
|
|
41330
|
+
};
|
|
41331
|
+
})
|
|
41332
|
+
}
|
|
41333
|
+
};
|
|
41334
|
+
var applicationDetails = [propertyDetail, addressDetails, assessmentDetails, ownerdetails];
|
|
41335
|
+
return {
|
|
41336
|
+
tenantId: property === null || property === void 0 ? void 0 : property.tenantId,
|
|
41337
|
+
applicationDetails: applicationDetails,
|
|
41338
|
+
applicationData: property
|
|
41339
|
+
};
|
|
41340
|
+
});
|
|
41341
|
+
} catch (e) {
|
|
41342
|
+
return Promise.reject(e);
|
|
41343
|
+
}
|
|
41344
|
+
},
|
|
40279
41345
|
application: function (tenantId, filters) {
|
|
40280
41346
|
if (filters === void 0) {
|
|
40281
41347
|
filters = {};
|
|
@@ -40591,9 +41657,84 @@ var usePTGenderMDMS = function usePTGenderMDMS(tenantId, moduleCode, type, confi
|
|
|
40591
41657
|
switch (type) {
|
|
40592
41658
|
case "GenderType":
|
|
40593
41659
|
return usePTGenders();
|
|
41660
|
+
|
|
41661
|
+
default:
|
|
41662
|
+
return null;
|
|
40594
41663
|
}
|
|
40595
41664
|
};
|
|
40596
41665
|
|
|
41666
|
+
var getOwnerForPayments = function getOwnerForPayments(propertyData, data) {
|
|
41667
|
+
var _data$Payments;
|
|
41668
|
+
|
|
41669
|
+
var newPayments = [];
|
|
41670
|
+
data && (data === null || data === void 0 ? void 0 : (_data$Payments = data.Payments) === null || _data$Payments === void 0 ? void 0 : _data$Payments.map(function (payment) {
|
|
41671
|
+
var _propertyData$filter$;
|
|
41672
|
+
|
|
41673
|
+
var owner = propertyData === null || propertyData === void 0 ? void 0 : (_propertyData$filter$ = propertyData.filter(function (ob) {
|
|
41674
|
+
var _payment$paymentDetai, _payment$paymentDetai2, _payment$paymentDetai3;
|
|
41675
|
+
|
|
41676
|
+
return ob.propertyId === (payment === null || payment === void 0 ? void 0 : (_payment$paymentDetai = payment.paymentDetails) === null || _payment$paymentDetai === void 0 ? void 0 : (_payment$paymentDetai2 = _payment$paymentDetai[0]) === null || _payment$paymentDetai2 === void 0 ? void 0 : (_payment$paymentDetai3 = _payment$paymentDetai2.bill) === null || _payment$paymentDetai3 === void 0 ? void 0 : _payment$paymentDetai3.consumerCode);
|
|
41677
|
+
})[0]) === null || _propertyData$filter$ === void 0 ? void 0 : _propertyData$filter$.owners;
|
|
41678
|
+
newPayments.push(_extends({}, payment, {
|
|
41679
|
+
owners: owner
|
|
41680
|
+
}));
|
|
41681
|
+
}));
|
|
41682
|
+
data ? data["Payments"] = [].concat(newPayments) : "";
|
|
41683
|
+
return data;
|
|
41684
|
+
};
|
|
41685
|
+
|
|
41686
|
+
var useMyPropertyPayments = function useMyPropertyPayments(_ref, config) {
|
|
41687
|
+
var _config;
|
|
41688
|
+
|
|
41689
|
+
var tenantId = _ref.tenantId,
|
|
41690
|
+
filters = _ref.filters;
|
|
41691
|
+
|
|
41692
|
+
if (config === void 0) {
|
|
41693
|
+
config = {};
|
|
41694
|
+
}
|
|
41695
|
+
|
|
41696
|
+
var client = reactQuery.useQueryClient();
|
|
41697
|
+
var paymentargs = tenantId ? {
|
|
41698
|
+
tenantId: tenantId,
|
|
41699
|
+
filters: filters
|
|
41700
|
+
} : {
|
|
41701
|
+
filters: filters
|
|
41702
|
+
};
|
|
41703
|
+
|
|
41704
|
+
var _useQuery = reactQuery.useQuery(["paymentpropertySearchList", tenantId, filters], function () {
|
|
41705
|
+
return Digit.PTService.paymentsearch(paymentargs);
|
|
41706
|
+
}, _extends({}, config)),
|
|
41707
|
+
isLoading = _useQuery.isLoading,
|
|
41708
|
+
error = _useQuery.error,
|
|
41709
|
+
data = _useQuery.data;
|
|
41710
|
+
|
|
41711
|
+
var updatedData = getOwnerForPayments((_config = config) === null || _config === void 0 ? void 0 : _config.propertyData, data);
|
|
41712
|
+
return {
|
|
41713
|
+
isLoading: isLoading,
|
|
41714
|
+
error: error,
|
|
41715
|
+
data: data,
|
|
41716
|
+
revalidate: function revalidate() {
|
|
41717
|
+
return client.invalidateQueries(["paymentpropertySearchList", tenantId, filters]);
|
|
41718
|
+
}
|
|
41719
|
+
};
|
|
41720
|
+
};
|
|
41721
|
+
|
|
41722
|
+
var useGenericViewProperty = function useGenericViewProperty(t, tenantId, propertyIds, config, userType) {
|
|
41723
|
+
if (config === void 0) {
|
|
41724
|
+
config = {};
|
|
41725
|
+
}
|
|
41726
|
+
|
|
41727
|
+
var defaultSelect = function defaultSelect(data) {
|
|
41728
|
+
return _extends({}, data);
|
|
41729
|
+
};
|
|
41730
|
+
|
|
41731
|
+
return reactQuery.useQuery(["VIEW_GENERIC_PROPERTY", propertyIds, tenantId], function () {
|
|
41732
|
+
return PTSearch.genericPropertyDetails(t, tenantId, propertyIds);
|
|
41733
|
+
}, _extends({
|
|
41734
|
+
select: defaultSelect
|
|
41735
|
+
}, config));
|
|
41736
|
+
};
|
|
41737
|
+
|
|
40597
41738
|
var useDssMDMS = function useDssMDMS(tenantId, moduleCode, type, config) {
|
|
40598
41739
|
var useDssDashboard = function useDssDashboard() {
|
|
40599
41740
|
return reactQuery.useQuery("DSS_DASHBOARD", function () {
|
|
@@ -40601,9 +41742,18 @@ var useDssMDMS = function useDssMDMS(tenantId, moduleCode, type, config) {
|
|
|
40601
41742
|
}, config);
|
|
40602
41743
|
};
|
|
40603
41744
|
|
|
41745
|
+
var _default = function _default() {
|
|
41746
|
+
return reactQuery.useQuery([tenantId, moduleCode, type], function () {
|
|
41747
|
+
return MdmsService.getMultipleTypes(tenantId, moduleCode, type);
|
|
41748
|
+
}, config);
|
|
41749
|
+
};
|
|
41750
|
+
|
|
40604
41751
|
switch (type) {
|
|
40605
41752
|
case "DssDashboard":
|
|
40606
41753
|
return useDssDashboard();
|
|
41754
|
+
|
|
41755
|
+
default:
|
|
41756
|
+
return _default();
|
|
40607
41757
|
}
|
|
40608
41758
|
};
|
|
40609
41759
|
|
|
@@ -40665,6 +41815,29 @@ var getRequest = function getRequest(type, code, requestDate, filters) {
|
|
|
40665
41815
|
};
|
|
40666
41816
|
};
|
|
40667
41817
|
|
|
41818
|
+
var defaultSelect = function defaultSelect(data) {
|
|
41819
|
+
if (data !== null && data !== void 0 && data.responseData) {
|
|
41820
|
+
var _data$responseData;
|
|
41821
|
+
|
|
41822
|
+
if (data !== null && data !== void 0 && (_data$responseData = data.responseData) !== null && _data$responseData !== void 0 && _data$responseData.data) {
|
|
41823
|
+
var _data$responseData2, _data$responseData2$d, _data$responseData$da;
|
|
41824
|
+
|
|
41825
|
+
data.responseData.data = (data === null || data === void 0 ? void 0 : (_data$responseData2 = data.responseData) === null || _data$responseData2 === void 0 ? void 0 : (_data$responseData2$d = _data$responseData2.data) === null || _data$responseData2$d === void 0 ? void 0 : _data$responseData2$d.filter(function (col) {
|
|
41826
|
+
return col;
|
|
41827
|
+
})) || [];
|
|
41828
|
+
(_data$responseData$da = data.responseData.data) === null || _data$responseData$da === void 0 ? void 0 : _data$responseData$da.forEach(function (row) {
|
|
41829
|
+
if (row !== null && row !== void 0 && row.plots) {
|
|
41830
|
+
row.plots = (row === null || row === void 0 ? void 0 : row.plots.filter(function (col) {
|
|
41831
|
+
return col;
|
|
41832
|
+
})) || [];
|
|
41833
|
+
}
|
|
41834
|
+
});
|
|
41835
|
+
}
|
|
41836
|
+
}
|
|
41837
|
+
|
|
41838
|
+
return data;
|
|
41839
|
+
};
|
|
41840
|
+
|
|
40668
41841
|
var useGetChart = function useGetChart(args) {
|
|
40669
41842
|
var key = args.key,
|
|
40670
41843
|
type = args.type,
|
|
@@ -40677,6 +41850,8 @@ var useGetChart = function useGetChart(args) {
|
|
|
40677
41850
|
tenantId: tenantId
|
|
40678
41851
|
}
|
|
40679
41852
|
}));
|
|
41853
|
+
}, {
|
|
41854
|
+
select: defaultSelect
|
|
40680
41855
|
});
|
|
40681
41856
|
};
|
|
40682
41857
|
|
|
@@ -40703,6 +41878,9 @@ var useMCollectMDMS = function useMCollectMDMS(tenantId, moduleCode, type, filte
|
|
|
40703
41878
|
|
|
40704
41879
|
case "applicationStatus":
|
|
40705
41880
|
return useMCollectApplcationStatus();
|
|
41881
|
+
|
|
41882
|
+
default:
|
|
41883
|
+
return null;
|
|
40706
41884
|
}
|
|
40707
41885
|
};
|
|
40708
41886
|
|
|
@@ -40886,6 +42064,8 @@ var useTenants$4 = function useTenants() {
|
|
|
40886
42064
|
return tenants;
|
|
40887
42065
|
};
|
|
40888
42066
|
|
|
42067
|
+
var _excluded$2 = ["code", "value"];
|
|
42068
|
+
|
|
40889
42069
|
var useTradeLicenseMDMS = function useTradeLicenseMDMS(tenantId, moduleCode, type, filter, config) {
|
|
40890
42070
|
if (config === void 0) {
|
|
40891
42071
|
config = {};
|
|
@@ -40915,6 +42095,104 @@ var useTradeLicenseMDMS = function useTradeLicenseMDMS(tenantId, moduleCode, typ
|
|
|
40915
42095
|
}, config);
|
|
40916
42096
|
};
|
|
40917
42097
|
|
|
42098
|
+
var useTradeOwnershipSubType = function useTradeOwnershipSubType() {
|
|
42099
|
+
return reactQuery.useQuery("TL_TRADE_OWNERSHIP_CATEGORY", function () {
|
|
42100
|
+
return MdmsService.GetTradeOwnerShipCategory(tenantId, moduleCode, type);
|
|
42101
|
+
}, _extends({
|
|
42102
|
+
select: function select(data) {
|
|
42103
|
+
var _data$commonMasters = data["common-masters"];
|
|
42104
|
+
_data$commonMasters = _data$commonMasters === void 0 ? {} : _data$commonMasters;
|
|
42105
|
+
var categoryData = _data$commonMasters.OwnerShipCategory;
|
|
42106
|
+
var filteredSubtypesData = categoryData.filter(function (e) {
|
|
42107
|
+
return e.code.includes(filter.keyToSearchOwnershipSubtype);
|
|
42108
|
+
}).map(function (e) {
|
|
42109
|
+
return _extends({}, e, {
|
|
42110
|
+
i18nKey: "COMMON_MASTERS_OWNERSHIPCATEGORY_" + e.code.replaceAll(".", "_")
|
|
42111
|
+
});
|
|
42112
|
+
});
|
|
42113
|
+
return filteredSubtypesData;
|
|
42114
|
+
}
|
|
42115
|
+
}, config));
|
|
42116
|
+
};
|
|
42117
|
+
|
|
42118
|
+
var useOwnerTypeWithSubtypes = function useOwnerTypeWithSubtypes() {
|
|
42119
|
+
return reactQuery.useQuery("TL_TRADE_OWNERSSHIP_TYPE", function () {
|
|
42120
|
+
return MdmsService.GetTradeOwnerShipCategory(tenantId, moduleCode, type);
|
|
42121
|
+
}, _extends({
|
|
42122
|
+
select: function select(data) {
|
|
42123
|
+
var _data$commonMasters2 = data["common-masters"];
|
|
42124
|
+
_data$commonMasters2 = _data$commonMasters2 === void 0 ? {} : _data$commonMasters2;
|
|
42125
|
+
var categoryData = _data$commonMasters2.OwnerShipCategory;
|
|
42126
|
+
var OwnerShipCategory = {};
|
|
42127
|
+
var ownerShipdropDown = [];
|
|
42128
|
+
|
|
42129
|
+
function getDropdwonForProperty(ownerShipdropDown) {
|
|
42130
|
+
if ((filter === null || filter === void 0 ? void 0 : filter.userType) === "employee") {
|
|
42131
|
+
var _ownerShipdropDown$fi;
|
|
42132
|
+
|
|
42133
|
+
var arr = ownerShipdropDown === null || ownerShipdropDown === void 0 ? void 0 : (_ownerShipdropDown$fi = ownerShipdropDown.filter(function (e) {
|
|
42134
|
+
return e.code.split(".").length <= 2;
|
|
42135
|
+
})) === null || _ownerShipdropDown$fi === void 0 ? void 0 : _ownerShipdropDown$fi.map(function (ownerShipDetails) {
|
|
42136
|
+
return _extends({}, ownerShipDetails, {
|
|
42137
|
+
i18nKey: "COMMON_MASTERS_OWNERSHIPCATEGORY_INDIVIDUAL_" + (ownerShipDetails.value.split(".")[1] ? ownerShipDetails.value.split(".")[1] : ownerShipDetails.value.split(".")[0])
|
|
42138
|
+
});
|
|
42139
|
+
});
|
|
42140
|
+
var finalArr = arr.filter(function (data) {
|
|
42141
|
+
return data.code.includes("INDIVIDUAL") || data.code.includes("OTHER");
|
|
42142
|
+
});
|
|
42143
|
+
return finalArr;
|
|
42144
|
+
}
|
|
42145
|
+
|
|
42146
|
+
var res = ownerShipdropDown !== null && ownerShipdropDown !== void 0 && ownerShipdropDown.length ? ownerShipdropDown === null || ownerShipdropDown === void 0 ? void 0 : ownerShipdropDown.map(function (ownerShipDetails) {
|
|
42147
|
+
return _extends({}, ownerShipDetails, {
|
|
42148
|
+
i18nKey: "PT_OWNERSHIP_" + (ownerShipDetails.value.split(".")[1] ? ownerShipDetails.value.split(".")[1] : ownerShipDetails.value.split(".")[0])
|
|
42149
|
+
});
|
|
42150
|
+
}).reduce(function (acc, ownerShipDetails) {
|
|
42151
|
+
if (ownerShipDetails.code.includes("INDIVIDUAL")) {
|
|
42152
|
+
return [].concat(acc, [ownerShipDetails]);
|
|
42153
|
+
} else if (ownerShipDetails.code.includes("OTHER")) {
|
|
42154
|
+
var code = ownerShipDetails.code,
|
|
42155
|
+
value = ownerShipDetails.value,
|
|
42156
|
+
everythingElse = _objectWithoutPropertiesLoose(ownerShipDetails, _excluded$2);
|
|
42157
|
+
|
|
42158
|
+
var mutatedOwnershipDetails = _extends({
|
|
42159
|
+
code: code.split(".")[0],
|
|
42160
|
+
value: value.split(".")[0]
|
|
42161
|
+
}, everythingElse);
|
|
42162
|
+
|
|
42163
|
+
return [].concat(acc, [mutatedOwnershipDetails]);
|
|
42164
|
+
} else {
|
|
42165
|
+
return acc;
|
|
42166
|
+
}
|
|
42167
|
+
}, []) : null;
|
|
42168
|
+
return res;
|
|
42169
|
+
}
|
|
42170
|
+
|
|
42171
|
+
function formDropdown(category) {
|
|
42172
|
+
var name = category.name,
|
|
42173
|
+
code = category.code;
|
|
42174
|
+
return {
|
|
42175
|
+
label: name,
|
|
42176
|
+
value: code,
|
|
42177
|
+
code: code
|
|
42178
|
+
};
|
|
42179
|
+
}
|
|
42180
|
+
|
|
42181
|
+
categoryData.length > 0 ? categoryData === null || categoryData === void 0 ? void 0 : categoryData.map(function (category) {
|
|
42182
|
+
OwnerShipCategory[category.code] = category;
|
|
42183
|
+
}) : null;
|
|
42184
|
+
|
|
42185
|
+
if (OwnerShipCategory) {
|
|
42186
|
+
Object.keys(OwnerShipCategory).forEach(function (category) {
|
|
42187
|
+
ownerShipdropDown.push(formDropdown(OwnerShipCategory[category]));
|
|
42188
|
+
});
|
|
42189
|
+
}
|
|
42190
|
+
|
|
42191
|
+
return getDropdwonForProperty(ownerShipdropDown);
|
|
42192
|
+
}
|
|
42193
|
+
}, config));
|
|
42194
|
+
};
|
|
42195
|
+
|
|
40918
42196
|
var useTLAccessoriesType = function useTLAccessoriesType() {
|
|
40919
42197
|
return reactQuery.useQuery("TL_TRADE_ACCESSORY_CATEGORY", function () {
|
|
40920
42198
|
return MdmsService.getTLAccessoriesType(tenantId, moduleCode, type);
|
|
@@ -40946,18 +42224,26 @@ var useTradeLicenseMDMS = function useTradeLicenseMDMS(tenantId, moduleCode, typ
|
|
|
40946
42224
|
case "TLOwnerShipCategory":
|
|
40947
42225
|
return useTradeOwnerShipCategory();
|
|
40948
42226
|
|
|
42227
|
+
case "TLOwnerTypeWithSubtypes":
|
|
42228
|
+
return useOwnerTypeWithSubtypes();
|
|
42229
|
+
|
|
40949
42230
|
case "AccessoryCategory":
|
|
40950
42231
|
return useTLAccessoriesType();
|
|
40951
42232
|
|
|
40952
42233
|
case "FinancialYear":
|
|
40953
42234
|
return useTLFinancialYear();
|
|
40954
42235
|
|
|
42236
|
+
case "TradeOwnershipSubType":
|
|
42237
|
+
return useTradeOwnershipSubType();
|
|
42238
|
+
|
|
40955
42239
|
default:
|
|
40956
42240
|
return _default();
|
|
40957
42241
|
}
|
|
40958
42242
|
};
|
|
40959
42243
|
|
|
40960
42244
|
var useTLDocumentSearch = function useTLDocumentSearch(data1, config) {
|
|
42245
|
+
var _data, _data$value, _data$value$owners, _data$value$owners$do, _data2, _data2$value, _data2$value$owners, _data2$value$owners$d, _data3, _data3$value, _data3$value$owners, _data3$value$owners$d;
|
|
42246
|
+
|
|
40961
42247
|
if (data1 === void 0) {
|
|
40962
42248
|
data1 = {};
|
|
40963
42249
|
}
|
|
@@ -40965,7 +42251,10 @@ var useTLDocumentSearch = function useTLDocumentSearch(data1, config) {
|
|
|
40965
42251
|
var client = reactQuery.useQueryClient();
|
|
40966
42252
|
var tenantId = Digit.ULBService.getCurrentTenantId();
|
|
40967
42253
|
var tenant = Digit.ULBService.getStateId();
|
|
40968
|
-
var filesArray = [
|
|
42254
|
+
var filesArray = [];
|
|
42255
|
+
if ((_data = data1) !== null && _data !== void 0 && (_data$value = _data.value) !== null && _data$value !== void 0 && (_data$value$owners = _data$value.owners) !== null && _data$value$owners !== void 0 && (_data$value$owners$do = _data$value$owners.documents["OwnerPhotoProof"]) !== null && _data$value$owners$do !== void 0 && _data$value$owners$do.fileStoreId) filesArray.push(data1.value.owners.documents["OwnerPhotoProof"].fileStoreId);
|
|
42256
|
+
if ((_data2 = data1) !== null && _data2 !== void 0 && (_data2$value = _data2.value) !== null && _data2$value !== void 0 && (_data2$value$owners = _data2$value.owners) !== null && _data2$value$owners !== void 0 && (_data2$value$owners$d = _data2$value$owners.documents["ProofOfIdentity"]) !== null && _data2$value$owners$d !== void 0 && _data2$value$owners$d.fileStoreId) filesArray.push(data1.value.owners.documents["ProofOfIdentity"].fileStoreId);
|
|
42257
|
+
if ((_data3 = data1) !== null && _data3 !== void 0 && (_data3$value = _data3.value) !== null && _data3$value !== void 0 && (_data3$value$owners = _data3$value.owners) !== null && _data3$value$owners !== void 0 && (_data3$value$owners$d = _data3$value$owners.documents["ProofOfOwnership"]) !== null && _data3$value$owners$d !== void 0 && _data3$value$owners$d.fileStoreId) filesArray.push(data1.value.owners.documents["ProofOfOwnership"].fileStoreId);
|
|
40969
42258
|
|
|
40970
42259
|
var _useQuery = reactQuery.useQuery(["tlDocuments-" + 1, filesArray], function () {
|
|
40971
42260
|
return Digit.UploadServices.Filefetch(filesArray, tenant);
|
|
@@ -41049,38 +42338,42 @@ var useTradeLicenseSearch = function useTradeLicenseSearch(_ref, config) {
|
|
|
41049
42338
|
};
|
|
41050
42339
|
};
|
|
41051
42340
|
|
|
42341
|
+
var mapWfBybusinessId$1 = function mapWfBybusinessId(workflowData) {
|
|
42342
|
+
return workflowData === null || workflowData === void 0 ? void 0 : workflowData.reduce(function (acc, item) {
|
|
42343
|
+
acc[item === null || item === void 0 ? void 0 : item.businessId] = item;
|
|
42344
|
+
return acc;
|
|
42345
|
+
}, {});
|
|
42346
|
+
};
|
|
42347
|
+
|
|
42348
|
+
var combineResponse = function combineResponse(applications, workflowData, totalCount) {
|
|
42349
|
+
var workflowInstances = mapWfBybusinessId$1(workflowData);
|
|
42350
|
+
return applications.map(function (application) {
|
|
42351
|
+
var _workflowInstances$ap, _workflowInstances$ap2, _workflowInstances$ap3, _workflowInstances$ap4, _workflowInstances$ap5, _workflowInstances$ap6;
|
|
42352
|
+
|
|
42353
|
+
return _extends({}, application, {
|
|
42354
|
+
appAssignee: (_workflowInstances$ap = workflowInstances[application === null || application === void 0 ? void 0 : application.applicationNumber]) === null || _workflowInstances$ap === void 0 ? void 0 : (_workflowInstances$ap2 = _workflowInstances$ap.assignes) === null || _workflowInstances$ap2 === void 0 ? void 0 : (_workflowInstances$ap3 = _workflowInstances$ap2[0]) === null || _workflowInstances$ap3 === void 0 ? void 0 : _workflowInstances$ap3.name,
|
|
42355
|
+
SLA: (_workflowInstances$ap4 = workflowInstances[application === null || application === void 0 ? void 0 : application.applicationNumber]) === null || _workflowInstances$ap4 === void 0 ? void 0 : _workflowInstances$ap4.businesssServiceSla,
|
|
42356
|
+
appState: (_workflowInstances$ap5 = workflowInstances[application === null || application === void 0 ? void 0 : application.applicationNumber]) === null || _workflowInstances$ap5 === void 0 ? void 0 : (_workflowInstances$ap6 = _workflowInstances$ap5.state) === null || _workflowInstances$ap6 === void 0 ? void 0 : _workflowInstances$ap6.state,
|
|
42357
|
+
Count: totalCount
|
|
42358
|
+
});
|
|
42359
|
+
});
|
|
42360
|
+
};
|
|
42361
|
+
|
|
41052
42362
|
var useTLSearch = function useTLSearch(params, config) {
|
|
41053
42363
|
return function () {
|
|
41054
42364
|
try {
|
|
41055
42365
|
return Promise.resolve(Digit.TLService.search(params, config)).then(function (data) {
|
|
41056
|
-
var
|
|
41057
|
-
return function () {
|
|
41058
|
-
if (data && data !== null && data !== void 0 && data.Licenses && Array.isArray(data.Licenses) && data.Licenses.length > 0) {
|
|
41059
|
-
var _data$Licenses;
|
|
42366
|
+
var _data$Licenses, _data$Licenses$;
|
|
41060
42367
|
|
|
41061
|
-
|
|
41062
|
-
|
|
41063
|
-
|
|
41064
|
-
|
|
41065
|
-
|
|
41066
|
-
|
|
41067
|
-
|
|
41068
|
-
|
|
41069
|
-
|
|
41070
|
-
})).then(function (workflowdata) {
|
|
41071
|
-
var res = Object.assign({}, service, {
|
|
41072
|
-
SLA: workflowdata === null || workflowdata === void 0 ? void 0 : workflowdata.processInstances[0].businesssServiceSla
|
|
41073
|
-
});
|
|
41074
|
-
return res;
|
|
41075
|
-
});
|
|
41076
|
-
} catch (e) {
|
|
41077
|
-
return Promise.reject(e);
|
|
41078
|
-
}
|
|
41079
|
-
}))).then(function (_Promise$all) {
|
|
41080
|
-
return UpdatedData = _Promise$all;
|
|
41081
|
-
});
|
|
41082
|
-
}
|
|
41083
|
-
}();
|
|
42368
|
+
var tenant = data === null || data === void 0 ? void 0 : (_data$Licenses = data.Licenses) === null || _data$Licenses === void 0 ? void 0 : (_data$Licenses$ = _data$Licenses[0]) === null || _data$Licenses$ === void 0 ? void 0 : _data$Licenses$.tenantId;
|
|
42369
|
+
var businessIds = data === null || data === void 0 ? void 0 : data.Licenses.map(function (application) {
|
|
42370
|
+
return application.applicationNumber;
|
|
42371
|
+
});
|
|
42372
|
+
return Promise.resolve(Digit.WorkflowService.getAllApplication(tenant, {
|
|
42373
|
+
businessIds: businessIds.join()
|
|
42374
|
+
})).then(function (workflowRes) {
|
|
42375
|
+
return combineResponse(data === null || data === void 0 ? void 0 : data.Licenses, workflowRes === null || workflowRes === void 0 ? void 0 : workflowRes.ProcessInstances, data === null || data === void 0 ? void 0 : data.Count);
|
|
42376
|
+
});
|
|
41084
42377
|
});
|
|
41085
42378
|
} catch (e) {
|
|
41086
42379
|
return Promise.reject(e);
|
|
@@ -41099,17 +42392,18 @@ var useTLSearchApplication = function useTLSearchApplication(params, config, t)
|
|
|
41099
42392
|
staleTime: Infinity,
|
|
41100
42393
|
select: function select(data) {
|
|
41101
42394
|
return data.map(function (i) {
|
|
41102
|
-
var _i$tradeLicenseDetail, _i$tradeLicenseDetail2;
|
|
42395
|
+
var _i$tradeLicenseDetail, _i$tradeLicenseDetail2, _i$tradeLicenseDetail3, _i$tradeLicenseDetail4, _i$tradeLicenseDetail5, _i$tradeLicenseDetail6, _i$tradeLicenseDetail7;
|
|
41103
42396
|
|
|
41104
42397
|
return {
|
|
41105
42398
|
TL_COMMON_TABLE_COL_APP_NO: i.applicationNumber,
|
|
41106
42399
|
TL_APPLICATION_CATEGORY: "ACTION_TEST_TRADE_LICENSE",
|
|
41107
|
-
TL_COMMON_TABLE_COL_OWN_NAME: i === null || i === void 0 ? void 0 : (_i$
|
|
42400
|
+
TL_COMMON_TABLE_COL_OWN_NAME: i !== null && i !== void 0 && (_i$tradeLicenseDetail = i.tradeLicenseDetail) !== null && _i$tradeLicenseDetail !== void 0 && _i$tradeLicenseDetail.subOwnerShipCategory.includes("INSTITUTION") ? i === null || i === void 0 ? void 0 : (_i$tradeLicenseDetail2 = i.tradeLicenseDetail) === null || _i$tradeLicenseDetail2 === void 0 ? void 0 : (_i$tradeLicenseDetail3 = _i$tradeLicenseDetail2.institution) === null || _i$tradeLicenseDetail3 === void 0 ? void 0 : _i$tradeLicenseDetail3.name : i === null || i === void 0 ? void 0 : (_i$tradeLicenseDetail4 = i.tradeLicenseDetail) === null || _i$tradeLicenseDetail4 === void 0 ? void 0 : (_i$tradeLicenseDetail5 = _i$tradeLicenseDetail4.owners) === null || _i$tradeLicenseDetail5 === void 0 ? void 0 : _i$tradeLicenseDetail5.map(function (ele, index) {
|
|
41108
42401
|
return index == 0 ? multiownername = ele.name : multiownername = multiownername + " , " + ele.name;
|
|
41109
42402
|
}),
|
|
41110
42403
|
TL_COMMON_TABLE_COL_STATUS: "WF_NEWTL_" + (i === null || i === void 0 ? void 0 : i.status),
|
|
41111
42404
|
TL_COMMON_TABLE_COL_SLA_NAME: Math.round((i === null || i === void 0 ? void 0 : i.SLA) / (1000 * 60 * 60 * 24)) + " " + t("TL_SLA_DAYS"),
|
|
41112
42405
|
TL_COMMON_TABLE_COL_TRD_NAME: i === null || i === void 0 ? void 0 : i.tradeName,
|
|
42406
|
+
TL_INSTITUTION_TYPE_LABEL: i !== null && i !== void 0 && (_i$tradeLicenseDetail6 = i.tradeLicenseDetail) !== null && _i$tradeLicenseDetail6 !== void 0 && _i$tradeLicenseDetail6.subOwnerShipCategory.includes("INSTITUTION") ? "TL_" + (i === null || i === void 0 ? void 0 : (_i$tradeLicenseDetail7 = i.tradeLicenseDetail) === null || _i$tradeLicenseDetail7 === void 0 ? void 0 : _i$tradeLicenseDetail7.subOwnerShipCategory) : null,
|
|
41113
42407
|
raw: i
|
|
41114
42408
|
};
|
|
41115
42409
|
});
|
|
@@ -41145,7 +42439,7 @@ var useTLPaymentHistory = function useTLPaymentHistory(tenantId, id, config) {
|
|
|
41145
42439
|
}, _extends({}, config));
|
|
41146
42440
|
};
|
|
41147
42441
|
|
|
41148
|
-
var stringReplaceAll$
|
|
42442
|
+
var stringReplaceAll$2 = function stringReplaceAll(str, searcher, replaceWith) {
|
|
41149
42443
|
if (str === void 0) {
|
|
41150
42444
|
str = "";
|
|
41151
42445
|
}
|
|
@@ -41234,217 +42528,362 @@ var TLSearch = {
|
|
|
41234
42528
|
applicationNumber: applicationNumber
|
|
41235
42529
|
};
|
|
41236
42530
|
return Promise.resolve(TLSearch.application(tenantId, filter)).then(function (response) {
|
|
41237
|
-
|
|
41238
|
-
var _response$tradeLicens, _response$tradeLicens2, _response$tradeLicens3, _response$tradeLicens4, _response$tradeLicens5, _response$tradeLicens6, _response$tradeLicens7, _response$tradeLicens8, _response$tradeLicens9, _response$tradeLicens10, _response$tradeLicens11, _response$tradeLicens12, _response$tradeLicens13, _response$tradeLicens14, _response$tradeLicens15, _response$tradeLicens16, _response$tradeLicens17, _response$tradeLicens18, _response$tradeLicens19, _response$tradeLicens20, _response$tradeLicens21, _response$tradeLicens22, _response$tradeLicens23, _response$tradeLicens24, _response$tradeLicens25, _response$tradeLicens26, _response$tradeLicens27, _response$tradeLicens28, _response$tradeLicens29, _response$tradeLicens30, _response$tradeLicens33, _response$tradeLicens34, _response$tradeLicens37, _response$tradeLicens38, _response$tradeLicens39;
|
|
42531
|
+
var _response$tradeLicens60, _response$tradeLicens61, _response$tradeLicens62, _response$tradeLicens63;
|
|
41239
42532
|
|
|
41240
|
-
|
|
41241
|
-
|
|
41242
|
-
|
|
41243
|
-
|
|
41244
|
-
|
|
41245
|
-
|
|
41246
|
-
|
|
41247
|
-
|
|
41248
|
-
|
|
41249
|
-
|
|
41250
|
-
|
|
41251
|
-
|
|
41252
|
-
|
|
41253
|
-
|
|
41254
|
-
|
|
41255
|
-
|
|
41256
|
-
}, {
|
|
41257
|
-
title: "TL_NEW_TRADE_DETAILS_STRUCT_SUB_TYPE_LABEL",
|
|
41258
|
-
value: response !== null && response !== void 0 && (_response$tradeLicens4 = response.tradeLicenseDetail) !== null && _response$tradeLicens4 !== void 0 && _response$tradeLicens4.structureType ? "COMMON_MASTERS_STRUCTURETYPE_" + stringReplaceAll$1(response === null || response === void 0 ? void 0 : (_response$tradeLicens5 = response.tradeLicenseDetail) === null || _response$tradeLicens5 === void 0 ? void 0 : _response$tradeLicens5.structureType, ".", "_") : "NA"
|
|
41259
|
-
}, {
|
|
41260
|
-
title: "TL_NEW_TRADE_DETAILS_TRADE_COMM_DATE_LABEL",
|
|
41261
|
-
value: response !== null && response !== void 0 && response.commencementDate ? convertEpochToDate(response === null || response === void 0 ? void 0 : response.commencementDate) : "NA"
|
|
41262
|
-
}, {
|
|
41263
|
-
title: "TL_NEW_GST_NUMBER_LABEL",
|
|
41264
|
-
value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens6 = response.tradeLicenseDetail) === null || _response$tradeLicens6 === void 0 ? void 0 : (_response$tradeLicens7 = _response$tradeLicens6.additionalDetail) === null || _response$tradeLicens7 === void 0 ? void 0 : _response$tradeLicens7.gstNo) || "NA"
|
|
41265
|
-
}, {
|
|
41266
|
-
title: "TL_NEW_OPERATIONAL_SQ_FT_AREA_LABEL",
|
|
41267
|
-
value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens8 = response.tradeLicenseDetail) === null || _response$tradeLicens8 === void 0 ? void 0 : _response$tradeLicens8.operationalArea) || "NA"
|
|
41268
|
-
}, {
|
|
41269
|
-
title: "TL_NEW_NUMBER_OF_EMPLOYEES_LABEL",
|
|
41270
|
-
value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens9 = response.tradeLicenseDetail) === null || _response$tradeLicens9 === void 0 ? void 0 : _response$tradeLicens9.noOfEmployees) || "NA"
|
|
41271
|
-
}]
|
|
41272
|
-
};
|
|
41273
|
-
var tradeUnits = {
|
|
41274
|
-
title: "TL_TRADE_UNITS_HEADER",
|
|
41275
|
-
additionalDetails: {
|
|
41276
|
-
units: response === null || response === void 0 ? void 0 : (_response$tradeLicens10 = response.tradeLicenseDetail) === null || _response$tradeLicens10 === void 0 ? void 0 : (_response$tradeLicens11 = _response$tradeLicens10.tradeUnits) === null || _response$tradeLicens11 === void 0 ? void 0 : _response$tradeLicens11.map(function (unit, index) {
|
|
41277
|
-
var _unit$tradeType, _unit$tradeType2;
|
|
41278
|
-
|
|
41279
|
-
var tradeSubType = stringReplaceAll$1(unit === null || unit === void 0 ? void 0 : unit.tradeType, ".", "_");
|
|
41280
|
-
tradeSubType = stringReplaceAll$1(tradeSubType, "-", "_");
|
|
41281
|
-
return {
|
|
41282
|
-
title: "TL_UNIT_HEADER",
|
|
41283
|
-
values: [{
|
|
41284
|
-
title: "TRADELICENSE_TRADECATEGORY_LABEL",
|
|
41285
|
-
value: unit !== null && unit !== void 0 && unit.tradeType ? "TRADELICENSE_TRADETYPE_" + (unit === null || unit === void 0 ? void 0 : (_unit$tradeType = unit.tradeType) === null || _unit$tradeType === void 0 ? void 0 : _unit$tradeType.split('.')[0]) : "NA"
|
|
41286
|
-
}, {
|
|
41287
|
-
title: "TRADELICENSE_TRADETYPE_LABEL",
|
|
41288
|
-
value: unit !== null && unit !== void 0 && unit.tradeType ? "TRADELICENSE_TRADETYPE_" + (unit === null || unit === void 0 ? void 0 : (_unit$tradeType2 = unit.tradeType) === null || _unit$tradeType2 === void 0 ? void 0 : _unit$tradeType2.split('.')[1]) : "NA"
|
|
41289
|
-
}, {
|
|
41290
|
-
title: "TL_NEW_TRADE_SUB_TYPE_LABEL",
|
|
41291
|
-
value: tradeSubType ? "TRADELICENSE_TRADETYPE_" + tradeSubType : "NA"
|
|
41292
|
-
}, {
|
|
41293
|
-
title: "TL_NEW_TRADE_DETAILS_UOM_UOM_PLACEHOLDER",
|
|
41294
|
-
value: (unit === null || unit === void 0 ? void 0 : unit.uom) || "NA"
|
|
41295
|
-
}, {
|
|
41296
|
-
title: "TL_NEW_TRADE_DETAILS_UOM_VALUE_LABEL",
|
|
41297
|
-
value: (unit === null || unit === void 0 ? void 0 : unit.uomValue) || "NA"
|
|
41298
|
-
}]
|
|
41299
|
-
};
|
|
41300
|
-
})
|
|
41301
|
-
}
|
|
41302
|
-
};
|
|
41303
|
-
var accessories = {
|
|
41304
|
-
title: "TL_NEW_TRADE_DETAILS_HEADER_ACC",
|
|
41305
|
-
additionalDetails: {
|
|
41306
|
-
accessories: response === null || response === void 0 ? void 0 : (_response$tradeLicens12 = response.tradeLicenseDetail) === null || _response$tradeLicens12 === void 0 ? void 0 : (_response$tradeLicens13 = _response$tradeLicens12.accessories) === null || _response$tradeLicens13 === void 0 ? void 0 : _response$tradeLicens13.map(function (unit, index) {
|
|
41307
|
-
var accessoryCategory = "NA";
|
|
41308
|
-
|
|
41309
|
-
if (unit !== null && unit !== void 0 && unit.accessoryCategory) {
|
|
41310
|
-
accessoryCategory = stringReplaceAll$1(unit === null || unit === void 0 ? void 0 : unit.accessoryCategory, ".", "_");
|
|
41311
|
-
accessoryCategory = "TRADELICENSE_ACCESSORIESCATEGORY_" + stringReplaceAll$1(accessoryCategory, "-", "_");
|
|
42533
|
+
function _temp3(propertyDetails) {
|
|
42534
|
+
function _temp2() {
|
|
42535
|
+
var _propertyDetails$Prop, _response$tradeLicens2, _response$tradeLicens3, _response$tradeLicens4, _response$tradeLicens5, _response$tradeLicens6, _response$tradeLicens7, _response$tradeLicens8, _response$tradeLicens9, _response$tradeLicens10, _response$tradeLicens11, _response$tradeLicens12, _response$tradeLicens13, _response$tradeLicens14, _propertyDetails$Prop39, _propertyDetails$Prop40, _propertyDetails$Prop41, _propertyDetails$Prop42, _propertyDetails$Prop43, _propertyDetails$Prop44, _propertyDetails$Prop45, _propertyDetails$Prop46, _propertyDetails$Prop47, _response$tradeLicens15, _response$tradeLicens16, _response$tradeLicens17, _response$tradeLicens18, _response$tradeLicens19, _response$tradeLicens20, _response$tradeLicens21, _response$tradeLicens22, _response$tradeLicens23, _response$tradeLicens24, _response$tradeLicens25, _response$tradeLicens26, _response$tradeLicens27, _response$tradeLicens28, _response$tradeLicens29, _response$tradeLicens30, _response$tradeLicens31, _response$tradeLicens32, _response$tradeLicens47, _response$tradeLicens48, _response$tradeLicens49, _response$tradeLicens50, _response$tradeLicens53, _response$tradeLicens54, _response$tradeLicens57, _response$tradeLicens58, _propertyDetails$Prop48, _propertyDetails$Prop49, _response$tradeLicens59;
|
|
42536
|
+
|
|
42537
|
+
var propertyAddress = "";
|
|
42538
|
+
|
|
42539
|
+
if (propertyDetails && propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop = propertyDetails.Properties) !== null && _propertyDetails$Prop !== void 0 && _propertyDetails$Prop.length) {
|
|
42540
|
+
var _propertyDetails$Prop2, _propertyDetails$Prop3, _propertyDetails$Prop8, _propertyDetails$Prop9, _propertyDetails$Prop14, _propertyDetails$Prop15, _propertyDetails$Prop21, _propertyDetails$Prop22, _propertyDetails$Prop23, _propertyDetails$Prop29, _propertyDetails$Prop30, _propertyDetails$Prop35, _propertyDetails$Prop36;
|
|
42541
|
+
|
|
42542
|
+
if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop2 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop2 !== void 0 && (_propertyDetails$Prop3 = _propertyDetails$Prop2.address) !== null && _propertyDetails$Prop3 !== void 0 && _propertyDetails$Prop3.doorNo) {
|
|
42543
|
+
var _propertyDetails$Prop4, _propertyDetails$Prop5, _propertyDetails$Prop6, _propertyDetails$Prop7;
|
|
42544
|
+
|
|
42545
|
+
propertyAddress += propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop4 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop4 === void 0 ? void 0 : (_propertyDetails$Prop5 = _propertyDetails$Prop4.address) === null || _propertyDetails$Prop5 === void 0 ? void 0 : _propertyDetails$Prop5.doorNo;
|
|
42546
|
+
|
|
42547
|
+
if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop6 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop6 !== void 0 && (_propertyDetails$Prop7 = _propertyDetails$Prop6.address) !== null && _propertyDetails$Prop7 !== void 0 && _propertyDetails$Prop7.street) {
|
|
42548
|
+
propertyAddress += ", ";
|
|
41312
42549
|
}
|
|
42550
|
+
}
|
|
41313
42551
|
|
|
41314
|
-
|
|
41315
|
-
|
|
41316
|
-
|
|
41317
|
-
|
|
41318
|
-
|
|
41319
|
-
|
|
41320
|
-
|
|
41321
|
-
|
|
41322
|
-
|
|
41323
|
-
|
|
41324
|
-
|
|
41325
|
-
|
|
41326
|
-
|
|
41327
|
-
|
|
41328
|
-
|
|
41329
|
-
|
|
41330
|
-
|
|
42552
|
+
if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop8 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop8 !== void 0 && (_propertyDetails$Prop9 = _propertyDetails$Prop8.address) !== null && _propertyDetails$Prop9 !== void 0 && _propertyDetails$Prop9.street) {
|
|
42553
|
+
var _propertyDetails$Prop10, _propertyDetails$Prop11, _propertyDetails$Prop12, _propertyDetails$Prop13;
|
|
42554
|
+
|
|
42555
|
+
propertyAddress += propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop10 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop10 === void 0 ? void 0 : (_propertyDetails$Prop11 = _propertyDetails$Prop10.address) === null || _propertyDetails$Prop11 === void 0 ? void 0 : _propertyDetails$Prop11.street;
|
|
42556
|
+
|
|
42557
|
+
if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop12 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop12 !== void 0 && (_propertyDetails$Prop13 = _propertyDetails$Prop12.address) !== null && _propertyDetails$Prop13 !== void 0 && _propertyDetails$Prop13.landmark) {
|
|
42558
|
+
propertyAddress += ", ";
|
|
42559
|
+
}
|
|
42560
|
+
}
|
|
42561
|
+
|
|
42562
|
+
if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop14 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop14 !== void 0 && (_propertyDetails$Prop15 = _propertyDetails$Prop14.address) !== null && _propertyDetails$Prop15 !== void 0 && _propertyDetails$Prop15.landmark) {
|
|
42563
|
+
var _propertyDetails$Prop16, _propertyDetails$Prop17, _propertyDetails$Prop18, _propertyDetails$Prop19, _propertyDetails$Prop20;
|
|
42564
|
+
|
|
42565
|
+
propertyAddress += propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop16 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop16 === void 0 ? void 0 : (_propertyDetails$Prop17 = _propertyDetails$Prop16.address) === null || _propertyDetails$Prop17 === void 0 ? void 0 : _propertyDetails$Prop17.landmark;
|
|
42566
|
+
|
|
42567
|
+
if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop18 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop18 !== void 0 && (_propertyDetails$Prop19 = _propertyDetails$Prop18.address) !== null && _propertyDetails$Prop19 !== void 0 && (_propertyDetails$Prop20 = _propertyDetails$Prop19.locality) !== null && _propertyDetails$Prop20 !== void 0 && _propertyDetails$Prop20.name) {
|
|
42568
|
+
propertyAddress += ", ";
|
|
42569
|
+
}
|
|
42570
|
+
}
|
|
42571
|
+
|
|
42572
|
+
if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop21 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop21 !== void 0 && (_propertyDetails$Prop22 = _propertyDetails$Prop21.address) !== null && _propertyDetails$Prop22 !== void 0 && (_propertyDetails$Prop23 = _propertyDetails$Prop22.locality) !== null && _propertyDetails$Prop23 !== void 0 && _propertyDetails$Prop23.name) {
|
|
42573
|
+
var _propertyDetails$Prop24, _propertyDetails$Prop25, _propertyDetails$Prop26, _propertyDetails$Prop27, _propertyDetails$Prop28;
|
|
42574
|
+
|
|
42575
|
+
propertyAddress += propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop24 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop24 === void 0 ? void 0 : (_propertyDetails$Prop25 = _propertyDetails$Prop24.address) === null || _propertyDetails$Prop25 === void 0 ? void 0 : (_propertyDetails$Prop26 = _propertyDetails$Prop25.locality) === null || _propertyDetails$Prop26 === void 0 ? void 0 : _propertyDetails$Prop26.name;
|
|
42576
|
+
|
|
42577
|
+
if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop27 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop27 !== void 0 && (_propertyDetails$Prop28 = _propertyDetails$Prop27.address) !== null && _propertyDetails$Prop28 !== void 0 && _propertyDetails$Prop28.city) {
|
|
42578
|
+
propertyAddress += ", ";
|
|
42579
|
+
}
|
|
42580
|
+
}
|
|
42581
|
+
|
|
42582
|
+
if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop29 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop29 !== void 0 && (_propertyDetails$Prop30 = _propertyDetails$Prop29.address) !== null && _propertyDetails$Prop30 !== void 0 && _propertyDetails$Prop30.city) {
|
|
42583
|
+
var _propertyDetails$Prop31, _propertyDetails$Prop32, _propertyDetails$Prop33, _propertyDetails$Prop34;
|
|
42584
|
+
|
|
42585
|
+
propertyAddress += propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop31 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop31 === void 0 ? void 0 : (_propertyDetails$Prop32 = _propertyDetails$Prop31.address) === null || _propertyDetails$Prop32 === void 0 ? void 0 : _propertyDetails$Prop32.city;
|
|
42586
|
+
|
|
42587
|
+
if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop33 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop33 !== void 0 && (_propertyDetails$Prop34 = _propertyDetails$Prop33.address) !== null && _propertyDetails$Prop34 !== void 0 && _propertyDetails$Prop34.pincode) {
|
|
42588
|
+
propertyAddress += ", ";
|
|
42589
|
+
}
|
|
42590
|
+
}
|
|
42591
|
+
|
|
42592
|
+
if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop35 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop35 !== void 0 && (_propertyDetails$Prop36 = _propertyDetails$Prop35.address) !== null && _propertyDetails$Prop36 !== void 0 && _propertyDetails$Prop36.pincode) {
|
|
42593
|
+
var _propertyDetails$Prop37, _propertyDetails$Prop38;
|
|
42594
|
+
|
|
42595
|
+
propertyAddress += propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop37 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop37 === void 0 ? void 0 : (_propertyDetails$Prop38 = _propertyDetails$Prop37.address) === null || _propertyDetails$Prop38 === void 0 ? void 0 : _propertyDetails$Prop38.pincode;
|
|
42596
|
+
}
|
|
41331
42597
|
}
|
|
41332
|
-
|
|
41333
|
-
|
|
41334
|
-
|
|
41335
|
-
|
|
41336
|
-
|
|
41337
|
-
|
|
41338
|
-
|
|
41339
|
-
|
|
41340
|
-
|
|
41341
|
-
|
|
41342
|
-
|
|
41343
|
-
|
|
41344
|
-
|
|
41345
|
-
|
|
41346
|
-
|
|
41347
|
-
|
|
41348
|
-
|
|
41349
|
-
|
|
41350
|
-
|
|
41351
|
-
|
|
41352
|
-
|
|
41353
|
-
|
|
41354
|
-
|
|
41355
|
-
|
|
41356
|
-
|
|
41357
|
-
|
|
41358
|
-
|
|
41359
|
-
|
|
41360
|
-
|
|
41361
|
-
|
|
41362
|
-
|
|
41363
|
-
|
|
41364
|
-
|
|
41365
|
-
|
|
41366
|
-
|
|
41367
|
-
|
|
41368
|
-
|
|
41369
|
-
|
|
41370
|
-
|
|
41371
|
-
|
|
41372
|
-
|
|
41373
|
-
|
|
41374
|
-
title: "TL_NEW_OWNER_DETAILS_GENDER_LABEL",
|
|
41375
|
-
value: (owner === null || owner === void 0 ? void 0 : owner.gender) || "NA"
|
|
41376
|
-
}, {
|
|
41377
|
-
title: "TL_NEW_OWNER_DETAILS_EMAIL_LABEL",
|
|
41378
|
-
value: (owner === null || owner === void 0 ? void 0 : owner.emailId) || "NA"
|
|
41379
|
-
}, {
|
|
41380
|
-
title: "TL_OWNER_SPECIAL_CATEGORY",
|
|
41381
|
-
value: owner !== null && owner !== void 0 && owner.ownerType ? "COMMON_MASTERS_OWNERTYPE_" + (owner === null || owner === void 0 ? void 0 : owner.ownerType) : "NA"
|
|
41382
|
-
}, {
|
|
41383
|
-
title: "TL_NEW_OWNER_DETAILS_ADDR_LABEL",
|
|
41384
|
-
value: (owner === null || owner === void 0 ? void 0 : owner.permanentAddress) || "NA"
|
|
41385
|
-
}]
|
|
41386
|
-
};
|
|
41387
|
-
}),
|
|
41388
|
-
documents: [{
|
|
41389
|
-
title: "PT_COMMON_DOCS",
|
|
41390
|
-
values: response === null || response === void 0 ? void 0 : (_response$tradeLicens33 = response.tradeLicenseDetail) === null || _response$tradeLicens33 === void 0 ? void 0 : (_response$tradeLicens34 = _response$tradeLicens33.applicationDocuments) === null || _response$tradeLicens34 === void 0 ? void 0 : _response$tradeLicens34.map(function (document) {
|
|
42598
|
+
|
|
42599
|
+
var employeeResponse = [];
|
|
42600
|
+
var tradedetails = {
|
|
42601
|
+
title: "TL_COMMON_TR_DETAILS",
|
|
42602
|
+
asSectionHeader: true,
|
|
42603
|
+
values: [{
|
|
42604
|
+
title: "TL_FINANCIAL_YEAR_LABEL",
|
|
42605
|
+
value: response !== null && response !== void 0 && response.financialYear ? "FY" + (response === null || response === void 0 ? void 0 : response.financialYear) : "NA"
|
|
42606
|
+
}, {
|
|
42607
|
+
title: "TL_NEW_TRADE_DETAILS_LIC_TYPE_LABEL",
|
|
42608
|
+
value: response !== null && response !== void 0 && response.licenseType ? "TRADELICENSE_LICENSETYPE_" + (response === null || response === void 0 ? void 0 : response.licenseType) : "NA"
|
|
42609
|
+
}, {
|
|
42610
|
+
title: "TL_COMMON_TABLE_COL_TRD_NAME",
|
|
42611
|
+
value: response === null || response === void 0 ? void 0 : response.tradeName
|
|
42612
|
+
}, {
|
|
42613
|
+
title: "TL_NEW_TRADE_DETAILS_STRUCT_TYPE_LABEL",
|
|
42614
|
+
value: response !== null && response !== void 0 && (_response$tradeLicens2 = response.tradeLicenseDetail) !== null && _response$tradeLicens2 !== void 0 && _response$tradeLicens2.structureType ? "COMMON_MASTERS_STRUCTURETYPE_" + (response === null || response === void 0 ? void 0 : (_response$tradeLicens3 = response.tradeLicenseDetail) === null || _response$tradeLicens3 === void 0 ? void 0 : (_response$tradeLicens4 = _response$tradeLicens3.structureType) === null || _response$tradeLicens4 === void 0 ? void 0 : _response$tradeLicens4.split(".")[0]) : "NA"
|
|
42615
|
+
}, {
|
|
42616
|
+
title: "TL_NEW_TRADE_DETAILS_STRUCT_SUB_TYPE_LABEL",
|
|
42617
|
+
value: response !== null && response !== void 0 && (_response$tradeLicens5 = response.tradeLicenseDetail) !== null && _response$tradeLicens5 !== void 0 && _response$tradeLicens5.structureType ? "COMMON_MASTERS_STRUCTURETYPE_" + stringReplaceAll$2(response === null || response === void 0 ? void 0 : (_response$tradeLicens6 = response.tradeLicenseDetail) === null || _response$tradeLicens6 === void 0 ? void 0 : _response$tradeLicens6.structureType, ".", "_") : "NA"
|
|
42618
|
+
}, {
|
|
42619
|
+
title: "TL_NEW_TRADE_DETAILS_TRADE_COMM_DATE_LABEL",
|
|
42620
|
+
value: response !== null && response !== void 0 && response.commencementDate ? convertEpochToDate(response === null || response === void 0 ? void 0 : response.commencementDate) : "NA"
|
|
42621
|
+
}, {
|
|
42622
|
+
title: "TL_NEW_GST_NUMBER_LABEL",
|
|
42623
|
+
value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens7 = response.tradeLicenseDetail) === null || _response$tradeLicens7 === void 0 ? void 0 : (_response$tradeLicens8 = _response$tradeLicens7.additionalDetail) === null || _response$tradeLicens8 === void 0 ? void 0 : _response$tradeLicens8.gstNo) || "NA"
|
|
42624
|
+
}, {
|
|
42625
|
+
title: "TL_NEW_OPERATIONAL_SQ_FT_AREA_LABEL",
|
|
42626
|
+
value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens9 = response.tradeLicenseDetail) === null || _response$tradeLicens9 === void 0 ? void 0 : _response$tradeLicens9.operationalArea) || "NA"
|
|
42627
|
+
}, {
|
|
42628
|
+
title: "TL_NEW_NUMBER_OF_EMPLOYEES_LABEL",
|
|
42629
|
+
value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens10 = response.tradeLicenseDetail) === null || _response$tradeLicens10 === void 0 ? void 0 : _response$tradeLicens10.noOfEmployees) || "NA"
|
|
42630
|
+
}]
|
|
42631
|
+
};
|
|
42632
|
+
var tradeUnits = {
|
|
42633
|
+
title: "TL_TRADE_UNITS_HEADER",
|
|
42634
|
+
additionalDetails: {
|
|
42635
|
+
units: response === null || response === void 0 ? void 0 : (_response$tradeLicens11 = response.tradeLicenseDetail) === null || _response$tradeLicens11 === void 0 ? void 0 : (_response$tradeLicens12 = _response$tradeLicens11.tradeUnits) === null || _response$tradeLicens12 === void 0 ? void 0 : _response$tradeLicens12.map(function (unit, index) {
|
|
42636
|
+
var _unit$tradeType, _unit$tradeType2;
|
|
42637
|
+
|
|
42638
|
+
var tradeSubType = stringReplaceAll$2(unit === null || unit === void 0 ? void 0 : unit.tradeType, ".", "_");
|
|
42639
|
+
tradeSubType = stringReplaceAll$2(tradeSubType, "-", "_");
|
|
41391
42640
|
return {
|
|
41392
|
-
title: "
|
|
41393
|
-
|
|
41394
|
-
|
|
41395
|
-
|
|
42641
|
+
title: "TL_UNIT_HEADER",
|
|
42642
|
+
values: [{
|
|
42643
|
+
title: "TRADELICENSE_TRADECATEGORY_LABEL",
|
|
42644
|
+
value: unit !== null && unit !== void 0 && unit.tradeType ? "TRADELICENSE_TRADETYPE_" + (unit === null || unit === void 0 ? void 0 : (_unit$tradeType = unit.tradeType) === null || _unit$tradeType === void 0 ? void 0 : _unit$tradeType.split(".")[0]) : "NA"
|
|
42645
|
+
}, {
|
|
42646
|
+
title: "TRADELICENSE_TRADETYPE_LABEL",
|
|
42647
|
+
value: unit !== null && unit !== void 0 && unit.tradeType ? "TRADELICENSE_TRADETYPE_" + (unit === null || unit === void 0 ? void 0 : (_unit$tradeType2 = unit.tradeType) === null || _unit$tradeType2 === void 0 ? void 0 : _unit$tradeType2.split(".")[1]) : "NA"
|
|
42648
|
+
}, {
|
|
42649
|
+
title: "TL_NEW_TRADE_SUB_TYPE_LABEL",
|
|
42650
|
+
value: tradeSubType ? "TRADELICENSE_TRADETYPE_" + tradeSubType : "NA"
|
|
42651
|
+
}, {
|
|
42652
|
+
title: "TL_NEW_TRADE_DETAILS_UOM_UOM_PLACEHOLDER",
|
|
42653
|
+
value: (unit === null || unit === void 0 ? void 0 : unit.uom) || "NA"
|
|
42654
|
+
}, {
|
|
42655
|
+
title: "TL_NEW_TRADE_DETAILS_UOM_VALUE_LABEL",
|
|
42656
|
+
value: (unit === null || unit === void 0 ? void 0 : unit.uomValue) || "NA"
|
|
42657
|
+
}]
|
|
41396
42658
|
};
|
|
41397
42659
|
})
|
|
41398
|
-
}
|
|
41399
|
-
}
|
|
41400
|
-
|
|
42660
|
+
}
|
|
42661
|
+
};
|
|
42662
|
+
var accessories = {
|
|
42663
|
+
title: "TL_NEW_TRADE_DETAILS_HEADER_ACC",
|
|
42664
|
+
additionalDetails: {
|
|
42665
|
+
accessories: response === null || response === void 0 ? void 0 : (_response$tradeLicens13 = response.tradeLicenseDetail) === null || _response$tradeLicens13 === void 0 ? void 0 : (_response$tradeLicens14 = _response$tradeLicens13.accessories) === null || _response$tradeLicens14 === void 0 ? void 0 : _response$tradeLicens14.map(function (unit, index) {
|
|
42666
|
+
var accessoryCategory = "NA";
|
|
41401
42667
|
|
|
41402
|
-
|
|
41403
|
-
|
|
42668
|
+
if (unit !== null && unit !== void 0 && unit.accessoryCategory) {
|
|
42669
|
+
accessoryCategory = stringReplaceAll$2(unit === null || unit === void 0 ? void 0 : unit.accessoryCategory, ".", "_");
|
|
42670
|
+
accessoryCategory = "TRADELICENSE_ACCESSORIESCATEGORY_" + stringReplaceAll$2(accessoryCategory, "-", "_");
|
|
42671
|
+
}
|
|
41404
42672
|
|
|
41405
|
-
|
|
41406
|
-
|
|
42673
|
+
return {
|
|
42674
|
+
title: "TL_ACCESSORY_LABEL",
|
|
42675
|
+
values: [{
|
|
42676
|
+
title: "TL_NEW_TRADE_DETAILS_ACC_LABEL",
|
|
42677
|
+
value: accessoryCategory
|
|
42678
|
+
}, {
|
|
42679
|
+
title: "TL_NEW_TRADE_DETAILS_UOM_UOM_PLACEHOLDER",
|
|
42680
|
+
value: (unit === null || unit === void 0 ? void 0 : unit.uom) || "NA"
|
|
42681
|
+
}, {
|
|
42682
|
+
title: "TL_NEW_TRADE_DETAILS_UOM_VALUE_LABEL",
|
|
42683
|
+
value: (unit === null || unit === void 0 ? void 0 : unit.uomValue) || "NA"
|
|
42684
|
+
}, {
|
|
42685
|
+
title: "TL_ACCESSORY_COUNT_LABEL",
|
|
42686
|
+
value: (unit === null || unit === void 0 ? void 0 : unit.count) || "NA"
|
|
42687
|
+
}]
|
|
42688
|
+
};
|
|
42689
|
+
})
|
|
42690
|
+
}
|
|
42691
|
+
};
|
|
42692
|
+
var PropertyDetail = {
|
|
42693
|
+
title: "PT_DETAILS",
|
|
41407
42694
|
values: [{
|
|
41408
|
-
title: "
|
|
41409
|
-
value: (
|
|
42695
|
+
title: "TL_PROPERTY_ID",
|
|
42696
|
+
value: (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop39 = propertyDetails.Properties) === null || _propertyDetails$Prop39 === void 0 ? void 0 : (_propertyDetails$Prop40 = _propertyDetails$Prop39[0]) === null || _propertyDetails$Prop40 === void 0 ? void 0 : _propertyDetails$Prop40.propertyId) || "NA"
|
|
42697
|
+
}, {
|
|
42698
|
+
title: "PT_OWNER_NAME",
|
|
42699
|
+
value: (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop41 = propertyDetails.Properties) === null || _propertyDetails$Prop41 === void 0 ? void 0 : (_propertyDetails$Prop42 = _propertyDetails$Prop41[0]) === null || _propertyDetails$Prop42 === void 0 ? void 0 : (_propertyDetails$Prop43 = _propertyDetails$Prop42.owners[0]) === null || _propertyDetails$Prop43 === void 0 ? void 0 : _propertyDetails$Prop43.name) || "NA"
|
|
41410
42700
|
}, {
|
|
41411
|
-
title: "
|
|
41412
|
-
value:
|
|
42701
|
+
title: "PROPERTY_ADDRESS",
|
|
42702
|
+
value: propertyAddress || "NA"
|
|
42703
|
+
}, {
|
|
42704
|
+
title: "TL_VIEW_PROPERTY_DETAIL",
|
|
42705
|
+
to: "/digit-ui/employee/commonpt/view-property?propertyId=" + (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop44 = propertyDetails.Properties) === null || _propertyDetails$Prop44 === void 0 ? void 0 : (_propertyDetails$Prop45 = _propertyDetails$Prop44[0]) === null || _propertyDetails$Prop45 === void 0 ? void 0 : _propertyDetails$Prop45.propertyId) + "&tenantId=" + (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop46 = propertyDetails.Properties) === null || _propertyDetails$Prop46 === void 0 ? void 0 : (_propertyDetails$Prop47 = _propertyDetails$Prop46[0]) === null || _propertyDetails$Prop47 === void 0 ? void 0 : _propertyDetails$Prop47.tenantId),
|
|
42706
|
+
value: "",
|
|
42707
|
+
isLink: true
|
|
41413
42708
|
}]
|
|
41414
42709
|
};
|
|
41415
|
-
response
|
|
41416
|
-
|
|
42710
|
+
var cityOfApp = cloneDeep_1(response === null || response === void 0 ? void 0 : (_response$tradeLicens15 = response.tradeLicenseDetail) === null || _response$tradeLicens15 === void 0 ? void 0 : (_response$tradeLicens16 = _response$tradeLicens15.address) === null || _response$tradeLicens16 === void 0 ? void 0 : _response$tradeLicens16.city);
|
|
42711
|
+
var localityCode = cloneDeep_1(response === null || response === void 0 ? void 0 : (_response$tradeLicens17 = response.tradeLicenseDetail) === null || _response$tradeLicens17 === void 0 ? void 0 : (_response$tradeLicens18 = _response$tradeLicens17.address) === null || _response$tradeLicens18 === void 0 ? void 0 : (_response$tradeLicens19 = _response$tradeLicens18.locality) === null || _response$tradeLicens19 === void 0 ? void 0 : _response$tradeLicens19.code);
|
|
42712
|
+
var tradeAddress = {
|
|
42713
|
+
title: "TL_CHECK_ADDRESS",
|
|
42714
|
+
values: [{
|
|
42715
|
+
title: "CORE_COMMON_PINCODE",
|
|
42716
|
+
value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens20 = response.tradeLicenseDetail) === null || _response$tradeLicens20 === void 0 ? void 0 : (_response$tradeLicens21 = _response$tradeLicens20.address) === null || _response$tradeLicens21 === void 0 ? void 0 : _response$tradeLicens21.pincode) || "NA"
|
|
42717
|
+
}, {
|
|
42718
|
+
title: "MYCITY_CODE_LABEL",
|
|
42719
|
+
value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens22 = response.tradeLicenseDetail) === null || _response$tradeLicens22 === void 0 ? void 0 : (_response$tradeLicens23 = _response$tradeLicens22.address) === null || _response$tradeLicens23 === void 0 ? void 0 : _response$tradeLicens23.city) || "NA"
|
|
42720
|
+
}, {
|
|
42721
|
+
title: "TL_LOCALIZATION_LOCALITY",
|
|
42722
|
+
value: stringReplaceAll$2(cityOfApp === null || cityOfApp === void 0 ? void 0 : cityOfApp.toUpperCase(), ".", "_") + "_REVENUE_" + localityCode
|
|
42723
|
+
}, {
|
|
42724
|
+
title: "TL_LOCALIZATION_BUILDING_NO",
|
|
42725
|
+
value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens24 = response.tradeLicenseDetail) === null || _response$tradeLicens24 === void 0 ? void 0 : (_response$tradeLicens25 = _response$tradeLicens24.address) === null || _response$tradeLicens25 === void 0 ? void 0 : _response$tradeLicens25.doorNo) || "NA"
|
|
42726
|
+
}, {
|
|
42727
|
+
title: "TL_LOCALIZATION_STREET_NAME",
|
|
42728
|
+
value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens26 = response.tradeLicenseDetail) === null || _response$tradeLicens26 === void 0 ? void 0 : (_response$tradeLicens27 = _response$tradeLicens26.address) === null || _response$tradeLicens27 === void 0 ? void 0 : _response$tradeLicens27.street) || "NA"
|
|
42729
|
+
}]
|
|
42730
|
+
};
|
|
42731
|
+
var checkOwnerLength = (response === null || response === void 0 ? void 0 : (_response$tradeLicens28 = response.tradeLicenseDetail) === null || _response$tradeLicens28 === void 0 ? void 0 : (_response$tradeLicens29 = _response$tradeLicens28.owners) === null || _response$tradeLicens29 === void 0 ? void 0 : _response$tradeLicens29.length) || 1;
|
|
42732
|
+
var owners = response !== null && response !== void 0 && (_response$tradeLicens30 = response.tradeLicenseDetail) !== null && _response$tradeLicens30 !== void 0 && _response$tradeLicens30.subOwnerShipCategory.includes("INSTITUTIONAL") ? {
|
|
42733
|
+
title: "ES_NEW_APPLICATION_OWNERSHIP_DETAILS",
|
|
42734
|
+
additionalDetails: {
|
|
42735
|
+
owners: response === null || response === void 0 ? void 0 : (_response$tradeLicens31 = response.tradeLicenseDetail) === null || _response$tradeLicens31 === void 0 ? void 0 : (_response$tradeLicens32 = _response$tradeLicens31.owners) === null || _response$tradeLicens32 === void 0 ? void 0 : _response$tradeLicens32.map(function (owner, index) {
|
|
42736
|
+
var _response$tradeLicens33, _response$tradeLicens34, _response$tradeLicens35, _response$tradeLicens36, _response$tradeLicens37, _response$tradeLicens38, _response$tradeLicens39, _response$tradeLicens40, _response$tradeLicens41, _response$tradeLicens42, _response$tradeLicens43, _response$tradeLicens44, _response$tradeLicens45, _response$tradeLicens46;
|
|
41417
42737
|
|
|
41418
|
-
|
|
41419
|
-
|
|
41420
|
-
|
|
41421
|
-
|
|
41422
|
-
|
|
41423
|
-
|
|
41424
|
-
|
|
41425
|
-
|
|
41426
|
-
|
|
41427
|
-
|
|
41428
|
-
|
|
41429
|
-
|
|
41430
|
-
|
|
42738
|
+
var subOwnerShipCategory = response !== null && response !== void 0 && (_response$tradeLicens33 = response.tradeLicenseDetail) !== null && _response$tradeLicens33 !== void 0 && _response$tradeLicens33.subOwnerShipCategory ? "COMMON_MASTERS_OWNERSHIPCATEGORY_" + stringReplaceAll$2(response === null || response === void 0 ? void 0 : (_response$tradeLicens34 = response.tradeLicenseDetail) === null || _response$tradeLicens34 === void 0 ? void 0 : _response$tradeLicens34.subOwnerShipCategory, ".", "_") : "NA";
|
|
42739
|
+
return {
|
|
42740
|
+
title: Number(checkOwnerLength) > 1 ? "TL_PAYMENT_PAID_BY_PLACEHOLDER" : "",
|
|
42741
|
+
values: [{
|
|
42742
|
+
title: "TL_NEW_OWNER_DETAILS_OWNERSHIP_TYPE_LABEL",
|
|
42743
|
+
value: subOwnerShipCategory
|
|
42744
|
+
}, {
|
|
42745
|
+
title: "TL_INSTITUTION_NAME_LABEL",
|
|
42746
|
+
value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens35 = response.tradeLicenseDetail) === null || _response$tradeLicens35 === void 0 ? void 0 : (_response$tradeLicens36 = _response$tradeLicens35.institution) === null || _response$tradeLicens36 === void 0 ? void 0 : _response$tradeLicens36.instituionName) || "NA"
|
|
42747
|
+
}, {
|
|
42748
|
+
title: "TL_NEW_OWNER_DESIG_LABEL",
|
|
42749
|
+
value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens37 = response.tradeLicenseDetail) === null || _response$tradeLicens37 === void 0 ? void 0 : (_response$tradeLicens38 = _response$tradeLicens37.institution) === null || _response$tradeLicens38 === void 0 ? void 0 : _response$tradeLicens38.designation) || "NA"
|
|
42750
|
+
}, {
|
|
42751
|
+
title: "TL_TELEPHONE_NUMBER_LABEL",
|
|
42752
|
+
value: response !== null && response !== void 0 && (_response$tradeLicens39 = response.tradeLicenseDetail) !== null && _response$tradeLicens39 !== void 0 && (_response$tradeLicens40 = _response$tradeLicens39.institution) !== null && _response$tradeLicens40 !== void 0 && _response$tradeLicens40.contactNo || (response === null || response === void 0 ? void 0 : (_response$tradeLicens41 = response.tradeLicenseDetail) === null || _response$tradeLicens41 === void 0 ? void 0 : (_response$tradeLicens42 = _response$tradeLicens41.institution) === null || _response$tradeLicens42 === void 0 ? void 0 : _response$tradeLicens42.contactNo) !== "" ? response === null || response === void 0 ? void 0 : (_response$tradeLicens43 = response.tradeLicenseDetail) === null || _response$tradeLicens43 === void 0 ? void 0 : (_response$tradeLicens44 = _response$tradeLicens43.institution) === null || _response$tradeLicens44 === void 0 ? void 0 : _response$tradeLicens44.contactNo : "NA"
|
|
42753
|
+
}, {
|
|
42754
|
+
title: "TL_OWNER_S_MOBILE_NUM_LABEL",
|
|
42755
|
+
value: (owner === null || owner === void 0 ? void 0 : owner.mobileNumber) || "NA"
|
|
42756
|
+
}, {
|
|
42757
|
+
title: "TL_NEW_OWNER_DETAILS_NAME_LABEL",
|
|
42758
|
+
value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens45 = response.tradeLicenseDetail) === null || _response$tradeLicens45 === void 0 ? void 0 : (_response$tradeLicens46 = _response$tradeLicens45.institution) === null || _response$tradeLicens46 === void 0 ? void 0 : _response$tradeLicens46.name) || "NA"
|
|
42759
|
+
}, {
|
|
42760
|
+
title: "TL_NEW_OWNER_DETAILS_EMAIL_LABEL",
|
|
42761
|
+
value: owner !== null && owner !== void 0 && owner.emailId || (owner === null || owner === void 0 ? void 0 : owner.emailId) !== "" ? owner === null || owner === void 0 ? void 0 : owner.emailId : "NA"
|
|
42762
|
+
}]
|
|
42763
|
+
};
|
|
42764
|
+
}),
|
|
42765
|
+
documents: [{
|
|
42766
|
+
title: "PT_COMMON_DOCS",
|
|
42767
|
+
values: response === null || response === void 0 ? void 0 : (_response$tradeLicens47 = response.tradeLicenseDetail) === null || _response$tradeLicens47 === void 0 ? void 0 : (_response$tradeLicens48 = _response$tradeLicens47.applicationDocuments) === null || _response$tradeLicens48 === void 0 ? void 0 : _response$tradeLicens48.map(function (document) {
|
|
42768
|
+
return {
|
|
42769
|
+
title: "TL_NEW_" + (document === null || document === void 0 ? void 0 : document.documentType.replace(".", "_")),
|
|
42770
|
+
documentType: document === null || document === void 0 ? void 0 : document.documentType,
|
|
42771
|
+
documentUid: document === null || document === void 0 ? void 0 : document.documentUid,
|
|
42772
|
+
fileStoreId: document === null || document === void 0 ? void 0 : document.fileStoreId
|
|
42773
|
+
};
|
|
42774
|
+
})
|
|
42775
|
+
}]
|
|
42776
|
+
}
|
|
42777
|
+
} : {
|
|
42778
|
+
title: "ES_NEW_APPLICATION_OWNERSHIP_DETAILS",
|
|
42779
|
+
additionalDetails: {
|
|
42780
|
+
owners: response === null || response === void 0 ? void 0 : (_response$tradeLicens49 = response.tradeLicenseDetail) === null || _response$tradeLicens49 === void 0 ? void 0 : (_response$tradeLicens50 = _response$tradeLicens49.owners) === null || _response$tradeLicens50 === void 0 ? void 0 : _response$tradeLicens50.map(function (owner, index) {
|
|
42781
|
+
var _response$tradeLicens51, _response$tradeLicens52;
|
|
41431
42782
|
|
|
41432
|
-
|
|
42783
|
+
var subOwnerShipCategory = response !== null && response !== void 0 && (_response$tradeLicens51 = response.tradeLicenseDetail) !== null && _response$tradeLicens51 !== void 0 && _response$tradeLicens51.subOwnerShipCategory ? "COMMON_MASTERS_OWNERSHIPCATEGORY_" + stringReplaceAll$2(response === null || response === void 0 ? void 0 : (_response$tradeLicens52 = response.tradeLicenseDetail) === null || _response$tradeLicens52 === void 0 ? void 0 : _response$tradeLicens52.subOwnerShipCategory, ".", "_") : "NA";
|
|
42784
|
+
return {
|
|
42785
|
+
title: Number(checkOwnerLength) > 1 ? "TL_PAYMENT_PAID_BY_PLACEHOLDER" : "",
|
|
42786
|
+
values: [{
|
|
42787
|
+
title: "TL_NEW_OWNER_DETAILS_OWNERSHIP_TYPE_LABEL",
|
|
42788
|
+
value: subOwnerShipCategory
|
|
42789
|
+
}, {
|
|
42790
|
+
title: "TL_OWNER_S_NAME_LABEL",
|
|
42791
|
+
value: (owner === null || owner === void 0 ? void 0 : owner.name) || "NA"
|
|
42792
|
+
}, {
|
|
42793
|
+
title: "TL_OWNER_S_MOBILE_NUM_LABEL",
|
|
42794
|
+
value: (owner === null || owner === void 0 ? void 0 : owner.mobileNumber) || "NA"
|
|
42795
|
+
}, {
|
|
42796
|
+
title: "TL_GUARDIAN_S_NAME_LABEL",
|
|
42797
|
+
value: (owner === null || owner === void 0 ? void 0 : owner.fatherOrHusbandName) || "NA"
|
|
42798
|
+
}, {
|
|
42799
|
+
title: "TL_RELATIONSHIP_WITH_GUARDIAN_LABEL",
|
|
42800
|
+
value: (owner === null || owner === void 0 ? void 0 : owner.relationship) || "NA"
|
|
42801
|
+
}, {
|
|
42802
|
+
title: "TL_NEW_OWNER_DETAILS_GENDER_LABEL",
|
|
42803
|
+
value: (owner === null || owner === void 0 ? void 0 : owner.gender) || "NA"
|
|
42804
|
+
}, {
|
|
42805
|
+
title: "TL_NEW_OWNER_DETAILS_EMAIL_LABEL",
|
|
42806
|
+
value: (owner === null || owner === void 0 ? void 0 : owner.emailId) || "NA"
|
|
42807
|
+
}, {
|
|
42808
|
+
title: "TL_OWNER_SPECIAL_CATEGORY",
|
|
42809
|
+
value: owner !== null && owner !== void 0 && owner.ownerType ? "COMMON_MASTERS_OWNERTYPE_" + (owner === null || owner === void 0 ? void 0 : owner.ownerType) : "NA"
|
|
42810
|
+
}, {
|
|
42811
|
+
title: "TL_NEW_OWNER_DETAILS_ADDR_LABEL",
|
|
42812
|
+
value: (owner === null || owner === void 0 ? void 0 : owner.permanentAddress) || "NA"
|
|
42813
|
+
}]
|
|
42814
|
+
};
|
|
42815
|
+
}),
|
|
42816
|
+
documents: [{
|
|
42817
|
+
title: "PT_COMMON_DOCS",
|
|
42818
|
+
values: response === null || response === void 0 ? void 0 : (_response$tradeLicens53 = response.tradeLicenseDetail) === null || _response$tradeLicens53 === void 0 ? void 0 : (_response$tradeLicens54 = _response$tradeLicens53.applicationDocuments) === null || _response$tradeLicens54 === void 0 ? void 0 : _response$tradeLicens54.map(function (document) {
|
|
42819
|
+
return {
|
|
42820
|
+
title: "TL_NEW_" + (document === null || document === void 0 ? void 0 : document.documentType.replace(".", "_")),
|
|
42821
|
+
documentType: document === null || document === void 0 ? void 0 : document.documentType,
|
|
42822
|
+
documentUid: document === null || document === void 0 ? void 0 : document.documentUid,
|
|
42823
|
+
fileStoreId: document === null || document === void 0 ? void 0 : document.fileStoreId
|
|
42824
|
+
};
|
|
42825
|
+
})
|
|
42826
|
+
}]
|
|
42827
|
+
}
|
|
42828
|
+
};
|
|
41433
42829
|
|
|
41434
|
-
|
|
41435
|
-
|
|
41436
|
-
|
|
41437
|
-
|
|
41438
|
-
|
|
41439
|
-
|
|
42830
|
+
if ((response === null || response === void 0 ? void 0 : response.workflowCode) == "NewTL" && (response === null || response === void 0 ? void 0 : response.status) !== "APPROVED") {
|
|
42831
|
+
var _response$tradeLicens55, _response$tradeLicens56;
|
|
42832
|
+
|
|
42833
|
+
var details = {
|
|
42834
|
+
title: "",
|
|
42835
|
+
values: [{
|
|
42836
|
+
title: "TL_COMMON_TABLE_COL_APP_NO",
|
|
42837
|
+
value: (response === null || response === void 0 ? void 0 : response.applicationNumber) || "NA"
|
|
42838
|
+
}, {
|
|
42839
|
+
title: "TL_APPLICATION_CHALLAN_LABEL",
|
|
42840
|
+
value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens55 = response.tradeLicenseDetail) === null || _response$tradeLicens55 === void 0 ? void 0 : _response$tradeLicens55.channel) && "TL_CHANNEL_" + (response === null || response === void 0 ? void 0 : (_response$tradeLicens56 = response.tradeLicenseDetail) === null || _response$tradeLicens56 === void 0 ? void 0 : _response$tradeLicens56.channel) || "NA"
|
|
42841
|
+
}]
|
|
42842
|
+
};
|
|
42843
|
+
response && employeeResponse.push(details);
|
|
42844
|
+
}
|
|
42845
|
+
|
|
42846
|
+
response && employeeResponse.push(tradedetails);
|
|
42847
|
+
(response === null || response === void 0 ? void 0 : (_response$tradeLicens57 = response.tradeLicenseDetail) === null || _response$tradeLicens57 === void 0 ? void 0 : _response$tradeLicens57.tradeUnits) && employeeResponse.push(tradeUnits);
|
|
42848
|
+
(response === null || response === void 0 ? void 0 : (_response$tradeLicens58 = response.tradeLicenseDetail) === null || _response$tradeLicens58 === void 0 ? void 0 : _response$tradeLicens58.accessories) && employeeResponse.push(accessories);
|
|
42849
|
+
(propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop48 = propertyDetails.Properties) === null || _propertyDetails$Prop48 === void 0 ? void 0 : _propertyDetails$Prop48.length) > 0 && employeeResponse.push(PropertyDetail);
|
|
42850
|
+
response && !((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop49 = propertyDetails.Properties) === null || _propertyDetails$Prop49 === void 0 ? void 0 : _propertyDetails$Prop49.length) > 0) && employeeResponse.push(tradeAddress);
|
|
42851
|
+
(response === null || response === void 0 ? void 0 : (_response$tradeLicens59 = response.tradeLicenseDetail) === null || _response$tradeLicens59 === void 0 ? void 0 : _response$tradeLicens59.owners) && employeeResponse.push(owners);
|
|
42852
|
+
return {
|
|
42853
|
+
tenantId: response.tenantId,
|
|
42854
|
+
applicationDetails: employeeResponse,
|
|
42855
|
+
additionalDetails: response === null || response === void 0 ? void 0 : response.additionalDetails,
|
|
42856
|
+
applicationData: response,
|
|
42857
|
+
numOfApplications: numOfApplications
|
|
41440
42858
|
};
|
|
41441
|
-
return Promise.resolve(TLSearch.numberOfApplications(tenantId, filters)).then(function (_TLSearch$numberOfApp) {
|
|
41442
|
-
numOfApplications = _TLSearch$numberOfApp;
|
|
41443
|
-
});
|
|
41444
42859
|
}
|
|
41445
|
-
}();
|
|
41446
42860
|
|
|
41447
|
-
|
|
42861
|
+
var numOfApplications = [];
|
|
42862
|
+
|
|
42863
|
+
var _temp = function () {
|
|
42864
|
+
if (response !== null && response !== void 0 && response.licenseNumber) {
|
|
42865
|
+
var licenseNumbers = response === null || response === void 0 ? void 0 : response.licenseNumber;
|
|
42866
|
+
var filters = {
|
|
42867
|
+
licenseNumbers: licenseNumbers,
|
|
42868
|
+
offset: 0
|
|
42869
|
+
};
|
|
42870
|
+
return Promise.resolve(TLSearch.numberOfApplications(tenantId, filters)).then(function (_TLSearch$numberOfApp) {
|
|
42871
|
+
numOfApplications = _TLSearch$numberOfApp;
|
|
42872
|
+
});
|
|
42873
|
+
}
|
|
42874
|
+
}();
|
|
42875
|
+
|
|
42876
|
+
return _temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp);
|
|
42877
|
+
}
|
|
42878
|
+
|
|
42879
|
+
var _response$tradeLicens = response === null || response === void 0 ? void 0 : (_response$tradeLicens60 = response.tradeLicenseDetail) === null || _response$tradeLicens60 === void 0 ? void 0 : (_response$tradeLicens61 = _response$tradeLicens60.additionalDetail) === null || _response$tradeLicens61 === void 0 ? void 0 : _response$tradeLicens61.propertyId;
|
|
42880
|
+
|
|
42881
|
+
return _response$tradeLicens ? Promise.resolve(Digit.PTService.search({
|
|
42882
|
+
tenantId: tenantId,
|
|
42883
|
+
filters: {
|
|
42884
|
+
propertyIds: response === null || response === void 0 ? void 0 : (_response$tradeLicens62 = response.tradeLicenseDetail) === null || _response$tradeLicens62 === void 0 ? void 0 : (_response$tradeLicens63 = _response$tradeLicens62.additionalDetail) === null || _response$tradeLicens63 === void 0 ? void 0 : _response$tradeLicens63.propertyId
|
|
42885
|
+
}
|
|
42886
|
+
})).then(_temp3) : _temp3(_response$tradeLicens);
|
|
41448
42887
|
});
|
|
41449
42888
|
} catch (e) {
|
|
41450
42889
|
return Promise.reject(e);
|
|
@@ -41520,6 +42959,9 @@ var useTLGenderMDMS = function useTLGenderMDMS(tenantId, moduleCode, type, confi
|
|
|
41520
42959
|
switch (type) {
|
|
41521
42960
|
case "GenderType":
|
|
41522
42961
|
return useTLGenders();
|
|
42962
|
+
|
|
42963
|
+
default:
|
|
42964
|
+
return null;
|
|
41523
42965
|
}
|
|
41524
42966
|
};
|
|
41525
42967
|
|
|
@@ -41790,21 +43232,45 @@ var ReceiptsService = {
|
|
|
41790
43232
|
}, filters, searchParams)
|
|
41791
43233
|
});
|
|
41792
43234
|
},
|
|
41793
|
-
receipt_download: function receipt_download(bussinessService, consumerCode, tenantId, pdfKey) {
|
|
43235
|
+
receipt_download: function receipt_download(bussinessService, consumerCode, tenantId, pdfKey, receiptNumbers) {
|
|
43236
|
+
var newParam = {
|
|
43237
|
+
bussinessService: bussinessService,
|
|
43238
|
+
tenantId: tenantId
|
|
43239
|
+
};
|
|
43240
|
+
|
|
43241
|
+
if (receiptNumbers) {
|
|
43242
|
+
newParam['receiptNumbers'] = receiptNumbers;
|
|
43243
|
+
} else {
|
|
43244
|
+
newParam['consumerCode'] = consumerCode;
|
|
43245
|
+
}
|
|
43246
|
+
|
|
41794
43247
|
return Request({
|
|
41795
|
-
url: Urls.
|
|
43248
|
+
url: Urls.mcollect.receipt_download,
|
|
41796
43249
|
data: {},
|
|
41797
43250
|
useCache: true,
|
|
41798
43251
|
method: "POST",
|
|
41799
|
-
params: {
|
|
41800
|
-
|
|
41801
|
-
|
|
41802
|
-
|
|
41803
|
-
|
|
41804
|
-
|
|
43252
|
+
params: _extends({}, newParam),
|
|
43253
|
+
auth: window.location.href.includes("pt/property/my-payments") ? false : true,
|
|
43254
|
+
locale: true,
|
|
43255
|
+
userService: window.location.href.includes("pt/property/my-payments") ? false : true,
|
|
43256
|
+
userDownload: true
|
|
43257
|
+
});
|
|
43258
|
+
},
|
|
43259
|
+
bill_download: function bill_download(bussinessService, consumerCode, tenantId, pdfKey) {
|
|
43260
|
+
var newParam = {
|
|
43261
|
+
bussinessService: bussinessService,
|
|
43262
|
+
tenantId: tenantId,
|
|
43263
|
+
consumerCode: consumerCode
|
|
43264
|
+
};
|
|
43265
|
+
return Request({
|
|
43266
|
+
url: Urls.mcollect.bill_download,
|
|
43267
|
+
data: {},
|
|
43268
|
+
useCache: true,
|
|
43269
|
+
method: "POST",
|
|
43270
|
+
params: _extends({}, newParam),
|
|
41805
43271
|
auth: true,
|
|
41806
|
-
userService: true,
|
|
41807
43272
|
locale: true,
|
|
43273
|
+
userService: true,
|
|
41808
43274
|
userDownload: true
|
|
41809
43275
|
});
|
|
41810
43276
|
},
|
|
@@ -41823,7 +43289,7 @@ var ReceiptsService = {
|
|
|
41823
43289
|
}
|
|
41824
43290
|
};
|
|
41825
43291
|
|
|
41826
|
-
var _excluded$
|
|
43292
|
+
var _excluded$3 = ["isLoading", "error", "data"];
|
|
41827
43293
|
var useReceiptsSearch = function useReceiptsSearch(searchparams, tenantId, filters, isupdated, config) {
|
|
41828
43294
|
if (config === void 0) {
|
|
41829
43295
|
config = {};
|
|
@@ -41838,7 +43304,7 @@ var useReceiptsSearch = function useReceiptsSearch(searchparams, tenantId, filte
|
|
|
41838
43304
|
isLoading = _useQuery.isLoading,
|
|
41839
43305
|
error = _useQuery.error,
|
|
41840
43306
|
data = _useQuery.data,
|
|
41841
|
-
rest = _objectWithoutPropertiesLoose(_useQuery, _excluded$
|
|
43307
|
+
rest = _objectWithoutPropertiesLoose(_useQuery, _excluded$3);
|
|
41842
43308
|
|
|
41843
43309
|
return _extends({
|
|
41844
43310
|
isLoading: isLoading,
|
|
@@ -42009,6 +43475,9 @@ var useReceiptsMDMS = function useReceiptsMDMS(tenantId, type, config) {
|
|
|
42009
43475
|
|
|
42010
43476
|
case "CancelReceiptReasonAndStatus":
|
|
42011
43477
|
return useCancelReceiptReasonAndStatus();
|
|
43478
|
+
|
|
43479
|
+
default:
|
|
43480
|
+
return null;
|
|
42012
43481
|
}
|
|
42013
43482
|
};
|
|
42014
43483
|
|
|
@@ -42072,6 +43541,46 @@ var SearchMdmsTypes = {
|
|
|
42072
43541
|
}
|
|
42073
43542
|
});
|
|
42074
43543
|
},
|
|
43544
|
+
useBPAServiceTypes: function useBPAServiceTypes(tenantId) {
|
|
43545
|
+
return reactQuery.useQuery([tenantId, "BPA_MDMS_SERVICE_STATUS"], function () {
|
|
43546
|
+
return MdmsService.getDataByCriteria(tenantId, {
|
|
43547
|
+
details: {
|
|
43548
|
+
tenantId: tenantId,
|
|
43549
|
+
moduleDetails: [{
|
|
43550
|
+
moduleName: "BPA",
|
|
43551
|
+
masterDetails: [{
|
|
43552
|
+
name: "BPAAppicationMapping"
|
|
43553
|
+
}]
|
|
43554
|
+
}]
|
|
43555
|
+
}
|
|
43556
|
+
}, "BPA");
|
|
43557
|
+
}, {
|
|
43558
|
+
select: function select(data) {
|
|
43559
|
+
var _data$BPA3, _data$BPA3$BPAAppicat;
|
|
43560
|
+
|
|
43561
|
+
return [].concat(data === null || data === void 0 ? void 0 : (_data$BPA3 = data.BPA) === null || _data$BPA3 === void 0 ? void 0 : (_data$BPA3$BPAAppicat = _data$BPA3.BPAAppicationMapping) === null || _data$BPA3$BPAAppicat === void 0 ? void 0 : _data$BPA3$BPAAppicat.filter(function (currentObject) {
|
|
43562
|
+
var _currentObject$roles;
|
|
43563
|
+
|
|
43564
|
+
var flag = 0;
|
|
43565
|
+
currentObject === null || currentObject === void 0 ? void 0 : (_currentObject$roles = currentObject.roles) === null || _currentObject$roles === void 0 ? void 0 : _currentObject$roles.map(function (bpaRole) {
|
|
43566
|
+
var _Digit$UserService$ge, _Digit$UserService$ge2;
|
|
43567
|
+
|
|
43568
|
+
var found = (_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : (_Digit$UserService$ge2 = _Digit$UserService$ge.info) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.roles.some(function (role) {
|
|
43569
|
+
return (role === null || role === void 0 ? void 0 : role.code) === bpaRole;
|
|
43570
|
+
});
|
|
43571
|
+
if (found == true) flag = 1;
|
|
43572
|
+
});
|
|
43573
|
+
if (flag == 1) return true;else return false;
|
|
43574
|
+
}).map(function (type) {
|
|
43575
|
+
return {
|
|
43576
|
+
code: type.code,
|
|
43577
|
+
i18nKey: "BPA_SERVICETYPE_" + type.code,
|
|
43578
|
+
applicationType: type.applicationType
|
|
43579
|
+
};
|
|
43580
|
+
}));
|
|
43581
|
+
}
|
|
43582
|
+
});
|
|
43583
|
+
},
|
|
42075
43584
|
getFormConfig: function getFormConfig(tenantId, config) {
|
|
42076
43585
|
return reactQuery.useQuery([tenantId, "FORM_CONFIG"], function () {
|
|
42077
43586
|
return MdmsService.getDataByCriteria(tenantId, {
|
|
@@ -42142,15 +43651,15 @@ var useMDMS$4 = function useMDMS(tenantId, moduleCode, type, config, payload) {
|
|
|
42142
43651
|
}
|
|
42143
43652
|
};
|
|
42144
43653
|
|
|
42145
|
-
var mapWfBybusinessId$
|
|
43654
|
+
var mapWfBybusinessId$2 = function mapWfBybusinessId(workflowData) {
|
|
42146
43655
|
return workflowData === null || workflowData === void 0 ? void 0 : workflowData.reduce(function (acc, item) {
|
|
42147
43656
|
acc[item === null || item === void 0 ? void 0 : item.businessId] = item;
|
|
42148
43657
|
return acc;
|
|
42149
43658
|
}, {});
|
|
42150
43659
|
};
|
|
42151
43660
|
|
|
42152
|
-
var combineResponse = function combineResponse(applications, workflowData, totalCount) {
|
|
42153
|
-
var workflowInstances = mapWfBybusinessId$
|
|
43661
|
+
var combineResponse$1 = function combineResponse(applications, workflowData, totalCount) {
|
|
43662
|
+
var workflowInstances = mapWfBybusinessId$2(workflowData);
|
|
42154
43663
|
return applications.map(function (application) {
|
|
42155
43664
|
var _workflowInstances$ap, _workflowInstances$ap2, _workflowInstances$ap3, _workflowInstances$ap4, _workflowInstances$ap5;
|
|
42156
43665
|
|
|
@@ -42169,7 +43678,6 @@ var useEmpBPAREGSearch = function useEmpBPAREGSearch(tenantId, filters, params,
|
|
|
42169
43678
|
|
|
42170
43679
|
return reactQuery.useQuery(['BPA_REG_WORK_SEARCH', tenantId, filters, params], function () {
|
|
42171
43680
|
try {
|
|
42172
|
-
var userInfo = Digit.UserService.getUser();
|
|
42173
43681
|
return Promise.resolve(Digit.OBPSService.BPAREGSearch(tenantId, filters, params)).then(function (response) {
|
|
42174
43682
|
var businessIds = response === null || response === void 0 ? void 0 : response.Licenses.map(function (application) {
|
|
42175
43683
|
return application.applicationNumber;
|
|
@@ -42177,7 +43685,7 @@ var useEmpBPAREGSearch = function useEmpBPAREGSearch(tenantId, filters, params,
|
|
|
42177
43685
|
return Promise.resolve(Digit.WorkflowService.getAllApplication(Digit.ULBService.getStateId(), {
|
|
42178
43686
|
businessIds: businessIds.join()
|
|
42179
43687
|
})).then(function (workflowRes) {
|
|
42180
|
-
return combineResponse(response === null || response === void 0 ? void 0 : response.Licenses, workflowRes === null || workflowRes === void 0 ? void 0 : workflowRes.ProcessInstances, response === null || response === void 0 ? void 0 : response.Count);
|
|
43688
|
+
return combineResponse$1(response === null || response === void 0 ? void 0 : response.Licenses, workflowRes === null || workflowRes === void 0 ? void 0 : workflowRes.ProcessInstances, response === null || response === void 0 ? void 0 : response.Count);
|
|
42181
43689
|
});
|
|
42182
43690
|
});
|
|
42183
43691
|
} catch (e) {
|
|
@@ -42504,14 +44012,16 @@ var OBPSService = {
|
|
|
42504
44012
|
BPADetailsPage: function (tenantId, filters) {
|
|
42505
44013
|
try {
|
|
42506
44014
|
return Promise.resolve(OBPSService.BPASearch(tenantId, filters)).then(function (response) {
|
|
42507
|
-
var _response$BPA;
|
|
44015
|
+
var _response$BPA, _response$BPA2, _response$BPA2$, _response$BPA2$$addit, _response$BPA3, _response$BPA3$, _response$BPA3$$addit;
|
|
42508
44016
|
|
|
42509
44017
|
if (!(response !== null && response !== void 0 && (_response$BPA = response.BPA) !== null && _response$BPA !== void 0 && _response$BPA.length)) {
|
|
42510
44018
|
return;
|
|
42511
44019
|
}
|
|
42512
44020
|
|
|
42513
|
-
|
|
42514
|
-
|
|
44021
|
+
sessionStorage.setItem("BPA_ARCHITECT_NAME", JSON.stringify(response !== null && response !== void 0 && (_response$BPA2 = response.BPA) !== null && _response$BPA2 !== void 0 && (_response$BPA2$ = _response$BPA2[0]) !== null && _response$BPA2$ !== void 0 && (_response$BPA2$$addit = _response$BPA2$.additionalDetails) !== null && _response$BPA2$$addit !== void 0 && _response$BPA2$$addit.typeOfArchitect ? response === null || response === void 0 ? void 0 : (_response$BPA3 = response.BPA) === null || _response$BPA3 === void 0 ? void 0 : (_response$BPA3$ = _response$BPA3[0]) === null || _response$BPA3$ === void 0 ? void 0 : (_response$BPA3$$addit = _response$BPA3$.additionalDetails) === null || _response$BPA3$$addit === void 0 ? void 0 : _response$BPA3$$addit.typeOfArchitect : "ARCHITECT"));
|
|
44022
|
+
|
|
44023
|
+
var _response$BPA4 = response === null || response === void 0 ? void 0 : response.BPA,
|
|
44024
|
+
BPA = _response$BPA4[0];
|
|
42515
44025
|
|
|
42516
44026
|
return Promise.resolve(OBPSService.scrutinyDetails(BPA === null || BPA === void 0 ? void 0 : BPA.tenantId, {
|
|
42517
44027
|
edcrNumber: BPA === null || BPA === void 0 ? void 0 : BPA.edcrNumber
|
|
@@ -42538,8 +44048,23 @@ var OBPSService = {
|
|
|
42538
44048
|
ocdcrNumber: BPA !== null && BPA !== void 0 && BPA.edcrNumber.includes("OCDCR") ? BPA === null || BPA === void 0 ? void 0 : BPA.edcrNumber : bpaResponse === null || bpaResponse === void 0 ? void 0 : (_bpaResponse$BPA = bpaResponse.BPA) === null || _bpaResponse$BPA === void 0 ? void 0 : (_bpaResponse$BPA$ = _bpaResponse$BPA[0]) === null || _bpaResponse$BPA$ === void 0 ? void 0 : _bpaResponse$BPA$.edcrNumber,
|
|
42539
44049
|
edcrNumber: bpaResponse !== null && bpaResponse !== void 0 && (_bpaResponse$BPA2 = bpaResponse.BPA) !== null && _bpaResponse$BPA2 !== void 0 && (_bpaResponse$BPA2$ = _bpaResponse$BPA2[0]) !== null && _bpaResponse$BPA2$ !== void 0 && _bpaResponse$BPA2$.edcrNumber.includes("OCDCR") ? BPA === null || BPA === void 0 ? void 0 : BPA.edcrNumber : bpaResponse === null || bpaResponse === void 0 ? void 0 : (_bpaResponse$BPA3 = bpaResponse.BPA) === null || _bpaResponse$BPA3 === void 0 ? void 0 : (_bpaResponse$BPA3$ = _bpaResponse$BPA3[0]) === null || _bpaResponse$BPA3$ === void 0 ? void 0 : _bpaResponse$BPA3$.edcrNumber
|
|
42540
44050
|
};
|
|
44051
|
+
|
|
44052
|
+
function ConvertEpochToValidityDate(dateEpoch) {
|
|
44053
|
+
if (dateEpoch == null || dateEpoch == undefined || dateEpoch == '') {
|
|
44054
|
+
return "NA";
|
|
44055
|
+
}
|
|
44056
|
+
|
|
44057
|
+
var dateFromApi = new Date(dateEpoch);
|
|
44058
|
+
var month = dateFromApi.getMonth() + 1;
|
|
44059
|
+
var day = dateFromApi.getDate();
|
|
44060
|
+
var year = dateFromApi.getFullYear() - 3;
|
|
44061
|
+
month = (month > 9 ? "" : "0") + month;
|
|
44062
|
+
day = (day > 9 ? "" : "0") + day;
|
|
44063
|
+
return day + "/" + month + "/" + year;
|
|
44064
|
+
}
|
|
44065
|
+
|
|
42541
44066
|
return Promise.resolve(OBPSService.comparisionReport(BPA === null || BPA === void 0 ? void 0 : BPA.tenantId, _extends({}, comparisionRep))).then(function (comparisionReport) {
|
|
42542
|
-
var _BPA$additionalDetail, _BPA$additionalDetail2, _BPA$additionalDetail3, _BPA$additionalDetail4, _BPA$additionalDetail5, _permitcondn, _permitcondn2, _BPA$auditDetails, _BPA$auditDetails2, _edcr$planDetail3, _edcr$planDetail3$pla, _edcr$planDetail4, _edcr$planDetail4$pla, _edcr$planDetail5, _edcr$planDetail5$pla, _edcr$planDetail6, _edcr$planDetail6$pla, _edcr$planDetail7, _edcr$planDetail7$pla, _BPA$
|
|
44067
|
+
var _BPA$additionalDetail, _BPA$additionalDetail2, _BPA$additionalDetail3, _BPA$additionalDetail4, _BPA$additionalDetail5, _permitcondn, _permitcondn2, _BPA$auditDetails, _BPA$auditDetails2, _edcr$planDetail3, _edcr$planDetail3$pla, _edcr$planDetail4, _edcr$planDetail4$pla, _edcr$planDetail5, _edcr$planDetail5$pla, _edcr$planDetail6, _edcr$planDetail6$pla, _edcr$planDetail7, _edcr$planDetail7$pla, _BPA$additionalDetail9, _BPA$additionalDetail10, _edcr$planDetail8, _edcr$planDetail8$blo, _edcr$planDetail8$blo2, _edcr$planDetail8$blo3, _edcr$planDetail9, _edcr$planDetail9$blo, _edcr$planDetail9$blo2, _edcr$planDetail9$blo3, _edcr$planDetail10, _edcr$planDetail10$bl, _edcr$planDetail10$bl2, _edcr$planDetail10$bl3, _edcr$planDetail11, _edcr$planDetail11$pl, _BPA$landInfo, _BPA$landInfo$address, _BPA$landInfo2, _BPA$landInfo2$addres, _BPA$landInfo3, _BPA$landInfo3$addres, _BPA$landInfo3$addres2, _BPA$landInfo4, _BPA$landInfo4$addres, _BPA$landInfo5, _BPA$landInfo5$addres, _BPA$landInfo6, _BPA$landInfo6$owners, _BPA$landInfo7, _BPA$landInfo7$owners, _BPA$landInfo9, _BPA$landInfo9$owners, _BPA$documents, _BPA$additionalDetail11, _BPA$additionalDetail12, _BPA$additionalDetail13, _BPA$additionalDetail14, _BPA$additionalDetail15, _BPA$additionalDetail16, _BPA$additionalDetail17, _details;
|
|
42543
44068
|
|
|
42544
44069
|
var nocDetails = noc === null || noc === void 0 ? void 0 : noc.map(function (nocDetails, index) {
|
|
42545
44070
|
var _nocDetails$additiona, _nocDetails$additiona2, _nocDetails$additiona3, _nocDetails$auditDeta, _nocDetails$documents;
|
|
@@ -42650,6 +44175,18 @@ var OBPSService = {
|
|
|
42650
44175
|
value: (BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo) || "NA"
|
|
42651
44176
|
}]
|
|
42652
44177
|
};
|
|
44178
|
+
|
|
44179
|
+
if (BPA !== null && BPA !== void 0 && BPA.businessService.includes("BPA_OC")) {
|
|
44180
|
+
var _bpaResponse$BPA4, _bpaResponse$BPA4$, _bpaResponse$BPA5, _bpaResponse$BPA5$;
|
|
44181
|
+
|
|
44182
|
+
applicationDetailsInfo["values"] = [].concat(applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : applicationDetailsInfo.values, [{
|
|
44183
|
+
title: "BPA_PERMIT_APP_NUMBER",
|
|
44184
|
+
to: "/digit-ui/employee/obps/bpa/" + (bpaResponse === null || bpaResponse === void 0 ? void 0 : (_bpaResponse$BPA4 = bpaResponse.BPA) === null || _bpaResponse$BPA4 === void 0 ? void 0 : (_bpaResponse$BPA4$ = _bpaResponse$BPA4[0]) === null || _bpaResponse$BPA4$ === void 0 ? void 0 : _bpaResponse$BPA4$.applicationNo),
|
|
44185
|
+
value: bpaResponse === null || bpaResponse === void 0 ? void 0 : (_bpaResponse$BPA5 = bpaResponse.BPA) === null || _bpaResponse$BPA5 === void 0 ? void 0 : (_bpaResponse$BPA5$ = _bpaResponse$BPA5[0]) === null || _bpaResponse$BPA5$ === void 0 ? void 0 : _bpaResponse$BPA5$.applicationNo,
|
|
44186
|
+
isLink: true
|
|
44187
|
+
}]);
|
|
44188
|
+
}
|
|
44189
|
+
|
|
42653
44190
|
var permitcondn = [];
|
|
42654
44191
|
(BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail3 = BPA.additionalDetails) === null || _BPA$additionalDetail3 === void 0 ? void 0 : _BPA$additionalDetail3.pendingapproval) && (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail4 = BPA.additionalDetails) === null || _BPA$additionalDetail4 === void 0 ? void 0 : _BPA$additionalDetail4.pendingapproval.length) > 0 && (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail5 = BPA.additionalDetails) === null || _BPA$additionalDetail5 === void 0 ? void 0 : _BPA$additionalDetail5.pendingapproval.map(function (ob, index) {
|
|
42655
44192
|
permitcondn.push({
|
|
@@ -42674,7 +44211,7 @@ var OBPSService = {
|
|
|
42674
44211
|
}
|
|
42675
44212
|
|
|
42676
44213
|
if (BPA !== null && BPA !== void 0 && BPA.approvalNo) {
|
|
42677
|
-
var _applicationDetailsIn, _applicationDetailsIn2, _BPA$additionalDetail6, _BPA$additionalDetail7;
|
|
44214
|
+
var _applicationDetailsIn, _applicationDetailsIn2, _BPA$additionalDetail6, _BPA$additionalDetail7, _BPA$additionalDetail8;
|
|
42678
44215
|
|
|
42679
44216
|
applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : (_applicationDetailsIn = applicationDetailsInfo.values) === null || _applicationDetailsIn === void 0 ? void 0 : _applicationDetailsIn.push({
|
|
42680
44217
|
title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_PERMIT_NUMBER_LABEL" : "BPA_OC_PERMIT_NUMBER_LABEL",
|
|
@@ -42682,7 +44219,7 @@ var OBPSService = {
|
|
|
42682
44219
|
});
|
|
42683
44220
|
applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : (_applicationDetailsIn2 = applicationDetailsInfo.values) === null || _applicationDetailsIn2 === void 0 ? void 0 : _applicationDetailsIn2.push({
|
|
42684
44221
|
title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_PERMIT_VALIDITY" : "BPA_OC_PERMIT_VALIDITY",
|
|
42685
|
-
value: BPA !== null && BPA !== void 0 && (_BPA$additionalDetail6 = BPA.additionalDetails) !== null && _BPA$additionalDetail6 !== void 0 && _BPA$additionalDetail6.validityDate ?
|
|
44222
|
+
value: BPA !== null && BPA !== void 0 && (_BPA$additionalDetail6 = BPA.additionalDetails) !== null && _BPA$additionalDetail6 !== void 0 && _BPA$additionalDetail6.validityDate ? ConvertEpochToValidityDate(BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail7 = BPA.additionalDetails) === null || _BPA$additionalDetail7 === void 0 ? void 0 : _BPA$additionalDetail7.validityDate) + " - " + dateFns.format(new Date(BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail8 = BPA.additionalDetails) === null || _BPA$additionalDetail8 === void 0 ? void 0 : _BPA$additionalDetail8.validityDate), 'dd/MM/yyyy') : "NA"
|
|
42686
44223
|
});
|
|
42687
44224
|
}
|
|
42688
44225
|
|
|
@@ -42731,11 +44268,11 @@ var OBPSService = {
|
|
|
42731
44268
|
isNotTranslated: true
|
|
42732
44269
|
}, {
|
|
42733
44270
|
title: "BPA_HOLDING_NUMBER_LABEL",
|
|
42734
|
-
value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$
|
|
44271
|
+
value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail9 = BPA.additionalDetails) === null || _BPA$additionalDetail9 === void 0 ? void 0 : _BPA$additionalDetail9.holdingNo) || "NA",
|
|
42735
44272
|
isNotTranslated: true
|
|
42736
44273
|
}, {
|
|
42737
44274
|
title: "BPA_BOUNDARY_LAND_REG_DETAIL_LABEL",
|
|
42738
|
-
value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$
|
|
44275
|
+
value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail10 = BPA.additionalDetails) === null || _BPA$additionalDetail10 === void 0 ? void 0 : _BPA$additionalDetail10.registrationDetails) || "NA",
|
|
42739
44276
|
isNotTranslated: true
|
|
42740
44277
|
}]
|
|
42741
44278
|
};
|
|
@@ -42928,7 +44465,7 @@ var OBPSService = {
|
|
|
42928
44465
|
var val;
|
|
42929
44466
|
var i;
|
|
42930
44467
|
var FieldInspectionData = [];
|
|
42931
|
-
inspectionReport && (BPA === null || BPA === void 0 ? void 0 : (_BPA$
|
|
44468
|
+
inspectionReport && (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail11 = BPA.additionalDetails) === null || _BPA$additionalDetail11 === void 0 ? void 0 : (_BPA$additionalDetail12 = _BPA$additionalDetail11.fieldinspection_pending) === null || _BPA$additionalDetail12 === void 0 ? void 0 : (_BPA$additionalDetail13 = _BPA$additionalDetail12[0]) === null || _BPA$additionalDetail13 === void 0 ? void 0 : _BPA$additionalDetail13.questions.length) > 0 && inspectionReport.map(function (ob, index) {
|
|
42932
44469
|
if (ob.title.includes("FI_REPORT")) FieldInspectionData = [].concat(FieldInspectionData, [{
|
|
42933
44470
|
title: ob.title,
|
|
42934
44471
|
additionalDetails: {
|
|
@@ -42969,10 +44506,10 @@ var OBPSService = {
|
|
|
42969
44506
|
var fiReports = {
|
|
42970
44507
|
title: "",
|
|
42971
44508
|
isFieldInspection: true,
|
|
42972
|
-
isNotAllowed: (BPA === null || BPA === void 0 ? void 0 : (_BPA$
|
|
44509
|
+
isNotAllowed: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail14 = BPA.additionalDetails) === null || _BPA$additionalDetail14 === void 0 ? void 0 : (_BPA$additionalDetail15 = _BPA$additionalDetail14.fieldinspection_pending) === null || _BPA$additionalDetail15 === void 0 ? void 0 : _BPA$additionalDetail15.length) > 0 ? false : true,
|
|
42973
44510
|
additionalDetails: {
|
|
42974
44511
|
values: [],
|
|
42975
|
-
fiReport: (BPA === null || BPA === void 0 ? void 0 : (_BPA$
|
|
44512
|
+
fiReport: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail16 = BPA.additionalDetails) === null || _BPA$additionalDetail16 === void 0 ? void 0 : (_BPA$additionalDetail17 = _BPA$additionalDetail16.fieldinspection_pending) === null || _BPA$additionalDetail17 === void 0 ? void 0 : _BPA$additionalDetail17.length) > 0 ? true : false
|
|
42976
44513
|
}
|
|
42977
44514
|
};
|
|
42978
44515
|
|
|
@@ -43012,15 +44549,15 @@ var convertMillisecondsToDays = function convertMillisecondsToDays(milliseconds)
|
|
|
43012
44549
|
return Math.round(milliseconds / (1000 * 60 * 60 * 24));
|
|
43013
44550
|
};
|
|
43014
44551
|
|
|
43015
|
-
var mapWfBybusinessId$
|
|
44552
|
+
var mapWfBybusinessId$3 = function mapWfBybusinessId(workflowData) {
|
|
43016
44553
|
return workflowData === null || workflowData === void 0 ? void 0 : workflowData.reduce(function (acc, item) {
|
|
43017
44554
|
acc[item === null || item === void 0 ? void 0 : item.businessId] = item;
|
|
43018
44555
|
return acc;
|
|
43019
44556
|
}, {});
|
|
43020
44557
|
};
|
|
43021
44558
|
|
|
43022
|
-
var combineResponse$
|
|
43023
|
-
var workflowInstances = mapWfBybusinessId$
|
|
44559
|
+
var combineResponse$2 = function combineResponse(applications, workflowData) {
|
|
44560
|
+
var workflowInstances = mapWfBybusinessId$3(workflowData);
|
|
43024
44561
|
return applications.map(function (application) {
|
|
43025
44562
|
var _workflowInstances$ap, _workflowInstances$ap2, _workflowInstances$ap3, _workflowInstances$ap4, _workflowInstances$ap5, _workflowInstances$ap6;
|
|
43026
44563
|
|
|
@@ -43051,7 +44588,7 @@ var useBPASearch = function useBPASearch(tenantId, filters, config) {
|
|
|
43051
44588
|
var _exit = false;
|
|
43052
44589
|
|
|
43053
44590
|
function _temp5(_result3) {
|
|
43054
|
-
return _exit ? _result3 : combineResponse$
|
|
44591
|
+
return _exit ? _result3 : combineResponse$2(response === null || response === void 0 ? void 0 : response.BPA, processInstanceArray);
|
|
43055
44592
|
}
|
|
43056
44593
|
|
|
43057
44594
|
var tenantMap = {},
|
|
@@ -43088,8 +44625,7 @@ var useBPASearch = function useBPASearch(tenantId, filters, config) {
|
|
|
43088
44625
|
})).then(function (payload) {
|
|
43089
44626
|
processInstanceArray = processInstanceArray.concat(payload.ProcessInstances);
|
|
43090
44627
|
});
|
|
43091
|
-
}, function (
|
|
43092
|
-
console.error(error);
|
|
44628
|
+
}, function () {
|
|
43093
44629
|
var _temp = [];
|
|
43094
44630
|
_exit = true;
|
|
43095
44631
|
return _temp;
|
|
@@ -43303,13 +44839,13 @@ var useBPADetails = function useBPADetails(tenantId, filters, config) {
|
|
|
43303
44839
|
}, config);
|
|
43304
44840
|
};
|
|
43305
44841
|
|
|
43306
|
-
var _excluded$
|
|
44842
|
+
var _excluded$4 = ["tenantId", "businessService"];
|
|
43307
44843
|
var useBPAREGgetbill = function useBPAREGgetbill(_ref, config) {
|
|
43308
44844
|
var _Digit$UserService$ge, _Digit$UserService$ge2;
|
|
43309
44845
|
|
|
43310
44846
|
var tenantId = _ref.tenantId,
|
|
43311
44847
|
businessService = _ref.businessService,
|
|
43312
|
-
filters = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
44848
|
+
filters = _objectWithoutPropertiesLoose(_ref, _excluded$4);
|
|
43313
44849
|
|
|
43314
44850
|
if (config === void 0) {
|
|
43315
44851
|
config = {};
|
|
@@ -43467,6 +45003,10 @@ var useBPAInbox = function useBPAInbox(_ref) {
|
|
|
43467
45003
|
tenantId = Digit.ULBService.getStateId();
|
|
43468
45004
|
}
|
|
43469
45005
|
|
|
45006
|
+
if (applicationType === "BUILDING_OC_PLAN_SCRUTINY" && window.location.href.includes("obps/inbox") && businessService) {
|
|
45007
|
+
businessService = "BPA_OC";
|
|
45008
|
+
}
|
|
45009
|
+
|
|
43470
45010
|
var _filters = {
|
|
43471
45011
|
tenantId: tenantId,
|
|
43472
45012
|
processSearchCriteria: _extends({
|
|
@@ -43488,10 +45028,8 @@ var useBPAInbox = function useBPAInbox(_ref) {
|
|
|
43488
45028
|
sortOrder: sortOrder
|
|
43489
45029
|
} : {}, sortBy ? {
|
|
43490
45030
|
sortBy: sortBy
|
|
43491
|
-
} : {}, (applicationType === null || applicationType === void 0 ? void 0 : applicationType.length) > 0 ? {
|
|
43492
|
-
applicationType: applicationType
|
|
43493
|
-
return item.code;
|
|
43494
|
-
}).join(",")
|
|
45031
|
+
} : {}, applicationType && (applicationType === null || applicationType === void 0 ? void 0 : applicationType.length) > 0 ? {
|
|
45032
|
+
applicationType: applicationType
|
|
43495
45033
|
} : {}, (locality === null || locality === void 0 ? void 0 : locality.length) > 0 ? {
|
|
43496
45034
|
locality: locality.map(function (item) {
|
|
43497
45035
|
return item.code.split("_").pop();
|
|
@@ -43571,7 +45109,7 @@ var useEDCRInbox = function useEDCRInbox(_ref2) {
|
|
|
43571
45109
|
} : {}, status ? {
|
|
43572
45110
|
status: status
|
|
43573
45111
|
} : {}, sortOrder ? {
|
|
43574
|
-
|
|
45112
|
+
orderBy: sortOrder
|
|
43575
45113
|
} : {}, appliactionType ? {
|
|
43576
45114
|
appliactionType: appliactionType
|
|
43577
45115
|
} : {}, {
|
|
@@ -43668,9 +45206,7 @@ var useArchitectInbox = function useArchitectInbox(_ref) {
|
|
|
43668
45206
|
tenantId: tenantId,
|
|
43669
45207
|
processSearchCriteria: _extends({
|
|
43670
45208
|
moduleName: moduleName ? moduleName : "bpa-services",
|
|
43671
|
-
businessService: (businessService === null || businessService === void 0 ? void 0 : businessService.length) > 0 ? businessService
|
|
43672
|
-
return o.code;
|
|
43673
|
-
}) : ["BPA_LOW", "BPA", "BPA_OC"]
|
|
45209
|
+
businessService: (businessService === null || businessService === void 0 ? void 0 : businessService.length) > 0 ? [businessService] : ["BPA_LOW", "BPA", "BPA_OC"]
|
|
43674
45210
|
}, (applicationStatus === null || applicationStatus === void 0 ? void 0 : applicationStatus.length) > 0 ? {
|
|
43675
45211
|
status: applicationStatus
|
|
43676
45212
|
} : {}),
|
|
@@ -43678,7 +45214,7 @@ var useArchitectInbox = function useArchitectInbox(_ref) {
|
|
|
43678
45214
|
assignee: assignee
|
|
43679
45215
|
}, mobileNumber ? {
|
|
43680
45216
|
mobileNumber: mobileNumber
|
|
43681
|
-
} : {}, applicationType ? {
|
|
45217
|
+
} : {}, applicationType && applicationType.length > 0 ? {
|
|
43682
45218
|
applicationType: applicationType
|
|
43683
45219
|
} : {}, serviceType ? {
|
|
43684
45220
|
serviceType: serviceType
|
|
@@ -43730,9 +45266,7 @@ var useArchitectInbox = function useArchitectInbox(_ref) {
|
|
|
43730
45266
|
});
|
|
43731
45267
|
});
|
|
43732
45268
|
});
|
|
43733
|
-
}, function (
|
|
43734
|
-
console.error("error", error);
|
|
43735
|
-
});
|
|
45269
|
+
}, function () {});
|
|
43736
45270
|
|
|
43737
45271
|
if (_temp3 && _temp3.then) return _temp3.then(function () {});
|
|
43738
45272
|
}
|
|
@@ -43835,16 +45369,12 @@ var useServiceTypeFromApplicationType = function useServiceTypeFromApplicationTy
|
|
|
43835
45369
|
var _SearchMdmsTypes$useA = SearchMdmsTypes.useApplicationTypes(tenantId),
|
|
43836
45370
|
applicationTypes = _SearchMdmsTypes$useA.data;
|
|
43837
45371
|
|
|
43838
|
-
var _SearchMdmsTypes$
|
|
43839
|
-
serviceTypes = _SearchMdmsTypes$
|
|
43840
|
-
isLoadingServiceTypes = _SearchMdmsTypes$
|
|
45372
|
+
var _SearchMdmsTypes$useB = SearchMdmsTypes.useBPAServiceTypes(tenantId),
|
|
45373
|
+
serviceTypes = _SearchMdmsTypes$useB.data,
|
|
45374
|
+
isLoadingServiceTypes = _SearchMdmsTypes$useB.isLoading;
|
|
43841
45375
|
|
|
43842
45376
|
var ServiceTypes = React.useMemo(function () {
|
|
43843
|
-
var serviceTypesWithStakeholer = [].concat(serviceTypes ? serviceTypes : []
|
|
43844
|
-
applicationType: ["BPA_STAKEHOLDER_REGISTRATION"],
|
|
43845
|
-
code: "BPA_STAKEHOLDER_REGISTRATION",
|
|
43846
|
-
i18nKey: "BPA_SERVICETYPE_BPA_STAKEHOLDER_REGISTRATION"
|
|
43847
|
-
}]);
|
|
45377
|
+
var serviceTypesWithStakeholer = [].concat(serviceTypes ? serviceTypes : []);
|
|
43848
45378
|
return serviceTypesWithStakeholer === null || serviceTypesWithStakeholer === void 0 ? void 0 : serviceTypesWithStakeholer.filter(function (e) {
|
|
43849
45379
|
return e.applicationType.includes(Applicationtype);
|
|
43850
45380
|
}).map(function (e) {
|
|
@@ -43858,8 +45388,20 @@ var useServiceTypeFromApplicationType = function useServiceTypeFromApplicationTy
|
|
|
43858
45388
|
code: "BPA_STAKEHOLDER_REGISTRATION",
|
|
43859
45389
|
i18nKey: "WF_BPA_BPA_STAKEHOLDER_REGISTRATION"
|
|
43860
45390
|
}]);
|
|
45391
|
+
var filteredapplicationTypes = React.useMemo(function () {
|
|
45392
|
+
return applicationTypesWithStakeholder.filter(function (curr) {
|
|
45393
|
+
var temp = 0;
|
|
45394
|
+
serviceTypes === null || serviceTypes === void 0 ? void 0 : serviceTypes.map(function (ob) {
|
|
45395
|
+
var found = ob && (ob === null || ob === void 0 ? void 0 : ob.applicationType) && (ob === null || ob === void 0 ? void 0 : ob.applicationType.some(function (ap) {
|
|
45396
|
+
return ap === curr.code;
|
|
45397
|
+
}));
|
|
45398
|
+
if (found) temp = 1;
|
|
45399
|
+
});
|
|
45400
|
+
if (temp == 1) return true;else return false;
|
|
45401
|
+
});
|
|
45402
|
+
}, [serviceTypes, applicationTypesWithStakeholder]);
|
|
43861
45403
|
return {
|
|
43862
|
-
applicationTypes:
|
|
45404
|
+
applicationTypes: filteredapplicationTypes,
|
|
43863
45405
|
ServiceTypes: ServiceTypes
|
|
43864
45406
|
};
|
|
43865
45407
|
};
|
|
@@ -43869,23 +45411,21 @@ var useBusinessServiceBasedOnServiceType = function useBusinessServiceBasedOnSer
|
|
|
43869
45411
|
var configData = {
|
|
43870
45412
|
BUILDING_PLAN_SCRUTINY: [{
|
|
43871
45413
|
code: "BPA_LOW",
|
|
43872
|
-
i18nKey: "
|
|
45414
|
+
i18nKey: "WF_BPA_LOW_LABEL"
|
|
43873
45415
|
}, {
|
|
43874
45416
|
code: "BPA",
|
|
43875
|
-
i18nKey: "
|
|
45417
|
+
i18nKey: "WF_BPA_LABEL"
|
|
43876
45418
|
}],
|
|
43877
45419
|
BUILDING_OC_PLAN_SCRUTINY: [{
|
|
45420
|
+
code: "BPA_OC_LOW",
|
|
45421
|
+
i18nKey: "WF_BPA_LOW_LABEL"
|
|
45422
|
+
}, {
|
|
43878
45423
|
code: "BPA_OC",
|
|
43879
|
-
i18nKey: "
|
|
45424
|
+
i18nKey: "WF_BPA_LABEL"
|
|
43880
45425
|
}]
|
|
43881
45426
|
};
|
|
43882
|
-
var selectedBusinessServicesObjectin2dArray = applicationType
|
|
43883
|
-
|
|
43884
|
-
});
|
|
43885
|
-
var selectedBusinessServices = (selectedBusinessServicesObjectin2dArray === null || selectedBusinessServicesObjectin2dArray === void 0 ? void 0 : selectedBusinessServicesObjectin2dArray.length) > 0 ? selectedBusinessServicesObjectin2dArray === null || selectedBusinessServicesObjectin2dArray === void 0 ? void 0 : selectedBusinessServicesObjectin2dArray.reduce(function (acc, curr) {
|
|
43886
|
-
return [].concat(acc, curr);
|
|
43887
|
-
}, []) : null;
|
|
43888
|
-
return selectedBusinessServices;
|
|
45427
|
+
var selectedBusinessServicesObjectin2dArray = configData[applicationType];
|
|
45428
|
+
return selectedBusinessServicesObjectin2dArray;
|
|
43889
45429
|
};
|
|
43890
45430
|
|
|
43891
45431
|
var useBusinessServiceData = function useBusinessServiceData(tenantId, businessServices, config) {
|
|
@@ -43950,7 +45490,7 @@ var useBPATaxDocuments = function useBPATaxDocuments(stateId, formData, PrevStat
|
|
|
43950
45490
|
};
|
|
43951
45491
|
};
|
|
43952
45492
|
|
|
43953
|
-
var combineResponse$
|
|
45493
|
+
var combineResponse$3 = function combineResponse(data, users) {
|
|
43954
45494
|
var _data$events;
|
|
43955
45495
|
|
|
43956
45496
|
data.events = data === null || data === void 0 ? void 0 : (_data$events = data.events) === null || _data$events === void 0 ? void 0 : _data$events.map(function (event) {
|
|
@@ -43993,7 +45533,7 @@ var useInbox$2 = function useInbox(tenantId, data, filter, config) {
|
|
|
43993
45533
|
return Promise.resolve(Digit.UserService.userSearch(null, {
|
|
43994
45534
|
uuid: uuids
|
|
43995
45535
|
}, {})).then(function (usersResponse) {
|
|
43996
|
-
return combineResponse$
|
|
45536
|
+
return combineResponse$3(eventData, usersResponse === null || usersResponse === void 0 ? void 0 : usersResponse.user);
|
|
43997
45537
|
});
|
|
43998
45538
|
});
|
|
43999
45539
|
} catch (e) {
|
|
@@ -44223,11 +45763,13 @@ var Surveys = {
|
|
|
44223
45763
|
showResults: function showResults(details) {
|
|
44224
45764
|
return Request({
|
|
44225
45765
|
url: Urls.engagement.surveys.showResults,
|
|
44226
|
-
data: details,
|
|
44227
45766
|
useCache: true,
|
|
44228
45767
|
userService: true,
|
|
44229
45768
|
method: "POST",
|
|
44230
|
-
auth: true
|
|
45769
|
+
auth: true,
|
|
45770
|
+
params: {
|
|
45771
|
+
surveyId: details.surveyId
|
|
45772
|
+
}
|
|
44231
45773
|
});
|
|
44232
45774
|
}
|
|
44233
45775
|
};
|
|
@@ -44383,7 +45925,7 @@ var NOCSearch = {
|
|
|
44383
45925
|
return Promise.resolve(NOCSearch.application(tenantId, filter)).then(function (response) {
|
|
44384
45926
|
function _temp4() {
|
|
44385
45927
|
function _temp2() {
|
|
44386
|
-
var _bpaResponse, _bpaResponse$, _edcrResponse, _edcrResponse2, _edcrResponse3;
|
|
45928
|
+
var _bpaResponse, _bpaResponse$, _bpaResponse2, _bpaResponse2$, _edcrResponse, _edcrResponse2, _edcrResponse3;
|
|
44387
45929
|
|
|
44388
45930
|
var employeeResponse = [];
|
|
44389
45931
|
var buildingDetails = {
|
|
@@ -44391,7 +45933,14 @@ var NOCSearch = {
|
|
|
44391
45933
|
asSectionHeader: true,
|
|
44392
45934
|
values: [{
|
|
44393
45935
|
title: "NOC_APP_NO_LABEL",
|
|
44394
|
-
value: (
|
|
45936
|
+
value: /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
45937
|
+
to: "/digit-ui/employee/obps/bpa/" + ((_bpaResponse = bpaResponse) === null || _bpaResponse === void 0 ? void 0 : (_bpaResponse$ = _bpaResponse[0]) === null || _bpaResponse$ === void 0 ? void 0 : _bpaResponse$.applicationNo)
|
|
45938
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
45939
|
+
className: "link",
|
|
45940
|
+
style: {
|
|
45941
|
+
color: "#F47738"
|
|
45942
|
+
}
|
|
45943
|
+
}, (_bpaResponse2 = bpaResponse) === null || _bpaResponse2 === void 0 ? void 0 : (_bpaResponse2$ = _bpaResponse2[0]) === null || _bpaResponse2$ === void 0 ? void 0 : _bpaResponse2$.applicationNo)))
|
|
44395
45944
|
}, {
|
|
44396
45945
|
title: "NOC_MODULE_SOURCE_LABEL",
|
|
44397
45946
|
value: t(response === null || response === void 0 ? void 0 : response.source) || "NA"
|
|
@@ -44415,13 +45964,13 @@ var NOCSearch = {
|
|
|
44415
45964
|
var edcrResponse = {};
|
|
44416
45965
|
|
|
44417
45966
|
var _temp = function () {
|
|
44418
|
-
var
|
|
45967
|
+
var _bpaResponse3, _bpaResponse3$;
|
|
44419
45968
|
|
|
44420
|
-
if ((
|
|
44421
|
-
var
|
|
45969
|
+
if ((_bpaResponse3 = bpaResponse) !== null && _bpaResponse3 !== void 0 && (_bpaResponse3$ = _bpaResponse3[0]) !== null && _bpaResponse3$ !== void 0 && _bpaResponse3$.edcrNumber) {
|
|
45970
|
+
var _bpaResponse4, _bpaResponse4$;
|
|
44422
45971
|
|
|
44423
45972
|
var bpaFilter = {
|
|
44424
|
-
edcrNumber: (
|
|
45973
|
+
edcrNumber: (_bpaResponse4 = bpaResponse) === null || _bpaResponse4 === void 0 ? void 0 : (_bpaResponse4$ = _bpaResponse4[0]) === null || _bpaResponse4$ === void 0 ? void 0 : _bpaResponse4$.edcrNumber
|
|
44425
45974
|
};
|
|
44426
45975
|
return Promise.resolve(NOCSearch.scrutinyDetails(tenantId, bpaFilter)).then(function (_NOCSearch$scrutinyDe) {
|
|
44427
45976
|
edcrResponse = _NOCSearch$scrutinyDe;
|
|
@@ -44475,7 +46024,8 @@ var useNOCInbox = function useNOCInbox(_ref) {
|
|
|
44475
46024
|
var businessService = filterForm.businessService,
|
|
44476
46025
|
applicationStatus = filterForm.applicationStatus,
|
|
44477
46026
|
locality = filterForm.locality,
|
|
44478
|
-
assignee = filterForm.assignee
|
|
46027
|
+
assignee = filterForm.assignee,
|
|
46028
|
+
businessServiceArray = filterForm.businessServiceArray;
|
|
44479
46029
|
var sourceRefId = searchForm.sourceRefId,
|
|
44480
46030
|
applicationNo = searchForm.applicationNo;
|
|
44481
46031
|
var sortBy = tableForm.sortBy,
|
|
@@ -44486,7 +46036,7 @@ var useNOCInbox = function useNOCInbox(_ref) {
|
|
|
44486
46036
|
tenantId: tenantId,
|
|
44487
46037
|
processSearchCriteria: _extends({
|
|
44488
46038
|
moduleName: "noc-services",
|
|
44489
|
-
businessService: businessService
|
|
46039
|
+
businessService: businessService !== null && businessService !== void 0 && businessService.code ? [businessService === null || businessService === void 0 ? void 0 : businessService.code] : businessServiceArray
|
|
44490
46040
|
}, (applicationStatus === null || applicationStatus === void 0 ? void 0 : applicationStatus.length) > 0 ? {
|
|
44491
46041
|
status: applicationStatus
|
|
44492
46042
|
} : {}),
|
|
@@ -44536,6 +46086,279 @@ var useNOCInbox = function useNOCInbox(_ref) {
|
|
|
44536
46086
|
});
|
|
44537
46087
|
};
|
|
44538
46088
|
|
|
46089
|
+
var useNOCSearchApplication = function useNOCSearchApplication(tenantId, filters, config) {
|
|
46090
|
+
if (config === void 0) {
|
|
46091
|
+
config = {};
|
|
46092
|
+
}
|
|
46093
|
+
|
|
46094
|
+
return reactQuery.useQuery(["APPLICATION_SEARCH", "NOC_SEARCH", tenantId].concat(Object.entries(filters)), function () {
|
|
46095
|
+
return NOCSearch.all(tenantId, filters);
|
|
46096
|
+
}, config);
|
|
46097
|
+
};
|
|
46098
|
+
|
|
46099
|
+
var WSSearchMdmsTypes = {
|
|
46100
|
+
useWSServicesMasters: function useWSServicesMasters(tenantId) {
|
|
46101
|
+
return reactQuery.useQuery([tenantId, "WS_WS_SERVICES_MASTERS"], function () {
|
|
46102
|
+
return MdmsService.getDataByCriteria(tenantId, {
|
|
46103
|
+
details: {
|
|
46104
|
+
tenantId: tenantId,
|
|
46105
|
+
moduleDetails: [{
|
|
46106
|
+
moduleName: "ws-services-masters",
|
|
46107
|
+
masterDetails: [{
|
|
46108
|
+
name: "Documents"
|
|
46109
|
+
}]
|
|
46110
|
+
}]
|
|
46111
|
+
}
|
|
46112
|
+
}, "ws-services-masters");
|
|
46113
|
+
}, {
|
|
46114
|
+
select: function select(data) {
|
|
46115
|
+
var _data$wsServicesMas, _data$wsServicesMas$D;
|
|
46116
|
+
|
|
46117
|
+
data === null || data === void 0 ? void 0 : (_data$wsServicesMas = data["ws-services-masters"]) === null || _data$wsServicesMas === void 0 ? void 0 : (_data$wsServicesMas$D = _data$wsServicesMas.Documents) === null || _data$wsServicesMas$D === void 0 ? void 0 : _data$wsServicesMas$D.forEach(function (type) {
|
|
46118
|
+
type.code = type.code;
|
|
46119
|
+
type.i18nKey = type.code ? type.code.replaceAll('.', '_') : "";
|
|
46120
|
+
type.dropdownData.forEach(function (value) {
|
|
46121
|
+
value.i18nKey = value.code ? value.code.replaceAll('.', '_') : "";
|
|
46122
|
+
});
|
|
46123
|
+
});
|
|
46124
|
+
return data !== null && data !== void 0 && data["ws-services-masters"] ? data === null || data === void 0 ? void 0 : data["ws-services-masters"] : [];
|
|
46125
|
+
}
|
|
46126
|
+
});
|
|
46127
|
+
},
|
|
46128
|
+
useWSServicesCalculation: function useWSServicesCalculation(tenantId) {
|
|
46129
|
+
return reactQuery.useQuery([tenantId, "WS_WS_SERVICES_CALCULATION"], function () {
|
|
46130
|
+
return MdmsService.getDataByCriteria(tenantId, {
|
|
46131
|
+
details: {
|
|
46132
|
+
tenantId: tenantId,
|
|
46133
|
+
moduleDetails: [{
|
|
46134
|
+
moduleName: "ws-services-calculation",
|
|
46135
|
+
masterDetails: [{
|
|
46136
|
+
name: "PipeSize"
|
|
46137
|
+
}]
|
|
46138
|
+
}]
|
|
46139
|
+
}
|
|
46140
|
+
}, "ws-services-calculation");
|
|
46141
|
+
}, {
|
|
46142
|
+
select: function select(data) {
|
|
46143
|
+
var _data$wsServicesCal, _data$wsServicesCal$P;
|
|
46144
|
+
|
|
46145
|
+
data === null || data === void 0 ? void 0 : (_data$wsServicesCal = data["ws-services-calculation"]) === null || _data$wsServicesCal === void 0 ? void 0 : (_data$wsServicesCal$P = _data$wsServicesCal.PipeSize) === null || _data$wsServicesCal$P === void 0 ? void 0 : _data$wsServicesCal$P.forEach(function (type) {
|
|
46146
|
+
type.i18nKey = type.size ? type.size + " Inches" : "";
|
|
46147
|
+
});
|
|
46148
|
+
return data !== null && data !== void 0 && data["ws-services-calculation"] ? data === null || data === void 0 ? void 0 : data["ws-services-calculation"] : [];
|
|
46149
|
+
}
|
|
46150
|
+
});
|
|
46151
|
+
}
|
|
46152
|
+
};
|
|
46153
|
+
|
|
46154
|
+
var usewsTenants = function usewsTenants() {
|
|
46155
|
+
var tenantInfo = Digit.SessionStorage.get("WS_TENANTS");
|
|
46156
|
+
|
|
46157
|
+
var _useState = React.useState(tenantInfo ? tenantInfo : null),
|
|
46158
|
+
tenants = _useState[0];
|
|
46159
|
+
|
|
46160
|
+
return tenants;
|
|
46161
|
+
};
|
|
46162
|
+
|
|
46163
|
+
var getDate = function getDate(epochdate) {
|
|
46164
|
+
return epochdate ? new Date(epochdate).getDate() + "/" + (new Date(epochdate).getMonth() + 1) + "/" + new Date(epochdate).getFullYear().toString() : "NA";
|
|
46165
|
+
};
|
|
46166
|
+
|
|
46167
|
+
var getAddress = function getAddress(address, t) {
|
|
46168
|
+
return (address !== null && address !== void 0 && address.doorNo ? (address === null || address === void 0 ? void 0 : address.doorNo) + ", " : "") + " " + (address !== null && address !== void 0 && address.street ? (address === null || address === void 0 ? void 0 : address.street) + ", " : "") + (address !== null && address !== void 0 && address.landmark ? (address === null || address === void 0 ? void 0 : address.landmark) + ", " : "") + t(address === null || address === void 0 ? void 0 : address.locality.code) + ", " + t(address === null || address === void 0 ? void 0 : address.city.code) + "," + (t(address === null || address === void 0 ? void 0 : address.pincode) ? "" + address.pincode : " ");
|
|
46169
|
+
};
|
|
46170
|
+
|
|
46171
|
+
var combineResponse$4 = function combineResponse(WaterConnections, properties, billData, t) {
|
|
46172
|
+
if (WaterConnections && properties) return WaterConnections.map(function (app) {
|
|
46173
|
+
var _properties$filter$, _properties$filter$$o, _billData$filter$, _billData$filter$$bil, _billData$filter$$bil2, _billData$filter$2, _billData$filter$2$bi, _billData$filter$2$bi2, _billData$filter$3, _billData$filter$3$bi, _billData$filter$3$bi2;
|
|
46174
|
+
|
|
46175
|
+
return {
|
|
46176
|
+
ConsumerNumber: app === null || app === void 0 ? void 0 : app.connectionNo,
|
|
46177
|
+
ConsumerName: app !== null && app !== void 0 && app.connectionHolders ? app === null || app === void 0 ? void 0 : app.connectionHolders.map(function (owner) {
|
|
46178
|
+
return owner === null || owner === void 0 ? void 0 : owner.name;
|
|
46179
|
+
}).join(",") : (_properties$filter$ = properties.filter(function (prop) {
|
|
46180
|
+
return prop.propertyId === (app === null || app === void 0 ? void 0 : app.propertyId);
|
|
46181
|
+
})[0]) === null || _properties$filter$ === void 0 ? void 0 : (_properties$filter$$o = _properties$filter$.owners) === null || _properties$filter$$o === void 0 ? void 0 : _properties$filter$$o.map(function (ow) {
|
|
46182
|
+
return ow.name;
|
|
46183
|
+
}).join(","),
|
|
46184
|
+
Address: getAddress(properties.filter(function (prop) {
|
|
46185
|
+
return prop.propertyId === (app === null || app === void 0 ? void 0 : app.propertyId);
|
|
46186
|
+
})[0].address, t),
|
|
46187
|
+
AmountDue: billData ? billData !== null && billData !== void 0 && (_billData$filter$ = billData.filter(function (bill) {
|
|
46188
|
+
return (bill === null || bill === void 0 ? void 0 : bill.consumerCode) === (app === null || app === void 0 ? void 0 : app.connectionNo);
|
|
46189
|
+
})[0]) !== null && _billData$filter$ !== void 0 && (_billData$filter$$bil = _billData$filter$.billDetails) !== null && _billData$filter$$bil !== void 0 && (_billData$filter$$bil2 = _billData$filter$$bil[0]) !== null && _billData$filter$$bil2 !== void 0 && _billData$filter$$bil2.amount ? billData === null || billData === void 0 ? void 0 : (_billData$filter$2 = billData.filter(function (bill) {
|
|
46190
|
+
return (bill === null || bill === void 0 ? void 0 : bill.consumerCode) === (app === null || app === void 0 ? void 0 : app.connectionNo);
|
|
46191
|
+
})[0]) === null || _billData$filter$2 === void 0 ? void 0 : (_billData$filter$2$bi = _billData$filter$2.billDetails) === null || _billData$filter$2$bi === void 0 ? void 0 : (_billData$filter$2$bi2 = _billData$filter$2$bi[0]) === null || _billData$filter$2$bi2 === void 0 ? void 0 : _billData$filter$2$bi2.amount : "NA" : "NA",
|
|
46192
|
+
DueDate: billData ? getDate(billData === null || billData === void 0 ? void 0 : (_billData$filter$3 = billData.filter(function (bill) {
|
|
46193
|
+
return (bill === null || bill === void 0 ? void 0 : bill.consumerCode) === (app === null || app === void 0 ? void 0 : app.connectionNo);
|
|
46194
|
+
})[0]) === null || _billData$filter$3 === void 0 ? void 0 : (_billData$filter$3$bi = _billData$filter$3.billDetails) === null || _billData$filter$3$bi === void 0 ? void 0 : (_billData$filter$3$bi2 = _billData$filter$3$bi[0]) === null || _billData$filter$3$bi2 === void 0 ? void 0 : _billData$filter$3$bi2.expiryDate) : "NA"
|
|
46195
|
+
};
|
|
46196
|
+
});else return undefined;
|
|
46197
|
+
};
|
|
46198
|
+
|
|
46199
|
+
var useWaterSearch = function useWaterSearch(_ref, config) {
|
|
46200
|
+
var _response$data, _response$data$WaterC, _response$data2, _response$data2$Sewer, _response$data3, _properties$data, _billData$data;
|
|
46201
|
+
|
|
46202
|
+
var tenantId = _ref.tenantId,
|
|
46203
|
+
_ref$filters = _ref.filters,
|
|
46204
|
+
filters = _ref$filters === void 0 ? {} : _ref$filters,
|
|
46205
|
+
_ref$BusinessService = _ref.BusinessService,
|
|
46206
|
+
BusinessService = _ref$BusinessService === void 0 ? "WS" : _ref$BusinessService,
|
|
46207
|
+
t = _ref.t;
|
|
46208
|
+
|
|
46209
|
+
if (config === void 0) {
|
|
46210
|
+
config = {};
|
|
46211
|
+
}
|
|
46212
|
+
|
|
46213
|
+
var response = reactQuery.useQuery(['WS_SEARCH', tenantId, filters, BusinessService], function () {
|
|
46214
|
+
try {
|
|
46215
|
+
return Promise.resolve(WSService.search({
|
|
46216
|
+
tenantId: tenantId,
|
|
46217
|
+
filters: _extends({}, filters),
|
|
46218
|
+
businessService: BusinessService
|
|
46219
|
+
}));
|
|
46220
|
+
} catch (e) {
|
|
46221
|
+
return Promise.reject(e);
|
|
46222
|
+
}
|
|
46223
|
+
}, config);
|
|
46224
|
+
var propertyids = "";
|
|
46225
|
+
var consumercodes = "";
|
|
46226
|
+
if (BusinessService === "WS") response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$WaterC = _response$data.WaterConnection) === null || _response$data$WaterC === void 0 ? void 0 : _response$data$WaterC.forEach(function (item) {
|
|
46227
|
+
propertyids = propertyids + (item === null || item === void 0 ? void 0 : item.propertyId) + ",";
|
|
46228
|
+
consumercodes = consumercodes + (item === null || item === void 0 ? void 0 : item.connectionNo) + ",";
|
|
46229
|
+
});else response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$Sewer = _response$data2.SewerageConnections) === null || _response$data2$Sewer === void 0 ? void 0 : _response$data2$Sewer.forEach(function (item) {
|
|
46230
|
+
propertyids = propertyids + (item === null || item === void 0 ? void 0 : item.propertyId) + ",";
|
|
46231
|
+
consumercodes = consumercodes + (item === null || item === void 0 ? void 0 : item.connectionNo) + ",";
|
|
46232
|
+
});
|
|
46233
|
+
var propertyfilter = {
|
|
46234
|
+
propertyIds: propertyids.substring(0, propertyids.length - 1)
|
|
46235
|
+
};
|
|
46236
|
+
if (propertyids !== "" && filters !== null && filters !== void 0 && filters.locality) propertyfilter.locality = filters === null || filters === void 0 ? void 0 : filters.locality;
|
|
46237
|
+
config = {
|
|
46238
|
+
enabled: propertyids !== "" ? true : false
|
|
46239
|
+
};
|
|
46240
|
+
var properties = reactQuery.useQuery(['WSP_SEARCH', tenantId, propertyfilter, BusinessService], function () {
|
|
46241
|
+
try {
|
|
46242
|
+
return Promise.resolve(PTService.search({
|
|
46243
|
+
tenantId: tenantId,
|
|
46244
|
+
filters: propertyfilter,
|
|
46245
|
+
auth: filters !== null && filters !== void 0 && filters.locality ? false : true
|
|
46246
|
+
}));
|
|
46247
|
+
} catch (e) {
|
|
46248
|
+
return Promise.reject(e);
|
|
46249
|
+
}
|
|
46250
|
+
}, config);
|
|
46251
|
+
var billData = reactQuery.useQuery(['BILL_SEARCH', tenantId, consumercodes, BusinessService], function () {
|
|
46252
|
+
try {
|
|
46253
|
+
return Promise.resolve(Digit.PaymentService.fetchBill(tenantId, {
|
|
46254
|
+
businessService: BusinessService,
|
|
46255
|
+
consumerCode: consumercodes.substring(0, propertyids.length - 1)
|
|
46256
|
+
}));
|
|
46257
|
+
} catch (e) {
|
|
46258
|
+
return Promise.reject(e);
|
|
46259
|
+
}
|
|
46260
|
+
}, config);
|
|
46261
|
+
return combineResponse$4(response === null || response === void 0 ? void 0 : (_response$data3 = response.data) === null || _response$data3 === void 0 ? void 0 : _response$data3.WaterConnection, properties === null || properties === void 0 ? void 0 : (_properties$data = properties.data) === null || _properties$data === void 0 ? void 0 : _properties$data.Properties, billData === null || billData === void 0 ? void 0 : (_billData$data = billData.data) === null || _billData$data === void 0 ? void 0 : _billData$data.Bill, t);
|
|
46262
|
+
};
|
|
46263
|
+
|
|
46264
|
+
var getDate$1 = function getDate(epochdate) {
|
|
46265
|
+
return epochdate ? new Date(epochdate).getDate() + "/" + (new Date(epochdate).getMonth() + 1) + "/" + new Date(epochdate).getFullYear().toString() : "NA";
|
|
46266
|
+
};
|
|
46267
|
+
|
|
46268
|
+
var getAddress$1 = function getAddress(address, t) {
|
|
46269
|
+
return (address !== null && address !== void 0 && address.doorNo ? (address === null || address === void 0 ? void 0 : address.doorNo) + ", " : "") + " " + (address !== null && address !== void 0 && address.street ? (address === null || address === void 0 ? void 0 : address.street) + ", " : "") + (address !== null && address !== void 0 && address.landmark ? (address === null || address === void 0 ? void 0 : address.landmark) + ", " : "") + t(address === null || address === void 0 ? void 0 : address.locality.code) + ", " + t(address === null || address === void 0 ? void 0 : address.city.code) + "," + (t(address === null || address === void 0 ? void 0 : address.pincode) ? "" + address.pincode : " ");
|
|
46270
|
+
};
|
|
46271
|
+
|
|
46272
|
+
var combineResponse$5 = function combineResponse(WaterConnections, properties, billData, t) {
|
|
46273
|
+
if (WaterConnections && properties) return WaterConnections.map(function (app) {
|
|
46274
|
+
var _properties$filter$, _properties$filter$$o, _billData$filter$0$bi, _billData$filter$0$bi2, _billData$filter$0$bi3, _billData$filter$0$bi4, _billData$filter$0$bi5, _billData$filter$0$bi6;
|
|
46275
|
+
|
|
46276
|
+
return {
|
|
46277
|
+
ConsumerNumber: app === null || app === void 0 ? void 0 : app.connectionNo,
|
|
46278
|
+
ConsumerName: app !== null && app !== void 0 && app.connectionHolders ? app === null || app === void 0 ? void 0 : app.connectionHolders.map(function (owner) {
|
|
46279
|
+
return owner === null || owner === void 0 ? void 0 : owner.name;
|
|
46280
|
+
}).join(",") : (_properties$filter$ = properties.filter(function (prop) {
|
|
46281
|
+
return prop.propertyId === (app === null || app === void 0 ? void 0 : app.propertyId);
|
|
46282
|
+
})[0]) === null || _properties$filter$ === void 0 ? void 0 : (_properties$filter$$o = _properties$filter$.owners) === null || _properties$filter$$o === void 0 ? void 0 : _properties$filter$$o.map(function (ow) {
|
|
46283
|
+
return ow.name;
|
|
46284
|
+
}).join(","),
|
|
46285
|
+
Address: getAddress$1(properties.filter(function (prop) {
|
|
46286
|
+
return prop.propertyId === (app === null || app === void 0 ? void 0 : app.propertyId);
|
|
46287
|
+
})[0].address, t),
|
|
46288
|
+
AmountDue: billData ? billData !== null && billData !== void 0 && (_billData$filter$0$bi = billData.filter(function (bill) {
|
|
46289
|
+
return (bill === null || bill === void 0 ? void 0 : bill.consumerCode) === (app === null || app === void 0 ? void 0 : app.connectionNo);
|
|
46290
|
+
})[0].billDetails) !== null && _billData$filter$0$bi !== void 0 && (_billData$filter$0$bi2 = _billData$filter$0$bi[0]) !== null && _billData$filter$0$bi2 !== void 0 && _billData$filter$0$bi2.amount ? billData === null || billData === void 0 ? void 0 : (_billData$filter$0$bi3 = billData.filter(function (bill) {
|
|
46291
|
+
return (bill === null || bill === void 0 ? void 0 : bill.consumerCode) === (app === null || app === void 0 ? void 0 : app.connectionNo);
|
|
46292
|
+
})[0].billDetails) === null || _billData$filter$0$bi3 === void 0 ? void 0 : (_billData$filter$0$bi4 = _billData$filter$0$bi3[0]) === null || _billData$filter$0$bi4 === void 0 ? void 0 : _billData$filter$0$bi4.amount : "NA" : "NA",
|
|
46293
|
+
DueDate: billData ? getDate$1(billData === null || billData === void 0 ? void 0 : (_billData$filter$0$bi5 = billData.filter(function (bill) {
|
|
46294
|
+
return (bill === null || bill === void 0 ? void 0 : bill.consumerCode) === (app === null || app === void 0 ? void 0 : app.connectionNo);
|
|
46295
|
+
})[0].billDetails) === null || _billData$filter$0$bi5 === void 0 ? void 0 : (_billData$filter$0$bi6 = _billData$filter$0$bi5[0]) === null || _billData$filter$0$bi6 === void 0 ? void 0 : _billData$filter$0$bi6.expiryDate) : "NA"
|
|
46296
|
+
};
|
|
46297
|
+
});else return undefined;
|
|
46298
|
+
};
|
|
46299
|
+
|
|
46300
|
+
var useSewarageSearch = function useSewarageSearch(_ref, config) {
|
|
46301
|
+
var _response$data, _response$data$Sewera, _response$data2, _properties$data, _billData$data;
|
|
46302
|
+
|
|
46303
|
+
var tenantId = _ref.tenantId,
|
|
46304
|
+
_ref$filters = _ref.filters,
|
|
46305
|
+
filters = _ref$filters === void 0 ? {} : _ref$filters,
|
|
46306
|
+
_ref$BusinessService = _ref.BusinessService,
|
|
46307
|
+
BusinessService = _ref$BusinessService === void 0 ? "WS" : _ref$BusinessService,
|
|
46308
|
+
t = _ref.t;
|
|
46309
|
+
|
|
46310
|
+
if (config === void 0) {
|
|
46311
|
+
config = {};
|
|
46312
|
+
}
|
|
46313
|
+
|
|
46314
|
+
var response = reactQuery.useQuery(['WS_SEARCH', tenantId, filters, BusinessService], function () {
|
|
46315
|
+
try {
|
|
46316
|
+
return Promise.resolve(WSService.search({
|
|
46317
|
+
tenantId: tenantId,
|
|
46318
|
+
filters: _extends({}, filters),
|
|
46319
|
+
businessService: BusinessService
|
|
46320
|
+
}));
|
|
46321
|
+
} catch (e) {
|
|
46322
|
+
return Promise.reject(e);
|
|
46323
|
+
}
|
|
46324
|
+
}, config);
|
|
46325
|
+
var propertyids = "";
|
|
46326
|
+
var consumercodes = "";
|
|
46327
|
+
response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$Sewera = _response$data.SewerageConnections) === null || _response$data$Sewera === void 0 ? void 0 : _response$data$Sewera.forEach(function (item) {
|
|
46328
|
+
propertyids = propertyids + (item === null || item === void 0 ? void 0 : item.propertyId) + ",";
|
|
46329
|
+
consumercodes = consumercodes + (item === null || item === void 0 ? void 0 : item.connectionNo) + ",";
|
|
46330
|
+
});
|
|
46331
|
+
var propertyfilter = {
|
|
46332
|
+
propertyIds: propertyids.substring(0, propertyids.length - 1)
|
|
46333
|
+
};
|
|
46334
|
+
if (propertyids !== "" && filters !== null && filters !== void 0 && filters.locality) propertyfilter.locality = filters === null || filters === void 0 ? void 0 : filters.locality;
|
|
46335
|
+
config = {
|
|
46336
|
+
enabled: propertyids !== "" ? true : false
|
|
46337
|
+
};
|
|
46338
|
+
var properties = reactQuery.useQuery(['WSP_SEARCH', tenantId, propertyfilter, BusinessService], function () {
|
|
46339
|
+
try {
|
|
46340
|
+
return Promise.resolve(PTService.search({
|
|
46341
|
+
tenantId: tenantId,
|
|
46342
|
+
filters: propertyfilter,
|
|
46343
|
+
auth: filters !== null && filters !== void 0 && filters.locality ? false : true
|
|
46344
|
+
}));
|
|
46345
|
+
} catch (e) {
|
|
46346
|
+
return Promise.reject(e);
|
|
46347
|
+
}
|
|
46348
|
+
}, config);
|
|
46349
|
+
var billData = reactQuery.useQuery(['BILL_SEARCH', tenantId, consumercodes, BusinessService], function () {
|
|
46350
|
+
try {
|
|
46351
|
+
return Promise.resolve(Digit.PaymentService.fetchBill(tenantId, {
|
|
46352
|
+
businessService: BusinessService,
|
|
46353
|
+
consumerCode: consumercodes.substring(0, propertyids.length - 2)
|
|
46354
|
+
}));
|
|
46355
|
+
} catch (e) {
|
|
46356
|
+
return Promise.reject(e);
|
|
46357
|
+
}
|
|
46358
|
+
}, config);
|
|
46359
|
+
return combineResponse$5(response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : _response$data2.SewerageConnections, properties === null || properties === void 0 ? void 0 : (_properties$data = properties.data) === null || _properties$data === void 0 ? void 0 : _properties$data.Properties, billData === null || billData === void 0 ? void 0 : (_billData$data = billData.data) === null || _billData$data === void 0 ? void 0 : _billData$data.Bill, t);
|
|
46360
|
+
};
|
|
46361
|
+
|
|
44539
46362
|
var pgr = {
|
|
44540
46363
|
useComplaintDetails: useComplaintDetails,
|
|
44541
46364
|
useComplaintsList: useComplaintsList,
|
|
@@ -44577,11 +46400,13 @@ var fsm = {
|
|
|
44577
46400
|
useSlum: useSlum,
|
|
44578
46401
|
usePaymentHistory: usePaymentHistory
|
|
44579
46402
|
};
|
|
44580
|
-
var pt = {
|
|
46403
|
+
var pt$1 = {
|
|
44581
46404
|
usePropertySearch: usePropertySearch,
|
|
44582
46405
|
usePropertyPayment: usePropertyPayment,
|
|
44583
46406
|
usePropertyMDMS: usePropertyMDMS,
|
|
46407
|
+
usePropertySearchWithDue: usePropertySearchWithDue,
|
|
44584
46408
|
usePropertyAPI: usePropertyAPI,
|
|
46409
|
+
usePropertyCreateNUpdateAPI: usePropertyCreateNUpdateAPI,
|
|
44585
46410
|
usePropertyDocumentSearch: usePropertyDocumentSearch,
|
|
44586
46411
|
useTenants: useTenants$3,
|
|
44587
46412
|
useApplicationDetail: useApplicationDetail$1,
|
|
@@ -44590,7 +46415,9 @@ var pt = {
|
|
|
44590
46415
|
usePropertyAssessment: usePropertyAssessment,
|
|
44591
46416
|
usePtCalculationEstimate: usePtCalculationEstimate,
|
|
44592
46417
|
useGenderMDMS: useGenderMDMS,
|
|
44593
|
-
usePTGenderMDMS: usePTGenderMDMS
|
|
46418
|
+
usePTGenderMDMS: usePTGenderMDMS,
|
|
46419
|
+
useMyPropertyPayments: useMyPropertyPayments,
|
|
46420
|
+
useGenericViewProperty: useGenericViewProperty
|
|
44594
46421
|
};
|
|
44595
46422
|
var dss = {
|
|
44596
46423
|
useMDMS: useDssMDMS,
|
|
@@ -44694,7 +46521,14 @@ var survey = {
|
|
|
44694
46521
|
var noc = {
|
|
44695
46522
|
useNOCDetails: useNOCDetails,
|
|
44696
46523
|
useNOCApplicationActions: useNOCApplicationActions,
|
|
44697
|
-
useInbox: useNOCInbox
|
|
46524
|
+
useInbox: useNOCInbox,
|
|
46525
|
+
useNOCSearchApplication: useNOCSearchApplication
|
|
46526
|
+
};
|
|
46527
|
+
var ws = {
|
|
46528
|
+
WSSearchMdmsTypes: WSSearchMdmsTypes,
|
|
46529
|
+
usewsTenants: usewsTenants,
|
|
46530
|
+
useWaterSearch: useWaterSearch,
|
|
46531
|
+
useSewarageSearch: useSewarageSearch
|
|
44698
46532
|
};
|
|
44699
46533
|
var Hooks = {
|
|
44700
46534
|
useSessionStorage: useSessionStorage,
|
|
@@ -44726,7 +46560,7 @@ var Hooks = {
|
|
|
44726
46560
|
useInbox: useTLInbox,
|
|
44727
46561
|
pgr: pgr,
|
|
44728
46562
|
fsm: fsm,
|
|
44729
|
-
pt: pt,
|
|
46563
|
+
pt: pt$1,
|
|
44730
46564
|
dss: dss,
|
|
44731
46565
|
mcollect: mcollect,
|
|
44732
46566
|
hrms: hrms,
|
|
@@ -44736,7 +46570,8 @@ var Hooks = {
|
|
|
44736
46570
|
events: events,
|
|
44737
46571
|
engagement: engagement,
|
|
44738
46572
|
survey: survey,
|
|
44739
|
-
noc: noc
|
|
46573
|
+
noc: noc,
|
|
46574
|
+
ws: ws
|
|
44740
46575
|
};
|
|
44741
46576
|
|
|
44742
46577
|
var checkWebview = function checkWebview() {
|
|
@@ -44753,7 +46588,6 @@ var mobileCheck = function mobileCheck() {
|
|
|
44753
46588
|
if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4))) check = true;
|
|
44754
46589
|
})(navigator.userAgent || navigator.vendor || window.opera);
|
|
44755
46590
|
|
|
44756
|
-
console.debug("check", check);
|
|
44757
46591
|
return check;
|
|
44758
46592
|
};
|
|
44759
46593
|
|
|
@@ -44762,7 +46596,7 @@ var BrowserUtil = {
|
|
|
44762
46596
|
isMobile: mobileCheck
|
|
44763
46597
|
};
|
|
44764
46598
|
|
|
44765
|
-
function getDate(timestamp) {
|
|
46599
|
+
function getDate$2(timestamp) {
|
|
44766
46600
|
var dt = timestamp ? new Date(timestamp) : new Date();
|
|
44767
46601
|
var dd = dt.getDate();
|
|
44768
46602
|
var mm = dt.getMonth() + 1;
|
|
@@ -44783,7 +46617,7 @@ var monthNames = ["Jan", "Feb", "March", "Apr", "May", "June", "July", "Aug", "S
|
|
|
44783
46617
|
|
|
44784
46618
|
var date = {
|
|
44785
46619
|
__proto__: null,
|
|
44786
|
-
getDate: getDate,
|
|
46620
|
+
getDate: getDate$2,
|
|
44787
46621
|
monthNames: monthNames
|
|
44788
46622
|
};
|
|
44789
46623
|
|
|
@@ -44792,12 +46626,15 @@ var amountFormatter = function amountFormatter(value, denomination) {
|
|
|
44792
46626
|
currency: "INR"
|
|
44793
46627
|
});
|
|
44794
46628
|
|
|
46629
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
46630
|
+
t = _useTranslation.t;
|
|
46631
|
+
|
|
44795
46632
|
switch (denomination) {
|
|
44796
46633
|
case "Lac":
|
|
44797
|
-
return "\u20B9 " + currencyFormatter.format((value / 100000).toFixed(2) || 0) + "
|
|
46634
|
+
return "\u20B9 " + currencyFormatter.format((value / 100000).toFixed(2) || 0) + " " + t("ES_DSS_LAC");
|
|
44798
46635
|
|
|
44799
46636
|
case "Cr":
|
|
44800
|
-
return "\u20B9 " + currencyFormatter.format((value / 10000000).toFixed(2) || 0) + "
|
|
46637
|
+
return "\u20B9 " + currencyFormatter.format((value / 10000000).toFixed(2) || 0) + " " + t("ES_DSS_CR");
|
|
44801
46638
|
|
|
44802
46639
|
case "Unit":
|
|
44803
46640
|
return "\u20B9 " + currencyFormatter.format((value === null || value === void 0 ? void 0 : value.toFixed(2)) || 0);
|
|
@@ -44818,6 +46655,9 @@ var formatter = function formatter(value, symbol, unit, commaSeparated) {
|
|
|
44818
46655
|
case "amount":
|
|
44819
46656
|
return amountFormatter(value, unit);
|
|
44820
46657
|
|
|
46658
|
+
case "Amount":
|
|
46659
|
+
return amountFormatter(value, unit);
|
|
46660
|
+
|
|
44821
46661
|
case "number":
|
|
44822
46662
|
if (!commaSeparated) {
|
|
44823
46663
|
return parseInt(value);
|
|
@@ -44863,12 +46703,57 @@ var getInitialRange = function getInitialRange() {
|
|
|
44863
46703
|
duration: duration
|
|
44864
46704
|
};
|
|
44865
46705
|
};
|
|
46706
|
+
var getDefaultFinacialYear = function getDefaultFinacialYear() {
|
|
46707
|
+
var currDate = new Date().getMonth();
|
|
46708
|
+
|
|
46709
|
+
if (currDate < 3) {
|
|
46710
|
+
return {
|
|
46711
|
+
startDate: dateFns.subYears(dateFns.addMonths(dateFns.startOfYear(new Date()), 3), 1),
|
|
46712
|
+
endDate: dateFns.endOfToday(new Date())
|
|
46713
|
+
};
|
|
46714
|
+
} else {
|
|
46715
|
+
return {
|
|
46716
|
+
startDate: dateFns.addMonths(dateFns.startOfYear(new Date()), 3),
|
|
46717
|
+
endDate: dateFns.endOfToday(new Date())
|
|
46718
|
+
};
|
|
46719
|
+
}
|
|
46720
|
+
};
|
|
46721
|
+
var getCurrentModuleName = function getCurrentModuleName() {
|
|
46722
|
+
var allPaths = window.location.pathname.split('/');
|
|
46723
|
+
return allPaths[allPaths.length - 1];
|
|
46724
|
+
};
|
|
46725
|
+
var checkSelected = function checkSelected(e, selectedDDRs) {
|
|
46726
|
+
if (!selectedDDRs || (selectedDDRs === null || selectedDDRs === void 0 ? void 0 : selectedDDRs.length) == 0) {
|
|
46727
|
+
return true;
|
|
46728
|
+
} else if (selectedDDRs.find(function (ddr) {
|
|
46729
|
+
return ddr.ddrKey == e.ddrKey;
|
|
46730
|
+
})) {
|
|
46731
|
+
return true;
|
|
46732
|
+
} else {
|
|
46733
|
+
return false;
|
|
46734
|
+
}
|
|
46735
|
+
};
|
|
46736
|
+
var getCitiesAvailable = function getCitiesAvailable(e, selectedDDRs) {
|
|
46737
|
+
if (!selectedDDRs || (selectedDDRs === null || selectedDDRs === void 0 ? void 0 : selectedDDRs.length) == 0) {
|
|
46738
|
+
return true;
|
|
46739
|
+
} else if (selectedDDRs.find(function (ddr) {
|
|
46740
|
+
return ddr == e.ddrKey;
|
|
46741
|
+
})) {
|
|
46742
|
+
return true;
|
|
46743
|
+
} else {
|
|
46744
|
+
return false;
|
|
46745
|
+
}
|
|
46746
|
+
};
|
|
44866
46747
|
|
|
44867
46748
|
var dss$1 = {
|
|
44868
46749
|
__proto__: null,
|
|
44869
46750
|
formatter: formatter,
|
|
44870
46751
|
getDuration: getDuration,
|
|
44871
|
-
getInitialRange: getInitialRange
|
|
46752
|
+
getInitialRange: getInitialRange,
|
|
46753
|
+
getDefaultFinacialYear: getDefaultFinacialYear,
|
|
46754
|
+
getCurrentModuleName: getCurrentModuleName,
|
|
46755
|
+
checkSelected: checkSelected,
|
|
46756
|
+
getCitiesAvailable: getCitiesAvailable
|
|
44872
46757
|
};
|
|
44873
46758
|
|
|
44874
46759
|
var getLocalityCode = function getLocalityCode(locality, tenantId) {
|
|
@@ -44877,7 +46762,7 @@ var getLocalityCode = function getLocalityCode(locality, tenantId) {
|
|
|
44877
46762
|
var getRevenueLocalityCode = function getRevenueLocalityCode(locality, tenantId) {
|
|
44878
46763
|
if (typeof locality === "string") return locality.includes("_") ? locality : tenantId.replace(".", "_").toUpperCase() + "_REVENUE_" + locality;else if (locality.code) return locality.code.includes("_") ? locality : tenantId.replace(".", "_").toUpperCase() + "_REVENUE_" + locality.code;
|
|
44879
46764
|
};
|
|
44880
|
-
var stringReplaceAll$
|
|
46765
|
+
var stringReplaceAll$3 = function stringReplaceAll(str, searcher, replaceWith) {
|
|
44881
46766
|
if (str === void 0) {
|
|
44882
46767
|
str = "";
|
|
44883
46768
|
}
|
|
@@ -44898,21 +46783,21 @@ var stringReplaceAll$2 = function stringReplaceAll(str, searcher, replaceWith) {
|
|
|
44898
46783
|
|
|
44899
46784
|
return str;
|
|
44900
46785
|
};
|
|
44901
|
-
var checkForNotNull = function checkForNotNull(value) {
|
|
46786
|
+
var checkForNotNull$1 = function checkForNotNull(value) {
|
|
44902
46787
|
if (value === void 0) {
|
|
44903
46788
|
value = "";
|
|
44904
46789
|
}
|
|
44905
46790
|
|
|
44906
46791
|
return value && value != null && value != undefined && value != "" ? true : false;
|
|
44907
46792
|
};
|
|
44908
|
-
var convertDotValues = function convertDotValues(value) {
|
|
46793
|
+
var convertDotValues$1 = function convertDotValues(value) {
|
|
44909
46794
|
if (value === void 0) {
|
|
44910
46795
|
value = "";
|
|
44911
46796
|
}
|
|
44912
46797
|
|
|
44913
|
-
return checkForNotNull(value) && (value.replaceAll && value.replaceAll(".", "_") || value.replace && stringReplaceAll$
|
|
46798
|
+
return checkForNotNull$1(value) && (value.replaceAll && value.replaceAll(".", "_") || value.replace && stringReplaceAll$3(value, ".", "_")) || "NA";
|
|
44914
46799
|
};
|
|
44915
|
-
var convertToLocale = function convertToLocale(value, key) {
|
|
46800
|
+
var convertToLocale$1 = function convertToLocale(value, key) {
|
|
44916
46801
|
var _convertDotValues;
|
|
44917
46802
|
|
|
44918
46803
|
if (value === void 0) {
|
|
@@ -44923,7 +46808,7 @@ var convertToLocale = function convertToLocale(value, key) {
|
|
|
44923
46808
|
key = "";
|
|
44924
46809
|
}
|
|
44925
46810
|
|
|
44926
|
-
var convertedValue = (_convertDotValues = convertDotValues(value)) === null || _convertDotValues === void 0 ? void 0 : _convertDotValues.toUpperCase();
|
|
46811
|
+
var convertedValue = (_convertDotValues = convertDotValues$1(value)) === null || _convertDotValues === void 0 ? void 0 : _convertDotValues.toUpperCase();
|
|
44927
46812
|
|
|
44928
46813
|
if (convertedValue == "NA") {
|
|
44929
46814
|
return "COMMON_NA";
|
|
@@ -44931,7 +46816,7 @@ var convertToLocale = function convertToLocale(value, key) {
|
|
|
44931
46816
|
|
|
44932
46817
|
return key + "_" + convertedValue;
|
|
44933
46818
|
};
|
|
44934
|
-
var getMohallaLocale = function getMohallaLocale(value, tenantId) {
|
|
46819
|
+
var getMohallaLocale$1 = function getMohallaLocale(value, tenantId) {
|
|
44935
46820
|
if (value === void 0) {
|
|
44936
46821
|
value = "";
|
|
44937
46822
|
}
|
|
@@ -44940,28 +46825,28 @@ var getMohallaLocale = function getMohallaLocale(value, tenantId) {
|
|
|
44940
46825
|
tenantId = "";
|
|
44941
46826
|
}
|
|
44942
46827
|
|
|
44943
|
-
var convertedValue = convertDotValues(tenantId);
|
|
46828
|
+
var convertedValue = convertDotValues$1(tenantId);
|
|
44944
46829
|
|
|
44945
|
-
if (convertedValue == "NA" || !checkForNotNull(value)) {
|
|
46830
|
+
if (convertedValue == "NA" || !checkForNotNull$1(value)) {
|
|
44946
46831
|
return "COMMON_NA";
|
|
44947
46832
|
}
|
|
44948
46833
|
|
|
44949
46834
|
convertedValue = convertedValue.toUpperCase();
|
|
44950
|
-
return convertToLocale(value, convertedValue + "_REVENUE");
|
|
46835
|
+
return convertToLocale$1(value, convertedValue + "_REVENUE");
|
|
44951
46836
|
};
|
|
44952
|
-
var getCityLocale = function getCityLocale(value) {
|
|
46837
|
+
var getCityLocale$1 = function getCityLocale(value) {
|
|
44953
46838
|
if (value === void 0) {
|
|
44954
46839
|
value = "";
|
|
44955
46840
|
}
|
|
44956
46841
|
|
|
44957
|
-
var convertedValue = convertDotValues(value);
|
|
46842
|
+
var convertedValue = convertDotValues$1(value);
|
|
44958
46843
|
|
|
44959
|
-
if (convertedValue == "NA" || !checkForNotNull(value)) {
|
|
46844
|
+
if (convertedValue == "NA" || !checkForNotNull$1(value)) {
|
|
44960
46845
|
return "COMMON_NA";
|
|
44961
46846
|
}
|
|
44962
46847
|
|
|
44963
46848
|
convertedValue = convertedValue.toUpperCase();
|
|
44964
|
-
return convertToLocale(convertedValue, "TENANT_TENANTS");
|
|
46849
|
+
return convertToLocale$1(convertedValue, "TENANT_TENANTS");
|
|
44965
46850
|
};
|
|
44966
46851
|
var convertToLocaleData = function convertToLocaleData(dropdownValues, key, t) {
|
|
44967
46852
|
if (dropdownValues === void 0) {
|
|
@@ -44973,7 +46858,7 @@ var convertToLocaleData = function convertToLocaleData(dropdownValues, key, t) {
|
|
|
44973
46858
|
}
|
|
44974
46859
|
|
|
44975
46860
|
return dropdownValues.map(function (ele) {
|
|
44976
|
-
ele["i18text"] = convertToLocale(ele.code, key);
|
|
46861
|
+
ele["i18text"] = convertToLocale$1(ele.code, key);
|
|
44977
46862
|
|
|
44978
46863
|
if (t) {
|
|
44979
46864
|
ele["i18text"] = t(ele["i18text"]);
|
|
@@ -44982,18 +46867,26 @@ var convertToLocaleData = function convertToLocaleData(dropdownValues, key, t) {
|
|
|
44982
46867
|
return ele;
|
|
44983
46868
|
});
|
|
44984
46869
|
};
|
|
46870
|
+
var getTransformedLocale$1 = function getTransformedLocale(label) {
|
|
46871
|
+
var _label;
|
|
46872
|
+
|
|
46873
|
+
if (typeof label === "number") return label;
|
|
46874
|
+
label = (_label = label) === null || _label === void 0 ? void 0 : _label.trim();
|
|
46875
|
+
return label && label.toUpperCase().replace(/[.:-\s\/]/g, "_");
|
|
46876
|
+
};
|
|
44985
46877
|
|
|
44986
46878
|
var locale = {
|
|
44987
46879
|
__proto__: null,
|
|
44988
46880
|
getLocalityCode: getLocalityCode,
|
|
44989
46881
|
getRevenueLocalityCode: getRevenueLocalityCode,
|
|
44990
|
-
stringReplaceAll: stringReplaceAll$
|
|
44991
|
-
checkForNotNull: checkForNotNull,
|
|
44992
|
-
convertDotValues: convertDotValues,
|
|
44993
|
-
convertToLocale: convertToLocale,
|
|
44994
|
-
getMohallaLocale: getMohallaLocale,
|
|
44995
|
-
getCityLocale: getCityLocale,
|
|
44996
|
-
convertToLocaleData: convertToLocaleData
|
|
46882
|
+
stringReplaceAll: stringReplaceAll$3,
|
|
46883
|
+
checkForNotNull: checkForNotNull$1,
|
|
46884
|
+
convertDotValues: convertDotValues$1,
|
|
46885
|
+
convertToLocale: convertToLocale$1,
|
|
46886
|
+
getMohallaLocale: getMohallaLocale$1,
|
|
46887
|
+
getCityLocale: getCityLocale$1,
|
|
46888
|
+
convertToLocaleData: convertToLocaleData,
|
|
46889
|
+
getTransformedLocale: getTransformedLocale$1
|
|
44997
46890
|
};
|
|
44998
46891
|
|
|
44999
46892
|
var calculateRiskType = function calculateRiskType(riskTypes, plotArea, blocks) {
|
|
@@ -45079,7 +46972,6 @@ function getBase64Image(tenantId) {
|
|
|
45079
46972
|
ctx.drawImage(img, 0, 0);
|
|
45080
46973
|
return canvas.toDataURL("image/png");
|
|
45081
46974
|
} catch (e) {
|
|
45082
|
-
console.error("asd", e);
|
|
45083
46975
|
return "";
|
|
45084
46976
|
}
|
|
45085
46977
|
}
|
|
@@ -45402,20 +47294,46 @@ var downloadPdf = function downloadPdf(blob, fileName) {
|
|
|
45402
47294
|
}
|
|
45403
47295
|
};
|
|
45404
47296
|
|
|
45405
|
-
var downloadReceipt = function downloadReceipt(consumerCode, businessService, pdfKey) {
|
|
47297
|
+
var downloadReceipt = function downloadReceipt(consumerCode, businessService, pdfKey, tenantId, receiptNumber) {
|
|
45406
47298
|
if (pdfKey === void 0) {
|
|
45407
47299
|
pdfKey = "consolidatedreceipt";
|
|
45408
47300
|
}
|
|
45409
47301
|
|
|
47302
|
+
if (receiptNumber === void 0) {
|
|
47303
|
+
receiptNumber = null;
|
|
47304
|
+
}
|
|
47305
|
+
|
|
47306
|
+
try {
|
|
47307
|
+
if (tenantId === undefined) tenantId = Digit.ULBService.getCurrentTenantId();
|
|
47308
|
+
return Promise.resolve(Digit.ReceiptsService.receipt_download(businessService, consumerCode, tenantId, pdfKey, receiptNumber)).then(function (response) {
|
|
47309
|
+
var responseStatus = parseInt(response.status, 10);
|
|
47310
|
+
|
|
47311
|
+
if (responseStatus === 201 || responseStatus === 200) {
|
|
47312
|
+
var filename = receiptNumber ? "receiptNumber-" + receiptNumber + ".pdf" : "consumer-" + consumerCode + ".pdf";
|
|
47313
|
+
downloadPdf(new Blob([response.data], {
|
|
47314
|
+
type: "application/pdf"
|
|
47315
|
+
}), filename);
|
|
47316
|
+
}
|
|
47317
|
+
});
|
|
47318
|
+
} catch (e) {
|
|
47319
|
+
return Promise.reject(e);
|
|
47320
|
+
}
|
|
47321
|
+
};
|
|
47322
|
+
var downloadBill = function downloadBill(consumerCode, businessService, pdfKey, tenantId) {
|
|
47323
|
+
if (pdfKey === void 0) {
|
|
47324
|
+
pdfKey = "consolidatedbill";
|
|
47325
|
+
}
|
|
47326
|
+
|
|
45410
47327
|
try {
|
|
45411
|
-
|
|
45412
|
-
return Promise.resolve(Digit.ReceiptsService.
|
|
47328
|
+
if (tenantId === undefined) tenantId = Digit.ULBService.getCurrentTenantId();
|
|
47329
|
+
return Promise.resolve(Digit.ReceiptsService.bill_download(businessService, consumerCode, tenantId, pdfKey)).then(function (response) {
|
|
45413
47330
|
var responseStatus = parseInt(response.status, 10);
|
|
45414
47331
|
|
|
45415
47332
|
if (responseStatus === 201 || responseStatus === 200) {
|
|
47333
|
+
var filename = consumerCode ? "consumerCode-" + consumerCode + ".pdf" : "consumer-" + consumerCode + ".pdf";
|
|
45416
47334
|
downloadPdf(new Blob([response.data], {
|
|
45417
47335
|
type: "application/pdf"
|
|
45418
|
-
}),
|
|
47336
|
+
}), filename);
|
|
45419
47337
|
}
|
|
45420
47338
|
});
|
|
45421
47339
|
} catch (e) {
|
|
@@ -45586,6 +47504,12 @@ var getPattern = function getPattern(type) {
|
|
|
45586
47504
|
}
|
|
45587
47505
|
};
|
|
45588
47506
|
|
|
47507
|
+
var getUnique$1 = function getUnique(arr) {
|
|
47508
|
+
return arr.filter(function (value, index, self) {
|
|
47509
|
+
return self.indexOf(value) === index;
|
|
47510
|
+
});
|
|
47511
|
+
};
|
|
47512
|
+
|
|
45589
47513
|
var getStaticMapUrl = function getStaticMapUrl(latitude, longitude) {
|
|
45590
47514
|
var _globalConfigs;
|
|
45591
47515
|
|
|
@@ -45612,19 +47536,21 @@ var routeSubscription = function routeSubscription(pathname) {
|
|
|
45612
47536
|
};
|
|
45613
47537
|
|
|
45614
47538
|
var didEmployeeHasRole = function didEmployeeHasRole(role) {
|
|
45615
|
-
var _userInfo$info;
|
|
47539
|
+
var _userInfo$info, _userInfo$info$roles;
|
|
45616
47540
|
|
|
45617
47541
|
var tenantId = Digit.ULBService.getCurrentTenantId();
|
|
45618
47542
|
var userInfo = Digit.UserService.getUser();
|
|
45619
|
-
var rolearray = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info = userInfo.info) === null || _userInfo$info === void 0 ? void 0 : _userInfo$info.roles.filter(function (item) {
|
|
47543
|
+
var rolearray = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info = userInfo.info) === null || _userInfo$info === void 0 ? void 0 : (_userInfo$info$roles = _userInfo$info.roles) === null || _userInfo$info$roles === void 0 ? void 0 : _userInfo$info$roles.filter(function (item) {
|
|
45620
47544
|
if (item.code == role && item.tenantId === tenantId) return true;
|
|
45621
47545
|
});
|
|
45622
47546
|
return rolearray === null || rolearray === void 0 ? void 0 : rolearray.length;
|
|
45623
47547
|
};
|
|
45624
47548
|
|
|
45625
47549
|
var pgrAccess = function pgrAccess() {
|
|
47550
|
+
var _userInfo$info2, _userInfo$info2$roles;
|
|
47551
|
+
|
|
45626
47552
|
var userInfo = Digit.UserService.getUser();
|
|
45627
|
-
var userRoles = userInfo === null || userInfo === void 0 ? void 0 : userInfo.info.roles.map(function (roleData) {
|
|
47553
|
+
var userRoles = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info2 = userInfo.info) === null || _userInfo$info2 === void 0 ? void 0 : (_userInfo$info2$roles = _userInfo$info2.roles) === null || _userInfo$info2$roles === void 0 ? void 0 : _userInfo$info2$roles.map(function (roleData) {
|
|
45628
47554
|
return roleData.code;
|
|
45629
47555
|
});
|
|
45630
47556
|
var pgrRoles = ["PGR_LME", "PGR-ADMIN", "CSR", "CEMP", "FEMP", "DGRO", "ULB Operator", "GRO", "GO", "RO", "GA"];
|
|
@@ -45635,8 +47561,10 @@ var pgrAccess = function pgrAccess() {
|
|
|
45635
47561
|
};
|
|
45636
47562
|
|
|
45637
47563
|
var fsmAccess = function fsmAccess() {
|
|
47564
|
+
var _userInfo$info3, _userInfo$info3$roles;
|
|
47565
|
+
|
|
45638
47566
|
var userInfo = Digit.UserService.getUser();
|
|
45639
|
-
var userRoles = userInfo === null || userInfo === void 0 ? void 0 : userInfo.info.roles.map(function (roleData) {
|
|
47567
|
+
var userRoles = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info3 = userInfo.info) === null || _userInfo$info3 === void 0 ? void 0 : (_userInfo$info3$roles = _userInfo$info3.roles) === null || _userInfo$info3$roles === void 0 ? void 0 : _userInfo$info3$roles.map(function (roleData) {
|
|
45640
47568
|
return roleData.code;
|
|
45641
47569
|
});
|
|
45642
47570
|
var fsmRoles = ["FSM_CREATOR_EMP", "FSM_EDITOR_EMP", "FSM_VIEW_EMP", "FSM_REPORT_VIEWER", "FSM_DASHBOARD_VIEWER", "FSM_ADMIN", "FSM_DSO", "FSM_DRIVER", "FSM_EMP_FSTPO", "FSM_COLLECTOR"];
|
|
@@ -45647,8 +47575,10 @@ var fsmAccess = function fsmAccess() {
|
|
|
45647
47575
|
};
|
|
45648
47576
|
|
|
45649
47577
|
var NOCAccess = function NOCAccess() {
|
|
47578
|
+
var _userInfo$info4, _userInfo$info4$roles;
|
|
47579
|
+
|
|
45650
47580
|
var userInfo = Digit.UserService.getUser();
|
|
45651
|
-
var userRoles = userInfo === null || userInfo === void 0 ? void 0 : userInfo.info.roles.map(function (roleData) {
|
|
47581
|
+
var userRoles = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info4 = userInfo.info) === null || _userInfo$info4 === void 0 ? void 0 : (_userInfo$info4$roles = _userInfo$info4.roles) === null || _userInfo$info4$roles === void 0 ? void 0 : _userInfo$info4$roles.map(function (roleData) {
|
|
45652
47582
|
return roleData.code;
|
|
45653
47583
|
});
|
|
45654
47584
|
var NOC_ROLES = ["NOC_CEMP", "NOC_DOC_VERIFIER", "NOC_FIELD_INSPECTOR", "NOC_APPROVER", "BPA_NOC_VERIFIER", "AIRPORT_AUTHORITY_APPROVER", "FIRE_NOC_APPROVER", "NOC_DEPT_APPROVER"];
|
|
@@ -45659,8 +47589,10 @@ var NOCAccess = function NOCAccess() {
|
|
|
45659
47589
|
};
|
|
45660
47590
|
|
|
45661
47591
|
var BPAREGAccess = function BPAREGAccess() {
|
|
47592
|
+
var _userInfo$info5, _userInfo$info5$roles;
|
|
47593
|
+
|
|
45662
47594
|
var userInfo = Digit.UserService.getUser();
|
|
45663
|
-
var userRoles = userInfo === null || userInfo === void 0 ? void 0 : userInfo.info.roles.map(function (roleData) {
|
|
47595
|
+
var userRoles = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info5 = userInfo.info) === null || _userInfo$info5 === void 0 ? void 0 : (_userInfo$info5$roles = _userInfo$info5.roles) === null || _userInfo$info5$roles === void 0 ? void 0 : _userInfo$info5$roles.map(function (roleData) {
|
|
45664
47596
|
return roleData.code;
|
|
45665
47597
|
});
|
|
45666
47598
|
var BPAREG_ROLES = ["BPAREG_APPROVER", "BPAREG_DOC_VERIFIER"];
|
|
@@ -45671,8 +47603,10 @@ var BPAREGAccess = function BPAREGAccess() {
|
|
|
45671
47603
|
};
|
|
45672
47604
|
|
|
45673
47605
|
var BPAAccess = function BPAAccess() {
|
|
47606
|
+
var _userInfo$info6, _userInfo$info6$roles;
|
|
47607
|
+
|
|
45674
47608
|
var userInfo = Digit.UserService.getUser();
|
|
45675
|
-
var userRoles = userInfo === null || userInfo === void 0 ? void 0 : userInfo.info.roles.map(function (roleData) {
|
|
47609
|
+
var userRoles = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info6 = userInfo.info) === null || _userInfo$info6 === void 0 ? void 0 : (_userInfo$info6$roles = _userInfo$info6.roles) === null || _userInfo$info6$roles === void 0 ? void 0 : _userInfo$info6$roles.map(function (roleData) {
|
|
45676
47610
|
return roleData.code;
|
|
45677
47611
|
});
|
|
45678
47612
|
var BPA_ROLES = ["BPA_VERIFIER", "CEMP", "BPA_APPROVER", "BPA_FIELD_INSPECTOR", "BPA_NOC_VERIFIER", "AIRPORT_AUTHORITY_APPROVER", "FIRE_NOC_APPROVER", "NOC_DEPT_APPROVER", "BPA_NOC_VERIFIER", "BPA_TOWNPLANNER", "BPA_ENGINEER", "BPA_BUILDER", "BPA_STRUCTURALENGINEER", "BPA_SUPERVISOR", "BPA_DOC_VERIFIER", "EMPLOYEE"];
|
|
@@ -45683,8 +47617,10 @@ var BPAAccess = function BPAAccess() {
|
|
|
45683
47617
|
};
|
|
45684
47618
|
|
|
45685
47619
|
var ptAccess = function ptAccess() {
|
|
47620
|
+
var _userInfo$info7, _userInfo$info7$roles;
|
|
47621
|
+
|
|
45686
47622
|
var userInfo = Digit.UserService.getUser();
|
|
45687
|
-
var userRoles = userInfo === null || userInfo === void 0 ? void 0 : userInfo.info.roles.map(function (roleData) {
|
|
47623
|
+
var userRoles = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info7 = userInfo.info) === null || _userInfo$info7 === void 0 ? void 0 : (_userInfo$info7$roles = _userInfo$info7.roles) === null || _userInfo$info7$roles === void 0 ? void 0 : _userInfo$info7$roles.map(function (roleData) {
|
|
45688
47624
|
return roleData.code;
|
|
45689
47625
|
});
|
|
45690
47626
|
var ptRoles = ["PT_APPROVER", "PT_CEMP", "PT_DOC_VERIFIER", "PT_FIELD_INSPECTOR"];
|
|
@@ -45695,8 +47631,10 @@ var ptAccess = function ptAccess() {
|
|
|
45695
47631
|
};
|
|
45696
47632
|
|
|
45697
47633
|
var tlAccess = function tlAccess() {
|
|
47634
|
+
var _userInfo$info8, _userInfo$info8$roles;
|
|
47635
|
+
|
|
45698
47636
|
var userInfo = Digit.UserService.getUser();
|
|
45699
|
-
var userRoles = userInfo === null || userInfo === void 0 ? void 0 : userInfo.info.roles.map(function (roleData) {
|
|
47637
|
+
var userRoles = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info8 = userInfo.info) === null || _userInfo$info8 === void 0 ? void 0 : (_userInfo$info8$roles = _userInfo$info8.roles) === null || _userInfo$info8$roles === void 0 ? void 0 : _userInfo$info8$roles.map(function (roleData) {
|
|
45700
47638
|
return roleData.code;
|
|
45701
47639
|
});
|
|
45702
47640
|
var tlRoles = ["TL_CEMP", "TL_APPROVER", "TL_FIELD_INSPECTOR", "TL_DOC_VERIFIER"];
|
|
@@ -45707,8 +47645,10 @@ var tlAccess = function tlAccess() {
|
|
|
45707
47645
|
};
|
|
45708
47646
|
|
|
45709
47647
|
var mCollectAccess = function mCollectAccess() {
|
|
47648
|
+
var _userInfo$info9, _userInfo$info9$roles;
|
|
47649
|
+
|
|
45710
47650
|
var userInfo = Digit.UserService.getUser();
|
|
45711
|
-
var userRoles = userInfo === null || userInfo === void 0 ? void 0 : userInfo.info.roles.map(function (roleData) {
|
|
47651
|
+
var userRoles = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info9 = userInfo.info) === null || _userInfo$info9 === void 0 ? void 0 : (_userInfo$info9$roles = _userInfo$info9.roles) === null || _userInfo$info9$roles === void 0 ? void 0 : _userInfo$info9$roles.map(function (roleData) {
|
|
45712
47652
|
return roleData.code;
|
|
45713
47653
|
});
|
|
45714
47654
|
var mCollectRoles = ["UC_EMP"];
|
|
@@ -45719,8 +47659,10 @@ var mCollectAccess = function mCollectAccess() {
|
|
|
45719
47659
|
};
|
|
45720
47660
|
|
|
45721
47661
|
var receiptsAccess = function receiptsAccess() {
|
|
47662
|
+
var _userInfo$info10, _userInfo$info10$role;
|
|
47663
|
+
|
|
45722
47664
|
var userInfo = Digit.UserService.getUser();
|
|
45723
|
-
var userRoles = userInfo === null || userInfo === void 0 ? void 0 : userInfo.info.roles.map(function (roleData) {
|
|
47665
|
+
var userRoles = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info10 = userInfo.info) === null || _userInfo$info10 === void 0 ? void 0 : (_userInfo$info10$role = _userInfo$info10.roles) === null || _userInfo$info10$role === void 0 ? void 0 : _userInfo$info10$role.map(function (roleData) {
|
|
45724
47666
|
return roleData.code;
|
|
45725
47667
|
});
|
|
45726
47668
|
var receiptsRoles = ["CR_PT"];
|
|
@@ -45733,8 +47675,10 @@ var receiptsAccess = function receiptsAccess() {
|
|
|
45733
47675
|
var hrmsRoles = ["HRMS_ADMIN"];
|
|
45734
47676
|
|
|
45735
47677
|
var hrmsAccess = function hrmsAccess() {
|
|
47678
|
+
var _userInfo$info11, _userInfo$info11$role;
|
|
47679
|
+
|
|
45736
47680
|
var userInfo = Digit.UserService.getUser();
|
|
45737
|
-
var userRoles = userInfo === null || userInfo === void 0 ? void 0 : userInfo.info.roles.map(function (roleData) {
|
|
47681
|
+
var userRoles = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info11 = userInfo.info) === null || _userInfo$info11 === void 0 ? void 0 : (_userInfo$info11$role = _userInfo$info11.roles) === null || _userInfo$info11$role === void 0 ? void 0 : _userInfo$info11$role.map(function (roleData) {
|
|
45738
47682
|
return roleData.code;
|
|
45739
47683
|
});
|
|
45740
47684
|
var HRMS_ACCESS = userRoles === null || userRoles === void 0 ? void 0 : userRoles.filter(function (role) {
|
|
@@ -45746,6 +47690,7 @@ var hrmsAccess = function hrmsAccess() {
|
|
|
45746
47690
|
var Utils = {
|
|
45747
47691
|
pdf: PDFUtil,
|
|
45748
47692
|
downloadReceipt: downloadReceipt,
|
|
47693
|
+
downloadBill: downloadBill,
|
|
45749
47694
|
downloadPDFFromLink: downloadPDFFromLink,
|
|
45750
47695
|
getFileUrl: getFileUrl,
|
|
45751
47696
|
getFileTypeFromFileStoreURL: getFileTypeFromFileStoreURL,
|
|
@@ -45762,6 +47707,7 @@ var Utils = {
|
|
|
45762
47707
|
BPAAccess: BPAAccess,
|
|
45763
47708
|
dss: dss$1,
|
|
45764
47709
|
obps: obps$1,
|
|
47710
|
+
pt: pt,
|
|
45765
47711
|
ptAccess: ptAccess,
|
|
45766
47712
|
NOCAccess: NOCAccess,
|
|
45767
47713
|
mCollectAccess: mCollectAccess,
|
|
@@ -45770,6 +47716,7 @@ var Utils = {
|
|
|
45770
47716
|
hrmsAccess: hrmsAccess,
|
|
45771
47717
|
getPattern: getPattern,
|
|
45772
47718
|
hrmsRoles: hrmsRoles,
|
|
47719
|
+
getUnique: getUnique$1,
|
|
45773
47720
|
tlAccess: tlAccess
|
|
45774
47721
|
};
|
|
45775
47722
|
|
|
@@ -45833,7 +47780,6 @@ var SubformRegistry = function SubformRegistry(registry) {
|
|
|
45833
47780
|
var element = middlewares.filter(function (e) {
|
|
45834
47781
|
return Object.keys(e)[0] === preceedingName;
|
|
45835
47782
|
})[0] || null;
|
|
45836
|
-
if (!element) console.error("no middleware with " + preceedingName + " found in " + key + " subForm ");
|
|
45837
47783
|
}
|
|
45838
47784
|
};
|
|
45839
47785
|
|
|
@@ -45902,6 +47848,7 @@ var initLibraries = function initLibraries() {
|
|
|
45902
47848
|
setupLibraries("ComponentRegistryService", ComponentRegistryService);
|
|
45903
47849
|
setupLibraries("StoreData", StoreData);
|
|
45904
47850
|
setupLibraries("EventsServices", Events);
|
|
47851
|
+
setupLibraries("WSService", WSService);
|
|
45905
47852
|
setupLibraries("InboxGeneral", InboxGeneral);
|
|
45906
47853
|
setupLibraries("ShareFiles", ShareFiles);
|
|
45907
47854
|
setupLibraries("Contexts", Contexts);
|