added delete bid
This commit is contained in:
@@ -839,6 +839,7 @@ class DashboardController extends Controller
|
||||
->select(
|
||||
'marketplace_buyer_forms.*', // Select all columns from marketplace_aif_sellers
|
||||
'marketplace_aif_sellers.name_of_the_aif_fund',
|
||||
'marketplace_aif_sellers.slug',
|
||||
'marketplace_aif_sellers.fund_category',
|
||||
'marketplace_aif_sellers.fund_strategy',
|
||||
'marketplace_aif_sellers.type_of_fund',
|
||||
@@ -864,6 +865,7 @@ class DashboardController extends Controller
|
||||
->select(
|
||||
'marketplace_buyer_forms.*', // Select all columns from marketplace_aif_sellers
|
||||
'marketplace_fre_sellers.property_name',
|
||||
'marketplace_fre_sellers.slug',
|
||||
'marketplace_fre_sellers.property_address',
|
||||
'marketplace_fre_sellers.property_grade',
|
||||
'marketplace_fre_sellers.asset_type',
|
||||
|
||||
@@ -24,6 +24,23 @@ class MarketPlaceController extends Controller
|
||||
return view('Frontend.Pages.marketplace.index', compact('spotlightMarketPlaceListed', 'featuredMarketplaceListed', 'nonFeaturedMarketplaceListed'));
|
||||
}
|
||||
|
||||
public function deleteBid(Request $request)
|
||||
{
|
||||
// dd($request->id);
|
||||
try{
|
||||
$id = $request->id;
|
||||
if($id)
|
||||
{
|
||||
if(MarketplaceBuyerForm::where('id',(int)$id)->delete())
|
||||
{
|
||||
return response()->json(['status'=>200,'message'=>'Bid deleted successful']);
|
||||
}
|
||||
}
|
||||
}catch(\Exception $e){
|
||||
return response()->json(['status'=>400,'message'=>$e->getMessage()]);
|
||||
}
|
||||
}
|
||||
|
||||
public function spotlightInvestment()
|
||||
{
|
||||
$data = null;
|
||||
|
||||
@@ -4,10 +4,11 @@ namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class MarketplaceBuyerForm extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use HasFactory,SoftDeletes;
|
||||
|
||||
protected $fillable = ['users_id', 'associated_id', 'table', 'name', 'city', 'country', 'contact_number', 'email_id', 'no_of_units_you_wish_to_buy', 'offer_price_per_unit', 'total_purchase_value','complete_units_sold','complete_sale_value','commission_earned','date_of_sale','platform','final_purchase_value'];
|
||||
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
<td>{{ $data->name_of_the_aif_fund }}</td>
|
||||
<td>{{ $data->getAttributes()['fund_category'] }}</td>
|
||||
<td>{{ $data->type_of_fund }}</td>
|
||||
<td>{{ $data->fund_strategy }}</td>
|
||||
<td class="text-align-left">{{ $data->fund_strategy }}</td>
|
||||
<td>{{ $data->total_capital_commitment }}</td>
|
||||
<td>{{ $data->uncalled_capital_commitment }}</td>
|
||||
</tr>
|
||||
@@ -367,6 +367,8 @@
|
||||
<th style="min-width:150px;">Total Capital Commitment</th>
|
||||
<th style="min-width:150px;">Uncalled Capital Commitment
|
||||
</th>
|
||||
<th style="min-width:150px;">Action
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -376,11 +378,15 @@
|
||||
<td>{{ $data->name_of_the_aif_fund }}</td>
|
||||
<td>{{ $data->getAttributes()['fund_category'] }}</td>
|
||||
<td>{{ $data->type_of_fund }}</td>
|
||||
<td>{{ $data->fund_strategy }}</td>
|
||||
<td class="text-align-left">{{ $data->fund_strategy }}</td>
|
||||
<td>{{ IND_money_format($data->total_capital_commitment) }}
|
||||
</td>
|
||||
<td>{{ IND_money_format($data->uncalled_capital_commitment) }}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{route('market_place_offering',$data->slug)}}" class="blue-btn"><i class="fa fa-eye" aria-hidden="true"></i></a>
|
||||
<a href="{{route('delete_bid',$data->id)}}" class="blue-btn"><i class="fa fa-trash" aria-hidden="true"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@@ -399,10 +405,12 @@
|
||||
<th style="min-width:150px;">Fractional Real Estate
|
||||
Platform</th>
|
||||
<th style="min-width:150px;">Expected Selling Price</th>
|
||||
<th style="min-width:150px;">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($freInvestmentWatchlist as $data)
|
||||
{{-- @dd($data) --}}
|
||||
<tr>
|
||||
<td>{{ $data->property_name }}</td>
|
||||
<td>{{ $data->getAttributes()['property_address'] }}
|
||||
@@ -412,6 +420,10 @@
|
||||
<td>{{ $data->company_name }}</td>
|
||||
<td>{{ IND_money_format($data->expected_selling_price) }}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{route('market_place_offering',$data->slug)}}" class="blue-btn"><i class="fa fa-eye" aria-hidden="true"></i></a>
|
||||
<a data-id="{{$data->id}}" class="blue-btn delete_bid"><i class="fa fa-trash" aria-hidden="true"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@@ -485,7 +497,7 @@
|
||||
</td>
|
||||
<td>{{ $item['type_of_fund'] }}
|
||||
</td>
|
||||
<td>{{ $item['fund_strategy'] }}
|
||||
<td class="text-align-left">{{ $item['fund_strategy'] }}
|
||||
</td>
|
||||
<td>{{ $item['total_capital_commitment'] }}
|
||||
</td>
|
||||
@@ -628,5 +640,46 @@
|
||||
$('#Lending1').DataTable();
|
||||
$('#Lending2').DataTable();
|
||||
$('#Lending3').DataTable();
|
||||
|
||||
$('.delete_bid').on('click',function(){
|
||||
id = $(this).data('id');
|
||||
// $('#market-tab').addClass('active').prop('aria-selected',true);
|
||||
// $('#bought-tab').addClass('active').prop('aria-selected',true);
|
||||
// return ;
|
||||
// alert(id);
|
||||
url = "{{route('delete_bid')}}";
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'GET',
|
||||
data: {
|
||||
'id':id
|
||||
},
|
||||
success:function(result){
|
||||
if(result.status == 200)
|
||||
{
|
||||
toastr.success(result.message);
|
||||
setTimeout(() => {
|
||||
window.location.reload();
|
||||
}, 2000);
|
||||
// setTimeout(() => {
|
||||
// // window.location.reload();
|
||||
// $('#user-tab').removeClass('active').prop('aria-selected',false);
|
||||
// $('#bought-tab').removeClass('active').prop('aria-selected',false);
|
||||
// $('#market-tab').addClass('active').prop('aria-selected',true);
|
||||
// $('#watchlist-tab').addClass('active').prop('aria-selected',true);
|
||||
// }, 4000);
|
||||
}
|
||||
else{
|
||||
toastr.success(result.message);
|
||||
setTimeout(() => {
|
||||
window.location.reload();
|
||||
}, 2000);
|
||||
$('#market-tab').addClass('active').prop('aria-selected',true);
|
||||
$('#watchlist-tab').addClass('active').prop('aria-selected',true);
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
@@ -393,6 +393,7 @@ Route::controller(MarketPlaceController::class)->group(function () {
|
||||
Route::get("secondary-marketplace", 'index')->name('market_place');
|
||||
// Route::get("marketplace/offering/", 'viewOffering')->name('market_place_offering');
|
||||
Route::get("marketplace/offering/{slug}", 'viewOffering')->name('market_place_offering');
|
||||
Route::get("delete/bid", 'deleteBid')->name('delete_bid');
|
||||
});
|
||||
|
||||
// chat box - Prathmesh
|
||||
|
||||
Reference in New Issue
Block a user