Skip to content

Commit

Permalink
chore: misc changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sumitbhanushali committed May 13, 2024
1 parent 0d83566 commit 4dbeb1f
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 23 deletions.
2 changes: 1 addition & 1 deletion desk/src/components/ticket/TicketAgentActivities.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
:key="activity.key"
class="activity"
>
<div class="flex gap-4 px-10">
<div class="flex gap-4 px-6">
<div
class="relative flex justify-center after:absolute after:left-[50%] after:top-0 after:-z-10 after:border-l after:border-gray-200"
:class="[i != activities.length - 1 ? 'after:h-full' : 'after:h-4']"
Expand Down
2 changes: 1 addition & 1 deletion desk/src/components/ticket/TicketAgentFields.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
v-if="o.type === 'select'"
class="form-control"
:type="o.type"
:placeholder="`Add ${o.label}`"
:value="ticket[o.field]"
:options="customers?.data"
@change="update(o.field, $event.target.value)"
Expand Down Expand Up @@ -91,6 +90,7 @@ const options = computed(() => {
field: "customer",
label: "Customer",
type: "select",
placeholder: "Select Customer",
},
];
});
Expand Down
12 changes: 12 additions & 0 deletions desk/src/components/ticket/TicketAgentSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@
<span class="cursor-copy text-lg font-semibold" @click="copyToClipboard()"
>#{{ ticket.name }}</span
>
<RouterLink
:to="{
name: 'TicketAgent',
}"
>
<Button
:variant="'subtle'"
theme="gray"
size="sm"
label="Go to old view"
/>
</RouterLink>
</div>
<TicketAgentCustomer
v-if="ticket.contact"
Expand Down
20 changes: 4 additions & 16 deletions desk/src/components/ticket/TicketsAgentList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
:columns="columns"
:rows="rows"
:options="{
getRowRoute: options.openInNewTab
? null
: (row) => ({
name: 'TicketAgent',
params: { ticketId: row.name },
}),
getRowRoute: (row) => ({
name: 'TicketAgent2',
params: { ticketId: row.name },
}),
selectable: options.selectable,
showTooltip: false,
}"
Expand All @@ -23,7 +21,6 @@
:key="row.name"
v-slot="{ column, item }"
:row="row"
@click="options.openInNewTab ? openInNewTab(row) : null"
>
<div
v-if="column.key === '_assign'"
Expand Down Expand Up @@ -163,7 +160,6 @@ const props = defineProps({
totalCount: 0,
rowCount: 0,
selectable: true,
openInNewTab: false,
}),
},
});
Expand All @@ -189,14 +185,6 @@ function handleFieldClick(e, name: string, value: string) {
}
}
function openInNewTab(row) {
const path = router.resolve({
name: "TicketAgent",
params: { ticketId: row.name },
});
window.open(path.href, "_blank");
}
//TODO: move all constants to relevant composables
const slaStatusColorMap = {
Fulfilled: "green",
Expand Down
6 changes: 2 additions & 4 deletions desk/src/pages/TicketAgent2.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@
</LayoutHeader>
<div v-if="ticket.data" class="flex h-screen overflow-hidden">
<div class="flex flex-1 flex-col">
<div
class="pr-7.5 flex items-center justify-between border-b py-1 pl-10"
>
<span class="text-lg font-semibold">Activity</span>
<div class="flex items-center justify-between border-b py-1 pr-2.5">
<span class="pl-6 text-lg font-semibold">Activity</span>
<Switch
v-model="showFullActivity"
size="sm"
Expand Down
8 changes: 7 additions & 1 deletion desk/src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,16 @@ const routes = [
},
{
path: "tickets/:ticketId",
name: AGENT_PORTAL_TICKET,
name: "TicketAgent2",
component: () => getPage("TicketAgent2"),
props: true,
},
{
path: "tickets/old/:ticketId",
name: AGENT_PORTAL_TICKET,
component: () => getPage("TicketAgent"),
props: true,
},
{
path: "kb",
name: AGENT_PORTAL_KNOWLEDGE_BASE,
Expand Down

0 comments on commit 4dbeb1f

Please sign in to comment.