Season/Drivers: Add "Switch Team" button
All checks were successful
Build Formula11 Docker Image / pocketbase-docker (push) Successful in 48s
All checks were successful
Build Formula11 Docker Image / pocketbase-docker (push) Successful in 48s
This commit is contained in:
@ -24,6 +24,17 @@
|
|||||||
|
|
||||||
modalStore.trigger(modalSettings);
|
modalStore.trigger(modalSettings);
|
||||||
};
|
};
|
||||||
|
const teamswitch_handler = async (event: Event, id?: string) => {
|
||||||
|
const modalSettings: ModalSettings = {
|
||||||
|
type: "component",
|
||||||
|
component: "teamSwitchCard",
|
||||||
|
meta: {
|
||||||
|
data,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
modalStore.trigger(modalSettings);
|
||||||
|
};
|
||||||
|
|
||||||
const drivers_columns: TableColumn[] = $derived([
|
const drivers_columns: TableColumn[] = $derived([
|
||||||
{
|
{
|
||||||
@ -55,10 +66,13 @@
|
|||||||
<title>Formula 11 - Drivers</title>
|
<title>Formula 11 - Drivers</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<div class="pb-2">
|
<div class="flex gap-2 pb-2">
|
||||||
<Button width="w-full" color="tertiary" onclick={driver_handler} shadow>
|
<Button width="w-full" color="tertiary" onclick={driver_handler} shadow>
|
||||||
<span class="font-bold">Create New Driver</span>
|
<span class="font-bold">Create New Driver</span>
|
||||||
</Button>
|
</Button>
|
||||||
|
<Button width="w-full" color="secondary" onclick={teamswitch_handler} shadow>
|
||||||
|
<span class="font-bold">Switch Driver Team</span>
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
{#await data.drivers then drivers}
|
{#await data.drivers then drivers}
|
||||||
<Table
|
<Table
|
||||||
|
Reference in New Issue
Block a user