-
-
-
- {
-
- }
-
-
-
- {name}
-
-
- รหัสนิสิต {studentId}
-
+ <>
+ {uploading && (
+
+
-
-
router.push('/edit')}
- >
+ )}
+
+
+ {disableEditIcon && (
+
+ )}
+
+ {currentPhotoUrl && (
+
+ )}
+
+
+
+ {name}
+
+
+ รหัสนิสิต {studentId}
+
+
+
+ {!disableEditIcon && (
+
router.push('/rpkm/edit')}
+ >
+
+
+ )}
-
+ >
);
};
diff --git a/src/components/rpkm/Baan/Section/BaanButtonsSection.tsx b/src/components/rpkm/Baan/Section/BaanButtonsSection.tsx
index 25f5c27e..76491f47 100644
--- a/src/components/rpkm/Baan/Section/BaanButtonsSection.tsx
+++ b/src/components/rpkm/Baan/Section/BaanButtonsSection.tsx
@@ -8,6 +8,9 @@ import { useRouter } from 'next/navigation';
import alertImg from '@public/alert.svg';
import Image from 'next/image';
import BackToHomeBtn from '../../BackToHomeBtn';
+import BaseModal from '../../Modal/BaseModal';
+import ModalButton from '../../Modal/ModalButton';
+import modalStyles from '../../Modal/ModalStyle';
interface BaanButtonsSectionProps {
mode: 'select' | 'edit';
@@ -25,13 +28,18 @@ const BaanButtonsSection: React.FC
= ({
onConfirm,
}) => {
const { removeAllBaanSelection } = useBaan();
- const [isModalOpen, setModalOpen] = useState(false);
+ const [modalState, setModalState] = useState<
+ 'first-confirm' | 'second-confirm' | 'none'
+ >('none');
const router = useRouter();
- const handleConfirm = () => setModalOpen(true);
- const handleModalConfirm = () => {
- setModalOpen(false);
+ const handleConfirm = () => setModalState('first-confirm');
+ const handleLastConfirm = () => {
+ setModalState('none');
onConfirm();
};
+ const handleFirstConfirm = () => {
+ setModalState('second-confirm');
+ };
if (isConfirmed) return null;
@@ -59,6 +67,7 @@ const BaanButtonsSection: React.FC = ({
*กรุณาเลือกให้ครบ 5 บ้าน
)}
+
*ระบบจะทำการบันทึกบ้านอัตโนมัติ
{selectedBaan && selectedBaan.length > 0 && (
setModalState('none')}
+ callBackFunction={handleFirstConfirm}
>
= ({
+
+
+
+
+ โปรดอ่านอีกครั้ง!!!
+
+
+ *เมื่อยืนยันแล้วจะไม่สามารถแก้ไขรายการของบ้าน
+ และจะไม่สามารถจับคู่กับเพื่อนได้อีก
+
+
+
+ {(() => {
+ const { button } = modalStyles['red'];
+ return (
+ <>
+
+ ยืนยัน
+
+ setModalState('none')}
+ borderClassName={button['cancel-border']}
+ backgroundClassName={button['cancel-background']}
+ >
+ ยกเลิก
+
+ >
+ );
+ })()}
+
+
>
)}
>
diff --git a/src/components/rpkm/Sidebar/UserInfo.tsx b/src/components/rpkm/Sidebar/UserInfo.tsx
index 96ba8df5..ee636420 100644
--- a/src/components/rpkm/Sidebar/UserInfo.tsx
+++ b/src/components/rpkm/Sidebar/UserInfo.tsx
@@ -27,7 +27,7 @@ function UserInfo() {
{user?.baan}
diff --git a/tailwind.config.ts b/tailwind.config.ts
index 7a314a66..7213d225 100644
--- a/tailwind.config.ts
+++ b/tailwind.config.ts
@@ -47,7 +47,7 @@ const config: Config = {
sopha: ['var(--sopha)', 'system-ui'],
},
dropShadow: {
- text: '0px 0px 4px 0px #00000040;',
+ font: '0 1.2px 1.2px rgba(0,0,0,0.8)',
},
animation: {
shake: 'shaking 60ms infinite',