contactstudiocstools 1.0.228 → 1.0.230
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/dist/module.json
CHANGED
|
@@ -20,7 +20,14 @@
|
|
|
20
20
|
|
|
21
21
|
<!-- info -->
|
|
22
22
|
<div class="flex-1 mx-3 w-24">
|
|
23
|
-
<
|
|
23
|
+
<span
|
|
24
|
+
class="badge badge-expertise"
|
|
25
|
+
tooltip="Expertise"
|
|
26
|
+
v-if="expertise"
|
|
27
|
+
>
|
|
28
|
+
{{ expertise.replace(/_/g, " ") }}
|
|
29
|
+
</span>
|
|
30
|
+
<p class="w-full overflow-hidden text-ellipsis whitespace-nowrap py-1 mt-1">
|
|
24
31
|
<!-- label -->
|
|
25
32
|
<span class="text-xs">
|
|
26
33
|
{{ contact.label }}
|
|
@@ -99,6 +106,9 @@ const getStatusClass = computed<string>(() => {
|
|
|
99
106
|
if (props.contact.on) return "avatar-status-success";
|
|
100
107
|
return "avatar-status-error";
|
|
101
108
|
});
|
|
109
|
+
const expertise = computed<string>(() => {
|
|
110
|
+
return props.contact.primitive.expertise || ''
|
|
111
|
+
})
|
|
102
112
|
|
|
103
113
|
// data
|
|
104
114
|
const expirated = ref<boolean>(false);
|
|
@@ -125,7 +135,7 @@ async function setTimerContact(): Promise<void> {
|
|
|
125
135
|
setTimerContact()
|
|
126
136
|
</script>
|
|
127
137
|
|
|
128
|
-
<style
|
|
138
|
+
<style>
|
|
129
139
|
.min-w-40px {
|
|
130
140
|
min-width: 40px;
|
|
131
141
|
}
|
|
@@ -133,4 +143,22 @@ setTimerContact()
|
|
|
133
143
|
.text-2xs {
|
|
134
144
|
font-size: 0.7rem;
|
|
135
145
|
}
|
|
146
|
+
|
|
147
|
+
:root {
|
|
148
|
+
--badge-background-color: #fff;
|
|
149
|
+
--badge-text-color: #9333EA;
|
|
150
|
+
--badge-border-color: #e2e8f0;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.badge-expertise {
|
|
154
|
+
background-color: var(--badge-background-color);
|
|
155
|
+
color: var(--badge-text-color);
|
|
156
|
+
border: 1px solid var(--badge-border-color);
|
|
157
|
+
font-weight: 500;
|
|
158
|
+
}
|
|
159
|
+
.dark .badge-expertise {
|
|
160
|
+
background-color: #1e293b!important;
|
|
161
|
+
border: 1px solid #334155!important;
|
|
162
|
+
color: #A855F7;
|
|
163
|
+
}
|
|
136
164
|
</style>
|
|
@@ -29,8 +29,8 @@ function initSnapshot(): void {
|
|
|
29
29
|
});
|
|
30
30
|
snapshot.onmessage = ({ data }) => {
|
|
31
31
|
if (data.error) {
|
|
32
|
-
console.log(data)
|
|
33
|
-
logout(
|
|
32
|
+
console.log(JSON.stringify(data))
|
|
33
|
+
logout(JSON.stringify(data) || "defaultLongpollingError");
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
>
|
|
108
108
|
<li
|
|
109
109
|
class="item sidenav-item !text-error"
|
|
110
|
-
@click="
|
|
110
|
+
@click="logoutUser"
|
|
111
111
|
>
|
|
112
112
|
<i class="bi-box-arrow-in-left text-lg leading-none mr-5" />
|
|
113
113
|
Sair
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
<script setup lang="ts">
|
|
121
121
|
import { ref, computed } from "vue";
|
|
122
122
|
import { useRoute, useNuxtApp } from "#app";
|
|
123
|
-
import { IDoubts, IPages } from "./types";
|
|
123
|
+
import { IDoubts, IPages, logout } from "./types";
|
|
124
124
|
|
|
125
125
|
// props
|
|
126
126
|
interface IProps {
|
|
@@ -128,7 +128,7 @@ interface IProps {
|
|
|
128
128
|
warns?: string[];
|
|
129
129
|
doubts?: IDoubts;
|
|
130
130
|
exit?: boolean;
|
|
131
|
-
logout?:
|
|
131
|
+
logout?: string;
|
|
132
132
|
}
|
|
133
133
|
const props = defineProps<IProps>();
|
|
134
134
|
|
|
@@ -165,8 +165,8 @@ function outside(e: MouseEvent): void {
|
|
|
165
165
|
function closeWarns(): void {
|
|
166
166
|
document.getElementById("accordion-warns")?.removeAttribute("open");
|
|
167
167
|
}
|
|
168
|
-
function
|
|
169
|
-
|
|
168
|
+
function logoutUser(): void {
|
|
169
|
+
logout(props.logout || 'Não passado como parametro');
|
|
170
170
|
}
|
|
171
171
|
function changeMode(): void {
|
|
172
172
|
$emit("darkmode:change")
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { v4 } from "uuid";
|
|
2
|
-
import { removeCookie } from "typescript-cookie";
|
|
3
2
|
import {
|
|
4
3
|
EUserStatus,
|
|
5
4
|
ChatMessageTextDTO,
|
|
@@ -94,10 +93,6 @@ export async function searchZipCode({ models, field }) {
|
|
|
94
93
|
}
|
|
95
94
|
}
|
|
96
95
|
export async function logout(reason) {
|
|
97
|
-
await fetch("/csapi/v2/operation/user", {
|
|
98
|
-
method: "DELETE"
|
|
99
|
-
});
|
|
100
|
-
removeCookie("cssession");
|
|
101
96
|
if (!process.dev) {
|
|
102
97
|
location.assign(`/csapi/iam/ui/login?reason=${reason ? reason : "indefinido"}`);
|
|
103
98
|
}
|