solving client issues and bugs
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user