added announcement

This commit is contained in:
Aaron Lee 2024-01-12 20:14:39 +08:00
parent f0354f1a9d
commit 217d0cbd73
5 changed files with 58 additions and 41 deletions

View file

@ -49,7 +49,7 @@
"postcss": "^8.4.31", "postcss": "^8.4.31",
"prettier": "^3.1.0", "prettier": "^3.1.0",
"prettier-plugin-tailwindcss": "^0.5.7", "prettier-plugin-tailwindcss": "^0.5.7",
"prisma": "^5.6.0", "prisma": "^5.8.0",
"tailwindcss": "^3.3.5", "tailwindcss": "^3.3.5",
"typescript": "^5.1.6" "typescript": "^5.1.6"
}, },

View file

@ -20,7 +20,7 @@ export default function UserList() {
<tbody> <tbody>
{ {
users.data?.map((user) => ( users.data?.map((user) => (
<tr className={`*:p-1 *: ${(user.selectedTime + user.actualTime) >= 100 ? "*:bg-emerald-200" : "*:bg-red-100"}`} key={user.username}> <tr className={`*:p-1 *: ${(user.selectedTime + user.actualTime) >= 95 ? "*:bg-emerald-200" : "*:bg-red-100"}`} key={user.username}>
<td>{user.username}</td> <td>{user.username}</td>
<td>{user.grade}</td> <td>{user.grade}</td>
<td>{user.class}</td> <td>{user.class}</td>

View file

@ -99,7 +99,7 @@ export default function UserView() {
</div> </div>
<div className={[ <div className={[
"border rounded-xl h-32 w-40 p-2 flex items-center justify-center flex-col", "border rounded-xl h-32 w-40 p-2 flex items-center justify-center flex-col",
(userActualAttendTime.data ?? 0) + (userAttendTime.data ?? 0) >= 100 ? "bg-emerald-500" : "bg-red-300" (userActualAttendTime.data ?? 0) + (userAttendTime.data ?? 0) >= 95 ? "bg-emerald-500" : "bg-red-300"
].join(" ")}> ].join(" ")}>
<div className="text-center text-xl font-bold"></div> <div className="text-center text-xl font-bold"></div>
<div className="flex-grow flex items-center"> <div className="flex-grow flex items-center">

View file

@ -37,21 +37,21 @@ export default function Dash() {
<DashboardHeader url="/dash" /> <DashboardHeader url="/dash" />
<div className="p-5"> <div className="p-5">
<div className="flex gap-2"> <div className="flex gap-2">
<div className="border rounded-xl h-32 w-40 p-2 flex items-center justify-center flex-col mb-5 bg-gray-300"> <div className="border rounded-xl h-32 w-40 p-2 flex items-center justify-center flex-col mb-4 bg-gray-300">
<div className="text-center text-2xl font-bold"></div> <div className="text-center text-2xl font-bold"></div>
<div className="flex-grow flex items-center"> <div className="flex-grow flex items-center">
<div className="text-center text-6xl font-bold">{attendTime.data}</div> <div className="text-center text-6xl font-bold">{attendTime.data}</div>
</div> </div>
</div> </div>
<div className="border rounded-xl h-32 w-40 p-2 flex items-center justify-center flex-col mb-5 bg-gray-300"> <div className="border rounded-xl h-32 w-40 p-2 flex items-center justify-center flex-col mb-4 bg-gray-300">
<div className="text-center text-xl font-bold"></div> <div className="text-center text-xl font-bold"></div>
<div className="flex-grow flex items-center"> <div className="flex-grow flex items-center">
<div className="text-center text-6xl font-bold">{actualAttendTime.data?.toFixed(1)}</div> <div className="text-center text-6xl font-bold">{actualAttendTime.data?.toFixed(1)}</div>
</div> </div>
</div> </div>
<div className={[ <div className={[
"border rounded-xl h-32 w-40 p-2 flex items-center justify-center flex-col mb-5", "border rounded-xl h-32 w-40 p-2 flex items-center justify-center flex-col mb-4",
(actualAttendTime.data ?? 0) + (attendTime.data ?? 0) >= 100 ? "bg-emerald-500" : "bg-red-300" (actualAttendTime.data ?? 0) + (attendTime.data ?? 0) >= 95 ? "bg-emerald-500" : "bg-red-300"
].join(" ")}> ].join(" ")}>
<div className="text-center text-xl font-bold"></div> <div className="text-center text-xl font-bold"></div>
<div className="flex-grow flex items-center"> <div className="flex-grow flex items-center">
@ -59,7 +59,24 @@ export default function Dash() {
</div> </div>
</div> </div>
</div> </div>
<div className="text-2xl font-bold mb-2"> (&gt; 100 )</div> <div className="p-2 mb-4 border border-yellow-500 bg-yellow-100 max-w-full w-[40rem] rounded-md">
<ul className="list-disc ml-5 mb-2">
<li> () 09:00 ~ 12:00</li>
<ul className="list-[circle] ml-5 text-red-500">
<li> 3 4 </li>
</ul>
<li> () 13:00 ~ 16:00</li>
<li> () 16:00 ~ 19:00</li>
</ul>
<hr className="border-yellow-500" />
<ul className="list-disc ml-5 mt-2">
<li>1/16/2024 </li>
<li>1/17/20241/18/2024 17:00 ~ 19:30 ( [] )</li>
<li>1/19/2024 12:00 ~ 17:00 ( [] )</li>
<li>1/20/2024 ~ 2/7/2024 09:00 ~ 19:00</li>
</ul>
</div>
<div className="text-2xl font-bold mb-4"> (&gt; 95 )</div>
<table className="table-auto border-collapse border-2 border-black w-fit mb-5"> <table className="table-auto border-collapse border-2 border-black w-fit mb-5">
<thead> <thead>
<tr className="*:p-1 *:border border-b-2 border-b-black"> <tr className="*:p-1 *:border border-b-2 border-b-black">

View file

@ -205,41 +205,41 @@
resolved "https://registry.yarnpkg.com/@prisma/client/-/client-5.7.1.tgz#a124afd05663267f7255a639a81d28303684a063" resolved "https://registry.yarnpkg.com/@prisma/client/-/client-5.7.1.tgz#a124afd05663267f7255a639a81d28303684a063"
integrity sha512-TUSa4nUcC4nf/e7X3jyO1pEd6XcI/TLRCA0KjkA46RDIpxUaRsBYEOqITwXRW2c0bMFyKcCRXrH4f7h4q9oOlg== integrity sha512-TUSa4nUcC4nf/e7X3jyO1pEd6XcI/TLRCA0KjkA46RDIpxUaRsBYEOqITwXRW2c0bMFyKcCRXrH4f7h4q9oOlg==
"@prisma/debug@5.7.1": "@prisma/debug@5.8.0":
version "5.7.1" version "5.8.0"
resolved "https://registry.yarnpkg.com/@prisma/debug/-/debug-5.7.1.tgz#064177066e630beb43492ffa608acc21a118e2ce" resolved "https://registry.yarnpkg.com/@prisma/debug/-/debug-5.8.0.tgz#e49b9d8fd4ef79d177ac4b9f5242e857e8d5a044"
integrity sha512-yrVSO/YZOxdeIxcBtZ5BaNqUfPrZkNsAKQIQg36cJKMxj/VYK3Vk5jMKkI+gQLl0KReo1YvX8GWKfV788SELjw== integrity sha512-ZqPpkvbovu/kQJ1bvy57NO4dw97fpQGcbQSCtsqlwSE1UNKJP75R3BKxdznk8ZPMY+GJdMRetWNv4oAvSbWn8Q==
"@prisma/engines-version@5.7.1-1.0ca5ccbcfa6bdc81c003cf549abe4269f59c41e5": "@prisma/engines-version@5.8.0-37.0a83d8541752d7582de2ebc1ece46519ce72a848":
version "5.7.1-1.0ca5ccbcfa6bdc81c003cf549abe4269f59c41e5" version "5.8.0-37.0a83d8541752d7582de2ebc1ece46519ce72a848"
resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-5.7.1-1.0ca5ccbcfa6bdc81c003cf549abe4269f59c41e5.tgz#b7845425313e5395a3a3e64f3e0d04c1f320fa92" resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-5.8.0-37.0a83d8541752d7582de2ebc1ece46519ce72a848.tgz#072d9fb98d9454aeb3549ae8c922446313312145"
integrity sha512-dIR5IQK/ZxEoWRBDOHF87r1Jy+m2ih3Joi4vzJRP+FOj5yxCwS2pS5SBR3TWoVnEK1zxtLI/3N7BjHyGF84fgw== integrity sha512-cXcoVweYbnv8xRfkWq9oj8BECOdzHUazrSpYCa0ehp5TNz4l5Spa8jbq/VROCTzj3ZncH5D9Q2TmySYTOUeKlw==
"@prisma/engines@5.7.1": "@prisma/engines@5.8.0":
version "5.7.1" version "5.8.0"
resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-5.7.1.tgz#631c27daa326bbacd5d7119446e0d3f15c0f274c" resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-5.8.0.tgz#610560705a8753089ceb93cee8102679ba7eed51"
integrity sha512-R+Pqbra8tpLP2cvyiUpx+SIKglav3nTCpA+rn6826CThviQ8yvbNG0s8jNpo51vS9FuZO3pOkARqG062vKX7uA== integrity sha512-Qhqm9WWLujNEC13AuZlUO14SQ15tNLe5puaz+tOk7UqINqJ3PtqMmuSuzomiw2diGVqZ+HYiSQzlR3+pPucVHA==
dependencies: dependencies:
"@prisma/debug" "5.7.1" "@prisma/debug" "5.8.0"
"@prisma/engines-version" "5.7.1-1.0ca5ccbcfa6bdc81c003cf549abe4269f59c41e5" "@prisma/engines-version" "5.8.0-37.0a83d8541752d7582de2ebc1ece46519ce72a848"
"@prisma/fetch-engine" "5.7.1" "@prisma/fetch-engine" "5.8.0"
"@prisma/get-platform" "5.7.1" "@prisma/get-platform" "5.8.0"
"@prisma/fetch-engine@5.7.1": "@prisma/fetch-engine@5.8.0":
version "5.7.1" version "5.8.0"
resolved "https://registry.yarnpkg.com/@prisma/fetch-engine/-/fetch-engine-5.7.1.tgz#d7baa3493867c6f7cedfc41df477cfd0963059ca" resolved "https://registry.yarnpkg.com/@prisma/fetch-engine/-/fetch-engine-5.8.0.tgz#ebba3f0fdf6b9c757502f5dd34fcfa80690e4e7b"
integrity sha512-9ELauIEBkIaEUpMIYPRlh5QELfoC6pyHolHVQgbNxglaINikZ9w9X7r1TIePAcm05pCNp2XPY1ObQIJW5nYfBQ== integrity sha512-1CAuE+JoYsPNggMEn6qk0zos06Uc9bYZBJ0VBPHD6R7REL05614koAbOCmn52IaYz3nobb7f25hqW6AY7rLkIw==
dependencies: dependencies:
"@prisma/debug" "5.7.1" "@prisma/debug" "5.8.0"
"@prisma/engines-version" "5.7.1-1.0ca5ccbcfa6bdc81c003cf549abe4269f59c41e5" "@prisma/engines-version" "5.8.0-37.0a83d8541752d7582de2ebc1ece46519ce72a848"
"@prisma/get-platform" "5.7.1" "@prisma/get-platform" "5.8.0"
"@prisma/get-platform@5.7.1": "@prisma/get-platform@5.8.0":
version "5.7.1" version "5.8.0"
resolved "https://registry.yarnpkg.com/@prisma/get-platform/-/get-platform-5.7.1.tgz#bc2fe43838c7d47b321aa4728a0f60990d02bc9e" resolved "https://registry.yarnpkg.com/@prisma/get-platform/-/get-platform-5.8.0.tgz#a1057322f0cb5dd0d2f59b4120659621e5e24526"
integrity sha512-eDlswr3a1m5z9D/55Iyt/nZqS5UpD+DZ9MooBB3hvrcPhDQrcf9m4Tl7buy4mvAtrubQ626ECtb8c6L/f7rGSQ== integrity sha512-Nk3rhTFZ1LYkFZJnpSvQcLPCaBWgJQfteHII6UEENOOkYlmP0k3FuswND54tzzEr4qs39wOdV9pbXKX9U2lv7A==
dependencies: dependencies:
"@prisma/debug" "5.7.1" "@prisma/debug" "5.8.0"
"@swc/helpers@0.5.2": "@swc/helpers@0.5.2":
version "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" resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.1.1.tgz#6ba9f23165d690b6cbdaa88cb0807278f7019848"
integrity sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw== integrity sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==
prisma@^5.6.0: prisma@^5.8.0:
version "5.7.1" version "5.8.0"
resolved "https://registry.yarnpkg.com/prisma/-/prisma-5.7.1.tgz#af60ed90531adc0ab8a683c9b1fc86d841c39864" resolved "https://registry.yarnpkg.com/prisma/-/prisma-5.8.0.tgz#4efef66c1e8aee98bbc1d41b32bf629f5f7275b2"
integrity sha512-ekho7ziH0WEJvC4AxuJz+ewRTMskrebPcrKuBwcNzVDniYxx+dXOGcorNeIb9VEMO5vrKzwNYvhD271Ui2jnNw== integrity sha512-hDKoEqPt2qEUTH5yGO3l27CBnPtwvte0CGMKrpCr9+/A919JghfqJ3qgCGgMbOwdkXUOzdho0RH9tyUF3UhpMw==
dependencies: dependencies:
"@prisma/engines" "5.7.1" "@prisma/engines" "5.8.0"
punycode@^2.1.0: punycode@^2.1.0:
version "2.3.1" version "2.3.1"