fix(SPG-571) error / Loading saat delete (bulk atau satuan) - ( pengaruh ke tab lain ) berlaku untuk semua module
parent
ced08bebd3
commit
3bb6ed1082
|
@ -51,13 +51,13 @@ export abstract class BaseBatchDeleteManager<Entity> extends BaseManager {
|
||||||
this.tableName,
|
this.tableName,
|
||||||
).execute();
|
).execute();
|
||||||
|
|
||||||
const result = await this.dataService.deleteById(
|
await this.dataService.deleteById(
|
||||||
this.queryRunner,
|
this.queryRunner,
|
||||||
this.entityTarget,
|
this.entityTarget,
|
||||||
id,
|
id,
|
||||||
);
|
);
|
||||||
|
|
||||||
this.publishEvents(entity, result);
|
this.publishEvents(entity, entity);
|
||||||
totalSuccess = totalSuccess + 1;
|
totalSuccess = totalSuccess + 1;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
totalFailed = totalFailed + 1;
|
totalFailed = totalFailed + 1;
|
||||||
|
|
|
@ -52,9 +52,9 @@ export abstract class BaseDeleteManager<Entity> extends BaseManager {
|
||||||
async publishEvents() {
|
async publishEvents() {
|
||||||
this.eventBus.publish(
|
this.eventBus.publish(
|
||||||
new RecordLog({
|
new RecordLog({
|
||||||
id: this.result['id'],
|
id: this.data['id'],
|
||||||
old: null,
|
old: null,
|
||||||
data: this.result,
|
data: this.data,
|
||||||
user: this.user,
|
user: this.user,
|
||||||
description: `${ this.user.name } delete data ${ this.tableName }`,
|
description: `${ this.user.name } delete data ${ this.tableName }`,
|
||||||
module: this.tableName,
|
module: this.tableName,
|
||||||
|
|
Loading…
Reference in New Issue