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

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,14 @@
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.3] - 19-02-2025
6
+
7
+ - Changed rating & feedback to feedbackRating and feedbackText
8
+
9
+ ## [0.0.2] - 18-02-2025
10
+
11
+ - Used customerSupportFullName instead of display name.
12
+
5
13
  ## [0.0.1] - 07-02-2025
6
14
 
7
15
  - 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.3",
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
  {
@@ -510,13 +506,13 @@ const ChatHistory: FC<PropsWithChildren<HistoryProps>> = ({user, toastContext, o
510
506
  header: t('chat.history.comment') ?? '',
511
507
  cell: commentView,
512
508
  }),
513
- columnHelper.accessor('rating', {
509
+ columnHelper.accessor('feedbackRating', {
514
510
  id: 'feedbackRating',
515
511
  header: t('chat.history.rating') ?? '',
516
512
  cell: (props) =>
517
513
  props.getValue() && <span>{`${props.getValue()}/10`}</span>,
518
514
  }),
519
- columnHelper.accessor('feedback', {
515
+ columnHelper.accessor('feedbackText', {
520
516
  id: 'feedbackText',
521
517
  header: t('chat.history.feedback') ?? '',
522
518
  cell: feedbackTextView,
package/types/chat.ts CHANGED
@@ -83,8 +83,6 @@ export interface Chat {
83
83
  commentAddedDate?: string;
84
84
  commentAuthor?: string;
85
85
  labels: string;
86
- rating?: string;
87
- feedback?: string;
88
86
  feedbackText?: string;
89
87
  feedbackRating?: number;
90
88
  nps?: number;