@chat21/chat21-ionic 3.0.64 → 3.0.65-rc1

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 (38) hide show
  1. package/CHANGELOG.md +16 -2
  2. package/deploy_amazon_prod.sh +2 -1
  3. package/deploy_pre.sh +39 -6
  4. package/deploy_prod.sh +3 -0
  5. package/package.json +6 -1
  6. package/publiccode.yml +110 -0
  7. package/src/app/app.component.ts +50 -57
  8. package/src/app/app.module.ts +1 -0
  9. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +2 -2
  10. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +0 -1
  11. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +2 -39
  12. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +18 -6
  13. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +2 -2
  14. package/src/app/chatlib/conversation-detail/message/html/html.component.html +1 -0
  15. package/src/app/chatlib/conversation-detail/message/html/html.component.scss +79 -0
  16. package/src/app/chatlib/conversation-detail/message/html/html.component.spec.ts +25 -0
  17. package/src/app/chatlib/conversation-detail/message/html/html.component.ts +33 -0
  18. package/src/app/chatlib/list-conversations-component/list-conversations/list-conversations.component.ts +0 -1
  19. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +1 -1
  20. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +19 -0
  21. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component_2.html +116 -0
  22. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +2 -2
  23. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +2 -2
  24. package/src/app/directives/safe-html.pipe.ts +2 -2
  25. package/src/app/directives/truncate.pipe.spec.ts +8 -0
  26. package/src/app/directives/truncate.pipe.ts +16 -0
  27. package/src/app/pages/conversation-detail/conversation-detail.module.ts +3 -2
  28. package/src/app/pages/conversation-detail/conversation-detail.page.html +4 -2
  29. package/src/app/pages/conversation-detail/conversation-detail.page.ts +12 -23
  30. package/src/app/pages/conversations-list/conversations-list.page.html +21 -12
  31. package/src/app/pages/conversations-list/conversations-list.page.ts +104 -366
  32. package/src/app/pages/loader-preview/loader-preview.module.ts +1 -2
  33. package/src/app/shared/shared.module.ts +4 -0
  34. package/src/assets/js/chat21client.js +1 -1
  35. package/src/chat21-core/models/conversation.ts +1 -1
  36. package/src/chat21-core/providers/abstract/conversations-handler.service.ts +1 -1
  37. package/src/chat21-core/providers/firebase/firebase-conversations-handler.ts +47 -8
  38. package/src/chat21-core/utils/utils-message.ts +2 -3
@@ -20,7 +20,7 @@ export class BubbleMessageComponent implements OnInit, OnChanges {
20
20
  @Input() message: MessageModel;
21
21
  @Input() textColor: string;
22
22
  @Input() areVisibleCAR: boolean;
23
- @Input() support_mode: boolean;
23
+ @Input() supportMode: boolean;
24
24
  @Output() onBeforeMessageRender = new EventEmitter();
25
25
  @Output() onAfterMessageRender = new EventEmitter();
26
26
  @Output() onImageRendered = new EventEmitter<boolean>()
@@ -89,7 +89,7 @@ export class BubbleMessageComponent implements OnInit, OnChanges {
89
89
  ngOnChanges() {
90
90
  this.logger.log('BUBBLE-MSG Hello !!!! this.message ', this.message)
91
91
  this.logger.log('BUBBLE-MSG ngOnChanges areVisibleCAR', this.areVisibleCAR)
92
- this.logger.log('BUBBLE-MSG ngOnChanges support_mode', this.support_mode)
92
+ this.logger.log('BUBBLE-MSG ngOnChanges supportMode', this.supportMode)
93
93
  if (this.message && this.message.metadata && typeof this.message.metadata === 'object') {
94
94
  this.getMetadataSize(this.message.metadata)
95
95
  }
@@ -0,0 +1 @@
1
+ <div id="htmlCode" #htmlCode [innerHTML]="htmlText | safeHtml"></div>
@@ -0,0 +1,79 @@
1
+ // @import '../../../../sass/variables';
2
+
3
+ :root {
4
+ --themeColor: #62a8ea;
5
+ --foregroundColor: #ffffff;
6
+ --buttonFontSize: 12px;
7
+ }
8
+
9
+
10
+ ::ng-deep {
11
+
12
+ .button-html {
13
+ padding: 8px 16px!important;
14
+ position: relative;
15
+ max-width: 300px;
16
+ min-width: inherit;
17
+ cursor: pointer !important;
18
+ border: 1px solid #62a8ea;
19
+ border-radius: 20px;
20
+ margin: 3px;
21
+ background: transparent;
22
+ overflow: hidden;
23
+ font-family: 'Muli', sans-serif !important;
24
+ font-size: 12px !important;
25
+ -o-text-overflow: ellipsis;
26
+ text-overflow: ellipsis;
27
+ white-space: nowrap;
28
+ letter-spacing: -0.24px;
29
+ -webkit-font-smoothing: antialiased;
30
+ color: #62a8ea;
31
+ line-height: 16px;
32
+
33
+ }
34
+
35
+ .url {
36
+ transition: background-color .6s ease;
37
+ .icon-button-action {
38
+ position: absolute;
39
+ top: -1px;
40
+ right: 1px;
41
+ svg {
42
+ fill: #62a8ea;
43
+ }
44
+ }
45
+ .icon-button-action-self{
46
+ position: absolute;
47
+ right: 1px;
48
+ svg {
49
+ fill: #62a8ea;
50
+ }
51
+ }
52
+ &:focus,
53
+ &:hover {
54
+ color: white;
55
+ background: #62a8ea;
56
+ .icon-button-action, .icon-button-action-self {
57
+ svg {
58
+ fill: white;
59
+ }
60
+ }
61
+ }
62
+ &:active{
63
+ font-size: 20px;
64
+ }
65
+ }
66
+
67
+ .text-html{
68
+ font-size: 1.4em;
69
+ margin: 0;
70
+ padding: 8px;
71
+ font-style: normal;
72
+ letter-spacing: normal;
73
+ font-stretch: normal;
74
+ font-variant: normal;
75
+ font-weight: 300;
76
+ overflow: hidden;
77
+ }
78
+
79
+ }
@@ -0,0 +1,25 @@
1
+ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { HtmlComponent } from './html.component';
4
+
5
+ describe('HtmlComponent', () => {
6
+ let component: HtmlComponent;
7
+ let fixture: ComponentFixture<HtmlComponent>;
8
+
9
+ beforeEach(async(() => {
10
+ TestBed.configureTestingModule({
11
+ declarations: [ HtmlComponent ]
12
+ })
13
+ .compileComponents();
14
+ }));
15
+
16
+ beforeEach(() => {
17
+ fixture = TestBed.createComponent(HtmlComponent);
18
+ component = fixture.componentInstance;
19
+ fixture.detectChanges();
20
+ });
21
+
22
+ it('should create', () => {
23
+ expect(component).toBeTruthy();
24
+ });
25
+ });
@@ -0,0 +1,33 @@
1
+ import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
2
+ import { Component, ElementRef, Input, OnInit, SimpleChange, SimpleChanges, ViewChild, ViewEncapsulation } from '@angular/core';
3
+
4
+ @Component({
5
+ selector: 'chat-html',
6
+ templateUrl: './html.component.html',
7
+ styleUrls: ['./html.component.scss']
8
+ })
9
+ export class HtmlComponent implements OnInit {
10
+
11
+ @Input() htmlText: string;
12
+ @Input() fontSize: string;
13
+ @Input() themeColor: string;
14
+ @Input() foregroundColor: string;
15
+
16
+ @ViewChild('htmlCode', {static: true}) container;
17
+
18
+ constructor(private elementRef: ElementRef) { }
19
+
20
+ ngOnInit(){
21
+
22
+ }
23
+
24
+ ngOnChanges(changes: SimpleChanges){
25
+ //decomment if element should have same color of themeColor and fregroundColor
26
+ if(this.fontSize) this.elementRef.nativeElement.style.setProperty('--buttonFontSize', this.fontSize);
27
+ if(this.themeColor) this.elementRef.nativeElement.style.setProperty('--themeColor', this.themeColor);
28
+ if(this.foregroundColor) this.elementRef.nativeElement.style.setProperty('--foregroundColor', this.foregroundColor);
29
+ }
30
+
31
+
32
+
33
+ }
@@ -59,7 +59,6 @@ export class ListConversationsComponent implements OnInit {
59
59
  public openConversationByID(conversation) {
60
60
  this.logger.log('[LISTCONVERSATIONS-W] openConversationByID: ', conversation);
61
61
  if (conversation) {
62
- this.logger.log(conversation.recipient_fullname)
63
62
  // this.conversationsService.updateIsNew(conversation);
64
63
  // this.conversationsService.updateConversationBadge();
65
64
  this.uidConvSelected = conversation.uid
@@ -32,7 +32,7 @@
32
32
  <!-- (click)="onOpenCloseInfoConversation()" -->
33
33
  <div *ngIf="conversationAvatar" class="tile-info-with"
34
34
  [ngClass]="{ 'tile-info-with-ios': platformName === 'ios' }">
35
- <span class="tile-username">{{ conversationAvatar.conversation_with_fullname }} </span>
35
+ <span class="tile-username">{{ conversationAvatar.conversation_with_fullname | truncate:50 }} </span>
36
36
  <!-- <span class="tile-username">{{ conversation_with_fullname }} </span> -->
37
37
 
38
38
  </div>
@@ -4,6 +4,25 @@ ion-header {
4
4
  border-bottom-style: solid;
5
5
  border-color: var(--light-gray);
6
6
  border-bottom-width: thin;
7
+ ion-toolbar{
8
+ height: 60px;
9
+ .flex-container{
10
+ display: flex;
11
+ }
12
+
13
+ .back-flex-container{
14
+ flex: 0 1 auto;
15
+ order: 0;
16
+ }
17
+ .user-info-flex-container{
18
+ flex: 0 1 auto;
19
+ order: 1;
20
+ }
21
+ .resolve-flex-container{
22
+ flex: 0 1 auto;
23
+ order: 2;
24
+ }
25
+ }
7
26
  ion-title {
8
27
  text-align: left;
9
28
  height: 40px;
@@ -0,0 +1,116 @@
1
+ <ion-header no-border class="ion-no-border">
2
+ <ion-toolbar style="height:60px">
3
+ <div class="flex-container">
4
+ <div class="back-flex-container">
5
+ <ion-buttons slot="start" style="height:60px">
6
+ <!-- (click)="pushPage('conversations-list')" defaultHref="/conversations-list" -->
7
+ <ion-back-button style="display: block;" text="" *ngIf="isMobile" (click)="goBackToConversationList()">
8
+ </ion-back-button>
9
+ </ion-buttons>
10
+ </div>
11
+ <div class="user-info-flex-container">
12
+ <div style="display: flex;">
13
+ <div>1</div>
14
+ <div>2</div>
15
+ </div>
16
+ </div>
17
+
18
+ <div class="resolve-flex-container">
19
+ <ion-buttons slot="end">
20
+
21
+ <!-- <ion-button ion-button fill="clear" color="primary" size="small" (click)="presentCreateTicketModal()" [ngClass]="{'resolve-conv-margin-right': !isMobile}">
22
+ <ion-icon name="ticket-outline"></ion-icon>
23
+ <span style="text-transform: capitalize; margin-left: 5px;"> {{ 'Crea ticket' | translate}} </span>
24
+ </ion-button> -->
25
+
26
+ <ion-button *ngIf="conversationUid?.startsWith('support-group') && conv_type !== 'archived'" ion-button fill="clear" color="primary" size="small"
27
+ (click)="closeConversation()" [ngClass]="{'resolve-conv-margin-right': !isMobile}" [disabled]="conv_closed === true">
28
+ <!-- <ion-icon slot="icon-only" name="alert-circle-outline"></ion-icon> -->
29
+ <ion-icon name="archive-outline"></ion-icon>
30
+ <!-- <ion-icon slot="icon-only" name="information-outline"></ion-icon> -->
31
+ <span style="text-transform: capitalize; margin-left: 5px;"> {{ 'Resolve' | translate}} </span>
32
+ </ion-button>
33
+
34
+ <ion-button *ngIf="!openInfoConversation" ion-button fill="clear" (click)="onOpenCloseInfoConversation()">
35
+ <!-- <ion-icon slot="icon-only" name="alert-circle-outline"></ion-icon> -->
36
+ <ion-icon slot="icon-only" name="information-circle-outline"></ion-icon>
37
+ <!-- <ion-icon slot="icon-only" name="information-outline"></ion-icon> -->
38
+
39
+ </ion-button>
40
+ <ion-button *ngIf="openInfoConversation" ion-button fill="clear" (click)="onOpenCloseInfoConversation()">
41
+ <ion-icon slot="icon-only" name="close-circle-outline"></ion-icon>
42
+ </ion-button>
43
+
44
+ </ion-buttons>
45
+ </div>
46
+
47
+ </div>
48
+ </ion-toolbar>
49
+ </ion-header>
50
+
51
+
52
+
53
+
54
+ <ion-title [class.info-open]="openInfoConversation || openInfoMessage">
55
+
56
+ <div *ngIf="conversationAvatar" class="avatar-and-typing-wpr" >
57
+ <!-- [ngStyle] = "{ 'left': platformName === 'ios' ? '55px' : '' }" -->
58
+ <div *ngIf="conversationAvatar" class="avatar-container" (click)="onOpenCloseInfoConversation()" style="cursor: pointer"
59
+ [ngClass]="{ 'avatar-container-ios': platformName === 'ios' }">
60
+ <app-avatar-profile [itemAvatar]=conversationAvatar></app-avatar-profile>
61
+ </div>
62
+ <!-- [ngStyle] = "{ 'left': platformName === 'ios' ? '63px' : '' }" -->
63
+ <div *ngIf="isDirect" class="user-presence" [ngClass]="{ 'user-presence-ios': platformName === 'ios' }">
64
+ <app-user-presence [idUser]=conversationAvatar.conversation_with [translationMap]=translationMap
65
+ [borderColor]=borderColor [fontColor]=fontColor>
66
+ </app-user-presence>
67
+ </div>
68
+
69
+ <div *ngIf="conversationAvatar" class="user-typing">
70
+ <app-user-typing [idConversation]=conversationAvatar.uid [idCurrentUser]=idLoggedUser [isDirect]=isDirect
71
+ [translationMap]=translationMap [color]=fontColor [membersConversation]=membersConversation>
72
+ </app-user-typing>
73
+ </div>
74
+
75
+ </div>
76
+ <!-- [ngClass] = "{ 'tile-info-with-ios': platformName === 'ios' ? '82px' : ''82px'' }" -->
77
+ <!-- (click)="onOpenCloseInfoConversation()" -->
78
+ <div *ngIf="conversationAvatar" class="tile-info-with"
79
+ [ngClass]="{ 'tile-info-with-ios': platformName === 'ios' }">
80
+ <span class="tile-username">{{ conversationAvatar.conversation_with_fullname | truncate:50 }} </span>
81
+ <!-- <span class="tile-username">{{ conversation_with_fullname }} </span> -->
82
+
83
+ </div>
84
+
85
+ <!-- <div *ngIf="conversationWithFullname" class="tile-info-with" (click)="onOpenCloseInfoConversation()">
86
+ <span class="tile-username">{{ conversationWithFullname }} </span>
87
+ </div> -->
88
+
89
+ </ion-title>
90
+ <!-- openInfoConversation {{openInfoConversation}} -->
91
+ <ion-buttons slot="end">
92
+
93
+ <!-- <ion-button ion-button fill="clear" color="primary" size="small" (click)="presentCreateTicketModal()" [ngClass]="{'resolve-conv-margin-right': !isMobile}">
94
+ <ion-icon name="ticket-outline"></ion-icon>
95
+ <span style="text-transform: capitalize; margin-left: 5px;"> {{ 'Crea ticket' | translate}} </span>
96
+ </ion-button> -->
97
+
98
+ <ion-button *ngIf="conversationUid?.startsWith('support-group') && conv_type !== 'archived'" ion-button fill="clear" color="primary" size="small"
99
+ (click)="closeConversation()" [ngClass]="{'resolve-conv-margin-right': !isMobile}" [disabled]="conv_closed === true">
100
+ <!-- <ion-icon slot="icon-only" name="alert-circle-outline"></ion-icon> -->
101
+ <ion-icon name="archive-outline"></ion-icon>
102
+ <!-- <ion-icon slot="icon-only" name="information-outline"></ion-icon> -->
103
+ <span style="text-transform: capitalize; margin-left: 5px;"> {{ 'Resolve' | translate}} </span>
104
+ </ion-button>
105
+
106
+ <ion-button *ngIf="!openInfoConversation" ion-button fill="clear" (click)="onOpenCloseInfoConversation()">
107
+ <!-- <ion-icon slot="icon-only" name="alert-circle-outline"></ion-icon> -->
108
+ <ion-icon slot="icon-only" name="information-circle-outline"></ion-icon>
109
+ <!-- <ion-icon slot="icon-only" name="information-outline"></ion-icon> -->
110
+
111
+ </ion-button>
112
+ <ion-button *ngIf="openInfoConversation" ion-button fill="clear" (click)="onOpenCloseInfoConversation()">
113
+ <ion-icon slot="icon-only" name="close-circle-outline"></ion-icon>
114
+ </ion-button>
115
+
116
+ </ion-buttons>
@@ -40,7 +40,7 @@
40
40
 
41
41
  <div class="start-buttons" style="position: absolute;display: flex; top: 2px;">
42
42
 
43
- <ng-container *ngIf="areVisibleCAR && support_mode === true">
43
+ <ng-container *ngIf="areVisibleCAR && supportMode">
44
44
  <div class="canned-responses-btn-wpr" style="margin-left: -5px;"
45
45
  tooltip="{{translationMap?.get('CANNED_RESPONSES')}}" [options]="tooltipOptions" placement="top">
46
46
  <ion-button ion-button fill="clear" class="canned-responses-btn" (click)="openCannedResponses()"
@@ -110,7 +110,7 @@
110
110
 
111
111
 
112
112
 
113
- <div class="text-message" [ngClass]="{'text-message-no-cr': areVisibleCAR === false || support_mode === false}">
113
+ <div class="text-message" [ngClass]="{'text-message-no-cr': areVisibleCAR === false || supportMode === false}">
114
114
  <ion-textarea id="ion-textarea" #messageTextArea #message_text_area #textArea rows="1"
115
115
  [placeholder]="TEXAREA_PLACEHOLDER" autosize="false" auto-grow="true" autofocus="true" [value]=""
116
116
  [(ngModel)]="messageString" (ionChange)="ionChange($event);" [disabled]="disableTextarea"
@@ -46,7 +46,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
46
46
  @Input() tagsCannedFilter: any = [];
47
47
  @Input() tagsCannedCount: number;
48
48
  @Input() areVisibleCAR: boolean;
49
- @Input() support_mode: boolean;
49
+ @Input() supportMode: boolean;
50
50
  @Input() events: Observable<void>;
51
51
  @Input() fileUploadAccept: string
52
52
  @Input() isOpenInfoConversation: boolean;
@@ -157,7 +157,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
157
157
  } else {
158
158
  this.IS_SUPPORT_GROUP_CONVERSATION = false
159
159
  }
160
- this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges support_mode ', this.support_mode)
160
+ this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges supportMode ', this.supportMode)
161
161
  this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges disableTextarea ', this.disableTextarea)
162
162
  this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges DROP EVENT ", this.dropEvent);
163
163
  this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges tagsCannedFilter ", this.tagsCannedFilter);
@@ -8,8 +8,8 @@ export class SafeHtmlPipe implements PipeTransform {
8
8
 
9
9
  transform(html) {
10
10
  // console.log('SafeHtmlPipe html ', html)
11
- // return this.sanitizer.bypassSecurityTrustHtml(html);
12
- return this.sanitizer.bypassSecurityTrustResourceUrl(html);
11
+ // return this.sanitizer.bypassSecurityTrustResourceUrl(html);
12
+ return this.sanitizer.bypassSecurityTrustHtml(html);
13
13
 
14
14
  }
15
15
 
@@ -0,0 +1,8 @@
1
+ import { TruncatePipe } from './truncate.pipe';
2
+
3
+ describe('TruncatePipe', () => {
4
+ it('create an instance', () => {
5
+ const pipe = new TruncatePipe();
6
+ expect(pipe).toBeTruthy();
7
+ });
8
+ });
@@ -0,0 +1,16 @@
1
+ import { Pipe, PipeTransform } from '@angular/core';
2
+
3
+ @Pipe({
4
+ name: 'truncate'
5
+ })
6
+ export class TruncatePipe implements PipeTransform {
7
+
8
+ transform(value: string, character: number): any {
9
+ console.log('stringggg', value, character)
10
+ if(value && value.length > character)
11
+ return value.substring(0, character) + ' ...'
12
+ else
13
+ return value;
14
+ }
15
+
16
+ }
@@ -1,3 +1,4 @@
1
+ import { TruncatePipe } from './../../directives/truncate.pipe';
1
2
  import { IonConversationDetailComponent } from '../../chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component';
2
3
  import { TooltipModule } from 'ng2-tooltip-directive';
3
4
  import { NgModule } from '@angular/core';
@@ -32,7 +33,6 @@ import { InfoGroupComponent } from 'src/app/components/conversation-info/info-gr
32
33
 
33
34
 
34
35
  import { SharedModule } from 'src/app/shared/shared.module';
35
- // import { SharedConversationInfoModule } from 'src/app/shared/shared-conversation-info.module';
36
36
  import { NgxLinkifyjsModule } from 'ngx-linkifyjs';
37
37
  import { ScrollbarThemeModule } from '../../utils/scrollbar-theme.directive';
38
38
  import { PickerModule } from '@ctrl/ngx-emoji-mart';
@@ -62,7 +62,7 @@ import { PickerModule } from '@ctrl/ngx-emoji-mart';
62
62
  declarations: [
63
63
  ConversationDetailPage,
64
64
  HeaderConversationDetailComponent,
65
- MessageTextAreaComponent
65
+ MessageTextAreaComponent,
66
66
  // BubbleDayMessageComponent,
67
67
  // BubbleSystemMessageComponent,
68
68
  // BubbleMyMessageComponent,
@@ -71,6 +71,7 @@ import { PickerModule } from '@ctrl/ngx-emoji-mart';
71
71
  // InfoSupportGroupComponent,
72
72
  // InfoDirectComponent,
73
73
  // InfoGroupComponent,
74
+ TruncatePipe
74
75
  ]
75
76
  })
76
77
  export class ConversationDetailPageModule {}
@@ -122,7 +122,9 @@
122
122
  [channelType]="channelType"
123
123
  [messages]="messages"
124
124
  [senderId]="loggedUser.uid"
125
- [baseLocation]="window?.location?.origin"
125
+ [baseLocation]="window?.location?.origin"
126
+ [areVisibleCAR]="areVisibleCAR"
127
+ [supportMode]= "supportMode"
126
128
  [stylesMap]="styleMap"
127
129
  (onBeforeMessageRender)="returnOnBeforeMessageRender($event)"
128
130
  (onAfterMessageRender)="returnOnAfterMessageRender($event)"
@@ -176,7 +178,7 @@
176
178
  <app-message-text-area *ngIf="(openInfoConversation === false && isMobile === true) || (openInfoConversation === true && isMobile === false) || (openInfoConversation === false && isMobile === false)"
177
179
  [tagsCannedCount]="tagsCannedCount"
178
180
  [areVisibleCAR]="areVisibleCAR"
179
- [support_mode]="support_mode"
181
+ [supportMode]="supportMode"
180
182
  [loggedUser]="loggedUser"
181
183
  [conversationWith]="conversationWith"
182
184
  [tagsCannedFilter]="tagsCannedFilter"
@@ -143,7 +143,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
143
143
  arrowkeyLocation = -1
144
144
  public_Key: any;
145
145
  areVisibleCAR: boolean;
146
- support_mode: boolean;
146
+ supportMode: boolean;
147
147
  //SOUND
148
148
  setTimeoutSound: any;
149
149
  audio: any;
@@ -313,7 +313,6 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
313
313
  const conversations = this.conversationsHandlerService.conversations
314
314
  // console.log('[CONVS-DETAIL] conversations', conversations);
315
315
  this.conversation_count = conversations.length
316
- this.logger.log('[CONVS-DETAIL] conversation_count', this.conversation_count)
317
316
  })
318
317
 
319
318
  this.conversationsHandlerService.conversationChanged.subscribe((conv) => {
@@ -321,7 +320,6 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
321
320
  const conversations = this.conversationsHandlerService.conversations
322
321
  // console.log('[CONVS-DETAIL] conversations', conversations);
323
322
  this.conversation_count = conversations.length
324
- this.logger.log('[CONVS-DETAIL] conversation_count', this.conversation_count)
325
323
  if (conv && conv.sender !== this.loggedUser.uid) {
326
324
  this.logger.log('[CONVS-DETAIL] subscribe to BSConversationsChange data sender ', conv.sender)
327
325
  this.logger.log('[CONVS-DETAIL] subscribe to BSConversationsChange this.loggedUser.uid ', this.loggedUser.uid)
@@ -333,8 +331,8 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
333
331
  // ARE AT THE END
334
332
  this.updateConversationBadge()
335
333
  }
336
- if (conv.uid === this.conversationWith) {
337
- this.conversationAvatar = setConversationAvatar(conv.conversation_with, conv.conversation_with_fullname, conv.channel_type)
334
+ if(conv.uid && conv.uid === this.conversationWith){
335
+ this.conversationAvatar = setConversationAvatar(conv.conversation_with,conv.conversation_with_fullname,conv.channel_type)
338
336
  }
339
337
 
340
338
  }
@@ -354,15 +352,15 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
354
352
  }
355
353
 
356
354
  getOSCODE() {
357
- this.support_mode = null
355
+ this.supportMode = null
358
356
  if (this.appConfigProvider.getConfig().supportMode === true || this.appConfigProvider.getConfig().supportMode === 'true') {
359
- this.support_mode = true
357
+ this.supportMode = true
360
358
  } else if (this.appConfigProvider.getConfig().supportMode === false || this.appConfigProvider.getConfig().supportMode === 'false') {
361
- this.support_mode = false
359
+ this.supportMode = false
362
360
  } else if (!this.appConfigProvider.getConfig().supportMode) {
363
- this.support_mode = false
361
+ this.supportMode = false
364
362
  }
365
- this.logger.log('[CONVS-DETAIL] AppConfigService getAppConfig support_mode', this.support_mode)
363
+ this.logger.log('[CONVS-DETAIL] AppConfigService getAppConfig supportMode', this.supportMode)
366
364
  this.public_Key = this.appConfigProvider.getConfig().t2y12PruGU9wUtEGzBJfolMIgK
367
365
  this.logger.log('[CONVS-DETAIL] AppConfigService getAppConfig public_Key', this.public_Key)
368
366
 
@@ -375,26 +373,17 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
375
373
  let car = key.split(':')
376
374
  if (car[1] === 'F') {
377
375
  this.areVisibleCAR = false
378
- this.logger.log(
379
- '[CONVS-DETAIL] PUBLIC-KEY - areVisibleCAR',
380
- this.areVisibleCAR,
381
- )
376
+ this.logger.log('[CONVS-DETAIL] PUBLIC-KEY - areVisibleCAR',this.areVisibleCAR)
382
377
  } else {
383
378
  this.areVisibleCAR = true
384
- this.logger.log(
385
- '[CONVS-DETAIL] PUBLIC-KEY - areVisibleCAR',
386
- this.areVisibleCAR,
387
- )
379
+ this.logger.log('[CONVS-DETAIL] PUBLIC-KEY - areVisibleCAR',this.areVisibleCAR)
388
380
  }
389
381
  }
390
382
  })
391
383
 
392
384
  if (!this.public_Key.includes('CAR')) {
393
385
  this.areVisibleCAR = false
394
- this.logger.log(
395
- '[CONVS-DETAIL] PUBLIC-KEY - areVisibleCAR',
396
- this.areVisibleCAR,
397
- )
386
+ this.logger.log('[CONVS-DETAIL] PUBLIC-KEY - areVisibleCAR',this.areVisibleCAR)
398
387
  }
399
388
  } else {
400
389
  this.areVisibleCAR = false
@@ -1127,7 +1116,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
1127
1116
  // ----------------------------------------------------------
1128
1117
  // DISPLAY CANNED RESPONSES if message.lastIndexOf("/")
1129
1118
  // ----------------------------------------------------------
1130
- if (this.areVisibleCAR && this.support_mode === true) {
1119
+ if (this.areVisibleCAR && this.supportMode === true) {
1131
1120
  setTimeout(() => {
1132
1121
  if (this.conversationWith.startsWith('support-group')) {
1133
1122
  const pos = message.lastIndexOf('/')
@@ -43,16 +43,17 @@
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 && conversationType !=='archived'" class="ion-no-padding open-iframe-item">
46
+ <ion-item *ngIf="displayNewConvsItem && conversationType !=='archived' && supportMode" 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 }}
50
50
  </ion-note> -->
51
51
 
52
- <app-project-item style="width: 100%;"
53
- (openUnsevedConvsEvent)="openUnsevedConversationIframe($event)"
54
- (projectIdEvent)="getLastProjectId($event)">
55
- </app-project-item>
52
+ <app-project-item
53
+ style="width: 100%;"
54
+ (openUnsevedConvsEvent)="openUnsevedConversationIframe($event)"
55
+ (projectIdEvent)="getLastProjectId($event)">
56
+ </app-project-item>
56
57
  </ion-item>
57
58
 
58
59
  <span
@@ -66,10 +67,15 @@
66
67
  <!-- ---------------------------------- -->
67
68
  <!-- ACTIVE CONVERSATION LIST -->
68
69
  <!-- ---------------------------------- -->
69
- <ion-list-conversations *ngIf="conversationType ==='active'" [uidConvSelected]="uidConvSelected"
70
- [listConversations]="conversations" [stylesMap]="stylesMap" [translationMap]="translationMapConversation"
71
- (onConversationSelected)=onConversationSelected($event) (onImageLoaded)="onImageLoaded($event)"
72
- (onConversationLoaded)="onConversationLoaded($event)" (onCloseConversation)="onCloseConversation($event)"
70
+ <ion-list-conversations *ngIf="conversationType ==='active'"
71
+ [uidConvSelected]="uidConvSelected"
72
+ [listConversations]="conversations"
73
+ [stylesMap]="stylesMap"
74
+ [translationMap]="translationMapConversation"
75
+ (onConversationSelected)=onConversationSelected($event)
76
+ (onImageLoaded)="onImageLoaded($event)"
77
+ (onConversationLoaded)="onConversationLoaded($event)"
78
+ (onCloseConversation)="onCloseConversation($event)"
73
79
  [archiveActionNotAllowed]="archiveActionNotAllowed"
74
80
  (onCloseAlert)="onCloseAlert($event)">
75
81
  </ion-list-conversations>
@@ -77,9 +83,12 @@
77
83
  <!-- ---------------------------------- -->
78
84
  <!-- ARCHIVED CONVERSATION LIST -->
79
85
  <!-- ---------------------------------- -->
80
- <ion-list-conversations *ngIf="conversationType ==='archived'" [listConversations]="archivedConversations"
81
- [stylesMap]="stylesMap" [translationMap]="translationMapConversation"
82
- (onConversationSelected)=onConversationSelected($event) (onImageLoaded)="onImageLoaded($event)"
86
+ <ion-list-conversations *ngIf="conversationType ==='archived'"
87
+ [listConversations]="archivedConversations"
88
+ [stylesMap]="stylesMap"
89
+ [translationMap]="translationMapConversation"
90
+ (onConversationSelected)=onConversationSelected($event)
91
+ (onImageLoaded)="onImageLoaded($event)"
83
92
  (onConversationLoaded)="onConversationLoaded($event)">
84
93
  </ion-list-conversations>
85
94
  </ng-template>