Skip to content

(chore) O3-4745: Fix failing dependency auto-update CI workflow #114

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

Merged
merged 2 commits into from
Jun 5, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 jest.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"!**/e2e/**"
],
"transform": {
"^.+\\.tsx?$": ["@swc/jest"]
"^.+\\.m?[jt]sx?$": ["@swc/jest"]
},
"transformIgnorePatterns": ["/node_modules/(?!@openmrs)"],
"moduleNameMapper": {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"swr": "2.x"
},
"devDependencies": {
"@carbon/react": "^1.76.0",
"@carbon/react": "^1.83.0",
"@openmrs/esm-framework": "next",
"@playwright/test": "^1.50.1",
"@swc-node/loader": "^1.3.7",
Expand Down Expand Up @@ -91,8 +91,8 @@
"swr": "^2.2.4",
"turbo": "^2.5.2",
"typescript": "^4.9.5",
"webpack": "^5.88.2",
"webpack-cli": "^5.1.4"
"webpack": "^5.99.9",
"webpack-cli": "^6.0.1"
},
"dependencies": {
"dotenv": "^16.4.7",
Expand Down
1 change: 1 addition & 0 deletions src/add-group-modal/AddGroupModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ const NewGroupForm = (props) => {
}}
>
<TextInput
id="newGroupName"
labelText={t('newGroupName', 'New Group Name')}
value={name}
onChange={(e) => setName(e.target.value)}
Expand Down
13 changes: 6 additions & 7 deletions src/forms-page/FormsPage.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import { useConfig, useSession } from '@openmrs/esm-framework';
import { Tab, Tabs, TabList, TabPanels, TabPanel } from '@carbon/react';
import React from 'react';
import { type Config } from '../config-schema';
import { fdeWorkflowStorageName, fdeWorkflowStorageVersion } from '../context/FormWorkflowReducer';
import { fdeGroupWorkflowStorageName, fdeGroupWorkflowStorageVersion } from '../context/GroupFormWorkflowReducer';
import { useGetAllForms } from '../hooks';
import FormsTable from './forms-table';
import styles from './styles.scss';
import { useTranslation } from 'react-i18next';
import { fdeWorkflowStorageName, fdeWorkflowStorageVersion } from '../context/FormWorkflowReducer';
import { fdeGroupWorkflowStorageName, fdeGroupWorkflowStorageVersion } from '../context/GroupFormWorkflowReducer';

// helper function useful for debugging
// given a list of forms, it will organize into permissions
Expand Down Expand Up @@ -93,11 +92,11 @@ const FormsPage = () => {
<h3 className={styles.pageTitle}>{t('fastDataEntry', 'Fast Data Entry')}</h3>
<Tabs>
<TabList>
<Tab label={t('allForms', 'All Forms')}>
<Tab aria-label={t('allForms', 'All Forms')}>
{`${t('allForms', 'All Forms')} (${cleanRows ? cleanRows?.length : '??'})`}
</Tab>
{categoryRows?.map((category, index) => (
<Tab label={category.name} key={index}>
<Tab aria-label={category.name} key={index}>
{`${category.name} (${category.rows.length})`}
</Tab>
))}
Expand Down
50 changes: 30 additions & 20 deletions src/forms-page/forms-table/FormsTable.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { ErrorState } from '@openmrs/esm-framework';
import React, { useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import { Link } from 'react-router-dom';
import {
DataTable,
type DataTableHeader,
DataTableSkeleton,
Table,
TableBody,
Expand All @@ -13,30 +16,37 @@ import {
TableToolbarContent,
TableToolbarSearch,
} from '@carbon/react';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { Link } from 'react-router-dom';
import { ErrorState } from '@openmrs/esm-framework';
import EmptyState from '../../empty-state/EmptyState';
import styles from './styles.scss';

interface TableHeader {
key: string;
header: string;
isSortable?: boolean;
}

const FormsTable = ({ rows, error, isLoading, activeForms, activeGroupForms }) => {
const { t } = useTranslation();

const tableHeaders = [
{
key: 'display',
header: t('formName', 'Form Name'),
isSortable: true,
},
{
key: 'actions',
header: t('actions', 'Actions'),
},
{
key: 'actions2',
header: '',
},
];
const tableHeaders = useMemo(
() => [
{
key: 'display',
header: t('formName', 'Form Name'),
isSortable: true,
},
{
key: 'actions',
header: t('actions', 'Actions'),
},
{
key: 'actions2',
header: '',
},
],
[t],
);

const augmentedRows = rows?.map((row) => ({
...row,
Expand Down Expand Up @@ -84,7 +94,7 @@ const FormsTable = ({ rows, error, isLoading, activeForms, activeGroupForms }) =
<Table {...getTableProps()}>
<TableHead>
<TableRow>
{headers.map((header) => (
{headers.map((header: DataTableHeader & TableHeader) => (
<TableHeader
{...getHeaderProps({
header,
Expand Down
10 changes: 5 additions & 5 deletions src/group-form-entry-workflow/SessionDetailsForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,29 +53,29 @@ const SessionDetailsForm = () => {
type="text"
labelText={t('sessionName', 'Session Name')}
{...register('sessionName', { required: true })}
invalid={errors.sessionName}
invalid={Boolean(errors.sessionName)}
invalidText={t('requiredField', 'This field is required')}
/>
<TextInput
id="text"
type="text"
labelText={t('practitionerName', 'Practitioner Name')}
{...register('practitionerName', { required: true })}
invalid={errors.practitionerName}
invalid={Boolean(errors.practitionerName)}
invalidText={t('requiredField', 'This field is required')}
/>
<Controller
name="sessionDate"
control={control}
rules={{ required: true }}
render={({ field }) => (
<DatePicker datePickerType="single" size="md" maxDate={new Date()} {...field}>
<DatePicker datePickerType="single" maxDate={new Date()} {...field}>
<DatePickerInput
id="session-date"
labelText={t('sessionDate', 'Session Date')}
placeholder="mm/dd/yyyy"
size="md"
invalid={errors.sessionDate}
invalid={Boolean(errors.sessionDate)}
invalidText={t('requiredField', 'This field is required')}
/>
</DatePicker>
Expand All @@ -86,7 +86,7 @@ const SessionDetailsForm = () => {
type="text"
labelText={t('sessionNotes', 'Session Notes')}
{...register('sessionNotes', { required: true })}
invalid={errors.sessionNotes}
invalid={Boolean(errors.sessionNotes)}
invalidText={t('requiredField', 'This field is required')}
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const PatientRow = ({ patient }) => {
<SkeletonText />
</TableCell>
<TableCell>
<Checkbox diabled />
<Checkbox id={`${identifier}-attendance-checkbox`} labelText={patient.id} disabled />
</TableCell>
</TableRow>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,7 @@ export const SearchResultSkeleton = () => {
return (
<div className={styles.patientSearchResult}>
<div className={styles.patientAvatar} role="img">
<SkeletonIcon
style={{
height: '3rem',
width: '3rem',
}}
/>
<SkeletonIcon className={styles.skeletonIcon} />
</div>
<div>
<h2 className={styles.patientName}>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React, { useState } from 'react';
import { useTranslation } from 'react-i18next';
import { debounce } from 'lodash-es';
import { Button, Search } from '@carbon/react';
import GroupSearch from './GroupSearch';
import { type GroupType } from '../../context/GroupFormWorkflowContext';
import styles from './compact-group-search.scss';
import GroupSearch from './GroupSearch';
import { Button, Search } from '@carbon/react';
import { useTranslation } from 'react-i18next';
import debounce from 'lodash-es/debounce';

interface CompactGroupSearchProps {
selectGroupAction?: (group: GroupType) => void;
Expand Down Expand Up @@ -38,7 +38,6 @@ const CompactGroupSearch: React.FC<CompactGroupSearchProps> = ({ selectGroupActi
<div className={styles.patientSearchBar}>
<div className={styles.searchArea}>
<Search
autoFocus
className={styles.patientSearchInput}
closeButtonLabelText={t('clearSearch', 'Clear')}
labelText=""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,8 @@
.middot {
margin: 0 layout.$spacing-03;
}

.skeletonIcon {
height: '3rem';
width: '3rem';
}
Loading