Compare commits
2 Commits
1fd63a8057
...
6cf22ef97e
| Author | SHA1 | Date | |
|---|---|---|---|
| 6cf22ef97e | |||
| af372326af |
@ -164,18 +164,32 @@
|
||||
|
||||
<!-- Save/Delete buttons -->
|
||||
<div class="flex justify-end gap-2">
|
||||
<Button onclick={clear_sprint} color="secondary" disabled={disable_inputs}
|
||||
>Remove Sprint</Button
|
||||
>
|
||||
<Button onclick={clear_sprint} color="secondary" disabled={disable_inputs} width="w-1/3">
|
||||
Remove Sprint
|
||||
</Button>
|
||||
{#if race}
|
||||
<Button formaction="?/update_race" color="secondary" disabled={disable_inputs} submit
|
||||
>Save Changes</Button
|
||||
<Button
|
||||
formaction="?/update_race"
|
||||
color="secondary"
|
||||
disabled={disable_inputs}
|
||||
submit
|
||||
width="w-1/3"
|
||||
>
|
||||
<Button color="primary" submit disabled={disable_inputs} formaction="?/delete_race"
|
||||
>Delete</Button
|
||||
Save Changes
|
||||
</Button>
|
||||
<Button
|
||||
color="primary"
|
||||
submit
|
||||
disabled={disable_inputs}
|
||||
formaction="?/delete_race"
|
||||
width="w-1/3"
|
||||
>
|
||||
Delete
|
||||
</Button>
|
||||
{:else}
|
||||
<Button formaction="?/create_race" color="tertiary" submit>Create Race</Button>
|
||||
<Button formaction="?/create_race" color="tertiary" submit width="w-1/2"
|
||||
>Create Race</Button
|
||||
>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -146,6 +146,7 @@
|
||||
color="secondary"
|
||||
disabled={disable_inputs}
|
||||
submit
|
||||
width="w-1/2"
|
||||
>
|
||||
Save Changes
|
||||
</Button>
|
||||
@ -154,11 +155,12 @@
|
||||
submit
|
||||
disabled={disable_inputs}
|
||||
formaction="?/delete_substitution"
|
||||
width="w-1/2"
|
||||
>
|
||||
Delete
|
||||
</Button>
|
||||
{:else}
|
||||
<Button formaction="?/create_substitution" color="tertiary" submit>
|
||||
<Button formaction="?/create_substitution" color="tertiary" submit width="w-full">
|
||||
Create Substitution
|
||||
</Button>
|
||||
{/if}
|
||||
|
||||
@ -150,9 +150,7 @@
|
||||
data_value_name: "active",
|
||||
label: "Active",
|
||||
valuefun: (value: boolean): string =>
|
||||
value
|
||||
? "<span class='badge variant-filled-tertiary text-center' style='width: 36px;'>Yes</span>"
|
||||
: "<span class='badge variant-filled-primary text-center' style='width: 36px;'>No</span>",
|
||||
`<span class='badge variant-filled-${value ? "tertiary" : "primary"} text-center' style='width: 36px;'>${value ? "Yes" : "No"}</span>`,
|
||||
},
|
||||
];
|
||||
|
||||
@ -176,8 +174,13 @@
|
||||
};
|
||||
|
||||
const races_columns: TableColumn[] = [
|
||||
{
|
||||
data_value_name: "name",
|
||||
label: "Name",
|
||||
valuefun: (value: string): string =>
|
||||
`<span class='badge variant-filled-surface'>${value}</span>`,
|
||||
},
|
||||
{ data_value_name: "step", label: "Step" },
|
||||
{ data_value_name: "name", label: "Name" },
|
||||
// TODO: Date formatting
|
||||
{ data_value_name: "sprintqualidate", label: "Sprint Quali" },
|
||||
{ data_value_name: "sprintdate", label: "Sprint Race" },
|
||||
|
||||
Reference in New Issue
Block a user