changes on the orders page regarding the selection options
This commit is contained in:
@@ -344,7 +344,7 @@ export default function Orders() {
|
|||||||
placeholder="Search by order number, address or note"
|
placeholder="Search by order number, address or note"
|
||||||
className="w-full sm:w-72"
|
className="w-full sm:w-72"
|
||||||
/>
|
/>
|
||||||
{selectedIds.length > 0 && tab !== 'cancelled' && (
|
{selectedIds.length > 0 && tab === 'pending' && (
|
||||||
<Button variant="outline" onClick={() => setCancelOpen(true)}>
|
<Button variant="outline" onClick={() => setCancelOpen(true)}>
|
||||||
<Ban className="mr-1.5 h-4 w-4" /> Cancel {selectedIds.length}
|
<Ban className="mr-1.5 h-4 w-4" /> Cancel {selectedIds.length}
|
||||||
</Button>
|
</Button>
|
||||||
@@ -381,8 +381,8 @@ export default function Orders() {
|
|||||||
getRowId={(row) => row.bookingid}
|
getRowId={(row) => row.bookingid}
|
||||||
loading={isLoading}
|
loading={isLoading}
|
||||||
refreshing={isFetching && !isLoading}
|
refreshing={isFetching && !isLoading}
|
||||||
selectedIds={selectedIds}
|
selectedIds={tab === 'pending' ? selectedIds : undefined}
|
||||||
onSelectionChange={setSelectedIds}
|
onSelectionChange={tab === 'pending' ? setSelectedIds : undefined}
|
||||||
pageSize={25}
|
pageSize={25}
|
||||||
/* No defaultSort: `sortedBookings` above already orders these newest
|
/* No defaultSort: `sortedBookings` above already orders these newest
|
||||||
first by `bookingid`, and DataTable leaves rows untouched when it
|
first by `bookingid`, and DataTable leaves rows untouched when it
|
||||||
|
|||||||
Reference in New Issue
Block a user