mirror of
https://github.com/frappe/books.git
synced 2025-01-03 07:12:21 +00:00
fix: GetStarted settings routing
This commit is contained in:
parent
0f2f923bd2
commit
4b1b1d9733
@ -19,8 +19,8 @@
|
||||
"fieldtype": "Check"
|
||||
},
|
||||
{
|
||||
"fieldname": "invoiceSetup",
|
||||
"label": "Invoice Setup",
|
||||
"fieldname": "printSetup",
|
||||
"label": "Print Setup",
|
||||
"fieldtype": "Check"
|
||||
},
|
||||
{
|
||||
|
@ -116,8 +116,8 @@ export default {
|
||||
}
|
||||
|
||||
switch (key) {
|
||||
case 'Invoice':
|
||||
await this.updateChecks({ invoiceSetup: true });
|
||||
case 'Print':
|
||||
await this.updateChecks({ printSetup: true });
|
||||
break;
|
||||
case 'General':
|
||||
await this.updateChecks({ companySetup: true });
|
||||
|
@ -83,7 +83,7 @@ import { docsPathMap } from 'src/utils/misc';
|
||||
import { docsPathRef } from 'src/utils/refs';
|
||||
import { UIGroupedFields } from 'src/utils/types';
|
||||
import { showToast } from 'src/utils/ui';
|
||||
import { computed, defineComponent, nextTick } from 'vue';
|
||||
import { computed, defineComponent } from 'vue';
|
||||
import CommonFormSection from '../CommonForm/CommonFormSection.vue';
|
||||
|
||||
export default defineComponent({
|
||||
@ -113,6 +113,11 @@ export default defineComponent({
|
||||
this.update();
|
||||
},
|
||||
activated(): void {
|
||||
const tab = this.$route.query.tab;
|
||||
if (typeof tab === 'string' && this.tabLabels[tab]) {
|
||||
this.activeTab = tab;
|
||||
}
|
||||
|
||||
docsPathRef.value = docsPathMap.Settings ?? '';
|
||||
},
|
||||
async deactivated(): Promise<void> {
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { t } from 'fyo';
|
||||
import { ModelNameEnum } from 'models/types';
|
||||
import { openSettings, routeTo } from './ui';
|
||||
|
||||
export function getGetStartedConfig() {
|
||||
@ -7,16 +8,6 @@ export function getGetStartedConfig() {
|
||||
label: t`Organisation`,
|
||||
|
||||
items: [
|
||||
{
|
||||
key: 'Invoice',
|
||||
label: t`Invoice`,
|
||||
icon: 'invoice',
|
||||
description: t`Customize your invoices by adding a logo and address details`,
|
||||
fieldname: 'invoiceSetup',
|
||||
action() {
|
||||
openSettings('Invoice');
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'General',
|
||||
label: t`General`,
|
||||
@ -24,7 +15,17 @@ export function getGetStartedConfig() {
|
||||
description: t`Set up your company information, email, country and fiscal year`,
|
||||
fieldname: 'companySetup',
|
||||
action() {
|
||||
openSettings('General');
|
||||
openSettings(ModelNameEnum.AccountingSettings);
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'Print',
|
||||
label: t`Print`,
|
||||
icon: 'invoice',
|
||||
description: t`Customize your invoices by adding a logo and address details`,
|
||||
fieldname: 'printSetup',
|
||||
action() {
|
||||
openSettings(ModelNameEnum.PrintSettings);
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -34,7 +35,7 @@ export function getGetStartedConfig() {
|
||||
description: t`Setup system defaults like date format and display precision`,
|
||||
fieldname: 'systemSetup',
|
||||
action() {
|
||||
openSettings('System');
|
||||
openSettings(ModelNameEnum.SystemSettings);
|
||||
},
|
||||
},
|
||||
],
|
||||
|
@ -1,5 +1,6 @@
|
||||
import type { Doc } from 'fyo/model/doc';
|
||||
import type { Action } from 'fyo/model/types';
|
||||
import { ModelNameEnum } from 'models/types';
|
||||
import type { Field, FieldType } from 'schemas/types';
|
||||
import type { QueryFilter } from 'utils/db/types';
|
||||
|
||||
@ -23,7 +24,11 @@ export interface ToastOptions {
|
||||
}
|
||||
|
||||
export type WindowAction = 'close' | 'minimize' | 'maximize' | 'unmaximize';
|
||||
export type SettingsTab = 'Invoice' | 'General' | 'System';
|
||||
export type SettingsTab =
|
||||
| ModelNameEnum.AccountingSettings
|
||||
| ModelNameEnum.Defaults
|
||||
| ModelNameEnum.PrintSettings
|
||||
| ModelNameEnum.SystemSettings;
|
||||
|
||||
export interface QuickEditOptions {
|
||||
doc?: Doc;
|
||||
|
Loading…
Reference in New Issue
Block a user