salix/modules/account/front/accounts/index.js

20 lines
562 B
JavaScript
Raw Normal View History

import ngModule from '../module';
import Section from 'salix/components/section';
export default class Controller extends Section {
onSynchronizeAll() {
this.vnApp.showSuccess(this.$t('Synchronizing in the background'));
2023-06-15 09:49:39 +00:00
this.$http.patch(`Accounts/syncAll`);
}
onSynchronizeRoles() {
this.$http.patch(`RoleInherits/sync`)
.then(() => this.vnApp.showSuccess(this.$t('Roles synchronized!')));
}
}
ngModule.component('vnAccountAccounts', {
template: require('./index.html'),
controller: Controller
});