WFDASH-WEBAPP/docs/pocketbase/quote_attachments.collection.json
SJCoetz 588e9762c2 feat: add quote templates, improved email, new statuses
Add complete quote template functionality, enhanced outbound email sending, new quote statuses, and supporting infrastructure:
- Add new quote statuses (template, sending, mail_failed) with tailored UI styling for status pills
- Implement full template workflows: save real quotes as templates, create new quotes from existing templates
- Add support for custom quote dates and extended validity periods on generated PDF documents
- Build out improved email pipeline with persisted compose fields and retry functionality for failed sends
- Add attachment direction tracking to categorize inbound, outbound, and generated quote attachments
- Fix tooltip component to properly handle Radix `asChild` prop to avoid React DOM attribute errors
- Add comprehensive test coverage, schema migrations, and update sample test and production data
2026-06-24 22:57:01 +02:00

25 lines
2 KiB
JSON

{
"name": "quote_attachments",
"type": "base",
"system": false,
"listRule": "@request.auth.id != ''",
"viewRule": "@request.auth.id != ''",
"createRule": "@request.auth.id != ''",
"updateRule": "@request.auth.id != ''",
"deleteRule": "@request.auth.id != ''",
"fields": [
{ "name": "quote", "type": "relation", "required": true, "collectionId": "REPLACE_QUOTES_COLLECTION_ID", "maxSelect": 1, "minSelect": 0, "cascadeDelete": true, "displayFields": ["quote_number"] },
{ "name": "filename", "type": "text", "required": true, "min": 1, "max": 255, "pattern": "" },
{ "name": "file", "type": "file", "required": true, "maxSelect": 1, "maxSize": 26214400, "mimeTypes": ["application/pdf", "image/png", "image/jpeg", "image/gif", "image/webp", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "text/csv", "text/plain", "application/octet-stream"], "thumbs": ["150x150", "600x600"] },
{ "name": "content_type", "type": "text", "required": false, "max": 100, "pattern": "" },
{ "name": "size_bytes", "type": "number", "required": false, "min": 0, "noDecimal": true },
{ "name": "email_message_id", "type": "text", "required": false, "max": 255, "pattern": "" },
{ "name": "kind", "type": "select", "required": false, "maxSelect": 1, "values": ["pdf", "image", "doc", "other"] },
{ "name": "uploaded_at", "type": "date", "required": false, "onCreate": true, "onUpdate": false },
{ "name": "direction", "type": "select", "required": false, "maxSelect": 1, "values": ["inbound", "outbound", "generated"], "help": "inbound: came in with the original RFQ email. outbound: operator uploaded to send with the quote. generated: PDF rendered by /api/v1/quotes/[id]/pdf." }
],
"indexes": [
"CREATE INDEX idx_quote_attachments_quote ON quote_attachments (quote)",
"CREATE INDEX idx_quote_attachments_message_id ON quote_attachments (email_message_id)"
]
}