@opencrvs/toolkit 1.9.3-rc.a8532b8 → 1.9.3-rc.ae6ac46
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.
|
@@ -6,7 +6,7 @@ import { FieldUpdateValue, FieldValue } from '../events/FieldValue';
|
|
|
6
6
|
import { TranslationConfig } from '../events/TranslationConfig';
|
|
7
7
|
import { ITokenPayload } from '../authentication';
|
|
8
8
|
import { UUID } from '../uuid';
|
|
9
|
-
import { ActionType } from '../client';
|
|
9
|
+
import { ActionType, EventDocument } from '../client';
|
|
10
10
|
export declare function validate(schema: JSONSchema, data: ConditionalParameters): boolean;
|
|
11
11
|
export declare function validateValue(schema: JSONSchema, data: unknown): boolean;
|
|
12
12
|
export declare function isOnline(): boolean;
|
|
@@ -17,6 +17,7 @@ export type ValidatorContext = {
|
|
|
17
17
|
leafAdminStructureLocationIds?: Array<{
|
|
18
18
|
id: UUID;
|
|
19
19
|
}>;
|
|
20
|
+
event?: EventDocument;
|
|
20
21
|
};
|
|
21
22
|
export declare function isFieldVisible(field: FieldConfig, form: Partial<ActionUpdate | EventState>, context: ValidatorContext): boolean;
|
|
22
23
|
export declare function isFieldEnabled(field: FieldConfig, form: ActionUpdate | EventState, context: ValidatorContext): boolean;
|
package/dist/events/index.js
CHANGED
|
@@ -3303,7 +3303,8 @@ function isConditionMet(conditional, values, context) {
|
|
|
3303
3303
|
$now: (0, import_date_fns.formatISO)(/* @__PURE__ */ new Date(), { representation: "date" }),
|
|
3304
3304
|
$online: isOnline(),
|
|
3305
3305
|
$user: context.user,
|
|
3306
|
-
$leafAdminStructureLocationIds: context.leafAdminStructureLocationIds ?? []
|
|
3306
|
+
$leafAdminStructureLocationIds: context.leafAdminStructureLocationIds ?? [],
|
|
3307
|
+
$event: context.event
|
|
3307
3308
|
});
|
|
3308
3309
|
}
|
|
3309
3310
|
function getConditionalActionsForField(field3, values) {
|
|
@@ -3329,7 +3330,8 @@ function isFieldConditionMet(field3, form, conditionalType, context) {
|
|
|
3329
3330
|
$now: (0, import_date_fns.formatISO)(/* @__PURE__ */ new Date(), { representation: "date" }),
|
|
3330
3331
|
$online: isOnline(),
|
|
3331
3332
|
$user: context.user,
|
|
3332
|
-
$leafAdminStructureLocationIds: context.leafAdminStructureLocationIds ?? []
|
|
3333
|
+
$leafAdminStructureLocationIds: context.leafAdminStructureLocationIds ?? [],
|
|
3334
|
+
$event: context.event
|
|
3333
3335
|
});
|
|
3334
3336
|
return validConditionals.includes(conditionalType);
|
|
3335
3337
|
}
|
|
@@ -5653,6 +5655,7 @@ var PRINT_CERTIFICATE_FORM = defineActionForm({
|
|
|
5653
5655
|
{
|
|
5654
5656
|
id: "collector",
|
|
5655
5657
|
type: PageTypes.enum.FORM,
|
|
5658
|
+
requireCompletionToContinue: true,
|
|
5656
5659
|
title: {
|
|
5657
5660
|
id: "event.tennis-club-membership.action.certificate.form.section.who.title",
|
|
5658
5661
|
defaultMessage: "Print certified copy",
|
|
@@ -6260,6 +6263,7 @@ var PRINT_CERTIFICATE_FORM = defineActionForm({
|
|
|
6260
6263
|
{
|
|
6261
6264
|
id: "collector.identity.verify",
|
|
6262
6265
|
type: PageTypes.enum.VERIFICATION,
|
|
6266
|
+
requireCompletionToContinue: true,
|
|
6263
6267
|
conditional: field("collector.requesterId").isEqualTo("INFORMANT"),
|
|
6264
6268
|
title: {
|
|
6265
6269
|
id: "event.tennis-club-membership.action.print.verifyIdentity",
|
|
@@ -3919,6 +3919,7 @@ var PRINT_CERTIFICATE_FORM = defineActionForm({
|
|
|
3919
3919
|
{
|
|
3920
3920
|
id: "collector",
|
|
3921
3921
|
type: PageTypes.enum.FORM,
|
|
3922
|
+
requireCompletionToContinue: true,
|
|
3922
3923
|
title: {
|
|
3923
3924
|
id: "event.tennis-club-membership.action.certificate.form.section.who.title",
|
|
3924
3925
|
defaultMessage: "Print certified copy",
|
|
@@ -4526,6 +4527,7 @@ var PRINT_CERTIFICATE_FORM = defineActionForm({
|
|
|
4526
4527
|
{
|
|
4527
4528
|
id: "collector.identity.verify",
|
|
4528
4529
|
type: PageTypes.enum.VERIFICATION,
|
|
4530
|
+
requireCompletionToContinue: true,
|
|
4529
4531
|
conditional: field("collector.requesterId").isEqualTo("INFORMANT"),
|
|
4530
4532
|
title: {
|
|
4531
4533
|
id: "event.tennis-club-membership.action.print.verifyIdentity",
|