mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-08 00:45:41 +00:00
Merge pull request #281 from Tria-plc/freight/feature/vehicle_2
Freight/feature/vehicle 2
This commit is contained in:
@@ -45,7 +45,7 @@ export class FirstMileService {
|
|||||||
* unknown or the booking has not reached PAID status.
|
* unknown or the booking has not reached PAID status.
|
||||||
*/
|
*/
|
||||||
async acceptBooking(bookingReference: string): Promise<FirstMile | null> {
|
async acceptBooking(bookingReference: string): Promise<FirstMile | null> {
|
||||||
const booking = await this.bookingsRepository.findById(bookingReference);
|
const booking = await this.bookingsRepository.findByReference(bookingReference);
|
||||||
|
|
||||||
if (!booking) {
|
if (!booking) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -360,7 +360,7 @@ const FleetResourcePage = () => {
|
|||||||
{config.subtitle}
|
{config.subtitle}
|
||||||
</Text>
|
</Text>
|
||||||
</div>
|
</div>
|
||||||
<Button leftSection={<Plus size={16} />} onClick={() => {
|
<Button leftSection={<Plus size={16} />} styles={{ label: { fontWeight: 500 } }} onClick={() => {
|
||||||
setEditing(null);
|
setEditing(null);
|
||||||
setFormOpen(true);
|
setFormOpen(true);
|
||||||
}}>
|
}}>
|
||||||
@@ -391,7 +391,7 @@ const FleetResourcePage = () => {
|
|||||||
size="xs"
|
size="xs"
|
||||||
radius="md"
|
radius="md"
|
||||||
variant={filter.value === option.value ? "filled" : "outline"}
|
variant={filter.value === option.value ? "filled" : "outline"}
|
||||||
color="green"
|
styles={{ label: { fontWeight: 500 } }}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setListFilterValues((prev) => ({
|
setListFilterValues((prev) => ({
|
||||||
...prev,
|
...prev,
|
||||||
@@ -417,7 +417,7 @@ const FleetResourcePage = () => {
|
|||||||
size="xs"
|
size="xs"
|
||||||
radius="md"
|
radius="md"
|
||||||
variant={statusFilter === option.value ? "filled" : "outline"}
|
variant={statusFilter === option.value ? "filled" : "outline"}
|
||||||
color="green"
|
styles={{ label: { fontWeight: 500 } }}
|
||||||
onClick={() => setStatusFilter(option.value)}
|
onClick={() => setStatusFilter(option.value)}
|
||||||
>
|
>
|
||||||
{option.label}
|
{option.label}
|
||||||
|
|||||||
@@ -717,11 +717,11 @@ const FirstMilePage = () => {
|
|||||||
/>
|
/>
|
||||||
<Group gap="sm">
|
<Group gap="sm">
|
||||||
{selectedIds.length > 0 && (
|
{selectedIds.length > 0 && (
|
||||||
<Button variant="light" leftSection={<Truck size={16} />} onClick={openBulkAssign}>
|
<Button variant="light" leftSection={<Truck size={16} />} onClick={openBulkAssign} styles={{ label: { fontWeight: 500 } }}>
|
||||||
Assign vehicle ({selectedIds.length})
|
Assign vehicle ({selectedIds.length})
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
<Button leftSection={<Truck size={16} />} onClick={openAccept}>
|
<Button leftSection={<Truck size={16} />} onClick={openAccept} styles={{ label: { fontWeight: 500 } }}>
|
||||||
Assign Mile
|
Assign Mile
|
||||||
</Button>
|
</Button>
|
||||||
</Group>
|
</Group>
|
||||||
@@ -734,6 +734,7 @@ const FirstMilePage = () => {
|
|||||||
key={option.value}
|
key={option.value}
|
||||||
size="xs"
|
size="xs"
|
||||||
variant={active ? "filled" : "default"}
|
variant={active ? "filled" : "default"}
|
||||||
|
styles={{ label: { fontWeight: 500 } }}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setStatusFilter(option.value);
|
setStatusFilter(option.value);
|
||||||
setPagination((p) => ({ ...p, pageIndex: 0 }));
|
setPagination((p) => ({ ...p, pageIndex: 0 }));
|
||||||
|
|||||||
@@ -629,11 +629,11 @@ const LastMilePage = () => {
|
|||||||
/>
|
/>
|
||||||
<Group gap="sm">
|
<Group gap="sm">
|
||||||
{selectedIds.length > 0 && (
|
{selectedIds.length > 0 && (
|
||||||
<Button variant="light" leftSection={<Truck size={16} />} onClick={openBulkAssign}>
|
<Button variant="light" leftSection={<Truck size={16} />} onClick={openBulkAssign} styles={{ label: { fontWeight: 500 } }}>
|
||||||
Assign vehicle ({selectedIds.length})
|
Assign vehicle ({selectedIds.length})
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
<Button leftSection={<Truck size={16} />} onClick={() => openAssign(null)}>
|
<Button leftSection={<Truck size={16} />} onClick={() => openAssign(null)} styles={{ label: { fontWeight: 500 } }}>
|
||||||
Assign Mile
|
Assign Mile
|
||||||
</Button>
|
</Button>
|
||||||
</Group>
|
</Group>
|
||||||
@@ -646,6 +646,7 @@ const LastMilePage = () => {
|
|||||||
key={option.value}
|
key={option.value}
|
||||||
size="xs"
|
size="xs"
|
||||||
variant={active ? "filled" : "default"}
|
variant={active ? "filled" : "default"}
|
||||||
|
styles={{ label: { fontWeight: 500 } }}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setStatusFilter(option.value);
|
setStatusFilter(option.value);
|
||||||
setPagination((p) => ({ ...p, pageIndex: 0 }));
|
setPagination((p) => ({ ...p, pageIndex: 0 }));
|
||||||
|
|||||||
Reference in New Issue
Block a user