mirror of
https://github.com/grocy/grocy.git
synced 2025-10-17 02:36:29 +00:00
Compare commits
192 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
f7c22ec384 | ||
|
98768bd846 | ||
|
e52b1c5f60 | ||
|
c263aba6a5 | ||
|
edca302b71 | ||
|
f6d6e933e3 | ||
|
78e4e918c6 | ||
|
fa35d933e0 | ||
|
9ae7c72e87 | ||
|
c415e2f8da | ||
|
297cc57244 | ||
|
1496a58673 | ||
|
d05038e311 | ||
|
de4c6e8b60 | ||
|
70bb014c9f | ||
|
8c033ff6c8 | ||
|
8c79cc4f8e | ||
|
89c6d6683a | ||
|
d0e0102752 | ||
|
bc5051351a | ||
|
08c1efa0ad | ||
|
2633d3d1a5 | ||
|
aec71bd408 | ||
|
10661706b9 | ||
|
2c0a71078f | ||
|
02fe3f2119 | ||
|
55adc140b2 | ||
|
04f362b723 | ||
|
979c67b44c | ||
|
825321593b | ||
|
99db10a490 | ||
|
2cba3ce7e9 | ||
|
b53cdd4c42 | ||
|
cd7139c6cf | ||
|
c3dd1c4187 | ||
|
89761ac141 | ||
|
f427849e89 | ||
|
d16d976d0b | ||
|
ddf0ff0aef | ||
|
fb57d9ef13 | ||
|
c43fe24e47 | ||
|
6ab5bc3a29 | ||
|
ecb9f53bb4 | ||
|
6e3182884a | ||
|
ceb50774dc | ||
|
5f65f2abd0 | ||
|
49daed6c2b | ||
|
628e779902 | ||
|
99546815f9 | ||
|
7ceba3c0c1 | ||
|
d03175f75a | ||
|
f4639c9bb2 | ||
|
f6d77ac8d7 | ||
|
d43f59d9a9 | ||
|
631f03e62c | ||
|
778cf847d3 | ||
|
02a71a5edb | ||
|
629333e1ab | ||
|
dd5bd3852a | ||
|
491412807c | ||
|
9cdb0908d6 | ||
|
b5d3e68d68 | ||
|
48564b5286 | ||
|
8bdb74a8e0 | ||
|
5ab31f726a | ||
|
7ee79ec56c | ||
|
df4907f5d4 | ||
|
a4992ff602 | ||
|
f4874ed8d0 | ||
|
84bd74a1bc | ||
|
16011b91c6 | ||
|
2bce428339 | ||
|
a56de30268 | ||
|
71d44edb8c | ||
|
cc6b01de08 | ||
|
340832c361 | ||
|
98469248eb | ||
|
3d01854fa1 | ||
|
756133a9eb | ||
|
1090f070c9 | ||
|
6857796ef0 | ||
|
792c710bdc | ||
|
7336693ca2 | ||
|
91700e7dae | ||
|
c9c0baefeb | ||
|
b18bd2ff87 | ||
|
d9667b4534 | ||
|
d8d3c3ef0b | ||
|
b64d726c42 | ||
|
0bd698c968 | ||
|
9ef5045c9b | ||
|
902cb20710 | ||
|
1e9a4d9590 | ||
|
5d7efebd40 | ||
|
b9c58423a9 | ||
|
efc7b999bb | ||
|
995df64054 | ||
|
a5788511e3 | ||
|
4e56dee6f0 | ||
|
3b160659f3 | ||
|
83fa02d8ad | ||
|
daf5ad33c7 | ||
|
597abe236d | ||
|
0c8e8cab97 | ||
|
f057ae7e06 | ||
|
c0fbc4adaf | ||
|
efae0b193d | ||
|
c934bfb7b3 | ||
|
76500c57bd | ||
|
3f2ad17460 | ||
|
c60a1783da | ||
|
0585e80c70 | ||
|
39d1f49431 | ||
|
2d62f8ddeb | ||
|
b76abf54ab | ||
|
337cbb73ee | ||
|
79590cd5ac | ||
|
383ac49919 | ||
|
15f7ac3da0 | ||
|
46c4cdb81a | ||
|
639ef0da5b | ||
|
0229d187ae | ||
|
dea6f3f820 | ||
|
dd409b4bf9 | ||
|
407344e86a | ||
|
f6e0ff11f1 | ||
|
2ebb9b2cd9 | ||
|
38a4ad8ec4 | ||
|
84e3707f4f | ||
|
fce6458df6 | ||
|
018449c648 | ||
|
8175b1bcfe | ||
|
c1dea5c254 | ||
|
50fac692ad | ||
|
d889e9d3ad | ||
|
4be447fc60 | ||
|
daa0a59c5f | ||
|
df39f94fca | ||
|
46313e2c75 | ||
|
541c0be6be | ||
|
3b3212d101 | ||
|
f03bb5eeee | ||
|
6affa01f81 | ||
|
605ceb1b19 | ||
|
7d4a9602ab | ||
|
eb370dad1e | ||
|
8676b86575 | ||
|
6036786153 | ||
|
88950f00d5 | ||
|
f90ced5a39 | ||
|
2b2dd0568b | ||
|
3f60a2b5fa | ||
|
3070448555 | ||
|
80a873da3e | ||
|
e8f76e5694 | ||
|
fa49b449dd | ||
|
121050960c | ||
|
bb0cc50ffc | ||
|
e1967bd603 | ||
|
a5c2157320 | ||
|
ff056f8d81 | ||
|
af4715e17f | ||
|
68aad90a59 | ||
|
24c9247663 | ||
|
7e2f30396f | ||
|
e8dc334758 | ||
|
f1bc2cc40f | ||
|
c0d0b8fc90 | ||
|
d883474f03 | ||
|
c396c2a84c | ||
|
52e2c6d480 | ||
|
2fbd559105 | ||
|
58c6b72d77 | ||
|
dfe9868a48 | ||
|
06968ac289 | ||
|
9b52168b94 | ||
|
54d91b8b76 | ||
|
312dd8a200 | ||
|
57d70851c8 | ||
|
5b53175ed6 | ||
|
721a0ce417 | ||
|
0b532f7624 | ||
|
e64df711e2 | ||
|
8cb9157c73 | ||
|
b57ba59243 | ||
|
a85af22d6a | ||
|
9b2c96c085 | ||
|
a80e048c2d | ||
|
bef261d869 | ||
|
dbf660f953 | ||
|
2de87eb446 | ||
|
9498dd9c67 |
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
// This is executed inside DatabaseMigrationService class/context
|
||||
|
||||
$db = $this->getDatabaseService()->GetDbConnection();
|
||||
|
||||
// Reset the password of the user "admin" to "admin"
|
||||
$adminUserRow = $db->users()->where('username', 'admin')->fetch();
|
||||
|
||||
if ($adminUserRow == null)
|
||||
{
|
||||
$adminUserRow = $db->users()->createRow([
|
||||
'username' => 'admin'
|
||||
]);
|
||||
}
|
||||
|
||||
$adminUserRow->update([
|
||||
'password' => password_hash('admin', PASSWORD_DEFAULT)
|
||||
]);
|
@@ -1,4 +1,4 @@
|
||||
pushd ..
|
||||
call composer install
|
||||
yarn install
|
||||
call yarn install
|
||||
popd
|
||||
|
@@ -1,4 +1,4 @@
|
||||
pushd ..
|
||||
call composer update
|
||||
yarn upgrade
|
||||
call yarn upgrade
|
||||
popd
|
||||
|
2
.github/ISSUE_TEMPLATE/bug-report.md
vendored
2
.github/ISSUE_TEMPLATE/bug-report.md
vendored
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: Bug Report
|
||||
about: If you've found something that does not work, please report it to help improve
|
||||
grocy
|
||||
Grocy
|
||||
title: 'Bug: '
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
2
.github/SECURITY.md
vendored
2
.github/SECURITY.md
vendored
@@ -1,4 +1,4 @@
|
||||
grocy is not an enterprise application and neither one you (should) host publicly (means without authentication) on the internet.
|
||||
Grocy is not an enterprise application and neither one you (should) host publicly (means without authentication) on the internet.
|
||||
|
||||
So unless something really bad can be abused _unauthenticated_, please just open a regular issue on the [Issue Tracker](https://github.com/grocy/grocy/issues/new/choose).
|
||||
|
||||
|
6
.gitignore
vendored
6
.gitignore
vendored
@@ -1,5 +1,5 @@
|
||||
/public/node_modules
|
||||
/vendor
|
||||
/.release
|
||||
embedded.txt
|
||||
.DS_Store
|
||||
/.release
|
||||
/packages
|
||||
/public/packages
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
$finder = PhpCsFixer\Finder::create()
|
||||
->exclude(['vendor'])
|
||||
->exclude(['packages'])
|
||||
->ignoreVCSIgnored(true)
|
||||
->files()->name('*.php')
|
||||
->in(__DIR__)
|
||||
|
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
@@ -12,6 +12,5 @@
|
||||
"html.format.wrapAttributes": "force",
|
||||
"html.format.wrapLineLength": 0,
|
||||
"php-cs-fixer.formatHtml": true,
|
||||
"php-cs-fixer.autoFixBySemicolon": true,
|
||||
"php-cs-fixer.onsave": true,
|
||||
}
|
||||
"php-cs-fixer.autoFixBySemicolon": true
|
||||
}
|
||||
|
2
.yarnrc
2
.yarnrc
@@ -1,4 +1,4 @@
|
||||
--modules-folder public/node_modules
|
||||
--modules-folder public/packages
|
||||
--install.production true
|
||||
--install.ignore-scripts true
|
||||
--install.ignore-optional true
|
||||
|
41
README.md
41
README.md
@@ -1,7 +1,7 @@
|
||||
<div align="center">
|
||||
<img alt="Logo" height="50" src="https://raw.githubusercontent.com/grocy/grocy/master/public/img/grocy_logo.svg?sanitize=true" />
|
||||
<img alt="Logo" height="60" src="https://raw.githubusercontent.com/grocy/grocy/master/public/img/logo.svg?sanitize=true" />
|
||||
<h3>ERP beyond your fridge</h3>
|
||||
<h4>grocy is a web-based self-hosted groceries & household management solution for your home<br>Created by <a href="https://github.com/berrnd">@berrnd</a></h4>
|
||||
<h4>Grocy is a web-based self-hosted groceries & household management solution for your home<br>Created by <a href="https://github.com/berrnd">@berrnd</a></h4>
|
||||
</div>
|
||||
|
||||
-----
|
||||
@@ -11,12 +11,16 @@
|
||||
- Public demo of the latest stable version (`release` branch) → [https://demo.grocy.info](https://demo.grocy.info)
|
||||
- Public demo of the current development version (`master` branch) → [https://demo-prerelease.grocy.info](https://demo-prerelease.grocy.info)
|
||||
|
||||
## Features
|
||||
|
||||
See the website → <https://grocy.info>
|
||||
|
||||
## Questions / Help / Bug Reports / Feature Requests
|
||||
|
||||
- General help and usage questions → [r/grocy subreddit](https://www.reddit.com/r/grocy)
|
||||
- Bug Reports and Feature Requests → [Issue Tracker](https://github.com/grocy/grocy/issues/new/choose)
|
||||
|
||||
_Please don't send me private messages or call me regarding grocy help. I check the issue tracker and the subreddit pretty much daily, but don't provide grocy support beyond that._
|
||||
_Please don't send me private messages or call me regarding Grocy help. I check the issue tracker and the subreddit pretty much daily, but don't provide any support beyond that._
|
||||
|
||||
## Community contributions
|
||||
|
||||
@@ -24,13 +28,13 @@ See the website for a list of community contributed Add-ons / Tools. → [htt
|
||||
|
||||
## How to install
|
||||
|
||||
> Checkout [grocy-desktop](https://github.com/grocy/grocy-desktop), if you want to run grocy without having to manage a webserver just like a normal (Windows) desktop application.
|
||||
> Checkout [grocy-desktop](https://github.com/grocy/grocy-desktop), if you want to run Grocy without having to manage a webserver just like a normal (Windows) desktop application.
|
||||
>
|
||||
> Directly download the [latest release](https://releases.grocy.info/latest-desktop) - the installation is nothing more than just clicking 2 times "next".
|
||||
|
||||
See the website for some installation guides and troubleshooting help. → [https://grocy.info/links](https://grocy.info/links)
|
||||
|
||||
grocy is technically a pretty simple PHP application, so the basic notes to get it running are:
|
||||
Grocy is technically a pretty simple PHP application, so the basic notes to get it running are:
|
||||
- Unpack the [latest release](https://releases.grocy.info/latest)
|
||||
- Copy `config-dist.php` to `data/config.php` + edit to your needs
|
||||
- Ensure that the `data` directory is writable
|
||||
@@ -38,9 +42,14 @@ grocy is technically a pretty simple PHP application, so the basic notes to get
|
||||
- Include `try_files $uri /index.php$is_args$query_string;` in your location block if you use nginx
|
||||
- Or disable URL rewriting (see the option `DISABLE_URL_REWRITING` in `data/config.php`)
|
||||
- → Default login is user `admin` with password `admin`, please change the password immediately (user menu at the top right corner)
|
||||
- _Currently everything is only tested against (means 100 % works with) PHP 8.0 with SQLite 3.27.2_
|
||||
|
||||
Alternatively clone this repository (the `release` branch always references the latest released version, or checkout the latest tagged revision) and install Composer and Yarn dependencies manually.
|
||||
Alternatively clone this repository (the `release` branch always references the latest released version) and install Composer and Yarn dependencies manually.
|
||||
|
||||
### Platform support
|
||||
|
||||
- PHP 8.1 (with SQLite 3.34.0+)
|
||||
- Required PHP extensions: `fileinfo`, `pdo_sqlite`, `gd`, `ctype`, `json`, `intl`, `zlib`, `mbstring`
|
||||
- _Recommendation: Benchmark tests showed that e.g. unit conversion handling is up to 5 times faster when using a more recent (3.39.4+) SQLite version._
|
||||
|
||||
## How to run using Docker
|
||||
|
||||
@@ -53,13 +62,13 @@ See [grocy/grocy-docker](https://github.com/grocy/grocy-docker) or [linuxserver/
|
||||
- Empty the `data/viewcache` directory
|
||||
- Visit the main route once to apply database migrations ([see below](https://github.com/grocy/grocy#database-migrations))
|
||||
|
||||
If you run grocy on Linux, there is also `update.sh` (remember to make the script executable (`chmod +x update.sh`) and ensure that you have `unzip` installed) which does exactly this and additionally creates a backup (`.tgz` archive) of the current installation in `data/backups` (backups older than 60 days will be deleted during the update).
|
||||
If you run Grocy on Linux, there is also `update.sh` (remember to make the script executable (`chmod +x update.sh`) and ensure that you have `unzip` installed) which does exactly this and additionally creates a backup (`.tgz` archive) of the current installation in `data/backups` (backups older than 60 days will be deleted during the update).
|
||||
|
||||
## Localization
|
||||
|
||||
grocy is fully localizable - the default language is English (integrated into code), a German localization is always maintained by me.
|
||||
Grocy is fully localizable - the default language is English (integrated into code), a German localization is always maintained by me.
|
||||
|
||||
You can easily help translating grocy on [Transifex](https://www.transifex.com/grocy/grocy/dashboard/) if your language is incomplete or not available yet.
|
||||
You can easily help translating Grocy on [Transifex](https://www.transifex.com/grocy/grocy/dashboard/) if your language is incomplete or not available yet.
|
||||
|
||||
The default language can be set in `data/config.php`, e. g. `Setting('DEFAULT_LOCALE', 'it');` and there is also a user setting (see the user settings page) to set a different language per user.
|
||||
|
||||
@@ -83,7 +92,7 @@ See the integrated Swagger UI instance on [/api](https://demo.grocy.info/api).
|
||||
|
||||
Some fields (with a barcode icon above) also allow to select a value by scanning a barcode. It works best when your barcode reader prefixes every barcode with a letter which is normally not part of a item name (I use a `$`) and sends a `TAB` after a scan.
|
||||
|
||||
Additionally it's also possible to use your device camera to scan a barcode by using the camera button on the right side of the corresponding field (powered by [Quagga2](https://github.com/ericblade/quagga2), totally offline / client-side camera stream processing, please note due to browser security restrictions, this only works when serving grocy via a secure connection (`https://`)). Quick video demo: https://www.youtube.com/watch?v=Y5YH6IJFnfc
|
||||
Additionally it's also possible to use your device camera to scan a barcode by using the camera button on the right side of the corresponding field (powered by [Quagga2](https://github.com/ericblade/quagga2), totally offline / client-side camera stream processing, please note due to browser security restrictions, this only works when serving Grocy via a secure connection (`https://`)). Quick video demo: <https://www.youtube.com/watch?v=Y5YH6IJFnfc>
|
||||
|
||||
_My personal recommendation: Use a USB barcode laser scanner. They are cheap and work 1000 % better, faster, under any lighting condition and from any angle._
|
||||
|
||||
@@ -120,11 +129,11 @@ There is no plugin included for any service, see the reference implementation in
|
||||
|
||||
Database schema migration is automatically done when visiting the root (`/`) route (click on the logo in the left upper edge).
|
||||
|
||||
_Please note: Database migrations are supposed to work between releases, not between every commit. If you want to run the current `master` branch (which is the development version), however, you need to handle that (and maybe more) yourself._
|
||||
_Please note: Database migrations are supposed to work between releases, not between every commit. If you want to run the current `master` branch (which is the development version), you need to handle that (and maybe more) yourself._
|
||||
|
||||
### Disable certain features
|
||||
|
||||
If you don't use certain feature sets of grocy (for example if you don't need "Chores"), there are feature flags per major feature set to hide/disable the related UI elements (see `config-dist.php`).
|
||||
If you don't use certain feature sets of Grocy (for example if you don't need "Chores"), there are feature flags per major feature set to hide/disable the related UI elements (see `config-dist.php`).
|
||||
|
||||
### Adding your own CSS or JS without to have to modify the application itself
|
||||
|
||||
@@ -143,14 +152,14 @@ In embedded mode, settings can be overridden by text files in `data/settingoverr
|
||||
|
||||
## Contributing / Say Thanks
|
||||
|
||||
Any help is more than appreciated. Feel free to pick any open unassigned issue and submit a pull request, but please leave a short comment or assign the issue yourself, to avoid working on the same thing.
|
||||
|
||||
See https://grocy.info/#say-thanks for more ideas if you just want to say thanks.
|
||||
Any help is welcome, feel free to contribute anything which comes to your mind or see <https://grocy.info/#say-thanks> if you just want to say thanks.
|
||||
|
||||
## Roadmap
|
||||
|
||||
There is none. The progress of a specific bug/enhancement is always tracked in the corresponding issue, at least by commit comment references.
|
||||
|
||||
[Milestones](https://github.com/grocy/grocy/milestones) are used to indicate in which version the corresponding request was done (`vNEXT` means it's currently planned to do that for the next release).
|
||||
|
||||
## Screenshots
|
||||
|
||||
### Stock overview
|
||||
|
11
app.php
11
app.php
@@ -1,14 +1,15 @@
|
||||
<?php
|
||||
|
||||
use Grocy\Controllers\LoginController;
|
||||
use Grocy\Controllers\ExceptionController;
|
||||
use Grocy\Helpers\UrlManager;
|
||||
use Grocy\Middleware\LocaleMiddleware;
|
||||
use Grocy\Middleware\CorsMiddleware;
|
||||
use Psr\Container\ContainerInterface as Container;
|
||||
use Slim\Factory\AppFactory;
|
||||
use Slim\Views\Blade;
|
||||
|
||||
// Load composer dependencies
|
||||
require_once __DIR__ . '/vendor/autoload.php';
|
||||
require_once __DIR__ . '/packages/autoload.php';
|
||||
|
||||
// Load config files
|
||||
require_once GROCY_DATAPATH . '/config.php';
|
||||
@@ -84,7 +85,7 @@ if (!empty(GROCY_BASE_PATH))
|
||||
|
||||
if (GROCY_MODE === 'production' || GROCY_MODE === 'dev')
|
||||
{
|
||||
$app->add(new \Grocy\Middleware\LocaleMiddleware($container));
|
||||
$app->add(new LocaleMiddleware($container));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -97,10 +98,12 @@ $app->add(new $authMiddlewareClass($container, $app->getResponseFactory()));
|
||||
$app->addRoutingMiddleware();
|
||||
$errorMiddleware = $app->addErrorMiddleware(true, false, false);
|
||||
$errorMiddleware->setDefaultErrorHandler(
|
||||
new \Grocy\Controllers\ExceptionController($app, $container)
|
||||
new ExceptionController($app, $container)
|
||||
);
|
||||
|
||||
$app->add(new CorsMiddleware($app->getResponseFactory()));
|
||||
|
||||
$app->getRouteCollector()->setCacheFile(GROCY_DATAPATH . '/viewcache/route_cache.php');
|
||||
|
||||
ob_clean(); // No response output before here
|
||||
$app->run();
|
||||
|
@@ -1 +1 @@
|
||||
- grocy is now fully localizable and ships by default with English and German translations
|
||||
- Grocy is now fully localizable and ships by default with English and German translations
|
||||
|
@@ -1,3 +1,3 @@
|
||||
- Upgraded Bootstrap and some other dependencies (grocy now looks even better!)
|
||||
- Upgraded Bootstrap and some other dependencies (Grocy now looks even better!)
|
||||
- Added Italian translation (thanks @davidoskky)
|
||||
- => Demo for this language available at: https://it.demo.grocy.info
|
||||
|
@@ -1,5 +1,5 @@
|
||||
This was released shortly after the last release to fix a small regression bug, original changes from Version 1.13.0:
|
||||
|
||||
- Upgraded Bootstrap and some other dependencies (grocy now looks even better!)
|
||||
- Upgraded Bootstrap and some other dependencies (Grocy now looks even better!)
|
||||
- Added Italian translation (thanks @davidoskky)
|
||||
- => Demo for this language available at: https://it.demo.grocy.info
|
||||
|
@@ -10,4 +10,4 @@
|
||||
- Sidebar collapse state is now remembered
|
||||
- Fixed datetimepicker border
|
||||
- Keep the parent sidebar menu item expanded if the active page is a sub menu item
|
||||
- Custom JS/CSS file names have changed [see README](https://github.com/berrnd/grocy#adding-your-own-css-or-js-without-to-have-to-modify-the-application-itself)
|
||||
- Custom JS/CSS file names have changed [see README](https://github.com/grocy/grocy#adding-your-own-css-or-js-without-to-have-to-modify-the-application-itself)
|
||||
|
@@ -1,9 +1,9 @@
|
||||
- New related project: **grocy-desktop**
|
||||
- => https://github.com/berrnd/grocy-desktop
|
||||
- Run grocy without a webserver just like a normal (windows) desktop application
|
||||
- New "embedded mode" for grocy to help running in "desktop application mode" [see README](https://github.com/berrnd/grocy#embedded-mode)
|
||||
- => https://github.com/grocy/grocy-desktop
|
||||
- Run Grocy without a webserver just like a normal (Windows) desktop application
|
||||
- New "embedded mode" for Grocy to help running in "desktop application mode" [see README](https://github.com/grocy/grocy#embedded-mode)
|
||||
- New datepicker shorthands and improvements
|
||||
- `YYYYMMe` or `YYYYMM+` gets expanded to the end of the given month in the given year in proper notation
|
||||
- Changed: `MMDD` will be expanded to the given day next year if > today
|
||||
- [see README](https://github.com/berrnd/grocy#input-shorthands-for-date-fields)
|
||||
- [see README](https://github.com/grocy/grocy#input-shorthands-for-date-fields)
|
||||
- Some other small bug fixes
|
||||
|
@@ -2,7 +2,7 @@
|
||||
- The currently defined user will automatically be migrated, please remove `HTTP_USER` and `HTTP_PASSWORD` from your config file afterwards
|
||||
- For this it was necessary to delete all sessions and API keys during the migration
|
||||
- Added an update script (`/update.sh`) to make updates (on Linux machines) easier
|
||||
- See also ["How to update" in README](https://github.com/berrnd/grocy#how-to-update)
|
||||
- See also ["How to update" in README](https://github.com/grocy/grocy#how-to-update)
|
||||
- Added the possibility to track who did a habit
|
||||
- Added a rudimentary habit analysis possibility
|
||||
- Different small UI, code and translation improvements
|
||||
|
@@ -2,5 +2,5 @@
|
||||
- Manage all your household equipment/devices in one place and have the information/instruction manual at hand when needed
|
||||
- New feature: Products can now have pictures
|
||||
- Add them in the product edit page
|
||||
- Will be shown in the productcard (purchase/consume/etc. pages) and when you click the product name on the stock overview page (a little image icon next to the product name indicates if the product has an image)
|
||||
- Will be shown in the product card (purchase/consume/etc. pages) and when you click the product name on the stock overview page (a little image icon next to the product name indicates if the product has an image)
|
||||
- Recipes and the new equipment edit page now have a little editor with text formatting capabilities
|
||||
|
@@ -19,5 +19,5 @@
|
||||
- Other improvements
|
||||
- The calendar can now be shared/integrated in iCal format (button in the header on the calendar page)
|
||||
- Added feature flags to hide/disable certain parts of grocy when you don't use them (for example hide "Chores" and all related UI elements, when you don't use it, see `config-dist.php`)
|
||||
- Added a "Apple Touch Icon" and a "Web App Manifest" which should improve grocy on mobile devices and also enables "Add to Home screen" on major mobile browsers
|
||||
- Added a "Apple Touch Icon" and a "Web App Manifest" which should improve Grocy on mobile devices and also enables "Add to Home screen" on major mobile browsers
|
||||
- A lot of other minor small and bigger UI improvements
|
||||
|
@@ -2,7 +2,7 @@
|
||||
- Fixed a problem that the user settings were not properly initialized for the frontend JS part when not logged only (so potentially affected only the login page)
|
||||
- Fixed an issue that the shopping list did not load when a plural translation for a quantity unit was missing
|
||||
- Fixed that tooltips were visible forever when consuming all products on the stock overview page
|
||||
- Fixed that login did not work when "Stay logged in permanently" was set and grocy runs on a 32-bit system (thanks @matejdro)
|
||||
- Fixed that login did not work when "Stay logged in permanently" was set and Grocy runs on a 32-bit system (thanks @matejdro)
|
||||
- Fixed page reloads when "Auto reload on external changes" is enabled and there is unsaved form data (the detection did not work for forms in modal dialogs, e. g. when adding a entry to the meal plan)
|
||||
- Fixed (again) that the product picker did not work properly when the product name contains single quotes
|
||||
- Fixed that a entered barcode on the product edit page was only saved when "adding" it to the barcodes list by pressing `TAB` (is now automatically added to the list also when just leaving the field)
|
||||
|
@@ -1,12 +1,13 @@
|
||||
### New feature: Custom entities / objects / lists
|
||||
- Custom entities are based on Userfields and can be used to add any custom lists you want to have in grocy
|
||||
|
||||
- Custom entities are based on Userfields and can be used to add any custom lists you want to have in Grocy
|
||||
- They can have an own menu entry in the sidebar
|
||||
- => See "Manage master data" -> "Userentities" or try it on the demo: https://demo.grocy.info/userobjects/exampleuserentity
|
||||
|
||||
### New feature: Use the device camera for barcode scanning
|
||||
- Available on any barcode-enabled field (so currently only for picking products) - a new camera button at the right of side the text field
|
||||
- Implemented using [QuaggaJS](https://github.com/serratus/quaggaJS) - camera stream processing happens totally offline / client-side
|
||||
- Please note due to browser security restrictions, this only works when serving grocy via a secure connection (`https://`)
|
||||
- Please note due to browser security restrictions, this only works when serving Grocy via a secure connection (`https://`)
|
||||
- There is also a `config.php` setting `DISABLE_BROWSER_BARCODE_CAMERA_SCANNING` to disable this, if you don't need it at all (defaults to `false`)
|
||||
- I you have problems that barcodes are not recognized properly, there is a little "barcode scanner testing page" at [/barcodescannertesting](https://demo.grocy.info/barcodescannertesting)
|
||||
- => Quick video demo: https://www.youtube.com/watch?v=Y5YH6IJFnfc
|
||||
@@ -20,7 +21,7 @@
|
||||
- Quantity units can now be linked (related measurements / unit conversion)
|
||||
- On the quantity unit edit page default conversion can be defined for each unit
|
||||
- Products "inherit" the default conversion and additionally can have their own / override the default ones
|
||||
- It's now possible to print a "Location Content Sheet" with the current stock per location - new button at the top of the stock overview page (thought to hang it at the location, note used amounts on paper and track it in grocy later)
|
||||
- It's now possible to print a "Location Content Sheet" with the current stock per location - new button at the top of the stock overview page (thought to hang it at the location, note used amounts on paper and track it in Grocy later)
|
||||
- Stock overview page improvements
|
||||
- Options in the more/context-menu to directly open the purchase/consume/inventory pages prefilled with the current product in a popup/dialog
|
||||
- Option in the more/context-menu to add the current product directly to a shopping list
|
||||
@@ -104,4 +105,4 @@
|
||||
- It's now also possible to provide the API key via a query parameter (same name as the header, so `GROCY-API-KEY`)
|
||||
|
||||
#### Say thanks
|
||||
Because there were some questions about that in the past: If grocy is useful for you, [say thanks](https://grocy.info/#say-thanks)!
|
||||
Because there were some questions about that in the past: If Grocy is useful for you, [say thanks](https://grocy.info/#say-thanks)!
|
||||
|
@@ -27,12 +27,12 @@
|
||||
- There is also a new sub feature flag `FEATURE_FLAG_STOCK_PRODUCT_FREEZING` to disable this if you don't need it (defaults to `true`)
|
||||
|
||||
### Stock improvements/fixes
|
||||
- The productcard gets now also refreshed after a transaction was posted (purchase/consume/etc.) (thanks @kriddles)
|
||||
- The product card gets now also refreshed after a transaction was posted (purchase/consume/etc.) (thanks @kriddles)
|
||||
- The product field calories (kcal) now also allows decimal numbers
|
||||
- On the inventory page, "New amount" is now prefilled with the current stock amount of the selected product
|
||||
- Fixed that entering partial amounts was not possible on the inventory page (only applies if the product option "Allow partial units in stock" is enabled)
|
||||
- Fixed that on purchase a wrong minimum amount was enforced for products with enabled tare weight handling in combination with different purchase/stock quantity units
|
||||
- Fixed that the productcard did not load correctly when `FEATURE_FLAG_STOCK_LOCATION_TRACKING` was set to `false` (thanks @kriddles)
|
||||
- Fixed that the product card did not load correctly when `FEATURE_FLAG_STOCK_LOCATION_TRACKING` was set to `false` (thanks @kriddles)
|
||||
- Fixed that the "Add as barcode to existing product" workflow did not work twice when not switching the page inbetween
|
||||
|
||||
### Shopping list improvements/fixes
|
||||
|
@@ -1,5 +1,5 @@
|
||||
## !! Important notice
|
||||
If you run grocy in a subdirectory, you need to set a new `config.php` setting (`BASE_PATH`, see `config-dist.php`)
|
||||
If you run Grocy in a subdirectory, you need to set a new `config.php` setting (`BASE_PATH`, see `config-dist.php`)
|
||||
|
||||
### Stock fixes
|
||||
- Fixed purchase/consume/inventory problems when `FEATURE_FLAG_STOCK_LOCATION_TRACKING` was set to `false`
|
||||
|
@@ -4,7 +4,7 @@
|
||||
>
|
||||
> [Here](https://github.com/grocy/grocy/issues/1209#issuecomment-749760765) is a workaround if you still run a SQLite version >= 3.8.3 < 3.9.0
|
||||
>
|
||||
> _PHP 7.2 with SQLite 3.8.3 was the formerly in [README mentioned](https://github.com/grocy/grocy#how-to-install) minimum runtime requirement, any future release will only be tested against a reasonable recent runtime (currently PHP 7.4 with SQLite 3.27.2) - supporting those (very) old runtime stuff is too time consuming..._
|
||||
> _PHP 7.2 (with SQLite 3.8.3+) was the formerly minimum runtime requirement, any future release will only support PHP 7.4 (with SQLite 3.27.2+) - supporting those (very) old runtime stuff is too time consuming..._
|
||||
|
||||
> ❗ If some pages/tables doesn't load at all, please check that your `/data/config.php` setting `CURRENCY` is a valid ISO 4217 currency code - that's most probably the issue then.
|
||||
|
||||
@@ -31,10 +31,10 @@
|
||||
- New `config.php` setting `AUTH_CLASS` to change the used authentication provider
|
||||
- Via LDAP
|
||||
- New `config.php` settings `LDAP_DOMAIN`, `LDAP_ADDRESS` and `LDAP_BASE_DN`
|
||||
- If you set `AUTH_CLASS` to `Grocy\Middleware\LdapAuthMiddleware`, users will be authenticated against your directory (and will also be created (in grocy), if not already present)
|
||||
- If you set `AUTH_CLASS` to `Grocy\Middleware\LdapAuthMiddleware`, users will be authenticated against your directory (and will also be created (in Grocy), if not already present)
|
||||
- Via a reverse proxy
|
||||
- New `config.php` setting `REVERSE_PROXY_AUTH_HEADER`
|
||||
- If you set `AUTH_CLASS` to `Grocy\Middleware\ReverseProxyAuthMiddleware` and your reverse proxy sends a username in the HTTP header `REMOTE_USER` (header name can be changed by the setting `REVERSE_PROXY_AUTH_HEADER`), the user is automatically authenticated (and will also be created (in grocy), if not already present)
|
||||
- If you set `AUTH_CLASS` to `Grocy\Middleware\ReverseProxyAuthMiddleware` and your reverse proxy sends a username in the HTTP header `REMOTE_USER` (header name can be changed by the setting `REVERSE_PROXY_AUTH_HEADER`), the user is automatically authenticated (and will also be created (in Grocy), if not already present)
|
||||
- (Thanks @fipwmaqzufheoxq92ebc for the initial work on this)
|
||||
|
||||
### Stock improvements/fixes
|
||||
@@ -174,7 +174,7 @@
|
||||
- Products, quantity units and product groups are possible to use now
|
||||
- Means you can use for example the shopping list, recipes and the meal plan with products while the "stock handling part" is hidden
|
||||
- Ordering now happens case-insensitive
|
||||
- The data path (previously fixed to the `data` folder) is now configurable, making it possible to run multiple grocy instances from the same directory (with different `config.php` files / different database, etc.) (thanks @fgrsnau)
|
||||
- The data path (previously fixed to the `data` folder) is now configurable, making it possible to run multiple Grocy instances from the same directory (with different `config.php` files / different database, etc.) (thanks @fgrsnau)
|
||||
- Via an environment variable `GROCY_DATAPATH` (higher priority)
|
||||
- Via an FastCGI parameter `GROCY_DATAPATH` (lower priority)
|
||||
- The language can now be set per user (see the new user settings page / top right corner settings menu) (thanks @fipwmaqzufheoxq92ebc)
|
||||
|
@@ -2,7 +2,7 @@
|
||||
>
|
||||
> [Here](https://github.com/grocy/grocy/issues/1209#issuecomment-749760765) is a workaround if you still run a SQLite version >= 3.8.3 < 3.9.0
|
||||
>
|
||||
> _PHP 7.2 with SQLite 3.8.3 was the formerly in [README mentioned](https://github.com/grocy/grocy#how-to-install) minimum runtime requirement, any future release will only be tested against a reasonable recent runtime (currently PHP 7.4 with SQLite 3.27.2) - supporting those (very) old runtime stuff is too time consuming..._
|
||||
> _PHP 7.2 (with SQLite 3.8.3+) was the formerly minimum runtime requirement, any future release will only support PHP 7.4 (with SQLite 3.27.2+) - supporting those (very) old runtime stuff is too time consuming..._
|
||||
|
||||
- Improved the prerequisites checker (added missing required PHP extension `ctype`) (thanks @Forceu)
|
||||
- Added validation checks for most `data/config.php` settings to prevent using invalid ones (thanks @Forceu)
|
||||
|
@@ -1,8 +1,9 @@
|
||||
> ⚠️ The following PHP extensions are now additionally required: `json`, `intl`, `zlib`
|
||||
|
||||
> ⚠️ PHP 8 is now supported and from now on the only tested runtime version (although currently PHP 7.2 should still work).
|
||||
> ⚠️ PHP 8.0 (with SQLite 3.27.2+) is from now on the only supported runtime version.
|
||||
|
||||
### New feature: Grocycode / label printer support
|
||||
|
||||
### New feature: grocycode / label printer support
|
||||
#### (Own) Product/stock entry/chores/batteries labels/barcodes
|
||||
- Print own labels/barcodes for products/stock entries/chores/batteries and then scan that code on every place a product/stock entry/chore/battery can be selected
|
||||
- Can be printed (or downloaded) via
|
||||
@@ -27,7 +28,7 @@
|
||||
|
||||
### New feature: Shopping list thermal printer support
|
||||
- The shopping list can now be printed on a thermal printer
|
||||
- The printer must be compatible to the `ESC/POS` protocol and needs to be locally attached or network reachable to/by the machine hosting grocy (so the server)
|
||||
- The printer must be compatible to the `ESC/POS` protocol and needs to be locally attached or network reachable to/by the machine hosting Grocy (so the server)
|
||||
- See the new `TPRINTER*` `config.php` options to configure the printer connection and other options
|
||||
- => New button on the shopping list print dialog
|
||||
- Can be enabled via the new feature flag `FEATURE_FLAG_THERMAL_PRINTER` (defaults to disabled)
|
||||
@@ -37,7 +38,7 @@
|
||||
- Product barcodes are now enforced to be unique across products
|
||||
- On the stock overview page it's now also possible to search/filter by product barcodes (via the general search field)
|
||||
- The product picker on the consume and transfer page now only shows products which are currently in stock
|
||||
- Added a filter option to only show in-stock products on the stock overview and products list (master data) page
|
||||
- Added a filter option to only show currently in-stock products on the stock overview and products list (master data) page
|
||||
- Added new columns on the stock overview page (hidden by default): Product description, product default location, parent product, product picture
|
||||
- Added a new product option "Should not be frozen" (defaults to disabled and only visible when `FEATURE_FLAG_STOCK_PRODUCT_FREEZING` is enabled)
|
||||
- When enabled, on moving the product to a freezer location (so when freezing it), a corresponding warning will be shown
|
||||
|
@@ -3,7 +3,7 @@
|
||||
- More information on this: Only 1 level is currently supported; creating > 1 level nestings was _never_ possible via the UI/frontend, but not checked/enforced by the backend before `v3.0.0` - so it was potentially possible via the API (or any third party app/tool which utilizes it) to create such a nesting which then made this upgrade to fail
|
||||
- Fixed that it was not possible to select a chore/battery on the corresponding tracking pages by mouse/touch
|
||||
- Fixed that grouping by columns in tables may caused duplicate groups
|
||||
- Fixed that grocycode camera barcode scanning didn't recognize the scanned code for chore/battery tracking
|
||||
- Fixed that Grocycode camera barcode scanning didn't recognize the scanned code for chore/battery tracking
|
||||
- Fixed that when having any "Track date only" chore on the calendar, the iCal export was broken
|
||||
- Optimized the meal plan page to be properly printable (thanks @MrKrisKrisu)
|
||||
|
||||
@@ -11,6 +11,6 @@
|
||||
> ❗ The release before (v3.1.0) introduced that "numbers are now returned as numbers": **This was reverted** since it had unintended side effects (so all fields are technically strings now again, just like before - sorry for that)
|
||||
- Fixed that `missing_products` of the `/stock/volatile` endpoint also contained inactive products
|
||||
- Fixed that when having multiple Userfields for an entity, the `/objects/{entity}` endpoint returned wrong Userfield values
|
||||
- Fixed that the `/stock/products/by-barcode/{barcode}/consume` and `/stock/products/by-barcode/{barcode}/transfer` endpoints haven't used the stock entry given by a stock entry grocycode (thanks @lowlee for the initial work on this)
|
||||
- Fixed that the `/stock/products/by-barcode/{barcode}/consume` and `/stock/products/by-barcode/{barcode}/transfer` endpoints haven't used the stock entry given by a stock entry Grocycode (thanks @lowlee for the initial work on this)
|
||||
- Fixed that the "Stock by-barcode" API routes were broken for normal barcodes (only grocycodes were accepted) (thanks @larsverp)
|
||||
- Fixed that the "Stock by-barcode" API routes also accepted chore or battery grocycodes (thanks @lowlee)
|
||||
|
@@ -3,7 +3,7 @@
|
||||
- The `config.php` option `FEATURE_SETTING_STOCK_COUNT_OPENED_PRODUCTS_AGAINST_MINIMUM_STOCK_AMOUNT` was removed and is now a new product option `Treat opened as out of stock`, means, if opened stock entries will be counted as missing for calculating if a product is below its minimum stock amount, can now be configured per product
|
||||
- The existing option will be migrated to all existing products, so no changed behavior after the update
|
||||
- There is also a new stock setting (section "Presets for new products") which can be used to configure the default when adding products (also that will be set based on the old setting on migration)
|
||||
- When using/scanning a stock entry grocycode on the consume page, the amount is now prefilled by the stock entry amount (making it essentially possible to consume the corresponding stock entry in one go)
|
||||
- When using/scanning a stock entry Grocycode on the consume page, the amount is now prefilled by the stock entry amount (making it essentially possible to consume the corresponding stock entry in one go)
|
||||
- Stock entry labels get now also printed on inventory (only when adding products, same option "Stock entry label" like on the purchase page)
|
||||
- Fixed that stock entry labels on purchase were printed, even when "No label" was selected (was only a problem when running label printer WebHooks server side)
|
||||
- Fixed that formatted (HTML) text for the (hidden by default) product description column on the stock overview page was not correctly displayed
|
||||
@@ -17,7 +17,7 @@
|
||||
- Background: Before v3.0.0 recipe costs were only based on the last price per product and since v3.0.0 the "real costs" (based on the default consume rule "Opened first, then first due first, then first in first out") are used, means out of stock items have no price - so using the last price for out of stock items should reflect the current real costs better
|
||||
- Added a new recipes setting (top right corner settings menu) "Show the recipe list and the recipe side by side" (defaults to enabled, so no changed behaviour when not configured)
|
||||
- When disabled, on the recipes page, the recipe list is displayed full-width and the recipe will be shown in a popup instead of on the right side
|
||||
- Recipes are now also grocycode enabled (works like any other grocycode; download/print it via the recipes edit page or the more/context menu on the recipes page; use/scan it at any place a recipe can be selected)
|
||||
- Recipes are now also Grocycode enabled (works like any other Grocycode; download/print it via the recipes edit page or the more/context menu on the recipes page; use/scan it at any place a recipe can be selected)
|
||||
- Performance improvements (page loading time) of the recipes page
|
||||
- Fixed that when adding missing recipe ingredients, with the option "Only check if any amount is in stock" enabled, to the shopping list, unit conversions (if any) weren't considered
|
||||
- Fixed that the recipe stock fulfillment information about shopping list amounts was not correct when the ingredient had a decimal amount
|
||||
|
@@ -42,7 +42,7 @@
|
||||
- When enabled, the corresponding product can't have own stock, means it will not be selectable on purchase (useful for parent products which are just used as a summary/total view of the sub products)
|
||||
- The location content sheet can now optionally list also out of stock products (at the products default location, new checkbox "Show only in-stock products" at the top of the page, defaults to enabled)
|
||||
- Added a location filter to the stock entries page
|
||||
- Added the product grocycode as a (hidden by default) column to the products list (master data)
|
||||
- Added the product Grocycode as a (hidden by default) column to the products list (master data)
|
||||
- The price entered on the inventory page is now related to the selected quantity unit (like on the purchase page, was always related to the products stock QU before)
|
||||
- Fixed that consuming via the consume page was not possible when `FEATURE_FLAG_STOCK_LOCATION_TRACKING` was disabled
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
### Batteries
|
||||
|
||||
- Fixed that the batteries overview page was broken when there was any battery Userfield with enabled "Show as column in tables" option
|
||||
- Fixed that grocycode label printer printing didn't work from the battery edit page (master data) (thanks @andreheuer)
|
||||
- Fixed that Grocycode label printer printing didn't work from the battery edit page (master data) (thanks @andreheuer)
|
||||
- Fixed that undoing a battery charge cycle had no effect on "Last charged" and "Next planned charge cycle" of the corresponding battery
|
||||
|
||||
### Equipment
|
||||
|
@@ -29,5 +29,5 @@
|
||||
|
||||
- Endpoint `/stock/products/{productId}`: New field/property `default_consume_location` (contains the products default consume location object)
|
||||
- Endpoint `/stock/products/{productId}/add`: Fixed that the request body parameter `transaction_type` was ignored / always set to `purchase`
|
||||
- Fixed that the endpoint `/stock/products/by-barcode/{barcode}/open` didn't handle stock entries provided by a grocycode (thanks @jtommi)
|
||||
- Fixed that the endpoint `/stock/products/by-barcode/{barcode}/open` didn't handle stock entries provided by a Grocycode (thanks @jtommi)
|
||||
- Fixed that less or equal (`<=`) and greater or equal (`>=`) filter comparisons didn't work (optional `query[]` request query parameter on most endpoints)
|
||||
|
42
changelog/69_3.3.2_2022-11-12.md
Normal file
42
changelog/69_3.3.2_2022-11-12.md
Normal file
@@ -0,0 +1,42 @@
|
||||
### Stock
|
||||
|
||||
- Improved that when editing a unit conversion, the "Quantity unit from" and "Quantity unit to" of the corresponding inverse conversion is now also updated accordingly if changed (until now only the factor was updated automatically)
|
||||
- Changed that the "Move on open" product option can now always be used/set, even when the "Default location" and "Default consume location" are the same
|
||||
- Fixed that stock entry notes were lost when consuming/opening/transferring a partial amount of the corresponding stock entry (thanks @akoshpinter)
|
||||
- Fixed that the average shelf life of a product (on the product card) was wrong when the corresponding stock entry was edited
|
||||
- Fixed that when the stock setting "Decimal places allowed for amounts" was set to `0`, unit conversion (if any) failed when adding the corresponding product to stock
|
||||
- Fixed that consuming a parent product which is not in stock itself (so essentially using any of the child products) may failed when unit conversions were involved (the current stock amount check was wrong in that case)
|
||||
- Fixed that the status button counters on the stock overview page ("X products are overdue" and so on) included products which have the option `Never show on stock overview` enabled
|
||||
- Fixed that adding Userfields to existing stock entries was not possible (only editing existing Userfield values, e.g. added during purchase or inventory, was possible)
|
||||
- Fixed that it was not possible to change a products stock QU, when the needed unit conversion (old QU => new QU) was only defined globally (means on QU level) or by the products "Factor purchase to stock quantity unit"
|
||||
- Fixed that when changing a products stock QU, the products "Quick consume mount", "Energy (kcal)" and "Tare weight" wasn't updated according to the corresponding unit conversion factor
|
||||
- Fixed that when changing a products stock QU, the product barcode amounts were also changed based on the corresponding unit conversion factor
|
||||
|
||||
### Shopping list
|
||||
|
||||
- Fixed that products could not be added to the shopping list via barcode scanning
|
||||
|
||||
### Recipes
|
||||
|
||||
- Fixed that headlines in the recipe description (preparation text) were removed on saving
|
||||
- Fixed that the default consume rule was not always applied correctly when a recipe consumed a substituted ingredient (so when having a parent product in the recipe which is currently not in stock itself)
|
||||
|
||||
### Userfields
|
||||
|
||||
- Fixed that edit forms were broken when editing an object with `null` Userfields (so when the field for that object was not set before / on the initial object creation)
|
||||
|
||||
### General
|
||||
|
||||
- It's now possible to edit a user without necessarily updating the users password
|
||||
- Fixed that column reordering didn't work on the stock overview, stock entries and shopping list page when showing columns which are not shown by default
|
||||
- Fixed that when running label printer WebHooks client side (so when `LABEL_PRINTER_RUN_SERVER` = `false`), the setting `LABEL_PRINTER_HOOK_JSON` was ignored (the WebHook data was always sent as form data)
|
||||
- Fixed that granular user permissions (like "Shopping list / Add items" or "Equipment") didn't allow to add/edit the corresponding items without also having the "Edit master data" permission
|
||||
- New translations: (thanks all the translators)
|
||||
- Lithuanian (demo available at <https://lt.demo.grocy.info>)
|
||||
- Ukrainian (demo available at <https://uk.demo.grocy.info>)
|
||||
|
||||
### API
|
||||
|
||||
- Endpoint `/stock/volatile`
|
||||
- The field/property `missing_products` now also contains the `product` object
|
||||
- Endpoint `/recipes/{recipeId}/consume`: Fixed (again) that consuming partially fulfilled recipes was possible, although an error was already returned in that case (and potentially some of the in stock ingredients were consumed in fact)
|
116
changelog/70_4.0.0_2023-07-29.md
Normal file
116
changelog/70_4.0.0_2023-07-29.md
Normal file
@@ -0,0 +1,116 @@
|
||||
> ⚠️ PHP 8.1 (with SQLite 3.34.0+) is from now on the only supported runtime version.
|
||||
|
||||
> ❗ The major version bump is due to breaking API changes, please see below if you use the API.
|
||||
|
||||
> _Recommendation: Benchmark tests showed that e.g. unit conversion handling is up to 5 times faster when using a more recent (3.39.4+) SQLite version._
|
||||
|
||||
### New feature: Quantity unit conversions with unlimited hierarchy
|
||||
|
||||
- Quantity unit conversions now support transitive conversions, means the QU hierarchy has now unlimited levels (thanks a lot @esclear)
|
||||
- The product option "Factor purchase to stock quantity unit" was removed
|
||||
- => Use normal product specific QU conversions instead, if needed
|
||||
- An existing "Factor purchase to stock quantity unit" was automatically migrated to a product specific QU conversion
|
||||
|
||||
### New feature: Stock reports
|
||||
|
||||
- New button "Reports" on the stock overview page
|
||||
- The first report (more to come) "Spendings" makes it possible to explore (pie chart and table data) the total value spend by product or product group in any time range
|
||||
- (Thanks for the initial work on this @raupie)
|
||||
|
||||
### Stock
|
||||
|
||||
- New product option "Default quantity unit consume"
|
||||
- Will be used/selected as the default quantity unit on the consume page
|
||||
- The product's "Quick consume amount" is now displayed related to this quantity unit ("quick consume/open buttons" on the stock overview page)
|
||||
- Defaults to the product's "Quantity unit stock" (so no changed behavior when not configured)
|
||||
- New product option "Quantity unit for prices"
|
||||
- Prices are now shown related to this quantity unit (instead of per "Default quantity unit purchase") on the product card, price history chart, stock overiew and stock entries page
|
||||
- Defaults to the product's "Default quantity unit purchase" (so no changed behavior when not configured)
|
||||
- Changed that when the ingredient option "Only check if any amount is in stock" is enabled, costs and calories are now based on the original entered amount instead of an "virtual" fixed amount of `1`
|
||||
- When using the "Add as barcode to existing product" workflow on a purchase transaction, the selected quantity unit and the entered amount and note are now also added to the new barcode
|
||||
- New product option "Auto reprint stock entry label"
|
||||
- When enabled, auto-changing the due date of a stock entry (by opening/freezing/thawing and having corresponding default due days set) will reprint its label (only server side label printer WebHooks are supported)
|
||||
- Defaults to disabled, so no changed behavior when not configured
|
||||
- Added a new option "Reprint stock entry label" on the stock entry edit page (will print the correspondind stock entry label on save)
|
||||
- This option will be automatically set on changing the entry's due date
|
||||
- The product option "Quick consume amount" (the amount used for the "quick consume/open buttons" on the stock overview page) has been split into another option "Quick open amount", to be able to set different amounts for consume and open (defaults to the "Quick consume amount" per product, so no changed behavior when not configured)
|
||||
- Changed that for the product's average and last price (and for the price history chart) stock transactions with an empty or `0` price are ignored
|
||||
- Added a filter option to only show currently out-of-stock products on the products list (master data) page
|
||||
- When clicking a product name on the products list (master data) or on the stock journal page, the product card will now be displayed (like on the stock overview page)
|
||||
- When using/scanning a product barcode and the purchase or inventory page, the barcode's note will now also be prefilled (if any)
|
||||
- Each row on the stock journal now also has a context-/more menu for quick access to product related actions (the same as on the stock overview page)
|
||||
- The amount of "Label per unit" stock entry labels (on purchase and inventory) is now displayed, to help prevent printing a lot of labels where this maybe is not intended
|
||||
- Fixed that hiding the "Purchased date" column (table options) on the stock entries page didn't work
|
||||
- Fixed that sorting by the "Value" and "Min. stock amount" columns on the stock overview page didn't work
|
||||
- Fixed that the consumed amount was wrong, when consuming multiple substituted subproducts at once and when multiple/different conversion factors were involved
|
||||
- Fixed that for a product's average price, only currently in-stock items were considered, not already consumed ones
|
||||
- Fixed that when copying a product, some fields (like "Default consume location" or "Disable own stock) weren't copied along
|
||||
- Fixed that the total product count on the stock overview page also included products with "Never show on stock overview" enabled
|
||||
|
||||
### Shopping list
|
||||
|
||||
- Added a new button "Clear done items" (to clear all done items with one click)
|
||||
|
||||
### Recipes
|
||||
|
||||
- Added a new entry "Add to meal plan" in the context/more menu per recipe to directly add a recipe to the meal plan from the recipes page
|
||||
- Changed that when a ingredient has a "Variable amount" set, the text entered there now also replaces the unit when displaying the recipe (not only the amount as before)
|
||||
- When displaying a recipe in fullscreen mode, the ingredients and preparation is now shown side by side (or below each other on small screens) instead of in tabs
|
||||
- When consuming a recipe which has a "Produces product" set and when the product's "Default stock entry label" is configured accordingly, the corresponding label will now be printed on that action (only server side label printer WebHooks are supported)
|
||||
- Fixed that hiding the "Requirements fulfilled" column (table options) on the recipes page didn't work
|
||||
- Fixed that ingredient costs and calories were wrong when product substitution and unit conversions were involved at the same time
|
||||
|
||||
### Meal plan
|
||||
|
||||
- Added a new sub feature flag `FEATURE_FLAG_RECIPES_MEALPLAN` (in `config.php`) to only disable the meal plan if not needed (thanks @webysther)
|
||||
- The `config.php` setting `MEAL_PLAN_FIRST_DAY_OF_WEEK` can now be set to `-1` to dynamically start the meal plan week on _today_
|
||||
- Fixed that consuming a recipe from the meal plan didn't add its "Produces product"-product to stock (if any)
|
||||
- Fixed that the "Put missing products on shopping list"-button in the header (to put all missing products on the shopping list for a whole week) was missing under certain circumstances (related to locale week numbers and turn of the year)
|
||||
|
||||
### Chores
|
||||
|
||||
- Changed the handling of the tracking buttons on the chores overview page
|
||||
- The green button now tracks an execution of the corresponding chore on the next scheduled time, rather than for now/today
|
||||
- New context-/more menu option "Track chore execution now" to track an execution for now/today (so the same what the green button did before)
|
||||
- Removed the limitation on the chore tracking page that the tracked time couldn't be in the future
|
||||
- Fixed that "assidgned to" was not recalculated when undoing chores
|
||||
|
||||
### Calendar
|
||||
|
||||
- Added a button to jump to today (between the prev/next buttons, top right corner)
|
||||
|
||||
### Tasks
|
||||
|
||||
- Fixed that hiding the "Category" column (table options) on the tasks page didn't work
|
||||
|
||||
### Userfields
|
||||
|
||||
- Product group Userfields are now also rendered on the shopping list
|
||||
- Fixed that when having e.g. a Userfield for the `stock` entity and using the "Never overdue" shortcut checkbox for the due date on purchase, this Userfield would also be set to the corresponding "never overdue date"
|
||||
|
||||
### General
|
||||
|
||||
- Like already possible for products/chores/batteries, locations, stores, quantity units, product groups and task categories can now be disabled to keep them for existing references without deleting them, but to hide them everywhere for selections and so on (new option "Active")
|
||||
- Added a new `config.php` setting `ENERGY_UNIT` to customize the label to display energy values (was fixed `kcal` before and defaults to that, so no changed behavior when not configured)
|
||||
- New logo and "Grocy" is now officially spelled with a capital initial letter (before everything was lowercase)
|
||||
- Various frontend performance enhancements
|
||||
- Fixed that users were unable to delete their own API keys (when not having the `All permissions` permission)
|
||||
- Fixed that button tooltips on some places didn't disappear after clicking the corresponding button
|
||||
- New translations: (thanks all the translators)
|
||||
- Estonian (demo available at <https://et.demo.grocy.info>)
|
||||
- Romanian (demo available at <https://ro.demo.grocy.info>)
|
||||
|
||||
### API
|
||||
|
||||
- ⚠️ **Breaking changes**:
|
||||
- The product property `qu_factor_purchase_to_stock` was removed (existing factors were migrated to normal product specific QU conversions, see above)
|
||||
- Numbers are now returned as numbers (so technically without quotes around them, were strings for nearly all endpoints before)
|
||||
- Endpoint `/stock/products/{productId}`:
|
||||
- Added a new field/property `qu_conversion_factor_purchase_to_stock` for convenience (contains the conversion factor of the corresponding QU conversion from the product's `qu_id_purchase` to `qu_id_stock`)
|
||||
- Added a new field/property `qu_conversion_factor_price_to_stock` for convenience (contains the conversion factor of the corresponding QU conversion from the product's `qu_id_price` to `qu_id_stock`)
|
||||
- Added a new field/property `default_quantity_unit_consume` (contains the quantity unit object of the product's "Default quantity unit consume")
|
||||
- The following entities are now also available via the endpoint `/objects/{entity}` (only listing, no edit)
|
||||
- `quantity_unit_conversions_resolved` (returns all final/resolved conversion factors per product and any directly or indirectly related quantity units)
|
||||
- `recipes_pos_resolved` (returns stock fulfilment information for all recipe ingredients)
|
||||
- The endpoint `/batteries` now also returns the corresponding battery object (as field/property `battery`)
|
||||
- API keys can now have a description (to e.g. track where the corresponding key is used)
|
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"require": {
|
||||
"php": "^8.0",
|
||||
"php": ">=8.1",
|
||||
"slim/slim": "^4.0",
|
||||
"slim/psr7": "^1.0",
|
||||
"slim/http": "^1.0",
|
||||
"php-di/php-di": "^6.0",
|
||||
"php-di/php-di": "^7.0.3",
|
||||
"berrnd/slim-blade-view": "^1.0.0",
|
||||
"morris/lessql": "^1.0",
|
||||
"gettext/gettext": "^4.8",
|
||||
"morris/lessql": "dev-php81",
|
||||
"gettext/gettext": "dev-php81",
|
||||
"eluceo/ical": "^2.2.0",
|
||||
"erusev/parsedown": "^1.7",
|
||||
"gumlet/php-image-resize": "^2.0",
|
||||
@@ -16,6 +16,16 @@
|
||||
"guzzlehttp/guzzle": "^7.0",
|
||||
"mike42/escpos-php": "^3.0"
|
||||
},
|
||||
"repositories": [
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/berrnd/lessql"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/berrnd/Gettext"
|
||||
}
|
||||
],
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Grocy\\Services\\": "services/",
|
||||
@@ -28,6 +38,7 @@
|
||||
]
|
||||
},
|
||||
"config": {
|
||||
"vendor-dir": "packages",
|
||||
"platform-check": false
|
||||
}
|
||||
}
|
||||
|
862
composer.lock
generated
862
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -33,15 +33,20 @@ Setting('CALENDAR_SHOW_WEEK_OF_YEAR', true);
|
||||
// Set this if you want to have a different start day for the weekly meal plan view,
|
||||
// leave empty to use CALENDAR_FIRST_DAY_OF_WEEK (see above)
|
||||
// Needs to be a number where Sunday = 0, Monday = 1 and so forth
|
||||
// Can also be set to -1 to dynamically start the meal plan week on "today"
|
||||
Setting('MEAL_PLAN_FIRST_DAY_OF_WEEK', '');
|
||||
|
||||
// To keep it simple: grocy does not handle any currency conversions,
|
||||
// To keep it simple: Grocy does not handle any currency conversions,
|
||||
// this here is used to format all money values,
|
||||
// so doesn't really matter, but needs to be the
|
||||
// ISO 4217 code of the currency ("USD", "EUR", "GBP", etc.)
|
||||
Setting('CURRENCY', 'USD');
|
||||
|
||||
// When running grocy in a subdirectory, this should be set to the relative path, otherwise empty
|
||||
// Your preferred unit for energy
|
||||
// E.g. "kcal" or "kJ" or something else (doesn't really matter, it's only used to display energy values)
|
||||
Setting('ENERGY_UNIT', 'kcal');
|
||||
|
||||
// When running Grocy in a subdirectory, this should be set to the relative path, otherwise empty
|
||||
// It needs to be set to the part (of the URL) AFTER the document root,
|
||||
// if URL rewriting is disabled, including index.php
|
||||
// Example with URL Rewriting support:
|
||||
@@ -100,7 +105,7 @@ Setting('GROCYCODE_TYPE', '1D');
|
||||
|
||||
|
||||
// Label printer settings
|
||||
Setting('LABEL_PRINTER_WEBHOOK', ''); // The URI that grocy will POST to when asked to print a label
|
||||
Setting('LABEL_PRINTER_WEBHOOK', ''); // The URI that Grocy will POST to when asked to print a label
|
||||
Setting('LABEL_PRINTER_RUN_SERVER', true); // Whether the webhook will be called server- or client-side
|
||||
Setting('LABEL_PRINTER_PARAMS', ['font_family' => 'Source Sans Pro (Regular)']); // Additional parameters supplied to the webhook
|
||||
Setting('LABEL_PRINTER_HOOK_JSON', false); // TRUE to use JSON or FALSE to use normal POST request variables
|
||||
@@ -140,6 +145,7 @@ Setting('FEATURE_FLAG_STOCK_PRODUCT_OPENED_TRACKING', true);
|
||||
Setting('FEATURE_FLAG_STOCK_PRODUCT_FREEZING', true);
|
||||
Setting('FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_FIELD_NUMBER_PAD', true); // Activate the number pad in due date fields on (supported) mobile browsers
|
||||
Setting('FEATURE_FLAG_SHOPPINGLIST_MULTIPLE_LISTS', true);
|
||||
Setting('FEATURE_FLAG_RECIPES_MEALPLAN', true);
|
||||
Setting('FEATURE_FLAG_CHORES_ASSIGNMENTS', true);
|
||||
Setting('FEATURE_FLAG_THERMAL_PRINTER', false);
|
||||
|
||||
|
@@ -3,6 +3,7 @@
|
||||
namespace Grocy\Controllers;
|
||||
|
||||
use LessQL\Result;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
|
||||
class BaseApiController extends BaseController
|
||||
{
|
||||
@@ -14,7 +15,7 @@ class BaseApiController extends BaseController
|
||||
|
||||
protected $OpenApiSpec = null;
|
||||
|
||||
protected function ApiResponse(\Psr\Http\Message\ResponseInterface $response, $data, $cache = false)
|
||||
protected function ApiResponse(Response $response, $data, $cache = false)
|
||||
{
|
||||
if ($cache)
|
||||
{
|
||||
@@ -25,19 +26,19 @@ class BaseApiController extends BaseController
|
||||
return $response;
|
||||
}
|
||||
|
||||
protected function EmptyApiResponse(\Psr\Http\Message\ResponseInterface $response, $status = 204)
|
||||
protected function EmptyApiResponse(Response $response, $status = 204)
|
||||
{
|
||||
return $response->withStatus($status);
|
||||
}
|
||||
|
||||
protected function GenericErrorResponse(\Psr\Http\Message\ResponseInterface $response, $errorMessage, $status = 400)
|
||||
protected function GenericErrorResponse(Response $response, $errorMessage, $status = 400)
|
||||
{
|
||||
return $response->withStatus($status)->withJson([
|
||||
'error_message' => $errorMessage
|
||||
]);
|
||||
}
|
||||
|
||||
public function FilteredApiResponse(\Psr\Http\Message\ResponseInterface $response, Result $data, array $query)
|
||||
public function FilteredApiResponse(Response $response, Result $data, array $query)
|
||||
{
|
||||
$data = $this->queryData($data, $query);
|
||||
return $this->ApiResponse($response, $data);
|
||||
@@ -50,8 +51,13 @@ class BaseApiController extends BaseController
|
||||
$data = $this->filter($data, $query['query']);
|
||||
}
|
||||
|
||||
if (isset($query['limit']))
|
||||
if (isset($query['limit']) || isset($query['offset']))
|
||||
{
|
||||
if (!isset($query['limit']))
|
||||
{
|
||||
$query['limit'] = -1;
|
||||
}
|
||||
|
||||
$data = $data->limit(intval($query['limit']), intval($query['offset'] ?? 0));
|
||||
}
|
||||
|
||||
@@ -101,7 +107,8 @@ class BaseApiController extends BaseController
|
||||
$sqlOrNull = ' OR ' . $matches['field'] . ' IS NULL';
|
||||
}
|
||||
|
||||
switch ($matches['op']) {
|
||||
switch ($matches['op'])
|
||||
{
|
||||
case '=':
|
||||
$data = $data->where($matches['field'] . ' = ?' . $sqlOrNull, $matches['value']);
|
||||
break;
|
||||
@@ -129,7 +136,6 @@ class BaseApiController extends BaseController
|
||||
case '§':
|
||||
$data = $data->where($matches['field'] . ' REGEXP ?', $matches['value']);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -18,10 +18,11 @@ use Grocy\Services\StockService;
|
||||
use Grocy\Services\TasksService;
|
||||
use Grocy\Services\UserfieldsService;
|
||||
use Grocy\Services\UsersService;
|
||||
use DI\Container;
|
||||
|
||||
class BaseController
|
||||
{
|
||||
public function __construct(\DI\Container $container)
|
||||
public function __construct(Container $container)
|
||||
{
|
||||
$this->AppContainer = $container;
|
||||
$this->View = $container->get('view');
|
||||
@@ -114,13 +115,12 @@ class BaseController
|
||||
return UsersService::getInstance();
|
||||
}
|
||||
|
||||
protected function render($response, $page, $data = [])
|
||||
protected function render($response, $viewName, $data = [])
|
||||
{
|
||||
$container = $this->AppContainer;
|
||||
|
||||
$versionInfo = $this->getApplicationService()->GetInstalledVersion();
|
||||
$this->View->set('version', $versionInfo->Version);
|
||||
$this->View->set('releaseDate', $versionInfo->ReleaseDate);
|
||||
|
||||
$localizationService = $this->getLocalizationService();
|
||||
$this->View->set('__t', function (string $text, ...$placeholderValues) use ($localizationService) {
|
||||
@@ -159,13 +159,13 @@ class BaseController
|
||||
unset($constants[$constant]);
|
||||
}
|
||||
}
|
||||
|
||||
$this->View->set('featureFlags', $constants);
|
||||
|
||||
if (GROCY_AUTHENTICATED)
|
||||
{
|
||||
$this->View->set('permissions', User::PermissionList());
|
||||
|
||||
$decimalPlacesAmounts = intval($this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'stock_decimal_places_amounts'));
|
||||
$decimalPlacesAmounts = $this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'stock_decimal_places_amounts');
|
||||
if ($decimalPlacesAmounts <= 0)
|
||||
{
|
||||
$defaultMinAmount = 1;
|
||||
@@ -177,10 +177,12 @@ class BaseController
|
||||
$this->View->set('DEFAULT_MIN_AMOUNT', $defaultMinAmount);
|
||||
}
|
||||
|
||||
return $this->View->render($response, $page, $data);
|
||||
$this->View->set('viewName', $viewName);
|
||||
|
||||
return $this->View->render($response, $viewName, $data);
|
||||
}
|
||||
|
||||
protected function renderPage($response, $page, $data = [])
|
||||
protected function renderPage($response, $viewName, $data = [])
|
||||
{
|
||||
$this->View->set('userentitiesForSidebar', $this->getDatabase()->userentities()->where('show_in_sidebar_menu = 1')->orderBy('name'));
|
||||
try
|
||||
@@ -200,7 +202,7 @@ class BaseController
|
||||
// Happens when database is not initialised or migrated...
|
||||
}
|
||||
|
||||
return $this->render($response, $page, $data);
|
||||
return $this->render($response, $viewName, $data);
|
||||
}
|
||||
|
||||
private static $htmlPurifierInstance = null;
|
||||
@@ -211,12 +213,13 @@ class BaseController
|
||||
{
|
||||
$htmlPurifierConfig = \HTMLPurifier_Config::createDefault();
|
||||
$htmlPurifierConfig->set('Cache.SerializerPath', GROCY_DATAPATH . '/viewcache');
|
||||
$htmlPurifierConfig->set('HTML.Allowed', 'div,b,strong,i,em,u,a[href|title|target],iframe[src|width|height|frameborder],ul,ol,li,p[style],br,span[style],img[width|height|alt|src],table[border|width|style],tbody,tr,td,th,blockquote,*[style|class|id]');
|
||||
$htmlPurifierConfig->set('HTML.Allowed', 'div,b,strong,i,em,u,a[href|title|target],iframe[src|width|height|frameborder],ul,ol,li,p[style],br,span[style],img[style|width|height|alt|src],table[border|width|style],tbody,tr,td,th,blockquote,*[style|class|id],h1,h2,h3,h4,h5,h6');
|
||||
$htmlPurifierConfig->set('Attr.EnableID', true);
|
||||
$htmlPurifierConfig->set('HTML.SafeIframe', true);
|
||||
$htmlPurifierConfig->set('CSS.AllowedProperties', 'font,font-size,font-weight,font-style,font-family,text-decoration,padding-left,color,background-color,text-align');
|
||||
$htmlPurifierConfig->set('CSS.AllowedProperties', 'font,font-size,font-weight,font-style,font-family,text-decoration,padding-left,color,background-color,text-align,width,height');
|
||||
$htmlPurifierConfig->set('URI.AllowedSchemes', ['data' => true, 'http' => true, 'https' => true]);
|
||||
$htmlPurifierConfig->set('URI.SafeIframeRegexp', '%^.*%'); // Allow any iframe source
|
||||
$htmlPurifierConfig->set('CSS.MaxImgLength', null);
|
||||
|
||||
self::$htmlPurifierInstance = new \HTMLPurifier($htmlPurifierConfig);
|
||||
}
|
||||
@@ -229,12 +232,12 @@ class BaseController
|
||||
if (!is_bool($value) && !is_array($value))
|
||||
{
|
||||
$value = self::$htmlPurifierInstance->purify($value);
|
||||
}
|
||||
|
||||
// Allow some special chars
|
||||
if (!is_array($value))
|
||||
{
|
||||
// Allow some special chars
|
||||
// Maybe also possible through HTMLPurifier config (http://htmlpurifier.org/live/configdoc/plain.html)
|
||||
$value = str_replace('&', '&', $value);
|
||||
$value = str_replace('>', '>', $value);
|
||||
$value = str_replace('<', '<', $value);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -5,10 +5,12 @@ namespace Grocy\Controllers;
|
||||
use Grocy\Controllers\Users\User;
|
||||
use Grocy\Helpers\WebhookRunner;
|
||||
use Grocy\Helpers\Grocycode;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
|
||||
class BatteriesApiController extends BaseApiController
|
||||
{
|
||||
public function BatteryDetails(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function BatteryDetails(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -20,12 +22,12 @@ class BatteriesApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function Current(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function Current(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->FilteredApiResponse($response, $this->getBatteriesService()->GetCurrent(), $request->getQueryParams());
|
||||
}
|
||||
|
||||
public function TrackChargeCycle(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function TrackChargeCycle(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_BATTERIES_TRACK_CHARGE_CYCLE);
|
||||
|
||||
@@ -48,7 +50,7 @@ class BatteriesApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function UndoChargeCycle(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function UndoChargeCycle(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_BATTERIES_UNDO_CHARGE_CYCLE);
|
||||
|
||||
@@ -63,7 +65,7 @@ class BatteriesApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function BatteryPrintLabel(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function BatteryPrintLabel(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@@ -3,12 +3,14 @@
|
||||
namespace Grocy\Controllers;
|
||||
|
||||
use Grocy\Helpers\Grocycode;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
|
||||
class BatteriesController extends BaseController
|
||||
{
|
||||
use GrocycodeTrait;
|
||||
|
||||
public function BatteriesList(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function BatteriesList(Request $request, Response $response, array $args)
|
||||
{
|
||||
if (isset($request->getQueryParams()['include_disabled']))
|
||||
{
|
||||
@@ -26,12 +28,12 @@ class BatteriesController extends BaseController
|
||||
]);
|
||||
}
|
||||
|
||||
public function BatteriesSettings(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function BatteriesSettings(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->renderPage($response, 'batteriessettings');
|
||||
}
|
||||
|
||||
public function BatteryEditForm(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function BatteryEditForm(Request $request, Response $response, array $args)
|
||||
{
|
||||
if ($args['batteryId'] == 'new')
|
||||
{
|
||||
@@ -50,7 +52,7 @@ class BatteriesController extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
public function Journal(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function Journal(Request $request, Response $response, array $args)
|
||||
{
|
||||
if (isset($request->getQueryParams()['months']) && filter_var($request->getQueryParams()['months'], FILTER_VALIDATE_INT) !== false)
|
||||
{
|
||||
@@ -75,12 +77,12 @@ class BatteriesController extends BaseController
|
||||
]);
|
||||
}
|
||||
|
||||
public function Overview(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function Overview(Request $request, Response $response, array $args)
|
||||
{
|
||||
$usersService = $this->getUsersService();
|
||||
$nextXDays = $usersService->GetUserSettings(GROCY_USER_ID)['batteries_due_soon_days'];
|
||||
|
||||
$batteries = $this->getDatabase()->batteries()->where('active = 1')->orderBy('name', 'COLLATE NOCASE');
|
||||
$batteries = $this->getDatabase()->batteries()->where('active = 1');
|
||||
$currentBatteries = $this->getBatteriesService()->GetCurrent();
|
||||
foreach ($currentBatteries as $currentBattery)
|
||||
{
|
||||
@@ -110,14 +112,14 @@ class BatteriesController extends BaseController
|
||||
]);
|
||||
}
|
||||
|
||||
public function TrackChargeCycle(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function TrackChargeCycle(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->renderPage($response, 'batterytracking', [
|
||||
'batteries' => $this->getDatabase()->batteries()->where('active = 1')->orderBy('name', 'COLLATE NOCASE')
|
||||
]);
|
||||
}
|
||||
|
||||
public function BatteryGrocycodeImage(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function BatteryGrocycodeImage(Request $request, Response $response, array $args)
|
||||
{
|
||||
$gc = new Grocycode(Grocycode::BATTERY, $args['batteryId']);
|
||||
return $this->ServeGrocycodeImage($request, $response, $gc);
|
||||
|
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Grocy\Controllers;
|
||||
|
||||
use Grocy\Services\ApiKeyService;
|
||||
use Eluceo\iCal\Domain\Entity\Calendar;
|
||||
use Eluceo\iCal\Domain\Entity\Event;
|
||||
use Eluceo\iCal\Domain\Entity\TimeZone;
|
||||
@@ -10,10 +11,12 @@ use Eluceo\iCal\Domain\ValueObject\DateTime;
|
||||
use Eluceo\iCal\Domain\ValueObject\SingleDay;
|
||||
use Eluceo\iCal\Domain\ValueObject\TimeSpan;
|
||||
use Eluceo\iCal\Presentation\Factory\CalendarFactory;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
|
||||
class CalendarApiController extends BaseApiController
|
||||
{
|
||||
public function Ical(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function Ical(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -22,7 +25,7 @@ class CalendarApiController extends BaseApiController
|
||||
$maxDate = null;
|
||||
|
||||
$vCalendar = new Calendar();
|
||||
$vCalendar->setProductIdentifier('grocy');
|
||||
$vCalendar->setProductIdentifier('Grocy');
|
||||
|
||||
foreach ($events as $event)
|
||||
{
|
||||
@@ -79,7 +82,7 @@ class CalendarApiController extends BaseApiController
|
||||
|
||||
$response->write((new CalendarFactory())->createCalendar($vCalendar));
|
||||
$response = $response->withHeader('Content-Type', 'text/calendar; charset=utf-8');
|
||||
return $response->withHeader('Content-Disposition', 'attachment; filename="grocy.ics"');
|
||||
return $response->withHeader('Content-Disposition', 'attachment; filename="Grocy.ics"');
|
||||
}
|
||||
catch (\Exception $ex)
|
||||
{
|
||||
@@ -87,12 +90,12 @@ class CalendarApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function IcalSharingLink(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function IcalSharingLink(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
return $this->ApiResponse($response, [
|
||||
'url' => $this->AppContainer->get('UrlManager')->ConstructUrl('/api/calendar/ical?secret=' . $this->getApiKeyService()->GetOrCreateApiKey(\Grocy\Services\ApiKeyService::API_KEY_TYPE_SPECIAL_PURPOSE_CALENDAR_ICAL))
|
||||
'url' => $this->AppContainer->get('UrlManager')->ConstructUrl('/api/calendar/ical?secret=' . $this->getApiKeyService()->GetOrCreateApiKey(ApiKeyService::API_KEY_TYPE_SPECIAL_PURPOSE_CALENDAR_ICAL))
|
||||
]);
|
||||
}
|
||||
catch (\Exception $ex)
|
||||
|
@@ -2,9 +2,12 @@
|
||||
|
||||
namespace Grocy\Controllers;
|
||||
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
|
||||
class CalendarController extends BaseController
|
||||
{
|
||||
public function Overview(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function Overview(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->renderPage($response, 'calendar', [
|
||||
'fullcalendarEventSources' => $this->getCalendarService()->GetEvents()
|
||||
|
@@ -5,10 +5,12 @@ namespace Grocy\Controllers;
|
||||
use Grocy\Controllers\Users\User;
|
||||
use Grocy\Helpers\WebhookRunner;
|
||||
use Grocy\Helpers\Grocycode;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
|
||||
class ChoresApiController extends BaseApiController
|
||||
{
|
||||
public function CalculateNextExecutionAssignments(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function CalculateNextExecutionAssignments(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -42,7 +44,7 @@ class ChoresApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function ChoreDetails(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ChoreDetails(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -54,12 +56,12 @@ class ChoresApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function Current(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function Current(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->FilteredApiResponse($response, $this->getChoresService()->GetCurrent(), $request->getQueryParams());
|
||||
}
|
||||
|
||||
public function TrackChoreExecution(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function TrackChoreExecution(Request $request, Response $response, array $args)
|
||||
{
|
||||
$requestBody = $this->GetParsedAndFilteredRequestBody($request);
|
||||
|
||||
@@ -99,7 +101,7 @@ class ChoresApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function UndoChoreExecution(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function UndoChoreExecution(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -114,7 +116,7 @@ class ChoresApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function ChorePrintLabel(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ChorePrintLabel(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -138,7 +140,7 @@ class ChoresApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function MergeChores(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function MergeChores(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_MASTER_DATA_EDIT);
|
||||
|
||||
|
@@ -3,12 +3,14 @@
|
||||
namespace Grocy\Controllers;
|
||||
|
||||
use Grocy\Helpers\Grocycode;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
|
||||
class ChoresController extends BaseController
|
||||
{
|
||||
use GrocycodeTrait;
|
||||
|
||||
public function ChoreEditForm(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ChoreEditForm(Request $request, Response $response, array $args)
|
||||
{
|
||||
$usersService = $this->getUsersService();
|
||||
$users = $usersService->GetUsersAsDto();
|
||||
@@ -38,7 +40,7 @@ class ChoresController extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
public function ChoresList(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ChoresList(Request $request, Response $response, array $args)
|
||||
{
|
||||
if (isset($request->getQueryParams()['include_disabled']))
|
||||
{
|
||||
@@ -56,12 +58,12 @@ class ChoresController extends BaseController
|
||||
]);
|
||||
}
|
||||
|
||||
public function ChoresSettings(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ChoresSettings(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->renderPage($response, 'choressettings');
|
||||
}
|
||||
|
||||
public function Journal(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function Journal(Request $request, Response $response, array $args)
|
||||
{
|
||||
if (isset($request->getQueryParams()['months']) && filter_var($request->getQueryParams()['months'], FILTER_VALIDATE_INT) !== false)
|
||||
{
|
||||
@@ -89,7 +91,7 @@ class ChoresController extends BaseController
|
||||
]);
|
||||
}
|
||||
|
||||
public function Overview(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function Overview(Request $request, Response $response, array $args)
|
||||
{
|
||||
$usersService = $this->getUsersService();
|
||||
$nextXDays = $usersService->GetUserSettings(GROCY_USER_ID)['chores_due_soon_days'];
|
||||
@@ -125,7 +127,7 @@ class ChoresController extends BaseController
|
||||
]);
|
||||
}
|
||||
|
||||
public function TrackChoreExecution(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function TrackChoreExecution(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->renderPage($response, 'choretracking', [
|
||||
'chores' => $this->getDatabase()->chores()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
@@ -134,7 +136,7 @@ class ChoresController extends BaseController
|
||||
]);
|
||||
}
|
||||
|
||||
public function ChoreGrocycodeImage(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ChoreGrocycodeImage(Request $request, Response $response, array $args)
|
||||
{
|
||||
$gc = new Grocycode(Grocycode::CHORE, $args['choreId']);
|
||||
return $this->ServeGrocycodeImage($request, $response, $gc);
|
||||
|
@@ -2,11 +2,14 @@
|
||||
|
||||
namespace Grocy\Controllers;
|
||||
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
|
||||
class EquipmentController extends BaseController
|
||||
{
|
||||
protected $UserfieldsService;
|
||||
|
||||
public function EditForm(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function EditForm(Request $request, Response $response, array $args)
|
||||
{
|
||||
if ($args['equipmentId'] == 'new')
|
||||
{
|
||||
@@ -25,7 +28,7 @@ class EquipmentController extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
public function Overview(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function Overview(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->renderPage($response, 'equipment', [
|
||||
'equipment' => $this->getDatabase()->equipment()->orderBy('name', 'COLLATE NOCASE'),
|
||||
|
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Grocy\Controllers;
|
||||
|
||||
use DI\Container;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Slim\Exception\HttpException;
|
||||
@@ -11,15 +12,12 @@ use Throwable;
|
||||
|
||||
class ExceptionController extends BaseApiController
|
||||
{
|
||||
public function __construct(\Slim\App $app, \DI\Container $container)
|
||||
public function __construct(\Slim\App $app, Container $container)
|
||||
{
|
||||
parent::__construct($container);
|
||||
$this->app = $app;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var \Slim\App
|
||||
*/
|
||||
private $app;
|
||||
|
||||
public function __invoke(ServerRequestInterface $request, Throwable $exception, bool $displayErrorDetails, bool $logErrors, bool $logErrorDetails, ?LoggerInterface $logger = null)
|
||||
@@ -78,7 +76,7 @@ class ExceptionController extends BaseApiController
|
||||
|
||||
return $this->renderPage($response->withStatus(500), 'errors/500', [
|
||||
'exception' => $exception,
|
||||
'system_info' => $this->getApplicationService()->GetSystemInfo()
|
||||
'systemInfo' => $this->getApplicationService()->GetSystemInfo()
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@@ -3,11 +3,14 @@
|
||||
namespace Grocy\Controllers;
|
||||
|
||||
use Grocy\Services\FilesService;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Slim\Exception\HttpNotFoundException;
|
||||
use Slim\Psr7\Stream;
|
||||
|
||||
class FilesApiController extends BaseApiController
|
||||
{
|
||||
public function DeleteFile(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function DeleteFile(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -35,7 +38,7 @@ class FilesApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function ServeFile(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ServeFile(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -49,10 +52,10 @@ class FilesApiController extends BaseApiController
|
||||
|
||||
if (file_exists($filePath))
|
||||
{
|
||||
$response->write(file_get_contents($filePath));
|
||||
$response = $response->withHeader('Cache-Control', 'max-age=2592000');
|
||||
$response = $response->withHeader('Content-Type', mime_content_type($filePath));
|
||||
return $response->withHeader('Content-Disposition', 'inline; filename="' . $fileName . '"');
|
||||
$response = $response->withHeader('Content-Disposition', 'inline; filename="' . $fileName . '"');
|
||||
return $response->withBody(new Stream(fopen($filePath, 'rb')));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -65,7 +68,7 @@ class FilesApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function ShowFile(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ShowFile(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -80,10 +83,10 @@ class FilesApiController extends BaseApiController
|
||||
|
||||
if (file_exists($filePath))
|
||||
{
|
||||
$response->write(file_get_contents($filePath));
|
||||
$response = $response->withHeader('Cache-Control', 'max-age=2592000');
|
||||
$response = $response->withHeader('Content-Type', mime_content_type($filePath));
|
||||
return $response->withHeader('Content-Disposition', 'inline; filename="' . $fileName . '"');
|
||||
$response = $response->withHeader('Content-Disposition', 'inline; filename="' . $fileName . '"');
|
||||
return $response->withBody(new Stream(fopen($filePath, 'rb')));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -96,7 +99,7 @@ class FilesApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function UploadFile(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function UploadFile(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -118,11 +121,6 @@ class FilesApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $fileName base64-encoded file-name
|
||||
* @return false|string the decoded file-name
|
||||
* @throws \Exception if the file-name is invalid.
|
||||
*/
|
||||
protected function checkFileName(string $fileName)
|
||||
{
|
||||
if (IsValidFileName(base64_decode($fileName)))
|
||||
@@ -137,12 +135,6 @@ class FilesApiController extends BaseApiController
|
||||
return $fileName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $group The group the requested files belongs to.
|
||||
* @param string $fileName The name of the requested file.
|
||||
* @param array $queryParams Parameter, e.g. for scaling. Optional.
|
||||
* @return string
|
||||
*/
|
||||
protected function getFilePath(string $group, string $fileName, array $queryParams = [])
|
||||
{
|
||||
$forceServeAs = null;
|
||||
|
@@ -3,13 +3,33 @@
|
||||
namespace Grocy\Controllers;
|
||||
|
||||
use Grocy\Controllers\Users\User;
|
||||
use Slim\Exception\HttpBadRequestException;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
|
||||
class GenericEntityApiController extends BaseApiController
|
||||
{
|
||||
public function AddObject(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function AddObject(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_MASTER_DATA_EDIT);
|
||||
if ($args['entity'] == 'shopping_list' || $args['entity'] == 'shopping_lists')
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_SHOPPINGLIST_ITEMS_ADD);
|
||||
}
|
||||
elseif ($args['entity'] == 'recipes' || $args['entity'] == 'recipes_pos' || $args['entity'] == 'recipes_nestings')
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_RECIPES);
|
||||
}
|
||||
elseif ($args['entity'] == 'meal_plan')
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_RECIPES_MEALPLAN);
|
||||
}
|
||||
elseif ($args['entity'] == 'equipment')
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_EQUIPMENT);
|
||||
}
|
||||
else
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_MASTER_DATA_EDIT);
|
||||
}
|
||||
|
||||
if ($this->IsValidExposedEntity($args['entity']) && !$this->IsEntityWithNoEdit($args['entity']))
|
||||
{
|
||||
@@ -29,10 +49,16 @@ class GenericEntityApiController extends BaseApiController
|
||||
|
||||
$newRow = $this->getDatabase()->{$args['entity']}()->createRow($requestBody);
|
||||
$newRow->save();
|
||||
$success = $newRow->isClean();
|
||||
$newObjectId = $this->getDatabase()->lastInsertId();
|
||||
|
||||
// TODO: This should be better done somehow in StockService
|
||||
if ($args['entity'] == 'products' && boolval($this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'shopping_list_auto_add_below_min_stock_amount')))
|
||||
{
|
||||
$this->getStockService()->AddMissingProductsToShoppingList($this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'shopping_list_auto_add_below_min_stock_amount_list_id'));
|
||||
}
|
||||
|
||||
return $this->ApiResponse($response, [
|
||||
'created_object_id' => $this->getDatabase()->lastInsertId()
|
||||
'created_object_id' => $newObjectId
|
||||
]);
|
||||
}
|
||||
catch (\Exception $ex)
|
||||
@@ -46,9 +72,32 @@ class GenericEntityApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function DeleteObject(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function DeleteObject(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_MASTER_DATA_EDIT);
|
||||
if ($args['entity'] == 'shopping_list' || $args['entity'] == 'shopping_lists')
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_SHOPPINGLIST_ITEMS_DELETE);
|
||||
}
|
||||
elseif ($args['entity'] == 'recipes' || $args['entity'] == 'recipes_pos' || $args['entity'] == 'recipes_nestings')
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_RECIPES);
|
||||
}
|
||||
elseif ($args['entity'] == 'meal_plan')
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_RECIPES_MEALPLAN);
|
||||
}
|
||||
elseif ($args['entity'] == 'equipment')
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_EQUIPMENT);
|
||||
}
|
||||
elseif ($args['entity'] == 'api_keys')
|
||||
{
|
||||
// Always allowed
|
||||
}
|
||||
else
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_MASTER_DATA_EDIT);
|
||||
}
|
||||
|
||||
if ($this->IsValidExposedEntity($args['entity']) && !$this->IsEntityWithNoDelete($args['entity']))
|
||||
{
|
||||
@@ -64,7 +113,6 @@ class GenericEntityApiController extends BaseApiController
|
||||
}
|
||||
|
||||
$row->delete();
|
||||
$success = $row->isClean();
|
||||
|
||||
return $this->EmptyApiResponse($response);
|
||||
}
|
||||
@@ -74,9 +122,28 @@ class GenericEntityApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function EditObject(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function EditObject(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_MASTER_DATA_EDIT);
|
||||
if ($args['entity'] == 'shopping_list' || $args['entity'] == 'shopping_lists')
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_SHOPPINGLIST_ITEMS_ADD);
|
||||
}
|
||||
elseif ($args['entity'] == 'recipes' || $args['entity'] == 'recipes_pos' || $args['entity'] == 'recipes_nestings')
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_RECIPES);
|
||||
}
|
||||
elseif ($args['entity'] == 'meal_plan')
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_RECIPES_MEALPLAN);
|
||||
}
|
||||
elseif ($args['entity'] == 'equipment')
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_EQUIPMENT);
|
||||
}
|
||||
else
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_MASTER_DATA_EDIT);
|
||||
}
|
||||
|
||||
if ($this->IsValidExposedEntity($args['entity']) && !$this->IsEntityWithNoEdit($args['entity']))
|
||||
{
|
||||
@@ -101,7 +168,12 @@ class GenericEntityApiController extends BaseApiController
|
||||
}
|
||||
|
||||
$row->update($requestBody);
|
||||
$success = $row->isClean();
|
||||
|
||||
// TODO: This should be better done somehow in StockService
|
||||
if ($args['entity'] == 'products' && boolval($this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'shopping_list_auto_add_below_min_stock_amount')))
|
||||
{
|
||||
$this->getStockService()->AddMissingProductsToShoppingList($this->getUsersService()->GetUserSetting(GROCY_USER_ID, 'shopping_list_auto_add_below_min_stock_amount_list_id'));
|
||||
}
|
||||
|
||||
return $this->EmptyApiResponse($response);
|
||||
}
|
||||
@@ -116,7 +188,7 @@ class GenericEntityApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function GetObject(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function GetObject(Request $request, Response $response, array $args)
|
||||
{
|
||||
if ($this->IsValidExposedEntity($args['entity']) && !$this->IsEntityWithNoListing($args['entity']))
|
||||
{
|
||||
@@ -142,7 +214,7 @@ class GenericEntityApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function GetObjects(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function GetObjects(Request $request, Response $response, array $args)
|
||||
{
|
||||
if (!$this->IsValidExposedEntity($args['entity']) || $this->IsEntityWithNoListing($args['entity']))
|
||||
{
|
||||
@@ -179,7 +251,7 @@ class GenericEntityApiController extends BaseApiController
|
||||
return $this->ApiResponse($response, $objects);
|
||||
}
|
||||
|
||||
public function GetUserfields(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function GetUserfields(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -191,7 +263,7 @@ class GenericEntityApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function SetUserfields(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function SetUserfields(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_MASTER_DATA_EDIT);
|
||||
|
||||
|
@@ -2,16 +2,19 @@
|
||||
|
||||
namespace Grocy\Controllers;
|
||||
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
|
||||
class GenericEntityController extends BaseController
|
||||
{
|
||||
public function UserentitiesList(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function UserentitiesList(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->renderPage($response, 'userentities', [
|
||||
'userentities' => $this->getDatabase()->userentities()->orderBy('name', 'COLLATE NOCASE')
|
||||
]);
|
||||
}
|
||||
|
||||
public function UserentityEditForm(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function UserentityEditForm(Request $request, Response $response, array $args)
|
||||
{
|
||||
if ($args['userentityId'] == 'new')
|
||||
{
|
||||
@@ -28,7 +31,7 @@ class GenericEntityController extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
public function UserfieldEditForm(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function UserfieldEditForm(Request $request, Response $response, array $args)
|
||||
{
|
||||
if ($args['userfieldId'] == 'new')
|
||||
{
|
||||
@@ -49,7 +52,7 @@ class GenericEntityController extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
public function UserfieldsList(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function UserfieldsList(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->renderPage($response, 'userfields', [
|
||||
'userfields' => $this->getUserfieldsService()->GetAllFields(),
|
||||
@@ -57,7 +60,7 @@ class GenericEntityController extends BaseController
|
||||
]);
|
||||
}
|
||||
|
||||
public function UserobjectEditForm(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function UserobjectEditForm(Request $request, Response $response, array $args)
|
||||
{
|
||||
$userentity = $this->getDatabase()->userentities()->where('name = :1', $args['userentityName'])->fetch();
|
||||
|
||||
@@ -80,7 +83,7 @@ class GenericEntityController extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
public function UserobjectsList(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function UserobjectsList(Request $request, Response $response, array $args)
|
||||
{
|
||||
$userentity = $this->getDatabase()->userentities()->where('name = :1', $args['userentityName'])->fetch();
|
||||
|
||||
|
@@ -3,14 +3,14 @@
|
||||
namespace Grocy\Controllers;
|
||||
|
||||
use Grocy\Helpers\Grocycode;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use jucksearm\barcode\lib\BarcodeFactory;
|
||||
use jucksearm\barcode\lib\DatamatrixFactory;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
|
||||
trait GrocycodeTrait
|
||||
{
|
||||
public function ServeGrocycodeImage(ServerRequestInterface $request, ResponseInterface $response, Grocycode $grocycode)
|
||||
public function ServeGrocycodeImage(Request $request, Response $response, Grocycode $grocycode)
|
||||
{
|
||||
$size = $request->getQueryParam('size', null);
|
||||
|
||||
@@ -27,7 +27,7 @@ trait GrocycodeTrait
|
||||
if ($isDownload)
|
||||
{
|
||||
$response = $response->withHeader('Content-Type', 'application/octet-stream')
|
||||
->withHeader('Content-Disposition', 'attachment; filename=grocycode.png')
|
||||
->withHeader('Content-Disposition', 'attachment; filename=Grocycode.png')
|
||||
->withHeader('Content-Length', strlen($png))
|
||||
->withHeader('Cache-Control', 'no-cache')
|
||||
->withHeader('Last-Modified', gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
@@ -3,21 +3,23 @@
|
||||
namespace Grocy\Controllers;
|
||||
|
||||
use Grocy\Services\SessionService;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
|
||||
class LoginController extends BaseController
|
||||
{
|
||||
public function LoginPage(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function LoginPage(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->renderPage($response, 'login');
|
||||
}
|
||||
|
||||
public function Logout(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function Logout(Request $request, Response $response, array $args)
|
||||
{
|
||||
$this->getSessionService()->RemoveSession($_COOKIE[SessionService::SESSION_COOKIE_NAME]);
|
||||
return $response->withRedirect($this->AppContainer->get('UrlManager')->ConstructUrl('/'));
|
||||
}
|
||||
|
||||
public function ProcessLogin(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ProcessLogin(Request $request, Response $response, array $args)
|
||||
{
|
||||
$authMiddlewareClass = GROCY_AUTH_CLASS;
|
||||
if ($authMiddlewareClass::ProcessLogin($this->GetParsedAndFilteredRequestBody($request)))
|
||||
|
@@ -3,30 +3,47 @@
|
||||
namespace Grocy\Controllers;
|
||||
|
||||
use Grocy\Controllers\Users\User;
|
||||
use Grocy\Services\ApiKeyService;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
|
||||
class OpenApiController extends BaseApiController
|
||||
{
|
||||
public function ApiKeysList(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ApiKeysList(Request $request, Response $response, array $args)
|
||||
{
|
||||
$selectedKeyId = -1;
|
||||
if (isset($request->getQueryParams()['key']) && filter_var($request->getQueryParams()['key'], FILTER_VALIDATE_INT))
|
||||
{
|
||||
$selectedKeyId = $request->getQueryParams()['key'];
|
||||
}
|
||||
|
||||
$apiKeys = $this->getDatabase()->api_keys();
|
||||
if (!User::hasPermissions(User::PERMISSION_ADMIN))
|
||||
{
|
||||
$apiKeys = $apiKeys->where('user_id', GROCY_USER_ID);
|
||||
}
|
||||
|
||||
return $this->renderPage($response, 'manageapikeys', [
|
||||
'apiKeys' => $apiKeys,
|
||||
'users' => $this->getDatabase()->users()
|
||||
'users' => $this->getDatabase()->users(),
|
||||
'selectedKeyId' => $selectedKeyId
|
||||
]);
|
||||
}
|
||||
|
||||
public function CreateNewApiKey(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function CreateNewApiKey(Request $request, Response $response, array $args)
|
||||
{
|
||||
$newApiKey = $this->getApiKeyService()->CreateApiKey();
|
||||
$description = null;
|
||||
if (isset($request->getQueryParams()['description']))
|
||||
{
|
||||
$description = $request->getQueryParams()['description'];
|
||||
}
|
||||
|
||||
$newApiKey = $this->getApiKeyService()->CreateApiKey(ApiKeyService::API_KEY_TYPE_DEFAULT, $description);
|
||||
$newApiKeyId = $this->getApiKeyService()->GetApiKeyId($newApiKey);
|
||||
return $response->withRedirect($this->AppContainer->get('UrlManager')->ConstructUrl("/manageapikeys?CreatedApiKeyId=$newApiKeyId"));
|
||||
return $response->withRedirect($this->AppContainer->get('UrlManager')->ConstructUrl("/manageapikeys?key=$newApiKeyId"));
|
||||
}
|
||||
|
||||
public function DocumentationSpec(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function DocumentationSpec(Request $request, Response $response, array $args)
|
||||
{
|
||||
$spec = $this->getOpenApiSpec();
|
||||
|
||||
@@ -36,7 +53,8 @@ class OpenApiController extends BaseApiController
|
||||
$spec->info->description = str_replace('PlaceHolderManageApiKeysUrl', $this->AppContainer->get('UrlManager')->ConstructUrl('/manageapikeys'), $spec->info->description);
|
||||
$spec->servers[0]->url = $this->AppContainer->get('UrlManager')->ConstructUrl('/api');
|
||||
|
||||
$spec->components->schemas->ExposedEntity_IncludingUserEntities = clone $spec->components->schemas->ExposedEntity;
|
||||
$spec->components->schemas->ExposedEntity_IncludingUserEntities = clone $spec->components->schemas->StringEnumTemplate;
|
||||
;
|
||||
foreach ($this->getUserfieldsService()->GetEntities() as $userEntity)
|
||||
{
|
||||
array_push($spec->components->schemas->ExposedEntity_IncludingUserEntities->enum, $userEntity);
|
||||
@@ -61,6 +79,7 @@ class OpenApiController extends BaseApiController
|
||||
array_push($spec->components->schemas->ExposedEntity_IncludingUserEntities_NotIncludingNotEditable->enum, $value);
|
||||
}
|
||||
}
|
||||
array_push($spec->components->schemas->ExposedEntity_IncludingUserEntities_NotIncludingNotEditable->enum, 'stock'); // TODO: Don't hardcode this here - stock entries are normally not editable, but the corresponding Userfields are
|
||||
sort($spec->components->schemas->ExposedEntity_IncludingUserEntities_NotIncludingNotEditable->enum);
|
||||
|
||||
$spec->components->schemas->ExposedEntity_NotIncludingNotDeletable = clone $spec->components->schemas->StringEnumTemplate;
|
||||
@@ -86,7 +105,7 @@ class OpenApiController extends BaseApiController
|
||||
return $this->ApiResponse($response, $spec);
|
||||
}
|
||||
|
||||
public function DocumentationUi(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function DocumentationUi(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->render($response, 'openapiui');
|
||||
}
|
||||
|
@@ -3,11 +3,12 @@
|
||||
namespace Grocy\Controllers;
|
||||
|
||||
use Grocy\Controllers\Users\User;
|
||||
use Grocy\Services\StockService;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
|
||||
class PrintApiController extends BaseApiController
|
||||
{
|
||||
public function PrintShoppingListThermal(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function PrintShoppingListThermal(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@@ -5,10 +5,12 @@ namespace Grocy\Controllers;
|
||||
use Grocy\Controllers\Users\User;
|
||||
use Grocy\Helpers\WebhookRunner;
|
||||
use Grocy\Helpers\Grocycode;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
|
||||
class RecipesApiController extends BaseApiController
|
||||
{
|
||||
public function AddNotFulfilledProductsToShoppingList(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function AddNotFulfilledProductsToShoppingList(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_SHOPPINGLIST_ITEMS_ADD);
|
||||
|
||||
@@ -24,7 +26,7 @@ class RecipesApiController extends BaseApiController
|
||||
return $this->EmptyApiResponse($response);
|
||||
}
|
||||
|
||||
public function ConsumeRecipe(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ConsumeRecipe(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_STOCK_CONSUME);
|
||||
|
||||
@@ -39,7 +41,7 @@ class RecipesApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function GetRecipeFulfillment(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function GetRecipeFulfillment(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -65,7 +67,7 @@ class RecipesApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function CopyRecipe(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function CopyRecipe(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -79,7 +81,7 @@ class RecipesApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function RecipePrintLabel(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function RecipePrintLabel(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@@ -4,12 +4,14 @@ namespace Grocy\Controllers;
|
||||
|
||||
use Grocy\Services\RecipesService;
|
||||
use Grocy\Helpers\Grocycode;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
|
||||
class RecipesController extends BaseController
|
||||
{
|
||||
use GrocycodeTrait;
|
||||
|
||||
public function MealPlan(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function MealPlan(Request $request, Response $response, array $args)
|
||||
{
|
||||
$start = date('Y-m-d');
|
||||
if (isset($request->getQueryParams()['start']) && IsIsoDate($request->getQueryParams()['start']))
|
||||
@@ -23,7 +25,7 @@ class RecipesController extends BaseController
|
||||
$days = $request->getQueryParams()['days'];
|
||||
}
|
||||
|
||||
$mealPlanWhereTimespan = "day BETWEEN DATE('$start') AND DATE('$start', '+$days days')";
|
||||
$mealPlanWhereTimespan = "day BETWEEN DATE('$start', '-$days days') AND DATE('$start', '+$days days')";
|
||||
|
||||
$recipes = $this->getDatabase()->recipes()->where('type', RecipesService::RECIPE_TYPE_NORMAL)->fetchAll();
|
||||
$events = [];
|
||||
@@ -64,11 +66,12 @@ class RecipesController extends BaseController
|
||||
'quantityUnits' => $this->getDatabase()->quantity_units()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'quantityUnitConversionsResolved' => $this->getDatabase()->quantity_unit_conversions_resolved(),
|
||||
'mealplanSections' => $this->getDatabase()->meal_plan_sections()->orderBy('sort_number'),
|
||||
'usedMealplanSections' => $this->getDatabase()->meal_plan_sections()->where("id IN (SELECT section_id FROM meal_plan WHERE $mealPlanWhereTimespan)")->orderBy('sort_number')
|
||||
'usedMealplanSections' => $this->getDatabase()->meal_plan_sections()->where("id IN (SELECT section_id FROM meal_plan WHERE $mealPlanWhereTimespan)")->orderBy('sort_number'),
|
||||
'weekRecipe' => $this->getDatabase()->recipes()->where("type = 'mealplan-week' AND name = LTRIM(STRFTIME('%Y-%W', DATE('$start')), '0')")->fetch()
|
||||
]);
|
||||
}
|
||||
|
||||
public function Overview(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function Overview(Request $request, Response $response, array $args)
|
||||
{
|
||||
$recipes = $this->getDatabase()->recipes()->where('type', RecipesService::RECIPE_TYPE_NORMAL)->orderBy('name', 'COLLATE NOCASE');
|
||||
$recipesResolved = $this->getRecipesService()->GetRecipesResolved('recipe_id > 0');
|
||||
@@ -95,7 +98,7 @@ class RecipesController extends BaseController
|
||||
$totalCalories = FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $selectedRecipe->id)->calories;
|
||||
}
|
||||
|
||||
$renderArray = [
|
||||
$viewData = [
|
||||
'recipes' => $recipes,
|
||||
'recipesResolved' => $recipesResolved,
|
||||
'recipePositionsResolved' => $this->getDatabase()->recipes_pos_resolved()->where('recipe_id', $selectedRecipe->id),
|
||||
@@ -106,7 +109,8 @@ class RecipesController extends BaseController
|
||||
'userfieldValues' => $this->getUserfieldsService()->GetAllValues('recipes'),
|
||||
'quantityUnitConversionsResolved' => $this->getDatabase()->quantity_unit_conversions_resolved(),
|
||||
'selectedRecipeTotalCosts' => $totalCosts,
|
||||
'selectedRecipeTotalCalories' => $totalCalories
|
||||
'selectedRecipeTotalCalories' => $totalCalories,
|
||||
'mealplanSections' => $this->getDatabase()->meal_plan_sections()->orderBy('sort_number')
|
||||
];
|
||||
|
||||
if ($selectedRecipe)
|
||||
@@ -137,15 +141,15 @@ class RecipesController extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
$renderArray['selectedRecipeSubRecipes'] = $selectedRecipeSubRecipes;
|
||||
$renderArray['includedRecipeIdsAbsolute'] = $includedRecipeIdsAbsolute;
|
||||
$renderArray['allRecipePositions'] = $allRecipePositions;
|
||||
$viewData['selectedRecipeSubRecipes'] = $selectedRecipeSubRecipes;
|
||||
$viewData['includedRecipeIdsAbsolute'] = $includedRecipeIdsAbsolute;
|
||||
$viewData['allRecipePositions'] = $allRecipePositions;
|
||||
}
|
||||
|
||||
return $this->renderPage($response, 'recipes', $renderArray);
|
||||
return $this->renderPage($response, 'recipes', $viewData);
|
||||
}
|
||||
|
||||
public function RecipeEditForm(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function RecipeEditForm(Request $request, Response $response, array $args)
|
||||
{
|
||||
$recipeId = $args['recipeId'];
|
||||
|
||||
@@ -162,7 +166,7 @@ class RecipesController extends BaseController
|
||||
]);
|
||||
}
|
||||
|
||||
public function RecipePosEditForm(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function RecipePosEditForm(Request $request, Response $response, array $args)
|
||||
{
|
||||
if ($args['recipePosId'] == 'new')
|
||||
{
|
||||
@@ -188,12 +192,12 @@ class RecipesController extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
public function RecipesSettings(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function RecipesSettings(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->renderPage($response, 'recipessettings');
|
||||
}
|
||||
|
||||
public function MealPlanSectionEditForm(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function MealPlanSectionEditForm(Request $request, Response $response, array $args)
|
||||
{
|
||||
if ($args['sectionId'] == 'new')
|
||||
{
|
||||
@@ -210,14 +214,14 @@ class RecipesController extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
public function MealPlanSectionsList(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function MealPlanSectionsList(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->renderPage($response, 'mealplansections', [
|
||||
'mealplanSections' => $this->getDatabase()->meal_plan_sections()->where('id > 0')->orderBy('sort_number')
|
||||
]);
|
||||
}
|
||||
|
||||
public function RecipeGrocycodeImage(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function RecipeGrocycodeImage(Request $request, Response $response, array $args)
|
||||
{
|
||||
$gc = new Grocycode(Grocycode::RECIPE, $args['recipeId']);
|
||||
return $this->ServeGrocycodeImage($request, $response, $gc);
|
||||
|
@@ -6,10 +6,12 @@ use Grocy\Controllers\Users\User;
|
||||
use Grocy\Services\StockService;
|
||||
use Grocy\Helpers\WebhookRunner;
|
||||
use Grocy\Helpers\Grocycode;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
|
||||
class StockApiController extends BaseApiController
|
||||
{
|
||||
public function AddMissingProductsToShoppingList(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function AddMissingProductsToShoppingList(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_SHOPPINGLIST_ITEMS_ADD);
|
||||
|
||||
@@ -33,7 +35,7 @@ class StockApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function AddOverdueProductsToShoppingList(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function AddOverdueProductsToShoppingList(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_SHOPPINGLIST_ITEMS_ADD);
|
||||
|
||||
@@ -57,7 +59,7 @@ class StockApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function AddExpiredProductsToShoppingList(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function AddExpiredProductsToShoppingList(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_SHOPPINGLIST_ITEMS_ADD);
|
||||
|
||||
@@ -81,7 +83,7 @@ class StockApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function AddProduct(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function AddProduct(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_STOCK_PURCHASE);
|
||||
|
||||
@@ -158,7 +160,7 @@ class StockApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function AddProductByBarcode(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function AddProductByBarcode(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -171,7 +173,7 @@ class StockApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function AddProductToShoppingList(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function AddProductToShoppingList(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_SHOPPINGLIST_ITEMS_ADD);
|
||||
|
||||
@@ -224,7 +226,7 @@ class StockApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function ClearShoppingList(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ClearShoppingList(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_SHOPPINGLIST_ITEMS_DELETE);
|
||||
|
||||
@@ -253,7 +255,7 @@ class StockApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function ConsumeProduct(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ConsumeProduct(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_STOCK_CONSUME);
|
||||
|
||||
@@ -324,7 +326,7 @@ class StockApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function ConsumeProductByBarcode(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ConsumeProductByBarcode(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -349,12 +351,12 @@ class StockApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function CurrentStock(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function CurrentStock(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->ApiResponse($response, $this->getStockService()->GetCurrentStock());
|
||||
}
|
||||
|
||||
public function CurrentVolatileStock(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function CurrentVolatileStock(Request $request, Response $response, array $args)
|
||||
{
|
||||
$nextXDays = 5;
|
||||
|
||||
@@ -375,7 +377,7 @@ class StockApiController extends BaseApiController
|
||||
]);
|
||||
}
|
||||
|
||||
public function EditStockEntry(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function EditStockEntry(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_STOCK_EDIT);
|
||||
|
||||
@@ -433,7 +435,7 @@ class StockApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function ExternalBarcodeLookup(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ExternalBarcodeLookup(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_MASTER_DATA_EDIT);
|
||||
|
||||
@@ -454,7 +456,7 @@ class StockApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function InventoryProduct(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function InventoryProduct(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_STOCK_INVENTORY);
|
||||
|
||||
@@ -524,7 +526,7 @@ class StockApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function InventoryProductByBarcode(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function InventoryProductByBarcode(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -537,7 +539,7 @@ class StockApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function OpenProduct(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function OpenProduct(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_STOCK_OPEN);
|
||||
|
||||
@@ -578,7 +580,7 @@ class StockApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function OpenProductByBarcode(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function OpenProductByBarcode(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -603,7 +605,7 @@ class StockApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function ProductDetails(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ProductDetails(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -615,7 +617,7 @@ class StockApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function ProductDetailsByBarcode(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ProductDetailsByBarcode(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -628,7 +630,7 @@ class StockApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function ProductPriceHistory(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ProductPriceHistory(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -640,7 +642,7 @@ class StockApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function ProductStockEntries(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ProductStockEntries(Request $request, Response $response, array $args)
|
||||
{
|
||||
$allowSubproductSubstitution = false;
|
||||
if (isset($request->getQueryParams()['include_sub_products']) && filter_var($request->getQueryParams()['include_sub_products'], FILTER_VALIDATE_BOOLEAN) !== false)
|
||||
@@ -648,15 +650,15 @@ class StockApiController extends BaseApiController
|
||||
$allowSubproductSubstitution = true;
|
||||
}
|
||||
|
||||
return $this->FilteredApiResponse($response, $this->getStockService()->GetProductStockEntries($args['productId'], false, $allowSubproductSubstitution, true), $request->getQueryParams());
|
||||
return $this->FilteredApiResponse($response, $this->getStockService()->GetProductStockEntries($args['productId'], false, $allowSubproductSubstitution), $request->getQueryParams());
|
||||
}
|
||||
|
||||
public function LocationStockEntries(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function LocationStockEntries(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->FilteredApiResponse($response, $this->getStockService()->GetLocationStockEntries($args['locationId']), $request->getQueryParams());
|
||||
}
|
||||
|
||||
public function ProductStockLocations(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ProductStockLocations(Request $request, Response $response, array $args)
|
||||
{
|
||||
$allowSubproductSubstitution = false;
|
||||
if (isset($request->getQueryParams()['include_sub_products']) && filter_var($request->getQueryParams()['include_sub_products'], FILTER_VALIDATE_BOOLEAN) !== false)
|
||||
@@ -667,7 +669,7 @@ class StockApiController extends BaseApiController
|
||||
return $this->FilteredApiResponse($response, $this->getStockService()->GetProductStockLocations($args['productId'], $allowSubproductSubstitution), $request->getQueryParams());
|
||||
}
|
||||
|
||||
public function ProductPrintLabel(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ProductPrintLabel(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -691,7 +693,7 @@ class StockApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function StockEntryPrintLabel(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function StockEntryPrintLabel(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -721,7 +723,7 @@ class StockApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function RemoveProductFromShoppingList(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function RemoveProductFromShoppingList(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_SHOPPINGLIST_ITEMS_DELETE);
|
||||
|
||||
@@ -762,7 +764,7 @@ class StockApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function StockBooking(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function StockBooking(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -781,12 +783,12 @@ class StockApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function StockEntry(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function StockEntry(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->ApiResponse($response, $this->getStockService()->GetStockEntry($args['entryId']));
|
||||
}
|
||||
|
||||
public function StockTransactions(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function StockTransactions(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -804,7 +806,7 @@ class StockApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function TransferProduct(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function TransferProduct(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_STOCK_TRANSFER);
|
||||
|
||||
@@ -849,7 +851,7 @@ class StockApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function TransferProductByBarcode(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function TransferProductByBarcode(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -874,7 +876,7 @@ class StockApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function UndoBooking(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function UndoBooking(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_STOCK_EDIT);
|
||||
|
||||
@@ -889,7 +891,7 @@ class StockApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function UndoTransaction(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function UndoTransaction(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_STOCK_EDIT);
|
||||
|
||||
@@ -904,7 +906,7 @@ class StockApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function MergeProducts(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function MergeProducts(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_STOCK_EDIT);
|
||||
|
||||
|
@@ -4,12 +4,14 @@ namespace Grocy\Controllers;
|
||||
|
||||
use Grocy\Helpers\Grocycode;
|
||||
use Grocy\Services\RecipesService;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
|
||||
class StockController extends BaseController
|
||||
{
|
||||
use GrocycodeTrait;
|
||||
|
||||
public function Consume(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function Consume(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->renderPage($response, 'consume', [
|
||||
'products' => $this->getDatabase()->products()->where('active = 1')->where('id IN (SELECT product_id from stock_current WHERE amount_aggregated > 0)')->orderBy('name'),
|
||||
@@ -21,20 +23,20 @@ class StockController extends BaseController
|
||||
]);
|
||||
}
|
||||
|
||||
public function Inventory(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function Inventory(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->renderPage($response, 'inventory', [
|
||||
'products' => $this->getDatabase()->products()->where('active = 1 AND no_own_stock = 0')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'barcodes' => $this->getDatabase()->product_barcodes_comma_separated(),
|
||||
'shoppinglocations' => $this->getDatabase()->shopping_locations()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'locations' => $this->getDatabase()->locations()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'shoppinglocations' => $this->getDatabase()->shopping_locations()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'locations' => $this->getDatabase()->locations()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'quantityUnits' => $this->getDatabase()->quantity_units()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'quantityUnitConversionsResolved' => $this->getDatabase()->quantity_unit_conversions_resolved(),
|
||||
'userfields' => $this->getUserfieldsService()->GetFields('stock')
|
||||
]);
|
||||
}
|
||||
|
||||
public function Journal(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function Journal(Request $request, Response $response, array $args)
|
||||
{
|
||||
if (isset($request->getQueryParams()['months']) && filter_var($request->getQueryParams()['months'], FILTER_VALIDATE_INT) !== false)
|
||||
{
|
||||
@@ -66,7 +68,7 @@ class StockController extends BaseController
|
||||
]);
|
||||
}
|
||||
|
||||
public function LocationContentSheet(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function LocationContentSheet(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->renderPage($response, 'locationcontentsheet', [
|
||||
'products' => $this->getDatabase()->products()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
@@ -76,7 +78,7 @@ class StockController extends BaseController
|
||||
]);
|
||||
}
|
||||
|
||||
public function LocationEditForm(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function LocationEditForm(Request $request, Response $response, array $args)
|
||||
{
|
||||
if ($args['locationId'] == 'new')
|
||||
{
|
||||
@@ -95,35 +97,43 @@ class StockController extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
public function LocationsList(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function LocationsList(Request $request, Response $response, array $args)
|
||||
{
|
||||
if (isset($request->getQueryParams()['include_disabled']))
|
||||
{
|
||||
$locations = $this->getDatabase()->locations()->orderBy('name', 'COLLATE NOCASE');
|
||||
}
|
||||
else
|
||||
{
|
||||
$locations = $this->getDatabase()->locations()->where('active = 1')->orderBy('name', 'COLLATE NOCASE');
|
||||
}
|
||||
|
||||
return $this->renderPage($response, 'locations', [
|
||||
'locations' => $this->getDatabase()->locations()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'locations' => $locations,
|
||||
'userfields' => $this->getUserfieldsService()->GetFields('locations'),
|
||||
'userfieldValues' => $this->getUserfieldsService()->GetAllValues('locations')
|
||||
]);
|
||||
}
|
||||
|
||||
public function Overview(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function Overview(Request $request, Response $response, array $args)
|
||||
{
|
||||
$usersService = $this->getUsersService();
|
||||
$nextXDays = $usersService->GetUserSettings(GROCY_USER_ID)['stock_due_soon_days'];
|
||||
|
||||
return $this->renderPage($response, 'stockoverview', [
|
||||
'currentStock' => $this->getStockService()->GetCurrentStockOverview(),
|
||||
'locations' => $this->getDatabase()->locations()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'locations' => $this->getDatabase()->locations()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'currentStockLocations' => $this->getStockService()->GetCurrentStockLocations(),
|
||||
'nextXDays' => $nextXDays,
|
||||
'productGroups' => $this->getDatabase()->product_groups()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'productGroups' => $this->getDatabase()->product_groups()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'userfields' => $this->getUserfieldsService()->GetFields('products'),
|
||||
'userfieldValues' => $this->getUserfieldsService()->GetAllValues('products')
|
||||
]);
|
||||
}
|
||||
|
||||
public function ProductBarcodesEditForm(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ProductBarcodesEditForm(Request $request, Response $response, array $args)
|
||||
{
|
||||
$product = null;
|
||||
|
||||
if (isset($request->getQueryParams()['product']))
|
||||
{
|
||||
$product = $this->getDatabase()->products($request->getQueryParams()['product']);
|
||||
@@ -135,7 +145,7 @@ class StockController extends BaseController
|
||||
'mode' => 'create',
|
||||
'barcodes' => $this->getDatabase()->product_barcodes()->orderBy('barcode'),
|
||||
'product' => $product,
|
||||
'shoppinglocations' => $this->getDatabase()->shopping_locations()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'shoppinglocations' => $this->getDatabase()->shopping_locations()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'quantityUnits' => $this->getDatabase()->quantity_units()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'quantityUnitConversionsResolved' => $this->getDatabase()->quantity_unit_conversions_resolved(),
|
||||
'userfields' => $this->getUserfieldsService()->GetFields('product_barcodes')
|
||||
@@ -147,7 +157,7 @@ class StockController extends BaseController
|
||||
'mode' => 'edit',
|
||||
'barcode' => $this->getDatabase()->product_barcodes($args['productBarcodeId']),
|
||||
'product' => $product,
|
||||
'shoppinglocations' => $this->getDatabase()->shopping_locations()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'shoppinglocations' => $this->getDatabase()->shopping_locations()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'quantityUnits' => $this->getDatabase()->quantity_units()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'quantityUnitConversionsResolved' => $this->getDatabase()->quantity_unit_conversions_resolved(),
|
||||
'userfields' => $this->getUserfieldsService()->GetFields('product_barcodes')
|
||||
@@ -155,17 +165,18 @@ class StockController extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
public function ProductEditForm(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ProductEditForm(Request $request, Response $response, array $args)
|
||||
{
|
||||
if ($args['productId'] == 'new')
|
||||
{
|
||||
return $this->renderPage($response, 'productform', [
|
||||
'locations' => $this->getDatabase()->locations()->orderBy('name'),
|
||||
'locations' => $this->getDatabase()->locations()->where('active = 1')->orderBy('name'),
|
||||
'barcodes' => $this->getDatabase()->product_barcodes()->orderBy('barcode'),
|
||||
'quantityunits' => $this->getDatabase()->quantity_units()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'quantityunits' => $this->getDatabase()->quantity_units()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'quantityunitsStock' => $this->getDatabase()->quantity_units()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'shoppinglocations' => $this->getDatabase()->shopping_locations()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'productgroups' => $this->getDatabase()->product_groups()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'referencedQuantityunits' => $this->getDatabase()->quantity_units()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'shoppinglocations' => $this->getDatabase()->shopping_locations()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'productgroups' => $this->getDatabase()->product_groups()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'userfields' => $this->getUserfieldsService()->GetFields('products'),
|
||||
'products' => $this->getDatabase()->products()->where('parent_product_id IS NULL and active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'isSubProductOfOthers' => false,
|
||||
@@ -178,30 +189,31 @@ class StockController extends BaseController
|
||||
|
||||
return $this->renderPage($response, 'productform', [
|
||||
'product' => $product,
|
||||
'locations' => $this->getDatabase()->locations()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'locations' => $this->getDatabase()->locations()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'barcodes' => $this->getDatabase()->product_barcodes()->orderBy('barcode'),
|
||||
'quantityunits' => $this->getDatabase()->quantity_units()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'quantityunits' => $this->getDatabase()->quantity_units()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'quantityunitsStock' => $this->getDatabase()->quantity_units()->where('id IN (SELECT to_qu_id FROM quantity_unit_conversions_resolved WHERE product_id = :1) OR NOT EXISTS(SELECT 1 FROM stock_log WHERE product_id = :1)', $product->id)->orderBy('name', 'COLLATE NOCASE'),
|
||||
'shoppinglocations' => $this->getDatabase()->shopping_locations()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'productgroups' => $this->getDatabase()->product_groups()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'referencedQuantityunits' => $this->getDatabase()->quantity_units()->where('active = 1')->where('id IN (SELECT to_qu_id FROM quantity_unit_conversions_resolved WHERE product_id = :1)', $product->id)->orderBy('name', 'COLLATE NOCASE'),
|
||||
'shoppinglocations' => $this->getDatabase()->shopping_locations()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'productgroups' => $this->getDatabase()->product_groups()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'userfields' => $this->getUserfieldsService()->GetFields('products'),
|
||||
'products' => $this->getDatabase()->products()->where('id != :1 AND parent_product_id IS NULL and active = 1', $product->id)->orderBy('name', 'COLLATE NOCASE'),
|
||||
'isSubProductOfOthers' => $this->getDatabase()->products()->where('parent_product_id = :1', $product->id)->count() !== 0,
|
||||
'mode' => 'edit',
|
||||
'quConversions' => $this->getDatabase()->quantity_unit_conversions(),
|
||||
'quConversions' => $this->getDatabase()->quantity_unit_conversions()->where('product_id', $product->id),
|
||||
'productBarcodeUserfields' => $this->getUserfieldsService()->GetFields('product_barcodes'),
|
||||
'productBarcodeUserfieldValues' => $this->getUserfieldsService()->GetAllValues('product_barcodes')
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
public function ProductGrocycodeImage(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ProductGrocycodeImage(Request $request, Response $response, array $args)
|
||||
{
|
||||
$gc = new Grocycode(Grocycode::PRODUCT, $args['productId']);
|
||||
return $this->ServeGrocycodeImage($request, $response, $gc);
|
||||
}
|
||||
|
||||
public function ProductGroupEditForm(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ProductGroupEditForm(Request $request, Response $response, array $args)
|
||||
{
|
||||
if ($args['productGroupId'] == 'new')
|
||||
{
|
||||
@@ -220,17 +232,26 @@ class StockController extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
public function ProductGroupsList(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ProductGroupsList(Request $request, Response $response, array $args)
|
||||
{
|
||||
if (isset($request->getQueryParams()['include_disabled']))
|
||||
{
|
||||
$productGroups = $this->getDatabase()->product_groups()->orderBy('name', 'COLLATE NOCASE');
|
||||
}
|
||||
else
|
||||
{
|
||||
$productGroups = $this->getDatabase()->product_groups()->where('active = 1')->orderBy('name', 'COLLATE NOCASE');
|
||||
}
|
||||
|
||||
return $this->renderPage($response, 'productgroups', [
|
||||
'productGroups' => $this->getDatabase()->product_groups()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'productGroups' => $productGroups,
|
||||
'products' => $this->getDatabase()->products()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'userfields' => $this->getUserfieldsService()->GetFields('product_groups'),
|
||||
'userfieldValues' => $this->getUserfieldsService()->GetAllValues('product_groups')
|
||||
]);
|
||||
}
|
||||
|
||||
public function ProductsList(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ProductsList(Request $request, Response $response, array $args)
|
||||
{
|
||||
$products = $this->getDatabase()->products();
|
||||
if (!isset($request->getQueryParams()['include_disabled']))
|
||||
@@ -242,6 +263,10 @@ class StockController extends BaseController
|
||||
{
|
||||
$products = $products->where('id IN (SELECT product_id from stock_current WHERE amount_aggregated > 0)');
|
||||
}
|
||||
if (isset($request->getQueryParams()['only_out_of_stock']))
|
||||
{
|
||||
$products = $products->where('id NOT IN (SELECT product_id from stock_current WHERE amount_aggregated > 0)');
|
||||
}
|
||||
|
||||
$products = $products->orderBy('name', 'COLLATE NOCASE');
|
||||
|
||||
@@ -249,30 +274,29 @@ class StockController extends BaseController
|
||||
'products' => $products,
|
||||
'locations' => $this->getDatabase()->locations()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'quantityunits' => $this->getDatabase()->quantity_units()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'productGroups' => $this->getDatabase()->product_groups()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'productGroups' => $this->getDatabase()->product_groups()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'shoppingLocations' => $this->getDatabase()->shopping_locations()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'userfields' => $this->getUserfieldsService()->GetFields('products'),
|
||||
'userfieldValues' => $this->getUserfieldsService()->GetAllValues('products')
|
||||
]);
|
||||
}
|
||||
|
||||
public function Purchase(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function Purchase(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->renderPage($response, 'purchase', [
|
||||
'products' => $this->getDatabase()->products()->where('active = 1 AND no_own_stock = 0')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'barcodes' => $this->getDatabase()->product_barcodes_comma_separated(),
|
||||
'shoppinglocations' => $this->getDatabase()->shopping_locations()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'locations' => $this->getDatabase()->locations()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'quantityUnits' => $this->getDatabase()->quantity_units()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'shoppinglocations' => $this->getDatabase()->shopping_locations()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'locations' => $this->getDatabase()->locations()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'quantityUnits' => $this->getDatabase()->quantity_units()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'quantityUnitConversionsResolved' => $this->getDatabase()->quantity_unit_conversions_resolved(),
|
||||
'userfields' => $this->getUserfieldsService()->GetFields('stock')
|
||||
]);
|
||||
}
|
||||
|
||||
public function QuantityUnitConversionEditForm(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function QuantityUnitConversionEditForm(Request $request, Response $response, array $args)
|
||||
{
|
||||
$product = null;
|
||||
|
||||
if (isset($request->getQueryParams()['product']))
|
||||
{
|
||||
$product = $this->getDatabase()->products($request->getQueryParams()['product']);
|
||||
@@ -290,7 +314,7 @@ class StockController extends BaseController
|
||||
return $this->renderPage($response, 'quantityunitconversionform', [
|
||||
'mode' => 'create',
|
||||
'userfields' => $this->getUserfieldsService()->GetFields('quantity_unit_conversions'),
|
||||
'quantityunits' => $this->getDatabase()->quantity_units()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'quantityunits' => $this->getDatabase()->quantity_units()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'product' => $product,
|
||||
'defaultQuUnit' => $defaultQuUnit
|
||||
]);
|
||||
@@ -301,14 +325,14 @@ class StockController extends BaseController
|
||||
'quConversion' => $this->getDatabase()->quantity_unit_conversions($args['quConversionId']),
|
||||
'mode' => 'edit',
|
||||
'userfields' => $this->getUserfieldsService()->GetFields('quantity_unit_conversions'),
|
||||
'quantityunits' => $this->getDatabase()->quantity_units()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'quantityunits' => $this->getDatabase()->quantity_units()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'product' => $product,
|
||||
'defaultQuUnit' => $defaultQuUnit
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
public function QuantityUnitEditForm(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function QuantityUnitEditForm(Request $request, Response $response, array $args)
|
||||
{
|
||||
if ($args['quantityunitId'] == 'new')
|
||||
{
|
||||
@@ -335,26 +359,34 @@ class StockController extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
public function QuantityUnitPluralFormTesting(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function QuantityUnitPluralFormTesting(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->renderPage($response, 'quantityunitpluraltesting', [
|
||||
'quantityUnits' => $this->getDatabase()->quantity_units()->orderBy('name', 'COLLATE NOCASE')
|
||||
'quantityUnits' => $this->getDatabase()->quantity_units()->where('active = 1')->orderBy('name', 'COLLATE NOCASE')
|
||||
]);
|
||||
}
|
||||
|
||||
public function QuantityUnitsList(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function QuantityUnitsList(Request $request, Response $response, array $args)
|
||||
{
|
||||
if (isset($request->getQueryParams()['include_disabled']))
|
||||
{
|
||||
$quantityUnits = $this->getDatabase()->quantity_units()->orderBy('name', 'COLLATE NOCASE');
|
||||
}
|
||||
else
|
||||
{
|
||||
$quantityUnits = $this->getDatabase()->quantity_units()->where('active = 1')->orderBy('name', 'COLLATE NOCASE');
|
||||
}
|
||||
|
||||
return $this->renderPage($response, 'quantityunits', [
|
||||
'quantityunits' => $this->getDatabase()->quantity_units()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'quantityunits' => $quantityUnits,
|
||||
'userfields' => $this->getUserfieldsService()->GetFields('quantity_units'),
|
||||
'userfieldValues' => $this->getUserfieldsService()->GetAllValues('quantity_units')
|
||||
]);
|
||||
}
|
||||
|
||||
public function ShoppingList(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ShoppingList(Request $request, Response $response, array $args)
|
||||
{
|
||||
$listId = 1;
|
||||
|
||||
if (isset($request->getQueryParams()['list']))
|
||||
{
|
||||
$listId = $request->getQueryParams()['list'];
|
||||
@@ -370,12 +402,14 @@ class StockController extends BaseController
|
||||
'quantityUnitConversionsResolved' => $this->getDatabase()->quantity_unit_conversions_resolved(),
|
||||
'productUserfields' => $this->getUserfieldsService()->GetFields('products'),
|
||||
'productUserfieldValues' => $this->getUserfieldsService()->GetAllValues('products'),
|
||||
'productGroupUserfields' => $this->getUserfieldsService()->GetFields('product_groups'),
|
||||
'productGroupUserfieldValues' => $this->getUserfieldsService()->GetAllValues('product_groups'),
|
||||
'userfields' => $this->getUserfieldsService()->GetFields('shopping_list'),
|
||||
'userfieldValues' => $this->getUserfieldsService()->GetAllValues('shopping_list')
|
||||
]);
|
||||
}
|
||||
|
||||
public function ShoppingListEditForm(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ShoppingListEditForm(Request $request, Response $response, array $args)
|
||||
{
|
||||
if ($args['listId'] == 'new')
|
||||
{
|
||||
@@ -394,15 +428,16 @@ class StockController extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
public function ShoppingListItemEditForm(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ShoppingListItemEditForm(Request $request, Response $response, array $args)
|
||||
{
|
||||
if ($args['itemId'] == 'new')
|
||||
{
|
||||
return $this->renderPage($response, 'shoppinglistitemform', [
|
||||
'products' => $this->getDatabase()->products()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'barcodes' => $this->getDatabase()->product_barcodes_comma_separated(),
|
||||
'shoppingLists' => $this->getDatabase()->shopping_lists()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'mode' => 'create',
|
||||
'quantityUnits' => $this->getDatabase()->quantity_units()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'quantityUnits' => $this->getDatabase()->quantity_units()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'quantityUnitConversionsResolved' => $this->getDatabase()->quantity_unit_conversions_resolved(),
|
||||
'userfields' => $this->getUserfieldsService()->GetFields('shopping_list')
|
||||
]);
|
||||
@@ -412,23 +447,24 @@ class StockController extends BaseController
|
||||
return $this->renderPage($response, 'shoppinglistitemform', [
|
||||
'listItem' => $this->getDatabase()->shopping_list($args['itemId']),
|
||||
'products' => $this->getDatabase()->products()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'barcodes' => $this->getDatabase()->product_barcodes_comma_separated(),
|
||||
'shoppingLists' => $this->getDatabase()->shopping_lists()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'mode' => 'edit',
|
||||
'quantityUnits' => $this->getDatabase()->quantity_units()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'quantityUnits' => $this->getDatabase()->quantity_units()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'quantityUnitConversionsResolved' => $this->getDatabase()->quantity_unit_conversions_resolved(),
|
||||
'userfields' => $this->getUserfieldsService()->GetFields('shopping_list')
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
public function ShoppingListSettings(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ShoppingListSettings(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->renderPage($response, 'shoppinglistsettings', [
|
||||
'shoppingLists' => $this->getDatabase()->shopping_lists()->orderBy('name', 'COLLATE NOCASE')
|
||||
]);
|
||||
}
|
||||
|
||||
public function ShoppingLocationEditForm(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ShoppingLocationEditForm(Request $request, Response $response, array $args)
|
||||
{
|
||||
if ($args['shoppingLocationId'] == 'new')
|
||||
{
|
||||
@@ -440,41 +476,50 @@ class StockController extends BaseController
|
||||
else
|
||||
{
|
||||
return $this->renderPage($response, 'shoppinglocationform', [
|
||||
'shoppinglocation' => $this->getDatabase()->shopping_locations($args['shoppingLocationId']),
|
||||
'shoppingLocation' => $this->getDatabase()->shopping_locations($args['shoppingLocationId']),
|
||||
'mode' => 'edit',
|
||||
'userfields' => $this->getUserfieldsService()->GetFields('shopping_locations')
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
public function ShoppingLocationsList(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ShoppingLocationsList(Request $request, Response $response, array $args)
|
||||
{
|
||||
if (isset($request->getQueryParams()['include_disabled']))
|
||||
{
|
||||
$shoppingLocations = $this->getDatabase()->shopping_locations()->orderBy('name', 'COLLATE NOCASE');
|
||||
}
|
||||
else
|
||||
{
|
||||
$shoppingLocations = $this->getDatabase()->shopping_locations()->where('active = 1')->orderBy('name', 'COLLATE NOCASE');
|
||||
}
|
||||
|
||||
return $this->renderPage($response, 'shoppinglocations', [
|
||||
'shoppinglocations' => $this->getDatabase()->shopping_locations()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'shoppinglocations' => $shoppingLocations,
|
||||
'userfields' => $this->getUserfieldsService()->GetFields('shopping_locations'),
|
||||
'userfieldValues' => $this->getUserfieldsService()->GetAllValues('shopping_locations')
|
||||
]);
|
||||
}
|
||||
|
||||
public function StockEntryEditForm(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function StockEntryEditForm(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->renderPage($response, 'stockentryform', [
|
||||
'stockEntry' => $this->getDatabase()->stock()->where('id', $args['entryId'])->fetch(),
|
||||
'products' => $this->getDatabase()->products()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'shoppinglocations' => $this->getDatabase()->shopping_locations()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'locations' => $this->getDatabase()->locations()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'shoppinglocations' => $this->getDatabase()->shopping_locations()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'locations' => $this->getDatabase()->locations()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'userfields' => $this->getUserfieldsService()->GetFields('stock')
|
||||
]);
|
||||
}
|
||||
|
||||
public function StockEntryGrocycodeImage(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function StockEntryGrocycodeImage(Request $request, Response $response, array $args)
|
||||
{
|
||||
$stockEntry = $this->getDatabase()->stock()->where('id', $args['entryId'])->fetch();
|
||||
$gc = new Grocycode(Grocycode::PRODUCT, $stockEntry->product_id, [$stockEntry->stock_id]);
|
||||
return $this->ServeGrocycodeImage($request, $response, $gc);
|
||||
}
|
||||
|
||||
public function StockEntryGrocycodeLabel(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function StockEntryGrocycodeLabel(Request $request, Response $response, array $args)
|
||||
{
|
||||
$stockEntry = $this->getDatabase()->stock()->where('id', $args['entryId'])->fetch();
|
||||
return $this->renderPage($response, 'stockentrylabel', [
|
||||
@@ -483,26 +528,26 @@ class StockController extends BaseController
|
||||
]);
|
||||
}
|
||||
|
||||
public function StockSettings(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function StockSettings(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->renderPage($response, 'stocksettings', [
|
||||
'locations' => $this->getDatabase()->locations()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'quantityunits' => $this->getDatabase()->quantity_units()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'productGroups' => $this->getDatabase()->product_groups()->orderBy('name', 'COLLATE NOCASE')
|
||||
'locations' => $this->getDatabase()->locations()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'quantityunits' => $this->getDatabase()->quantity_units()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'productGroups' => $this->getDatabase()->product_groups()->where('active = 1')->orderBy('name', 'COLLATE NOCASE')
|
||||
]);
|
||||
}
|
||||
|
||||
public function Stockentries(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function Stockentries(Request $request, Response $response, array $args)
|
||||
{
|
||||
$usersService = $this->getUsersService();
|
||||
$nextXDays = $usersService->GetUserSettings(GROCY_USER_ID)['stock_due_soon_days'];
|
||||
|
||||
return $this->renderPage($response, 'stockentries', [
|
||||
'products' => $this->getDatabase()->products()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'quantityunits' => $this->getDatabase()->quantity_units()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'locations' => $this->getDatabase()->locations()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'shoppinglocations' => $this->getDatabase()->shopping_locations()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'stockEntries' => $this->getDatabase()->stock()->orderBy('product_id'),
|
||||
'quantityunits' => $this->getDatabase()->quantity_units()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'locations' => $this->getDatabase()->locations()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'shoppinglocations' => $this->getDatabase()->shopping_locations()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'stockEntries' => $this->getDatabase()->uihelper_stock_entries()->orderBy('product_id'),
|
||||
'currentStockLocations' => $this->getStockService()->GetCurrentStockLocations(),
|
||||
'nextXDays' => $nextXDays,
|
||||
'userfieldsProducts' => $this->getUserfieldsService()->GetFields('products'),
|
||||
@@ -512,18 +557,18 @@ class StockController extends BaseController
|
||||
]);
|
||||
}
|
||||
|
||||
public function Transfer(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function Transfer(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->renderPage($response, 'transfer', [
|
||||
'products' => $this->getDatabase()->products()->where('active = 1')->where('no_own_stock = 0 AND id IN (SELECT product_id from stock_current WHERE amount_aggregated > 0)')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'barcodes' => $this->getDatabase()->product_barcodes_comma_separated(),
|
||||
'locations' => $this->getDatabase()->locations()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'quantityUnits' => $this->getDatabase()->quantity_units()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'locations' => $this->getDatabase()->locations()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'quantityUnits' => $this->getDatabase()->quantity_units()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'quantityUnitConversionsResolved' => $this->getDatabase()->quantity_unit_conversions_resolved()
|
||||
]);
|
||||
}
|
||||
|
||||
public function JournalSummary(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function JournalSummary(Request $request, Response $response, array $args)
|
||||
{
|
||||
$entries = $this->getDatabase()->uihelper_stock_journal_summary();
|
||||
if (isset($request->getQueryParams()['product_id']))
|
||||
@@ -547,4 +592,24 @@ class StockController extends BaseController
|
||||
'transactionTypes' => GetClassConstants('\Grocy\Services\StockService', 'TRANSACTION_TYPE_')
|
||||
]);
|
||||
}
|
||||
|
||||
public function QuantityUnitConversionsResolved(Request $request, Response $response, array $args)
|
||||
{
|
||||
$product = null;
|
||||
if (isset($request->getQueryParams()['product']))
|
||||
{
|
||||
$product = $this->getDatabase()->products($request->getQueryParams()['product']);
|
||||
$quantityUnitConversionsResolved = $this->getDatabase()->quantity_unit_conversions_resolved()->where('product_id', $product->id);
|
||||
}
|
||||
else
|
||||
{
|
||||
$quantityUnitConversionsResolved = $this->getDatabase()->quantity_unit_conversions_resolved()->where('product_id IS NULL');
|
||||
}
|
||||
|
||||
return $this->renderPage($response, 'quantityunitconversionsresolved', [
|
||||
'product' => $product,
|
||||
'quantityUnits' => $this->getDatabase()->quantity_units()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'quantityUnitConversionsResolved' => $quantityUnitConversionsResolved
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
74
controllers/StockReportsController.php
Normal file
74
controllers/StockReportsController.php
Normal file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
|
||||
namespace Grocy\Controllers;
|
||||
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
|
||||
class StockReportsController extends BaseController
|
||||
{
|
||||
public function Spendings(Request $request, Response $response, array $args)
|
||||
{
|
||||
if (isset($request->getQueryParams()['start_date']) && isset($request->getQueryParams()['end_date']) && IsIsoDate($request->getQueryParams()['start_date']) && IsIsoDate($request->getQueryParams()['end_date']))
|
||||
{
|
||||
$startDate = $request->getQueryParams()['start_date'];
|
||||
$endDate = $request->getQueryParams()['end_date'];
|
||||
$where = "pph.purchased_date BETWEEN '$startDate' AND '$endDate'";
|
||||
}
|
||||
else
|
||||
{
|
||||
// Default to this month
|
||||
$where = "pph.purchased_date >= DATE(DATE('now', 'localtime'), 'start of month')";
|
||||
}
|
||||
|
||||
|
||||
if (isset($request->getQueryParams()['byGroup']))
|
||||
{
|
||||
$sql = "
|
||||
SELECT
|
||||
pg.id AS id,
|
||||
pg.name AS name,
|
||||
SUM(pph.amount * pph.price) AS total
|
||||
FROM product_price_history pph
|
||||
JOIN products p
|
||||
ON pph.product_id = p.id
|
||||
JOIN product_groups pg
|
||||
ON p.product_group_id = pg.id
|
||||
WHERE $where
|
||||
GROUP BY pg.id
|
||||
ORDER BY pg.NAME COLLATE NOCASE
|
||||
";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isset($request->getQueryParams()['product_group']) and $request->getQueryParams()['product_group'] != 'all')
|
||||
{
|
||||
$where .= ' AND pg.id = ' . $request->getQueryParams()['product_group'];
|
||||
}
|
||||
|
||||
$sql = "
|
||||
SELECT
|
||||
p.id AS id,
|
||||
p.name AS name,
|
||||
pg.id AS group_id,
|
||||
pg.name AS group_name,
|
||||
SUM(pph.amount * pph.price) AS total
|
||||
FROM product_price_history pph
|
||||
JOIN products p
|
||||
ON pph.product_id = p.id
|
||||
JOIN product_groups pg
|
||||
ON p.product_group_id = pg.id
|
||||
WHERE $where
|
||||
GROUP BY p.id
|
||||
ORDER BY p.NAME COLLATE NOCASE
|
||||
";
|
||||
}
|
||||
|
||||
return $this->renderPage($response, 'stockreportspendings', [
|
||||
'metrics' => $this->getDatabaseService()->ExecuteDbQuery($sql)->fetchAll(\PDO::FETCH_OBJ),
|
||||
'productGroups' => $this->getDatabase()->product_groups()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'selectedGroup' => isset($request->getQueryParams()['product_group']) ? $request->getQueryParams()['product_group'] : null,
|
||||
'byGroup' => isset($request->getQueryParams()['byGroup']) ? $request->getQueryParams()['byGroup'] : null
|
||||
]);
|
||||
}
|
||||
}
|
@@ -2,9 +2,12 @@
|
||||
|
||||
namespace Grocy\Controllers;
|
||||
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
|
||||
class SystemApiController extends BaseApiController
|
||||
{
|
||||
public function GetConfig(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function GetConfig(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -31,19 +34,19 @@ class SystemApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function GetDbChangedTime(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function GetDbChangedTime(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->ApiResponse($response, [
|
||||
'changed_time' => $this->getDatabaseService()->GetDbChangedTime()
|
||||
]);
|
||||
}
|
||||
|
||||
public function GetSystemInfo(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function GetSystemInfo(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->ApiResponse($response, $this->getApplicationService()->GetSystemInfo());
|
||||
}
|
||||
|
||||
public function GetSystemTime(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function GetSystemTime(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -67,7 +70,7 @@ class SystemApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function LogMissingLocalization(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function LogMissingLocalization(Request $request, Response $response, array $args)
|
||||
{
|
||||
if (GROCY_MODE === 'dev')
|
||||
{
|
||||
@@ -85,7 +88,7 @@ class SystemApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function GetLocalizationStrings(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function GetLocalizationStrings(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->ApiResponse($response, json_decode($this->getLocalizationService()->GetPoAsJsonString()), true);
|
||||
}
|
||||
|
@@ -4,23 +4,26 @@ namespace Grocy\Controllers;
|
||||
|
||||
use Grocy\Services\DatabaseMigrationService;
|
||||
use Grocy\Services\DemoDataGeneratorService;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
|
||||
class SystemController extends BaseController
|
||||
{
|
||||
public function About(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function About(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->renderPage($response, 'about', [
|
||||
'system_info' => $this->getApplicationService()->GetSystemInfo(),
|
||||
'systemInfo' => $this->getApplicationService()->GetSystemInfo(),
|
||||
'versionInfo' => $this->getApplicationService()->GetInstalledVersion(),
|
||||
'changelog' => $this->getApplicationService()->GetChangelog()
|
||||
]);
|
||||
}
|
||||
|
||||
public function BarcodeScannerTesting(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function BarcodeScannerTesting(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->renderPage($response, 'barcodescannertesting');
|
||||
}
|
||||
|
||||
public function Root(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function Root(Request $request, Response $response, array $args)
|
||||
{
|
||||
// Schema migration is done here
|
||||
$databaseMigrationService = DatabaseMigrationService::getInstance();
|
||||
@@ -35,14 +38,6 @@ class SystemController extends BaseController
|
||||
return $response->withRedirect($this->AppContainer->get('UrlManager')->ConstructUrl($this->GetEntryPageRelative()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the entry page of the application based on the value of the entry page setting.
|
||||
*
|
||||
* We fallback to the about page when no entry page is specified or
|
||||
* when the specified entry page has been disabled.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function GetEntryPageRelative()
|
||||
{
|
||||
if (defined('GROCY_ENTRY_PAGE'))
|
||||
@@ -102,7 +97,7 @@ class SystemController extends BaseController
|
||||
}
|
||||
|
||||
// Meal Plan
|
||||
if ($entryPage === 'mealplan' && constant('GROCY_FEATURE_FLAG_RECIPES'))
|
||||
if ($entryPage === 'mealplan' && constant('GROCY_FEATURE_FLAG_RECIPES_MEALPLAN'))
|
||||
{
|
||||
return '/mealplan';
|
||||
}
|
||||
|
@@ -3,15 +3,17 @@
|
||||
namespace Grocy\Controllers;
|
||||
|
||||
use Grocy\Controllers\Users\User;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
|
||||
class TasksApiController extends BaseApiController
|
||||
{
|
||||
public function Current(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function Current(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->FilteredApiResponse($response, $this->getTasksService()->GetCurrent(), $request->getQueryParams());
|
||||
}
|
||||
|
||||
public function MarkTaskAsCompleted(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function MarkTaskAsCompleted(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_TASKS_MARK_COMPLETED);
|
||||
|
||||
@@ -35,7 +37,7 @@ class TasksApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function UndoTask(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function UndoTask(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_TASKS_UNDO_EXECUTION);
|
||||
|
||||
|
@@ -2,9 +2,12 @@
|
||||
|
||||
namespace Grocy\Controllers;
|
||||
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
|
||||
class TasksController extends BaseController
|
||||
{
|
||||
public function Overview(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function Overview(Request $request, Response $response, array $args)
|
||||
{
|
||||
$usersService = $this->getUsersService();
|
||||
$nextXDays = $usersService->GetUserSettings(GROCY_USER_ID)['tasks_due_soon_days'];
|
||||
@@ -41,23 +44,32 @@ class TasksController extends BaseController
|
||||
return $this->renderPage($response, 'tasks', [
|
||||
'tasks' => $tasks,
|
||||
'nextXDays' => $nextXDays,
|
||||
'taskCategories' => $this->getDatabase()->task_categories()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'taskCategories' => $this->getDatabase()->task_categories()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'users' => $this->getDatabase()->users(),
|
||||
'userfields' => $this->getUserfieldsService()->GetFields('tasks'),
|
||||
'userfieldValues' => $this->getUserfieldsService()->GetAllValues('tasks')
|
||||
]);
|
||||
}
|
||||
|
||||
public function TaskCategoriesList(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function TaskCategoriesList(Request $request, Response $response, array $args)
|
||||
{
|
||||
if (isset($request->getQueryParams()['include_disabled']))
|
||||
{
|
||||
$categories = $this->getDatabase()->task_categories()->orderBy('name', 'COLLATE NOCASE');
|
||||
}
|
||||
else
|
||||
{
|
||||
$categories = $this->getDatabase()->task_categories()->where('active = 1')->orderBy('name', 'COLLATE NOCASE');
|
||||
}
|
||||
|
||||
return $this->renderPage($response, 'taskcategories', [
|
||||
'taskCategories' => $this->getDatabase()->task_categories()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'taskCategories' => $categories,
|
||||
'userfields' => $this->getUserfieldsService()->GetFields('task_categories'),
|
||||
'userfieldValues' => $this->getUserfieldsService()->GetAllValues('task_categories')
|
||||
]);
|
||||
}
|
||||
|
||||
public function TaskCategoryEditForm(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function TaskCategoryEditForm(Request $request, Response $response, array $args)
|
||||
{
|
||||
if ($args['categoryId'] == 'new')
|
||||
{
|
||||
@@ -76,13 +88,13 @@ class TasksController extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
public function TaskEditForm(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function TaskEditForm(Request $request, Response $response, array $args)
|
||||
{
|
||||
if ($args['taskId'] == 'new')
|
||||
{
|
||||
return $this->renderPage($response, 'taskform', [
|
||||
'mode' => 'create',
|
||||
'taskCategories' => $this->getDatabase()->task_categories()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'taskCategories' => $this->getDatabase()->task_categories()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'users' => $this->getDatabase()->users()->orderBy('username'),
|
||||
'userfields' => $this->getUserfieldsService()->GetFields('tasks')
|
||||
]);
|
||||
@@ -92,14 +104,14 @@ class TasksController extends BaseController
|
||||
return $this->renderPage($response, 'taskform', [
|
||||
'task' => $this->getDatabase()->tasks($args['taskId']),
|
||||
'mode' => 'edit',
|
||||
'taskCategories' => $this->getDatabase()->task_categories()->orderBy('name', 'COLLATE NOCASE'),
|
||||
'taskCategories' => $this->getDatabase()->task_categories()->where('active = 1')->orderBy('name', 'COLLATE NOCASE'),
|
||||
'users' => $this->getDatabase()->users()->orderBy('username'),
|
||||
'userfields' => $this->getUserfieldsService()->GetFields('tasks')
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
public function TasksSettings(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function TasksSettings(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->renderPage($response, 'taskssettings');
|
||||
}
|
||||
|
@@ -72,9 +72,6 @@ class User
|
||||
$this->db = DatabaseService::getInstance()->GetDbConnection();
|
||||
}
|
||||
|
||||
/**
|
||||
* @var \LessQL\Database|null
|
||||
*/
|
||||
protected $db;
|
||||
|
||||
public static function PermissionList()
|
||||
@@ -83,16 +80,12 @@ class User
|
||||
return $user->getPermissionList();
|
||||
}
|
||||
|
||||
public static function checkPermission($request, string ...$permissions): void
|
||||
public static function checkPermission($request, string $permission): void
|
||||
{
|
||||
$user = new self();
|
||||
|
||||
foreach ($permissions as $permission)
|
||||
if (!$user->hasPermission($permission))
|
||||
{
|
||||
if (!$user->hasPermission($permission))
|
||||
{
|
||||
throw new PermissionMissingException($request, $permission);
|
||||
}
|
||||
throw new PermissionMissingException($request, $permission);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -3,10 +3,12 @@
|
||||
namespace Grocy\Controllers;
|
||||
|
||||
use Grocy\Controllers\Users\User;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
|
||||
class UsersApiController extends BaseApiController
|
||||
{
|
||||
public function AddPermission(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function AddPermission(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -29,7 +31,7 @@ class UsersApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function CreateUser(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function CreateUser(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_USERS_CREATE);
|
||||
$requestBody = $this->GetParsedAndFilteredRequestBody($request);
|
||||
@@ -50,7 +52,7 @@ class UsersApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function DeleteUser(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function DeleteUser(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_USERS_EDIT);
|
||||
try
|
||||
@@ -64,7 +66,7 @@ class UsersApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function EditUser(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function EditUser(Request $request, Response $response, array $args)
|
||||
{
|
||||
if ($args['userId'] == GROCY_USER_ID)
|
||||
{
|
||||
@@ -88,7 +90,7 @@ class UsersApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function GetUserSetting(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function GetUserSetting(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -101,7 +103,7 @@ class UsersApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function GetUserSettings(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function GetUserSettings(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -113,7 +115,7 @@ class UsersApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function GetUsers(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function GetUsers(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_USERS_READ);
|
||||
try
|
||||
@@ -126,7 +128,7 @@ class UsersApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function CurrentUser(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function CurrentUser(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -138,7 +140,7 @@ class UsersApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function ListPermissions(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function ListPermissions(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -159,7 +161,7 @@ class UsersApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function SetPermissions(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function SetPermissions(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -204,7 +206,7 @@ class UsersApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function SetUserSetting(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function SetUserSetting(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -219,7 +221,7 @@ class UsersApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function DeleteUserSetting(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function DeleteUserSetting(Request $request, Response $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@@ -3,10 +3,12 @@
|
||||
namespace Grocy\Controllers;
|
||||
|
||||
use Grocy\Controllers\Users\User;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
|
||||
class UsersController extends BaseController
|
||||
{
|
||||
public function PermissionList(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function PermissionList(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_USERS_READ);
|
||||
return $this->renderPage($response, 'userpermissions', [
|
||||
@@ -16,7 +18,7 @@ class UsersController extends BaseController
|
||||
]);
|
||||
}
|
||||
|
||||
public function UserEditForm(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function UserEditForm(Request $request, Response $response, array $args)
|
||||
{
|
||||
if ($args['userId'] == 'new')
|
||||
{
|
||||
@@ -46,7 +48,7 @@ class UsersController extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
public function UserSettings(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function UserSettings(Request $request, Response $response, array $args)
|
||||
{
|
||||
return $this->renderPage($response, 'usersettings', [
|
||||
'languages' => array_filter(scandir(__DIR__ . '/../localization'), function ($item) {
|
||||
@@ -60,7 +62,7 @@ class UsersController extends BaseController
|
||||
]);
|
||||
}
|
||||
|
||||
public function UsersList(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
public function UsersList(Request $request, Response $response, array $args)
|
||||
{
|
||||
User::checkPermission($request, User::PERMISSION_USERS_READ);
|
||||
return $this->renderPage($response, 'users', [
|
||||
|
@@ -1,15 +1,15 @@
|
||||
grocycode
|
||||
Grocycode
|
||||
==========
|
||||
|
||||
grocycode is, in essence, a simple way to reference to arbitrary grocy entities.
|
||||
Each grocycode includes a magic, an entitiy identifier, an id and an ordered set of extra data.
|
||||
It is supported to be entered anywhere grocy expects one to read a barcode, but can also reference
|
||||
grocy-internal properties like specific stock entries, or specific batteries.
|
||||
Grocycode is, in essence, a simple way to reference to arbitrary Grocy entities.
|
||||
Each Grocycode includes a magic, an entitiy identifier, an id and an ordered set of extra data.
|
||||
It is supported to be entered anywhere Grocy expects one to read a barcode, but can also reference
|
||||
Grocy-internal properties like specific stock entries, or specific batteries.
|
||||
|
||||
Serialization
|
||||
----
|
||||
|
||||
There are three mandatory parts in a grocycode:
|
||||
There are three mandatory parts in a Grocycode:
|
||||
|
||||
1. The magic `grcy`
|
||||
2. An entity identifer matching the regular expression `[a-z]+` (that is, lowercase english alphabet without any fancy accents, minimum length 1 character).
|
||||
|
@@ -6,8 +6,8 @@ To enable label printing, set `FEATURE_FLAG_LABEL_PRINTER` to `true`in your `con
|
||||
Why webhook?
|
||||
---
|
||||
|
||||
Label printers come in all shapes and forms, and your particular one is probably not the one used by the author of this feature. Also, grocy may does not have a
|
||||
direct connection to a local label printer (e.g. grocy is hosted in a cloud vps). Thus, a lightweight implementation is provided by grocy: whenever something
|
||||
Label printers come in all shapes and forms, and your particular one is probably not the one used by the author of this feature. Also, Grocy may does not have a
|
||||
direct connection to a local label printer (e.g. Grocy is hosted in a cloud vps). Thus, a lightweight implementation is provided by Grocy: whenever something
|
||||
should print, a POST request to a configured URL is made. The target then is responsible for label printing.
|
||||
|
||||
Reference implementation
|
||||
@@ -19,8 +19,8 @@ implemented into [a fork of brother_ql_web](https://github.com/mistressofjellyfi
|
||||
Webhook request
|
||||
---
|
||||
|
||||
Requests can be configured to be sent server-side (that is, from the machine hosting grocy through GuzzleHttp) or by an AJAX request directly from the browser.
|
||||
The latter is neccesary for situations where the grocy hosting machine cannot reach your label printer, however server-side requests are a bit faster and
|
||||
Requests can be configured to be sent server-side (that is, from the machine hosting Grocy through GuzzleHttp) or by an AJAX request directly from the browser.
|
||||
The latter is neccesary for situations where the Grocy hosting machine cannot reach your label printer, however server-side requests are a bit faster and
|
||||
tend to be more stable.
|
||||
|
||||
Both methods fire this request upon printing:
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"openapi": "3.0.0",
|
||||
"openapi": "3.1.0",
|
||||
"info": {
|
||||
"title": "grocy REST API",
|
||||
"title": "Grocy REST API",
|
||||
"description": "Authentication is done via API keys (header *GROCY-API-KEY* or same named query parameter), which you can manage [here](PlaceHolderManageApiKeysUrl).<br>Additionally requests from within the frontend are also valid (via session cookie).",
|
||||
"version": "xxx",
|
||||
"license": {
|
||||
@@ -60,7 +60,7 @@
|
||||
"paths": {
|
||||
"/system/info": {
|
||||
"get": {
|
||||
"summary": "Returns information about the installed grocy version, PHP runtime and OS",
|
||||
"summary": "Returns information about the installed Grocy version, PHP runtime and OS",
|
||||
"tags": [
|
||||
"System"
|
||||
],
|
||||
@@ -638,7 +638,7 @@
|
||||
"required": true,
|
||||
"description": "A valid object id of the given entity",
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -687,7 +687,7 @@
|
||||
"required": true,
|
||||
"description": "A valid object id of the given entity",
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -1550,7 +1550,7 @@
|
||||
},
|
||||
"/stock/entry/{entryId}/printlabel": {
|
||||
"get": {
|
||||
"summary": "Prints the grocycode / stock entry label of the given entry on the configured label printer",
|
||||
"summary": "Prints the Grocycode / stock entry label of the given entry on the configured label printer",
|
||||
"tags": [
|
||||
"Stock"
|
||||
],
|
||||
@@ -2281,7 +2281,7 @@
|
||||
},
|
||||
"/stock/products/{productId}/printlabel": {
|
||||
"get": {
|
||||
"summary": "Prints the grocycode label of the given product on the configured label printer",
|
||||
"summary": "Prints the Grocycode label of the given product on the configured label printer",
|
||||
"tags": [
|
||||
"Stock"
|
||||
],
|
||||
@@ -3582,7 +3582,7 @@
|
||||
},
|
||||
"/recipes/{recipeId}/printlabel": {
|
||||
"get": {
|
||||
"summary": "Prints the grocycode label of the given recipe on the configured label printer",
|
||||
"summary": "Prints the Grocycode label of the given recipe on the configured label printer",
|
||||
"tags": [
|
||||
"Recipes"
|
||||
],
|
||||
@@ -3855,7 +3855,7 @@
|
||||
},
|
||||
"/chores/{choreId}/printlabel": {
|
||||
"get": {
|
||||
"summary": "Prints the grocycode label of the given chore on the configured label printer",
|
||||
"summary": "Prints the Grocycode label of the given chore on the configured label printer",
|
||||
"tags": [
|
||||
"Chores"
|
||||
],
|
||||
@@ -4120,7 +4120,7 @@
|
||||
},
|
||||
"/batteries/{batteryId}/printlabel": {
|
||||
"get": {
|
||||
"summary": "Prints the grocycode label of the given battery on the configured label printer",
|
||||
"summary": "Prints the Grocycode label of the given battery on the configured label printer",
|
||||
"tags": [
|
||||
"Batteries"
|
||||
],
|
||||
@@ -4368,7 +4368,7 @@
|
||||
"in": "query",
|
||||
"name": "printHeader",
|
||||
"required": false,
|
||||
"description": "Prints grocy logo if true",
|
||||
"description": "Prints Grocy logo if true",
|
||||
"schema": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
@@ -4437,16 +4437,9 @@
|
||||
"product_group_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"qu_factor_purchase_to_stock": {
|
||||
"type": "number"
|
||||
},
|
||||
"tare_weight": {
|
||||
"type": "number"
|
||||
},
|
||||
"barcode": {
|
||||
"type": "string",
|
||||
"description": "Can contain multiple barcodes separated by comma"
|
||||
},
|
||||
"min_stock_amount": {
|
||||
"type": "number",
|
||||
"minimum": 0,
|
||||
@@ -4475,6 +4468,9 @@
|
||||
"treat_opened_as_out_of_stock": {
|
||||
"type": "integer"
|
||||
},
|
||||
"auto_reprint_stock_label": {
|
||||
"type": "integer"
|
||||
},
|
||||
"no_own_stock": {
|
||||
"type": "integer"
|
||||
},
|
||||
@@ -4499,8 +4495,6 @@
|
||||
"location_id": "4",
|
||||
"qu_id_purchase": "3",
|
||||
"qu_id_stock": "3",
|
||||
"qu_factor_purchase_to_stock": "1.0",
|
||||
"barcode": "cok1",
|
||||
"min_stock_amount": "8",
|
||||
"default_best_before_days": "0",
|
||||
"row_created_timestamp": "2019-05-02 20:12:26",
|
||||
@@ -4741,10 +4735,16 @@
|
||||
"product_barcodes": {
|
||||
"$ref": "#/components/schemas/ProductBarcode"
|
||||
},
|
||||
"quantity_unit_stock": {
|
||||
"$ref": "#/components/schemas/QuantityUnit"
|
||||
},
|
||||
"default_quantity_unit_purchase": {
|
||||
"$ref": "#/components/schemas/QuantityUnit"
|
||||
},
|
||||
"quantity_unit_stock": {
|
||||
"default_quantity_unit_consume": {
|
||||
"$ref": "#/components/schemas/QuantityUnit"
|
||||
},
|
||||
"quantity_unit_price": {
|
||||
"$ref": "#/components/schemas/QuantityUnit"
|
||||
},
|
||||
"last_purchased": {
|
||||
@@ -4800,6 +4800,14 @@
|
||||
},
|
||||
"default_location": {
|
||||
"$ref": "#/components/schemas/Location"
|
||||
},
|
||||
"qu_conversion_factor_purchase_to_stock": {
|
||||
"type": "number",
|
||||
"description": "The conversion factor of the corresponding QU conversion from the product's qu_id_purchase to qu_id_stock"
|
||||
},
|
||||
"qu_conversion_factor_price_to_stock": {
|
||||
"type": "number",
|
||||
"description": "The conversion factor of the corresponding QU conversion from the product's qu_id_price to qu_id_stock"
|
||||
}
|
||||
},
|
||||
"example": {
|
||||
@@ -4810,8 +4818,6 @@
|
||||
"location_id": "4",
|
||||
"qu_id_purchase": "3",
|
||||
"qu_id_stock": "3",
|
||||
"qu_factor_purchase_to_stock": "1.0",
|
||||
"barcode": "cok1",
|
||||
"min_stock_amount": "8",
|
||||
"default_best_before_days": "0",
|
||||
"row_created_timestamp": "2019-05-02 20:12:26",
|
||||
@@ -4853,6 +4859,14 @@
|
||||
"name_plural": "Packs",
|
||||
"plural_forms": null
|
||||
},
|
||||
"quantity_unit_price": {
|
||||
"id": "3",
|
||||
"name": "Pack",
|
||||
"description": null,
|
||||
"row_created_timestamp": "2019-05-02 20:12:25",
|
||||
"name_plural": "Packs",
|
||||
"plural_forms": null
|
||||
},
|
||||
"last_price": null,
|
||||
"avg_price": null,
|
||||
"current_price": null,
|
||||
@@ -5785,7 +5799,9 @@
|
||||
"chores_log",
|
||||
"meal_plan_sections",
|
||||
"products_last_purchased",
|
||||
"products_average_price"
|
||||
"products_average_price",
|
||||
"quantity_unit_conversions_resolved",
|
||||
"recipes_pos_resolved"
|
||||
]
|
||||
},
|
||||
"ExposedEntityNoListing": {
|
||||
@@ -5803,7 +5819,9 @@
|
||||
"stock_current_locations",
|
||||
"chores_log",
|
||||
"products_last_purchased",
|
||||
"products_average_price"
|
||||
"products_average_price",
|
||||
"quantity_unit_conversions_resolved",
|
||||
"recipes_pos_resolved"
|
||||
]
|
||||
},
|
||||
"ExposedEntityNoDelete": {
|
||||
@@ -5814,14 +5832,14 @@
|
||||
"stock_current_locations",
|
||||
"chores_log",
|
||||
"products_last_purchased",
|
||||
"products_average_price"
|
||||
"products_average_price",
|
||||
"quantity_unit_conversions_resolved",
|
||||
"recipes_pos_resolved"
|
||||
]
|
||||
},
|
||||
"ExposedEntityEditRequiresAdmin": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"api_keys"
|
||||
]
|
||||
"enum": []
|
||||
},
|
||||
"StockTransactionType": {
|
||||
"type": "string",
|
||||
|
@@ -63,7 +63,7 @@ class ConfigurationValidator
|
||||
private function checkMealplanFirstDayOfWeek()
|
||||
{
|
||||
if (!(GROCY_MEAL_PLAN_FIRST_DAY_OF_WEEK == '' ||
|
||||
(is_numeric(GROCY_MEAL_PLAN_FIRST_DAY_OF_WEEK) && GROCY_MEAL_PLAN_FIRST_DAY_OF_WEEK >= 0 && GROCY_MEAL_PLAN_FIRST_DAY_OF_WEEK <= 6)))
|
||||
(is_numeric(GROCY_MEAL_PLAN_FIRST_DAY_OF_WEEK) && GROCY_MEAL_PLAN_FIRST_DAY_OF_WEEK >= -1 && GROCY_MEAL_PLAN_FIRST_DAY_OF_WEEK <= 6)))
|
||||
{
|
||||
throw new EInvalidConfig('Invalid value for MEAL_PLAN_FIRST_DAY_OF_WEEK');
|
||||
}
|
||||
|
@@ -3,10 +3,10 @@
|
||||
namespace Grocy\Helpers;
|
||||
|
||||
/**
|
||||
* A class that abstracts grocycode.
|
||||
* A class that abstracts Grocycode.
|
||||
*
|
||||
* grocycode is a simple, easily serializable format to reference
|
||||
* stuff within grocy. It consists of n (n ≥ 3) double-colon seperated parts:
|
||||
* Grocycode is a simple, easily serializable format to reference
|
||||
* stuff within Grocy. It consists of n (n ≥ 3) double-colon seperated parts:
|
||||
*
|
||||
* 1. The magic `grcy`
|
||||
* 2. A type identifer, must match `[a-z]+` (i.e. only lowercase ascii, minimum length 1 character)
|
||||
@@ -27,12 +27,6 @@ class Grocycode
|
||||
|
||||
public const MAGIC = 'grcy';
|
||||
|
||||
/**
|
||||
* Constructs a new instance of the Grocycode class.
|
||||
*
|
||||
* Because php doesn't support overloading, this is a proxy
|
||||
* to either setFromCode($code) or setFromData($type, $id, $extra_data = []).
|
||||
*/
|
||||
public function __construct(...$args)
|
||||
{
|
||||
$argc = count($args);
|
||||
@@ -54,9 +48,6 @@ class Grocycode
|
||||
throw new \Exception('No suitable overload found.');
|
||||
}
|
||||
|
||||
/**
|
||||
* An array that registers all valid grocycode types. Register yours here by appending to this array.
|
||||
*/
|
||||
public static $Items = [self::PRODUCT, self::BATTERY, self::CHORE, self::RECIPE];
|
||||
|
||||
private $type;
|
||||
@@ -65,13 +56,6 @@ class Grocycode
|
||||
|
||||
private $extra_data = [];
|
||||
|
||||
/**
|
||||
* Validates a grocycode.
|
||||
*
|
||||
* Returns true, if a supplied $code is a valid grocycode, false otherwise.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function Validate(string $code)
|
||||
{
|
||||
try
|
||||
@@ -107,29 +91,23 @@ class Grocycode
|
||||
return implode(':', $arr);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a grocycode.
|
||||
*/
|
||||
private function setFromCode($code)
|
||||
{
|
||||
$parts = array_reverse(explode(':', $code));
|
||||
if (array_pop($parts) != self::MAGIC)
|
||||
{
|
||||
throw new \Exception('Not a grocycode');
|
||||
throw new \Exception('Not a Grocycode');
|
||||
}
|
||||
|
||||
if (!in_array($this->type = array_pop($parts), self::$Items))
|
||||
{
|
||||
throw new \Exception('Unknown grocycode type');
|
||||
throw new \Exception('Unknown Grocycode type');
|
||||
}
|
||||
|
||||
$this->id = array_pop($parts);
|
||||
$this->extra_data = array_reverse($parts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a grocycode from data.
|
||||
*/
|
||||
private function setFromData($type, $id, $extra_data = [])
|
||||
{
|
||||
if (!is_array($extra_data))
|
||||
@@ -138,7 +116,7 @@ class Grocycode
|
||||
}
|
||||
if (!in_array($type, self::$Items))
|
||||
{
|
||||
throw new \Exception('Unknown grocycode type');
|
||||
throw new \Exception('Unknown Grocycode type');
|
||||
}
|
||||
|
||||
$this->type = $type;
|
||||
|
@@ -9,12 +9,14 @@ const REQUIRED_PHP_EXTENSIONS = ['fileinfo', 'pdo_sqlite', 'gd', 'ctype', 'json'
|
||||
'filter', 'iconv', 'tokenizer'
|
||||
];
|
||||
|
||||
const REQUIRED_SQLITE_VERSION = '3.9.0';
|
||||
const REQUIRED_PHP_VERSION = '8.1.0';
|
||||
const REQUIRED_SQLITE_VERSION = '3.34.0';
|
||||
|
||||
class PrerequisiteChecker
|
||||
{
|
||||
public function checkRequirements()
|
||||
{
|
||||
self::checkForPhpVersion();
|
||||
self::checkForConfigFile();
|
||||
self::checkForConfigDistFile();
|
||||
self::checkForComposer();
|
||||
@@ -24,9 +26,9 @@ class PrerequisiteChecker
|
||||
|
||||
private function checkForComposer()
|
||||
{
|
||||
if (!file_exists(__DIR__ . '/../vendor/autoload.php'))
|
||||
if (!file_exists(__DIR__ . '/../packages/autoload.php'))
|
||||
{
|
||||
throw new ERequirementNotMet('/vendor/autoload.php not found. Have you run Composer?');
|
||||
throw new ERequirementNotMet('/packages/autoload.php not found. Have you run Composer?');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +51,6 @@ class PrerequisiteChecker
|
||||
private function checkForPhpExtensions()
|
||||
{
|
||||
$loadedExtensions = get_loaded_extensions();
|
||||
|
||||
foreach (REQUIRED_PHP_EXTENSIONS as $extension)
|
||||
{
|
||||
if (!in_array($extension, $loadedExtensions))
|
||||
@@ -62,13 +63,21 @@ class PrerequisiteChecker
|
||||
private function checkForSqliteVersion()
|
||||
{
|
||||
$sqliteVersion = self::getSqlVersionAsString();
|
||||
|
||||
if (version_compare($sqliteVersion, REQUIRED_SQLITE_VERSION, '<'))
|
||||
{
|
||||
throw new ERequirementNotMet('SQLite ' . REQUIRED_SQLITE_VERSION . ' is required, however you are running ' . $sqliteVersion);
|
||||
}
|
||||
}
|
||||
|
||||
private function checkForPhpVersion()
|
||||
{
|
||||
$phpVersion = phpversion();
|
||||
if (version_compare($phpVersion, REQUIRED_PHP_VERSION, '<'))
|
||||
{
|
||||
throw new ERequirementNotMet('PHP ' . REQUIRED_PHP_VERSION . ' is required, however you are running ' . $phpVersion);
|
||||
}
|
||||
}
|
||||
|
||||
private function getSqlVersionAsString()
|
||||
{
|
||||
$dbh = new PDO('sqlite::memory:');
|
||||
|
@@ -253,3 +253,12 @@ function string_ends_with($haystack, $needle)
|
||||
|
||||
return (substr($haystack, -$length) === $needle);
|
||||
}
|
||||
|
||||
global $GROCY_REQUIRED_FRONTEND_PACKAGES;
|
||||
$GROCY_REQUIRED_FRONTEND_PACKAGES = [];
|
||||
function require_frontend_packages(array $packages)
|
||||
{
|
||||
global $GROCY_REQUIRED_FRONTEND_PACKAGES;
|
||||
|
||||
$GROCY_REQUIRED_FRONTEND_PACKAGES = array_unique(array_merge($GROCY_REQUIRED_FRONTEND_PACKAGES, $packages));
|
||||
}
|
||||
|
@@ -1,6 +1,7 @@
|
||||
#
|
||||
# Translators:
|
||||
# gimy16 <gimy16@hotmail.com>, 2021
|
||||
# Carles Riera <blauigris@gmail.com>, 2022
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
@@ -8,8 +9,8 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-05-01T17:59:17+00:00\n"
|
||||
"PO-Revision-Date: 2019-09-17 10:45+0000\n"
|
||||
"Last-Translator: gimy16 <gimy16@hotmail.com>, 2021\n"
|
||||
"Language-Team: Catalan (https://www.transifex.com/grocy/teams/93189/ca/)\n"
|
||||
"Last-Translator: Carles Riera <blauigris@gmail.com>, 2022\n"
|
||||
"Language-Team: Catalan (https://app.transifex.com/grocy/teams/93189/ca/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
@@ -21,7 +22,7 @@ msgid "no-assignment"
|
||||
msgstr "sense actius"
|
||||
|
||||
msgid "who-least-did-first"
|
||||
msgstr ""
|
||||
msgstr "qui menys ha fet primer"
|
||||
|
||||
msgid "random"
|
||||
msgstr "aleatori"
|
||||
|
@@ -2,6 +2,7 @@
|
||||
# Translators:
|
||||
# Joan Rodas <joanrc93@gmail.com>, 2020
|
||||
# gimy16 <gimy16@hotmail.com>, 2021
|
||||
# Martí Gombau, 2023
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
@@ -9,8 +10,8 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-05-01T17:59:17+00:00\n"
|
||||
"PO-Revision-Date: 2019-05-01 17:42+0000\n"
|
||||
"Last-Translator: gimy16 <gimy16@hotmail.com>, 2021\n"
|
||||
"Language-Team: Catalan (https://www.transifex.com/grocy/teams/93189/ca/)\n"
|
||||
"Last-Translator: Martí Gombau, 2023\n"
|
||||
"Language-Team: Catalan (https://app.transifex.com/grocy/teams/93189/ca/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
@@ -34,7 +35,7 @@ msgid "yearly"
|
||||
msgstr "anual"
|
||||
|
||||
msgid "hourly"
|
||||
msgstr ""
|
||||
msgstr "cada hora"
|
||||
|
||||
msgid "adaptive"
|
||||
msgstr ""
|
||||
msgstr "adaptable"
|
||||
|
@@ -9,7 +9,7 @@ msgstr ""
|
||||
"POT-Creation-Date: 2019-05-01T17:59:17+00:00\n"
|
||||
"PO-Revision-Date: 2019-05-01 17:42+0000\n"
|
||||
"Last-Translator: Bernd Bestel <bernd@berrnd.de>, 2022\n"
|
||||
"Language-Team: Catalan (https://www.transifex.com/grocy/teams/93189/ca/)\n"
|
||||
"Language-Team: Catalan (https://app.transifex.com/grocy/teams/93189/ca/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
@@ -2,6 +2,7 @@
|
||||
# Translators:
|
||||
# Joan Rodas <joanrc93@gmail.com>, 2020
|
||||
# gimy16 <gimy16@hotmail.com>, 2021
|
||||
# Martí Gombau, 2023
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
@@ -9,8 +10,8 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-05-01T17:59:17+00:00\n"
|
||||
"PO-Revision-Date: 2019-05-01 17:42+0000\n"
|
||||
"Last-Translator: gimy16 <gimy16@hotmail.com>, 2021\n"
|
||||
"Language-Team: Catalan (https://www.transifex.com/grocy/teams/93189/ca/)\n"
|
||||
"Last-Translator: Martí Gombau, 2023\n"
|
||||
"Language-Team: Catalan (https://app.transifex.com/grocy/teams/93189/ca/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
@@ -28,10 +29,10 @@ msgid "Pantry"
|
||||
msgstr "rebost"
|
||||
|
||||
msgid "Candy cupboard"
|
||||
msgstr ""
|
||||
msgstr "Armari de les llaminadures"
|
||||
|
||||
msgid "Tinned food cupboard"
|
||||
msgstr ""
|
||||
msgstr "Armari de les conserves"
|
||||
|
||||
msgid "Fridge"
|
||||
msgstr "Nevera"
|
||||
@@ -63,14 +64,14 @@ msgstr[1] "Llaunes"
|
||||
|
||||
msgid "Bunch"
|
||||
msgid_plural "Bunches"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
msgstr[0] "Ram"
|
||||
msgstr[1] "Rams"
|
||||
|
||||
msgid "Gummy bears"
|
||||
msgstr ""
|
||||
msgstr "Ossets de gominoles"
|
||||
|
||||
msgid "Crisps"
|
||||
msgstr ""
|
||||
msgstr "Xips"
|
||||
|
||||
msgid "Eggs"
|
||||
msgstr "Ous"
|
||||
@@ -106,10 +107,10 @@ msgid "Tomato"
|
||||
msgstr "Tomàquet"
|
||||
|
||||
msgid "Change towels in the bathroom"
|
||||
msgstr ""
|
||||
msgstr "Cambiar tovalloles del bany"
|
||||
|
||||
msgid "Mop the kitchen floor"
|
||||
msgstr ""
|
||||
msgstr "Fregar el terra de la cuina"
|
||||
|
||||
msgid "Warranty ends"
|
||||
msgstr "S'acaba la garantia"
|
||||
@@ -121,10 +122,10 @@ msgid "Alarm clock"
|
||||
msgstr "Alarma"
|
||||
|
||||
msgid "Heat remote control"
|
||||
msgstr ""
|
||||
msgstr "Control remot de la calefacció"
|
||||
|
||||
msgid "Take out the trash"
|
||||
msgstr ""
|
||||
msgstr "Llençar les escombraries"
|
||||
|
||||
msgid "Some good snacks"
|
||||
msgstr "Uns bons aperitius"
|
||||
@@ -133,7 +134,7 @@ msgid "Pizza dough"
|
||||
msgstr "Massa de pizza"
|
||||
|
||||
msgid "Sieved tomatoes"
|
||||
msgstr ""
|
||||
msgstr "Tomàquets tamisats"
|
||||
|
||||
msgid "Salami"
|
||||
msgstr "Salami"
|
||||
@@ -163,7 +164,7 @@ msgid "Italian"
|
||||
msgstr "Italià"
|
||||
|
||||
msgid "This is the note content of the recipe ingredient"
|
||||
msgstr ""
|
||||
msgstr "Aquest és el contingut de la nota de l'ingredient de la recepta"
|
||||
|
||||
msgid "Demo User"
|
||||
msgstr "Usuari de prova"
|
||||
@@ -177,7 +178,7 @@ msgid "Flour"
|
||||
msgstr "Farina"
|
||||
|
||||
msgid "Pancakes"
|
||||
msgstr ""
|
||||
msgstr "Panqueques"
|
||||
|
||||
msgid "Sugar"
|
||||
msgstr "Sucre"
|
||||
@@ -222,7 +223,7 @@ msgid "Milk"
|
||||
msgstr "Llet"
|
||||
|
||||
msgid "Chocolate sauce"
|
||||
msgstr ""
|
||||
msgstr "Salsa de xocolata"
|
||||
|
||||
msgid "Milliliters"
|
||||
msgstr "Mil·lilitres"
|
||||
@@ -249,13 +250,13 @@ msgid "Russian"
|
||||
msgstr "Rus"
|
||||
|
||||
msgid "Vacuum the living room floor"
|
||||
msgstr ""
|
||||
msgstr "Passar l'aspirador al terra del menjador"
|
||||
|
||||
msgid "Clean the litter box"
|
||||
msgstr ""
|
||||
msgstr "Netejar el cubell de la brossa"
|
||||
|
||||
msgid "Change the bed sheets"
|
||||
msgstr ""
|
||||
msgstr "Canviar els llençols"
|
||||
|
||||
msgid "Swedish"
|
||||
msgstr "Suec"
|
||||
@@ -367,16 +368,48 @@ msgid "Finnish"
|
||||
msgstr "Finès"
|
||||
|
||||
msgid "Breakfast"
|
||||
msgstr ""
|
||||
msgstr "Esmorzar"
|
||||
|
||||
msgid "Lunch"
|
||||
msgstr ""
|
||||
msgstr "Dinar"
|
||||
|
||||
msgid "Dinner"
|
||||
msgstr ""
|
||||
msgstr "Sopar"
|
||||
|
||||
msgid "Catalan"
|
||||
msgstr ""
|
||||
msgstr "Català "
|
||||
|
||||
msgid "Slovenian"
|
||||
msgstr "Eslovè "
|
||||
|
||||
msgid "Lithuanian"
|
||||
msgstr "Lituà "
|
||||
|
||||
msgid "Ukrainian"
|
||||
msgstr "Ucrania"
|
||||
|
||||
msgid "Kilogram"
|
||||
msgid_plural "Kilograms"
|
||||
msgstr[0] "Kilogram"
|
||||
msgstr[1] "Kilograms"
|
||||
|
||||
msgid "Romanian"
|
||||
msgstr "Romanès "
|
||||
|
||||
msgid "Pint"
|
||||
msgstr ""
|
||||
|
||||
msgid "Beverages"
|
||||
msgstr ""
|
||||
|
||||
msgid "Ice Cream"
|
||||
msgstr ""
|
||||
|
||||
msgid "Soda"
|
||||
msgstr ""
|
||||
|
||||
msgid "Beer"
|
||||
msgstr ""
|
||||
|
||||
msgid "Estonian"
|
||||
msgstr ""
|
||||
|
@@ -1,11 +1,15 @@
|
||||
#
|
||||
# Translators:
|
||||
# Martí Gombau, 2023
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-05-01T17:59:17+00:00\n"
|
||||
"PO-Revision-Date: 2020-08-31 19:11+0000\n"
|
||||
"Language-Team: Catalan (https://www.transifex.com/grocy/teams/93189/ca/)\n"
|
||||
"Last-Translator: Martí Gombau, 2023\n"
|
||||
"Language-Team: Catalan (https://app.transifex.com/grocy/teams/93189/ca/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
@@ -15,112 +19,128 @@ msgstr ""
|
||||
|
||||
# Czech
|
||||
msgid "cs"
|
||||
msgstr ""
|
||||
msgstr "cs"
|
||||
|
||||
# Danish
|
||||
msgid "da"
|
||||
msgstr ""
|
||||
msgstr "da"
|
||||
|
||||
# German
|
||||
msgid "de"
|
||||
msgstr ""
|
||||
msgstr "de"
|
||||
|
||||
# Greek
|
||||
msgid "el_GR"
|
||||
msgstr ""
|
||||
msgstr "el_GR"
|
||||
|
||||
# English
|
||||
msgid "en"
|
||||
msgstr ""
|
||||
msgstr "en"
|
||||
|
||||
# English (Great Britain)
|
||||
msgid "en_GB"
|
||||
msgstr ""
|
||||
msgstr "en_GB"
|
||||
|
||||
# Spanish
|
||||
msgid "es"
|
||||
msgstr ""
|
||||
msgstr "es"
|
||||
|
||||
# French
|
||||
msgid "fr"
|
||||
msgstr ""
|
||||
msgstr "fr"
|
||||
|
||||
# Hungarian
|
||||
msgid "hu"
|
||||
msgstr ""
|
||||
msgstr "hu"
|
||||
|
||||
# Italian
|
||||
msgid "it"
|
||||
msgstr ""
|
||||
msgstr "lt"
|
||||
|
||||
# Japanese
|
||||
msgid "ja"
|
||||
msgstr ""
|
||||
msgstr "ja"
|
||||
|
||||
# Korean
|
||||
msgid "ko_KR"
|
||||
msgstr ""
|
||||
msgstr "ko_KR"
|
||||
|
||||
# Dutch
|
||||
msgid "nl"
|
||||
msgstr ""
|
||||
msgstr "nl"
|
||||
|
||||
# Norwegian
|
||||
msgid "no"
|
||||
msgstr ""
|
||||
msgstr "no"
|
||||
|
||||
# Polish
|
||||
msgid "pl"
|
||||
msgstr ""
|
||||
msgstr "pl"
|
||||
|
||||
# Portuguese (Brazil)
|
||||
msgid "pt_BR"
|
||||
msgstr ""
|
||||
msgstr "pt_BR"
|
||||
|
||||
# Portuguese (Portugal)
|
||||
msgid "pt_PT"
|
||||
msgstr ""
|
||||
msgstr "pt_PT"
|
||||
|
||||
# Russian
|
||||
msgid "ru"
|
||||
msgstr ""
|
||||
msgstr "ru"
|
||||
|
||||
# Slovak
|
||||
msgid "sk_SK"
|
||||
msgstr ""
|
||||
msgstr "sk_SK"
|
||||
|
||||
# Slovenian
|
||||
msgid "sl"
|
||||
msgstr ""
|
||||
msgstr "sl"
|
||||
|
||||
# Swedish
|
||||
msgid "sv_SE"
|
||||
msgstr ""
|
||||
msgstr "sv_SE"
|
||||
|
||||
# Turkish
|
||||
msgid "tr"
|
||||
msgstr ""
|
||||
msgstr "tr"
|
||||
|
||||
# Chinese (Taiwan)
|
||||
msgid "zh_TW"
|
||||
msgstr ""
|
||||
msgstr "zh_TW"
|
||||
|
||||
# Chinese (China)
|
||||
msgid "zh_CN"
|
||||
msgstr ""
|
||||
msgstr "zh_CN"
|
||||
|
||||
# Hebrew (Israel)
|
||||
msgid "he_IL"
|
||||
msgstr ""
|
||||
msgstr "he_IL"
|
||||
|
||||
# Tamil
|
||||
msgid "ta"
|
||||
msgstr ""
|
||||
msgstr "ta"
|
||||
|
||||
# Finnish
|
||||
msgid "fi"
|
||||
msgstr ""
|
||||
msgstr "fl"
|
||||
|
||||
# Catalan
|
||||
msgid "ca"
|
||||
msgstr "ca"
|
||||
|
||||
# Lithuanian
|
||||
msgid "lt"
|
||||
msgstr "it"
|
||||
|
||||
# Ukrainian
|
||||
msgid "uk"
|
||||
msgstr "uk"
|
||||
|
||||
# Romanian
|
||||
msgid "ro_RO"
|
||||
msgstr "ro_RO"
|
||||
|
||||
# Estonian
|
||||
msgid "et_EE"
|
||||
msgstr ""
|
||||
|
@@ -1,6 +1,7 @@
|
||||
#
|
||||
# Translators:
|
||||
# gimy16 <gimy16@hotmail.com>, 2021
|
||||
# Martí Gombau, 2023
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
@@ -8,8 +9,8 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-05-01T17:59:17+00:00\n"
|
||||
"PO-Revision-Date: 2020-08-29 16:33+0000\n"
|
||||
"Last-Translator: gimy16 <gimy16@hotmail.com>, 2021\n"
|
||||
"Language-Team: Catalan (https://www.transifex.com/grocy/teams/93189/ca/)\n"
|
||||
"Last-Translator: Martí Gombau, 2023\n"
|
||||
"Language-Team: Catalan (https://app.transifex.com/grocy/teams/93189/ca/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
@@ -55,7 +56,7 @@ msgstr "EXECUCIÓ-NO-REALITZADA-DE-LA-FEINA"
|
||||
|
||||
# Edit master data
|
||||
msgid "MASTER_DATA_EDIT"
|
||||
msgstr ""
|
||||
msgstr "EDICIO_DADES_MESTRES"
|
||||
|
||||
# Undo execution
|
||||
msgid "TASKS_UNDO_EXECUTION"
|
||||
@@ -95,7 +96,7 @@ msgstr "ELEMENTS_AFEGITS_DE_LA_LLISTA_DE_LA_COMPRA"
|
||||
|
||||
# Remove items
|
||||
msgid "SHOPPINGLIST_ITEMS_DELETE"
|
||||
msgstr ""
|
||||
msgstr "ELIMINAR_ELEMENTS_LLISTA_DE_LA_COMPRA"
|
||||
|
||||
# User management
|
||||
msgid "USERS"
|
||||
|
@@ -9,7 +9,7 @@ msgstr ""
|
||||
"POT-Creation-Date: 2019-05-01T17:59:17+00:00\n"
|
||||
"PO-Revision-Date: 2019-05-01 17:42+0000\n"
|
||||
"Last-Translator: gimy16 <gimy16@hotmail.com>, 2021\n"
|
||||
"Language-Team: Catalan (https://www.transifex.com/grocy/teams/93189/ca/)\n"
|
||||
"Language-Team: Catalan (https://app.transifex.com/grocy/teams/93189/ca/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
@@ -3,6 +3,7 @@
|
||||
# Joan Rodas <joanrc93@gmail.com>, 2020
|
||||
# Carles Riera <blauigris@gmail.com>, 2021
|
||||
# jorclaret, 2022
|
||||
# Martí Gombau, 2023
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
@@ -10,8 +11,8 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-05-01T17:59:17+00:00\n"
|
||||
"PO-Revision-Date: 2019-05-01 17:42+0000\n"
|
||||
"Last-Translator: jorclaret, 2022\n"
|
||||
"Language-Team: Catalan (https://www.transifex.com/grocy/teams/93189/ca/)\n"
|
||||
"Last-Translator: Martí Gombau, 2023\n"
|
||||
"Language-Team: Catalan (https://app.transifex.com/grocy/teams/93189/ca/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
@@ -214,9 +215,6 @@ msgstr "Unitat predeterminada"
|
||||
msgid "Quantity unit stock"
|
||||
msgstr "Unitat d'inventari"
|
||||
|
||||
msgid "Factor purchase to stock quantity unit"
|
||||
msgstr "Factor d'unitat de compra a unitat d'inteventari"
|
||||
|
||||
msgid "Create location"
|
||||
msgstr "Afegir ubicació"
|
||||
|
||||
@@ -271,10 +269,6 @@ msgstr "mai"
|
||||
msgid "Add products that are below defined min. stock amount"
|
||||
msgstr "Afegeix productes que estan per sota de les existències mínimes"
|
||||
|
||||
msgid "This means 1 %1$s purchased will be converted into %2$s %3$s in stock"
|
||||
msgstr ""
|
||||
"Això significa que 1 %1$s comprat es convertiran en %2$s %3$s en l'inventari"
|
||||
|
||||
msgid "Login"
|
||||
msgstr "Iniciar sessió"
|
||||
|
||||
@@ -362,8 +356,8 @@ msgstr "Això vol dir que s'eliminaran %s de l'inventari"
|
||||
msgid "Removed %1$s of %2$s from stock"
|
||||
msgstr "%1$s de %2$s eliminats de l'inventari"
|
||||
|
||||
msgid "About grocy"
|
||||
msgstr "Sobre el grocy"
|
||||
msgid "About Grocy"
|
||||
msgstr ""
|
||||
|
||||
msgid "Close"
|
||||
msgstr "Tancar"
|
||||
@@ -714,6 +708,7 @@ msgstr "Mantenir-se connectat permanentment"
|
||||
|
||||
msgid "When not set, you will get logged out at latest after 30 days"
|
||||
msgstr ""
|
||||
"Si no s'estableix, es tancarà la sessió com a molt tard al cap de 30 dies"
|
||||
|
||||
msgid "Status"
|
||||
msgstr "Estat"
|
||||
@@ -746,7 +741,7 @@ msgid "To"
|
||||
msgstr "A"
|
||||
|
||||
msgid "Time range goes over midnight"
|
||||
msgstr ""
|
||||
msgstr "L'interval de temps supera la mitjanit"
|
||||
|
||||
msgid "Product picture"
|
||||
msgstr "Imatge del producte"
|
||||
@@ -767,22 +762,22 @@ msgid "Deletion not possible"
|
||||
msgstr "No es pot eliminar"
|
||||
|
||||
msgid "Equipment"
|
||||
msgstr ""
|
||||
msgstr "Equipament"
|
||||
|
||||
msgid "Instruction manual"
|
||||
msgstr "Manual d'instruccions"
|
||||
|
||||
msgid "The selected equipment has no instruction manual"
|
||||
msgstr ""
|
||||
msgstr "L'equipament seleccionat no té cap manual d'instruccions"
|
||||
|
||||
msgid "Notes"
|
||||
msgstr "Notes"
|
||||
|
||||
msgid "Edit equipment"
|
||||
msgstr ""
|
||||
msgstr "Editar equipament"
|
||||
|
||||
msgid "Create equipment"
|
||||
msgstr ""
|
||||
msgstr "Crear equipament"
|
||||
|
||||
msgid "The current file will be deleted on save"
|
||||
msgstr "L'arxiu actual serà eliminat al guardar"
|
||||
@@ -791,7 +786,7 @@ msgid "No picture available"
|
||||
msgstr "Imatge no disponible"
|
||||
|
||||
msgid "Presets for new products"
|
||||
msgstr ""
|
||||
msgstr "Paràmetres per defecte per a nous productes"
|
||||
|
||||
msgid "Included recipes"
|
||||
msgstr "Receptes incloses"
|
||||
@@ -812,16 +807,16 @@ msgid "This will be used as a headline to group ingredients together"
|
||||
msgstr "Això serà utilitzat de capçalera per a agrupar ingredients"
|
||||
|
||||
msgid "Journal"
|
||||
msgstr ""
|
||||
msgstr "Diari"
|
||||
|
||||
msgid "Stock journal"
|
||||
msgstr ""
|
||||
msgstr "Diari d'existències"
|
||||
|
||||
msgid "Undone on"
|
||||
msgstr "Desfet a "
|
||||
|
||||
msgid "Batteries journal"
|
||||
msgstr ""
|
||||
msgstr "Diari de bateries"
|
||||
|
||||
msgid "Undo charge cycle"
|
||||
msgstr "Desfer cicle de càrrega"
|
||||
@@ -836,13 +831,13 @@ msgid "Undo"
|
||||
msgstr "Desfer"
|
||||
|
||||
msgid "Booking successfully undone"
|
||||
msgstr ""
|
||||
msgstr "Reserva anul·lada correctament"
|
||||
|
||||
msgid "Charge cycle successfully undone"
|
||||
msgstr "Cicle de càrrrega desfet correctament"
|
||||
|
||||
msgid "Disable stock fulfillment checking for this ingredient"
|
||||
msgstr ""
|
||||
msgstr "Deshabilitar la comprovació d'existències per aquest ingredient"
|
||||
|
||||
msgid "Add all list items to stock"
|
||||
msgstr "Afegeix tots els elements de la llista a les existències"
|
||||
@@ -880,16 +875,16 @@ msgid "%s opened"
|
||||
msgstr "%s obert"
|
||||
|
||||
msgid "Product due"
|
||||
msgstr ""
|
||||
msgstr "Venciment de producte"
|
||||
|
||||
msgid "Task due"
|
||||
msgstr ""
|
||||
msgstr "Venciment de tasca"
|
||||
|
||||
msgid "Chore due"
|
||||
msgstr ""
|
||||
msgstr "Venciment de feina"
|
||||
|
||||
msgid "Battery charge cycle due"
|
||||
msgstr ""
|
||||
msgstr "Venciment de cicle de càrrega de bateria"
|
||||
|
||||
msgid "Show clock in header"
|
||||
msgstr "Mostra la hora a la capçalera"
|
||||
@@ -951,7 +946,7 @@ msgstr ""
|
||||
"format iCal"
|
||||
|
||||
msgid "Enable tare weight handling"
|
||||
msgstr ""
|
||||
msgstr "Habilitar el maneig de la tara"
|
||||
|
||||
msgid ""
|
||||
"This is useful e.g. for flour in jars - on purchase/consume/inventory you "
|
||||
@@ -966,6 +961,8 @@ msgid ""
|
||||
"Tare weight handling enabled - please weigh the whole container, the amount "
|
||||
"to be posted will be automatically calculcated"
|
||||
msgstr ""
|
||||
"Maneig de la tara habilitat - si us plau pesa tot el contenidor, la "
|
||||
"quantitat publicada es calcularà automàticament"
|
||||
|
||||
msgid "You have to select a location"
|
||||
msgstr "Cal seleccionar una ubicació"
|
||||
@@ -983,7 +980,7 @@ msgid "The current picture will be deleted on save"
|
||||
msgstr "La imathe actual serà eliminada al guardar"
|
||||
|
||||
msgid "Journal for this battery"
|
||||
msgstr ""
|
||||
msgstr "Diari per aquesta bateria"
|
||||
|
||||
msgid "System info"
|
||||
msgstr "Informació de sistema"
|
||||
@@ -1003,6 +1000,8 @@ msgstr "Quantitat de productes"
|
||||
msgid ""
|
||||
"Type a new product name or barcode and hit TAB or ENTER to start a workflow"
|
||||
msgstr ""
|
||||
"Escriu un nom o un codi de barres per al nou producte i prem TAB o ENTER "
|
||||
"per començar un flux de treball"
|
||||
|
||||
msgid ""
|
||||
"This will be used as the default setting when adding this product as a "
|
||||
@@ -1036,7 +1035,7 @@ msgid "Create shopping list"
|
||||
msgstr "Crear llista de la compra"
|
||||
|
||||
msgid "Are you sure to delete shopping list \"%s\"?"
|
||||
msgstr ""
|
||||
msgstr "Estàs segur d'eliminar la llista de la compra \"%s\"?"
|
||||
|
||||
msgid "Average shelf life"
|
||||
msgstr "Temps de vida mitjà de l'inventari"
|
||||
@@ -1087,7 +1086,7 @@ msgid "Entity"
|
||||
msgstr "Entitat"
|
||||
|
||||
msgid "Caption"
|
||||
msgstr ""
|
||||
msgstr "Títol"
|
||||
|
||||
msgid "Type"
|
||||
msgstr "Tipus"
|
||||
@@ -1099,7 +1098,7 @@ msgid "A entity is required"
|
||||
msgstr "Es requereix una entitat"
|
||||
|
||||
msgid "A caption is required"
|
||||
msgstr ""
|
||||
msgstr "Es requereix un títol"
|
||||
|
||||
msgid "A type is required"
|
||||
msgstr "Es requereix un tipus"
|
||||
@@ -1117,10 +1116,10 @@ msgid "Plural forms"
|
||||
msgstr "Formes plurals"
|
||||
|
||||
msgid "One plural form per line, the current language requires"
|
||||
msgstr ""
|
||||
msgstr "Una forma plural per línia, requereix la llengua actual"
|
||||
|
||||
msgid "Plural count"
|
||||
msgstr ""
|
||||
msgstr "Recompte plural"
|
||||
|
||||
msgid "Plural rule"
|
||||
msgstr "Norma de plural"
|
||||
@@ -1163,6 +1162,8 @@ msgstr "Només seguiment de data"
|
||||
|
||||
msgid "When enabled only the day of an execution is tracked, not the time"
|
||||
msgstr ""
|
||||
"Si s'habilita, només es farà el seguiment del dia d'una execució, no pas "
|
||||
"l'hora"
|
||||
|
||||
msgid "Consume %1$s of %2$s"
|
||||
msgstr "Consumir %1$s de %2$s"
|
||||
@@ -1192,6 +1193,7 @@ msgstr "Tasca %s marcada com a completada en %s"
|
||||
|
||||
msgid "Booking has subsequent dependent bookings, undo not possible"
|
||||
msgstr ""
|
||||
"La reserva té reserves posteriors dependents, l'anul·lació no és possible"
|
||||
|
||||
msgid "per serving"
|
||||
msgstr "per ració"
|
||||
@@ -1211,7 +1213,7 @@ msgid "Undo task"
|
||||
msgstr "Desfer tasca"
|
||||
|
||||
msgid "Due date rollover"
|
||||
msgstr ""
|
||||
msgstr "transferència de la data de venciment"
|
||||
|
||||
msgid ""
|
||||
"When enabled the chore can never be overdue, the due date will shift forward"
|
||||
@@ -1244,7 +1246,7 @@ msgid "Time of printing"
|
||||
msgstr "Hora d'impressi"
|
||||
|
||||
msgid "Are you sure to delete equipment \"%s\"?"
|
||||
msgstr ""
|
||||
msgstr "Estàs segur d'eliminar l'equipament \"%s\"?"
|
||||
|
||||
msgid "Parent product"
|
||||
msgstr "Producte pare"
|
||||
@@ -1286,11 +1288,8 @@ msgstr "Significa que 1 %1$s equival a %2$s %3$s"
|
||||
msgid "QU conversions"
|
||||
msgstr "Conversions QU"
|
||||
|
||||
msgid "Product overrides"
|
||||
msgstr ""
|
||||
|
||||
msgid "Override for product"
|
||||
msgstr ""
|
||||
msgstr "Anul·lació del producte"
|
||||
|
||||
msgid "This equals %1$s %2$s"
|
||||
msgstr "Equival %1$s %2$s"
|
||||
@@ -1299,10 +1298,10 @@ msgid "Edit QU conversion"
|
||||
msgstr "Edita conversió QU"
|
||||
|
||||
msgid "An assignment type is required"
|
||||
msgstr ""
|
||||
msgstr "Es requereix un tipus d'assignació "
|
||||
|
||||
msgid "Assignment type"
|
||||
msgstr ""
|
||||
msgstr "Tipus d'assignació "
|
||||
|
||||
msgid ""
|
||||
"This means the next execution of this chore is scheduled at the same time "
|
||||
@@ -1342,6 +1341,7 @@ msgstr[1] ""
|
||||
|
||||
msgid "This means the next execution of this chore is not scheduled"
|
||||
msgstr ""
|
||||
"Això significa que l'execució següent d'aquesta feina no està programada"
|
||||
|
||||
msgid ""
|
||||
"This means the next execution of this chore will not be assigned to anyone"
|
||||
@@ -1439,8 +1439,8 @@ msgstr ""
|
||||
msgid "Price factor"
|
||||
msgstr "Factor de preu"
|
||||
|
||||
msgid "Do you find grocy useful?"
|
||||
msgstr "Trobes grocy útil?"
|
||||
msgid "Do you find Grocy useful?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Say thanks"
|
||||
msgstr "Dir gràcies"
|
||||
@@ -1457,8 +1457,8 @@ msgstr "Afegit %1$s de %2$s a la llista de la compra \"%3$s\""
|
||||
msgid "Output"
|
||||
msgstr "Resultat"
|
||||
|
||||
msgid "Energy (kcal)"
|
||||
msgstr "Energia (kcal)"
|
||||
msgid "Energy"
|
||||
msgstr ""
|
||||
|
||||
msgid "Per stock quantity unit"
|
||||
msgstr "Per unitat d'existències"
|
||||
@@ -1566,10 +1566,8 @@ msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Camera access is only possible when supported and allowed by your browser "
|
||||
"and when grocy is served via a secure (https://) connection"
|
||||
"and when Grocy is served via a secure (https://) connection"
|
||||
msgstr ""
|
||||
"L'accés a la càmera només és possible quan és suportat i permès per el teu "
|
||||
"navegador i quan Grocy és servit a través d'una connexió segura (https)"
|
||||
|
||||
msgid "Keep screen on"
|
||||
msgstr "Mantenir la pantalla activa"
|
||||
@@ -1878,8 +1876,8 @@ msgstr "Hora de la transacció"
|
||||
msgid "Chore journal"
|
||||
msgstr ""
|
||||
|
||||
msgid "Track chore execution"
|
||||
msgstr "Seguiment d'execució de tasques"
|
||||
msgid "Track next chore schedule"
|
||||
msgstr ""
|
||||
|
||||
msgid "Mark task as completed"
|
||||
msgstr "Marcar tasca com a completada"
|
||||
@@ -1903,11 +1901,9 @@ msgid "Show a QR-Code for this API key"
|
||||
msgstr "Mostra codi QR per a aquesta clau API"
|
||||
|
||||
msgid ""
|
||||
"This is the default quantity unit used when adding this product to the "
|
||||
"shopping list"
|
||||
"This is the default quantity unit used on purchase and when adding this "
|
||||
"product to the shopping list"
|
||||
msgstr ""
|
||||
"La unitat per defecte quan s'afegeix aquest producte a la llista de la "
|
||||
"compra"
|
||||
|
||||
msgid ""
|
||||
"Show a warning when the due date of the purchased product is earlier than "
|
||||
@@ -1930,12 +1926,14 @@ msgid "Quick consume amount"
|
||||
msgstr "Consumir ràpidament"
|
||||
|
||||
msgid ""
|
||||
"This amount is used for the \"quick consume/open buttons\" on the stock "
|
||||
"overview page (related to quantity unit stock)"
|
||||
"This amount is used for the \"quick consume button\" on the stock overview "
|
||||
"page (related to quantity unit stock)"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"This amount is used for the \"quick open button\" on the stock overview page"
|
||||
" (related to quantity unit stock)"
|
||||
msgstr ""
|
||||
"Aquesta quantitat és utilitzada per els botons \"consumir/obrir ràpidament\""
|
||||
" en la pàgina principal de revisió d'existències (relacionada amb la "
|
||||
"quantitat d'existències)"
|
||||
|
||||
msgid "Copy"
|
||||
msgstr "Copiar"
|
||||
@@ -2200,23 +2198,20 @@ msgstr "Opcions d'impressió"
|
||||
msgid "A product or a note is required"
|
||||
msgstr "Es requereix un producte o nota"
|
||||
|
||||
msgid "grocycode"
|
||||
msgstr "grocycode"
|
||||
msgid "Grocycode"
|
||||
msgstr ""
|
||||
|
||||
msgid "Download"
|
||||
msgstr "Descàrrega"
|
||||
|
||||
# Example: Download *Product* grocycode
|
||||
msgid "Download %s grocycode"
|
||||
msgstr "Descarregar grocycode %s"
|
||||
# Example: Download *Product* Grocycode
|
||||
msgid "Download %s Grocycode"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"grocycode is a unique referer to this %s in your grocy instance - print it "
|
||||
"Grocycode is a unique referer to this %s in your Grocy instance - print it "
|
||||
"onto a label and scan it like any other barcode"
|
||||
msgstr ""
|
||||
"grocycode és una referència única a aquest %s en la teva instància de grocy "
|
||||
"- imprimeix-la en una etiqueta i escaneja-la com qualsevol altre codi de "
|
||||
"barres"
|
||||
|
||||
# Abbreviation for "due date"
|
||||
msgid "DD"
|
||||
@@ -2243,9 +2238,9 @@ msgstr "Etiqueta per unitat"
|
||||
msgid "Error while executing WebHook"
|
||||
msgstr "Error a l'executar el WebHook"
|
||||
|
||||
# Example: Print *Product* grocycode on label printer
|
||||
msgid "Print %s grocycode on label printer"
|
||||
msgstr "Imprimir el grocycode %s en una impressora d'etiquetes"
|
||||
# Example: Print *Product* Grocycode on label printer
|
||||
msgid "Print %s Grocycode on label printer"
|
||||
msgstr ""
|
||||
|
||||
msgid "Open stock entry label in new window"
|
||||
msgstr ""
|
||||
@@ -2560,3 +2555,104 @@ msgstr ""
|
||||
|
||||
msgid "Decimal places allowed for prices (display)"
|
||||
msgstr ""
|
||||
|
||||
msgid "Clear done items"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"This shows all to this product directly or indirectly related quantity units"
|
||||
" and their derived conversion factors"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show resolved conversions"
|
||||
msgstr ""
|
||||
|
||||
msgid "QU conversions resolved"
|
||||
msgstr ""
|
||||
|
||||
msgid "Product specifc QU conversions"
|
||||
msgstr ""
|
||||
|
||||
msgid "Default quantity unit consume"
|
||||
msgstr ""
|
||||
|
||||
msgid "This is the default quantity unit used when consuming this product"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add to meal plan"
|
||||
msgstr ""
|
||||
|
||||
msgid "Successfully added the recipe to the meal plan"
|
||||
msgstr ""
|
||||
|
||||
msgid "Reprint stock entry label"
|
||||
msgstr ""
|
||||
|
||||
msgid "Auto reprint stock entry label"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"When enabled, auto-changing the due date of a stock entry (by "
|
||||
"opening/freezing/thawing and having corresponding default due days set) will"
|
||||
" reprint its label"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quick open amount"
|
||||
msgstr ""
|
||||
|
||||
msgid "Track chore execution now"
|
||||
msgstr ""
|
||||
|
||||
msgid "Total"
|
||||
msgstr ""
|
||||
|
||||
msgid "Apply"
|
||||
msgstr ""
|
||||
|
||||
msgid "Custom range"
|
||||
msgstr ""
|
||||
|
||||
msgid "Yesterday"
|
||||
msgstr ""
|
||||
|
||||
msgid "Last %1$s day"
|
||||
msgid_plural "Last %1$s days"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
msgid "This month"
|
||||
msgstr ""
|
||||
|
||||
msgid "Last month"
|
||||
msgstr ""
|
||||
|
||||
msgid "This year"
|
||||
msgstr ""
|
||||
|
||||
msgid "Last year"
|
||||
msgstr ""
|
||||
|
||||
msgid "Reports"
|
||||
msgstr ""
|
||||
|
||||
msgid "Spendings"
|
||||
msgstr ""
|
||||
|
||||
msgid "Stock report"
|
||||
msgstr ""
|
||||
|
||||
msgid "Out-of-stock products"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quantity unit for prices"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"When displaying prices for this product, they will be related to this "
|
||||
"quantity unit"
|
||||
msgstr ""
|
||||
|
||||
msgid "This means 1 label will be printed"
|
||||
msgid_plural "This means %1$s labels will be printed"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
@@ -9,7 +9,7 @@ msgstr ""
|
||||
"POT-Creation-Date: 2019-05-01T17:59:17+00:00\n"
|
||||
"PO-Revision-Date: 2019-05-01 17:43+0000\n"
|
||||
"Last-Translator: gimy16 <gimy16@hotmail.com>, 2021\n"
|
||||
"Language-Team: Catalan (https://www.transifex.com/grocy/teams/93189/ca/)\n"
|
||||
"Language-Team: Catalan (https://app.transifex.com/grocy/teams/93189/ca/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
@@ -10,7 +10,7 @@ msgstr ""
|
||||
"POT-Creation-Date: 2019-05-01T17:59:17+00:00\n"
|
||||
"PO-Revision-Date: 2019-09-17 10:45+0000\n"
|
||||
"Last-Translator: Pavel Paseka, 2022\n"
|
||||
"Language-Team: Czech (https://www.transifex.com/grocy/teams/93189/cs/)\n"
|
||||
"Language-Team: Czech (https://app.transifex.com/grocy/teams/93189/cs/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
@@ -11,7 +11,7 @@ msgstr ""
|
||||
"POT-Creation-Date: 2019-05-01T17:59:17+00:00\n"
|
||||
"PO-Revision-Date: 2019-05-01 17:42+0000\n"
|
||||
"Last-Translator: Pavel Paseka, 2022\n"
|
||||
"Language-Team: Czech (https://www.transifex.com/grocy/teams/93189/cs/)\n"
|
||||
"Language-Team: Czech (https://app.transifex.com/grocy/teams/93189/cs/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
@@ -10,7 +10,7 @@ msgstr ""
|
||||
"POT-Creation-Date: 2019-05-01T17:59:17+00:00\n"
|
||||
"PO-Revision-Date: 2019-05-01 17:42+0000\n"
|
||||
"Last-Translator: Bernd Bestel <bernd@berrnd.de>, 2020\n"
|
||||
"Language-Team: Czech (https://www.transifex.com/grocy/teams/93189/cs/)\n"
|
||||
"Language-Team: Czech (https://app.transifex.com/grocy/teams/93189/cs/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
@@ -3,7 +3,7 @@
|
||||
# Michal Petříček <michal@petricek.org>, 2019
|
||||
# Ondřej Suk <ondra.suk.55@gmail.com>, 2020
|
||||
# Radim Kabeláč <radim.ekk@gmail.com>, 2020
|
||||
# Pavel Paseka, 2022
|
||||
# Pavel Paseka, 2023
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
@@ -11,8 +11,8 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-05-01T17:59:17+00:00\n"
|
||||
"PO-Revision-Date: 2019-05-01 17:42+0000\n"
|
||||
"Last-Translator: Pavel Paseka, 2022\n"
|
||||
"Language-Team: Czech (https://www.transifex.com/grocy/teams/93189/cs/)\n"
|
||||
"Last-Translator: Pavel Paseka, 2023\n"
|
||||
"Language-Team: Czech (https://app.transifex.com/grocy/teams/93189/cs/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
@@ -329,7 +329,7 @@ msgid "current release"
|
||||
msgstr "Aktuální verze"
|
||||
|
||||
msgid "not yet released"
|
||||
msgstr "zatím nevydáno"
|
||||
msgstr "zatím nevydaná"
|
||||
|
||||
msgid "Portuguese (Brazil)"
|
||||
msgstr "Portugalština (Brazílie)"
|
||||
@@ -398,3 +398,37 @@ msgstr "Katalánština"
|
||||
|
||||
msgid "Slovenian"
|
||||
msgstr "Slovinština"
|
||||
|
||||
msgid "Lithuanian"
|
||||
msgstr "Litevština"
|
||||
|
||||
msgid "Ukrainian"
|
||||
msgstr "Ukrajinština"
|
||||
|
||||
msgid "Kilogram"
|
||||
msgid_plural "Kilograms"
|
||||
msgstr[0] "kilogram"
|
||||
msgstr[1] "kilogramy"
|
||||
msgstr[2] "kilogramů"
|
||||
msgstr[3] "kilogramů"
|
||||
|
||||
msgid "Romanian"
|
||||
msgstr "Rumunština"
|
||||
|
||||
msgid "Pint"
|
||||
msgstr "Pinta"
|
||||
|
||||
msgid "Beverages"
|
||||
msgstr "Nápoje"
|
||||
|
||||
msgid "Ice Cream"
|
||||
msgstr "Zmrzlina"
|
||||
|
||||
msgid "Soda"
|
||||
msgstr "Soda"
|
||||
|
||||
msgid "Beer"
|
||||
msgstr "Pivo"
|
||||
|
||||
msgid "Estonian"
|
||||
msgstr ""
|
||||
|
@@ -2,7 +2,7 @@
|
||||
# Translators:
|
||||
# Radim Kabeláč <radim.ekk@gmail.com>, 2020
|
||||
# Jarda Tesar <intossh@gmail.com>, 2021
|
||||
# Pavel Paseka, 2022
|
||||
# Pavel Paseka, 2023
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
@@ -10,8 +10,8 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-05-01T17:59:17+00:00\n"
|
||||
"PO-Revision-Date: 2020-08-31 19:11+0000\n"
|
||||
"Last-Translator: Pavel Paseka, 2022\n"
|
||||
"Language-Team: Czech (https://www.transifex.com/grocy/teams/93189/cs/)\n"
|
||||
"Last-Translator: Pavel Paseka, 2023\n"
|
||||
"Language-Team: Czech (https://app.transifex.com/grocy/teams/93189/cs/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
@@ -130,3 +130,19 @@ msgstr "Finština"
|
||||
# Catalan
|
||||
msgid "ca"
|
||||
msgstr "Katalánština"
|
||||
|
||||
# Lithuanian
|
||||
msgid "lt"
|
||||
msgstr "Litevština"
|
||||
|
||||
# Ukrainian
|
||||
msgid "uk"
|
||||
msgstr "Ukrajinština"
|
||||
|
||||
# Romanian
|
||||
msgid "ro_RO"
|
||||
msgstr "Rumunština"
|
||||
|
||||
# Estonian
|
||||
msgid "et_EE"
|
||||
msgstr ""
|
||||
|
@@ -9,7 +9,7 @@ msgstr ""
|
||||
"POT-Creation-Date: 2019-05-01T17:59:17+00:00\n"
|
||||
"PO-Revision-Date: 2020-08-29 16:33+0000\n"
|
||||
"Last-Translator: Pavel Paseka, 2022\n"
|
||||
"Language-Team: Czech (https://www.transifex.com/grocy/teams/93189/cs/)\n"
|
||||
"Language-Team: Czech (https://app.transifex.com/grocy/teams/93189/cs/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
@@ -9,7 +9,7 @@ msgstr ""
|
||||
"POT-Creation-Date: 2019-05-01T17:59:17+00:00\n"
|
||||
"PO-Revision-Date: 2019-05-01 17:42+0000\n"
|
||||
"Last-Translator: Pavel Paseka, 2022\n"
|
||||
"Language-Team: Czech (https://www.transifex.com/grocy/teams/93189/cs/)\n"
|
||||
"Language-Team: Czech (https://app.transifex.com/grocy/teams/93189/cs/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
@@ -6,9 +6,9 @@
|
||||
# Matyas Bobek <matyas.bobek@gmail.com>, 2020
|
||||
# Adam Kroupa <mavi222@seznam.cz>, 2020
|
||||
# Radim Kabeláč <radim.ekk@gmail.com>, 2020
|
||||
# Jaroslav Lichtblau <jlichtblau@seznam.cz>, 2020
|
||||
# Jaroslav Lichtblau <l10n@lichtblau.cz>, 2020
|
||||
# Jarda Tesar <intossh@gmail.com>, 2021
|
||||
# Pavel Paseka, 2022
|
||||
# Pavel Paseka, 2023
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
@@ -16,8 +16,8 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-05-01T17:59:17+00:00\n"
|
||||
"PO-Revision-Date: 2019-05-01 17:42+0000\n"
|
||||
"Last-Translator: Pavel Paseka, 2022\n"
|
||||
"Language-Team: Czech (https://www.transifex.com/grocy/teams/93189/cs/)\n"
|
||||
"Last-Translator: Pavel Paseka, 2023\n"
|
||||
"Language-Team: Czech (https://app.transifex.com/grocy/teams/93189/cs/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
@@ -30,10 +30,10 @@ msgstr "Přehled zásob"
|
||||
|
||||
msgid "%s product expires"
|
||||
msgid_plural "%s products expiring"
|
||||
msgstr[0] "%s produkt expiruje"
|
||||
msgstr[1] "%s produkty expirují"
|
||||
msgstr[2] "%s produktů expiruje"
|
||||
msgstr[3] "%s produktů expiruje"
|
||||
msgstr[0] "%s produktu se blíží datum použitelnosti"
|
||||
msgstr[1] "%s produktům se blíží datum použitelnosti"
|
||||
msgstr[2] "%s produktů se blíží datum použitelnosti"
|
||||
msgstr[3] "%s produktům se blíží datum použitelnosti"
|
||||
|
||||
msgid "within the next day"
|
||||
msgid_plural "within the next %s days"
|
||||
@@ -44,17 +44,17 @@ msgstr[3] "během %s dní"
|
||||
|
||||
msgid "%s product is already expired"
|
||||
msgid_plural "%s products are already expired"
|
||||
msgstr[0] "%s produkt expiroval"
|
||||
msgstr[1] "%s produkty expirovaly"
|
||||
msgstr[2] "%s produktů expirovalo"
|
||||
msgstr[3] "%s produktů expirovalo"
|
||||
msgstr[0] "%s produkt je po době použitelnosti"
|
||||
msgstr[1] "%s produkty jsou po době použitelnosti"
|
||||
msgstr[2] "%s produktů je po době použitelnosti"
|
||||
msgstr[3] "%s produktů je po době použitelnosti"
|
||||
|
||||
msgid "%s product is overdue"
|
||||
msgid_plural "%s products are overdue"
|
||||
msgstr[0] "%s produkt je po době min. trvanlivosti"
|
||||
msgstr[1] "%s produkty jsou po době min. trvanlivosti"
|
||||
msgstr[2] "%s produktů je po době min. trvanlivosti"
|
||||
msgstr[3] "%s produktů je po době min. trvanlivosti"
|
||||
msgstr[3] "%s produktů je po datu min. trvanlivosti"
|
||||
|
||||
msgid "%s product is below defined min. stock amount"
|
||||
msgid_plural "%s products are below defined min. stock amount"
|
||||
@@ -199,7 +199,7 @@ msgid "Save"
|
||||
msgstr "Uložit"
|
||||
|
||||
msgid "Add"
|
||||
msgstr "Vytvořit"
|
||||
msgstr "Přidat"
|
||||
|
||||
msgid "Name"
|
||||
msgstr "Název"
|
||||
@@ -231,11 +231,6 @@ msgstr "Výchozí měrná jednotka pro nákup"
|
||||
msgid "Quantity unit stock"
|
||||
msgstr "Měrná jednotka zásoby"
|
||||
|
||||
msgid "Factor purchase to stock quantity unit"
|
||||
msgstr ""
|
||||
"Převodní koeficient (násobek) měrné jednotky nákupu produktu do měrné "
|
||||
"jednotky zásob"
|
||||
|
||||
msgid "Create location"
|
||||
msgstr "Nové umístění"
|
||||
|
||||
@@ -252,7 +247,7 @@ msgid "Period days"
|
||||
msgstr "Dny opakování"
|
||||
|
||||
msgid "Create chore"
|
||||
msgstr "Vytvořit povinnost"
|
||||
msgstr "Nová povinnost"
|
||||
|
||||
msgid "Used in"
|
||||
msgstr "Použito v"
|
||||
@@ -292,9 +287,6 @@ msgstr "nikdy"
|
||||
msgid "Add products that are below defined min. stock amount"
|
||||
msgstr "Přidat produkty se stavem pod minimální zásobou"
|
||||
|
||||
msgid "This means 1 %1$s purchased will be converted into %2$s %3$s in stock"
|
||||
msgstr "Koupě 1 %1$s bude převedena na zásobu %2$s %3$s"
|
||||
|
||||
msgid "Login"
|
||||
msgstr "Přihlásit se"
|
||||
|
||||
@@ -305,7 +297,7 @@ msgid "Password"
|
||||
msgstr "Heslo"
|
||||
|
||||
msgid "Invalid credentials, please try again"
|
||||
msgstr "Neplatné přihlašovací údaje, zkuste to ještě jednou"
|
||||
msgstr "Nesprávné jméno nebo heslo, zkuste to ještě jednou"
|
||||
|
||||
msgid "Are you sure to delete battery \"%s\"?"
|
||||
msgstr "Opravdu chcete smazat baterii „%s“"
|
||||
@@ -338,7 +330,7 @@ msgid "Add as new product and prefill barcode"
|
||||
msgstr "Přidat jako nový produkt a předvyplnit čárový kód"
|
||||
|
||||
msgid "Are you sure to delete quantity unit \"%s\"?"
|
||||
msgstr "Opravdu chcete smazat měrnou jednotku \"%s\"?"
|
||||
msgstr "Opravdu chcete smazat měrnou jednotku „%s“?"
|
||||
|
||||
msgid "Are you sure to delete product \"%s\"?"
|
||||
msgstr "Opravdu chcete smazat produkt „%s“?"
|
||||
@@ -382,8 +374,8 @@ msgstr "Zásoba se zmenší o %s"
|
||||
msgid "Removed %1$s of %2$s from stock"
|
||||
msgstr "Zásoba se snížila o %1$s produktu %2$s"
|
||||
|
||||
msgid "About grocy"
|
||||
msgstr "O grocy"
|
||||
msgid "About Grocy"
|
||||
msgstr "Co je Grocy"
|
||||
|
||||
msgid "Close"
|
||||
msgstr "Zavřít"
|
||||
@@ -464,13 +456,13 @@ msgid "Edit recipe ingredient"
|
||||
msgstr "Upravit ingredienci"
|
||||
|
||||
msgid "Are you sure to delete recipe \"%s\"?"
|
||||
msgstr "Opravdu chcete smazat recept \"%s\"?"
|
||||
msgstr "Opravdu chcete smazat recept „%s“?"
|
||||
|
||||
msgid "Are you sure to delete recipe ingredient \"%s\"?"
|
||||
msgstr "Opravdu chcete smazat ingredienci \"%s\"?"
|
||||
msgstr "Opravdu chcete smazat ingredienci „%s“?"
|
||||
|
||||
msgid "Are you sure to empty shopping list \"%s\"?"
|
||||
msgstr "Opravdu chcete vyprázdnit nákupní seznam \"%s\"?"
|
||||
msgstr "Opravdu chcete vyprázdnit nákupní seznam „%s“?"
|
||||
|
||||
msgid "Clear list"
|
||||
msgstr "Vyprázdnit seznam"
|
||||
@@ -534,7 +526,7 @@ msgid "Users"
|
||||
msgstr "Uživatelé"
|
||||
|
||||
msgid "Are you sure to delete user \"%s\"?"
|
||||
msgstr "Opravdu chcete smazat uživatele \"%s\"?"
|
||||
msgstr "Opravdu chcete smazat uživatele „%s“?"
|
||||
|
||||
msgid "Create user"
|
||||
msgstr "Vytvořit uživatele"
|
||||
@@ -549,7 +541,7 @@ msgid "Last name"
|
||||
msgstr "Příjmení"
|
||||
|
||||
msgid "A username is required"
|
||||
msgstr "Přihlašovací jméno je povinný údaj"
|
||||
msgstr "Uživatelské jméno je povinný údaj"
|
||||
|
||||
msgid "Confirm password"
|
||||
msgstr "Potvrdit heslo"
|
||||
@@ -641,8 +633,8 @@ msgid ""
|
||||
"Are you sure to consume all ingredients needed by recipe \"%s\" (ingredients"
|
||||
" marked with \"only check if any amount is in stock\" will be ignored)?"
|
||||
msgstr ""
|
||||
"Opravdu si přejete spotřebovat všechny ingredience receptu „%s“? Suroviny "
|
||||
"označené „Zkontrolovat pouze zda je v zásobě jakékoliv množství“ budou "
|
||||
"Opravdu si přejete spotřebovat všechny ingredience receptu „%s“? Ingredience"
|
||||
" označené „Zkontrolovat pouze zda je v zásobě jakékoliv množství“ budou "
|
||||
"ignorovány."
|
||||
|
||||
msgid "Removed all ingredients of recipe \"%s\" from stock"
|
||||
@@ -735,7 +727,7 @@ msgid "Product group"
|
||||
msgstr "Skupina produktů"
|
||||
|
||||
msgid "Are you sure to delete product group \"%s\"?"
|
||||
msgstr "Opravdu chcete smazat skupinu produktů \"%s\"?"
|
||||
msgstr "Opravdu chcete smazat skupinu produktů „%s“?"
|
||||
|
||||
msgid "Stay logged in permanently"
|
||||
msgstr "Zůstat přihlášen"
|
||||
@@ -837,7 +829,7 @@ msgid "Group"
|
||||
msgstr "Skupina"
|
||||
|
||||
msgid "This will be used as a headline to group ingredients together"
|
||||
msgstr "Text bude použit jako nadpis pro skupinu surovin"
|
||||
msgstr "Text bude použit jako nadpis pro skupinu ingrediencí"
|
||||
|
||||
msgid "Journal"
|
||||
msgstr "Deník"
|
||||
@@ -846,7 +838,7 @@ msgid "Stock journal"
|
||||
msgstr "Deník zásob"
|
||||
|
||||
msgid "Undone on"
|
||||
msgstr "Stav vrácen zpět"
|
||||
msgstr "Vráceno zpět:"
|
||||
|
||||
msgid "Batteries journal"
|
||||
msgstr "Deník baterií"
|
||||
@@ -942,7 +934,7 @@ msgid "Costs"
|
||||
msgstr "Náklady"
|
||||
|
||||
msgid "The ingredients listed here result in this amount of servings"
|
||||
msgstr "Zobrazené suroviny odpovídají tomuto počtu porcí"
|
||||
msgstr "Zobrazené ingredience odpovídají tomuto počtu porcí"
|
||||
|
||||
msgid "Do not check against the shopping list when adding missing items to it"
|
||||
msgstr ""
|
||||
@@ -1115,7 +1107,7 @@ msgid "Sunday"
|
||||
msgstr "Neděle"
|
||||
|
||||
msgid "Configure userfields"
|
||||
msgstr "Nastavit uživatelská pole"
|
||||
msgstr "Upravit uživatelská pole"
|
||||
|
||||
msgid "Userfields"
|
||||
msgstr "Uživatelská pole"
|
||||
@@ -1167,10 +1159,10 @@ msgstr "v množném čísle"
|
||||
|
||||
msgid "Not enough in stock, %s ingredient missing"
|
||||
msgid_plural "Not enough in stock, %s ingredients missing"
|
||||
msgstr[0] "Nedostatečná zásoba, chybí %s surovina"
|
||||
msgstr[1] "Nedostatečná zásoba, chybí %s suroviny"
|
||||
msgstr[2] "Nedostatečná zásoba, chybí %s surovin"
|
||||
msgstr[3] "Nedostatečná zásoba, chybí %s surovin"
|
||||
msgstr[0] "Nedostatečná zásoba, chybí %s ingredience"
|
||||
msgstr[1] "Nedostatečná zásoba, chybí %s ingredience"
|
||||
msgstr[2] "Nedostatečná zásoba, chybí %s ingrediencí"
|
||||
msgstr[3] "Nedostatečná zásoba, chybí %s ingrediencí"
|
||||
|
||||
msgid "Not enough in stock, but already on the shopping list"
|
||||
msgstr "Nemá dostatečnou zásobu, ale je na nákupním seznamu"
|
||||
@@ -1245,7 +1237,8 @@ msgid "Today"
|
||||
msgstr "Dnes"
|
||||
|
||||
msgid "Not all ingredients of recipe \"%s\" are in stock, nothing removed"
|
||||
msgstr "Všechny suroviny z receptu „%s“ nejsou v zásobě – nic nebude odebráno"
|
||||
msgstr ""
|
||||
"V zásobě nejsou všechny ingredience receptu „%s“ – nic nebude odebráno"
|
||||
|
||||
msgid "Undo task"
|
||||
msgstr "Vrátit úkol"
|
||||
@@ -1326,11 +1319,8 @@ msgstr "1 %1$s odpovídá %2$s %3$s"
|
||||
msgid "QU conversions"
|
||||
msgstr "Převod měrných jednotek"
|
||||
|
||||
msgid "Product overrides"
|
||||
msgstr "Speciální nastavení pro produkt"
|
||||
|
||||
msgid "Override for product"
|
||||
msgstr "které platí jen pro produkt"
|
||||
msgstr "která platí jen pro produkt"
|
||||
|
||||
msgid "This equals %1$s %2$s"
|
||||
msgstr "To odpovídá %1$s %2$s "
|
||||
@@ -1370,7 +1360,7 @@ msgid_plural ""
|
||||
"This means the next execution of this chore is scheduled %s hours after the "
|
||||
"last execution"
|
||||
msgstr[0] ""
|
||||
"Příští provedení této povinnosti má být za 1 hodinu po jejím předchozím "
|
||||
"Příští provedení této povinnosti má být za hodinu po jejím předchozím "
|
||||
"provedením."
|
||||
msgstr[1] ""
|
||||
"Příští provedení této povinnosti má být za %s hodiny po jejím předchozím "
|
||||
@@ -1499,7 +1489,7 @@ msgid "For example"
|
||||
msgstr "Například"
|
||||
|
||||
msgid "Configure fields"
|
||||
msgstr "Nastavit pole"
|
||||
msgstr "Upravit pole"
|
||||
|
||||
msgid "Quantity unit plural form testing"
|
||||
msgstr "Zobrazení tvarů množných čísel měrných jednotek"
|
||||
@@ -1525,8 +1515,8 @@ msgstr ""
|
||||
msgid "Price factor"
|
||||
msgstr "Násobek ceny ingredience"
|
||||
|
||||
msgid "Do you find grocy useful?"
|
||||
msgstr "Líbí se vám grocy?"
|
||||
msgid "Do you find Grocy useful?"
|
||||
msgstr "Je pro vás Grocy užitečný?"
|
||||
|
||||
msgid "Say thanks"
|
||||
msgstr "Poděkujte za aplikaci"
|
||||
@@ -1543,8 +1533,8 @@ msgstr "Seznam „%3$s” se rozrostl o %1$s produktu %2$s"
|
||||
msgid "Output"
|
||||
msgstr "Výstup"
|
||||
|
||||
msgid "Energy (kcal)"
|
||||
msgstr "Energie (kcal)"
|
||||
msgid "Energy"
|
||||
msgstr "Energetická hodnota"
|
||||
|
||||
msgid "Per stock quantity unit"
|
||||
msgstr "Na jednotku množství zásob"
|
||||
@@ -1665,10 +1655,10 @@ msgstr "Upravit zásobu"
|
||||
|
||||
msgid ""
|
||||
"Camera access is only possible when supported and allowed by your browser "
|
||||
"and when grocy is served via a secure (https://) connection"
|
||||
"and when Grocy is served via a secure (https://) connection"
|
||||
msgstr ""
|
||||
"Přístup ke kameře je možný pouze když je podporována a povolena prohlížečem "
|
||||
"a když server Grocy komunikuje přes zabezpečené připojení (https://)"
|
||||
"Přístup ke kameře musí být ve vašem internetovém prohlížeči možný a zapnutý."
|
||||
" Navíc musí Grocy běžet na zabezpečeném severu (https://)."
|
||||
|
||||
msgid "Keep screen on"
|
||||
msgstr "Nevypínat displej automaticky"
|
||||
@@ -1683,8 +1673,8 @@ msgid ""
|
||||
"When a product is selected, one unit (per serving in stock quantity unit) "
|
||||
"will be added to stock on consuming this recipe"
|
||||
msgstr ""
|
||||
"Pokud tu vyberete produkt, bude po kliknutí na „Spotřebovat všechny suroviny"
|
||||
" použité v tomto receptu“ receptu přidán do stavu zásob a to v množství "
|
||||
"Pokud tu vyberete název produktu, bude po kliknutí na „Spotřebovat všechny "
|
||||
"ingredience použité v tomto receptu“ přidán do stavu zásob a to v množství "
|
||||
"odpovídajícím počtu porcí při spotřebování receptu."
|
||||
|
||||
msgid "Produces product"
|
||||
@@ -1706,7 +1696,7 @@ msgid "per day"
|
||||
msgstr "zítra"
|
||||
|
||||
msgid "Only undone items"
|
||||
msgstr "produkty, které nejsou v košíku"
|
||||
msgstr "nevybrané produkty"
|
||||
|
||||
msgid "Add product"
|
||||
msgstr "Přidat produkt"
|
||||
@@ -1774,7 +1764,7 @@ msgid "Recipe card"
|
||||
msgstr "Karta receptu"
|
||||
|
||||
msgid "Group ingredients by their product group"
|
||||
msgstr "Seskupit suroviny podle skupiny produktů"
|
||||
msgstr "Seskupit ingredience podle skupiny produktů"
|
||||
|
||||
msgid "Unknown store"
|
||||
msgstr "Nepojmenovaný obchod"
|
||||
@@ -1897,7 +1887,7 @@ msgid "This page does not exist"
|
||||
msgstr "Tato stránka neexistuje"
|
||||
|
||||
msgid "You will be redirected to the default page in %s seconds"
|
||||
msgstr "Budete přesměrováni na výchozí stránku za %s sekund"
|
||||
msgstr "Za %s s budete přesměrováni na výchozí stránku"
|
||||
|
||||
msgid "Server error"
|
||||
msgstr "Chyba serveru"
|
||||
@@ -1988,8 +1978,8 @@ msgstr "Čas transakce"
|
||||
msgid "Chore journal"
|
||||
msgstr "Deník povinností"
|
||||
|
||||
msgid "Track chore execution"
|
||||
msgstr "Splnění povinnosti"
|
||||
msgid "Track next chore schedule"
|
||||
msgstr "Označit následující datum povinnosti jako splněné"
|
||||
|
||||
msgid "Mark task as completed"
|
||||
msgstr "Označit úkol jako hotový"
|
||||
@@ -2007,22 +1997,24 @@ msgid "Consume this stock entry as spoiled"
|
||||
msgstr "Označit tuto zásobu jako zkaženou"
|
||||
|
||||
msgid "Configure user permissions"
|
||||
msgstr "Nastavit uživatelská oprávnění"
|
||||
msgstr "Upravit uživatelská oprávnění"
|
||||
|
||||
msgid "Show a QR-Code for this API key"
|
||||
msgstr "Zobrazit QR kód pro tento API klíč"
|
||||
|
||||
msgid ""
|
||||
"This is the default quantity unit used when adding this product to the "
|
||||
"shopping list"
|
||||
msgstr "Měrná jednotka produktu při jeho přidání do nákupního seznamu"
|
||||
"This is the default quantity unit used on purchase and when adding this "
|
||||
"product to the shopping list"
|
||||
msgstr ""
|
||||
"Výchozí množstevní jednotka pro akci Nakoupit a pro vkládání produktu do "
|
||||
"nákupního seznamu"
|
||||
|
||||
msgid ""
|
||||
"Show a warning when the due date of the purchased product is earlier than "
|
||||
"the next due date in stock"
|
||||
msgstr ""
|
||||
"Upozorni, pokud je datum min. trvanlivosti nakoupeného produktu dříve, než "
|
||||
"nejbližší datum spotřeby produktu v zásobě."
|
||||
"Upozorni, pokud je datum min. trvanlivosti (použitelnosti) nakoupeného "
|
||||
"produktu dříve, než nejbližší datum spotřeby produktu v zásobě."
|
||||
|
||||
msgid "This is due earlier than already in-stock items"
|
||||
msgstr "Datum min. trvanlivosti je dříve, než u produktů v zásobě"
|
||||
@@ -2036,14 +2028,21 @@ msgstr ""
|
||||
" produktu – buď ze seznamu produktů nebo z dat u čárového kódu."
|
||||
|
||||
msgid "Quick consume amount"
|
||||
msgstr "Množství pro „rychle spotřebovat“"
|
||||
msgstr "Množství pro tlačítko Spotřebovat"
|
||||
|
||||
msgid ""
|
||||
"This amount is used for the \"quick consume/open buttons\" on the stock "
|
||||
"overview page (related to quantity unit stock)"
|
||||
"This amount is used for the \"quick consume button\" on the stock overview "
|
||||
"page (related to quantity unit stock)"
|
||||
msgstr ""
|
||||
"Tento počet je použit pro tlačítko „rychle spotřebovat/otevřít“ na stránce "
|
||||
"přehledu zásob. Vztaženo k početní jednotce zásoby."
|
||||
"Hodnota množství pro zelené tlačítko Spotřebovat v Přehledu zásob. Vztahuje "
|
||||
"se k měrné jednotce zásob."
|
||||
|
||||
msgid ""
|
||||
"This amount is used for the \"quick open button\" on the stock overview page"
|
||||
" (related to quantity unit stock)"
|
||||
msgstr ""
|
||||
"Hodnota množství pro červené tlačítko Otevřít v Přehledu zásob. Vztahuje se "
|
||||
"k měrné jednotce zásob."
|
||||
|
||||
msgid "Copy"
|
||||
msgstr "Kopírovat"
|
||||
@@ -2059,7 +2058,7 @@ msgid ""
|
||||
" be different"
|
||||
msgstr ""
|
||||
"Podle vybraného typu trvanlivosti bude produkt po datu min. trvanlivosti či "
|
||||
"expiraci v Přehledu zásob zvýrazněn různými barvami."
|
||||
"použitelnosti v Přehledu zásob zvýrazněn různými barvami."
|
||||
|
||||
msgid ""
|
||||
"Means that the product is maybe still safe to be consumed after its due date"
|
||||
@@ -2067,12 +2066,12 @@ msgid ""
|
||||
msgstr "Produkt lze konzumovat i po vypršení doby min. trvanlivosti"
|
||||
|
||||
msgid "Expiration date"
|
||||
msgstr "Datum expirace"
|
||||
msgstr "Datum použitelnosti"
|
||||
|
||||
msgid ""
|
||||
"Means that the product is not safe to be consumed after its due date is "
|
||||
"reached"
|
||||
msgstr "Po vypršení doby expirace není vhodné produkt konzumovat"
|
||||
msgstr "Po vypršení doby použitelnosti není vhodné produkt konzumovat"
|
||||
|
||||
msgid ""
|
||||
"For purchases this amount of days will be added to today for the due date "
|
||||
@@ -2094,7 +2093,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Při označení jako Otevřený, bude nastavené datum min. trvanlivosti: dnes + "
|
||||
"tento počet dní. Ale jen pokud nové datum spotřeby nebude později, než "
|
||||
"původní. Hodnota 0 datum spotřeby nemění."
|
||||
"původní. Hodnota 0 datum min. trvanlivosti (spotřeby) nemění."
|
||||
|
||||
msgid "Default due days after opened"
|
||||
msgstr "Výchozí počet dní min. trvanlivosti po otevření"
|
||||
@@ -2137,19 +2136,19 @@ msgstr "Produkt má neomezenou trvanlivost"
|
||||
|
||||
msgid "%s product is expired"
|
||||
msgid_plural "%s products are expired"
|
||||
msgstr[0] "%s produkt expiroval"
|
||||
msgstr[1] "%s produkty expirovaly"
|
||||
msgstr[2] "%s produktů expirovalo"
|
||||
msgstr[3] "%s produktů expirovalo"
|
||||
msgstr[0] "%s produkt je po datu použitelnosti"
|
||||
msgstr[1] "%s produkty jsou po datu použitelnosti"
|
||||
msgstr[2] "%s produktů je po datu použitelnosti"
|
||||
msgstr[3] "%s produktů je po datu použitelnosti"
|
||||
|
||||
msgid "Expired"
|
||||
msgstr "expirovalo"
|
||||
msgstr "po době použitelnosti"
|
||||
|
||||
msgid "Due soon days"
|
||||
msgstr "Počet dní ve žlutém filtru v Přehledu"
|
||||
|
||||
msgid "Add overdue/expired products"
|
||||
msgstr "Přidat min. trvanlivost/expiraci produktu"
|
||||
msgstr "Přidat produkty po min. trvanlivosti/použitelnosti"
|
||||
|
||||
msgid ""
|
||||
"Products with tare weight enabled are currently not supported for transfer"
|
||||
@@ -2214,7 +2213,7 @@ msgid "Download file"
|
||||
msgstr "Stáhnout soubor"
|
||||
|
||||
msgid "Use the products \"Quick consume amount\""
|
||||
msgstr "Použij množství „rychle spotřebovat“ z parametrů produktu"
|
||||
msgstr "Použij množství pro tlačítka Spotřebovat z parametrů produktu"
|
||||
|
||||
msgid "Disabled"
|
||||
msgstr "Vyřazeno"
|
||||
@@ -2238,7 +2237,7 @@ msgid "None"
|
||||
msgstr "Žádného"
|
||||
|
||||
msgid "Group by"
|
||||
msgstr "Seskupovat podle sloupce"
|
||||
msgstr "Seskupovat podle"
|
||||
|
||||
msgid "Ingredient group"
|
||||
msgstr "Skupina ingrediencí"
|
||||
@@ -2326,22 +2325,22 @@ msgstr "Nastavení tisku"
|
||||
msgid "A product or a note is required"
|
||||
msgstr "Vložte jméno produktu, NEBO jen poznámku"
|
||||
|
||||
msgid "grocycode"
|
||||
msgid "Grocycode"
|
||||
msgstr "Grocycode"
|
||||
|
||||
msgid "Download"
|
||||
msgstr "Stáhnout"
|
||||
|
||||
# Example: Download *Product* grocycode
|
||||
msgid "Download %s grocycode"
|
||||
msgstr "Stáhnout %s grocycode"
|
||||
# Example: Download *Product* Grocycode
|
||||
msgid "Download %s Grocycode"
|
||||
msgstr "Stáhnout Grocycode pro %s"
|
||||
|
||||
msgid ""
|
||||
"grocycode is a unique referer to this %s in your grocy instance - print it "
|
||||
"Grocycode is a unique referer to this %s in your Grocy instance - print it "
|
||||
"onto a label and scan it like any other barcode"
|
||||
msgstr ""
|
||||
"Grocycode je identifikátor pro tento %s ve vaší instalaci systému Grocy. "
|
||||
"Můžete si ho vytisknout a pak používat stejně jako ostatní čárové kódy."
|
||||
"Grocycode je totéž jako čárový kód z obalu produktu. Označuje produkt %s ve "
|
||||
"vaší databázi. Můžete si jej vytisknout a používat jako ostatní čárové kódy."
|
||||
|
||||
# Abbreviation for "due date"
|
||||
msgid "DD"
|
||||
@@ -2369,9 +2368,9 @@ msgstr "Každé balení produktu bude mít svůj řádek a vytisknutou nálepku"
|
||||
msgid "Error while executing WebHook"
|
||||
msgstr "Chyba při spuštění WebHook"
|
||||
|
||||
# Example: Print *Product* grocycode on label printer
|
||||
msgid "Print %s grocycode on label printer"
|
||||
msgstr "Tisk Grocycode pro %s na tiskárně nálepek"
|
||||
# Example: Print *Product* Grocycode on label printer
|
||||
msgid "Print %s Grocycode on label printer"
|
||||
msgstr "Vytisknout Grocycode pro %s"
|
||||
|
||||
msgid "Open stock entry label in new window"
|
||||
msgstr "Otevřít nálepku s čárovým kódem v nové záložce"
|
||||
@@ -2389,7 +2388,7 @@ msgid "Unable to print"
|
||||
msgstr "Nedaří se tisknout"
|
||||
|
||||
msgid "Only done items"
|
||||
msgstr "produkty v košíku"
|
||||
msgstr "vybrané produkty"
|
||||
|
||||
msgid "Show only in-stock products"
|
||||
msgstr "Zobrazit produkty se zásobou"
|
||||
@@ -2630,8 +2629,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Čím je index vyšší, tím více ingrediencí se blíží datu min. trvanlivosti. V "
|
||||
"indexu dostává jeden bod každý produkt s blížící se dobou spotřeby, 10 bodů "
|
||||
"za každý produkt po době min. trvanlivosti a 20bodů za každý expirovaný "
|
||||
"(nepoužitelný) produkt."
|
||||
"za každý produkt po době min. trvanlivosti a 20 bodů za každý produkt po "
|
||||
"době použitelnosti."
|
||||
|
||||
msgid "Disable own stock"
|
||||
msgstr "Produkt nemá vlastní zásobu"
|
||||
@@ -2726,4 +2725,114 @@ msgid "Decimal places allowed for prices (input)"
|
||||
msgstr "Počet desetinných míst při zapisování ceny"
|
||||
|
||||
msgid "Decimal places allowed for prices (display)"
|
||||
msgstr "Počet desetinných míst při zobrazování ceny"
|
||||
msgstr "Počet desetinných míst pro zobrazení ceny"
|
||||
|
||||
msgid "Clear done items"
|
||||
msgstr "Smazat všechna zaškrtnutá"
|
||||
|
||||
msgid ""
|
||||
"This shows all to this product directly or indirectly related quantity units"
|
||||
" and their derived conversion factors"
|
||||
msgstr ""
|
||||
"Zobrazí všechny kombinace přepočtů měrných jednotek jak pro tento produkt "
|
||||
"zadaných, tak zděděných"
|
||||
|
||||
msgid "Show resolved conversions"
|
||||
msgstr "Zobrazit všechny převody"
|
||||
|
||||
msgid "QU conversions resolved"
|
||||
msgstr "Všechny převody měrných jednotek pro"
|
||||
|
||||
msgid "Product specifc QU conversions"
|
||||
msgstr "Převody měrných jednotek pro tento produkt"
|
||||
|
||||
msgid "Default quantity unit consume"
|
||||
msgstr "Výchozí měrná jednotka pro spotřebu"
|
||||
|
||||
msgid "This is the default quantity unit used when consuming this product"
|
||||
msgstr "Měrná jednotka produktu při kliknutí na tlačítko Spotřebovat"
|
||||
|
||||
msgid "Add to meal plan"
|
||||
msgstr "Přidat do jídelníčku"
|
||||
|
||||
msgid "Successfully added the recipe to the meal plan"
|
||||
msgstr "Recept byl přidán do jídelníčku"
|
||||
|
||||
msgid "Reprint stock entry label"
|
||||
msgstr "Vytisknout nálepku produktu"
|
||||
|
||||
msgid "Auto reprint stock entry label"
|
||||
msgstr "Vytisknout nálepky pro produkt při změně"
|
||||
|
||||
msgid ""
|
||||
"When enabled, auto-changing the due date of a stock entry (by "
|
||||
"opening/freezing/thawing and having corresponding default due days set) will"
|
||||
" reprint its label"
|
||||
msgstr ""
|
||||
"Pokud se změní datum min. trvanlivosti/použitelnosti změnou jeho stavu "
|
||||
"(otevřením, zmražením, rozmrazením) a pokud jsou pro tyto změny stavu "
|
||||
"uloženy doby min. trvanlivosti, nálepka produktu se znovu vytiskne."
|
||||
|
||||
msgid "Quick open amount"
|
||||
msgstr "Množství pro tlačítko Otevřít"
|
||||
|
||||
msgid "Track chore execution now"
|
||||
msgstr "Splnění povinnosti s dnešním datem"
|
||||
|
||||
msgid "Total"
|
||||
msgstr "Součet"
|
||||
|
||||
msgid "Apply"
|
||||
msgstr "Provést"
|
||||
|
||||
msgid "Custom range"
|
||||
msgstr "Vlastní rozsah"
|
||||
|
||||
msgid "Yesterday"
|
||||
msgstr "Včera"
|
||||
|
||||
msgid "Last %1$s day"
|
||||
msgid_plural "Last %1$s days"
|
||||
msgstr[0] "Poslední %1$s den"
|
||||
msgstr[1] "Poslední %1$s dny"
|
||||
msgstr[2] "Posledních %1$s dní"
|
||||
msgstr[3] "Posledních %1$s dní"
|
||||
|
||||
msgid "This month"
|
||||
msgstr "Tento měsíc"
|
||||
|
||||
msgid "Last month"
|
||||
msgstr "Minulý měsíc"
|
||||
|
||||
msgid "This year"
|
||||
msgstr "Letos"
|
||||
|
||||
msgid "Last year"
|
||||
msgstr "Loni"
|
||||
|
||||
msgid "Reports"
|
||||
msgstr "Přehledy"
|
||||
|
||||
msgid "Spendings"
|
||||
msgstr "Výdaje"
|
||||
|
||||
msgid "Stock report"
|
||||
msgstr "Přehled zásob"
|
||||
|
||||
msgid "Out-of-stock products"
|
||||
msgstr "Produkty bez zásoby"
|
||||
|
||||
msgid "Quantity unit for prices"
|
||||
msgstr "Množstevní jednotka pro ceny"
|
||||
|
||||
msgid ""
|
||||
"When displaying prices for this product, they will be related to this "
|
||||
"quantity unit"
|
||||
msgstr "Zobrazované ceny produktu budou odpovídat této množstevní jednotce"
|
||||
|
||||
msgid "This means 1 label will be printed"
|
||||
msgid_plural "This means %1$s labels will be printed"
|
||||
msgstr[0] "Vytiskne se 1nálepka"
|
||||
msgstr[1] "Vytisknou se %1$s nálepky"
|
||||
msgstr[2] "Vytiskne se %1$s nálepek"
|
||||
msgstr[3] "Vytiskne se %1$s nálepek"
|
||||
|
@@ -11,7 +11,7 @@ msgstr ""
|
||||
"POT-Creation-Date: 2019-05-01T17:59:17+00:00\n"
|
||||
"PO-Revision-Date: 2019-05-01 17:43+0000\n"
|
||||
"Last-Translator: Pavel Paseka, 2022\n"
|
||||
"Language-Team: Czech (https://www.transifex.com/grocy/teams/93189/cs/)\n"
|
||||
"Language-Team: Czech (https://app.transifex.com/grocy/teams/93189/cs/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
@@ -10,7 +10,7 @@ msgstr ""
|
||||
"POT-Creation-Date: 2019-05-01T17:59:17+00:00\n"
|
||||
"PO-Revision-Date: 2019-09-17 10:45+0000\n"
|
||||
"Last-Translator: klavslund <klavslund@gmail.com>, 2021\n"
|
||||
"Language-Team: Danish (https://www.transifex.com/grocy/teams/93189/da/)\n"
|
||||
"Language-Team: Danish (https://app.transifex.com/grocy/teams/93189/da/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
@@ -2,6 +2,7 @@
|
||||
# Translators:
|
||||
# Troels Siggaard <troels@siggaard.com>, 2019
|
||||
# Rasmus Bojsen <rasmus@bojsen.cn>, 2019
|
||||
# Brian Moos Lindberg <brian@blueeel.dk>, 2022
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
@@ -9,8 +10,8 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-05-01T17:59:17+00:00\n"
|
||||
"PO-Revision-Date: 2019-05-01 17:42+0000\n"
|
||||
"Last-Translator: Rasmus Bojsen <rasmus@bojsen.cn>, 2019\n"
|
||||
"Language-Team: Danish (https://www.transifex.com/grocy/teams/93189/da/)\n"
|
||||
"Last-Translator: Brian Moos Lindberg <brian@blueeel.dk>, 2022\n"
|
||||
"Language-Team: Danish (https://app.transifex.com/grocy/teams/93189/da/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
@@ -34,7 +35,7 @@ msgid "yearly"
|
||||
msgstr "årlig"
|
||||
|
||||
msgid "hourly"
|
||||
msgstr ""
|
||||
msgstr "timevis"
|
||||
|
||||
msgid "adaptive"
|
||||
msgstr ""
|
||||
msgstr "adaptiv"
|
||||
|
@@ -9,7 +9,7 @@ msgstr ""
|
||||
"POT-Creation-Date: 2019-05-01T17:59:17+00:00\n"
|
||||
"PO-Revision-Date: 2019-05-01 17:42+0000\n"
|
||||
"Last-Translator: Bernd Bestel <bernd@berrnd.de>, 2019\n"
|
||||
"Language-Team: Danish (https://www.transifex.com/grocy/teams/93189/da/)\n"
|
||||
"Language-Team: Danish (https://app.transifex.com/grocy/teams/93189/da/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
@@ -3,10 +3,11 @@
|
||||
# dark159123 <r.j.hansen@protonmail.com>, 2019
|
||||
# Troels Siggaard <troels@siggaard.com>, 2019
|
||||
# Rasmus Bojsen <rasmus@bojsen.cn>, 2019
|
||||
# Brian Moos Lindberg <brian@blueeel.dk>, 2019
|
||||
# Mihai Marinescu <mihai@marinescu.dk>, 2020
|
||||
# klavslund <klavslund@gmail.com>, 2021
|
||||
# Jesper Donnis, 2021
|
||||
# Brian Moos Lindberg <brian@blueeel.dk>, 2022
|
||||
# hskdk <henrik@skjaerbaek.net>, 2023
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
@@ -14,8 +15,8 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-05-01T17:59:17+00:00\n"
|
||||
"PO-Revision-Date: 2019-05-01 17:42+0000\n"
|
||||
"Last-Translator: Jesper Donnis, 2021\n"
|
||||
"Language-Team: Danish (https://www.transifex.com/grocy/teams/93189/da/)\n"
|
||||
"Last-Translator: hskdk <henrik@skjaerbaek.net>, 2023\n"
|
||||
"Language-Team: Danish (https://app.transifex.com/grocy/teams/93189/da/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
@@ -111,10 +112,10 @@ msgid "Tomato"
|
||||
msgstr "Tomat"
|
||||
|
||||
msgid "Change towels in the bathroom"
|
||||
msgstr ""
|
||||
msgstr "Udskift håndklæder på badeværelset"
|
||||
|
||||
msgid "Mop the kitchen floor"
|
||||
msgstr ""
|
||||
msgstr "Vask køkkengulvet"
|
||||
|
||||
msgid "Warranty ends"
|
||||
msgstr "Reklamationsret udløber"
|
||||
@@ -129,7 +130,7 @@ msgid "Heat remote control"
|
||||
msgstr "Fjernbetjening til varme"
|
||||
|
||||
msgid "Take out the trash"
|
||||
msgstr ""
|
||||
msgstr "Gå ud med skraldet"
|
||||
|
||||
msgid "Some good snacks"
|
||||
msgstr "Nogle gode snacks"
|
||||
@@ -254,13 +255,13 @@ msgid "Russian"
|
||||
msgstr "Russisk"
|
||||
|
||||
msgid "Vacuum the living room floor"
|
||||
msgstr ""
|
||||
msgstr "Støvsug stuegulvet"
|
||||
|
||||
msgid "Clean the litter box"
|
||||
msgstr ""
|
||||
msgstr "Rengør kattebakken"
|
||||
|
||||
msgid "Change the bed sheets"
|
||||
msgstr ""
|
||||
msgstr "Skift sengetøj"
|
||||
|
||||
msgid "Swedish"
|
||||
msgstr "Svensk"
|
||||
@@ -381,7 +382,39 @@ msgid "Dinner"
|
||||
msgstr "Aftensmad"
|
||||
|
||||
msgid "Catalan"
|
||||
msgstr ""
|
||||
msgstr "Catalansk"
|
||||
|
||||
msgid "Slovenian"
|
||||
msgstr "Slovensk"
|
||||
|
||||
msgid "Lithuanian"
|
||||
msgstr "Litauisk"
|
||||
|
||||
msgid "Ukrainian"
|
||||
msgstr "Ukrainsk"
|
||||
|
||||
msgid "Kilogram"
|
||||
msgid_plural "Kilograms"
|
||||
msgstr[0] "Kilogram"
|
||||
msgstr[1] "Kilogram"
|
||||
|
||||
msgid "Romanian"
|
||||
msgstr "Rumænsk"
|
||||
|
||||
msgid "Pint"
|
||||
msgstr ""
|
||||
|
||||
msgid "Beverages"
|
||||
msgstr ""
|
||||
|
||||
msgid "Ice Cream"
|
||||
msgstr ""
|
||||
|
||||
msgid "Soda"
|
||||
msgstr ""
|
||||
|
||||
msgid "Beer"
|
||||
msgstr ""
|
||||
|
||||
msgid "Estonian"
|
||||
msgstr ""
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#
|
||||
# Translators:
|
||||
# klavslund <klavslund@gmail.com>, 2021
|
||||
# Brian Moos Lindberg <brian@blueeel.dk>, 2022
|
||||
# hskdk <henrik@skjaerbaek.net>, 2023
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
@@ -8,8 +10,8 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-05-01T17:59:17+00:00\n"
|
||||
"PO-Revision-Date: 2020-08-31 19:11+0000\n"
|
||||
"Last-Translator: klavslund <klavslund@gmail.com>, 2021\n"
|
||||
"Language-Team: Danish (https://www.transifex.com/grocy/teams/93189/da/)\n"
|
||||
"Last-Translator: hskdk <henrik@skjaerbaek.net>, 2023\n"
|
||||
"Language-Team: Danish (https://app.transifex.com/grocy/teams/93189/da/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
@@ -95,7 +97,7 @@ msgstr "sk_SK"
|
||||
|
||||
# Slovenian
|
||||
msgid "sl"
|
||||
msgstr ""
|
||||
msgstr "sl"
|
||||
|
||||
# Swedish
|
||||
msgid "sv_SE"
|
||||
@@ -127,4 +129,20 @@ msgstr "fi"
|
||||
|
||||
# Catalan
|
||||
msgid "ca"
|
||||
msgstr "cat"
|
||||
|
||||
# Lithuanian
|
||||
msgid "lt"
|
||||
msgstr "lt"
|
||||
|
||||
# Ukrainian
|
||||
msgid "uk"
|
||||
msgstr "ukr"
|
||||
|
||||
# Romanian
|
||||
msgid "ro_RO"
|
||||
msgstr "ro_RO"
|
||||
|
||||
# Estonian
|
||||
msgid "et_EE"
|
||||
msgstr ""
|
||||
|
@@ -2,6 +2,7 @@
|
||||
# Translators:
|
||||
# Mihai Marinescu <mihai@marinescu.dk>, 2020
|
||||
# klavslund <klavslund@gmail.com>, 2021
|
||||
# hskdk <henrik@skjaerbaek.net>, 2023
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
@@ -9,8 +10,8 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-05-01T17:59:17+00:00\n"
|
||||
"PO-Revision-Date: 2020-08-29 16:33+0000\n"
|
||||
"Last-Translator: klavslund <klavslund@gmail.com>, 2021\n"
|
||||
"Language-Team: Danish (https://www.transifex.com/grocy/teams/93189/da/)\n"
|
||||
"Last-Translator: hskdk <henrik@skjaerbaek.net>, 2023\n"
|
||||
"Language-Team: Danish (https://app.transifex.com/grocy/teams/93189/da/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
@@ -112,7 +113,7 @@ msgstr "INDKØBSLISTE"
|
||||
|
||||
# Chores
|
||||
msgid "CHORES"
|
||||
msgstr "GØREMÅL"
|
||||
msgstr "PLIGTER"
|
||||
|
||||
# Batteries
|
||||
msgid "BATTERIES"
|
||||
|
@@ -11,7 +11,7 @@ msgstr ""
|
||||
"POT-Creation-Date: 2019-05-01T17:59:17+00:00\n"
|
||||
"PO-Revision-Date: 2019-05-01 17:42+0000\n"
|
||||
"Last-Translator: Mihai Marinescu <mihai@marinescu.dk>, 2020\n"
|
||||
"Language-Team: Danish (https://www.transifex.com/grocy/teams/93189/da/)\n"
|
||||
"Language-Team: Danish (https://app.transifex.com/grocy/teams/93189/da/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
@@ -2,13 +2,15 @@
|
||||
# Translators:
|
||||
# Bernd Bestel <bernd@berrnd.de>, 2019
|
||||
# Troels Siggaard <troels@siggaard.com>, 2019
|
||||
# Brian Moos Lindberg <brian@blueeel.dk>, 2019
|
||||
# Mihai Marinescu <mihai@marinescu.dk>, 2020
|
||||
# Kim Bardrum <kim.bardrum@gmail.com>, 2021
|
||||
# Michael Winkel <mbw@mbw.dk>, 2021
|
||||
# klavslund <klavslund@gmail.com>, 2021
|
||||
# dark159123 <r.j.hansen@protonmail.com>, 2021
|
||||
# Jesper Donnis, 2021
|
||||
# Brian Moos Lindberg <brian@blueeel.dk>, 2022
|
||||
# Tobias Østergaard-Jørgensen, 2023
|
||||
# hskdk <henrik@skjaerbaek.net>, 2023
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
@@ -16,8 +18,8 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-05-01T17:59:17+00:00\n"
|
||||
"PO-Revision-Date: 2019-05-01 17:42+0000\n"
|
||||
"Last-Translator: Jesper Donnis, 2021\n"
|
||||
"Language-Team: Danish (https://www.transifex.com/grocy/teams/93189/da/)\n"
|
||||
"Last-Translator: hskdk <henrik@skjaerbaek.net>, 2023\n"
|
||||
"Language-Team: Danish (https://app.transifex.com/grocy/teams/93189/da/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
@@ -26,7 +28,7 @@ msgstr ""
|
||||
"X-Domain: grocy/strings\n"
|
||||
|
||||
msgid "Stock overview"
|
||||
msgstr "Varebeholdning"
|
||||
msgstr "Lagerbeholdning"
|
||||
|
||||
msgid "%s product expires"
|
||||
msgid_plural "%s products expiring"
|
||||
@@ -68,7 +70,7 @@ msgid "Logout"
|
||||
msgstr "Log ud"
|
||||
|
||||
msgid "Chores overview"
|
||||
msgstr "Planlagte gøremål"
|
||||
msgstr "Oversigt over pligter"
|
||||
|
||||
msgid "Batteries overview"
|
||||
msgstr "Batterioversigt"
|
||||
@@ -86,7 +88,7 @@ msgid "Shopping list"
|
||||
msgstr "Indkøbsliste"
|
||||
|
||||
msgid "Chore tracking"
|
||||
msgstr "Registering af gøremål"
|
||||
msgstr "Opfølgning af pligter"
|
||||
|
||||
msgid "Battery tracking"
|
||||
msgstr "Registrering af batterier"
|
||||
@@ -98,16 +100,16 @@ msgid "Stores"
|
||||
msgstr "Butikker"
|
||||
|
||||
msgid "Quantity units"
|
||||
msgstr "Mængdeenheder"
|
||||
msgstr "Måleenheder"
|
||||
|
||||
msgid "Chores"
|
||||
msgstr "Gøremål"
|
||||
msgstr "Pligter"
|
||||
|
||||
msgid "Batteries"
|
||||
msgstr "Batterier"
|
||||
|
||||
msgid "Chore"
|
||||
msgstr "Gøremål"
|
||||
msgstr "Pligt"
|
||||
|
||||
msgid "Next estimated tracking"
|
||||
msgstr "Næste forventede registrering"
|
||||
@@ -165,7 +167,7 @@ msgid "Tracked time"
|
||||
msgstr "Tid registreret"
|
||||
|
||||
msgid "Chore overview"
|
||||
msgstr "Gøremål"
|
||||
msgstr "Pligt oversigt"
|
||||
|
||||
msgid "Tracked count"
|
||||
msgstr "Antal registrerede"
|
||||
@@ -218,9 +220,6 @@ msgstr "Standard købsenhed"
|
||||
msgid "Quantity unit stock"
|
||||
msgstr "Lager-enhed"
|
||||
|
||||
msgid "Factor purchase to stock quantity unit"
|
||||
msgstr "Konverteringfaktor fra købs-enhed til lager-enhed"
|
||||
|
||||
msgid "Create location"
|
||||
msgstr "Opret placering"
|
||||
|
||||
@@ -228,7 +227,7 @@ msgid "Create store"
|
||||
msgstr "Opret butik"
|
||||
|
||||
msgid "Create quantity unit"
|
||||
msgstr "Opret mængdeenhed"
|
||||
msgstr "Opret måleenhed"
|
||||
|
||||
msgid "Period type"
|
||||
msgstr "Periode type"
|
||||
@@ -237,7 +236,7 @@ msgid "Period days"
|
||||
msgstr "Periode dage"
|
||||
|
||||
msgid "Create chore"
|
||||
msgstr "Opret nyt gøremål"
|
||||
msgstr "Opret ny pligt"
|
||||
|
||||
msgid "Used in"
|
||||
msgstr "Brugt i"
|
||||
@@ -249,10 +248,10 @@ msgid "Edit battery"
|
||||
msgstr "Rediger batteri"
|
||||
|
||||
msgid "Edit chore"
|
||||
msgstr "Rediger gøremål"
|
||||
msgstr "Rediger pligt"
|
||||
|
||||
msgid "Edit quantity unit"
|
||||
msgstr "Rediger mængdeenhed"
|
||||
msgstr "Rediger måleenhed"
|
||||
|
||||
msgid "Edit product"
|
||||
msgstr "Rediger vare"
|
||||
@@ -275,9 +274,6 @@ msgstr "aldrig"
|
||||
msgid "Add products that are below defined min. stock amount"
|
||||
msgstr "Tilføj varer der er under minimumsbeholdningen"
|
||||
|
||||
msgid "This means 1 %1$s purchased will be converted into %2$s %3$s in stock"
|
||||
msgstr "Dette betyder 1 %1$s købt bliver konverteret til %2$s %3$s på lageret"
|
||||
|
||||
msgid "Login"
|
||||
msgstr "Log ind"
|
||||
|
||||
@@ -300,7 +296,7 @@ msgid "No"
|
||||
msgstr "Nej"
|
||||
|
||||
msgid "Are you sure to delete chore \"%s\"?"
|
||||
msgstr "Er du sikker på du vil slette gøremålet \"%s\"?"
|
||||
msgstr "Er du sikker på du vil slette pligt \"%s\"?"
|
||||
|
||||
msgid "\"%s\" could not be resolved to a product, how do you want to proceed?"
|
||||
msgstr "\"%s\" kunne ikke findes som vare. Hvordan vil du fortsætte?"
|
||||
@@ -321,7 +317,7 @@ msgid "Add as new product and prefill barcode"
|
||||
msgstr "Tilføj som ny vare og udfyld stregkoden på forhånd"
|
||||
|
||||
msgid "Are you sure to delete quantity unit \"%s\"?"
|
||||
msgstr "Er du sikker på du vil slette mængdeenheden \"%s\"?"
|
||||
msgstr "Er du sikker på du vil slette måleenheden \"%s\"?"
|
||||
|
||||
msgid "Are you sure to delete product \"%s\"?"
|
||||
msgstr "Er du sikker på du vil slette varen \"%s\"?"
|
||||
@@ -365,8 +361,8 @@ msgstr "Dette betyder at %s bliver fjernet fra beholdningen"
|
||||
msgid "Removed %1$s of %2$s from stock"
|
||||
msgstr "Fjerede %1$s af %2$s fra beholdningen"
|
||||
|
||||
msgid "About grocy"
|
||||
msgstr "Om grocy"
|
||||
msgid "About Grocy"
|
||||
msgstr ""
|
||||
|
||||
msgid "Close"
|
||||
msgstr "Luk"
|
||||
@@ -381,7 +377,7 @@ msgid "Stock amount of %1$s is now %2$s"
|
||||
msgstr "Beholdning af %1$s er nu %2$s"
|
||||
|
||||
msgid "Tracked execution of chore %1$s on %2$s"
|
||||
msgstr "Registreret udførelse af gøremålet %1$s på %2$s"
|
||||
msgstr "Registreret udførelse af pligt %1$s på %2$s"
|
||||
|
||||
msgid "Tracked charge cycle of battery %1$s on %2$s"
|
||||
msgstr "Registreret ladecyklus af batteri %1$s på %2$s"
|
||||
@@ -402,7 +398,7 @@ msgid "You have to select a product"
|
||||
msgstr "Du skal vælge en vare"
|
||||
|
||||
msgid "You have to select a chore"
|
||||
msgstr "Du skal vælge et gøremål"
|
||||
msgstr "Du skal vælge en pligt"
|
||||
|
||||
msgid "You have to select a battery"
|
||||
msgstr "Du skal vælge et batteri"
|
||||
@@ -555,7 +551,7 @@ msgid "Unknown"
|
||||
msgstr "Ukendt"
|
||||
|
||||
msgid "Chores journal"
|
||||
msgstr "Gøremål historik"
|
||||
msgstr "Pligt historik"
|
||||
|
||||
msgid "0 means suggestions for the next charge cycle are disabled"
|
||||
msgstr "0 betyder forslag til næste ladecyklus er deaktiveret"
|
||||
@@ -586,12 +582,12 @@ msgstr[1] "%s Enheder "
|
||||
msgid "%s chore is due to be done"
|
||||
msgid_plural "%s chores are due to be done"
|
||||
msgstr[0] "%s pligt forfalder nu"
|
||||
msgstr[1] "%s gøremål forfalder nu"
|
||||
msgstr[1] "%s pligt(er) forfalder nu"
|
||||
|
||||
msgid "%s chore is overdue to be done"
|
||||
msgid_plural "%s chores are overdue to be done"
|
||||
msgstr[0] "%s pligt er forfalden"
|
||||
msgstr[1] "%s gøremål er forfaldne"
|
||||
msgstr[1] "%s pligt(er) er forfaldne"
|
||||
|
||||
msgid "%s battery is due to be charged"
|
||||
msgid_plural "%s batteries are due to be charged"
|
||||
@@ -607,7 +603,7 @@ msgid "in singular form"
|
||||
msgstr "i ental"
|
||||
|
||||
msgid "Quantity unit"
|
||||
msgstr "Mængdeenhed"
|
||||
msgstr "Måleenhed"
|
||||
|
||||
msgid "Only check if any amount is in stock"
|
||||
msgstr "Marker kun hvis der er lagerbeholdning"
|
||||
@@ -826,10 +822,10 @@ msgid "Undo charge cycle"
|
||||
msgstr "Fortryd ladecyklus"
|
||||
|
||||
msgid "Undo chore execution"
|
||||
msgstr "Fortryd afslutning af gøremål"
|
||||
msgstr "Fortryd afslutning af pligt"
|
||||
|
||||
msgid "Chore execution successfully undone"
|
||||
msgstr "Udførelsen af gøremålet er nulstillet"
|
||||
msgstr "Udførelsen af pligten er nulstillet"
|
||||
|
||||
msgid "Undo"
|
||||
msgstr "Fortryd"
|
||||
@@ -885,7 +881,7 @@ msgid "Task due"
|
||||
msgstr "Opgave forfalder"
|
||||
|
||||
msgid "Chore due"
|
||||
msgstr "Gøremålet skal udføres"
|
||||
msgstr "Pligt(er) der skal udføres"
|
||||
|
||||
msgid "Battery charge cycle due"
|
||||
msgstr "Batteri ladecyklus forfalder"
|
||||
@@ -1033,7 +1029,7 @@ msgid "Delete shopping list"
|
||||
msgstr "Slet indkøbsliste"
|
||||
|
||||
msgid "Chores settings"
|
||||
msgstr "Indstillinger for gøremål"
|
||||
msgstr "Indstillinger for pligter"
|
||||
|
||||
msgid "Batteries settings"
|
||||
msgstr "Batteri-indstillinger"
|
||||
@@ -1227,8 +1223,8 @@ msgid ""
|
||||
"When enabled the chore can never be overdue, the due date will shift forward"
|
||||
" each day when due"
|
||||
msgstr ""
|
||||
"Når aktiveret kan gøremålet aldrig være efter forfaldsdatoen, forfaldsdatoen"
|
||||
" rykkes frem for hver dag gøremålet ikke udføres"
|
||||
"Når aktiveret kan en pligt aldrig komme efter forfaldsdatoen, forfaldsdatoen"
|
||||
" rykkes frem for hver dag pligten ikke udføres"
|
||||
|
||||
msgid "Location Content Sheet"
|
||||
msgstr "Placeringer"
|
||||
@@ -1284,10 +1280,10 @@ msgid "Default for QU"
|
||||
msgstr "Standard for mængdeenhed"
|
||||
|
||||
msgid "Quantity unit from"
|
||||
msgstr "Mængdeenhed fra"
|
||||
msgstr "Måleenhed fra"
|
||||
|
||||
msgid "Quantity unit to"
|
||||
msgstr "Mængdeenhed til"
|
||||
msgstr "Måleenhed til"
|
||||
|
||||
msgid "This cannot be equal to %s"
|
||||
msgstr "Dette kan ikke være lig med %s"
|
||||
@@ -1298,9 +1294,6 @@ msgstr "Dette betyder at 1 %1$s er det samme som %2$s %3$s"
|
||||
msgid "QU conversions"
|
||||
msgstr "Mængdeenhedskonverteringer"
|
||||
|
||||
msgid "Product overrides"
|
||||
msgstr "Vareoverstyringer"
|
||||
|
||||
msgid "Override for product"
|
||||
msgstr "Overstyring for vare"
|
||||
|
||||
@@ -1350,35 +1343,39 @@ msgid_plural ""
|
||||
"This means the next execution of this chore is scheduled on the selected day"
|
||||
" every %s months"
|
||||
msgstr[0] ""
|
||||
"Dette betyder at den næste udførelse af denne pligt er planlagt til den "
|
||||
"valgte dag, hver måned"
|
||||
msgstr[1] ""
|
||||
"Dette betyder at den næste udførelse af denne pligt er planlagt til den "
|
||||
"valgte dag, hvert %s måned"
|
||||
|
||||
msgid "This means the next execution of this chore is not scheduled"
|
||||
msgstr "Det betyder at næste udførelse af dette gøremål ikke er planlagt"
|
||||
msgstr "Det betyder at næste udførelse af denne pligt ikke er planlagt"
|
||||
|
||||
msgid ""
|
||||
"This means the next execution of this chore will not be assigned to anyone"
|
||||
msgstr ""
|
||||
"Det betyder at den næste udførelse af dette gøremål ikke vil blive tildelt "
|
||||
"til nogen"
|
||||
"Det betyder at den næste udførelse af denne pligt ikke vil blive tildelt til"
|
||||
" nogen"
|
||||
|
||||
msgid ""
|
||||
"This means the next execution of this chore will be assigned to the one who "
|
||||
"executed it least"
|
||||
msgstr ""
|
||||
"Det betyder at næste udførelse af dette gøremål vil blive tildelt til den "
|
||||
"som har udført den mindst"
|
||||
"Det betyder at næste udførelse af denne pligt vil blive tildelt til den som "
|
||||
"har udført den mindst"
|
||||
|
||||
msgid "This means the next execution of this chore will be assigned randomly"
|
||||
msgstr ""
|
||||
"Det betyder at den næste udførelse af dette gøremål vil blive tildelt "
|
||||
"Det betyder at den næste udførelse af denne pligt vil blive tildelt "
|
||||
"tilfældigt"
|
||||
|
||||
msgid ""
|
||||
"This means the next execution of this chore will be assigned to the next one"
|
||||
" in alphabetical order"
|
||||
msgstr ""
|
||||
"Det betyder at den næste udførelse af dette gøremål vil blive tildelt til "
|
||||
"den næste i alfabetisk rækkefølge"
|
||||
"Det betyder at den næste udførelse af denne pligt vil blive tildelt til den "
|
||||
"næste i alfabetisk rækkefølge"
|
||||
|
||||
msgid "Assign to"
|
||||
msgstr "Tildel til"
|
||||
@@ -1401,7 +1398,7 @@ msgid "Assignment"
|
||||
msgstr "Tildelt"
|
||||
|
||||
msgid "Consume product on chore execution"
|
||||
msgstr "Forbrug vare ved udførsel af gøremål"
|
||||
msgstr "Forbrug vare ved udførsel af pligt"
|
||||
|
||||
msgid "Are you sure to delete user field \"%s\"?"
|
||||
msgstr "Er du sikker på at du vil slette brugerfeltet \"%s\"?"
|
||||
@@ -1437,7 +1434,7 @@ msgid "Configure fields"
|
||||
msgstr "Konfigurer felter"
|
||||
|
||||
msgid "Quantity unit plural form testing"
|
||||
msgstr "Mængdeenhed flertalsform test"
|
||||
msgstr "Måleenhed flertalsform test"
|
||||
|
||||
msgid "Result"
|
||||
msgstr "Resultat"
|
||||
@@ -1458,8 +1455,8 @@ msgstr "Prisen for denne ingrediens vil blive ganget med denne faktor"
|
||||
msgid "Price factor"
|
||||
msgstr "Prisfaktor"
|
||||
|
||||
msgid "Do you find grocy useful?"
|
||||
msgstr "Er grocy brugbart?"
|
||||
msgid "Do you find Grocy useful?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Say thanks"
|
||||
msgstr "Sig tak"
|
||||
@@ -1476,8 +1473,8 @@ msgstr "Tilføjet %1$s af %2$s til indkøbslisten \"%3$s\""
|
||||
msgid "Output"
|
||||
msgstr "Output"
|
||||
|
||||
msgid "Energy (kcal)"
|
||||
msgstr "Energi (kcal)"
|
||||
msgid "Energy"
|
||||
msgstr "Energi"
|
||||
|
||||
msgid "Per stock quantity unit"
|
||||
msgstr "Per lagerenhed"
|
||||
@@ -1585,10 +1582,8 @@ msgstr "Rediger lagerpostering"
|
||||
|
||||
msgid ""
|
||||
"Camera access is only possible when supported and allowed by your browser "
|
||||
"and when grocy is served via a secure (https://) connection"
|
||||
"and when Grocy is served via a secure (https://) connection"
|
||||
msgstr ""
|
||||
"Kamera adgang er kun muligt når det er supporteret og tilladt af din browser"
|
||||
" og når grocy tilgås beskyttet med (https://) forbindelse"
|
||||
|
||||
msgid "Keep screen on"
|
||||
msgstr "Hold skærmen tændt"
|
||||
@@ -1869,7 +1864,7 @@ msgid "Save & continue to add conversions"
|
||||
msgstr "Gem og fortsæt med enheds-omregninger"
|
||||
|
||||
msgid "Save & return to quantity units"
|
||||
msgstr "Gem & returner til mængde-enheder"
|
||||
msgstr "Gem & returner til måleenheder"
|
||||
|
||||
msgid "price"
|
||||
msgstr "pris"
|
||||
@@ -1896,10 +1891,10 @@ msgid "Transaction time"
|
||||
msgstr "Transaktions-tid"
|
||||
|
||||
msgid "Chore journal"
|
||||
msgstr "Historik over gøremål"
|
||||
msgstr "Historik over pligter"
|
||||
|
||||
msgid "Track chore execution"
|
||||
msgstr "Gennemførte gøremål, oversigt"
|
||||
msgid "Track next chore schedule"
|
||||
msgstr ""
|
||||
|
||||
msgid "Mark task as completed"
|
||||
msgstr "Marker opgave som afsluttet"
|
||||
@@ -1923,9 +1918,9 @@ msgid "Show a QR-Code for this API key"
|
||||
msgstr "Vis QR kode for API nøglen"
|
||||
|
||||
msgid ""
|
||||
"This is the default quantity unit used when adding this product to the "
|
||||
"shopping list"
|
||||
msgstr "Dette er standard indkøbs enheden når en vare tilføjes indkøbslisten."
|
||||
"This is the default quantity unit used on purchase and when adding this "
|
||||
"product to the shopping list"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Show a warning when the due date of the purchased product is earlier than "
|
||||
@@ -1949,11 +1944,14 @@ msgid "Quick consume amount"
|
||||
msgstr "Hurtig nedskrivning af mængde"
|
||||
|
||||
msgid ""
|
||||
"This amount is used for the \"quick consume/open buttons\" on the stock "
|
||||
"overview page (related to quantity unit stock)"
|
||||
"This amount is used for the \"quick consume button\" on the stock overview "
|
||||
"page (related to quantity unit stock)"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"This amount is used for the \"quick open button\" on the stock overview page"
|
||||
" (related to quantity unit stock)"
|
||||
msgstr ""
|
||||
"Denne mængde anvendes af ‘hurtig’ nedskrivningknapperne i lageroversigten, "
|
||||
"(bruger lager enheden)."
|
||||
|
||||
msgid "Copy"
|
||||
msgstr "Kopier"
|
||||
@@ -2045,7 +2043,7 @@ msgid "Expired"
|
||||
msgstr "Udløbet"
|
||||
|
||||
msgid "Due soon days"
|
||||
msgstr "Udløber snart, (dage)"
|
||||
msgstr "Forfalder snart, (dage)"
|
||||
|
||||
msgid "Add overdue/expired products"
|
||||
msgstr "Tilføj varer der er udløbet, for gamle"
|
||||
@@ -2116,7 +2114,7 @@ msgid "Use the products \"Quick consume amount\""
|
||||
msgstr "Brug varens værdi for ‘hurtig nedskrivning’"
|
||||
|
||||
msgid "Disabled"
|
||||
msgstr "De-aktiveret"
|
||||
msgstr "Deaktiveret"
|
||||
|
||||
msgid ""
|
||||
"This also removes any stock amount, the journal and all other references of "
|
||||
@@ -2128,7 +2126,7 @@ msgstr ""
|
||||
"beholde historikken."
|
||||
|
||||
msgid "Show disabled"
|
||||
msgstr "Vis de-aktiverede"
|
||||
msgstr "Vis deaktiverede"
|
||||
|
||||
msgid "Never show on stock overview"
|
||||
msgstr "Vis aldrig på lageroversigten"
|
||||
@@ -2223,26 +2221,24 @@ msgstr "Udskrifts-muligheder"
|
||||
msgid "A product or a note is required"
|
||||
msgstr "Der behøves en vare eller en note"
|
||||
|
||||
msgid "grocycode"
|
||||
msgstr "grocycode"
|
||||
msgid "Grocycode"
|
||||
msgstr ""
|
||||
|
||||
msgid "Download"
|
||||
msgstr "Download"
|
||||
|
||||
# Example: Download *Product* grocycode
|
||||
msgid "Download %s grocycode"
|
||||
msgstr "Download %s grocycode"
|
||||
# Example: Download *Product* Grocycode
|
||||
msgid "Download %s Grocycode"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"grocycode is a unique referer to this %s in your grocy instance - print it "
|
||||
"Grocycode is a unique referer to this %s in your Grocy instance - print it "
|
||||
"onto a label and scan it like any other barcode"
|
||||
msgstr ""
|
||||
"grocycode er en unik reference til %s i din grocy installation - print den "
|
||||
"på en label og skan den som enhver anden stregkode"
|
||||
|
||||
# Abbreviation for "due date"
|
||||
msgid "DD"
|
||||
msgstr ""
|
||||
msgstr "Dato"
|
||||
|
||||
msgid "Print on label printer"
|
||||
msgstr "Print på labelprinter"
|
||||
@@ -2260,20 +2256,20 @@ msgid "Single label"
|
||||
msgstr ""
|
||||
|
||||
msgid "Label per unit"
|
||||
msgstr ""
|
||||
msgstr "Label pr. enhed"
|
||||
|
||||
msgid "Error while executing WebHook"
|
||||
msgstr ""
|
||||
msgstr "Fejl ved afvikling af WebHook"
|
||||
|
||||
# Example: Print *Product* grocycode on label printer
|
||||
msgid "Print %s grocycode on label printer"
|
||||
msgstr "Print %s grocycode på labelprinter"
|
||||
# Example: Print *Product* Grocycode on label printer
|
||||
msgid "Print %s Grocycode on label printer"
|
||||
msgstr ""
|
||||
|
||||
msgid "Open stock entry label in new window"
|
||||
msgstr ""
|
||||
|
||||
msgid "Thermal printer"
|
||||
msgstr ""
|
||||
msgstr "Labelprinter"
|
||||
|
||||
msgid "Printing"
|
||||
msgstr "Printer"
|
||||
@@ -2285,7 +2281,7 @@ msgid "Unable to print"
|
||||
msgstr "Kan ikke printe"
|
||||
|
||||
msgid "Only done items"
|
||||
msgstr ""
|
||||
msgstr "Kun færdige punkter"
|
||||
|
||||
msgid "Show only in-stock products"
|
||||
msgstr "Vis kun varer på lager"
|
||||
@@ -2295,10 +2291,10 @@ msgstr "Produktbeskrivelse"
|
||||
|
||||
# Example: *3.21 USD* per *Pack*
|
||||
msgid "%1$s per %2$s"
|
||||
msgstr ""
|
||||
msgstr "%1$spr %2$s"
|
||||
|
||||
msgid "Mark this item as undone"
|
||||
msgstr ""
|
||||
msgstr "Marker dette punkt som ufærdigt"
|
||||
|
||||
msgid "Mandatory"
|
||||
msgstr "Obligatorisk"
|
||||
@@ -2314,7 +2310,7 @@ msgid "In-stock products"
|
||||
msgstr "Varer på lager"
|
||||
|
||||
msgid "Timestamp"
|
||||
msgstr ""
|
||||
msgstr "Tidsstempel"
|
||||
|
||||
msgid "Should not be frozen"
|
||||
msgstr "Bør ikke fryses"
|
||||
@@ -2330,7 +2326,7 @@ msgid "This product shouldn't be frozen"
|
||||
msgstr "Dette produkt bør ikke fryses"
|
||||
|
||||
msgid "Copy all meal plan entries of %s"
|
||||
msgstr ""
|
||||
msgstr "Kopier alle madplans elementer fra %s"
|
||||
|
||||
msgid "A date is required"
|
||||
msgstr "En dato er påkrævet"
|
||||
@@ -2342,7 +2338,7 @@ msgid "Add recipe"
|
||||
msgstr "Tilføj opskrift"
|
||||
|
||||
msgid "Copy this day"
|
||||
msgstr ""
|
||||
msgstr "Kopier denne dag"
|
||||
|
||||
msgid "Date range"
|
||||
msgstr "Datointerval"
|
||||
@@ -2367,7 +2363,7 @@ msgid "Copy of %s"
|
||||
msgstr "Kopi af %s"
|
||||
|
||||
msgid "Add decimal separator automatically for price inputs"
|
||||
msgstr ""
|
||||
msgstr "Tilføj automatisk decimalseparator ved pris indtastning"
|
||||
|
||||
msgid ""
|
||||
"When enabled, you always have to enter the value including decimal places, "
|
||||
@@ -2408,16 +2404,16 @@ msgid "This is the default which will be prefilled on purchase"
|
||||
msgstr ""
|
||||
|
||||
msgid "Merge chores"
|
||||
msgstr "Sammenlæg gøremål"
|
||||
msgstr "Sammenlæg pligter"
|
||||
|
||||
msgid "Chore to keep"
|
||||
msgstr "Gøremål der skal beholdes"
|
||||
msgstr "Pligt der beholdes"
|
||||
|
||||
msgid "After merging, this chore will be kept"
|
||||
msgstr ""
|
||||
msgstr "Efter sammenlægning, vil denne pligt blive gemt"
|
||||
|
||||
msgid "Chore to remove"
|
||||
msgstr "Gøremål der skal fjernes"
|
||||
msgstr "Pligt der fjernes"
|
||||
|
||||
msgid ""
|
||||
"After merging, all occurences of this chore will be replaced by the kept "
|
||||
@@ -2425,31 +2421,31 @@ msgid ""
|
||||
msgstr ""
|
||||
|
||||
msgid "Due today"
|
||||
msgstr ""
|
||||
msgstr "Forfalder i dag"
|
||||
|
||||
msgid "%s task is due to be done today"
|
||||
msgid_plural "%s tasks are due to be done today"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
msgstr[0] "%s opgave skal udføres i dag "
|
||||
msgstr[1] "%s opgaver skal udføres i dag "
|
||||
|
||||
msgid "%s chore is due to be done today"
|
||||
msgid_plural "%s chores are due to be done today"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
msgstr[0] "%s gøremål forfalder i dag"
|
||||
msgstr[1] "%s pligt(er) der forfalder i dag"
|
||||
|
||||
msgid "%s battery is due to be charged today"
|
||||
msgid_plural "%s batteries are due to be charged today"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
msgstr[0] "%s batter der skal oplades i dag"
|
||||
msgstr[1] "%s batterier der skal oplades i dag"
|
||||
|
||||
msgid "Set to 0 to hide due soon filters/highlighting"
|
||||
msgstr ""
|
||||
msgstr "Sæt til 0 for at skjule filtre/fremhævninger for snarlig forfald"
|
||||
|
||||
msgid "Save & close"
|
||||
msgstr ""
|
||||
msgstr "Gem & luk"
|
||||
|
||||
msgid "Save & add another task"
|
||||
msgstr ""
|
||||
msgstr "Gem & tilføj en anden opgave"
|
||||
|
||||
msgid "Treat opened as out of stock"
|
||||
msgstr ""
|
||||
@@ -2460,19 +2456,19 @@ msgid ""
|
||||
msgstr ""
|
||||
|
||||
msgid "Skipped"
|
||||
msgstr ""
|
||||
msgstr "Oversprunget"
|
||||
|
||||
msgid "Skip next chore schedule"
|
||||
msgstr ""
|
||||
msgstr "spring næste pligt plan over"
|
||||
|
||||
msgid "Time"
|
||||
msgstr ""
|
||||
msgstr "Tid"
|
||||
|
||||
msgid "A start date is required"
|
||||
msgstr ""
|
||||
msgstr "En startdato er påkrævet"
|
||||
|
||||
msgid "Start date"
|
||||
msgstr ""
|
||||
msgstr "Startdato"
|
||||
|
||||
msgid "The start date cannot be changed when the chore was once tracked"
|
||||
msgstr ""
|
||||
@@ -2486,39 +2482,45 @@ msgid ""
|
||||
msgstr ""
|
||||
|
||||
msgid "Average execution frequency"
|
||||
msgstr ""
|
||||
msgstr "Gennemsnitlig udførelses frekvens"
|
||||
|
||||
msgid "Reschedule next execution"
|
||||
msgstr ""
|
||||
msgstr "Genplanlæg næste udførelse"
|
||||
|
||||
msgid "This can only be in the future"
|
||||
msgstr ""
|
||||
msgstr "Dette kan kun være i fremtiden"
|
||||
|
||||
msgid "Rescheduled"
|
||||
msgstr ""
|
||||
msgstr "Genplanlæg"
|
||||
|
||||
msgid "Due score"
|
||||
msgstr ""
|
||||
msgstr "Udløbs score"
|
||||
|
||||
msgid ""
|
||||
"The higher this number is, the more ingredients currently in stock are due "
|
||||
"soon, overdue or already expired"
|
||||
msgstr ""
|
||||
"Des højere denne værdi at sat, des flere ingredienser pt på lager, vil blive"
|
||||
" markeret som skal bruges snart, skal bruges nu, eller udløbet"
|
||||
|
||||
msgid "Disable own stock"
|
||||
msgstr ""
|
||||
msgstr "Deaktiver egen lagerbeholdning"
|
||||
|
||||
msgid ""
|
||||
"When enabled, this product can't have own stock, means it will not be "
|
||||
"selectable on purchase (useful for parent products which are just used as a "
|
||||
"summary/total view of the child products)"
|
||||
msgstr ""
|
||||
"Hvis aktiveret kan denne vare ikke have egen beholdning. Det betyder den "
|
||||
"ikke kan indvælges ved køb (anvendelig ved overordnet vare som blot benyttes"
|
||||
" til summering af underordnede varer)."
|
||||
|
||||
msgid "Out of stock items will be shown at the products default location"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show a little checkbox next to each ingredient to mark it as done"
|
||||
msgstr ""
|
||||
"Vis en lille boks ved siden af hver ingrediens til at markere som færdigt"
|
||||
|
||||
msgid ""
|
||||
"The ingredient is crossed out when clicked, the status is not saved, means "
|
||||
@@ -2532,16 +2534,16 @@ msgid ""
|
||||
msgstr ""
|
||||
|
||||
msgid "Night mode"
|
||||
msgstr ""
|
||||
msgstr "Nattilstand"
|
||||
|
||||
msgid "On"
|
||||
msgstr ""
|
||||
msgstr "Til"
|
||||
|
||||
msgid "Use system setting"
|
||||
msgstr ""
|
||||
msgstr "Benyt systemindstilling"
|
||||
|
||||
msgid "Off"
|
||||
msgstr ""
|
||||
msgstr "Fra"
|
||||
|
||||
msgid ""
|
||||
"Automatically add products that are below their defined min. stock amount to"
|
||||
@@ -2549,28 +2551,28 @@ msgid ""
|
||||
msgstr ""
|
||||
|
||||
msgid "Reassigned"
|
||||
msgstr ""
|
||||
msgstr "Gentildelt"
|
||||
|
||||
msgid "Default value"
|
||||
msgstr ""
|
||||
msgstr "Standardværdi"
|
||||
|
||||
msgid "Now / today"
|
||||
msgstr ""
|
||||
msgstr "Nu / i dag"
|
||||
|
||||
msgid "Add meal plan entry"
|
||||
msgstr ""
|
||||
msgstr "Tilføj madplans element"
|
||||
|
||||
msgid "Edit meal plan entry"
|
||||
msgstr ""
|
||||
msgstr "Ret madplans punkt"
|
||||
|
||||
msgid "Default consume location"
|
||||
msgstr ""
|
||||
msgstr "Standard forbrugsplacering"
|
||||
|
||||
msgid "Stock entries at this location will be consumed first"
|
||||
msgstr ""
|
||||
msgstr "Vareposteringer på denne placering vil bliver forbrugt først"
|
||||
|
||||
msgid "Move on open"
|
||||
msgstr ""
|
||||
msgstr "Flyt ved åbning"
|
||||
|
||||
msgid ""
|
||||
"When enabled, on marking this product as opened, the corresponding amount "
|
||||
@@ -2578,10 +2580,111 @@ msgid ""
|
||||
msgstr ""
|
||||
|
||||
msgid "Moved to %1$s"
|
||||
msgstr ""
|
||||
msgstr "Flyttet til %1$s"
|
||||
|
||||
msgid "Decimal places allowed for prices (input)"
|
||||
msgstr ""
|
||||
msgstr "Decimaler tilladt for priser (indtastning)"
|
||||
|
||||
msgid "Decimal places allowed for prices (display)"
|
||||
msgstr "Decimaler tilladt for priser (visning)"
|
||||
|
||||
msgid "Clear done items"
|
||||
msgstr "Ryd udførte punkter"
|
||||
|
||||
msgid ""
|
||||
"This shows all to this product directly or indirectly related quantity units"
|
||||
" and their derived conversion factors"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show resolved conversions"
|
||||
msgstr ""
|
||||
|
||||
msgid "QU conversions resolved"
|
||||
msgstr "mængdeenhed konverteringsproblem løst"
|
||||
|
||||
msgid "Product specifc QU conversions"
|
||||
msgstr "Vare specifikke mængdeenhed omregning"
|
||||
|
||||
msgid "Default quantity unit consume"
|
||||
msgstr ""
|
||||
|
||||
msgid "This is the default quantity unit used when consuming this product"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add to meal plan"
|
||||
msgstr "Tilføj til madplan"
|
||||
|
||||
msgid "Successfully added the recipe to the meal plan"
|
||||
msgstr "Opskrift tilføjet til Madplan"
|
||||
|
||||
msgid "Reprint stock entry label"
|
||||
msgstr ""
|
||||
|
||||
msgid "Auto reprint stock entry label"
|
||||
msgstr "Auto genprint lager indtastningslabel"
|
||||
|
||||
msgid ""
|
||||
"When enabled, auto-changing the due date of a stock entry (by "
|
||||
"opening/freezing/thawing and having corresponding default due days set) will"
|
||||
" reprint its label"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quick open amount"
|
||||
msgstr ""
|
||||
|
||||
msgid "Track chore execution now"
|
||||
msgstr ""
|
||||
|
||||
msgid "Total"
|
||||
msgstr ""
|
||||
|
||||
msgid "Apply"
|
||||
msgstr ""
|
||||
|
||||
msgid "Custom range"
|
||||
msgstr ""
|
||||
|
||||
msgid "Yesterday"
|
||||
msgstr ""
|
||||
|
||||
msgid "Last %1$s day"
|
||||
msgid_plural "Last %1$s days"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
msgid "This month"
|
||||
msgstr ""
|
||||
|
||||
msgid "Last month"
|
||||
msgstr ""
|
||||
|
||||
msgid "This year"
|
||||
msgstr ""
|
||||
|
||||
msgid "Last year"
|
||||
msgstr ""
|
||||
|
||||
msgid "Reports"
|
||||
msgstr ""
|
||||
|
||||
msgid "Spendings"
|
||||
msgstr ""
|
||||
|
||||
msgid "Stock report"
|
||||
msgstr ""
|
||||
|
||||
msgid "Out-of-stock products"
|
||||
msgstr ""
|
||||
|
||||
msgid "Quantity unit for prices"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"When displaying prices for this product, they will be related to this "
|
||||
"quantity unit"
|
||||
msgstr ""
|
||||
|
||||
msgid "This means 1 label will be printed"
|
||||
msgid_plural "This means %1$s labels will be printed"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
@@ -11,7 +11,7 @@ msgstr ""
|
||||
"POT-Creation-Date: 2019-05-01T17:59:17+00:00\n"
|
||||
"PO-Revision-Date: 2019-05-01 17:43+0000\n"
|
||||
"Last-Translator: klavslund <klavslund@gmail.com>, 2021\n"
|
||||
"Language-Team: Danish (https://www.transifex.com/grocy/teams/93189/da/)\n"
|
||||
"Language-Team: Danish (https://app.transifex.com/grocy/teams/93189/da/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
@@ -9,7 +9,7 @@ msgstr ""
|
||||
"POT-Creation-Date: 2019-05-01T17:59:17+00:00\n"
|
||||
"PO-Revision-Date: 2019-09-17 10:45+0000\n"
|
||||
"Last-Translator: Bernd Bestel <bernd@berrnd.de>, 2021\n"
|
||||
"Language-Team: German (https://www.transifex.com/grocy/teams/93189/de/)\n"
|
||||
"Language-Team: German (https://app.transifex.com/grocy/teams/93189/de/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
@@ -9,7 +9,7 @@ msgstr ""
|
||||
"POT-Creation-Date: 2019-05-01T17:59:17+00:00\n"
|
||||
"PO-Revision-Date: 2019-05-01 17:42+0000\n"
|
||||
"Last-Translator: Bernd Bestel <bernd@berrnd.de>, 2022\n"
|
||||
"Language-Team: German (https://www.transifex.com/grocy/teams/93189/de/)\n"
|
||||
"Language-Team: German (https://app.transifex.com/grocy/teams/93189/de/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user