@chat21/chat21-ionic 3.0.85 → 3.0.86-rc.2
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 +121 -4
- package/README.md +2 -2
- package/package.json +4 -3
- package/src/app/app-routing.module.ts +7 -2
- package/src/app/app.component.html +7 -1
- package/src/app/app.component.scss +20 -2
- package/src/app/app.component.ts +131 -20
- package/src/app/app.module.ts +8 -3
- package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +11 -4
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +86 -23
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +188 -88
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +42 -3
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +11 -24
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +6 -10
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.spec.ts +2 -2
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +16 -26
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.html +5 -1
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.scss +22 -15
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.ts +25 -5
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.html +2 -1
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.scss +14 -15
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.ts +24 -5
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.html +6 -1
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.scss +12 -13
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.ts +26 -5
- package/src/app/chatlib/conversation-detail/message/frame/frame.component.html +8 -2
- package/src/app/chatlib/conversation-detail/message/frame/frame.component.scss +36 -0
- package/src/app/chatlib/conversation-detail/message/frame/frame.component.ts +2 -2
- package/src/app/chatlib/conversation-detail/message/html/html.component.ts +0 -1
- package/src/app/chatlib/conversation-detail/message/image/image.component.html +3 -2
- package/src/app/chatlib/conversation-detail/message/image/image.component.scss +17 -5
- package/src/app/chatlib/conversation-detail/message/image/image.component.ts +1 -1
- package/src/app/chatlib/conversation-detail/message/info-message/info-message.component.scss +3 -2
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.html +16 -6
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.scss +1 -3
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.ts +2 -0
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +78 -52
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +63 -20
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +14 -10
- package/src/app/components/canned-response/canned-response.component.html +9 -9
- package/src/app/components/canned-response/canned-response.component.scss +14 -7
- package/src/app/components/canned-response/canned-response.component.ts +5 -4
- package/src/app/components/contacts-directory/contacts-directory.component.html +22 -26
- package/src/app/components/contacts-directory/contacts-directory.component.scss +8 -6
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +64 -47
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +98 -61
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +24 -44
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component_2.html +116 -0
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +39 -42
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +67 -4
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +82 -154
- package/src/app/components/conversation-info/info-content/info-content.component.html +23 -2
- package/src/app/components/conversation-info/info-content/info-content.component.ts +5 -6
- package/src/app/components/conversation-info/info-direct/info-direct.component.html +7 -14
- package/src/app/components/conversation-info/info-direct/info-direct.component.scss +23 -0
- package/src/app/components/conversation-info/info-direct/info-direct.component.ts +1 -6
- package/src/app/components/conversation-info/info-group/info-group.component.html +44 -108
- package/src/app/components/conversation-info/info-group/info-group.component.scss +101 -61
- package/src/app/components/conversation-info/info-group/info-group.component.ts +1 -0
- package/src/app/components/conversation-info/info-support-group/info-support-group.component.html +2 -1
- package/src/app/components/conversation-info/info-support-group/info-support-group.component.ts +0 -1
- package/src/app/components/{ddp-header/ddp-header.component.html → conversations-list/header-conversations-list/header-conversations-list.component.html} +3 -3
- package/src/app/components/{ddp-header/ddp-header.component.scss → conversations-list/header-conversations-list/header-conversations-list.component.scss} +16 -4
- package/src/app/components/{conversation-detail/bubble-my-message/bubble-my-message.component.spec.ts → conversations-list/header-conversations-list/header-conversations-list.component.spec.ts} +6 -6
- package/src/app/components/{ddp-header/ddp-header.component.ts → conversations-list/header-conversations-list/header-conversations-list.component.ts} +7 -16
- package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.html +12 -0
- package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.scss +14 -0
- package/src/app/components/{conversation-detail/option-header/option-header.component.spec.ts → conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.spec.ts} +5 -5
- package/src/app/components/{conversation-detail/option-header/option-header.component.ts → conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.ts} +5 -4
- package/src/app/components/navbar/navbar.component.html +103 -0
- package/src/app/components/navbar/navbar.component.scss +249 -0
- package/src/app/components/{ddp-header/ddp-header.component.spec.ts → navbar/navbar.component.spec.ts} +6 -6
- package/src/app/components/navbar/navbar.component.ts +195 -0
- package/src/app/components/project-item/project-item.component.html +98 -149
- package/src/app/components/project-item/project-item.component.scss +43 -35
- package/src/app/components/project-item/project-item.component.ts +16 -4
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +5 -5
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +24 -13
- package/src/app/components/utils/user-presence/user-presence.component.html +7 -2
- package/src/app/components/utils/user-presence/user-presence.component.scss +35 -18
- package/src/app/components/utils/user-presence/user-presence.component.ts +6 -10
- package/src/app/{pages → modals}/create-canned-response/create-canned-response-routing.module.ts +0 -0
- package/src/app/{pages → modals}/create-canned-response/create-canned-response.module.ts +0 -0
- package/src/app/{pages → modals}/create-canned-response/create-canned-response.page.html +0 -0
- package/src/app/{pages → modals}/create-canned-response/create-canned-response.page.scss +0 -0
- package/src/app/{pages → modals}/create-canned-response/create-canned-response.page.spec.ts +0 -0
- package/src/app/{pages → modals}/create-canned-response/create-canned-response.page.ts +13 -13
- package/src/app/{pages → modals}/loader-preview/loader-preview-routing.module.ts +0 -0
- package/src/app/{pages → modals}/loader-preview/loader-preview.module.ts +0 -0
- package/src/app/{pages → modals}/loader-preview/loader-preview.page.html +1 -1
- package/src/app/{pages → modals}/loader-preview/loader-preview.page.scss +4 -0
- package/src/app/{pages → modals}/loader-preview/loader-preview.page.spec.ts +0 -0
- package/src/app/{pages → modals}/loader-preview/loader-preview.page.ts +1 -2
- package/src/app/modals/send-email/send-email-routing.module.ts +17 -0
- package/src/app/modals/send-email/send-email.module.ts +31 -0
- package/src/app/modals/send-email/send-email.page.html +46 -0
- package/src/app/modals/send-email/send-email.page.scss +161 -0
- package/src/app/modals/send-email/send-email.page.spec.ts +24 -0
- package/src/app/modals/send-email/send-email.page.ts +89 -0
- package/src/app/pages/contacts-directory/contacts-directory.page.html +1 -1
- package/src/app/pages/contacts-directory/contacts-directory.page.scss +47 -0
- package/src/app/pages/contacts-directory/contacts-directory.page.ts +2 -0
- package/src/app/pages/conversation-detail/conversation-detail.module.ts +0 -8
- package/src/app/pages/conversation-detail/conversation-detail.page.html +48 -27
- package/src/app/pages/conversation-detail/conversation-detail.page.scss +45 -254
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +330 -138
- package/src/app/pages/conversations-list/conversations-list.page.html +11 -8
- package/src/app/pages/conversations-list/conversations-list.page.scss +18 -2
- package/src/app/pages/conversations-list/conversations-list.page.ts +26 -24
- package/src/app/pages/profile-info/profile-info.page.html +2 -4
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +1 -1
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +42 -0
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +1 -0
- package/src/app/services/canned-responses/canned-responses.service.ts +26 -0
- package/src/app/services/projects/projects.service.spec.ts +12 -0
- package/src/app/services/projects/projects.service.ts +43 -0
- package/src/app/services/tiledesk/tiledesk.service.ts +33 -17
- package/src/app/shared/shared.module.ts +24 -33
- package/src/app/utils/toast.spec.ts +7 -0
- package/src/app/utils/toast.ts +48 -0
- package/src/assets/i18n/ar.json +288 -265
- package/src/assets/i18n/az.json +24 -1
- package/src/assets/i18n/de.json +25 -2
- package/src/assets/i18n/en.json +25 -2
- package/src/assets/i18n/es.json +26 -3
- package/src/assets/i18n/fr.json +24 -1
- package/src/assets/i18n/it.json +24 -1
- package/src/assets/i18n/kk.json +25 -2
- package/src/assets/i18n/pt.json +25 -2
- package/src/assets/i18n/ru.json +24 -1
- package/src/assets/i18n/sr.json +287 -264
- package/src/assets/i18n/sv.json +25 -2
- package/src/assets/i18n/tr.json +25 -2
- package/src/assets/i18n/uk.json +25 -2
- package/src/assets/i18n/uz.json +24 -1
- package/src/assets/js/chat21client.js +1 -1
- package/src/assets/sounds/interface-start.mp3 +0 -0
- package/src/assets/sounds/wheep-wheep.mp3 +0 -0
- package/src/chat-config-mqtt-localhost.json +2 -2
- package/src/chat-config-native-mqtt.json +3 -0
- package/src/chat21-core/models/conversation.ts +0 -1
- package/src/chat21-core/models/projects.ts +27 -0
- package/src/chat21-core/providers/firebase/firebase-typing.service.ts +7 -9
- package/src/chat21-core/providers/logger/customLogger.ts +1 -1
- package/src/chat21-core/providers/mqtt/mqtt-auth-service.ts +7 -8
- package/src/chat21-core/utils/constants.ts +7 -1
- package/src/chat21-core/utils/convertRequestToConversation.ts +41 -0
- package/src/chat21-core/utils/user-typing/user-typing.component.html +8 -5
- package/src/chat21-core/utils/user-typing/user-typing.component.scss +87 -17
- package/src/chat21-core/utils/user-typing/user-typing.component.ts +12 -94
- package/src/chat21-core/utils/utils.ts +41 -11
- package/src/global.scss +59 -255
- package/src/index.html +0 -9
- package/src/variables.scss +30 -10
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.html +0 -3
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.scss +0 -21
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.spec.ts +0 -24
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.ts +0 -14
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.html +0 -54
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.scss +0 -98
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +0 -84
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.html +0 -30
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.scss +0 -83
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.spec.ts +0 -24
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.ts +0 -68
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.html +0 -3
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.scss +0 -10
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.spec.ts +0 -24
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.ts +0 -14
- package/src/app/components/conversation-detail/option-header/option-header.component.html +0 -13
- package/src/app/components/conversation-detail/option-header/option-header.component.scss +0 -0
|
@@ -1,158 +1,107 @@
|
|
|
1
1
|
<div class="main-content main-content-project-for-panel">
|
|
2
|
-
<div class="container-fluid container-project-for-panel">
|
|
3
|
-
|
|
4
|
-
<div class="left-sidebar">
|
|
5
|
-
|
|
6
|
-
<!-- <loading-spinner *ngIf="showSpinner"></loading-spinner> -->
|
|
7
|
-
<!-- *ngIf="!showSpinner" -->
|
|
8
|
-
<div class="left-sidebar-project" style="margin-right: -10px;">
|
|
9
|
-
|
|
10
|
-
<div class="small-projects-sidebar">
|
|
11
|
-
<!-- <div class="pinned-project">Pinned project </div> margin-left:4px -->
|
|
12
|
-
<div *ngIf="project?.id_project?.status !== 0" class="flex-container-project-for-panel project-row">
|
|
13
|
-
<div class="flex-child-left" [tooltip]="conversationsInQueue" [options]="tooltipOptions" placement="top"
|
|
14
|
-
content-type="template" (click)="openUnservedConvs()">
|
|
15
|
-
<div class="unassigned-notifications-icon-wpr">
|
|
16
|
-
<svg viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" focusable="false"
|
|
17
|
-
class="style-scope yt-icon"
|
|
18
|
-
style="pointer-events: none; width: 37px; height:auto; fill: rgb(107,107,107);margin-top: 9px;">
|
|
19
|
-
<g class="style-scope yt-icon">
|
|
20
|
-
<path
|
|
21
|
-
d="M10,20h4c0,1.1-0.9,2-2,2S10,21.1,10,20z M20,17.35V19H4v-1.65l2-1.88v-5.15c0-2.92,1.56-5.22,4-5.98V3.96 c0-1.42,1.49-2.5,2.99-1.76C13.64,2.52,14,3.23,14,3.96l0,0.39c2.44,0.75,4,3.06,4,5.98v5.15L20,17.35z M19,17.77l-2-1.88v-5.47 c0-2.47-1.19-4.36-3.13-5.1c-1.26-0.53-2.64-0.5-3.84,0.03C8.15,6.11,7,7.99,7,10.42v5.47l-2,1.88V18h14V17.77z"
|
|
22
|
-
class="style-scope yt-icon"></path>
|
|
23
|
-
</g>
|
|
24
|
-
</svg>
|
|
25
|
-
</div>
|
|
26
|
-
<div class="unassigned-notifications-badge" *ngIf="unservedRequestCount > 0">
|
|
27
|
-
<!-- || currentUserRequestCount > 0 -->
|
|
28
|
-
<!-- <span *ngIf="unservedRequestCount > 0 "> -->
|
|
29
|
-
<!-- + currentUserRequestCount -->
|
|
30
|
-
<span class="notification-count">{{ unservedRequestCount }}</span>
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
2
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
<!-- <div class="availabily-and-busy-wpr">
|
|
70
|
-
<div class="availabily---wpr" tooltip="{{avaialble_status_for_tooltip}}" [options]="tooltipOptions">
|
|
71
|
-
<div class="onoffswitch"
|
|
72
|
-
(click)="$event.stopPropagation();changeAvailabilityState(project?.id_project?._id, project?.ws_projct_user_available)">
|
|
73
|
-
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox"
|
|
74
|
-
id="switchavailableunavailablestatus" tabindex="0" [checked]="project?.ws_projct_user_available">
|
|
75
|
-
<label class="onoffswitch-label" for="switchavailableunavailablestatus"></label>
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
<!- - (click)="$event.stopPropagation();changeAvailabilityState(project?.id_project?._id, project?.ws_projct_user_available)" - ->
|
|
81
|
-
<span *ngIf="project?.ws_projct_user_available === true" class="availibility-status-text"
|
|
82
|
-
[ngClass]="{'online-text-color' : project?.ws_projct_user_available === true, 'offline-text-color' : project?.ws_projct_user_available === false}">
|
|
83
|
-
{{translationMap?.get('LABEL_AVAILABLE') }}
|
|
84
|
-
</span>
|
|
85
|
-
<!- - (click)="$event.stopPropagation();changeAvailabilityState(project?.id_project?._id, project?.ws_projct_user_available)" - ->
|
|
86
|
-
<span *ngIf="project?.ws_projct_user_available === false" class="availibility-status-text"
|
|
87
|
-
[ngClass]="{'online-text-color' : project?.ws_projct_user_available === true, 'offline-text-color' : project?.ws_projct_user_available === false}">
|
|
88
|
-
{{translationMap?.get('LABEL_NOT_AVAILABLE')}}
|
|
89
|
-
</span>
|
|
90
|
-
|
|
91
|
-
<div class="project-item--isBusy-icon-wpr" *ngIf="project?.ws_projct_user_isBusy === true" tooltip="{{translationMap?.get('LABEL_BUSY')}}"
|
|
92
|
-
[options]="tooltipOptions" placement="top" >
|
|
93
|
-
<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="16px"
|
|
94
|
-
viewBox="0 0 24 24" width="16px" fill="#FEB92C">
|
|
95
|
-
<g><path d="M0,0h24v24H0V0z" fill="none" /></g>
|
|
96
|
-
<g><path d="M11.99,2C6.47,2,2,6.48,2,12s4.47,10,9.99,10C17.52,22,22,17.52,22,12S17.52,2,11.99,2z M15.29,16.71L11,12.41V7h2v4.59 l3.71,3.71L15.29,16.71z" /></g>
|
|
97
|
-
</svg>
|
|
98
|
-
</div>
|
|
99
|
-
</div>
|
|
100
|
-
</div> -->
|
|
101
|
-
|
|
102
|
-
<div *ngIf="IS_ON_MOBILE_DEVICE === true" class="flex-child-view-all-convs">
|
|
103
|
-
<div class="view-all-convs-icon-wpr" style="cursor: pointer;" [tooltip]="viewAllConvs"
|
|
104
|
-
[options]="tooltipOptions" placement="top" content-type="template">
|
|
105
|
-
|
|
106
|
-
<ion-button ion-button fill="clear" class="open-unserved-convs-btn"
|
|
107
|
-
(click)="openUnservedConvsAndGoToProjectList()">
|
|
108
|
-
|
|
109
|
-
<span class="push-icon-and-list-wpr">
|
|
110
|
-
<!-- <svg version="1.1" id="Livello_1" xmlns="http://www.w3.org/2000/svg"
|
|
111
|
-
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 24 24"
|
|
112
|
-
style="enable-background:new 0 0 24 24;" xml:space="preserve" style="width: 20px;">
|
|
113
|
-
<style type="text/css">
|
|
114
|
-
.st0 {
|
|
115
|
-
fill: #3880ff;
|
|
116
|
-
}
|
|
117
|
-
</style>
|
|
118
|
-
<path class="st0"
|
|
119
|
-
d="M22.8,15v-2c-1.7,0-3-1.3-3-3V5h1c0.5,0,1-0.5,1-1s-0.5-1-1-1h-10c-0.5,0-1,0.5-1,1s0.5,1,1,1h1v5
|
|
120
|
-
c0,1.7-1.3,3-3,3v2h6v5c0.6,0,1.4,0,2,0v-5H22.8z M12.8,13c0.7-0.9,1-1.9,1-3V5h4v5c0,1.1,0.4,2.2,1,3H12.8z" />
|
|
121
|
-
<rect x="1.2" y="13" class="st0" width="6.3" height="2" />
|
|
122
|
-
<rect x="1.2" y="18" class="st0" width="12.1" height="2" />
|
|
123
|
-
<rect x="1.2" y="7.6" class="st0" width="9.2" height="2" />
|
|
124
|
-
</svg> -->
|
|
125
|
-
|
|
126
|
-
<svg version="1.1" id="Livello_1" xmlns="http://www.w3.org/2000/svg"
|
|
127
|
-
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 24 24"
|
|
128
|
-
style="enable-background:new 0 0 24 24;" xml:space="preserve" style="width: 16px;">
|
|
129
|
-
<style type="text/css">
|
|
130
|
-
.st0 {
|
|
131
|
-
fill: #165CEE;
|
|
132
|
-
}
|
|
133
|
-
</style>
|
|
134
|
-
<path class="st0" d="M20.6,16.3v-2.4c-2.1,0-3.7-1.6-3.7-3.7V4h1.2c0.6,0,1.2-0.6,1.2-1.2s-0.6-1.2-1.2-1.2H5.9
|
|
135
|
-
c-0.6,0-1.2,0.6-1.2,1.2S5.3,4,5.9,4h1.2v6.1c0,2.1-1.6,3.7-3.7,3.7v2.4h7.3v6.1c0.7,0,1.7,0,2.4,0v-6.1H20.6z M8.3,13.8
|
|
136
|
-
c0.9-1.1,1.2-2.3,1.2-3.7V4h4.9v6.1c0,1.3,0.5,2.7,1.2,3.7H8.3z" />
|
|
137
|
-
</svg>
|
|
138
|
-
</span>
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
</ion-button>
|
|
143
|
-
</div>
|
|
144
|
-
<ng-template #viewAllConvs>
|
|
145
|
-
<span>
|
|
146
|
-
{{translationMap?.get('CHANGE_PINNED_PROJECT') }}</span>
|
|
147
|
-
</ng-template>
|
|
3
|
+
<!-- <div class="pinned-project">Pinned project </div> margin-left:4px -->
|
|
4
|
+
<div *ngIf="project?.id_project?.status !== 0" class="flex-container-project-for-panel project-row">
|
|
5
|
+
<div class="flex-child-left" [tooltip]="conversationsInQueueOnProjectName" [options]="tooltipOptions" placement="top"
|
|
6
|
+
content-type="template" (click)="openUnservedConvs()">
|
|
7
|
+
<div class="unassigned-notifications-icon-wpr">
|
|
8
|
+
<svg viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" focusable="false" class="style-scope yt-icon">
|
|
9
|
+
<g class="style-scope yt-icon">
|
|
10
|
+
<path
|
|
11
|
+
d="M10,20h4c0,1.1-0.9,2-2,2S10,21.1,10,20z M20,17.35V19H4v-1.65l2-1.88v-5.15c0-2.92,1.56-5.22,4-5.98V3.96 c0-1.42,1.49-2.5,2.99-1.76C13.64,2.52,14,3.23,14,3.96l0,0.39c2.44,0.75,4,3.06,4,5.98v5.15L20,17.35z M19,17.77l-2-1.88v-5.47 c0-2.47-1.19-4.36-3.13-5.1c-1.26-0.53-2.64-0.5-3.84,0.03C8.15,6.11,7,7.99,7,10.42v5.47l-2,1.88V18h14V17.77z"
|
|
12
|
+
class="style-scope yt-icon"></path>
|
|
13
|
+
</g>
|
|
14
|
+
</svg>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="unassigned-notifications-badge" *ngIf="unservedRequestCount > 0">
|
|
17
|
+
<!-- || currentUserRequestCount > 0 -->
|
|
18
|
+
<!-- <span *ngIf="unservedRequestCount > 0 "> -->
|
|
19
|
+
<!-- + currentUserRequestCount -->
|
|
20
|
+
<span class="notification-count">{{ unservedRequestCount }}</span>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
<div class="flex-child-right">
|
|
26
|
+
<div class="project-name-project-for-panel" [tooltip]="conversationsInQueueOnProjectName"
|
|
27
|
+
[options]="tooltipOptions" placement="top" content-type="template" (click)="openUnservedConvs()">
|
|
28
|
+
<div class="unassigned_label"> <a>{{ translationMap?.get('UnassignedConversations') }}</a> </div>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<!-- <div class="availabily-and-busy-wpr">
|
|
32
|
+
<div class="availabily---wpr" tooltip="{{avaialble_status_for_tooltip}}" [options]="tooltipOptions">
|
|
33
|
+
<div class="onoffswitch"
|
|
34
|
+
(click)="$event.stopPropagation();changeAvailabilityState(project?.id_project?._id, project?.ws_projct_user_available)">
|
|
35
|
+
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox"
|
|
36
|
+
id="switchavailableunavailablestatus" tabindex="0" [checked]="project?.ws_projct_user_available">
|
|
37
|
+
<label class="onoffswitch-label" for="switchavailableunavailablestatus"></label>
|
|
148
38
|
</div>
|
|
39
|
+
</div>
|
|
149
40
|
|
|
41
|
+
|
|
42
|
+
<!- - (click)="$event.stopPropagation();changeAvailabilityState(project?.id_project?._id, project?.ws_projct_user_available)" - ->
|
|
43
|
+
<span *ngIf="project?.ws_projct_user_available === true" class="availibility-status-text"
|
|
44
|
+
[ngClass]="{'online-text-color' : project?.ws_projct_user_available === true, 'offline-text-color' : project?.ws_projct_user_available === false}">
|
|
45
|
+
{{translationMap?.get('LABEL_AVAILABLE') }}
|
|
46
|
+
</span>
|
|
47
|
+
<!- - (click)="$event.stopPropagation();changeAvailabilityState(project?.id_project?._id, project?.ws_projct_user_available)" - ->
|
|
48
|
+
<span *ngIf="project?.ws_projct_user_available === false" class="availibility-status-text"
|
|
49
|
+
[ngClass]="{'online-text-color' : project?.ws_projct_user_available === true, 'offline-text-color' : project?.ws_projct_user_available === false}">
|
|
50
|
+
{{translationMap?.get('LABEL_NOT_AVAILABLE')}}
|
|
51
|
+
</span>
|
|
52
|
+
|
|
53
|
+
<div class="project-item--isBusy-icon-wpr" *ngIf="project?.ws_projct_user_isBusy === true" tooltip="{{translationMap?.get('LABEL_BUSY')}}"
|
|
54
|
+
[options]="tooltipOptions" placement="top" >
|
|
55
|
+
<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="16px"
|
|
56
|
+
viewBox="0 0 24 24" width="16px" fill="#FEB92C">
|
|
57
|
+
<g><path d="M0,0h24v24H0V0z" fill="none" /></g>
|
|
58
|
+
<g><path d="M11.99,2C6.47,2,2,6.48,2,12s4.47,10,9.99,10C17.52,22,22,17.52,22,12S17.52,2,11.99,2z M15.29,16.71L11,12.41V7h2v4.59 l3.71,3.71L15.29,16.71z" /></g>
|
|
59
|
+
</svg>
|
|
150
60
|
</div>
|
|
151
61
|
</div>
|
|
62
|
+
</div> -->
|
|
152
63
|
|
|
153
|
-
|
|
64
|
+
<!-- <div *ngIf="IS_ON_MOBILE_DEVICE === true" class="flex-child-view-all-convs">
|
|
65
|
+
<div class="view-all-convs-icon-wpr" style="cursor: pointer;" [tooltip]="viewAllConvs"
|
|
66
|
+
[options]="tooltipOptions" placement="top" content-type="template">
|
|
67
|
+
|
|
68
|
+
<ion-button ion-button fill="clear" class="open-unserved-convs-btn"
|
|
69
|
+
(click)="openUnservedConvsAndGoToProjectList()">
|
|
70
|
+
|
|
71
|
+
<span class="push-icon-and-list-wpr">
|
|
72
|
+
<svg version="1.1" id="Livello_1" xmlns="http://www.w3.org/2000/svg"
|
|
73
|
+
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 24 24"
|
|
74
|
+
style="enable-background:new 0 0 24 24;" xml:space="preserve" style="width: 16px;">
|
|
75
|
+
<style type="text/css">
|
|
76
|
+
.st0 {
|
|
77
|
+
fill: #165CEE;
|
|
78
|
+
}
|
|
79
|
+
</style>
|
|
80
|
+
<path class="st0" d="M20.6,16.3v-2.4c-2.1,0-3.7-1.6-3.7-3.7V4h1.2c0.6,0,1.2-0.6,1.2-1.2s-0.6-1.2-1.2-1.2H5.9
|
|
81
|
+
c-0.6,0-1.2,0.6-1.2,1.2S5.3,4,5.9,4h1.2v6.1c0,2.1-1.6,3.7-3.7,3.7v2.4h7.3v6.1c0.7,0,1.7,0,2.4,0v-6.1H20.6z M8.3,13.8
|
|
82
|
+
c0.9-1.1,1.2-2.3,1.2-3.7V4h4.9v6.1c0,1.3,0.5,2.7,1.2,3.7H8.3z" />
|
|
83
|
+
</svg>
|
|
84
|
+
</span>
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
</ion-button>
|
|
89
|
+
</div>
|
|
90
|
+
<ng-template #viewAllConvs>
|
|
91
|
+
<span>
|
|
92
|
+
{{translationMap?.get('CHANGE_PINNED_PROJECT') }}</span>
|
|
93
|
+
</ng-template>
|
|
94
|
+
</div> -->
|
|
154
95
|
|
|
155
|
-
</div>
|
|
156
96
|
</div>
|
|
157
|
-
|
|
158
|
-
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
</div>
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
<ng-template #conversationsInQueueOnProjectName>
|
|
103
|
+
<span>
|
|
104
|
+
({{ unservedRequestCount }})
|
|
105
|
+
{{translationMap?.get('UnassignedConversations') }}
|
|
106
|
+
</span>
|
|
107
|
+
</ng-template>
|
|
@@ -4,13 +4,10 @@
|
|
|
4
4
|
padding-top: 0px;
|
|
5
5
|
margin-top: 0px !important;
|
|
6
6
|
padding-bottom: 0px !important;
|
|
7
|
-
// background: #fff;
|
|
8
7
|
padding-left: 0px;
|
|
9
8
|
width: 100%;
|
|
10
|
-
// min-height:
|
|
11
|
-
// height:
|
|
12
|
-
min-height: 64px;
|
|
13
|
-
height: 64px;
|
|
9
|
+
// min-height: 64px;
|
|
10
|
+
// height: 64px;
|
|
14
11
|
position: relative;
|
|
15
12
|
// top: -5px; //nk x AS
|
|
16
13
|
}
|
|
@@ -215,14 +212,10 @@
|
|
|
215
212
|
}
|
|
216
213
|
}
|
|
217
214
|
|
|
218
|
-
.container-project-for-panel {
|
|
219
|
-
padding: 0px !important;
|
|
220
|
-
width: 296px;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
215
|
.flex-container-project-for-panel {
|
|
224
216
|
display: flex;
|
|
225
|
-
width: 100%;
|
|
217
|
+
// width: 100%;
|
|
218
|
+
// height: 64px;
|
|
226
219
|
justify-content: center;
|
|
227
220
|
align-items: center;
|
|
228
221
|
// position: relative;
|
|
@@ -231,17 +224,19 @@
|
|
|
231
224
|
-o-transition: all 0.2s ease-in;
|
|
232
225
|
-webkit-transition: all 0.2s ease-in;
|
|
233
226
|
transition: all 0.2s ease-in;
|
|
234
|
-
|
|
227
|
+
margin: 6px;
|
|
228
|
+
// background-color: rgba(24, 119, 242, 0.1);
|
|
229
|
+
border-radius: 5px;
|
|
235
230
|
}
|
|
236
231
|
|
|
237
|
-
.flex-container:hover {
|
|
238
|
-
background-color:
|
|
232
|
+
.flex-container-project-for-panel:hover {
|
|
233
|
+
background-color: rgba(24, 119, 242, 0.2);
|
|
234
|
+
transition: none;
|
|
239
235
|
}
|
|
240
236
|
|
|
241
237
|
.flex-child-right {
|
|
242
238
|
flex: 1;
|
|
243
|
-
padding: 18px 0px;
|
|
244
|
-
// height: 100%;
|
|
239
|
+
// padding: 18px 0px;
|
|
245
240
|
}
|
|
246
241
|
|
|
247
242
|
|
|
@@ -249,7 +244,7 @@
|
|
|
249
244
|
// flex: 0 0 20%;
|
|
250
245
|
width: 60px;
|
|
251
246
|
text-align: center;
|
|
252
|
-
padding: 18px 0px;
|
|
247
|
+
// padding: 18px 0px;
|
|
253
248
|
height: 100%;
|
|
254
249
|
}
|
|
255
250
|
// border: 2px solid yellow;
|
|
@@ -309,22 +304,21 @@
|
|
|
309
304
|
color: #1e2129;
|
|
310
305
|
font-weight: 400;
|
|
311
306
|
margin-left: 10px;
|
|
312
|
-
width:
|
|
307
|
+
width: 250px;
|
|
313
308
|
// width: 220px !important;
|
|
314
309
|
white-space: nowrap !important;
|
|
315
310
|
overflow: hidden !important;
|
|
316
311
|
text-overflow: ellipsis !important;
|
|
317
312
|
font-family: Helvetica, Helvetica, Arial, sans-serif;
|
|
318
|
-
font-size: 14px;
|
|
313
|
+
font-size: 16px; //14px;
|
|
319
314
|
position: relative;
|
|
320
|
-
top: -1px;
|
|
321
315
|
cursor: pointer;
|
|
316
|
+
a {
|
|
317
|
+
color: #779bbb
|
|
318
|
+
}
|
|
322
319
|
}
|
|
323
320
|
|
|
324
321
|
|
|
325
|
-
.project-name-project-for-panel-on-desktop {
|
|
326
|
-
width: 217px
|
|
327
|
-
}
|
|
328
322
|
|
|
329
323
|
// .project-name-project-for-panel:hover span {
|
|
330
324
|
// color: rgba(0, 0, 0, 0.35);
|
|
@@ -332,12 +326,13 @@
|
|
|
332
326
|
// width: fit-content;
|
|
333
327
|
// display: block;
|
|
334
328
|
// }
|
|
335
|
-
.
|
|
329
|
+
.unassigned_label {
|
|
336
330
|
width: fit-content;
|
|
337
331
|
|
|
338
332
|
}
|
|
339
|
-
.
|
|
340
|
-
color:
|
|
333
|
+
.unassigned_label:hover {
|
|
334
|
+
color: rgb(100, 131, 158);
|
|
335
|
+
// font-weight: 600;
|
|
341
336
|
}
|
|
342
337
|
|
|
343
338
|
.view-all-convs-icon:hover {
|
|
@@ -452,13 +447,21 @@
|
|
|
452
447
|
// top: 3px;
|
|
453
448
|
|
|
454
449
|
position: relative;
|
|
455
|
-
top: -8px;
|
|
450
|
+
// top: -8px;
|
|
456
451
|
background: transparent;
|
|
457
452
|
border-radius: 50%;
|
|
458
|
-
width: 50px;
|
|
453
|
+
width: 40px; //50px;
|
|
459
454
|
left: 10px;
|
|
460
|
-
height: 50px;
|
|
455
|
+
height: 40px; //50px;
|
|
461
456
|
cursor: pointer;
|
|
457
|
+
|
|
458
|
+
svg {
|
|
459
|
+
pointer-events: none;
|
|
460
|
+
width: 30px;
|
|
461
|
+
height: auto;
|
|
462
|
+
fill: #779bbb; //rgb(107,107,107);
|
|
463
|
+
margin-top: 7px;
|
|
464
|
+
}
|
|
462
465
|
}
|
|
463
466
|
.unassigned-notifications-icon-wpr:hover {
|
|
464
467
|
background-color: rgba(0, 0, 0, 0.05);
|
|
@@ -467,23 +470,28 @@
|
|
|
467
470
|
.unassigned-notifications-badge {
|
|
468
471
|
position: absolute;
|
|
469
472
|
// top: 12px;
|
|
470
|
-
top: 14px;
|
|
473
|
+
top: 6px;//14px;
|
|
471
474
|
border-radius: 50%;
|
|
472
475
|
background: #e41e3f;
|
|
473
476
|
// width: 24px;
|
|
474
477
|
// height: 24px;
|
|
475
|
-
width: 22px;
|
|
476
|
-
height: 22px;
|
|
478
|
+
width: 20px; //22px;
|
|
479
|
+
height: 20px; //22px;
|
|
477
480
|
color: #fff;
|
|
478
481
|
|
|
479
|
-
left:
|
|
482
|
+
left: 40px; //33px;
|
|
480
483
|
border: 1px solid #fff;
|
|
484
|
+
|
|
485
|
+
display: flex;
|
|
486
|
+
align-content: center;
|
|
487
|
+
justify-content: center;
|
|
488
|
+
align-items: center;
|
|
481
489
|
}
|
|
482
490
|
.notification-count {
|
|
483
|
-
font-size: 12px;
|
|
491
|
+
font-size: 10px; //12px;
|
|
484
492
|
font-weight: 500;
|
|
485
493
|
position: relative;
|
|
486
|
-
top: -1px;
|
|
494
|
+
// top: -1px;
|
|
487
495
|
text-align: center;
|
|
488
496
|
}
|
|
489
497
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ConversationModel } from 'src/chat21-core/models/conversation';
|
|
1
2
|
import { EventsService } from './../../services/events-service';
|
|
2
3
|
import { Component, EventEmitter, HostListener, OnInit, Output } from '@angular/core';
|
|
3
4
|
import { WebsocketService } from 'src/app/services/websocket/websocket.service';
|
|
@@ -11,6 +12,8 @@ import { TiledeskAuthService } from 'src/chat21-core/providers/tiledesk/tiledesk
|
|
|
11
12
|
import { TiledeskService } from 'src/app/services/tiledesk/tiledesk.service';
|
|
12
13
|
import { WebSocketJs } from 'src/app/services/websocket/websocket-js';
|
|
13
14
|
import { AppConfigProvider } from 'src/app/services/app-config';
|
|
15
|
+
import { ConvertRequestToConversation } from 'src/chat21-core/utils/convertRequestToConversation';
|
|
16
|
+
import { compareValues } from 'src/chat21-core/utils/utils';
|
|
14
17
|
|
|
15
18
|
@Component({
|
|
16
19
|
selector: 'app-project-item',
|
|
@@ -28,6 +31,7 @@ export class ProjectItemComponent implements OnInit {
|
|
|
28
31
|
tiledeskToken: string;
|
|
29
32
|
|
|
30
33
|
unservedRequestCount: number = 0;
|
|
34
|
+
unservedConversations: ConversationModel[] = [];
|
|
31
35
|
currentUserRequestCount: number;
|
|
32
36
|
ROLE_IS_AGENT: boolean;
|
|
33
37
|
currentUserId: string;
|
|
@@ -54,7 +58,8 @@ export class ProjectItemComponent implements OnInit {
|
|
|
54
58
|
public tiledeskService: TiledeskService,
|
|
55
59
|
public webSocketJs: WebSocketJs,
|
|
56
60
|
private appConfigProvider: AppConfigProvider,
|
|
57
|
-
public events: EventsService
|
|
61
|
+
public events: EventsService,
|
|
62
|
+
public convertRequestToConversation: ConvertRequestToConversation
|
|
58
63
|
) { }
|
|
59
64
|
|
|
60
65
|
ngOnInit() {
|
|
@@ -132,9 +137,10 @@ export class ProjectItemComponent implements OnInit {
|
|
|
132
137
|
'LABEL_NOT_AVAILABLE',
|
|
133
138
|
'LABEL_BUSY',
|
|
134
139
|
'VIEW_ALL_CONVERSATIONS',
|
|
135
|
-
'
|
|
136
|
-
'
|
|
137
|
-
'
|
|
140
|
+
'UnassignedConversations',
|
|
141
|
+
// 'CONVERSATIONS_IN_QUEUE',
|
|
142
|
+
// 'CONVERSATION_IN_QUEUE',
|
|
143
|
+
// 'NO_CONVERSATION_IN_QUEUE',
|
|
138
144
|
'PINNED_PROJECT',
|
|
139
145
|
'CHANGE_PINNED_PROJECT',
|
|
140
146
|
"CHANGE_TO_YOUR_STATUS_TO_AVAILABLE",
|
|
@@ -307,10 +313,16 @@ export class ProjectItemComponent implements OnInit {
|
|
|
307
313
|
if (r['status'] === 100) {
|
|
308
314
|
if (this.hasmeInAgents(r['agents']) === true) {
|
|
309
315
|
count = count + 1;
|
|
316
|
+
let conv = this.convertRequestToConversation.getConvFromRequest(r)
|
|
317
|
+
if(!this.unservedConversations.find((el) => {return el.uid === conv.uid})){
|
|
318
|
+
this.unservedConversations.push(conv)
|
|
319
|
+
this.unservedConversations.sort(compareValues('timestamp', 'desc'))
|
|
320
|
+
}
|
|
310
321
|
}
|
|
311
322
|
}
|
|
312
323
|
});
|
|
313
324
|
//not sound if unservedRequest is already chached and web-sk is closed and restart again
|
|
325
|
+
// this.logger.log('updateUnservedRequestCount::: count , unservedRequestCount ', count , this.unservedRequestCount)
|
|
314
326
|
if(count > this.unservedRequestCount ){
|
|
315
327
|
this.events.publish('unservedRequest:count', count)
|
|
316
328
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<span class="user-details-dshbrd-lang-code" style="text-transform: uppercase;color: #647491;">
|
|
6
6
|
{{chat_lang}}
|
|
7
7
|
</span>
|
|
8
|
-
<img [src]="flag_url"
|
|
8
|
+
<img *ngIf="flag_url" [src]="flag_url" width="19px" height="19px" style=" position: relative;top: 1px;">
|
|
9
9
|
|
|
10
10
|
</div>
|
|
11
11
|
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
onerror="this.src='assets/images/no_image_user.png'" />
|
|
26
26
|
|
|
27
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?.
|
|
28
|
+
[ngStyle]="{'background': 'linear-gradient(rgb(255,255,255) -125%,' + user?.fillColour + ')'}">
|
|
29
29
|
<span id="sidebaravatar-altenative-user-avatar" class="sidebar-user-details-altenative-user-avatar">
|
|
30
|
-
{{ user?.
|
|
30
|
+
{{ user?.fullname_initial }}
|
|
31
31
|
</span>
|
|
32
32
|
</div>
|
|
33
33
|
|
|
@@ -79,11 +79,11 @@
|
|
|
79
79
|
[clearable]="false"
|
|
80
80
|
[searchable]="false">
|
|
81
81
|
<ng-template ng-label-tmp let-item="item">
|
|
82
|
-
<img style="width: 15px;height: 15px;position: relative; top: 1px;" height="15" width="15" [src]="item
|
|
82
|
+
<img style="width: 15px;height: 15px;position: relative; top: 1px;" height="15" width="15" [src]="item?.avatar" />
|
|
83
83
|
<span id="sidebaravatar_{{item.name}}" style="text-transform: capitalize; margin-left:8px"> {{item.label}} </span>
|
|
84
84
|
</ng-template>
|
|
85
85
|
<ng-template ng-option-tmp let-item="item" let-index="index">
|
|
86
|
-
<img style="width: 15px;height: 15px;position: relative; top: 1px;" height="15" width="15" [src]="item
|
|
86
|
+
<img style="width: 15px;height: 15px;position: relative; top: 1px;" height="15" width="15" [src]="item?.avatar" />
|
|
87
87
|
<span id="sidebaravatar_{{item.name}}" style="text-transform: capitalize; margin-left:8px"> {{item.label}} </span>
|
|
88
88
|
</ng-template>
|
|
89
89
|
</ng-select>
|
|
@@ -41,7 +41,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
41
41
|
|
|
42
42
|
isVisiblePAY: boolean;
|
|
43
43
|
public_Key: any
|
|
44
|
-
USER_PHOTO_PROFILE_EXIST: boolean;
|
|
44
|
+
USER_PHOTO_PROFILE_EXIST: boolean = false;
|
|
45
45
|
version: string
|
|
46
46
|
company_name: string = 'Tiledesk'
|
|
47
47
|
DASHBOARD_URL: string;
|
|
@@ -78,6 +78,8 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
78
78
|
// this.listenOpenUserSidebarEvent();
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
+
ngOnChanges() { }
|
|
82
|
+
|
|
81
83
|
subcribeToAuthStateChanged() {
|
|
82
84
|
this.messagingAuthService.BSAuthStateChanged.subscribe((state) => {
|
|
83
85
|
this.logger.log('[SIDEBAR-USER-DETAILS] BSAuthStateChanged ', state)
|
|
@@ -88,7 +90,8 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
88
90
|
const currentUser = JSON.parse(storedCurrentUser);
|
|
89
91
|
this.logger.log('[SIDEBAR-USER-DETAILS] - subcribeToAuthStateChanged - currentUser ', currentUser)
|
|
90
92
|
if (currentUser) {
|
|
91
|
-
this.user = currentUser
|
|
93
|
+
this.user = currentUser
|
|
94
|
+
this.createUserAvatar(this.user);
|
|
92
95
|
this.getCurrentChatLangAndTranslateLabels(this.user);
|
|
93
96
|
this.photo_profile_URL = this.imageRepoService.getImagePhotoUrl(this.user.uid)
|
|
94
97
|
this.logger.log('[SIDEBAR-USER-DETAILS] photo_profile_URL ', this.photo_profile_URL);
|
|
@@ -103,7 +106,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
103
106
|
|
|
104
107
|
checkIfExistPhotoProfile(imageUrl) {
|
|
105
108
|
this.verifyImageURL(imageUrl, (imageExists) => {
|
|
106
|
-
|
|
109
|
+
|
|
107
110
|
if (imageExists === true) {
|
|
108
111
|
this.USER_PHOTO_PROFILE_EXIST = true;
|
|
109
112
|
this.logger.log('[SIDEBAR-USER-DETAILS] photo_profile_URL IMAGE EXIST ', imageExists)
|
|
@@ -127,6 +130,23 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
127
130
|
};
|
|
128
131
|
}
|
|
129
132
|
|
|
133
|
+
createUserAvatar(currentUser) {
|
|
134
|
+
this.logger.log('[SIDEBAR] - createProjectUserAvatar ', currentUser)
|
|
135
|
+
let fullname = ''
|
|
136
|
+
if (currentUser && currentUser.firstname && currentUser.lastname) {
|
|
137
|
+
fullname = currentUser.firstname + ' ' + currentUser.lastname
|
|
138
|
+
currentUser['fullname_initial'] = avatarPlaceholder(fullname)
|
|
139
|
+
currentUser['fillColour'] = getColorBck(fullname)
|
|
140
|
+
} else if (currentUser && currentUser.firstname) {
|
|
141
|
+
fullname = currentUser.firstname
|
|
142
|
+
currentUser['fullname_initial'] = avatarPlaceholder(fullname)
|
|
143
|
+
currentUser['fillColour'] = getColorBck(fullname)
|
|
144
|
+
} else {
|
|
145
|
+
currentUser['fullname_initial'] = 'N/A'
|
|
146
|
+
currentUser['fillColour'] = 'rgb(98, 100, 167)'
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
130
150
|
// listenOpenUserSidebarEvent() {
|
|
131
151
|
// this.events.subscribe('userdetailsidebar:opened', (openUserDetailsSidebar) => {
|
|
132
152
|
// this.logger.log('[SIDEBAR-USER-DETAILS] - listenOpenUserSidebarEvent - openUserDetailsSidebar', openUserDetailsSidebar);
|
|
@@ -152,9 +172,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
152
172
|
closeUserDetailSidePanel() {
|
|
153
173
|
var element = document.getElementById('user-details');
|
|
154
174
|
element.classList.remove("active");
|
|
155
|
-
this.logger.log('[SIDEBAR-USER-DETAILS] element', element);
|
|
156
|
-
// this.HAS_CLICKED_OPEN_USER_DETAIL === true
|
|
157
|
-
// this.onCloseUserDetailsSidebar.emit(false);
|
|
175
|
+
// this.logger.log('[SIDEBAR-USER-DETAILS] element', element);
|
|
158
176
|
}
|
|
159
177
|
|
|
160
178
|
|
|
@@ -356,13 +374,6 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
356
374
|
});
|
|
357
375
|
}
|
|
358
376
|
|
|
359
|
-
|
|
360
|
-
ngOnChanges() { }
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
377
|
changeAvailabilityStateInUserDetailsSidebar(selectedStatusID) {
|
|
367
378
|
this.logger.log('[SIDEBAR-USER-DETAILS] - changeAvailabilityState projectid', this.project._id, ' available 1: ', selectedStatusID);
|
|
368
379
|
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
<div
|
|
2
|
-
<div class="
|
|
1
|
+
<div id="presence-container">
|
|
2
|
+
<div class="status-icon-container" [class.mobile]="isMobile">
|
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg" [class.online]="online" height="15" width="15" viewBox="0 0 24 24" fill="#000000"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>
|
|
4
|
+
</div>
|
|
5
|
+
<!-- <div class="status-icon" [class.online]="online" [style.border-color]="borderColor"></div> -->
|
|
6
|
+
<div class="online-point">{{status}}</div>
|
|
7
|
+
</div>
|