This commit is contained in:
Le Deng
2017-03-11 09:48:00 -05:00
parent 98dabce14f
commit 0bbf20a027
2 changed files with 155 additions and 5 deletions

View File

@@ -19,7 +19,7 @@
<file leaf-file-name="CheckoutResource.java" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/main/java/com/bookstore/resource/CheckoutResource.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="303">
<state relative-caret-position="533">
<caret line="89" column="0" lean-forward="true" selection-start-line="89" selection-start-column="0" selection-end-line="89" selection-end-column="0" />
<folding>
<element signature="imports" expanded="true" />
@@ -984,12 +984,12 @@
<workItem from="1488378219247" duration="650000" />
<workItem from="1488461561430" duration="18419000" />
<workItem from="1488731165185" duration="30270000" />
<workItem from="1489159532831" duration="11257000" />
<workItem from="1489159532831" duration="11492000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="103539000" />
<option name="totallyTimeSpent" value="103774000" />
</component>
<component name="ToolWindowManager">
<frame x="72" y="23" width="1280" height="797" extended-state="0" />
@@ -1013,7 +1013,7 @@
<window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32907802" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32624114" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32624114" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Spring" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32907802" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32229403" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
@@ -1510,7 +1510,7 @@
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/bookstore/resource/CheckoutResource.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="303">
<state relative-caret-position="533">
<caret line="89" column="0" lean-forward="true" selection-start-line="89" selection-start-column="0" selection-end-line="89" selection-end-column="0" />
<folding>
<element signature="imports" expanded="true" />

View File

@@ -68,6 +68,156 @@
</div>
</md-tab>
<md-tab label="Orders">
<div class="panel-group">
<div class="panel panel-default panel-faq" style="border: none;">
<div class="panel-body" style="background-color: #ededed; margin-top: 20px;">
<table class="table table-sm table-inverse">
<thead>
<tr>
<th>Order Date</th>
<th>Order Number</th>
<th>Total</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let order of orderList">
<td>
<a th:href="@{/orderDetail(id=${order.id})}"><span
th:text="${order.orderDate}"></span></a>
</td>
<td>{{order.id}}</td>
<td>{{order.orderTotal}}</td>
<td>{{order.orderStatus}}</td>
</tr>
</tbody>
</table>
<div *ngIf="displayOrderDetail">
<div class="row">
<div class="col-xs-12">
<div class="text-center">
<h2>Order Detail for purchase #<span>{{order.id}}</span></h2>
</div>
<hr/>
<div class="row">
<div class="col-xs-4">
<div class="panel panel-default height">
<div class="panel-heading"><strong>Billing Details</strong>
</div>
<div class="panel-body">
<span>{{order.billingAddress.billingAddressName}}</span><br/>
<span>{{order.billingAddress.billingAddressStreet1}} {{order.billingAddress.billingAddressStreet2}}</span><br/>
<span>{{order.billingAddress.billingAddressCity}}</span><br/>
<span>{{order.billingAddress.billingAddressState}}</span><br/>
<span>{{order.billingAddress.billingAddressZipcode}}</span><br/>
</div>
</div>
</div>
<div class="col-xs-4">
<div class="panel panel-default height">
<div class="panel-heading"><strong>Payment Information</strong>
</div>
<div class="panel-body">
<span>{{order.payment.holderName}}</span><br/>
Visa<br/>
<span>{{order.payment.cardNumber}}</span><br/>
<span>Exp Date:</span> <span
>{{order.payment.expiryMonth}}</span>/<span
>{{order.payment.expiryYear}}</span><br/>
</div>
</div>
</div>
<div class="col-xs-4">
<div class="panel panel-default height">
<div class="panel-heading"><strong>Shipping Address</strong>
</div>
<div class="panel-body">
<span>{{order.shippingAddress.shippingAddressName}}</span><br/>
<span>{{order.shippingAddress.shippingAddressStreet1}}' '{{order.shippingAddress.shippingAddressStreet2}}</span><br/>
<span>{{order.shippingAddress.shippingAddressCity}}</span><br/>
<span>{{order.shippingAddress.shippingAddressState}}</span><br/>
<span>{{order.shippingAddress.shippingAddressZipcode}}</span><br/>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="text-center"><strong>Order summary</strong></h3>
</div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-condensed">
<thead>
<tr>
<td><strong>Item Name</strong></td>
<td class="text-center"><strong>Item Price</strong></td>
<td class="text-center"><strong>Item Quantity</strong>
</td>
<td class="text-right"><strong>Total</strong></td>
</tr>
</thead>
<tbody>
<tr *ngFor="let cartItem of cartItemList">
<td>{{cartItem.book.title}}
</td>
<td
class="text-center">{{cartItem.book.ourPrice}}
</td>
<td class="text-center">
{{cartItem.qty}}
</td>
<td
class="text-right">{{cartItem.subtotal}}
</td>
</tr>
<tr>
<td class="highrow"></td>
<td class="highrow"></td>
<td class="highrow text-center">
<strong>Subtotal</strong></td>
<td
class="highrow text-right">{{order.orderTotal}}
</td>
</tr>
<tr>
<td class="emptyrow"></td>
<td class="emptyrow"></td>
<td class="emptyrow text-center"><strong>Tax</strong>
</td>
<td
class="emptyrow text-right">{{order.orderTotal*0.06}}
</td>
</tr>
<tr>
<td class="emptyrow"><i
class="fa fa-barcode iconbig"></i></td>
<td class="emptyrow"></td>
<td class="emptyrow text-center"><strong>Total</strong>
</td>
<td
class="emptyrow text-right">{{order.orderTotal*1.06}}
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</md-tab>
<md-tab label="Billing">
<br>