oa-componentbook 1.0.1-stage.363 → 1.0.1-stage.365

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.
Files changed (24) hide show
  1. package/build/components/oa-component-accordion/Accordion.js +102 -42
  2. package/build/components/oa-component-accordion/styles.js +2 -2
  3. package/build/components/oa-component-button/CustomButton.js +6 -4
  4. package/build/components/oa-component-icons/MaterialIcon.js +1 -1
  5. package/build/components/oa-component-modal/styles.js +1 -1
  6. package/build/components/oa-component-tag/CustomTag.js +18 -12
  7. package/build/index.js +14 -0
  8. package/build/layout/EntityOverviewLayout/EntityOverviewLayout.js +215 -0
  9. package/build/layout/EntityOverviewLayout/reducer/entityOverviewLayoutReducer.js +77 -0
  10. package/build/layout/EntityOverviewLayout/styles.js +13 -0
  11. package/build/layout/GenricLayOut/GenricLayOut.js +299 -173
  12. package/build/layout/GenricLayOut/components/Header.js +7 -1
  13. package/build/layout/GenricLayOut/components/ProfileSection.js +85 -0
  14. package/build/layout/GenricLayOut/reducer/layoutReducer.js +5 -1
  15. package/build/layout/GenricLayOut/styles.js +6 -3
  16. package/build/widgets/oa-form-widget/FormWidget.js +89 -22
  17. package/build/widgets/oa-widget-approval/ApprovalWidgetNew.js +91 -46
  18. package/build/widgets/oa-widget-key-value/KeyValueWidget.js +3 -0
  19. package/build/widgets/oa-widget-profile-data/ProfileDataWidget.js +115 -0
  20. package/build/widgets/oa-widget-profile-data/styles.js +13 -0
  21. package/build/widgets/oa-widget-progressive-steps/ProgressiveStepsWidget.js +104 -105
  22. package/build/widgets/oa-widget-user-management/UserManagementWidget.js +332 -0
  23. package/build/widgets/oa-widget-user-management/styles.js +15 -0
  24. package/package.json +1 -1
@@ -36,6 +36,7 @@ var _CustomViewer = _interopRequireDefault(require("../../components/oa-componen
36
36
  var _StaticFilter = _interopRequireDefault(require("./components/StaticFilter"));
37
37
  var _downloadFile = _interopRequireDefault(require("../../utils/download-file"));
38
38
  var _AppliedFilters = _interopRequireDefault(require("./components/AppliedFilters"));
39
+ var _ProfileSection = _interopRequireDefault(require("./components/ProfileSection"));
39
40
  var _FilterListRounded = _interopRequireDefault(require("@material-ui/icons/FilterListRounded"));
40
41
  const _excluded = ["filteredValue"],
41
42
  _excluded2 = ["sortOrder"];
@@ -51,7 +52,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
51
52
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
52
53
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /* eslint-disable */
53
54
  function GenricLayOut(_ref) {
54
- var _parent$children, _state$misc20, _imageViewer$content, _imageViewer$content2, _leftHeaderFirstButto, _leftHeaderFirstButto2, _customDrawer$applied12, _state$customDrawer3, _state$customDrawer4, _tabs$list, _tables$columns3, _tables$columns4, _tabs$active3, _state$tables3, _tables$selectionType, _tabs$active4, _tables$selectionType2, _tables$pagination33, _drawer$data, _tabs$active5, _drawer$data$drawer$a, _drawer$data2, _tabs$active6, _tabs$active7, _nestedDrawer$data, _nestedDrawer$data$ca, _nestedDrawer$data2, _customDrawer$data, _customDrawer$data2, _contentPanel$dataSou, _tables$tableFooter, _tables$selectedRowKe, _tables$tableFooter2, _tables$tableFooter3, _tables$tableFooter5;
55
+ var _state$misc22, _imageViewer$content, _imageViewer$content2, _leftHeaderFirstButto, _leftHeaderFirstButto2, _state$customDrawer3, _state$customDrawer4, _tabs$list, _tables$columns3, _tables$columns4, _tabs$active3, _state$tables4, _tables$selectionType, _tabs$active4, _tables$selectionType2, _tables$pagination17, _drawer$data, _tabs$active5, _drawer$data$drawer$a, _drawer$data2, _tabs$active6, _tabs$active7, _nestedDrawer$data, _nestedDrawer$data$ca, _nestedDrawer$data2, _customDrawer$data, _customDrawer$data2, _contentPanel$dataSou, _tables$tableFooter, _tables$selectedRowKe, _tables$tableFooter2, _tables$tableFooter3, _tables$tableFooter5;
55
56
  let {
56
57
  config,
57
58
  getInitialData,
@@ -76,10 +77,13 @@ function GenricLayOut(_ref) {
76
77
  handleActionOnTableCTAClick,
77
78
  handleModalCloseSuccess,
78
79
  handleSubHeadingSelectClick,
79
- handleCollapsibleKeyData
80
+ handleCollapsibleKeyData,
81
+ handleProfileReroute,
82
+ handleTableFooterApi
80
83
  } = {}
81
84
  } = _ref;
82
85
  const [state, dispatch] = (0, _react.useReducer)(_layoutReducer.genericLayoutReducer, config !== null && config !== void 0 ? config : _layoutReducer.initialState);
86
+ const [headerButtons, setHeaderButtons] = (0, _react.useState)(null);
83
87
  const stateRef = (0, _react.useRef)(state);
84
88
  const notificationRef = (0, _react.useRef)(null);
85
89
  const openNotification = (0, _react.useCallback)(params => notificationRef.current.openNotification(params), []);
@@ -100,7 +104,8 @@ function GenricLayOut(_ref) {
100
104
  rightHeaderSecondButton,
101
105
  imageViewer,
102
106
  customDrawer,
103
- staticFilter
107
+ staticFilter,
108
+ profileData
104
109
  } = state !== null && state !== void 0 ? state : {};
105
110
  (0, _react.useEffect)(() => {
106
111
  init();
@@ -108,10 +113,25 @@ function GenricLayOut(_ref) {
108
113
  (0, _react.useEffect)(() => {
109
114
  stateRef.current = state;
110
115
  }, [state]);
111
- const parent = document.querySelector(".oaheaderButtons");
112
- if ((parent === null || parent === void 0 || (_parent$children = parent.children) === null || _parent$children === void 0 ? void 0 : _parent$children.length) === 1) {
113
- parent.classList.add("single-child");
114
- }
116
+ (0, _react.useEffect)(() => {
117
+ const observer = new MutationObserver(e => {
118
+ const parent = document.querySelector(".oaheaderButtons");
119
+ if (parent) {
120
+ var _parent$children;
121
+ setHeaderButtons(parent);
122
+ if ((parent === null || parent === void 0 || (_parent$children = parent.children) === null || _parent$children === void 0 ? void 0 : _parent$children.length) === 1) {
123
+ parent.classList.add("single-child");
124
+ }
125
+ }
126
+ });
127
+ observer.observe(document.body, {
128
+ childList: true,
129
+ subtree: true
130
+ });
131
+ return () => {
132
+ observer.disconnect();
133
+ };
134
+ }, [headerButtons]);
115
135
 
116
136
  /**
117
137
  * Initializes the layout by fetching initial data and updating the state.
@@ -228,7 +248,7 @@ function GenricLayOut(_ref) {
228
248
  });
229
249
  if (value === "") {
230
250
  if (handleInputSearchChange) {
231
- var _state$inputSearch, _state$tabs2, _customDrawer$applied, _tables$pagination, _tables$pagination2, _tables$sorting, _tables$sorting2, _header$subHeading, _header$subHeading2;
251
+ var _state$inputSearch, _state$tabs2, _customDrawer$applied, _config$tables, _config$tables2, _tables$sorting, _tables$sorting2, _header$subHeading, _header$subHeading2;
232
252
  dispatch({
233
253
  type: _layoutReducer.actionTypes.SET_LOADING,
234
254
  payload: true
@@ -238,13 +258,9 @@ function GenricLayOut(_ref) {
238
258
  data
239
259
  } = await handleInputSearchChange(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, state === null || state === void 0 || (_state$inputSearch = state.inputSearch) === null || _state$inputSearch === void 0 ? void 0 : _state$inputSearch.request), state !== null && state !== void 0 && (_state$tabs2 = state.tabs) !== null && _state$tabs2 !== void 0 && _state$tabs2.active ? {
240
260
  selectedTab: state.tabs.active
241
- } : {}), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied !== void 0 ? _customDrawer$applied : {}).length > 0 && {
242
- filterOn: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.filterBy,
243
- fromDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.fromDate,
244
- toDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.toDate
245
- }), {}, {
246
- current: tables === null || tables === void 0 || (_tables$pagination = tables.pagination) === null || _tables$pagination === void 0 ? void 0 : _tables$pagination.current,
247
- pageSize: tables === null || tables === void 0 || (_tables$pagination2 = tables.pagination) === null || _tables$pagination2 === void 0 ? void 0 : _tables$pagination2.pageSize,
261
+ } : {}), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied !== void 0 ? _customDrawer$applied : {}).length > 0 && _objectSpread({}, customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)), {}, {
262
+ current: config === null || config === void 0 || (_config$tables = config.tables) === null || _config$tables === void 0 || (_config$tables = _config$tables.pagination) === null || _config$tables === void 0 ? void 0 : _config$tables.current,
263
+ pageSize: config === null || config === void 0 || (_config$tables2 = config.tables) === null || _config$tables2 === void 0 || (_config$tables2 = _config$tables2.pagination) === null || _config$tables2 === void 0 ? void 0 : _config$tables2.pageSize,
248
264
  field: tables === null || tables === void 0 || (_tables$sorting = tables.sorting) === null || _tables$sorting === void 0 ? void 0 : _tables$sorting.sortBy,
249
265
  order: tables === null || tables === void 0 || (_tables$sorting2 = tables.sorting) === null || _tables$sorting2 === void 0 ? void 0 : _tables$sorting2.sortDirection
250
266
  }, (header === null || header === void 0 || (_header$subHeading = header.subHeading) === null || _header$subHeading === void 0 || (_header$subHeading = _header$subHeading.jsxConfig) === null || _header$subHeading === void 0 ? void 0 : _header$subHeading.type) == "select" ? {
@@ -256,6 +272,7 @@ function GenricLayOut(_ref) {
256
272
  type: _layoutReducer.actionTypes.SET_TABLE_EMPTY
257
273
  });
258
274
  } else {
275
+ var _config$tables3, _config$tables4;
259
276
  if (staticFilter !== null && staticFilter !== void 0 && staticFilter.visible) {
260
277
  setStaticFilterData(data);
261
278
  }
@@ -263,6 +280,13 @@ function GenricLayOut(_ref) {
263
280
  type: _layoutReducer.actionTypes.SET_TABLE_DATA,
264
281
  payload: data
265
282
  });
283
+ dispatch({
284
+ type: _layoutReducer.actionTypes.SET_PAGINATION,
285
+ payload: {
286
+ current: config === null || config === void 0 || (_config$tables3 = config.tables) === null || _config$tables3 === void 0 || (_config$tables3 = _config$tables3.pagination) === null || _config$tables3 === void 0 ? void 0 : _config$tables3.current,
287
+ pageSize: config === null || config === void 0 || (_config$tables4 = config.tables) === null || _config$tables4 === void 0 || (_config$tables4 = _config$tables4.pagination) === null || _config$tables4 === void 0 ? void 0 : _config$tables4.pageSize
288
+ }
289
+ });
266
290
  }
267
291
  dispatch({
268
292
  type: _layoutReducer.actionTypes.SET_LOADING,
@@ -302,7 +326,7 @@ function GenricLayOut(_ref) {
302
326
  payload: trimedValue
303
327
  });
304
328
  if (handleInputSearchEnter) {
305
- var _state$tabs3, _tables$pagination3, _tables$pagination4, _tables$sorting3, _tables$sorting4, _customDrawer$applied2, _header$subHeading3, _header$subHeading4;
329
+ var _state$tabs3, _config$tables5, _config$tables6, _tables$sorting3, _tables$sorting4, _customDrawer$applied2, _header$subHeading3, _header$subHeading4;
306
330
  const {
307
331
  error,
308
332
  data
@@ -310,15 +334,11 @@ function GenricLayOut(_ref) {
310
334
  selectedTab: state.tabs.active
311
335
  } : {}), {}, {
312
336
  searchedValue: trimedValue,
313
- current: tables === null || tables === void 0 || (_tables$pagination3 = tables.pagination) === null || _tables$pagination3 === void 0 ? void 0 : _tables$pagination3.current,
314
- pageSize: tables === null || tables === void 0 || (_tables$pagination4 = tables.pagination) === null || _tables$pagination4 === void 0 ? void 0 : _tables$pagination4.pageSize,
337
+ current: config === null || config === void 0 || (_config$tables5 = config.tables) === null || _config$tables5 === void 0 || (_config$tables5 = _config$tables5.pagination) === null || _config$tables5 === void 0 ? void 0 : _config$tables5.current,
338
+ pageSize: config === null || config === void 0 || (_config$tables6 = config.tables) === null || _config$tables6 === void 0 || (_config$tables6 = _config$tables6.pagination) === null || _config$tables6 === void 0 ? void 0 : _config$tables6.pageSize,
315
339
  field: tables === null || tables === void 0 || (_tables$sorting3 = tables.sorting) === null || _tables$sorting3 === void 0 ? void 0 : _tables$sorting3.sortBy,
316
340
  order: tables === null || tables === void 0 || (_tables$sorting4 = tables.sorting) === null || _tables$sorting4 === void 0 ? void 0 : _tables$sorting4.sortDirection
317
- }, (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied2 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied2 !== void 0 ? _customDrawer$applied2 : {}).length > 0 && {
318
- filterOn: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.filterBy,
319
- fromDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.fromDate,
320
- toDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.toDate
321
- }), inputSearch !== null && inputSearch !== void 0 && inputSearch.queryField ? {
341
+ }, (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied2 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied2 !== void 0 ? _customDrawer$applied2 : {}).length > 0 && _objectSpread({}, customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)), inputSearch !== null && inputSearch !== void 0 && inputSearch.queryField ? {
322
342
  queryField: inputSearch.queryField
323
343
  } : {}), (header === null || header === void 0 || (_header$subHeading3 = header.subHeading) === null || _header$subHeading3 === void 0 || (_header$subHeading3 = _header$subHeading3.jsxConfig) === null || _header$subHeading3 === void 0 ? void 0 : _header$subHeading3.type) == "select" ? {
324
344
  subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading4 = header.subHeading) === null || _header$subHeading4 === void 0 || (_header$subHeading4 = _header$subHeading4.jsxConfig) === null || _header$subHeading4 === void 0 ? void 0 : _header$subHeading4.value
@@ -329,6 +349,7 @@ function GenricLayOut(_ref) {
329
349
  type: _layoutReducer.actionTypes.SET_TABLE_EMPTY
330
350
  });
331
351
  } else {
352
+ var _config$tables7, _config$tables8;
332
353
  if (staticFilter !== null && staticFilter !== void 0 && staticFilter.visible) {
333
354
  setStaticFilterData(data);
334
355
  }
@@ -336,6 +357,13 @@ function GenricLayOut(_ref) {
336
357
  type: _layoutReducer.actionTypes.SET_TABLE_DATA,
337
358
  payload: data
338
359
  });
360
+ dispatch({
361
+ type: _layoutReducer.actionTypes.SET_PAGINATION,
362
+ payload: {
363
+ current: config === null || config === void 0 || (_config$tables7 = config.tables) === null || _config$tables7 === void 0 || (_config$tables7 = _config$tables7.pagination) === null || _config$tables7 === void 0 ? void 0 : _config$tables7.current,
364
+ pageSize: config === null || config === void 0 || (_config$tables8 = config.tables) === null || _config$tables8 === void 0 || (_config$tables8 = _config$tables8.pagination) === null || _config$tables8 === void 0 ? void 0 : _config$tables8.pageSize
365
+ }
366
+ });
339
367
  }
340
368
  }
341
369
  };
@@ -365,7 +393,7 @@ function GenricLayOut(_ref) {
365
393
  });
366
394
  if (value === "") {
367
395
  if (handleDropdownSearchInputChange) {
368
- var _state$tabs4, _tables$pagination5, _tables$pagination6, _tables$sorting5, _tables$sorting6, _tables$filter, _staticFilter$data, _customDrawer$applied3, _state$misc2;
396
+ var _state$tabs4, _config$tables9, _config$tables10, _tables$sorting5, _tables$sorting6, _tables$filter, _staticFilter$data, _customDrawer$applied3, _header$subHeading5, _header$subHeading6, _state$misc2;
369
397
  dispatch({
370
398
  type: _layoutReducer.actionTypes.SET_LOADING,
371
399
  payload: true
@@ -373,27 +401,26 @@ function GenricLayOut(_ref) {
373
401
  const {
374
402
  error,
375
403
  data
376
- } = await handleDropdownSearchInputChange(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
404
+ } = await handleDropdownSearchInputChange(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
377
405
  selectedTab: state === null || state === void 0 || (_state$tabs4 = state.tabs) === null || _state$tabs4 === void 0 ? void 0 : _state$tabs4.active,
378
- current: tables === null || tables === void 0 || (_tables$pagination5 = tables.pagination) === null || _tables$pagination5 === void 0 ? void 0 : _tables$pagination5.current,
379
- pageSize: tables === null || tables === void 0 || (_tables$pagination6 = tables.pagination) === null || _tables$pagination6 === void 0 ? void 0 : _tables$pagination6.pageSize,
406
+ current: config === null || config === void 0 || (_config$tables9 = config.tables) === null || _config$tables9 === void 0 || (_config$tables9 = _config$tables9.pagination) === null || _config$tables9 === void 0 ? void 0 : _config$tables9.current,
407
+ pageSize: config === null || config === void 0 || (_config$tables10 = config.tables) === null || _config$tables10 === void 0 || (_config$tables10 = _config$tables10.pagination) === null || _config$tables10 === void 0 ? void 0 : _config$tables10.pageSize,
380
408
  field: tables === null || tables === void 0 || (_tables$sorting5 = tables.sorting) === null || _tables$sorting5 === void 0 ? void 0 : _tables$sorting5.sortBy,
381
409
  order: tables === null || tables === void 0 || (_tables$sorting6 = tables.sorting) === null || _tables$sorting6 === void 0 ? void 0 : _tables$sorting6.sortDirection
382
410
  }, (tables === null || tables === void 0 || (_tables$filter = tables.filter) === null || _tables$filter === void 0 ? void 0 : _tables$filter.key) && {
383
411
  columnFilterStatus: tables === null || tables === void 0 ? void 0 : tables.filter
384
412
  }), (staticFilter === null || staticFilter === void 0 ? void 0 : staticFilter.visible) && ((_staticFilter$data = staticFilter.data) === null || _staticFilter$data === void 0 || (_staticFilter$data = _staticFilter$data.find(item => item.selected)) === null || _staticFilter$data === void 0 ? void 0 : _staticFilter$data.value) && {
385
413
  staticFilter: staticFilter.data.find(item => item.selected).value
386
- }), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied3 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied3 !== void 0 ? _customDrawer$applied3 : {}).length > 0 && {
387
- filterOn: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.filterBy,
388
- fromDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.fromDate,
389
- toDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.toDate
390
- }), (_state$misc2 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc2 !== void 0 ? _state$misc2 : {}));
414
+ }), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied3 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied3 !== void 0 ? _customDrawer$applied3 : {}).length > 0 && _objectSpread({}, customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)), (header === null || header === void 0 || (_header$subHeading5 = header.subHeading) === null || _header$subHeading5 === void 0 || (_header$subHeading5 = _header$subHeading5.jsxConfig) === null || _header$subHeading5 === void 0 ? void 0 : _header$subHeading5.type) == "select" ? {
415
+ subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading6 = header.subHeading) === null || _header$subHeading6 === void 0 || (_header$subHeading6 = _header$subHeading6.jsxConfig) === null || _header$subHeading6 === void 0 ? void 0 : _header$subHeading6.value
416
+ } : {}), (_state$misc2 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc2 !== void 0 ? _state$misc2 : {}));
391
417
  if (error) {
392
418
  showErrorNotification(error);
393
419
  dispatch({
394
420
  type: _layoutReducer.actionTypes.SET_TABLE_EMPTY
395
421
  });
396
422
  } else {
423
+ var _config$tables11, _config$tables12;
397
424
  if (staticFilter !== null && staticFilter !== void 0 && staticFilter.visible) {
398
425
  setStaticFilterData(data);
399
426
  }
@@ -401,6 +428,13 @@ function GenricLayOut(_ref) {
401
428
  type: _layoutReducer.actionTypes.SET_TABLE_DATA,
402
429
  payload: data
403
430
  });
431
+ dispatch({
432
+ type: _layoutReducer.actionTypes.SET_PAGINATION,
433
+ payload: {
434
+ current: config === null || config === void 0 || (_config$tables11 = config.tables) === null || _config$tables11 === void 0 || (_config$tables11 = _config$tables11.pagination) === null || _config$tables11 === void 0 ? void 0 : _config$tables11.current,
435
+ pageSize: config === null || config === void 0 || (_config$tables12 = config.tables) === null || _config$tables12 === void 0 || (_config$tables12 = _config$tables12.pagination) === null || _config$tables12 === void 0 ? void 0 : _config$tables12.pageSize
436
+ }
437
+ });
404
438
  }
405
439
  dispatch({
406
440
  type: _layoutReducer.actionTypes.SET_LOADING,
@@ -449,33 +483,32 @@ function GenricLayOut(_ref) {
449
483
  payload: value
450
484
  });
451
485
  if (handleDropdownSearchEnter) {
452
- var _state$tabs5, _tables$pagination7, _tables$pagination8, _tables$sorting7, _tables$sorting8, _tables$filter2, _staticFilter$data2, _customDrawer$applied4, _state$misc3;
486
+ var _state$tabs5, _config$tables13, _config$tables14, _tables$sorting7, _tables$sorting8, _tables$filter2, _staticFilter$data2, _customDrawer$applied4, _header$subHeading7, _header$subHeading8, _state$misc3;
453
487
  const {
454
488
  error,
455
489
  data
456
- } = await handleDropdownSearchEnter(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
490
+ } = await handleDropdownSearchEnter(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
457
491
  searchedValue: value,
458
492
  selectedTab: state === null || state === void 0 || (_state$tabs5 = state.tabs) === null || _state$tabs5 === void 0 ? void 0 : _state$tabs5.active,
459
493
  selectedOption: state === null || state === void 0 ? void 0 : state.dropdownSearch.selectedOption,
460
- current: tables === null || tables === void 0 || (_tables$pagination7 = tables.pagination) === null || _tables$pagination7 === void 0 ? void 0 : _tables$pagination7.current,
461
- pageSize: tables === null || tables === void 0 || (_tables$pagination8 = tables.pagination) === null || _tables$pagination8 === void 0 ? void 0 : _tables$pagination8.pageSize,
494
+ current: config === null || config === void 0 || (_config$tables13 = config.tables) === null || _config$tables13 === void 0 || (_config$tables13 = _config$tables13.pagination) === null || _config$tables13 === void 0 ? void 0 : _config$tables13.current,
495
+ pageSize: config === null || config === void 0 || (_config$tables14 = config.tables) === null || _config$tables14 === void 0 || (_config$tables14 = _config$tables14.pagination) === null || _config$tables14 === void 0 ? void 0 : _config$tables14.pageSize,
462
496
  field: tables === null || tables === void 0 || (_tables$sorting7 = tables.sorting) === null || _tables$sorting7 === void 0 ? void 0 : _tables$sorting7.sortBy,
463
497
  order: tables === null || tables === void 0 || (_tables$sorting8 = tables.sorting) === null || _tables$sorting8 === void 0 ? void 0 : _tables$sorting8.sortDirection
464
498
  }, (tables === null || tables === void 0 || (_tables$filter2 = tables.filter) === null || _tables$filter2 === void 0 ? void 0 : _tables$filter2.key) && {
465
499
  columnFilterStatus: tables === null || tables === void 0 ? void 0 : tables.filter
466
500
  }), (staticFilter === null || staticFilter === void 0 ? void 0 : staticFilter.visible) && ((_staticFilter$data2 = staticFilter.data) === null || _staticFilter$data2 === void 0 || (_staticFilter$data2 = _staticFilter$data2.find(item => item.selected)) === null || _staticFilter$data2 === void 0 ? void 0 : _staticFilter$data2.value) && {
467
501
  staticFilter: staticFilter.data.find(item => item.selected).value
468
- }), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied4 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied4 !== void 0 ? _customDrawer$applied4 : {}).length > 0 && {
469
- filterOn: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.filterBy,
470
- fromDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.fromDate,
471
- toDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.toDate
472
- }), (_state$misc3 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc3 !== void 0 ? _state$misc3 : {}));
502
+ }), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied4 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied4 !== void 0 ? _customDrawer$applied4 : {}).length > 0 && _objectSpread({}, customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)), (header === null || header === void 0 || (_header$subHeading7 = header.subHeading) === null || _header$subHeading7 === void 0 || (_header$subHeading7 = _header$subHeading7.jsxConfig) === null || _header$subHeading7 === void 0 ? void 0 : _header$subHeading7.type) == "select" ? {
503
+ subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading8 = header.subHeading) === null || _header$subHeading8 === void 0 || (_header$subHeading8 = _header$subHeading8.jsxConfig) === null || _header$subHeading8 === void 0 ? void 0 : _header$subHeading8.value
504
+ } : {}), (_state$misc3 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc3 !== void 0 ? _state$misc3 : {}));
473
505
  if (error) {
474
506
  showErrorNotification(error);
475
507
  dispatch({
476
508
  type: _layoutReducer.actionTypes.SET_TABLE_EMPTY
477
509
  });
478
510
  } else {
511
+ var _config$tables15, _config$tables16;
479
512
  if (staticFilter !== null && staticFilter !== void 0 && staticFilter.visible) {
480
513
  setStaticFilterData(data);
481
514
  }
@@ -483,6 +516,13 @@ function GenricLayOut(_ref) {
483
516
  type: _layoutReducer.actionTypes.SET_TABLE_DATA,
484
517
  payload: data
485
518
  });
519
+ dispatch({
520
+ type: _layoutReducer.actionTypes.SET_PAGINATION,
521
+ payload: {
522
+ current: config === null || config === void 0 || (_config$tables15 = config.tables) === null || _config$tables15 === void 0 || (_config$tables15 = _config$tables15.pagination) === null || _config$tables15 === void 0 ? void 0 : _config$tables15.current,
523
+ pageSize: config === null || config === void 0 || (_config$tables16 = config.tables) === null || _config$tables16 === void 0 || (_config$tables16 = _config$tables16.pagination) === null || _config$tables16 === void 0 ? void 0 : _config$tables16.pageSize
524
+ }
525
+ });
486
526
  }
487
527
  }
488
528
  };
@@ -505,7 +545,7 @@ function GenricLayOut(_ref) {
505
545
  payload: option === null || option === void 0 ? void 0 : option.value
506
546
  });
507
547
  if (handleDropdownSearchOptionChange) {
508
- var _tables$pagination9, _tables$pagination10, _staticFilter$data3, _customDrawer$applied5, _state$misc4;
548
+ var _config$tables17, _config$tables18, _staticFilter$data3, _customDrawer$applied5, _header$subHeading9, _header$subHeading10, _state$misc4;
509
549
  dispatch({
510
550
  type: _layoutReducer.actionTypes.SET_LOADING,
511
551
  payload: true
@@ -513,23 +553,22 @@ function GenricLayOut(_ref) {
513
553
  const {
514
554
  error,
515
555
  data
516
- } = await handleDropdownSearchOptionChange(_objectSpread(_objectSpread(_objectSpread({
556
+ } = await handleDropdownSearchOptionChange(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
517
557
  selectedTab: tabs === null || tabs === void 0 ? void 0 : tabs.active,
518
- current: tables === null || tables === void 0 || (_tables$pagination9 = tables.pagination) === null || _tables$pagination9 === void 0 ? void 0 : _tables$pagination9.current,
519
- pageSize: tables === null || tables === void 0 || (_tables$pagination10 = tables.pagination) === null || _tables$pagination10 === void 0 ? void 0 : _tables$pagination10.pageSize
558
+ current: config === null || config === void 0 || (_config$tables17 = config.tables) === null || _config$tables17 === void 0 || (_config$tables17 = _config$tables17.pagination) === null || _config$tables17 === void 0 ? void 0 : _config$tables17.current,
559
+ pageSize: config === null || config === void 0 || (_config$tables18 = config.tables) === null || _config$tables18 === void 0 || (_config$tables18 = _config$tables18.pagination) === null || _config$tables18 === void 0 ? void 0 : _config$tables18.pageSize
520
560
  }, (staticFilter === null || staticFilter === void 0 ? void 0 : staticFilter.visible) && ((_staticFilter$data3 = staticFilter.data) === null || _staticFilter$data3 === void 0 || (_staticFilter$data3 = _staticFilter$data3.find(item => item.selected)) === null || _staticFilter$data3 === void 0 ? void 0 : _staticFilter$data3.value) && {
521
561
  staticFilter: staticFilter.data.find(item => item.selected).value
522
- }), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied5 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied5 !== void 0 ? _customDrawer$applied5 : {}).length > 0 && {
523
- filterOn: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.filterBy,
524
- fromDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.fromDate,
525
- toDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.toDate
526
- }), (_state$misc4 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc4 !== void 0 ? _state$misc4 : {}));
562
+ }), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied5 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied5 !== void 0 ? _customDrawer$applied5 : {}).length > 0 && _objectSpread({}, customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)), (header === null || header === void 0 || (_header$subHeading9 = header.subHeading) === null || _header$subHeading9 === void 0 || (_header$subHeading9 = _header$subHeading9.jsxConfig) === null || _header$subHeading9 === void 0 ? void 0 : _header$subHeading9.type) == "select" ? {
563
+ subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading10 = header.subHeading) === null || _header$subHeading10 === void 0 || (_header$subHeading10 = _header$subHeading10.jsxConfig) === null || _header$subHeading10 === void 0 ? void 0 : _header$subHeading10.value
564
+ } : {}), (_state$misc4 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc4 !== void 0 ? _state$misc4 : {}));
527
565
  if (error) {
528
566
  showErrorNotification(error);
529
567
  dispatch({
530
568
  type: _layoutReducer.actionTypes.SET_TABLE_EMPTY
531
569
  });
532
570
  } else {
571
+ var _config$tables19, _config$tables20;
533
572
  if (staticFilter !== null && staticFilter !== void 0 && staticFilter.visible) {
534
573
  setStaticFilterData(data);
535
574
  }
@@ -537,6 +576,13 @@ function GenricLayOut(_ref) {
537
576
  type: _layoutReducer.actionTypes.SET_TABLE_DATA,
538
577
  payload: data
539
578
  });
579
+ dispatch({
580
+ type: _layoutReducer.actionTypes.SET_PAGINATION,
581
+ payload: {
582
+ current: config === null || config === void 0 || (_config$tables19 = config.tables) === null || _config$tables19 === void 0 || (_config$tables19 = _config$tables19.pagination) === null || _config$tables19 === void 0 ? void 0 : _config$tables19.current,
583
+ pageSize: config === null || config === void 0 || (_config$tables20 = config.tables) === null || _config$tables20 === void 0 || (_config$tables20 = _config$tables20.pagination) === null || _config$tables20 === void 0 ? void 0 : _config$tables20.pageSize
584
+ }
585
+ });
540
586
  if (config !== null && config !== void 0 && config.tabs) {
541
587
  dispatch({
542
588
  type: _layoutReducer.actionTypes.TAB_CLICK,
@@ -615,31 +661,30 @@ function GenricLayOut(_ref) {
615
661
  payload: null
616
662
  });
617
663
  if (handleDropdownSearchClear) {
618
- var _state$tabs6, _tables$pagination11, _tables$pagination12, _tables$sorting9, _tables$sorting10, _tables$filter3, _staticFilter$data4, _customDrawer$applied6, _state$misc5;
664
+ var _state$tabs6, _config$tables21, _config$tables22, _tables$sorting9, _tables$sorting10, _tables$filter3, _staticFilter$data4, _customDrawer$applied6, _header$subHeading11, _header$subHeading12, _state$misc5;
619
665
  const {
620
666
  error,
621
667
  data
622
- } = await handleDropdownSearchClear(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
668
+ } = await handleDropdownSearchClear(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
623
669
  selectedTab: state === null || state === void 0 || (_state$tabs6 = state.tabs) === null || _state$tabs6 === void 0 ? void 0 : _state$tabs6.active,
624
- current: tables === null || tables === void 0 || (_tables$pagination11 = tables.pagination) === null || _tables$pagination11 === void 0 ? void 0 : _tables$pagination11.current,
625
- pageSize: tables === null || tables === void 0 || (_tables$pagination12 = tables.pagination) === null || _tables$pagination12 === void 0 ? void 0 : _tables$pagination12.pageSize,
670
+ current: config === null || config === void 0 || (_config$tables21 = config.tables) === null || _config$tables21 === void 0 || (_config$tables21 = _config$tables21.pagination) === null || _config$tables21 === void 0 ? void 0 : _config$tables21.current,
671
+ pageSize: config === null || config === void 0 || (_config$tables22 = config.tables) === null || _config$tables22 === void 0 || (_config$tables22 = _config$tables22.pagination) === null || _config$tables22 === void 0 ? void 0 : _config$tables22.pageSize,
626
672
  field: tables === null || tables === void 0 || (_tables$sorting9 = tables.sorting) === null || _tables$sorting9 === void 0 ? void 0 : _tables$sorting9.sortBy,
627
673
  order: tables === null || tables === void 0 || (_tables$sorting10 = tables.sorting) === null || _tables$sorting10 === void 0 ? void 0 : _tables$sorting10.sortDirection
628
674
  }, (tables === null || tables === void 0 || (_tables$filter3 = tables.filter) === null || _tables$filter3 === void 0 ? void 0 : _tables$filter3.key) && {
629
675
  columnFilterStatus: tables === null || tables === void 0 ? void 0 : tables.filter
630
676
  }), (staticFilter === null || staticFilter === void 0 ? void 0 : staticFilter.visible) && ((_staticFilter$data4 = staticFilter.data) === null || _staticFilter$data4 === void 0 || (_staticFilter$data4 = _staticFilter$data4.find(item => item.selected)) === null || _staticFilter$data4 === void 0 ? void 0 : _staticFilter$data4.value) && {
631
677
  staticFilter: staticFilter.data.find(item => item.selected).value
632
- }), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied6 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied6 !== void 0 ? _customDrawer$applied6 : {}).length > 0 && {
633
- filterOn: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.filterBy,
634
- fromDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.fromDate,
635
- toDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.toDate
636
- }), (_state$misc5 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc5 !== void 0 ? _state$misc5 : {}));
678
+ }), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied6 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied6 !== void 0 ? _customDrawer$applied6 : {}).length > 0 && _objectSpread({}, customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)), (header === null || header === void 0 || (_header$subHeading11 = header.subHeading) === null || _header$subHeading11 === void 0 || (_header$subHeading11 = _header$subHeading11.jsxConfig) === null || _header$subHeading11 === void 0 ? void 0 : _header$subHeading11.type) == "select" ? {
679
+ subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading12 = header.subHeading) === null || _header$subHeading12 === void 0 || (_header$subHeading12 = _header$subHeading12.jsxConfig) === null || _header$subHeading12 === void 0 ? void 0 : _header$subHeading12.value
680
+ } : {}), (_state$misc5 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc5 !== void 0 ? _state$misc5 : {}));
637
681
  if (error) {
638
682
  showErrorNotification(error);
639
683
  dispatch({
640
684
  type: _layoutReducer.actionTypes.SET_TABLE_EMPTY
641
685
  });
642
686
  } else {
687
+ var _config$tables23, _config$tables24;
643
688
  if (staticFilter !== null && staticFilter !== void 0 && staticFilter.visible) {
644
689
  setStaticFilterData(data);
645
690
  }
@@ -647,6 +692,13 @@ function GenricLayOut(_ref) {
647
692
  type: _layoutReducer.actionTypes.SET_TABLE_DATA,
648
693
  payload: data
649
694
  });
695
+ dispatch({
696
+ type: _layoutReducer.actionTypes.SET_PAGINATION,
697
+ payload: {
698
+ current: config === null || config === void 0 || (_config$tables23 = config.tables) === null || _config$tables23 === void 0 || (_config$tables23 = _config$tables23.pagination) === null || _config$tables23 === void 0 ? void 0 : _config$tables23.current,
699
+ pageSize: config === null || config === void 0 || (_config$tables24 = config.tables) === null || _config$tables24 === void 0 || (_config$tables24 = _config$tables24.pagination) === null || _config$tables24 === void 0 ? void 0 : _config$tables24.pageSize
700
+ }
701
+ });
650
702
  }
651
703
  }
652
704
  };
@@ -671,30 +723,27 @@ function GenricLayOut(_ref) {
671
723
  payload: null
672
724
  });
673
725
  if (handleInputSearchClear) {
674
- var _state$tabs7, _tables$pagination13, _tables$pagination14, _tables$sorting11, _tables$sorting12, _customDrawer$applied7, _header$subHeading5, _header$subHeading6;
726
+ var _state$tabs7, _config$tables25, _config$tables26, _tables$sorting11, _tables$sorting12, _customDrawer$applied7, _header$subHeading13, _header$subHeading14, _state$misc6;
675
727
  const {
676
728
  error,
677
729
  data
678
- } = await handleInputSearchClear(_objectSpread(_objectSpread(_objectSpread({}, state !== null && state !== void 0 && (_state$tabs7 = state.tabs) !== null && _state$tabs7 !== void 0 && _state$tabs7.active ? {
730
+ } = await handleInputSearchClear(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, state !== null && state !== void 0 && (_state$tabs7 = state.tabs) !== null && _state$tabs7 !== void 0 && _state$tabs7.active ? {
679
731
  selectedTab: state.tabs.active
680
732
  } : {}), {}, {
681
- current: tables === null || tables === void 0 || (_tables$pagination13 = tables.pagination) === null || _tables$pagination13 === void 0 ? void 0 : _tables$pagination13.current,
682
- pageSize: tables === null || tables === void 0 || (_tables$pagination14 = tables.pagination) === null || _tables$pagination14 === void 0 ? void 0 : _tables$pagination14.pageSize,
733
+ current: config === null || config === void 0 || (_config$tables25 = config.tables) === null || _config$tables25 === void 0 || (_config$tables25 = _config$tables25.pagination) === null || _config$tables25 === void 0 ? void 0 : _config$tables25.current,
734
+ pageSize: config === null || config === void 0 || (_config$tables26 = config.tables) === null || _config$tables26 === void 0 || (_config$tables26 = _config$tables26.pagination) === null || _config$tables26 === void 0 ? void 0 : _config$tables26.pageSize,
683
735
  field: tables === null || tables === void 0 || (_tables$sorting11 = tables.sorting) === null || _tables$sorting11 === void 0 ? void 0 : _tables$sorting11.sortBy,
684
736
  order: tables === null || tables === void 0 || (_tables$sorting12 = tables.sorting) === null || _tables$sorting12 === void 0 ? void 0 : _tables$sorting12.sortDirection
685
- }, (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied7 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied7 !== void 0 ? _customDrawer$applied7 : {}).length > 0 && {
686
- filterOn: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.filterBy,
687
- fromDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.fromDate,
688
- toDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.toDate
689
- }), (header === null || header === void 0 || (_header$subHeading5 = header.subHeading) === null || _header$subHeading5 === void 0 || (_header$subHeading5 = _header$subHeading5.jsxConfig) === null || _header$subHeading5 === void 0 ? void 0 : _header$subHeading5.type) == "select" ? {
690
- subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading6 = header.subHeading) === null || _header$subHeading6 === void 0 || (_header$subHeading6 = _header$subHeading6.jsxConfig) === null || _header$subHeading6 === void 0 ? void 0 : _header$subHeading6.value
691
- } : {}));
737
+ }, (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied7 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied7 !== void 0 ? _customDrawer$applied7 : {}).length > 0 && _objectSpread({}, customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)), (header === null || header === void 0 || (_header$subHeading13 = header.subHeading) === null || _header$subHeading13 === void 0 || (_header$subHeading13 = _header$subHeading13.jsxConfig) === null || _header$subHeading13 === void 0 ? void 0 : _header$subHeading13.type) == "select" ? {
738
+ subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading14 = header.subHeading) === null || _header$subHeading14 === void 0 || (_header$subHeading14 = _header$subHeading14.jsxConfig) === null || _header$subHeading14 === void 0 ? void 0 : _header$subHeading14.value
739
+ } : {}), (_state$misc6 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc6 !== void 0 ? _state$misc6 : {}));
692
740
  if (error) {
693
741
  showErrorNotification(error);
694
742
  dispatch({
695
743
  type: _layoutReducer.actionTypes.SET_TABLE_EMPTY
696
744
  });
697
745
  } else {
746
+ var _config$tables27, _config$tables28;
698
747
  if (staticFilter !== null && staticFilter !== void 0 && staticFilter.visible) {
699
748
  setStaticFilterData(data);
700
749
  }
@@ -702,6 +751,13 @@ function GenricLayOut(_ref) {
702
751
  type: _layoutReducer.actionTypes.SET_TABLE_DATA,
703
752
  payload: data
704
753
  });
754
+ dispatch({
755
+ type: _layoutReducer.actionTypes.SET_PAGINATION,
756
+ payload: {
757
+ current: config === null || config === void 0 || (_config$tables27 = config.tables) === null || _config$tables27 === void 0 || (_config$tables27 = _config$tables27.pagination) === null || _config$tables27 === void 0 ? void 0 : _config$tables27.current,
758
+ pageSize: config === null || config === void 0 || (_config$tables28 = config.tables) === null || _config$tables28 === void 0 || (_config$tables28 = _config$tables28.pagination) === null || _config$tables28 === void 0 ? void 0 : _config$tables28.pageSize
759
+ }
760
+ });
705
761
  }
706
762
  }
707
763
  };
@@ -734,14 +790,14 @@ function GenricLayOut(_ref) {
734
790
  if ((configArgs === null || configArgs === void 0 ? void 0 : configArgs.action) === "OPEN_DRAWER_AND_FETCH") {
735
791
  const selectkey = optKey || (configArgs === null || configArgs === void 0 ? void 0 : configArgs.key);
736
792
  if (handleTableColumnClick) {
737
- var _state$misc6;
793
+ var _state$misc7;
738
794
  const {
739
795
  error,
740
796
  data
741
797
  } = await (handleTableColumnClick === null || handleTableColumnClick === void 0 ? void 0 : handleTableColumnClick(_objectSpread({
742
798
  record: record,
743
799
  type: configArgs === null || configArgs === void 0 ? void 0 : configArgs.call
744
- }, (_state$misc6 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc6 !== void 0 ? _state$misc6 : {})));
800
+ }, (_state$misc7 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc7 !== void 0 ? _state$misc7 : {})));
745
801
  if (error) {
746
802
  showErrorNotification(error);
747
803
  } else {
@@ -874,9 +930,9 @@ function GenricLayOut(_ref) {
874
930
  * If an error occurs during any action, an error notification is shown.
875
931
  */
876
932
  const customTableSelectFooterClick = async configData => {
877
- var _state$modal;
878
- const modalContent = state === null || state === void 0 || (_state$modal = state.modal) === null || _state$modal === void 0 ? void 0 : _state$modal.modalContent;
879
933
  if ((configData === null || configData === void 0 ? void 0 : configData.action) === "OPEN_MODAL") {
934
+ var _state$modal;
935
+ const modalContent = state === null || state === void 0 || (_state$modal = state.modal) === null || _state$modal === void 0 ? void 0 : _state$modal.modalContent;
880
936
  if (handleModalDataSet) {
881
937
  const {
882
938
  error,
@@ -898,6 +954,44 @@ function GenricLayOut(_ref) {
898
954
  });
899
955
  }
900
956
  }
957
+ } else if ((configData === null || configData === void 0 ? void 0 : configData.action) === "CALL_API") {
958
+ if (handleTableFooterApi) {
959
+ const {
960
+ error,
961
+ data
962
+ } = await (handleTableFooterApi === null || handleTableFooterApi === void 0 ? void 0 : handleTableFooterApi(state));
963
+ if (error) {
964
+ showErrorNotification(error);
965
+ } else {
966
+ const updatedModalContent = (0, _staticConfigResolver.default)(config === null || config === void 0 ? void 0 : config.modal, data);
967
+ dispatch({
968
+ type: _layoutReducer.actionTypes.SET_MODAL,
969
+ payload: {
970
+ modalData: updatedModalContent
971
+ }
972
+ });
973
+ dispatch({
974
+ type: _layoutReducer.actionTypes.TOGGLE_MODAL,
975
+ payload: true
976
+ });
977
+ }
978
+ }
979
+ } else if ((configData === null || configData === void 0 ? void 0 : configData.action) === "ACTION_ON_CTA") {
980
+ console.log("here");
981
+ console.log(state, "statedata");
982
+ if (handleTableFooterApi) {
983
+ var _state$tables2;
984
+ const {
985
+ error,
986
+ data
987
+ } = await (handleTableFooterApi === null || handleTableFooterApi === void 0 ? void 0 : handleTableFooterApi(state === null || state === void 0 || (_state$tables2 = state.tables) === null || _state$tables2 === void 0 ? void 0 : _state$tables2.selectedRowKeys, state));
988
+ if (error) {
989
+ showErrorNotification(error);
990
+ } else {
991
+ showSuccessNotification(data);
992
+ }
993
+ init();
994
+ }
901
995
  }
902
996
  };
903
997
 
@@ -988,7 +1082,7 @@ function GenricLayOut(_ref) {
988
1082
  }
989
1083
  });
990
1084
  if (handleTableChange) {
991
- var _state$dropdownSearch3, _state$inputSearch4, _state$tabs9, _header$subHeading7, _header$subHeading8, _staticFilter$data5, _customDrawer$applied8, _state$misc7;
1085
+ var _state$dropdownSearch3, _state$inputSearch4, _state$tabs9, _header$subHeading15, _header$subHeading16, _staticFilter$data5, _customDrawer$applied8, _state$misc8;
992
1086
  dispatch({
993
1087
  type: _layoutReducer.actionTypes.SET_LOADING,
994
1088
  payload: true
@@ -1007,17 +1101,13 @@ function GenricLayOut(_ref) {
1007
1101
  pageSize: pageSize,
1008
1102
  columnFilterStatus: _f,
1009
1103
  field: sorter === null || sorter === void 0 ? void 0 : sorter.columnKey
1010
- }, (header === null || header === void 0 || (_header$subHeading7 = header.subHeading) === null || _header$subHeading7 === void 0 || (_header$subHeading7 = _header$subHeading7.jsxConfig) === null || _header$subHeading7 === void 0 ? void 0 : _header$subHeading7.type) == "select" ? {
1011
- subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading8 = header.subHeading) === null || _header$subHeading8 === void 0 || (_header$subHeading8 = _header$subHeading8.jsxConfig) === null || _header$subHeading8 === void 0 ? void 0 : _header$subHeading8.value
1104
+ }, (header === null || header === void 0 || (_header$subHeading15 = header.subHeading) === null || _header$subHeading15 === void 0 || (_header$subHeading15 = _header$subHeading15.jsxConfig) === null || _header$subHeading15 === void 0 ? void 0 : _header$subHeading15.type) == "select" ? {
1105
+ subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading16 = header.subHeading) === null || _header$subHeading16 === void 0 || (_header$subHeading16 = _header$subHeading16.jsxConfig) === null || _header$subHeading16 === void 0 ? void 0 : _header$subHeading16.value
1012
1106
  } : {}), (staticFilter === null || staticFilter === void 0 ? void 0 : staticFilter.visible) && ((_staticFilter$data5 = staticFilter.data) === null || _staticFilter$data5 === void 0 || (_staticFilter$data5 = _staticFilter$data5.find(item => item.selected)) === null || _staticFilter$data5 === void 0 ? void 0 : _staticFilter$data5.value) && {
1013
1107
  staticFilter: staticFilter.data.find(item => item.selected).value
1014
- }), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied8 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied8 !== void 0 ? _customDrawer$applied8 : {}).length > 0 && {
1015
- filterOn: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.filterBy,
1016
- fromDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.fromDate,
1017
- toDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.toDate
1018
- }), {}, {
1108
+ }), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied8 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied8 !== void 0 ? _customDrawer$applied8 : {}).length > 0 && _objectSpread({}, customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)), {}, {
1019
1109
  order: (sorter === null || sorter === void 0 ? void 0 : sorter.order) === "ascend" && "ASC" || (sorter === null || sorter === void 0 ? void 0 : sorter.order) === "descend" && "DESC" || ""
1020
- }, (_state$misc7 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc7 !== void 0 ? _state$misc7 : {}));
1110
+ }, (_state$misc8 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc8 !== void 0 ? _state$misc8 : {}));
1021
1111
  if (error) {
1022
1112
  showErrorNotification(error);
1023
1113
  dispatch({
@@ -1098,7 +1188,7 @@ function GenricLayOut(_ref) {
1098
1188
  });
1099
1189
  const selectedStaticFilterValue = tables !== null && tables !== void 0 && tables.staticFilterKey && (tables === null || tables === void 0 ? void 0 : tables.staticFilterKey) == key && Array.isArray(staticFilter.data) ? (_staticFilter$data$fi2 = staticFilter.data.find(item => item.selected)) === null || _staticFilter$data$fi2 === void 0 ? void 0 : _staticFilter$data$fi2.value : undefined;
1100
1190
  if (handleTabClick) {
1101
- var _state$misc8, _tables$pagination15, _tables$pagination16, _tables$sorting13, _tables$sorting14, _state$dropdownSearch4, _customDrawer$applied9;
1191
+ var _state$misc9, _tables$pagination, _tables$pagination2, _tables$sorting13, _tables$sorting14, _state$dropdownSearch4, _header$subHeading17, _header$subHeading18, _customDrawer$applied9, _state$misc10;
1102
1192
  dispatch({
1103
1193
  type: _layoutReducer.actionTypes.SET_LOADING,
1104
1194
  payload: true
@@ -1106,10 +1196,10 @@ function GenricLayOut(_ref) {
1106
1196
  const {
1107
1197
  error,
1108
1198
  data
1109
- } = await handleTabClick(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, (_state$misc8 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc8 !== void 0 ? _state$misc8 : {}), {}, {
1199
+ } = await handleTabClick(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, (_state$misc9 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc9 !== void 0 ? _state$misc9 : {}), {}, {
1110
1200
  selectedTab: key,
1111
- current: tables === null || tables === void 0 || (_tables$pagination15 = tables.pagination) === null || _tables$pagination15 === void 0 ? void 0 : _tables$pagination15.current,
1112
- pageSize: tables === null || tables === void 0 || (_tables$pagination16 = tables.pagination) === null || _tables$pagination16 === void 0 ? void 0 : _tables$pagination16.pageSize,
1201
+ current: tables === null || tables === void 0 || (_tables$pagination = tables.pagination) === null || _tables$pagination === void 0 ? void 0 : _tables$pagination.current,
1202
+ pageSize: tables === null || tables === void 0 || (_tables$pagination2 = tables.pagination) === null || _tables$pagination2 === void 0 ? void 0 : _tables$pagination2.pageSize,
1113
1203
  field: tables === null || tables === void 0 || (_tables$sorting13 = tables.sorting) === null || _tables$sorting13 === void 0 ? void 0 : _tables$sorting13.sortBy
1114
1204
  }, selectedStaticFilterValue && {
1115
1205
  staticFilter: selectedStaticFilterValue
@@ -1118,11 +1208,9 @@ function GenricLayOut(_ref) {
1118
1208
  }, (state === null || state === void 0 || (_state$dropdownSearch4 = state.dropdownSearch) === null || _state$dropdownSearch4 === void 0 || (_state$dropdownSearch4 = _state$dropdownSearch4.value) === null || _state$dropdownSearch4 === void 0 ? void 0 : _state$dropdownSearch4.trim()) && {
1119
1209
  searchedValue: state.dropdownSearch.value,
1120
1210
  selectedOption: state.dropdownSearch.selectedOption
1121
- }), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied9 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied9 !== void 0 ? _customDrawer$applied9 : {}).length > 0 && {
1122
- filterOn: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.filterBy,
1123
- fromDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.fromDate,
1124
- toDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.toDate
1125
- }));
1211
+ }), (header === null || header === void 0 || (_header$subHeading17 = header.subHeading) === null || _header$subHeading17 === void 0 || (_header$subHeading17 = _header$subHeading17.jsxConfig) === null || _header$subHeading17 === void 0 ? void 0 : _header$subHeading17.type) == "select" ? {
1212
+ subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading18 = header.subHeading) === null || _header$subHeading18 === void 0 || (_header$subHeading18 = _header$subHeading18.jsxConfig) === null || _header$subHeading18 === void 0 ? void 0 : _header$subHeading18.value
1213
+ } : {}), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied9 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied9 !== void 0 ? _customDrawer$applied9 : {}).length > 0 && _objectSpread({}, customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)), (_state$misc10 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc10 !== void 0 ? _state$misc10 : {}));
1126
1214
  if (error) {
1127
1215
  showErrorNotification(error);
1128
1216
  dispatch({
@@ -1216,11 +1304,11 @@ function GenricLayOut(_ref) {
1216
1304
  return;
1217
1305
  }
1218
1306
  if (handleDrawerFormOnFinish) {
1219
- var _state$misc9;
1307
+ var _state$misc11;
1220
1308
  const {
1221
1309
  error,
1222
1310
  data
1223
- } = await (handleDrawerFormOnFinish === null || handleDrawerFormOnFinish === void 0 ? void 0 : handleDrawerFormOnFinish(_objectSpread(_objectSpread(_objectSpread({}, record), formData), (_state$misc9 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc9 !== void 0 ? _state$misc9 : {})));
1311
+ } = await (handleDrawerFormOnFinish === null || handleDrawerFormOnFinish === void 0 ? void 0 : handleDrawerFormOnFinish(_objectSpread(_objectSpread(_objectSpread({}, record), formData), (_state$misc11 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc11 !== void 0 ? _state$misc11 : {})));
1224
1312
  if (error) {
1225
1313
  showErrorNotification(error);
1226
1314
  } else {
@@ -1244,7 +1332,7 @@ function GenricLayOut(_ref) {
1244
1332
 
1245
1333
  // If there are remaining filters, reapply them
1246
1334
  if (Object.keys(currentFilters).length > 0) {
1247
- var _state$dropdownSearch5, _state$inputSearch5, _state$tabs12, _tables$pagination17, _tables$pagination18, _tables$filter6, _tables$sorting15, _header$subHeading9, _header$subHeading10, _staticFilter$data6, _tables$sorting16, _state$misc10;
1335
+ var _state$dropdownSearch5, _state$inputSearch5, _state$tabs12, _tables$pagination3, _tables$pagination4, _tables$filter6, _tables$sorting15, _header$subHeading19, _header$subHeading20, _staticFilter$data6, _tables$sorting16, _state$misc12;
1248
1336
  const {
1249
1337
  error,
1250
1338
  data
@@ -1258,19 +1346,19 @@ function GenricLayOut(_ref) {
1258
1346
  fromDate: currentFilters === null || currentFilters === void 0 ? void 0 : currentFilters.fromDate,
1259
1347
  toDate: currentFilters === null || currentFilters === void 0 ? void 0 : currentFilters.toDate,
1260
1348
  selectedTab: state === null || state === void 0 || (_state$tabs12 = state.tabs) === null || _state$tabs12 === void 0 ? void 0 : _state$tabs12.active,
1261
- current: tables === null || tables === void 0 || (_tables$pagination17 = tables.pagination) === null || _tables$pagination17 === void 0 ? void 0 : _tables$pagination17.current,
1262
- pageSize: tables === null || tables === void 0 || (_tables$pagination18 = tables.pagination) === null || _tables$pagination18 === void 0 ? void 0 : _tables$pagination18.pageSize
1349
+ current: tables === null || tables === void 0 || (_tables$pagination3 = tables.pagination) === null || _tables$pagination3 === void 0 ? void 0 : _tables$pagination3.current,
1350
+ pageSize: tables === null || tables === void 0 || (_tables$pagination4 = tables.pagination) === null || _tables$pagination4 === void 0 ? void 0 : _tables$pagination4.pageSize
1263
1351
  }, (tables === null || tables === void 0 || (_tables$filter6 = tables.filter) === null || _tables$filter6 === void 0 ? void 0 : _tables$filter6.key) && {
1264
1352
  columnFilterStatus: tables === null || tables === void 0 ? void 0 : tables.filter
1265
1353
  }), {}, {
1266
1354
  field: tables === null || tables === void 0 || (_tables$sorting15 = tables.sorting) === null || _tables$sorting15 === void 0 ? void 0 : _tables$sorting15.sortBy
1267
- }, (header === null || header === void 0 || (_header$subHeading9 = header.subHeading) === null || _header$subHeading9 === void 0 || (_header$subHeading9 = _header$subHeading9.jsxConfig) === null || _header$subHeading9 === void 0 ? void 0 : _header$subHeading9.type) == "select" ? {
1268
- subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading10 = header.subHeading) === null || _header$subHeading10 === void 0 || (_header$subHeading10 = _header$subHeading10.jsxConfig) === null || _header$subHeading10 === void 0 ? void 0 : _header$subHeading10.value
1355
+ }, (header === null || header === void 0 || (_header$subHeading19 = header.subHeading) === null || _header$subHeading19 === void 0 || (_header$subHeading19 = _header$subHeading19.jsxConfig) === null || _header$subHeading19 === void 0 ? void 0 : _header$subHeading19.type) == "select" ? {
1356
+ subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading20 = header.subHeading) === null || _header$subHeading20 === void 0 || (_header$subHeading20 = _header$subHeading20.jsxConfig) === null || _header$subHeading20 === void 0 ? void 0 : _header$subHeading20.value
1269
1357
  } : {}), (staticFilter === null || staticFilter === void 0 ? void 0 : staticFilter.visible) && ((_staticFilter$data6 = staticFilter.data) === null || _staticFilter$data6 === void 0 || (_staticFilter$data6 = _staticFilter$data6.find(item => item.selected)) === null || _staticFilter$data6 === void 0 ? void 0 : _staticFilter$data6.value) && {
1270
1358
  staticFilter: staticFilter.data.find(item => item.selected).value
1271
1359
  }), {}, {
1272
1360
  order: tables === null || tables === void 0 || (_tables$sorting16 = tables.sorting) === null || _tables$sorting16 === void 0 ? void 0 : _tables$sorting16.sortDirection
1273
- }, (_state$misc10 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc10 !== void 0 ? _state$misc10 : {}));
1361
+ }, (_state$misc12 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc12 !== void 0 ? _state$misc12 : {}));
1274
1362
  if (error) {
1275
1363
  showErrorNotification(error);
1276
1364
  dispatch({
@@ -1302,7 +1390,13 @@ function GenricLayOut(_ref) {
1302
1390
  const filterFormOnFinish = async formData => {
1303
1391
  // Check if this is a cancel/clear action - check both buttonClickType and the actual button data
1304
1392
  if (formData.type === "FILTER-CANCEL") {
1305
- var _state$dropdownSearch6, _state$inputSearch6, _state$tabs13, _tables$pagination19, _tables$pagination20, _tables$filter7, _tables$sorting17, _header$subHeading11, _header$subHeading12, _staticFilter$data7, _tables$sorting18, _state$misc11;
1393
+ var _state$dropdownSearch6, _state$inputSearch6, _state$tabs13, _tables$pagination5, _tables$pagination6, _tables$filter7, _tables$sorting17, _header$subHeading21, _header$subHeading22, _staticFilter$data7, _tables$sorting18, _state$misc13;
1394
+ if (isFiltersEmpty(customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)) {
1395
+ dispatch({
1396
+ type: _layoutReducer.actionTypes.CUSTOM_DRAWER_CLOSED
1397
+ });
1398
+ return;
1399
+ }
1306
1400
  const {
1307
1401
  error,
1308
1402
  data
@@ -1313,19 +1407,19 @@ function GenricLayOut(_ref) {
1313
1407
  searchedValue: state.inputSearch.value
1314
1408
  }), {}, {
1315
1409
  selectedTab: state === null || state === void 0 || (_state$tabs13 = state.tabs) === null || _state$tabs13 === void 0 ? void 0 : _state$tabs13.active,
1316
- current: tables === null || tables === void 0 || (_tables$pagination19 = tables.pagination) === null || _tables$pagination19 === void 0 ? void 0 : _tables$pagination19.current,
1317
- pageSize: tables === null || tables === void 0 || (_tables$pagination20 = tables.pagination) === null || _tables$pagination20 === void 0 ? void 0 : _tables$pagination20.pageSize
1410
+ current: tables === null || tables === void 0 || (_tables$pagination5 = tables.pagination) === null || _tables$pagination5 === void 0 ? void 0 : _tables$pagination5.current,
1411
+ pageSize: tables === null || tables === void 0 || (_tables$pagination6 = tables.pagination) === null || _tables$pagination6 === void 0 ? void 0 : _tables$pagination6.pageSize
1318
1412
  }, (tables === null || tables === void 0 || (_tables$filter7 = tables.filter) === null || _tables$filter7 === void 0 ? void 0 : _tables$filter7.key) && {
1319
1413
  columnFilterStatus: tables === null || tables === void 0 ? void 0 : tables.filter
1320
1414
  }), {}, {
1321
1415
  field: tables === null || tables === void 0 || (_tables$sorting17 = tables.sorting) === null || _tables$sorting17 === void 0 ? void 0 : _tables$sorting17.sortBy
1322
- }, (header === null || header === void 0 || (_header$subHeading11 = header.subHeading) === null || _header$subHeading11 === void 0 || (_header$subHeading11 = _header$subHeading11.jsxConfig) === null || _header$subHeading11 === void 0 ? void 0 : _header$subHeading11.type) == "select" ? {
1323
- subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading12 = header.subHeading) === null || _header$subHeading12 === void 0 || (_header$subHeading12 = _header$subHeading12.jsxConfig) === null || _header$subHeading12 === void 0 ? void 0 : _header$subHeading12.value
1416
+ }, (header === null || header === void 0 || (_header$subHeading21 = header.subHeading) === null || _header$subHeading21 === void 0 || (_header$subHeading21 = _header$subHeading21.jsxConfig) === null || _header$subHeading21 === void 0 ? void 0 : _header$subHeading21.type) == "select" ? {
1417
+ subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading22 = header.subHeading) === null || _header$subHeading22 === void 0 || (_header$subHeading22 = _header$subHeading22.jsxConfig) === null || _header$subHeading22 === void 0 ? void 0 : _header$subHeading22.value
1324
1418
  } : {}), (staticFilter === null || staticFilter === void 0 ? void 0 : staticFilter.visible) && ((_staticFilter$data7 = staticFilter.data) === null || _staticFilter$data7 === void 0 || (_staticFilter$data7 = _staticFilter$data7.find(item => item.selected)) === null || _staticFilter$data7 === void 0 ? void 0 : _staticFilter$data7.value) && {
1325
1419
  staticFilter: staticFilter.data.find(item => item.selected).value
1326
1420
  }), {}, {
1327
1421
  order: tables === null || tables === void 0 || (_tables$sorting18 = tables.sorting) === null || _tables$sorting18 === void 0 ? void 0 : _tables$sorting18.sortDirection
1328
- }, (_state$misc11 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc11 !== void 0 ? _state$misc11 : {}));
1422
+ }, (_state$misc13 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc13 !== void 0 ? _state$misc13 : {}));
1329
1423
  if (error) {
1330
1424
  showErrorNotification(error);
1331
1425
  dispatch({
@@ -1372,8 +1466,8 @@ function GenricLayOut(_ref) {
1372
1466
  }
1373
1467
 
1374
1468
  // Only process filter data if this is actually a filter drawer
1375
- if (formData.drawerKey === "filterData") {
1376
- var _state$dropdownSearch7, _state$inputSearch7, _ref4, _appliedFilters$filte, _state$tabs14, _tables$pagination21, _tables$pagination22, _tables$filter8, _tables$sorting19, _header$subHeading13, _header$subHeading14, _staticFilter$data8, _tables$sorting20, _state$misc12;
1469
+ if (formData.type === "FILTER-SUBMIT") {
1470
+ var _state$dropdownSearch7, _state$inputSearch7, _ref4, _appliedFilters$filte, _state$tabs14, _config$tables29, _config$tables30, _tables$filter8, _tables$sorting19, _header$subHeading23, _header$subHeading24, _staticFilter$data8, _tables$sorting20, _state$misc14;
1377
1471
  const appliedFilters = {};
1378
1472
  Object.keys(formData).forEach(key => {
1379
1473
  const value = formData[key];
@@ -1381,38 +1475,45 @@ function GenricLayOut(_ref) {
1381
1475
  appliedFilters[key] = value;
1382
1476
  }
1383
1477
  });
1478
+ if (isFiltersEmpty(appliedFilters)) {
1479
+ dispatch({
1480
+ type: _layoutReducer.actionTypes.CUSTOM_DRAWER_CLOSED
1481
+ });
1482
+ return;
1483
+ }
1384
1484
  const {
1385
1485
  error,
1386
1486
  data
1387
- } = await handleTableChange(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, (state === null || state === void 0 || (_state$dropdownSearch7 = state.dropdownSearch) === null || _state$dropdownSearch7 === void 0 || (_state$dropdownSearch7 = _state$dropdownSearch7.value) === null || _state$dropdownSearch7 === void 0 ? void 0 : _state$dropdownSearch7.trim()) && {
1487
+ } = await handleTableChange(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, (state === null || state === void 0 || (_state$dropdownSearch7 = state.dropdownSearch) === null || _state$dropdownSearch7 === void 0 || (_state$dropdownSearch7 = _state$dropdownSearch7.value) === null || _state$dropdownSearch7 === void 0 ? void 0 : _state$dropdownSearch7.trim()) && {
1388
1488
  searchedValue: state.dropdownSearch.value,
1389
1489
  selectedOption: state.dropdownSearch.selectedOption
1390
1490
  }), (state === null || state === void 0 || (_state$inputSearch7 = state.inputSearch) === null || _state$inputSearch7 === void 0 || (_state$inputSearch7 = _state$inputSearch7.value) === null || _state$inputSearch7 === void 0 ? void 0 : _state$inputSearch7.trim()) && {
1391
1491
  searchedValue: state.inputSearch.value
1392
- }), {}, {
1492
+ }), appliedFilters), {}, {
1393
1493
  filterOn: (_ref4 = (_appliedFilters$filte = appliedFilters === null || appliedFilters === void 0 ? void 0 : appliedFilters.filterBy) !== null && _appliedFilters$filte !== void 0 ? _appliedFilters$filte : customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.defaultAppliedFilter) !== null && _ref4 !== void 0 ? _ref4 : "",
1394
1494
  fromDate: appliedFilters === null || appliedFilters === void 0 ? void 0 : appliedFilters.fromDate,
1395
1495
  toDate: appliedFilters === null || appliedFilters === void 0 ? void 0 : appliedFilters.toDate,
1396
1496
  selectedTab: state === null || state === void 0 || (_state$tabs14 = state.tabs) === null || _state$tabs14 === void 0 ? void 0 : _state$tabs14.active,
1397
- current: tables === null || tables === void 0 || (_tables$pagination21 = tables.pagination) === null || _tables$pagination21 === void 0 ? void 0 : _tables$pagination21.current,
1398
- pageSize: tables === null || tables === void 0 || (_tables$pagination22 = tables.pagination) === null || _tables$pagination22 === void 0 ? void 0 : _tables$pagination22.pageSize
1497
+ current: config === null || config === void 0 || (_config$tables29 = config.tables) === null || _config$tables29 === void 0 || (_config$tables29 = _config$tables29.pagination) === null || _config$tables29 === void 0 ? void 0 : _config$tables29.current,
1498
+ pageSize: config === null || config === void 0 || (_config$tables30 = config.tables) === null || _config$tables30 === void 0 || (_config$tables30 = _config$tables30.pagination) === null || _config$tables30 === void 0 ? void 0 : _config$tables30.pageSize
1399
1499
  }, (tables === null || tables === void 0 || (_tables$filter8 = tables.filter) === null || _tables$filter8 === void 0 ? void 0 : _tables$filter8.key) && {
1400
1500
  columnFilterStatus: tables === null || tables === void 0 ? void 0 : tables.filter
1401
1501
  }), {}, {
1402
1502
  field: tables === null || tables === void 0 || (_tables$sorting19 = tables.sorting) === null || _tables$sorting19 === void 0 ? void 0 : _tables$sorting19.sortBy
1403
- }, (header === null || header === void 0 || (_header$subHeading13 = header.subHeading) === null || _header$subHeading13 === void 0 || (_header$subHeading13 = _header$subHeading13.jsxConfig) === null || _header$subHeading13 === void 0 ? void 0 : _header$subHeading13.type) == "select" ? {
1404
- subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading14 = header.subHeading) === null || _header$subHeading14 === void 0 || (_header$subHeading14 = _header$subHeading14.jsxConfig) === null || _header$subHeading14 === void 0 ? void 0 : _header$subHeading14.value
1503
+ }, (header === null || header === void 0 || (_header$subHeading23 = header.subHeading) === null || _header$subHeading23 === void 0 || (_header$subHeading23 = _header$subHeading23.jsxConfig) === null || _header$subHeading23 === void 0 ? void 0 : _header$subHeading23.type) == "select" ? {
1504
+ subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading24 = header.subHeading) === null || _header$subHeading24 === void 0 || (_header$subHeading24 = _header$subHeading24.jsxConfig) === null || _header$subHeading24 === void 0 ? void 0 : _header$subHeading24.value
1405
1505
  } : {}), (staticFilter === null || staticFilter === void 0 ? void 0 : staticFilter.visible) && ((_staticFilter$data8 = staticFilter.data) === null || _staticFilter$data8 === void 0 || (_staticFilter$data8 = _staticFilter$data8.find(item => item.selected)) === null || _staticFilter$data8 === void 0 ? void 0 : _staticFilter$data8.value) && {
1406
1506
  staticFilter: staticFilter.data.find(item => item.selected).value
1407
1507
  }), {}, {
1408
1508
  order: tables === null || tables === void 0 || (_tables$sorting20 = tables.sorting) === null || _tables$sorting20 === void 0 ? void 0 : _tables$sorting20.sortDirection
1409
- }, (_state$misc12 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc12 !== void 0 ? _state$misc12 : {}));
1509
+ }, (_state$misc14 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc14 !== void 0 ? _state$misc14 : {}));
1410
1510
  if (error) {
1411
1511
  showErrorNotification(error);
1412
1512
  dispatch({
1413
1513
  type: _layoutReducer.actionTypes.SET_TABLE_EMPTY
1414
1514
  });
1415
1515
  } else {
1516
+ var _config$tables31, _config$tables32;
1416
1517
  if (staticFilter !== null && staticFilter !== void 0 && staticFilter.visible) {
1417
1518
  var _staticFilter$data$fi3, _config$staticFilter2;
1418
1519
  const selectedKey = staticFilter === null || staticFilter === void 0 || (_staticFilter$data$fi3 = staticFilter.data.find(item => item.selected)) === null || _staticFilter$data$fi3 === void 0 ? void 0 : _staticFilter$data$fi3.value;
@@ -1438,39 +1539,52 @@ function GenricLayOut(_ref) {
1438
1539
  type: _layoutReducer.actionTypes.UPDATE_FILTER_DEFAULT_VALUES,
1439
1540
  payload: formData
1440
1541
  });
1542
+ dispatch({
1543
+ type: _layoutReducer.actionTypes.SET_PAGINATION,
1544
+ payload: {
1545
+ current: config === null || config === void 0 || (_config$tables31 = config.tables) === null || _config$tables31 === void 0 || (_config$tables31 = _config$tables31.pagination) === null || _config$tables31 === void 0 ? void 0 : _config$tables31.current,
1546
+ pageSize: config === null || config === void 0 || (_config$tables32 = config.tables) === null || _config$tables32 === void 0 || (_config$tables32 = _config$tables32.pagination) === null || _config$tables32 === void 0 ? void 0 : _config$tables32.pageSize
1547
+ }
1548
+ });
1441
1549
  dispatch({
1442
1550
  type: _layoutReducer.actionTypes.CUSTOM_DRAWER_CLOSED
1443
1551
  });
1444
1552
  }
1445
1553
  } else if (formData.drawerKey === "exportDrawer") {
1446
- console.log(formData, "formData");
1554
+ const appliedFilters = {};
1555
+ Object.keys(formData).forEach(key => {
1556
+ const value = formData[key];
1557
+ if (value !== undefined && value !== "" && value !== null) {
1558
+ appliedFilters[key] = value;
1559
+ }
1560
+ });
1447
1561
  if (handleSecondaryTableCTAClick) {
1448
- var _state$dropdownSearch8, _state$inputSearch8, _state$tabs15, _tables$pagination23, _tables$pagination24, _tables$filter9, _tables$sorting21, _tables$sorting22, _header$subHeading15, _header$subHeading16, _staticFilter$data9, _state$misc13;
1562
+ var _state$dropdownSearch8, _state$inputSearch8, _state$tabs15, _tables$pagination7, _tables$pagination8, _tables$filter9, _tables$sorting21, _tables$sorting22, _header$subHeading25, _header$subHeading26, _staticFilter$data9, _state$misc15;
1449
1563
  const {
1450
1564
  error,
1451
1565
  data
1452
- } = await (handleSecondaryTableCTAClick === null || handleSecondaryTableCTAClick === void 0 ? void 0 : handleSecondaryTableCTAClick(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, (state === null || state === void 0 || (_state$dropdownSearch8 = state.dropdownSearch) === null || _state$dropdownSearch8 === void 0 || (_state$dropdownSearch8 = _state$dropdownSearch8.value) === null || _state$dropdownSearch8 === void 0 ? void 0 : _state$dropdownSearch8.trim()) && {
1566
+ } = await (handleSecondaryTableCTAClick === null || handleSecondaryTableCTAClick === void 0 ? void 0 : handleSecondaryTableCTAClick(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, (state === null || state === void 0 || (_state$dropdownSearch8 = state.dropdownSearch) === null || _state$dropdownSearch8 === void 0 || (_state$dropdownSearch8 = _state$dropdownSearch8.value) === null || _state$dropdownSearch8 === void 0 ? void 0 : _state$dropdownSearch8.trim()) && {
1453
1567
  searchedValue: state.dropdownSearch.value,
1454
1568
  selectedOption: state.dropdownSearch.selectedOption
1455
1569
  }), (state === null || state === void 0 || (_state$inputSearch8 = state.inputSearch) === null || _state$inputSearch8 === void 0 || (_state$inputSearch8 = _state$inputSearch8.value) === null || _state$inputSearch8 === void 0 ? void 0 : _state$inputSearch8.trim()) && {
1456
1570
  searchedValue: state.inputSearch.value
1457
1571
  }), {}, {
1458
1572
  selectedTab: state === null || state === void 0 || (_state$tabs15 = state.tabs) === null || _state$tabs15 === void 0 ? void 0 : _state$tabs15.active,
1459
- current: tables === null || tables === void 0 || (_tables$pagination23 = tables.pagination) === null || _tables$pagination23 === void 0 ? void 0 : _tables$pagination23.current,
1460
- pageSize: tables === null || tables === void 0 || (_tables$pagination24 = tables.pagination) === null || _tables$pagination24 === void 0 ? void 0 : _tables$pagination24.pageSize,
1573
+ current: tables === null || tables === void 0 || (_tables$pagination7 = tables.pagination) === null || _tables$pagination7 === void 0 ? void 0 : _tables$pagination7.current,
1574
+ pageSize: tables === null || tables === void 0 || (_tables$pagination8 = tables.pagination) === null || _tables$pagination8 === void 0 ? void 0 : _tables$pagination8.pageSize,
1461
1575
  columnFilterStatus: tables === null || tables === void 0 || (_tables$filter9 = tables.filter) === null || _tables$filter9 === void 0 ? void 0 : _tables$filter9.value,
1462
1576
  field: tables === null || tables === void 0 || (_tables$sorting21 = tables.sorting) === null || _tables$sorting21 === void 0 ? void 0 : _tables$sorting21.sortBy,
1463
1577
  order: tables === null || tables === void 0 || (_tables$sorting22 = tables.sorting) === null || _tables$sorting22 === void 0 ? void 0 : _tables$sorting22.sortDirection
1464
- }, (header === null || header === void 0 || (_header$subHeading15 = header.subHeading) === null || _header$subHeading15 === void 0 || (_header$subHeading15 = _header$subHeading15.jsxConfig) === null || _header$subHeading15 === void 0 ? void 0 : _header$subHeading15.type) == "select" ? {
1465
- subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading16 = header.subHeading) === null || _header$subHeading16 === void 0 || (_header$subHeading16 = _header$subHeading16.jsxConfig) === null || _header$subHeading16 === void 0 ? void 0 : _header$subHeading16.value
1578
+ }, (header === null || header === void 0 || (_header$subHeading25 = header.subHeading) === null || _header$subHeading25 === void 0 || (_header$subHeading25 = _header$subHeading25.jsxConfig) === null || _header$subHeading25 === void 0 ? void 0 : _header$subHeading25.type) == "select" ? {
1579
+ subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading26 = header.subHeading) === null || _header$subHeading26 === void 0 || (_header$subHeading26 = _header$subHeading26.jsxConfig) === null || _header$subHeading26 === void 0 ? void 0 : _header$subHeading26.value
1466
1580
  } : {}), (staticFilter === null || staticFilter === void 0 ? void 0 : staticFilter.visible) && ((_staticFilter$data9 = staticFilter.data) === null || _staticFilter$data9 === void 0 || (_staticFilter$data9 = _staticFilter$data9.find(item => item.selected)) === null || _staticFilter$data9 === void 0 ? void 0 : _staticFilter$data9.value) && {
1467
1581
  staticFilter: staticFilter.data.find(item => item.selected).value
1468
1582
  }), {}, {
1469
1583
  fromDate: formData === null || formData === void 0 ? void 0 : formData.fromDate,
1470
1584
  toDate: formData === null || formData === void 0 ? void 0 : formData.toDate
1471
- }, (formData === null || formData === void 0 ? void 0 : formData.exportType) && {
1585
+ }, appliedFilters), (formData === null || formData === void 0 ? void 0 : formData.exportType) && {
1472
1586
  exportType: formData === null || formData === void 0 ? void 0 : formData.exportType
1473
- }), (_state$misc13 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc13 !== void 0 ? _state$misc13 : {})));
1587
+ }), (_state$misc15 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc15 !== void 0 ? _state$misc15 : {})));
1474
1588
  if (error) {
1475
1589
  showErrorNotification(error);
1476
1590
  } else {
@@ -1484,7 +1598,7 @@ function GenricLayOut(_ref) {
1484
1598
  }
1485
1599
  };
1486
1600
  const onClearAllAppliedFilters = async () => {
1487
- var _state$dropdownSearch9, _state$inputSearch9, _state$tabs16, _tables$pagination25, _tables$pagination26, _tables$filter10, _tables$sorting23, _header$subHeading17, _header$subHeading18, _staticFilter$data10, _tables$sorting24, _state$misc14;
1601
+ var _state$dropdownSearch9, _state$inputSearch9, _state$tabs16, _tables$pagination9, _tables$pagination10, _tables$filter10, _tables$sorting23, _header$subHeading27, _header$subHeading28, _staticFilter$data10, _tables$sorting24, _state$misc16;
1488
1602
  const {
1489
1603
  error,
1490
1604
  data
@@ -1495,19 +1609,19 @@ function GenricLayOut(_ref) {
1495
1609
  searchedValue: state.inputSearch.value
1496
1610
  }), {}, {
1497
1611
  selectedTab: state === null || state === void 0 || (_state$tabs16 = state.tabs) === null || _state$tabs16 === void 0 ? void 0 : _state$tabs16.active,
1498
- current: tables === null || tables === void 0 || (_tables$pagination25 = tables.pagination) === null || _tables$pagination25 === void 0 ? void 0 : _tables$pagination25.current,
1499
- pageSize: tables === null || tables === void 0 || (_tables$pagination26 = tables.pagination) === null || _tables$pagination26 === void 0 ? void 0 : _tables$pagination26.pageSize
1612
+ current: tables === null || tables === void 0 || (_tables$pagination9 = tables.pagination) === null || _tables$pagination9 === void 0 ? void 0 : _tables$pagination9.current,
1613
+ pageSize: tables === null || tables === void 0 || (_tables$pagination10 = tables.pagination) === null || _tables$pagination10 === void 0 ? void 0 : _tables$pagination10.pageSize
1500
1614
  }, (tables === null || tables === void 0 || (_tables$filter10 = tables.filter) === null || _tables$filter10 === void 0 ? void 0 : _tables$filter10.key) && {
1501
1615
  columnFilterStatus: tables === null || tables === void 0 ? void 0 : tables.filter
1502
1616
  }), {}, {
1503
1617
  field: tables === null || tables === void 0 || (_tables$sorting23 = tables.sorting) === null || _tables$sorting23 === void 0 ? void 0 : _tables$sorting23.sortBy
1504
- }, (header === null || header === void 0 || (_header$subHeading17 = header.subHeading) === null || _header$subHeading17 === void 0 || (_header$subHeading17 = _header$subHeading17.jsxConfig) === null || _header$subHeading17 === void 0 ? void 0 : _header$subHeading17.type) == "select" ? {
1505
- subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading18 = header.subHeading) === null || _header$subHeading18 === void 0 || (_header$subHeading18 = _header$subHeading18.jsxConfig) === null || _header$subHeading18 === void 0 ? void 0 : _header$subHeading18.value
1618
+ }, (header === null || header === void 0 || (_header$subHeading27 = header.subHeading) === null || _header$subHeading27 === void 0 || (_header$subHeading27 = _header$subHeading27.jsxConfig) === null || _header$subHeading27 === void 0 ? void 0 : _header$subHeading27.type) == "select" ? {
1619
+ subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading28 = header.subHeading) === null || _header$subHeading28 === void 0 || (_header$subHeading28 = _header$subHeading28.jsxConfig) === null || _header$subHeading28 === void 0 ? void 0 : _header$subHeading28.value
1506
1620
  } : {}), (staticFilter === null || staticFilter === void 0 ? void 0 : staticFilter.visible) && ((_staticFilter$data10 = staticFilter.data) === null || _staticFilter$data10 === void 0 || (_staticFilter$data10 = _staticFilter$data10.find(item => item.selected)) === null || _staticFilter$data10 === void 0 ? void 0 : _staticFilter$data10.value) && {
1507
1621
  staticFilter: staticFilter.data.find(item => item.selected).value
1508
1622
  }), {}, {
1509
1623
  order: tables === null || tables === void 0 || (_tables$sorting24 = tables.sorting) === null || _tables$sorting24 === void 0 ? void 0 : _tables$sorting24.sortDirection
1510
- }, (_state$misc14 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc14 !== void 0 ? _state$misc14 : {}));
1624
+ }, (_state$misc16 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc16 !== void 0 ? _state$misc16 : {}));
1511
1625
  if (error) {
1512
1626
  showErrorNotification(error);
1513
1627
  dispatch({
@@ -1545,7 +1659,7 @@ function GenricLayOut(_ref) {
1545
1659
  * @returns {Promise<void>} - Resolves after the action is handled.
1546
1660
  *
1547
1661
  * Handles the modal footer button clicks with the following actions:
1548
- * - "CLOSE_MODAL_ONLEY": Closes the modal.
1662
+ * - "CLOSE_MODAL": Closes the modal.
1549
1663
  * - "CLOSE_MODAL_AND_FETCH": Calls the `handleModalCloseSuccess` function
1550
1664
  * if provided, and closes the modal if successful. Also re-initializes the
1551
1665
  * state.
@@ -1556,7 +1670,7 @@ function GenricLayOut(_ref) {
1556
1670
  */
1557
1671
 
1558
1672
  const onClickModalFooter = async (action, buttonConfig) => {
1559
- if (action === "CLOSE_MODAL_ONLEY") {
1673
+ if (action === "CLOSE_MODAL") {
1560
1674
  dispatch({
1561
1675
  type: _layoutReducer.actionTypes.TOGGLE_MODAL,
1562
1676
  payload: false
@@ -1564,14 +1678,14 @@ function GenricLayOut(_ref) {
1564
1678
  return;
1565
1679
  } else if (action === "CLOSE_MODAL_AND_FETCH") {
1566
1680
  if (handleModalCloseSuccess) {
1567
- var _stateRef$current, _state$misc15;
1681
+ var _stateRef$current, _state$misc17;
1568
1682
  const {
1569
1683
  error,
1570
1684
  data
1571
1685
  } = await (handleModalCloseSuccess === null || handleModalCloseSuccess === void 0 ? void 0 : handleModalCloseSuccess(_objectSpread({
1572
1686
  modalValue: stateRef === null || stateRef === void 0 || (_stateRef$current = stateRef.current) === null || _stateRef$current === void 0 || (_stateRef$current = _stateRef$current.modal) === null || _stateRef$current === void 0 ? void 0 : _stateRef$current.value,
1573
1687
  call: buttonConfig === null || buttonConfig === void 0 ? void 0 : buttonConfig.call
1574
- }, (_state$misc15 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc15 !== void 0 ? _state$misc15 : {})));
1688
+ }, (_state$misc17 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc17 !== void 0 ? _state$misc17 : {})));
1575
1689
  if (error) {
1576
1690
  showErrorNotification(error);
1577
1691
  } else {
@@ -1585,10 +1699,10 @@ function GenricLayOut(_ref) {
1585
1699
  }
1586
1700
  } else {
1587
1701
  if (handleDrawerFormOnFinish) {
1588
- var _state$tables$selecte, _state$tables2;
1702
+ var _state$tables$selecte, _state$tables3;
1589
1703
  let req = {};
1590
1704
  req.type = "APPROVE";
1591
- req.orderUUID = (_state$tables$selecte = state === null || state === void 0 || (_state$tables2 = state.tables) === null || _state$tables2 === void 0 || (_state$tables2 = _state$tables2.selectedRowKeys) === null || _state$tables2 === void 0 ? void 0 : _state$tables2.map(item => item.orderUUID)) !== null && _state$tables$selecte !== void 0 ? _state$tables$selecte : [];
1705
+ req.orderUUID = (_state$tables$selecte = state === null || state === void 0 || (_state$tables3 = state.tables) === null || _state$tables3 === void 0 || (_state$tables3 = _state$tables3.selectedRowKeys) === null || _state$tables3 === void 0 ? void 0 : _state$tables3.map(item => item.orderUUID)) !== null && _state$tables$selecte !== void 0 ? _state$tables$selecte : [];
1592
1706
  const {
1593
1707
  error,
1594
1708
  data
@@ -1638,7 +1752,6 @@ function GenricLayOut(_ref) {
1638
1752
  * - "OPEN_MODAL": Opens a modal with updated content.
1639
1753
  */
1640
1754
  const leftHeaderFirstButtonClick = async () => {
1641
- console.log(leftHeaderFirstButton, "leftHeaderFirstButton");
1642
1755
  if ((leftHeaderFirstButton === null || leftHeaderFirstButton === void 0 ? void 0 : leftHeaderFirstButton.action) === "OPEN_CUSTOM_DRAWER") {
1643
1756
  var _config$customDrawer3;
1644
1757
  const drawerData = config === null || config === void 0 || (_config$customDrawer3 = config.customDrawer) === null || _config$customDrawer3 === void 0 || (_config$customDrawer3 = _config$customDrawer3.data) === null || _config$customDrawer3 === void 0 ? void 0 : _config$customDrawer3[leftHeaderFirstButton === null || leftHeaderFirstButton === void 0 ? void 0 : leftHeaderFirstButton.drawerKey];
@@ -1689,7 +1802,7 @@ function GenricLayOut(_ref) {
1689
1802
  };
1690
1803
  const rightHeaderSecondButtonClick = async () => {
1691
1804
  if ((rightHeaderSecondButton === null || rightHeaderSecondButton === void 0 ? void 0 : rightHeaderSecondButton.action) === "RESET_CUSTOM_DRAWER") {
1692
- var _state$dropdownSearch10, _state$inputSearch10, _state$tabs17, _tables$pagination27, _tables$pagination28, _tables$filter11, _tables$sorting25, _header$subHeading19, _header$subHeading20, _staticFilter$data11, _tables$sorting26, _state$misc16;
1805
+ var _state$dropdownSearch10, _state$inputSearch10, _state$tabs17, _tables$pagination11, _tables$pagination12, _tables$filter11, _tables$sorting25, _header$subHeading29, _header$subHeading30, _staticFilter$data11, _tables$sorting26, _state$misc18;
1693
1806
  const {
1694
1807
  error,
1695
1808
  data
@@ -1700,19 +1813,19 @@ function GenricLayOut(_ref) {
1700
1813
  searchedValue: state.inputSearch.value
1701
1814
  }), {}, {
1702
1815
  selectedTab: state === null || state === void 0 || (_state$tabs17 = state.tabs) === null || _state$tabs17 === void 0 ? void 0 : _state$tabs17.active,
1703
- current: tables === null || tables === void 0 || (_tables$pagination27 = tables.pagination) === null || _tables$pagination27 === void 0 ? void 0 : _tables$pagination27.current,
1704
- pageSize: tables === null || tables === void 0 || (_tables$pagination28 = tables.pagination) === null || _tables$pagination28 === void 0 ? void 0 : _tables$pagination28.pageSize
1816
+ current: tables === null || tables === void 0 || (_tables$pagination11 = tables.pagination) === null || _tables$pagination11 === void 0 ? void 0 : _tables$pagination11.current,
1817
+ pageSize: tables === null || tables === void 0 || (_tables$pagination12 = tables.pagination) === null || _tables$pagination12 === void 0 ? void 0 : _tables$pagination12.pageSize
1705
1818
  }, (tables === null || tables === void 0 || (_tables$filter11 = tables.filter) === null || _tables$filter11 === void 0 ? void 0 : _tables$filter11.key) && {
1706
1819
  columnFilterStatus: tables === null || tables === void 0 ? void 0 : tables.filter
1707
1820
  }), {}, {
1708
1821
  field: tables === null || tables === void 0 || (_tables$sorting25 = tables.sorting) === null || _tables$sorting25 === void 0 ? void 0 : _tables$sorting25.sortBy
1709
- }, (header === null || header === void 0 || (_header$subHeading19 = header.subHeading) === null || _header$subHeading19 === void 0 || (_header$subHeading19 = _header$subHeading19.jsxConfig) === null || _header$subHeading19 === void 0 ? void 0 : _header$subHeading19.type) == "select" ? {
1710
- subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading20 = header.subHeading) === null || _header$subHeading20 === void 0 || (_header$subHeading20 = _header$subHeading20.jsxConfig) === null || _header$subHeading20 === void 0 ? void 0 : _header$subHeading20.value
1822
+ }, (header === null || header === void 0 || (_header$subHeading29 = header.subHeading) === null || _header$subHeading29 === void 0 || (_header$subHeading29 = _header$subHeading29.jsxConfig) === null || _header$subHeading29 === void 0 ? void 0 : _header$subHeading29.type) == "select" ? {
1823
+ subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading30 = header.subHeading) === null || _header$subHeading30 === void 0 || (_header$subHeading30 = _header$subHeading30.jsxConfig) === null || _header$subHeading30 === void 0 ? void 0 : _header$subHeading30.value
1711
1824
  } : {}), (staticFilter === null || staticFilter === void 0 ? void 0 : staticFilter.visible) && ((_staticFilter$data11 = staticFilter.data) === null || _staticFilter$data11 === void 0 || (_staticFilter$data11 = _staticFilter$data11.find(item => item.selected)) === null || _staticFilter$data11 === void 0 ? void 0 : _staticFilter$data11.value) && {
1712
1825
  staticFilter: staticFilter.data.find(item => item.selected).value
1713
1826
  }), {}, {
1714
1827
  order: tables === null || tables === void 0 || (_tables$sorting26 = tables.sorting) === null || _tables$sorting26 === void 0 ? void 0 : _tables$sorting26.sortDirection
1715
- }, (_state$misc16 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc16 !== void 0 ? _state$misc16 : {}));
1828
+ }, (_state$misc18 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc18 !== void 0 ? _state$misc18 : {}));
1716
1829
  if (error) {
1717
1830
  showErrorNotification(error);
1718
1831
  dispatch({
@@ -1763,7 +1876,7 @@ function GenricLayOut(_ref) {
1763
1876
  };
1764
1877
  const handleSubHeadingSelect = async val => {
1765
1878
  if (val) {
1766
- var _tables$pagination29, _tables$pagination30, _state$misc17;
1879
+ var _state$tabs18, _tables$pagination13, _tables$pagination14, _state$misc19;
1767
1880
  dispatch({
1768
1881
  type: _layoutReducer.actionTypes.SET_SUBHEADING_SELECTED_CONFIG,
1769
1882
  payload: val
@@ -1772,11 +1885,12 @@ function GenricLayOut(_ref) {
1772
1885
  error,
1773
1886
  data
1774
1887
  } = await handleSubHeadingSelectClick(_objectSpread({
1888
+ selectedTab: state === null || state === void 0 || (_state$tabs18 = state.tabs) === null || _state$tabs18 === void 0 ? void 0 : _state$tabs18.active,
1775
1889
  searchedValue: inputSearch === null || inputSearch === void 0 ? void 0 : inputSearch.value,
1776
- current: tables === null || tables === void 0 || (_tables$pagination29 = tables.pagination) === null || _tables$pagination29 === void 0 ? void 0 : _tables$pagination29.current,
1777
- pageSize: tables === null || tables === void 0 || (_tables$pagination30 = tables.pagination) === null || _tables$pagination30 === void 0 ? void 0 : _tables$pagination30.pageSize,
1890
+ current: tables === null || tables === void 0 || (_tables$pagination13 = tables.pagination) === null || _tables$pagination13 === void 0 ? void 0 : _tables$pagination13.current,
1891
+ pageSize: tables === null || tables === void 0 || (_tables$pagination14 = tables.pagination) === null || _tables$pagination14 === void 0 ? void 0 : _tables$pagination14.pageSize,
1778
1892
  subHeadingSelectVal: val
1779
- }, (_state$misc17 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc17 !== void 0 ? _state$misc17 : {}));
1893
+ }, (_state$misc19 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc19 !== void 0 ? _state$misc19 : {}));
1780
1894
  if (error) {
1781
1895
  showErrorNotification(error);
1782
1896
  dispatch({
@@ -1803,7 +1917,7 @@ function GenricLayOut(_ref) {
1803
1917
 
1804
1918
  // Call the handler if provided
1805
1919
  if (handleTableChange) {
1806
- var _state$dropdownSearch11, _state$inputSearch11, _state$tabs18, _tables$pagination31, _tables$sorting27, _tables$sorting28, _header$subHeading21, _header$subHeading22, _customDrawer$applied10, _state$misc18;
1920
+ var _state$dropdownSearch11, _state$inputSearch11, _state$tabs19, _tables$pagination15, _tables$sorting27, _tables$sorting28, _header$subHeading31, _header$subHeading32, _customDrawer$applied10, _state$misc20;
1807
1921
  dispatch({
1808
1922
  type: _layoutReducer.actionTypes.SET_LOADING,
1809
1923
  payload: true
@@ -1817,20 +1931,16 @@ function GenricLayOut(_ref) {
1817
1931
  }), (state === null || state === void 0 || (_state$inputSearch11 = state.inputSearch) === null || _state$inputSearch11 === void 0 || (_state$inputSearch11 = _state$inputSearch11.value) === null || _state$inputSearch11 === void 0 ? void 0 : _state$inputSearch11.trim()) && {
1818
1932
  searchedValue: state.inputSearch.value
1819
1933
  }), {}, {
1820
- selectedTab: state === null || state === void 0 || (_state$tabs18 = state.tabs) === null || _state$tabs18 === void 0 ? void 0 : _state$tabs18.active,
1934
+ selectedTab: state === null || state === void 0 || (_state$tabs19 = state.tabs) === null || _state$tabs19 === void 0 ? void 0 : _state$tabs19.active,
1821
1935
  current: 1,
1822
1936
  // Reset to first page when filtering
1823
- pageSize: tables === null || tables === void 0 || (_tables$pagination31 = tables.pagination) === null || _tables$pagination31 === void 0 ? void 0 : _tables$pagination31.pageSize,
1937
+ pageSize: tables === null || tables === void 0 || (_tables$pagination15 = tables.pagination) === null || _tables$pagination15 === void 0 ? void 0 : _tables$pagination15.pageSize,
1824
1938
  filterStatus: filterValue,
1825
1939
  field: tables === null || tables === void 0 || (_tables$sorting27 = tables.sorting) === null || _tables$sorting27 === void 0 ? void 0 : _tables$sorting27.sortBy,
1826
1940
  order: tables === null || tables === void 0 || (_tables$sorting28 = tables.sorting) === null || _tables$sorting28 === void 0 ? void 0 : _tables$sorting28.sortDirection
1827
- }, (header === null || header === void 0 || (_header$subHeading21 = header.subHeading) === null || _header$subHeading21 === void 0 || (_header$subHeading21 = _header$subHeading21.jsxConfig) === null || _header$subHeading21 === void 0 ? void 0 : _header$subHeading21.type) == "select" ? {
1828
- subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading22 = header.subHeading) === null || _header$subHeading22 === void 0 || (_header$subHeading22 = _header$subHeading22.jsxConfig) === null || _header$subHeading22 === void 0 ? void 0 : _header$subHeading22.value
1829
- } : {}), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied10 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied10 !== void 0 ? _customDrawer$applied10 : {}).length > 0 && {
1830
- filterOn: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.filterBy,
1831
- fromDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.fromDate,
1832
- toDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.toDate
1833
- }), (_state$misc18 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc18 !== void 0 ? _state$misc18 : {}), {}, {
1941
+ }, (header === null || header === void 0 || (_header$subHeading31 = header.subHeading) === null || _header$subHeading31 === void 0 || (_header$subHeading31 = _header$subHeading31.jsxConfig) === null || _header$subHeading31 === void 0 ? void 0 : _header$subHeading31.type) == "select" ? {
1942
+ subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading32 = header.subHeading) === null || _header$subHeading32 === void 0 || (_header$subHeading32 = _header$subHeading32.jsxConfig) === null || _header$subHeading32 === void 0 ? void 0 : _header$subHeading32.value
1943
+ } : {}), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied10 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied10 !== void 0 ? _customDrawer$applied10 : {}).length > 0 && _objectSpread({}, customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)), (_state$misc20 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc20 !== void 0 ? _state$misc20 : {}), {}, {
1834
1944
  staticFilter: filterValue // Pass static filter value
1835
1945
  }));
1836
1946
  if (error) {
@@ -1839,7 +1949,7 @@ function GenricLayOut(_ref) {
1839
1949
  type: _layoutReducer.actionTypes.SET_TABLE_EMPTY
1840
1950
  });
1841
1951
  } else {
1842
- var _tables$pagination32;
1952
+ var _tables$pagination16;
1843
1953
  dispatch({
1844
1954
  type: _layoutReducer.actionTypes.SET_TABLE_DATA,
1845
1955
  payload: data
@@ -1849,7 +1959,7 @@ function GenricLayOut(_ref) {
1849
1959
  type: _layoutReducer.actionTypes.SET_PAGINATION,
1850
1960
  payload: {
1851
1961
  current: 1,
1852
- pageSize: tables === null || tables === void 0 || (_tables$pagination32 = tables.pagination) === null || _tables$pagination32 === void 0 ? void 0 : _tables$pagination32.pageSize
1962
+ pageSize: tables === null || tables === void 0 || (_tables$pagination16 = tables.pagination) === null || _tables$pagination16 === void 0 ? void 0 : _tables$pagination16.pageSize
1853
1963
  }
1854
1964
  });
1855
1965
  }
@@ -1872,7 +1982,7 @@ function GenricLayOut(_ref) {
1872
1982
  }
1873
1983
  });
1874
1984
  if (handleTableChange) {
1875
- var _state$dropdownSearch12, _state$inputSearch12, _state$tabs19, _tables$filter12, _tables$sorting29, _tables$sorting30, _header$subHeading23, _header$subHeading24, _staticFilter$data12, _customDrawer$applied11, _state$misc19;
1985
+ var _state$dropdownSearch12, _state$inputSearch12, _state$tabs20, _tables$filter12, _tables$sorting29, _tables$sorting30, _header$subHeading33, _header$subHeading34, _staticFilter$data12, _customDrawer$applied11, _state$misc21;
1876
1986
  const {
1877
1987
  error,
1878
1988
  data
@@ -1882,21 +1992,17 @@ function GenricLayOut(_ref) {
1882
1992
  }), (state === null || state === void 0 || (_state$inputSearch12 = state.inputSearch) === null || _state$inputSearch12 === void 0 || (_state$inputSearch12 = _state$inputSearch12.value) === null || _state$inputSearch12 === void 0 ? void 0 : _state$inputSearch12.trim()) && {
1883
1993
  searchedValue: state.inputSearch.value
1884
1994
  }), {}, {
1885
- selectedTab: state === null || state === void 0 || (_state$tabs19 = state.tabs) === null || _state$tabs19 === void 0 ? void 0 : _state$tabs19.active,
1995
+ selectedTab: state === null || state === void 0 || (_state$tabs20 = state.tabs) === null || _state$tabs20 === void 0 ? void 0 : _state$tabs20.active,
1886
1996
  current,
1887
1997
  pageSize,
1888
1998
  columnFilterStatus: tables === null || tables === void 0 || (_tables$filter12 = tables.filter) === null || _tables$filter12 === void 0 ? void 0 : _tables$filter12.value,
1889
1999
  field: tables === null || tables === void 0 || (_tables$sorting29 = tables.sorting) === null || _tables$sorting29 === void 0 ? void 0 : _tables$sorting29.sortBy,
1890
2000
  order: tables === null || tables === void 0 || (_tables$sorting30 = tables.sorting) === null || _tables$sorting30 === void 0 ? void 0 : _tables$sorting30.sortDirection
1891
- }, (header === null || header === void 0 || (_header$subHeading23 = header.subHeading) === null || _header$subHeading23 === void 0 || (_header$subHeading23 = _header$subHeading23.jsxConfig) === null || _header$subHeading23 === void 0 ? void 0 : _header$subHeading23.type) == "select" ? {
1892
- subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading24 = header.subHeading) === null || _header$subHeading24 === void 0 || (_header$subHeading24 = _header$subHeading24.jsxConfig) === null || _header$subHeading24 === void 0 ? void 0 : _header$subHeading24.value
2001
+ }, (header === null || header === void 0 || (_header$subHeading33 = header.subHeading) === null || _header$subHeading33 === void 0 || (_header$subHeading33 = _header$subHeading33.jsxConfig) === null || _header$subHeading33 === void 0 ? void 0 : _header$subHeading33.type) == "select" ? {
2002
+ subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading34 = header.subHeading) === null || _header$subHeading34 === void 0 || (_header$subHeading34 = _header$subHeading34.jsxConfig) === null || _header$subHeading34 === void 0 ? void 0 : _header$subHeading34.value
1893
2003
  } : {}), (staticFilter === null || staticFilter === void 0 ? void 0 : staticFilter.visible) && ((_staticFilter$data12 = staticFilter.data) === null || _staticFilter$data12 === void 0 || (_staticFilter$data12 = _staticFilter$data12.find(item => item.selected)) === null || _staticFilter$data12 === void 0 ? void 0 : _staticFilter$data12.value) && {
1894
2004
  staticFilter: staticFilter.data.find(item => item.selected).value
1895
- }), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied11 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied11 !== void 0 ? _customDrawer$applied11 : {}).length > 0 && {
1896
- filterOn: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.filterBy,
1897
- fromDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.fromDate,
1898
- toDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.toDate
1899
- }), (_state$misc19 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc19 !== void 0 ? _state$misc19 : {}));
2005
+ }), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied11 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied11 !== void 0 ? _customDrawer$applied11 : {}).length > 0 && _objectSpread({}, customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)), (_state$misc21 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc21 !== void 0 ? _state$misc21 : {}));
1900
2006
  if (error) {
1901
2007
  showErrorNotification(error);
1902
2008
  dispatch({
@@ -1913,9 +2019,18 @@ function GenricLayOut(_ref) {
1913
2019
  }
1914
2020
  }
1915
2021
  };
2022
+ function isFiltersEmpty() {
2023
+ let filters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2024
+ const filtersKeyLength = Object.keys(filters).length;
2025
+ if (filtersKeyLength === 0) return true;
2026
+ if (filtersKeyLength === 2) {
2027
+ return (filters === null || filters === void 0 ? void 0 : filters.drawerKey) && (filters === null || filters === void 0 ? void 0 : filters.type);
2028
+ }
2029
+ return false;
2030
+ }
1916
2031
  console.log(state, "GenricLayOutstate");
1917
2032
  return /*#__PURE__*/_react.default.createElement(_styles.OapageWithDataStyle, {
1918
- className: (state === null || state === void 0 || (_state$misc20 = state.misc) === null || _state$misc20 === void 0 ? void 0 : _state$misc20.flow) === "hubAutomation" ? "hubAutomationContainer" : ""
2033
+ className: (state === null || state === void 0 || (_state$misc22 = state.misc) === null || _state$misc22 === void 0 ? void 0 : _state$misc22.flow) === "hubAutomation" ? "hubAutomationContainer" : ""
1919
2034
  }, /*#__PURE__*/_react.default.createElement(_styles.DrawerWithOutFooter, null), /*#__PURE__*/_react.default.createElement("div", {
1920
2035
  className: "fullPageLayout"
1921
2036
  }, /*#__PURE__*/_react.default.createElement(_GlobalCss.default, null, (sidebar === null || sidebar === void 0 ? void 0 : sidebar.visible) && /*#__PURE__*/_react.default.createElement(_antd.Skeleton, {
@@ -1930,10 +2045,21 @@ function GenricLayOut(_ref) {
1930
2045
  className: "oaRightLayouts"
1931
2046
  }, /*#__PURE__*/_react.default.createElement("div", {
1932
2047
  className: "oaTopHeaderAndBtnSec "
2048
+ }, /*#__PURE__*/_react.default.createElement("div", {
2049
+ className: "headerContent"
2050
+ }, /*#__PURE__*/_react.default.createElement("div", {
2051
+ className: "headerLeft"
1933
2052
  }, (header === null || header === void 0 ? void 0 : header.visible) && /*#__PURE__*/_react.default.createElement(_Header.default, _extends({}, header, {
1934
2053
  onSubHeadingClick: onSubHeadingClick,
1935
2054
  handleSubHeadingSelect: handleSubHeadingSelect
1936
2055
  }))), /*#__PURE__*/_react.default.createElement("div", {
2056
+ className: "headerRight"
2057
+ }, /*#__PURE__*/_react.default.createElement(_ProfileSection.default, {
2058
+ profileData: profileData,
2059
+ onProfileClick: () => {
2060
+ handleProfileReroute();
2061
+ }
2062
+ })))), /*#__PURE__*/_react.default.createElement("div", {
1937
2063
  className: "layoutHeadingAndSearch"
1938
2064
  }, (imageViewer === null || imageViewer === void 0 ? void 0 : imageViewer.visible) && /*#__PURE__*/_react.default.createElement(_CustomViewer.default, {
1939
2065
  open: true,
@@ -2008,7 +2134,7 @@ function GenricLayOut(_ref) {
2008
2134
  }),
2009
2135
  position: "left"
2010
2136
  })
2011
- }), Object.keys((_customDrawer$applied12 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied12 !== void 0 ? _customDrawer$applied12 : {}).length > 0 && /*#__PURE__*/_react.default.createElement("span", {
2137
+ }), !isFiltersEmpty(customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && /*#__PURE__*/_react.default.createElement("span", {
2012
2138
  className: "notifyDot"
2013
2139
  })))))), (inputSearch === null || inputSearch === void 0 ? void 0 : inputSearch.visible) && /*#__PURE__*/_react.default.createElement(_antd.Skeleton, {
2014
2140
  loading: state === null || state === void 0 ? void 0 : state.isLoading,
@@ -2073,7 +2199,7 @@ function GenricLayOut(_ref) {
2073
2199
  onChange: onTableChange,
2074
2200
  customTableChange: customTableChange,
2075
2201
  pagination: tables === null || tables === void 0 ? void 0 : tables.pagination,
2076
- selectedRows: (state === null || state === void 0 || (_state$tables3 = state.tables) === null || _state$tables3 === void 0 ? void 0 : _state$tables3.selectedRowKeys) || [],
2202
+ selectedRows: (state === null || state === void 0 || (_state$tables4 = state.tables) === null || _state$tables4 === void 0 ? void 0 : _state$tables4.selectedRowKeys) || [],
2077
2203
  rowSelection: (tables === null || tables === void 0 || (_tables$selectionType = tables.selectionType) === null || _tables$selectionType === void 0 ? void 0 : _tables$selectionType[(_tabs$active4 = tabs === null || tabs === void 0 ? void 0 : tabs.active) !== null && _tabs$active4 !== void 0 ? _tabs$active4 : "default"]) && Object.assign({
2078
2204
  type: tables === null || tables === void 0 || (_tables$selectionType2 = tables.selectionType) === null || _tables$selectionType2 === void 0 ? void 0 : _tables$selectionType2[tabs === null || tabs === void 0 ? void 0 : tabs.active]
2079
2205
  }, rowSelection),
@@ -2081,7 +2207,7 @@ function GenricLayOut(_ref) {
2081
2207
  emptyText: emptyTableState
2082
2208
  },
2083
2209
  emptyStateCard: emptyTableState,
2084
- onMobilePageChange: tables !== null && tables !== void 0 && (_tables$pagination33 = tables.pagination) !== null && _tables$pagination33 !== void 0 && _tables$pagination33.mwebPagination ? onMobilePageChange : undefined
2210
+ onMobilePageChange: tables !== null && tables !== void 0 && (_tables$pagination17 = tables.pagination) !== null && _tables$pagination17 !== void 0 && _tables$pagination17.mwebPagination ? onMobilePageChange : undefined
2085
2211
  })))), (drawer === null || drawer === void 0 ? void 0 : drawer.visible) && /*#__PURE__*/_react.default.createElement(_CustomDrawer.default, {
2086
2212
  className: "oaDrawer",
2087
2213
  title: drawer === null || drawer === void 0 || (_drawer$data = drawer.data) === null || _drawer$data === void 0 || (_drawer$data = _drawer$data[(_tabs$active5 = tabs === null || tabs === void 0 ? void 0 : tabs.active) !== null && _tabs$active5 !== void 0 ? _tabs$active5 : "default"]) === null || _drawer$data === void 0 || (_drawer$data = _drawer$data[drawer === null || drawer === void 0 ? void 0 : drawer.active]) === null || _drawer$data === void 0 ? void 0 : _drawer$data.title,
@@ -2139,7 +2265,7 @@ function GenricLayOut(_ref) {
2139
2265
  className: "bottomSelectedSecion"
2140
2266
  }, /*#__PURE__*/_react.default.createElement(_Typography.default, {
2141
2267
  color: "secondary-content",
2142
- typography: "ype-button-500"
2268
+ typography: "type-button-500"
2143
2269
  }, /*#__PURE__*/_react.default.createElement("span", null, "".concat(tables === null || tables === void 0 || (_tables$selectedRowKe = tables.selectedRowKeys) === null || _tables$selectedRowKe === void 0 ? void 0 : _tables$selectedRowKe.length, " ").concat(tables === null || tables === void 0 || (_tables$tableFooter2 = tables.tableFooter) === null || _tables$tableFooter2 === void 0 ? void 0 : _tables$tableFooter2.text))), /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
2144
2270
  type: tables === null || tables === void 0 || (_tables$tableFooter3 = tables.tableFooter) === null || _tables$tableFooter3 === void 0 || (_tables$tableFooter3 = _tables$tableFooter3.jsxConfig) === null || _tables$tableFooter3 === void 0 ? void 0 : _tables$tableFooter3.buttonType,
2145
2271
  onClick: () => {