@djb25/digit-ui-module-common 1.0.2 → 1.0.4

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
@@ -1359,7 +1359,7 @@ const SelectPaymentType$1 = props => {
1359
1359
  const billDetails = paymentdetails !== null && paymentdetails !== void 0 && (_paymentdetails$Bill = paymentdetails.Bill) !== null && _paymentdetails$Bill !== void 0 && _paymentdetails$Bill.length ? paymentdetails === null || paymentdetails === void 0 ? void 0 : paymentdetails.Bill[0] : {};
1360
1360
  const onSubmit = function (d) {
1361
1361
  try {
1362
- var _userInfo$info, _userInfo$info2;
1362
+ var _userInfo$info, _userInfo$info2, _userInfo$info3, _userInfo$info4, _userInfo$info5;
1363
1363
  const filterData = {
1364
1364
  Transaction: {
1365
1365
  tenantId: billDetails === null || billDetails === void 0 ? void 0 : billDetails.tenantId,
@@ -1374,10 +1374,12 @@ const SelectPaymentType$1 = props => {
1374
1374
  amountPaid: paymentAmount || billDetails.totalAmount
1375
1375
  }],
1376
1376
  user: {
1377
- name: name || (userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info = userInfo.info) === null || _userInfo$info === void 0 ? void 0 : _userInfo$info.name) || (billDetails === null || billDetails === void 0 ? void 0 : billDetails.payerName),
1378
- mobileNumber: mobileNumber || (userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info2 = userInfo.info) === null || _userInfo$info2 === void 0 ? void 0 : _userInfo$info2.mobileNumber) || (billDetails === null || billDetails === void 0 ? void 0 : billDetails.mobileNumber),
1377
+ uuid: (userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info = userInfo.info) === null || _userInfo$info === void 0 ? void 0 : _userInfo$info.uuid) || (billDetails === null || billDetails === void 0 ? void 0 : billDetails.payerId),
1378
+ name: name || (userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info2 = userInfo.info) === null || _userInfo$info2 === void 0 ? void 0 : _userInfo$info2.name) || (billDetails === null || billDetails === void 0 ? void 0 : billDetails.payerName),
1379
+ mobileNumber: mobileNumber || (userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info3 = userInfo.info) === null || _userInfo$info3 === void 0 ? void 0 : _userInfo$info3.mobileNumber) || (billDetails === null || billDetails === void 0 ? void 0 : billDetails.mobileNumber),
1379
1380
  tenantId: billDetails === null || billDetails === void 0 ? void 0 : billDetails.tenantId,
1380
- emailId: "sriranjan.srivastava@owc.com"
1381
+ emailId: (userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info4 = userInfo.info) === null || _userInfo$info4 === void 0 ? void 0 : _userInfo$info4.emailId) || (billDetails === null || billDetails === void 0 ? void 0 : billDetails.emailId),
1382
+ username: (userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info5 = userInfo.info) === null || _userInfo$info5 === void 0 ? void 0 : _userInfo$info5.userName) || (billDetails === null || billDetails === void 0 ? void 0 : billDetails.userName)
1381
1383
  },
1382
1384
  callbackUrl: window.location.href.includes("mcollect") || wrkflow === "WNS" ? window.location.protocol + "//" + window.location.host + "/digit-ui/citizen/payment/success/" + businessService + "/" + (wrkflow === "WNS" ? consumerCode : consumerCode) + "/" + tenantId + "?workflow=" + (wrkflow === "WNS" ? wrkflow : "mcollect") : window.location.protocol + "//" + window.location.host + "/digit-ui/citizen/payment/success/" + businessService + "/" + (wrkflow === "WNS" ? encodeURIComponent(consumerCode) : consumerCode) + "/" + tenantId + "?propertyId=" + consumerCode,
1383
1385
  additionalDetails: {
@@ -5140,7 +5142,7 @@ const BillDetails$1 = _ref => {
5140
5142
  const _excluded$2 = ["ManualRecieptDetails", "paymentModeDetails"],
5141
5143
  _excluded2 = ["errorObj"];
5142
5144
  const CollectPayment = props => {
5143
- var _businessService$toUp;
5145
+ var _paymentdetails$Bill, _businessService$toUp;
5144
5146
  const _Digit$Hooks$useQuery = Digit.Hooks.useQueryParams(),
5145
5147
  ModuleWorkflow = _Digit$Hooks$useQuery.workflow,
5146
5148
  IsDisconnectionFlow = _Digit$Hooks$useQuery.IsDisconnectionFlow;
@@ -5168,7 +5170,7 @@ const CollectPayment = props => {
5168
5170
  }),
5169
5171
  paymentdetails = _Digit$Hooks$useFetch.data,
5170
5172
  isLoading = _Digit$Hooks$useFetch.isLoading;
5171
- const bill = paymentdetails !== null && paymentdetails !== void 0 && paymentdetails.Bill ? paymentdetails === null || paymentdetails === void 0 ? void 0 : paymentdetails.Bill[0] : {};
5173
+ const bill = (paymentdetails === null || paymentdetails === void 0 ? void 0 : (_paymentdetails$Bill = paymentdetails.Bill) === null || _paymentdetails$Bill === void 0 ? void 0 : _paymentdetails$Bill.length) > 0 ? paymentdetails === null || paymentdetails === void 0 ? void 0 : paymentdetails.Bill[0] : {};
5172
5174
  const _Digit$Hooks$fsm$useS = Digit.Hooks.fsm.useSearch(tenantId, {
5173
5175
  applicationNos: consumerCode
5174
5176
  }, {
@@ -5503,7 +5505,7 @@ const CollectPayment = props => {
5503
5505
  onSubmit: onSubmit,
5504
5506
  formState: formState,
5505
5507
  defaultValues: getDefaultValues(),
5506
- isDisabled: (IsDisconnectionFlow ? false : businessService === "SW" || "WS" ? false : bill !== null && bill !== void 0 && bill.totalAmount ? !bill.totalAmount > 0 : true) || timerEnabledForBusinessService(businessService) && Time === 0,
5508
+ isDisabled: (IsDisconnectionFlow ? false : businessService === "SW" || businessService === "WS" ? false : bill !== null && bill !== void 0 && bill.totalAmount ? !bill.totalAmount > 0 : true) || timerEnabledForBusinessService(businessService) && Time === 0,
5507
5509
  onFormValueChange: (setValue, formValue) => {
5508
5510
  if (!isEqual_1(formValue.paymentMode, selectedPaymentMode)) {
5509
5511
  setFormState(formValue);