@djb25/digit-ui-module-ws 1.0.74 → 1.0.75

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
@@ -8405,7 +8405,7 @@ const getDocumentDetails = (application, t) => {
8405
8405
  };
8406
8406
  const getWSAcknowledgementData = function (application, property, tenantInfo, t) {
8407
8407
  try {
8408
- var _application$tradeLic21, _application$tradeLic22;
8408
+ var _application$tradeLic17, _application$tradeLic18;
8409
8409
  function _temp2() {
8410
8410
  return Promise.resolve(getHeaderDetails(application, t, tenantInfo)).then(function (header) {
8411
8411
  return {
@@ -8420,7 +8420,7 @@ const getWSAcknowledgementData = function (application, property, tenantInfo, t)
8420
8420
  };
8421
8421
  });
8422
8422
  }
8423
- const filesArray = application === null || application === void 0 ? void 0 : (_application$tradeLic21 = application.tradeLicenseDetail) === null || _application$tradeLic21 === void 0 ? void 0 : (_application$tradeLic22 = _application$tradeLic21.applicationDocuments) === null || _application$tradeLic22 === void 0 ? void 0 : _application$tradeLic22.map(value => value === null || value === void 0 ? void 0 : value.fileStoreId);
8423
+ const filesArray = application === null || application === void 0 ? void 0 : (_application$tradeLic17 = application.tradeLicenseDetail) === null || _application$tradeLic17 === void 0 ? void 0 : (_application$tradeLic18 = _application$tradeLic17.applicationDocuments) === null || _application$tradeLic18 === void 0 ? void 0 : _application$tradeLic18.map(value => value === null || value === void 0 ? void 0 : value.fileStoreId);
8424
8424
  let res;
8425
8425
  const _temp = function () {
8426
8426
  if (filesArray) {
@@ -8987,7 +8987,7 @@ const App = _ref => {
8987
8987
  }, {
8988
8988
  path: "/digit-ui/citizen/ws/my-connections",
8989
8989
  label: t("WS_MYCONNECTIONS_HEADER"),
8990
- show: location.pathname.includes("/my-connections")
8990
+ show: location.pathname.includes("/my-connections") || location.pathname.includes("/connection/details")
8991
8991
  }, {
8992
8992
  path: "/digit-ui/citizen/ws/my-bills",
8993
8993
  label: t("CS_WS_MY_BILLS"),
@@ -9004,6 +9004,10 @@ const App = _ref => {
9004
9004
  path: location.pathname,
9005
9005
  label: t("WS_APPLICATION_DETAILS_HEADER"),
9006
9006
  show: location.pathname.includes("/connection/application")
9007
+ }, {
9008
+ path: location.pathname,
9009
+ label: t("WS_COMMON_CONNECTION_DETAIL"),
9010
+ show: location.pathname.includes("/connection/details")
9007
9011
  }, {
9008
9012
  path: location.pathname,
9009
9013
  label: t("WS_APPLICATION_DETAILS_HEADER"),
@@ -33367,7 +33371,7 @@ const ConnectionDetails$5 = () => {
33367
33371
  const applicationDownloadObject = {
33368
33372
  order: 2,
33369
33373
  label: t("WS_APPLICATION"),
33370
- onClick: () => handleDownloadPdf
33374
+ onClick: () => handleDownloadPdf()
33371
33375
  };
33372
33376
  const receiptApplicationFeeDownloadObject = {
33373
33377
  order: 3,
@@ -33488,27 +33492,27 @@ const ConnectionDetails$5 = () => {
33488
33492
  }
33489
33493
  sessionStorage.setItem("ApplicationNoState", (_state3 = state) === null || _state3 === void 0 ? void 0 : _state3.applicationNo);
33490
33494
  let serviceType = (_state4 = state) !== null && _state4 !== void 0 && (_state4$applicationTy = _state4.applicationType) !== null && _state4$applicationTy !== void 0 && _state4$applicationTy.includes("WATER") ? "WATER" : "SEWERAGE";
33491
- return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
33492
- className: "cardHeaderWithOptions",
33495
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, checkifPrivacyenabled && /*#__PURE__*/React__default.createElement(WSInfoLabel, {
33496
+ t: t
33497
+ }), /*#__PURE__*/React__default.createElement("div", {
33498
+ className: "hide-seperator"
33499
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, downloadOptions && downloadOptions.length > 0 && /*#__PURE__*/React__default.createElement("div", {
33493
33500
  style: {
33494
- marginRight: "auto",
33495
- maxWidth: "960px"
33501
+ position: "absolute",
33502
+ right: "24px",
33503
+ zIndex: 11
33496
33504
  }
33497
- }, downloadOptions && downloadOptions.length > 0 && /*#__PURE__*/React__default.createElement("div", {
33505
+ }, /*#__PURE__*/React__default.createElement("div", {
33498
33506
  ref: menuRef
33499
33507
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.MultiLink, {
33500
- className: "multilinkWrapper",
33508
+ label: t("CS_COMMON_DOWNLOAD"),
33509
+ className: "multilinkWrapper employee-mulitlink-main-divNew",
33501
33510
  onHeadClick: () => setShowOptions(!showOptions),
33502
33511
  displayOptions: showOptions,
33503
33512
  options: downloadOptions,
33504
- optionsStyle: {
33505
- margin: "0px"
33506
- }
33507
- }))), checkifPrivacyenabled && /*#__PURE__*/React__default.createElement(WSInfoLabel, {
33508
- t: t
33509
- }), /*#__PURE__*/React__default.createElement("div", {
33510
- className: "hide-seperator"
33511
- }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
33513
+ downloadBtnClassName: "employee-download-btn-className",
33514
+ optionsClassName: "employee-options-btn-className"
33515
+ }))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
33512
33516
  className: "border-none",
33513
33517
  label: t("WS_MYCONNECTIONS_CONSUMER_NO"),
33514
33518
  text: (_state5 = state) === null || _state5 === void 0 ? void 0 : _state5.connectionNo
@@ -33905,47 +33909,27 @@ const ConnectionDetails$5 = () => {
33905
33909
  marginBottom: "20px"
33906
33910
  }
33907
33911
  }) : null)));
33908
- })), (((_state54 = state) === null || _state54 === void 0 ? void 0 : _state54.status) !== "inactive" || ((_state55 = state) === null || _state55 === void 0 ? void 0 : _state55.applicationStatus) !== "Inactive" || ((_state56 = state) === null || _state56 === void 0 ? void 0 : _state56.applicationStatus) !== "INACTIVE") && !isDisconnectionDone ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.ActionBar, {
33912
+ })), (((_state54 = state) === null || _state54 === void 0 ? void 0 : _state54.status) !== "inactive" || ((_state55 = state) === null || _state55 === void 0 ? void 0 : _state55.applicationStatus) !== "Inactive" || ((_state56 = state) === null || _state56 === void 0 ? void 0 : _state56.applicationStatus) !== "INACTIVE") && !isDisconnectionDone ? /*#__PURE__*/React__default.createElement("div", {
33909
33913
  style: {
33910
- position: "relative",
33911
- boxShadow: "none",
33912
- minWidth: "240px",
33913
- maxWidth: "620px",
33914
- padding: "0px",
33915
- marginTop: "15px",
33916
33914
  display: "flex",
33917
- gap: "10px"
33918
- }
33919
- }, /*#__PURE__*/React__default.createElement("div", {
33920
- style: {
33915
+ justifyContent: "flex-end",
33916
+ marginTop: "15px",
33921
33917
  width: "100%"
33922
33918
  }
33923
33919
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
33924
- style: {
33925
- width: "100%"
33926
- },
33927
33920
  label: t("WS_DISCONNECTION_BUTTON"),
33928
33921
  onSubmit: onActionSelect
33929
- }))) : ((_state57 = state) === null || _state57 === void 0 ? void 0 : _state57.applicationStatus) == "DISCONNECTION_EXECUTED" && ((_state58 = state) === null || _state58 === void 0 ? void 0 : _state58.status) == "Inactive" && ((_state59 = state) === null || _state59 === void 0 ? void 0 : _state59.isDisconnectionTemporary) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.ActionBar, {
33930
- style: {
33931
- position: "relative",
33932
- boxShadow: "none",
33933
- minWidth: "240px",
33934
- maxWidth: "310px",
33935
- padding: "0px",
33936
- marginTop: "15px"
33937
- }
33938
- }, /*#__PURE__*/React__default.createElement("div", {
33922
+ })) : ((_state57 = state) === null || _state57 === void 0 ? void 0 : _state57.applicationStatus) == "DISCONNECTION_EXECUTED" && ((_state58 = state) === null || _state58 === void 0 ? void 0 : _state58.status) == "Inactive" && ((_state59 = state) === null || _state59 === void 0 ? void 0 : _state59.isDisconnectionTemporary) && /*#__PURE__*/React__default.createElement("div", {
33939
33923
  style: {
33924
+ display: "flex",
33925
+ justifyContent: "flex-end",
33926
+ marginTop: "15px",
33940
33927
  width: "100%"
33941
33928
  }
33942
33929
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
33943
- style: {
33944
- width: "100%"
33945
- },
33946
33930
  label: t("WS_RECONNECTION_BUTTON"),
33947
33931
  onSubmit: onActionSelectRestoration
33948
- }))), showModal ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
33932
+ })), showModal ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
33949
33933
  open: showModal,
33950
33934
  headerBarMain: /*#__PURE__*/React__default.createElement(Heading, {
33951
33935
  label: t("WS_PENDING_DUES_LABEL")
@@ -38382,7 +38366,7 @@ const FileUploadField = _ref6 => {
38382
38366
  })))));
38383
38367
  };
38384
38368
  const NewApplication = () => {
38385
- var _Digit$SessionStorage, _getFieldError, _getFieldError2, _getFieldError3, _getFieldError4, _getFieldError5, _getFieldError6, _getFieldError7, _getFieldError8, _getFieldError9, _getFieldError0, _getFieldError1, _getFieldError10, _getFieldError11, _watch, _watch3, _watch5, _watch7, _watch9, _formValues$applicati, _formValues$applicati2, _formValues$applicati3, _formValues$applicati4, _formValues$applicati5, _formValues$applicati6, _formValues$applicati7, _formValues$applicati8, _formValues$applicati9, _formValues$applicati0, _formValues$applicati1, _formValues$applicati10, _formValues$applicati11, _formValues$applicati12, _formValues$applicati13, _formValues$applicati14, _formValues$applicati15, _formValues$applicati16, _formValues$applicati17, _formValues$applicati18, _formValues$applicati19, _formValues$applicati20, _formValues$applicati21, _formValues$applicati22, _formValues$applicati23, _formValues$applicant, _formValues$applicant2, _formValues$applicant3, _formValues$applicant4, _formValues$applicant5, _formValues$applicant6, _formValues$applicant7, _formValues$useDetail, _formValues$applicant8, _formValues$contact, _formValues$contact2, _formValues$contact3, _formValues$documents, _formValues$djbEmploy, _formValues$djbEmploy2, _formValues$djbEmploy3, _formValues$djbEmploy4, _formValues$djbEmploy5, _formValues$governmen, _formValues$governmen2, _formValues$governmen3, _formValues$governmen4, _formValues$propertyA, _formValues$propertyA2, _formValues$propertyA3, _formValues$propertyA4, _formValues$propertyA5, _formValues$propertyA6, _formValues$propertyA7, _formValues$propertyA8, _formValues$propertyA9, _formValues$propertyA0, _formValues$propertyA1, _formValues$useDetail2, _formValues$useDetail3, _formValues$useDetail4, _formValues$useDetail5, _formValues$useDetail6, _formValues$useDetail7, _formValues$useDetail8, _formValues$useDetail9, _formValues$useDetail0, _formValues$useDetail1, _formValues$useDetail10, _formValues$useDetail11, _formValues$bankDetai, _formValues$bankDetai2, _formValues$bankDetai3, _formValues$bankDetai4, _formValues$documents2, _formValues$documents3, _formValues$documents4, _formValues$documents5, _formValues$documents6, _formValues$documents7, _formValues$documents8, _formValues$documents9, _formValues$documents0, _formValues$documents1, _formValues$declarati, _formValues$declarati2, _formValues$declarati3;
38369
+ var _Digit$SessionStorage, _getFieldError, _getFieldError2, _getFieldError3, _getFieldError4, _getFieldError5, _getFieldError6, _getFieldError7, _getFieldError8, _getFieldError9, _getFieldError0, _getFieldError1, _getFieldError10, _getFieldError11, _watch, _watch3, _watch5, _watch7, _watch9, _formValues$applicati, _formValues$applicati2, _formValues$applicati3, _formValues$applicati4, _formValues$applicati5, _formValues$applicati6, _formValues$applicati7, _formValues$applicati8, _formValues$applicati9, _formValues$applicati0, _formValues$applicati1, _formValues$applicati10, _formValues$applicati11, _formValues$applicati12, _formValues$applicati13, _formValues$applicati14, _formValues$applicati15, _formValues$applicati16, _formValues$applicati17, _formValues$applicati18, _formValues$applicati19, _formValues$applicati20, _formValues$applicati21, _formValues$applicati22, _formValues$applicati23, _formValues$applicant, _formValues$applicant2, _formValues$applicant3, _formValues$applicant4, _formValues$applicant5, _formValues$applicant6, _formValues$applicant7, _formValues$useDetail, _formValues$applicant8, _formValues$contact, _formValues$contact2, _formValues$contact3, _formValues$documents, _formValues$djbEmploy, _formValues$djbEmploy2, _formValues$djbEmploy3, _formValues$djbEmploy4, _formValues$djbEmploy5, _formValues$governmen, _formValues$governmen2, _formValues$governmen3, _formValues$governmen4, _formValues$propertyA, _formValues$propertyA2, _formValues$propertyA3, _formValues$propertyA4, _formValues$propertyA5, _formValues$propertyA6, _formValues$propertyA7, _formValues$propertyA8, _formValues$propertyA9, _formValues$propertyA0, _formValues$propertyA1, _formValues$useDetail2, _formValues$useDetail3, _formValues$useDetail4, _formValues$useDetail5, _formValues$useDetail6, _formValues$useDetail7, _formValues$useDetail8, _formValues$useDetail9, _formValues$useDetail0, _formValues$useDetail1, _formValues$useDetail10, _formValues$useDetail11, _formValues$bankDetai, _formValues$bankDetai2, _formValues$bankDetai3, _formValues$bankDetai4, _formValues$documents2, _formValues$documents3, _formValues$documents4, _formValues$documents5, _formValues$documents6, _formValues$documents7, _formValues$documents8, _formValues$documents9, _formValues$documents0, _formValues$documents1, _formValues$declarati, _formValues$declarati2, _formValues$declarati3, _formValues$declarati4, _formValues$declarati5;
38386
38370
  const _useTranslation2 = reactI18next.useTranslation(),
38387
38371
  t = _useTranslation2.t;
38388
38372
  const history = reactRouterDom.useHistory();
@@ -40415,9 +40399,6 @@ const NewApplication = () => {
40415
40399
  })), /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
40416
40400
  control: control,
40417
40401
  name: "declaration.signatureFile",
40418
- rules: {
40419
- validate: value => !!value || "Signature upload is required."
40420
- },
40421
40402
  render: props => /*#__PURE__*/React__default.createElement(FileUploadField, {
40422
40403
  error: getFieldError("declaration.signatureFile"),
40423
40404
  id: "signature-file",
@@ -40425,7 +40406,6 @@ const NewApplication = () => {
40425
40406
  label: "Upload Signature",
40426
40407
  onDelete: () => clearUploadedFile("declaration.signatureFile", props.onChange),
40427
40408
  onUpload: event => uploadFile(event, "declaration.signatureFile", props.onChange),
40428
- required: true,
40429
40409
  value: props.value
40430
40410
  })
40431
40411
  })))), previewMode && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(SectionCard, {
@@ -40737,7 +40717,7 @@ const NewApplication = () => {
40737
40717
  onSubmit: onReset,
40738
40718
  style: secondaryButtonStyle
40739
40719
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
40740
- disabled: hasPendingUpload,
40720
+ disabled: hasPendingUpload || !(formValues !== null && formValues !== void 0 && (_formValues$declarati4 = formValues.declaration) !== null && _formValues$declarati4 !== void 0 && _formValues$declarati4.agree),
40741
40721
  label: hasPendingUpload ? "Uploading..." : "Preview",
40742
40722
  onSubmit: handleSubmit(onPreview)
40743
40723
  })) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
@@ -40745,7 +40725,7 @@ const NewApplication = () => {
40745
40725
  onSubmit: onEdit,
40746
40726
  style: secondaryButtonStyle
40747
40727
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
40748
- disabled: hasPendingUpload,
40728
+ disabled: hasPendingUpload || !(formValues !== null && formValues !== void 0 && (_formValues$declarati5 = formValues.declaration) !== null && _formValues$declarati5 !== void 0 && _formValues$declarati5.agree),
40749
40729
  label: hasPendingUpload ? "Uploading..." : "Submit",
40750
40730
  onSubmit: handleSubmit(onSubmit)
40751
40731
  }))), showToast ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
@@ -55259,6 +55239,7 @@ const CheckPage$4 = _ref2 => {
55259
55239
  };
55260
55240
 
55261
55241
  const OLDApplication = () => {
55242
+ var _sessionFormData$decl;
55262
55243
  const _useTranslation = reactI18next.useTranslation(),
55263
55244
  t = _useTranslation.t;
55264
55245
  const history = reactRouterDom.useHistory();
@@ -55470,7 +55451,7 @@ const OLDApplication = () => {
55470
55451
  }).length > 0)) {
55471
55452
  console.warn("[WS] onSubmit EXIT: formState errors blocking submit", formStateErros);
55472
55453
  setShowToast({
55473
- warning: true,
55454
+ key: "error",
55474
55455
  message: "PLEASE_FILL_MANDATORY_DETAILS"
55475
55456
  });
55476
55457
  return;
@@ -55853,7 +55834,8 @@ const OLDApplication = () => {
55853
55834
  defaultValues: sessionFormData,
55854
55835
  noCard: true,
55855
55836
  noBreakLine: true,
55856
- cardFormWrapperClassName: "new-application-card"
55837
+ cardFormWrapperClassName: "new-application-card",
55838
+ isDisabled: !(sessionFormData !== null && sessionFormData !== void 0 && (_sessionFormData$decl = sessionFormData.declarationData) !== null && _sessionFormData$decl !== void 0 && _sessionFormData$decl.agree)
55857
55839
  }), showToast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
55858
55840
  isDleteBtn: true,
55859
55841
  duration: 5000,