fix filter
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
8432815cb7
commit
69530d3019
|
@ -18,7 +18,7 @@
|
|||
</span>
|
||||
<span translate>row(s) have been selected.</span>
|
||||
<span class="bold link" ng-click="$ctrl.checkDummy()">
|
||||
{{$ctrl.AllRowsCount}}
|
||||
{{$ctrl.AllRowsText}}
|
||||
</span>
|
||||
</vn-list>
|
||||
</vn-menu>
|
|
@ -151,21 +151,22 @@ export default class MultiCheck extends FormInput {
|
|||
}
|
||||
};
|
||||
|
||||
this.rows = data.length;
|
||||
|
||||
this.$http.get(this.model.url, {params})
|
||||
.then(res => {
|
||||
this.AllRows = res.data;
|
||||
this.AllRowsCount = this.$t('SelectAllRows', {
|
||||
rows: res.data.length
|
||||
this.AllRowsCount = res.data.length;
|
||||
this.AllRowsText = this.$t('SelectAllRows', {
|
||||
rows: this.AllRowsCount
|
||||
});
|
||||
});
|
||||
this.rows = data.length;
|
||||
}
|
||||
|
||||
checkDummy() {
|
||||
if (this.checkedDummyCount)
|
||||
return this.checkedDummyCount = null;
|
||||
|
||||
this.checkedDummyCount = this.rows;
|
||||
this.checkedDummyCount = this.AllRowsCount;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = Self => {
|
||||
Self.remoteMethod('editLatestBuys', {
|
||||
Self.remoteMethodCtx('editLatestBuys', {
|
||||
description: 'Updates a column for one or more buys',
|
||||
accessType: 'WRITE',
|
||||
accepts: [{
|
||||
|
@ -35,7 +35,7 @@ module.exports = Self => {
|
|||
}
|
||||
});
|
||||
|
||||
Self.editLatestBuys = async(field, newValue, lines, filter, options) => {
|
||||
Self.editLatestBuys = async(ctx, field, newValue, lines, filter, options) => {
|
||||
let tx;
|
||||
const myOptions = {};
|
||||
|
||||
|
@ -76,11 +76,12 @@ module.exports = Self => {
|
|||
const value = {};
|
||||
value[field] = newValue;
|
||||
|
||||
if (filter)
|
||||
lines = await models.Entry.latestBuysFilter(null, filter, myOptions);// ctx?
|
||||
// get lines
|
||||
if (filter) {
|
||||
ctx.args.filter = {where: filter, limit: null};
|
||||
lines = await models.Buy.latestBuysFilter(ctx, null, myOptions);// ctx?
|
||||
}
|
||||
// get lines
|
||||
|
||||
console.log(lines.length);
|
||||
const targets = lines.map(line => {
|
||||
return line[identifier];
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue