Subversion Repositories SmartDukaan

Rev

Rev 36902 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<section class="wrapper">
    <div class="row">
        <div class="col-lg-12">
            <h3 class="page-header"><i class="icon_document_alt"></i>Requested Allocations</h3>
            <ol class="breadcrumb">
                <li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
                <li><i class="icon_document_alt"></i>Requested Allocations</li>
            </ol>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-12">
            <ul class="nav nav-tabs">
                <li class="active"><a data-toggle="tab" href="#pending">Pending</a></li>
                <li><a data-toggle="tab" href="#approved">Approved</a></li>
            </ul>
            <div class="tab-content">
                <div id="pending" class="tab-pane fade in active">
                    <table class="table table-bordered table-condensed pendingRequestedAllocationList"
                           style="width:100%">
                        <thead class="row htable" style="background:#F5F5F5;">
                        <tr style="color:black;">
                            <th>Partner Id</th>
                            <th>Partner Name</th>
                            <th>Catalog Id</th>
                            <th>Model Number</th>
                            <th>Brand</th>
                            <th>HID Qty</th>
                            <th>Bill/Act 5d</th>
                            <th>Current Qty</th>
                            <th>Excess/Short</th>
                            <th>Requested Qty</th>
                            <th>Requestor</th>
                            <th>Approver</th>
                            <th>Action</th>
                        </tr>
                        </thead>
                        <tbody>
                            #foreach($model in $pendingRequestedHidAllocations)
                            <tr>
                                <td> $model.getFofoId() </td>
                                <td> $userMap.get($model.getFofoId()).getName()
                                    - $fofoStoreMap.get($model.getFofoId()).getCode() </td>
                                <td> $model.getCatalogId() </td>
                                <td> $model.getModelNumber() </td>
                                <td> $model.getBrand() </td>
                                <td> $hidQtyMap.get($model.getId()) </td>
                                <td> $billActMap.get($model.getId()) </td>
                                <td> $currentQtyMap.get($model.getId()) </td>
                                #set($es = $excessShortMap.get($model.getId()))
                                <td>#if($es > 0)<span style="color:red;">+$es</span>#elseif($es < 0)<span style="color:green;">$es</span>#else<span>0</span>#end</td>
                                <td><input type="text" value="$model.getRequested_allocation()"
                                           class="reuested_allocation" disabled> <a role="button"> <i
                                        class="fa fa-edit edit-allocation"></i></a></td>
                                <td> $!model.getCreatedBy() </td>
                                <td> $!model.getApprovedBy() </td>
                                <td>
                                    <button class="btn btn-sm btn-success allocation-request-approve-reject"
                                            data-id="$model.getId()" data-status="true">Approve
                                    </button>
                                    /
                                    <button class="btn btn-sm btn-danger allocation-request-approve-reject"
                                            data-id="$model.getId()" data-status="false">Reject
                                    </button>
                                    /
                                    <button class="btn btn-sm btn-info allocation-request-edit"
                                            data-id="$model.getId()">Edit
                                    </button>
                                </td>
                            </tr>
                            #end
                        </tbody>
                    </table>
                    #if($pendingTotal > 0)
                    <div class="row">
                        <div class="col-lg-12">
                            <div class="pagination-wrapper">
                                <span class="pagination-info">Showing $pendingStartRecord - $pendingEndRecord of $pendingTotal</span>
                                <ul class="pagination pagination-sm">
                                    #if($pendingCurrentPage > 0)
                                        <li><a href="javascript:void(0)" class="pending-page-link" data-page="0">First</a></li>
                                        <li><a href="javascript:void(0)" class="pending-page-link" data-page="$pendingPrevPage">Prev</a></li>
                                    #else
                                        <li class="disabled"><span>First</span></li>
                                        <li class="disabled"><span>Prev</span></li>
                                    #end
                                    <li class="active"><span>Page $pendingCurrentPageDisplay of $pendingTotalPages</span></li>
                                    #if($pendingCurrentPage < $pendingLastPage)
                                        <li><a href="javascript:void(0)" class="pending-page-link" data-page="$pendingNextPage">Next</a></li>
                                        <li><a href="javascript:void(0)" class="pending-page-link" data-page="$pendingLastPage">Last</a></li>
                                    #else
                                        <li class="disabled"><span>Next</span></li>
                                        <li class="disabled"><span>Last</span></li>
                                    #end
                                </ul>
                                <select class="form-control page-size-select pending-page-size">
                                    <option value="25" #if($pendingPageSize == 25)selected#end>25 per page</option>
                                    <option value="50" #if($pendingPageSize == 50)selected#end>50 per page</option>
                                    <option value="100" #if($pendingPageSize == 100)selected#end>100 per page</option>
                                </select>
                            </div>
                        </div>
                    </div>
                    #end
                </div>
                <div id="approved" class="tab-pane fade">
                    <div class="row" style="margin:10px 0;">
                        <div class="col-lg-12">
                            <form class="form-inline approved-allocation-filter">
                                <label>Approved From</label>
                                <input type="date" class="form-control approved-from-date" value="$!approvedFromDate">
                                <label>To</label>
                                <input type="date" class="form-control approved-to-date" value="$!approvedToDate">
                                <button type="button" class="btn btn-primary approved-allocation-search">Search</button>
                            </form>
                        </div>
                    </div>
                    <table class="table table-bordered table-condensed approvedRequestedAllocationList"
                           style="width:100%">
                        <thead class="row htable" style="background:#F5F5F5;">
                        <tr style="color:black;">
                            <th>Partner Id</th>
                            <th>Partner Name</th>
                            <th>Catalog Id</th>
                            <th>Model Number</th>
                            <th>Brand</th>
                            <th>HID Qty</th>
                            <th>Bill/Act 5d</th>
                            <th>Current Qty</th>
                            <th>Excess/Short</th>
                            <th>Requested Qty</th>
                            <th>Requestor</th>
                            <th>Approver</th>
                            <th>Action</th>
                        </tr>
                        </thead>
                        <tbody>
                            #foreach($model in $approvedRequestedHidAllocations)
                            <tr>
                                <td> $model.getFofoId() </td>
                                <td> $userMap.get($model.getFofoId()).getName()
                                    - $fofoStoreMap.get($model.getFofoId()).getCode() </td>
                                <td> $model.getCatalogId() </td>
                                <td> $model.getModelNumber() </td>
                                <td> $model.getBrand() </td>
                                <td> $hidQtyMap.get($model.getId()) </td>
                                <td> $billActMap.get($model.getId()) </td>
                                <td> $currentQtyMap.get($model.getId()) </td>
                                #set($es = $excessShortMap.get($model.getId()))
                                <td>#if($es > 0)<span style="color:red;">+$es</span>#elseif($es < 0)<span style="color:green;">$es</span>#else<span>0</span>#end</td>
                                <td><input type="text" value="$model.getRequested_allocation()"
                                           class="reuested_allocation" disabled> <a role="button"> <i
                                        class="fa fa-edit edit-allocation"></i></a></td>
                                <td> $!model.getCreatedBy() </td>
                                <td> $!model.getApprovedBy() </td>
                                <td>
                                    <button class="btn btn-sm btn-danger allocation-request-approve-reject"
                                            data-id="$model.getId()" data-status="false">Reject
                                    </button>
                                    <button class="btn btn-sm btn-info allocation-request-edit"
                                            data-id="$model.getId()">Edit
                                    </button>
                                </td>
                            </tr>
                            #end
                        </tbody>
                    </table>
                    #if($approvedTotal > 0)
                    <div class="row">
                        <div class="col-lg-12">
                            <div class="pagination-wrapper">
                                <span class="pagination-info">Showing $approvedStartRecord - $approvedEndRecord of $approvedTotal</span>
                                <ul class="pagination pagination-sm">
                                    #if($approvedCurrentPage > 0)
                                        <li><a href="javascript:void(0)" class="allocation-page-link" data-page="0">First</a></li>
                                        <li><a href="javascript:void(0)" class="allocation-page-link" data-page="$approvedPrevPage">Prev</a></li>
                                    #else
                                        <li class="disabled"><span>First</span></li>
                                        <li class="disabled"><span>Prev</span></li>
                                    #end
                                    <li class="active"><span>Page $approvedCurrentPageDisplay of $approvedTotalPages</span></li>
                                    #if($approvedCurrentPage < $approvedLastPage)
                                        <li><a href="javascript:void(0)" class="allocation-page-link" data-page="$approvedNextPage">Next</a></li>
                                        <li><a href="javascript:void(0)" class="allocation-page-link" data-page="$approvedLastPage">Last</a></li>
                                    #else
                                        <li class="disabled"><span>Next</span></li>
                                        <li class="disabled"><span>Last</span></li>
                                    #end
                                </ul>
                                <select class="form-control page-size-select allocation-page-size">
                                    <option value="25" #if($approvedPageSize == 25)selected#end>25 per page</option>
                                    <option value="50" #if($approvedPageSize == 50)selected#end>50 per page</option>
                                    <option value="100" #if($approvedPageSize == 100)selected#end>100 per page</option>
                                </select>
                            </div>
                        </div>
                    </div>
                    #end
                </div>

            </div>
        </div>

    </div>

</section>

<script>

    // Both Pending and Approved tabs are server-paginated (50/page); no client-side DataTable.

</script>