API & Client - order on user account status in administration

+ fixes
This commit is contained in:
Sam
2022-03-26 18:28:00 +01:00
parent 614c888ec4
commit eb02ede0d7
8 changed files with 115 additions and 11 deletions

View File

@ -30,8 +30,8 @@
<th>
{{ capitalize($t('workouts.WORKOUT', 0)) }}
</th>
<th>{{ $t('user.ADMIN') }}</th>
<th>{{ $t('admin.ACTIVE') }}</th>
<th>{{ $t('user.ADMIN') }}</th>
<th>{{ $t('admin.ACTION') }}</th>
</tr>
</thead>
@ -76,19 +76,19 @@
</td>
<td class="text-center">
<span class="cell-heading">
{{ $t('user.ADMIN') }}
{{ $t('admin.ACTIVE') }}
</span>
<i
:class="`fa fa${user.admin ? '-check' : ''}-square-o`"
:class="`fa fa${user.is_active ? '-check' : ''}-square-o`"
aria-hidden="true"
/>
</td>
<td class="text-center">
<span class="cell-heading">
{{ $t('admin.ACTIVE') }}
{{ $t('user.ADMIN') }}
</span>
<i
:class="`fa fa${user.is_active ? '-check' : ''}-square-o`"
:class="`fa fa${user.admin ? '-check' : ''}-square-o`"
aria-hidden="true"
/>
</td>
@ -159,6 +159,7 @@
const router = useRouter()
const orderByList: string[] = [
'is_active',
'admin',
'created_at',
'username',

View File

@ -187,7 +187,6 @@
}
function displayEmailForm() {
resetErrorsAndSuccess()
console.log('user.value.email_to_confirm', user.value.email_to_confirm)
newUserEmail.value = user.value.email_to_confirm
? user.value.email_to_confirm
: ''

View File

@ -49,6 +49,7 @@
"ORDER_BY": {
"ADMIN": "admin status",
"CREATED_AT": "registration date",
"IS_ACTIVE": "account status",
"USERNAME": "username",
"WORKOUTS_COUNT": "workout count"
}

View File

@ -42,13 +42,14 @@
"USER_EMAIL_UPDATE_SUCCESSFUL": "L'adresse email a été mise à jour.",
"USERS": {
"TABLE": {
"ADD_ADMIN_RIGHTS": "Ajouter les drois d'admin",
"REMOVE_ADMIN_RIGHTS": "Retirer les drois d'admin"
"ADD_ADMIN_RIGHTS": "Ajouter les droits d'admin",
"REMOVE_ADMIN_RIGHTS": "Retirer les droits d'admin"
},
"SELECTS": {
"ORDER_BY": {
"ADMIN": "status administrateur",
"CREATED_AT": "date d'inscription",
"IS_ACTIVE": "statut du compte",
"USERNAME": "nom d'utilisateur",
"WORKOUTS_COUNT": "nombre de séances"
}

View File

@ -9,6 +9,7 @@ export interface IUserProfile {
created_at: string
email: string
email_to_confirm?: string
is_active: boolean
first_name: string | null
last_name: string | null
location: string | null