Commit 7fa6d6f1 authored by hugo's avatar hugo
Browse files

Make missing records extra visible in table

parent 231a2543
......@@ -136,6 +136,7 @@ ActiveRecord::Schema.define(version: 0) do
t.integer "extended_out", default: 0, null: false
t.integer "extended_total", default: 0, null: false
t.boolean "dirty_bit", default: true
t.boolean "is_missing_record"
t.index ["date"], name: "date"
t.index ["type", "aggregate_id", "aggregate_type", "date"], name: "unique_index", unique: true
end
......
......@@ -35,6 +35,12 @@ tr.odd > .sorting_1 {
opacity: 1.0 !important;
}
tr.missing_record {
text-decoration: line-through;
color: red;
}
ul {
padding: 0;
......
......@@ -419,7 +419,8 @@ $(function() {
{ data: "ratio", className: 'ratio', visible: false },
{ data: "aggregate_id", orderable: false, className: 'graph_link'},
{ data: "aggregate_type", orderable: false, className: 'graph_link'},
{ data: "date", type: 'date', visible: false }
{ data: "date", type: 'date', visible: false },
{ data: "is_missing_record", type: 'boolean', visible: false } // #19
],
// only search label field
......@@ -458,7 +459,15 @@ $(function() {
return isEnabled ? "<a href='" + link + "''" + veno + '><img src=images/icon2.png></a>' : ''
}
}
]
],
"createdRow": function ( row, data, index ) {
if ( data['is_missing_record'] ) {
$(row).addClass('missing_record');
$(row).prop('title', 'Det finnes ingen data for perioden. Kamera ute av drift?');
}
}
});
}
......
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