Skip to content

Commit

Permalink
refactor(Stats page): add extra count by location & proof type (#967)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn authored Oct 19, 2024
1 parent 7d0ca91 commit 8eb9b63
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,10 @@
"Title": "Welcome to {name}!"
}
},
"LocationCard": {
"OSM": "OpenStreetMap",
"ONLINE": "Online"
},
"LocationDetail": {
"LatestPrices": "Latest prices",
"LoadMore": "Load more",
Expand Down Expand Up @@ -401,7 +405,8 @@
"Proof": "Proof",
"PRICE_TAG": "Price tag",
"RECEIPT": "Receipt",
"GDPR_REQUEST": "GDPR request"
"GDPR_REQUEST": "GDPR request",
"SHOP_IMPORT": "Shop import"
},
"ProofCreate": {
"SelectProof": "Select a proof",
Expand Down
11 changes: 10 additions & 1 deletion src/views/Stats.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@
<v-col cols="6" sm="4" md="3" lg="2">
<StatCard :value="stats.location_with_price_count" :subtitle="$t('Stats.Total')" />
</v-col>
<v-col cols="6" sm="4" md="3" lg="2">
<StatCard :value="stats.location_type_osm_count" :subtitle="$t('LocationCard.OSM')" />
</v-col>
<v-col cols="6" sm="4" md="3" lg="2">
<StatCard :value="stats.location_type_online_count" :subtitle="$t('LocationCard.ONLINE')" />
</v-col>
</v-row>

<br>
Expand All @@ -64,7 +70,10 @@
<StatCard :value="stats.proof_type_price_tag_count" :subtitle="$t('ProofCard.PRICE_TAG')" />
</v-col>
<v-col cols="6" sm="4" md="3" lg="2">
<StatCard :value="stats.proof_type_receipt_count" :subtitle="$t('ProofCard.RECEIPT')" />
<StatCard :value="stats.proof_type_gdpr_request_count" :subtitle="$t('ProofCard.GDPR_REQUEST')" />
</v-col>
<v-col cols="6" sm="4" md="3" lg="2">
<StatCard :value="stats.proof_type_shop_import_count" :subtitle="$t('ProofCard.SHOP_IMPORT')" />
</v-col>
</v-row>

Expand Down

0 comments on commit 8eb9b63

Please sign in to comment.