@chat21/chat21-ionic 3.0.60-rc6 → 3.0.60-rc8

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.
Files changed (34) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/env.sample +1 -1
  3. package/package.json +1 -1
  4. package/src/app/app.component.ts +39 -15
  5. package/src/app/app.module.ts +1 -1
  6. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +62 -36
  7. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +40 -13
  8. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +5 -2
  9. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +4 -0
  10. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +2 -2
  11. package/src/app/components/project-item/project-item.component.html +31 -9
  12. package/src/app/components/project-item/project-item.component.ts +2 -2
  13. package/src/app/pages/conversation-detail/conversation-detail.page.html +1 -0
  14. package/src/app/pages/conversation-detail/conversation-detail.page.ts +117 -81
  15. package/src/app/pages/conversations-list/conversations-list.page.ts +1 -1
  16. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +3 -3
  17. package/src/app/shared/shared.module.ts +3 -2
  18. package/src/assets/i18n/de.json +208 -0
  19. package/src/assets/i18n/en.json +4 -1
  20. package/src/assets/i18n/es.json +4 -1
  21. package/src/assets/i18n/fr.json +208 -0
  22. package/src/assets/i18n/it.json +4 -1
  23. package/src/assets/i18n/pt.json +208 -0
  24. package/src/assets/i18n/ru.json +208 -0
  25. package/src/assets/i18n/tr.json +208 -0
  26. package/src/assets/js/chat21client.js +16 -3
  27. package/src/chat-config-pre-test.json +1 -0
  28. package/src/chat-config-template.json +1 -0
  29. package/src/chat-config.json +1 -0
  30. package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +54 -43
  31. package/src/chat21-core/providers/firebase/firebase-conversations-handler.ts +23 -0
  32. package/src/chat21-core/providers/mqtt/mqtt-archivedconversations-handler.ts +1 -1
  33. package/src/chat21-core/utils/constants.ts +2 -0
  34. package/src/chat21-core/utils/utils.ts +12 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # chat21-ionic ver 3.0
2
2
 
3
+ ### 3.0.60-rc8
4
+ - Fixes the bug:: "info" messages sent by "SYSTEM" are not translated
5
+ - Adds the Portuguese language
6
+ - Adds the French language
7
+ - Adds the Russian language
8
+ - Adds the Turkish language
9
+
10
+ ### 3.0.60-rc7
11
+ - Adds German language
12
+ - Adds a method that translates chat texts based on the language of the browser settings if no preferred language is selected in the dashboard or based on the preferred language (ignoring the browser language)
13
+ - Manages the language used for translations from the "moment" library based on the language of the browser settings if no preferred language has been selected in the dashboard or on the preferred language selected (ignoring the browser language)
14
+ - Adds the ability to manage the visibility of canned responses in env.sample, chat-config-tempalte.json and chat-config.json
15
+ - Fixes the bug: in the 'item' that displays the pinned project and the number of the not assigned conversions the tooltip is not correctly displayed
16
+
3
17
  ### 3.0.60-rc6
4
18
  - Fixes the bug: push notifications are initialized even if the "pushEngine" configuration variable is set to "none"
5
19
  - Adds spanish language
package/env.sample CHANGED
@@ -3,7 +3,7 @@ DASHBOARD_URL=https://YOUR_DASHBOARD_URL
3
3
  WS_URL=wss://YOUR_TILEDESK_SERVER_URL?token=
4
4
  WS_URL_RELATIVE=********
5
5
  SERVER_BASE_URL=http://localhost:3000/
6
-
6
+ FEATURES_TOKEN=CAR:F
7
7
  CHAT21_ENGINE=mqtt
8
8
  UPLOAD_ENGINE=native
9
9
  PUSH_ENGINE=none
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chat21/chat21-ionic",
3
- "version": "3.0.60-rc6",
3
+ "version": "3.0.60-rc8",
4
4
  "author": "Tiledesk SRL",
5
5
  "homepage": "https://ionicframework.com/",
6
6
  "scripts": {
@@ -98,7 +98,7 @@ export class AppComponent implements OnInit {
98
98
  public missingConnectionToast: any
99
99
  public executedInitializeAppByWatchConnection: boolean = false;
100
100
  private version: string;
101
-
101
+
102
102
  // private isOnline: boolean = false;
103
103
 
104
104
  wsService: WebSocketJs;
@@ -443,7 +443,7 @@ export class AppComponent implements OnInit {
443
443
  // console.log("Check platform");
444
444
  this.getPlatformName();
445
445
 
446
- this.setLanguage();
446
+ // this.setLanguage();
447
447
 
448
448
  // if (this.splashScreen) {
449
449
  this.splashScreen.hide();
@@ -521,19 +521,42 @@ export class AppComponent implements OnInit {
521
521
  }
522
522
 
523
523
  /** */
524
- setLanguage() {
524
+ setLanguage(currentUser) {
525
+ // const currentUser = JSON.parse(this.appStorageService.getItem('currentUser'));
526
+ this.logger.log('[APP-COMP] - setLanguage current_user uid: ', currentUser);
527
+
528
+ let currentUserId = ''
529
+ if (currentUser) {
530
+ currentUserId = currentUser.uid;
531
+ this.logger.log('[APP-COMP] - setLanguage current_user uid: ', currentUserId);
532
+ }
525
533
  this.translate.setDefaultLang('en');
526
534
  this.translate.use('en');
527
- this.logger.debug('[APP-COMP] navigator.language: ', navigator.language);
528
- let language;
529
- if (navigator.language.indexOf('-') !== -1) {
530
- language = navigator.language.substring(0, navigator.language.indexOf('-'));
531
- } else if (navigator.language.indexOf('_') !== -1) {
532
- language = navigator.language.substring(0, navigator.language.indexOf('_'));
533
- } else {
534
- language = navigator.language;
535
+
536
+ const browserLang = this.translate.getBrowserLang();
537
+ this.logger.log('[APP-COMP] browserLang: ', browserLang);
538
+ const stored_preferred_lang = localStorage.getItem(currentUserId + '_lang');
539
+ this.logger.log('[APP-COMP] stored_preferred_lang: ', stored_preferred_lang);
540
+
541
+ let chat_lang = ''
542
+ if (browserLang && !stored_preferred_lang) {
543
+ chat_lang = browserLang
544
+ } else if (browserLang && stored_preferred_lang) {
545
+ chat_lang = stored_preferred_lang
535
546
  }
536
- this.translate.use(language);
547
+
548
+ this.translate.use(chat_lang);
549
+
550
+ // this.logger.debug('[APP-COMP] navigator.language: ', navigator.language);
551
+ // let language;
552
+ // if (navigator.language.indexOf('-') !== -1) {
553
+ // language = navigator.language.substring(0, navigator.language.indexOf('-'));
554
+ // } else if (navigator.language.indexOf('_') !== -1) {
555
+ // language = navigator.language.substring(0, navigator.language.indexOf('_'));
556
+ // } else {
557
+ // language = navigator.language;
558
+ // }
559
+ // this.translate.use(language);
537
560
  }
538
561
 
539
562
 
@@ -802,7 +825,7 @@ export class AppComponent implements OnInit {
802
825
  .pipe(filter((state) => state !== null))
803
826
  .subscribe((state: any) => {
804
827
  this.logger.log('initialize FROM [APP-COMP] - [APP-COMP] ***** BSAuthStateChanged state', state);
805
-
828
+
806
829
  if (state && state === AUTH_STATE_ONLINE) {
807
830
  // const user = this.tiledeskAuthService.getCurrentUser();
808
831
  // if (this.isOnline === false) {
@@ -868,6 +891,7 @@ export class AppComponent implements OnInit {
868
891
  // }
869
892
  this.events.publish('go:online', true);
870
893
  const currentUser = this.tiledeskAuthService.getCurrentUser();
894
+ this.setLanguage(currentUser);
871
895
  // this.logger.printDebug('APP-COMP - goOnLine****', currentUser);
872
896
  this.logger.log('[APP-COMP] - GO-ONLINE - currentUser ', currentUser);
873
897
  this.chatManager.setTiledeskToken(tiledeskToken);
@@ -907,7 +931,7 @@ export class AppComponent implements OnInit {
907
931
  const supportmode = this.appConfigProvider.getConfig().supportMode;
908
932
  this.logger.log('[APP-COMP] - GO-OFFINE - supportmode ', supportmode);
909
933
  if (supportmode === true) {
910
- this.webSocketClose()
934
+ this.webSocketClose()
911
935
  }
912
936
  // this.isOnline = false;
913
937
  // this.conversationsHandlerService.conversations = [];
@@ -1088,7 +1112,7 @@ export class AppComponent implements OnInit {
1088
1112
  }
1089
1113
 
1090
1114
  private initConversationsHandler(userId: string) {
1091
- const keys = ['YOU'];
1115
+ const keys = ['YOU', 'INFO_A_NEW_SUPPORT_REQUEST_HAS_BEEN_ASSIGNED_TO_YOU'];
1092
1116
  const translationMap = this.translateService.translateLanguage(keys);
1093
1117
 
1094
1118
  this.logger.log('[APP-COMP] initConversationsHandler ------------->', userId, this.tenant);
@@ -90,7 +90,7 @@ import { ConversationInfoModule } from 'src/app/components/conversation-info/con
90
90
 
91
91
 
92
92
  // Directives
93
- import { TooltipModule } from 'ng2-tooltip-directive';
93
+
94
94
  import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
95
95
  import { Network } from '@ionic-native/network/ngx';
96
96
  import { ConnectionService } from 'ng-connection-service';
@@ -6,6 +6,7 @@ import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service
6
6
  import { isFile, isFrame, isImage } from 'src/chat21-core/utils/utils-message';
7
7
  import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
8
8
  import { TranslateService } from '@ngx-translate/core';
9
+ import { TiledeskAuthService } from 'src/chat21-core/providers/tiledesk/tiledesk-auth.service';
9
10
  import * as moment from 'moment';
10
11
  @Component({
11
12
  selector: 'chat-bubble-message',
@@ -36,53 +37,78 @@ export class BubbleMessageComponent implements OnInit, OnChanges {
36
37
  };
37
38
 
38
39
  private logger: LoggerService = LoggerInstance.getInstance()
40
+
39
41
  constructor(
40
42
  public sanitizer: DomSanitizer,
41
- private translate: TranslateService) {
43
+ private translate: TranslateService,
44
+ public tiledeskAuthService: TiledeskAuthService
45
+
46
+ ) {
42
47
  // console.log('BUBBLE-MSG Hello !!!!')
43
48
  }
44
49
 
45
50
  ngOnInit() {
51
+
52
+ this.setMomentLocale()
53
+ // this.browserLang = this.translate.getBrowserLang();
54
+
55
+ // if (this.browserLang) {
56
+ // if (this.browserLang === 'it') {
57
+
58
+
59
+ // moment.locale('it', {
60
+ // calendar: {
61
+ // lastDay: '[Ieri alle] LT',
62
+ // sameDay: '[Oggi alle] LT',
63
+ // nextDay: '[Domani alle] LT',
64
+ // lastWeek: '[Ultimo] dddd [alle] LT',
65
+ // nextWeek: 'dddd [alle] LT',
66
+ // sameElse: 'lll'
67
+ // }
68
+ // });
69
+
70
+ // } else {
71
+ // moment.locale('en', {
72
+ // calendar: {
73
+ // lastDay: '[Yesterday at] LT',
74
+ // sameDay: '[Today at] LT',
75
+ // nextDay: '[Tomorrow at] LT',
76
+ // lastWeek: '[last] dddd [at] LT',
77
+ // nextWeek: 'dddd [at] LT',
78
+ // sameElse: 'lll'
79
+ // }
80
+ // });
81
+ // }
82
+ // }
83
+
84
+ }
85
+
86
+
87
+ setMomentLocale() {
46
88
  this.browserLang = this.translate.getBrowserLang();
47
- // console.log('BUBBLE-MSG ngOnInit browserLang ', this.browserLang)
48
- if (this.browserLang) {
49
- if (this.browserLang === 'it') {
50
- // console.log('BUBBLE-MSG browserLang ', this.browserLang)
51
- // moment.locale('it')
52
-
53
- moment.locale('it', {
54
- calendar: {
55
- lastDay: '[Ieri alle] LT',
56
- sameDay: '[Oggi alle] LT',
57
- nextDay: '[Domani alle] LT',
58
- lastWeek: '[Ultimo] dddd [alle] LT',
59
- nextWeek: 'dddd [alle] LT',
60
- sameElse: 'lll'
61
- }
62
- });
63
-
64
- } else {
65
- // console.log('BUBBLE-MSG browserLang ', this.browserLang)
66
- // moment.locale('en')
67
-
68
- moment.locale('en', {
69
- calendar: {
70
- lastDay: '[Yesterday at] LT',
71
- sameDay: '[Today at] LT',
72
- nextDay: '[Tomorrow at] LT',
73
- lastWeek: '[last] dddd [at] LT',
74
- nextWeek: 'dddd [at] LT',
75
- sameElse: 'lll'
76
- }
77
- });
78
- }
89
+ const currentUser = this.tiledeskAuthService.getCurrentUser();
90
+ this.logger.log('[BUBBLE-MESSAGE] - ngOnInit - currentUser ', currentUser)
91
+ let currentUserId = ''
92
+ if (currentUser) {
93
+ currentUserId = currentUser.uid
94
+ this.logger.log('[BUBBLE-MESSAGE] - ngOnInit - currentUserId ', currentUserId)
79
95
  }
80
96
 
97
+ const stored_preferred_lang = localStorage.getItem(currentUserId + '_lang');
98
+ this.logger.log('[BUBBLE-MESSAGE] stored_preferred_lang: ', stored_preferred_lang);
81
99
 
82
100
 
83
- // const yesterday = moment().subtract(1, 'day')
84
- // console.log('BUBBLE-MSG yesterday ', yesterday)
85
-
101
+ let chat_lang = ''
102
+ if (this.browserLang && !stored_preferred_lang) {
103
+ chat_lang = this.browserLang
104
+ } else if (this.browserLang && stored_preferred_lang) {
105
+ chat_lang = stored_preferred_lang
106
+ }
107
+ moment.locale(chat_lang , {
108
+ calendar: {
109
+ sameElse: 'LLLL'
110
+ }
111
+ });
86
112
  }
87
113
 
88
114
  ngOnChanges() {
@@ -14,6 +14,7 @@ import * as moment from 'moment';
14
14
  import { NetworkService } from '../../../services/network-service/network.service';
15
15
  import { AppConfigProvider } from 'src/app/services/app-config';
16
16
  import { DomSanitizer } from '@angular/platform-browser'
17
+ import { TiledeskAuthService } from 'src/chat21-core/providers/tiledesk/tiledesk-auth.service';
17
18
  // import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
18
19
  // import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
19
20
 
@@ -32,7 +33,7 @@ export class IonListConversationsComponent extends ListConversationsComponent im
32
33
  public logger: LoggerService = LoggerInstance.getInstance();
33
34
  public currentYear: any;
34
35
  public browserLang: string;
35
-
36
+
36
37
  public PROJECT_FOR_PANEL: any;
37
38
 
38
39
  /**
@@ -51,21 +52,24 @@ export class IonListConversationsComponent extends ListConversationsComponent im
51
52
  private networkService: NetworkService,
52
53
  private appConfigProvider: AppConfigProvider,
53
54
  private sanitizer: DomSanitizer,
55
+ public tiledeskAuthService: TiledeskAuthService
54
56
  ) {
55
57
  super(iterableDiffers, kvDiffers)
56
- this.browserLang = this.translate.getBrowserLang();
57
- if (this.browserLang) {
58
+ this.setMomentLocale();
58
59
 
59
- moment.locale(this.browserLang)
60
- // if (this.browserLang === 'it') {
61
- // // this.translate.use('it');
62
- // moment.locale('it')
63
60
 
64
- // } else {
65
- // // this.translate.use('en');
66
- // moment.locale('en')
67
- // }
68
- }
61
+ // if (this.browserLang) {
62
+
63
+ // moment.locale(this.browserLang)
64
+ // // if (this.browserLang === 'it') {
65
+ // // // this.translate.use('it');
66
+ // // moment.locale('it')
67
+
68
+ // // } else {
69
+ // // // this.translate.use('en');
70
+ // // moment.locale('en')
71
+ // // }
72
+ // }
69
73
 
70
74
  this.currentYear = moment().format('YYYY');
71
75
  this.logger.log('[ION-LIST-CONVS-COMP] - currentYear ', this.currentYear)
@@ -76,13 +80,36 @@ export class IonListConversationsComponent extends ListConversationsComponent im
76
80
  this.PROJECT_FOR_PANEL = this.sanitizer.bypassSecurityTrustResourceUrl(DASHBOARD_BASE_URL + '#/project-for-panel');
77
81
  }
78
82
 
83
+ setMomentLocale() {
84
+ this.browserLang = this.translate.getBrowserLang();
85
+ const currentUser = this.tiledeskAuthService.getCurrentUser();
86
+ this.logger.log('[ION-LIST-CONVS-COMP] - ngOnInit - currentUser ', currentUser)
87
+ let currentUserId = ''
88
+ if (currentUser) {
89
+ currentUserId = currentUser.uid
90
+ this.logger.log('[ION-LIST-CONVS-COMP] - ngOnInit - currentUserId ', currentUserId)
91
+ }
92
+
93
+ const stored_preferred_lang = localStorage.getItem(currentUserId + '_lang');
94
+ this.logger.log('[ION-LIST-CONVS-COMP] stored_preferred_lang: ', stored_preferred_lang);
95
+
96
+
97
+ let chat_lang = ''
98
+ if (this.browserLang && !stored_preferred_lang) {
99
+ chat_lang = this.browserLang
100
+ } else if (this.browserLang && stored_preferred_lang) {
101
+ chat_lang = stored_preferred_lang
102
+ }
103
+ moment.locale(chat_lang)
104
+ }
105
+
79
106
  ngOnInit() {
80
107
  this.isApp = this.platform.is('ios') || this.platform.is('android')
81
108
  this.logger.log('[ION-LIST-CONVS-COMP] - ngOnInit - IS-APP ', this.isApp)
82
109
  this.logger.log('[ION-LIST-CONVS-COMP] - ngOnInit - Platform', this.platform.platforms());
83
110
  }
84
111
 
85
-
112
+
86
113
 
87
114
 
88
115
 
@@ -39,7 +39,8 @@
39
39
  <ion-col col-auto>
40
40
 
41
41
  <div class="start-buttons" style="position: absolute;display: flex;">
42
-
42
+
43
+ <ng-container *ngIf="areVisibleCAR">
43
44
  <div class="canned-responses-btn-wpr" style="margin-left: -5px;" tooltip="{{translationMap?.get('CANNED_RESPONSES')}}" [options]="tooltipOptions" placement="top">
44
45
  <ion-button ion-button fill="clear" class="canned-responses-btn" (click)="openCannedResponses()" [disabled]="!IS_SUPPORT_GROUP_CONVERSATION">
45
46
  <ion-icon slot="icon-only" lazy="true" name="flash-outline" style="font-size: 24px;"></ion-icon>
@@ -51,6 +52,8 @@
51
52
  <div *ngIf="IS_SUPPORT_GROUP_CONVERSATION && tagsCannedCount > 0" tooltip="{{translationMap?.get('YES_CANNED_RESPONSES')}}" [options]="tooltipOptions" placement="top" class="canned-responses-btn-badge">
52
53
  <ion-icon name="information-sharp" style="vertical-align: middle;"></ion-icon>
53
54
  </div>
55
+ </ng-container>
56
+
54
57
 
55
58
  <div class="upload-image-btn-wpr" tooltip="{{translationMap?.get('UPLOAD')}}" [options]="tooltipOptions" placement="top">
56
59
  <ion-button ion-button fill="clear" class="upload-image-btn">
@@ -64,7 +67,7 @@
64
67
  </div>
65
68
  </div>
66
69
 
67
- <div class="text-message">
70
+ <div class="text-message" [ngClass]="{'text-message-no-cr': areVisibleCAR === false}">
68
71
  <ion-textarea id="ion-textarea" #messageTextArea #message_text_area #textArea rows="1"
69
72
  [placeholder]="TEXAREA_PLACEHOLDER" autosize="false" auto-grow="true" autofocus="true" [value]=""
70
73
  [(ngModel)]="messageString" (ionChange)="ionChange($event);"
@@ -67,6 +67,10 @@
67
67
  font-size: 15px;
68
68
  }
69
69
  }
70
+ .text-message-no-cr {
71
+ margin: 0 35px !important;
72
+ width: calc(100% - 70px) !important;
73
+ }
70
74
  }
71
75
 
72
76
  #fileInput {
@@ -44,7 +44,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
44
44
  @Input() conversationWith: string;
45
45
  @Input() tagsCannedFilter: any = [];
46
46
  @Input() tagsCannedCount: number;
47
-
47
+ @Input() areVisibleCAR: boolean;
48
48
  @Input() events: Observable<void>;
49
49
  @Input() fileUploadAccept: string
50
50
  @Input() isOpenInfoConversation: boolean;
@@ -133,7 +133,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
133
133
 
134
134
  this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges DROP EVENT ", this.dropEvent);
135
135
  this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges tagsCannedFilter ", this.tagsCannedFilter);
136
- // console.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges tagsCannedCount ", this.tagsCannedCount);
136
+ this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges areVisibleCAR; ", this.areVisibleCAR);
137
137
 
138
138
 
139
139
  this.logger.log('[CONVS-DETAIL] - returnChangeTextArea ngOnChanges in [MSG-TEXT-AREA] this.tagsCannedFilter.length ', this.tagsCannedFilter.length)
@@ -32,29 +32,50 @@
32
32
  </div>
33
33
 
34
34
  <ng-template #conversationsInQueue>
35
- <span>{{ unservedRequestCount }} {{translationMap?.get('CONVERSATIONS_IN_QUEUE') }}</span>
35
+ <span *ngIf="unservedRequestCount > 1">
36
+ {{ unservedRequestCount }}
37
+ {{translationMap?.get('CONVERSATIONS_IN_QUEUE') }}
38
+ </span>
39
+ <span *ngIf="unservedRequestCount === 1">
40
+ {{ unservedRequestCount }}
41
+ {{translationMap?.get('CONVERSATION_IN_QUEUE') }}
42
+ </span>
43
+ <span *ngIf="unservedRequestCount === 0">
44
+ {{translationMap?.get('NO_CONVERSATION_IN_QUEUE') }}
45
+
46
+ </span>
36
47
  </ng-template>
37
48
 
38
49
 
39
50
  <div class="flex-child-right">
40
- <div class="project-name-project-for-panel" [tooltip]="conversationsInQueueOnProjectName" [options]="tooltipOptions"
41
- placement="top" content-type="template" (click)="openUnservedConvs()">
51
+ <div class="project-name-project-for-panel" [tooltip]="conversationsInQueueOnProjectName"
52
+ [options]="tooltipOptions" placement="top" content-type="template" (click)="openUnservedConvs()">
42
53
  <div class="project---name"> {{ project?.id_project?.name }} </div>
43
54
  </div>
44
55
  <ng-template #conversationsInQueueOnProjectName>
45
- <span>{{ unservedRequestCount }} {{translationMap?.get('CONVERSATIONS_IN_QUEUE') }}</span>
56
+ <span *ngIf="unservedRequestCount > 1">
57
+ {{ unservedRequestCount }}
58
+ {{translationMap?.get('CONVERSATIONS_IN_QUEUE') }}
59
+ </span>
60
+ <span *ngIf="unservedRequestCount === 1">
61
+ {{ unservedRequestCount }}
62
+ {{translationMap?.get('CONVERSATION_IN_QUEUE') }}
63
+ </span>
64
+ <span *ngIf="unservedRequestCount === 0">
65
+ {{translationMap?.get('NO_CONVERSATION_IN_QUEUE') }}
66
+ </span>
46
67
  </ng-template>
47
68
 
48
69
  <div class="availabily-and-busy-wpr">
49
70
  <div class="availabily---wpr" tooltip="{{avaialble_status_for_tooltip}}" [options]="tooltipOptions">
50
- <div class="onoffswitch"
71
+ <div class="onoffswitch"
51
72
  (click)="$event.stopPropagation();changeAvailabilityState(project?.id_project?._id, project?.ws_projct_user_available)">
52
- <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="switchavailableunavailablestatus"
53
- tabindex="0" [checked]="project?.ws_projct_user_available">
73
+ <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox"
74
+ id="switchavailableunavailablestatus" tabindex="0" [checked]="project?.ws_projct_user_available">
54
75
  <label class="onoffswitch-label" for="switchavailableunavailablestatus"></label>
55
76
  </div>
56
77
  </div>
57
-
78
+
58
79
 
59
80
  <!-- (click)="$event.stopPropagation();changeAvailabilityState(project?.id_project?._id, project?.ws_projct_user_available)" -->
60
81
  <span *ngIf="project?.ws_projct_user_available === true" class="availibility-status-text"
@@ -92,7 +113,8 @@
92
113
  <div class="view-all-convs-icon-wpr" style="cursor: pointer;" [tooltip]="viewAllConvs"
93
114
  [options]="tooltipOptions" placement="top" content-type="template">
94
115
 
95
- <ion-button ion-button fill="clear" class="open-unserved-convs-btn" (click)="openUnservedConvsAndGoToProjectList()">
116
+ <ion-button ion-button fill="clear" class="open-unserved-convs-btn"
117
+ (click)="openUnservedConvsAndGoToProjectList()">
96
118
 
97
119
  <span class="push-icon-and-list-wpr">
98
120
  <!-- <svg version="1.1" id="Livello_1" xmlns="http://www.w3.org/2000/svg"
@@ -117,6 +117,8 @@ export class ProjectItemComponent implements OnInit {
117
117
  'Busy',
118
118
  'VIEW_ALL_CONVERSATIONS',
119
119
  'CONVERSATIONS_IN_QUEUE',
120
+ 'CONVERSATION_IN_QUEUE',
121
+ 'NO_CONVERSATION_IN_QUEUE',
120
122
  'PINNED_PROJECT',
121
123
  'CHANGE_PINNED_PROJECT',
122
124
  "CHANGE_TO_YOUR_STATUS_TO_AVAILABLE",
@@ -208,8 +210,6 @@ export class ProjectItemComponent implements OnInit {
208
210
  this.logger.log('[PROJECT-ITEM] - user_role ', user_role)
209
211
  this.projectIdEvent.emit(project.id_project._id)
210
212
 
211
-
212
-
213
213
  if (user_role === 'agent') {
214
214
  this.ROLE_IS_AGENT = true;
215
215
 
@@ -159,6 +159,7 @@
159
159
  <app-message-text-area
160
160
  *ngIf="(openInfoConversation === false && isMobile === true) || (openInfoConversation === true && isMobile === false) || (openInfoConversation === false && isMobile === false)"
161
161
  [tagsCannedCount]="tagsCannedCount"
162
+ [areVisibleCAR]="areVisibleCAR"
162
163
  [loggedUser]="loggedUser"
163
164
  [conversationWith]="conversationWith"
164
165
  [tagsCannedFilter]="tagsCannedFilter"