Add new exam event, Add support positions
This commit is contained in:
parent
c1711883fc
commit
27b595206f
5 changed files with 48 additions and 15 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
API_CMS_URL="/api"
|
API_CMS_URL="/api"
|
||||||
API_QUALIFYING_URL="/api"
|
API_QUALIFYING_URL="/api"
|
||||||
API_COMPETITIVE_URL="/api"
|
API_COMPETITIVE_URL="/api"
|
||||||
|
PUBLIC_URL_REGISTER_QUALIFY_EXAM="https://bma-ehr-exam.frappet.synology.me"
|
||||||
|
|
||||||
# API_CMS_URL="https://bma-ehr-exam.frappet.synology.me/api/v1/cms"
|
# API_CMS_URL="https://bma-ehr-exam.frappet.synology.me/api/v1/cms"
|
||||||
# API_QUALIFYING_URL="https://bma-ehr-exam.frappet.synology.me/api/v1/cms"
|
# API_QUALIFYING_URL="https://bma-ehr-exam.frappet.synology.me/api/v1/cms"
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,20 @@ export interface Exam {
|
||||||
end?:string;
|
end?:string;
|
||||||
exam_date?:string;
|
exam_date?:string;
|
||||||
announcement_date?:string;
|
announcement_date?:string;
|
||||||
|
announcement_endDate?:string;
|
||||||
|
announcementExam?:boolean;
|
||||||
|
register_startDate?:string;
|
||||||
|
register_endDate?:string;
|
||||||
|
payment_startDate?:string;
|
||||||
|
payment_endDate?:string;
|
||||||
category_id?:string
|
category_id?:string
|
||||||
category:string
|
category?:string
|
||||||
image?:string;
|
image?:string;
|
||||||
images?:{title:string,url:string}[];
|
images?:{title:string,url:string}[];
|
||||||
files?:{title:string,url:string}[];
|
files?:{title:string,url:string}[];
|
||||||
|
positions?:{id:string,title:string,path:string}[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CalendarEvent {
|
export interface CalendarEvent {
|
||||||
id:string;
|
id:string;
|
||||||
title:string;
|
title:string;
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,20 @@
|
||||||
"id":"21",
|
"id":"21",
|
||||||
"category":"สำนักงาน ก.ก.","category_id":"1",
|
"category":"สำนักงาน ก.ก.","category_id":"1",
|
||||||
"start":"2023-04-24",
|
"start":"2023-04-24",
|
||||||
|
"end": "2023-04-26",
|
||||||
|
"exam_date": "2023-04-05",
|
||||||
|
"announcement_date": "2023-03-05",
|
||||||
|
"announcement_endDate": "2023-05-05",
|
||||||
|
"announcementExam": false,
|
||||||
|
"register_startDate": "2023-04-05",
|
||||||
|
"register_endDate": "2023-04-05",
|
||||||
|
"payment_startDate": "2023-04-05",
|
||||||
|
"payment_endDate": "2023-04-05",
|
||||||
"title":"ด่วน !! ประกาศวัน เวลา สถานที่ และระเบียบการคัดเลือกลูกจ้างกทม.",
|
"title":"ด่วน !! ประกาศวัน เวลา สถานที่ และระเบียบการคัดเลือกลูกจ้างกทม.",
|
||||||
"detail":"<p><center><img src='https://webportal.bangkok.go.th/public/user_files_editor/305/bkkgovjob202303_12.jpg'></center></p><br/><center><h2>สำนักงานคณะกรรมการข้าราชการกรุงเทพมหานคร ประกาศกำหนดวัน เวลา สถานที่คัดเลือก และระเบียบ เกี่ยวกับการคัดเลือกบุคลากรกรุงเทพมหานครหรือผู้ปฏิบัติงานอื่นในกรุงเทพมหานครเพื่อบรรจุและแต่งตั้ง เป็นข้าราชการกรุงเทพมหานครสามัญ ครั้งที่ 1 / 2565</h2></center>",
|
"detail":"<p><center><img src='https://webportal.bangkok.go.th/public/user_files_editor/305/bkkgovjob202303_12.jpg'></center></p><br/><center><h2>สำนักงานคณะกรรมการข้าราชการกรุงเทพมหานคร ประกาศกำหนดวัน เวลา สถานที่คัดเลือก และระเบียบ เกี่ยวกับการคัดเลือกบุคลากรกรุงเทพมหานครหรือผู้ปฏิบัติงานอื่นในกรุงเทพมหานครเพื่อบรรจุและแต่งตั้ง เป็นข้าราชการกรุงเทพมหานครสามัญ ครั้งที่ 1 / 2565</h2></center>",
|
||||||
|
"positions":[
|
||||||
|
{"id":"2","title":"ผู้คุมงานทำความสะอาด","path":"2/21"}
|
||||||
|
],
|
||||||
"images":[
|
"images":[
|
||||||
{
|
{
|
||||||
"title":"topic",
|
"title":"topic",
|
||||||
|
|
|
||||||
|
|
@ -13,23 +13,33 @@ export const load: PageServerLoad = async ({fetch}) => {
|
||||||
const events:CalendarEvent[]=[]
|
const events:CalendarEvent[]=[]
|
||||||
|
|
||||||
exams.forEach((ex)=>{
|
exams.forEach((ex)=>{
|
||||||
const {id,title,start,end,category} = ex
|
const {id,category,start} = ex
|
||||||
if(!category)
|
const backgroundColor = category? getBgColorDict(category,catColor):"n/a"
|
||||||
return
|
|
||||||
const backgroundColor = getBgColorDict(category,catColor)
|
|
||||||
|
|
||||||
const url = "/qualifying/"+id
|
const url = "/qualifying/"+id
|
||||||
if(start){
|
if(start){
|
||||||
ex.date = dayjs(start).format("DD MMM BBBB")
|
ex.date = dayjs(start).format("DD MMM BBBB")
|
||||||
events.push({id,title,start,end,url,backgroundColor})
|
|
||||||
}
|
}
|
||||||
|
if(!ex.announcementExam)
|
||||||
|
return
|
||||||
if(ex.exam_date){
|
if(ex.exam_date){
|
||||||
events.push({id,"title":"วันสอบคัดเลือก","start":ex.exam_date,url,backgroundColor})
|
const start = ex.exam_date
|
||||||
|
events.push({id,"title":"วันสอบคัดเลือก",start,url,backgroundColor})
|
||||||
}
|
}
|
||||||
if(ex.announcement_date){
|
if(ex.announcement_date){
|
||||||
events.push({id,"title":"ผลสอบคัดเลือก","start":ex.announcement_date,url,backgroundColor})
|
const start = ex.announcement_date
|
||||||
|
const end = ex.announcement_endDate
|
||||||
|
events.push({id,"title":"ผลสอบคัดเลือก",start,end,url,backgroundColor})
|
||||||
|
}
|
||||||
|
if(ex.register_startDate){
|
||||||
|
const start = ex.register_startDate
|
||||||
|
const end = ex.register_endDate
|
||||||
|
events.push({id,"title":"ผลสอบคัดเลือก",start,end,url,backgroundColor})
|
||||||
|
}
|
||||||
|
if(ex.payment_startDate){
|
||||||
|
const start = ex.payment_startDate
|
||||||
|
const end = ex.payment_endDate
|
||||||
|
events.push({id,"title":"ผลสอบคัดเลือก",start,end,url,backgroundColor})
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
return {exams,events}
|
return {exams,events}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { PageData } from './$types'
|
import type { PageData } from './$types'
|
||||||
export let data: PageData;
|
export let data: PageData;
|
||||||
|
import { env } from '$env/dynamic/public'
|
||||||
|
const positions_base_url = env.PUBLIC_URL_REGISTER_QUALIFY_EXAM+"/exam/"
|
||||||
</script>
|
</script>
|
||||||
<section>
|
<section>
|
||||||
<div class="p-one parallax-inner">
|
<div class="p-one parallax-inner">
|
||||||
|
|
@ -39,19 +41,19 @@
|
||||||
<div><img src={i.url} alt={i.title}></div>
|
<div><img src={i.url} alt={i.title}></div>
|
||||||
{/each}
|
{/each}
|
||||||
{/if}
|
{/if}
|
||||||
{#if data.regi}
|
{#if data.positions}
|
||||||
<div class="{data.regi.length == 0 ? 'display-none': 'w-12/12 text-lg font-medium'}">สมัครสอบ</div>
|
<div class="w-12/12 text-lg font-medium">สมัครสอบ</div>
|
||||||
{#each data.regi as regi}
|
{#each data.positions as p}
|
||||||
<hr class="border-blueGray-200 my-2" />
|
<hr class="border-blueGray-200 my-2" />
|
||||||
|
|
||||||
<div class="text-lg py-1">
|
<div class="text-lg py-1">
|
||||||
<div class="flex flex-wrap items-center">
|
<div class="flex flex-wrap items-center">
|
||||||
<a class="btn btn-sm btn-outline btn-info cursor-pointe" href={regi.url} target="_blank">
|
<a class="btn btn-sm btn-outline btn-info cursor-pointe" href={positions_base_url+p.path} target="_blank">
|
||||||
<i class="fa-solid fa-pen-to-square text-sm pr-2"></i>
|
<i class="fa-solid fa-pen-to-square text-sm pr-2"></i>
|
||||||
สมัครสอบ
|
สมัครสอบ
|
||||||
</a>
|
</a>
|
||||||
<div class="pl-4">
|
<div class="pl-4">
|
||||||
<span>{regi.title}</span>
|
<span>{p.title}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue