admin dashboard refactoring

This commit is contained in:
Čarodej
2022-01-12 13:58:51 +01:00
parent e1bb4b2cbe
commit 4feba76f57
22 changed files with 1157 additions and 563 deletions

View File

@@ -38,7 +38,7 @@
</router-link>
</td>
<td>
<ColorLabel :color="getRoleColor(row.data.attributes.role)">
<ColorLabel :color="$getUserRoleColor(row.data.attributes.role)">
{{ row.data.attributes.role }}
</ColorLabel>
</td>
@@ -97,7 +97,7 @@
</router-link>
</td>
<td>
<ColorLabel :color="getRoleColor(row.data.attributes.role)">
<ColorLabel :color="$getUserRoleColor(row.data.attributes.role)">
{{ row.data.attributes.role }}
</ColorLabel>
</td>
@@ -161,7 +161,7 @@
</router-link>
</td>
<td>
<ColorLabel :color="getRoleColor(row.data.attributes.role)">
<ColorLabel :color="$getUserRoleColor(row.data.attributes.role)">
{{ row.data.attributes.role }}
</ColorLabel>
</td>
@@ -338,13 +338,5 @@
isLoading: true,
}
},
methods: {
getRoleColor(role) {
return {
admin: 'purple',
user: 'green',
}[role]
}
}
}
</script>