diff --git a/client/src/app/models/sas/editors-stagedata.model.ts b/client/src/app/models/sas/editors-stagedata.model.ts index 70794fd..d5d831e 100644 --- a/client/src/app/models/sas/editors-stagedata.model.ts +++ b/client/src/app/models/sas/editors-stagedata.model.ts @@ -1,30 +1,14 @@ import { BaseSASResponse } from './common/BaseSASResponse' export interface EditorsStageDataSASResponse extends BaseSASResponse { - SYSDATE: string - SYSTIME: string sasparams: Sasparam[] - _DEBUG: string - _PROGRAM: string AUTOEXEC: string - MF_GETUSER: string - SYSCC: string SYSENCODING: string - SYSERRORTEXT: string SYSHOSTINFOLONG: string - SYSHOSTNAME: string SYSPROCESSID: string SYSPROCESSMODE: string SYSPROCESSNAME: string - SYSJOBID: string - SYSSCPL: string - SYSSITE: string SYSTCPIPHOSTNAME: string - SYSUSERID: string - SYSVLONG: string - SYSWARNINGTEXT: string - END_DTTM: string - MEMSIZE: string } export interface Sasparam { diff --git a/client/src/app/models/sas/public-getchangeinfo.model.ts b/client/src/app/models/sas/public-getchangeinfo.model.ts new file mode 100644 index 0000000..9748d85 --- /dev/null +++ b/client/src/app/models/sas/public-getchangeinfo.model.ts @@ -0,0 +1,28 @@ +import { BaseSASResponse } from "./common/BaseSASResponse"; + +export interface PublicGetChangeinfo extends BaseSASResponse { + jsparams: Jsparam[] +} + +export interface Jsparam { + TABLE_ID: string; + SUBMIT_STATUS_CD: string; + BASE_LIB: string; + BASE_DS: string; + SUBMITTED_BY_NM: string; + SUBMITTED_ON: number; + SUBMITTED_REASON_TXT: string; + INPUT_OBS: number; + INPUT_VARS: number; + NUM_OF_APPROVALS_REQUIRED: number; + NUM_OF_APPROVALS_REMAINING: number; + REVIEWED_BY_NM: string; + REVIEWED_ON?: any; + TABLE_NM: string; + BASE_TABLE: string; + REVIEWED_ON_DTTM: string; + SUBMITTED_ON_DTTM: string; + LIB_ENGINE: string; + ALLOW_RESTORE: string; + REASON: string; +} \ No newline at end of file diff --git a/client/src/app/review/approve-details/approve-details.component.ts b/client/src/app/review/approve-details/approve-details.component.ts index c0e6639..020072f 100644 --- a/client/src/app/review/approve-details/approve-details.component.ts +++ b/client/src/app/review/approve-details/approve-details.component.ts @@ -13,6 +13,8 @@ import { AuditorsPostdataSASResponse, Param } from '../../models/sas/auditors-postdata.model' +import { PublicGetChangeinfo } from 'src/app/models/sas/public-getchangeinfo.model' +import { SasService } from 'src/app/services' interface ChangesObj { ind: any @@ -76,9 +78,11 @@ export class ApproveDetailsComponent implements AfterViewInit, OnDestroy { public diffsLimit: boolean = false public recordsLimit: number = 100 + public refreshStartupserviceAfterApprove: boolean = false constructor( private sasStoreService: SasStoreService, + private sasService: SasService, private eventService: EventService, private router: ActivatedRoute, private route: Router @@ -162,6 +166,8 @@ export class ApproveDetailsComponent implements AfterViewInit, OnDestroy { await this.sasStoreService .approveTable(approveParams, 'SASControlTable', 'auditors/postdata') .then((res: any) => { + // If we are approving MPE_TABLES we will arm the trigger for the reload of startup data to se the updated tables + if (this.refreshStartupserviceAfterApprove) this.sasService.reloadStartupData() this.route.navigateByUrl('/review/history') }) .catch((err: any) => { @@ -176,7 +182,7 @@ export class ApproveDetailsComponent implements AfterViewInit, OnDestroy { public async callChangesInfo(tableId: any) { await this.sasStoreService .getChangeInfo(tableId) - .then((res: any) => { + .then((res: PublicGetChangeinfo) => { this.tableDetails = res.jsparams[0] this.jsParams = res.jsparams[0] @@ -189,6 +195,10 @@ export class ApproveDetailsComponent implements AfterViewInit, OnDestroy { } this.keysArray = keysArray + + // If we are approving MPE_TABLES we will arm the trigger for the reload of startup data to se the updated tables + // After user approved if armed, reload will be triggered + if (res.jsparams[0].BASE_DS === 'MPE_TABLES') this.refreshStartupserviceAfterApprove = true }) .catch((err: any) => { this.acceptLoading = false diff --git a/client/src/app/services/sas.service.ts b/client/src/app/services/sas.service.ts index 5c596b8..782c38a 100644 --- a/client/src/app/services/sas.service.ts +++ b/client/src/app/services/sas.service.ts @@ -333,6 +333,10 @@ export class SasService { }) } + public reloadStartupData() { + this.loadStartupServiceEmitter.emit() + } + public getLicenseSiteId(): string[] { return this.license_site_id.value || [] }