-interface

-service

-เพิ่มเทคนิค การส่ง ผ่านข้อมูล
This commit is contained in:
2025-11-13 14:53:37 +07:00
parent 37ca45701b
commit b3fa94f904
4 changed files with 92 additions and 50 deletions

View File

@@ -1,44 +0,0 @@
export interface IDropAct {
dtlnam?: string,
dtlcod?: string
}
// ข้อมูลสินค้าหลัก
// export interface IProduct {
// id: string;
// name: string;
// price: number;
// category: string;
// inStock: boolean;
// description?: string; // optional
// imageUrl?: string;
// tags: string[];
// createdAt: Date;
// updatedAt: Date;
// }
// // ข้อมูลสินค้าแบบย่อ (ใช้ในรายการ)
// export interface IProductSummary {
// id: string;
// name: string;
// price: number;
// imageUrl?: string;
// inStock: boolean;
// }
// // ข้อมูลสำหรับฟอร์ม
// export interface IProductForm {
// name: string;
// price: number;
// category: string;
// description?: string;
// inStock: boolean;
// }
// // ข้อมูลการจัดหมวดหมู่
// export interface IProductCategory {
// id: string;
// name: string;
// parentId?: string;
// productCount: number;
// }

View File

@@ -1,7 +1,8 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
import { GeneralService } from '../../services/generalservice';
import { IDropAct } from '../interfaces/dashboard.interface'
import { IDropAct } from '../../interfaces/dashboard.interface'
import { DashboardStateService } from '../../services/state/dashboard-state.service';
@Component({
selector: 'app-main-dashboard',
@@ -20,6 +21,10 @@ export class MainDashboardComponent implements OnInit {
readonly ownerName = 'Nuttakit';
constructor(
private dashboardStateService: DashboardStateService
){}
readonly kpiCards = [
{
label: 'รายรับรวม',
@@ -179,6 +184,12 @@ export class MainDashboardComponent implements OnInit {
ngOnInit(): void {
this.setupFormControl();
this.dashboardStateService.getStateResult().subscribe(data => {
if(data) {
this.myDropAct = data;
}
}
)
}
setupFormControl(){