Skip to content

add API/UI to fix recipe issues #339

Description

@elfkuzco

Copied from #255 (comment)

When a book has a "recipe issue", we need to allow the user to display a specific screen (I'm now convinced we need one per type of book issue) ; I propose it is a button in book details which open this screen ; we can for instance have the list of issues displayed (not only in a popup) and have a button next to each issue (with only this issue type implemented for the time being).

The screen to solve "recipe issue" must display:

- current book name + flavour
- current recipe configuration : title name + list of flavour(s) we expect this recipe to produce

User must be able to either create new title (in which case everything is linked correctly directly) or create/change configuration :

- select which title this recipe is expected to produce
- select which flavours this recipe is expected to produce

In both cases (title + flavours) the UI will display a warning if title and/or flavour is already associated with another recipe (with reference to this other recipe info).

UI must present all recipe by their name with a link to Zimfarm UI (by recipe ID to be sure we point to the right object).

When user saves this, a single API call is issued to ensure consistent output. I propose we have something like PUT /recipes/<recipe_name> with the title name and the list of flavours as body. This API call will associate given recipe with the title and flavour(s) listed. It will automatically remove other existing associations for this title and flavours with another recipe(s). In order to avoid unattended effects, the list of these other recipes will be given in the request body and must match what API will find in DB. A "title_modified" event is also trigerred to process book again.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions