adjust mat selection
This commit is contained in:
parent
17030c72ce
commit
bf693aab2a
15 changed files with 548 additions and 186 deletions
|
|
@ -26,6 +26,25 @@ export class MaterialService {
|
|||
);
|
||||
}
|
||||
|
||||
getFullMaterialDetail(
|
||||
country?: string,
|
||||
filename?: string
|
||||
): Observable<{
|
||||
"materialId": number,
|
||||
"name": string,
|
||||
"type": string
|
||||
}[] | null>{
|
||||
console.log("getFullMaterialDetail", country, filename);
|
||||
|
||||
return this._httpClient.get<{
|
||||
"materialId": number,
|
||||
"name": string,
|
||||
"type": string
|
||||
}[]>(`${environment.api}/materials/full/${country}/${filename}`, {
|
||||
withCredentials: true,
|
||||
});
|
||||
}
|
||||
|
||||
getMaterialSettingById(
|
||||
id: number,
|
||||
country?: string,
|
||||
|
|
|
|||
25
client/src/app/core/services/topping.service.ts
Normal file
25
client/src/app/core/services/topping.service.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
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';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class ToppingService {
|
||||
constructor(private _httpClient: HttpClient) {}
|
||||
|
||||
getToppings(country: string, filename: string): Observable<Topping> {
|
||||
return this._httpClient.get<Topping>(
|
||||
`${environment.api}/recipes/${country}/${filename}/toppings`,
|
||||
{
|
||||
params: {
|
||||
country: country,
|
||||
filename: filename,
|
||||
},
|
||||
withCredentials: true
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue