Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Product Map): Add prices count and average to map #1009

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TTalex
Copy link
Collaborator

@TTalex TTalex commented Nov 3, 2024

What

  • In product details, when displaying prices as a map, adds count and average prices for each location
  • This new line appears in the popup when clicking on a map marker
  • This line is stored in a generic "info" parameter, to keep LeafletMap component reusable
  • The count and average matches the loaded prices (25 by default, more when scrolling)

Screenshot

map

Next Step

  • It's a bit odd to average organic and non-organic products. We should either display them in two lines, or wait for an "organic" filter.
  • Mixed unit (per kg / per unit) might also be an issue for some categories
  • Mixed currencies shouldn't be an issue, it's unlikely for shops to use more than one currency

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 3 changed files in this pull request and generated no suggestions.

Files not reviewed (1)
  • src/i18n/locales/en.json: Language not supported
Comments skipped due to low confidence (1)

src/views/ProductDetail.vue:243

  • The use of template literals with new lines might introduce unintended whitespace. Consider removing the new lines within the template literal.
location.info = `\n ${this.$t('Common.PriceCount', { count: priceLocationTotal.count })}. \n ${this.$t('Common.Average')}: ${utils.prettyPrice(priceLocationTotal.total / priceLocationTotal.count, priceLocationTotal.currency)}. \n `
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant