Add card spent time to log time what can be overtime or not (will support filtering in future)

This commit is contained in:
Thuan Pham Quoc 2017-11-20 22:26:31 +07:00
parent dfd0b21947
commit eec3c301bc
8 changed files with 164 additions and 6 deletions

View file

@ -0,0 +1,22 @@
template(name="editCardSpentTime")
.edit-card-time
form.edit-time
.fields
label(for="time") {{_ 'time'}}
input.js-time-field#time(type="number" step="0.01" name="time" value="{{card.spentTime}}" placeholder=timeFormat autofocus)
label(for="overtime") {{_ 'overtime'}}
a.js-toggle-overtime
.materialCheckBox#overtime(class="{{#if card.isOvertime}}is-checked{{/if}}" name="overtime")
if error.get
.warning {{_ error.get}}
button.primary.wide.left.js-submit-time(type="submit") {{_ 'save'}}
button.js-delete-time.negate.wide.right {{_ 'delete'}}
template(name="timeBadge")
if canModifyCard
a.js-edit-time.card-time(title="{{showTitle}}" class="{{#if isOvertime}}card-label-red{{else}}card-label-green{{/if}}")
| {{showTime}}
else
a.card-time(title="{{showTitle}}" class="{{#if isOvertime}}card-label-red{{else}}card-label-green{{/if}}")
| {{showTime}}