fix(SPG-571) error / Loading saat delete (bulk atau satuan) - ( pengaruh ke tab lain ) berlaku untuk semua module

pull/6/head^2
Aswin Ashar Abdullah 2024-06-30 23:06:19 +07:00
parent ced08bebd3
commit 3bb6ed1082
2 changed files with 4 additions and 4 deletions

View File

@ -51,13 +51,13 @@ export abstract class BaseBatchDeleteManager<Entity> extends BaseManager {
this.tableName,
).execute();
const result = await this.dataService.deleteById(
await this.dataService.deleteById(
this.queryRunner,
this.entityTarget,
id,
);
this.publishEvents(entity, result);
this.publishEvents(entity, entity);
totalSuccess = totalSuccess + 1;
} catch (error) {
totalFailed = totalFailed + 1;

View File

@ -52,9 +52,9 @@ export abstract class BaseDeleteManager<Entity> extends BaseManager {
async publishEvents() {
this.eventBus.publish(
new RecordLog({
id: this.result['id'],
id: this.data['id'],
old: null,
data: this.result,
data: this.data,
user: this.user,
description: `${ this.user.name } delete data ${ this.tableName }`,
module: this.tableName,