Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/app/component/mapping/mapping.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
.mat-form-field{
margin: 20px;
width: 50%;
background-color: coral;

}

.matrix-table{
Expand All @@ -26,4 +28,15 @@
word-wrap: break-word;
font-size: 16px;
font-weight: bold;
}

.sortSection{
margin: 30px;
margin-right: 60px;
background-color: mediumorchid;
float: right;
}

.filterandsort{
background-color: brown;
}
104 changes: 64 additions & 40 deletions src/app/component/mapping/mapping.component.html
Original file line number Diff line number Diff line change
@@ -1,31 +1,42 @@
<div class="content">

<app-top-header section="Mappings"></app-top-header>
<div class="filterandsort">
<mat-form-field class="filterSection" appearance="fill">
<mat-label>Filter</mat-label>
<mat-chip-list #chipList aria-label="Filter" color="primary">
<mat-chip
*ngFor="let chip of currentChip"
(removed)="remove(chip)">
{{chip}}
<button matChipRemove>
<mat-icon>cancel</mat-icon>
</button>
</mat-chip>
<input
#chipInput
[formControl]="FilterCtrl"
[matAutocomplete]="auto"
[matChipInputFor]="chipList"
[matChipInputSeparatorKeyCodes]="separatorKeysCodes">
</mat-chip-list>
<mat-autocomplete #auto="matAutocomplete" (optionSelected)="selected($event)">
<mat-option *ngFor="let filter of filteredChips | async" [value]="filter">
{{filter}}
</mat-option>
</mat-autocomplete>
</mat-form-field>

<mat-form-field class="example-chip-list" appearance="fill">
<mat-label>Filter</mat-label>
<mat-chip-list #chipList aria-label="Filter" color="primary">
<mat-chip
*ngFor="let chip of currentChip"
(removed)="remove(chip)">
{{chip}}
<button matChipRemove>
<mat-icon>cancel</mat-icon>
</button>
</mat-chip>
<input
#chipInput
[formControl]="chipCtrl"
[matAutocomplete]="auto"
[matChipInputFor]="chipList"
[matChipInputSeparatorKeyCodes]="separatorKeysCodes">
</mat-chip-list>
<mat-autocomplete #auto="matAutocomplete" (optionSelected)="selected($event)">
<mat-option *ngFor="let fruit of filteredChips | async" [value]="fruit">
{{fruit}}
</mat-option>
</mat-autocomplete>
</mat-form-field>

<section class="sortSection">
<mat-button-toggle-group [formControl]="SortCtrl" aria-label="Sort By">
<mat-button-toggle value="sortByTask" (click)="changeTableBasedOnCurrentSort()">Tasks</mat-button-toggle>
<mat-button-toggle value="sortBySAMM" (click)="changeTableBasedOnCurrentSort()">SAMM</mat-button-toggle>
<mat-button-toggle value="sortByISO" (click)="changeTableBasedOnCurrentSort()">ISO</mat-button-toggle>
</mat-button-toggle-group>
</section>
</div>



<table mat-table [dataSource]="dataSource" class="mat-elevation-z8 matrix-table" >
Expand All @@ -46,25 +57,38 @@
</ng-container>

<ng-container matColumnDef="samm2">
<th mat-header-cell *matHeaderCellDef> SAMM </th>
<td mat-cell *matCellDef="let element">
<ul>
<li *ngFor="let sammElement of element.samm2">
{{sammElement}}
</li>
</ul>
</td>
<ng-container *ngIf="currentlySortingBySAMM">
<th mat-header-cell *matHeaderCellDef> SAMM </th>
<td mat-cell *matCellDef="let element"> {{element.samm2}} </td>
</ng-container>
<ng-container *ngIf="currentlySortingByTask || currentlySortingByISO">
<th mat-header-cell *matHeaderCellDef> SAMM </th>
<td mat-cell *matCellDef="let element">
<ul>
<li *ngFor="let sammElement of element.samm2">
{{sammElement}}
</li>
</ul>
</td>
</ng-container>
</ng-container>

<ng-container matColumnDef="ISO">
<th mat-header-cell *matHeaderCellDef> ISO </th>
<td mat-cell *matCellDef="let element">
<ul>
<li *ngFor="let ISOElement of element.ISO">
{{ISOElement}}
</li>
</ul>
</td>
<ng-container *ngIf="currentlySortingByISO">
<th mat-header-cell *matHeaderCellDef> ISO </th>
<td mat-cell *matCellDef="let element"> {{element.ISO}} </td>
</ng-container>

<ng-container *ngIf="currentlySortingByTask || currentlySortingBySAMM">
<th mat-header-cell *matHeaderCellDef> ISO </th>
<td mat-cell *matCellDef="let element">
<ul>
<li *ngFor="let ISOElement of element.ISO">
{{ISOElement}}
</li>
</ul>
</td>
</ng-container>
</ng-container>

<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
Expand Down
Loading