Skip to content

Commit

Permalink
Merge branch 'main' into ft-3818
Browse files Browse the repository at this point in the history
  • Loading branch information
usamaidrsk authored Oct 1, 2024
2 parents 6f06e46 + be1f84c commit 97f6a59
Show file tree
Hide file tree
Showing 78 changed files with 1,288 additions and 1,113 deletions.
14 changes: 7 additions & 7 deletions packages/esm-active-visits-app/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
12 changes: 6 additions & 6 deletions packages/esm-active-visits-app/translations/fr.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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"
Expand Down
Original file line number Diff line number Diff line change
@@ -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 = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -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')}` });
};

Expand All @@ -20,10 +21,10 @@ const CalendarHeader: React.FC = () => {
<div className={styles.titleContainer}>
<Button
className={styles.backButton}
iconDescription={t('back', 'Back')}
kind="ghost"
onClick={backButtonOnClick}
onClick={handleClick}
renderIcon={ArrowLeft}
iconDescription={t('back', 'Back')}
size="lg">
<span>{t('back', 'Back')}</span>
</Button>
Expand Down
Original file line number Diff line number Diff line change
@@ -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<DailyAppointmentsCountByService>;
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-appointments-app/src/constants.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
Original file line number Diff line number Diff line change
@@ -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);

Expand Down Expand Up @@ -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')}
</Button>
<ExtensionSlot
name="patient-search-button-slot"
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-appointments-app/translations/am.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"appointments": "Appointments",
"Appointments": "Appointments",
"appointments_lower": "appointments",
"appointmentsCalendar": "Appointments Calendar",
"appointmentsCalendar": "Appointments calendar",
"appointmentScheduled": "Appointment scheduled",
"appointmentService": "Appointment service",
"appointmentServiceCreate": "Appointment service created successfully",
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-appointments-app/translations/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"appointments": "موعد",
"Appointments": "Appointments",
"appointments_lower": "appointments",
"appointmentsCalendar": "تقويم المواعيد",
"appointmentsCalendar": "Appointments calendar",
"appointmentScheduled": "تم جدولة الموعد",
"appointmentService": "خدمة الموعد",
"appointmentServiceCreate": "تم إنشاء خدمة الموعد بنجاح",
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-appointments-app/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"appointments": "Appointments",
"Appointments": "Appointments",
"appointments_lower": "appointments",
"appointmentsCalendar": "Appointments Calendar",
"appointmentsCalendar": "Appointments calendar",
"appointmentScheduled": "Appointment scheduled",
"appointmentService": "Appointment service",
"appointmentServiceCreate": "Appointment service created successfully",
Expand Down
Loading

0 comments on commit 97f6a59

Please sign in to comment.