Complete basic request dispatch flow
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-04-07 19:40:38 +02:00
parent 00cf0d9905
commit 9be7ae81ae
11 changed files with 264 additions and 163 deletions

View File

@ -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;

View File

@ -6,7 +6,7 @@ const Users: CollectionConfig = {
useAsTitle: 'email',
},
access: {
read: () => true
},
auth: {
tokenExpiration: 7200, // How many seconds to keep the user logged in