Add user first name and last name to backend table UI

This commit is contained in:
Andrew Kingston 2021-05-19 10:40:05 +01:00
parent a6e80da57f
commit 27dfa40ec4
2 changed files with 12 additions and 0 deletions

View File

@ -47,6 +47,8 @@
})
schema.email.displayName = "Email"
schema.roleId.displayName = "Role"
schema.firstName.displayName = "First Name"
schema.lastName.displayName = "Last Name"
if (schema.status) {
schema.status.displayName = "Status"
}

View File

@ -32,6 +32,8 @@
delete customSchema["email"]
delete customSchema["roleId"]
delete customSchema["status"]
delete customSchema["firstName"]
delete customSchema["lastName"]
return Object.entries(customSchema)
}
@ -87,6 +89,14 @@
meta={{ name: "password", type: "password" }}
bind:value={row.password}
/>
<RowFieldControl
meta={{ ...tableSchema.firstName, name: "First Name" }}
bind:value={row.firstName}
/>
<RowFieldControl
meta={{ ...tableSchema.lastName, name: "Last Name" }}
bind:value={row.lastName}
/>
<!-- Defer rendering this select until roles load, otherwise the initial
selection is always undefined -->
<Select