Commit 1ba39d4d by Hussain Mohamed

changes

parent c15dcfae
......@@ -13,6 +13,7 @@
use App\Models\PagesModel;
use App\Models\ProductBrandModel;
use App\Models\ProductIndustryModel;
use App\Models\ProductModel;
use App\Models\ProductTypeModel;
use App\Models\Service;
use App\Models\ServiceTypeModel;
......@@ -30,6 +31,7 @@ public function index(Request $request)
{
$slidersData = SliderModel::Where('status',1)->get();
return view('index',compact('slidersData'));
// return view('maintain');
}
public function contact()
......@@ -41,10 +43,41 @@ public function products()
{
$productType = ProductTypeModel::Where('status',1)->get();
$brandData = ProductBrandModel::Where('status',1)->get();
$industryData = ProductIndustryModel::Where('status',1)->get();
$industryData = ProductIndustryModel::Where('status',1)->get();
return view('products',compact('productType','brandData','industryData'));
}
public function getAjaxProducts(Request $request)
{
$offset = $request->get('offset', 0);
$limit = $request->get('limit', 12);
$categoryId = $request->get('category_id');
$brandId = $request->get('brand_id');
$industryId = $request->get('industry_id');
$products = ProductModel::query()->from('products as p')
->leftJoin('product_attributes as pi','pi.product_id','=','p.id')
->select(['p.id','p.product_name','pi.product_image']);
// 🔹 Filter: Category
if ($categoryId) {
$products->where('p.category_id', $categoryId);
}
// 🔹 Filter: Brand
if ($brandId) {
$products->where('pa.brand_id', $brandId);
}
// 🔹 Filter: Industry
if ($industryId) {
$products->where('pa.industry_id', $industryId);
}
$records = $products->offset($offset)
->limit($limit)->get();
return view('ajax_products',compact('records','offset','limit'));
}
public function career()
{
return view('career');
......
......@@ -11,9 +11,11 @@ class ProductModel extends Model
protected $table = 'products';
protected $guarded = ['id'];
// public function category()
// {
// $this->belongsTo(CategoryModel::class,'category_id','id');
// }
public function category()
{
return $this->belongsTo(CategoryModel::class,'category_id','id');
}
}
......@@ -5271,7 +5271,61 @@ section,
}
/* #brand .accordion-body {
max-height: 150px;
#brand .accordion-body {
max-height: 250px;
overflow-y: auto;
} */
}
.mb-10{
margin-bottom: 10rem;
}
.htitle {
font-size: 1.8rem;
font-weight: 400;
}
p{
font-size: 0.9rem !important;
}
h2.htwo {
font-size: 2.4rem;
font-weight: 400;
}
.et-loader:after{
display: block;
content: " ";
position: absolute;
top: 50%;
right: 50%;
left: auto;
width: 16px;
height: 16px;
margin: -8px -8px 0 0;
background-color: #b9a16b;
background-image: none;
border-radius: 100%;
-webkit-animation: dotPulse .65s 0s infinite cubic-bezier(.21, .53, .56, .8);
animation: dotPulse .65s 0s infinite cubic-bezier(.21, .53, .56, .8);
}
@keyframes dotPulse {
0% {
-webkit-transform:scale(.1);
transform:scale(.1);
opacity:0 }
50% { opacity:1 } to {
-webkit-transform:scale(1.2);
transform:scale(1.2);
opacity:0 }
}
@-webkit-keyframes dotPulse {
0% {
-webkit-transform:scale(.1);
transform:scale(.1);
opacity:0 }
50% { opacity:1 } to {
-webkit-transform:scale(1.2);
transform:scale(1.2);
opacity:0 }
}
......@@ -27,13 +27,13 @@
<div class="page-title ">
<div class="container">
<div class="row g-4">
<div class="col-lg-3">
<div class="col-lg-2">
</div>
<div class="col-lg-7">
<h1 class="text-center hfive mb-5">The Company</h1>
<div class="col-lg-8">
<h3 class="htitle mb-5 mt-5">The Company</h3>
<div class="wpb_wrapper">
<div class="wpb_wrapper ">
<p>Our Company <strong>Palaniappa Electronics</strong> is a partnership concern established on June 2004. <strong>We are a 150+ crores company as on FY 2023-24.</strong><br>
We have two divisions. One is Distribution &amp; another is projects supplies.</p>
<p><strong>In Distribution Business,</strong><br>
......@@ -42,8 +42,8 @@
<p><strong>In Projects Business,</strong><br>
We are distributors of Samsung Hospitality TV, Sony Signage Displays, LG Touch Interactive displays, Globus Interactive displays and end to end education solutions, Qlite LED walls, Panasonic Building mapping projectors, Logitech Video Conferencing, Samsung Enterprise Mobility Solutions(Mobiles, Tabs &amp; Accessories), IFB Industrial Laundry &amp; dish washing solutions, Elanpro – Bluestar – Voltas Commercial Water coolers, dispensers, Chiller &amp; Freezers, Godrej Medical chillers &amp; freezers, in Commercial &amp; Room Air Conditioners we do Samsung, Voltas, Mitsubishi, Haier, Hitachi, Panasonic &amp; O-General. We also supply Hotel &amp; Hospital Amenities.</p>
<p>Here we cater to Hotels, Hospitals, Educational Institution, Corporates &amp; Manufacturing for Tamil Nadu, Pondicherry, Andaman Islands.</p>
<h1 class="text-center hfive mb-5">The Team</h1>
<div class="wpb_wrapper">
<h3 class="htitle mb-2">The Team</h3>
<div class="wpb_wrapper mb-10">
<p><strong>Our company Palaniappa Electronics is currently represented by its partners Mr. Solaiappan.M, Mrs. Adaikkammai.S, Mr. Muthu.S &amp; Mr. Alagappan.S This is a family run business </strong></p>
<p><strong>Our Staff strength is 50+, Our warehouse is 20,000 sq,ft &amp; Our Experience Center is 2000 Sq.ft. We have separate sales teams for each vertical.</strong></p>
......
<?php
if (isset($records)) {
foreach ($records as $key => $row) { ?>
<div class="col-lg-4 col-md-6 col-sm-12">
<div class="product-card text-center">
<img src="<?= ($row->product_image == '') ? asset('assets/img/placeholder.png'):$row->product_image ?>" class="img-fluid product-img" alt="Product">
<h6 class="product-title mt-3"><?= ucwords($row->product_name) ?></h6>
</div>
</div>
<?php }
}
?>
\ No newline at end of file
......@@ -46,7 +46,7 @@
<div class="col-xl-4">
<label for="category_id" class="form-label">Category<span class="text-danger"> *</span></label>
<select class="form-control select2" multiple id="category_id" name="category_id[]">
<select class="form-control select2" id="category_id" name="category_id">
<option value="">--select--</option>
<?php
if (isset($categoryData)) {
......@@ -88,7 +88,7 @@
</div>
<div class="col-xl-4">
<!-- <div class="col-xl-4">
<label for="type_id" class="form-label">Product Type<span class="text-danger"> *</span></label>
<select class="form-control select2" id="type_id" name="type_id">
<option value="">--select--</option>
......@@ -110,7 +110,7 @@
<option value="2">Range</option>
<option value="3">Capacity</option>
</select>
</div>
</div> -->
<div class="col-xl-4">
<label for="type_id" class="form-label">Product Size<span class="text-danger"> *</span></label>
......
......@@ -7,6 +7,7 @@
$broucher = isset($record->broucher) ? $record->broucher : '';
$type_id = isset($record->type_id) ? $record->type_id : '';
$product_name = isset($record->product_name) ? $record->product_name : '';
$category_id = isset($record->category_id) ? $record->category_id : '';
$product_description = isset($record->product_description) ? $record->product_description : '';
?>
......@@ -49,12 +50,12 @@
<div class="col-xl-4">
<label for="category_id" class="form-label">Category<span class="text-danger"> *</span></label>
<select class="form-control select2" multiple id="category_id" name="category_id[]">
<select class="form-control select2" id="category_id" name="category_id">
<option value="">--select--</option>
<?php
if (isset($categoryData)) {
foreach ($categoryData as $val) {?>
<option value="<?php echo $val->id ?>" <?= in_array($val->id,$categoryAr) ? 'selected':'' ?> ><?php echo ucwords($val->category_name) ?></option>
<option value="<?php echo $val->id ?>" <?= ($val->id == $category_id) ? 'selected':'' ?> ><?php echo ucwords($val->category_name) ?></option>
<?php }
}?>
</select>
......@@ -91,7 +92,7 @@
</div>
<div class="col-xl-4">
<!-- <div class="col-xl-4">
<label for="type_id" class="form-label">Product Type<span class="text-danger"> *</span></label>
<select class="form-control select2" id="type_id" name="type_id">
<option value="">--select--</option>
......@@ -113,7 +114,7 @@
<option <?= ($size_type == 2) ? 'selected':'' ?> value="2">Range</option>
<option <?= ($size_type == 3) ? 'selected':'' ?> value="3">Capacity</option>
</select>
</div>
</div> -->
<div class="col-xl-4">
<label for="type_id" class="form-label">Product Size<span class="text-danger"> *</span></label>
......@@ -154,7 +155,7 @@
<th>Action</th>
</tr>
<tbody id="invoiceBody">
<?php if(isset($productItems)){
<?php if(isset($productItems) && count($productItems) > 0){
foreach($productItems as $key=>$row){ ?>
<tr class="all_tr_td_values">
<input type="hidden" name="item_id[]" value="<?= $row->id ?>" />
......@@ -191,7 +192,20 @@
<button type="button" data-row="<?= $key ?>" id="delete" onclick="deleteItem(this)" class="btn btn-sm btn-danger"><i class="bi bi-trash"></i></button>
</td>
</tr>
<?php } } ?>
<?php } }else{ ?>
<tr class="all_tr_td_values">
<input type="hidden" name="item_id[]" value="" />
<td style="width:50%">
<input data-row="0" data-name="product_image" id="product_image0" type="file" name="product_image[]" id="product_image" class="form-control">
</td>
<td></td>
<td style="width:10%">
<button type="button" class="btn btn-sm btn-success" onclick="addRow('invoiceBody');"><i class="bi bi-plus"></i></button>
<button type="button" data-row="0" id="delete" onclick="deleteItem(this)" class="btn btn-sm btn-danger"><i class="bi bi-trash"></i></button>
</td>
</tr>
<?php } ?>
</tbody>
</table>
......
......@@ -27,8 +27,7 @@
<tr>
<th>S.No</th>
<th>Category Name</th>
<th>Product Name</th>
<th>Product Type</th>
<th>Product Name</th>
<th>Status</th>
<th>Action</th>
</tr>
......@@ -40,9 +39,8 @@
?>
<tr>
<td><?php echo $i ?></td>
<td><?php echo $row->category_name ?></td>
<td><?php echo $row->product_name ?></td>
<td><?php echo $row->type ?></td>
<td><?php echo $row->category->category_name ?></td>
<td><?php echo $row->product_name ?></td>
<td><a data-placement="top" title="Status" data-original-title="Status" href="javascript:void(0)" onclick="changeStatus('<?php echo $row->id ?>','<?php echo ($row->status == 1) ? 0 : 1 ?>','ProductModel')" class="badge bg-pill bg-<?php echo ($row->status == 1) ? 'success' : 'danger' ?>"><?php echo ($row->status == 1) ? 'Active' : 'In-Active' ?></a></td>
<td>
<a data-toggle="tooltip" data-placement="top" title="Edit" href="<?php echo route('addProduct', [$row->id]) ?>" class="btn btn-sm btn-warning"><i class="bi bi-pencil-fill"></i></a>
......
......@@ -11,7 +11,7 @@
</div>
<div class="col-lg-6 ">
<h1 class="hfive">Get in Touch</h1>
<h2 class="htwo">Get in Touch</h2>
<h4 class="mt-4 ">We’d love to hear from you.</h4>
</div>
......
......@@ -100,30 +100,30 @@
<div class="row text-center">
<div class="col-lg-3 col-sm-6">
<div class="achievement-item">
<i class="bi bi-award"></i>
<img src="<?= asset('assets/img/') ?>/g2.png" />
<p>NUMBER OF <br>BRANDS </p>
<h3>20+</h3>
<h4>20+</h4>
</div>
</div>
<div class="col-lg-3 col-sm-6">
<div class="achievement-item">
<i class="bi bi-shield-check"></i>
<img src="<?= asset('assets/img/') ?>/g3.png" />
<p>NUMBER OF <br>DEALERS</p>
<h3>350+</h3>
<h4>350+</h4>
</div>
</div>
<div class="col-lg-3 col-sm-6">
<div class="achievement-item">
<i class="bi bi-clock-history"></i>
<img src="<?= asset('assets/img/') ?>/g4.png" />
<p>EXPERIENCE</p>
<h3>15+</h3>
<h4>15+</h4>
</div>
</div>
<div class="col-lg-3 col-sm-6">
<div class="achievement-item">
<i class="bi bi-people"></i>
<img src="<?= asset('assets/img/') ?>/g1.png" />
<p>SUCCESSFULL PROJECTS<br></p>
<h3>2000+</h3>
<h4>2000+</h4>
</div>
</div>
</div>
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Under Construction</title>
</head>
<body>
<img src="<?= asset('assets/img/') ?>/maintain.png" width="100%" height="580px" />
</body>
</html>
\ No newline at end of file
......@@ -20,10 +20,11 @@
</h2>
<div id="type" class="accordion-collapse collapse show">
<div class="accordion-body">
<?php if(isset($productType)){
foreach($productType as $row){ ?>
<div><?= $row->type ?></div>
<?php } } ?>
<?php if (isset($productType)) {
foreach ($productType as $row) { ?>
<div><?= $row->type ?></div>
<?php }
} ?>
</div>
</div>
</div>
......@@ -39,10 +40,11 @@
</h2>
<div id="industry" class="accordion-collapse collapse show">
<div class="accordion-body">
<?php if(isset($industryData)){
foreach($industryData as $row){ ?>
<div><?= $row->industry ?></div>
<?php } } ?>
<?php if (isset($industryData)) {
foreach ($industryData as $row) { ?>
<div><?= $row->industry ?></div>
<?php }
} ?>
</div>
</div>
</div>
......@@ -58,10 +60,11 @@
</h2>
<div id="brand" class="accordion-collapse collapse show">
<div class="accordion-body">
<?php if(isset($brandData)){
foreach($brandData as $row){ ?>
<div><?= $row->brand ?></div>
<?php } } ?>
<?php if (isset($brandData)) {
foreach ($brandData as $row) { ?>
<div><?= $row->brand ?></div>
<?php }
} ?>
</div>
</div>
</div>
......@@ -69,23 +72,76 @@
</div>
</div>
<div class="col-lg-8"></div>
<div class="col-lg-8">
<div class="container py-4">
<div class="row g-4" id="productList">
</div>
<div class="text-center mt-4">
<button id="loadMore"
class="btn btn-outline-dark">
Load More
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function () {
<script>
$(document).ready(function() {
$('.filter-accordion .accordion-body div').on('click', function() {
$(this)
.closest('.accordion-body')
.find('div')
.removeClass('active');
$(this).addClass('active');
});
$('.filter-accordion .accordion-body div').on('click', function () {
$(this)
.closest('.accordion-body')
.find('div')
.removeClass('active');
$(this).addClass('active');
});
});
let offset = 0;
const limit = 6;
function loadProducts(reset = false) {
if (reset) {
offset = 0;
$('#productList').html('');
}
$.ajax({
url: '<?= route('getProducts') ?>',
type: 'GET',
data: {
offset: offset,
limit: limit
},
success: function (data) {
// if (data.length === 0) {
// $('#loadMore').hide();
// return;
// }
$('#productList').append(data);
offset += limit;
}
});
}
// Initial Load
loadProducts();
// Load More Click
$('#loadMore').on('click', function () {
loadProducts();
});
</script>
</script>
@endsection
\ No newline at end of file
......@@ -28,6 +28,7 @@
Route::get('about-us', [FrontendController::class, 'about'])->name('about-us');
Route::get('career', [FrontendController::class, 'career'])->name('career');
Route::get('product', [FrontendController::class, 'products'])->name('product');
Route::match(['get','post'],'getProducts', [FrontendController::class, 'getAjaxProducts'])->name('getProducts');
Route::get('/request-waiting/{token}', [FrontendController::class, 'requestWaiting'])
......
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