Save DataSet
This commit is contained in:
@@ -59,16 +59,9 @@ export class DataSetEditComponent implements OnInit {
|
||||
if (this.form.invalid) {
|
||||
return;
|
||||
}
|
||||
/*
|
||||
this.document.loadForm(this.form);
|
||||
let id;
|
||||
if (this.route$.snapshot.paramMap.get('id') === 'new') {
|
||||
id = await DataSet.add(this.document, this.http$, this._data);
|
||||
} else {
|
||||
id = await DataSet.update(this.document, this._http, this._data);
|
||||
}
|
||||
this._router.navigate(['../../Detail', id], { relativeTo: this._route});
|
||||
*/
|
||||
const id = await DataSet.add(this.document, this.http$);
|
||||
// this._router.navigate(['../../Detail', id], { relativeTo: this._route});
|
||||
}
|
||||
generateNumber() {
|
||||
this.form.patchValue({
|
||||
|
||||
@@ -23,9 +23,14 @@
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="name">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Źródło</mat-header-cell>
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Nazwa</mat-header-cell>
|
||||
<mat-cell *matCellDef="let item">{{item.name}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="source">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header>Źródło</mat-header-cell>
|
||||
<mat-cell *matCellDef="let item">{{item.source}}</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||
<mat-row *matRowDef="let item; columns: displayedColumns;" [routerLink]="['Detail/', item.id]"></mat-row>
|
||||
|
||||
@@ -11,7 +11,7 @@ import { DataSet } from 'src/app/models/dataSet.model';
|
||||
styleUrls: ['./data-sets-list.component.scss']
|
||||
})
|
||||
export class DataSetsListComponent implements OnInit {
|
||||
displayedColumns = ['number', 'name'];
|
||||
displayedColumns = ['number', 'name', 'source'];
|
||||
dataSource!: MatTableDataSource<DataSet>;
|
||||
|
||||
@ViewChild(MatPaginator) paginator!: MatPaginator;
|
||||
|
||||
Reference in New Issue
Block a user