Express router for tablet app related routes
Methods
(static) delete/fabcut/cutting/jobs/:jobId(jobId) → {Boolean}
The route to cancel the job assigned by the leader to follower
Parameters:
| Name |
Type |
Description |
jobId |
number
|
The unique job id |
Returns:
-
Type
-
Boolean
(static) delete/fabcut/cutting/jobs/:jobId/barcodes/:barcode() → {Boolean}
The route to remove a scanned barcode from the assigned job
Parameters:
| Name |
Type |
Description |
req.params.barcode |
String
|
The barcode to be removed |
req.params.jobId |
Number
|
The unique job id |
Returns:
-
Type
-
Boolean
(static) get/fabcut/cutting/jobs/:deviceId() → {Object}
This route fetches the details of the job assigned to a follower device
Parameters:
| Name |
Type |
Description |
req.params.deviceId |
String
|
The device id |
req.query.location |
String
|
The location of the device |
Returns:
-
Type
-
Object
(static) get/fabcut/cutting/jobs/fetch/:location() → {Array.<todaysJobs>}
The route to fetch all jobs for the current day at a given location
Parameters:
| Name |
Type |
Description |
req.params.location |
String
|
|
Returns:
-
Type
-
Array.<todaysJobs>
(static) post/fabcut/cutting/jobs/:deviceId() → {Number}
Route for assigning a cutting job to a specific device from the leader tablet to the follower tablet
Parameters:
| Name |
Type |
Description |
req.body.markerUnique |
String
|
The unique google id of the marker |
req.body.location |
String
|
The location of the leader device |
req.body.layLength |
Number
|
The lay length assigned to this job |
req.params.deviceId |
String
|
The device id of the follower device |
req.body.jobDetails |
Array.<jobDetails>
|
The job details sent from the client module:routers/v8/fabcut/cutting/jobs~jobDetails |
Returns:
The unique job id
-
Type
-
Number
(static) post/fabcut/cutting/jobs/:jobId/barcodes/:barcode() → {Object}
The route to scan a barcode for a job in the follower UI
Parameters:
| Name |
Type |
Description |
req.params.barcode |
String
|
The barcode scanned by the follower |
req.params.jobId |
Number
|
The unique job id |
req.body.itemCode |
String
|
The item code under which the barcode is scanned |
Returns:
-
Type
-
Object
(static) put/fabcut/cutting/jobs/:jobId() → {Boolean}
The route to complete a job
Parameters:
| Name |
Type |
Description |
req.params.jobId |
Number
|
The unique job id |
Returns:
-
Type
-
Boolean
(static) put/fabcut/cutting/jobs/:jobId/barcodes/:barcode() → {Boolean}
The route to update the actual quantity for a scanned barcode in an assigned job
Parameters:
| Name |
Type |
Description |
req.params.barcode |
String
|
The barcode for assigned job |
req.params.jobId |
Number
|
The unique job id |
req.body.actualPlies |
Number
|
The actual number of plies entered by the user for the barcode |
Returns:
-
Type
-
Boolean
Type Definitions
barcodeDetails
Type:
Properties:
| Name |
Type |
Description |
barcodeDetails.length |
Number
|
The available roll length of the barcode |
barcodeDetails.plies |
Number
|
The number of plies available |
followerJobDetails
Type:
Properties:
| Name |
Type |
Description |
followerJobDetails.jobId |
Number
|
The unique job id for the job |
followerJobDetails.ocNumber |
String
|
The oc number of the job |
followerJobDetails.layLength |
Number
|
The lay length assigned to this ratio |
followerJobDetails.fitType |
String
|
The fit type of the job |
followerJobDetails.jobDetails |
Array.<Object>
|
The job details for the job
Properties
| Name |
Type |
Description |
itemDetails |
Object
|
The item code details object inside jobDetails
Properties
| Name |
Type |
Description |
itemCode |
String
|
The item code of the garment |
itemDesc |
String
|
The corresponding item description |
layNumber |
Number
|
The lay number |
ratioDetails |
Array.<Object>
|
The ratios and corresponding sizes
Properties
| Name |
Type |
Description |
size |
String
|
The size of the garment |
quantity |
Number
|
The quantity associated with this size |
ratio |
Number
|
The fraction of the quantity for this size |
|
|
|
jobDetails
Type:
Properties:
| Name |
Type |
Description |
jobDetails.itemCode |
String
|
The fabric item code |
jobDetails.itemDesc |
String
|
The fabric item description |
jobDetails.shade |
String
|
The fabric shade |
jobDetails.shrinkage |
String
|
The fabric shrinkage |
jobDetails.pattern |
String
|
The fabric shrinkage pattern |
jobDetails.ratioDetails |
Array.<Object>
|
The ratios and corresponding sizes
Properties
| Name |
Type |
Description |
size |
String
|
The size of the garment |
quantity |
Number
|
The quantity associated with this size |
ratio |
Number
|
The fraction of the quantity for this size |
|
todaysJobs
Type:
Properties:
| Name |
Type |
Description |
jobId |
Number
|
The unique job id |
tableNum |
Number
|
The table number of the associated job |
ocNo |
String
|
The OC number |
fitType |
String
|
The fit type |
itemDesc |
String
|
The item description of the cut item |
size |
String
|
The size of the cut garment |
quantity |
Number
|
The cut quanity |
ratio |
Number
|
The ratio of respective size |
lay |
Number
|
The lay number associated |