7 changed files with 94 additions and 31 deletions
@ -1,16 +0,0 @@ |
|||
import { TestBed } from '@angular/core/testing'; |
|||
|
|||
import { OrderingService } from './ordering.service'; |
|||
|
|||
describe('OrderingService', () => { |
|||
let service: OrderingService; |
|||
|
|||
beforeEach(() => { |
|||
TestBed.configureTestingModule({}); |
|||
service = TestBed.inject(OrderingService); |
|||
}); |
|||
|
|||
it('should be created', () => { |
|||
expect(service).toBeTruthy(); |
|||
}); |
|||
}); |
|||
@ -1,9 +0,0 @@ |
|||
import { Injectable } from '@angular/core'; |
|||
|
|||
@Injectable({ |
|||
providedIn: 'root' |
|||
}) |
|||
export class OrderingService { |
|||
|
|||
constructor() { } |
|||
} |
|||
@ -0,0 +1,17 @@ |
|||
|
|||
|
|||
<abp-modal [visible]="visible && !!order" (visibleChange)='visibleChange.emit($event)' > |
|||
<ng-template #abpHeader> |
|||
<h3>Modal Title</h3> |
|||
</ng-template> |
|||
|
|||
<ng-template #abpBody> |
|||
<p>Modal content</p> |
|||
</ng-template> |
|||
|
|||
<ng-template #abpFooter> |
|||
<button type="button" class="btn btn-secondary" abpClose>{{ |
|||
'AbpUi::Close' | abpLocalization |
|||
}}</button> |
|||
</ng-template> |
|||
</abp-modal> |
|||
@ -0,0 +1,22 @@ |
|||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; |
|||
import { OrderDto } from '../../../lib/proxy/orders'; |
|||
|
|||
@Component({ |
|||
selector: 'lib-order-detail', |
|||
templateUrl: './order-detail.component.html' |
|||
}) |
|||
export class OrderDetailComponent implements OnInit { |
|||
|
|||
@Input() |
|||
visible: boolean; |
|||
@Input() |
|||
order: OrderDto | undefined; |
|||
|
|||
@Output() readonly visibleChange = new EventEmitter<boolean>(); |
|||
|
|||
constructor() { } |
|||
|
|||
ngOnInit(): void { |
|||
} |
|||
|
|||
} |
|||
@ -1 +1,39 @@ |
|||
<p>orders works!</p> |
|||
|
|||
|
|||
<div class="card"> |
|||
<div class="card-header"> |
|||
<div class="row"> |
|||
<div class="col col-md-6"> |
|||
<h5 class="card-title">{{ 'AbpCatalog::Products' | abpLocalization }}</h5> |
|||
</div> |
|||
<div class="text-end col col-md-6"> |
|||
<button class="btn btn-primary">{{ 'AbpCatalog::NewProduct' | abpLocalization }}</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="card-body"> |
|||
<ngx-datatable [rows]="(list$ | async)" default> |
|||
<!-- TODO: localize column headers --> |
|||
<ngx-datatable-column name="OrderNo" prop="orderNo"></ngx-datatable-column> |
|||
<ngx-datatable-column name="OrderStatus" prop="orderStatus"></ngx-datatable-column> |
|||
<ngx-datatable-column name="OrderDate" prop="orderDate" > |
|||
<ng-template let-value="value" ngx-datatable-cell-template> |
|||
<span>{{ value | date }}</span> |
|||
</ng-template> |
|||
</ngx-datatable-column> |
|||
|
|||
<ngx-datatable-column name="Id" prop="id" > |
|||
<ng-template let-id="value" let-row="row" ngx-datatable-cell-template> |
|||
<abp-button (click)='openModal(id)'> |
|||
{{ 'AbpCatalog::Detail' | abpLocalization }} |
|||
</abp-button> |
|||
</ng-template> |
|||
</ngx-datatable-column> |
|||
|
|||
</ngx-datatable> |
|||
|
|||
|
|||
<lib-order-detail [(visible)]='isModalVisible' [order]='selectedOrder'> |
|||
</lib-order-detail> |
|||
</div> |
|||
</div> |
|||
|
|||
Loading…
Reference in new issue