Skip to content

Commit

Permalink
Merge pull request #363 from dhis2/fieldRules
Browse files Browse the repository at this point in the history
feat(de form): add field rules
  • Loading branch information
Mohammer5 authored Jan 16, 2024
2 parents 0fecea2 + 4a034ba commit 30bd07a
Show file tree
Hide file tree
Showing 69 changed files with 1,996 additions and 922 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[![codecov](https://codecov.io/gh/dhis2/maintenance-app-beta/graph/badge.svg?token=Z62Z57XE21)](https://codecov.io/gh/dhis2/maintenance-app-beta)


# Maintenance app

- [Developer docs](./docs/developer/README.md)
190 changes: 97 additions & 93 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: 2023-11-22T13:05:25.319Z\n"
"PO-Revision-Date: 2023-11-22T13:05:25.319Z\n"
"POT-Creation-Date: 2023-11-23T14:09:23.068Z\n"
"PO-Revision-Date: 2023-11-23T14:09:23.068Z\n"

msgid "schemas"
msgstr "schemas"
Expand Down Expand Up @@ -621,6 +621,12 @@ msgstr "Owner"
msgid "Zero is significant"
msgstr "Zero is significant"

msgid "This field requires a unique value, please choose another one"
msgstr "This field requires a unique value, please choose another one"

msgid "Required"
msgstr "Required"

msgid "Custom attributes"
msgstr "Custom attributes"

Expand All @@ -636,94 +642,45 @@ msgstr "Exit without saving"
msgid "Create data element"
msgstr "Create data element"

msgid "Loading custom attributes"
msgstr "Loading custom attributes"

msgid "Something went wrong with retrieving the custom attributes"
msgstr "Something went wrong with retrieving the custom attributes"

msgid "Basic information"
msgstr "Basic information"

msgid "Set up the information for this data element"
msgstr "Set up the information for this data element"
msgid "Choose how this data element is disaggregated"
msgstr "Choose how this data element is disaggregated"

msgid "Disaggregation and Option sets"
msgstr "Disaggregation and Option sets"
msgid "The default way to aggregate this data element in analytics."
msgstr "The default way to aggregate this data element in analytics."

msgid "Set up disaggregation and predefined options."
msgstr "Set up disaggregation and predefined options."
msgid "Disabled for the selected value type."
msgstr "Disabled for the selected value type."

msgid "LegendSet"
msgstr "LegendSet"
msgid "{{fieldLabel}} (required)"
msgstr "{{fieldLabel}} (required)"

msgid ""
"Visualize values for this data element in Analytics app. Multiple legendSet "
"can be applied."
msgstr ""
"Visualize values for this data element in Analytics app. Multiple legendSet "
"can be applied."
msgid "Aggregation type"
msgstr "Aggregation type"

msgid "Aggregation levels"
msgstr "Aggregation levels"
msgid "Color and icon"
msgstr "Color and icon"

msgid ""
"By default, the aggregation will start at the lowest assigned organisation "
"unit. If you for example select \"Chiefdom\", it means that \"Chiefdom\", "
"\"District\" and \"National\" aggregates use \"Chiefdom\" (the highest "
"aggregation level available) as the data source, and PHU data will not be "
"included. PHU will still be available for the PHU level, but not included "
"in the aggregations to the levels above."
"A color and icon are helpful for identifying data elements in "
"information-dense screens."
msgstr ""
"By default, the aggregation will start at the lowest assigned organisation "
"unit. If you for example select \"Chiefdom\", it means that \"Chiefdom\", "
"\"District\" and \"National\" aggregates use \"Chiefdom\" (the highest "
"aggregation level available) as the data source, and PHU data will not be "
"included. PHU will still be available for the PHU level, but not included "
"in the aggregations to the levels above."

msgid "Custom fields for your DHIS2 instance"
msgstr "Custom fields for your DHIS2 instance"

msgid "Required"
msgstr "Required"

msgid "Cannot be longer than {{number}} character"
msgstr "Cannot be longer than {{number}} character"

msgid "The value is to long. You can use up to 255 characters"
msgstr "The value is to long. You can use up to 255 characters"

msgid "{{fieldLabel}} (required)"
msgstr "{{fieldLabel}} (required)"
"A color and icon are helpful for identifying data elements in "
"information-dense screens."

msgid "A data element name should be concise and easy to recognize."
msgstr "A data element name should be concise and easy to recognize."
msgid "Loading custom attributes"
msgstr "Loading custom attributes"

msgid "Often used in reports where space is limited"
msgstr "Often used in reports where space is limited"
msgid "Something went wrong with retrieving the custom attributes"
msgstr "Something went wrong with retrieving the custom attributes"

msgid "Description"
msgstr "Description"

msgid "Explain the purpose of this data element and how it's measured."
msgstr "Explain the purpose of this data element and how it's measured."

msgid "Url"
msgstr "Url"

msgid "A web link that provides extra information"
msgstr "A web link that provides extra information"

msgid "Color and icon"
msgstr "Color and icon"

msgid ""
"A color and icon are helpful for identifying data elements in "
"information-dense screens."
msgstr ""
"A color and icon are helpful for identifying data elements in "
"information-dense screens."
msgid "A data element can either be aggregated or tracked data."
msgstr "A data element can either be aggregated or tracked data."

msgid "Field mask"
msgstr "Field mask"
Expand All @@ -740,12 +697,6 @@ msgstr "StandardForm name"
msgid "An alternative name used in section or automatic data entry forms."
msgstr "An alternative name used in section or automatic data entry forms."

msgid "Store zero data values"
msgstr "Store zero data values"

msgid "A data element can either be aggregated or tracked data."
msgstr "A data element can either be aggregated or tracked data."

msgid "Selected legends"
msgstr "Selected legends"

Expand All @@ -755,29 +706,82 @@ msgstr "Refresh list"
msgid "Add new"
msgstr "Add new"

msgid "A data element name should be concise and easy to recognize."
msgstr "A data element name should be concise and easy to recognize."

msgid "Option set comment"
msgstr "Option set comment"

msgid "Choose a set of predefined comment for data entry"
msgstr "Choose a set of predefined comment for data entry"

msgid "Choose a set of predefined options for data entry"
msgstr "Choose a set of predefined options for data entry"

msgid "Often used in reports where space is limited"
msgstr "Often used in reports where space is limited"

msgid "Url"
msgstr "Url"

msgid "A web link that provides extra information"
msgstr "A web link that provides extra information"

msgid "The type of data that will be recorded."
msgstr "The type of data that will be recorded."

msgid "Aggregation type"
msgstr "Aggregation type"
msgid ""
"Disabled as the value type must match the value type of the selected option "
"set"
msgstr ""
"Disabled as the value type must match the value type of the selected option "
"set"

msgid "The default way to aggregate this data element in analytics."
msgstr "The default way to aggregate this data element in analytics."
msgid "Store zero data values"
msgstr "Store zero data values"

msgid "Choose how this data element is disaggregated"
msgstr "Choose how this data element is disaggregated"
msgid "Basic information"
msgstr "Basic information"

msgid "Choose a set of predefined options for data entry"
msgstr "Choose a set of predefined options for data entry"
msgid "Set up the information for this data element"
msgstr "Set up the information for this data element"

msgid "Option set comment"
msgstr "Option set comment"
msgid "Disaggregation and Option sets"
msgstr "Disaggregation and Option sets"

msgid "Choose a set of predefined comment for data entry"
msgstr "Choose a set of predefined comment for data entry"
msgid "Set up disaggregation and predefined options."
msgstr "Set up disaggregation and predefined options."

msgid "This field requires a unique value, please choose another one"
msgstr "This field requires a unique value, please choose another one"
msgid "LegendSet"
msgstr "LegendSet"

msgid ""
"Visualize values for this data element in Analytics app. Multiple legendSet "
"can be applied."
msgstr ""
"Visualize values for this data element in Analytics app. Multiple legendSet "
"can be applied."

msgid "Aggregation levels"
msgstr "Aggregation levels"

msgid ""
"By default, the aggregation will start at the lowest assigned organisation "
"unit. If you for example select \"Chiefdom\", it means that \"Chiefdom\", "
"\"District\" and \"National\" aggregates use \"Chiefdom\" (the highest "
"aggregation level available) as the data source, and PHU data will not be "
"included. PHU will still be available for the PHU level, but not included "
"in the aggregations to the levels above."
msgstr ""
"By default, the aggregation will start at the lowest assigned organisation "
"unit. If you for example select \"Chiefdom\", it means that \"Chiefdom\", "
"\"District\" and \"National\" aggregates use \"Chiefdom\" (the highest "
"aggregation level available) as the data source, and PHU data will not be "
"included. PHU will still be available for the PHU level, but not included "
"in the aggregations to the levels above."

msgid "Custom fields for your DHIS2 instance"
msgstr "Custom fields for your DHIS2 instance"

msgid "Metadata management"
msgstr "Metadata management"
Expand Down
1 change: 1 addition & 0 deletions src/components/EditableFieldWrapper/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { EditableFieldWrapper } from './EditableFieldWrapper'
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ interface SearchableSingleSelectPropTypes {
placeholder: string
showEndLoader: boolean
loading: boolean
disabled?: boolean
selected?: string
invalid?: boolean
error?: string
Expand All @@ -67,6 +68,7 @@ interface SearchableSingleSelectPropTypes {

export const SearchableSingleSelect = ({
invalid,
disabled,
error,
loading,
placeholder,
Expand Down Expand Up @@ -123,6 +125,7 @@ export const SearchableSingleSelect = ({
// fetched the corresponding label yet. Therefore we don't want to pass in
// any value to the "selected" prop, as otherwise an error will be thrown
selected={hasSelectedInOptionList ? selected : ''}
disabled={disabled}
error={invalid}
onChange={onChange}
placeholder={placeholder}
Expand Down
3 changes: 2 additions & 1 deletion src/components/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export * from './ColorAndIconPicker'
export { Loader } from './loading'
export * from './EditableFieldWrapper'
export { HidePreventUnmount } from './HidePreventUnmount'
export { Loader } from './loading'
export * from './metadataFormControls'
export * from './SearchableSingleSelect'
export * from './sectionList'
Expand Down
Loading

0 comments on commit 30bd07a

Please sign in to comment.