Commit cf667e6e authored by Jean-Noël Rouchon's avatar Jean-Noël Rouchon

Ajout du champ FicheA pour les travaux

parent bda0caaf
class ChangeTasks2 < ActiveRecord::Migration
def self.up
change_table :tasks do |t|
t.string :ficheA
end
end
def self.down
change_table :tasks do |t|
t.remove :ficheA
end
end
end
......@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20150330135120) do
ActiveRecord::Schema.define(version: 20161128210912) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
......@@ -74,6 +74,7 @@ ActiveRecord::Schema.define(version: 20150330135120) do
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "technician_validate"
t.string "ficheA"
end
add_index "tasks", ["place_id"], name: "index_tasks_on_place_id", using: :btree
......
......@@ -97,6 +97,7 @@ post '/travaux' do
travail.place_id = params[:selectPlace]
travail.state_id = params[:selectStatus]
travail.recommendation = params[:inputRecommendation]
travail.ficheA = params[:inputFicheA]
if params[:inputDateEch].empty?
travail.date_echeance = nil
else
......
......@@ -56,6 +56,12 @@
.col-sm-10
%textarea.form-control{name: "inputRecommendation", rows: 3, readonly: validate}
= (@new ? "" : @travail.recommendation)
.form-group
%label.col-sm-2{for:"inputFicheA" , "control-label" => true}
Numéro de fiche A
.col-sm-10
%input.form-control{name: "inputFicheA", value: @travail.ficheA}
.form-group
.col-sm-offset-2.col-sm-10
- if validate
......
......@@ -24,6 +24,7 @@
<th> Rapporté par</th>
<th> Statut</th>
<th> Date d'échéance</th>
<th> Fiche A</th>
</tr>
</thead>
<tbody>
......@@ -59,6 +60,9 @@
<td>
<%= (ech ? ech.strftime("%d/%m/%Y") : "") %>
</td>
<td>
<%= travail.ficheA.to_s %>
</td>
</tr>
<% end %>
</tbody>
......
......@@ -16,6 +16,7 @@
%th Rapporté par
%th Statut
%th Date d'échéance
%th Fiche A
- @travaux.each do |travail|
- classe = (travail.state_id==4 ? "success" : "")
- if travail[:date_echeance]
......@@ -37,3 +38,5 @@
= travail.state.name
%td
= (ech ? ech.strftime("%d/%m/%Y") : "")
%td
= travail.ficheA.to_s
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment