Advanced Export Dropdown === ## Design & Userflow - [JIRA Epic Link](https://procoretech.atlassian.net/browse/PM-13755) - [Figma Link](https://www.figma.com/file/pMtrHrTokZNKueQzO8Lp9b/Menu%3A-Grouped-Multi-Select?node-id=62%3A198) ![](https://i.imgur.com/sxgG0HW.png) ### User Case - User will use the dropdown to export their responses and attachments for a single RFI - User will use the dropdown to export their attachments for a single Submittal - Additional Notes - Responses are a radio list (can only select one) - Attachments are checklist (can select multiple) ### Frontend - Export Dropdown component must be flexible and reusuable across many Procore tools - Core Components used to build Export Dropdown - Available: Button, Dropdown, Checkbox, Radio Button - Not Available: Draggable Rows Existing API Contract --- ### Export Props returns props that are mounted on export dropdown component - Props: ```.ts { zipUrl: string singlePdfUrl: string attachmentOptions: { type: 'prostore_file' | 'cover_sheet', id: integer, name: string, url: string, contentType: string }[] } ``` ### POST /:project_id/project/submittal_logs/:submittal_log_id/single_pdf #### (POST /:project_id/project/submittal_logs/:submittal_log_id/single_zip_compiler) Triggers background worker to generate file - Request URL Params - `project_id: integer` - `submittal_log_id (resource id): integer` - Request Body Params - `files: { id: integer, type: 'prostore_file' | 'cover_sheet' }[]` - Response Type: text/plain - Response Body: None (only returns http status) New API Contract --- ### GET /rest/v1.0/projects/:project_id/:resource_type/:resource_id/advanced_export (`#show`) Returns all export options - Request URL Params - `project_id: integer` - `resource_type: string (ie. rfis, submittal_logs)` - `resource_id: integer` - Request Body Params - None - Body Response: ```.ts { "slug": string, "title": string, "type": string, "options": { id: string, title: string, content_type?: string }[] }[] ``` - Example Body: ```.json [ { "slug": "cover_sheet", "title": "Responses", "type": "single_select", "options": [ { "id": "all-responses", "title": "All Responses" }, { "id": "official-responses", "title": "Official Responses Only" } ] }, { "slug": "prostore_files", "title": "Attachments", "type": "multi_select", "options": [ { "id": 1, "title": "Attachments 1", "content_type": "jpeg" }, { "id": 2, "title": "Attachments 2", "content_type": "pdf" } ] }, { "slug": "drawings", "title": "Drawings", "type": "multi_select", "options": [ { "id": 1, "title": "Drawing 1" }, { "id": 2, "title": "Drawing 2" } ] } ] ``` ### POST /rest/v1.0/projects/:project_id/(resource_type)/:resource_id/advanced_export Triggers background worker to generate file - Request URL Params - `project_id: integer` - `resource_id: integer` - resource type is not a parameter. It should match the existing tools rest endpoint path - Request Body Params - `format: string ('zip' | 'single pdf')` - `selected_options: ` - `cover_sheet: string (all-responses or official-responses)` - `prostore_files: integer[]` - Response Type: text/plain - Response Body: None (only returns http status) Additional Notes --- - Old Transmittals PR: https://github.com/procore/procore/pull/48614/files Questions --- - All RFI general information attachments will be available in the export dropdown. Should we also include attachments on the RFI question? Attachments on the RFI responses? (For reference, current advanced export on submittal includes approver attachments, not just general information attachments.) - Yes? - Current advanced export sends everything to email, no direct download. Should we explore our options for direct download, or does product want these to always go to email too? - Goes straight to email because queued into image proccessing worker - If user cannot view all responses and only have access to official repsonses, should we only show a single option in the response radio list? - Yes, selected by default