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