-interface
-service -เพิ่มเทคนิค การส่ง ผ่านข้อมูล
This commit is contained in:
@@ -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;
|
||||
// }
|
||||
@@ -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(){
|
||||
|
||||
Reference in New Issue
Block a user