From 056dda1cfa4abc65e64613c40dd22666532dd781 Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Fri, 26 Jun 2020 01:04:15 +0200 Subject: [PATCH] suite --- app/assets/javascripts/public.js.coffee | 13 --- app/assets/stylesheets/public.scss | 142 ++++++++++++++++++++---- app/models/p_customer.rb | 23 +++- config/nginx.conf | 2 +- 4 files changed, 137 insertions(+), 43 deletions(-) diff --git a/app/assets/javascripts/public.js.coffee b/app/assets/javascripts/public.js.coffee index ac624e6..c57146a 100644 --- a/app/assets/javascripts/public.js.coffee +++ b/app/assets/javascripts/public.js.coffee @@ -431,19 +431,6 @@ $ -> animate_investigations() - - - - - - - - - - - - - diff --git a/app/assets/stylesheets/public.scss b/app/assets/stylesheets/public.scss index f3e878f..3f63645 100644 --- a/app/assets/stylesheets/public.scss +++ b/app/assets/stylesheets/public.scss @@ -9966,30 +9966,7 @@ a.sp-video { } } } -@media screen and (min-width: 0px) and (max-width: 740px) { - .nav_user_full { - >div { - width: calc(100% - 30px); - margin-bottom: 30px; - } - display: block; - } - .user_prime { - li { - display: block; - width: 100% !important; - } - .tab-content { - font-size: 16px; - } - } - .tab-content { - padding: 20px; - >.active { - padding: 0px; - } - } -} + @media screen and (min-width: 0px) and (max-width: 1170px) { .info_contact { >div { @@ -10508,4 +10485,121 @@ a.sp-video { } } + + +@media screen and (min-width: 0px) and (max-width: 740px) { + + + .m_event{ + img{ + float:none; + margin:10px auto; + display:block; + + + } + + .desc{ + margin: 5px 20px; + } + + } + + .circuit{ + .img{ + float:none; + margin:10px auto; + display:block; + position:static; + + + } + + .desc{ + margin: 5px 20px; + } + + } + + .organisateur{ + padding-top:1px; + .img{ + float:none; + margin:10px auto; + display:block; + position:static; + height:100px; + margin-top:20px; + + + } + + .desc{ + margin: 5px 20px; + } + + } + + .right_intro{ + text-align:left; + padding:5px 30px; + + } + + .row2 .block_intro:nth-child(2){ + + padding: 30px 30px !important; + } + .nav_user_full { + >div { + width: calc(100% - 30px); + margin-bottom: 30px; + } + display: block; + } + .user_prime { + li { + display: block; + width: 100% !important; + } + .tab-content { + font-size: 16px; + } + } + .tab-content { + padding: 20px; + >.active { + padding: 0px; + } + } + + .recherche_filtre{ + padding: 20px 40px; + .inline_large_input{ + width:auto !important; + display:block; + margin:5px 0px; + } + + .right{ + float:none; + } + + p{ + margin:10px 0; + } + + } +} + + + + + + + + + + + \ No newline at end of file diff --git a/app/models/p_customer.rb b/app/models/p_customer.rb index bdbdbcf..aeb9a3e 100644 --- a/app/models/p_customer.rb +++ b/app/models/p_customer.rb @@ -77,7 +77,17 @@ class PCustomer < ApplicationRecord def do_import if self.imp_iban? and self.imp_bic? - self.m_odr_rep_ribs.create(:bic => self.imp_bic, :iban => self.imp_iban, :admin_ok => true) + puts "RIB PRESENT" + if rib = self.m_odr_rep_ribs.first + puts "RIB EXISTANT" + rib.iban = self.imp_iban + rib.bic = self.imp_bic + rib.admin_ok = false + rib.save + else + puts "RIB CREER" + self.m_odr_rep_ribs.create(:bic => self.imp_bic, :iban => self.imp_iban, :admin_ok => nil) + end end if self.imp_test == "oui" @@ -95,7 +105,7 @@ class PCustomer < ApplicationRecord part.address_2 = self.imp_address part.cp = self.imp_cp2 part.city = self.imp_city - part.country = "FR" + part.country = "FR" if !part.country? part.tel = self.imp_tel self.particular = part @@ -127,7 +137,7 @@ class PCustomer < ApplicationRecord part.save self.particular = part - + self.refresh_import = nil self.save @@ -135,11 +145,14 @@ class PCustomer < ApplicationRecord end after_create do - do_import() if self.imp_email? + puts "TEST1" + puts self.imp_email? + puts "TEST2" + self.do_import() if self.imp_email? end after_update do - #self.do_import if self.refresh_import + self.do_import if self.refresh_import == "true" end acts_as_csv_import :fields =>[:imported, :email, :password, :past_id,:imp_cp,:imp_country,:imp_ref,:imp_email,:imp_firstname,:imp_name,:imp_fonction,:imp_organisme,:imp_address,:imp_cp2,:imp_city,:imp_tel,:imp_portable,:imp_lien,:imp_comment,:imp_iban,:imp_bic,:imp_circuit_1,:imp_circuit_2,:imp_circuit_3,:imp_partenaire,:imp_ecran,:imp_blocage,:imp_valid,:imp_user_valid,:imp_offre,:imp_info,:imp_cgu,:imp_test,:imp_stickers,:imp_npai,:npai,:imp_relance_adresse,:imp_demande_info,:imp_creation,:imp_modification, :refresh_import] diff --git a/config/nginx.conf b/config/nginx.conf index da92afc..c031723 100644 --- a/config/nginx.conf +++ b/config/nginx.conf @@ -48,7 +48,7 @@ server { listen [::]:80; server_name mmsc.olwen.xyz mamotosurcircuit.com www.mamotosurcircuit.com; - return 301 https://mmsc.olwen.xyz$request_uri; + return 301 https://mamotosurcircuit.com$request_uri; include snippets/letsencrypt.conf; }