@mseva/digit-ui-module-garbagecollection 1.0.33-dev.1 → 1.0.33-dev.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2814,7 +2814,6 @@ const CHBCitizenSecond = ({
2814
2814
  currentStepData,
2815
2815
  t
2816
2816
  }) => {
2817
- var _amountData$gcServic;
2818
2817
  const tenantId = window.location.href.includes("employee") ? Digit.ULBService.getCurrentPermanentCity() : localStorage.getItem("CITIZEN.CITY");
2819
2818
  const isCitizen = window.location.href.includes("citizen");
2820
2819
  const [getPropertyId, setPropertyId] = useState(null);
@@ -2847,13 +2846,6 @@ const CHBCitizenSecond = ({
2847
2846
  } = Digit.Hooks.useCustomMDMS(tenantId, "gc-services-masters", [{
2848
2847
  name: "connectionCategory"
2849
2848
  }]);
2850
- const {
2851
- data: amountData = [],
2852
- isLoading: amountDataLoading
2853
- } = Digit.Hooks.useCustomMDMS(tenantId, "gc-services-calculation", [{
2854
- name: "GCBillingSlab"
2855
- }]);
2856
- console.log("amountData", amountData === null || amountData === void 0 ? void 0 : (_amountData$gcServic = amountData["gc-services-calculation"]) === null || _amountData$gcServic === void 0 ? void 0 : _amountData$gcServic.GCBillingSlab);
2857
2849
  const {
2858
2850
  control,
2859
2851
  handleSubmit,
@@ -3094,13 +3086,6 @@ const CHBCitizenSecond = ({
3094
3086
  });
3095
3087
  return Array.from(map.values());
3096
3088
  }, [selectedFloorUnits]);
3097
- const filterAmountData = (freq, propertyType) => {
3098
- var _amountData$gcServic2, _finalData$;
3099
- const filterData = amountData === null || amountData === void 0 ? void 0 : (_amountData$gcServic2 = amountData["gc-services-calculation"]) === null || _amountData$gcServic2 === void 0 ? void 0 : _amountData$gcServic2.GCBillingSlab;
3100
- const finalData = filterData === null || filterData === void 0 ? void 0 : filterData.filter(item => item.billingCycle === freq && item.buildingType === propertyType);
3101
- console.log("finalData", finalData[0]);
3102
- setValue("defAmount", (_finalData$ = finalData[0]) === null || _finalData$ === void 0 ? void 0 : _finalData$.minimumCharge);
3103
- };
3104
3089
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("form", {
3105
3090
  style: {
3106
3091
  paddingBottom: "150px"
@@ -3288,11 +3273,7 @@ const CHBCitizenSecond = ({
3288
3273
  },
3289
3274
  className: "form-field",
3290
3275
  select: e => {
3291
- var _watch2, _watch3;
3292
3276
  props.onChange(e);
3293
- console.log("frequency", e === null || e === void 0 ? void 0 : e.name);
3294
- console.log("property type", (_watch2 = watch("propertyType")) === null || _watch2 === void 0 ? void 0 : _watch2.code);
3295
- filterAmountData(e === null || e === void 0 ? void 0 : e.name, (_watch3 = watch("propertyType")) === null || _watch3 === void 0 ? void 0 : _watch3.code);
3296
3277
  },
3297
3278
  selected: props.value,
3298
3279
  option: FreqType === null || FreqType === void 0 ? void 0 : (_FreqType$gcServices2 = FreqType["gc-services-masters"]) === null || _FreqType$gcServices2 === void 0 ? void 0 : _FreqType$gcServices2.GarbageCollectionFrequency,
@@ -3311,34 +3292,6 @@ const CHBCitizenSecond = ({
3311
3292
  }
3312
3293
  }, /*#__PURE__*/React.createElement(CardLabel, {
3313
3294
  className: "card-label-smaller"
3314
- }, `${t("Amount")}`), /*#__PURE__*/React.createElement("div", {
3315
- className: "form-field"
3316
- }, /*#__PURE__*/React.createElement(Controller, {
3317
- control: control,
3318
- name: "defAmount",
3319
- render: props => /*#__PURE__*/React.createElement(TextInput, {
3320
- style: {
3321
- marginBottom: 0
3322
- },
3323
- value: props.value,
3324
- onChange: e => {
3325
- props.onChange(e.target.value);
3326
- },
3327
- disabled: true,
3328
- t: t
3329
- })
3330
- }), (errors === null || errors === void 0 ? void 0 : errors.location) && /*#__PURE__*/React.createElement("p", {
3331
- style: {
3332
- color: "red",
3333
- marginTop: "4px",
3334
- marginBottom: "0"
3335
- }
3336
- }, errors.location.message))), /*#__PURE__*/React.createElement(LabelFieldPair, {
3337
- style: {
3338
- marginBottom: "16px"
3339
- }
3340
- }, /*#__PURE__*/React.createElement(CardLabel, {
3341
- className: "card-label-smaller"
3342
3295
  }, `${t("GC_WASTE_TYPE")}`, " ", /*#__PURE__*/React.createElement("span", {
3343
3296
  style: {
3344
3297
  color: "red"
@@ -3506,7 +3459,7 @@ const CHBCitizenSecond = ({
3506
3459
  error: true,
3507
3460
  label: error,
3508
3461
  onClose: closeToast
3509
- }), (amountDataLoading || loader || isLoading || GCLoading || WasteTypeLoading || FreqTypeLoading || connectionCategoryLoading) && /*#__PURE__*/React.createElement(Loader, {
3462
+ }), (loader || isLoading || GCLoading || WasteTypeLoading || FreqTypeLoading || connectionCategoryLoading) && /*#__PURE__*/React.createElement(Loader, {
3510
3463
  page: true
3511
3464
  }));
3512
3465
  };
@@ -10018,12 +9971,6 @@ function CHBSummary({
10018
9971
  function onActionSelect(action) {
10019
9972
  goNext(action);
10020
9973
  }
10021
- const pageStyle = {
10022
- padding: "2rem",
10023
- backgroundColor: "#f9f9f9",
10024
- fontFamily: "'Segoe UI', Tahoma, Geneva, Verdana, sans-serif",
10025
- color: "#333"
10026
- };
10027
9974
  const sectionStyle = {
10028
9975
  backgroundColor: "#ffffff",
10029
9976
  padding: "1rem 1.5rem",
@@ -10031,34 +9978,15 @@ function CHBSummary({
10031
9978
  marginBottom: "2rem",
10032
9979
  boxShadow: "0 2px 4px rgba(0, 0, 0, 0.05)"
10033
9980
  };
10034
- const headingStyle = {
10035
- fontSize: "1.5rem",
10036
- borderBottom: "2px solid #ccc",
10037
- paddingBottom: "0.3rem",
10038
- color: "#2e4a66",
10039
- marginTop: "2rem",
10040
- marginBottom: "1rem"
10041
- };
10042
- const labelFieldPairStyle = {
10043
- display: "flex",
10044
- justifyContent: "space-between",
10045
- borderBottom: "1px dashed #e0e0e0",
10046
- padding: "0.5rem 0",
10047
- color: "#333"
10048
- };
10049
- const boldLabelStyle = {
10050
- fontWeight: "bold",
10051
- color: "#555"
10052
- };
10053
9981
  const renderLabel = (label, value) => /*#__PURE__*/React.createElement("div", {
10054
- style: labelFieldPairStyle
9982
+ className: "bpa-summary-label-field-pair"
10055
9983
  }, /*#__PURE__*/React.createElement(CardLabel, {
10056
- style: boldLabelStyle
9984
+ className: "card-label bpa-summary-bold-label swach-search-container"
10057
9985
  }, label), /*#__PURE__*/React.createElement("div", null, t(value) || "NA"));
10058
9986
  return /*#__PURE__*/React.createElement("div", {
10059
- style: pageStyle
9987
+ className: "bpa-summary-page"
10060
9988
  }, /*#__PURE__*/React.createElement("h2", {
10061
- style: headingStyle
9989
+ className: "bpa-summary-heading"
10062
9990
  }, t("Application Summary")), /*#__PURE__*/React.createElement("div", {
10063
9991
  style: sectionStyle
10064
9992
  }, /*#__PURE__*/React.createElement(CardSubHeader, {
@@ -12952,38 +12880,6 @@ const ChallanApplicationDetails$1 = () => {
12952
12880
  setLoader(false);
12953
12881
  }
12954
12882
  };
12955
- console.log("getChallanData", getChallanData);
12956
- const handleDiscontinue = async data => {
12957
- console.log("data", data);
12958
- setLoader(true);
12959
- const payload = {
12960
- GarbageConnection: {
12961
- ...data,
12962
- applicationType: "DISCONNECT_GARBAGE_CONNECTION",
12963
- processInstance: {
12964
- ...(data === null || data === void 0 ? void 0 : data.processInstance),
12965
- action: "INITIATE"
12966
- }
12967
- },
12968
- disconnectRequest: true
12969
- };
12970
- console.log("payload===", payload);
12971
- try {
12972
- const response = await Digit.GCService.create(payload);
12973
- console.log("response", response);
12974
- setLable("Connection Disconnected Successfully");
12975
- setError(false);
12976
- setShowToast(true);
12977
- setTimeout(() => {
12978
- history.push("/digit-ui/employee/garbagecollection/inbox");
12979
- window.location.reload();
12980
- }, 2000);
12981
- setLoader(false);
12982
- } catch (error) {
12983
- setLoader(false);
12984
- }
12985
- };
12986
- const hideStatuses = ["INITIATED", "CONNECTION_ACTIVATED", "APPROVED"];
12987
12883
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
12988
12884
  className: "cardHeaderWithOptions ral-app-details-header"
12989
12885
  }, /*#__PURE__*/React.createElement(Header, {
@@ -13085,7 +12981,7 @@ const ChallanApplicationDetails$1 = () => {
13085
12981
  }, t(doc === null || doc === void 0 ? void 0 : doc.documentType))))) : /*#__PURE__*/React.createElement("h5", null, t("CS_NO_DOCUMENTS_UPLOADED"))))), /*#__PURE__*/React.createElement(NewApplicationTimeline, {
13086
12982
  workflowDetails: workflowDetails,
13087
12983
  t: t
13088
- }), !hideStatuses.includes(getChallanData === null || getChallanData === void 0 ? void 0 : getChallanData.applicationStatus) && actions && /*#__PURE__*/React.createElement(ActionBar, null, displayMenu && (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data1 = workflowDetails.data) !== null && _workflowDetails$data1 !== void 0 && (_workflowDetails$data10 = _workflowDetails$data1.actionState) !== null && _workflowDetails$data10 !== void 0 && _workflowDetails$data10.nextActions || workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data11 = workflowDetails.data) !== null && _workflowDetails$data11 !== void 0 && _workflowDetails$data11.nextActions) ? /*#__PURE__*/React.createElement(Menu, {
12984
+ }), (getChallanData === null || getChallanData === void 0 ? void 0 : getChallanData.applicationStatus) != "INITIATED" && actions && /*#__PURE__*/React.createElement(ActionBar, null, displayMenu && (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data1 = workflowDetails.data) !== null && _workflowDetails$data1 !== void 0 && (_workflowDetails$data10 = _workflowDetails$data1.actionState) !== null && _workflowDetails$data10 !== void 0 && _workflowDetails$data10.nextActions || workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data11 = workflowDetails.data) !== null && _workflowDetails$data11 !== void 0 && _workflowDetails$data11.nextActions) ? /*#__PURE__*/React.createElement(Menu, {
13089
12985
  localeKeyPrefix: `WF_GC`,
13090
12986
  options: actions,
13091
12987
  optionKey: "action",
@@ -13101,13 +12997,6 @@ const ChallanApplicationDetails$1 = () => {
13101
12997
  const id = getChallanData === null || getChallanData === void 0 ? void 0 : getChallanData.applicationNo;
13102
12998
  history.push(`/digit-ui/employee/garbagecollection/create-application/${id}`);
13103
12999
  }
13104
- })), (getChallanData === null || getChallanData === void 0 ? void 0 : getChallanData.applicationStatus) == "CONNECTION_ACTIVATED" && /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
13105
- style: {
13106
- width: "200px"
13107
- },
13108
- label: t("GC_DISCONTINUE_SERVICE"),
13109
- onSubmit: () => handleDiscontinue(getChallanData),
13110
- disabled: loader
13111
13000
  }))), showModal ? /*#__PURE__*/React.createElement(NDCModal, {
13112
13001
  t: t,
13113
13002
  action: selectedAction,
@@ -13503,7 +13392,6 @@ const BillGenie = () => {
13503
13392
  row
13504
13393
  }) => {
13505
13394
  var _row$original, _row$original2;
13506
- console.log("row", row);
13507
13395
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, (_row$original = row.original) !== null && _row$original !== void 0 && _row$original.createdtime ? GetCell(format(new Date((_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : _row$original2.createdtime), "dd/MM/yyyy")) : ""));
13508
13396
  }
13509
13397
  }, {
@@ -13515,12 +13403,25 @@ const BillGenie = () => {
13515
13403
  Cell: ({
13516
13404
  row
13517
13405
  }) => {
13518
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(SubmitBar, {
13406
+ return /*#__PURE__*/React.createElement("div", {
13407
+ style: {
13408
+ display: "flex",
13409
+ gap: "15px"
13410
+ }
13411
+ }, /*#__PURE__*/React.createElement(SubmitBar, {
13519
13412
  label: "Download",
13520
13413
  onSubmit: () => getRecieptSearch({
13521
13414
  tenantId,
13522
13415
  bills: getBills
13523
13416
  })
13417
+ }), /*#__PURE__*/React.createElement(SubmitBar, {
13418
+ label: "Pay",
13419
+ onSubmit: () => {
13420
+ var _row$original3, _row$original4;
13421
+ console.log("check row", row === null || row === void 0 ? void 0 : (_row$original3 = row.original) === null || _row$original3 === void 0 ? void 0 : _row$original3.uuid);
13422
+ const id = row === null || row === void 0 ? void 0 : (_row$original4 = row.original) === null || _row$original4 === void 0 ? void 0 : _row$original4.uuid;
13423
+ history.push(`/digit-ui/employee/payment/collect/GC/${id}/${tenantId}?tenantId=${tenantId}`);
13424
+ }
13524
13425
  }));
13525
13426
  }
13526
13427
  }];