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.html b/src/app/pages/agenda/agenda.page.html index 6dd43f81c..fc95b7c30 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 fcd5db9c4..814f8e43c 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 @@ -283,11 +279,11 @@ 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 - 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,189 +887,163 @@ 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) { + e.parentElement.style.display = 'none' + } else { + e.parentElement.style.display = 'block' + } + }) + }, 10) return days } + get viewEventMonth () { + return this.viewDate.getMonth() + } + + dateMonth(event: any) { + return new Date(event.start).getMonth() + } + eventListVisible(event) { return momentG(event,'MMMM yyyy') == momentG(this.calendar.currentDate, 'MMMM yyyy') } - log(event) { - console.log(event) - } - - // 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(){} @@ -1213,9 +1069,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/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 0f0325345..03f585cc5 100644 --- a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts +++ b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts @@ -168,7 +168,6 @@ export class PedidoPage implements OnInit { this.modalController.dismiss(); } - async openOptions(taskAction?: any) { const popover = await this.popoverController.create({ component: RequestOptionsPage, @@ -184,7 +183,6 @@ export class PedidoPage implements OnInit { return await popover.present(); } - async repreciar(note:string, documents:any) { let body = { "serialNumber": this.serialnumber, @@ -458,49 +456,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 0ea38e87f..9ae73cd11 100644 --- a/src/app/shared/agenda/new-event/new-event.page.html +++ b/src/app/shared/agenda/new-event/new-event.page.html @@ -91,6 +91,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 13b007773..0487a350e 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: 8px !important; + width: 50px; + height: 40px; div { padding-left: 0px; } @@ -807,7 +797,7 @@ background: rgb(92, 92, 92); display: none !important; } - /* Track */ +/* Track */ .hide-scroll::-webkit-scrollbar-track { display: none !important; } @@ -868,12 +858,8 @@ 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; } -} - -.modal { - display: flex !important; } \ No newline at end of file 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/