-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
337 additions
and
351 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
.create-form { | ||
margin: 0 auto; | ||
max-width: 1280px; | ||
width: 50%; | ||
} | ||
|
||
.form-simple .font-small { | ||
font-size: 0.8rem; } | ||
|
||
.form-simple .header { | ||
border-top-left-radius: .3rem; | ||
border-top-right-radius: .3rem; } | ||
|
||
.form-simple input[type=text]:focus:not([readonly]) { | ||
border-bottom: 1px solid #ff3547; | ||
-webkit-box-shadow: 0 1px 0 0 #ff3547; | ||
box-shadow: 0 1px 0 0 #ff3547; } | ||
|
||
.form-simple input[type=text]:focus:not([readonly]) + label { | ||
color: #4f4f4f; } | ||
|
||
.form-simple input[type=password]:focus:not([readonly]) { | ||
border-bottom: 1px solid #ff3547; | ||
-webkit-box-shadow: 0 1px 0 0 #ff3547; | ||
box-shadow: 0 1px 0 0 #ff3547; } | ||
|
||
.form-simple input[type=password]:focus:not([readonly]) + label { | ||
color: #4f4f4f; } | ||
|
110 changes: 110 additions & 0 deletions
110
src/app/scheduling/create/create-scheduling.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
<br><br><br> | ||
|
||
<p class="h1 text-center mb-6"> Criar Agendamento </p> | ||
|
||
<br> | ||
|
||
<div class="create-form"> | ||
<form #formScheduling="ngForm"> | ||
<div class="form-group"> | ||
|
||
<label for="local">Local:</label> | ||
<input | ||
type="text" | ||
class="form-control" | ||
id="local" | ||
name="local" | ||
[(ngModel)]="scheduling.local" | ||
#local="ngModel" | ||
minlength="3" | ||
required> | ||
<div *ngIf="local.errors && (local.dirty || local.touched)" class="alert alert-danger"> | ||
<div [hidden]="!local.errors.required"> | ||
Digite um local! | ||
</div> | ||
<div [hidden]="!local.errors.minlength"> | ||
Local deve conter ao menos 3 caracteres! | ||
</div> | ||
</div> | ||
|
||
<label for="members">Membros:</label> | ||
<input | ||
type="text" | ||
class="form-control" | ||
id="members" | ||
name="members" | ||
[(ngModel)]="scheduling.members" | ||
#members="ngModel" | ||
required> | ||
<div *ngIf="members.errors && (members.dirty || members.touched)" class="alert alert-danger"> | ||
<div [hidden]="!members.errors.required"> | ||
Digite o nome dos conselheiros participantes! | ||
</div> | ||
</div> | ||
|
||
<label for="date">Data:</label> | ||
<input | ||
type="date" | ||
class="form-control" | ||
id="date" | ||
name="date" | ||
[(ngModel)]="scheduling.date" | ||
#date="ngModel" | ||
required> | ||
<div *ngIf="date.errors && (date.dirty || date.touched)" class="alert alert-danger"> | ||
<div [hidden]="!date.errors.required"> | ||
Informe a data do agendamento! | ||
</div> | ||
</div> | ||
|
||
<label for="time">Hora:</label> | ||
<input | ||
type="time" | ||
class="form-control" | ||
id="time" | ||
name="time" | ||
[(ngModel)]="scheduling.time" | ||
#time="ngModel" | ||
required> | ||
<div *ngIf="time.errors && (time.dirty || time.touched)" class="alert alert-danger"> | ||
<div [hidden]="!time.errors.required"> | ||
Informe a hora do agendamento! | ||
</div> | ||
</div> | ||
|
||
<label for="type">Tipo:</label> | ||
<select | ||
|
||
id="type" | ||
name="type" | ||
[(ngModel)]="scheduling.type" | ||
#type="ngModel" | ||
required> | ||
|
||
<option value="" disabled selected>-----</option> | ||
<option value="Reunião">Reunião</option> | ||
<option value="Visita">Visita</option> | ||
</select> | ||
<div *ngIf="type.errors && (type.dirty || type.touched)" class="alert alert-danger"> | ||
<div [hidden]="!type.errors.required"> | ||
Seleciona a tipo do agendamento! | ||
</div> | ||
</div> | ||
</div> | ||
<div class="form-group text-center"> | ||
<input | ||
type="button" | ||
class="btn btn-deep-orange" | ||
(click)="newScheduling()" | ||
value="Agendar" | ||
[disabled]="!formScheduling.form.valid"> | ||
<a href="/agendamento" | ||
class="btn btn-outline-warning waves-effect"> | ||
<span class="glyphicon glyphicon-chevron-left" | ||
aria-hidden="false"></span>Voltar | ||
</a> | ||
</div> | ||
</form> | ||
</div> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { Scheduling } from './../../models/scheduling.model'; | ||
import { SchedulingService } from './../../services/scheduling.service'; | ||
import { Router } from '@angular/router'; | ||
import { Component, OnInit, ViewChild } from '@angular/core'; | ||
import { NgForm } from '@angular/forms'; | ||
|
||
@Component({ | ||
selector: 'app-create-scheduling', | ||
templateUrl: './create-scheduling.component.html', | ||
styleUrls: ['./create-scheduling.component.css'] | ||
}) | ||
export class CreateSchedulingComponent implements OnInit { | ||
|
||
@ViewChild('formScheduling') formScheduling: NgForm; | ||
scheduling: Scheduling; | ||
|
||
constructor( | ||
private schedulingService: SchedulingService, | ||
private router: Router){} | ||
|
||
ngOnInit(){ | ||
this.scheduling = new Scheduling(); | ||
} | ||
|
||
newScheduling(): void { | ||
if(this.formScheduling.form.valid){ | ||
this.schedulingService.newScheduling(this.scheduling); | ||
this.router.navigate(["/agendamento"]); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { Scheduling } from './../../models/scheduling.model'; | ||
import { SchedulingService } from './../../services/scheduling.service'; | ||
import { Router, ActivatedRoute } from '@angular/router'; | ||
import { Component, OnInit, ViewChild } from '@angular/core'; | ||
import { NgForm, ReactiveFormsModule } from '@angular/forms'; | ||
|
||
@Component({ | ||
selector: 'app-edit', | ||
templateUrl: './edit.component.html' | ||
}) | ||
export class EditComponent implements OnInit { | ||
|
||
|
||
@ViewChild('formScheduling') formScheduling: NgForm; | ||
scheduling: Scheduling; | ||
|
||
|
||
constructor(private schedulingService: SchedulingService, | ||
private route: ActivatedRoute, | ||
private router: Router) { } | ||
|
||
ngOnInit() { | ||
const id = +this.route.snapshot.params['id']; | ||
this.scheduling = this.schedulingService.searchSchedulingId(id); | ||
} | ||
update(): void{ | ||
if(this.formScheduling.form.valid){ | ||
this.schedulingService.updateScheduling(this.scheduling); | ||
this.router.navigate(['/agendamento']); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * from './../scheduling/scheduling-home/scheduling-home.component'; | ||
export * from './../scheduling/create/create-scheduling.component'; | ||
export * from './scheduling.module'; |
34 changes: 34 additions & 0 deletions
34
src/app/scheduling/scheduling-home/scheduling-home.component.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
.table { | ||
margin: 0 auto; | ||
max-width: 1280px; | ||
width: 70%; | ||
} | ||
|
||
table { | ||
table-layout: fixed; | ||
} | ||
|
||
td, | ||
th { | ||
width: 20px; | ||
word-wrap: break-word; | ||
border-radius: 0px; | ||
font-family: 'Oxygen', sans-serif; | ||
} | ||
|
||
h1 { | ||
font-family: 'Muli', sans-serif; | ||
margin: 0 auto; | ||
max-width: 1280px; | ||
width: 70%; | ||
} | ||
|
||
#header button { | ||
float: right; | ||
} | ||
|
||
.sidebar { | ||
display: inline; | ||
width: 14%; | ||
float: right; | ||
} |
Oops, something went wrong.