Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(release): dev to main #2016

Merged
merged 58 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
7ada896
feat: new customer portal
RitvikSardana Sep 27, 2024
6d9aa07
fix: show sidebar options according to the route
RitvikSardana Sep 27, 2024
9fa4298
fix: customer portal sidebar options in mobile view
RitvikSardana Sep 27, 2024
54266a7
feat(listview): add new customer portal ticket list view
RitvikSardana Sep 29, 2024
ae6a26b
fix: add customer portal options in API
RitvikSardana Sep 29, 2024
3335bb2
fix: show columns according to the customer and agent view
RitvikSardana Sep 29, 2024
29716e5
fix: preset filters for customer portal
RitvikSardana Sep 29, 2024
28ec12b
chore: change file names
RitvikSardana Sep 29, 2024
d8f602a
fix: add column button only for agent portal
RitvikSardana Sep 30, 2024
8ce04c8
fix(type): update ticket type
RitvikSardana Sep 30, 2024
8db8f34
fix(style): ticket agent sidebar
RitvikSardana Sep 30, 2024
005d95f
fix: handle case for duplicate fields
RitvikSardana Sep 30, 2024
3bad0f3
fix(customer_ticket): add sidebar in single ticket view of customer p…
RitvikSardana Sep 30, 2024
5564116
fix(customerPortal): email editor open from sidebar
RitvikSardana Sep 30, 2024
06f5045
fix(timeline): single ticket view
RitvikSardana Sep 30, 2024
66b9aeb
chore: code cleanup
RitvikSardana Sep 30, 2024
14c1c37
fix(styling): customer portal
RitvikSardana Sep 30, 2024
3c5b83c
fix(routing): dynamic routing for customer portal
RitvikSardana Sep 30, 2024
c847199
feat: New Knowledge Base for Customer Portal
RitvikSardana Sep 30, 2024
1d50d86
fix: send article data in tree format to frontend
RitvikSardana Oct 1, 2024
1b586ac
fix(filter): null error
RitvikSardana Oct 1, 2024
5f81500
fix(kb-cPortal): sidebar and category rendering
RitvikSardana Oct 1, 2024
f88fa11
fix(ticket-cPortal): styling of email area
RitvikSardana Oct 1, 2024
c4e638a
fix(kb-api): bring children in the api for tree view
RitvikSardana Oct 1, 2024
2f10bf7
chore: code cleanup
RitvikSardana Oct 1, 2024
a335747
chore: code cleanup
RitvikSardana Oct 1, 2024
58bb522
fix(article): article list view and search
RitvikSardana Oct 1, 2024
215bcad
fix(routing): handle routing in kb public
RitvikSardana Oct 1, 2024
8b3a1c4
fix(styling): improve styles for scroll and ellipsis
RitvikSardana Oct 2, 2024
b6dff21
fix: add routing for article page in customer portal
RitvikSardana Oct 2, 2024
219d8f2
fix: article page for customer portal
RitvikSardana Oct 2, 2024
b0da8a2
fix(image): new default image for article
RitvikSardana Oct 2, 2024
db35aa4
fix(search): articles customer portal
RitvikSardana Oct 2, 2024
30f7e34
fix(search): article search in new ticket
RitvikSardana Oct 2, 2024
72dbdea
fix: update routing of new knowledge base
RitvikSardana Oct 2, 2024
7d81285
Merge pull request #2003 from RitvikSardana/new-customer-portal
RitvikSardana Oct 2, 2024
d7df084
fix(styling): search related articles
RitvikSardana Oct 2, 2024
f4a69ea
Merge pull request #2007 from RitvikSardana/customer-portal-style
RitvikSardana Oct 2, 2024
6c415e3
fix: show canned responses from list view resource
RitvikSardana Oct 2, 2024
d2e1614
fix: show custom fields to agent
RitvikSardana Oct 2, 2024
12a435c
fix(style): article search
RitvikSardana Oct 2, 2024
6e6171d
Merge pull request #2008 from RitvikSardana/canned-response-list-fix
RitvikSardana Oct 2, 2024
73b7936
fix(styling): styling in article and email
RitvikSardana Oct 3, 2024
6cdea66
Merge pull request #2009 from RitvikSardana/styling-article-email
RitvikSardana Oct 3, 2024
c1c8ce5
perf: update ticket elapsed time method to use minutes instead of sec…
RitvikSardana Oct 8, 2024
7bf22ef
Merge pull request #2011 from RitvikSardana/tick-closing-perf
RitvikSardana Oct 10, 2024
b81892e
fix(HelpdeskSearch): Always try to return 5 search results
balamurali27 Oct 14, 2024
1227646
fix(HelpdeskSearch): Consider empty res from hd_search
balamurali27 Oct 14, 2024
4c74e83
fix(HelpdeskSearch): Remove duplicates from results
balamurali27 Oct 14, 2024
650608a
fix: update the fields shown in new customer portal
RitvikSardana Oct 14, 2024
88460d1
fix: show custom fields from ticket template
RitvikSardana Oct 14, 2024
df7d76a
chore(linters): format doc.py file
RitvikSardana Oct 14, 2024
b531bf9
Merge pull request #2013 from RitvikSardana/customer-portal-fields
RitvikSardana Oct 14, 2024
ed74fd3
Merge pull request #2012 from frappe/enough-search-results
RitvikSardana Oct 14, 2024
0095713
fix(styles): new customer portal knowledge base
RitvikSardana Oct 15, 2024
bcee948
fix(styles): alignment in new ticket page
RitvikSardana Oct 15, 2024
4dac6b5
Merge pull request #2014 from RitvikSardana/kb-new-styles
RitvikSardana Oct 15, 2024
81adc58
chore: version bump
RitvikSardana Oct 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added desk/public/article-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added desk/public/article.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions desk/src/components/ColumnSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ let props = defineProps({
type: Boolean,
default: false,
},
isCustomerPortal: {
type: Boolean,
default: false,
},
});

function resetToDefault(close) {
Expand Down
2 changes: 1 addition & 1 deletion desk/src/components/Filter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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]));
Expand Down
2 changes: 1 addition & 1 deletion desk/src/components/Settings/EmailAdd.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
:name="field.name"
:type="field.type"
/>
<p class="text-xs text-gray-500">{{ field.description }}</p>
<p class="text-gray-500 text-p-sm">{{ field.description }}</p>
</div>
</div>
<ErrorMessage v-if="error" class="ml-1" :message="error" />
Expand Down
2 changes: 1 addition & 1 deletion desk/src/components/Settings/EmailEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
:name="field.name"
:type="field.type"
/>
<p class="text-xs text-gray-500">{{ field.description }}</p>
<p class="text-p-sm text-gray-500">{{ field.description }}</p>
</div>
</div>
<ErrorMessage v-if="error" class="ml-1" :message="error" />
Expand Down
10 changes: 7 additions & 3 deletions desk/src/components/SidebarLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
>
Expand Down Expand Up @@ -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<P>(), {
isActive: false,
onClick: () => () => true,
to: "",
bgColor: "bg-white",
hvColor: "hover:bg-gray-100",
});
const router = useRouter();

Expand Down
11 changes: 10 additions & 1 deletion desk/src/components/UserAvatar.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<template>
<div class="flex items-center gap-2">
<Avatar :label="user.name" :image="user.user_image" v-bind="$attrs" />
<Avatar
:label="user.name"
:image="user.user_image"
v-bind="$attrs"
v-if="!hideAvatar"
/>
<span
v-if="expand"
class="truncate"
Expand Down Expand Up @@ -31,6 +36,10 @@ const props = defineProps({
type: Boolean,
default: false,
},
hideAvatar: {
type: Boolean,
default: false,
},
});
const user = userStore.getUser(props.name);
</script>
183 changes: 101 additions & 82 deletions desk/src/components/ViewControls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
<ColumnSettings
:fields="column.fields"
:columns="column.columns"
:is-customer-portal="isCustomerPortal"
@event:column="(e) => emitToParent(e, 'event:column')"
/>
</div>
Expand Down Expand Up @@ -114,82 +115,92 @@ const props = defineProps({
type: Object,
required: true,
},
isCustomerPortal: {
type: Boolean,
default: false,
},
});

const { isMobileView } = useScreenSize();

const quickFilterList = computed(() => {
let filters = [{ name: "name", label: "ID", fieldtype: "Data" }];

return filters;
});

const presetFilters = [
{
label: "All Tickets",
onClick: (e) => {
setTitle("Helpdesk");
emitToParent(
{
event: "clear",
},
"event:filter"
);
const presetFilters = computed(() => {
const _presetFilters = [
{
label: "All Tickets",
onClick: (e) => {
setTitle("Helpdesk");
emitToParent(
{
event: "clear",
},
"event:filter"
);
},
},
},
{
label: "My Open Tickets",
onClick: (e) => {
const preset = getPresetFilters("Open");
emitToParent(
{
event: "preset",
data: preset,
},
"event:filter"
);
{
label: "My Open Tickets",
onClick: (e) => {
const preset = getPresetFilters("Open");
emitToParent(
{
event: "preset",
data: preset,
},
"event:filter"
);
},
},
},
{
label: "My Replied Tickets",
onClick: (e) => {
const preset = getPresetFilters("Replied");
emitToParent(
{
event: "preset",
data: preset,
},
"event:filter"
);
{
label: "My Closed Tickets",
onClick: (e) => {
const preset = getPresetFilters("Closed");
emitToParent(
{
event: "preset",
data: preset,
},
"event:filter"
);
},
},
},
{
label: "My Resolved Tickets",
onClick: (e) => {
const preset = getPresetFilters("Resolved");
emitToParent(
{
event: "preset",
data: preset,
];
if (!props.isCustomerPortal) {
_presetFilters.push(
{
label: "My Replied Tickets",
onClick: (e) => {
const preset = getPresetFilters("Replied");
emitToParent(
{
event: "preset",
data: preset,
},
"event:filter"
);
},
"event:filter"
);
},
},
{
label: "My Closed Tickets",
onClick: (e) => {
const preset = getPresetFilters("Closed");
emitToParent(
{
event: "preset",
data: preset,
},
{
label: "My Resolved Tickets",
onClick: (e) => {
const preset = getPresetFilters("Resolved");
emitToParent(
{
event: "preset",
data: preset,
},
"event:filter"
);
},
"event:filter"
);
},
},
];
}
);
}
return _presetFilters;
});

function setTitle(title: string) {
document.title = title;
Expand All @@ -198,27 +209,35 @@ function setTitle(title: string) {
function getPresetFilters(status: string) {
setTitle(`My ${status} Tickets`);
document.title = `My ${status} Tickets`;
return {
filters: [
{
field: props.filter.filterableFields.find(
(f) => f.fieldname === "status"
),
operator: "is",
value: status,
},
{
field: props.filter.filterableFields.find(
(f) => f.fieldname === "_assign"
),
operator: "is",
value: authStore.userId,
},
],
filtersToApply: {
status: ["=", status],
_assign: ["LIKE", `%${authStore.userId}%`],

const filtersToApply = {
status: ["=", status],
};

const filters = [
{
field: props.filter.filterableFields.find(
(f) => f.fieldname === "status"
),
operator: "is",
value: status,
},
];

if (!props.isCustomerPortal) {
filtersToApply["_assign"] = ["LIKE", `%${authStore.userId}%`];
filters.push({
field: props.filter.filterableFields.find(
(f) => f.fieldname === "_assign"
),
operator: "is",
value: authStore.userId,
});
}

return {
filters,
filtersToApply,
};
}

Expand Down
81 changes: 81 additions & 0 deletions desk/src/components/knowledge-base-v2/ArticleCard.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<template>
<div
class="flex justify-between items-center cursor-pointer w-full"
@click="handleArticleClick"
>
<!-- Left Side -->
<div class="flex p-2 gap-3 flex-1 max-w-[50%]">
<Avatar label="JD" shape="square" size="2xl" :image="articleImg" />
<div class="flex flex-col gap-1.5 w-full">
<h5 class="text-lg font-semibold text-gray-800">
{{ article.title }}
</h5>
<div class="text-sm text-gray-600 truncate max-w-[70%]">
{{ articleSubTitle }}
</div>
</div>
</div>

<!-- Right Side -->
<div class="flex flex-1 justify-between p-2 items-center gap-10">
<div class="flex gap-2 items-center">
<Avatar :label="author.name" :image="author.image" />
<span class="text-sm text-gray-600 flex-1 truncate">{{
author.name
}}</span>
</div>
<!-- <span class="text-sm text-gray-600">{{ "24, Aug 2024" }}</span> -->
<span class="text-sm text-gray-600">{{
dayjs.tz(article.published_on).format("DD, MMM YYYY")
}}</span>
</div>
</div>
</template>

<script setup lang="ts">
import { computed } from "vue";
import { Avatar } from "frappe-ui";
import { dayjs } from "@/dayjs";
import { Article, Author } from "@/types";
import { useRouter } from "vue-router";

const props = defineProps<{
article: Article;
author: Author;
}>();

const router = useRouter();
const articleSubTitle = computed(
() =>
props.article.subtitle ||
"This article helps you understand the topic effectively."
);

const articleImg = computed(
() => props.article.article_image || "/assets/helpdesk/desk/article-2.png"
);

function handleArticleClick() {
const routerCategory = router.currentRoute.value.query.category as string;
const category = routerCategory || props.article.category;
const subCategory = !routerCategory ? props.article.category : "";
const articleId = props.article.name;

const articleData = {
category,
subCategory,
articleId,
};

router.push({
name: "KBArticlePublicNew",
params: articleData,
query: {
category,
subCategory,
},
});
}
</script>

<style scoped></style>
Loading
Loading