add menu dining, transport and change table

This commit is contained in:
aji@catalis.app
2025-06-08 12:19:59 +07:00
parent 797958500c
commit f271341d4a
15 changed files with 209 additions and 100 deletions

View File

@@ -133,7 +133,7 @@
}
const { data: userData, error: userError } = await supabase
.from("users")
.from("vb_users")
.select("id, full_name");
if (userError) {
console.error("Error fetching users:", userError);
@@ -232,7 +232,7 @@
limit: number = 10,
) {
let query = supabase
.from("issues")
.from("vb_ssues")
.select("*", { count: "exact" })
.order(sort || "created_at", { ascending: order === "asc" })
.range(offset, offset + limit - 1);
@@ -353,7 +353,7 @@
if (isEditing && currentEditingId) {
const { error } = await supabase
.from("issues")
.from("vb_ssues")
.update(newIssue)
.eq("id", currentEditingId);
@@ -393,7 +393,7 @@
};
const { error } = await supabase
.from("issues")
.from("vb_ssues")
.insert([issueInsert]);
if (error) {
console.error("Error adding issue:", error);
@@ -414,7 +414,7 @@
async function deleteIssue(id: string) {
if (confirm("Are you sure you want to delete this issue?")) {
const { error } = await supabase
.from("issues")
.from("vb_ssues")
.delete()
.eq("id", id);
if (error) {
@@ -469,7 +469,7 @@
async function moveIssueToProject(issueId: string) {
// update move_issue field in the issue
const { error: updateError } = await supabase
.from("issues")
.from("vb_ssues")
.update({ move_issue: "PROJECT" })
.eq("id", issueId);
@@ -479,7 +479,7 @@
}
const { error } = await supabase
.from("projects")
.from("vb_projects")
.insert({ issue_id: issueId });
if (error) {
@@ -495,7 +495,7 @@
async function moveIssueToPurchaseOrder(issueId: string) {
// update move_issue field in the issue
const { error: updateError } = await supabase
.from("issues")
.from("vb_ssues")
.update({ move_issue: "PURCHASE_ORDER" })
.eq("id", issueId);
if (updateError) {
@@ -504,7 +504,7 @@
}
const { error } = await supabase
.from("purchase_orders")
.from("vb_purchase_orders")
.insert({ issue_id: issueId });
if (error) {