Add PDF dropzone to audit list for streamlined report upload
Enable users to drag-and-drop PDF reports onto the audit list page, which automatically opens the create-audit dialog with the file attached. The dialog chains createAudit → uploadAuditReport mutations, with graceful handling for partial failures (audit created but upload failed). Changes: - AuditsPage: Add dropzone with visual overlay (dashed border + icon) when dragging PDFs - CreateAuditDialog: Accept optional file prop, show file info, chain mutations on submit - Extract audit ID from createAudit response to pass to uploadAuditReport - Handle upload failure with warning toast, allowing manual upload from audit detail page - Add react-dropzone dependency to console app Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
2
package-lock.json
generated
2
package-lock.json
generated
@@ -40,6 +40,7 @@
|
||||
"minisearch": "^7.1.2",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"react-dropzone": "^14.3.8",
|
||||
"react-error-boundary": "^6.0.0",
|
||||
"react-hook-form": "^7.56.4",
|
||||
"react-pdf": "^10.3.0",
|
||||
@@ -14950,6 +14951,7 @@
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user