diff --git a/desk/public/article-2.png b/desk/public/article-2.png new file mode 100644 index 000000000..e5421f4b7 Binary files /dev/null and b/desk/public/article-2.png differ diff --git a/desk/public/article.png b/desk/public/article.png new file mode 100644 index 000000000..a50a04e9b Binary files /dev/null and b/desk/public/article.png differ diff --git a/desk/src/components/ColumnSettings.vue b/desk/src/components/ColumnSettings.vue index 1410f70ca..dd857e542 100644 --- a/desk/src/components/ColumnSettings.vue +++ b/desk/src/components/ColumnSettings.vue @@ -154,6 +154,10 @@ let props = defineProps({ type: Boolean, default: false, }, + isCustomerPortal: { + type: Boolean, + default: false, + }, }); function resetToDefault(close) { diff --git a/desk/src/components/Filter.vue b/desk/src/components/Filter.vue index 8f24361fc..83fe3e65b 100644 --- a/desk/src/components/Filter.vue +++ b/desk/src/components/Filter.vue @@ -213,7 +213,7 @@ function setfilter(data) { function updateFilter( index: number, field = null, - value: string = null, + value: string = "", operator: string = null ) { let filter = JSON.parse(JSON.stringify(props.filters[index])); diff --git a/desk/src/components/Settings/EmailAdd.vue b/desk/src/components/Settings/EmailAdd.vue index 9f7d175e0..3d15e0e28 100644 --- a/desk/src/components/Settings/EmailAdd.vue +++ b/desk/src/components/Settings/EmailAdd.vue @@ -68,7 +68,7 @@ :name="field.name" :type="field.type" /> -

{{ field.description }}

+

{{ field.description }}

diff --git a/desk/src/components/Settings/EmailEdit.vue b/desk/src/components/Settings/EmailEdit.vue index 3898735de..3dc48e4c7 100644 --- a/desk/src/components/Settings/EmailEdit.vue +++ b/desk/src/components/Settings/EmailEdit.vue @@ -52,7 +52,7 @@ :name="field.name" :type="field.type" /> -

{{ field.description }}

+

{{ field.description }}

diff --git a/desk/src/components/SidebarLink.vue b/desk/src/components/SidebarLink.vue index 80df3f3da..0073c1440 100644 --- a/desk/src/components/SidebarLink.vue +++ b/desk/src/components/SidebarLink.vue @@ -5,8 +5,8 @@ 'w-full': isExpanded, 'w-8': !isExpanded, 'shadow-sm': isActive, - 'bg-white': isActive, - 'hover:bg-gray-100': !isActive, + [bgColor]: isActive, + [hvColor]: !isActive, }" @click="handle" > @@ -40,16 +40,20 @@ import { Icon } from "@iconify/vue"; interface P { icon: unknown; label: string; - isExpanded: boolean; + isExpanded?: boolean; isActive?: boolean; onClick?: () => void; to?: string; + bgColor?: string; + hvColor?: string; } const props = withDefaults(defineProps

(), { isActive: false, onClick: () => () => true, to: "", + bgColor: "bg-white", + hvColor: "hover:bg-gray-100", }); const router = useRouter(); diff --git a/desk/src/components/UserAvatar.vue b/desk/src/components/UserAvatar.vue index a37f3bf03..64b415a49 100644 --- a/desk/src/components/UserAvatar.vue +++ b/desk/src/components/UserAvatar.vue @@ -1,6 +1,11 @@ - +

- +
[ - { - label: "Tickets", - icon: LucideTicket, - to: AGENT_PORTAL_TICKET_LIST, - }, - { - label: "Agents", - icon: LucideUser, - to: AGENT_PORTAL_AGENT_LIST, - }, - { - label: "Knowledge base", - icon: LucideBookOpen, - to: "DeskKBHome", - }, - { - label: "Teams", - icon: LucideUsers, - to: AGENT_PORTAL_TEAM_LIST, - }, - { - label: "Canned responses", - icon: LucideCloudLightning, - to: "CannedResponses", - }, - { - label: "Customers", - icon: LucideUserCircle2, - to: AGENT_PORTAL_CUSTOMER_LIST, - }, +const menuOptions = computed(() => { + return isCustomerPortal + ? customerPortalSidebarOptions + : agentPortalSidebarOptions; +}); + +const customerPortalDropdown = computed(() => [ { - label: "Contacts", - icon: LucideContact2, - to: AGENT_PORTAL_CONTACT_LIST, + label: "Log out", + icon: "log-out", + onClick: () => authStore.logout(), }, ]); -function isActiveTab(to: string) { - return route.name === to; -} -const profileSettings = [ +const agentPortalDropdown = computed(() => [ { component: markRaw(Apps), }, @@ -173,14 +138,23 @@ const profileSettings = [ label: "Settings", icon: "settings", onClick: () => (showSettingsModal.value = true), - condition: () => authStore.isAdmin, }, { label: "Log out", icon: "log-out", onClick: () => authStore.logout(), }, -]; +]); + +const profileSettings = computed(() => { + return isCustomerPortal + ? customerPortalDropdown.value + : agentPortalDropdown.value; +}); + +function isActiveTab(to: string) { + return route.name === to; +} function openCommandPalette() { window.dispatchEvent( diff --git a/desk/src/components/layouts/layoutSettings.ts b/desk/src/components/layouts/layoutSettings.ts new file mode 100644 index 000000000..5a7b834d7 --- /dev/null +++ b/desk/src/components/layouts/layoutSettings.ts @@ -0,0 +1,65 @@ +import LucideBookOpen from "~icons/lucide/book-open"; +import LucideCloudLightning from "~icons/lucide/cloud-lightning"; +import LucideContact2 from "~icons/lucide/contact-2"; +import LucideTicket from "~icons/lucide/ticket"; +import LucideUser from "~icons/lucide/user"; +import LucideUserCircle2 from "~icons/lucide/user-circle-2"; +import LucideUsers from "~icons/lucide/users"; +import { + AGENT_PORTAL_AGENT_LIST, + AGENT_PORTAL_CONTACT_LIST, + AGENT_PORTAL_CUSTOMER_LIST, + AGENT_PORTAL_TEAM_LIST, + AGENT_PORTAL_TICKET_LIST, +} from "@/router"; + +export const agentPortalSidebarOptions = [ + { + label: "Tickets", + icon: LucideTicket, + to: AGENT_PORTAL_TICKET_LIST, + }, + { + label: "Agents", + icon: LucideUser, + to: AGENT_PORTAL_AGENT_LIST, + }, + { + label: "Knowledge base", + icon: LucideBookOpen, + to: "DeskKBHome", + }, + { + label: "Teams", + icon: LucideUsers, + to: AGENT_PORTAL_TEAM_LIST, + }, + { + label: "Canned responses", + icon: LucideCloudLightning, + to: "CannedResponses", + }, + { + label: "Customers", + icon: LucideUserCircle2, + to: AGENT_PORTAL_CUSTOMER_LIST, + }, + { + label: "Contacts", + icon: LucideContact2, + to: AGENT_PORTAL_CONTACT_LIST, + }, +]; + +export const customerPortalSidebarOptions = [ + { + label: "Tickets", + icon: LucideTicket, + to: "TicketsCustomer", + }, + { + label: "Knowledge base", + icon: LucideBookOpen, + to: "KnowledgeBasePublicNew", + }, +]; diff --git a/desk/src/components/ticket/TicketAgentContact.vue b/desk/src/components/ticket/TicketAgentContact.vue index 674b88a97..855d47d44 100644 --- a/desk/src/components/ticket/TicketAgentContact.vue +++ b/desk/src/components/ticket/TicketAgentContact.vue @@ -1,7 +1,7 @@ + + diff --git a/desk/src/components/ticket/TicketsAgentList.vue b/desk/src/components/ticket/TicketsListView.vue similarity index 95% rename from desk/src/components/ticket/TicketsAgentList.vue rename to desk/src/components/ticket/TicketsListView.vue index 0f6491b72..05e8f9614 100644 --- a/desk/src/components/ticket/TicketsAgentList.vue +++ b/desk/src/components/ticket/TicketsListView.vue @@ -6,7 +6,7 @@ :rows="rows" :options="{ getRowRoute: (row) => ({ - name: 'TicketAgent', + name: isCustomerPortal ? 'TicketCustomer' : 'TicketAgent', params: { ticketId: row.name }, }), selectable: options.selectable, @@ -71,6 +71,9 @@ {{ dayjs.tz(item).fromNow() }}
+
+ {{ item || "-" }} +