feat(merge_component): Add merge from website

Merge contents from patch selected by user into newer version

merge from client feature
This commit is contained in:
pakintada@gmail.com 2024-03-04 11:19:11 +07:00
parent 292c7697a4
commit 09c21301d6
15 changed files with 343 additions and 42 deletions

View file

@ -136,7 +136,7 @@ export class RecipeService {
}
getCurrentFile(): string {
// TODO: get default from server
// get default from server
const currentRecipeFile = localStorage.getItem('currentRecipeFile');
if (currentRecipeFile) {
@ -236,6 +236,17 @@ export class RecipeService {
});
}
upgradeRecipe(country: string, filename: string, ctx: any){
return this._httpClient.post<any>(
environment.api + ('/recipes/upgrade/' + country + '/' + filename),
ctx,
{
withCredentials: true,
responseType: 'json',
}
);
}
getSavedTmp(country: string, filename: string) {
console.log('loading saved .tmp* file', country, filename);