banner and category updated
This commit is contained in:
@@ -69,7 +69,7 @@ class FractionalRealEstateController extends Controller
|
||||
public function show($id)
|
||||
{
|
||||
$fractionalRealEstate = Product::with('category', 'fractional_real_estate')->fractionalrealestate()->findorFail($id);
|
||||
|
||||
// dd($fractionalRealEstate);
|
||||
return view('Admin.Pages.manage_freeu_investment.view-product.fractional-real-estate', compact('fractionalRealEstate'));
|
||||
}
|
||||
|
||||
|
||||
@@ -112,14 +112,23 @@ class ManageCategoriesController extends Controller
|
||||
{
|
||||
if ($request->ajax()) {
|
||||
$data = Category::select('*');
|
||||
|
||||
// Check if dropdownValue is not null and not 'orderby'
|
||||
if ($request->dropdownValue != null && $request->dropdownValue != 'orderby') {
|
||||
$where = $request->dropdownValue;
|
||||
$data->where('status', $where);
|
||||
};
|
||||
}
|
||||
|
||||
// Check if dropdownValue is 'orderby'
|
||||
if ($request->dropdownValue == 'orderby') {
|
||||
$data->orderBy('id', 'desc');
|
||||
};
|
||||
return Datatables::of($data)->addIndexColumn()
|
||||
}
|
||||
|
||||
// Fetch categories as active first, then deactivated
|
||||
$data->orderByRaw('CASE WHEN status = 1 THEN 0 ELSE 1 END');
|
||||
|
||||
return Datatables::of($data)
|
||||
->addIndexColumn()
|
||||
->editColumn('created_at', function ($row) {
|
||||
$formattedDate = $row->created_at->format('d/m/Y');
|
||||
return '<div class="badge badge-light fw-bold">' . $formattedDate . '</div>';
|
||||
@@ -129,26 +138,26 @@ class ManageCategoriesController extends Controller
|
||||
})
|
||||
->addColumn('action', function ($row) {
|
||||
$status = $row->status == 1 ? 'checked' : 'null';
|
||||
|
||||
|
||||
$btn = '<div class="text-end d-flex align-items-center justify-content-around">
|
||||
<a type="button" class="action_icon edit_company_btn" id="edit_company_btn" onclick="getCategory(' . $row->id . ')" data-id="" data-company_name="" data-company_logo="">
|
||||
<i class="fa-solid fs-3 fa-pen-to-square"></i>
|
||||
</a>
|
||||
|
||||
<a class="action_icon">
|
||||
<div class="on-off-toggle">
|
||||
<input class="on-off-toggle__input is_active" type="checkbox" id="bopis' . $row->id . '" data-id="' . $row->id . '" onclick="categoryStatus(' . $row->id . ',' . $row->status . ')" value="' . $row->status . '" ' . $status . '/>
|
||||
<label for="bopis' . $row->id . '" class="on-off-toggle__slider"></label>
|
||||
<a type="button" class="action_icon edit_company_btn" id="edit_company_btn" onclick="getCategory(' . $row->id . ')" data-id="" data-company_name="" data-company_logo="">
|
||||
<i class="fa-solid fs-3 fa-pen-to-square"></i>
|
||||
</a>
|
||||
|
||||
<a class="action_icon">
|
||||
<div class="on-off-toggle">
|
||||
<input class="on-off-toggle__input is_active" type="checkbox" id="bopis' . $row->id . '" data-id="' . $row->id . '" onclick="categoryStatus(' . $row->id . ',' . $row->status . ')" value="' . $row->status . '" ' . $status . '/>
|
||||
<label for="bopis' . $row->id . '" class="on-off-toggle__slider"></label>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
';
|
||||
// $btn = '<a href="javascript:void(0)" class="btn btn-primary btn-sm">View</a>';
|
||||
';
|
||||
return $btn;
|
||||
})
|
||||
->rawColumns(['category_name', 'created_at', 'action'])
|
||||
->make(true);
|
||||
}
|
||||
|
||||
|
||||
return view('Admin.manage-freeu-investments.categories');
|
||||
}
|
||||
|
||||
@@ -3571,7 +3571,8 @@ input:focus {
|
||||
}
|
||||
|
||||
.market-list .banner {
|
||||
padding: 45px 0;
|
||||
/* padding: 45px 0; */
|
||||
padding: 20px 0;
|
||||
background: #d9d9d9;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -40,6 +40,8 @@
|
||||
<option value="">Please Select Asset Type</option>
|
||||
<option value="Warehouse">Warehouse</option>
|
||||
<option value="Corporate Office">Corporate Office</option>
|
||||
<option value="Other">Other</option>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
|
||||
@@ -378,7 +378,7 @@
|
||||
@endif
|
||||
<img src="{{ asset(getCategoryIcons($pick->categories_id)) }}">
|
||||
|
||||
<p>{{ $pick->product_name }}</p>
|
||||
<p>{{ $pick->product_name }}-{{$pick->categories_id}}</p>
|
||||
</div>
|
||||
<div class="middle-sec p-0">
|
||||
<p class="cate">Category: {{ $pick->category_name }}</p>
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
<option value="">Please Select Asset Type</option>
|
||||
<option value="Warehouse">Warehouse</option>
|
||||
<option value="Corporate Office">Corporate Office</option>
|
||||
<option value="Other">Other</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
|
||||
Reference in New Issue
Block a user