From b5fd1b4f23eefff3de441a4c8e3905a84d951cbc Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Wed, 16 Jun 2021 09:11:20 +0100 Subject: [PATCH 01/32] Improving agenda --- src/app/pages/agenda/agenda.page.html | 8 ++++---- src/app/pages/agenda/agenda.page.scss | 20 +++++++++---------- src/app/pages/agenda/agenda.page.ts | 5 ++--- .../book-meeting-modal.page.ts | 2 +- src/global.scss | 9 +++++++-- 5 files changed, 24 insertions(+), 20 deletions(-) diff --git a/src/app/pages/agenda/agenda.page.html b/src/app/pages/agenda/agenda.page.html index d56fbeab8..a0efae380 100644 --- a/src/app/pages/agenda/agenda.page.html +++ b/src/app/pages/agenda/agenda.page.html @@ -121,7 +121,7 @@ - @@ -213,7 +213,7 @@ --> -
+
@@ -256,7 +256,7 @@
-
+
@@ -297,7 +297,7 @@
-
+
diff --git a/src/app/pages/agenda/agenda.page.scss b/src/app/pages/agenda/agenda.page.scss index 956477c93..ccc408ebf 100644 --- a/src/app/pages/agenda/agenda.page.scss +++ b/src/app/pages/agenda/agenda.page.scss @@ -8,17 +8,17 @@ } ion-slide{ - td{ - div { - padding-left: 7px; - border-radius: 28px; - display: flex; - justify-content: center; - align-items: center; - text-align: center; - height: 25px; - } + td{ + div { + padding-left: 7px; + border-radius: 28px; + display: flex; + justify-content: center; + align-items: center; + text-align: center; + height: 25px; } + } } :host ::ng-deep { diff --git a/src/app/pages/agenda/agenda.page.ts b/src/app/pages/agenda/agenda.page.ts index f84d707ba..f046a59c7 100644 --- a/src/app/pages/agenda/agenda.page.ts +++ b/src/app/pages/agenda/agenda.page.ts @@ -162,7 +162,7 @@ export class AgendaPage implements OnInit { this.loggeduser = authService.ValidatedUser; - this.calendarHeight = "333px"; + this.calendarHeight = "330px"; this.showCalendar = true; this.timelineDate = momentG(new Date(),'dd MMMM yyyy'); @@ -173,8 +173,7 @@ export class AgendaPage implements OnInit { if(this.loggeduser.Profile == 'MDGPR') { this.mobileComponent.showEventList = true; } - - + } ngOnInit() { diff --git a/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts b/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts index 1f525c6c1..c2f61a13e 100644 --- a/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts +++ b/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts @@ -192,7 +192,7 @@ export class BookMeetingModalPage implements OnInit { modal.onDidDismiss().then((data) => { - if(data){ + if(data) { data = data['data']; const newAttendees: EventPerson[] = data['taskParticipants']; diff --git a/src/global.scss b/src/global.scss index 4a4c6ce11..b88a41c69 100644 --- a/src/global.scss +++ b/src/global.scss @@ -189,8 +189,6 @@ td.monthview-secondary-with-event, td.monthview-secondary-with-event[_ngcontent- -webkit-transform: rotate(45deg); transform: rotate(45deg); border-radius: 106px; - width: 30px !important; - height: 30px; padding: 0px !important; div.day{ padding: 0px !important; @@ -585,6 +583,13 @@ td.monthview-secondary-with-event, td.monthview-secondary-with-event[_ngcontent- div { padding-left: 0px; } + + } + + td div:not(.day) { + background-color: red; + width: 30px !important; + height: 30px; } } From 629db09c62dfc9b72187da4242571b60362b70eb Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Wed, 16 Jun 2021 09:51:15 +0100 Subject: [PATCH 02/32] Improve agenda --- src/app/pages/agenda/agenda.page.html | 14 ++++++++------ src/global.scss | 13 +++++++++---- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/app/pages/agenda/agenda.page.html b/src/app/pages/agenda/agenda.page.html index a0efae380..96d2163b7 100644 --- a/src/app/pages/agenda/agenda.page.html +++ b/src/app/pages/agenda/agenda.page.html @@ -99,12 +99,14 @@ -
- -
- {{ view.dates[row*7+col].label }} -
- +
+
+ +
+ {{ view.dates[row*7+col].label }} +
+ +
diff --git a/src/global.scss b/src/global.scss index b88a41c69..a8c92260c 100644 --- a/src/global.scss +++ b/src/global.scss @@ -579,18 +579,23 @@ td.monthview-secondary-with-event, td.monthview-secondary-with-event[_ngcontent- .calendar-component { td { - padding: 7.5px !important; + padding: 8.1px !important; div { padding-left: 0px; } + display: flex; + align-content: center; + justify-content: center; } - - td div:not(.day) { - background-color: red; + td div:not(.day, .day-container) { width: 30px !important; height: 30px; } + tr { + display: flex; + justify-content: space-around; + } } From 16c8e27d342ed2599417516e51b2cb333bf13028 Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Wed, 16 Jun 2021 13:29:57 +0100 Subject: [PATCH 03/32] save --- src/app/pages/agenda/agenda.page.ts | 25 +-- .../pages/agenda/new-event/new-event.page.ts | 88 ++--------- .../event-detail-modal.page.ts | 3 + src/app/pages/events/events.page.ts | 44 +++++- src/app/services/events.service.ts | 146 +++++++++++++----- .../shared/agenda/new-event/new-event.page.ts | 21 ++- 6 files changed, 195 insertions(+), 132 deletions(-) diff --git a/src/app/pages/agenda/agenda.page.ts b/src/app/pages/agenda/agenda.page.ts index d2494fb88..efe8eeb47 100644 --- a/src/app/pages/agenda/agenda.page.ts +++ b/src/app/pages/agenda/agenda.page.ts @@ -347,7 +347,7 @@ 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() } @@ -530,10 +530,10 @@ export class AgendaPage implements OnInit { //Inicializa o array eventSource //this.eventSource=[]; - if(this.profile == "mdgpr" && this.loggeduser.Profile == 'MDGPR' ) { + if(this.loggeduser.Profile == 'MDGPR' ) { - let mdOficialEvents = await this.eventService.getAllPrOficialEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).toPromise(); - let mdPessoalEvents = await this.eventService.getAllPrPessoalEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).toPromise(); + let mdOficialEvents = await this.eventService.getAllMdOficialEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).toPromise(); + let mdPessoalEvents = await this.eventService.getAllMdPessoalEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).toPromise(); // calendar this.eventSource=[]; @@ -708,7 +708,7 @@ export class AgendaPage implements OnInit { //Inicializa o array eventSource this.eventsListOficial = []; - if(this.profile == "mdgpr" && this.loggeduser.Profile == 'MDGPR') { + if(this.loggeduser.Profile == 'MDGPR') { this.eventService.getAllMdOficialEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).subscribe(res => { this.eventSource=[]; this.eventsListOficial = res.filter(data => data.CalendarName == "Oficial"); @@ -742,7 +742,8 @@ export class AgendaPage implements OnInit { this.timelineBoxCorrectHeight(500); this.centralizeTimeline(500); }); - } else { + } + else { let prOficialEvents= await this.eventService.getAllPrOficialEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).toPromise(); this.eventSource=[]; this.eventsListOficial = prOficialEvents.filter(data => data.CalendarName == "Oficial"); @@ -779,7 +780,8 @@ export class AgendaPage implements OnInit { break; } - } else { + } + else { //this.showTimelinePR = false; //this.showTimelineMD = false; @@ -789,8 +791,8 @@ export class AgendaPage implements OnInit { if(this.loggeduser.Profile == 'MDGPR') { - let mdOficialEvents = await this.eventService.getAllPrOficialEvents( momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59') ).toPromise(); - let mdPessoalEvents = await this.eventService.getAllPrPessoalEvents( momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59') ).toPromise(); + let mdOficialEvents = await this.eventService.getAllMdOficialEvents( momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59') ).toPromise(); + let mdPessoalEvents = await this.eventService.getAllMdPessoalEvents( momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59') ).toPromise(); if(this.segment == 'Oficial') { this.eventsList = mdOficialEvents; @@ -842,6 +844,9 @@ export class AgendaPage implements OnInit { } + else{ + + let prOficialEvents= await this.eventService.getAllPrOficialEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).toPromise(); let prPessoalEvents= await this.eventService.getAllPrPessoalEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).toPromise(); @@ -890,6 +895,8 @@ export class AgendaPage implements OnInit { this.timelineBoxCorrectHeight(500); this.centralizeTimeline(500); } + + } } } diff --git a/src/app/pages/agenda/new-event/new-event.page.ts b/src/app/pages/agenda/new-event/new-event.page.ts index 57f0520d5..e4ce7c3c7 100644 --- a/src/app/pages/agenda/new-event/new-event.page.ts +++ b/src/app/pages/agenda/new-event/new-event.page.ts @@ -4,7 +4,9 @@ import { EventAttachment } from 'src/app/models/attachment.model'; import { EventBody } from 'src/app/models/eventbody.model'; import { EventPerson } from 'src/app/models/eventperson.model'; import { SearchDocument } from 'src/app/models/search-document'; +import { User } from 'src/app/models/user.model'; import { AttachmentsService } from 'src/app/services/attachments.service'; +import { AuthService } from 'src/app/services/auth.service'; import { EventsService } from 'src/app/services/events.service'; import { ToastService } from 'src/app/services/toast.service'; import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page'; @@ -36,6 +38,8 @@ export class NewEventPage implements OnInit { documents:SearchDocument[] = []; + loggeduser: User; + constructor( private modalController: ModalController, private navParams: NavParams, @@ -43,11 +47,13 @@ export class NewEventPage implements OnInit { private attachmentsService: AttachmentsService, private animationController: AnimationController, private toastService: ToastService, + userService: AuthService, ) { + this.loggeduser = userService.ValidatedUser; this.postEvent = new Event(); this.eventBody = { BodyType : "1", Text : ""}; this.postEvent.Body = this.eventBody; - this.profile = this.navParams.get('profile'); + /* this.profile = this.navParams.get('profile'); */ this.selectedSegment = this.navParams.get('segment'); this.selectedDate = this.navParams.get('eventSelectedDate'); @@ -126,14 +132,20 @@ export class NewEventPage implements OnInit { this.postEvent.HasAttachments = true; } - let eventId: string; + let eventId: any; try { - if(this.profile=='mdgpr') { + if(this.loggeduser.Profile == 'MDGPR') { + console.log(this.loggeduser.Profile); + eventId = await this.eventService.postEventMd(this.postEvent, this.postEvent.CalendarName).toPromise(); + console.log(eventId); + } - else if(this.profile=='pr'){ + else if(this.loggeduser.Profile == 'PR'){ + console.log(this.loggeduser.Profile); + eventId = await this.eventService.postEventPr(this.postEvent, this.postEvent.CalendarName).toPromise(); } @@ -170,74 +182,6 @@ export class NewEventPage implements OnInit { } - - async successMessage(message?: any, callback?) { - var notification = document.createElement('div') - notification.id = 'notification' - notification.innerHTML = ` - -
-

- -

{{ message }}

-

- -
- ` - - document.body.append(notification) - notification.querySelector('.text').innerHTML = message || 'Processo efetuado' - setTimeout(()=>{ - notification.remove() - },7000) - - } - - async badRequest(message?: string, callback?) { - const enterAnimation = (baseEl: any) => { - const backdropAnimation = this.animationController.create() - .addElement(baseEl.querySelector('ion-backdrop')!) - .fromTo('opacity', '0.01', 'var(--backdrop-opacity)'); - - const wrapperAnimation = this.animationController.create() - .addElement(baseEl.querySelector('.modal-wrapper')!) - .keyframes([ - { offset: 0, opacity: '1', right: '-100%' }, - { offset: 1, opacity: '1', right: '0px' } - ]); - - return this.animationController.create() - .addElement(baseEl) - .easing('ease-out') - .duration(500) - .addAnimation([backdropAnimation, wrapperAnimation]); - } - - const leaveAnimation = (baseEl: any) => { - return enterAnimation(baseEl).direction('reverse'); - } - - - const modal = await this.modalController.create({ - enterAnimation, - leaveAnimation, - component: BadRequestPage, - componentProps: { - message: message || 'Processo efetuado' , - }, - cssClass: 'notification-modal' - }); - - modal.present() - - setTimeout(()=>{ - if (callback) { - callback() - } - modal.dismiss() - },7000) - } - async openAttendees() { const modal = await this.modalController.create({ diff --git a/src/app/pages/events/event-detail-modal/event-detail-modal.page.ts b/src/app/pages/events/event-detail-modal/event-detail-modal.page.ts index 461c74cde..c04711f56 100644 --- a/src/app/pages/events/event-detail-modal/event-detail-modal.page.ts +++ b/src/app/pages/events/event-detail-modal/event-detail-modal.page.ts @@ -184,6 +184,9 @@ export class EventDetailModalPage implements OnInit { this.attachamentsService.getAttachmentsById(this.pageId).subscribe(res => { console.log(res); + },(error) => { + console.log(error); + }); } async viewDocument(documenturl:string) diff --git a/src/app/pages/events/events.page.ts b/src/app/pages/events/events.page.ts index e1f3fda85..97fb5199e 100644 --- a/src/app/pages/events/events.page.ts +++ b/src/app/pages/events/events.page.ts @@ -123,13 +123,49 @@ export class EventsPage implements OnInit { let start = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds(); let end = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" 23:59:59"; - switch (this.segment) + + if(this.loggeduser.Profile == 'MDGPR'){ + + let mdOficialEvents = await this.eventService.getAllMdOficialEvents(start, end).toPromise(); + let mdPessoalEvents = await this.eventService.getAllMdPessoalEvents(start, end).toPromise(); + + this.eventsList = mdOficialEvents.concat(mdPessoalEvents); + + if(this.eventsList.length > 0){ + this.currentEvent = this.eventsList[0].Subject; + this.currentHoursMinutes = this.eventsList[0].StartDate; + } + + this.totalEvent = this.eventsList.length; + this.showLoader = false; + + } + else{ + + let prOficialEvents= await this.eventService.getAllPrOficialEvents(start, end).toPromise(); + let prPessoalEvents= await this.eventService.getAllPrPessoalEvents(start, end).toPromise(); + this.eventsList = prOficialEvents.concat(prPessoalEvents); + console.log(this.eventsList); + console.log(this.eventsList); + + if(this.eventsList.length > 0){ + this.currentEvent = this.eventsList[0].Subject; + this.currentHoursMinutes = this.eventsList[0].StartDate; + } + + this.totalEvent = this.eventsList.length; + this.showLoader = false; + + } + + + /* switch (this.segment) { case "Combinada": if(this.loggeduser.Profile == 'MDGPR'){ - let mdOficialEvents = await this.eventService.getAllPrOficialEvents(start, end).toPromise(); - let mdPessoalEvents = await this.eventService.getAllPrPessoalEvents(start, end).toPromise(); + let mdOficialEvents = await this.eventService.getAllMdOficialEvents(start, end).toPromise(); + let mdPessoalEvents = await this.eventService.getAllMdPessoalEvents(start, end).toPromise(); this.eventsList = mdOficialEvents.concat(mdPessoalEvents); @@ -190,7 +226,7 @@ export class EventsPage implements OnInit { }); } break; - } + } */ } showGreeting(){ diff --git a/src/app/services/events.service.ts b/src/app/services/events.service.ts index 93a765bf9..f977f002c 100644 --- a/src/app/services/events.service.ts +++ b/src/app/services/events.service.ts @@ -16,8 +16,11 @@ export class EventsService { loggeduser: User; headers: HttpHeaders; - headersOwnerOficial: HttpHeaders; - headersOwnerPessoal: HttpHeaders; + headersPrOficial: HttpHeaders; + headersPrPessoal: HttpHeaders; + + headersMdOficial: HttpHeaders; + headersMdPessoal: HttpHeaders; headersSharedOficial: HttpHeaders; headersSharedPessoal: HttpHeaders; @@ -26,51 +29,75 @@ export class EventsService { constructor(private http: HttpClient, user: AuthService) { this.loggeduser = user.ValidatedUser; - this.headersOwnerOficial = new HttpHeaders(); - this.headersOwnerPessoal = new HttpHeaders(); + this.headersMdOficial = new HttpHeaders(); + this.headersMdPessoal = new HttpHeaders(); + + + this.headersPrOficial = new HttpHeaders(); + this.headersPrPessoal = new HttpHeaders(); + this.headersSharedOficial = new HttpHeaders(); this.headersSharedPessoal = new HttpHeaders(); if(this.loggeduser.Profile == 'MDGPR'){ - this.headersOwnerOficial = this.headersOwnerOficial.set('Authorization', this.loggeduser.BasicAuthKey); - this.headersOwnerOficial = this.headersOwnerOficial.set('CalendarId', this.loggeduser.OwnerCalendars[0].CalendarId); - this.headersOwnerOficial = this.headersOwnerOficial.set('CalendarRoleId', this.loggeduser.OwnerCalendars[0].CalendarRoleId); + + this.loggeduser.OwnerCalendars.forEach(calendar =>{ + if(calendar.CalendarName == 'Oficial'){ + this.headersMdOficial = this.headersMdOficial.set('Authorization', this.loggeduser.BasicAuthKey); + this.headersMdOficial = this.headersMdOficial.set('CalendarId', calendar.CalendarId); + this.headersMdOficial = this.headersMdOficial.set('CalendarRoleId', calendar.CalendarRoleId); + } + else if(calendar.CalendarName == 'Pessoal'){ + this.headersMdPessoal = this.headersMdPessoal.set('Authorization', this.loggeduser.BasicAuthKey); + this.headersMdPessoal = this.headersMdPessoal.set('CalendarId', calendar.CalendarId); + this.headersMdPessoal = this.headersMdPessoal.set('CalendarRoleId', calendar.CalendarRoleId); - this.headersOwnerPessoal = this.headersOwnerPessoal.set('Authorization', this.loggeduser.BasicAuthKey); - this.headersOwnerPessoal = this.headersOwnerPessoal.set('CalendarId', this.loggeduser.OwnerCalendars[1].CalendarId); - this.headersOwnerPessoal = this.headersOwnerPessoal.set('CalendarRoleId', this.loggeduser.OwnerCalendars[1].CalendarRoleId); + } + }); - this.headersSharedOficial = this.headersSharedOficial.set('Authorization', this.loggeduser.BasicAuthKey); - this.headersSharedOficial = this.headersSharedOficial.set('CalendarId', this.loggeduser.SharedCalendars[0].CalendarId); - this.headersSharedOficial = this.headersSharedOficial.set('CalendarRoleId', this.loggeduser.SharedCalendars[0].CalendarRoleId); - - this.headersSharedPessoal = this.headersSharedPessoal.set('Authorization', this.loggeduser.BasicAuthKey); - this.headersSharedPessoal = this.headersSharedPessoal.set('CalendarId', this.loggeduser.SharedCalendars[1].CalendarId); - this.headersSharedPessoal = this.headersSharedPessoal.set('CalendarRoleId', this.loggeduser.SharedCalendars[1].CalendarRoleId); + this.loggeduser.SharedCalendars.forEach(sharedCalendar =>{ + if(sharedCalendar.CalendarName == 'Oficial'){ + this.headersSharedOficial = this.headersSharedOficial.set('Authorization', this.loggeduser.BasicAuthKey); + this.headersSharedOficial = this.headersSharedOficial.set('CalendarId', sharedCalendar.CalendarId); + this.headersSharedOficial = this.headersSharedOficial.set('CalendarRoleId', sharedCalendar.CalendarRoleId); + } + else if(sharedCalendar.CalendarName == 'Pessoal'){ + this.headersSharedPessoal = this.headersSharedPessoal.set('Authorization', this.loggeduser.BasicAuthKey); + this.headersSharedPessoal = this.headersSharedPessoal.set('CalendarId', sharedCalendar.CalendarId); + this.headersSharedPessoal = this.headersSharedPessoal.set('CalendarRoleId', sharedCalendar.CalendarRoleId); + } + }); } else if(this.loggeduser.Profile == 'PR'){ - this.headersOwnerOficial = this.headersOwnerOficial.set('Authorization', this.loggeduser.BasicAuthKey); - this.headersOwnerOficial = this.headersOwnerOficial.set('CalendarId', this.loggeduser.OwnerCalendars[0].CalendarId); - this.headersOwnerOficial = this.headersOwnerOficial.set('CalendarRoleId', this.loggeduser.OwnerCalendars[0].CalendarRoleId); - this.headersOwnerPessoal = this.headersOwnerPessoal.set('Authorization', this.loggeduser.BasicAuthKey); - this.headersOwnerPessoal = this.headersOwnerPessoal.set('CalendarId', this.loggeduser.OwnerCalendars[1].CalendarId); - this.headersOwnerPessoal = this.headersOwnerPessoal.set('CalendarRoleId', this.loggeduser.OwnerCalendars[1].CalendarRoleId); + this.loggeduser.OwnerCalendars.forEach(calendar =>{ + if(calendar.CalendarName == 'Oficial'){ + this.headersPrOficial = this.headersPrOficial.set('Authorization', this.loggeduser.BasicAuthKey); + this.headersPrOficial = this.headersPrOficial.set('CalendarId', calendar.CalendarId); + this.headersPrOficial = this.headersPrOficial.set('CalendarRoleId', calendar.CalendarRoleId); + } + else if(calendar.CalendarName == 'Pessoal'){ + this.headersPrPessoal = this.headersPrPessoal.set('Authorization', this.loggeduser.BasicAuthKey); + this.headersPrPessoal = this.headersPrPessoal.set('CalendarId', calendar.CalendarId); + this.headersPrPessoal = this.headersPrPessoal.set('CalendarRoleId', calendar.CalendarRoleId); + + } + }); } + this.headers = new HttpHeaders(); this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey); - /* this.headers = this.headers.set('CalendarId', this.loggeduser.OwnerCalendars[0].CalendarId); - this.headers = this.headers.set('CalendarRoleId', this.loggeduser.OwnerCalendars[0].CalendarRoleId); */ + } - getAllEvents(startdate:string, enddate:string): Observable{ + /* getAllEvents(startdate:string, enddate:string): Observable{ const geturl = environment.apiURL + 'calendar/GetAllEvents'; let params = new HttpParams(); @@ -82,7 +109,7 @@ export class EventsService { params: params }; return this.http.get(`${geturl}`, options); - } + } */ getAllPrOficialEvents(startdate:string, enddate:string): Observable{ @@ -91,9 +118,18 @@ export class EventsService { params = params.set("Start", startdate); params = params.set("End", enddate); + + /* switch (this.loggeduser.Profile == 'MDGPR') { + case value: + + break; + + default: + break; + } */ let options = { - headers: this.headersOwnerOficial, + headers: this.headersPrOficial, params: params }; return this.http.get(`${geturl}`, options); @@ -107,7 +143,7 @@ export class EventsService { params = params.set("End", enddate); let options = { - headers: this.headersOwnerPessoal, + headers: this.headersPrPessoal, params: params }; return this.http.get(`${geturl}`, options); @@ -121,7 +157,7 @@ export class EventsService { params = params.set("End", enddate); let options = { - headers: this.headersOwnerOficial, + headers: this.headersMdOficial, params: params }; return this.http.get(`${geturl}`, options); @@ -135,7 +171,7 @@ export class EventsService { params = params.set("End", enddate); let options = { - headers: this.headersOwnerPessoal, + headers: this.headersMdPessoal, params: params }; return this.http.get(`${geturl}`, options); @@ -239,7 +275,7 @@ export class EventsService { return this.http.put(`${puturl}`, event, options) } - postEvent(event:Event, calendarName:string, sharedagenda:string) + /* postEvent(event:Event, calendarName:string, sharedagenda:string) { const puturl = environment.apiURL + 'calendar/' + ((sharedagenda != '') ? sharedagenda : 'PostEvent'); let params = new HttpParams(); @@ -252,7 +288,7 @@ export class EventsService { }; return this.http.post(`${puturl}`, event, options) - } + } */ postEventMd(event:Event, calendarName:string) { @@ -261,11 +297,25 @@ export class EventsService { params = params.set("CalendarName", calendarName); - let options = { - headers: this.headers, - params: params - }; + let options:any; + switch (calendarName) { + case 'Oficial': + console.log(calendarName); + options = { + headers: this.headersMdOficial, + params: params + }; + break; + case 'Pessoal': + console.log(calendarName); + options = { + headers: this.headersMdPessoal, + params: params + }; + break; + } + console.log(options); return this.http.post(`${puturl}`, event, options) } @@ -276,10 +326,24 @@ export class EventsService { params = params.set("CalendarName", calendarName); - let options = { - headers: this.headers, - params: params - }; + let options:any; + switch (calendarName) { + case 'Oficial': + console.log(calendarName); + options = { + headers: this.headersPrOficial, + params: params + }; + break; + + case 'Pessoal': + console.log(calendarName); + options = { + headers: this.headersPrPessoal, + params: params + }; + break; + } return this.http.post(`${puturl}`, event, options) } diff --git a/src/app/shared/agenda/new-event/new-event.page.ts b/src/app/shared/agenda/new-event/new-event.page.ts index a12e0824b..d9b795222 100644 --- a/src/app/shared/agenda/new-event/new-event.page.ts +++ b/src/app/shared/agenda/new-event/new-event.page.ts @@ -12,6 +12,8 @@ import { EventAttachment } from 'src/app/models/attachment.model'; import { BadRequestPage } from '../../popover/bad-request/bad-request.page'; import { SuccessMessagePage} from '../../popover/success-message/success-message.page'; import { ToastService } from 'src/app/services/toast.service'; +import { User } from 'src/app/models/user.model'; +import { AuthService } from 'src/app/services/auth.service'; @Component({ @@ -45,14 +47,19 @@ export class NewEventPage implements OnInit { minDate: string; + loggeduser: User; + constructor( private modalController: ModalController, private eventService: EventsService, private attachmentsService: AttachmentsService, private animationController: AnimationController, - private toastService: ToastService + private toastService: ToastService, + private userService: AuthService, - ) {} + ) { + this.loggeduser = userService.ValidatedUser; + } ngOnInit() { @@ -173,11 +180,11 @@ export class NewEventPage implements OnInit { this.postEvent.HasAttachments = true; } - if(this.profile=='mdgpr') { + if(this.loggeduser.Profile == 'MDGPR') { this.eventService.postEventMd(this.postEvent, this.postEvent.CalendarName).subscribe( async (id) => { - const eventId: string = id; + const eventId: any = id; const DocumentToSave: EventAttachment[] = this.documents.map((e) => { return { @@ -215,11 +222,13 @@ export class NewEventPage implements OnInit { this.toastService.badRequest('Evento não criado') }); } - else if(this.profile=='pr') { + else if(this.loggeduser.Profile == 'PR') { this.eventService.postEventPr(this.postEvent, this.postEvent.CalendarName).subscribe( (id) => { + console.log(id); + - const eventId: string = id; + const eventId: any = id; const DocumentToSave: EventAttachment[] = this.documents.map((e) => { return { From e2b38761c20601df31803c7cc21f3663de60a33f Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Wed, 16 Jun 2021 15:58:44 +0100 Subject: [PATCH 04/32] Improve --- package-lock.json | 33 ++++++++++++++++++- package.json | 3 ++ src/app/app.module.ts | 2 +- src/app/home/home.page.html | 1 + src/app/pages/agenda/agenda.page.html | 16 ++++----- src/app/pages/agenda/agenda.page.scss | 2 +- src/app/pages/agenda/agenda.page.ts | 17 ++-------- .../agenda/edit-event/edit-event.page.html | 11 +++++++ .../agenda/new-event/new-event.page.html | 2 ++ src/app/services/toast.service.ts | 24 ++++++++++---- .../agenda/new-event/new-event.module.ts | 5 +-- .../agenda/new-event/new-event.page.html | 16 +++++++++ .../shared/agenda/new-event/new-event.page.ts | 3 +- src/global.scss | 24 ++++++++++---- src/index.html | 3 ++ src/polyfills.ts | 4 +++ src/theme/variables.scss | 6 ++++ 17 files changed, 131 insertions(+), 41 deletions(-) diff --git a/package-lock.json b/package-lock.json index ebd5223d4..10c5dc5d6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -387,6 +387,23 @@ } } }, + "@angular/cdk": { + "version": "11.2.13", + "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-11.2.13.tgz", + "integrity": "sha512-FkE4iCwoLbQxLDUOjV1I7M/6hmpyb7erAjEdWgch7nGRNxF1hqX5Bqf1lvLFKPNCbx5NRI5K7YVAdIUQUR8vug==", + "requires": { + "parse5": "^5.0.0", + "tslib": "^2.0.0" + }, + "dependencies": { + "parse5": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", + "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==", + "optional": true + } + } + }, "@angular/cli": { "version": "11.2.1", "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-11.2.1.tgz", @@ -748,6 +765,14 @@ } } }, + "@angular/material": { + "version": "11.2.13", + "resolved": "https://registry.npmjs.org/@angular/material/-/material-11.2.13.tgz", + "integrity": "sha512-FqFdGSkOtqsmeLyTSousodDGUy2NqbtxCIKv2rwbsIRwHNKB0KpR/UQhA2gMRuGa5hxhMJ0DW0Tf9neMRuLCTg==", + "requires": { + "tslib": "^2.0.0" + } + }, "@angular/platform-browser": { "version": "11.2.2", "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-11.2.2.tgz", @@ -4631,6 +4656,11 @@ "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", "dev": true }, + "bootstrap": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.6.0.tgz", + "integrity": "sha512-Io55IuQY3kydzHtbGvQya3H+KorS/M9rSNyfCGCg9WZ4pyT/lCxIlpJgG1GXW/PswzC84Tr2fBYi+7+jFVQQBw==" + }, "bplist-creator": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/bplist-creator/-/bplist-creator-0.0.8.tgz", @@ -19060,7 +19090,8 @@ }, "ssri": { "version": "6.0.1", - "resolved": "", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", + "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", "dev": true, "requires": { "figgy-pudding": "^3.5.1" diff --git a/package.json b/package.json index 531533ba1..8df7c75a6 100644 --- a/package.json +++ b/package.json @@ -17,10 +17,12 @@ "@angular-devkit/core": "^11.2.1", "@angular-devkit/schematics": "^11.2.1", "@angular/animations": "^11.1.0", + "@angular/cdk": "^11.2.13", "@angular/common": "^11.2.2", "@angular/core": "^11.2.2", "@angular/forms": "~11.2.2", "@angular/localize": "^11.2.2", + "@angular/material": "^11.2.13", "@angular/platform-browser": "~11.2.2", "@angular/platform-browser-dynamic": "~11.2.2", "@angular/router": "~11.2.2", @@ -47,6 +49,7 @@ "@ng-bootstrap/ng-bootstrap": "^9.1.2", "angular-calendar": "^0.28.22", "angular-tag-cloud-module": "^5.2.2", + "bootstrap": "^4.5.0", "cordova-plugin-camera": "^5.0.1", "cordova-plugin-filepath": "^1.5.8", "cordova-plugin-okhttp": "^2.0.0", diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 11c958951..07992d08b 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -48,7 +48,7 @@ import { NgbModule } from '@ng-bootstrap/ng-bootstrap' IonicModule.forRoot(), IonicStorageModule.forRoot(), AppRoutingModule, - HttpClientModule, + HttpClientModule, NgbModule, NoopAnimationsModule, ], providers: [ StatusBar, diff --git a/src/app/home/home.page.html b/src/app/home/home.page.html index 50aec61e2..cbba18d51 100644 --- a/src/app/home/home.page.html +++ b/src/app/home/home.page.html @@ -28,3 +28,4 @@ + \ No newline at end of file diff --git a/src/app/pages/agenda/agenda.page.html b/src/app/pages/agenda/agenda.page.html index 96d2163b7..02c5eff98 100644 --- a/src/app/pages/agenda/agenda.page.html +++ b/src/app/pages/agenda/agenda.page.html @@ -103,7 +103,7 @@
- {{ view.dates[row*7+col].label }} +
{{ view.dates[row*7+col].label }}
@@ -118,12 +118,12 @@
- + - @@ -149,7 +149,7 @@ -
+
Própria
@@ -173,7 +173,7 @@
-
+
-
+
@@ -258,7 +258,7 @@
-
+
@@ -299,7 +299,7 @@
-
+
diff --git a/src/app/pages/agenda/agenda.page.scss b/src/app/pages/agenda/agenda.page.scss index ccc408ebf..4603ec74f 100644 --- a/src/app/pages/agenda/agenda.page.scss +++ b/src/app/pages/agenda/agenda.page.scss @@ -706,7 +706,7 @@ app-approve-event{ .fs-timeline { - border-right: 2px solid #909090; + border-right: 1px solid #909090; } diff --git a/src/app/pages/agenda/agenda.page.ts b/src/app/pages/agenda/agenda.page.ts index 1feb9e608..c2f66e6ef 100644 --- a/src/app/pages/agenda/agenda.page.ts +++ b/src/app/pages/agenda/agenda.page.ts @@ -162,7 +162,7 @@ export class AgendaPage implements OnInit { this.loggeduser = authService.ValidatedUser; - this.calendarHeight = "330px"; + this.calendarHeight = "329.8px"; this.showCalendar = true; this.timelineDate = momentG(new Date(),'dd MMMM yyyy'); @@ -193,7 +193,6 @@ export class AgendaPage implements OnInit { window.onresize = (event) => { // if not table remove all component if( window.innerWidth <= 1024){ - console.log('mobile') this.cloneAllmobileComponent(); } }; @@ -253,7 +252,6 @@ export class AgendaPage implements OnInit { //Show information of the event async onEventSelected(ev: { event: Event}){ /* this.viewEventDetail(ev.event.EventId); */ - console.log('DOVE'); this.router.navigate(["/home/agenda", ev.event.EventId, 'agenda']); } @@ -277,7 +275,7 @@ export class AgendaPage implements OnInit { } onTimeSelected = (ev: { selectedTime: Date, events: any[] }) => { - console.log('Selected time: ' + ev.selectedTime + ', hasEvents: ' + (ev.events !== undefined && ev.events.length !== 0)); + // console.log('Selected time: ' + ev.selectedTime + ', hasEvents: ' + (ev.events !== undefined && ev.events.length !== 0)); this.eventSelectedDate2 = ev.selectedTime; } @@ -346,7 +344,7 @@ 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() } @@ -820,8 +818,6 @@ export class AgendaPage implements OnInit { const MDEventList = this.timelineFilter(this.timelineFilterState, this.eventsList, 'mdgpr'); - - this.TimelineMDList = this.eventListBox(MDEventList, 'md') this.events = MDEventList; @@ -838,7 +834,6 @@ export class AgendaPage implements OnInit { this.timelineBoxCorrectHeight(500); this.centralizeTimeline(500); } - } @@ -915,10 +910,6 @@ export class AgendaPage implements OnInit { if ( endDate.getTime() > startDate.getTime() && Difference_In_Days <= 50 && !event.event.IsAllDayEvent ) { if (Difference_In_Days >= 1) { - - if(nice == 'md') { - console.log('md', event) - } const StartEvent = Object.assign({}, { title: event.title, @@ -1102,12 +1093,10 @@ export class AgendaPage implements OnInit { changeProfile() { if(this.profile == "mdgpr"){ - console.log('pr'); this.profile ="pr"; this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate); } else{ - console.log('mdgpr'); this.profile ="mdgpr"; this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate); } diff --git a/src/app/pages/agenda/edit-event/edit-event.page.html b/src/app/pages/agenda/edit-event/edit-event.page.html index 2e86d039c..d38a8cb20 100644 --- a/src/app/pages/agenda/edit-event/edit-event.page.html +++ b/src/app/pages/agenda/edit-event/edit-event.page.html @@ -177,6 +177,17 @@
+ +
+
+
Detalhes
+ + + +
+
+
+
diff --git a/src/app/pages/agenda/new-event/new-event.page.html b/src/app/pages/agenda/new-event/new-event.page.html index 231b119d3..e50e3e8b3 100644 --- a/src/app/pages/agenda/new-event/new-event.page.html +++ b/src/app/pages/agenda/new-event/new-event.page.html @@ -12,6 +12,8 @@
+ +
diff --git a/src/app/services/toast.service.ts b/src/app/services/toast.service.ts index 4260275e8..4db70b56c 100644 --- a/src/app/services/toast.service.ts +++ b/src/app/services/toast.service.ts @@ -25,7 +25,7 @@ export class ToastService { async successMessage(message?: any, callback?) { let notification = document.createElement('div') - notification.id = 'notification' + notification.className = 'notification' notification.innerHTML = `
@@ -43,15 +43,21 @@ export class ToastService { if (callback) { callback() } - notification.remove() - },7000) + + notification.style.right = "-100%" + + setTimeout(()=>{ + notification.remove() + },1000) + + },6000) } async badRequest(message?: string, callback?) { let notification = document.createElement('div') - notification.id = 'notification' + notification.className = 'notification' notification.innerHTML = `
@@ -69,8 +75,14 @@ export class ToastService { if (callback) { callback() } - notification.remove() - },7000) + + notification.style.right = "-100%" + + setTimeout(()=>{ + notification.remove() + },1000) + + },6000) } diff --git a/src/app/shared/agenda/new-event/new-event.module.ts b/src/app/shared/agenda/new-event/new-event.module.ts index 4bcea0ab2..ba28aebfa 100644 --- a/src/app/shared/agenda/new-event/new-event.module.ts +++ b/src/app/shared/agenda/new-event/new-event.module.ts @@ -7,13 +7,14 @@ import { IonicModule } from '@ionic/angular'; import { NewEventPageRoutingModule } from './new-event-routing.module'; import { NewEventPage } from './new-event.page'; - +import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; @NgModule({ imports: [ CommonModule, FormsModule, IonicModule, - NewEventPageRoutingModule + NewEventPageRoutingModule, + NgbModule, // ], declarations: [NewEventPage], exports: [NewEventPage] diff --git a/src/app/shared/agenda/new-event/new-event.page.html b/src/app/shared/agenda/new-event/new-event.page.html index 30169bfa0..0bfdb186d 100644 --- a/src/app/shared/agenda/new-event/new-event.page.html +++ b/src/app/shared/agenda/new-event/new-event.page.html @@ -12,6 +12,22 @@
+ +
+
+
+ +
+ +
+
+
+
+ + + +
diff --git a/src/app/shared/agenda/new-event/new-event.page.ts b/src/app/shared/agenda/new-event/new-event.page.ts index a12e0824b..bf99b4b76 100644 --- a/src/app/shared/agenda/new-event/new-event.page.ts +++ b/src/app/shared/agenda/new-event/new-event.page.ts @@ -168,7 +168,6 @@ export class NewEventPage implements OnInit { this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc); - if(this.documents.length >= 0) { this.postEvent.HasAttachments = true; } @@ -254,7 +253,7 @@ export class NewEventPage implements OnInit { } } - afterSave(){ + afterSave() { this.deleteTemporaryData(); this.onAddEvent.emit(this.postEvent); diff --git a/src/global.scss b/src/global.scss index a8c92260c..d01762086 100644 --- a/src/global.scss +++ b/src/global.scss @@ -579,7 +579,7 @@ td.monthview-secondary-with-event, td.monthview-secondary-with-event[_ngcontent- .calendar-component { td { - padding: 8.1px !important; + padding: 8px !important; div { padding-left: 0px; } @@ -588,7 +588,7 @@ td.monthview-secondary-with-event, td.monthview-secondary-with-event[_ngcontent- justify-content: center; } - td div:not(.day, .day-container) { + td div:not(.day, .day-container, .number) { width: 30px !important; height: 30px; } @@ -773,8 +773,8 @@ ion-icon{ ::-webkit-scrollbar { - width: 10px; - height: 10px; + width: 7px; + height: 7px; } /* Track */ @@ -825,7 +825,7 @@ background: rgb(92, 92, 92); -#notification{ +.notification{ position: absolute; top: 23px; right: 0px; @@ -850,6 +850,11 @@ background: rgb(92, 92, 92); box-shadow: 0px 2px 10px #0000003d; display: flex; align-items: center; + animation-name: example; + animation-duration: 1s; + animation-timing-function: ease-in; + transition: 1s; + .main-content { display: flex; align-items: center; @@ -857,4 +862,11 @@ background: rgb(92, 92, 92); .message { font-size: 12pt; } -} \ No newline at end of file +} + + +@keyframes example { + from {right: -100%;} + to {right: 0px;} +} + \ No newline at end of file diff --git a/src/index.html b/src/index.html index ae8d2c052..6951d9eeb 100644 --- a/src/index.html +++ b/src/index.html @@ -24,6 +24,9 @@ + + + diff --git a/src/polyfills.ts b/src/polyfills.ts index 4978c5cf6..9d5173a3a 100644 --- a/src/polyfills.ts +++ b/src/polyfills.ts @@ -1,3 +1,7 @@ +/*************************************************************************************************** + * Load `$localize` onto the global scope - used if i18n tags appear in Angular templates. + */ +import '@angular/localize/init'; /** * This file includes polyfills needed by Angular and is loaded before the app. * You can add your own extra polyfills to this file. diff --git a/src/theme/variables.scss b/src/theme/variables.scss index b1e4397e6..06085d0ce 100644 --- a/src/theme/variables.scss +++ b/src/theme/variables.scss @@ -495,3 +495,9 @@ } + +/* Importing Bootstrap SCSS file. */ +@import '~bootstrap/scss/bootstrap'; + +html, body { height: 100%; } +body { margin: 0; font-family: Roboto, "Helvetica Neue", sans-serif; } From e300ec8155482dc95302c849f5f044af5584b68e Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Wed, 16 Jun 2021 16:15:34 +0100 Subject: [PATCH 05/32] Improve agenda --- src/app/pages/agenda/agenda.page.html | 2 +- src/app/pages/agenda/agenda.page.scss | 10 +++++----- src/app/pages/agenda/agenda.page.ts | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/app/pages/agenda/agenda.page.html b/src/app/pages/agenda/agenda.page.html index 02c5eff98..6dd43f81c 100644 --- a/src/app/pages/agenda/agenda.page.html +++ b/src/app/pages/agenda/agenda.page.html @@ -123,7 +123,7 @@ - diff --git a/src/app/pages/agenda/agenda.page.scss b/src/app/pages/agenda/agenda.page.scss index 4603ec74f..c6e8f8179 100644 --- a/src/app/pages/agenda/agenda.page.scss +++ b/src/app/pages/agenda/agenda.page.scss @@ -388,11 +388,13 @@ td.monthview-primary-with-event { } -.custom-calendar-header{ +.custom-calendar-header { width: 100%; margin-bottom: 10px; - thead{ - th{ + thead { + display: flex; + justify-content: space-around; + th { font-family: Roboto; font-size: 15px; color: rgba(52, 72, 94, 0.54); @@ -403,8 +405,6 @@ td.monthview-primary-with-event { - - .currente-date-timelien{ padding: 10px 20px; .timeline-date{ diff --git a/src/app/pages/agenda/agenda.page.ts b/src/app/pages/agenda/agenda.page.ts index a8045bc0a..6280c58a7 100644 --- a/src/app/pages/agenda/agenda.page.ts +++ b/src/app/pages/agenda/agenda.page.ts @@ -162,7 +162,7 @@ export class AgendaPage implements OnInit { this.loggeduser = authService.ValidatedUser; - this.calendarHeight = "329.8px"; + this.calendarHeight = "317px"; this.showCalendar = true; this.timelineDate = momentG(new Date(),'dd MMMM yyyy'); From 76153375e3655bd954b8dc19056c3c5e69ced377 Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Wed, 16 Jun 2021 16:29:17 +0100 Subject: [PATCH 06/32] Improve agenda --- src/app/pages/agenda/agenda.page.scss | 3 ++- src/global.scss | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/app/pages/agenda/agenda.page.scss b/src/app/pages/agenda/agenda.page.scss index c6e8f8179..0f8c36d91 100644 --- a/src/app/pages/agenda/agenda.page.scss +++ b/src/app/pages/agenda/agenda.page.scss @@ -721,4 +721,5 @@ app-approve-event{ display: none !important; } -} \ No newline at end of file +} + diff --git a/src/global.scss b/src/global.scss index d01762086..9462dfcea 100644 --- a/src/global.scss +++ b/src/global.scss @@ -869,4 +869,11 @@ background: rgb(92, 92, 92); from {right: -100%;} to {right: 0px;} } - \ No newline at end of file + + + +.calendar-component .monthview-container .swiper-slide-active table tbody { + tr:nth-child(n+6) { + display: none; + } +} \ No newline at end of file From a1911b4cfb200299ed45ea3a26d6b423d78cd96d Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Wed, 16 Jun 2021 16:55:47 +0100 Subject: [PATCH 07/32] save --- src/app/pages/agenda/agenda.page.ts | 139 ++++++++++++------ src/app/pages/events/events.page.ts | 1 - src/app/services/events.service.ts | 39 ++++- .../shared/agenda/new-event/new-event.page.ts | 4 + 4 files changed, 136 insertions(+), 47 deletions(-) diff --git a/src/app/pages/agenda/agenda.page.ts b/src/app/pages/agenda/agenda.page.ts index efe8eeb47..c4e4dfe77 100644 --- a/src/app/pages/agenda/agenda.page.ts +++ b/src/app/pages/agenda/agenda.page.ts @@ -266,8 +266,8 @@ export class AgendaPage implements OnInit { // calendar change date this.eventSelectedDate = new Date(ev); - this.centralizeTimeline(500); - this.timelineBoxCorrectHeight(500); + /* this.centralizeTimeline(500); + this.timelineBoxCorrectHeight(500); */ }; // changedate @@ -286,7 +286,7 @@ export class AgendaPage implements OnInit { this.rangeStartDate = ev.startTime; this.rangeEndDate = ev.endTime; - this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate); + //this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate); } // for calendar @@ -515,7 +515,7 @@ export class AgendaPage implements OnInit { return ((new Date(this.timelineDate)).getDate()).toString().padStart(2,'0') } - async loadRangeEvents(startTime: Date, endTime: Date){ + loadRangeEvents(startTime: Date, endTime: Date){ this.eventSelectedDate = new Date(startTime); @@ -529,16 +529,17 @@ export class AgendaPage implements OnInit { case "Combinado": //Inicializa o array eventSource //this.eventSource=[]; - - if(this.loggeduser.Profile == 'MDGPR' ) { - let mdOficialEvents = await this.eventService.getAllMdOficialEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).toPromise(); - let mdPessoalEvents = await this.eventService.getAllMdPessoalEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).toPromise(); + + if(this.profile == "mdgpr" && this.loggeduser.Profile == 'MDGPR' ) { + this.eventService.getAllMdEvents( momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59') ).then( + + (response:any) => { // calendar this.eventSource=[]; - this.eventsList = mdOficialEvents.concat(mdPessoalEvents); + this.eventsList = response; // loop this.eventsList.forEach((element, eventIndex) => { @@ -573,17 +574,17 @@ export class AgendaPage implements OnInit { this.timelineBoxCorrectHeight(500); this.centralizeTimeline(500); - + }); } else { - let prOficialEvents= await this.eventService.getAllPrOficialEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).toPromise(); - let prPessoalEvents= await this.eventService.getAllPrPessoalEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).toPromise(); + 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) => { // calendar this.eventSource=[]; - this.eventsList = prOficialEvents.concat(prPessoalEvents); + this.eventsList = response; // calendar this.eventsList.forEach((element, eventIndex) => { @@ -617,6 +618,8 @@ export class AgendaPage implements OnInit { this.timelineBoxCorrectHeight(500); this.centralizeTimeline(500); + + }); } break; @@ -624,7 +627,7 @@ export class AgendaPage implements OnInit { //Inicializa o array eventSource if(this.profile == "mdgpr" && this.loggeduser.Profile == 'MDGPR') { - this.eventService.getAllMdPessoalEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).subscribe(response => { + 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) => { this.eventSource=[]; this.eventsListPessoal= []; @@ -665,11 +668,10 @@ export class AgendaPage implements OnInit { } else{ - let prPessoalEvents= await this.eventService.getAllPrPessoalEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).toPromise(); - + 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=[]; - this.eventsListPessoal = prPessoalEvents.filter(data => data.CalendarName == "Pessoal"); + this.eventsListPessoal = response.filter(data => data.CalendarName == "Pessoal"); this.eventsListPessoal.forEach(element => { this.eventSource.push({ title: element.Subject, @@ -699,7 +701,7 @@ export class AgendaPage implements OnInit { this.timelineBoxCorrectHeight(500); this.centralizeTimeline(500); - + }); } break; @@ -708,8 +710,8 @@ export class AgendaPage implements OnInit { //Inicializa o array eventSource this.eventsListOficial = []; - if(this.loggeduser.Profile == 'MDGPR') { - this.eventService.getAllMdOficialEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).subscribe(res => { + if(this.profile == "mdgpr" && this.loggeduser.Profile == 'MDGPR') { + this.eventService.getAllMdEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).then((res:any) => { this.eventSource=[]; this.eventsListOficial = res.filter(data => data.CalendarName == "Oficial"); @@ -742,11 +744,10 @@ export class AgendaPage implements OnInit { this.timelineBoxCorrectHeight(500); this.centralizeTimeline(500); }); - } - else { - let prOficialEvents= await this.eventService.getAllPrOficialEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).toPromise(); + } else { + this.eventService.getAllPrEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).then((res:any) => { this.eventSource=[]; - this.eventsListOficial = prOficialEvents.filter(data => data.CalendarName == "Oficial"); + this.eventsListOficial = res.filter(data => data.CalendarName == "Oficial"); this.eventsListOficial.forEach(element => { this.eventSource.push({ title: element.Subject, @@ -776,12 +777,12 @@ export class AgendaPage implements OnInit { this.timelineBoxCorrectHeight(500); this.centralizeTimeline(500); + }); } break; } - } - else { + } else { //this.showTimelinePR = false; //this.showTimelineMD = false; @@ -790,16 +791,17 @@ export class AgendaPage implements OnInit { let counter = 0; if(this.loggeduser.Profile == 'MDGPR') { - - let mdOficialEvents = await this.eventService.getAllMdOficialEvents( momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59') ).toPromise(); - let mdPessoalEvents = await this.eventService.getAllMdPessoalEvents( momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59') ).toPromise(); - + console.log('MDGPR'); + + this.eventService.getAllMdEvents( momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59') ).then( (response:any) => { + + if(this.segment == 'Oficial') { - this.eventsList = mdOficialEvents; + this.eventsList = response.filter(data => data.CalendarName == "Oficial"); } else if (this.segment == 'Pessoal') { - this.eventsList = mdPessoalEvents; + this.eventsList = response.filter(data => data.CalendarName == "Pessoal"); } else { - this.eventsList = mdOficialEvents.concat(mdPessoalEvents); + this.eventsList = response; } this.eventSource= this.eventSource.filter(e => e.profile != 'md'); @@ -842,21 +844,72 @@ export class AgendaPage implements OnInit { this.centralizeTimeline(500); } - - } - else{ + }); + this.eventService.getAllSharedEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).then((response:any) => { + + if(this.segment == 'Oficial') { + this.eventsList = response.filter(data => data.CalendarName == "Oficial"); + } else if (this.segment == 'Pessoal') { + this.eventsList = response.filter(data => data.CalendarName == "Pessoal"); + } else { + this.eventsList = response; + } + + this.eventSource = this.eventSource.filter(e => e.profile != 'pr'); + + this.eventsList.forEach((element, eventIndex) => { + + // calendar + this.eventSource.push({ + index: eventIndex, + title: element.Subject, + startTime: new Date(element.StartDate), + endTime: new Date(element.EndDate), + allDay: false, + event: element, + calendarName: element.CalendarName, + profile:'pr', + id: element.EventId, + }); + + }); + + this.TimelinePR = this.timelineFilter(this.timelineFilterState, this.eventsList, 'pr'); + + + this.TimelinePRList = this.eventListBox(this.TimelinePR) + + this.myCal.update(); + this.myCal.loadEvents(); + + this.showTimelinePR = true; + + counter++; + + if(counter==2 || this.loggeduser.Profile == 'PR') { + this.showLoader = false; + this.timelineBoxCorrectHeight(500); + this.centralizeTimeline(500); + } + + }); + + + + + }else{ + console.log('PR'); - let prOficialEvents= await this.eventService.getAllPrOficialEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).toPromise(); - let prPessoalEvents= await this.eventService.getAllPrPessoalEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).toPromise(); + 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) => { if(this.segment == 'Oficial') { - this.eventsList = prOficialEvents; + this.eventsList = response.filter(data => data.CalendarName == "Oficial"); } else if (this.segment == 'Pessoal') { - this.eventsList = prPessoalEvents; + this.eventsList = response.filter(data => data.CalendarName == "Pessoal"); } else { - this.eventsList = prOficialEvents.concat(prPessoalEvents); + this.eventsList = response; } this.eventSource = this.eventSource.filter(e => e.profile != 'pr'); @@ -896,7 +949,9 @@ export class AgendaPage implements OnInit { this.centralizeTimeline(500); } - } + }); + + } } } diff --git a/src/app/pages/events/events.page.ts b/src/app/pages/events/events.page.ts index 97fb5199e..a7f108370 100644 --- a/src/app/pages/events/events.page.ts +++ b/src/app/pages/events/events.page.ts @@ -146,7 +146,6 @@ export class EventsPage implements OnInit { let prPessoalEvents= await this.eventService.getAllPrPessoalEvents(start, end).toPromise(); this.eventsList = prOficialEvents.concat(prPessoalEvents); console.log(this.eventsList); - console.log(this.eventsList); if(this.eventsList.length > 0){ this.currentEvent = this.eventsList[0].Subject; diff --git a/src/app/services/events.service.ts b/src/app/services/events.service.ts index f977f002c..6c7853d63 100644 --- a/src/app/services/events.service.ts +++ b/src/app/services/events.service.ts @@ -149,7 +149,17 @@ export class EventsService { return this.http.get(`${geturl}`, options); } - getAllMdOficialEvents(startdate:string, enddate:string): Observable{ + async getAllPrEvents(startdate:string, enddate:string){ + let prO = await this.getAllPrOficialEvents(startdate, enddate).toPromise(); + let prP = await this.getAllPrPessoalEvents(startdate, enddate).toPromise(); + const resFinal = prO.concat(prP); + console.log(resFinal); + return new Promise(resolve =>{ + return resolve(resFinal) + }) + } + + getAllMdOficialEvents(startdate:string, enddate:string): any{ const geturl = environment.apiURL + 'calendar/md'; let params = new HttpParams(); @@ -160,10 +170,10 @@ export class EventsService { headers: this.headersMdOficial, params: params }; - return this.http.get(`${geturl}`, options); + return this.http.get(`${geturl}`, options); } - getAllMdPessoalEvents(startdate:string, enddate:string): Observable{ + getAllMdPessoalEvents(startdate:string, enddate:string): any{ const geturl = environment.apiURL + 'calendar/md'; let params = new HttpParams(); @@ -174,7 +184,17 @@ export class EventsService { headers: this.headersMdPessoal, params: params }; - return this.http.get(`${geturl}`, options); + return this.http.get(`${geturl}`, options); + } + + async getAllMdEvents(startdate:string, enddate:string){ + let prO = await this.getAllMdOficialEvents(startdate, enddate).toPromise(); + let prP = await this.getAllMdPessoalEvents(startdate, enddate).toPromise(); + const resFinal = prO.concat(prP); + console.log(resFinal); + return new Promise(resolve =>{ + return resolve(resFinal) + }); } @@ -207,6 +227,17 @@ export class EventsService { return this.http.get(`${geturl}`, options); } + async getAllSharedEvents(startdate:string, enddate:string){ + let prO = await this.getAllSharedOficialEvents(startdate, enddate).toPromise(); + let prP = await this.getAllSharedPessoalEvents(startdate, enddate).toPromise(); + const resFinal = prO.concat(prP); + console.log(resFinal); + + return new Promise(resolve =>{ + return resolve(resFinal) + }); + } + diff --git a/src/app/shared/agenda/new-event/new-event.page.ts b/src/app/shared/agenda/new-event/new-event.page.ts index d9b795222..473bafd00 100644 --- a/src/app/shared/agenda/new-event/new-event.page.ts +++ b/src/app/shared/agenda/new-event/new-event.page.ts @@ -181,6 +181,8 @@ export class NewEventPage implements OnInit { } if(this.loggeduser.Profile == 'MDGPR') { + console.log('MD - Aqui'); + console.log(this.postEvent); this.eventService.postEventMd(this.postEvent, this.postEvent.CalendarName).subscribe( async (id) => { @@ -223,6 +225,8 @@ export class NewEventPage implements OnInit { }); } else if(this.loggeduser.Profile == 'PR') { + console.log('PR - Aqui'); + console.log(this.postEvent); this.eventService.postEventPr(this.postEvent, this.postEvent.CalendarName).subscribe( (id) => { console.log(id); From 184b457c1cebfd31ccd623551a01f2d4fe7801ff Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Wed, 16 Jun 2021 16:55:57 +0100 Subject: [PATCH 08/32] Fix --- src/global.scss | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/global.scss b/src/global.scss index 9462dfcea..9f32956fc 100644 --- a/src/global.scss +++ b/src/global.scss @@ -771,7 +771,6 @@ ion-icon{ } - ::-webkit-scrollbar { width: 7px; height: 7px; @@ -823,8 +822,6 @@ background: rgb(92, 92, 92); display: none !important; } - - .notification{ position: absolute; top: 23px; @@ -869,7 +866,6 @@ background: rgb(92, 92, 92); from {right: -100%;} to {right: 0px;} } - .calendar-component .monthview-container .swiper-slide-active table tbody { From 9689fad9589f6b1ef932db5a5082b239ff9e21bc Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Wed, 16 Jun 2021 21:44:11 +0100 Subject: [PATCH 09/32] save --- package-lock.json | 23 +++++++------- src/app/pages/agenda/agenda.page.ts | 47 +++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 10c5dc5d6..3ee0e6dba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4294,12 +4294,6 @@ "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", "dev": true }, - "async-limiter": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", - "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", - "dev": true - }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -19090,8 +19084,7 @@ }, "ssri": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", - "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", + "resolved": "", "dev": true, "requires": { "figgy-pudding": "^3.5.1" @@ -19470,12 +19463,20 @@ } }, "ws": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", - "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz", + "integrity": "sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==", "dev": true, "requires": { "async-limiter": "~1.0.0" + }, + "dependencies": { + "async-limiter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", + "dev": true + } } } } diff --git a/src/app/pages/agenda/agenda.page.ts b/src/app/pages/agenda/agenda.page.ts index 55251f3c6..fcd5db9c4 100644 --- a/src/app/pages/agenda/agenda.page.ts +++ b/src/app/pages/agenda/agenda.page.ts @@ -575,6 +575,53 @@ export class AgendaPage implements OnInit { this.centralizeTimeline(500); }); + } + else if(this.profile == "pr" && this.loggeduser.Profile == 'MDGPR'){ + console.log('HERE PR'); + this.eventService.getAllSharedEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).then( + (response:any) => { + + // calendar + this.eventSource=[]; + + this.eventsList = response; + + // calendar + this.eventsList.forEach((element, eventIndex) => { + this.eventSource.push({ + title: element.Subject, + startTime: new Date(element.StartDate), + endTime: new Date(element.EndDate), + allDay: false, + event: element, + calendarName: element.CalendarName, + profile: 'pr', + id: element.EventId, + }); + + }); + + const list = this.timelineFilter(this.timelineFilterState, this.eventsList, 'pr'); + + this.TimelineMDList = this.eventListBox(list) + + this.events = list; + + this.TimelinePR = list; + + this.myCal.update(); + this.myCal.loadEvents(); + + this.showLoader = false; + this.showTimeline = true; + + this.timelineBoxCorrectHeight(500); + this.centralizeTimeline(500); + + + }); + + } 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( From 34ad6e2ed0a6d6dbb15cac7c9840edc59768901d Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Wed, 16 Jun 2021 22:38:25 +0100 Subject: [PATCH 10/32] save --- src/app/app.module.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 07992d08b..25ff2e4e9 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -48,7 +48,9 @@ import { NgbModule } from '@ng-bootstrap/ng-bootstrap' IonicModule.forRoot(), IonicStorageModule.forRoot(), AppRoutingModule, - HttpClientModule, NgbModule, NoopAnimationsModule, + HttpClientModule, + NgbModule, + NoopAnimationsModule, ], providers: [ StatusBar, From 984212eb56f84e228967cd9a1095cdf31a21f54d Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Wed, 16 Jun 2021 22:38:37 +0100 Subject: [PATCH 11/32] save --- src/app/pages/agenda/new-event/new-event.module.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/pages/agenda/new-event/new-event.module.ts b/src/app/pages/agenda/new-event/new-event.module.ts index f5d90c691..ca58ef372 100644 --- a/src/app/pages/agenda/new-event/new-event.module.ts +++ b/src/app/pages/agenda/new-event/new-event.module.ts @@ -8,12 +8,15 @@ import { NewEventPageRoutingModule } from './new-event-routing.module'; import { NewEventPage } from './new-event.page'; +import { NgbDate, NgbModule } from '@ng-bootstrap/ng-bootstrap'; + @NgModule({ imports: [ CommonModule, FormsModule, IonicModule, - NewEventPageRoutingModule + NewEventPageRoutingModule, + NgbModule, ], declarations: [NewEventPage] }) From 816514dd96b1238a403a097f3fb87f820fdcd7db Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Thu, 17 Jun 2021 08:54:48 +0100 Subject: [PATCH 12/32] save --- src/app/models/event.model.ts | 2 +- .../gabinete-digital/edit-event-to-approve/edit-event.page.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/models/event.model.ts b/src/app/models/event.model.ts index 11927ec8a..37240f58f 100644 --- a/src/app/models/event.model.ts +++ b/src/app/models/event.model.ts @@ -32,7 +32,7 @@ export class EventToApproveEdit { "StartDate": "2021-05-12T10:30:00" "EndDate": "2021-05-12T11:30:00" "Private": false - "ReviewerComments": "" + "ReviewUserComments": "" "MDName": "Paulo Pinto" "MDEmail": "paulo.pinto@gabinetedigital.local" "Agenda": "Oficial" | "Pessoal" diff --git a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts index dd027d5b5..0ea46630d 100644 --- a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts +++ b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts @@ -69,7 +69,7 @@ export class EditEventToApproveComponent implements OnInit { // "EndDate":"2021-04-30T15:30:00", // "Participants":"gilson.manuel@gabinetedigital.local;tiago.kayaya@gabinetedigital.local;solange.vandunem@gabinetedigital.local", // "CC":"", - // "ReviewerComments":"teste", + // "ReviewUserComments":"teste", // "Role":0, // "MDName":"Paulo Pinto", // "MDEmail":"paulo.pinto@gabinetedigital.local", From 6297e8737b69c031c2a6adf87d32e9959eaab4e7 Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Thu, 17 Jun 2021 09:07:36 +0100 Subject: [PATCH 13/32] Restore background --- src/global.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/global.scss b/src/global.scss index 9f32956fc..4220f3260 100644 --- a/src/global.scss +++ b/src/global.scss @@ -704,7 +704,7 @@ app-header-no-search .ion-toolbar{ } -body, .blue-background{ background: #0782C9;} +body, .blue-background{ background: #0782C9 !important;} @media only screen and (min-width: 1365px) { From d18030dbc3a0f73e7c8a99ceb0466b01872b66bf Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Thu, 17 Jun 2021 09:13:48 +0100 Subject: [PATCH 14/32] Improve notification --- src/app/modals/add-note/add-note.page.ts | 67 -------------- .../modals/dar-parecer/dar-parecer.page.ts | 63 ------------- src/app/modals/delegar/delegar.page.ts | 67 -------------- .../agenda/edit-event/edit-event.page.ts | 68 -------------- .../event-actions-popover.page.ts | 69 -------------- .../despacho-pr/despacho-pr.page.ts | 65 ------------- .../despachos/despacho/despacho.page.ts | 66 -------------- .../diploma-assinar/diploma-assinar.page.ts | 46 ---------- .../diplomas/diploma/diploma.page.ts | 44 --------- .../approve-event-modal.page.ts | 46 ---------- .../approve-event/approve-event.page.ts | 46 ---------- .../expedient-task-modal.page.ts | 2 +- .../expediente-detail.page.ts | 47 ---------- .../approve-event/approve-event.page.ts | 46 ---------- .../shared/fingerprint/fingerprint.page.ts | 91 ------------------- .../deploma-options/deploma-options.page.ts | 65 ------------- .../despachos-options.page.ts | 25 +---- .../despachos-pr-options.page.ts | 24 ----- .../request-options/request-options.page.ts | 45 --------- 19 files changed, 2 insertions(+), 990 deletions(-) diff --git a/src/app/modals/add-note/add-note.page.ts b/src/app/modals/add-note/add-note.page.ts index 088d02219..2178ed4c0 100644 --- a/src/app/modals/add-note/add-note.page.ts +++ b/src/app/modals/add-note/add-note.page.ts @@ -61,72 +61,5 @@ export class AddNotePage implements OnInit { this.documents = this.documents.filter( (e, i) => index != i); } - async successMessage(message?: any, callback?) { - - let notification = document.createElement('div') - notification.id = 'notification' - notification.innerHTML = ` - -
-

- -

{{ message }}

-

- -
- ` - - document.body.append(notification) - notification.querySelector('.text').innerHTML = message || 'Processo efetuado' - setTimeout(()=>{ - notification.remove() - },7000) - - } - - async badRequest(message?: string, callback?) { - const enterAnimation = (baseEl: any) => { - const backdropAnimation = this.animationController.create() - .addElement(baseEl.querySelector('ion-backdrop')!) - .fromTo('opacity', '0.01', 'var(--backdrop-opacity)'); - - const wrapperAnimation = this.animationController.create() - .addElement(baseEl.querySelector('.modal-wrapper')!) - .keyframes([ - { offset: 0, opacity: '1', right: '-100%' }, - { offset: 1, opacity: '1', right: '0px' } - ]); - - return this.animationController.create() - .addElement(baseEl) - .easing('ease-out') - .duration(500) - .addAnimation([backdropAnimation, wrapperAnimation]); - } - - const leaveAnimation = (baseEl: any) => { - return enterAnimation(baseEl).direction('reverse'); - } - - - const modal = await this.modalController.create({ - enterAnimation, - leaveAnimation, - component: BadRequestPage, - componentProps: { - message: message || 'Processo efetuado' , - }, - cssClass: 'notification-modal' - }); - - modal.present() - - setTimeout(()=>{ - if (callback) { - callback() - } - modal.dismiss() - },7000) - } } \ No newline at end of file diff --git a/src/app/modals/dar-parecer/dar-parecer.page.ts b/src/app/modals/dar-parecer/dar-parecer.page.ts index 4fbdc6800..f30737ada 100644 --- a/src/app/modals/dar-parecer/dar-parecer.page.ts +++ b/src/app/modals/dar-parecer/dar-parecer.page.ts @@ -98,69 +98,6 @@ export class DarParecerPage implements OnInit { }); } - - async successMessage(message?: any, callback?) { - - var notification = document.createElement('div') - notification.id = 'notification' - notification.innerHTML = ` -
-

- -

{{ message }}

-

- -
- ` - - document.body.append(notification) - notification.querySelector('.text').innerHTML = message || 'Processo efetuado' - setTimeout(()=>{ - notification.remove() - },7000) - } - - async badRequest(message?: string, callback?) { - const enterAnimation = (baseEl: any) => { - const backdropAnimation = this.animationController.create() - .addElement(baseEl.querySelector('ion-backdrop')!) - .fromTo('opacity', '0.01', 'var(--backdrop-opacity)'); - - const wrapperAnimation = this.animationController.create() - .addElement(baseEl.querySelector('.modal-wrapper')!) - .keyframes([ - { offset: 0, opacity: '1', right: '-100%' }, - { offset: 1, opacity: '1', right: '0px' } - ]); - - return this.animationController.create() - .addElement(baseEl) - .easing('ease-out') - .duration(500) - .addAnimation([backdropAnimation, wrapperAnimation]); - } - - const leaveAnimation = (baseEl: any) => { - return enterAnimation(baseEl).direction('reverse'); - } - - - const modal = await this.modalController.create({ - enterAnimation, - leaveAnimation, - component: BadRequestPage, - componentProps: { - message: message || 'Processo efetuado' , - }, - cssClass: 'notification-modal' - }); - - modal.present() - - setTimeout(()=>{ - modal.dismiss() - },1000) - } } diff --git a/src/app/modals/delegar/delegar.page.ts b/src/app/modals/delegar/delegar.page.ts index 7e565b6f2..5b6a388d2 100644 --- a/src/app/modals/delegar/delegar.page.ts +++ b/src/app/modals/delegar/delegar.page.ts @@ -173,71 +173,4 @@ export class DelegarPage implements OnInit { this.taskParticipants = taskParticipants; } - async successMessage(message?: any, callback?) { - var notification = document.createElement('div') - notification.id = 'notification' - notification.innerHTML = ` - -
-

- -

{{ message }}

-

- -
- ` - - document.body.append(notification) - notification.querySelector('.text').innerHTML = message || 'Processo efetuado' - setTimeout(()=>{ - notification.remove() - },7000) - - } - - async badRequest(message?: string, callback?) { - const enterAnimation = (baseEl: any) => { - const backdropAnimation = this.animationController.create() - .addElement(baseEl.querySelector('ion-backdrop')!) - .fromTo('opacity', '0.01', 'var(--backdrop-opacity)'); - - const wrapperAnimation = this.animationController.create() - .addElement(baseEl.querySelector('.modal-wrapper')!) - .keyframes([ - { offset: 0, opacity: '1', right: '-100%' }, - { offset: 1, opacity: '1', right: '0px' } - ]); - - return this.animationController.create() - .addElement(baseEl) - .easing('ease-out') - .duration(500) - .addAnimation([backdropAnimation, wrapperAnimation]); - } - - const leaveAnimation = (baseEl: any) => { - return enterAnimation(baseEl).direction('reverse'); - } - - - const modal = await this.modalController.create({ - enterAnimation, - leaveAnimation, - component: BadRequestPage, - componentProps: { - message: message || 'Processo efetuado' , - }, - cssClass: 'notification-modal' - }); - - modal.present() - - setTimeout(()=>{ - if (callback) { - callback() - } - modal.dismiss() - },7000) - } - } \ No newline at end of file diff --git a/src/app/pages/agenda/edit-event/edit-event.page.ts b/src/app/pages/agenda/edit-event/edit-event.page.ts index 74bcbc503..66b4c70c9 100644 --- a/src/app/pages/agenda/edit-event/edit-event.page.ts +++ b/src/app/pages/agenda/edit-event/edit-event.page.ts @@ -241,72 +241,4 @@ export class EditEventPage implements OnInit { }); } - async successMessage(message?: any, callback?) { - - var notification = document.createElement('div') - notification.id = 'notification' - notification.innerHTML = ` - -
-

- -

{{ message }}

-

- -
- ` - - document.body.append(notification) - notification.querySelector('.text').innerHTML = message || 'Processo efetuado' - setTimeout(()=>{ - notification.remove() - },7000) - - } - - async badRequest(message?: string, callback?) { - const enterAnimation = (baseEl: any) => { - const backdropAnimation = this.animationController.create() - .addElement(baseEl.querySelector('ion-backdrop')!) - .fromTo('opacity', '0.01', 'var(--backdrop-opacity)'); - - const wrapperAnimation = this.animationController.create() - .addElement(baseEl.querySelector('.modal-wrapper')!) - .keyframes([ - { offset: 0, opacity: '1', right: '-100%' }, - { offset: 1, opacity: '1', right: '0px' } - ]); - - return this.animationController.create() - .addElement(baseEl) - .easing('ease-out') - .duration(500) - .addAnimation([backdropAnimation, wrapperAnimation]); - } - - const leaveAnimation = (baseEl: any) => { - return enterAnimation(baseEl).direction('reverse'); - } - - - const modal = await this.modalController.create({ - enterAnimation, - leaveAnimation, - component: BadRequestPage, - componentProps: { - message: message || 'Processo efetuado' , - }, - cssClass: 'notification-modal' - }); - - modal.present() - - setTimeout(()=>{ - if (callback) { - callback() - } - modal.dismiss() - },7000) - } - } \ No newline at end of file diff --git a/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.ts b/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.ts index d5e5a1d41..2f2ae7020 100644 --- a/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.ts +++ b/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.ts @@ -93,73 +93,4 @@ export class EventActionsPopoverPage implements OnInit { } - - async successMessage(message?: any, callback?) { - var notification = document.createElement('div') - notification.id = 'notification' - notification.innerHTML = ` - -
-

- -

{{ message }}

-

- -
- ` - - document.body.append(notification) - notification.querySelector('.text').innerHTML = message || 'Processo efetuado' - setTimeout(()=>{ - notification.remove() - },7000) - - } - - async badRequest(message?: string, callback?) { - const enterAnimation = (baseEl: any) => { - const backdropAnimation = this.animationController.create() - .addElement(baseEl.querySelector('ion-backdrop')!) - .fromTo('opacity', '0.01', 'var(--backdrop-opacity)'); - - const wrapperAnimation = this.animationController.create() - .addElement(baseEl.querySelector('.modal-wrapper')!) - .keyframes([ - { offset: 0, opacity: '1', right: '-100%' }, - { offset: 1, opacity: '1', right: '0px' } - ]); - - return this.animationController.create() - .addElement(baseEl) - .easing('ease-out') - .duration(500) - .addAnimation([backdropAnimation, wrapperAnimation]); - } - - const leaveAnimation = (baseEl: any) => { - return enterAnimation(baseEl).direction('reverse'); - } - - - const modal = await this.modalController.create({ - enterAnimation, - leaveAnimation, - component: BadRequestPage, - componentProps: { - message: message || 'Processo efetuado' , - }, - cssClass: 'notification-modal' - }); - - modal.present() - - setTimeout(()=>{ - if (callback) { - callback() - } - modal.dismiss() - },7000) - } - - } diff --git a/src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page.ts b/src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page.ts index 02662517c..6a687823c 100644 --- a/src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page.ts +++ b/src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page.ts @@ -466,70 +466,5 @@ export class DespachoPrPage implements OnInit { return await popover.present(); } - async successMessage(message?: any, callback?) { - var notification = document.createElement('div') - notification.id = 'notification' - notification.innerHTML = ` -
-

- -

{{ message }}

-

- -
- ` - - document.body.append(notification) - notification.querySelector('.text').innerHTML = message || 'Processo efetuado' - setTimeout(()=>{ - notification.remove() - },7000) - - } - - async badRequest(message?: string, callback?) { - const enterAnimation = (baseEl: any) => { - const backdropAnimation = this.animationController.create() - .addElement(baseEl.querySelector('ion-backdrop')!) - .fromTo('opacity', '0.01', 'var(--backdrop-opacity)'); - - const wrapperAnimation = this.animationController.create() - .addElement(baseEl.querySelector('.modal-wrapper')!) - .keyframes([ - { offset: 0, opacity: '1', right: '-100%' }, - { offset: 1, opacity: '1', right: '0px' } - ]); - - return this.animationController.create() - .addElement(baseEl) - .easing('ease-out') - .duration(500) - .addAnimation([backdropAnimation, wrapperAnimation]); - } - - const leaveAnimation = (baseEl: any) => { - return enterAnimation(baseEl).direction('reverse'); - } - - - const modal = await this.modalController.create({ - enterAnimation, - leaveAnimation, - component: BadRequestPage, - componentProps: { - message: message || 'Processo efetuado' , - }, - cssClass: 'notification-modal' - }); - - modal.present() - - setTimeout(()=>{ - if (callback) { - callback() - } - modal.dismiss() - },7000) - } } diff --git a/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.ts b/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.ts index eb5fee874..b2490b13d 100644 --- a/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.ts +++ b/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.ts @@ -446,70 +446,4 @@ export class DespachoPage implements OnInit { return await popover.present(); } - async successMessage(message?: any, callback?) { - var notification = document.createElement('div') - notification.id = 'notification' - notification.innerHTML = ` - -
-

- -

{{ message }}

-

- -
- ` - - document.body.append(notification) - notification.querySelector('.text').innerHTML = message || 'Processo efetuado' - setTimeout(()=>{ - notification.remove() - },7000) - - } - - async badRequest(message?: string, callback?) { - const enterAnimation = (baseEl: any) => { - const backdropAnimation = this.animationController.create() - .addElement(baseEl.querySelector('ion-backdrop')!) - .fromTo('opacity', '0.01', 'var(--backdrop-opacity)'); - - const wrapperAnimation = this.animationController.create() - .addElement(baseEl.querySelector('.modal-wrapper')!) - .keyframes([ - { offset: 0, opacity: '1', right: '-100%' }, - { offset: 1, opacity: '1', right: '0px' } - ]); - - return this.animationController.create() - .addElement(baseEl) - .easing('ease-out') - .duration(7000) - .addAnimation([backdropAnimation, wrapperAnimation]); - } - - const leaveAnimation = (baseEl: any) => { - return enterAnimation(baseEl).direction('reverse'); - } - - - const modal = await this.modalController.create({ - enterAnimation, - leaveAnimation, - component: BadRequestPage, - componentProps: { - message: message || 'Processo efetuado' , - }, - cssClass: 'notification-modal' - }); - - modal.present() - - setTimeout(()=>{ - if (callback) { - callback() - } - modal.dismiss() - },7000) - } } diff --git a/src/app/pages/gabinete-digital/diplomas-assinar/diploma-assinar/diploma-assinar.page.ts b/src/app/pages/gabinete-digital/diplomas-assinar/diploma-assinar/diploma-assinar.page.ts index 5a790858f..df663c0fa 100644 --- a/src/app/pages/gabinete-digital/diplomas-assinar/diploma-assinar/diploma-assinar.page.ts +++ b/src/app/pages/gabinete-digital/diplomas-assinar/diploma-assinar/diploma-assinar.page.ts @@ -166,50 +166,4 @@ export class DiplomaAssinarPage implements OnInit { } - - async badRequest(message?: string, callback?) { - const enterAnimation = (baseEl: any) => { - const backdropAnimation = this.animationController.create() - .addElement(baseEl.querySelector('ion-backdrop')!) - .fromTo('opacity', '0.01', 'var(--backdrop-opacity)'); - - const wrapperAnimation = this.animationController.create() - .addElement(baseEl.querySelector('.modal-wrapper')!) - .keyframes([ - { offset: 0, opacity: '1', right: '-100%' }, - { offset: 1, opacity: '1', right: '0px' } - ]); - - return this.animationController.create() - .addElement(baseEl) - .easing('ease-out') - .duration(500) - .addAnimation([backdropAnimation, wrapperAnimation]); - } - - const leaveAnimation = (baseEl: any) => { - return enterAnimation(baseEl).direction('reverse'); - } - - - const modal = await this.modalController.create({ - enterAnimation, - leaveAnimation, - component: BadRequestPage, - componentProps: { - message: message || 'Processo efetuado' , - }, - cssClass: 'notification-modal' - }); - - modal.present() - - setTimeout(()=>{ - if (callback) { - callback() - } - modal.dismiss() - },7000) - } - } diff --git a/src/app/pages/gabinete-digital/diplomas/diploma/diploma.page.ts b/src/app/pages/gabinete-digital/diplomas/diploma/diploma.page.ts index cf9ec1936..8e76d7eee 100644 --- a/src/app/pages/gabinete-digital/diplomas/diploma/diploma.page.ts +++ b/src/app/pages/gabinete-digital/diplomas/diploma/diploma.page.ts @@ -279,49 +279,5 @@ export class DiplomaPage implements OnInit { - async badRequest(message?: string, callback?) { - const enterAnimation = (baseEl: any) => { - const backdropAnimation = this.animationController.create() - .addElement(baseEl.querySelector('ion-backdrop')!) - .fromTo('opacity', '0.01', 'var(--backdrop-opacity)'); - - const wrapperAnimation = this.animationController.create() - .addElement(baseEl.querySelector('.modal-wrapper')!) - .keyframes([ - { offset: 0, opacity: '1', right: '-100%' }, - { offset: 1, opacity: '1', right: '0px' } - ]); - - return this.animationController.create() - .addElement(baseEl) - .easing('ease-out') - .duration(500) - .addAnimation([backdropAnimation, wrapperAnimation]); - } - - const leaveAnimation = (baseEl: any) => { - return enterAnimation(baseEl).direction('reverse'); - } - - - const modal = await this.modalController.create({ - enterAnimation, - leaveAnimation, - component: BadRequestPage, - componentProps: { - message: message || 'Processo efetuado' , - }, - cssClass: 'notification-modal' - }); - - modal.present() - - setTimeout(()=>{ - if (callback) { - callback() - } - modal.dismiss() - },7000) - } } diff --git a/src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.ts b/src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.ts index 9b4fe24c5..6f68af7f9 100644 --- a/src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.ts +++ b/src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.ts @@ -221,50 +221,4 @@ export class ApproveEventModalPage implements OnInit { } - - async badRequest(message?: string, callback?) { - const enterAnimation = (baseEl: any) => { - const backdropAnimation = this.animationController.create() - .addElement(baseEl.querySelector('ion-backdrop')!) - .fromTo('opacity', '0.01', 'var(--backdrop-opacity)'); - - const wrapperAnimation = this.animationController.create() - .addElement(baseEl.querySelector('.modal-wrapper')!) - .keyframes([ - { offset: 0, opacity: '1', right: '-100%' }, - { offset: 1, opacity: '1', right: '0px' } - ]); - - return this.animationController.create() - .addElement(baseEl) - .easing('ease-out') - .duration(500) - .addAnimation([backdropAnimation, wrapperAnimation]); - } - - const leaveAnimation = (baseEl: any) => { - return enterAnimation(baseEl).direction('reverse'); - } - - - const modal = await this.modalController.create({ - enterAnimation, - leaveAnimation, - component: BadRequestPage, - componentProps: { - message: message || 'Processo efetuado' , - }, - cssClass: 'notification-modal' - }); - - modal.present() - - setTimeout(()=>{ - if (callback) { - callback() - } - modal.dismiss() - },7000) - } - } diff --git a/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts b/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts index 266a168ac..31c8ede5d 100644 --- a/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts +++ b/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts @@ -242,50 +242,4 @@ export class ApproveEventPage implements OnInit { - - async badRequest(message?: string, callback?) { - const enterAnimation = (baseEl: any) => { - const backdropAnimation = this.animationController.create() - .addElement(baseEl.querySelector('ion-backdrop')!) - .fromTo('opacity', '0.01', 'var(--backdrop-opacity)'); - - const wrapperAnimation = this.animationController.create() - .addElement(baseEl.querySelector('.modal-wrapper')!) - .keyframes([ - { offset: 0, opacity: '1', right: '-100%' }, - { offset: 1, opacity: '1', right: '0px' } - ]); - - return this.animationController.create() - .addElement(baseEl) - .easing('ease-out') - .duration(500) - .addAnimation([backdropAnimation, wrapperAnimation]); - } - - const leaveAnimation = (baseEl: any) => { - return enterAnimation(baseEl).direction('reverse'); - } - - - const modal = await this.modalController.create({ - enterAnimation, - leaveAnimation, - component: BadRequestPage, - componentProps: { - message: message || 'Processo efetuado' , - }, - cssClass: 'notification-modal' - }); - - modal.present() - - setTimeout(()=>{ - if (callback) { - callback() - } - modal.dismiss() - },7000) - } - } diff --git a/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts b/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts index f40d72574..741838569 100644 --- a/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts +++ b/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts @@ -344,7 +344,7 @@ export class ExpedientTaskModalPage implements OnInit { } this.taskResult = await this.processes.postParecerPr(this.postData).toPromise(); - await this.toastService.badRequest('Processo efetuado'); + await this.toastService.badRequest('Processo não efetuado'); this.modalController.dismiss(action_parecer_pr); } catch (error) { diff --git a/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts b/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts index dac1f2c21..d8a004d70 100644 --- a/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts +++ b/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts @@ -361,51 +361,4 @@ export class ExpedienteDetailPage implements OnInit { - - - async badRequest(message?: string, callback?) { - const enterAnimation = (baseEl: any) => { - const backdropAnimation = this.animationController.create() - .addElement(baseEl.querySelector('ion-backdrop')!) - .fromTo('opacity', '0.01', 'var(--backdrop-opacity)'); - - const wrapperAnimation = this.animationController.create() - .addElement(baseEl.querySelector('.modal-wrapper')!) - .keyframes([ - { offset: 0, opacity: '1', right: '-100%' }, - { offset: 1, opacity: '1', right: '0px' } - ]); - - return this.animationController.create() - .addElement(baseEl) - .easing('ease-out') - .duration(500) - .addAnimation([backdropAnimation, wrapperAnimation]); - } - - const leaveAnimation = (baseEl: any) => { - return enterAnimation(baseEl).direction('reverse'); - } - - - const modal = await this.modalController.create({ - enterAnimation, - leaveAnimation, - component: BadRequestPage, - componentProps: { - message: message || 'Processo efetuado' , - }, - cssClass: 'notification-modal' - }); - - modal.present() - - setTimeout(()=>{ - if (callback) { - callback() - } - modal.dismiss() - },7000) - } - } diff --git a/src/app/shared/agenda/approve-event/approve-event.page.ts b/src/app/shared/agenda/approve-event/approve-event.page.ts index 20a45e21a..5d9909a2d 100644 --- a/src/app/shared/agenda/approve-event/approve-event.page.ts +++ b/src/app/shared/agenda/approve-event/approve-event.page.ts @@ -239,50 +239,4 @@ export class ApproveEventPage implements OnInit { - - async badRequest(message?: string, callback?) { - const enterAnimation = (baseEl: any) => { - const backdropAnimation = this.animationController.create() - .addElement(baseEl.querySelector('ion-backdrop')!) - .fromTo('opacity', '0.01', 'var(--backdrop-opacity)'); - - const wrapperAnimation = this.animationController.create() - .addElement(baseEl.querySelector('.modal-wrapper')!) - .keyframes([ - { offset: 0, opacity: '1', right: '-100%' }, - { offset: 1, opacity: '1', right: '0px' } - ]); - - return this.animationController.create() - .addElement(baseEl) - .easing('ease-out') - .duration(500) - .addAnimation([backdropAnimation, wrapperAnimation]); - } - - const leaveAnimation = (baseEl: any) => { - return enterAnimation(baseEl).direction('reverse'); - } - - - const modal = await this.modalController.create({ - enterAnimation, - leaveAnimation, - component: BadRequestPage, - componentProps: { - message: message || 'Processo efetuado' , - }, - cssClass: 'notification-modal' - }); - - modal.present() - - setTimeout(()=>{ - if (callback) { - callback() - } - modal.dismiss() - },7000) - } - } diff --git a/src/app/shared/fingerprint/fingerprint.page.ts b/src/app/shared/fingerprint/fingerprint.page.ts index 356cf0a65..16e798444 100644 --- a/src/app/shared/fingerprint/fingerprint.page.ts +++ b/src/app/shared/fingerprint/fingerprint.page.ts @@ -69,95 +69,4 @@ export class FingerprintPage implements OnInit { } - async successMessage(message?: any, callback?) { - - const enterAnimation = (baseEl: any) => { - const backdropAnimation = this.animationController.create() - .addElement(baseEl.querySelector('ion-backdrop')!) - .fromTo('opacity', '0.01', 'var(--backdrop-opacity)'); - - const wrapperAnimation = this.animationController.create() - .addElement(baseEl.querySelector('.modal-wrapper')!) - .keyframes([ - { offset: 0, opacity: '1', right: '-100%' }, - { offset: 1, opacity: '1', right: '0px' } - ]); - - return this.animationController.create() - .addElement(baseEl) - .easing('ease-out') - .duration(500) - .addAnimation([backdropAnimation, wrapperAnimation]); - } - - const leaveAnimation = (baseEl: any) => { - return enterAnimation(baseEl).direction('reverse'); - } - - - const modal = await this.modalController.create({ - enterAnimation, - leaveAnimation, - component: SuccessMessagePage, - componentProps: { - message: message || 'Processo efetuado' , - }, - cssClass: 'notification-modal' - }); - - modal.present() - - setTimeout(()=>{ - - this.close() - modal.dismiss() - },3000) - - } - - async badRequest(message?: string, callback?) { - const enterAnimation = (baseEl: any) => { - const backdropAnimation = this.animationController.create() - .addElement(baseEl.querySelector('ion-backdrop')!) - .fromTo('opacity', '0.01', 'var(--backdrop-opacity)'); - - const wrapperAnimation = this.animationController.create() - .addElement(baseEl.querySelector('.modal-wrapper')!) - .keyframes([ - { offset: 0, opacity: '1', right: '-100%' }, - { offset: 1, opacity: '1', right: '0px' } - ]); - - return this.animationController.create() - .addElement(baseEl) - .easing('ease-out') - .duration(500) - .addAnimation([backdropAnimation, wrapperAnimation]); - } - - const leaveAnimation = (baseEl: any) => { - return enterAnimation(baseEl).direction('reverse'); - } - - - const modal = await this.modalController.create({ - enterAnimation, - leaveAnimation, - component: BadRequestPage, - componentProps: { - message: message || 'Processo efetuado' , - }, - cssClass: 'notification-modal' - }); - - modal.present() - - setTimeout(()=>{ - if (callback) { - callback() - } - modal.dismiss() - },7000) - } - } \ No newline at end of file diff --git a/src/app/shared/popover/deploma-options/deploma-options.page.ts b/src/app/shared/popover/deploma-options/deploma-options.page.ts index 5dd759f56..4102f6242 100644 --- a/src/app/shared/popover/deploma-options/deploma-options.page.ts +++ b/src/app/shared/popover/deploma-options/deploma-options.page.ts @@ -147,71 +147,6 @@ export class DeplomaOptionsPage implements OnInit { } - async successMessage(message?: any, callback?) { - - const enterAnimation = (baseEl: any) => { - const backdropAnimation = this.animationController.create() - .addElement(baseEl.querySelector('ion-backdrop')!) - .fromTo('opacity', '0.01', 'var(--backdrop-opacity)'); - - const wrapperAnimation = this.animationController.create() - .addElement(baseEl.querySelector('.modal-wrapper')!) - .keyframes([ - { offset: 0, opacity: '1', right: '-100%' }, - { offset: 1, opacity: '1', right: '0px' } - ]); - - return this.animationController.create() - .addElement(baseEl) - .easing('ease-out') - .duration(500) - .addAnimation([backdropAnimation, wrapperAnimation]); - } - - const leaveAnimation = (baseEl: any) => { - return enterAnimation(baseEl).direction('reverse'); - } - - const modal = await this.modalController.create({ - enterAnimation, - leaveAnimation, - component: SuccessMessagePage, - componentProps: { - message: message || 'Processo efetuado' , - }, - cssClass: 'notification-modal' - }); - - modal.present() - - setTimeout(()=>{ - if (callback) { - callback() - } - modal.dismiss() - },7000) - - } - - async badRequest(message?: string, callback?) { - const modal = await this.modalController.create({ - component: BadRequestPage, - componentProps: { - message: message || 'Processo efetuado' , - }, - cssClass: 'notification-modal' - }); - - modal.present() - - setTimeout(()=>{ - if (callback) { - callback() - } - modal.dismiss() - },7000) - } - goBack() { this.close() } diff --git a/src/app/shared/popover/despachos-options/despachos-options.page.ts b/src/app/shared/popover/despachos-options/despachos-options.page.ts index 8d0d743e0..6e0a995d6 100644 --- a/src/app/shared/popover/despachos-options/despachos-options.page.ts +++ b/src/app/shared/popover/despachos-options/despachos-options.page.ts @@ -286,30 +286,7 @@ export class DespachosOptionsPage implements OnInit { } - - - - async badRequest(message?: string, callback?) { - const modal = await this.modalController.create({ - component: BadRequestPage, - componentProps: { - message: message || 'Processo efetuado' , - }, - cssClass: 'notification-modal' - }); - - modal.present() - - setTimeout(()=>{ - if (callback) { - callback() - } - modal.dismiss() - },7000) - } - - - + async reexecutar(note:string, documents:any){ let body = { "serialNumber": this.serialnumber, diff --git a/src/app/shared/popover/despachos-pr-options/despachos-pr-options.page.ts b/src/app/shared/popover/despachos-pr-options/despachos-pr-options.page.ts index 3d6cc62e0..2b80d3d58 100644 --- a/src/app/shared/popover/despachos-pr-options/despachos-pr-options.page.ts +++ b/src/app/shared/popover/despachos-pr-options/despachos-pr-options.page.ts @@ -282,30 +282,6 @@ export class DespachosPrOptionsPage implements OnInit { } } - - - - - async badRequest(message?: string, callback?) { - const modal = await this.modalController.create({ - component: BadRequestPage, - componentProps: { - message: message || 'Processo efetuado' , - }, - cssClass: 'notification-modal' - }); - - modal.present() - - setTimeout(()=>{ - if (callback) { - callback() - } - modal.dismiss() - },7000) - } - - async reexecutar(note:string, documents:any){ let body = { diff --git a/src/app/shared/popover/request-options/request-options.page.ts b/src/app/shared/popover/request-options/request-options.page.ts index b838e0723..f071413ce 100644 --- a/src/app/shared/popover/request-options/request-options.page.ts +++ b/src/app/shared/popover/request-options/request-options.page.ts @@ -286,49 +286,4 @@ export class RequestOptionsPage implements OnInit { } - - - - async badRequest(message?: string, callback?) { - const enterAnimation = (baseEl: any) => { - const backdropAnimation = this.animationController.create() - .addElement(baseEl.querySelector('ion-backdrop')!) - .fromTo('opacity', '0.01', 'var(--backdrop-opacity)'); - - const wrapperAnimation = this.animationController.create() - .addElement(baseEl.querySelector('.modal-wrapper')!) - .keyframes([ - { offset: 0, opacity: '1', right: '-100%' }, - { offset: 1, opacity: '1', right: '0px' } - ]); - - return this.animationController.create() - .addElement(baseEl) - .easing('ease-out') - .duration(500) - .addAnimation([backdropAnimation, wrapperAnimation]); - } - - const leaveAnimation = (baseEl: any) => { - return enterAnimation(baseEl).direction('reverse'); - } - - - const modal = await this.modalController.create({ - enterAnimation, - leaveAnimation, - component: BadRequestPage, - componentProps: { - message: message || 'Processo efetuado' , - }, - cssClass: 'notification-modal' - }); - - modal.present() - - setTimeout(()=>{ - modal.dismiss() - },1000) - } - } From 1aa03370367b99f6b1ac8d9b316ee2599d903e27 Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Thu, 17 Jun 2021 09:55:19 +0100 Subject: [PATCH 15/32] save --- .../pedidos/pedido/pedido.page.html | 1 + .../pedidos/pedido/pedido.page.ts | 22 ++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.html b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.html index 4802585c9..46b799352 100644 --- a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.html +++ b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.html @@ -107,6 +107,7 @@
+
diff --git a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts index e947f2181..49c44697b 100644 --- a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts +++ b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts @@ -228,9 +228,26 @@ export class PedidoPage implements OnInit { } catch (error) { this.toastService.badRequest() } + } + async assignar(note:string, documents:any) { + let body = { + "serialNumber": this.serialnumber, + "action": "Reencaminhar", + "ActionTypeId": 98, + "dataFields": { + "ReviewUserComment": note, + }, + "AttachmentList" :documents, + } - + try { + await this.processes.CompleteTask(body).toPromise() + this.toastService.successMessage('Processo arquivado') + this.close(); + } catch (error) { + this.toastService.badRequest() + } } sendExpedienteToPending(){ @@ -404,6 +421,9 @@ export class PedidoPage implements OnInit { else if(actionName == 'Arquivar'){ this.arquivar(res.data.note, docs); } + else if(actionName == 'Assignar'){ + this.assignar(res.data.note, docs); + } } }); } From ba8abd077ef9541223e8fd29ff2db87d2c0502d9 Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Thu, 17 Jun 2021 10:09:30 +0100 Subject: [PATCH 16/32] save --- src/global.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/global.scss b/src/global.scss index 4220f3260..13b007773 100644 --- a/src/global.scss +++ b/src/global.scss @@ -872,4 +872,8 @@ background: rgb(92, 92, 92); tr:nth-child(n+6) { display: none; } +} + +.modal { + display: flex !important; } \ No newline at end of file From e0e6c35678cba0abc097b20831f02959de338f04 Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Thu, 17 Jun 2021 12:24:31 +0100 Subject: [PATCH 17/32] save --- src/app/app-routing.module.ts | 293 +++++++++--------- src/app/modals/delegar/delegar.page.ts | 4 +- .../modals/forward/forward-routing.module.ts | 17 + src/app/modals/forward/forward.module.ts | 22 ++ src/app/modals/forward/forward.page.html | 91 ++++++ src/app/modals/forward/forward.page.scss | 150 +++++++++ src/app/modals/forward/forward.page.spec.ts | 24 ++ src/app/modals/forward/forward.page.ts | 204 ++++++++++++ .../agenda/new-event/new-event.page.html | 2 +- .../pedidos/pedido/pedido.page.html | 2 +- .../pedidos/pedido/pedido.page.ts | 28 +- .../pages/publications/publications.page.scss | 8 +- .../agenda/new-event/new-event.page.html | 6 +- .../attendee-modal/attendee-modal.page.html | 1 - .../edit-event-to-approve/edit-event.page.ts | 2 +- 15 files changed, 693 insertions(+), 161 deletions(-) create mode 100644 src/app/modals/forward/forward-routing.module.ts create mode 100644 src/app/modals/forward/forward.module.ts create mode 100644 src/app/modals/forward/forward.page.html create mode 100644 src/app/modals/forward/forward.page.scss create mode 100644 src/app/modals/forward/forward.page.spec.ts create mode 100644 src/app/modals/forward/forward.page.ts diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 4ba03b687..bf502bfda 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,133 +1,134 @@ -import { NgModule } from '@angular/core'; -import { PreloadAllModules, RouterModule, Routes } from '@angular/router'; -import { ChatPage } from './pages/chat/chat.page'; -import { MessagesPage } from './pages/chat/messages/messages.page'; - -const routes: Routes = [ - { - path: '', - loadChildren: () => import('./index/index.module').then(m => m.IndexPageModule) - }, - { - path: '', - loadChildren: () => import('./home/home.module').then( m => m.HomePageModule) - }, - { - path: 'empty-chat', - loadChildren: () => import('./shared/chat/empty-chat/empty-chat.module').then( m => m.EmptyChatPageModule) - }, - { - path: 'empty-container', - loadChildren: () => import('./shared/empty-container/empty-container.module').then( m => m.EmptyContainerPageModule) - }, - { - path: 'events-to-approve', - loadChildren: () => import('./shared/gabinete-digital/events-to-approve/events-to-approve.module').then( m => m.EventsToApprovePageModule) - }, - { - path: 'expedients', - loadChildren: () => import('./shared/gabinete-digital/expedients/expedients.module').then( m => m.ExpedientsPageModule) - }, - { - path: 'document-detail', - loadChildren: () => import('./modals/document-detail/document-detail.module').then( m => m.DocumentDetailPageModule) - }, - { - path: 'edit-group', - loadChildren: () => import('./shared/chat/edit-group/edit-group.module').then( m => m.EditGroupPageModule) - }, - { - path: 'pedidos', - loadChildren: () => import('./shared/gabinete-digital/pedidos/pedidos.module').then( m => m.PedidosPageModule) - }, - { - path: 'event-list', - loadChildren: () => import('./pages/gabinete-digital/event-list/event-list.module').then(m =>m.EventListPageModule) - }, - { - path: 'despachos', - loadChildren: () => import('./shared/gabinete-digital/despachos/despachos.module').then( m => m.DespachosPageModule) - }, - { - path: 'create-process', - loadChildren: () => import('./modals/create-process/create-process.module').then( m => m.CreateProcessPageModule) - }, - { - path: 'pendentes', - loadChildren: () => import('./shared/gabinete-digital/pendentes/pendentes.module').then( m => m.PendentesPageModule) - }, - { - path: 'delegar', - loadChildren: () => import('./modals/delegar/delegar.module').then( m => m.DelegarPageModule) - }, - { - path: 'add-note', - loadChildren: () => import('./modals/add-note/add-note.module').then( m => m.AddNotePageModule) - }, - { - path: 'dar-parecer', - loadChildren: () => import('./modals/dar-parecer/dar-parecer.module').then( m => m.DarParecerPageModule) - }, - { - path: 'opts-expediente', - loadChildren: () => import('./shared/popover/opts-expediente/opts-expediente.module').then( m => m.OptsExpedientePageModule) - }, - { - path: 'despachos-pr', - loadChildren: () => import('./shared/gabinete-digital/despachos-pr/despachos-pr.module').then( m => m.DespachosPrPageModule) - }, - { - path: 'diplomas', - loadChildren: () => import('./shared/gabinete-digital/diplomas/diplomas.module').then( m => m.DiplomasPageModule) - }, - { - path: 'expedientes-pr', - loadChildren: () => import('./shared/gabinete-digital/expedientes-pr/expedientes-pr.module').then( m => m.ExpedientesPrPageModule) - }, - { - path: 'diplomas-assinar', - loadChildren: () => import('./shared/gabinete-digital/diplomas-assinar/diplomas-assinar.module').then( m => m.DiplomasAssinarPageModule) - }, - { - path: 'opts-expediente-pr', - loadChildren: () => import('./shared/popover/opts-expediente-pr/opts-expediente-pr.module').then( m => m.OptsExpedientePrPageModule) - }, - { - path: 'despachos-options', - loadChildren: () => import('./shared/popover/despachos-options/despachos-options.module').then( m => m.DespachosOptionsPageModule) - }, - { - path: 'despachos-pr-options', - loadChildren: () => import('./shared/popover/despachos-pr-options/despachos-pr-options.module').then( m => m.DespachosPrOptionsPageModule) - }, - { - path: 'deploma-options', - loadChildren: () => import('./shared/popover/deploma-options/deploma-options.module').then( m => m.DeplomaOptionsPageModule) - }, - { - path: 'pin', - loadChildren: () => import('./shared/pin/pin.module').then( m => m.PinPageModule) - }, - { - path: 'fingerprint', - loadChildren: () => import('./shared/fingerprint/fingerprint.module').then( m => m.FingerprintPageModule) - }, - { - path: 'new-event', - loadChildren: () => import('./shared/agenda/new-event/new-event.module').then( m => m.NewEventPageModule) - }, - { - path: 'edit-event', - loadChildren: () => import('./shared/agenda/edit-event/edit-event.module').then( m => m.EditEventPageModule) - }, - { - path: 'event-list', - loadChildren: () => import('./shared/agenda/event-list/event-list.module').then( m => m.EventListPageModule) - }, - { - path: 'approve-event', - loadChildren: () => import('./shared/agenda/approve-event/approve-event.module').then( m => m.ApproveEventPageModule) - }, { +import { NgModule } from '@angular/core'; +import { PreloadAllModules, RouterModule, Routes } from '@angular/router'; +import { ChatPage } from './pages/chat/chat.page'; +import { MessagesPage } from './pages/chat/messages/messages.page'; + +const routes: Routes = [ + { + path: '', + loadChildren: () => import('./index/index.module').then(m => m.IndexPageModule) + }, + { + path: '', + loadChildren: () => import('./home/home.module').then( m => m.HomePageModule) + }, + { + path: 'empty-chat', + loadChildren: () => import('./shared/chat/empty-chat/empty-chat.module').then( m => m.EmptyChatPageModule) + }, + { + path: 'empty-container', + loadChildren: () => import('./shared/empty-container/empty-container.module').then( m => m.EmptyContainerPageModule) + }, + { + path: 'events-to-approve', + loadChildren: () => import('./shared/gabinete-digital/events-to-approve/events-to-approve.module').then( m => m.EventsToApprovePageModule) + }, + { + path: 'expedients', + loadChildren: () => import('./shared/gabinete-digital/expedients/expedients.module').then( m => m.ExpedientsPageModule) + }, + { + path: 'document-detail', + loadChildren: () => import('./modals/document-detail/document-detail.module').then( m => m.DocumentDetailPageModule) + }, + { + path: 'edit-group', + loadChildren: () => import('./shared/chat/edit-group/edit-group.module').then( m => m.EditGroupPageModule) + }, + { + path: 'pedidos', + loadChildren: () => import('./shared/gabinete-digital/pedidos/pedidos.module').then( m => m.PedidosPageModule) + }, + { + path: 'event-list', + loadChildren: () => import('./pages/gabinete-digital/event-list/event-list.module').then(m =>m.EventListPageModule) + }, + { + path: 'despachos', + loadChildren: () => import('./shared/gabinete-digital/despachos/despachos.module').then( m => m.DespachosPageModule) + }, + { + path: 'create-process', + loadChildren: () => import('./modals/create-process/create-process.module').then( m => m.CreateProcessPageModule) + }, + { + path: 'pendentes', + loadChildren: () => import('./shared/gabinete-digital/pendentes/pendentes.module').then( m => m.PendentesPageModule) + }, + { + path: 'delegar', + loadChildren: () => import('./modals/delegar/delegar.module').then( m => m.DelegarPageModule) + }, + { + path: 'add-note', + loadChildren: () => import('./modals/add-note/add-note.module').then( m => m.AddNotePageModule) + }, + { + path: 'dar-parecer', + loadChildren: () => import('./modals/dar-parecer/dar-parecer.module').then( m => m.DarParecerPageModule) + }, + { + path: 'opts-expediente', + loadChildren: () => import('./shared/popover/opts-expediente/opts-expediente.module').then( m => m.OptsExpedientePageModule) + }, + { + path: 'despachos-pr', + loadChildren: () => import('./shared/gabinete-digital/despachos-pr/despachos-pr.module').then( m => m.DespachosPrPageModule) + }, + { + path: 'diplomas', + loadChildren: () => import('./shared/gabinete-digital/diplomas/diplomas.module').then( m => m.DiplomasPageModule) + }, + { + path: 'expedientes-pr', + loadChildren: () => import('./shared/gabinete-digital/expedientes-pr/expedientes-pr.module').then( m => m.ExpedientesPrPageModule) + }, + { + path: 'diplomas-assinar', + loadChildren: () => import('./shared/gabinete-digital/diplomas-assinar/diplomas-assinar.module').then( m => m.DiplomasAssinarPageModule) + }, + { + path: 'opts-expediente-pr', + loadChildren: () => import('./shared/popover/opts-expediente-pr/opts-expediente-pr.module').then( m => m.OptsExpedientePrPageModule) + }, + { + path: 'despachos-options', + loadChildren: () => import('./shared/popover/despachos-options/despachos-options.module').then( m => m.DespachosOptionsPageModule) + }, + { + path: 'despachos-pr-options', + loadChildren: () => import('./shared/popover/despachos-pr-options/despachos-pr-options.module').then( m => m.DespachosPrOptionsPageModule) + }, + { + path: 'deploma-options', + loadChildren: () => import('./shared/popover/deploma-options/deploma-options.module').then( m => m.DeplomaOptionsPageModule) + }, + { + path: 'pin', + loadChildren: () => import('./shared/pin/pin.module').then( m => m.PinPageModule) + }, + { + path: 'fingerprint', + loadChildren: () => import('./shared/fingerprint/fingerprint.module').then( m => m.FingerprintPageModule) + }, + { + path: 'new-event', + loadChildren: () => import('./shared/agenda/new-event/new-event.module').then( m => m.NewEventPageModule) + }, + { + path: 'edit-event', + loadChildren: () => import('./shared/agenda/edit-event/edit-event.module').then( m => m.EditEventPageModule) + }, + { + path: 'event-list', + loadChildren: () => import('./shared/agenda/event-list/event-list.module').then( m => m.EventListPageModule) + }, + { + path: 'approve-event', + loadChildren: () => import('./shared/agenda/approve-event/approve-event.module').then( m => m.ApproveEventPageModule) + }, + { path: 'bad-request', loadChildren: () => import('./shared/popover/bad-request/bad-request.module').then( m => m.BadRequestPageModule) }, @@ -135,18 +136,22 @@ const routes: Routes = [ path: 'success-message', loadChildren: () => import('./shared/popover/success-message/success-message.module').then( m => m.SuccessMessagePageModule) }, + { + path: 'forward', + loadChildren: () => import('./modals/forward/forward.module').then( m => m.ForwardPageModule) + }, - - /* { - path: 'chat', - component: ChatPage - } */ - -]; -@NgModule({ - imports: [ - RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules }) - ], - exports: [RouterModule] -}) -export class AppRoutingModule {} + + /* { + path: 'chat', + component: ChatPage + } */ + +]; +@NgModule({ + imports: [ + RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules }) + ], + exports: [RouterModule] +}) +export class AppRoutingModule {} diff --git a/src/app/modals/delegar/delegar.page.ts b/src/app/modals/delegar/delegar.page.ts index 5b6a388d2..e18ed8185 100644 --- a/src/app/modals/delegar/delegar.page.ts +++ b/src/app/modals/delegar/delegar.page.ts @@ -63,8 +63,6 @@ export class DelegarPage implements OnInit { /* Set + 30minutes to seleted datetime */ let selectedEndDate = new Date(); /* this.postData.EndDate = new Date(selectedEndDate.setMinutes(new Date().getMinutes() + 30)); */ - - } @@ -85,7 +83,7 @@ export class DelegarPage implements OnInit { async saveTask() { if(this.taskParticipants.length > 1){ - this.alertService.presentErrorMessage("Selecione apenas um destinatário"); + this.toastService.badRequest("Selecione apenas um destinatário"); } else { let body = { diff --git a/src/app/modals/forward/forward-routing.module.ts b/src/app/modals/forward/forward-routing.module.ts new file mode 100644 index 000000000..9f5d429bb --- /dev/null +++ b/src/app/modals/forward/forward-routing.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { ForwardPage } from './forward.page'; + +const routes: Routes = [ + { + path: '', + component: ForwardPage + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class ForwardPageRoutingModule {} diff --git a/src/app/modals/forward/forward.module.ts b/src/app/modals/forward/forward.module.ts new file mode 100644 index 000000000..086c344f3 --- /dev/null +++ b/src/app/modals/forward/forward.module.ts @@ -0,0 +1,22 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; + +import { IonicModule } from '@ionic/angular'; + +import { ForwardPageRoutingModule } from './forward-routing.module'; + +import { ForwardPage } from './forward.page'; +import { AttendeeModalPageModule } from 'src/app/shared/event/attendee-modal/attendee-modal.module'; + +@NgModule({ + imports: [ + CommonModule, + FormsModule, + IonicModule, + ForwardPageRoutingModule, + AttendeeModalPageModule + ], + declarations: [ForwardPage] +}) +export class ForwardPageModule {} diff --git a/src/app/modals/forward/forward.page.html b/src/app/modals/forward/forward.page.html new file mode 100644 index 000000000..cbc8b67c3 --- /dev/null +++ b/src/app/modals/forward/forward.page.html @@ -0,0 +1,91 @@ + +
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ + + Adicionar intervenientes + {{participant.Name}} + + +
+
+ +
+
+
+
+ +
+
+
+ +
+
+ +
+
+
+ + + +
+ + Documentos Anexados + + + + +

{{attachment.Description}}

+

{{attachment.Stakeholders}} {{ attachment.CreateDate | date: 'dd/MM/yyyy' }}

+
+
+
+
+
+ +
+ +
+ + +
+
+
+ +
+ + +
+
+ diff --git a/src/app/modals/forward/forward.page.scss b/src/app/modals/forward/forward.page.scss new file mode 100644 index 000000000..c6fc0f6da --- /dev/null +++ b/src/app/modals/forward/forward.page.scss @@ -0,0 +1,150 @@ +.content{ + padding: 30px 20px 0 20px !important; + margin: 0; + float: left; + + .header-content{ + margin-bottom: 20px !important; + } + + .header-title{ + font-family: Roboto; + font-size: 25px; + padding: 0; + color:#000; + float: left; + } + + .ion-item-container{ + margin: 15px auto; + border: 1px solid #ebebeb; + border-radius: 5px; + padding-left: 10px; + + } + .ion-item-container-no-border{ + margin: 0px auto; + padding: 0 !important; + overflow: auto; + } + .container-div{ + margin-bottom: 15px; + overflow: hidden; + } + .ion-item-class-2{ + margin: 0px auto; + } + .ion-icon-class{ + width: 45px; + height: 45px; + float: left; + padding: 10px; + font-size: 25px; + } + ion-select{ + padding-left: 5px; + margin-left: 0; + } + .ion-input-class{ + width: calc(100% - 45px); + height: 45px; + border: 1px solid #ebebeb; + border-radius: 5px; + padding-left: 5px; + padding-right: 10px; + float: left; + } + .ion-input-class-no-height{ + border: 1px solid #ebebeb; + border-radius: 5px; + overflow: auto; + } + .list-people{ + width: 256px; + float: left; + + } + .add-people{ + width: 45px; + float: right; + overflow: auto; + font-size: 25px; + padding: 10px; + } + .list-people-title{ + /* font-size: 13px; */ + color: #797979; + } + .attach-document{ + font-size: 15px; + color: #0d89d1; + margin: 5px 5px 5px 10px; + padding: 5px; + float: left; + } + .attach-icon{ + width: 37px; + font-size: 35px; + float: left; + } + .attach-title-item{ + width: 100%; + font-size: 15px; + color:#0d89d1; + } + /* SPAN */ + .span-left{ + float: left; + font-size: 15x; + } + .span-right{ + text-align: right; + float: right; + font-size: 13px; + } + } + .container-footer{ + margin:0 auto; + overflow: auto; + } + .button-cancel { + width: 170px; + height: 44px; + border-radius: 22.5px; + --background: #e0e9ee; + --color: #061b52; + margin:10px; + } + .button-save { + width: 170px; + height: 44px; + border-radius: 22.5px; + --background: #42b9fe; + --color:#ffffff; + margin:10px; + } + + .text-input{ + width: 100%; + border: 1px solid #ebebeb; + margin: 0px 15px 15px 0px; + padding: 0 !important; + border-radius: 5px; + } + + /* Error Messages */ + .error{ + color:red; + font-size: 12px; + font-weight: bold; + padding-bottom: 20px; + } + .span-color{ + color:red; + } + .buttons{ + display: flex; + justify-content: space-between; + padding: 20px; + overflow: auto; + } \ No newline at end of file diff --git a/src/app/modals/forward/forward.page.spec.ts b/src/app/modals/forward/forward.page.spec.ts new file mode 100644 index 000000000..3992e03cb --- /dev/null +++ b/src/app/modals/forward/forward.page.spec.ts @@ -0,0 +1,24 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { IonicModule } from '@ionic/angular'; + +import { ForwardPage } from './forward.page'; + +describe('ForwardPage', () => { + let component: ForwardPage; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ ForwardPage ], + imports: [IonicModule.forRoot()] + }).compileComponents(); + + fixture = TestBed.createComponent(ForwardPage); + component = fixture.componentInstance; + fixture.detectChanges(); + })); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/modals/forward/forward.page.ts b/src/app/modals/forward/forward.page.ts new file mode 100644 index 000000000..e2f5f482f --- /dev/null +++ b/src/app/modals/forward/forward.page.ts @@ -0,0 +1,204 @@ +import { Component, OnInit } from '@angular/core'; +import { Router } from '@angular/router'; +import { AlertController, AnimationController, ModalController, NavParams } from '@ionic/angular'; +import { Event } from 'src/app/models/event.model' +import { EventBody } from 'src/app/models/eventbody.model'; +import { ProcessesService } from 'src/app/services/processes.service'; +import { EventPerson } from 'src/app/models/eventperson.model'; +import { EventsService } from 'src/app/services/events.service'; +import { AttachmentsService } from 'src/app/services/attachments.service'; +import { AddParticipantsModalPage } from 'src/app/pages/gabinete-digital/expediente/add-participants-modal/add-participants-modal.page'; +import { AddParticipantsCcModalPage } from 'src/app/pages/gabinete-digital/expediente/add-participants-cc-modal/add-participants-cc-modal.page'; +import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page'; +import { AlertService } from 'src/app/services/alert.service'; +import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page'; +import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page'; +import { ToastService } from 'src/app/services/toast.service'; +import { SearchDocument } from 'src/app/models/search-document'; +import { SearchPage } from 'src/app/pages/search/search.page'; + +@Component({ + selector: 'app-forward', + templateUrl: './forward.page.html', + styleUrls: ['./forward.page.scss'], +}) +export class ForwardPage implements OnInit { + task: any; + note:string; + + taskParticipants: EventPerson[] = []; + taskParticipantsCc: EventPerson[] = []; + + taskDocId:string; + loadedAttachments:any; + + adding: "intervenient" | "CC" = "intervenient"; + + postData: Event; + eventBody: EventBody; + eventAttendees: EventPerson; + + formLocationSatus: boolean = false; + showAttendees= false; + + documents:SearchDocument[] = []; + + constructor( + private modalController: ModalController, + private router:Router, + private navParams: NavParams, + private processes:ProcessesService, + private attachmentsService: AttachmentsService, + private calendarService: EventsService, + public alertController: AlertController, + private alertService: AlertService, + private animationController: AnimationController, + private toastService: ToastService, + ) { + this.task = this.navParams.get('task'); + this.postData = new Event(); + this.eventBody = { BodyType : "1", Text : ""}; + this.postData.Body = this.eventBody; + this.postData.Subject = this.task.Folio; + this.postData.CalendarName = "Oficial"; + let selectedEndDate = new Date(); + } + + ngOnInit() { + this.adding = "intervenient"; + console.log(this.task); + + } + + close() { + this.router.navigate(['/home/gabinete-digital/expediente']); + this.modalController.dismiss(null); + } + + cancelTask() { + this.modalController.dismiss(null); + } + + async assignar(note:string, documents:any) { + let body = { + "serialNumber": this.task.SerialNumber, + "action": "Reencaminhar", + "ActionTypeId": 98, + "dataFields": { + "ReviewUserComment": note, + }, + "AttachmentList" :documents, + } + } + + notImplemented(){ + this.alertService.presentAlert('Funcionalidade em desenvolvimento'); + } + + async saveTask() { + + const DocumentToSave = this.documents.map((e) => { + return { + ApplicationId: e.ApplicationType, + SourceId: e.Id, + } + }); + let docs = { + ProcessInstanceID: "", + Attachments: DocumentToSave, + } + + if(this.taskParticipants.length > 1){ + this.toastService.badRequest("Selecione apenas um destinatário"); + } + else { + let body = { + "usersSelected": this.taskParticipants, + "distributionType": "paralelo", + "priority": 0, + "countryCode": "string", + "serialNumber": this.task.SerialNumber, + "action": "Reencaminhar", + "actionTypeId": 98, + "dataFields": { + "ReviewUserComment": this.note, + }, + "FolderId": this.task.FolderId, + "AttachmentList" :docs, + } + console.log(body); + this.processes.DelegateTask(body).subscribe(res=>{ + console.log(res); + this.toastService.successMessage('Processo delegado') + }, + (error)=>{ + this.toastService.badRequest("Processo não delegado") + }); + } + } + + async addParticipants(){ + console.log('HERE'); + + this.adding = "intervenient"; + if(window.innerWidth <= 800){ + const modal = await this.modalController.create({ + component: AddParticipantsModalPage, + componentProps: { + eventPersons: this.eventAttendees + }, + cssClass: 'book-meeting-modal', + backdropDismiss: false + }); + + await modal.present(); + + modal.onDidDismiss().then((res) => { + }); + } else { + this.showAttendees = true; + } + } + + validateFormInputs(){ + let formLocation = this.postData.Location.trim(); + if(!this.postData.Location && formLocation.length <= 0){ + this.formLocationSatus=true; + } + } + + dynamicSetIntervenient({taskParticipants}){ + this.taskParticipants = taskParticipants; + } + + + async getDoc() { + + const modal = await this.modalController.create({ + component: SearchPage, + cssClass: 'modal-width-100-width-background modal', + componentProps: { + type: 'AccoesPresidenciais & ArquivoDespachoElect', + showSearchInput: true, + select: true + } + }); + await modal.present(); + modal.onDidDismiss().then((res)=>{ + if(res){ + const data = res.data; + this.documents.push(data.selected); + } + }); + + } + + removeAttachment(index: number){ + + this.documents = this.documents.filter( (e, i) => index != i); + } + + + + +} \ No newline at end of file diff --git a/src/app/pages/agenda/new-event/new-event.page.html b/src/app/pages/agenda/new-event/new-event.page.html index e50e3e8b3..6de527c28 100644 --- a/src/app/pages/agenda/new-event/new-event.page.html +++ b/src/app/pages/agenda/new-event/new-event.page.html @@ -12,7 +12,7 @@
- +
diff --git a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.html b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.html index 46b799352..1874b81ce 100644 --- a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.html +++ b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.html @@ -107,7 +107,7 @@
- +
diff --git a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts index 49c44697b..9ec4fe614 100644 --- a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts +++ b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts @@ -3,7 +3,6 @@ import { ProcessesService } from 'src/app/services/processes.service'; import { AttachmentsService } from 'src/app/services/attachments.service'; import { EventsService } from 'src/app/services/events.service'; import { InAppBrowser } from '@ionic-native/in-app-browser/ngx'; -import { DailyWorkTask } from '../../../../models/dailyworktask.model'; import { ActivatedRoute, NavigationExtras, Router } from '@angular/router'; import { formatDate } from '@angular/common'; import { Event } from '../../../../models/event.model'; @@ -12,19 +11,17 @@ import { AlertService } from 'src/app/services/alert.service'; import { ViewEventPage } from 'src/app/pages/agenda/view-event/view-event.page'; import { momentG } from 'src/plugin/momentG' import { DiscartExpedientModalPage } from '../../discart-expedient-modal/discart-expedient-modal.page'; -import { ExpedientTaskModalPage } from '../../expediente/expedient-task-modal/expedient-task-modal.page'; import { BookMeetingModalPage } from '../../expediente/book-meeting-modal/book-meeting-modal.page'; import { CreateProcessPage } from 'src/app/modals/create-process/create-process.page'; import { DelegarPage } from 'src/app/modals/delegar/delegar.page'; import { DarParecerPage } from 'src/app/modals/dar-parecer/dar-parecer.page'; import { AddNotePage } from 'src/app/modals/add-note/add-note.page'; -import { OptsExpedientePage } from 'src/app/shared/popover/opts-expediente/opts-expediente.page'; import { RequestOptionsPage } from 'src/app/shared/popover/request-options/request-options.page'; import { AuthService } from 'src/app/services/auth.service'; import { User } from 'src/app/models/user.model'; import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page'; -import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page'; import { ToastService } from 'src/app/services/toast.service'; +import { ForwardPage } from 'src/app/modals/forward/forward.page'; @Component({ selector: 'app-pedido', @@ -206,8 +203,6 @@ export class PedidoPage implements OnInit { } catch (error) { this.toastService.badRequest() } - - } async arquivar(note:string, documents:any) { @@ -361,6 +356,27 @@ export class PedidoPage implements OnInit { modal.onDidDismiss(); } + async openForwardModal(task: any) { + console.log(task); + + let classs; + if( window.innerWidth <= 800){ + classs = 'book-meeting-modal modal modal-desktop' + } else { + classs = 'modal modal-desktop showAsideOptions' + } + const modal = await this.modalController.create({ + component: ForwardPage, + componentProps: { + task: this.task, + }, + cssClass: classs, + backdropDismiss: false + }); + await modal.present(); + modal.onDidDismiss(); + } + async openDarParecer(task: any) { console.log(task); diff --git a/src/app/pages/publications/publications.page.scss b/src/app/pages/publications/publications.page.scss index 288b9aaaf..a446b55cb 100644 --- a/src/app/pages/publications/publications.page.scss +++ b/src/app/pages/publications/publications.page.scss @@ -90,7 +90,7 @@ ion-toolbar{ } } .item{ - padding: 0 0px 0 0px; + padding: 0 0px 0 0px !important; margin: 0px auto; border-bottom: 1px solid #ebebeb; } @@ -116,14 +116,20 @@ ion-toolbar{ .item-content-date{ color: #797979; font-size: 13px; + margin: 0 !important; + padding: 0 !important; } .item-content-title{ color: #0d89d1; font-size: 15px; + margin: 0 !important; + padding: 0 !important; } .item-content-detail{ color: #000000; font-size: 13px; + margin: 0 !important; + padding: 0 !important; } diff --git a/src/app/shared/agenda/new-event/new-event.page.html b/src/app/shared/agenda/new-event/new-event.page.html index 0bfdb186d..0ea38e87f 100644 --- a/src/app/shared/agenda/new-event/new-event.page.html +++ b/src/app/shared/agenda/new-event/new-event.page.html @@ -13,7 +13,7 @@
-
+ - +
diff --git a/src/app/shared/event/attendee-modal/attendee-modal.page.html b/src/app/shared/event/attendee-modal/attendee-modal.page.html index 97b1d4b7b..d0f026983 100644 --- a/src/app/shared/event/attendee-modal/attendee-modal.page.html +++ b/src/app/shared/event/attendee-modal/attendee-modal.page.html @@ -1,7 +1,6 @@ Adicionar intervenientes - Agenda Desktop diff --git a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts index 0ea46630d..c2f99bdbf 100644 --- a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts +++ b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts @@ -251,7 +251,7 @@ export class EditEventToApproveComponent implements OnInit { Message: this.eventProcess.workflowInstanceDataFields.Message, ParticipantsList: this.eventProcess.workflowInstanceDataFields.ParticipantsList, Private: false, - ReviewerComments: '' + ReviewUserComments: '' } this.eventsService.postEventToApproveEdit(event).subscribe(()=>{ From 4b067e25175bcada0c783729ce61b08b8cdc1fa1 Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Thu, 17 Jun 2021 12:29:37 +0100 Subject: [PATCH 18/32] save --- src/app/home/home.page.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/home/home.page.html b/src/app/home/home.page.html index cbba18d51..fdffad8de 100644 --- a/src/app/home/home.page.html +++ b/src/app/home/home.page.html @@ -22,10 +22,10 @@ Ações - + \ No newline at end of file From 7c7a6f84833f2cd0c1854b13ec386d66ad939e9a Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Thu, 17 Jun 2021 13:58:56 +0100 Subject: [PATCH 19/32] timeline --- angular.json | 3 +- package-lock.json | 11 +++- package.json | 1 + src/app/app.module.ts | 6 +-- src/app/pages/agenda/agenda.page.ts | 2 +- .../agenda/new-event/new-event.module.ts | 2 +- .../expediente-pr/expediente-pr.page.ts | 47 ----------------- .../pedidos/pedido/pedido.page.ts | 50 ------------------- .../agenda/new-event/new-event.module.ts | 15 +++++- .../agenda/new-event/new-event.page.html | 41 ++++++++++----- .../shared/agenda/new-event/new-event.page.ts | 38 ++++++++++++++ .../request-options/request-options.page.ts | 8 +-- src/global.scss | 2 +- src/theme/variables.scss | 35 +++++++++++++ 14 files changed, 135 insertions(+), 126 deletions(-) diff --git a/angular.json b/angular.json index dd47c6e5c..b74013d06 100644 --- a/angular.json +++ b/angular.json @@ -32,6 +32,7 @@ } ], "styles": [ + "./node_modules/@angular/material/prebuilt-themes/pink-bluegrey.css", { "input": "src/theme/variables.scss", "inject": true @@ -99,7 +100,7 @@ "polyfills": "src/polyfills.ts", "tsConfig": "tsconfig.spec.json", "karmaConfig": "karma.conf.js", - "styles": [], + "styles": [ "./node_modules/@angular/material/prebuilt-themes/pink-bluegrey.css"], "scripts": [], "assets": [ { diff --git a/package-lock.json b/package-lock.json index 3ee0e6dba..47db26207 100644 --- a/package-lock.json +++ b/package-lock.json @@ -773,6 +773,14 @@ "tslib": "^2.0.0" } }, + "@angular/material-moment-adapter": { + "version": "12.0.5", + "resolved": "https://registry.npmjs.org/@angular/material-moment-adapter/-/material-moment-adapter-12.0.5.tgz", + "integrity": "sha512-m09k/hCwyZxUEyg3NwSHbe0JNekSPjW86o9C6nRQkYqeAq/AUVy266U8CY3vyM8LDNsc16lsYsueLdZ421Th9A==", + "requires": { + "tslib": "^2.1.0" + } + }, "@angular/platform-browser": { "version": "11.2.2", "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-11.2.2.tgz", @@ -19084,7 +19092,8 @@ }, "ssri": { "version": "6.0.1", - "resolved": "", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", + "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", "dev": true, "requires": { "figgy-pudding": "^3.5.1" diff --git a/package.json b/package.json index 8df7c75a6..f9e985206 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "@angular/forms": "~11.2.2", "@angular/localize": "^11.2.2", "@angular/material": "^11.2.13", + "@angular/material-moment-adapter": "^12.0.5", "@angular/platform-browser": "~11.2.2", "@angular/platform-browser-dynamic": "~11.2.2", "@angular/router": "~11.2.2", diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 25ff2e4e9..448d710e0 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -30,8 +30,7 @@ import { BrowserAnimationsModule, NoopAnimationsModule } from '@angular/platform import { MessagesPage } from './pages/chat/messages/messages.page'; import { WebsocketService } from './services/websocket.service' import { ChatService } from './services/chat.service'; -import { NgbModule } from '@ng-bootstrap/ng-bootstrap' - +import {MatDatepickerModule} from '@angular/material/datepicker'; // import { FCM } from 'cordova-plugin-fcm-with-dependecy-updated/ionic/ngx'; @@ -49,8 +48,9 @@ import { NgbModule } from '@ng-bootstrap/ng-bootstrap' IonicStorageModule.forRoot(), AppRoutingModule, HttpClientModule, - NgbModule, + // NgbModule, NoopAnimationsModule, + MatDatepickerModule ], providers: [ StatusBar, diff --git a/src/app/pages/agenda/agenda.page.ts b/src/app/pages/agenda/agenda.page.ts index fcd5db9c4..73529fa67 100644 --- a/src/app/pages/agenda/agenda.page.ts +++ b/src/app/pages/agenda/agenda.page.ts @@ -283,7 +283,7 @@ export class AgendaPage implements OnInit { this.rangeStartDate = ev.startTime; this.rangeEndDate = ev.endTime; - //this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate); + this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate); } // for calendar diff --git a/src/app/pages/agenda/new-event/new-event.module.ts b/src/app/pages/agenda/new-event/new-event.module.ts index ca58ef372..f83298b68 100644 --- a/src/app/pages/agenda/new-event/new-event.module.ts +++ b/src/app/pages/agenda/new-event/new-event.module.ts @@ -16,7 +16,7 @@ import { NgbDate, NgbModule } from '@ng-bootstrap/ng-bootstrap'; FormsModule, IonicModule, NewEventPageRoutingModule, - NgbModule, + // NgbModule, ], declarations: [NewEventPage] }) diff --git a/src/app/pages/gabinete-digital/expedientes-pr/expediente-pr/expediente-pr.page.ts b/src/app/pages/gabinete-digital/expedientes-pr/expediente-pr/expediente-pr.page.ts index f3bef7308..a7aec3fe0 100644 --- a/src/app/pages/gabinete-digital/expedientes-pr/expediente-pr/expediente-pr.page.ts +++ b/src/app/pages/gabinete-digital/expedientes-pr/expediente-pr/expediente-pr.page.ts @@ -442,51 +442,4 @@ export class ExpedientePrPage implements OnInit { return await popover.present(); } - - - async badRequest(message?: string, callback?) { - const enterAnimation = (baseEl: any) => { - const backdropAnimation = this.animationController.create() - .addElement(baseEl.querySelector('ion-backdrop')!) - .fromTo('opacity', '0.01', 'var(--backdrop-opacity)'); - - const wrapperAnimation = this.animationController.create() - .addElement(baseEl.querySelector('.modal-wrapper')!) - .keyframes([ - { offset: 0, opacity: '1', right: '-100%' }, - { offset: 1, opacity: '1', right: '0px' } - ]); - - return this.animationController.create() - .addElement(baseEl) - .easing('ease-out') - .duration(500) - .addAnimation([backdropAnimation, wrapperAnimation]); - } - - const leaveAnimation = (baseEl: any) => { - return enterAnimation(baseEl).direction('reverse'); - } - - - const modal = await this.modalController.create({ - enterAnimation, - leaveAnimation, - component: BadRequestPage, - componentProps: { - message: message || 'Processo efetuado' , - }, - cssClass: 'notification-modal' - }); - - modal.present() - - setTimeout(()=>{ - modal.dismiss() - },1000) - } - - - - } diff --git a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts index e947f2181..89c5a6bd2 100644 --- a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts +++ b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts @@ -171,7 +171,6 @@ export class PedidoPage implements OnInit { this.modalController.dismiss(); } - async openOptions(taskAction?: any) { const popover = await this.popoverController.create({ component: RequestOptionsPage, @@ -187,7 +186,6 @@ export class PedidoPage implements OnInit { return await popover.present(); } - async repreciar(note:string, documents:any) { let body = { "serialNumber": this.serialnumber, @@ -207,7 +205,6 @@ export class PedidoPage implements OnInit { this.toastService.badRequest() } - } async arquivar(note:string, documents:any) { @@ -229,8 +226,6 @@ export class PedidoPage implements OnInit { this.toastService.badRequest() } - - } sendExpedienteToPending(){ @@ -420,49 +415,4 @@ export class PedidoPage implements OnInit { } - - - async badRequest(message?: string, callback?) { - const enterAnimation = (baseEl: any) => { - const backdropAnimation = this.animationController.create() - .addElement(baseEl.querySelector('ion-backdrop')!) - .fromTo('opacity', '0.01', 'var(--backdrop-opacity)'); - - const wrapperAnimation = this.animationController.create() - .addElement(baseEl.querySelector('.modal-wrapper')!) - .keyframes([ - { offset: 0, opacity: '1', right: '-100%' }, - { offset: 1, opacity: '1', right: '0px' } - ]); - - return this.animationController.create() - .addElement(baseEl) - .easing('ease-out') - .duration(500) - .addAnimation([backdropAnimation, wrapperAnimation]); - } - - const leaveAnimation = (baseEl: any) => { - return enterAnimation(baseEl).direction('reverse'); - } - - - const modal = await this.modalController.create({ - enterAnimation, - leaveAnimation, - component: BadRequestPage, - componentProps: { - message: message || 'Processo efetuado' , - }, - cssClass: 'notification-modal' - }); - - modal.present() - - setTimeout(()=>{ - modal.dismiss() - },1000) - } - - } diff --git a/src/app/shared/agenda/new-event/new-event.module.ts b/src/app/shared/agenda/new-event/new-event.module.ts index ba28aebfa..1593adaa3 100644 --- a/src/app/shared/agenda/new-event/new-event.module.ts +++ b/src/app/shared/agenda/new-event/new-event.module.ts @@ -1,6 +1,6 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; +import { FormsModule, NgControl } from '@angular/forms'; import { IonicModule } from '@ionic/angular'; @@ -8,13 +8,24 @@ import { NewEventPageRoutingModule } from './new-event-routing.module'; import { NewEventPage } from './new-event.page'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; +import {MatDatepickerModule} from '@angular/material/datepicker'; +import {MatInputModule} from '@angular/material/input'; + +import { MatNativeDateModule } from '@angular/material/core'; +import { MatMomentDateModule, MomentDateAdapter } from "@angular/material-moment-adapter"; + + @NgModule({ imports: [ CommonModule, FormsModule, IonicModule, NewEventPageRoutingModule, - NgbModule, // + NgbModule, + MatDatepickerModule, + MatInputModule, + MatNativeDateModule, + ], declarations: [NewEventPage], exports: [NewEventPage] diff --git a/src/app/shared/agenda/new-event/new-event.page.html b/src/app/shared/agenda/new-event/new-event.page.html index 0bfdb186d..68a15843a 100644 --- a/src/app/shared/agenda/new-event/new-event.page.html +++ b/src/app/shared/agenda/new-event/new-event.page.html @@ -13,20 +13,22 @@
- -
-
- -
- -
-
-
- - - + + + + +
@@ -91,6 +93,7 @@
+ + + + +
diff --git a/src/app/shared/agenda/new-event/new-event.page.ts b/src/app/shared/agenda/new-event/new-event.page.ts index b92bbb3f5..b1c89ccf9 100644 --- a/src/app/shared/agenda/new-event/new-event.page.ts +++ b/src/app/shared/agenda/new-event/new-event.page.ts @@ -16,11 +16,46 @@ import { User } from 'src/app/models/user.model'; import { AuthService } from 'src/app/services/auth.service'; +import {MomentDateAdapter, MAT_MOMENT_DATE_ADAPTER_OPTIONS} from '@angular/material-moment-adapter'; +import {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE} from '@angular/material/core'; +import * as _moment from 'moment'; +import * as _rollupMoment from 'moment'; +import {FormControl} from '@angular/forms'; + + +const moment = _rollupMoment || _moment; + +export const MY_FORMATS = { + parse: { + dateInput: 'LL', + }, + display: { + dateInput: 'LL', + monthYearLabel: 'MMM YYYY', + dateA11yLabel: 'LL', + monthYearA11yLabel: 'MMMM YYYY', + }, +}; + @Component({ selector: 'app-new-event', templateUrl: './new-event.page.html', styleUrls: ['./new-event.page.scss'], + providers: [ + // `MomentDateAdapter` can be automatically provided by importing `MomentDateModule` in your + // application's root module. We provide it at the component level here, due to limitations of + // our example generation script. + { + provide: DateAdapter, + useClass: MomentDateAdapter, + deps: [MAT_DATE_LOCALE, MAT_MOMENT_DATE_ADAPTER_OPTIONS] + }, + + {provide: MAT_DATE_FORMATS, useValue: MY_FORMATS}, + ] }) + + export class NewEventPage implements OnInit { @@ -49,6 +84,9 @@ export class NewEventPage implements OnInit { loggeduser: User; + date = new FormControl(moment()); + // serializedDate = new FormControl((new Date()).toISOString()); + constructor( private modalController: ModalController, private eventService: EventsService, diff --git a/src/app/shared/popover/request-options/request-options.page.ts b/src/app/shared/popover/request-options/request-options.page.ts index f071413ce..22fa70a3e 100644 --- a/src/app/shared/popover/request-options/request-options.page.ts +++ b/src/app/shared/popover/request-options/request-options.page.ts @@ -9,9 +9,6 @@ import { BookMeetingModalPage } from 'src/app/pages/gabinete-digital/expediente/ import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page'; import { ProcessesService } from 'src/app/services/processes.service'; import { ToastService } from 'src/app/services/toast.service'; -import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page'; -import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page'; - @Component({ selector: 'app-request-options', @@ -45,7 +42,6 @@ export class RequestOptionsPage implements OnInit { } }); - this.showEnviarPendentes = this.navParams.get('showEnviarPendentes'); @@ -243,7 +239,7 @@ export class RequestOptionsPage implements OnInit { } async openDarParecer(task: any) { - console.log(task); + // console.log(task); let classs; if( window.innerWidth <= 800){ @@ -265,7 +261,7 @@ export class RequestOptionsPage implements OnInit { } async openDelegarModal(task: any) { - console.log(task); + // console.log(task); let classs; if( window.innerWidth <= 800){ diff --git a/src/global.scss b/src/global.scss index 4220f3260..759ad62ff 100644 --- a/src/global.scss +++ b/src/global.scss @@ -579,7 +579,7 @@ td.monthview-secondary-with-event, td.monthview-secondary-with-event[_ngcontent- .calendar-component { td { - padding: 8px !important; + padding: 7px !important; div { padding-left: 0px; } diff --git a/src/theme/variables.scss b/src/theme/variables.scss index 06085d0ce..a9d800520 100644 --- a/src/theme/variables.scss +++ b/src/theme/variables.scss @@ -1,3 +1,38 @@ + +// Custom Theming for Angular Material +// For more information: https://material.angular.io/guide/theming +@import '~@angular/material/theming'; +// Plus imports for other components in your app. + +// Include the common styles for Angular Material. We include this here so that you only +// have to load a single css file for Angular Material in your app. +// Be sure that you only ever include this mixin once! +@include mat-core(); + +// Define the palettes for your theme using the Material Design palettes available in palette.scss +// (imported above). For each palette, you can optionally specify a default, lighter, and darker +// hue. Available color palettes: https://material.io/design/color/ +$app-primary: mat-palette($mat-indigo); +$app-accent: mat-palette($mat-pink, A200, A100, A400); + +// The warn palette is optional (defaults to red). +$app-warn: mat-palette($mat-red); + +// Create the theme object. A theme consists of configurations for individual +// theming systems such as "color" or "typography". +$app-theme: mat-light-theme(( + color: ( + primary: $app-primary, + accent: $app-accent, + warn: $app-warn, + ) +)); + +// Include theme styles for core and each component used in your app. +// Alternatively, you can import and @include the theme mixins for each component +// that you are using. +@include angular-material-theme($app-theme); + // Ionic Variables and Theming. For more info, please see: // http://ionicframework.com/docs/theming/ From 0c3259289420ed8d1c730df098f6fe97065fa9d3 Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Thu, 17 Jun 2021 16:12:56 +0100 Subject: [PATCH 20/32] save --- src/app/home/home.page.html | 4 +- src/app/modals/forward/forward.page.html | 2 +- src/app/modals/forward/forward.page.ts | 34 +++++++++++---- .../event-actions-popover.page.html | 2 +- .../event-actions-popover.page.ts | 41 +++++++++++-------- .../approve-event/approve-event.page.ts | 14 ++----- .../event-list/event-list.page.ts | 2 +- .../expediente-detail.page.html | 4 +- .../expediente/expediente.page.ts | 14 +------ .../gabinete-digital.page.html | 5 ++- .../gabinete-digital/gabinete-digital.page.ts | 5 +-- .../pedidos/pedido/pedido.page.ts | 14 ++++--- .../pages/publications/publications.page.html | 4 +- .../pages/publications/publications.page.ts | 11 +++-- src/app/services/processes.service.ts | 10 +++++ .../approve-event/approve-event.page.ts | 3 +- 16 files changed, 94 insertions(+), 75 deletions(-) diff --git a/src/app/home/home.page.html b/src/app/home/home.page.html index fdffad8de..cbba18d51 100644 --- a/src/app/home/home.page.html +++ b/src/app/home/home.page.html @@ -22,10 +22,10 @@ Ações
- + \ No newline at end of file diff --git a/src/app/modals/forward/forward.page.html b/src/app/modals/forward/forward.page.html index cbc8b67c3..00f97ee0b 100644 --- a/src/app/modals/forward/forward.page.html +++ b/src/app/modals/forward/forward.page.html @@ -85,7 +85,7 @@
- +
diff --git a/src/app/modals/forward/forward.page.ts b/src/app/modals/forward/forward.page.ts index e2f5f482f..06f9eac42 100644 --- a/src/app/modals/forward/forward.page.ts +++ b/src/app/modals/forward/forward.page.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import { Router } from '@angular/router'; +import { NavigationExtras, Router } from '@angular/router'; import { AlertController, AnimationController, ModalController, NavParams } from '@ionic/angular'; import { Event } from 'src/app/models/event.model' import { EventBody } from 'src/app/models/eventbody.model'; @@ -78,6 +78,19 @@ export class ForwardPage implements OnInit { cancelTask() { this.modalController.dismiss(null); } + goBack() { + this.modalController.dismiss(null); + if (window.innerWidth <= 800) { + this.router.navigate(['/home/gabinete-digital/pedidos']); + } else { + let navigationExtras: NavigationExtras = { + queryParams: { + "pedidos": true, + } + } + this.router.navigate(['/home/gabinete-digital'], navigationExtras); + } + } async assignar(note:string, documents:any) { let body = { @@ -112,11 +125,17 @@ export class ForwardPage implements OnInit { this.toastService.badRequest("Selecione apenas um destinatário"); } else { + + let attendees: any = this.taskParticipants.concat(this.taskParticipantsCc); + attendees = attendees.map(function(val) { + return { + UserEmail: val.EmailAddress, + UserType: val.IsRequired?"I": "CC" + }; + }); + let body = { - "usersSelected": this.taskParticipants, - "distributionType": "paralelo", - "priority": 0, - "countryCode": "string", + "usersSelected": attendees, "serialNumber": this.task.SerialNumber, "action": "Reencaminhar", "actionTypeId": 98, @@ -127,9 +146,10 @@ export class ForwardPage implements OnInit { "AttachmentList" :docs, } console.log(body); - this.processes.DelegateTask(body).subscribe(res=>{ + this.processes.CompleteParecerPrTask(body).subscribe(res=>{ console.log(res); - this.toastService.successMessage('Processo delegado') + this.toastService.successMessage('Processo delegado'); + this.goBack(); }, (error)=>{ this.toastService.badRequest("Processo não delegado") diff --git a/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.html b/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.html index 929cb675c..2be952653 100644 --- a/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.html +++ b/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.html @@ -9,6 +9,6 @@
- +
diff --git a/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.ts b/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.ts index 2f2ae7020..367609ec7 100644 --- a/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.ts +++ b/src/app/pages/agenda/event-actions-popover/event-actions-popover.page.ts @@ -35,44 +35,53 @@ export class EventActionsPopoverPage implements OnInit { } }; } + + goBack(){ + this.closePopover(); + this.router.navigate(['/home/gabinete-digital/event-list']); + } + closePopover(){ this.popoverController.dismiss(); } + approveTask() { let body = { "serialNumber": this.serialNumber, "action": "Aprovar" } console.log(body); - - + try { this.processes.PostTaskAction(body).toPromise() - this.router.navigate(['/home/gabinete-digital/event-list']); - this.modalController.dismiss(null); - this.toastService.successMessage() + this.toastService.successMessage(); + this.goBack(); } catch (error) { this.toastService.badRequest() } - } + emendarTask() { - let body = { "serialNumber": this.serialNumber, "action": "Rejeitar" } console.log(body); - - try { - this.processes.PostTaskAction(body).toPromise() - this.router.navigate(['/home/gabinete-digital/event-list']); - this.modalController.dismiss(null); - this.toastService.successMessage() + this.processes.PostTaskAction(body).toPromise(); + this.toastService.successMessage(); + this.goBack(); } catch (error) { this.toastService.badRequest() } - - } - deleteTask(){ + async rejeitar(){ + let body = { "serialNumber": this.serialNumber, "action": "Rejeitar" } + console.log(body); + try { + this.processes.PostTaskAction(body).toPromise(); + await this.toastService.successMessage('Processo rejeitado'); + this.goBack(); + } catch (error) { + this.toastService.badRequest() + } } + async editTask() { console.log(this.serialNumber); console.log(this.instanceId); diff --git a/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts b/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts index 31c8ede5d..95bce892b 100644 --- a/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts +++ b/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts @@ -76,7 +76,6 @@ export class ApproveEventPage implements OnInit { this.router.navigate(['/home/gabinete-digital'], navigationExtras); } - } async getTask() { @@ -97,10 +96,8 @@ export class ApproveEventPage implements OnInit { try { await this.processes.PostTaskAction(body).toPromise() - this.toastService.successMessage() - this.toastService.successMessage('Evento aprovado', ()=>{ - this.goBack(); - }); + this.toastService.successMessage(); + this.goBack(); } catch (error) { this.toastService.badRequest() @@ -126,18 +123,13 @@ export class ApproveEventPage implements OnInit { async rejeitar(serialNumber:string){ let body = { "serialNumber": serialNumber, "action": "Rejeitar" } console.log(body); - this.toastService.successMessage('Process'); try { this.processes.PostTaskAction(body).toPromise(); await this.toastService.successMessage('Processo rejeitado'); - await this.toastService.successMessage('Processo rejeitado', ()=>{ - this.goBack(); - }); - + this.goBack(); } catch (error) { this.toastService.badRequest() } - } async getAttachments(instanceId:string){ diff --git a/src/app/pages/gabinete-digital/event-list/event-list.page.ts b/src/app/pages/gabinete-digital/event-list/event-list.page.ts index 0ef45e5b3..ca7207ad9 100644 --- a/src/app/pages/gabinete-digital/event-list/event-list.page.ts +++ b/src/app/pages/gabinete-digital/event-list/event-list.page.ts @@ -37,7 +37,7 @@ export class EventListPage implements OnInit { this.router.events.forEach((event) => { if(event instanceof NavigationEnd && event.url == this.router.url) { - this.doRefresh(); + this.LoadToApproveEvents(); } }); diff --git a/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.html b/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.html index a8193c345..52d71b82a 100644 --- a/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.html +++ b/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.html @@ -35,14 +35,14 @@
-
Intervenientes
+
Com conhecimento
diff --git a/src/app/pages/gabinete-digital/expediente/expediente.page.ts b/src/app/pages/gabinete-digital/expediente/expediente.page.ts index 54375f618..6a677e6d0 100644 --- a/src/app/pages/gabinete-digital/expediente/expediente.page.ts +++ b/src/app/pages/gabinete-digital/expediente/expediente.page.ts @@ -82,28 +82,16 @@ export class ExpedientePage implements OnInit { doRefresh() { this.LoadList(); - setTimeout(() => { }, 2000); } goBack() { - this.router.navigate(['/home/gabinete-digital']); - } - goToExpediente(serialNumber:any) { - - let navigationExtras: NavigationExtras = { - queryParams: { - "serialNumber": serialNumber, - "caller": "gabinete" - } - } - + goToExpediente(serialNumber:any){ this.router.navigate(['/home/gabinete-digital/expediente',serialNumber,'gabinete-digital']); - } } diff --git a/src/app/pages/gabinete-digital/gabinete-digital.page.html b/src/app/pages/gabinete-digital/gabinete-digital.page.html index f1cc06c77..522bfcfb4 100644 --- a/src/app/pages/gabinete-digital/gabinete-digital.page.html +++ b/src/app/pages/gabinete-digital/gabinete-digital.page.html @@ -3,18 +3,19 @@ - + +
Gabinete Digital -
diff --git a/src/app/pages/gabinete-digital/gabinete-digital.page.ts b/src/app/pages/gabinete-digital/gabinete-digital.page.ts index d3001864e..d0fc37eea 100644 --- a/src/app/pages/gabinete-digital/gabinete-digital.page.ts +++ b/src/app/pages/gabinete-digital/gabinete-digital.page.ts @@ -260,7 +260,7 @@ export class GabineteDigitalPage implements OnInit { } - doRefresh() { + doRefresh(event) { this.closeAllDesktopComponents(); switch(this.loggeduser.Profile){ case 'MDGPR': @@ -276,8 +276,7 @@ export class GabineteDigitalPage implements OnInit { this.LoadCounts(); //this.refreshExpedientes(); - setTimeout(() => { - }, 2000); + event.target.complete(); } notImplemented(){ diff --git a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts index 9ec4fe614..0f0325345 100644 --- a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts +++ b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts @@ -445,14 +445,16 @@ export class PedidoPage implements OnInit { } goBack() { - - let navigationExtras: NavigationExtras = { - queryParams: { - "pedidos": true, + if (window.innerWidth <= 800) { + this.router.navigate(['/home/gabinete-digital/pedidos']); + } else { + let navigationExtras: NavigationExtras = { + queryParams: { + "pedidos": true, + } } + this.router.navigate(['/home/gabinete-digital'], navigationExtras); } - - this.router.navigate(['/home/gabinete-digital'], navigationExtras); } diff --git a/src/app/pages/publications/publications.page.html b/src/app/pages/publications/publications.page.html index 9f39fd6a8..c071b0d24 100644 --- a/src/app/pages/publications/publications.page.html +++ b/src/app/pages/publications/publications.page.html @@ -3,7 +3,7 @@ - + @@ -24,7 +24,7 @@ -
diff --git a/src/app/pages/publications/publications.page.ts b/src/app/pages/publications/publications.page.ts index 60b18bd50..4e9224928 100644 --- a/src/app/pages/publications/publications.page.ts +++ b/src/app/pages/publications/publications.page.ts @@ -68,13 +68,12 @@ export class PublicationsPage implements OnInit { } }); } - doRefresh() { - /* this.getActions(); */ + doRefresh(event) { + this.getActions(); setTimeout(() => { - this.getActions(); - /* event.target.complete(); */ - }, 2000); + event.target.complete(); + }, 250); } get windowInnerWidth(): number { @@ -125,7 +124,7 @@ export class PublicationsPage implements OnInit { }); await modal.present(); modal.onDidDismiss().then(()=>{ - this.doRefresh(); + this.getActions(); }); } else { this.desktopComponent.showAddActions = true; diff --git a/src/app/services/processes.service.ts b/src/app/services/processes.service.ts index 6b4b28eaf..6a382fb71 100644 --- a/src/app/services/processes.service.ts +++ b/src/app/services/processes.service.ts @@ -139,6 +139,7 @@ export class ProcessesService { }; return this.http.post(`${geturl}`, body, options) } + CompleteTask(body:any){ const geturl = environment.apiURL + 'Tasks/CompleteTask'; @@ -148,6 +149,15 @@ export class ProcessesService { return this.http.post(`${geturl}`, body, options) } + CompleteParecerPrTask(body:any){ + const geturl = environment.apiURL + 'Tasks/CompleteTaskParecerPr'; + + let options = { + headers: this.headers, + }; + return this.http.post(`${geturl}`, body, options) + } + UpdateTaskStatus(FolderId:string): Observable{ const geturl = environment.apiURL + 'Tasks/UpdateTaskStatus'; let params = new HttpParams(); diff --git a/src/app/shared/agenda/approve-event/approve-event.page.ts b/src/app/shared/agenda/approve-event/approve-event.page.ts index 5d9909a2d..9742c71e6 100644 --- a/src/app/shared/agenda/approve-event/approve-event.page.ts +++ b/src/app/shared/agenda/approve-event/approve-event.page.ts @@ -127,10 +127,9 @@ export class ApproveEventPage implements OnInit { try { await this.processes.PostTaskAction(body).toPromise() this.router.navigate(['/home/gabinete-digital/event-list']); - this.modalController.dismiss(null); this.toastService.successMessage('Evento rejeitado') } catch (error) { - this.toastService.badRequest('Evento não rejeitado') + this.toastService.badRequest('Processo não efectuado') } } From d82d1446ced704feefc00dabef6ae15b052b529c Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Thu, 17 Jun 2021 16:13:37 +0100 Subject: [PATCH 21/32] Improve ageanda calendar --- src/app/pages/agenda/agenda.page.html | 23 +- src/app/pages/agenda/agenda.page.scss | 13 - src/app/pages/agenda/agenda.page.ts | 363 +++++++++----------------- src/global.scss | 26 +- 4 files changed, 146 insertions(+), 279 deletions(-) diff --git a/src/app/pages/agenda/agenda.page.html b/src/app/pages/agenda/agenda.page.html index 6dd43f81c..aadfae9b7 100644 --- a/src/app/pages/agenda/agenda.page.html +++ b/src/app/pages/agenda/agenda.page.html @@ -226,7 +226,8 @@
-
+
{{event.event.StartDate | date: 'HH:mm'}}
@@ -258,18 +259,17 @@
-
+
-
-
+
+
{{ TimelineDayEvent(events.key)}}
- -
- -
- +
+
+
{{event.event.StartDate | date: 'HH:mm'}}
--
@@ -292,7 +292,6 @@
-
@@ -310,7 +309,9 @@
-
+
+
{{event.event.StartDate | date: 'HH:mm'}}
--
diff --git a/src/app/pages/agenda/agenda.page.scss b/src/app/pages/agenda/agenda.page.scss index 0f8c36d91..de08b8a9f 100644 --- a/src/app/pages/agenda/agenda.page.scss +++ b/src/app/pages/agenda/agenda.page.scss @@ -7,19 +7,6 @@ display: table-cell; } -ion-slide{ - td{ - div { - padding-left: 7px; - border-radius: 28px; - display: flex; - justify-content: center; - align-items: center; - text-align: center; - height: 25px; - } - } -} :host ::ng-deep { .monthview-primary-with-event { diff --git a/src/app/pages/agenda/agenda.page.ts b/src/app/pages/agenda/agenda.page.ts index 73529fa67..8334d0e8b 100644 --- a/src/app/pages/agenda/agenda.page.ts +++ b/src/app/pages/agenda/agenda.page.ts @@ -202,12 +202,10 @@ export class AgendaPage implements OnInit { //Go to the next view of the calendar month/week/day next() { this.myCal.slideNext(); - this.centralizeTimeline(500); } //Go to the previous view of the calendar back(){ this.myCal.slidePrev(); - this.centralizeTimeline(500); } //Shows the title of your view onViewTitleChanged(title){ @@ -263,8 +261,6 @@ export class AgendaPage implements OnInit { // calendar change date this.eventSelectedDate = new Date(ev); - /* this.centralizeTimeline(500); - this.timelineBoxCorrectHeight(500); */ }; // changedate @@ -287,7 +283,7 @@ export class AgendaPage implements OnInit { } // for calendar - currentDayEventDisplayBorder(day: any, id: any){ + currentDayEventDisplayBorder(day: any, id: any) { const events = day[id].events; @@ -315,32 +311,7 @@ export class AgendaPage implements OnInit { } // for timeline - centralizeTimeline(timeout: number) { - // auto scroll timeline - if(!this.showLoader) { - setTimeout(() => { - const timelineMarker = document.querySelector('.cal-current-time-marker'); - const scrollContainer = document.querySelector('.timeline-wrapper'); - - try { - scrollContainer.scroll({ - top: parseInt(timelineMarker['style']['top'].replace('px','')) - ((scrollContainer['offsetHeight']/2) - 60), - left: 0, - behavior: 'smooth' - }) - } catch (error) { - // - if(!this.showLoader) { - //this.selectFirstEventOfTheDay(); - } - - } - - }, timeout); - } - - } get CalendarCurrentDay ():any { @@ -392,75 +363,6 @@ export class AgendaPage implements OnInit { ` } - // for timeline - timelineBoxCorrectHeight(timeout){ - - setTimeout(()=>{ - - if(window.innerWidth <= 1024){ - this.events.forEach((el:any, eventIndex)=>{ - - const startEvent = new Date(el.startTime| el.start); - const endEvent = new Date(el.endTime | el.end); - - var minutes = ((endEvent.getTime() - startEvent.getTime()) / 1000) / 60; - // const top = (startEvent.getTime() - (new Date(2020, 1, 3)).getTime()) /60; - - document.querySelectorAll('.ss-timeline .timeline-box').forEach(ele => { - - if(ele.className.indexOf(`timeline-box-event-${eventIndex}`)>=0){ - - ele.setAttribute('style',`height:${minutes}px`); - - } - - }); - - }); - } else { - this.TimelineMD.forEach((el:any, eventIndex)=>{ - - const startEvent = new Date(el.startTime| el.start); - const endEvent = new Date(el.endTime | el.end); - - var minutes = ((endEvent.getTime() - startEvent.getTime()) / 1000) / 60; - // const top = (startEvent.getTime() - (new Date(2020, 1, 3)).getTime()) /60; - - document.querySelectorAll('.fs-timeline .timeline-box').forEach(ele => { - - if(ele.className.indexOf(`timeline-box-event-${eventIndex}`)>=0){ - - ele.setAttribute('style',`height:${minutes}px`); - - } - - }); - - }); - } - - - },timeout) - - setTimeout(()=>{ - this.TimelinePR.forEach((el, eventIndex)=>{ - - const startEvent = new Date(el['startTime']); - const endEvent = new Date(el['endTime']); - - var minutes = ((endEvent.getTime() - startEvent.getTime()) / 1000) / 60; - const top = (startEvent.getTime() - (new Date(2020, 1, 3)).getTime()) /60; - - document.querySelectorAll('.sd-timeline .timeline-box').forEach(ele => { - - if(ele.className.indexOf(`timeline-box-event-${eventIndex}`)>=0){ - ele.setAttribute('style',`height:${minutes}px`); - } - }); - - }); - },timeout) - } // for timeline timelineFilter(calendarName, eventsList, profile){ @@ -571,8 +473,6 @@ export class AgendaPage implements OnInit { this.showTimeline = true; - this.timelineBoxCorrectHeight(500); - this.centralizeTimeline(500); }); } @@ -615,8 +515,6 @@ export class AgendaPage implements OnInit { this.showLoader = false; this.showTimeline = true; - this.timelineBoxCorrectHeight(500); - this.centralizeTimeline(500); }); @@ -661,8 +559,6 @@ export class AgendaPage implements OnInit { this.showLoader = false; this.showTimeline = true; - this.timelineBoxCorrectHeight(500); - this.centralizeTimeline(500); }); @@ -708,8 +604,6 @@ export class AgendaPage implements OnInit { this.showLoader = false; this.showTimeline = true; - this.timelineBoxCorrectHeight(500); - this.centralizeTimeline(500); }); } @@ -745,8 +639,6 @@ export class AgendaPage implements OnInit { this.showLoader = false; this.showTimeline = true; - this.timelineBoxCorrectHeight(500); - this.centralizeTimeline(500); }); } break; @@ -787,8 +679,6 @@ export class AgendaPage implements OnInit { this.showLoader = false; this.showTimeline = true; - this.timelineBoxCorrectHeight(500); - this.centralizeTimeline(500); }); } else { this.eventService.getAllPrEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).then((res:any) => { @@ -821,8 +711,6 @@ export class AgendaPage implements OnInit { this.showLoader = false; this.showTimeline = true; - this.timelineBoxCorrectHeight(500); - this.centralizeTimeline(500); }); } break; @@ -884,8 +772,6 @@ export class AgendaPage implements OnInit { counter++; if(counter==2){ this.showLoader = false; - this.timelineBoxCorrectHeight(500); - this.centralizeTimeline(500); } }); @@ -933,8 +819,6 @@ export class AgendaPage implements OnInit { if(counter==2 || this.loggeduser.Profile == 'PR') { this.showLoader = false; - this.timelineBoxCorrectHeight(500); - this.centralizeTimeline(500); } }); @@ -989,8 +873,6 @@ export class AgendaPage implements OnInit { if(counter==2 || this.loggeduser.Profile == 'PR') { this.showLoader = false; - this.timelineBoxCorrectHeight(500); - this.centralizeTimeline(500); } }); @@ -1005,151 +887,162 @@ export class AgendaPage implements OnInit { list.forEach( (event:any)=> { - var startDate = new Date(event.start); - var endDate = new Date(event.end); + var startDate: any = new Date(event.start); + var endDate: any = new Date(event.end); const day = (((new Date (event.start)).getDate())).toString().padStart(2,'0') event.manyDays = false - if ( (new Date (this.viewDate).getMonth()) == (new Date(event.start).getMonth()) ) { - if(!days.hasOwnProperty(day)) { - days[day] = [] - } + if(!days.hasOwnProperty(day)) { + days[day] = [] + } - var Difference_In_Days = endDate.getDate() - startDate.getDate() + // difference + const diffTime = Math.abs(endDate - startDate); + const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24)); - if ( endDate.getTime() > startDate.getTime() && Difference_In_Days <= 50 && !event.event.IsAllDayEvent ) { - if (Difference_In_Days >= 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()) { + if (diffDays <= 150 && !event.event.IsAllDayEvent ) { - const newDate = startDate.setDate(startDate.getDate()+ i) + 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()) { - let otherDays = (((new Date (newDate)).getDate())).toString().padStart(2,'0') - + const newDate = startDate.setDate(startDate.getDate()+ i) - event.other = true + let otherDays = (((new Date (newDate)).getDate())).toString().padStart(2,'0') - event.start = newDate - if(!days.hasOwnProperty(otherDays)) { + 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) - } - - + days[otherDays] = [] } + + if (!(startDate.getFullYear() != endDate.getFullYear() || + startDate.getMonth() != endDate.getMonth() || + startDate.getDate() != endDate.getDate())) { + // last push - } else { - days[day].push(event) + 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) } - + }) + + setTimeout(()=>{ + document.querySelectorAll('.EventListBox-container .EventListBox').forEach((e)=>{ + if(e.childElementCount == 0) { + console.log(e.childElementCount) + e.parentElement.style.display = 'none' + } else { + e.parentElement.style.display = 'block' + } + }) + }, 10) return days } - eventListVisible(event) { - return momentG(event,'MMMM yyyy') == momentG(this.calendar.currentDate, 'MMMM yyyy') + get viewEventMonth () { + return this.viewDate.getMonth() } - log(event) { - console.log(event) + dateMonth(event: any) { + return new Date(event.start).getMonth() + } + + eventListVisible(event) { + return momentG(event,'MMMM yyyy') == momentG(this.calendar.currentDate, 'MMMM yyyy') } // for timeline select the first event in the timeline @@ -1157,7 +1050,6 @@ export class AgendaPage implements OnInit { setTimeout(()=>{ - let sortedDate = this.eventSource.sort((a,b) =>{ return (b.startTime) -(a.startTime); }); @@ -1213,9 +1105,6 @@ export class AgendaPage implements OnInit { this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate); } - // change header profile picture - // window['header'](this.profile); - } async openAddEvent() { diff --git a/src/global.scss b/src/global.scss index 759ad62ff..12419ce96 100644 --- a/src/global.scss +++ b/src/global.scss @@ -33,8 +33,9 @@ // calendar current day // current day -ion-slide{ - td{ + +ion-slide { + td { div { padding-left: 7px; border-radius: 28px; @@ -105,19 +106,6 @@ td.monthview-secondary-with-event, td.monthview-secondary-with-event[_ngcontent- -.cal-current-time-marker::before{ - width: 10px; - height: 10px; - background-color: #42b9fe !important; - content: "."; - color: transparent; - left: 55px; - position: absolute; - border-radius: 91px; - top: -3.5px; - -} - .cal-time{ font-family: Roboto; font-size: 13px; @@ -577,9 +565,11 @@ td.monthview-secondary-with-event, td.monthview-secondary-with-event[_ngcontent- } -.calendar-component { +.calendar-component .monthview-container table.table { + td { - padding: 7px !important; + width: 50px; + height: 40px; div { padding-left: 0px; } @@ -868,7 +858,7 @@ background: rgb(92, 92, 92); } -.calendar-component .monthview-container .swiper-slide-active table tbody { +.calendar-component .monthview-container table.table tbody { tr:nth-child(n+6) { display: none; } From 713a80e176803b52f1f0328baadd4a124c762e55 Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Thu, 17 Jun 2021 16:33:38 +0100 Subject: [PATCH 22/32] Improve agenda --- src/app/pages/agenda/agenda.page.html | 2 +- src/app/pages/agenda/agenda.page.ts | 36 --------------------------- src/global.scss | 6 +---- 3 files changed, 2 insertions(+), 42 deletions(-) diff --git a/src/app/pages/agenda/agenda.page.html b/src/app/pages/agenda/agenda.page.html index aadfae9b7..fc95b7c30 100644 --- a/src/app/pages/agenda/agenda.page.html +++ b/src/app/pages/agenda/agenda.page.html @@ -309,7 +309,7 @@
-
diff --git a/src/app/pages/agenda/agenda.page.ts b/src/app/pages/agenda/agenda.page.ts index 8334d0e8b..814f8e43c 100644 --- a/src/app/pages/agenda/agenda.page.ts +++ b/src/app/pages/agenda/agenda.page.ts @@ -1022,7 +1022,6 @@ export class AgendaPage implements OnInit { setTimeout(()=>{ document.querySelectorAll('.EventListBox-container .EventListBox').forEach((e)=>{ if(e.childElementCount == 0) { - console.log(e.childElementCount) e.parentElement.style.display = 'none' } else { e.parentElement.style.display = 'block' @@ -1045,41 +1044,6 @@ export class AgendaPage implements OnInit { return momentG(event,'MMMM yyyy') == momentG(this.calendar.currentDate, 'MMMM yyyy') } - // for timeline select the first event in the timeline - selectFirstEventOfTheDay(){ - - setTimeout(()=>{ - - let sortedDate = this.eventSource.sort((a,b) =>{ - return (b.startTime) -(a.startTime); - }); - - - let filterDate = sortedDate.filter((e) => { - //console.log( e.startTime.toLocaleDateString('en-US'),' == ',this.eventSelectedDate.toLocaleDateString('en-US')); - return e.startTime.toLocaleDateString('en-US') == this.eventSelectedDate.toLocaleDateString('en-US'); - }); - - // console.log('Event -- ',filterDate[filterDate.length - 1], filterDate['startTime']); - - const firstEventStartHours = new Date(filterDate[filterDate.length - 1].startTime).getHours(); - - // console.log('firstEventStartHours-- ', firstEventStartHours) - - if(firstEventStartHours) { - const scrollContainer = document.querySelector('.timeline-wrapper'); - - scrollContainer.scroll({ - top: firstEventStartHours*60, - left: 0, - behavior: 'smooth' - }) - - } - - }, 500); - - } actions(){} diff --git a/src/global.scss b/src/global.scss index ee1502f34..0487a350e 100644 --- a/src/global.scss +++ b/src/global.scss @@ -797,7 +797,7 @@ background: rgb(92, 92, 92); display: none !important; } - /* Track */ +/* Track */ .hide-scroll::-webkit-scrollbar-track { display: none !important; } @@ -862,8 +862,4 @@ background: rgb(92, 92, 92); tr:nth-child(n+6) { display: none; } -} - -.modal { - display: flex !important; } \ No newline at end of file From e6a4e6fe8e24c53e206e97e41c71baa19a5168dc Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Thu, 17 Jun 2021 16:40:18 +0100 Subject: [PATCH 23/32] Improve --- src/app/pages/agenda/agenda.page.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/pages/agenda/agenda.page.html b/src/app/pages/agenda/agenda.page.html index fc95b7c30..bcb40aee6 100644 --- a/src/app/pages/agenda/agenda.page.html +++ b/src/app/pages/agenda/agenda.page.html @@ -218,12 +218,12 @@
-
+
{{ TimelineDayEvent(events.key)}}
-
+
-
+
{{ TimelineDayEvent(events.key)}}
@@ -301,13 +301,13 @@
-
+
{{ TimelineDayEvent(events.key)}}
-
+
From eb0715f4020a4ba43b5825410988243bc2f147ec Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Thu, 17 Jun 2021 16:43:18 +0100 Subject: [PATCH 24/32] save --- src/app/pages/chat/chat.page.html | 2 +- src/app/pages/chat/chat.page.ts | 19 +++++++++++++++++++ .../gabinete-digital.page.html | 2 +- .../gabinete-digital/gabinete-digital.page.ts | 18 ++++++++++++++++++ .../pages/publications/publications.page.html | 2 +- .../pages/publications/publications.page.ts | 19 +++++++++++++++++++ 6 files changed, 59 insertions(+), 3 deletions(-) diff --git a/src/app/pages/chat/chat.page.html b/src/app/pages/chat/chat.page.html index 62fa07099..5e529eb78 100644 --- a/src/app/pages/chat/chat.page.html +++ b/src/app/pages/chat/chat.page.html @@ -23,7 +23,7 @@ -
diff --git a/src/app/pages/chat/chat.page.ts b/src/app/pages/chat/chat.page.ts index 32a7371b3..a8ffdb178 100644 --- a/src/app/pages/chat/chat.page.ts +++ b/src/app/pages/chat/chat.page.ts @@ -91,6 +91,7 @@ export class ChatPage implements OnInit { /* Fim websockets variables*/ loggedUserChat:any; + hideRefreshBtn = true; constructor( private http:HttpClient, @@ -120,7 +121,25 @@ export class ChatPage implements OnInit { //this.sendMsg(); /* Fim websocket functions */ + this.hideRefreshButton(); } + +hideRefreshButton(){ + window.onresize = (event) => { + if( window.innerWidth < 801) { + this.hideRefreshBtn = false; + } + else{ + this.hideRefreshBtn = true; + } + } + if(window.innerWidth < 801){ + console.log('YASS'); + this.hideRefreshBtn = false; + } +} + + loadMessage(){ this.chatService.messages.subscribe(msg => { console.log("Response from websocket: " + msg); diff --git a/src/app/pages/gabinete-digital/gabinete-digital.page.html b/src/app/pages/gabinete-digital/gabinete-digital.page.html index 522bfcfb4..346097d46 100644 --- a/src/app/pages/gabinete-digital/gabinete-digital.page.html +++ b/src/app/pages/gabinete-digital/gabinete-digital.page.html @@ -15,7 +15,7 @@
Gabinete Digital -
diff --git a/src/app/pages/gabinete-digital/gabinete-digital.page.ts b/src/app/pages/gabinete-digital/gabinete-digital.page.ts index d0fc37eea..82eca3467 100644 --- a/src/app/pages/gabinete-digital/gabinete-digital.page.ts +++ b/src/app/pages/gabinete-digital/gabinete-digital.page.ts @@ -74,6 +74,8 @@ export class GabineteDigitalPage implements OnInit { mdgpr = "MDGPR"; pr = "PR"; + hideRefreshBtn = true; + @ViewChild(ExpedientsPage) expedientesPage: ExpedientsPage; @ViewChild(PendentesPage) pendentesListPage: PendentesPage; @ViewChild(EventsToApprovePage) eventsToApprove: EventsToApprovePage; @@ -124,6 +126,22 @@ export class GabineteDigitalPage implements OnInit { } }); + this.hideRefreshButton(); + } + + hideRefreshButton(){ + window.onresize = (event) => { + if( window.innerWidth < 801) { + this.hideRefreshBtn = false; + } + else{ + this.hideRefreshBtn = true; + } + } + if(window.innerWidth < 801){ + console.log('YASS'); + this.hideRefreshBtn = false; + } } checkRoutes(){ diff --git a/src/app/pages/publications/publications.page.html b/src/app/pages/publications/publications.page.html index c071b0d24..43b29a116 100644 --- a/src/app/pages/publications/publications.page.html +++ b/src/app/pages/publications/publications.page.html @@ -24,7 +24,7 @@ -
diff --git a/src/app/pages/publications/publications.page.ts b/src/app/pages/publications/publications.page.ts index 4e9224928..7951ed6fe 100644 --- a/src/app/pages/publications/publications.page.ts +++ b/src/app/pages/publications/publications.page.ts @@ -48,6 +48,7 @@ export class PublicationsPage implements OnInit { // from publication details //publication: object; + hideRefreshBtn = true; constructor( private router: Router, @@ -67,7 +68,25 @@ export class PublicationsPage implements OnInit { this.getActions(); } }); + + this.hideRefreshButton(); } + + hideRefreshButton(){ + window.onresize = (event) => { + if( window.innerWidth < 801) { + this.hideRefreshBtn = false; + } + else{ + this.hideRefreshBtn = true; + } + } + if(window.innerWidth < 801){ + console.log('YASS'); + this.hideRefreshBtn = false; + } + } + doRefresh(event) { this.getActions(); From 2dc491ccd1a97f329c0ebf6dcd6dc3f542763781 Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Thu, 17 Jun 2021 16:44:38 +0100 Subject: [PATCH 25/32] Improve --- src/app/pages/agenda/agenda.page.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/app/pages/agenda/agenda.page.html b/src/app/pages/agenda/agenda.page.html index bcb40aee6..23740de68 100644 --- a/src/app/pages/agenda/agenda.page.html +++ b/src/app/pages/agenda/agenda.page.html @@ -224,7 +224,6 @@
-
@@ -255,7 +254,6 @@
-
From 61774d165a16a0a2dfbb89e19aee09c804ef749e Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Thu, 17 Jun 2021 16:54:03 +0100 Subject: [PATCH 26/32] save --- src/app/pages/agenda/agenda.page.ts | 1 + src/app/pages/agenda/new-event/new-event.module.ts | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/app/pages/agenda/agenda.page.ts b/src/app/pages/agenda/agenda.page.ts index 814f8e43c..aa6746e36 100644 --- a/src/app/pages/agenda/agenda.page.ts +++ b/src/app/pages/agenda/agenda.page.ts @@ -1311,6 +1311,7 @@ export class AgendaPage implements OnInit { } else { this.timelineFilterState = segments } + this.showTimelineFilterState = false; } } \ No newline at end of file diff --git a/src/app/pages/agenda/new-event/new-event.module.ts b/src/app/pages/agenda/new-event/new-event.module.ts index f83298b68..a9818ea24 100644 --- a/src/app/pages/agenda/new-event/new-event.module.ts +++ b/src/app/pages/agenda/new-event/new-event.module.ts @@ -8,15 +8,12 @@ import { NewEventPageRoutingModule } from './new-event-routing.module'; import { NewEventPage } from './new-event.page'; -import { NgbDate, NgbModule } from '@ng-bootstrap/ng-bootstrap'; - @NgModule({ imports: [ CommonModule, FormsModule, IonicModule, NewEventPageRoutingModule, - // NgbModule, ], declarations: [NewEventPage] }) From 0672ab99713536effb52d5833c09363c85752db3 Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Thu, 17 Jun 2021 17:01:33 +0100 Subject: [PATCH 27/32] save --- src/app/shared/agenda/new-event/new-event.page.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/shared/agenda/new-event/new-event.page.html b/src/app/shared/agenda/new-event/new-event.page.html index 9ae73cd11..299d17e2c 100644 --- a/src/app/shared/agenda/new-event/new-event.page.html +++ b/src/app/shared/agenda/new-event/new-event.page.html @@ -91,7 +91,7 @@
Date: Thu, 17 Jun 2021 21:22:43 +0100 Subject: [PATCH 28/32] save --- src/global.scss | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/global.scss b/src/global.scss index 0487a350e..9c118d5b2 100644 --- a/src/global.scss +++ b/src/global.scss @@ -862,4 +862,8 @@ background: rgb(92, 92, 92); tr:nth-child(n+6) { display: none; } -} \ No newline at end of file +} + +.modal { + display: flex !important; + } \ No newline at end of file From ea4a467754d02acd99bfbbb9c42af4d444657407 Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Thu, 17 Jun 2021 22:17:53 +0100 Subject: [PATCH 29/32] save --- src/app/modals/forward/forward.page.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/modals/forward/forward.page.ts b/src/app/modals/forward/forward.page.ts index 06f9eac42..9ab745dfc 100644 --- a/src/app/modals/forward/forward.page.ts +++ b/src/app/modals/forward/forward.page.ts @@ -121,8 +121,8 @@ export class ForwardPage implements OnInit { Attachments: DocumentToSave, } - if(this.taskParticipants.length > 1){ - this.toastService.badRequest("Selecione apenas um destinatário"); + if(this.taskParticipants.length < 1){ + this.toastService.badRequest("Selecione um destinatário"); } else { From 18f0729608b935358cc72ea779564d83524bde5f Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Fri, 18 Jun 2021 11:01:02 +0100 Subject: [PATCH 30/32] change route for publications --- package-lock.json | 3 +-- src/app/home/home-routing.module.ts | 6 ++++- .../approve-event/approve-event.page.ts | 8 +++++- .../event-list/event-list.page.html | 4 +-- .../event-list/event-list.page.ts | 16 ++---------- .../pages/publications/publications.page.html | 2 +- .../pages/publications/publications.page.ts | 11 ++++++++ .../view-publications.module.ts | 4 ++- .../view-publications.page.html | 11 +++++--- .../view-publications.page.scss | 4 +-- .../view-publications.page.ts | 25 +++++++++++++++---- 11 files changed, 60 insertions(+), 34 deletions(-) diff --git a/package-lock.json b/package-lock.json index 47db26207..867401292 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19092,8 +19092,7 @@ }, "ssri": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", - "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", + "resolved": "", "dev": true, "requires": { "figgy-pudding": "^3.5.1" diff --git a/src/app/home/home-routing.module.ts b/src/app/home/home-routing.module.ts index b041b09c0..66534f60e 100644 --- a/src/app/home/home-routing.module.ts +++ b/src/app/home/home-routing.module.ts @@ -177,6 +177,10 @@ const routes: Routes = [ loadChildren: ()=> import('../pages/publications/publications.module').then(m => m.PublicationsPageModule) }, { + path:':folderId', + loadChildren: ()=> import('../pages/publications/view-publications/view-publications.module').then(m => m.ViewPublicationsPageModule) + }, + /* { path:'view-publications', children: [ { @@ -194,7 +198,7 @@ const routes: Routes = [ }, ] - }, + }, */ { path:'new-publication', loadChildren: ()=> import('../shared/publication/new-publication/new-publication.module').then(m => m.NewPublicationPageModule) diff --git a/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts b/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts index 95bce892b..4bbc6901d 100644 --- a/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts +++ b/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts @@ -133,7 +133,13 @@ export class ApproveEventPage implements OnInit { } async getAttachments(instanceId:string){ - this.loadedAttachments = await this.attachmentsService.getAttachmentsById(instanceId).toPromise(); + try { + this.loadedAttachments = await this.attachmentsService.getAttachmentsById(instanceId).toPromise(); + + } catch (error) { + + } + } viewDocument(sourceId){ diff --git a/src/app/pages/gabinete-digital/event-list/event-list.page.html b/src/app/pages/gabinete-digital/event-list/event-list.page.html index 544505032..7e9722671 100644 --- a/src/app/pages/gabinete-digital/event-list/event-list.page.html +++ b/src/app/pages/gabinete-digital/event-list/event-list.page.html @@ -35,7 +35,7 @@ + *ngFor="let event of eventsMDGPRList" (click)="goToEventToApproveDetail(event.serialNumber)">
@@ -57,7 +57,7 @@
+ *ngFor="let event of eventsPRList" (click)="goToEventToApproveDetail(event.serialNumber)">

{{event.workflowInstanceDataFields.StartDate | date: 'hh:mm'}}

diff --git a/src/app/pages/gabinete-digital/event-list/event-list.page.ts b/src/app/pages/gabinete-digital/event-list/event-list.page.ts index ca7207ad9..ea3cd7d22 100644 --- a/src/app/pages/gabinete-digital/event-list/event-list.page.ts +++ b/src/app/pages/gabinete-digital/event-list/event-list.page.ts @@ -75,27 +75,15 @@ export class EventListPage implements OnInit { await modal.present(); } - goToEventDetail(eventToAprove){ - let InstanceId; - - if(!eventToAprove.workflowInstanceDataFields.hasOwnProperty('InstanceId')){ - InstanceId = '' - } else { - InstanceId =eventToAprove.workflowInstanceDataFields.InstanceId - } - + goToEventToApproveDetail(serialNumber:string){ let navigationExtras: NavigationExtras = { queryParams: { - "serialNumber": eventToAprove.serialNumber, + "serialNumber": serialNumber, } }; this.router.navigate(['/home/gabinete-digital/event-list/approve-event'], navigationExtras) } - - - - doRefresh() { this.LoadToApproveEvents(); console.log('refresh'); diff --git a/src/app/pages/publications/publications.page.html b/src/app/pages/publications/publications.page.html index 43b29a116..34b9e11e8 100644 --- a/src/app/pages/publications/publications.page.html +++ b/src/app/pages/publications/publications.page.html @@ -36,7 +36,7 @@
+ (click)="goToPublicationsList(viagem.ProcessId)">
diff --git a/src/app/pages/publications/publications.page.ts b/src/app/pages/publications/publications.page.ts index 7951ed6fe..096bb77eb 100644 --- a/src/app/pages/publications/publications.page.ts +++ b/src/app/pages/publications/publications.page.ts @@ -152,6 +152,17 @@ export class PublicationsPage implements OnInit { } + goToPublicationsList(folderId: string){ + if( window.innerWidth <= 800){ + this.router.navigate(['/home/publications',folderId]); + } else { + this.closeDesktopComponent(); + this.folderId = folderId + this.desktopComponent.showViewPublication = true; + } + + } + async viewPublications(folderId: string) { const enterAnimation = (baseEl: any) => { diff --git a/src/app/pages/publications/view-publications/view-publications.module.ts b/src/app/pages/publications/view-publications/view-publications.module.ts index ea016b8ed..795264add 100644 --- a/src/app/pages/publications/view-publications/view-publications.module.ts +++ b/src/app/pages/publications/view-publications/view-publications.module.ts @@ -8,6 +8,7 @@ import { ViewPublicationsPageRoutingModule } from './view-publications-routing.m import { ViewPublicationsPage } from './view-publications.page'; import { ComponentsModule } from 'src/app/components/components.module'; +import { HeaderPageModule } from 'src/app/shared/header/header.module'; @NgModule({ imports: [ @@ -15,7 +16,8 @@ import { ComponentsModule } from 'src/app/components/components.module'; FormsModule, IonicModule, ComponentsModule, - ViewPublicationsPageRoutingModule + ViewPublicationsPageRoutingModule, + HeaderPageModule, ], exports: [ViewPublicationsPage], declarations: [ViewPublicationsPage] diff --git a/src/app/pages/publications/view-publications/view-publications.page.html b/src/app/pages/publications/view-publications/view-publications.page.html index 89ac01a00..87c5af296 100644 --- a/src/app/pages/publications/view-publications/view-publications.page.html +++ b/src/app/pages/publications/view-publications/view-publications.page.html @@ -1,10 +1,13 @@ - - + + + + +
-
+
@@ -18,7 +21,7 @@
- + diff --git a/src/app/pages/publications/view-publications/view-publications.page.scss b/src/app/pages/publications/view-publications/view-publications.page.scss index 7ea77b36e..099235685 100644 --- a/src/app/pages/publications/view-publications/view-publications.page.scss +++ b/src/app/pages/publications/view-publications/view-publications.page.scss @@ -4,7 +4,7 @@ } ion-content{ --background: transparent; - transform: translate3d(0, 5px, 0); + //transform: translate3d(0, 5px, 0); --border-radius: 30px; } ion-toolbar{ @@ -52,7 +52,6 @@ overflow:hidden; padding: 25px 20px 0px 20px; color:#000; - } .main-content{ width: 100%; /* 400px */ @@ -60,7 +59,6 @@ font-family: Roboto; margin: 0 auto; background-color: #fff; - padding: 15px 20px 0 20px; } .content-top{ diff --git a/src/app/pages/publications/view-publications/view-publications.page.ts b/src/app/pages/publications/view-publications/view-publications.page.ts index ea83b9db6..9e98cff9f 100644 --- a/src/app/pages/publications/view-publications/view-publications.page.ts +++ b/src/app/pages/publications/view-publications/view-publications.page.ts @@ -1,5 +1,6 @@ import { Component, OnInit } from '@angular/core'; -import { ModalController, NavParams } from '@ionic/angular'; +import { ActivatedRoute, Router } from '@angular/router'; +import { ModalController } from '@ionic/angular'; import { Publication } from 'src/app/models/publication'; import { PublicationFolder } from 'src/app/models/publicationfolder'; import { LoadingService } from 'src/app/services/loading.service'; @@ -24,11 +25,22 @@ export class ViewPublicationsPage implements OnInit { private loadingController: LoadingService, private modalController: ModalController, private publications: PublicationsService, - private navParams: NavParams, - ) { + /* private navParams: NavParams, */ + private activatedRoute: ActivatedRoute, + private router: Router, + ) + { this.item = new PublicationFolder(); - this.folderId = this.navParams.get('folderId'); - } + /* this.folderId = this.navParams.get('folderId'); */ + this.activatedRoute.paramMap.subscribe(params => { + console.log(params); + + if(params["params"]) { + this.folderId = params["params"].folderId; + console.log(params["params"]); + } + }); + } ngOnInit() { console.log(this.folderId); @@ -48,6 +60,9 @@ export class ViewPublicationsPage implements OnInit { close(){ this.modalController.dismiss(); } + goBack(){ + this.router.navigate(['/home/publications']); + } getPublicationDetail(){ this.publications.GetPublicationFolderById(this.folderId).subscribe(res=>{ console.log(res); From 650ef9c5c1fd0eada2afaa24c0e357ac0f1b603a Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Fri, 18 Jun 2021 11:06:38 +0100 Subject: [PATCH 31/32] save --- .../publications/view-publications/view-publications.page.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/app/pages/publications/view-publications/view-publications.page.ts b/src/app/pages/publications/view-publications/view-publications.page.ts index 9e98cff9f..a4dfb5231 100644 --- a/src/app/pages/publications/view-publications/view-publications.page.ts +++ b/src/app/pages/publications/view-publications/view-publications.page.ts @@ -25,13 +25,11 @@ export class ViewPublicationsPage implements OnInit { private loadingController: LoadingService, private modalController: ModalController, private publications: PublicationsService, - /* private navParams: NavParams, */ private activatedRoute: ActivatedRoute, private router: Router, ) { this.item = new PublicationFolder(); - /* this.folderId = this.navParams.get('folderId'); */ this.activatedRoute.paramMap.subscribe(params => { console.log(params); From 863fea9fa556ac2e48de0b10c1b4c77e0a02811b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eudes=20In=C3=A1cio?= Date: Fri, 18 Jun 2021 11:23:44 +0100 Subject: [PATCH 32/32] Commit after npm i --- config.xml | 2 +- package-lock.json | 80 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+), 1 deletion(-) diff --git a/config.xml b/config.xml index 09d2165cb..721c9620c 100644 --- a/config.xml +++ b/config.xml @@ -134,7 +134,7 @@ 0 - 8.0.0.00-20210214-154410 + 8.0.0.00-20210308-063916 diff --git a/package-lock.json b/package-lock.json index 61864dad8..a656911a0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4711,6 +4711,86 @@ "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.6.0.tgz", "integrity": "sha512-Io55IuQY3kydzHtbGvQya3H+KorS/M9rSNyfCGCg9WZ4pyT/lCxIlpJgG1GXW/PswzC84Tr2fBYi+7+jFVQQBw==" }, + "boxen": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz", + "integrity": "sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==", + "requires": { + "ansi-align": "^3.0.0", + "camelcase": "^5.3.1", + "chalk": "^3.0.0", + "cli-boxes": "^2.2.0", + "string-width": "^4.1.0", + "term-size": "^2.1.0", + "type-fest": "^0.8.1", + "widest-line": "^3.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" + } + } + }, "bplist-creator": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/bplist-creator/-/bplist-creator-0.0.8.tgz",