scientist-softserv / webstore

https://webstore-staging.vercel.app
3 stars 0 forks source link

research initial api calls #21

Closed alishaevn closed 2 years ago

alishaevn commented 2 years ago

summary

determine which api calls will be necessary in order to implement the search, browse, create request and view all/one request features of the mvp.

acceptance criteria

we will need api calls for each of the following scenarios

resources

notes

alishaevn commented 2 years ago

originally posted: sept 9, 2022. last edited: sept 20, 2022.


login

update as of 9/20/22:

alishaevn commented 2 years ago

search

return all - `https://{{domain}}.scientist.com/api/v2/providers/{{provider-id}}/wares.json` - provider id 572 = golden-pacific-services ![Image](https://user-images.githubusercontent.com/29032869/197557035-96645dda-9dba-46bd-8425-bdfcf5d8f346.png)

request feedback

search for a specific term - the default way of passing a query to the `/wares` endpoint will not work for our use case (`https://{{domain}}.scientist.com/api/v2/wares.json?q=peptide`) - we instead need to store the list above of available wares. when a user conducts a search, run that query against the list and _not_ the api to return results
alishaevn commented 2 years ago

view all of my requests

this works because of the individual access token that I provide as the "Bearer token" param.

my requests `https://{{domain}}.scientist.com/api/v2/quote_groups/mine.json` ![Image](https://user-images.githubusercontent.com/29032869/197557363-fcc565d7-f1ab-408c-99b5-d8fe84880ec2.png)
alishaevn commented 2 years ago

view a single request

api call for single request `https://{{domain}}.scientist.com/api/v2/quote_groups/:id.json` ![Image](https://user-images.githubusercontent.com/29032869/197557495-8b7e63d2-153a-4556-9fe1-38d7a17f1a93.png)

supplier review

mock up ![Image](https://user-images.githubusercontent.com/29032869/197558654-3b5110d7-a80f-4eac-b90a-07367a799806.png)

sow selection

mock up **1.** ![Image](https://user-images.githubusercontent.com/29032869/197558319-12718f56-68ca-40e4-82dc-25d83b08dc54.png) **2.** ![Image](https://user-images.githubusercontent.com/29032869/197558809-9b68e874-8d69-489d-a93b-c8ca0782952f.png)

work started

1. Image

2. Image

work completed

mock up ![Image](https://user-images.githubusercontent.com/29032869/197559119-af84b06e-92f5-4dfe-8cb9-9b3644f7d54d.png)
alishaevn commented 2 years ago

browse (research areas)

what we have

use the ancestor_slugs value on each category (see: "api result") to determine the path taken to get to the final sub-category. (see: "browser view").

api result `https://{{domain}}.scientist.com/api/v2/categories.json` ![Image](https://user-images.githubusercontent.com/29032869/197565951-113b70d9-3d8a-4aa0-9153-140ae714af85.png)
browser view | home page | full list page | | ------ | ------ | | ![Image](https://user-images.githubusercontent.com/29032869/197566086-1b903b96-b613-4f69-8110-1244dea401d1.png) | ![Image](https://user-images.githubusercontent.com/29032869/197566146-f8d4c800-114e-4384-9648-c6de9bcb9fc1.png) |

what we need

request feedback

option a
option b
alishaevn commented 2 years ago

make a request

request feedback

there are 3 ways to make a request:

once a user selects the type of thing they want to request, the request form is returned. this logic is not all in the api. it's a mix of controller methods and view logic. dynamic forms are published to certain organizations

blank request how does this know what to return?
search request `ware_refs.urls.storefront` will return the url to redirect to that returns the form. returning that form is based on the linked files above ![Image](https://user-images.githubusercontent.com/29032869/197566911-2ead7781-f53b-482a-bd98-72a89e16779e.png)
browse request since a browse request is just a grouping of individual services, once we get to the view that shows the services, it'll use the same api call as in "search request" above.
alishaevn commented 2 years ago

spoke with steven about the "make a request" calls above.

request feedback

simply using the rx app as a basis for the webstore api isn't....suggested. there's way too much logic in the views in the rx app.

the api as is, is mainly for reading. we'll need to either update specific controllers to understand json the way we need it, or add create/update functionality to the api.

although the rx-lite repo is outdated (both the react version and the api calls), it might be useful to see how this same/similar idea was being thought about 5 years ago.

alishaevn commented 2 years ago

API enhancements for the webstore mvp

login

search

browse

requests

alishaevn commented 2 years ago

talked with @cpetersen and @crisr15 about this. in addition to some new api calls that we need, some of the existing calls are returning results that chris is not expecting. he's going to talk to ron about what changes may need to be made.

once direction is decided, we can create issues against the api v2 repo: https://github.com/assaydepot/scientist_api_v2/issues

alishaevn commented 2 years ago

search

browse

requests

alishaevn commented 2 years ago

some of the items in the mock ups in this comment reference a view page and not an api call. e.g., "send message" at the upper left of the supplier review mock up: