@zeniai/client-epic-state 4.19.90-betaSS3 → 4.19.90-betaSS4

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 (79) hide show
  1. package/lib/entity/aiCfo/aiCfoSelector.d.ts +2 -1
  2. package/lib/entity/chargeCardTransaction/chargeCardTransaction.d.ts +1 -1
  3. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +1 -36
  4. package/lib/entity/jeSchedules/jeSchedulesPayload.js +10 -49
  5. package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +2 -2
  6. package/lib/entity/jeSchedules/jeSchedulesReducer.js +2 -2
  7. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +1 -2
  8. package/lib/entity/jeSchedules/jeSchedulesSelector.js +1 -2
  9. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +1 -15
  10. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +7 -3
  11. package/lib/entity/jeSchedules/jeSchedulesTypes.js +3 -1
  12. package/lib/entity/reimbursement/reimbursementPayload.d.ts +2 -0
  13. package/lib/entity/reimbursement/reimbursementPayload.js +7 -0
  14. package/lib/entity/reimbursement/reimbursementState.d.ts +2 -0
  15. package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +0 -3
  16. package/lib/entity/transaction/payloadTypes/transactionPayload.js +0 -11
  17. package/lib/entity/transaction/stateTypes/transaction.d.ts +0 -3
  18. package/lib/entity/transaction/transactionReducer.js +3 -2
  19. package/lib/entity/transaction/transactionSelector.d.ts +2 -2
  20. package/lib/entity/transaction/transactionState.d.ts +3 -2
  21. package/lib/epic.d.ts +1 -2
  22. package/lib/epic.js +1 -2
  23. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +10 -49
  24. package/lib/esm/entity/jeSchedules/jeSchedulesReducer.js +3 -3
  25. package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +1 -2
  26. package/lib/esm/entity/jeSchedules/jeSchedulesTypes.js +1 -0
  27. package/lib/esm/entity/reimbursement/reimbursementPayload.js +7 -0
  28. package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +0 -11
  29. package/lib/esm/entity/transaction/transactionReducer.js +3 -2
  30. package/lib/esm/epic.js +1 -2
  31. package/lib/esm/index.js +7 -8
  32. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +1 -82
  33. package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +2 -8
  34. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +5 -29
  35. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +3 -50
  36. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +1 -17
  37. package/lib/esm/view/scheduleView/scheduleDetailView/epics/fetchScheduleDetailsEpic.js +2 -7
  38. package/lib/esm/view/scheduleView/scheduleListView/scheduleListReducer.js +2 -7
  39. package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +0 -10
  40. package/lib/esm/view/spendManagement/billPay/billList/billListState.js +0 -1
  41. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
  42. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
  43. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
  44. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
  45. package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
  46. package/lib/index.d.ts +9 -12
  47. package/lib/index.js +33 -41
  48. package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +0 -7
  49. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +1 -15
  50. package/lib/view/aiCfoView/aiCfoViewReducer.js +2 -83
  51. package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +1 -4
  52. package/lib/view/aiCfoView/aiCfoViewSelector.js +2 -9
  53. package/lib/view/aiCfoView/aiCfoViewState.d.ts +1 -18
  54. package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
  55. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +13 -13
  56. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +5 -29
  57. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +0 -2
  58. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +3 -50
  59. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +0 -5
  60. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +0 -19
  61. package/lib/view/scheduleView/scheduleDetailView/epics/fetchScheduleDetailsEpic.js +2 -7
  62. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.d.ts +4 -4
  63. package/lib/view/scheduleView/scheduleListView/scheduleListReducer.js +1 -6
  64. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  65. package/lib/view/spendManagement/billPay/billList/billListSelector.js +0 -10
  66. package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
  67. package/lib/view/spendManagement/billPay/billList/billListState.js +0 -1
  68. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
  69. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
  70. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
  71. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +0 -1
  72. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
  73. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +1 -1
  74. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
  75. package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
  76. package/package.json +1 -1
  77. package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -29
  78. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +0 -8
  79. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -33
@@ -51,7 +51,6 @@ const getRemiList = (state, currentTimePeriod, isBulkActionFeatureEnabled) => {
51
51
  return {
52
52
  ...reimbursement,
53
53
  submittedBy: (0, userSelector_1.getUserByUserId)(userState, reimbursement.reimburseeUserId),
54
- createdByUser: (0, userSelector_1.getUserByUserId)(userState, reimbursement.createdBy),
55
54
  approvers: approvers,
56
55
  };
57
56
  });
@@ -424,14 +423,6 @@ const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements) => {
424
423
  reimbursementsWithNoSortKeyValue.push(reimbursement);
425
424
  }
426
425
  break;
427
- case 'createdBy':
428
- if (reimbursement.createdByUser != null) {
429
- reimbursementsWithSortKeyValue.push(reimbursement);
430
- }
431
- else {
432
- reimbursementsWithNoSortKeyValue.push(reimbursement);
433
- }
434
- break;
435
426
  }
436
427
  });
437
428
  const getColumnWiseSortOrder = (sortOrder) => {
@@ -439,7 +430,6 @@ const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements) => {
439
430
  case 'reportName':
440
431
  case 'type':
441
432
  case 'status':
442
- case 'createdBy':
443
433
  return sortOrder === 'ascending' ? 'asc' : 'desc';
444
434
  default:
445
435
  return sortOrder === 'ascending' ? 'desc' : 'asc';
@@ -459,8 +449,6 @@ const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements) => {
459
449
  return getStatusPerTab(reimbursement);
460
450
  case 'amount':
461
451
  return reimbursement.amount.amount ?? 0;
462
- case 'createdBy':
463
- return `${reimbursement.createdByUser?.firstName ?? ''} ${reimbursement.createdByUser?.lastName ?? ''}`.toLowerCase();
464
452
  }
465
453
  }, getColumnWiseSortOrder(sortOrder));
466
454
  return [
@@ -38,7 +38,7 @@ export declare const toRemiSubTabTypeStrict: (v: string) => "rejected" | "failed
38
38
  export type RemiSubTabType = ReturnType<typeof toRemiSubTabType>;
39
39
  export declare const toRemiSubTabUnderScoreType: (v: string) => "rejected" | "failed" | "ach" | "wire" | "cancelled" | "deleted" | "overdue" | "all" | "awaiting_approval" | "awaiting_my_approval" | "my_drafts" | "awaiting_all_approval";
40
40
  export type RemiSubTabUnderScoreType = ReturnType<typeof toRemiSubTabUnderScoreType>;
41
- declare const toReimbursementSortKeyType: (v: string) => "amount" | "status" | "type" | "createdBy" | "submittedOn" | "reportName";
41
+ declare const toReimbursementSortKeyType: (v: string) => "amount" | "status" | "type" | "submittedOn" | "reportName";
42
42
  export type ReimbursementViewSortKey = ReturnType<typeof toReimbursementSortKeyType>;
43
43
  export interface ReimbursementFilters {
44
44
  categories: ReimbursementFilterCategory[];
@@ -64,7 +64,6 @@ exports.toRemiSubTabUnderScoreType = toRemiSubTabUnderScoreType;
64
64
  const ALL_REIMBURSEMENT_SORT_KEYS = [
65
65
  'reportName',
66
66
  'submittedOn',
67
- 'createdBy',
68
67
  'type',
69
68
  'status',
70
69
  'amount',
@@ -98,11 +98,11 @@ exports.allTaskStatus = [
98
98
  },
99
99
  {
100
100
  code: 'done',
101
- name: 'In Review',
101
+ name: 'Done',
102
102
  },
103
103
  {
104
104
  code: 'resolved',
105
- name: 'Complete',
105
+ name: 'Resolved',
106
106
  },
107
107
  ];
108
108
  exports.allTaskPriority = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.19.90-betaSS3",
3
+ "version": "4.19.90-betaSS4",
4
4
  "description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/esm/index.js",
@@ -1,29 +0,0 @@
1
- import { of } from 'rxjs';
2
- import { catchError, filter, mergeMap } from 'rxjs/operators';
3
- import { createZeniAPIStatus, isSuccessResponse } from '../../../responsePayload';
4
- import { fetchSuggestedQuestions, fetchSuggestedQuestionsFailure, fetchSuggestedQuestionsSuccess, } from '../aiCfoViewReducer';
5
- /** GET {aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?page_context=... */
6
- export const fetchSuggestedQuestionsEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchSuggestedQuestions.match),
7
- // mergeMap (not switchMap): each page_context is keyed separately in Redux; switchMap
8
- // would cancel in-flight HTTP for context A when B is requested, leaving A stuck In-Progress.
9
- mergeMap((action) => {
10
- const { pageContext } = action.payload;
11
- const query = new URLSearchParams({ page_context: pageContext });
12
- const url = `${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?${query.toString()}`;
13
- return zeniAPI.getJSON(url).pipe(mergeMap((response) => {
14
- if (isSuccessResponse(response) && response.data != null) {
15
- return of(fetchSuggestedQuestionsSuccess({
16
- pageContext: response.data.page_context,
17
- generatedAt: response.data.generated_at,
18
- suggestedQuestions: response.data.suggested_questions,
19
- }));
20
- }
21
- return of(fetchSuggestedQuestionsFailure({
22
- pageContext,
23
- error: response.status,
24
- }));
25
- }), catchError((error) => of(fetchSuggestedQuestionsFailure({
26
- pageContext,
27
- error: createZeniAPIStatus('Unexpected Error', 'Fetch suggested questions REST API call failed', error instanceof Error ? { message: error.message } : undefined),
28
- }))));
29
- }));
@@ -1,8 +0,0 @@
1
- import { ActionsObservable, StateObservable } from 'redux-observable';
2
- import { Observable } from 'rxjs';
3
- import { RootState } from '../../../reducer';
4
- import { ZeniAPI } from '../../../zeniAPI';
5
- import { fetchSuggestedQuestions, fetchSuggestedQuestionsFailure, fetchSuggestedQuestionsSuccess } from '../aiCfoViewReducer';
6
- export type ActionType = ReturnType<typeof fetchSuggestedQuestions> | ReturnType<typeof fetchSuggestedQuestionsSuccess> | ReturnType<typeof fetchSuggestedQuestionsFailure>;
7
- /** GET {aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?page_context=... */
8
- export declare const fetchSuggestedQuestionsEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fetchSuggestedQuestionsEpic = void 0;
4
- const rxjs_1 = require("rxjs");
5
- const operators_1 = require("rxjs/operators");
6
- const responsePayload_1 = require("../../../responsePayload");
7
- const aiCfoViewReducer_1 = require("../aiCfoViewReducer");
8
- /** GET {aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?page_context=... */
9
- const fetchSuggestedQuestionsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(aiCfoViewReducer_1.fetchSuggestedQuestions.match),
10
- // mergeMap (not switchMap): each page_context is keyed separately in Redux; switchMap
11
- // would cancel in-flight HTTP for context A when B is requested, leaving A stuck In-Progress.
12
- (0, operators_1.mergeMap)((action) => {
13
- const { pageContext } = action.payload;
14
- const query = new URLSearchParams({ page_context: pageContext });
15
- const url = `${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?${query.toString()}`;
16
- return zeniAPI.getJSON(url).pipe((0, operators_1.mergeMap)((response) => {
17
- if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
18
- return (0, rxjs_1.of)((0, aiCfoViewReducer_1.fetchSuggestedQuestionsSuccess)({
19
- pageContext: response.data.page_context,
20
- generatedAt: response.data.generated_at,
21
- suggestedQuestions: response.data.suggested_questions,
22
- }));
23
- }
24
- return (0, rxjs_1.of)((0, aiCfoViewReducer_1.fetchSuggestedQuestionsFailure)({
25
- pageContext,
26
- error: response.status,
27
- }));
28
- }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, aiCfoViewReducer_1.fetchSuggestedQuestionsFailure)({
29
- pageContext,
30
- error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch suggested questions REST API call failed', error instanceof Error ? { message: error.message } : undefined),
31
- }))));
32
- }));
33
- exports.fetchSuggestedQuestionsEpic = fetchSuggestedQuestionsEpic;