mirror of
https://github.com/hanzoai/helpdesk.git
synced 2026-10-12 16:56:02 +00:00
fix(styles): customer contact
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
:options="roleOptions"
|
||||
:description="roleDescription"
|
||||
/>
|
||||
<div v-if="pendingInvites.length" class="flex flex-col gap-3">
|
||||
<div v-if="pendingInvites.length" class="flex flex-col gap-3 mt-2">
|
||||
<p class="text-base font-medium text-ink-gray-5">
|
||||
{{ __("Pending Invites") }}
|
||||
</p>
|
||||
|
||||
@@ -123,7 +123,10 @@
|
||||
</div>
|
||||
|
||||
<!-- Assigned To -->
|
||||
<div v-if="!isMobileView" class="flex items-center gap-2">
|
||||
<div
|
||||
v-if="!isMobileView"
|
||||
class="flex items-center gap-2 assigned-cell"
|
||||
>
|
||||
<MultipleAvatar :avatars="ticket._assign" size="xs" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -316,3 +319,9 @@ onBeforeUnmount(() => {
|
||||
ticketsListResource.reload();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.assigned-cell :deep(.truncate) {
|
||||
@apply text-sm text-ink-gray-6;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -119,6 +119,7 @@ import ContactCustomers from "@/components/contact/ContactCustomers.vue";
|
||||
import ContactFeedback from "@/components/contact/ContactFeedback.vue";
|
||||
import TicketsTab from "@/components/customer/TicketsTab.vue";
|
||||
import DeleteWithTicketsDialog from "@/components/DeleteWithTicketsDialog.vue";
|
||||
import ModifiedIcon from "@/components/icons/ModifiedIcon.vue";
|
||||
import TicketFeedbackIcon from "@/components/icons/TicketFeedbackIcon.vue";
|
||||
import TicketHashIcon from "@/components/icons/TicketHashIcon.vue";
|
||||
//@ts-ignore
|
||||
@@ -134,7 +135,14 @@ import {
|
||||
import { useScreenSize } from "@/composables/screen";
|
||||
import { __ } from "@/translation";
|
||||
import { hasPermission } from "@/utils";
|
||||
import { Breadcrumbs, Button, Dropdown, Tabs, usePageMeta } from "frappe-ui";
|
||||
import {
|
||||
Breadcrumbs,
|
||||
Button,
|
||||
Dropdown,
|
||||
Tabs,
|
||||
dayjs,
|
||||
usePageMeta,
|
||||
} from "frappe-ui";
|
||||
import { computed, h, markRaw, onMounted, ref } from "vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import LucideMail from "~icons/lucide/mail";
|
||||
@@ -210,6 +218,13 @@ const contactInfo = computed(() => {
|
||||
value: contactInfoResource.data?.country,
|
||||
condition: !!contactInfoResource.data?.country,
|
||||
},
|
||||
{
|
||||
icon: markRaw(ModifiedIcon),
|
||||
value: __("Last seen {0}", [
|
||||
dayjs(contactInfoResource.data?.last_seen).fromNow(),
|
||||
]),
|
||||
condition: !!contactInfoResource.data?.last_seen,
|
||||
},
|
||||
{
|
||||
component: markRaw(
|
||||
h(ContactCustomers, {
|
||||
|
||||
@@ -166,15 +166,19 @@ def get_contact_info(name: str) -> dict:
|
||||
|
||||
result = {
|
||||
"customers": get_customers_with_image(name),
|
||||
"last_seen": None,
|
||||
}
|
||||
if not contact.user and (invite := get_invitation(name, primary_email)):
|
||||
result["invitation"] = invite
|
||||
|
||||
if contact.user:
|
||||
time_zone = frappe.db.get_value("User", contact.user, "time_zone")
|
||||
if time_zone:
|
||||
result["timezone"] = time_zone
|
||||
result["country"] = get_country_from_timezone(time_zone)
|
||||
user = frappe.db.get_value(
|
||||
"User", contact.user, ["time_zone", "last_active"], as_dict=True
|
||||
)
|
||||
result["last_seen"] = user.last_active
|
||||
if user.time_zone:
|
||||
result["timezone"] = user.time_zone
|
||||
result["country"] = get_country_from_timezone(user.time_zone)
|
||||
return result
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user