forked from miguel456/rbrecruiter
Add user invitation facilities RSM-5
Adds user invitation to teams, and framework for assigning taems Also adds user acc. deletion.
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
@section('js')
|
||||
|
||||
<x-global-errors></x-global-errors>
|
||||
<script src="/js/team-editor.js"></script>
|
||||
|
||||
@stop
|
||||
|
||||
@@ -39,6 +40,69 @@
|
||||
</x-modal>
|
||||
@endif
|
||||
|
||||
<x-modal id="userlist_modal" modal-label="UserListModalLabel" modal-title="Team Members and Invites" include-close-button="true">
|
||||
|
||||
<p><i class="fas fa-info-circle"></i> Team members and pending invites will appear here.</p>
|
||||
|
||||
@if (!$team->users->isEmpty())
|
||||
<table class="table table-borderless">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Name</th>
|
||||
<th>Roles</th>
|
||||
<th>Status</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
@foreach ($team->users as $teammate)
|
||||
|
||||
<tr>
|
||||
<td>{{ $teammate->id }}</td>
|
||||
<td><a target="_blank" href="{{ route('showSingleProfile', ['user' => $teammate->id]) }}">{{ $teammate->name }}</a></td>
|
||||
<td>
|
||||
@foreach ($teammate->roles as $teammate_role)
|
||||
|
||||
<span class="badge badge-secondary">{{ $teammate_role->name }}</span>
|
||||
|
||||
@endforeach
|
||||
</td>
|
||||
<td>
|
||||
@if ($teammate->isOwnerOfTeam($team))
|
||||
<span class="badge badge-success">Team Owner</span>
|
||||
@else
|
||||
<span class="badge badge-primary">Team Member</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<button rel="buttonTxtTooltip" data-toggle="tooltip" data-placement="top" title="Kick User" type="button" class="btn btn-danger btn-sm"><i class="fas fa-bolt"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
@else
|
||||
|
||||
<div class="alert alert-warning">
|
||||
|
||||
<span><i class="fas fa-exclamation-triangle"></i> <b>There don't seem to be any teammates here!</b></span>
|
||||
<p>Start inviting some people and grow your team.</p>
|
||||
|
||||
</div>
|
||||
|
||||
@endif
|
||||
|
||||
<x-slot name="modalFooter"></x-slot>
|
||||
|
||||
</x-modal>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col text-center">
|
||||
@@ -91,8 +155,42 @@
|
||||
</div>
|
||||
|
||||
<div class="card-footer">
|
||||
<button type="button" class="btn btn-success" onclick="$('#editTeam').submit()"><i class="fas fa-save"></i> Save and Close</button>
|
||||
<button type="button" class="btn btn-danger" onclick="location.href='{{ route('teams.index') }}'"><i class="far fa-trash-alt"></i> Cancel</button>
|
||||
<button type="button" class="btn btn-success ml-2" onclick="$('#editTeam').submit()"><i class="fas fa-save"></i> Save and Close</button>
|
||||
<button type="button" class="btn btn-warning ml-2" onclick="$('#userlist_modal').modal('show')"><i class="fas fa-users"></i> Team Members</button>
|
||||
<button type="button" class="btn btn-danger ml-2" onclick="location.href='{{ route('teams.index') }}'"><i class="far fa-trash-alt"></i> Cancel</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col">
|
||||
|
||||
<div class="card">
|
||||
|
||||
<div class="card-header">
|
||||
<div class="card-title"><h4>Team Vacancies</h4></div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
<span class="text-muted"><i class="fas fa-info-circle"></i> The vacancies you select determine what applications your team members see. All applications under the vacancies you choose will be displayed.</span>
|
||||
|
||||
<form>
|
||||
|
||||
<select id="assocVacancies" name="assocVacancies" multiple="multiple">
|
||||
|
||||
@foreach($vacancies as $vacancy)
|
||||
|
||||
<option value="{{ $vacancy->id }}">{{ $vacancy->vacancyName }}</option>
|
||||
|
||||
@endforeach
|
||||
|
||||
</select>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@@ -66,7 +66,16 @@
|
||||
|
||||
<div class="card-header bg-indigo">
|
||||
|
||||
<div class="card-title"><h4>{{ __('messages.teams.m_teams_page') }}</h4></div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col">
|
||||
|
||||
<div class="card-title"><h4>{{ __('messages.teams.m_teams_page') }} <span class="badge badge-warning"><i class="fas fa-check-circle"></i> {{ (Auth::user()->currentTeam) ? Auth::user()->currentTeam->name : 'Select a team' }}</span></h4></div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -96,7 +105,7 @@
|
||||
<td>{{ $team->name }}</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-success btn-sm ml-2" onclick="location.href='{{ route('teams.edit', ['team' => $team->id]) }}'"><i class="fas fa-cogs"></i> Settings</button>
|
||||
<button type="button" class="btn btn-warning btn-sm ml-2"><i class="fas fas fa-long-arrow-alt-right"></i> Team Dashboard</button>
|
||||
<button onclick="location.href='{{ route('switchTeam', ['team' => $team]) }}'" rel="buttonTxtTooltip" data-placement="top" data-toggle="tooltip" title="Select your active team (for dasboard context, etc)" type="button" class="btn btn-warning btn-sm ml-2"><i class="fas fa-random"></i> Switch To</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -122,6 +131,7 @@
|
||||
<div class="card-footer">
|
||||
|
||||
<button type="button" class="btn btn-success btn-sm ml-3" onclick="$('#newTeamModal').modal('show')"><i class="fas fa-plus-circle"></i> New team</button>
|
||||
<button type="button" class="btn btn-warning btn-sm ml-3"><i class="fas fas fa-long-arrow-alt-right"></i> Team Dashboard</button>
|
||||
|
||||
</div>
|
||||
|
||||
|
@@ -20,8 +20,61 @@
|
||||
|
||||
@section('content')
|
||||
|
||||
<x-modal id="deleteAccountModal" modal-label="deleteAccountModalLabel" modal-title="Close account" include-close-button="true">
|
||||
|
||||
<p>Deleting your account is an irreversible process. The following data will be deleted (including personally identifiable data):</p>
|
||||
<ul>
|
||||
<li>Last IP address</li>
|
||||
<li>Name, Email and MC Username</li>
|
||||
<li>Your previous applications</li>
|
||||
<li>Your profile data and preferences</li>
|
||||
<li>If you were a staff member:</li>
|
||||
<ul>
|
||||
<li>Your comments</li>
|
||||
<li>Any votes</li>
|
||||
<li>Your roles</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<p>What is not deleted:</p>
|
||||
<ul>
|
||||
<li>Server logs of your visits, including IP addresses</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<form id="deleteAccountForm" method="POST" action="{{ route('userDelete') }}">
|
||||
|
||||
@csrf
|
||||
@method('PATCH')
|
||||
|
||||
<div class="form-group">
|
||||
<label for="currentPassword">Re-enter your password</label>
|
||||
<input class="form-control" autocomplete="current-password" type="password" name="currentPassword" id="currentPassword" required>
|
||||
<p class="text-muted text-sm"><i class="fas fa-info-circle"></i> For your security, your password is always required for sensitive operations. <a href="{{ route('password.request') }}">Forgot your password?</a></p>
|
||||
</div>
|
||||
|
||||
@if (Auth::user()->has2FA())
|
||||
<div class="form-group mt-5">
|
||||
|
||||
<label for="otp">Two-factor authentication code</label>
|
||||
<input type="text" id="otp" name="otp" class="form-control">
|
||||
<p class="text-muted text-sm"><i class="fas fa-info-circle"></i> You cannot recover lost 2FA secrets.</p>
|
||||
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</form>
|
||||
|
||||
<x-slot name="modalFooter">
|
||||
|
||||
<button onclick="$('#deleteAccountForm').submit()" type="button" class="btn btn-warning"><i class="fas fa-exclamation-triangle"></i> Continue</button>
|
||||
|
||||
</x-slot>
|
||||
|
||||
</x-modal>
|
||||
|
||||
@if (!Auth::user()->has2FA())
|
||||
|
||||
|
||||
|
||||
<x-modal id="twoFactorAuthModal" modal-label="2faLabel" modal-title="{{__('messages.2fa_txt')}}" include-close-button="true">
|
||||
|
||||
@@ -170,6 +223,9 @@
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="contactSettingsTab" data-toggle="tab" href="#contactSettings" role="tab" aria-controls="ContactSettings" aria-selected="false">{{__('messages.profile.contact_settings')}}</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="dangerZoneTab" data-toggle="tab" href="#dangerZone" role="tab" aria-controls="DangerZone" aria-selected="false">Danger Zone</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -250,6 +306,15 @@
|
||||
<button class="btn btn-success" type="button" onclick="document.getElementById('changeEmail').submit()">{{__('messages.profile.change_email')}}</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="tab-pane fade p-3" id="dangerZone" role="tabpanel" aria-labelledby="dangerZoneTab">
|
||||
<h5 class="card-title">Danger Zone</h5>
|
||||
<p class="card-text text-bold"><i class="fas fa-radiation"></i> Careful! Actions in these tab might result in irreversible loss of data.</p>
|
||||
|
||||
<button onclick="$('#deleteAccountModal').modal('show')" rel="buttonTxtTooltip" data-toggle="tooltip" data-placement="top" title="This action will delete your account permanently." class="btn btn-danger" type="button"><i class="fas fa-user-slash"></i> Close Account</button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user