@zeniai/client-epic-state 4.19.76 → 4.19.77-betaAK1

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.
@@ -161,10 +161,8 @@ const billPaySetupApproverView = (0, toolkit_1.createSlice)({
161
161
  reducer(draft, action) {
162
162
  const { approvalRuleIds, affectedEntityIds, newApprovalRuleId } = action.payload;
163
163
  if (draft.billPaySetupApproverViewUpdateData != null) {
164
- if (draft.billPaySetupApproverViewUpdateData.type ===
165
- 'approval_update' &&
166
- draft.billPaySetupApproverViewUpdateData.data
167
- ?.isApplicableOnPendingApprovalEntity === true) {
164
+ if (draft.billPaySetupApproverViewUpdateData.data
165
+ ?.isApplicableOnPendingApprovalEntity === true) {
168
166
  draft.listeningToPusherEvent = true;
169
167
  }
170
168
  draft.billPaySetupApproverViewUpdateData.updateStatus = {
@@ -40,11 +40,10 @@ const toApprovalChangableInfoPayload = (approverViewUpdateData) => {
40
40
  const payload = {
41
41
  criteria: criteriaPayload,
42
42
  steps,
43
+ is_applicable_on_pending_approval_entity: approverViewUpdateData.isApplicableOnPendingApprovalEntity ?? true,
43
44
  };
44
45
  if (isUpdate) {
45
46
  payload.approval_rule_id = approverViewUpdateData.approvalRuleId;
46
- payload.is_applicable_on_pending_approval_entity =
47
- approverViewUpdateData.isApplicableOnPendingApprovalEntity ?? false;
48
47
  }
49
48
  return payload;
50
49
  };
@@ -183,9 +183,8 @@ const remiSetupApproverView = (0, toolkit_1.createSlice)({
183
183
  reducer(draft, action) {
184
184
  const { approvalRuleIds, affectedEntityIds, newApprovalRuleId } = action.payload;
185
185
  if (draft.remiSetupApproverViewUpdateData != null) {
186
- if (draft.remiSetupApproverViewUpdateData.type === 'approval_update' &&
187
- draft.remiSetupApproverViewUpdateData.data
188
- ?.isApplicableOnPendingApprovalEntity === true) {
186
+ if (draft.remiSetupApproverViewUpdateData.data
187
+ ?.isApplicableOnPendingApprovalEntity === true) {
189
188
  draft.listeningToPusherEvent = true;
190
189
  }
191
190
  draft.remiSetupApproverViewUpdateData.updateStatus = {
@@ -46,6 +46,18 @@ const fetchTransactionDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe(
46
46
  transactionActions.push((0, classListReducer_1.fetchClassList)());
47
47
  }
48
48
  transactionActions.push((0, transactionDetailReducer_1.updateTransactionDetailFetchState)(transactionId, 'In-Progress'));
49
+ // If the transaction already exists in the entity store (e.g. fetched by the
50
+ // list page), initialize local data immediately so the UI can render whatever
51
+ // data is available while the full detail fetch completes in parallel.
52
+ if (cacheOverride !== true) {
53
+ const existingTransaction = (0, transactionSelector_1.getSupportedTransactionById)(state$.value.transactionState, detailKey);
54
+ if (existingTransaction != null) {
55
+ transactionActions.push((0, transactionDetailReducer_1.initializeTransactionDetailLocalData)({
56
+ transactionId,
57
+ vendorId: existingTransaction.vendorId,
58
+ }));
59
+ }
60
+ }
49
61
  const query = { transaction_type: transactionId.type };
50
62
  const getTransactionDetail$ = zeniAPI
51
63
  .getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/transactions/${transactionId.id}?query=${encodeURIComponent(JSON.stringify(query))}`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.19.76",
3
+ "version": "4.19.77-betaAK1",
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",