@zeniai/client-epic-state 5.0.95 → 5.0.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.d.ts +1 -1
- package/lib/entity/aiCfo/aiCfoPayload.d.ts +5 -63
- package/lib/entity/aiCfo/aiCfoReducer.d.ts +2 -23
- package/lib/entity/aiCfo/aiCfoReducer.js +9 -249
- package/lib/entity/aiCfo/aiCfoSelector.d.ts +1 -4
- package/lib/entity/aiCfo/aiCfoSelector.js +1 -19
- package/lib/entity/aiCfo/aiCfoState.d.ts +4 -97
- package/lib/entity/aiCfo/aiCfoState.js +1 -18
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +0 -1
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +0 -7
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +0 -2
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +0 -3
- package/lib/entity/task/taskPayload.d.ts +1 -3
- package/lib/entity/task/taskPayload.js +0 -2
- package/lib/entity/task/taskState.d.ts +0 -2
- package/lib/entity/tenant/clearAllEpic.d.ts +2 -6
- package/lib/entity/tenant/clearAllEpic.js +0 -8
- package/lib/epic.d.ts +3 -18
- package/lib/epic.js +3 -18
- package/lib/esm/entity/aiCfo/aiCfoReducer.js +9 -249
- package/lib/esm/entity/aiCfo/aiCfoSelector.js +1 -17
- package/lib/esm/entity/aiCfo/aiCfoState.js +0 -15
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +0 -7
- package/lib/esm/entity/snackbar/snackbarTypes.js +0 -3
- package/lib/esm/entity/task/taskPayload.js +0 -2
- package/lib/esm/entity/tenant/clearAllEpic.js +0 -8
- package/lib/esm/epic.js +3 -18
- package/lib/esm/index.js +10 -40
- package/lib/esm/reducer.js +0 -12
- package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +3 -6
- package/lib/esm/view/aiCfoView/epics/createSessionAndSubmitEpic.js +2 -5
- package/lib/esm/view/aiCfoView/epics/createSessionEpic.js +1 -2
- package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +2 -12
- package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewReducer.js +11 -39
- package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewSelector.js +4 -14
- package/lib/esm/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +28 -37
- package/lib/esm/view/companyView/epic/fetchAllCockpitViewsEpic.js +2 -2
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -25
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.js +2 -2
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +4 -42
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +0 -35
- package/lib/index.d.ts +12 -47
- package/lib/index.js +22 -193
- package/lib/reducer.d.ts +0 -12
- package/lib/reducer.js +0 -12
- package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +2 -11
- package/lib/view/aiCfoView/aiCfoViewReducer.js +3 -6
- package/lib/view/aiCfoView/epics/createSessionAndSubmitEpic.js +2 -5
- package/lib/view/aiCfoView/epics/createSessionEpic.js +1 -2
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +1 -8
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +2 -12
- package/lib/view/companyTaskManagerView/companyTaskManagerViewPayload.d.ts +11 -19
- package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.d.ts +4 -10
- package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.js +12 -40
- package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.d.ts +0 -2
- package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.js +3 -13
- package/lib/view/companyTaskManagerView/companyTaskManagerViewState.d.ts +3 -11
- package/lib/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.d.ts +3 -1
- package/lib/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +28 -37
- package/lib/view/companyView/epic/fetchAllCockpitViewsEpic.js +2 -2
- package/lib/view/companyView/types/cockpitTypes.d.ts +1 -2
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +1 -1
- package/lib/view/people/peopleTypes.d.ts +1 -1
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +0 -14
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +1 -27
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.d.ts +2 -2
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.js +1 -1
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.d.ts +2 -12
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +5 -43
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.d.ts +0 -7
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +1 -42
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.d.ts +0 -5
- package/lib/view/taskManager/taskListView/taskListReducer.d.ts +1 -1
- package/lib/view/transactionDetail/journalEntryLinesViewModel.d.ts +1 -1
- package/package.json +1 -1
- package/lib/entity/cardPolicy/cardPolicyPayload.d.ts +0 -277
- package/lib/entity/cardPolicy/cardPolicyPayload.js +0 -143
- package/lib/entity/cardPolicy/cardPolicyReducer.d.ts +0 -19
- package/lib/entity/cardPolicy/cardPolicyReducer.js +0 -175
- package/lib/entity/cardPolicy/cardPolicySelector.d.ts +0 -32
- package/lib/entity/cardPolicy/cardPolicySelector.js +0 -99
- package/lib/entity/cardPolicy/cardPolicyState.d.ts +0 -205
- package/lib/entity/cardPolicy/cardPolicyState.js +0 -14
- package/lib/entity/cardPolicy/extractPolicyDocumentEpic.d.ts +0 -18
- package/lib/entity/cardPolicy/extractPolicyDocumentEpic.js +0 -68
- package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.d.ts +0 -26
- package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +0 -47
- package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.d.ts +0 -25
- package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +0 -39
- package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.d.ts +0 -24
- package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.js +0 -105
- package/lib/esm/entity/cardPolicy/cardPolicyPayload.js +0 -130
- package/lib/esm/entity/cardPolicy/cardPolicyReducer.js +0 -171
- package/lib/esm/entity/cardPolicy/cardPolicySelector.js +0 -75
- package/lib/esm/entity/cardPolicy/cardPolicyState.js +0 -9
- package/lib/esm/entity/cardPolicy/extractPolicyDocumentEpic.js +0 -64
- package/lib/esm/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +0 -43
- package/lib/esm/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +0 -35
- package/lib/esm/entity/cardPolicy/policyRecommendationFromUploadEpic.js +0 -101
- package/lib/esm/view/companyTaskManagerView/epics/fetchCockpitContextEpic.js +0 -38
- package/lib/esm/view/companyTaskManagerView/epics/updateCompanyTaskManagerViewFiltersEpic.js +0 -16
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +0 -52
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +0 -22
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +0 -1
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +0 -36
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +0 -39
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +0 -34
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +0 -58
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +0 -21
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +0 -1
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +0 -38
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.js +0 -289
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.js +0 -109
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.js +0 -44
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.js +0 -111
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.js +0 -25
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.js +0 -363
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.js +0 -36
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.js +0 -19
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.js +0 -6
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.js +0 -119
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +0 -154
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +0 -22
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +0 -1
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +0 -39
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.js +0 -140
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +0 -20
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.js +0 -100
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.js +0 -96
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.js +0 -59
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.js +0 -24
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.js +0 -1
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.js +0 -34
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.js +0 -57
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.js +0 -35
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.js +0 -62
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.js +0 -44
- package/lib/view/companyTaskManagerView/epics/fetchCockpitContextEpic.d.ts +0 -10
- package/lib/view/companyTaskManagerView/epics/fetchCockpitContextEpic.js +0 -42
- package/lib/view/companyTaskManagerView/epics/updateCompanyTaskManagerViewFiltersEpic.d.ts +0 -6
- package/lib/view/companyTaskManagerView/epics/updateCompanyTaskManagerViewFiltersEpic.js +0 -20
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.d.ts +0 -14
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +0 -56
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.d.ts +0 -15
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +0 -28
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.d.ts +0 -8
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +0 -2
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.d.ts +0 -8
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +0 -40
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.d.ts +0 -8
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +0 -43
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.d.ts +0 -8
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +0 -38
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.d.ts +0 -15
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +0 -62
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.d.ts +0 -15
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +0 -27
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.d.ts +0 -7
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +0 -2
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.d.ts +0 -8
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +0 -42
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.d.ts +0 -8
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.js +0 -294
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.d.ts +0 -8
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.js +0 -113
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.d.ts +0 -9
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.js +0 -48
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.d.ts +0 -8
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.js +0 -115
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.d.ts +0 -13
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.js +0 -29
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.d.ts +0 -14
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.js +0 -369
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.d.ts +0 -6
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.js +0 -40
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.d.ts +0 -7
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.js +0 -26
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.d.ts +0 -116
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.js +0 -10
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.d.ts +0 -33
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.js +0 -126
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.d.ts +0 -52
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +0 -158
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.d.ts +0 -11
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +0 -31
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.d.ts +0 -12
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +0 -2
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.d.ts +0 -8
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +0 -43
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.d.ts +0 -10
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.js +0 -144
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.d.ts +0 -7
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +0 -24
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.d.ts +0 -11
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.js +0 -104
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.d.ts +0 -22
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.js +0 -100
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.d.ts +0 -8
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.js +0 -63
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.d.ts +0 -3
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.js +0 -28
- package/lib/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.d.ts +0 -34
- package/lib/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.js +0 -2
- package/lib/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.d.ts +0 -7
- package/lib/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.js +0 -38
- package/lib/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.d.ts +0 -12
- package/lib/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.js +0 -61
- package/lib/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.d.ts +0 -9
- package/lib/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.js +0 -39
- package/lib/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.d.ts +0 -11
- package/lib/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.js +0 -66
- package/lib/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.d.ts +0 -3
- package/lib/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.js +0 -48
|
@@ -3,8 +3,7 @@ export const initialUIState = {
|
|
|
3
3
|
filterText: '',
|
|
4
4
|
sortKey: 'dueDate',
|
|
5
5
|
sortOrder: 'descending',
|
|
6
|
-
|
|
7
|
-
filters: {},
|
|
6
|
+
pageToken: null,
|
|
8
7
|
};
|
|
9
8
|
const initialMetrics = {
|
|
10
9
|
closed: 0,
|
|
@@ -19,13 +18,6 @@ export const initialState = {
|
|
|
19
18
|
metrics: initialMetrics,
|
|
20
19
|
metricsFetchState: 'Not-Started',
|
|
21
20
|
uiState: initialUIState,
|
|
22
|
-
cockpitContext: {
|
|
23
|
-
fetchState: 'Not-Started',
|
|
24
|
-
error: undefined,
|
|
25
|
-
companyIds: [],
|
|
26
|
-
userIds: [],
|
|
27
|
-
userGroupIds: [],
|
|
28
|
-
},
|
|
29
21
|
hasValidState() {
|
|
30
22
|
return this.fetchState == 'Completed';
|
|
31
23
|
},
|
|
@@ -36,11 +28,10 @@ const companyTaskManagerView = createSlice({
|
|
|
36
28
|
initialState,
|
|
37
29
|
reducers: {
|
|
38
30
|
fetchCompanyTaskManagerView: {
|
|
39
|
-
prepare(
|
|
31
|
+
prepare(pageToken, sortKey, sortOrder, keepExistingListItems = true, searchString) {
|
|
40
32
|
return {
|
|
41
33
|
payload: {
|
|
42
|
-
|
|
43
|
-
filters,
|
|
34
|
+
pageToken,
|
|
44
35
|
searchString,
|
|
45
36
|
sortKey,
|
|
46
37
|
sortOrder,
|
|
@@ -49,10 +40,10 @@ const companyTaskManagerView = createSlice({
|
|
|
49
40
|
};
|
|
50
41
|
},
|
|
51
42
|
reducer(draft, action) {
|
|
52
|
-
const {
|
|
43
|
+
const { pageToken, searchString, sortKey, sortOrder, keepExistingListItems, } = action.payload;
|
|
53
44
|
draft.uiState.sortKey = sortKey;
|
|
54
45
|
draft.uiState.sortOrder = sortOrder;
|
|
55
|
-
draft.uiState.
|
|
46
|
+
draft.uiState.pageToken = pageToken;
|
|
56
47
|
if (keepExistingListItems === false) {
|
|
57
48
|
draft.taskIds = [];
|
|
58
49
|
}
|
|
@@ -65,14 +56,15 @@ const companyTaskManagerView = createSlice({
|
|
|
65
56
|
},
|
|
66
57
|
updateCompanyTaskManagerViewOnSuccess(draft, action) {
|
|
67
58
|
const { data } = action.payload;
|
|
68
|
-
const tasks = data
|
|
59
|
+
const { tasks, query, total_count } = data;
|
|
69
60
|
draft.fetchState = 'Completed';
|
|
70
61
|
draft.error = undefined;
|
|
71
62
|
draft.taskIds = [...draft.taskIds, ...tasks.map((task) => task.task_id)];
|
|
72
|
-
|
|
73
|
-
|
|
63
|
+
// consider total count only when fetching for first time
|
|
64
|
+
if (draft.uiState.filterText === '' && draft.uiState.pageToken == null) {
|
|
65
|
+
draft.totalTaskCount = total_count;
|
|
74
66
|
}
|
|
75
|
-
draft.uiState.
|
|
67
|
+
draft.uiState.pageToken = query.page_token;
|
|
76
68
|
},
|
|
77
69
|
updateCompanyTaskManagerViewOnFailure: {
|
|
78
70
|
reducer(draft, action) {
|
|
@@ -93,30 +85,10 @@ const companyTaskManagerView = createSlice({
|
|
|
93
85
|
updateTaskManagerMetricsOnFailure(draft) {
|
|
94
86
|
draft.metricsFetchState = 'Error';
|
|
95
87
|
},
|
|
96
|
-
updateCompanyTaskManagerViewFilters(draft, action) {
|
|
97
|
-
if (action.payload.filters != null) {
|
|
98
|
-
draft.uiState.filters = action.payload.filters;
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
fetchCockpitContext(draft) {
|
|
102
|
-
draft.cockpitContext.fetchState = 'In-Progress';
|
|
103
|
-
draft.cockpitContext.error = undefined;
|
|
104
|
-
},
|
|
105
|
-
updateCockpitContextOnSuccess(draft, action) {
|
|
106
|
-
draft.cockpitContext.fetchState = 'Completed';
|
|
107
|
-
draft.cockpitContext.error = undefined;
|
|
108
|
-
draft.cockpitContext.companyIds = action.payload.companyIds;
|
|
109
|
-
draft.cockpitContext.userIds = action.payload.userIds;
|
|
110
|
-
draft.cockpitContext.userGroupIds = action.payload.userGroupIds;
|
|
111
|
-
},
|
|
112
|
-
updateCockpitContextOnFailure(draft, action) {
|
|
113
|
-
draft.cockpitContext.fetchState = 'Error';
|
|
114
|
-
draft.cockpitContext.error = action.payload;
|
|
115
|
-
},
|
|
116
88
|
clearCompanyTaskManagerView(draft) {
|
|
117
89
|
Object.assign(draft, initialState);
|
|
118
90
|
},
|
|
119
91
|
},
|
|
120
92
|
});
|
|
121
|
-
export const { fetchCompanyTaskManagerView, updateCompanyTaskManagerViewOnSuccess, updateCompanyTaskManagerViewOnFailure, fetchTaskManagerMetrics, updateTaskManagerMetrics, updateTaskManagerMetricsOnFailure, clearCompanyTaskManagerView,
|
|
93
|
+
export const { fetchCompanyTaskManagerView, updateCompanyTaskManagerViewOnSuccess, updateCompanyTaskManagerViewOnFailure, fetchTaskManagerMetrics, updateTaskManagerMetrics, updateTaskManagerMetricsOnFailure, clearCompanyTaskManagerView, } = companyTaskManagerView.actions;
|
|
122
94
|
export default companyTaskManagerView.reducer;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { createSelector } from '@reduxjs/toolkit';
|
|
2
|
-
import {
|
|
3
|
-
import { getCompanyByCompanyId, getCompanyByCompanyIds, } from '../../entity/company/companySelector';
|
|
2
|
+
import { getCompanyByCompanyId } from '../../entity/company/companySelector';
|
|
4
3
|
import { getTagsByIds } from '../../entity/tag/tagSelector';
|
|
5
4
|
import { getTaskById } from '../../entity/task/taskSelector';
|
|
6
5
|
import { getUserByUserId, getUsersByUserIds, } from '../../entity/user/userSelector';
|
|
7
6
|
export const getCompanyTaskManagerView = createSelector((state) => state.companyTaskManagerViewState, (state) => state.companyState, (state) => state.userState, (state) => state.taskState, (state) => state.tagState, (companyTaskManagerViewState, companyState, userState, taskState, tagState) => {
|
|
8
|
-
const { taskIds, uiState, totalTaskCount, metrics, metricsFetchState } = companyTaskManagerViewState;
|
|
7
|
+
const { taskIds, uiState, fetchState, error, totalTaskCount, metrics, metricsFetchState, } = companyTaskManagerViewState;
|
|
9
8
|
const tasksList = [];
|
|
10
9
|
taskIds.forEach((taskId) => {
|
|
11
10
|
const task = getTaskById(taskState, taskId);
|
|
@@ -27,22 +26,13 @@ export const getCompanyTaskManagerView = createSelector((state) => state.company
|
|
|
27
26
|
}
|
|
28
27
|
}
|
|
29
28
|
});
|
|
30
|
-
const allCompanyIds = companyTaskManagerViewState.cockpitContext.companyIds;
|
|
31
|
-
const companies = getCompanyByCompanyIds(companyState, allCompanyIds).map((c) => c.company);
|
|
32
|
-
const users = getUsersByUserIds(userState, companyTaskManagerViewState.cockpitContext.userIds);
|
|
33
|
-
const fetchStateAndError = reduceAnyFetchState([
|
|
34
|
-
companyTaskManagerViewState,
|
|
35
|
-
companyTaskManagerViewState.cockpitContext,
|
|
36
|
-
]);
|
|
37
29
|
return {
|
|
38
|
-
companies,
|
|
39
30
|
metrics,
|
|
40
31
|
metricsFetchState,
|
|
41
32
|
tasksList,
|
|
42
33
|
uiState,
|
|
43
|
-
fetchState
|
|
44
|
-
error
|
|
34
|
+
fetchState,
|
|
35
|
+
error,
|
|
45
36
|
totalTaskCount,
|
|
46
|
-
users,
|
|
47
37
|
};
|
|
48
38
|
});
|
|
@@ -1,35 +1,51 @@
|
|
|
1
1
|
import { from } from 'rxjs';
|
|
2
2
|
import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
|
|
3
3
|
import { getSortOrder } from '../../../commonPayloadTypes/sortOrderPayload';
|
|
4
|
+
import { updateCompanies } from '../../../entity/company/companyReducer';
|
|
4
5
|
import { updateTags } from '../../../entity/tag/tagReducer';
|
|
5
6
|
import { updateTasks } from '../../../entity/task/taskReducer';
|
|
7
|
+
import { updateAllUsers } from '../../../entity/user/userReducer';
|
|
6
8
|
import { createZeniAPIStatus, isSuccessResponse } from '../../../responsePayload';
|
|
7
9
|
import { fetchCompanyTaskManagerView, updateCompanyTaskManagerViewOnFailure, updateCompanyTaskManagerViewOnSuccess, } from '../companyTaskManagerViewReducer';
|
|
8
|
-
const
|
|
10
|
+
const toSortKeyPayload = (sortKey) => {
|
|
11
|
+
switch (sortKey) {
|
|
12
|
+
case 'taskName':
|
|
13
|
+
return 'name';
|
|
14
|
+
case 'dueDate':
|
|
15
|
+
return 'due_date';
|
|
16
|
+
case 'createdBy':
|
|
17
|
+
return 'created_by';
|
|
18
|
+
case 'name':
|
|
19
|
+
return 'company_name';
|
|
20
|
+
default:
|
|
21
|
+
return sortKey;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
9
24
|
export const fetchCompanyTaskManagerViewEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchCompanyTaskManagerView.match), switchMap((action) => {
|
|
10
|
-
const {
|
|
25
|
+
const { pageToken, sortKey, sortOrder, searchString } = action.payload;
|
|
11
26
|
const queryValue = {
|
|
12
|
-
|
|
13
|
-
from: fromOffset,
|
|
14
|
-
global_search: searchString ?? '',
|
|
27
|
+
page_token: pageToken,
|
|
15
28
|
sort_by: toSortKeyPayload(sortKey),
|
|
16
29
|
sort_order: getSortOrder(sortOrder),
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
? { filter_by: toFilterByPayload(filters) }
|
|
20
|
-
: {}),
|
|
30
|
+
search_text: searchString ?? '',
|
|
31
|
+
view: 'cockpit_task_manager_view',
|
|
21
32
|
};
|
|
22
33
|
return zeniAPI
|
|
23
|
-
.getJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/cockpit-panels/tasks
|
|
34
|
+
.getJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/cockpit-panels/tasks?query=${encodeURIComponent(JSON.stringify(queryValue))}`)
|
|
24
35
|
.pipe(mergeMap((response) => {
|
|
25
36
|
if (isSuccessResponse(response) && response.data != null) {
|
|
26
|
-
const tasksList = response.data.
|
|
37
|
+
const tasksList = response.data.tasks;
|
|
27
38
|
const actions = [
|
|
28
39
|
updateCompanyTaskManagerViewOnSuccess({
|
|
29
40
|
data: response.data,
|
|
30
41
|
}),
|
|
31
42
|
updateTasks(tasksList),
|
|
32
|
-
|
|
43
|
+
updateCompanies({
|
|
44
|
+
payload: response.data.companies,
|
|
45
|
+
schema: {},
|
|
46
|
+
}),
|
|
47
|
+
updateTags(tasksList.map((task) => task.tags).flat()),
|
|
48
|
+
updateAllUsers({ users: response.data.users }),
|
|
33
49
|
];
|
|
34
50
|
return from(actions);
|
|
35
51
|
}
|
|
@@ -46,28 +62,3 @@ export const fetchCompanyTaskManagerViewEpic = (actions$, _state$, zeniAPI) => a
|
|
|
46
62
|
return from(actions);
|
|
47
63
|
}));
|
|
48
64
|
}));
|
|
49
|
-
const toSortKeyPayload = (sortKey) => {
|
|
50
|
-
switch (sortKey) {
|
|
51
|
-
case 'taskName':
|
|
52
|
-
return 'name';
|
|
53
|
-
case 'dueDate':
|
|
54
|
-
return 'due_date';
|
|
55
|
-
case 'createdBy':
|
|
56
|
-
return 'created_by';
|
|
57
|
-
case 'name':
|
|
58
|
-
return 'company_name';
|
|
59
|
-
default:
|
|
60
|
-
return sortKey;
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
const toFilterByPayload = (filters) => {
|
|
64
|
-
if (filters.categories == null) {
|
|
65
|
-
return [];
|
|
66
|
-
}
|
|
67
|
-
return filters.categories.map((category) => ({
|
|
68
|
-
field: category.field ?? '',
|
|
69
|
-
operator: category.matchingOperator === 'equal' ? 'is' : 'is_not',
|
|
70
|
-
values: category.values.map((v) => String(v)),
|
|
71
|
-
join: category.valuesCombinationOperator === 'ALL' ? 'and' : 'or',
|
|
72
|
-
}));
|
|
73
|
-
};
|
|
@@ -21,7 +21,7 @@ export const fetchAllCockpitViewsEpic = (actions$, state$) => actions$.pipe(filt
|
|
|
21
21
|
fetchReviewCompanyView(),
|
|
22
22
|
fetchCompanyHealthMetricView(),
|
|
23
23
|
fetchCompanyMetaData(),
|
|
24
|
-
fetchCompanyTaskManagerView(
|
|
24
|
+
fetchCompanyTaskManagerView(null, 'dueDate', 'descending', false),
|
|
25
25
|
fetchCompanyHealthMetricConfig(),
|
|
26
26
|
]);
|
|
27
27
|
}
|
|
@@ -74,7 +74,7 @@ export const fetchAllCockpitViewsEpic = (actions$, state$) => actions$.pipe(filt
|
|
|
74
74
|
}
|
|
75
75
|
if (state.companyTaskManagerViewState.fetchState !== 'In-Progress' &&
|
|
76
76
|
state.companyTaskManagerViewState.hasValidState() === false) {
|
|
77
|
-
fetchActions.push(fetchCompanyTaskManagerView(
|
|
77
|
+
fetchActions.push(fetchCompanyTaskManagerView(null, 'dueDate', 'descending', false));
|
|
78
78
|
}
|
|
79
79
|
return from(fetchActions);
|
|
80
80
|
}
|
|
@@ -87,31 +87,6 @@ export const getChargeCardListView = (state, includeCreditAccountDebitSummaryAnd
|
|
|
87
87
|
hasDebitCard,
|
|
88
88
|
};
|
|
89
89
|
};
|
|
90
|
-
/**
|
|
91
|
-
* Returns every enriched `ChargeCardWithUser` for the tenant, without
|
|
92
|
-
* applying the cards-list screen's `searchText` filter or its column
|
|
93
|
-
* `sortKey/sortOrder`. Used by surfaces that need the raw card universe
|
|
94
|
-
* decoupled from whatever the user has typed/sorted on the cards list
|
|
95
|
-
* (e.g. the Card Policy "Apply to Cards" picker, which owns its own
|
|
96
|
-
* search + sort UI). The list-screen's filter/sort state is intentionally
|
|
97
|
-
* left untouched so revisits to the cards list still restore the user's
|
|
98
|
-
* search.
|
|
99
|
-
*/
|
|
100
|
-
export const getAllChargeCardsWithUser = (state) => {
|
|
101
|
-
const { chargeCardListState, chargeCardState, chargeCardConfigState } = state;
|
|
102
|
-
const cards = getChargeCardsByIds(chargeCardState, chargeCardListState.cardIds);
|
|
103
|
-
const chargeCardsWithUser = getChargeCardsWithUser(cards, state);
|
|
104
|
-
const fetchState = reduceFetchState([
|
|
105
|
-
chargeCardListState,
|
|
106
|
-
chargeCardConfigState,
|
|
107
|
-
]).fetchState;
|
|
108
|
-
return {
|
|
109
|
-
fetchState,
|
|
110
|
-
error: chargeCardListState.error,
|
|
111
|
-
cards: chargeCardsWithUser,
|
|
112
|
-
version: '1.0',
|
|
113
|
-
};
|
|
114
|
-
};
|
|
115
90
|
export const getMyPendingActivationChargeCardListView = (state) => {
|
|
116
91
|
const { tenantState, chargeCardListState, chargeCardState } = state;
|
|
117
92
|
const cards = getChargeCardsByIds(chargeCardState, chargeCardListState.cardIds);
|
|
@@ -7,7 +7,7 @@ import { updateAllUsers } from '../../../../entity/user/userReducer';
|
|
|
7
7
|
import { updateUserRoles } from '../../../../entity/userRole/userRoleReducer';
|
|
8
8
|
import { createZeniAPIStatus, isSuccessStatus, } from '../../../../responsePayload';
|
|
9
9
|
import { updateChargeCardList } from '../chargeCardList/chargeCardListReducer';
|
|
10
|
-
import { issueChargeCardSuccessOrFailure, issueChargeCards, updateChargeCardCount, updateDebitCardCount,
|
|
10
|
+
import { issueChargeCardSuccessOrFailure, issueChargeCards, updateChargeCardCount, updateDebitCardCount, updateLastSelfIssuedDebitCardId, } from './issueChargeCardReducer';
|
|
11
11
|
export const issueChargeCardEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(issueChargeCards.match), switchMap(() => {
|
|
12
12
|
const state = state$.value;
|
|
13
13
|
const loggedInUserId = state$.value.tenantState.loggedInUser?.userId;
|
|
@@ -87,7 +87,7 @@ export const issueChargeCardEpic = (actions$, state$, zeniAPI) => actions$.pipe(
|
|
|
87
87
|
actions.push(updateChargeCards(issuedCards), updateAllUsers({ users: response.data.users }), updateUserRoles(response.data.user_roles), updateChargeCardList({
|
|
88
88
|
chargeCardListPayload: response.data,
|
|
89
89
|
keepExistingListItems: true,
|
|
90
|
-
}), updateAddresses(response.data.addresses), updateChargeCardCount(response.data?.cards_count_by_user_id ?? []), updateDebitCardCount(response.data?.debit_cards_count_by_deposit_account_id ?? {}),
|
|
90
|
+
}), updateAddresses(response.data.addresses), updateChargeCardCount(response.data?.cards_count_by_user_id ?? []), updateDebitCardCount(response.data?.debit_cards_count_by_deposit_account_id ?? {}), issueChargeCardSuccessOrFailure({ fetchState: 'Completed' }));
|
|
91
91
|
if (issuedCards.length === 1 &&
|
|
92
92
|
(issuedCards[0].card_type.code ===
|
|
93
93
|
'business_virtual_debit_card' ||
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
-
import { applyAiCardCreationFormDraftUpdate } from './applyAiCardCreationFormDraftUpdate';
|
|
3
|
-
import { buildAiCardCreationFormDraftSeed } from './buildAiCardCreationFormDraftSeed';
|
|
4
2
|
export const initialState = {
|
|
5
3
|
depositAccountIds: [],
|
|
6
4
|
depositAccountsFetchState: { fetchState: 'Not-Started', error: undefined },
|
|
@@ -16,7 +14,6 @@ export const initialState = {
|
|
|
16
14
|
},
|
|
17
15
|
activeChargeCardCount: {},
|
|
18
16
|
activeDebitCardCountByDepositAccountId: {},
|
|
19
|
-
lastIssuedCardIds: [],
|
|
20
17
|
};
|
|
21
18
|
const issueChargeCard = createSlice({
|
|
22
19
|
name: 'issueChargeCard',
|
|
@@ -37,19 +34,14 @@ const issueChargeCard = createSlice({
|
|
|
37
34
|
},
|
|
38
35
|
},
|
|
39
36
|
issueChargeCards: {
|
|
40
|
-
prepare(
|
|
41
|
-
return { payload:
|
|
37
|
+
prepare() {
|
|
38
|
+
return { payload: {} };
|
|
42
39
|
},
|
|
43
|
-
reducer(draft
|
|
40
|
+
reducer(draft) {
|
|
44
41
|
draft.saveStatus.fetchState = 'In-Progress';
|
|
45
42
|
draft.saveStatus.error = undefined;
|
|
46
|
-
draft.lastIssueSourceChatSessionId = action.payload.sourceChatSessionId;
|
|
47
|
-
draft.lastIssuedCardIds = [];
|
|
48
43
|
},
|
|
49
44
|
},
|
|
50
|
-
updateLastIssuedCardIds(draft, action) {
|
|
51
|
-
draft.lastIssuedCardIds = action.payload;
|
|
52
|
-
},
|
|
53
45
|
updateChargeCardsLocalStore(draft, action) {
|
|
54
46
|
draft.localData = action.payload;
|
|
55
47
|
},
|
|
@@ -57,8 +49,6 @@ const issueChargeCard = createSlice({
|
|
|
57
49
|
draft.localData = [...initialState.localData];
|
|
58
50
|
draft.saveStatus = initialState.saveStatus;
|
|
59
51
|
draft.lastSelfIssuedDebitCardId = undefined;
|
|
60
|
-
draft.lastIssueSourceChatSessionId = undefined;
|
|
61
|
-
draft.lastIssuedCardIds = [];
|
|
62
52
|
},
|
|
63
53
|
updateLastSelfIssuedDebitCardId(draft, action) {
|
|
64
54
|
draft.lastSelfIssuedDebitCardId = action.payload;
|
|
@@ -134,38 +124,10 @@ const issueChargeCard = createSlice({
|
|
|
134
124
|
draft.depositAccountsFetchState.fetchState = action.payload.fetchState;
|
|
135
125
|
draft.depositAccountsFetchState.error = action.payload.error;
|
|
136
126
|
},
|
|
137
|
-
// Dispatched once when `CardsCreationInteractiveForm` mounts (or the AI
|
|
138
|
-
// payload arrives).
|
|
139
|
-
seedAiCardCreationFormDraft: {
|
|
140
|
-
reducer(draft, action) {
|
|
141
|
-
const { draft: nextDraft, context } = buildAiCardCreationFormDraftSeed({
|
|
142
|
-
allUsers: action.payload.allUsers,
|
|
143
|
-
initialData: action.payload.initialData,
|
|
144
|
-
});
|
|
145
|
-
draft.aiCardCreationFormDraft = nextDraft;
|
|
146
|
-
draft.aiCardCreationFormDraftContext = context;
|
|
147
|
-
},
|
|
148
|
-
prepare(allUsers, initialData) {
|
|
149
|
-
return { payload: { allUsers, initialData } };
|
|
150
|
-
},
|
|
151
|
-
},
|
|
152
|
-
// Derivation lives in `applyAiCardCreationFormDraftUpdate` so the
|
|
153
|
-
// Storybook owner harness shares the same rules.
|
|
154
|
-
updateAiCardCreationFormDraft(draft, action) {
|
|
155
|
-
draft.aiCardCreationFormDraft = applyAiCardCreationFormDraftUpdate({
|
|
156
|
-
prev: draft.aiCardCreationFormDraft,
|
|
157
|
-
next: action.payload,
|
|
158
|
-
context: draft.aiCardCreationFormDraftContext,
|
|
159
|
-
});
|
|
160
|
-
},
|
|
161
|
-
clearAiCardCreationFormDraft(draft) {
|
|
162
|
-
draft.aiCardCreationFormDraft = undefined;
|
|
163
|
-
draft.aiCardCreationFormDraftContext = undefined;
|
|
164
|
-
},
|
|
165
127
|
clearIssueChargeCard(draft) {
|
|
166
128
|
Object.assign(draft, initialState);
|
|
167
129
|
},
|
|
168
130
|
},
|
|
169
131
|
});
|
|
170
|
-
export const { issueChargeCards, updateChargeCardsLocalStore, updateLastSelfIssuedDebitCardId,
|
|
132
|
+
export const { issueChargeCards, updateChargeCardsLocalStore, updateLastSelfIssuedDebitCardId, issueChargeCardSuccessOrFailure, resetIssueChargeCardForm, updateCustomAddressId, updateChargeCardCount, updateDebitCardCount, fetchIssueCardPage, updateDepositAccountsInCards, fetchDepositAccountListForCards, updateDepositAccountListForCardsFetchStatus, clearIssueChargeCard, } = issueChargeCard.actions;
|
|
171
133
|
export default issueChargeCard.reducer;
|
|
@@ -5,7 +5,6 @@ import { getDepositAccountLimitsForChargeCardByDepositAccountIds } from '../../.
|
|
|
5
5
|
import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
|
|
6
6
|
import { getNewAddress } from '../../../addressView/addressViewSelector';
|
|
7
7
|
import { getUserList } from '../../../userListView/userListViewSelector';
|
|
8
|
-
import { toIssueChargeCardLocalDataFromDraft } from './toIssueChargeCardLocalDataFromDraft';
|
|
9
8
|
export const getIssueChargeCardView = (state, isCreditCardEnabled, isDebitCardEnabled) => {
|
|
10
9
|
const { issueChargeCardState, userState, userRoleState, userListViewState, chargeCardConfigState, chargeCardListState, addressState, classState, depositAccountState, classListState, } = state;
|
|
11
10
|
const userListSelectorView = getUserList(userState, userRoleState, userListViewState, 'cardHolderCandidate');
|
|
@@ -94,37 +93,3 @@ export const getIssueChargeCardView = (state, isCreditCardEnabled, isDebitCardEn
|
|
|
94
93
|
lastSelfIssuedDebitCardId: issueChargeCardState.lastSelfIssuedDebitCardId,
|
|
95
94
|
};
|
|
96
95
|
};
|
|
97
|
-
// AI CFO chat session that triggered the most recent issue; lets the cards
|
|
98
|
-
// list screen attribute the pending placeholder + synthetic drawer bubble.
|
|
99
|
-
export const getLastIssueChargeCardsSourceChatSessionId = (state) => {
|
|
100
|
-
return state.issueChargeCardState.lastIssueSourceChatSessionId;
|
|
101
|
-
};
|
|
102
|
-
// Cards created by the most recent successful issue; AI CFO drawer's "Created"
|
|
103
|
-
// bubble maps back through these.
|
|
104
|
-
export const getLastIssuedChargeCardIds = (state) => {
|
|
105
|
-
return state.issueChargeCardState.lastIssuedCardIds;
|
|
106
|
-
};
|
|
107
|
-
export const getIssueChargeCardsSaveStatus = (state) => {
|
|
108
|
-
return state.issueChargeCardState.saveStatus;
|
|
109
|
-
};
|
|
110
|
-
// Mirrors `localData.length` while in flight so the list can render N skeleton
|
|
111
|
-
// rows at the top of the table.
|
|
112
|
-
export const getInFlightIssueChargeCardsCount = (state) => {
|
|
113
|
-
if (state.issueChargeCardState.saveStatus.fetchState !== 'In-Progress') {
|
|
114
|
-
return 0;
|
|
115
|
-
}
|
|
116
|
-
return state.issueChargeCardState.localData.length;
|
|
117
|
-
};
|
|
118
|
-
// Hydrates `CardsCreationInteractiveForm`'s RHF; `undefined` outside the
|
|
119
|
-
// seed/clear window.
|
|
120
|
-
export const getAiCardCreationFormDraft = (state) => {
|
|
121
|
-
return state.issueChargeCardState.aiCardCreationFormDraft;
|
|
122
|
-
};
|
|
123
|
-
// Returns [] when the draft is absent so callers can short-circuit submission.
|
|
124
|
-
export const selectIssueChargeCardLocalDataFromDraft = (state) => {
|
|
125
|
-
const draft = state.issueChargeCardState.aiCardCreationFormDraft;
|
|
126
|
-
if (draft == null) {
|
|
127
|
-
return [];
|
|
128
|
-
}
|
|
129
|
-
return toIssueChargeCardLocalDataFromDraft(draft);
|
|
130
|
-
};
|