diff --git a/src/routes/backoffice/project/+page.svelte b/src/routes/backoffice/project/+page.svelte index e28e0be..f3070e2 100644 --- a/src/routes/backoffice/project/+page.svelte +++ b/src/routes/backoffice/project/+page.svelte @@ -24,7 +24,6 @@ type Projects = { id: string; - name: string; priority: string; add_to_po: boolean; description_of_the_issue: string; @@ -49,10 +48,10 @@ }; const columns: columns[] = [ - { key: "name", title: "Project Name" }, + { key: "description_of_the_issue", title: "Issue Description" }, + { key: "project_number", title: "Project Number" }, { key: "priority", title: "Priority" }, { key: "add_to_po", title: "Add to PO" }, - { key: "description_of_the_issue", title: "Description" }, { key: "picture_link", title: "Picture Link" }, { key: "need_approval", title: "Need Approval" }, { key: "area_of_villa", title: "Area of Villa" }, @@ -61,7 +60,6 @@ { key: "villa_name", title: "Villa Name" }, { key: "report_date", title: "Report Date" }, { key: "project_due_date", title: "Project Due Date" }, - { key: "project_number", title: "Project Number" }, { key: "updated_at", title: "Updated At" }, { key: "updated_name", title: "Updated By" }, { key: "actions", title: "Actions" }, @@ -109,7 +107,7 @@ } // Apply search term if provided if (searchTerm) { - query = query.ilike("issue_name", `%${searchTerm}%`); + query = query.ilike("description_of_the_issue", `%${searchTerm}%`); } // Fetch projects @@ -143,12 +141,9 @@ return { ...project, id: project.id, - name: issue ? issue.name : "Unknown", + description_of_the_issue: issue ? issue.description_of_the_issue : "Unknown", priority: issue ? issue.priority : "Unknown", add_to_po: project.add_to_po, - description_of_the_issue: issue - ? issue.description_of_the_issue - : "No description", picture_link: project.picture_link, need_approval: issue ? issue.need_approval : false, area_of_villa: issue ? issue.area_of_villa : "Unknown", @@ -185,7 +180,6 @@ "issue_id", "number_project", "input_by", - "name", "priority", "description_of_the_issue", "need_approval", @@ -256,7 +250,7 @@ async function fetchIssueIds() { const { data, error } = await supabase .from("vb_issues") - .select("id, name") + .select("id, description_of_the_issue") .order("id", { ascending: false }); if (error) { @@ -266,7 +260,7 @@ dataIssueIds = data.map((issue) => ({ id: issue.id, - name: issue.name, + description_of_the_issue: issue.description_of_the_issue, })); } @@ -473,6 +467,7 @@ }} > + @@ -484,12 +479,6 @@ > 🔄 Reset -