penambahan route protection

This commit is contained in:
aji@catalis.app
2025-06-13 19:36:53 +07:00
parent 9668e3ace3
commit 7be6168330
8 changed files with 365 additions and 223 deletions

View File

@@ -90,7 +90,6 @@
{ label: "Guest", value: "Guest" },
];
let currentUserId: string | null = null;
onMount(async () => {
@@ -226,8 +225,6 @@
: issue.approval
? "APPROVED"
: "REJECTED", // or map as needed
approved_by: issue.approved_by ?? null,
approved_date: issue.approved_date ? new Date(issue.approved_date) : null,
total_hours_work:
Math.abs(
new Date(issue.datetime_out).getTime() -
@@ -395,8 +392,8 @@
const approved_date = new Date().toISOString();
const { error } = await supabase
.from("vb_timesheet")
.update({
approval: status ,
.update({
approval: status,
approved_by,
approved_date,
})
@@ -721,7 +718,9 @@
>Select Villa</option
>
{#each dataVilla as villa}
<option value={villa.id}>{villa.villa_name}</option>
<option value={villa.id}
>{villa.villa_name}</option
>
{/each}
</select>
{#if $formErrors[col.key]}