This commit is contained in:
tiago.kayaya
2021-09-30 08:44:12 +01:00
6 changed files with 23 additions and 19 deletions
@@ -15,7 +15,7 @@ import { ToastService } from 'src/app/services/toast.service';
import { DespachoService } from 'src/app/Rules/despacho.service'
import { Location } from '@angular/common'
import { fullTask } from 'src/app/models/dailyworktask.model';
import { Attachment, AttachmentList } from 'src/app/models/Excludetask';
import { AttachmentList } from 'src/app/models/Excludetask';
import { PermissionService } from 'src/app/OtherService/permission.service';
@Component({
@@ -51,10 +51,8 @@ export class DespachoPage implements OnInit {
private toastService: ToastService,
private despachoService: DespachoService,
private location: Location,
public p: PermissionService,
) {
public p: PermissionService) {
this.activatedRoute.paramMap.subscribe(params => {
if(params["params"].SerialNumber) {
this.serialnumber = params["params"].SerialNumber;
@@ -160,10 +158,10 @@ export class DespachoPage implements OnInit {
});
}
viewDocument(docId:string){
viewDocument(docId:string) {
this.processes.GetDocumentUrl(docId, '361').subscribe(res=>{
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
const browser = this.iab.create(url,"_blank");
const browser = this.iab.create('https://equilibrium.dyndns.info/FileShare/pdfjs/web/viewer.html?file=https://equilibrium.dyndns.info/FileShare/merged_fastview.pdf', "_blank", 'location=yes,x=0,y=200,width=437,height=650,fullscreen=no');
browser.show();
});
}
@@ -95,6 +95,7 @@ export class PublicationDetailPage implements OnInit {
if(this.isModal) {
this.close()
} else {
// alert('go back')
this.location.back();
}
@@ -107,6 +108,11 @@ export class PublicationDetailPage implements OnInit {
try {
await this.publications.DeletePublication(this.folderId, this.publicationId).toPromise();
this.toastService.successMessage('Publicação eliminada')
if(window['app-view-publications-page-doRefresh']) {
window['app-view-publications-page-doRefresh']()
}
this.goBack();
} catch (error) {
this.toastService.badRequest('Publicaçao não eliminada')