@buerokratt-ria/common-gui-components 0.0.1 → 0.0.2

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
@@ -2,6 +2,10 @@
2
2
  All changes to this project will be documented in this file.
3
3
  ## Template [MajorVersion.MediterraneanVersion.MinorVersion] - DD-MM-YYYY
4
4
 
5
+ ## [0.0.2] - 18-02-2025
6
+
7
+ - Used customerSupportFullName instead of display name.
8
+
5
9
  ## [0.0.1] - 07-02-2025
6
10
 
7
11
  - Initial common gui elements.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buerokratt-ria/common-gui-components",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Common GUI components and pre defined templates.",
5
5
  "main": "index.ts",
6
6
  "author": "ExiRai",
@@ -475,20 +475,16 @@ const ChatHistory: FC<PropsWithChildren<HistoryProps>> = ({user, toastContext, o
475
475
  i18n.language === 'et' ? {locale: et} : undefined
476
476
  ),
477
477
  }),
478
- columnHelper.accessor('customerSupportDisplayName', {
479
- id: 'customerSupportDisplayName',
480
- header: i18n.t('chat.history.csaName') || '',
481
- cell: (info) => {
482
- const row = info.row.original;
483
- const lastMessage = row.lastMessage;
484
- const displayName = info.getValue();
485
- if(displayName) {
486
- return displayName;
487
- } else {
488
- return lastMessage.startsWith('Suunan') ? 'Bürokratt' : '\u00A0-';
489
- }
490
- },
491
- }),
478
+ columnHelper.accessor(
479
+ (row) => {
480
+ const customerSupportIdCheck = row.customerSupportId ? `${row.customerSupportFirstName ?? ""} ${row.customerSupportLastName ?? ""}`: "-";
481
+ return `${ row.customerSupportId === "chatbot" ? row.customerSupportDisplayName : customerSupportIdCheck }`;
482
+ },
483
+ {
484
+ id: `customerSupportFullName`,
485
+ header: t('chat.history.csaName') ?? '',
486
+ }
487
+ ),
492
488
  columnHelper.accessor(
493
489
  (row) => `${row.endUserFirstName} ${row.endUserLastName}`,
494
490
  {