2
0
mirror of https://github.com/frappe/books.git synced 2025-02-03 04:28:32 +00:00

Merge pull request #1070 from frappe/fix-startup-warning

fix: startup error : systemSettings is not single schema
This commit is contained in:
Akshay 2024-12-24 23:39:01 +05:30 committed by GitHub
commit 0227ebe640
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View File

@ -16,6 +16,7 @@ export default class SystemSettings extends Doc {
currency?: string; currency?: string;
version?: string; version?: string;
instanceId?: string; instanceId?: string;
darkMode?: boolean;
validations: ValidationMap = { validations: ValidationMap = {
displayPrecision(value: DocValue) { displayPrecision(value: DocValue) {

View File

@ -135,9 +135,9 @@ export default defineComponent({
}, },
async mounted() { async mounted() {
await this.setInitialScreen(); await this.setInitialScreen();
const { darkMode } = await fyo.doc.getDoc('SystemSettings'); const darkMode = !!fyo.singles.SystemSettings?.darkMode;
setDarkMode(!!darkMode); setDarkMode(darkMode);
this.darkMode = !!darkMode; this.darkMode = darkMode;
}, },
methods: { methods: {
async setInitialScreen(): Promise<void> { async setInitialScreen(): Promise<void> {