perbaikan validate status pada issue
This commit is contained in:
@@ -152,7 +152,6 @@
|
|||||||
{ key: "move_issue", title: "Move Issue" },
|
{ key: "move_issue", title: "Move Issue" },
|
||||||
{ key: "issue_related_image", title: "Issue Related Image" },
|
{ key: "issue_related_image", title: "Issue Related Image" },
|
||||||
{ key: "url_drive", title: "URL Drive" },
|
{ key: "url_drive", title: "URL Drive" },
|
||||||
{ key: "description_of_the_issue", title: "Description of The Issue" },
|
|
||||||
{ key: "issue_source", title: "Issue Source" },
|
{ key: "issue_source", title: "Issue Source" },
|
||||||
{ key: "reported_name", title: "Reported By" },
|
{ key: "reported_name", title: "Reported By" },
|
||||||
{ key: "inputed_name", title: "Input By" },
|
{ key: "inputed_name", title: "Input By" },
|
||||||
@@ -442,6 +441,8 @@
|
|||||||
alert("Error updating issue: " + error.message);
|
alert("Error updating issue: " + error.message);
|
||||||
console.error("Error updating issue:", error);
|
console.error("Error updating issue:", error);
|
||||||
return;
|
return;
|
||||||
|
} else {
|
||||||
|
alert("Issue updated successfully.");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const issueInsert: issueInsert = {
|
const issueInsert: issueInsert = {
|
||||||
@@ -474,6 +475,8 @@
|
|||||||
if (error) {
|
if (error) {
|
||||||
console.error("Error adding issue:", error);
|
console.error("Error adding issue:", error);
|
||||||
return;
|
return;
|
||||||
|
} else {
|
||||||
|
alert("Issue added successfully.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -484,6 +487,7 @@
|
|||||||
newIssue = {};
|
newIssue = {};
|
||||||
|
|
||||||
selectedFile = null;
|
selectedFile = null;
|
||||||
|
imagePreviewUrl = null;
|
||||||
}
|
}
|
||||||
// function get public URL for image supabase
|
// function get public URL for image supabase
|
||||||
async function getPublicUrl(path: string): Promise<string> {
|
async function getPublicUrl(path: string): Promise<string> {
|
||||||
@@ -682,6 +686,7 @@
|
|||||||
"issue_type",
|
"issue_type",
|
||||||
"input_by",
|
"input_by",
|
||||||
"area_of_villa",
|
"area_of_villa",
|
||||||
|
"status",
|
||||||
];
|
];
|
||||||
|
|
||||||
requiredFields.forEach((field) => {
|
requiredFields.forEach((field) => {
|
||||||
@@ -726,7 +731,7 @@
|
|||||||
|
|
||||||
// Fetch issues, PO items, and existing purchase orders on mount
|
// Fetch issues, PO items, and existing purchase orders on mount
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
fetchIssues(null, null, "created_at", "desc", offset, limit);
|
fetchIssues();
|
||||||
fetchPoItems();
|
fetchPoItems();
|
||||||
fetchExistingPurchaseOrders();
|
fetchExistingPurchaseOrders();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -387,7 +387,7 @@
|
|||||||
approved_by: approver?.full_name ?? "Not Approved",
|
approved_by: approver?.full_name ?? "Not Approved",
|
||||||
approved_date: tsdata.approved_date,
|
approved_date: tsdata.approved_date,
|
||||||
remarks: tsdata.remarks,
|
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;
|
} as TimesheetDisplay;
|
||||||
});
|
});
|
||||||
currentPage = 1;
|
currentPage = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user