Merge remote-tracking branch 'origin/develop'

This commit is contained in:
snipe 2024-03-11 15:00:38 +00:00
commit 8bb8eab69b
3 changed files with 9 additions and 3 deletions

View file

@ -337,7 +337,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
*/
public function licenses()
{
return $this->belongsToMany(\App\Models\License::class, 'license_seats', 'assigned_to', 'license_id')->withPivot('id');
return $this->belongsToMany(\App\Models\License::class, 'license_seats', 'assigned_to', 'license_id')->withPivot('id', 'created_at', 'updated_at');
}
/**

View file

@ -37,7 +37,13 @@ Form::macro('countries', function ($name = 'country', $selected = null, $class =
// Pull the autoglossonym array from the localizations translation file
foreach (trans('localizations.countries') as $abbr => $country) {
$select .= '<option value="'.strtoupper($abbr).'"'.(strtoupper($selected) == strtoupper($abbr) ? ' selected="selected" role="option" aria-selected="true"' : ' aria-selected="false"').'>'.$country.'</option> ';
// We have to handle it this way to handle deprecication warnings since you can't strtoupper on null
if ($abbr!='') {
$abbr = strtoupper($abbr);
}
$select .= '<option value="'.$abbr.'"'.($selected == $abbr) ? ' selected="selected" role="option" aria-selected="true"' : ' aria-selected="false"'.'>'.$country.'</option> ';
}
$select .= '</select>';

View file

@ -151,7 +151,7 @@
<i class="fa-lock" aria-hidden="true"></i> {{ str_repeat('x', 15) }}
@endcan
</td>
<td>{{ $license->pivot->created_at }}</td>
<td>{{ $license->pivot->updated_at }}</td>
</tr>
@php
$lcounter++