@@ -3,6 +3,15 @@ import { Injectable } from '@angular/core';
33export type Condition = Condition [ ] | string | number ;
44export type Fields = typeof fields ;
55
6+ export interface Product {
7+ Product_ID : number ;
8+ Product_Name : string ;
9+ Product_Cost : string ;
10+ Product_Sale_Price : string ;
11+ Product_Retail_Price : string ;
12+ Product_Current_Inventory : number ;
13+ }
14+
615const filter : Condition = [
716 [ 'Product_Current_Inventory' , '<>' , 0 ] ,
817 'or' ,
@@ -43,6 +52,161 @@ const fields: Record<string, string | number>[] = [
4352 } ,
4453] ;
4554
55+ const products : Product [ ] = [
56+ {
57+ Product_ID : 1 ,
58+ Product_Name : "HD Video Player" ,
59+ Product_Cost : "110.0000" ,
60+ Product_Sale_Price : "220.0000" ,
61+ Product_Retail_Price : "330.0000" ,
62+ Product_Current_Inventory : 225 ,
63+ } ,
64+ {
65+ Product_ID : 2 ,
66+ Product_Name : "SuperHD Video Player" ,
67+ Product_Cost : "175.0000" ,
68+ Product_Sale_Price : "275.0000" ,
69+ Product_Retail_Price : "400.0000" ,
70+ Product_Current_Inventory : 150 ,
71+ } ,
72+ {
73+ Product_ID : 3 ,
74+ Product_Name : "SuperPlasma 50" ,
75+ Product_Cost : "1100.0000" ,
76+ Product_Sale_Price : "1800.0000" ,
77+ Product_Retail_Price : "2400.0000" ,
78+ Product_Current_Inventory : 0 ,
79+ } ,
80+ {
81+ Product_ID : 4 ,
82+ Product_Name : "SuperLED 50" ,
83+ Product_Cost : "775.0000" ,
84+ Product_Sale_Price : "1100.0000" ,
85+ Product_Retail_Price : "1600.0000" ,
86+ Product_Current_Inventory : 77 ,
87+ } ,
88+ {
89+ Product_ID : 5 ,
90+ Product_Name : "SuperLED 42" ,
91+ Product_Cost : "675.0000" ,
92+ Product_Sale_Price : "1050.0000" ,
93+ Product_Retail_Price : "1450.0000" ,
94+ Product_Current_Inventory : 445 ,
95+ } ,
96+ {
97+ Product_ID : 6 ,
98+ Product_Name : "SuperLCD 55" ,
99+ Product_Cost : "745.0000" ,
100+ Product_Sale_Price : "1045.0000" ,
101+ Product_Retail_Price : "1350.0000" ,
102+ Product_Current_Inventory : 345 ,
103+ } ,
104+ {
105+ Product_ID : 7 ,
106+ Product_Name : "SuperLCD 42" ,
107+ Product_Cost : "710.0000" ,
108+ Product_Sale_Price : "999.0000" ,
109+ Product_Retail_Price : "1200.0000" ,
110+ Product_Current_Inventory : 210 ,
111+ } ,
112+ {
113+ Product_ID : 8 ,
114+ Product_Name : "SuperPlasma 65" ,
115+ Product_Cost : "1800.0000" ,
116+ Product_Sale_Price : "2900.0000" ,
117+ Product_Retail_Price : "3500.0000" ,
118+ Product_Current_Inventory : 0 ,
119+ } ,
120+ {
121+ Product_ID : 9 ,
122+ Product_Name : "SuperLCD 70" ,
123+ Product_Cost : "2125.0000" ,
124+ Product_Sale_Price : "3200.0000" ,
125+ Product_Retail_Price : "4000.0000" ,
126+ Product_Current_Inventory : 95 ,
127+ } ,
128+ {
129+ Product_ID : 10 ,
130+ Product_Name : "DesktopLED 21" ,
131+ Product_Cost : "75.0000" ,
132+ Product_Sale_Price : "125.0000" ,
133+ Product_Retail_Price : "175.0000" ,
134+ Product_Current_Inventory : 0 ,
135+ } ,
136+ {
137+ Product_ID : 11 ,
138+ Product_Name : "DesktopLED 19" ,
139+ Product_Cost : "70.0000" ,
140+ Product_Sale_Price : "115.0000" ,
141+ Product_Retail_Price : "165.0000" ,
142+ Product_Current_Inventory : 425 ,
143+ } ,
144+ {
145+ Product_ID : 12 ,
146+ Product_Name : "DesktopLCD 21" ,
147+ Product_Cost : "75.0000" ,
148+ Product_Sale_Price : "120.0000" ,
149+ Product_Retail_Price : "170.0000" ,
150+ Product_Current_Inventory : 210 ,
151+ } ,
152+ {
153+ Product_ID : 13 ,
154+ Product_Name : "DesktopLCD 19" ,
155+ Product_Cost : "68.0000" ,
156+ Product_Sale_Price : "110.0000" ,
157+ Product_Retail_Price : "160.0000" ,
158+ Product_Current_Inventory : 150 ,
159+ } ,
160+ {
161+ Product_ID : 14 ,
162+ Product_Name : "Projector Plus" ,
163+ Product_Cost : "225.0000" ,
164+ Product_Sale_Price : "400.0000" ,
165+ Product_Retail_Price : "550.0000" ,
166+ Product_Current_Inventory : 0 ,
167+ } ,
168+ {
169+ Product_ID : 15 ,
170+ Product_Name : "Projector PlusHD" ,
171+ Product_Cost : "425.0000" ,
172+ Product_Sale_Price : "600.0000" ,
173+ Product_Retail_Price : "750.0000" ,
174+ Product_Current_Inventory : 110 ,
175+ } ,
176+ {
177+ Product_ID : 16 ,
178+ Product_Name : "Projector PlusHT" ,
179+ Product_Cost : "725.0000" ,
180+ Product_Sale_Price : "900.0000" ,
181+ Product_Retail_Price : "1050.0000" ,
182+ Product_Current_Inventory : 0 ,
183+ } ,
184+ {
185+ Product_ID : 17 ,
186+ Product_Name : "ExcelRemote IR" ,
187+ Product_Cost : "55.0000" ,
188+ Product_Sale_Price : "105.0000" ,
189+ Product_Retail_Price : "150.0000" ,
190+ Product_Current_Inventory : 650 ,
191+ } ,
192+ {
193+ Product_ID : 18 ,
194+ Product_Name : "ExcelRemote Bluetooth" ,
195+ Product_Cost : "85.0000" ,
196+ Product_Sale_Price : "135.0000" ,
197+ Product_Retail_Price : "180.0000" ,
198+ Product_Current_Inventory : 310 ,
199+ } ,
200+ {
201+ Product_ID : 19 ,
202+ Product_Name : "ExcelRemote IP" ,
203+ Product_Cost : "105.0000" ,
204+ Product_Sale_Price : "155.0000" ,
205+ Product_Retail_Price : "200.0000" ,
206+ Product_Current_Inventory : 0 ,
207+ } ,
208+ ] ;
209+
46210@Injectable ( )
47211export class Service {
48212 getFields ( ) : Fields {
@@ -52,4 +216,8 @@ export class Service {
52216 getFilter ( ) : Condition {
53217 return filter ;
54218 }
219+
220+ getProducts ( ) : Product [ ] {
221+ return products ;
222+ }
55223}
0 commit comments