Skip to content

Commit 82f9e92

Browse files
author
Danilo Otavio Lima Salve
committed
style: formatacao de componentes
1 parent 948037a commit 82f9e92

6 files changed

Lines changed: 20 additions & 23 deletions

File tree

src/app/pages/resources-api/rick-and-morty/characters-list/characters-card/character-card/character-card.component.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,10 @@
1111
<div>
1212
@let status = item().status === 'Alive' ? 'positive' : item().status === 'Dead' ? 'negative' : 'disabled';
1313
<div style="display: flex; align-items: center; position: relative">
14-
<po-badge [p-status]="status" p-size="small" style="top: -10px;" />
14+
<po-badge [p-status]="status" p-size="small" style="top: -10px" />
1515
</div>
1616

17-
<p class="po-font-text-large po-xl-7 po-lg-7 po-md-7 po-sm-7">
18-
{{ item().status }} - {{ item().species }}
19-
</p>
17+
<p class="po-font-text-large po-xl-7 po-lg-7 po-md-7 po-sm-7">{{ item().status }} - {{ item().species }}</p>
2018
<po-tag [p-color]="getGenderColor(item().gender)" [p-value]="getGenderValue(item().gender)" />
2119
</div>
2220

src/app/pages/resources-api/rick-and-morty/characters-list/characters-card/character-card/character-card.component.ts

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ import { Character } from './../../../shared/interfaces/character-rick-and-morty
66
import { ZoomOnHoverDirective } from '../../../../../../shared/directives/zoom-on-hover.directive';
77

88
const GENDER_COLOR = {
9-
Female: 'color-06',
10-
Male: 'color-02',
11-
Genderless: 'color-08',
12-
unknown: 'color-07',
13-
}
9+
Female: 'color-06',
10+
Male: 'color-02',
11+
Genderless: 'color-08',
12+
unknown: 'color-07'
13+
};
1414

1515
const GENDER_VALUE = {
16-
Female: 'Feminino',
17-
Male: 'Masculino',
18-
Genderless: 'Sem gênero',
19-
unknown: 'Desconhecido',
20-
}
16+
Female: 'Feminino',
17+
Male: 'Masculino',
18+
Genderless: 'Sem gênero',
19+
unknown: 'Desconhecido'
20+
};
2121

2222
@Component({
2323
selector: 'app-character-card',
@@ -28,11 +28,10 @@ export class CharacterCardComponent {
2828
readonly item = input.required<Character>();
2929

3030
getGenderColor(gender: string): string {
31-
return GENDER_COLOR[gender as keyof typeof GENDER_COLOR]
31+
return GENDER_COLOR[gender as keyof typeof GENDER_COLOR];
3232
}
3333

3434
getGenderValue(gender: string): string {
35-
return GENDER_VALUE[gender as keyof typeof GENDER_VALUE]
35+
return GENDER_VALUE[gender as keyof typeof GENDER_VALUE];
3636
}
3737
}
38-

src/app/pages/resources-api/rick-and-morty/characters-list/characters-card/characters-card.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@if (items()) {
22
@for (item of items(); track item.id) {
3-
<app-character-card [item]="item"/>
3+
<app-character-card [item]="item" />
44
} @empty {
55
<p class="po-font-text-bold">Nenhum dado encontrado</p>
66
}

src/app/pages/resources-api/rick-and-morty/characters-list/characters-table/characters-table.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@if (items()) {
22
<po-table
3-
[p-items]="items()"
3+
[p-items]="items()"
44
[p-loading]="isLoading()"
55
[p-height]="height"
66
[p-columns]="columns"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { Routes } from "@angular/router";
1+
import { Routes } from '@angular/router';
22

33
export const RICK_AND_MORTY_ROUTES: Routes = [
44
{
55
path: '',
66
title: 'Rick & Morty | Lista de personagens',
77
loadComponent: () => import('./characters-list/characters-list.component').then(c => c.CharactersListComponent)
88
}
9-
]
9+
];

src/app/pages/resources-api/rick-and-morty/shared/service/character.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ export class CharacterService {
1212
private characters: Character[] = [];
1313

1414
readonly getCharacters: ResourceRef<Character[]> = resource({
15-
request: () => ({page: this.page(), name: this.name()}),
15+
request: () => ({ page: this.page(), name: this.name() }),
1616
loader: async ({ request, abortSignal }) => {
17-
const {page, name} = request;
17+
const { page, name } = request;
1818
try {
1919
let response = await (await fetch(`${this.apiUrl}/?page=${page}&name=${name}`, { signal: abortSignal })).json();
2020

0 commit comments

Comments
 (0)