Code Monkey home page Code Monkey logo

voluntar-web's Introduction

VoluntarWeb

This is a companion app for voluntar-backend

This project was generated with Angular CLI version 10.1.1.

Get started

Fork the repository. Clone forked repository

git clone [email protected]:your-username/voluntar-web.git
cd voluntar-web

Install dependencies

npm install

Development server

Run npx ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

In local development mode all requests that start with /api will be proxied to a deployed development backend server. See proxy.conf.json for more info. In production, proxy.conf.json is ignored, for more info read Deployment instructions

Code scaffolding

Run npx ng generate component component-name to generate a new component. You can also use npx ng generate directive|pipe|service|class|guard|interface|enum|module.

Build

Run npx ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.

Running unit tests

Run npx ng test to execute the unit tests via Karma.

Running end-to-end tests

Run npx ng e2e to execute the end-to-end tests via Protractor.

Further help

To get more help on the Angular CLI use npx ng help or go check out the Angular CLI README.

Deployment instructions

Modern applications have frontend and backend deployed separately. This project is using Netlify for frontend deployment. Backend is deployed using other services.

For local development we have proxy.conf.json to proxy, in production we have to use proxy solution offered by deploy infrastructure, Netlify.

Why not call the backend directly?

We use proxy solution because backend server does not allow CORS. If server would allow CORS, we can get rid of all proxies and call server directly.

Netlify allows to create a _redirects file in the public resources folder, there you can indicate all redirects and rewrites. See Proxy to another service

Note:
_redirects file is dynamically generated and git ignored in this project

This project has multiple deploy environments like development and production, and _redirects content should be accordingly to deployed backend server.

Using Netlify there are 3 types of deployment. See Deploy contexts

  • production Branch prod is deployed
  • deploy-preview When someone opens a pull request
  • branch-deploy Branch dev is deployed

When one of this 3 contexts is happening, Netlify runs npm run ci:build that will generate _redirects before project build.

  • For production will proxy production backend server
  • For other two, development backend server will be used

Note:
Netlify can split some features by context, _redirects is still missing.
See Using different redirects across different contexts/environments

This project can be deployed in different ways. In the past multiple solutions were used like Docker, nginx or firebase. See commit when this instructions were added, to see what was deleted.

voluntar-web's People

Contributors

agressive-nicoleta avatar b-twice avatar baxli avatar danielbaxan avatar danpercic86 avatar dependabot[bot] avatar erikaya avatar grig-ian-theo avatar iamandrewluca avatar igodorogea avatar johnnytmd avatar mihaelataranu7 avatar tudormd avatar valeraf avatar vitaliel avatar wanoo21 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

voluntar-web's Issues

Change the beneficiary form

  • change ”operator” in ”fixer”

  • secret code to be generated automatically (1 alphabet letter + 3 numbers: 1 - 10, ex. A012, A013)

  • change „is curator„ in ”has curator”

image

notificiation for new request

  • each 60 second check with backend if there is any new request
  • if there is new show a notification buton and a sound
  • when click on notification button refresh the page

use tags options for volunteer form

  • the fields which have the comment #api/tag/<select_id> need to be changed to the text from the id in the db. example /api/tag/activity_types for activity_types field.
  • /api/tag/activity_types is multi checkboxes like in the beneficiary forlm
  • other fields: availability, activity_types, offer, team, age, zone_address,
  • hide fields: telegram_id, created_by
  • use the GIS service from the beneficiary form to find the latitude/longitude and autocomplete the street

create UI for adding/editing options for select like sector, team, offer V2

  • now some options for the selects are taken from the API http://167.71.48.30:5000/api/tag/ , where key could be sector, team, offer etc
  • we need a section like users/volunteer/benficary to add/edit the tags with list/column and filter, add new tag and edit on click item
    item format:
{
      "_id": "5e8e128196a3ab0290c96607", 
      "en": "-", 
      "is_active": true, 
      "ro": "Balti", 
      "ru": "-", 
      "select": "sector"
    }
  • need just ro property for now
  • need filter by is_active, select filter
  • need list with is_active, select and ro column - get method to api/tag
  • need add new tag with: select[team, offer, sector] options, ro field, is_active - boolean - post method to /api/tag
  • need edit tag with same field like new tag - put method to api/tag

add more fields for the volunteer details/edit

created_by = StringField(max_length=500)
    team = StringField(max_length=500)
    profesia = StringField(max_length=500)
    comments = StringField(max_length=500)
    last_tempreture = FloatField(min_value=36, max_value=41)
    need_sim_unite = BooleanField(default=False)
    new_volunteer = BooleanField(default=True)
    black_list = BooleanField(default=False)
    received_cards = BooleanField(default=False)
    sent_photo = BooleanField(default=False)

Replace volunteer's email with phone nr

Replace volunteer's email with phone nr

  • Replace the email column with ”Nr de tel”

  • Fix the bug column ”Activ”:
    No matter which state of the "Active" widget is chosen while adding/updating a volunteer, in the list of volunteers the value of the parameter "Active" is always "Nu"

image

no default selected volunteer on beneficiary form

when the is_active is set to true, do not set any selected item in the closest volunteer list
why?

  • fist we need to sent the offer to the volunteer, it is done when the update is done and the is_active is true
  • when the offer is sent to volunteer and accepted, then we need to select a volunteer, not when we sent the offer with the steet

Change the form ”Create Volunteer ”

  • ”Raion to change in sector + offer the following options : Botanica, Buiucani, Centru, Ciocana, Rîșcani, suburbia
    a. Add an additional input for suburbie to insert a name
  • Remove the section „password„
  • For hours per day, give number options: 1/2/3/4/5/6/7/8
  • Remove all required fields except: nume, adresă, nr de tel, email
  • Remove section activity types
  • Remove last question: ”Agreeed terms”
  • Change „Received Contract” in ”Contract Signed?”
    image
    image
    image

assign the request to a fixer

  • a select field in the request details section
  • get the operators info from db
  • save the id of the operator in the field 'fixer'

Volunteer Filters

  • Exclude all options from ”offer„, Volunteers Filters except (apeluri, transport, dezinfectare, livrare, fixing, coordonare)
  • Change ”Zone Adress” in ”Sector”
  • Include the following options: Botanica, Buiucani, Centru, Ciocana, Rîșcani, suburbie
  • Add an additional input for suburbie to insert a name
  • Exclude ”new volunteer” from volunteer filters

Alert when a volunteer/beneficiary is updated/added

Create a modal with notification which appears after clicking on the "Save" button when a volunteer/beneficiary is updated/added. The only component of the modal is text - "Schimbările sunt salvate!/Ați creat un obiect nou cu succes!" After update/creating -> the user is returned to the page with the updated list.

integrate gis

  • when the streed is written a request is sent to the gis service and a list of options is returned
  • user should choise the right option
  • path to the service
  • path to ui of the service here

add map

  • if the streed is not correct the user can open a map and choice the write location
  • path to the map
  • path to th gis service here

tg-bot confirmation

  • when the user click on update - reload the closest volunteer(refresh for form beneficiary)
  • if the offer_beneficiary_id is the same as the beneficiary_id then make the item in the list green and add the text from availability_day to the item text. talking about /api/volunteer/closest//10
  • if the items from closest volunteer does not have telegram_chat_id property make the item mhh - orange(or other color, or something to defirentiate)
  • add the fixer select box: with items from http://167.71.48.30:5000/api/operator
  • add the offer select box: with items from http://167.71.48.30:5000/api/tag/offer
  • add boolean has_symptoms
  • add link to the image path_receipt if exist to open in a new tab
  • hide/delete password from display, but add in the background a dummy value

views based on role

each user has a role[fixer, operator]

  • for operator show just the new beneficiary and the list of benefiacy, no edit??
  • fixer can do everything

Create landing page and set to "/" directory

filter options for the volunteeers

format api api/volunteer/filters/page/items-per-page?key_fied=value, eg. /filters/1/1000?phone=10000002

  • it return a dict {lists:[],count:44} , count is the total number of found items in db, length of list is smaller or equat to items-per-page.

  • in order to sort by interval(smaller/bgger than) use termination __gte, __ste, eg. availability__gte=4

filter options for the beneficiary list

format api api/beneficiary/filters/page/items-per-page?key_fied=value, eg. /filters/1/1000?phone=10000002

  • it return a dict {lists:[],count:44} , count is the total number of found items in db, length of list is smaller or equat to items-per-page.
  • in order to sort by interval(smaller/bgger than) use termination __gte, __ste, eg. availability__gte=4

matching between request and volunteers

  • when the request is shown in the table a button is show/details to add the volunteer
  • a list of volunteer is shown with their phone and other info + button assgned to request
  • when click on assigned to request save in the db on beneficiary table, field volunteer the id

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.