feat(WEB): 상세 페이지 권한 체계 통합 및 레이아웃/문서 기능 개선

권한 시스템 통합:
- BadDebtDetail, LaborDetail, PricingDetail 권한 로직 정리
- BoardDetail, ClientDetail, ItemDetail 권한 적용 개선
- ProcessDetail, StepDetail, PermissionDetail 권한 리팩토링
- ContractDetail, HandoverReport, ProgressBilling 권한 연동
- ReceivingDetail, ShipmentDetail, WorkOrderDetail 권한 적용
- InspectionDetail, OrderSalesDetail, QuoteFooterBar 권한 개선

기능 개선:
- AuthenticatedLayout 구조 리팩토링
- JointbarInspectionDocument 문서 레이아웃 개선
- PricingTableForm 폼 기능 보강
- DynamicItemForm, SectionsTab 개선
- 주문관리 상세/생산지시 페이지 개선
- VendorLedgerDetail 수정

설정:
- Claude hooks 추가 (빌드 차단, 파일 크기 체크, 미사용 import 체크)
- 품질감사 문서관리 계획 문서 추가

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
유병철
2026-02-04 20:26:27 +09:00
parent c1b63b850a
commit bb7e7a75e9
30 changed files with 737 additions and 665 deletions

View File

@@ -1046,22 +1046,26 @@ export default function DynamicItemForm({
/>
{/* 하단 액션 버튼 (sticky) */}
<div className={`fixed bottom-6 ${sidebarCollapsed ? 'left-[156px]' : 'left-[316px]'} right-[48px] px-6 py-3 bg-background/95 backdrop-blur rounded-xl border shadow-lg z-50 transition-all duration-300 flex items-center justify-between`}>
<div className={`fixed bottom-4 left-4 right-4 px-4 py-3 bg-background/95 backdrop-blur rounded-xl border shadow-lg z-50 transition-all duration-300 md:bottom-6 md:px-6 md:right-[48px] ${sidebarCollapsed ? 'md:left-[156px]' : 'md:left-[316px]'} flex items-center justify-between`}>
<Button
type="button"
variant="outline"
onClick={() => router.back()}
disabled={isSubmitting}
size="sm"
className="md:size-default"
>
<X className="h-4 w-4 mr-2" />
<X className="h-4 w-4 md:mr-2" />
<span className="hidden md:inline"></span>
</Button>
<Button
type="submit"
disabled={!selectedItemType || isSubmitting}
size="sm"
className="md:size-default"
>
<Save className="h-4 w-4 mr-2" />
{isSubmitting ? '저장 중...' : '저장'}
<Save className="h-4 w-4 md:mr-2" />
<span className="hidden md:inline">{isSubmitting ? '저장 중...' : '저장'}</span>
</Button>
</div>
</form>

View File

@@ -618,22 +618,26 @@ export default function ItemDetailClient({ item }: ItemDetailClientProps) {
)}
{/* 하단 액션 버튼 (sticky) */}
<div className={`fixed bottom-6 ${sidebarCollapsed ? 'left-[156px]' : 'left-[316px]'} right-[48px] px-6 py-3 bg-background/95 backdrop-blur rounded-xl border shadow-lg z-50 transition-all duration-300 flex items-center justify-between`}>
<div className={`fixed bottom-4 left-4 right-4 px-4 py-3 bg-background/95 backdrop-blur rounded-xl border shadow-lg z-50 transition-all duration-300 md:bottom-6 md:px-6 md:right-[48px] ${sidebarCollapsed ? 'md:left-[156px]' : 'md:left-[316px]'} flex items-center justify-between`}>
<Button
type="button"
variant="outline"
onClick={() => router.back()}
size="sm"
className="md:size-default"
>
<ArrowLeft className="w-4 h-4 mr-2" />
<ArrowLeft className="w-4 h-4 md:mr-2" />
<span className="hidden md:inline"></span>
</Button>
{canUpdate && (
<Button
type="button"
onClick={() => router.push(`/production/screen-production/${encodeURIComponent(item.itemCode)}?mode=edit&type=${item.itemType}&id=${item.id}`)}
size="sm"
className="md:size-default"
>
<Edit className="w-4 h-4 mr-2" />
<Edit className="w-4 h-4 md:mr-2" />
<span className="hidden md:inline"></span>
</Button>
)}
</div>

View File

@@ -84,11 +84,11 @@ export function SectionsTab({
return (
<Card>
<CardHeader>
<div className="flex items-center justify-between">
<div className="flex items-center gap-3">
<div>
<div className="flex items-start justify-between gap-2">
<div className="flex items-center gap-3 min-w-0">
<div className="min-w-0">
<CardTitle> 릿 </CardTitle>
<CardDescription> 릿 </CardDescription>
<CardDescription className="truncate"> 릿 </CardDescription>
</div>
{/* 변경사항 배지 - 나중에 사용 예정으로 임시 숨김 */}
{false && hasUnsavedChanges && pendingChanges.sectionTemplates.length > 0 && (
@@ -97,8 +97,8 @@ export function SectionsTab({
</Badge>
)}
</div>
<Button onClick={() => setIsSectionTemplateDialogOpen(true)}>
<Plus className="h-4 w-4 mr-2" />
<Button size="sm" className="shrink-0" onClick={() => setIsSectionTemplateDialogOpen(true)}>
<Plus className="h-4 w-4 md:mr-2" /><span className="hidden md:inline"></span>
</Button>
</div>
</CardHeader>
@@ -143,19 +143,19 @@ export function SectionsTab({
{sectionTemplates.filter(t => t.section_type !== 'BOM').map((template) => (
<Card key={template.id}>
<CardHeader className="pb-3">
<div className="flex items-center justify-between">
<div className="flex items-center gap-3 flex-1">
<Folder className="h-5 w-5 text-blue-500" />
<div className="flex-1">
<CardTitle className="text-base">{template.template_name}</CardTitle>
<div className="flex items-start justify-between gap-2">
<div className="flex items-center gap-3 min-w-0 flex-1">
<Folder className="h-5 w-5 text-blue-500 shrink-0" />
<div className="min-w-0 flex-1">
<CardTitle className="text-base truncate">{template.template_name}</CardTitle>
{template.description && (
<CardDescription className="text-sm mt-0.5">{template.description}</CardDescription>
<CardDescription className="text-sm mt-0.5 truncate">{template.description}</CardDescription>
)}
</div>
</div>
<div className="flex items-center gap-2">
<div className="flex items-center gap-1 shrink-0">
{template.category && template.category.length > 0 && (
<div className="flex flex-wrap gap-1 mr-2">
<div className="hidden md:flex flex-wrap gap-1 mr-2">
{template.category.map((cat, idx) => (
<Badge key={idx} variant="secondary" className="text-xs">
{ITEM_TYPE_OPTIONS.find(t => t.value === cat)?.label || cat}
@@ -193,11 +193,11 @@ export function SectionsTab({
</div>
</CardHeader>
<CardContent>
<div className="mb-4 flex items-center justify-between">
<div className="mb-4 flex flex-col gap-2 md:flex-row md:items-center md:justify-between">
<p className="text-sm text-muted-foreground">
릿
</p>
<div className="flex gap-2">
<div className="flex gap-2 shrink-0">
{setIsImportFieldDialogOpen && setImportFieldTargetSectionId && (
<Button
size="sm"
@@ -243,27 +243,27 @@ export function SectionsTab({
{template.fields.map((field, index) => (
<div
key={`${template.id}-${field.id}-${index}`}
className="flex items-center justify-between p-3 border rounded hover:bg-gray-50 transition-colors"
className="flex items-center justify-between gap-2 p-3 border rounded hover:bg-gray-50 transition-colors"
>
<div className="flex-1">
<div className="flex items-center gap-2">
<GripVertical className="h-4 w-4 text-gray-400" />
<div className="flex-1 min-w-0">
<div className="flex items-center gap-1.5 flex-wrap">
<GripVertical className="h-4 w-4 text-gray-400 shrink-0" />
<span className="text-sm font-medium">{field.name}</span>
<Badge variant="outline" className="text-xs">
<Badge variant="outline" className="text-xs shrink-0">
{INPUT_TYPE_OPTIONS.find(t => t.value === field.property.inputType)?.label}
</Badge>
{field.property.required && (
<Badge variant="destructive" className="text-xs"></Badge>
<Badge variant="destructive" className="text-xs shrink-0"></Badge>
)}
</div>
<div className="ml-6 text-xs text-gray-500 mt-1">
<div className="ml-6 text-xs text-gray-500 mt-1 truncate">
: {field.fieldKey}
{field.description && (
<span className="ml-2"> {field.description}</span>
)}
</div>
</div>
<div className="flex gap-2">
<div className="flex gap-1 shrink-0">
<Button
size="sm"
variant="ghost"
@@ -307,19 +307,19 @@ export function SectionsTab({
{sectionTemplates.filter(t => t.section_type === 'BOM').map((template) => (
<Card key={template.id}>
<CardHeader className="pb-3">
<div className="flex items-center justify-between">
<div className="flex items-center gap-3 flex-1">
<Package className="h-5 w-5 text-green-500" />
<div className="flex-1">
<CardTitle className="text-base">{template.template_name}</CardTitle>
<div className="flex items-start justify-between gap-2">
<div className="flex items-center gap-3 min-w-0 flex-1">
<Package className="h-5 w-5 text-green-500 shrink-0" />
<div className="min-w-0 flex-1">
<CardTitle className="text-base truncate">{template.template_name}</CardTitle>
{template.description && (
<CardDescription className="text-sm mt-0.5">{template.description}</CardDescription>
<CardDescription className="text-sm mt-0.5 truncate">{template.description}</CardDescription>
)}
</div>
</div>
<div className="flex items-center gap-2">
<div className="flex items-center gap-1 shrink-0">
{template.category && template.category.length > 0 && (
<div className="flex flex-wrap gap-1 mr-2">
<div className="hidden md:flex flex-wrap gap-1 mr-2">
{template.category.map((cat, idx) => (
<Badge key={idx} variant="secondary" className="text-xs">
{ITEM_TYPE_OPTIONS.find(t => t.value === cat)?.label || cat}