mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
git pull made
This commit is contained in:
@@ -4,11 +4,14 @@ import { GestureController, Gesture, ModalController, NavParams, PopoverControll
|
||||
import { map } from 'rxjs/operators';
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { ExpedientTaskModalPageNavParamsTask } from 'src/app/models/ExpedientTaskModalPage';
|
||||
import { SearchDocumentDetails, SearchFolderDetails } from 'src/app/models/search-document';
|
||||
import { ContactsPage } from 'src/app/pages/chat/messages/contacts/contacts.page';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { ChatService } from 'src/app/services/chat.service';
|
||||
import { FileService } from 'src/app/services/functions/file.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { synchro } from 'src/app/services/socket/synchro.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { NewEventPage } from 'src/app/shared/agenda/new-event/new-event.page';
|
||||
@@ -55,6 +58,10 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
showMessageOptions = false;
|
||||
selectedMsgId:string;
|
||||
|
||||
dicIndex = 0;
|
||||
task: ExpedientTaskModalPageNavParamsTask;
|
||||
LoadedDocument:any = null;
|
||||
|
||||
constructor(
|
||||
public popoverController: PopoverController,
|
||||
private modalController: ModalController,
|
||||
@@ -67,6 +74,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private fileService: FileService,
|
||||
private gestureController: GestureController,
|
||||
private processes: ProcessesService,
|
||||
) {
|
||||
/* this.activatedRoute.paramMap.subscribe(params => {
|
||||
if(params["params"].SerialNumber) {
|
||||
@@ -111,19 +119,19 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
this.scrollChangeCallback = () => this.onContentScrolled(event);
|
||||
window.addEventListener('scroll', this.scrollChangeCallback, true);
|
||||
|
||||
const gesture = this.gestureController.create({
|
||||
el: this.rectangle.nativeElement,
|
||||
gestureName:'long-press',
|
||||
onStart: () => { alert('OP') },
|
||||
/* onMove () => {
|
||||
console.log('Move');
|
||||
}, */
|
||||
onEnd: () => {
|
||||
console.log('ENNNNNDS');
|
||||
},
|
||||
})
|
||||
// const gesture = this.gestureController.create({
|
||||
// el: this.rectangle.nativeElement,
|
||||
// gestureName:'long-press',
|
||||
// onStart: () => { alert('OP') },
|
||||
// /* onMove () => {
|
||||
// console.log('Move');
|
||||
// }, */
|
||||
// onEnd: () => {
|
||||
// console.log('ENNNNNDS');
|
||||
// },
|
||||
// })
|
||||
|
||||
gesture.enable();
|
||||
// gesture.enable();
|
||||
}
|
||||
|
||||
handlePress(id?:string){
|
||||
@@ -275,6 +283,8 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
}
|
||||
|
||||
viewDocument(file:any){
|
||||
console.log(file);
|
||||
|
||||
if(file.type == "file"){
|
||||
let fullUrl = "https://www.tabularium.pt" + file.title_link;
|
||||
this.fileService.viewDocumentByUrl(fullUrl);
|
||||
@@ -285,17 +295,80 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
}
|
||||
}
|
||||
|
||||
docIndex(index: number){
|
||||
this.dicIndex = index
|
||||
}
|
||||
|
||||
async openViewDocumentModal(file:any){
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewDocumentPage,
|
||||
componentProps: {
|
||||
file: file,
|
||||
},
|
||||
cssClass: 'modal modal-desktop',
|
||||
backdropDismiss: false
|
||||
console.log(file);
|
||||
const docId = file.DocId;
|
||||
const applicationId: any = file.ApplicationId;
|
||||
|
||||
this.processes.GetDocumentDetails(docId, applicationId).subscribe( async(res)=> {
|
||||
|
||||
this.LoadedDocument = res;
|
||||
this.LoadedDocument.Subject = this.LoadedDocument.Assunto
|
||||
|
||||
let thedate = new Date(this.LoadedDocument.DateDispatch || this.LoadedDocument.DocDate);
|
||||
//this.customDate = this.days[thedate.getDay()]+ ", " + thedate.getDate() +" de " + ( this.months[thedate.getMonth()]);
|
||||
|
||||
let task: ExpedientTaskModalPageNavParamsTask
|
||||
let document: SearchDocumentDetails = this.LoadedDocument
|
||||
let folder: SearchFolderDetails = this.LoadedDocument
|
||||
|
||||
if(this.LoadedDocument.ApplicationID == 361 || this.LoadedDocument.ApplicationId == 361) {
|
||||
task = {
|
||||
serialNumber: folder.DispatchNumber,
|
||||
taskStartDate: folder.DateDispatch,
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FolderID: folder['FolderId'] || folder['FolderID'] || folder.folderId,
|
||||
Subject: folder.Assunto,
|
||||
SourceSecFsID: folder.ApplicationID || folder['ApplicationId'],
|
||||
SourceType: 'FOLDER',
|
||||
SourceID: folder.folderId,
|
||||
DispatchNumber: folder.DispatchNumber
|
||||
},
|
||||
}
|
||||
}
|
||||
else if (document.ApplicationID == 8 || document.ApplicationId == 8)
|
||||
{
|
||||
task = {
|
||||
serialNumber: document.DocId,
|
||||
taskStartDate: document.DocDate,
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FolderID: null,
|
||||
Subject: document.Assunto,
|
||||
DispatchNumber: null,
|
||||
SourceSecFsID: document.ApplicationID || document.ApplicationId,
|
||||
SourceType: 'DOC',
|
||||
SourceID: document.DocId,
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.log('unexpected ApplicationID')
|
||||
}
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewDocumentPage,
|
||||
componentProps: {
|
||||
trustedUrl: '',
|
||||
file: {
|
||||
title: task.workflowInstanceDataFields.Subject,
|
||||
url: '',
|
||||
title_link: '',
|
||||
},
|
||||
Document: this.LoadedDocument,
|
||||
applicationId: document.ApplicationID || document.ApplicationId,
|
||||
docId: document.ApplicationID || document.ApplicationId,
|
||||
folderId: folder['FolderId'] || folder['FolderID'] || folder.folderId
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
await modal.present();
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
getChatMembers() {
|
||||
@@ -401,6 +474,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
}
|
||||
|
||||
async openChatOptions(ev?: any) {
|
||||
const roomId = this.roomId
|
||||
console.log(this.members);
|
||||
|
||||
const popover = await this.popoverController.create({
|
||||
@@ -421,11 +495,11 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
this.bookMeeting();
|
||||
}
|
||||
else if(res['data'] == 'take-picture'){
|
||||
this.fileService.addCameraPictureToChat(this.roomId);
|
||||
this.fileService.addCameraPictureToChat(roomId);
|
||||
//this.loadPicture();
|
||||
}
|
||||
else if(res['data'] == 'add-picture'){
|
||||
this.fileService.addPictureToChat(this.roomId);
|
||||
this.fileService.addPictureToChatMobile(roomId);
|
||||
//this.loadPicture();
|
||||
}
|
||||
else if(res['data'] == 'add-document'){
|
||||
|
||||
Reference in New Issue
Block a user