-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into chin-fe/fdr-78-scan-qr-and-staff-profile
- Loading branch information
Showing
14 changed files
with
392 additions
and
76 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
import { useRouter } from 'next/navigation'; | ||
import Image from 'next/image'; | ||
import Success from '@public/success-white.svg'; | ||
import BaseModal from '@/components/rpkm/Modal/BaseModal'; | ||
import ModalButton from '@/components/rpkm/Modal/ModalButton'; | ||
import modalStyles from '@/components/rpkm/Modal/ModalStyle'; | ||
|
||
interface JoinModalProps { | ||
modal: boolean; | ||
setModal: (value: boolean) => void; | ||
isJoined: boolean; | ||
checkInConfirm: () => void; | ||
} | ||
|
||
const JoinModal: React.FC<JoinModalProps> = ({ | ||
modal, | ||
setModal, | ||
isJoined, | ||
checkInConfirm, | ||
}) => { | ||
const router = useRouter(); | ||
|
||
const HandleOnClick = () => { | ||
router.push('/rpkm/activities/home'); | ||
}; | ||
|
||
if (!isJoined) { | ||
const { button } = modalStyles['red']; | ||
return ( | ||
<BaseModal | ||
variant="red" | ||
open={modal} | ||
> | ||
<div className="flex items-center justify-center max-w-80 flex-col space-y-2 px-4 py-3"> | ||
<h1 className="text-3xl font-semibold text-white"> | ||
ยืนยันการเข้าร่วมงาน | ||
</h1> | ||
<p className="text-white text-sm text-center">ยืนยันการเข้าร่วมงาน</p> | ||
</div> | ||
<div className="flex flex-row gap-x-5 pb-3 justify-center"> | ||
<ModalButton | ||
callBackFunction={() => setModal(false)} | ||
borderClassName={button['cancel-border']} | ||
backgroundClassName={button['cancel-background']} | ||
> | ||
ยกเลิก | ||
</ModalButton> | ||
<ModalButton | ||
callBackFunction={() => { | ||
setModal(false); | ||
checkInConfirm(); | ||
}} | ||
borderClassName={button['accept-border']} | ||
backgroundClassName={button['accept-background']} | ||
> | ||
ยืนยัน | ||
</ModalButton> | ||
</div> | ||
</BaseModal> | ||
); | ||
} | ||
const { button } = modalStyles['green']; | ||
return ( | ||
<BaseModal | ||
variant="green" | ||
open={true} | ||
> | ||
<div className="flex items-center justify-center max-w-80 flex-col space-y-2 px-12 py-3"> | ||
<Image | ||
src={Success} | ||
alt="success" | ||
className="size-[30%]" | ||
/> | ||
<h1 className="text-3xl font-semibold text-white">ยืนยันสำเร็จ!</h1> | ||
<p className="text-white text-sm text-center"> | ||
แล้วพบกันวันที่ 3 สิงหาคม 2567 | ||
</p> | ||
</div> | ||
<div className="flex flex-row gap-x-5 pb-3 justify-center"> | ||
<ModalButton | ||
callBackFunction={HandleOnClick} | ||
borderClassName={button['cancel-border']} | ||
backgroundClassName={button['cancel-background']} | ||
> | ||
ต่อไป | ||
</ModalButton> | ||
</div> | ||
</BaseModal> | ||
); | ||
}; | ||
|
||
export default JoinModal; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.