Subversion Repositories SmartDukaan

Rev

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

Rev 35662 Rev 35670
Line 70... Line 70...
70
    }
70
    }
71
 
71
 
72
    #oosDetailsContent table td, #oosDetailsContent table th {
72
    #oosDetailsContent table td, #oosDetailsContent table th {
73
        font-size: 12px;
73
        font-size: 12px;
74
    }
74
    }
-
 
75
 
-
 
76
    #calledDetailsContent table td, #calledDetailsContent table th {
-
 
77
        font-size: 12px;
-
 
78
    }
75
</style>
79
</style>
76
 
80
 
77
<div class="container-fluid">
81
<div class="container-fluid">
78
    <h3>RBM Call Target Summary</h3>
82
    <h3>RBM Call Target Summary</h3>
79
    <table id="rbm-call-target-table" class="table table-bordered table-striped">
83
    <table id="rbm-call-target-table" class="table table-bordered table-striped">
Line 172... Line 176...
172
                    #else
176
                    #else
173
                        0
177
                        0
174
                    #end
178
                    #end
175
                </td>
179
                </td>
176
                <td class="highlight-target">$rowTarget</td>
180
                <td class="highlight-target">$rowTarget</td>
177
                <td class="highlight-achieved currency">$rowAchieved</td>
181
                <td class="highlight-achieved currency">
-
 
182
                    #if($rowAchieved > 0)
-
 
183
                        <span class="clickable"
-
 
184
                              onclick="showCalledPartnerDetails($model.getAuthId(), '$model.getRbmName()')">$rowAchieved</span>
-
 
185
                    #else
-
 
186
                        $rowAchieved
-
 
187
                    #end
-
 
188
                </td>
178
                <td class="highlight-plan-today">$model.getPlanToday()</td>
189
                <td class="highlight-plan-today">$model.getPlanToday()</td>
179
                <td class="highlight-carry-forward">$model.getCarryForward()</td>
190
                <td class="highlight-carry-forward">$model.getCarryForward()</td>
180
                <td>$model.getZeroBilling()</td>
191
                <td>$model.getZeroBilling()</td>
181
                <td class="highlight-untouched">$model.getUntouched()</td>
192
                <td class="highlight-untouched">$model.getUntouched()</td>
182
                <td class="highlight-future-plan">$model.getFuturePlan()</td>
193
                <td class="highlight-future-plan">$model.getFuturePlan()</td>
Line 233... Line 244...
233
                })
244
                })
234
                .catch(function () {
245
                .catch(function () {
235
                    document.getElementById('oosDetailsContent').innerHTML = '<p>Error loading details. Please try again.</p>';
246
                    document.getElementById('oosDetailsContent').innerHTML = '<p>Error loading details. Please try again.</p>';
236
                });
247
                });
237
    }
248
    }
-
 
249
 
-
 
250
    function showCalledPartnerDetails(authId, rbmName) {
-
 
251
        document.getElementById('calledModalLabel').textContent = 'Called Partners - ' + rbmName;
-
 
252
        document.getElementById('calledDetailsContent').innerHTML = '<p>Loading...</p>';
-
 
253
        $('#calledModal').modal('show');
-
 
254
 
-
 
255
        fetch('/indent/rbm_call_target/called_details?authId=' + authId)
-
 
256
                .then(function (response) {
-
 
257
                    return response.json();
-
 
258
                })
-
 
259
                .then(function (data) {
-
 
260
                    if (data && data.length > 0) {
-
 
261
                        var html = '<table class="table table-bordered table-sm"><thead><tr><th>S.No</th><th>Party Name</th><th>Code</th><th>Remark</th><th>Time</th></tr></thead><tbody>';
-
 
262
                        for (var i = 0; i < data.length; i++) {
-
 
263
                            html += '<tr><td>' + (i + 1) + '</td><td>' + data[i].partyName + '</td><td>' + data[i].code + '</td><td>' + data[i].remark + '</td><td>' + data[i].time + '</td></tr>';
-
 
264
                        }
-
 
265
                        html += '</tbody></table>';
-
 
266
                        document.getElementById('calledDetailsContent').innerHTML = html;
-
 
267
                    } else {
-
 
268
                        document.getElementById('calledDetailsContent').innerHTML = '<p>No called partners found.</p>';
-
 
269
                    }
-
 
270
                })
-
 
271
                .catch(function () {
-
 
272
                    document.getElementById('calledDetailsContent').innerHTML = '<p>Error loading details. Please try again.</p>';
-
 
273
                });
-
 
274
    }
238
</script>
275
</script>
239
276