mirror of
https://github.com/frappe/books.git
synced 2025-01-08 01:14:39 +00:00
fix: startup error : systemSettings is not single schema
This commit is contained in:
parent
ada4952107
commit
d5e38d6843
@ -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) {
|
||||||
|
@ -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> {
|
||||||
|
Loading…
Reference in New Issue
Block a user