diff --git a/src/routes/backoffice/issue/+page.svelte b/src/routes/backoffice/issue/+page.svelte index c9146e8..f6927dc 100644 --- a/src/routes/backoffice/issue/+page.svelte +++ b/src/routes/backoffice/issue/+page.svelte @@ -157,6 +157,7 @@ { key: "guest_communication", title: "Guest Communication" }, { key: "resolution", title: "Resolved How?" }, { key: "need_approval", title: "Need Approval" }, + { key: "status", title: "Status" }, { key: "created_at", title: "Created At" }, { key: "updated_name", title: "Updated By" }, { key: "updated_at", title: "Updated At" }, @@ -227,6 +228,7 @@ guest_communication: string; resolution: string; need_approval: boolean; + status: boolean; created_at: string; updated_by?: string; updated_at?: string; @@ -245,6 +247,7 @@ guest_communication: string; resolution: string; need_approval: boolean; + status?: boolean; // default to false if not set }; type POItem = { item_name: string; @@ -457,6 +460,7 @@ ) as string, resolution: formData.get("resolution") as string, need_approval: newIssue.need_approval, + status: newIssue.status ?? false, // default to false if not set }; const { error } = await supabase @@ -909,6 +913,18 @@ ❌ {/if} + {:else if col.key === "status"} + + {#if row[col.key as keyof Issue]} + ✅ RESOLVED + {:else} + ⏳ ONPROGRESS + {/if} + {:else if col.key === "issue_related_image"} {#if typeof row[col.key as keyof Issue] === "string" && row[col.key as keyof Issue]} @@ -1322,6 +1338,31 @@ + {:else if col.key === "status"} +
+ +
{:else}