[65] #REFACTOR 'Layout and Service'
LocationBasedServices/maptology/angular-time-sheet-feature This commit looks good
LocationBasedServices/maptology/angular-time-sheet-feature This commit looks good
{- Layout completely revised. Responsivness is now done through flex box.
- TimeSheetService functions cleaned up.}
This commit is contained in:
@@ -1,380 +1,170 @@
|
||||
<ng-container>
|
||||
<style>
|
||||
/* Styles for the work place table */
|
||||
.workplaces{
|
||||
margin-left: 16px;
|
||||
margin-right: 16px;
|
||||
}
|
||||
.cdk-column-address {
|
||||
width: 90%;
|
||||
text-align: start;
|
||||
}
|
||||
.cdk-column-delete {
|
||||
width: 10%;
|
||||
text-align: right;
|
||||
margin-right: 32px;
|
||||
}
|
||||
<div >
|
||||
<mat-toolbar style="display: flex; background:transparent;">
|
||||
<mat-icon style="margin-left: 5px;">access_time_icon</mat-icon>
|
||||
<span style="margin-left: 10px">{{ res.strings('time_sheet_title') }}</span>
|
||||
|
||||
/* Styles for the main time sheet table */
|
||||
.mat-column-date {
|
||||
word-wrap: break-word !important;
|
||||
white-space: unset !important;
|
||||
flex: 0 0 16% !important;
|
||||
width: 16% !important;
|
||||
overflow-wrap: break-word;
|
||||
word-wrap: break-word;
|
||||
word-break: break-word;
|
||||
-ms-hyphens: auto;
|
||||
-moz-hyphens: auto;
|
||||
-webkit-hyphens: auto;
|
||||
hyphens: auto;
|
||||
}
|
||||
.mat-column-to-time, .mat-column-from-time {
|
||||
word-wrap: break-word !important;
|
||||
white-space: unset !important;
|
||||
flex: 0 0 7% !important;
|
||||
width: 7% !important;
|
||||
overflow-wrap: break-word;
|
||||
word-wrap: break-word;
|
||||
word-break: break-word;
|
||||
-ms-hyphens: auto;
|
||||
-moz-hyphens: auto;
|
||||
-webkit-hyphens: auto;
|
||||
hyphens: auto;
|
||||
}
|
||||
.mat-column-time {
|
||||
word-wrap: break-word !important;
|
||||
white-space: unset !important;
|
||||
flex: 0 0 10% !important;
|
||||
width: 10% !important;
|
||||
overflow-wrap: break-word;
|
||||
word-wrap: break-word;
|
||||
word-break: break-word;
|
||||
-ms-hyphens: auto;
|
||||
-moz-hyphens: auto;
|
||||
-webkit-hyphens: auto;
|
||||
hyphens: auto;
|
||||
}
|
||||
.mat-column-device {
|
||||
word-wrap: break-word !important;
|
||||
white-space: unset !important;
|
||||
flex: 0 0 20% !important;
|
||||
width: 20% !important;
|
||||
overflow-wrap: break-word;
|
||||
word-wrap: break-word;
|
||||
word-break: break-word;
|
||||
-ms-hyphens: auto;
|
||||
-moz-hyphens: auto;
|
||||
-webkit-hyphens: auto;
|
||||
hyphens: auto;
|
||||
}
|
||||
.mat-column-place {
|
||||
word-wrap: break-word !important;
|
||||
white-space: unset !important;
|
||||
flex: 0 0 40% !important;
|
||||
width: 40% !important;
|
||||
overflow-wrap: break-word;
|
||||
word-wrap: break-word;
|
||||
word-break: break-word;
|
||||
-ms-hyphens: auto;
|
||||
-moz-hyphens: auto;
|
||||
-webkit-hyphens: auto;
|
||||
hyphens: auto;
|
||||
}
|
||||
</style>
|
||||
<div fxLayout="column" fxLayoutAlign="start stretch" fxFlexFill>
|
||||
<mat-toolbar style="background:transparent;">
|
||||
<mat-toolbar-row style="flex: 1 1 auto;">
|
||||
<div>
|
||||
<mat-icon style="margin-left: 5px;">access_time_icon</mat-icon>
|
||||
<span style="margin-left: 10px">{{ res.strings('time_sheet_title') }}</span>
|
||||
</div>
|
||||
<!-- TODO: Fix overflow bug caused by faulty mat icon fonts. -->
|
||||
<div flexLayout="row" fxLayoutAlign="end center" fxFlex="1 1 auto" fxLayoutGap="10px">
|
||||
<!-- <div style="display: flex; flex: 1 1 auto; justify-content: end;"> -->
|
||||
<button mat-icon-button
|
||||
[matTooltip]="res.strings('time_shet_update_btn_tooltip')"
|
||||
(click)="updateTimeSheetTable()">
|
||||
<mat-icon style="font-size: 18px;">update_icon</mat-icon>
|
||||
<!-- <mat-icon>update_icon</mat-icon> -->
|
||||
</button>
|
||||
|
||||
<div class="flex-spacer"></div>
|
||||
|
||||
<div>
|
||||
<button mat-icon-button style="padding-right: 10px;" (click)="updateTimeSheetTable()">
|
||||
<mat-icon>update_icon</mat-icon>
|
||||
</button>
|
||||
|
||||
<mat-menu #exportMenu="matMenu" class="mat-elevation-z1">
|
||||
<ng-template matMenuContent>
|
||||
<button mat-menu-item
|
||||
(click)="exportTimeSheet('csv')"
|
||||
[disabled]="!timeSheetService.isTimeSheetReady">as CSV</button>
|
||||
<button mat-menu-item
|
||||
(click)="exportTimeSheet('json')"
|
||||
[disabled]="!timeSheetService.isTimeSheetReady">as JSON</button>
|
||||
<!-- <button mat-menu-item
|
||||
(click)="exportTimeSheet('xml')"
|
||||
[disabled]="!timeSheetService.isTimeSheetReady">as XML</button> -->
|
||||
</ng-template>
|
||||
</mat-menu>
|
||||
<button mat-icon-button style="margin-right: 10px;" [matMenuTriggerFor]="exportMenu">
|
||||
<mat-icon>import_export</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-toolbar-row>
|
||||
</mat-toolbar>
|
||||
|
||||
<!-- Page Content -->
|
||||
<mat-sidenav-container style="flex: 1; overflow: hidden;">
|
||||
<mat-sidenav class="mat-elevation-z4" role="region" position="end" mode="side" disableClose
|
||||
[opened]="isSidenavOpened"
|
||||
style="border-radius: 10px;">
|
||||
<mat-list fxLayout="column" fxLayoutAlign="center" fxLayoutGap="10px"
|
||||
style="margin-bottom: 20px;">
|
||||
<mat-list-item fxLayoutAlign="center">
|
||||
<h3 mat-subheader>{{ res.strings('time_sheet_config_label') }}</h3>
|
||||
</mat-list-item>
|
||||
<mat-list-item fxLayoutAlign="center">
|
||||
<mat-button-toggle-group
|
||||
[(value)]="timeSheetService.grouped"
|
||||
name="groupingChoice"
|
||||
aria-label="Grouping Choice">
|
||||
<mat-button-toggle [value]="1">{{ res.strings('time_sheet_toggle_default_label') }}</mat-button-toggle>
|
||||
<mat-button-toggle [value]="2">{{ res.strings('time_sheet_toggle_acc_label') }}</mat-button-toggle>
|
||||
<mat-button-toggle [value]="3">{{ res.strings('time_sheet_toggle_by_days_label') }}</mat-button-toggle>
|
||||
<mat-button-toggle [value]="4" hidden>{{ res.strings('time_sheet_toggle_raw_label') }}</mat-button-toggle>
|
||||
</mat-button-toggle-group>
|
||||
</mat-list-item>
|
||||
</mat-list>
|
||||
<mat-list fxLayout="column" fxLayoutAlign="center" fxLayoutGap="10px">
|
||||
<mat-list-item fxLayoutAlign="center">
|
||||
<mat-form-field>
|
||||
<mat-label>{{ res.strings('time_sheet_select_device_label') }}</mat-label>
|
||||
<mat-select
|
||||
[(value)]="timeSheetService.device">
|
||||
<mat-option [value]="null">{{ res.strings('time_sheet_no_device_selected') }}</mat-option>
|
||||
<ng-container *ngIf="devices">
|
||||
<mat-option *ngFor="let device of devices" [value]="device">
|
||||
{{ device.model }}
|
||||
</mat-option>
|
||||
</ng-container>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</mat-list-item>
|
||||
<mat-list-item fxLayoutAlign="center">
|
||||
<mat-form-field>
|
||||
<mat-label>{{ res.strings('time_sheet_break_time_label') }}</mat-label>
|
||||
<mat-select
|
||||
[(value)]="timeSheetService.breakTime"
|
||||
[disabled]="timeSheetService.grouped > 1">
|
||||
<mat-option [value]="null">{{ res.strings('time_sheet_no_break_time_selected') }}</mat-option>
|
||||
<mat-option *ngFor="let opt of breakTimeOptions" [value]="opt">
|
||||
{{ opt }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</mat-list-item>
|
||||
<mat-list-item fxLayoutAlign="center">
|
||||
<mat-form-field>
|
||||
<input matInput
|
||||
[placeholder]="res.strings('time_sheet_time_period_label')"
|
||||
[satDatepicker]="picker"
|
||||
[value]="timeSheetService.dateRange"
|
||||
(dateChange)="timeSheetService.dateRange = $event.target.value">
|
||||
<sat-datepicker #picker [rangeMode]="true" orderPeriodLabel="month"></sat-datepicker>
|
||||
<sat-datepicker-toggle matSuffix [for]="picker"></sat-datepicker-toggle>
|
||||
</mat-form-field>
|
||||
</mat-list-item>
|
||||
</mat-list>
|
||||
<mat-divider role="seperator" style="margin: 16px;"></mat-divider>
|
||||
<mat-list fxLayout="column" fxLayoutAlign="center">
|
||||
<mat-list-item fxLayoutAlign="center">
|
||||
<button mat-subheader mat-button (click)="openWorkPlacesDialog()">
|
||||
<mat-icon class="icon-button">list_icon</mat-icon>
|
||||
<span>{{ res.strings('time_sheet_workplace_button') }}</span>
|
||||
<mat-menu #exportMenu="matMenu" class="mat-elevation-z1">
|
||||
<ng-template matMenuContent>
|
||||
<button mat-menu-item
|
||||
(click)="exportTimeSheet('csv')"
|
||||
[disabled]="!timeSheetService.isTimeSheetReady">
|
||||
{{ res.strings('time_shet_export_as_csv_label') }}
|
||||
</button>
|
||||
</mat-list-item>
|
||||
<ng-container *ngIf="workPlaces.length > 0">
|
||||
<mat-divider role="seperator" style="margin: 16px;"></mat-divider>
|
||||
|
||||
<table #workPlacesTable cdk-table class="workplaces" [dataSource]="workPlaces">
|
||||
|
||||
<ng-container matColumnDef="address">
|
||||
<th cdk-header-cell *cdkHeaderCellDef>Address</th>
|
||||
<td cdk-cell *cdkCellDef="let workPlace">
|
||||
{{ getWorkplaceName(workPlace) }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="delete">
|
||||
<th cdk-header-cell *cdkHeaderCellDef>Delete</th>
|
||||
<td cdk-cell *cdkCellDef="let workPlace"
|
||||
(click)="deleteWorkPlaceEntry(workPlace)">
|
||||
<mat-icon class="icon-button">delete_icon</mat-icon>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr cdk-row
|
||||
*cdkRowDef="let workplaceRow; columns: ['address', 'delete']"
|
||||
fxLayout="row"
|
||||
fxLayoutAlign="center center"></tr>
|
||||
</table>
|
||||
|
||||
<mat-divider role="seperator" style="margin: 16px;"></mat-divider>
|
||||
|
||||
<button mat-button (click)="clearWorkPlaceList()" color="primary">
|
||||
<mat-icon class="icon-button" style="margin-left: 12px">delete_icon</mat-icon>
|
||||
<span>{{ res.strings('time_sheet_workplace_clear_list') }}</span>
|
||||
<button mat-menu-item
|
||||
(click)="exportTimeSheet('json')"
|
||||
[disabled]="!timeSheetService.isTimeSheetReady">
|
||||
{{ res.strings('time_shet_export_as_json_label') }}
|
||||
</button>
|
||||
</ng-template>
|
||||
</mat-menu>
|
||||
<button mat-icon-button
|
||||
[matMenuTriggerFor]="exportMenu"
|
||||
[matTooltip]="res.strings('time_shet_export_btn_tooltip')">
|
||||
<mat-icon >import_export</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-toolbar>
|
||||
|
||||
<!-- Configuration Side Panel -->
|
||||
<div class="timesheet-container">
|
||||
<div class="timesheet-config">
|
||||
<mat-list class="config-col">
|
||||
<h3 mat-subheader class="flex-center">{{ res.strings('time_sheet_config_label') }}</h3>
|
||||
<mat-list-item class="flex-center toggle-btn">
|
||||
<mat-button-toggle-group
|
||||
[(value)]="timeSheetService.grouped"
|
||||
name="groupingChoice"
|
||||
aria-label="Grouping Choice">
|
||||
<mat-button-toggle [value]="1" [matTooltip]="res.strings('time_sheet_toggle_default_tooltip')">
|
||||
{{ res.strings('time_sheet_toggle_default_label') }}</mat-button-toggle>
|
||||
<mat-button-toggle [value]="2" [matTooltip]="res.strings('time_sheet_toggle_acc_tooltip')">
|
||||
{{ res.strings('time_sheet_toggle_acc_label') }}</mat-button-toggle>
|
||||
<mat-button-toggle [value]="3" [matTooltip]="res.strings('time_sheet_toggle_by_days_tooltip')">
|
||||
{{ res.strings('time_sheet_toggle_by_days_label') }}</mat-button-toggle>
|
||||
<mat-button-toggle [value]="4" [matTooltip]="res.strings('time_sheet_toggle_raw_tooltip')" hidden>
|
||||
{{ res.strings('time_sheet_toggle_raw_label') }}</mat-button-toggle>
|
||||
</mat-button-toggle-group>
|
||||
</mat-list-item>
|
||||
<mat-form-field class="config-item" [matTooltip]="res.strings('time_sheet_select_device_tooltip')">
|
||||
<mat-label>{{ res.strings('time_sheet_select_device_label') }}</mat-label>
|
||||
<mat-select
|
||||
[(value)]="timeSheetService.device">
|
||||
<mat-option [value]="null">{{ res.strings('time_sheet_no_device_selected') }}</mat-option>
|
||||
<ng-container *ngIf="devices">
|
||||
<mat-option *ngFor="let device of devices" [value]="device">
|
||||
{{ device.model }}
|
||||
</mat-option>
|
||||
</ng-container>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field class="config-item" [matTooltip]="res.strings('time_sheet_break_time_tooltip')">
|
||||
<mat-label>{{ res.strings('time_sheet_break_time_label') }}</mat-label>
|
||||
<mat-select
|
||||
[(value)]="timeSheetService.breakTime"
|
||||
[disabled]="timeSheetService.grouped > 2">
|
||||
<mat-option [value]="null">{{ res.strings('time_sheet_no_break_time_selected') }}</mat-option>
|
||||
<mat-option *ngFor="let opt of breakTimeOptions" [value]="opt">
|
||||
{{ opt + ' ' + res.strings('time_sheet_break_time_minutes') }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field class="config-item" [matTooltip]="res.strings('time_sheet_time_period_tooltip')">
|
||||
<input matInput
|
||||
[placeholder]="res.strings('time_sheet_time_period_label')"
|
||||
[satDatepicker]="picker"
|
||||
[value]="timeSheetService.dateRange"
|
||||
(dateChange)="timeSheetService.dateRange = $event.target.value">
|
||||
<sat-datepicker #picker [rangeMode]="true" orderPeriodLabel="month"></sat-datepicker>
|
||||
<sat-datepicker-toggle matSuffix [for]="picker"></sat-datepicker-toggle>
|
||||
</mat-form-field>
|
||||
</mat-list>
|
||||
|
||||
<mat-divider class="divider"></mat-divider>
|
||||
|
||||
<mat-list class="config-col">
|
||||
<button mat-subheader mat-button class="config-item" (click)="openWorkPlacesDialog()">
|
||||
<mat-icon class="icon-button">list_icon</mat-icon>
|
||||
<span>{{ res.strings('time_sheet_workplace_button') }}</span>
|
||||
</button>
|
||||
<ng-container *ngIf="workPlaces.length > 0">
|
||||
<mat-divider class="divider"></mat-divider>
|
||||
|
||||
<div class="config-item" *ngFor="let workPlace of workPlaces">
|
||||
<button mat-icon-button (click)="deleteWorkPlaceEntry(workPlace)">
|
||||
<mat-icon class="icon-button">clear_icon</mat-icon>
|
||||
</button>
|
||||
<span fxLayoutAlign="center" fxFlex="1 1 auto">{{ getWorkplaceName(workPlace) }}</span>
|
||||
</div>
|
||||
|
||||
<mat-divider class="divider"></mat-divider>
|
||||
|
||||
<button mat-button style="margin-bottom: 10px;" (click)="clearWorkPlaceList()" color="primary">
|
||||
<mat-icon class="icon-button" style="margin-left: 12px">delete_icon</mat-icon>
|
||||
<span>{{ res.strings('time_sheet_workplace_clear_list') }}</span>
|
||||
</button>
|
||||
</ng-container>
|
||||
</mat-list>
|
||||
</div>
|
||||
|
||||
<!-- Table Content -->
|
||||
<ng-container *ngIf="false">
|
||||
<mat-progress-bar mode="indeterminate" color="accent"></mat-progress-bar>
|
||||
</ng-container>
|
||||
<mat-card class="main-content mat-elevation-z2">
|
||||
<mat-card-content>
|
||||
<table mat-table #timeSheet class="main-table" [dataSource]="timeSheetDataSource" matSort>
|
||||
|
||||
<ng-container matColumnDef="date">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header="date">{{ res.strings('time_sheet_table_date') }}</th>
|
||||
<td mat-cell *matCellDef="let data">{{ getDate(data) }}</td>
|
||||
</ng-container>
|
||||
</mat-list>
|
||||
</mat-sidenav>
|
||||
|
||||
<mat-sidenav-content>
|
||||
<!-- Responsive Sidenav for mobile devices. -->
|
||||
<ng-container *ngIf="!isSidenavOpened">
|
||||
<mat-card class="mat-elevation-z4" style="margin: 4px;">
|
||||
<mat-card-content>
|
||||
<mat-list fxLayout="column" fxLayoutAlign="center" fxLayoutGap="10px">
|
||||
<mat-list-item fxLayoutAlign="center">
|
||||
<h3 mat-subheader>{{ res.strings('time_sheet_config_label') }}</h3>
|
||||
</mat-list-item>
|
||||
<mat-list-item fxLayoutAlign="center">
|
||||
<mat-button-toggle-group
|
||||
[(value)]="timeSheetService.grouped"
|
||||
name="groupingChoice"
|
||||
aria-label="Grouping Choice">
|
||||
<mat-button-toggle [value]="1">{{ res.strings('time_sheet_toggle_default_label') }}</mat-button-toggle>
|
||||
<mat-button-toggle [value]="2">{{ res.strings('time_sheet_toggle_acc_label') }}</mat-button-toggle>
|
||||
</mat-button-toggle-group>
|
||||
</mat-list-item>
|
||||
<mat-list-item fxLayoutAlign="center">
|
||||
<mat-form-field>
|
||||
<mat-label>{{ res.strings('time_sheet_select_device_label') }}</mat-label>
|
||||
<mat-select
|
||||
[(value)]="timeSheetService.device">
|
||||
<mat-option [value]="null">{{ res.strings('time_sheet_no_device_selected') }}</mat-option>
|
||||
<ng-container *ngIf="devices">
|
||||
<mat-option *ngFor="let device of devices" [value]="device">
|
||||
{{ device.model }}
|
||||
</mat-option>
|
||||
</ng-container>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</mat-list-item>
|
||||
<mat-list-item fxLayoutAlign="center">
|
||||
<mat-form-field>
|
||||
<mat-label>{{ res.strings('time_sheet_break_time_label') }}</mat-label>
|
||||
<mat-select
|
||||
[(value)]="timeSheetService.breakTime"
|
||||
[disabled]="timeSheetService.grouped > 1">
|
||||
<mat-option [value]="null">{{ res.strings('time_sheet_no_break_time_selected') }}</mat-option>
|
||||
<mat-option *ngFor="let opt of breakTimeOptions" [value]="opt">
|
||||
{{ opt }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</mat-list-item>
|
||||
<mat-list-item fxLayoutAlign="center">
|
||||
<mat-form-field>
|
||||
<input matInput
|
||||
[placeholder]="res.strings('time_sheet_time_period_label')"
|
||||
[satDatepicker]="picker"
|
||||
[value]="timeSheetService.dateRange"
|
||||
(dateChange)="timeSheetService.dateRange = $event.target.value">
|
||||
<sat-datepicker #picker [rangeMode]="true" orderPeriodLabel="month"></sat-datepicker>
|
||||
<sat-datepicker-toggle matSuffix [for]="picker"></sat-datepicker-toggle>
|
||||
</mat-form-field>
|
||||
</mat-list-item>
|
||||
</mat-list>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card class="mat-elevation-z4" style="margin: 4px;">
|
||||
<mat-card-content>
|
||||
<mat-list fxLayout="column" fxLayoutAlign="center" fxLayoutGap="10px">
|
||||
<mat-list-item fxLayoutAlign="center">
|
||||
<button mat-subheader mat-button (click)="openWorkPlacesDialog()">
|
||||
<mat-icon class="icon-button" style="margin-left: 4px">list_icon</mat-icon>
|
||||
<span>{{ res.strings('time_sheet_workplace_button') }}</span>
|
||||
</button>
|
||||
</mat-list-item>
|
||||
</mat-list>
|
||||
<ng-container *ngIf="workPlaces.length > 0">
|
||||
<table #workPlacesTable cdk-table class="workplaces" [dataSource]="workPlaces">
|
||||
|
||||
<ng-container matColumnDef="address">
|
||||
<td cdk-cell *cdkCellDef="let workPlace">
|
||||
{{ getWorkplaceName(workPlace) }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="delete">
|
||||
<td cdk-cell *cdkCellDef="let workPlace"
|
||||
(click)="deleteWorkPlaceEntry(workPlace)">
|
||||
<mat-icon class="icon-button">delete_icon</mat-icon>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr cdk-row
|
||||
*cdkRowDef="let workplaceRow; columns: ['address', 'delete']"
|
||||
fxLayout="row"
|
||||
fxLayoutAlign="center center"></tr>
|
||||
</table>
|
||||
<mat-list fxLayout="column" fxLayoutAlign="center" fxLayoutGap="10px">
|
||||
<mat-list-item fxLayoutAlign="center">
|
||||
<button mat-button color="primary" (click)="clearWorkPlaceList()">
|
||||
<mat-icon class="icon-button" style="margin-left: 4px">delete_icon</mat-icon>
|
||||
<span>{{ res.strings('time_sheet_workplace_clear_list') }}</span>
|
||||
</button>
|
||||
</mat-list-item>
|
||||
</mat-list>
|
||||
</ng-container>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="from-time">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ res.strings('time_sheet_table_from') }}</th>
|
||||
<td mat-cell *matCellDef="let data">
|
||||
{{ data.beginDate | date:'H:mm' }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Table Content -->
|
||||
<ng-container *ngIf="false">
|
||||
<mat-progress-bar mode="indeterminate" color="accent"></mat-progress-bar>
|
||||
</ng-container>
|
||||
<mat-card class="main-content mat-elevation-z4">
|
||||
<mat-card-content>
|
||||
<table mat-table #timeSheet [dataSource]="timeSheetDataSource" matSort>
|
||||
<ng-container matColumnDef="to-time">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ res.strings('time_sheet_table_to') }}</th>
|
||||
<td mat-cell *matCellDef="let data">
|
||||
{{ data.endDate | date:'H:mm' }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="date">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header="date">{{ res.strings('time_sheet_table_date') }}</th>
|
||||
<td mat-cell *matCellDef="let data">{{ getDate(data) }}</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="time">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ res.strings('time_sheet_table_working_time') }}</th>
|
||||
<td mat-cell *matCellDef="let data">{{ getWorkingTime(data.workingTime) }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="from-time">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ res.strings('time_sheet_table_from') }}</th>
|
||||
<td mat-cell *matCellDef="let data">
|
||||
{{ data.beginDate | date:'H:mm' }}
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="place">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ res.strings('time_sheet_table_place') }}</th>
|
||||
<td mat-cell *matCellDef="let data">{{ getWorkplaceString(data) }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="to-time">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ res.strings('time_sheet_table_to') }}</th>
|
||||
<td mat-cell *matCellDef="let data">
|
||||
{{ data.endDate | date:'H:mm' }}
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="device">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ res.strings('time_sheet_table_device') }}</th>
|
||||
<td mat-cell *matCellDef="let data">{{ getDeviceNameString(data) }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="time">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ res.strings('time_sheet_table_working_time') }}</th>
|
||||
<td mat-cell *matCellDef="let data">{{ getWorkingTime(data.workingTime) }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="place">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ res.strings('time_sheet_table_place') }}</th>
|
||||
<td mat-cell *matCellDef="let data">{{ getWorkplaceString(data) }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="device">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ res.strings('time_sheet_table_device') }}</th>
|
||||
<td mat-cell *matCellDef="let data">{{ getDeviceNameString(data) }}</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||
</table>
|
||||
<mat-paginator #paginator [pageSizeOptions]="[10, 20, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</mat-sidenav-content>
|
||||
</mat-sidenav-container>
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||
</table>
|
||||
<mat-paginator #paginator [pageSizeOptions]="[10, 20, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
Reference in New Issue
Block a user