mirror of
https://github.com/frappe/books.git
synced 2024-12-23 03:19:01 +00:00
fix: test, run updatetemplates only if electron
- fix prop of null not found error
This commit is contained in:
parent
f6cc795184
commit
497d2bbd34
@ -115,8 +115,8 @@ const routes: RouteRecordRaw[] = [
|
||||
const router = createRouter({ routes, history: createWebHistory() });
|
||||
|
||||
router.afterEach(() => {
|
||||
historyState.forward = !!history.state.forward;
|
||||
historyState.back = !!history.state.back;
|
||||
historyState.forward = !!history.state?.forward;
|
||||
historyState.back = !!history.state?.back;
|
||||
});
|
||||
|
||||
export default router;
|
||||
|
@ -21,7 +21,6 @@ import {
|
||||
initializeInstance,
|
||||
setCurrencySymbols,
|
||||
} from 'src/utils/initialization';
|
||||
import { updatePrintTemplates } from 'src/utils/printTemplates';
|
||||
import { getRandomString } from 'utils';
|
||||
import { getDefaultLocations, getDefaultUOMs } from 'utils/defaults';
|
||||
import { getCountryCodeFromCountry, getCountryInfo } from 'utils/misc';
|
||||
@ -49,7 +48,11 @@ export default async function setupInstance(
|
||||
await createDefaultEntries(fyo);
|
||||
await createDefaultNumberSeries(fyo);
|
||||
await updateInventorySettings(fyo);
|
||||
|
||||
if (fyo.isElectron) {
|
||||
const { updatePrintTemplates } = await import('src/utils/printTemplates');
|
||||
await updatePrintTemplates(fyo);
|
||||
}
|
||||
|
||||
await completeSetup(companyName, fyo);
|
||||
if (!Object.keys(fyo.currencySymbols).length) {
|
||||
|
@ -59,6 +59,7 @@ input[type='number']::-webkit-inner-spin-button {
|
||||
}
|
||||
|
||||
:root {
|
||||
--w-form: 600px;
|
||||
--w-app: 1200px;
|
||||
--w-sidebar: 12rem;
|
||||
--w-desk: calc(100vw - var(--w-sidebar));
|
||||
@ -87,7 +88,7 @@ input[type='number']::-webkit-inner-spin-button {
|
||||
}
|
||||
|
||||
.w-form {
|
||||
width: 600px;
|
||||
width: var(--w-form);
|
||||
}
|
||||
|
||||
.w-dialog {
|
||||
|
@ -4,6 +4,6 @@ export const showSidebar = ref(true);
|
||||
export const docsPathRef = ref<string>('');
|
||||
export const systemLanguageRef = ref<string>('');
|
||||
export const historyState = reactive({
|
||||
forward: !!history.state.forward,
|
||||
back: !!history.state.back,
|
||||
forward: !!history.state?.forward,
|
||||
back: !!history.state?.back,
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user