Subversion Repositories SmartDukaan

Rev

Rev 34333 | Go to most recent revision | Details | 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>
54
 
55
#if($isAdmin)
56
<script type="text/javascript">
57
    $(function () {
58
        getPartnerAheadOptions($("#typeaheadpartner"), function (selectedPartner) {
59
            partnerId = selectedPartner.partnerId;
60
            console.log(partnerId);
61
        });
62
    });
63
    $(function () {
64
        $('#fofo-users').on('change', function () {
65
            var selectedFofoId = $(this).val();
66
            if (selectedFofoId) {
67
                partnerId = selectedFofoId;
68
                console.log("Partner ID set to:", partnerId);
69
            } else {
70
                alert("Please select a valid Fofo ID.");
71
            }
72
        });
73
    });
74
</script>
75
#else
76
<script>
77
    let isClicked = false;
78
 
79
    setTimeout(function () {
80
        if (!isClicked) {
81
            partnerHidAllocationList();
82
            isClicked = true; // Set the flag to true to prevent further clicks
83
            console.log('Button clicked once.');
84
        }
85
    }, 500); // Adjust the delay as necessary
86
</script>
87
#end