Conditionally get the first assignment reason (#17808)

This commit is contained in:
Joe Au-Yeung authored and GitHub committed 2024-11-22 22:23:15 +00:00
1 parent b61661214a
commit 226325062e
1 file changed
+3 -1
@@ -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),
];