first commit
This commit is contained in:
@@ -0,0 +1,162 @@
|
||||
<div class="container" fxLayout="row" fxLayoutAlign="center none">
|
||||
<div fxFlex="95%">
|
||||
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<mat-card-title>New Sale</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<div fxLayout="row" fxLayoutGap="5px">
|
||||
<mat-form-field>
|
||||
<mat-label>Url</mat-label>
|
||||
<input matInput placeholder="Ex. https://drouot.com/..." maxlength="255" st [(ngModel)]="url" >
|
||||
</mat-form-field>
|
||||
<button mat-raised-button color="primary" (click)="openLoadingSale()">Add</button>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
||||
<mat-card style="margin-top: 10px;">
|
||||
<mat-card-header>
|
||||
<mat-card-title>Sales</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<mat-tab-group>
|
||||
<mat-tab>
|
||||
<ng-template mat-tab-label>
|
||||
Current Sales
|
||||
<span matBadge="{{futureSales.length}}" matBadgeOverlap="false" style="margin: 5px;"> </span>
|
||||
</ng-template>
|
||||
<div fxLayout="row" fxLayoutGap="5px">
|
||||
|
||||
<table mat-table [dataSource]="futureSales" class="mat-elevation-z8">
|
||||
|
||||
<!--- Note that these columns can be defined in any order.
|
||||
The actual rendered columns are set as a property on the row definition" -->
|
||||
|
||||
<!-- Title Column -->
|
||||
<ng-container matColumnDef="title">
|
||||
<th mat-header-cell *matHeaderCellDef> Title </th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<a href="{{element.url}}" target="_blank">{{element.title}}</a>
|
||||
<div *ngIf="element.status == 'following'">
|
||||
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Date Column -->
|
||||
<ng-container matColumnDef="date">
|
||||
<th mat-header-cell *matHeaderCellDef> Date </th>
|
||||
<td mat-cell *matCellDef="let element"> {{element.date | date:'dd/MM/yyyy' }} - {{element.date | date:'HH:mm'}} </td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Sale House Column -->
|
||||
<ng-container matColumnDef="house">
|
||||
<th mat-header-cell *matHeaderCellDef> Sale House </th>
|
||||
<td mat-cell *matCellDef="let element"> {{element.saleHouseName}} </td>
|
||||
</ng-container>
|
||||
|
||||
<!-- PLateform House Column -->
|
||||
<ng-container matColumnDef="plateform">
|
||||
<th mat-header-cell *matHeaderCellDef> Plateforme </th>
|
||||
<td mat-cell *matCellDef="let element"> Interencheres </td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Prepare Column -->
|
||||
<ng-container matColumnDef="prepare">
|
||||
<th mat-header-cell *matHeaderCellDef> Prepare </th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<button *ngIf="element.status == 'ready'" mat-button (click)="prepareSale(element)"><mat-icon>format_list_numbered</mat-icon></button>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Follow Column -->
|
||||
<ng-container matColumnDef="follow">
|
||||
<th mat-header-cell *matHeaderCellDef> Follow </th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<button *ngIf="element.status == 'ready'" mat-button (click)="followSale(element)"><mat-icon>play_arrow</mat-icon></button>
|
||||
<button *ngIf="element.status == 'following'" mat-button (click)="stopFollowSale(element)"><mat-icon>stop</mat-icon></button>
|
||||
<div *ngIf="element.status == 'askStop'"><mat-progress-bar mode="indeterminate"></mat-progress-bar></div>
|
||||
</ng-container>
|
||||
|
||||
<!-- Delete Column -->
|
||||
<ng-container matColumnDef="delete">
|
||||
<th mat-header-cell *matHeaderCellDef> Delete </th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<button mat-button (click)="deleteSale(element._id)"><mat-icon>delete</mat-icon></button>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</mat-tab>
|
||||
|
||||
|
||||
<mat-tab label="Old Sales">
|
||||
<div fxLayout="row" fxLayoutGap="5px">
|
||||
<table mat-table [dataSource]="pastSales" class="mat-elevation-z8">
|
||||
|
||||
<!--- Note that these columns can be defined in any order.
|
||||
The actual rendered columns are set as a property on the row definition" -->
|
||||
|
||||
<!-- Title Column -->
|
||||
<ng-container matColumnDef="title">
|
||||
<th mat-header-cell *matHeaderCellDef> Title </th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<a (click)="navigateToSaleDetail(element._id)">{{element.title}}</a>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Date Column -->
|
||||
<ng-container matColumnDef="date">
|
||||
<th mat-header-cell *matHeaderCellDef> Date </th>
|
||||
<td mat-cell *matCellDef="let element"> {{element.date | date:'dd/MM/yyyy' }} - {{element.date | date:'HH:mm'}} </td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Sale House Column -->
|
||||
<ng-container matColumnDef="house">
|
||||
<th mat-header-cell *matHeaderCellDef> Sale House </th>
|
||||
<td mat-cell *matCellDef="let element"> {{element.saleHouseName}} </td>
|
||||
</ng-container>
|
||||
|
||||
<!-- PLateform House Column -->
|
||||
<ng-container matColumnDef="plateform">
|
||||
<th mat-header-cell *matHeaderCellDef> Plateforme </th>
|
||||
<td mat-cell *matCellDef="let element"> Interencheres </td>
|
||||
</ng-container>
|
||||
|
||||
<!-- PostProcessing Column -->
|
||||
<ng-container matColumnDef="postProcessing">
|
||||
<th mat-header-cell *matHeaderCellDef> Post Processing </th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<button mat-button (click)="postProcessing(element._id)"><mat-icon>query_stats</mat-icon></button>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Delete Column -->
|
||||
<ng-container matColumnDef="delete">
|
||||
<th mat-header-cell *matHeaderCellDef> Delete </th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<button mat-button (click)="deleteSale(element._id)"><mat-icon>delete</mat-icon></button>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumnsOld"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumnsOld;"></tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</mat-tab>
|
||||
|
||||
</mat-tab-group>
|
||||
|
||||
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user