OverrideHistory class

Constructors

  • constructor of the class History

    Parameters

    • user_role: string

      the role when logged in: 'mdg', 'mus', 'com', 'syc'

    Returns OverrideHistory

Properties

adminHistoryContainer: HTMLDivElement
btnConfirmRevertValue: HTMLButtonElement
config_indicators: any
config_iso_codes: any
currentValues: any
dataHistory: any
dataStructure: any
dropdownAdmLevel: HTMLSelectElement
language_code: string
modalBodyRevertValue: HTMLDivElement
modalRevertValue: any
selectedFetchValuesKey: string
selectedRevertValue: string
uniqueKeys: any
user_country_code: string
valuesObjectById: any

Methods

  • creates an object of the history data it is used to iterate through and create the page's markup

    Returns void

  • builds the history markup

    • creates a card for each category
    • within each card creates another card for each subcategory
    • within each subcategory's card, lists all indicators for which changes exist
    • for each date a separate accordion is created, listing all adm regions

    Returns void

  • builds the initial markup when the tab opens

    Returns void

  • disables or enables all user inputs

    Parameters

    • disable_true_false: boolean

      true = disable, false = enable

    Returns void

  • gets an iso code and returns the adm level to which it belongs

    Parameters

    • isoCode: string

      the iso code that we are looking for

    Returns string

    adm the adm level ('adm_0', 'adm_1', 'adm_2')

  • shows the accordion items which correspond to the adm level that has been selected in the dropdown possible values: all, adm_0, adm_1, adm_2

    Returns void

  • sends the data needed to revert a value to the server

    Parameters

    • dataObject: any

      dataObject that is sent to the file

    Returns void

  • shows a modal to confirm the revert

    Parameters

    • event: any

      click event

    Returns void

  • builds the dataObject needed to revert a value

    Returns void