11 Commits

Author SHA1 Message Date
Krao Hasanee 283511bf3a Session 2026-05-28: profile page overhaul, nav fixes, dashboard activity links
- Fix nav links not working from profile page (useEffect infinite re-render via unstable profile object ref)
- Fix nav hover/active: gold icon highlight, no background change; active links non-clickable
- Fix hover layout shift: add border: 1px solid transparent to all interactive elements
- Header icon buttons (search, theme toggle) now highlight gold on hover
- Profile page: replace calendar with activity feed (60/40 grid), add stat cards (tasks completed, active projects, revision requests, submissions)
- Profile card: title field, icon rows for location/email/linkedin, member since + role bottom-right, edit button top-right
- Profile portrait: remove wrapper column, fix left-gap alignment
- Add profiles.title migration
- Dashboard recent activity: name → /profile/{id}, task → /requests/{id} (clickable links)
- Icon-only sidebar with gold active/hover state, pointer-events: none on active links
- layout.md updated with profile page geometry rules

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 15:32:46 -04:00
Krao Hasanee 565d2ed4bc Session 2026-05-20: UI fixes, invoice filtering, file browser, request approvals, sub invoice task scope
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 21:32:55 -04:00
Krao Hasanee c32f9d1366 Add Project Files section and show company name for external users on project detail 2026-05-14 15:01:32 -04:00
Krao Hasanee eee0885811 Fix file sharing load speed and move error; misc updates
- Remove recursive directory size calculations (single Seafile API call per list)
- Remove 'Used in this location' usage display
- Fix move using v2 per-type endpoints instead of broken batch endpoint
- Send entry type from frontend for correct move routing

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 14:20:38 -04:00
Krao Hasanee 3a1cde64e6 Fix client storage RLS + rollback task on upload failure
Storage policies for submissions read/insert and deliveries read were using
get_my_company_id() (single company) instead of has_company_access() — blocked
multi-company clients from uploading or viewing files.

NewRequest: delete task+submission if any file upload fails so no orphaned
records are left behind.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 11:41:10 -04:00
Krao Hasanee 543983c914 Fix task delete cascade, multi-company UI, and error handling
- RequestDetail: remove auto-project-delete when last task deleted
- MyCompany: support multiple companies with selector dropdown
- MyCompany: fetch members from both profiles and company_members
- ProjectDetail/MyProjectDetail/InvoiceDetail: check Supabase errors before updating state
- Migration: drop client project-delete RLS policy (no longer valid)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 11:29:27 -04:00
Krao Hasanee d6e49a4c67 Add Stripe fee tracking on paid invoices + backfill function
- Store stripe_fee on invoices when webhook receives checkout.session.completed
- Display Stripe fee and net received in InvoiceDetail when paid via Stripe
- Add backfill-stripe-fees edge function to populate fee on existing paid invoices
- Migration: add stripe_fee column to invoices table
- Includes all pending portal changes (brand book, sign survey, task/project/company updates, etc.)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 12:16:22 -04:00
Krao Hasanee 906a0041a4 Add team-only user creation, remove public signup
- Add + New User form on Companies page (name, email, password, company)
- Create-user Supabase edge function with role verification
- Remove public signup route and login page link

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 09:27:19 -04:00
Krao Hasanee 585cb154ba Amended request creates new submission entry with 'Amended Request' label
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 00:09:23 -04:00
Krao Hasanee e7174d392c Replace company email with address field
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 23:59:21 -04:00
Krao Hasanee 719209fa25 Refactor: clients → companies schema v2 2026-03-26 23:42:06 -04:00