add user edition to admin panel
This commit is contained in:
@@ -46,8 +46,14 @@
|
||||
],
|
||||
[
|
||||
{ key: 'username', type: 'text', label: 'Spielername', options: { required: true } },
|
||||
{ key: 'uuid', type: 'text', label: 'UUID', default: null }
|
||||
]
|
||||
{
|
||||
key: 'edition',
|
||||
type: 'select',
|
||||
label: 'Edition',
|
||||
options: { values: { java: 'Java', bedrock: 'Bedrock' }, required: true }
|
||||
}
|
||||
],
|
||||
[{ key: 'uuid', type: 'text', label: 'UUID', default: null, options: { dynamicWidth: true } }]
|
||||
]}
|
||||
onSubmit={addUser}
|
||||
bind:open={createPopupOpen}
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
{#snippet edition(value: 'java' | 'bedrock')}
|
||||
<span>{value.charAt(0).toUpperCase() + value.slice(1)}</span>
|
||||
{/snippet}
|
||||
|
||||
<DataTable
|
||||
data={users}
|
||||
count={true}
|
||||
@@ -31,7 +35,8 @@
|
||||
{ key: 'lastname', label: 'Nachname', width: 15, sortable: true },
|
||||
{ key: 'birthday', label: 'Geburtstag', width: 5, sortable: true },
|
||||
{ key: 'telephone', label: 'Telefon', width: 12, sortable: true },
|
||||
{ key: 'username', label: 'Username', width: 20, sortable: true },
|
||||
{ key: 'username', label: 'Username', width: 10, sortable: true },
|
||||
{ key: 'edition', label: 'Edition', width: 10, sortable: true, transform: edition },
|
||||
{ key: 'uuid', label: 'UUID', width: 23 }
|
||||
]}
|
||||
onEdit={(user) => (editPopupUser = user)}
|
||||
|
||||
Reference in New Issue
Block a user