diff --git a/src/app/pages/participate/participate.component.css b/src/app/pages/participate/participate.component.css index e69de29b..2fe148f9 100644 --- a/src/app/pages/participate/participate.component.css +++ b/src/app/pages/participate/participate.component.css @@ -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; +} \ No newline at end of file diff --git a/src/app/pages/participate/participate.component.html b/src/app/pages/participate/participate.component.html index f11d5ea1..480da1f1 100644 --- a/src/app/pages/participate/participate.component.html +++ b/src/app/pages/participate/participate.component.html @@ -1 +1,9 @@ -

participate works!

+
+

+ Sugira uma pauta +

+

+ Solicite uma transmissão +

+
+ diff --git a/src/app/pages/suggest-agenda/suggest-agenda.component.css b/src/app/pages/suggest-agenda/suggest-agenda.component.css index db87a650..a1836637 100644 --- a/src/app/pages/suggest-agenda/suggest-agenda.component.css +++ b/src/app/pages/suggest-agenda/suggest-agenda.component.css @@ -63,4 +63,9 @@ span { .input:focus { outline: none !important; border: 0.25px solid #00A550; - } \ No newline at end of file +} + +.required-field { + outline: none !important; + border: 2px solid red; +} \ No newline at end of file diff --git a/src/app/pages/suggest-agenda/suggest-agenda.component.html b/src/app/pages/suggest-agenda/suggest-agenda.component.html index 32326691..92301de6 100644 --- a/src/app/pages/suggest-agenda/suggest-agenda.component.html +++ b/src/app/pages/suggest-agenda/suggest-agenda.component.html @@ -1,16 +1,16 @@
-
+

Sugestão de Pautas

- + - - + + -
- +
+
diff --git a/src/app/pages/suggest-agenda/suggest-agenda.component.ts b/src/app/pages/suggest-agenda/suggest-agenda.component.ts index 7d9b057f..53681cd1 100644 --- a/src/app/pages/suggest-agenda/suggest-agenda.component.ts +++ b/src/app/pages/suggest-agenda/suggest-agenda.component.ts @@ -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 = 'geraldovictor@outlook.com'; + const emailUnB = 'unbtv@unb.br'; emailData.recipients = [emailUnB]; this.emailService.sendEmail(emailData).subscribe((res: HttpResponse) => { 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; + } + }