Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(refactor) Refactor modals to match naming conventions #1875

Merged
merged 1 commit into from
Jun 21, 2024
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 packages/esm-form-engine-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"test:watch": "cross-env TZ=UTC jest --watch --config jest.config.js --color",
"coverage": "yarn test --coverage",
"typescript": "tsc",
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.modal.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
},
"browserslist": [
"extends browserslist-config-openmrs"
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-form-engine-app/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ export const formCollapseToggle = getAsyncLifecycle(
);

export const deleteQuestionModal = getAsyncLifecycle(
() => import('./form-renderer/repeat/delete-question-modal.component'),
() => import('./form-renderer/repeat/delete-question.modal'),
options,
);
2 changes: 1 addition & 1 deletion packages/esm-generic-patient-widgets-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"test:watch": "cross-env TZ=UTC jest --watch --config jest.config.js --color",
"coverage": "yarn test --coverage",
"typescript": "tsc",
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.modal.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
},
"browserslist": [
"extends browserslist-config-openmrs"
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-patient-allergies-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"test:watch": "cross-env TZ=UTC jest --watch --config jest.config.js --color",
"coverage": "yarn test --coverage",
"typescript": "tsc",
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.extension.tsx' 'src/**/*.workspace.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.modal.tsx' 'src/**/*.extension.tsx' 'src/**/*.workspace.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
},
"browserslist": [
"extends browserslist-config-openmrs"
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-patient-allergies-app/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ export const allergyFormWorkspace = getAsyncLifecycle(
export const allergyTile = getSyncLifecycle(allergyTileComponent, options);

export const allergyDeleteConfirmationDialog = getAsyncLifecycle(
() => import('./allergies/delete-allergy-modal.component'),
() => import('./allergies/delete-allergy.modal'),
options,
);
2 changes: 1 addition & 1 deletion packages/esm-patient-attachments-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"test:watch": "cross-env TZ=UTC jest --watch --config jest.config.js --color",
"coverage": "yarn test --coverage",
"typescript": "tsc",
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.modal.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
},
"browserslist": [
"extends browserslist-config-openmrs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { useTranslation } from 'react-i18next';
import { Button, ModalHeader, ModalBody, ModalFooter } from '@carbon/react';
import { type Attachment } from '@openmrs/esm-framework';
import styles from './delete-attachment-confirmation-modal.scss';
import styles from './delete-attachment.scss';

interface DeleteAttachmentConfirmationProps {
attachment: Attachment;
Expand Down
11 changes: 4 additions & 7 deletions packages/esm-patient-attachments-app/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@ export const capturePhotoWidget = getAsyncLifecycle(() => import('./camera-media
moduleName,
});

export const deleteAttachmentModal = getAsyncLifecycle(
() => import('./attachments/delete-attachment-confirmation-modal.component'),
{
featureName: 'delete-attachment-modal',
moduleName,
},
);
export const deleteAttachmentModal = getAsyncLifecycle(() => import('./attachments/delete-attachment.modal'), {
featureName: 'delete-attachment-modal',
moduleName,
});
2 changes: 1 addition & 1 deletion packages/esm-patient-banner-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"test:watch": "cross-env TZ=UTC jest --watch --config jest.config.js --color",
"coverage": "yarn test --coverage",
"typescript": "tsc",
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.modal.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
},
"browserslist": [
"extends browserslist-config-openmrs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import userEvent from '@testing-library/user-event';
import { render, screen } from '@testing-library/react';
import { useReactToPrint } from 'react-to-print';
import { mockPatient } from 'tools';
import PrintIdentifierSticker from './print-identifier-sticker-modal.component';
import PrintIdentifierSticker from './print-identifier-sticker.modal';

const mockedCloseModal = jest.fn();
const mockedUseReactToPrint = jest.mocked(useReactToPrint);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useReactToPrint } from 'react-to-print';
import { Button, InlineLoading, ModalBody, ModalFooter, ModalHeader } from '@carbon/react';
import { age, displayName, showSnackbar, useConfig } from '@openmrs/esm-framework';
import { type ConfigObject } from '../config-schema';
import styles from './print-identifier-sticker-modal.scss';
import styles from './print-identifier-sticker.scss';

interface PrintIdentifierStickerProps {
closeModal: () => void;
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-patient-banner-app/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const deceasedPatientTag = getSyncLifecycle(deceasedPatientTagComponent,
export const patientBanner = getSyncLifecycle(patientBannerComponent, options);

export const printIdentifierStickerModal = getAsyncLifecycle(
() => import('./banner-tags/print-identifier-sticker-modal.component'),
() => import('./banner-tags/print-identifier-sticker.modal'),
options,
);

Expand Down
2 changes: 1 addition & 1 deletion packages/esm-patient-chart-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"test:watch": "cross-env TZ=UTC jest --watch --config jest.config.js --color",
"coverage": "yarn test --coverage",
"typescript": "tsc",
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.hook.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.modal.tsx' 'src/**/*.hook.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
},
"browserslist": [
"extends browserslist-config-openmrs"
Expand Down
15 changes: 6 additions & 9 deletions packages/esm-patient-chart-app/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,10 @@ export const deleteVisitDialog = getAsyncLifecycle(() => import('./visit/visit-p
moduleName,
});

export const modifyVisitDateDialog = getAsyncLifecycle(
() => import('./visit/visit-prompt/modify-visit-date-dialog.component'),
{
featureName: 'delete visit',
moduleName,
},
);
export const modifyVisitDateDialog = getAsyncLifecycle(() => import('./visit/visit-prompt/modify-visit-date.modal'), {
featureName: 'delete visit',
moduleName,
});

export const endVisitDialog = getAsyncLifecycle(() => import('./visit/visit-prompt/end-visit-dialog.component'), {
featureName: 'end visit',
Expand All @@ -205,13 +202,13 @@ export const confirmDeceasedDialog = getAsyncLifecycle(() => import('./deceased/
moduleName,
});

export const confirmAliveDialog = getAsyncLifecycle(() => import('./deceased/mark-alive-modal.component'), {
export const confirmAliveDialog = getAsyncLifecycle(() => import('./deceased/mark-alive.modal'), {
featureName: 'confirm alive',
moduleName,
});

export const deleteEncounterModal = getAsyncLifecycle(
() => import('./visit/visits-widget/past-visits-components/delete-encounter-modal.component'),
() => import('./visit/visits-widget/past-visits-components/delete-encounter.modal'),
{
featureName: 'delete-encounter-modal',
moduleName,
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-patient-chart-app/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"location": "Location",
"male": "Male",
"markAlive": "Mark alive",
"markAsAlive": "Mark as alive",
"markAsAlive": "Mark As Alive",
"markAsDeceased": "Are you sure you want to mark patient as deceased?",
"markDeceased": "Mark deceased",
"markingPatientDeceasedInfoText": "Marking the patient as deceased will end any active visits for this patient",
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-patient-conditions-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"test:watch": "cross-env TZ=UTC jest --watch --config jest.config.js --color",
"coverage": "yarn test --coverage",
"typescript": "tsc",
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.extension.tsx' 'src/**/*.workspace.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.modal.tsx' 'src/**/*.extension.tsx' 'src/**/*.workspace.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
},
"browserslist": [
"extends browserslist-config-openmrs"
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-patient-conditions-app/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const conditionsDashboardLink =
);

export const conditionDeleteConfirmationDialog = getAsyncLifecycle(
() => import('./conditions/delete-condition-modal.component'),
() => import('./conditions/delete-condition.modal'),
options,
);

Expand Down
2 changes: 1 addition & 1 deletion packages/esm-patient-flags-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"test": "cross-env TZ=UTC jest --config jest.config.js --verbose false --passWithNoTests --color",
"test:watch": "cross-env TZ=UTC jest --watch --config jest.config.js --color",
"coverage": "yarn test --coverage",
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.modal.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
},
"browserslist": [
"extends browserslist-config-openmrs"
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-patient-forms-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"test:watch": "cross-env TZ=UTC jest --watch --config jest.config.js --color",
"coverage": "yarn test --coverage",
"typescript": "tsc",
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.extension.tsx' 'src/**/*.workspace.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.modal.tsx' 'src/**/*.extension.tsx' 'src/**/*.workspace.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
},
"browserslist": [
"extends browserslist-config-openmrs"
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-patient-immunizations-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"test:watch": "cross-env TZ=UTC jest --watch --config jest.config.js --color",
"coverage": "yarn test --coverage",
"typescript": "tsc",
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.extension.tsx' 'src/**/*.workspace.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.modal.tsx' 'src/**/*.extension.tsx' 'src/**/*.workspace.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
},
"browserslist": [
"extends browserslist-config-openmrs"
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-patient-labs-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"test:watch": "cross-env TZ=UTC jest --watch --config jest.config.js --color",
"coverage": "yarn test --coverage",
"typescript": "tsc",
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.extension.tsx' 'src/**/*.workspace.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.modal.tsx' 'src/**/*.extension.tsx' 'src/**/*.workspace.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
},
"browserslist": [
"extends browserslist-config-openmrs"
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-patient-lists-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"test": "cross-env TZ=UTC jest --config jest.config.js --verbose false --passWithNoTests --color",
"test:watch": "cross-env TZ=UTC jest --watch --config jest.config.js --color",
"coverage": "yarn test --coverage",
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.extension.tsx' 'src/**/*.workspace.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.modal.tsx' 'src/**/*.extension.tsx' 'src/**/*.workspace.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
},
"browserslist": [
"extends browserslist-config-openmrs"
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-patient-medications-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"test:watch": "cross-env TZ=UTC jest --watch --config jest.config.js --color",
"coverage": "yarn test --coverage",
"typescript": "tsc",
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.extension.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.modal.tsx' 'src/**/*.extension.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
},
"browserslist": [
"extends browserslist-config-openmrs"
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-patient-notes-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"test:watch": "cross-env TZ=UTC jest --watch --config jest.config.js --color",
"coverage": "yarn test --coverage",
"typescript": "tsc",
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.extension.tsx' 'src/**/*.workspace.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.modal.tsx' 'src/**/*.extension.tsx' 'src/**/*.workspace.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
},
"browserslist": [
"extends browserslist-config-openmrs"
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-patient-orders-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"test:watch": "cross-env TZ=UTC jest --watch --config jest.config.js --color",
"coverage": "yarn test --coverage",
"typescript": "tsc",
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.extension.tsx' 'src/**/*.workspace.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.modal.tsx' 'src/**/*.extension.tsx' 'src/**/*.workspace.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
},
"browserslist": [
"extends browserslist-config-openmrs"
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-patient-programs-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"test:watch": "cross-env TZ=UTC jest --watch --config jest.config.js --color",
"coverage": "yarn test --coverage",
"typescript": "tsc",
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.extension.tsx' 'src/**/*.workspace.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.modal.tsx' 'src/**/*.extension.tsx' 'src/**/*.workspace.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
},
"browserslist": [
"extends browserslist-config-openmrs"
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-patient-vitals-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"test:watch": "cross-env TZ=UTC jest --watch --config jest.config.js --color",
"coverage": "yarn test --coverage",
"typescript": "tsc",
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.extension.tsx' 'src/**/*.workspace.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
"extract-translations": "i18next 'src/**/*.component.tsx' 'src/**/*.modal.tsx' 'src/**/*.extension.tsx' 'src/**/*.workspace.tsx' 'src/index.ts' --config ../../tools/i18next-parser.config.js"
},
"browserslist": [
"extends browserslist-config-openmrs"
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-patient-vitals-app/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const vitalsAndBiometricsDashboardLink =
export const weightTile = getAsyncLifecycle(() => import('./weight-tile/weight-tile.component'), options);

export const vitalsAndBiometricsDeleteModal = getAsyncLifecycle(
() => import('./vitals-biometrics-form/delete-vitals-biometrics-modal.component'),
() => import('./vitals-biometrics-form/delete-vitals-and-biometrics.modal'),
options,
);

Expand Down
2 changes: 1 addition & 1 deletion packages/esm-patient-vitals-app/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"Vitals & Biometrics": "Vitals & Biometrics",
"vitalsAndBiometrics": "Vitals and biometrics",
"vitalsAndBiometricsDeleted": "Vitals and Biometrics deleted",
"vitalsAndBiometricsDeleteError": "Error deleting vitals and biometrics",
"vitalsAndBiometricsDeleteError": "Error deleting Vitals and Biometrics",
"vitalsAndBiometricsEditError": "Error editing vitals and biometrics",
"vitalsAndBiometricsNowAvailable": "They are now visible on the Vitals and Biometrics page",
"vitalsAndBiometricsRecorded": "Vitals and Biometrics saved",
Expand Down