OMartsin / pizzeria-simulator-server

1 stars 0 forks source link

[BE] Return cooking time for config page [medium priority] #10

Closed cupoftea4 closed 12 months ago

cupoftea4 commented 1 year ago

We need this information to show preparation time of each pizza on available pizza selection I guess we can just store and update info about each stage duration on the server side, but calculate overall preparation time on the FE side. So we just need request to get default minimum preparation time and a way to update it (with config update, or separate request if needed). Also since duration of each stage is calculated based on minimum preparation time we could do it like this baking stage = minimum preparation time 0.4 topping stage (one topping) = minimum preparation time 0.2 packaging stage = minimum preparation time * 0.1 etc

I guess for now we can duplicate this logic on FE and BE unless you have some better ideas. Because preparation time should be calculated dynamically before user actually saves information about time to the server

Image