Subversion Repositories SmartDukaan

Rev

Rev 28437 | Rev 32731 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<style>
.btn:hover, .btn:focus {
        color: grey;
        text-decoration: none;
}

.modal-dialog.modal-lg {
        left: 10%;
        right: auto;
        width: 80%;
}

.modal-content {
        background: white;
}

.border-highlight {
        border: 3px solid red;
}

td.highlight {
        background-color: yellowgreen !important;
}
</style>

<script>
        $(".cancel-pending-order").click(function() {
                $("#cancelOnlineOrder").modal({

                        backdrop : false
                });

        });

        $(".change-partner-po").click(function() {
                $("#changePartnerOnlineOrder").modal({

                        backdrop : false
                });

        });
</script>


<div id="pending-order-table">
        <div class="row">
                <div class="col-lg-12">

                        <table class="table table-border table-condensed table-bordered"
                                id="pending-order-item">
                                <thead>
                                        <tr>
                                                <th>OrderId</th>
                                                <th>First Name</th>
                                                <th>Last Name</th>
                                                <th>Mobile</th>
                                                <th>Order Status</th>
                                                <th>Partner</th>
                                                <th>Pay Method</th>
                                                <th>Pay Mode</th>
                                                <th>Order Item Id</th>
                                                <th>Item Id</th>
                                                <th>Item Details</th>
                                                <th>Selling Price</th>
                                                <th>Order Item Status</th>
                                                <th>Created on</th>
                                                <th>Verified On</th>
                                                <th>Billed On</th>
                                                <th>Delivered On</th>
                                                <th>Cancelled On</th>
                                                <th>Remarks</th>
                                                <th>Availability</th>
                                                <th>Verify</th>
                                                <th>Cancel</th>
                                                <th>Change Partner</th>

                                        </tr>
                                </thead>
                                <tbody>
                                        #if(!$pendingOrderItem.isEmpty()) #foreach( $request in
                                                $pendingOrderItem)
                                        <tr class="pendingOrder" data-poid="$request.getItemId()">
                                                <td>$request.getOrderId()</td>
                                                <td>$request.getPendingOrder().getCustomerAddress().getName()</td>
                                                #if($request.getPendingOrder().getCustomerAddress().getLastName())
                                                        <td>$request.getPendingOrder().getCustomerAddress().getLastName()</td>
                                                #else
                                                        <td></td> #end
                                                <td>$request.getPendingOrder().getCustomerAddress().getPhoneNumber()</td>
                                                <td>$request.getPendingOrder().getStatus()</td>
                                                #if($customRetailersMap.get($request.getPendingOrder().getFofoId()))
                                                        <td>$customRetailersMap.get($request.getPendingOrder().getFofoId()).getBusinessName()</td>
                                                #else
                                                <td></td> #end
                                                <td>$request.getPendingOrder().getPayMethodDescription()</td>
                                                #if($request.getPendingOrder().getTotalAmount() ==
                                                $request.getPendingOrder().getPaidAmount())
                                                <td>ONLINE</td> #else
                                                <td>OFFLINE</td> #end

                                                <td>$request.getId()</td>
                                                <td>$request.getItemId()</td>
                                                <td>$request.getItemName()</td>
                                                <td>$request.getSellingPrice()</td>
                                                <td>$request.getStatus()</td>
                                                <td>$request.getCreateTimestamp().format($dateTimeFormatter)</td>
                                                #if($request.getVerifiedTimestamp())
                                                <td>$request.getVerifiedTimestamp().format($dateTimeFormatter)</td>
                                                #else
                                                <td></td> #end #if($request.getBilledTimestamp())
                                                <td>$request.getBilledTimestamp().format($dateTimeFormatter)</td>
                                                #else
                                                <td></td> #end #if($request.getDeliveredTimestamp())
                                                <td>$request.getDeliveredTimestamp().format($dateTimeFormatter)</td>
                                                #else
                                                <td></td> #end #if($request.getCancelledTimestamp())
                                                <td>$request.getCancelledTimestamp().format($dateTimeFormatter)</td>
                                                #else
                                                <td></td> #end #if($request.getStatus() == "CANCELLED")
                                                #if($request.getRemark())
                                                <td>$request.getRemark()</td> #else
                                                <td></td> #end #else
                                                <td></td> #end
                                                #if($partnerInventoryMap.get($request.getPendingOrder().getFofoId()).get($request.getItemId()).getAvailability()>0)
                                                <td>$partnerInventoryMap.get($request.getPendingOrder().getFofoId()).get($request.getItemId()).getAvailability()
                                                </td> #else
                                                <td>out of stock</td> #end #if($request.getStatus() ==
                                                "PROCESSING" && !$request.getVerifiedTimestamp())
                                                <td>
                                                        <button class="btn btn-primary verify-order-item"
                                                                data-poitemid="$request.getId()" type="button"
                                                                style="width: 100%; border-radius: 0px;">Mark Verify</button>
                                                </td> #else
                                                <td></td> #end #if($request.getStatus() == "PROCESSING")
                                                <td>
                                                        <button class="btn btn-primary cancel-order-item"
                                                                data-poitemid="$request.getId()" type="button"
                                                                data-toggle="modal" data-target="#cancelOnlineOrder"
                                                                style="width: 100%; border-radius: 0px;">Cancel</button>
                                                </td> #else
                                                <td></td> #end #if($request.getStatus() == "PROCESSING")
                                                <td>
                                                        <button class="btn btn-primary change-partner"
                                                                data-poid="$request.getId()" type="button" data-toggle="modal"
                                                                data-target="#changePartnerOnlineOrder"
                                                                style="width: 100%; border-radius: 0px;">Change</button>
                                                </td> #else
                                                <td></td> #end

                                        </tr>
                                        #end
                                        <script type="text/javascript">
                                                $(document).ready(function() {
                                                        $('#pending-order-item').dataTable({
                                                                "scrollX" : true,
                                                                "scrollCollapse" : true

                                                        });
                                                });
                                        </script>
                                        #else
                                        <tr>
                                                <td colspan="12" style="text-align: center;">NO MATCHING DATA
                                                        FOUND FOR CRITERIA</td>
                                        </tr>
                                        #end
                                </tbody>
                        </table>
                </div>




        </div>
</div>


<div class="cancel-online-order-container">
        <div id="cancelOnlineOrder" class="modal" role="dialog">
                <div class="modal-dialog modal-md">
                        <!-- Modal content-->
                        <div class="modal-content" style="width: 700px;"></div>

                </div>
        </div>
</div>

<div class="change-partner-online-order-container">
        <div id="changePartnerOnlineOrder" class="modal" role="dialog">
                <div class="modal-dialog modal-md">
                        <!-- Modal content-->
                        <div class="modal-content" style="width: 700px;"></div>

                </div>
        </div>
</div>