mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
Merge branch 'move-to-vue' of https://github.com/frappe/accounting into move-to-vue
This commit is contained in:
commit
a5766b7516
@ -1,3 +1,3 @@
|
||||
module.exports = {
|
||||
'General Ledger': require('./GeneralLedger/viewConfig')
|
||||
'general-ledger': require('./GeneralLedger/viewConfig')
|
||||
}
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -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: {
|
||||
|
@ -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;
|
||||
|
@ -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'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user