A REST API backend system for the construction ERP software made with NodeJS
Creative Commons Zero v1.0 Universal
0
stars
0
forks
source link
As a contractor, I should be able to get all ordered materials for a project, so that I can understand how much of each was ordered and how much did it cost #84
As a contractor, I should be able to get all ordered materials for a project, so that I can understand how much of each was ordered and how much did it cost.
Acceptance Criteria
Scenario 1: Search for all possible materials orders in a project
GIVEN an contractor is requesting all possible materials in the desktop app
WHEN the app hits the /projects/:id/materials endpoint with a valid GET request, containing the path parameter:
:id, the unique id of the project for which the materials are needed.
THEN the app should receive a status 200AND in the response, the following information should be returned:
headers
list of materials
Sample Request/Sample Response
For e.g. If we request ordered materials for project id 1:
Scenario 2: Search for all possible materials orders in a project for a material
GIVEN an contractor is requesting all possible materials orders in the desktop app
WHEN the app hits the /projects/:id/materials endpoint with a valid GET request, containing:-"
the path parameter:
:id, the unique id of the project for which the materials orders are needed.
the query parameters:
mat_id="some_id", where some_id is the mat_id of that material**
THEN the app should receive a status 200AND in the response, the following information should be returned:
headers
list of material orders having that project_id and mat_id
Sample Request/Sample Response
For project id 1 and query parameter mat_id=3:
Summary
As a
contractor
, I should be able to get all ordered materials for a project, so that I can understand how much of each was ordered and how much did it cost.Acceptance Criteria
Scenario 1: Search for all possible materials orders in a project
GIVEN an
contractor
is requesting all possible materials in the desktop app WHEN the app hits the/projects/:id/materials
endpoint with a valid GET request, containing the path parameter::id
, the unique id of the project for which the materials are needed.THEN the app should receive a status
200
AND in the response, the following information should be returned:Sample Request/Sample Response For e.g. If we request ordered materials for project id 1:
Scenario 2: Search for all possible materials orders in a project for a material
GIVEN an
contractor
is requesting all possible materials orders in the desktop app WHEN the app hits the/projects/:id/materials
endpoint with a valid GET request, containing:-":id
, the unique id of the project for which the materials orders are needed.mat_id="some_id"
, where some_id is the mat_id of that material**THEN the app should receive a status
200
AND in the response, the following information should be returned:Sample Request/Sample Response For project id 1 and query parameter mat_id=3:
Resources
Dev Notes
Testing Notes
{notes for QA, with examples if applicable}