Compare commits

...

12 Commits

Author SHA1 Message Date
filipefurtad0
5d9bb9a8d5 Update all locales with the latest Transifex translations 2024-11-10 18:03:57 -06:00
Filipe
7b677796c1 Merge pull request #12797 from rioug/report-fix-supplier
Fix supplier loading on Product & inventory report
2024-11-10 18:03:20 -06:00
Gaetan Craig-Riou
9afd545897 Merge pull request #12959 from openfoodfoundation/dependabot/npm_and_yarn/jquery-ui-1.14.1
Bump jquery-ui from 1.14.0 to 1.14.1
2024-11-04 10:25:26 +11:00
Gaetan Craig-Riou
36f7063897 Merge pull request #12958 from openfoodfoundation/dependabot/npm_and_yarn/elliptic-6.6.0
Bump elliptic from 6.5.7 to 6.6.0
2024-11-04 10:00:23 +11:00
Gaetan Craig-Riou
a53a697e66 Merge pull request #12956 from openfoodfoundation/dependabot/npm_and_yarn/trix-2.1.8
Bump trix from 2.1.7 to 2.1.8
2024-11-04 09:58:42 +11:00
Gaetan Craig-Riou
e9349ce79d Merge pull request #12955 from openfoodfoundation/dependabot/npm_and_yarn/floating-ui/dom-1.6.12
Bump @floating-ui/dom from 1.6.11 to 1.6.12
2024-11-04 09:57:39 +11:00
dependabot[bot]
f01a33c545 Bump jquery-ui from 1.14.0 to 1.14.1
Bumps [jquery-ui](https://github.com/jquery/jquery-ui) from 1.14.0 to 1.14.1.
- [Release notes](https://github.com/jquery/jquery-ui/releases)
- [Commits](https://github.com/jquery/jquery-ui/compare/1.14.0...1.14.1)

---
updated-dependencies:
- dependency-name: jquery-ui
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-31 09:58:26 +00:00
dependabot[bot]
48c88d426e Bump elliptic from 6.5.7 to 6.6.0
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.7 to 6.6.0.
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.7...v6.6.0)

---
updated-dependencies:
- dependency-name: elliptic
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-31 02:16:59 +00:00
dependabot[bot]
f646a30dca Bump trix from 2.1.7 to 2.1.8
Bumps [trix](https://github.com/basecamp/trix) from 2.1.7 to 2.1.8.
- [Release notes](https://github.com/basecamp/trix/releases)
- [Commits](https://github.com/basecamp/trix/compare/v2.1.7...v2.1.8)

---
updated-dependencies:
- dependency-name: trix
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-30 09:47:49 +00:00
dependabot[bot]
1e21939963 Bump @floating-ui/dom from 1.6.11 to 1.6.12
Bumps [@floating-ui/dom](https://github.com/floating-ui/floating-ui/tree/HEAD/packages/dom) from 1.6.11 to 1.6.12.
- [Release notes](https://github.com/floating-ui/floating-ui/releases)
- [Changelog](https://github.com/floating-ui/floating-ui/blob/master/packages/dom/CHANGELOG.md)
- [Commits](https://github.com/floating-ui/floating-ui/commits/@floating-ui/dom@1.6.12/packages/dom)

---
updated-dependencies:
- dependency-name: "@floating-ui/dom"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-30 09:47:37 +00:00
Gaetan Craig-Riou
ef6e37e7ca Fix suppliers_of_products_distributed_by
Plus spec

Left over from product refactor, it was missed because it's not covered
by unit or integration test
2024-08-21 13:05:34 +10:00
Gaetan Craig-Riou
ffc2fed9b5 Remove unused code 2024-08-20 16:43:22 +10:00
7 changed files with 235 additions and 40 deletions

View File

@@ -53,6 +53,7 @@ en_IE:
primary_taxon: "Product Category"
shipping_category_id: "Shipping Category"
supplier: "Supplier"
variant_unit: "Unit Scale"
variant_unit_name: "Variant Unit Name"
unit_value: "Unit value"
spree/credit_card:
@@ -80,6 +81,8 @@ en_IE:
white_label_logo_link: "Link for the logo used in shopfront"
errors:
models:
enterprise_fee:
inherit_tax_requires_per_item_calculator: "Inheriting the tax category requires a per-item calculator."
spree/image:
attributes:
attachment:
@@ -104,6 +107,9 @@ en_IE:
count_on_hand:
using_producer_stock_settings_but_count_on_hand_set: "must be blank because using producer stock settings"
limited_stock_but_no_count_on_hand: "must be specified because forcing limited stock"
connected_apps:
vine:
api_request_error: "An error occured when connecting to Vine API"
messages:
confirmation: "doesn't match %{attribute}"
blank: "can't be blank"
@@ -193,6 +199,9 @@ en_IE:
transaction_not_allowed: "The card has been declined for an unknown reason."
try_again_later: "The card has been declined for an unknown reason."
withdrawal_count_limit_exceeded: "The customer has exceeded the balance or credit limit available on their card."
disconnect_failure: "Failed to disconnect Stripe."
success_code:
disconnected: "Stripe account disconnected."
activemodel:
errors:
messages:
@@ -218,10 +227,16 @@ en_IE:
not_available_to_shop: "is not available to %{shop}"
card_details: "Card details"
card_type: "Card type"
card_type_is: "Card type is"
unrecognized_card_type: "Unrecognized card type"
use_new_cc: "Use a new credit card"
what_is_this: "What is this?"
cardholder_name: "Cardholder name"
community_forum_url: "Community forum URL"
customer_instructions: "Customer instructions"
additional_information: "Additional Information"
connect_app:
url: "https://n8n.openfoodnetwork.org/webhook/regen/connect-enterprise"
devise:
passwords:
spree_user:
@@ -306,7 +321,34 @@ en_IE:
We will look into it but please let us know if the problem persists.
backorder_mailer:
backorder_failed:
subject: "An automatic backorder failed"
headline: "Backordering failed"
description: |
We tried to place or update a backorder for out-of-stock items but
something went wrong. You may have negative stock and need to resolve
the issue to order more stock in.
hints: |
You may need to go to the OIDC settings and reconnect your account.
Also check that your supplier's catalog hasn't changed and is still
supplying all products you need. And please get in touch with us if
you have any questions.
order: "Affected order: %{number}"
stock: "Stock"
product: "Product"
backorder_incomplete:
subject: "An automatic backorder failed to complete"
headline: "Your backorder is still a draft"
description: |
We tried to complete a backorder for out-of-stock items but
something went wrong. The backorder quantities may be too high if
you had cancellations. And your backorder won't be fulfilled while
it's in draft state.
hints: |
You may need to go to the OIDC settings and reconnect your account.
Also check that your supplier's catalog hasn't changed and is still
supplying all products you need. And please get in touch with us if
you have any questions.
affected: "%{enterprise}: %{order_cycle}"
enterprise_mailer:
confirmation_instructions:
subject: "Please confirm the email address for %{enterprise}"
@@ -518,6 +560,7 @@ en_IE:
unit_scale: Unit scale
unit: Unit
unit_value: Unit value
display_as: Display unit as
price: Price
producer: Producer
category: Category
@@ -544,10 +587,13 @@ en_IE:
clone: Clone
delete: Delete
remove: Remove
preview: Preview
image:
edit: Edit
product_preview:
product_preview: Product preview
shop_tab: Shop
product_details_tab: Product details
adjustments:
skipped_changing_canceled_order: "You can't change a cancelled order."
begins_at: Begins At
@@ -601,6 +647,7 @@ en_IE:
show_n_more: Show %{num} more
choose: "Choose..."
please_select: Please select...
column_save_as_default: Save as default
columns: Columns
actions: Actions
viewing: "Viewing: %{current_view_name}"
@@ -649,6 +696,7 @@ en_IE:
status: Status
ok: Ok
instance_secret_key: Instance Secret Key
instance_publishable_key: Instance Publishable Key
account_id: Account ID
business_name: Business Name
charges_enabled: Charges Enabled
@@ -664,6 +712,17 @@ en_IE:
info_html: "Matomo is a Web and Mobile Analytics application. You can either host Matomo on-premises or use a cloud-hosted service. See <a href='http://matomo.org' target='_blank'>matomo.org</a> for more information."
config_instructions_html: "Here you can configure the OFN Matomo integration. The Matomo URL below should point to the Matomo instance where the user tracking information will be sent to; if it is left empty, Matomo user tracking will be disabled. The Site ID field is not mandatory but useful if you are tracking more than one website on a single Matomo instance; it can be found on the Matomo instance console."
config_instructions_tag_manager_html: "Setting the Matomo Tag Manager URL enables Matomo Tag Manager. This tool allows you to set up analytics events. The Matomo Tag Manager URL is copied from the Install Code section of Matomo Tag Manager. Ensure you select the right container and environment as these options change the URL."
connected_app_settings:
edit:
title: "Connected app settings"
info_html: "Enabled apps will appear under Enterprise Settings > Connected Apps."
enabled_legend: "Enabled connected apps"
connected_apps_enabled:
discover_regen: Discover Regenerative portal
affiliate_sales_data: DFC anonymised orders API for research purposes
vine: Voucher Integration Engine (VINE)
update:
resource: Connected app settings
customers:
index:
new_customer: "New Customer"
@@ -688,6 +747,9 @@ en_IE:
balance_due: "Balance Due"
destroy:
has_associated_subscriptions: "Delete failed: This customer has active subscriptions. Cancel them first."
column_preferences:
bulk_update:
success: "Column preferences saved"
contents:
edit:
title: Content
@@ -701,6 +763,10 @@ en_IE:
your_content: Your content
user_guide: User Guide
map: Map
dfc_product_imports:
index:
title: "Importing a DFC product catalog"
imported_products: "Imported products:"
enterprise_fees:
index:
title: "Enterprise Fees"
@@ -754,6 +820,7 @@ en_IE:
variants:
infinity: "Infinity"
to_order_tip: "Items made to order do not have a set stock level, such as loaves of bread made fresh to order."
back_to_products_list: "Back To Products List"
editing_product: "Editing Product"
tabs:
product_details: "Product Details"
@@ -781,8 +848,10 @@ en_IE:
filters:
search_products: Search for products
search_for_producers: Search for producers
select_producer: Select producer
all_producers: All producers
search_for_categories: Search for categories
select_category: Select category
all_categories: All categories
producers:
label: Producers
@@ -791,6 +860,9 @@ en_IE:
search: Search
sort:
pagination:
products_total_html:
one: "<strong>%{count} product</strong> found for your search criteria. Showing %{from} to %{to}."
other: "<strong>%{count} products</strong> found for your search criteria. Showing %{from} to %{to}."
per_page:
show: Show
per_page: "%{num} per page"
@@ -824,9 +896,13 @@ en_IE:
error: Unable to delete the variant
variant_row:
none_tax_category: None
search_for_tax_categories: "Search for tax categories"
category_field_name: "Category"
tax_category_field_name: "Tax Category"
producer_field_name: "Producer"
clone:
success: Successfully cloned the product
error: Unable to clone the product
product_import:
title: Product Import
file_not_found: File not found or could not be opened
@@ -869,7 +945,9 @@ en_IE:
tax_categories: Tax Categories
shipping_categories: Shipping Categories
dfc_import_form:
title: "Import from DFC catalog"
enterprise: "Enterprise"
catalog_url: "DFC catalog URL"
import: "Import"
import:
review: Review
@@ -973,6 +1051,7 @@ en_IE:
edit:
order_sure_want_to: Are you sure you want to %{event} this order?
voucher_tax_included_in_price: "%{label} (tax included in voucher)"
tax_on_fees: "Tax on fees"
invoice_email_sent: 'Invoice email has been sent'
order_email_resent: 'Order email has been resent'
bulk_management:
@@ -1177,6 +1256,7 @@ en_IE:
open_date: "Open Date"
close_date: "Close Date"
display_ordering_in_shopfront: "Display ordering in shopfront:"
shopfront_sort_by_product: "By product"
shopfront_sort_by_category: "By category"
shopfront_sort_by_producer: "By producer"
shopfront_sort_by_category_placeholder: "Category"
@@ -1261,15 +1341,28 @@ en_IE:
connected_apps:
legend: "Connected apps"
affiliate_sales_data:
title: "INRAE / UFC QUE CHOISIR Research"
tagline: "Allow this research project to access your orders data anonymously"
enable: "Allow data sharing"
disable: "Stop sharing"
loading: "Loading"
need_to_be_manager: "Only managers can connect apps."
description_html: |
<p>
INRAE and UFC QUE CHOISIR are teaming up to study food prices in short food systems and compare them with prices in the supermarket, for a given set of products. The data that is used by INRAE is mixed with data coming from other short food chain platforms in France. No individual product prices will be publicly disclosed through this project.
</p>
<p>
<a href="https://apropos.coopcircuits.fr/"
target="_blank"><b>Learn more about this research project</b>
<i class="icon-external-link"></i></a>
</p>
discover_regen:
title: "Discover Regenerative"
tagline: "Allow Discover Regenerative to publish your enterprise information."
enable: "Allow data sharing"
disable: "Stop sharing"
loading: "Loading"
need_to_be_manager: "Only managers can connect apps."
note: |
Your Open Food Network account is connected to Discover Regenerative.
Add or update information on your Discover Regenerative listing here.
@@ -1287,8 +1380,25 @@ en_IE:
<i class="icon-external-link"></i></a>
</p>
vine:
title: "Voucher Integration Engine (VINE)"
tagline: "Allow redemption of VINE vouchers in your shopfront."
enable: "Resources"
disable: "Disconnect"
need_to_be_manager: "Only managers can connect apps."
vine_api_key: "VINE API Key"
vine_secret: "VINE secret"
description_html: |
<p>
To enable VINE for your enterprise, enter your API key and secret.
</p>
<p>
<a href="#" target="_blank"><b>VINE</b>
<i class="icon-external-link"></i></a>
</p>
api_parameters_empty: "Please enter an API key and a secret"
api_parameters_error: "Check you entered your API key and secret correctly, contact your instance manager if the error persists"
connection_error: "API connection error, please try again"
setup_error: "VINE API is not configured, please contact your instance manager"
actions:
edit_profile: Settings
properties: Properties
@@ -1341,8 +1451,10 @@ en_IE:
contact_name: Contact Name
edit:
editing: 'Settings:'
back_link: Back To Enterprises List
new:
title: New Enterprise
back_link: Back To Enterprises List
welcome:
welcome_title: Welcome to the Open Food Network!
welcome_text: You have successfully created a
@@ -1380,6 +1492,9 @@ en_IE:
re_notify_producers: Re notify producers
notify_producers_tip: This will send an email to each producer with the list of their orders.
date_time_warning_modal_content:
title: 'Orders are linked to this order cycle.'
content: 'If you wish to create a new order cycle, it is recommended to duplicate the order cycle first and then change the dates.'
proceed: 'Proceed anyway'
cancel: 'Cancel'
incoming:
incoming: "Incoming"
@@ -1580,6 +1695,9 @@ en_IE:
pack_by_customer: Pack By Customer
pack_by_supplier: Pack By Supplier
pack_by_product: Pack By Product
display:
report_is_big: "This report is big and may slow down your device."
display_anyway: "Display anyway"
download:
button: "Download Report"
show:
@@ -2490,6 +2608,7 @@ en_IE:
orders_bought_already_confirmed: "* already confirmed"
orders_confirm_cancel: "Are you sure you want to cancel this order?"
order_processed_successfully: "Your order has been processed successfully"
thank_you_for_your_order: "Thank you for your order"
products_cart_distributor_choice: "Distributor for your order:"
products_cart_distributor_change: "Your distributor for this order will be changed to %{name} if you add this product to your cart."
products_cart_distributor_is: "Your distributor for this order is %{name}."
@@ -3535,7 +3654,22 @@ en_IE:
Please refresh the page and try again, if it fails a second time,
please contact us for support.
trix:
bold: "Bold"
bullets: "Bullets"
code: "Code"
heading1: "Heading"
hr: "Horizontal rule"
indent: "Increase Level"
italic: "Italic"
link: "Link"
numbers: "Numbers"
outdent: "Decrease Level"
quote: "Quote"
redo: "Redo"
strike: "Strikethrough"
undo: "Undo"
unlink: "Unlink"
url: "URL"
urlPlaceholder: "Please enter a URL to insert"
inflections:
each:
@@ -3724,6 +3858,7 @@ en_IE:
editing_tax_category: "Editing tax category"
editing_tax_rate: "Editing tax rate"
editing_zone: "Editing zone"
editing_state: "Editing County"
expiration: "Expiration"
invalid_payment_provider: "Invalid payment provider"
items_cannot_be_shipped: "Items cannot be shipped"
@@ -3757,6 +3892,7 @@ en_IE:
resend: "Resend"
back_to_orders_list: "Back To Orders List"
back_to_payments_list: "Back To Payments List"
back_to_states_list: "Back to Counties List"
return_authorizations: "Return Authorisations"
cannot_create_returns: "Cannot create returns as this order has no shipped units."
select_stock: "Select stock"
@@ -3846,6 +3982,7 @@ en_IE:
tax_rate_amount_explanation: "Tax rates are a decimal amount to aid in calculations, (i.e. if the tax rate is 5% then enter 0.05)"
included_in_price: "Included in Price"
show_rate_in_label: "Show rate in label"
back_to_tax_rates_list: "Back To Tax Rates List"
tax_settings: "Tax Settings"
zones: "Zones"
new_zone: "New Zone"
@@ -3858,6 +3995,7 @@ en_IE:
iso_name: "ISO Name"
states_required: "Counties Required"
editing_country: "Editing Country"
back_to_countries_list: "Back To Countries List"
states: "Counties"
abbreviation: "Abbreviation"
new_state: "New County"
@@ -4022,6 +4160,7 @@ en_IE:
continue: "Continue"
new:
new_return_authorization: "New Return Authorisation"
back_to_return_authorizations_list: "Back to Return Authorisations List"
continue: "Continue"
edit:
receive: "receive"
@@ -4234,6 +4373,8 @@ en_IE:
new_product: "New Product"
supplier: "Supplier"
supplier_select_placeholder: "Select a supplier"
search_for_suppliers: "Search for suppliers"
search_for_units: "Search for units"
product_name: "Product Name"
units: "Unit Size"
value: "Value"
@@ -4350,8 +4491,18 @@ en_IE:
total: "Total"
billing_address_name: "Name"
taxons:
back_to_list: "Back To Product Categories List"
index:
title: "Product Categories"
new_taxon: 'New product category'
new:
title: "New Product Category"
edit:
title: "Edit Product Category"
destroy:
delete_taxon:
success: "Successfully deleted the product category"
error: "Unable to delete the product category due to assigned products."
form:
name: Name
meta_title: Meta Title

View File

@@ -993,7 +993,7 @@ hu:
add: Hozzáadás
hide: Elrejt
import_date: Importált
select_a_shop: Válaszd az árusítóhely lehetőséget
select_a_shop: Válassz Átvételi Pontot
review_now: Tekintsd át most
new_products_alert_message: '%{new_product_count} új termék áll rendelkezésre, amelyet hozzáadhat készletéhez.'
currently_empty: A leltár jelenleg üres
@@ -1502,7 +1502,7 @@ hu:
filters:
search_by_order_cycle_name: "Keresés a rendelési ciklus neve alapján..."
involving: "Bevonva"
any_enterprise: "Bármilyen szervezeti forma"
any_enterprise: "Bármilyen szervezet"
any_schedule: "Bármilyen ütemterv"
form:
general_settings: "Általános beállítások"
@@ -1528,8 +1528,8 @@ hu:
orders_close: A rendelések lezárulnak
row:
suppliers: beszállítók
distributors: elosztók
variants: változatai
distributors: elosztó
variants: változat
simple_form:
ready_for: Átvétel
ready_for_placeholder: Dátum idő
@@ -2287,9 +2287,9 @@ hu:
email_signoff: "Üdvözlettel,"
email_signature: "%{sitename} csapata"
email_confirm_customer_greeting: "Kedves %{name}!"
email_confirm_customer_intro_html: "Köszönjük a vásárlást! <strong>%{distributor}</strong>"
email_confirm_customer_intro_html: "Köszönjük a megrendelést! \n<strong>%{distributor}</strong>"
email_confirm_customer_number_html: "- Megrendelés visszaigazolás <strong>#%{number}</strong>"
email_confirm_customer_details_html: "Íme a megrendelésed részletei <strong>%{distributor}</strong>:"
email_confirm_customer_details_html: "<strong>%{distributor}</strong> átvételi ponton leadott megrendelés részletei: "
email_confirm_customer_signoff: "Üdvözlettel,"
email_confirm_shop_greeting: "Kedves %{name}!"
email_confirm_shop_order_html: "Köszönjük! Új megrendelésed van ezen az Átvételi Ponton: <strong>%{distributor}</strong>!"
@@ -2411,7 +2411,7 @@ hu:
products_updating_cart: "Kosár frissítése..."
products_cart_empty: "Kosár üres"
products_edit_cart: "Kosár szerkesztése"
products_from: elosztó
products_from: termelő
products_change: "Nincs mentendő módosítás."
products_update_error: "A mentés a következő hibá(k) miatt nem sikerült:"
products_update_error_msg: "A mentés nem sikerült."
@@ -2738,7 +2738,7 @@ hu:
finished:
headline: "Elkészült!"
thanks: "Köszönjük, hogy kitöltötted a %{enterprise} adatlapját."
login: "Bármikor módosíthatod vagy frissítheted vállalkozásod adatlapját, ha bejelentkezel az Open Food Network-be, és az Adminisztráció??? oldalra lépsz."
login: "Bármikor módosíthatod vagy frissítheted vállalkozásod adatlapját, ha bejelentkezel az Open Food Network-be, és az Adminisztráció felületre lépsz."
action: "Lépj a Vállalkozás Irányítópultjára"
back: "Vissza"
continue: "Tovább"
@@ -2873,7 +2873,7 @@ hu:
spree_admin_enterprises_shipping_methods: "Szállítási módok"
spree_admin_enterprises_fees: "Vállalkozási díjak"
spree_admin_enterprises_none_create_a_new_enterprise: "ÚJ VÁLLALKOZÁS LÉTREHOZÁSA"
spree_admin_enterprises_none_text: "Még nincsenek vállalkozásai"
spree_admin_enterprises_none_text: "Még nincsenek vállalkozásaid"
spree_admin_enterprises_tabs_hubs: "ÁTVÉTELI PONTOK"
spree_admin_enterprises_producers_manage_products: "TERMÉKEK KEZELÉSE"
spree_admin_enterprises_create_new_product: "ÚJ TERMÉK KÉSZÍTÉSE"
@@ -3217,7 +3217,7 @@ hu:
order_information: "Rendelési információ"
new_payment: "Új fizetés"
create_or_update_invoice: "Számla Létrehozása vagy Frissítése"
date_completed: "Teljesítés dátuma"
date_completed: "Megrendelés dátuma"
amount: "Összeg"
invoice_number: "A számla sorszáma"
invoice_file: "File"
@@ -3596,13 +3596,13 @@ hu:
indent: "Növelés"
italic: "Dőlt"
link: "Link"
outdent: "Szint csökkentése"
outdent: "Csökkentés"
redo: "Újra"
strike: "Áthúzás"
undo: "Visszavonás"
unlink: "Link feloldása"
url: "URL"
urlPlaceholder: "Kérünk, adj meg egy URL-t"
urlPlaceholder: "Kérünk, adj meg egy URL-t a beillesztéshez"
inflections:
each:
one: "mindegyik"
@@ -3709,7 +3709,7 @@ hu:
distributor: "Kimenő"
coordinator: "Koordinátor"
tax_category_name:
shipping_instance_rate: "Kézbesítői díj"
shipping_instance_rate: "Platform Rate"
formats:
csv:
header:
@@ -4192,7 +4192,7 @@ hu:
products:
products_tip: "A termékek, melyeket az Open Food hálózatán keresztül kínálsz"
active_products:
zero: "Nincsenek aktív termékei."
zero: "Nincsenek aktív termékeid."
one: "Egy aktív terméke van"
few: "%{count} aktív terméke van"
many: "%{count} aktív terméke van"
@@ -4503,7 +4503,7 @@ hu:
order_mailer:
cancel_email:
customer_greeting: "Kedves %{name}!"
instructions_html: "Megrendelésed a(z) <strong>%{distributor}</strong>-tól TÖRLÉSRE KERÜLT. Kérjük, őrizd meg ezt a törlési információt."
instructions_html: "<strong>%{distributor}</strong> átvételi ponton leadott megrendelésed TÖRLÉSRE KERÜLT. Kérjük, őrizd meg ezt a törlési információt."
dont_cancel: "Ha meggondoltad magad, vagy nem szeretnéd lemondani ezt a rendelést, ide írj: %{email}"
order_summary_canceled_html: "<strong>Megrendelés összegzése #%{number}[TÖRÖLVE] </strong>"
details: "Itt vannak a megrendelt termékek részletei:"

View File

@@ -21,8 +21,9 @@ module Reporting
end
def suppliers_of_products_distributed_by(distributors)
supplier_ids = Spree::Product.in_distributors(distributors.select('enterprises.id')).
select('spree_products.supplier_id')
supplier_ids = Spree::Variant.joins(exchange_variants: { exchange: :order_cycle }).
where(exchanges: { incoming: false, receiver: distributors } )
.select("spree_variants.supplier_id")
Enterprise.where(id: supplier_ids)
end

View File

@@ -60,11 +60,6 @@ module Reporting
private
def line_item_includes
[:bill_address, :adjustments,
{ line_items: { variant: { product: :supplier } } }]
end
def detail_rows_for_order(order, invoice_number, opts)
rows = []

View File

@@ -10,7 +10,7 @@
"pretty-quick": "pretty-quick"
},
"dependencies": {
"@floating-ui/dom": "^1.6.11",
"@floating-ui/dom": "^1.6.12",
"@hotwired/stimulus": "^3.2",
"@hotwired/turbo": "^8.0.12",
"@rails/webpacker": "5.4.4",
@@ -19,7 +19,7 @@
"flatpickr": "^4.6.9",
"foundation-sites": "^5.5.3",
"hotkeys-js": "^3.13.7",
"jquery-ui": "1.14.0",
"jquery-ui": "1.14.1",
"js-big-decimal": "^2.1.0",
"leaflet": "1.9.4",
"leaflet-geosearch": "4.0.0",
@@ -32,7 +32,7 @@
"stimulus-flatpickr": "^1.4.0",
"stimulus_reflex": "3.5.1",
"tom-select": "^2.3.1",
"trix": "^2.1.7",
"trix": "^2.1.8",
"turbo_power": "^0.7.0",
"webpack": "~4"
},

View File

@@ -0,0 +1,48 @@
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Reporting::FrontendData do
subject { described_class.new(user) }
let(:user) { create(:user, enterprises: [distributor1, distributor2]) }
let(:distributor1) { create(:distributor_enterprise) }
let(:distributor2) { create(:distributor_enterprise) }
let(:supplier1) { create(:supplier_enterprise) }
let(:supplier2) { create(:supplier_enterprise) }
let(:supplier3) { create(:supplier_enterprise) }
let(:product1) { create(:simple_product, name: "Product Supplier 1", supplier_id: supplier1.id) }
let(:product2) { create(:simple_product, name: "Product Supplier 2", supplier_id: supplier2.id) }
let(:product3) { create(:simple_product, name: "Product Supplier 3", supplier_id: supplier3.id) }
let(:order_cycle1) {
create(:simple_order_cycle, coordinator: distributor1,
distributors: [distributor1],
variants: [product1.variants.first, product2.variants.first])
}
let(:order_cycle2) {
create(:simple_order_cycle, coordinator: distributor2,
distributors: [distributor2],
variants: [product3.variants.first])
}
let!(:order1) {
create(:order, order_cycle: order_cycle1, distributor: distributor1)
}
let!(:order2) {
create(:order, order_cycle: order_cycle2, distributor: distributor2)
}
describe "#suppliers_of_products_distributed_by" do
it "returns supplier of products for the given distributors" do
distributors = Enterprise.where(id: [distributor1, distributor2])
expect(subject.suppliers_of_products_distributed_by(distributors)).to match_array(
[supplier1, supplier2, supplier3]
)
end
end
end

View File

@@ -1099,10 +1099,10 @@
dependencies:
"@floating-ui/utils" "^0.2.4"
"@floating-ui/dom@^1.6.11":
version "1.6.11"
resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.6.11.tgz#8631857838d34ee5712339eb7cbdfb8ad34da723"
integrity sha512-qkMCxSR24v2vGkhYDo/UzxfJN3D4syqSjyuTFz6C7XcpU1pASPRieNI0Kj5VP3/503mOfYiGY891ugBX1GlABQ==
"@floating-ui/dom@^1.6.12":
version "1.6.12"
resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.6.12.tgz#6333dcb5a8ead3b2bf82f33d6bc410e95f54e556"
integrity sha512-NP83c0HjokcGVEMeoStg317VD9W7eDlGK7457dMBANbKA6GJZdc7rjujdgqzTaz93jkGgc5P/jeWbaCHnMNc+w==
dependencies:
"@floating-ui/core" "^1.6.0"
"@floating-ui/utils" "^0.2.8"
@@ -3557,9 +3557,9 @@ electron-to-chromium@^1.4.284:
integrity sha512-XKGdI4pWM78eLH2cbXJHiBnWUwFSzZM7XujsB6stDiGu9AeSqziedP6amNLpJzE3i0rLTcfAwdCTs5ecP5yeSg==
elliptic@^6.5.3, elliptic@^6.5.4:
version "6.5.7"
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.7.tgz#8ec4da2cb2939926a1b9a73619d768207e647c8b"
integrity sha512-ESVCtTwiA+XhY3wyh24QqRGBoP3rEdDUl3EDUUo9tft074fi19IrdpH7hLCMMP3CIj7jb3W96rn8lt/BqIlt5Q==
version "6.6.0"
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.6.0.tgz#5919ec723286c1edf28685aa89261d4761afa210"
integrity sha512-dpwoQcLc/2WLQvJvLRHKZ+f9FgOdjnq11rurqwekGQygGPsYSK29OMMD2WalatiqQ+XGFDglTNixpPfI+lpaAA==
dependencies:
bn.js "^4.11.9"
brorand "^1.1.0"
@@ -5564,10 +5564,10 @@ jest@^27.4.7:
import-local "^3.0.2"
jest-cli "^27.5.1"
jquery-ui@1.14.0:
version "1.14.0"
resolved "https://registry.yarnpkg.com/jquery-ui/-/jquery-ui-1.14.0.tgz#b75d417826f0bab38125f907356d2e3313a9c6d5"
integrity sha512-mPfYKBoRCf0MzaT2cyW5i3IuZ7PfTITaasO5OFLAQxrHuI+ZxruPa+4/K1OMNT8oElLWGtIxc9aRbyw20BKr8g==
jquery-ui@1.14.1:
version "1.14.1"
resolved "https://registry.yarnpkg.com/jquery-ui/-/jquery-ui-1.14.1.tgz#ba342ea3ffff662b787595391f607d923313e040"
integrity sha512-DhzsYH8VeIvOaxwi+B/2BCsFFT5EGjShdzOcm5DssWjtcpGWIMsn66rJciDA6jBruzNiLf1q0KvwMoX1uGNvnQ==
dependencies:
jquery ">=1.12.0 <5.0.0"
@@ -8892,10 +8892,10 @@ tr46@^2.1.0:
dependencies:
punycode "^2.1.1"
trix@^2.1.7:
version "2.1.7"
resolved "https://registry.yarnpkg.com/trix/-/trix-2.1.7.tgz#239dc3fbba87ce30eea44286ea09865c7fbab10f"
integrity sha512-RyFmjLJfxP2nuAKqgVqJ40wk4qoYfDQtyi71q6ozkP+X4EOILe+j5ll5g/suvTyMx7BacGszNWzjnx9Vbj17sw==
trix@^2.1.8:
version "2.1.8"
resolved "https://registry.yarnpkg.com/trix/-/trix-2.1.8.tgz#b9383af8cd9c1a0a0818d6b4e0c9e771bf7fd564"
integrity sha512-y1h5mKQcjMsZDsUOqOgyIUfw+Z31u4Fe9JqXtKGUzIC7FM9cTpxZFFWxQggwXBo18ccIKYx1Fn9toVO5mCpn9g==
ts-pnp@^1.1.6:
version "1.2.0"