mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
new inputs
This commit is contained in:
@@ -9,27 +9,22 @@ import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||
import { SearchDocument } from "src/app/models/search-document";
|
||||
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';
|
||||
|
||||
|
||||
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 {DateAdapter} from '@angular/material/core';
|
||||
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';
|
||||
|
||||
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||
|
||||
const moment = _rollupMoment || _moment;
|
||||
|
||||
@@ -50,18 +45,7 @@ const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
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: NGX_MAT_DATE_FORMATS, useValue: CUSTOM_DATE_FORMATS },
|
||||
// { provide: MAT_DATE_LOCALE, useValue: 'pt-br' },
|
||||
// { provide: LOCALE_ID, useValue: "en-GB" }
|
||||
]
|
||||
})
|
||||
|
||||
@@ -81,8 +65,8 @@ export class NewEventPage implements OnInit {
|
||||
public minDate: any;
|
||||
public maxDate: any;
|
||||
public stepHour = 1;
|
||||
public stepMinute = 1;
|
||||
public stepSecond = 1;
|
||||
public stepMinute = 5;
|
||||
public stepSecond = 5;
|
||||
public color: ThemePalette = 'primary';
|
||||
|
||||
|
||||
@@ -108,6 +92,8 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
loggeduser: User;
|
||||
@ViewChild('picker') picker: any;
|
||||
@ViewChild('fim') fim: any;
|
||||
// @ViewChild('inicio') inicio: any;
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
@@ -118,7 +104,8 @@ export class NewEventPage implements OnInit {
|
||||
private userService: AuthService,
|
||||
private http: HttpClient,
|
||||
private zone: NgZone,
|
||||
private dateAdapter: DateAdapter<any>
|
||||
private dateAdapter: DateAdapter<any>,
|
||||
// private translate: TranslateService
|
||||
) {
|
||||
this.dateAdapter.setLocale('pt');
|
||||
this.loggeduser = userService.ValidatedUser;
|
||||
@@ -248,6 +235,21 @@ export class NewEventPage implements OnInit {
|
||||
this.picker.cancel();
|
||||
}
|
||||
|
||||
openInicio() {
|
||||
let input: any = document.querySelector('#new-inicio')
|
||||
if(input) {
|
||||
console.log(input)
|
||||
input.click()
|
||||
}
|
||||
}
|
||||
|
||||
openFim() {
|
||||
let input: any = document.querySelector('#new-fim')
|
||||
if(input) {
|
||||
input.click()
|
||||
}
|
||||
}
|
||||
|
||||
private _setMinDate() {
|
||||
const now = new Date();
|
||||
this.minDate = new Date();
|
||||
@@ -448,4 +450,4 @@ export class NewEventPage implements OnInit {
|
||||
window['temp.path:/home/agenda/new-event.component.ts'] = {}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user