minor improvements

This commit is contained in:
2023-01-28 20:47:02 +01:00
parent 6f87075711
commit 6218245ea8
5 changed files with 59 additions and 22 deletions

View File

@@ -100,7 +100,7 @@ export class ListComponent implements OnInit {
}
onSelect(id: string) {
this.router.navigate([id], {relativeTo: this.route});
this.router.navigate([`../${id}`], {relativeTo: this.route});
}
get listData$() {

View File

@@ -31,7 +31,7 @@ import {formatDate} from "@angular/common";
[resultFormatter]="formatter"
[editable]="false" />
<div class="input-group-append">
<button class="btn btn-success" type="button" (click)="add(foreignModal)"><span class="cil-plus btn-icon mr-2"></span> Add</button>
<button class="btn btn-success" type="button" (click)="add(foreignModal)"><span class="cil-plus btn-icon mr-2"></span>Create</button>
</div>
</div>
<div class="input-group" *ngIf="this.hasValue()">
@@ -142,11 +142,11 @@ export class ForeignkeyTypeComponent extends FieldType<FieldTypeConfig> implemen
}
hasValue() {
return this.formControl.value !== undefined;
return this.formControl.value !== undefined && this.formControl.value !== null;
}
add(modal: any) {
this.modalService.open(modal);
this.modalService.open(modal, { size: 'xl' });
}
onResourceCreated(resource_id: string) {
@@ -155,7 +155,7 @@ export class ForeignkeyTypeComponent extends FieldType<FieldTypeConfig> implemen
}
see(modal: any) {
this.modalService.open(modal);
this.modalService.open(modal, { size: 'xl' });
}
onResourceDeleted(resource_id: string) {