summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/[lng]/evcp/(evcp)/basic-contract-template/page.tsx2
-rw-r--r--app/[lng]/procurement/(procurement)/basic-contract-template/page.tsx2
-rw-r--r--app/api/admin/clear-test-data/route.ts17
3 files changed, 13 insertions, 8 deletions
diff --git a/app/[lng]/evcp/(evcp)/basic-contract-template/page.tsx b/app/[lng]/evcp/(evcp)/basic-contract-template/page.tsx
index 189d29e0..f4cab5a0 100644
--- a/app/[lng]/evcp/(evcp)/basic-contract-template/page.tsx
+++ b/app/[lng]/evcp/(evcp)/basic-contract-template/page.tsx
@@ -36,7 +36,7 @@ export default async function IndexPage(props: IndexPageProps) {
<div>
<div className="flex items-center gap-2">
<h2 className="text-2xl font-bold tracking-tight">
- 기본계약서 템플릿 관리
+ 기본 계약문서 관리
</h2>
<InformationButton pagePath="evcp/basic-contract-template" />
</div>
diff --git a/app/[lng]/procurement/(procurement)/basic-contract-template/page.tsx b/app/[lng]/procurement/(procurement)/basic-contract-template/page.tsx
index 77f6239f..26108323 100644
--- a/app/[lng]/procurement/(procurement)/basic-contract-template/page.tsx
+++ b/app/[lng]/procurement/(procurement)/basic-contract-template/page.tsx
@@ -34,7 +34,7 @@ export default async function IndexPage(props: IndexPageProps) {
<div className="flex items-center justify-between space-y-2">
<div>
<h2 className="text-2xl font-bold tracking-tight">
- 기본계약서 템플릿 관리
+ 기본 계약문서 관리
</h2>
{/* <p className="text-muted-foreground">
기본계약서를 비롯하여 초기 서명이 필요한 문서를 등록하고 편집할 수 있습니다. 활성화된 템플릿이 서명 요청의 리스트에 나타나게 됩니다..{" "}
diff --git a/app/api/admin/clear-test-data/route.ts b/app/api/admin/clear-test-data/route.ts
index 8442e5de..b54adf34 100644
--- a/app/api/admin/clear-test-data/route.ts
+++ b/app/api/admin/clear-test-data/route.ts
@@ -1,9 +1,9 @@
// app/api/admin/clear-test-data/route.ts
import db from '@/db/db'
-import {
- formEntries,
- forms,
- formMetas,
+import {
+ formEntries,
+ forms,
+ formMetas,
tags,
tagTypes,
tagSubfields,
@@ -19,7 +19,7 @@ export async function DELETE(request: NextRequest) {
try {
// 외래키 참조 순서를 고려하여 삭제 (자식 테이블부터 부모 테이블 순)
console.log('Clearing all test data...')
-
+
const deletedCounts = {
tagClassAttributes: 0,
tagClasses: 0,
@@ -28,6 +28,7 @@ export async function DELETE(request: NextRequest) {
tagTypes: 0,
tagTypeClassFormMappings: 0,
vendorDataReportTemps: 0,
+ templateItems:0,
formEntries: 0,
tags: 0,
forms: 0,
@@ -59,6 +60,10 @@ export async function DELETE(request: NextRequest) {
deletedCounts.tagTypes = deletedTagTypes.rowCount || 0
console.log('Deleted tag types:', deletedCounts.tagTypes)
+ const deletedTemplateItems = await db.delete(templateItems);
+ deletedCounts.templateItems = deletedTemplateItems.rowCount || 0;
+ console.log('Deleted template items:', deletedCounts.templateItems);
+
// 6. tagTypeClassFormMappings 삭제
const deletedMappings = await db.delete(tagTypeClassFormMappings)
deletedCounts.tagTypeClassFormMappings = deletedMappings.rowCount || 0
@@ -121,7 +126,7 @@ export async function GET() {
method: 'DELETE',
tables: [
'tagClassAttributes',
- 'tagClasses',
+ 'tagClasses',
'tagSubfieldOptions',
'tagSubfields',
'tagTypes',