휴가 신청 삭제시 로그파일에 기록되도록 함
This commit is contained in:
181
CLAUDE.md
181
CLAUDE.md
@@ -47,20 +47,6 @@ This is a Korean Enterprise GroupWare system built with C# .NET Framework 4.6 an
|
||||
- **Reports**: Microsoft ReportViewer 15.0
|
||||
- **Excel Processing**: libxl.net and CsvHelper 30.0.1
|
||||
|
||||
## Development Commands
|
||||
|
||||
### Building the Solution
|
||||
```bash
|
||||
# Build the entire solution
|
||||
msbuild EETGW.sln /p:Configuration=Debug /p:Platform="Any CPU"
|
||||
|
||||
# Build for release
|
||||
msbuild EETGW.sln /p:Configuration=Release /p:Platform="Any CPU"
|
||||
|
||||
# Build specific project
|
||||
msbuild Project/EETGW.csproj /p:Configuration=Debug
|
||||
```
|
||||
|
||||
### Running the Application
|
||||
- **Debug Mode**: Run from Visual Studio or build and execute the output from `Project/bin/Debug/`
|
||||
- **Web Server**: Automatically starts on port 7979 when the application launches
|
||||
@@ -113,4 +99,169 @@ msbuild Project/EETGW.csproj /p:Configuration=Debug
|
||||
- The application includes comprehensive error handling and logging
|
||||
- Multiple authentication methods including AD integration
|
||||
- Supports both Korean and English localization
|
||||
- Includes extensive reporting capabilities with RDLC files
|
||||
- Includes extensive reporting capabilities with RDLC files
|
||||
|
||||
## React Development Guidelines
|
||||
|
||||
### 파일 생성 및 프로젝트 등록 규칙
|
||||
|
||||
**❗ CRITICAL RULE**: 새로운 파일을 생성할 때마다 반드시 EETGW.csproj에 등록해야 합니다.
|
||||
|
||||
#### 자동 등록 필수사항
|
||||
1. **새 파일 생성 시**: Write 도구 사용 후 즉시 프로젝트 파일에 등록
|
||||
2. **등록 형식**:
|
||||
```xml
|
||||
<None Include="Web\wwwroot\[파일경로]">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
```
|
||||
3. **빌드 작업**: 없음 (`<None>` 태그 사용)
|
||||
4. **출력 디렉터리**: `PreserveNewest` (새 파일이면 복사)
|
||||
|
||||
#### 등록 대상 파일들
|
||||
- `Web\wwwroot\react\*.jsx` - React 컴포넌트
|
||||
- `Web\wwwroot\react-*.html` - React 페이지
|
||||
- `Web\wwwroot\*.html` - HTML 파일
|
||||
- `Web\wwwroot\*.js`, `Web\wwwroot\*.css` - 정적 자원
|
||||
|
||||
### React 아키텍처 패턴
|
||||
|
||||
#### 파일 구조
|
||||
- **컴포넌트**: `/Web/wwwroot/react/[ComponentName].jsx`
|
||||
- **페이지**: `/Web/wwwroot/react-[pagename].html`
|
||||
- **라우팅**: `ReactController`에서 `/react/[pagename]` 경로로 서빙
|
||||
|
||||
#### React 컴포넌트 구조
|
||||
```jsx
|
||||
// React 컴포넌트 기본 구조
|
||||
const { useState, useEffect, useRef } = React;
|
||||
|
||||
function ComponentName() {
|
||||
// 상태 관리
|
||||
const [data, setData] = useState({});
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
// API 연동
|
||||
const loadData = async () => {
|
||||
try {
|
||||
const response = await fetch('/Controller/Action');
|
||||
const result = await response.json();
|
||||
setData(result);
|
||||
} catch (error) {
|
||||
console.error('데이터 로드 실패:', error);
|
||||
}
|
||||
};
|
||||
|
||||
// 생명주기
|
||||
useEffect(() => {
|
||||
loadData();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div>
|
||||
{/* JSX 컨텐츠 */}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
#### HTML 페이지 구조
|
||||
```html
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<title>페이지명 (React)</title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<!-- Tailwind 설정 -->
|
||||
<!-- 스타일 정의 -->
|
||||
</head>
|
||||
<body>
|
||||
<div id="react-app-id">
|
||||
<!-- 로딩 스켈레톤 UI -->
|
||||
</div>
|
||||
|
||||
<!-- React CDN -->
|
||||
<script crossorigin src="https://unpkg.com/react@18/umd/react.development.js"></script>
|
||||
<script crossorigin src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>
|
||||
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
|
||||
|
||||
<!-- 컴포넌트 로드 -->
|
||||
<script type="text/babel" src="/react/component/ComponentName"></script>
|
||||
|
||||
<!-- 앱 초기화 -->
|
||||
<script type="text/babel">
|
||||
const root = ReactDOM.createRoot(document.getElementById('react-app-id'));
|
||||
root.render(<ComponentName />);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
### ReactController 패턴
|
||||
|
||||
```csharp
|
||||
[HttpGet]
|
||||
[Route("react/pagename")]
|
||||
public HttpResponseMessage PageName()
|
||||
{
|
||||
try
|
||||
{
|
||||
var wwwrootPath = GetWwwRootPath();
|
||||
var filePath = Path.Combine(wwwrootPath, "react-pagename.html");
|
||||
|
||||
if (!File.Exists(filePath))
|
||||
{
|
||||
return Request.CreateErrorResponse(HttpStatusCode.NotFound,
|
||||
$"React page not found: {filePath}");
|
||||
}
|
||||
|
||||
var content = File.ReadAllText(filePath, Encoding.UTF8);
|
||||
var response = Request.CreateResponse(HttpStatusCode.OK);
|
||||
response.Content = new StringContent(content, Encoding.UTF8, "text/html");
|
||||
|
||||
return response;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return Request.CreateErrorResponse(HttpStatusCode.InternalServerError,
|
||||
$"Error serving React page: {ex.Message}");
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 개발 워크플로우
|
||||
|
||||
1. **컴포넌트 생성**: `/react/ComponentName.jsx` 파일 생성
|
||||
2. **페이지 생성**: `/react-pagename.html` 파일 생성
|
||||
3. **프로젝트 등록**: EETGW.csproj에 두 파일 모두 등록
|
||||
4. **라우트 추가**: ReactController에 새 라우트 추가
|
||||
5. **테스트**: 빌드 후 `/react/pagename`으로 접근 테스트
|
||||
|
||||
### API 연동 가이드라인
|
||||
|
||||
- **병렬 호출**: `Promise.all()` 사용으로 성능 최적화
|
||||
- **에러 처리**: try-catch로 모든 API 호출 감싸기
|
||||
- **로딩 상태**: 사용자 경험을 위한 로딩 인디케이터 필수
|
||||
- **실시간 업데이트**: 중요한 데이터는 자동 새로고침 구현
|
||||
|
||||
### 디자인 시스템
|
||||
|
||||
- **CSS 프레임워크**: Tailwind CSS 사용
|
||||
- **색상 팔레트**: primary, success, warning, danger 정의
|
||||
- **글래스 효과**: `glass-effect` 클래스 활용
|
||||
- **애니메이션**: `animate-fade-in`, `animate-slide-up` 등
|
||||
- **반응형**: 모바일 퍼스트 접근법
|
||||
|
||||
### 품질 기준
|
||||
|
||||
- **접근성**: 키보드 네비게이션, 스크린 리더 지원
|
||||
- **성능**: 30초 자동 새로고침, 로딩 최적화
|
||||
- **에러 처리**: 사용자 친화적 오류 메시지
|
||||
- **호환성**: 모든 주요 브라우저 지원
|
||||
|
||||
### 주의사항
|
||||
|
||||
- 기존 시스템과 병행 개발 (`/react/` 하위에서 개발)
|
||||
- 기존 API 컨트롤러 최대한 재사용
|
||||
- 동일한 디자인 언어 유지 (색상, 폰트, 레이아웃)
|
||||
- 단계적 전환을 위한 라우팅 분리
|
||||
Reference in New Issue
Block a user