-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #528 from HZ-HBO-ICT/feature/combine-predefined-an…
…d-action-based-roles Feature - Combine predefined and action based roles
- Loading branch information
Showing
17 changed files
with
356 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
namespace App\View\Components\Dashboards\Blocks; | ||
|
||
use Closure; | ||
use Illuminate\Contracts\View\View; | ||
use Illuminate\Support\Facades\Auth; | ||
use Illuminate\View\Component; | ||
|
||
class BoothOwnerInfo extends Component | ||
{ | ||
public $boothButtons = []; | ||
|
||
/** | ||
* Create a new component instance. | ||
*/ | ||
public function __construct() | ||
{ | ||
if (!Auth::user()->company->booth) { | ||
$this->boothButtons['Request a booth'] = 'company.requests'; | ||
} else { | ||
$this->boothButtons['Join the others at the booth'] = null; | ||
} | ||
} | ||
|
||
/** | ||
* Get the view / contents that represent the component. | ||
*/ | ||
public function render(): View|Closure|string | ||
{ | ||
return view('components.dashboards.blocks.booth-owner-info'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
namespace App\View\Components\Dashboards\Blocks; | ||
|
||
use Closure; | ||
use Illuminate\Contracts\View\View; | ||
use Illuminate\Support\Facades\Auth; | ||
use Illuminate\View\Component; | ||
|
||
class SpeakerInfo extends Component | ||
{ | ||
public $speakerButtons = []; | ||
|
||
/** | ||
* Create a new component instance. | ||
*/ | ||
public function __construct() | ||
{ | ||
$company = Auth::user()->company; | ||
|
||
if ($company->hasPresentationsLeft) { | ||
$this->speakerButtons['Request a presentation'] = 'presentations.create'; | ||
} | ||
if ($company->presentations) { | ||
foreach ($company->presentations as $presentation) { | ||
$this->speakerButtons["Join '{$presentation->name}' as a co-speaker"] = | ||
['presentations.show', $presentation]; | ||
} | ||
} | ||
} | ||
|
||
/** | ||
* Get the view / contents that represent the component. | ||
*/ | ||
public function render(): View|Closure|string | ||
{ | ||
return view('components.dashboards.blocks.speaker-info'); | ||
} | ||
} |
59 changes: 59 additions & 0 deletions
59
resources/views/components/dashboards/blocks/booth-owner-info.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
@php use \Illuminate\Support\Facades\Auth @endphp | ||
<div> | ||
<dl class="pt-11 pb-5 px-6"> | ||
<div | ||
class="py-5 px-4 rounded-lg overflow-hidden relative bg-partner-100 dark:bg-partner-900 shadow-md dark:shadow-md"> | ||
<dt> | ||
<div class="p-3 rounded-md absolute bg-partner-500"> | ||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" | ||
stroke-width="1.5" stroke="white" | ||
aria-hidden="true" class="w-6 h-6"> | ||
<path stroke-linecap="round" stroke-linejoin="round" | ||
d="M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"/> | ||
</svg> | ||
</div> | ||
</dt> | ||
<div class="ml-16 font-semibold text-md text-gray-700 dark:text-gray-100 overflow-hidden text-ellipsis"> | ||
<p>You are part of the people joining {{Auth::user()->company->name}} for the "We are in IT together" | ||
conference!<br> | ||
When the company representative invited you, they specified that you would be part of the booth owners of | ||
the company. | ||
</p> | ||
<div class="pt-8 grid grid-cols-1"> | ||
<div class="w-full"> | ||
To become a booth owner you must do the following: | ||
</div> | ||
@foreach($boothButtons as $label => $route) | ||
<div class="pt-2"> | ||
@if($route) | ||
<a href="{{ route($route) }}" | ||
class="flex w-full items-center bg-partner-500 hover:bg-partner-700 dark:bg-partner-600 dark:hover:bg-gray-900 text-gray-200 dark:text-white font-semibold justify-center py-2 px-4 w-3/4 rounded-lg transition duration-300 ease-in-out"> | ||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" | ||
stroke="currentColor" | ||
class="w-6 h-6 mr-2"> | ||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" | ||
d="M12 6v6m0 0v6m0-6h6m-6 0H6"></path> | ||
</svg> | ||
<span>{{ $label }}</span> | ||
</a> | ||
@else | ||
<button | ||
class="flex w-full items-center bg-partner-500 hover:bg-partner-700 dark:bg-partner-600 dark:hover:bg-gray-900 text-gray-200 dark:text-white font-semibold justify-center py-2 px-4 w-3/4 rounded-lg transition duration-300 ease-in-out" | ||
onclick="Livewire.dispatch('openModal', { component: 'booth.join-booth-owner-modal' })"> | ||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" | ||
stroke="currentColor" | ||
class="w-6 h-6 mr-2"> | ||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" | ||
d="M12 6v6m0 0v6m0-6h6m-6 0H6"></path> | ||
</svg> | ||
<span>{{ $label }}</span> | ||
</button> | ||
@endif | ||
</div> | ||
@endforeach | ||
</div> | ||
</div> | ||
</div> | ||
</dl> | ||
</div> |
Oops, something went wrong.