Skip to content

Instantly share code, notes, and snippets.

@mariusa
Last active Aug 13, 2021
Embed
What would you like to do?
NodeX code sample: Render staff users list in front-end
<table class="table table-borderless table-hover mb-0">
<thead>
<tr>
<th style="min-width: 8em;">Name</th>
<th>Email</th>
<!--<th>Role</th>-->
<th>Permissions</th>
<th>Last signin</th>
</tr>
</thead>
<tbody>
<tr
v-for="item in items"
:key="item.id"
>
<td nowrap="nowrap">
<router-link :to="'staff?id=' + item.id"><span v-html="item.firstName ? item.firstName + ' ' + item.lastName: '(empty)'"></span></router-link>
</td>
<td>
<a
v-bind:href="'mailto:' + item.email"
target="_blank"
>{{ item.email }}</a>
</td>
<!--<td>{{ item.role }}</td>-->
<td>{{ item.permissions.join(', ') }}</td>
<td>{{ item.last_signed_in_at ? day(item.last_signed_in_at).format(uti.DATE_DISPLAY) : 'N/A' }}</td>
</tr>
</tbody>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment