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: [DHIS2-17826] Replace Material UI Chip #3741

Merged
merged 2 commits into from
Aug 7, 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
4 changes: 2 additions & 2 deletions i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"POT-Creation-Date: 2024-06-28T11:23:02.970Z\n"
"PO-Revision-Date: 2024-06-28T11:23:02.970Z\n"
"POT-Creation-Date: 2024-08-02T09:44:11.640Z\n"
"PO-Revision-Date: 2024-08-02T09:44:11.640Z\n"

msgid "Choose one or more dates..."
msgstr "Choose one or more dates..."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// @flow
import * as React from 'react';
import classNames from 'classnames';

import { Chip, withStyles } from '@material-ui/core';
import { Chip, colors } from '@dhis2/ui';
import { withStyles } from '@material-ui/core';


const getStyles = (theme: Theme) => ({
Expand All @@ -17,9 +17,10 @@ const getStyles = (theme: Theme) => ({
paddingLeft: theme.typography.pxToRem(5),
},
badge: {
height: theme.typography.pxToRem(20),
width: theme.typography.pxToRem(20),
fontWeight: 700,
display: 'flex',
alignItems: 'center',
cursor: 'default !important',
backgroundColor: `${colors.grey300} !important`,
},
});

Expand All @@ -45,7 +46,9 @@ class ViewEventSectionHeaderPlain extends React.Component<Props> {
</div>
{shouldRenderBadge &&
<div className={classes.headerItemContainer}>
<Chip className={classNames(classes.badge, badgeClass)} label={badgeCount} />
<Chip dense className={classNames(classes.badge), badgeClass}>
{badgeCount}
</Chip>
</div>
}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export const WidgetEventEditPlain = ({
}: PlainProps) => {
useEffect(() => inMemoryFileStore.clear, []);
const dispatch = useDispatch();

const supportsChangelog = useFeature(FEATURES.changelogs);
const { currentPageMode } = useEnrollmentEditEventPageMode(eventStatus);
const { orgUnit, error } = useCoreOrgUnit(orgUnitId);
Expand Down
Loading