mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
Generated
-5
@@ -10599,11 +10599,6 @@
|
||||
"recursive-readdir": "^2.2.2"
|
||||
}
|
||||
},
|
||||
"cordova-plugin-camera": {
|
||||
"version": "git+https://github.com/PieterVanPoyer/cordova-plugin-camera.git#3911ae8a5a7a21a7bef8c80acd7dc4bb65a2163a",
|
||||
"from": "git+https://github.com/PieterVanPoyer/cordova-plugin-camera.git#bugfix/issue-665-save-instance-restore-bug",
|
||||
"dev": true
|
||||
},
|
||||
"cordova-plugin-compat": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/cordova-plugin-compat/-/cordova-plugin-compat-1.2.0.tgz",
|
||||
|
||||
+2
-4
@@ -130,7 +130,6 @@
|
||||
"cordova-ios": "^6.2.0",
|
||||
"cordova-plugin-androidx": "^3.0.0",
|
||||
"cordova-plugin-androidx-adapter": "^1.1.3",
|
||||
"cordova-plugin-camera": "git+https://github.com/PieterVanPoyer/cordova-plugin-camera.git#bugfix/issue-665-save-instance-restore-bug",
|
||||
"cordova-plugin-compat": "^1.2.0",
|
||||
"cordova-plugin-device": "^2.0.2",
|
||||
"cordova-plugin-dialogs": "^2.0.2",
|
||||
@@ -181,8 +180,7 @@
|
||||
"cordova-plugin-mfp-jsonstore": {},
|
||||
"cordova-plugin-ionic-webview": {},
|
||||
"cordova-plugin-screen-orientation": {},
|
||||
"cordova-plugin-network-information": {},
|
||||
"cordova-plugin-camera": {}
|
||||
"cordova-plugin-network-information": {}
|
||||
},
|
||||
"platforms": [
|
||||
"browser",
|
||||
@@ -195,4 +193,4 @@
|
||||
"url": "git+https://Kayaya@bitbucket.org/equilibriumito/gabinete-digital.git"
|
||||
},
|
||||
"license": "ISC"
|
||||
}
|
||||
}
|
||||
@@ -199,6 +199,10 @@ const routes = [
|
||||
{
|
||||
path: 'view-document',
|
||||
loadChildren: () => import('./modals/view-document/view-document.module').then( m => m.ViewDocumentPageModule)
|
||||
},
|
||||
{
|
||||
path: 'event-details-documents-options',
|
||||
loadChildren: () => import('./shared/popover/event-details-documents-options/event-details-documents-options.module').then( m => m.EventDetailsDocumentsOptionsPageModule)
|
||||
},
|
||||
|
||||
|
||||
|
||||
@@ -58,11 +58,10 @@
|
||||
</ion-label>
|
||||
|
||||
<ion-label
|
||||
(click)="viewDocument()"
|
||||
*ngIf="LoadedDocument.ApplicationId == 361 || LoadedDocument.ApplicationID == 361"
|
||||
>
|
||||
<div *ngFor="let Document of LoadedDocument.Documents">
|
||||
<div class="attach-title-item">
|
||||
<div *ngFor="let Document of LoadedDocument.Documents; let i = index">
|
||||
<div class="attach-title-item" (click)="docIndex(i);viewDocumentModal()">
|
||||
{{Document.Assunto}}
|
||||
</div>
|
||||
<div *ngIf="Document.Sender" class="d-flex justify-between" style="justify-content: space-between">
|
||||
@@ -76,7 +75,6 @@
|
||||
</ion-list>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="LoadedDocument" class="aside-right flex-column height-100">
|
||||
<div class="buttons">
|
||||
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0')" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
|
||||
@@ -10,6 +10,7 @@ import { ExpedientTaskModalPageNavParamsTask } from 'src/app/models/ExpedientTas
|
||||
import { PermissionService } from 'src/app/services/worker/permission.service';
|
||||
import { SearchedDocumentOptionsPage } from 'src/app/shared/popover/searched-document-options/searched-document-options.page';
|
||||
import { Location } from '@angular/common';
|
||||
import { ViewDocumentPage } from '../view-document/view-document.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-document-detail',
|
||||
@@ -31,6 +32,8 @@ export class DocumentDetailPage implements OnInit {
|
||||
document: SearchDocumentDetails
|
||||
|
||||
task: ExpedientTaskModalPageNavParamsTask;
|
||||
DocumentTask: ExpedientTaskModalPageNavParamsTask;
|
||||
dicIndex = 0;
|
||||
|
||||
constructor(
|
||||
private navParams: NavParams,
|
||||
@@ -69,51 +72,121 @@ export class DocumentDetailPage implements OnInit {
|
||||
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
|
||||
},
|
||||
}
|
||||
// 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,
|
||||
}
|
||||
}
|
||||
// task = {
|
||||
// serialNumber: document.DocId,
|
||||
// taskStartDate: document.DocDate,
|
||||
// isEvent: true,
|
||||
// workflowInstanceDataFields: {
|
||||
// FolderID: null,
|
||||
// Subject: document.Assunto,
|
||||
// DispatchNumber: null,
|
||||
// SourceSecFsID: document.ApplicationID || document.folderId,
|
||||
// SourceType: 'DOC',
|
||||
// SourceID: document.DocId,
|
||||
// }
|
||||
// }
|
||||
} else {
|
||||
console.log('unexpected ApplicationID')
|
||||
}
|
||||
|
||||
this.task = task
|
||||
console.log('this.task = task', this.task)
|
||||
|
||||
task = {
|
||||
serialNumber: '',
|
||||
taskStartDate: '',
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FolderID: '',
|
||||
Subject: this.LoadedDocument.SourceName || this.LoadedDocument.Assunto,
|
||||
SourceSecFsID: this.LoadedDocument.ApplicationId || this.LoadedDocument.ApplicationID,
|
||||
SourceType: 'DOC',
|
||||
SourceID: this.LoadedDocument.DocId || this.LoadedDocument.SourceId || this.LoadedDocument['folderId'],
|
||||
DispatchNumber: ''
|
||||
}
|
||||
}
|
||||
|
||||
this.DocumentTask = Object.assign(task, res)
|
||||
console.log('this.DocumentTask = DocumentTask', this.DocumentTask)
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
viewDocument() {
|
||||
this.processes.GetDocumentUrl(this.docId, '8').subscribe(res=>{
|
||||
console.log(res);
|
||||
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
const browser = this.iab.create(url,"_blank");
|
||||
browser.show();
|
||||
async viewDocument() {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewDocumentPage,
|
||||
componentProps: {
|
||||
trustedUrl: '',
|
||||
file: {
|
||||
title: this.LoadedDocument.Assunto,
|
||||
url: '',
|
||||
title_link: '',
|
||||
},
|
||||
Document: this.LoadedDocument.Documents,
|
||||
applicationId: this.DocumentTask.workflowInstanceDataFields.SourceSecFsID,
|
||||
docId: this.DocumentTask.workflowInstanceDataFields.SourceID,
|
||||
task: this.DocumentTask
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
await modal.present();
|
||||
|
||||
}
|
||||
|
||||
docIndex(index: number) {
|
||||
this.dicIndex = index;
|
||||
}
|
||||
|
||||
async viewDocumentModal() {
|
||||
|
||||
const selectedDoc = this.LoadedDocument.Documents[ this.dicIndex]
|
||||
|
||||
this.task = {
|
||||
serialNumber: '',
|
||||
taskStartDate: '',
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FolderID: '',
|
||||
Subject: selectedDoc.SourceName || selectedDoc.Assunto,
|
||||
SourceSecFsID: selectedDoc.ApplicationId || selectedDoc.ApplicationID,
|
||||
SourceType: 'DOC',
|
||||
SourceID: selectedDoc.DocId || selectedDoc.SourceId,
|
||||
DispatchNumber: ''
|
||||
}
|
||||
}
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewDocumentPage,
|
||||
componentProps: {
|
||||
trustedUrl: '',
|
||||
file: {
|
||||
title: this.task.workflowInstanceDataFields.Subject,
|
||||
url: '',
|
||||
title_link: '',
|
||||
},
|
||||
Document: this.LoadedDocument.Documents[ this.dicIndex],
|
||||
applicationId: this.task.workflowInstanceDataFields.SourceSecFsID,
|
||||
docId: this.task.workflowInstanceDataFields.SourceID ,
|
||||
folderId: '',
|
||||
task: this.task
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
openMenu() {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { Event } from 'src/app/models/event.model'
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||
import { SearchDocumentDetails, SearchFolderDetails, SearchFolderDetailsDocuments, SearchList } from 'src/app/models/search-document';
|
||||
import { SearchDocumentDetails, SearchFolderDetails, SearchList } from 'src/app/models/search-document';
|
||||
import { LoginUserRespose } from 'src/app/models/user.model';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
|
||||
@@ -14,7 +14,6 @@ import * as _moment from 'moment';
|
||||
import * as _rollupMoment from 'moment';
|
||||
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
||||
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||
import { DocumentService } from 'src/app/Rules/document.service';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { EventService } from 'src/app/services/rules/event.service';
|
||||
import { EventPipe } from 'src/app/pipes/event.pipe';
|
||||
@@ -62,7 +61,6 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
||||
EventRecurrenceType = '-1'
|
||||
showLoader = false
|
||||
|
||||
|
||||
@ViewChild('picker') picker: any;
|
||||
@ViewChild('fim') fim: any;
|
||||
@ViewChild('inicio') inicio: any;
|
||||
@@ -97,34 +95,30 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
||||
private navParams: NavParams,
|
||||
authService: AuthService,
|
||||
private toastService: ToastService,
|
||||
private documentService: DocumentService,
|
||||
private calendarService: EventsService,
|
||||
private eventService: EventService
|
||||
) {
|
||||
) {
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
this.document = this.navParams.get('document')
|
||||
this.subject = this.navParams.get('subject')
|
||||
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
this.document = this.navParams.get('document')
|
||||
this.subject = this.navParams.get('subject')
|
||||
this.postData = new Event();
|
||||
this.postData.Body ={ BodyType : "1", Text : ""};
|
||||
|
||||
this.postData = new Event();
|
||||
this.postData.Body ={ BodyType : "1", Text : ""};
|
||||
this.postData.Subject = this.subject
|
||||
this.postData.CalendarName = "Oficial";
|
||||
|
||||
this.postData.Subject = this.subject
|
||||
this.postData.CalendarName = "Oficial";
|
||||
|
||||
this.postData.Category = 'Reunião'
|
||||
this.postData.Category = 'Reunião'
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.adding = "intervenient";
|
||||
this.setDefaultTime()
|
||||
this.getRecurrenceTypes();
|
||||
console.log(this.document);
|
||||
|
||||
}
|
||||
|
||||
getRecurrenceTypes() {
|
||||
this.calendarService.getRecurrenceTypes().subscribe(res=>{
|
||||
this.calendarService.getRecurrenceTypes().subscribe( res=> {
|
||||
this.recurringTypes = res;
|
||||
});
|
||||
}
|
||||
@@ -178,43 +172,12 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
||||
|
||||
let Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
||||
|
||||
var Attachments: addAttachment[] = []
|
||||
let folder: SearchFolderDetails = this.document
|
||||
let document: SearchDocumentDetails = this.document
|
||||
|
||||
/* if(folder.Documents) {
|
||||
this.document.Documents.forEach( (_folder: SearchFolderDetailsDocuments) => {
|
||||
Attachments.push({
|
||||
ApplicationId: 361,
|
||||
Source: 1,
|
||||
SourceId: _folder['docID'] || _folder['docId'] || _folder.DocId,
|
||||
SourceTitle: _folder.Assunto,
|
||||
})
|
||||
});
|
||||
} else {
|
||||
Attachments.push({
|
||||
ApplicationId: 8,
|
||||
Source: 1,
|
||||
SourceId: document['docID'] || document['docId'] || document.DocId,
|
||||
SourceTitle: document.Assunto
|
||||
})
|
||||
}
|
||||
|
||||
this.attachments.forEach((e)=> {
|
||||
Attachments.push({
|
||||
ApplicationId: e.ApplicationType,
|
||||
Source: 1,
|
||||
SourceId: e.Id,
|
||||
SourceTitle: e.Assunto
|
||||
})
|
||||
}) */
|
||||
|
||||
if(this.document.Documents){
|
||||
this.document.Documents.forEach((e)=> {
|
||||
this.docs.push({
|
||||
ApplicationId: e.ApplicationId || e.ApplicationType,
|
||||
Source: 1,
|
||||
SourceId: e.DocId || e.docID || e.docId,
|
||||
SourceId: e.DocId || e.docID || e.docId || e.SourceId,
|
||||
SourceName: e.Assunto
|
||||
})
|
||||
})
|
||||
@@ -223,13 +186,11 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
||||
this.docs.push({
|
||||
ApplicationId: this.document.ApplicationId || this.document.ApplicationType,
|
||||
Source: 1,
|
||||
SourceId: this.document.DocId || this.document.docID || this.document.docId,
|
||||
SourceId: this.document.DocId || this.document.docID || this.document.docId || this.document.SourceId,
|
||||
SourceName: this.document.Assunto
|
||||
})
|
||||
}
|
||||
|
||||
console.log(this.docs);
|
||||
|
||||
let postEvent = {
|
||||
EventId: '',
|
||||
Subject: this.postData.Subject,
|
||||
@@ -255,28 +216,17 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
||||
Attachments: this.docs,
|
||||
}
|
||||
|
||||
console.log(postEvent);
|
||||
|
||||
|
||||
const laoder = this.toastService.loading()
|
||||
|
||||
this.eventService.create({ body: postEvent, calendar: this.postData.CalendarName }).subscribe(async (respose) => {
|
||||
const res: any = respose;
|
||||
const eventId: string = res
|
||||
|
||||
/* const DocumentToSave = this.attachments.map((e) => {
|
||||
return this.eventPipe.AttactSearchResult(e, eventId, {})
|
||||
});
|
||||
|
||||
await DocumentToSave.forEach(async (attachments, i) => {
|
||||
await this.eventService.addAttachment(attachments).toPromise();
|
||||
}); */
|
||||
|
||||
this.toastService.successMessage('Reunião criada')
|
||||
laoder.remove()
|
||||
this.toastService.successMessage('Reunião criada')
|
||||
this.modalController.dismiss()
|
||||
},(error) => {
|
||||
}, (error) => {
|
||||
laoder.remove()
|
||||
this.toastService.badRequest('Não foi possível marcar a reunião');
|
||||
}, ()=>{
|
||||
laoder.remove()
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
<ion-toolbar class="d-flex">
|
||||
<div class="d-flex align-items-center px-20 pt-20 font-25">
|
||||
<div class="left cursor-pointer" (click)="close()">
|
||||
<!-- <ion-icon class="font-35" src="assets/images/icons-arrow-arrow-left.svg"></ion-icon> -->
|
||||
<fa-icon icon="chevron-left" class="menu-icon"></fa-icon>
|
||||
</div>
|
||||
|
||||
@@ -10,7 +9,7 @@
|
||||
{{file.title}}
|
||||
</div>
|
||||
|
||||
<div class="right cursor-pointer">
|
||||
<div class="right cursor-pointer" (click)="openOptions()">
|
||||
<fa-icon icon="ellipsis-v" class="menu-icon"></fa-icon>
|
||||
</div>
|
||||
|
||||
@@ -19,7 +18,12 @@
|
||||
</ion-header>
|
||||
|
||||
<ion-content class="pt-10 height-100">
|
||||
<div class="height-100">
|
||||
<div class="height-100" *ngIf="trustedUrl">
|
||||
<iframe id="iframe" [src]="trustedUrl" height="100%" width="100%" title="Iframe Example"></iframe>
|
||||
</div>
|
||||
|
||||
<div *ngIf="!trustedUrl" class=" height-100 width-100 d-flex align-center justify-center">
|
||||
<img src="/assets/images/Blocks-loader.gif" />
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
|
||||
import { ExpedientTaskModalPageNavParamsTask } from 'src/app/models/ExpedientTaskModalPage';
|
||||
import { SearchDocumentDetails, SearchFolderDetails } from 'src/app/models/search-document';
|
||||
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { EventDetailsDocumentsOptionsPage } from 'src/app/shared/popover/event-details-documents-options/event-details-documents-options.page';
|
||||
import { DocumentSetUpMeetingPage } from '../document-set-up-meeting/document-set-up-meeting.page';
|
||||
8
|
||||
@Component({
|
||||
selector: 'app-view-document',
|
||||
templateUrl: './view-document.page.html',
|
||||
@@ -13,28 +19,108 @@ export class ViewDocumentPage implements OnInit {
|
||||
a:string = "https://equilibrium.dyndns.info/FileShare/pdfjs/web/viewer.html?file=";
|
||||
viewerUrl: string;
|
||||
trustedUrl: any;
|
||||
file:any;
|
||||
file: any;
|
||||
applicationId: any;
|
||||
docId: any
|
||||
task: ExpedientTaskModalPageNavParamsTask;
|
||||
Document: any
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
private navParams: NavParams,
|
||||
private sanitazer: DomSanitizer,
|
||||
private processes: ProcessesService,
|
||||
) {
|
||||
|
||||
this.file = this.navParams.get('file');
|
||||
this.url = this.file.title_link;
|
||||
console.log(this.url);
|
||||
this.applicationId = this.navParams.get('applicationId');
|
||||
this.docId = this.navParams.get('docId');
|
||||
this.Document = this.navParams.get('Document')
|
||||
this.task = this.navParams.get('task')
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.viewerUrl = this.url.replace("webTRIX.Viewer.Branch1/pdfjs/web/viewpdf.aspx?file=/webTRIX.Viewer.Branch1/arq/637690403731947760.pdf&i", "FileShare/pdfjs/web/viewer.html?file");
|
||||
this.trustedUrl = this.sanitazer.bypassSecurityTrustResourceUrl(this.viewerUrl);
|
||||
console.log(this.trustedUrl);
|
||||
|
||||
this.processes.GetViewer(this.docId, this.applicationId).subscribe(res=>{
|
||||
const link: string = res
|
||||
this.trustedUrl = this.sanitazer.bypassSecurityTrustResourceUrl(link);
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
close() {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
async openOptions() {
|
||||
const modal = await this.modalController.create({
|
||||
component: EventDetailsDocumentsOptionsPage,
|
||||
cssClass: 'model aside-modal search-submodal',
|
||||
componentProps: {
|
||||
fulltask: this.task,
|
||||
task: this.task
|
||||
}
|
||||
});
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then((res)=>{
|
||||
if(res.data.component == 'openBookMeetingModal') {
|
||||
this.openBookMeetingModal()
|
||||
} else if(res.data.component == 'openExpedientActionsModal') {
|
||||
this.openExpedientActionsModal(res.data.taskAction)
|
||||
} else {
|
||||
console.log('component not found')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
async openBookMeetingModal() {
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth < 701) {
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: DocumentSetUpMeetingPage,
|
||||
componentProps: {
|
||||
subject: this.task.workflowInstanceDataFields.Subject,
|
||||
document: this.Document,
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
//this.location.back();
|
||||
});
|
||||
}
|
||||
|
||||
// efetuar despacho
|
||||
|
||||
async openExpedientActionsModal( taskAction: any) {
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth < 701) {
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: ExpedientTaskModalPage,
|
||||
componentProps: {
|
||||
taskAction: taskAction,
|
||||
task: this.task,
|
||||
seachDocuments: this.Document,
|
||||
aplicationId: this.Document.ApplicationId || this.Document.ApplicationID
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then( async(res)=>{});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -488,192 +488,91 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
this.showLoader = true;
|
||||
|
||||
if(window.innerWidth < 800){
|
||||
// mobile only
|
||||
if(window.innerWidth < 800) {
|
||||
|
||||
// this.showTimeline = false;
|
||||
// view MDGPR calendar with MDGPR profile
|
||||
if(this.profile == "mdgpr" && this.loggeduser.Profile == 'MDGPR' ) {
|
||||
this.eventService.getAllMdEvents( momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59') ).then(
|
||||
|
||||
switch (this.segment) {
|
||||
case "Combinado":
|
||||
//Inicializa o array eventSource
|
||||
(response:any) => {
|
||||
|
||||
if(this.profile == "mdgpr" && this.loggeduser.Profile == 'MDGPR' ) {
|
||||
this.eventService.getAllMdEvents( momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59') ).then(
|
||||
// calendar
|
||||
this.CalendarStore.removeRange(startTime, endTime, 'md')
|
||||
|
||||
(response:any) => {
|
||||
// loop
|
||||
this.CalendarStore.pushEvent(response, 'md');
|
||||
|
||||
// calendar
|
||||
this.CalendarStore.removeRange(startTime, endTime, 'md')
|
||||
this.TimelineMDList = this.listBoxService.list(this.CalendarStore.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
|
||||
// loop
|
||||
this.CalendarStore.pushEvent(response, 'md');
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.CalendarStore.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
this.showLoader = false;
|
||||
this.showTimeline = true;
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
this.showLoader = false;
|
||||
this.showTimeline = true;
|
||||
|
||||
}).finally(()=>{
|
||||
this.showLoader = false;
|
||||
})
|
||||
|
||||
}
|
||||
else if(this.profile == "pr" && this.loggeduser.Profile == 'MDGPR') {
|
||||
|
||||
this.eventService.getAllSharedEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).then((response:any) => {
|
||||
|
||||
this.CalendarStore.removeRange(startTime, endTime, 'pr')
|
||||
// calendar
|
||||
this.CalendarStore.pushEvent(response, 'pr');
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.CalendarStore.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
this.showLoader = false;
|
||||
this.showTimeline = true;
|
||||
|
||||
}).finally(()=>{
|
||||
this.showLoader = false;
|
||||
})
|
||||
|
||||
}
|
||||
else if(this.loggeduser.Profile == 'PR') {
|
||||
this.eventService.getAllPrEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).then(
|
||||
(response:any) => {
|
||||
|
||||
// clear the current month only
|
||||
this.CalendarStore.removeRange(startTime, endTime, 'pr')
|
||||
|
||||
this.CalendarStore.pushEvent(response, 'pr');
|
||||
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.CalendarStore.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
this.showLoader = false;
|
||||
this.showTimeline = true;
|
||||
|
||||
|
||||
}).finally(()=>{
|
||||
this.showLoader = false;
|
||||
})
|
||||
}
|
||||
break;
|
||||
|
||||
case "Pessoal":
|
||||
//Inicializa o array eventSource
|
||||
if(this.profile == "mdgpr" && this.loggeduser.Profile == 'MDGPR') {
|
||||
this.eventService.getAllMdPessoalEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).then((response:any) => {
|
||||
|
||||
this.CalendarStore.removeRange(startTime, endTime, 'md')
|
||||
|
||||
const eventsList = response.filter(data => data.CalendarName == "Pessoal");
|
||||
// loop
|
||||
this.CalendarStore.pushEvent(eventsList, 'md');
|
||||
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.CalendarStore.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
this.showLoader = false;
|
||||
this.showTimeline = true;
|
||||
}).finally(()=>{
|
||||
this.showLoader = false;
|
||||
})
|
||||
|
||||
}
|
||||
else{
|
||||
this.eventService.getAllPrEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).then((response:any) => {
|
||||
|
||||
this.CalendarStore.removeRange(startTime, endTime, 'pr')
|
||||
|
||||
const eventsList = response.filter(data => data.CalendarName == "Pessoal");
|
||||
this.CalendarStore.pushEvent(eventsList, 'pr');
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.CalendarStore.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
this.TimelinePRList = this.listBoxService.list(this.CalendarStore.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
this.showLoader = false;
|
||||
this.showTimeline = true;
|
||||
|
||||
}).finally(()=>{
|
||||
this.showLoader = false;
|
||||
})
|
||||
}
|
||||
break;
|
||||
|
||||
case "Oficial":
|
||||
|
||||
//Inicializa o array eventSource
|
||||
const eventsList = [];
|
||||
|
||||
if(this.profile == "mdgpr" && this.loggeduser.Profile == 'MDGPR') {
|
||||
this.eventService.getAllMdEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).then((res:any) => {
|
||||
|
||||
this.CalendarStore.removeRange(startTime, endTime, 'md')
|
||||
|
||||
const eventsList = res.filter(data => data.CalendarName == "Oficial");
|
||||
|
||||
this.CalendarStore.pushEvent(eventsList, 'md');
|
||||
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.CalendarStore.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, {})
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
this.showLoader = false;
|
||||
this.showTimeline = true;
|
||||
|
||||
}).finally(()=>{
|
||||
this.showLoader = false;
|
||||
})
|
||||
} else {
|
||||
this.eventService.getAllPrEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).then((res:any) => {
|
||||
|
||||
// this.eventSource=[];
|
||||
|
||||
this.CalendarStore.removeRange(startTime, endTime, 'pr')
|
||||
|
||||
const eventsList = res.filter(data => data.CalendarName == "Oficial");
|
||||
this.CalendarStore.pushEvent(eventsList, 'pr');
|
||||
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.CalendarStore.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
this.TimelinePRList = this.listBoxService.list(this.CalendarStore.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
this.showLoader = false;
|
||||
this.showTimeline = true;
|
||||
|
||||
}).finally(()=>{
|
||||
this.showLoader = false;
|
||||
})
|
||||
}
|
||||
break;
|
||||
}).finally(()=>{
|
||||
this.showLoader = false;
|
||||
})
|
||||
|
||||
}
|
||||
// view PR calendar with MDGPR profile
|
||||
else if(this.profile == "pr" && this.loggeduser.Profile == 'MDGPR') {
|
||||
|
||||
this.eventService.getAllSharedEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).then((response:any) => {
|
||||
|
||||
this.CalendarStore.removeRange(startTime, endTime, 'pr')
|
||||
// calendar
|
||||
this.CalendarStore.pushEvent(response, 'pr');
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.CalendarStore.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
this.showLoader = false;
|
||||
this.showTimeline = true;
|
||||
|
||||
}).finally(()=>{
|
||||
this.showLoader = false;
|
||||
})
|
||||
|
||||
}
|
||||
// view PR calendar with PR profile
|
||||
else if(this.loggeduser.Profile == 'PR') {
|
||||
this.eventService.getAllPrEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).then(
|
||||
(response:any) => {
|
||||
|
||||
// clear the current month only
|
||||
// response == september
|
||||
// startTime = 1, endTime = 31
|
||||
this.CalendarStore.removeRange(startTime, endTime, 'pr')
|
||||
this.CalendarStore.pushEvent(response, 'pr');
|
||||
|
||||
// this.CalendarStore.eventSource
|
||||
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.CalendarStore.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
this.showLoader = false;
|
||||
this.showTimeline = true;
|
||||
|
||||
|
||||
}).finally(()=>{
|
||||
this.showLoader = false;
|
||||
})
|
||||
}
|
||||
|
||||
} else {
|
||||
// calendar
|
||||
// Desktop only
|
||||
|
||||
let counter = 0;
|
||||
|
||||
// view MDGPR calendar with MDGPR profile
|
||||
if(this.loggeduser.Profile == 'MDGPR') {
|
||||
|
||||
this.eventService.getAllMdEvents( momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59') ).then( (response:any) => {
|
||||
@@ -736,6 +635,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
} else {
|
||||
|
||||
// view PR calendar with PR profile
|
||||
this.eventService.getAllPrEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).then((response:any) => {
|
||||
|
||||
let eventsList;
|
||||
@@ -779,7 +679,6 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
updateEventListBox() {
|
||||
|
||||
|
||||
if(window.innerWidth < 800){
|
||||
|
||||
switch (this.segment) {
|
||||
|
||||
@@ -86,8 +86,8 @@
|
||||
<h5>Documentos Anexados</h5>
|
||||
<ion-list class="width-100">
|
||||
<ion-item *ngFor="let attach of loadedEvent.Attachments; let i = index" class="width-100" class="ion-no-margin ion-no-padding">
|
||||
<ion-label class="width-100 d-flex " >
|
||||
<p class="flex-grow-1" (click)="viewDocument(attach.SourceId)">
|
||||
<ion-label class="width-100 d-flex " (click)="docIndex(i);LoadDocumentDetails()">
|
||||
<p class="flex-grow-1" >
|
||||
<span class="attach-title-item d-block">{{attach.SourceName}}</span>
|
||||
<span class="span-left d-block">{{attach.Stakeholders}}</span>
|
||||
</p>
|
||||
@@ -96,7 +96,7 @@
|
||||
<span class="span-right">{{ attach.CreateDate | date: 'dd-MM-yyyy HH:mm' }}</span>
|
||||
</div>
|
||||
|
||||
<div (click)="docIndex(i);openTaskOptions()" class="cursor-pointer" style="width: 35px; height: 41px;" autoHide="false">
|
||||
<div (click)="docIndex(i);LoadDocumentDetails()" class="cursor-pointer" style="width: 35px; height: 41px;" autoHide="false">
|
||||
<ion-icon src="assets/images/icons-menu.svg" ></ion-icon>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -12,6 +12,13 @@ import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { EliminateEventPage } from 'src/app/modals/eliminate-event/eliminate-event.page';
|
||||
import { Location } from '@angular/common'
|
||||
import { ExpedientTaskModalPageNavParamsTask } from 'src/app/models/ExpedientTaskModalPage';
|
||||
import { SearchDocumentDetails, SearchFolderDetails } from 'src/app/models/search-document';
|
||||
import { EventDetailsDocumentsOptionsPage } from 'src/app/shared/popover/event-details-documents-options/event-details-documents-options.page';
|
||||
import { SearchedDocumentOptionsPage } from 'src/app/shared/popover/searched-document-options/searched-document-options.page';
|
||||
import { DocumentSetUpMeetingPage } from 'src/app/modals/document-set-up-meeting/document-set-up-meeting.page';
|
||||
import { ExpedientTaskModalPage } from '../../gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-view-event',
|
||||
@@ -42,6 +49,8 @@ export class ViewEventPage implements OnInit {
|
||||
dicIndex = 0;
|
||||
isModal = false
|
||||
header = true
|
||||
task: ExpedientTaskModalPageNavParamsTask;
|
||||
LoadedDocument:any = null;
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
@@ -257,47 +266,124 @@ export class ViewEventPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
viewDocument(sourceId){
|
||||
this.processes.GetDocumentUrl(sourceId, '8').subscribe(res=>{
|
||||
/* console.log(res); */
|
||||
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
const browser = this.iab.create(url,"_blank");
|
||||
browser.show();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
async openTaskOptions() {
|
||||
|
||||
const doc = this.loadedAttachments[this.dicIndex];
|
||||
|
||||
let customTask = {
|
||||
serialNumber: doc.SourceId,
|
||||
taskStartDate: doc.CreateDate,
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FsId: doc.ApplicationId,
|
||||
FolderID: null,
|
||||
DocId: doc.SourceId,
|
||||
Subject: doc.SourceName
|
||||
},
|
||||
}
|
||||
|
||||
const popover = await this.popoverController.create({
|
||||
component: OptsExpedientePage,
|
||||
cssClass: 'exp-options',
|
||||
componentProps: {
|
||||
fulltask: customTask,
|
||||
task: customTask
|
||||
},
|
||||
translucent: true
|
||||
});
|
||||
return await popover.present();
|
||||
}
|
||||
|
||||
|
||||
docIndex(index: number){
|
||||
this.dicIndex = index
|
||||
}
|
||||
|
||||
async LoadDocumentDetails() {
|
||||
|
||||
const docId = this.loadedEvent.Attachments[ this.dicIndex].SourceId
|
||||
const applicationId: any = this.loadedEvent.Attachments[ this.dicIndex].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();
|
||||
});
|
||||
}
|
||||
|
||||
async openBookMeetingModal() {
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth < 701) {
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: DocumentSetUpMeetingPage,
|
||||
componentProps: {
|
||||
subject: this.task.workflowInstanceDataFields.Subject,
|
||||
document: this.loadedEvent.Attachments[ this.dicIndex],
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
//this.location.back();
|
||||
});
|
||||
}
|
||||
|
||||
// efetuar despacho
|
||||
async openExpedientActionsModal( taskAction: any) {
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth < 701) {
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
const modal = await this.modalController.create({
|
||||
component: ExpedientTaskModalPage,
|
||||
componentProps: {
|
||||
taskAction: taskAction,
|
||||
task: this.task,
|
||||
seachDocuments: this.loadedEvent.Attachments[ this.dicIndex],
|
||||
aplicationId: this.loadedEvent.Attachments[ this.dicIndex].ApplicationId || this.loadedEvent.Attachments[ this.dicIndex]['ApplicationID']
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then( async(res)=>{});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -190,8 +190,6 @@ export class EditEventPage implements OnInit {
|
||||
|
||||
loadAttachments()
|
||||
{
|
||||
/* console.log(this.pageId); */
|
||||
|
||||
this.attachamentsService.getAttachmentsById(this.pageId).subscribe(res => {
|
||||
this.loadedEventAttachments = res;
|
||||
console.log(res);
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<ion-item *ngFor="let attachment of fulltask.Documents"
|
||||
class="ion-no-margin ion-no-padding cursor-pointer">
|
||||
<ion-label
|
||||
(click)="viewDocument(attachment.DocId)">
|
||||
(click)="viewDocument(attachment.DocId, attachment)">
|
||||
<p *ngIf="attachment.Assunto" class="attach-title-item">{{ attachment.Assunto }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
<p *ngIf="!attachment.Assunto" class="attach-title-item">{{ attachment.DocNumber }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
<p><span class="span-left">{{attachment.Sender}}</span><span class="span-right">{{ attachment.DocDate | date: 'dd/MM/yy' }}</span></p>
|
||||
|
||||
@@ -18,6 +18,7 @@ import { DespachosPrOptionsPage } from 'src/app/shared/popover/despachos-pr-opti
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { Location } from '@angular/common'
|
||||
import { DespachoService } from 'src/app/Rules/despacho.service';
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-despacho-pr',
|
||||
@@ -145,13 +146,26 @@ export class DespachoPrPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
viewDocument(docId:string){
|
||||
this.processes.GetDocumentUrl(docId, '361').subscribe(res=>{
|
||||
console.log(res);
|
||||
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
const browser = this.iab.create(url,"_blank");
|
||||
browser.show();
|
||||
async viewDocument(DocId:string, Document) {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewDocumentPage,
|
||||
componentProps: {
|
||||
trustedUrl: '',
|
||||
file: {
|
||||
title: Document.Assunto,
|
||||
url: '',
|
||||
title_link: '',
|
||||
},
|
||||
Document,
|
||||
applicationId: Document.ApplicationId,
|
||||
docId: Document.DocId || Document.SourceId,
|
||||
folderId: this.task.FolderId
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
await modal.present();
|
||||
|
||||
}
|
||||
|
||||
openMenu() {
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<ion-list>
|
||||
<h5>Documentos Anexados</h5>
|
||||
<ion-item class="ion-no-margin ion-no-padding cursor-pointer" *ngFor="let Document of fulltask.Documents">
|
||||
<ion-label class="d-block" (click)="viewDocument(Document.DocId)">
|
||||
<ion-label class="d-block" (click)="viewDocument(Document.DocId, Document)">
|
||||
<p class="attach-title-item">{{ Document.Assunto }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
<p><span class="span-left">{{ Document.Sender}}</span><span class="span-right">{{ Document.DocDate | date: 'dd/MM/yyyy HH:mm' }}</span></p>
|
||||
</ion-label>
|
||||
|
||||
@@ -17,6 +17,7 @@ import { Location } from '@angular/common'
|
||||
import { fullTask } from 'src/app/models/dailyworktask.model';
|
||||
import { AttachmentList } from 'src/app/models/Excludetask';
|
||||
import { PermissionService } from 'src/app/services/worker/permission.service';
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-despacho',
|
||||
@@ -112,6 +113,7 @@ export class DespachoPage implements OnInit {
|
||||
|
||||
async LoadTaskDetail(serial: string) {
|
||||
this.processes.GetTask(serial).subscribe( (res: fullTask) => {
|
||||
|
||||
this.task = {
|
||||
"SerialNumber": res.serialNumber,
|
||||
"Folio": res.workflowInstanceDataFields.Subject,
|
||||
@@ -158,12 +160,27 @@ export class DespachoPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
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");
|
||||
browser.show();
|
||||
async viewDocument(docId:string, Document) {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewDocumentPage,
|
||||
componentProps: {
|
||||
trustedUrl: '',
|
||||
file: {
|
||||
title: Document.Assunto,
|
||||
url: '',
|
||||
title_link: '',
|
||||
},
|
||||
Document,
|
||||
applicationId: Document.ApplicationId,
|
||||
docId: Document.DocId || Document.SourceId,
|
||||
folderId: this.task.FolderId,
|
||||
task: this.fulltask
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
await modal.present();
|
||||
|
||||
}
|
||||
|
||||
openMenu() {
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@
|
||||
class="ion-no-margin ion-no-padding cursor-pointer"
|
||||
>
|
||||
<ion-label
|
||||
(click)="viewDocument(attachment.DocId)"
|
||||
(click)="viewDocument(attachment.DocId, attachment)"
|
||||
>
|
||||
<p *ngIf="attachment.Assunto" class="attach-title-item">{{ attachment.Assunto }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
<p *ngIf="!attachment.Assunto" class="attach-title-item">{{ attachment.DocNumber }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
|
||||
+20
-6
@@ -13,6 +13,7 @@ import { SuccessMessagePage } from 'src/app/shared/popover/success-message/succe
|
||||
import { DeplomaOptionsPage } from 'src/app/shared/popover/deploma-options/deploma-options.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { Location } from '@angular/common'
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-diploma-assinar',
|
||||
@@ -134,13 +135,26 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
viewDocument(docId:string){
|
||||
this.processes.GetDocumentUrl(docId, '361').subscribe(res=>{
|
||||
console.log(res);
|
||||
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
const browser = this.iab.create(url,"_blank");
|
||||
browser.show();
|
||||
async viewDocument(DocId:string, Document) {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewDocumentPage,
|
||||
componentProps: {
|
||||
trustedUrl: '',
|
||||
file: {
|
||||
title: Document.Assunto,
|
||||
url: '',
|
||||
title_link: '',
|
||||
},
|
||||
Document,
|
||||
applicationId: Document.ApplicationId,
|
||||
docId: Document.DocId || Document.SourceId,
|
||||
folderId: this.task.FolderId
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
await modal.present();
|
||||
|
||||
}
|
||||
|
||||
getDocumentDetails(forlderId:string, applicationId:string) {
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
class="ion-no-margin ion-no-padding cursor-pointer"
|
||||
>
|
||||
<ion-label
|
||||
(click)="viewDocument(attachment.DocId)">
|
||||
(click)="viewDocument(attachment.DocId, attachment)">
|
||||
<p *ngIf="attachment.Assunto" class="attach-title-item">{{ attachment.Assunto }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
<p *ngIf="!attachment.Assunto" class="attach-title-item">{{ attachment.DocNumber }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
<p><span class="span-left">{{attachment.Sender}}</span><span class="span-right">{{ attachment.DocDate | date: 'dd/MM/yy' }}</span></p>
|
||||
|
||||
@@ -11,6 +11,7 @@ import { BookMeetingModalPage } from '../../expediente/book-meeting-modal/book-m
|
||||
import { DeplomaOptionsPage } from 'src/app/shared/popover/deploma-options/deploma-options.page';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { Location } from '@angular/common';
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-diploma',
|
||||
@@ -155,12 +156,26 @@ export class DiplomaPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
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");
|
||||
browser.show();
|
||||
async viewDocument(DocId:string, Document) {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewDocumentPage,
|
||||
componentProps: {
|
||||
trustedUrl: '',
|
||||
file: {
|
||||
title: Document.Assunto,
|
||||
url: '',
|
||||
title_link: '',
|
||||
},
|
||||
Document,
|
||||
applicationId: Document.ApplicationId,
|
||||
docId: Document.DocId || Document.SourceId,
|
||||
folderId: this.task.FolderId
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
await modal.present();
|
||||
|
||||
}
|
||||
|
||||
getDocumentDetails(forlderId:string, applicationId:string) {
|
||||
|
||||
-31
@@ -103,9 +103,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
private attachmentsService: AttachmentsService,
|
||||
private navParams: NavParams,
|
||||
private alertController: AlertService,
|
||||
private authService: AuthService,
|
||||
private userAuth: AuthService,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
private despachoService: DespachoService
|
||||
) {
|
||||
@@ -131,12 +129,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
DeadlineType: '',
|
||||
SubjectTypes: this.selectedTypes,
|
||||
NumberPDPP: this.task.workflowInstanceDataFields.DispatchNumber,
|
||||
|
||||
};
|
||||
|
||||
console.log('task 123123', this.task)
|
||||
console.log('this.aplicationId', this.aplicationId)
|
||||
|
||||
|
||||
this.postData.DispatchFolder = this.dispatchFolder;
|
||||
this.postData.UsersSelected = this.participants;
|
||||
@@ -547,28 +540,6 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
this.taskParticipantsCc = taskParticipantsCc;
|
||||
}
|
||||
|
||||
async distartExpedientModal() {
|
||||
const modal = await this.modalController.create({
|
||||
component: DiscartExpedientModalPage,
|
||||
componentProps: {
|
||||
serialNumber: this.task.serialNumber,
|
||||
folderId: this.task.workflowInstanceDataFields.FolderID,
|
||||
action: 'complete',
|
||||
},
|
||||
cssClass: 'discart-expedient-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
if(res['data']=='close'){
|
||||
console.log('Expedient Discard closed');
|
||||
this.modalController.dismiss(res['data'])
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
async setContact(data:EventPerson[]) {
|
||||
|
||||
if(this.adding == "intervenient"){
|
||||
@@ -580,8 +551,6 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
async closeComponent() {
|
||||
this.showAttendees = false;
|
||||
}
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@
|
||||
<ion-list>
|
||||
<h5>Documentos Anexados</h5>
|
||||
<ion-item class="ion-no-margin ion-no-padding cursor-pointer" *ngFor="let Document of fulltask.Documents">
|
||||
<ion-label class="d-block" (click)="viewDocument(Document.DocId)">
|
||||
<ion-label class="d-block" (click)="viewDocument(Document.DocId, Document)">
|
||||
<p class="attach-title-item">{{ Document.Assunto }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
<p><span class="span-left">{{ Document.Sender}}</span><span class="span-right">{{ Document.DocDate | date: 'dd/MM/yyyy HH:mm' }}</span></p>
|
||||
</ion-label>
|
||||
|
||||
+22
-3
@@ -23,6 +23,7 @@ import { expedienteTask } from 'src/app/models/dailyworktask.model';
|
||||
import { TaskService } from 'src/app/Rules/task.service';
|
||||
import { DocumentViewerPage } from 'src/app/modals/document-viewer/document-viewer.page';
|
||||
import { PermissionService } from 'src/app/services/worker/permission.service';
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -87,7 +88,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
}
|
||||
|
||||
showToast() {
|
||||
this.toastService.presentToast('Não foi possível fazer login"');
|
||||
this.toastService.presentToast('Não foi possível fazer login');
|
||||
}
|
||||
|
||||
|
||||
@@ -303,9 +304,27 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
async viewDocument(DocId:string) {
|
||||
async viewDocument(DocId:string, Document) {
|
||||
|
||||
this.expedienteService.viewDocument({ApplicationId:'361', DocId})
|
||||
// this.expedienteService.viewDocument({ApplicationId:'361', DocId})
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewDocumentPage,
|
||||
componentProps: {
|
||||
trustedUrl: '',
|
||||
file: {
|
||||
title: Document.Assunto,
|
||||
url: '',
|
||||
title_link: '',
|
||||
},
|
||||
Document,
|
||||
applicationId: Document.ApplicationId,
|
||||
docId: Document.DocId || Document.SourceId,
|
||||
folderId: this.task.FolderId
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
await modal.present();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<ion-list>
|
||||
<h5>Documentos Anexados</h5>
|
||||
<ion-item class="ion-no-margin ion-no-padding cursor-pointer" *ngFor="let Document of fulltask.Documents">
|
||||
<ion-label class="d-block" (click)="viewDocument(Document.DocId)">
|
||||
<ion-label class="d-block" (click)="viewDocument(Document.DocId, Document)">
|
||||
<p class="attach-title-item">{{ Document.Assunto }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
<p><span class="span-left">{{ Document.Sender}}</span><span class="span-right">{{ Document.DocDate | date: 'dd/MM/yyyy HH:mm' }}</span></p>
|
||||
</ion-label>
|
||||
|
||||
@@ -19,6 +19,7 @@ import { SearchPage } from 'src/app/pages/search/search.page';
|
||||
import { SearchList } from 'src/app/models/search-document';
|
||||
import { Location } from '@angular/common';
|
||||
import { AttachmentList } from 'src/app/models/Excludetask';
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-expediente-pr',
|
||||
@@ -195,14 +196,26 @@ export class ExpedientePrPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
viewDocument(DocId:string) {
|
||||
this.processes.GetDocumentUrl(DocId, this.task.FsId).subscribe(res=>{
|
||||
console.log(res);
|
||||
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
const browser = this.iab.create(url,"_blank");
|
||||
browser.show();
|
||||
async viewDocument(DocId:string, Document) {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewDocumentPage,
|
||||
componentProps: {
|
||||
trustedUrl: '',
|
||||
file: {
|
||||
title: Document.Assunto,
|
||||
url: '',
|
||||
title_link: '',
|
||||
},
|
||||
Document,
|
||||
applicationId: Document.ApplicationId,
|
||||
docId: Document.DocId || Document.SourceId,
|
||||
folderId: this.task.FolderId
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
await modal.present();
|
||||
|
||||
}
|
||||
|
||||
attachDocument() {
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
class="ion-no-margin ion-no-padding cursor-pointer"
|
||||
>
|
||||
<ion-label
|
||||
(click)="viewDocument(attachment.DocId)"
|
||||
(click)="viewDocument(attachment.DocId, attachment)"
|
||||
>
|
||||
<p *ngIf="attachment.Assunto" class="attach-title-item">{{ attachment.Assunto }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
<p *ngIf="!attachment.Assunto" class="attach-title-item">{{ attachment.DocNumber }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
|
||||
@@ -20,6 +20,7 @@ import { ForwardPage } from 'src/app/modals/forward/forward.page';
|
||||
import { Location } from '@angular/common';
|
||||
import { PedidoService } from 'src/app/Rules/pedido.service';
|
||||
import { PermissionService } from 'src/app/services/worker/permission.service';
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-pedido',
|
||||
@@ -178,12 +179,26 @@ export class PedidoPage implements OnInit {
|
||||
})
|
||||
}
|
||||
|
||||
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");
|
||||
browser.show();
|
||||
async viewDocument(DocId:string, Document) {
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewDocumentPage,
|
||||
componentProps: {
|
||||
trustedUrl: '',
|
||||
file: {
|
||||
title: Document.Assunto,
|
||||
url: '',
|
||||
title_link: '',
|
||||
},
|
||||
Document,
|
||||
applicationId: Document.ApplicationId,
|
||||
docId: Document.DocId || Document.SourceId,
|
||||
folderId: this.task.FolderId
|
||||
},
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
await modal.present();
|
||||
|
||||
}
|
||||
|
||||
openMenu() {
|
||||
|
||||
@@ -249,7 +249,6 @@ export class EventsService {
|
||||
}
|
||||
|
||||
|
||||
|
||||
getRecurrenceTypes(): any{
|
||||
const geturl = environment.apiURL + 'Calendar/RecurrenceTypes';
|
||||
let options = {
|
||||
@@ -259,8 +258,6 @@ export class EventsService {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
getEvents(calendarname:string, startdate:string, enddate:string): Observable<Event[]>{
|
||||
const geturl = environment.apiURL + 'calendar/GetEvents';
|
||||
let params = new HttpParams();
|
||||
|
||||
@@ -340,4 +340,21 @@ export class ProcessesService {
|
||||
return this.http.get<any>(`${url}`, options);
|
||||
}
|
||||
|
||||
|
||||
|
||||
GetViewer(DocId:string, FsId:string){
|
||||
|
||||
const geturl = environment.apiURL + 'ecm/document/viewfile';
|
||||
let params = new HttpParams();
|
||||
|
||||
params = params.set("docId", DocId);
|
||||
params = params.set("applicationId", FsId);
|
||||
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
};
|
||||
return this.http.get<any>(`${geturl}`, options);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
|
||||
<span class="date">{{loadedEvent.Location}}</span>
|
||||
|
||||
|
||||
<div *ngIf="loadedEvent.Organizer">
|
||||
<div *ngIf="loadedEvent.Organizer.Name == 'Agenda do Presidente da República' ">
|
||||
<span class="label" *ngIf="loadedEvent.CalendarName == 'Oficial' " style="background-color: #99e47b;">{{loadedEvent.CalendarName}}</span>
|
||||
@@ -82,8 +81,8 @@
|
||||
<h5>Documentos Anexados</h5>
|
||||
<ion-list class="width-100">
|
||||
<li *ngFor="let attach of loadedEvent.Attachments; let i = index" class="width-100" lines="none" class="ion-no-margin ion-no-padding pa-0">
|
||||
<ion-label class="width-100 d-flex align-center" >
|
||||
<p class="flex-grow-1" (click)="viewDocument(attach.SourceId)">
|
||||
<ion-label class="width-100 d-flex align-center" (click)="docIndex(i);LoadDocumentDetails()" >
|
||||
<p class="flex-grow-1" >
|
||||
<span class="attach-title-item d-block">{{attach.SourceName}}</span>
|
||||
<span class="span-left d-block">{{attach.Stakeholders}}</span>
|
||||
</p>
|
||||
@@ -100,6 +99,7 @@
|
||||
</li>
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
|
||||
@@ -8,11 +8,10 @@ import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { EliminateEventPage } from 'src/app/modals/eliminate-event/eliminate-event.page';
|
||||
import { SearchDocumentDetails, SearchFolderDetails } from 'src/app/models/search-document';
|
||||
import { ExpedientTaskModalPageNavParamsTask } from 'src/app/models/ExpedientTaskModalPage';
|
||||
import { DocumentSetUpMeetingPage } from 'src/app/modals/document-set-up-meeting/document-set-up-meeting.page';
|
||||
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
|
||||
import { SearchedDocumentOptionsPage } from '../../popover/searched-document-options/searched-document-options.page';
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-view-event',
|
||||
@@ -85,8 +84,7 @@ export class ViewEventPage implements OnInit {
|
||||
this.dicIndex = index;
|
||||
}
|
||||
|
||||
close(){
|
||||
console.log(this.isEventEdited);
|
||||
close() {
|
||||
|
||||
this.viewEventDetailDismiss.emit({
|
||||
type: 'close'
|
||||
@@ -101,8 +99,6 @@ export class ViewEventPage implements OnInit {
|
||||
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]);
|
||||
}, (error)=> {
|
||||
|
||||
console.log('errer', )
|
||||
|
||||
this.viewEventDetailDismiss.emit({
|
||||
type: 'close'
|
||||
})
|
||||
@@ -139,7 +135,6 @@ export class ViewEventPage implements OnInit {
|
||||
()=>{
|
||||
loader.remove();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -156,7 +151,6 @@ export class ViewEventPage implements OnInit {
|
||||
modal.onDidDismiss().then((res) => {
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
async editEvent() {
|
||||
@@ -168,164 +162,117 @@ export class ViewEventPage implements OnInit {
|
||||
|
||||
viewDocument(sourceId) {
|
||||
this.processes.GetDocumentUrl(sourceId, '8').subscribe(res=>{
|
||||
console.log(res);
|
||||
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
const browser = this.iab.create(url,"_blank");
|
||||
browser.show();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
async LoadDocumentDetails() {
|
||||
|
||||
const docId = this.loadedEvent.Attachments[ this.dicIndex].SourceId
|
||||
const applicationId: any = this.loadedEvent.Attachments[ this.dicIndex].ApplicationId
|
||||
|
||||
const docId = this.loadedEvent.Attachments[ this.dicIndex].Id
|
||||
const applicationId = this.loadedEvent.Attachments[ this.dicIndex].ApplicationId
|
||||
|
||||
console.log(this.loadedEvent.Attachments[ this.dicIndex])
|
||||
|
||||
|
||||
this.processes.GetDocumentDetails(docId, applicationId).subscribe( async(res)=> {
|
||||
alert('loads')
|
||||
console.log(res);
|
||||
|
||||
this.LoadedDocument = res;
|
||||
|
||||
this.LoadedDocument.Subject = this.LoadedDocument.Assunto
|
||||
|
||||
let thedate = new Date(this.LoadedDocument.DateDispatch || this.LoadedDocument.DocDate);
|
||||
|
||||
console.log(res)
|
||||
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')
|
||||
}
|
||||
|
||||
this.task = task
|
||||
console.log('this.task = task', this.task)
|
||||
|
||||
|
||||
this.task = task
|
||||
|
||||
const popover = await this.popoverController.create({
|
||||
component: SearchedDocumentOptionsPage,
|
||||
cssClass: 'exp-options',
|
||||
componentProps: {
|
||||
task: this.task,
|
||||
LoadedDocument: this.LoadedDocument
|
||||
},
|
||||
translucent: true
|
||||
});
|
||||
await popover.present()
|
||||
|
||||
popover.onDidDismiss().then((res:any) => {
|
||||
if(res.data.component == 'openBookMeetingModal') {
|
||||
this.openBookMeetingModal()
|
||||
} else if(res.data.component == 'openExpedientActionsModal') {
|
||||
this.openExpedientActionsModal(res.data.taskAction)
|
||||
} else {
|
||||
console.log(res.data)
|
||||
console.log('component not found')
|
||||
}
|
||||
});
|
||||
|
||||
// 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()]);
|
||||
|
||||
async openTaskOptions() {
|
||||
// let task: ExpedientTaskModalPageNavParamsTask
|
||||
// let document: SearchDocumentDetails = this.LoadedDocument
|
||||
// let folder: SearchFolderDetails = this.LoadedDocument
|
||||
|
||||
let task: ExpedientTaskModalPageNavParamsTask
|
||||
let document: SearchDocumentDetails = this.loadedEvent.Attachments[ this.dicIndex];
|
||||
let folder: SearchFolderDetails = this.loadedEvent.Attachments[ this.dicIndex];
|
||||
// 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')
|
||||
// }
|
||||
|
||||
if(this.loadedEvent.Attachments[this.dicIndex].ApplicationID == 361 || this.loadedEvent.Attachments[this.dicIndex].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,
|
||||
}
|
||||
// const modal = await this.modalController.create({
|
||||
// component: ViewDocumentPage,
|
||||
// componentProps: {
|
||||
// trustedUrl: '',
|
||||
// file: {
|
||||
// title: task.workflowInstanceDataFields.Subject,
|
||||
// url: '',
|
||||
// title_link: '',
|
||||
// },
|
||||
// Document: this.LoadedDocument,
|
||||
// applicationId: task.workflowInstanceDataFields.SourceSecFsID,
|
||||
// docId: this.LoadedDocument.DocId || this.LoadedDocument.DocID,
|
||||
// folderId: folder['FolderId'] || folder['FolderID'] || folder.folderId
|
||||
// },
|
||||
// cssClass: 'modal modal-desktop'
|
||||
// });
|
||||
// await modal.present();
|
||||
// });
|
||||
|
||||
const selectedDoc = this.loadedEvent.Attachments[ this.dicIndex]
|
||||
|
||||
console.log('selectedDoc', selectedDoc)
|
||||
|
||||
this.task = {
|
||||
serialNumber: '',
|
||||
taskStartDate: '',
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FolderID: '',
|
||||
Subject: selectedDoc.SourceName,
|
||||
SourceSecFsID: selectedDoc.ApplicationId || selectedDoc.ApplicationID,
|
||||
SourceType: 'DOC',
|
||||
SourceID: selectedDoc.SourceId,
|
||||
DispatchNumber: ''
|
||||
}
|
||||
}
|
||||
|
||||
this.task = task
|
||||
|
||||
const popover = await this.popoverController.create({
|
||||
component: SearchedDocumentOptionsPage,
|
||||
cssClass: 'exp-options',
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewDocumentPage,
|
||||
componentProps: {
|
||||
task: this.task,
|
||||
LoadedDocument: this.LoadedDocument
|
||||
trustedUrl: '',
|
||||
file: {
|
||||
title: this.task.workflowInstanceDataFields.Subject,
|
||||
url: '',
|
||||
title_link: '',
|
||||
},
|
||||
Document: this.loadedEvent.Attachments[ this.dicIndex],
|
||||
applicationId: this.task.workflowInstanceDataFields.SourceSecFsID,
|
||||
docId: selectedDoc.SourceId,
|
||||
folderId: '',
|
||||
task: this.task
|
||||
},
|
||||
translucent: true
|
||||
});
|
||||
await popover.present()
|
||||
|
||||
popover.onDidDismiss().then((res:any) => {
|
||||
if(res.data.component == 'openBookMeetingModal') {
|
||||
this.openBookMeetingModal()
|
||||
} else if(res.data.component == 'openExpedientActionsModal') {
|
||||
this.openExpedientActionsModal(res.data.taskAction)
|
||||
} else {
|
||||
console.log(res.data)
|
||||
console.log('component not found')
|
||||
}
|
||||
cssClass: 'modal modal-desktop'
|
||||
});
|
||||
await modal.present();
|
||||
|
||||
}
|
||||
|
||||
@@ -341,7 +288,7 @@ export class ViewEventPage implements OnInit {
|
||||
component: DocumentSetUpMeetingPage,
|
||||
componentProps: {
|
||||
subject: this.task.workflowInstanceDataFields.Subject,
|
||||
document: this.loadedEvent,
|
||||
document: this.loadedEvent.Attachments[ this.dicIndex],
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
@@ -366,8 +313,8 @@ export class ViewEventPage implements OnInit {
|
||||
componentProps: {
|
||||
taskAction: taskAction,
|
||||
task: this.task,
|
||||
seachDocuments: this.loadedEvent,
|
||||
aplicationId: this.loadedEvent.ApplicationId || this.loadedEvent.ApplicationID
|
||||
seachDocuments: this.loadedEvent.Attachments[ this.dicIndex],
|
||||
aplicationId: this.loadedEvent.Attachments[ this.dicIndex].ApplicationId || this.loadedEvent.Attachments[ this.dicIndex].ApplicationID
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { EventDetailsDocumentsOptionsPage } from './event-details-documents-options.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: EventDetailsDocumentsOptionsPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class EventDetailsDocumentsOptionsPageRoutingModule {}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { EventDetailsDocumentsOptionsPageRoutingModule } from './event-details-documents-options-routing.module';
|
||||
|
||||
import { EventDetailsDocumentsOptionsPage } from './event-details-documents-options.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
EventDetailsDocumentsOptionsPageRoutingModule
|
||||
],
|
||||
declarations: [EventDetailsDocumentsOptionsPage]
|
||||
})
|
||||
export class EventDetailsDocumentsOptionsPageModule {}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
<ion-content class="container width-100 ">
|
||||
<div class="buttons">
|
||||
<button *ngIf="p.userRole(['PR'])" (click)="openExpedientActionsModal('0')" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('0')" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openExpedientActionsModal('0')" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('2')" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
|
||||
<button (click)="openBookMeetingModal()" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
</div>
|
||||
</ion-content>
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
.container{
|
||||
--padding-top:20px !important;
|
||||
--padding-bottom:20px !important;
|
||||
--padding-start:20px !important;
|
||||
--padding-end:20px !important;
|
||||
width: 100%;
|
||||
}
|
||||
.arrow-right{
|
||||
display: none;
|
||||
margin-bottom: 20px;
|
||||
.arrow-right-icon{
|
||||
width: 37px;
|
||||
float: right;
|
||||
font-size: 35px;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
.buttons{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
}
|
||||
.solid {
|
||||
width: 90%;
|
||||
border-top: 1px solid #bbb;
|
||||
margin: 0 auto !important;
|
||||
}
|
||||
.btn-ok, .btn-cancel{
|
||||
//width: 50% !important;
|
||||
margin-bottom: 5px !important;
|
||||
margin-top: 5px !important;
|
||||
}
|
||||
@media only screen and (max-width: 800px) {
|
||||
.btn-ok, .btn-cancel, .btn-delete{
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 1024px) {
|
||||
.arrow-right{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.btn-cancel{
|
||||
width: 100% !important;
|
||||
margin-bottom: 10px !important;
|
||||
}
|
||||
.btn-delete, .btn-ok{
|
||||
width: 100% !important;
|
||||
margin-bottom: 10px !important;
|
||||
margin-top: 10px !important;
|
||||
}
|
||||
/* .solid{
|
||||
display: block;
|
||||
} */
|
||||
}
|
||||
|
||||
|
||||
.desk{
|
||||
text-align: left;
|
||||
background-color: white;
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { EventDetailsDocumentsOptionsPage } from './event-details-documents-options.page';
|
||||
|
||||
describe('EventDetailsDocumentsOptionsPage', () => {
|
||||
let component: EventDetailsDocumentsOptionsPage;
|
||||
let fixture: ComponentFixture<EventDetailsDocumentsOptionsPage>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ EventDetailsDocumentsOptionsPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(EventDetailsDocumentsOptionsPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { Location } from '@angular/common';
|
||||
import { TaskService } from 'src/app/Rules/task.service'
|
||||
import { ExpedienteService } from 'src/app/Rules/expediente.service';
|
||||
import { PermissionService } from 'src/app/services/worker/permission.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-event-details-documents-options',
|
||||
templateUrl: './event-details-documents-options.page.html',
|
||||
styleUrls: ['./event-details-documents-options.page.scss'],
|
||||
})
|
||||
export class EventDetailsDocumentsOptionsPage implements OnInit {
|
||||
|
||||
constructor(
|
||||
public p: PermissionService,
|
||||
private modalController: ModalController,
|
||||
) {}
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
close() {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
goBack() {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
async openBookMeetingModal() {
|
||||
this.modalController.dismiss({component:'openBookMeetingModal', taskAction: ''});
|
||||
}
|
||||
|
||||
async openExpedientActionsModal( taskAction: any) {
|
||||
this.modalController.dismiss({component:'openExpedientActionsModal', taskAction});
|
||||
}
|
||||
|
||||
async distartExpedientModal(body:any) {}
|
||||
|
||||
}
|
||||
@@ -220,7 +220,6 @@ export class OptsExpedientePage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
async sendToReview(note:string, documents:any) {
|
||||
let body = {
|
||||
"serialNumber": this.task.SerialNumber,
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.btn-cancel{
|
||||
display: none;
|
||||
width: 100% !important;
|
||||
margin-bottom: 10px !important;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import {PopoverController } from '@ionic/angular';
|
||||
import { PermissionService } from 'src/app/services/worker/permission.service';
|
||||
|
||||
@Component({
|
||||
@@ -14,15 +14,10 @@ export class SearchedDocumentOptionsPage implements OnInit {
|
||||
|
||||
constructor(
|
||||
private popoverController: PopoverController,
|
||||
private modalController: ModalController,
|
||||
private navParams: NavParams,
|
||||
public p: PermissionService
|
||||
) { }
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.task = this.navParams.get('task');
|
||||
this.LoadedDocument = this.navParams.get('LoadedDocument')
|
||||
}
|
||||
ngOnInit() {}
|
||||
|
||||
close() {
|
||||
this.popoverController.dismiss();
|
||||
|
||||
Reference in New Issue
Block a user