-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(search): implementa animaliaDS e externaliza para uso no portal
Implementa AnimaliaDS e externaliza para uso no portal Fixes DTHFUI-7501
- Loading branch information
Showing
12 changed files
with
1,243 additions
and
8 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
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
1 change: 1 addition & 0 deletions
1
...components/po-search/samples/sample-po-search-basic/sample-po-search-basic.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 @@ | ||
<po-search p-clean></po-search> |
7 changes: 7 additions & 0 deletions
7
...b/components/po-search/samples/sample-po-search-basic/sample-po-search-basic.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,7 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'sample-po-search-basic', | ||
templateUrl: './sample-po-search-basic.component.html' | ||
}) | ||
export class SamplePoSearchBasicComponent {} |
21 changes: 21 additions & 0 deletions
21
...o-search/samples/sample-po-search-find-people/sample-po-search-find-people.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,21 @@ | ||
<div class="po-row"> | ||
<po-search | ||
class="po-md-12" | ||
name="Po Search" | ||
p-tooltip="Pesquisar por name, nickname or email" | ||
[p-items]="items" | ||
[p-filter-keys]="filterKeys" | ||
(p-filter)="filtered($event)" | ||
(p-filtered-items-change)="filtered($event)" | ||
></po-search> | ||
</div> | ||
|
||
<hr /> | ||
|
||
<div class="po-row" *ngIf="(people.name && people.nickname && people.email) !== null"> | ||
<po-info class="po-md-4" p-label="Name" [p-value]="people.name"> </po-info> | ||
|
||
<po-info class="po-md-4" p-label="Nickname" [p-value]="people.nickname"> </po-info> | ||
|
||
<po-info class="po-md-4" p-label="Email" [p-value]="people.email"> </po-info> | ||
</div> |
31 changes: 31 additions & 0 deletions
31
.../po-search/samples/sample-po-search-find-people/sample-po-search-find-people.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,31 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { SamplePoSearchFindPeopleService } from './sample-po-search-find-people.service'; | ||
|
||
@Component({ | ||
selector: 'sample-po-search-find-people', | ||
templateUrl: './sample-po-search-find-people.component.html', | ||
providers: [SamplePoSearchFindPeopleService] | ||
}) | ||
export class SamplePoSearchFindPeopleComponent implements OnInit { | ||
people: any = {}; | ||
items: any; | ||
filterKeys: Array<string> = ['name', 'nickname', 'email']; | ||
|
||
constructor(private service: SamplePoSearchFindPeopleService) {} | ||
|
||
ngOnInit() { | ||
this.items = this.service.getItems(); | ||
} | ||
|
||
filtered(event: any) { | ||
try { | ||
this.people = { | ||
name: event[0]['name'], | ||
nickname: event[0]['nickname'], | ||
email: event[0]['email'] | ||
}; | ||
} catch (error) { | ||
return undefined; | ||
} | ||
} | ||
} |
Oops, something went wrong.