mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
SINGLE QUOTES
This commit is contained in:
parent
9f303cc116
commit
eaa68327f7
|
@ -95,9 +95,7 @@ class ProfileController extends Controller
|
||||||
abort(403);
|
abort(403);
|
||||||
}
|
}
|
||||||
|
|
||||||
return view('account/api', [
|
return view('account/api');
|
||||||
'tokens' => Auth::user()->tokens()->get(),
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
namespace App\Http\Livewire;
|
namespace App\Http\Livewire;
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
use Illuminate\View\View;
|
use Illuminate\View\View;
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
|
|
||||||
|
@ -30,7 +31,10 @@ class PersonalAccessTokens extends Component
|
||||||
|
|
||||||
public function deleteToken($tokenId): void
|
public function deleteToken($tokenId): void
|
||||||
{
|
{
|
||||||
Auth::user()->tokens()->where('id', $tokenId)->delete();
|
Log::info('poo');
|
||||||
|
//this needs safety (though the scope of auth::user might kind of do it...)
|
||||||
|
//seems like it does, test more
|
||||||
|
Auth::user()->tokens()->find($tokenId)->delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTokensProperty(): array
|
public function getTokensProperty(): array
|
||||||
|
|
|
@ -1,15 +1,11 @@
|
||||||
@extends('layouts/default')
|
@extends('layouts/default')
|
||||||
|
|
||||||
{{-- Page title --}}
|
{{-- Page title --}}
|
||||||
@section('title')
|
@section('title')
|
||||||
{{ trans('account/general.personal_api_keys') }}
|
{{ trans('account/general.personal_api_keys') }}
|
||||||
@parent
|
@parent
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
{{-- Page content --}}
|
{{-- Page content --}}
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,8 @@
|
||||||
@props([
|
|
||||||
'token_url' => url('oauth/personal-access-tokens'),
|
|
||||||
'scopes_url' => url('oauth/scopes'),
|
|
||||||
])
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<p>New Personal Access Token Component</p>
|
<p>New Livewire Personal Access Token Component</p>
|
||||||
<div>
|
|
||||||
<p>{{ $token_url }}</p>
|
|
||||||
<p>{{ $scopes_url }}</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<div class="text-right" style="display: flex; justify-content: space-between; align-items: center;">
|
<div class="text-right" style="display: flex; justify-content: space-between; align-items: center;">
|
||||||
|
|
||||||
<a class="btn btn-info btn-sm action-link pull-right"
|
<a class="btn btn-info btn-sm action-link pull-right"
|
||||||
onclick="$('#modal-create-token').modal('show');"
|
onclick="$('#modal-create-token').modal('show');"
|
||||||
>
|
>
|
||||||
|
@ -46,7 +35,6 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<!-- Client Name -->
|
<!-- Client Name -->
|
||||||
|
|
||||||
<td style="vertical-align: middle;">
|
<td style="vertical-align: middle;">
|
||||||
{{ $token->name }}
|
{{ $token->name }}
|
||||||
</td>
|
</td>
|
||||||
|
@ -58,28 +46,23 @@
|
||||||
<td style="vertical-align: middle;">
|
<td style="vertical-align: middle;">
|
||||||
{{ $token->expires_at }}
|
{{ $token->expires_at }}
|
||||||
</td>
|
</td>
|
||||||
|
<td style="vertical-align: middle;">
|
||||||
|
{{ $token->id }}
|
||||||
|
</td>
|
||||||
<!-- Delete Button -->
|
<!-- Delete Button -->
|
||||||
<td style="vertical-align: middle;" class="text-right">
|
<td style="vertical-align: middle;" class="text-right">
|
||||||
<a class="action-link btn btn-danger btn-sm" wire:click="deleteToken({{ $token->id }})">
|
<a class="action-link btn btn-danger btn-sm" wire:click="deleteToken('{{ $token->id }}')">
|
||||||
<i class="fas fa-trash"></i>
|
<i class="fas fa-trash"></i>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@endforeach
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Create Token Modal -->
|
<!-- Create Token Modal -->
|
||||||
<x-personal-access-tokens.create-token-modal />
|
<x-personal-access-tokens.create-token-modal />
|
||||||
|
|
||||||
<!-- View New Token Modal -->
|
<!-- View New Token Modal -->
|
||||||
<x-personal-access-tokens.view-new-token />
|
<x-personal-access-tokens.view-new-token />
|
||||||
|
|
||||||
</div>
|
</div>
|
Loading…
Reference in a new issue