EyeSeeTea / WHO-custom-forms

Custom forms developed for WHO
GNU General Public License v3.0
0 stars 0 forks source link

Snakebite changes #45

Closed xurxodev closed 3 years ago

xurxodev commented 3 years ago

:pushpin: References

https://app.clickup.com/t/buyh6f

:memo: Implementation

General changes

:art: Screenshots

:fire: Is there anything the reviewer should know to test it?

Data Store

  1. dataElements - > New prop showName to hide the name for a data element. If not exists prop default value is true
  2. dataElements - > New prop showTotal to hide the total column for a data element. If not exists prop default value is true
  3. dataElements - > New prop backgroundColor for the header columns of a data element.
  4. dataElements - > New prop color for the header columns of a data element.
  5. optionCombos - > New prop backgroundColor for a specific column of a data element. This prop overwrite the same prop for data element for this column
  6. optionCombos - > New prop color for a specific column of a data element. this prop overwrite the same prop for data element for this column. This prop overwrite the same prop for data element for this column
{
   "dataElements": {
      "uidDE1": {
         "showTotal": // (for total column)
         "showName": // (for name title),
         "backgroundColor":"#e6a460",
         "color":"#FFFFFF"
      }
  },
   "optionCombos": {
      "uidCatOptionCombo1": {
         "backgroundColor":"#7085ea",
         "color":"#000000"
      }
   }
}

To generate the custom form

cd /HEP-data-entry
yarn build
node lib/cli.js --url='http://user:pwd!@dhisUrl' --dataset-id='XBgvNrxpcDC' --module='snakebite'

Important: the command uploads all data set to the server. Important: Sometimes to generate the custom form, age category options are duplicated in data elements. I think this is an API bug.

:bookmark_tabs: Others