aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/assets/javascripts/es6_browserified/time_tables/components/TimeTableDay.js9
-rw-r--r--app/assets/javascripts/es6_browserified/time_tables/components/Timetable.js31
-rw-r--r--app/assets/stylesheets/application.sass1
-rw-r--r--app/assets/stylesheets/modules/_timetables.sass46
-rw-r--r--db/schema.rb17
5 files changed, 86 insertions, 18 deletions
diff --git a/app/assets/javascripts/es6_browserified/time_tables/components/TimeTableDay.js b/app/assets/javascripts/es6_browserified/time_tables/components/TimeTableDay.js
index d6d1301b9..dff64ba80 100644
--- a/app/assets/javascripts/es6_browserified/time_tables/components/TimeTableDay.js
+++ b/app/assets/javascripts/es6_browserified/time_tables/components/TimeTableDay.js
@@ -9,11 +9,16 @@ class TimeTableDay extends Component {
render() {
return (
- <span className='day'>
+ <span
+ className={'day' + (this.props.value.wday == 0 ? ' last_wday' : '')}
+ data-wday={'S' + this.props.value.wnumber}
+ >
<span className='dayname'>
{((this.props.value.day).charAt(0) == 'm') ? (this.props.value.day).substr(0, 2) : (this.props.value.day).charAt(0)}
</span>
- <span className="daynumber">
+ <span
+ className={'daynumber' + ((this.props.value.include_date && !this.props.value.excluded_date) ? ' included' : '')}
+ >
{this.props.value.mday}
</span>
</span>
diff --git a/app/assets/javascripts/es6_browserified/time_tables/components/Timetable.js b/app/assets/javascripts/es6_browserified/time_tables/components/Timetable.js
index 98c675336..1d13d39fb 100644
--- a/app/assets/javascripts/es6_browserified/time_tables/components/Timetable.js
+++ b/app/assets/javascripts/es6_browserified/time_tables/components/Timetable.js
@@ -22,9 +22,6 @@ class Timetable extends Component{
<div className="table table-2entries mt-sm mb-sm">
<div className="t2e-head w20">
<div className="th">
- <div></div>
- <div></div>
- <div></div>
<div className="strong">Synthèse</div>
</div>
<div className="td">Journées d'application</div>
@@ -32,20 +29,22 @@ class Timetable extends Component{
<div className="td">Exceptions</div>
</div>
<div className="t2e-item-list w80">
- <div className="t2e-item">
- <div className="th">
- <div className="strong monthName">
- {this.monthName(this.props.timetable.current_periode_range)}
- </div>
+ <div>
+ <div className="t2e-item">
+ <div className="th">
+ <div className="strong monthName">
+ {this.monthName(this.props.timetable.current_periode_range)}
+ </div>
- <div className='monthDays'>
- {this.props.timetable.current_month.map((day, i) =>
- <TimeTableDay
- key={i}
- index={i}
- value={day}
- />
- )}
+ <div className='monthDays'>
+ {this.props.timetable.current_month.map((day, i) =>
+ <TimeTableDay
+ key={i}
+ index={i}
+ value={day}
+ />
+ )}
+ </div>
</div>
</div>
</div>
diff --git a/app/assets/stylesheets/application.sass b/app/assets/stylesheets/application.sass
index e4a2a5445..47cccba65 100644
--- a/app/assets/stylesheets/application.sass
+++ b/app/assets/stylesheets/application.sass
@@ -15,3 +15,4 @@
@import 'modules/routes_stopoints'
@import 'modules/jp_collection'
@import 'modules/vj_collection'
+@import 'modules/timetables'
diff --git a/app/assets/stylesheets/modules/_timetables.sass b/app/assets/stylesheets/modules/_timetables.sass
new file mode 100644
index 000000000..e020242ae
--- /dev/null
+++ b/app/assets/stylesheets/modules/_timetables.sass
@@ -0,0 +1,46 @@
+//---------------//
+// Time Tables //
+//---------------//
+
+#periods
+ .t2e-head > .th
+ height: 127px
+
+ > .strong
+ padding-top: 113px
+ transform: translateY(-1.4em)
+
+ .t2e-item
+ .th
+ padding: 6px 0 0 0
+ > .monthName
+ padding: 0 0 6px 8px
+
+ .monthDays
+ white-space: nowrap
+
+ .day
+ display: inline-block
+ width: 34px
+ padding: 20px 0 6px 0
+
+ &.last_wday
+ &:not(:last-child)
+ border-right: 2px solid
+
+ &:before
+ content: attr(data-wday)
+ display: block
+ text-align: center
+ color: rgba($grey, 0.5)
+ padding-bottom: 10px
+
+ .dayname
+ display: block
+ text-align: center
+ text-transform: capitalize
+
+ .daynumber
+ display: block
+ text-align: center
+ font-weight: bold
diff --git a/db/schema.rb b/db/schema.rb
index 1152377b8..161f0a839 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -165,6 +165,22 @@ ActiveRecord::Schema.define(version: 20170414080922) do
add_index "connection_links", ["objectid"], name: "connection_links_objectid_key", unique: true, using: :btree
+ create_table "delayed_jobs", id: :bigserial, force: :cascade do |t|
+ t.integer "priority", default: 0
+ t.integer "attempts", default: 0
+ t.text "handler"
+ t.text "last_error"
+ t.datetime "run_at"
+ t.datetime "locked_at"
+ t.datetime "failed_at"
+ t.string "locked_by", limit: 255
+ t.string "queue", limit: 255
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "delayed_jobs", ["priority", "run_at"], name: "delayed_jobs_priority", using: :btree
+
create_table "exports", id: :bigserial, force: :cascade do |t|
t.integer "referential_id", limit: 8
t.string "status", limit: 255
@@ -825,6 +841,7 @@ ActiveRecord::Schema.define(version: 20170414080922) do
add_index "workbenches", ["organisation_id"], name: "index_workbenches_on_organisation_id", using: :btree
add_index "workbenches", ["stop_area_referential_id"], name: "index_workbenches_on_stop_area_referential_id", using: :btree
+ add_foreign_key "access_links", "access_points", name: "aclk_acpt_fkey", on_delete: :cascade
add_foreign_key "group_of_lines_lines", "group_of_lines", name: "groupofline_group_fkey", on_delete: :cascade
add_foreign_key "journey_frequencies", "timebands", name: "journey_frequencies_timeband_id_fk", on_delete: :nullify
add_foreign_key "journey_frequencies", "vehicle_journeys", name: "journey_frequencies_vehicle_journey_id_fk", on_delete: :nullify