@chat21/chat21-ionic 3.0.61-rc3 → 3.0.61-rc4
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 +7 -0
- package/env.sample +1 -1
- package/package.json +1 -1
- package/src/app/app.component.html +1 -1
- package/src/app/app.component.scss +4 -0
- package/src/app/app.component.ts +1 -1
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +6 -1
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +19 -12
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +29 -32
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +4 -0
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +15 -1
- package/src/app/components/ddp-header/ddp-header.component.html +3 -3
- package/src/app/components/ddp-header/ddp-header.component.ts +1 -1
- package/src/app/pages/conversations-list/conversations-list.page.html +5 -4
- package/src/app/pages/conversations-list/conversations-list.page.ts +32 -20
- package/src/assets/i18n/de.json +2 -1
- package/src/assets/i18n/en.json +2 -1
- package/src/assets/i18n/es.json +2 -1
- package/src/assets/i18n/fr.json +2 -1
- package/src/assets/i18n/it.json +2 -1
- package/src/assets/i18n/pt.json +2 -1
- package/src/assets/i18n/ru.json +2 -1
- package/src/assets/i18n/tr.json +2 -1
- package/src/assets/images/language_flag/hr.png +0 -0
- package/src/assets/images/language_flag/sr.png +0 -0
- package/src/chat-config-pre-test.json +1 -1
- package/src/chat-config-template.json +1 -1
- package/src/chat-config.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# chat21-ionic ver 3.0
|
|
2
2
|
|
|
3
|
+
### 3.0.61-rc4
|
|
4
|
+
- Hides the item showing unassigned conversations in the list of archived conversations
|
|
5
|
+
- Adds in the list of conversations to the "archive" button the tooltip "Resolve" if the conversation is of type "support" and the tooltip "Archive" if the conversation is of type "direct" or "group"
|
|
6
|
+
- Changes all occurrences of the "teammatesButton" environment variable to "writeToButton"
|
|
7
|
+
- Fixes the bug: if the sidebar is visible and the window width is less than 768px, the content of the conversation detail is not completely visible
|
|
8
|
+
- Moves for conversations of type "support" the "Resolve conversation" button from the dropdown menu to the header of the conversation detail
|
|
9
|
+
|
|
3
10
|
### 3.0.61-rc3
|
|
4
11
|
- Replaces console.log with custom loggers
|
|
5
12
|
- Fixes the bug: the info support sidebar is no more displayed
|
package/env.sample
CHANGED
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<!-- <app-details></app-details> -->
|
|
21
21
|
<!-- </ion-router-outlet> -->
|
|
22
22
|
<!-- the main content -->
|
|
23
|
-
<ion-router-outlet id="main" #detailNav animated="false">
|
|
23
|
+
<ion-router-outlet id="main" #detailNav animated="false" [ngClass]="{'router-outlet-margin-left': platformIs === 'mobile' && SUPPORT_MODE === true}">
|
|
24
24
|
</ion-router-outlet>
|
|
25
25
|
</ion-split-pane>
|
|
26
26
|
</div>
|
package/src/app/app.component.ts
CHANGED
|
@@ -78,7 +78,7 @@ export class AppComponent implements OnInit {
|
|
|
78
78
|
public sidebarPage: any;
|
|
79
79
|
public notificationsEnabled: boolean;
|
|
80
80
|
public zone: NgZone;
|
|
81
|
-
|
|
81
|
+
public platformIs: string;
|
|
82
82
|
private doitResize: any;
|
|
83
83
|
private timeModalLogin: any;
|
|
84
84
|
public tenant: string;
|
|
@@ -118,12 +118,17 @@
|
|
|
118
118
|
<ion-note *ngIf="!conversation.archived" class="conversation_time">{{conversation.timestamp | amTimeAgo}}</ion-note>
|
|
119
119
|
|
|
120
120
|
<ion-buttons slot="end">
|
|
121
|
-
<ion-button *ngIf="!conversation.archived"
|
|
121
|
+
<ion-button *ngIf="!conversation.archived" [tooltip]="archiveTooltip" [options]="tooltip_options" placement="bottom" content-type="template"
|
|
122
122
|
[ngClass]="{'hide': !isApp, 'button-on-desktop': !isApp, 'button-on-mobile': isApp }"
|
|
123
123
|
id="{{ 'close_conversation_button' + conversation.uid }}" class="close-conversation-button" ion-button clear
|
|
124
124
|
item-end (click)="closeConversation(conversation);$event.stopPropagation();" padding>
|
|
125
125
|
<ion-icon slot="icon-only" style="display:block;" id="{{ 'close_button_icon' + conversation.uid }}"
|
|
126
126
|
color="close-conversation" name="archive-outline" item-end></ion-icon>
|
|
127
|
+
|
|
128
|
+
<ng-template #archiveTooltip>
|
|
129
|
+
<span *ngIf="conversation?.recipient.startsWith('support-group')"> {{ resolve_btn_tooltip}} </span>
|
|
130
|
+
<span *ngIf="!conversation?.recipient.startsWith('support-group')"> {{ archive_btn_tooltip }} </span>
|
|
131
|
+
</ng-template>
|
|
127
132
|
</ion-button>
|
|
128
133
|
<!-- <ion-button *ngIf="conversation.archived" class="close-conversation-button" ion-button clear item-end disabled padding>
|
|
129
134
|
<!- - <ion-icon style="display:block;" id="{{ 'close_button_icon' + conversation.uid }}" color="close-conversation" name="archive-outline" item-end></ion-icon> - ->
|
|
@@ -9,12 +9,11 @@ import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance'
|
|
|
9
9
|
import { TranslateService } from '@ngx-translate/core';
|
|
10
10
|
|
|
11
11
|
import * as moment from 'moment';
|
|
12
|
-
// import { EventsService } from 'src/app/services/events-service';
|
|
13
|
-
// import { TiledeskService } from '../../../services/tiledesk/tiledesk.service';
|
|
14
12
|
import { NetworkService } from '../../../services/network-service/network.service';
|
|
15
13
|
import { AppConfigProvider } from 'src/app/services/app-config';
|
|
16
14
|
import { DomSanitizer } from '@angular/platform-browser'
|
|
17
15
|
import { TiledeskAuthService } from 'src/chat21-core/providers/tiledesk/tiledesk-auth.service';
|
|
16
|
+
|
|
18
17
|
// import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
19
18
|
// import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
20
19
|
|
|
@@ -36,15 +35,16 @@ export class IonListConversationsComponent extends ListConversationsComponent im
|
|
|
36
35
|
|
|
37
36
|
public PROJECT_FOR_PANEL: any;
|
|
38
37
|
public archive_btn_tooltip: string;
|
|
38
|
+
public resolve_btn_tooltip: string;
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
'show-delay':
|
|
40
|
+
tooltip_options = {
|
|
41
|
+
'show-delay': 0,
|
|
42
42
|
'tooltip-class': 'chat-tooltip',
|
|
43
43
|
'theme': 'light',
|
|
44
44
|
'shadow': false,
|
|
45
45
|
'hide-delay-mobile': 0,
|
|
46
46
|
'hideDelayAfterClick': 3000,
|
|
47
|
-
'hide-delay':
|
|
47
|
+
'hide-delay': 100
|
|
48
48
|
};
|
|
49
49
|
/**
|
|
50
50
|
*
|
|
@@ -57,12 +57,11 @@ export class IonListConversationsComponent extends ListConversationsComponent im
|
|
|
57
57
|
public kvDiffers: KeyValueDiffers,
|
|
58
58
|
public platform: Platform,
|
|
59
59
|
private translate: TranslateService,
|
|
60
|
-
// private events: EventsService,
|
|
61
|
-
// private tiledeskService: TiledeskService,
|
|
62
60
|
private networkService: NetworkService,
|
|
63
61
|
private appConfigProvider: AppConfigProvider,
|
|
64
62
|
private sanitizer: DomSanitizer,
|
|
65
|
-
public tiledeskAuthService: TiledeskAuthService
|
|
63
|
+
public tiledeskAuthService: TiledeskAuthService,
|
|
64
|
+
|
|
66
65
|
) {
|
|
67
66
|
super(iterableDiffers, kvDiffers)
|
|
68
67
|
this.setMomentLocale();
|
|
@@ -88,16 +87,24 @@ export class IonListConversationsComponent extends ListConversationsComponent im
|
|
|
88
87
|
|
|
89
88
|
// console.log('[ION-LIST-CONVS-COMP] - DASHBOARD_BASE_URL ', DASHBOARD_BASE_URL)
|
|
90
89
|
this.PROJECT_FOR_PANEL = this.sanitizer.bypassSecurityTrustResourceUrl(DASHBOARD_BASE_URL + '#/project-for-panel');
|
|
91
|
-
this.
|
|
90
|
+
this.translateLbls();
|
|
91
|
+
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
|
|
95
|
+
translateLbls() {
|
|
95
96
|
this.translate.get('Resolve')
|
|
97
|
+
.subscribe((text: string) => {
|
|
98
|
+
// this.deleteContact_msg = text;
|
|
99
|
+
this.resolve_btn_tooltip = text;
|
|
100
|
+
// console.log('[ION-LIST-CONVS-COMP] getTranslations Resolve : ', text)
|
|
101
|
+
|
|
102
|
+
});
|
|
103
|
+
this.translate.get('Archive')
|
|
96
104
|
.subscribe((text: string) => {
|
|
97
105
|
// this.deleteContact_msg = text;
|
|
98
106
|
this.archive_btn_tooltip = text;
|
|
99
|
-
|
|
100
|
-
|
|
107
|
+
// console.log('[ION-LIST-CONVS-COMP] getTranslations Resolve : ', text)
|
|
101
108
|
});
|
|
102
109
|
}
|
|
103
110
|
|
|
@@ -1,49 +1,39 @@
|
|
|
1
|
-
|
|
2
1
|
<ion-header no-border class="ion-no-border">
|
|
3
2
|
<ion-toolbar style="height:60px">
|
|
4
3
|
<ion-buttons slot="start" style="height:60px">
|
|
5
4
|
<!-- (click)="pushPage('conversations-list')" defaultHref="/conversations-list" -->
|
|
6
5
|
<ion-back-button style="display: block;" text="" *ngIf="isMobile" (click)="goBackToConversationList()">
|
|
7
|
-
</ion-back-button>
|
|
6
|
+
</ion-back-button>
|
|
8
7
|
</ion-buttons>
|
|
9
8
|
|
|
10
9
|
<ion-title [class.info-open]="openInfoConversation || openInfoMessage">
|
|
11
10
|
|
|
12
11
|
<div *ngIf="conversationAvatar" class="avatar-and-typing-wpr">
|
|
13
12
|
<!-- [ngStyle] = "{ 'left': platformName === 'ios' ? '55px' : '' }" -->
|
|
14
|
-
<div *ngIf="conversationAvatar" class="avatar-container"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
></app-avatar-profile>
|
|
13
|
+
<div *ngIf="conversationAvatar" class="avatar-container"
|
|
14
|
+
[ngClass]="{ 'avatar-container-ios': platformName === 'ios' }">
|
|
15
|
+
<app-avatar-profile [itemAvatar]=conversationAvatar></app-avatar-profile>
|
|
18
16
|
</div>
|
|
19
17
|
<!-- [ngStyle] = "{ 'left': platformName === 'ios' ? '63px' : '' }" -->
|
|
20
|
-
<div *ngIf="isDirect" class="user-presence" [ngClass]
|
|
21
|
-
<app-user-presence
|
|
22
|
-
[
|
|
23
|
-
[translationMap] = translationMap
|
|
24
|
-
[borderColor] = borderColor
|
|
25
|
-
[fontColor] = fontColor>
|
|
18
|
+
<div *ngIf="isDirect" class="user-presence" [ngClass]="{ 'user-presence-ios': platformName === 'ios' }">
|
|
19
|
+
<app-user-presence [idUser]=conversationAvatar.conversation_with [translationMap]=translationMap
|
|
20
|
+
[borderColor]=borderColor [fontColor]=fontColor>
|
|
26
21
|
</app-user-presence>
|
|
27
22
|
</div>
|
|
28
23
|
|
|
29
24
|
<div *ngIf="conversationAvatar" class="user-typing">
|
|
30
|
-
<app-user-typing
|
|
31
|
-
[
|
|
32
|
-
|
|
33
|
-
[isDirect] = isDirect
|
|
34
|
-
[translationMap] = translationMap
|
|
35
|
-
[color] = fontColor
|
|
36
|
-
[membersConversation] = membersConversation
|
|
37
|
-
></app-user-typing>
|
|
25
|
+
<app-user-typing [idConversation]=conversationAvatar.uid [idCurrentUser]=idLoggedUser [isDirect]=isDirect
|
|
26
|
+
[translationMap]=translationMap [color]=fontColor [membersConversation]=membersConversation>
|
|
27
|
+
</app-user-typing>
|
|
38
28
|
</div>
|
|
39
29
|
|
|
40
30
|
</div>
|
|
41
31
|
<!-- [ngClass] = "{ 'tile-info-with-ios': platformName === 'ios' ? '82px' : ''82px'' }" -->
|
|
42
|
-
<div *ngIf="conversationAvatar" class="tile-info-with" (click)="onOpenCloseInfoConversation()"
|
|
43
|
-
|
|
32
|
+
<div *ngIf="conversationAvatar" class="tile-info-with" (click)="onOpenCloseInfoConversation()"
|
|
33
|
+
[ngClass]="{ 'tile-info-with-ios': platformName === 'ios' }">
|
|
44
34
|
<!-- <span class="tile-username">{{ conversationAvatar.conversation_with_fullname }} </span> -->
|
|
45
35
|
<span class="tile-username">{{ conversation_with_fullname }} </span>
|
|
46
|
-
|
|
36
|
+
|
|
47
37
|
</div>
|
|
48
38
|
|
|
49
39
|
<!-- <div *ngIf="conversationWithFullname" class="tile-info-with" (click)="onOpenCloseInfoConversation()">
|
|
@@ -54,15 +44,22 @@
|
|
|
54
44
|
<!-- openInfoConversation {{openInfoConversation}} -->
|
|
55
45
|
<ion-buttons slot="end">
|
|
56
46
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
47
|
+
<ion-button *ngIf="idConv.startsWith('support-group')" ion-button fill="clear" color="primary" size="small" (click)="closeConversation()" [ngClass]="{'resolve-conv-margin-right': !isMobile}" style="">
|
|
48
|
+
<!-- <ion-icon slot="icon-only" name="alert-circle-outline"></ion-icon> -->
|
|
49
|
+
<ion-icon name="archive-outline"></ion-icon>
|
|
50
|
+
<!-- <ion-icon slot="icon-only" name="information-outline"></ion-icon> -->
|
|
51
|
+
<span style="text-transform: capitalize; margin-left: 5px;"> {{ 'Resolve' | translate}} </span>
|
|
52
|
+
</ion-button>
|
|
53
|
+
|
|
54
|
+
<ion-button *ngIf="!openInfoConversation" ion-button fill="clear" (click)="onOpenCloseInfoConversation()">
|
|
55
|
+
<!-- <ion-icon slot="icon-only" name="alert-circle-outline"></ion-icon> -->
|
|
56
|
+
<ion-icon slot="icon-only" name="information-circle-outline"></ion-icon>
|
|
57
|
+
<!-- <ion-icon slot="icon-only" name="information-outline"></ion-icon> -->
|
|
58
|
+
|
|
59
|
+
</ion-button>
|
|
60
|
+
<ion-button *ngIf="openInfoConversation" ion-button fill="clear" (click)="onOpenCloseInfoConversation()">
|
|
61
|
+
<ion-icon slot="icon-only" name="close-circle-outline"></ion-icon>
|
|
62
|
+
</ion-button>
|
|
66
63
|
|
|
67
64
|
</ion-buttons>
|
|
68
65
|
|
|
@@ -7,6 +7,10 @@ import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service
|
|
|
7
7
|
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
8
8
|
import { setConversationAvatar, setChannelType } from 'src/chat21-core/utils/utils';
|
|
9
9
|
import { Platform } from '@ionic/angular';
|
|
10
|
+
// import { TiledeskAuthService } from 'src/chat21-core/providers/tiledesk/tiledesk-auth.service';
|
|
11
|
+
// import { TiledeskService } from 'src/app/services/tiledesk/tiledesk.service';
|
|
12
|
+
import { EventsService } from 'src/app/services/events-service';
|
|
13
|
+
|
|
10
14
|
@Component({
|
|
11
15
|
selector: 'app-header-conversation-detail',
|
|
12
16
|
templateUrl: './header-conversation-detail.component.html',
|
|
@@ -44,7 +48,10 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
44
48
|
public imageRepoService: ImageRepoService,
|
|
45
49
|
private route: ActivatedRoute,
|
|
46
50
|
public platform: Platform,
|
|
47
|
-
private router: Router
|
|
51
|
+
private router: Router,
|
|
52
|
+
// public tiledeskAuthService: TiledeskAuthService,
|
|
53
|
+
// public tiledeskService: TiledeskService,
|
|
54
|
+
public events: EventsService,
|
|
48
55
|
) {
|
|
49
56
|
this.route.paramMap.subscribe(params => {
|
|
50
57
|
|
|
@@ -58,6 +65,10 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
58
65
|
});
|
|
59
66
|
}
|
|
60
67
|
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
61
72
|
// ----------------------------------------------------
|
|
62
73
|
// @ Lifehooks
|
|
63
74
|
// ----------------------------------------------------
|
|
@@ -113,7 +124,10 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
113
124
|
this.platformName = 'android'
|
|
114
125
|
this.logger.log('getPlatformName platformName', this.platformName)
|
|
115
126
|
}
|
|
127
|
+
}
|
|
116
128
|
|
|
129
|
+
closeConversation() {
|
|
130
|
+
this.events.publish('hasclosedconversation', this.idConv);
|
|
117
131
|
}
|
|
118
132
|
|
|
119
133
|
onOpenCloseInfoConversation() {
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
<!-- <ion-icon name="file-tray-full-outline"></ion-icon> -->
|
|
20
20
|
</ion-button>
|
|
21
21
|
|
|
22
|
-
<ion-button *ngIf="
|
|
23
|
-
|
|
24
|
-
<ion-icon slot="icon-only" name="people-outline"></ion-icon>
|
|
22
|
+
<ion-button *ngIf="writeto_btn" ion-button fill="clear" (click)="onOpenContactsDirectory($event)">
|
|
23
|
+
<ion-icon slot="icon-only" name="create-outline"></ion-icon>
|
|
24
|
+
<!-- <ion-icon slot="icon-only" name="people-outline"></ion-icon> -->
|
|
25
25
|
|
|
26
26
|
</ion-button>
|
|
27
27
|
|
|
@@ -9,7 +9,7 @@ export class DdpHeaderComponent implements OnInit {
|
|
|
9
9
|
@Input() numberOpenConv: number;
|
|
10
10
|
@Input() supportMode: boolean;
|
|
11
11
|
@Input() archived_btn: boolean;
|
|
12
|
-
@Input()
|
|
12
|
+
@Input() writeto_btn: boolean;
|
|
13
13
|
@Output() openContactsDirectory = new EventEmitter();
|
|
14
14
|
@Output() openProfileInfo = new EventEmitter();
|
|
15
15
|
IS_ON_MOBILE_DEVICE: boolean;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[numberOpenConv]="numberOpenConv"
|
|
4
4
|
[supportMode]="supportMode"
|
|
5
5
|
[archived_btn]="archived_btn"
|
|
6
|
-
[
|
|
6
|
+
[writeto_btn]="writeto_btn"
|
|
7
7
|
(openContactsDirectory)=openContactsDirectory($event)
|
|
8
8
|
(openProfileInfo)=openProfileInfo($event)>
|
|
9
9
|
</app-ddp-header>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
</app-option-header>
|
|
15
15
|
</ion-header>
|
|
16
16
|
|
|
17
|
-
<ion-content #ioncontentconvlist class="list-avatar-page" appScrollbarTheme>
|
|
17
|
+
<ion-content id="convs-list" #ioncontentconvlist class="list-avatar-page" appScrollbarTheme>
|
|
18
18
|
|
|
19
19
|
<div id="scrollbar2">
|
|
20
20
|
<ion-list>
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
<ion-label part="message-text" class="waiting-for-network-msg"> Waiting for network</ion-label>
|
|
44
44
|
</ion-item>
|
|
45
45
|
<!-- supportMode && -->
|
|
46
|
-
<ion-item *ngIf="displayNewConvsItem" class="ion-no-padding open-iframe-item">
|
|
46
|
+
<ion-item *ngIf="displayNewConvsItem && conversationType !=='archived'" class="ion-no-padding open-iframe-item">
|
|
47
47
|
<div tabindex="0"></div>
|
|
48
48
|
<!-- <ion-note class="pinned-project">
|
|
49
49
|
{{ 'PINNED_PROJECT' | translate }}
|
|
@@ -51,7 +51,8 @@
|
|
|
51
51
|
|
|
52
52
|
<app-project-item style="width: 100%;"
|
|
53
53
|
(openUnsevedConvsEvent)="openUnsevedConversationIframe($event)"
|
|
54
|
-
(projectIdEvent)="getLastProjectId($event)"
|
|
54
|
+
(projectIdEvent)="getLastProjectId($event)">
|
|
55
|
+
</app-project-item>
|
|
55
56
|
</ion-item>
|
|
56
57
|
|
|
57
58
|
<span
|
|
@@ -60,7 +60,7 @@ export class ConversationListPage implements OnInit {
|
|
|
60
60
|
public numberOpenConv = 0;
|
|
61
61
|
public loadingIsActive = true;
|
|
62
62
|
public supportMode: boolean;
|
|
63
|
-
public
|
|
63
|
+
public writeto_btn: boolean;
|
|
64
64
|
public archived_btn: boolean;
|
|
65
65
|
public convertMessage = convertMessage;
|
|
66
66
|
private isShowMenuPage = false;
|
|
@@ -119,11 +119,14 @@ export class ConversationListPage implements OnInit {
|
|
|
119
119
|
this.listenToSwPostMessage();
|
|
120
120
|
this.listenSupportConvIdHasChanged();
|
|
121
121
|
// this.listenDirectConvIdHasChanged();
|
|
122
|
+
this.listenToCloseConvFromHeaderConversation();
|
|
122
123
|
}
|
|
123
124
|
|
|
125
|
+
|
|
126
|
+
|
|
124
127
|
listenSupportConvIdHasChanged() {
|
|
125
128
|
this.events.subscribe('supportconvid:haschanged', (IDConv) => {
|
|
126
|
-
|
|
129
|
+
console.log('[CONVS-LIST-PAGE] - listen To convid:haschanged - convId', IDConv);
|
|
127
130
|
if (IDConv) {
|
|
128
131
|
// const conversationSelected = this.conversations.find(item => item.uid === convId);
|
|
129
132
|
// this.onConversationSelected(conversationSelected)
|
|
@@ -217,10 +220,10 @@ export class ConversationListPage implements OnInit {
|
|
|
217
220
|
} else {
|
|
218
221
|
this.archived_btn = false;
|
|
219
222
|
}
|
|
220
|
-
if (appConfig && appConfig.
|
|
221
|
-
this.
|
|
223
|
+
if (appConfig && appConfig.writeToButton) {
|
|
224
|
+
this.writeto_btn = appConfig.writeToButton;
|
|
222
225
|
} else {
|
|
223
|
-
this.
|
|
226
|
+
this.writeto_btn = false;
|
|
224
227
|
}
|
|
225
228
|
// console.log('[ION-LIST-CONVS-COMP] - supportMode ', this.supportMode)
|
|
226
229
|
}
|
|
@@ -580,7 +583,7 @@ export class ConversationListPage implements OnInit {
|
|
|
580
583
|
// let storedArchivedConv = localStorage.getItem('activeConversationSelected');
|
|
581
584
|
const keys = ['LABEL_ARCHIVED'];
|
|
582
585
|
// const keys = ['History'];
|
|
583
|
-
|
|
586
|
+
|
|
584
587
|
this.headerTitle = this.translateService.translateLanguage(keys).get(keys[0]);
|
|
585
588
|
|
|
586
589
|
} else if (event === 'displayContact') {
|
|
@@ -868,13 +871,22 @@ export class ConversationListPage implements OnInit {
|
|
|
868
871
|
}
|
|
869
872
|
}
|
|
870
873
|
|
|
874
|
+
listenToCloseConvFromHeaderConversation() {
|
|
875
|
+
this.events.subscribe('hasclosedconversation', (convId) => {
|
|
876
|
+
console.log('[CONVS-LIST-PAGE] hasclosedconversation convId', convId)
|
|
871
877
|
|
|
878
|
+
const conversation = this.conversations.find(conv => conv.uid === convId)
|
|
879
|
+
console.log('[CONVS-LIST-PAGE] hasclosedconversation conversation', conversation)
|
|
880
|
+
this.onCloseConversation(conversation)
|
|
881
|
+
});
|
|
882
|
+
}
|
|
872
883
|
|
|
873
884
|
// ----------------------------------------------------------------------------------------------
|
|
874
885
|
// onCloseConversation
|
|
875
886
|
// https://github.com/chat21/chat21-cloud-functions/blob/master/docs/api.md#delete-a-conversation
|
|
876
887
|
// ----------------------------------------------------------------------------------------------
|
|
877
888
|
onCloseConversation(conversation: ConversationModel) {
|
|
889
|
+
console.log('[CONVS-LIST-PAGE] onCloseConversation conversation', conversation)
|
|
878
890
|
// -------------------------------------------------------------------------------------
|
|
879
891
|
// Fix the display of the message "No conversation yet" when a conversation is archived
|
|
880
892
|
// but there are others in the list (happens when loadingIsActive is set to false because
|
|
@@ -886,10 +898,10 @@ export class ConversationListPage implements OnInit {
|
|
|
886
898
|
|
|
887
899
|
const conversationId = conversation.uid;
|
|
888
900
|
|
|
889
|
-
|
|
901
|
+
console.log('[CONVS-LIST-PAGE] onCloseConversation conversationId: ', conversationId)
|
|
890
902
|
|
|
891
903
|
const conversationWith_segments = conversationId.split('-');
|
|
892
|
-
|
|
904
|
+
console.log('[CONVS-LIST-PAGE] - conversationId_segments: ', conversationWith_segments);
|
|
893
905
|
|
|
894
906
|
// Removes the last element of the array if is = to the separator
|
|
895
907
|
if (conversationWith_segments[conversationWith_segments.length - 1] === '') {
|
|
@@ -898,8 +910,8 @@ export class ConversationListPage implements OnInit {
|
|
|
898
910
|
|
|
899
911
|
if (conversationWith_segments.length === 4) {
|
|
900
912
|
const lastArrayElement = conversationWith_segments[conversationWith_segments.length - 1]
|
|
901
|
-
|
|
902
|
-
|
|
913
|
+
console.log('[CONVS-LIST-PAGE] - lastArrayElement ', lastArrayElement);
|
|
914
|
+
console.log('[CONVS-LIST-PAGE] - lastArrayElement length', lastArrayElement.length);
|
|
903
915
|
if (lastArrayElement.length !== 32) {
|
|
904
916
|
conversationWith_segments.pop();
|
|
905
917
|
}
|
|
@@ -925,34 +937,34 @@ export class ConversationListPage implements OnInit {
|
|
|
925
937
|
const tiledeskToken = this.tiledeskAuthService.getTiledeskToken();
|
|
926
938
|
|
|
927
939
|
this.tiledeskService.getProjectIdByConvRecipient(tiledeskToken, conversationId).subscribe(res => {
|
|
928
|
-
|
|
940
|
+
console.log('[INFO-CONTENT-COMP] - GET PROJECTID BY CONV RECIPIENT RES', res);
|
|
929
941
|
|
|
930
942
|
if (res) {
|
|
931
943
|
const project_id = res.id_project
|
|
932
|
-
|
|
944
|
+
console.log('[INFO-CONTENT-COMP] - GET PROJECTID BY CONV RECIPIENT project_id', project_id);
|
|
933
945
|
this.archiveSupportGroupConv(tiledeskToken, project_id, conversationId);
|
|
934
946
|
}
|
|
935
947
|
|
|
936
948
|
}, (error) => {
|
|
937
|
-
|
|
949
|
+
console.error('[INFO-CONTENT-COMP] - GET PROJECTID BY CONV RECIPIENT - ERROR ', error);
|
|
938
950
|
|
|
939
951
|
}, () => {
|
|
940
|
-
|
|
952
|
+
console.log('[INFO-CONTENT-COMP] - GET PROJECTID BY CONV RECIPIENT * COMPLETE *');
|
|
941
953
|
|
|
942
954
|
});
|
|
943
955
|
}
|
|
944
956
|
|
|
945
957
|
archiveSupportGroupConv(tiledeskToken, project_id, conversationId) {
|
|
946
|
-
|
|
958
|
+
console.log('[CONVS-LIST-PAGE] - onCloseConversation projectId: ', project_id)
|
|
947
959
|
this.tiledeskService.closeSupportGroup(tiledeskToken, project_id, conversationId).subscribe(res => {
|
|
948
960
|
|
|
949
|
-
|
|
961
|
+
console.log('[CONVS-LIST-PAGE] - onCloseConversation closeSupportGroup RES', res);
|
|
950
962
|
}, (error) => {
|
|
951
|
-
|
|
963
|
+
console.error('[CONVS-LIST-PAGE] - onCloseConversation closeSupportGroup - ERROR ', error);
|
|
952
964
|
}, () => {
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
965
|
+
console.log('[CONVS-LIST-PAGE] - onCloseConversation closeSupportGroup * COMPLETE *');
|
|
966
|
+
console.log('[CONVS-LIST-PAGE] - onCloseConversation (closeSupportGroup) CONVS ', this.conversations)
|
|
967
|
+
console.log('[CONVS-LIST-PAGE] - onCloseConversation (closeSupportGroup) CONVS LENGHT ', this.conversations.length)
|
|
956
968
|
});
|
|
957
969
|
|
|
958
970
|
}
|
package/src/assets/i18n/de.json
CHANGED
package/src/assets/i18n/en.json
CHANGED
package/src/assets/i18n/es.json
CHANGED
package/src/assets/i18n/fr.json
CHANGED
package/src/assets/i18n/it.json
CHANGED
package/src/assets/i18n/pt.json
CHANGED
package/src/assets/i18n/ru.json
CHANGED
package/src/assets/i18n/tr.json
CHANGED
|
Binary file
|
|
Binary file
|