2
0
mirror of https://github.com/frappe/books.git synced 2024-09-20 03:29:00 +00:00

Merge branch 'move-to-vue' of https://github.com/frappe/accounting into move-to-vue

This commit is contained in:
Suraj Shetty 2018-06-25 14:04:48 +05:30
commit a5766b7516
6 changed files with 22 additions and 24 deletions

View File

@ -1,3 +1,3 @@
module.exports = {
'General Ledger': require('./GeneralLedger/viewConfig')
'general-ledger': require('./GeneralLedger/viewConfig')
}

View File

@ -4,7 +4,7 @@
<router-view />
</frappe-desk>
<router-view v-else name="setup" />
<frappe-modal ref="modal" :show="showModal" v-bind="modalOptions" />
<frappe-modal ref="modal" :show="showModal" v-bind="modalOptions" @close-modal="showModal = false"/>
</div>
</template>

View File

@ -15,12 +15,12 @@
</div>
<div class="modal-footer">
<component :is="footerComponent" v-bind="footerProps"/>
<button type="button" class="btn btn-secondary" @click="closeModal">Close</button>
<f-button secondary @click="closeModal">Close</f-button>
</div>
</div>
</div>
</div>
<div class="modal-backdrop show" v-show="show"></div>
<div class="modal-backdrop show" v-show="show" @click="closeModal"></div>
</div>
</template>
<script>
@ -57,7 +57,7 @@ export default {
},
methods: {
closeModal() {
this.$modal.hide();
this.$emit('close-modal');
}
}
};

View File

@ -1,7 +1,7 @@
<template>
<div>
<div class="p-4">
<h4 class="pb-2">{{ reportName }}</h4>
<h4 class="pb-2">{{ reportConfig.title }}</h4>
<report-filters v-if="reportConfig.filterFields.length" :filters="reportConfig.filterFields" @change="getReportData"></report-filters>
<div class="pt-2" ref="datatable" v-once></div>
</div>
@ -14,18 +14,16 @@ import frappe from 'frappejs'
import FrappeControl from './controls/FrappeControl'
import ReportFilters from './ReportFilters'
import utils from 'frappejs/client/ui/utils'
import getReportViewConfig from '../../reports/view'
import reportViewConfig from '../../reports/view'
export default {
props: ['reportName'],
data() {
return {
'reportConfig': getReportViewConfig[this.reportName]
}
},
computed: {
reportColumns() {
return utils.convertFieldsToDatatableColumns(this.reportConfig.getColumns())
},
reportConfig() {
return reportViewConfig[this.reportName]
}
},
methods: {

View File

@ -34,8 +34,6 @@ export default {
isActive(item) {
if (this.$route.params.doctype) {
return this.$route.params.doctype === item.label;
} else if(this.$route.params.reportName) {
return this.$route.params.reportName === item.label;
}
const route = item.route.slice(1);
return this.$route.path === route;

View File

@ -1,39 +1,41 @@
const { _ } = require('frappejs/utils');
export default [
{
items: [
{
label: 'ToDo', route: '#/list/ToDo'
label: _('ToDo'), route: '#/list/ToDo'
},
{
label: 'Event', route: '#/list/Event'
label: _('Event'), route: '#/list/Event'
}
]
},
{
title: 'Masters',
title: _('Masters'),
items: [
{
label: 'Item', route: '#/list/Item'
label: _('Item'), route: '#/list/Item'
},
{
label: 'Party', route: '#/list/Party'
label: _('Party'), route: '#/list/Party'
},
{
label: 'Invoice', route: '#/list/Invoice'
label: _('Invoice'), route: '#/list/Invoice'
},
{
label: 'Tax', route: '#/list/Tax'
label: _('Tax'), route: '#/list/Tax'
},
{
label: 'Account', route: '#/list/Account'
label: _('Account'), route: '#/list/Account'
}
]
},
{
title: 'Reports',
title: _('Reports'),
items: [
{
label: 'General Ledger', route: '#/report/General Ledger'
label: _('General Ledger'), route: '#/report/general-ledger'
}
]
}