Update qualifying, calendar and error page
This commit is contained in:
parent
24167f0650
commit
3a44bc2b33
5 changed files with 41 additions and 32 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import FullCalendar from '$lib/components/FullCalendar.svelte';
|
import FullCalendar from '$lib/components/FullCalendar.svelte';
|
||||||
import daygridPlugin from '@fullcalendar/daygrid';
|
import daygridPlugin from '@fullcalendar/daygrid';
|
||||||
import type { EventClickArg } from '@fullcalendar/core';
|
// import type { EventClickArg } from '@fullcalendar/core';
|
||||||
import type {CalendarEvent} from './CalendarEvent'
|
import type {CalendarEvent} from './CalendarEvent'
|
||||||
let calendarRef;
|
let calendarRef;
|
||||||
export let events:CalendarEvent[]
|
export let events:CalendarEvent[]
|
||||||
|
|
@ -22,12 +22,9 @@
|
||||||
today: 'วันนี้'
|
today: 'วันนี้'
|
||||||
},
|
},
|
||||||
events,
|
events,
|
||||||
dateClick: clickDate,
|
// eventClick: clickEvent,
|
||||||
eventClick: clickEvent,
|
|
||||||
};
|
};
|
||||||
function clickDate(info: { dateStr: string; }){
|
/*
|
||||||
alert('a day has been clicked!'+info.dateStr);
|
|
||||||
}
|
|
||||||
function clickEvent(info:EventClickArg){
|
function clickEvent(info:EventClickArg){
|
||||||
alert(
|
alert(
|
||||||
'Event: ' + info.event.title +
|
'Event: ' + info.event.title +
|
||||||
|
|
@ -36,6 +33,7 @@
|
||||||
'\nView: ' + info.view.type
|
'\nView: ' + info.view.type
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
</script>
|
</script>
|
||||||
<FullCalendar bind:this={calendarRef} {options} />
|
<FullCalendar bind:this={calendarRef} {options} />
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,41 +1,42 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"id":"21",
|
"id":"21",
|
||||||
"date":"2023/03/25","institute":"สำนักงาน ก.ก.","institute_id":1,
|
"date":"2023/04/28","institute":"สำนักงาน ก.ก.","institute_id":1,
|
||||||
"start":"2023-04-28T09:00:00",
|
"start":"2023-04-21",
|
||||||
"title":"ลูกจ้างและผู้ปฎิบัติงาน 1/2565",
|
"title":"รับสมัครสอบครั้งที่ 5/2565",
|
||||||
"detail":"ลูกจ้างและผู้ปฎิบัติงานในกรุงเทพมหานคร เป็นข้าราชการกรุงเทพมหานคร",
|
"detail":"รับสมัครสอบ ลูกจ้างและผู้ปฎิบัติงานในกรุงเทพมหานคร เป็นข้าราชการกรุงเทพมหานคร ครั้งที่ 5/2565",
|
||||||
"docurl":"https://webportal.bangkok.go.th/public/user_files_editor/305/%E0%B8%9B%E0%B8%A3%E0%B8%B0%E0%B8%81%E0%B8%B2%E0%B8%A8%E0%B8%84%E0%B8%B1%E0%B8%94%E0%B9%80%E0%B8%A5%E0%B8%B7%E0%B8%AD%E0%B8%81%E0%B8%A5%E0%B8%B9%E0%B8%81%E0%B8%88%E0%B9%89%E0%B8%B2%E0%B8%87.pdf"
|
"docurl":"https://webportal.bangkok.go.th/public/user_files_editor/305/%E0%B8%9B%E0%B8%A3%E0%B8%B0%E0%B8%81%E0%B8%B2%E0%B8%A8%E0%B8%84%E0%B8%B1%E0%B8%94%E0%B9%80%E0%B8%A5%E0%B8%B7%E0%B8%AD%E0%B8%81%E0%B8%A5%E0%B8%B9%E0%B8%81%E0%B8%88%E0%B9%89%E0%B8%B2%E0%B8%87.pdf"
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id":"20",
|
"id":"20",
|
||||||
"date":"2023/03/25","institute":"สำนักอนามัย","institute_id":2,
|
"date":"2023/04/20","institute":"สำนักอนามัย","institute_id":2,
|
||||||
"start":"2023-04-28T09:00:00",
|
"start":"2023-04-20T09:00:00",
|
||||||
"title":"วัน เวลา สถานที่ และระเบียบการคัดเลือกลูกจ้างกทม.",
|
"title":"วัน เวลา สถานที่ และระเบียบการคัดเลือกลูกจ้างกทม.",
|
||||||
"detail":"ด่วน !! ประกาศวัน เวลา สถานที่ และระเบียบการคัดเลือกลูกจ้างกทม.",
|
"detail":"ด่วน !! ประกาศวัน เวลา สถานที่ และระเบียบการคัดเลือกลูกจ้างกทม.",
|
||||||
"docUrl":"https://webportal.bangkok.go.th/public/user_files_editor/305/%E0%B8%9B%E0%B8%A3%E0%B8%B0%E0%B8%81%E0%B8%B2%E0%B8%A8%E0%B8%A7%E0%B8%B1%E0%B8%99%20%E0%B9%80%E0%B8%A7%E0%B8%A5%E0%B8%B2%20%E0%B8%AA%E0%B8%96%E0%B8%B2%E0%B8%99%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B8%84%E0%B8%B1%E0%B8%94%E0%B9%80%E0%B8%A5%E0%B8%B7%E0%B8%AD%E0%B8%81%E0%B8%A5%E0%B8%B9%E0%B8%81%E0%B8%88%E0%B9%89%E0%B8%B2%E0%B8%87%E0%B8%AF.pdf"
|
"docUrl":"https://webportal.bangkok.go.th/public/user_files_editor/305/%E0%B8%9B%E0%B8%A3%E0%B8%B0%E0%B8%81%E0%B8%B2%E0%B8%A8%E0%B8%A7%E0%B8%B1%E0%B8%99%20%E0%B9%80%E0%B8%A7%E0%B8%A5%E0%B8%B2%20%E0%B8%AA%E0%B8%96%E0%B8%B2%E0%B8%99%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B8%84%E0%B8%B1%E0%B8%94%E0%B9%80%E0%B8%A5%E0%B8%B7%E0%B8%AD%E0%B8%81%E0%B8%A5%E0%B8%B9%E0%B8%81%E0%B8%88%E0%B9%89%E0%B8%B2%E0%B8%87%E0%B8%AF.pdf"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id":"19",
|
"id":"19",
|
||||||
"date":"2023/03/23","institute":"สำนักการแพทย์","institute_id":3,
|
"date":"2024/04/10","institute":"สำนักการแพทย์","institute_id":3,
|
||||||
"start":"2023-04-20",
|
"start":"2023-04-10",
|
||||||
"title":"วัน เวลา สถานที่ และระเบียบการคัดเลือกลูกจ้างกทม.",
|
"title":"ประกาศผล 10/2564",
|
||||||
"detail":"ประกาศรายชื่อผู้มีสิทธิเข้ารับการสอบคัดเลือกบุคคลภายนอกช่วยปฎิบัติราชการ"
|
"detail":"ประกาศรายชื่อผู้ผ่านการสอบคัดเลือกบุคคลภายนอกช่วยปฎิบัติราชการ 10/2564"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id":"18",
|
"id":"18",
|
||||||
"date":"2023/03/25","institute":"สำนักอนามัย","institute_id":2,
|
"date":"2023/04/05","institute":"สำนักอนามัย","institute_id":2,
|
||||||
"title":"ลูกจ้างและผู้ปฎิบัติงาน 1/2565",
|
"start":"2023-04-05T09:00:00",
|
||||||
"start":"2023-04-28T09:00:00",
|
"title":"สอบครั้งที่ 1/2565",
|
||||||
"detail":"ลูกจ้างและผู้ปฎิบัติงานในกรุงเทพมหานคร เป็นข้าราชการกรุงเทพมหานคร",
|
"detail":"สอบเป็นลูกจ้างและผู้ปฎิบัติงานในกรุงเทพมหานคร เป็นข้าราชการกรุงเทพมหานคร",
|
||||||
"docurl":"https://webportal.bangkok.go.th/public/user_files_editor/305/%E0%B8%9B%E0%B8%A3%E0%B8%B0%E0%B8%81%E0%B8%B2%E0%B8%A8%E0%B8%84%E0%B8%B1%E0%B8%94%E0%B9%80%E0%B8%A5%E0%B8%B7%E0%B8%AD%E0%B8%81%E0%B8%A5%E0%B8%B9%E0%B8%81%E0%B8%88%E0%B9%89%E0%B8%B2%E0%B8%87.pdf"
|
"docurl":"https://webportal.bangkok.go.th/public/user_files_editor/305/%E0%B8%9B%E0%B8%A3%E0%B8%B0%E0%B8%81%E0%B8%B2%E0%B8%A8%E0%B8%84%E0%B8%B1%E0%B8%94%E0%B9%80%E0%B8%A5%E0%B8%B7%E0%B8%AD%E0%B8%81%E0%B8%A5%E0%B8%B9%E0%B8%81%E0%B8%88%E0%B9%89%E0%B8%B2%E0%B8%87.pdf"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id":"17",
|
"id":"17",
|
||||||
"date":"2023/03/25","institute":"สำนักงาน ก.ก.","institute_id":1,
|
"date":"2023/03/10","institute":"สำนักงาน ก.ก.","institute_id":1,
|
||||||
"title":"ลูกจ้างและผู้ปฎิบัติงาน 1/2565",
|
"title":"รับสมัครสอบตำแหน่งลูกจ้างและผู้ปฎิบัติงาน 1/2565",
|
||||||
"start":"2023-04-28T09:00:00",
|
"start":"2023-04-01T09:00:00",
|
||||||
"detail":"ลูกจ้างและผู้ปฎิบัติงานในกรุงเทพมหานคร เป็นข้าราชการกรุงเทพมหานคร",
|
"detail":"รับสมัครสอบตำแหน่ง ลูกจ้างและผู้ปฎิบัติงานในกรุงเทพมหานคร เป็นข้าราชการกรุงเทพมหานคร",
|
||||||
"docurl":"https://webportal.bangkok.go.th/public/user_files_editor/305/%E0%B8%9B%E0%B8%A3%E0%B8%B0%E0%B8%81%E0%B8%B2%E0%B8%A8%E0%B8%84%E0%B8%B1%E0%B8%94%E0%B9%80%E0%B8%A5%E0%B8%B7%E0%B8%AD%E0%B8%81%E0%B8%A5%E0%B8%B9%E0%B8%81%E0%B8%88%E0%B9%89%E0%B8%B2%E0%B8%87.pdf"
|
"docurl":"https://webportal.bangkok.go.th/public/user_files_editor/305/%E0%B8%9B%E0%B8%A3%E0%B8%B0%E0%B8%81%E0%B8%B2%E0%B8%A8%E0%B8%84%E0%B8%B1%E0%B8%94%E0%B9%80%E0%B8%A5%E0%B8%B7%E0%B8%AD%E0%B8%81%E0%B8%A5%E0%B8%B9%E0%B8%81%E0%B8%88%E0%B9%89%E0%B8%B2%E0%B8%87.pdf"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,6 @@
|
||||||
import { page } from '$app/stores';
|
import { page } from '$app/stores';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<h1>{$page.error?.message}</h1>
|
<div class="p-10">
|
||||||
|
<h1>{$page.error?.message}</h1>
|
||||||
<div>
|
</div>
|
||||||
มีบางอย่างไม่ถูกต้องกรุณาติดต่อ 02-xxxxxxxx
|
|
||||||
</div>
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,8 @@ export const load: PageServerLoad = async () => {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
events.push({id,title,start,backgroundColor})
|
const url = "/qualifying/"+id
|
||||||
|
events.push({id,title,start,url,backgroundColor})
|
||||||
})
|
})
|
||||||
return {exams,events}
|
return {exams,events}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,18 @@
|
||||||
|
|
||||||
import type { PageServerLoad } from './$types'
|
import type { PageServerLoad } from './$types'
|
||||||
|
import { error } from '@sveltejs/kit'
|
||||||
|
import {getQualifyExams} from "$lib/data/info"
|
||||||
export const load: PageServerLoad = async ({params}) => {
|
export const load: PageServerLoad = async ({params}) => {
|
||||||
const id = params.id
|
const id = params.id+""
|
||||||
return {id}
|
const exams = await getQualifyExams()
|
||||||
|
const post = exams.find((q)=>{
|
||||||
|
return q.id===id
|
||||||
|
})
|
||||||
|
|
||||||
|
if(post)
|
||||||
|
return post
|
||||||
|
else
|
||||||
|
throw error(404,{message:"ค้นหาโพสเกี่ยวกับการคัดเลือกไม่พบ"})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue