mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -267,64 +267,149 @@ export class CreateProcessPage implements OnInit {
|
||||
this.dispatchFolder.SubjectTypes = this.selectedTypes;
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
switch (this.loggeduser.Profile) {
|
||||
case 'MDGPR':
|
||||
|
||||
switch (this.taskType) {
|
||||
case '0': // Despacho
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.loggeduser.Email,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
if(this.loggeduser.Profile != 'PR') {
|
||||
switch (this.taskType) {
|
||||
case '0': // Despacho
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.loggeduser.Email,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
|
||||
try {
|
||||
await this.processes.postDespatcho(this.postData).toPromise();
|
||||
await this.despachoService.EfectuarDespacho({serialnumber: this.task.serialNumber, activityInstanceName: this.task.activityInstanceName}).toPromise();
|
||||
|
||||
this.modalController.dismiss();
|
||||
this.toastService._successMessage('Despacho criado');
|
||||
} catch (error) {
|
||||
this.toastService._badRequest('Processo não efectuado');
|
||||
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
break;
|
||||
case '1': // pedido de Parecer
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.loggeduser.Email,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
|
||||
try {
|
||||
if(this.task.activityInstanceName == 'Tarefa de Despacho' || this.task.activityInstanceName == 'Reexecutar Despacho') {
|
||||
await this.despachoService.createParecer(this.postData).toPromise();
|
||||
await this.despachoService.solicitarParecer({ serialnumber: this.task.serialNumber, activityInstanceName: this.task.activityInstanceName}).toPromise();
|
||||
} else {
|
||||
await this.pedidoService.createParecer(this.postData).toPromise();
|
||||
await this.pedidoService.taskCompleteParecer({serialNumber:this.task.serialNumber}).toPromise();
|
||||
}
|
||||
|
||||
this.modalController.dismiss();
|
||||
this.toastService._successMessage('Pedido de Parecer enviado');
|
||||
}
|
||||
catch (error) {
|
||||
this.toastService._badRequest('Processo não efectuado');
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
break;
|
||||
case '2': // Pedido de Deferimento
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.loggeduser.Email,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
|
||||
try {
|
||||
await this.pedidoService.createDeferimento(this.postData).toPromise();
|
||||
await this.pedidoService.taskCompleteDeferimento({serialNumber:this.task.serialNumber}).toPromise();
|
||||
|
||||
this.modalController.dismiss();
|
||||
this.toastService._successMessage('Pedido de Deferimento criado');
|
||||
}
|
||||
catch (error) {
|
||||
this.toastService._badRequest('Processo não efectuado');
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else if (this.loggeduser.Profile == 'PR') {
|
||||
switch (this.taskType) {
|
||||
case '0': // Despacho PR
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.loggeduser.Email,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
|
||||
if(this.postData.DispatchFolder.Message){
|
||||
try {
|
||||
await this.processes.postDespatcho(this.postData).toPromise();
|
||||
await this.despachoService.EfectuarDespacho({serialnumber: this.task.serialNumber, activityInstanceName: this.task.activityInstanceName}).toPromise();
|
||||
await this.despachoService.createDespacho(this.postData).toPromise();
|
||||
await this.despachoService.CompleteTask({serialNumber: this.task.serialNumber}).toPromise();
|
||||
|
||||
this.modalController.dismiss();
|
||||
this.toastService._successMessage('Despacho criado');
|
||||
} catch (error) {
|
||||
this.toastService._badRequest('Processo não efectuado');
|
||||
|
||||
} finally {
|
||||
loader.remove()
|
||||
//loader.remove();
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.validateField = true;
|
||||
this.toastService._badRequest('Por favor adicione uma descrição');
|
||||
}
|
||||
loader.remove();
|
||||
break;
|
||||
case '1': // Pedido de Parecer
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.loggeduser.Email,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
if(this.task.activityInstanceName == 'Tarefa de Despacho' || this.task.activityInstanceName == 'Reexecutar Despacho') {
|
||||
await this.despachoService.createParecer(this.postData).toPromise();
|
||||
await this.despachoService.solicitarParecer({ serialnumber: this.task.serialNumber, activityInstanceName: this.task.activityInstanceName}).toPromise();
|
||||
} else {
|
||||
await this.pedidoService.createParecer(this.postData).toPromise();
|
||||
await this.pedidoService.taskCompleteParecer({serialNumber:this.task.serialNumber}).toPromise();
|
||||
}
|
||||
|
||||
break;
|
||||
case '1': // pedido de Parecer
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.loggeduser.Email,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
this.modalController.dismiss();
|
||||
this.toastService._successMessage('Pedido de Parecer criado');
|
||||
}
|
||||
catch (error) {
|
||||
this.toastService._badRequest('Processo não efectuado');
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
try {
|
||||
if(this.task.activityInstanceName == 'Tarefa de Despacho' || this.task.activityInstanceName == 'Reexecutar Despacho') {
|
||||
await this.despachoService.createParecer(this.postData).toPromise();
|
||||
await this.despachoService.solicitarParecer({ serialnumber: this.task.serialNumber, activityInstanceName: this.task.activityInstanceName}).toPromise();
|
||||
} else {
|
||||
await this.pedidoService.createParecer(this.postData).toPromise();
|
||||
await this.pedidoService.taskCompleteParecer({serialNumber:this.task.serialNumber}).toPromise();
|
||||
}
|
||||
|
||||
this.modalController.dismiss();
|
||||
this.toastService._successMessage('Pedido de Parecer enviado');
|
||||
}
|
||||
catch (error) {
|
||||
this.toastService._badRequest('Processo não efectuado');
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
break;
|
||||
case '2': // Pedido de Deferimento
|
||||
break;
|
||||
case '2': // Pedido de Deferimento
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
@@ -343,102 +428,12 @@ export class CreateProcessPage implements OnInit {
|
||||
}
|
||||
catch (error) {
|
||||
this.toastService._badRequest('Processo não efectuado');
|
||||
}
|
||||
finally {
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'PR':
|
||||
switch (this.taskType) {
|
||||
case '0': // Despacho PR
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.loggeduser.Email,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
|
||||
if(this.postData.DispatchFolder.Message){
|
||||
try {
|
||||
await this.despachoService.createDespacho(this.postData).toPromise();
|
||||
await this.despachoService.CompleteTask({serialNumber: this.task.serialNumber}).toPromise();
|
||||
|
||||
this.modalController.dismiss();
|
||||
this.toastService._successMessage('Despacho criado');
|
||||
} catch (error) {
|
||||
this.toastService._badRequest('Processo não efectuado');
|
||||
} finally {
|
||||
//loader.remove();
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.validateField = true;
|
||||
this.toastService._badRequest('Por favor adicione uma descrição');
|
||||
}
|
||||
loader.remove();
|
||||
break;
|
||||
case '1': // Pedido de Parecer
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.loggeduser.Email,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
if(this.task.activityInstanceName == 'Tarefa de Despacho' || this.task.activityInstanceName == 'Reexecutar Despacho') {
|
||||
await this.despachoService.createParecer(this.postData).toPromise();
|
||||
await this.despachoService.solicitarParecer({ serialnumber: this.task.serialNumber, activityInstanceName: this.task.activityInstanceName}).toPromise();
|
||||
} else {
|
||||
await this.pedidoService.createParecer(this.postData).toPromise();
|
||||
await this.pedidoService.taskCompleteParecer({serialNumber:this.task.serialNumber}).toPromise();
|
||||
}
|
||||
|
||||
this.modalController.dismiss();
|
||||
this.toastService._successMessage('Pedido de Parecer criado');
|
||||
}
|
||||
catch (error) {
|
||||
this.toastService._badRequest('Processo não efectuado');
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
break;
|
||||
case '2': // Pedido de Deferimento
|
||||
this.postData = {
|
||||
DistributionType: "Paralelo",
|
||||
CountryCode: 'AO',
|
||||
Priority: this.postData.Priority,
|
||||
UserEmail: this.loggeduser.Email,
|
||||
UsersSelected: attendees,
|
||||
DispatchFolder: this.dispatchFolder,
|
||||
}
|
||||
|
||||
try {
|
||||
await this.pedidoService.createDeferimento(this.postData).toPromise();
|
||||
await this.pedidoService.taskCompleteDeferimento({serialNumber:this.task.serialNumber}).toPromise();
|
||||
|
||||
this.modalController.dismiss();
|
||||
this.toastService._successMessage('Pedido de Deferimento criado');
|
||||
}
|
||||
catch (error) {
|
||||
this.toastService._badRequest('Processo não efectuado');
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -106,21 +106,20 @@
|
||||
<!-- <div *ngIf="loggeduser.Profile != 'PR' && loggeduser.Profile != 'MDGPR'" class="calendar-letters"> -->
|
||||
<div class="calendar-letters cal-reverse" *ngIf="loggeduser.Profile != 'PR' && loggeduser.Profile != 'MDGPR' && eventService.calendarIds.length >= 2" class="calendar-letters" [class.cal-reverse]="loggeduser.Profile != 'PR' && loggeduser.Profile != 'MDGPR' && profile == 'mdgpr' " (click)="changeProfile()">
|
||||
<div class="text" *ngIf="profile == 'mdgpr'">
|
||||
{{ sessionStore.getInitials }}
|
||||
MC
|
||||
</div>
|
||||
|
||||
|
||||
<div class="text" *ngIf="profile == 'pr'">
|
||||
{{ sessionStore.getManagerInitials }}
|
||||
CP
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<button *ngIf="profile == 'mdgpr' && eventService.calendarIds.length >= 2 && ( loggeduser.Profile == 'PR' || loggeduser.Profile == 'MDGPR') " (click)="changeProfile()" class="d-md-none btn-no-color resize">
|
||||
<button *ngIf="profile == 'mdgpr' && ( loggeduser.Profile == 'PR' || loggeduser.Profile == 'MDGPR') " (click)="changeProfile()" class="d-md-none btn-no-color resize">
|
||||
<ion-icon class="right-icons" src="assets/images/icons-profile-calendar-md.svg"></ion-icon>
|
||||
</button>
|
||||
|
||||
<button title="Mudar de Agenda" *ngIf="profile == 'pr'&& eventService.calendarIds.length >= 2 && ( loggeduser.Profile == 'PR' || loggeduser.Profile == 'MDGPR')" (click)="changeProfile()" class="btn-no-color resize">
|
||||
<button title="Mudar de Agenda" *ngIf="profile == 'pr'&& ( loggeduser.Profile == 'PR' || loggeduser.Profile == 'MDGPR')" (click)="changeProfile()" class="btn-no-color resize">
|
||||
<ion-icon class="right-icons d-md-none" src="assets/images/icons-profile-calendar-pr.svg"></ion-icon>
|
||||
</button>
|
||||
|
||||
@@ -205,7 +204,6 @@
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="collaps btn-no-color" src="assets/images/theme/tribunal/icons-collaps-down.svg" ></ion-icon>
|
||||
</button >
|
||||
|
||||
|
||||
</ion-row>
|
||||
<ion-row class="timeline-date align-center">
|
||||
<span *ngIf="timelineIsCurrentDate()">Hoje, </span> {{ timelineDate }}
|
||||
@@ -284,8 +282,9 @@
|
||||
{{ event.event.CalendarName }}
|
||||
<div class="location">{{event.event.Location}}</div>
|
||||
<div class="description">
|
||||
<p>{{event.event.Subject}}</p>
|
||||
<p class="m-0">{{event.event.Subject}}</p>
|
||||
</div>
|
||||
<div class="font-13"> {{ eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -324,8 +323,9 @@
|
||||
<div class="schedule-details">
|
||||
<div class="location">{{event.event.Location}}</div>
|
||||
<div class="description">
|
||||
<p>{{event.event.Subject}}</p>
|
||||
<p class="m-0">{{event.event.Subject}}</p>
|
||||
</div>
|
||||
<div class="font-13"> {{ eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -365,8 +365,9 @@
|
||||
<div class="schedule-details">
|
||||
<div class="location">{{event.event.Location}}</div>
|
||||
<div class="description">
|
||||
<p>{{event.event.Subject}}</p>
|
||||
<p class="m-0">{{event.event.Subject}}</p>
|
||||
</div>
|
||||
<div class="font-13"> {{ eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -524,7 +524,7 @@ td.monthview-primary-with-event {
|
||||
color: var(--title-text-color);
|
||||
}
|
||||
|
||||
.description p{
|
||||
.description p {
|
||||
white-space: nowrap;
|
||||
overflow: hidden !important;
|
||||
text-overflow: ellipsis !important;
|
||||
@@ -864,17 +864,23 @@ $font-size: 11pt;
|
||||
border-radius: 44px;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: -3px;
|
||||
border: 1.5px solid black;
|
||||
color: white;
|
||||
display: none;
|
||||
.text{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media only screen and (max-width: 800px) {
|
||||
.calendar-letters {
|
||||
display: flex !important;
|
||||
}
|
||||
}
|
||||
|
||||
.cal-reverse {
|
||||
background: white !important;
|
||||
color: black !important;
|
||||
|
||||
@@ -796,7 +796,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
} else {
|
||||
|
||||
if(this.loggeduser.OwnerCalendars.length != 0) {
|
||||
if(this.loggeduser.OwnerCalendars.length != 0 ) {
|
||||
|
||||
this.eventService.getAllOwnEvents(momentG(new Date(startTime), 'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime), 'yyyy-MM-dd 23:59:59')).then((response: any) => {
|
||||
|
||||
@@ -840,7 +840,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
|
||||
|
||||
if(this.loggeduser.SharedCalendars.length != 0) {
|
||||
if(this.loggeduser.SharedCalendars.length != 0 ) {
|
||||
|
||||
|
||||
this.eventService.genericGetAllSharedEvents(momentG(new Date(startTime), 'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime), 'yyyy-MM-dd 23:59:59')).then((response: any) => {
|
||||
@@ -1100,8 +1100,8 @@ export class AgendaPage implements OnInit {
|
||||
}
|
||||
} else {
|
||||
|
||||
this.TimelinePRList = this.listBoxService.list(this.listToPresent, 'pr', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
|
||||
this.TimelineMDList = this.listBoxService.list(this.listToPresent, 'md', 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.TimelineMDList = this.listBoxService.list(this.CalendarStore.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, { segment: this.segment, selectedDate: this.eventSelectedDate })
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -83,7 +83,44 @@
|
||||
(viewDocument)="viewDocument($event)"
|
||||
> </app-task-details> -->
|
||||
|
||||
<div class="content d-flex flex-column" *ngIf="!task">
|
||||
<ion-item lines="none"
|
||||
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
|
||||
|
||||
<div class="item-content flex-grow-1 cursor-pointer">
|
||||
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
|
||||
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
|
||||
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
|
||||
</div>
|
||||
</ion-item>
|
||||
<ion-item lines="none"
|
||||
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
|
||||
|
||||
<div class="item-content flex-grow-1 cursor-pointer">
|
||||
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
|
||||
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
|
||||
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
|
||||
</div>
|
||||
</ion-item>
|
||||
<ion-item lines="none"
|
||||
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
|
||||
|
||||
<div class="item-content flex-grow-1 cursor-pointer">
|
||||
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
|
||||
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
|
||||
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
|
||||
</div>
|
||||
</ion-item>
|
||||
<ion-item lines="none"
|
||||
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
|
||||
|
||||
<div class="item-content flex-grow-1 cursor-pointer">
|
||||
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
|
||||
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
|
||||
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
|
||||
</div>
|
||||
</ion-item>
|
||||
</div>
|
||||
|
||||
<div *ngIf="task" class="aside-right flex-column height-100 overflow-y-auto">
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Tarefa de Despacho'">
|
||||
|
||||
+43
-2
@@ -6,8 +6,8 @@
|
||||
<ion-menu-button></ion-menu-button>
|
||||
</div>
|
||||
|
||||
<ion-content class="container-wrapper" *ngIf="task">
|
||||
<div class="main-content d-flex height-100 overflow-hidden">
|
||||
<ion-content class="container-wrapper" >
|
||||
<div *ngIf="task" class="main-content d-flex height-100 overflow-hidden">
|
||||
<div class="content d-flex flex-column" *ngIf="task">
|
||||
<div class="main-header" style="overflow: unset !important;">
|
||||
<div class="title-content width-100 d-flex justify-between">
|
||||
@@ -126,5 +126,46 @@
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
|
||||
<div *ngIf="!task" class="main-content d-flex height-100 overflow-hidden">
|
||||
<ion-item lines="none"
|
||||
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
|
||||
|
||||
<div class="item-content flex-grow-1 cursor-pointer">
|
||||
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
|
||||
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
|
||||
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
|
||||
</div>
|
||||
</ion-item>
|
||||
<ion-item lines="none"
|
||||
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
|
||||
|
||||
<div class="item-content flex-grow-1 cursor-pointer">
|
||||
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
|
||||
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
|
||||
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
|
||||
</div>
|
||||
</ion-item>
|
||||
<ion-item lines="none"
|
||||
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
|
||||
|
||||
<div class="item-content flex-grow-1 cursor-pointer">
|
||||
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
|
||||
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
|
||||
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
|
||||
</div>
|
||||
</ion-item>
|
||||
<ion-item lines="none"
|
||||
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
|
||||
|
||||
<div class="item-content flex-grow-1 cursor-pointer">
|
||||
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
|
||||
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
|
||||
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
|
||||
</div>
|
||||
</ion-item>
|
||||
</div>
|
||||
|
||||
|
||||
</ion-content>
|
||||
|
||||
|
||||
@@ -125,6 +125,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
this.sqliteservice.updateProcess(res)
|
||||
}
|
||||
}
|
||||
|
||||
getFromDB() {
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
this.storage.get('expediente_details').then((process) => {
|
||||
|
||||
@@ -80,6 +80,45 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="content d-flex flex-column" *ngIf="!task">
|
||||
<ion-item lines="none"
|
||||
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
|
||||
|
||||
<div class="item-content flex-grow-1 cursor-pointer">
|
||||
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
|
||||
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
|
||||
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
|
||||
</div>
|
||||
</ion-item>
|
||||
<ion-item lines="none"
|
||||
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
|
||||
|
||||
<div class="item-content flex-grow-1 cursor-pointer">
|
||||
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
|
||||
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
|
||||
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
|
||||
</div>
|
||||
</ion-item>
|
||||
<ion-item lines="none"
|
||||
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
|
||||
|
||||
<div class="item-content flex-grow-1 cursor-pointer">
|
||||
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
|
||||
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
|
||||
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
|
||||
</div>
|
||||
</ion-item>
|
||||
<ion-item lines="none"
|
||||
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
|
||||
|
||||
<div class="item-content flex-grow-1 cursor-pointer">
|
||||
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
|
||||
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
|
||||
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
|
||||
</div>
|
||||
</ion-item>
|
||||
</div>
|
||||
|
||||
<div *ngIf="task" class="aside-right flex-column height-100 overflow-y-auto">
|
||||
<div *ngIf="task.WorkflowName == 'Pedido de Deferimento'">
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Tarefa de Deferimento'">
|
||||
@@ -136,5 +175,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
</ion-content>
|
||||
@@ -42,6 +42,19 @@ export class EventsService {
|
||||
|
||||
|
||||
calendarIds = []
|
||||
hasSharedOficial: boolean = false;
|
||||
hasSharedPessoal: boolean = false;
|
||||
hasOwnOficial: boolean = false;
|
||||
hasOwnPessoal: boolean = false;
|
||||
|
||||
|
||||
|
||||
userCalendarNameSharedOficial = '';
|
||||
userCalendarNameSharedPessoal = '';
|
||||
userCalendarNameOwnOficial = '';
|
||||
userCalendarNameOwnPessoal = '';
|
||||
|
||||
calendarNames = {}
|
||||
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
@@ -52,7 +65,8 @@ export class EventsService {
|
||||
private backgroundservice: BackgroundService) {
|
||||
|
||||
this.loggeduser = this.user.ValidatedUser;
|
||||
|
||||
|
||||
this.headers = new HttpHeaders();
|
||||
this.headersMdOficial = new HttpHeaders();
|
||||
this.headersMdPessoal = new HttpHeaders();
|
||||
|
||||
@@ -78,17 +92,32 @@ export class EventsService {
|
||||
|
||||
}
|
||||
|
||||
setHeader() {
|
||||
async setHeader () {
|
||||
|
||||
this.hasSharedCalendar = false
|
||||
this.hasSharedOficial = false
|
||||
this.hasSharedPessoal = false
|
||||
|
||||
this.hasOwnCalendar = false
|
||||
this.hasOwnOficial = false
|
||||
this.hasOwnPessoal = false
|
||||
|
||||
this.headers = new HttpHeaders();
|
||||
|
||||
this.headerOwnOficial= new HttpHeaders();
|
||||
this.headerOwnPessoal= new HttpHeaders();
|
||||
|
||||
this.headerSharedOficial= new HttpHeaders();
|
||||
this.headerSharedPessoal= new HttpHeaders();
|
||||
|
||||
this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey);
|
||||
|
||||
this.userCalendarNameSharedOficial = '';
|
||||
this.userCalendarNameSharedPessoal = '';
|
||||
this.userCalendarNameOwnOficial = '';
|
||||
this.userCalendarNameOwnPessoal = '';
|
||||
|
||||
this.calendarIds = []
|
||||
this.calendarIds = [];
|
||||
|
||||
if (this.loggeduser) {
|
||||
if (this.loggeduser.Profile == 'MDGPR') {
|
||||
@@ -96,11 +125,18 @@ export class EventsService {
|
||||
this.loggeduser.OwnerCalendars.forEach(calendar => {
|
||||
|
||||
if (calendar.CalendarName == 'Oficial') {
|
||||
|
||||
this.hasOwnOficial = true
|
||||
|
||||
|
||||
this.headersMdOficial = this.headersMdOficial.set('Authorization', this.loggeduser.BasicAuthKey);
|
||||
this.headersMdOficial = this.headersMdOficial.set('CalendarId', calendar.CalendarId);
|
||||
this.headersMdOficial = this.headersMdOficial.set('CalendarRoleId', calendar.CalendarRoleId);
|
||||
}
|
||||
else if (calendar.CalendarName == 'Pessoal') {
|
||||
|
||||
this.hasOwnPessoal = true
|
||||
|
||||
this.headersMdPessoal = this.headersMdPessoal.set('Authorization', this.loggeduser.BasicAuthKey);
|
||||
this.headersMdPessoal = this.headersMdPessoal.set('CalendarId', calendar.CalendarId);
|
||||
this.headersMdPessoal = this.headersMdPessoal.set('CalendarRoleId', calendar.CalendarRoleId);
|
||||
@@ -111,11 +147,17 @@ export class EventsService {
|
||||
this.loggeduser.SharedCalendars.forEach(sharedCalendar => {
|
||||
|
||||
if (sharedCalendar.CalendarName == 'Oficial') {
|
||||
|
||||
this.hasSharedOficial = true
|
||||
|
||||
this.headersSharedOficial = this.headersSharedOficial.set('Authorization', this.loggeduser.BasicAuthKey);
|
||||
this.headersSharedOficial = this.headersSharedOficial.set('CalendarId', sharedCalendar.CalendarId);
|
||||
this.headersSharedOficial = this.headersSharedOficial.set('CalendarRoleId', sharedCalendar.CalendarRoleId);
|
||||
}
|
||||
else if (sharedCalendar.CalendarName == 'Pessoal') {
|
||||
|
||||
this.hasSharedPessoal = true
|
||||
|
||||
this.headersSharedPessoal = this.headersSharedPessoal.set('Authorization', this.loggeduser.BasicAuthKey);
|
||||
this.headersSharedPessoal = this.headersSharedPessoal.set('CalendarId', sharedCalendar.CalendarId);
|
||||
this.headersSharedPessoal = this.headersSharedPessoal.set('CalendarRoleId', sharedCalendar.CalendarRoleId);
|
||||
@@ -128,11 +170,17 @@ export class EventsService {
|
||||
this.loggeduser.OwnerCalendars.forEach(calendar => {
|
||||
|
||||
if (calendar.CalendarName == 'Oficial') {
|
||||
|
||||
this.hasOwnOficial = true
|
||||
|
||||
this.headersPrOficial = this.headersPrOficial.set('Authorization', this.loggeduser.BasicAuthKey);
|
||||
this.headersPrOficial = this.headersPrOficial.set('CalendarId', calendar.CalendarId);
|
||||
this.headersPrOficial = this.headersPrOficial.set('CalendarRoleId', calendar.CalendarRoleId);
|
||||
}
|
||||
else if (calendar.CalendarName == 'Pessoal') {
|
||||
|
||||
this.hasOwnPessoal = true
|
||||
|
||||
this.headersPrPessoal = this.headersPrPessoal.set('Authorization', this.loggeduser.BasicAuthKey);
|
||||
this.headersPrPessoal = this.headersPrPessoal.set('CalendarId', calendar.CalendarId);
|
||||
this.headersPrPessoal = this.headersPrPessoal.set('CalendarRoleId', calendar.CalendarRoleId);
|
||||
@@ -151,12 +199,18 @@ export class EventsService {
|
||||
this.hasOwnCalendar = true
|
||||
|
||||
if (calendar.CalendarName == 'Oficial') {
|
||||
|
||||
this.hasOwnOficial = true
|
||||
|
||||
this.headerOwnOficial = this.headerOwnOficial.set('Authorization', this.loggeduser.BasicAuthKey);
|
||||
this.headerOwnOficial = this.headerOwnOficial.set('CalendarId', calendar.CalendarId);
|
||||
this.headerOwnOficial = this.headerOwnOficial.set('CalendarRoleId', calendar.CalendarRoleId);
|
||||
this.headerOwnOficial = this.headerOwnOficial.set('CalendarName', calendar.CalendarName);
|
||||
}
|
||||
else if (calendar.CalendarName == 'Pessoal') {
|
||||
|
||||
this.hasOwnPessoal = true
|
||||
|
||||
this.headerOwnPessoal = this.headerOwnPessoal.set('Authorization', this.loggeduser.BasicAuthKey);
|
||||
this.headerOwnPessoal =this.headerOwnPessoal.set('CalendarId', calendar.CalendarId);
|
||||
this.headerOwnPessoal =this.headerOwnPessoal.set('CalendarRoleId', calendar.CalendarRoleId);
|
||||
@@ -175,25 +229,41 @@ export class EventsService {
|
||||
this.hasSharedCalendar = true
|
||||
|
||||
if (sharedCalendar.CalendarName == 'Oficial') {
|
||||
sharedCalendar.CalendarName
|
||||
this.hasSharedOficial = true
|
||||
|
||||
this.headerSharedOficial = this.headerSharedOficial.set('Authorization', 'Basic '+sharedCalendar.CalendarToken);
|
||||
this.headerSharedOficial = this.headerSharedOficial.set('CalendarId', sharedCalendar.CalendarId);
|
||||
this.headerSharedOficial = this.headerSharedOficial.set('CalendarRoleId', sharedCalendar.CalendarRoleId);
|
||||
this.headerSharedOficial = this.headerSharedOficial.set('CalendarName', sharedCalendar.CalendarName);
|
||||
}
|
||||
else if (sharedCalendar.CalendarName == 'Pessoal') {
|
||||
|
||||
this.hasSharedPessoal = true
|
||||
|
||||
this.headerSharedPessoal = this.headerSharedPessoal.set('Authorization', 'Basic '+sharedCalendar.CalendarToken);
|
||||
this.headerSharedPessoal = this.headerSharedPessoal.set('CalendarId', sharedCalendar.CalendarId);
|
||||
this.headerSharedPessoal = this.headerSharedPessoal.set('CalendarRoleId', sharedCalendar.CalendarRoleId);
|
||||
this.headerSharedPessoal = this.headerSharedPessoal.set('CalendarName', sharedCalendar.CalendarName);
|
||||
}
|
||||
}
|
||||
|
||||
this.headers = new HttpHeaders();
|
||||
this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey);
|
||||
for (let sharedCalendar of this.loggeduser.SharedCalendars) {
|
||||
this.GetCalendarName(sharedCalendar.OwnerUserId).subscribe((e)=> {
|
||||
this.calendarNames[sharedCalendar.CalendarId] = e.FullName
|
||||
})
|
||||
}
|
||||
|
||||
for (let sharedCalendar of this.loggeduser.OwnerCalendars) {
|
||||
this.GetCalendarName(sharedCalendar.OwnerUserId).subscribe((e)=> {
|
||||
this.calendarNames[sharedCalendar.CalendarId] = e.FullName
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
getCalendarOwnNameByCalendarId(CalendarId) {
|
||||
return this.calendarNames[CalendarId] || ""
|
||||
}
|
||||
|
||||
|
||||
isMyEvent(event: any) {
|
||||
@@ -248,8 +318,11 @@ export class EventsService {
|
||||
}
|
||||
|
||||
async getAllPrEvents(startdate: string, enddate: string): Promise<EventList[]> {
|
||||
let prO = await this.getAllPrOficialEvents(startdate, enddate).toPromise();
|
||||
let prP = await this.getAllPrPessoalEvents(startdate, enddate).toPromise();
|
||||
|
||||
let prO = [], prP = [];
|
||||
|
||||
prO = await this.getAllPrOficialEvents(startdate, enddate).toPromise();
|
||||
prP = await this.getAllPrPessoalEvents(startdate, enddate).toPromise();
|
||||
const resFinal = prO.concat(prP);
|
||||
return new Promise(resolve => {
|
||||
return resolve(resFinal)
|
||||
@@ -286,9 +359,29 @@ export class EventsService {
|
||||
return this.http.get<any>(`${geturl}`, options)
|
||||
}
|
||||
|
||||
|
||||
GetCalendarName(userid:string) {
|
||||
|
||||
let geturl = environment.apiURL + 'userauthentication/single';
|
||||
|
||||
let params = new HttpParams();
|
||||
|
||||
params = params.set("id", userid);
|
||||
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
}
|
||||
|
||||
return this.http.get<any>(`${geturl}`, options)
|
||||
}
|
||||
|
||||
async getAllMdEvents(startdate: string, enddate: string) {
|
||||
let prO = await this.getAllMdOficialEvents(startdate, enddate).toPromise();
|
||||
let prP = await this.getAllMdPessoalEvents(startdate, enddate).toPromise();
|
||||
|
||||
let prO = [], prP = [];
|
||||
|
||||
prO = await this.getAllMdOficialEvents(startdate, enddate).toPromise();
|
||||
prP = await this.getAllMdPessoalEvents(startdate, enddate).toPromise();
|
||||
const resFinal = prO.concat(prP);
|
||||
return new Promise(resolve => {
|
||||
return resolve(resFinal)
|
||||
@@ -296,9 +389,20 @@ export class EventsService {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
async getAllOwnEvents(startdate: string, enddate: string) {
|
||||
let ownO = await this.getAllOwnOficialEvents(startdate, enddate).toPromise();
|
||||
let ownP = await this.getAllOwnPessoalEvents(startdate, enddate).toPromise();
|
||||
|
||||
let ownO = [], ownP = [];
|
||||
|
||||
if(this.hasOwnOficial) {
|
||||
ownO = await this.getAllOwnOficialEvents(startdate, enddate).toPromise();
|
||||
}
|
||||
|
||||
if(this.hasOwnPessoal) {
|
||||
ownP = await this.getAllOwnPessoalEvents(startdate, enddate).toPromise();
|
||||
}
|
||||
|
||||
const resFinal = ownO.concat(ownP);
|
||||
return new Promise(resolve => {
|
||||
return resolve(resFinal)
|
||||
@@ -338,12 +442,36 @@ export class EventsService {
|
||||
|
||||
async genericGetAllSharedEvents(startdate: string, enddate: string) {
|
||||
|
||||
let prO = await this.genericGetAllSharedOficialEvents(startdate, enddate).toPromise();
|
||||
let prP = await this.genericGetAllSharedPessoalEvents(startdate, enddate).toPromise();
|
||||
const resFinal = prO.concat(prP);
|
||||
let result = []
|
||||
|
||||
for (let sharedCalendar of this.loggeduser.SharedCalendars) {
|
||||
|
||||
var header = new HttpHeaders();
|
||||
header = header.set('Authorization', 'Basic '+ sharedCalendar.CalendarToken);
|
||||
header = header.set('CalendarId', sharedCalendar.CalendarId);
|
||||
header = header.set('CalendarRoleId', sharedCalendar.CalendarRoleId);
|
||||
header = header.set('CalendarName', sharedCalendar.CalendarName);
|
||||
|
||||
let geturl = environment.apiURL + 'calendar/GetEvents';
|
||||
|
||||
let params = new HttpParams();
|
||||
|
||||
params = params.set("StartDate", startdate);
|
||||
params = params.set("EndDate", enddate);
|
||||
|
||||
let options = {
|
||||
headers: header,
|
||||
params: params
|
||||
};
|
||||
|
||||
const calendar = await this.http.get<Event[]>(`${geturl}`, options).toPromise()
|
||||
|
||||
result = result.concat(calendar)
|
||||
|
||||
}
|
||||
|
||||
return new Promise(resolve => {
|
||||
return resolve(resFinal)
|
||||
return resolve(result)
|
||||
});
|
||||
}
|
||||
|
||||
@@ -497,7 +625,6 @@ export class EventsService {
|
||||
}
|
||||
|
||||
throw('error')
|
||||
|
||||
}
|
||||
|
||||
putEvent(event: Event, conflictResolutionMode: number, sendInvitationsOrCancellationsMode: number, sharedagenda: string): Observable<Event> {
|
||||
|
||||
Reference in New Issue
Block a user