show ON_HOLD responses, but dont show if they have no responses
This commit is contained in:
@@ -58,6 +58,11 @@ async function enrichAnalysisData(analysisResponses?: AnalysisResponseBase[]) {
|
|||||||
.in('primary_owner_user_id', userIds),
|
.in('primary_owner_user_id', userIds),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
if (!analysisResponseElements || analysisResponseElements?.length === 0) {
|
||||||
|
console.info(`${analysisResponseIds} has no response elements`);
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
const doctorUserIds =
|
const doctorUserIds =
|
||||||
doctorFeedbackItems
|
doctorFeedbackItems
|
||||||
?.map((item) => item.doctor_user_id)
|
?.map((item) => item.doctor_user_id)
|
||||||
@@ -285,7 +290,6 @@ export async function getOpenResponses({
|
|||||||
`,
|
`,
|
||||||
{ count: 'exact' },
|
{ count: 'exact' },
|
||||||
)
|
)
|
||||||
.neq('order_status', 'ON_HOLD')
|
|
||||||
.order('created_at', { ascending: false });
|
.order('created_at', { ascending: false });
|
||||||
|
|
||||||
if (assignedIds.length > 0) {
|
if (assignedIds.length > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user