Closed JeanFrancoisFournier closed 4 years ago
I'd suggest that the real error here is that the PDF generator assumes all Meal Components will fit on a single line. It sounds like it must be laying out by columns: first all names, then all numbers, instead of going name, number, name, number ....
The fix is to look at the PDF generation code and figure out why it isn't behaving itself; maybe it's using an HTML template, and in that case maybe we can change a CSS white-space:nowrap;
or overflow: hidden
to fix it. Maybe there's an option in the PDF generator API we can use.
But the quick fix is as @JeanFrancoisFournier suggests, and I will find and apply that right now.
The string is defined here:
but actually changing it requires running manage.py makemigrations
then manage.py migrate
on each instance we have of Sous-Chef so it's a bit more complicated.
@JeanFrancoisFournier @kousu Could you upload an example of the PDF?
@erozqba Nice to see you again! Nick did a quick patch on our PROD version to fix this issue but it seems it created some minor UI issues.
@kousu could you explain to Ernesto what you did? And maybe get his 2 cents on the Docker issue?
This was solved in-house by @kousu.
Nick's changes at #837 are what fixed it on our copy.
The work around solution of shortening the side dish name from Diabetic dessert to Diabetic solves this issue.
The only thing is that we will need to keep that in mind if we ever add another side option and give it a short name that won't affect the line-break display.
Expected Behaviour
The string "Diabetic Dessert" in individual orders on the route sheets should be switched to "Diabetic" only as this proves to be be too long for the actual layout of the printed route sheet and makes it so it's printed on two lines therefore not aligned with the number count of the items to be delivered. This confuses volunteers making the actual delivery and is a source of delivery mistakes.
Once fixed, it should look like:
Main Dish 2 Diabetic 1 Green Salad 1
Actual Behaviour
Example of what an order for 1 main, 1 diabetic dessert and 1 green salad looks like on a route sheet:
Main Dish 2 Diabetic 1 Dessert 1 Green Salad