> = withStyles(styles)(InfoBoxPlain);
diff --git a/src/core_modules/capture-core/components/WidgetEventSchedule/ScheduleDate/ScheduleDate.component.js b/src/core_modules/capture-core/components/WidgetEventSchedule/ScheduleDate/ScheduleDate.component.js
index 327faebc5b..7975d8ff0e 100644
--- a/src/core_modules/capture-core/components/WidgetEventSchedule/ScheduleDate/ScheduleDate.component.js
+++ b/src/core_modules/capture-core/components/WidgetEventSchedule/ScheduleDate/ScheduleDate.component.js
@@ -2,7 +2,7 @@
import React, { type ComponentType } from 'react';
import i18n from '@dhis2/d2-i18n';
import withStyles from '@material-ui/core/styles/withStyles';
-import { spacersNum } from '@dhis2/ui';
+import { spacers } from '@dhis2/ui';
import {
DateField,
withDefaultFieldContainer,
@@ -15,7 +15,7 @@ import type { Props } from './scheduleDate.types';
import labelTypeClasses from './dataEntryFieldLabels.module.css';
import { InfoBox } from '../InfoBox';
import { convertStringToDateFormat } from '../../../utils/converters/date';
-
+import { baseInputStyles } from '../ScheduleOrgUnit/commonProps';
const LabelledRequiredDateField = withDefaultFieldContainer()(
@@ -31,9 +31,8 @@ const LabelledRequiredDateField = withDefaultFieldContainer()(
);
const styles = {
- container: {
- display: 'flex',
- marginTop: spacersNum.dp4,
+ infoBox: {
+ padding: `0 ${spacers.dp24} ${spacers.dp24} ${spacers.dp16}`,
},
};
@@ -46,27 +45,35 @@ const ScheduleDatePlain = ({
eventCountInOrgUnit,
classes,
hideDueDate,
-}: Props) => (<>
- {!hideDueDate &&
- { }}
- onFocus={() => { }}
- onRemoveFocus={() => { }}
- onBlur={(e) => { setScheduleDate(convertStringToDateFormat(e)); }}
- />
-
}
-
->);
+}: Props) => (
+ <>
+ {!hideDueDate && (
+ <>
+ { }}
+ onFocus={() => { }}
+ onRemoveFocus={() => { }}
+ onBlur={(e) => { setScheduleDate(convertStringToDateFormat(e)); }}
+ />
+
+
+
+ >
+ )}
+ >
+);
+
export const ScheduleDate: ComponentType<$Diff> = (withStyles(styles)(ScheduleDatePlain));
diff --git a/src/core_modules/capture-core/components/WidgetEventSchedule/WidgetEventSchedule.component.js b/src/core_modules/capture-core/components/WidgetEventSchedule/WidgetEventSchedule.component.js
index cf8adaeec0..cb670228d5 100644
--- a/src/core_modules/capture-core/components/WidgetEventSchedule/WidgetEventSchedule.component.js
+++ b/src/core_modules/capture-core/components/WidgetEventSchedule/WidgetEventSchedule.component.js
@@ -1,9 +1,10 @@
// @flow
import React, { type ComponentType } from 'react';
-import { spacersNum, spacers, colors } from '@dhis2/ui';
+import { spacersNum } from '@dhis2/ui';
import withStyles from '@material-ui/core/styles/withStyles';
import i18n from '@dhis2/d2-i18n';
import { DataSection } from '../DataSection';
+import { Widget } from '../Widget';
import { ScheduleButtons } from './ScheduleButtons';
import { ScheduleDate } from './ScheduleDate';
import { ScheduleText } from './ScheduleText';
@@ -15,40 +16,8 @@ import { ScheduleOrgUnit } from './ScheduleOrgUnit/ScheduleOrgUnit.component';
const styles = () => ({
wrapper: {
- padding: `${spacers.dp16} 0`,
- maxWidth: '55.75rem',
- },
- fieldWrapper: {
- display: 'flex',
- flexWrap: 'wrap',
- justifyContent: 'space-between',
- padding: `${spacers.dp8} ${spacers.dp16}`,
- },
- fieldLabel: {
- color: colors.grey900,
- paddingTop: spacersNum.dp16,
- paddingRight: spacersNum.dp16,
- },
- fieldContent: {
- flexBasis: '200px',
- flexGrow: 1,
- },
- containerWrapper: {
- padding: `${spacers.dp8} ${spacers.dp16}`,
- },
- container: {
- display: 'flex',
- alignItems: 'center',
- paddingTop: 8,
- paddingBottom: 8,
- },
- label: {
- flexBasis: 200,
- paddingLeft: 5,
- },
- field: {
- flexBasis: 150,
- flexGrow: 1,
+ paddingLeft: spacersNum.dp16,
+ minWidth: '300px',
},
});
@@ -92,14 +61,19 @@ const WidgetEventSchedulePlain = ({
return (
-
-
-
-
-
+
>
+ }
+ >
+
-
- {programCategory &&
-
+ {programCategory &&
+
+ }
+
+
+
+ {enableUserAssignment && (
+
+
+
+ )}
+
- }
-
-
-
- {enableUserAssignment && (
-
-
-
- )}
-
-
-
+
+
);
};