penamabahan assign to dan status pada issue
This commit is contained in:
@@ -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}
|
||||
</td>
|
||||
{:else if col.key === "status"}
|
||||
<td class="px-4 py-2">
|
||||
{#if row[col.key as keyof Issue]}
|
||||
<span class="text-green-600 font-semibold"
|
||||
>✅ RESOLVED</span
|
||||
>
|
||||
{:else}
|
||||
<span class="text-blue-600 font-semibold"
|
||||
>⏳ ONPROGRESS</span
|
||||
>
|
||||
{/if}
|
||||
</td>
|
||||
{:else if col.key === "issue_related_image"}
|
||||
<td class="px-4 py-2">
|
||||
{#if typeof row[col.key as keyof Issue] === "string" && row[col.key as keyof Issue]}
|
||||
@@ -1322,6 +1338,31 @@
|
||||
</label>
|
||||
|
||||
</div>
|
||||
{:else if col.key === "status"}
|
||||
<div class="space-y-1">
|
||||
<label class="block text-sm font-medium text-gray-700">
|
||||
Status
|
||||
<select
|
||||
name="status"
|
||||
class="w-full border px-3 py-2 rounded {errorClass(
|
||||
'status',
|
||||
)}"
|
||||
bind:value={newIssue[col.key as keyof Issue]}
|
||||
placeholder={col.title}
|
||||
>
|
||||
<option value="" disabled selected
|
||||
>Select Status</option
|
||||
>
|
||||
<option value="true">Done</option>
|
||||
<option value="false">On Progress</option>
|
||||
</select>
|
||||
{#if $formErrors.status}
|
||||
<p class="text-red-500 text-xs">
|
||||
{$formErrors.status}
|
||||
</p>
|
||||
{/if}
|
||||
</label>
|
||||
</div>
|
||||
{:else}
|
||||
<div class="space-y-1">
|
||||
<label class="block text-sm font-medium text-gray-700"
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
report_date: string;
|
||||
project_due_date: string;
|
||||
project_number?: string; // Optional, if not always present
|
||||
assigned_name?: string; // Optional, if not always present
|
||||
updated_at?: string; // Optional, if not always present
|
||||
updated_name?: string; // Optional, if not always present
|
||||
};
|
||||
@@ -65,6 +66,8 @@
|
||||
{ key: "report_date", title: "Report Date" },
|
||||
{ key: "project_due_date", title: "Project Due Date" },
|
||||
{ key: "need_approval", title: "Need Approval" },
|
||||
{ key: "assigned_name", title: "Assign To" },
|
||||
{ key: "created_at", title: "Created At" },
|
||||
{ key: "updated_at", title: "Updated At" },
|
||||
{ key: "updated_name", title: "Updated By" },
|
||||
{ key: "actions", title: "Actions" },
|
||||
|
||||
Reference in New Issue
Block a user