@buerokratt-ria/common-gui-components 0.0.9 → 0.0.11

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,15 @@ 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.11] - 01-04-2025
8
+
9
+ - Updated preference page loading
10
+ - Updated date formating for ended chats to hold only date without time.
11
+
12
+ ## [0.0.10] - 14-04-2025
13
+
14
+ - Changed dialog visibility
15
+
7
16
  ## [0.0.9] - 01-04-2025
8
17
 
9
18
  - Prevent end-users from spoofing URLs in messages
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buerokratt-ria/common-gui-components",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "description": "Common GUI components and pre defined templates.",
5
5
  "main": "index.ts",
6
6
  "author": "ExiRai",
@@ -131,12 +131,17 @@ const ChatHistory: FC<PropsWithChildren<HistoryProps>> = ({user, toastContext, o
131
131
  page_name: window.location.pathname,
132
132
  },
133
133
  });
134
- if (response.data.pageResults !== undefined) {
135
- const newSelectedColumns = response.data?.selectedColumns.length === 1 && response.data?.selectedColumns[0] === "" ? [] : response.data?.selectedColumns;
134
+ if (response.data) {
135
+ const currentColumns = response.data.selectedColumns;
136
+ const newPageResults = response.data.pageResults !== undefined ? response.data.pageResults : 10;
137
+ const updatedPagination = updatePagePreference(newPageResults);
138
+
139
+ let newSelectedColumns = [];
140
+ if(currentColumns !== undefined && currentColumns.length > 0 && currentColumns[0] !== "") {
141
+ newSelectedColumns = currentColumns;
142
+ }
136
143
  setSelectedColumns(newSelectedColumns)
137
- const updatedPagination = updatePagePreference(
138
- response.data.pageResults ?? 10
139
- );
144
+
140
145
  setCounterKey(counterKey + 1)
141
146
  getAllEndedChats.mutate({
142
147
  startDate: format(new Date(startDate), 'yyyy-MM-dd'),
@@ -148,7 +153,7 @@ const ChatHistory: FC<PropsWithChildren<HistoryProps>> = ({user, toastContext, o
148
153
  });
149
154
  }
150
155
  } catch (err) {
151
- console.error('Failed to fetch data');
156
+ console.error('Failed to fetch data', err);
152
157
  }
153
158
  };
154
159
 
@@ -211,8 +216,8 @@ const ChatHistory: FC<PropsWithChildren<HistoryProps>> = ({user, toastContext, o
211
216
 
212
217
  return apiDev.post('agents/chats/ended', {
213
218
  customerSupportIds: data.customerSupportIds,
214
- startDate: data.startDate,
215
- endDate: data.endDate,
219
+ startDate: format(new Date(data.startDate), 'yyyy-MM-dd'),
220
+ endDate: format(new Date(data.endDate), 'yyyy-MM-dd'),
216
221
  page: data.pagination.pageIndex + 1,
217
222
  page_size: data.pagination.pageSize,
218
223
  sorting: sortBy,
@@ -53,7 +53,7 @@
53
53
  }
54
54
 
55
55
  &__body {
56
- overflow: auto;
56
+ overflow: visible;
57
57
  max-height: calc(90vh - 70px);
58
58
  }
59
59