chore: fix the logic for goback button in stage component
Build / Build-and-ng-test (pull_request) Failing after 13s Details

This commit is contained in:
Sabir Hassan 2024-01-19 21:03:34 +05:00
parent 731b96dccc
commit 482c7455f5
1 changed files with 10 additions and 1 deletions

View File

@ -7,6 +7,7 @@ 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'
@Component({
selector: 'app-stage',
@ -55,7 +56,15 @@ export class StageComponent implements OnInit {
}
public goBack() {
this.route.navigateByUrl('/editor/' + this.tableDetails.BASE_TABLE)
const xlmap = globals.xlmaps.find(
(xlmap) => xlmap.targetDS === this.tableDetails.BASE_TABLE
)
if (xlmap) {
const id = this.hotTable.data[0].XLMAP_ID
this.route.navigateByUrl('/home/files/' + id)
} else {
this.route.navigateByUrl('/editor/' + this.tableDetails.BASE_TABLE)
}
}
public download(id: any) {