|
| 1 | +/* |
| 2 | + * This Source Code Form is subject to the terms of the Mozilla Public |
| 3 | + * License, v. 2.0. If a copy of the MPL was not distributed with this |
| 4 | + * file, You can obtain one at https://mozilla.org/MPL/2.0/. |
| 5 | + * |
| 6 | + * OpenCRVS is also distributed under the terms of the Civil Registration |
| 7 | + * & Healthcare Disclaimer located at http://opencrvs.org/license. |
| 8 | + * |
| 9 | + * Copyright (C) The OpenCRVS Authors located at https://github.com/opencrvs/opencrvs-core/blob/master/AUTHORS. |
| 10 | + */ |
| 11 | + |
| 12 | +import { defineConfig } from '@opencrvs/toolkit/events' |
| 13 | + |
| 14 | +export const tennisClubMembershipEvent = defineConfig({ |
| 15 | + id: 'TENNIS_CLUB_MEMBERSHIP', |
| 16 | + label: { |
| 17 | + defaultMessage: 'Tennis club membership application', |
| 18 | + description: 'This is what this event is referred as in the system', |
| 19 | + id: 'event.tennis-club-membership.label' |
| 20 | + }, |
| 21 | + actions: [ |
| 22 | + { |
| 23 | + type: 'DECLARE', |
| 24 | + label: { |
| 25 | + defaultMessage: 'Send an application', |
| 26 | + description: |
| 27 | + 'This is shown as the action name anywhere the user can trigger the action from', |
| 28 | + id: 'event.tennis-club-membership.action.declare.label' |
| 29 | + }, |
| 30 | + forms: [ |
| 31 | + { |
| 32 | + label: { |
| 33 | + id: 'event.tennis-club-membership.action.declare.form.label', |
| 34 | + defaultMessage: 'Tennis club membership application', |
| 35 | + description: 'This is what this form is referred as in the system' |
| 36 | + }, |
| 37 | + active: true, |
| 38 | + version: { |
| 39 | + id: '1.0.0', |
| 40 | + label: { |
| 41 | + id: 'event.tennis-club-membership.action.declare.form.version.1', |
| 42 | + defaultMessage: 'Version 1', |
| 43 | + description: 'This is the first version of the form' |
| 44 | + } |
| 45 | + }, |
| 46 | + pages: [ |
| 47 | + { |
| 48 | + id: 'applicant', |
| 49 | + title: { |
| 50 | + id: 'event.tennis-club-membership.action.declare.form.section.who.title', |
| 51 | + defaultMessage: 'Who is applying for the membership?', |
| 52 | + description: 'This is the title of the section' |
| 53 | + }, |
| 54 | + fields: [ |
| 55 | + { |
| 56 | + id: 'applicant.firstname', |
| 57 | + type: 'TEXT', |
| 58 | + required: true, |
| 59 | + label: { |
| 60 | + defaultMessage: "Applicant's first name", |
| 61 | + description: 'This is the label for the field', |
| 62 | + id: 'event.tennis-club-membership.action.declare.form.section.who.field.firstname.label' |
| 63 | + } |
| 64 | + }, |
| 65 | + { |
| 66 | + id: 'applicant.surname', |
| 67 | + type: 'TEXT', |
| 68 | + required: true, |
| 69 | + label: { |
| 70 | + defaultMessage: "Applicant's surname", |
| 71 | + description: 'This is the label for the field', |
| 72 | + id: 'event.tennis-club-membership.action.declare.form.section.who.field.surname.label' |
| 73 | + } |
| 74 | + }, |
| 75 | + { |
| 76 | + id: 'applicant.dob', |
| 77 | + type: 'DATE', |
| 78 | + required: true, |
| 79 | + label: { |
| 80 | + defaultMessage: "Applicant's date of birth", |
| 81 | + description: 'This is the label for the field', |
| 82 | + id: 'event.tennis-club-membership.action.declare.form.section.who.field.dob.label' |
| 83 | + } |
| 84 | + } |
| 85 | + ] |
| 86 | + }, |
| 87 | + { |
| 88 | + id: 'recommender', |
| 89 | + title: { |
| 90 | + id: 'event.tennis-club-membership.action.declare.form.section.recommender.title', |
| 91 | + defaultMessage: 'Who is recommending the applicant?', |
| 92 | + description: 'This is the title of the section' |
| 93 | + }, |
| 94 | + fields: [ |
| 95 | + { |
| 96 | + id: 'recommender.firstname', |
| 97 | + type: 'TEXT', |
| 98 | + required: true, |
| 99 | + label: { |
| 100 | + defaultMessage: "Recommender's first name", |
| 101 | + description: 'This is the label for the field', |
| 102 | + id: 'event.tennis-club-membership.action.declare.form.section.recommender.field.firstname.label' |
| 103 | + } |
| 104 | + }, |
| 105 | + { |
| 106 | + id: 'recommender.surname', |
| 107 | + type: 'TEXT', |
| 108 | + required: true, |
| 109 | + label: { |
| 110 | + defaultMessage: "Recommender's surname", |
| 111 | + description: 'This is the label for the field', |
| 112 | + id: 'event.tennis-club-membership.action.declare.form.section.recommender.field.surname.label' |
| 113 | + } |
| 114 | + }, |
| 115 | + { |
| 116 | + id: 'recommender.id', |
| 117 | + type: 'TEXT', |
| 118 | + required: true, |
| 119 | + label: { |
| 120 | + defaultMessage: "Recommender's membership ID", |
| 121 | + description: 'This is the label for the field', |
| 122 | + id: 'event.tennis-club-membership.action.declare.form.section.recommender.field.id.label' |
| 123 | + } |
| 124 | + } |
| 125 | + ] |
| 126 | + } |
| 127 | + ] |
| 128 | + } |
| 129 | + ] |
| 130 | + } |
| 131 | + ] |
| 132 | +}) |
0 commit comments