Skip to content

Instantly share code, notes, and snippets.

@mariusa mariusa/Staff.html
Last active Jul 1, 2019

Embed
What would you like to do?
NodeX code sample: Render staff users list in front-end
<div v-if="users.length">
<table class="table table-stripedno table-borderless table-hover">
<thead>
<tr>
<th style="min-width: 8em;">Name</th>
<th>Email</th>
<th>Permissions</th>
<th>Last signin</th>
</tr>
</thead>
<tbody>
<tr
v-for="item in users"
:key="item.id"
>
<td nowrap="nowrap">
<router-link :to="{ name: 'staffDetail', params: { id: item.id }}"><span v-html="item.name ? item.name: '(empty)'"></span></router-link>
</td>
<td><a
v-bind:href="'mailto:' + item.email"
target="_blank"
>{{ item.email }}</a></td>
<td>{{item.permissions.join(', ')}}</td>
<td>{{item.last_signin_date ? day(item.last_signin_date).format(window.DATE_DISPLAY) : 'N/A'}}</td>
</tr>
</tbody>
</table>
</div> <!-- v-if -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.