mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Updates for vendor portal
This commit is contained in:
parent
063d600bbd
commit
041156fa89
@ -13,6 +13,7 @@ namespace App\Events\PurchaseOrder;
|
||||
|
||||
use App\Models\Company;
|
||||
use App\Models\PurchaseOrder;
|
||||
use App\Models\PurchaseOrderInvitation;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
/**
|
||||
@ -25,7 +26,7 @@ class PurchaseOrderWasViewed
|
||||
/**
|
||||
* @var PurchaseOrder
|
||||
*/
|
||||
public $purchase_order;
|
||||
public $invitation;
|
||||
|
||||
public $company;
|
||||
|
||||
@ -38,9 +39,9 @@ class PurchaseOrderWasViewed
|
||||
* @param Company $company
|
||||
* @param array $event_vars
|
||||
*/
|
||||
public function __construct(PurchaseOrder $purchase_order, Company $company, array $event_vars)
|
||||
public function __construct(PurchaseOrderInvitation $invitation, Company $company, array $event_vars)
|
||||
{
|
||||
$this->purchase_order = $purchase_order;
|
||||
$this->invitation = $invitation;
|
||||
$this->company = $company;
|
||||
$this->event_vars = $event_vars;
|
||||
}
|
||||
|
@ -34,12 +34,16 @@ class VendorContactLoginController extends Controller
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
// $this->middleware('guest:vendor', ['except' => ['logout']]);
|
||||
$this->middleware('guest:vendor', ['except' => ['logout']]);
|
||||
}
|
||||
|
||||
public function catch()
|
||||
{
|
||||
$data = [
|
||||
|
||||
];
|
||||
|
||||
return $this->render('purchase_orders.catch');
|
||||
}
|
||||
|
||||
public function logout()
|
||||
@ -47,7 +51,7 @@ class VendorContactLoginController extends Controller
|
||||
Auth::guard('vendor')->logout();
|
||||
request()->session()->invalidate();
|
||||
|
||||
return redirect('/vendor');
|
||||
return redirect('/vendors');
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,18 +1,11 @@
|
||||
@extends('portal.ninja2020.layout.vendor_app')
|
||||
@section('meta_title', ctrans('texts.purchase_orders'))
|
||||
@extends('portal.ninja2020.layout.clean')
|
||||
@section('meta_title', ctrans('texts.vendor'))
|
||||
|
||||
@section('header')
|
||||
@if($errors->any())
|
||||
<div class="alert alert-failure mb-4">
|
||||
@foreach($errors->all() as $error)
|
||||
<p>{{ $error }}</p>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
@endsection
|
||||
@component('portal.ninja2020.components.test')
|
||||
@endcomponent
|
||||
|
||||
@section('body')
|
||||
<div class="flex items-center">
|
||||
<h1>Vendor Portal</h1>
|
||||
</div>
|
||||
<div class="flex justify-center items-center h-screen">
|
||||
<h1>Vendor Portal</h1>
|
||||
</div>
|
||||
@endsection
|
||||
|
@ -14,7 +14,7 @@ use App\Http\Controllers\VendorPortal\InvitationController;
|
||||
use App\Http\Controllers\VendorPortal\PurchaseOrderController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::get('vendor', [VendorContactLoginController::class, 'catch'])->name('vendor.catchall')->middleware(['domain_db', 'contact_account','vendor_locale']); //catch all
|
||||
Route::get('vendors', [VendorContactLoginController::class, 'catch'])->name('vendor.catchall')->middleware(['domain_db', 'contact_account','vendor_locale']); //catch all
|
||||
|
||||
Route::group(['middleware' => ['invite_db'], 'prefix' => 'vendor', 'as' => 'vendor.'], function () {
|
||||
/*Invitation catches*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user