Skip to content

Commit

Permalink
refactor(price card): rename components for clarification (#664)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Jun 25, 2024
1 parent 01a50fa commit f81dfb3
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
8 changes: 4 additions & 4 deletions src/components/PriceFooterRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<v-row style="margin-top:0;">
<v-col :cols="userIsPriceOwner ? '11' : '12'">
<LocationChip v-if="!hidePriceLocation" class="mr-1" :location="price.location" :locationId="price.location_id" :readonly="readonly" />
<PriceOwnerChip class="mr-1" :price="price" :readonly="readonly" />
<UserChip class="mr-1" :username="price.owner" :readonly="readonly" />
<RelativeDateTimeChip class="mr-1" :dateTime="price.created" />
<PriceProof v-if="price.proof && !hidePriceProof" :proof="price.proof" />
<ProofChip v-if="price.proof && !hidePriceProof" :proof="price.proof" />
</v-col>
</v-row>

Expand All @@ -19,9 +19,9 @@ import { useAppStore } from '../store'
export default {
components: {
LocationChip: defineAsyncComponent(() => import('../components/LocationChip.vue')),
PriceOwnerChip: defineAsyncComponent(() => import('../components/PriceOwnerChip.vue')),
UserChip: defineAsyncComponent(() => import('../components/UserChip.vue')),
RelativeDateTimeChip: defineAsyncComponent(() => import('../components/RelativeDateTimeChip.vue')),
PriceProof: defineAsyncComponent(() => import('../components/PriceProof.vue')),
ProofChip: defineAsyncComponent(() => import('../components/ProofChip.vue')),
PriceActionMenuButton: defineAsyncComponent(() => import('../components/PriceActionMenuButton.vue')),
},
props: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ProofCard.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<v-card :id="'proof_' + proof.id" @click="selectProof">
<v-card-title v-if="!hideProofHeader">
{{ $t('ProofCard.Proof') }} <v-btn style="float:right;" variant="text" density="compact" icon="mdi-close" @click="close" />
{{ $t('Common.Proof') }} <v-btn style="float:right;" variant="text" density="compact" icon="mdi-close" @click="close" />
</v-card-title>

<v-divider v-if="!hideProofHeader" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
label
size="small"
density="comfortable"
:title="$t('PriceCard.Proof')"
:title="$t('Common.Proof')"
@click="openDialog"
>
<v-icon icon="mdi-image" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<template>
<v-chip label size="small" density="comfortable" @click="goToUser()">
<v-icon start icon="mdi-account" />
{{ price.owner }}
{{ username }}
</v-chip>
</template>

<script>
export default {
props: {
price: {
type: Object,
username: {
type: String,
default: null
},
readonly: {
Expand All @@ -22,7 +22,7 @@ export default {
if (this.readonly) {
return
}
this.$router.push({ path: `/users/${this.price.owner}` })
this.$router.push({ path: `/users/${this.username}` })
},
}
}
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
"AddPrice": "Add a price",
"AddToOFF": "Add to {name}",
"Brand": "Brand",
"Proof": "Proof",
"Country": "Country",
"Currency": "Currency",
"CurrencyMissing": "Currency missing",
Expand Down
2 changes: 1 addition & 1 deletion src/views/AddPriceSingle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
</h3>
<PriceInputRow :priceForm="addPriceSingleForm" :hideCurrencyChoice="true" @filled="pricePriceFormFilled = $event" />
<h3 class="mt-4 mb-1">
{{ $t('AddPriceSingle.PriceDetails.Proof') }}
{{ $t('Common.Proof') }}
</h3>
</v-card-text>
</v-card>
Expand Down

0 comments on commit f81dfb3

Please sign in to comment.