Prettier.
This commit is contained in:
parent
c02e78d27d
commit
aa28f8d100
@ -148,7 +148,7 @@ export class RecipeUploadPage implements OnInit {
|
|||||||
protected async onDeleteDraft(): Promise<void> {
|
protected async onDeleteDraft(): Promise<void> {
|
||||||
await this.recipeDraftService.deleteDraft(this.model().draft!.id);
|
await this.recipeDraftService.deleteDraft(this.model().draft!.id);
|
||||||
await this.queryClient.invalidateQueries({
|
await this.queryClient.invalidateQueries({
|
||||||
queryKey: ['recipe-upload', 'in-progress-drafts']
|
queryKey: ['recipe-upload', 'in-progress-drafts'],
|
||||||
});
|
});
|
||||||
await this.switchModel(
|
await this.switchModel(
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,9 +2,9 @@ export interface EnterRecipeDataSubmitEvent {
|
|||||||
title: string;
|
title: string;
|
||||||
slug: string;
|
slug: string;
|
||||||
ingredients: Array<{
|
ingredients: Array<{
|
||||||
amount: string | null,
|
amount: string | null;
|
||||||
name: string,
|
name: string;
|
||||||
notes: string | null,
|
notes: string | null;
|
||||||
}>;
|
}>;
|
||||||
rawText: string;
|
rawText: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -174,13 +174,14 @@ export class EnterRecipeData implements OnInit {
|
|||||||
this.submit.emit({
|
this.submit.emit({
|
||||||
title: value.title!,
|
title: value.title!,
|
||||||
slug: value.slug!,
|
slug: value.slug!,
|
||||||
ingredients: value.ingredients?.map(ingredient => ({
|
ingredients:
|
||||||
amount: ingredient.amount ?? null,
|
value.ingredients?.map((ingredient) => ({
|
||||||
name: ingredient.name!,
|
amount: ingredient.amount ?? null,
|
||||||
notes: ingredient.notes ?? null,
|
name: ingredient.name!,
|
||||||
})) ?? [],
|
notes: ingredient.notes ?? null,
|
||||||
rawText: value.text!
|
})) ?? [],
|
||||||
})
|
rawText: value.text!,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
protected onDraftDelete(): void {
|
protected onDraftDelete(): void {
|
||||||
|
|||||||
@ -3,21 +3,20 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|||||||
import { Logo } from './logo';
|
import { Logo } from './logo';
|
||||||
|
|
||||||
describe('Logo', () => {
|
describe('Logo', () => {
|
||||||
let component: Logo;
|
let component: Logo;
|
||||||
let fixture: ComponentFixture<Logo>;
|
let fixture: ComponentFixture<Logo>;
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
imports: [Logo]
|
imports: [Logo],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
|
||||||
|
|
||||||
fixture = TestBed.createComponent(Logo);
|
fixture = TestBed.createComponent(Logo);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
await fixture.whenStable();
|
await fixture.whenStable();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create', () => {
|
it('should create', () => {
|
||||||
expect(component).toBeTruthy();
|
expect(component).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@ -105,9 +105,7 @@ export class RecipeDraftService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public deleteDraft(id: string): Promise<void> {
|
public deleteDraft(id: string): Promise<void> {
|
||||||
return firstValueFrom(
|
return firstValueFrom(this.http.delete<void>(this.endpointService.getUrl('recipeDrafts', [id])));
|
||||||
this.http.delete<void>(this.endpointService.getUrl('recipeDrafts', [id]))
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public doInference(model: RecipeUploadClientModel): Observable<RecipeUploadClientModel> {
|
public doInference(model: RecipeUploadClientModel): Observable<RecipeUploadClientModel> {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user