mirror of
https://github.com/grocy/grocy.git
synced 2025-08-15 10:14:39 +00:00
Add support for printing shoppinglist with thermal printer (#1273)
* Added escpos-php library * Added button to shoppinglist print menu * Added to translation * Added basic printing logic and API call * Working implementation for printing with the API * Added openapi json * Correctly parsing boolean parameter * Working button in UI * Change to grocy formatting * Add Date * Only show thermal print button when Feature Flag is set * Fixed API call and added error message parsing * Undo translation * Add flag to print quantities as well * Added printing notes * Added quantity conversion * Increse feed * Fixed that checkbox was undefined, as dialog was already closed * Added padding * Formatting * Added note about user permission * Fixed error when using notes instead of products * Review - Default FEATURE_FLAG_THERMAL_PRINTER to disabled - Added missing localization strings (and slightly adjusted one) * Fixed merge conflicts Co-authored-by: Bernd Bestel <bernd@berrnd.de>
This commit is contained in:
@@ -11,6 +11,7 @@ use Grocy\Services\ChoresService;
|
||||
use Grocy\Services\DatabaseService;
|
||||
use Grocy\Services\FilesService;
|
||||
use Grocy\Services\LocalizationService;
|
||||
use Grocy\Services\PrintService;
|
||||
use Grocy\Services\RecipesService;
|
||||
use Grocy\Services\SessionService;
|
||||
use Grocy\Services\StockService;
|
||||
@@ -93,6 +94,12 @@ class BaseController
|
||||
return StockService::getInstance();
|
||||
}
|
||||
|
||||
protected function getPrintService()
|
||||
{
|
||||
return PrintService::getInstance();
|
||||
}
|
||||
|
||||
|
||||
protected function getTasksService()
|
||||
{
|
||||
return TasksService::getInstance();
|
||||
|
Reference in New Issue
Block a user