2
0
mirror of https://github.com/frappe/books.git synced 2025-02-02 20:18:26 +00:00

Displaying Links in correct sorted order (#84)

This commit is contained in:
sahil28297 2018-09-07 15:38:15 +05:30 committed by Faris Ansari
parent 06c06a81cb
commit 0a354fa5c1
7 changed files with 11 additions and 3 deletions

View File

@ -136,4 +136,4 @@ module.exports = class Router extends Observable {
} }
return route; return route;
} }
} }

View File

@ -29,7 +29,7 @@
"express": "^4.16.2", "express": "^4.16.2",
"feather-icons": "^4.7.3", "feather-icons": "^4.7.3",
"flatpickr": "^4.3.2", "flatpickr": "^4.3.2",
"frappe-datatable": "^1.1.2", "frappe-datatable": "^1.3.1",
"friendly-errors-webpack-plugin": "^1.7.0", "friendly-errors-webpack-plugin": "^1.7.0",
"html-webpack-plugin": "^3.2.0", "html-webpack-plugin": "^3.2.0",
"jquery": "^3.3.1", "jquery": "^3.3.1",

View File

@ -43,6 +43,7 @@ module.exports = {
app.use(bodyParser.urlencoded({ extended: true })); app.use(bodyParser.urlencoded({ extended: true }));
app.use(express.static(frappe.conf.distPath)); app.use(express.static(frappe.conf.distPath));
app.use('/static', express.static(frappe.conf.staticPath)) app.use('/static', express.static(frappe.conf.staticPath))
app.use(morgan('tiny')); app.use(morgan('tiny'));

BIN
test.db-journal Normal file

Binary file not shown.

View File

@ -93,6 +93,7 @@ export default {
}, },
async deleteCheckedItems() { async deleteCheckedItems() {
await frappe.db.deleteMany(this.doctype, this.checkList); await frappe.db.deleteMany(this.doctype, this.checkList);
this.$router.push(`/list/${this.doctype}`);
this.checkList = []; this.checkList = [];
}, },
toggleCheck(name) { toggleCheck(name) {

View File

@ -101,6 +101,9 @@ export default {
}, },
sort() { sort() {
return (a, b) => { return (a, b) => {
a = a.toLowerCase();
b = b.toLowerCase();
if (a.value === '__newItem') { if (a.value === '__newItem') {
return 1; return 1;
} }

View File

@ -2,7 +2,7 @@
<div> <div>
<div class="p-4"> <div class="p-4">
<h4 class="pb-2">{{ reportConfig.title }}</h4> <h4 class="pb-2">{{ reportConfig.title }}</h4>
<report-filters v-if="reportConfig.filterFields.length" :filters="reportConfig.filterFields" :filterDefaults="filters" @change="getReportData"></report-filters> <report-filters v-if="filtersExists" :filters="reportConfig.filterFields" :filterDefaults="filters" @change="getReportData"></report-filters>
<div class="pt-2" ref="datatable" v-once></div> <div class="pt-2" ref="datatable" v-once></div>
</div> </div>
<not-found v-if="!reportConfig" /> <not-found v-if="!reportConfig" />
@ -22,6 +22,9 @@ export default {
return utils.convertFieldsToDatatableColumns( return utils.convertFieldsToDatatableColumns(
this.reportConfig.getColumns() this.reportConfig.getColumns()
); );
},
filtersExists() {
return (this.reportConfig.filterFields || []).length;
} }
}, },
methods: { methods: {