Subversion Repositories SmartDukaan

Rev

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

<script type="text/javascript">
        $(document).ready(function () {
                getEntityAheadOptions($("#typeaheaditem"), function (selectedEntity) {
                        itemCatalogId = selectedEntity.catalogId_i;
                });
        });
</script>




<section class="wrapper">
        <div class="row">
                <div class="col-lg-12">
                        <h3 class="page-header"><i class="icon_document_alt"></i>FOCUSED MODEL</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>Model</li> 
                                </ol>
                </div>
        </div>
                <form>
                        <div class="row">
                                <div class="col-lg-2">
                                        <label class="control-label" for="excelfile">Activated IMEIs upload:</label>
                                </div>
                            <div class="col-lg-3">
                                <div class="input-group">
                                        <input class="form-control" type="file" id="imeiactivations" name="uploadfile">
                                        <span class="input-group-btn">
                                                <button class="btn btn-default imeiactivationsupload">
                                                            Uplaod
                                                        </button>
                                                </span>
                                        </div>
                                </div>
                </div>
            </form>
        
                <form id="focused-model-form">
                <div id="model-detail" style="background:white;background-color:white;padding:10px;">
                        
                        <div>
                                <div class = "row">
                                <div class="col-lg-4 form-group">
                                          <input placeholder="Search Item" type="text" class="form-control typeahead" id="typeaheaditem" name="Item" data-provide="typeahead" autocomplete="off">
                                        </div>
                                        
                                        <div class="col-lg-2 form-group">
                                                <input placeholder="Recommended" id="recommended" name="recommended" type="number" value="" class="form-control input-sm">
                                        </div>
                                        
                                        <div class="col-lg-2 form-group">
                                                <input placeholder="Minimum Quantity" id="minimumQuantity" name="minimumQuantity" type="number" value="" class="form-control input-sm">
                                        </div>
                                        
                                        
                                        <div class="col-lg-2 form-group">
                                                <input placeholder="Observable Recommended" id="obvrecommended" name="obvrecommended" type="number" value="" class="form-control input-sm">
                                        </div>
                                        
                                        <div class="col-lg-2 form-group">
                                                <input placeholder="Observable Minimum Quantity" id="obvminimumQuantity" name="obvminimumQuantity" type="number" value="" class="form-control input-sm">
                                        </div>
                                        
                                        </div>
                                        
                                        <div class = "row">
                                                <div class="col-lg-2">
                                                <select class="form-control input-sm" id = "regionType" name = "regionType">
                                                        <option value="" disabled selected>Region Type</option>
                                                        #foreach($region in $regions)
                                                                <option value="$region.getId()">$region.getName()</option>
                                                        #end
                                                </select>
                                                </div>


                                                <div class="col-lg-2">
                                                        <input class="btn btn-primary add-model" type="button" value="Add">
                                                </div>


                                                <div class="col-lg-3">
                                                        <input class="btn btn-primary send-po-notification" type="button" value="Send Notification">
                                                </div>

                                        </div>


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

        <div id="focused-model-table">
                <div class="row">
                <div class="col-lg-12">
                                <table class="table table-striped table-advance table-hover" id="focusTable">
                    <thead>
                        <tr>
                                                        <th>Item Name</th>
                            <th>Recommended Quantity </th>
                            <th>Minimum Quantity</th>
                            <th>Observable Recommended Quantity</th>
                            <th>Observable Minimum Quantity</th>
                            <th>Region</th>
                            <th>Created</th>
                            <th>Remove</th>
                        </tr>
                    </thead>
                                <tbody>
                                                #if (!$focusedModels.isEmpty())
                                                        #foreach ($focusedModel in $focusedModels)
                                                        <tr class="focused-item-info" data-request-id="$focusedModel.getId()">
                                                                <td>
                                                                        $itemMap.get($focusedModel.getCatalogId()).getBrand()
                                                                        $itemMap.get($focusedModel.getCatalogId()).getModelName()
                                                                        $itemMap.get($focusedModel.getCatalogId()).getModelNumber()
                                                                        ($itemMap.get($focusedModel.getCatalogId()).getCatalogItemId())
                                                                </td>
                                                                <td>$focusedModel.getRecommendedQty()</td>
                                                                <td>$focusedModel.getMinimumQty()</td>
                                                                <td>$focusedModel.getObsRecommendedQty()</td>
                                                                <td>$focusedModel.getObsMinimumQty()</td>
                                                                <td>$regionMap.get($focusedModel.getRegionId()).getName()</td>
                                                                <td>$focusedModel.getCreatedTimestamp().format($dateTimeFormatter)</td>
                                                                <td>
                                                                        <button
                                                                                        class="btn btn-primary remove-model"
                                                                                        data-requestid="$focusedModel.getId()"
                                                                                        type="button">
                                                                                Remove
                                                                        </button>
                                                                </td>
                                                        </tr>
                                                        #end
                                                #else
                                                <tr>
                                                        <td colspan="8">No focused models available.</td>
                                                </tr>
                                                #end

                                        </tbody>
                        </table>
                </div>
            </div>
    </div>
    </div>
</section>

<div id="focused-model-container" style="background:white;background-color:white;">
</div>
<script>
        $(document).ready(function () {
                var dtable = $('#focusTable').DataTable({

                        pageLength: 10,
                        paging: true,
                        scrollCollapse: true,
                        fixedHeader: true,
                        columnDefs: [
                                {
                                        targets: [7],
                                        searchable: false
                                }
                        ]
                });
        });
</script>