Skip to content

Commit 1652668

Browse files
author
Gabriele Panico
committed
Adds the in the sidebar the WA icon
1 parent ffd8364 commit 1652668

17 files changed

Lines changed: 42 additions & 0 deletions

File tree

src/app/components/sidebar/sidebar.component.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,26 @@
123123

124124
<div class="nav-custom sidebar-bottom">
125125

126+
<!-- <ng-container *ngIf="PERMISSION_TO_VIEW_WA_BRODCAST"> -->
127+
<ng-container *ngIf="USER_ROLE !== 'agent' && isVisibleAUT">
128+
<div id="wa-anchor-wpr"
129+
matTooltipClass="custom-mat-tooltip"
130+
matTooltip="{{ whatsapp_lbl }}"
131+
#tooltip="matTooltip"
132+
matTooltipPosition='right'
133+
matTooltipHideDelay="100">
134+
<a id="bot-anchor" class="customAncor" href="{{ dashboard_wa_url }}">
135+
<span class="bot-icon-wpr">
136+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 48 48" height="24" width="24">
137+
138+
<path fill="none" fill-rule="evenodd" d="M40.6666 7.3156c-2.1744 -2.1755 -4.7577 -3.8995 -7.6012 -5.0726C30.222 1.0699 27.1745 0.4708 24.0986 0.4801 11.1899 0.4801 0.6816 10.936 0.6763 23.79c-0.0057 4.093 1.0733 8.1145 3.1269 11.655L0.48 47.52l12.4163 -3.2413c3.4367 1.8619 7.2841 2.8363 11.193 2.835h0.0094c12.9076 0 23.415 -10.4569 23.4212 -23.31 0.0078 -3.0653 -0.594 -6.1017 -1.7706 -8.9324 -1.1766 -2.8306 -2.9043 -5.399 -5.0827 -7.5557ZM24.0987 43.1794h-0.0084c-3.4845 0.001 -6.9057 -0.9315 -9.9078 -2.7007l-0.7109 -0.42 -7.3678 1.9236 1.9666 -7.1494 -0.463 -0.735C5.659 31.0132 4.6267 27.4386 4.6306 23.79c0 -10.6815 8.7371 -19.3724 19.4754 -19.3724 5.1513 -0.0092 10.0953 2.0281 13.7446 5.6638 3.6493 3.6357 5.705 8.572 5.715 13.7233 -0.0041 10.6827 -8.737 19.3747 -19.4669 19.3747Zm10.6774 -14.51c-0.5849 -0.2919 -3.465 -1.701 -3.9984 -1.8952 -0.5334 -0.1943 -0.9271 -0.292 -1.3167 0.2919 -0.3895 0.5837 -1.512 1.89 -1.8532 2.2837 -0.3413 0.3938 -0.6826 0.4368 -1.2675 0.1449 -0.5847 -0.2918 -2.4716 -0.9062 -4.707 -2.8906 -1.7399 -1.5446 -2.9137 -3.4513 -3.255 -4.0341 -0.3413 -0.5828 -0.0368 -0.8988 0.2561 -1.1886 0.2636 -0.2614 0.5849 -0.6804 0.8779 -1.0206 0.2929 -0.3403 0.3906 -0.5839 0.5848 -0.9723 0.1943 -0.3885 0.0976 -0.7288 -0.0483 -1.0195 -0.1459 -0.2909 -1.3167 -3.1585 -1.8039 -4.325 -0.4757 -1.1361 -0.9576 -0.9818 -1.3167 -0.9996 -0.3413 -0.0168 -0.7349 -0.021 -1.1225 -0.021 -0.2961 0.0077 -0.5875 0.0765 -0.856 0.2018 -0.2685 0.1253 -0.5081 0.3048 -0.7043 0.5269 -0.5364 0.5838 -2.0485 1.995 -2.0485 4.8594s2.1001 5.6364 2.3898 6.0248c0.2899 0.3886 4.1265 6.2717 9.997 8.7948 1.0901 0.4669 2.204 0.8763 3.337 1.2264 1.4017 0.4431 2.6775 0.3812 3.6854 0.2311 1.1246 -0.167 3.4651 -1.4092 3.9512 -2.7699 0.4862 -1.3608 0.4872 -2.5263 0.3413 -2.7689 -0.146 -0.2426 -0.5366 -0.3895 -1.1225 -0.6804Z" clip-rule="evenodd" stroke-width="1"></path>
139+
</svg>
140+
</span>
141+
</a>
142+
</div>
143+
</ng-container>
144+
<!-- </ng-container> -->
145+
126146
<!-- ------------------------------------------- -->
127147
<!-- CONTACTS (LEADS) (click)="goToContacts()" -->
128148
<!-- ------------------------------------------- -->

src/app/components/sidebar/sidebar.component.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export class SidebarComponent implements OnInit {
3636
isVisibleACT: boolean;
3737
isVisibleMON: boolean;
3838
isVisibleCNT: boolean;
39+
isVisibleAUT: boolean;
3940
isVisibleKNB: boolean;
4041
photo_profile_URL: string;
4142
project_id: string;
@@ -45,6 +46,7 @@ export class SidebarComponent implements OnInit {
4546
public_Key: any;
4647
conversations_lbl: string;
4748
contacts_lbl: string;
49+
whatsapp_lbl: string;
4850
apps_lbl: string;
4951
analytics_lbl: string;
5052
activities_lbl: string;
@@ -58,6 +60,7 @@ export class SidebarComponent implements OnInit {
5860
dashboard_bots_url: string;
5961
dashboard_convs_url: string;
6062
dashboard_contacts_url: string;
63+
dashboard_wa_url: string;
6164
dashboard_app_url: string;
6265
dashboard_analytics_url: string;
6366
dashboard_activities_url: string;
@@ -108,6 +111,7 @@ export class SidebarComponent implements OnInit {
108111
this.dashboard_bots_url = this.DASHBOARD_URL + this.project_id + '/bots'
109112
this.dashboard_convs_url = this.DASHBOARD_URL + this.project_id + '/wsrequests'
110113
this.dashboard_contacts_url = this.DASHBOARD_URL + this.project_id + '/contacts'
114+
this.dashboard_wa_url = this.DASHBOARD_URL + this.project_id + '/automations'
111115
this.dashboard_app_url = this.DASHBOARD_URL + this.project_id + '/app-store'
112116
this.dashboard_analytics_url = this.DASHBOARD_URL + this.project_id + '/analytics'
113117
this.dashboard_activities_url = this.DASHBOARD_URL + this.project_id + '/activities'
@@ -247,6 +251,7 @@ export class SidebarComponent implements OnInit {
247251
const keys= [
248252
'Conversations',
249253
'LABEL_CONTACTS',
254+
'LABEL_WA',
250255
'Apps',
251256
'Analytics',
252257
'Activities',
@@ -257,6 +262,7 @@ export class SidebarComponent implements OnInit {
257262
this.translate.get(keys).subscribe((text: string) => {
258263
this.conversations_lbl = text['Conversations'];
259264
this.contacts_lbl = text['LABEL_CONTACTS']
265+
this.whatsapp_lbl = text['LABEL_WA']
260266
this.apps_lbl = text['Apps']
261267
this.analytics_lbl = text['Analytics']
262268
this.activities_lbl = text['Activities']
@@ -274,6 +280,7 @@ export class SidebarComponent implements OnInit {
274280
this.isVisibleAPP = getOSCode("APP", this.public_Key);
275281
this.isVisibleMON = getOSCode("MON", this.public_Key);
276282
this.isVisibleCNT = getOSCode("CNT", this.public_Key);
283+
this.isVisibleAUT = getOSCode("AUT", this.public_Key);
277284
this.isVisibleKNB = getOSCode("KNB", this.public_Key);
278285

279286
}

src/assets/i18n/ar.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
"LABEL_IS_WRITING": "الكتابة",
119119
"LABEL_VERSION": "الإصدار",
120120
"LABEL_CONTACTS": "جهات الاتصال",
121+
"LABEL_WA":"بث واتساب",
121122
"LABEL_PLACEHOLDER": "اكتب رسالتك ..",
122123
"LABEL_START_NW_CONV": "محادثة جديدة",
123124
"LABEL_FIRST_MSG": "صِف مشكلتك بعد قليل ، وسيتواصل معك أحد الوكلاء.",

src/assets/i18n/az.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
"LABEL_IS_WRITING": "yazmaq",
119119
"LABEL_VERSION": "versiya",
120120
"LABEL_CONTACTS": "Əlaqələr",
121+
"LABEL_WA":"Whatsapp yayımları",
121122
"LABEL_PLACEHOLDER": "mesajınızı yazın..",
122123
"LABEL_START_NW_CONV": "Yeni söhbət",
123124
"LABEL_FIRST_MSG": "Probleminizi qısaca təsvir edin, agent sizinlə əlaqə saxlayacaq.",

src/assets/i18n/de.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
"LABEL_IS_WRITING": "tippen",
119119
"LABEL_VERSION": "Ausführung",
120120
"LABEL_CONTACTS": "Kontakte",
121+
"LABEL_WA":"WhatsApp-Übertragungen",
121122
"LABEL_PLACEHOLDER": "Geben Sie Ihre Nachricht ein..",
122123
"LABEL_START_NW_CONV": "Neues Gespräch",
123124
"LABEL_FIRST_MSG": "Beschreiben Sie kurz Ihr Problem, Sie werden von einem Agenten kontaktiert.",

src/assets/i18n/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
"LABEL_IS_WRITING": "typing",
119119
"LABEL_VERSION": "version",
120120
"LABEL_CONTACTS": "Contacts",
121+
"LABEL_WA":"Whatsapp broadcasts",
121122
"LABEL_PLACEHOLDER": "type your message..",
122123
"LABEL_START_NW_CONV": "New conversation",
123124
"LABEL_FIRST_MSG": "Describe shortly your problem, you will be contacted by an agent.",

src/assets/i18n/es.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
"LABEL_IS_WRITING": "escribir",
119119
"LABEL_VERSION": "versión",
120120
"LABEL_CONTACTS": "Contactos",
121+
"LABEL_WA":"Transmisiones de Whatsapp",
121122
"LABEL_PLACEHOLDER": "escribe tu mensaje..",
122123
"LABEL_START_NW_CONV": "Nueva conversación",
123124
"LABEL_FIRST_MSG": "Describa en breve su problema, será contactado por un agente.",

src/assets/i18n/fr.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
"LABEL_IS_WRITING": "dactylographie",
119119
"LABEL_VERSION": "version",
120120
"LABEL_CONTACTS": "Contacts",
121+
"LABEL_WA":"Diffusions Whatsapp",
121122
"LABEL_PLACEHOLDER": "tapez votre message..",
122123
"LABEL_START_NW_CONV": "Nouvelle conversation",
123124
"LABEL_FIRST_MSG": "Décrivez brièvement votre problème, vous serez contacté par un agent.",

src/assets/i18n/it.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
"LABEL_IS_WRITING": "sta scrivendo...",
119119
"LABEL_VERSION": "versione",
120120
"LABEL_CONTACTS": "Contatti",
121+
"LABEL_WA":"WhatsApp Broadcasts",
121122
"LABEL_PLACEHOLDER": "Scrivi la tua domanda...",
122123
"LABEL_START_NW_CONV": "Nuova conversazione",
123124
"LABEL_FIRST_MSG": "Descrivi sinteticamente il tuo problema, ti metteremo in contatto con un operatore specializzato.",

src/assets/i18n/kk.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
"LABEL_IS_WRITING": "теру",
119119
"LABEL_VERSION": "нұсқасы",
120120
"LABEL_CONTACTS": "Контактілер",
121+
"LABEL_WA":"Whatsapp хабарлары",
121122
"LABEL_PLACEHOLDER": "хабарламаңызды теріңіз..",
122123
"LABEL_START_NW_CONV": "Жаңа әңгіме",
123124
"LABEL_FIRST_MSG": "Мәселеңізді қысқаша сипаттаңыз, сізге агент хабарласады.",

0 commit comments

Comments
 (0)