@iapps/ngx-dhis2-validation-rule-group-filter
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-beta.2 • Public • Published

Dhis2 Validation Rule Group Filter Library

CircleCI Build Status Maintainability Test Coverage Commitizen friendly Gitter chat GitHub commitizen on stackoverflow npm GitHub All Releases GitHub issues GitHub closed issues GitHub package.json version

Introduction

Dhis2 Validation Rule Group(DVRG) is a user interface component library for developing DHIS2 applications. DHIS2 Team from UDSM uses and maintain this component to ensure visual and usability consistency where it is used in the process of developing different DHIS2 web application.

Features

  • Fetching all the validation rules group from the DHIS2 Instance where the you have installed the Web app you are developing and use this library as part of it.
  • Give support to use to select the validation rule group available withing the instance and proceed with the analysis process.
  • Give support to De-select the validation rule group if it wrong selection.
  • It give support to select and de-select all the selection i.e validation rule group all at once.

Quickstart Guide

Prerequisite Requirements

Install the following dependencies withing your project before starting using the following library.

Installation Commands

npm i @ngrx/store

npm i @ngrx/effects

npm i rxjs

npm i --save lodash

npm i @iapps/ngx-dhis2-http-client

npm i @iapps/ngx-dhis2-validation-rule-group-filter

Installation Procedure

Import StoreModule, EffectsModule and HttpClientModule to the appModule.ts. Below is an example of configuration for a fresh project, but if you have already done installation based on your configuration the follow all along to see what is need to be added to make installation successfully

import { StoreModule } from '@ngrx/store';
import { EffectsModule } from '@ngrx/effects';
import { HttpClientModule } from '@angular/common/http';
import { NgxDhis2ValidationRuleFilterModule } from '@iapps/ngx-dhis2-validation-rule-group-filter';

@NgModule({
    declarations: [
    AppComponent,
],
imports: [
    BrowserModule,
    AppRoutingModule,
    StoreModule.forRoot({}),
    EffectsModule.forRoot([]),
    HttpClientModule,
    NgxDhis2ValidationRuleFilterModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }

NOTE: This library is using @iapps/ngx-dhis2-http-client library, Please follow installation instructions for this package as well. Instructions can found here

How to use

After installation you can use the following tags to start using it in your project.

<lib-ngx-dhis2-validation-rule-filter
    [dataSelection]='dataElements'
    [selectedVRGs]='preSelectedVRGs'
    (update)="onUpdateValidationRule($event)"
    (close)="onUpdateValidationRule($event)">
<lib-ngx-dhis2-validation-rule-filter>

Output Emmitted

Template of the OUTPUT Emmitted after clicking the UPDATE or CANCEL button:

items: []
periodTypes: {}
dimensions: "vrg"
change: true

Example of the output Emmitted after clicking the UPDATE or CANCEL button:

items: [
    {
        id: "odiGzVETtQQ",
        name: "Form: National Malaria control program"
    }
]
periodTypes: {
    id: "Monthly"
    name: "Monthly"
    rank: 3
}
dimensions: "vrg"
change: true

Contributions

Licence

GitHub

Readme

Keywords

none

Package Sidebar

Install

npm i @iapps/ngx-dhis2-validation-rule-group-filter

Weekly Downloads

2

Version

1.0.0-beta.2

License

LGPL-3.0

Unpacked Size

617 kB

Total Files

68

Last publish

Collaborators

  • goodwile44
  • interactive.apps
  • rajab.mkomwa
  • mukulu
  • vincentminde
  • mgowanojr
  • vmataba
  • josephatj
  • chingalo
  • barnabasmakonda
  • waltervfaustine
  • ibrahimwickama
  • happinessnyanda
  • megamind97
  • baharajr
  • mdachi-codes