@mseva/digit-ui-module-ndc 1.0.40 → 1.0.41

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
@@ -2176,6 +2176,7 @@ const ApplicationOverview = () => {
2176
2176
  const state = tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0];
2177
2177
  const [showToast, setShowToast] = React.useState(null);
2178
2178
  const [error, setError] = React.useState(null);
2179
+ const [getLable, setLable] = React.useState(false);
2179
2180
  const {
2180
2181
  control,
2181
2182
  handleSubmit,
@@ -2361,9 +2362,11 @@ const ApplicationOverview = () => {
2361
2362
  console.log("filterRoles====???", filterRoles);
2362
2363
  console.log("action test", action === null || action === void 0 ? void 0 : action.action);
2363
2364
  const checkactionApp = (action === null || action === void 0 ? void 0 : action.action) == "APPROVE";
2364
- if (filterRoles && checkactionApp) {
2365
+ console.log("filterRoles && checkactionApp", filterRoles && checkactionApp, checkactionApp, filterRoles);
2366
+ if (hasDuePending && checkactionApp) {
2365
2367
  console.log("alwasy coming appprve");
2366
- setError("You Can Not Approve This Application, Because It Has Pending Dues. Please Send It To Required Department");
2368
+ setLable("You Can Not Approve This Application, Because It Has Pending Dues. Please Send It To Required Department");
2369
+ setError(true);
2367
2370
  setShowToast(true);
2368
2371
  return;
2369
2372
  }
@@ -2427,11 +2430,9 @@ const ApplicationOverview = () => {
2427
2430
  tenantId,
2428
2431
  details: finalPayload
2429
2432
  })).then(function (response) {
2430
- setShowToast({
2431
- key: "success",
2432
- message: "Successfully updated the status"
2433
- });
2434
- setError("Successfully updated the status");
2433
+ setLable("Successfully updated the status");
2434
+ setError(false);
2435
+ setShowToast(true);
2435
2436
  workflowDetails.revalidate();
2436
2437
  setTimeout(() => {
2437
2438
  history.push("/digit-ui/employee/ndc/inbox");
@@ -2649,8 +2650,8 @@ const ApplicationOverview = () => {
2649
2650
  errorOne: errorOne,
2650
2651
  closeToastOne: closeToastOne
2651
2652
  }) : null, showToast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
2652
- error: true,
2653
- label: error,
2653
+ error: error,
2654
+ label: getLable,
2654
2655
  isDleteBtn: true,
2655
2656
  onClose: closeToast
2656
2657
  }), getLoader && /*#__PURE__*/React__default.createElement(Loader, {