mirror of
https://github.com/frappe/books.git
synced 2024-11-08 14:50:56 +00:00
incr: add feature flag for custom fields
- also add page and sidebar item
This commit is contained in:
parent
544b8a14b1
commit
202612b57a
@ -15,6 +15,7 @@ export class AccountingSettings extends Doc {
|
||||
enableDiscounting?: boolean;
|
||||
enableInventory?: boolean;
|
||||
enablePriceList?: boolean;
|
||||
enableFormCustomization?: boolean;
|
||||
|
||||
static filters: FiltersMap = {
|
||||
writeOffAccount: () => ({
|
||||
|
@ -86,6 +86,13 @@
|
||||
"default": false,
|
||||
"section": "Features"
|
||||
},
|
||||
{
|
||||
"fieldname": "enableFormCustomization",
|
||||
"label": "Enable Form Customization",
|
||||
"fieldtype": "Check",
|
||||
"default": false,
|
||||
"section": "Features"
|
||||
},
|
||||
{
|
||||
"fieldname": "fiscalYearStart",
|
||||
"label": "Fiscal Year Start Date",
|
||||
|
21
src/pages/CustomizeForm/CustomizeForm.vue
Normal file
21
src/pages/CustomizeForm/CustomizeForm.vue
Normal file
@ -0,0 +1,21 @@
|
||||
<template>
|
||||
<div>
|
||||
<PageHeader :title="t`Customize Form`">
|
||||
<DropdownWithActions :actions="[]" :disabled="false" :title="t`More`" />
|
||||
<Button :title="t`Save Customizations`" type="primary">
|
||||
{{ t`Save` }}
|
||||
</Button>
|
||||
</PageHeader>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
|
||||
import DropdownWithActions from 'src/components/DropdownWithActions.vue';
|
||||
import Button from 'src/components/Button.vue';
|
||||
import PageHeader from 'src/components/PageHeader.vue';
|
||||
|
||||
export default defineComponent({
|
||||
components: { PageHeader, Button, DropdownWithActions },
|
||||
});
|
||||
</script>
|
@ -10,6 +10,7 @@ import QuickEditForm from 'src/pages/QuickEditForm.vue';
|
||||
import Report from 'src/pages/Report.vue';
|
||||
import Settings from 'src/pages/Settings/Settings.vue';
|
||||
import TemplateBuilder from 'src/pages/TemplateBuilder/TemplateBuilder.vue';
|
||||
import CustomizeForm from 'src/pages/CustomizeForm/CustomizeForm.vue';
|
||||
import type { HistoryState } from 'vue-router';
|
||||
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router';
|
||||
import { historyState } from './utils/refs';
|
||||
@ -106,6 +107,11 @@ const routes: RouteRecordRaw[] = [
|
||||
component: TemplateBuilder,
|
||||
props: true,
|
||||
},
|
||||
{
|
||||
path: '/customize-form',
|
||||
name: 'Customize Form',
|
||||
component: CustomizeForm,
|
||||
},
|
||||
{
|
||||
path: '/settings',
|
||||
name: 'Settings',
|
||||
|
@ -284,6 +284,13 @@ function getCompleteSidebar(): SidebarConfig {
|
||||
name: 'print-template',
|
||||
route: `/list/PrintTemplate/${t`Print Templates`}`,
|
||||
},
|
||||
{
|
||||
label: t`Customize Form`,
|
||||
name: 'customize-form',
|
||||
route: `/customize-form`,
|
||||
hidden: () =>
|
||||
!fyo.singles.AccountingSettings?.enableFormCustomization,
|
||||
},
|
||||
{
|
||||
label: t`Settings`,
|
||||
name: 'settings',
|
||||
|
Loading…
Reference in New Issue
Block a user