-
Notifications
You must be signed in to change notification settings - Fork 10
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
1 parent
875f409
commit da6c9ce
Showing
5 changed files
with
65 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
.font-unb { | ||
font-size: 13px; | ||
font-family: "unb-pro", sans-serif; | ||
} | ||
|
||
.containner h1 { | ||
color: #0087C8; | ||
font-size: 13px; | ||
font-family: "unb-pro", sans-serif; | ||
font-style: normal; | ||
font-weight: 700; | ||
line-height: 12.35px; | ||
margin-left: 29px; | ||
margin-top: 45px; | ||
margin-bottom: 40px; | ||
text-align: start; | ||
} | ||
|
||
.containner { | ||
width: 360px; | ||
margin-left: auto; | ||
margin-right: auto; | ||
text-align: center; | ||
height: -300px; | ||
} |
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 |
---|---|---|
@@ -1 +1,9 @@ | ||
<p>participate works!</p> | ||
<div class="containner"> | ||
<h1 [routerLink]="['/suggestAgenda']"> | ||
Sugira uma pauta | ||
</h1> | ||
<h1> | ||
Solicite uma transmissão | ||
</h1> | ||
</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
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 |
---|---|---|
|
@@ -9,14 +9,17 @@ import { HttpResponse, HttpErrorResponse } from '@angular/common/http'; | |
templateUrl: './suggest-agenda.component.html', | ||
styleUrls: ['./suggest-agenda.component.css'] | ||
}) | ||
export class SuggestAgendaComponent implements OnInit{ | ||
export class SuggestAgendaComponent implements OnInit { | ||
|
||
suggestAgendaForm!: FormGroup; | ||
isDescricaoFilled = false; | ||
isResponsavelFilled = false; | ||
isTelefoneFilled = false; | ||
|
||
constructor( | ||
private fb: FormBuilder, | ||
private emailService: EmailService | ||
){} | ||
) { } | ||
|
||
ngOnInit(): void { | ||
this.suggestAgendaForm = this.fb.group({ | ||
|
@@ -28,10 +31,10 @@ export class SuggestAgendaComponent implements OnInit{ | |
telefoneResponsavel: ['', [Validators.required]], | ||
emailContato: [''], | ||
}, | ||
); | ||
); | ||
} | ||
|
||
sendSuggestAgenda(): void{ | ||
sendSuggestAgenda(): void { | ||
if (this.suggestAgendaForm.valid) { | ||
const emailData = new EmailData(); | ||
emailData.tema = this.suggestAgendaForm.value.tema; | ||
|
@@ -41,17 +44,23 @@ export class SuggestAgendaComponent implements OnInit{ | |
emailData.responsavel = this.suggestAgendaForm.value.responsavel; | ||
emailData.telefone_responsavel = this.suggestAgendaForm.value.telefoneResponsavel; | ||
emailData.email_contato = this.suggestAgendaForm.value.emailContato; | ||
const emailUnB = '[email protected]'; | ||
const emailUnB = '[email protected]'; | ||
emailData.recipients = [emailUnB]; | ||
this.emailService.sendEmail(emailData).subscribe((res: HttpResponse<string>) => { | ||
alert('Sugestão enviada com sucesso'); | ||
}, | ||
(error: HttpErrorResponse) => { | ||
alert('error: ' + error.message); | ||
}); | ||
}, | ||
(error: HttpErrorResponse) => { | ||
alert('error: ' + error.message); | ||
}); | ||
} else { | ||
alert('Preencha todos os campos corretamente!'); | ||
alert('Preencha os campos obrigatórios!'); | ||
} | ||
} | ||
|
||
onRequiredFieldsChange(): void { | ||
this.isDescricaoFilled = !!this.suggestAgendaForm.value.descricao; | ||
this.isResponsavelFilled = !!this.suggestAgendaForm.value.responsavel; | ||
this.isTelefoneFilled = !!this.suggestAgendaForm.value.telefoneResponsavel; | ||
} | ||
|
||
} |