Fonction pour inscrits
This commit is contained in:
parent
fc405e6a84
commit
e88d1335cb
@ -224,7 +224,7 @@ GEM
|
||||
mime-types (3.3.1)
|
||||
mime-types-data (~> 3.2015)
|
||||
mime-types-data (3.2019.1009)
|
||||
mimemagic (0.3.3)
|
||||
mimemagic (0.3.10)
|
||||
mini_magick (4.10.1)
|
||||
mini_mime (1.0.2)
|
||||
mini_portile2 (2.4.0)
|
||||
|
@ -13,13 +13,16 @@
|
||||
= f.input :landing_text, :label => "Texte lancement :"
|
||||
|
||||
.row.qi_cancel_margins
|
||||
.col-sm-4
|
||||
.col-sm-3
|
||||
= f.input :start_at, :label => "Date de début :" , :as => :date
|
||||
.col-sm-4
|
||||
.col-sm-3
|
||||
= f.input :end_at, :label => "Date de fin :" , :as => :date
|
||||
.col-sm-4
|
||||
.col-sm-3
|
||||
= f.input :public_end, :label => "Date de fin des envois :" , :as => :date
|
||||
|
||||
|
||||
.col-sm-3
|
||||
= f.input :ins_limit, :label => "Nbr max de participations :"
|
||||
|
||||
|
||||
|
||||
.row.qi_cancel_margins
|
||||
|
@ -7,6 +7,17 @@
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
|
||||
-elsif @m_odr.ins_limit? and @m_odr.m_odr_reps.count >= @m_odr.ins_limit.to_i
|
||||
%div{:style => "margin-top:30px;font-weight:bold;font-weight:800;font-size:2em;text-transform:uppercase;font-family: 'Open Sans','Helvetica Neue', Helvetica, sans-serif;text-align:center;"}
|
||||
%br
|
||||
Cette opération est maintenant terminée, nous vous remercions pour votre confiance !
|
||||
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
|
||||
|
||||
-elsif @m_odr.start_at > Date.today and params[:force].to_s == ""
|
||||
%div{:style => "margin-top:30px;font-weight:bold;font-weight:800;font-size:2em;text-transform:uppercase;font-family: 'Open Sans','Helvetica Neue', Helvetica, sans-serif;text-align:center;"}
|
||||
-count = ((@m_odr.start_at) - (Date.today))
|
||||
@ -67,7 +78,23 @@
|
||||
=hidden_field_tag :force, params[:force]
|
||||
=f.hidden_field :t
|
||||
|
||||
|
||||
-if @m_odr.ins_limit?
|
||||
%center
|
||||
%p
|
||||
-nbr = @m_odr.ins_limit - @m_odr.m_odr_reps.count
|
||||
|
||||
=nbr
|
||||
|
||||
-if nbr > 1
|
||||
participations restantes
|
||||
|
||||
-else
|
||||
participation restante
|
||||
|
||||
|
||||
.form_pannel
|
||||
|
||||
%h3 Vous
|
||||
|
||||
=f.inputs do
|
||||
|
5
db/migrate/20210913081136_add_ins_limit_to_m_odrs.rb
Normal file
5
db/migrate/20210913081136_add_ins_limit_to_m_odrs.rb
Normal file
@ -0,0 +1,5 @@
|
||||
class AddInsLimitToMOdrs < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
add_column :m_odrs, :ins_limit, :integer
|
||||
end
|
||||
end
|
@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2020_10_06_115533) do
|
||||
ActiveRecord::Schema.define(version: 2021_09_13_081136) do
|
||||
|
||||
create_table "accounting_zones", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t|
|
||||
t.string "name"
|
||||
@ -967,6 +967,7 @@ ActiveRecord::Schema.define(version: 2020_10_06_115533) do
|
||||
t.integer "ba_number_place_x"
|
||||
t.integer "ba_remise_place_y"
|
||||
t.integer "ba_remise_place_x"
|
||||
t.integer "ins_limit"
|
||||
t.index ["p_customer_id"], name: "index_m_odrs_on_p_customer_id"
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user