Subversion Repositories SmartDukaan

Rev

Rev 34333 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
34163 ranu 1
<section class="wrapper">
2
    <div class="row">
3
        <div class="col-lg-12">
4
            <h3 class="page-header"><i class="icon_document_alt"></i>Hid Allocation</h3>
5
            <ol class="breadcrumb">
6
                <li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
7
                <li><i class="icon_document_alt"></i>Hid Allocation</li>
8
            </ol>
9
        </div>
10
    </div>
11
    <div class="row col-lg-12">
12
 
13
        <div class="form-group">
14
            <table>
15
                <tr>
16
                    #if($isAdmin)
17
                        #if($isRBM)
18
                            <div style="padding: 5px 10px; margin-top: 2px"
19
                                 class="col-lg-2 form-group">
20
                                <select class="form-control input-sm" id="fofo-users" name="Item"
21
                                        placeholder="Partners">
22
                                    <option value="" disabled selected>Partners</option>
23
                                    #foreach($fofoId in $customRetailersMap.keySet())
24
                                        <option value="$fofoId"
25
                                                data-email="$customRetailersMap.get($fofoId).getEmail()">$customRetailersMap.get($fofoId).getBusinessName()</option>
26
                                    #end
27
                                </select>
28
                            </div>
29
                        #else
30
                            <td style="padding: 5px 10px;">
31
                                <input placeholder="Enter Partner Name" type="text"
32
                                       class="typeahead form-control"
33
                                       id="typeaheadpartner"
34
                                       name="Item" data-provide="typeahead" autocomplete="off">
35
                                <input id="partnerId" type="hidden">
36
                            </td>
37
 
38
                        #end
39
                        <td style="padding: 5px 10px;"><input class="btn btn-primary partner-hid-allocation"
40
                                                              type="button"
41
                                                              value="Submit"></td>
42
                    #end
43
 
44
                </tr>
45
            </table>
46
        </div>
47
 
48
    </div>
49
    <div class="hid-allocation-conatiner">
50
 
51
    </div>
52
 
53
</section>
34333 ranu 54
<script>
55
    $(document).ready(function () {
56
        $('#fofo-users').multiselect({
57
            includeSelectAllOption: true,
58
            maxHeight: 200,
59
            multiple: true,
60
            buttonWidth: '180px',
61
            numberDisplayed: 1,
62
            nonSelectedText: 'Users',
63
            nSelectedText: ' - Users Selected',
64
            allSelectedText: 'All Users Selected',
65
            enableFiltering: true,
66
            enableCaseInsensitiveFiltering: true
67
        });
34163 ranu 68
 
34333 ranu 69
 
70
    });
71
 
72
 
73
</script>
74
 
34163 ranu 75
#if($isAdmin)
76
<script type="text/javascript">
34333 ranu 77
 
78
 
34163 ranu 79
    $(function () {
80
        getPartnerAheadOptions($("#typeaheadpartner"), function (selectedPartner) {
81
            partnerId = selectedPartner.partnerId;
82
            console.log(partnerId);
83
        });
84
    });
85
    $(function () {
86
        $('#fofo-users').on('change', function () {
87
            var selectedFofoId = $(this).val();
88
            if (selectedFofoId) {
89
                partnerId = selectedFofoId;
90
                console.log("Partner ID set to:", partnerId);
91
            } else {
36080 aman 92
                alert("Please select a valid Partner ID.");
34163 ranu 93
            }
94
        });
95
    });
96
</script>
97
#else
98
<script>
99
    let isClicked = false;
100
 
101
    setTimeout(function () {
102
        if (!isClicked) {
103
            partnerHidAllocationList();
104
            isClicked = true; // Set the flag to true to prevent further clicks
105
            console.log('Button clicked once.');
106
        }
107
    }, 500); // Adjust the delay as necessary
108
</script>
109
#end