Skip to content
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/stores/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ import { computed, ComputedRef } from "vue";
export const useConfigStore = defineStore("config", () => {
const configRes = createResource({
url: "helpdesk.api.config.get_config",
auto: true,
auto: !window.hasOwnProperty("hd_config"),
});

window.hd_config && configRes.setData(window.hd_config);

const config = computed(() => configRes.data || {});
const brandLogo = computed(() => config.value.brand_logo);
const teamRestrictionApplied = computed(
Expand Down
1 change: 1 addition & 0 deletions desk/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -524,5 +524,6 @@ declare global {
date_format: string;
time_format: string;
session_user: string;
hd_config?: object;
}
}
3 changes: 3 additions & 0 deletions helpdesk/www/helpdesk/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
from frappe.utils import cint
from frappe.utils.telemetry import capture

from helpdesk.api.config import get_config

no_cache = 1


Expand Down Expand Up @@ -37,6 +39,7 @@ def get_boot():
"session_user": frappe.session.user,
"date_format": frappe.get_system_settings("date_format"),
"time_format": frappe.get_system_settings("time_format"),
"hd_config": get_config(),
}
)

Expand Down