| Line 57... |
Line 57... |
| 57 |
</div>
|
57 |
</div>
|
| 58 |
</section>
|
58 |
</section>
|
| 59 |
|
59 |
|
| 60 |
|
60 |
|
| 61 |
<script>
|
61 |
<script>
|
| - |
|
62 |
// Edit-beat / assign-visit in the Beat Planner are L2-and-above only.
|
| - |
|
63 |
var CAN_EDIT_BEAT = $canEditBeat;
|
| 62 |
(function () {
|
64 |
(function () {
|
| 63 |
// Default: today only. Other dates → use the per-user calendar from the row's View button.
|
65 |
// Default: today only. Other dates → use the per-user calendar from the row's View button.
|
| 64 |
var today = new Date();
|
66 |
var today = new Date();
|
| 65 |
|
67 |
|
| 66 |
function fmt(d) {
|
68 |
function fmt(d) {
|
| Line 120... |
Line 122... |
| 120 |
+ '<td>' + r.partnerCount + '</td>'
|
122 |
+ '<td>' + r.partnerCount + '</td>'
|
| 121 |
+ '<td>' + (r.leadCount > 0 ? '<span class="label label-warning">' + r.leadCount + '</span>' : '0') + '</td>'
|
123 |
+ '<td>' + (r.leadCount > 0 ? '<span class="label label-warning">' + r.leadCount + '</span>' : '0') + '</td>'
|
| 122 |
+ '<td><strong>' + r.visitCount + '</strong></td>'
|
124 |
+ '<td><strong>' + r.visitCount + '</strong></td>'
|
| 123 |
+ '<td>'
|
125 |
+ '<td>'
|
| 124 |
+ '<button class="btn btn-xs btn-info view-user-calendar" data-userid="' + r.authUserId + '" data-username="' + r.userName + '">View Calendar</button> '
|
126 |
+ '<button class="btn btn-xs btn-info view-user-calendar" data-userid="' + r.authUserId + '" data-username="' + r.userName + '">View Calendar</button> '
|
| - |
|
127 |
+ (CAN_EDIT_BEAT
|
| 125 |
+ '<button class="btn btn-xs btn-warning edit-beat-on-date" '
|
128 |
? '<button class="btn btn-xs btn-warning edit-beat-on-date" '
|
| 126 |
+ 'data-userid="' + r.authUserId + '" data-username="' + r.userName + '" '
|
129 |
+ 'data-userid="' + r.authUserId + '" data-username="' + r.userName + '" '
|
| 127 |
+ 'data-beatid="' + r.beatId + '" data-date="' + r.scheduleDate + '">Edit</button>'
|
130 |
+ 'data-beatid="' + r.beatId + '" data-date="' + r.scheduleDate + '">Edit</button>'
|
| 128 |
+ (isToday
|
131 |
+ (isToday
|
| 129 |
? ' <button class="btn btn-xs btn-success assign-visit-btn"'
|
132 |
? ' <button class="btn btn-xs btn-success assign-visit-btn"'
|
| 130 |
+ ' data-userid="' + r.authUserId + '" data-username="' + r.userName + '"'
|
133 |
+ ' data-userid="' + r.authUserId + '" data-username="' + r.userName + '"'
|
| 131 |
+ ' data-beatid="' + r.beatId + '"'
|
134 |
+ ' data-beatid="' + r.beatId + '"'
|
| 132 |
+ ' data-date="' + r.scheduleDate + '">Assign Visit</button>'
|
135 |
+ ' data-date="' + r.scheduleDate + '">Assign Visit</button>'
|
| - |
|
136 |
: '')
|
| 133 |
: '')
|
137 |
: '')
|
| 134 |
+ '</td>'
|
138 |
+ '</td>'
|
| 135 |
+ '</tr>';
|
139 |
+ '</tr>';
|
| 136 |
});
|
140 |
});
|
| 137 |
$('#dayViewRows').html(html);
|
141 |
$('#dayViewRows').html(html);
|