feat: 공지 팝업 시스템 구현 및 캘린더/어음/팝업관리 개선

- NoticePopupModal: 공지 팝업 컨테이너/actions 신규 구현
- AuthenticatedLayout에 공지 팝업 연동
- CalendarSection: 일정 타입 확장 및 UI 개선
- BillManagementClient: 기능 확장
- PopupManagement: popupDetailConfig 대폭 확장, 상세/폼 개선
- BoardForm/BoardManagement: 게시판 폼 개선
- LoginPage, logout, userStorage: 인증 관련 소폭 수정
- dashboard types 정비
- claudedocs: 공지팝업 구현, 캘린더 어음연동/일정타입, API changelog 문서 추가
This commit is contained in:
유병철
2026-03-10 15:16:41 +09:00
parent 7bd4bd38da
commit 397eb2c19c
23 changed files with 1004 additions and 79 deletions

View File

@@ -61,13 +61,14 @@ interface BoardFormProps {
initialData?: Post;
}
// 현재 로그인 사용자 정보 (실제로는 auth context에서 가져옴)
const CURRENT_USER = {
id: 'user1',
name: '홍길동',
department: '개발팀',
position: '과장',
};
// 로그인 사용자 이름을 가져오는 헬퍼
function getLoggedInUserName(): string {
if (typeof window === 'undefined') return '';
try {
const userDataStr = localStorage.getItem('user');
return userDataStr ? JSON.parse(userDataStr).name || '' : '';
} catch { return ''; }
}
// 상단 고정 최대 개수
const MAX_PINNED_COUNT = 5;
@@ -75,6 +76,12 @@ const MAX_PINNED_COUNT = 5;
export function BoardForm({ mode, initialData }: BoardFormProps) {
const router = useRouter();
// 로그인 사용자 이름
const [currentUserName, setCurrentUserName] = useState('');
useEffect(() => {
setCurrentUserName(getLoggedInUserName());
}, []);
// ===== 폼 상태 =====
const [boardCode, setBoardCode] = useState(initialData?.boardCode || '');
const [isPinned, setIsPinned] = useState(initialData?.isPinned ? 'true' : 'false');
@@ -330,7 +337,7 @@ export function BoardForm({ mode, initialData }: BoardFormProps) {
<div className="space-y-2">
<Label></Label>
<Input
value={CURRENT_USER.name}
value={currentUserName}
disabled
className="bg-gray-50"
/>

View File

@@ -117,8 +117,14 @@ export function BoardForm({ mode, board, onSubmit }: BoardFormProps) {
}));
};
// 작성자 (현재 로그인한 사용자 - mock)
const currentUser = '홍길동';
// 작성자 (로그인한 사용자)
const [currentUser, setCurrentUser] = useState('');
useEffect(() => {
const userDataStr = typeof window !== 'undefined' ? localStorage.getItem('user') : null;
if (userDataStr) {
try { setCurrentUser(JSON.parse(userDataStr).name || ''); } catch { /* ignore */ }
}
}, []);
// 등록일시
const registeredAt = mode === 'edit' && board ? formatDateTime(board.createdAt) : getCurrentDateTime();