From b4488eab87aa066417f14aabb65adbc38b0eeccf Mon Sep 17 00:00:00 2001
From: HelenHuang <LinHuang@pollex.com.tw>
Date: 星期二, 15 二月 2022 10:03:18 +0800
Subject: [PATCH] Fixed #135239 修正 [ 顧問管理流程 ] 預約資訊的結案、通知約訪 button 沒有置中

---
 PAMapp/components/Ui/UiDateFormat.vue |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/PAMapp/components/Ui/UiDateFormat.vue b/PAMapp/components/Ui/UiDateFormat.vue
index e9223b3..32f9651 100644
--- a/PAMapp/components/Ui/UiDateFormat.vue
+++ b/PAMapp/components/Ui/UiDateFormat.vue
@@ -13,7 +13,7 @@
     date!: Date | string;
 
     @Prop()
-    onlyShowSection!: 'DAY' | 'TIME';
+    onlyShowSection!: 'YEAR' | 'DATE' | 'DAY' | 'TIME';
 
     compareTarget!: Date;
     displayValue = '';
@@ -46,6 +46,12 @@
                         this.displayValue = isThisYear(compareTarget) ? thisYearDayLabel : `${compareTarget.getFullYear()}/${compareTarget.getMonth() + 1}/${compareTarget.getDate()}`;
                     } else if (this.onlyShowSection === 'TIME') {
                         this.displayValue = `${compareTarget.getHours()}:${minutes}`;
+                    } else if (this.onlyShowSection === 'DATE') {
+                        this.displayValue = isThisYear(compareTarget)
+                            ? thisYearDayLabel
+                            : `${compareTarget.getMonth() + 1}/${compareTarget.getDate()}`;
+                    } else if (this.onlyShowSection === 'YEAR') {
+                        this.displayValue = `${compareTarget.getFullYear()}`;
                     }
 
                     if (this.onlyShowSection) return;

--
Gitblit v1.8.0