perbaikan validate status pada issue

This commit is contained in:
Aji Setiaji
2025-07-09 10:11:46 +14:00
parent 34a72c7f71
commit 32bdc943c8
2 changed files with 8 additions and 3 deletions

View File

@@ -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<string> {
@@ -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();
});

View File

@@ -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;