Skip to content

Commit

Permalink
Merge pull request #54 from udsm-dhis2-lab/develop
Browse files Browse the repository at this point in the history
Version 2
  • Loading branch information
rajey authored Mar 31, 2024
2 parents a06be2e + eda5fc5 commit 0eb2a6a
Show file tree
Hide file tree
Showing 226 changed files with 17,273 additions and 19,761 deletions.
File renamed without changes.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
!.vscode/extensions.json

# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage
Expand All @@ -37,3 +38,4 @@ testem.log
# System Files
.DS_Store
Thumbs.db
proxy-config.json
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
43 changes: 0 additions & 43 deletions .travis.yml

This file was deleted.

112 changes: 81 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,94 @@
[![Build Status](https://travis-ci.org/interactive-apps/iassignments.svg?branch=master)](https://travis-ci.org/interactive-apps/iassignments)
[![Greenkeeper badge](https://badges.greenkeeper.io/interactive-apps/iassignments.svg)](https://greenkeeper.io/) [![Maintainability](https://api.codeclimate.com/v1/badges/a99a88d28ad37a79dbf6/maintainability)](https://codeclimate.com/github/interactive-apps/iassignments/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/a99a88d28ad37a79dbf6/test_coverage)](https://codeclimate.com/github/interactive-apps/iassignments/test_coverage)
# Assignment App

# INTERACTIVE ASSIGNMENTS
DHIS2 application built for assigning various metadata including organisation units, data sets, programs etc. Aiming in simplifying the activity of assigning multiple metadata at once.

A utility tool custom built for DHIS2 environment tasks on assigning various metadata including organisation units, data sets, programs etc. Aiming in simplifying the activity of assigning multiple metadata at once.
## Prerequisites

### Prerequisites
>- Node Js v8 or later
>- npm
>- Angular CLI v6 or later
>- git
Make sure your environment has the following

### Installation
> 1. [NodeJs (16 or higher)](https://nodejs.org)
> 2. [Angular CLI v17 or higher](https://github.com/angular/angular-cli)
> 3. [git](https://git-scm.com/downloads)
## Installation

1. Clone the repository from Git

```bash
git clone https://github.com/udsm-dhis2-lab/iassignment.git
```

2. Navigate to application root folder

```bash
cd iassignment
```

3. Install all required dependencies for the app.

> * Clone the repository from Git
```bash
$ git clone https://github.com/hisptz/iassignments.git
npm install
```
> * Go into iassignements directory then xecute the following npm command to install the application to your computer.

OR

```bash
$ npm install
yarn install
```
> * Once the application is installed and all its dependency hence execute the next command to run the application.

## Development server

Execute the following command to run the application.

```bash
$ npm start
npm start
```
> * NOTE: If you are required to proxy to remote server, create a json file 'proxy-config.json' inside root application folder and add the following lines( change the localhost port based on ports used by the app or change target to the server url to proxy data).

OR

```bash
yarn start
```

Navigate to [http://localhost:4200](http://localhost:4200).

> **NOTE**: This command will require proxy-config.json file available in the root of your source code, usually this file has this format.
```json
{
"/api": {
"target": "http://localhost:4200/dhis/",
"secure": "false",
"auth":"username:password",
"changeOrigin": true
},
"/": {
"target": "http://localhost:4200/dhis/",
"secure": "false",
"auth":"username:password",
"changeOrigin": true
}
}
{
"/api": {
"target": "http://localhost:4200/dhis/",
"secure": "false",
"auth": "username:password",
"changeOrigin": true
},
"/": {
"target": "http://localhost:4200/dhis/",
"secure": "false",
"auth": "username:password",
"changeOrigin": true
}
}
```

We have provided `proxy-config.example.json` file as an example, make a copy and rename to `proxy-config.json`

## Build

To build the application, run

```bash
npm run build
```

OR

```bash
yarn build
```

The build artifacts will be stored in the dist/, this will include a zip file ready for deploying to any DHIS2 instance..

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
72 changes: 22 additions & 50 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
"i-assignments": {
"iassignment": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
Expand All @@ -13,26 +13,23 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/i-assignments",
"outputPath": "dist/iassignment",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets",
"src/manifest.webapp"
],
"assets": ["src/favicon.ico", "src/assets", "src/manifest.webapp"],
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.css",
"node_modules/font-awesome/css/font-awesome.css",
"src/styles.css"
],
"scripts": [
"node_modules/jquery/dist/jquery.min.js",
"node_modules/popper.js/dist/umd/popper.min.js",
"node_modules/bootstrap/dist/js/bootstrap.min.js"
]
"scripts": [],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
Expand All @@ -45,31 +42,30 @@
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
}
}
},
"defaultConfiguration": ""
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "i-assignments:build",
"proxyConfig": "proxy-config.json"
"proxyConfig": "proxy-config.json",
"buildTarget": "iassignment:build"
},
"configurations": {
"production": {
"browserTarget": "i-assignments:build:production"
"buildTarget": "iassignment:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "i-assignments:build"
"buildTarget": "iassignment:build"
}
},
"test": {
Expand All @@ -84,56 +80,32 @@
"src/styles.css"
],
"scripts": [],
"assets": [
"src/favicon.ico",
"src/assets"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
"assets": ["src/favicon.ico", "src/assets"]
}
}
}
},
"i-assignments-e2e": {
"iassignments-e2e": {
"root": "e2e/",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "i-assignments:serve"
"devServerTarget": "iassignment:serve"
},
"configurations": {
"production": {
"devServerTarget": "i-assignments:serve:production"
"devServerTarget": "iassignment:serve:production"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "i-assignments",
"cli": {
"defaultCollection": "@ngrx/schematics"
"schematicCollections": ["@ngrx/schematics"],
"analytics": "680e4c6f-5c23-4311-a971-33b7ec11fd52"
}
}
20 changes: 0 additions & 20 deletions build.sh

This file was deleted.

8 changes: 4 additions & 4 deletions e2e/src/app.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { AppPage } from './app.po';
import { AppPage } from "./app.po";

describe('workspace-project App', () => {
describe("workspace-project App", () => {
let page: AppPage;

beforeEach(() => {
page = new AppPage();
});

it('should display welcome message', () => {
it("should display welcome message", () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('Welcome to i-assignments!');
expect(page.getParagraphText()).toEqual("Welcome to iassignments!");
});
});
10 changes: 0 additions & 10 deletions greenkeeper.json

This file was deleted.

Loading

0 comments on commit 0eb2a6a

Please sign in to comment.