add topping selection, defaultID WIP
This commit is contained in:
parent
2d753502f6
commit
3b4dec5e61
10 changed files with 331 additions and 56 deletions
|
|
@ -103,8 +103,8 @@ export interface Recipe01 {
|
|||
}
|
||||
|
||||
export interface Topping {
|
||||
ToppingGroup: ToppingGroup;
|
||||
ToppingList: ToppingList;
|
||||
ToppingGroup: ToppingGroup[];
|
||||
ToppingList: ToppingList[];
|
||||
}
|
||||
|
||||
export interface ToppingGroup {
|
||||
|
|
@ -157,8 +157,8 @@ export interface MatRecipe {
|
|||
}
|
||||
|
||||
export interface ToppingSet {
|
||||
ListGroupID: string;
|
||||
defaultIDSelect: string;
|
||||
ListGroupID: string[];
|
||||
defaultIDSelect: number;
|
||||
groupID: string;
|
||||
isUse: string;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { HttpClient } from '@angular/common/http';
|
|||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { Topping } from '../models/recipe.model';
|
||||
import { Topping, ToppingSet } from '../models/recipe.model';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
|
|
@ -22,4 +22,17 @@ export class ToppingService {
|
|||
}
|
||||
);
|
||||
}
|
||||
|
||||
getToppingsOfRecipe(country: string, filename: string, productCode: string): Observable<ToppingSet[]> {
|
||||
return this._httpClient.get<ToppingSet[]>(
|
||||
`${environment.api}/recipes/${country}/${filename}/${productCode}/toppings`,
|
||||
{
|
||||
params: {
|
||||
country: country,
|
||||
filename: filename,
|
||||
},
|
||||
withCredentials: true
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue