GithubHelp home page GithubHelp logo

ets-reactnative1 / form-approval-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from olliswe/form-approval-app

0.0 0.0 0.0 5.49 MB

Sample application for government officials to approve and reject forms

JavaScript 96.50% Ruby 0.16% Java 0.41% CSS 1.54% Swift 0.97% HTML 0.41%

form-approval-app's Introduction

Form Approval App

Sample application for government officials to approve and reject forms.

This app is built using Ionic React, and consumes data from a DRF API hosted on AWS.

Functionality

This app allows 3 different user roles to login and view forms to submitted to them that are pending review. The users can take a number of actions (approve/forward for review/reject) and can add comments to their review. The users can also see a dashboard showing the location of forms within their organization.

This app was built as an add-on to a pre-existing Django web app which I also was the lead developer on.

Authorization and User Roles

The app contains 3 seperate user roles. The authorization and re-direction is handled by the higher-level Route components in src/App.js. User state management is handled by React Context in src/context. React Context is also used, together with native SQLite storage, to handle the DRF authentication token.

Each of the 3 user roles have a seperate IonRouterOutlet, which is wrapped around the protected router in the higher level router - thereby making all the routes in the lower level IonRouterOutlet protected:

src/App.js IonReactRouter
        └──IonRouterOutlet
             |
             └── <AuthRoute path="/mof" component={MoFApp} category={['Minister']}/>
             |    └── src/apps/MinisterOfFinance/App.js IonRouterOutlet
             |           └── Minister of Fincance user role Routes, all protected 
             |            
             └── <AuthRoute path="/fs" component={FSApp} category={['Financial Secretary']}/>
             |    └── src/apps/FinancialSec/App.js IonRouterOutlet
             |           └── Financial Secretary Routes, all protected 
             |
             └── <AuthRoute path="/mdamin" component={MDAMinApp} category={['Minister (MDA)']}/>
                 └── src/apps/MDAMinApp/App.js IonRouterOutlet
                        └── MDA Minister Routes, all protected

Components and pages that are shared across all/several user roles can be found in the src/components and src/pages directories.

Native Compilation

The android folder contains code compiled to native Android, and the iOS folder contains code compiled to native iOS.

form-approval-app's People

Contributors

bardiaalavi-2020 avatar olliswe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.