2022-04-07 09:41:35 +00:00
|
|
|
import ngModule from '../module';
|
|
|
|
import Section from 'salix/components/section';
|
|
|
|
|
|
|
|
export default class Controller extends Section {
|
|
|
|
setDefaultDate(hasData) {
|
|
|
|
if (hasData && !this.clientUnpaid.dated)
|
2023-01-16 14:18:24 +00:00
|
|
|
this.clientUnpaid.dated = Date.vnNew();
|
2022-04-07 09:41:35 +00:00
|
|
|
}
|
2023-03-09 08:29:11 +00:00
|
|
|
|
|
|
|
onSubmit() {
|
|
|
|
this.$.watcher.submit()
|
|
|
|
.then(() => this.card.reload());
|
|
|
|
}
|
2022-04-07 09:41:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ngModule.vnComponent('vnClientUnpaid', {
|
|
|
|
template: require('./index.html'),
|
2023-03-09 08:29:11 +00:00
|
|
|
controller: Controller,
|
|
|
|
require: {
|
|
|
|
card: '^vnClientCard'
|
|
|
|
}
|
2022-04-07 09:41:35 +00:00
|
|
|
});
|