minor improvements
This commit is contained in:
@@ -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$() {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user