add webhook
This commit is contained in:
@@ -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 @@
|
||||
}}
|
||||
>
|
||||
<option value="">Filter by Priority</option>
|
||||
<option value="High">Critical</option>
|
||||
<option value="High">High</option>
|
||||
<option value="Medium">Medium</option>
|
||||
<option value="Low">Low</option>
|
||||
@@ -484,12 +479,6 @@
|
||||
>
|
||||
🔄 Reset
|
||||
</button>
|
||||
<button
|
||||
class="bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700 text-sm"
|
||||
on:click={() => openModal()}
|
||||
>
|
||||
➕ Add Project
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overflow-x-auto rounded-lg shadow mb-4">
|
||||
@@ -497,7 +486,7 @@
|
||||
<thead class="bg-gray-100">
|
||||
<tr>
|
||||
{#each columns as col}
|
||||
{#if col.key === "name"}
|
||||
{#if col.key === "description_of_the_issue"}
|
||||
<th
|
||||
class="sticky left-0 px-4 py-3 text-left font-semibold text-gray-700 uppercase tracking-wider whitespace-nowrap"
|
||||
style="background-color: #f0f8ff; z-index: 10;"
|
||||
@@ -518,7 +507,7 @@
|
||||
{#each paginatedRows as row}
|
||||
<tr class="hover:bg-gray-50 transition">
|
||||
{#each columns as col}
|
||||
{#if col.key === "name"}
|
||||
{#if col.key === "description_of_the_issue"}
|
||||
<td
|
||||
class="sticky left-0 px-4 py-2 font-medium text-blue-600"
|
||||
style="background-color: #f0f8ff; cursor: pointer;"
|
||||
@@ -802,7 +791,7 @@
|
||||
>
|
||||
<option value="" disabled selected>Select Issue</option>
|
||||
{#each dataIssueIds as issueId}
|
||||
<option value={issueId.id}>{issueId.name}</option>
|
||||
<option value={issueId.id}>{issueId.description_of_the_issue}</option>
|
||||
{/each}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user