display if tenent is owned / master / related
This commit is contained in:
parent
88c6857e24
commit
69920bbb10
@ -2,6 +2,7 @@ export interface TenantGridViewDto {
|
||||
id: string;
|
||||
isMaster: boolean;
|
||||
name: string;
|
||||
isOwner: boolean;
|
||||
ownerId: string;
|
||||
visibility: string;
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
} @else {
|
||||
@for (tenant of tenants(); track tenant.id) {
|
||||
<app-panel class="neutral-80">
|
||||
<span class="title">{{tenant.name}}</span>
|
||||
<span class="title" [ngClass]="{'owner': tenant.isOwner, 'master': tenant.isMaster, 'related': !tenant.isOwner && !tenant.isMaster}">{{tenant.name}}</span>
|
||||
<span class="actions">
|
||||
<button [routerLink]="tenant.id" class="primary outline">View Details</button>
|
||||
</span>
|
||||
|
||||
@ -8,6 +8,39 @@
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
&.owner, &.master, &.related {
|
||||
&::before {
|
||||
background-color: var(--primary-30);
|
||||
color: var(--neutral-90);
|
||||
font-size: 0.7rem;
|
||||
line-height: 0.7rem;
|
||||
padding: 0.15rem 0.3rem;
|
||||
font-weight: bold;
|
||||
border-radius: 0.5rem;
|
||||
margin-right: 1ch;
|
||||
}
|
||||
}
|
||||
|
||||
&.owner:not(.master)::before {
|
||||
content: 'Owner';
|
||||
}
|
||||
&.master:not(.owner)::before {
|
||||
content: 'Master';
|
||||
}
|
||||
&.master.owner:before {
|
||||
content: 'Master Owner';
|
||||
}
|
||||
&:not(.owner, .master)::before {
|
||||
content: 'Related';
|
||||
background-color: var(--secondary-30);
|
||||
}
|
||||
}
|
||||
|
||||
.actions {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
@ -4,13 +4,14 @@ import {TenantGridViewDto} from '../../../clients/gandalf/mithrandir/tenant/dtos
|
||||
import {PanelComponent} from '../../panel/panel.component';
|
||||
import {LinkComponent} from '../../link/link.component';
|
||||
import {RouterLink} from '@angular/router';
|
||||
import {NgClass} from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'app-tenant-grid',
|
||||
imports: [
|
||||
PanelComponent,
|
||||
LinkComponent,
|
||||
RouterLink
|
||||
RouterLink,
|
||||
NgClass
|
||||
],
|
||||
templateUrl: './tenant-grid.component.html',
|
||||
styleUrl: './tenant-grid.component.scss'
|
||||
|
||||
@ -7,6 +7,8 @@ public class TenantGridViewDto
|
||||
public required string Id { get; set; }
|
||||
public required string Name { get; set; }
|
||||
public required bool IsMaster { get; set; }
|
||||
|
||||
public required bool IsOwner { get; set; }
|
||||
public required string OwnerId { get; set; }
|
||||
public required EntityVisibility Visibility { get; set; }
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user