Closed smirolo closed 3 years ago
My understanding per previous conversations and review of the UI:
Would you please confirm?
There are multiple active assessments at any given moment and it is possible to create more active assessments.
Now an assessment consists of a Sample
and an industry segment. Currently an industry segment is defined by an industry segment path
. Since the industry segment is not tied to a Sample
through the campaign
field as you would expect, the only way to deduce assessments from the (only) "is_frozen": false
sample returned by /api/supplier-1/sample/ is to look at the answers and build candidate industry segments.
The easier way is to call the /api/supplier-1/benchmark/history/ API and look at the "updates" field.
@smirolo if a user creates an assessment but hasn’t answered any questions, what would the updates
field look like in the response from https://www.tspproject.org/docs/api/#RetrieveHistoricalScore?
Query:http://localhost:8000/envconnect/api/supplier-2/benchmark/historical/
HTTP response:
{
"results": [],
"updates": []
}
Since there are no answers, there are no industry segments that can be derived.
A "continue assessment" button should be inside each assessment card. A button to start on a new industry segment should always be visible.
Would /api/{organization}/sample/
be deprecated? https://www.tspproject.org/docs/api/#RetrieveHistoricalScore seems to provide the same (plus additional) information.
We still need /api/{organization}/sample/
to POST
(i.e. create) a new assessment.
@smirolo in the results section of the response for https://www.tspproject.org/docs/api/#RetrieveHistoricalScore:
"results": [
{
"key": "May 2018",
"created_at": "2018-05-28T17:39:59.368272Z",
"values": [
[
"Construction",
80,
"/app/supplier-1/assess/ce6dc2c4cf6b40dbacef91fa3e934eed/sample/boxes-and-enclosures/"
]
]
},
...
1) Will the values
array only ever have one element? … or when would it be able to have more than one element?
2) What does the number 80
stand for?
Usage example in envconnect/templates/envconnect/app.html
If a user has already created and is currently filling in an assessment for the Construction
industry segment, should Construction
be removed from the industry list i.e. should the UI prevent users from having more than one active assessment for the same industry segment?
Yes. Or maybe better would to write "Continue" next to the industry item in the dropdown list.
In the vue app page, it should be possible to:
/api/<organization>/benchmark/historical/
API).