added rebid and auto login while creating account
This commit is contained in:
@@ -1039,7 +1039,7 @@ class AuthController extends Controller
|
||||
|
||||
public function enteredOtp(Request $request)
|
||||
{
|
||||
// dd(Session::get('user-registration'));
|
||||
// dd($request->all(),Session::get('user-registration'));
|
||||
$validator = Validator::make($request->post(), [
|
||||
'otp' => 'required|min:4|max:4',
|
||||
// 'contact_number' => 'required|exists:users,contact_number|min:10|max:10'
|
||||
@@ -1078,8 +1078,8 @@ class AuthController extends Controller
|
||||
'password' => $userDetails['password'],
|
||||
]);
|
||||
Mail::to($userDetails['email'])->send(new RegisteredMail());
|
||||
Session::forget('user-registration');
|
||||
|
||||
Auth::guard('users')->login($userCreated);
|
||||
|
||||
//sending notifications
|
||||
$name = $userDetails['name'];
|
||||
$notify['message'] = "$name has registered to Jericho Alternatives Website and App!";
|
||||
@@ -1088,6 +1088,7 @@ class AuthController extends Controller
|
||||
foreach ($users as $data) {
|
||||
$data->notify(new UserAdmin($notify, $type));
|
||||
}
|
||||
Session::forget('user-registration');
|
||||
|
||||
// Auth::guard('users')->login($userCreated);
|
||||
return response()->json(['status' => 200, 'message' => 'OTP has been matched and User has been created!'], 200);
|
||||
@@ -1095,6 +1096,7 @@ class AuthController extends Controller
|
||||
}
|
||||
|
||||
$checkOTP = User::where(['contact_number' => $request->contact_number, 'otp' => $request->otp])->first();
|
||||
|
||||
if ($checkOTP) {
|
||||
if (!$checkOTP) {
|
||||
return response()->json(['status' => 400, 'message' => 'OTP Did Not Matched!'], 400);
|
||||
|
||||
@@ -309,6 +309,7 @@ class AlternativeInvestmentFundController extends Controller
|
||||
|
||||
public function ventureCapitalData($slug)
|
||||
{
|
||||
// dd(AlternativeInvestmentFund::where('slug', $slug)->first());
|
||||
try {
|
||||
return (new VentureCapitalFundResource(AlternativeInvestmentFund::where('slug', $slug)->first()))
|
||||
->response()
|
||||
|
||||
@@ -653,6 +653,7 @@ class DashboardController extends Controller
|
||||
'current_or_latest_nav' => $request->current_or_latest_nav,
|
||||
'no_of_units_held' => $request->no_of_units_held,
|
||||
'no_of_units_you_wish_to_sell' => $request->no_of_units_you_wish_to_sell,
|
||||
'og_no_of_units_wish_to_sell' => $request->no_of_units_you_wish_to_sell,
|
||||
'expected_sale_per_unit' => $request->expected_sale_per_unit,
|
||||
'latest_valuation_date' => $request->latest_valuation_date,
|
||||
'listing_status' => 'Hide',
|
||||
@@ -707,6 +708,8 @@ class DashboardController extends Controller
|
||||
'original_amount_invested' => $request->original_amount_invested,
|
||||
'current_market_value_of_the_property' => $request->current_market_value_of_the_property,
|
||||
'expected_selling_price' => $request->expected_selling_price,
|
||||
'og_current_market_value_of_the_property' => $request->current_market_value_of_the_property,
|
||||
'og_expected_selling_price' => $request->expected_selling_price,
|
||||
'latest_valuation_date' => $request->latest_valuation_date,
|
||||
'listing_status' => 'Hide',
|
||||
'status' => 'Pending'
|
||||
|
||||
@@ -222,7 +222,7 @@ class MarketPlaceController extends Controller
|
||||
{
|
||||
$interestedStatus = false;
|
||||
if (auth()->guard('users')->check()) {
|
||||
$interestedStatus = MarketplaceBuyerForm::where(['users_id' => auth()->guard('users')->user()->id, 'table' => $table, 'associated_id' => $offering->id])->first();
|
||||
$interestedStatus = MarketplaceBuyerForm::where(['users_id' => auth()->guard('users')->user()->id, 'table' => $table, 'associated_id' => $offering->id])->where('status', '!=', 'Sold')->first();
|
||||
}
|
||||
return ['interested-status-data' => $interestedStatus];
|
||||
}
|
||||
@@ -231,7 +231,7 @@ class MarketPlaceController extends Controller
|
||||
{
|
||||
$interestedStatus = false;
|
||||
if (auth()->guard('users')->check()) {
|
||||
$interestedStatus = MarketplaceBuyerForm::where(['users_id' => auth()->guard('users')->user()->id, 'table' => $table, 'associated_id' => $offering->id])->exists();
|
||||
$interestedStatus = MarketplaceBuyerForm::where(['users_id' => auth()->guard('users')->user()->id, 'table' => $table, 'associated_id' => $offering->id])->where('status', '!=', 'Sold')->exists();
|
||||
}
|
||||
$totalInterestedBuyers = MarketplaceBuyerForm::where(['table' => $table, 'associated_id' => $offering->id])->count();
|
||||
return [
|
||||
|
||||
@@ -24,6 +24,7 @@ class VentureCapitalFundResource extends JsonResource
|
||||
}
|
||||
|
||||
}
|
||||
// dd($this->products_id);
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'products_id' => $this->products_id,
|
||||
|
||||
@@ -14,7 +14,7 @@ class MarketplaceAlternativeInvestmentFundSeller extends Model
|
||||
|
||||
protected $appends = ['sold_status', 'discount', 'bid'];
|
||||
|
||||
protected $fillable = ['seller_forms_id', 'name_of_the_aif_fund', 'slug', 'fund_category', 'fund_structure', 'type_of_fund', 'fund_strategy', 'fund_manager_name', 'sponsor', 'credit_rating', 'total_capital_commitment', 'uncalled_capital_commitment', 'date_of_final_close', 'tenure_from_final_close', 'current_or_latest_nav', 'no_of_units_held', 'no_of_units_you_wish_to_sell', 'expected_sale_per_unit', 'latest_valuation_date', 'status', 'listing_status'];
|
||||
protected $fillable = ['seller_forms_id', 'name_of_the_aif_fund', 'slug', 'fund_category', 'fund_structure', 'type_of_fund', 'fund_strategy', 'fund_manager_name', 'sponsor', 'credit_rating', 'total_capital_commitment', 'uncalled_capital_commitment', 'date_of_final_close', 'tenure_from_final_close', 'current_or_latest_nav', 'no_of_units_held', 'no_of_units_you_wish_to_sell', 'og_no_of_units_wish_to_sell', 'expected_sale_per_unit', 'latest_valuation_date', 'status', 'listing_status'];
|
||||
|
||||
public function seller()
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ class MarketplaceFractionalRealEstateSeller extends Model
|
||||
|
||||
protected $appends = ['sold_status', 'category', 'discount', 'bid'];
|
||||
|
||||
protected $fillable = ['seller_forms_id','property_name','slug','property_address','property_grade','asset_type','annual_rental_yield_earned','rental_escalation','fractional_real_estate_platform','date_of_investment','original_amount_invested','current_market_value_of_the_property','expected_selling_price', 'latest_valuation_date','status','listing_status'];
|
||||
protected $fillable = ['seller_forms_id','property_name','slug','property_address','property_grade','asset_type','annual_rental_yield_earned','rental_escalation','fractional_real_estate_platform','date_of_investment','original_amount_invested','current_market_value_of_the_property','expected_selling_price', 'og_current_market_value_of_the_property', 'og_expected_selling_price', 'latest_valuation_date','status','listing_status'];
|
||||
|
||||
public function seller(){
|
||||
return $this->belongsTo(MarketplaceSellerForm::class,'seller_forms_id');
|
||||
@@ -66,7 +66,7 @@ class MarketplaceFractionalRealEstateSeller extends Model
|
||||
$bidArr[] = round(($bid->getAttributes()['total_purchase_value'] - $this->current_market_value_of_the_property)/$this->current_market_value_of_the_property * 100,3);
|
||||
}
|
||||
if($bidArr){
|
||||
return max($bidArr);
|
||||
return max((int)$bidArr);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user