mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Compare commits
49 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0bdee785bb | ||
|
|
1029b61bb0 | ||
|
|
065e7a420b | ||
|
|
fe4b6accb0 | ||
|
|
b3314d7441 | ||
|
|
77121dfacf | ||
|
|
04323388ad | ||
|
|
700be792e5 | ||
|
|
9f2ece379a | ||
|
|
2662371507 | ||
|
|
24fc3e9e86 | ||
|
|
b064173b7a | ||
|
|
f95581cd1f | ||
|
|
93d73f4763 | ||
|
|
154d17969c | ||
|
|
e32dcd53b5 | ||
|
|
44c4a66970 | ||
|
|
d05834b896 | ||
|
|
854e136d09 | ||
|
|
7f3fc4ff91 | ||
|
|
62ae62db5a | ||
|
|
a6fc49abce | ||
|
|
528c5a3593 | ||
|
|
81165cd82b | ||
|
|
faf50a1922 | ||
|
|
5f237adda2 | ||
|
|
2e09a96c4b | ||
|
|
82139a9ac0 | ||
|
|
6d9946c3c6 | ||
|
|
f58b6bcada | ||
|
|
dc13ef4162 | ||
|
|
dcb48272f5 | ||
|
|
08bc374576 | ||
|
|
afbf0a5d0e | ||
|
|
7e034a3037 | ||
|
|
74d2a94181 | ||
|
|
7a5b273e71 | ||
|
|
0b6e7593db | ||
|
|
6d0d91c56a | ||
|
|
a509d49ec6 | ||
|
|
fbce264dd7 | ||
|
|
3c1313bfa0 | ||
|
|
4ca420bd84 | ||
|
|
134ea28249 | ||
|
|
78cfc0db65 | ||
|
|
816e06d37c | ||
|
|
2e80b7d92f | ||
|
|
753173e2be | ||
|
|
c9954f0823 |
2
Gemfile
2
Gemfile
@@ -1,6 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
source 'https://rubygems.org'
|
||||
source 'https://gem.coop'
|
||||
git_source(:github) { |repo_name| "https://github.com/#{repo_name}.git" }
|
||||
|
||||
ruby File.read('.ruby-version').chomp
|
||||
|
||||
99
Gemfile.lock
99
Gemfile.lock
@@ -46,7 +46,7 @@ PATH
|
||||
web (0.0.1)
|
||||
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
remote: https://gem.coop/
|
||||
specs:
|
||||
Ascii85 (2.0.1)
|
||||
actioncable (7.1.6)
|
||||
@@ -175,21 +175,24 @@ GEM
|
||||
activerecord (>= 3.1.0)
|
||||
ast (2.4.3)
|
||||
attr_required (1.0.2)
|
||||
aws-eventstream (1.3.0)
|
||||
aws-partitions (1.929.0)
|
||||
aws-sdk-core (3.196.1)
|
||||
aws-eventstream (1.4.0)
|
||||
aws-partitions (1.1186.0)
|
||||
aws-sdk-core (3.239.0)
|
||||
aws-eventstream (~> 1, >= 1.3.0)
|
||||
aws-partitions (~> 1, >= 1.651.0)
|
||||
aws-sigv4 (~> 1.8)
|
||||
aws-partitions (~> 1, >= 1.992.0)
|
||||
aws-sigv4 (~> 1.9)
|
||||
base64
|
||||
bigdecimal
|
||||
jmespath (~> 1, >= 1.6.1)
|
||||
aws-sdk-kms (1.81.0)
|
||||
aws-sdk-core (~> 3, >= 3.193.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
aws-sdk-s3 (1.151.0)
|
||||
aws-sdk-core (~> 3, >= 3.194.0)
|
||||
logger
|
||||
aws-sdk-kms (1.117.0)
|
||||
aws-sdk-core (~> 3, >= 3.234.0)
|
||||
aws-sigv4 (~> 1.5)
|
||||
aws-sdk-s3 (1.205.0)
|
||||
aws-sdk-core (~> 3, >= 3.234.0)
|
||||
aws-sdk-kms (~> 1)
|
||||
aws-sigv4 (~> 1.8)
|
||||
aws-sigv4 (1.8.0)
|
||||
aws-sigv4 (~> 1.5)
|
||||
aws-sigv4 (1.12.1)
|
||||
aws-eventstream (~> 1, >= 1.0.2)
|
||||
base64 (0.3.0)
|
||||
bcp47_spec (0.2.1)
|
||||
@@ -242,11 +245,11 @@ GEM
|
||||
coffee-script-source
|
||||
execjs
|
||||
coffee-script-source (1.12.2)
|
||||
combine_pdf (1.0.26)
|
||||
combine_pdf (1.0.31)
|
||||
matrix
|
||||
ruby-rc4 (>= 0.1.5)
|
||||
concurrent-ruby (1.3.5)
|
||||
connection_pool (2.5.4)
|
||||
connection_pool (2.5.5)
|
||||
cookiejar (0.3.4)
|
||||
crack (1.0.0)
|
||||
bigdecimal
|
||||
@@ -258,16 +261,16 @@ GEM
|
||||
cuprite (0.15)
|
||||
capybara (~> 3.0)
|
||||
ferrum (~> 0.14.0)
|
||||
database_cleaner (2.0.2)
|
||||
database_cleaner (2.1.0)
|
||||
database_cleaner-active_record (>= 2, < 3)
|
||||
database_cleaner-active_record (2.1.0)
|
||||
database_cleaner-active_record (2.2.2)
|
||||
activerecord (>= 5.a)
|
||||
database_cleaner-core (~> 2.0.0)
|
||||
database_cleaner-core (~> 2.0)
|
||||
database_cleaner-core (2.0.1)
|
||||
datafoodconsortium-connector (1.1.0)
|
||||
datafoodconsortium-connector (1.2.0)
|
||||
virtual_assembly-semantizer (~> 1.0, >= 1.0.5)
|
||||
date (3.5.0)
|
||||
debug (1.9.2)
|
||||
debug (1.11.0)
|
||||
irb (~> 1.10)
|
||||
reline (>= 0.3.8)
|
||||
devise (4.9.4)
|
||||
@@ -286,7 +289,7 @@ GEM
|
||||
diff-lcs (1.6.2)
|
||||
digest (3.2.1)
|
||||
docile (1.4.1)
|
||||
dotenv (3.1.2)
|
||||
dotenv (3.1.8)
|
||||
drb (2.2.3)
|
||||
em-http-request (1.1.7)
|
||||
addressable (>= 2.3.4)
|
||||
@@ -326,12 +329,12 @@ GEM
|
||||
webrick (~> 1.7)
|
||||
websocket-driver (>= 0.6, < 0.8)
|
||||
ffaker (2.23.0)
|
||||
ffi (1.16.3)
|
||||
ffi (1.17.2)
|
||||
flipper (1.3.6)
|
||||
concurrent-ruby (< 2)
|
||||
flipper-active_record (1.3.0)
|
||||
activerecord (>= 4.2, < 8)
|
||||
flipper (~> 1.3.0)
|
||||
flipper-active_record (1.3.6)
|
||||
activerecord (>= 4.2, < 9)
|
||||
flipper (~> 1.3.6)
|
||||
flipper-ui (1.3.6)
|
||||
erubi (>= 1.0.0, < 2.0.0)
|
||||
flipper (~> 1.3.6)
|
||||
@@ -385,7 +388,7 @@ GEM
|
||||
hashery (2.1.2)
|
||||
hashie (5.0.0)
|
||||
highline (2.0.3)
|
||||
htmlentities (4.3.4)
|
||||
htmlentities (4.4.2)
|
||||
http_parser.rb (0.8.0)
|
||||
i18n (1.14.7)
|
||||
concurrent-ruby (~> 1.0)
|
||||
@@ -402,8 +405,8 @@ GEM
|
||||
rainbow (>= 2.2.2, < 4.0)
|
||||
ruby-progressbar (~> 1.8, >= 1.8.1)
|
||||
terminal-table (>= 1.5.1)
|
||||
image_processing (1.12.2)
|
||||
mini_magick (>= 4.9.5, < 5)
|
||||
image_processing (1.14.0)
|
||||
mini_magick (>= 4.9.5, < 6)
|
||||
ruby-vips (>= 2.0.17, < 3)
|
||||
imagen (0.2.0)
|
||||
parser (>= 2.5, != 2.5.1.1)
|
||||
@@ -474,7 +477,7 @@ GEM
|
||||
net-pop
|
||||
net-smtp
|
||||
marcel (1.1.0)
|
||||
matrix (0.4.2)
|
||||
matrix (0.4.3)
|
||||
method_source (1.1.0)
|
||||
mime-types (3.7.0)
|
||||
logger
|
||||
@@ -483,7 +486,8 @@ GEM
|
||||
mimemagic (0.4.3)
|
||||
nokogiri (~> 1)
|
||||
rake
|
||||
mini_magick (4.13.2)
|
||||
mini_magick (5.3.1)
|
||||
logger
|
||||
mini_mime (1.1.5)
|
||||
mini_portile2 (2.8.6)
|
||||
minitest (5.26.2)
|
||||
@@ -546,7 +550,7 @@ GEM
|
||||
webfinger (~> 2.0)
|
||||
orm_adapter (0.5.0)
|
||||
ostruct (0.6.1)
|
||||
pagy (9.3.4)
|
||||
pagy (9.4.0)
|
||||
paper_trail (17.0.0)
|
||||
activerecord (>= 7.1)
|
||||
request_store (~> 1.4)
|
||||
@@ -671,14 +675,19 @@ GEM
|
||||
rb-fsevent (0.11.2)
|
||||
rb-inotify (0.10.1)
|
||||
ffi (~> 1.0)
|
||||
rdf (3.3.2)
|
||||
rdf (3.3.4)
|
||||
bcp47_spec (~> 0.2)
|
||||
bigdecimal (~> 3.1, >= 3.1.5)
|
||||
link_header (~> 0.0, >= 0.0.8)
|
||||
rdoc (6.15.1)
|
||||
logger (~> 1.5)
|
||||
ostruct (~> 0.6)
|
||||
readline (~> 0.0)
|
||||
rdoc (6.16.0)
|
||||
erb
|
||||
psych (>= 4.0.0)
|
||||
tsort
|
||||
readline (0.0.4)
|
||||
reline
|
||||
redcarpet (3.6.1)
|
||||
redis (5.4.1)
|
||||
redis-client (>= 0.22.0)
|
||||
@@ -692,7 +701,7 @@ GEM
|
||||
responders (3.1.1)
|
||||
actionpack (>= 5.2)
|
||||
railties (>= 5.2)
|
||||
rexml (3.4.2)
|
||||
rexml (3.4.4)
|
||||
roadie (5.2.1)
|
||||
css_parser (~> 1.4)
|
||||
nokogiri (~> 1.15)
|
||||
@@ -783,8 +792,9 @@ GEM
|
||||
rexml
|
||||
ruby-progressbar (1.13.0)
|
||||
ruby-rc4 (0.1.5)
|
||||
ruby-vips (2.1.4)
|
||||
ruby-vips (2.2.5)
|
||||
ffi (~> 1.12)
|
||||
logger
|
||||
rubyzip (2.3.2)
|
||||
rufus-scheduler (3.8.2)
|
||||
fugit (~> 1.1, >= 1.1.6)
|
||||
@@ -873,10 +883,9 @@ GEM
|
||||
tsort (0.2.0)
|
||||
ttfunk (1.8.0)
|
||||
bigdecimal (~> 3.1)
|
||||
turbo-rails (2.0.5)
|
||||
actionpack (>= 6.0.0)
|
||||
activejob (>= 6.0.0)
|
||||
railties (>= 6.0.0)
|
||||
turbo-rails (2.0.20)
|
||||
actionpack (>= 7.1.0)
|
||||
railties (>= 7.1.0)
|
||||
turbo_power (0.7.0)
|
||||
turbo-rails (>= 1.3.0)
|
||||
tzinfo (2.0.6)
|
||||
@@ -903,10 +912,10 @@ GEM
|
||||
validates_lengths_from_database (0.8.0)
|
||||
activerecord (>= 4)
|
||||
vcr (6.2.0)
|
||||
view_component (3.12.1)
|
||||
activesupport (>= 5.2.0, < 8.0)
|
||||
concurrent-ruby (~> 1.0)
|
||||
method_source (~> 1.0)
|
||||
view_component (4.1.1)
|
||||
actionview (>= 7.1.0, < 8.2)
|
||||
activesupport (>= 7.1.0, < 8.2)
|
||||
concurrent-ruby (~> 1)
|
||||
view_component_reflex (3.1.14.pre9)
|
||||
rails (>= 5.2, < 8.0)
|
||||
stimulus_reflex (>= 3.5.0.pre2)
|
||||
@@ -933,12 +942,12 @@ GEM
|
||||
rack-proxy (>= 0.6.1)
|
||||
railties (>= 5.2)
|
||||
semantic_range (>= 2.3.0)
|
||||
webrick (1.9.1)
|
||||
webrick (1.9.2)
|
||||
websocket-driver (0.7.7)
|
||||
base64
|
||||
websocket-extensions (>= 0.1.0)
|
||||
websocket-extensions (0.1.5)
|
||||
whenever (1.0.0)
|
||||
whenever (1.1.0)
|
||||
chronic (>= 0.6.3)
|
||||
wicked_pdf (2.8.2)
|
||||
activesupport
|
||||
|
||||
@@ -5,6 +5,18 @@ require "active_support/concern"
|
||||
module CalculatedAdjustments
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
CALCULATORS = %w{
|
||||
Calculator::DefaultTax
|
||||
Calculator::FlatPercentItemTotal
|
||||
Calculator::FlatPercentPerItem
|
||||
Calculator::FlatRate
|
||||
Calculator::FlexiRate
|
||||
Calculator::None
|
||||
Calculator::PerItem
|
||||
Calculator::PriceSack
|
||||
Calculator::Weight
|
||||
}.freeze
|
||||
|
||||
included do
|
||||
has_one :calculator, as: :calculable, class_name: "Spree::Calculator", dependent: :destroy
|
||||
accepts_nested_attributes_for :calculator
|
||||
@@ -32,7 +44,11 @@ module CalculatedAdjustments
|
||||
end
|
||||
|
||||
def calculator_type=(calculator_type)
|
||||
klass = calculator_type.constantize if calculator_type
|
||||
return unless calculator_type
|
||||
|
||||
return unless CALCULATORS.include?(calculator_type)
|
||||
|
||||
klass = calculator_type.constantize
|
||||
self.calculator = klass.new if klass && !calculator.is_a?(klass)
|
||||
end
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ module OrderCycles
|
||||
def create
|
||||
oc = @original_order_cycle.dup
|
||||
oc.name = I18n.t("models.order_cycle.cloned_order_cycle_name", order_cycle: oc.name)
|
||||
oc.orders_open_at = oc.orders_close_at = oc.mails_sent = oc.processed_at = nil
|
||||
oc.orders_open_at = oc.orders_close_at = oc.mails_sent = oc.processed_at = oc.opened_at = nil
|
||||
oc.coordinator_fee_ids = @original_order_cycle.coordinator_fee_ids
|
||||
oc.preferred_product_selection_from_coordinator_inventory_only =
|
||||
@original_order_cycle.preferred_product_selection_from_coordinator_inventory_only
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
:plain
|
||||
<solid-permissioning
|
||||
data-src="#{DfcProvider::Engine.routes.url_helpers.enterprise_platforms_url(@enterprise.id)}"
|
||||
scopes-uri="https://cdn.startinblox.com/owl/dfc/taxonomies/scopes.jsonld"
|
||||
noRouter
|
||||
auto-lang
|
||||
lang="en"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
= render "layouts/matomo_tag"
|
||||
= language_meta_tags
|
||||
|
||||
= stylesheet_pack_tag "darkswarm", "data-turbo-track": "reload"
|
||||
= stylesheet_pack_tag "darkswarm", "data-turbo-track": "reload", media: "screen"
|
||||
= javascript_pack_tag "application", "data-turbo-track": "reload"
|
||||
|
||||
= render "layouts/shopfront_script" if @shopfront_layout
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
%meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/
|
||||
%title
|
||||
= Spree::Config[:site_name]
|
||||
= stylesheet_link_tag 'mail'
|
||||
= stylesheet_link_tag 'mail', media: "screen"
|
||||
%body{:bgcolor => "#FFFFFF" }
|
||||
- unless @hide_ofn_navigation
|
||||
%table.head-wrap
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
= render "layouts/matomo_tag"
|
||||
= language_meta_tags
|
||||
|
||||
= stylesheet_pack_tag "darkswarm"
|
||||
= stylesheet_pack_tag "darkswarm", media: "screen"
|
||||
= javascript_include_tag "darkswarm/all"
|
||||
= javascript_pack_tag "application"
|
||||
|
||||
|
||||
@@ -184,8 +184,9 @@
|
||||
}
|
||||
|
||||
// Hide columns
|
||||
$columns: "image", "name", "sku", "unit_scale", "unit", "price", "on_hand", "producer",
|
||||
"category", "tax_category", "tags", "inherits_properties";
|
||||
$columns:
|
||||
"image", "name", "sku", "unit_scale", "unit", "price", "on_hand", "producer", "category",
|
||||
"tax_category", "tags", "inherits_properties";
|
||||
@each $col in $columns {
|
||||
&.hide-#{$col} {
|
||||
.col-#{$col} {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
# Rails.application.config.action_view.button_to_generates_button_tag = true
|
||||
|
||||
# `stylesheet_link_tag` view helper will not render the media attribute by default.
|
||||
# Rails.application.config.action_view.apply_stylesheet_media_default = false
|
||||
Rails.application.config.action_view.apply_stylesheet_media_default = false
|
||||
|
||||
# Change the digest class for the key generators to `OpenSSL::Digest::SHA256`.
|
||||
# Changing this default means invalidate all encrypted messages generated by
|
||||
|
||||
@@ -541,9 +541,11 @@ de_DE:
|
||||
clone: Duplizieren
|
||||
delete: Löschen
|
||||
remove: Löschen
|
||||
preview: Vorschau
|
||||
image:
|
||||
edit: Bearbeiten
|
||||
product_preview:
|
||||
product_preview: Produktvorschau
|
||||
shop_tab: Produkte
|
||||
adjustments:
|
||||
skipped_changing_canceled_order: "Eine stornierte Bestellung kann nicht geändert werden."
|
||||
@@ -661,6 +663,13 @@ de_DE:
|
||||
info_html: "Matomo ist eine Web- und Mobile Analytics-Anwendung. Sie können Matomo entweder lokal hosten oder einen in der Cloud gehosteten Dienst verwenden. Weitere Informationen finden Sie unter <a href='http://matomo.org' target='_blank'>matomo.org</a>."
|
||||
config_instructions_html: "Hier können Sie die OFN Matomo Integration konfigurieren. Die unten angegebene Matomo-URL sollte auf die Matomo-Instanz verweisen, an die die Benutzerverfolgungsinformationen gesendet werden. Wenn es leer bleibt, wird das Matomo-Benutzer-Tracking deaktiviert. Das Feld Site-ID ist nicht obligatorisch, aber nützlich, wenn Sie mehr als eine Website in einer einzelnen Matomo-Instanz verfolgen. Es kann auf der Matomo-Instanzkonsole gefunden werden."
|
||||
config_instructions_tag_manager_html: "Durch Festlegen der Matomo Tag Manager URL wird Matomo Tag Manager aktiviert. Mit diesem Tool können Sie Analyseereignisse einrichten. Die Matomo Tag Manager URL wird aus dem Abschnitt Installationscode von Matomo Tag Manager kopiert. Stellen Sie sicher, dass Sie den richtigen Container und die richtige Umgebung auswählen, da diese Optionen die URL ändern."
|
||||
connected_app_settings:
|
||||
edit:
|
||||
title: "Verknüpfte Apps"
|
||||
info_html: "Aktivierte Apps werden in den Unternehmenseinstellungen unter Verknüpfte Apps angezeigt."
|
||||
enabled_legend: "Aktivierte verknüpfte Apps"
|
||||
update:
|
||||
resource: Verknüpfte Apps
|
||||
customers:
|
||||
index:
|
||||
new_customer: "Neuer Kunde"
|
||||
@@ -758,6 +767,7 @@ de_DE:
|
||||
variants:
|
||||
infinity: "Unbegrenzt"
|
||||
to_order_tip: "Artikel, die auf Anfrage hergestellt werden, haben keinen festgelegten Lagerbestand."
|
||||
back_to_products_list: "Zurück zur Produktliste"
|
||||
editing_product: "Produkt bearbeiten"
|
||||
tabs:
|
||||
product_details: "Produktdetails"
|
||||
@@ -771,6 +781,17 @@ de_DE:
|
||||
title: Produkte verwalten
|
||||
content:
|
||||
loading: Produkte werden geladen...
|
||||
delete_modal:
|
||||
delete_product_modal:
|
||||
heading: "Produkt löschen"
|
||||
prompt: "Das Produkt wird dauerhaft aus Ihrer Liste entfernt."
|
||||
confirmation_text: "Produkt löschen"
|
||||
cancellation_text: "Produkt beibehalten"
|
||||
delete_variant_modal:
|
||||
heading: "Produktvariante löschen"
|
||||
prompt: "Die Produktvariante wird dauerhaft aus Ihrer Liste entfernt."
|
||||
confirmation_text: "Produktvariante löschen"
|
||||
cancellation_text: "Produktvariante beibehalten"
|
||||
filters:
|
||||
search_products: Nach Produkten suchen
|
||||
all_producers: Alle Produzenten
|
||||
@@ -784,6 +805,9 @@ de_DE:
|
||||
search: Suche
|
||||
sort:
|
||||
pagination:
|
||||
products_total_html:
|
||||
one: "<strong>%{total} Produkt</strong> für Ihre Suchkriterien gefunden."
|
||||
other: "<strong>%{count} Produkte</strong> für Ihre Suchkriterien gefunden. Zeige %{from} bis %{to}."
|
||||
per_page:
|
||||
show: Zeige
|
||||
per_page: "%{num} pro Seite"
|
||||
@@ -811,8 +835,10 @@ de_DE:
|
||||
success: Die Änderungen wurden gespeichert.
|
||||
delete_product:
|
||||
success: Das Produkt wurde gelöscht.
|
||||
error: Das Produkt konnte nicht gelöscht werden.
|
||||
delete_variant:
|
||||
success: Die Produktvariante wurde gelöscht.
|
||||
error: Die Produktvariante konnte nicht gelöscht werden.
|
||||
variant_row:
|
||||
none_tax_category: Nichts
|
||||
category_field_name: "Kategorie"
|
||||
@@ -862,6 +888,8 @@ de_DE:
|
||||
product_categories: Produktkategorien
|
||||
tax_categories: Steuerkategorien
|
||||
shipping_categories: Lieferkategorien
|
||||
dfc_import_form:
|
||||
preview: Vorschau
|
||||
import:
|
||||
review: Überprüfung
|
||||
import: Importieren
|
||||
@@ -1197,7 +1225,7 @@ de_DE:
|
||||
default_rules:
|
||||
by_default: Standardregeln
|
||||
no_rules_yet: Es gelten noch keine Standardregeln.
|
||||
add_new_button: 'neue Standardregel +'
|
||||
add_new_button: '+ Neue Standardregel'
|
||||
no_tags_yet: Für dieses Unternehmen sind noch keine Stichwörter vorhanden.
|
||||
add_new_tag: '+ Neues Stichwort hinzufügen'
|
||||
show_hide_variants: 'Produktvarianten im Laden anzeigen?'
|
||||
@@ -1234,7 +1262,7 @@ de_DE:
|
||||
customers: Kunde
|
||||
net_value: Nettowert
|
||||
active: Aktiv?
|
||||
add_new: Neuer Gutschein
|
||||
add_new: + Neuer Gutschein
|
||||
no_voucher_yet: Noch keine Gutscheine vorhanden.
|
||||
white_label:
|
||||
legend: "OFN verbergen"
|
||||
@@ -1304,8 +1332,10 @@ de_DE:
|
||||
contact_name: Kontaktname
|
||||
edit:
|
||||
editing: 'Einstellungen:'
|
||||
back_link: Zurück zur Unternehmensliste
|
||||
new:
|
||||
title: Neues Unternehmen
|
||||
back_link: Zurück zur Unternehmensliste
|
||||
welcome:
|
||||
welcome_title: Willkommen im Open Food Network!
|
||||
welcome_text: 'Erfolgreich erstellt:'
|
||||
@@ -1316,6 +1346,8 @@ de_DE:
|
||||
invite_manager:
|
||||
user_already_exists: "Der Benutzer existiert bereits. Bitte verwenden Sie die Funktion \"vorhandenen Benutzer hinzufügen\"."
|
||||
error: "Etwas ist schief gelaufen."
|
||||
tag_rules:
|
||||
confirm_delete: Möchten Sie diese Regel wirklich löschen?
|
||||
order_cycles:
|
||||
loading_flash:
|
||||
loading_order_cycles: BESTELLZYKLEN WERDEN GELADEN ...
|
||||
@@ -1494,6 +1526,8 @@ de_DE:
|
||||
has_no_payment_methods: "%{enterprise} hat keine Zahlungsarten."
|
||||
has_no_shipping_methods: "%{enterprise} hat keine Lieferoptionen."
|
||||
has_no_enterprise_fees: "%{enterprise} erhebt keine Gebühren."
|
||||
flashes:
|
||||
dismiss: Schließen
|
||||
side_menu:
|
||||
enterprise:
|
||||
primary_details: "Unternehmen"
|
||||
@@ -1637,6 +1671,9 @@ de_DE:
|
||||
les_communs_link: "Les Communs Open ID-Server"
|
||||
link_your_account: "Sie müssen Ihr Benutzerkonto zunächst mit dem von DFC (Les Communs Open ID Connect) verwendeten Autorisierungsanbieter verbinden."
|
||||
link_account_button: "Verbinden Sie Ihr Les Communs OIDC-Konto"
|
||||
note_expiry: |
|
||||
Die Tokens für den Zugriff auf verknüpfte Apps sind abgelaufen. Bitte aktualisieren Sie Ihre
|
||||
Kontoverknüpfung, damit alle Integrationen weiterhin funktionieren.
|
||||
view_account: "Ihr Benutzerkonto anzeigen:"
|
||||
subscriptions:
|
||||
index:
|
||||
@@ -2177,6 +2214,9 @@ de_DE:
|
||||
order_back_to_store: Zurück zum Laden
|
||||
order_back_to_cart: Zurück zum Warenkorb
|
||||
order_back_to_website: 'zur Website '
|
||||
checkout_details_title: Ihre Daten
|
||||
checkout_payment_title: Zahlungsart
|
||||
checkout_summary_title: Bestellabschluss
|
||||
bom_tip: "Verwenden Sie diese Seite, um Produktmengen über mehrere Bestellungen hinweg zu ändern. Produkte können bei Bedarf auch komplett aus Bestellungen entfernt werden."
|
||||
unsaved_changes_warning: "Sie haben nicht gespeicherte Änderungen, die beim Fortfahren verloren gehen."
|
||||
unsaved_changes_error: "Felder mit roten Rahmen enthalten Fehler."
|
||||
@@ -3642,7 +3682,7 @@ de_DE:
|
||||
spree:
|
||||
order_updated: "Bestellung aktualisiert"
|
||||
add_country: "Neues Land"
|
||||
add_state: "Neues Bundesland"
|
||||
add_state: "Bundesland hinzufügen"
|
||||
adjustment: "Anpassung"
|
||||
all: "Alle"
|
||||
associated_adjustment_closed: "Zugehörige Anpassung geschlossen"
|
||||
@@ -3686,6 +3726,7 @@ de_DE:
|
||||
resend: "Erneut senden"
|
||||
back_to_orders_list: "Zurück zur Bestellübersicht"
|
||||
back_to_payments_list: "Zurück zur Zahlungsliste"
|
||||
back_to_states_list: "Zurück zur Bundesländerliste"
|
||||
return_authorizations: "Retouren"
|
||||
cannot_create_returns: "Retouren können nicht erstellt werden, da für diese Bestellung keine Lieferung bestätigt wurde."
|
||||
select_stock: "Bestand auswählen"
|
||||
@@ -3775,6 +3816,7 @@ de_DE:
|
||||
tax_rate_amount_explanation: "Eingabe als Dezimalbetrag (d. h. bei Steuersatz 5 %, geben Sie 0.05 ein)."
|
||||
included_in_price: "Im Preis enthalten"
|
||||
show_rate_in_label: "Steuersatz im Namen anzeigen"
|
||||
back_to_tax_rates_list: "Zurück zur Liste der Steuersätze"
|
||||
tax_settings: "Steuereinstellungen"
|
||||
zones: "Zonen"
|
||||
new_zone: "Neue Zone"
|
||||
@@ -3787,6 +3829,7 @@ de_DE:
|
||||
iso_name: "ISO-Name"
|
||||
states_required: "Staaten/Bundesländer/Regionen erforderlich"
|
||||
editing_country: "Land bearbeiten"
|
||||
back_to_countries_list: "Zurück zur Länderliste"
|
||||
states: "Bundesländer"
|
||||
abbreviation: "Abkürzung"
|
||||
new_state: "Neues Bundesland"
|
||||
@@ -3949,6 +3992,7 @@ de_DE:
|
||||
continue: "Weiter"
|
||||
new:
|
||||
new_return_authorization: "Neue Retour"
|
||||
back_to_return_authorizations_list: "Zurück zur Retourenliste"
|
||||
continue: "Weiter"
|
||||
edit:
|
||||
receive: "erhalten"
|
||||
@@ -4041,6 +4085,7 @@ de_DE:
|
||||
has_no_payment_methods: "hat keine Zahlungsarten"
|
||||
has_no_shipping_methods: "hat keine Lieferoptionen"
|
||||
products:
|
||||
products_tip: "Die Produkte, die Sie über das Open Food Network verkaufen."
|
||||
active_products:
|
||||
zero: "Sie haben keine aktiven Produkte."
|
||||
one: "Sie haben ein aktives Produkt"
|
||||
@@ -4193,6 +4238,8 @@ de_DE:
|
||||
bulk_unit_size: Erforderliche Gesamtbestellmenge (in Gramm, Liter oder Stück)
|
||||
display_as:
|
||||
display_as: Anzeigen als
|
||||
clone:
|
||||
success: Produkt wurde dupliziert.
|
||||
reports:
|
||||
table:
|
||||
select_and_search: "Treffen Sie Ihre Auswahl und klicken Sie auf %{option}, um den Bericht zu erstellen."
|
||||
@@ -4264,11 +4311,16 @@ de_DE:
|
||||
total: "Gesamt"
|
||||
billing_address_name: "Name"
|
||||
taxons:
|
||||
back_to_list: "Zurück zur Produktkategorienliste"
|
||||
index:
|
||||
title: "Produktkategorien"
|
||||
new_taxon: 'Neue Produktkategorie'
|
||||
new:
|
||||
title: "Neue Produktkategorie"
|
||||
destroy:
|
||||
delete_taxon:
|
||||
success: "Die Produktkategorie wurde gelöscht."
|
||||
error: "Die Produktkategorie kann aufgrund zugewiesener Produkte nicht gelöscht werden."
|
||||
form:
|
||||
name: Name
|
||||
description: Beschreibung
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
fr_BE:
|
||||
language_name: "Français"
|
||||
time:
|
||||
formats:
|
||||
long: "%B %d, %Y %-l:%M %p"
|
||||
activerecord:
|
||||
models:
|
||||
spree/product: Produit
|
||||
@@ -50,6 +53,7 @@ fr_BE:
|
||||
primary_taxon: "Catégorie de Produit"
|
||||
shipping_category_id: "Catégorie de livraison"
|
||||
supplier: "Disitributeur·trice"
|
||||
variant_unit: "Unité"
|
||||
variant_unit_name: "Nom de la variante"
|
||||
unit_value: "Valeur unitaire"
|
||||
spree/credit_card:
|
||||
@@ -99,6 +103,7 @@ fr_BE:
|
||||
messages:
|
||||
confirmation: "ne correspond pas à %{attribute}"
|
||||
blank: "Champ obligatoire"
|
||||
too_short: "est trop court (le minimum est %{count} caractères)"
|
||||
errors:
|
||||
messages:
|
||||
content_type_invalid: "a un type de contenu non valide"
|
||||
@@ -259,7 +264,18 @@ fr_BE:
|
||||
Nous allons examiner la question, mais n'hésitez pas à nous faire savoir si le problème persiste.
|
||||
backorder_mailer:
|
||||
backorder_failed:
|
||||
hints: |
|
||||
Il se peut que vous deviez aller dans les paramètres du cycle de vente et reconnecter votre compte.
|
||||
Vérifiez également que le catalogue de votre fournisseur n'a pas changé et qu'il fournit
|
||||
toujours les produits dont vous avez besoin. N'hésitez pas à nous contacter si
|
||||
vous avez des questions.
|
||||
product: "Produit"
|
||||
backorder_incomplete:
|
||||
hints: |
|
||||
Il se peut que vous deviez aller dans les paramètres du cycle de vente et reconnecter votre compte.
|
||||
Vérifiez également que le catalogue de votre fournisseur n'a pas changé et qu'il fournit
|
||||
toujours les produits dont vous avez besoin. N'hésitez pas à nous contacter si
|
||||
vous avez des questions.
|
||||
enterprise_mailer:
|
||||
confirmation_instructions:
|
||||
subject: "Confirmez l'adresse email pour %{enterprise}"
|
||||
@@ -1688,6 +1704,10 @@ fr_BE:
|
||||
remove_white_label_logo_success: "Logo supprimé avec succès"
|
||||
stripe_connect_settings:
|
||||
resource: Configuration de Stripe Connect
|
||||
resend_confirmation_emails_feedback:
|
||||
one: "E-mail de confirmation envoyé pour une commande."
|
||||
many: "E-mail de confirmation envoyé pour %{count} commandes."
|
||||
other: "E-mail de confirmation envoyé pour %{count} commandes."
|
||||
api:
|
||||
invalid_api_key: "Clé API invalide (%{key}) spécifiée."
|
||||
unauthorized: "Vous n'êtes pas autorisé à effectuer cette action."
|
||||
@@ -2118,6 +2138,7 @@ fr_BE:
|
||||
email_order_summary_subtotal: "Sous-total:"
|
||||
email_order_summary_total: "Total:"
|
||||
email_order_summary_includes_tax: "(dont TVA)"
|
||||
email_order_summary_voucher_label: "Voucher (%{code}):"
|
||||
email_payment_paid: RÉGLÉ
|
||||
email_payment_not_paid: NON RÉGLÉ
|
||||
email_payment_description: Description du paiement à la caisse
|
||||
@@ -3353,6 +3374,14 @@ fr_BE:
|
||||
code: "Code"
|
||||
urlPlaceholder: "Entrer l'URL pour insérer"
|
||||
inflections:
|
||||
bunch:
|
||||
one: "botte"
|
||||
many: "bottes"
|
||||
other: "bottes"
|
||||
pack:
|
||||
one: "caisse"
|
||||
many: "caisses"
|
||||
other: "caisses"
|
||||
item:
|
||||
one: "article"
|
||||
many: "articles"
|
||||
|
||||
@@ -7,10 +7,17 @@ class AddressBuilder < DfcBuilder
|
||||
street: address.address1,
|
||||
postalCode: address.zipcode,
|
||||
city: address.city,
|
||||
country: address.country.name,
|
||||
country: country(address.country),
|
||||
region: address.state.name,
|
||||
latitude: address.latitude,
|
||||
longitude: address.longitude,
|
||||
)
|
||||
end
|
||||
|
||||
# The country has to be a value of:
|
||||
# https://publications.europa.eu/resource/authority/country/0001
|
||||
def self.country(spree_country)
|
||||
code = spree_country.iso3
|
||||
"http://publications.europa.eu/resource/authority/country/#{code}"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -5,22 +5,27 @@ class ApiUser
|
||||
PLATFORMS = {
|
||||
'cqcm-dev' => {
|
||||
id: "https://api.proxy-dev.cqcm.startinblox.com/profile",
|
||||
webhook: "/djangoldp-dfc/webhook/",
|
||||
tokens: "https://kc.cqcm.startinblox.com/realms/startinblox/protocol/openid-connect/token",
|
||||
},
|
||||
'cqcm-stg' => {
|
||||
id: "https://api.proxy-stg.cqcm.startinblox.com/profile",
|
||||
webhook: "/djangoldp-dfc/webhook/",
|
||||
tokens: "https://kc.cqcm.startinblox.com/realms/startinblox/protocol/openid-connect/token",
|
||||
},
|
||||
'cqcm' => {
|
||||
id: "https://carte.cqcm.coop/profile",
|
||||
webhook: "/djangoldp-dfc/webhook/",
|
||||
tokens: "https://authentification.cqcm.coop/realms/cqcm/protocol/openid-connect/token",
|
||||
},
|
||||
'lf-dev' => {
|
||||
id: "https://www.litefarm.org/profile",
|
||||
webhook: "/djangoldp-dfc/webhook/",
|
||||
tokens: "https://login.fooddatacollaboration.org.uk/realms/dev/protocol/openid-connect/token",
|
||||
},
|
||||
'mo-dev' => {
|
||||
id: "https://market.organic/profile",
|
||||
webhook: "/api/webhooks/ofn",
|
||||
tokens: "https://login.fooddatacollaboration.org.uk/realms/dev/protocol/openid-connect/token",
|
||||
},
|
||||
|
||||
@@ -31,6 +36,14 @@ class ApiUser
|
||||
PLATFORMS.dig(platform, :id)
|
||||
end
|
||||
|
||||
def self.webhook_url(platform)
|
||||
platform_url = ApiUser.platform_url(platform)
|
||||
|
||||
URI.parse(platform_url).tap do |url|
|
||||
url.path = PLATFORMS.dig(platform, :webhook)
|
||||
end
|
||||
end
|
||||
|
||||
def self.token_endpoint(platform)
|
||||
PLATFORMS.dig(platform, :tokens)
|
||||
end
|
||||
|
||||
@@ -19,7 +19,7 @@ class EnterpriseBuilder < DfcBuilder
|
||||
catalogItems: catalog_items,
|
||||
emails: [enterprise.email_address].compact,
|
||||
localizations: [address],
|
||||
phoneNumbers: [enterprise.phone].compact,
|
||||
phoneNumbers: phone_numbers(enterprise),
|
||||
socialMedias: SocialMediaBuilder.social_medias(enterprise),
|
||||
logo: enterprise.logo_url(:small),
|
||||
mainContact: contact(enterprise),
|
||||
@@ -71,4 +71,15 @@ class EnterpriseBuilder < DfcBuilder
|
||||
lastName:, # rubocop:disable Naming/VariableName
|
||||
)
|
||||
end
|
||||
|
||||
def self.phone_numbers(enterprise)
|
||||
return [] if enterprise.phone.blank?
|
||||
|
||||
number = DataFoodConsortium::Connector::PhoneNumber.new(
|
||||
nil,
|
||||
phoneNumber: enterprise.phone,
|
||||
)
|
||||
|
||||
[number]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -25,7 +25,7 @@ class ProxyNotifier
|
||||
grant_type: "client_credentials",
|
||||
client_id: ENV.fetch("OPENID_APP_ID", nil),
|
||||
client_secret: ENV.fetch("OPENID_APP_SECRET", nil),
|
||||
scope: "WriteEnterprise",
|
||||
scope: "ReadEnterprise",
|
||||
}
|
||||
response = connection.post(url, data)
|
||||
response.body["access_token"]
|
||||
@@ -49,13 +49,6 @@ class ProxyNotifier
|
||||
f.response :json
|
||||
f.response :raise_error
|
||||
end
|
||||
connection.post(webhook_url(platform), data)
|
||||
end
|
||||
|
||||
def webhook_url(platform)
|
||||
platform_url = ApiUser.platform_url(platform)
|
||||
URI.parse(platform_url).tap do |url|
|
||||
url.path = "/djangoldp-dfc/webhook/"
|
||||
end
|
||||
connection.post(ApiUser.webhook_url(platform), data)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -33,7 +33,8 @@ RSpec.describe AddressBuilder do
|
||||
end
|
||||
|
||||
it "assigns a country" do
|
||||
expect(result.country).to eq "Australia"
|
||||
expect(result.country)
|
||||
.to eq "http://publications.europa.eu/resource/authority/country/AUS"
|
||||
end
|
||||
|
||||
it "assigns a region" do
|
||||
|
||||
@@ -25,4 +25,9 @@ RSpec.describe ProxyNotifier do
|
||||
subject.refresh(platform, enterprise_url)
|
||||
}.to raise_error Faraday::ServerError
|
||||
end
|
||||
|
||||
# Requires OIDC client secret for FDC dev realm.
|
||||
it "notifies Market Organic", :vcr do
|
||||
subject.refresh("mo-dev", enterprise_url)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -70,6 +70,9 @@ module OpenFoodNetwork
|
||||
"cqcm" => <<~DESC,
|
||||
Show DFC Permissions interface to share data with CQCM.
|
||||
DESC
|
||||
"mo-dev" => <<~DESC,
|
||||
Show DFC Permissions interface to share data with Market.Organic.
|
||||
DESC
|
||||
}.merge(conditional_features).freeze;
|
||||
|
||||
# Features you would like to be enabled to start with.
|
||||
|
||||
@@ -3,16 +3,19 @@
|
||||
require 'sidekiq/api'
|
||||
|
||||
namespace :ofn do
|
||||
desc "Reset databases and load sample data"
|
||||
task reset_sample_data: :environment do
|
||||
Rake::Task["ofn:reset"].invoke
|
||||
Rake::Task["ofn:sample_data"].invoke
|
||||
end
|
||||
|
||||
desc "Reset database and jobs"
|
||||
task reset: :environment do
|
||||
Rake::Task["ofn:reset_sidekiq"].invoke
|
||||
Rake::Task["db:reset"].invoke
|
||||
end
|
||||
|
||||
desc "Clear all Sidekiq jobs"
|
||||
task reset_sidekiq: :environment do
|
||||
# Clear retry set
|
||||
Sidekiq::RetrySet.new.clear
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"karma-chrome-launcher": "~3.2.0",
|
||||
"karma-coffee-preprocessor": "~1.0.1",
|
||||
"karma-jasmine": "~0.3.8",
|
||||
"prettier": "3.2.4",
|
||||
"prettier": "*",
|
||||
"webpack-dev-server": "~3"
|
||||
}
|
||||
}
|
||||
|
||||
94
spec/fixtures/vcr_cassettes/ProxyNotifier/notifies_Market_Organic.yml
vendored
Normal file
94
spec/fixtures/vcr_cassettes/ProxyNotifier/notifies_Market_Organic.yml
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
---
|
||||
http_interactions:
|
||||
- request:
|
||||
method: post
|
||||
uri: https://login.fooddatacollaboration.org.uk/realms/dev/protocol/openid-connect/token
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: client_id=<HIDDEN-OPENID_APP_ID>&client_secret=<HIDDEN-OPENID_APP_SECRET>&grant_type=client_credentials&scope=ReadEnterprise
|
||||
headers:
|
||||
User-Agent:
|
||||
- Faraday v2.9.0
|
||||
Content-Type:
|
||||
- application/x-www-form-urlencoded
|
||||
Accept-Encoding:
|
||||
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
||||
Accept:
|
||||
- "*/*"
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Cache-Control:
|
||||
- no-store
|
||||
Content-Length:
|
||||
- '1588'
|
||||
Content-Type:
|
||||
- application/json
|
||||
Pragma:
|
||||
- no-cache
|
||||
Referrer-Policy:
|
||||
- no-referrer
|
||||
Strict-Transport-Security:
|
||||
- max-age=31536000; includeSubDomains
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
X-Frame-Options:
|
||||
- SAMEORIGIN
|
||||
Date:
|
||||
- Fri, 21 Nov 2025 03:06:09 GMT
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: '{"access_token":"<HIDDEN-OPENID-TOKEN>","expires_in":300,"refresh_expires_in":0,"token_type":"Bearer","not-before-policy":0,"scope":"ReadEnterprise
|
||||
profile email"}'
|
||||
recorded_at: Fri, 21 Nov 2025 03:06:09 GMT
|
||||
- request:
|
||||
method: post
|
||||
uri: https://market.organic/api/webhooks/ofn
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: '{"eventType":"refresh","enterpriseUrlid":"http://ofn.example.net/api/dfc/enterprises/10000","scope":"ReadEnterprise"}'
|
||||
headers:
|
||||
Authorization:
|
||||
- "<HIDDEN-AUTHORIZATION-HEADER>"
|
||||
User-Agent:
|
||||
- Faraday v2.9.0
|
||||
Content-Type:
|
||||
- application/json
|
||||
Accept-Encoding:
|
||||
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
||||
Accept:
|
||||
- "*/*"
|
||||
response:
|
||||
status:
|
||||
code: 200
|
||||
message: OK
|
||||
headers:
|
||||
Server:
|
||||
- nginx/1.29.1
|
||||
Date:
|
||||
- Fri, 21 Nov 2025 03:06:10 GMT
|
||||
Content-Type:
|
||||
- application/json; charset=utf-8
|
||||
Content-Length:
|
||||
- '95'
|
||||
Connection:
|
||||
- keep-alive
|
||||
X-Powered-By:
|
||||
- Express
|
||||
Access-Control-Allow-Origin:
|
||||
- "*"
|
||||
Access-Control-Allow-Methods:
|
||||
- GET, POST, OPTIONS, HEAD
|
||||
Access-Control-Allow-Headers:
|
||||
- Content-Type, Authorization, Cache-Control, Accept, Accept-Language
|
||||
Access-Control-Expose-Headers:
|
||||
- Content-Type, Content-Length
|
||||
Etag:
|
||||
- W/"5f-ip4J0TL+XJqsW6UbwFDqOBqtUAQ"
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: '{"success":true,"message":"Webhook received and stored","timestamp":"2025-11-21T03:06:10.659Z"}'
|
||||
recorded_at: Fri, 21 Nov 2025 03:06:10 GMT
|
||||
recorded_with: VCR 6.2.0
|
||||
@@ -75,6 +75,37 @@ RSpec.describe OpenOrderCycleJob do
|
||||
end
|
||||
end
|
||||
|
||||
context "with cloned order cycle" do
|
||||
subject { OpenOrderCycleJob.perform_now(cloned_order_cycle.id) }
|
||||
|
||||
let!(:cloned_order_cycle) do
|
||||
order_cycle.update!(opened_at: now - 5.minutes)
|
||||
|
||||
coc = OrderCycles::CloneService.new(order_cycle.reload).create
|
||||
coc.update!(orders_open_at: now + 5.minutes)
|
||||
coc.reload
|
||||
|
||||
coc
|
||||
end
|
||||
|
||||
it "marks as open" do
|
||||
expect {
|
||||
subject
|
||||
cloned_order_cycle.reload
|
||||
}
|
||||
.to change { cloned_order_cycle.opened_at }
|
||||
|
||||
expect(cloned_order_cycle.opened_at).to be_within(1).of(now)
|
||||
end
|
||||
|
||||
it "enqueues webhook job" do
|
||||
expect(OrderCycles::WebhookService)
|
||||
.to receive(:create_webhook_job).with(cloned_order_cycle, 'order_cycle.opened', now).once
|
||||
|
||||
subject
|
||||
end
|
||||
end
|
||||
|
||||
describe "concurrency", concurrency: true do
|
||||
let(:breakpoint) { Mutex.new }
|
||||
|
||||
|
||||
@@ -67,4 +67,30 @@ RSpec.describe CalculatedAdjustments do
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "#calculator_type=" do
|
||||
subject(:tax_rate) { Spree::TaxRate.new }
|
||||
|
||||
it "set the calculator to the given type" do
|
||||
tax_rate.calculator_type = "Calculator::FlatRate"
|
||||
|
||||
expect(tax_rate.calculator).to be_a(Calculator::FlatRate)
|
||||
end
|
||||
|
||||
context "when no argument given" do
|
||||
it "returns nil" do
|
||||
tax_rate.calculator_type = nil
|
||||
|
||||
expect(tax_rate.calculator).to be_nil
|
||||
end
|
||||
end
|
||||
|
||||
context "when not allowed calculator type given" do
|
||||
it "returns nil" do
|
||||
tax_rate.calculator_type = "Calculator::Wrong"
|
||||
|
||||
expect(tax_rate.calculator).to be_nil
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -17,6 +17,7 @@ RSpec.describe OrderCycles::CloneService do
|
||||
occ = OrderCycles::CloneService.new(oc).create
|
||||
expect(occ.name).to eq("COPY OF #{oc.name}")
|
||||
expect(occ.orders_open_at).to be_nil
|
||||
expect(occ.opened_at).to be_nil
|
||||
expect(occ.orders_close_at).to be_nil
|
||||
expect(occ.coordinator).not_to be_nil
|
||||
expect(occ.preferred_product_selection_from_coordinator_inventory_only).to be true
|
||||
|
||||
@@ -63,7 +63,7 @@ paths:
|
||||
dfc-b:hasStreet: 10 Lovely Street
|
||||
dfc-b:hasPostalCode: '20170'
|
||||
dfc-b:hasCity: Herndon
|
||||
dfc-b:hasCountry: Australia
|
||||
dfc-b:hasCountry: http://publications.europa.eu/resource/authority/country/AUS
|
||||
dfc-b:region: Victoria
|
||||
'404':
|
||||
description: not found
|
||||
@@ -168,6 +168,7 @@ paths:
|
||||
dfc-b:sku: AR
|
||||
dfc-b:stockLimitation: 0
|
||||
dfc-b:offeredThrough: http://test.host/api/dfc/enterprises/10000/offers/10001
|
||||
dfc-b:managedBy: http://test.host/api/dfc/enterprises/10000
|
||||
- "@id": http://test.host/api/dfc/enterprises/10000/supplied_products/10001
|
||||
"@type": dfc-b:SuppliedProduct
|
||||
dfc-b:name: Apple - 1g
|
||||
@@ -224,6 +225,7 @@ paths:
|
||||
dfc-b:sku: AR
|
||||
dfc-b:stockLimitation: 0
|
||||
dfc-b:offeredThrough: http://test.host/api/dfc/enterprises/10000/offers/10001
|
||||
dfc-b:managedBy: http://test.host/api/dfc/enterprises/10000
|
||||
- "@id": http://test.host/api/dfc/enterprises/10000/offers/10001
|
||||
"@type": dfc-b:Offer
|
||||
dfc-b:hasPrice:
|
||||
@@ -405,7 +407,7 @@ paths:
|
||||
dfc-b:hasStreet: 8 Acres Drive
|
||||
dfc-b:hasPostalCode: '20170'
|
||||
dfc-b:hasCity: Herndon
|
||||
dfc-b:hasCountry: Australia
|
||||
dfc-b:hasCountry: http://publications.europa.eu/resource/authority/country/AUS
|
||||
dfc-b:region: Victoria
|
||||
"/api/dfc/enterprises":
|
||||
get:
|
||||
@@ -433,7 +435,9 @@ paths:
|
||||
- "@id": http://test.host/api/dfc/enterprises/10000
|
||||
"@type": dfc-b:Enterprise
|
||||
dfc-b:hasAddress: http://test.host/api/dfc/addresses/40000
|
||||
dfc-b:hasPhoneNumber: 0404 444 000 200
|
||||
dfc-b:hasPhoneNumber:
|
||||
"@type": dfc-b:PhoneNumber
|
||||
dfc-b:phoneNumber: 0404 444 000 200
|
||||
dfc-b:email: hello@example.org
|
||||
dfc-b:websitePage: https://openfoodnetwork.org
|
||||
dfc-b:hasSocialMedia: http://test.host/api/dfc/enterprises/10000/social_medias/facebook
|
||||
@@ -459,14 +463,14 @@ paths:
|
||||
dfc-b:hasStreet: 42 Doveton Street
|
||||
dfc-b:hasPostalCode: '20170'
|
||||
dfc-b:hasCity: Herndon
|
||||
dfc-b:hasCountry: Australia
|
||||
dfc-b:hasCountry: http://publications.europa.eu/resource/authority/country/AUS
|
||||
dfc-b:region: Victoria
|
||||
- "@id": http://test.host/api/dfc/addresses/40000
|
||||
"@type": dfc-b:Address
|
||||
dfc-b:hasStreet: 42 Doveton Street
|
||||
dfc-b:hasPostalCode: '20170'
|
||||
dfc-b:hasCity: Herndon
|
||||
dfc-b:hasCountry: Australia
|
||||
dfc-b:hasCountry: http://publications.europa.eu/resource/authority/country/AUS
|
||||
dfc-b:latitude: -25.345376
|
||||
dfc-b:longitude: 131.0312006
|
||||
dfc-b:region: Victoria
|
||||
@@ -489,6 +493,7 @@ paths:
|
||||
dfc-b:sku: APP
|
||||
dfc-b:stockLimitation: 5
|
||||
dfc-b:offeredThrough: http://test.host/api/dfc/enterprises/10000/offers/10001
|
||||
dfc-b:managedBy: http://test.host/api/dfc/enterprises/10000
|
||||
- "@id": http://test.host/api/dfc/enterprises/10000/social_medias/facebook
|
||||
"@type": dfc-b:SocialMedia
|
||||
dfc-b:name: facebook
|
||||
@@ -517,7 +522,9 @@ paths:
|
||||
- "@id": http://test.host/api/dfc/enterprises/10000
|
||||
"@type": dfc-b:Enterprise
|
||||
dfc-b:hasAddress: http://test.host/api/dfc/addresses/40000
|
||||
dfc-b:hasPhoneNumber: 0404 444 000 200
|
||||
dfc-b:hasPhoneNumber:
|
||||
"@type": dfc-b:PhoneNumber
|
||||
dfc-b:phoneNumber: 0404 444 000 200
|
||||
dfc-b:email: hello@example.org
|
||||
dfc-b:websitePage: https://openfoodnetwork.org
|
||||
dfc-b:hasSocialMedia: http://test.host/api/dfc/enterprises/10000/social_medias/facebook
|
||||
@@ -542,7 +549,7 @@ paths:
|
||||
dfc-b:hasStreet: 42 Doveton Street
|
||||
dfc-b:hasPostalCode: '20170'
|
||||
dfc-b:hasCity: Herndon
|
||||
dfc-b:hasCountry: Australia
|
||||
dfc-b:hasCountry: http://publications.europa.eu/resource/authority/country/AUS
|
||||
dfc-b:latitude: -25.345376
|
||||
dfc-b:longitude: 131.0312006
|
||||
dfc-b:region: Victoria
|
||||
@@ -565,6 +572,7 @@ paths:
|
||||
dfc-b:sku: APP
|
||||
dfc-b:stockLimitation: 5
|
||||
dfc-b:offeredThrough: http://test.host/api/dfc/enterprises/10000/offers/10001
|
||||
dfc-b:managedBy: http://test.host/api/dfc/enterprises/10000
|
||||
- "@id": http://test.host/api/dfc/enterprises/10000/social_medias/facebook
|
||||
"@type": dfc-b:SocialMedia
|
||||
dfc-b:name: facebook
|
||||
@@ -835,6 +843,7 @@ paths:
|
||||
dfc-b:sku: BP
|
||||
dfc-b:stockLimitation: 5
|
||||
dfc-b:offeredThrough: http://test.host/api/dfc/enterprises/10000/offers/10001
|
||||
dfc-b:managedBy: http://test.host/api/dfc/enterprises/10000
|
||||
- "@id": http://test.host/api/dfc/enterprises/10000/supplied_products/10001
|
||||
"@type": dfc-b:SuppliedProduct
|
||||
dfc-b:name: Pesto - 1g
|
||||
|
||||
14
yarn.lock
14
yarn.lock
@@ -8158,10 +8158,10 @@ prepend-http@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc"
|
||||
integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=
|
||||
|
||||
prettier@3.2.4:
|
||||
version "3.2.4"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.4.tgz#4723cadeac2ce7c9227de758e5ff9b14e075f283"
|
||||
integrity sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==
|
||||
prettier@*:
|
||||
version "3.6.2"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.6.2.tgz#ccda02a1003ebbb2bfda6f83a074978f608b9393"
|
||||
integrity sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==
|
||||
|
||||
pretty-format@30.2.0:
|
||||
version "30.2.0"
|
||||
@@ -10079,9 +10079,9 @@ webpack-sources@^1.0.0, webpack-sources@^1.1.0, webpack-sources@^1.4.0, webpack-
|
||||
source-map "~0.6.1"
|
||||
|
||||
webpack@^4.46.0, webpack@~4:
|
||||
version "4.46.0"
|
||||
resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.46.0.tgz#bf9b4404ea20a073605e0a011d188d77cb6ad542"
|
||||
integrity sha512-6jJuJjg8znb/xRItk7bkT0+Q7AHCYjjFnvKIWQPkNIOyRqoCGvkOs0ipeQzrqz4l5FtN5ZI/ukEHroeX/o1/5Q==
|
||||
version "4.47.0"
|
||||
resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.47.0.tgz#8b8a02152d7076aeb03b61b47dad2eeed9810ebc"
|
||||
integrity sha512-td7fYwgLSrky3fI1EuU5cneU4+pbH6GgOfuKNS1tNPcfdGinGELAqsb/BP4nnvZyKSG2i/xFGU7+n2PvZA8HJQ==
|
||||
dependencies:
|
||||
"@webassemblyjs/ast" "1.9.0"
|
||||
"@webassemblyjs/helper-module-context" "1.9.0"
|
||||
|
||||
Reference in New Issue
Block a user