new branch for seat selection
This commit is contained in:
parent
fd2ed720a2
commit
885a1926ae
|
|
@ -124,6 +124,16 @@ class Install extends Command
|
|||
/_/ \_\__|\__\___|_| |_|\__,_|_/___\___|
|
||||
");
|
||||
|
||||
$this->comment('Success! You can now run Attendize');
|
||||
|
||||
|
||||
// $a = " _
|
||||
// | |
|
||||
// /\ /\ ___ _ __ __| | __ _ _ __
|
||||
// / \/ \ / _ \ '_ \ / _` |/ _' | '_ \
|
||||
// / /\ /\ \ __/ | '-| (_| | (_| | | | |
|
||||
// /_/ \/ \_\___|_| \__,_|\__,_|_| |_|
|
||||
//
|
||||
// ";
|
||||
$this->comment('Success! You can now run Attendize');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,17 @@ if(!function_exists('main_categories')){
|
|||
}
|
||||
}
|
||||
|
||||
if(!function_exists('venues_list')){
|
||||
function venues_list(){
|
||||
return \App\Models\Venue::where('active',1)->pluck('venue_name','id');
|
||||
}
|
||||
}
|
||||
if(!function_exists('sections_list')){
|
||||
function sections_list($venue_id){
|
||||
return \App\Models\Section::where('venue_id',$venue_id)->pluck('section_no','id');
|
||||
}
|
||||
}
|
||||
|
||||
if(!function_exists('category_menu')){
|
||||
/**
|
||||
* make menu from categories
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: merdan
|
||||
* Date: 10/22/2019
|
||||
* Time: 15:03
|
||||
*/
|
||||
|
||||
namespace App\Http\Controllers\API;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class CheckoutController extends Controller
|
||||
{
|
||||
|
||||
public function postValidateTickets(Request $request, $event_id){
|
||||
/*
|
||||
* Order expires after X min
|
||||
*/
|
||||
$order_expires_time = Carbon::now()->addMinutes(config('attendize.checkout_timeout_after'));
|
||||
$event = Event::findOrFail($event_id);
|
||||
|
||||
$ticket_ids = $request->get('tickets');
|
||||
}
|
||||
}
|
||||
|
|
@ -16,8 +16,8 @@ class PublicController extends Controller
|
|||
$categories->children($parent_id);
|
||||
else
|
||||
$categories->main();
|
||||
|
||||
return $categories->get();
|
||||
return response()->json(['categories' => $categories->get()]);
|
||||
// return $categories->get();
|
||||
}
|
||||
|
||||
public function getEvents($cat_id = null, Request $request){
|
||||
|
|
|
|||
|
|
@ -0,0 +1,89 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use Backpack\CRUD\app\Http\Controllers\CrudController;
|
||||
|
||||
// VALIDATION: change the requests to match your own file names if you need form validation
|
||||
use App\Http\Requests\SectionRequest as StoreRequest;
|
||||
use App\Http\Requests\SectionRequest as UpdateRequest;
|
||||
use Backpack\CRUD\CrudPanel;
|
||||
|
||||
/**
|
||||
* Class SectionCrudController
|
||||
* @package App\Http\Controllers\Admin
|
||||
* @property-read CrudPanel $crud
|
||||
*/
|
||||
class SectionCrudController extends CrudController
|
||||
{
|
||||
public function setup()
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| CrudPanel Basic Information
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
$this->crud->setModel('App\Models\Section');
|
||||
$this->crud->setRoute(config('backpack.base.route_prefix') . '/section');
|
||||
$this->crud->setEntityNameStrings('section', 'sections');
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| CrudPanel Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// TODO: remove setFromDb() and manually define Fields and Columns
|
||||
// $this->crud->setFromDb();
|
||||
$this->crud->addColumns([
|
||||
['name'=>'section_no','type'=>'text','label'=>'Section No'],
|
||||
['name'=>'description','type'=>'text','label'=>'Description'],
|
||||
]);
|
||||
|
||||
$this->crud->addFields([
|
||||
['name'=>'section_no','type'=>'text','label'=>'Section No'],
|
||||
['name'=>'description','type'=>'text','label'=>'Description'],
|
||||
['name' => 'venue_id', 'type'=>'select','entity'=>'venue','attribute'=>'venue_name'],
|
||||
[ // image
|
||||
'label' => "Section Image",
|
||||
'name' => "section_image",
|
||||
'type' => 'image',
|
||||
'upload' => true,
|
||||
// 'crop' => true, // set to true to allow cropping, false to disable
|
||||
// 'aspect_ratio' => 1, // ommit or set to 0 to allow any aspect ratio
|
||||
// 'disk' => 's3_bucket', // in case you need to show images from a different disk
|
||||
'prefix' => 'user_content/' // in case your db value is only the file name (no path), you can use this to prepend your path to the image src (in HTML), before it's shown to the user;
|
||||
],
|
||||
['name'=>'seats','type'=>'table','label'=>'Seats',
|
||||
'columns' => [
|
||||
'row' => 'Row',
|
||||
'start_no' => 'Starts at',
|
||||
'end_no' => 'Ends at'
|
||||
]
|
||||
]
|
||||
|
||||
]);
|
||||
|
||||
// add asterisk for fields that are required in SectionRequest
|
||||
$this->crud->setRequiredFields(StoreRequest::class, 'create');
|
||||
$this->crud->setRequiredFields(UpdateRequest::class, 'edit');
|
||||
}
|
||||
|
||||
public function store(StoreRequest $request)
|
||||
{
|
||||
// your additional operations before save here
|
||||
$redirect_location = parent::storeCrud($request);
|
||||
// your additional operations after save here
|
||||
// use $this->data['entry'] or $this->crud->entry
|
||||
return $redirect_location;
|
||||
}
|
||||
|
||||
public function update(UpdateRequest $request)
|
||||
{
|
||||
// your additional operations before save here
|
||||
$redirect_location = parent::updateCrud($request);
|
||||
// your additional operations after save here
|
||||
// use $this->data['entry'] or $this->crud->entry
|
||||
return $redirect_location;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use Backpack\CRUD\app\Http\Controllers\CrudController;
|
||||
|
||||
// VALIDATION: change the requests to match your own file names if you need form validation
|
||||
use App\Http\Requests\VenueRequest as StoreRequest;
|
||||
use App\Http\Requests\VenueRequest as UpdateRequest;
|
||||
use Backpack\CRUD\CrudPanel;
|
||||
|
||||
/**
|
||||
* Class VenueCrudController
|
||||
* @package App\Http\Controllers\Admin
|
||||
* @property-read CrudPanel $crud
|
||||
*/
|
||||
class VenueCrudController extends CrudController
|
||||
{
|
||||
public function setup()
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| CrudPanel Basic Information
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
$this->crud->setModel('App\Models\Venue');
|
||||
$this->crud->setRoute(config('backpack.base.route_prefix') . '/venue');
|
||||
$this->crud->setEntityNameStrings('venue', 'venues');
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| CrudPanel Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// TODO: remove setFromDb() and manually define Fields and Columns
|
||||
$this->crud->addColumns([
|
||||
['name'=>'venue_name','type'=>'text','label'=>'Venue Name'],
|
||||
['name'=>'active','type'=>'boolean','label'=>'Active']
|
||||
]);
|
||||
|
||||
$this->crud->addFields([
|
||||
['name'=>'venue_name','type'=>'text','label'=>'Venue Name'],
|
||||
[ // Address
|
||||
'name' => 'address',
|
||||
'label' => 'Address',
|
||||
'type' => 'address_google',
|
||||
// optional
|
||||
'store_as_json' => true
|
||||
],
|
||||
[ // image
|
||||
'label' => "Seats Image",
|
||||
'name' => "seats_image",
|
||||
'type' => 'image',
|
||||
'upload' => true,
|
||||
// 'crop' => true, // set to true to allow cropping, false to disable
|
||||
// 'aspect_ratio' => 1, // ommit or set to 0 to allow any aspect ratio
|
||||
// 'disk' => 's3_bucket', // in case you need to show images from a different disk
|
||||
'prefix' => 'user_content/' // in case your db value is only the file name (no path), you can use this to prepend your path to the image src (in HTML), before it's shown to the user;
|
||||
],
|
||||
['name'=>'active','type'=>'checkbox','label'=>'Active']
|
||||
]);
|
||||
|
||||
// add asterisk for fields that are required in VenueRequest
|
||||
$this->crud->setRequiredFields(StoreRequest::class, 'create');
|
||||
$this->crud->setRequiredFields(UpdateRequest::class, 'edit');
|
||||
}
|
||||
|
||||
public function store(StoreRequest $request)
|
||||
{
|
||||
// your additional operations before save here
|
||||
$redirect_location = parent::storeCrud($request);
|
||||
// your additional operations after save here
|
||||
// use $this->data['entry'] or $this->crud->entry
|
||||
return $redirect_location;
|
||||
}
|
||||
|
||||
public function update(UpdateRequest $request)
|
||||
{
|
||||
// your additional operations before save here
|
||||
$redirect_location = parent::updateCrud($request);
|
||||
// your additional operations after save here
|
||||
// use $this->data['entry'] or $this->crud->entry
|
||||
return $redirect_location;
|
||||
}
|
||||
}
|
||||
|
|
@ -15,6 +15,7 @@ use App\Models\OrderItem;
|
|||
use App\Models\QuestionAnswer;
|
||||
use App\Models\ReservedTickets;
|
||||
use App\Models\Ticket;
|
||||
use App\Models\Venue;
|
||||
use App\Payment\CardPayment;
|
||||
use App\Services\Order as OrderService;
|
||||
use Carbon\Carbon;
|
||||
|
|
@ -54,6 +55,34 @@ class EventCheckoutController extends Controller
|
|||
$this->gateway = $gateway;
|
||||
}
|
||||
|
||||
public function postValidateDate(Request $request, $event_id){
|
||||
|
||||
$this->validate($request,['ticket_date'=>'required|date']);
|
||||
// $validator = Validator::make($request->all(),['ticket_date'=>'required|date']);
|
||||
// if($validator->fails()){
|
||||
// return response()->json([
|
||||
// 'status' => 'error',
|
||||
// 'message' => 'Please choose date',
|
||||
// ]);
|
||||
// }
|
||||
$event = Event::with('venue')->findOrFail($event_id);
|
||||
$tickets = Ticket::with('section')
|
||||
->where('event_id',$event_id)
|
||||
->where('ticket_date',$request->get('ticket_date'))
|
||||
->where('is_hidden', false)
|
||||
// ->where('is_paused', false)
|
||||
// ->whereDate('start_sale_date','=<',Carbon::now())
|
||||
->orderBy('sort_order','asc')
|
||||
->get();
|
||||
if($tickets->count()>0){
|
||||
return view('Bilettm.ViewEvent.SeatsPage',compact('event','tickets'));
|
||||
}
|
||||
else{
|
||||
//todo flash message
|
||||
session()->flash('error','There is no tickets available');
|
||||
return redirect()->back();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Validate a ticket request. If successful reserve the tickets and redirect to checkout
|
||||
*
|
||||
|
|
@ -63,20 +92,18 @@ class EventCheckoutController extends Controller
|
|||
*/
|
||||
public function postValidateTickets(Request $request, $event_id)
|
||||
{
|
||||
/*
|
||||
* Order expires after X min
|
||||
*/
|
||||
$order_expires_time = Carbon::now()->addMinutes(config('attendize.checkout_timeout_after'));
|
||||
|
||||
$event = Event::findOrFail($event_id);
|
||||
|
||||
if (!$request->has('tickets')) {
|
||||
return response()->json([
|
||||
'status' => 'error',
|
||||
'message' => 'No tickets selected',
|
||||
]);
|
||||
}
|
||||
/*
|
||||
* Order expires after X min
|
||||
*/
|
||||
$order_expires_time = Carbon::now()->addMinutes(config('attendize.checkout_timeout_after'));
|
||||
|
||||
$event = Event::findOrFail($event_id);
|
||||
$ticket_ids = $request->get('tickets');
|
||||
|
||||
/*
|
||||
|
|
@ -315,28 +342,6 @@ class EventCheckoutController extends Controller
|
|||
$order->rules = $order->rules + $validation_rules;
|
||||
$order->messages = $order->messages + $validation_messages;
|
||||
|
||||
// if ($request->has('is_business') && $request->get('is_business')) {
|
||||
// // Dynamic validation on the new business fields, only gets validated if business selected
|
||||
// $businessRules = [
|
||||
// 'business_name' => 'required',
|
||||
// 'business_tax_number' => 'required',
|
||||
// 'business_address_line1' => 'required',
|
||||
// 'business_address_city' => 'required',
|
||||
// 'business_address_code' => 'required',
|
||||
// ];
|
||||
//
|
||||
// $businessMessages = [
|
||||
// 'business_name.required' => 'Please enter a valid business name',
|
||||
// 'business_tax_number.required' => 'Please enter a valid business tax number',
|
||||
// 'business_address_line1.required' => 'Please enter a valid street address',
|
||||
// 'business_address_city.required' => 'Please enter a valid city',
|
||||
// 'business_address_code.required' => 'Please enter a valid code',
|
||||
// ];
|
||||
//
|
||||
// $order->rules = $order->rules + $businessRules;
|
||||
// $order->messages = $order->messages + $businessMessages;
|
||||
// }
|
||||
|
||||
if (!$order->validate($request->all())) {
|
||||
return response()->json([
|
||||
'status' => 'error',
|
||||
|
|
@ -360,23 +365,6 @@ class EventCheckoutController extends Controller
|
|||
try {
|
||||
//more transaction data being put in here.
|
||||
$transaction_data = [];
|
||||
// if (config('attendize.enable_dummy_payment_gateway') == TRUE) {
|
||||
// $formData = config('attendize.fake_card_data');
|
||||
// $transaction_data = [
|
||||
// 'card' => $formData
|
||||
// ];
|
||||
//
|
||||
// $gateway = Omnipay::create('Dummy');
|
||||
// $gateway->initialize();
|
||||
//
|
||||
// } else {
|
||||
//// $gateway = Omnipay::create($ticket_order['payment_gateway']->name);
|
||||
//// $gateway->initialize($ticket_order['account_payment_gateway']->config + [
|
||||
//// 'testMode' => config('attendize.enable_test_payments'),
|
||||
//// ]);
|
||||
// $gateway = Omnipay::create('Dummy');
|
||||
// $gateway->initialize();
|
||||
// }
|
||||
$orderService = new OrderService($ticket_order['order_total'], $ticket_order['total_booking_fee'], $event);
|
||||
$orderService->calculateFinalCosts();
|
||||
$secondsToExpire = Carbon::now()->diffInSeconds($order_session['expires']);
|
||||
|
|
@ -397,59 +385,9 @@ class EventCheckoutController extends Controller
|
|||
|
||||
];
|
||||
|
||||
//TODO: class with an interface that builds the transaction data.
|
||||
// switch ($ticket_order['payment_gateway']->id) {
|
||||
// case config('attendize.payment_gateway_dummy'):
|
||||
// $token = uniqid();
|
||||
// $transaction_data += [
|
||||
// 'token' => $token,
|
||||
// 'receipt_email' => $request->get('order_email'),
|
||||
// 'card' => $formData
|
||||
// ];
|
||||
// break;
|
||||
// case config('attendize.payment_gateway_paypal'):
|
||||
//
|
||||
// $transaction_data += [
|
||||
// 'cancelUrl' => route('showEventCheckoutPaymentReturn', [
|
||||
// 'event_id' => $event_id,
|
||||
// 'is_payment_cancelled' => 1
|
||||
// ]),
|
||||
// 'returnUrl' => route('showEventCheckoutPaymentReturn', [
|
||||
// 'event_id' => $event_id,
|
||||
// 'is_payment_successful' => 1
|
||||
// ]),
|
||||
// 'brandName' => isset($ticket_order['account_payment_gateway']->config['brandingName'])
|
||||
// ? $ticket_order['account_payment_gateway']->config['brandingName']
|
||||
// : $event->organiser->name
|
||||
// ];
|
||||
// break;
|
||||
// case config('attendize.payment_gateway_stripe'):
|
||||
// $token = $request->get('stripeToken');
|
||||
// $transaction_data += [
|
||||
// 'token' => $token,
|
||||
// 'receipt_email' => $request->get('order_email'),
|
||||
// ];
|
||||
// break;
|
||||
// default:
|
||||
// Log::error('No payment gateway configured.');
|
||||
// return response()->json([
|
||||
// 'status' => 'error',
|
||||
// 'message' => 'No payment gateway configured.'
|
||||
// ]);
|
||||
// break;
|
||||
// }
|
||||
|
||||
$response = $this->gateway->registerPayment($transaction_data);
|
||||
|
||||
//todo start resolving payment here /////////////////////////////////////////////////////
|
||||
// if ($response->isSuccessful()) {
|
||||
//
|
||||
// session()->push('ticket_order_' . $event_id . '.transaction_id',
|
||||
// $response->getTransactionReference());
|
||||
//
|
||||
// return $this->completeOrder($event_id);
|
||||
//
|
||||
// } elseif ($response->isRedirect()) {
|
||||
if($response->isSuccessfull()){
|
||||
/*
|
||||
* As we're going off-site for payment we need to store some data in a session so it's available
|
||||
|
|
@ -494,7 +432,6 @@ class EventCheckoutController extends Controller
|
|||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Attempt to complete a user's payment when they return from
|
||||
* an off-site gateway
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ class EventController extends MyBaseController
|
|||
*/
|
||||
public function showCreateEvent(Request $request)
|
||||
{
|
||||
|
||||
$data = [
|
||||
'modal_id' => $request->get('modal_id'),
|
||||
'organisers' => Organiser::scope()->pluck('name', 'id'),
|
||||
|
|
@ -60,30 +61,30 @@ class EventController extends MyBaseController
|
|||
*/
|
||||
|
||||
$is_auto_address = (trim($request->get('place_id')) !== '');
|
||||
|
||||
if ($is_auto_address) { /* Google auto filled */
|
||||
$event->venue_name = $request->get('name');
|
||||
$event->venue_name_full = $request->get('venue_name_full');
|
||||
$event->location_lat = $request->get('lat');
|
||||
$event->location_long = $request->get('lng');
|
||||
$event->location_address = $request->get('formatted_address');
|
||||
$event->location_country = $request->get('country');
|
||||
$event->location_country_code = $request->get('country_short');
|
||||
$event->location_state = $request->get('administrative_area_level_1');
|
||||
$event->location_address_line_1 = $request->get('route');
|
||||
$event->location_address_line_2 = $request->get('locality');
|
||||
$event->location_post_code = $request->get('postal_code');
|
||||
$event->location_street_number = $request->get('street_number');
|
||||
$event->location_google_place_id = $request->get('place_id');
|
||||
$event->location_is_manual = 0;
|
||||
} else { /* Manually entered */
|
||||
$event->venue_name = $request->get('location_venue_name');
|
||||
$event->location_address_line_1 = $request->get('location_address_line_1');
|
||||
$event->location_address_line_2 = $request->get('location_address_line_2');
|
||||
$event->location_state = $request->get('location_state');
|
||||
$event->location_post_code = $request->get('location_post_code');
|
||||
$event->location_is_manual = 1;
|
||||
}
|
||||
$event->venue_id = $request->get('venue_id');
|
||||
// if ($is_auto_address) { /* Google auto filled */
|
||||
// $event->venue_name = $request->get('name');
|
||||
// $event->venue_name_full = $request->get('venue_name_full');
|
||||
// $event->location_lat = $request->get('lat');
|
||||
// $event->location_long = $request->get('lng');
|
||||
// $event->location_address = $request->get('formatted_address');
|
||||
// $event->location_country = $request->get('country');
|
||||
// $event->location_country_code = $request->get('country_short');
|
||||
// $event->location_state = $request->get('administrative_area_level_1');
|
||||
// $event->location_address_line_1 = $request->get('route');
|
||||
// $event->location_address_line_2 = $request->get('locality');
|
||||
// $event->location_post_code = $request->get('postal_code');
|
||||
// $event->location_street_number = $request->get('street_number');
|
||||
// $event->location_google_place_id = $request->get('place_id');
|
||||
// $event->location_is_manual = 0;
|
||||
// } else { /* Manually entered */
|
||||
// $event->venue_name = $request->get('location_venue_name');
|
||||
// $event->location_address_line_1 = $request->get('location_address_line_1');
|
||||
// $event->location_address_line_2 = $request->get('location_address_line_2');
|
||||
// $event->location_state = $request->get('location_state');
|
||||
// $event->location_post_code = $request->get('location_post_code');
|
||||
// $event->location_is_manual = 1;
|
||||
// }
|
||||
|
||||
$event->end_date = $request->get('end_date');
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class EventTicketsController extends MyBaseController
|
|||
}
|
||||
|
||||
// Find event or return 404 error.
|
||||
$event = Event::scope()->findOrFail($event_id);
|
||||
$event = Event::with('venue')->scope()->findOrFail($event_id);
|
||||
|
||||
// Get tickets for event.
|
||||
$tickets = empty($q) === false
|
||||
|
|
@ -107,6 +107,7 @@ class EventTicketsController extends MyBaseController
|
|||
$ticket->description = strip_tags($request->get('description'));
|
||||
$ticket->is_hidden = $request->get('is_hidden') ? 1 : 0;
|
||||
$ticket->account_id = auth()->user()->account_id;
|
||||
$ticket->section_id = $request->get('section_id');
|
||||
$ticket->save();
|
||||
|
||||
// Attach the access codes to the ticket if it's hidden and the code ids have come from the front
|
||||
|
|
@ -243,7 +244,7 @@ class EventTicketsController extends MyBaseController
|
|||
$ticket->min_per_person = $request->get('min_per_person');
|
||||
$ticket->max_per_person = $request->get('max_per_person');
|
||||
$ticket->is_hidden = $request->get('is_hidden') ? 1 : 0;
|
||||
|
||||
$ticket->section_id = $request->get('section_id');
|
||||
$ticket->save();
|
||||
|
||||
// Attach the access codes to the ticket if it's hidden and the code ids have come from the front
|
||||
|
|
|
|||
|
|
@ -27,15 +27,18 @@ class EventViewController extends Controller
|
|||
*/
|
||||
public function showEventHome(Request $request, $event_id, $slug = '', $preview = false)
|
||||
{
|
||||
$event = Event::findOrFail($event_id);
|
||||
$event = Event::with('venue')->findOrFail($event_id);
|
||||
|
||||
if (!Utils::userOwns($event) && !$event->is_live) {
|
||||
return view('Public.ViewEvent.EventNotLivePage');
|
||||
}
|
||||
|
||||
$tickets = $event->tickets()->where('is_hidden', false)
|
||||
$tickets = $event->tickets()->select('id','ticket_date')
|
||||
->where('is_hidden', false)
|
||||
->whereDate('ticket_date','>=',Carbon::now(config('app.timezone')))
|
||||
->orderBy('sort_order', 'asc')->get();
|
||||
->orderBy('ticket_date', 'asc')
|
||||
->groupBy('ticket_date')
|
||||
->distinct()->get();
|
||||
|
||||
$ticket_dates = array();
|
||||
|
||||
|
|
@ -43,7 +46,7 @@ class EventViewController extends Controller
|
|||
$date = $ticket->ticket_date->format('d M');
|
||||
$ticket_dates[$date][] = $ticket;
|
||||
}
|
||||
|
||||
// dd($ticket_dates);
|
||||
$data = [
|
||||
'event' => $event,
|
||||
'ticket_dates' =>$ticket_dates,
|
||||
|
|
|
|||
|
|
@ -161,6 +161,11 @@ Route::group(
|
|||
'uses' => 'EventViewController@showEventHomePreview',
|
||||
]);
|
||||
|
||||
Route::post('{event_id}/checkout/date',[
|
||||
'as' => 'postValidateDate',
|
||||
'uses' => 'EventCheckoutController@postValidateDate'
|
||||
]);
|
||||
|
||||
Route::post('{event_id}/checkout/', [
|
||||
'as' => 'postValidateTickets',
|
||||
'uses' => 'EventCheckoutController@postValidateTickets',
|
||||
|
|
|
|||
|
|
@ -25,8 +25,9 @@ class Event extends MyBaseModel
|
|||
return [
|
||||
'title' => 'required',
|
||||
'description' => 'required',
|
||||
'location_venue_name' => 'required_without:venue_name_full',
|
||||
'venue_name_full' => 'required_without:location_venue_name',
|
||||
'venue_id' => 'required',
|
||||
// 'location_venue_name' => 'required_without:venue_name_full',
|
||||
// 'venue_name_full' => 'required_without:location_venue_name',
|
||||
'start_date' => 'required|date_format:"'.$format.'"',
|
||||
'end_date' => 'required|date_format:"'.$format.'"',
|
||||
'organiser_name' => 'required_without:organiser_id',
|
||||
|
|
@ -197,6 +198,9 @@ class Event extends MyBaseModel
|
|||
return $this->belongsToMany(\App\Models\Tag::class);
|
||||
}
|
||||
|
||||
public function venue(){
|
||||
return $this->belongsTo(Venue::class);
|
||||
}
|
||||
/**
|
||||
* Category associated with the event
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
|
|
@ -490,8 +494,5 @@ ICSTemplate;
|
|||
->orderBy('created_at','desc')
|
||||
->limit(1);
|
||||
}] );
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,99 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Backpack\CRUD\CrudTrait;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class Section extends Model
|
||||
{
|
||||
use CrudTrait;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| GLOBAL VARIABLES
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
protected $table = 'sections';
|
||||
// protected $primaryKey = 'id';
|
||||
public $timestamps = false;
|
||||
// protected $guarded = ['id'];
|
||||
protected $fillable = ['section_no','description','venue_id','seats','section_image'];
|
||||
// protected $hidden = [];
|
||||
// protected $dates = [];
|
||||
protected $casts = ['seats' => 'array'];
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| FUNCTIONS
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
public static function boot()
|
||||
{
|
||||
parent::boot();
|
||||
static::deleting(function($obj) {
|
||||
$disk = config('filesystems.default');
|
||||
\Storage::disk($disk)->delete($obj->section_image);
|
||||
});
|
||||
}
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| RELATIONS
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
public function venue(){
|
||||
return $this->belongsTo(Venue::class);
|
||||
}
|
||||
|
||||
public function tickets(){
|
||||
return $this->hasMany(Ticket::class);
|
||||
}
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SCOPES
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| ACCESORS
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| MUTATORS
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
public function setSectionImageAttribute($value){
|
||||
$attribute_name = "section_image";
|
||||
$disk = config('filesystems.default'); // or use your own disk, defined in config/filesystems.php
|
||||
$destination_path = "venues"; // path relative to the disk above
|
||||
|
||||
// if the image was erased
|
||||
if ($value==null) {
|
||||
// delete the image from disk
|
||||
\Storage::disk($disk)->delete($this->{$attribute_name});
|
||||
|
||||
// set null in the database column
|
||||
$this->attributes[$attribute_name] = null;
|
||||
}
|
||||
|
||||
// if a base64 was sent, store it in the db
|
||||
if (starts_with($value, 'data:image'))
|
||||
{
|
||||
// 0. Make the image
|
||||
$image = \Image::make($value)->encode('jpg', 90);
|
||||
// 1. Generate a filename.
|
||||
$filename = md5($value.time()).'.jpg';
|
||||
// 2. Store the image on disk.
|
||||
\Storage::disk($disk)->put($destination_path.'/'.$filename, $image->stream());
|
||||
// 3. Save the public path to the database
|
||||
// but first, remove "public/" from the path, since we're pointing to it from the root folder
|
||||
// that way, what gets saved in the database is the user-accesible URL
|
||||
$public_destination_path = Str::replaceFirst('public/', '', $destination_path);
|
||||
$this->attributes[$attribute_name] = $public_destination_path.'/'.$filename;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -22,6 +22,7 @@ class Ticket extends MyBaseModel
|
|||
$format = config('attendize.default_datetime_format');
|
||||
return [
|
||||
'title' => 'required',
|
||||
'section_id' => 'required',
|
||||
'price' => 'required|numeric|min:0',
|
||||
'description' => '',
|
||||
'ticket_date' => 'required|date_format:"'.$format.'"',
|
||||
|
|
@ -39,6 +40,7 @@ class Ticket extends MyBaseModel
|
|||
public $messages = [
|
||||
'price.numeric' => 'The price must be a valid number (e.g 12.50)',
|
||||
'title.required' => 'You must at least give a title for your ticket. (e.g Early Bird)',
|
||||
'section_id.required' => 'You must select section',
|
||||
'quantity_available.integer' => 'Please ensure the quantity available is a number.',
|
||||
];
|
||||
protected $perPage = 10;
|
||||
|
|
@ -53,6 +55,9 @@ class Ticket extends MyBaseModel
|
|||
return $this->belongsTo(\App\Models\Event::class);
|
||||
}
|
||||
|
||||
public function section(){
|
||||
return $this->belongsTo(Section::class);
|
||||
}
|
||||
/**
|
||||
* The order associated with the ticket.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -0,0 +1,119 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Backpack\CRUD\CrudTrait;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class Venue extends Model
|
||||
{
|
||||
use CrudTrait;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| GLOBAL VARIABLES
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
protected $casts = [ 'address' => 'array'];
|
||||
protected $table = 'venues';
|
||||
// protected $primaryKey = 'id';
|
||||
public $timestamps = false;
|
||||
// protected $guarded = ['id'];
|
||||
protected $fillable = [
|
||||
'venue_name',
|
||||
'venue_name_full',
|
||||
'location_address',
|
||||
'location_address_line_1',
|
||||
'location_address_line_2',
|
||||
'location_country',
|
||||
'location_country_code',
|
||||
'location_state',
|
||||
'location_post_code',
|
||||
'location_street_number',
|
||||
'location_lat',
|
||||
'location_long',
|
||||
'location_google_place_id',
|
||||
'seats_image',
|
||||
'active',
|
||||
'address'
|
||||
];
|
||||
// protected $hidden = [];
|
||||
// protected $dates = [];
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| FUNCTIONS
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
public static function boot()
|
||||
{
|
||||
parent::boot();
|
||||
static::deleting(function($obj) {
|
||||
$disk = config('filesystems.default');
|
||||
\Storage::disk($disk)->delete($obj->seats_image);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| RELATIONS
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
public function events(){
|
||||
return $this->hasMany(Event::class);
|
||||
}
|
||||
|
||||
public function sections(){
|
||||
return $this->hasMany(Section::class);
|
||||
}
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SCOPES
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| ACCESORS
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| MUTATORS
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
public function setSeatsImageAttribute($value){
|
||||
$attribute_name = "seats_image";
|
||||
$disk = config('filesystems.default'); // or use your own disk, defined in config/filesystems.php
|
||||
$destination_path = "venues"; // path relative to the disk above
|
||||
|
||||
// if the image was erased
|
||||
if ($value==null) {
|
||||
// delete the image from disk
|
||||
\Storage::disk($disk)->delete($this->{$attribute_name});
|
||||
|
||||
// set null in the database column
|
||||
$this->attributes[$attribute_name] = null;
|
||||
}
|
||||
|
||||
// if a base64 was sent, store it in the db
|
||||
if (starts_with($value, 'data:image'))
|
||||
{
|
||||
// 0. Make the image
|
||||
$image = \Image::make($value)->encode('jpg', 90);
|
||||
// 1. Generate a filename.
|
||||
$filename = md5($value.time()).'.jpg';
|
||||
// 2. Store the image on disk.
|
||||
\Storage::disk($disk)->put($destination_path.'/'.$filename, $image->stream());
|
||||
// 3. Save the public path to the database
|
||||
// but first, remove "public/" from the path, since we're pointing to it from the root folder
|
||||
// that way, what gets saved in the database is the user-accesible URL
|
||||
$public_destination_path = Str::replaceFirst('public/', '', $destination_path);
|
||||
$this->attributes[$attribute_name] = $public_destination_path.'/'.$filename;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -67,7 +67,7 @@ return [
|
|||
|
||||
// The prefix used in all base routes (the 'admin' in admin/dashboard)
|
||||
// You can make sure all your URLs use this prefix by using the backpack_url() helper instead of url()
|
||||
'route_prefix' => 'admin',
|
||||
'route_prefix' => 'panel',
|
||||
|
||||
// Set this to false if you would like to use your own AuthController and PasswordController
|
||||
// (you then need to setup your auth routes manually in your routes.php file)
|
||||
|
|
|
|||
|
|
@ -40,5 +40,8 @@ return [
|
|||
|
||||
'sparkpost' => [
|
||||
'secret' => env('SPARKPOST_SECRET')
|
||||
]
|
||||
],
|
||||
'google_places' => [
|
||||
'key' => env('GOOGLE_MAPS_GEOCODING_KEY')
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -194,19 +194,7 @@ class CreateUsersTable extends Migration
|
|||
$t->unsignedInteger('organiser_id');
|
||||
$t->foreign('organiser_id')->references('id')->on('organisers');
|
||||
|
||||
$t->string('venue_name');
|
||||
$t->string('venue_name_full')->nullable();
|
||||
$t->string('location_address', 355)->nullable();
|
||||
$t->string('location_address_line_1', 355);
|
||||
$t->string('location_address_line_2', 355);
|
||||
$t->string('location_country')->nullable();
|
||||
$t->string('location_country_code')->nullable();
|
||||
$t->string('location_state');
|
||||
$t->string('location_post_code');
|
||||
$t->string('location_street_number')->nullable();
|
||||
$t->string('location_lat')->nullable();
|
||||
$t->string('location_long')->nullable();
|
||||
$t->string('location_google_place_id')->nullable();
|
||||
|
||||
|
||||
$t->unsignedInteger('ask_for_all_attendees_info')->default(0);
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateVenuesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('venues', function (Blueprint $t) {
|
||||
$t->increments('id');
|
||||
$t->string('venue_name');
|
||||
$t->string('venue_name_full')->nullable();
|
||||
$t->string('location_address', 355)->nullable();
|
||||
$t->string('location_address_line_1', 355);
|
||||
$t->string('location_address_line_2', 355);
|
||||
$t->string('location_country')->nullable();
|
||||
$t->string('location_country_code')->nullable();
|
||||
$t->string('location_state');
|
||||
$t->string('location_post_code');
|
||||
$t->string('location_street_number')->nullable();
|
||||
$t->string('location_lat')->nullable();
|
||||
$t->string('location_long')->nullable();
|
||||
$t->string('location_google_place_id')->nullable();
|
||||
$t->string('seats_image')->nullable();
|
||||
$t->boolean('active')->default(1);
|
||||
$t->json('address')->nullable();
|
||||
});
|
||||
|
||||
Schema::table('events', function (Blueprint $table) {
|
||||
$table->integer('venue_id')->nullable();
|
||||
$table->foreign('venue_id')->references('id')->on('venues');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('events', function (Blueprint $table){
|
||||
$table->dropForeign('venue_id');
|
||||
$table->dropColumn('venue_id');
|
||||
});
|
||||
|
||||
Schema::dropIfExists('venues');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateSectionsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('sections', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('section_no')->nullable();
|
||||
$table->string('description')->nullable();
|
||||
$table->json('seats')->nullable();
|
||||
$table->string('section_image')->nullable();
|
||||
$table->unsignedInteger('venue_id');
|
||||
$table->foreign('venue_id')->references('id')->on('venues')->onDelete('cascade');
|
||||
// $table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('sections');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddTicketSectionIdToTicketsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('tickets', function (Blueprint $table) {
|
||||
$table->unsignedInteger('section_id')->nullable();
|
||||
$table->foreign('section_id')->references('id')->on('sections');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('tickets', function (Blueprint $table) {
|
||||
//
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddSeatToAttendeesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('attendees', function (Blueprint $table) {
|
||||
$table->string('row')->nullable();
|
||||
$table->string('no')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('attendees', function (Blueprint $table) {
|
||||
$table->dropColumn('row');
|
||||
$table->dropColumn('no');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -29,11 +29,13 @@
|
|||
<b>{{$event->organiser->name}}</b> @lang("Public_ViewEvent.presents")
|
||||
@lang("Public_ViewEvent.at")
|
||||
<span property="location" typeof="Place">
|
||||
<b property="name">{{$event->venue_name}}</b>
|
||||
<meta property="address" content="{{ urldecode($event->venue_name) }}">
|
||||
<b property="name">{{$event->venue->venue_name}}</b>
|
||||
<meta property="address" content="{{ urldecode($event->venue->venue_name) }}">
|
||||
</span>
|
||||
</div>
|
||||
@include('Bilettm.ViewEvent.Partials.TicketSchedule')
|
||||
<div class="col-6 p-0">
|
||||
@include('Bilettm.ViewEvent.Partials.Schedule')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -61,8 +63,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
@section('after_scripts')
|
||||
@include("Shared.Partials.LangScript")
|
||||
{!!HTML::script(config('attendize.cdn_url_static_assets').'/assets/javascript/frontend.js')!!}
|
||||
@endsection
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
<h2 class="main-title" style="padding-left: 5px">Расписание</h2>
|
||||
<div class="main-title-bottom-line" style="margin-left: 5px"></div>
|
||||
@if($event->end_date->isPast())
|
||||
<div class="alert alert-boring">
|
||||
<h4 class="date-small-title">
|
||||
@lang("Public_ViewEvent.event_already", ['started' => trans('Public_ViewEvent.event_already_ended')])
|
||||
</h4>
|
||||
</div>
|
||||
@else
|
||||
@if(count($ticket_dates) > 0)
|
||||
|
||||
<h4 class="date-small-title">Дата проведения</h4>
|
||||
<div class="date-box-wrap">
|
||||
<ul class="nav nav-pills details-page">
|
||||
|
||||
@foreach($ticket_dates as $date =>$ticket)
|
||||
|
||||
<li><a class="tablinks @if ($loop->first)active @endif" style="cursor: pointer" onclick="openContent(event, '{{$date}}')">{{$date}}</a></li>
|
||||
@endforeach
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<h4 class="time-small-title">Время проведения</h4>
|
||||
<div class="time-box-wraper col-md-6">
|
||||
|
||||
<div class="tab-content" id="myTabContent">
|
||||
{!! Form::open(['url' => route('postValidateDate', ['event_id' => $event->id])]) !!}
|
||||
@csrf
|
||||
@foreach($ticket_dates as $date =>$tickets)
|
||||
<div class="tab-pane fade show tabcontent @if ($loop->first)active @endif" id="{{$date}}" role="tabpanel" aria-labelledby="{{$date}}-tab">
|
||||
<div class="time-box-wrap">
|
||||
|
||||
@foreach($tickets as $ticket)
|
||||
<div class="form-group">
|
||||
<input type="radio" id="time{{$ticket->id}}" @if ($loop->first)checked @endif name="ticket_date" value="{{$ticket->ticket_date}}">
|
||||
<label for="time{{$ticket->id}}"><span>{{$ticket->ticket_date->format('H:i')}}</span></label>
|
||||
</div>
|
||||
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
{!!Form::submit('Kupit bilet', ['class' => 'btn btn-lg btn-danger'])!!}
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
@push('after_scripts')
|
||||
<script>
|
||||
function openContent(evt, cityName) {
|
||||
var i, tabcontent, tablinks;
|
||||
tabcontent = document.getElementsByClassName("tabcontent");
|
||||
for (i = 0; i < tabcontent.length; i++) {
|
||||
tabcontent[i].style.display = "none";
|
||||
}
|
||||
tablinks = document.getElementsByClassName("tablinks");
|
||||
for (i = 0; i < tablinks.length; i++) {
|
||||
tablinks[i].className = tablinks[i].className.replace(" active", "");
|
||||
}
|
||||
document.getElementById(cityName).style.display = "block";
|
||||
evt.currentTarget.className += " active";
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
@foreach($tickets as $ticket)
|
||||
<div id="home_{{$ticket->id}}" class="tab-pane fade active show in" role="tabpanel" style="display: unset !important;">
|
||||
<div class="row justify-content-center">
|
||||
<img class="img-responsive" src="{{asset('user_content/'.$ticket->section->section_image)}}" alt="{{$ticket->section->section_no}}">
|
||||
</div>
|
||||
<div class="standard-box" style="position: relative; padding: 20px 0">
|
||||
<h5 style="font-weight: bold; font-size: 24px; margin-bottom: 20px; text-align: center">{{$ticket->title }} {{$ticket->description}} {{$ticket->section->section_no}}</h5>
|
||||
<table style="text-align: center; margin: auto">
|
||||
<tbody>
|
||||
@foreach($ticket->section->seats as $row)
|
||||
<tr>
|
||||
<td>{{$row['row']}}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
@for($i = $row['start_no'];$i<=$row['end_no'];$i++)
|
||||
<td>
|
||||
<input type="checkbox" id="seata25" name="seata25" class="seat_check">
|
||||
<label for="seata{{$i}}">
|
||||
{{$i}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="25" viewBox="0 0 26 25">
|
||||
<path id="Rectangle_3" data-name="Rectangle 3" d="M8,0H18a8,8,0,0,1,8,8V25a0,0,0,0,1,0,0H0a0,0,0,0,1,0,0V8A8,8,0,0,1,8,0Z"></path>
|
||||
</svg>
|
||||
</label>
|
||||
</td>
|
||||
@endfor
|
||||
<td></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody></table>
|
||||
<div class="seats-top-overlay" style="width: 70%"></div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
@extends('Bilettm.Layouts.BilettmLayout')
|
||||
@section('content')
|
||||
{{\DaveJamesMiller\Breadcrumbs\Facades\Breadcrumbs::render('seats',$event)}}
|
||||
<section style="margin-bottom: 80px">
|
||||
<div class="container">
|
||||
<a class="mobile_pt_30 mobile_pb0 collapsed d-flex justify-content-between g-color-main g-text-underline--none--hover g-brd-bottom g-brd-gray-light-v4 g-pa-15-0" href="#accordion-10-body-02" data-toggle="collapse" data-parent="#accordion-10" aria-expanded="false" aria-controls="accordion-10-body-02">
|
||||
<span class="d-flex">
|
||||
<h1 class="mobile_header_tab" style="font-weight: 600;font-size: 35px;">Choose seats</h1>
|
||||
</span>
|
||||
</a>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="pills-struct mt-5">
|
||||
<ul role="tablist" class="nav nav-pills m-auto w-auto justify-content-center" id="choose_seats">
|
||||
@foreach($tickets as $ticket)
|
||||
<li class="active" role="presentation" style="display: inline-block;">
|
||||
<a aria-expanded="true" data-toggle="tab" class="@if ($loop->first)active @endif show"
|
||||
role="tab" id="home_tab_{{$ticket->id}}" href="#home_{{$ticket->id}}" aria-selected="true">
|
||||
{{$ticket->title}} - {{$ticket->price}} man.</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
<div class="d-flex justify-content-center mt-5 mb-4">
|
||||
<span class="mx-3" style="font-size: 18px"><i class="fa fa-circle" style="color: #ebeced; font-size: 13px"></i> Available</span>
|
||||
<span class="mx-3" style="font-size: 18px"><i class="fa fa-circle" style="color: #69687d; font-size: 13px"></i> Booked</span>
|
||||
<span class="mx-3" style="font-size: 18px"><i class="fa fa-circle" style="color: #b6b6b6; font-size: 13px"></i> Reserved</span>
|
||||
<span class="mx-3" style="font-size: 18px"><i class="fa fa-circle" style="color: #ff4159; font-size: 13px"></i> Your Selection</span>
|
||||
</div>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="width: 100%" height="137.997" viewBox="0 0 1120 137.997">
|
||||
<defs>
|
||||
<linearGradient id="linear-gradient" x1="0.5" x2="0.5" y2="1" gradientUnits="objectBoundingBox">
|
||||
<stop offset="0" stop-color="#f6f6f6"/>
|
||||
<stop offset="1" stop-color="#fff"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g id="Screen_and_acupation" data-name="Screen and acupation" transform="translate(-163 -1257)">
|
||||
<g id="Group_16" data-name="Group 16" transform="translate(163 1257)">
|
||||
<path id="Path_2" data-name="Path 2" d="M0,126.055s347.577-9.015,494.7-9.015,494.7,9.015,494.7,9.015L985.545,10.807S683.323,0,496.656,0,7.767,10.807,7.767,10.807Z" transform="translate(63.344 11.942)" opacity="0.5" fill="url(#linear-gradient)"/>
|
||||
<path id="Path_2-2" data-name="Path 2" d="M63.344,18.577s347.577-6.5,494.7-6.5,494.7,6.5,494.7,6.5L1120,7.394S746.667,0,560,0,0,7.394,0,7.394Z" fill="#ebeced"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
<div class="tab-content" id="choose_seats_content">
|
||||
@include('Bilettm.ViewEvent.Partials.Seats')
|
||||
</div>
|
||||
<div class="checked-seats" style="padding: 30px 0; text-align: center">
|
||||
<h5 style="text-align: center; font-weight: bold;">You Have Selected <span>4</span> Standard Seats</h5>
|
||||
<h5 style="text-align: center;">Your Seats:</h5>
|
||||
<form action="{{route('postValidateTickets',['event_id'=>$event->id])}}" method="post">
|
||||
@csrf
|
||||
<div class="your-selected-seats" style="text-align: center; margin-bottom: 50px">
|
||||
<span>G-12</span>
|
||||
<span>G-13</span>
|
||||
<span>G-14</span>
|
||||
<span>G-15</span>
|
||||
</div>
|
||||
<a id="confirm-seats">Confirm seats</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
@section('after_scripts')
|
||||
@include("Shared.Partials.LangScript")
|
||||
{!!HTML::script(config('attendize.cdn_url_static_assets').'/assets/javascript/frontend.js')!!}
|
||||
@endsection
|
||||
|
|
@ -28,8 +28,8 @@
|
|||
@stop
|
||||
|
||||
@section('head')
|
||||
{!! HTML::script('https://maps.googleapis.com/maps/api/js?sensor=false&libraries=places&key='.env("GOOGLE_MAPS_GEOCODING_KEY")) !!}
|
||||
{!! HTML::script('vendor/geocomplete/jquery.geocomplete.min.js') !!}
|
||||
{{--{!! HTML::script('https://maps.googleapis.com/maps/api/js?sensor=false&libraries=places&key='.config("services.google_places.key")) !!}--}}
|
||||
{{--{!! HTML::script('vendor/geocomplete/jquery.geocomplete.min.js') !!}--}}
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
|
|
@ -66,34 +66,34 @@
|
|||
$('#referralUrl input').val(referralUrl);
|
||||
});
|
||||
|
||||
/* Background selector */
|
||||
$('.bgImage').on('click', function (e) {
|
||||
$('.bgImage').removeClass('selected');
|
||||
$(this).addClass('selected');
|
||||
$('input[name=bg_image_path_custom]').val($(this).data('src'));
|
||||
{{--/* Background selector */--}}
|
||||
{{--$('.bgImage').on('click', function (e) {--}}
|
||||
{{--$('.bgImage').removeClass('selected');--}}
|
||||
{{--$(this).addClass('selected');--}}
|
||||
{{--$('input[name=bg_image_path_custom]').val($(this).data('src'));--}}
|
||||
|
||||
var replaced = replaceUrlParam('{{route('showEventPagePreview', ['event_id'=>$event->id])}}', 'bg_img_preview', $('input[name=bg_image_path_custom]').val());
|
||||
document.getElementById('previewIframe').src = replaced;
|
||||
e.preventDefault();
|
||||
});
|
||||
{{--var replaced = replaceUrlParam('{{route('showEventPagePreview', ['event_id'=>$event->id])}}', 'bg_img_preview', $('input[name=bg_image_path_custom]').val());--}}
|
||||
{{--document.getElementById('previewIframe').src = replaced;--}}
|
||||
{{--e.preventDefault();--}}
|
||||
{{--});--}}
|
||||
|
||||
/* Background color */
|
||||
$('input[name=bg_color]').on('change', function (e) {
|
||||
var replaced = replaceUrlParam('{{route('showEventPagePreview', ['event_id'=>$event->id])}}', 'bg_color_preview', $('input[name=bg_color]').val().substring(1));
|
||||
document.getElementById('previewIframe').src = replaced;
|
||||
e.preventDefault();
|
||||
});
|
||||
{{--/* Background color */--}}
|
||||
{{--$('input[name=bg_color]').on('change', function (e) {--}}
|
||||
{{--var replaced = replaceUrlParam('{{route('showEventPagePreview', ['event_id'=>$event->id])}}', 'bg_color_preview', $('input[name=bg_color]').val().substring(1));--}}
|
||||
{{--document.getElementById('previewIframe').src = replaced;--}}
|
||||
{{--e.preventDefault();--}}
|
||||
{{--});--}}
|
||||
|
||||
$('#bgOptions .panel').on('shown.bs.collapse', function (e) {
|
||||
var type = $(e.currentTarget).data('type');
|
||||
console.log(type);
|
||||
$('input[name=bg_type]').val(type);
|
||||
});
|
||||
{{--$('#bgOptions .panel').on('shown.bs.collapse', function (e) {--}}
|
||||
{{--var type = $(e.currentTarget).data('type');--}}
|
||||
{{--console.log(type);--}}
|
||||
{{--$('input[name=bg_type]').val(type);--}}
|
||||
{{--});--}}
|
||||
|
||||
$('input[name=bg_image_path], input[name=bg_color]').on('change', function () {
|
||||
//showMessage('Uploading...');
|
||||
//$('.customizeForm').submit();
|
||||
});
|
||||
{{--$('input[name=bg_image_path], input[name=bg_color]').on('change', function () {--}}
|
||||
{{--//showMessage('Uploading...');--}}
|
||||
{{--//$('.customizeForm').submit();--}}
|
||||
{{--});--}}
|
||||
|
||||
/* Color picker */
|
||||
$('.colorpicker').minicolors();
|
||||
|
|
@ -152,7 +152,7 @@
|
|||
$(function () {
|
||||
|
||||
var hash = document.location.hash;
|
||||
var prefix = "tab_";
|
||||
// var prefix = "tab_";
|
||||
if (hash) {
|
||||
$('.nav-tabs a[href=' + hash + ']').tab('show');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@
|
|||
|
||||
</div>
|
||||
|
||||
<div class="form-group more-options">
|
||||
<div class="form-group">
|
||||
{!! Form::label('description', trans("ManageEvent.ticket_description"), array('class'=>'control-label')) !!}
|
||||
{!! Form::text('description', Input::old('description'),
|
||||
array(
|
||||
|
|
@ -70,7 +70,7 @@
|
|||
)) !!}
|
||||
</div>
|
||||
|
||||
<div class="row more-options">
|
||||
<div class="row ">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
{!! Form::label('start_sale_date', trans("ManageEvent.start_sale_on"), array('class'=>' control-label')) !!}
|
||||
|
|
@ -104,7 +104,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row more-options">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{!! Form::label('min_per_person', trans("ManageEvent.minimum_tickets_per_order"), array('class'=>' control-label')) !!}
|
||||
|
|
@ -118,8 +118,8 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row more-options">
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<div class="custom-checkbox">
|
||||
{!! Form::checkbox('is_hidden', 1, false, ['id' => 'is_hidden']) !!}
|
||||
|
|
@ -128,16 +128,16 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{!! Form::label('section_id',trans("ManageEvent.select_section"),array('class'=>' control-label required')) !!}
|
||||
{!! Form::select('section_id',sections_list($event->venue_id),null,['class'=>'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<a href="javascript:void(0);" class="show-more-options">
|
||||
@lang("ManageEvent.more_options")
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div> <!-- /end modal body-->
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group more-options">
|
||||
<div class="form-group">
|
||||
{!! Form::label('description', trans("ManageEvent.ticket_description"), array('class'=>'control-label')) !!}
|
||||
{!! Form::text('description', null,
|
||||
array(
|
||||
|
|
@ -59,7 +59,7 @@
|
|||
)) !!}
|
||||
</div>
|
||||
|
||||
<div class="row more-options">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
|
|
@ -94,7 +94,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row more-options">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{!! Form::label('min_per_person', trans("ManageEvent.minimum_tickets_per_order"), array('class'=>' control-label')) !!}
|
||||
|
|
@ -108,8 +108,8 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row more-options">
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<div class="custom-checkbox">
|
||||
{!! Form::checkbox('is_hidden', null, null, ['id' => 'is_hidden']) !!}
|
||||
|
|
@ -118,10 +118,14 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{!! Form::label('section_id',trans("ManageEvent.select_section"),array('class'=>' control-label required')) !!}
|
||||
{!! Form::select('section_id',sections_list($event->venue_id),$ticket->section_id,['class'=>'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a href="javascript:void(0);" class="show-more-options">
|
||||
@lang("ManageEvent.more_options")
|
||||
</a>
|
||||
|
||||
</div> <!-- /end modal body-->
|
||||
<div class="modal-footer">
|
||||
{!! Form::button(trans("basic.cancel"), ['class'=>"btn modal-close btn-danger",'data-dismiss'=>'modal']) !!}
|
||||
|
|
|
|||
|
|
@ -51,85 +51,87 @@
|
|||
)) !!}
|
||||
</div>
|
||||
|
||||
<div class="form-group address-automatic" style="display:{{$event->location_is_manual ? 'none' : 'block'}};">
|
||||
{!! Form::label('name', trans("Event.venue_name"), array('class'=>'control-label required ')) !!}
|
||||
{!! Form::text('venue_name_full', Input::old('venue_name_full'),
|
||||
array(
|
||||
'class'=>'form-control geocomplete location_field',
|
||||
'placeholder'=>trans("Event.venue_name_placeholder")//'E.g: The Crab Shack'
|
||||
)) !!}
|
||||
<div class="form-group address-automatic">
|
||||
{!! Form::label('venue_name', trans("Event.venue_name"), array('class'=>'control-label required ')) !!}
|
||||
{!! Form::select('venue_id',venues_list(), Input::old('venue_id'), ['class' => 'form-control','id'=>'venue_name']) !!}
|
||||
{{--{!! Form::label('name', trans("Event.venue_name"), array('class'=>'control-label required ')) !!}--}}
|
||||
{{--{!! Form::text('venue_name_full', Input::old('venue_name_full'),--}}
|
||||
{{--array(--}}
|
||||
{{--'class'=>'form-control geocomplete location_field',--}}
|
||||
{{--'placeholder'=>trans("Event.venue_name_placeholder")//'E.g: The Crab Shack'--}}
|
||||
{{--)) !!}--}}
|
||||
|
||||
<!--These are populated with the Google places info-->
|
||||
<div>
|
||||
{!! Form::hidden('formatted_address', $event->location_address, ['class' => 'location_field']) !!}
|
||||
{!! Form::hidden('street_number', $event->location_street_number, ['class' => 'location_field']) !!}
|
||||
{!! Form::hidden('country', $event->location_country, ['class' => 'location_field']) !!}
|
||||
{!! Form::hidden('country_short', $event->location_country_short, ['class' => 'location_field']) !!}
|
||||
{!! Form::hidden('place_id', $event->location_google_place_id, ['class' => 'location_field']) !!}
|
||||
{!! Form::hidden('name', $event->venue_name, ['class' => 'location_field']) !!}
|
||||
{!! Form::hidden('location', '', ['class' => 'location_field']) !!}
|
||||
{!! Form::hidden('postal_code', $event->location_post_code, ['class' => 'location_field']) !!}
|
||||
{!! Form::hidden('route', $event->location_address_line_1, ['class' => 'location_field']) !!}
|
||||
{!! Form::hidden('lat', $event->location_lat, ['class' => 'location_field']) !!}
|
||||
{!! Form::hidden('lng', $event->location_long, ['class' => 'location_field']) !!}
|
||||
{!! Form::hidden('administrative_area_level_1', $event->location_state, ['class' => 'location_field']) !!}
|
||||
{!! Form::hidden('sublocality', '', ['class' => 'location_field']) !!}
|
||||
{!! Form::hidden('locality', $event->location_address_line_1, ['class' => 'location_field']) !!}
|
||||
</div>
|
||||
<!-- /These are populated with the Google places info-->
|
||||
{{--<!--These are populated with the Google places info-->--}}
|
||||
{{--<div>--}}
|
||||
{{--{!! Form::hidden('formatted_address', $event->location_address, ['class' => 'location_field']) !!}--}}
|
||||
{{--{!! Form::hidden('street_number', $event->location_street_number, ['class' => 'location_field']) !!}--}}
|
||||
{{--{!! Form::hidden('country', $event->location_country, ['class' => 'location_field']) !!}--}}
|
||||
{{--{!! Form::hidden('country_short', $event->location_country_short, ['class' => 'location_field']) !!}--}}
|
||||
{{--{!! Form::hidden('place_id', $event->location_google_place_id, ['class' => 'location_field']) !!}--}}
|
||||
{{--{!! Form::hidden('name', $event->venue_name, ['class' => 'location_field']) !!}--}}
|
||||
{{--{!! Form::hidden('location', '', ['class' => 'location_field']) !!}--}}
|
||||
{{--{!! Form::hidden('postal_code', $event->location_post_code, ['class' => 'location_field']) !!}--}}
|
||||
{{--{!! Form::hidden('route', $event->location_address_line_1, ['class' => 'location_field']) !!}--}}
|
||||
{{--{!! Form::hidden('lat', $event->location_lat, ['class' => 'location_field']) !!}--}}
|
||||
{{--{!! Form::hidden('lng', $event->location_long, ['class' => 'location_field']) !!}--}}
|
||||
{{--{!! Form::hidden('administrative_area_level_1', $event->location_state, ['class' => 'location_field']) !!}--}}
|
||||
{{--{!! Form::hidden('sublocality', '', ['class' => 'location_field']) !!}--}}
|
||||
{{--{!! Form::hidden('locality', $event->location_address_line_1, ['class' => 'location_field']) !!}--}}
|
||||
{{--</div>--}}
|
||||
{{--<!-- /These are populated with the Google places info-->--}}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="address-manual" style="display:{{$event->location_is_manual ? 'block' : 'none'}};">
|
||||
<div class="form-group">
|
||||
{!! Form::label('location_venue_name', trans("Event.venue_name"), array('class'=>'control-label required ')) !!}
|
||||
{!! Form::text('location_venue_name', $event->venue_name, [
|
||||
'class'=>'form-control location_field',
|
||||
'placeholder'=>trans("Event.venue_name_placeholder") // same as above
|
||||
]) !!}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{!! Form::label('location_address_line_1', trans("Event.address_line_1"), array('class'=>'control-label')) !!}
|
||||
{!! Form::text('location_address_line_1', $event->location_address_line_1, [
|
||||
'class'=>'form-control location_field',
|
||||
'placeholder'=>trans("Event.address_line_1_placeholder")//'E.g: 45 Grafton St.'
|
||||
]) !!}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{!! Form::label('location_address_line_2', trans("Event.address_line_2"), array('class'=>'control-label')) !!}
|
||||
{!! Form::text('location_address_line_2', $event->location_address_line_2, [
|
||||
'class'=>'form-control location_field',
|
||||
'placeholder'=>trans("Event.address_line_2_placeholder")//'E.g: Dublin.'
|
||||
]) !!}
|
||||
</div>
|
||||
{{--<div class="address-manual" style="display:{{$event->location_is_manual ? 'block' : 'none'}};">--}}
|
||||
{{--<div class="form-group">--}}
|
||||
{{--{!! Form::label('location_venue_name', trans("Event.venue_name"), array('class'=>'control-label required ')) !!}--}}
|
||||
{{--{!! Form::text('location_venue_name', $event->venue_name, [--}}
|
||||
{{--'class'=>'form-control location_field',--}}
|
||||
{{--'placeholder'=>trans("Event.venue_name_placeholder") // same as above--}}
|
||||
{{--]) !!}--}}
|
||||
{{--</div>--}}
|
||||
{{--<div class="form-group">--}}
|
||||
{{--{!! Form::label('location_address_line_1', trans("Event.address_line_1"), array('class'=>'control-label')) !!}--}}
|
||||
{{--{!! Form::text('location_address_line_1', $event->location_address_line_1, [--}}
|
||||
{{--'class'=>'form-control location_field',--}}
|
||||
{{--'placeholder'=>trans("Event.address_line_1_placeholder")//'E.g: 45 Grafton St.'--}}
|
||||
{{--]) !!}--}}
|
||||
{{--</div>--}}
|
||||
{{--<div class="form-group">--}}
|
||||
{{--{!! Form::label('location_address_line_2', trans("Event.address_line_2"), array('class'=>'control-label')) !!}--}}
|
||||
{{--{!! Form::text('location_address_line_2', $event->location_address_line_2, [--}}
|
||||
{{--'class'=>'form-control location_field',--}}
|
||||
{{--'placeholder'=>trans("Event.address_line_2_placeholder")//'E.g: Dublin.'--}}
|
||||
{{--]) !!}--}}
|
||||
{{--</div>--}}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{!! Form::label('location_state', trans("Event.city"), array('class'=>'control-label')) !!}
|
||||
{!! Form::text('location_state', $event->location_state, [
|
||||
'class'=>'form-control location_field',
|
||||
'placeholder'=>trans("Event.city_placeholder")//'E.g: Dublin.'
|
||||
]) !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{!! Form::label('location_post_code', trans("Event.post_code"), array('class'=>'control-label')) !!}
|
||||
{!! Form::text('location_post_code', $event->location_post_code, [
|
||||
'class'=>'form-control location_field',
|
||||
'placeholder'=>trans("Event.post_code_placeholder")// 'E.g: 94568.'
|
||||
]) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{--<div class="row">--}}
|
||||
{{--<div class="col-md-6">--}}
|
||||
{{--<div class="form-group">--}}
|
||||
{{--{!! Form::label('location_state', trans("Event.city"), array('class'=>'control-label')) !!}--}}
|
||||
{{--{!! Form::text('location_state', $event->location_state, [--}}
|
||||
{{--'class'=>'form-control location_field',--}}
|
||||
{{--'placeholder'=>trans("Event.city_placeholder")//'E.g: Dublin.'--}}
|
||||
{{--]) !!}--}}
|
||||
{{--</div>--}}
|
||||
{{--</div>--}}
|
||||
{{--<div class="col-md-6">--}}
|
||||
{{--<div class="form-group">--}}
|
||||
{{--{!! Form::label('location_post_code', trans("Event.post_code"), array('class'=>'control-label')) !!}--}}
|
||||
{{--{!! Form::text('location_post_code', $event->location_post_code, [--}}
|
||||
{{--'class'=>'form-control location_field',--}}
|
||||
{{--'placeholder'=>trans("Event.post_code_placeholder")// 'E.g: 94568.'--}}
|
||||
{{--]) !!}--}}
|
||||
{{--</div>--}}
|
||||
{{--</div>--}}
|
||||
{{--</div>--}}
|
||||
{{--</div>--}}
|
||||
|
||||
<div class="clearfix" style="margin-top:-10px; padding: 5px; padding-top: 0px;">
|
||||
<span class="pull-right">
|
||||
@lang("Event.or(manual/existing_venue)") <a data-clear-field=".location_field" data-toggle-class=".address-automatic, .address-manual" data-show-less-text="{{$event->location_is_manual ? trans("Event.enter_manual"):trans("Event.enter_existing")}}" href="javascript:void(0);" class="show-more-options clear_location">{{$event->location_is_manual ? trans("Event.enter_existing"):trans("Event.enter_manual")}}</a>
|
||||
</span>
|
||||
</div>
|
||||
{{--<div class="clearfix" style="margin-top:-10px; padding: 5px; padding-top: 0px;">--}}
|
||||
{{--<span class="pull-right">--}}
|
||||
{{--@lang("Event.or(manual/existing_venue)") <a data-clear-field=".location_field" data-toggle-class=".address-automatic, .address-manual" data-show-less-text="{{$event->location_is_manual ? trans("Event.enter_manual"):trans("Event.enter_existing")}}" href="javascript:void(0);" class="show-more-options clear_location">{{$event->location_is_manual ? trans("Event.enter_existing"):trans("Event.enter_manual")}}</a>--}}
|
||||
{{--</span>--}}
|
||||
{{--</div>--}}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
@section('page_title')
|
||||
<i class="ico-ticket mr5"></i>
|
||||
@lang("Ticket.event_tickets")
|
||||
<a class="pull-right btn btn-primary" href="{{asset('user_content/'.$event->venue->seats_image)}}" target="_blank">Event venue Seats</a>
|
||||
@stop
|
||||
|
||||
@section('head')
|
||||
|
|
@ -58,20 +59,7 @@
|
|||
class='loadModal btn btn-success' type="button"><i class="ico-ticket"></i> @lang("Ticket.create_ticket")
|
||||
</button>
|
||||
</div>
|
||||
@if(false)
|
||||
<div class="btn-group btn-group-responsive ">
|
||||
<button data-modal-id='TicketQuestions'
|
||||
data-href="{{route('showTicketQuestions', array('event_id'=>$event->id))}}" type="button"
|
||||
class="loadModal btn btn-success">
|
||||
<i class="ico-question"></i> @lang("Ticket.questions")
|
||||
</button>
|
||||
</div>
|
||||
<div class="btn-group btn-group-responsive">
|
||||
<button type="button" class="btn btn-success">
|
||||
<i class="ico-tags"></i> @lang("Ticket.coupon_codes")
|
||||
</button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
<!--/ Toolbar -->
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
<script src="//cdnjs.cloudflare.com/ajax/libs/raphael/2.1.4/raphael-min.js" integrity="sha256-Gk+dzc4kV2rqAZMkyy3gcfW6Xd66BhGYjVWa/FjPu+s=" crossorigin="anonymous"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.min.js" integrity="sha256-0rg2VtfJo3VUij/UY9X0HJP7NET6tgAY98aMOfwP0P8=" crossorigin="anonymous"></script>
|
||||
|
||||
{!! HTML::script('https://maps.googleapis.com/maps/api/js?sensor=false&libraries=places&key='.env("GOOGLE_MAPS_GEOCODING_KEY")) !!}
|
||||
{!! HTML::script('https://maps.googleapis.com/maps/api/js?sensor=false&libraries=places&key='.config("services.google_places.key")) !!}
|
||||
{!! HTML::script('vendor/geocomplete/jquery.geocomplete.min.js')!!}
|
||||
{!! HTML::script('vendor/moment/moment.js')!!}
|
||||
{!! HTML::script('vendor/fullcalendar/dist/fullcalendar.min.js')!!}
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@
|
|||
@include('ManageOrganiser.Partials.TopNav')
|
||||
@stop
|
||||
|
||||
@section('head')
|
||||
{!! HTML::script('https://maps.googleapis.com/maps/api/js?sensor=false&libraries=places&key='.env("GOOGLE_MAPS_GEOCODING_KEY")) !!}
|
||||
{!! HTML::script('vendor/geocomplete/jquery.geocomplete.min.js')!!}
|
||||
@stop
|
||||
{{--@section('head')--}}
|
||||
{{--{!! HTML::script('https://maps.googleapis.com/maps/api/js?sensor=false&libraries=places&key='.config("services.google_places.key")) !!}--}}
|
||||
{{--{!! HTML::script('vendor/geocomplete/jquery.geocomplete.min.js')!!}--}}
|
||||
{{--@stop--}}
|
||||
|
||||
@section('menu')
|
||||
@include('ManageOrganiser.Partials.Sidebar')
|
||||
|
|
|
|||
|
|
@ -16,12 +16,12 @@
|
|||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
{!! Form::label('title', trans("Event.event_title"), array('class'=>'control-label required')) !!}
|
||||
{!! Form::text('title', Input::old('title'),array('class'=>'form-control','placeholder'=>trans("Event.event_title_placeholder", ["name"=>Auth::user()->first_name]) )) !!}
|
||||
{!! Form::text('title', Input::old('title'),array('class'=>'form-control','placeholder'=>trans("Event.event_title_placeholder", ["name"=>Auth::user()->first_name]) )) !!}
|
||||
</div>
|
||||
|
||||
<div class="form-group custom-theme">
|
||||
{!! Form::label('description', trans("Event.event_description"), array('class'=>'control-label required')) !!}
|
||||
{!! Form::textarea('description', Input::old('description'),
|
||||
{!! Form::textarea('description', Input::old('description'),
|
||||
array(
|
||||
'class'=>'form-control editable',
|
||||
'rows' => 5
|
||||
|
|
@ -78,90 +78,92 @@
|
|||
|
||||
</div>
|
||||
<div class="form-group address-automatic">
|
||||
{!! Form::label('name', trans("Event.venue_name"), array('class'=>'control-label required ')) !!}
|
||||
{!! Form::text('venue_name_full', Input::old('venue_name_full'),
|
||||
array(
|
||||
'class'=>'form-control geocomplete location_field',
|
||||
'placeholder'=>trans("Event.venue_name_placeholder")
|
||||
)) !!}
|
||||
{!! Form::label('venue_name', trans("Event.venue_name"), array('class'=>'control-label required ')) !!}
|
||||
{!! Form::select('venue_id',venues_list(), Input::old('venue_id'), ['class' => 'form-control','id'=>'venue_name']) !!}
|
||||
|
||||
<!--These are populated with the Google places info-->
|
||||
<div>
|
||||
{!! Form::hidden('formatted_address', '', ['class' => 'location_field']) !!}
|
||||
{!! Form::hidden('street_number', '', ['class' => 'location_field']) !!}
|
||||
{!! Form::hidden('country', '', ['class' => 'location_field']) !!}
|
||||
{!! Form::hidden('country_short', '', ['class' => 'location_field']) !!}
|
||||
{!! Form::hidden('place_id', '', ['class' => 'location_field']) !!}
|
||||
{!! Form::hidden('name', '', ['class' => 'location_field']) !!}
|
||||
{!! Form::hidden('location', '', ['class' => 'location_field']) !!}
|
||||
{!! Form::hidden('postal_code', '', ['class' => 'location_field']) !!}
|
||||
{!! Form::hidden('route', '', ['class' => 'location_field']) !!}
|
||||
{!! Form::hidden('lat', '', ['class' => 'location_field']) !!}
|
||||
{!! Form::hidden('lng', '', ['class' => 'location_field']) !!}
|
||||
{!! Form::hidden('administrative_area_level_1', '', ['class' => 'location_field']) !!}
|
||||
{!! Form::hidden('sublocality', '', ['class' => 'location_field']) !!}
|
||||
{!! Form::hidden('locality', '', ['class' => 'location_field']) !!}
|
||||
</div>
|
||||
<!-- /These are populated with the Google places info-->
|
||||
{{--{!! Form::text('venue_name_full', Input::old('venue_name_full'),--}}
|
||||
{{--array(--}}
|
||||
{{--'class'=>'form-control geocomplete location_field',--}}
|
||||
{{--'placeholder'=>trans("Event.venue_name_placeholder")--}}
|
||||
{{--)) !!}--}}
|
||||
|
||||
{{--<!--These are populated with the Google places info-->--}}
|
||||
{{--<div>--}}
|
||||
{{--{!! Form::hidden('formatted_address', '', ['class' => 'location_field']) !!}--}}
|
||||
{{--{!! Form::hidden('street_number', '', ['class' => 'location_field']) !!}--}}
|
||||
{{--{!! Form::hidden('country', '', ['class' => 'location_field']) !!}--}}
|
||||
{{--{!! Form::hidden('country_short', '', ['class' => 'location_field']) !!}--}}
|
||||
{{--{!! Form::hidden('place_id', '', ['class' => 'location_field']) !!}--}}
|
||||
{{--{!! Form::hidden('name', '', ['class' => 'location_field']) !!}--}}
|
||||
{{--{!! Form::hidden('location', '', ['class' => 'location_field']) !!}--}}
|
||||
{{--{!! Form::hidden('postal_code', '', ['class' => 'location_field']) !!}--}}
|
||||
{{--{!! Form::hidden('route', '', ['class' => 'location_field']) !!}--}}
|
||||
{{--{!! Form::hidden('lat', '', ['class' => 'location_field']) !!}--}}
|
||||
{{--{!! Form::hidden('lng', '', ['class' => 'location_field']) !!}--}}
|
||||
{{--{!! Form::hidden('administrative_area_level_1', '', ['class' => 'location_field']) !!}--}}
|
||||
{{--{!! Form::hidden('sublocality', '', ['class' => 'location_field']) !!}--}}
|
||||
{{--{!! Form::hidden('locality', '', ['class' => 'location_field']) !!}--}}
|
||||
{{--</div>--}}
|
||||
{{--<!-- /These are populated with the Google places info-->--}}
|
||||
</div>
|
||||
|
||||
<div class="address-manual" style="display:none;">
|
||||
<h5>
|
||||
@lang("Event.address_details")
|
||||
</h5>
|
||||
{{--<div class="address-manual" style="display:none;">--}}
|
||||
{{--<h5>--}}
|
||||
{{--@lang("Event.address_details")--}}
|
||||
{{--</h5>--}}
|
||||
|
||||
<div class="form-group">
|
||||
{!! Form::label('location_venue_name', trans("Event.venue_name"), array('class'=>'control-label required ')) !!}
|
||||
{!! Form::text('location_venue_name', Input::old('location_venue_name'), [
|
||||
'class'=>'form-control location_field',
|
||||
'placeholder'=>trans("Event.venue_name_placeholder")
|
||||
]) !!}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{!! Form::label('location_address_line_1', trans("Event.address_line_1"), array('class'=>'control-label')) !!}
|
||||
{!! Form::text('location_address_line_1', Input::old('location_address_line_1'), [
|
||||
'class'=>'form-control location_field',
|
||||
'placeholder'=>trans("Event.address_line_1_placeholder")
|
||||
]) !!}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{!! Form::label('location_address_line_2', trans("Event.address_line_2"), array('class'=>'control-label')) !!}
|
||||
{!! Form::text('location_address_line_2', Input::old('location_address_line_2'), [
|
||||
'class'=>'form-control location_field',
|
||||
'placeholder'=>trans("Event.address_line_2_placeholder")
|
||||
]) !!}
|
||||
</div>
|
||||
{{--<div class="form-group">--}}
|
||||
{{--{!! Form::label('location_venue_name', trans("Event.venue_name"), array('class'=>'control-label required ')) !!}--}}
|
||||
{{--{!! Form::text('location_venue_name', Input::old('location_venue_name'), [--}}
|
||||
{{--'class'=>'form-control location_field',--}}
|
||||
{{--'placeholder'=>trans("Event.venue_name_placeholder")--}}
|
||||
{{--]) !!}--}}
|
||||
{{--</div>--}}
|
||||
{{--<div class="form-group">--}}
|
||||
{{--{!! Form::label('location_address_line_1', trans("Event.address_line_1"), array('class'=>'control-label')) !!}--}}
|
||||
{{--{!! Form::text('location_address_line_1', Input::old('location_address_line_1'), [--}}
|
||||
{{--'class'=>'form-control location_field',--}}
|
||||
{{--'placeholder'=>trans("Event.address_line_1_placeholder")--}}
|
||||
{{--]) !!}--}}
|
||||
{{--</div>--}}
|
||||
{{--<div class="form-group">--}}
|
||||
{{--{!! Form::label('location_address_line_2', trans("Event.address_line_2"), array('class'=>'control-label')) !!}--}}
|
||||
{{--{!! Form::text('location_address_line_2', Input::old('location_address_line_2'), [--}}
|
||||
{{--'class'=>'form-control location_field',--}}
|
||||
{{--'placeholder'=>trans("Event.address_line_2_placeholder")--}}
|
||||
{{--]) !!}--}}
|
||||
{{--</div>--}}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{!! Form::label('location_state', trans("Event.city"), array('class'=>'control-label')) !!}
|
||||
{!! Form::text('location_state', Input::old('location_state'), [
|
||||
'class'=>'form-control location_field',
|
||||
'placeholder'=>trans("Event.city_placeholder")
|
||||
]) !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
{!! Form::label('location_post_code', trans("Event.post_code"), array('class'=>'control-label')) !!}
|
||||
{!! Form::text('location_post_code', Input::old('location_post_code'), [
|
||||
'class'=>'form-control location_field',
|
||||
'placeholder'=>trans("Event.post_code_placeholder")
|
||||
]) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{--<div class="row">--}}
|
||||
{{--<div class="col-md-6">--}}
|
||||
{{--<div class="form-group">--}}
|
||||
{{--{!! Form::label('location_state', trans("Event.city"), array('class'=>'control-label')) !!}--}}
|
||||
{{--{!! Form::text('location_state', Input::old('location_state'), [--}}
|
||||
{{--'class'=>'form-control location_field',--}}
|
||||
{{--'placeholder'=>trans("Event.city_placeholder")--}}
|
||||
{{--]) !!}--}}
|
||||
{{--</div>--}}
|
||||
{{--</div>--}}
|
||||
{{--<div class="col-md-6">--}}
|
||||
{{--<div class="form-group">--}}
|
||||
{{--{!! Form::label('location_post_code', trans("Event.post_code"), array('class'=>'control-label')) !!}--}}
|
||||
{{--{!! Form::text('location_post_code', Input::old('location_post_code'), [--}}
|
||||
{{--'class'=>'form-control location_field',--}}
|
||||
{{--'placeholder'=>trans("Event.post_code_placeholder")--}}
|
||||
{{--]) !!}--}}
|
||||
{{--</div>--}}
|
||||
{{--</div>--}}
|
||||
{{--</div>--}}
|
||||
{{--</div>--}}
|
||||
|
||||
<span>
|
||||
<a data-clear-field=".location_field"
|
||||
data-toggle-class=".address-automatic, .address-manual"
|
||||
data-show-less-text="@lang("Event.or(manual/existing_venue)") <b>@lang("Event.enter_existing")</b>" href="javascript:void(0);"
|
||||
class="in-form-link show-more-options clear_location">
|
||||
@lang("Event.or(manual/existing_venue)") <b>@lang("Event.enter_manual")</b>
|
||||
</a>
|
||||
</span>
|
||||
{{--<span>--}}
|
||||
{{--<a data-clear-field=".location_field"--}}
|
||||
{{--data-toggle-class=".address-automatic, .address-manual"--}}
|
||||
{{--data-show-less-text="@lang("Event.or(manual/existing_venue)") <b>@lang("Event.enter_existing")</b>" href="javascript:void(0);"--}}
|
||||
{{--class="in-form-link show-more-options clear_location">--}}
|
||||
{{--@lang("Event.or(manual/existing_venue)") <b>@lang("Event.enter_manual")</b>--}}
|
||||
{{--</a>--}}
|
||||
{{--</span>--}}
|
||||
|
||||
@if($organiser_id)
|
||||
{!! Form::hidden('organiser_id', $organiser_id) !!}
|
||||
|
|
|
|||
|
|
@ -3,17 +3,17 @@
|
|||
{!!HTML::style('assets/vendor/icon-awesome/css/font-awesome.min.css')!!}
|
||||
<script>
|
||||
$(function() {
|
||||
try {
|
||||
$(".geocomplete").geocomplete({
|
||||
details: "form.gf",
|
||||
types: ["geocode", "establishment"]
|
||||
}).bind("geocode:result", function(event, result) {
|
||||
console.log(result);
|
||||
}, 1000);
|
||||
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
// try {
|
||||
// $(".geocomplete").geocomplete({
|
||||
// details: "form.gf",
|
||||
// types: ["geocode", "establishment"]
|
||||
// }).bind("geocode:result", function(event, result) {
|
||||
// console.log(result);
|
||||
// }, 1000);
|
||||
//
|
||||
// } catch (e) {
|
||||
// console.log(e);
|
||||
// }
|
||||
|
||||
$('.editable').each(function() {
|
||||
var simplemde = new SimpleMDE({
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
{{-- show error using sidebar layout if looged in AND on an admin page; otherwise use a blank page --}}
|
||||
|
||||
@php
|
||||
$title = 'Error '.$error_number;
|
||||
$title = 'Error '.$error_number??999;
|
||||
@endphp
|
||||
|
||||
@section('after_styles')
|
||||
|
|
|
|||
|
|
@ -25,4 +25,6 @@
|
|||
<li><a href='{{ backpack_url('backup') }}'><i class='fa fa-hdd-o'></i> <span>Backups</span></a></li>
|
||||
|
||||
<li><a href='{{ backpack_url('subscriber') }}'><i class='fa fa-tag'></i> <span>Subscribers</span></a></li>
|
||||
<li><a href='{{ backpack_url('event_request') }}'><i class='fa fa-tag'></i> <span>Event Requests</span></a></li>
|
||||
<li><a href='{{ backpack_url('event_request') }}'><i class='fa fa-tag'></i> <span>Event Requests</span></a></li>
|
||||
<li><a href='{{ backpack_url('venue') }}'><i class='fa fa-tag'></i> <span>Venues</span></a></li>
|
||||
<li><a href='{{ backpack_url('section') }}'><i class='fa fa-tag'></i> <span>Sectionss</span></a></li>
|
||||
|
|
@ -0,0 +1,135 @@
|
|||
<!-- text input -->
|
||||
|
||||
<?php
|
||||
|
||||
// the field should work whether or not Laravel attribute casting is used
|
||||
if (isset($field['value']) && (is_array($field['value']) || is_object($field['value']))) {
|
||||
$field['value'] = json_encode($field['value']);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div @include('crud::inc.field_wrapper_attributes') >
|
||||
<label>{!! $field['label'] !!}</label>
|
||||
@include('crud::inc.field_translatable_icon')
|
||||
<input type="hidden"
|
||||
value="{{ old($field['name']) ? old($field['name']) : (isset($field['value']) ? $field['value'] : (isset($field['default']) ? $field['default'] : '' )) }}"
|
||||
name="{{ $field['name'] }}">
|
||||
|
||||
@if(isset($field['prefix']) || isset($field['suffix']))
|
||||
<div class="input-group"> @endif
|
||||
@if(isset($field['prefix']))
|
||||
<div class="input-group-addon">{!! $field['prefix'] !!}</div> @endif
|
||||
@if(isset($field['store_as_json']) && $field['store_as_json'])
|
||||
<input
|
||||
type="text"
|
||||
data-google-address="{"field": "{{$field['name']}}", "full": {{isset($field['store_as_json']) && $field['store_as_json'] ? 'true' : 'false'}} }"
|
||||
@include('crud::inc.field_attributes')
|
||||
>
|
||||
@else
|
||||
<input
|
||||
type="text"
|
||||
data-google-address="{"field": "{{$field['name']}}", "full": {{isset($field['store_as_json']) && $field['store_as_json'] ? 'true' : 'false'}} }"
|
||||
name="{{ $field['name'] }}"
|
||||
value="{{ old($field['name']) ? old($field['name']) : (isset($field['value']) ? $field['value'] : (isset($field['default']) ? $field['default'] : '' )) }}"
|
||||
@include('crud::inc.field_attributes')
|
||||
>
|
||||
@endif
|
||||
@if(isset($field['suffix']))
|
||||
<div class="input-group-addon">{!! $field['suffix'] !!}</div> @endif
|
||||
@if(isset($field['prefix']) || isset($field['suffix'])) </div> @endif
|
||||
|
||||
{{-- HINT --}}
|
||||
@if (isset($field['hint']))
|
||||
<p class="help-block">{!! $field['hint'] !!}</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
{{-- Note: you can use to only load some CSS/JS once, even though there are multiple instances of it --}}
|
||||
|
||||
{{-- ########################################## --}}
|
||||
{{-- Extra CSS and JS for this particular field --}}
|
||||
{{-- If a field type is shown multiple times on a form, the CSS and JS will only be loaded once --}}
|
||||
@if ($crud->checkIfFieldIsFirstOfItsType($field, $fields))
|
||||
|
||||
{{-- FIELD CSS - will be loaded in the after_styles section --}}
|
||||
@push('crud_fields_styles')
|
||||
<style>
|
||||
.ap-input-icon.ap-icon-pin {
|
||||
right: 5px !important;
|
||||
}
|
||||
|
||||
.ap-input-icon.ap-icon-clear {
|
||||
right: 10px !important;
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
{{-- FIELD JS - will be loaded in the after_scripts section --}}
|
||||
@push('crud_fields_scripts')
|
||||
<script>
|
||||
|
||||
//Function that will be called by Google Places Library
|
||||
function initAutocomplete() {
|
||||
|
||||
|
||||
$('[data-google-address]').each(function () {
|
||||
|
||||
var $this = $(this),
|
||||
$addressConfig = $this.data('google-address'),
|
||||
$field = $('[name="' + $addressConfig.field + '"]');
|
||||
|
||||
if ($field.val().length) {
|
||||
var existingData = JSON.parse($field.val());
|
||||
$this.val(existingData.value);
|
||||
}
|
||||
|
||||
var $autocomplete = new google.maps.places.Autocomplete(
|
||||
($this[0]),
|
||||
{types: ['geocode', "establishment"]});
|
||||
if (navigator.geolocation) {
|
||||
navigator.geolocation.getCurrentPosition(function(position) {
|
||||
var geolocation = {
|
||||
lat: position.coords.latitude,
|
||||
lng: position.coords.longitude
|
||||
};
|
||||
var circle = new google.maps.Circle(
|
||||
{center: geolocation, radius: position.coords.accuracy});
|
||||
$autocomplete.setBounds(circle.getBounds());
|
||||
});
|
||||
}
|
||||
$autocomplete.addListener('place_changed', function fillInAddress() {
|
||||
|
||||
var place = $autocomplete.getPlace();
|
||||
var value = $this.val();
|
||||
var latlng = place.geometry.location;
|
||||
var data = {"value": value, "latlng": latlng};
|
||||
|
||||
for (var i = 0; i < place.address_components.length; i++) {
|
||||
var addressType = place.address_components[i].types[0];
|
||||
data[addressType] = place.address_components[i]['long_name'];
|
||||
}
|
||||
$field.val(JSON.stringify(data));
|
||||
|
||||
});
|
||||
|
||||
$this.change(function(){
|
||||
if (!$this.val().length) {
|
||||
$field.val("");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key={{config('services.google_places.key')}}&libraries=places&callback=initAutocomplete"
|
||||
async defer></script>
|
||||
|
||||
@endpush
|
||||
|
||||
@endif
|
||||
{{-- End of Extra CSS and JS --}}
|
||||
{{-- ########################################## --}}
|
||||
|
|
@ -18,4 +18,6 @@ Route::group([
|
|||
CRUD::resource('tag', 'TagCrudController');
|
||||
CRUD::resource('subscriber', 'SubscriberCrudController');
|
||||
CRUD::resource('event_request', 'EventRequestCrudController');
|
||||
CRUD::resource('venue', 'VenueCrudController');
|
||||
CRUD::resource('section', 'SectionCrudController');
|
||||
}); // this should be the absolute last line of this file
|
||||
|
|
@ -25,6 +25,11 @@ Breadcrumbs::for('event',function($trail, $event){
|
|||
$trail->push($event->title,$event->event_url);
|
||||
});
|
||||
|
||||
Breadcrumbs::for('seats',function ($trail,$event){
|
||||
$trail->parent('event',$event);
|
||||
$trail->push('Pokupka');
|
||||
});
|
||||
|
||||
Breadcrumbs::for('search',function($trail){
|
||||
$trail->parent('home');
|
||||
$trail->push('Результат поиска');
|
||||
|
|
|
|||
Loading…
Reference in New Issue