title = "Create Booking" url = "/booking/create/1" layout = "Dashboard" is_hidden = 0 [session] security = "user" allowedUserGroups[] = "admin" allowedUserGroups[] = "supplier" redirect = "dashboard/login" == vendor; $this['vendors'] = Vendor::where('id', $user->vendor)->first(); $this['tickets'] = Ticket::orderBy('created_at', 'desc')->where('vendor_id', $user->vendor)->get(); $this['rateplans'] = Rateplan::orderBy('created_at', 'desc')->where('vendor_id', $user->vendor)->get(); $this['allocations'] = Allocation::where('vendor_id', $user->vendor)->get(); } $this['ticket'] = Ticket::make(); $this['allocation'] = Allocation::make(); } function onUpdate() { date_default_timezone_set('Asia/Singapore'); $vendor = Input::post('vendor2'); $arrival_date = Input::post('arrival_date'); $this['arrival_date'] = Input::post('arrival_date'); $user = Auth::getUser(); if ($user) { $this['vendor'] = $user->vendor; $this['vendors'] = Vendor::where('id', $user->vendor)->first(); $this['tickets'] = Ticket::orderBy('created_at', 'desc')->where('vendor_id', $user->vendor)->get(); $this['rateplans'] = Rateplan::orderBy('created_at', 'desc')->where('vendor_id', $user->vendor)->get(); $this['allocations'] = Allocation::where('vendor_id', $user->vendor)->get(); } $this['ticket'] = Ticket::make(); $this['allocation'] = Allocation::make(); return ['#list-ticket-container' => $this->renderPartial('booking/list_ticket')]; } ?> ==
1 Select Ticket
List Ticket
{% partial 'booking/list_ticket' tickets=tickets allocations=allocations rateplans=rateplans %}
{% put scripts %} {% endput %}