-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #375 from SharebookBR/develop
devlop to master
- Loading branch information
Showing
28 changed files
with
684 additions
and
134 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
33 changes: 33 additions & 0 deletions
33
src/app/components/dialog-who-accessed/dialog-who-accessed.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,33 @@ | ||
|
||
::ng-deep.cdk-overlay-pane{ | ||
width: 80%; | ||
padding-top: 100px; | ||
|
||
} | ||
::ng-deep.mat-dialog-container,::ng-deep.mat-dialog-content{ | ||
display:flex; | ||
justify-content: center; | ||
width:100%; | ||
padding:20px; | ||
} | ||
::ng-deep.mat-table{ | ||
width:100%; | ||
} | ||
::ng-deep .container{ | ||
width:100%; | ||
|
||
} | ||
|
||
::ng-deep.mat-dialog-actions{ | ||
min-height: 30px; | ||
} | ||
::ng-deep.mat-dialog-title{ | ||
margin:0; | ||
} | ||
.button-close{ | ||
border:none; | ||
outline: none; | ||
background-color: #00B0E5; | ||
color:#fff; | ||
box-shadow: 2px 2px 2px #ccc; | ||
} |
41 changes: 41 additions & 0 deletions
41
src/app/components/dialog-who-accessed/dialog-who-accessed.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,41 @@ | ||
<h1 mat-dialog-title>Quem Acessou Meus Dados? </h1> | ||
<div mat-dialog-content> | ||
<div class="container mat-elevation-z8"> | ||
<div class="table-container"> | ||
|
||
<table mat-table [dataSource]="who" class="table" | ||
matSort matSortActive="created" matSortDisableClear matSortDirection="desc" aria-label="tableWhoaccessed"> | ||
<!-- Number Column --> | ||
<ng-container matColumnDef="Data"> | ||
<th id="data"mat-header-cell *matHeaderCellDef>Data</th> | ||
<td mat-cell *matCellDef="let row">{{row.date | date: 'dd/MM/yyyy'}} </td> | ||
</ng-container> | ||
|
||
<!-- Title Column --> | ||
<ng-container matColumnDef="Hora"> | ||
<th id="hora"mat-header-cell *matHeaderCellDef>Hora</th> | ||
<td mat-cell *matCellDef="let row">{{row.time}}</td> | ||
</ng-container> | ||
|
||
<!-- State Column --> | ||
<ng-container matColumnDef="Usuário"> | ||
<th id="user"mat-header-cell *matHeaderCellDef>Usuário</th> | ||
<td mat-cell *matCellDef="let row">{{row.name}}</td> | ||
</ng-container> | ||
<!-- State Column --> | ||
<ng-container matColumnDef="Perfil"> | ||
<th id="perfil"mat-header-cell *matHeaderCellDef>Perfil</th> | ||
<td mat-cell *matCellDef="let row">{{row.profile}}</td> | ||
</ng-container> | ||
|
||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> | ||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr> | ||
</table> | ||
</div> | ||
|
||
<mat-paginator [length]="resultsLength" [pageSize]="30" aria-label="Select pages of response"></mat-paginator> | ||
</div> | ||
</div> | ||
<div mat-dialog-actions> | ||
<button mat-button mat-dialog-close color="primary" class="button-close">Close</button> | ||
</div> |
25 changes: 25 additions & 0 deletions
25
src/app/components/dialog-who-accessed/dialog-who-accessed.component.spec.ts
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 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { DialogWHoAccessedComponent } from './dialog-who-accessed.component'; | ||
|
||
describe('DialogWHoAccessedComponent', () => { | ||
let component: DialogWHoAccessedComponent; | ||
let fixture: ComponentFixture<DialogWHoAccessedComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ DialogWHoAccessedComponent ] | ||
}) | ||
.compileComponents(); | ||
}); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(DialogWHoAccessedComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
35 changes: 35 additions & 0 deletions
35
src/app/components/dialog-who-accessed/dialog-who-accessed.component.ts
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,35 @@ | ||
import { MAT_DIALOG_DATA } from '@angular/material/dialog'; | ||
import { Component, OnInit, Inject } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-dialog-who-accessed', | ||
templateUrl: './dialog-who-accessed.component.html', | ||
styleUrls: ['./dialog-who-accessed.component.css'], | ||
}) | ||
export class DialogWHoAccessedComponent implements OnInit { | ||
who: any = [{}]; | ||
|
||
displayedColumns: string[] = ['Data', 'Hora', 'Usuário', 'Perfil']; | ||
resultsLength = 0; | ||
|
||
constructor(@Inject(MAT_DIALOG_DATA) public data) {} | ||
|
||
ngOnInit(): void { | ||
this.formatData(this.data); | ||
} | ||
|
||
formatData(data) { | ||
this.who.pop(); | ||
for (const item of data) { | ||
this.who.push({ | ||
date: item.visitingDay.substring(10, 0), | ||
time: item.visitingDay.substring(11, 19), | ||
name: item.visitorName, | ||
profile: item.profile | ||
.replace('Donor', 'Doador') | ||
.replace('Undefined', 'Não Definido') | ||
.replace('Winner', 'Ganhador'), | ||
}); | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
p { | ||
text-align: justify; | ||
} | ||
|
||
.flex-container { | ||
display: flex; | ||
flex-wrap: wrap; | ||
} | ||
|
||
.flex-container .card { | ||
margin: 6px; | ||
} | ||
|
||
.card { | ||
width: 200px; | ||
} | ||
|
||
.card-text { | ||
text-align: left; | ||
} | ||
|
||
.panel-item { | ||
width: 50%; | ||
margin-top: 20px; | ||
} | ||
::ng-deep.cdk-overlay-container, ::ng-deep.cdk-global-overlay-wrapper{ | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
::ng-deep app-dialog-who-accessed.ng-star-inserted { | ||
width: 90%!important; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
|
||
} | ||
::ng-deep.cdk-overlay-pane{ | ||
margin-top:10px; | ||
height: 93vh; | ||
} |
Oops, something went wrong.