mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Integração dos eventos de agenda no Expediente
This commit is contained in:
+32
@@ -27,6 +27,38 @@
|
||||
<ion-icon name="attach" slot="start"></ion-icon>
|
||||
Ver documento
|
||||
</ion-button>
|
||||
<ion-list>
|
||||
<ion-item-group>
|
||||
<ion-item-sliding>
|
||||
<ion-item lines="none"
|
||||
*ngFor="let event of eventsList"
|
||||
[routerLink]="['/home/events', event.EventId, 'gabinete-digital/expediente/' + serialnumber]">
|
||||
<div class="div-item-{{event.CalendarName}}">
|
||||
<div class="div-up">
|
||||
<div class="div-icon">
|
||||
<ion-icon slot="start" name="reader"></ion-icon>
|
||||
</div>
|
||||
<div class="div-content-{{event.CalendarName}}">
|
||||
<h3 class="capitalizeText">{{event.Subject}}</h3>
|
||||
<p>{{event.StartDate | date: 'hh:mm'}} - {{event.EndDate| date: 'hh:mm'}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="div-botton">
|
||||
<div class="div-botton-left">
|
||||
<ion-icon class="ion-icon-location" slot="start" name="location"></ion-icon>
|
||||
</div>
|
||||
<div class="div-botton-middle">
|
||||
<p class="item-list-small capitalizeText">{{event.Location}}</p>
|
||||
</div>
|
||||
<div *ngIf="event.HasAttachments" class="div-botton-right">
|
||||
<ion-icon class="ion-icon-attach" slot="end" name="attach-outline"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-item>
|
||||
</ion-item-sliding>
|
||||
</ion-item-group>
|
||||
</ion-list>
|
||||
</ion-item-group>
|
||||
</div>
|
||||
<div *ngIf="!task">
|
||||
|
||||
+25
-5
@@ -1,11 +1,12 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
import { DailyWorkTask } from '../../../../models/dailyworktask.model';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { formatDate } from '@angular/common';
|
||||
import { LoadingService } from 'src/app/services/loading.service';
|
||||
|
||||
import { Event } from '../../../../models/event.model';
|
||||
|
||||
@Component({
|
||||
selector: 'app-expediente-detail',
|
||||
@@ -16,10 +17,12 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
|
||||
constructor(private activateRoute: ActivatedRoute,
|
||||
private processes:ProcessesService,
|
||||
private iab: InAppBrowser) { }
|
||||
private iab: InAppBrowser,
|
||||
private attachments: AttachmentsService,
|
||||
private events: EventsService) { }
|
||||
|
||||
task: DailyWorkTask;
|
||||
|
||||
eventsList: Event[];
|
||||
serialnumber:string;
|
||||
|
||||
ngOnInit() {
|
||||
@@ -29,10 +32,11 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
}
|
||||
this.serialnumber = paramMap.get('SerialNumber');
|
||||
this.LoadTaskDetail(this.serialnumber);
|
||||
this.LoadRelatedEvents(this.serialnumber);
|
||||
});
|
||||
}
|
||||
|
||||
LoadTaskDetail(serial:string)
|
||||
async LoadTaskDetail(serial:string)
|
||||
{
|
||||
this.processes.GetTask(serial).subscribe(result => {
|
||||
this.task = {
|
||||
@@ -45,6 +49,22 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
async LoadRelatedEvents(serial:string)
|
||||
{
|
||||
this.eventsList = null;
|
||||
this.attachments.getAttachments(2, serial).subscribe(result => {
|
||||
result.forEach(att =>{
|
||||
if (this.eventsList == null)
|
||||
{
|
||||
this.eventsList = new Array();
|
||||
}
|
||||
this.events.getEvent(att.ParentId).subscribe(event => {
|
||||
this.eventsList.push(event);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
viewDocument()
|
||||
{
|
||||
const url: string = this.task.DocumentURL.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
|
||||
Reference in New Issue
Block a user