Code: Select all
{
"PurchaseShipmentHeaders": [ {
"ShipmentID": 1,
"ShipmentType": "Receipt",
"VehicleNum": "truck1234",
"DateShipped": "2016-09-15",
"ChangeVersionID": 0,
"ShipHeaderStatusId": 1,
"OrgID": 36361,
"PackingList": null,
"WayBillNum": null,
"PurchaseShipLine": [ {
"ShipmentID": 1,
"ShipmentLineID": 1,
"AllocationID": 79303,
"ShipLineStatusID": 1,
"POID": 1,
"BizType": "B ",
"PurchaseShipLineWeight": [ {
"WgtTypeCode": "DW",
"AccountID": 942428,
"AccountWgtRefID": "12",
"GrossWgtLB": 79220,
"TareWgtLB": 33780,
"CleanTareWeight": 0,
"NetWgtLB": 45440,
"BizType": "B "
}],
"PurchaseShipLineAddtlCharge": null
}],
"PurchaseShipmentHeaderAddtlCharge": null,
"CreatedDate": "2016-09-15T18:45:10.3270000-04:00",
"LastUpdatedDate": "2016-09-15T18:45:10.3270000-04:00",
"BizType": "B "
}],
"CallingClientID": null,
"ValidationMessages": null,
"ApplicationID": 974,
"APICallBatchID": 0
}
Code: Select all
<template ngFor [ngForOf]="shipments" let-shipment>
<div>{{shipment.ShipmentID}}</div>
<li *ngFor="let PurchaseShipLine of shipment.PurchaseShipLine">
{{PurchaseShipLine.AllocationID}}
</li>
<li *ngFor="let PurchaseShipLine of shipment.PurchaseShipLine">
{{PurchaseShipLine.POID}}
</li>
</template>
Code: Select all
<p-dataTable #exportCSV [value]="shipments" [rows]="25" [paginator]="true" [rowsPerPageOptions]="[25,50,100]" [globalFilter]="globalFilter" resizableColumns="true" reorderableColumns="true" expandableRows="true">
<p-column field="ShipmentID" header="Shipment ID" [sortable]="true" [filter]="true" filterMatchMode="contains"></p-column>
<p-column field="ShipmentType" header="Shipment Type" [sortable]="true" [filter]="true" filterMatchMode="contains"></p-column>
<p-column field="VehicleNum" header="Vehicle Num" [sortable]="true" [filter]="true" filterMatchMode="contains"></p-column>
<p-column field="AllocationID" header="Allocation ID">
<template let-col let-shipment="rowData" pTemplate type="body">
<span>{{shipment[col.field]}}</span>
</template>
</p-column>
<p-column styleClass="col-button">
<template pTemplate type="header">
<button type="button" pButton icon="fa-refresh"></button>
</template>
<template let-shipment="rowData" pTemplate type="body">
<button type="button" pButton icon="fa-search"></button>
</template>
</p-column>
</p-dataTable>