Merge remote-tracking branch 'origin/develop' into feature/db-query-save-prompt
This commit is contained in:
commit
5b2f37e175
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "2.6.8-alpha.10",
|
||||
"version": "2.6.8-alpha.11",
|
||||
"npmClient": "yarn",
|
||||
"packages": [
|
||||
"packages/backend-core",
|
||||
|
|
|
@ -22,7 +22,11 @@
|
|||
export let rowCount
|
||||
export let disableSorting = false
|
||||
export let customPlaceholder = false
|
||||
<<<<<<< HEAD
|
||||
export let allowEditing = true
|
||||
=======
|
||||
export let allowClickRows
|
||||
>>>>>>> origin/develop
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
|
@ -112,6 +116,7 @@
|
|||
{customPlaceholder}
|
||||
{allowEditing}
|
||||
showAutoColumns={!hideAutocolumns}
|
||||
{allowClickRows}
|
||||
on:clickrelationship={e => selectRelationship(e.detail)}
|
||||
on:sort
|
||||
>
|
||||
|
|
|
@ -555,7 +555,7 @@
|
|||
|
||||
{#if filteredUsers?.length}
|
||||
<div class="auth-entity-section">
|
||||
<div class="auth-entity-header ">
|
||||
<div class="auth-entity-header">
|
||||
<div class="auth-entity-title">Users</div>
|
||||
<div class="auth-entity-access-title">Access</div>
|
||||
</div>
|
||||
|
@ -696,7 +696,7 @@
|
|||
max-width: calc(100vw - 40px);
|
||||
background: var(--background);
|
||||
border-left: var(--border-light);
|
||||
z-index: 3;
|
||||
z-index: 999;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow-y: auto;
|
||||
|
|
|
@ -88,6 +88,16 @@
|
|||
},
|
||||
}
|
||||
|
||||
const getPendingSchema = tblSchema => {
|
||||
if (!tblSchema) {
|
||||
return {}
|
||||
}
|
||||
let pendingSchema = JSON.parse(JSON.stringify(tblSchema))
|
||||
pendingSchema.email.displayName = "Pending Invites"
|
||||
return pendingSchema
|
||||
}
|
||||
|
||||
$: pendingSchema = getPendingSchema(schema)
|
||||
$: userData = []
|
||||
$: inviteUsersResponse = { successful: [], unsuccessful: [] }
|
||||
$: {
|
||||
|
@ -110,6 +120,24 @@
|
|||
}
|
||||
})
|
||||
}
|
||||
let invitesLoaded = false
|
||||
let pendingInvites = []
|
||||
let parsedInvites = []
|
||||
|
||||
const invitesToSchema = invites => {
|
||||
return invites.map(invite => {
|
||||
const { admin, builder, userGroups, apps } = invite.info
|
||||
|
||||
return {
|
||||
email: invite.email,
|
||||
builder,
|
||||
admin,
|
||||
userGroups: userGroups,
|
||||
apps: apps ? [...new Set(Object.keys(apps))] : undefined,
|
||||
}
|
||||
})
|
||||
}
|
||||
$: parsedInvites = invitesToSchema(pendingInvites)
|
||||
|
||||
const updateFetch = email => {
|
||||
fetch.update({
|
||||
|
@ -144,6 +172,7 @@
|
|||
}))
|
||||
try {
|
||||
inviteUsersResponse = await users.invite(payload)
|
||||
pendingInvites = await users.getInvites()
|
||||
inviteConfirmationModal.show()
|
||||
} catch (error) {
|
||||
notifications.error("Error inviting user")
|
||||
|
@ -232,6 +261,9 @@
|
|||
try {
|
||||
await groups.actions.init()
|
||||
groupsLoaded = true
|
||||
|
||||
pendingInvites = await users.getInvites()
|
||||
invitesLoaded = true
|
||||
} catch (error) {
|
||||
notifications.error("Error fetching user group data")
|
||||
}
|
||||
|
@ -324,6 +356,15 @@
|
|||
goToNextPage={fetch.nextPage}
|
||||
/>
|
||||
</div>
|
||||
<Table
|
||||
schema={pendingSchema}
|
||||
data={parsedInvites}
|
||||
allowEditColumns={false}
|
||||
allowEditRows={false}
|
||||
{customRenderers}
|
||||
loading={!invitesLoaded}
|
||||
allowClickRows={false}
|
||||
/>
|
||||
</Layout>
|
||||
|
||||
<Modal bind:this={createUserModal}>
|
||||
|
|
Loading…
Reference in New Issue