diff options
Diffstat (limited to 'lib/docu-list-rule/document-class/service.ts')
| -rw-r--r-- | lib/docu-list-rule/document-class/service.ts | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/docu-list-rule/document-class/service.ts b/lib/docu-list-rule/document-class/service.ts index 378c3215..29ed2642 100644 --- a/lib/docu-list-rule/document-class/service.ts +++ b/lib/docu-list-rule/document-class/service.ts @@ -593,4 +593,29 @@ export async function deleteDocumentClassOption(id: number) { error: "Failed to delete document class option" } } +} + +// 프로젝트 일정 설정을 가져오는 함수 +export async function getProjectKindScheduleSetting(projectCode: string): Promise<ScheduleSetting[]> { + try { + const response = await fetch( + `http://60.100.99.217/DDP/Services/VNDRService.svc/GetProjectKindScheduleSetting?PROJ_NO=${projectCode}`, + { + method: 'GET', + headers: { + 'Content-Type': 'application/json', + }, + } + ) + + if (!response.ok) { + throw new Error('Failed to fetch schedule settings') + } + + const data = await response.json() + return data.GetProjectKindScheduleSettingResult || [] + } catch (error) { + console.error('Error fetching schedule settings:', error) + return [] + } }
\ No newline at end of file |
