From c4546055d271399cff3f0f2c36db48e535fdc113 Mon Sep 17 00:00:00 2001 From: AnandaTon Date: Thu, 5 Oct 2023 12:32:43 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=88=E0=B8=B1=E0=B8=94=20colume=20layout?= =?UTF-8?q?=20=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1=E0=B9=80?= =?UTF-8?q?=E0=B8=87=E0=B8=B7=E0=B9=88=E0=B8=AD=E0=B8=99=E0=B9=84=E0=B8=82?= =?UTF-8?q?=E0=B8=95=E0=B8=A3=E0=B8=A7=E0=B8=88=E0=B8=AA=E0=B8=AD=E0=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cms/src/routes/qualifying/+page.server.ts | 2 +- cms/src/routes/qualifying/[id]/+page.svelte | 109 +++++++++++++------- 2 files changed, 73 insertions(+), 38 deletions(-) diff --git a/cms/src/routes/qualifying/+page.server.ts b/cms/src/routes/qualifying/+page.server.ts index 573a8b4..77bfaab 100644 --- a/cms/src/routes/qualifying/+page.server.ts +++ b/cms/src/routes/qualifying/+page.server.ts @@ -23,7 +23,7 @@ export const load: PageServerLoad = async ({ fetch }) => { } if (ex.payment_startDate) { const start = ex.payment_startDate; - const end = ex.payment_endDate; + const end = dayjs(ex.payment_endDate).add(1, 'day').format('YYYY-MM-DD'); events.push({ id, title: 'ชำระเงิน:' + title, start, end, url, backgroundColor: '#D2B4DE' }); } if (ex.examDate) { diff --git a/cms/src/routes/qualifying/[id]/+page.svelte b/cms/src/routes/qualifying/[id]/+page.svelte index 2c0d131..6607c34 100644 --- a/cms/src/routes/qualifying/[id]/+page.svelte +++ b/cms/src/routes/qualifying/[id]/+page.svelte @@ -1,6 +1,7 @@
@@ -85,47 +94,73 @@
สมัครสอบ

-
- {#if data.positionsTrue} - {#each data.positionsTrue as p} -
-
ปริญญาบัตรขึ้นไป
-
- - - สมัครสอบ - -
- {p.title} +
+
+ {#if data.positionsTrue} +
ปริญญาบัตรขึ้นไป
+ {#each data.positionsTrue as p} +
+
+ {#if 'register_endDate' in data && isEndDatePassed(data.register_endDate)} + + + ตรวจสอบ + + {:else} + + + สมัครสอบ + + {/if} +
+ {p.title} +
-
- {/each} - {/if} - {#if data.positionsFalse} - {#each data.positionsFalse as a} -
-
ต่ำกว่าปริญญาบัตร
-
- - - สมัครสอบ - -
- {a.title} + {/each} + {/if} +
+
+ {#if data.positionsFalse} +
ต่ำกว่าปริญญาบัตร
+ {#each data.positionsFalse as a} +
+
+ {#if 'register_endDate' in data && isEndDatePassed(data.register_endDate)} + + + ตรวจสอบ + + {:else} + + + สมัครสอบ + + {/if} +
+ {a.title} +
-
- {/each} - {/if} + {/each} + {/if} +