Skip to content

Commit

Permalink
Minor: Fixing conflicts..
Browse files Browse the repository at this point in the history
  • Loading branch information
pAmanda committed Sep 27, 2017
2 parents c841239 + 3c08f17 commit 8028cd0
Show file tree
Hide file tree
Showing 24 changed files with 337 additions and 351 deletions.
3 changes: 1 addition & 2 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { HttpModule } from '@angular/http';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { Routes, RouterModule } from '@angular/router';
import { ChecklistModule } from './checklist/checklist.module';

import { AppComponent } from './app.component';
import { LayoutsComponent } from './layouts/layouts.component';
import { HomeComponent } from './home/home.component';
Expand All @@ -17,7 +16,7 @@ import { ChecklistoneComponent } from './checklist/checklistone/checklistone.com
import { ChecklistMenuComponent } from './checklist/checklistMenu/checklist-menu.component';
import { ChecklistthreeComponent } from './checklist/checklistthree/checklistthree.component';
import { LoginComponent } from './user';
import { TextMaskModule } from 'angular2-text-mask';
import { TextMaskModule } from 'angular2-text-mask';
import { ROUTES } from './app.routes';
import { BaseRequestOptions } from '@angular/http';
import { ChecklistMenuService } from './services/checklist-menu.service';
Expand Down
14 changes: 6 additions & 8 deletions src/app/app.routes.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { EditComponent } from './scheduling/edit/edit.component';
import { CreateSchedulingComponent } from './scheduling/create/create-scheduling.component';
import { Routes } from '@angular/router';
import { ChecklistMenuComponent } from './checklist/checklistMenu/checklist-menu.component';
import { HomeComponent } from './home/home.component';
import { ChecklistoneComponent } from './checklist/checklistone/checklistone.component';
import { ChecklistthreeComponent } from './checklist/checklistthree/checklistthree.component';
import { ChecklistComponent } from './checklist/checklist.component';
import { SchedulingVisitComponent, EditComponent } from './scheduling/shared';
import { SchedulingHomeComponent } from './scheduling/scheduling-home/scheduling-home.component';
import { SchedulingMeetingComponent } from './scheduling/scheduling-meeting/scheduling-meeting.component';
import { UserListComponent } from './user';
import { CreateUserComponent } from './user';
import { UserEditComponent } from './user';
Expand All @@ -15,16 +15,14 @@ import { LoginComponent } from './user';
export const ROUTES: Routes = [
{ path: '', redirectTo: '/home', pathMatch: 'full' },
{ path: 'home', component: HomeComponent },
{ path: 'agendamento/reuniao', component: SchedulingMeetingComponent },
{ path: 'agendamento', component: SchedulingHomeComponent },
{ path: 'checklist', component: ChecklistComponent },
{ path: 'checklist/1', component: ChecklistoneComponent},
{ path: 'checklist/menu', component: ChecklistMenuComponent},
{ path: 'checklist/3', component: ChecklistthreeComponent},
{ path: 'scheduling/visit', component: SchedulingVisitComponent},
{ path: 'schedulinghome', component: SchedulingHomeComponent},
{ path: 'schedulingmeeting', component: SchedulingMeetingComponent},
{ path: 'scheduling/visit/edit/:id', component: EditComponent },
{ path: 'login', component: LoginComponent },
{ path: 'agendamento', component: SchedulingHomeComponent },
{ path: 'agendamento/criar', component: CreateSchedulingComponent},
{ path: 'agendamento/editar/:id', component: EditComponent },
{ path: 'users', component: UserListComponent},
{ path: 'users/list', component: UserListComponent},
{ path: 'login', component: LoginComponent },
Expand Down
1 change: 0 additions & 1 deletion src/app/models/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export * from './user';
export * from './scheduling-meeting.model';
export * from './scheduling.model';
export * from './checklistForms';
export * from './checklistMenuForms';
Expand Down
9 changes: 0 additions & 9 deletions src/app/models/scheduling-meeting.model.ts

This file was deleted.

4 changes: 2 additions & 2 deletions src/app/models/scheduling.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export class Scheduling{
public local?: string,
public members?: string,
public date?: number,
public horaly?: number,
public type?: string,
public time?: number,
public type?: string
){}
}
29 changes: 29 additions & 0 deletions src/app/scheduling/create/create-scheduling.component.css
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 src/app/scheduling/create/create-scheduling.component.html
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>


31 changes: 31 additions & 0 deletions src/app/scheduling/create/create-scheduling.component.ts
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"]);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<br><br><br><br>
<div class="container">
<h1>Editar Visita</h1>
<h1>Editar Agendamento</h1>

<br>

<div class="well">
<form #formSchedulingVisit="ngForm">
<form #formScheduling="ngForm">
<div class="form-group">
<label for="local">Escola:</label>
<input type="text" class="form-control" id="local" name="local" [(ngModel)]="schedulingVisits.local" #local="ngModel" minlength="3" required>
<input type="text" class="form-control" id="local" name="local" [(ngModel)]="scheduling.local" #local="ngModel" minlength="3" required>

<label for="members">Membros:</label>
<input type="text" class="form-control" id="members" name="members" [(ngModel)]="schedulingVisits.members" #members="ngModel" required>
<input type="text" class="form-control" id="members" name="members" [(ngModel)]="scheduling.members" #members="ngModel" required>

<label for="date">Data:</label>
<input type="date" class="form-control" id="date" name="date" [(ngModel)]="schedulingVisits.date" #date="ngModel" required>
<input type="date" class="form-control" id="date" name="date" [(ngModel)]="scheduling.date" #date="ngModel" required>

<label for="time">Hora:</label>
<input type="time" class="form-control" id="time" name="time" [(ngModel)]="schedulingVisits.horaly" #time="ngModel" required>
<input type="time" class="form-control" id="time" name="time" [(ngModel)]="scheduling.time" #time="ngModel" required>

<div *ngIf="local.erros && (local.dirty || local.touched)" class="alert alert-danger">
<div [hidden]="local.errors.required">
Expand All @@ -29,8 +29,8 @@ <h1>Editar Visita</h1>
</div>
</div>
<div class="form-group text-center">
<input type="button" class="btn btn-deep-orange" (click)="update()" value="Atualizar" [disabled]="!formSchedulingVisit.form.valid">
<a href="/home" class="btn btn-outline-warning waves-effect">
<input type="button" class="btn btn-deep-orange" (click)="update()" value="Atualizar" [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>
Expand Down
33 changes: 33 additions & 0 deletions src/app/scheduling/edit/edit.component.ts
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']);
}
}

}
3 changes: 3 additions & 0 deletions src/app/scheduling/index.ts
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 src/app/scheduling/scheduling-home/scheduling-home.component.css
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;
}
Loading

0 comments on commit 8028cd0

Please sign in to comment.