瀏覽代碼

Update spent time title to indicate Overtime or normal Spent time

Thuan Pham Quoc 7 年之前
父節點
當前提交
d38071457c
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      client/components/cards/cardTime.js

+ 5 - 1
client/components/cards/cardTime.js

@@ -55,7 +55,11 @@ BlazeComponent.extendComponent({
     self.time = ReactiveVar();
   },
   showTitle() {
-    return `${TAPi18n.__('card-spent')} ${this.data().spentTime}`;
+    if (this.data().isOvertime) {
+      return `${TAPi18n.__('overtime')} ${this.data().spentTime} ${TAPi18n.__('hours')}`;
+    } else {
+      return `${TAPi18n.__('card-spent')} ${this.data().spentTime} ${TAPi18n.__('hours')}`;
+    }
   },
   showTime() {
     return this.data().spentTime;