@chat21/chat21-ionic 3.4.32-rc1 → 3.4.32-rc2
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 +6 -0
- package/package.json +1 -1
- package/src/app/components/project-item/project-item.component.ts +0 -1
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +7 -5
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +15 -0
- package/src/app/services/websocket/websocket.service.ts +9 -5
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,12 @@
|
|
|
8
8
|
### **Copyrigth**:
|
|
9
9
|
*Tiledesk SRL*
|
|
10
10
|
|
|
11
|
+
# 3.4.32-rc3
|
|
12
|
+
- **bug-fixed**: unassigned conversations list was reset on each WebSocket subscription; conversations from other projects were lost when subscribing to multiple online projects. Added `skipClear` parameter to `subscriptionToWsConversations` so the list is cleared only once when subscribing to all online projects.
|
|
13
|
+
- **changed**: unassigned conversations empty state — centered the "no conversations" label both vertically and horizontally within the full viewport height.
|
|
14
|
+
|
|
15
|
+
# 3.4.32-rc2
|
|
16
|
+
|
|
11
17
|
# 3.4.32-rc1
|
|
12
18
|
- **added**: ability to change availability status for each project the logged-in user belongs to.
|
|
13
19
|
- **changed**: unserved-request.page refactor html and ts refactor
|
package/package.json
CHANGED
|
@@ -16,7 +16,6 @@ import { ConvertRequestToConversation } from 'src/chat21-core/utils/convertReque
|
|
|
16
16
|
import { compareValues, getUserStatusFromProjectUser } from 'src/chat21-core/utils/utils';
|
|
17
17
|
import { ProjectService } from 'src/app/services/projects/project.service';
|
|
18
18
|
import { ProjectUser } from 'src/chat21-core/models/project_user';
|
|
19
|
-
import { Project } from 'src/chat21-core/models/projects';
|
|
20
19
|
|
|
21
20
|
@Component({
|
|
22
21
|
selector: 'app-project-item',
|
|
@@ -40,11 +40,13 @@
|
|
|
40
40
|
</ion-list-conversations>
|
|
41
41
|
</ng-container>
|
|
42
42
|
<ng-template #noConvs>
|
|
43
|
-
<
|
|
44
|
-
<ion-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
<div class="no-convs-container">
|
|
44
|
+
<ion-item id="no-convs" class="ion-text-center" lines="none">
|
|
45
|
+
<ion-label class="ion-text-wrap" color="medium">
|
|
46
|
+
{{ 'LABEL_MSG_PUSH_START_CHAT' | translate }}
|
|
47
|
+
</ion-label>
|
|
48
|
+
</ion-item>
|
|
49
|
+
</div>
|
|
48
50
|
</ng-template>
|
|
49
51
|
</ion-list>
|
|
50
52
|
</div>
|
|
@@ -233,3 +233,18 @@ ion-content::part(scroll) {
|
|
|
233
233
|
min-height: calc(100vh - var(--header-height, 56px));
|
|
234
234
|
height: 100%;
|
|
235
235
|
}
|
|
236
|
+
|
|
237
|
+
// -------------------------------------------------
|
|
238
|
+
// Empty state - label centrata nell'altezza disponibile
|
|
239
|
+
// -------------------------------------------------
|
|
240
|
+
.no-convs-container {
|
|
241
|
+
display: flex;
|
|
242
|
+
align-items: center;
|
|
243
|
+
justify-content: center;
|
|
244
|
+
min-height: calc(100vh - var(--header-height, 56px));
|
|
245
|
+
width: 100%;
|
|
246
|
+
|
|
247
|
+
ion-item {
|
|
248
|
+
--background: transparent;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
@@ -94,16 +94,20 @@ export class WebsocketService {
|
|
|
94
94
|
* Sottoscrive alle conversations di un singolo progetto.
|
|
95
95
|
* Mantenuto per retrocompatibilità. Preferire subscriptionToWsConversationsForOnlineProjects
|
|
96
96
|
* per sottoscrivere ai progetti online con status Available.
|
|
97
|
+
* @param project_id ID del progetto
|
|
98
|
+
* @param skipClear Se true, non svuota wsRequestsList (usato quando si sottoscrivono più progetti in sequenza)
|
|
97
99
|
*/
|
|
98
|
-
subscriptionToWsConversations(project_id) {
|
|
100
|
+
subscriptionToWsConversations(project_id, skipClear = false) {
|
|
99
101
|
// console.log("[WS-SERV] - CALLED SUBSC TO WS CONVS - PROJECT ID ", project_id);
|
|
100
102
|
var self = this;
|
|
101
|
-
|
|
103
|
+
if (!skipClear) {
|
|
104
|
+
this.wsRequestsList = [];
|
|
105
|
+
}
|
|
102
106
|
|
|
103
|
-
this.webSocketJs.ref('/' + project_id + '/requests', '
|
|
107
|
+
this.webSocketJs.ref('/' + project_id + '/requests', 'getCurrentProjectAndSubscribeTo_WsRequests_' + project_id,
|
|
104
108
|
|
|
105
109
|
function (data) {
|
|
106
|
-
// console.log("[WS-SERV] - CONVS - CREATE DATA ", data);
|
|
110
|
+
// console.log("[WS-SERV] - CONVS - CREATE DATA for project ", project_id, data);
|
|
107
111
|
if (data) {
|
|
108
112
|
// ------------------------------------------------
|
|
109
113
|
// @ Agents - pass in data agents get from snapshot
|
|
@@ -326,7 +330,7 @@ export class WebsocketService {
|
|
|
326
330
|
this.subscribedConversationProjectIds
|
|
327
331
|
);
|
|
328
332
|
this.subscribedConversationProjectIds.forEach((projectId) =>
|
|
329
|
-
this.subscriptionToWsConversations(projectId)
|
|
333
|
+
this.subscriptionToWsConversations(projectId, true)
|
|
330
334
|
);
|
|
331
335
|
return this.subscribedConversationProjectIds;
|
|
332
336
|
}
|