Skip to content
Snippets Groups Projects
Commit a20ecd74 authored by François Agneray's avatar François Agneray
Browse files

Fixed bug: add attribute not visible dataset empty

parent b3439a7a
No related branches found
No related tags found
1 merge request!72Develop
...@@ -7,12 +7,10 @@ ...@@ -7,12 +7,10 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
import { AddAttributeComponent } from './add-attribute.component';
import { TableGeneralComponent } from './table-general.component'; import { TableGeneralComponent } from './table-general.component';
import { TrGeneralComponent } from './tr-general.component'; import { TrGeneralComponent } from './tr-general.component';
export const generalComponents = [ export const generalComponents = [
AddAttributeComponent,
TableGeneralComponent, TableGeneralComponent,
TrGeneralComponent TrGeneralComponent
]; ];
<div class="row mb-1">
<div class="col-12">
<app-add-attribute
[columnList]="columnList"
[columnListIsLoading]="columnListIsLoading"
[columnListIsLoaded]="columnListIsLoaded"
[attributeList]="attributeList"
(loadColumnList)="loadColumnList.emit()"
(add)="addAttribute.emit($event)">
</app-add-attribute>
</div>
</div>
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-bordered" aria-describedby="Edit attributes design"> <table class="table table-bordered" aria-describedby="Edit attributes design">
<thead> <thead>
......
...@@ -7,20 +7,10 @@ ...@@ -7,20 +7,10 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
import { Component, Input, Output, EventEmitter } from '@angular/core'; import { Component } from '@angular/core';
import { Column } from 'src/app/admin/store/models';
import { Attribute } from 'src/app/metamodel/models';
@Component({ @Component({
selector: 'app-table-general', selector: 'app-table-general',
templateUrl: 'table-general.component.html' templateUrl: 'table-general.component.html'
}) })
export class TableGeneralComponent { export class TableGeneralComponent { }
@Input() columnList: Column[];
@Input() columnListIsLoading: boolean;
@Input() columnListIsLoaded: boolean;
@Input() attributeList: Attribute[];
@Output() loadColumnList: EventEmitter<{}> = new EventEmitter();
@Output() addAttribute: EventEmitter<Attribute> = new EventEmitter();
}
...@@ -17,6 +17,7 @@ import { coneSearchConfigComponents } from './cone-search-config'; ...@@ -17,6 +17,7 @@ import { coneSearchConfigComponents } from './cone-search-config';
import { detailConfigComponents } from './detail-page'; import { detailConfigComponents } from './detail-page';
import { outputCategoryComponents } from './output-category'; import { outputCategoryComponents } from './output-category';
import { outputFamilyComponents } from './output-family'; import { outputFamilyComponents } from './output-family';
import { AddAttributeComponent } from './add-attribute.component';
import { InstanceButtonsComponent } from './instance-buttons.component'; import { InstanceButtonsComponent } from './instance-buttons.component';
export const dummiesComponents = [ export const dummiesComponents = [
...@@ -30,5 +31,6 @@ export const dummiesComponents = [ ...@@ -30,5 +31,6 @@ export const dummiesComponents = [
detailConfigComponents, detailConfigComponents,
outputCategoryComponents, outputCategoryComponents,
outputFamilyComponents, outputFamilyComponents,
AddAttributeComponent,
InstanceButtonsComponent InstanceButtonsComponent
]; ];
...@@ -32,6 +32,19 @@ ...@@ -32,6 +32,19 @@
</ol> </ol>
</nav> </nav>
<div class="row mb-3">
<div class="col-12">
<app-add-attribute
[columnList]="columnList | async"
[columnListIsLoading]="columnListIsLoading | async"
[columnListIsLoaded]="columnListIsLoaded | async"
[attributeList]="attributeList | async"
(loadColumnList)="loadColumnList()"
(add)="addAttribute($event)">
</app-add-attribute>
</div>
</div>
<div class="row mt-1"> <div class="row mt-1">
<div class="col-12"> <div class="col-12">
<div *ngIf="(attributeList | async).length < 1" class="alert alert-warning" role="alert"> <div *ngIf="(attributeList | async).length < 1" class="alert alert-warning" role="alert">
...@@ -83,14 +96,7 @@ ...@@ -83,14 +96,7 @@
</ul> </ul>
</div> </div>
<div class="card-body" [ngSwitch]="tabSelected | async"> <div class="card-body" [ngSwitch]="tabSelected | async">
<app-table-general <app-table-general *ngSwitchCase="'general'">
*ngSwitchCase="'general'"
[columnList]="columnList | async"
[columnListIsLoading]="columnListIsLoading | async"
[columnListIsLoaded]="columnListIsLoaded | async"
[attributeList]="attributeList | async"
(loadColumnList)="loadColumnList()"
(add)="addAttribute($event)">
<tr *ngFor="let attribute of (attributeList | async)" <tr *ngFor="let attribute of (attributeList | async)"
general general
[attribute]="attribute" [attribute]="attribute"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment