Add Project Files section and show company name for external users on project detail

This commit is contained in:
Krao Hasanee
2026-05-14 15:01:32 -04:00
parent eee0885811
commit c32f9d1366
24 changed files with 1729 additions and 771 deletions
@@ -0,0 +1,8 @@
-- Fix: items insert was blocked when invoice status = 'submitted' at creation time.
-- Allow insert on own invoices regardless of status (ownership check is sufficient).
drop policy if exists "Sub insert draft invoice items" on public.subcontractor_invoice_items;
create policy "Sub insert own invoice items" on public.subcontractor_invoice_items
for insert with check (
invoice_id in (select id from public.subcontractor_invoices where profile_id = auth.uid())
);