59 Commits

Author SHA1 Message Date
Bernd Bestel
c73be7d18e
Finalized frontend external barcode lookup implementation (references #158) 2025-01-12 13:58:47 +01:00
Bernd Bestel
387a5f7dd3
Move GetParsedAndFilteredRequestBody into BaseApiController 2023-09-01 17:58:02 +02:00
Bernd Bestel
5080d776a7
Only accept application/json requests for (JSON) API requests 2023-09-01 00:53:25 +02:00
Bernd Bestel
d006436d49
Upgraded PHP-CS-Fixer / applied optimized rules 2023-08-02 18:44:30 +02:00
Bernd Bestel
6c4cc00fd5
Added PHP 8.2 support 2023-08-01 21:23:59 +02:00
Bernd Bestel
e52b1c5f60
Upgraded package php-di/php-di 2023-07-29 14:02:56 +02:00
Bernd Bestel
70bb014c9f
Removed pre-release special version handling 2023-05-24 20:32:48 +02:00
Bernd Bestel
d16d976d0b
Simplified viewjs / active page handling 2023-05-20 18:20:30 +02:00
Bernd Bestel
d9667b4534
Removed type conversions where no longer needed
PHP 8.1 PDO SQLite now returns native data types
2023-02-06 20:22:10 +01:00
Bernd Bestel
fa49b449dd
Allow img style attribute in HTML filter (fixes #2011) 2022-09-28 21:04:41 +02:00
Bernd Bestel
e1967bd603
Allow chevrons in HTML filter (fixes #2007) 2022-09-25 22:39:06 +02:00
Bernd Bestel
a85af22d6a
Allow h1-h6 tags in HTMLPurifier (fixes #1932) 2022-07-03 08:24:32 +02:00
Bernd Bestel
12e5377c40
Split application translation strings and QU strings (fixes #1705) 2022-02-06 21:09:34 +01:00
Bernd Bestel
edfa404ed6
Squashed commit
Always execute migration 9999 (can be used to fix things manually)
Optimized meal plan navigation / date range filtering
Prepared next release
Pulled translations from Transifex
Various code optimizations
2021-07-16 17:32:08 +02:00
Bernd Bestel
91d8eaeb74
Squashed commit
Improve journal pages loading time (new date range filter)
Various small style adjustments (meal plan page and others)
Pulled German translations from Transifex
Show the shopping list total value (closes #1309)
Make it possible to copy recipes (closes #714)
Implemented optional "auto decimal separator for price inputs" (closes #1345)
Removed table grouped column fixed order restriction (closes #1402)
Don't filter out style, class, id attributes of html text (closes #1298)
Added product picture as column on the stock overview page (closes #1283)
Added grocycodes also for chores and batteries (+ camera barcode scanning for /choretracking and /batterytracking, this now closes #221)
2021-07-13 19:29:23 +02:00
Bernd Bestel
8d2c3ae584
Partly reverted b856911f0f0b395d3534c0f0647f4f33fe6da8ef
Loading localization strings async for the fronted currently doesn't work in all cases...
2021-07-12 21:20:39 +02:00
Bernd Bestel
55807bfc94
Auto-compact stock entries (closes #1343) 2021-07-11 21:06:05 +02:00
Bernd Bestel
766eae5a7a
Remove accidentally committed debug statement 2021-07-02 22:19:54 +02:00
Bernd Bestel
74d745cfc4
Typo 2021-07-02 20:29:25 +02:00
Bernd Bestel
b856911f0f
Browser-cache localization strings (+ new API endpoint to get them) 2021-06-29 20:24:02 +02:00
Bernd Bestel
35fb87ab1e
Squashed commit
Use managed fonts
Include userentities dynamically in grocy.openapi.json for /userfields/{entity}/{objectId} endpoints (closes #1218)
Fixed userfieldsform load / save (for products and recipes) handling (fixes #1302)
Fixed PUT/DELETE /objects/{entity}/{objectId} when the given object id was invalid (fixes #1396)
Allow arrays in HTMLPurifier (fixes #1407)
2021-06-28 17:00:16 +02:00
Bernd Bestel
7ab59273da
Allow links and iframes in HTMLPurifier (fixes #1461) 2021-06-27 20:13:24 +02:00
Marc Ole Bulling
eb135aee39
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>
2021-06-18 20:45:42 +02:00
Bernd Bestel
26979a4321
Set HTMLPurifier cache path (fixes #1497) 2021-06-12 20:56:58 +02:00
Bernd Bestel
e42f4b405d
Fixed PHP warning (fixes #1267) 2021-01-12 10:40:14 +01:00
Bernd Bestel
bd21e3a8d6
Don't filter ampersands (fixes #1247) 2021-01-02 20:08:13 +01:00
Bernd Bestel
d9e42331f9
Allow some HTML tags in API request body (needed at least for HTML editor fields) (fixes #1228) 2020-12-29 19:19:04 +01:00
Bernd Bestel
2e3c237648
Fixed zero decimals handling (fixes #1213) 2020-12-23 19:56:37 +01:00
Bernd Bestel
672c4d33bf
Added basic RTL support (reference #984) 2020-12-11 18:06:32 +01:00
Bernd Bestel
0134535a5e
Fix/workaround for undfined constant GROCY_LOCALE 2020-11-08 21:37:43 +01:00
Bernd Bestel
9f88dd3af3
Fixed login did not work 2020-10-19 17:19:13 +02:00
Bernd Bestel
836bcc82e5
Applied PHP-CS-Fixer rules 2020-09-01 21:29:47 +02:00
Bernd Bestel
d4c5da2173
Applied PHP formatting rules 2020-08-31 20:40:31 +02:00
fipwmaqzufheoxq92ebc
6f8ad9b76e
Locales: use http-accept-language or cookie (#976)
* Locales: use http-accept-language or "language"-cookie

* Add user-setting "locale"

Rename CULTURE to DEFAULT_LOCALE

* Use LocaleMiddleware also in dev mode

* CORS: don't require authentication on OPTIONS

* Use a standard user-settings-control and start a new generic user settings page, not a separate page for the locale setting

* Fixed (broken by myself) link-return handling

* Clarify language settings

* Removed unneeded files

* Better user settings icon

* Added localization hints

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
2020-08-31 19:11:51 +02:00
Bernd Bestel
3b0d29bed0
Applied EditorConfig settings to all files 2020-08-29 16:41:27 +02:00
fipwmaqzufheoxq92ebc
b7d1b21f1d
[WIP] Implemented basic permissions (#960)
* Add permissions to Database & add "User"-classes

* Add UI & API for Permissions, protect "User"-(Api)-Controller with new permissions.

* Add some permissions.

* Add permission localization

* Add error handling.

* Error pages: only redirect on 404

* ExceptionController: return JSON-Response on api-routes

* Rename PRODUCT_ADD to PRODUCT_PURCHASE

* Move translation to new file

* Fix checkboxes stay selected on reload.

* Remove configurable User-implementation

* Remove MASTER_DATA_READ

* Disable buttons the user isn't allowed to use.

* Add default permissions for new users

* When migration to permissions, everyone starts as ADMIN

* Permission-Localization: add to transifex & LocalizationService

* Review

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
2020-08-29 12:05:32 +02:00
zebardy
1a5f3ce926
Convert services to singletons and use lazy loading to improve performance (#479)
* use singletons to reduce need to recreate the same objects

* unable to make the constructor private

* comment out debug printing to log file

* correct typo of treating self() as a var instead of a function

* utilise Localisation service as a singleton

* fix errent line that should have been commented

* remove phpinfo

* correct mistake in stock controller

* try storing app in apcu

* serialise inside the app closures

* get timings for db-changed-time

* get timings for db-changed-time

* store localisation service in apcu

* stor translations in apcu instead of localisation service (due to database connection)

* correct syntax error

* forgot to uncomment instance map

* correct indentation and variable out of scope

* more timings for app execution time

* try apc caching for views

* correct scope for Pot variable

* remove additional fopen

* correct timings for app build time

* correct timings for app object build time

* correct timings for app route build time

* get timings for routing timings

* get more in depth timings for routing loading

* fix more in depth timings for routing loading

* start investigating session auth middleware creation

* start investigating session auth middleware creation

* start investigating Login controller time

* start investigating Login controller time

* in depth look at Logincontroller timings

* comment out debug printing

* lazily obtain valus for page rendering

* correct syntax error

* correct scope of variable

* correct visibiity of methds inherited from BaseController

* missing use for Userfieldsservice

* lazy loading of open api spec

* lazy loading of users service

* lazy loading of batteries service

* lazy loading of services in controllers

* lazy loading of services in services

* correct mistake

* fix userservice

* fix userservice

* fix userfieldservice

* fix chores service

* fix calendar service

* remove Dockerfile used for development

* Remove docker compose file used for development

* Clean up app.php

* remove last diff

* Clean up base controller

* Clean up controllers

* lean up middleware

* Clean up and tuen all services into singletons

* remove debug from routes.php

* remove acpu from localisation

* Complete removal of acpu from localisation

* fixes for things broken

* More fixes following merge

* Fix for start up bug. Re factoring singleton code had brroken due to scope of clas var.

* fix bug where getUsersService is declared twice

* bug fixes following merge

* bug fixes following merge

* bug fixes following merge

* bug fixes following merge

* bug fixes following merge

* Fix all the not working things...

* Deleted off-topic files

* Deleted off-topic files

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
2020-03-01 17:47:47 +01:00
Bernd Bestel
5dd78aa19a
Remove accidentally added function 2020-02-11 19:36:15 +01:00
Bernd Bestel
d4fa1a64c2
Upgrade Slim Framework to v4 (closes #561) 2020-02-11 17:42:03 +01:00
Bernd Bestel
096fb7a116
Implement custom entities / objects (closes #242) 2019-09-18 16:18:15 +02:00
Bernd Bestel
91116ee768
Make sure user settings variable is populated always (fixes #277) 2019-06-08 15:54:56 +02:00
Bernd Bestel
4912dd56d1
Finished migration to use gettext (this now closes #161) 2019-05-02 20:20:18 +02:00
Bernd Bestel
9b2dba2397
Migrated (hopefully) all translations to PO/Gettext (references #161) 2019-05-01 20:19:18 +02:00
Bernd Bestel
8020f92d6b
Track on consume for which recipe it was (closes #64 and references #64) 2019-03-03 18:20:06 +01:00
Bernd Bestel
973f07b360
Add embedded mode (hides menu and so on), maybe need for #98 2018-11-17 12:57:35 +01:00
Talmai Oliveira
f13abf483e Grocy docker patch fix (#94)
fixed:

Warning: Use of undefined constant GROCY_USER_ID - assumed
'GROCY_USER_ID' (this will throw an Error in a future version of PHP) in
/www/controllers/BaseController.php on line 47
2018-10-20 09:07:05 +02:00
Bernd Bestel
d4227d2e41
Make auto reloading the page on external database changes configurable (closes #74) 2018-09-30 11:17:28 +02:00
Bernd Bestel
003d4a567a
Use the last commit time as release date when MODE is prerelease 2018-09-25 16:33:09 +02:00
Bernd Bestel
8d41dcc650
Use current commit hash as version "number" when MODE is prerelease 2018-09-25 08:55:25 +02:00
Bernd Bestel
42c1709633
Optimize and refactor latest changes 2018-07-25 19:28:15 +02:00