Files
micro-frontend/ng-ttc-frontend/src/app/content/main-project-content/main-project-content.html

54 lines
2.5 KiB
HTML
Raw Normal View History

2025-11-21 10:24:49 +07:00
<div class="h-screen bg-gray-100 flex flex-col">
2025-11-28 19:44:32 +07:00
<!-- Header Section -->
<header class="flex justify-between items-center py-4 px-6 bg-white shadow-sm border-b border-gray-200 z-10">
2025-11-21 10:24:49 +07:00
@if (mode == 'default') {
2025-11-28 19:44:32 +07:00
<h1 class="text-2xl font-bold text-gray-800 flex items-center gap-2">
<i class="fas fa-folder text-red-500"></i> โครงการทั้งหมด
</h1>
2025-11-21 10:24:49 +07:00
} @else if (mode == 'add') {
2025-11-28 19:44:32 +07:00
<div class="flex items-center gap-3">
<!-- ปุ่มย้อนกลับ -->
<button (click)="onCancelProject()"
class="w-10 h-10 rounded-full flex items-center justify-center hover:bg-gray-100 text-gray-500 transition-colors hover:text-red-500"
title="ย้อนกลับ">
<i class="fas fa-arrow-left text-lg"></i>
</button>
<h1 class="text-2xl font-bold text-gray-800 flex items-center gap-2">
<i class="fas fa-plus-circle text-red-500"></i> เพิ่มโครงการ
</h1>
</div>
} @else if (mode == 'edit') {
<div class="flex items-center gap-3">
<!-- ปุ่มย้อนกลับ -->
<button (click)="onCancelProject()"
class="w-10 h-10 rounded-full flex items-center justify-center hover:bg-gray-100 text-gray-500 transition-colors hover:text-red-500"
title="ย้อนกลับ">
<i class="fas fa-arrow-left text-lg"></i>
</button>
<h1 class="text-2xl font-bold text-gray-800 flex items-center gap-2">
<i class="fas fa-edit text-red-500"></i> แก้ไขโครงการ
</h1>
</div>
2025-11-21 10:24:49 +07:00
}
</header>
2025-11-28 19:44:32 +07:00
<!-- Content Area (Scrollable) -->
<div class="grow overflow-y-auto px-6 pb-6 pt-6">
2025-11-21 10:24:49 +07:00
@if ( mode == 'default') {
2025-11-28 19:44:32 +07:00
<!-- รายการโครงการ (Smart Component ย่อย หรือ Dumb Component ก็ได้) -->
2025-11-21 10:24:49 +07:00
<app-main-project></app-main-project>
2025-11-28 19:44:32 +07:00
2025-11-21 10:24:49 +07:00
} @else if ( mode == 'add') {
2025-11-28 19:44:32 +07:00
<!-- หน้าเพิ่มโครงการ (Dumb Component) -->
<!-- เชื่อม Event save/cancel กลับมาที่ Parent -->
<app-main-project-add
(save)="onSaveProject($event)"
(cancel)="onCancelProject()">
</app-main-project-add>
2025-11-21 10:24:49 +07:00
}
</div>
</div>