You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The logic in DocumentController::printDocument seems to have been missed in #394, and the function references the now-nonexistent App\Utils\Printer class:
We should factor out the code for checking and deducting print balances and initiating the print job from PrintJobController::store into a function that can be called from backend logic.
The text was updated successfully, but these errors were encountered:
Sorry about this oversight. I think the PrinterHelper class would be the most suitable with a function like
function tryCreatePrintJob(string$documentPath, bool$doubleSided, <etc.>) PrintJobCreationProcess
where PrintJobCreationProcess is an enum with values like PrintJobCreationProcess::noBalance, PrintJobCreationProcess::errorPrinting or PrintJobCreationProcess::success. Then both the store method of the PrintJobController and the DocumentController can use this function and based on the returned enum value send a message to the user.
@sszajbely
The logic in
DocumentController::printDocument
seems to have been missed in #394, and the function references the now-nonexistentApp\Utils\Printer
class:mars/app/Http/Controllers/Secretariat/DocumentController.php
Lines 135 to 143 in 4bfe84d
We should factor out the code for checking and deducting print balances and initiating the print job from
PrintJobController::store
into a function that can be called from backend logic.The text was updated successfully, but these errors were encountered: