mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
Merge branch 'master' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -18,16 +18,6 @@ const routes: Routes = [
|
||||
{
|
||||
path:':eventId/:caller',
|
||||
loadChildren: ()=> import('../pages/events/event-detail/event-detail.module').then(m => m.EventDetailPageModule),
|
||||
// children: [
|
||||
// {
|
||||
// path:'',
|
||||
// loadChildren: ()=> import('../pages/events/event-detail/event-detail.module').then(m => m.EventDetailPageModule),
|
||||
// },
|
||||
// {
|
||||
// path:':caller',
|
||||
// loadChildren: ()=> import('../pages/events/event-detail/event-detail.module').then(m => m.EventDetailPageModule),
|
||||
// }
|
||||
// ]
|
||||
},
|
||||
]
|
||||
},
|
||||
@@ -89,6 +79,10 @@ const routes: Routes = [
|
||||
{
|
||||
path:':SerialNumber',
|
||||
loadChildren: ()=> import('../pages/gabinete-digital/expediente/expediente-detail/expediente-detail.module').then(m => m.ExpedienteDetailPageModule)
|
||||
},
|
||||
{
|
||||
path:'events/:eventId/:caller',
|
||||
loadChildren: ()=> import('../pages/events/event-detail/event-detail.module').then(m => m.EventDetailPageModule),
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<ion-tab-bar slot="bottom">
|
||||
<ion-tab-button tab="events">
|
||||
<ion-icon name="home"></ion-icon>
|
||||
<ion-badge color="danger">{{totalEvent}}</ion-badge>
|
||||
<ion-label>Home</ion-label>
|
||||
</ion-tab-button>
|
||||
|
||||
@@ -11,6 +12,7 @@
|
||||
</ion-tab-button>
|
||||
<ion-tab-button tab="gabinete-digital">
|
||||
<ion-icon name="file-tray-stacked"></ion-icon>
|
||||
<ion-badge color="danger">{{totalExpediente}}</ion-badge>
|
||||
<ion-label>Gabinete Digital</ion-label>
|
||||
</ion-tab-button>
|
||||
<!-- <ion-tab-button tab="search">
|
||||
|
||||
@@ -1,4 +1,28 @@
|
||||
|
||||
ion-tab-bar{
|
||||
--background: #e3dfdf;
|
||||
--color: #000;
|
||||
}
|
||||
|
||||
// Badge
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Font size of the badge
|
||||
$badge-font-size:15px !default;
|
||||
|
||||
/// @prop - Font weight of the badge
|
||||
$badge-font-weight:bold !default;
|
||||
|
||||
|
||||
ion-badge {/* */
|
||||
|
||||
/* display: inline-block;*/
|
||||
|
||||
min-width: 18px;
|
||||
font-size: $badge-font-size;
|
||||
/* font-weight: $badge-font-weight;
|
||||
line-height: 1;
|
||||
|
||||
white-space: nowrap;
|
||||
vertical-align: baseline; */
|
||||
}
|
||||
@@ -1,4 +1,8 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { EventsService } from '../services/events.service';
|
||||
import { formatDate } from '@angular/common';
|
||||
import { Event } from '../models/event.model';
|
||||
import { ProcessesService } from '../services/processes.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-home',
|
||||
@@ -6,10 +10,25 @@ import { Component, OnInit } from '@angular/core';
|
||||
styleUrls: ['./home.page.scss'],
|
||||
})
|
||||
export class HomePage implements OnInit {
|
||||
eventsList: Event[];
|
||||
totalEvent=0;
|
||||
totalExpediente=0;
|
||||
|
||||
constructor() { }
|
||||
constructor(private eventService: EventsService, private processesbackend:ProcessesService) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.eventService.getAllEvents(formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 00:00:00', formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 23:59:59')
|
||||
.subscribe(response => {
|
||||
this.eventsList = response;
|
||||
this.totalEvent = this.eventsList.length;
|
||||
}
|
||||
);
|
||||
|
||||
this.processesbackend.GetTasksList("Expediente", true).subscribe(result =>{
|
||||
this.totalExpediente = result;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ export class Attachment {
|
||||
//Data: any;
|
||||
}
|
||||
|
||||
enum Sources
|
||||
export enum Sources
|
||||
{
|
||||
Undefined = 0,
|
||||
webTRIX = 1,
|
||||
|
||||
@@ -189,9 +189,9 @@
|
||||
</ng-template>
|
||||
|
||||
</div>
|
||||
<ion-fab vertical="bottom" horizontal="end" slot="fixed">
|
||||
<ion-fab vertical="bottom" horizontal="end" slot="fixed" (click)="openCalModal()">
|
||||
<ion-fab-button>
|
||||
<ion-icon name="add" (click)="openCalModal()"></ion-icon>
|
||||
<ion-icon name="add" ></ion-icon>
|
||||
</ion-fab-button>
|
||||
</ion-fab>
|
||||
</div>
|
||||
|
||||
@@ -19,9 +19,11 @@
|
||||
.monthview-selected {
|
||||
background-color: lightskyblue !important;
|
||||
}
|
||||
/* .item{
|
||||
background: red !important;
|
||||
} */
|
||||
.item{
|
||||
/* background: red !important; */
|
||||
text-transform: capitalize;
|
||||
|
||||
}
|
||||
.input-wrapper{
|
||||
border-left: red !important;
|
||||
/* background: red; */
|
||||
@@ -34,10 +36,6 @@
|
||||
border-radius: 15px;
|
||||
}
|
||||
|
||||
.capitaliseText{
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* TOGGLE button */
|
||||
|
||||
@@ -28,4 +28,7 @@
|
||||
} */
|
||||
.span-color{
|
||||
color:red;
|
||||
}
|
||||
}
|
||||
/* .ion-badge{
|
||||
|
||||
} */
|
||||
@@ -1,7 +1,7 @@
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-buttons slot="start">
|
||||
<ion-back-button (click)="navigateBack()" defaultHref="" icon="chevron-back"></ion-back-button>
|
||||
<ion-back-button (click)="close()" defaultHref="" icon="chevron-back"></ion-back-button>
|
||||
</ion-buttons>
|
||||
<ion-title>Anexos do evento</ion-title>
|
||||
</ion-toolbar>
|
||||
@@ -24,20 +24,7 @@
|
||||
</div>
|
||||
<!-- Skeleton screen -->
|
||||
<div *ngIf="!loadedEventAttachments">
|
||||
<div class="ion-padding custom-skeleton">
|
||||
<ion-skeleton-text animated style="width: 60%"></ion-skeleton-text>
|
||||
<ion-skeleton-text animated></ion-skeleton-text>
|
||||
<ion-skeleton-text animated style="width: 88%"></ion-skeleton-text>
|
||||
<ion-skeleton-text animated style="width: 70%"></ion-skeleton-text>
|
||||
<ion-skeleton-text animated style="width: 60%"></ion-skeleton-text>
|
||||
</div>
|
||||
|
||||
<ion-list>
|
||||
<ion-list-header>
|
||||
<ion-label>
|
||||
<ion-skeleton-text animated style="width: 20%"></ion-skeleton-text>
|
||||
</ion-label>
|
||||
</ion-list-header>
|
||||
<ion-item>
|
||||
<ion-avatar slot="start">
|
||||
<ion-skeleton-text animated></ion-skeleton-text>
|
||||
@@ -55,23 +42,9 @@
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-thumbnail slot="start">
|
||||
<ion-avatar slot="start">
|
||||
<ion-skeleton-text animated></ion-skeleton-text>
|
||||
</ion-thumbnail>
|
||||
<ion-label>
|
||||
<h3>
|
||||
<ion-skeleton-text animated style="width: 50%"></ion-skeleton-text>
|
||||
</h3>
|
||||
<p>
|
||||
<ion-skeleton-text animated style="width: 80%"></ion-skeleton-text>
|
||||
</p>
|
||||
<p>
|
||||
<ion-skeleton-text animated style="width: 60%"></ion-skeleton-text>
|
||||
</p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-skeleton-text animated style="width: 27px; height: 27px" slot="start"></ion-skeleton-text>
|
||||
</ion-avatar>
|
||||
<ion-label>
|
||||
<h3>
|
||||
<ion-skeleton-text animated style="width: 50%"></ion-skeleton-text>
|
||||
|
||||
@@ -3,6 +3,7 @@ import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { Attachment } from 'src/app/models/attachment.model';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
|
||||
@Component({
|
||||
selector: 'app-attachments',
|
||||
@@ -14,17 +15,14 @@ export class AttachmentsPage implements OnInit {
|
||||
loadedEventAttachments: Attachment[];
|
||||
pageId: string;
|
||||
|
||||
constructor(private attachamentsService: AttachmentsService, private activatedRoute: ActivatedRoute, private iab: InAppBrowser, private route: Router) { }
|
||||
constructor(
|
||||
private attachamentsService: AttachmentsService,
|
||||
private iab: InAppBrowser,
|
||||
private modalCtrl: ModalController,
|
||||
private navParams: NavParams) { }
|
||||
|
||||
ngOnInit() {
|
||||
/* Emit new data when something changes */
|
||||
this.activatedRoute.paramMap.subscribe(paramMap =>{
|
||||
if(!paramMap.has('eventId')){
|
||||
//Redirect
|
||||
return;
|
||||
}
|
||||
this.loadAttachments(paramMap.get('eventId'));
|
||||
});
|
||||
this.loadAttachments(this.navParams.get('eventId'));
|
||||
}
|
||||
|
||||
loadAttachments(eventid:string)
|
||||
@@ -41,9 +39,9 @@ export class AttachmentsPage implements OnInit {
|
||||
const browser = this.iab.create(url,"_blank");
|
||||
browser.show();
|
||||
}
|
||||
|
||||
navigateBack(){
|
||||
this.route.navigate(['/home/events',this.pageId]);
|
||||
close(){
|
||||
this.modalCtrl.dismiss(null);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
</ion-buttons>
|
||||
<ion-buttons slot="end">
|
||||
<ion-button (click)="save()">
|
||||
<ion-label>Gravar</ion-label>
|
||||
<ion-label>Adicionar</ion-label>
|
||||
<ion-icon name="checkmark" slot="start"></ion-icon>
|
||||
</ion-button>
|
||||
</ion-buttons>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<ion-title></ion-title>
|
||||
<ion-buttons slot="end">
|
||||
<ion-button (click)="save()">
|
||||
<ion-label>Gravar</ion-label>
|
||||
<ion-label>OK</ion-label>
|
||||
<ion-icon name="checkmark" slot="start"></ion-icon>
|
||||
</ion-button>
|
||||
</ion-buttons>
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
<ion-item-sliding>
|
||||
<form [formGroup]="ionicForm" novalidate>
|
||||
<ion-item>
|
||||
<ion-label position="stacked">Assunto</ion-label>
|
||||
<ion-input [(ngModel)]="loadedEvent.Subject" formControlName="subject" type="text" required></ion-input>
|
||||
<ion-label class="capitalizeText" position="stacked">Assunto</ion-label>
|
||||
<ion-input class="capitalizeText" [(ngModel)]="loadedEvent.Subject" formControlName="subject" type="text" required></ion-input>
|
||||
</ion-item>
|
||||
<!-- Error messages -->
|
||||
<span class="error ion-padding" *ngIf="errorControl.subject.errors?.required">
|
||||
@@ -28,15 +28,15 @@
|
||||
</form>
|
||||
<ion-item>
|
||||
<ion-label position="stacked">Descrição</ion-label>
|
||||
<ion-input [(ngModel)]='loadedEvent.Body.Text'></ion-input>
|
||||
<ion-input class="capitalizeText" [(ngModel)]='loadedEvent.Body.Text'></ion-input>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label position="stacked">Localização</ion-label>
|
||||
<ion-input [(ngModel)]='loadedEvent.Location'></ion-input>
|
||||
<ion-input class="capitalizeText" [(ngModel)]='loadedEvent.Location'></ion-input>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label position="stacked">Calendário</ion-label>
|
||||
<ion-select placeholder="{{loadedEvent.CalendarName}}" [(ngModel)]="loadedEvent.CalendarName" interface="action-sheet" class="custom-options" Cancel-text="Cancelar">
|
||||
<ion-select class="capitalizeText" placeholder="{{loadedEvent.CalendarName}}" [(ngModel)]="loadedEvent.CalendarName" interface="action-sheet" class="custom-options" Cancel-text="Cancelar">
|
||||
<ion-select-option Pessoal="Reunião">Pessoal</ion-select-option>
|
||||
<ion-select-option Oficial="Viagem">Oficial</ion-select-option>
|
||||
</ion-select>
|
||||
@@ -70,21 +70,24 @@
|
||||
</ion-buttons>
|
||||
<ion-label class="attach-label">Participantes</ion-label>
|
||||
</ion-item>
|
||||
<div *ngIf="loadedEvent.Attendees">
|
||||
<div *ngFor="let attendee of loadedEvent.Attendees; let i=index">
|
||||
<div *ngIf="i<2">
|
||||
<div *ngIf="i<1">
|
||||
<ion-list >
|
||||
<ion-item class="attendees" lines="none" >
|
||||
<ion-icon class="attendees-icon" name="person" slot="start"></ion-icon>
|
||||
<ion-label class="attendees-list">{{attendee.Name}}</ion-label>
|
||||
<ion-label class="capitalizeText" class="attendees-list">{{attendee.Name}}</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
<div *ngIf="i>1">
|
||||
<ion-button class="see-more-button" fill="none" shape="round" (click)="openAttendees()">
|
||||
<ion-label color="secondary">Ver mais...</ion-label>
|
||||
</ion-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div *ngIf="loadedEvent.Attendees.length > 1">
|
||||
<ion-button class="see-more-button" fill="none" shape="round" (click)="openAttendees()">
|
||||
<ion-label color="secondary">Ver mais...</ion-label>
|
||||
</ion-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="div-attach">
|
||||
<ion-item>
|
||||
@@ -93,6 +96,7 @@
|
||||
</ion-buttons>
|
||||
<ion-label class="attach-label">Anexos</ion-label>
|
||||
</ion-item>
|
||||
<div *ngIf="loadedEventAttachments">
|
||||
<div *ngFor="let att of loadedEventAttachments; let j=index">
|
||||
<div *ngIf="j<2">
|
||||
<ion-list *ngIf="loadedEvent.HasAttachments">
|
||||
@@ -106,12 +110,13 @@
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
<div *ngIf="loadedEventAttachments.length > 1">
|
||||
<ion-button class="see-more-button" fill="none" shape="round" (click)="showAlert()">
|
||||
<ion-label color="secondary">Ver mais...</ion-label>
|
||||
</ion-button>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="loadedEventAttachments.length > 1">
|
||||
<ion-button class="see-more-button" fill="none" shape="round" (click)="openAttachments()"><!-- [routerLink]="['/home/attachments', loadedEvent.EventId]" -->
|
||||
<ion-label color="secondary">Ver mais...</ion-label>
|
||||
</ion-button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Skeleton Attachment -->
|
||||
<ion-list *ngIf="!loadedEventAttachments">
|
||||
<ion-item lines="none" >
|
||||
|
||||
@@ -92,3 +92,4 @@ ion-card{
|
||||
text-transform: initial;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import { Attachment } from 'src/app/models/attachment.model';
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { FormGroup, FormBuilder, Validators } from "@angular/forms";
|
||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
import { AttachmentsPage } from '../attachments/attachments.page';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -40,6 +41,7 @@ export class EventDetailPage implements OnInit {
|
||||
private modalCtrl: ModalController,
|
||||
private alertService: AlertService,
|
||||
private attachamentsService: AttachmentsService,
|
||||
private route: Router,
|
||||
private iab: InAppBrowser) {
|
||||
this.loadedEvent = new Event();
|
||||
this.loadedEvent.Body = new EventBody();
|
||||
@@ -191,8 +193,6 @@ export class EventDetailPage implements OnInit {
|
||||
const browser = this.iab.create(url,"_blank");
|
||||
browser.show();
|
||||
}
|
||||
|
||||
|
||||
|
||||
back()
|
||||
{
|
||||
@@ -206,4 +206,30 @@ export class EventDetailPage implements OnInit {
|
||||
}, 2000);
|
||||
|
||||
}
|
||||
navigateTo(ev){
|
||||
this.route.navigate(['/home/events',ev]);
|
||||
}
|
||||
async openAttachments(){
|
||||
const modal = await this.modalCtrl.create({
|
||||
component: AttachmentsPage,
|
||||
componentProps: {
|
||||
eventId: this.pageId,
|
||||
attachments: this.loadedEventAttachments
|
||||
},
|
||||
cssClass: 'attachments',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then((data) => {
|
||||
if (data['data'] != null)
|
||||
{
|
||||
let newattendees: EventPerson[] = data['data'];
|
||||
this.loadedEvent.Attendees = newattendees;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
<ion-icon slot="start" name="reader"></ion-icon>
|
||||
</div>
|
||||
<div class="div-content-{{event.CalendarName}}">
|
||||
<h3>{{event.Subject}}</h3>
|
||||
<h3 class="capitalizeText">{{event.Subject}}</h3>
|
||||
<p>{{event.StartDate | date: 'hh:mm'}} - {{event.EndDate| date: 'hh:mm'}}</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -82,7 +82,7 @@
|
||||
<ion-icon class="ion-icon-location" slot="start" name="location"></ion-icon>
|
||||
</div>
|
||||
<div class="div-botton-middle">
|
||||
<p class="item-list-small">{{event.Location}}</p>
|
||||
<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>
|
||||
@@ -99,14 +99,14 @@
|
||||
<ion-item-sliding>
|
||||
<ion-item lines="none"
|
||||
*ngFor="let event of officialeventsList"
|
||||
[routerLink]="['/home/events', event.EventId]">
|
||||
[routerLink]="['/home/events', event.EventId, 'events']">
|
||||
<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>{{event.Subject}}</h3>
|
||||
<h3 class="capitalizeText">{{event.Subject}}</h3>
|
||||
<p>{{event.StartDate | date: 'hh:mm'}} - {{event.EndDate | date: 'hh:mm'}}</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -115,7 +115,7 @@
|
||||
<ion-icon class="ion-icon-location" slot="start" name="location"></ion-icon>
|
||||
</div>
|
||||
<div class="div-botton-middle">
|
||||
<p class="item-list-small">{{event.Location}}</p>
|
||||
<p class="item-list-small capitalizeText">{{event.Location}}</p>
|
||||
</div>
|
||||
<div class="div-botton-right">
|
||||
<ion-icon class="ion-icon-attach" slot="end" name="attach-outline"></ion-icon>
|
||||
@@ -132,14 +132,14 @@
|
||||
<ion-item-sliding>
|
||||
<ion-item lines="none"
|
||||
*ngFor="let event of personaleventsList"
|
||||
[routerLink]="['/home/events', event.EventId]">
|
||||
[routerLink]="['/home/events', event.EventId, 'events']">
|
||||
<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>{{event.Subject}}</h3>
|
||||
<h3 class="capitalizeText">{{event.Subject}}</h3>
|
||||
<p>{{event.StartDate | date: 'hh:mm' }} - {{event.EndDate | date: 'hh:mm'}}</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -148,7 +148,7 @@
|
||||
<ion-icon class="ion-icon-location" slot="start" name="location"></ion-icon>
|
||||
</div>
|
||||
<div class="div-botton-middle">
|
||||
<p class="item-list-small">{{event.Location}}</p>
|
||||
<p class="item-list-small capitalizeText">{{event.Location}}</p>
|
||||
</div>
|
||||
<div class="div-botton-right">
|
||||
<ion-icon class="ion-icon-attach" slot="end" name="attach-outline"></ion-icon>
|
||||
|
||||
+89
-7
@@ -3,13 +3,13 @@
|
||||
<ion-buttons slot="start">
|
||||
<ion-back-button defaultHref="/expediente"></ion-back-button>
|
||||
</ion-buttons>
|
||||
<ion-title>Detalhes do Processo</ion-title>
|
||||
<ion-title>Expediente</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content padding>
|
||||
<div *ngIf="task">
|
||||
|
||||
<h3 class="h3-event-title">Detalhes do Expediente</h3>
|
||||
<ion-item-group>
|
||||
<ion-item>
|
||||
<ion-label position="stacked">Assunto</ion-label>
|
||||
@@ -17,20 +17,102 @@
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label position="stacked">Remetentes</ion-label>
|
||||
<ion-input disabled="true">{{ task.Senders }}</ion-input>
|
||||
<ion-input disabled="true">OAPR - GTI</ion-input><!-- {{ task.Senders }} -->
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label position="stacked">Data</ion-label>
|
||||
<ion-input disabled="true" value=''>{{ task.CreateDate }}</ion-input>
|
||||
<ion-input disabled="true" value=''>{{ task.CreateDate | date: 'dd-MM-yy | hh:mm'}}</ion-input>
|
||||
</ion-item>
|
||||
<ion-button (click)="viewDocument()" shape="round" expand="outline">
|
||||
<ion-button (click)="viewDocument()" shape="round" expand="block">
|
||||
<ion-icon name="attach" slot="start"></ion-icon>
|
||||
Ver documento
|
||||
</ion-button>
|
||||
</ion-item-group>
|
||||
<div *ngIf="eventsList">
|
||||
<h3 class="h3-event-title">Eventos Associados</h3>
|
||||
<ion-list>
|
||||
<ion-item-sliding>
|
||||
<ion-item lines="none"
|
||||
*ngFor="let event of eventsList"
|
||||
[routerLink]="['/home/gabinete-digital/expediente/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: 'dd-MM-yy | 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-list>
|
||||
</div>
|
||||
<div *ngIf="!eventsList">
|
||||
<ion-list>
|
||||
<ion-list-header>
|
||||
<ion-label>
|
||||
<ion-skeleton-text animated style="width: 50%"></ion-skeleton-text>
|
||||
</ion-label>
|
||||
</ion-list-header>
|
||||
<ion-item>
|
||||
<ion-thumbnail slot="start">
|
||||
<ion-skeleton-text animated></ion-skeleton-text>
|
||||
</ion-thumbnail>
|
||||
<ion-label>
|
||||
<h3>
|
||||
<ion-skeleton-text animated style="width: 50%"></ion-skeleton-text>
|
||||
</h3>
|
||||
<p>
|
||||
<ion-skeleton-text animated style="width: 80%"></ion-skeleton-text>
|
||||
</p>
|
||||
<p>
|
||||
<ion-skeleton-text animated style="width: 60%"></ion-skeleton-text>
|
||||
</p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-thumbnail slot="start">
|
||||
<ion-skeleton-text animated></ion-skeleton-text>
|
||||
</ion-thumbnail>
|
||||
<ion-label>
|
||||
<h3>
|
||||
<ion-skeleton-text animated style="width: 50%"></ion-skeleton-text>
|
||||
</h3>
|
||||
<p>
|
||||
<ion-skeleton-text animated style="width: 80%"></ion-skeleton-text>
|
||||
</p>
|
||||
<p>
|
||||
<ion-skeleton-text animated style="width: 60%"></ion-skeleton-text>
|
||||
</p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div *ngIf="!task">
|
||||
<ion-list>
|
||||
<ion-list-header>
|
||||
<ion-label>
|
||||
<ion-skeleton-text animated style="width: 50%"></ion-skeleton-text>
|
||||
</ion-label>
|
||||
</ion-list-header>
|
||||
<ion-item>
|
||||
<ion-label>
|
||||
<h3>
|
||||
@@ -59,8 +141,8 @@
|
||||
</p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
<ion-button color="medium" shape="round" expand="outline">
|
||||
<ion-icon color="medium" name="attach" slot="start"></ion-icon>
|
||||
<ion-button color="medium" shape="round" expand="block">
|
||||
<!-- <ion-icon color="medium" name="attach" slot="start"></ion-icon> -->
|
||||
<ion-skeleton-text animated style="width: 50%"></ion-skeleton-text>
|
||||
</ion-button>
|
||||
</ion-list>
|
||||
|
||||
+115
-2
@@ -4,5 +4,118 @@ ion-item-group{
|
||||
ion-button{
|
||||
display: block;
|
||||
width: 80%;
|
||||
margin: 15px auto;
|
||||
}
|
||||
margin: 20px auto;
|
||||
}
|
||||
.h3-event-title{
|
||||
padding: 15px 0 0px 25px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
//DIV
|
||||
.div-item-Oficial{
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
border-bottom: 1px solid #ccc;
|
||||
margin: 10px 0 5px 0;
|
||||
/* background: #cab0dc; */
|
||||
/* border-radius: 20px; */
|
||||
/* padding: 10px; */
|
||||
/* box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); */
|
||||
}
|
||||
.div-item-Pessoal{
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
border-bottom: 1px solid #ccc;
|
||||
margin: 10px 0 5px 0;
|
||||
/* background: #cbeecb; */
|
||||
/* border-radius: 20px; */
|
||||
/* padding: 10px; */
|
||||
/* box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); */
|
||||
}
|
||||
.div-up{
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
.div-up h3{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 17px;
|
||||
width: 100%;
|
||||
}
|
||||
.div-icon{
|
||||
width: 10%;
|
||||
font-size: 22px;
|
||||
float: left;
|
||||
color: #808080;
|
||||
}
|
||||
.div-icon ion-icon{
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
.div-content-Oficial{
|
||||
width: 85%;
|
||||
float: left;
|
||||
border-left: 4px solid #cab0dc;
|
||||
padding: 0 0 0 12px;
|
||||
}
|
||||
.div-content-Pessoal{
|
||||
width: 85%;
|
||||
float: left;
|
||||
border-left: 4px solid #cbeecb;
|
||||
padding: 0 0 0 12px;
|
||||
}
|
||||
.div-content-Oficial h3, .div-content-Pessoal h3{
|
||||
font-size: 14pt;
|
||||
/* border: 1px solid red; */
|
||||
}
|
||||
.div-content-Oficial p, .div-content-Pessoal p{
|
||||
font-size: 12pt;
|
||||
color: rgb(94, 92, 92);
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
.div-botton{
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
margin: 10px 0 5px 0;
|
||||
}
|
||||
.div-botton-left{
|
||||
width: 10%;
|
||||
float: left;
|
||||
}
|
||||
.ion-icon-location{
|
||||
text-align: center;
|
||||
display: block;
|
||||
color: #000;
|
||||
font-size: 16px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.div-botton-middle{
|
||||
width: 75%;
|
||||
float: left;
|
||||
margin-top: 0.5px;
|
||||
}
|
||||
.div-botton-middle p{
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.div-botton-right{
|
||||
width: 10%;
|
||||
float: left;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.ion-icon-attach{
|
||||
color: #666666;
|
||||
font-size: 20px;
|
||||
}
|
||||
/* TOGGLE BUTTON */
|
||||
.switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 90px;
|
||||
height: 34px;
|
||||
float: right;
|
||||
margin:20px 20px 0 0;
|
||||
}
|
||||
+27
-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,24 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
async LoadRelatedEvents(serial:string)
|
||||
{
|
||||
if (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");
|
||||
|
||||
@@ -34,10 +34,11 @@
|
||||
<ion-item lines="none" *ngFor = "let task of taskslist" >
|
||||
<div class="div-content-expediente">
|
||||
<ion-item lines="none" [routerLink]="['/home/gabinete-digital/expediente',task.SerialNumber]">
|
||||
<ion-icon slot="end" name="document-outline"></ion-icon>
|
||||
<ion-icon slot="end" name="calendar"></ion-icon>
|
||||
<h3>{{ task.Folio }}</h3>
|
||||
</ion-item>
|
||||
<p><span class="span-left">{{ task.Senders }}</span><span class="span-right">{{ task.CreateDate | date: 'dd-MM-yy' }}</span></p>
|
||||
<p><span class="span-left">OAPR - GTI</span><span class="span-right">{{ task.CreateDate | date: 'dd-MM-yy' }}</span></p>
|
||||
<!-- <p><span class="span-left">{{ task.Senders }}</span><span class="span-right">{{ task.CreateDate | date: 'dd-MM-yy' }}</span></p> -->
|
||||
</div>
|
||||
</ion-item>
|
||||
</ion-item-sliding>
|
||||
|
||||
@@ -31,15 +31,11 @@
|
||||
</ion-card>
|
||||
<ion-card color="#d4d5ca">
|
||||
<ion-card-header>
|
||||
<ion-card-title>Diplomas</ion-card-title>
|
||||
<ion-card-title>Expediente para o PR</ion-card-title>
|
||||
<ion-card-content>
|
||||
<ion-item (click)="notImplemented()" class="ion-item-change-color">
|
||||
<ion-label>Assinados pelo PR</ion-label>
|
||||
<ion-button slot="end">{{count_dip_apr}}</ion-button>
|
||||
</ion-item>
|
||||
<ion-item primary (click)="notImplemented()" class="ion-activated">
|
||||
<ion-label>Por validar (MDGPR)</ion-label>
|
||||
<ion-button slot="end">{{count_dip_pv}}</ion-button>
|
||||
<ion-label>Correspondência</ion-label>
|
||||
<ion-button slot="end">{{count_de_pr}}</ion-button>
|
||||
</ion-item>
|
||||
</ion-card-content>
|
||||
</ion-card-header>
|
||||
@@ -55,4 +51,20 @@
|
||||
</ion-card-content>
|
||||
</ion-card-header>
|
||||
</ion-card>
|
||||
<ion-card color="#d4d5ca">
|
||||
<ion-card-header>
|
||||
<ion-card-title>Diplomas</ion-card-title>
|
||||
<ion-card-content>
|
||||
<ion-item (click)="notImplemented()" class="ion-item-change-color">
|
||||
<ion-label>Assinados pelo PR</ion-label>
|
||||
<ion-button slot="end">{{count_dip_apr}}</ion-button>
|
||||
</ion-item>
|
||||
<ion-item primary (click)="notImplemented()" class="ion-activated">
|
||||
<ion-label>Por validar (MDGPR)</ion-label>
|
||||
<ion-button slot="end">{{count_dip_pv}}</ion-button>
|
||||
</ion-item>
|
||||
</ion-card-content>
|
||||
</ion-card-header>
|
||||
</ion-card>
|
||||
|
||||
</ion-content>
|
||||
|
||||
@@ -33,4 +33,19 @@ export class AttachmentsService {
|
||||
|
||||
return this.http.get<Attachment[]>(`${geturl}`, options);
|
||||
}
|
||||
|
||||
getAttachments(source: number, sourceid: string): Observable<Attachment[]>{
|
||||
let geturl = environment.apiURL + 'attachments/GetAttachments';
|
||||
let params = new HttpParams();
|
||||
|
||||
params = params.set("Source", source.toString());
|
||||
params = params.set("SourceId", sourceid);
|
||||
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
};
|
||||
|
||||
return this.http.get<Attachment[]>(`${geturl}`, options);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,4 +249,7 @@
|
||||
--height: 80%;
|
||||
--border-radius: 10px;
|
||||
padding: 25px;
|
||||
} */
|
||||
} */
|
||||
.capitalizeText{
|
||||
text-transform: capitalize;
|
||||
}
|
||||
Reference in New Issue
Block a user