Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/dev This commit looks good
Details
gitea/salix/dev This commit looks good
Details
This commit is contained in:
commit
c7ad52f7b1
|
@ -10,11 +10,10 @@ class Controller {
|
|||
}
|
||||
|
||||
onSubmit() {
|
||||
if (this.aclService.hasAny(['salesAssistant'])) {
|
||||
this.$scope.watcher.submit().then(() => {
|
||||
this.$scope.watcher.submit().then(() => {
|
||||
if (this.aclService.hasAny(['salesAssistant']))
|
||||
this.$state.go('claim.card.detail');
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
filter="::$ctrl.filter"
|
||||
link="{clientFk: $ctrl.$stateParams.id}"
|
||||
limit="20"
|
||||
data="greuges" auto-load="false">
|
||||
data="greuges" auto-load="true">
|
||||
</vn-crud-model>
|
||||
<mg-ajax
|
||||
path="/client/api/greuges/{{$ctrl.$stateParams.id}}/sumAmount"
|
||||
|
@ -20,12 +20,12 @@
|
|||
</div>
|
||||
</vn-horizontal>
|
||||
<vn-vertical>
|
||||
<vn-table model="model">
|
||||
<vn-table model="model" auto-load="false">
|
||||
<vn-thead>
|
||||
<vn-tr>
|
||||
<vn-th field="shipped" default-order="DESC">Date</vn-th>
|
||||
<vn-th field="description">Comment</vn-th>
|
||||
<vn-th field="amount">Amount</vn-th>
|
||||
<vn-th field="amount" >Amount</vn-th>
|
||||
<vn-th field="greugeTypeFk">Type</vn-th>
|
||||
</vn-tr>
|
||||
</vn-thead>
|
||||
|
|
|
@ -6,12 +6,13 @@ class Controller {
|
|||
this.filter = {
|
||||
include: [
|
||||
{
|
||||
relation: "greugeType",
|
||||
relation: 'greugeType',
|
||||
scope: {
|
||||
fields: ["id", "name"]
|
||||
fields: ['id', 'name']
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
order: 'shipped DESC, amount'
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,13 @@ module.exports = Self => {
|
|||
if (!origin)
|
||||
throw new UserError(`That item doesn't exists`);
|
||||
|
||||
origin.itemTag = undefined;
|
||||
origin.description = undefined;
|
||||
origin.image = undefined;
|
||||
origin.comment = undefined;
|
||||
|
||||
const newItem = await Self.create(origin, options);
|
||||
|
||||
let promises = [];
|
||||
|
||||
await cloneTaxes(origin.id, newItem.id, promises, options);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('item clone()', () => {
|
||||
fdescribe('item clone()', () => {
|
||||
let nextItemId;
|
||||
|
||||
beforeEach(async() => {
|
||||
|
@ -17,6 +17,10 @@ describe('item clone()', () => {
|
|||
let result = await app.models.Item.clone(itemFk);
|
||||
|
||||
expect(result.id).toEqual(nextItemId);
|
||||
expect(result.image).toBeUndefined();
|
||||
expect(result.itemTag).toBeUndefined();
|
||||
expect(result.comment).toBeUndefined();
|
||||
expect(result.description).toBeUndefined();
|
||||
});
|
||||
|
||||
it('should attempt to clone the given item but give an error as it doesnt exist', async() => {
|
||||
|
|
|
@ -27,7 +27,7 @@ export default class Controller {
|
|||
this.$http.get(`/api/TicketConfigs/findOne`).then(res => {
|
||||
if (res.data) {
|
||||
this.filter = {
|
||||
scopeDays: res.data.scopeDays
|
||||
scopeDays: parseInt(res.data.scopeDays)
|
||||
};
|
||||
}
|
||||
});
|
||||
|
@ -64,6 +64,7 @@ export default class Controller {
|
|||
onSearch(params) {
|
||||
if (params) {
|
||||
if (params.scopeDays) {
|
||||
params.scopeDays = parseInt(params.scopeDays);
|
||||
this.scopeDays = params.scopeDays;
|
||||
this.buildFilterDates();
|
||||
params = Object.assign(params, {from: this.today, to: this.daysOnward});
|
||||
|
|
|
@ -37,8 +37,7 @@
|
|||
label="To"
|
||||
model="filter.to">
|
||||
</vn-date-picker>
|
||||
<vn-input-number
|
||||
vn-one
|
||||
<vn-input-number vn-one
|
||||
min="0"
|
||||
step="1"
|
||||
label="Days onward"
|
||||
|
|
Loading…
Reference in New Issue