Export excel sheer

This commit is contained in:
Michał Zieliński
2023-08-23 17:30:25 +02:00
parent ebf67b8d88
commit be8e156ca3
10 changed files with 32 additions and 38 deletions

View File

@@ -1,7 +1,11 @@
<form [formGroup]="form" novalidate>
<mat-card>
<mat-card-header>
<mat-card-title>Layer details</mat-card-title>
<mat-card-header style="display: block;">
<mat-card-title style="display:flex">
Layer details
<span style="flex: 1;"></span>
<button mat-button (click)="export()">Export</button>
</mat-card-title>
<mat-card-subtitle>&nbsp;</mat-card-subtitle>
</mat-card-header>
<mat-card-content>
@@ -21,15 +25,16 @@
</div>
<div class="row">
<div class="col">
<mat-form-field class="full-width" appearance="outline">
<mat-form-field class="full-width" appearance="outline" *ngIf="document">
<mat-label>Created</mat-label>
<input matInput disabled [value]="document?.created">
<input matInput disabled [value]="document.created">
</mat-form-field>
</div>
<div class="col"></div>
</div>
<table mat-table [dataSource]="dataSource" matSort matSortActive="code" matSortDisableClear matSortDirection="desc">
<table mat-table [dataSource]="dataSource" matSort matSortActive="code" matSortDisableClear
matSortDirection="desc">
<ng-container matColumnDef="code">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Code</th>
<td mat-cell *matCellDef="let row"> {{row.code}} </td>
@@ -41,7 +46,7 @@
<td mat-cell *matCellDef="let row"> {{row.value1 | number:'1.2-2'}} </td>
<td mat-footer-cell *matFooterCellDef><b>{{valueSum | number:'1.2-2'}}</b></td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns, sticky: true"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
<tr mat-footer-row *matFooterRowDef="displayedColumns"></tr>

View File

@@ -13,7 +13,6 @@ import { MatInputModule } from '@angular/material/input';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatGridListModule } from '@angular/material/grid-list';
import { MatButtonModule } from '@angular/material/button';
import { MatToolbarModule } from '@angular/material/toolbar';
import { MatCardModule } from '@angular/material/card';
@Component({
@@ -21,7 +20,7 @@ import { MatCardModule } from '@angular/material/card';
templateUrl: './layer-detail.component.html',
styleUrls: ['./layer-detail.component.scss'],
standalone: true,
imports: [FormsModule, ReactiveFormsModule, MatCardModule, MatToolbarModule,
imports: [FormsModule, ReactiveFormsModule, MatCardModule,
MatButtonModule, MatGridListModule, MatFormFieldModule, MatInputModule,
NgIf, MatTableModule, MatSortModule, DecimalPipe, JsonPipe],
providers: [DatePipe]

View File

@@ -59,9 +59,6 @@ export class LayersListComponent implements OnInit {
this.start = this.end;
this.end = this.limit + this.start;
}
trackByUid(index : number, item : Layer) {
return item.id;
}
async removeCode(code: string) {
const index = this.codes.indexOf(code);
if (index >= 0) {

View File

@@ -12,6 +12,10 @@
<mat-drawer #drawer mode="side" opened>
<diunabi-main-menu></diunabi-main-menu>
<mat-divider></mat-divider>
<small>
&nbsp;{{appVersion}}
</small>
<br>
<small>
&nbsp;&copy;&nbsp;DiunaBI {{currentDate | date: 'yyyy'}}
</small>
@@ -21,7 +25,6 @@
<mat-icon>menu</mat-icon>
</button>
{{environment.appName}}
<span style="font-size: x-small;">&nbsp;{{appVersion}}</span>
<div class="fill-space"></div>
<a mat-icon-button [matMenuTriggerFor]="userMenu">
<mat-icon *ngIf="!auth$.user.avatar">account_circle</mat-icon>

View File

@@ -39,29 +39,11 @@
flex: 1;
}
.fill-to-right {
flex: 1 1 auto;
}
.logo {
height: 4vh;
margin: 5px;
}
.sidenav-content {
flex-direction: column;
}
.mat-toolbar.mat-primary {
color: white;
}
.app-content {
flex: 1;
margin: 0 auto;
padding: 2em;
}
.profile-photo-small {
border-radius: 50%;
}

View File

@@ -7,8 +7,8 @@ export const environment = {
appName: "LOCAL_DiunaBI",
production: false,
api: {
//url: "http://localhost:5400/api"
url: "https://diunabi-morska.bim-it.pl/api"
url: "http://localhost:5400/api"
//url: "https://diunabi-morska.bim-it.pl/api"
},
google: {
clientId: "107631825312-bkfe438ehr9k9ecb2h76g802tj6advma.apps.googleusercontent.com"