2
0
mirror of https://github.com/frappe/books.git synced 2024-12-23 03:19:01 +00:00

fix: Minor fixes

- Placeholder in Setup Wizard
- Import frappe-chart styles
- Destroy popper if it exists
- Placeholder for Date
This commit is contained in:
Faris Ansari 2019-12-12 23:10:34 +05:30
parent e8370aa8ab
commit 3a72dc6d0d
5 changed files with 17 additions and 8 deletions

View File

@ -55,6 +55,7 @@ module.exports = {
{
fieldname: 'fiscalYearStart',
label: 'Fiscal Year Start Date',
placeholder: 'Fiscal Year Start Date',
fieldtype: 'Date',
formula: doc => {
if (!doc.country) return;
@ -72,6 +73,7 @@ module.exports = {
{
fieldname: 'fiscalYearEnd',
label: 'Fiscal Year End Date',
placeholder: 'Fiscal Year End Date',
fieldtype: 'Date',
formula: doc => {
if (!doc.country) return;
@ -111,7 +113,7 @@ module.exports = {
'country',
'currency',
'fiscalYearStart',
'fiscalYearEnd',
'fiscalYearEnd'
],
layout: {

View File

@ -10,6 +10,7 @@
<script>
import './styles/index.css';
import 'frappe-charts/dist/frappe-charts.min.css';
import frappe from 'frappejs';
import Desk from './pages/Desk';
import SetupWizard from './pages/SetupWizard/SetupWizard';

View File

@ -6,7 +6,10 @@
{{ formatValue ? formatValue(value) : value }}
</span>
<span class="text-gray-600" v-else>
{{ placeholder }}
<template v-if="placeholder">
{{ placeholder }}
</template>
<span v-else v-html="'&nbsp;'"></span>
</span>
</div>
</template>
@ -42,6 +45,7 @@
<div
class="w-6 h-6 mr-1 last:mr-0 flex-center text-center"
v-for="d in ['S', 'M', 'T', 'W', 'T', 'F', 'S']"
:key="d"
>
{{ d }}
</div>
@ -74,14 +78,12 @@
<script>
import Popover from '../Popover';
import Row from '../Row';
export default {
name: 'DatePicker',
props: ['value', 'placeholder', 'readonly', 'formatValue'],
components: {
Popover,
Row
Popover
},
data() {
return {

View File

@ -47,7 +47,7 @@ export default {
});
},
beforeDestroy() {
this.popper.destroy();
this.popper && this.popper.destroy();
},
methods: {
setupPopper() {

View File

@ -2,13 +2,17 @@
<div class="py-10 flex-1 bg-white window-drag">
<div class="px-12">
<h1 class="text-2xl font-semibold">{{ _('Setup your organization') }}</h1>
<p class="text-gray-600">{{ _('These settings can be changed later') }}</p>
<p class="text-gray-600">
{{ _('These settings can be changed later') }}
</p>
</div>
<div class="px-8 mt-5">
<TwoColumnForm :fields="fields" :doc="doc" />
</div>
<div class="px-8 flex justify-end mt-5">
<Button @click="submit" type="primary" class="text-white text-sm">{{ _('Next') }}</Button>
<Button @click="submit" type="primary" class="text-white text-sm">
{{ _('Next') }}
</Button>
</div>
</div>
</template>