Complete basic request dispatch flow
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -44,6 +44,7 @@ export interface Maker extends Node {
|
||||
stock: Product[];
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
admins: User[];
|
||||
};
|
||||
|
||||
export interface Retailer extends Node {
|
||||
@ -53,16 +54,17 @@ export interface Retailer extends Node {
|
||||
stock: Product[];
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
admins: User[];
|
||||
};
|
||||
|
||||
const DISPATCH_STATUS = ['requested', 'accepted', 'archived'] as const;
|
||||
export type DispatchStatus = typeof DISPATCH_STATUS[number];
|
||||
|
||||
export interface Dispatch {
|
||||
id: string;
|
||||
dispatchesCode?: string; //Human readable id
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
id?: string;
|
||||
code?: string; //Human readable id
|
||||
createdAt?: string;
|
||||
updatedAt?: string;
|
||||
|
||||
maker: Maker;
|
||||
retailer: Retailer;
|
||||
@ -73,8 +75,19 @@ export interface Dispatch {
|
||||
timeSensitive: boolean;
|
||||
status: DispatchStatus;
|
||||
|
||||
departureDate: string;
|
||||
arrivalDate: string;
|
||||
weightAllowance: number;
|
||||
departureDate?: string;
|
||||
arrivalDate?: string;
|
||||
}
|
||||
|
||||
export interface CreateDispatch {
|
||||
code?: string; //Human readable id
|
||||
|
||||
maker: Maker | string;
|
||||
retailer: Retailer | string;
|
||||
products: Product[] | string[] ;
|
||||
|
||||
courier?: User;
|
||||
|
||||
timeSensitive: boolean;
|
||||
status: DispatchStatus;
|
||||
}
|
||||
|
Reference in New Issue
Block a user