diff --git a/ng-ttc-frontend/src/app/app.module.ts b/ng-ttc-frontend/src/app/app.module.ts index 30d84c3..388a21f 100644 --- a/ng-ttc-frontend/src/app/app.module.ts +++ b/ng-ttc-frontend/src/app/app.module.ts @@ -24,6 +24,9 @@ import { LicensePrivacyTermsComponent } from './component/license-privacy-terms/ import { provideCharts, withDefaultRegisterables } from 'ng2-charts'; import { CachingInterceptor } from './services/caching.interceptor'; +import { MainProject } from './component/main-project/main-project'; +import { MainProjectContent } from './content/main-project-content/main-project-content'; +import { MainProjectAdd } from './component/main-project-add/main-project-add'; // import { BudgetAproval } from './component/budget-aproval/budget-aproval'; // import { AccDateFormatPipe } from './pipe/dtmtodatetime.pipe'; // import { DtmtodatetimePipe } from './dtmtodatetime.pipe'; @@ -35,6 +38,9 @@ import { CachingInterceptor } from './services/caching.interceptor'; SidebarContentComponent, SidebarComponent, LicensePrivacyTermsComponent, + // MainProjectAdd, + // MainProject, + // MainProjectContent, // BudgetAproval, // AccDateFormatPipe // DtmtodatetimePipe, diff --git a/ng-ttc-frontend/src/app/component/main-manager/main-manager.component.html b/ng-ttc-frontend/src/app/component/main-manager/main-manager.component.html index fd584ab..ad6f22b 100644 --- a/ng-ttc-frontend/src/app/component/main-manager/main-manager.component.html +++ b/ng-ttc-frontend/src/app/component/main-manager/main-manager.component.html @@ -43,7 +43,7 @@
- + diff --git a/ng-ttc-frontend/src/app/component/main-project-add/main-project-add.css b/ng-ttc-frontend/src/app/component/main-project-add/main-project-add.css new file mode 100644 index 0000000..e69de29 diff --git a/ng-ttc-frontend/src/app/component/main-project-add/main-project-add.html b/ng-ttc-frontend/src/app/component/main-project-add/main-project-add.html new file mode 100644 index 0000000..aff7d18 --- /dev/null +++ b/ng-ttc-frontend/src/app/component/main-project-add/main-project-add.html @@ -0,0 +1,175 @@ +
+
+ +

สร้างโครงการใหม่

+ +
+ +
+ +
+ +
+
+ 1 +
+

1. กรอกข้อมูลโครงการ

+
+ + + + +
+ +
+
+ +
+ + +
+ +
+ + +
+ +
+ +
+
+
+
+ + +
+ +
+ +
+
+ 2 +
+

2. แนบเอกสารอ้างอิง

+
+ + + +
+ +
+
+

โปรดแนบไฟล์ที่เกี่ยวข้อง (เช่น ใบเสนอราคา, แผนผัง)

+
+ คลิกหรือลากไฟล์มาวางที่นี่ +
+
+ + +
+
+
+
+ + +
+ +
+ +
+
+ 3 +
+

3. สรุปและส่งโครงการ

+
+ + + +
+ +
+
+

ตรวจสอบข้อมูลทั้งหมดก่อนยืนยันการส่ง

+
    +
  • **ชื่อโครงการ:** โครงการปรับปรุงระบบน้ำ
  • +
  • **ประเภทงบ:** งบดำเนินงาน
  • +
  • **จำนวนเงิน:** 50,000 บาท
  • +
  • **สถานะเอกสาร:** แนบครบ 2 ไฟล์
  • +
+
+ + +
+
+
+
+ +
+ +
+
diff --git a/ng-ttc-frontend/src/app/component/main-project-add/main-project-add.ts b/ng-ttc-frontend/src/app/component/main-project-add/main-project-add.ts new file mode 100644 index 0000000..d88f564 --- /dev/null +++ b/ng-ttc-frontend/src/app/component/main-project-add/main-project-add.ts @@ -0,0 +1,16 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-main-project-add', + standalone: false, + templateUrl: './main-project-add.html', + styleUrl: './main-project-add.css', +}) +export class MainProjectAdd { +currentStep: number = 1; // 1 = กรอกข้อมูล, 2 = แนบเอกสาร, 3 = สรุปและส่ง + + // ฟังก์ชันสำหรับเปลี่ยนขั้นตอน + goToStep(step: number): void { + this.currentStep = step; + } +} diff --git a/ng-ttc-frontend/src/app/component/main-project/main-project.css b/ng-ttc-frontend/src/app/component/main-project/main-project.css new file mode 100644 index 0000000..e69de29 diff --git a/ng-ttc-frontend/src/app/component/main-project/main-project.html b/ng-ttc-frontend/src/app/component/main-project/main-project.html new file mode 100644 index 0000000..ce6902a --- /dev/null +++ b/ng-ttc-frontend/src/app/component/main-project/main-project.html @@ -0,0 +1,162 @@ +
+ + + + +
+ +
+

โครงการของฉัน

+ + + +
+
ลำดับ รหัสโครงการ
+ + + + + + + + + + + + + + + + +
ลำดับชื่อโครงการสถานะดำเนินการ
1โครงการปรับปรุงอาคารรออนุมัติ + + +
+
+ + +
+

ความคืบหน้าโครงการ: โครงการปรับปรุงอาคาร

+ +
+ +
+
+
+ + + +
+
+
+

1. ยื่นคำขอโครงการ

+

วันที่: 10/11/2568

+

เอกสารและรายละเอียดโครงการครบถ้วน

+
+
+ +
+
+
+ 2 +
+
+
+

2. พิจารณางบประมาณ

+

กำหนดแล้วเสร็จ: 25/11/2568

+

รอฝ่ายบัญชีและงบประมาณอนุมัติยอดจัดสรร

+ +
+
+ +
+
+
+ 3 +
+
+
+

3. อนุมัติโดยผู้บริหาร

+

ยังไม่ระบุวันที่

+

รอขั้นตอนก่อนหน้าเสร็จสิ้น

+
+
+ +
+
+
+ 4 +
+
+
+

4. จัดสรรงบประมาณสำเร็จ

+

ยังไม่ระบุวันที่

+
+
+ +
+
+ + +
+ + + + +
+

กล่องแจ้งเตือน

+
+ + + +
+ + + +
+

เอกสารฟอร์มวิทยาลัย **ฉบับใหม่** พร้อมดาวน์โหลดแล้ว

+

ประกาศเมื่อ: 17 พ.ย. 2568

+
+
+ +
+ + + +
+

การเปิดงบประมาณ **ไตรมาส 4** ได้รับการอนุมัติแล้ว

+

สำเร็จเมื่อ: 15 พ.ย. 2568

+
+
+ +
+
+
+ + diff --git a/ng-ttc-frontend/src/app/component/main-project/main-project.ts b/ng-ttc-frontend/src/app/component/main-project/main-project.ts new file mode 100644 index 0000000..4ca2706 --- /dev/null +++ b/ng-ttc-frontend/src/app/component/main-project/main-project.ts @@ -0,0 +1,30 @@ +import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; +import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms'; +import { GeneralService } from '../../services/generalservice'; +import { IDropAct, IStateDrop, IStateResultResponse, IActData, IActSumData } from '../../interfaces/dashboard.interface' +import { DashboardStateService } from '../../services/state/dashboard-state.service'; +import { Router } from '@angular/router'; + + +@Component({ + selector: 'app-main-project', + standalone: false, + templateUrl: './main-project.html', + styleUrl: './main-project.css', +}) +export class MainProject implements OnInit { + constructor( + private generalService: GeneralService, + private dashboardStateService: DashboardStateService, + private router: Router + ) {} + + ngOnInit(): void { + + } + + + navigate(path: string) { + this.router.navigate([path]); + } +} diff --git a/ng-ttc-frontend/src/app/content/main-project-content/main-project-content.css b/ng-ttc-frontend/src/app/content/main-project-content/main-project-content.css new file mode 100644 index 0000000..e69de29 diff --git a/ng-ttc-frontend/src/app/content/main-project-content/main-project-content.html b/ng-ttc-frontend/src/app/content/main-project-content/main-project-content.html new file mode 100644 index 0000000..a4e5c49 --- /dev/null +++ b/ng-ttc-frontend/src/app/content/main-project-content/main-project-content.html @@ -0,0 +1,115 @@ +
+ +
+ @if (mode == 'default') { +

โครงการทั้งหมด

+ } @else if (mode == 'add') { +

เพิ่มโครงการ

+ } + +
+ +
+ + @if ( mode == 'default') { + + } @else if ( mode == 'add') { + + } + +
+
+ + diff --git a/ng-ttc-frontend/src/app/content/main-project-content/main-project-content.ts b/ng-ttc-frontend/src/app/content/main-project-content/main-project-content.ts new file mode 100644 index 0000000..dc97197 --- /dev/null +++ b/ng-ttc-frontend/src/app/content/main-project-content/main-project-content.ts @@ -0,0 +1,30 @@ +import { Routes, Router, ActivatedRoute } from '@angular/router'; +import { Component, OnInit } from '@angular/core'; + + +@Component({ + selector: 'app-main-project-content', + standalone: false, + templateUrl: './main-project-content.html', + styleUrl: './main-project-content.css', +}) +export class MainProjectContent implements OnInit { + mode: 'add' | 'edit' | 'default' = 'default'; + + constructor( + private route: ActivatedRoute, + private router: Router + ) {} + + ngOnInit(): void { + let param = this.route.snapshot.paramMap.get('mode'); + + if (param === 'add') { + this.mode = 'add'; + } else if (param === 'edit') { + this.mode = 'edit'; + } else { + this.mode = 'default'; + } + } +} diff --git a/ng-ttc-frontend/src/app/controls/main-control/main-control-routing.module.ts b/ng-ttc-frontend/src/app/controls/main-control/main-control-routing.module.ts index 64ce850..ca4c8b0 100644 --- a/ng-ttc-frontend/src/app/controls/main-control/main-control-routing.module.ts +++ b/ng-ttc-frontend/src/app/controls/main-control/main-control-routing.module.ts @@ -5,6 +5,7 @@ import { MainDashboardContentComponent } from '../../content/main-dashboard-cont import { MainReportComponent } from '../../component/main-report/main-report.component'; import { BudgetAproval } from '../../component/budget-aproval/budget-aproval'; import { MainLandingComponent } from '../../component/main-landing/main-landing.component'; +import { MainProjectContent } from '../../content/main-project-content/main-project-content'; // import { MainReportComponent } from '../../component/main-report/main-report.component'; @@ -14,6 +15,8 @@ const routes: Routes = [ { path: 'dashboard', component: MainDashboardContentComponent }, { path: 'report', component: MainReportComponent }, { path: 'manager', component: MainManagerContentComponent }, + { path: 'project', component: MainProjectContent }, + { path: 'project/:mode', component: MainProjectContent }, { path: 'manager', children: [ diff --git a/ng-ttc-frontend/src/app/controls/main-control/main-control.module.ts b/ng-ttc-frontend/src/app/controls/main-control/main-control.module.ts index 9e53d4a..4f2a891 100644 --- a/ng-ttc-frontend/src/app/controls/main-control/main-control.module.ts +++ b/ng-ttc-frontend/src/app/controls/main-control/main-control.module.ts @@ -14,6 +14,9 @@ import { MainReportComponent } from '../../component/main-report/main-report.com import { MainManagerComponent } from '../../component/main-manager/main-manager.component'; import { BudgetAproval } from '../../component/budget-aproval/budget-aproval'; import { MainLandingComponent } from '../../component/main-landing/main-landing.component'; +import { MainProjectContent } from '../../content/main-project-content/main-project-content'; +import { MainProject } from '../../component/main-project/main-project'; +import { MainProjectAdd } from '../../component/main-project-add/main-project-add'; // import { MainReportComponent } from '../../component/main-report/main-report.component'; @@ -28,6 +31,9 @@ import { MainLandingComponent } from '../../component/main-landing/main-landing. MainManagerComponent, BudgetAproval, MainLandingComponent, + MainProjectContent, + MainProject, + MainProjectAdd, AccDateFormatPipe // MainReportComponent ],