+ + + + 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 b1c89ccf9..4094b9d08 100644 --- a/src/app/shared/agenda/new-event/new-event.page.ts +++ b/src/app/shared/agenda/new-event/new-event.page.ts @@ -21,21 +21,29 @@ import {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE} from '@angular/material/ import * as _moment from 'moment'; import * as _rollupMoment from 'moment'; import {FormControl} from '@angular/forms'; +import { NgxMatDateFormats } from '@angular-material-components/datetime-picker'; +import { ThemePalette } from '@angular/material/core'; + + +import { HttpClient } from '@angular/common/http'; +import { NgZone, ViewChild } from '@angular/core'; +import { FormGroup, Validators } from '@angular/forms'; +import { NgxMatDatetimePickerModule, NgxMatTimepickerModule, NGX_MAT_DATE_FORMATS, NgxMatDateAdapter } from '@angular-material-components/datetime-picker'; const moment = _rollupMoment || _moment; -export const MY_FORMATS = { +const CUSTOM_DATE_FORMATS: NgxMatDateFormats = { parse: { - dateInput: 'LL', + dateInput: "YYYY-MMMM-DD HH:mm" }, display: { - dateInput: 'LL', - monthYearLabel: 'MMM YYYY', - dateA11yLabel: 'LL', - monthYearA11yLabel: 'MMMM YYYY', - }, -}; + dateInput: "DD MMM YYYY H:mm", + monthYearLabel: "MMM YYYY", + dateA11yLabel: "LL", + monthYearA11yLabel: "MMMM YYYY" + } +} @Component({ selector: 'app-new-event', @@ -45,13 +53,15 @@ export const MY_FORMATS = { // `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: DateAdapter, + // useClass: MomentDateAdapter, + // deps: [MAT_DATE_LOCALE, MAT_MOMENT_DATE_ADAPTER_OPTIONS] + // }, - {provide: MAT_DATE_FORMATS, useValue: MY_FORMATS}, + { provide: NGX_MAT_DATE_FORMATS, useValue: CUSTOM_DATE_FORMATS }, + // { provide: MAT_DATE_LOCALE, useValue: 'pt-br' }, + // { provide: LOCALE_ID, useValue: "en-GB" } ] }) @@ -61,6 +71,20 @@ export class NewEventPage implements OnInit { eventBody: EventBody; segment:string = "true"; + + public date: any; + public disabled = false; + public showSpinners = true; + public showSeconds = false; + public touchUi = false; + public enableMeridian = false; + public minDate: any; + public maxDate: any; + public stepHour = 1; + public stepMinute = 1; + public stepSecond = 1; + public color: ThemePalette = 'primary'; + @Input() profile:string; @Input() selectedSegment: string; @@ -80,12 +104,10 @@ export class NewEventPage implements OnInit { documents:SearchDocument[] = []; - minDate: string; + // minDate: string; loggeduser: User; - - date = new FormControl(moment()); - // serializedDate = new FormControl((new Date()).toISOString()); + @ViewChild('picker') picker: any; constructor( private modalController: ModalController, @@ -94,13 +116,17 @@ export class NewEventPage implements OnInit { private animationController: AnimationController, private toastService: ToastService, private userService: AuthService, - + private http: HttpClient, + private zone: NgZone, + private dateAdapter: DateAdapter ) { + this.dateAdapter.setLocale('pt'); this.loggeduser = userService.ValidatedUser; } ngOnInit() { + if(!this.restoreTemporaryData()){ // clear @@ -178,6 +204,61 @@ export class NewEventPage implements OnInit { this.setIntervenientCC.emit(this.taskParticipantsCc); } + + + this.date = new Date(2021,9,4,5,6,7); + } + + + public formGroup = new FormGroup({ + date: new FormControl(null, [Validators.required]), + date2: new FormControl(null, [Validators.required]) + }) + public dateControl = new FormControl(new Date(2021,9,4,5,6,7)); + public dateControlMinMax = new FormControl(new Date()); + + public options = [ + { value: true, label: 'True' }, + { value: false, label: 'False' } + ]; + + public listColors = ['primary', 'accent', 'warn']; + + public stepHours = [1, 2, 3, 4, 5]; + public stepMinutes = [1, 5, 10, 15, 20, 25]; + public stepSeconds = [1, 5, 10, 15, 20, 25]; + + toggleMinDate(evt: any) { + if (evt.checked) { + this._setMinDate(); + } else { + this.minDate = null; + } + } + + toggleMaxDate(evt: any) { + if (evt.checked) { + this._setMaxDate(); + } else { + this.maxDate = null; + } + } + + closePicker() { + this.picker.cancel(); + } + + private _setMinDate() { + const now = new Date(); + this.minDate = new Date(); + this.minDate.setDate(now.getDate() - 1); + } + + + private _setMaxDate() { + const now = new Date(); + this.maxDate = new Date(); + this.maxDate.setDate(now.getDate() + 1); } async getDoc(){ @@ -367,9 +448,4 @@ export class NewEventPage implements OnInit { window['temp.path:/home/agenda/new-event.component.ts'] = {} } - - - - - } diff --git a/src/app/shared/publication/view-publications/view-publications.page.scss b/src/app/shared/publication/view-publications/view-publications.page.scss index ae1a88f76..87435bd78 100644 --- a/src/app/shared/publication/view-publications/view-publications.page.scss +++ b/src/app/shared/publication/view-publications/view-publications.page.scss @@ -1,4 +1,11 @@ + :host{ + + ::-webkit-scrollbar { + width: 7px; + height: 7px; + } + background: transparent; padding: 0!important; } @@ -56,15 +63,12 @@ color:#000; } - .main-content{ - width: 100%; /* 400px */ - height: 100%; - font-family: Roboto; - margin: 0 auto; - background-color: #fff; - overflow:auto; - padding: 15px 20px 0 20px; + .main-container{ + width: 100%; + height: 100% !important; + overflow-y: auto; } + .content-top{ background: #f3f2f2; height: 20px; @@ -73,17 +77,6 @@ border-top-right-radius: 25px; transform: translate3d(0, 1px, 0); } - .content-container{ - width: 100%; - margin:0 auto; - border-top-left-radius: 25px; - border-top-right-radius: 25px; - background: #ffffff; - height: 100%; - box-shadow: 0px 0px 18px rgba(0, 0, 0, 0.6); - padding: 25px 0px 0 0px; - overflow: auto; - } .title-content{ margin: 0px auto; overflow: auto; diff --git a/src/global.scss b/src/global.scss index 9c118d5b2..8f33c6d9e 100644 --- a/src/global.scss +++ b/src/global.scss @@ -699,10 +699,10 @@ body, .blue-background{ background: #0782C9 !important;} @media only screen and (min-width: 1365px) { body{ - background: linear-gradient(270deg, #45BAFF 0%, #0782C9 23.44%, rgba(7, 130, 201, 0.9425) 78.13%, #45BAFF 100%); + background: linear-gradient(270deg, #45BAFF 0%, #0782C9 23.44%, rgba(7, 130, 201, 0.9425) 78.13%, #45BAFF 100%) !important; } .blue-background { - background: linear-gradient(270deg, #45BAFF 0%, #0782C9 23.44%, rgba(7, 130, 201, 0.9425) 78.13%, #45BAFF 100%); + background: linear-gradient(270deg, #45BAFF 0%, #0782C9 23.44%, rgba(7, 130, 201, 0.9425) 78.13%, #45BAFF 100%) !important; } }