fixed updated method of events.. was having week error when updating events
This commit is contained in:
parent
777af19abb
commit
d089822ff3
|
@ -95,8 +95,7 @@ class Panel::Calendar::BackEnd::EventsController < OrbitBackendController
|
|||
start_week = final_start_time.strftime("%U")
|
||||
start_week = start_week.to_i + 1
|
||||
end_week = final_end_time.strftime("%U")
|
||||
end_week = end_week.to_i + 1
|
||||
debugger
|
||||
end_week = end_week.to_i + 1
|
||||
total_days = final_end_time - final_start_time
|
||||
@event = Event.new
|
||||
@event.title = title
|
||||
|
@ -156,6 +155,12 @@ class Panel::Calendar::BackEnd::EventsController < OrbitBackendController
|
|||
# if end_am_pm == "PM"
|
||||
# temp_end_time = $endtime + 12
|
||||
# end
|
||||
if params[:event][:cal_id]
|
||||
cal_id = params[:event][:cal_id]
|
||||
else
|
||||
cal_id = Cal.first.id.to_s
|
||||
end
|
||||
|
||||
if params[:all_day]
|
||||
all_day = true
|
||||
$starttime = 0
|
||||
|
@ -167,7 +172,9 @@ class Panel::Calendar::BackEnd::EventsController < OrbitBackendController
|
|||
final_start_time = Date.new(start_year.to_i,start_month.to_i,start_date.to_i)
|
||||
final_end_time = Date.new(end_year.to_i,end_month.to_i,end_date.to_i)
|
||||
start_week = final_start_time.strftime("%U")
|
||||
end_week = final_end_time.strftime("%U")
|
||||
start_week = start_week.to_i + 1
|
||||
end_week = final_end_time.strftime("%U")
|
||||
end_week = end_week.to_i + 1
|
||||
total_days = final_end_time - final_start_time
|
||||
@event = Event.find(params[:id])
|
||||
@event.title = title
|
||||
|
|
Reference in New Issue