matthiku / cSpot

c-SPOT - the church-Services Planning Online Tool
5 stars 4 forks source link

Find plan by date doesn't seem to work #143

Closed matthiku closed 8 years ago

matthiku commented 8 years ago

Clicking on the calendar module on the home screen opens the "Create a new plan" view instead of the plan for this date.

Could it be related to the feature that we now can have more than one plans per day?

Actually, it's related to the adding of a start time to the plan date! Now the "where" clause: where('date', $date)->first(); doesn't work anymore if the time is not 00:00:00 as before!

matthiku commented 8 years ago

Resolved by changing the where clause to: ->where('date', 'like', $date.'%')->first();