diff --git a/src/app/pages/agenda/agenda.page.ts b/src/app/pages/agenda/agenda.page.ts index dbddb6457..68e40a669 100644 --- a/src/app/pages/agenda/agenda.page.ts +++ b/src/app/pages/agenda/agenda.page.ts @@ -134,12 +134,11 @@ export class AgendaPage implements OnInit { }); this.myCal.update(); this.myCal.loadEvents(); + this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate); } }); - /* this.loading(); */ } - async loadRangeEvents(startTime: Date, endTime: Date){ this.showLoader = true; diff --git a/src/app/pages/cal-modal/cal-modal.page.html b/src/app/pages/cal-modal/cal-modal.page.html index 4b4bd2d82..0d8e4863f 100644 --- a/src/app/pages/cal-modal/cal-modal.page.html +++ b/src/app/pages/cal-modal/cal-modal.page.html @@ -13,42 +13,48 @@
- Assunto + Assunto * - + Campo obrigatório - + - Descrição + Descrição * - + Campo obrigatório - + - Localização + Localização * - + Campo obrigatório - + + - Selecione a Agenda + Selecione a Agenda * Pessoal Oficial - + Campo obrigatório - + + - Tipo de evento + Tipo de evento * Reunião Viagem @@ -57,11 +63,14 @@ - + Campo obrigatório - + + - Data Início + Data Início * - + - Data Fim + Data Fim * - +
diff --git a/src/app/pages/cal-modal/cal-modal.page.scss b/src/app/pages/cal-modal/cal-modal.page.scss index 204177c02..1fd02fb60 100644 --- a/src/app/pages/cal-modal/cal-modal.page.scss +++ b/src/app/pages/cal-modal/cal-modal.page.scss @@ -25,4 +25,7 @@ border: 1px solid red; width: 100%; float: left; -} */ \ No newline at end of file +} */ +.span-color{ + color:red; +} \ No newline at end of file diff --git a/src/app/pages/cal-modal/cal-modal.page.ts b/src/app/pages/cal-modal/cal-modal.page.ts index a42481611..113233d18 100644 --- a/src/app/pages/cal-modal/cal-modal.page.ts +++ b/src/app/pages/cal-modal/cal-modal.page.ts @@ -38,6 +38,11 @@ export class CalModalPage implements OnInit { ionicForm: FormGroup; isSubmitted = false; + formSubjectSatus: boolean = false; + formDescriptionSatus: boolean = false; + formLocationSatus: boolean = false; + formEventTypeSatus: boolean = false; + constructor(public formBuilder: FormBuilder, private modalCtrl: ModalController, private eventService: EventsService, private alertController:AlertService, private navParams: NavParams) { this.postEvent = new Event(); @@ -67,7 +72,7 @@ export class CalModalPage implements OnInit { CalendarName: this.selectedSegment, StartDate: selectedStartdDate, EndDate: new Date(selectedEndDate), - EventType: '', + EventType: 'Reunião', Attendees: null, IsMeeting: false, IsRecurring: false, @@ -85,10 +90,10 @@ export class CalModalPage implements OnInit { Body: this.eventBody, Location: '', CalendarId: '', - CalendarName: '', + CalendarName: 'Oficial', StartDate: selectedStartdDate, EndDate: new Date(selectedEndDate), - EventType: '', + EventType: 'Reunião', Attendees: null, IsMeeting: false, IsRecurring: false, @@ -126,6 +131,35 @@ export class CalModalPage implements OnInit { this.eventService.postEvent(this.postEvent, this.postEvent.CalendarName).subscribe(); this.modalCtrl.dismiss(this.postEvent); } + else{ + this.validateFormInputs(); + } + } + + validateFormInputs(){ + let formSubject = this.postEvent.Subject.trim(); + let formDescription = this.postEvent.Body.Text.trim(); + let formLocation = this.postEvent.Location.trim(); + + if (!this.postEvent.Subject && formSubject.length <= 0){ + this.formSubjectSatus=true; + } + else{ + this.formSubjectSatus=false; + if(!this.postEvent.Body.Text && formDescription.length <= 0){ + this.formDescriptionSatus=true; + } + else{ + this.formDescriptionSatus=false; + if (!this.postEvent.Location && formLocation.length <= 0){ + this.formLocationSatus=true; + } + else{ + this.formLocationSatus=false; + } + } + } + /* return (this.postEvent.Subject && formSubject.length > 0); */ } onViewTitleChanged(title){ @@ -142,8 +176,6 @@ export class CalModalPage implements OnInit { /* this.modalCtrl.dismiss(this.postEvent); */ } - - async addAttendees() { const modal = await this.modalCtrl.create({ @@ -206,8 +238,6 @@ export class CalModalPage implements OnInit { } }); } -example(){ - console.log("Mensagem"); -} + } diff --git a/src/app/pages/feed/feed-routing.module.ts b/src/app/pages/feed/feed-routing.module.ts deleted file mode 100644 index 6fd7a3d54..000000000 --- a/src/app/pages/feed/feed-routing.module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; - -import { FeedPage } from './feed.page'; - -const routes: Routes = [ - { - path: '', - component: FeedPage - } -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule], -}) -export class FeedPageRoutingModule {} diff --git a/src/app/pages/feed/feed.module.ts b/src/app/pages/feed/feed.module.ts deleted file mode 100644 index 1dfc32b9a..000000000 --- a/src/app/pages/feed/feed.module.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; - -import { IonicModule } from '@ionic/angular'; - -import { FeedPageRoutingModule } from './feed-routing.module'; - -import { FeedPage } from './feed.page'; -/* import { ComponentsModule } from 'src/app/components/components.module'; */ - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - IonicModule, - /* ComponentsModule, */ - FeedPageRoutingModule - ], - declarations: [FeedPage], - schemas: [CUSTOM_ELEMENTS_SCHEMA] -}) -export class FeedPageModule {} diff --git a/src/app/pages/feed/feed.page.html b/src/app/pages/feed/feed.page.html deleted file mode 100644 index 3d26ba9e7..000000000 --- a/src/app/pages/feed/feed.page.html +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - - - -
Presidente da República
-

GABINETE DIGITAL

-
-
- - -

{{greetting}} Sua Excelência
- Minístro Director do Gabinete do
- Presidente da República -

-

{{customDate}}

- -
-
-
- -
- -
- - - - - - Combinada - - - Oficial - - - Pessoal - - - - -
- - - - - -
-
-
- -
-
-

Reunião de Conselho de Ministros

-

08:30 - 10:30

-
-
-
-
- -
-
-

Luanda, Palácio presidencial

-
-
- -
-
-
-
- - -
-
-
- -
-
-

Conference call Particular

-

11:00 - 12:30

-
-
-
-
- -
-
-

Luanda, Palácio presidencial

-
-
- -
-
-
-
- -
-
-
- -
-
-

Conference call Particular

-

11:00 - 12:30

-
-
-
-
- -
-
-

Luanda, Palácio presidencial

-
-
- -
-
-
-
-
-
-
- - - - - - 8:00 am - - -
-
-
- -
-
-

Reunião de Conselho de Ministros

-

08:30 - 10:30

-
-
-
-
- -
-
-

Luanda, Palácio presidencial

-
-
- -
-
-
-
- -
-
-
- - - - - 9:00 am - - -
-
-
- -
-
-

Conference call Particular

-

11:00 - 12:30

-
-
-
-
- -
-
-

Luanda, Palácio presidencial

-
-
- -
-
-
-
-
-
-
-
-
diff --git a/src/app/pages/feed/feed.page.scss b/src/app/pages/feed/feed.page.scss deleted file mode 100644 index f4e10f61b..000000000 --- a/src/app/pages/feed/feed.page.scss +++ /dev/null @@ -1,136 +0,0 @@ - -/* HEADER */ -.ion-text-header-top{ - text-align: center; - padding-top: 20px; -} -.div-logo{ - width: 98px; -} -.div-logo img{ - width: 100%; -} -.header-large{ - font-family: Arial, Helvetica, sans-serif; - font-size: 16pt; - /* font-weight: 600; */ -} -.header-medium{ - font-size: 16pt; - font-family: roboto; -} -.header-xsmall{ - font-family: Arial, Helvetica, sans-serif; - font-size: 12.7pt; - font-weight: bold; - padding-bottom: 3.5px; - margin-bottom: 3.5px; - border-bottom: 1px solid #ccc; -} -.p-small{ - font-size: 12pt; - margin-top: 25px; - color:#000; -} - -/* CONTENT */ -.item-list-small{ - font-size: 14px; - overflow: auto; - } - .ion-item-class{ - padding: 0; - - } - .label-text{ - width: 100%; - padding: 0; - margin: 0; - } - - //DIV - .div-item{ - width: 100%; - overflow: auto; - border-bottom: 1px solid #ccc; - margin: 10px 0 5px 0; - } - .div-up{ - width: 100%; - overflow: auto; - } - .div-up h3{ - margin: 0; - padding: 0; - font-size: 17px; - width: 100%; - } - .div-icon{ - width: 10%; - font-size: 22px; - float: left; - color: #808080; - } - .div-icon ion-icon{ - display: block; - margin: 0 auto; - - } - .div-content-oficial{ - width: 85%; - float: left; - border-left: 3px solid #cab0dc; - padding: 0 0 0 12px; - } - .div-content-pessoal{ - width: 85%; - float: left; - border-left: 3px solid #cbeecb; - padding: 0 0 0 12px; - } - .div-content-oficial h3, .div-content-pessoal h3{ - font-size: 16pt; - /* border: 1px solid red; */ - } - .div-content-oficial p, .div-content-pessoal p{ - font-size: 14pt; - color: rgb(94, 92, 92); - padding: 0 !important; - margin: 0 !important; - } - .div-botton{ - width: 100%; - overflow: auto; - margin: 10px 0 5px 0; - } - .div-botton-left{ - width: 10%; - float: left; - } - .ion-icon-location{ - text-align: center; - display: block; - color: #000; - font-size: 16px; - margin: 0 auto; - } - .div-botton-middle{ - width: 75%; - float: left; - margin-top: 0.5px; - } - .div-botton-middle p{ - padding: 0; - margin: 0; - } - .div-botton-right{ - width: 10%; - float: left; - margin: 0; - padding: 0; - } - .ion-icon-attach{ - color: #666666; - font-size: 20px; - } - \ No newline at end of file diff --git a/src/app/pages/feed/feed.page.spec.ts b/src/app/pages/feed/feed.page.spec.ts deleted file mode 100644 index a6dba8cdb..000000000 --- a/src/app/pages/feed/feed.page.spec.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { IonicModule } from '@ionic/angular'; - -import { FeedPage } from './feed.page'; - -describe('FeedPage', () => { - let component: FeedPage; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ FeedPage ], - imports: [IonicModule.forRoot()] - }).compileComponents(); - - fixture = TestBed.createComponent(FeedPage); - component = fixture.componentInstance; - fixture.detectChanges(); - })); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/pages/feed/feed.page.ts b/src/app/pages/feed/feed.page.ts deleted file mode 100644 index 707318b96..000000000 --- a/src/app/pages/feed/feed.page.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-feed', - templateUrl: './feed.page.html', - styleUrls: ['./feed.page.scss'], -}) -export class FeedPage implements OnInit { - - /* Get current system date */ - today = new Date(); - months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"]; - days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"]; - customDate = this.days[this.today.getDay()]+ ", " - + this.today.getDate() +" de " - + ( this.months[this.today.getMonth()]); - /* Setting appropriate greeting according to the time */ - grettings = ["Bom dia", "Boa tarde", "Boa noite"]; - greetting=''; - /* hora - Dia 06 - 12:00 - Tarde 12:01 - 18:00 - Noite 18:00 - 06:00 - */ - timeDate = this.today.getHours() + ":" + this.today.getMinutes(); - showGreeting(){ - if(this.today.getHours() >= 6 && this.today.getHours() < 12){ - this.greetting = this.grettings[0]; - } - else if(this.today.getHours() >= 12 && this.today.getHours() < 18){ - this.greetting = this.grettings[1]; - } - else /* if(this.today.getHours() < 6 && this.today.getHours() >= 18) */{ - this.greetting = this.grettings[2]; - } - } - - segment:string; - - constructor() { } - - ngOnInit() { - //Inicializar segment - this.segment = "combinada"; - this.showGreeting(); - } - -} diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 05a0eecbd..dd2e51b11 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -6,7 +6,7 @@ export const environment = { production: false, apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/v2/api/', domain: 'gabinetedigital.local', - defaultuser: '', + defaultuser: 'paulo.pinto', defaultuserpwd: 'tabteste@006' };