Commit Graph

92 Commits

Author SHA1 Message Date
Krao Hasanee e912f82520 feat: review popup drag-drop attachments, .md styling 2026-06-02 14:33:50 -04:00
Krao Hasanee 894ec323f2 fix: use type=initial for all submissions, single unified type 2026-06-02 14:30:53 -04:00
Krao Hasanee 585fc7500c fix: Submissions tab includes legacy initial-type submissions 2026-06-02 14:29:37 -04:00
Krao Hasanee d222d8b573 feat: review popup notes+attachments, Submissions tab 2026-06-02 14:28:59 -04:00
Krao Hasanee 0d4b1f8096 feat: place-in-review attachment popup, remove-from-review button 2026-06-02 14:25:32 -04:00
Krao Hasanee ae093a9b1c fix: proxy file uploads server-side via action=upload, fixes CORS for all roles 2026-06-02 14:19:59 -04:00
Krao Hasanee e11ef45140 fix: FileBrowser upload uses auth query param, no CORS preflight for external users 2026-06-02 14:12:24 -04:00
Krao Hasanee 770bb1c05b fix: upload source=srv, expense detail popup, invoice/expense filters, pie charts, date timezone fixes 2026-06-02 14:08:11 -04:00
Krao Hasanee 1f09ce0a1d feat: expense year filter, newest-first default sort for expenses + invoices 2026-06-02 12:13:10 -04:00
Krao Hasanee 490e4f4bbf fix: stat cards use comma-formatted numbers 2026-06-02 11:11:08 -04:00
Krao Hasanee 4fce77abb9 fix: net profit deducts stripe fees from chart calculation 2026-06-02 10:49:11 -04:00
Krao Hasanee 573c4a69fa fix: expense date timezone, receipt popup blocker 2026-06-02 10:47:58 -04:00
Krao Hasanee 30838e8da3 fix: stat cards show full dollar amounts under $100k, k-suffix only at $100k+ 2026-06-02 10:41:05 -04:00
Krao Hasanee 958f451836 fix: client file sharing access denied + task/project default tabs
- FileSharing: rootPath for clients strips /Clients/ prefix — API resolveClientPath expects /{company} not /Clients/{company}
- Tasks: default to To Do tab (not_started) instead of All Tasks
- Projects: default to Active tab instead of All Projects

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-01 20:35:13 -04:00
Krao Hasanee 986d831186 feat: finance page overhaul — pie charts, month nav, tab improvements
- Overview tab: 3 donut pie charts (expenses by category, sub payments, invoiced) each with independent month navigation arrows
- Expenses tab: big red total in category sidebar, left-aligned category column, white text
- Subcontractors tab: big gold total in sidebar, pending/paid breakdown with gold highlight
- Invoices tab: big green total in companies sidebar, dashboard-inline-link for invoice# and company, StatusBadge with Invoiced/Paid labels, column widths tuned
- StatusBadge: add optional label prop for custom display text
- Layout/style polish across tabs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-01 20:14:14 -04:00
Krao Hasanee ac3f08122d feat: finance page overhaul, file access fix for clients and subcontractors
- Finance (TeamInvoices): chart + stat cards, Overview/Expenses/Subcontractors/Invoices/Legacy tabs
- Expenses tab: 70/30 card split with expense list + category breakdown, + Expense button
- Overview tab: 3 cards dynamic height filling window, .md-compliant table headers and sticky heads
- TaskDetail FileBrowser: role-based virtual paths so clients and subcontractors no longer get 403

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-01 10:48:40 -04:00
Krao Hasanee 70ad8d0cef feat: project detail overhaul, realtime updates, avatar RLS fix
- ProjectDetail: full redesign — icon meta row, completion progress bar, main contact card, activity feed, subcontractor management modal with multi-select
- ProjectDetail: task table matches Tasks.jsx (R#, assigned avatar, priority, type, deadline, status) with status tabs + counts
- Realtime: useRefetchOnFocus + useRealtimeSubscription hooks wired to Tasks, TaskDetail, ProjectDetail, TeamDashboard
- AuthContext: live profile updates via Supabase realtime channel
- Tasks/ProjectDetail: assignee avatar join added for all roles (client, external, team)
- RLS: allow all authenticated users to read profiles (fixes avatar display across roles)
- RequestForm: lockedFields prop for pre-filled read-only company/project fields

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 16:55:58 -04:00
Krao Hasanee 35d92d2176 fix: allow service role auth on migrate-old-books endpoint 2026-05-31 11:19:43 -04:00
Krao Hasanee ab7a6b5a57 fix: migrate Old Book → Old Books via Vercel API endpoint
- api/migrate-old-books.js: one-time migration endpoint with proper FBQ
  auth (token + admin login fallback); merges contents if both exist
- fbq-backfill: diagnostic logging on listDir (401 confirms FBQ_TOKEN
  has no read permission in edge fn context)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 11:17:47 -04:00
Krao Hasanee 94d9c3904b fix: standardize Old Book → Old Books folder name
- filebrowserFolders.js: createTaskFolder now creates Old Books
- fbq-backfill: creates Old Books; migrateOldBook() merges/renames
  existing Old Book folders into Old Books on each backfill run

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 11:07:59 -04:00
Krao Hasanee 5b3060e190 Session 2026-05-31: tasks table overhaul, FileBrowser redesign, folder path fix
- Tasks table: added R#, Assigned To (avatar), Priority (HOT/NO) columns; removed Status column; sortable columns; adjustable widths
- FileBrowser: full visual rewrite to match FileSharing page (table layout, colored ext badges, SVG folder icon, sortable columns, multi-select, context menu, drag-drop)
- TaskDetail folder tab: fix path with safeName(), rootPath set to project folder level
- filebrowserFolders: export safeName for reuse

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 11:02:40 -04:00
Krao Hasanee 0b4705311b Session 2026-05-30: task detail page overhaul
- New TaskDetail replaces /tasks/:id (was v2 at /requests/:id/v2)
- Overview tab: R00 request info, Requested By/Date/Sign Count inline row, Notes, Sign Family, files, amendments
- Revisions tab: R01+ from submissions, newest first, same layout as overview, per-entry Amend button
- Comments tab: single-line input, post on Enter, delete own comments, Supabase task_comments table
- Folder tab: placeholder for file sharing
- Tab badges showing revision/comment counts
- Amend Request modal: drag-drop file zone, popupOverlayStyle/Surface, Save+Cancel buttons
- Request Revision modal for clients on approved/invoiced/paid tasks
- JSZip download-all with progress popup for submission files
- Upload progress popup for Add Task and amend file uploads
- FileAttachment drop zone: 8px radius, transparent bg, label style fix (no all-caps override)
- PageLoader on task detail load
- task_comments migration with RLS policies

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 22:44:57 -04:00
Krao Hasanee 13ef1f4ded Session 2026-05-30: tasks/projects unification, code consolidation, file renames
- Unified Tasks page: 3 role render blocks → 1, normalized row shape, single renderRow/sort/tabs
- Fixed role scoping: external = all tasks in member projects, client = all tasks in company projects
- Fixed client bug: was scoped by submitted_by, now company→project→tasks
- Aligned dashboard client scope to match tasks page
- Hot tasks dashboard: now filters to active statuses only (not completed/invoiced/paid)
- Removed Projects.jsx (dead), fixed /project/ → /projects/ links
- Renamed all page files to match folder path (Team*, External*, Client* prefixes)
- Renamed: RequestsPage→Tasks, Settings→Profile, CompaniesPage→Companies, ProjectDetailPage→ProjectDetail
- Dropped dead fetches from Tasks page (invoices, invoice_items, subcontractor_invoice_items)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 10:19:23 -04:00
Krao Hasanee 6fe7ab1059 Session 2026-05-29: tasks page redesign, projects sidebar, invoicing fix
- Tasks page: tabs (All/To Do/In Progress/In Review/Completed) in header, removed grid view, 70/30 split with projects card
- Projects card: sortable table, dynamic height fills viewport
- Removed Projects page and nav links; redirects → /tasks
- Invoice dedup: prevent double-charge when multiple submissions per revision version
- Dashboard table style applied to tasks table (10px headers, 5px cell padding, transparent cells)
- stat cards: removed "Tasks" header, moved Total Tasks to far right

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29 22:40:10 -04:00
Krao Hasanee 8d0a461e7a Session 2026-05-29: shared dashboard, team tasks page, requests card style, copy/paste files, loading modals, avatar cache bust
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29 15:23:20 -04:00
Krao Hasanee c9998d4a8d Session 2026-05-29: profile layout 2-col, file browser copy/paste, fbq-proxy/backfill fns, migrations, UI updates
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29 13:49:21 -04:00
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 ff159c5937 Move multi-role pages out of team/ to pages/ root
CompanyDetail (team+client), BrandBook, SurveyMaker, Converters (team+external)
all serve more than one role — belong at pages/ not pages/team/

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 22:14:49 -04:00
Krao Hasanee 66baa2869e Move FileSharing from team/ to pages/ — serves all 3 roles
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 22:13:11 -04:00
Krao Hasanee b9a4c4a353 Merge all role-dispatcher pages into single files; add FileBrowser with file-type icons
- DashboardPage, Projects, RequestsPage, ProjectDetailPage, RequestDetail: each now handles team/external/client in one file via role flags — removed 10 old role-specific sub-files
- Layout: client Company nav link goes directly to /company/:id when user has a single company
- FileBrowser: replace emoji icons with colored extension-text badges (square); folder icon stays 📁; Adobe/Figma/design-tool colors for design files
- CompaniesPage: merged team Companies + client company routing (single-company redirect, multi-company list)
- FileSharing: integrated FileBrowser component
- Removed: seafile API + lib, old ServerStatus, TaskDetail, role-split page files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 22:11:34 -04:00
Krao Hasanee f9e66dfced Rename Jobs to Tasks, add Project Files section header on project detail 2026-05-14 19:46:17 -04:00
Krao Hasanee 6e7e7d7130 Include paid sub invoices in expenses/profit/year totals 2026-05-14 19:40:50 -04:00
Krao Hasanee 6b5f5df547 Add sub invoice detail page with delete/mark paid/receipt; fix payable stat 2026-05-14 19:35:44 -04:00
Krao Hasanee 13bb0f7914 Apply pill shape (border-radius 20px) to all buttons and sidebar nav items 2026-05-14 15:48:23 -04:00
Krao Hasanee 53b591697a Apply pill tab style across all portal pages (team, client, external) 2026-05-14 15:26:48 -04:00
Krao Hasanee 4980ebb09a Add client filter tabs to team Projects page 2026-05-14 15:23:39 -04:00
Krao Hasanee b2f165a8f1 Add Projects page for team members with search, nav under Requests 2026-05-14 15:21:25 -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 c9e7816e28 Fix Create Folder button not submitting form
LoadingButton defaults to type='button'. Added type='submit'.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 13:12:28 -04:00
Krao Hasanee dd7bfd2338 Fix 'column task.deadline does not exist' on subcontractor requests
deadline is on submissions, not tasks. Removed from select and fallback.
Due date now sourced from PO only.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 13:11:42 -04:00
Krao Hasanee e5a5529e21 Move New Folder inline next to Sync Folders button
Clicking '+ New Folder' expands an inline input in the action bar.
Removed the separate form below the toolbar.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 13:08:46 -04:00
Krao Hasanee a89f91c8d1 Fix MyRequests slow load and stuck spinner
- Parallelize tasks + submissions + invoices + invoice_items (4 serial → 1 parallel batch)
- Wrap with withTimeout (10s/12s) so hung queries don't freeze indefinitely
- Add try/catch + finally to guarantee setLoading(false) on any failure

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 13:02:14 -04:00
Krao Hasanee 03fbed8ccc Fix task row title color + add submitted date
- Title forced to --text-primary (was inheriting link color)
- Submitted date prepended before 'Submitted by' using task.submitted_at

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 12:52:58 -04:00
Krao Hasanee c7485257f6 Requests page: remove project header meta, make rows clickable
- Removed started date and status badge from project group header
- Task rows are now full-width Links; removed Details button

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 12:31:33 -04:00
Krao Hasanee be975f74f5 Add company tabs to client dashboard
Tabs appear below stats. All four stat cards + both task columns filter
to the selected company. Stats recompute client-side from fetched data.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 12:26:55 -04:00
Krao Hasanee 6379dc9d82 Move company tabs below stats on invoices page
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 12:25:04 -04:00
Krao Hasanee 476aab8ae8 Add company tabs to client invoices page
Tabs match projects page style, sorted alphabetically. Stats (Outstanding,
Paid, Overdue) update to reflect the selected company only.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 12:23:43 -04:00
Krao Hasanee 1003b82944 Add task columns to client dashboard
Two-column layout below stats: Awaiting Your Review (left) + In Progress (right).
Each row links to the request detail page. Project name shown as subtitle.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 12:19:03 -04:00