Skip to content

Commit

Permalink
ISI-915 Refactoring SearchResultList
Browse files Browse the repository at this point in the history
  • Loading branch information
albrecht.schaenzel committed Oct 17, 2023
1 parent 0c15d52 commit 4e73ff2
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions frontend/src/components/search/SearchResultList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
outlined
class="my-1 mx-0 transition-swing"
:elevation="hover ? 4 : 0"
@click="routeToInfrastrukturabfrageForm(item)"
@click="routeToAbfrageForm(item)"
>
<v-card-subtitle class="black--text">
{{ castToAbfrageSearchResultDto(item).nameAbfrage }}
Expand All @@ -27,9 +27,7 @@
<v-spacer />
<span>
Status:
{{
getLookupValueInfrastrukturabfrage(castToAbfrageSearchResultDto(item).statusAbfrage, statusAbfrageList)
}}
{{ getLookupValueAbfrage(castToAbfrageSearchResultDto(item).statusAbfrage, statusAbfrageList) }}
</span>
<v-spacer />
<span> Frist: {{ datumFormatted(castToAbfrageSearchResultDto(item).fristStellungnahme) }} </span>
Expand Down Expand Up @@ -214,7 +212,7 @@ export default class SearchResultList extends Mixins(SearchApiRequestMixin) {
return searchResult as AbfrageSearchResultDto;
}
private routeToInfrastrukturabfrageForm(abfrageSearchResult: AbfrageSearchResultDto): void {
private routeToAbfrageForm(abfrageSearchResult: AbfrageSearchResultDto): void {
if (!_.isUndefined(abfrageSearchResult.id)) {
router.push({
name: "updateabfrage",
Expand All @@ -223,7 +221,7 @@ export default class SearchResultList extends Mixins(SearchApiRequestMixin) {
}
}
private getLookupValueInfrastrukturabfrage(key: string, list: Array<LookupEntryDto>): string | undefined {
private getLookupValueAbfrage(key: string, list: Array<LookupEntryDto>): string | undefined {
return !_.isUndefined(list) ? list.find((lookupEntry: LookupEntryDto) => lookupEntry.key === key)?.value : "";
}
Expand Down

0 comments on commit 4e73ff2

Please sign in to comment.