mirror of
https://gitlab.linphone.org/BC/public/flexisip-account-manager.git
synced 2026-01-17 01:58:07 +00:00
Fix #143 Ensure that the ProvisioningToken model behave likes all the other Consommable
This commit is contained in:
parent
a01cd8d922
commit
965d808932
2 changed files with 14 additions and 9 deletions
|
|
@ -30,4 +30,9 @@ class ProvisioningToken extends Consommable
|
|||
$this->used = true;
|
||||
$this->save();
|
||||
}
|
||||
|
||||
public function consumed(): bool
|
||||
{
|
||||
return $this->used == true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
@foreach ($account->recoveryCodes as $recoveryCode)
|
||||
<tr @if ($recoveryCode->consumed()) class="disabled" @endif>
|
||||
<td @if ($recoveryCode->consumed())class="crossed" @endif>****</td>
|
||||
<tr @if ($recoveryCode->consumed()) class="disabled crossed" @endif>
|
||||
<td>****</td>
|
||||
<td>
|
||||
{{ $recoveryCode->created_at }}
|
||||
</td>
|
||||
|
|
@ -50,8 +50,8 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
@foreach ($account->phoneChangeCodes as $phoneChangeCode)
|
||||
<tr @if ($phoneChangeCode->consumed()) class="disabled" @endif>
|
||||
<td @if ($phoneChangeCode->consumed())class="crossed" @endif>****</td>
|
||||
<tr @if ($phoneChangeCode->consumed()) class="disabled crossed" @endif>
|
||||
<td>****</td>
|
||||
<td>
|
||||
{{ $phoneChangeCode->created_at }}
|
||||
</td>
|
||||
|
|
@ -75,8 +75,8 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
@foreach ($account->emailChangeCodes as $emailChangeCode)
|
||||
<tr @if ($emailChangeCode->consumed()) class="disabled" @endif>
|
||||
<td @if ($emailChangeCode->consumed())class="crossed" @endif>****</td>
|
||||
<tr @if ($emailChangeCode->consumed()) class="disabled crossed" @endif>
|
||||
<td>****</td>
|
||||
<td>
|
||||
{{ $emailChangeCode->created_at }}
|
||||
</td>
|
||||
|
|
@ -100,13 +100,13 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
@foreach ($account->provisioningTokens as $provisioningToken)
|
||||
<tr @if ($provisioningToken->used) class="disabled" @endif>
|
||||
<td @if ($provisioningToken->used) class="crossed" @endif>{{ $provisioningToken->token }}</td>
|
||||
<tr @if ($provisioningToken->consumed()) class="disabled crossed" @endif>
|
||||
<td>{{ $provisioningToken->token }}</td>
|
||||
<td>
|
||||
{{ $provisioningToken->created_at }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $provisioningToken->updated_at }}
|
||||
{{ $provisioningToken->consumed() ? $provisioningToken->updated_at : '-' }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue