ปรับปฎิทินเพิ่มเติม

This commit is contained in:
Tanyalak 2023-04-05 18:16:31 +07:00
parent 9fc92cfbcd
commit 412c31d023
6 changed files with 80 additions and 24 deletions

View file

@ -6,13 +6,16 @@ export const load: PageServerLoad = async () => {
const exams = await getQualifyExams()
const events:CalendarEvent[]=[]
exams.forEach(({id,title,start,institute_id})=>{
let backgroundColor ="#1111EE"
let backgroundColor =""
switch (institute_id) {
case 1:
backgroundColor="#EE1111"
backgroundColor="rgba(251,64,75,.2)"
break;
case 2:
backgroundColor="#11EE11"
backgroundColor="#23ccef"
break;
case 3:
backgroundColor="rgba(68,125,247,.2)"
break;
default:
break;

View file

@ -29,20 +29,20 @@
</div>
</div>
<div class="container mx-auto items-start flex flex-wrap px-4 pt-11">
<div class="w-full lg:w-6/12 cardxl">
<div class="w-full lg:w-7/12 cardxl">
<div class="card bg-white shadow-xl w-full">
<ActivityCalendar {events} />
</div>
</div>
<div class="w-full lg:w-6/12">
<div class="w-full lg:w-5/12">
<div
class=" card bg-white shadow-xl flex flex-col min-w-0 break-words w-full"
class=" card bg-white shadow-xl flex flex-col min-w-0 break-words w-full auto-rows-max"
>
<div class="rounded-t mb-0 px-4 py-3 border-0">
<div class="flex flex-wrap items-center">
<div class="relative w-full px-4 max-w-full flex-grow flex-1">
<h3
class="font-semibold text-lg text-blueGray-700'"
class="text-lg text-blueGray-700'"
>
รายการสอบ
</h3>