Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"@hapi/boom": "^9.1.1",
"@hapi/hapi": "^20.0.1",
"@hapi/inert": "^6.0.3",
"@opencrvs/toolkit": "1.8.1-rc.c8c6227",
"@opencrvs/toolkit": "1.9.0-rc.9518bea",
"@types/chalk": "^2.2.0",
"@types/csv2json": "^1.4.0",
"@types/fhir": "^0.0.30",
Expand Down
78 changes: 77 additions & 1 deletion src/form/tennis-club-membership.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ import {
field,
event,
user,
or
or,
defineConditional,
never
} from '@opencrvs/toolkit/events'
import { Event } from './types/types'
import { MAX_NAME_LENGTH } from './v2/birth/validators'
Expand Down Expand Up @@ -220,11 +222,81 @@ const TENNIS_CLUB_DECLARATION_FORM = defineDeclarationForm({
id: 'event.tennis-club-membership.action.declare.form.section.recommender.field.none.label'
}
},
{
id: 'recommender.search',
type: FieldType.SEARCH,
label: {
defaultMessage: 'Registration Number of recommender',
description: 'This is the label for the field',
id: 'event.tennis-club-membership.action.declare.form.section.recommender.field.search.label'
},
configuration: {
query: {
type: 'or',
clauses: [
{
'legalStatuses.REGISTERED.registrationNumber': {
term: '{term}',
type: 'exact'
}
}
]
},
limit: 10,
offset: 0,
validation: {
validator: defineConditional({
type: 'string',
pattern: '^[A-Za-z0-9]{12}$',
description: 'Must be alpha-numeric and 12 characters long'
}),
message: {
defaultMessage:
'Invalid value: Must be alpha-numeric and 12 characters long',
description: 'Error message for invalid value',
id: 'tennis-club-membership.searchField.validation.invalid'
}
},
indicators: {
ok: {
defaultMessage: 'Recommender found',
description: 'OK button text',
id: 'tennis-club-membership.searchField.indicators.ok'
},
clearModal: {
title: {
defaultMessage: 'Clear recommender?',
description: 'Title for the clear confirmation modal',
id: 'tennis-club-membership.searchField.indicators.clearModal.title'
},
description: {
defaultMessage:
'This will remove the details of the current recommender.',
description: 'Description for the clear confirmation modal',
id: 'tennis-club-membership.searchField.indicators.clearModal.description'
}
}
}
},
conditionals: [
{
type: ConditionalType.DISPLAY_ON_REVIEW,
conditional: never()
}
]
},
{
id: 'recommender.name',
configuration: { maxLength: MAX_NAME_LENGTH },
type: FieldType.NAME,
required: true,
parent: field('recommender.search'),
value: field('recommender.search').getByPath([
'data',
'firstResult',
'declaration',
'applicant.name'
]),
conditionals: [
{
type: ConditionalType.SHOW,
Expand All @@ -242,6 +314,10 @@ const TENNIS_CLUB_DECLARATION_FORM = defineDeclarationForm({
id: 'recommender.id',
type: 'TEXT',
required: true,
parent: field('recommender.search'),
value: field('recommender.search').get(
'data.firstResult.legalStatuses.REGISTERED.registrationNumber'
),
conditionals: [
{
type: ConditionalType.SHOW,
Expand Down
16 changes: 11 additions & 5 deletions src/translations/client.csv
Original file line number Diff line number Diff line change
Expand Up @@ -875,8 +875,6 @@ event.death.action.certificate.form.cancel.confirmation.title,This is the title
event.death.action.certificate.form.label,This is what this form is referred as in the system,Death certificate collector,Collecteur de certificat de décès
event.death.action.certificate.form.section.collectPayment.data.label,Title for the data section,Payment details,Détails du paiement
event.death.action.certificate.form.section.collectPayment.fee.label,Title for the data entry,Fee,Frais
event.death.action.certificate.form.section.collectPayment.fee.label,Title for the data entry,Fee,Frais
event.death.action.certificate.form.section.collectPayment.service.label,Title for the data entry,Service,Service
event.death.action.certificate.form.section.collectPayment.service.label,Title for the data entry,Service,Service
event.death.action.certificate.form.section.collectPayment.service.label.afterRegistrationTarget,Death registration after 45 days of date of death message,Death registration after 45 days of date of death,Enregistrement du décès après 45 jours de la date du décès
event.death.action.certificate.form.section.collectPayment.service.label.beforeRegistrationTarget,Death registration before 45 days of date of death message,Death registration before 45 days of date of death,Enregistrement du décès avant 45 jours de la date du décès
Expand Down Expand Up @@ -934,8 +932,6 @@ event.death.action.correction.reason.option.other.label,Label for the other opti
event.death.action.correction.reason.other.label,Label for the reason,Specify reason,Préciser la raison
event.death.action.declare.form.label,This is what this form is referred as in the system,Death declaration form,Formulaire de déclaration de décès
event.death.action.declare.form.nid.unique,This is the error message for non-unique ID Number,National id must be unique,L'identifiant national doit être unique
event.death.action.declare.form.nid.unique,This is the error message for non-unique ID Number,National id must be unique,L'identifiant national doit être unique
event.death.action.declare.form.nid.unique,This is the error message for non-unique ID Number,National id must be unique,L'identifiant national doit être unique
event.death.action.declare.form.review.comment.label,Label for the comment field in the review section,Comment,Commentaire
event.death.action.declare.form.review.signature.label,Label for the signature field in the review section,Signature of informant,Signature de l'informateur
event.death.action.declare.form.review.title,Title of the form to show in review page,"{deceased.name.firstname, select, __EMPTY__ {Death declaration} other {{deceased.name.surname, select, __EMPTY__ {Death declaration for {deceased.name.firstname}} other {Death declaration for {deceased.name.firstname} {deceased.name.surname}}}}}","{deceased.name.firstname, select, __EMPTY__ {Déclaration de décès} other {{deceased.name.surname, select, __EMPTY__ {Déclaration de décès de {deceased.name.firstname}} other {Déclaration de décès de {deceased.name.firstname} {deceased.name.surname}}}}}"
Expand Down Expand Up @@ -1073,7 +1069,6 @@ event.tennis-club-membership.action.collect-certificate.label,This is shown as t
event.tennis-club-membership.action.declare.form.label,This is what this form is referred as in the system,Tennis club membership application,Tennis club membership application
event.tennis-club-membership.action.declare.form.review.title,Title of the form to show in review page,"{applicant.name.firstname, select, __EMPTY__ {Member declaration} other {{applicant.name.surname, select, __EMPTY__ {Member declaration for {applicant.name.firstname}} other {Member declaration for {applicant.name.firstname} {applicant.name.surname}}}}}","{applicant.name.firstname, select, __EMPTY__ {Déclaration des membres} other {{applicant.name.surname, select, __EMPTY__ {Déclaration des membres pour {applicant.name.firstname}} other {Déclaration des membres pour {applicant.name.firstname} {applicant.name.surname}}}}}"
event.tennis-club-membership.action.declare.form.section.recommender.field.firstname.label,This is the label for the field,Recommender's first name,Recommender's first name
event.tennis-club-membership.action.declare.form.section.recommender.field.firstname.label,This is the label for the field,Recommender's name,Nom du recommandataire
event.tennis-club-membership.action.declare.form.section.recommender.field.id.label,This is the label for the field,Recommender's membership ID,Recommender's membership ID
event.tennis-club-membership.action.declare.form.section.recommender.field.none.label,This is the label for the field,No recommender,No recommender
event.tennis-club-membership.action.declare.form.section.recommender.title,This is the title of the section,Who is recommending the applicant?,Who is recommending the applicant?
Expand Down Expand Up @@ -2011,6 +2006,17 @@ search.searchResultFor,The search result text,Search result for “{param}”,r
search.searchingFor,The searching for text,Searching for “{param}”,Recherche de “{param}”
search.totalResultText,The total result text,"{total, plural, =0 {} one {# record found} other {# records found}} ","{total, plural, =0 {} one {# record found} other {# records found}}"
search.waitingForConnection,The text when there is no connectivity,Reconnect to load declarations,Se reconnecter pour charger les déclarations
searchField.indicators.clearButton,Clear button text,Clear,Effacer
searchField.indicators.clearModal.cancel,Cancel button for clear confirmation modal,Cancel,Annuler
searchField.indicators.clearModal.confirm,Confirm button for clear confirmation modal,Confirm,Confirmer
searchField.indicators.clearModal.description,Description for the clear confirmation modal,This will remove the current search results.,Cela supprimera les résultats de recherche actuels.
searchField.indicators.clearModal.title,Title for the clear confirmation modal,Clear search results?,Effacer les résultats de recherche ?
searchField.indicators.confirmButton,Confirm button text,Search,Rechercher
searchField.indicators.httpError,HTTP error indicator,"{statusCode, select, 408{Timed out} other{An error occurred while fetching data}}","{statusCode, select, 408{Délai d'attente dépassé} other{Une erreur s'est produite lors de la récupération des données}}"
searchField.indicators.loading,Loading indicator,Searching...,Recherche en cours...
searchField.indicators.noResultsError,No results found indicator,No record found,Aucun enregistrement trouvé
searchField.indicators.offline,Offline indicator,Search is unavailable while offline,La recherche n'est pas disponible hors ligne
searchField.indicators.ok,OK button text,Found {count} results,{count} résultats trouvés
serviceWorker.cacheKey.WorkBoxRuntime.error.button.logout,Button label for logging out when WorkBox runtime cache key is missing,Log out,Se déconnecter
serviceWorker.cacheKey.WorkBoxRuntime.error.button.reload,Button label for logging out when WorkBox runtime cache key is missing,Reload,Recharger
serviceWorker.cacheKey.WorkBoxRuntime.error.content,Content shown when WorkBox runtime cache key is missing,"Something went wrong with loading the app. Reload this page, or log out and log back in to continue.",Un problème est survenu lors du chargement de l’application. Rechargez cette page ou déconnectez-vous puis reconnectez-vous pour continuer.
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -834,10 +834,10 @@
dependencies:
"@octokit/openapi-types" "^18.0.0"

"@opencrvs/toolkit@1.8.1-rc.c8c6227":
version "1.8.1-rc.c8c6227"
resolved "https://registry.yarnpkg.com/@opencrvs/toolkit/-/toolkit-1.8.1-rc.c8c6227.tgz#bac5a80475c4578e6aa802ae70aa4491872c6008"
integrity sha512-RdTYBVgJRc2aSrKuLbDRYpAXu1TOssTra6cTuPwoJV23X48NOWuyrSImHf0PUKyS2puF/6v73G1QYyE5FK38Kg==
"@opencrvs/toolkit@1.9.0-rc.9518bea":
version "1.9.0-rc.9518bea"
resolved "https://registry.yarnpkg.com/@opencrvs/toolkit/-/toolkit-1.9.0-rc.9518bea.tgz#e2277311379fffa88941a5e31c24a7b38639104c"
integrity sha512-gVqKIX6SP+gO2BpjQfahc+TCn77e8/tp4OH8sJCHiRkEWoRoAsBe8cTbsT2NOVRwu4e4CWDeWS1jf8BOPGmRhA==
dependencies:
"@trpc/client" "11.4.3"
"@trpc/server" "11.4.3"
Expand Down
Loading