(fix) : prevent errors when queue entries have no priority configured#2285
(fix) : prevent errors when queue entries have no priority configured#2285donaldkibet wants to merge 1 commit intomainfrom
Conversation
|
Size Change: +35 B (0%) Total Size: 8.18 MB ℹ️ View Unchanged
|
ibacher
left a comment
There was a problem hiding this comment.
@donaldkibet Thanks, but I don't think this is mergeable in this state. We still need to try to prevent users from creating queue entries without priorities in the RefApp and not just KeHMIS. If the allowed laxness can be hidden behind configuration, I suppose this is acceptable, but as-is, this will break any other implementation.
| )} | ||
| type={priorityConfig?.color !== 'orange' ? priorityConfig?.color : null}> | ||
| {priority.display} | ||
| {priority?.display} |
There was a problem hiding this comment.
Isn't this just rendering an empty tag? It seems like we could just guard against rendering this at all if there's no priority uuid?
| formState.selectedQueue == queueEntry.queue.uuid && | ||
| formState.selectedStatus == queueEntry.status.uuid && | ||
| formState.selectedPriority == queueEntry.priority.uuid, | ||
| formState.selectedPriority == queueEntry?.priority?.uuid, |
There was a problem hiding this comment.
I don't love this is a general implementation. Yes, this fixes the issue for KeHMIS, but not for anyone else. I can't merge this in if users can just create entries without setting priorities, which is what this blocks.
|
@donaldkibet we are doing a custom build for queues. I think this might not be necessary here. |
Requirements
Summary
This PR prevents undefined error when the queue priority hasn't been set. This happens in our distro(KeHMIS) since priority is evaluated using TEWS calculation from triage.
Screenshots
Related Issue
Other