import {GridDataSource, GridCellTextGenerator} from '@eg/share/grid/grid';
import {ProviderRecord, ProviderRecordService} from './provider-record.service';
import {AcqProviderSearchFormComponent} from './acq-provider-search-form.component';
-import {PcrudService} from '@eg/core/pcrud.service';
import {FmRecordEditorComponent} from '@eg/share/fm-editor/fm-editor.component';
import {StringComponent} from '@eg/share/string/string.component';
import {ToastService} from '@eg/share/toast/toast.service';
private idl: IdlService,
private auth: AuthService,
private providerRecord: ProviderRecordService,
- private pcrud: PcrudService,
private toast: ToastService) {
}
this.cellTextGenerator = {};
this.deleteSelected = (idlThings: IdlObject[]) => {
idlThings.forEach(idlThing => idlThing.isdeleted(true));
- this.pcrud.autoApply(idlThings).subscribe(
+ this.providerRecord.batchUpdate(idlThings).subscribe(
val => {
console.debug('deleted: ' + val);
this.deleteSuccessString.current()
this.deleteFailedString.current()
.then(str => this.toast.danger(str));
},
- () => this.providerAddressesGrid.reload()
+ () => {
+ this.providerRecord.refreshCurrent().then(
+ () => this.providerAddressesGrid.reload()
+ );
+ }
);
};
this.providerAddressesGrid.onRowActivate.subscribe(
result => {
this.successString.current()
.then(str => this.toast.success(str));
- this.providerAddressesGrid.reload();
+ this.providerRecord.refreshCurrent().then(
+ () => this.providerAddressesGrid.reload()
+ );
resolve(result);
},
error => {
ok => {
this.createString.current()
.then(str => this.toast.success(str));
- this.providerAddressesGrid.reload();
+ this.providerRecord.refreshCurrent().then(
+ () => this.providerAddressesGrid.reload()
+ );
},
rejection => {
if (!rejection.dismissed) {