@objectstack/plugin-approvals 15.1.1 → 16.0.0-rc.1
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/.turbo/turbo-build.log +10 -10
- package/CHANGELOG.md +168 -0
- package/dist/index.d.mts +3024 -2413
- package/dist/index.d.ts +3024 -2413
- package/dist/index.js +882 -97
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +883 -98
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
- package/scripts/i18n-extract.config.ts +2 -1
- package/src/approval-service.test.ts +464 -1
- package/src/approval-service.ts +425 -58
- package/src/approvals-plugin.ts +9 -3
- package/src/index.ts +1 -0
- package/src/lifecycle-hooks.ts +64 -0
- package/src/nav-contribution.test.ts +2 -0
- package/src/sys-approval-action.object.ts +17 -2
- package/src/sys-approval-approver.object.ts +7 -1
- package/src/sys-approval-delegation.object.ts +142 -0
- package/src/sys-approval-request.object.test.ts +103 -0
- package/src/sys-approval-request.object.ts +170 -1
- package/src/sys-approval-token.object.ts +7 -1
- package/src/translations/en.objects.generated.ts +49 -0
- package/src/translations/es-ES.objects.generated.ts +49 -0
- package/src/translations/ja-JP.objects.generated.ts +49 -0
- package/src/translations/zh-CN.objects.generated.ts +49 -0
|
@@ -152,5 +152,54 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
|
|
|
152
152
|
label: "All"
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
+
},
|
|
156
|
+
sys_approval_delegation: {
|
|
157
|
+
label: "Approval Delegation",
|
|
158
|
+
pluralLabel: "Approval Delegations",
|
|
159
|
+
description: "Self-service out-of-office rule: route this user's approver slots to a delegate within a time window (#1322 M1).",
|
|
160
|
+
fields: {
|
|
161
|
+
id: {
|
|
162
|
+
label: "Delegation ID"
|
|
163
|
+
},
|
|
164
|
+
delegator_id: {
|
|
165
|
+
label: "Delegator",
|
|
166
|
+
help: "The user going out of office; their individually-routed approver slots are rerouted while active."
|
|
167
|
+
},
|
|
168
|
+
delegate_id: {
|
|
169
|
+
label: "Delegate",
|
|
170
|
+
help: "The backup who receives the delegator's approvals while this rule is active. Acts under their own identity."
|
|
171
|
+
},
|
|
172
|
+
valid_from: {
|
|
173
|
+
label: "Valid From",
|
|
174
|
+
help: "Rule is inactive before this instant. Null = active immediately. Enforced at resolution time via isGrantActive (ADR-0091 D2 predicate) — never by a background job."
|
|
175
|
+
},
|
|
176
|
+
valid_until: {
|
|
177
|
+
label: "Valid Until",
|
|
178
|
+
help: "Rule is inactive AT and AFTER this instant (half-open [from, until), UTC). Null = never expires."
|
|
179
|
+
},
|
|
180
|
+
reason: {
|
|
181
|
+
label: "Reason",
|
|
182
|
+
help: "Why the delegation exists (e.g. \"Annual leave 5/26\u20135/30\"). Recorded on the substitution audit row."
|
|
183
|
+
},
|
|
184
|
+
organization_id: {
|
|
185
|
+
label: "Organization",
|
|
186
|
+
help: "Tenant that owns this rule; null = applies across tenants for this delegator."
|
|
187
|
+
},
|
|
188
|
+
created_at: {
|
|
189
|
+
label: "Created At"
|
|
190
|
+
},
|
|
191
|
+
updated_at: {
|
|
192
|
+
label: "Updated At"
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
_views: {
|
|
196
|
+
active: {
|
|
197
|
+
label: "Active",
|
|
198
|
+
emptyState: {
|
|
199
|
+
title: "No delegations",
|
|
200
|
+
message: "Declare an out-of-office delegation so approvals route to a backup while you are away."
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
155
204
|
}
|
|
156
205
|
};
|
|
@@ -152,5 +152,54 @@ export const esESObjects: NonNullable<TranslationData['objects']> = {
|
|
|
152
152
|
label: "Todas"
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
+
},
|
|
156
|
+
sys_approval_delegation: {
|
|
157
|
+
label: "Approval Delegation",
|
|
158
|
+
pluralLabel: "Approval Delegations",
|
|
159
|
+
description: "Self-service out-of-office rule: route this user's approver slots to a delegate within a time window (#1322 M1).",
|
|
160
|
+
fields: {
|
|
161
|
+
id: {
|
|
162
|
+
label: "Delegation ID"
|
|
163
|
+
},
|
|
164
|
+
delegator_id: {
|
|
165
|
+
label: "Delegator",
|
|
166
|
+
help: "The user going out of office; their individually-routed approver slots are rerouted while active."
|
|
167
|
+
},
|
|
168
|
+
delegate_id: {
|
|
169
|
+
label: "Delegate",
|
|
170
|
+
help: "The backup who receives the delegator's approvals while this rule is active. Acts under their own identity."
|
|
171
|
+
},
|
|
172
|
+
valid_from: {
|
|
173
|
+
label: "Valid From",
|
|
174
|
+
help: "Rule is inactive before this instant. Null = active immediately. Enforced at resolution time via isGrantActive (ADR-0091 D2 predicate) — never by a background job."
|
|
175
|
+
},
|
|
176
|
+
valid_until: {
|
|
177
|
+
label: "Valid Until",
|
|
178
|
+
help: "Rule is inactive AT and AFTER this instant (half-open [from, until), UTC). Null = never expires."
|
|
179
|
+
},
|
|
180
|
+
reason: {
|
|
181
|
+
label: "Reason",
|
|
182
|
+
help: "Why the delegation exists (e.g. \"Annual leave 5/26\u20135/30\"). Recorded on the substitution audit row."
|
|
183
|
+
},
|
|
184
|
+
organization_id: {
|
|
185
|
+
label: "Organization",
|
|
186
|
+
help: "Tenant that owns this rule; null = applies across tenants for this delegator."
|
|
187
|
+
},
|
|
188
|
+
created_at: {
|
|
189
|
+
label: "Created At"
|
|
190
|
+
},
|
|
191
|
+
updated_at: {
|
|
192
|
+
label: "Updated At"
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
_views: {
|
|
196
|
+
active: {
|
|
197
|
+
label: "Active",
|
|
198
|
+
emptyState: {
|
|
199
|
+
title: "No delegations",
|
|
200
|
+
message: "Declare an out-of-office delegation so approvals route to a backup while you are away."
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
155
204
|
}
|
|
156
205
|
};
|
|
@@ -152,5 +152,54 @@ export const jaJPObjects: NonNullable<TranslationData['objects']> = {
|
|
|
152
152
|
label: "すべて"
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
+
},
|
|
156
|
+
sys_approval_delegation: {
|
|
157
|
+
label: "Approval Delegation",
|
|
158
|
+
pluralLabel: "Approval Delegations",
|
|
159
|
+
description: "Self-service out-of-office rule: route this user's approver slots to a delegate within a time window (#1322 M1).",
|
|
160
|
+
fields: {
|
|
161
|
+
id: {
|
|
162
|
+
label: "Delegation ID"
|
|
163
|
+
},
|
|
164
|
+
delegator_id: {
|
|
165
|
+
label: "Delegator",
|
|
166
|
+
help: "The user going out of office; their individually-routed approver slots are rerouted while active."
|
|
167
|
+
},
|
|
168
|
+
delegate_id: {
|
|
169
|
+
label: "Delegate",
|
|
170
|
+
help: "The backup who receives the delegator's approvals while this rule is active. Acts under their own identity."
|
|
171
|
+
},
|
|
172
|
+
valid_from: {
|
|
173
|
+
label: "Valid From",
|
|
174
|
+
help: "Rule is inactive before this instant. Null = active immediately. Enforced at resolution time via isGrantActive (ADR-0091 D2 predicate) — never by a background job."
|
|
175
|
+
},
|
|
176
|
+
valid_until: {
|
|
177
|
+
label: "Valid Until",
|
|
178
|
+
help: "Rule is inactive AT and AFTER this instant (half-open [from, until), UTC). Null = never expires."
|
|
179
|
+
},
|
|
180
|
+
reason: {
|
|
181
|
+
label: "Reason",
|
|
182
|
+
help: "Why the delegation exists (e.g. \"Annual leave 5/26\u20135/30\"). Recorded on the substitution audit row."
|
|
183
|
+
},
|
|
184
|
+
organization_id: {
|
|
185
|
+
label: "Organization",
|
|
186
|
+
help: "Tenant that owns this rule; null = applies across tenants for this delegator."
|
|
187
|
+
},
|
|
188
|
+
created_at: {
|
|
189
|
+
label: "Created At"
|
|
190
|
+
},
|
|
191
|
+
updated_at: {
|
|
192
|
+
label: "Updated At"
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
_views: {
|
|
196
|
+
active: {
|
|
197
|
+
label: "Active",
|
|
198
|
+
emptyState: {
|
|
199
|
+
title: "No delegations",
|
|
200
|
+
message: "Declare an out-of-office delegation so approvals route to a backup while you are away."
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
155
204
|
}
|
|
156
205
|
};
|
|
@@ -152,5 +152,54 @@ export const zhCNObjects: NonNullable<TranslationData['objects']> = {
|
|
|
152
152
|
label: "全部"
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
+
},
|
|
156
|
+
sys_approval_delegation: {
|
|
157
|
+
label: "审批委派",
|
|
158
|
+
pluralLabel: "审批委派",
|
|
159
|
+
description: "自助不在岗规则:在时间窗内把该用户的审批人槽位改派给候补人(#1322 M1)。",
|
|
160
|
+
fields: {
|
|
161
|
+
id: {
|
|
162
|
+
label: "委派 ID"
|
|
163
|
+
},
|
|
164
|
+
delegator_id: {
|
|
165
|
+
label: "委派人",
|
|
166
|
+
help: "即将不在岗的用户;规则生效期间,路由到其个人的审批人槽位将被改派。"
|
|
167
|
+
},
|
|
168
|
+
delegate_id: {
|
|
169
|
+
label: "候补人",
|
|
170
|
+
help: "规则生效期间接收委派人审批的候补人。以其本人身份行使。"
|
|
171
|
+
},
|
|
172
|
+
valid_from: {
|
|
173
|
+
label: "生效时间",
|
|
174
|
+
help: "此刻之前规则不生效。留空 = 立即生效。在解析时通过 isGrantActive 强制(ADR-0091 D2 判定式)——绝不依赖后台任务。"
|
|
175
|
+
},
|
|
176
|
+
valid_until: {
|
|
177
|
+
label: "失效时间",
|
|
178
|
+
help: "此刻(含)及之后规则不生效(半开区间 [from, until),UTC)。留空 = 永不过期。"
|
|
179
|
+
},
|
|
180
|
+
reason: {
|
|
181
|
+
label: "原因",
|
|
182
|
+
help: "委派存在的原因(例如“年假 5/26–5/30”)。会记入改派审计行。"
|
|
183
|
+
},
|
|
184
|
+
organization_id: {
|
|
185
|
+
label: "组织",
|
|
186
|
+
help: "拥有此规则的租户;留空 = 对该委派人跨租户生效。"
|
|
187
|
+
},
|
|
188
|
+
created_at: {
|
|
189
|
+
label: "创建时间"
|
|
190
|
+
},
|
|
191
|
+
updated_at: {
|
|
192
|
+
label: "更新时间"
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
_views: {
|
|
196
|
+
active: {
|
|
197
|
+
label: "生效中",
|
|
198
|
+
emptyState: {
|
|
199
|
+
title: "暂无委派",
|
|
200
|
+
message: "声明一条不在岗委派,休假期间审批自动改派给候补人。"
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
155
204
|
}
|
|
156
205
|
};
|