mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
git pull made
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
<div class="main-content">
|
||||
<!-- Toolbar -->
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
|
||||
|
||||
<div>
|
||||
<!-- Calendar is here -->
|
||||
<div class="calendar-segment-{{profile}}" [class.calendar-segment-pr-force]="loggeduser.Profile =='PR'">
|
||||
@@ -180,15 +180,15 @@
|
||||
<div class="ss-timeline timeline-mobile flex-grow-1 d-md-none text-black height-100 width-100 overflow-y-auto" >
|
||||
<div *ngFor="let events of TimelineMDList | keyvalue;" >
|
||||
|
||||
<div class="EventListBox-container" *ngIf="CalendarCurrentDay <= events.key">
|
||||
<div class="day mt-10" *ngIf="shoeEventDay(events.value)">
|
||||
<div class="EventListBox-container" >
|
||||
<div class="day mt-10" >
|
||||
{{ TimelineDayEvent(events.key)}}
|
||||
</div>
|
||||
|
||||
<div *ngFor="let event of events.value" class="EventListBox" >
|
||||
|
||||
<div class="d-flex content-{{event.profile}}-{{event.event.CalendarName}} mt-10 cursor-pointer width-100 " (click)="eventClicked(event)"
|
||||
*ngIf="viewEventMonth <= dateMonth(event) && showEventBox(event)">
|
||||
*ngIf="viewEventMonth <= dateMonth(event) ">
|
||||
|
||||
<div class="schedule-time" *ngIf="!event.event.IsAllDayEvent">
|
||||
|
||||
@@ -219,18 +219,18 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="fs-timeline flex-grow-1 d-none d-md-block d-md-block text-black pr-20 width-100 height-100 overflow-y-auto" *ngIf="loggeduser.Profile == 'MDGPR'">
|
||||
<div *ngFor="let events of TimelineMDList | keyvalue;" >
|
||||
|
||||
<div class="EventListBox-container" *ngIf="CalendarCurrentDay <= events.key">
|
||||
<div class="day EventListBox-day mt-10" *ngIf="shoeEventDay(events.value)">
|
||||
<div class="EventListBox-container" >
|
||||
<div class="day EventListBox-day mt-10" >
|
||||
{{ TimelineDayEvent(events.key)}}
|
||||
</div>
|
||||
<div *ngFor="let event of events.value" class="EventListBox" >
|
||||
|
||||
<div class="d-flex content-mdgpr-{{event.event.CalendarName}} mt-10 cursor-pointer" (click)="eventClicked(event)"
|
||||
*ngIf="viewEventMonth <= dateMonth(event) && showEventBox(event)">
|
||||
<div class="d-flex content-mdgpr-{{event.event.CalendarName}} mt-10 cursor-pointer item-hover" (click)="eventClicked(event)"
|
||||
>
|
||||
|
||||
<div class="schedule-time" *ngIf="!event.event.IsAllDayEvent">
|
||||
<div *ngIf="!event.endMany && !event.middle" class="time-start">{{event.event.StartDate | date: 'HH:mm'}}</div>
|
||||
@@ -263,16 +263,15 @@
|
||||
<div class="sd-timeline flex-grow-1 d-none d-md-block timeline-md text-black pl-20 pr-20 width-100 height-100 overflow-y-auto" >
|
||||
<div *ngFor="let events of TimelinePRList | keyvalue;">
|
||||
|
||||
<div class="EventListBox-container" *ngIf="CalendarCurrentDay <= events.key">
|
||||
<div class="EventListBox-container" >
|
||||
|
||||
<div class="day mt-10" *ngIf="shoeEventDay(events.value)">
|
||||
<div class="day mt-10" >
|
||||
{{ TimelineDayEvent(events.key)}}
|
||||
</div>
|
||||
|
||||
<div *ngFor="let event of events.value" class="EventListBox" >
|
||||
|
||||
<div class="d-flex content-pr-{{event.event.CalendarName}} mt-10 cursor-pointer" (click)="eventClicked(event)"
|
||||
*ngIf="viewEventMonth <= dateMonth(event) && showEventBox(event) ">
|
||||
<div class="d-flex content-pr-{{event.event.CalendarName}} mt-10 cursor-pointer item hover" (click)="eventClicked(event)">
|
||||
|
||||
<div class="schedule-time" *ngIf="!event.event.IsAllDayEvent">
|
||||
<div *ngIf="!event.endMany && !event.middle" class="time-start">{{event.event.StartDate | date: 'HH:mm'}}</div>
|
||||
@@ -327,7 +326,7 @@
|
||||
</div>
|
||||
|
||||
<!-- New -->
|
||||
<app-new-event *ngIf="mobileComponent.showAddNewEvent"
|
||||
<app-new-event *ngIf="mobileComponent.showAddNewEvent"
|
||||
[profile]="profile"
|
||||
[selectedSegment]=segment
|
||||
[taskParticipants]="taskParticipants"
|
||||
@@ -345,7 +344,7 @@
|
||||
></app-new-event>
|
||||
|
||||
<!-- Edit -->
|
||||
<app-edit-event *ngIf="mobileComponent.showEditEvent"
|
||||
<app-edit-event *ngIf="mobileComponent.showEditEvent"
|
||||
[taskParticipants]="taskParticipants"
|
||||
[taskParticipantsCc]="taskParticipantsCc"
|
||||
[profile]="profile"
|
||||
@@ -432,4 +431,4 @@
|
||||
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
</ion-content>
|
||||
|
||||
@@ -25,8 +25,8 @@ import { LoginUserRespose } from 'src/app/models/user.model';
|
||||
import { DateAdapter } from '@angular/material/core';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { eventSource } from 'src/app/models/agenda/eventSource';
|
||||
import { eventListBox as eventListBoxComponent } from './eventListBox'
|
||||
import { CalendarService } from 'src/app/store/calendar.service';
|
||||
import { ListBoxService } from 'src/app/services/ageanda/list-box.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-agenda',
|
||||
@@ -123,8 +123,6 @@ export class AgendaPage implements OnInit {
|
||||
startTime: Date;
|
||||
endTime: Date;
|
||||
|
||||
eventListBoxComponent = new eventListBoxComponent()
|
||||
|
||||
mobileComponent = {
|
||||
showAddNewEvent: false,
|
||||
showEditEvent: false,
|
||||
@@ -162,7 +160,8 @@ export class AgendaPage implements OnInit {
|
||||
authService: AuthService,
|
||||
private dateAdapter: DateAdapter<any>,
|
||||
private toastService: ToastService,
|
||||
public calendarService: CalendarService
|
||||
public calendarService: CalendarService,
|
||||
private listBoxService: ListBoxService
|
||||
) {
|
||||
this.dateAdapter.setLocale('es');
|
||||
|
||||
@@ -192,6 +191,9 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
}, 1000)
|
||||
|
||||
|
||||
window['year'] = this.changeYear
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -291,6 +293,7 @@ export class AgendaPage implements OnInit {
|
||||
// calendar change date
|
||||
this.eventSelectedDate = new Date(ev);
|
||||
|
||||
this.updateEventListBox()
|
||||
};
|
||||
|
||||
// changedate
|
||||
@@ -359,9 +362,6 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
get CalendarCurrentDay ():any {
|
||||
|
||||
/* console.log(this.viewDate.getDate(), '0_0') */
|
||||
// console.log(this.viewDate.getDate(), '0_0')
|
||||
|
||||
return this.viewDate.getDate()
|
||||
}
|
||||
|
||||
@@ -457,7 +457,6 @@ export class AgendaPage implements OnInit {
|
||||
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) => {
|
||||
console.log(response);
|
||||
|
||||
|
||||
// calendar
|
||||
@@ -466,7 +465,7 @@ export class AgendaPage implements OnInit {
|
||||
// loop
|
||||
this.calendarService.pushEvent(response, 'md');
|
||||
|
||||
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
@@ -487,7 +486,7 @@ export class AgendaPage implements OnInit {
|
||||
// calendar
|
||||
this.calendarService.pushEvent(response, 'pr');
|
||||
|
||||
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
@@ -513,7 +512,7 @@ export class AgendaPage implements OnInit {
|
||||
this.calendarService.pushEvent(response, 'pr');
|
||||
|
||||
|
||||
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
|
||||
|
||||
this.myCal.update();
|
||||
@@ -541,7 +540,7 @@ export class AgendaPage implements OnInit {
|
||||
this.calendarService.pushEvent(eventsList, 'md');
|
||||
|
||||
|
||||
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
@@ -555,17 +554,13 @@ export class AgendaPage implements OnInit {
|
||||
}
|
||||
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.eventSource=[];
|
||||
|
||||
// clear the current month only
|
||||
this.calendarService.removeRange(startTime, endTime, 'pr')
|
||||
|
||||
const eventsList = response.filter(data => data.CalendarName == "Pessoal");
|
||||
this.calendarService.pushEvent(eventsList, 'pr');
|
||||
|
||||
|
||||
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
@@ -594,7 +589,7 @@ export class AgendaPage implements OnInit {
|
||||
this.calendarService.pushEvent(eventsList, 'md');
|
||||
|
||||
|
||||
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, {})
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
@@ -616,7 +611,7 @@ export class AgendaPage implements OnInit {
|
||||
this.calendarService.pushEvent(eventsList, 'pr');
|
||||
|
||||
|
||||
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
@@ -647,7 +642,7 @@ export class AgendaPage implements OnInit {
|
||||
// loop
|
||||
this.calendarService.pushEvent(eventsList, 'md');
|
||||
|
||||
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
@@ -676,7 +671,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
this.calendarService.pushEvent(eventsList, 'pr');
|
||||
|
||||
this.TimelinePRList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
this.TimelinePRList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
@@ -714,7 +709,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
this.calendarService.pushEvent(eventsList, 'pr');
|
||||
|
||||
this.TimelinePRList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
this.TimelinePRList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
|
||||
|
||||
this.myCal.update();
|
||||
@@ -741,175 +736,37 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
updateEventListBox() {
|
||||
|
||||
this.TimelinePRList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
this.TimelinePRList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
|
||||
}
|
||||
|
||||
eventListBox(list, nice?) {
|
||||
let days = {};
|
||||
changeYear = (year) => {
|
||||
const a = this.calendar.currentDate
|
||||
this.calendar.currentDate = new Date(`${year}-${a.getMonth()}-${a.getDay()}`);
|
||||
|
||||
try {
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
} catch(e) {}
|
||||
|
||||
list.forEach( (event:any)=> {
|
||||
this.updateEventListBox()
|
||||
|
||||
var startDate: any = new Date(event.start);
|
||||
|
||||
var endDate: any = this.EventTretment({
|
||||
startTime: startDate,
|
||||
endTime: event.end
|
||||
})
|
||||
|
||||
const day = (((new Date (event.start)).getDate())).toString().padStart(2,'0')
|
||||
|
||||
event.manyDays = false
|
||||
|
||||
|
||||
event.todayOnly = new Date(event.start).toLocaleDateString() == new Date(event.end).toLocaleDateString()
|
||||
|
||||
|
||||
|
||||
if(!days.hasOwnProperty(day)) {
|
||||
days[day] = []
|
||||
}
|
||||
|
||||
if (new Date(startDate).toLocaleDateString() != new Date(endDate).toLocaleDateString()) {
|
||||
|
||||
// difference
|
||||
const diffTime = Math.abs(endDate - startDate);
|
||||
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
||||
|
||||
if (diffDays <= 150 && !event.event.IsAllDayEvent ) {
|
||||
|
||||
|
||||
if (diffDays >= 1) {
|
||||
|
||||
const StartEvent = Object.assign({}, {
|
||||
title: event.title,
|
||||
start: event.start,
|
||||
end: event.end,
|
||||
color: event.color,
|
||||
id: event.id,
|
||||
index: event.index,
|
||||
profile: event.profile,
|
||||
CalendarName: event.CalendarName,
|
||||
event: {
|
||||
Subject: event.event.Subject,
|
||||
StartDate: event.event.StartDate,
|
||||
EndDate: event.event.EndDate,
|
||||
Location: event.event.Location,
|
||||
EventId: event.event.EventId,
|
||||
CalendarName: event.event.CalendarName
|
||||
},
|
||||
startMany: true,
|
||||
endMany: false,
|
||||
middle: false
|
||||
})
|
||||
|
||||
days[day].push(StartEvent)
|
||||
|
||||
let i = 1;
|
||||
|
||||
while (startDate.getFullYear() != endDate.getFullYear() ||
|
||||
startDate.getMonth() != endDate.getMonth() ||
|
||||
startDate.getDate() != endDate.getDate()) {
|
||||
|
||||
const newDate = startDate.setDate(startDate.getDate()+ i)
|
||||
|
||||
let otherDays = (((new Date (newDate)).getDate())).toString().padStart(2,'0')
|
||||
|
||||
event.other = true
|
||||
|
||||
event.start = newDate
|
||||
if(!days.hasOwnProperty(otherDays)) {
|
||||
|
||||
days[otherDays] = []
|
||||
}
|
||||
|
||||
if (!(startDate.getFullYear() != endDate.getFullYear() ||
|
||||
startDate.getMonth() != endDate.getMonth() ||
|
||||
startDate.getDate() != endDate.getDate())) {
|
||||
// last push
|
||||
|
||||
const EndEvent = Object.assign({}, {
|
||||
title: event.title,
|
||||
start: event.start,
|
||||
end: event.end,
|
||||
color: event.color,
|
||||
id: event.id,
|
||||
index: event.index,
|
||||
profile: event.profile,
|
||||
CalendarName: event.CalendarName,
|
||||
event: {
|
||||
Subject: event.event.Subject,
|
||||
StartDate: event.event.StartDate,
|
||||
EndDate: event.event.EndDate,
|
||||
Location: event.event.Location,
|
||||
EventId: event.event.EventId,
|
||||
CalendarName: event.event.CalendarName
|
||||
},
|
||||
Subject: event.Subject,
|
||||
startMany: false,
|
||||
endMany: true,
|
||||
middle: false
|
||||
})
|
||||
|
||||
days[otherDays].push(EndEvent)
|
||||
|
||||
} else {
|
||||
const EndEvent = Object.assign({}, {
|
||||
title: event.title,
|
||||
start: event.start,
|
||||
end: event.end,
|
||||
color: event.color,
|
||||
id: event.id,
|
||||
index: event.index,
|
||||
profile: event.profile,
|
||||
CalendarName: event.CalendarName,
|
||||
event: {
|
||||
Subject: event.event.Subject,
|
||||
StartDate: event.event.StartDate,
|
||||
EndDate: event.event.EndDate,
|
||||
Location: event.event.Location,
|
||||
EventId: event.event.EventId,
|
||||
CalendarName: event.event.CalendarName
|
||||
},
|
||||
Subject: event.Subject,
|
||||
startMany: false,
|
||||
endMany: true,
|
||||
middle: true
|
||||
})
|
||||
days[otherDays].push(EndEvent)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
days[day].push(event)
|
||||
|
||||
}
|
||||
} else {
|
||||
days[day].push(event)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
days[day].push(event)
|
||||
|
||||
})
|
||||
|
||||
setTimeout(()=>{
|
||||
document.querySelectorAll('.EventListBox-container .EventListBox').forEach((e)=>{
|
||||
if(e.childElementCount == 0) {
|
||||
e.parentElement.style.display = 'none'
|
||||
} else {
|
||||
e.parentElement.style.display = 'block'
|
||||
}
|
||||
})
|
||||
}, 10)
|
||||
|
||||
return days
|
||||
}
|
||||
|
||||
changeMonth = (month) => {
|
||||
const a = this.calendar.currentDate
|
||||
this.calendar.currentDate = new Date(`${a.getFullYear()}-${month}-${a.getDay()}`);
|
||||
|
||||
try {
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
} catch(e) {}
|
||||
|
||||
this.updateEventListBox()
|
||||
}
|
||||
|
||||
|
||||
get viewEventMonth () {
|
||||
return this.viewDate.getMonth()
|
||||
}
|
||||
@@ -941,13 +798,13 @@ export class AgendaPage implements OnInit {
|
||||
if(this.profile == "mdgpr") {
|
||||
this.profile ="pr";
|
||||
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
||||
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
|
||||
}
|
||||
else {
|
||||
this.profile ="mdgpr";
|
||||
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
||||
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
|
||||
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1233,36 +1090,11 @@ export class AgendaPage implements OnInit {
|
||||
}
|
||||
this.showTimelineFilterState = false;
|
||||
|
||||
setTimeout(()=>{
|
||||
document.querySelectorAll('.EventListBox-container .EventListBox').forEach((e)=>{
|
||||
if(e.childElementCount == 0) {
|
||||
e.parentElement.style.display = 'none'
|
||||
} else {
|
||||
e.parentElement.style.display = 'block'
|
||||
}
|
||||
})
|
||||
}, 10)
|
||||
|
||||
// THIS LINE
|
||||
this.updateEventListBox()
|
||||
|
||||
|
||||
setTimeout(()=>{
|
||||
document.querySelectorAll('.EventListBox-container .EventListBox').forEach((e)=>{
|
||||
if(e.childElementCount == 0) {
|
||||
e.parentElement.style.display = 'none'
|
||||
} else {
|
||||
e.parentElement.style.display = 'block'
|
||||
}
|
||||
})
|
||||
}, 100)
|
||||
|
||||
}
|
||||
|
||||
async showEventBox(event) {
|
||||
|
||||
if ( event.event.CalendarName == this.segment || this.segment == 'Combinado') {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<ion-content class="container">
|
||||
<ion-content class="wrapper">
|
||||
<div class="arrow-right" (click)="closePopover()">
|
||||
<button class="btn-no-color">
|
||||
<ion-icon slot="end" class="arrow-right-icon" src='assets/images/icons-arrow-arrow-right.svg'></ion-icon>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.container{
|
||||
.wrapper{
|
||||
--padding-top:20px !important;
|
||||
--padding-bottom:20px !important;
|
||||
--padding-start:20px !important;
|
||||
@@ -55,4 +55,4 @@
|
||||
/* .solid{
|
||||
display: block;
|
||||
} */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,244 +0,0 @@
|
||||
import { eventSource } from 'src/app/models/agenda/eventSource';
|
||||
import { setHours, setMinutes } from 'date-fns';
|
||||
|
||||
export class eventListBox {
|
||||
|
||||
constructor(){}
|
||||
|
||||
EventEndDateTreatment ({startTime, endTime}) {
|
||||
|
||||
const startTimeSamp = new Date(startTime).toLocaleDateString()
|
||||
const endTimeSamp = new Date(endTime).toLocaleDateString()
|
||||
|
||||
const endMinutes = new Date(endTime).getMinutes()
|
||||
const endHours = new Date(endTime).getHours()
|
||||
|
||||
|
||||
if (startTimeSamp < endTimeSamp && (endMinutes + endHours) == 0) {
|
||||
endTime = new Date(endTime);
|
||||
endTime.setSeconds(endTime.getSeconds() - 1);
|
||||
return new Date(endTime)
|
||||
} else {
|
||||
return new Date(endTime)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
filterProfile(eventSource: eventSource[], profile: 'md' | 'pr' | 'all') {
|
||||
return eventSource.filter((e) => e.profile == profile)
|
||||
}
|
||||
|
||||
getEventInsideRange(eventSource: eventSource[], rangeStartDate, randEndDate) {
|
||||
return eventSource.filter((e)=> {
|
||||
if(new Date(rangeStartDate).getTime() <= new Date(e.startTime).getTime() &&
|
||||
new Date(randEndDate).getTime() >= new Date(e.endTime).getTime()) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
})
|
||||
}
|
||||
|
||||
daysBetween(){ }
|
||||
|
||||
list(eventSource: eventSource[], profile: 'md' | 'pr' | 'all', rangeStartDate, randEndDate, calendarDate) {
|
||||
|
||||
if(profile != 'all') {
|
||||
eventSource = this.filterProfile(eventSource, profile)
|
||||
}
|
||||
|
||||
eventSource = this.getEventInsideRange(eventSource, rangeStartDate, randEndDate)
|
||||
|
||||
if(profile == 'md') {
|
||||
eventSource = this.encapsulation(eventSource, 'mdgpr');
|
||||
} else {
|
||||
eventSource = this.encapsulation(eventSource, 'pr');
|
||||
}
|
||||
|
||||
return this.display(eventSource)
|
||||
}
|
||||
|
||||
display(list) {
|
||||
let days = {};
|
||||
|
||||
list.forEach( (event:any, index)=> {
|
||||
|
||||
var startDate: any = new Date(event.start);
|
||||
|
||||
var endDate: any = this.EventEndDateTreatment({
|
||||
startTime: startDate,
|
||||
endTime: event.end
|
||||
})
|
||||
|
||||
const day = (((new Date (event.start)).getDate())).toString().padStart(2,'0')
|
||||
|
||||
event.manyDays = false
|
||||
|
||||
event.todayOnly = new Date(event.start).toLocaleDateString() == new Date(event.end).toLocaleDateString()
|
||||
|
||||
if(!days.hasOwnProperty(day)) {
|
||||
days[day] = []
|
||||
}
|
||||
|
||||
if (new Date(startDate).toLocaleDateString() != new Date(endDate).toLocaleDateString()) {
|
||||
|
||||
const diffTime = Math.abs(endDate - startDate);
|
||||
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
||||
|
||||
if (diffDays <= 150 && !event.event.IsAllDayEvent ) {
|
||||
|
||||
if (diffDays >= 1) {
|
||||
|
||||
const StartEvent = Object.assign({}, {
|
||||
title: event.title,
|
||||
start: event.start,
|
||||
end: event.end,
|
||||
color: event.color,
|
||||
id: event.id,
|
||||
index: event.index,
|
||||
profile: event.profile,
|
||||
CalendarName: event.CalendarName,
|
||||
event: {
|
||||
Subject: event.event.Subject,
|
||||
StartDate: event.event.StartDate,
|
||||
EndDate: event.event.EndDate,
|
||||
Location: event.event.Location,
|
||||
EventId: event.event.EventId,
|
||||
CalendarName: event.event.CalendarName
|
||||
},
|
||||
startMany: true,
|
||||
endMany: false,
|
||||
middle: false
|
||||
})
|
||||
|
||||
days[day].push(StartEvent)
|
||||
|
||||
let i = 1;
|
||||
|
||||
while (startDate.getFullYear() != endDate.getFullYear() ||
|
||||
startDate.getMonth() != endDate.getMonth() ||
|
||||
startDate.getDate() != endDate.getDate()) {
|
||||
|
||||
const newDate = startDate.setDate(startDate.getDate()+ i)
|
||||
|
||||
let otherDays = (((new Date (newDate)).getDate())).toString().padStart(2,'0')
|
||||
|
||||
event.other = true
|
||||
|
||||
event.start = newDate
|
||||
if(!days.hasOwnProperty(otherDays)) {
|
||||
|
||||
days[otherDays] = []
|
||||
}
|
||||
|
||||
if (!(startDate.getFullYear() != endDate.getFullYear() ||
|
||||
startDate.getMonth() != endDate.getMonth() ||
|
||||
startDate.getDate() != endDate.getDate())) {
|
||||
// last push
|
||||
|
||||
const EndEvent = Object.assign({}, {
|
||||
title: event.title,
|
||||
start: event.start,
|
||||
end: event.end,
|
||||
color: event.color,
|
||||
id: event.id,
|
||||
index: event.index,
|
||||
profile: event.profile,
|
||||
CalendarName: event.CalendarName,
|
||||
event: {
|
||||
Subject: event.event.Subject,
|
||||
StartDate: event.event.StartDate,
|
||||
EndDate: event.event.EndDate,
|
||||
Location: event.event.Location,
|
||||
EventId: event.event.EventId,
|
||||
CalendarName: event.event.CalendarName
|
||||
},
|
||||
Subject: event.Subject,
|
||||
startMany: false,
|
||||
endMany: true,
|
||||
middle: false
|
||||
})
|
||||
|
||||
days[otherDays].push(EndEvent)
|
||||
|
||||
} else {
|
||||
const EndEvent = Object.assign({}, {
|
||||
title: event.title,
|
||||
start: event.start,
|
||||
end: event.end,
|
||||
color: event.color,
|
||||
id: event.id,
|
||||
index: event.index,
|
||||
profile: event.profile,
|
||||
CalendarName: event.CalendarName,
|
||||
event: {
|
||||
Subject: event.event.Subject,
|
||||
StartDate: event.event.StartDate,
|
||||
EndDate: event.event.EndDate,
|
||||
Location: event.event.Location,
|
||||
EventId: event.event.EventId,
|
||||
CalendarName: event.event.CalendarName
|
||||
},
|
||||
Subject: event.Subject,
|
||||
startMany: false,
|
||||
endMany: true,
|
||||
middle: true
|
||||
})
|
||||
days[otherDays].push(EndEvent)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
days[day].push(event)
|
||||
|
||||
}
|
||||
} else {
|
||||
days[day].push(event)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
days[day].push(event)
|
||||
|
||||
})
|
||||
|
||||
setTimeout(()=>{
|
||||
document.querySelectorAll('.EventListBox-container .EventListBox').forEach((e)=>{
|
||||
if(e.childElementCount == 0) {
|
||||
e.parentElement.style.display = 'none'
|
||||
} else {
|
||||
e.parentElement.style.display = 'block'
|
||||
}
|
||||
})
|
||||
}, 10)
|
||||
return days
|
||||
}
|
||||
|
||||
encapsulation(eventsList, profile) {
|
||||
|
||||
// remove all event
|
||||
let events = [];
|
||||
|
||||
eventsList.forEach((element, eventIndex) => {
|
||||
|
||||
events.push({
|
||||
start: new Date(element.StartDate || element.startTime),
|
||||
end: new Date(element.EndDate || element.endTime),
|
||||
color: {
|
||||
primary: '#0000',
|
||||
secondary: '#0000'
|
||||
},
|
||||
id: element.EventId || element.id,
|
||||
index: eventIndex,
|
||||
profile: profile,
|
||||
CalendarName: element.calendarName,
|
||||
event: element.event,
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
return events;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -42,7 +42,7 @@
|
||||
<div class="width-100" [ngSwitch]="segment">
|
||||
<ion-list *ngSwitchCase="'Contactos'">
|
||||
<ion-item-sliding>
|
||||
<div class="item width-100 d-flex ion-no-padding ion-no-margin"
|
||||
<div class="item item-hover width-100 d-flex ion-no-padding ion-no-margin"
|
||||
*ngFor="let dm of userDirectMessages"
|
||||
[class.item-active]="dm._id ==idSelected">
|
||||
<div class="item-icon">
|
||||
@@ -76,7 +76,7 @@
|
||||
<ion-item-sliding>
|
||||
<div *ngFor="let group of allGroups"
|
||||
[class.item-active]="group._id ==idSelected"
|
||||
class="item d-flex">
|
||||
class="item item-hover d-flex">
|
||||
<div class="item-icon">
|
||||
<ion-icon class="icon" slot="start" src="assets/images/icons-chat-group-chat-40.svg"></ion-icon>
|
||||
</div>
|
||||
@@ -86,7 +86,7 @@
|
||||
<div class="item-title" [class.item-title-active]="group._id ==idSelected">
|
||||
<ion-label>{{group.name.split('-').join(' ')}}</ion-label>
|
||||
</div>
|
||||
<div class="item-date" [class.item-date-active]="group._id ==idSelected" *ngIf="group.lastMessage">{{group.lastMessage._updatedAt | date: 'HH:mm'}}</div>
|
||||
<div class="item-date" [class.item-date-active]="group._id ==idSelected" *ngIf="group.lastMessage">{{showDateDuration(group._updatedAt)}}</div>
|
||||
</div>
|
||||
<div class="item-description" [class.item-description-active]="group._id ==idSelected" *ngIf="group.lastMessage">
|
||||
<ion-label>{{group.lastMessage.u.name}}: {{group.lastMessage.msg}}</ion-label>
|
||||
@@ -113,6 +113,7 @@
|
||||
(showEmptyContainer)="showEmptyContainer()"
|
||||
(showEmptyContainer)="showEmptyContainer()"
|
||||
(openNewEventPage)="openNewEventPage($event)"
|
||||
(getDirectMessages)="getDirectMessages($event)"
|
||||
[style.display]="showMessages ? 'flex' : 'none'"
|
||||
[roomId]="roomId"
|
||||
[showMessages]="showMessages" #messagecontainer>
|
||||
@@ -156,6 +157,7 @@
|
||||
(openGroupContacts)="openGroupContactsPage($event)"
|
||||
(openEditGroupPage)="openEditGroupPage($event)"
|
||||
(openNewEventPage)="openNewEventPage($event)"
|
||||
(getGroups)="getGroups($event)"
|
||||
[style.display]="showGroupMessages ? 'flex' : 'none'"
|
||||
class=" height-100 flex-column"
|
||||
[roomId]="roomId" #messagecontainer>
|
||||
|
||||
@@ -122,6 +122,7 @@ ion-content{
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.item-active{
|
||||
color: #fff !important;
|
||||
background-color: #42b9fe !important;
|
||||
|
||||
@@ -120,6 +120,11 @@ export class ChatPage implements OnInit {
|
||||
){
|
||||
this.loggedUserChat = authService.ValidatedUserChat['data'];
|
||||
this.headers = new HttpHeaders();
|
||||
window.onresize = (event) => {
|
||||
if( window.innerWidth > 701){
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -374,11 +379,11 @@ hideRefreshButton(){
|
||||
});
|
||||
}
|
||||
|
||||
async getDirectMessages(){
|
||||
async getDirectMessages(event?){
|
||||
|
||||
this.chatService.getAllDirectMessages().subscribe(async (res:any)=>{
|
||||
|
||||
if(res.ims != 200){
|
||||
if(res != 200){
|
||||
console.log(res.ims);
|
||||
this.userDirectMessages = res.ims.sort((a,b)=>{
|
||||
var dateA = new Date(a._updatedAt).getTime();
|
||||
@@ -391,12 +396,17 @@ hideRefreshButton(){
|
||||
console.log("Timer message stop")
|
||||
}
|
||||
else {
|
||||
console.log('TIMER');
|
||||
//Check if modal is opened
|
||||
if(this.segment == "Contactos" && this.showMessages != true){
|
||||
await new Promise(resolve => setTimeout(resolve, 5000));
|
||||
await new Promise(resolve => setTimeout(resolve, 2000));
|
||||
await this.getDirectMessages();
|
||||
console.log('Timer contactos list running')
|
||||
}
|
||||
else{
|
||||
console.log('No timer!');
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
@@ -452,7 +462,7 @@ hideRefreshButton(){
|
||||
});
|
||||
}
|
||||
|
||||
async getGroups(){
|
||||
async getGroups(event?){
|
||||
this.result = this.chatService.getAllPrivateGroups().subscribe(async (res:any)=>{
|
||||
|
||||
if(res.groups != 200){
|
||||
@@ -474,7 +484,7 @@ hideRefreshButton(){
|
||||
else {
|
||||
//Check if modal is opened
|
||||
if(this.segment == "Grupos" && this.showGroupMessages != true){
|
||||
await new Promise(resolve => setTimeout(resolve, 5000));
|
||||
await new Promise(resolve => setTimeout(resolve, 2000));
|
||||
await this.getGroups();
|
||||
console.log('Timer groups list running')
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, ElementRef, OnInit, ViewChild, AfterViewChecked, AfterViewInit, OnDestroy } from '@angular/core';
|
||||
import { Component, ElementRef, OnInit, ViewChild, AfterViewChecked, AfterViewInit, OnDestroy, } from '@angular/core';
|
||||
import { ActionSheetController, MenuController, ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
@@ -10,6 +10,7 @@ import { NewGroupPage } from '../new-group/new-group.page';
|
||||
import { GroupContactsPage } from './group-contacts/group-contacts.page';
|
||||
import {Router} from '@angular/router'
|
||||
import { EditGroupPage } from '../edit-group/edit-group.page';
|
||||
import { TimeService } from 'src/app/services/functions/time.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-group-messages',
|
||||
@@ -49,11 +50,17 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
private navParams: NavParams,
|
||||
private authService: AuthService,
|
||||
private alertService: AlertService,
|
||||
private route: Router
|
||||
private route: Router,
|
||||
private timeService: TimeService,
|
||||
) {
|
||||
this.loggedUserChat = authService.ValidatedUserChat['data'];
|
||||
this.isGroupCreated = true;
|
||||
this.roomId = this.navParams.get('roomId');
|
||||
window.onresize = (event) => {
|
||||
if( window.innerWidth > 701){
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -173,7 +180,8 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
}
|
||||
|
||||
showDateDuration(start:any){
|
||||
let end;
|
||||
return this.timeService.showDateDuration(start);
|
||||
/* let end;
|
||||
end = new Date();
|
||||
start = new Date(start);
|
||||
let customizedDate;
|
||||
@@ -199,7 +207,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
else{
|
||||
let date = start.getDate() + "/" + (start.getMonth()+1) + "/" + start.getFullYear();
|
||||
return date;
|
||||
}
|
||||
} */
|
||||
}
|
||||
|
||||
addZero(i) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { AfterViewChecked, AfterViewInit, Component, ElementRef, OnDestroy, OnInit, ViewChild } from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router'
|
||||
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { ContactsPage } from 'src/app/pages/chat/messages/contacts/contacts.page';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
@@ -59,6 +60,12 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
}); */
|
||||
this.loggedUser = authService.ValidatedUserChat['data'];
|
||||
this.roomId = this.navParams.get('roomId');
|
||||
|
||||
window.onresize = (event) => {
|
||||
if( window.innerWidth > 701){
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -151,7 +158,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
loadMessages() {
|
||||
this.showLoader = true;
|
||||
const roomId = this.roomId
|
||||
|
||||
|
||||
this.chatService.getRoomMessages(this.roomId).subscribe(res => {
|
||||
/* console.log(res); */
|
||||
this.messages = res['messages'].reverse();
|
||||
@@ -254,9 +261,17 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
async serverLongPull() {
|
||||
|
||||
const roomId = this.roomId
|
||||
|
||||
/* this.chatService.getRoomMessages(roomId).subscribe(res=>{
|
||||
console.log(res);
|
||||
|
||||
}) */
|
||||
|
||||
|
||||
this.chatService.getRoomMessages(roomId).subscribe(async res => {
|
||||
console.log("Chat message",res)
|
||||
|
||||
|
||||
if (res == 502) {
|
||||
// Connection timeout
|
||||
// happens when the synchro was pending for too long
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { EventsPageRoutingModule } from './events-routing.module';
|
||||
|
||||
import { EventsPage } from './events.page';
|
||||
// import { SharedModule } from 'src/app/shared/shared.module';
|
||||
|
||||
import { HeaderNoSearchPageModule } from 'src/app/shared/headers/header-no-search/header-no-search.module';
|
||||
import { HeaderPageModule } from 'src/app/shared/header/header.module';
|
||||
import { PdfViewerModule } from 'ng2-pdf-viewer';
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
|
||||
<div class="conteiner-box px-20 height-100 overflow-y-auto" ng-swipe-up="swipe($event)">
|
||||
<div class="schedule">
|
||||
<div class="conteiner-box px-20 height-100" ng-swipe-up="swipe($event)">
|
||||
<div class="schedule height-100">
|
||||
<div class="schedule-header">
|
||||
<div class="title">
|
||||
<ion-icon class="icon" slot="end" src="assets/images/icons-default-agenda.svg" ></ion-icon>
|
||||
@@ -42,12 +42,12 @@
|
||||
></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="content overflow-y-auto flex-grow-1 height-100">
|
||||
|
||||
<!-- {{ toDayEventStorage.eventsList | json}} -->
|
||||
|
||||
<ion-list>
|
||||
<ion-item class="cursor-pointer" lines="none" *ngFor="let event of toDayEventStorage.eventsList"
|
||||
<ion-item class="item-hover cursor-pointer" lines="none" *ngFor="let event of toDayEventStorage.eventsList"
|
||||
(click)="goToEvent(event.EventId)"
|
||||
>
|
||||
<div class="d-flex content-{{loggeduser.Profile}}-{{event.CalendarName}}">
|
||||
@@ -82,7 +82,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="schedule">
|
||||
<div class="schedule height-100">
|
||||
<div class="schedule-header">
|
||||
<div class="title">
|
||||
<ion-icon class="icon" slot="end" src="assets/images/icons-correspondencias.svg"></ion-icon>
|
||||
@@ -92,10 +92,10 @@
|
||||
<ion-icon class="icon-next" slot="end" src="assets/images/icons-arrow-circle-arrow-right.svg"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="content overflow-y-auto flex-grow-1 height-100">
|
||||
<ion-list>
|
||||
<ion-item class="cursor-pointer" lines="none" *ngFor = "let task of expedienteGdStore.list"
|
||||
(click)="goToExpediente(task.serialNumber)">
|
||||
<ion-item class="item-hover cursor-pointer" lines="none" *ngFor = "let task of expedienteGdStore.list"
|
||||
(click)="goToExpediente(task.SerialNumber)">
|
||||
<div class="item-exp d-flex">
|
||||
<div class="schedule-date">
|
||||
<div class="time-end">{{task.taskStartDate | date: 'dd-MM-yyyy'}}</div>
|
||||
@@ -113,7 +113,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <pdf-viewer [src]="pdfSrc"
|
||||
[render-text]="true"
|
||||
style="display: block;"
|
||||
|
||||
@@ -81,7 +81,7 @@ ion-toolbar{
|
||||
margin-right: 5px;
|
||||
line-height: 25px;
|
||||
}
|
||||
|
||||
|
||||
.p-small{
|
||||
font-size: 13pt;
|
||||
margin-top: 13px;
|
||||
@@ -90,7 +90,7 @@ ion-toolbar{
|
||||
text-align: right;
|
||||
/* color: #ffffff; */
|
||||
}
|
||||
|
||||
|
||||
/* CONTENT */
|
||||
.item-list-small{
|
||||
font-size: 14px;
|
||||
@@ -98,14 +98,14 @@ ion-toolbar{
|
||||
}
|
||||
.ion-item-class{
|
||||
padding: 0;
|
||||
|
||||
|
||||
}
|
||||
.label-text{
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
||||
//DIV
|
||||
.div-item-Oficial{
|
||||
width: 100%;
|
||||
@@ -146,7 +146,7 @@ ion-toolbar{
|
||||
.div-icon ion-icon{
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
|
||||
|
||||
}
|
||||
.div-content-Oficial{
|
||||
width: 85%;
|
||||
@@ -312,7 +312,7 @@ ion-toolbar{
|
||||
color: var(--white);
|
||||
margin-right: 7px;
|
||||
}
|
||||
|
||||
|
||||
.meeting-description {
|
||||
margin-top: 2px;
|
||||
font-family: Roboto;
|
||||
@@ -325,30 +325,38 @@ ion-toolbar{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
.schedule {
|
||||
max-width: 400px;
|
||||
font-family: Roboto;
|
||||
margin: 10px 0px;
|
||||
padding: 20px;
|
||||
background-color: white;
|
||||
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.07);
|
||||
box-shadow: 0 0 10px 0 rgb(0 0 0 / 7%);
|
||||
border: solid 1px #e9e9e9;
|
||||
margin-bottom: 20px;
|
||||
border-radius: 25px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-height: 100%;
|
||||
overflow: auto;
|
||||
padding-bottom: 25px;
|
||||
|
||||
.schedule-header{
|
||||
display: flex;
|
||||
margin-bottom: 20px;
|
||||
justify-content: space-between;
|
||||
padding: 20px 20px 0px 20px;
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.icon{
|
||||
color: #e8e8e8;
|
||||
height: 35px;
|
||||
width: 35px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.text{
|
||||
font-family: Roboto;
|
||||
font-size: 20px;
|
||||
@@ -364,10 +372,15 @@ ion-toolbar{
|
||||
}
|
||||
}
|
||||
.content{
|
||||
//padding: 0px 20px 20px 20px;
|
||||
overflow: auto;
|
||||
|
||||
.item-exp{
|
||||
overflow: auto;
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
//padding-top: 5px;
|
||||
//padding-bottom: 5px;
|
||||
padding: 5px 20px 5px 20px;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
ion-list{
|
||||
padding: 0px;
|
||||
@@ -385,6 +398,8 @@ ion-toolbar{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
--background: transparent !important;
|
||||
|
||||
.schedule-time{
|
||||
margin-right: 10px;
|
||||
.time-start{
|
||||
@@ -414,7 +429,7 @@ ion-toolbar{
|
||||
font-size: 13px;
|
||||
color: black;
|
||||
width: 100%;
|
||||
|
||||
|
||||
}
|
||||
.description{
|
||||
width: 100%;
|
||||
@@ -442,7 +457,7 @@ ion-toolbar{
|
||||
padding-bottom: unset !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.resume{
|
||||
@@ -473,6 +488,18 @@ ion-toolbar{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@media only screen and (max-width: 856px) {
|
||||
|
||||
.content, .conteiner-box{
|
||||
height: unset !important;
|
||||
max-height: unset !important;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@media only screen and (min-width: 804px) {
|
||||
|
||||
.schedule:first-child {
|
||||
@@ -496,4 +523,4 @@ ion-toolbar{
|
||||
ion-title{
|
||||
border: 1px solid red;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ export class EventsPage implements OnInit {
|
||||
|
||||
customText = false;
|
||||
totalEvent=0;
|
||||
currentHoursMinutes: Date;
|
||||
currentHoursMinutes: Date | string;
|
||||
|
||||
showLoader: boolean;
|
||||
|
||||
@@ -95,7 +95,7 @@ export class EventsPage implements OnInit {
|
||||
|
||||
this.platform.resize.subscribe(async () => {
|
||||
//console.log('Resize event detected');
|
||||
console.log('Resize event detected');
|
||||
// console.log('Resize event detected');
|
||||
|
||||
});
|
||||
|
||||
@@ -351,7 +351,7 @@ export class EventsPage implements OnInit {
|
||||
this.router.navigate(['/home/events', eventId, 'events']);
|
||||
}
|
||||
|
||||
goToExpediente(SerialNumber:any){
|
||||
goToExpediente(SerialNumber:any) {
|
||||
if(this.loggeduser.Profile == 'MDGPR'){
|
||||
this.router.navigate(['/home/events/expediente', SerialNumber, 'events']);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<app-header></app-header>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
<div class="main-content d-flex height-100 px-20">
|
||||
<div class="main-content d-flex height-100 pl-20 overflow-hidden">
|
||||
<div class="content d-flex flex-column" *ngIf="task">
|
||||
<div class="main-header" >
|
||||
<div class="title-content width-100 d-flex justify-space-between align-center">
|
||||
@@ -40,7 +40,6 @@
|
||||
</ion-item>
|
||||
</div>
|
||||
<div *ngIf="cc!='' && cc!=' ' ">
|
||||
.. {{ cc | json }} ..
|
||||
|
||||
<h5 *ngIf="cc.length > 0">Com conhecimento</h5>
|
||||
<ion-item *ngIf="cc.length > 0" class="ion-no-margin ion-no-padding">
|
||||
@@ -76,8 +75,8 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div *ngIf="task" class="aside-right flex-column height-100 px-20">
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Tarefa de Despacho'">
|
||||
<div *ngIf="task" class="aside-right flex-column height-100 overflow-y-auto">
|
||||
<div class="buttons px-20" *ngIf="task.activityInstanceName == 'Tarefa de Despacho'">
|
||||
<div class="option-desc"> <div>Responder ao PR</div> </div>
|
||||
<button (click)="openAddNoteModal('Executado')" class="btn-cancel mb-0" style="margin-bottom: 0px !important;" shape="round" >Executado</button>
|
||||
<!-- <div class="solid"></div> -->
|
||||
@@ -92,7 +91,7 @@
|
||||
<!-- <div class="solid"></div> -->
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
</div>
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Despacho'">
|
||||
<div class="buttons px-20" *ngIf="task.activityInstanceName == 'Concluir Despacho'">
|
||||
<button (click)="openAddNoteModal('Concluido')" class="btn-cancel" shape="round" >Marcar como Concluído</button>
|
||||
<button (click)="openAddNoteModal('Reexecução')" class="btn-cancel" shape="round" >Enviar para Reexecução</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<div class="main-content d-flex height-100">
|
||||
<div class="main-content d-flex height-100 overflow-hidden">
|
||||
<div class="content d-flex flex-column" *ngIf="task">
|
||||
<div class="main-header">
|
||||
<div class="title-content width-100 d-flex justify-space-between align-center">
|
||||
@@ -83,7 +83,7 @@
|
||||
|
||||
|
||||
|
||||
<div *ngIf="task" class="aside-right flex-column height-100">
|
||||
<div *ngIf="task" class="aside-right flex-column height-100 overflow-y-auto">
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Tarefa de Despacho'">
|
||||
<div class="option-desc" *ngIf="task.WorkflowName == 'Despacho do Presidente da República' "> <div>Responder ao PR</div> </div>
|
||||
<button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button>
|
||||
|
||||
@@ -52,7 +52,7 @@ export class DespachoPage implements OnInit {
|
||||
private despachoService: DespachoService,
|
||||
private location: Location,
|
||||
public p: PermissionService,
|
||||
|
||||
|
||||
|
||||
) {
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<div class="main-content d-flex height-100">
|
||||
<div class="main-content d-flex height-100 overflow-hidden">
|
||||
<div class="content d-flex flex-column" *ngIf="task">
|
||||
<div class="main-header">
|
||||
<div class="title-content width-100 d-flex justify-space-between">
|
||||
@@ -74,7 +74,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="task" class="aside-right flex-column height-100">
|
||||
<div *ngIf="task" class="aside-right flex-column height-100 overflow-y-auto">
|
||||
<div class="buttons">
|
||||
<button (click)="Assinar()" class="btn-cancel" shape="round" >Assinado</button>
|
||||
<div class="solid"></div>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<div class="main-content d-flex height-100">
|
||||
<div class="main-content d-flex height-100 overflow-hidden">
|
||||
<div class="content d-flex flex-column" *ngIf="task">
|
||||
<div class="main-header">
|
||||
<div class="title-content width-100 d-flex justify-space-between">
|
||||
@@ -73,7 +73,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="task" class="aside-right flex-column height-100">
|
||||
<div *ngIf="task" class="aside-right flex-column height-100 overflow-y-auto">
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Revisar Diploma'">
|
||||
<button (click)="openAddNoteModal('Solicitar assinatura')" class="btn-cancel" shape="round" >Solicitar assinatura do Presidente</button>
|
||||
<button (click)="openAddNoteModal('Solicitar alteração')" class="btn-cancel" shape="round" >Solicitar alteração</button>
|
||||
|
||||
@@ -44,7 +44,7 @@ export class DiplomaPage implements OnInit {
|
||||
private location: Location,
|
||||
) {
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
console.log(params["params"]);
|
||||
// console.log(params["params"]);
|
||||
|
||||
if(params["params"].SerialNumber) {
|
||||
this.serialNumber = params["params"].SerialNumber;
|
||||
|
||||
@@ -51,7 +51,7 @@ export class ApproveEventPage implements OnInit {
|
||||
private location: Location,
|
||||
) {
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
console.log(params["params"]);
|
||||
// console.log(params["params"]);
|
||||
|
||||
if(params["params"].serialNumber) {
|
||||
this.serialNumber = params["params"].serialNumber;
|
||||
|
||||
+5
-4
@@ -226,7 +226,7 @@ export class BookMeetingModalPage implements OnInit {
|
||||
this.runValidation()
|
||||
if(this.Form.invalid) return false
|
||||
}
|
||||
|
||||
|
||||
let Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
||||
|
||||
this.eventBody={
|
||||
@@ -284,15 +284,16 @@ export class BookMeetingModalPage implements OnInit {
|
||||
|
||||
}
|
||||
else if(this.task.FsId == '361') {
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
try {
|
||||
switch (this.loggeduser.Profile) {
|
||||
case 'MDGPR':
|
||||
await this.calendarService.createTaskEvent(this.task.FolderId, this.postData, "md",this.task.SerialNumber, this.task.FsId).toPromise();
|
||||
await this.calendarService.createTaskEvent(this.task.FolderID | this.task.FolderId, this.postData, "md",this.task.SerialNumber, this.task.FsId).toPromise();
|
||||
break;
|
||||
|
||||
case 'PR':
|
||||
await this.calendarService.createTaskEvent(this.task.FolderId, this.postData, "pr",this.task.SerialNumber, this.task.FsId).toPromise();
|
||||
await this.calendarService.createTaskEvent(this.task.FolderID | this.task.FolderId, this.postData, "pr",this.task.SerialNumber, this.task.FsId).toPromise();
|
||||
break;
|
||||
}
|
||||
this.close();
|
||||
@@ -307,7 +308,7 @@ export class BookMeetingModalPage implements OnInit {
|
||||
}
|
||||
|
||||
if(true) {
|
||||
//
|
||||
//
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -95,7 +95,7 @@
|
||||
<div class="option-desc"> <div>Outras opções</div> </div>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
|
||||
<button *ngIf="!p.userRole(['PR'])" (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button *ngIf="!p.userRole(['PR'])" (click)="attachDocument()" class="btn-cancel" shape="round" >Anexar Documentos</button>
|
||||
<button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Descartar</button>
|
||||
|
||||
+6
-8
@@ -382,19 +382,17 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then( async(res)=>{
|
||||
alert('AQUI')
|
||||
let body = res['data'];
|
||||
if(res['data']) {
|
||||
|
||||
//await this.distartExpedientModal(body);
|
||||
const loader = this.toastService.loading()
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
//this.toastService.successMessage('Processo descartado');
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não descartado')
|
||||
} finally {
|
||||
loader.remove()
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não descartado')
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</div>
|
||||
|
||||
<ion-content>
|
||||
<div class="main-content d-flex height-100">
|
||||
<div 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">
|
||||
@@ -104,7 +104,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="task" class="aside-right flex-column height-100">
|
||||
<div *ngIf="task" class="aside-right flex-column height-100 overflow-y-auto">
|
||||
<div *ngIf="loggeduser.Profile =='MDGPR' " class="buttons">
|
||||
<button (click)="openAddNoteModal('Aprovar')" class="btn-cancel" shape="round" >Aprovar</button>
|
||||
<button (click)="openAddNoteModal('Revisão')" class="btn-cancel" shape="round" >Mandar para Revisão</button>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<div class="listview">
|
||||
<ion-list *ngIf="allProcessesList">
|
||||
<div
|
||||
class="item-wrapper ion-no-padding cursor-pointer"
|
||||
class="item-wrapper box-hover ion-no-padding cursor-pointer"
|
||||
*ngFor = "let task of allProcessesList"
|
||||
(click)="goToProcess(task.SerialNumber, task.WorkflowName, task.activityInstanceName)">
|
||||
<div class="item width-100">
|
||||
@@ -89,7 +89,7 @@
|
||||
|
||||
<!-- This is the box view -->
|
||||
<div *ngSwitchCase="'boxview'" class="aside overflow-y-auto d-flex flex-wrap width-100 height-100">
|
||||
<div *ngIf="hideInMobile" (click)="openAllProcessesPage()" [class.active]="selectedElement == 'allProcessesTag'" class="exp-card d-flex flex-column" >
|
||||
<div *ngIf="hideInMobile" (click)="openAllProcessesPage()" [class.active]="selectedElement == 'allProcessesTag'" class="box-hover exp-card d-flex flex-column" >
|
||||
<div class="d-flex justify-center">
|
||||
<!-- <ion-icon src="assets/images/icons-agenda.svg"></ion-icon> -->
|
||||
<fa-icon class="icon-selected" icon="align-justify"></fa-icon>
|
||||
@@ -98,7 +98,7 @@
|
||||
<p class="text-center exp-card-content">{{ totalDocumentStore.count }} <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
<div (click)="openEventsToApprovePage();selectedElement='approval'" [class.active]="selectedElement == 'approval'" class="exp-card d-flex flex-column" *ngIf="loggeduser.Profile == 'MDGPR'" >
|
||||
<div (click)="openEventsToApprovePage();selectedElement='approval'" [class.active]="selectedElement == 'approval'" class="box-hover exp-card d-flex flex-column" *ngIf="loggeduser.Profile == 'MDGPR'" >
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-agenda.svg"></ion-icon>
|
||||
</div>
|
||||
@@ -106,7 +106,7 @@
|
||||
<p class="text-center exp-card-content">{{eventoaprovacaostore.countMd + eventoaprovacaostore.countPr}} <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
<div [class.active]="selectedElement == 'Correspondence'" (click)="openExpedientListPage(); selectedElement='Correspondence'" class="exp-card d-flex flex-column justify-center" *ngIf="loggeduser.Profile == 'MDGPR'">
|
||||
<div [class.active]="selectedElement == 'Correspondence'" (click)="openExpedientListPage(); selectedElement='Correspondence'" class="box-hover exp-card d-flex flex-column justify-center" *ngIf="loggeduser.Profile == 'MDGPR'">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-correspondencia.svg"></ion-icon>
|
||||
</div>
|
||||
@@ -115,7 +115,7 @@
|
||||
</div>
|
||||
|
||||
<!-- <div [class.active]="selectedElement == 'Pending'" (click)="openPendentesPage(); selectedElement='Pending'" class="exp-card d-flex flex-column justify-center" > -->
|
||||
<div [class.active]="selectedElementF('Pending')" (click)="openPendentesPage(); selectedElement='Pending'" class="exp-card d-flex flex-column justify-center" >
|
||||
<div [class.active]="selectedElementF('Pending')" (click)="openPendentesPage(); selectedElement='Pending'" class="box-hover exp-card d-flex flex-column justify-center" >
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-expediente-pendente.svg"></ion-icon>
|
||||
</div>
|
||||
@@ -124,7 +124,7 @@
|
||||
<p class="text-center exp-card-content"><span class="number">{{pendentesstore.count}} </span> <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
<div *ngIf="loggeduser.Profile == 'PR'" (click)="openDespachosPrPage(); selectedElement='DispatchesPr'" [class.active]="selectedElement == 'DispatchesPr'" class="exp-card d-md-flex flex-column justify-center" >
|
||||
<div *ngIf="loggeduser.Profile == 'PR'" (click)="openDespachosPrPage(); selectedElement='DispatchesPr'" [class.active]="selectedElement == 'DispatchesPr'" class="box-hover exp-card d-md-flex flex-column justify-center" >
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-despachos-presidente.svg"></ion-icon>
|
||||
</div>
|
||||
@@ -133,7 +133,7 @@
|
||||
<p class="text-center exp-card-content">{{ despachoprstore.count }} <span class="title1">Documentos</span> </p>
|
||||
</div>
|
||||
|
||||
<div [class.active]="selectedElement == 'Dispatches'" class="exp-card d-flex flex-column justify-center" (click)="openDespachosPage(); selectedElement='Dispatches'" *ngIf="loggeduser.Profile == 'MDGPR'">
|
||||
<div [class.active]="selectedElement == 'Dispatches'" class="box-hover exp-card d-flex flex-column justify-center" (click)="openDespachosPage(); selectedElement='Dispatches'" *ngIf="loggeduser.Profile == 'MDGPR'">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-despachos-presidente.svg"></ion-icon>
|
||||
</div>
|
||||
@@ -141,7 +141,7 @@
|
||||
<p class="text-center exp-card-content">{{despachoStore.count}} <span class="title1">Documentos</span> </p>
|
||||
</div>
|
||||
|
||||
<div (click)="openPedidosPage('parecer'); selectedElement='RequestsForOpinion'" [class.active]="selectedElement == 'RequestsForOpinion'" class="exp-card d-flex flex-column justify-center">
|
||||
<div (click)="openPedidosPage('parecer'); selectedElement='RequestsForOpinion'" [class.active]="selectedElement == 'RequestsForOpinion'" class="box-hover exp-card d-flex flex-column justify-center">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-expediente-parecer.svg"></ion-icon>
|
||||
</div>
|
||||
@@ -150,7 +150,7 @@
|
||||
<p class="text-center exp-card-content">{{pedidosstore.countparecer}} <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
<div (click)="openPedidosPage('deferimento'); selectedElement = 'RequestForApproval'" [class.active]="selectedElement == 'RequestForApproval'" class="exp-card d-flex flex-column justify-center">
|
||||
<div (click)="openPedidosPage('deferimento'); selectedElement = 'RequestForApproval'" [class.active]="selectedElement == 'RequestForApproval'" class="box-hover exp-card d-flex flex-column justify-center">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-expediente-deferimento.svg"></ion-icon>
|
||||
</div>
|
||||
@@ -172,7 +172,7 @@
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div *ngIf="loggeduser.Profile == 'MDGPR'" (click)="openDespachosPrPage(); selectedElement='showDespachosPr'" [class.active]="selectedElement == 'showDespachosPr'" class="exp-card-long width-100" >
|
||||
<div *ngIf="loggeduser.Profile == 'MDGPR'" (click)="openDespachosPrPage(); selectedElement='showDespachosPr'" [class.active]="selectedElement == 'showDespachosPr'" class="box-hover exp-card-long width-100 d-flex flex-column justify-center">
|
||||
<div class="center-div">
|
||||
<div class="exp-card-icon">
|
||||
<ion-icon src="assets/images/icons-despachos-presidente.svg"></ion-icon>
|
||||
@@ -184,7 +184,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="loggeduser.Profile == 'MDGPR'" (click)="openDiplomasPage('validar'); selectedElement='DiplomasPorValidar'" [class.active]="selectedElement == 'DiplomasPorValidar'" class="exp-card d-flex flex-column justify-center">
|
||||
<div *ngIf="loggeduser.Profile == 'MDGPR'" (click)="openDiplomasPage('validar'); selectedElement='DiplomasPorValidar'" [class.active]="selectedElement == 'DiplomasPorValidar'" class="box-hover exp-card d-flex flex-column justify-center">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-expediente-diploma.svg"></ion-icon>
|
||||
</div>
|
||||
@@ -193,7 +193,7 @@
|
||||
<p class="text-center exp-card-content">{{ deplomasStore.deplomasReviewCount }} <span class="title1">Documentos</span> </p>
|
||||
</div>
|
||||
|
||||
<div *ngIf="loggeduser.Profile == 'MDGPR'" (click)="openDiplomasPage('assinados'); selectedElement='DiplomasAssinados'" [class.active]="selectedElement == 'DiplomasAssinados'" class="exp-card d-flex flex-column justify-center">
|
||||
<div *ngIf="loggeduser.Profile == 'MDGPR'" (click)="openDiplomasPage('assinados'); selectedElement='DiplomasAssinados'" [class.active]="selectedElement == 'DiplomasAssinados'" class="box-hover exp-card d-flex flex-column justify-center">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-diplomas-assinados-presidente.svg"></ion-icon>
|
||||
</div>
|
||||
@@ -202,7 +202,7 @@
|
||||
<p class="text-center exp-card-content">{{ deplomasStore.countDiplomasAssinadoListCount }} <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
<div *ngIf="loggeduser.Profile == 'PR'" (click)="openDiplomasAssinarPage(); selectedElement='DiplomasAssinar'" [class.active]="selectedElement == 'DiplomasAssinar'" class="exp-card d-flex flex-column justify-center">
|
||||
<div *ngIf="loggeduser.Profile == 'PR'" (click)="openDiplomasAssinarPage(); selectedElement='DiplomasAssinar'" [class.active]="selectedElement == 'DiplomasAssinar'" class="box-hover exp-card d-flex flex-column justify-center">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-expediente-diploma.svg"></ion-icon>
|
||||
</div>
|
||||
|
||||
@@ -149,6 +149,7 @@ ion-segment-button{
|
||||
border-radius: 15px;
|
||||
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.07);
|
||||
background: white;
|
||||
border: 1px solid white;
|
||||
float: left;
|
||||
}
|
||||
.exp-card-long{
|
||||
@@ -156,12 +157,11 @@ ion-segment-button{
|
||||
user-select: none;
|
||||
background: white;
|
||||
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.07);
|
||||
background: white;
|
||||
width: 360px;
|
||||
margin: 7px 20px;
|
||||
border-radius: 15px;
|
||||
padding: 7px;
|
||||
border: blue !important;
|
||||
border:1px solid white;
|
||||
|
||||
.center-div{
|
||||
width: fit-content;
|
||||
@@ -517,6 +517,7 @@ ion-list{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 801px) {
|
||||
.title{
|
||||
font-size: 25px !important;
|
||||
@@ -559,6 +560,7 @@ ion-list{
|
||||
.active {
|
||||
color: white !important;
|
||||
fill: white !important;
|
||||
border: 1px solid #42b9fe !important;
|
||||
background: #42b9fe !important;
|
||||
box-sizing: border-box;
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
window.onresize = (event) => {
|
||||
// if not mobile remove all component
|
||||
if( window.innerWidth <= 701){
|
||||
if( window.innerWidth < 701){
|
||||
this.modalController.dismiss();
|
||||
this.segmentVista = "listview";
|
||||
}
|
||||
@@ -134,6 +134,10 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
};
|
||||
this.checkRoutes();
|
||||
|
||||
|
||||
// this.eventoaprovacaostore.resetmd([])
|
||||
// this.eventoaprovacaostore.resetpr([])
|
||||
|
||||
}
|
||||
|
||||
ngDoCheck(): void {
|
||||
@@ -159,7 +163,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
this.segmentVista = "listview";
|
||||
}
|
||||
else{
|
||||
this.segmentVista = "boxview";
|
||||
this.segmentVista = "boxview"
|
||||
}
|
||||
|
||||
const pathname = window.location.pathname
|
||||
@@ -191,7 +195,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
|
||||
async loadAllProcesses() {
|
||||
let allProcessesList = await this.processesbackend.GetTasksList("", false).toPromise();
|
||||
|
||||
|
||||
if(!this.p.userRole(['PR'])) {
|
||||
allProcessesList = allProcessesList.filter( element => element.activityInstanceName != 'Assinar Diplomas')
|
||||
} else if (this.p.userRole(['PR'])) {
|
||||
@@ -464,7 +468,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
if(despachos) {
|
||||
this.despachoStore.reset(despachos)
|
||||
}
|
||||
|
||||
|
||||
|
||||
let pareceres = await this.processesbackend.GetTasksList("Pedido de Parecer", false).toPromise();
|
||||
let pareceresPr = await this.processesbackend.GetTasksList("Pedido de Parecer do Presidente", false).toPromise();
|
||||
@@ -503,7 +507,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
this.eventoaprovacaostore.countMd = eventsMDGPRList.length
|
||||
this.eventoaprovacaostore.resetmd(eventsMDGPRList);
|
||||
|
||||
|
||||
|
||||
|
||||
let prEventsOficial = await this.processesbackend.GetTasksList('Agenda Oficial PR', false).toPromise();
|
||||
let prEventsPessoal = await this.processesbackend.GetTasksList('Agenda Pessoal PR', false).toPromise();
|
||||
@@ -521,7 +525,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
let diplomasAssinar = despachospr.filter(data => data.activityInstanceName == "Assinar Diploma");
|
||||
this.count_dip_as = Object.keys(diplomasAssinar).length;
|
||||
this.deplomasStore.resetDiplomasList(diplomasAssinar)
|
||||
|
||||
|
||||
|
||||
let diplomasAssinados = despachospr.filter(data => data.activityInstanceName == "Diploma Assinado");
|
||||
this.count_dip_as_pr = Object.keys(diplomasAssinados).length;
|
||||
@@ -569,7 +573,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
}
|
||||
|
||||
selectedElementF(element:string) {
|
||||
if (window.innerWidth >= 801) {
|
||||
if (window.innerWidth > 701) {
|
||||
return element == this.selectedElement
|
||||
}
|
||||
return false;
|
||||
@@ -578,7 +582,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
openAllProcessesPage() {
|
||||
this.closeAllDesktopComponents();
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"processes": true,}};
|
||||
if( window.innerWidth <= 801) {
|
||||
if( window.innerWidth < 701) {
|
||||
this.router.navigate(['/home/gabinete-digital']);
|
||||
}
|
||||
else {
|
||||
@@ -591,7 +595,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
openEventsToApprovePage() {
|
||||
this.closeAllDesktopComponents();
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"eventos": true,}};
|
||||
if( window.innerWidth <= 801) {
|
||||
if( window.innerWidth < 701) {
|
||||
//this.openEventsToApproveList(profile);
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
}
|
||||
@@ -606,7 +610,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
this.closeAllDesktopComponents();
|
||||
switch(this.loggeduser.Profile){
|
||||
case 'MDGPR':
|
||||
if( window.innerWidth <= 801) {
|
||||
if( window.innerWidth < 701) {
|
||||
//this.openExpedientList();
|
||||
this.router.navigate(['/home/gabinete-digital/expediente']);
|
||||
}
|
||||
@@ -618,7 +622,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
}
|
||||
break;
|
||||
case 'PR':
|
||||
if( window.innerWidth <= 801) {
|
||||
if( window.innerWidth < 701) {
|
||||
this.router.navigate(['/home/gabinete-digital/expedientes-pr']);
|
||||
}
|
||||
else {
|
||||
@@ -645,7 +649,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
this.segment = 'parecer'
|
||||
}
|
||||
|
||||
if( window.innerWidth <= 801) {
|
||||
if( window.innerWidth < 701) {
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos'], navigationExtras);
|
||||
}
|
||||
else {
|
||||
@@ -662,7 +666,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
|
||||
openDespachosPage(segment?:string) {
|
||||
this.closeAllDesktopComponents();
|
||||
if( window.innerWidth <= 801){
|
||||
if( window.innerWidth < 701){
|
||||
this.router.navigate(['/home/gabinete-digital/despachos']);
|
||||
}
|
||||
else{
|
||||
@@ -674,7 +678,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
|
||||
openDespachosPrPage(segment?:string) {
|
||||
this.closeAllDesktopComponents();
|
||||
if( window.innerWidth <= 801){
|
||||
if( window.innerWidth < 701){
|
||||
this.router.navigate(['/home/gabinete-digital/despachos-pr']);
|
||||
}
|
||||
else{
|
||||
@@ -686,7 +690,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
|
||||
openPendentesPage(segment?:string){
|
||||
this.closeAllDesktopComponents();
|
||||
if( window.innerWidth <= 801){
|
||||
if( window.innerWidth < 701){
|
||||
this.router.navigate(['/home/gabinete-digital/pendentes']);
|
||||
}
|
||||
else{
|
||||
@@ -698,7 +702,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
|
||||
openExpedientesPrPage(segment?:string){
|
||||
this.closeAllDesktopComponents();
|
||||
if( window.innerWidth <= 801) {
|
||||
if( window.innerWidth < 701) {
|
||||
this.router.navigate(['/home/gabinete-digital/expedientes-pr']);
|
||||
}
|
||||
else {
|
||||
@@ -720,7 +724,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
|
||||
this.segment = segment;
|
||||
|
||||
if( window.innerWidth <= 801){
|
||||
if( window.innerWidth < 701){
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas'], navigationExtras);
|
||||
}
|
||||
else{
|
||||
@@ -734,7 +738,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
|
||||
openDiplomasAssinarPage() {
|
||||
this.closeAllDesktopComponents();
|
||||
if( window.innerWidth <= 801){
|
||||
if( window.innerWidth < 701){
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas-assinar']);
|
||||
}
|
||||
else{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<div class="main-content d-flex height-100">
|
||||
<div class="main-content d-flex height-100 overflow-hidden">
|
||||
<div class="content d-flex flex-column" *ngIf="task">
|
||||
<div class="main-header ">
|
||||
<div class="title-content width-100 d-flex justify-space-between ">
|
||||
@@ -78,7 +78,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div *ngIf="task" class="aside-right flex-column height-100">
|
||||
<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'">
|
||||
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
|
||||
@@ -60,7 +60,7 @@ export class PedidoPage implements OnInit {
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
console.log(params["params"]);
|
||||
// console.log(params["params"]);
|
||||
|
||||
if(params["params"].SerialNumber) {
|
||||
this.serialnumber = params["params"].SerialNumber;
|
||||
|
||||
@@ -1,39 +1,8 @@
|
||||
<ion-content class="text-white">
|
||||
|
||||
<div class="main-wrapper">
|
||||
<div class="wrapper" *ngIf="SessionStore.user.LoginPreference == 'Password' && SessionStore.hasPin || SessionStore.user.LoginPreference == null && SessionStore.hasPin || SessionStore.user.LoginPreference == 'None' && SessionStore.hasPin || enterWithPassword">
|
||||
|
||||
<div class="bg-1 d-flex justify-center align-center">
|
||||
<div class="bg-2 d-flex justify-center align-center">
|
||||
<div class="bg-3 d-flex justify-center align-center">
|
||||
<div class="bg-4 d-flex justify-center align-center">
|
||||
<div class="div-logo">
|
||||
<img src='assets/images/fullLogo.png' alt='logo'>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h3 class="center text-white">Inicie a sessão</h3>
|
||||
<form class="form">
|
||||
<p class="form-label text-white">Email</p>
|
||||
<ion-item class="form-input">
|
||||
<ion-input type="text" [(ngModel)]="username" name="input-username"></ion-input>
|
||||
</ion-item>
|
||||
<p class="form-label text-white">Palavra-passe</p>
|
||||
<ion-item class="form-input">
|
||||
<ion-input (keyup.enter)="Login()" type="password" [(ngModel)]="password" name="input-password" ></ion-input>
|
||||
</ion-item>
|
||||
<div class="d-flex pt-25">
|
||||
<button class="btn-ok btn-login" fill="clear" expand="block" shape="round" (click)="Login()">Iniciar</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="msg-bottom d-flex">
|
||||
<p class="msg-bottom-p">Uma iniciativa do Gabinete do Presidente da República</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="main-content d-flex flex-column height-100 width" *ngIf="!SessionStore.hasPin || SessionStore.hasPin && SessionStore.user.LoginPreference == 'Pin' && !enterWithPassword " >
|
||||
<div class="main-content d-flex flex-column width" *ngIf="!SessionStore.hasPin || SessionStore.hasPin && SessionStore.user.LoginPreference == 'Pin' && !enterWithPassword " >
|
||||
|
||||
<div class="div-top-header">
|
||||
|
||||
|
||||
@@ -1,77 +1,79 @@
|
||||
@import '~src/function.scss';
|
||||
:host, app-login {
|
||||
ion-content {
|
||||
background: linear-gradient(180deg, #42B9FE 0%, #0782C9 100%) !important;
|
||||
}
|
||||
ion-content {
|
||||
background: linear-gradient(180deg, #42B9FE 0%, #0782C9 100%) !important;
|
||||
}
|
||||
}
|
||||
ion-content{
|
||||
background-color: white !important;
|
||||
}
|
||||
|
||||
.main-wrapper{
|
||||
background: linear-gradient(180deg, #42B9FE 0%, #0782C9 100%) !important;
|
||||
display: flex;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
overflow: auto;
|
||||
background: white !important;
|
||||
|
||||
background: linear-gradient(180deg, #42B9FE 0%, #0782C9 100%) !important;
|
||||
display: flex;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
overflow: auto;
|
||||
background: white !important;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.wrapper{
|
||||
/* width: 400px; */
|
||||
height: auto;
|
||||
padding: 0 !important;
|
||||
/* margin: auto !important; */
|
||||
overflow: auto;
|
||||
width: 100%;
|
||||
background: linear-gradient(180deg, #42B9FE 0%, #0782C9 100%) !important;
|
||||
/* width: 400px; */
|
||||
height: auto;
|
||||
padding: 0 !important;
|
||||
/* margin: auto !important; */
|
||||
overflow: auto;
|
||||
width: 100%;
|
||||
background: linear-gradient(180deg, #42B9FE 0%, #0782C9 100%) !important;
|
||||
}
|
||||
|
||||
.logo{
|
||||
width: 400px;
|
||||
height: 400px;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
width: 400px;
|
||||
height: 400px;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
|
||||
.bg-1{
|
||||
width: 250px;
|
||||
height: 250px;
|
||||
overflow: auto;
|
||||
border-radius: 50%;
|
||||
background: #4cb9f825;
|
||||
margin: auto;
|
||||
.bg-2{
|
||||
width: 225px;
|
||||
height: 225px;
|
||||
overflow: auto;
|
||||
border-radius: 50%;
|
||||
background: #61bdf2b4;
|
||||
margin: auto;
|
||||
.bg-3{
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
overflow: auto;
|
||||
border-radius: 50%;
|
||||
background: #96d3f8be;
|
||||
margin: auto;
|
||||
.bg-4{
|
||||
width: 175px;
|
||||
height: 175px;
|
||||
overflow: auto;
|
||||
border-radius: 50%;
|
||||
background: rgba(255, 255, 255, 0.918);
|
||||
padding: 15px;
|
||||
margin: auto;
|
||||
width: 250px;
|
||||
height: 250px;
|
||||
overflow: auto;
|
||||
border-radius: 50%;
|
||||
background: #4cb9f825;
|
||||
margin: auto;
|
||||
.bg-2{
|
||||
width: 225px;
|
||||
height: 225px;
|
||||
overflow: auto;
|
||||
border-radius: 50%;
|
||||
background: #61bdf2b4;
|
||||
margin: auto;
|
||||
.bg-3{
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
overflow: auto;
|
||||
border-radius: 50%;
|
||||
background: #96d3f8be;
|
||||
margin: auto;
|
||||
.bg-4{
|
||||
width: 175px;
|
||||
height: 175px;
|
||||
overflow: auto;
|
||||
border-radius: 50%;
|
||||
background: rgba(255, 255, 255, 0.918);
|
||||
padding: 15px;
|
||||
margin: auto;
|
||||
|
||||
.bg-4 img{
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.bg-4 img{
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.div-logo{
|
||||
width: 200px !important;
|
||||
@@ -133,110 +135,216 @@ ion-item{
|
||||
|
||||
|
||||
.circle{
|
||||
color: white;
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 19pt;
|
||||
background: #44b5ea;
|
||||
border-radius: 56px;
|
||||
margin-bottom: 15px;
|
||||
user-select: none;
|
||||
margin-right: 15px;
|
||||
margin-left: 15px;
|
||||
color: white;
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 19pt;
|
||||
background: #44b5ea;
|
||||
border-radius: 56px;
|
||||
margin-bottom: 15px;
|
||||
user-select: none;
|
||||
margin-right: 15px;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
|
||||
.title{
|
||||
padding-top: 32px;
|
||||
z-index: 1000;
|
||||
height: unset !important;
|
||||
position: relative;
|
||||
top: -30px;
|
||||
padding-top: 32px;
|
||||
z-index: 1000;
|
||||
height: unset !important;
|
||||
position: relative;
|
||||
top: -30px;
|
||||
}
|
||||
|
||||
.terminal {
|
||||
padding-top: 49px;
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
background-image: url(/assets/background/auth.svg);
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
width: 100%;
|
||||
padding-bottom: 48px;
|
||||
margin-bottom: -58px;
|
||||
z-index: 100;
|
||||
margin-top: -80px;
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-image: url(/assets/background/auth.svg);
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
width: 100%;
|
||||
z-index: 100;
|
||||
background-size: 610px;
|
||||
}
|
||||
|
||||
.clear{
|
||||
color: #44b5ea;
|
||||
font-size: 12pt;
|
||||
z-index: 1000;
|
||||
color: #44b5ea;
|
||||
font-size: 12pt;
|
||||
z-index: 1000;
|
||||
}
|
||||
.dot-active{
|
||||
background: #44b5ea;
|
||||
background: #44b5ea;
|
||||
}
|
||||
|
||||
.dot{
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
margin: 0 10px 0 0;
|
||||
border: 3px solid #44b5ea;
|
||||
box-sizing: border-box;
|
||||
border-radius: 50px;
|
||||
-webkit-border-radius: 50px;
|
||||
-moz-border-radius: 50px;
|
||||
-ms-border-radius: 50px;
|
||||
-o-border-radius: 50px;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
margin: 0 10px 0 0;
|
||||
border: 3px solid #44b5ea;
|
||||
box-sizing: border-box;
|
||||
border-radius: 50px;
|
||||
-webkit-border-radius: 50px;
|
||||
-moz-border-radius: 50px;
|
||||
-ms-border-radius: 50px;
|
||||
-o-border-radius: 50px;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: white;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-size: 686px 674px;
|
||||
background-position: center;
|
||||
background-position-y: 110px;
|
||||
background-repeat: no-repeat;
|
||||
margin: auto;
|
||||
justify-content: space-around;
|
||||
width: 100vw;
|
||||
/* background-color: white; */
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
/* justify-content: center; */
|
||||
background-size: 686px 674px;
|
||||
background-position: center;
|
||||
background-position-y: 110px;
|
||||
background-repeat: no-repeat;
|
||||
margin: auto;
|
||||
/* justify-content: space-around; */
|
||||
}
|
||||
|
||||
.voltar{
|
||||
user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.msg-bottom{
|
||||
width: 100%;
|
||||
color: #fff;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
color: #fff;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.msg-bottom-p{
|
||||
width: 220px;
|
||||
position: absolute;
|
||||
bottom: 0 !important;
|
||||
text-align: center;
|
||||
}
|
||||
.msg-bottom-p{
|
||||
width: 220px;
|
||||
position: absolute;
|
||||
bottom: 0 !important;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-height: 746px){
|
||||
.msg-bottom-p {
|
||||
padding-top: 20px;
|
||||
position: unset !important;
|
||||
}
|
||||
.msg-bottom-p {
|
||||
padding-top: 20px;
|
||||
position: unset !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.pin-4 {
|
||||
z-index: 1000;
|
||||
margin-bottom: 36px;
|
||||
z-index: 1000;
|
||||
margin-bottom: 107px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@media only screen and (min-height: 168px) {
|
||||
.circle{
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
margin-bottom: 7px;
|
||||
margin-right: 7px;
|
||||
margin-left: 7px;
|
||||
}
|
||||
.terminal{
|
||||
margin-top: -33px !important;
|
||||
}
|
||||
|
||||
.pin-4 {
|
||||
position: relative;
|
||||
top: 49px;
|
||||
}
|
||||
|
||||
.clear {
|
||||
padding-top: 10px !important;
|
||||
}
|
||||
|
||||
.div-top-header {
|
||||
position: unset ;
|
||||
top: unset ;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-height: 640px) {
|
||||
.circle{
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
margin-bottom: 9px;
|
||||
margin-right: 9px;
|
||||
margin-left: 9px;
|
||||
}
|
||||
.terminal{
|
||||
margin-top: -33px !important;
|
||||
}
|
||||
|
||||
.pin-4 {
|
||||
position: relative;
|
||||
top: 49px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media only screen and (min-height: 667px) {
|
||||
.circle{
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
margin-bottom: 7px;
|
||||
margin-right: 7px;
|
||||
margin-left: 7px;
|
||||
}
|
||||
.terminal{
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.clear {
|
||||
padding-top: 25px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-height: 731px) {
|
||||
.circle{
|
||||
width: 63px;
|
||||
height: 63px;
|
||||
margin-bottom: 10px;
|
||||
margin-right: 10px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.terminal{
|
||||
margin-top: -33px !important;
|
||||
}
|
||||
|
||||
.pin-4 {
|
||||
position: relative;
|
||||
top: 35px;
|
||||
}
|
||||
|
||||
.div-top-header {
|
||||
position: absolute !important;
|
||||
top: 0px !important;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@media only screen and (min-height: 832px) {
|
||||
.circle{
|
||||
width: 65px;
|
||||
height: 65px;
|
||||
margin-bottom: 15px;
|
||||
margin-right: 15px;
|
||||
margin-left: 15px;
|
||||
}
|
||||
.terminal{
|
||||
margin-top: -33px !important;
|
||||
}
|
||||
|
||||
.pin-4 {
|
||||
position: relative;
|
||||
top: unset !important;
|
||||
margin-bottom: 107px;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -32,7 +32,47 @@ export class InactivityPage implements OnInit {
|
||||
public alertController: AlertController
|
||||
) {}
|
||||
|
||||
ngOnInit() {}
|
||||
loop = false
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
|
||||
// window.addEventListener('resize', (event) => {
|
||||
// if(this.router.url != '/login') return false
|
||||
|
||||
// if(this.loop == false) {
|
||||
// this.loop = true
|
||||
// this.runloop()
|
||||
// }
|
||||
|
||||
// }, true);
|
||||
|
||||
}
|
||||
|
||||
runloop() {
|
||||
// const containerHeight = 651
|
||||
|
||||
// let circleHeight = document.querySelector('.circle')['offsetHeight']
|
||||
// let circleWidth = document.querySelector('.circle')['offsetWidth']
|
||||
// console.log(window.innerHeight, ' < ', containerHeight)
|
||||
|
||||
// console.log(circleHeight)
|
||||
|
||||
// document.querySelectorAll('.circle').forEach(e=>{
|
||||
// e['style']['height'] = (circleHeight -1 )+'px'
|
||||
// e['style']['width'] = (circleWidth -1 )+'px'
|
||||
// })
|
||||
|
||||
|
||||
// if( window.innerHeight< containerHeight) {
|
||||
// setTimeout(()=>{
|
||||
// this.runloop()
|
||||
// }, 100)
|
||||
// } else {
|
||||
// this.loop = false
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
async presentAlert(message: string) {
|
||||
const alert = await this.alertController.create({
|
||||
@@ -70,15 +110,15 @@ export class InactivityPage implements OnInit {
|
||||
domainName: environment.domain,
|
||||
BasicAuthKey: ""
|
||||
}
|
||||
let attempt = await this.authService.login(this.userattempt, false)
|
||||
let attempt = await this.authService.login(this.userattempt, {saveSession: false})
|
||||
|
||||
if (attempt) {
|
||||
|
||||
// if current attemp is equal to the current user
|
||||
if (attempt.UserId == SessionStore.user.UserId) {
|
||||
await this.authService.SetSession(attempt, this.userattempt);
|
||||
await this.authService.loginChat(this.userattempt);
|
||||
await this.getToken();
|
||||
this.authService.loginChat(this.userattempt);
|
||||
this.getToken();
|
||||
SessionStore.setInativity(true)
|
||||
|
||||
this.goback()
|
||||
@@ -131,9 +171,14 @@ export class InactivityPage implements OnInit {
|
||||
const code = this.code.join('')
|
||||
|
||||
if( SessionStore.validatePin(code)) {
|
||||
|
||||
|
||||
SessionStore.setInativity(true)
|
||||
this.goback()
|
||||
this.clearCode()
|
||||
|
||||
setTimeout(()=>{
|
||||
this.clearCode()
|
||||
}, 1000)
|
||||
|
||||
} else {
|
||||
this.toastService.badRequest('Pin incorreto')
|
||||
this.code = []
|
||||
@@ -143,7 +188,12 @@ export class InactivityPage implements OnInit {
|
||||
|
||||
goback() {
|
||||
const pathName = this.SessionStore.user.UrlBeforeInactivity
|
||||
this.router.navigate([pathName]);
|
||||
if(pathName) {
|
||||
this.router.navigate([pathName]);
|
||||
} else {
|
||||
this.router.navigate(['/home/events']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
storePin() {
|
||||
|
||||
@@ -144,7 +144,7 @@ ion-item{
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.title{
|
||||
.title {
|
||||
padding-top: 32px;
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ ion-item{
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.msg-bottom-p{
|
||||
.msg-bottom-p {
|
||||
width: 220px;
|
||||
position: absolute;
|
||||
bottom: 0 !important;
|
||||
@@ -211,7 +211,7 @@ ion-item{
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-height: 746px){
|
||||
@media only screen and (max-height: 746px) {
|
||||
.msg-bottom-p {
|
||||
padding-top: 20px;
|
||||
position: unset !important;
|
||||
|
||||
@@ -6,7 +6,6 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { AlertController } from '@ionic/angular';
|
||||
import { NotificationsService } from 'src/app/services/notifications.service';
|
||||
import { LocalstoreService } from 'src/app/store/localstore.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
|
||||
@Component({
|
||||
@@ -17,7 +16,7 @@ import { SessionStore } from 'src/app/store/session.service';
|
||||
export class LoginPage implements OnInit {
|
||||
|
||||
logstatus: boolean;
|
||||
username: string = environment.defaultuser;
|
||||
username: string = SessionStore.user.Email || environment.defaultuser;
|
||||
password: string = environment.defaultuserpwd;
|
||||
userattempt: UserForm;
|
||||
code = []
|
||||
@@ -32,31 +31,11 @@ export class LoginPage implements OnInit {
|
||||
private router: Router,
|
||||
private authService: AuthService,
|
||||
private toastService: ToastService,
|
||||
public alertController: AlertController,
|
||||
private localstoreService: LocalstoreService
|
||||
public alertController: AlertController
|
||||
) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
let userData = this.sessionStore.user
|
||||
|
||||
const loginPreference = userData?.LoginPreference
|
||||
const pin = userData?.PIN
|
||||
|
||||
if (pin) {
|
||||
this.hasPin = true
|
||||
} else {
|
||||
this.hasPin = false
|
||||
}
|
||||
|
||||
if (loginPreference) {
|
||||
this.loginPreference = loginPreference
|
||||
} else {
|
||||
this.loginPreference = ''
|
||||
}
|
||||
|
||||
}
|
||||
ngOnInit() {}
|
||||
|
||||
//Function to validade the login inputs
|
||||
validateUsername() {
|
||||
@@ -97,13 +76,25 @@ export class LoginPage implements OnInit {
|
||||
domainName: environment.domain,
|
||||
BasicAuthKey: ""
|
||||
}
|
||||
let attempt = await this.authService.login(this.userattempt)
|
||||
|
||||
let attempt = await this.authService.login(this.userattempt, {saveSession: false})
|
||||
|
||||
if (attempt) {
|
||||
await this.authService.loginChat(this.userattempt);
|
||||
await this.getToken();
|
||||
|
||||
this.router.navigate(['/pin']);
|
||||
|
||||
if (attempt.UserId == SessionStore.user.UserId) {
|
||||
await this.authService.SetSession(attempt, this.userattempt);
|
||||
await this.authService.loginChat(this.userattempt);
|
||||
this.getToken();
|
||||
SessionStore.setInativity(true)
|
||||
|
||||
this.goback()
|
||||
} else {
|
||||
SessionStore.delete()
|
||||
window.localStorage.clear();
|
||||
await this.authService.SetSession(attempt, this.userattempt);
|
||||
await this.authService.loginChat(this.userattempt);
|
||||
this.router.navigate(['/pin']);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -116,4 +107,15 @@ export class LoginPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
goback() {
|
||||
const pathName = SessionStore.user.UrlBeforeInactivity
|
||||
if(pathName) {
|
||||
this.router.navigate([pathName]);
|
||||
} else {
|
||||
this.router.navigate(['/home/events']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,13 +14,14 @@ import { NewActionPageModule } from 'src/app/shared/publication/new-action/new-a
|
||||
import { PublicationDetailPageModule } from 'src/app/shared/publication/view-publications/publication-detail/publication-detail.module';
|
||||
import { HeaderPageModule } from 'src/app/shared/header/header.module';
|
||||
import { EditActionPageModule } from 'src/app/shared/publication/edit-action/edit-action.module';
|
||||
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
|
||||
FontAwesomeModule,
|
||||
PublicationsPageRoutingModule,
|
||||
HeaderPageModule,
|
||||
ViewPublicationsPageModule,
|
||||
|
||||
@@ -39,20 +39,23 @@
|
||||
|
||||
<div class="aside overflow-y-auto d-flex flex-wrap width-100">
|
||||
<!-- <ion-list class="width-100"> -->
|
||||
<ion-item-sliding disabled="{{showSlidingOptions}}" class="item width-100 cursor-pointer"
|
||||
<ion-item-sliding disabled="{{showSlidingOptions}}" class="width-100 cursor-pointer"
|
||||
*ngFor="let viagem of publicationTravelFolderService.list">
|
||||
<ion-item lines="none"
|
||||
class="width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
|
||||
class="item width-100 d-flex ion-no-border ion-no-margin ion-no-padding"
|
||||
[class.item-active]="viagem.ProcessId == idSelected"
|
||||
>
|
||||
<div (click)="goToPublicationsList(viagem.ProcessId)" class="item-icon cursor-pointer">
|
||||
<ion-icon slot="end" src='assets/images/icons-plane-active.svg'></ion-icon>
|
||||
</div>
|
||||
<div (click)="goToPublicationsList(viagem.ProcessId)" class="item-content flex-grow-1 cursor-pointer">
|
||||
<p class="item-content-date my-5">De {{getDate(viagem.DateBegin)}} a {{getDate(viagem.DateEnd)}}</p>
|
||||
<p class="item-content-title my-10">{{viagem.Description}}</p>
|
||||
<p class="item-content-detail my-5">{{viagem.Detail}}</p>
|
||||
<p class="item-content-date my-5" [class.item-content-date-active]="viagem.ProcessId == idSelected">De {{getDate(viagem.DateBegin)}} a {{getDate(viagem.DateEnd)}}</p>
|
||||
<p class="item-content-title my-10" [class.item-content-title-active]="viagem.ProcessId == idSelected">{{viagem.Description}}</p>
|
||||
<p class="item-content-detail my-5" [class.item-content-detail-active]="viagem.ProcessId == idSelected">{{viagem.Detail}}</p>
|
||||
</div>
|
||||
<div (click)="openOptions(viagem.ProcessId)" class="item-options d-none cursor-pointer" autoHide="false">
|
||||
<ion-icon src="assets/images/icons-menu.svg"></ion-icon>
|
||||
<div (click)="openOptions(viagem.ProcessId)" class="item-options d-none cursor-pointer" [class.item-options-active]="viagem.ProcessId == idSelected" autoHide="false">
|
||||
<!-- <ion-icon src="assets/images/icons-menu.svg"></ion-icon> -->
|
||||
<i class="fas fa-ellipsis-v"></i>
|
||||
</div>
|
||||
</ion-item>
|
||||
<ion-item-options class="members-options" side="end">
|
||||
@@ -68,38 +71,25 @@
|
||||
</ion-item-option>
|
||||
</ion-item-options>
|
||||
</ion-item-sliding>
|
||||
<!-- </ion-list> -->
|
||||
<!-- <div class="item width-100 d-flex"
|
||||
*ngFor="let viagem of publicationsTravelFolderList">
|
||||
<div (click)="goToPublicationsList(viagem.ProcessId)" class="item-icon cursor-pointer">
|
||||
<ion-icon slot="end" src='assets/images/icons-plane-active.svg'></ion-icon>
|
||||
</div>
|
||||
<div (click)="goToPublicationsList(viagem.ProcessId)" class="item-content flex-grow-1 cursor-pointer">
|
||||
<p class="item-content-date my-5">De {{viagem.DateBegin}} a {{viagem.DateEnd}}</p>
|
||||
<p class="item-content-title my-10">{{viagem.Description}}</p>
|
||||
<p class="item-content-detail my-5">{{viagem.Detail}}</p>
|
||||
</div>
|
||||
<div (click)="openOptions(viagem.ProcessId)" class="item-options d-none cursor-pointer" autoHide="false">
|
||||
<ion-icon src="assets/images/icons-menu.svg"></ion-icon>
|
||||
</div>
|
||||
</div> -->
|
||||
<ion-item-sliding disabled="{{showSlidingOptions}}" class="item width-100"
|
||||
*ngFor="let evento of publicationEventFolderStorage.list"
|
||||
>
|
||||
|
||||
<ion-item-sliding disabled="{{showSlidingOptions}}" class="width-100"
|
||||
*ngFor="let evento of publicationEventFolderStorage.list">
|
||||
<ion-item lines="none"
|
||||
class="width-100 d-flex ion-no-border ion-no-margin ion-no-padding"
|
||||
class="item cursor-pointer width-100 d-flex ion-no-border ion-no-margin ion-no-padding"
|
||||
[class.item-active]="evento.ProcessId == idSelected"
|
||||
(click)="goToPublicationsList(evento.ProcessId)">
|
||||
<div class="item-icon2">
|
||||
<ion-icon slot="end" src='assets/images/icons-nav-actions.svg'></ion-icon>
|
||||
</div>
|
||||
<div class="item-content flex-grow-1">
|
||||
<ion-label>
|
||||
<p class="item-content-date">{{getDate(evento.DateBegin)}}</p>
|
||||
<p class="item-content-title">{{evento.Description}}</p>
|
||||
<p class="item-content-date" [class.item-content-date-active]="evento.ProcessId == idSelected">{{getDate(evento.DateBegin)}}</p>
|
||||
<p class="item-content-title" [class.item-content-title-active]="evento.ProcessId == idSelected">{{evento.Description}}</p>
|
||||
</ion-label>
|
||||
</div>
|
||||
<div (click)="openOptions(evento.ProcessId)" class="item-options d-none cursor-pointer" autoHide="false">
|
||||
<ion-icon src="assets/images/icons-menu.svg"></ion-icon>
|
||||
<div (click)="openOptions(evento.ProcessId)" class="item-options d-none cursor-pointer" [class.item-options-active]="evento.ProcessId == idSelected" autoHide="false">
|
||||
<!-- <ion-icon src="assets/images/icons-menu.svg"></ion-icon> -->
|
||||
<i class="fas fa-ellipsis-v"></i>
|
||||
</div>
|
||||
</ion-item>
|
||||
<ion-item-options class="members-options" side="end">
|
||||
@@ -115,22 +105,6 @@
|
||||
</ion-item-option>
|
||||
</ion-item-options>
|
||||
</ion-item-sliding>
|
||||
<!-- <div class="item width-100 d-flex"
|
||||
*ngFor="let evento of publicationsEventFolderList"
|
||||
(click)="viewPublications(evento)">
|
||||
<div class="item-icon2">
|
||||
<ion-icon slot="end" src='assets/images/icons-nav-actions.svg'></ion-icon>
|
||||
</div>
|
||||
<div class="item-content flex-grow-1">
|
||||
<ion-label>
|
||||
<p class="item-content-date">{{evento.DateBegin}}</p>
|
||||
<p class="item-content-title">{{evento.Description}}</p>
|
||||
</ion-label>
|
||||
</div>
|
||||
<div (click)="openOptions(evento.ProcessId)" class="item-options d-none cursor-pointer" autoHide="false">
|
||||
<ion-icon src="assets/images/icons-menu.svg"></ion-icon>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ ion-toolbar{
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ion-content{
|
||||
// --background:#0782c9;
|
||||
--border: none;
|
||||
@@ -52,7 +52,7 @@ ion-toolbar{
|
||||
overflow:hidden;
|
||||
color:#000;
|
||||
transform: translate3d(0, 1px, 0);
|
||||
|
||||
|
||||
.title-content{
|
||||
margin: 0px auto;
|
||||
padding: 0 !important;
|
||||
@@ -93,20 +93,25 @@ ion-toolbar{
|
||||
}
|
||||
|
||||
.aside{
|
||||
padding: 0px 20px 0 20px !important;
|
||||
//padding: 0px 20px 0 20px !important;
|
||||
}
|
||||
}
|
||||
.content{
|
||||
//border: 1px solid red;
|
||||
}
|
||||
}
|
||||
ion-item{
|
||||
--background: transparent;
|
||||
}
|
||||
.item{
|
||||
width: 100% !important;
|
||||
padding: 0px !important;
|
||||
padding: 0px 20px 0 20px !important;
|
||||
border-bottom: 1px solid #ebebeb;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-direction: row;
|
||||
background-color: transparent;
|
||||
overflow: auto;
|
||||
|
||||
.item-icon{
|
||||
//margin-top: 28px;
|
||||
@@ -129,6 +134,7 @@ ion-toolbar{
|
||||
width: 100%;
|
||||
padding: 15px 0 15px 10px;
|
||||
overflow: auto;
|
||||
margin-right: 5px;
|
||||
|
||||
p{
|
||||
white-space: nowrap;
|
||||
@@ -154,13 +160,24 @@ ion-toolbar{
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
.item-options{
|
||||
color: #42b9fe;
|
||||
width: 25px;
|
||||
font-size: 20px;
|
||||
}
|
||||
.item-content-date-active, .item-content-title-active, .item-content-detail-active, .item-options-active{
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-options{
|
||||
.item-active{
|
||||
background-color: #42b9fe !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
width: 25px;
|
||||
font-size: 20px;
|
||||
}
|
||||
.item:hover{
|
||||
background-color: #e6f6ff75;
|
||||
}
|
||||
|
||||
ion-item-options{
|
||||
@@ -207,7 +224,7 @@ ion-toolbar{
|
||||
margin: 12px;
|
||||
border: 1px solid #d30a0a;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@ export class PublicationsPage implements OnInit {
|
||||
//publication: object;
|
||||
hideRefreshBtn = true;
|
||||
showSlidingOptions = true;
|
||||
idSelected: string;
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
@@ -213,6 +214,7 @@ export class PublicationsPage implements OnInit {
|
||||
|
||||
goToPublicationsList(folderId: string){
|
||||
this.folderId = folderId
|
||||
this.idSelected = folderId;
|
||||
|
||||
if( window.innerWidth <= 800){
|
||||
this.router.navigate(['/home/publications',folderId]);
|
||||
|
||||
+7
-4
@@ -6,6 +6,7 @@ import { PublicationsService } from 'src/app/services/publications.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { ImageModalPage } from '../../gallery/image-modal/image-modal.page';
|
||||
import { NewPublicationPage } from '../../new-publication/new-publication.page';
|
||||
import { Location } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'app-publication-detail',
|
||||
@@ -26,6 +27,7 @@ export class PublicationDetailPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private router: Router,
|
||||
private location: Location,
|
||||
) {
|
||||
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
@@ -33,7 +35,7 @@ export class PublicationDetailPage implements OnInit {
|
||||
if(params["params"]) {
|
||||
this.folderId = params["params"].folderId;
|
||||
this.publicationId = params["params"].publicationId;
|
||||
console.log(params["params"]);
|
||||
// console.log(params["params"]);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -93,7 +95,7 @@ export class PublicationDetailPage implements OnInit {
|
||||
if(this.isModal) {
|
||||
this.close()
|
||||
} else {
|
||||
this.router.navigate(['/home/publications', this.folderId]);
|
||||
this.location.back();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -104,14 +106,15 @@ export class PublicationDetailPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.publications.DeletePublication(this.folderId, this.publicationId).toPromise();
|
||||
this.toastService.successMessage('Publicaçao eliminada')
|
||||
this.toastService.successMessage('Publicação eliminada')
|
||||
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Publicaçao não eliminada')
|
||||
} finally {
|
||||
loader.remove()
|
||||
this.goBack();
|
||||
}
|
||||
this.goBack();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
|
||||
if(params["params"]) {
|
||||
this.folderId = params["params"].folderId;
|
||||
console.log(params["params"]);
|
||||
// console.log(params["params"]);
|
||||
}
|
||||
|
||||
window['app-view-publications-page-doRefresh'] = this.doRefresh
|
||||
@@ -58,9 +58,9 @@ export class ViewPublicationsPage implements OnInit {
|
||||
}
|
||||
|
||||
this.getPublicationDetail();
|
||||
setTimeout(() => {
|
||||
setTimeout(() => {
|
||||
this.getPublications();
|
||||
}, 3000);
|
||||
}, 5000);
|
||||
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
|
||||
|
||||
this.publicationList = new Array();
|
||||
|
||||
|
||||
res.forEach(element => {
|
||||
let item: Publication = this.publicationPipe.itemList(element)
|
||||
this.publicationList.push(item);
|
||||
@@ -122,6 +122,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
if(error.status == '404'){
|
||||
this.error = 'Sem publicações disponíveis!';
|
||||
this.publicationList= [];
|
||||
this.publicationListStorage.add(folderId, this.publicationList)
|
||||
}
|
||||
|
||||
this.showLoader = false;
|
||||
|
||||
Reference in New Issue
Block a user