diff --git a/packages/esm-active-visits-app/translations/es.json b/packages/esm-active-visits-app/translations/es.json index 5e7899bb1..08ec3ff89 100644 --- a/packages/esm-active-visits-app/translations/es.json +++ b/packages/esm-active-visits-app/translations/es.json @@ -16,21 +16,21 @@ "noActiveVisitsForLocation": "No hay visitas activas para esta ubicación.", "noDiagnosesFound": "No se encontraron diagnósticos", "noEncountersFound": "No se encontraron encuentros", - "noMedicationsFound": "No se encontraron medicaciones", - "noNotesToShowForPatient": "No hay notas para mostrar de este paciente", + "noMedicationsFound": "No se encontraron medicamentos", + "noNotesToShowForPatient": "No hay notas para mostrar para este paciente", "noObservationsFound": "No se encontraron observaciones", "notes": "Notas", "noVisitsToDisplay": "No hay visitas para mostrar", - "orderDurationAndUnit": "para {{duration}} {{durationUnit}}", + "orderDurationAndUnit": "por {{duration}} {{durationUnit}}", "orderIndefiniteDuration": "Duración indefinida", - "patients": "Patients", + "patients": "Pacientes", "provider": "Proveedor", "quantity": "Cantidad", - "refills": "Recargas", + "refills": "Reposiciones", "tests": "Pruebas", "thereIsNoInformationToDisplayHere": "No hay información para mostrar aquí", - "time": "Tiempo", - "totalVisits": "Total Visits Today", + "time": "Hora", + "totalVisits": "Total de Visitas Hoy", "visitStartTime": "Tiempo de Visita", "visitSummary": "Resumen de Visita", "visitType": "Tipo de Visita" diff --git a/packages/esm-active-visits-app/translations/fr.json b/packages/esm-active-visits-app/translations/fr.json index 5045bfda9..9ef6ed733 100644 --- a/packages/esm-active-visits-app/translations/fr.json +++ b/packages/esm-active-visits-app/translations/fr.json @@ -1,13 +1,13 @@ { "activeVisits": "Visites actives", - "age": "Age", + "age": "Âge", "allEncounters": "Toutes les visites", - "checkFilters": "Check the filters above", + "checkFilters": "Verifier les filtres ci-dessus", "diagnoses": "Diagnostic", "dose": "Dose", "encounterType": "Type de visite", "endDate": "Date de fin", - "filterTable": "Filtre de recherche", + "filterTable": "Filtrer le tableau", "gender": "Genre", "idNumber": "Identifiant", "indication": "Indication", @@ -24,13 +24,13 @@ "orderDurationAndUnit": "Pour {{duration}} {{durationUnit}}", "orderIndefiniteDuration": "Durée illimitée", "patients": "Patients", - "provider": "Fournisseur", - "quantity": "Quantity", + "provider": "Prestataire", + "quantity": "Quantité", "refills": "Recharges", "tests": "Tests", "thereIsNoInformationToDisplayHere": "Il n'y pas d'information à présenter ici", "time": "Heure", - "totalVisits": "Consultation total du jour", + "totalVisits": "Consultation Total du Jour", "visitStartTime": "Heure de la consultation", "visitSummary": "Compte rendu de la consultation", "visitType": "Type de consultation" diff --git a/packages/esm-appointments-app/src/calendar/appointments-calendar-view.component.tsx b/packages/esm-appointments-app/src/calendar/appointments-calendar-view.component.tsx index 650e9c347..af6901140 100644 --- a/packages/esm-appointments-app/src/calendar/appointments-calendar-view.component.tsx +++ b/packages/esm-appointments-app/src/calendar/appointments-calendar-view.component.tsx @@ -1,12 +1,12 @@ import React, { useEffect, useState } from 'react'; import dayjs from 'dayjs'; +import { useParams } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import { useAppointmentsCalendar } from '../hooks/useAppointmentsCalendar'; import AppointmentsHeader from '../header/appointments-header.component'; import CalendarHeader from './header/calendar-header.component'; import MonthlyCalendarView from './monthly/monthly-calendar-view.component'; import SelectedDateContext from '../hooks/selectedDateContext'; -import { useParams } from 'react-router-dom'; import { omrsDateFormat } from '../constants'; const AppointmentsCalendarView: React.FC = () => { diff --git a/packages/esm-appointments-app/src/calendar/header/calendar-header.component.tsx b/packages/esm-appointments-app/src/calendar/header/calendar-header.component.tsx index 591616d5d..f537a9e87 100644 --- a/packages/esm-appointments-app/src/calendar/header/calendar-header.component.tsx +++ b/packages/esm-appointments-app/src/calendar/header/calendar-header.component.tsx @@ -1,17 +1,18 @@ import React, { useContext } from 'react'; +import dayjs from 'dayjs'; import { useTranslation } from 'react-i18next'; import { Button } from '@carbon/react'; import { ArrowLeft } from '@carbon/react/icons'; import { navigate } from '@openmrs/esm-framework'; import { spaHomePage } from '../../constants'; -import styles from './calendar-header.scss'; import SelectedDateContext from '../../hooks/selectedDateContext'; -import dayjs from 'dayjs'; +import styles from './calendar-header.scss'; const CalendarHeader: React.FC = () => { const { t } = useTranslation(); const { selectedDate } = useContext(SelectedDateContext); - const backButtonOnClick = () => { + + const handleClick = () => { navigate({ to: `${spaHomePage}/appointments/${dayjs(selectedDate).format('YYYY-MM-DD')}` }); }; @@ -20,10 +21,10 @@ const CalendarHeader: React.FC = () => {
diff --git a/packages/esm-appointments-app/src/calendar/monthly/monthly-workload-view.component.tsx b/packages/esm-appointments-app/src/calendar/monthly/monthly-workload-view.component.tsx index 6b9c80ae2..044b0da07 100644 --- a/packages/esm-appointments-app/src/calendar/monthly/monthly-workload-view.component.tsx +++ b/packages/esm-appointments-app/src/calendar/monthly/monthly-workload-view.component.tsx @@ -1,14 +1,14 @@ import React, { useContext, useMemo } from 'react'; import classNames from 'classnames'; import dayjs, { type Dayjs } from 'dayjs'; +import { User } from '@carbon/react/icons'; import { navigate, useLayoutType } from '@openmrs/esm-framework'; -import { isSameMonth } from '../../helpers'; import { spaHomePage } from '../../constants'; -import styles from './monthly-view-workload.scss'; +import { isSameMonth } from '../../helpers'; import { type DailyAppointmentsCountByService } from '../../types'; import SelectedDateContext from '../../hooks/selectedDateContext'; -import { User } from '@carbon/react/icons'; import MonthlyWorkloadViewExpanded from './monthly-workload-view-expanded.component'; +import styles from './monthly-view-workload.scss'; export interface MonthlyWorkloadViewProps { events: Array; diff --git a/packages/esm-appointments-app/src/constants.ts b/packages/esm-appointments-app/src/constants.ts index 5cd36ccc7..377a28b21 100644 --- a/packages/esm-appointments-app/src/constants.ts +++ b/packages/esm-appointments-app/src/constants.ts @@ -1,6 +1,6 @@ export const spaRoot = window['getOpenmrsSpaBase']; export const basePath = '/appointments'; -export const spaHomePage = ` ${window.getOpenmrsSpaBase()}home`; +export const spaHomePage = `${window.spaBase}/home`; export const omrsDateFormat = 'YYYY-MM-DDTHH:mm:ss.SSSZZ'; export const appointmentLocationTagName = 'Appointment Location'; diff --git a/packages/esm-appointments-app/src/metrics/metrics-header.component.tsx b/packages/esm-appointments-app/src/metrics/metrics-header.component.tsx index 5c2fb6eeb..8b2a915e6 100644 --- a/packages/esm-appointments-app/src/metrics/metrics-header.component.tsx +++ b/packages/esm-appointments-app/src/metrics/metrics-header.component.tsx @@ -1,14 +1,13 @@ import React, { useContext } from 'react'; import dayjs from 'dayjs'; import isToday from 'dayjs/plugin/isToday'; -import { launchWorkspace } from '@openmrs/esm-framework'; import { useTranslation } from 'react-i18next'; import { Calendar, Hospital } from '@carbon/react/icons'; import { Button } from '@carbon/react'; -import { ExtensionSlot, isDesktop, navigate, useLayoutType } from '@openmrs/esm-framework'; +import { ExtensionSlot, isDesktop, launchWorkspace, navigate, useLayoutType } from '@openmrs/esm-framework'; import { spaHomePage } from '../constants'; -import styles from './metrics-header.scss'; import SelectedDateContext from '../hooks/selectedDateContext'; +import styles from './metrics-header.scss'; dayjs.extend(isToday); @@ -39,7 +38,7 @@ const MetricsHeader: React.FC = () => { onClick={() => navigate({ to: `${spaHomePage}/appointments/calendar/${dayjs(selectedDate).format('YYYY-MM-DD')}` }) }> - {t('appointmentsCalendar', 'Appointments Calendar')} + {t('appointmentsCalendar', 'Appointments calendar')} {{displayText}} to display", + "emptyStateText": "No hay <1>{{displayText}} para mostrar", "encounters": "Encuentros", "encounterType": "Tipo de encuentro", - "endAppointmentAndVisitConfirmationMessage": "Checking the patient out will mark the appointment as complete, and close out the active visit for this patient.", - "endAppointmentConfirmation": "Are you sure you want to check the patient out for this appointment?", - "endAppointmentConfirmationMessage": "Checking the patient out will mark the appointment as complete.", - "endDate": "End date", + "endAppointmentAndVisitConfirmationMessage": "Marcar al paciente como dado de alta indicará que la cita está completa y cerrará la visita activa para este paciente.", + "endAppointmentConfirmation": "¿Está seguro de que desea marcar al paciente como dado de alta para esta cita?", + "endAppointmentConfirmationMessage": "Marcar al paciente como dado de alta indicará que la cita está completa.", + "endDate": "Fecha de finalización", "endTime": "Hora de finalización", "errorCreatingAppointmentService": "Error creating appointment service", "expected": "Expected", - "filterTable": "Filter table", + "filterTable": "Filtrar tabla", "gender": "Género", - "highestServiceVolume": "Highest volume service: {{time}}", + "highestServiceVolume": "Servicio de mayor volumen: {{time}}", "identifier": "Identificador", - "invalidNumber": "Number is not valid", - "invalidTime": "Invalid time", - "isRecurringAppointment": "Is this a recurring appointment?", - "itemsPerPage": "Items per page", + "invalidNumber": "El número no es válido", + "invalidTime": "Hora inválida", + "isRecurringAppointment": "¿Esta es una cita recurrente?", + "itemsPerPage": "Elementos por página", "loading": "Loading", "location": "Ubicación", "medications": "Medicamentos", "missed": "Perdida", - "next": "Next", - "nextMonth": "Next month", - "nextPage": "Next page", + "next": "Siguiente", + "nextMonth": "Siguiente mes", + "nextPage": "Siguiente página", "no": "No", - "noAppointmentsToDisplay": "No appointments to display", - "noContent": "No Content", + "noAppointmentsToDisplay": "No hay citas para mostrar", + "noContent": "No hay contenido", "noCurrentAppointments": "No hay citas programadas que mostrar para hoy para este paciente", "noEncountersFound": "No se encontraron encuentros", "noPastAppointments": "No hay citas anteriores para mostrar para este paciente", "noPreviousVisitFound": "No se encontraron visitas anteriores", "notArrived": "No ha llegado", - "note": "Note", + "note": "Nota", "notes": "Notas", "noUpcomingAppointments": "No hay próximas citas para mostrar para este paciente", "noUpcomingAppointmentsForPatient": "No hay próximas citas para mostrar para este paciente", - "pageNumber": "Page number", + "pageNumber": "Número de página", "past": "Anterior", "patientDetails": "Detalles del paciente", - "patientDoubleBooking": "Patient already booked for an appointment at this time", + "patientDoubleBooking": "El paciente ya agendó una cita para esta hora", "patientName": "Nombre del paciente", "patients": "Pacientes", - "period": "Period", - "prev": "Prev", - "previousMonth": "Previous month", - "previousPage": "Previous page", + "period": "Periodo", + "prev": "Ant", + "previousMonth": "Mes anterior", + "previousPage": "Página anterior", "provider": "Proveedor", "providers": "Proveedores", - "providersBooked": "Providers booked: {{time}}", - "recurringAppointment": "Recurring Appointment", - "recurringAppointmentShouldHaveEndDate": "A recurring appointment should have an end date", - "repeatEvery": "Repeat every", + "providersBooked": "Proveedores agendados: {{time}}", + "recurringAppointment": "Cita recurrente", + "recurringAppointmentShouldHaveEndDate": "Una cita recurrente debería tener una fecha de finalización", + "repeatEvery": "Repetir cada", "save": "Guardar", - "saveAndClose": "Save and close", + "saveAndClose": "Guardar y cerrar", "scheduled": "Programada", "scheduledAppointments": "Citas programadas", - "scheduledForToday": "Scheduled For Today", - "selectALocation": "Select a location", + "scheduledForToday": "Agendada Para Hoy", + "selectALocation": "Seleccionar una ubicación", "selectAppointmentStatus": "Seleccionar estado", "selectAppointmentType": "Seleccionar tipo de cita", "selectLocation": "Seleccionar ubicación", "selectOption": "Seleccionar una opción", - "selectProvider": "Select a provider", + "selectProvider": "Seleccionar un proveedor", "selectService": "Seleccionar servicio", "selectServiceType": "Seleccionar tipo de servicio", "service": "Servicio", "serviceName": "Nombre del servicio", "serviceType": "Tipo de servicio", - "serviceUnavailable": "Appointment time is outside of service hours", - "startDate": "Start date", + "serviceUnavailable": "La hora de la cita está fuera de las horas de servicio", + "startDate": "Fecha de inicio", "startTime": "Hora de inicio", - "status": "Status", + "status": "Estado", "time": "Tiempo", "today": "Hoy", - "todays": "Today's", - "type": "Type", + "todays": "Hoy día es", + "type": "Tip", "unscheduled": "No programada", "unscheduledAppointments": "Citas no programadas", "unscheduledAppointments_lower": "citas no programadas", @@ -161,6 +161,6 @@ "upcomingAppointments": "Próximas citas", "view": "Ver", "vitals": "Signos vitales", - "week": "Week", + "week": "Semana", "yes": "Sí" } diff --git a/packages/esm-appointments-app/translations/fr.json b/packages/esm-appointments-app/translations/fr.json index 0944bbb3e..d30f5b8a4 100644 --- a/packages/esm-appointments-app/translations/fr.json +++ b/packages/esm-appointments-app/translations/fr.json @@ -18,7 +18,7 @@ "appointmentEndError": "Erreur lors de la clôture du rendez-vous", "appointmentFormError": "Erreur lors de la planification du rendez-vous", "appointmentHistory": "Historique de Rendez-vous", - "appointmentMetrics": "Indicateurs de rendez-vous", + "appointmentMetrics": "Métriques de rendez-vous", "appointmentMetricsLoadError": "", "appointmentNoteLabel": "Écrire une note additionnelle", "appointmentNotePlaceholder": "Écrire une note additionnelle ici", @@ -27,12 +27,12 @@ "appointments": "Rendez-vous", "Appointments": "Rendez-vous", "appointments_lower": "rendez-vous", - "appointmentsCalendar": "Calendrier des Rendez-vous", - "appointmentScheduled": "Rendez-vous planifié", + "appointmentsCalendar": "Calendrier des rendez-vous", + "appointmentScheduled": "Rendez-vous programmé", "appointmentService": "Service du rendez-vous", "appointmentServiceCreate": "Service du rendez-vous créé avec succès", "appointmentServiceName": "Nom du service du rendez-vous", - "appointmentsScheduledForToday": "rendez-vous planifiés aujourd’hui", + "appointmentsScheduledForToday": "rendez-vous programmés pour aujourd'hui", "appointmentsTable": "Tableau des rendez-vous", "appointmentStatus": "Statut du rendez-vous", "appointmentToFulfill": "Sélectionner le rendez-vous à compléter", @@ -45,71 +45,71 @@ "cancelAppointment": "Annuler le rendez-vous", "cancelAppointmentModalConfirmationText": "Voulez-vous vraiment annuler ce rendez-vous?", "cancelled": "Annulé", - "checkedIn": "Arrivé(e)", - "checkedOut": "Parti(e)", - "checkFilters": "Check the filters above", - "checkIn": "Check In", - "checkOut": "Check out", - "chooseAppointmentType": "Choose appointment type", - "chooseLocation": "Choose a location", - "chooseProvider": "Choose a provider", - "chooseService": "Select service", + "checkedIn": "Enregistré", + "checkedOut": "Sorti", + "checkFilters": "Vérifiez les filtres ci-dessus", + "checkIn": "Enregistrer", + "checkOut": "Sortie", + "chooseAppointmentType": "Choisir un type de rendez-vous", + "chooseLocation": "Choisir un emplacement", + "chooseProvider": "Choisir un prestataire", + "chooseService": "Sélectionner un service", "completed": "Complété", "Contact": "Contact {{index}}", - "countMore_one": "{{count}} more", - "countMore_other": "{{count}} more", - "createAppointmentService": "Create appointment services", + "countMore_one": "{{count}} de plus", + "countMore_other": "{{count}} de plus", + "createAppointmentService": "Créer des services de rendez-vous", "createNewAppointment": "Créer un nouveau rendez-vous", "date": "Date", - "date&Time": "Date & time", - "dateAppointmentIssuedCannotBeAfterAppointmentDate": "Date appointment issued cannot be after the appointment date", - "dateOfBirth": "Date of birth", - "dateScheduled": "Date appointment issued", - "dateScheduledDetail": "Date appointment issued", - "dateTime": "Date & Time", - "day": "Day", - "daysOfWeek": "Days of the week", + "date&Time": "Date et heure", + "dateAppointmentIssuedCannotBeAfterAppointmentDate": "La date du rendez-vous ne peut pas être postérieure à la date du rendez-vous", + "dateOfBirth": "Date de naissance", + "dateScheduled": "Date de rendez vous émise", + "dateScheduledDetail": "Date de rendez vous émise", + "dateTime": "Date et heure", + "day": "Jour", + "daysOfWeek": "Jours de la semaine", "discard": "Abandonner", - "download": "Download", - "durationErrorMessage": "Duration should be greater than zero", - "durationInMinutes": "Duration (minutes)", + "download": "Télécharger", + "durationErrorMessage": "La durée doit être supérieure à zéro", + "durationInMinutes": "Durée (minutes)", "durationMins": "Durée min", - "edit": "Edit", + "edit": "Modifier", "editAppointment": "Modifier le rendez-vous", "editAppointments": "Modifier le rendez-vous", "emptyStateText": "Pas de <1>{{displayText}} à afficher", "encounters": "Rencontres", "encounterType": "Type de rencontre", - "endAppointmentAndVisitConfirmationMessage": "Checking the patient out will mark the appointment as complete, and close out the active visit for this patient.", - "endAppointmentConfirmation": "Are you sure you want to check the patient out for this appointment?", - "endAppointmentConfirmationMessage": "Checking the patient out will mark the appointment as complete.", - "endDate": "End date", + "endAppointmentAndVisitConfirmationMessage": " La sortie du patient marquera le rendez-vous comme terminé et clôturera la visite active pour ce patient.", + "endAppointmentConfirmation": " Etes-vous sûr de vouloir enregistrer le patient pour ce rendez-vous ?", + "endAppointmentConfirmationMessage": " La sortie du patient marquera le rendez-vous comme terminé.", + "endDate": "Date de fin", "endTime": "Heure de fin", - "errorCreatingAppointmentService": "Error creating appointment service", - "expected": "Attendus", - "filterTable": "Filter table", + "errorCreatingAppointmentService": " Erreur lors de la création du service de rendez-vous", + "expected": "Prévus:", + "filterTable": "Filtrer le tableau", "gender": "Genre", - "highestServiceVolume": "Highest volume service: {{time}}", + "highestServiceVolume": "Service le plus utilisé: {{time}}", "identifier": "Identifiant", - "invalidNumber": "Number is not valid", - "invalidTime": "Invalid time", - "isRecurringAppointment": "Is this a recurring appointment?", + "invalidNumber": "Le numéro n'est pas valide", + "invalidTime": "Heure non valide", + "isRecurringAppointment": "S'agit-il d'un rendez-vous récurrent?", "itemsPerPage": "Eléments par page", "loading": "En cours de chargement", "location": "Emplacement", "medications": "Médicaments", "missed": "Manqué", - "next": "Next", - "nextMonth": "Next month", + "next": "Suivant", + "nextMonth": "Le mois suivant", "nextPage": "Page suivante", "no": "Non", - "noAppointmentsToDisplay": "No appointments to display", - "noContent": "No Content", + "noAppointmentsToDisplay": "Pas de rendez-vous prévus à afficher", + "noContent": "Pas de Contenu", "noCurrentAppointments": "Il n'y a pas de rendez-vous à afficher aujourd'hui pour ce patient", "noEncountersFound": "Aucune rencontre trouvée", "noPastAppointments": "Il n'y a pas de rendez-vous passé à afficher pour ce patient", "noPreviousVisitFound": "Aucune visite précédente trouvée", - "notArrived": "Not arrived", + "notArrived": "Pas arrivé(s)", "note": "Note", "notes": "Notes", "noUpcomingAppointments": "Il n'y a pas de rendez-vous à venir à afficher pour ce patient", @@ -117,50 +117,50 @@ "pageNumber": "Numéro de page", "past": "Passé", "patientDetails": "Détails du patient", - "patientDoubleBooking": "Patient already booked for an appointment at this time", + "patientDoubleBooking": "Le patient a déjà un rendez vous à cette date", "patientName": "Nom du patient", "patients": "Patients", - "period": "Period", - "prev": "Prev", - "previousMonth": "Previous month", + "period": "Période", + "prev": "Préc", + "previousMonth": "Mois précédent", "previousPage": "Page précédente", - "provider": "Fournisseur", - "providers": "Fournisseurs", - "providersBooked": "Providers booked: {{time}}", - "recurringAppointment": "Recurring Appointment", - "recurringAppointmentShouldHaveEndDate": "A recurring appointment should have an end date", - "repeatEvery": "Repeat every", + "provider": "Prestataire", + "providers": "Prestataires", + "providersBooked": "Prestataires reservés: {{time}}", + "recurringAppointment": "Rendez-vous Récurrent", + "recurringAppointmentShouldHaveEndDate": "Un rendez-vous récurrent doit avoir une date de fin", + "repeatEvery": "Répéter chaque", "save": "Sauvegarder", - "saveAndClose": "Save and close", + "saveAndClose": "Sauvegarder et fermer", "scheduled": "Agendé", "scheduledAppointments": "Rendez-vous planifiés", - "scheduledForToday": "Prévu pour aujourd'hui", - "selectALocation": "Select a location", - "selectAppointmentStatus": "Select status", + "scheduledForToday": "Programmé(s) Pour Aujourd'hui", + "selectALocation": "Sélectionner un emplacement", + "selectAppointmentStatus": "Sélectionner le statut", "selectAppointmentType": "Sélectionnez un type de rendez-vous", "selectLocation": "Sélectionnez un emplacement", - "selectOption": "Select an option", - "selectProvider": "Select a provider", - "selectService": "Select a service", - "selectServiceType": "Select service type", + "selectOption": "Sélectionner une option", + "selectProvider": "Sélectionnez un prestataire", + "selectService": "Sélectionner un service", + "selectServiceType": "Sélectionner un type de service", "service": "Service", "serviceName": "Nom du service", "serviceType": "Type de service", - "serviceUnavailable": "Appointment time is outside of service hours", + "serviceUnavailable": "L'heure du rendez-vous est en dehors des heures de service", "startDate": "Date de début", "startTime": "Heure de début", "status": "Statut", - "time": "Time", + "time": "Heure", "today": "Aujourd'hui", - "todays": "Aujourd'hui", + "todays": "Aujourd'hui: ", "type": "Type", - "unscheduled": "Unscheduled", + "unscheduled": "Non programmé", "unscheduledAppointments": "Rendez-vous non-planifiés", "unscheduledAppointments_lower": "rendez-vous non-planifiés", - "upcoming": "Upcoming", - "upcomingAppointments": "Upcoming appointments", + "upcoming": "À venir", + "upcomingAppointments": "À venir rendez-vous", "view": "Vue", - "vitals": "Vitals", - "week": "Week", - "yes": "Yes" + "vitals": "Signes Vitaux", + "week": "Semaine", + "yes": "Oui" } diff --git a/packages/esm-appointments-app/translations/he.json b/packages/esm-appointments-app/translations/he.json index 507f0a208..f57c467d3 100644 --- a/packages/esm-appointments-app/translations/he.json +++ b/packages/esm-appointments-app/translations/he.json @@ -27,7 +27,7 @@ "appointments": "תורים", "Appointments": "Appointments", "appointments_lower": "appointments", - "appointmentsCalendar": "לוח שנה של התורים", + "appointmentsCalendar": "Appointments calendar", "appointmentScheduled": "התור נקבע", "appointmentService": "שירות התור", "appointmentServiceCreate": "שירות התור נוצר בהצלחה", diff --git a/packages/esm-appointments-app/translations/km.json b/packages/esm-appointments-app/translations/km.json index 5b4baa9d7..3b556ec48 100644 --- a/packages/esm-appointments-app/translations/km.json +++ b/packages/esm-appointments-app/translations/km.json @@ -27,7 +27,7 @@ "appointments": "ការណាត់ជួប", "Appointments": "Appointments", "appointments_lower": "appointments", - "appointmentsCalendar": "Appointments Calendar", + "appointmentsCalendar": "Appointments calendar", "appointmentScheduled": "ការណាត់ជួបតាមកាលវិភាគ", "appointmentService": "សេវាកម្មណាត់ជួប", "appointmentServiceCreate": "សេវាកម្មណាត់ជួបត្រូវបានបង្កើតដោយជោគជ័យ", diff --git a/packages/esm-appointments-app/translations/zh.json b/packages/esm-appointments-app/translations/zh.json index 08ce37cfc..14e091c4a 100644 --- a/packages/esm-appointments-app/translations/zh.json +++ b/packages/esm-appointments-app/translations/zh.json @@ -27,7 +27,7 @@ "appointments": "预约", "Appointments": "预约", "appointments_lower": "预约", - "appointmentsCalendar": "预约日历", + "appointmentsCalendar": "Appointments calendar", "appointmentScheduled": "预约已安排", "appointmentService": "预约服务", "appointmentServiceCreate": "预约服务创建成功", diff --git a/packages/esm-appointments-app/translations/zh_CN.json b/packages/esm-appointments-app/translations/zh_CN.json index 08ce37cfc..14e091c4a 100644 --- a/packages/esm-appointments-app/translations/zh_CN.json +++ b/packages/esm-appointments-app/translations/zh_CN.json @@ -27,7 +27,7 @@ "appointments": "预约", "Appointments": "预约", "appointments_lower": "预约", - "appointmentsCalendar": "预约日历", + "appointmentsCalendar": "Appointments calendar", "appointmentScheduled": "预约已安排", "appointmentService": "预约服务", "appointmentServiceCreate": "预约服务创建成功", diff --git a/packages/esm-bed-management-app/translations/am.json b/packages/esm-bed-management-app/translations/am.json index c85ffb050..dba1d2c0e 100644 --- a/packages/esm-bed-management-app/translations/am.json +++ b/packages/esm-bed-management-app/translations/am.json @@ -15,7 +15,6 @@ "bedTagPlaceholder": "", "bedType": "Add Bed Type", "bedTypePlaceholder": "", - "cancel": "Cancel", "checkFilters": "Check the filters above", "chooseBedtype": "Choose a bed type", "chooseOccupiedStatus": "Choose occupied status", diff --git a/packages/esm-bed-management-app/translations/ar.json b/packages/esm-bed-management-app/translations/ar.json index c85ffb050..dba1d2c0e 100644 --- a/packages/esm-bed-management-app/translations/ar.json +++ b/packages/esm-bed-management-app/translations/ar.json @@ -15,7 +15,6 @@ "bedTagPlaceholder": "", "bedType": "Add Bed Type", "bedTypePlaceholder": "", - "cancel": "Cancel", "checkFilters": "Check the filters above", "chooseBedtype": "Choose a bed type", "chooseOccupiedStatus": "Choose occupied status", diff --git a/packages/esm-bed-management-app/translations/es.json b/packages/esm-bed-management-app/translations/es.json index c85ffb050..3a191820d 100644 --- a/packages/esm-bed-management-app/translations/es.json +++ b/packages/esm-bed-management-app/translations/es.json @@ -1,52 +1,51 @@ { - "actions": "Actions", - "addBed": "Add bed", - "addBedTag": "Create Bed Tag", - "addBedtype": "Add Bed Type", - "addBedType": "Create Bed type", - "allocationStatus": "Allocated", - "bedId": "Bed ID", - "bedIdPlaceholder": "e.g. BMW-201", - "bedLocation": "Location", - "bedManagement": "Bed Management", - "bedName": "Bed Name", - "beds": "Beds", - "bedTag": "Bed Tag Name", + "actions": "Acciones", + "addBed": "Añadir cama", + "addBedTag": "Crear Etiqueta de Cama", + "addBedtype": "Añadir Tipo de Cama", + "addBedType": "Crear Tipo de Cama", + "allocationStatus": "Asignado", + "bedId": "ID de la Cama", + "bedIdPlaceholder": "p. ej. BMW-201", + "bedLocation": "Ubicación", + "bedManagement": "Administración de Camas", + "bedName": "Nombre de la Cama", + "beds": "Camas", + "bedTag": "Nombre de la Etiqueta de la Cama", "bedTagPlaceholder": "", - "bedType": "Add Bed Type", + "bedType": "Añadir Tipo de Cama", "bedTypePlaceholder": "", - "cancel": "Cancel", - "checkFilters": "Check the filters above", - "chooseBedtype": "Choose a bed type", - "chooseOccupiedStatus": "Choose occupied status", - "createNewBed": "Create a new bed", - "description": "Description", - "displayName": "Display Name", + "checkFilters": "Compruebe los filtros anteriores", + "chooseBedtype": "Elija un tipo de cama", + "chooseOccupiedStatus": "Elija el estado ocupado", + "createNewBed": "Crear una nueva cama", + "description": "Descripción", + "displayName": "Mostrar Nombre", "displayNamePlaceholder": "", - "editBed": "Edit Tag", - "editBedTag": "Edit Bed Tag", - "editBedType": "Edit Bed Type", + "editBed": "Editar etiqueta", + "editBedTag": "Editar Etiqueta de la Cama", + "editBedType": "Editar Tipo de Cama", "error": "Error", - "errorCreatingForm": "Error creating bed", - "errorFetchingbedInformation": "Error fetching bed information", - "filterByOccupancyStatus": "Filter by occupancy status", - "formCreated": "Add bed Type", - "formSaved": "Bed Type", + "errorCreatingForm": "Error al crear cama", + "errorFetchingbedInformation": "Error al obtener información de la cama", + "filterByOccupancyStatus": "Filtrar por estado de ocupación", + "formCreated": "Añadir Tipo de Cama", + "formSaved": "Tipo de Cama", "headerTitle": "", "ids": "Id", - "location": "Locations", - "manageBeds": "Manage Beds", - "name": "Name", + "location": "Ubicaciones", + "manageBeds": "Administrar Camas", + "name": "Nombre", "no": "No", - "No data": "No data to display", - "occupancyStatus": "Occupied", - "or": "or", + "No data": "No hay datos para mostrar", + "occupancyStatus": "Ocupada", + "or": "o", "pleaseFillField": "", - "required": "Required", - "save": "Save", - "saveSuccessMessage": "was saved successfully.", - "selectBedLocation": "Select a bed location", - "viewBeds": "View beds", - "wardAllocation": "Ward Allocation", - "yes": "Yes" + "required": "Obligatorio", + "save": "Guardar", + "saveSuccessMessage": "fue guardado exitosamente.", + "selectBedLocation": "Seleccione una ubicación para la cama", + "viewBeds": "Ver camas", + "wardAllocation": "Asignación de sala", + "yes": "Sí" } diff --git a/packages/esm-bed-management-app/translations/fr.json b/packages/esm-bed-management-app/translations/fr.json index 4286a7586..2ed9929f3 100644 --- a/packages/esm-bed-management-app/translations/fr.json +++ b/packages/esm-bed-management-app/translations/fr.json @@ -1,41 +1,40 @@ { "actions": "Actions", - "addBed": "Ajouter lit", - "addBedTag": "Create Bed Tag", - "addBedtype": "Add Bed Type", - "addBedType": "Create Bed type", - "allocationStatus": "Allocated", - "bedId": "Bed ID", - "bedIdPlaceholder": "e.g. BMW-201", + "addBed": "Ajouter un lit", + "addBedTag": "Créer une étiquette de lit", + "addBedtype": "Ajouter type de lit", + "addBedType": "Créer Type de lit", + "allocationStatus": "Attribué", + "bedId": "Identifiant du Lit", + "bedIdPlaceholder": "exemple : BMW-201", "bedLocation": "Emplacement", - "bedManagement": "Bed Management", - "bedName": "Bed Name", - "beds": "Beds", - "bedTag": "Bed Tag Name", + "bedManagement": "Gestion du lit", + "bedName": "Nom du lit", + "beds": "Lits", + "bedTag": "Nom de l'étiquette du lit", "bedTagPlaceholder": "", - "bedType": "Add Bed Type", + "bedType": "Ajouter un type de lit", "bedTypePlaceholder": "", - "cancel": "Annuler", - "checkFilters": "Check the filters above", + "checkFilters": "Vérifiez les filtres ci-dessus", "chooseBedtype": "Choisir un type de lit", - "chooseOccupiedStatus": "Choose occupied status", - "createNewBed": "Create a new bed", + "chooseOccupiedStatus": " Choisissez le statut occupé", + "createNewBed": "Créer un nouveau lit", "description": "Description", "displayName": "Display Name", "displayNamePlaceholder": "", - "editBed": "Edit Tag", - "editBedTag": "Edit Bed Tag", - "editBedType": "Edit Bed Type", + "editBed": "Afficher un tag", + "editBedTag": "Afficher un Tag de lit", + "editBedType": "Afficher un type de lit", "error": "Erreur", - "errorCreatingForm": "Error creating bed", - "errorFetchingbedInformation": "Error fetching bed information", - "filterByOccupancyStatus": "Filter by occupancy status", - "formCreated": "Add bed Type", - "formSaved": "Bed Type", + "errorCreatingForm": "Erreur lors de la création du lit", + "errorFetchingbedInformation": " Erreur lors de la récupération des informations sur le lit", + "filterByOccupancyStatus": "Filtrer par statut d'occupation", + "formCreated": "Ajouter un type de lit", + "formSaved": "Type de lit", "headerTitle": "", - "ids": "Id", + "ids": "Identifiant", "location": "Emplacements", - "manageBeds": "Manage Beds", + "manageBeds": "Gestion des lits", "name": "Nom", "no": "Non", "No data": "Pas de données à afficher", @@ -44,8 +43,8 @@ "pleaseFillField": "", "required": "Requis", "save": "Enregistrer", - "saveSuccessMessage": "was saved successfully.", - "selectBedLocation": "Select a bed location", + "saveSuccessMessage": "a été enregistré avec succès.", + "selectBedLocation": "Sélectionner un emplacement de lit", "viewBeds": "Voir lits", "wardAllocation": "Ward Allocation", "yes": "Oui" diff --git a/packages/esm-bed-management-app/translations/he.json b/packages/esm-bed-management-app/translations/he.json index c85ffb050..dba1d2c0e 100644 --- a/packages/esm-bed-management-app/translations/he.json +++ b/packages/esm-bed-management-app/translations/he.json @@ -15,7 +15,6 @@ "bedTagPlaceholder": "", "bedType": "Add Bed Type", "bedTypePlaceholder": "", - "cancel": "Cancel", "checkFilters": "Check the filters above", "chooseBedtype": "Choose a bed type", "chooseOccupiedStatus": "Choose occupied status", diff --git a/packages/esm-bed-management-app/translations/km.json b/packages/esm-bed-management-app/translations/km.json index c85ffb050..dba1d2c0e 100644 --- a/packages/esm-bed-management-app/translations/km.json +++ b/packages/esm-bed-management-app/translations/km.json @@ -15,7 +15,6 @@ "bedTagPlaceholder": "", "bedType": "Add Bed Type", "bedTypePlaceholder": "", - "cancel": "Cancel", "checkFilters": "Check the filters above", "chooseBedtype": "Choose a bed type", "chooseOccupiedStatus": "Choose occupied status", diff --git a/packages/esm-bed-management-app/translations/zh.json b/packages/esm-bed-management-app/translations/zh.json index c85ffb050..dba1d2c0e 100644 --- a/packages/esm-bed-management-app/translations/zh.json +++ b/packages/esm-bed-management-app/translations/zh.json @@ -15,7 +15,6 @@ "bedTagPlaceholder": "", "bedType": "Add Bed Type", "bedTypePlaceholder": "", - "cancel": "Cancel", "checkFilters": "Check the filters above", "chooseBedtype": "Choose a bed type", "chooseOccupiedStatus": "Choose occupied status", diff --git a/packages/esm-bed-management-app/translations/zh_CN.json b/packages/esm-bed-management-app/translations/zh_CN.json index c85ffb050..dba1d2c0e 100644 --- a/packages/esm-bed-management-app/translations/zh_CN.json +++ b/packages/esm-bed-management-app/translations/zh_CN.json @@ -15,7 +15,6 @@ "bedTagPlaceholder": "", "bedType": "Add Bed Type", "bedTypePlaceholder": "", - "cancel": "Cancel", "checkFilters": "Check the filters above", "chooseBedtype": "Choose a bed type", "chooseOccupiedStatus": "Choose occupied status", diff --git a/packages/esm-patient-list-management-app/translations/fr.json b/packages/esm-patient-list-management-app/translations/fr.json index 9a4ebe1ff..dc5293a18 100644 --- a/packages/esm-patient-list-management-app/translations/fr.json +++ b/packages/esm-patient-list-management-app/translations/fr.json @@ -5,40 +5,40 @@ "allLists": "Toutes les listes", "backToListsPage": "Retour sur la page des listes", "cancel": "Annuler", - "checkFilters": "Check the filters above", + "checkFilters": "Vérifiez les filtres ci-dessus", "configureList": "Configurez votre liste de patients à l'aide des champs ci-dessous", - "confirmDeletePatientList": "Are you sure you want to delete this patient list?", - "created": "Created", + "confirmDeletePatientList": "Êtes-vous sûr de vouloir supprimer cette liste de patients?", + "created": "Créé(e)", "createdOn": "Créé le", "createList": "Créer une liste", "createNewPatientList": "Créer une nouvelle liste de patients", - "createPatientList": "Create patient list", + "createPatientList": "Créer une liste de patients", "deleted": "Supprimé", "deletedPatientList": "Liste des patients supprimés", - "deletePatientList": "Delete patient list", + "deletePatientList": "Supprimer la liste des patients", "editList": "Modifier la liste", "editNameDescription": "Modifier le Nom/ la Description", "editPatientListHeader": "Modifier la liste des patients", - "emptyList": "This list has no patients", + "emptyList": "Cette liste ne contient aucun patient", "emptyStateIllustration": "Empty state illustration", "emptyStateText": "Il n'y a pas de liste de patient {{listType}} à afficher", "error": "Erreur", "errorAddPatientToList": "Patient non ajouté à la liste", "errorCopy": "Désolé, une erreur s’est produite à l’affichage. Vous pouvez tenter de rafraîchir la page, ou bien contacter l'administrateur du site et transmettre le message d'erreur ci-dessus.", - "errorCreatingList": "Error creating list", - "errorDeletingList": "Error deleting patient list", - "errorRemovingPatientFromList": "Failed to remove patient from list", - "errorUpdatingList": "Error updating list", + "errorCreatingList": "Erreur lors de la création de la liste", + "errorDeletingList": "Erreur lors de la suppression de la liste de patients", + "errorRemovingPatientFromList": "Échec de la suppression du patient de la liste", + "errorUpdatingList": "Erreur lors de la mise à jour de la liste", "identifier": "Identifiant", "items": "eléments", "itemsDisplayed": "{{numberOfItemsDisplayed}} eléments", - "listCreated": "List created successfully", + "listCreated": "Liste créée avec succès", "listDescriptionPlaceholder": "par ex. Les patients atteints d'asthme diagnostiqué qui peuvent être disposés à faire partie d'une étude de recherche universitaire", - "listName": "List name", + "listName": "Nom de la liste", "listNamePlaceholder": "par ex. Participants potentiels de la recherche", - "listType": "List type", - "listUpdated": "List updated successfully", - "listUpToDate": "The list is now up to date", + "listType": "Type de liste", + "listUpdated": "Liste mise à jour avec succès", + "listUpToDate": "La liste est maintenant à jour", "myLists": "Mes listes", "name": "Nom", "newList": "Nouvelle liste", @@ -47,37 +47,37 @@ "newPatientListNameLabel": "Nom de la liste", "nextPage": "Page suivante", "noMatchingLists": "Aucun liste à afficher", - "noMatchingPatients": "No matching patients to display", - "noOfPatients": "No. of patients", + "noMatchingPatients": "Aucun patient correspondant à afficher", + "noOfPatients": "Nombre de patients", "noPatientListFound": "Aucune liste de patients trouvée", "noPatientsInList": "Il n'y a pas de patient dans cette liste", "offlinePatients": "Patients hors ligne", "openPatientList": "Ajouter à la liste", - "patientListMemberCount_one": "This list has {{count}} patient", - "patientListMemberCount_other": "This list has {{count}} patients", + "patientListMemberCount_one": "Cette liste a {{count}} patient", + "patientListMemberCount_other": "Cette liste a {{count}} patients", "patientLists": "Listes de patients", - "patientRemovedFromList": "Patient removed from list", + "patientRemovedFromList": "Patient retiré de la liste", "patients": "Patients", "previousPage": "Page précédente", - "problemCreatingList": "There was a problem creating the list", - "problemUpdatingList": "There was a problem updating the list", - "removeFromList": "Remove from list", - "removePatientFromListConfirmation": "Are you sure you want to remove {{patientName}} from this list?", + "problemCreatingList": "Problème lors de la création de la liste", + "problemUpdatingList": "Problème lors de la mise à jour de la liste", + "removeFromList": "Supprimer la liste", + "removePatientFromListConfirmation": "Êtes-vous sûr de vouloir retirer {{patientName}} de cette liste?", "searchForAListToAddThisPatientTo": "Rechercher une liste à laquelle ajouter ce patient.", "searchForList": "Rechercher une liste", - "searchThisList": "Search this list", + "searchThisList": "Recherchez dans cette liste", "sex": "Sexe", - "starList": "Mettre en favori", - "starred": "favori", - "starredLists": "Listes de favoris", - "starringPatientListFailed": "Marquage des listes de patients comme favoris/non favoris échec du marquage", + "starList": "Étoile de la liste", + "starred": "étoilé", + "starredLists": "Listes etoilées", + "starringPatientListFailed": "Marquage des listes de patients étoilées / non étoilées a échoué", "startDate": "Date de début", - "submitting": "Submitting", + "submitting": "En cours de soumission", "successAddPatientToList": "Patient ajouté à la liste", "successfullyAdded": "Ajouté avec succès", - "systemDefined": "system-defined", - "systemLists": "Listes systemes", - "unstarList": "Enlever comme favori", - "updated": "Updated", - "userDefined": "user-defined" + "systemDefined": "définie par le système", + "systemLists": "Listes du système", + "unstarList": "Enlever comme étoilée", + "updated": "Mis à jour", + "userDefined": "définie par I'utilisateur" } diff --git a/packages/esm-patient-registration-app/src/patient-registration/field/dob/dob.component.tsx b/packages/esm-patient-registration-app/src/patient-registration/field/dob/dob.component.tsx index 7b1500bf2..6599103ec 100644 --- a/packages/esm-patient-registration-app/src/patient-registration/field/dob/dob.component.tsx +++ b/packages/esm-patient-registration-app/src/patient-registration/field/dob/dob.component.tsx @@ -30,7 +30,7 @@ export const DobField: React.FC = () => { const [birthdate, birthdateMeta] = useField('birthdate'); const [yearsEstimated, yearsEstimateMeta] = useField('yearsEstimated'); const [monthsEstimated, monthsEstimateMeta] = useField('monthsEstimated'); - const { setFieldValue } = useContext(PatientRegistrationContext); + const { setFieldValue, setFieldTouched } = useContext(PatientRegistrationContext); const today = new Date(); const onToggle = useCallback( @@ -39,6 +39,7 @@ export const DobField: React.FC = () => { setFieldValue('birthdate', ''); setFieldValue('yearsEstimated', 0); setFieldValue('monthsEstimated', ''); + setFieldTouched('birthdateEstimated', true, false); }, [setFieldValue], ); @@ -46,8 +47,9 @@ export const DobField: React.FC = () => { const onDateChange = useCallback( (birthdate: Date) => { setFieldValue('birthdate', birthdate); + setFieldTouched('birthdate', true, false); }, - [setFieldValue], + [setFieldValue, setFieldTouched], ); const onEstimatedYearsChange = useCallback( @@ -80,7 +82,10 @@ export const DobField: React.FC = () => { setFieldValue('yearsEstimated', years); setFieldValue('monthsEstimated', months > 0 ? months : ''); setFieldValue('birthdate', calcBirthdate(years, months, dateOfBirth)); - }, [setFieldValue, monthsEstimateMeta, yearsEstimateMeta, dateOfBirth]); + setFieldTouched('yearsEstimated', true, false); + setFieldTouched('monthsEstimated', true, false); + setFieldTouched('birthdate', true, false); + }, [setFieldValue, setFieldTouched, monthsEstimateMeta, yearsEstimateMeta, dateOfBirth]); return (
@@ -103,6 +108,7 @@ export const DobField: React.FC = () => { id="birthdate" {...birthdate} onChange={onDateChange} + onBlur={() => setFieldTouched('birthdate', true, false)} maxDate={today} labelText={t('dateOfBirthLabelText', 'Date of birth')} isInvalid={!!(birthdateMeta.touched && birthdateMeta.error)} @@ -125,7 +131,11 @@ export const DobField: React.FC = () => { min={0} required {...yearsEstimated} - onBlur={updateBirthdate} + onBlur={(e) => { + yearsEstimated.onBlur(e); + setFieldTouched('yearsEstimated', true, false); + updateBirthdate(); + }} />
@@ -141,7 +151,11 @@ export const DobField: React.FC = () => { min={0} {...monthsEstimated} required={!yearsEstimateMeta.value} - onBlur={updateBirthdate} + onBlur={(e) => { + monthsEstimated.onBlur(e); + setFieldTouched('monthsEstimated', true, false); + updateBirthdate(); + }} />
diff --git a/packages/esm-patient-registration-app/src/patient-registration/field/gender/gender-field.component.tsx b/packages/esm-patient-registration-app/src/patient-registration/field/gender/gender-field.component.tsx index 9052b0574..75fa4663a 100644 --- a/packages/esm-patient-registration-app/src/patient-registration/field/gender/gender-field.component.tsx +++ b/packages/esm-patient-registration-app/src/patient-registration/field/gender/gender-field.component.tsx @@ -11,11 +11,12 @@ export const GenderField: React.FC = () => { const { fieldConfigurations } = useConfig(); const { t } = useTranslation(); const [field, meta] = useField('gender'); - const { setFieldValue } = useContext(PatientRegistrationContext); + const { setFieldValue, setFieldTouched } = useContext(PatientRegistrationContext); const fieldConfigs = fieldConfigurations?.gender; const setGender = (gender: string) => { setFieldValue('gender', gender); + setFieldTouched('gender', true, false); }; /** * DO NOT REMOVE THIS COMMENT HERE, ADDS TRANSLATION FOR SEX OPTIONS diff --git a/packages/esm-patient-registration-app/src/patient-registration/field/gender/gender-field.test.tsx b/packages/esm-patient-registration-app/src/patient-registration/field/gender/gender-field.test.tsx index a83591b60..92fbf407a 100644 --- a/packages/esm-patient-registration-app/src/patient-registration/field/gender/gender-field.test.tsx +++ b/packages/esm-patient-registration-app/src/patient-registration/field/gender/gender-field.test.tsx @@ -12,6 +12,7 @@ jest.mock('react', () => ({ ...(jest.requireActual('react') as any), useContext: jest.fn(() => ({ setFieldValue: jest.fn(), + setFieldTouched: jest.fn(), })), })); diff --git a/packages/esm-patient-registration-app/src/patient-registration/field/name/name-field.component.tsx b/packages/esm-patient-registration-app/src/patient-registration/field/name/name-field.component.tsx index 4095e4440..f2b4e2147 100644 --- a/packages/esm-patient-registration-app/src/patient-registration/field/name/name-field.component.tsx +++ b/packages/esm-patient-registration-app/src/patient-registration/field/name/name-field.component.tsx @@ -21,7 +21,7 @@ function checkNumber(value: string) { export const NameField = () => { const { t } = useTranslation(); - const { setCapturePhotoProps, currentPhoto, setFieldValue } = useContext(PatientRegistrationContext); + const { setCapturePhotoProps, currentPhoto, setFieldValue, setFieldTouched } = useContext(PatientRegistrationContext); const { fieldConfigurations: { name: { @@ -48,6 +48,7 @@ export const NameField = () => { imageData: dataUri, dateTime: photoDateTime, }); + setFieldTouched('photo', true, false); } }, [setCapturePhotoProps], @@ -63,6 +64,9 @@ export const NameField = () => { setFieldValue('familyName', defaultUnknownFamilyName); setUnknownPatient('true'); } + setFieldTouched('givenName', true); + setFieldTouched('familyName', true); + setFieldTouched(`attributes.${unidentifiedPatientAttributeTypeUuid}`, true, false); }; const firstNameField = ( diff --git a/packages/esm-patient-registration-app/src/patient-registration/patient-registration.component.tsx b/packages/esm-patient-registration-app/src/patient-registration/patient-registration.component.tsx index 2db6ba576..55b250bda 100644 --- a/packages/esm-patient-registration-app/src/patient-registration/patient-registration.component.tsx +++ b/packages/esm-patient-registration-app/src/patient-registration/patient-registration.component.tsx @@ -161,7 +161,7 @@ export const PatientRegistration: React.FC = ({ savePa onSubmit={onFormSubmit}> {(props) => (
- + 0} redirect={target} />
diff --git a/packages/esm-patient-registration-app/src/routes.json b/packages/esm-patient-registration-app/src/routes.json index 8e55b60df..486834b48 100644 --- a/packages/esm-patient-registration-app/src/routes.json +++ b/packages/esm-patient-registration-app/src/routes.json @@ -45,18 +45,16 @@ "slot": "patient-search-actions-slot", "online": true, "offline": true - }, - { - "component": "deleteIdentifierConfirmationModal", - "name": "delete-identifier-confirmation-modal", - "online": true, - "offline": true } ], "modals": [ { "name": "cancel-patient-edit-modal", "component": "cancelPatientEditModal" + }, + { + "name": "delete-identifier-confirmation-modal", + "component": "deleteIdentifierConfirmationModal" } ] } diff --git a/packages/esm-patient-registration-app/src/widgets/delete-identifier-confirmation.modal.tsx b/packages/esm-patient-registration-app/src/widgets/delete-identifier-confirmation.modal.tsx index c626ad5ed..f62e89717 100644 --- a/packages/esm-patient-registration-app/src/widgets/delete-identifier-confirmation.modal.tsx +++ b/packages/esm-patient-registration-app/src/widgets/delete-identifier-confirmation.modal.tsx @@ -1,15 +1,16 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; -import { Button } from '@carbon/react'; -import styles from './delete-identifier-confirmation.scss'; +import { Button, ModalBody, ModalHeader, ModalFooter } from '@carbon/react'; interface DeleteIdentifierConfirmationModalProps { + closeModal: () => void; deleteIdentifier: (x: boolean) => void; identifierName: string; identifierValue: string; } const DeleteIdentifierConfirmationModal: React.FC = ({ + closeModal, deleteIdentifier, identifierName, identifierValue, @@ -17,24 +18,30 @@ const DeleteIdentifierConfirmationModal: React.FC -

{t('deleteIdentifierModalHeading', 'Remove identifier?')}

-

- {identifierName} - {t('deleteIdentifierModalText', ' has a value of ')} {identifierValue} -

-

- {t('confirmIdentifierDeletionText', 'Are you sure you want to remove this identifier?')} -

-
+ <> + + +

+ {identifierName && identifierValue && ( + + {identifierName} + {t('deleteIdentifierModalText', ' has a value of ')} {identifierValue}.{' '} + + )} + {t('confirmIdentifierDeletionText', 'Are you sure you want to delete this identifier?')} +

+
+ -
-
+ + ); }; diff --git a/packages/esm-patient-registration-app/src/widgets/delete-identifier-confirmation.scss b/packages/esm-patient-registration-app/src/widgets/delete-identifier-confirmation.scss deleted file mode 100644 index cb98f12b6..000000000 --- a/packages/esm-patient-registration-app/src/widgets/delete-identifier-confirmation.scss +++ /dev/null @@ -1,34 +0,0 @@ -@use '@carbon/layout'; -@use '@carbon/type'; -@use '@openmrs/esm-styleguide/src/vars' as *; - -.productiveHeading { - @include type.type-style('heading-compact-02'); -} - -.modalContent { - width: 100%; - background-color: $ui-01; - padding: layout.$spacing-05; -} - -.modalSubtitle { - @include type.type-style('body-compact-01'); -} - -.modalBody { - @include type.type-style('body-compact-01'); - margin: layout.$spacing-05 0; -} - -.buttonSet { - display: grid; - grid-template-columns: 1fr 1fr; - margin-left: -(layout.$spacing-05); - margin-right: -(layout.$spacing-05); - margin-bottom: -(layout.$spacing-05); -} - -.buttonSet > button { - max-width: unset !important; -} diff --git a/packages/esm-patient-registration-app/src/widgets/delete-identifier-confirmation.test.tsx b/packages/esm-patient-registration-app/src/widgets/delete-identifier-confirmation.test.tsx index 785a851bb..2066906d0 100644 --- a/packages/esm-patient-registration-app/src/widgets/delete-identifier-confirmation.test.tsx +++ b/packages/esm-patient-registration-app/src/widgets/delete-identifier-confirmation.test.tsx @@ -3,7 +3,7 @@ import userEvent from '@testing-library/user-event'; import { render, screen } from '@testing-library/react'; import DeleteIdentifierConfirmationModal from './delete-identifier-confirmation.modal'; -describe('DeleteIdentifierConfirmationModal component', () => { +describe('DeleteIdentifierConfirmationModal', () => { const mockDeleteIdentifier = jest.fn(); const mockIdentifierName = 'Identifier Name'; const mockIdentifierValue = 'Identifier Value'; @@ -13,6 +13,7 @@ describe('DeleteIdentifierConfirmationModal component', () => { render( = ({ queueEntry, closeModa () => z.object({ location: z.string({ required_error: t('queueLocationRequired', 'Queue location is required') }), + priority: z.string({ required_error: t('priorityIsRequired', 'Priority is required') }), service: z.string({ required_error: t('serviceIsRequired', 'Service is required') }), status: z.string({ required_error: t('statusIsRequired', 'Status is required') }), - priority: z.string({ required_error: t('priorityIsRequired', 'Priority is required') }), }), [], ); @@ -82,18 +83,16 @@ const ChangeStatus: React.FC = ({ queueEntry, closeModa endDate, sortWeight, ).then( - ({ status }) => { - if (status === 201) { - showSnackbar({ - isLowContrast: true, - title: t('updateEntry', 'Update entry'), - kind: 'success', - subtitle: t('queueEntryUpdateSuccessfully', 'Queue Entry Updated Successfully'), - }); - closeModal(); - mutateQueueEntries(); - navigate({ to: `${window.spaBase}/home/service-queues` }); - } + () => { + showSnackbar({ + isLowContrast: true, + title: t('updateEntry', 'Update entry'), + kind: 'success', + subtitle: t('queueEntryUpdateSuccessfully', 'Queue Entry Updated Successfully'), + }); + closeModal(); + mutateQueueEntries(); + navigate({ to: `${window.spaBase}/home/service-queues` }); }, (error) => { showSnackbar({ @@ -121,127 +120,131 @@ const ChangeStatus: React.FC = ({ queueEntry, closeModa
- {queueEntry.name}   ·  {queueEntry.patientSex}   ·  {queueEntry.patientAge}  - {t('years', 'Years')} + {t('patientInfo', '{{name}}{{sexInfo}}{{ageInfo}}', { + name: queueEntry.name, + sexInfo: queueEntry.patientSex ? ` · ${queueEntry.patientSex} · ` : '', + ageInfo: queueEntry.patientAge ? `${queueEntry.patientAge} ${t('years', 'Years')}` : '', + })}
-
- ( - - )} - /> -
- -
-
{t('queueService', 'Queue service')}
- ( - - )} - /> -
- -
-
{t('queueStatus', 'Queue status')}
- {!allowedStatuses?.length ? ( - - ) : ( + +
+
{t('queueLocation', 'Queue location')}
( - { - onChange(uuid); + render={({ field: { onChange, value } }) => ( + )} /> - )} -
- -
-
{t('queuePriority', 'Queue priority')}
- ( - <> - { - onChange(event.name as any); - }}> - {allowedPriorities?.length > 0 ? ( - allowedPriorities.map(({ uuid, display }) => { - return ; - }) - ) : ( - - )} - - {errors.priority &&
{errors.priority.message}
} - +
+
+
{t('queueService', 'Queue service')}
+ ( + + )} + /> +
+
+
{t('queueStatus', 'Queue status')}
+ {!allowedStatuses?.length ? ( + + ) : ( + ( + { + onChange(uuid); + }}> + {allowedStatuses?.length > 0 && + allowedStatuses.map(({ uuid, display }) => ( + + ))} + + )} + /> )} - /> -
+
+
+
{t('queuePriority', 'Queue priority')}
+ ( + <> + { + onChange(event.name as any); + }}> + {allowedPriorities?.length > 0 ? ( + allowedPriorities.map(({ uuid, display }) => { + return ; + }) + ) : ( + + )} + + {errors.priority &&
{errors.priority.message}
} + + )} + /> +
+