WFDASH-WEBAPP/docs/pocketbase/quote_attachments.collection.json
SJCoetz a18ab0f19f feat: add quote email tracking, user color coding, and improved attachments
Add comprehensive quote management and UI improvements:
- Add `email_received_at` field to quotes collection, TypeScript types, and setup script
- Update quote attachments schema to mark `kind` optional for legacy attachments, add `uploaded_at` field, and improve documentation comments
- Create `/api/v1/users/lookup` server endpoint to resolve user IDs to display names
- Add stable user ID → color mapping for visual grouping of claimed quotes
- Enhance quotes list page: reorder tab filters, show claimer names, color-code rows per claimant
- Update quote detail page to display claimer info with user icon
- Expand DataTable component to support per-row custom class and style props
- Overhaul QuoteEmailCard: add proper HTML/plain text body sanitization/linkification, inline PDF/image previews, improved metadata display, and fixed auth-aware attachment previews via blob URLs
2026-06-22 15:15:00 +02:00

24 lines
1.7 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 }
],
"indexes": [
"CREATE INDEX idx_quote_attachments_quote ON quote_attachments (quote)",
"CREATE INDEX idx_quote_attachments_message_id ON quote_attachments (email_message_id)"
]
}