Code Monkey home page Code Monkey logo

thingaha-web's People

Contributors

2303khin avatar dev-wyp avatar dreamingblackcat avatar eithingyanmoe avatar inzalinaing avatar jaziz-nisum-com avatar khinekhinekyaw avatar khinewaioo avatar khinezarthwe avatar minnthiri avatar mo3taz1705 avatar myamaw avatar naingaungphyo avatar pinmaing avatar sisminnmaw avatar thandarkhineaye avatar yeemon04 avatar yemkhaung avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

thingaha-web's Issues

Change plural to singular Get Query By ID

User List page improvements

We need to do a few small improvements to User List page and User Form.

  • User list page currently do not show username in the cards. Please add username to the card.
  • We need to add a password for user on creation. For now, we only want to add password field when creating user but not on edit because we plan to have a password update form feature for users separately.

Support Edit action on User list page and Add User detail page

User list page currently have functionality to add new user but editing a user is not implemented yet.

Also we would want to add a User detail page too so that we can link a user to its detail page from other pages.

Mockups

Edit Form

Please re-use New user form.

Detail page

Coming soon

Support Login and Logout properly

Currently, whenever we refresh the page, we are redirected to login page even though we already logged in.
Please persist in the login state and support logout functionality.

Attendance Search API

  • Search by student name
  • Search by school name
  • filter by grade, year
  • filter by year

[Backend] Update Address api to include addresseable polymorphic relationship

In address management page, we want to show which record a given address is belonged to. For example, if an address is a school address, we want to show a link to school.

So, we need that data in the API response. The expected format for each address is as follow:

     {
        "id": 1,
        "addressable": {
          "id": 1,
          "name": "Maung Maung",
          "type": "Student"
        },
        "division": "ayeyarwaddy",
        "district": "Maubin",
        "township": "Nyaungdon",
        "street_address": "RZarni Road"
      }

Transfer Page

Transfer Management Page

  • Transfer List Page
  • Transfer Detail Page
  • New Transfer Record Form
  • Edit Transfer Record Form

Please refer to backend api docs here.

For draft server json, please refer here.

Mockups

Transfer List Page Desktop Mockup

Transfer List (Desktop HD)

Transfer List Page Mobile Mockup

Trasnfer List (Mobile)

Trasnfer Popup Form Mockup

Trasnfer Popup Form (Mobile)

Transfer Detail Page Desktop Mockup

Transfer Detail (Desktop HD)

Transfer Popup Form Desktop Mockup

Transfer Popup Form (Desktop HD)

Transfer Detail Page Mobile Mockup

Trasnfer Detail (Mobile)

[Backend] Update login end point to return user information together with access_token

To know who is current user, we need more information than just access token from login endpoint.

Please update login endpoint to return the following information:

{
   access_token: '...',
   user: {
      id: 1,
      email: '[email protected]',
       username: 'moemoe'
    }
}

Also, please update the error response format to this format:

{
  errors: [
    {
      error_code: "E0001",
      reason: "Validation Failed",
      description: "Invalid email or password."
    }
  ]
}

API [CRUD] for user

  • CRUD address
  • join the result of user with addresses table
  • instead of address_id show the address in results
  • delete action
  • update action
  • read action modification (all, by id, by username)

current action in local server is created and read ->
http://localhost:5000/api/v1/user
POST body

{
    "name": "khinezar4", 
    "email": "[email protected]", 
    "password" : "123", 
    "role": "admin", 
    "country": "mm"
    "division": "ayeyarwady",
    "district": "maubin",
    "township": "nyaungdon",
    "street_address": "Rzarni Road"
}

desired format:
https://github.com/thingaha/thingaha-web/blob/master/draft_server/sample_data/users.json

Address Page

Address Management Page

Address management page is to manage various types of addresses that we create through the app in one place. There are three types of records that will be associated with an address.

  • Student
  • Donator
  • School

We will provide the associated record as addresseable in the Address record json. The example response format is added in the draft server here.

We will be supporting search but it is not necessary to implement search in this ticket. We're planning to have separate issues search in various pages later.

  • Address List Page

UI Mockups

Address List View (Desktop version)

image

Address List View (Mobile version)

image

User Search API

  • Search by name and email
    api/v1/users/search?query=XXX
  • Filtered by role
    api/v1/users?role=XXXX
  • Filtered by country
    api/v1/users?country=XXXX

Can't Insert the DATA after DB seeding

After the project ENV setup function of db_migrate, db_seed, insert the record via API can't insert correctly.
For example,
User data seed is 1 row for Users table.
Then, User creates from API fails for the first request and throw an error.
db_seed.sh already insert id:1 for user. When creating the user via API, throw an error for ID:1
ERROR reason, Primary KEY ERROR

[Frontend] - Create a form to add new user or edit an existing user on users page

We need to be able to add new users and edit users.

The idea is to have an add user button above users table and when clicked, show a popup form with the following fields:

  • username
  • password
  • password_confirmation
  • email
  • address
  • role
  • country

Potentially use material UI modal and forms. For now, just handle user creation with a dynamic in-memory array in reducer. We'll have a separate ticket for backend integration.

Consider using a form library for react. eg. https://formik.org/

DB Model setup

  • DB model setup in python app
  • Create Database using python
  • adding env-sql

Backend Data Seeding using real data

Create User Role Management

We have three user types in User role.

  • admin

  • sub-admin

  • donator

  • Define APIs for only admin can do

  • Define APIs for only sub-admin can do

  • Define APIs for only donator can do

  • Define admin Functions

  • Define sub-admin functions

  • Define donator admins

  • Create Entity Chart for User Role management

[Frontend] School Management page

School Management page

Background

Admin needs to manage schools so that we can map which student attends which school.

Task

We just need a normal CRUD page for schools.

School record will have:

  • id (integer, primary)
  • name (string)
  • contact_info (string)
  • address (string)

For UI mockup, we're thinking of a simple card style list view just like in users page.

For new school and edit school form, we prefer popup form if possible.

Mockups

List view

Added pagination for future reference. It hasn't been implemented by backend yet. We can update it later.

Schools List View (Desktop HD)

Popup Form

This form layout should be shared between new record form and edit record form.

We're going to store separate parts for address. For now, we can just embed address fields as part of school form component. But we would like to extract one single address fields component in the future because we have a couple place to share address form.

School Form Popup (Desktop HD)

Address Search API

  • filtered by type
  • filtered by district, division
  • full text search by township
  • full text search by street address

Extra Fund Page

  • Extra Fund page from sketch
  • Extra Fund registration page
  • Extra Fund Edit page
  • Extra Fund List Page

Student Search API

  • search by name
  • search by father_name
  • search by mother_name
  • search by parents_occupation

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.