diff --git a/packages/esm-service-queues-app/src/queue-table/cells/queue-table-visit-attribute-queue-number-cell.component.tsx b/packages/esm-service-queues-app/src/queue-table/cells/queue-table-visit-attribute-queue-number-cell.component.tsx
index 9c8d8b4ff..f64a8791f 100644
--- a/packages/esm-service-queues-app/src/queue-table/cells/queue-table-visit-attribute-queue-number-cell.component.tsx
+++ b/packages/esm-service-queues-app/src/queue-table/cells/queue-table-visit-attribute-queue-number-cell.component.tsx
@@ -1,31 +1,25 @@
import React from 'react';
import { type VisitAttributeQueueNumberColumnConfig } from '../../config-schema';
-import { type QueueTableColumnFunction, type QueueEntry, type QueueTableCellComponentProps } from '../../types';
-import { InlineNotification } from '@carbon/react';
-import { useTranslation } from 'react-i18next';
+import { type QueueTableColumnFunction, type QueueEntry } from '../../types';
export const queueTableVisitAttributeQueueNumberColumn: QueueTableColumnFunction = (
key,
header,
{ visitQueueNumberAttributeUuid }: VisitAttributeQueueNumberColumnConfig,
) => {
+ if (!visitQueueNumberAttributeUuid) {
+ console.error(
+ 'No visit queue number attribute is configured, but the queue is configured to display the queue number.',
+ );
+ return null;
+ }
+
function getVisitQueueNumber(queueEntry: QueueEntry) {
return queueEntry.visit?.attributes?.find((e) => e?.attributeType?.uuid === visitQueueNumberAttributeUuid)?.value;
}
- const QueueTableVisitAttributeQueueNumberCell = ({ queueEntry }: QueueTableCellComponentProps) => {
- const { t } = useTranslation();
- return (
- <>
- {visitQueueNumberAttributeUuid ? (
- {getVisitQueueNumber(queueEntry)}
- ) : (
-
- {t('visitQueueNumberAttributeUuid not configured', 'visitQueueNumberAttributeUuid not configured')}
-
- )}
- >
- );
+ const QueueTableVisitAttributeQueueNumberCell = ({ queueEntry }: { queueEntry: QueueEntry }) => {
+ return {getVisitQueueNumber(queueEntry)};
};
return {