Closes #27 and closes #31, updaing several ExportJob-specific components to render differently depending on a given ExportJob's status. Changes include:
src/components/AttachmentComponent/index.tsx: Only render trashcan delete button on attachments when the parent job is editable.
src/components/AttachmentSection/index.tsx: Only render the upload file-input when the current job is editable.
src/components/Button/index.tsx: Support a disabled prop and a 'danger' variant, which renders a red button. Also ensure that all button types darken on hover instead of inverting on dark buttons (i.e. 'emphasized' and 'danger' buttons)
src/components/ExportApproveButton/index.tsx: Only render an approve button when the job is in-review.
src/components/ExportJobListItemSmall/index.tsx: Separate a ExportJobBlurb component into its own file.
src/components/ExportRejectButton/index.tsx: Support status-specific rendering and status-specific click handlers, deleting the job in certain circumstances.
src/lib/exportJobHelpers.ts: Add helper for deleting a job. Also, simplify the functions a bit removing unnecessary variables
Changes included in the PR unrelated to the above issues include:
src/components/ExportJobLink/index.tsx: Removed the ExternalLink icon
Updating tailwind.config.js, specifically hoisting the color palettes out from inline to the config's export, allowing for easier use and reuse as unique color variables (e.g. color-active). Related: changed x-primary-active to x-active, updating any uses across all files.
Move the 'Back to Admin Jobs' button out from ExportJobDetailView and up to the page itself, ensuring that the back button is visible while loading/if an error occurs. Effects src/components/ExportJobDetailView/index.tsx
Move OperationOutcome parsing into separate fhirHelpers.ts file.
NOTE: Deleting jobs doesn't work unless you remove the requireAuth middleware from the corresponding app.delete(... endpoint. Wanted to ask you Vlad how you'd like to proceed with this quirk of the backend now: are you comfortable removing requireAuth from that job-update endpoint? Or did you have another solution in mind?
Closes #27 and closes #31, updaing several ExportJob-specific components to render differently depending on a given ExportJob's status. Changes include:
src/components/AttachmentComponent/index.tsx
: Only render trashcan delete button on attachments when the parent job is editable.src/components/AttachmentSection/index.tsx
: Only render the upload file-input when the current job is editable.src/components/Button/index.tsx
: Support a disabled prop and a 'danger' variant, which renders a red button. Also ensure that all button types darken on hover instead of inverting on dark buttons (i.e. 'emphasized' and 'danger' buttons)src/components/ExportApproveButton/index.tsx
: Only render an approve button when the job is in-review.src/components/ExportJobListItemSmall/index.tsx
: Separate a ExportJobBlurb component into its own file.src/components/ExportRejectButton/index.tsx
: Support status-specific rendering and status-specific click handlers, deleting the job in certain circumstances.src/lib/exportJobHelpers.ts
: Add helper for deleting a job. Also, simplify the functions a bit removing unnecessary variablesChanges included in the PR unrelated to the above issues include:
src/components/ExportJobLink/index.tsx
: Removed the ExternalLink icontailwind.config.js
, specifically hoisting the color palettes out from inline to the config's export, allowing for easier use and reuse as unique color variables (e.g.color-active
). Related: changedx-primary-active
tox-active
, updating any uses across all files.src/components/ExportJobDetailView/index.tsx
NOTE: Deleting jobs doesn't work unless you remove the requireAuth middleware from the corresponding
app.delete(...
endpoint. Wanted to ask you Vlad how you'd like to proceed with this quirk of the backend now: are you comfortable removing requireAuth from that job-update endpoint? Or did you have another solution in mind?