Skip to content

Commit

Permalink
feat: label improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikmv committed Nov 22, 2024
1 parent 8f4649b commit 8447356
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ const buildOrgUnitSettingsFn = () => {
const orgUnitSettings = {
getComponent: () => viewModeComponent,
getComponentProps: (props: Object) => createComponentProps(props, {
label: `${props.formFoundation.getLabel('orgUnit')}`,
label: i18n.t('Organisation unit'),
valueConverter: value => dataElement.convertValue(value, valueConvertFn),
}),
getPropName: () => 'orgUnitId',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ export class ProgramStageFactory {
_form.featureType = ProgramStageFactory._getFeatureType(cachedProgramStage);
_form.access = cachedProgramStage.access;
_form.addLabel({ id: 'occurredAt', label: cachedProgramStage.displayExecutionDateLabel || 'Report date' });
_form.addLabel({ id: 'orgUnit', label: cachedProgramStage.displayOrgUnitLabel || 'Organisation unit' });
_form.addLabel({ id: 'scheduledAt', label: cachedProgramStage.displayDueDateLabel || 'Scheduled date' });
_form.validationStrategy =
cachedProgramStage.validationStrategy &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const fieldsParam = 'id,displayName,displayShortName,description,programType,sty
'categoryCombo[id,displayName,isDefault,categories[id,displayName]],' +
'userRoles[id,displayName],' +
// eslint-disable-next-line max-len
'programStages[id,access,autoGenerateEvent,openAfterEnrollment,hideDueDate,allowGenerateNextVisit,remindCompleted,repeatable,generatedByEnrollmentDate,reportDateToUse,blockEntryForm,minDaysFromStart,name,displayName,description,displayExecutionDateLabel,displayOrgUnitLabel,displayDueDateLabel,formType,featureType,validationStrategy,enableUserAssignment,style,dataEntryForm[id,htmlCode]' +
'programStages[id,access,autoGenerateEvent,openAfterEnrollment,hideDueDate,allowGenerateNextVisit,remindCompleted,repeatable,generatedByEnrollmentDate,reportDateToUse,blockEntryForm,minDaysFromStart,name,displayName,description,displayExecutionDateLabel,displayDueDateLabel,formType,featureType,validationStrategy,enableUserAssignment,style,dataEntryForm[id,htmlCode]' +
'programStageSections[id,displayName,displayDescription,sortOrder,dataElements[id]],' +
// eslint-disable-next-line max-len
'programStageDataElements[compulsory,displayInReports,renderOptionsAsRadio,allowFutureDate,renderType[*],dataElement[id]]]' +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ export type apiProgramStage = {
displayName: string,
description?: ?string,
displayExecutionDateLabel?: ?string,
displayOrgUnitLabel?: ?string,
displayDueDateLabel?: ?string,
formType: string,
featureType: string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ export type CachedProgramStage = {
displayName: string,
description: ?string,
displayExecutionDateLabel?: ?string,
displayOrgUnitLabel?: ?string,
displayDueDateLabel?: ?string,
programStageSections: ?Array<CachedProgramStageSection>,
programStageDataElements: Array<CachedProgramStageDataElement>,
Expand Down

0 comments on commit 8447356

Please sign in to comment.