mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
merge
This commit is contained in:
@@ -106,7 +106,7 @@
|
||||
*ngFor="let attachment of loadedAttachments"
|
||||
(click)="viewDocument(attachment.DocId, attachment)">
|
||||
<ion-label>
|
||||
<p class="attach-title-item d-block">{{attachment.Description}}</p>
|
||||
<p class="attach-title-item d-block">{{attachment.Description || 'Sem título'}}</p>
|
||||
<p><span class="span-left">{{attachment.Stakeholders}}</span><span class="span-right">{{ attachment.CreateDate | date: 'dd-MM-yyyy HH:mm' }}</span></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
class="ion-no-margin ion-no-padding pa-0">
|
||||
<ion-label class="width-100 d-flex align-center">
|
||||
<p class="flex-grow-1 cursor-pointer" (click)="docIndex(i);LoadDocumentDetails()">
|
||||
<span class="attach-title-item d-block">{{attach.SourceName}}</span>
|
||||
<span class="attach-title-item d-block">{{attach.SourceName || 'Sem título'}}</span>
|
||||
<span class="span-left d-block">{{attach.Stakeholders}}</span>
|
||||
</p>
|
||||
|
||||
|
||||
@@ -889,7 +889,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
fileBase64 = await this._getBase64(file)
|
||||
|
||||
formData = new FormData();
|
||||
formData.append('blobFile', blob);
|
||||
formData.append('blobFile', file);
|
||||
}
|
||||
|
||||
this.ChatSystemService.getGroupRoom(roomId).send({
|
||||
@@ -1023,11 +1023,12 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
}
|
||||
|
||||
downloadFileFromBrowser(fileName: string, data: any): void {
|
||||
const linkSource = data;
|
||||
const downloadLink = document.createElement("a");
|
||||
downloadLink.href = linkSource;
|
||||
downloadLink.download = fileName;
|
||||
downloadLink.click();
|
||||
const link = document.createElement("a")
|
||||
link.href = `data:${data.type}';base64,${data.image_url}`;
|
||||
link.download = fileName
|
||||
link.click()
|
||||
|
||||
link.remove()
|
||||
}
|
||||
|
||||
b64toBlob(b64Data, contentType) {
|
||||
@@ -1109,10 +1110,10 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
});
|
||||
modal.present();
|
||||
} else {
|
||||
this.downloadFileFromBrowser("file", str)
|
||||
this.downloadFileFromBrowser(msg.attachments[0].title, msg.attachments[0])
|
||||
}
|
||||
} else {
|
||||
this.openFile(str, msg.attachments[0].title, msg.file.type);
|
||||
this.openFile(msg.attachments.image_url, msg.attachments[0].title, msg.file.type);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
|
||||
import { ChatMessageDebuggingPage } from 'src/app/shared/popover/chat-message-debugging/chat-message-debugging.page';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { FileValidatorService } from "src/app/services/file/file-validator.service"
|
||||
import { ChangeDetectorRef } from '@angular/core';
|
||||
|
||||
|
||||
const IMAGE_DIR = 'stored-images';
|
||||
@@ -702,7 +703,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
source: CameraSource.Camera
|
||||
});
|
||||
|
||||
console.log('FILE CHAT',file)
|
||||
console.log('FILE CHAT', file)
|
||||
|
||||
const imageBase64 = 'data:image/jpeg;base64,' + file.base64String
|
||||
const blob = this.dataURItoBlob(imageBase64)
|
||||
@@ -851,7 +852,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
file.type == 'application/xls' || file.type == 'application/xlsx' || file.type == 'application/ppt' ||
|
||||
file.type == 'application/pptx' || file.type == 'application/txt') {
|
||||
|
||||
console.log('FILE', file)
|
||||
console.log('FILE rigth?', file)
|
||||
|
||||
const fileName = file.name
|
||||
|
||||
@@ -876,12 +877,13 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
/* console.log('add file', fileBase64) */
|
||||
|
||||
} else {
|
||||
console.log('encode data', encodedData)
|
||||
blob = this.fileService.base64toBlob(encodedData, file.type)
|
||||
|
||||
fileBase64 = await this._getBase64(file)
|
||||
|
||||
formData = new FormData();
|
||||
formData.append('blobFile', blob);
|
||||
formData.append('blobFile', file);
|
||||
}
|
||||
|
||||
|
||||
@@ -1082,11 +1084,13 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
}
|
||||
|
||||
downloadFileFromBrowser(fileName: string, data: any): void {
|
||||
const linkSource = data;
|
||||
const downloadLink = document.createElement("a");
|
||||
downloadLink.href = linkSource;
|
||||
downloadLink.download = fileName;
|
||||
downloadLink.click();
|
||||
|
||||
const link = document.createElement("a")
|
||||
link.href = `data:${data.type}';base64,${data.image_url}`;
|
||||
link.download = fileName
|
||||
link.click()
|
||||
|
||||
link.remove()
|
||||
}
|
||||
|
||||
viewDocument(file: any, url?: string) {
|
||||
@@ -1154,12 +1158,12 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
});
|
||||
modal.present();
|
||||
} else {
|
||||
this.downloadFileFromBrowser("file", str)
|
||||
this.downloadFileFromBrowser(msg.attachments[0].title, msg.attachments[0],)
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
this.openFile(str, msg.attachments[0].title, msg.file.type);
|
||||
this.openFile(msg.attachments[0].image_url, msg.attachments[0].title, msg.file.type);
|
||||
// this.downloadFileFromBrowser("file", str)
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,10 @@ import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expedient
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import { DocumentSetUpMeetingPage } from 'src/app/modals/document-set-up-meeting/document-set-up-meeting.page';
|
||||
import { HeaderSettingsService } from "src/app/services/header-settings.service"
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { LoginUserRespose } from 'src/app/models/user.model';
|
||||
import { object } from 'zod';
|
||||
import { element } from 'protractor';
|
||||
|
||||
@Component({
|
||||
selector: 'app-task-details',
|
||||
@@ -28,7 +32,8 @@ export class TaskDetailsPage implements OnInit {
|
||||
@Output() viewDocument = new EventEmitter<any>();
|
||||
|
||||
selectedIndex = 0
|
||||
dropButton = true
|
||||
dropButton = true
|
||||
loggeduser: LoginUserRespose;
|
||||
constructor(
|
||||
public ThemeService: ThemeService,
|
||||
public DeviceService: DeviceService,
|
||||
@@ -38,14 +43,19 @@ export class TaskDetailsPage implements OnInit {
|
||||
private HeaderSettingsService: HeaderSettingsService
|
||||
) {
|
||||
this.DeviceService.isDesktop();
|
||||
this.loggeduser = SessionStore.user
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
window['TaskDetailsPage-openExpedientActionsModal']= (taskAction, Document) => {
|
||||
|
||||
this.filterCoverPage();
|
||||
|
||||
window['TaskDetailsPage-openExpedientActionsModal'] = (taskAction, Document) => {
|
||||
this.openExpedientActionsModal(taskAction, Document)
|
||||
}
|
||||
|
||||
window['TaskDetailsPage-openBookMeetingModal']= (Document) => {
|
||||
window['TaskDetailsPage-openBookMeetingModal'] = (Document) => {
|
||||
this.openBookMeetingModal(Document)
|
||||
}
|
||||
}
|
||||
@@ -67,12 +77,12 @@ export class TaskDetailsPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
async openExpedientActionsModal( taskAction: any, Document) {
|
||||
async openExpedientActionsModal(taskAction: any, Document) {
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth < 701) {
|
||||
if (window.innerWidth < 701) {
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
// check passing
|
||||
@@ -84,7 +94,7 @@ export class TaskDetailsPage implements OnInit {
|
||||
task: this.fulltask, // check
|
||||
document: Document, // nope
|
||||
aplicationId: Document.ApplicationId || Document.ApplicationID, // check
|
||||
applicationId: Document.ApplicationId || Document.ApplicationID,
|
||||
applicationId: Document.ApplicationId || Document.ApplicationID,
|
||||
docId: Document.docId || Document.DocId,
|
||||
createProcessFromFile: true,
|
||||
},
|
||||
@@ -92,7 +102,7 @@ export class TaskDetailsPage implements OnInit {
|
||||
});
|
||||
|
||||
modal.onDidDismiss().then(
|
||||
async(res) => {}
|
||||
async (res) => { }
|
||||
, (error) => {
|
||||
console.log(error)
|
||||
}
|
||||
@@ -105,9 +115,9 @@ export class TaskDetailsPage implements OnInit {
|
||||
async openBookMeetingModal(Document) {
|
||||
//console.log('this.Document----------', this.Document)
|
||||
let classs;
|
||||
if( window.innerWidth < 701) {
|
||||
if (window.innerWidth < 701) {
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
} else {
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
|
||||
@@ -139,4 +149,17 @@ export class TaskDetailsPage implements OnInit {
|
||||
onOndestroy() {
|
||||
this.HeaderSettingsService.hideHeader == false
|
||||
}
|
||||
|
||||
filterCoverPage() {
|
||||
/* Method that filter the cover page of PR expediente */
|
||||
if (this.loggeduser.Profile == 'PR' && this.task.WorkflowName == "Expediente") {
|
||||
try {
|
||||
console.log('Merge array 1', this.mergedArray)
|
||||
this.mergedArray = this.mergedArray.filter(element => element!.DocTypeId != 99999992);
|
||||
console.log('Merge array 2', this.mergedArray)
|
||||
} catch (error) {
|
||||
console.info('error filtering cover page', error)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,8 +47,8 @@
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
" >
|
||||
{{ PublicationHolderService.count }}%
|
||||
<span style="padding-right: 7px" *ngIf="PublicationHolderService.PublicationFormMV?.[0]?.retry" (click)="PublicationHolderService.PublicationFormMV?.[0]?.retryFunction()" ><ion-icon src="assets/images/retry-svgrepo-com.svg" > </ion-icon></span>
|
||||
<span *ngIf="!PublicationHolderService.PublicationFormMV?.[0]?.retry">{{ PublicationHolderService.count }}%</span>
|
||||
<span style="padding-right: 12px" *ngIf="PublicationHolderService.PublicationFormMV?.[0]?.retry" (click)="PublicationHolderService.PublicationFormMV?.[0]?.retryFunction()" ><ion-icon src="assets/images/retry-svgrepo-com.svg" > </ion-icon></span>
|
||||
<span style="padding-right: 7px" *ngIf="PublicationHolderService.PublicationFormMV?.[0]?.retry" (click)="PublicationHolderService.remove(PublicationHolderService.PublicationFormMV?.[0]?.id)">X</span>
|
||||
</div>
|
||||
<!-- <div *ngIf="this.NotificationHolderService.notificationList.length > 0" class="icon-badge">{{NotificationHolderService.notificationList.length}}</div> -->
|
||||
@@ -175,8 +175,8 @@
|
||||
<div class="header-btns d-flex">
|
||||
|
||||
<div *ngIf="PublicationHolderService.count != 0" style="color: black" >
|
||||
{{ PublicationHolderService.count }}%
|
||||
<span style="padding-right: 7px" *ngIf="PublicationHolderService.PublicationFormMV?.[0]?.retry" (click)="PublicationHolderService.PublicationFormMV?.[0]?.retryFunction()" ><ion-icon src="assets/images/retry-svgrepo-com.svg" > </ion-icon></span>
|
||||
<span *ngIf="!PublicationHolderService.PublicationFormMV?.[0]?.retry">{{ PublicationHolderService.count }}%</span>
|
||||
<span style="padding-right: 12px" *ngIf="PublicationHolderService.PublicationFormMV?.[0]?.retry" (click)="PublicationHolderService.PublicationFormMV?.[0]?.retryFunction()" ><ion-icon src="assets/images/retry-svgrepo-com.svg" > </ion-icon></span>
|
||||
<span style="padding-right: 7px" *ngIf="PublicationHolderService.PublicationFormMV?.[0]?.retry" (click)="PublicationHolderService.remove(PublicationHolderService.PublicationFormMV?.[0]?.id)">X</span>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<swiper-container [config]="swiperThumbsConfig" [modules]="swiperModules" [speed]=400 navigation="true" [pagination]="{clickable: true, dynamicBullets: true }">
|
||||
<swiper-slide *ngFor="let files of publication.Files let k = index" class="centered-slide">
|
||||
<div class="cool">
|
||||
<div (click)="viewPublicationDetail(publication.DocumentId, publication.ProcessId)">
|
||||
<div >
|
||||
<img *ngIf="checkFileType.checkFileType(files.FileExtension ) == 'image'" class="post-img cursor-pointer"
|
||||
[lazyLoad]="'data:image/jpg;base64,' + files.FileBase64">
|
||||
|
||||
|
||||
Reference in New Issue
Block a user