Skip to content

feat: Allow disabling article search on customer portal #2290

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion desk/src/pages/ticket/TicketNew.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
/>
</div>
<SearchArticles
v-if="isCustomerPortal"
v-if="isCustomerPortal && !hideSuggestedArticles"
:query="subject"
class="shadow"
/>
Expand Down Expand Up @@ -135,6 +135,7 @@ import { LayoutHeader, UniInput } from "@/components";
import SearchArticles from "../../components/SearchArticles.vue";
import TicketTextEditor from "./TicketTextEditor.vue";
import { useAuthStore } from "@/stores/auth";
import { useConfigStore } from "@/stores/config";
import { capture } from "@/telemetry";
import { isCustomerPortal } from "@/utils";
import { Field } from "@/types";
Expand All @@ -150,6 +151,7 @@ const props = withDefaults(defineProps<P>(), {
const route = useRoute();
const router = useRouter();
const { $dialog } = globalStore();
const { hideSuggestedArticles } = useConfigStore();

const subject = ref("");
const description = ref("");
Expand Down
4 changes: 4 additions & 0 deletions desk/src/stores/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ export const useConfigStore = defineStore("config", () => {
const isFeedbackMandatory = computed(
() => !!parseInt(config.value.is_feedback_mandatory)
);
const hideSuggestedArticles = computed(
() => !!parseInt(config.value.hide_suggested_articles)
);

socket.on("helpdesk:settings-updated", () => configRes.reload());

Expand All @@ -29,5 +32,6 @@ export const useConfigStore = defineStore("config", () => {
preferKnowledgeBase,
skipEmailWorkflow,
isFeedbackMandatory,
hideSuggestedArticles,
};
});
1 change: 1 addition & 0 deletions helpdesk/api/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ def get_config():
"setup_complete",
"skip_email_workflow",
"is_feedback_mandatory",
"hide_suggested_articles",
]
res = frappe.get_value(doctype="HD Settings", fieldname=fields, as_dict=True)
return res
9 changes: 8 additions & 1 deletion helpdesk/helpdesk/doctype/hd_settings/hd_settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"base_support_rotation",
"knowledge_base_section",
"prefer_knowledge_base",
"hide_suggested_articles",
"ticket_tab",
"ticket_type_section",
"default_ticket_type",
Expand Down Expand Up @@ -281,12 +282,18 @@
"fieldtype": "Int",
"label": "Auto-close after (Days)",
"mandatory_depends_on": "auto_close_tickets"
},
{
"default": "0",
"fieldname": "hide_suggested_articles",
"fieldtype": "Check",
"label": "Hide suggested articles on ticket form"
}
],
"grid_page_length": 50,
"issingle": 1,
"links": [],
"modified": "2025-04-23 20:17:23.058689",
"modified": "2025-05-05 13:28:08.085962",
"modified_by": "Administrator",
"module": "Helpdesk",
"name": "HD Settings",
Expand Down