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, 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;

View File

@ -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,