shortland / Foodie-Mates

Satisfy your Stomach & Wallet
0 stars 0 forks source link

Create all screens and mock json for app to get a better visual on flow #18

Open louishinohara opened 3 months ago

louishinohara commented 3 months ago

Create all the screens to facilitate demos and ensure everyone is aligned in understanding the expectations for the first phase of the app. For each screen, describe its purpose, functionality, and include navigation buttons to other screens. We'll rely on imagination for the visual design, but this should effectively demonstrate all the features and what the app should be doing.

The objective is to outline the entire app from the customer’s perspective, using mock JSON data. This will serve as a rough template to prioritize pages and identify necessary APIs, allowing us to focus on key areas.

Discuss with @shortland to determine the core focus areas, any revisions and what can be handled with mock data. Develop a timeline for the work items to ensure we have a clear understanding of everything we need to do and can plan accordingly

louishinohara commented 3 months ago

Upon signing in, I will hit the profile endpoint to get details on the user. I need these two fields added to the JSON...

{
  "data": {
    "address": null,
    "email": "Loopoo@gmail.com",
    "first_name": "Loo",
    "last_name": "Poo",
    "phone_number": "112487843131",
    "user_id": "27",
    "account_type": "customer"  <------- HERE
    "requires_onboard": true, <------- HERE
  },
  "status": 200
}

account_type will let me know which screen to navigate to (customer or business) requires_onboard will show the screen that gives a quick walk through and collect user preferences & criteria

shortland commented 3 months ago

@louishinohara

  1. moved profile endpoint from /auth/profile to /users/profile
  2. added the two fields account_type & requires_onboard to the endpoint
  3. implemented the update profile endpoint PUT /users/profile; simply specify the column name you want to update in the --data request... obvi. should implement some validation like not let people update password so easily etc, but for now this will let u update any column in the users table
➜  ~ curl -XGET --cookie "SESSION_ID=f75954fcce918ee81c55956c074f72b7" "http://198.199.85.111/users/profile" | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   201    0   201    0     0   4118      0 --:--:-- --:--:-- --:--:--  4187
{
  "status": 200,
  "data": {
    "user_id": "3",
    "first_name": "ilan",
    "last_name": "kleiman",
    "email": "ilankleiman@gmail.com",
    "phone_number": "6464643484",
    "address": null,
    "account_type": "person",
    "requires_onboard": "1"
  }
}
➜  ~ curl -XPUT --cookie "SESSION_ID=f75954fcce918ee81c55956c074f72b7" --data "requires_onboard=0" "http://198.199.85.111/users/profile"
{"status":200,"data":null}%
➜  ~ curl -XGET --cookie "SESSION_ID=f75954fcce918ee81c55956c074f72b7" "http://198.199.85.111/users/profile" | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   201    0   201    0     0   4282      0 --:--:-- --:--:-- --:--:--  4276
{
  "status": 200,
  "data": {
    "user_id": "3",
    "first_name": "ilan",
    "last_name": "kleiman",
    "email": "ilankleiman@gmail.com",
    "phone_number": "6464643484",
    "address": null,
    "account_type": "person",
    "requires_onboard": "0"
  }
}