1.1.37 • Published 1 year ago

@iapps/ngx-dhis2-org-unit-filter v1.1.37

Weekly downloads
304
License
-
Repository
github
Last release
1 year ago

DHIS2 Organisation unit selection filter

Organisation unit selection filter module for DHIS2 applications based on angular 6+

installation

npm install @iapps/ngx-dhis2-org-unit-filter

Usage

If the module is to be imported in the app.module or any other feature module, then import as

import { NgxDhis2OrgUnitFilterModule } from '@iapps/ngx-dhis2-org-unit-filter';

then add this in the imports

imports: [
    ...
    NgxDhis2OrgUnitFilterModule,
    ...
    ]

Once imported, orgunitfilter can be called in as

<ngx-dhis2-org-unit-filter
    [orgUnitFilterConfig]="orgUnitFilterConfig"
    [selectedOrgUnitItems]="selectedOrgUnitItems"
    (orgUnitUpdate)="onOrgUnitUpdate($event, 'UPDATE')"
    (orgUnitClose)="onOrgUnitUpdate($event, 'CLOSE')">
</ngx-dhis2-org-unit-filter>

Inputs

InputDescription
selectedOrgUnitItemsThis is a list of selected organisation units, groups, or levels
orgUnitFilterConfigThis when passed overrides default configuration for the organisation unit filter

Input models

selectedOrgUnitItems

ItemDescription
idOrganisation unit identifier
name (optional)Organisation unit name
level (optional)Level of organisation unit in the hierarchy eg. 1, 2
type (optional)Type of organisation unit eg. USER_ORGANISATIONUNIT, ORGANISATION_LEVEL, ORGANISATIONUNIT_GROUP, ORGANISATIONUNIT

orgUnitFilterConfig

ItemDescriptionDefault value
singleSelectionSpecify whether org unit selection is single or multipletrue
reportUse (optional)Tells whether org units should be used for reports or data entrytrue
minLevel (optional)Specify minimum level for org unitsnone
updateOnSelect (optional)Specify whether to update on select or unselect or on button clickfalse
closeOnDestroy (optional)Call on closeOrgUnit Method when component get destroyed, if set truetrue

Outputs

OutputDescription
orgUnitUpdateThis is emitted when UPDATE button is clicked
orgUnitCloseThis is emitted when CLOSE button is clicked

Sample output

{
  "dimension": "ou",
  "items": [
    {
      "id": "PMa2VCrupOd",
      "name": "Kambia",
      "level": 2,
      "type": "ORGANISATION_UNIT"
    },
    {
      "id": "at6UHUQatSo",
      "name": "Western Area",
      "level": 2,
      "type": "ORGANISATION_UNIT"
    },
    {
      "id": "TEQlaapDQoK",
      "name": "Port Loko",
      "level": 2,
      "type": "ORGANISATION_UNIT"
    }
  ]
}
1.1.37

1 year ago

1.1.36

1 year ago

1.1.35

1 year ago

1.1.34

2 years ago

1.1.33

2 years ago

1.1.32

2 years ago

1.1.31

3 years ago

1.1.30

4 years ago

1.1.29

4 years ago

1.1.28

4 years ago

1.1.27

4 years ago

1.1.26

4 years ago

1.1.25

4 years ago

1.1.24

4 years ago

1.1.22

4 years ago

1.1.21-rc.6

4 years ago

1.1.21-rc.5

4 years ago

1.1.21-rc.4

4 years ago

1.1.21-rc.3

4 years ago

1.1.21-rc.2

4 years ago

1.1.21-rc.1

4 years ago

1.1.21-rc.0

4 years ago

1.1.21-beta.6

4 years ago

1.1.21-beta.5

4 years ago

1.1.21-beta.4

4 years ago

1.1.21-beta.3

5 years ago

1.1.21-beta.2

5 years ago

1.1.21-beta.1

5 years ago

1.1.20

5 years ago

1.0.20

5 years ago

1.0.19

5 years ago

1.0.18

5 years ago

1.0.17

5 years ago

1.0.16

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago