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;
|
id: string;
|
||||||
isMaster: boolean;
|
isMaster: boolean;
|
||||||
name: string;
|
name: string;
|
||||||
|
isOwner: boolean;
|
||||||
ownerId: string;
|
ownerId: string;
|
||||||
visibility: string;
|
visibility: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
} @else {
|
} @else {
|
||||||
@for (tenant of tenants(); track tenant.id) {
|
@for (tenant of tenants(); track tenant.id) {
|
||||||
<app-panel class="neutral-80">
|
<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">
|
<span class="actions">
|
||||||
<button [routerLink]="tenant.id" class="primary outline">View Details</button>
|
<button [routerLink]="tenant.id" class="primary outline">View Details</button>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@ -8,6 +8,39 @@
|
|||||||
align-items: center;
|
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 {
|
.actions {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,13 +4,14 @@ import {TenantGridViewDto} from '../../../clients/gandalf/mithrandir/tenant/dtos
|
|||||||
import {PanelComponent} from '../../panel/panel.component';
|
import {PanelComponent} from '../../panel/panel.component';
|
||||||
import {LinkComponent} from '../../link/link.component';
|
import {LinkComponent} from '../../link/link.component';
|
||||||
import {RouterLink} from '@angular/router';
|
import {RouterLink} from '@angular/router';
|
||||||
|
import {NgClass} from '@angular/common';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-tenant-grid',
|
selector: 'app-tenant-grid',
|
||||||
imports: [
|
imports: [
|
||||||
PanelComponent,
|
PanelComponent,
|
||||||
LinkComponent,
|
RouterLink,
|
||||||
RouterLink
|
NgClass
|
||||||
],
|
],
|
||||||
templateUrl: './tenant-grid.component.html',
|
templateUrl: './tenant-grid.component.html',
|
||||||
styleUrl: './tenant-grid.component.scss'
|
styleUrl: './tenant-grid.component.scss'
|
||||||
|
|||||||
@ -7,6 +7,8 @@ public class TenantGridViewDto
|
|||||||
public required string Id { get; set; }
|
public required string Id { get; set; }
|
||||||
public required string Name { get; set; }
|
public required string Name { get; set; }
|
||||||
public required bool IsMaster { get; set; }
|
public required bool IsMaster { get; set; }
|
||||||
|
|
||||||
|
public required bool IsOwner { get; set; }
|
||||||
public required string OwnerId { get; set; }
|
public required string OwnerId { get; set; }
|
||||||
public required EntityVisibility Visibility { get; set; }
|
public required EntityVisibility Visibility { get; set; }
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user