Show data save snackbar on auto-save
gitea/salix/2036-claim_action_show_snackbar This commit looks good Details

This commit is contained in:
Joan Sanchez 2020-02-07 07:47:11 +01:00
parent 4deda8588b
commit b192cb15c0
3 changed files with 11 additions and 5 deletions

View File

@ -32,12 +32,11 @@ describe('Claim action path', () => {
expect(result).toEqual('Data saved!');
});
// #2036 claim.action destinatario
it('should edit the second line destination field', async() => {
await page.autocompleteSearch(selectors.claimAction.secondLineDestination, 'Bueno');
// const result = await page.waitForLastSnackbar();
const result = await page.waitForLastSnackbar();
// expect(result).toEqual('Data saved!');
expect(result).toEqual('Data saved!');
});
it('should delete the first line', async() => {

View File

@ -1,7 +1,10 @@
<vn-crud-model vn-id="model" auto-load="true" auto-save="true"
<vn-crud-model vn-id="model"
url="ClaimEnds"
filter="$ctrl.filter"
data="$ctrl.salesClaimed">
data="$ctrl.salesClaimed"
auto-load="true"
auto-save="true"
on-save="$ctrl.onSave()">
</vn-crud-model>
<vn-crud-model auto-load="true"

View File

@ -203,6 +203,10 @@ class Controller {
this.vnApp.showSuccess(this.$translate.instant('Data saved!'));
});
}
onSave() {
this.vnApp.showSuccess(this.$translate.instant('Data saved!'));
}
}
Controller.$inject = ['$stateParams', '$scope', '$http', '$translate', 'vnApp', '$httpParamSerializer'];