|
1 | 1 | {% set nbShifts = bucket.shifts | length %} |
2 | 2 | {% set nbBookableShifts = shift_service.getBookableShifts(bucket) | length %} |
3 | | -{% set nbBookedShifts = nbShifts - nbBookableShifts %} |
| 3 | + |
4 | 4 | <div class="tooltipped" data-tooltip="{{ bucket.sortedShifts.first.job.name }} - {% if nbBookableShifts == 0 %}complet{% else %}inaccessible pour {{ beneficiary.firstname }}{% endif %}" |
5 | 5 | data-offset="{{ (((bucket.start|date('G')-start)*60 + bucket.start|date('i'))/60) }}" |
6 | 6 | data-length="{{ (100/(end-start+1)) }}" |
7 | | - style="padding: 0 1px;width:{{ (bucket.duration / 60) * (100/(end-start+1)) }}%;position: absolute; |
8 | | - left:{{ (((bucket.start|date('G')-start)*60 + bucket.start|date('i'))/60)*(100/(end-start+1)) }}%; |
9 | | - top: {{ line*10 }}px;"> |
| 7 | + style="padding: 0 1px;width:{{ (bucket.duration / 60) * (100/(end-start+1)) }}%;position: absolute;left:{{ (((bucket.start|date('G')-start)*60 + bucket.start|date('i'))/60)*(100/(end-start+1)) }}%;top: {{ line*10 }}px;"> |
10 | 8 | <div class="z-depth-1 grey lighten-3" style="height:40px;position: relative; cursor: not-allowed"> |
11 | | - |
12 | 9 | <div class="shift-block grey-text text-lighten-1"> |
13 | | - <i class="material-icons tiny">lock</i><span class="small hide-on-med-and-up" style="font-size: 10px"> |
14 | | - {% if bucket.start|date('i') == '00' %}{{ bucket.start|date('G\\h') }}{% else %}{{ bucket.start|date('G\\hi') }}{% endif %} |
| 10 | + {% if bucket.first.locked %} |
| 11 | + <i class="material-icons tiny">lock</i> |
| 12 | + {% elseif nbBookableShifts == 0 %} |
| 13 | + <i class="material-icons tiny">check</i> |
| 14 | + {% endif %} |
| 15 | + <span class="small hide-on-med-and-up" style="font-size: 10px"> |
| 16 | + {% if bucket.start|date('i') == '00' %}{{ bucket.start|date('G\\h') }}{% else %}{{ bucket.start|date('G\\hi') }}{% endif %} |
15 | 17 | {% if bucket.end|date('i') == '00' %}{{ bucket.end|date('G\\h') }}{% else %}{{ bucket.end|date('G\\hi') }}{% endif %} |
16 | | - </span> |
17 | | - <span class="hide-on-small-and-down">{{ bucket.start|date('G\\hi') }} - {{ bucket.end|date('G\\hi') }}</span> |
| 18 | + </span> |
| 19 | + <span class="hide-on-small-and-down"> |
| 20 | + {{ bucket.start|date('G\\hi') }} - {{ bucket.end|date('G\\hi') }} |
| 21 | + </span> |
18 | 22 | </div> |
19 | 23 | <div class="shift-block"> |
20 | 24 | <div class="hide-on-med-and-down"> |
|
0 commit comments