From 217d0cbd737d800d0d961428448ac28e56ec61a4 Mon Sep 17 00:00:00 2001 From: Aaron Lee Date: Fri, 12 Jan 2024 20:14:39 +0800 Subject: [PATCH] added announcement --- package.json | 2 +- src/components/admin/attendance/UserList.tsx | 2 +- src/components/admin/attendance/UserView.tsx | 2 +- src/pages/dash/index.tsx | 27 ++++++-- yarn.lock | 66 ++++++++++---------- 5 files changed, 58 insertions(+), 41 deletions(-) diff --git a/package.json b/package.json index 9165ccd..17c5548 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "postcss": "^8.4.31", "prettier": "^3.1.0", "prettier-plugin-tailwindcss": "^0.5.7", - "prisma": "^5.6.0", + "prisma": "^5.8.0", "tailwindcss": "^3.3.5", "typescript": "^5.1.6" }, diff --git a/src/components/admin/attendance/UserList.tsx b/src/components/admin/attendance/UserList.tsx index 0f893d8..0468ce9 100644 --- a/src/components/admin/attendance/UserList.tsx +++ b/src/components/admin/attendance/UserList.tsx @@ -20,7 +20,7 @@ export default function UserList() { { users.data?.map((user) => ( - = 100 ? "*:bg-emerald-200" : "*:bg-red-100"}`} key={user.username}> + = 95 ? "*:bg-emerald-200" : "*:bg-red-100"}`} key={user.username}> {user.username} {user.grade} {user.class} diff --git a/src/components/admin/attendance/UserView.tsx b/src/components/admin/attendance/UserView.tsx index b9e9d15..4f4c82b 100644 --- a/src/components/admin/attendance/UserView.tsx +++ b/src/components/admin/attendance/UserView.tsx @@ -99,7 +99,7 @@ export default function UserView() {
= 100 ? "bg-emerald-500" : "bg-red-300" + (userActualAttendTime.data ?? 0) + (userAttendTime.data ?? 0) >= 95 ? "bg-emerald-500" : "bg-red-300" ].join(" ")}>
預估總時數
diff --git a/src/pages/dash/index.tsx b/src/pages/dash/index.tsx index 3e07fb2..af74422 100644 --- a/src/pages/dash/index.tsx +++ b/src/pages/dash/index.tsx @@ -37,21 +37,21 @@ export default function Dash() {
-
+
已選取時數
{attendTime.data}
-
+
實際出席時數
{actualAttendTime.data?.toFixed(1)}
= 100 ? "bg-emerald-500" : "bg-red-300" + "border rounded-xl h-32 w-40 p-2 flex items-center justify-center flex-col mb-4", + (actualAttendTime.data ?? 0) + (attendTime.data ?? 0) >= 95 ? "bg-emerald-500" : "bg-red-300" ].join(" ")}>
預估總時數
@@ -59,7 +59,24 @@ export default function Dash() {
-
請點選下方切換狀態 (> 100 小時會變綠燈)
+
+
    +
  • 上午時段 (早) 為 09:00 ~ 12:00
  • +
      +
    • 為獎勵上午時段到校,實到 3 小時以 4 小時計算時數
    • +
    +
  • 下午時段 (午) 為 13:00 ~ 16:00
  • +
  • 晚間時段 (晚) 為 16:00 ~ 19:00
  • +
+
+
    +
  • 1/16/2024 為正常社課時間,不列入時數計算
  • +
  • 1/17/2024、1/18/2024 開放時段為放學後 17:00 ~ 19:30 (請直接選擇 [晚] 時段)
  • +
  • 1/19/2024 開放時間為結業式後 12:00 ~ 17:00 (請直接選擇 [午] 時段)
  • +
  • 1/20/2024 ~ 2/7/2024 開放時間為 09:00 ~ 19:00
  • +
+
+
請點選下方切換狀態 (> 95 小時會變綠燈)
diff --git a/yarn.lock b/yarn.lock index 6215f29..5a3eff9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -205,41 +205,41 @@ resolved "https://registry.yarnpkg.com/@prisma/client/-/client-5.7.1.tgz#a124afd05663267f7255a639a81d28303684a063" integrity sha512-TUSa4nUcC4nf/e7X3jyO1pEd6XcI/TLRCA0KjkA46RDIpxUaRsBYEOqITwXRW2c0bMFyKcCRXrH4f7h4q9oOlg== -"@prisma/debug@5.7.1": - version "5.7.1" - resolved "https://registry.yarnpkg.com/@prisma/debug/-/debug-5.7.1.tgz#064177066e630beb43492ffa608acc21a118e2ce" - integrity sha512-yrVSO/YZOxdeIxcBtZ5BaNqUfPrZkNsAKQIQg36cJKMxj/VYK3Vk5jMKkI+gQLl0KReo1YvX8GWKfV788SELjw== +"@prisma/debug@5.8.0": + version "5.8.0" + resolved "https://registry.yarnpkg.com/@prisma/debug/-/debug-5.8.0.tgz#e49b9d8fd4ef79d177ac4b9f5242e857e8d5a044" + integrity sha512-ZqPpkvbovu/kQJ1bvy57NO4dw97fpQGcbQSCtsqlwSE1UNKJP75R3BKxdznk8ZPMY+GJdMRetWNv4oAvSbWn8Q== -"@prisma/engines-version@5.7.1-1.0ca5ccbcfa6bdc81c003cf549abe4269f59c41e5": - version "5.7.1-1.0ca5ccbcfa6bdc81c003cf549abe4269f59c41e5" - resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-5.7.1-1.0ca5ccbcfa6bdc81c003cf549abe4269f59c41e5.tgz#b7845425313e5395a3a3e64f3e0d04c1f320fa92" - integrity sha512-dIR5IQK/ZxEoWRBDOHF87r1Jy+m2ih3Joi4vzJRP+FOj5yxCwS2pS5SBR3TWoVnEK1zxtLI/3N7BjHyGF84fgw== +"@prisma/engines-version@5.8.0-37.0a83d8541752d7582de2ebc1ece46519ce72a848": + version "5.8.0-37.0a83d8541752d7582de2ebc1ece46519ce72a848" + resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-5.8.0-37.0a83d8541752d7582de2ebc1ece46519ce72a848.tgz#072d9fb98d9454aeb3549ae8c922446313312145" + integrity sha512-cXcoVweYbnv8xRfkWq9oj8BECOdzHUazrSpYCa0ehp5TNz4l5Spa8jbq/VROCTzj3ZncH5D9Q2TmySYTOUeKlw== -"@prisma/engines@5.7.1": - version "5.7.1" - resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-5.7.1.tgz#631c27daa326bbacd5d7119446e0d3f15c0f274c" - integrity sha512-R+Pqbra8tpLP2cvyiUpx+SIKglav3nTCpA+rn6826CThviQ8yvbNG0s8jNpo51vS9FuZO3pOkARqG062vKX7uA== +"@prisma/engines@5.8.0": + version "5.8.0" + resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-5.8.0.tgz#610560705a8753089ceb93cee8102679ba7eed51" + integrity sha512-Qhqm9WWLujNEC13AuZlUO14SQ15tNLe5puaz+tOk7UqINqJ3PtqMmuSuzomiw2diGVqZ+HYiSQzlR3+pPucVHA== dependencies: - "@prisma/debug" "5.7.1" - "@prisma/engines-version" "5.7.1-1.0ca5ccbcfa6bdc81c003cf549abe4269f59c41e5" - "@prisma/fetch-engine" "5.7.1" - "@prisma/get-platform" "5.7.1" + "@prisma/debug" "5.8.0" + "@prisma/engines-version" "5.8.0-37.0a83d8541752d7582de2ebc1ece46519ce72a848" + "@prisma/fetch-engine" "5.8.0" + "@prisma/get-platform" "5.8.0" -"@prisma/fetch-engine@5.7.1": - version "5.7.1" - resolved "https://registry.yarnpkg.com/@prisma/fetch-engine/-/fetch-engine-5.7.1.tgz#d7baa3493867c6f7cedfc41df477cfd0963059ca" - integrity sha512-9ELauIEBkIaEUpMIYPRlh5QELfoC6pyHolHVQgbNxglaINikZ9w9X7r1TIePAcm05pCNp2XPY1ObQIJW5nYfBQ== +"@prisma/fetch-engine@5.8.0": + version "5.8.0" + resolved "https://registry.yarnpkg.com/@prisma/fetch-engine/-/fetch-engine-5.8.0.tgz#ebba3f0fdf6b9c757502f5dd34fcfa80690e4e7b" + integrity sha512-1CAuE+JoYsPNggMEn6qk0zos06Uc9bYZBJ0VBPHD6R7REL05614koAbOCmn52IaYz3nobb7f25hqW6AY7rLkIw== dependencies: - "@prisma/debug" "5.7.1" - "@prisma/engines-version" "5.7.1-1.0ca5ccbcfa6bdc81c003cf549abe4269f59c41e5" - "@prisma/get-platform" "5.7.1" + "@prisma/debug" "5.8.0" + "@prisma/engines-version" "5.8.0-37.0a83d8541752d7582de2ebc1ece46519ce72a848" + "@prisma/get-platform" "5.8.0" -"@prisma/get-platform@5.7.1": - version "5.7.1" - resolved "https://registry.yarnpkg.com/@prisma/get-platform/-/get-platform-5.7.1.tgz#bc2fe43838c7d47b321aa4728a0f60990d02bc9e" - integrity sha512-eDlswr3a1m5z9D/55Iyt/nZqS5UpD+DZ9MooBB3hvrcPhDQrcf9m4Tl7buy4mvAtrubQ626ECtb8c6L/f7rGSQ== +"@prisma/get-platform@5.8.0": + version "5.8.0" + resolved "https://registry.yarnpkg.com/@prisma/get-platform/-/get-platform-5.8.0.tgz#a1057322f0cb5dd0d2f59b4120659621e5e24526" + integrity sha512-Nk3rhTFZ1LYkFZJnpSvQcLPCaBWgJQfteHII6UEENOOkYlmP0k3FuswND54tzzEr4qs39wOdV9pbXKX9U2lv7A== dependencies: - "@prisma/debug" "5.7.1" + "@prisma/debug" "5.8.0" "@swc/helpers@0.5.2": version "0.5.2" @@ -1770,12 +1770,12 @@ prettier@^3.1.0: resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.1.1.tgz#6ba9f23165d690b6cbdaa88cb0807278f7019848" integrity sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw== -prisma@^5.6.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/prisma/-/prisma-5.7.1.tgz#af60ed90531adc0ab8a683c9b1fc86d841c39864" - integrity sha512-ekho7ziH0WEJvC4AxuJz+ewRTMskrebPcrKuBwcNzVDniYxx+dXOGcorNeIb9VEMO5vrKzwNYvhD271Ui2jnNw== +prisma@^5.8.0: + version "5.8.0" + resolved "https://registry.yarnpkg.com/prisma/-/prisma-5.8.0.tgz#4efef66c1e8aee98bbc1d41b32bf629f5f7275b2" + integrity sha512-hDKoEqPt2qEUTH5yGO3l27CBnPtwvte0CGMKrpCr9+/A919JghfqJ3qgCGgMbOwdkXUOzdho0RH9tyUF3UhpMw== dependencies: - "@prisma/engines" "5.7.1" + "@prisma/engines" "5.8.0" punycode@^2.1.0: version "2.3.1"