chore(WEB): 다수 컴포넌트 개선 및 CEO 대시보드 추가
- CEO 대시보드 컴포넌트 추가 - AuthenticatedLayout 개선 - 각 모듈 actions.ts 에러 핸들링 개선 - API fetch-wrapper, refresh-token 로직 개선 - ReceivablesStatus 컴포넌트 업데이트 - globals.css 스타일 업데이트 - 기타 다수 컴포넌트 수정 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
|
||||
'use server';
|
||||
|
||||
|
||||
import { isRedirectError } from 'next/dist/client/components/redirect';
|
||||
import { serverFetch } from '@/lib/api/fetch-wrapper';
|
||||
import type { ReferenceRecord, ApprovalType, DocumentStatus } from './types';
|
||||
|
||||
@@ -185,6 +187,7 @@ export async function getReferences(params?: {
|
||||
lastPage: result.data.last_page,
|
||||
};
|
||||
} catch (error) {
|
||||
if (isRedirectError(error)) throw error;
|
||||
console.error('[ReferenceBoxActions] getReferences error:', error);
|
||||
return { data: [], total: 0, lastPage: 1 };
|
||||
}
|
||||
@@ -206,6 +209,7 @@ export async function getReferenceSummary(): Promise<{ all: number; read: number
|
||||
unread: unreadResult.total,
|
||||
};
|
||||
} catch (error) {
|
||||
if (isRedirectError(error)) throw error;
|
||||
console.error('[ReferenceBoxActions] getReferenceSummary error:', error);
|
||||
return null;
|
||||
}
|
||||
@@ -242,6 +246,7 @@ export async function markAsRead(id: string): Promise<{ success: boolean; error?
|
||||
|
||||
return { success: true };
|
||||
} catch (error) {
|
||||
if (isRedirectError(error)) throw error;
|
||||
console.error('[ReferenceBoxActions] markAsRead error:', error);
|
||||
return {
|
||||
success: false,
|
||||
@@ -281,6 +286,7 @@ export async function markAsUnread(id: string): Promise<{ success: boolean; erro
|
||||
|
||||
return { success: true };
|
||||
} catch (error) {
|
||||
if (isRedirectError(error)) throw error;
|
||||
console.error('[ReferenceBoxActions] markAsUnread error:', error);
|
||||
return {
|
||||
success: false,
|
||||
|
||||
Reference in New Issue
Block a user