salix/modules/account/front/basic-data/index.js

30 lines
761 B
JavaScript
Raw Normal View History

import ngModule from '../module';
import Section from 'salix/components/section';
export default class Controller extends Section {
$onInit() {
if (this.$params.emailVerified) {
const params = {
emailVerified: true
};
return this.$http.patch(`Accounts/${this.$params.id}`, params)
.then(() => {
2022-09-26 06:48:46 +00:00
this.vnApp.showSuccess(this.$t('Email verified successfully!'));
});
}
}
onSubmit() {
this.$.watcher.submit()
.then(() => this.card.reload());
}
}
ngModule.component('vnUserBasicData', {
template: require('./index.html'),
controller: Controller,
require: {
card: '^vnUserCard'
}
});