@chat21/chat21-ionic 3.0.61-rc5 → 3.0.61-rc7

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 (58) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/config.xml +5 -5
  3. package/deploy_pre.sh +10 -10
  4. package/deploy_prod.sh +5 -1
  5. package/package.json +6 -6
  6. package/resources/{Android → android}/icon/drawable-hdpi-icon.png +0 -0
  7. package/resources/{Android → android}/icon/drawable-ldpi-icon.png +0 -0
  8. package/resources/{Android → android}/icon/drawable-mdpi-icon.png +0 -0
  9. package/resources/{Android → android}/icon/drawable-xhdpi-icon.png +0 -0
  10. package/resources/{Android → android}/icon/drawable-xxhdpi-icon.png +0 -0
  11. package/resources/{Android → android}/icon/drawable-xxxhdpi-icon.png +0 -0
  12. package/resources/{Android → android}/icon.png +0 -0
  13. package/resources/{Android → android}/splash/drawable-land-hdpi-screen.png +0 -0
  14. package/resources/{Android → android}/splash/drawable-land-ldpi-screen.png +0 -0
  15. package/resources/{Android → android}/splash/drawable-land-mdpi-screen.png +0 -0
  16. package/resources/{Android → android}/splash/drawable-land-xhdpi-screen.png +0 -0
  17. package/resources/{Android → android}/splash/drawable-land-xxhdpi-screen.png +0 -0
  18. package/resources/{Android → android}/splash/drawable-land-xxxhdpi-screen.png +0 -0
  19. package/resources/{Android → android}/splash/drawable-port-hdpi-screen.png +0 -0
  20. package/resources/{Android → android}/splash/drawable-port-ldpi-screen.png +0 -0
  21. package/resources/{Android → android}/splash/drawable-port-mdpi-screen.png +0 -0
  22. package/resources/{Android → android}/splash/drawable-port-xhdpi-screen.png +0 -0
  23. package/resources/{Android → android}/splash/drawable-port-xxhdpi-screen.png +0 -0
  24. package/resources/{Android → android}/splash/drawable-port-xxxhdpi-screen.png +0 -0
  25. package/resources/{Android → android}/splash.png +0 -0
  26. package/src/app/app.component.html +2 -2
  27. package/src/app/app.component.scss +2 -1
  28. package/src/app/app.component.ts +22 -11
  29. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +78 -15
  30. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +4 -3
  31. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +1 -1
  32. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +3 -3
  33. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +12 -2
  34. package/src/app/components/sidebar/sidebar.component.html +119 -66
  35. package/src/app/components/sidebar/sidebar.component.scss +41 -3
  36. package/src/app/components/sidebar/sidebar.component.ts +108 -30
  37. package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +9 -1
  38. package/src/app/components/sidebar-user-details/sidebar-user-details.component.scss +25 -17
  39. package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +92 -34
  40. package/src/app/pages/conversation-detail/conversation-detail.page.html +2 -1
  41. package/src/app/pages/conversation-detail/conversation-detail.page.ts +1289 -783
  42. package/src/app/pages/conversations-list/conversations-list.page.html +3 -1
  43. package/src/app/pages/conversations-list/conversations-list.page.ts +28 -18
  44. package/src/app/pages/loader-preview/loader-preview.page.ts +235 -166
  45. package/src/app/pages/profile-info/profile-info.page.scss +1 -1
  46. package/src/app/services/tiledesk/tiledesk.service.ts +19 -0
  47. package/src/assets/i18n/de.json +9 -7
  48. package/src/assets/i18n/en.json +5 -3
  49. package/src/assets/i18n/es.json +4 -2
  50. package/src/assets/i18n/fr.json +7 -5
  51. package/src/assets/i18n/it.json +4 -2
  52. package/src/assets/i18n/pt.json +4 -2
  53. package/src/assets/i18n/ru.json +5 -3
  54. package/src/assets/i18n/tr.json +4 -2
  55. package/src/chat21-core/utils/constants.ts +4 -1
  56. package/src/global.scss +32 -67
  57. package/publish_pre.sh +0 -33
  58. package/publish_prod.sh +0 -33
@@ -1,68 +1,72 @@
1
1
  <!-- *ngIf="project" -->
2
- <div class="logo" style="background-color:#1e2129!important; padding-bottom: 5px;min-height: 60px; width: 60px;">
3
- <a class="logo-img-wpr" [ngClass]="{'small-sidebar-logo-img-wpr' : SIDEBAR_IS_SMALL === true }">
2
+ <div class="logo">
3
+ <!-- <a class="logo-img-wpr" [ngClass]="{'small-sidebar-logo-img-wpr' : SIDEBAR_IS_SMALL === true }">
4
4
  <div class="logo-img" (click)="goToHome()" style="cursor: pointer;">
5
5
  <img class="small-sidebar__logo" src="assets/tiledesk-solo-logo.png" />
6
6
  </div>
7
- </a>
8
- </div>
7
+ </a> -->
9
8
 
10
- <div class="sidebar-wrapper">
11
- <!-- // NK start NEW: AVATAR ON THE SIDEBAR -->
12
- <div class="user tiledesk-nav-user" [ngClass]="{'small-sidebar-tiledesk-nav-user' : SIDEBAR_IS_SMALL === true }"
13
- fxlayout="column" style="flex-direction: column; box-sizing: border-box; display: flex;">
14
- <div class="h3 username" style="font-size: 16px;font-weight: 400;margin-top: 15px; margin-bottom: 5px;"
15
- [ngClass]="{'small-sidebar-userfullname' : SIDEBAR_IS_SMALL === true }">
16
9
 
17
- {{ user?.firstname }} {{ user?.lastname }}
18
- </div>
19
- <div class="h5 email hint-text mt-8"
20
- style="color: rgba(255,255,255,.5)!important;font-size: 13px;margin-top: 0px!important;font-weight: 400;"
21
- [ngClass]="{'small-sidebar-email' : SIDEBAR_IS_SMALL === true }">
22
- {{ user?.email }}
23
- </div>
24
10
 
11
+ <div id="sidebaravatar-img-wpr" class="sidebar-avatar-container tiledesk-nav-avatar" (click)="openUserDetailSidePanel()"
12
+ style="cursor: pointer;" [ngClass]="{'small-sidebar-avatar' : SIDEBAR_IS_SMALL === true, 'small-sidebar-avatar-with-avatar': SIDEBAR_IS_SMALL === true && !USER_PHOTO_PROFILE_EXIST}">
25
13
 
26
- <div id="sidebaravatar-img-wpr" class="avatar-container tiledesk-nav-avatar" (click)="openUserDetailSidePanel()"
27
- style="cursor: pointer;" [ngClass]="{'small-sidebar-avatar' : SIDEBAR_IS_SMALL === true }">
28
-
29
- <img id="sidebaravatar-img" class="sidebar-avatar" [src]="photo_profile_URL" onerror="this.src='assets/images/no_image_user.png'" />
14
+ <img *ngIf="USER_PHOTO_PROFILE_EXIST" id="sidebaravatar-img" class="sidebar-avatar" [src]="photo_profile_URL"
15
+ onerror="this.src='assets/images/no_image_user.png'" />
30
16
 
17
+ <div *ngIf="!USER_PHOTO_PROFILE_EXIST" id="sidebaravatar-no-img" class="sidebar-avatar"
18
+ [ngStyle]="{'background': 'linear-gradient(rgb(255,255,255) -125%,' + currentUser?.fillColour + ')'}">
19
+ <span id="sidebaravatar-altenative-user-avatar" class="sidebar-altenative-user-avatar">
20
+ {{ currentUser?.fullname_initial }}
21
+ </span>
22
+ </div>
31
23
 
32
- <!-- matTooltipClass="custom-mat-tooltip" matTooltip="{{ tooltip_text_for_availability_status}}" #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" -->
33
- <!-- (click)="changeAvailabilityState(IS_AVAILABLE = !IS_AVAILABLE)" -->
34
- <div id="sidebaravatar-status-icon" class="status-icon"
35
- [ngClass]="{'is-user-online' : IS_AVAILABLE === true, 'is-user-offline' : IS_AVAILABLE === false, 'small-sidebar-status-icon' : SIDEBAR_IS_SMALL === true }">
24
+ <!-- matTooltipClass="custom-mat-tooltip" matTooltip="{{ tooltip_text_for_availability_status}}" #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" -->
25
+ <!-- (click)="changeAvailabilityState(IS_AVAILABLE = !IS_AVAILABLE)" -->
26
+ <div id="sidebaravatar-status-icon" class="status-icon"
27
+ [ngClass]="{'is-user-online' : IS_AVAILABLE === true, 'is-user-offline' : IS_AVAILABLE === false, 'small-sidebar-status-icon' : SIDEBAR_IS_SMALL === true }">
28
+ </div>
29
+
30
+ <!-- matTooltipClass="custom-mat-tooltip" matTooltip="{{ 'Busy' | translate }}" #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" -->
31
+ <div id="sidebaravatar-isbusy-icon-wpr" class="sidebar--isBusy-icon-wpr" [ngClass]="{'sidebar--isBusy-icon-wpr-with-image': USER_PHOTO_PROFILE_EXIST}" *ngIf="IS_BUSY === true"
32
+ style="cursor:pointer">
33
+ <span id="sidebaravatar-isbusy-icon" class="material-icons sidebar-is-busy-icon">
34
+ access_time
35
+ </span>
36
36
  </div>
37
37
 
38
- </div>
39
- <!-- CAMERA ICONS OVER THE AVATAR -->
40
- <!-- [ngClass]="{'hover-effect' : isOverAvar}" -->
41
- <!-- <i class="material-icons is-over-camera"
42
- [ngClass]="{'small-sidebar-camera-icon' : SIDEBAR_IS_SMALL === true, 'is-over-camera-decrease-top':IS_BUSY === true }">
43
- camera_alt
44
- </i> -->
45
-
46
-
47
- <!-- matTooltipClass="custom-mat-tooltip" matTooltip="{{ 'Busy' | translate }}" #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" -->
48
- <div id="sidebaravatar-isbusy-icon-wpr" class="sidebar--isBusy-icon-wpr" *ngIf="IS_BUSY === true" style="cursor:pointer">
49
- <span id="sidebaravatar-isbusy-icon" class="material-icons sidebar-is-busy-icon">
50
- access_time
51
- </span>
52
- </div>
53
38
  </div>
39
+ </div>
40
+
41
+ <div class="sidebar-wrapper">
54
42
 
55
43
  <div class="nav-container">
56
44
  <!-- [ngClass]="{'is-desktop-menu' : IS_MOBILE_MENU === false, 'is-mobile-menu' : IS_MOBILE_MENU === true }" -->
57
- <ul style="padding-bottom: 65px;" class="nav">
45
+ <!-- padding-bottom: 65px; -->
46
+ <ul style="margin-top: 0px;" class="nav">
58
47
 
59
48
  <!-- ------------------------------------------- -->
60
49
  <!-- CHAT -->
61
50
  <!-- ------------------------------------------- -->
62
51
  <li class="item-active" style="cursor: unset;" matTooltipClass="custom-mat-tooltip" matTooltip="Chat"
63
- #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100">
64
- <a class="customAncor">
65
- <i class="material-icons sidebar-icons">chat</i>
52
+ #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" style="text-align: center; ">
53
+ <a class="customAncor" style="margin-right: 0px !important">
54
+ <!-- <i class="material-icons sidebar-icons">chat</i> -->
55
+ <span id="openchat-span" style="position: relative;top: 10px;vertical-align: middle;">
56
+ <svg id="openchat-svg" version="1.1" xmlns="http://www.w3.org/2000/svg"
57
+ xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 23 21"
58
+ style="enable-background:new 0 0 23 21;" xml:space="preserve"
59
+ style="width:20px;height:20px; vertical-align: middle;">
60
+ <style type="text/css">
61
+ .chat21-icon {
62
+ fill: #fff;
63
+ }
64
+ </style>
65
+ <path id="openchat-path" class="chat21-icon" d="M11.5,0.5C5.8,0.5,1.3,5,1.3,10.5c0,1.8,0.5,3.5,1.4,5l-0.8,4.3l4.4-0.8c1.5,0.9,3.3,1.4,5.3,1.4
66
+ c5.7,0,10.2-4.5,10.2-10S17.2,0.5,11.5,0.5z M11.5,17.2c-2.5,0-4.6-1.3-5.7-2.6c0.6-0.2,0.8-0.8,1.4-1c0.7,0.9,2.5,2.1,4.4,2.1
67
+ c1.9,0,3.6-1.2,4.2-2.1c0.5,0.2,0.9,0.6,1.4,0.9C16.1,15.8,14,17.2,11.5,17.2z" />
68
+ </svg>
69
+ </span>
66
70
  </a>
67
71
  </li>
68
72
 
@@ -78,21 +82,65 @@
78
82
  </a>
79
83
  </li>
80
84
 
85
+
86
+ <!-- ---------------------------------- -->
87
+ <!-- Bot -->
88
+ <!-- ---------------------------------- -->
89
+ <ng-container *ngIf="USER_ROLE !== 'agent'">
90
+ <li (click)="goToBots()" id="bot-anchor-wpr" matTooltipClass="custom-mat-tooltip" matTooltip="Bots"
91
+ #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" style="text-align: center;">
92
+ <a id="bot-anchor" #botbtn class="customAncor" style="height: 40px;margin-right: 0px !important;">
93
+ <span class="bot-icon-wpr">
94
+ <svg version="1.1" id="Objects" xmlns="http://www.w3.org/2000/svg"
95
+ xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30"
96
+ style="enable-background:new 0 0 30 30;" xml:space="preserve" style="width: 25px;height: 25px;margin-top: 6px;">
97
+ <g>
98
+ <g>
99
+ <path class="chat-bot-icon-st0" d="M24.6,12.6c-0.1,0-0.2,0-0.3,0c-1.6-2.9-4.5-5.8-9.2-5.8c-4.7,0-7.6,2.9-9.2,5.8c-0.2,0-0.4-0.1-0.6-0.1
100
+ c-2,0-3.5,2.3-3.5,5c0,2.8,1.6,5,3.5,5c0.1,0,0.3,0,0.4,0c2.3,3.6,7,3.9,9.4,3.9c2.3,0,6.9-0.5,9.2-3.9c0.1,0,0.1,0,0.2,0
101
+ c2,0,3.5-2.3,3.5-5C28.1,14.8,26.6,12.6,24.6,12.6z M22,21.1c0,0-7.8,2.3-14.3-0.1c0,0-0.8-4.1-0.5-7.2c0,0,8.1-3.2,15.6,0.3
102
+ C22.8,14.1,23.3,19.1,22,21.1z" />
103
+ <ellipse class="chat-bot-icon-st0" cx="11.9" cy="17.4" rx="0.7" ry="1.4" />
104
+ <ellipse class="chat-bot-icon-st0" cx="18.1" cy="17.4" rx="0.7" ry="1.4" />
105
+ <path class="chat-bot-icon-st0" d="M14.5,5.3v1.1h1V5.3c0.3-0.2,0.5-0.5,0.5-0.8c0-0.5-0.4-0.9-1-0.9c-0.5,0-0.9,0.4-0.9,0.9
106
+ C14.1,4.8,14.2,5.1,14.5,5.3z" />
107
+ </g>
108
+ <rect class="chat-bot-icon-st1" width="30" height="30" />
109
+ </g>
110
+ </svg>
111
+ </span>
112
+ </a>
113
+ </li>
114
+ </ng-container>
115
+
81
116
  <!-- ------------------------------------------- -->
82
117
  <!-- REQUESTS (VISITORS) -->
83
118
  <!-- ------------------------------------------- -->
84
- <li (click)="goToConversations()"
85
- matTooltipClass="custom-mat-tooltip" matTooltip="{{ conversations_lbl }}" #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100">
86
- <a class="customAncor">
87
- <i class="material-icons sidebar-icons">forum</i>
119
+ <li (click)="goToConversations()" matTooltipClass="custom-mat-tooltip" matTooltip="{{ conversations_lbl }}"
120
+ #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" style="text-align: center;">
121
+ <a class="customAncor" style="height: 40px;margin-right: 0px !important;">
122
+ <!-- <i class="material-icons sidebar-icons">forum</i> -->
123
+ <span class="realtime-icon-wpr" >
124
+ <svg version="1.1" id="Livello_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
125
+ viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve" style="width: 25px; margin-top: 7px;">
126
+
127
+ <g>
128
+ <rect y="0" class="realtime-icon-st0" width="24" height="24"/>
129
+ </g>
130
+ <path class="realtime-icon-st1" d="M21,10.3h-4.7l-4.2,3.3L6,7.7L3,9.8v2.5l2.8-2l6.2,6l5-4h4V10.3z"/>
131
+ </svg>
132
+ </span>
133
+
88
134
  </a>
89
135
  </li>
90
136
 
137
+
138
+
91
139
  <!-- ------------------------------------------- -->
92
140
  <!-- CONTACTS (LEADS) -->
93
141
  <!-- ------------------------------------------- -->
94
- <li (click)="goToContacts()"
95
- matTooltipClass="custom-mat-tooltip" matTooltip="{{ contacts_lbl }}" #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100">
142
+ <li (click)="goToContacts()" matTooltipClass="custom-mat-tooltip" matTooltip="{{ contacts_lbl }}"
143
+ #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100">
96
144
  <a class="customAncor">
97
145
  <i class="material-icons sidebar-icons">contacts</i>
98
146
  </a>
@@ -102,10 +150,12 @@
102
150
  <!-- APPS -->
103
151
  <!-- ------------------------------------------- -->
104
152
  <ng-container *ngIf="isVisibleAPP && USER_ROLE !== 'agent'">
105
- <li (click)="goToAppStore()"
106
- matTooltipClass="custom-mat-tooltip" matTooltip="{{ apps_lbl }}" #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100" >
153
+ <li (click)="goToAppStore()" matTooltipClass="custom-mat-tooltip" matTooltip="{{ apps_lbl }}"
154
+ #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100">
107
155
  <a class="customAncor">
108
- <i class="material-icons sidebar-icons">apps</i>
156
+ <!-- <i class="material-icons sidebar-icons">apps</i> -->
157
+ <i class="material-icons sidebar-icons">dashboard_customize</i>
158
+
109
159
  </a>
110
160
  </li>
111
161
  </ng-container>
@@ -114,10 +164,13 @@
114
164
  <!-- ANALYTICS -->
115
165
  <!-- ------------------------------------------- -->
116
166
  <ng-container *ngIf="isVisibleANA && USER_ROLE !== 'agent'">
117
- <li (click)="goToAnalytics()"
118
- matTooltipClass="custom-mat-tooltip" matTooltip="{{ analytics_lbl }}" #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100">
167
+ <li (click)="goToAnalytics()" matTooltipClass="custom-mat-tooltip" matTooltip="{{ analytics_lbl }}"
168
+ #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100">
119
169
  <a class="customAncor">
120
- <i class="material-icons sidebar-icons">trending_up</i>
170
+ <!-- <i class="material-icons sidebar-icons">trending_up</i> -->
171
+ <!-- <i class="material-icons sidebar-icons"> analytics </i> -->
172
+ <i class="material-icons sidebar-icons"> bar_chart </i>
173
+
121
174
  </a>
122
175
  </li>
123
176
  </ng-container>
@@ -126,8 +179,8 @@
126
179
  <!-- ACTIVITIES -->
127
180
  <!-- ------------------------------------------- -->
128
181
  <ng-container *ngIf="isVisibleACT">
129
- <li *ngIf="USER_ROLE !== 'agent'" (click)="goToActivities()"
130
- matTooltipClass="custom-mat-tooltip" matTooltip="{{ activities_lbl }}" #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100">
182
+ <li *ngIf="USER_ROLE !== 'agent'" (click)="goToActivities()" matTooltipClass="custom-mat-tooltip"
183
+ matTooltip="{{ activities_lbl }}" #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100">
131
184
  <a class="customAncor">
132
185
  <i class="material-icons sidebar-icons">assignment</i>
133
186
  </a>
@@ -138,8 +191,8 @@
138
191
  <!-- ------------------------------------------- -->
139
192
  <!-- REQUESTS HISTORY -->
140
193
  <!-- ------------------------------------------- -->
141
- <li (click)="goToHistory()"
142
- matTooltipClass="custom-mat-tooltip" matTooltip="{{ history_lbl }}" #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100">
194
+ <li (click)="goToHistory()" matTooltipClass="custom-mat-tooltip" matTooltip="{{ history_lbl }}"
195
+ #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100">
143
196
  <a class="customAncor">
144
197
  <i class="material-icons sidebar-icons">history</i>
145
198
  </a>
@@ -148,8 +201,8 @@
148
201
  <!-- ------------------------------------------- -->
149
202
  <!-- SETTINGS -->
150
203
  <!-- ------------------------------------------- -->
151
- <li *ngIf="USER_ROLE !== 'agent'" (click)="goToSettings_CannedResponses()"
152
- matTooltipClass="custom-mat-tooltip" matTooltip="{{ settings_lbl }}" #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100">
204
+ <li *ngIf="USER_ROLE !== 'agent'" (click)="goToSettings_CannedResponses()" matTooltipClass="custom-mat-tooltip"
205
+ matTooltip="{{ settings_lbl }}" #tooltip="matTooltip" matTooltipPosition='right' matTooltipHideDelay="100">
153
206
  <a class="customAncor">
154
207
  <i class="material-icons sidebar-icons">settings</i>
155
208
  </a>
@@ -161,12 +214,12 @@
161
214
  [plan_type]="plan_type"
162
215
  [isVisiblePAY]="isVisiblePAY"
163
216
  [prjct_name]="prjct_name" -->
164
- <!-- HAS_CLICKED_OPEN_USER_DETAIL {{ HAS_CLICKED_OPEN_USER_DETAIL }} -->
165
- <!-- [HAS_CLICKED_OPEN_USER_DETAIL]='HAS_CLICKED_OPEN_USER_DETAIL' -->
166
- <!-- tabindex="-1" style="z-index: 20001;" -->
217
+ <!-- HAS_CLICKED_OPEN_USER_DETAIL {{ HAS_CLICKED_OPEN_USER_DETAIL }} -->
218
+ <!-- [HAS_CLICKED_OPEN_USER_DETAIL]='HAS_CLICKED_OPEN_USER_DETAIL' -->
219
+ <!-- tabindex="-1" style="z-index: 20001;" -->
167
220
 
168
221
 
169
- <!-- <app-sidebar-user-details
222
+ <!-- <app-sidebar-user-details
170
223
  (onCloseUserDetailsSidebar)='onCloseUserDetailsSidebar($event)'>
171
224
  </app-sidebar-user-details> -->
172
225
 
@@ -1,15 +1,53 @@
1
1
  ::ng-deep .custom-mat-tooltip {
2
- background-color: #2d323e;
3
- font-size: 12px;
2
+ background-color: #2d323e !important;
3
+ font-size: 12px !important;
4
+ border-radius: 2px !important;
5
+ font-family: 'Poppins' !important;
4
6
  }
5
7
 
6
8
  .sidebar-is-busy-icon {
7
- font-size: 14px;
9
+ font-size: 12px;
8
10
  color: #feb92c;
9
11
  background-color: #2d323e;
10
12
  border-radius: 50%;
11
13
  }
12
14
 
15
+ .chat-bot-icon-st0 {
16
+ // fill: #a9afbb;
17
+ fill: #647491
18
+ }
19
+ .chat-bot-icon-st1 {
20
+ fill: none;
21
+ }
22
+
23
+ .realtime-icon-st0{
24
+ fill:none;
25
+ }
26
+
27
+ .realtime-icon-st1{
28
+ fill:#647491;
29
+ }
30
+
31
+ #bot-anchor-wpr:hover > #bot-anchor > .bot-icon-wpr > svg > g > g > .chat-bot-icon-st0 {
32
+ fill: #a9afbb ;
33
+ }
34
+
35
+ li:hover > a > .realtime-icon-wpr > svg > path {
36
+ fill: #a9afbb;
37
+ }
38
+
39
+ #sidebaravatar-altenative-user-avatar {
40
+ // line-height: 2.9;
41
+ font-weight: 400;
42
+ font-family: "Poppins";
43
+ left: 50%;
44
+ top: 50%;
45
+ -webkit-transform: translate(-50%, -50%);
46
+ transform: translate(-50%, -50%);
47
+ position: absolute;
48
+ font-size:14px
49
+ }
50
+
13
51
  // #sidebar_wrapper::-webkit-scrollbar {
14
52
  // width: 6px;
15
53
  // }
@@ -10,6 +10,10 @@ import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service
10
10
  import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
11
11
  import { TranslateService } from '@ngx-translate/core';
12
12
  import { EventsService } from 'src/app/services/events-service';
13
+ import { tranlatedLanguage } from '../../../chat21-core/utils/constants';
14
+
15
+ // utils
16
+ import { avatarPlaceholder, getColorBck} from 'src/chat21-core/utils/utils-user';
13
17
 
14
18
  @Component({
15
19
  selector: 'app-sidebar',
@@ -43,6 +47,8 @@ export class SidebarComponent implements OnInit {
43
47
  history_lbl: string;
44
48
  settings_lbl: string;
45
49
  countClickOnOpenUserDetailSidebar: number = 0
50
+ USER_PHOTO_PROFILE_EXIST: boolean;
51
+ currentUser: any;
46
52
  constructor(
47
53
  public imageRepoService: ImageRepoService,
48
54
  public appStorageService: AppStorageService,
@@ -52,7 +58,8 @@ export class SidebarComponent implements OnInit {
52
58
  public wsService: WebsocketService,
53
59
  public appConfigProvider: AppConfigProvider,
54
60
  private translate: TranslateService,
55
- public events: EventsService
61
+ public events: EventsService,
62
+
56
63
  ) { }
57
64
 
58
65
  ngOnInit() {
@@ -63,6 +70,81 @@ export class SidebarComponent implements OnInit {
63
70
  this.listenTocurrentProjectUserUserAvailability$()
64
71
  this.getOSCODE();
65
72
  this.getCurrentChatLangAndTranslateLabels();
73
+
74
+ // this.loggedUser = this.chatManager.getCurrentUser();
75
+ // if (this.loggedUser) {
76
+ // this.itemAvatar = {
77
+ // imageurl: this.imageRepoService.getImagePhotoUrl(this.loggedUser.uid),
78
+ // avatar: this.loggedUser.avatar,
79
+ // color: this.loggedUser.color,
80
+ // online: this.loggedUser.online,
81
+ // lastConnection: this.loggedUser.lastConnection,
82
+ // status: '',
83
+ // width: '35px',
84
+ // height: '35px'
85
+ // };
86
+ // }
87
+ }
88
+
89
+
90
+ subcribeToAuthStateChanged() {
91
+ this.messagingAuthService.BSAuthStateChanged.subscribe((state) => {
92
+ this.logger.log('[SIDEBAR] BSAuthStateChanged ', state)
93
+
94
+ if (state === 'online') {
95
+ this.currentUser = JSON.parse(this.appStorageService.getItem('currentUser'));
96
+ this.logger.log('[SIDEBAR] currentUser ', this.currentUser)
97
+ if (this.currentUser) {
98
+ this.createUserAvatar(this.currentUser)
99
+ this.photo_profile_URL = this.imageRepoService.getImagePhotoUrl(this.currentUser.uid)
100
+ this.logger.log('[SIDEBAR] photo_profile_URL ', this.photo_profile_URL)
101
+ this.checkIfExistPhotoProfile(this.photo_profile_URL)
102
+ }
103
+
104
+ }
105
+ })
106
+ }
107
+
108
+ checkIfExistPhotoProfile(imageUrl) {
109
+ this.verifyImageURL(imageUrl, (imageExists) => {
110
+
111
+ if (imageExists === true) {
112
+ this.USER_PHOTO_PROFILE_EXIST = true;
113
+ this.logger.log('[SIDEBAR] photo_profile_URL IMAGE EXIST ', imageExists)
114
+
115
+ } else {
116
+ this.USER_PHOTO_PROFILE_EXIST = false;
117
+ this.logger.log('[SIDEBAR] photo_profile_URL IMAGE EXIST ', imageExists)
118
+ }
119
+ })
120
+ }
121
+
122
+ createUserAvatar(currentUser) {
123
+ this.logger.log('[SIDEBAR] - createProjectUserAvatar ', currentUser)
124
+ let fullname = ''
125
+ if (currentUser && currentUser.firstname && currentUser.lastname) {
126
+ fullname = currentUser.firstname + ' ' + currentUser.lastname
127
+ currentUser['fullname_initial'] = avatarPlaceholder(fullname)
128
+ currentUser['fillColour'] = getColorBck(fullname)
129
+ } else if (currentUser && currentUser.firstname) {
130
+ fullname = currentUser.firstname
131
+ currentUser['fullname_initial'] = avatarPlaceholder(fullname)
132
+ currentUser['fillColour'] = getColorBck(fullname)
133
+ } else {
134
+ currentUser['fullname_initial'] = 'N/A'
135
+ currentUser['fillColour'] = 'rgb(98, 100, 167)'
136
+ }
137
+ }
138
+
139
+ verifyImageURL(image_url, callBack) {
140
+ const img = new Image();
141
+ img.src = image_url;
142
+ img.onload = function () {
143
+ callBack(true);
144
+ };
145
+ img.onerror = function () {
146
+ callBack(false);
147
+ };
66
148
  }
67
149
 
68
150
  getCurrentChatLangAndTranslateLabels() {
@@ -85,11 +167,15 @@ export class SidebarComponent implements OnInit {
85
167
  this.logger.log('[SIDEBAR] chat_lang: ', chat_lang);
86
168
  } else if (browserLang && stored_preferred_lang) {
87
169
  chat_lang = stored_preferred_lang
88
-
89
170
  this.logger.log('[SIDEBAR] chat_lang: ', chat_lang);
90
171
  }
91
-
92
- this.translate.use(chat_lang);
172
+ if (tranlatedLanguage.includes(chat_lang)) {
173
+ this.logger.log('[SIDEBAR] tranlatedLanguage includes', chat_lang, ': ', tranlatedLanguage.includes(chat_lang))
174
+ this.translate.use(chat_lang);
175
+ } else {
176
+ this.logger.log('[SIDEBAR] tranlatedLanguage includes', chat_lang, ': ', tranlatedLanguage.includes(chat_lang))
177
+ this.translate.use('en');
178
+ }
93
179
  this.translateLabels()
94
180
  }
95
181
 
@@ -277,36 +363,22 @@ export class SidebarComponent implements OnInit {
277
363
  }
278
364
 
279
365
  // onCloseUserDetailsSidebar($event) {
280
- // this.logger.log('[SIDEBAR-CHAT] HAS_CLICKED_CLOSE_USER_DETAIL ', $event)
281
- // this.HAS_CLICKED_OPEN_USER_DETAIL = $event
282
- // const elemNavbar = <HTMLElement>document.querySelector('.navbar-absolute');
283
- // this.logger.log('[SIDEBAR] elemNavBar ', elemNavbar)
284
- // if (elemNavbar) {
285
- // elemNavbar.classList.remove("navbar-absolute-custom-class")
286
- // }
287
-
288
- // const elemNavbarBrand = <HTMLElement>document.querySelector('.navbar-brand');
289
- // this.logger.log('[SIDEBAR] elemNavbarBrand ', elemNavbarBrand)
290
- // if (elemNavbarBrand) {
291
- // elemNavbarBrand.classList.remove("navbar-brand-z-index-zero")
292
- // }
366
+ // this.logger.log('[SIDEBAR-CHAT] HAS_CLICKED_CLOSE_USER_DETAIL ', $event)
367
+ // this.HAS_CLICKED_OPEN_USER_DETAIL = $event
368
+ // const elemNavbar = <HTMLElement>document.querySelector('.navbar-absolute');
369
+ // this.logger.log('[SIDEBAR] elemNavBar ', elemNavbar)
370
+ // if (elemNavbar) {
371
+ // elemNavbar.classList.remove("navbar-absolute-custom-class")
293
372
  // }
294
373
 
295
- subcribeToAuthStateChanged() {
296
- this.messagingAuthService.BSAuthStateChanged.subscribe((state) => {
297
- this.logger.log('[SIDEBAR] BSAuthStateChanged ', state)
374
+ // const elemNavbarBrand = <HTMLElement>document.querySelector('.navbar-brand');
375
+ // this.logger.log('[SIDEBAR] elemNavbarBrand ', elemNavbarBrand)
376
+ // if (elemNavbarBrand) {
377
+ // elemNavbarBrand.classList.remove("navbar-brand-z-index-zero")
378
+ // }
379
+ // }
298
380
 
299
- if (state === 'online') {
300
- const currentUser = JSON.parse(this.appStorageService.getItem('currentUser'));
301
- this.logger.log('[SIDEBAR] currentUser ', currentUser)
302
- if (currentUser) {
303
- this.photo_profile_URL = this.imageRepoService.getImagePhotoUrl(currentUser.uid)
304
- this.logger.log('[SIDEBAR] photo_profile_URL ', this.photo_profile_URL)
305
- }
306
381
 
307
- }
308
- })
309
- }
310
382
 
311
383
 
312
384
  getStoredProjectAndDashboardBaseUrl() {
@@ -336,6 +408,12 @@ export class SidebarComponent implements OnInit {
336
408
  myWindow.focus();
337
409
  }
338
410
 
411
+ goToBots() {
412
+ let url = this.DASHBOARD_URL + this.project_id + '/bots'
413
+ const myWindow = window.open(url, '_self');
414
+ myWindow.focus();
415
+ }
416
+
339
417
  goToContacts() {
340
418
  let url = this.DASHBOARD_URL + this.project_id + '/contacts'
341
419
  const myWindow = window.open(url, '_self');
@@ -21,8 +21,16 @@
21
21
 
22
22
  <!-- (click)="goToUserProfile()" -->
23
23
  <div role="button" class="user-details-avatar">
24
- <img class="user-img-in-sidebar-user-details" [src]="photo_profile_URL"
24
+ <img *ngIf="USER_PHOTO_PROFILE_EXIST" class="user-img-in-sidebar-user-details" [src]="photo_profile_URL"
25
25
  onerror="this.src='assets/images/no_image_user.png'" />
26
+
27
+ <div *ngIf="!USER_PHOTO_PROFILE_EXIST" class="user-img-in-sidebar-user-details"
28
+ [ngStyle]="{'background': 'linear-gradient(rgb(255,255,255) -125%,' + user?.fillColour + ')'}">
29
+ <span id="sidebaravatar-altenative-user-avatar" class="sidebar-user-details-altenative-user-avatar">
30
+ {{ user?.fullname_initial }}
31
+ </span>
32
+ </div>
33
+
26
34
  </div>
27
35
 
28
36
  <div class="user-details-user-isbusy" *ngIf="IS_BUSY === true" style="cursor:pointer"
@@ -14,7 +14,7 @@
14
14
  // transform: translate(60px);
15
15
  transition: transform 0.5s;
16
16
  width: 305px;
17
- left: -245px
17
+ left: -245px;
18
18
  // z-index: 1029;
19
19
  // transform: translateX(-100%);
20
20
  // -webkit-transform: translateX(-100%);
@@ -90,14 +90,15 @@ button.user-details-btn-close {
90
90
  }
91
91
 
92
92
  .user-details-dshbrd-lang-code {
93
- text-transform: uppercase;color: #647491;
93
+ text-transform: uppercase;
94
+ color: #647491;
94
95
  font-family: "Roboto", sans-serif !important;
95
96
  font-size: 14px;
96
97
  }
97
98
 
98
99
  .user-details-avatar {
99
100
  text-align: center;
100
- cursor: pointer;
101
+ // cursor: pointer;
101
102
  position: absolute;
102
103
  top: 82px;
103
104
  border-radius: 50%;
@@ -139,10 +140,9 @@ button.user-details-btn-close {
139
140
  text-align: center;
140
141
  margin-bottom: 5px;
141
142
  font-size: 16px;
142
- font-family: 'Poppins';
143
+ font-family: "Poppins";
143
144
  font-weight: 500;
144
145
  line-height: 24px;
145
-
146
146
  }
147
147
 
148
148
  .user-details-email {
@@ -157,10 +157,10 @@ button.user-details-btn-close {
157
157
  font-size: 14px;
158
158
  text-align: center;
159
159
  margin-top: 5px;
160
- font-family: 'Poppins';
160
+ font-family: "Poppins";
161
161
  font-weight: 400;
162
162
  line-height: 1px;
163
-
163
+ white-space: nowrap;
164
164
  }
165
165
 
166
166
  .user-details-role {
@@ -178,8 +178,7 @@ button.user-details-btn-close {
178
178
  text-transform: uppercase;
179
179
  color: #a9afbb;
180
180
  font-weight: 500;
181
- font-family: 'Roboto', sans-serif !important;
182
-
181
+ font-family: "Roboto", sans-serif !important;
183
182
  }
184
183
 
185
184
  .availability-section {
@@ -199,7 +198,7 @@ button.user-details-btn-close {
199
198
  .first-divider {
200
199
  margin-top: 355px;
201
200
  border: 0;
202
- border-top: 1px solid rgba(255, 255,255, 0.2);
201
+ border-top: 1px solid rgba(255, 255, 255, 0.2);
203
202
  margin-bottom: 20px;
204
203
  }
205
204
 
@@ -226,17 +225,17 @@ button.user-details-btn-close {
226
225
  background-color: #2d323e;
227
226
  border-radius: 50%;
228
227
  position: absolute;
229
- top: 92px;
230
- width: 24px;
231
- height: 24px;
228
+ top: 96px;
229
+ width: 21px;
230
+ height: 21px;
232
231
  left: 101px;
233
232
  }
234
233
 
235
234
  .user-details-user-isbusy-icon {
236
235
  font-size: 18px !important;
237
236
  position: relative;
238
- top: 3px;
239
- left: 3px;
237
+ top: 2px;
238
+ left: 2px;
240
239
  }
241
240
 
242
241
  .user-details-plan-info {
@@ -305,6 +304,15 @@ button.user-details-btn-close {
305
304
  }
306
305
 
307
306
  ::ng-deep .custom-mat-tooltip {
308
- background-color: #2d323e;
309
- font-size: 12px;
307
+ background-color: #2d323e !important;
308
+ font-size: 12px !important;
309
+ border-radius: 2px !important;
310
+ font-family: "Poppins" !important;
310
311
  }
312
+
313
+ .sidebar-user-details-altenative-user-avatar {
314
+ line-height: 3.2;
315
+ font-weight: 400;
316
+ font-family: "Poppins";
317
+ font-size: 32px;
318
+ }