solving client issues and bugs

This commit is contained in:
Ritikesh yadav
2024-04-16 15:17:56 +05:30
parent 34177484dc
commit 32d38b8c6b
18 changed files with 142 additions and 36 deletions

View File

@@ -54,6 +54,7 @@ class OverviewController extends Controller
public function listingFeaturedStatus(Request $request)
{
// dd($request->all());
$listingStatus = $request->listing_status;
$id = $request->id;
$table = $request->table;
@@ -75,15 +76,20 @@ class OverviewController extends Controller
$changeListingStatus = \DB::table($table)->where('id', $id)->update([
'listing_status' => $listingStatus
]);
if ($changeListingStatus && $listingStatus != 'Hide') {
$user = User::find($data->users_id);
$productName = $data->security_name ?? $data->property_name ?? $data->name_of_the_aif_fund;
$notify['message'] = "Congratulations, Your investment($productName) has been assigned to $listingStatus section!";
$user->notify(new UserAdmin($notify));
return response()->json(['status' => 200, 'message' => 'Listing Status Changed!']);
// if ($changeListingStatus && $listingStatus != 'Hide') {
if ($listingStatus != 'Hide') {
if( $listingStatus != 'Non-Featured')
{
$user = User::find($data->users_id);
$productName = $data->security_name ?? $data->property_name ?? $data->name_of_the_aif_fund;
$notify['message'] = "Congratulations, Your investment($productName) has been assigned to $listingStatus section!";
$user->notify(new UserAdmin($notify));
return response()->json(['status' => 200, 'message' => 'Listing Status Changed!']);
}
}
return response()->json(['status' => 400, 'message' => 'Error Changing Listing Status!']);
// dd($changeListingStatus);
// return response()->json(['status' => 400, 'message' => 'Error Changing Listing Status!']);
return response()->json(['status' => 200, 'message' => 'Listing Status Changed!']);
}
public function changeStatusBuyer(Request $request)