update recipe model
This commit is contained in:
parent
8228a4f46c
commit
b681a5a9af
7 changed files with 301 additions and 114 deletions
|
|
@ -1,54 +1,141 @@
|
|||
export interface Recipe {
|
||||
Timestamp: Date;
|
||||
MachineSetting: MachineSetting;
|
||||
Recipe01: Recipe01[];
|
||||
Topping: Topping;
|
||||
MaterailCode: MaterailCode[];
|
||||
}
|
||||
|
||||
export interface MachineSetting {
|
||||
RecipeTag: string;
|
||||
StrTextShowError: string[];
|
||||
configNumber: string;
|
||||
temperatureMax: string;
|
||||
temperatureMin: string;
|
||||
}
|
||||
|
||||
export interface MaterailCode {
|
||||
PackageDescription: string;
|
||||
RefillValuePerStep: string;
|
||||
materialID: string;
|
||||
materialCode: string;
|
||||
}
|
||||
|
||||
export interface Recipe01 {
|
||||
Description: string;
|
||||
ExtendID: number;
|
||||
OnTOP: boolean;
|
||||
LastChange: Date;
|
||||
MenuStatus: number;
|
||||
ExtendID: string;
|
||||
OnTOP: string;
|
||||
LastChange: string;
|
||||
MenuStatus: string;
|
||||
RemainingCups: string;
|
||||
StringParam: string;
|
||||
TextForWarningBeforePay: string[];
|
||||
cashPrice: number;
|
||||
cashPrice: string;
|
||||
changerecipe: string;
|
||||
disable: boolean;
|
||||
disable_by_cup: boolean;
|
||||
disable_by_ice: boolean;
|
||||
EncoderCount: number;
|
||||
id: number;
|
||||
isUse: boolean;
|
||||
isShow: boolean;
|
||||
disable: string;
|
||||
disable_by_cup: string;
|
||||
disable_by_ice: string;
|
||||
EncoderCount: string;
|
||||
id: string;
|
||||
isUse: string;
|
||||
isShow: string;
|
||||
name: string;
|
||||
nonCashPrice: number;
|
||||
nonCashPrice: string;
|
||||
otherDescription: string;
|
||||
otherName: string;
|
||||
productCode: string;
|
||||
recipes: MatRecipe[];
|
||||
SubMenu: Recipe[];
|
||||
SubMenu: Recipe01[];
|
||||
ToppingSet: ToppingSet[];
|
||||
total_time: number;
|
||||
total_weight: number;
|
||||
total_time: string;
|
||||
total_weight: string;
|
||||
uriData: string;
|
||||
useGram: boolean;
|
||||
weight_float: number;
|
||||
useGram: string;
|
||||
weight_float: string;
|
||||
}
|
||||
|
||||
export interface Topping {
|
||||
ToppingGroup: ToppingGroup;
|
||||
ToppingList: ToppingList;
|
||||
}
|
||||
|
||||
export interface ToppingGroup {
|
||||
Desc: string;
|
||||
groupID: string;
|
||||
idDefault: string;
|
||||
idInGroup: string;
|
||||
inUse: string;
|
||||
name: string;
|
||||
otherName: string;
|
||||
}
|
||||
|
||||
export interface ToppingList {
|
||||
ExtendID: string;
|
||||
OnTOP: string;
|
||||
MenuStatus: string;
|
||||
cashPrice: string;
|
||||
disable: string;
|
||||
disable_by_cup: string;
|
||||
disable_by_ice: string;
|
||||
EncoderCount: string;
|
||||
id: string;
|
||||
isUse: string;
|
||||
isShow: string;
|
||||
stringParam: string;
|
||||
name: string;
|
||||
nonCashPrice: string;
|
||||
otherName: string;
|
||||
productCode: string;
|
||||
recipes: string;
|
||||
total_time: string;
|
||||
total_weight: string;
|
||||
useGram: string;
|
||||
weight_float: string;
|
||||
}
|
||||
|
||||
export interface MatRecipe {
|
||||
MixOrder: number;
|
||||
FeedParameter: number;
|
||||
FeedPattern: number;
|
||||
isUse: boolean;
|
||||
materialPathId: number;
|
||||
powderGram: number;
|
||||
powderTime: number;
|
||||
stirTime: number;
|
||||
syrupGram: number;
|
||||
syrupTime: number;
|
||||
waterCold: number;
|
||||
waterYield: number;
|
||||
MixOrder: string;
|
||||
FeedParameter: string;
|
||||
FeedPattern: string;
|
||||
isUse: string;
|
||||
materialPathId: string;
|
||||
powderGram: string;
|
||||
powderTime: string;
|
||||
stirTime: string;
|
||||
syrupGram: string;
|
||||
syrupTime: string;
|
||||
waterCold: string;
|
||||
waterYield: string;
|
||||
}
|
||||
|
||||
export interface ToppingSet {
|
||||
ListGroupID: number[];
|
||||
defaultIDSelect: number;
|
||||
ListGroupID: string;
|
||||
defaultIDSelect: string;
|
||||
groupID: string;
|
||||
isUse: boolean;
|
||||
isUse: string;
|
||||
}
|
||||
|
||||
export interface MaterialSetting {
|
||||
AlarmIDWhenOffline: string;
|
||||
BeanChannel: string;
|
||||
CanisterType: string;
|
||||
DrainTimer: string;
|
||||
IsEquipment: string;
|
||||
LeavesChannel: string;
|
||||
LowToOffline: string;
|
||||
MaterialStatus: string;
|
||||
PowderChannel: string;
|
||||
RefillUnitGram: string;
|
||||
RefillUnitMilliliters: string;
|
||||
RefillUnitPCS: string;
|
||||
ScheduleDrainType: string;
|
||||
SodaChannel: string;
|
||||
StockAdjust: string;
|
||||
SyrupChannel: string;
|
||||
id: string;
|
||||
idAlternate: string;
|
||||
isUse: string;
|
||||
pay_rettry_max_count: string;
|
||||
feed_mode: string;
|
||||
MaterialParameter: string;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,16 +0,0 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class JwtService {
|
||||
getToken(): string | null {
|
||||
return window.localStorage['jwtToken'];
|
||||
}
|
||||
|
||||
saveToken(token: string): void {
|
||||
window.localStorage['jwtToken'] = token;
|
||||
}
|
||||
|
||||
destroyToken(): void {
|
||||
window.localStorage.removeItem('jwtToken');
|
||||
}
|
||||
}
|
||||
16
client/src/app/core/services/recipe.service.ts
Normal file
16
client/src/app/core/services/recipe.service.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BehaviorSubject, Observable, distinctUntilChanged } from 'rxjs';
|
||||
import { Recipe } from '../models/recipe.model';
|
||||
import { environment } from 'src/environments/environment';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class RecipeService {
|
||||
constructor(private _httpClient: HttpClient) {}
|
||||
|
||||
getRecipes(): Observable<Recipe> {
|
||||
return this._httpClient.get<Recipe>(environment.api + '/recipes', {
|
||||
withCredentials: true,
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue