bug fixes
This commit is contained in:
@@ -197,9 +197,9 @@ class DashboardController extends Controller
|
||||
$leads = Lead::where('lead_owner', auth()->user()->id)->latest()->get();
|
||||
// dd(auth()->user()->id);
|
||||
|
||||
$tasks = LeadTasksMeeting::where('owner', auth()->user()->id)->tasks()->get();
|
||||
$tasks = LeadTasksMeeting::where('owner', auth()->user()->id)->orderBy('created_at', 'desc')->tasks()->get();
|
||||
// dd($tasks, auth()->user()->id);
|
||||
$meetings = LeadTasksMeeting::where('host', (string)auth()->user()->id)->meetings()->get();
|
||||
$meetings = LeadTasksMeeting::where('host', (string)auth()->user()->id)->orderBy('created_at', 'desc')->meetings()->get();
|
||||
// dd($meetings);
|
||||
$users = User::admins()->get();
|
||||
return view('Admin.personal-dashboard', compact('companyCount', 'a', 'leads', 'tasks', 'meetings', 'users', 'userCount', 'investingUserCount', 'totalProductCount'));
|
||||
|
||||
@@ -38,7 +38,7 @@ class ManageCommissionController extends Controller
|
||||
abort(404);
|
||||
}
|
||||
$products = Product::query()
|
||||
->select(DB::raw('products.id, coalesce(sdi.product_name, p2p.scheme, fre.property_name_and_location,id.company_name,aif.fund_name,caga.project_name,hyf.security_name,lbf.company,sdi.product_name,vd.company_name) as product_name'), DB::raw('DATE_FORMAT(products.created_at, "%d-%b-%Y") as date'), 'categories.category_name', DB::raw('coalesce(sdi.minimum_investment, p2p.minimum_investment, fre.minimum_investment,id.minimum_investment,aif.minimum_investment,caga.minimum_investment,hyf.minimum_investment,lbf.minimum_investment,sdi.minimum_investment,vd.minimum_investment) as minimum_investment'), 'products.commission_type', 'products.rate', 'products.commission', 'products.description', DB::raw('coalesce(fre.companies_id,aif.companies_id,caga.companies_id,vd.companies_id) as companies_id'), 'upfront_rate', 'trail_rate')
|
||||
->select(DB::raw('products.id, coalesce(fund.fund_name, re.property_name, sdi.product_name, p2p.scheme, fre.property_name_and_location,id.company_name,aif.fund_name,caga.project_name,hyf.security_name,lbf.company,sdi.product_name,vd.company_name) as product_name'), DB::raw('DATE_FORMAT(products.created_at, "%d-%b-%Y") as date'), 'categories.category_name', DB::raw('coalesce(sdi.minimum_investment,re.total_price, p2p.minimum_investment, fre.minimum_investment,id.minimum_investment,aif.minimum_investment,caga.minimum_investment,hyf.minimum_investment,lbf.minimum_investment,sdi.minimum_investment,vd.minimum_investment,fund.minimum_investment) as minimum_investment'), 'products.commission_type', 'products.rate', 'products.commission', 'products.description', DB::raw('coalesce(fre.companies_id,aif.companies_id,caga.companies_id,vd.companies_id) as companies_id'), 'upfront_rate', 'trail_rate')
|
||||
->leftJoin('securitized_debt_instruments as sdi', 'products.id', 'sdi.products_id')
|
||||
->leftJoin('fractional_real_estates as fre', 'products.id', 'fre.products_id')
|
||||
->leftJoin('peer_to_peer_lendings as p2p', 'products.id', 'p2p.products_id')
|
||||
@@ -48,6 +48,8 @@ class ManageCommissionController extends Controller
|
||||
->leftJoin('high_yield_finances as hyf', 'products.id', 'hyf.products_id')
|
||||
->leftJoin('lease_based_financings as lbf', 'products.id', 'lbf.products_id')
|
||||
->leftJoin('venture_debts as vd', 'products.id', 'vd.products_id')
|
||||
->leftJoin('funds as fund', 'products.id', 'fund.products_id')
|
||||
->leftJoin('real_estates as re', 'products.id', 're.products_id')
|
||||
// ->join('fractional_real_estates as fr', 'companies.id', 'fr.companies_id')
|
||||
// ->leftJoin('alternative_investment_funds as aifp', 'companies.id', 'aifp.companies_id')
|
||||
// ->leftJoin('clean_and_green_assets as cagap', 'companies.id', 'cagap.companies_id')
|
||||
@@ -56,7 +58,6 @@ class ManageCommissionController extends Controller
|
||||
// ->orderBy('products.created_at')
|
||||
->latest('products.created_at')
|
||||
->get();
|
||||
// dd($products);
|
||||
return view('Admin.Pages.manage_commission.manage_commission', compact('products'));
|
||||
}
|
||||
|
||||
|
||||
@@ -123,6 +123,7 @@ class ManagePartnerPlatformController extends Controller
|
||||
|
||||
return view('Admin.Pages.manage_investors.manage_partner_details', (['data' => $data]));
|
||||
}
|
||||
|
||||
public function updatePartner(Request $request)
|
||||
{
|
||||
|
||||
@@ -139,7 +140,7 @@ class ManagePartnerPlatformController extends Controller
|
||||
'password' => $request->password,
|
||||
|
||||
]);
|
||||
dd($data);
|
||||
// dd($data);
|
||||
|
||||
$testimonial_id = $data->id;
|
||||
|
||||
@@ -164,4 +165,10 @@ class ManagePartnerPlatformController extends Controller
|
||||
Mail::to($email)->send(new PartnerCredential($mailData, $data));
|
||||
return true;
|
||||
}
|
||||
|
||||
public function delete_partner($id)
|
||||
{
|
||||
$tagDeleted = UserPartner::where('id',$id)->delete();
|
||||
return response()->json(['status' => 200]);
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -96,6 +96,7 @@
|
||||
</thead>
|
||||
<tbody class="text-gray-600 fw-semibold">
|
||||
@foreach ($products as $product)
|
||||
{{-- @dd($product); --}}
|
||||
<tr>
|
||||
<td>
|
||||
<div
|
||||
|
||||
@@ -70,6 +70,7 @@
|
||||
<th class="min-w-25px w-100px align-top">Sr. No.</th>
|
||||
<th class="min-w-75px w-200px align-top">User </th>
|
||||
<th class="min-w-75px w-150px align-top">Partner</th>
|
||||
<th class="text-center min-w-75px w-50px align-top">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="text-gray-600 fw-semibold">
|
||||
@@ -81,6 +82,16 @@
|
||||
</td>
|
||||
<td class="min-w-75px w-100px align-top"> {{$user->name}}</td>
|
||||
<td class="min-w-75px w-150px align-top">{{$user->company_name}}</td>
|
||||
<td>
|
||||
<div
|
||||
class="actions text-end d-flex align-items-center justify-content-around">
|
||||
<a class="action_icon delete" id="partner_delete"
|
||||
data-id="{{ $user->id }}" data-bs-toggle="modal"
|
||||
data-bs-target="#delete_partner">
|
||||
<i class=" fa-solid fa-trash"></i>
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@@ -92,6 +103,32 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" data-toggle="modal" data-target="#delete_opt" id="delete_partner" tabindex="-1" role="dialog"
|
||||
aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div class="modal-content Delete_pop">
|
||||
<div class="modal-body">
|
||||
<svg style="color: red;margin-bottom: 20px;" xmlns="http://www.w3.org/2000/svg" width="50"
|
||||
height="50" fill="currentColor" class="bi bi-x-circle" viewBox="0 0 16 16">
|
||||
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z" fill="red">
|
||||
</path>
|
||||
<path
|
||||
d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"
|
||||
fill="red"></path>
|
||||
</svg>
|
||||
<h2>Are you sure want to delete?</h2>
|
||||
<div class="modal-footer logout_footer">
|
||||
<button id="close_modal" class="log-close" type="button" data-bs-dismiss="modal"
|
||||
aria-label="Close">
|
||||
<span aria-hidden="true">Cancel</span>
|
||||
</button>
|
||||
<input type="hidden" id="partner_id">
|
||||
<button id='partner_delete_modal' class="btn btn-primary">Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
@@ -123,5 +160,43 @@
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$(document).on('click', "#partner_delete", function() {
|
||||
var delete_partner_id = $(this).data('id');
|
||||
$("#partner_id").val(delete_partner_id);
|
||||
});
|
||||
|
||||
$(document).on('click', '#partner_delete_modal', function(e) {
|
||||
e.preventDefault();
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
}
|
||||
});
|
||||
|
||||
var id = $('#partner_id').val();
|
||||
|
||||
// $('#tag_delete').text('Please wait...');
|
||||
// $('#tag_delete').attr('disabled', true);
|
||||
|
||||
$.ajax({
|
||||
type: 'DELETE',
|
||||
url: "{{ route('delete_partner', '') }}" + "/" + id,
|
||||
data : id,
|
||||
success: function(data) {
|
||||
toastr.options = {
|
||||
"progressBar": true,
|
||||
"closeButton": true,
|
||||
}
|
||||
if (data.status == 200) {
|
||||
toastr.success('Partner deleted successfully');
|
||||
window.location.href = '{{ route('manage-partner-platform') }}';
|
||||
}
|
||||
if (data.status == 204) {
|
||||
toastr.error('Something went wrong! Try again');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -145,7 +145,7 @@
|
||||
<th class="min-w-25px w-100px align-top">Sr. No.</th>
|
||||
<th class="min-w-75px w-200px align-top">User</th>
|
||||
<th class="min-w-75px w-200px align-top">Custom ID</th>
|
||||
<th class="min-w-75px w-200px align-top">Investor Name</th>
|
||||
<th class="min-w-75px w-200px align-top">Product Name</th>
|
||||
<th class="min-w-75px w-150px align-top">Category</th>
|
||||
<th class="min-w-75px w-150px align-top">Holding Status</th>
|
||||
<th class="min-w-75px w-150px align-top">Created At</th>
|
||||
@@ -164,7 +164,7 @@
|
||||
<td class="min-w-25px w-100px">{{ $loop->iteration }}</td>
|
||||
<td class="min-w-75px w-100px align-top">{{ $data->investor->name }}</td>
|
||||
<td class="min-w-75px w-100px align-top">{{ $data->custom_id }}</td>
|
||||
<td class="min-w-75px w-100px align-top">{{ $data->investor_name }}</td>
|
||||
<td class="min-w-75px w-100px align-top">{{ $data->product_name }}</td>
|
||||
<td class="min-w-75px w-150px align-top">{{ $data->categories }}</td>
|
||||
{{-- <td class="min-w-75px w-150px align-top">
|
||||
{{ $data->products == null ? 'null' : ($data->products->profit_sharing == null ? $data->products->id : $data->products->profit_sharing) }}
|
||||
|
||||
@@ -3151,6 +3151,9 @@
|
||||
success: function(response) {
|
||||
if (response.message === 'Attachment deleted successfully') {
|
||||
toastr.success('Document deleted successfully');
|
||||
setTimeout(() => {
|
||||
location.reload();
|
||||
}, 1000);
|
||||
} else {
|
||||
toastr.error('Something went wrong! Please Try Again');
|
||||
}
|
||||
|
||||
@@ -597,6 +597,7 @@ Route::middleware([BackendAccess::class])->group(function () {
|
||||
Route::get("/edit-manage-partner/{id}", 'editPartner')->name('edit-manage-partner');
|
||||
Route::post("/update-manage-partner", 'updatePartner')->name('update-manage-partner');
|
||||
Route::get("/view-manage-partner/{id}", 'viewPartnerDetails')->name('view-manage-partner');
|
||||
Route::delete("delete-partner/{id}", 'delete_partner')->name('delete_partner');
|
||||
});
|
||||
|
||||
//Manage User Product
|
||||
|
||||
Reference in New Issue
Block a user