Conditionally get the first assignment reason (#17808)

This commit is contained in:
Joe Au-Yeung
2024-11-22 22:23:15 +00:00
committed by GitHub
parent b61661214a
commit 226325062e
@@ -135,7 +135,9 @@ function presenter(args: {
return [
...r,
currentRow.routedToBooking?.user?.email || "",
currentRow.routedToBooking?.assignmentReason[0].reasonString || "",
currentRow.routedToBooking?.assignmentReason.length
? currentRow.routedToBooking.assignmentReason[0].reasonString
: "",
currentRow.routedToBooking?.createdAt ? formatDate(currentRow.routedToBooking.createdAt) : "",
formatDate(currentRow.createdAt),
];