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:
@ -7,7 +7,9 @@ const Dispatches: CollectionConfig = {
|
||||
},
|
||||
access: {
|
||||
read: () => true,
|
||||
create: () => true
|
||||
},
|
||||
|
||||
fields: [
|
||||
{
|
||||
name: 'code',
|
||||
@ -27,7 +29,7 @@ const Dispatches: CollectionConfig = {
|
||||
{
|
||||
name: 'courier',
|
||||
type: 'relationship',
|
||||
relationTo: 'couriers',
|
||||
relationTo: 'users',
|
||||
hasMany: false,
|
||||
required: false
|
||||
},
|
||||
@ -64,28 +66,24 @@ const Dispatches: CollectionConfig = {
|
||||
value: 'archived',
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'departure',
|
||||
type: 'date',
|
||||
required: false,
|
||||
},
|
||||
{
|
||||
name: 'arrival',
|
||||
type: 'date',
|
||||
required: false,
|
||||
},
|
||||
{
|
||||
name: 'timeSensitive',
|
||||
type: 'checkbox',
|
||||
required: false,
|
||||
defaultValue: false
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default Dispatches;
|
||||
|
||||
// type Dispatch = {
|
||||
// id: string;
|
||||
// dispatchesCode: string; //Human readable id
|
||||
// createdAt: string;
|
||||
// updatedAt: string;
|
||||
|
||||
// maker: Maker;
|
||||
// retailer: Retailer;
|
||||
// products: Product[];
|
||||
|
||||
// courier: User;
|
||||
|
||||
// timeSensitive: boolean;
|
||||
// status: DispatchStatus[];
|
||||
|
||||
// departureDate: string;
|
||||
// arrivalDate: string;
|
||||
// weightAllowance: number;
|
||||
// }
|
||||
export default Dispatches;
|
@ -6,7 +6,7 @@ const Users: CollectionConfig = {
|
||||
useAsTitle: 'email',
|
||||
},
|
||||
access: {
|
||||
|
||||
read: () => true
|
||||
},
|
||||
auth: {
|
||||
tokenExpiration: 7200, // How many seconds to keep the user logged in
|
||||
|
Reference in New Issue
Block a user