feat: [document] 범용 블록 빌더 Phase 1 구현

- block-editor.blade.php: 3패널 UI (Palette + Canvas + Properties)
- Alpine.js blockEditor() 컴포넌트 (CRUD, Undo/Redo, SortableJS)
- 기본 Block 6종: heading, paragraph, table, columns, divider, spacer
- 폼 필드 Block 7종: text, number, date, select, checkbox, textarea, signature
- BlockRendererService: JSON → HTML 렌더링 서비스
- 컨트롤러 분기: builder_type = 'block' → 블록 빌더 뷰
- 라우트 추가: block-create, block-edit
- API store/update에 schema JSON 처리 추가
- index 페이지에 블록 빌더 진입 버튼 추가
- 목록에 builder_type 뱃지 표시
This commit is contained in:
김보곤
2026-02-28 19:31:57 +09:00
parent cf5b62ba06
commit 97bdc5fbb3
11 changed files with 1484 additions and 7 deletions

View File

@@ -16,6 +16,7 @@ class DocumentTemplate extends Model
'tenant_id',
'name',
'category',
'builder_type',
'title',
'company_name',
'company_address',
@@ -23,6 +24,8 @@ class DocumentTemplate extends Model
'footer_remark_label',
'footer_judgement_label',
'footer_judgement_options',
'schema',
'page_config',
'is_active',
'linked_item_ids',
'linked_process_id',
@@ -30,10 +33,28 @@ class DocumentTemplate extends Model
protected $casts = [
'footer_judgement_options' => 'array',
'schema' => 'array',
'page_config' => 'array',
'linked_item_ids' => 'array',
'is_active' => 'boolean',
];
/**
* 블록 빌더 타입 여부
*/
public function isBlockBuilder(): bool
{
return $this->builder_type === 'block';
}
/**
* 레거시 빌더 타입 여부
*/
public function isLegacyBuilder(): bool
{
return $this->builder_type !== 'block';
}
/**
* 결재라인
*/