@chat21/chat21-ionic 3.1.0-rc2 → 3.2.0-rc.1

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
@@ -1,5 +1,12 @@
1
1
  # chat21-ionic ver 3.0
2
2
 
3
+ ### 3.2.0-rc.1
4
+ - added: CONV_TYPE enum for all channel_type
5
+ - bug-fixed: do not sent automatic offline message if channel_type is messanger
6
+ - bug-fixed: disabled email section in conversation-detail footer if channel_type is whatsapp or messanger
7
+
8
+ ### 3.1.0 in PROD
9
+
3
10
  ### 3.1.0-rc2
4
11
  - changed: leadStyle storage property from appStorageService to localstorage 'custom_style' property
5
12
  - bug-fixed: projects dropdown don't truncate long project name text
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chat21/chat21-ionic",
3
3
  "author": "Tiledesk SRL",
4
- "version": "3.1.0-rc2",
4
+ "version": "3.2.0-rc.1",
5
5
  "license": "MIT License",
6
6
  "homepage": "https://tiledesk.com/",
7
7
  "repository": {
@@ -826,7 +826,7 @@ export class AppComponent implements OnInit {
826
826
  this.hadBeenCalledOpenModal = true;
827
827
  }
828
828
  }, 1000)
829
- }else{
829
+ }else {
830
830
  this.goToDashboardLogin()
831
831
  }
832
832
  }
@@ -95,23 +95,23 @@
95
95
  <ion-label>
96
96
  <div class="conversation_project truncate">
97
97
  <!-- DIRECT CONV -->
98
- <div *ngIf="conversation.channel_type === TYPE_DIRECT">
98
+ <div *ngIf="conversation.channel_type === CHANNEL_TYPE.DIRECT">
99
99
  <img class="channel-icon" src="assets/images/channel_icons/direct.svg">
100
100
  <span class="truncate">{{translationsMap.get('DIRECT_CHAT')}}</span>
101
101
  </div>
102
102
  <!-- GROUP CONV -->
103
- <div *ngIf="conversation.uid.startsWith(TYPE_GROUP)">
103
+ <div *ngIf="conversation.uid.startsWith(CHANNEL_TYPE.GROUP)">
104
104
  <img class="channel-icon" src="assets/images/channel_icons/group.svg">
105
105
  <span class="truncate">{{translationsMap.get('GROUP_CHAT')}}</span>
106
106
  </div>
107
107
  <!-- SUPPORT-GROUP CONV -->
108
- <div *ngIf="conversation.uid.startsWith(TYPE_SUPPORT_GROUP) && !IS_ON_MOBILE_DEVICE">
109
- <img class="channel-icon" src="assets/images/channel_icons/chat21.svg" *ngIf="conversation?.attributes && ( (conversation?.attributes?.request_channel && conversation?.attributes?.request_channel === CHANNEL_TYPE_CHAT21) || !conversation?.attributes?.request_channel) " >
110
- <img class="channel-icon" src="assets/images/channel_icons/email-logo.svg" *ngIf="conversation?.attributes && conversation?.attributes?.request_channel && conversation?.attributes?.request_channel === CHANNEL_TYPE_EMAIL" >
111
- <img class="channel-icon" src="assets/images/channel_icons/form-logo_v2.svg" *ngIf="conversation?.attributes && conversation?.attributes?.request_channel && conversation?.attributes?.request_channel === CHANNEL_TYPE_FORM" >
112
- <img class="channel-icon" src="assets/images/channel_icons/messenger-logo.svg" *ngIf="conversation?.attributes && conversation?.attributes?.request_channel && conversation?.attributes?.request_channel === CHANNEL_TYPE_MESSANGER" >
113
- <img class="channel-icon" src="assets/images/channel_icons/whatsapp-logo.svg" *ngIf="conversation?.attributes && conversation?.attributes?.request_channel && conversation?.attributes?.request_channel === CHANNEL_TYPE_WHATSAPP" >
114
- <img class="channel-icon" src="assets/images/channel_icons/telegram-logo.svg" *ngIf="conversation?.attributes && conversation?.attributes?.request_channel && conversation?.attributes?.request_channel === CHANNEL_TYPE_TELEGRAM" >
108
+ <div *ngIf="conversation.uid.startsWith(CHANNEL_TYPE.SUPPORT_GROUP) && !IS_ON_MOBILE_DEVICE">
109
+ <img class="channel-icon" src="assets/images/channel_icons/chat21.svg" *ngIf="conversation?.attributes && ( (conversation?.attributes?.request_channel && conversation?.attributes?.request_channel === CHANNEL_TYPE.CHAT21) || !conversation?.attributes?.request_channel) " >
110
+ <img class="channel-icon" src="assets/images/channel_icons/email-logo.svg" *ngIf="conversation?.attributes && conversation?.attributes?.request_channel && conversation?.attributes?.request_channel === CHANNEL_TYPE.EMAIL" >
111
+ <img class="channel-icon" src="assets/images/channel_icons/form-logo_v2.svg" *ngIf="conversation?.attributes && conversation?.attributes?.request_channel && conversation?.attributes?.request_channel === CHANNEL_TYPE.FORM" >
112
+ <img class="channel-icon" src="assets/images/channel_icons/messenger-logo.svg" *ngIf="conversation?.attributes && conversation?.attributes?.request_channel && conversation?.attributes?.request_channel === CHANNEL_TYPE.MESSENGER" >
113
+ <img class="channel-icon" src="assets/images/channel_icons/whatsapp-logo.svg" *ngIf="conversation?.attributes && conversation?.attributes?.request_channel && conversation?.attributes?.request_channel === CHANNEL_TYPE.WHATSAPP" >
114
+ <img class="channel-icon" src="assets/images/channel_icons/telegram-logo.svg" *ngIf="conversation?.attributes && conversation?.attributes?.request_channel && conversation?.attributes?.request_channel === CHANNEL_TYPE.TELEGRAM" >
115
115
  <span *ngIf="conversation?.attributes?.project_name" class="truncate">{{conversation?.attributes?.project_name}}</span>
116
116
  <span *ngIf="!conversation?.attributes?.project_name" class="truncate">{{conversation?.attributes?.projectId}}</span>
117
117
  </div>
@@ -1,8 +1,6 @@
1
- import { CHANNEL_TYPE_CHAT21, CHANNEL_TYPE_EMAIL, CHANNEL_TYPE_FORM, CHANNEL_TYPE_MESSANGER, CHANNEL_TYPE_TELEGRAM, CHANNEL_TYPE_WHATSAPP, TYPE_GROUP, TYPE_SUPPORT_GROUP } from './../../../../chat21-core/utils/constants';
2
- import { TYPE_DIRECT } from 'src/chat21-core/utils/constants';
1
+ import { CHANNEL_TYPE } from 'src/chat21-core/utils/constants';
3
2
  import { Component, EventEmitter, Input, IterableDiffers, KeyValueDiffers, OnInit, Output, SimpleChange } from '@angular/core';
4
3
  import { ConversationModel } from 'src/chat21-core/models/conversation';
5
- import { ImageRepoService } from 'src/chat21-core/providers/abstract/image-repo.service';
6
4
  import { convertMessage, isOnMobileDevice } from 'src/chat21-core/utils/utils';
7
5
  import { ListConversationsComponent } from '../list-conversations/list-conversations.component';
8
6
  import { Platform } from '@ionic/angular';
@@ -55,17 +53,8 @@ export class IonListConversationsComponent extends ListConversationsComponent im
55
53
  public youAreNoLongerAmongTheTeammatesManagingThisConversation_lbl: string;
56
54
  public ok_lbl: string;
57
55
 
58
- TYPE_DIRECT = TYPE_DIRECT;
59
- TYPE_GROUP = TYPE_GROUP;
60
- TYPE_SUPPORT_GROUP = TYPE_SUPPORT_GROUP;
61
-
62
56
  //ATTRIBUTES CHANNEL
63
- CHANNEL_TYPE_CHAT21 = CHANNEL_TYPE_CHAT21;
64
- CHANNEL_TYPE_EMAIL = CHANNEL_TYPE_EMAIL;
65
- CHANNEL_TYPE_FORM = CHANNEL_TYPE_FORM;
66
- CHANNEL_TYPE_MESSANGER = CHANNEL_TYPE_MESSANGER;
67
- CHANNEL_TYPE_WHATSAPP = CHANNEL_TYPE_WHATSAPP;
68
- CHANNEL_TYPE_TELEGRAM = CHANNEL_TYPE_TELEGRAM;
57
+ CHANNEL_TYPE = CHANNEL_TYPE
69
58
 
70
59
  IS_ON_MOBILE_DEVICE: boolean
71
60
  /**
@@ -38,18 +38,18 @@
38
38
  <span class="truncate">{{translationsMap.get('DIRECT_CHAT')}}</span> -->
39
39
  </div>
40
40
  <!-- GROUP CONV -->
41
- <div *ngIf="conversationUid?.startsWith(TYPE_GROUP)">
41
+ <div *ngIf="conversationUid?.startsWith(CHANNEL_TYPE.GROUP)">
42
42
  <svg xmlns="http://www.w3.org/2000/svg" height="15" width="15" viewBox="0 0 24 24" fill="#000000"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></svg>
43
43
  <span class="truncate">{{translationsMap.get('GROUP_CHAT')}}</span>
44
44
  </div>
45
45
  <!-- SUPPORT-GROUP CONV -->
46
- <div *ngIf="conversationUid?.startsWith(TYPE_SUPPORT_GROUP) && !IS_ON_MOBILE_DEVICE">
47
- <img class="channel-icon" src="assets/images/channel_icons/chat21.svg" *ngIf="( (conversationAvatar?.request_channel && conversationAvatar?.request_channel === CHANNEL_TYPE_CHAT21) || !conversationAvatar?.request_channel) " >
48
- <img class="channel-icon" src="assets/images/channel_icons/email-logo.svg" *ngIf="conversationAvatar?.request_channel && conversationAvatar?.request_channel === CHANNEL_TYPE_EMAIL" >
49
- <img class="channel-icon" src="assets/images/channel_icons/form-logo_v2.svg" *ngIf="conversationAvatar?.request_channel && conversationAvatar?.request_channel === CHANNEL_TYPE_FORM" >
50
- <img class="channel-icon" src="assets/images/channel_icons/messenger-logo.svg" *ngIf="conversationAvatar?.request_channel && conversationAvatar?.request_channel === CHANNEL_TYPE_MESSANGER" >
51
- <img class="channel-icon" src="assets/images/channel_icons/whatsapp-logo.svg" *ngIf="conversationAvatar?.request_channel && conversationAvatar?.request_channel === CHANNEL_TYPE_WHATSAPP" >
52
- <img class="channel-icon" src="assets/images/channel_icons/telegram-logo.svg" *ngIf="conversationAvatar?.request_channel && conversationAvatar?.request_channel === CHANNEL_TYPE_TELEGRAM" >
46
+ <div *ngIf="conversationUid?.startsWith(CHANNEL_TYPE.SUPPORT_GROUP) && !IS_ON_MOBILE_DEVICE">
47
+ <img class="channel-icon" src="assets/images/channel_icons/chat21.svg" *ngIf="( (conversationAvatar?.request_channel && conversationAvatar?.request_channel === CHANNEL_TYPE.CHAT21) || !conversationAvatar?.request_channel) " >
48
+ <img class="channel-icon" src="assets/images/channel_icons/email-logo.svg" *ngIf="conversationAvatar?.request_channel && conversationAvatar?.request_channel === CHANNEL_TYPE.EMAIL" >
49
+ <img class="channel-icon" src="assets/images/channel_icons/form-logo_v2.svg" *ngIf="conversationAvatar?.request_channel && conversationAvatar?.request_channel === CHANNEL_TYPE.FORM" >
50
+ <img class="channel-icon" src="assets/images/channel_icons/messenger-logo.svg" *ngIf="conversationAvatar?.request_channel && conversationAvatar?.request_channel === CHANNEL_TYPE.MESSENGER" >
51
+ <img class="channel-icon" src="assets/images/channel_icons/whatsapp-logo.svg" *ngIf="conversationAvatar?.request_channel && conversationAvatar?.request_channel === CHANNEL_TYPE.WHATSAPP" >
52
+ <img class="channel-icon" src="assets/images/channel_icons/telegram-logo.svg" *ngIf="conversationAvatar?.request_channel && conversationAvatar?.request_channel === CHANNEL_TYPE.TELEGRAM" >
53
53
  <span *ngIf="conversationAvatar?.project_name" class="truncate">{{conversationAvatar?.project_name}}</span>
54
54
  <span *ngIf="!conversationAvatar?.project_name" class="truncate">{{conversationAvatar?.projectId}}</span>
55
55
  </div>
@@ -1,4 +1,3 @@
1
- import { CHANNEL_TYPE_CHAT21, CHANNEL_TYPE_EMAIL, CHANNEL_TYPE_FORM, CHANNEL_TYPE_MESSANGER, CHANNEL_TYPE_TELEGRAM, CHANNEL_TYPE_WHATSAPP, TYPE_GROUP } from './../../../../chat21-core/utils/constants';
2
1
  import {
3
2
  Component,
4
3
  OnInit,
@@ -19,7 +18,7 @@ import { ModalController } from '@ionic/angular'
19
18
  import { EventsService } from 'src/app/services/events-service'
20
19
  import { CreateTicketPage } from 'src/app/modals/create-ticket/create-ticket.page'
21
20
  import { TiledeskService } from 'src/app/services/tiledesk/tiledesk.service'
22
- import { TYPE_DIRECT, TYPE_SUPPORT_GROUP } from 'src/chat21-core/utils/constants'
21
+ import { CHANNEL_TYPE } from 'src/chat21-core/utils/constants'
23
22
  import { isOnMobileDevice } from 'src/chat21-core/utils/utils';
24
23
 
25
24
  @Component({
@@ -48,16 +47,8 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
48
47
  IS_ON_MOBILE_DEVICE: boolean
49
48
  private logger: LoggerService = LoggerInstance.getInstance()
50
49
 
51
- TYPE_SUPPORT_GROUP = TYPE_SUPPORT_GROUP
52
- TYPE_GROUP = TYPE_GROUP
53
-
54
50
  //ATTRIBUTES CHANNEL
55
- CHANNEL_TYPE_CHAT21 = CHANNEL_TYPE_CHAT21;
56
- CHANNEL_TYPE_EMAIL = CHANNEL_TYPE_EMAIL;
57
- CHANNEL_TYPE_FORM = CHANNEL_TYPE_FORM;
58
- CHANNEL_TYPE_MESSANGER = CHANNEL_TYPE_MESSANGER;
59
- CHANNEL_TYPE_WHATSAPP = CHANNEL_TYPE_WHATSAPP;
60
- CHANNEL_TYPE_TELEGRAM = CHANNEL_TYPE_TELEGRAM;
51
+ CHANNEL_TYPE = CHANNEL_TYPE
61
52
 
62
53
  constructor(
63
54
  public imageRepoService: ImageRepoService,
@@ -96,7 +87,7 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
96
87
  // ----------------------------------------------------
97
88
  initialize() {
98
89
  this.getPlatformName()
99
- if ( this.conversationAvatar && this.conversationAvatar.channelType === TYPE_DIRECT ) {
90
+ if (this.conversationAvatar && this.conversationAvatar.channelType === CHANNEL_TYPE.DIRECT ) {
100
91
  this.isDirect = true
101
92
  }
102
93
  }
@@ -9,20 +9,20 @@
9
9
  </div>
10
10
  <!-- EMAIL-OPTION -->
11
11
  <div *ngIf="emailSection" class="section-option" id="email" tooltip="{{translationMap?.get('EMAIL.LABEL_TOOLTIP')}}" placement="top">
12
- <ion-button fill="clear" [class.active]="section==='email'" (click)="onOpenSection('email')" [disabled]="channelType === 'direct'">
12
+ <ion-button fill="clear" [class.active]="section==='email'" (click)="onOpenSection('email')" [disabled]="channelType === 'direct' || channel == CHANNEL_TYPE.WHATSAPP || channel == CHANNEL_TYPE.MESSENGER">
13
13
  <ion-icon name="mail-open"></ion-icon>
14
14
  {{translationMap.get('LABEL_EMAIL')}}
15
15
  </ion-button>
16
16
  </div>
17
17
 
18
18
  <div *ngIf="whatsappTemplatesSection" class="section-option" id="template" tooltip="{{translationMap?.get('WHATSAPP.LABEL_TOOLTIP')}}" placement="top">
19
- <ion-button fill="clear" [class.active]="section==='templates'" (click)="onOpenSection('templates');onOpenTemplateModal()" [disabled]="channel !== CHANNEL_TYPE_WHATSAPP">
19
+ <ion-button fill="clear" [class.active]="section==='templates'" (click)="onOpenSection('templates');onOpenTemplateModal()" [disabled]="channel !== CHANNEL_TYPE.WHATSAPP">
20
20
  <ion-icon name="logo-whatsapp"></ion-icon>
21
21
  {{translationMap?.get('WHATSAPP.LABEL_TEMPLATES')}}
22
22
  </ion-button>
23
23
  </div>
24
24
 
25
- <div *ngIf="section==='chat' && channel !== CHANNEL_TYPE_WHATSAPP && messageString && (leadInfo?.presence['status']==='offline' && leadInfo?.hasEmail)" class="section-option offline-lead-tip" >
25
+ <div *ngIf="section==='chat' && channel !== CHANNEL_TYPE.WHATSAPP && messageString && (leadInfo?.presence['status']==='offline' && leadInfo?.hasEmail)" class="section-option offline-lead-tip" >
26
26
  {{translationMap.get('EMAIL.EMAIL_OFFLINE_TIP')}}
27
27
  </div>
28
28
 
@@ -46,16 +46,16 @@
46
46
  <div class="canned-responses-btn-wpr"
47
47
  tooltip="{{translationMap?.get('CANNED_RESPONSES')}}" placement="top">
48
48
  <ion-button ion-button fill="clear" class="canned-responses-btn" (click)="openCannedResponses()"
49
- [disabled]="!conversationWith?.startsWith(TYPE_SUPPORT_GROUP) || disableTextarea">
49
+ [disabled]="!conversationWith?.startsWith(CHANNEL_TYPE.SUPPORT_GROUP) || disableTextarea">
50
50
  <ion-icon slot="icon-only" name="flash-outline" style="font-size: 24px;"></ion-icon>
51
51
  </ion-button>
52
52
  </div>
53
- <div *ngIf="conversationWith?.startsWith(TYPE_SUPPORT_GROUP) && tagsCannedCount === 0"
53
+ <div *ngIf="conversationWith?.startsWith(CHANNEL_TYPE.SUPPORT_GROUP) && tagsCannedCount === 0"
54
54
  tooltip="{{translationMap?.get('NO_CANNED_RESPONSES')}}" placement="top"
55
55
  class="no-canned-responses-btn-badge">
56
56
  <ion-icon name="alert-sharp" style="vertical-align: middle;"></ion-icon>
57
57
  </div>
58
- <div *ngIf="conversationWith?.startsWith(TYPE_SUPPORT_GROUP) && (tagsCannedCount > 0)"
58
+ <div *ngIf="conversationWith?.startsWith(CHANNEL_TYPE.SUPPORT_GROUP) && (tagsCannedCount > 0)"
59
59
  tooltip="{{translationMap?.get('YES_CANNED_RESPONSES')}}" placement="top" class="canned-responses-btn-badge">
60
60
  <ion-icon name="information-sharp" style="vertical-align: middle;"></ion-icon>
61
61
  </div>
@@ -143,6 +143,7 @@
143
143
  max-height: 184px;
144
144
  background-color: var(--textarea-background);
145
145
  color: var(--textarea-color);
146
+ --placeholder-color: var(--textarea-placeholder-color);
146
147
  // --padding-top: 5px; // NK edited
147
148
  --padding-top: 8px;
148
149
  --padding-bottom: 5px;
@@ -12,7 +12,7 @@ import { LoaderPreviewPage } from 'src/app/modals/loader-preview/loader-preview.
12
12
  // Services
13
13
  import { UploadService } from 'src/chat21-core/providers/abstract/upload.service';
14
14
  // utils
15
- import { CHANNEL_TYPE_WHATSAPP, TYPE_MSG_EMAIL, TYPE_MSG_TEXT, TYPE_SUPPORT_GROUP } from 'src/chat21-core/utils/constants';
15
+ import { TYPE_MSG_EMAIL, TYPE_MSG_TEXT, CHANNEL_TYPE } from 'src/chat21-core/utils/constants';
16
16
  // Models
17
17
  import { UploadModel } from 'src/chat21-core/models/upload';
18
18
 
@@ -74,9 +74,8 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
74
74
  public countClicks: number = 0;
75
75
  public IS_ON_MOBILE_DEVICE: boolean;
76
76
 
77
- TYPE_SUPPORT_GROUP = TYPE_SUPPORT_GROUP;
77
+ CHANNEL_TYPE = CHANNEL_TYPE;
78
78
  TYPE_MSG_TEXT = TYPE_MSG_TEXT;
79
- CHANNEL_TYPE_WHATSAPP = CHANNEL_TYPE_WHATSAPP;
80
79
  msg: string
81
80
 
82
81
  section: string= 'chat'
@@ -11,8 +11,6 @@ import { ConversationsHandlerService } from 'src/chat21-core/providers/abstract/
11
11
  import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';
12
12
  import { ContactsService } from 'src/app/services/contacts/contacts.service';
13
13
  import { AppConfigProvider } from '../../../services/app-config';
14
- import { setChannelType } from '../../../../chat21-core/utils/utils';
15
- import { TYPE_SUPPORT_GROUP, TYPE_DIRECT, TYPE_GROUP } from '../../../../chat21-core/utils/constants';
16
14
  import { DomSanitizer } from '@angular/platform-browser';
17
15
 
18
16
  import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
@@ -73,6 +73,7 @@ ion-content{
73
73
  ion-input{
74
74
  background-color: var(--textarea-background);
75
75
  color: var(--textarea-color);
76
+ --placeholder-color: var(--textarea-placeholder-color);
76
77
  }
77
78
 
78
79
  ion-footer {
@@ -60,8 +60,7 @@ import {
60
60
  TYPE_DIRECT,
61
61
  TYPE_MSG_EMAIL,
62
62
  TYPE_MSG_FORM,
63
- CHANNEL_TYPE_TELEGRAM,
64
- CHANNEL_TYPE_WHATSAPP,
63
+ CHANNEL_TYPE,
65
64
  INFO_MESSAGE_TYPE
66
65
  } from 'src/chat21-core/utils/constants'
67
66
  import {
@@ -347,8 +346,8 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
347
346
  conv.channel_type,
348
347
  null,
349
348
  conv.attributes['projectId'],
350
- conv.attributes['project_name']),
351
- conv.attributes['channel']
349
+ conv.attributes['project_name'],
350
+ conv.attributes['request_channel'])
352
351
  }
353
352
 
354
353
  }
@@ -1113,17 +1112,18 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
1113
1112
 
1114
1113
 
1115
1114
  const emailSectionMsg = (attributes && attributes['offline_channel'] === TYPE_MSG_EMAIL)
1116
- const channelIsNotEmailOrFormOrWhatsappOrTelegram = (attributes && attributes['request_channel'] && (attributes['request_channel'] === TYPE_MSG_EMAIL ||
1115
+ const channelIsNotWeb = (attributes && attributes['request_channel'] && (attributes['request_channel'] === TYPE_MSG_EMAIL ||
1117
1116
  attributes['request_channel'] === TYPE_MSG_FORM ||
1118
- attributes['request_channel'] === CHANNEL_TYPE_WHATSAPP ||
1119
- attributes['request_channel'] === CHANNEL_TYPE_TELEGRAM))
1117
+ attributes['request_channel'] === CHANNEL_TYPE.WHATSAPP ||
1118
+ attributes['request_channel'] === CHANNEL_TYPE.MESSENGER ||
1119
+ attributes['request_channel'] === CHANNEL_TYPE.TELEGRAM))
1120
1120
 
1121
1121
  if ((msg && msg.trim() !== '') || type !== TYPE_MSG_TEXT) {
1122
1122
 
1123
1123
 
1124
1124
  if (this.isEmailEnabled &&
1125
1125
  this.leadInfo && this.leadInfo.presence && this.leadInfo.presence['status'] === 'offline' &&
1126
- this.leadInfo.email && !emailSectionMsg && !channelIsNotEmailOrFormOrWhatsappOrTelegram) {
1126
+ this.leadInfo.email && !emailSectionMsg && !channelIsNotWeb) {
1127
1127
  this.logger.log('[CONVS-DETAIL] - SEND MESSAGE --> SENDING EMAIL', msg, this.leadInfo.email)
1128
1128
  let msgText = this.createEmailText(msg)
1129
1129
  this.sendEmail(msgText).subscribe(status => {
@@ -1,12 +1,4 @@
1
- import { style } from '@angular/animations';
2
1
  import { Injectable } from '@angular/core';
3
- import { BehaviorSubject } from 'rxjs';
4
- import { environment } from '../../environments/environment';
5
-
6
- /** CONSTANTS */
7
- import { CHANNEL_TYPE_GROUP } from 'src/chat21-core/utils/constants';
8
- import { getParameterByName } from 'src/chat21-core/utils/utils';
9
-
10
2
 
11
3
  @Injectable({
12
4
  providedIn: 'root'
@@ -40,14 +40,17 @@ export const PARENT_PAGE_DETAIL_CONVERSATION = 'dettaglio-conversazione ';
40
40
  export const BCK_COLOR_CONVERSATION_SELECTED = '#EEEEEE ';
41
41
  export const BCK_COLOR_CONVERSATION_UNSELECTED = '#FFFFFF ';
42
42
 
43
- export const TYPE_SUPPORT_GROUP = 'support-group';
44
- export const CHANNEL_TYPE_GROUP = 'group';
45
- export const CHANNEL_TYPE_CHAT21 = 'chat21';
46
- export const CHANNEL_TYPE_EMAIL = 'email';
47
- export const CHANNEL_TYPE_FORM = 'form';
48
- export const CHANNEL_TYPE_MESSANGER = 'messanger';
49
- export const CHANNEL_TYPE_WHATSAPP = 'whatsapp';
50
- export const CHANNEL_TYPE_TELEGRAM = 'telegram';
43
+ export enum CHANNEL_TYPE {
44
+ SUPPORT_GROUP = 'support-group',
45
+ GROUP = 'group',
46
+ DIRECT = 'direct',
47
+ CHAT21 = 'chat21',
48
+ EMAIL = 'email',
49
+ FORM = 'form',
50
+ MESSENGER = 'messenger',
51
+ WHATSAPP = 'whatsapp',
52
+ TELEGRAM = 'telegram'
53
+ }
51
54
 
52
55
  // TYPES MESSAGES
53
56
  export const TYPE_MSG_TEXT = 'text';
@@ -79,7 +82,8 @@ export enum INFO_MESSAGE_TYPE {
79
82
  MEMBER_LEFT_GROUP = "MEMBER_LEFT_GROUP",
80
83
  LEAD_UPDATED = "LEAD_UPDATED",
81
84
  TOUCHING_OPERATOR = "TOUCHING_OPERATOR",
82
- LIVE_PAGE = "LIVE_PAGE"
85
+ LIVE_PAGE = "LIVE_PAGE",
86
+ PLAN_EXPIRED = "PLAN_EXPIRED"
83
87
  }
84
88
 
85
89
 
@@ -1,4 +1,4 @@
1
- import { TYPE_DIRECT, TYPE_SUPPORT_GROUP } from 'src/chat21-core/utils/constants';
1
+ import { CHANNEL_TYPE } from 'src/chat21-core/utils/constants';
2
2
  import { ConversationModel } from 'src/chat21-core/models/conversation';
3
3
  import { Inject, Injectable, OnInit } from '@angular/core';
4
4
  import { avatarPlaceholder, getColorBck } from './utils-user';
@@ -17,7 +17,7 @@ export class ConvertRequestToConversation {
17
17
  return new ConversationModel(
18
18
  request.request_id,
19
19
  request.attributes,
20
- request.request_id && (request.request_id.startsWith('group-') || request.request_id.startsWith('support-group'))? TYPE_SUPPORT_GROUP: TYPE_DIRECT,
20
+ request.request_id && (request.request_id.startsWith('group-') || request.request_id.startsWith('support-group'))? CHANNEL_TYPE.SUPPORT_GROUP: CHANNEL_TYPE.DIRECT,
21
21
  request.lead && request.lead.fullname ? request.lead.fullname: null,
22
22
  request.request_id,
23
23
  request.request_id,
@@ -6,9 +6,8 @@ import {
6
6
  MESSAGE_TYPE_MINE,
7
7
  MESSAGE_TYPE_OTHERS,
8
8
  MAX_WIDTH_IMAGES,
9
- CHANNEL_TYPE_GROUP,
10
- TYPE_SUPPORT_GROUP,
11
- INFO_MESSAGE_TYPE
9
+ INFO_MESSAGE_TYPE,
10
+ CHANNEL_TYPE
12
11
  } from '../../chat21-core/utils/constants';
13
12
 
14
13
  /** */
@@ -153,7 +152,7 @@ export function getSizeImg(message: any, maxWidthImage?: number): any {
153
152
 
154
153
  /** */
155
154
  export function isChannelTypeGroup(channelType: string) {
156
- if (channelType === CHANNEL_TYPE_GROUP || channelType === TYPE_SUPPORT_GROUP) {
155
+ if (channelType === CHANNEL_TYPE.GROUP || channelType === CHANNEL_TYPE.SUPPORT_GROUP) {
157
156
  return true;
158
157
  }
159
158
  return false;
@@ -2,15 +2,13 @@
2
2
  import * as moment from 'moment/moment';
3
3
  // import * as moment from 'moment-timezone';
4
4
  import 'moment/locale/it.js';
5
- import { FIREBASESTORAGE_BASE_URL_IMAGE, STORAGE_PREFIX, TYPE_GROUP } from './constants';
5
+ import { CHANNEL_TYPE } from './constants';
6
6
 
7
7
  import { HttpClient } from '@angular/common/http';
8
8
  import { TranslateHttpLoader } from '@ngx-translate/http-loader';
9
- import { AngularDelegate, ModalController } from '@ionic/angular';
9
+ import { ModalController } from '@ionic/angular';
10
10
  import { ConversationModel } from '../models/conversation';
11
11
 
12
- import { MAX_WIDTH_IMAGES, TYPE_DIRECT, TYPE_SUPPORT_GROUP } from './constants';
13
-
14
12
  import { avatarPlaceholder, getColorBck } from './utils-user';
15
13
 
16
14
  /**
@@ -536,9 +534,9 @@ export function setConversationAvatar(
536
534
 
537
535
  /** */
538
536
  export function setChannelType(conversationWith: string): string {
539
- let channelType = TYPE_DIRECT;
540
- if (conversationWith.includes(TYPE_GROUP + '-')) {
541
- channelType = TYPE_GROUP;
537
+ let channelType = CHANNEL_TYPE.DIRECT;
538
+ if (conversationWith.includes(CHANNEL_TYPE.GROUP + '-')) {
539
+ channelType = CHANNEL_TYPE.GROUP;
542
540
  }
543
541
  return channelType;
544
542
  }
@@ -266,7 +266,8 @@ body {
266
266
  // --date-divider-text-color: #64748b;
267
267
  // --message-date-color: #647491;
268
268
  // --textarea-background: var(--basic-blue-02);
269
- // --textarea-color: var(--icon-color);
269
+ // --textarea-placeholder-color: var(--icon-color);
270
+ // --textarea-color: #ffffff;
270
271
  // // ***** Conversation-detail: end ***** //
271
272
 
272
273
  // // ***** Conversation-detail: INFO-MESSAGE: start ***** //
@@ -53,7 +53,8 @@ body {
53
53
  --date-divider-text-color: #64748b;
54
54
  --message-date-color: #647491;
55
55
  --textarea-background: #0000000d;
56
- --textarea-color: var(--icon-color);
56
+ --textarea-placeholder-color: var(--icon-color);
57
+ --textarea-color: #06132b;
57
58
  // ***** Conversation-detail: end ***** //
58
59
 
59
60
  // ***** Conversation-detail PRIVATE-MSG: start ***** //