diff --git a/src/routes/backoffice/issue/+page.svelte b/src/routes/backoffice/issue/+page.svelte index 5369a3f..a6c4f75 100644 --- a/src/routes/backoffice/issue/+page.svelte +++ b/src/routes/backoffice/issue/+page.svelte @@ -152,7 +152,6 @@ { key: "move_issue", title: "Move Issue" }, { key: "issue_related_image", title: "Issue Related Image" }, { key: "url_drive", title: "URL Drive" }, - { key: "description_of_the_issue", title: "Description of The Issue" }, { key: "issue_source", title: "Issue Source" }, { key: "reported_name", title: "Reported By" }, { key: "inputed_name", title: "Input By" }, @@ -442,6 +441,8 @@ alert("Error updating issue: " + error.message); console.error("Error updating issue:", error); return; + } else { + alert("Issue updated successfully."); } } else { const issueInsert: issueInsert = { @@ -474,6 +475,8 @@ if (error) { console.error("Error adding issue:", error); return; + } else { + alert("Issue added successfully."); } } @@ -484,6 +487,7 @@ newIssue = {}; selectedFile = null; + imagePreviewUrl = null; } // function get public URL for image supabase async function getPublicUrl(path: string): Promise { @@ -682,6 +686,7 @@ "issue_type", "input_by", "area_of_villa", + "status", ]; requiredFields.forEach((field) => { @@ -726,7 +731,7 @@ // Fetch issues, PO items, and existing purchase orders on mount onMount(() => { - fetchIssues(null, null, "created_at", "desc", offset, limit); + fetchIssues(); fetchPoItems(); fetchExistingPurchaseOrders(); }); diff --git a/src/routes/backoffice/timesheets/+page.svelte b/src/routes/backoffice/timesheets/+page.svelte index 79e1501..aa3b756 100644 --- a/src/routes/backoffice/timesheets/+page.svelte +++ b/src/routes/backoffice/timesheets/+page.svelte @@ -387,7 +387,7 @@ approved_by: approver?.full_name ?? "Not Approved", approved_date: tsdata.approved_date, remarks: tsdata.remarks, - created_at: tsdata.created_at ? new Date(tsdata.created_at) : undefined, + // created_at: tsdata.created_at ? new Date(tsdata.created_at) : undefined, } as TimesheetDisplay; }); currentPage = 1;