Compare commits

..

1 Commits

Author SHA1 Message Date
Jean-Baptiste Bellet
a8f88ba687 Workaround: bad interaction btw Turbo and stripe iframe
Found this workaround here: https://github.com/hotwired/turbo/issues/270#issuecomment-1068130327

This js hack persists the original iframe object downloaded from stripe in the new body sent by Turbo (instead of using the new one, in the new body)
2023-01-09 10:35:52 +01:00
8 changed files with 26 additions and 82 deletions

View File

@@ -472,7 +472,7 @@ GEM
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (5.0.0)
puma (6.0.2)
puma (5.6.5)
nio4r (~> 2.0)
raabro (1.4.0)
racc (1.6.1)

View File

@@ -3,3 +3,13 @@
= raw render file: "spec/support/fixtures/stripejs-mock.js"
- else
%script{src: "https://js.stripe.com/v3/", type: "text/javascript"}
:javascript
// persist initial stripe iFrame DOM Object across turbo AJAX page requests
let stripeIFrameQuery = 'iframe[src^="https://js.stripe.com"]';
document.addEventListener('turbo:before-render', function (event) {
const stripeIFrame = document.querySelector(stripeIFrameQuery);
const newStripeIFrame = event.detail.newBody.querySelector(stripeIFrameQuery);
if (stripeIFrame && !newStripeIFrame){
event.detail.newBody.appendChild(stripeIFrame)
}
});

View File

@@ -3196,6 +3196,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
pending: "pending"
resumed: "resumed"
returned: "returned"
skrill: "skrill"
shipment_states:
backorder: "backorder"
partial: "partial"
@@ -4292,6 +4293,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
pending: pending
resumed: resumed
returned: returned
skrill: skrill
subscription_state:
active: active
pending: pending

View File

@@ -404,11 +404,8 @@ en_FR:
filters:
categories:
title: Categories
selected_categories: "%{count} categories selected"
producers:
title: Producers
selected_producers: "%{count} producers selected"
per_page: "%{count} items per page"
colums: Columns
columns:
name: Name
@@ -651,7 +648,6 @@ en_FR:
not_found: not found in database
category_not_found: doesn't match allowed categories. See the correct categories to choose from on the product import page, or check that there's no misspelling.
not_updatable: cannot be updated on existing products via product import
values_must_be_same: must be the same for products with the same name
blank: can't be blank
products_no_permission: you do not have permission to manage products for this enterprise
inventory_no_permission: you do not have permission to create inventory for this producer
@@ -1802,7 +1798,6 @@ en_FR:
message_html: "You have an order for this order cycle already. Check the %{cart} to see the items you ordered before. You can also cancel items as long as the order cycle is open."
step1:
contact_information:
title: Contact information
email:
label: Email
phone:
@@ -2667,7 +2662,6 @@ en_FR:
report_header_customer_code: Customer Code
report_header_product: Product
report_header_product_properties: Product Properties
report_header_product_tax_category: Product Tax Category
report_header_quantity: Quantity
report_header_max_quantity: Max Quantity
report_header_variant: Variant
@@ -2680,7 +2674,6 @@ en_FR:
report_header_supplier: Supplier
report_header_producer: Producer
report_header_producer_suburb: Producer Suburb
report_header_producer_charges_sales_tax?: GST/VAT Registered
report_header_unit: Unit
report_header_group_buy_unit_quantity: Group Buy Unit Quantity
report_header_cost: Cost
@@ -2700,7 +2693,6 @@ en_FR:
report_header_delivery_postcode: Delivery Postcode
report_header_bulk_unit_size: Bulk Unit Size
report_header_weight: Weight
report_header_final_weight_volume: Final (Weight/Volume)
report_header_height: Height
report_header_width: Width
report_header_depth: Depth
@@ -3610,7 +3602,6 @@ en_FR:
messages:
included_price_validation: "cannot be selected unless you have set a Default Tax Zone"
blank: "can't be blank"
invalid_instagram_url: "Must be user name only eg. the_prof"
layouts:
admin:
login_nav:
@@ -3864,7 +3855,6 @@ en_FR:
title: "New Product"
new_product: "New Product"
supplier: "Supplier"
supplier_select_placeholder: "Select a supplier"
product_name: "Product Name"
units: "Unit Size"
value: "Value"
@@ -3910,9 +3900,6 @@ en_FR:
select_and_search: "Select filters and click on %{option} to access your data."
customer_names_message:
customer_names_tip: "If customer names are hidden for orders you have supplied, you can contact the distributor and ask if they can update their shop preferences to allow their suppliers to view customer names."
products_and_inventory:
all_products:
message: "Note that stock levels reported are from supplier product lists only. If you are using Inventory to manage your stock quantities these values will be ignored in this report."
users:
index:
listing_users: "Listing Users"
@@ -4263,7 +4250,6 @@ en_FR:
search_input:
placeholder: Search
selector_with_filter:
selected_items: "%{count} selected"
search_placeholder: Search
pagination:
next: Next

View File

@@ -404,11 +404,8 @@ fr:
filters:
categories:
title: Conditions de transport
selected_categories: "%{count} catégories sélectionnées"
producers:
title: Producteurs
selected_producers: "%{count} producteurs sélectionnés"
per_page: "%{count} éléments par page"
colums: Colonnes
columns:
name: Nom
@@ -651,7 +648,6 @@ fr:
not_found: non trouvé dans le base de données
category_not_found: n'est pas conforme aux catégories utilisées. Merci de modifier les catégories en utilisant celles listées sur la page d'import ou vérifier qu'il n'y ait pas de faute de frappe ou d'espace à fin du mot.
not_updatable: ne peut pas être mis à jour pour des produits existants via la fonctionnalité d'import de fichier produits
values_must_be_same: doit être identique pour les produits avec un nom identique
blank: Champ obligatoire
products_no_permission: vous n'avez pas l'autorisation de gérer les produits de cette entreprise
inventory_no_permission: vous n'avez pas l'autorisation d'ajouter les produits de ce producteur à votre catalogue boutique
@@ -1803,7 +1799,6 @@ fr:
message_html: "Vous avez déjà passé une commande pour ce cycle de vente. Vérifiez votre %{cart} pour voir les produits commandés. Vous pouvez annuler ou modifier votre commande jusqu'à la fermeture du cycle de vente."
step1:
contact_information:
title: Contact
email:
label: Email
phone:
@@ -2668,7 +2663,6 @@ fr:
report_header_customer_code: Code acheteur
report_header_product: Produit
report_header_product_properties: Propriétés / labels Produits
report_header_product_tax_category: TVA applicable
report_header_quantity: Quantité
report_header_max_quantity: Quantité Max
report_header_variant: Variante
@@ -2681,7 +2675,6 @@ fr:
report_header_supplier: Fournisseur
report_header_producer: Producteur
report_header_producer_suburb: Ville Producteur
report_header_producer_charges_sales_tax?: Soumis à la TVA
report_header_unit: Unité
report_header_group_buy_unit_quantity: Nb d'unités achetées (vente par lots)
report_header_cost: Coût
@@ -2701,7 +2694,6 @@ fr:
report_header_delivery_postcode: Code Postal Livraison
report_header_bulk_unit_size: Quantité totale du lot
report_header_weight: Poids
report_header_final_weight_volume: Poids ou volume livré
report_header_height: Hauteur
report_header_width: Largeur
report_header_depth: Profondeur
@@ -3662,7 +3654,6 @@ fr:
messages:
included_price_validation: "ne peut pas être sélectionné à moins d'avoir une zone par défaut"
blank: "Champ obligatoire"
invalid_instagram_url: "Uniquement le nom d'utilisateur / identifiant par ex. le_prof"
layouts:
admin:
login_nav:
@@ -3916,7 +3907,6 @@ fr:
title: "Nouveau Produit"
new_product: "Nouveau Produit"
supplier: "Fournisseur"
supplier_select_placeholder: "Sélectionner un producteur"
product_name: "Nom du Produit"
units: "Unité de mesure"
value: "Quantité"
@@ -3962,9 +3952,6 @@ fr:
select_and_search: "Sélectionner les filtres et cliquer sur %{option} pour accéder aux données."
customer_names_message:
customer_names_tip: "Si les noms des acheteurs sont masqués, vous pouvez contacter le gestionnaire de la boutique. Il pourra vous donner accès à cette information."
products_and_inventory:
all_products:
message: "Attention les stocks correspondent aux stocks producteurs et non au stock du catalogue boutique."
users:
index:
listing_users: "Liste des utilisateurs"
@@ -4329,7 +4316,6 @@ fr:
search_input:
placeholder: Rechercher
selector_with_filter:
selected_items: "%{count} sélectionné"
search_placeholder: Rechercher
pagination:
next: Suivant

View File

@@ -30,7 +30,6 @@ it:
shipping_category_id: "Categoria Spedizioni"
variant_unit: "Unità Variante"
variant_unit_name: "Nome Unità Variante"
unit_value: "Valore unità"
spree/credit_card:
base: "Carta di Credito"
number: "Numero"
@@ -181,8 +180,6 @@ it:
updated_not_active: "La tua password è stata resettata, ma la tua email non è ancora stata confermata."
updated: "La tua password è stata modificata con successo.\nOra sei collegato."
send_instructions: "A breve riceverai una email con le istruzioni per la conferma del tuo account."
oidc:
failure: "Non è possibile accedere: %{error}"
home_page_alert_html: "HTML alert Home page"
hub_signup_case_studies_html: "HTML iscrizione hub casi studio"
hub_signup_detail_html: "HTML dettagli iscrizione hub"
@@ -233,7 +230,7 @@ it:
email_userguide_html: "La Guida Utente con supporto dettagliato per l'impostazione del tuo Produttore o Distributore è qui: %{link}"
userguide: "Guida Utente di Open Food Network"
email_admin_html: "Puoi gestire il tuo profilo facendo il log in al link %{link} o cliccando sull'ingranaggio in alto a destra della homepage, e selezionando Amministrazione"
admin_panel: "Panello di Controllo"
admin_panel: "Panello Amministrativo"
email_community_html: "Abbiamo anche un forum per le discussioni comunitarie legate al software di OFN e le sfide uniche legate all'avere un'impresa alimentare. Ti incoraggiamo a farne parte. Siamo in continua evoluzione e il tuo contributo al forum delineerà quello che succederà in futuro. %{link}"
join_community: "Unisciti alla community"
invite_manager:
@@ -404,11 +401,8 @@ it:
filters:
categories:
title: categorie
selected_categories: "%{count} categorie selezionate"
producers:
title: Produttori
selected_producers: "%{count} produttori selezionati"
per_page: "%{count} articoli per pagina"
colums: Colonne
columns:
name: Nome
@@ -649,9 +643,7 @@ it:
conditional_blank: non può essere vuoto se unit_type è vuoto
no_product: Non corrisponde a nessun prodotto nel database
not_found: non trovato nel database
category_not_found: Non corrisponde alle categorie ammesse. Controlla le categorie tra cui scegliere alla pagina di importazione prodotti, o controlla che non ci siano errori di battitura.
not_updatable: non può essere aggiornato sui prodotti esistenti tramite l'importazione dei prodotti
values_must_be_same: deve essere lo stesso per prodotti con lo stesso nome
blank: non può essere lasciato vuoto
products_no_permission: non sei abilitato a gestire i prodotti per questa azienda
inventory_no_permission: non sei abilitato a creare l'inventario per questo produttore
@@ -1372,12 +1364,6 @@ it:
formatted_data: Dati Formattati
packing:
name: "Resoconti smistamento/imballaggio"
oidc_settings:
index:
title: "Impoostazioni"
connect: "Collega il tuo profilo"
already_connected: "Il tuo profilo è già collegato a questo profilo di autorizzazione DFC"
view_account: "Per vedere il tuo profilo, vedi:"
subscriptions:
index:
title: "Abbonamenti"
@@ -1800,7 +1786,6 @@ it:
message_html: "Hai già un ordine per questo ciclo d'ordine. Controlla%{cart} per vedere gli articoli ordinati in precedenza. Puoi anche cancellare gli articoli finché il ciclo dell'ordine è aperto."
step1:
contact_information:
title: Informazioni contatto
email:
label: Email
phone:
@@ -2614,17 +2599,7 @@ it:
report_header_to_hub: Al gruppo
report_header_hub_code: Codice hub
report_header_hub_id: ID Hub
report_header_hub_business_number: "Partita IVA o Codice Fiscale dell'Hub"
report_header_hub_legal_name: "Ragione sociale dell'Hub"
report_header_hub_contact_name: "Nome di contatto dell'Hub"
report_header_hub_email: "Email pubblica"
report_header_hub_owner_email: Email Gestore Hub
report_header_hub_phone: "Numero di Telefono"
report_header_hub_address_line1: "Indirizzo Riga 1"
report_header_hub_address_line2: "Indirizzo Riga 2"
report_header_hub_address_city: "Comune"
report_header_hub_address_zipcode: "CAP"
report_header_hub_address_state_name: "Stato"
report_header_code: Codice
report_header_paid: Pagato?
report_header_delivery: Consegna?
@@ -2659,13 +2634,11 @@ it:
report_header_total_tax: "Oneri totali (%{currency_symbol})"
report_header_total_excl_tax: "Totale imponibile (%{currency_symbol})"
report_header_total_incl_tax: "Totale IVA incl. (%{currency_symbol})"
report_header_total_orders: "Numero totale ordini"
report_header_enterprise: Azienda
report_header_customer: Cliente
report_header_customer_code: Codice Cliente
report_header_product: Prodotto
report_header_product_properties: Proprietà prodotto
report_header_product_tax_category: Categoria d'imposta del prodotto
report_header_quantity: Quantità
report_header_max_quantity: Quantità massima
report_header_variant: Variante
@@ -2678,7 +2651,6 @@ it:
report_header_supplier: Fornitore
report_header_producer: Produttore
report_header_producer_suburb: Comune produttore
report_header_producer_charges_sales_tax?: Partita IVA / Codice fiscale
report_header_unit: Unità
report_header_group_buy_unit_quantity: Raggruppare per quantità di unità
report_header_cost: Costo
@@ -2698,7 +2670,6 @@ it:
report_header_delivery_postcode: CAP consegna
report_header_bulk_unit_size: Quantità minima per Acquisto di Gruppo
report_header_weight: Peso
report_header_final_weight_volume: Peso/Volume
report_header_height: Altezza
report_header_width: Larghezza
report_header_depth: Profondità
@@ -3635,7 +3606,6 @@ it:
messages:
included_price_validation: "Non può essere selezionato se non hai impostato una Zona Fiscale Predefinita "
blank: "non può essere lasciato vuoto"
invalid_instagram_url: "Deve essere solo il nome utente"
layouts:
admin:
login_nav:
@@ -3889,7 +3859,6 @@ it:
title: "Nuovo prodotto"
new_product: "Nuovo prodotto"
supplier: "Fornitore"
supplier_select_placeholder: "Seleziona un fornitore"
product_name: "Nome Prodotto"
units: "Unità di misura"
value: "Valore"
@@ -3935,9 +3904,6 @@ it:
select_and_search: "Seleziona filtri e clicca su %{option} per accedere al tuo dato"
customer_names_message:
customer_names_tip: "Se i nomi dei clienti sono nascosti nelle gentili richieste che hai evaso, puoi contattare il distributore e chiedergli di aggiornare le sue impostazioni per permettere ai suoi fornitori di visualizzare i nomi dei clienti."
products_and_inventory:
all_products:
message: "Considera che le quantità disponibili riguardano solo il listino del fornitore. Se stai usando l'Inventario per gestire le tue quantità disponibili, questi valori saranno ignorati in questo report."
users:
index:
listing_users: "Elenco Utenti"
@@ -4301,7 +4267,6 @@ it:
search_input:
placeholder: Cerca
selector_with_filter:
selected_items: "%{count} selezionato"
search_placeholder: Cerca
pagination:
next: Prossimo

View File

@@ -1,16 +0,0 @@
# frozen_string_literal: true
class DropSpreeSkrillTransactions < ActiveRecord::Migration[6.1]
def change
drop_table "spree_skrill_transactions", id: :serial, force: :cascade do |t|
t.string "email", limit: 255
t.float "amount"
t.string "currency", limit: 255
t.integer "transaction_id"
t.integer "customer_id"
t.string "payment_type", limit: 255
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
end
end

View File

@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2023_01_05_000312) do
ActiveRecord::Schema.define(version: 2022_12_08_150521) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -890,6 +890,17 @@ ActiveRecord::Schema.define(version: 2023_01_05_000312) do
t.index ["shipment_id", "shipping_method_id"], name: "spree_shipping_rates_join_index", unique: true
end
create_table "spree_skrill_transactions", id: :serial, force: :cascade do |t|
t.string "email", limit: 255
t.float "amount"
t.string "currency", limit: 255
t.integer "transaction_id"
t.integer "customer_id"
t.string "payment_type", limit: 255
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "spree_state_changes", id: :serial, force: :cascade do |t|
t.string "name", limit: 255
t.string "previous_state", limit: 255