Refactors admin page design to move each 'facet' of admin into its own component.
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
<div class="tab-content">
|
||||
<div class="tab-toolbar">
|
||||
<h2>Underwriters ({{ (underwriters$ | async)?.length }})</h2>
|
||||
<button class="btn btn-add" (click)="onAdd()">+ Add Underwriter</button>
|
||||
</div>
|
||||
|
||||
<table class="admin-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
<th>Website</th>
|
||||
<th>Order</th>
|
||||
<th>Active</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for (uw of underwriters$ | async; track uw.id) {
|
||||
<tr>
|
||||
<td>{{ uw.name }}</td>
|
||||
<td class="description-cell">{{ uw.description }}</td>
|
||||
<td>
|
||||
@if (uw.website_url) {
|
||||
<a [href]="uw.website_url" target="_blank" rel="noopener">{{ uw.website_url }}</a>
|
||||
} @else {
|
||||
—
|
||||
}
|
||||
</td>
|
||||
<td>{{ uw.display_order }}</td>
|
||||
<td>{{ uw.active ? 'Yes' : 'No' }}</td>
|
||||
<td class="actions">
|
||||
<button class="btn-icon btn-edit" (click)="onEdit(uw)">Edit</button>
|
||||
<button class="btn-icon btn-delete" (click)="onDelete(uw.id)">Delete</button>
|
||||
</td>
|
||||
</tr>
|
||||
} @empty {
|
||||
<tr>
|
||||
<td colspan="6" class="empty-row">No underwriters yet. Click "Add Underwriter" to create one.</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
Reference in New Issue
Block a user