Subversion Repositories SmartDukaan

Rev

Rev 34055 | Rev 35155 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 34055 Rev 35147
Line 35... Line 35...
35
 
35
 
36
    #if($isGtEqL2)
36
    #if($isGtEqL2)
37
 
37
 
38
        #parse("rbm-today-arr.vm")
38
        #parse("rbm-today-arr.vm")
39
<br>
39
<br>
-
 
40
    <div class="container-fluid mb-3">
-
 
41
        <label for="userType">Select User Type</label>
-
 
42
        <select id="userType" class="form-control" style="width:200px; display:inline-block;">
-
 
43
            <option value="">--Select--</option>
-
 
44
            <option value="RBM">RBM</option>
-
 
45
            <option value="BM">BM</option>
-
 
46
            <option value="ASM">ASM</option>
-
 
47
        </select>
-
 
48
    </div>
-
 
49
 
40
<div class="container-fluid">
50
    <div class="container-fluid">
41
    #foreach($brands in $brandParts)
51
    #foreach($brands in $brandParts)
42
        <table class="table table-bordered table-striped">
52
        <table class="table table-bordered table-striped">
43
            <thead>
53
            <thead>
44
            <tr>
54
            <tr>
45
                <th rowspan="2">AuthUser</th>
55
                <th rowspan="2">AuthUser</th>
Line 252... Line 262...
252
        let endPoint = `/getDateWiseRabmTargetAndAchievements?startDate=${startDate}&endDate=${endDate}`;
262
        let endPoint = `/getDateWiseRabmTargetAndAchievements?startDate=${startDate}&endDate=${endDate}`;
253
        window.open(endPoint, '_blank');
263
        window.open(endPoint, '_blank');
254
        ;
264
        ;
255
    });
265
    });
256
</script>
266
</script>
-
 
267
 
-
 
268
<script>
-
 
269
    $(document).on('change', '#userType', function () {
-
 
270
        const selectedType = $(this).val();
-
 
271
        if (selectedType) {
-
 
272
            // Reload the same page with categoryType param
-
 
273
            window.location.href = `/indent/today_po_rbm?categoryType=${selectedType}`;
-
 
274
        }
-
 
275
    });
-
 
276
 
-
 
277
    // Keep dropdown selected on reload
-
 
278
    $(document).ready(function () {
-
 
279
        const urlParams = new URLSearchParams(window.location.search);
-
 
280
        const selectedType = urlParams.get('categoryType');
-
 
281
        if (selectedType) {
-
 
282
            $('#userType').val(selectedType);
-
 
283
        }
-
 
284
    });
-
 
285
</script>
-
 
286
 
257
</body>
287
</body>
258
</html>
288
</html>
259
289