mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
24 lines
640 B
TypeScript
24 lines
640 B
TypeScript
|
|
import { Injectable } from '@angular/core';
|
||
|
|
import { ProcessesService } from '../services/processes.service';
|
||
|
|
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||
|
|
|
||
|
|
@Injectable({
|
||
|
|
providedIn: 'root'
|
||
|
|
})
|
||
|
|
export class ProcessDocumentService {
|
||
|
|
|
||
|
|
constructor(
|
||
|
|
private processes: ProcessesService,
|
||
|
|
private iab: InAppBrowser,
|
||
|
|
) { }
|
||
|
|
|
||
|
|
viewDocument({DocId, ApplicationId}) {
|
||
|
|
this.processes.GetDocumentUrl(DocId, ApplicationId).subscribe( (res) => {
|
||
|
|
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||
|
|
const browser = this.iab.create(url,"_blank");
|
||
|
|
browser.show();
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|