Manage your projects and tasks efficiently.
| {col.title} | {:else}{col.title} | {/if} {/each}||||
|---|---|---|---|---|---|
| {row[col.key]} | {:else if col.key === "actions"}{:else if col.key === "add_to_po"} | { const isChecked = ( e.target as HTMLInputElement ).checked; row.add_to_po = isChecked; if (isChecked) { // map to project const project: Project = { id: row.id, issue_id: row.issue_id, project_number: row.issue_number, add_to_po: isChecked, input_by: row.input_by, project_due_date: row.project_due_date, picture_link: row.picture_link, }; currentEditingId = row.id; await addToPo(project); } else { // uncheck const { data, error } = await supabase .from("vb_projects") .update({ add_to_po: false, }) .eq("id", row.id); if (error) { console.error( "Error updating project:", error, ); } } }} /> | {:else if col.key === "need_approval"}{#if row[col.key as keyof Projects]} ✅ {:else} ❌ {/if} | {:else if col.key === "picture_link"}{#if row.picture_link} {#await getPublicUrl(row.picture_link) then publicUrl} View Picture {:catch} Error loading image {/await} {:else} No Picture {/if} | {:else}{row[col.key as keyof Projects]} | {/if} {/each}