@zeniai/client-epic-state 5.1.2 → 5.1.3-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.
- package/lib/entity/approvalRule/approvalRulePayload.d.ts +1 -1
- package/lib/entity/approvalRule/approvalRulePayload.js +5 -1
- package/lib/esm/entity/approvalRule/approvalRulePayload.js +5 -1
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.js +5 -1
- package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.js +2 -2
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.js +5 -1
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.d.ts +1 -1
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.js +2 -2
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import { ApprovalRule } from './approvalRuleState';
|
|
|
2
2
|
/**
|
|
3
3
|
* Condition Payload — one entry inside criteria.conditions[].
|
|
4
4
|
*
|
|
5
|
-
* field examples: 'amount' | 'vendor_id' | '
|
|
5
|
+
* field examples: 'amount' | 'vendor_id' | 'accounting_class_id'
|
|
6
6
|
* type examples: 'gte' | 'lte' | 'eq' | 'in' | 'not_in'
|
|
7
7
|
* value: number for amount comparisons; string[] for in / not_in lookups.
|
|
8
8
|
*/
|
|
@@ -69,7 +69,11 @@ const toApprovalCriteria = (payload) => {
|
|
|
69
69
|
}
|
|
70
70
|
});
|
|
71
71
|
payload.conditions
|
|
72
|
-
|
|
72
|
+
// Backend wire name is 'accounting_class_id' — kept in sync with
|
|
73
|
+
// the write-side mapper in 'commonPayload.ts'. State-side and
|
|
74
|
+
// form-side keep 'department' / 'departmentIds' to match product
|
|
75
|
+
// copy.
|
|
76
|
+
.filter((condition) => condition.field === 'accounting_class_id')
|
|
73
77
|
.forEach((condition) => {
|
|
74
78
|
const department = toDepartmentCriteria(condition);
|
|
75
79
|
if (department != null) {
|
|
@@ -65,7 +65,11 @@ const toApprovalCriteria = (payload) => {
|
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
67
|
payload.conditions
|
|
68
|
-
|
|
68
|
+
// Backend wire name is 'accounting_class_id' — kept in sync with
|
|
69
|
+
// the write-side mapper in 'commonPayload.ts'. State-side and
|
|
70
|
+
// form-side keep 'department' / 'departmentIds' to match product
|
|
71
|
+
// copy.
|
|
72
|
+
.filter((condition) => condition.field === 'accounting_class_id')
|
|
69
73
|
.forEach((condition) => {
|
|
70
74
|
const department = toDepartmentCriteria(condition);
|
|
71
75
|
if (department != null) {
|
package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.js
CHANGED
|
@@ -29,7 +29,11 @@ export const toApprovalChangableInfoPayload = (approverViewUpdateData) => {
|
|
|
29
29
|
}
|
|
30
30
|
if (department != null && department.departmentIds.length > 0) {
|
|
31
31
|
conditions.push({
|
|
32
|
-
|
|
32
|
+
// The backend models 'department' as the accounting class
|
|
33
|
+
// entity, so the wire field name is 'accounting_class_id'
|
|
34
|
+
// (not 'department_id'). State-side and form-side keep
|
|
35
|
+
// 'department' / 'departmentIds' to match product copy.
|
|
36
|
+
field: 'accounting_class_id',
|
|
33
37
|
type: department.operator === 'is_not' ? 'not_in' : 'in',
|
|
34
38
|
value: department.departmentIds,
|
|
35
39
|
});
|
|
@@ -20,8 +20,8 @@ export const toAutoSweepFlowStatePatch = (payload) => {
|
|
|
20
20
|
return {
|
|
21
21
|
bufferAmount: toAmount(payload.minimum_buffer_usd, currencyCode ?? 'USD', currencySymbol ?? '$'),
|
|
22
22
|
frequency: toAutoSweepFrequency(payload.frequency) ?? 'weekly',
|
|
23
|
-
nextTransferDate: payload.
|
|
24
|
-
? date(payload.
|
|
23
|
+
nextTransferDate: payload.next_run_date != null && payload.next_run_date !== ''
|
|
24
|
+
? date(payload.next_run_date)
|
|
25
25
|
: undefined,
|
|
26
26
|
primaryFundingAccountId: payload.source_bank_account.deposit_account_id ?? undefined,
|
|
27
27
|
settingsId: payload.cash_management_settings_id ?? undefined,
|
|
@@ -32,7 +32,11 @@ const toApprovalChangableInfoPayload = (approverViewUpdateData) => {
|
|
|
32
32
|
}
|
|
33
33
|
if (department != null && department.departmentIds.length > 0) {
|
|
34
34
|
conditions.push({
|
|
35
|
-
|
|
35
|
+
// The backend models 'department' as the accounting class
|
|
36
|
+
// entity, so the wire field name is 'accounting_class_id'
|
|
37
|
+
// (not 'department_id'). State-side and form-side keep
|
|
38
|
+
// 'department' / 'departmentIds' to match product copy.
|
|
39
|
+
field: 'accounting_class_id',
|
|
36
40
|
type: department.operator === 'is_not' ? 'not_in' : 'in',
|
|
37
41
|
value: department.departmentIds,
|
|
38
42
|
});
|
|
@@ -26,7 +26,7 @@ export interface CashManagementSettingsPayload {
|
|
|
26
26
|
cash_management_settings_id: string | null;
|
|
27
27
|
frequency: string;
|
|
28
28
|
minimum_buffer_usd: number;
|
|
29
|
-
|
|
29
|
+
next_run_date: string;
|
|
30
30
|
source_bank_account: DepositAccountPayload;
|
|
31
31
|
}
|
|
32
32
|
export type CashManagementSettingsResponse = ZeniAPIResponse<CashManagementSettingsPayload>;
|
|
@@ -24,8 +24,8 @@ const toAutoSweepFlowStatePatch = (payload) => {
|
|
|
24
24
|
return {
|
|
25
25
|
bufferAmount: (0, amount_1.toAmount)(payload.minimum_buffer_usd, currencyCode ?? 'USD', currencySymbol ?? '$'),
|
|
26
26
|
frequency: (0, autoSweepFlowState_1.toAutoSweepFrequency)(payload.frequency) ?? 'weekly',
|
|
27
|
-
nextTransferDate: payload.
|
|
28
|
-
? (0, zeniDayJS_1.date)(payload.
|
|
27
|
+
nextTransferDate: payload.next_run_date != null && payload.next_run_date !== ''
|
|
28
|
+
? (0, zeniDayJS_1.date)(payload.next_run_date)
|
|
29
29
|
: undefined,
|
|
30
30
|
primaryFundingAccountId: payload.source_bank_account.deposit_account_id ?? undefined,
|
|
31
31
|
settingsId: payload.cash_management_settings_id ?? undefined,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.3-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",
|