Compare commits

...

2 Commits

Author SHA1 Message Date
Aadil Ayub ac387d41ad add courier fields (#10)
continuous-integration/drone/push Build is passing Details
2024-02-25 19:52:11 +05:00
Aadil Ayub 2654b4a9c4 add type of transporrt to dispatch 2024-02-25 19:41:00 +05:00
2 changed files with 52 additions and 4 deletions

View File

@ -10,10 +10,35 @@ const Couriers: CollectionConfig = {
},
fields: [
{
name: 'name', // required
type: 'text', // required
required: true,
},
name: 'name',
type: 'text',
required: true,
},
{
name: 'startingPoint',
label: 'Traveling from',
type: 'text', // TODO use geopicker here
},
{
name: 'destination',
label: 'Traveling to',
type: 'text' // TODO user geopicker here
},
{
name: 'departureDate',
label: 'Departure date',
type: 'date'
},
{
name: 'arrivalDate',
label: 'Arrival date',
type: 'date'
},
{
name: 'weightAllowance',
label: 'Weight Allowance (KG)',
type: 'number'
}
],
};

View File

@ -32,6 +32,29 @@ const Dispatches: CollectionConfig = {
relationTo: 'retailers',
hasMany: false,
},
{
name: 'typeOfTransportation',
type: 'select',
hasMany: true,
options: [
{
label: 'Air',
value: 'air'
},
{
label: 'Car',
value: 'car'
},
{
label: 'Train',
value: 'train'
},
{
label: 'Boat',
value: 'boat'
}
]
},
{
name: 'courier',
type: 'relationship',