@buerokratt-ria/common-gui-components 0.0.13 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,18 @@ All changes to this project will be documented in this file.
4
4
 
5
5
  ## Template [MajorVersion.MediterraneanVersion.MinorVersion] - DD-MM-YYYY
6
6
 
7
+ ## [0.0.16] - 12-05-2025
8
+
9
+ - Updating CSA display and filtering.
10
+
11
+ ## [0.0.15] - 09-05-2025
12
+
13
+ - Display feedback rating consistently in history page.
14
+
15
+ ## [0.0.14] - 05-05-2025
16
+
17
+ - Updated popup duration to be 5 seconds.
18
+
7
19
  ## [0.0.13] - 25-04-2025
8
20
 
9
21
  - Adding double scrollbar to history page when size is small.
@@ -4,7 +4,7 @@ export const NO_CSA_MESSAGE_LENGTH = 250;
4
4
  export const OUTSIDE_WORKING_HOURS_MESSAGE_LENGTH = 250;
5
5
  export const USER_IDLE_STATUS_TIMEOUT = 300000; // milliseconds
6
6
  export const CHAT_INPUT_LENGTH = 500;
7
- export const POPUP_DURATION = 2; // seconds
7
+ export const POPUP_DURATION = 5; // seconds
8
8
  export const CHAT_HISTORY_PREFERENCES_KEY = 'chat-history-preferences';
9
9
  export const isHiddenFeaturesEnabled =
10
10
  import.meta.env.REACT_APP_ENABLE_HIDDEN_FEATURES?.toLowerCase().trim() ==
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buerokratt-ria/common-gui-components",
3
- "version": "0.0.13",
3
+ "version": "0.0.16",
4
4
  "description": "Common GUI components and pre defined templates.",
5
5
  "main": "index.ts",
6
6
  "author": "ExiRai",
@@ -259,7 +259,7 @@ const ChatHistory: FC<PropsWithChildren<HistoryProps>> = ({user, toastContext, o
259
259
  }),
260
260
  onSuccess: (res: any) => {
261
261
  setCustomerSupportAgents([
262
- {label: '-', value: ','},
262
+ {label: '-', value: '-'},
263
263
  {label: 'Bürokratt', value: 'chatbot'},
264
264
  ...res.data.response.map((item) => ({
265
265
  label: [item.firstName, item.lastName].join(' ').trim(),
@@ -481,9 +481,22 @@ const ChatHistory: FC<PropsWithChildren<HistoryProps>> = ({user, toastContext, o
481
481
  ),
482
482
  }),
483
483
  columnHelper.accessor(
484
- (row) => {
485
- const customerSupportIdCheck = row.customerSupportId ? `${row.customerSupportFirstName ?? ""} ${row.customerSupportLastName ?? ""}`: "-";
486
- return `${ row.customerSupportId === "chatbot" ? row.customerSupportDisplayName : customerSupportIdCheck }`;
484
+ (row) => {
485
+ if (Array.isArray(row.allCsa) && !(row.allCsa.length === 1 && (row.allCsa[0] == null || row.allCsa[0].toString().trim() === ''))) {
486
+ const cleanedNames = row.allCsa
487
+ .filter(name => !!name && typeof name === 'string')
488
+ .map(name => name.trim())
489
+ .filter(name => name !== "")
490
+ .filter((name, index, self) => self.indexOf(name) === index);
491
+
492
+ const filteredNames = cleanedNames.length > 1
493
+ ? cleanedNames.filter(name => name !== "Bürokratt")
494
+ : cleanedNames;
495
+
496
+ return filteredNames.join(", ");
497
+ } else {
498
+ return '-';
499
+ }
487
500
  },
488
501
  {
489
502
  id: `customerSupportFullName`,