mirror of
https://github.com/frappe/books.git
synced 2024-12-23 11:29:03 +00:00
feat(dev): fill button in Setup Wiz when dev mode
This commit is contained in:
parent
cc84c51825
commit
5e458bc033
@ -56,6 +56,12 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<TwoColumnForm :doc="doc" :read-only="loading" />
|
<TwoColumnForm :doc="doc" :read-only="loading" />
|
||||||
|
<Button
|
||||||
|
v-if="fyo.store.isDevelopment"
|
||||||
|
class="m-4 text-sm min-w-28"
|
||||||
|
@click="fill"
|
||||||
|
>Fill</Button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #secondaryButton>{{ t`Cancel` }}</template>
|
<template #secondaryButton>{{ t`Cancel` }}</template>
|
||||||
@ -67,6 +73,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import Button from 'src/components/Button.vue';
|
||||||
import FormControl from 'src/components/Controls/FormControl.vue';
|
import FormControl from 'src/components/Controls/FormControl.vue';
|
||||||
import TwoColumnForm from 'src/components/TwoColumnForm.vue';
|
import TwoColumnForm from 'src/components/TwoColumnForm.vue';
|
||||||
import { getErrorMessage } from 'src/utils';
|
import { getErrorMessage } from 'src/utils';
|
||||||
@ -95,6 +102,7 @@ export default {
|
|||||||
TwoColumnForm,
|
TwoColumnForm,
|
||||||
FormControl,
|
FormControl,
|
||||||
Slide,
|
Slide,
|
||||||
|
Button,
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
this.doc = await getSetupWizardDoc();
|
this.doc = await getSetupWizardDoc();
|
||||||
@ -103,6 +111,13 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async fill() {
|
||||||
|
await this.doc.set('companyName', "Lin's Things");
|
||||||
|
await this.doc.set('email', 'lin@lthings.com');
|
||||||
|
await this.doc.set('fullname', 'Lin Slovenly');
|
||||||
|
await this.doc.set('bankName', 'Max Finance');
|
||||||
|
await this.doc.set('country', 'India');
|
||||||
|
},
|
||||||
getField(fieldname) {
|
getField(fieldname) {
|
||||||
return this.doc.schema?.fields.find((f) => f.fieldname === fieldname);
|
return this.doc.schema?.fields.find((f) => f.fieldname === fieldname);
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user