Skip to content

Commit

Permalink
feat: add modal alert on web about update income tax
Browse files Browse the repository at this point in the history
  • Loading branch information
heytorvas committed Jun 5, 2023
1 parent 338d184 commit 3733f1f
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 1 deletion.
1 change: 1 addition & 0 deletions web/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<app-modal></app-modal>
<app-header></app-header>
<router-outlet></router-outlet>
<app-footer></app-footer>
4 changes: 3 additions & 1 deletion web/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { ThirteenthComponent } from './pages/thirteenth/thirteenth.component';
import { AlertModalComponent } from './shared/alert-modal/alert-modal.component';
import { HourComponent } from './pages/hour/hour.component';
import { DigitOnlyModule } from '@uiowa/digit-only';
import { ModalComponent } from './components/modal/modal.component';

export const WebCurrencyMaskConfig: CurrencyMaskConfig = {
prefix: 'R$',
Expand All @@ -45,7 +46,8 @@ export const WebCurrencyMaskConfig: CurrencyMaskConfig = {
CltPjComponent,
ThirteenthComponent,
AlertModalComponent,
HourComponent
HourComponent,
ModalComponent

],
imports: [
Expand Down
17 changes: 17 additions & 0 deletions web/src/app/components/modal/modal.component.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.modal {
background: rgba(0, 0, 0, .5)
}

.modal-title {
color: var(--bs-primary);
text-align: center;
font-weight: bold;
}

.modal-body {
text-align: justify;
}

.btn-primary {
background-color: var(--bs-primary);
}
17 changes: 17 additions & 0 deletions web/src/app/components/modal/modal.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<button type="button" (click)="openModal()" style="display:none"></button>

<div class="modal" tabindex="-1" role="dialog" [ngStyle]="{'display':display}">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<h3 class="modal-title mt-3">AVISO</h3>
<div class="modal-body">
<p>Portal do Trabalhador está com os valores de base dos cálculos atualizados com a
Medida Provisória Nº 1171, publicada na data de 30/04/2023, relacionada a nova
tabela progressiva do Imposto de Renda.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" (click)="onCloseHandled()">Fechar</button>
</div>
</div>
</div>
</div>
28 changes: 28 additions & 0 deletions web/src/app/components/modal/modal.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-modal',
templateUrl: './modal.component.html',
styleUrls: ['./modal.component.css']
})
export class ModalComponent implements OnInit {

display = "none"

constructor() { }

ngOnInit(): void {
setTimeout(() => {
this.openModal()
}, 500)
}

openModal() {
this.display = "block";
}

onCloseHandled() {
this.display = "none";
}

}

1 comment on commit 3733f1f

@vercel
Copy link

@vercel vercel bot commented on 3733f1f Jun 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.