forked from dhis2/maps-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from EyeSeeTea/feature/zebra-app-customisations
Feature: add zebra app customisations (Map visualization)
- Loading branch information
Showing
38 changed files
with
1,923 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,5 @@ src/locales/ | |
cypress/videos/ | ||
cypress/screenshots/ | ||
cypress.env.json | ||
/build | ||
*.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import * as types from '../constants/actionTypes'; | ||
|
||
/** | ||
* @typedef {Object} CurrentAppInfo | ||
* @property {string} app - The application identifier. | ||
* @property {string} [page] - Optional. The current page identifier. | ||
*/ | ||
/** | ||
* Creates an action to set the current app info. | ||
* | ||
* @param {CurrentAppInfo} data - The object with the info for the current app with `app` and `page`. | ||
* @returns {Object} The action object with type `types.CURRENT_APP_INFO_SET` and payload. | ||
*/ | ||
export const setCurrentAppInfo = data => ({ | ||
type: types.CURRENT_APP_INFO_SET, | ||
payload: data, | ||
}); | ||
|
||
/** | ||
* Creates an action to clean the current app info. | ||
* | ||
* @returns {Object} The action object with type `types.CURRENT_APP_INFO_CLEAN`. | ||
*/ | ||
export const cleanCurrentAppInfo = () => ({ | ||
type: types.CURRENT_APP_INFO_CLEAN, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import * as types from '../constants/actionTypes'; | ||
|
||
/** | ||
* @typedef {Object} Filter | ||
* @property {string} key - The key of the filter. | ||
* @property {string} value - The value of the filter. | ||
*/ | ||
/** | ||
* Creates an action to load zebra custom popup data. | ||
* | ||
* @param {Array.<Filter>} filters - The filters to apply for loading the custom popup data. | ||
* @returns {Object} The action object with type `types.ZEBRA_CUSTOM_POPUP_DATA_LOAD` and payload. | ||
*/ | ||
export const loadZebraCustomPopupData = filters => ({ | ||
type: types.ZEBRA_CUSTOM_POPUP_DATA_LOAD, | ||
payload: filters, | ||
}); | ||
|
||
/** | ||
* @typedef {Object} CustomPopupData | ||
* @property {Object} data - The data to be set in the custom popup, where each key is an incident status and each value is an object with diseases and hazard types. | ||
* @property {string} lastUpdatedDate - The date when the data was last updated, formatted as a string MM/DD/YYY. | ||
*/ | ||
/** | ||
* Creates an action to set zebra custom popup data. | ||
* | ||
* @param {CustomPopupData} data - The custom popup data to set, including data and last updated date. | ||
* @returns {Object} The action object with type `types.ZEBRA_CUSTOM_POPUP_DATA_SET` and payload. | ||
*/ | ||
export const setZebraCustomPopupData = data => ({ | ||
type: types.ZEBRA_CUSTOM_POPUP_DATA_SET, | ||
payload: data, | ||
}); | ||
|
||
/** | ||
* Creates an action to clean zebra custom popup data. | ||
* | ||
* @returns {Object} The action object with type `types.ZEBRA_CUSTOM_POPUP_DATA_CLEAN`. | ||
*/ | ||
export const cleanZebraCustomPopupData = () => ({ | ||
type: types.ZEBRA_CUSTOM_POPUP_DATA_CLEAN, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import * as types from '../constants/actionTypes'; | ||
|
||
/** | ||
* Creates an action to load zebra program indicators. | ||
* | ||
* @param {Object} dataStoreInfo - Information required to load the zebra program indicators. | ||
* @param {string} dataStoreInfo.zebraNamespace - The namespace in the datastore for zebra indicators. | ||
* @param {string} dataStoreInfo.dashboardKey - The key in the datastore for retrieving dashboard program indicators info. | ||
* @returns {Object} The action object with type `types.ZEBRA_PROGRAM_INDICATORS_LOAD` and the passed data as payload. | ||
*/ | ||
export const loadZebraProgramIndicators = dataStoreInfo => ({ | ||
type: types.ZEBRA_PROGRAM_INDICATORS_LOAD, | ||
payload: dataStoreInfo, | ||
}); | ||
|
||
/** | ||
* @typedef {Object} ProgramIndicator | ||
* @property {string} id - The ID of the program indicator. | ||
* @property {string} name - The name of the program indicator. | ||
* @property {string|null} disease - The name of the disease associated with the indicator. | ||
* @property {string|null} hazardType - The name of the hazardType associated with the indicator. | ||
* @property {string|null} incidentStatus - The name of the incidentStatus associated with the indicator. | ||
*/ | ||
/** | ||
* Creates an action to set zebra program indicators. | ||
* | ||
* @param {Array.<ProgramIndicator>} programIndicators - The program indicators to set. | ||
* @returns {Object} The action object with type `types.ZEBRA_PROGRAM_INDICATORS_SET` and payload. | ||
*/ | ||
export const setZebraProgramIndicators = programIndicators => ({ | ||
type: types.ZEBRA_PROGRAM_INDICATORS_SET, | ||
payload: programIndicators, | ||
}); |
Oops, something went wrong.