Commit 1a7a3108 by Tobin

dc

parent d4a5f42d
......@@ -91,7 +91,8 @@ class Event extends CI_Controller {
$cstmSeatLayout = array();
for($i = 0 ; $i < count($_POST['seat_color']) ; $i++){
$cstmSeatLayout[] = array('color'=>$_POST['seat_color'][$i],
'price'=>$_POST['seat_price'][$i]);
'price'=>$_POST['seat_price'][$i],
'capacity'=>$_POST['seat_capacity'][$i]);
}
$_POST['custom_seat_layout'] = json_encode($cstmSeatLayout);
} else {
......@@ -236,7 +237,8 @@ class Event extends CI_Controller {
$cstmSeatLayout = array();
for($i = 0 ; $i < count($_POST['seat_color']) ; $i++){
$cstmSeatLayout[] = array('color'=>$_POST['seat_color'][$i],
'price'=>$_POST['seat_price'][$i]);
'price'=>$_POST['seat_price'][$i],
'capacity'=>$_POST['seat_capacity'][$i]);
}
$_POST['custom_seat_layout'] = json_encode($cstmSeatLayout);
} else {
......
......@@ -89,8 +89,11 @@ class Venue extends CI_Controller {
$seatLayoutDetails = array();
foreach($_POST['seat_color'] AS $index => $value){
$seatLayoutDetails[] = array('color'=>$value,'price'=>$_POST['seat_price'][$index]);
$seatLayoutDetails[] = array('color'=>$value,
'price'=>$_POST['seat_price'][$index],
'capacity'=>$_POST['seat_capacity'][$index]);
}
$_POST['layout_details'] = json_encode($seatLayoutDetails);
} else {
$_POST['layout'] = $_POST['layout_details'] = '';
......@@ -111,7 +114,7 @@ class Venue extends CI_Controller {
$_POST['location_lat'] = $locData['lat'];
$_POST['location_lng'] = $locData['lng'];
unset($_POST['has_layout'],$_POST['seat_color'],$_POST['seat_price']);
unset($_POST['has_layout'],$_POST['seat_color'],$_POST['seat_price'],$_POST['seat_capacity']);
$status = $this->Venue_model->createVenue($_POST);
if($status == 1){
......@@ -193,8 +196,11 @@ class Venue extends CI_Controller {
$seatLayoutDetails = array();
foreach($_POST['seat_color'] AS $index => $value){
$seatLayoutDetails[] = array('color'=>$value,'price'=>$_POST['seat_price'][$index]);
$seatLayoutDetails[] = array('color'=>$value,
'price'=>$_POST['seat_price'][$index],
'capacity'=>$_POST['seat_capacity'][$index]);
}
$_POST['layout_details'] = json_encode($seatLayoutDetails);
} else {
$_POST['layout'] = $_POST['layout_details'] = '';
......@@ -215,7 +221,7 @@ class Venue extends CI_Controller {
$_POST['location_lat'] = $locData['lat'];
$_POST['location_lng'] = $locData['lng'];
unset($_POST['has_layout'],$_POST['seat_color'],$_POST['seat_price']);
unset($_POST['has_layout'],$_POST['seat_color'],$_POST['seat_price'],$_POST['seat_capacity']);
$status = $this->Venue_model->updateVenues(decode_param($venue_id),$_POST);
if($status == 1){
......
......@@ -126,38 +126,52 @@
</div>
<div class="col-sm-8 padTop30">
<div class="col-sm-12 marginTop-8">
<div class="col-sm-3">
<strong>Seat Division</strong>
</div>
<div class="col-sm-3">
<strong>Seat Pricing</strong>
</div>
<div class="col-sm-4">
<strong>Seating Capacity</strong>
</div>
</div>
<div class="box-header with-border padHead marginBottom-10" style="width:410px;"></div>
<?php
if($event->show_layout == 1){
if(!empty($event->custom_seat_layout) &&
!empty($custlayoutDtls = json_decode($event->custom_seat_layout,true))){ ?>
<div class="col-sm-12">
<?php foreach($custlayoutDtls AS $lyDtls){ ?>
<div class="col-sm-12 marginTop-8">
<div class="col-sm-4">
<strong><?= $lyDtls['color'] ?></strong> block
</div>
<div class="col-sm-8">
<strong><?= $lyDtls['price'] ?></strong> / Seat
</div>
!empty($custlayoutDtls = json_decode($event->custom_seat_layout,true))){
foreach($custlayoutDtls AS $lyDtls){ ?>
<div class="col-sm-12 marginTop-8">
<div class="col-sm-3">
<strong><?= $lyDtls['color'] ?></strong> block
</div>
<?php } ?>
</div>
<?php } else {
$layoutDtls = json_decode($event->layout_details,true); ?>
<div class="col-sm-12">
<?php foreach($layoutDtls AS $lyDtls){ ?>
<div class="col-sm-12 marginTop-8">
<div class="col-sm-4">
<strong><?= $lyDtls['color'] ?></strong> block
</div>
<div class="col-sm-8">
<strong><?= $lyDtls['price'] ?></strong> / Seat
</div>
<div class="col-sm-3">
<strong><?= $lyDtls['price'] ?></strong> / Seat
</div>
<?php } ?>
</div>
<?php } ?>
<?php } ?>
<div class="col-sm-4">
<strong><?= $lyDtls['capacity'] ?></strong> Seats / Division
</div>
</div>
<?php }
} else {
$layoutDtls = json_decode($event->layout_details,true);
foreach($layoutDtls AS $lyDtls){ ?>
<div class="col-sm-12 marginTop-8">
<div class="col-sm-3">
<strong><?= $lyDtls['color'] ?></strong> block
</div>
<div class="col-sm-3">
<strong><?= $lyDtls['price'] ?></strong> / Seat
</div>
<div class="col-sm-4">
<strong><?= $lyDtls['capacity'] ?></strong> Seats / Division
</div>
</div>
<?php }
}
} ?>
</div>
</div>
<?php } ?>
......
......@@ -325,6 +325,10 @@
padding-bottom:20px !important;
}
.padBottom30 {
padding-bottom:30px !important;
}
.padTop0 {
padding-top:0px !important;
}
......@@ -361,6 +365,10 @@
margin-top: 10px !important;
}
.marginTop37 {
margin-top: 37px !important;
}
.padRight-5p {
padding-right:5% !important;
}
......@@ -381,6 +389,10 @@
padding-left:10px !important;
}
.padLeft15 {
padding-left:15px !important;
}
.padLeft20 {
padding-left:20px !important;
}
......@@ -637,4 +649,13 @@
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.layoutDivHead{
margin-top: 10px;
}
.hrClass{
margin-top: 0px;
margin-bottom: 15px;
}
\ No newline at end of file
......@@ -154,23 +154,36 @@ jQuery('[id="viewVenueDetails"]').on('click',function() {
}
});
var layoutHtml = '';
var layoutHtml = '', innerLyOut = '';
if(venue_data['show_layout'] == '1'){
layoutHtml = '<div class="col-md-6">'+
'<div class="row"><label>Layout Details</label></div>'+
'<div class="row"> '+
'<div class="col-md-7" style="text-align:center;"> '+
'<img id="driverLicenceImg" src="'+base_url+venue_data['layout']+'"'+
'style="margin-top:10px;width:auto;max-width:225px;height:225px;" />'+
'</div><br>';
layoutHtml = '<div class="col-md-6">'+
'<div class="row"><label>Layout Details</label></div>'+
'<div class="row"> '+
'<div class="col-md-6" style="text-align:center;"> '+
'<img id="driverLicenceImg" src="'+base_url+venue_data['layout']+'"'+
'style="margin-top:10px;width:auto;max-width:200px;height:200px;" />'+
'</div>';
jQuery.each(jQuery.parseJSON(venue_data['layout_details']), function (indexLayout, layoutValue) {
layoutHtml += '<div class="col-md-5">'+
'<label>'+layoutValue['color']+'</label> Block <label>'+layoutValue['price']+'</label> /Seat'+
innerLyOut += '<div>'+
'<div onclick="showLyDivDtls(jQuery(this))" class="cpoint">'+
'<i class="fa fa-caret-square-o-down" aria-hidden="true"></i>'+
'<label class="padLeft10">'+layoutValue['color']+'</label> Block'+
'</div>'+
'<div class="hide">'+
'<div class="padLeft40"><label>'+layoutValue['price']+'</label> /Seat</div>'+
'<div class="padLeft40"><label>150</label> Total Capacity</div>'+
'</div>'+
'</div>';
});
innerLyOut = '<div class="col-md-6 layoutDivHead">'+
'<div class="row padLeft15"><label>Pricing Details</label></div><hr class="hrClass">'+
innerLyOut+
'</div>'+
'</div>'+
'</div>';
layoutHtml += '</div></div>';
layoutHtml = layoutHtml+innerLyOut;
}
var colSlot = (layoutHtml != '')?'6':'12';
var html = '<div id="map-canvas-assign" style="width: 100%; height: 200px;"></div><br>'+
......@@ -474,3 +487,10 @@ jQuery('[id="viewEventDetails"]').on('click',function(event) {
});
});
function showLyDivDtls(thisObj){
thisObj.next("div").removeClass('hide');
setTimeout(function(){
thisObj.next("div").addClass('hide');
}, 3000);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment