32 lines
697 B
Plaintext
32 lines
697 B
Plaintext
.qi_header
|
|
.right= link_to 'Créer un Kaps !', new_public_kaps_day_path(), :class => "btn btn-primary", :remote => true
|
|
%h1
|
|
Kaps
|
|
%span
|
|
Mes Kaps
|
|
|
|
|
|
.qi_row
|
|
.qi_pannel.qi_plain.padding
|
|
|
|
-start_date = Date.parse("2020/01/01")
|
|
-date = start_date
|
|
-while date <= start_date + 6.month
|
|
-if kaps_day = current_p_customer.kaps_days.where(:date => date).first
|
|
-kaps_day.generate_kapsmes
|
|
-else
|
|
-current_p_customer.kaps_days.create(:date => date)
|
|
|
|
|
|
-date = date + 1.day
|
|
|
|
%table.table
|
|
%tr
|
|
%th Type
|
|
|
|
|
|
|
|
%tbody#kaps_days_rows
|
|
=render current_p_customer.kaps_days.order("date DESC").all
|
|
|
|
|