@opensrp/population-characteristics
TypeScript icon, indicating that this package has built-in type declarations

0.0.6 • Public • Published

Population Characteristics

This package provides a UI for Editing OpenSrp population characteristics. With a list of all population characteristics for a specific location and ability to traverse through location hierarchies it is easy to edit each characteristic.

Instalation

yarn add @opensrp/population-characteristics

Importing default characteristics table styles

import '@opensrp/population-characteristics/dist/styles/index.css';

Edit characteristics

import ConnectedEditSetings from '@opensrp/population-characteristics'

const EditSetingsPage = () => {

    const editSetingsProps = {
        LoadingComponent: <loading component>, // optional,
        baseURL: <OpenSRP API base url without rest at end>,
        getPayload: <function for generating OpenSrp API headers>,
        locationsEndpoint: <OpenSrp API location tree endpoint>,
        restBaseURL: <OpenSRP API base url>,
        secAuthEndpoint: <OpenSrp API security authenticate endpoint>,
        settingsEndpoint: <OpenSrp API settings endpoint>,
        v2BaseUrl: <OpenSRP API v2 base url without rest at end>
    };
    return <ConnectedEditSetings {...editSetingsProps} />
};

Required props

baseURL: OpenSRP API base url without rest at end i.e https://.../opensrp/ getPayload: Function for generating OpenSrp API headers locationsEndpoint: OpenSrp API location tree endpoint restBaseURL: OpenSRP API base url secAuthEndpoint: OpenSrp API security authenticate endpoint, settingsEndpoint: OpenSrp API settings endpoint, v2BaseUrl: OpenSRP API v2 base url without rest at end

Optional props

debounceTime: debounce time in milliseconds. expects a value of type number. labels: object with the following keys:    descriptionLabel    editLabel    inheritedLable    inheritSettingsLabel    nameLabel    noDataFound    pageTitle    placeholder    settingLabel    setToNoLabel    setToYesLabel All of the label keys expect values of type strings.

Readme

Keywords

none

Package Sidebar

Install

npm i @opensrp/population-characteristics

Weekly Downloads

0

Version

0.0.6

License

Apache-2.0

Unpacked Size

69.6 kB

Total Files

23

Last publish

Collaborators

  • opensrp-admin