WFDASH-WEBAPP/n8n_workfows
Dave a19ad698cd fix(quotes): finish migrating quote detail page to split attachment fields
The 2026-09-09 attachment split (cd359b7) moved outbound/internal
attachments to `quotes.outbound_attachments` / `internal_attachments`,
migrating the approvals and process pages but missing the main quote
detail page. It was still reading/writing the legacy
`quote_attachments` collection (`direction="outbound"/"internal"`),
which nothing downstream reads anymore.

Effect: the Attachments tab and Approve & Send modal on this page
couldn't see files uploaded via the new field, so the modal's
"selected attachments" checkboxes were built from an empty list —
operator-attached outbound files silently never made it into
`email_outbound_attachment_ids`, and the customer got an email with
no attachments even when the operator had attached one.

- Outbound/internal tabs, upload, and delete now go through
  `/api/v1/quotes/[id]/outbound-attachments` and `/internal-attachments`
  instead of writing `quote_attachments` rows directly.
- Send modal's attachment list is synthesized from the quote row's
  token fields (same pattern as the approvals page), so
  `selectedAttachmentIds` actually match what the server validates.
- Attachment preview dialog fetches via the `/api/v1/files/quotes/...`
  proxy instead of PB's raw `/api/files/quote_attachments/...`, which
  pointed at the wrong collection/id after this fix.

Also fixes the n8n "WFDASH — Quote Outbound Send" workflow: three
Code nodes filtered quote_attachments rows to filenames containing
'Quote-CNL' or 'Quote-ISHERWOOD' before picking the latest PDF. Since
PDF filenames are `Quote-{letterheadCode}-{number}.pdf` and there's a
third valid letterhead (WESTSCOTT GROUP OF COMPANIES), any quote sent
under that letterhead would starve the whole send chain of an input
item and silently no-op. The upstream PB query already scopes
correctly by quote id + kind, so the filter was redundant as well as
wrong — removed it, kept the latest-PDF-per-quote dedup. Repo
snapshot in n8n_workfows/ synced to match the deployed workflow
(PIEAkPYYYZLGl6Pj).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-09 15:44:29 +02:00
..
SNAPSHOT-WFDASH-v8-from-live-2026-08-21 chore(agent): baseline — uncommitted work from the local directory 2026-08-26 01:00:23 +02:00
1 - WFDASH QUICKBOOKS INVOICE1 - WFDASH QUICKBOOKS INVOICE.json feat(invoicing): add QuickBooks invoicing flow and print functionality 2026-07-09 09:44:55 +02:00
1 - WFDASH QUICKBOOKS INVOICE1 - WFDASH QUICKBOOKS INVOICE_OLD.json feat(invoicing): add QuickBooks invoicing flow and print functionality 2026-07-09 09:44:55 +02:00
1 - WFDASH QUICKBOOKS INVOICE1 - WFDASH QUICKBOOKS INVOICE_OLD_2.json feat(invoicing): add QuickBooks invoicing flow and print functionality 2026-07-09 09:44:55 +02:00
order_items_m74xvviv2hpzz2d.json feat(invoicing): add QuickBooks invoicing flow and print functionality 2026-07-09 09:44:55 +02:00
POCKETBASE NODES.json feat(quotes): add email-to-quote pipeline with attachments and replies 2026-06-16 20:46:28 +02:00
SNAPSHOT-WFDASH-v4-from-live-2026-06-20.json feat: add quote email intake and atomic numbering 2026-06-22 13:58:24 +02:00
SNIPPET-catch-and-create-uploader.js feat: add quote email intake and atomic numbering 2026-06-22 13:58:24 +02:00
SNIPPET-plan-upload-attachments-early-v2.js feat: add quote email intake and atomic numbering 2026-06-22 13:58:24 +02:00
SNIPPET-plan-upload-attachments-early-v3.js feat: add quote email intake and atomic numbering 2026-06-22 13:58:24 +02:00
WFDASH — Price List Match.js feat(sprint): add new sprint pricing workflow and supporting code 2026-07-03 07:29:43 +02:00
WFDASH — Purchase Order Send (Cron).js refactor: switch hardcoded UI colors to semantic theme tokens 2026-07-07 17:22:03 +02:00
WFDASH — Purchase Order Send.js refactor: switch hardcoded UI colors to semantic theme tokens 2026-07-07 17:22:03 +02:00
WFDASH — Purchase Order Send.json refactor: switch hardcoded UI colors to semantic theme tokens 2026-07-07 17:22:03 +02:00
WFDASH — Quote Email Monitor (v3.1 agentic + PDF text).json feat(quotes): add email-to-quote pipeline with attachments and replies 2026-06-16 20:46:28 +02:00
WFDASH — Quote Email Monitor (v4 direct-to-PB).json feat(quotes): add email-to-quote pipeline with attachments and replies 2026-06-16 20:46:28 +02:00
WFDASH — Quote Email Monitor (v5 catch-and-create).json feat(quotes): split attachments into internal vs outbound with operator upload UI 2026-09-09 13:43:56 +02:00
WFDASH — Quote Email Monitor (v5 catch-and-create).PRE-FIX-REPLY-BRANCH-AUTH.json feat(quotes): split attachments into internal vs outbound with operator upload UI 2026-09-09 13:43:56 +02:00
WFDASH — Quote Email Monitor (v5 catch-and-create).PRE-FIX-REPLY-DETECTION.json feat(quotes): split attachments into internal vs outbound with operator upload UI 2026-09-09 13:43:56 +02:00
WFDASH — Quote Item Rewriter.json feat: add locked pricing and overhaul quote rewrite 2026-06-22 23:07:53 +02:00
WFDASH — Quote Outbound Send (push-payload).baseline.json feat(quotes): split attachments into internal vs outbound with operator upload UI 2026-09-09 13:43:56 +02:00
WFDASH — Quote Outbound Send (with-outbound-attachments).json fix(quotes): finish migrating quote detail page to split attachment fields 2026-09-09 15:44:29 +02:00