fix: restore table version improvement
Some checks failed
Build / Build-and-ng-test (pull_request) Failing after 15s
Some checks failed
Build / Build-and-ng-test (pull_request) Failing after 15s
This commit is contained in:
parent
1589c799ec
commit
549f35766b
9
client/src/app/models/sas/editors-restore.model.ts
Normal file
9
client/src/app/models/sas/editors-restore.model.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import { BaseSASResponse } from "./common/BaseSASResponse";
|
||||
|
||||
export interface EditorsRestoreServiceResponse extends BaseSASResponse {
|
||||
restore_out: RestoreOut[]
|
||||
}
|
||||
|
||||
export interface RestoreOut {
|
||||
LOADREF: string
|
||||
}
|
@ -98,7 +98,7 @@
|
||||
[clrLoading]="revertingChanges"
|
||||
class="btn btn-sm btn-danger text-center mt-20"
|
||||
>
|
||||
REVERT (Coming Soon)
|
||||
REVERT
|
||||
|
||||
<clr-tooltip-content
|
||||
clrPosition="bottom-left"
|
||||
|
@ -4,10 +4,10 @@ import { Router } from '@angular/router'
|
||||
import { ActivatedRoute } from '@angular/router'
|
||||
import { SasService } from '../services/sas.service'
|
||||
import { EventService } from '../services/event.service'
|
||||
import { AppService } from '../services/app.service'
|
||||
import { HotTableInterface } from '../models/HotTable.interface'
|
||||
import { LicenceService } from '../services/licence.service'
|
||||
import { globals } from '../_globals'
|
||||
import { EditorsRestoreServiceResponse } from '../models/sas/editors-restore.model'
|
||||
|
||||
@Component({
|
||||
selector: 'app-stage',
|
||||
@ -174,8 +174,12 @@ export class StageComponent implements OnInit {
|
||||
]
|
||||
}
|
||||
|
||||
this.sasService.request('editors/restore', data).then(res => {
|
||||
console.log('res', res)
|
||||
this.sasService.request('editors/restore', data).then((res: EditorsRestoreServiceResponse) => {
|
||||
if (res.restore_out) {
|
||||
this.route.navigate([`/stage`]).then(() => {
|
||||
this.route.navigate([`/stage/${res.restore_out[0].LOADREF}`])
|
||||
})
|
||||
}
|
||||
}).finally(() => {
|
||||
this.revertingChanges = false
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user