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