mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Merge branch 'master' into translations-for-v2
This commit is contained in:
4
.github/ISSUE_TEMPLATE/story-template.md
vendored
4
.github/ISSUE_TEMPLATE/story-template.md
vendored
@@ -7,12 +7,12 @@ assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**## Description**
|
||||
## Description
|
||||
<!-- Describe the story in detail:
|
||||
**- As a:** (enterprise user, super admin, user...)
|
||||
**- On page:** (provide url of the page you want to modify. If not provide where will be created the new url and the name we want to give it)
|
||||
**- I want to be able to do:** (specify the desired behavior)
|
||||
(Link to others issues or resources to provide context > only if really necessary). -->
|
||||
|
||||
**## Acceptance Criteria**
|
||||
## Acceptance Criteria
|
||||
<!-- Document the outcomes that need to be achieved before this component can be considered complete. -->
|
||||
|
||||
2
Gemfile
2
Gemfile
@@ -23,7 +23,7 @@ gem 'spree_auth_devise', github: 'openfoodfoundation/spree_auth_devise', branch:
|
||||
# - Change type of password from string to password to hide it in the form
|
||||
gem 'spree_paypal_express', github: "openfoodfoundation/better_spree_paypal_express", branch: "spree-upgrade-intermediate"
|
||||
#gem 'spree_paypal_express', github: "spree-contrib/better_spree_paypal_express", branch: "1-3-stable"
|
||||
gem 'stripe', '~> 4.5.0'
|
||||
gem 'stripe', '~> 4.9.0'
|
||||
# We need at least this version to have Digicert's root certificate
|
||||
# which is needed for Pin Payments (and possibly others).
|
||||
gem 'activemerchant', '~> 1.78'
|
||||
|
||||
@@ -239,7 +239,7 @@ GEM
|
||||
execjs
|
||||
coffee-script-source (1.10.0)
|
||||
colorize (0.8.1)
|
||||
combine_pdf (1.0.15)
|
||||
combine_pdf (1.0.16)
|
||||
ruby-rc4 (>= 0.1.5)
|
||||
compass (1.0.3)
|
||||
chunky_png (~> 1.2)
|
||||
@@ -559,7 +559,7 @@ GEM
|
||||
multi_json (~> 1.3)
|
||||
multi_xml (~> 0.5)
|
||||
rack (>= 1.2, < 3)
|
||||
oj (3.7.8)
|
||||
oj (3.7.9)
|
||||
orm_adapter (0.5.0)
|
||||
paper_trail (5.2.3)
|
||||
activerecord (>= 3.0, < 6.0)
|
||||
@@ -724,7 +724,7 @@ GEM
|
||||
tilt (~> 1.1, != 1.3.0)
|
||||
state_machine (1.2.0)
|
||||
stringex (1.3.3)
|
||||
stripe (4.5.0)
|
||||
stripe (4.9.0)
|
||||
faraday (~> 0.13)
|
||||
net-http-persistent (~> 3.0)
|
||||
therubyracer (0.12.0)
|
||||
@@ -863,7 +863,7 @@ DEPENDENCIES
|
||||
spree_paypal_express!
|
||||
spring (= 1.7.2)
|
||||
spring-commands-rspec
|
||||
stripe (~> 4.5.0)
|
||||
stripe (~> 4.9.0)
|
||||
therubyracer (= 0.12.0)
|
||||
timecop
|
||||
truncate_html
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.container
|
||||
.row.modal-centered
|
||||
%h2 {{'welcome_to_ofn' | t}}
|
||||
%h5 {{'signup_or_login' | t}}:
|
||||
%h2 {{'js.registration.welcome_to_ofn' | t}}
|
||||
%h5 {{'js.registration.signup_or_login' | t}}:
|
||||
%div{"ng-controller" => "AuthenticationCtrl"}
|
||||
%tabset
|
||||
%ng-include{src: "'signup.html'"}
|
||||
@@ -9,9 +9,9 @@
|
||||
%ng-include{src: "'forgot.html'"}
|
||||
%div{ ng: { show: "active('/signup')"} }
|
||||
%hr
|
||||
{{'have_an_account' | t}}
|
||||
{{'js.registration.have_an_account' | t}}
|
||||
%a{ href: "", ng: { click: "select('/login')"}}
|
||||
{{'action_login' | t}}
|
||||
{{'js.registration.action_login' | t}}
|
||||
|
||||
%a.close-reveal-modal{"ng-click" => "$close()"}
|
||||
%i.ofn-i_009-close
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
# Validates the combination of on_demand and count_on_hand values.
|
||||
#
|
||||
# `on_demand` can have three values: true, false or nil
|
||||
# `count_on_hand` can either be: nil or a number
|
||||
#
|
||||
# This means that a variant override can be in six different stock states
|
||||
# but only three of them are valid.
|
||||
#
|
||||
# | on_demand | count_on_hand | stock_overridden? | use_producer_stock_settings? | valid? |
|
||||
# |-----------|---------------|-------------------|------------------------------|--------|
|
||||
# | 1 | nil | false | false | true |
|
||||
# | 0 | x | true | false | true |
|
||||
# | nil | nil | false | true | true |
|
||||
# | 1 | x | ? | ? | false |
|
||||
# | 0 | nil | ? | ? | false |
|
||||
# | nil | x | ? | ? | false |
|
||||
#
|
||||
# This module has one method for each invalid case.
|
||||
module StockSettingsOverrideValidation
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
|
||||
@@ -57,9 +57,15 @@ class VariantOverride < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def stock_overridden?
|
||||
# If count_on_hand is present, it means on_demand is false
|
||||
# See StockSettingsOverrideValidation for details
|
||||
count_on_hand.present?
|
||||
end
|
||||
|
||||
def use_producer_stock_settings?
|
||||
on_demand.nil?
|
||||
end
|
||||
|
||||
def decrement_stock!(quantity)
|
||||
if stock_overridden?
|
||||
decrement! :count_on_hand, quantity
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
# Disabled until this form takes order cycles into account
|
||||
# Deface::Override.new(:virtual_path => "spree/checkout/edit",
|
||||
# :insert_after => "[data-hook='checkout_summary_box']",
|
||||
# :partial => "spree/checkout/other_available_distributors",
|
||||
# :name => "add_change_distributor_form_to_checkout_address",
|
||||
# :original => '60b9b1a39079f4efa85ff0425108edf671349d4f')
|
||||
@@ -1,5 +0,0 @@
|
||||
Deface::Override.new(:virtual_path => "spree/products/show",
|
||||
:insert_after => "[data-hook='product_show']",
|
||||
:text => "<%= javascript_include_tag main_app.distributors_enterprises_path(:format => :js) %>",
|
||||
:name => "add_distributor_details_js_to_product",
|
||||
:original => 'b05ac497efeeebd4464f29891fd2c4a0f60c24d9')
|
||||
@@ -1,5 +0,0 @@
|
||||
Deface::Override.new(:virtual_path => "spree/products/show",
|
||||
:insert_before => "[data-hook='cart_form']",
|
||||
:partial => "spree/products/distributor_details",
|
||||
:name => "add_distributor_details_to_product",
|
||||
:original => '789e3f5f6f36a8cd4115d7342752a37735659298')
|
||||
@@ -1,5 +0,0 @@
|
||||
Deface::Override.new(:virtual_path => "spree/products/_cart_form",
|
||||
:replace => "[data-hook='product_price'] .add-to-cart",
|
||||
:partial => "spree/products/add_to_cart",
|
||||
:name => "add_distributor_to_add_to_cart_form",
|
||||
:original => '294014222132c795048fc6c7866971a332672c87')
|
||||
@@ -1,5 +0,0 @@
|
||||
Deface::Override.new(:virtual_path => "spree/products/show",
|
||||
:insert_bottom => "[data-hook='product_left_part_wrap']",
|
||||
:partial => "spree/products/source",
|
||||
:name => "add_source_to_product",
|
||||
:original => 'bce3ba4847b3eac8ae061774a664ac4951d3d9db')
|
||||
@@ -1,5 +0,0 @@
|
||||
Deface::Override.new(:virtual_path => "spree/checkout/_payment",
|
||||
:replace => "code[erb-loud]:contains('submit_tag t(:save_and_continue)')",
|
||||
:text => "<%= submit_tag I18n.t(:process_my_order), :class => 'continue button primary' %>",
|
||||
:name => "replace_checkout_payment_button",
|
||||
:original => 'ce2043a01931b3bc16b045302ebb0e0bb9150b67')
|
||||
@@ -1,5 +0,0 @@
|
||||
Deface::Override.new(:virtual_path => "spree/checkout/_address",
|
||||
:replace => "[data-hook='shipping_fieldset_wrapper']",
|
||||
:partial => "spree/checkout/distributor",
|
||||
:name => "replace_shipping_address_form_with_distributor_details",
|
||||
:original => '53e219f90a2e1ba702a767261d0c2afe100ac751')
|
||||
@@ -1,5 +0,0 @@
|
||||
/ replace_contents '#shipping_method p#minstrs'
|
||||
|
||||
= form.label :special_instructions, t(:delivery_instructions)
|
||||
%br/
|
||||
= form.text_area :special_instructions, :cols => 40, :rows => 7
|
||||
@@ -1,2 +0,0 @@
|
||||
/ replace_contents '#shipping_method legend'
|
||||
= t(:delivery_method)
|
||||
@@ -1,16 +0,0 @@
|
||||
<!-- insert_after '[data-hook="checkout_summary_box"]'
|
||||
sequence :before => 'add_change_distributor_form_to_checkout_address' -->
|
||||
|
||||
<% # Add a new 'Save and Continue/Process My Order' button under Order Summary on the checkout pages %>
|
||||
|
||||
<div id="add_new_save_checkout_button" class="columns omega four">
|
||||
<%= submit_tag @order.state == "payment" ? t(:process_my_order) : t(:save_and_continue),
|
||||
:class => "continue button primary large",
|
||||
:form=> "checkout_form_#{@order.state}" %>
|
||||
<script>
|
||||
//Show additional button only if form attribute is supported
|
||||
if ($("#add_new_save_checkout_button input[type=submit]")[0].form) {
|
||||
$("#add_new_save_checkout_button").show();
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
@@ -1,16 +0,0 @@
|
||||
/ replace_contents '#product-variants'
|
||||
|
||||
%h6.product-section-title= t(:variants)
|
||||
%ul
|
||||
- has_checked = false
|
||||
- @product.variants.active(current_currency).each_with_index do |v,index|
|
||||
- next if v.option_values.empty? || (!v.in_stock && !Spree::Config[:show_zero_stock_products])
|
||||
- next if current_order_cycle.present? && !current_order_cycle.has_variant?(v) # All copied from spree apart from this line
|
||||
- checked = !has_checked && (v.in_stock || Spree::Config[:allow_backorders])
|
||||
- has_checked = true if checked
|
||||
%li
|
||||
= radio_button_tag "products[#{@product.id}]", v.id, checked, :disabled => !v.in_stock && !Spree::Config[:allow_backorders], 'data-price' => v.price_in(current_currency).display_price
|
||||
%label{:for => ['products', @product.id, v.id].join('_')}
|
||||
%span.variant-description= variant_options v
|
||||
- if variant_price v
|
||||
%span.price.diff= variant_price v
|
||||
@@ -1 +0,0 @@
|
||||
/ remove '#taxon-crumbs'
|
||||
@@ -4,9 +4,9 @@
|
||||
.row
|
||||
.small-12.columns
|
||||
%header
|
||||
%h2 {{'enterprise_about_headline' | t}}
|
||||
%h2= t(".headline")
|
||||
%h5
|
||||
{{'enterprise_about_message' | t}}
|
||||
= t(".message")
|
||||
%span{ ng: { class: "{brick: !enterprise.is_primary_producer, turquoise: enterprise.is_primary_producer}" } }
|
||||
{{ enterprise.name }}
|
||||
|
||||
@@ -14,33 +14,33 @@
|
||||
.row
|
||||
.small-12.columns
|
||||
.alert-box.info{ "ofn-inline-alert" => true, ng: { show: "visible" } }
|
||||
%h6{ "ng-bind" => "'enterprise_success' | t:{enterprise: enterprise.name}" }
|
||||
%span {{'enterprise_registration_exit_message' | t}}
|
||||
%h6{ "ng-bind" => "'registration.steps.about.success' | t:{enterprise: enterprise.name}" }
|
||||
%span= t(".registration_exit_message")
|
||||
%a.close{ ng: { click: "close()" } } ×
|
||||
|
||||
.small-12.large-8.columns
|
||||
.row
|
||||
.small-12.columns
|
||||
.field
|
||||
%label{ for: 'enterprise_description' } {{'enterprise_description' | t}}:
|
||||
%input.chunky{ id: 'enterprise_description', placeholder: "{{'enterprise_description_placeholder' | t}}", ng: { model: 'enterprise.description' } }
|
||||
%label{ for: 'enterprise_description' }= t(".enterprise_description")
|
||||
%input.chunky{ id: 'enterprise_description', placeholder: "{{'registration.steps.about.enterprise_description_placeholder' | t}}", ng: { model: 'enterprise.description' } }
|
||||
.row
|
||||
.small-12.columns
|
||||
.field
|
||||
%label{ for: 'enterprise_long_desc' } {{'enterprise_long_desc' | t}}:
|
||||
%textarea.chunky{ id: 'enterprise_long_desc', rows: 6, placeholder: "{{'enterprise_long_desc_placeholder' | t}}", ng: { model: 'enterprise.long_description' } }
|
||||
%small{ "ng-bind" => "'enterprise_long_desc_length' | t:{num: enterprise.long_description.length}" }
|
||||
%label{ for: 'enterprise_long_desc' }= t(".enterprise_long_desc")
|
||||
%textarea.chunky{ id: 'enterprise_long_desc', rows: 6, placeholder: "{{'registration.steps.about.enterprise_long_desc_placeholder' | t}}", ng: { model: 'enterprise.long_description' } }
|
||||
%small{ "ng-bind" => "'registration.steps.about.enterprise_long_desc_length' | t:{num: enterprise.long_description.length}" }
|
||||
.small-12.large-4.columns
|
||||
.row
|
||||
.small-12.columns
|
||||
.field
|
||||
%label{ for: 'enterprise_abn' } {{'enterprise_abn' | t}}:
|
||||
%input.chunky{ id: 'enterprise_abn', placeholder: "{{'enterprise_abn_placeholder' | t}}", ng: { model: 'enterprise.abn' } }
|
||||
%label{ for: 'enterprise_abn' }= t(".enterprise_abn")+":"
|
||||
%input.chunky{ id: 'enterprise_abn', placeholder: "{{'registration.steps.about.enterprise_abn_placeholder' | t}}", ng: { model: 'enterprise.abn' } }
|
||||
.row
|
||||
.small-12.columns
|
||||
.field
|
||||
%label{ for: 'enterprise_acn' } {{'enterprise_acn' | t}}:
|
||||
%input.chunky{ id: 'enterprise_acn', placeholder: "{{'enterprise_acn_placeholder' | t}}", ng: { model: 'enterprise.acn' } }
|
||||
%label{ for: 'enterprise_acn' }= t(".enterprise_acn")+":"
|
||||
%input.chunky{ id: 'enterprise_acn', placeholder: "{{'registration.steps.about.enterprise_acn_placeholder' | t}}", ng: { model: 'enterprise.acn' } }
|
||||
.row
|
||||
.small-12.columns
|
||||
.field
|
||||
@@ -50,7 +50,7 @@
|
||||
%input{ id: 'enterprise_charges_sales_tax_false', type: 'radio', name: 'charges_sales_tax', value: 'false', required: true, ng: { model: 'enterprise.charges_sales_tax' } }
|
||||
%label{ for: 'enterprise_charges_sales_tax_false' } {{'say_no' | t}}
|
||||
%span.error.small-12.columns{ ng: { show: "about.charges_sales_tax.$error.required && submitted" } }
|
||||
{{'enterprise_tax_required' | t}}
|
||||
= t(".enterprise_tax_required")
|
||||
|
||||
.row.buttons.pad-top
|
||||
.small-12.columns
|
||||
|
||||
@@ -4,26 +4,26 @@
|
||||
.row
|
||||
.small-12.columns
|
||||
%header
|
||||
%h2 {{'registration_greeting' | t}}
|
||||
%h5{ "ng-bind" => "'who_is_managing_enterprise' | t:{enterprise: enterprise.name}" }
|
||||
%h2= t('registration.steps.introduction.registration_greeting')
|
||||
%h5{ "ng-bind" => "'registration.steps.contact.who_is_managing_enterprise' | t:{enterprise: enterprise.name}" }
|
||||
|
||||
%form{ name: 'contact', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "selectIfValid('type',contact)" } }
|
||||
.row.content
|
||||
.small-12.medium-12.large-7.columns
|
||||
.row
|
||||
.small-12.columns.field
|
||||
%label{ for: 'enterprise_contact' } {{'enterprise.registration.modal.steps.contact.contact_field' | t}}:
|
||||
%input.chunky.small-12.columns{ id: 'enterprise_contact', name: 'contact_name', required: true, placeholder: "{{'enterprise.registration.modal.steps.contact.contact_field_placeholder' | t}}", ng: { model: 'enterprise.contact_name' } }
|
||||
%label{ for: 'enterprise_contact' }= t(".contact_field")
|
||||
%input.chunky.small-12.columns{ id: 'enterprise_contact', name: 'contact_name', required: true, placeholder: "{{'registration.steps.contact.contact_field_placeholder' | t}}", ng: { model: 'enterprise.contact_name' } }
|
||||
%span.error.small-12.columns{ ng: { show: "contact.contact_name.$error.required && submitted" } }
|
||||
{{'enterprise.registration.modal.steps.contact.contact_field_required' | t}}
|
||||
= t(".contact_field_required")
|
||||
.row
|
||||
.small-12.columns.field
|
||||
%label{ for: 'enterprise_email_address' } {{'admin.enterprises.form.contact.email_address' | t}}:
|
||||
%label{ for: 'enterprise_email_address' }= t("admin.enterprises.form.contact.email_address")+":"
|
||||
%input.chunky.small-12.columns{ id: 'enterprise_email_address', name: 'email_address', type: 'email', placeholder: t('admin.enterprises.form.contact.email_address_placeholder'), ng: { model: 'enterprise.email_address' } }
|
||||
.row
|
||||
.small-12.columns.field
|
||||
%label{ for: 'enterprise_phone' } {{'enterprise.registration.modal.steps.contact.phone_field' | t}}:
|
||||
%input.chunky.small-12.columns{ id: 'enterprise_phone', name: 'phone', placeholder: "{{'enterprise.registration.modal.steps.contact.phone_field_placeholder' | t}}", ng: { model: 'enterprise.phone' } }
|
||||
%label{ for: 'enterprise_phone' }= t(".phone_field")+":"
|
||||
%input.chunky.small-12.columns{ id: 'enterprise_phone', name: 'phone', placeholder: "{{'registration.steps.contact.phone_field_placeholder' | t}}", ng: { model: 'enterprise.phone' } }
|
||||
.small-12.medium-12.large-5.hide-for-small-only
|
||||
|
||||
.row.buttons
|
||||
|
||||
@@ -4,60 +4,59 @@
|
||||
.row
|
||||
.small-12.columns
|
||||
%header
|
||||
%h2 {{'enterprise.registration.modal.steps.details.headline' | t}}
|
||||
%h5{ ng: { if: "::enterprise.type != 'own'" } } {{'enterprise.registration.modal.steps.details.enterprise' | t}}
|
||||
%h5{ ng: { if: "::enterprise.type == 'own'" } } {{'enterprise.registration.modal.steps.details.producer' | t}}
|
||||
%h2= t('.headline')
|
||||
%h5{ ng: { if: "::enterprise.type != 'own'" } }= t(".enterprise")
|
||||
%h5{ ng: { if: "::enterprise.type == 'own'" } }= t(".producer")
|
||||
|
||||
%form{ name: 'details', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "selectIfValid('contact',details)" } }
|
||||
|
||||
.row
|
||||
.small-12.medium-9.large-12.columns.end
|
||||
.field
|
||||
%label{ for: 'enterprise_name', ng: { if: "::enterprise.type != 'own'" } } {{'enterprise.registration.modal.steps.details.enterprise_name_field' | t}}
|
||||
%label{ for: 'enterprise_name', ng: { if: "::enterprise.type == 'own'" } } {{'enterprise.registration.modal.steps.details.producer_name_field' | t}}
|
||||
%input.chunky{ id: 'enterprise_name', name: 'name', placeholder: "{{'enterprise.registration.modal.steps.details.producer_name_field_placeholder' | t}}", required: true, ng: { model: 'enterprise.name' } }
|
||||
%label{ for: 'enterprise_name', ng: { if: "::enterprise.type != 'own'" } }= t(".enterprise_name_field")
|
||||
%label{ for: 'enterprise_name', ng: { if: "::enterprise.type == 'own'" } }= t(".producer_name_field")
|
||||
%input.chunky{ id: 'enterprise_name', name: 'name', placeholder: "{{'registration.steps.details.producer_name_field_placeholder' | t}}", required: true, ng: { model: 'enterprise.name' } }
|
||||
%span.error{ ng: { show: "details.name.$error.required && submitted" } }
|
||||
{{'enterprise.registration.modal.steps.details.producer_name_field_error' | t}}
|
||||
= t(".producer_name_field_error")
|
||||
|
||||
.row
|
||||
.small-12.medium-9.large-6.columns
|
||||
.field
|
||||
%label{ for: 'enterprise_address' } {{'enterprise.registration.modal.steps.details.address1_field' | t}}
|
||||
%input.chunky{ id: 'enterprise_address', name: 'address1', required: true, placeholder: "{{'enterprise.registration.modal.steps.details.address1_field_placeholder' | t}}", required: true, ng: { model: 'enterprise.address.address1' } }
|
||||
%label{ for: 'enterprise_address' }= t(".address1_field")
|
||||
%input.chunky{ id: 'enterprise_address', name: 'address1', required: true, placeholder: "{{'registration.steps.details.address1_field_placeholder' | t}}", required: true, ng: { model: 'enterprise.address.address1' } }
|
||||
%span.error{ ng: { show: "details.address1.$error.required && submitted" } }
|
||||
{{'enterprise.registration.modal.steps.details.address1_field_error' | t}}
|
||||
= t(".address1_field_error")
|
||||
.field
|
||||
%label{ for: 'enterprise_address2' } {{'enterprise.registration.modal.steps.details.address2_field' | t}}
|
||||
%label{ for: 'enterprise_address2' }= t(".address2_field")
|
||||
%input.chunky{ id: 'enterprise_address2', name: 'address2', required: false, placeholder: "", required: false, ng: { model: 'enterprise.address.address2' } }
|
||||
|
||||
.small-12.medium-9.large-6.columns.end
|
||||
.row
|
||||
.small-12.medium-8.large-8.columns
|
||||
.field
|
||||
%label{ for: 'enterprise_city' } {{'enterprise.registration.modal.steps.details.suburb_field' | t}}
|
||||
%input.chunky{ id: 'enterprise_city', name: 'city', required: true, placeholder: "{{'enterprise.registration.modal.steps.details.suburb_field_placeholder' | t}}", ng: { model: 'enterprise.address.city' } }
|
||||
%label{ for: 'enterprise_city' }= t('.suburb_field')
|
||||
%input.chunky{ id: 'enterprise_city', name: 'city', required: true, placeholder: "{{'registration.steps.details.suburb_field_placeholder' | t}}", ng: { model: 'enterprise.address.city' } }
|
||||
%span.error{ ng: { show: "details.city.$error.required && submitted" } }
|
||||
{{'enterprise.registration.modal.steps.details.suburb_field_error' | t}}
|
||||
= t(".suburb_field_error")
|
||||
.small-12.medium-4.large-4.columns
|
||||
.field
|
||||
%label{ for: 'enterprise_zipcode' } {{'enterprise.registration.modal.steps.details.postcode_field' | t}}
|
||||
%input.chunky{ id: 'enterprise_zipcode', name: 'zipcode', required: true, placeholder: "{{'enterprise.registration.modal.steps.details.postcode_field_placeholder' | t}}", ng: { model: 'enterprise.address.zipcode' } }
|
||||
%label{ for: 'enterprise_zipcode' }= t(".postcode_field")
|
||||
%input.chunky{ id: 'enterprise_zipcode', name: 'zipcode', required: true, placeholder: "{{'registration.steps.details.postcode_field_placeholder' | t}}", ng: { model: 'enterprise.address.zipcode' } }
|
||||
%span.error{ ng: { show: "details.zipcode.$error.required && submitted" } }
|
||||
{{'enterprise.registration.modal.steps.details.postcode_field_error' | t}}
|
||||
= t(".postcode_field_error")
|
||||
.row
|
||||
.small-12.medium-4.large-4.columns
|
||||
.field
|
||||
%label{ for: 'enterprise_state' } {{'enterprise.registration.modal.steps.details.state_field' | t}}
|
||||
%label{ for: 'enterprise_state' }= t(".state_field")
|
||||
%select.chunky{ id: 'enterprise_state', name: 'state', ng: { model: 'enterprise.address.state_id', options: 's.id as s.abbr for s in enterprise.country.states', show: 'countryHasStates()', required: 'countryHasStates()' } }
|
||||
%span.error{ ng: { show: "details.state.$error.required && submitted" } }
|
||||
{{'enterprise.registration.modal.steps.details.state_field_error' | t}}
|
||||
= t(".state_field_error")
|
||||
.small-12.medium-8.large-8.columns
|
||||
.field
|
||||
%label{ for: 'enterprise_country' } {{'enterprise.registration.modal.steps.details.country_field' | t}}
|
||||
%label{ for: 'enterprise_country' }= t(".country_field")
|
||||
%select.chunky{ id: 'enterprise_country', name: 'country', required: true, ng: { init: "setDefaultCountry(#{Spree::Config[:default_country_id]})", model: 'enterprise.country', options: 'c as c.name for c in countries' } }
|
||||
%span.error{ ng: { show: "details.country.$error.required && submitted" } }
|
||||
{{'enterprise.registration.modal.steps.details.country_field_error' | t}}
|
||||
|
||||
= t(".country_field_error")
|
||||
|
||||
.row.buttons
|
||||
.small-12.columns
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
.row
|
||||
.small-12.columns.pad-top
|
||||
%header
|
||||
%h2 {{'registration_finished_headline' | t}}
|
||||
%h2= t(".headline")
|
||||
.panel.callout
|
||||
%p{ "ng-bind" => "'registration_finished_thanks' | t:{enterprise: enterprise.name}" }
|
||||
%p {{'registration_finished_login' | t}}
|
||||
%p{ "ng-bind" => "'registration.steps.finished.thanks' | t:{enterprise: enterprise.name}" }
|
||||
%p= t(".login")
|
||||
.row
|
||||
.small-12.columns.text-center
|
||||
%a.button.primary{ type: "button", href: "/" } {{'registration_finished_action' | t}} >
|
||||
%a.button.primary{ type: "button", href: "/" }= "#{t(".action")} >"
|
||||
|
||||
@@ -2,35 +2,35 @@
|
||||
.row
|
||||
.small-12.columns
|
||||
%header
|
||||
%h2 {{'registration_greeting' | t}}
|
||||
%h2= t(".registration_greeting")
|
||||
%h4
|
||||
%small
|
||||
%i.ofn-i_040-hub
|
||||
{{'registration_intro' | t}}
|
||||
= t(".registration_intro")
|
||||
|
||||
.row{ 'data-equalizer' => true }
|
||||
.small-12.medium-12.large-6.columns.pad-top{ 'data-equalizer-watch' => true }
|
||||
%h5 {{'registration_checklist' | t}}:
|
||||
%h5= t(".registration_checklist")+":"
|
||||
%ul.check-list
|
||||
%li
|
||||
{{'registration_time' | t}}
|
||||
= t(".registration_time")
|
||||
%li
|
||||
{{'registration_enterprise_address' | t}}
|
||||
= t(".registration_enterprise_address")
|
||||
%li
|
||||
{{'registration_contact_details' | t}}
|
||||
= t(".registration_contact_details")
|
||||
%li
|
||||
{{'registration_logo' | t}}
|
||||
= t(".registration_logo")
|
||||
%li
|
||||
{{'registration_promo_image' | t}}
|
||||
= t(".registration_promo_image")
|
||||
%li
|
||||
{{'registration_about_us' | t}}
|
||||
= t(".registration_about_us")
|
||||
|
||||
.small-9.medium-8.large-5.columns.pad-top.end{ 'data-equalizer-watch' => true}
|
||||
%h5
|
||||
{{'registration_outcome_headline' | t}}
|
||||
%p{ "ng-bind-html" => "t('registration_outcome1_html')" }
|
||||
%p {{'registration_outcome2' | t}}
|
||||
%p {{'registration_outcome3' | t}}
|
||||
= t(".registration_outcome_headline")
|
||||
%p= t(".registration_outcome1_html")
|
||||
%p= t(".registration_outcome2")
|
||||
%p= t(".registration_outcome3")
|
||||
|
||||
.row{'ng-init' => "tos_required=#{Spree::Config.enterprises_require_tos}" }
|
||||
%hr
|
||||
@@ -43,4 +43,4 @@
|
||||
%label{for: "accept_terms"} #{t(:enterprise_tos_agree)}
|
||||
|
||||
.small-12.medium-6.columns
|
||||
%input.button.primary.left{ type: "button", value: "{{'registration_action' | t}}", ng: { click: "select('details')", disabled: "tos_required && !tos_accepted", model: "tos_accepted"} }
|
||||
%input.button.primary.left{ type: "button", value: "{{'registration.steps.introduction.registration_action' | t}}", ng: { click: "select('details')", disabled: "tos_required && !tos_accepted", model: "tos_accepted"} }
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
.row
|
||||
.small-12.columns
|
||||
%header
|
||||
%h2 {{'limit_reached_headline' | t}}
|
||||
%h4 {{'limit_reached_message' | t}}
|
||||
%h2= t(".headline")
|
||||
%h4= t(".message")
|
||||
.row
|
||||
.small-12.medium-3.large-2.columns.text-right.hide-for-small-only
|
||||
%img{:src => "/assets/potatoes.png"}
|
||||
.small-12.medium-9.large-10.columns
|
||||
%p
|
||||
{{'limit_reached_text' | t}}
|
||||
= t(".text")
|
||||
%strong Open Food Network.
|
||||
.row
|
||||
.small-12.columns
|
||||
%hr
|
||||
%input.button.primary{ type: "button", value: "{{'limit_reached_action' | t}}", ng: { click: "close()" } }
|
||||
%input.button.primary{ type: "button", value: "{{'registration.steps.limit_reached.action' | t}}", ng: { click: "close()" } }
|
||||
|
||||
@@ -5,42 +5,42 @@
|
||||
.row
|
||||
.small-12.columns.center
|
||||
%h4
|
||||
{{'select_logo' | t}}
|
||||
= t(".select_logo")
|
||||
.row
|
||||
.small-12.columns.center
|
||||
%span.small
|
||||
{{'logo_tip' | t}}
|
||||
= t(".logo_tip")
|
||||
.row.pad-top
|
||||
.small-12.columns
|
||||
.image-select.small-12.columns
|
||||
%label.small-12.columns.button{ for: 'image-select' } {{'logo_label' | t}}
|
||||
%label.small-12.columns.button{ for: 'image-select' }= t(".logo_label")
|
||||
%input#image-select{ type: 'file', hidden: true, 'nv-file-select' => true, uploader: "imageUploader", options: '{ alias: imageStep }' }
|
||||
.row.show-for-large-up
|
||||
.large-12.columns
|
||||
%span#or.large-12.columns
|
||||
{{'action_or' | t}}
|
||||
= t("action_or")
|
||||
.row.show-for-large-up
|
||||
.large-12.columns
|
||||
#image-over{ 'nv-file-over' => true, uploader: "imageUploader" }
|
||||
{{'logo_drag' | t}}
|
||||
= t(".logo_drag")
|
||||
.small-12.medium-12.large-6.columns
|
||||
.row
|
||||
.small-12.columns.center
|
||||
.row
|
||||
.small-12.columns.center
|
||||
%h4
|
||||
{{'review_logo' | t}}
|
||||
= t(".review_logo")
|
||||
.row
|
||||
.small-12.columns.center
|
||||
%span.small
|
||||
{{'review_logo_tip' | t}}
|
||||
= t(".review_logo_tip")
|
||||
.row.pad-top
|
||||
.small-12.columns.center
|
||||
#image-placeholder.logo
|
||||
%img{ ng: { show: "imageSrc() && !imageUploader.isUploading", src: '{{ imageSrc() }}' } }
|
||||
.message{ ng: { hide: "imageSrc() || imageUploader.isUploading" } }
|
||||
{{'logo_placeholder' | t}}
|
||||
= t(".logo_placeholder")
|
||||
.loading{ ng: { hide: "!imageUploader.isUploading" } }
|
||||
%img.spinner{ src: "/assets/spinning-circles.svg" }
|
||||
%br/
|
||||
{{'uploading' | t}}
|
||||
= t("registration.steps.images.uploading")
|
||||
|
||||
@@ -3,42 +3,42 @@
|
||||
.row
|
||||
.small-12.columns.center
|
||||
%h4
|
||||
{{'select_promo_image' | t}}
|
||||
= t(".select_promo_image")
|
||||
.row
|
||||
.small-12.medium-12.large-5.columns.center
|
||||
.row
|
||||
.small-12.columns.center
|
||||
%span.small
|
||||
{{'promo_image_tip' | t}}
|
||||
= t(".promo_image_tip")
|
||||
.row.pad-top
|
||||
.small-12.columns
|
||||
.image-select.small-12.columns
|
||||
%label.small-12.columns.button{ for: 'image-select' } {{'promo_image_label' | t}}
|
||||
%label.small-12.columns.button{ for: 'image-select' }= t(".promo_image_label")
|
||||
%input#image-select{ type: 'file', hidden: true, 'nv-file-select' => true, uploader: "imageUploader", options: '{ alias: imageStep }' }
|
||||
.large-2.columns
|
||||
%span#or.horizontal.large-12.columns
|
||||
{{'action_or' | t}}
|
||||
= t("action_or")
|
||||
.large-5.columns
|
||||
#image-over{ 'nv-file-over' => true, uploader: "imageUploader" }
|
||||
{{'promo_image_drag' | t}}
|
||||
= t(".promo_image_drag")
|
||||
.small-12.medium-12.large-12.columns.pad-top
|
||||
.row
|
||||
.small-12.columns.center
|
||||
%h4
|
||||
{{'review_promo_image' | t}}
|
||||
= t(".review_promo_image")
|
||||
.row
|
||||
.small-12.columns.center
|
||||
.row
|
||||
.small-12.columns.center
|
||||
%span.small
|
||||
{{'review_promo_image_tip' | t}}
|
||||
= t(".review_promo_image_tip")
|
||||
.row.pad-top
|
||||
.small-12.columns.center
|
||||
#image-placeholder.promo
|
||||
%img{ ng: { show: "imageSrc() && !imageUploader.isUploading", src: '{{ imageSrc() }}' } }
|
||||
.message{ ng: { hide: "imageSrc() || imageUploader.isUploading" } }
|
||||
{{'promo_image_placeholder' | t}}
|
||||
= t(".promo_image_placeholder")
|
||||
.loading{ ng: { hide: "!imageUploader.isUploading" } }
|
||||
%img.spinner{ src: "/assets/spinning-circles.svg" }
|
||||
%br/
|
||||
{{'uploading' | t}}
|
||||
= t("registration.steps.images.uploading")
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
.row
|
||||
.small-12.columns
|
||||
%header
|
||||
%h2 {{'enterprise_final_step' | t}}
|
||||
%h5{ "ng-bind" => "'enterprise_social_text' | t:{enterprise: enterprise.name}" }
|
||||
%h2= t(".enterprise_final_step")
|
||||
%h5{ "ng-bind" => "'registration.steps.social.enterprise_social_text' | t:{enterprise: enterprise.name}" }
|
||||
|
||||
%form{ name: 'social', novalidate: true, ng: { controller: "RegistrationFormCtrl", submit: "update('finished',social)" } }
|
||||
.row.content
|
||||
@@ -14,29 +14,29 @@
|
||||
.row
|
||||
.small-12.columns
|
||||
.field
|
||||
%label{ for: 'enterprise_website' } {{'website' | t}}:
|
||||
%input.chunky{ id: 'enterprise_website', placeholder: "{{'website_placeholder' | t}}", ng: { model: 'enterprise.website' } }
|
||||
%label{ for: 'enterprise_website' }= t(".website")+":"
|
||||
%input.chunky{ id: 'enterprise_website', placeholder: "{{'registration.steps.social.website_placeholder' | t}}", ng: { model: 'enterprise.website' } }
|
||||
.row
|
||||
.small-12.columns
|
||||
.field
|
||||
%label{ for: 'enterprise_facebook' } {{'facebook' | t}}:
|
||||
%input.chunky{ id: 'enterprise_facebook', placeholder: "{{'facebook_placeholder' | t}}", ng: { model: 'enterprise.facebook' } }
|
||||
%label{ for: 'enterprise_facebook' }= t(".facebook")+":"
|
||||
%input.chunky{ id: 'enterprise_facebook', placeholder: "{{'registration.steps.social.facebook_placeholder' | t}}", ng: { model: 'enterprise.facebook' } }
|
||||
.row
|
||||
.small-12.columns
|
||||
.field
|
||||
%label{ for: 'enterprise_linkedin' } {{'linkedin' | t}}:
|
||||
%input.chunky{ id: 'enterprise_linkedin', placeholder: "{{'linkedin_placeholder' | t}}", ng: { model: 'enterprise.linkedin' } }
|
||||
%label{ for: 'enterprise_linkedin' }= t(".linkedin")+":"
|
||||
%input.chunky{ id: 'enterprise_linkedin', placeholder: "{{'registration.steps.social.linkedin_placeholder' | t}}", ng: { model: 'enterprise.linkedin' } }
|
||||
.small-12.large-5.columns
|
||||
.row
|
||||
.small-12.columns
|
||||
.field
|
||||
%label{ for: 'enterprise_twitter' } {{'twitter' | t}}:
|
||||
%input.chunky{ id: 'enterprise_twitter', placeholder: "{{'twitter_placeholder' | t}}", ng: { model: 'enterprise.twitter' } }
|
||||
%label{ for: 'enterprise_twitter' }= t(".twitter")+":"
|
||||
%input.chunky{ id: 'enterprise_twitter', placeholder: "{{'registration.steps.social.twitter_placeholder' | t}}", ng: { model: 'enterprise.twitter' } }
|
||||
.row
|
||||
.small-12.columns
|
||||
.field
|
||||
%label{ for: 'enterprise_instagram' } {{'instagram' | t}}:
|
||||
%input.chunky{ id: 'enterprise_instagram', placeholder: "{{'instagram_placeholder' | t}}", ng: { model: 'enterprise.instagram' } }
|
||||
%label{ for: 'enterprise_instagram' }= t(".instagram")+":"
|
||||
%input.chunky{ id: 'enterprise_instagram', placeholder: "{{'registration.steps.social.instagram_placeholder' | t}}", ng: { model: 'enterprise.instagram' } }
|
||||
|
||||
.row.buttons
|
||||
.small-12.columns
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
%script{ type: "text/ng-template", id: "registration/steps.html" }
|
||||
.row#progress-bar
|
||||
.small-12.medium-2.columns.item{ ng: { repeat: 'step in steps', class: "{active: (currentStep() == step),'show-for-medium-up': (currentStep() != step)}" } }
|
||||
{{ $index+1 + ". " + ('enterprise.registration.modal.steps.' + step + '.title' | t) }}
|
||||
{{ $index+1 + ". " + ('registration.steps.' + step + '.title' | t) }}
|
||||
|
||||
|
||||
5
config/initializers/bugsnag.rb
Normal file
5
config/initializers/bugsnag.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
Bugsnag.configure do |config|
|
||||
config.api_key = ENV['BUGSNAG_API_KEY']
|
||||
config.notify_release_stages = %w(production staging)
|
||||
config.use_ssl = true
|
||||
end
|
||||
@@ -31,6 +31,16 @@ ca:
|
||||
on_demand_but_count_on_hand_set: "ha d'estar en blanc si és sota demanda"
|
||||
limited_stock_but_no_count_on_hand: "cal especificar-se perquè força existències limitades"
|
||||
activemodel:
|
||||
attributes:
|
||||
order_management/reports/enterprise_fee_summary/parameters:
|
||||
start_at: "Començar"
|
||||
end_at: "Acabar"
|
||||
distributor_ids: "Grups"
|
||||
producer_ids: "Productors"
|
||||
order_cycle_ids: "Cicles de comanda"
|
||||
enterprise_fee_ids: "Noms de les comissions"
|
||||
shipping_method_ids: "Mètodes d'enviament"
|
||||
payment_method_ids: "Mètodes de Pagament"
|
||||
errors:
|
||||
models:
|
||||
subscription_validator:
|
||||
@@ -74,6 +84,13 @@ ca:
|
||||
models:
|
||||
order_cycle:
|
||||
cloned_order_cycle_name: "CÒPIA DE %{order_cycle}"
|
||||
validators:
|
||||
date_time_string_validator:
|
||||
not_string_error: "ha de ser una seqüència"
|
||||
invalid_format_error: "ha de ser vàlid"
|
||||
integer_array_validator:
|
||||
not_array_error: "ha de ser una matriu"
|
||||
invalid_element_error: "ha de contenir només nombres enters vàlids"
|
||||
enterprise_mailer:
|
||||
confirmation_instructions:
|
||||
subject: "Sisplau, confirma l'adreça electrònica d'%{enterprise}"
|
||||
@@ -318,7 +335,7 @@ ca:
|
||||
business_model_configuration:
|
||||
edit:
|
||||
business_model_configuration: "Model de sostenibilitat"
|
||||
business_model_configuration_tip: "Configureu la tarifa què es cobrarà a les botigues cada mes per utilitzar la Xarxa Open Food."
|
||||
business_model_configuration_tip: "Configureu la tarifa què es cobrarà a les botigues cada mes per utilitzar Open Food Network."
|
||||
bill_calculation_settings: "Configuració del càlcul de ticket"
|
||||
bill_calculation_settings_tip: "Ajusteu la quantitat que es facturarà a les organitzacions cada mes per utilitzar l'OFN."
|
||||
shop_trial_length: "Durada de la prova de la botiga (dies)"
|
||||
@@ -418,9 +435,9 @@ ca:
|
||||
user_guide: Guia de l'usuari
|
||||
enterprise_fees:
|
||||
index:
|
||||
title: Tarifes de l'organització
|
||||
title: Comissions de l'organització
|
||||
enterprise: Organització
|
||||
fee_type: Tipus de tarifa
|
||||
fee_type: Tipus de comissió
|
||||
name: Nom
|
||||
tax_category: Categoria d'impostos
|
||||
calculator: Calculadora
|
||||
@@ -634,8 +651,8 @@ ca:
|
||||
website_placeholder: 'p. ex.: www.hortajosepribes.com'
|
||||
enterprise_fees:
|
||||
name: Nom
|
||||
fee_type: Tipus de tarifa
|
||||
manage_fees: Gestioneu les tarifes de l'organització
|
||||
fee_type: Tipus de comissió
|
||||
manage_fees: Gestioneu les comissions de l'organització
|
||||
no_fees_yet: Encara no tens cap tipus de comissió de l'organització
|
||||
create_button: Crea'n una ara
|
||||
images:
|
||||
@@ -737,7 +754,7 @@ ca:
|
||||
title: Connectar amb Stripe
|
||||
part1: Stripe és un servei de processament de pagaments que permet que les botigues de l'OFN acceptin els pagaments amb targeta de crèdit de les consumidores.
|
||||
part2: Per utilitzar aquesta funció heu de connectar el vostre compte Stripe a l'OFN. Si feu clic a "Accepto", us redirigirem al lloc web de Stripe on podeu connectar un compte Stripe existent o bé crear-ne un si encara no en teniu cap.
|
||||
part3: Això permetrà que Open Food Network accepti pagaments amb targeta de crèdit de consumidores en nom vostre. Tingueu en compte que haureu de mantenir el vostre propi compte de Stripe, pagar-ne les tarifes i mantenir el servei a les consumidores pel teu compte.
|
||||
part3: Això permetrà que Open Food Network accepti pagaments amb targeta de crèdit de consumidores en nom vostre. Tingueu en compte que haureu de mantenir el vostre propi compte de Stripe, pagar-ne les comissions i mantenir el servei a les consumidores pel teu compte.
|
||||
i_agree: Accepto
|
||||
cancel: Cancel·lar
|
||||
tag_rules:
|
||||
@@ -775,7 +792,7 @@ ca:
|
||||
payment_methods_tip: Aquesta organització no té mètodes de pagament
|
||||
shipping_methods: Mètodes d'enviament
|
||||
shipping_methods_tip: 'Aquesta organització té mètodes d''enviament '
|
||||
enterprise_fees: Honoraris de l'organització
|
||||
enterprise_fees: Comissions de l'organització
|
||||
enterprise_fees_tip: Aquesta organització no té comissions
|
||||
admin_index:
|
||||
name: Nom
|
||||
@@ -873,7 +890,7 @@ ca:
|
||||
incoming: Entrant
|
||||
supplier: Proveïdora
|
||||
receival_details: Detalls de recepció
|
||||
fees: Tarifes
|
||||
fees: Comissions
|
||||
outgoing: Sortint
|
||||
distributor: Distribuïdora
|
||||
products: Productes
|
||||
@@ -911,7 +928,7 @@ ca:
|
||||
customer_instructions: Instruccions de la consumidora
|
||||
customer_instructions_placeholder: Notes de recollida o de lliurament
|
||||
products: Productes
|
||||
fees: Tarifes
|
||||
fees: Comissions
|
||||
destroy_errors:
|
||||
orders_present: Una consumidora ha seleccionat aquest Cicle de Comanda i no es pot esborrar. Per evitar que les consumidores hi accedeixin, tanqueu-lo.
|
||||
schedule_present: Aquest cicle de comanda està vinculat a una programació i no es pot esborrar. Desenllaça o suprimeix primer la programació.
|
||||
@@ -996,6 +1013,9 @@ ca:
|
||||
description: Factures per a la importació a Xero
|
||||
packing:
|
||||
name: Informes d'embalatge
|
||||
enterprise_fee_summary:
|
||||
name: "Resum de les comissions de l'organització"
|
||||
description: "Resum de les comissions de l'organització recollides"
|
||||
subscriptions:
|
||||
subscriptions: Subscripcions
|
||||
new: Nova subscripció
|
||||
@@ -1883,7 +1903,7 @@ ca:
|
||||
shipping_method_destroy_error: "Aquest mètode d'enviament no es pot esborrar perquè s'hi fa referència en una comanda: %{number}."
|
||||
accounts_and_billing_task_already_running_error: "Ja s'està executant una tasca, espera fins que hagi acabat"
|
||||
accounts_and_billing_start_task_notice: "Tasca en cua"
|
||||
fees: "Tarifes"
|
||||
fees: "Comissions"
|
||||
item_cost: "Cost de l'article"
|
||||
bulk: "A granel"
|
||||
shop_variant_quantity_min: "min"
|
||||
@@ -1955,7 +1975,7 @@ ca:
|
||||
process_my_order: "Processa la meva comanda"
|
||||
delivery_instructions: Instruccions de lliurament
|
||||
delivery_method: Mètode de lliurament
|
||||
fee_type: "Tipus de tarifa"
|
||||
fee_type: "Tipus de comissió"
|
||||
tax_category: "Categoria d'impostos"
|
||||
calculator: "Calculadora"
|
||||
calculator_values: "Valors de la calculadora"
|
||||
@@ -2000,7 +2020,6 @@ ca:
|
||||
spree_admin_enterprises_none_text: "Encara no tens cap organització"
|
||||
spree_admin_enterprises_tabs_hubs: "GRUPS"
|
||||
spree_admin_enterprises_producers_manage_products: "GESTIONA ELS PRODUCTES"
|
||||
spree_admin_enterprises_any_active_products_text: "No tens cap producte actiu."
|
||||
spree_admin_enterprises_create_new_product: "CREA UN NOU PRODUCTE"
|
||||
spree_admin_single_enterprise_alert_mail_confirmation: "Si us plau confirma l'adreça de correu electrònic de"
|
||||
spree_admin_single_enterprise_alert_mail_sent: "Hem enviat un correu electrònic a"
|
||||
@@ -2127,7 +2146,7 @@ ca:
|
||||
report_header_sales_tax: "Impost sobre vendes (%{currency_symbol})"
|
||||
report_header_delivery_charge: "Càrrec de lliurament (%{currency_symbol})"
|
||||
report_header_tax_on_delivery: "Impost sobre el lliurament (%{currency_symbol})"
|
||||
report_header_tax_on_fees: "Impost sobre les tarifes (%{currency_symbol})"
|
||||
report_header_tax_on_fees: "Impost sobre les comissions (%{currency_symbol})"
|
||||
report_header_total_tax: "Impost total (%{currency_symbol})"
|
||||
report_header_enterprise: Organització
|
||||
report_header_customer: Consumidora
|
||||
@@ -2248,7 +2267,7 @@ ca:
|
||||
shipping: "Enviament"
|
||||
shipping_methods: "Mètodes d'enviament"
|
||||
payment_methods: "Mètodes de Pagament"
|
||||
payment_method_fee: "Tarifa de transacció"
|
||||
payment_method_fee: "Comissió de transacció"
|
||||
inventory_settings: "Configuració de l'inventari"
|
||||
tag_rules: "Regles d'etiqueta"
|
||||
shop_preferences: "Preferències de la botiga"
|
||||
@@ -2526,6 +2545,45 @@ ca:
|
||||
producers:
|
||||
signup:
|
||||
start_free_profile: "Comença amb un perfil gratuït i amplia'l quan estiguis preparada."
|
||||
order_management:
|
||||
reports:
|
||||
enterprise_fee_summary:
|
||||
date_end_before_start_error: "ha de ser després de l'inici"
|
||||
parameter_not_allowed_error: "No esteu autoritzats a utilitzar un o més filtres seleccionats per a aquest informe."
|
||||
fee_calculated_on_transfer_through_all: "Tots"
|
||||
fee_calculated_on_transfer_through_entire_orders: "Comandes completades a través de"
|
||||
tax_category_various: "Varis"
|
||||
fee_type:
|
||||
payment_method: "Transacció de pagament"
|
||||
shipping_method: "Enviament"
|
||||
fee_placements:
|
||||
supplier: "Entrant"
|
||||
distributor: "Sortint"
|
||||
coordinator: "Coordinador"
|
||||
tax_category_name:
|
||||
shipping_instance_rate: "Tarifa de la plataforma"
|
||||
formats:
|
||||
csv:
|
||||
header:
|
||||
fee_type: "Tipus de comissió"
|
||||
enterprise_name: "Propietària de l'organització"
|
||||
fee_name: "Nom de la comissió"
|
||||
customer_name: "Consumidora"
|
||||
fee_placement: "Col·locació de comissions"
|
||||
fee_calculated_on_transfer_through_name: "Càlcul de comissions a través de transferència"
|
||||
tax_category_name: "Categoria d'impostos"
|
||||
total_amount: "€€ SUM"
|
||||
html:
|
||||
header:
|
||||
fee_type: "Tipus de comissió"
|
||||
enterprise_name: "Propietària de l'organització"
|
||||
fee_name: "Nom de la comissió"
|
||||
customer_name: "Consumidora"
|
||||
fee_placement: "Col·locació de comissions"
|
||||
fee_calculated_on_transfer_through_name: "Càlcul de comissions a través de transferència"
|
||||
tax_category_name: "Categoria d'impostos"
|
||||
total_amount: "€€ SUM"
|
||||
invalid_filter_parameters: "Els filtres que heu seleccionat per a aquest informe no són vàlids."
|
||||
spree:
|
||||
email: Correu electrònic
|
||||
account_updated: "Compte actualitzat!"
|
||||
@@ -2569,6 +2627,11 @@ ca:
|
||||
distributor: "Distribuïdora:"
|
||||
order_cycle: "Cicle de comanda:"
|
||||
overview:
|
||||
products:
|
||||
active_products:
|
||||
zero: "No tens cap producte actiu."
|
||||
one: "Teniu un producte actiu"
|
||||
other: "Teniu %{count} productes actius"
|
||||
order_cycles:
|
||||
order_cycles: "Cicles de comanda"
|
||||
order_cycles_tip: "Els cicles de comanda determinen quan i on els teus productes estan disponibles per a les consumidores."
|
||||
@@ -2642,6 +2705,14 @@ ca:
|
||||
bulk_coop_allocation: 'Compra grupal - Assignació'
|
||||
bulk_coop_packing_sheets: 'Compra grupal - Fulls de preparació de cistelles'
|
||||
bulk_coop_customer_payments: 'Compra grupal - Pagaments de les consumidores'
|
||||
enterprise_fee_summaries:
|
||||
filters:
|
||||
date_range: "Interval de dates"
|
||||
report_format_csv: "Descarrega com a CSV"
|
||||
generate_report: "Generar informe"
|
||||
report:
|
||||
none: "No productora"
|
||||
select_and_search: "Seleccioneu els filtres i feu clic a GENERAR INFORME per accedir a les dades."
|
||||
users:
|
||||
index:
|
||||
listing_users: "Llistat d'usuàries"
|
||||
|
||||
@@ -1872,24 +1872,60 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
choose_password: "Choose a password"
|
||||
confirm_password: "Confirm password"
|
||||
action_signup: "Sign up now"
|
||||
welcome_to_ofn: "Welcome to the Open Food Network!"
|
||||
signup_or_login: "Start By Signing Up (or logging in)"
|
||||
have_an_account: "Already have an account?"
|
||||
action_login: "Log in now."
|
||||
forgot_password: "Forgot Password?"
|
||||
password_reset_sent: "An email with instructions on resetting your password has been sent!"
|
||||
reset_password: "Reset password"
|
||||
registration_greeting: "Greetings!"
|
||||
who_is_managing_enterprise: "Who is responsible for managing %{enterprise}?"
|
||||
update_and_recalculate_fees: "Update And Recalculate Fees"
|
||||
registration:
|
||||
steps:
|
||||
images:
|
||||
continue: "Continue"
|
||||
back: "Back"
|
||||
headline: "Thanks!"
|
||||
description: "Let's upload some pretty pictures so your profile looks great! :)"
|
||||
introduction:
|
||||
registration_greeting: "Hi there!"
|
||||
registration_intro: "You can now create a profile for your Producer or Hub"
|
||||
registration_checklist: "You'll need"
|
||||
registration_time: "5-10 minutes"
|
||||
registration_enterprise_address: "Enterprise address"
|
||||
registration_contact_details: "Primary contact details"
|
||||
registration_logo: "Your logo image"
|
||||
registration_promo_image: "Landscape image for your profile"
|
||||
registration_about_us: "'About Us' text"
|
||||
registration_outcome_headline: "What do I get?"
|
||||
registration_outcome1_html: "Your profile helps people <strong>find</strong> and <strong>contact</strong> you on the Open Food Network."
|
||||
registration_outcome2: "Use this space to tell the story of your enterprise, to help drive connections to your social and online presence."
|
||||
registration_outcome3: "It's also the first step towards trading on the Open Food Network, or opening an online store."
|
||||
registration_action: "Let's get started!"
|
||||
details:
|
||||
title: "Details"
|
||||
headline: "Let's Get Started"
|
||||
enterprise: "Woot! First need to know a little bit about your enterprise:"
|
||||
producer: "Woot! First we need to know a little bit about your farm:"
|
||||
enterprise_name_field: "Enterprise Name:"
|
||||
producer_name_field: "Farm Name:"
|
||||
producer_name_field_placeholder: "e.g. Charlie's Awesome Farm"
|
||||
producer_name_field_error: "Please choose a unique name for your enterprise"
|
||||
address1_field: "Address line 1:"
|
||||
address1_field_placeholder: "e.g. 123 Cranberry Drive"
|
||||
address1_field_error: "Please enter an address"
|
||||
address2_field: "Address line 2:"
|
||||
suburb_field: "Suburb:"
|
||||
suburb_field_placeholder: "e.g. Northcote"
|
||||
suburb_field_error: "Please enter a suburb"
|
||||
postcode_field: "Postcode:"
|
||||
postcode_field_placeholder: "e.g. 3070"
|
||||
postcode_field_error: "Postcode required"
|
||||
state_field: "State:"
|
||||
state_field_error: "State required"
|
||||
country_field: "Country:"
|
||||
country_field_error: "Please select a country"
|
||||
contact:
|
||||
title: "Contact"
|
||||
who_is_managing_enterprise: "Who is responsible for managing %{enterprise}?"
|
||||
contact_field: "Primary Contact"
|
||||
contact_field_placeholder: "Contact Name"
|
||||
contact_field_required: "You need to enter a primary contact."
|
||||
phone_field: "Phone number"
|
||||
phone_field_placeholder: "eg. (03) 1234 5678"
|
||||
type:
|
||||
title: "Type"
|
||||
headline: "Last step to add %{enterprise}!"
|
||||
question: "Are you a producer?"
|
||||
yes_producer: "Yes, I'm a producer"
|
||||
@@ -1898,161 +1934,75 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
yes_producer_help: "Producers make yummy things to eat and/or drink. You're a producer if you grow it, raise it, brew it, bake it, ferment it, milk it or mould it."
|
||||
no_producer_help: "If you’re not a producer, you’re probably someone who sells and distributes food. You might be a hub, coop, buying group, retailer, wholesaler or other."
|
||||
create_profile: "Create Profile"
|
||||
enterprise:
|
||||
registration:
|
||||
modal:
|
||||
steps:
|
||||
details:
|
||||
title: 'Details'
|
||||
headline: "Let's Get Started"
|
||||
enterprise: "Woot! First we need to know a little bit about your enterprise:"
|
||||
producer: "Woot! First we need to know a little bit about your farm:"
|
||||
enterprise_name_field: "Enterprise Name:"
|
||||
producer_name_field: "Farm Name:"
|
||||
producer_name_field_placeholder: "e.g. Charlie's Awesome Farm"
|
||||
producer_name_field_error: "Please choose a unique name for your enterprise"
|
||||
address1_field: "Address line 1:"
|
||||
address1_field_placeholder: "e.g. 123 Cranberry Drive"
|
||||
address1_field_error: "Please enter an address"
|
||||
address2_field: "Address line 2:"
|
||||
suburb_field: "Suburb:"
|
||||
suburb_field_placeholder: "e.g. Northcote"
|
||||
suburb_field_error: "Please enter a suburb"
|
||||
postcode_field: "Postcode:"
|
||||
postcode_field_placeholder: "e.g. 3070"
|
||||
postcode_field_error: "Postcode required"
|
||||
state_field: "State:"
|
||||
state_field_error: "State required"
|
||||
country_field: "Country:"
|
||||
country_field_error: "Please select a country"
|
||||
contact:
|
||||
title: 'Contact'
|
||||
contact_field: 'Primary Contact'
|
||||
contact_field_placeholder: 'Contact Name'
|
||||
contact_field_required: "You need to enter a primary contact."
|
||||
email_field: 'Email address'
|
||||
email_field_placeholder: 'eg. charlie@thefarm.com'
|
||||
phone_field: 'Phone number'
|
||||
phone_field_placeholder: 'eg. (03) 1234 5678'
|
||||
type:
|
||||
title: 'Type'
|
||||
about:
|
||||
title: 'About'
|
||||
images:
|
||||
title: 'Images'
|
||||
social:
|
||||
title: 'Social'
|
||||
# TODO: Remove these once the enterprise.registration.modal keys are translated
|
||||
enterprise_contact: "Primary Contact"
|
||||
enterprise_contact_placeholder: "Contact Name"
|
||||
enterprise_contact_required: "You need to enter a primary contact."
|
||||
enterprise_email_address: "Email address"
|
||||
enterprise_email_placeholder: "eg. charlie@thefarm.com"
|
||||
enterprise_phone: "Phone number"
|
||||
enterprise_phone_placeholder: "eg. (03) 1234 5678"
|
||||
# END
|
||||
about:
|
||||
title: "About"
|
||||
headline: "Nice one!"
|
||||
message: "Now let's flesh out the details about"
|
||||
success: "Success! %{enterprise} added to the Open Food Network"
|
||||
registration_exit_message: "If you exit this wizard at any stage, you can continue to create your profile by going to the admin interface."
|
||||
enterprise_description: "Short Description"
|
||||
enterprise_description_placeholder: "A short sentence describing your enterprise"
|
||||
enterprise_long_desc: "Long Description"
|
||||
enterprise_long_desc_placeholder: "This is your opportunity to tell the story of your enterprise - what makes you different and wonderful? We'd suggest keeping your description to under 600 characters or 150 words."
|
||||
enterprise_long_desc_length: "%{num} characters / up to 600 recommended"
|
||||
enterprise_abn: "ABN"
|
||||
enterprise_abn_placeholder: "eg. 99 123 456 789"
|
||||
enterprise_acn: "ACN"
|
||||
enterprise_acn_placeholder: "eg. 123 456 789"
|
||||
enterprise_tax_required: "You need to make a selection."
|
||||
images:
|
||||
title: "Images"
|
||||
headline: "Thanks!"
|
||||
description: "Let's upload some pretty pictures so your profile looks great! :)"
|
||||
uploading: "Uploading..."
|
||||
continue: "Continue"
|
||||
back: "Back"
|
||||
logo:
|
||||
select_logo: "Step 1. Select Logo Image"
|
||||
logo_tip: "Tip: Square images will work best, preferably at least 300×300px"
|
||||
logo_label: "Choose a logo image"
|
||||
logo_drag: "Drag and drop your logo here"
|
||||
review_logo: "Step 2. Review Your Logo"
|
||||
review_logo_tip: "Tip: for best results, your logo should fill the available space"
|
||||
logo_placeholder: "Your logo will appear here for review once uploaded"
|
||||
promo:
|
||||
select_promo_image: "Step 3. Select Promo Image"
|
||||
promo_image_tip: "Tip: Shown as a banner, preferred size is 1200×260px"
|
||||
promo_image_label: "Choose a promo image"
|
||||
promo_image_drag: "Drag and drop your promo here"
|
||||
review_promo_image: "Step 4. Review Your Promo Banner"
|
||||
review_promo_image_tip: "Tip: for best results, your promo image should fill the available space"
|
||||
promo_image_placeholder: "Your logo will appear here for review once uploaded"
|
||||
social:
|
||||
title: "Social"
|
||||
enterprise_final_step: "Final step!"
|
||||
enterprise_social_text: "How can people find %{enterprise} online?"
|
||||
website: "Website"
|
||||
website_placeholder: "eg. openfoodnetwork.org.au"
|
||||
facebook: "Facebook"
|
||||
facebook_placeholder: "eg. www.facebook.com/PageNameHere"
|
||||
linkedin: "LinkedIn"
|
||||
linkedin_placeholder: "eg. www.linkedin.com/YourNameHere"
|
||||
twitter: "Twitter"
|
||||
twitter_placeholder: "eg. @twitter_handle"
|
||||
instagram: "Instagram"
|
||||
instagram_placeholder: "eg. @instagram_handle"
|
||||
limit_reached:
|
||||
headline: "Oh no!"
|
||||
message: "You have reached the limit!"
|
||||
text: "You have reached the limit for the number of enterprises you are allowed to own on the"
|
||||
action: "Return to the homepage"
|
||||
finished:
|
||||
headline: "Finished!"
|
||||
thanks: "Thanks for filling out the details for %{enterprise}."
|
||||
login: "You can change or update your enterprise at any stage by logging into Open Food Network and going to Admin."
|
||||
action: "Open Food Network home"
|
||||
|
||||
back: "Back"
|
||||
continue: "Continue"
|
||||
limit_reached_headline: "Oh no!"
|
||||
limit_reached_message: "You have reached the limit!"
|
||||
limit_reached_text: "You have reached the limit for the number of enterprises you are allowed to own on the"
|
||||
limit_reached_action: "Return to the homepage"
|
||||
select_promo_image: "Step 3. Select Promo Image"
|
||||
promo_image_tip: "Tip: Shown as a banner, preferred size is 1200×260px"
|
||||
promo_image_label: "Choose a promo image"
|
||||
action_or: "OR"
|
||||
promo_image_drag: "Drag and drop your promo here"
|
||||
review_promo_image: "Step 4. Review Your Promo Banner"
|
||||
review_promo_image_tip: "Tip: for best results, your promo image should fill the available space"
|
||||
promo_image_placeholder: "Your logo will appear here for review once uploaded"
|
||||
uploading: "Uploading..."
|
||||
select_logo: "Step 1. Select Logo Image"
|
||||
logo_tip: "Tip: Square images will work best, preferably at least 300×300px"
|
||||
logo_label: "Choose a logo image"
|
||||
logo_drag: "Drag and drop your logo here"
|
||||
review_logo: "Step 2. Review Your Logo"
|
||||
review_logo_tip: "Tip: for best results, your logo should fill the available space"
|
||||
logo_placeholder: "Your logo will appear here for review once uploaded"
|
||||
enterprise_about_headline: "Nice one!"
|
||||
enterprise_about_message: "Now let's flesh out the details about"
|
||||
enterprise_success: "Success! %{enterprise} added to the Open Food Network "
|
||||
enterprise_registration_exit_message: "If you exit this wizard at any stage, you can continue to create your profile by going to the admin interface."
|
||||
enterprise_description: "Short Description"
|
||||
enterprise_description_placeholder: "A short sentence describing your enterprise"
|
||||
enterprise_long_desc: "Long Description"
|
||||
enterprise_long_desc_placeholder: "This is your opportunity to tell the story of your enterprise - what makes you different and wonderful? We'd suggest keeping your description to under 600 characters or 150 words."
|
||||
enterprise_long_desc_length: "%{num} characters / up to 600 recommended"
|
||||
enterprise_abn: "ABN"
|
||||
enterprise_abn_placeholder: "eg. 99 123 456 789"
|
||||
enterprise_acn: "ACN"
|
||||
enterprise_acn_placeholder: "eg. 123 456 789"
|
||||
enterprise_tax_required: "You need to make a selection."
|
||||
enterprise_final_step: "Final step!"
|
||||
enterprise_social_text: "How can people find %{enterprise} online?"
|
||||
website: "Website"
|
||||
website_placeholder: "eg. openfoodnetwork.org.au"
|
||||
facebook: "Facebook"
|
||||
facebook_placeholder: "eg. www.facebook.com/PageNameHere"
|
||||
linkedin: "LinkedIn"
|
||||
linkedin_placeholder: "eg. www.linkedin.com/YourNameHere"
|
||||
twitter: "Twitter"
|
||||
twitter_placeholder: "eg. @twitter_handle"
|
||||
instagram: "Instagram"
|
||||
instagram_placeholder: "eg. @instagram_handle"
|
||||
registration_greeting: "Hi there!"
|
||||
registration_intro: "You can now create a profile for your Producer or Hub"
|
||||
registration_action: "Let's get started!"
|
||||
registration_checklist: "You'll need"
|
||||
registration_time: "5-10 minutes"
|
||||
registration_enterprise_address: "Enterprise address"
|
||||
registration_contact_details: "Primary contact details"
|
||||
registration_logo: "Your logo image"
|
||||
registration_promo_image: "Landscape image for your profile"
|
||||
registration_about_us: "'About Us' text"
|
||||
registration_outcome_headline: "What do I get?"
|
||||
registration_outcome1_html: "Your profile helps people <strong>find</strong> and <strong>contact</strong> you on the Open Food Network."
|
||||
registration_outcome2: "Use this space to tell the story of your enterprise, to help drive connections to your social and online presence. "
|
||||
registration_outcome3: "It's also the first step towards trading on the Open Food Network, or opening an online store."
|
||||
registration_finished_headline: "Finished!"
|
||||
registration_finished_thanks: "Thanks for filling out the details for %{enterprise}."
|
||||
registration_finished_login: "You can change or update your enterprise at any stage by logging into Open Food Network and going to Admin."
|
||||
registration_finished_action: "Open Food Network home"
|
||||
registration_contact_name: 'Contact Name'
|
||||
enterprise_limit: Enterprise Limit
|
||||
|
||||
# TODO: Remove these once the enterprise.registration.modal keys are translated
|
||||
registration_type_headline: "Last step to add %{enterprise}!"
|
||||
registration_type_question: "Are you a producer?"
|
||||
registration_type_producer: "Yes, I'm a producer"
|
||||
registration_type_no_producer: "No, I'm not a producer"
|
||||
registration_type_error: "Please choose one. Are you are producer?"
|
||||
registration_type_producer_help: "Producers make yummy things to eat and/or drink. You're a producer if you grow it, raise it, brew it, bake it, ferment it, milk it or mould it."
|
||||
registration_type_no_producer_help: "If you’re not a producer, you’re probably someone who sells and distributes food. You might be a hub, coop, buying group, retailer, wholesaler or other."
|
||||
# END
|
||||
|
||||
|
||||
# TODO: Remove these once the enterprise.registration.modal keys are translated
|
||||
registration_detail_headline: "Let's Get Started"
|
||||
registration_detail_enterprise: "Woot! First we need to know a little bit about your enterprise:"
|
||||
registration_detail_producer: "Woot! First we need to know a little bit about your farm:"
|
||||
registration_detail_name_enterprise: "Enterprise Name:"
|
||||
registration_detail_name_producer: "Farm Name:"
|
||||
registration_detail_name_placeholder: "e.g. Charlie's Awesome Farm"
|
||||
registration_detail_name_error: "Please choose a unique name for your enterprise"
|
||||
registration_detail_address1: "Address line 1:"
|
||||
registration_detail_address1_placeholder: "e.g. 123 Cranberry Drive"
|
||||
registration_detail_address1_error: "Please enter an address"
|
||||
registration_detail_address2: "Address line 2:"
|
||||
registration_detail_suburb: "Suburb:"
|
||||
registration_detail_suburb_placeholder: "e.g. Northcote"
|
||||
registration_detail_suburb_error: "Please enter a suburb"
|
||||
registration_detail_postcode: "Postcode:"
|
||||
registration_detail_postcode_placeholder: "e.g. 3070"
|
||||
registration_detail_postcode_error: "Postcode required"
|
||||
registration_detail_state: "State:"
|
||||
registration_detail_state_error: "State required"
|
||||
registration_detail_country: "Country:"
|
||||
registration_detail_country_error: "Please select a country"
|
||||
# END
|
||||
shipping_method_destroy_error: "That shipping method cannot be deleted as it is referenced by an order: %{number}."
|
||||
accounts_and_billing_task_already_running_error: "A task is already running, please wait until it has finished"
|
||||
accounts_and_billing_start_task_notice: "Task Queued"
|
||||
@@ -2734,6 +2684,12 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
spree:
|
||||
users:
|
||||
order: "Order"
|
||||
registration:
|
||||
welcome_to_ofn: "Welcome to the Open Food Network!"
|
||||
signup_or_login: "Start By Signing Up (or logging in)"
|
||||
have_an_account: "Already have an account?"
|
||||
action_login: "Log in now."
|
||||
|
||||
producers:
|
||||
signup:
|
||||
start_free_profile: "Start with a free profile, and expand when you're ready!"
|
||||
|
||||
@@ -31,6 +31,16 @@ es:
|
||||
on_demand_but_count_on_hand_set: "debe estar en blanco si está bajo demanda"
|
||||
limited_stock_but_no_count_on_hand: "se debe especificar porque se ha definido estoc limitado"
|
||||
activemodel:
|
||||
attributes:
|
||||
order_management/reports/enterprise_fee_summary/parameters:
|
||||
start_at: "Inicio"
|
||||
end_at: "Final"
|
||||
distributor_ids: "Hubs"
|
||||
producer_ids: "Productoras"
|
||||
order_cycle_ids: "Ciclos de Pedido"
|
||||
enterprise_fee_ids: "Nombres de las comisiones"
|
||||
shipping_method_ids: "Métodos de envío"
|
||||
payment_method_ids: "Métodos de Pago"
|
||||
errors:
|
||||
models:
|
||||
subscription_validator:
|
||||
@@ -74,6 +84,13 @@ es:
|
||||
models:
|
||||
order_cycle:
|
||||
cloned_order_cycle_name: "COPIA DE %{order_cycle}"
|
||||
validators:
|
||||
date_time_string_validator:
|
||||
not_string_error: "debe ser una cadena"
|
||||
invalid_format_error: "debe ser válido"
|
||||
integer_array_validator:
|
||||
not_array_error: "debe ser una matriz"
|
||||
invalid_element_error: "debe contener solo enteros válidos"
|
||||
enterprise_mailer:
|
||||
confirmation_instructions:
|
||||
subject: "Confirma la dirección de correo electrónico de %{enterprise}"
|
||||
@@ -851,7 +868,7 @@ es:
|
||||
pickup_instructions_tip: Estas instrucciones se muestran a las consumidoras después de completar un pedido.
|
||||
pickup_time_placeholder: "Listo para ( Fecha / Hora)"
|
||||
receival_instructions_placeholder: "Instrucciones de recepción"
|
||||
add_fee: 'Añadir tarifa'
|
||||
add_fee: 'Añadir comisión'
|
||||
selected: 'seleccionado'
|
||||
add_exchange_form:
|
||||
add_supplier: 'Añadir proveedora'
|
||||
@@ -868,7 +885,7 @@ es:
|
||||
search_by_order_cycle_name: "Buscar por nombre del Ciclo de Pedido..."
|
||||
involving: "Involucrando"
|
||||
any_enterprise: "Cualquier organización"
|
||||
any_schedule: "Cualquier horario"
|
||||
any_schedule: "Cualquier programación"
|
||||
form:
|
||||
incoming: Entrante
|
||||
supplier: Proveedora
|
||||
@@ -882,19 +899,19 @@ es:
|
||||
delivery_details: Detalles de Recogida / Entrega
|
||||
debug_info: Información de Debug
|
||||
index:
|
||||
schedule: Horario
|
||||
schedules: Horarios
|
||||
adding_a_new_schedule: Agregar un nuevo horario
|
||||
updating_a_schedule: Actualización de un horario
|
||||
new_schedule: Nuevo horario
|
||||
create_schedule: Crear horario
|
||||
update_schedule: Actualizar horario
|
||||
delete_schedule: Eliminar horario
|
||||
created_schedule: Horario creado
|
||||
updated_schedule: Horario actualizado
|
||||
deleted_schedule: Horario eliminado
|
||||
schedule_name_placeholder: Nombre del horario
|
||||
name_required_error: Por favor ingrese un nombre para este horario
|
||||
schedule: Programación
|
||||
schedules: Programación
|
||||
adding_a_new_schedule: Agregar una nueva programación
|
||||
updating_a_schedule: Actualización de una programación
|
||||
new_schedule: Nueva programación
|
||||
create_schedule: Crear programación
|
||||
update_schedule: Actualizar programación
|
||||
delete_schedule: Eliminar programación
|
||||
created_schedule: Programación creada
|
||||
updated_schedule: Programación actualizada
|
||||
deleted_schedule: Programación eliminada
|
||||
schedule_name_placeholder: Nombre de la programación
|
||||
name_required_error: Por favor ingrese un nombre para esta programación
|
||||
no_order_cycles_error: Seleccione al menos un ciclo de pedido (arrastrar y soltar)
|
||||
name_and_timing_form:
|
||||
name: Nombre
|
||||
@@ -914,7 +931,7 @@ es:
|
||||
fees: Comisiones
|
||||
destroy_errors:
|
||||
orders_present: Ese ciclo de pedido ha sido seleccionado por un cliente y no puede ser eliminado. Para evitar que los clientes accedan a él, ciérrelo.
|
||||
schedule_present: Ese ciclo de pedido está vinculado a un horario y no puede ser eliminado. Desvincula o elimina el calendario primero.
|
||||
schedule_present: Ese ciclo de pedido está vinculado a una programación y no puede ser eliminado. Desvincula o elimina la programación primero.
|
||||
bulk_update:
|
||||
no_data: Hm, algo salió mal. No se encontraron datos de ciclo de pedido.
|
||||
date_warning:
|
||||
@@ -996,6 +1013,9 @@ es:
|
||||
description: Facturas para la importación en Xero
|
||||
packing:
|
||||
name: Informes de empaquetado
|
||||
enterprise_fee_summary:
|
||||
name: "Resumen de las comisiones de la organización"
|
||||
description: "Resumen de las comisiones de la organización recolectadas"
|
||||
subscriptions:
|
||||
subscriptions: Suscripciones
|
||||
new: Nueva suscripción
|
||||
@@ -1014,10 +1034,10 @@ es:
|
||||
set_up_shipping_and_payment_methods_html: Configurar los métodos %{shipping_link} y %{payment_link}
|
||||
set_up_shipping_and_payment_methods_note_html: Tenga en cuenta que solo se pueden usar <br /> métodos de pago en efectivo y Stripe con las suscripciones
|
||||
ensure_at_least_one_customer_html: Asegúrese de que exista al menos un %{customer_link}
|
||||
create_at_least_one_schedule: Crear al menos un horario
|
||||
create_at_least_one_schedule: Crear al menos una programación
|
||||
create_at_least_one_schedule_step_1_html: 1. Vaya a la página %{order_cycles_link}
|
||||
create_at_least_one_schedule_step_2: 2. Crea un ciclo de pedido si aún no lo has hecho
|
||||
create_at_least_one_schedule_step_3: 3. Haga clic en '+ Nuevo horario' y complete el formulario
|
||||
create_at_least_one_schedule_step_3: 3. Haga clic en '+ Nueva programación' y complete el formulario
|
||||
once_you_are_done_you_can_html: Una vez que haya terminado, puede %{reload_this_page_link}
|
||||
reload_this_page: recarga esta página
|
||||
steps:
|
||||
@@ -1028,7 +1048,7 @@ es:
|
||||
subscription_line_items:
|
||||
this_is_an_estimate: |
|
||||
Los precios mostrados son solo una estimación y se calculan en el momento en que se cambia la suscripción.
|
||||
Si cambias precios o tarifas, los pedidos se actualizarán pero la suscripción seguirá mostrando los valores anteriores.
|
||||
Si cambias precios o comisiones, los pedidos se actualizarán pero la suscripción seguirá mostrando los valores anteriores.
|
||||
not_in_open_and_upcoming_order_cycles_warning: "No hay ciclos de pedidos abiertos o próximos para este producto."
|
||||
details:
|
||||
details: Detalles
|
||||
@@ -1616,7 +1636,7 @@ es:
|
||||
shops_signup_help_text: Usted necesita un mejor retorno. Usted necesita nuevos compradores y socios de logística. Usted necesita que su historia sea contada a través de ventas al por mayor, al detalle y en la mesa de la cocina.
|
||||
shops_signup_detail: Aquí está el detalle.
|
||||
orders: Pedidos
|
||||
orders_fees: Tarifas...
|
||||
orders_fees: Comisiones...
|
||||
orders_edit_title: Carrito de compras
|
||||
orders_edit_headline: Su carrito de compras
|
||||
orders_edit_time: Pedido listo para
|
||||
@@ -1688,7 +1708,7 @@ es:
|
||||
error_not_found_in_database: "%{name} no se encuentra en la base de datos"
|
||||
error_not_primary_producer: "%{name} no está habilitado como productora"
|
||||
error_no_permission_for_enterprise: "\"%{name}\": no tiene permiso para administrar productos para esta organización"
|
||||
item_handling_fees: "Tarifa de manejo de artículo (incluída en el total de artículos)"
|
||||
item_handling_fees: "Comisiones de manejo de artículos (incluída en el total de artículos)"
|
||||
january: "Enero"
|
||||
february: "Febrero"
|
||||
march: "Marzo"
|
||||
@@ -1717,7 +1737,7 @@ es:
|
||||
password_reset_sent: "¡Le enviamos un correo electrónico con instrucciones para restaurar la contraseña!"
|
||||
reset_password: "Restaurar contraseña"
|
||||
who_is_managing_enterprise: "¿Quién es responsable de administrar %{enterprise}?"
|
||||
update_and_recalculate_fees: "Actualizar y recalcular tarifas"
|
||||
update_and_recalculate_fees: "Actualizar y recalcular comisiones"
|
||||
registration:
|
||||
steps:
|
||||
images:
|
||||
@@ -1883,7 +1903,7 @@ es:
|
||||
shipping_method_destroy_error: "Ese método de envío no puede ser eliminado ya que se hace referencia en un pedido: %{number}."
|
||||
accounts_and_billing_task_already_running_error: "Se está ejecutando una tarea, espere hasta que haya finalizado"
|
||||
accounts_and_billing_start_task_notice: "Tarea en cola"
|
||||
fees: "Tarifas"
|
||||
fees: "Comisiones"
|
||||
item_cost: "Costo del artículo"
|
||||
bulk: "Agrupar"
|
||||
shop_variant_quantity_min: "mínimo"
|
||||
@@ -1893,11 +1913,11 @@ es:
|
||||
change_shop: "Cambiar de tienda:"
|
||||
shop_at: "Comprar en:"
|
||||
price_breakdown: "Desglose de precios completo"
|
||||
admin_fee: "Tarifa de administración"
|
||||
sales_fee: "Tarifa de ventas"
|
||||
packing_fee: "Tarifa de empaquetado"
|
||||
transport_fee: "Tarifa de transporte"
|
||||
fundraising_fee: "Tarifa para recaudación de fondos"
|
||||
admin_fee: "Comisión de administración"
|
||||
sales_fee: "Comisión de ventas"
|
||||
packing_fee: "Comisión de empaquetado"
|
||||
transport_fee: "Comisión de transporte"
|
||||
fundraising_fee: "Comisión para recaptación de fondos"
|
||||
price_graph: "Gráfico de precios"
|
||||
included_tax: "Impuesto incluido"
|
||||
balance: "Saldo"
|
||||
@@ -2000,7 +2020,6 @@ es:
|
||||
spree_admin_enterprises_none_text: "No tienes ninguna organización"
|
||||
spree_admin_enterprises_tabs_hubs: "HUBS"
|
||||
spree_admin_enterprises_producers_manage_products: "GESTIONAR PRODUCTOS"
|
||||
spree_admin_enterprises_any_active_products_text: "No tienes ningún producto activo"
|
||||
spree_admin_enterprises_create_new_product: "CREAR UN NUEVO PRODUCTO"
|
||||
spree_admin_single_enterprise_alert_mail_confirmation: "Confirma la dirección de email para"
|
||||
spree_admin_single_enterprise_alert_mail_sent: "Te hemos enviado un mail a"
|
||||
@@ -2127,7 +2146,7 @@ es:
|
||||
report_header_sales_tax: "Impuesto sobre las Ventas (%{currency_symbol})"
|
||||
report_header_delivery_charge: "Gastos de Envío (%{currency_symbol})"
|
||||
report_header_tax_on_delivery: "Impuestos sobre la entrega (%{currency_symbol})"
|
||||
report_header_tax_on_fees: "Impuesto sobre las tasas (%{currency_symbol})"
|
||||
report_header_tax_on_fees: "Impuesto sobre las comisiones (%{currency_symbol})"
|
||||
report_header_total_tax: "Total Impuestos (%{currency_symbol})"
|
||||
report_header_enterprise: Organización
|
||||
report_header_customer: Consumidora
|
||||
@@ -2209,7 +2228,7 @@ es:
|
||||
report_header_gst_free_income: Ingresos sin IVA
|
||||
report_header_total_untaxable_produce: Total productos sin impuestos
|
||||
report_header_total_taxable_produce: Total productos con impuestos
|
||||
report_header_total_untaxable_fees: Total comisiones sin impuestos
|
||||
report_header_total_untaxable_fees: Total comisiones no imponibles (sin impuestos)
|
||||
report_header_total_taxable_fees: Total de impuestos imponibles (impuestos incluidos)
|
||||
report_header_delivery_shipping_cost: Gastos de envío (impuestos incluidos)
|
||||
report_header_transaction_fee: Comisión por transacción (sin impuestos)
|
||||
@@ -2248,7 +2267,7 @@ es:
|
||||
shipping: "Envío"
|
||||
shipping_methods: "Métodos de envío"
|
||||
payment_methods: "Métodos de Pago"
|
||||
payment_method_fee: "Tarifa de Transacción"
|
||||
payment_method_fee: "Comisión de Transacción"
|
||||
inventory_settings: "Configuración del Inventario"
|
||||
tag_rules: "Reglas de las Etiquetas"
|
||||
shop_preferences: "Configuración de la tienda"
|
||||
@@ -2527,6 +2546,45 @@ es:
|
||||
producers:
|
||||
signup:
|
||||
start_free_profile: "Empieze con un perfil gratuito, y amplíelo cuando esté preparado!"
|
||||
order_management:
|
||||
reports:
|
||||
enterprise_fee_summary:
|
||||
date_end_before_start_error: "debe ser después del comienzo"
|
||||
parameter_not_allowed_error: "No está autorizado a usar uno o más filtros seleccionados para este informe."
|
||||
fee_calculated_on_transfer_through_all: "Todos"
|
||||
fee_calculated_on_transfer_through_entire_orders: "Pedidos completos a través de %{distributor}"
|
||||
tax_category_various: "Varios"
|
||||
fee_type:
|
||||
payment_method: "Transaccion de pago"
|
||||
shipping_method: "Envío"
|
||||
fee_placements:
|
||||
supplier: "Entrante"
|
||||
distributor: "Saliente"
|
||||
coordinator: "Coordinadora"
|
||||
tax_category_name:
|
||||
shipping_instance_rate: "Tarifa de plataforma"
|
||||
formats:
|
||||
csv:
|
||||
header:
|
||||
fee_type: "Tipo de Comisión"
|
||||
enterprise_name: "Propietario de la organización"
|
||||
fee_name: "Nombre de la comisión"
|
||||
customer_name: "Consumidora"
|
||||
fee_placement: "Asignación de comisiones"
|
||||
fee_calculated_on_transfer_through_name: "Cálculo de comisiones a través de transferencias"
|
||||
tax_category_name: "Categoría de impuestos"
|
||||
total_amount: "€€ SUM"
|
||||
html:
|
||||
header:
|
||||
fee_type: "Tipo de Comisión"
|
||||
enterprise_name: "Propietario de la organización"
|
||||
fee_name: "Nombre de la comisión"
|
||||
customer_name: "Consumidora"
|
||||
fee_placement: "Asignación de comisiones"
|
||||
fee_calculated_on_transfer_through_name: "Cálculo de comisiones a través de transferencias"
|
||||
tax_category_name: "Categoría de impuestos"
|
||||
total_amount: "€€ SUM"
|
||||
invalid_filter_parameters: "Los filtros que seleccionó para este informe no son válidos."
|
||||
spree:
|
||||
email: Email
|
||||
account_updated: "Cuenta actualizada!"
|
||||
@@ -2570,6 +2628,11 @@ es:
|
||||
distributor: "Distribuidora:"
|
||||
order_cycle: "Ciclo de pedido:"
|
||||
overview:
|
||||
products:
|
||||
active_products:
|
||||
zero: "No tienes ningún producto activo"
|
||||
one: "Tiene un producto activo."
|
||||
other: "Tiene %{count} productos activos"
|
||||
order_cycles:
|
||||
order_cycles: "Ciclos de Pedido"
|
||||
order_cycles_tip: "Los ciclos de pedido determinan cuándo y dónde los productos están disponibles para las consumidoras."
|
||||
@@ -2643,6 +2706,14 @@ es:
|
||||
bulk_coop_allocation: 'Bulk Co-op - Asignación'
|
||||
bulk_coop_packing_sheets: 'Bulk Co-op - Hojas de Empaquetado'
|
||||
bulk_coop_customer_payments: 'Bulk Co-op - Pagos de las Consumidoras'
|
||||
enterprise_fee_summaries:
|
||||
filters:
|
||||
date_range: "Rango de fechas"
|
||||
report_format_csv: "Descargar como CSV"
|
||||
generate_report: "Generar informe"
|
||||
report:
|
||||
none: "Ninguno"
|
||||
select_and_search: "Seleccione los filtros y haga clic en GENERAR INFORME para acceder a sus datos."
|
||||
users:
|
||||
index:
|
||||
listing_users: "Listado de Usuarias"
|
||||
|
||||
@@ -17,7 +17,7 @@ module OrderManagement
|
||||
end
|
||||
|
||||
def result
|
||||
group_data.select_attributes
|
||||
group_data.exclude_groups_with_zero_total.select_attributes
|
||||
@scope.all
|
||||
end
|
||||
|
||||
@@ -46,7 +46,7 @@ module OrderManagement
|
||||
|
||||
def find_adjustments
|
||||
chain_to_scope do
|
||||
Spree::Adjustment
|
||||
Spree::Adjustment.eligible
|
||||
end
|
||||
end
|
||||
|
||||
@@ -336,6 +336,10 @@ module OrderManagement
|
||||
if params.payment_method_ids.present?
|
||||
end
|
||||
|
||||
def exclude_groups_with_zero_total
|
||||
filter_scope("spree_adjustments.amount != 0")
|
||||
end
|
||||
|
||||
def group_data
|
||||
chain_to_scope do
|
||||
group("enterprise_fees.id", "enterprises.id", "customers.id", "hubs.id",
|
||||
|
||||
@@ -151,6 +151,94 @@ describe OrderManagement::Reports::EnterpriseFeeSummary::ReportService do
|
||||
end
|
||||
end
|
||||
|
||||
describe "data exclusions" do
|
||||
describe "invalid adjustments (through 'eligible') like failed payments" do
|
||||
let!(:customer_order) { prepare_order(customer: customer) }
|
||||
|
||||
before do
|
||||
# Make the payment fail. See Spree::Payment#revoke_adjustment_eligibility.
|
||||
payment = customer_order.payments.first
|
||||
payment.state = "failed"
|
||||
payment.save!
|
||||
end
|
||||
|
||||
it "is included" do
|
||||
totals = service.list
|
||||
|
||||
expect(totals.length).to eq(1)
|
||||
|
||||
expected_result = [
|
||||
["Shipment", "Sample Distributor", "Sample Shipping Method", "Sample Customer",
|
||||
nil, nil, "Platform Rate", "1.00"]
|
||||
]
|
||||
|
||||
expected_result.each_with_index do |expected_attributes, row_index|
|
||||
expect_total_attributes(totals[row_index], expected_attributes)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "non-mandatory $0 adjustments (through 'eligible')" do
|
||||
let!(:variant) { prepare_variant(outgoing_exchange_fees: [enterprise_fee]) }
|
||||
|
||||
let!(:enterprise_fee) do
|
||||
create(:enterprise_fee, :per_item, name: "Sample Enterprise Fee", enterprise: distributor,
|
||||
fee_type: "admin", amount: 0)
|
||||
end
|
||||
|
||||
let!(:customer_order) { prepare_order(customer: customer) }
|
||||
|
||||
before do
|
||||
# Change "eligible" in enterprise fee adjustment to false. $0 adjustments that are not
|
||||
# mandatory are set to be ineligible, but there are no non-mandatory adjustments supported
|
||||
# by the report yet.
|
||||
adjustment = Spree::Adjustment.where(originator_type: "EnterpriseFee").first
|
||||
adjustment.eligible = false
|
||||
adjustment.save!
|
||||
end
|
||||
|
||||
it "is included" do
|
||||
totals = service.list
|
||||
|
||||
expect(totals.length).to eq(2)
|
||||
|
||||
expected_result = [
|
||||
["Payment Transaction", "Sample Distributor", "Sample Payment Method", "Sample Customer",
|
||||
nil, nil, nil, "2.00"],
|
||||
["Shipment", "Sample Distributor", "Sample Shipping Method", "Sample Customer",
|
||||
nil, nil, "Platform Rate", "1.00"]
|
||||
]
|
||||
|
||||
expected_result.each_with_index do |expected_attributes, row_index|
|
||||
expect_total_attributes(totals[row_index], expected_attributes)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "$0 mandatory adjustments" do
|
||||
let!(:payment_method) do
|
||||
create(:payment_method, :per_item, amount: 0, name: "Sample Payment Method")
|
||||
end
|
||||
|
||||
let!(:customer_order) { prepare_order(customer: customer) }
|
||||
|
||||
it "is included" do
|
||||
totals = service.list
|
||||
|
||||
expect(totals.length).to eq(1)
|
||||
|
||||
expected_result = [
|
||||
["Shipment", "Sample Distributor", "Sample Shipping Method", "Sample Customer",
|
||||
nil, nil, "Platform Rate", "1.00"]
|
||||
]
|
||||
|
||||
expected_result.each_with_index do |expected_attributes, row_index|
|
||||
expect_total_attributes(totals[row_index], expected_attributes)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "handling of more complex cases" do
|
||||
context "with non-sender fee for incoming exchange and non-receiver fee for outgoing" do
|
||||
let!(:variant) do
|
||||
|
||||
@@ -29,20 +29,18 @@ module OpenFoodNetwork
|
||||
end
|
||||
|
||||
def count_on_hand
|
||||
@variant_override.andand.count_on_hand || super
|
||||
if @variant_override.present? && @variant_override.stock_overridden?
|
||||
@variant_override.count_on_hand
|
||||
else
|
||||
super
|
||||
end
|
||||
end
|
||||
|
||||
def on_demand
|
||||
if @variant_override.andand.on_demand.nil?
|
||||
if @variant_override.andand.count_on_hand.present?
|
||||
# If we're overriding the stock level of an on_demand variant, show it as not
|
||||
# on_demand, so our stock control can take effect.
|
||||
false
|
||||
else
|
||||
super
|
||||
end
|
||||
if @variant_override.present? && !@variant_override.use_producer_stock_settings?
|
||||
@variant_override.on_demand
|
||||
else
|
||||
@variant_override.andand.on_demand
|
||||
super
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ feature %q{
|
||||
|
||||
before :each do
|
||||
visit '/admin/orders/bulk_management'
|
||||
wait_until { request_monitor_finished 'LineItemsCtrl' }
|
||||
end
|
||||
|
||||
it "displays a column for user's full name" do
|
||||
@@ -92,6 +93,7 @@ feature %q{
|
||||
|
||||
before do
|
||||
visit spree.admin_bulk_order_management_path
|
||||
wait_until { request_monitor_finished 'LineItemsCtrl' }
|
||||
end
|
||||
|
||||
it "sorts by customer name when the customer name header is clicked" do
|
||||
@@ -260,6 +262,7 @@ feature %q{
|
||||
|
||||
before :each do
|
||||
visit '/admin/orders/bulk_management'
|
||||
wait_until { request_monitor_finished 'LineItemsCtrl' }
|
||||
end
|
||||
|
||||
it "displays a select box for producers, which filters line items by the selected supplier" do
|
||||
@@ -298,6 +301,7 @@ feature %q{
|
||||
|
||||
before :each do
|
||||
visit '/admin/orders/bulk_management'
|
||||
wait_until { request_monitor_finished 'LineItemsCtrl' }
|
||||
end
|
||||
|
||||
it "displays a select box for distributors, which filters line items by the selected distributor" do
|
||||
@@ -337,6 +341,7 @@ feature %q{
|
||||
|
||||
before do
|
||||
visit '/admin/orders/bulk_management'
|
||||
wait_until { request_monitor_finished 'LineItemsCtrl' }
|
||||
end
|
||||
|
||||
it "displays a select box for order cycles, which filters line items by the selected order cycle" do
|
||||
@@ -377,6 +382,7 @@ feature %q{
|
||||
|
||||
before :each do
|
||||
visit '/admin/orders/bulk_management'
|
||||
wait_until { request_monitor_finished 'LineItemsCtrl' }
|
||||
end
|
||||
|
||||
it "allows filters to be used in combination" do
|
||||
@@ -427,6 +433,7 @@ feature %q{
|
||||
|
||||
before :each do
|
||||
visit '/admin/orders/bulk_management'
|
||||
wait_until { request_monitor_finished 'LineItemsCtrl' }
|
||||
end
|
||||
|
||||
it "displays a quick search input" do
|
||||
@@ -456,6 +463,7 @@ feature %q{
|
||||
|
||||
before :each do
|
||||
visit '/admin/orders/bulk_management'
|
||||
wait_until { request_monitor_finished 'LineItemsCtrl' }
|
||||
end
|
||||
|
||||
it "displays date fields for filtering orders, with default values set" do
|
||||
@@ -528,6 +536,7 @@ feature %q{
|
||||
|
||||
before :each do
|
||||
visit '/admin/orders/bulk_management'
|
||||
wait_until { request_monitor_finished 'LineItemsCtrl' }
|
||||
end
|
||||
|
||||
it "displays a checkbox for each line item in the list" do
|
||||
@@ -570,6 +579,7 @@ feature %q{
|
||||
expect(page).to have_no_selector "tr#li_#{li2.id}"
|
||||
check "toggle_bulk"
|
||||
fill_in "quick_search", with: ''
|
||||
wait_until { request_monitor_finished 'LineItemsCtrl' }
|
||||
expect(find("tr#li_#{li1.id} input[type='checkbox'][name='bulk']").checked?).to be true
|
||||
expect(find("tr#li_#{li2.id} input[type='checkbox'][name='bulk']").checked?).to be false
|
||||
expect(find("input[type='checkbox'][name='toggle_bulk']").checked?).to be false
|
||||
@@ -583,6 +593,7 @@ feature %q{
|
||||
find("div#bulk-actions-dropdown div.menu_item", :text => "Delete Selected" ).click
|
||||
expect(page).to have_no_selector "tr#li_#{li1.id}"
|
||||
fill_in "quick_search", with: ''
|
||||
wait_until { request_monitor_finished 'LineItemsCtrl' }
|
||||
expect(page).to have_selector "tr#li_#{li2.id}"
|
||||
expect(page).to have_no_selector "tr#li_#{li1.id}"
|
||||
end
|
||||
|
||||
@@ -103,9 +103,8 @@ feature 'shipping methods' do
|
||||
|
||||
click_button I18n.t("actions.create")
|
||||
|
||||
expect(page).to have_no_button I18n.t("actions.create")
|
||||
message = "Shipping method \"Teleport\" has been successfully created!"
|
||||
expect(page).to have_flash_message message
|
||||
expect(page).to have_content I18n.t('editing_shipping_method')
|
||||
expect(flash_message).to eq I18n.t('successfully_created', resource: 'Shipping method "Teleport"')
|
||||
|
||||
expect(first('tags-input .tag-list ti-tag-item')).to have_content "local"
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ feature "Registration", js: true do
|
||||
fill_in "Email", with: user.email
|
||||
fill_in "Password", with: user.password
|
||||
click_button 'Login'
|
||||
expect(page).to have_content I18n.t('limit_reached_headline')
|
||||
expect(page).to have_content I18n.t('registration.steps.limit_reached.headline')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
require 'spec_helper'
|
||||
require 'open_food_network/scope_variant_to_hub'
|
||||
|
||||
module OpenFoodNetwork
|
||||
@@ -81,13 +82,6 @@ module OpenFoodNetwork
|
||||
context "without an on_demand set" do
|
||||
before { vo.update_column(:on_demand, nil) }
|
||||
|
||||
context "when count_on_hand is set" do
|
||||
it "returns false" do
|
||||
scoper.scope v
|
||||
expect(v.on_demand).to be false
|
||||
end
|
||||
end
|
||||
|
||||
context "when count_on_hand is not set" do
|
||||
before { vo.update_column(:count_on_hand, nil) }
|
||||
|
||||
@@ -96,6 +90,13 @@ module OpenFoodNetwork
|
||||
expect(v.on_demand).to be true
|
||||
end
|
||||
end
|
||||
|
||||
context "when count_on_hand is set" do
|
||||
it "should return validation error on save" do
|
||||
scoper.scope v
|
||||
expect{ vo.save! }.to raise_error ActiveRecord::RecordInvalid
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -152,8 +152,23 @@ module WebHelper
|
||||
page.driver.browser.switch_to.alert.accept
|
||||
end
|
||||
|
||||
def angular_http_requests_finished(controller=nil)
|
||||
page.evaluate_script("#{angular_scope(controller)}.injector().get('$http').pendingRequests.length == 0")
|
||||
end
|
||||
|
||||
def request_monitor_finished(controller=nil)
|
||||
page.evaluate_script("#{angular_scope(controller)}.scope().RequestMonitor.loading == false")
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# Takes an optional angular controller name eg: "LineItemsCtrl",
|
||||
# otherwise finds the first object in the DOM with an angular scope
|
||||
def angular_scope(controller=nil)
|
||||
element = controller ? "[ng-controller=#{controller}]" : '.ng-scope'
|
||||
"angular.element(document.querySelector('#{element}'))"
|
||||
end
|
||||
|
||||
def wait_for_ajax
|
||||
wait_until { page.evaluate_script("$.active") == 0 }
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user