@mseva/digit-ui-module-challangeneration 1.0.21 → 1.0.23

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 CHANGED
@@ -152,9 +152,6 @@ const ServiceCategory = _ref => {
152
152
  };
153
153
  Menu === null || Menu === void 0 ? void 0 : Menu.map((option, index) => {
154
154
  });
155
- if (isLoading) {
156
- return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
157
- }
158
155
  return /*#__PURE__*/React__default.createElement("div", {
159
156
  className: "status-container"
160
157
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -8163,108 +8160,6 @@ const config = [{
8163
8160
  }]
8164
8161
  }];
8165
8162
 
8166
- const _Pact = /*#__PURE__*/function () {
8167
- function _Pact() {}
8168
- _Pact.prototype.then = function (onFulfilled, onRejected) {
8169
- const result = new _Pact();
8170
- const state = this.s;
8171
- if (state) {
8172
- const callback = state & 1 ? onFulfilled : onRejected;
8173
- if (callback) {
8174
- try {
8175
- _settle(result, 1, callback(this.v));
8176
- } catch (e) {
8177
- _settle(result, 2, e);
8178
- }
8179
- return result;
8180
- } else {
8181
- return this;
8182
- }
8183
- }
8184
- this.o = function (_this) {
8185
- try {
8186
- const value = _this.v;
8187
- if (_this.s & 1) {
8188
- _settle(result, 1, onFulfilled ? onFulfilled(value) : value);
8189
- } else if (onRejected) {
8190
- _settle(result, 1, onRejected(value));
8191
- } else {
8192
- _settle(result, 2, value);
8193
- }
8194
- } catch (e) {
8195
- _settle(result, 2, e);
8196
- }
8197
- };
8198
- return result;
8199
- };
8200
- return _Pact;
8201
- }();
8202
- function _settle(pact, state, value) {
8203
- if (!pact.s) {
8204
- if (value instanceof _Pact) {
8205
- if (value.s) {
8206
- if (state & 1) {
8207
- state = value.s;
8208
- }
8209
- value = value.v;
8210
- } else {
8211
- value.o = _settle.bind(null, pact, state);
8212
- return;
8213
- }
8214
- }
8215
- if (value && value.then) {
8216
- value.then(_settle.bind(null, pact, state), _settle.bind(null, pact, 2));
8217
- return;
8218
- }
8219
- pact.s = state;
8220
- pact.v = value;
8221
- const observer = pact.o;
8222
- if (observer) {
8223
- observer(pact);
8224
- }
8225
- }
8226
- }
8227
- function _isSettledPact(thenable) {
8228
- return thenable instanceof _Pact && thenable.s & 1;
8229
- }
8230
- function _forTo(array, body, check) {
8231
- var i = -1,
8232
- pact,
8233
- reject;
8234
- function _cycle(result) {
8235
- try {
8236
- while (++i < array.length && (!check || !check())) {
8237
- result = body(i);
8238
- if (result && result.then) {
8239
- if (_isSettledPact(result)) {
8240
- result = result.v;
8241
- } else {
8242
- result.then(_cycle, reject || (reject = _settle.bind(null, pact = new _Pact(), 2)));
8243
- return;
8244
- }
8245
- }
8246
- }
8247
- if (pact) {
8248
- _settle(pact, 1, result);
8249
- } else {
8250
- pact = result;
8251
- }
8252
- } catch (e) {
8253
- _settle(pact || (pact = new _Pact()), 2, e);
8254
- }
8255
- }
8256
- _cycle();
8257
- return pact;
8258
- }
8259
- function _forIn(target, body, check) {
8260
- var keys = [];
8261
- for (var key in target) {
8262
- keys.push(key);
8263
- }
8264
- return _forTo(keys, function (i) {
8265
- return body(keys[i]);
8266
- }, check);
8267
- }
8268
8163
  const _iteratorSymbol = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator")) : "@@iterator";
8269
8164
  const _asyncIteratorSymbol = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator")) : "@@asyncIterator";
8270
8165
  function _catch(body, recover) {
@@ -10006,6 +9901,7 @@ Loader.defaultProps = {
10006
9901
  };
10007
9902
 
10008
9903
  const MyChallanResult = _ref => {
9904
+ var _getChallanData$chall, _getChallanData$chall2, _getChallanData$chall3, _getChallanData$chall4;
10009
9905
  let {
10010
9906
  template,
10011
9907
  header,
@@ -10017,10 +9913,37 @@ const MyChallanResult = _ref => {
10017
9913
  const history = reactRouterDom.useHistory();
10018
9914
  const userInfo = Digit.UserService.getUser();
10019
9915
  const tenantId = localStorage.getItem("CITIZEN.CITY");
9916
+ const [filters, setFilters] = React.useState(null);
10020
9917
  const [loader, setLoader] = React.useState(false);
10021
9918
  const [getChallanData, setChallanData] = React.useState();
10022
- const fetchChallans = function (filters) {
9919
+ let filter = window.location.href.split("/").pop();
9920
+ let t1;
9921
+ let off;
9922
+ if (!isNaN(parseInt(filter))) {
9923
+ off = filter;
9924
+ t1 = parseInt(filter) + 50;
9925
+ } else {
9926
+ t1 = 4;
9927
+ }
9928
+ let initialFilters = !isNaN(parseInt(filter)) ? {
9929
+ limit: "50",
9930
+ sortOrder: "ASC",
9931
+ sortBy: "createdTime",
9932
+ offset: off,
9933
+ tenantId
9934
+ } : {
9935
+ limit: "10",
9936
+ sortOrder: "ASC",
9937
+ sortBy: "createdTime",
9938
+ offset: "0",
9939
+ tenantId
9940
+ };
9941
+ React.useEffect(() => {
9942
+ setFilters(initialFilters);
9943
+ }, [filter, tenantId]);
9944
+ const fetchChallans = function () {
10023
9945
  try {
9946
+ console.log("filters", filters);
10024
9947
  setLoader(true);
10025
9948
  const _temp = _catch(function () {
10026
9949
  return Promise.resolve(Digit.ChallanGenerationService.search({
@@ -10028,7 +9951,7 @@ const MyChallanResult = _ref => {
10028
9951
  filters
10029
9952
  })).then(function (responseData) {
10030
9953
  console.log("result", responseData);
10031
- setChallanData(responseData === null || responseData === void 0 ? void 0 : responseData.challans);
9954
+ setChallanData(responseData);
10032
9955
  setLoader(false);
10033
9956
  });
10034
9957
  }, function (error) {
@@ -10041,11 +9964,14 @@ const MyChallanResult = _ref => {
10041
9964
  }
10042
9965
  };
10043
9966
  React.useEffect(() => {
10044
- var _userInfo$info;
10045
- const filters = {};
10046
- filters.mobileNumber = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info = userInfo.info) === null || _userInfo$info === void 0 ? void 0 : _userInfo$info.mobileNumber;
10047
- fetchChallans(filters);
10048
- }, []);
9967
+ console.log("filters", filters);
9968
+ if (filters) fetchChallans();
9969
+ }, [filters]);
9970
+ const handleLoadMore = () => {
9971
+ setFilters(prev => _extends({}, prev, {
9972
+ limit: Number(prev.limit) + 5
9973
+ }));
9974
+ };
10049
9975
  const handleMakePayment = id => {
10050
9976
  history.push("/digit-ui/citizen/payment/collect/Challan_Generation/" + id + "/" + tenantId + "?tenantId=" + tenantId);
10051
9977
  };
@@ -10057,13 +9983,12 @@ const MyChallanResult = _ref => {
10057
9983
  style: {
10058
9984
  marginLeft: "8px"
10059
9985
  }
10060
- }, t(header), " (", getChallanData === null || getChallanData === void 0 ? void 0 : getChallanData.length, ")"), getChallanData === null || getChallanData === void 0 ? void 0 : getChallanData.map((bill, index) => {
9986
+ }, t(header), " (", getChallanData === null || getChallanData === void 0 ? void 0 : (_getChallanData$chall = getChallanData.challans) === null || _getChallanData$chall === void 0 ? void 0 : _getChallanData$chall.length, ")"), getChallanData === null || getChallanData === void 0 ? void 0 : (_getChallanData$chall2 = getChallanData.challans) === null || _getChallanData$chall2 === void 0 ? void 0 : _getChallanData$chall2.map((bill, index) => {
10061
9987
  var _bill$amount, _bill$amount$, _bill$feeWaiver, _bill$citizen;
10062
9988
  const checkAmount = Math.max((bill === null || bill === void 0 ? void 0 : (_bill$amount = bill.amount) === null || _bill$amount === void 0 ? void 0 : (_bill$amount$ = _bill$amount[0]) === null || _bill$amount$ === void 0 ? void 0 : _bill$amount$.amount) || 0, (bill === null || bill === void 0 ? void 0 : bill.challanAmount) || 0);
10063
9989
  const total = checkAmount != null ? checkAmount : 0;
10064
9990
  const waiver = (_bill$feeWaiver = bill === null || bill === void 0 ? void 0 : bill.feeWaiver) != null ? _bill$feeWaiver : 0;
10065
9991
  const finalAmount = total - waiver;
10066
- console.log("finalAmount", finalAmount);
10067
9992
  return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
10068
9993
  key: index
10069
9994
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.KeyNote, {
@@ -10091,7 +10016,24 @@ const MyChallanResult = _ref => {
10091
10016
  label: t("CS_APPLICATION_DETAILS_MAKE_PAYMENT"),
10092
10017
  onSubmit: () => handleMakePayment(bill === null || bill === void 0 ? void 0 : bill.challanNo)
10093
10018
  })));
10094
- })), loader && /*#__PURE__*/React__default.createElement(Loader, {
10019
+ }), (getChallanData === null || getChallanData === void 0 ? void 0 : (_getChallanData$chall3 = getChallanData.challans) === null || _getChallanData$chall3 === void 0 ? void 0 : _getChallanData$chall3.length) === 0 && !loader && /*#__PURE__*/React__default.createElement("p", {
10020
+ style: {
10021
+ marginLeft: "16px",
10022
+ marginTop: "16px"
10023
+ }
10024
+ }, t("CHB_NO_APPLICATION_FOUND_MSG")), (getChallanData === null || getChallanData === void 0 ? void 0 : (_getChallanData$chall4 = getChallanData.challans) === null || _getChallanData$chall4 === void 0 ? void 0 : _getChallanData$chall4.length) !== 0 && (getChallanData === null || getChallanData === void 0 ? void 0 : getChallanData.totalCount) > t1 && /*#__PURE__*/React__default.createElement("div", {
10025
+ style: {
10026
+ marginLeft: "16px",
10027
+ marginTop: "16px"
10028
+ }
10029
+ }, /*#__PURE__*/React__default.createElement("span", {
10030
+ className: "link",
10031
+ style: {
10032
+ cursor: "pointer",
10033
+ color: "#007bff"
10034
+ },
10035
+ onClick: handleLoadMore
10036
+ }, t("CHB_LOAD_MORE_MSG")))), loader && /*#__PURE__*/React__default.createElement(Loader, {
10095
10037
  page: true
10096
10038
  }));
10097
10039
  };
@@ -10257,10 +10199,8 @@ const ChallanApplicationDetails = () => {
10257
10199
  } = _ref,
10258
10200
  params = _objectWithoutPropertiesLoose(_ref, _excluded$3);
10259
10201
  try {
10260
- console.log("payments", payments);
10261
- if (printing) return Promise.resolve();
10262
- setPrinting(true);
10263
- const _temp4 = _finallyRethrows(function () {
10202
+ setLoader(true);
10203
+ return Promise.resolve(_catch(function () {
10264
10204
  return Promise.resolve(Digit.ChallanGenerationService.search({
10265
10205
  tenantId,
10266
10206
  filters: {
@@ -10272,11 +10212,11 @@ const ChallanApplicationDetails = () => {
10272
10212
  return Promise.resolve(Digit.PaymentService.printReciept(tenantId, {
10273
10213
  fileStoreIds: fileStoreId
10274
10214
  })).then(function (fileStore) {
10215
+ setLoader(false);
10275
10216
  window.open(fileStore[fileStoreId], "_blank");
10276
10217
  });
10277
10218
  }
10278
10219
  const challan = _extends({}, applicationDetails, challanEmpData);
10279
- console.log("applicationDetails", applicationDetails);
10280
10220
  let application = challan;
10281
10221
  let fileStoreId = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A = applicationDetails.Applications) === null || _applicationDetails$A === void 0 ? void 0 : (_applicationDetails$A2 = _applicationDetails$A[0]) === null || _applicationDetails$A2 === void 0 ? void 0 : _applicationDetails$A2.paymentReceiptFilestoreId;
10282
10222
  const _temp2 = function () {
@@ -10292,12 +10232,10 @@ const ChallanApplicationDetails = () => {
10292
10232
  }();
10293
10233
  return _temp2 && _temp2.then ? _temp2.then(_temp3) : _temp3(_temp2);
10294
10234
  });
10295
- }, function (_wasThrown, _result) {
10296
- setPrinting(false);
10297
- if (_wasThrown) throw _result;
10298
- return _result;
10299
- });
10300
- return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(function () {}) : void 0);
10235
+ }, function (err) {
10236
+ setLoader(false);
10237
+ return err;
10238
+ }));
10301
10239
  } catch (e) {
10302
10240
  return Promise.reject(e);
10303
10241
  }
@@ -10309,9 +10247,8 @@ const ChallanApplicationDetails = () => {
10309
10247
  } = _ref2,
10310
10248
  params = _objectWithoutPropertiesLoose(_ref2, _excluded2);
10311
10249
  try {
10312
- if (chbPermissionLoading) return Promise.resolve();
10313
- setChbPermissionLoading(true);
10314
- const _temp7 = _finallyRethrows(function () {
10250
+ setLoader(true);
10251
+ return Promise.resolve(_catch(function () {
10315
10252
  return Promise.resolve(Digit.ChallanGenerationService.search({
10316
10253
  tenantId,
10317
10254
  filters: {
@@ -10319,18 +10256,18 @@ const ChallanApplicationDetails = () => {
10319
10256
  }
10320
10257
  })).then(function (applicationDetails) {
10321
10258
  var _applicationDetails$A3, _applicationDetails$A4;
10322
- function _temp6() {
10259
+ function _temp5() {
10323
10260
  return Promise.resolve(Digit.PaymentService.printReciept(tenantId, {
10324
10261
  fileStoreIds: fileStoreId
10325
10262
  })).then(function (fileStore) {
10263
+ setLoader(false);
10326
10264
  window.open(fileStore[fileStoreId], "_blank");
10327
10265
  });
10328
10266
  }
10329
10267
  const challan = _extends({}, applicationDetails, challanEmpData);
10330
- console.log("applicationDetails", applicationDetails);
10331
10268
  let application = challan;
10332
10269
  let fileStoreId = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$A3 = applicationDetails.Applications) === null || _applicationDetails$A3 === void 0 ? void 0 : (_applicationDetails$A4 = _applicationDetails$A3[0]) === null || _applicationDetails$A4 === void 0 ? void 0 : _applicationDetails$A4.paymentReceiptFilestoreId;
10333
- const _temp5 = function () {
10270
+ const _temp4 = function () {
10334
10271
  if (!fileStoreId) {
10335
10272
  return Promise.resolve(Digit.PaymentService.generatePdf(tenantId, {
10336
10273
  challan: _extends({}, application, payments)
@@ -10339,14 +10276,12 @@ const ChallanApplicationDetails = () => {
10339
10276
  });
10340
10277
  }
10341
10278
  }();
10342
- return _temp5 && _temp5.then ? _temp5.then(_temp6) : _temp6(_temp5);
10279
+ return _temp4 && _temp4.then ? _temp4.then(_temp5) : _temp5(_temp4);
10343
10280
  });
10344
- }, function (_wasThrown2, _result2) {
10345
- setChbPermissionLoading(false);
10346
- if (_wasThrown2) throw _result2;
10347
- return _result2;
10348
- });
10349
- return Promise.resolve(_temp7 && _temp7.then ? _temp7.then(function () {}) : void 0);
10281
+ }, function (err) {
10282
+ setLoader(false);
10283
+ return err;
10284
+ }));
10350
10285
  } catch (e) {
10351
10286
  return Promise.reject(e);
10352
10287
  }
@@ -10364,8 +10299,6 @@ const ChallanApplicationDetails = () => {
10364
10299
  } = Digit.Hooks.useStore.getInitData();
10365
10300
  const [loader, setLoader] = React.useState(false);
10366
10301
  const [getChallanData, setChallanData] = React.useState();
10367
- const [chbPermissionLoading, setChbPermissionLoading] = React.useState(false);
10368
- const [printing, setPrinting] = React.useState(false);
10369
10302
  const fetchChallans = function (filters) {
10370
10303
  try {
10371
10304
  setLoader(true);
@@ -10375,12 +10308,10 @@ const ChallanApplicationDetails = () => {
10375
10308
  filters
10376
10309
  })).then(function (responseData) {
10377
10310
  var _responseData$challan;
10378
- console.log("search ", responseData);
10379
10311
  setChallanData(responseData === null || responseData === void 0 ? void 0 : (_responseData$challan = responseData.challans) === null || _responseData$challan === void 0 ? void 0 : _responseData$challan[0]);
10380
10312
  setLoader(false);
10381
10313
  });
10382
- }, function (error) {
10383
- console.log("error", error);
10314
+ }, function () {
10384
10315
  setLoader(false);
10385
10316
  });
10386
10317
  return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
@@ -12715,9 +12646,7 @@ const DesktopInbox = _ref => {
12715
12646
  }
12716
12647
  }];
12717
12648
  let result;
12718
- if (props.isLoading || props.isLoader) {
12719
- result = /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
12720
- } else if ((data === null || data === void 0 ? void 0 : data.length) === 0) {
12649
+ if ((data === null || data === void 0 ? void 0 : data.length) === 0) {
12721
12650
  result = /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
12722
12651
  style: {
12723
12652
  marginTop: 20
@@ -13116,12 +13045,7 @@ const Inbox = _ref => {
13116
13045
  id: "createdTime",
13117
13046
  desc: false
13118
13047
  }]);
13119
- const {
13120
- isLoading,
13121
- data: countData
13122
- } = Digit.Hooks.mcollect.useMCollectCount(tenantId);
13123
13048
  const [searchParams, setSearchParams] = React.useState(initialStates.searchParams || {});
13124
- const [businessIdToOwnerMappings, setBusinessIdToOwnerMappings] = React.useState({});
13125
13049
  const [isLoader, setIsLoader] = React.useState(false);
13126
13050
  const [getFilter, setFilter] = React.useState();
13127
13051
  const isMobile = window.Digit.Utils.browser.isMobile();
@@ -13134,9 +13058,7 @@ const Inbox = _ref => {
13134
13058
  offset: pageOffset,
13135
13059
  sortOrder: sortParams !== null && sortParams !== void 0 && (_sortParams$2 = sortParams[0]) !== null && _sortParams$2 !== void 0 && _sortParams$2.desc ? "ASC" : "DESC"
13136
13060
  };
13137
- const isMcollectAppChanged = Digit.SessionStorage.get("isMcollectAppChanged");
13138
13061
  const InboxObjectInSessionStorage = Digit.SessionStorage.get("Challan.INBOX");
13139
- const searchFormDefaultValues = {};
13140
13062
  const filterFormDefaultValues = {
13141
13063
  moduleName: "Challan_Generation",
13142
13064
  applicationStatus: [],
@@ -13151,41 +13073,6 @@ const Inbox = _ref => {
13151
13073
  offset: 0,
13152
13074
  sortOrder: "DESC"
13153
13075
  };
13154
- const formInitValue = React.useMemo(() => {
13155
- return InboxObjectInSessionStorage || {
13156
- filterForm: filterFormDefaultValues,
13157
- searchForm: searchFormDefaultValues,
13158
- tableForm: tableOrderFormDefaultValues
13159
- };
13160
- }, [Object.values((InboxObjectInSessionStorage === null || InboxObjectInSessionStorage === void 0 ? void 0 : InboxObjectInSessionStorage.filterForm) || {}), Object.values((InboxObjectInSessionStorage === null || InboxObjectInSessionStorage === void 0 ? void 0 : InboxObjectInSessionStorage.searchForm) || {}), Object.values((InboxObjectInSessionStorage === null || InboxObjectInSessionStorage === void 0 ? void 0 : InboxObjectInSessionStorage.tableForm) || {})]);
13161
- const [formState, dispatch] = React.useReducer(formReducer, formInitValue);
13162
- function formReducer(state, payload) {
13163
- switch (payload.action) {
13164
- case "mutateSearchForm":
13165
- Digit.SessionStorage.set("Challan.INBOX", _extends({}, state, {
13166
- searchForm: payload.data
13167
- }));
13168
- return _extends({}, state, {
13169
- searchForm: payload.data
13170
- });
13171
- case "mutateFilterForm":
13172
- Digit.SessionStorage.set("Challan.INBOX", _extends({}, state, {
13173
- filterForm: payload.data
13174
- }));
13175
- return _extends({}, state, {
13176
- filterForm: payload.data
13177
- });
13178
- case "mutateTableForm":
13179
- Digit.SessionStorage.set("Challan.INBOX", _extends({}, state, {
13180
- tableForm: payload.data
13181
- }));
13182
- return _extends({}, state, {
13183
- tableForm: payload.data
13184
- });
13185
- default:
13186
- return state;
13187
- }
13188
- }
13189
13076
  const {
13190
13077
  isLoading: hookLoading,
13191
13078
  data
@@ -13193,50 +13080,6 @@ const Inbox = _ref => {
13193
13080
  tenantId,
13194
13081
  filters: _extends({}, searchParams, paginationParams)
13195
13082
  });
13196
- React.useEffect(() => {
13197
- var _data$challans2;
13198
- const fetchBills = function () {
13199
- try {
13200
- var _data$challans;
13201
- function _temp2() {
13202
- const mapping = {};
13203
- processInstanceArray.forEach(item => {
13204
- var _item$billDetails, _item$billDetails$, _item$billDetails2, _item$billDetails2$;
13205
- mapping[item === null || item === void 0 ? void 0 : item.consumerCode] = {
13206
- businessService: item === null || item === void 0 ? void 0 : item.businessService,
13207
- totalAmount: (item === null || item === void 0 ? void 0 : (_item$billDetails = item.billDetails) === null || _item$billDetails === void 0 ? void 0 : (_item$billDetails$ = _item$billDetails[0]) === null || _item$billDetails$ === void 0 ? void 0 : _item$billDetails$.totalAmount) || 0,
13208
- dueDate: item === null || item === void 0 ? void 0 : (_item$billDetails2 = item.billDetails) === null || _item$billDetails2 === void 0 ? void 0 : (_item$billDetails2$ = _item$billDetails2[0]) === null || _item$billDetails2$ === void 0 ? void 0 : _item$billDetails2$.expiryDate
13209
- };
13210
- });
13211
- setBusinessIdToOwnerMappings(mapping);
13212
- setIsLoader(false);
13213
- }
13214
- let businessServiceMap = {};
13215
- data === null || data === void 0 ? void 0 : (_data$challans = data.challans) === null || _data$challans === void 0 ? void 0 : _data$challans.forEach(item => {
13216
- if (item.businessService !== "ADVT.Canopy_Fee") {
13217
- if (!businessServiceMap[item.businessService]) businessServiceMap[item.businessService] = [];
13218
- businessServiceMap[item.businessService].push(item.challanNo);
13219
- }
13220
- });
13221
- let processInstanceArray = [];
13222
- const _temp = _forIn(businessServiceMap, function (key) {
13223
- const consumerCodes = businessServiceMap[key].join(",");
13224
- return Promise.resolve(Digit.PaymentService.fetchBill(tenantId, {
13225
- consumerCode: consumerCodes,
13226
- businessService: key
13227
- })).then(function (res) {
13228
- processInstanceArray = [...processInstanceArray, ...((res === null || res === void 0 ? void 0 : res.Bill) || [])];
13229
- });
13230
- });
13231
- return Promise.resolve(_temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp));
13232
- } catch (e) {
13233
- return Promise.reject(e);
13234
- }
13235
- };
13236
- if ((data === null || data === void 0 ? void 0 : (_data$challans2 = data.challans) === null || _data$challans2 === void 0 ? void 0 : _data$challans2.length) > 0) {
13237
- fetchBills();
13238
- }
13239
- }, [data]);
13240
13083
  const formedData = ((data === null || data === void 0 ? void 0 : data.table) || []).map(item => ({
13241
13084
  challanNo: item === null || item === void 0 ? void 0 : item.applicationId,
13242
13085
  name: item === null || item === void 0 ? void 0 : item.offenderName,
@@ -13319,6 +13162,8 @@ const Inbox = _ref => {
13319
13162
  filterComponent: filterComponent,
13320
13163
  isLoader: isLoader,
13321
13164
  statutes: data === null || data === void 0 ? void 0 : data.statuses
13165
+ }), hookLoading && /*#__PURE__*/React__default.createElement(Loader, {
13166
+ page: true
13322
13167
  }));
13323
13168
  }
13324
13169
  };
@@ -15774,9 +15619,6 @@ const ChallanDocuments = _ref => {
15774
15619
  });
15775
15620
  if ((count == "0" || count == 0) && (documents === null || documents === void 0 ? void 0 : documents.length) > 0) setEnableSubmit(false);else setEnableSubmit(true);
15776
15621
  }, [documents, checkRequiredFields]);
15777
- React.useEffect(() => {
15778
- console.log("documents check again", documents);
15779
- }, [documents]);
15780
15622
  return /*#__PURE__*/React__default.createElement("div", null, !isLoading ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.FormStep, {
15781
15623
  t: t,
15782
15624
  config: config,
@@ -15804,6 +15646,7 @@ const ChallanDocuments = _ref => {
15804
15646
  })) : /*#__PURE__*/React__default.createElement(Loader, null));
15805
15647
  };
15806
15648
  function PTRSelectDocument(_ref2) {
15649
+ var _documents$filter;
15807
15650
  let {
15808
15651
  t,
15809
15652
  document: doc,
@@ -15874,7 +15717,6 @@ function PTRSelectDocument(_ref2) {
15874
15717
  };
15875
15718
  reader.readAsDataURL(file);
15876
15719
  } else {
15877
- console.log("📄 Non-image file uploaded, skipping EXIF read");
15878
15720
  setFile(file);
15879
15721
  updateDocument(selectedDocument, {});
15880
15722
  }
@@ -15997,6 +15839,7 @@ function PTRSelectDocument(_ref2) {
15997
15839
  React.useEffect(() => {
15998
15840
  if (isHidden) setUploadedFile(null);
15999
15841
  }, [isHidden]);
15842
+ console.log("doc===", doc);
16000
15843
  return /*#__PURE__*/React__default.createElement("div", {
16001
15844
  style: {
16002
15845
  marginBottom: "24px"
@@ -16035,7 +15878,28 @@ function PTRSelectDocument(_ref2) {
16035
15878
  accept: ".pdf, .jpeg, .jpg, .png",
16036
15879
  buttonType: "button",
16037
15880
  error: !uploadedFile
16038
- }))), getLoading && /*#__PURE__*/React__default.createElement(Loader, {
15881
+ }), console.log("documents", documents), (doc === null || doc === void 0 ? void 0 : doc.code) == "CHALLAN.EVIDENCE_IMAGE" && /*#__PURE__*/React__default.createElement("span", {
15882
+ style: {
15883
+ color: "green",
15884
+ fontSize: "14px"
15885
+ }
15886
+ }, /*#__PURE__*/React__default.createElement("span", {
15887
+ style: {
15888
+ color: "red",
15889
+ paddingRight: "3px"
15890
+ }
15891
+ }, "Note:"), "Please upload a picture **clicked with location enabled**."), (doc === null || doc === void 0 ? void 0 : doc.code) == "CHALLAN.EVIDENCE_IMAGE" && (documents === null || documents === void 0 ? void 0 : (_documents$filter = documents.filter(item => item.documentType == "CHALLAN.EVIDENCE_IMAGE")) === null || _documents$filter === void 0 ? void 0 : _documents$filter.map((item, index) => /*#__PURE__*/React__default.createElement("div", {
15892
+ key: index,
15893
+ style: {
15894
+ marginTop: "10px"
15895
+ }
15896
+ }, /*#__PURE__*/React__default.createElement("div", {
15897
+ style: {
15898
+ marginTop: "5px",
15899
+ fontSize: "14px",
15900
+ color: "#333"
15901
+ }
15902
+ }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("b", null, "Latitude:"), " ", item.latitude), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("b", null, "Longitude:"), " ", item.longitude))))))), getLoading && /*#__PURE__*/React__default.createElement(Loader, {
16039
15903
  page: true
16040
15904
  }));
16041
15905
  }
@@ -16285,7 +16149,13 @@ const ChallanStepperForm = () => {
16285
16149
  divider: true
16286
16150
  }, t("CREATE_CHALLAN")), /*#__PURE__*/React__default.createElement("form", {
16287
16151
  onSubmit: handleSubmit(onSubmit)
16288
- }, /*#__PURE__*/React__default.createElement("div", {
16152
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
16153
+ style: {
16154
+ fontWeight: "bold",
16155
+ paddingBottom: "30px",
16156
+ fontSize: "25px"
16157
+ }
16158
+ }, t("CHALLAN_OFFENDER_DETAILS")), /*#__PURE__*/React__default.createElement("div", {
16289
16159
  style: {
16290
16160
  width: "100%"
16291
16161
  }