-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adds order and order line brief view. * Adds order and order line detail view. * Adds link to acquisition menu. * Updates vendor html templates to use translate directive instead pipe on title label. Co-Authored-by: Laurent Dubois <laurent.dubois@itld-solutions.be>
- Loading branch information
Showing
22 changed files
with
1,060 additions
and
175 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
projects/admin/src/app/record/brief-view/acquisition-order-brief-view.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* RERO ILS UI | ||
* Copyright (C) 2019 RERO | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, version 3 of the License. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
import { Component, Input } from '@angular/core'; | ||
import { ResultItem } from '@rero/ng-core'; | ||
|
||
@Component({ | ||
selector: 'admin-acquisition-order-brief-view', | ||
template: ` | ||
<h5 class="mb-0 card-title"> | ||
<a [routerLink]="['/records', 'acq_orders', 'detail', record.metadata.pid]"> | ||
{{ record.metadata.order_number }} | ||
</a> | ||
</h5> | ||
`, | ||
styleUrls: [] | ||
}) | ||
export class AcquisitionOrderBriefViewComponent implements ResultItem { | ||
|
||
@Input() | ||
record: any; | ||
|
||
@Input() | ||
type: string; | ||
|
||
@Input() | ||
detailUrl: { link: string, external: boolean }; | ||
|
||
} |
92 changes: 92 additions & 0 deletions
92
...rd/detail-view/acquisition-order-detail-view/acquisition-order-detail-view.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
<!-- | ||
RERO ILS UI | ||
Copyright (C) 2019 RERO | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Affero General Public License as published by | ||
the Free Software Foundation, version 3 of the License. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU Affero General Public License for more details. | ||
You should have received a copy of the GNU Affero General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
--> | ||
<ng-container *ngIf="record$ | async as record"> | ||
<h1 class="mb-3">{{ record.metadata.order_number }}</h1> | ||
<article> | ||
<section class="m-2 p-2"> | ||
<dl class="row mb-0"> | ||
<!-- VENDOR --> | ||
<ng-container *ngIf="record.metadata.vendor"> | ||
<dt class="col-sm-3 offset-sm-2 offset-md-0 label-title" translate> | ||
Vendor | ||
</dt> | ||
<dd class="col-sm-7 col-md-8 mb-0"> | ||
{{ record.metadata.vendor.pid | getRecord: 'vendors' : 'field' : 'name' | async }} | ||
</dd> | ||
</ng-container> | ||
<!-- ORDER DATE --> | ||
<ng-container *ngIf="record.metadata.order_date"> | ||
<dt class="col-sm-3 offset-sm-2 offset-md-0 label-title" translate> | ||
Order date | ||
</dt> | ||
<dd class="col-sm-7 col-md-8 mb-0"> | ||
{{ record.metadata.order_date | dateTranslate :'shortDate' }} | ||
</dd> | ||
</ng-container> | ||
<!-- ORDER TYPE --> | ||
<ng-container *ngIf="record.metadata.order_type"> | ||
<dt class="col-sm-3 offset-sm-2 offset-md-0 label-title" translate> | ||
Order type | ||
</dt> | ||
<dd class="col-sm-7 col-md-8 mb-0"> | ||
{{ record.metadata.order_type | translate }} | ||
</dd> | ||
</ng-container> | ||
<!-- ORDER STATUS --> | ||
<ng-container *ngIf=""> | ||
<dt class="col-sm-3 offset-sm-2 offset-md-0 label-title" translate> | ||
Order status | ||
</dt> | ||
<dd class="col-sm-7 col-md-8 mb-0"> | ||
{{ record.metadata.order_status | translate }} | ||
</dd> | ||
</ng-container> | ||
<!-- DESCRIPTION --> | ||
<ng-container *ngIf="record.metadata.description"> | ||
<dt class="col-sm-3 offset-sm-2 offset-md-0 label-title" translate> | ||
Description | ||
</dt> | ||
<dd class="col-sm-7 col-md-8 mb-0"> | ||
{{ record.metadata.description }} | ||
</dd> | ||
</ng-container> | ||
<!-- CURRENCY --> | ||
<ng-container *ngIf="record.metadata.currency"> | ||
<dt class="col-sm-3 offset-sm-2 offset-md-0 label-title" translate> | ||
Currency | ||
</dt> | ||
<dd class="col-sm-7 col-md-8 mb-0"> | ||
{{ record.metadata.currency }} | ||
</dd> | ||
</ng-container> | ||
<!-- TOTAL AMOUNT --> | ||
<ng-container *ngIf="totalAmount$ | async as totalAmount"> | ||
<dt class="col-sm-3 offset-sm-2 offset-md-0 label-title" translate> | ||
Total amount | ||
</dt> | ||
<dd class="col-sm-7 col-md-8 mb-0"> | ||
{{ totalAmount | currency:record.metadata.currency:'symbol' }} | ||
</dd> | ||
</ng-container> | ||
</dl> | ||
</section> | ||
</article> | ||
|
||
<!-- Order lines --> | ||
<admin-acquisition-order-lines [order]="record" [orderLines$]="orderLines$" (deleteOrderLine)="deleteOrderLine($event)"> | ||
</admin-acquisition-order-lines> | ||
</ng-container> |
Oops, something went wrong.