Better employee selection for schedule
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
p Select employee
|
||||
p= modal_options.header
|
||||
ul.select-employees
|
||||
each employee in employees
|
||||
li.select-employee
|
||||
|
||||
@@ -12,6 +12,7 @@ App.ScheduleView = Ember.View.extend
|
||||
selectable: true
|
||||
selectHelper: true
|
||||
select: (start, end)=>
|
||||
format = 'dddd h:mm'
|
||||
controller.modal 'select_employee',
|
||||
ok: ->
|
||||
# this context is SelectEmployeeController
|
||||
@@ -20,6 +21,7 @@ App.ScheduleView = Ember.View.extend
|
||||
shift.set 'employee', employee
|
||||
shift.save().then ->
|
||||
placeholder.fullCalendar('renderEvent', shift.get('calendar_event'), true)
|
||||
header: t('employee_shift.time_window', start: start.format(format), end: end.format(format))
|
||||
editable: true
|
||||
defaultView: 'agendaWeek'
|
||||
events: events
|
||||
|
||||
@@ -23,6 +23,7 @@ $.extend($translations.en, <%= I18n.t('supplier', locale: :en).to_json %>);
|
||||
$.extend($translations.nl, <%= I18n.t('supplier', locale: :nl).to_json %>);
|
||||
|
||||
String.prototype.capitalize = function() { return this.charAt(0).toUpperCase() + this.slice(1); }
|
||||
|
||||
window.time_zones = <%= ActiveSupport::TimeZone.all.map{|tz| {name: tz.name, formatted: "GMT#{tz.formatted_offset} #{tz.name}"}}.to_json.html_safe %>;
|
||||
window.countries = <%= IsoCountryCodes.all.map{|cc| {name: cc.name}}.to_json.html_safe %>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user