2017-06-03 11:01:47 +00:00
|
|
|
import ngModule from '../module';
|
2020-03-17 10:17:50 +00:00
|
|
|
import Section from 'salix/components/section';
|
2017-01-31 13:13:06 +00:00
|
|
|
|
2021-06-02 15:35:30 +00:00
|
|
|
export default class Controller extends Section {
|
|
|
|
transferorSearchFunction($search) {
|
|
|
|
return /^\d+$/.test($search)
|
|
|
|
? {id: $search}
|
|
|
|
: {name: {like: '%' + $search + '%'}};
|
|
|
|
}
|
2022-02-18 12:56:18 +00:00
|
|
|
|
2022-02-23 11:57:43 +00:00
|
|
|
onSubmit() {
|
|
|
|
return this.$.watcher.submit().then(() => {
|
|
|
|
const query = `Clients/updatePortfolio`;
|
|
|
|
this.$http.get(query);
|
2022-04-01 08:04:15 +00:00
|
|
|
this.$http.get(`Clients/${this.$params.id}/checkDuplicatedData`);
|
2022-02-23 11:57:43 +00:00
|
|
|
});
|
2022-02-18 12:56:18 +00:00
|
|
|
}
|
2021-06-02 15:35:30 +00:00
|
|
|
}
|
|
|
|
|
2020-07-24 12:22:30 +00:00
|
|
|
ngModule.vnComponent('vnClientBasicData', {
|
2018-05-23 12:26:51 +00:00
|
|
|
template: require('./index.html'),
|
2021-06-02 15:35:30 +00:00
|
|
|
controller: Controller,
|
2017-01-31 13:13:06 +00:00
|
|
|
bindings: {
|
|
|
|
client: '<'
|
2017-02-07 11:58:25 +00:00
|
|
|
}
|
2017-06-03 11:01:47 +00:00
|
|
|
});
|