mirror of
				https://github.com/grocy/grocy.git
				synced 2025-10-31 18:49:38 +00:00 
			
		
		
		
	Compare commits
	
		
			279 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 98d95f80df | ||
|  | a72afa7174 | ||
|  | 0d145bbf1e | ||
|  | f6cf26009d | ||
|  | c042657dd8 | ||
|  | 43c9ab7734 | ||
|  | f6649d51bd | ||
|  | 2e265ac70a | ||
|  | 30e54997b2 | ||
|  | b9f0470d76 | ||
|  | bdcd176f81 | ||
|  | 04dacacd73 | ||
|  | a9502d1ddb | ||
|  | 5c25e91984 | ||
|  | 02163c4305 | ||
|  | c3731b3200 | ||
|  | 5cdf2c14d3 | ||
|  | e92d74f5c3 | ||
|  | 2b3516dadd | ||
|  | 8041dd9c26 | ||
|  | 2f7b78bc40 | ||
|  | 61fc6e05f4 | ||
|  | 367a3e52de | ||
|  | a3617cffb8 | ||
|  | ff341d8547 | ||
|  | 01fab6999f | ||
|  | b6152ce874 | ||
|  | ca5df3b217 | ||
|  | dd48be595c | ||
|  | 306d0f7da6 | ||
|  | c61c37e67a | ||
|  | f7f90238f2 | ||
|  | 589ad36855 | ||
|  | 5da24d2d4f | ||
|  | f7f2bf3fc0 | ||
|  | 34d1bdd53f | ||
|  | e021c93d22 | ||
|  | 2ff5faacc0 | ||
|  | a489190e81 | ||
|  | a403bb687a | ||
|  | 5966a3d678 | ||
|  | c71e46191f | ||
|  | 862fd7c644 | ||
|  | 10ea9c44fd | ||
|  | 816ca6460f | ||
|  | b6d60c4e34 | ||
|  | 6f67619784 | ||
|  | db0b48e7ae | ||
|  | 973f07b360 | ||
|  | 0f73d849eb | ||
|  | 1a6849ad37 | ||
|  | 8f31f891fd | ||
|  | 83985e9f21 | ||
|  | 04e9ba8e34 | ||
|  | 960ee919f9 | ||
|  | f4534a4bfb | ||
|  | 89553b7fa0 | ||
|  | 364f6b2051 | ||
|  | fe83e2fa6f | ||
|  | 1f3dd58ddf | ||
|  | da98efa833 | ||
|  | 3e6cf545d7 | ||
|  | 1080c3486c | ||
|  | cd7b6b686d | ||
|  | b84e6da0dd | ||
|  | fc3a4c6899 | ||
|  | 12a2cb0bdf | ||
|  | 57a0864465 | ||
|  | b3da837ede | ||
|  | 3de3e03ab3 | ||
|  | 78865a9d3c | ||
|  | 5b3230d63d | ||
|  | 04c93d937e | ||
|  | 5318e79f55 | ||
|  | 7bf4421d44 | ||
|  | 366152c049 | ||
|  | 70c00e81d9 | ||
|  | f13abf483e | ||
|  | 0e723a0a9b | ||
|  | 4a35477c35 | ||
|  | df7d360516 | ||
|  | 03eaa6c79f | ||
|  | 132999ce36 | ||
|  | 188407e3c7 | ||
|  | 8cf68ade30 | ||
|  | d62657c698 | ||
|  | 3262e534dc | ||
|  | 6202e8bda7 | ||
|  | 9984e8f218 | ||
|  | b0c91f6ad1 | ||
|  | 9e24586190 | ||
|  | 7ba6fc875b | ||
|  | 3b10906e78 | ||
|  | ebd24bf30e | ||
|  | ebd9b1b851 | ||
|  | b242a5de52 | ||
|  | 81ec011095 | ||
|  | 2a371cc081 | ||
|  | edb986ce24 | ||
|  | f90faca62e | ||
|  | 6090ac621e | ||
|  | ae58606d04 | ||
|  | bb9caf9cc9 | ||
|  | 9dd57decdf | ||
|  | f1fc0ee549 | ||
|  | fcdeb33426 | ||
|  | 44cd26ae77 | ||
|  | 04f34ea6b0 | ||
|  | e5fb609c8e | ||
|  | c675b534ef | ||
|  | 6c74881f95 | ||
|  | 756ec319cc | ||
|  | ba2d32be60 | ||
|  | 7cc09cec67 | ||
|  | 8b815fce93 | ||
|  | f1c78659be | ||
|  | 5c79a80f7a | ||
|  | f451e65278 | ||
|  | 176333df5b | ||
|  | d4227d2e41 | ||
|  | 0bbd2d9880 | ||
|  | b81316bd60 | ||
|  | d11dcb38fe | ||
|  | 77d82f22dc | ||
|  | be326a5211 | ||
|  | 83624eaf27 | ||
|  | 055619d275 | ||
|  | cda3dde120 | ||
|  | 5a0b862d22 | ||
|  | bb5fd8360b | ||
|  | d7180bd7b2 | ||
|  | 8c9b0dedb2 | ||
|  | 9c2c2c1fa2 | ||
|  | 596dc9e36d | ||
|  | b2019ba42d | ||
|  | 003d4a567a | ||
|  | 5112e0f551 | ||
|  | 8008fcdc65 | ||
|  | 8d41dcc650 | ||
|  | 037d024862 | ||
|  | 03ca5cd45b | ||
|  | 60d47bef84 | ||
|  | 98a7bcb044 | ||
|  | 7401971884 | ||
|  | 067a10e1b2 | ||
|  | ddfe33fab6 | ||
|  | 2a0ec30bb0 | ||
|  | 8540fc44f3 | ||
|  | 66095738e3 | ||
|  | e472711d23 | ||
|  | 8e054a4981 | ||
|  | feb28211d8 | ||
|  | 06f25b7006 | ||
|  | f85a67a1ff | ||
|  | 6fe0100927 | ||
|  | bcb359e317 | ||
|  | 4075067a10 | ||
|  | bd3c63218b | ||
|  | 27daf384da | ||
|  | 905fc0f357 | ||
|  | 9cd0e4ab2d | ||
|  | 6b38cd450f | ||
|  | bb60f5f043 | ||
|  | e777be4d3b | ||
|  | 8a71d55f0f | ||
|  | b01b49d10c | ||
|  | 496594d898 | ||
|  | 1d5e82c341 | ||
|  | a9b696f41c | ||
|  | e50b1eb359 | ||
|  | 92e0245387 | ||
|  | 67d0d3c3d6 | ||
|  | 23bcbc23e9 | ||
|  | 085d9a0bc7 | ||
|  | 368df142cf | ||
|  | d38edabb14 | ||
|  | 4426a10e2e | ||
|  | 931dc9d243 | ||
|  | c5b8893008 | ||
|  | c27f41aee4 | ||
|  | ef043b38ce | ||
|  | bb261f99c4 | ||
|  | 48ca0f2ac7 | ||
|  | b7f0b06684 | ||
|  | 324487d395 | ||
|  | 9a8c61497b | ||
|  | bc7afe4bdd | ||
|  | bb5dcb2434 | ||
|  | 71b9d11ff5 | ||
|  | 3e73a44576 | ||
|  | dedfe3a854 | ||
|  | c4b0ef4d49 | ||
|  | 339d81318f | ||
|  | 282ee0885b | ||
|  | 5833364e51 | ||
|  | 525f1705d1 | ||
|  | 5a13cb5ffe | ||
|  | e830805443 | ||
|  | ca3f28b615 | ||
|  | 6081b8ee67 | ||
|  | 7eef4acd81 | ||
|  | 678579e933 | ||
|  | 4cc2d39063 | ||
|  | 14cc153422 | ||
|  | f5b5c4c7e1 | ||
|  | 88b76a52a5 | ||
|  | a4a25af460 | ||
|  | 41a72d11da | ||
|  | c8236b101b | ||
|  | ef1df0a446 | ||
|  | 5c4953b9b2 | ||
|  | ccaf2411fe | ||
|  | bce8bd6b35 | ||
|  | 66c07887cb | ||
|  | be99880ce4 | ||
|  | e026609972 | ||
|  | 3474f55866 | ||
|  | f583810d5c | ||
|  | 419445f5ae | ||
|  | c64eb27ca1 | ||
|  | f4eb5196f7 | ||
|  | 9e493430d8 | ||
|  | 7690eedd70 | ||
|  | aaa270a52f | ||
|  | 6f47a5415c | ||
|  | 42c1709633 | ||
|  | 4685ff4145 | ||
|  | 249b01d7a8 | ||
|  | bcbdf58376 | ||
|  | 7f8540ff4e | ||
|  | b52ab91606 | ||
|  | 7246ac55b6 | ||
|  | 848931da21 | ||
|  | bf4092e746 | ||
|  | 7cee18c926 | ||
|  | e9a4b43268 | ||
|  | b1522742cc | ||
|  | ecdaaab789 | ||
|  | 3379942086 | ||
|  | 12eaa8c074 | ||
|  | c6310d636d | ||
|  | 9bedc6a138 | ||
|  | 70dbc6018f | ||
|  | 3afeb44b1d | ||
|  | 3131b8965e | ||
|  | bbc2fc9e42 | ||
|  | 3b4141eb4d | ||
|  | 5f826be82c | ||
|  | db9ee93d2b | ||
|  | 1eabd29105 | ||
|  | dc05c56440 | ||
|  | cb88ab2080 | ||
|  | 254e1a9bc1 | ||
|  | 0fc7c297bf | ||
|  | 82bfb6a3c3 | ||
|  | 277c622475 | ||
|  | 091a0f3efe | ||
|  | 823c76aa08 | ||
|  | 37dee2a50b | ||
|  | ea0f5101ec | ||
|  | be650d093d | ||
|  | 734814d96b | ||
|  | d9246b9b42 | ||
|  | 70e7e630c3 | ||
|  | 71fc49252f | ||
|  | aa0771877f | ||
|  | e5a4d11c0b | ||
|  | 909949a9e1 | ||
|  | f018696219 | ||
|  | 347a47d0d2 | ||
|  | c3de4b86b0 | ||
|  | 594e77ca41 | ||
|  | 31ce7a13ea | ||
|  | 5d762001c8 | ||
|  | bc3d339d9c | ||
|  | 33e5ed9ddc | ||
|  | 2d712b0ef7 | ||
|  | 13d81a4e4b | ||
|  | 8d917aee12 | 
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -1,3 +1,4 @@ | ||||
| /public/node_modules | ||||
| /vendor | ||||
| /.release | ||||
| embedded.txt | ||||
							
								
								
									
										37
									
								
								.tx/config
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								.tx/config
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,37 @@ | ||||
| [main] | ||||
| host = https://www.transifex.com | ||||
|  | ||||
| [grocy.stringsphp] | ||||
| file_filter = localization/<lang>/strings.php | ||||
| minimum_perc = 0 | ||||
| source_file = localization/en/strings.php | ||||
| source_lang = en | ||||
| type = PHP_ARRAY | ||||
|  | ||||
| [grocy.stock_transaction_typesphp] | ||||
| file_filter = localization/<lang>/stock_transaction_types.php | ||||
| minimum_perc = 0 | ||||
| source_file = localization/en/stock_transaction_types.php | ||||
| source_lang = en | ||||
| type = PHP_ARRAY | ||||
|  | ||||
| [grocy.chore_typesphp] | ||||
| file_filter = localization/<lang>/chore_types.php | ||||
| minimum_perc = 0 | ||||
| source_file = localization/en/chore_types.php | ||||
| source_lang = en | ||||
| type = PHP_ARRAY | ||||
|  | ||||
| [grocy.component_translationsphp] | ||||
| file_filter = localization/<lang>/component_translations.php | ||||
| minimum_perc = 0 | ||||
| source_file = localization/en/component_translations.php | ||||
| source_lang = en | ||||
| type = PHP_ARRAY | ||||
|  | ||||
| [grocy.demo_dataphp] | ||||
| file_filter = localization/<lang>/demo_data.php | ||||
| minimum_perc = 0 | ||||
| source_file = localization/en/demo_data.php | ||||
| source_lang = en | ||||
| type = PHP_ARRAY | ||||
							
								
								
									
										58
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										58
									
								
								README.md
									
									
									
									
									
								
							| @@ -2,25 +2,43 @@ | ||||
| ERP beyond your fridge | ||||
|  | ||||
| ## Give it a try | ||||
| Public demo of the latest version → [https://demo.grocy.info](https://demo.grocy.info)  | ||||
| - Public demo of the latest stable version → [https://demo.grocy.info](https://demo.grocy.info) | ||||
| - Public demo of the latest pre-release version (current master branch) → [https://demo-prerelease.grocy.info](https://demo-prerelease.grocy.info) | ||||
|  | ||||
| ## Motivation | ||||
| A household needs to be managed. I did this so far (almost 10 years) with my first self written software (a C# windows forms application) and with a bunch of Excel sheets. The software is a pain to use and Excel is Excel. So I searched for and tried different things for a (very) long time, nothing 100 % fitted, so this is my aim for a "complete houshold management"-thing. | ||||
|  | ||||
| ## What it is about | ||||
| For now my main focus is on stock management, ERP your fridge! | ||||
| A household needs to be managed. I did this so far (almost 10 years) with my first self written software (a C# windows forms application) and with a bunch of Excel sheets. The software is a pain to use and Excel is Excel. So I searched for and tried different things for a (very) long time, nothing 100 % fitted, so this is my aim for a "complete household management"-thing. ERP your fridge! | ||||
|  | ||||
| ## How to install | ||||
| Just unpack the [latest release](https://github.com/berrnd/grocy/releases/latest) on your PHP (SQLite extension required, currently only tested with PHP 7.2) enabled webserver (webservers root should point to the `/public` directory), copy `config-dist.php` to `data/config.php`, edit it to your needs, ensure that the `data` directory is writable and you're ready to go. | ||||
| > **NEW** | ||||
| > | ||||
| > There is now grocy-desktop if you want to run grocy without a webserver just like a normal (windows) desktop application. | ||||
| > | ||||
| > See https://github.com/grocy/grocy-desktop or directly download the [latest release](https://releases.grocy.info/latest-desktop) - the installation is nothing more than just clicking 2 times "next"... | ||||
|  | ||||
| Default login is user `admin` with password `admin` - see the `data/config.php` file. Alternatively clone this repository and install Composer and Yarn dependencies manually. | ||||
| Just unpack the [latest release](https://releases.grocy.info/latest) on your PHP (SQLite (3.8.3 or higher) extension required, currently only tested with PHP 7.2) enabled webserver (webservers root should point to the `public` directory), copy `config-dist.php` to `data/config.php`, edit it to your needs, ensure that the `data` directory is writable and you're ready to go, (to make writable `chown -R www-data:www-data data/`). Default login is user `admin` with password `admin`, please change the password immediately (see user menu). | ||||
|  | ||||
| Alternatively clone this repository and install Composer and Yarn dependencies manually. | ||||
|  | ||||
| If you use nginx as your webserver, please include `try_files $uri /index.php;` in your location block. | ||||
|  | ||||
| If, however, your webserver does not support URL rewriting, set `DISABLE_URL_REWRITING` in `data/config.php` (`Setting('DISABLE_URL_REWRITING', true);`). | ||||
|  | ||||
| ## How to run using Docker | ||||
|  | ||||
| See [grocy/grocy-docker](https://github.com/grocy/grocy-docker) for instructions. | ||||
|  | ||||
| ## How to update | ||||
| Just overwrite everything with the latest release while keeping the `/data` directory, check `config-dist.php` for new configuration options and add them to your `data/config.php` (the default from values `config-dist.php` will be used for not in `data/config.php` defined settings). | ||||
| Just overwrite everything with the latest release while keeping the `data` directory, check `config-dist.php` for new configuration options and add them to your `data/config.php` (the default from values `config-dist.php` will be used for not in `data/config.php` defined settings). Just to be sure, please empty `data/viewcache`. | ||||
|  | ||||
| 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. | ||||
| You can easily help translating grocy at https://www.transifex.com/grocy/grocy, if your language is incomplete or not available yet. | ||||
| (Language can be changed in `data/config.php`, e. g. `Setting('CULTURE', 'it');`) | ||||
|  | ||||
| ### Maintaining your own localization | ||||
| As the German translation will always be the most complete one, for maintaining your localization it would be easiest when you compare your localization with the German one with a diff tool of your choice. | ||||
|  | ||||
| ## Things worth to know | ||||
|  | ||||
| @@ -33,10 +51,12 @@ Some fields also allow to select a value by scanning a barcode. It works best wh | ||||
| ### Input shorthands for date fields | ||||
| For (productivity) reasons all date (and time) input fields use the ISO-8601 format regardless of localization. | ||||
| The following shorthands are available: | ||||
| - `MMDD` gets expanded to the given day on the current year in proper notation | ||||
| - `MMDD` gets expanded to the given day on the current year, if > today, or to the given day next year, if < today, in proper notation | ||||
|   - Example: `0517` will be converted to `2018-05-17` | ||||
| - `YYYYMMDD` gets expanded to the proper ISO-8601 notation | ||||
|   - Example: `20190417` will be converted to `2019-04-17` | ||||
| - `YYYYMMe` or `YYYYMM+` gets expanded to the end of the given month in the given year in proper notation | ||||
|   - Example: `201807e` will be converted to `2018-07-31` | ||||
| - `x` gets expanded to `2999-12-31` (which I use for products which never expire) | ||||
| - Down/up arrow keys will increase/decrease the date by one day | ||||
| - Right/left arrow keys will increase/decrease the date by 1 week | ||||
| @@ -50,28 +70,30 @@ Products can be directly added to the database via looking them up against exter | ||||
| This is currently only possible through the REST API. | ||||
| There is no plugin included for any service, see the reference implementation in `data/plugins/DemoBarcodeLookupPlugin.php`. | ||||
|  | ||||
| ### Localization | ||||
| grocy is fully localizable - the default language is English (integrated into code), a German localization is always maintained by me. There is one file per language in the `localization` directory, if you want to create a translation, it's best to copy `localization/de.php` to a new one (e. g. `localization/it.php`) and translating all strings there. (Language can be changed in `data/config.php`, e. g. `Setting('CULTURE', 'it');`) | ||||
|  | ||||
| ### Database migrations | ||||
| Database schema migration is automatically done when visiting the root (`/`) route (click on the logo in the left upper edge). | ||||
|  | ||||
| ### Adding your own CSS or JS without to have to modify the application itself | ||||
| - When the file `data/custom_js.html` exists, the contents of the file will be added just before `</body>` (end of body) on every page | ||||
| - When the file `data/custom_css.html` exists, the contents of the file will be added just before `</head>` (end of head) on every page | ||||
|  | ||||
| ### Demo mode | ||||
| When the file `data/demo.txt` exists, the application will work in a demo mode which means authentication is disabled and some demo data will be generated during the database schema migration. | ||||
|  | ||||
| ### Adding your own CSS or JS without to have to modify the application itself | ||||
| - When the file `data/custom.js` exists, the contents of the file be added just before `</body>` on every page | ||||
| - When the file `data/custom.css` exists, the contents of the file be added just before `</head>` on every page | ||||
| ### Embedded mode | ||||
| When the file `embedded.txt` exists, it must contain a valid and writable path which will be used as the data directory instead of `data` and authentication will be disabled (used in [grocy-desktop](https://github.com/grocy/grocy-desktop)). | ||||
|  | ||||
| In embedded mode, settings can be overridden by text files in `data/settingoverrides`, the file name must be `<SettingName>.txt` (e. g. `BASE_URL.txt`) and the content must be the setting value (normally one single line). | ||||
|  | ||||
| ## Screenshots | ||||
| #### Dashboard | ||||
|  | ||||
|  | ||||
|  | ||||
| #### Purchase - with barcode scan | ||||
|  | ||||
|  | ||||
|  | ||||
| #### Consume - with manual search | ||||
|  | ||||
|  | ||||
|  | ||||
| ## License | ||||
| The MIT License (MIT) | ||||
|   | ||||
							
								
								
									
										42
									
								
								app.php
									
									
									
									
									
								
							
							
						
						
									
										42
									
								
								app.php
									
									
									
									
									
								
							| @@ -6,8 +6,38 @@ use \Psr\Http\Message\ResponseInterface as Response; | ||||
| use \Grocy\Helpers\UrlManager; | ||||
| use \Grocy\Controllers\LoginController; | ||||
|  | ||||
| // Definitions for embedded mode | ||||
| if (file_exists(__DIR__ . '/embedded.txt')) | ||||
| { | ||||
| 	define('GROCY_IS_EMBEDDED_INSTALL', true); | ||||
| 	define('GROCY_DATAPATH', file_get_contents(__DIR__ . '/embedded.txt')); | ||||
| 	define('GROCY_USER_ID', 1); | ||||
| } | ||||
| else | ||||
| { | ||||
| 	define('GROCY_IS_EMBEDDED_INSTALL', false); | ||||
| 	define('GROCY_DATAPATH', __DIR__ . '/data'); | ||||
| } | ||||
|  | ||||
| // Definitions for demo mode | ||||
| if (file_exists(GROCY_DATAPATH . '/demo.txt')) | ||||
| { | ||||
| 	define('GROCY_IS_DEMO_INSTALL', true); | ||||
| 	if (!defined('GROCY_USER_ID')) | ||||
| 	{ | ||||
| 		define('GROCY_USER_ID', 1); | ||||
| 	} | ||||
| } | ||||
| else | ||||
| { | ||||
| 	define('GROCY_IS_DEMO_INSTALL', false); | ||||
| } | ||||
|  | ||||
| // Load composer dependencies | ||||
| require_once __DIR__ . '/vendor/autoload.php'; | ||||
| require_once __DIR__ . '/data/config.php'; | ||||
|  | ||||
| // Load config files | ||||
| require_once GROCY_DATAPATH . '/config.php'; | ||||
| require_once __DIR__ . '/config-dist.php'; //For not in own config defined values we use the default ones | ||||
|  | ||||
| // Setup base application | ||||
| @@ -18,7 +48,7 @@ $appContainer = new \Slim\Container([ | ||||
| 	], | ||||
| 	'view' => function($container) | ||||
| 	{ | ||||
| 		return new \Slim\Views\Blade(__DIR__ . '/views', __DIR__ . '/data/viewcache'); | ||||
| 		return new \Slim\Views\Blade(__DIR__ . '/views', GROCY_DATAPATH . '/viewcache'); | ||||
| 	}, | ||||
| 	'LoginControllerInstance' => function($container) | ||||
| 	{ | ||||
| @@ -26,7 +56,7 @@ $appContainer = new \Slim\Container([ | ||||
| 	}, | ||||
| 	'UrlManager' => function($container) | ||||
| 	{ | ||||
| 		return new UrlManager(BASE_URL); | ||||
| 		return new UrlManager(GROCY_BASE_URL); | ||||
| 	}, | ||||
| 	'ApiKeyHeaderName' => function($container) | ||||
| 	{ | ||||
| @@ -35,11 +65,7 @@ $appContainer = new \Slim\Container([ | ||||
| ]); | ||||
| $app = new \Slim\App($appContainer); | ||||
|  | ||||
| if (PHP_SAPI === 'cli') | ||||
| { | ||||
| 	$app->add(\pavlakis\cli\CliRequest::class); | ||||
| } | ||||
|  | ||||
| // Load routes from separate file | ||||
| require_once __DIR__ . '/routes.php'; | ||||
|  | ||||
| $app->run(); | ||||
|   | ||||
| @@ -10,4 +10,4 @@ del "%releasePath%\grocy_%version%.zip" | ||||
| "build_tools\7za.exe" a -r "%releasePath%\grocy_%version%.zip" "%projectPath%\*" -xr!.* -xr!build_tools -xr!build.bat -xr!composer.json -xr!composer.lock -xr!package.json -xr!yarn.lock -xr!publication_assets | ||||
| "build_tools\7za.exe" a "%releasePath%\grocy_%version%.zip" "%projectPath%\public\.htaccess" | ||||
| "build_tools\7za.exe" rn "%releasePath%\grocy_%version%.zip" .htaccess public\.htaccess | ||||
| "build_tools\7za.exe" d "%releasePath%\grocy_%version%.zip" data\*.* data\sessions data\viewcache\* | ||||
| "build_tools\7za.exe" d "%releasePath%\grocy_%version%.zip" data\*.* data\storage data\viewcache\* | ||||
|   | ||||
| @@ -3,7 +3,6 @@ | ||||
| 		"php": ">=7.2", | ||||
| 		"slim/slim": "^3.8", | ||||
| 		"morris/lessql": "^0.3.4", | ||||
| 		"pavlakis/slim-cli": "^1.0", | ||||
| 		"rubellum/slim-blade-view": "^0.1.1", | ||||
| 		"tuupola/cors-middleware": "^0.7.0" | ||||
| 	}, | ||||
|   | ||||
							
								
								
									
										267
									
								
								composer.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										267
									
								
								composer.lock
									
									
									
										generated
									
									
									
								
							| @@ -4,7 +4,7 @@ | ||||
|         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", | ||||
|         "This file is @generated automatically" | ||||
|     ], | ||||
|     "content-hash": "131ab83ecb1ea3d1a431cc70b5092448", | ||||
|     "content-hash": "c1bc4c17739e9d0ee8b33628f6d4b9a4", | ||||
|     "packages": [ | ||||
|         { | ||||
|             "name": "container-interop/container-interop", | ||||
| @@ -154,31 +154,33 @@ | ||||
|                 "request", | ||||
|                 "response" | ||||
|             ], | ||||
|             "abandoned": "psr/http-factory", | ||||
|             "time": "2017-03-24T14:48:51+00:00" | ||||
|         }, | ||||
|         { | ||||
|             "name": "illuminate/container", | ||||
|             "version": "v5.6.27", | ||||
|             "version": "v5.7.11", | ||||
|             "source": { | ||||
|                 "type": "git", | ||||
|                 "url": "https://github.com/illuminate/container.git", | ||||
|                 "reference": "1f0757cae8749400aeda730f6438a081fc3c082d" | ||||
|                 "reference": "4c90c3d3ba88e52da152e885d24c9f891a2ec545" | ||||
|             }, | ||||
|             "dist": { | ||||
|                 "type": "zip", | ||||
|                 "url": "https://api.github.com/repos/illuminate/container/zipball/1f0757cae8749400aeda730f6438a081fc3c082d", | ||||
|                 "reference": "1f0757cae8749400aeda730f6438a081fc3c082d", | ||||
|                 "url": "https://api.github.com/repos/illuminate/container/zipball/4c90c3d3ba88e52da152e885d24c9f891a2ec545", | ||||
|                 "reference": "4c90c3d3ba88e52da152e885d24c9f891a2ec545", | ||||
|                 "shasum": "" | ||||
|             }, | ||||
|             "require": { | ||||
|                 "illuminate/contracts": "5.6.*", | ||||
|                 "illuminate/contracts": "5.7.*", | ||||
|                 "illuminate/support": "5.7.*", | ||||
|                 "php": "^7.1.3", | ||||
|                 "psr/container": "~1.0" | ||||
|                 "psr/container": "^1.0" | ||||
|             }, | ||||
|             "type": "library", | ||||
|             "extra": { | ||||
|                 "branch-alias": { | ||||
|                     "dev-master": "5.6-dev" | ||||
|                     "dev-master": "5.7-dev" | ||||
|                 } | ||||
|             }, | ||||
|             "autoload": { | ||||
| @@ -198,31 +200,31 @@ | ||||
|             ], | ||||
|             "description": "The Illuminate Container package.", | ||||
|             "homepage": "https://laravel.com", | ||||
|             "time": "2018-05-24T13:16:56+00:00" | ||||
|             "time": "2018-10-18T03:39:45+00:00" | ||||
|         }, | ||||
|         { | ||||
|             "name": "illuminate/contracts", | ||||
|             "version": "v5.6.27", | ||||
|             "version": "v5.7.11", | ||||
|             "source": { | ||||
|                 "type": "git", | ||||
|                 "url": "https://github.com/illuminate/contracts.git", | ||||
|                 "reference": "3dc639feabe0f302f574157a782ede323881a944" | ||||
|                 "reference": "64df81d3382d876f1c1d3d5481d89c93b61b8279" | ||||
|             }, | ||||
|             "dist": { | ||||
|                 "type": "zip", | ||||
|                 "url": "https://api.github.com/repos/illuminate/contracts/zipball/3dc639feabe0f302f574157a782ede323881a944", | ||||
|                 "reference": "3dc639feabe0f302f574157a782ede323881a944", | ||||
|                 "url": "https://api.github.com/repos/illuminate/contracts/zipball/64df81d3382d876f1c1d3d5481d89c93b61b8279", | ||||
|                 "reference": "64df81d3382d876f1c1d3d5481d89c93b61b8279", | ||||
|                 "shasum": "" | ||||
|             }, | ||||
|             "require": { | ||||
|                 "php": "^7.1.3", | ||||
|                 "psr/container": "~1.0", | ||||
|                 "psr/simple-cache": "~1.0" | ||||
|                 "psr/container": "^1.0", | ||||
|                 "psr/simple-cache": "^1.0" | ||||
|             }, | ||||
|             "type": "library", | ||||
|             "extra": { | ||||
|                 "branch-alias": { | ||||
|                     "dev-master": "5.6-dev" | ||||
|                     "dev-master": "5.7-dev" | ||||
|                 } | ||||
|             }, | ||||
|             "autoload": { | ||||
| @@ -242,32 +244,32 @@ | ||||
|             ], | ||||
|             "description": "The Illuminate Contracts package.", | ||||
|             "homepage": "https://laravel.com", | ||||
|             "time": "2018-05-11T23:38:58+00:00" | ||||
|             "time": "2018-10-08T13:34:14+00:00" | ||||
|         }, | ||||
|         { | ||||
|             "name": "illuminate/events", | ||||
|             "version": "v5.6.27", | ||||
|             "version": "v5.7.11", | ||||
|             "source": { | ||||
|                 "type": "git", | ||||
|                 "url": "https://github.com/illuminate/events.git", | ||||
|                 "reference": "b6e73ed40478cef2ef98d5ddb27f333291606cea" | ||||
|                 "reference": "a8e5e3d601ad7f3571428176a578ddf03ce649d8" | ||||
|             }, | ||||
|             "dist": { | ||||
|                 "type": "zip", | ||||
|                 "url": "https://api.github.com/repos/illuminate/events/zipball/b6e73ed40478cef2ef98d5ddb27f333291606cea", | ||||
|                 "reference": "b6e73ed40478cef2ef98d5ddb27f333291606cea", | ||||
|                 "url": "https://api.github.com/repos/illuminate/events/zipball/a8e5e3d601ad7f3571428176a578ddf03ce649d8", | ||||
|                 "reference": "a8e5e3d601ad7f3571428176a578ddf03ce649d8", | ||||
|                 "shasum": "" | ||||
|             }, | ||||
|             "require": { | ||||
|                 "illuminate/container": "5.6.*", | ||||
|                 "illuminate/contracts": "5.6.*", | ||||
|                 "illuminate/support": "5.6.*", | ||||
|                 "illuminate/container": "5.7.*", | ||||
|                 "illuminate/contracts": "5.7.*", | ||||
|                 "illuminate/support": "5.7.*", | ||||
|                 "php": "^7.1.3" | ||||
|             }, | ||||
|             "type": "library", | ||||
|             "extra": { | ||||
|                 "branch-alias": { | ||||
|                     "dev-master": "5.6-dev" | ||||
|                     "dev-master": "5.7-dev" | ||||
|                 } | ||||
|             }, | ||||
|             "autoload": { | ||||
| @@ -287,39 +289,39 @@ | ||||
|             ], | ||||
|             "description": "The Illuminate Events package.", | ||||
|             "homepage": "https://laravel.com", | ||||
|             "time": "2018-02-26T19:00:55+00:00" | ||||
|             "time": "2018-10-06T18:48:42+00:00" | ||||
|         }, | ||||
|         { | ||||
|             "name": "illuminate/filesystem", | ||||
|             "version": "v5.6.27", | ||||
|             "version": "v5.7.11", | ||||
|             "source": { | ||||
|                 "type": "git", | ||||
|                 "url": "https://github.com/illuminate/filesystem.git", | ||||
|                 "reference": "2677365f61c66fad13ff12a37cd4fa8aaeb048d2" | ||||
|                 "reference": "cbb5650be36d7370f7ae5f039d2143952fa58f51" | ||||
|             }, | ||||
|             "dist": { | ||||
|                 "type": "zip", | ||||
|                 "url": "https://api.github.com/repos/illuminate/filesystem/zipball/2677365f61c66fad13ff12a37cd4fa8aaeb048d2", | ||||
|                 "reference": "2677365f61c66fad13ff12a37cd4fa8aaeb048d2", | ||||
|                 "url": "https://api.github.com/repos/illuminate/filesystem/zipball/cbb5650be36d7370f7ae5f039d2143952fa58f51", | ||||
|                 "reference": "cbb5650be36d7370f7ae5f039d2143952fa58f51", | ||||
|                 "shasum": "" | ||||
|             }, | ||||
|             "require": { | ||||
|                 "illuminate/contracts": "5.6.*", | ||||
|                 "illuminate/support": "5.6.*", | ||||
|                 "illuminate/contracts": "5.7.*", | ||||
|                 "illuminate/support": "5.7.*", | ||||
|                 "php": "^7.1.3", | ||||
|                 "symfony/finder": "~4.0" | ||||
|                 "symfony/finder": "^4.1" | ||||
|             }, | ||||
|             "suggest": { | ||||
|                 "league/flysystem": "Required to use the Flysystem local and FTP drivers (~1.0).", | ||||
|                 "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (~1.0).", | ||||
|                 "league/flysystem-cached-adapter": "Required to use the Flysystem cache (~1.0).", | ||||
|                 "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0).", | ||||
|                 "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (~1.0)." | ||||
|                 "league/flysystem": "Required to use the Flysystem local and FTP drivers (^1.0).", | ||||
|                 "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).", | ||||
|                 "league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).", | ||||
|                 "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (^1.0).", | ||||
|                 "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0)." | ||||
|             }, | ||||
|             "type": "library", | ||||
|             "extra": { | ||||
|                 "branch-alias": { | ||||
|                     "dev-master": "5.6-dev" | ||||
|                     "dev-master": "5.7-dev" | ||||
|                 } | ||||
|             }, | ||||
|             "autoload": { | ||||
| @@ -339,42 +341,43 @@ | ||||
|             ], | ||||
|             "description": "The Illuminate Filesystem package.", | ||||
|             "homepage": "https://laravel.com", | ||||
|             "time": "2018-07-07T14:54:27+00:00" | ||||
|             "time": "2018-10-24T12:49:16+00:00" | ||||
|         }, | ||||
|         { | ||||
|             "name": "illuminate/support", | ||||
|             "version": "v5.6.27", | ||||
|             "version": "v5.7.11", | ||||
|             "source": { | ||||
|                 "type": "git", | ||||
|                 "url": "https://github.com/illuminate/support.git", | ||||
|                 "reference": "97ca44c95392ce0a41749fa47b953734d88b94b1" | ||||
|                 "reference": "45bfc0cd080c51946f61c04e324c2b4c6df58a9d" | ||||
|             }, | ||||
|             "dist": { | ||||
|                 "type": "zip", | ||||
|                 "url": "https://api.github.com/repos/illuminate/support/zipball/97ca44c95392ce0a41749fa47b953734d88b94b1", | ||||
|                 "reference": "97ca44c95392ce0a41749fa47b953734d88b94b1", | ||||
|                 "url": "https://api.github.com/repos/illuminate/support/zipball/45bfc0cd080c51946f61c04e324c2b4c6df58a9d", | ||||
|                 "reference": "45bfc0cd080c51946f61c04e324c2b4c6df58a9d", | ||||
|                 "shasum": "" | ||||
|             }, | ||||
|             "require": { | ||||
|                 "doctrine/inflector": "~1.1", | ||||
|                 "doctrine/inflector": "^1.1", | ||||
|                 "ext-mbstring": "*", | ||||
|                 "illuminate/contracts": "5.6.*", | ||||
|                 "nesbot/carbon": "^1.24.1", | ||||
|                 "illuminate/contracts": "5.7.*", | ||||
|                 "nesbot/carbon": "^1.26.3", | ||||
|                 "php": "^7.1.3" | ||||
|             }, | ||||
|             "conflict": { | ||||
|                 "tightenco/collect": "<5.5.33" | ||||
|             }, | ||||
|             "suggest": { | ||||
|                 "illuminate/filesystem": "Required to use the composer class (5.6.*).", | ||||
|                 "illuminate/filesystem": "Required to use the composer class (5.7.*).", | ||||
|                 "moontoast/math": "Required to use ordered UUIDs (^1.1).", | ||||
|                 "ramsey/uuid": "Required to use Str::uuid() (^3.7).", | ||||
|                 "symfony/process": "Required to use the composer class (~4.0).", | ||||
|                 "symfony/var-dumper": "Required to use the dd function (~4.0)." | ||||
|                 "symfony/process": "Required to use the composer class (^4.1).", | ||||
|                 "symfony/var-dumper": "Required to use the dd function (^4.1)." | ||||
|             }, | ||||
|             "type": "library", | ||||
|             "extra": { | ||||
|                 "branch-alias": { | ||||
|                     "dev-master": "5.6-dev" | ||||
|                     "dev-master": "5.7-dev" | ||||
|                 } | ||||
|             }, | ||||
|             "autoload": { | ||||
| @@ -397,35 +400,35 @@ | ||||
|             ], | ||||
|             "description": "The Illuminate Support package.", | ||||
|             "homepage": "https://laravel.com", | ||||
|             "time": "2018-07-04T01:23:57+00:00" | ||||
|             "time": "2018-10-22T17:36:06+00:00" | ||||
|         }, | ||||
|         { | ||||
|             "name": "illuminate/view", | ||||
|             "version": "v5.6.27", | ||||
|             "version": "v5.7.11", | ||||
|             "source": { | ||||
|                 "type": "git", | ||||
|                 "url": "https://github.com/illuminate/view.git", | ||||
|                 "reference": "625c35e8942f0ecd467acb8db8daf8449390d559" | ||||
|                 "reference": "97dbb6910aa5df5a7414877da89b7520f4260a58" | ||||
|             }, | ||||
|             "dist": { | ||||
|                 "type": "zip", | ||||
|                 "url": "https://api.github.com/repos/illuminate/view/zipball/625c35e8942f0ecd467acb8db8daf8449390d559", | ||||
|                 "reference": "625c35e8942f0ecd467acb8db8daf8449390d559", | ||||
|                 "url": "https://api.github.com/repos/illuminate/view/zipball/97dbb6910aa5df5a7414877da89b7520f4260a58", | ||||
|                 "reference": "97dbb6910aa5df5a7414877da89b7520f4260a58", | ||||
|                 "shasum": "" | ||||
|             }, | ||||
|             "require": { | ||||
|                 "illuminate/container": "5.6.*", | ||||
|                 "illuminate/contracts": "5.6.*", | ||||
|                 "illuminate/events": "5.6.*", | ||||
|                 "illuminate/filesystem": "5.6.*", | ||||
|                 "illuminate/support": "5.6.*", | ||||
|                 "illuminate/container": "5.7.*", | ||||
|                 "illuminate/contracts": "5.7.*", | ||||
|                 "illuminate/events": "5.7.*", | ||||
|                 "illuminate/filesystem": "5.7.*", | ||||
|                 "illuminate/support": "5.7.*", | ||||
|                 "php": "^7.1.3", | ||||
|                 "symfony/debug": "~4.0" | ||||
|                 "symfony/debug": "^4.1" | ||||
|             }, | ||||
|             "type": "library", | ||||
|             "extra": { | ||||
|                 "branch-alias": { | ||||
|                     "dev-master": "5.6-dev" | ||||
|                     "dev-master": "5.7-dev" | ||||
|                 } | ||||
|             }, | ||||
|             "autoload": { | ||||
| @@ -445,7 +448,7 @@ | ||||
|             ], | ||||
|             "description": "The Illuminate View package.", | ||||
|             "homepage": "https://laravel.com", | ||||
|             "time": "2018-07-06T14:55:12+00:00" | ||||
|             "time": "2018-10-11T15:32:19+00:00" | ||||
|         }, | ||||
|         { | ||||
|             "name": "morris/lessql", | ||||
| @@ -552,16 +555,16 @@ | ||||
|         }, | ||||
|         { | ||||
|             "name": "nesbot/carbon", | ||||
|             "version": "1.32.0", | ||||
|             "version": "1.36.1", | ||||
|             "source": { | ||||
|                 "type": "git", | ||||
|                 "url": "https://github.com/briannesbitt/Carbon.git", | ||||
|                 "reference": "64563e2b9f69e4db1b82a60e81efa327a30ff343" | ||||
|                 "reference": "63da8cdf89d7a5efe43aabc794365f6e7b7b8983" | ||||
|             }, | ||||
|             "dist": { | ||||
|                 "type": "zip", | ||||
|                 "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/64563e2b9f69e4db1b82a60e81efa327a30ff343", | ||||
|                 "reference": "64563e2b9f69e4db1b82a60e81efa327a30ff343", | ||||
|                 "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/63da8cdf89d7a5efe43aabc794365f6e7b7b8983", | ||||
|                 "reference": "63da8cdf89d7a5efe43aabc794365f6e7b7b8983", | ||||
|                 "shasum": "" | ||||
|             }, | ||||
|             "require": { | ||||
| @@ -569,9 +572,12 @@ | ||||
|                 "symfony/translation": "~2.6 || ~3.0 || ~4.0" | ||||
|             }, | ||||
|             "require-dev": { | ||||
|                 "friendsofphp/php-cs-fixer": "~2", | ||||
|                 "phpunit/phpunit": "^4.8.35 || ^5.7" | ||||
|             }, | ||||
|             "suggest": { | ||||
|                 "friendsofphp/php-cs-fixer": "Needed for the `composer phpcs` command. Allow to automatically fix code style.", | ||||
|                 "phpstan/phpstan": "Needed for the `composer phpstan` command. Allow to detect potential errors." | ||||
|             }, | ||||
|             "type": "library", | ||||
|             "extra": { | ||||
|                 "laravel": { | ||||
| @@ -603,7 +609,7 @@ | ||||
|                 "datetime", | ||||
|                 "time" | ||||
|             ], | ||||
|             "time": "2018-07-05T06:59:26+00:00" | ||||
|             "time": "2018-11-22T18:23:02+00:00" | ||||
|         }, | ||||
|         { | ||||
|             "name": "nikic/fast-route", | ||||
| @@ -651,55 +657,6 @@ | ||||
|             ], | ||||
|             "time": "2018-02-13T20:26:39+00:00" | ||||
|         }, | ||||
|         { | ||||
|             "name": "pavlakis/slim-cli", | ||||
|             "version": "1.0.4", | ||||
|             "source": { | ||||
|                 "type": "git", | ||||
|                 "url": "https://github.com/pavlakis/slim-cli.git", | ||||
|                 "reference": "603933a54e391b3c70c573206cce543b75d8b1db" | ||||
|             }, | ||||
|             "dist": { | ||||
|                 "type": "zip", | ||||
|                 "url": "https://api.github.com/repos/pavlakis/slim-cli/zipball/603933a54e391b3c70c573206cce543b75d8b1db", | ||||
|                 "reference": "603933a54e391b3c70c573206cce543b75d8b1db", | ||||
|                 "shasum": "" | ||||
|             }, | ||||
|             "require": { | ||||
|                 "php": "^5.5|^5.6|^7.0|^7.1" | ||||
|             }, | ||||
|             "require-dev": { | ||||
|                 "phpunit/phpunit": "^4.0", | ||||
|                 "slim/slim": "^3.0" | ||||
|             }, | ||||
|             "type": "library", | ||||
|             "autoload": { | ||||
|                 "psr-4": { | ||||
|                     "pavlakis\\cli\\tests\\": "tests/phpunit", | ||||
|                     "pavlakis\\cli\\": "src" | ||||
|                 } | ||||
|             }, | ||||
|             "notification-url": "https://packagist.org/downloads/", | ||||
|             "license": [ | ||||
|                 "BSD-3-Clause" | ||||
|             ], | ||||
|             "authors": [ | ||||
|                 { | ||||
|                     "name": "Antonis Pavlakis", | ||||
|                     "email": "adoni@pavlakis.info", | ||||
|                     "homepage": "http://pavlakis.info" | ||||
|                 } | ||||
|             ], | ||||
|             "description": "Making a mock GET request through the CLI and enabling the same application entry point on CLI scripts.", | ||||
|             "homepage": "http://github.com/pavlakis/slim-cli", | ||||
|             "keywords": [ | ||||
|                 "cli", | ||||
|                 "framework", | ||||
|                 "middleware", | ||||
|                 "slim" | ||||
|             ], | ||||
|             "time": "2017-01-30T22:50:06+00:00" | ||||
|         }, | ||||
|         { | ||||
|             "name": "philo/laravel-blade", | ||||
|             "version": "v3.1", | ||||
| @@ -892,16 +849,16 @@ | ||||
|         }, | ||||
|         { | ||||
|             "name": "psr/http-server-handler", | ||||
|             "version": "1.0.0", | ||||
|             "version": "1.0.1", | ||||
|             "source": { | ||||
|                 "type": "git", | ||||
|                 "url": "https://github.com/php-fig/http-server-handler.git", | ||||
|                 "reference": "439d92054dc06097f2406ec074a2627839955a02" | ||||
|                 "reference": "aff2f80e33b7f026ec96bb42f63242dc50ffcae7" | ||||
|             }, | ||||
|             "dist": { | ||||
|                 "type": "zip", | ||||
|                 "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/439d92054dc06097f2406ec074a2627839955a02", | ||||
|                 "reference": "439d92054dc06097f2406ec074a2627839955a02", | ||||
|                 "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/aff2f80e33b7f026ec96bb42f63242dc50ffcae7", | ||||
|                 "reference": "aff2f80e33b7f026ec96bb42f63242dc50ffcae7", | ||||
|                 "shasum": "" | ||||
|             }, | ||||
|             "require": { | ||||
| @@ -941,7 +898,7 @@ | ||||
|                 "response", | ||||
|                 "server" | ||||
|             ], | ||||
|             "time": "2018-01-22T17:04:15+00:00" | ||||
|             "time": "2018-10-30T16:46:14+00:00" | ||||
|         }, | ||||
|         { | ||||
|             "name": "psr/http-server-middleware", | ||||
| @@ -998,16 +955,16 @@ | ||||
|         }, | ||||
|         { | ||||
|             "name": "psr/log", | ||||
|             "version": "1.0.2", | ||||
|             "version": "1.1.0", | ||||
|             "source": { | ||||
|                 "type": "git", | ||||
|                 "url": "https://github.com/php-fig/log.git", | ||||
|                 "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" | ||||
|                 "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" | ||||
|             }, | ||||
|             "dist": { | ||||
|                 "type": "zip", | ||||
|                 "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", | ||||
|                 "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", | ||||
|                 "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", | ||||
|                 "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", | ||||
|                 "shasum": "" | ||||
|             }, | ||||
|             "require": { | ||||
| @@ -1041,7 +998,7 @@ | ||||
|                 "psr", | ||||
|                 "psr-3" | ||||
|             ], | ||||
|             "time": "2016-10-10T12:19:37+00:00" | ||||
|             "time": "2018-11-20T15:27:04+00:00" | ||||
|         }, | ||||
|         { | ||||
|             "name": "psr/simple-cache", | ||||
| @@ -1143,16 +1100,16 @@ | ||||
|         }, | ||||
|         { | ||||
|             "name": "slim/slim", | ||||
|             "version": "3.10.0", | ||||
|             "version": "3.11.0", | ||||
|             "source": { | ||||
|                 "type": "git", | ||||
|                 "url": "https://github.com/slimphp/Slim.git", | ||||
|                 "reference": "d8aabeacc3688b25e2f2dd2db91df91ec6fdd748" | ||||
|                 "reference": "d378e70431e78ee92ee32ddde61ecc72edf5dc0a" | ||||
|             }, | ||||
|             "dist": { | ||||
|                 "type": "zip", | ||||
|                 "url": "https://api.github.com/repos/slimphp/Slim/zipball/d8aabeacc3688b25e2f2dd2db91df91ec6fdd748", | ||||
|                 "reference": "d8aabeacc3688b25e2f2dd2db91df91ec6fdd748", | ||||
|                 "url": "https://api.github.com/repos/slimphp/Slim/zipball/d378e70431e78ee92ee32ddde61ecc72edf5dc0a", | ||||
|                 "reference": "d378e70431e78ee92ee32ddde61ecc72edf5dc0a", | ||||
|                 "shasum": "" | ||||
|             }, | ||||
|             "require": { | ||||
| @@ -1210,20 +1167,20 @@ | ||||
|                 "micro", | ||||
|                 "router" | ||||
|             ], | ||||
|             "time": "2018-04-19T19:29:08+00:00" | ||||
|             "time": "2018-09-16T10:54:21+00:00" | ||||
|         }, | ||||
|         { | ||||
|             "name": "symfony/debug", | ||||
|             "version": "v4.1.1", | ||||
|             "version": "v4.1.7", | ||||
|             "source": { | ||||
|                 "type": "git", | ||||
|                 "url": "https://github.com/symfony/debug.git", | ||||
|                 "reference": "dbe0fad88046a755dcf9379f2964c61a02f5ae3d" | ||||
|                 "reference": "19090917b848a799cbae4800abf740fe4eb71c1d" | ||||
|             }, | ||||
|             "dist": { | ||||
|                 "type": "zip", | ||||
|                 "url": "https://api.github.com/repos/symfony/debug/zipball/dbe0fad88046a755dcf9379f2964c61a02f5ae3d", | ||||
|                 "reference": "dbe0fad88046a755dcf9379f2964c61a02f5ae3d", | ||||
|                 "url": "https://api.github.com/repos/symfony/debug/zipball/19090917b848a799cbae4800abf740fe4eb71c1d", | ||||
|                 "reference": "19090917b848a799cbae4800abf740fe4eb71c1d", | ||||
|                 "shasum": "" | ||||
|             }, | ||||
|             "require": { | ||||
| @@ -1266,20 +1223,20 @@ | ||||
|             ], | ||||
|             "description": "Symfony Debug Component", | ||||
|             "homepage": "https://symfony.com", | ||||
|             "time": "2018-06-08T09:39:36+00:00" | ||||
|             "time": "2018-10-31T09:09:42+00:00" | ||||
|         }, | ||||
|         { | ||||
|             "name": "symfony/finder", | ||||
|             "version": "v4.1.1", | ||||
|             "version": "v4.1.7", | ||||
|             "source": { | ||||
|                 "type": "git", | ||||
|                 "url": "https://github.com/symfony/finder.git", | ||||
|                 "reference": "84714b8417d19e4ba02ea78a41a975b3efaafddb" | ||||
|                 "reference": "1f17195b44543017a9c9b2d437c670627e96ad06" | ||||
|             }, | ||||
|             "dist": { | ||||
|                 "type": "zip", | ||||
|                 "url": "https://api.github.com/repos/symfony/finder/zipball/84714b8417d19e4ba02ea78a41a975b3efaafddb", | ||||
|                 "reference": "84714b8417d19e4ba02ea78a41a975b3efaafddb", | ||||
|                 "url": "https://api.github.com/repos/symfony/finder/zipball/1f17195b44543017a9c9b2d437c670627e96ad06", | ||||
|                 "reference": "1f17195b44543017a9c9b2d437c670627e96ad06", | ||||
|                 "shasum": "" | ||||
|             }, | ||||
|             "require": { | ||||
| @@ -1315,20 +1272,20 @@ | ||||
|             ], | ||||
|             "description": "Symfony Finder Component", | ||||
|             "homepage": "https://symfony.com", | ||||
|             "time": "2018-06-19T21:38:16+00:00" | ||||
|             "time": "2018-10-03T08:47:56+00:00" | ||||
|         }, | ||||
|         { | ||||
|             "name": "symfony/polyfill-mbstring", | ||||
|             "version": "v1.8.0", | ||||
|             "version": "v1.10.0", | ||||
|             "source": { | ||||
|                 "type": "git", | ||||
|                 "url": "https://github.com/symfony/polyfill-mbstring.git", | ||||
|                 "reference": "3296adf6a6454a050679cde90f95350ad604b171" | ||||
|                 "reference": "c79c051f5b3a46be09205c73b80b346e4153e494" | ||||
|             }, | ||||
|             "dist": { | ||||
|                 "type": "zip", | ||||
|                 "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171", | ||||
|                 "reference": "3296adf6a6454a050679cde90f95350ad604b171", | ||||
|                 "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/c79c051f5b3a46be09205c73b80b346e4153e494", | ||||
|                 "reference": "c79c051f5b3a46be09205c73b80b346e4153e494", | ||||
|                 "shasum": "" | ||||
|             }, | ||||
|             "require": { | ||||
| @@ -1340,7 +1297,7 @@ | ||||
|             "type": "library", | ||||
|             "extra": { | ||||
|                 "branch-alias": { | ||||
|                     "dev-master": "1.8-dev" | ||||
|                     "dev-master": "1.9-dev" | ||||
|                 } | ||||
|             }, | ||||
|             "autoload": { | ||||
| @@ -1374,20 +1331,20 @@ | ||||
|                 "portable", | ||||
|                 "shim" | ||||
|             ], | ||||
|             "time": "2018-04-26T10:06:28+00:00" | ||||
|             "time": "2018-09-21T13:07:52+00:00" | ||||
|         }, | ||||
|         { | ||||
|             "name": "symfony/translation", | ||||
|             "version": "v4.1.1", | ||||
|             "version": "v4.1.7", | ||||
|             "source": { | ||||
|                 "type": "git", | ||||
|                 "url": "https://github.com/symfony/translation.git", | ||||
|                 "reference": "b6d8164085ee0b6debcd1b7a131fd6f63bb04854" | ||||
|                 "reference": "aa04dc1c75b7d3da7bd7003104cd0cfc5dff635c" | ||||
|             }, | ||||
|             "dist": { | ||||
|                 "type": "zip", | ||||
|                 "url": "https://api.github.com/repos/symfony/translation/zipball/b6d8164085ee0b6debcd1b7a131fd6f63bb04854", | ||||
|                 "reference": "b6d8164085ee0b6debcd1b7a131fd6f63bb04854", | ||||
|                 "url": "https://api.github.com/repos/symfony/translation/zipball/aa04dc1c75b7d3da7bd7003104cd0cfc5dff635c", | ||||
|                 "reference": "aa04dc1c75b7d3da7bd7003104cd0cfc5dff635c", | ||||
|                 "shasum": "" | ||||
|             }, | ||||
|             "require": { | ||||
| @@ -1443,7 +1400,7 @@ | ||||
|             ], | ||||
|             "description": "Symfony Translation Component", | ||||
|             "homepage": "https://symfony.com", | ||||
|             "time": "2018-06-22T08:59:39+00:00" | ||||
|             "time": "2018-10-28T18:38:52+00:00" | ||||
|         }, | ||||
|         { | ||||
|             "name": "tuupola/callable-handler", | ||||
|   | ||||
| @@ -1,16 +1,31 @@ | ||||
| <?php | ||||
|  | ||||
| # Login credentials | ||||
| Setting('HTTP_USER', 'admin'); | ||||
| Setting('HTTP_PASSWORD', 'admin'); | ||||
| # Settings can also be overwritten in two ways | ||||
| # | ||||
| # First priority | ||||
| # A .txt file with the same name as the setting in /data/settingoverrides | ||||
| # the content of the file is used as the setting value | ||||
| # | ||||
| # Second priority | ||||
| # An environment variable with the same name as the setting and prefix "GROCY_" | ||||
| # so for example "GROCY_BASE_URL" | ||||
| # | ||||
| # Third priority | ||||
| # The settings defined here below | ||||
|  | ||||
| # Either "production" or "dev" | ||||
|  | ||||
| # Either "production", "dev" or "prerelease" | ||||
| Setting('MODE', 'production'); | ||||
|  | ||||
| # Either "en" or "de" or the filename (without extension) of | ||||
| # one of the other available localization files in the "/localization" directory | ||||
| Setting('CULTURE', 'en'); | ||||
|  | ||||
| # To keep it simple: grocy does not handle any currency conversions, | ||||
| # this here is used to format all money values, | ||||
| # so can be anything (e. g. "USD" OR "$", doesn't matter...) | ||||
| Setting('CURRENCY', '$'); | ||||
|  | ||||
| # The base url of your installation, | ||||
| # should be just "/" when running directly under the root of a (sub)domain | ||||
| # or for example "https:/example.com/grocy" when using a subdirectory | ||||
| @@ -24,3 +39,31 @@ Setting('STOCK_BARCODE_LOOKUP_PLUGIN', 'DemoBarcodeLookupPlugin'); | ||||
| # If, however, your webserver does not support URL rewriting, | ||||
| # set this to true | ||||
| Setting('DISABLE_URL_REWRITING', false); | ||||
|  | ||||
|  | ||||
| # Default user settings | ||||
| # These settings can be changed per user, here the defaults | ||||
| # are defined which are used when the user has not changed the setting so far | ||||
|  | ||||
| # Night mode related | ||||
| DefaultUserSetting('night_mode_enabled', false); // If night mode is enabled always | ||||
| DefaultUserSetting('auto_night_mode_enabled', false); // If night mode is enabled automatically when inside a given time range (see the two settings below) | ||||
| DefaultUserSetting('auto_night_mode_time_range_from', "20:00"); // Format HH:mm | ||||
| DefaultUserSetting('auto_night_mode_time_range_to', "07:00"); // Format HH:mm | ||||
| DefaultUserSetting('auto_night_mode_time_range_goes_over_midnight', true); // If the time range above goes over midnight | ||||
| DefaultUserSetting('currently_inside_night_mode_range', false); // If we're currently inside of night mode time range (this is not user configurable, but stored as a user setting because it's evaluated client side to be able to use the client time instead of the maybe different server time) | ||||
| DefaultUserSetting('product_presets_location_id', -1); // Default location id for new products (-1 means no location is preset) | ||||
| DefaultUserSetting('product_presets_product_group_id', -1); // Default product group id for new products (-1 means no product group is preset) | ||||
| DefaultUserSetting('product_presets_qu_id', -1); // Default quantity unit id for new products (-1 means no quantity unit is preset) | ||||
|  | ||||
| # If the page should be automatically reloaded when there was | ||||
| # an external change | ||||
| DefaultUserSetting('auto_reload_on_db_change', true); | ||||
|  | ||||
| # Show a clock in the header next to the logo or not | ||||
| DefaultUserSetting('show_clock_in_header', false); | ||||
|  | ||||
| # Shopping list to stock workflow: | ||||
| # Automatically do the booking using the last price and the amount | ||||
| # of the shopping list item, if the product has "Default best before days" set | ||||
| DefaultUserSetting('shopping_list_to_stock_workflow_auto_submit_when_prefilled', false); | ||||
|   | ||||
| @@ -5,19 +5,33 @@ namespace Grocy\Controllers; | ||||
| use \Grocy\Services\DatabaseService; | ||||
| use \Grocy\Services\ApplicationService; | ||||
| use \Grocy\Services\LocalizationService; | ||||
| use \Grocy\Services\UsersService; | ||||
|  | ||||
| class BaseController | ||||
| { | ||||
| 	public function __construct(\Slim\Container $container) { | ||||
| 		$databaseService = new DatabaseService(); | ||||
| 		$this->Database = $databaseService->GetDbConnection(); | ||||
| 		 | ||||
| 		$localizationService = new LocalizationService(GROCY_CULTURE); | ||||
| 		$this->LocalizationService = $localizationService; | ||||
|  | ||||
| 		$applicationService = new ApplicationService(); | ||||
| 		$versionInfo = $applicationService->GetInstalledVersion(); | ||||
| 		$container->view->set('version', $versionInfo->Version); | ||||
| 		$container->view->set('releaseDate', $versionInfo->ReleaseDate); | ||||
| 		if (GROCY_MODE === 'prerelease') | ||||
| 		{ | ||||
| 			$commitHash = trim(exec('git log --pretty="%h" -n1 HEAD')); | ||||
| 			$commitDate = trim(exec('git log --date=iso --pretty="%cd" -n1 HEAD')); | ||||
| 			 | ||||
| 			$container->view->set('version', "pre-release-$commitHash"); | ||||
| 			$container->view->set('releaseDate', \substr($commitDate, 0, 19)); | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			$applicationService = new ApplicationService(); | ||||
| 			$versionInfo = $applicationService->GetInstalledVersion(); | ||||
| 			$container->view->set('version', $versionInfo->Version); | ||||
| 			$container->view->set('releaseDate', $versionInfo->ReleaseDate); | ||||
| 		} | ||||
|  | ||||
| 		$localizationService = new LocalizationService(CULTURE); | ||||
| 		$container->view->set('localizationStrings', $localizationService->GetCurrentCultureLocalizations()); | ||||
| 		$container->view->set('L', function($text, ...$placeholderValues) use($localizationService) | ||||
| 		{ | ||||
| @@ -28,9 +42,30 @@ class BaseController | ||||
| 			return $container->UrlManager->ConstructUrl($relativePath, $isResource); | ||||
| 		}); | ||||
|  | ||||
| 		$embedded = false; | ||||
| 		if (isset($container->request->getQueryParams()['embedded'])) | ||||
| 		{ | ||||
| 			$embedded = true; | ||||
| 		} | ||||
| 		$container->view->set('embedded', $embedded); | ||||
|  | ||||
| 		try | ||||
| 		{ | ||||
| 			$usersService = new UsersService(); | ||||
| 			if (defined('GROCY_USER_ID')) | ||||
| 			{ | ||||
| 				$container->view->set('userSettings', $usersService->GetUserSettings(GROCY_USER_ID)); | ||||
| 			} | ||||
| 		} | ||||
| 		catch (\Exception $ex) | ||||
| 		{ | ||||
| 			// Happens when database is not initialised or migrated... | ||||
| 		} | ||||
|  | ||||
| 		$this->AppContainer = $container; | ||||
| 	} | ||||
|  | ||||
| 	protected $AppContainer; | ||||
| 	protected $Database; | ||||
| 	protected $LocalizationService; | ||||
| } | ||||
|   | ||||
| @@ -24,8 +24,8 @@ class BatteriesApiController extends BaseApiController | ||||
|  | ||||
| 		try | ||||
| 		{ | ||||
| 			$this->BatteriesService->TrackChargeCycle($args['batteryId'], $trackedTime); | ||||
| 			return $this->VoidApiActionResponse($response); | ||||
| 			$chargeCycleId = $this->BatteriesService->TrackChargeCycle($args['batteryId'], $trackedTime); | ||||
| 			return $this->ApiResponse(array('charge_cycle_id' => $chargeCycleId)); | ||||
| 		} | ||||
| 		catch (\Exception $ex) | ||||
| 		{ | ||||
| @@ -44,4 +44,22 @@ class BatteriesApiController extends BaseApiController | ||||
| 			return $this->VoidApiActionResponse($response, false, 400, $ex->getMessage()); | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	public function Current(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		return $this->ApiResponse($this->BatteriesService->GetCurrent()); | ||||
| 	} | ||||
|  | ||||
| 	public function UndoChargeCycle(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		try | ||||
| 		{ | ||||
| 			$this->ApiResponse($this->BatteriesService->UndoChargeCycle($args['chargeCycleId'])); | ||||
| 			return $this->ApiResponse(array('success' => true)); | ||||
| 		} | ||||
| 		catch (\Exception $ex) | ||||
| 		{ | ||||
| 			return $this->VoidApiActionResponse($response, false, 400, $ex->getMessage()); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
|   | ||||
| @@ -16,22 +16,10 @@ class BatteriesController extends BaseController | ||||
|  | ||||
| 	public function Overview(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		$nextChargeTimes = array(); | ||||
| 		foreach($this->Database->batteries() as $battery) | ||||
| 		{ | ||||
| 			$nextChargeTimes[$battery->id] = $this->BatteriesService->GetNextChargeTime($battery->id); | ||||
| 		} | ||||
|  | ||||
| 		$nextXDays = 5; | ||||
| 		$countDueNextXDays = count(FindAllItemsInArrayByValue($nextChargeTimes, date('Y-m-d', strtotime("+$nextXDays days")), '<')); | ||||
| 		$countOverdue = count(FindAllItemsInArrayByValue($nextChargeTimes, date('Y-m-d', strtotime('-1 days')), '<')); | ||||
| 		return $this->AppContainer->view->render($response, 'batteriesoverview', [ | ||||
| 			'batteries' => $this->Database->batteries()->orderBy('name'), | ||||
| 			'current' => $this->BatteriesService->GetCurrent(), | ||||
| 			'nextChargeTimes' => $nextChargeTimes, | ||||
| 			'nextXDays' => $nextXDays, | ||||
| 			'countDueNextXDays' => $countDueNextXDays - $countOverdue, | ||||
| 			'countOverdue' => $countOverdue | ||||
| 			'nextXDays' => 5 | ||||
| 		]); | ||||
| 	} | ||||
|  | ||||
| @@ -65,4 +53,12 @@ class BatteriesController extends BaseController | ||||
| 			]); | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	public function Journal(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		return $this->AppContainer->view->render($response, 'batteriesjournal', [ | ||||
| 			'chargeCycles' => $this->Database->battery_charge_cycles()->orderBy('tracked_time', 'DESC'), | ||||
| 			'batteries' => $this->Database->batteries()->orderBy('name') | ||||
| 		]); | ||||
| 	} | ||||
| } | ||||
|   | ||||
							
								
								
									
										81
									
								
								controllers/CalendarController.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										81
									
								
								controllers/CalendarController.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,81 @@ | ||||
| <?php | ||||
|  | ||||
| namespace Grocy\Controllers; | ||||
|  | ||||
| use \Grocy\Services\StockService; | ||||
| use \Grocy\Services\TasksService; | ||||
| use \Grocy\Services\ChoresService; | ||||
| use \Grocy\Services\BatteriesService; | ||||
|  | ||||
| class CalendarController extends BaseController | ||||
| { | ||||
| 	public function __construct(\Slim\Container $container) | ||||
| 	{ | ||||
| 		parent::__construct($container); | ||||
| 		$this->StockService = new StockService(); | ||||
| 		$this->TasksService = new TasksService(); | ||||
| 		$this->ChoresService = new ChoresService(); | ||||
| 		$this->BatteriesService = new BatteriesService(); | ||||
| 	} | ||||
|  | ||||
| 	protected $StockService; | ||||
| 	protected $TasksService; | ||||
| 	protected $ChoresService; | ||||
| 	protected $BatteriesService; | ||||
|  | ||||
| 	public function Overview(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		$products = $this->Database->products(); | ||||
| 		$titlePrefix = $this->LocalizationService->Localize('Product expires') . ': '; | ||||
| 		$stockEvents = array(); | ||||
| 		foreach($this->StockService->GetCurrentStock() as $currentStockEntry) | ||||
| 		{ | ||||
| 			$stockEvents[] = array( | ||||
| 				'title' => $titlePrefix . FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->name, | ||||
| 				'start' => $currentStockEntry->best_before_date | ||||
| 			); | ||||
| 		} | ||||
|  | ||||
| 		$titlePrefix = $this->LocalizationService->Localize('Task due') . ': '; | ||||
| 		$taskEvents = array(); | ||||
| 		foreach($this->TasksService->GetCurrent() as $currentTaskEntry) | ||||
| 		{ | ||||
| 			$taskEvents[] = array( | ||||
| 				'title' => $titlePrefix . $currentTaskEntry->name, | ||||
| 				'start' => $currentTaskEntry->due_date | ||||
| 			); | ||||
| 		} | ||||
|  | ||||
| 		$chores = $this->Database->chores(); | ||||
| 		$titlePrefix = $this->LocalizationService->Localize('Chore due') . ': '; | ||||
| 		$choreEvents = array(); | ||||
| 		foreach($this->ChoresService->GetCurrent() as $currentChoreEntry) | ||||
| 		{ | ||||
| 			$choreEvents[] = array( | ||||
| 				'title' => $titlePrefix . FindObjectInArrayByPropertyValue($chores, 'id', $currentChoreEntry->chore_id)->name, | ||||
| 				'start' => $currentChoreEntry->next_estimated_execution_time | ||||
| 			); | ||||
| 		} | ||||
|  | ||||
| 		$batteries = $this->Database->batteries(); | ||||
| 		$titlePrefix = $this->LocalizationService->Localize('Battery charge cycle due') . ': '; | ||||
| 		$batteryEvents = array(); | ||||
| 		foreach($this->BatteriesService->GetCurrent() as $currentBatteryEntry) | ||||
| 		{ | ||||
| 			$batteryEvents[] = array( | ||||
| 				'title' => $titlePrefix . FindObjectInArrayByPropertyValue($batteries, 'id', $currentBatteryEntry->battery_id)->name, | ||||
| 				'start' => $currentBatteryEntry->next_estimated_charge_time | ||||
| 			); | ||||
| 		} | ||||
|  | ||||
| 		$fullcalendarEventSources = array(); | ||||
| 		$fullcalendarEventSources[] = $stockEvents; | ||||
| 		$fullcalendarEventSources[] = $taskEvents; | ||||
| 		$fullcalendarEventSources[] = $choreEvents; | ||||
| 		$fullcalendarEventSources[] = $batteryEvents; | ||||
|  | ||||
| 		return $this->AppContainer->view->render($response, 'calendar', [ | ||||
| 			'fullcalendarEventSources' => $fullcalendarEventSources | ||||
| 		]); | ||||
| 	} | ||||
| } | ||||
							
								
								
									
										71
									
								
								controllers/ChoresApiController.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										71
									
								
								controllers/ChoresApiController.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,71 @@ | ||||
| <?php | ||||
|  | ||||
| namespace Grocy\Controllers; | ||||
|  | ||||
| use \Grocy\Services\ChoresService; | ||||
|  | ||||
| class ChoresApiController extends BaseApiController | ||||
| { | ||||
| 	public function __construct(\Slim\Container $container) | ||||
| 	{ | ||||
| 		parent::__construct($container); | ||||
| 		$this->ChoresService = new ChoresService(); | ||||
| 	} | ||||
|  | ||||
| 	protected $ChoresService; | ||||
|  | ||||
| 	public function TrackChoreExecution(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		$trackedTime = date('Y-m-d H:i:s'); | ||||
| 		if (isset($request->getQueryParams()['tracked_time']) && !empty($request->getQueryParams()['tracked_time']) && IsIsoDateTime($request->getQueryParams()['tracked_time'])) | ||||
| 		{ | ||||
| 			$trackedTime = $request->getQueryParams()['tracked_time']; | ||||
| 		} | ||||
|  | ||||
| 		$doneBy = GROCY_USER_ID; | ||||
| 		if (isset($request->getQueryParams()['done_by']) && !empty($request->getQueryParams()['done_by'])) | ||||
| 		{ | ||||
| 			$doneBy = $request->getQueryParams()['done_by']; | ||||
| 		} | ||||
|  | ||||
| 		try | ||||
| 		{ | ||||
| 			$choreExecutionId = $this->ChoresService->TrackChore($args['choreId'], $trackedTime, $doneBy); | ||||
| 			return $this->ApiResponse(array('chore_execution_id' => $choreExecutionId)); | ||||
| 		} | ||||
| 		catch (\Exception $ex) | ||||
| 		{ | ||||
| 			return $this->VoidApiActionResponse($response, false, 400, $ex->getMessage()); | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	public function ChoreDetails(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		try | ||||
| 		{ | ||||
| 			return $this->ApiResponse($this->ChoresService->GetChoreDetails($args['choreId'])); | ||||
| 		} | ||||
| 		catch (\Exception $ex) | ||||
| 		{ | ||||
| 			return $this->VoidApiActionResponse($response, false, 400, $ex->getMessage()); | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	public function Current(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		return $this->ApiResponse($this->ChoresService->GetCurrent()); | ||||
| 	} | ||||
|  | ||||
| 	public function UndoChoreExecution(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		try | ||||
| 		{ | ||||
| 			$this->ApiResponse($this->ChoresService->UndoChoreExecution($args['executionId'])); | ||||
| 			return $this->ApiResponse(array('success' => true)); | ||||
| 		} | ||||
| 		catch (\Exception $ex) | ||||
| 		{ | ||||
| 			return $this->VoidApiActionResponse($response, false, 400, $ex->getMessage()); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
							
								
								
									
										68
									
								
								controllers/ChoresController.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										68
									
								
								controllers/ChoresController.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,68 @@ | ||||
| <?php | ||||
|  | ||||
| namespace Grocy\Controllers; | ||||
|  | ||||
| use \Grocy\Services\ChoresService; | ||||
|  | ||||
| class ChoresController extends BaseController | ||||
| { | ||||
| 	public function __construct(\Slim\Container $container) | ||||
| 	{ | ||||
| 		parent::__construct($container); | ||||
| 		$this->ChoresService = new ChoresService(); | ||||
| 	} | ||||
|  | ||||
| 	protected $ChoresService; | ||||
|  | ||||
| 	public function Overview(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		return $this->AppContainer->view->render($response, 'choresoverview', [ | ||||
| 			'chores' => $this->Database->chores()->orderBy('name'), | ||||
| 			'currentChores' => $this->ChoresService->GetCurrent(), | ||||
| 			'nextXDays' => 5 | ||||
| 		]); | ||||
| 	} | ||||
|  | ||||
| 	public function TrackChoreExecution(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		return $this->AppContainer->view->render($response, 'choretracking', [ | ||||
| 			'chores' => $this->Database->chores()->orderBy('name'), | ||||
| 			'users' => $this->Database->users()->orderBy('username') | ||||
| 		]); | ||||
| 	} | ||||
|  | ||||
| 	public function ChoresList(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		return $this->AppContainer->view->render($response, 'chores', [ | ||||
| 			'chores' => $this->Database->chores()->orderBy('name') | ||||
| 		]); | ||||
| 	} | ||||
|  | ||||
| 	public function Journal(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		return $this->AppContainer->view->render($response, 'choresjournal', [ | ||||
| 			'choresLog' => $this->Database->chores_log()->orderBy('tracked_time', 'DESC'), | ||||
| 			'chores' => $this->Database->chores()->orderBy('name'), | ||||
| 			'users' => $this->Database->users()->orderBy('username') | ||||
| 		]); | ||||
| 	} | ||||
|  | ||||
| 	public function ChoreEditForm(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		if ($args['choreId'] == 'new') | ||||
| 		{ | ||||
| 			return $this->AppContainer->view->render($response, 'choreform', [ | ||||
| 				'periodTypes' => GetClassConstants('\Grocy\Services\ChoresService'), | ||||
| 				'mode' => 'create' | ||||
| 			]); | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			return $this->AppContainer->view->render($response, 'choreform', [ | ||||
| 				'chore' =>  $this->Database->chores($args['choreId']), | ||||
| 				'periodTypes' => GetClassConstants('\Grocy\Services\ChoresService'), | ||||
| 				'mode' => 'edit' | ||||
| 			]); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
| @@ -1,19 +0,0 @@ | ||||
| <?php | ||||
|  | ||||
| namespace Grocy\Controllers; | ||||
|  | ||||
| use \Grocy\Services\ApplicationService; | ||||
| use \Grocy\Services\DatabaseMigrationService; | ||||
|  | ||||
| class CliController extends BaseController | ||||
| { | ||||
| 	public function RecreateDemo(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		$applicationService = new ApplicationService(); | ||||
| 		if ($applicationService->IsDemoInstallation()) | ||||
| 		{ | ||||
| 			$databaseMigrationService = new DatabaseMigrationService(); | ||||
| 			$databaseMigrationService->RecreateDemo(); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
							
								
								
									
										31
									
								
								controllers/EquipmentController.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								controllers/EquipmentController.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,31 @@ | ||||
| <?php | ||||
|  | ||||
| namespace Grocy\Controllers; | ||||
|  | ||||
|  | ||||
| class EquipmentController extends BaseController | ||||
| { | ||||
| 	public function Overview(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		return $this->AppContainer->view->render($response, 'equipment', [ | ||||
| 			'equipment' => $this->Database->equipment()->orderBy('name') | ||||
| 		]); | ||||
| 	} | ||||
|  | ||||
| 	public function EditForm(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		if ($args['equipmentId'] == 'new') | ||||
| 		{ | ||||
| 			return $this->AppContainer->view->render($response, 'equipmentform', [ | ||||
| 				'mode' => 'create' | ||||
| 			]); | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			return $this->AppContainer->view->render($response, 'equipmentform', [ | ||||
| 				'equipment' =>  $this->Database->equipment($args['equipmentId']), | ||||
| 				'mode' => 'edit' | ||||
| 			]); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
							
								
								
									
										99
									
								
								controllers/FilesApiController.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										99
									
								
								controllers/FilesApiController.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,99 @@ | ||||
| <?php | ||||
|  | ||||
| namespace Grocy\Controllers; | ||||
|  | ||||
| use \Grocy\Services\FilesService; | ||||
|  | ||||
| class FilesApiController extends BaseApiController | ||||
| { | ||||
| 	public function __construct(\Slim\Container $container) | ||||
| 	{ | ||||
| 		parent::__construct($container); | ||||
| 		$this->FilesService = new FilesService(); | ||||
| 	} | ||||
|  | ||||
| 	protected $FilesService; | ||||
|  | ||||
| 	public function UploadFile(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		try | ||||
| 		{ | ||||
| 			if (isset($request->getQueryParams()['file_name']) && !empty($request->getQueryParams()['file_name']) && IsValidFileName($request->getQueryParams()['file_name'])) | ||||
| 			{ | ||||
| 				$fileName = $request->getQueryParams()['file_name']; | ||||
| 			} | ||||
| 			else | ||||
| 			{ | ||||
| 				throw new \Exception('file_name query parameter missing or contains an invalid filename'); | ||||
| 			} | ||||
|  | ||||
| 			$data = $request->getBody()->getContents(); | ||||
| 			file_put_contents($this->FilesService->GetFilePath($args['group'], $fileName), $data); | ||||
|  | ||||
| 			return $this->ApiResponse(array('success' => true)); | ||||
| 		} | ||||
| 		catch (\Exception $ex) | ||||
| 		{ | ||||
| 			return $this->VoidApiActionResponse($response, false, 400, $ex->getMessage()); | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	public function ServeFile(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		try | ||||
| 		{ | ||||
| 			if (isset($request->getQueryParams()['file_name']) && !empty($request->getQueryParams()['file_name']) && IsValidFileName($request->getQueryParams()['file_name'])) | ||||
| 			{ | ||||
| 				$fileName = $request->getQueryParams()['file_name']; | ||||
| 			} | ||||
| 			else | ||||
| 			{ | ||||
| 				throw new \Exception('file_name query parameter missing or contains an invalid filename'); | ||||
| 			} | ||||
|  | ||||
| 			$filePath = $this->FilesService->GetFilePath($args['group'], $fileName); | ||||
|  | ||||
| 			if (file_exists($filePath)) | ||||
| 			{ | ||||
| 				$response->write(file_get_contents($filePath)); | ||||
| 				$response = $response->withHeader('Content-Type', mime_content_type($filePath)); | ||||
| 				return $response->withHeader('Content-Disposition', 'inline; filename="' . $fileName . '"'); | ||||
| 			} | ||||
| 			else | ||||
| 			{ | ||||
| 				return $this->VoidApiActionResponse($response, false, 404, 'File not found'); | ||||
| 			} | ||||
| 		} | ||||
| 		catch (\Exception $ex) | ||||
| 		{ | ||||
| 			return $this->VoidApiActionResponse($response, false, 400, $ex->getMessage()); | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	public function DeleteFile(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		try | ||||
| 		{ | ||||
| 			if (isset($request->getQueryParams()['file_name']) && !empty($request->getQueryParams()['file_name']) && IsValidFileName($request->getQueryParams()['file_name'])) | ||||
| 			{ | ||||
| 				$fileName = $request->getQueryParams()['file_name']; | ||||
| 			} | ||||
| 			else | ||||
| 			{ | ||||
| 				throw new \Exception('file_name query parameter missing or contains an invalid filename'); | ||||
| 			} | ||||
|  | ||||
| 			$filePath = $this->FilesService->GetFilePath($args['group'], $fileName); | ||||
| 			if (file_exists($filePath)) | ||||
| 			{ | ||||
| 				unlink($filePath); | ||||
| 			} | ||||
|  | ||||
| 			return $this->ApiResponse(array('success' => true)); | ||||
| 		} | ||||
| 		catch (\Exception $ex) | ||||
| 		{ | ||||
| 			return $this->VoidApiActionResponse($response, false, 400, $ex->getMessage()); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
| @@ -6,7 +6,7 @@ class GenericEntityApiController extends BaseApiController | ||||
| { | ||||
| 	public function GetObjects(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		if ($this->IsValidEntity($args['entity'])) | ||||
| 		if ($this->IsValidEntity($args['entity']) && !$this->IsEntityWithPreventedListing($args['entity'])) | ||||
| 		{ | ||||
| 			return $this->ApiResponse($this->Database->{$args['entity']}()); | ||||
| 		} | ||||
| @@ -18,7 +18,7 @@ class GenericEntityApiController extends BaseApiController | ||||
|  | ||||
| 	public function GetObject(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		if ($this->IsValidEntity($args['entity'])) | ||||
| 		if ($this->IsValidEntity($args['entity']) && !$this->IsEntityWithPreventedListing($args['entity'])) | ||||
| 		{ | ||||
| 			return $this->ApiResponse($this->Database->{$args['entity']}($args['objectId'])); | ||||
| 		} | ||||
| @@ -32,10 +32,24 @@ class GenericEntityApiController extends BaseApiController | ||||
| 	{ | ||||
| 		if ($this->IsValidEntity($args['entity'])) | ||||
| 		{ | ||||
| 			$newRow = $this->Database->{$args['entity']}()->createRow($request->getParsedBody()); | ||||
| 			$newRow->save(); | ||||
| 			$success = $newRow->isClean(); | ||||
| 			return $this->ApiResponse(array('success' => $success)); | ||||
| 			$requestBody = $request->getParsedBody(); | ||||
|  | ||||
| 			try | ||||
| 			{ | ||||
| 				if ($requestBody === null) | ||||
| 				{ | ||||
| 					throw new \Exception('Request body could not be parsed (probably invalid JSON format or missing/wrong Content-Type header)'); | ||||
| 				} | ||||
|  | ||||
| 				$newRow = $this->Database->{$args['entity']}()->createRow($requestBody); | ||||
| 				$newRow->save(); | ||||
| 				$success = $newRow->isClean(); | ||||
| 				return $this->ApiResponse(array('success' => $success)); | ||||
| 			} | ||||
| 			catch (\Exception $ex) | ||||
| 			{ | ||||
| 				return $this->VoidApiActionResponse($response, false, 400, $ex->getMessage()); | ||||
| 			} | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| @@ -47,10 +61,24 @@ class GenericEntityApiController extends BaseApiController | ||||
| 	{ | ||||
| 		if ($this->IsValidEntity($args['entity'])) | ||||
| 		{ | ||||
| 			$row = $this->Database->{$args['entity']}($args['objectId']); | ||||
| 			$row->update($request->getParsedBody()); | ||||
| 			$success = $row->isClean(); | ||||
| 			return $this->ApiResponse(array('success' => $success)); | ||||
| 			$requestBody = $request->getParsedBody(); | ||||
|  | ||||
| 			try | ||||
| 			{ | ||||
| 				if ($requestBody === null) | ||||
| 				{ | ||||
| 					throw new \Exception('Request body could not be parsed (probably invalid JSON format or missing/wrong Content-Type header)'); | ||||
| 				} | ||||
|  | ||||
| 				$row = $this->Database->{$args['entity']}($args['objectId']); | ||||
| 				$row->update($requestBody); | ||||
| 				$success = $row->isClean(); | ||||
| 				return $this->ApiResponse(array('success' => $success)); | ||||
| 			} | ||||
| 			catch (\Exception $ex) | ||||
| 			{ | ||||
| 				return $this->VoidApiActionResponse($response, false, 400, $ex->getMessage()); | ||||
| 			} | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| @@ -77,4 +105,9 @@ class GenericEntityApiController extends BaseApiController | ||||
| 	{ | ||||
| 		return in_array($entity, $this->OpenApiSpec->components->internalSchemas->ExposedEntity->enum); | ||||
| 	} | ||||
|  | ||||
| 	private function IsEntityWithPreventedListing($entity) | ||||
| 	{ | ||||
| 		return in_array($entity, $this->OpenApiSpec->components->internalSchemas->ExposedEntitiesPreventListing->enum); | ||||
| 	} | ||||
| } | ||||
|   | ||||
| @@ -1,47 +0,0 @@ | ||||
| <?php | ||||
|  | ||||
| namespace Grocy\Controllers; | ||||
|  | ||||
| use \Grocy\Services\HabitsService; | ||||
|  | ||||
| class HabitsApiController extends BaseApiController | ||||
| { | ||||
| 	public function __construct(\Slim\Container $container) | ||||
| 	{ | ||||
| 		parent::__construct($container); | ||||
| 		$this->HabitsService = new HabitsService(); | ||||
| 	} | ||||
|  | ||||
| 	protected $HabitsService; | ||||
|  | ||||
| 	public function TrackHabitExecution(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		$trackedTime = date('Y-m-d H:i:s'); | ||||
| 		if (isset($request->getQueryParams()['tracked_time']) && !empty($request->getQueryParams()['tracked_time']) && IsIsoDateTime($request->getQueryParams()['tracked_time'])) | ||||
| 		{ | ||||
| 			$trackedTime = $request->getQueryParams()['tracked_time']; | ||||
| 		} | ||||
|  | ||||
| 		try | ||||
| 		{ | ||||
| 			$this->HabitsService->TrackHabit($args['habitId'], $trackedTime); | ||||
| 			return $this->VoidApiActionResponse($response); | ||||
| 		} | ||||
| 		catch (\Exception $ex) | ||||
| 		{ | ||||
| 			return $this->VoidApiActionResponse($response, false, 400, $ex->getMessage()); | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	public function HabitDetails(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		try | ||||
| 		{ | ||||
| 			return $this->ApiResponse($this->HabitsService->GetHabitDetails($args['habitId'])); | ||||
| 		} | ||||
| 		catch (\Exception $ex) | ||||
| 		{ | ||||
| 			return $this->VoidApiActionResponse($response, false, 400, $ex->getMessage()); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
| @@ -1,70 +0,0 @@ | ||||
| <?php | ||||
|  | ||||
| namespace Grocy\Controllers; | ||||
|  | ||||
| use \Grocy\Services\HabitsService; | ||||
|  | ||||
| class HabitsController extends BaseController | ||||
| { | ||||
| 	public function __construct(\Slim\Container $container) | ||||
| 	{ | ||||
| 		parent::__construct($container); | ||||
| 		$this->HabitsService = new HabitsService(); | ||||
| 	} | ||||
|  | ||||
| 	protected $HabitsService; | ||||
|  | ||||
| 	public function Overview(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		$nextHabitTimes = array(); | ||||
| 		foreach($this->Database->habits() as $habit) | ||||
| 		{ | ||||
| 			$nextHabitTimes[$habit->id] = $this->HabitsService->GetNextHabitTime($habit->id); | ||||
| 		} | ||||
|  | ||||
| 		$nextXDays = 5; | ||||
| 		$countDueNextXDays = count(FindAllItemsInArrayByValue($nextHabitTimes, date('Y-m-d', strtotime("+$nextXDays days")), '<')); | ||||
| 		$countOverdue = count(FindAllItemsInArrayByValue($nextHabitTimes, date('Y-m-d', strtotime('-1 days')), '<')); | ||||
| 		return $this->AppContainer->view->render($response, 'habitsoverview', [ | ||||
| 			'habits' => $this->Database->habits()->orderBy('name'), | ||||
| 			'currentHabits' => $this->HabitsService->GetCurrentHabits(), | ||||
| 			'nextHabitTimes' => $nextHabitTimes, | ||||
| 			'nextXDays' => $nextXDays, | ||||
| 			'countDueNextXDays' => $countDueNextXDays - $countOverdue, | ||||
| 			'countOverdue' => $countOverdue | ||||
| 		]); | ||||
| 	} | ||||
|  | ||||
| 	public function TrackHabitExecution(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		return $this->AppContainer->view->render($response, 'habittracking', [ | ||||
| 			'habits' => $this->Database->habits()->orderBy('name') | ||||
| 		]); | ||||
| 	} | ||||
|  | ||||
| 	public function HabitsList(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		return $this->AppContainer->view->render($response, 'habits', [ | ||||
| 			'habits' => $this->Database->habits()->orderBy('name') | ||||
| 		]); | ||||
| 	} | ||||
|  | ||||
| 	public function HabitEditForm(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		if ($args['habitId'] == 'new') | ||||
| 		{ | ||||
| 			return $this->AppContainer->view->render($response, 'habitform', [ | ||||
| 				'periodTypes' => GetClassConstants('\Grocy\Services\HabitsService'), | ||||
| 				'mode' => 'create' | ||||
| 			]); | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			return $this->AppContainer->view->render($response, 'habitform', [ | ||||
| 				'habit' =>  $this->Database->habits($args['habitId']), | ||||
| 				'periodTypes' => GetClassConstants('\Grocy\Services\HabitsService'), | ||||
| 				'mode' => 'edit' | ||||
| 			]); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
| @@ -3,7 +3,6 @@ | ||||
| namespace Grocy\Controllers; | ||||
|  | ||||
| use \Grocy\Services\SessionService; | ||||
| use \Grocy\Services\ApplicationService; | ||||
| use \Grocy\Services\DatabaseMigrationService; | ||||
| use \Grocy\Services\DemoDataGeneratorService; | ||||
|  | ||||
| @@ -24,10 +23,21 @@ class LoginController extends BaseController | ||||
| 		$postParams = $request->getParsedBody(); | ||||
| 		if (isset($postParams['username']) && isset($postParams['password'])) | ||||
| 		{ | ||||
| 			if ($postParams['username'] === HTTP_USER && $postParams['password'] === HTTP_PASSWORD) | ||||
| 			$user = $this->Database->users()->where('username', $postParams['username'])->fetch(); | ||||
| 			$inputPassword = $postParams['password']; | ||||
| 			$stayLoggedInPermanently = $postParams['stay_logged_in'] == 'on'; | ||||
|  | ||||
| 			if ($user !== null && password_verify($inputPassword, $user->password)) | ||||
| 			{ | ||||
| 				$sessionKey = $this->SessionService->CreateSession(); | ||||
| 				setcookie($this->SessionCookieName, $sessionKey, time() + 31536000); // Cookie expires in 1 year, but session validity is up to SessionService | ||||
| 				$sessionKey = $this->SessionService->CreateSession($user->id, $stayLoggedInPermanently); | ||||
| 				setcookie($this->SessionCookieName, $sessionKey, intval(time() + 31220640000)); // Cookie expires in 999 years, but session validity is up to SessionService | ||||
|  | ||||
| 				if (password_needs_rehash($user->password, PASSWORD_DEFAULT)) | ||||
| 				{ | ||||
| 					$user->update(array( | ||||
| 						'password' => password_hash($inputPassword, PASSWORD_DEFAULT) | ||||
| 					)); | ||||
| 				} | ||||
|  | ||||
| 				return $response->withRedirect($this->AppContainer->UrlManager->ConstructUrl('/')); | ||||
| 			} | ||||
| @@ -59,8 +69,7 @@ class LoginController extends BaseController | ||||
| 		$databaseMigrationService = new DatabaseMigrationService(); | ||||
| 		$databaseMigrationService->MigrateDatabase(); | ||||
|  | ||||
| 		$applicationService = new ApplicationService(); | ||||
| 		if ($applicationService->IsDemoInstallation()) | ||||
| 		if (GROCY_IS_DEMO_INSTALL) | ||||
| 		{ | ||||
| 			$demoDataGeneratorService = new DemoDataGeneratorService(); | ||||
| 			$demoDataGeneratorService->PopulateDemoData(); | ||||
|   | ||||
| @@ -35,7 +35,8 @@ class OpenApiController extends BaseApiController | ||||
| 	public function ApiKeysList(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		return $this->AppContainer->view->render($response, 'manageapikeys', [ | ||||
| 			'apiKeys' => $this->Database->api_keys() | ||||
| 			'apiKeys' => $this->Database->api_keys(), | ||||
| 			'users' => $this->Database->users() | ||||
| 		]); | ||||
| 	} | ||||
|  | ||||
|   | ||||
							
								
								
									
										35
									
								
								controllers/RecipesApiController.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								controllers/RecipesApiController.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,35 @@ | ||||
| <?php | ||||
|  | ||||
| namespace Grocy\Controllers; | ||||
|  | ||||
| use \Grocy\Services\RecipesService; | ||||
|  | ||||
| class RecipesApiController extends BaseApiController | ||||
| { | ||||
| 	public function __construct(\Slim\Container $container) | ||||
| 	{ | ||||
| 		parent::__construct($container); | ||||
| 		$this->RecipesService = new RecipesService(); | ||||
| 	} | ||||
|  | ||||
| 	protected $RecipesService; | ||||
|  | ||||
| 	public function AddNotFulfilledProductsToShoppingList(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		$this->RecipesService->AddNotFulfilledProductsToShoppingList($args['recipeId']); | ||||
| 		return $this->VoidApiActionResponse($response); | ||||
| 	} | ||||
|  | ||||
| 	public function ConsumeRecipe(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		try | ||||
| 		{ | ||||
| 			$this->RecipesService->ConsumeRecipe($args['recipeId']); | ||||
| 			return $this->VoidApiActionResponse($response); | ||||
| 		} | ||||
| 		catch (\Exception $ex) | ||||
| 		{ | ||||
| 			return $this->VoidApiActionResponse($response, false, 400, $ex->getMessage()); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
							
								
								
									
										102
									
								
								controllers/RecipesController.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										102
									
								
								controllers/RecipesController.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,102 @@ | ||||
| <?php | ||||
|  | ||||
| namespace Grocy\Controllers; | ||||
|  | ||||
| use \Grocy\Services\RecipesService; | ||||
|  | ||||
| class RecipesController extends BaseController | ||||
| { | ||||
| 	public function __construct(\Slim\Container $container) | ||||
| 	{ | ||||
| 		parent::__construct($container); | ||||
| 		$this->RecipesService = new RecipesService(); | ||||
| 	} | ||||
|  | ||||
| 	protected $RecipesService; | ||||
|  | ||||
| 	public function Overview(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		$recipes = $this->Database->recipes()->orderBy('name'); | ||||
|  | ||||
| 		$selectedRecipe = null; | ||||
| 		$selectedRecipePositions = null; | ||||
| 		if (isset($request->getQueryParams()['recipe'])) | ||||
| 		{ | ||||
| 			$selectedRecipe = $this->Database->recipes($request->getQueryParams()['recipe']); | ||||
| 			$selectedRecipePositions = $this->Database->recipes_pos()->where('recipe_id', $request->getQueryParams()['recipe'])->orderBy('ingredient_group'); | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			foreach ($recipes as $recipe) | ||||
| 			{ | ||||
| 				$selectedRecipe = $recipe; | ||||
| 				$selectedRecipePositions = $this->Database->recipes_pos()->where('recipe_id', $recipe->id)->orderBy('ingredient_group'); | ||||
| 				break; | ||||
| 			} | ||||
| 		} | ||||
|  | ||||
| 		$selectedRecipeSubRecipes = $this->Database->recipes()->where('id IN (SELECT includes_recipe_id FROM recipes_nestings_resolved WHERE recipe_id = :1 AND includes_recipe_id != :1)', $selectedRecipe->id)->orderBy('name')->fetchAll(); | ||||
| 		$selectedRecipeSubRecipesPositions = $this->Database->recipes_pos()->where('recipe_id IN (SELECT includes_recipe_id FROM recipes_nestings_resolved WHERE recipe_id = :1 AND includes_recipe_id != :1)', $selectedRecipe->id)->orderBy('ingredient_group')->fetchAll(); | ||||
|  | ||||
| 		return $this->AppContainer->view->render($response, 'recipes', [ | ||||
| 			'recipes' => $recipes, | ||||
| 			'recipesFulfillment' => $this->RecipesService->GetRecipesFulfillment(), | ||||
| 			'recipesSumFulfillment' => $this->RecipesService->GetRecipesSumFulfillment(), | ||||
| 			'selectedRecipe' => $selectedRecipe, | ||||
| 			'selectedRecipePositions' => $selectedRecipePositions, | ||||
| 			'products' => $this->Database->products(), | ||||
| 			'quantityunits' => $this->Database->quantity_units(), | ||||
| 			'selectedRecipeSubRecipes' => $selectedRecipeSubRecipes, | ||||
| 			'selectedRecipeSubRecipesPositions' => $selectedRecipeSubRecipesPositions | ||||
| 		]); | ||||
| 	} | ||||
|  | ||||
| 	public function RecipeEditForm(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		$recipeId = $args['recipeId']; | ||||
| 		if ($recipeId  == 'new') | ||||
| 		{ | ||||
| 			$newRecipe = $this->Database->recipes()->createRow(array( | ||||
| 				'name' => $this->LocalizationService->Localize('New recipe') | ||||
| 			)); | ||||
| 			$newRecipe->save(); | ||||
|  | ||||
| 			$recipeId = $this->Database->lastInsertId(); | ||||
| 		} | ||||
| 		 | ||||
| 		return $this->AppContainer->view->render($response, 'recipeform', [ | ||||
| 			'recipe' =>  $this->Database->recipes($recipeId), | ||||
| 			'recipePositions' =>  $this->Database->recipes_pos()->where('recipe_id', $recipeId), | ||||
| 			'mode' => 'edit', | ||||
| 			'products' => $this->Database->products(), | ||||
| 			'quantityunits' => $this->Database->quantity_units(), | ||||
| 			'recipesFulfillment' => $this->RecipesService->GetRecipesFulfillment(), | ||||
| 			'recipesSumFulfillment' => $this->RecipesService->GetRecipesSumFulfillment(), | ||||
| 			'recipes' =>  $this->Database->recipes()->orderBy('name'), | ||||
| 			'recipeNestings' =>  $this->Database->recipes_nestings()->where('recipe_id', $recipeId) | ||||
| 		]); | ||||
| 	} | ||||
|  | ||||
| 	public function RecipePosEditForm(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		if ($args['recipePosId'] == 'new') | ||||
| 		{ | ||||
| 			return $this->AppContainer->view->render($response, 'recipeposform', [ | ||||
| 				'mode' => 'create', | ||||
| 				'recipe' => $this->Database->recipes($args['recipeId']), | ||||
| 				'products' => $this->Database->products()->orderBy('name'), | ||||
| 				'quantityUnits' => $this->Database->quantity_units()->orderBy('name') | ||||
| 			]); | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			return $this->AppContainer->view->render($response, 'recipeposform', [ | ||||
| 				'mode' => 'edit', | ||||
| 				'recipe' =>  $this->Database->recipes($args['recipeId']), | ||||
| 				'recipePos' => $this->Database->recipes_pos($args['recipePosId']), | ||||
| 				'products' => $this->Database->products()->orderBy('name'), | ||||
| 				'quantityUnits' => $this->Database->quantity_units()->orderBy('name') | ||||
| 			]); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
| @@ -26,6 +26,18 @@ class StockApiController extends BaseApiController | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	public function ProductPriceHistory(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		try | ||||
| 		{ | ||||
| 			return $this->ApiResponse($this->StockService->GetProductPriceHistory($args['productId'])); | ||||
| 		} | ||||
| 		catch (\Exception $ex) | ||||
| 		{ | ||||
| 			return $this->VoidApiActionResponse($response, false, 400, $ex->getMessage()); | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	public function AddProduct(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		$bestBeforeDate = date('Y-m-d'); | ||||
| @@ -34,6 +46,12 @@ class StockApiController extends BaseApiController | ||||
| 			$bestBeforeDate = $request->getQueryParams()['bestbeforedate']; | ||||
| 		} | ||||
|  | ||||
| 		$price = null; | ||||
| 		if (isset($request->getQueryParams()['price']) && !empty($request->getQueryParams()['price']) && is_numeric($request->getQueryParams()['price'])) | ||||
| 		{ | ||||
| 			$price = $request->getQueryParams()['price']; | ||||
| 		} | ||||
|  | ||||
| 		$transactionType = StockService::TRANSACTION_TYPE_PURCHASE; | ||||
| 		if (isset($request->getQueryParams()['transactiontype']) && !empty($request->getQueryParams()['transactiontype'])) | ||||
| 		{ | ||||
| @@ -42,8 +60,8 @@ class StockApiController extends BaseApiController | ||||
|  | ||||
| 		try | ||||
| 		{ | ||||
| 			$this->StockService->AddProduct($args['productId'], $args['amount'], $bestBeforeDate, $transactionType); | ||||
| 			return $this->VoidApiActionResponse($response); | ||||
| 			$bookingId = $this->StockService->AddProduct($args['productId'], $args['amount'], $bestBeforeDate, $transactionType, date('Y-m-d'), $price); | ||||
| 			return $this->ApiResponse(array('booking_id' => $bookingId)); | ||||
| 		} | ||||
| 		catch (\Exception $ex) | ||||
| 		{ | ||||
| @@ -65,10 +83,16 @@ class StockApiController extends BaseApiController | ||||
| 			$transactionType = $request->getQueryParams()['transactiontype']; | ||||
| 		} | ||||
|  | ||||
| 		$specificStockEntryId = "default"; | ||||
| 		if (isset($request->getQueryParams()['stock_entry_id']) && !empty($request->getQueryParams()['stock_entry_id'])) | ||||
| 		{ | ||||
| 			$specificStockEntryId = $request->getQueryParams()['stock_entry_id']; | ||||
| 		} | ||||
|  | ||||
| 		try | ||||
| 		{ | ||||
| 			$this->StockService->ConsumeProduct($args['productId'], $args['amount'], $spoiled, $transactionType); | ||||
| 			return $this->VoidApiActionResponse($response); | ||||
| 			$bookingId = $this->StockService->ConsumeProduct($args['productId'], $args['amount'], $spoiled, $transactionType, $specificStockEntryId); | ||||
| 			return $this->ApiResponse(array('booking_id' => $bookingId)); | ||||
| 		} | ||||
| 		catch (\Exception $ex) | ||||
| 		{ | ||||
| @@ -86,8 +110,27 @@ class StockApiController extends BaseApiController | ||||
|  | ||||
| 		try | ||||
| 		{ | ||||
| 			$this->StockService->InventoryProduct($args['productId'], $args['newAmount'], $bestBeforeDate); | ||||
| 			return $this->VoidApiActionResponse($response); | ||||
| 			$bookingId = $this->StockService->InventoryProduct($args['productId'], $args['newAmount'], $bestBeforeDate); | ||||
| 			return $this->ApiResponse(array('booking_id' => $bookingId)); | ||||
| 		} | ||||
| 		catch (\Exception $ex) | ||||
| 		{ | ||||
| 			return $this->VoidApiActionResponse($response, false, 400, $ex->getMessage()); | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	public function OpenProduct(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		$specificStockEntryId = "default"; | ||||
| 		if (isset($request->getQueryParams()['stock_entry_id']) && !empty($request->getQueryParams()['stock_entry_id'])) | ||||
| 		{ | ||||
| 			$specificStockEntryId = $request->getQueryParams()['stock_entry_id']; | ||||
| 		} | ||||
|  | ||||
| 		try | ||||
| 		{ | ||||
| 			$bookingId = $this->StockService->OpenProduct($args['productId'], $args['amount'], $specificStockEntryId); | ||||
| 			return $this->ApiResponse(array('booking_id' => $bookingId)); | ||||
| 		} | ||||
| 		catch (\Exception $ex) | ||||
| 		{ | ||||
| @@ -100,12 +143,36 @@ class StockApiController extends BaseApiController | ||||
| 		return $this->ApiResponse($this->StockService->GetCurrentStock()); | ||||
| 	} | ||||
|  | ||||
| 	public function CurrentVolatilStock(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		$nextXDays = 5; | ||||
| 		if (isset($request->getQueryParams()['expiring_days']) && !empty($request->getQueryParams()['expiring_days']) && is_numeric($request->getQueryParams()['expiring_days'])) | ||||
| 		{ | ||||
| 			$nextXDays = $request->getQueryParams()['expiring_days']; | ||||
| 		} | ||||
|  | ||||
| 		$expiringProducts = $this->StockService->GetExpiringProducts($nextXDays, true); | ||||
| 		$expiredProducts = $this->StockService->GetExpiringProducts(-1); | ||||
| 		$missingProducts = $this->StockService->GetMissingProducts(); | ||||
| 		return $this->ApiResponse(array( | ||||
| 			 'expiring_products' => $expiringProducts, | ||||
| 			 'expired_products' => $expiredProducts, | ||||
| 			 'missing_products' => $missingProducts | ||||
| 		)); | ||||
| 	} | ||||
|  | ||||
| 	public function AddMissingProductsToShoppingList(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		$this->StockService->AddMissingProductsToShoppingList(); | ||||
| 		return $this->VoidApiActionResponse($response); | ||||
| 	} | ||||
|  | ||||
| 	public function ClearShoppingList(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		$this->StockService->ClearShoppingList(); | ||||
| 		return $this->VoidApiActionResponse($response); | ||||
| 	} | ||||
|  | ||||
| 	public function ExternalBarcodeLookup(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		try | ||||
| @@ -123,4 +190,22 @@ class StockApiController extends BaseApiController | ||||
| 			return $this->VoidApiActionResponse($response, false, 400, $ex->getMessage()); | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	public function UndoBooking(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		try | ||||
| 		{ | ||||
| 			$this->ApiResponse($this->StockService->UndoBooking($args['bookingId'])); | ||||
| 			return $this->ApiResponse(array('success' => true)); | ||||
| 		} | ||||
| 		catch (\Exception $ex) | ||||
| 		{ | ||||
| 			return $this->VoidApiActionResponse($response, false, 400, $ex->getMessage()); | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	public function ProductStockEntries(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		return $this->ApiResponse($this->StockService->GetProductStockEntries($args['productId'])); | ||||
| 	} | ||||
| } | ||||
|   | ||||
| @@ -17,19 +17,14 @@ class StockController extends BaseController | ||||
|  | ||||
| 	public function Overview(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		$currentStock = $this->StockService->GetCurrentStock(); | ||||
| 		$nextXDays = 5; | ||||
| 		$countExpiringNextXDays = count(FindAllObjectsInArrayByPropertyValue($currentStock, 'best_before_date', date('Y-m-d', strtotime('+5 days')), '<')); | ||||
| 		$countAlreadyExpired = count(FindAllObjectsInArrayByPropertyValue($currentStock, 'best_before_date', date('Y-m-d', strtotime('-1 days')), '<')); | ||||
| 		return $this->AppContainer->view->render($response, 'stockoverview', [ | ||||
| 			'products' => $this->Database->products()->orderBy('name'), | ||||
| 			'quantityunits' => $this->Database->quantity_units()->orderBy('name'), | ||||
| 			'locations' => $this->Database->locations()->orderBy('name'), | ||||
| 			'currentStock' => $currentStock, | ||||
| 			'currentStock' => $this->StockService->GetCurrentStock(), | ||||
| 			'missingProducts' => $this->StockService->GetMissingProducts(), | ||||
| 			'nextXDays' => $nextXDays, | ||||
| 			'countExpiringNextXDays' => $countExpiringNextXDays, | ||||
| 			'countAlreadyExpired' => $countAlreadyExpired | ||||
| 			'nextXDays' => 5, | ||||
| 			'productGroups' => $this->Database->product_groups()->orderBy('name') | ||||
| 		]); | ||||
| 	} | ||||
|  | ||||
| @@ -60,7 +55,8 @@ class StockController extends BaseController | ||||
| 			'listItems' => $this->Database->shopping_list(), | ||||
| 			'products' => $this->Database->products()->orderBy('name'), | ||||
| 			'quantityunits' => $this->Database->quantity_units()->orderBy('name'), | ||||
| 			'missingProducts' => $this->StockService->GetMissingProducts() | ||||
| 			'missingProducts' => $this->StockService->GetMissingProducts(), | ||||
| 			'productGroups' => $this->Database->product_groups()->orderBy('name') | ||||
| 		]); | ||||
| 	} | ||||
|  | ||||
| @@ -69,7 +65,17 @@ class StockController extends BaseController | ||||
| 		return $this->AppContainer->view->render($response, 'products', [ | ||||
| 			'products' => $this->Database->products()->orderBy('name'), | ||||
| 			'locations' => $this->Database->locations()->orderBy('name'), | ||||
| 			'quantityunits' => $this->Database->quantity_units()->orderBy('name') | ||||
| 			'quantityunits' => $this->Database->quantity_units()->orderBy('name'), | ||||
| 			'productGroups' => $this->Database->product_groups()->orderBy('name') | ||||
| 		]); | ||||
| 	} | ||||
|  | ||||
| 	public function StockSettings(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		return $this->AppContainer->view->render($response, 'stocksettings', [ | ||||
| 			'locations' => $this->Database->locations()->orderBy('name'), | ||||
| 			'quantityunits' => $this->Database->quantity_units()->orderBy('name'), | ||||
| 			'productGroups' => $this->Database->product_groups()->orderBy('name') | ||||
| 		]); | ||||
| 	} | ||||
|  | ||||
| @@ -80,6 +86,13 @@ class StockController extends BaseController | ||||
| 		]); | ||||
| 	} | ||||
|  | ||||
| 	public function ProductGroupsList(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		return $this->AppContainer->view->render($response, 'productgroups', [ | ||||
| 			'productGroups' => $this->Database->product_groups()->orderBy('name') | ||||
| 		]); | ||||
| 	} | ||||
|  | ||||
| 	public function QuantityUnitsList(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		return $this->AppContainer->view->render($response, 'quantityunits', [ | ||||
| @@ -94,6 +107,7 @@ class StockController extends BaseController | ||||
| 			return $this->AppContainer->view->render($response, 'productform', [ | ||||
| 				'locations' =>  $this->Database->locations()->orderBy('name'), | ||||
| 				'quantityunits' =>  $this->Database->quantity_units()->orderBy('name'), | ||||
| 				'productgroups' => $this->Database->product_groups()->orderBy('name'), | ||||
| 				'mode' => 'create' | ||||
| 			]); | ||||
| 		} | ||||
| @@ -103,6 +117,7 @@ class StockController extends BaseController | ||||
| 				'product' =>  $this->Database->products($args['productId']), | ||||
| 				'locations' =>  $this->Database->locations()->orderBy('name'), | ||||
| 				'quantityunits' =>  $this->Database->quantity_units()->orderBy('name'), | ||||
| 				'productgroups' => $this->Database->product_groups()->orderBy('name'), | ||||
| 				'mode' => 'edit' | ||||
| 			]); | ||||
| 		} | ||||
| @@ -125,6 +140,23 @@ class StockController extends BaseController | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	public function ProductGroupEditForm(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		if ($args['productGroupId'] == 'new') | ||||
| 		{ | ||||
| 			return $this->AppContainer->view->render($response, 'productgroupform', [ | ||||
| 				'mode' => 'create' | ||||
| 			]); | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			return $this->AppContainer->view->render($response, 'productgroupform', [ | ||||
| 				'group' =>  $this->Database->product_groups($args['productGroupId']), | ||||
| 				'mode' => 'edit' | ||||
| 			]); | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	public function QuantityUnitEditForm(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		if ($args['quantityunitId'] == 'new') | ||||
| @@ -160,4 +192,13 @@ class StockController extends BaseController | ||||
| 			]); | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	public function Journal(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		return $this->AppContainer->view->render($response, 'stockjournal', [ | ||||
| 			'stockLog' => $this->Database->stock_log()->orderBy('row_created_timestamp', 'DESC'), | ||||
| 			'products' => $this->Database->products()->orderBy('name'), | ||||
| 			'quantityunits' => $this->Database->quantity_units()->orderBy('name') | ||||
| 		]); | ||||
| 	} | ||||
| } | ||||
|   | ||||
							
								
								
									
										41
									
								
								controllers/SystemApiController.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								controllers/SystemApiController.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,41 @@ | ||||
| <?php | ||||
|  | ||||
| namespace Grocy\Controllers; | ||||
|  | ||||
| use \Grocy\Services\DatabaseService; | ||||
|  | ||||
| class SystemApiController extends BaseApiController | ||||
| { | ||||
| 	public function __construct(\Slim\Container $container) | ||||
| 	{ | ||||
| 		parent::__construct($container); | ||||
| 		$this->DatabaseService = new DatabaseService(); | ||||
| 	} | ||||
|  | ||||
| 	protected $DatabaseService; | ||||
|  | ||||
| 	public function GetDbChangedTime(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		return $this->ApiResponse(array( | ||||
| 			'changed_time' => $this->DatabaseService->GetDbChangedTime() | ||||
| 		)); | ||||
| 	} | ||||
|  | ||||
| 	public function LogMissingLocalization(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		if (GROCY_MODE === 'dev') | ||||
| 		{ | ||||
| 			try | ||||
| 			{ | ||||
| 				$requestBody = $request->getParsedBody(); | ||||
|  | ||||
| 				$this->LocalizationService->LogMissingLocalization(GROCY_CULTURE, $requestBody['text']); | ||||
| 				return $this->ApiResponse(array('success' => true)); | ||||
| 			} | ||||
| 			catch (\Exception $ex) | ||||
| 			{ | ||||
| 				return $this->VoidApiActionResponse($response, false, 400, $ex->getMessage()); | ||||
| 			} | ||||
| 		}	 | ||||
| 	} | ||||
| } | ||||
							
								
								
									
										40
									
								
								controllers/TasksApiController.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								controllers/TasksApiController.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,40 @@ | ||||
| <?php | ||||
|  | ||||
| namespace Grocy\Controllers; | ||||
|  | ||||
| use \Grocy\Services\TasksService; | ||||
|  | ||||
| class TasksApiController extends BaseApiController | ||||
| { | ||||
| 	public function __construct(\Slim\Container $container) | ||||
| 	{ | ||||
| 		parent::__construct($container); | ||||
| 		$this->TasksService = new TasksService(); | ||||
| 	} | ||||
|  | ||||
| 	protected $TasksService; | ||||
|  | ||||
| 	public function Current(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		return $this->ApiResponse($this->TasksService->GetCurrent()); | ||||
| 	} | ||||
|  | ||||
| 	public function MarkTaskAsCompleted(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		$doneTime = date('Y-m-d H:i:s'); | ||||
| 		if (isset($request->getQueryParams()['done_time']) && !empty($request->getQueryParams()['done_time']) && IsIsoDateTime($request->getQueryParams()['done_time'])) | ||||
| 		{ | ||||
| 			$doneTime = $request->getQueryParams()['done_time']; | ||||
| 		} | ||||
|  | ||||
| 		try | ||||
| 		{ | ||||
| 			$this->TasksService->MarkTaskAsCompleted($args['taskId'], $doneTime); | ||||
| 			return $this->VoidApiActionResponse($response); | ||||
| 		} | ||||
| 		catch (\Exception $ex) | ||||
| 		{ | ||||
| 			return $this->VoidApiActionResponse($response, false, 400, $ex->getMessage()); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
							
								
								
									
										80
									
								
								controllers/TasksController.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										80
									
								
								controllers/TasksController.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,80 @@ | ||||
| <?php | ||||
|  | ||||
| namespace Grocy\Controllers; | ||||
|  | ||||
| use \Grocy\Services\TasksService; | ||||
|  | ||||
| class TasksController extends BaseController | ||||
| { | ||||
| 	public function __construct(\Slim\Container $container) | ||||
| 	{ | ||||
| 		parent::__construct($container); | ||||
| 		$this->TasksService = new TasksService(); | ||||
| 	} | ||||
|  | ||||
| 	protected $TasksService; | ||||
|  | ||||
| 	public function Overview(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		if (isset($request->getQueryParams()['include_done'])) | ||||
| 		{ | ||||
| 			$tasks = $this->Database->tasks()->orderBy('name'); | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			$tasks = $this->TasksService->GetCurrent(); | ||||
| 		} | ||||
|  | ||||
| 		return $this->AppContainer->view->render($response, 'tasks', [ | ||||
| 			'tasks' => $tasks, | ||||
| 			'nextXDays' => 5, | ||||
| 			'taskCategories' => $this->Database->task_categories()->orderBy('name'), | ||||
| 			'users' => $this->Database->users() | ||||
| 		]); | ||||
| 	} | ||||
|  | ||||
| 	public function TaskEditForm(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		if ($args['taskId'] == 'new') | ||||
| 		{ | ||||
| 			return $this->AppContainer->view->render($response, 'taskform', [ | ||||
| 				'mode' => 'create', | ||||
| 				'taskCategories' => $this->Database->task_categories()->orderBy('name'), | ||||
| 				'users' => $this->Database->users()->orderBy('username') | ||||
| 			]); | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			return $this->AppContainer->view->render($response, 'taskform', [ | ||||
| 				'task' =>  $this->Database->tasks($args['taskId']), | ||||
| 				'mode' => 'edit', | ||||
| 				'taskCategories' => $this->Database->task_categories()->orderBy('name'), | ||||
| 				'users' => $this->Database->users()->orderBy('username') | ||||
| 			]); | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	public function TaskCategoriesList(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		return $this->AppContainer->view->render($response, 'taskcategories', [ | ||||
| 			'taskCategories' => $this->Database->task_categories()->orderBy('name') | ||||
| 		]); | ||||
| 	} | ||||
|  | ||||
| 	public function TaskCategoryEditForm(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		if ($args['categoryId'] == 'new') | ||||
| 		{ | ||||
| 			return $this->AppContainer->view->render($response, 'taskcategoryform', [ | ||||
| 				'mode' => 'create' | ||||
| 			]); | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			return $this->AppContainer->view->render($response, 'taskcategoryform', [ | ||||
| 				'category' =>  $this->Database->task_categories($args['categoryId']), | ||||
| 				'mode' => 'edit' | ||||
| 			]); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
							
								
								
									
										104
									
								
								controllers/UsersApiController.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										104
									
								
								controllers/UsersApiController.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,104 @@ | ||||
| <?php | ||||
|  | ||||
| namespace Grocy\Controllers; | ||||
|  | ||||
| use \Grocy\Services\UsersService; | ||||
|  | ||||
| class UsersApiController extends BaseApiController | ||||
| { | ||||
| 	public function __construct(\Slim\Container $container) | ||||
| 	{ | ||||
| 		parent::__construct($container); | ||||
| 		$this->UsersService = new UsersService(); | ||||
| 	} | ||||
|  | ||||
| 	protected $UsersService; | ||||
|  | ||||
| 	public function GetUsers(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		try | ||||
| 		{ | ||||
| 			return $this->ApiResponse($this->UsersService->GetUsersAsDto()); | ||||
| 		} | ||||
| 		catch (\Exception $ex) | ||||
| 		{ | ||||
| 			return $this->VoidApiActionResponse($response, false, 400, $ex->getMessage()); | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	public function CreateUser(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		$requestBody = $request->getParsedBody(); | ||||
|  | ||||
| 		try | ||||
| 		{ | ||||
| 			if ($requestBody === null) | ||||
| 			{ | ||||
| 				throw new \Exception('Request body could not be parsed (probably invalid JSON format or missing/wrong Content-Type header)'); | ||||
| 			} | ||||
|  | ||||
| 			$this->UsersService->CreateUser($requestBody['username'], $requestBody['first_name'], $requestBody['last_name'], $requestBody['password']); | ||||
| 			return $this->ApiResponse(array('success' => true)); | ||||
| 		} | ||||
| 		catch (\Exception $ex) | ||||
| 		{ | ||||
| 			return $this->VoidApiActionResponse($response, false, 400, $ex->getMessage()); | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	public function DeleteUser(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		try | ||||
| 		{ | ||||
| 			$this->UsersService->DeleteUser($args['userId']); | ||||
| 			return $this->ApiResponse(array('success' => true)); | ||||
| 		} | ||||
| 		catch (\Exception $ex) | ||||
| 		{ | ||||
| 			return $this->VoidApiActionResponse($response, false, 400, $ex->getMessage()); | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	public function EditUser(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		$requestBody = $request->getParsedBody(); | ||||
|  | ||||
| 		try | ||||
| 		{ | ||||
| 			$this->UsersService->EditUser($args['userId'], $requestBody['username'], $requestBody['first_name'], $requestBody['last_name'], $requestBody['password']); | ||||
| 			return $this->ApiResponse(array('success' => true)); | ||||
| 		} | ||||
| 		catch (\Exception $ex) | ||||
| 		{ | ||||
| 			return $this->VoidApiActionResponse($response, false, 400, $ex->getMessage()); | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	public function GetUserSetting(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		try | ||||
| 		{ | ||||
| 			$value = $this->UsersService->GetUserSetting(GROCY_USER_ID, $args['settingKey']); | ||||
| 			return $this->ApiResponse(array('value' => $value)); | ||||
| 		} | ||||
| 		catch (\Exception $ex) | ||||
| 		{ | ||||
| 			return $this->VoidApiActionResponse($response, false, 400, $ex->getMessage()); | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	public function SetUserSetting(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		try | ||||
| 		{ | ||||
| 			$requestBody = $request->getParsedBody(); | ||||
|  | ||||
| 			$value = $this->UsersService->SetUserSetting(GROCY_USER_ID, $args['settingKey'], $requestBody['value']); | ||||
| 			return $this->ApiResponse(array('success' => true)); | ||||
| 		} | ||||
| 		catch (\Exception $ex) | ||||
| 		{ | ||||
| 			return $this->VoidApiActionResponse($response, false, 400, $ex->getMessage()); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
							
								
								
									
										30
									
								
								controllers/UsersController.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								controllers/UsersController.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,30 @@ | ||||
| <?php | ||||
|  | ||||
| namespace Grocy\Controllers; | ||||
|  | ||||
| class UsersController extends BaseController | ||||
| { | ||||
| 	public function UsersList(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		return $this->AppContainer->view->render($response, 'users', [ | ||||
| 			'users' => $this->Database->users()->orderBy('username') | ||||
| 		]); | ||||
| 	} | ||||
|  | ||||
| 	public function UserEditForm(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args) | ||||
| 	{ | ||||
| 		if ($args['userId'] == 'new') | ||||
| 		{ | ||||
| 			return $this->AppContainer->view->render($response, 'userform', [ | ||||
| 				'mode' => 'create' | ||||
| 			]); | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			return $this->AppContainer->view->render($response, 'userform', [ | ||||
| 				'user' =>  $this->Database->users($args['userId']), | ||||
| 				'mode' => 'edit' | ||||
| 			]); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
| @@ -9,7 +9,7 @@ class DemoBarcodeLookupPlugin extends BaseBarcodeLookupPlugin | ||||
| { | ||||
| 	/* | ||||
| 		To use this plugin, configure it in data/config.php like this: | ||||
| 		define('STOCK_BARCODE_LOOKUP_PLUGIN', 'DemoBarcodeLookupPlugin'); | ||||
| 		Setting('STOCK_BARCODE_LOOKUP_PLUGIN', 'DemoBarcodeLookupPlugin'); | ||||
| 	*/ | ||||
|  | ||||
| 	/* | ||||
|   | ||||
							
								
								
									
										1322
									
								
								grocy.openapi.json
									
									
									
									
									
								
							
							
						
						
									
										1322
									
								
								grocy.openapi.json
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -20,7 +20,7 @@ class UrlManager | ||||
|  | ||||
| 	public function ConstructUrl($relativePath, $isResource = false) | ||||
| 	{ | ||||
| 		if (DISABLE_URL_REWRITING === false || $isResource === true) | ||||
| 		if (GROCY_DISABLE_URL_REWRITING === false || $isResource === true) | ||||
| 		{ | ||||
| 			return rtrim($this->BasePath, '/') . $relativePath; | ||||
| 		} | ||||
| @@ -32,6 +32,11 @@ class UrlManager | ||||
|  | ||||
| 	private function GetBaseUrl() | ||||
| 	{ | ||||
| 		if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) | ||||
| 		{ | ||||
| 			$_SERVER['HTTPS'] = 'on'; | ||||
| 		} | ||||
|  | ||||
| 		return (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]"; | ||||
| 	} | ||||
| } | ||||
|   | ||||
| @@ -128,10 +128,78 @@ function BoolToString(bool $bool) | ||||
| 	return $bool ? 'true' : 'false'; | ||||
| } | ||||
|  | ||||
| function Setting(string $name, string $value) | ||||
| function Setting(string $name, $value) | ||||
| { | ||||
| 	if (!defined($name)) | ||||
| 	if (!defined('GROCY_' . $name)) | ||||
| 	{ | ||||
| 		define($name, $value); | ||||
| 		// The content of a $name.txt file in /data/settingoverrides can overwrite the given setting (for embedded mode) | ||||
| 		$settingOverrideFile = GROCY_DATAPATH . '/settingoverrides/' . $name . '.txt'; | ||||
| 		if (file_exists($settingOverrideFile)) | ||||
| 		{ | ||||
| 			define('GROCY_' . $name, file_get_contents($settingOverrideFile)); | ||||
| 		} | ||||
| 		elseif (getenv('GROCY_' . $name) !== false) // An environment variable with the same name and prefix GROCY_ overwrites the given setting | ||||
| 		{ | ||||
| 			define('GROCY_' . $name, getenv('GROCY_' . $name)); | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			define('GROCY_' . $name, $value); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
|  | ||||
| global $GROCY_DEFAULT_USER_SETTINGS; | ||||
| $GROCY_DEFAULT_USER_SETTINGS = array(); | ||||
| function DefaultUserSetting(string $name, $value) | ||||
| { | ||||
| 	global $GROCY_DEFAULT_USER_SETTINGS; | ||||
| 	if (!array_key_exists($name, $GROCY_DEFAULT_USER_SETTINGS)) | ||||
| 	{ | ||||
| 		$GROCY_DEFAULT_USER_SETTINGS[$name] = $value; | ||||
| 	} | ||||
| } | ||||
|  | ||||
| function GetUserDisplayName($user) | ||||
| { | ||||
| 	$displayName = ''; | ||||
| 	 | ||||
| 	if (empty($user->first_name) && !empty($user->last_name)) | ||||
| 	{ | ||||
| 		$displayName = $user->last_name; | ||||
| 	} | ||||
| 	elseif (empty($user->last_name) && !empty($user->first_name)) | ||||
| 	{ | ||||
| 		$displayName = $user->first_name; | ||||
| 	} | ||||
| 	elseif (!empty($user->last_name) && !empty($user->first_name)) | ||||
| 	{ | ||||
| 		$displayName = $user->first_name . ' ' . $user->last_name; | ||||
| 	} | ||||
| 	else | ||||
| 	{ | ||||
| 		$displayName = $user->username; | ||||
| 	} | ||||
|  | ||||
| 	return $displayName; | ||||
| } | ||||
|  | ||||
| function Pluralize($number, $singularForm, $pluralForm) | ||||
| { | ||||
| 	$text = $singularForm; | ||||
| 	if ($number != 1 && $pluralForm !== null && !empty($pluralForm)) | ||||
| 	{ | ||||
| 		$text = $pluralForm; | ||||
| 	} | ||||
| 	return $text; | ||||
| } | ||||
|  | ||||
| function IsValidFileName($fileName) | ||||
| { | ||||
| 	if(preg_match('=^[^/?*;:{}\\\\]+\.[^/?*;:{}\\\\]+$=', $fileName)) | ||||
| 	{ | ||||
| 		return true; | ||||
| 	} | ||||
|  | ||||
| 	return false; | ||||
| } | ||||
|   | ||||
| @@ -1,190 +0,0 @@ | ||||
| <?php | ||||
|  | ||||
| return array( | ||||
| 	'Stock overview' => 'Bestand', | ||||
| 	'#1 products with #2 units in stock' => '#1 Produkte (#2 Einheiten) vorrätig', | ||||
| 	'#1 products expiring within the next #2 days' => '#1 Produkte laufen innerhalb der nächsten #2 Tage ab', | ||||
| 	'#1 products are already expired' => '#1 Produkte sind bereits abgelaufen', | ||||
| 	'#1 products are below defined min. stock amount' => '#1 Produkte sind unter Mindestbestand', | ||||
| 	'Product' => 'Produkt', | ||||
| 	'Amount' => 'Menge', | ||||
| 	'Next best before date' => 'Nächstes MHD', | ||||
| 	'Logout' => 'Abmelden', | ||||
| 	'Habits overview' => 'Gewohnheiten', | ||||
| 	'Batteries overview' => 'Batterien', | ||||
| 	'Purchase' => 'Einkauf', | ||||
| 	'Consume' => 'Verbrauch', | ||||
| 	'Inventory' => 'Inventur', | ||||
| 	'Shopping list' => 'Einkaufszettel', | ||||
| 	'Habit tracking' => 'Gewohnheit-Ausführung', | ||||
| 	'Battery tracking' => 'Batterie-Ladzyklus', | ||||
| 	'Products' => 'Produkte', | ||||
| 	'Locations' => 'Standorte', | ||||
| 	'Quantity units' => 'Mengeneinheiten', | ||||
| 	'Habits' => 'Gewohnheiten', | ||||
| 	'Batteries' => 'Batterien', | ||||
| 	'Habit' => 'Gewohnheit', | ||||
| 	'Next estimated tracking' => 'Nächste geplante Ausführung', | ||||
| 	'Last tracked' => 'Zuletzt ausgeführt', | ||||
| 	'Battery' => 'Batterie', | ||||
| 	'Last charged' => 'Zuletzt geladen', | ||||
| 	'Next planned charge cycle' => 'Nächster geplanter Ladezyklus', | ||||
| 	'Best before' => 'MHD', | ||||
| 	'OK' => 'OK', | ||||
| 	'Product overview' => 'Produktübersicht', | ||||
| 	'Stock quantity unit' => 'Mengeneinheit Bestand', | ||||
| 	'Stock amount' => 'Bestand', | ||||
| 	'Last purchased' => 'Zuletzt gekauft', | ||||
| 	'Last used' => 'Zuletzt benutzt', | ||||
| 	'Spoiled' => 'Verdorben', | ||||
| 	'Barcode lookup is disabled' => 'Barcode-Suche ist deaktiviert', | ||||
| 	'will be added to the list of barcodes for the selected product on submit' => 'wird der Liste der Barcodes für das ausgewählte Produkt beim Speichern hinzugefügt', | ||||
| 	'New amount' => 'Neue Menge', | ||||
| 	'Note' => 'Notiz', | ||||
| 	'Tracked time' => 'Ausführungszeit', | ||||
| 	'Habit overview' => 'Gewohnheit Übersicht', | ||||
| 	'Tracked count' => 'Ausführungsanzahl', | ||||
| 	'Battery overview' => 'Batterie Übersicht', | ||||
| 	'Charge cycles count' => 'Ladezyklen', | ||||
| 	'Create shopping list item' => 'Einkaufszettel Eintrag erstellen', | ||||
| 	'Edit shopping list item' => 'Einkaufszettel Eintrag bearbeiten', | ||||
| 	'#1 units were automatically added and will apply in addition to the amount entered here' => '#1 Einheiten wurden automatisch hinzugefügt und gelten zusätzlich der hier eingegebenen Menge', | ||||
| 	'Save' => 'Speichern', | ||||
| 	'Add' => 'Hinzufügen', | ||||
| 	'Name' => 'Name', | ||||
| 	'Location' => 'Standort', | ||||
| 	'Min. stock amount' => 'Mindestbestand', | ||||
| 	'QU purchase' => 'ME Einkauf', | ||||
| 	'QU stock' => 'ME Bestand', | ||||
| 	'QU factor' => 'ME-Faktor', | ||||
| 	'Description' => 'Beschreibung', | ||||
| 	'Create product' => 'Produkt erstellen', | ||||
| 	'Barcode(s)' => 'Barcode(s)', | ||||
| 	'Minimum stock amount' => 'Mindestbestand', | ||||
| 	'Default best before days' => 'Standard Haltbarkeit in Tagen', | ||||
| 	'Quantity unit purchase' => 'Mengeneinheit Einkauf', | ||||
| 	'Quantity unit stock' => 'Mengeneinheit Bestand', | ||||
| 	'Factor purchase to stock quantity unit' => 'Faktor Mengeneinheit Einkauf zu Mengeneinheit Bestand', | ||||
| 	'Create location' => 'Standort erstellen', | ||||
| 	'Create quantity unit' => 'Mengeneinheit erstellen', | ||||
| 	'Period type' => 'Periodentyp', | ||||
| 	'Period days' => 'Tage/Periode', | ||||
| 	'Create habit' => 'Gewohnheit erstellen', | ||||
| 	'Used in' => 'Benutzt in', | ||||
| 	'Create battery' => 'Batterie erstellen', | ||||
| 	'Edit battery' => 'Batterie bearbeiten', | ||||
| 	'Edit habit' => 'Gewohnheit bearbeiten', | ||||
| 	'Edit quantity unit' => 'Mengeneinheit bearbeiten', | ||||
| 	'Edit product' => 'Produkt bearbeiten', | ||||
| 	'Edit location' => 'Standort bearbeiten', | ||||
| 	'Record data' => 'Daten erfassen', | ||||
| 	'Manage master data' => 'Stammdaten verwalten', | ||||
| 	'This will apply to added products' => 'Dies gilt für hinzugefügte Produkte', | ||||
| 	'never' => 'nie', | ||||
| 	'Add products that are below defined min. stock amount' => 'Produkte unter Mindestbestand hinzufügen', | ||||
| 	'For purchases this amount of days will be added to today for the best before date suggestion' => 'Bei Einkäufen wird hierauf basierend das MHD vorausgefüllt', | ||||
| 	'This means 1 #1 purchased will be converted into #2 #3 in stock' => 'Das bedeutet 1 #1 im Einkauf entsprechen #2 #3 im Bestand', | ||||
| 	'Login' => 'Anmelden', | ||||
| 	'Username' => 'Benutzername', | ||||
| 	'Password' => 'Passwort', | ||||
| 	'Invalid credentials, please try again' => 'Ungültige Zugangsdaten, bitte versuche es erneut', | ||||
| 	'Are you sure to delete battery "#1"?' => 'Battery "#1" wirklich löschen?', | ||||
| 	'Yes' => 'Ja', | ||||
| 	'No' => 'Nein', | ||||
| 	'Are you sure to delete habit "#1"?' => 'Gewohnheit "#1" wirklich löschen?', | ||||
| 	'"#1" could not be resolved to a product, how do you want to proceed?' => '"#1" konnte nicht zu einem Produkt aufgelöst werden, wie möchtest du weiter machen?', | ||||
| 	'Create or assign product' => 'Produkt erstellen oder verknüpfen', | ||||
| 	'Cancel' => 'Abbrechen', | ||||
| 	'Add as new product' => 'Als neues Produkt hinzufügen', | ||||
| 	'Add as barcode to existing product' => 'Barcode vorhandenem Produkt zuweisen', | ||||
| 	'Add as new product and prefill barcode' => 'Neues Produkt erstellen und Barcode vorbelegen', | ||||
| 	'Are you sure to delete quantity unit "#1"?' => 'Mengeneinheit "#1" wirklich löschen?', | ||||
| 	'Are you sure to delete product "#1"?' => 'Produkt "#1" wirklich löschen?', | ||||
| 	'Are you sure to delete location "#1"?' => 'Standort "#1" wirklich löschen?', | ||||
| 	'Manage API keys' => 'API-Keys verwalten', | ||||
|     'REST API & data model documentation' => 'REST-API & Datenmodell Dokumentation', | ||||
|     'API keys' => 'API-Keys', | ||||
|     'Create new API key' => 'Neuen API-Key erstellen', | ||||
|     'API key' => 'API-Key', | ||||
|     'Expires' => 'Läuft ab', | ||||
|     'Created' => 'Erstellt', | ||||
| 	'This product is not in stock' => 'Dieses Produkt ist nicht vorrätig', | ||||
| 	'This means #1 will be added to stock' => 'Das bedeutet #1 wird dem Bestand hinzugefügt', | ||||
| 	'This means #1 will be removed from stock' => 'Das bedeutet #1 wird aus dem Bestand entfernt', | ||||
| 	'This means it is estimated that a new execution of this habit is tracked #1 days after the last was tracked' => 'Das bedeutet, dass eine erneute Ausführung der Gewohnheit #1 Tage nach der letzten Ausführung geplant wird', | ||||
| 	'Removed #1 #2 of #3 from stock' => '#1 #2 #3 aus dem Bestand entfernt', | ||||
| 	'About grocy' => 'Über grocy', | ||||
| 	'Close' => 'Schließen', | ||||
| 	'#1 batteries are due to be charged within the next #2 days' => '#1 Batterien müssen in den nächsten #2 Tagen geladen werden', | ||||
| 	'#1 batteries are overdue to be charged' => '#1 Batterien sind überfällig', | ||||
| 	'#1 habits are due to be done within the next #2 days' => '#1 Gewohnheiten stehen in den nächsten #2 Tagen an', | ||||
| 	'#1 habits are overdue to be done' => '#1 Gewohnheiten sind überfällig', | ||||
| 	'Released on' => 'Veröffentlicht am', | ||||
| 	'Consume #3 #1 of #2' => 'Verbrauche #3 #1 #2', | ||||
| 	'Added #1 #2 of #3 to stock' => '#1 #2 #3 dem Bestand hinzugefügt', | ||||
| 	'Stock amount of #1 is now #2 #3' => 'Es sind nun #2 #3 #1 im Bestand', | ||||
| 	'Tracked execution of habit #1 on #2' => 'Ausführung von #1 am #2 erfasst', | ||||
| 	'Tracked charge cylce of battery #1 on #2' => 'Ladezyklus für Batterie #1 am #2 erfasst', | ||||
| 	'Consume all #1 which are currently in stock' => 'Verbrauche den kompletten Bestand von #1', | ||||
| 	'All' => 'Alle', | ||||
| 	'Track charge cycle of battery #1' => 'Erfasse einen Ladezyklus für Batterie #1', | ||||
| 	'Track execution of habit #1' => 'Erfasse eine Ausführung von #1', | ||||
| 	'Filter by location' => 'Nach Standort filtern', | ||||
| 	'Search' => 'Suche', | ||||
| 	'Not logged in' => 'Nicht angemeldet', | ||||
| 	'You have to select a product' => 'Ein Produkt muss ausgewählt werden', | ||||
| 	'You have to select a habit' => 'Eine Gewohnheit muss ausgewählt werden', | ||||
| 	'You have to select a battery' => 'Eine Batterie muss ausgewählt werden', | ||||
| 	'A name is required' => 'Ein Name ist erforderlich', | ||||
| 	'A location is required' => 'Ein Standort ist erforderlich', | ||||
| 	'The amount cannot be lower than #1' => 'Die Menge darf nicht kleiner als #1 sein', | ||||
| 	'This cannot be negative' => 'Dies darf nicht negativ sein', | ||||
| 	'A quantity unit is required' => 'Eine Mengeneinheit muss ausgewählt werden', | ||||
| 	'A period type is required' => 'Eine Periodentyp muss ausgewählt werden', | ||||
| 	'A best before date is required and must be later than today' => 'Ein Mindesthaltbarkeitsdatum ist erforderlich und muss später als heute sein', | ||||
| 	'Settings' => 'Einstellungen', | ||||
| 	'This can only be before now' => 'Dies kann nur vor jetzt sein', | ||||
| 	 | ||||
| 	//Constants | ||||
| 	'manually' => 'Manuell', | ||||
| 	'dynamic-regular' => 'Dynamisch regelmäßig', | ||||
| 	 | ||||
| 	//Technical component translations | ||||
| 	'timeago_locale' => 'de', | ||||
| 	'timeago_nan' => 'vor NaN Jahren', | ||||
| 	'moment_locale' => 'de', | ||||
| 	'datatables_localization' => '{"sEmptyTable":"Keine Daten in der Tabelle vorhanden","sInfo":"_START_ bis _END_ von _TOTAL_ Einträgen","sInfoEmpty":"Keine Daten vorhanden","sInfoFiltered":"(gefiltert von _MAX_ Einträgen)","sInfoPostFix":"","sInfoThousands":".","sLengthMenu":"_MENU_ Einträge anzeigen","sLoadingRecords":"Wird geladen ..","sProcessing":"Bitte warten ..","sSearch":"Suchen","sZeroRecords":"Keine Einträge vorhanden","oPaginate":{"sFirst":"Erste","sPrevious":"Zurück","sNext":"Nächste","sLast":"Letzte"},"oAria":{"sSortAscending":": aktivieren, um Spalte aufsteigend zu sortieren","sSortDescending":": aktivieren, um Spalte absteigend zu sortieren"},"select":{"rows":{"0":"Zum Auswählen auf eine Zeile klicken","1":"1 Zeile ausgewählt","_":"%d Zeilen ausgewählt"}},"buttons":{"print":"Drucken","colvis":"Spalten","copy":"Kopieren","copyTitle":"In Zwischenablage kopieren","copyKeys":"Taste <i>ctrl</i> oder <i>⌘</i> + <i>C</i> um Tabelle<br>in Zwischenspeicher zu kopieren.<br><br>Um abzubrechen die Nachricht anklicken oder Escape drücken.","copySuccess":{"1":"1 Spalte kopiert","_":"%d Spalten kopiert"}}}', | ||||
| 	 | ||||
| 	//Demo data | ||||
| 	'Cookies' => 'Cookies', | ||||
| 	'Chocolate' => 'Schokolade', | ||||
| 	'Pantry' => 'Vorratskammer', | ||||
| 	'Candy cupboard' => 'Süßigkeitenschrank', | ||||
| 	'Tinned food cupboard' => 'Konservenschrank', | ||||
| 	'Fridge' => 'Kühlschrank', | ||||
| 	'Piece' => 'Stück', | ||||
| 	'Pack' => 'Packung', | ||||
| 	'Glass' => 'Glas', | ||||
| 	'Tin' => 'Dose', | ||||
| 	'Can' => 'Becher', | ||||
| 	'Bunch' => 'Bund', | ||||
| 	'Gummy bears' => 'Gummibärchen', | ||||
| 	'Crisps' => 'Chips', | ||||
| 	'Eggs' => 'Eier', | ||||
| 	'Noodles' => 'Nudeln', | ||||
| 	'Pickles' => 'Essiggurken', | ||||
| 	'Gulash soup' => 'Gulaschsuppe', | ||||
| 	'Yogurt' => 'Joghurt', | ||||
| 	'Cheese' => 'Käse', | ||||
| 	'Cold cuts' => 'Aufschnitt', | ||||
| 	'Paprika' => 'Paprika', | ||||
| 	'Cucumber' => 'Gurke', | ||||
| 	'Radish' => 'Radieschen', | ||||
| 	'Tomato' => 'Tomaten', | ||||
| 	'Changed towels in the bathroom' => 'Handtücher im Bad gewechselt', | ||||
| 	'Cleaned the kitchen floor' => 'Küchenboden gewischt', | ||||
| 	'Warranty ends' => 'Garantie endet', | ||||
| 	'TV remote control' => 'TV Fernbedienung', | ||||
| 	'Alarm clock' => 'Wecker', | ||||
| 	'Heat remote control' => 'Fernbedienung Heizung' | ||||
| ); | ||||
							
								
								
									
										6
									
								
								localization/de/chore_types.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								localization/de/chore_types.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | ||||
| <?php | ||||
|  | ||||
| return array( | ||||
| 	'manually' => 'Manuell', | ||||
| 	'dynamic-regular' => 'Dynamisch regelmäßig' | ||||
| ); | ||||
							
								
								
									
										10
									
								
								localization/de/component_translations.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								localization/de/component_translations.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,10 @@ | ||||
| <?php | ||||
|  | ||||
| return array( | ||||
| 	'timeago_locale' => 'de', | ||||
| 	'timeago_nan' => 'vor NaN Jahren', | ||||
| 	'moment_locale' => 'de', | ||||
| 	'datatables_localization' => '{"sEmptyTable":"Keine Daten in der Tabelle vorhanden","sInfo":"_START_ bis _END_ von _TOTAL_ Einträgen","sInfoEmpty":"Keine Daten vorhanden","sInfoFiltered":"(gefiltert von _MAX_ Einträgen)","sInfoPostFix":"","sInfoThousands":".","sLengthMenu":"_MENU_ Einträge anzeigen","sLoadingRecords":"Wird geladen ..","sProcessing":"Bitte warten ..","sSearch":"Suchen","sZeroRecords":"Keine Einträge vorhanden","oPaginate":{"sFirst":"Erste","sPrevious":"Zurück","sNext":"Nächste","sLast":"Letzte"},"oAria":{"sSortAscending":": aktivieren, um Spalte aufsteigend zu sortieren","sSortDescending":": aktivieren, um Spalte absteigend zu sortieren"},"select":{"rows":{"0":"Zum Auswählen auf eine Zeile klicken","1":"1 Zeile ausgewählt","_":"%d Zeilen ausgewählt"}},"buttons":{"print":"Drucken","colvis":"Spalten","copy":"Kopieren","copyTitle":"In Zwischenablage kopieren","copyKeys":"Taste <i>ctrl</i> oder <i>⌘</i> + <i>C</i> um Tabelle<br>in Zwischenspeicher zu kopieren.<br><br>Um abzubrechen die Nachricht anklicken oder Escape drücken.","copySuccess":{"1":"1 Spalte kopiert","_":"%d Spalten kopiert"}}}', | ||||
| 	'summernote_locale' => 'de-DE', | ||||
| 	'fullcalendar_locale' => 'de' | ||||
| ); | ||||
							
								
								
									
										87
									
								
								localization/de/demo_data.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										87
									
								
								localization/de/demo_data.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,87 @@ | ||||
| <?php | ||||
|  | ||||
| return array( | ||||
| 	'Cookies' => 'Cookies', | ||||
| 	'Chocolate' => 'Schokolade', | ||||
| 	'Pantry' => 'Vorratskammer', | ||||
| 	'Candy cupboard' => 'Süßigkeitenschrank', | ||||
| 	'Tinned food cupboard' => 'Konservenschrank', | ||||
| 	'Fridge' => 'Kühlschrank', | ||||
| 	'Piece' => 'Stück', | ||||
| 	'Pieces' => 'Stücke', | ||||
| 	'Pack' => 'Packung', | ||||
| 	'Packs' => 'Packungen', | ||||
| 	'Glass' => 'Glas', | ||||
| 	'Glasses' => 'Gläser', | ||||
| 	'Tin' => 'Dose', | ||||
| 	'Tins' => 'Dosen', | ||||
| 	'Can' => 'Becher', | ||||
| 	'Cans' => 'Becher', | ||||
| 	'Bunch' => 'Bund', | ||||
| 	'Bunches' => 'Bunde', | ||||
| 	'Gummy bears' => 'Gummibärchen', | ||||
| 	'Crisps' => 'Chips', | ||||
| 	'Eggs' => 'Eier', | ||||
| 	'Noodles' => 'Nudeln', | ||||
| 	'Pickles' => 'Essiggurken', | ||||
| 	'Gulash soup' => 'Gulaschsuppe', | ||||
| 	'Yogurt' => 'Joghurt', | ||||
| 	'Cheese' => 'Käse', | ||||
| 	'Cold cuts' => 'Aufschnitt', | ||||
| 	'Paprika' => 'Paprika', | ||||
| 	'Cucumber' => 'Gurke', | ||||
| 	'Radish' => 'Radieschen', | ||||
| 	'Tomato' => 'Tomaten', | ||||
| 	'Changed towels in the bathroom' => 'Handtücher im Bad gewechselt', | ||||
| 	'Cleaned the kitchen floor' => 'Küchenboden gewischt', | ||||
| 	'Warranty ends' => 'Garantie endet', | ||||
| 	'TV remote control' => 'TV Fernbedienung', | ||||
| 	'Alarm clock' => 'Wecker', | ||||
| 	'Heat remote control' => 'Fernbedienung Heizung', | ||||
| 	'Lawn mowed in the garden' => 'Rasen im Garten gemäht', | ||||
| 	'Some good snacks' => 'Paar gute Snacks', | ||||
| 	'Pizza dough' => 'Pizzateig', | ||||
| 	'Sieved tomatoes' => 'Passierte Tomaten', | ||||
| 	'Salami' => 'Salami', | ||||
| 	'Toast' => 'Toast', | ||||
| 	'Minced meat' => 'Hackfleisch', | ||||
| 	'Pizza' => 'Pizza', | ||||
| 	'Spaghetti bolognese' => 'Spaghetti Bolognese', | ||||
| 	'Sandwiches' => 'Belegte Toasts', | ||||
| 	'English' => 'Englisch', | ||||
| 	'German' => 'Deutsch', | ||||
| 	'Italian' => 'Italienisch', | ||||
| 	'Demo in different language' => 'Demo in anderer Sprache', | ||||
| 	'This is the note content of the recipe ingredient' => 'Dies ist der Inhalt der Notiz der Zutat', | ||||
| 	'Demo User' => 'Demo Benutzer', | ||||
| 	'Gram' => 'Gramm', | ||||
| 	'Grams' => 'Gramm', | ||||
| 	'Flour' => 'Mehl', | ||||
| 	'Pancakes' => 'Pfannkuchen', | ||||
| 	'Sugar' => 'Zucker', | ||||
| 	'Home' => 'Zuhause', | ||||
| 	'Life' => 'Leben', | ||||
| 	'Projects' => 'Projekte', | ||||
| 	'Repair the garage door' => 'Garagentor reparieren', | ||||
| 	'Fork and improve grocy' => 'grocy forken und verbessern', | ||||
| 	'Find a solution for what to do when I forget the door keys' => 'Eine Lösung für "Haustürschlüssel vergessen" finden', | ||||
| 	'Sweets' => 'Süßigkeiten', | ||||
| 	'Bakery products' => 'Bäckerei Produkte', | ||||
| 	'Tinned food' => 'Konservern', | ||||
| 	'Butchery products' => 'Metzgerei', | ||||
| 	'Vegetables/Fruits' => 'Obst/Gemüse', | ||||
| 	'Refrigerated products' => 'Kühlregal', | ||||
| 	'Coffee machine' => 'Kaffeemaschine', | ||||
| 	'Dishwasher' => 'Spülmaschine', | ||||
| 	'Liter' => 'Liter', | ||||
| 	'Liters' => 'Liter', | ||||
| 	'Bottle' => 'Flasche', | ||||
| 	'Bottles' => 'Flaschen', | ||||
| 	'Milk' => 'Milch', | ||||
| 	'Chocolate sauce' => 'Schokoladensoße', | ||||
| 	'Milliliters' => 'Milliliter', | ||||
| 	'Milliliter' => 'Milliliter', | ||||
| 	'Bottom' => 'Boden', | ||||
| 	'Topping' => 'Belag', | ||||
| 	'French' => 'Französisch' | ||||
| ); | ||||
							
								
								
									
										8
									
								
								localization/de/stock_transaction_types.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								localization/de/stock_transaction_types.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| <?php | ||||
|  | ||||
| return array( | ||||
| 	'purchase' => 'Einkauf', | ||||
| 	'consume' => 'Verbrauch', | ||||
| 	'inventory-correction' => 'Inventur-Korrektur', | ||||
| 	'product-opened' => 'Produkt geöffnet' | ||||
| ); | ||||
							
								
								
									
										330
									
								
								localization/de/strings.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										330
									
								
								localization/de/strings.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,330 @@ | ||||
| <?php | ||||
|  | ||||
| return array( | ||||
| 	'Stock overview' => 'Bestand', | ||||
| 	'#1 products expiring within the next #2 days' => '#1 Produkte laufen innerhalb der nächsten #2 Tage ab', | ||||
| 	'#1 products are already expired' => '#1 Produkte sind bereits abgelaufen', | ||||
| 	'#1 products are below defined min. stock amount' => '#1 Produkte sind unter Mindestbestand', | ||||
| 	'Product' => 'Produkt', | ||||
| 	'Amount' => 'Menge', | ||||
| 	'Next best before date' => 'Nächstes MHD', | ||||
| 	'Logout' => 'Abmelden', | ||||
| 	'Chores overview' => 'Hausarbeiten', | ||||
| 	'Batteries overview' => 'Batterien', | ||||
| 	'Purchase' => 'Einkauf', | ||||
| 	'Consume' => 'Verbrauch', | ||||
| 	'Inventory' => 'Inventur', | ||||
| 	'Shopping list' => 'Einkaufszettel', | ||||
| 	'Chore tracking' => 'Hausarbeiten-Ausführung', | ||||
| 	'Battery tracking' => 'Batterie-Ladzyklus', | ||||
| 	'Products' => 'Produkte', | ||||
| 	'Locations' => 'Standorte', | ||||
| 	'Quantity units' => 'Mengeneinheiten', | ||||
| 	'Chores' => 'Hausarbeiten', | ||||
| 	'Batteries' => 'Batterien', | ||||
| 	'Chore' => 'Hausarbeit', | ||||
| 	'Next estimated tracking' => 'Nächste geplante Ausführung', | ||||
| 	'Last tracked' => 'Zuletzt ausgeführt', | ||||
| 	'Battery' => 'Batterie', | ||||
| 	'Last charged' => 'Zuletzt geladen', | ||||
| 	'Next planned charge cycle' => 'Nächster geplanter Ladezyklus', | ||||
| 	'Best before' => 'MHD', | ||||
| 	'OK' => 'OK', | ||||
| 	'Product overview' => 'Produktübersicht', | ||||
| 	'Stock quantity unit' => 'Mengeneinheit Bestand', | ||||
| 	'Stock amount' => 'Bestand', | ||||
| 	'Last purchased' => 'Zuletzt gekauft', | ||||
| 	'Last used' => 'Zuletzt benutzt', | ||||
| 	'Spoiled' => 'Verdorben', | ||||
| 	'Barcode lookup is disabled' => 'Barcode-Suche ist deaktiviert', | ||||
| 	'will be added to the list of barcodes for the selected product on submit' => 'wird der Liste der Barcodes für das ausgewählte Produkt beim Speichern hinzugefügt', | ||||
| 	'New amount' => 'Neue Menge', | ||||
| 	'Note' => 'Notiz', | ||||
| 	'Tracked time' => 'Ausführungszeit', | ||||
| 	'Chore overview' => 'Hausarbeit Übersicht', | ||||
| 	'Tracked count' => 'Ausführungsanzahl', | ||||
| 	'Battery overview' => 'Batterie Übersicht', | ||||
| 	'Charge cycles count' => 'Ladezyklen', | ||||
| 	'Create shopping list item' => 'Einkaufszettel Eintrag erstellen', | ||||
| 	'Edit shopping list item' => 'Einkaufszettel Eintrag bearbeiten', | ||||
| 	'#1 units were automatically added and will apply in addition to the amount entered here' => '#1 Einheiten wurden automatisch hinzugefügt und gelten zusätzlich der hier eingegebenen Menge', | ||||
| 	'Save' => 'Speichern', | ||||
| 	'Add' => 'Hinzufügen', | ||||
| 	'Name' => 'Name', | ||||
| 	'Location' => 'Standort', | ||||
| 	'Min. stock amount' => 'Mindestbestand', | ||||
| 	'QU purchase' => 'ME Einkauf', | ||||
| 	'QU stock' => 'ME Bestand', | ||||
| 	'QU factor' => 'ME-Faktor', | ||||
| 	'Description' => 'Beschreibung', | ||||
| 	'Create product' => 'Produkt erstellen', | ||||
| 	'Barcode(s)' => 'Barcode(s)', | ||||
| 	'Minimum stock amount' => 'Mindestbestand', | ||||
| 	'Default best before days' => 'Standard Haltbarkeit in Tagen', | ||||
| 	'Quantity unit purchase' => 'Mengeneinheit Einkauf', | ||||
| 	'Quantity unit stock' => 'Mengeneinheit Bestand', | ||||
| 	'Factor purchase to stock quantity unit' => 'Faktor Mengeneinheit Einkauf zu Mengeneinheit Bestand', | ||||
| 	'Create location' => 'Standort erstellen', | ||||
| 	'Create quantity unit' => 'Mengeneinheit erstellen', | ||||
| 	'Period type' => 'Periodentyp', | ||||
| 	'Period days' => 'Tage/Periode', | ||||
| 	'Create chore' => 'Hausarbeit erstellen', | ||||
| 	'Used in' => 'Benutzt in', | ||||
| 	'Create battery' => 'Batterie erstellen', | ||||
| 	'Edit battery' => 'Batterie bearbeiten', | ||||
| 	'Edit chore' => 'Hausarbeit bearbeiten', | ||||
| 	'Edit quantity unit' => 'Mengeneinheit bearbeiten', | ||||
| 	'Edit product' => 'Produkt bearbeiten', | ||||
| 	'Edit location' => 'Standort bearbeiten', | ||||
| 	'Record data' => 'Daten erfassen', | ||||
| 	'Manage master data' => 'Stammdaten verwalten', | ||||
| 	'This will apply to added products' => 'Dies gilt für hinzugefügte Produkte', | ||||
| 	'never' => 'nie', | ||||
| 	'Add products that are below defined min. stock amount' => 'Produkte unter Mindestbestand hinzufügen', | ||||
| 	'For purchases this amount of days will be added to today for the best before date suggestion' => 'Bei Einkäufen wird hierauf basierend das MHD vorausgefüllt', | ||||
| 	'This means 1 #1 purchased will be converted into #2 #3 in stock' => 'Das bedeutet 1 #1 im Einkauf entsprechen #2 #3 im Bestand', | ||||
| 	'Login' => 'Anmelden', | ||||
| 	'Username' => 'Benutzername', | ||||
| 	'Password' => 'Passwort', | ||||
| 	'Invalid credentials, please try again' => 'Ungültige Zugangsdaten, bitte versuche es erneut', | ||||
| 	'Are you sure to delete battery "#1"?' => 'Battery "#1" wirklich löschen?', | ||||
| 	'Yes' => 'Ja', | ||||
| 	'No' => 'Nein', | ||||
| 	'Are you sure to delete chore "#1"?' => 'Hausarbeit "#1" wirklich löschen?', | ||||
| 	'"#1" could not be resolved to a product, how do you want to proceed?' => '"#1" konnte nicht zu einem Produkt aufgelöst werden, wie möchtest du weiter machen?', | ||||
| 	'Create or assign product' => 'Produkt erstellen oder verknüpfen', | ||||
| 	'Cancel' => 'Abbrechen', | ||||
| 	'Add as new product' => 'Als neues Produkt hinzufügen', | ||||
| 	'Add as barcode to existing product' => 'Barcode vorhandenem Produkt zuweisen', | ||||
| 	'Add as new product and prefill barcode' => 'Neues Produkt erstellen und Barcode vorbelegen', | ||||
| 	'Are you sure to delete quantity unit "#1"?' => 'Mengeneinheit "#1" wirklich löschen?', | ||||
| 	'Are you sure to delete product "#1"?' => 'Produkt "#1" wirklich löschen?', | ||||
| 	'Are you sure to delete location "#1"?' => 'Standort "#1" wirklich löschen?', | ||||
| 	'Manage API keys' => 'API-Keys verwalten', | ||||
| 	'REST API & data model documentation' => 'REST-API & Datenmodell Dokumentation', | ||||
| 	'API keys' => 'API-Keys', | ||||
| 	'Create new API key' => 'Neuen API-Key erstellen', | ||||
| 	'API key' => 'API-Key', | ||||
| 	'Expires' => 'Läuft ab', | ||||
| 	'Created' => 'Erstellt', | ||||
| 	'This product is not in stock' => 'Dieses Produkt ist nicht vorrätig', | ||||
| 	'This means #1 will be added to stock' => 'Das bedeutet #1 wird dem Bestand hinzugefügt', | ||||
| 	'This means #1 will be removed from stock' => 'Das bedeutet #1 wird aus dem Bestand entfernt', | ||||
| 	'This means it is estimated that a new execution of this chore is tracked #1 days after the last was tracked' => 'Das bedeutet, dass eine erneute Ausführung der Hausarbeit #1 Tage nach der letzten Ausführung geplant wird', | ||||
| 	'Removed #1 #2 of #3 from stock' => '#1 #2 #3 aus dem Bestand entfernt', | ||||
| 	'About grocy' => 'Über grocy', | ||||
| 	'Close' => 'Schließen', | ||||
| 	'#1 batteries are due to be charged within the next #2 days' => '#1 Batterien müssen in den nächsten #2 Tagen geladen werden', | ||||
| 	'#1 batteries are overdue to be charged' => '#1 Batterien sind überfällig', | ||||
| 	'#1 chores are due to be done within the next #2 days' => '#1 Hausarbeiten stehen in den nächsten #2 Tagen an', | ||||
| 	'#1 chores are overdue to be done' => '#1 Hausarbeiten sind überfällig', | ||||
| 	'Released on' => 'Veröffentlicht am', | ||||
| 	'Consume #3 #1 of #2' => 'Verbrauche #3 #1 #2', | ||||
| 	'Added #1 #2 of #3 to stock' => '#1 #2 #3 dem Bestand hinzugefügt', | ||||
| 	'Stock amount of #1 is now #2 #3' => 'Es sind nun #2 #3 #1 im Bestand', | ||||
| 	'Tracked execution of chore #1 on #2' => 'Ausführung von #1 am #2 erfasst', | ||||
| 	'Tracked charge cycle of battery #1 on #2' => 'Ladezyklus für Batterie #1 am #2 erfasst', | ||||
| 	'Consume all #1 which are currently in stock' => 'Verbrauche den kompletten Bestand von #1', | ||||
| 	'All' => 'Alle', | ||||
| 	'Track charge cycle of battery #1' => 'Erfasse einen Ladezyklus für Batterie #1', | ||||
| 	'Track execution of chore #1' => 'Erfasse eine Ausführung von #1', | ||||
| 	'Filter by location' => 'Nach Standort filtern', | ||||
| 	'Search' => 'Suche', | ||||
| 	'Not logged in' => 'Nicht angemeldet', | ||||
| 	'You have to select a product' => 'Ein Produkt muss ausgewählt werden', | ||||
| 	'You have to select a chore' => 'Eine Hausarbeit muss ausgewählt werden', | ||||
| 	'You have to select a battery' => 'Eine Batterie muss ausgewählt werden', | ||||
| 	'A name is required' => 'Ein Name ist erforderlich', | ||||
| 	'A location is required' => 'Ein Standort ist erforderlich', | ||||
| 	'The amount cannot be lower than #1' => 'Die Menge darf nicht kleiner als #1 sein', | ||||
| 	'This cannot be negative' => 'Dies darf nicht negativ sein', | ||||
| 	'A quantity unit is required' => 'Eine Mengeneinheit muss ausgewählt werden', | ||||
| 	'A period type is required' => 'Eine Periodentyp muss ausgewählt werden', | ||||
| 	'A best before date is required and must be later than today' => 'Ein Mindesthaltbarkeitsdatum ist erforderlich und muss später als heute sein', | ||||
| 	'Settings' => 'Einstellungen', | ||||
| 	'This can only be before now' => 'Dies kann nur vor jetzt sein', | ||||
| 	'Calendar' => 'Kalender', | ||||
| 	'Recipes' => 'Rezepte', | ||||
| 	'Edit recipe' => 'Rezept bearbeiten', | ||||
| 	'New recipe' => 'Neues Rezept', | ||||
| 	'Ingredients list' => 'Zutatenliste', | ||||
| 	'Add recipe ingredient' => 'Rezeptzutat hinzufügen', | ||||
| 	'Edit recipe ingredient' => 'Rezeptzutat bearbeiten', | ||||
| 	'Are you sure to delete recipe "#1"?' => 'Rezept "#1" wirklich löschen?', | ||||
| 	'Are you sure to delete recipe ingredient "#1"?' => 'Rezeptzutat "#1" wirklich löschen?', | ||||
| 	'Are you sure to empty the shopping list?' => 'Sicher, dass den Einkaufszettel geleert werden soll?', | ||||
| 	'Clear list' => 'Liste leeren', | ||||
| 	'Requirements fulfilled' => 'Bedarf im Bestand', | ||||
| 	'Put missing products on shopping list' => 'Fehlende Produkte auf den Einkaufszettel setzen', | ||||
| 	'Not enough in stock, #1 ingredients missing' => 'Nicht ausreichend im Bestand, #1 Zutaten fehlen', | ||||
| 	'Enough in stock' => 'Bestand reicht aus', | ||||
| 	'Not enough in stock, #1 ingredients missing but already on the shopping list' => 'Bestand nicht ausreichend, #1 Zutaten fehlen, stehen aber bereits auf dem Einkaufszettel', | ||||
| 	'Expand to fullscreen' => 'Auf ganzen Bildschirm vergrößern', | ||||
| 	'Ingredients' => 'Zutaten', | ||||
| 	'Preparation' => 'Zubereitung', | ||||
| 	'Recipe' => 'Rezept', | ||||
| 	'Not enough in stock, #1 missing, #2 already on shopping list' => 'Nicht ausreichend im Bestand, #1 fehlen, #2 stehen bereits auf dem Einkaufszettel', | ||||
| 	'Show notes' => 'Notizen anzeigen', | ||||
| 	'Put missing amount on shopping list' => 'Fehlende Menge auf den Einkaufszettel setzen', | ||||
| 	'Are you sure to put all missing ingredients for recipe "#1" on the shopping list?' => 'Sicher alle fehlenden Zutaten für Rezept "#1" auf die Einkaufsliste zu setzen?', | ||||
| 	'Added for recipe #1' => 'Hinzugefügt für Rezept #1', | ||||
| 	'Manage users' => 'Benutzer verwalten', | ||||
| 	'User' => 'Benutzer', | ||||
| 	'Users' => 'Benutzer', | ||||
| 	'Are you sure to delete user "#1"?' => 'Benutzer "#1" wirklich löschen?', | ||||
| 	'Create user' => 'Benutzer erstellen', | ||||
| 	'Edit user' => 'Benutzer bearbeiten', | ||||
| 	'First name' => 'Vorname', | ||||
| 	'Last name' => 'Nachname', | ||||
| 	'A username is required' => 'Ein Benutzername ist erforderlich', | ||||
| 	'Confirm password' => 'Passwort bestätigen', | ||||
| 	'Passwords do not match' => 'Passwörter stimmen nicht überein', | ||||
| 	'Change password' => 'Passwort ändern', | ||||
| 	'Done by' => 'Ausgeführt von', | ||||
| 	'Last done by' => 'Zuletzt ausgeführt von', | ||||
| 	'Unknown' => 'Unbekannt', | ||||
| 	'Filter by chore' => 'Nach Hausarbeit filtern', | ||||
| 	'Chores journal' => 'Hausarbeitenjournal', | ||||
| 	'0 means suggestions for the next charge cycle are disabled' => '0 bedeutet dass Vorschläge für den nächsten Ladezyklus deaktiviert sind', | ||||
| 	'Charge cycle interval (days)' => 'Ladezyklusintervall (Tage)', | ||||
| 	'Last price' => 'Letzter Preis', | ||||
| 	'Price history' => 'Preisentwicklung', | ||||
| 	'No price history available' => 'Keine Preisdaten verfügbar', | ||||
| 	'Price' => 'Preis', | ||||
| 	'in #1 per purchase quantity unit' => 'in #1 pro Einkaufsmengeneinheit', | ||||
| 	'The price cannot be lower than #1' => 'Der Preis darf nicht niedriger als #1 sein', | ||||
| 	'#1 product expires within the next #2 days' => '#1 Produkt läuft innerhalb der nächsten #2 Tage ab', | ||||
| 	'#1 product is already expired' => '#1 Produkt ist bereits abgelaufen', | ||||
| 	'#1 product is below defined min. stock amount' => '#1 Produkt ist unter Mindestbestand', | ||||
| 	'Unit' => 'Einheit', | ||||
| 	'Units' => 'Einheiten', | ||||
| 	'#1 chore is due to be done within the next #2 days' => '#1 Hausarbeit steht in den nächsten #2 Tagen an', | ||||
| 	'#1 chore is overdue to be done' => '#1 Hausarbeit ist überfällig', | ||||
| 	'#1 battery is due to be charged within the next #2 days' => '#1 Batterie muss in den nächsten #2 Tagen geladen werden', | ||||
| 	'#1 battery is overdue to be charged' => '#1 Batterie ist überfällig', | ||||
| 	'#1 unit was automatically added and will apply in addition to the amount entered here' => '#1 Einheit wurde automatisch hinzugefügt und gilt zusätzlich der hier eingegebenen Menge', | ||||
| 	'in singular form' => 'in der Einzahl', | ||||
| 	'in plural form' => 'in der Mehrzahl', | ||||
| 	'Never expires' => 'Läuft nie ab', | ||||
| 	'This cannot be lower than #1' => 'Dies darf nicht kleiner als #1 sein', | ||||
| 	'-1 means that this product never expires' => '-1 bedeuet, dass dieses Produkt niemals abläuft', | ||||
| 	'Quantity unit' => 'Mengeneinheit', | ||||
| 	'Only check if a single unit is in stock (a different quantity can then be used above)' => 'Nur prüfen, ob eine einzelne Einheit vorrätig ist (eine abweichende Mengeneinheit kann dann oben verwendet werden)', | ||||
| 	'Are you sure to consume all ingredients needed by recipe "#1" (ingredients marked with "check only if a single unit is in stock" will be ignored)?' => 'Sicher, dass alle Zutaten die vom Rezept "#1" benötigt werden aus dem Bestand entfernt werden sollen (Zutaten markiert mit "nur prüfen, ob eine einzelne Einheit vorrätig ist" werden ignoriert)?', | ||||
| 	'Removed all ingredients of recipe "#1" from stock' => 'Alle Zutaten, die vom Rezept "#1" benötigt werden, wurdem aus dem Bestand entfernt', | ||||
| 	'Consume all ingredients needed by this recipe' => 'Alle Zutaten, die von diesem Rezept benötigt werden, aus dem Bestand enternen', | ||||
| 	'Click to show technical details' => 'Klick um technische Details anzuzeigen', | ||||
| 	'Error while saving, probably this item already exists' => 'Fehler beim Speichern, möglicherweise existiert das Element bereits', | ||||
| 	'Error details' => 'Fehlerdetails', | ||||
| 	'Tasks' => 'Aufgaben', | ||||
| 	'Show done tasks' => 'Erledigte Aufgaben anzeigen', | ||||
| 	'Task' => 'Aufgabe', | ||||
| 	'Due' => 'Fällig', | ||||
| 	'Assigned to' => 'Zugewiesen an', | ||||
| 	'Mark task "#1" as completed' => 'Aufgabe "#1" als erledigt markieren', | ||||
| 	'Uncategorized' => 'Nicht kategorisiert', | ||||
| 	'Task categories' => 'Aufgabenkategorien', | ||||
| 	'Create task' => 'Aufgabe erstellen', | ||||
| 	'A due date is required' => 'Ein Fälligkeitsdatum ist erforderlich', | ||||
| 	'Category' => 'Kategorie', | ||||
| 	'Edit task' => 'Aufgabe bearbeiten', | ||||
| 	'Are you sure to delete task "#1"?' => 'Aufgabe "#1" wirklich löschen?', | ||||
| 	'#1 task is due to be done within the next #2 days' => '#1 Aufgabe steht in den nächsten #2 Tagen an', | ||||
| 	'#1 tasks are due to be done within the next #2 days' => '#1 Aufgaben stehen in den nächsten #2 Tagen an', | ||||
| 	'#1 task is overdue to be done' => '#1 Aufgabe ist überfällig', | ||||
| 	'#1 tasks are overdue to be done' => '#1 Aufgaben sind überfällig', | ||||
| 	'Edit task category' => 'Aufgabenkategorie bearbeiten', | ||||
| 	'Create task category' => 'Aufgabenkategorie erstellen', | ||||
| 	'Product groups' => 'Produktgruppen', | ||||
| 	'Ungrouped' => 'Ungruppiert', | ||||
| 	'Create product group' => 'Produktgruppe erstellen', | ||||
| 	'Edit product group' => 'Produktgruppe bearbeiten', | ||||
| 	'Product group' => 'Produktgruppe', | ||||
| 	'Are you sure to delete product group "#1"?' => 'Produktgruppe "#1" wirklich löschen?', | ||||
| 	'Stay logged in permanently' => 'Dauerhaft angemeldet bleiben', | ||||
| 	'When not set, you will get logged out at latest after 30 days' => 'Wenn nicht gesetzt, wirst du spätestens nach 30 Tagen automatisch abgemeldet', | ||||
| 	'Filter by status' => 'Nach Status filtern', | ||||
| 	'Below min. stock amount' => 'Unter Mindestbestand', | ||||
| 	'Expiring soon' => 'Bald ablaufend', | ||||
| 	'Already expired' => 'Bereits abgelaufen', | ||||
| 	'Due soon' => 'Bald fällig', | ||||
| 	'Overdue' => 'Überfällig', | ||||
| 	'View settings' => 'Ansichtseinstellungen', | ||||
| 	'Auto reload on external changes' => 'Autom. akt. bei externen Änderungen', | ||||
| 	'Enable night mode' => 'Nachtmodus aktivieren', | ||||
| 	'Auto enable in time range' => 'Autom. akt. in diesem Zeitraum', | ||||
| 	'From' => 'Von', | ||||
| 	'in format' => 'im Format', | ||||
| 	'To' => 'Bis', | ||||
| 	'Time range goes over midnight' => 'Zeitraum geht über Mitternacht', | ||||
| 	'Product picture' => 'Produktbild', | ||||
| 	'No file selected' => 'Keine Datei ausgewählt', | ||||
| 	'If you don\'t select a file, the current picture will not be altered' => 'Wenn du keine Datei auswählst, wird das aktuelle Bild nicht verändert', | ||||
| 	'Current picture' => 'Aktuelles Bild', | ||||
| 	'Delete' => 'Löschen', | ||||
| 	'The current picture will be deleted when you save the product' => 'Das aktuelle Bild wird beim Speichern des Produkts gelöscht', | ||||
| 	'Select file' => 'Datei auswählen', | ||||
| 	'Image of product #1' => 'Bild des Produkts #1', | ||||
| 	'This product cannot be deleted because it is in stock, please remove the stock amount first.' => 'Dieses Produkt kann nicht gelöscht werden, da es auf Lager ist, bitte  zuerst den Bestand entfernen.', | ||||
| 	'Delete not possible' => 'Löschen nicht möglich', | ||||
| 	'Equipment' => 'Ausstattung', | ||||
| 	'Instruction manual' => 'Bedienungsanleitung', | ||||
| 	'The selected equipment has no instruction manual' => 'Das ausgewählte Gerät hat keine Bedienungsanleitung', | ||||
| 	'Notes' => 'Notizen', | ||||
| 	'Edit equipment' => 'Geräte bearbeiten', | ||||
| 	'Create equipment' => 'Geräte erstellen', | ||||
| 	'If you don\'t select a file, the current instruction manual will not be altered' => 'Wenn du keine Datei auswählst, wird die aktuelle Bedienungsanleitung nicht verändert', | ||||
| 	'Current instruction manual' => 'Aktuelle Bedienungsanleitung', | ||||
| 	'No instruction manual available' => 'Keine Bedienungsanleitung vorhanden', | ||||
| 	'The current instruction manual will be deleted when you save the equipment' => 'Die aktuelle Bedienungsanleitung wird beim Speichern des Geräts gelöscht', | ||||
| 	'No picture available' => 'Kein Bild vorhanden', | ||||
| 	'Filter by product group' => 'Nach Produktgruppe filtern', | ||||
| 	'Presets for new products' => 'Vorgaben für neue Produkte', | ||||
| 	'Included recipes' => 'Enthaltene Rezepte', | ||||
| 	'A recipe is required' => 'Ein Rezept ist erforderlich', | ||||
| 	'Add included recipe' => 'Enthaltenes Rezept hinzufügen', | ||||
| 	'Edit included recipe' => 'Enthaltenes Rezept bearbeiten', | ||||
| 	'Group' => 'Gruppe', | ||||
| 	'This will be used as a headline to group ingredients together' => 'Dies wird als Überschrift verwendet, um  Zutaten zusammenzufassen', | ||||
| 	'Journal' => 'Journal', | ||||
| 	'Stock journal' => 'Bestandsjournal', | ||||
| 	'Filter by product' => 'Nach Produkt filtern', | ||||
| 	'Booking time' => 'Buchungszeit', | ||||
| 	'Booking type' => 'Buchungsart', | ||||
| 	'Undo booking' => 'Buchung rückgängig machen', | ||||
| 	'Undone on' => 'Rückgängig gemacht am', | ||||
| 	'Batteries journal' => 'Batteriejournal', | ||||
| 	'Filter by battery' => 'Nach Batterie filtern', | ||||
| 	'Undo charge cycle' => 'Ladezyklus rückgängig machen', | ||||
| 	'Undo chore execution' => 'Ausführung rückgängig machen', | ||||
| 	'Chore execution successfully undone' => 'Ausführung erfolgreich rückgängig gemacht', | ||||
| 	'Undo' => 'Rückgängig machen', | ||||
| 	'Booking successfully undone' => 'Buchung erfolgreich rückgängig gemacht', | ||||
| 	'Charge cycle successfully undone' => 'Ladezyklus erfolgreich rückgängig gemacht', | ||||
| 	'This cannot be negative and must be an integral number' => 'Diese darf nicht negativ und muss eine ganze Zahl sein', | ||||
| 	'Disable stock fulfillment checking for this ingredient' => 'Bestandsprüfung für diese Zutat deaktivieren', | ||||
| 	'Add all list items to stock' => 'Alle Einträge zum Bestand hinzufügen', | ||||
| 	'Add #3 #1 of #2 to stock' => 'Füge #3 #1 of #2 dem Bestand hinzu', | ||||
| 	'Adding shopping list item #1 of #2' => 'Bearbeite Einkausfzettel-Eintrag #1 von #2', | ||||
| 	'Use a specific stock item' => 'Einen bestimmten Bestandseintrag verwenden', | ||||
| 	'The first item in this list would be picked by the default rule which is "First expiring first, then first in first out"' => 'Der erste Eintrag in dieser Liste würde von der Standardregel "Zuerst ablaufende zuerst, dann First In - First Out" ausgewählt werden', | ||||
| 	'Mark #3 #1 of #2 as open' => '#3 #1 von #2 als geöffnet markieren', | ||||
| 	'When a product was marked as opened, the best before date will be replaced by today + this amount of days (a value of 0 disables this)' => 'Wenn ein Produkt als geöffnet markiert wurde, wird das Mindesthaltbarkeitsdatum durch heute + diese Anzahl von Tagen ersetzt (ein Wert von 0 deaktiviert dies)', | ||||
| 	'Default best before days after opened' => 'Standard Haltbarkeit in Tagen nach dem Öffnen', | ||||
| 	'Marked #1 #2 of #3 as opened' => '#1 #2 von #3 als geöffnet markiert', | ||||
| 	'Mark as opened' => 'Als geöffnet markieren', | ||||
| 	'Expires on #1; Bought on #2' => 'Läuft ab am #1; Gekauft am #2', | ||||
| 	'Not opened' => 'Nicht geöffnet', | ||||
| 	'Opened' => 'Geöffnet', | ||||
| 	'Mark #3 #1 of #2 as open' => '#3 #1 von #2 als geöffnet markieren', | ||||
| 	'#1 opened' => '#1 geöffnet', | ||||
| 	'Product expires' => 'Produkt läuft ab', | ||||
| 	'Task due' => 'Aufgabe fällig', | ||||
| 	'Chore due' => 'Hausarbeit fällig', | ||||
| 	'Battery charge cycle due' => 'Battery-Ladezyklus fällig', | ||||
| 	'Show clock in header' => 'Uhr in der Kopfzeile anzeigen', | ||||
| 	'Stock settings' => 'Bestandseinstellungen', | ||||
| 	'Shopping list to stock workflow' => 'Einkaufsliste -> Bestand Workflow', | ||||
| 	'Automatically do the booking using the last price and the amount of the shopping list item, if the product has "Default best before days" set' => 'Buchung automatisch ausführen, wenn das Produkt "Standard Haltbarkeit in Tagen" hinterlegt hat (als Preis wird der letzte Preis verwendet)', | ||||
| 	'Skip' => 'Überspringen' | ||||
| ); | ||||
							
								
								
									
										6
									
								
								localization/en/chore_types.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								localization/en/chore_types.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | ||||
| <?php | ||||
|  | ||||
| return array( | ||||
| 	'manually' => 'Manually', | ||||
| 	'dynamic-regular' => 'Dynamic regular' | ||||
| ); | ||||
| @@ -1,13 +1,10 @@ | ||||
| <?php | ||||
| 
 | ||||
| return array( | ||||
| 	//Constants
 | ||||
| 	'manually' => 'Manually', | ||||
| 	'dynamic-regular' => 'Dynamic regular', | ||||
| 	 | ||||
| 	//Technical component translations
 | ||||
| 	'timeago_locale' => 'en', | ||||
| 	'timeago_nan' => 'NaN years ago', | ||||
| 	'moment_locale' => '', | ||||
| 	'datatables_localization' => '{"sEmptyTable":"No data available in table","sInfo":"Showing _START_ to _END_ of _TOTAL_ entries","sInfoEmpty":"Showing 0 to 0 of 0 entries","sInfoFiltered":"(filtered from _MAX_ total entries)","sInfoPostFix":"","sInfoThousands":",","sLengthMenu":"Show _MENU_ entries","sLoadingRecords":"Loading...","sProcessing":"Processing...","sSearch":"Search:","sZeroRecords":"No matching records found","oPaginate":{"sFirst":"First","sLast":"Last","sNext":"Next","sPrevious":"Previous"},"oAria":{"sSortAscending":": activate to sort column ascending","sSortDescending":": activate to sort column descending"}}' | ||||
| 	'moment_locale' => 'x', | ||||
| 	'datatables_localization' => '{"sEmptyTable":"No data available in table","sInfo":"Showing _START_ to _END_ of _TOTAL_ entries","sInfoEmpty":"Showing 0 to 0 of 0 entries","sInfoFiltered":"(filtered from _MAX_ total entries)","sInfoPostFix":"","sInfoThousands":",","sLengthMenu":"Show _MENU_ entries","sLoadingRecords":"Loading...","sProcessing":"Processing...","sSearch":"Search:","sZeroRecords":"No matching records found","oPaginate":{"sFirst":"First","sLast":"Last","sNext":"Next","sPrevious":"Previous"},"oAria":{"sSortAscending":": activate to sort column ascending","sSortDescending":": activate to sort column descending"}}', | ||||
| 	'summernote_locale' => 'x', | ||||
| 	'fullcalendar_locale' => 'x' | ||||
| ); | ||||
							
								
								
									
										87
									
								
								localization/en/demo_data.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										87
									
								
								localization/en/demo_data.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,87 @@ | ||||
| <?php | ||||
|  | ||||
| return array( | ||||
| 	'Cookies' => 'Cookies', | ||||
| 	'Chocolate' => 'Chocolate', | ||||
| 	'Pantry' => 'Pantry', | ||||
| 	'Candy cupboard' => 'Candy cupboard', | ||||
| 	'Tinned food cupboard' => 'Tinned food cupboard', | ||||
| 	'Fridge' => 'Fridge', | ||||
| 	'Piece' => 'Piece', | ||||
| 	'Pieces' => 'Pieces', | ||||
| 	'Pack' => 'Pack', | ||||
| 	'Packs' => 'Packs', | ||||
| 	'Glass' => 'Glass', | ||||
| 	'Glasses' => 'Glasses', | ||||
| 	'Tin' => 'Tin', | ||||
| 	'Tins' => 'Tins', | ||||
| 	'Can' => 'Can', | ||||
| 	'Cans' => 'Cans', | ||||
| 	'Bunch' => 'Bunch', | ||||
| 	'Bunches' => 'Bunches', | ||||
| 	'Gummy bears' => 'Gummy bears', | ||||
| 	'Crisps' => 'Crisps', | ||||
| 	'Eggs' => 'Eggs', | ||||
| 	'Noodles' => 'Noodles', | ||||
| 	'Pickles' => 'Pickles', | ||||
| 	'Gulash soup' => 'Gulash soup', | ||||
| 	'Yogurt' => 'Yogurt', | ||||
| 	'Cheese' => 'Cheese', | ||||
| 	'Cold cuts' => 'Cold cuts', | ||||
| 	'Paprika' => 'Paprika', | ||||
| 	'Cucumber' => 'Cucumber', | ||||
| 	'Radish' => 'Radish', | ||||
| 	'Tomato' => 'Tomato', | ||||
| 	'Changed towels in the bathroom' => 'Changed towels in the bathroom', | ||||
| 	'Cleaned the kitchen floor' => 'Cleaned the kitchen floor', | ||||
| 	'Warranty ends' => 'Warranty ends', | ||||
| 	'TV remote control' => 'TV remote control', | ||||
| 	'Alarm clock' => 'Alarm clock', | ||||
| 	'Heat remote control' => 'Heat remote control', | ||||
| 	'Lawn mowed in the garden' => 'Lawn mowed in the garden', | ||||
| 	'Some good snacks' => 'Some good snacks', | ||||
| 	'Pizza dough' => 'Pizza dough', | ||||
| 	'Sieved tomatoes' => 'Sieved tomatoes', | ||||
| 	'Salami' => 'Salami', | ||||
| 	'Toast' => 'Toast', | ||||
| 	'Minced meat' => 'Minced meat', | ||||
| 	'Pizza' => 'Pizza', | ||||
| 	'Spaghetti bolognese' => 'Spaghetti bolognese', | ||||
| 	'Sandwiches' => 'Sandwiches', | ||||
| 	'English' => 'English', | ||||
| 	'German' => 'German', | ||||
| 	'Italian' => 'Italian', | ||||
| 	'Demo in different language' => 'Demo in different language', | ||||
| 	'This is the note content of the recipe ingredient' => 'This is the note content of the recipe ingredient', | ||||
| 	'Demo User' => 'Demo User', | ||||
| 	'Gram' => 'Gram', | ||||
| 	'Grams' => 'Grams', | ||||
| 	'Flour' => 'Flour', | ||||
| 	'Pancakes' => 'Pancakes', | ||||
| 	'Sugar' => 'Sugar', | ||||
| 	'Home' => 'Home', | ||||
| 	'Life' => 'Life', | ||||
| 	'Projects' => 'Projects', | ||||
| 	'Repair the garage door' => 'Repair the garage door', | ||||
| 	'Fork and improve grocy' => 'Fork and improve grocy', | ||||
| 	'Find a solution for what to do when I forget the door keys' => 'Find a solution for what to do when I forget the door keys', | ||||
| 	'Sweets' => 'Sweets', | ||||
| 	'Bakery products' => 'Bakery products', | ||||
| 	'Tinned food' => 'Tinned food', | ||||
| 	'Butchery products' => 'Butchery products', | ||||
| 	'Vegetables/Fruits' => 'Vegetables/Fruits', | ||||
| 	'Refrigerated products' => 'Refrigerated products', | ||||
| 	'Coffee machine' => 'Coffee machine', | ||||
| 	'Dishwasher' => 'Dishwasher', | ||||
| 	'Liter' => 'Liter', | ||||
| 	'Liters' => 'Liters', | ||||
| 	'Bottle' => 'Bottle', | ||||
| 	'Bottles' => 'Bottles', | ||||
| 	'Milk' => 'Milk', | ||||
| 	'Chocolate sauce' => 'Chocolate sauce', | ||||
| 	'Milliliters' => 'Milliliters', | ||||
| 	'Milliliter' => 'Milliliter', | ||||
| 	'Bottom' => 'Bottom', | ||||
| 	'Topping' => 'Topping', | ||||
| 	'French' => 'French' | ||||
| ); | ||||
							
								
								
									
										8
									
								
								localization/en/stock_transaction_types.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								localization/en/stock_transaction_types.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| <?php | ||||
|  | ||||
| return array( | ||||
| 	'purchase' => 'Purchase', | ||||
| 	'consume' => 'Consume', | ||||
| 	'inventory-correction' => 'Inventory correction', | ||||
| 	'product-opened' => 'Product opened' | ||||
| ); | ||||
							
								
								
									
										330
									
								
								localization/en/strings.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										330
									
								
								localization/en/strings.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,330 @@ | ||||
| <?php | ||||
|  | ||||
| return array( | ||||
| 	'Stock overview' => 'Stock overview', | ||||
| 	'#1 products expiring within the next #2 days' => '#1 products expiring within the next #2 days', | ||||
| 	'#1 products are already expired' => '#1 products are already expired', | ||||
| 	'#1 products are below defined min. stock amount' => '#1 products are below defined min. stock amount', | ||||
| 	'Product' => 'Product', | ||||
| 	'Amount' => 'Amount', | ||||
| 	'Next best before date' => 'Next best before date', | ||||
| 	'Logout' => 'Logout', | ||||
| 	'Chores overview' => 'Chores overview', | ||||
| 	'Batteries overview' => 'Batteries overview', | ||||
| 	'Purchase' => 'Purchase', | ||||
| 	'Consume' => 'Consume', | ||||
| 	'Inventory' => 'Inventory', | ||||
| 	'Shopping list' => 'Shopping list', | ||||
| 	'Chore tracking' => 'Chore tracking', | ||||
| 	'Battery tracking' => 'Battery tracking', | ||||
| 	'Products' => 'Products', | ||||
| 	'Locations' => 'Locations', | ||||
| 	'Quantity units' => 'Quantity units', | ||||
| 	'Chores' => 'Chores', | ||||
| 	'Batteries' => 'Batteries', | ||||
| 	'Chore' => 'Chore', | ||||
| 	'Next estimated tracking' => 'Next estimated tracking', | ||||
| 	'Last tracked' => 'Last tracked', | ||||
| 	'Battery' => 'Battery', | ||||
| 	'Last charged' => 'Last charged', | ||||
| 	'Next planned charge cycle' => 'Next planned charge cycle', | ||||
| 	'Best before' => 'Best before', | ||||
| 	'OK' => 'OK', | ||||
| 	'Product overview' => 'Product overview', | ||||
| 	'Stock quantity unit' => 'Stock quantity unit', | ||||
| 	'Stock amount' => 'Stock amount', | ||||
| 	'Last purchased' => 'Last purchased', | ||||
| 	'Last used' => 'Last used', | ||||
| 	'Spoiled' => 'Spoiled', | ||||
| 	'Barcode lookup is disabled' => 'Barcode lookup is disabled', | ||||
| 	'will be added to the list of barcodes for the selected product on submit' => 'will be added to the list of barcodes for the selected product on submit', | ||||
| 	'New amount' => 'New amount', | ||||
| 	'Note' => 'Note', | ||||
| 	'Tracked time' => 'Tracked time', | ||||
| 	'Chore overview' => 'Chore overview', | ||||
| 	'Tracked count' => 'Tracked count', | ||||
| 	'Battery overview' => 'Battery overview', | ||||
| 	'Charge cycles count' => 'Charge cycles count', | ||||
| 	'Create shopping list item' => 'Create shopping list item', | ||||
| 	'Edit shopping list item' => 'Edit shopping list item', | ||||
| 	'#1 units were automatically added and will apply in addition to the amount entered here' => '#1 units were automatically added and will apply in addition to the amount entered here', | ||||
| 	'Save' => 'Save', | ||||
| 	'Add' => 'Add', | ||||
| 	'Name' => 'Name', | ||||
| 	'Location' => 'Location', | ||||
| 	'Min. stock amount' => 'Min. stock amount', | ||||
| 	'QU purchase' => 'QU purchase', | ||||
| 	'QU stock' => 'QU stock', | ||||
| 	'QU factor' => 'QU factor', | ||||
| 	'Description' => 'Description', | ||||
| 	'Create product' => 'Create product', | ||||
| 	'Barcode(s)' => 'Barcode(s)', | ||||
| 	'Minimum stock amount' => 'Minimum stock amount', | ||||
| 	'Default best before days' => 'Default best before days', | ||||
| 	'Quantity unit purchase' => 'Quantity unit purchase', | ||||
| 	'Quantity unit stock' => 'Quantity unit stock', | ||||
| 	'Factor purchase to stock quantity unit' => 'Factor purchase to stock quantity unit', | ||||
| 	'Create location' => 'Create location', | ||||
| 	'Create quantity unit' => 'Create quantity unit', | ||||
| 	'Period type' => 'Period type', | ||||
| 	'Period days' => 'Period days', | ||||
| 	'Create chore' => 'Create chore', | ||||
| 	'Used in' => 'Used in', | ||||
| 	'Create battery' => 'Create battery', | ||||
| 	'Edit battery' => 'Edit battery', | ||||
| 	'Edit chore' => 'Edit chore', | ||||
| 	'Edit quantity unit' => 'Edit quantity unit', | ||||
| 	'Edit product' => 'Edit product', | ||||
| 	'Edit location' => 'Edit location', | ||||
| 	'Record data' => 'Record data', | ||||
| 	'Manage master data' => 'Manage master data', | ||||
| 	'This will apply to added products' => 'This will apply to added products', | ||||
| 	'never' => 'never', | ||||
| 	'Add products that are below defined min. stock amount' => 'Add products that are below defined min. stock amount', | ||||
| 	'For purchases this amount of days will be added to today for the best before date suggestion' => 'For purchases this amount of days will be added to today for the best before date suggestion', | ||||
| 	'This means 1 #1 purchased will be converted into #2 #3 in stock' => 'This means 1 #1 purchased will be converted into #2 #3 in stock', | ||||
| 	'Login' => 'Login', | ||||
| 	'Username' => 'Username', | ||||
| 	'Password' => 'Password', | ||||
| 	'Invalid credentials, please try again' => 'Invalid credentials, please try again', | ||||
| 	'Are you sure to delete battery "#1"?' => 'Are you sure to delete battery "#1"?', | ||||
| 	'Yes' => 'Yes', | ||||
| 	'No' => 'No', | ||||
| 	'Are you sure to delete chore "#1"?' => 'Are you sure to delete chore "#1"?', | ||||
| 	'"#1" could not be resolved to a product, how do you want to proceed?' => '"#1" could not be resolved to a product, how do you want to proceed?', | ||||
| 	'Create or assign product' => 'Create or assign product', | ||||
| 	'Cancel' => 'Cancel', | ||||
| 	'Add as new product' => 'Add as new product', | ||||
| 	'Add as barcode to existing product' => 'Add as barcode to existing product', | ||||
| 	'Add as new product and prefill barcode' => 'Add as new product and prefill barcode', | ||||
| 	'Are you sure to delete quantity unit "#1"?' => 'Are you sure to delete quantity unit "#1"?', | ||||
| 	'Are you sure to delete product "#1"?' => 'Are you sure to delete product "#1"?', | ||||
| 	'Are you sure to delete location "#1"?' => 'Are you sure to delete location "#1"?', | ||||
| 	'Manage API keys' => 'Manage API keys', | ||||
| 	'REST API & data model documentation' => 'REST API & data model documentation', | ||||
| 	'API keys' => 'API keys', | ||||
| 	'Create new API key' => 'Create new API key', | ||||
| 	'API key' => 'API key', | ||||
| 	'Expires' => 'Expires', | ||||
| 	'Created' => 'Created', | ||||
| 	'This product is not in stock' => 'This product is not in stock', | ||||
| 	'This means #1 will be added to stock' => 'This means #1 will be added to stock', | ||||
| 	'This means #1 will be removed from stock' => 'This means #1 will be removed from stock', | ||||
| 	'This means it is estimated that a new execution of this chore is tracked #1 days after the last was tracked' => 'This means it is estimated that a new execution of this chore is tracked #1 days after the last was tracked', | ||||
| 	'Removed #1 #2 of #3 from stock' => 'Removed #1 #2 of #3 from stock', | ||||
| 	'About grocy' => 'About grocy', | ||||
| 	'Close' => 'Close', | ||||
| 	'#1 batteries are due to be charged within the next #2 days' => '#1 batteries are due to be charged within the next #2 days', | ||||
| 	'#1 batteries are overdue to be charged' => '#1 batteries are overdue to be charged', | ||||
| 	'#1 chores are due to be done within the next #2 days' => '#1 chores are due to be done within the next #2 days', | ||||
| 	'#1 chores are overdue to be done' => '#1 chores are overdue to be done', | ||||
| 	'Released on' => 'Released on', | ||||
| 	'Consume #3 #1 of #2' => 'Consume #3 #1 of #2', | ||||
| 	'Added #1 #2 of #3 to stock' => 'Added #1 #2 of #3 to stock', | ||||
| 	'Stock amount of #1 is now #2 #3' => 'Stock amount of #1 is now #2 #3', | ||||
| 	'Tracked execution of chore #1 on #2' => 'Tracked execution of chore #1 on #2', | ||||
| 	'Tracked charge cycle of battery #1 on #2' => 'Tracked charge cycle of battery #1 on #2', | ||||
| 	'Consume all #1 which are currently in stock' => 'Consume all #1 which are currently in stock', | ||||
| 	'All' => 'All', | ||||
| 	'Track charge cycle of battery #1' => 'Track charge cycle of battery #1', | ||||
| 	'Track execution of chore #1' => 'Track execution of chore #1', | ||||
| 	'Filter by location' => 'Filter by location', | ||||
| 	'Search' => 'Search', | ||||
| 	'Not logged in' => 'Not logged in', | ||||
| 	'You have to select a product' => 'You have to select a product', | ||||
| 	'You have to select a chore' => 'You have to select a chore', | ||||
| 	'You have to select a battery' => 'You have to select a battery', | ||||
| 	'A name is required' => 'A name is required', | ||||
| 	'A location is required' => 'A location is required', | ||||
| 	'The amount cannot be lower than #1' => 'The amount cannot be lower than #1', | ||||
| 	'This cannot be negative' => 'This cannot be negative', | ||||
| 	'A quantity unit is required' => 'A quantity unit is required', | ||||
| 	'A period type is required' => 'A period type is required', | ||||
| 	'A best before date is required and must be later than today' => 'A best before date is required and must be later than today', | ||||
| 	'Settings' => 'Settings', | ||||
| 	'This can only be before now' => 'This can only be before now', | ||||
| 	'Calendar' => 'Calendar', | ||||
| 	'Recipes' => 'Recipes', | ||||
| 	'Edit recipe' => 'Edit recipe', | ||||
| 	'New recipe' => 'New recipe', | ||||
| 	'Ingredients list' => 'Ingredients list', | ||||
| 	'Add recipe ingredient' => 'Add recipe ingredient', | ||||
| 	'Edit recipe ingredient' => 'Edit recipe ingredient', | ||||
| 	'Are you sure to delete recipe "#1"?' => 'Are you sure to delete recipe "#1"?', | ||||
| 	'Are you sure to delete recipe ingredient "#1"?' => 'Are you sure to delete recipe ingredient "#1"?', | ||||
| 	'Are you sure to empty the shopping list?' => 'Are you sure to empty the shopping list?', | ||||
| 	'Clear list' => 'Clear list', | ||||
| 	'Requirements fulfilled' => 'Requirements fulfilled', | ||||
| 	'Put missing products on shopping list' => 'Put missing products on shopping list', | ||||
| 	'Not enough in stock, #1 ingredients missing' => 'Not enough in stock, #1 ingredients missing', | ||||
| 	'Enough in stock' => 'Enough in stock', | ||||
| 	'Not enough in stock, #1 ingredients missing but already on the shopping list' => 'Not enough in stock, #1 ingredients missing but already on the shopping list', | ||||
| 	'Expand to fullscreen' => 'Expand to fullscreen', | ||||
| 	'Ingredients' => 'Ingredients', | ||||
| 	'Preparation' => 'Preparation', | ||||
| 	'Recipe' => 'Recipe', | ||||
| 	'Not enough in stock, #1 missing, #2 already on shopping list' => 'Not enough in stock, #1 missing, #2 already on shopping list', | ||||
| 	'Show notes' => 'Show notes', | ||||
| 	'Put missing amount on shopping list' => 'Put missing amount on shopping list', | ||||
| 	'Are you sure to put all missing ingredients for recipe "#1" on the shopping list?' => 'Are you sure to put all missing ingredients for recipe "#1" on the shopping list?', | ||||
| 	'Added for recipe #1' => 'Added for recipe #1', | ||||
| 	'Manage users' => 'Manage users', | ||||
| 	'User' => 'User', | ||||
| 	'Users' => 'Users', | ||||
| 	'Are you sure to delete user "#1"?' => 'Are you sure to delete user "#1"?', | ||||
| 	'Create user' => 'Create user', | ||||
| 	'Edit user' => 'Edit user', | ||||
| 	'First name' => 'First name', | ||||
| 	'Last name' => 'Last name', | ||||
| 	'A username is required' => 'A username is required', | ||||
| 	'Confirm password' => 'Confirm password', | ||||
| 	'Passwords do not match' => 'Passwords do not match', | ||||
| 	'Change password' => 'Change password', | ||||
| 	'Done by' => 'Done by', | ||||
| 	'Last done by' => 'Last done by', | ||||
| 	'Unknown' => 'Unknown', | ||||
| 	'Filter by chore' => 'Filter by chore', | ||||
| 	'Chores journal' => 'Chores journal', | ||||
| 	'0 means suggestions for the next charge cycle are disabled' => '0 means suggestions for the next charge cycle are disabled', | ||||
| 	'Charge cycle interval (days)' => 'Charge cycle interval (days)', | ||||
| 	'Last price' => 'Last price', | ||||
| 	'Price history' => 'Price history', | ||||
| 	'No price history available' => 'No price history available', | ||||
| 	'Price' => 'Price', | ||||
| 	'in #1 per purchase quantity unit' => 'in #1 per purchase quantity unit', | ||||
| 	'The price cannot be lower than #1' => 'The price cannot be lower than #1', | ||||
| 	'#1 product expires within the next #2 days' => '#1 product expires within the next #2 days', | ||||
| 	'#1 product is already expired' => '#1 product is already expired', | ||||
| 	'#1 product is below defined min. stock amount' => '#1 product is below defined min. stock amount', | ||||
| 	'Unit' => 'Unit', | ||||
| 	'Units' => 'Units', | ||||
| 	'#1 chore is due to be done within the next #2 days' => '#1 chore is due to be done within the next #2 days', | ||||
| 	'#1 chore is overdue to be done' => '#1 chore is overdue to be done', | ||||
| 	'#1 battery is due to be charged within the next #2 days' => '#1 battery is due to be charged within the next #2 days', | ||||
| 	'#1 battery is overdue to be charged' => '#1 battery is overdue to be charged', | ||||
| 	'#1 unit was automatically added and will apply in addition to the amount entered here' => '#1 unit was automatically added and will apply in addition to the amount entered here', | ||||
| 	'in singular form' => 'in singular form', | ||||
| 	'in plural form' => 'in plural form', | ||||
| 	'Never expires' => 'Never expires', | ||||
| 	'This cannot be lower than #1' => 'This cannot be lower than #1', | ||||
| 	'-1 means that this product never expires' => '-1 means that this product never expires', | ||||
| 	'Quantity unit' => 'Quantity unit', | ||||
| 	'Only check if a single unit is in stock (a different quantity can then be used above)' => 'Only check if a single unit is in stock (a different quantity can then be used above)', | ||||
| 	'Are you sure to consume all ingredients needed by recipe "#1" (ingredients marked with "check only if a single unit is in stock" will be ignored)?' => 'Are you sure to consume all ingredients needed by recipe "#1" (ingredients marked with "check only if a single unit is in stock" will be ignored)?', | ||||
| 	'Removed all ingredients of recipe "#1" from stock' => 'Removed all ingredients of recipe "#1" from stock', | ||||
| 	'Consume all ingredients needed by this recipe' => 'Consume all ingredients needed by this recipe', | ||||
| 	'Click to show technical details' => 'Click to show technical details', | ||||
| 	'Error while saving, probably this item already exists' => 'Error while saving, probably this item already exists', | ||||
| 	'Error details' => 'Error details', | ||||
| 	'Tasks' => 'Tasks', | ||||
| 	'Show done tasks' => 'Show done tasks', | ||||
| 	'Task' => 'Task', | ||||
| 	'Due' => 'Due', | ||||
| 	'Assigned to' => 'Assigned to', | ||||
| 	'Mark task "#1" as completed' => 'Mark task "#1" as completed', | ||||
| 	'Uncategorized' => 'Uncategorized', | ||||
| 	'Task categories' => 'Task categories', | ||||
| 	'Create task' => 'Create task', | ||||
| 	'A due date is required' => 'A due date is required', | ||||
| 	'Category' => 'Category', | ||||
| 	'Edit task' => 'Edit task', | ||||
| 	'Are you sure to delete task "#1"?' => 'Are you sure to delete task "#1"?', | ||||
| 	'#1 task is due to be done within the next #2 days' => '#1 task is due to be done within the next #2 days', | ||||
| 	'#1 tasks are due to be done within the next #2 days' => '#1 tasks are due to be done within the next #2 days', | ||||
| 	'#1 task is overdue to be done' => '#1 task is overdue to be done', | ||||
| 	'#1 tasks are overdue to be done' => '#1 tasks are overdue to be done', | ||||
| 	'Edit task category' => 'Edit task category', | ||||
| 	'Create task category' => 'Create task category', | ||||
| 	'Product groups' => 'Product groups', | ||||
| 	'Ungrouped' => 'Ungrouped', | ||||
| 	'Create product group' => 'Create product group', | ||||
| 	'Edit product group' => 'Edit product group', | ||||
| 	'Product group' => 'Product group', | ||||
| 	'Are you sure to delete product group "#1"?' => 'Are you sure to delete product group "#1"?', | ||||
| 	'Stay logged in permanently' => 'Stay logged in permanently', | ||||
| 	'When not set, you will get logged out at latest after 30 days' => 'When not set, you will get logged out at latest after 30 days', | ||||
| 	'Filter by status' => 'Filter by status', | ||||
| 	'Below min. stock amount' => 'Below min. stock amount', | ||||
| 	'Expiring soon' => 'Expiring soon', | ||||
| 	'Already expired' => 'Already expired', | ||||
| 	'Due soon' => 'Due soon', | ||||
| 	'Overdue' => 'Overdue', | ||||
| 	'View settings' => 'View settings', | ||||
| 	'Auto reload on external changes' => 'Auto reload on external changes', | ||||
| 	'Enable night mode' => 'Enable night mode', | ||||
| 	'Auto enable in time range' => 'Auto enable in time range', | ||||
| 	'From' => 'From', | ||||
| 	'in format' => 'in format', | ||||
| 	'To' => 'To', | ||||
| 	'Time range goes over midnight' => 'Time range goes over midnight', | ||||
| 	'Product picture' => 'Product picture', | ||||
| 	'No file selected' => 'No file selected', | ||||
| 	'If you don\'t select a file, the current picture will not be altered' => 'If you don\'t select a file, the current picture will not be altered', | ||||
| 	'Current picture' => 'Current picture', | ||||
| 	'Delete' => 'Delete', | ||||
| 	'The current picture will be deleted when you save the product' => 'The current picture will be deleted when you save the product', | ||||
| 	'Select file' => 'Select file', | ||||
| 	'Image of product #1' => 'Image of product #1', | ||||
| 	'This product cannot be deleted because it is in stock, please remove the stock amount first.' => 'This product cannot be deleted because it is in stock, please remove the stock amount first.', | ||||
| 	'Delete not possible' => 'Delete not possible', | ||||
| 	'Equipment' => 'Equipment', | ||||
| 	'Instruction manual' => 'Instruction manual', | ||||
| 	'The selected equipment has no instruction manual' => 'The selected equipment has no instruction manual', | ||||
| 	'Notes' => 'Notes', | ||||
| 	'Edit equipment' => 'Edit equipment', | ||||
| 	'Create equipment' => 'Create equipment', | ||||
| 	'If you don\'t select a file, the current instruction manual will not be altered' => 'If you don\'t select a file, the current instruction manual will not be altered', | ||||
| 	'Current instruction manual' => 'Current instruction manual', | ||||
| 	'No instruction manual available' => 'No instruction manual available', | ||||
| 	'The current instruction manual will be deleted when you save the equipment' => 'The current instruction manual will be deleted when you save the equipment', | ||||
| 	'No picture available' => 'No picture available', | ||||
| 	'Filter by product group' => 'Filter by product group', | ||||
| 	'Presets for new products' => 'Presets for new products', | ||||
| 	'Included recipes' => 'Included recipes', | ||||
| 	'A recipe is required' => 'A recipe is required', | ||||
| 	'Add included recipe' => 'Add included recipe', | ||||
| 	'Edit included recipe' => 'Edit included recipe', | ||||
| 	'Group' => 'Group', | ||||
| 	'This will be used as a headline to group ingredients together' => 'This will be used as a headline to group ingredients together', | ||||
| 	'Journal' => 'Journal', | ||||
| 	'Stock journal' => 'Stock journal', | ||||
| 	'Filter by product' => 'Filter by product', | ||||
| 	'Booking time' => 'Booking time', | ||||
| 	'Booking type' => 'Booking type', | ||||
| 	'Undo booking' => 'Undo booking', | ||||
| 	'Undone on' => 'Undone on', | ||||
| 	'Batteries journal' => 'Batteries journal', | ||||
| 	'Filter by battery' => 'Filter by battery', | ||||
| 	'Undo charge cycle' => 'Undo charge cycle', | ||||
| 	'Undo chore execution' => 'Undo chore execution', | ||||
| 	'Chore execution successfully undone' => 'Chore execution successfully undone', | ||||
| 	'Undo' => 'Undo', | ||||
| 	'Booking successfully undone' => 'Booking successfully undone', | ||||
| 	'Charge cycle successfully undone' => 'Charge cycle successfully undone', | ||||
| 	'This cannot be negative and must be an integral number' => 'This cannot be negative and must be an integral number', | ||||
| 	'Disable stock fulfillment checking for this ingredient' => 'Disable stock fulfillment checking for this ingredient', | ||||
| 	'Add all list items to stock' => 'Add all list items to stock', | ||||
| 	'Add #3 #1 of #2 to stock' => 'Add #3 #1 of #2 to stock', | ||||
| 	'Adding shopping list item #1 of #2' => 'Adding shopping list item #1 of #2', | ||||
| 	'Use a specific stock item' => 'Use a specific stock item', | ||||
| 	'The first item in this list would be picked by the default rule which is "First expiring first, then first in first out"' => 'The first item in this list would be picked by the default rule which is "First expiring first, then first in first out"', | ||||
| 	'Mark #3 #1 of #2 as open' => 'Mark #3 #1 of #2 as open', | ||||
| 	'When a product was marked as opened, the best before date will be replaced by today + this amount of days (a value of 0 disables this)' => 'When a product was marked as opened, the best before date will be replaced by today + this amount of days (a value of 0 disables this)', | ||||
| 	'Default best before days after opened' => 'Default best before days after opened', | ||||
| 	'Marked #1 #2 of #3 as opened' => 'Marked #1 #2 of #3 as opened', | ||||
| 	'Mark as opened' => 'Mark as opened', | ||||
| 	'Expires on #1; Bought on #2' => 'Expires on #1; Bought on #2', | ||||
| 	'Not opened' => 'Not opened', | ||||
| 	'Opened' => 'Opened', | ||||
| 	'Mark #3 #1 of #2 as open' => 'Mark #3 #1 of #2 as open', | ||||
| 	'#1 opened' => '#1 opened', | ||||
| 	'Product expires' => 'Product expires', | ||||
| 	'Task due' => 'Task due', | ||||
| 	'Chore due' => 'Chore due', | ||||
| 	'Battery charge cycle due' => 'Battery charge cycle due', | ||||
| 	'Show clock in header' => 'Show clock in header', | ||||
| 	'Stock settings' => 'Stock settings', | ||||
| 	'Shopping list to stock workflow' => 'Shopping list to stock workflow', | ||||
| 	'Automatically do the booking using the last price and the amount of the shopping list item, if the product has "Default best before days" set' => 'Automatically do the booking using the last price and the amount of the shopping list item, if the product has "Default best before days" set', | ||||
| 	'Skip' => 'Skip' | ||||
| ); | ||||
							
								
								
									
										6
									
								
								localization/fr/chore_types.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								localization/fr/chore_types.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | ||||
| <?php | ||||
|  | ||||
| return array( | ||||
| 	'manually' => 'Manuelle', | ||||
| 	'dynamic-regular' => 'Régulière-dynamique' | ||||
| ); | ||||
							
								
								
									
										10
									
								
								localization/fr/component_translations.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								localization/fr/component_translations.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,10 @@ | ||||
| <?php | ||||
|  | ||||
| return array( | ||||
| 	'timeago_locale' => 'fr', | ||||
| 	'timeago_nan' => 'Il y a NaN années', | ||||
| 	'moment_locale' => 'fr', | ||||
| 	'datatables_localization' => '{"sProcessing":"Traitement en cours...","sSearch":"Rechercher :","sLengthMenu":"Afficher _MENU_ éléments","sInfo":"Affichage de l\'élément _START_ à _END_ sur _TOTAL_ éléments","sInfoEmpty":"Affichage de l\'élément 0 à 0 sur 0 élément","sInfoFiltered":"(filtré de _MAX_ éléments au total)","sInfoPostFix":"","sLoadingRecords":"Chargement en cours...","sZeroRecords":"Aucun élément à afficher","sEmptyTable":"Aucune donnée disponible dans le tableau","oPaginate":{"sFirst":"Premier","sPrevious":"Précédent","sNext":"Suivant","sLast":"Dernier"},"oAria":{"sSortAscending":": activer pour trier la colonne par ordre croissant","sSortDescending":": activer pour trier la colonne par ordre décroissant"}}', | ||||
| 	'summernote_locale' => 'fr-FR', | ||||
| 	'fullcalendar_locale' => 'fr' | ||||
| ); | ||||
							
								
								
									
										87
									
								
								localization/fr/demo_data.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										87
									
								
								localization/fr/demo_data.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,87 @@ | ||||
| <?php | ||||
|  | ||||
| return array( | ||||
| 	'Cookies' => 'Cookies', | ||||
| 	'Chocolate' => 'Chocolat', | ||||
| 	'Pantry' => 'Garde-manger', | ||||
| 	'Candy cupboard' => 'Boîte de bonbons', | ||||
| 	'Tinned food cupboard' => 'Conserve de nourriture', | ||||
| 	'Fridge' => 'Réfrigérateur', | ||||
| 	'Piece' => 'Pièce', | ||||
| 	'Pieces' => 'Pièces', | ||||
| 	'Pack' => 'Pack', | ||||
| 	'Packs' => 'Packs', | ||||
| 	'Glass' => 'Verre', | ||||
| 	'Glasses' => 'Verres', | ||||
| 	'Tin' => 'Pot', | ||||
| 	'Tins' => 'Pots', | ||||
| 	'Can' => 'Canette', | ||||
| 	'Cans' => 'Canettes', | ||||
| 	'Bunch' => 'Brunch', | ||||
| 	'Bunches' => 'Brunchs', | ||||
| 	'Gummy bears' => 'Oursons en gélatine', | ||||
| 	'Crisps' => 'Chips', | ||||
| 	'Eggs' => 'Oeufs', | ||||
| 	'Noodles' => 'Nouilles', | ||||
| 	'Pickles' => 'Cornichons', | ||||
| 	'Gulash soup' => 'Soupe de goulache', | ||||
| 	'Yogurt' => 'Yaourt', | ||||
| 	'Cheese' => 'Fromage', | ||||
| 	'Cold cuts' => 'Charcuterie', | ||||
| 	'Paprika' => 'Paprika', | ||||
| 	'Cucumber' => 'Concombre', | ||||
| 	'Radish' => 'Radis', | ||||
| 	'Tomato' => 'Tomate', | ||||
| 	'Changed towels in the bathroom' => 'Changement des serviettes dans la salle de bain', | ||||
| 	'Cleaned the kitchen floor' => 'Nettoyage du sol de la cuisine', | ||||
| 	'Warranty ends' => 'Fin de garantie', | ||||
| 	'TV remote control' => 'Télécommande de la TV', | ||||
| 	'Alarm clock' => 'Réveil', | ||||
| 	'Heat remote control' => 'Télécommande du chauffage', | ||||
| 	'Lawn mowed in the garden' => 'Jardin tondu', | ||||
| 	'Some good snacks' => 'Quelques bons snacks', | ||||
| 	'Pizza dough' => 'Pâte à pizza', | ||||
| 	'Sieved tomatoes' => 'Sauce tomate', | ||||
| 	'Salami' => 'Salami', | ||||
| 	'Toast' => 'Pain grillé', | ||||
| 	'Minced meat' => 'Viande hachée', | ||||
| 	'Pizza' => 'PIzza', | ||||
| 	'Spaghetti bolognese' => 'Spaghetti bolognaise', | ||||
| 	'Sandwiches' => 'Sandwiches', | ||||
| 	'English' => 'Anglais', | ||||
| 	'German' => 'Allemand', | ||||
| 	'Italian' => 'Italien', | ||||
| 	'Demo in different language' => 'Démo dans une langue différente', | ||||
| 	'This is the note content of the recipe ingredient' => 'Ceci est le contenu de la note concernant l\'ingrédient de la recette', | ||||
| 	'Demo User' => 'Utilisateur de démonstration', | ||||
| 	'Gram' => 'Gramme', | ||||
| 	'Grams' => 'Grammes', | ||||
| 	'Flour' => 'Farine', | ||||
| 	'Pancakes' => 'Crêpes', | ||||
| 	'Sugar' => 'Sucre', | ||||
| 	'Home' => 'Domicile', | ||||
| 	'Life' => 'Vie', | ||||
| 	'Projects' => 'Projets', | ||||
| 	'Repair the garage door' => 'Réparer la porte du garage', | ||||
| 	'Fork and improve grocy' => 'Forker et améliorer grocy', | ||||
| 	'Find a solution for what to do when I forget the door keys' => 'Trouver une solution pour savoir quoi faire quand j\'oublie les clefs de la porte', | ||||
| 	'Sweets' => 'Bonbons', | ||||
| 	'Bakery products' => 'Produits de la boulangerie', | ||||
| 	'Tinned food' => 'Conserve', | ||||
| 	'Butchery products' => 'Produits de la boucherie', | ||||
| 	'Vegetables/Fruits' => 'Légumes/Fruits', | ||||
| 	'Refrigerated products' => 'Produits réfrigérés', | ||||
| 	'Coffee machine' => 'Machie à café', | ||||
| 	'Dishwasher' => 'Lave-vaisselle', | ||||
| 	'Liter' => 'Litière', | ||||
| 	'Liters' => 'Litières', | ||||
| 	'Bottle' => 'Bouteille', | ||||
| 	'Bottles' => 'Bouteilles', | ||||
| 	'Milk' => 'Lait', | ||||
| 	'Chocolate sauce' => 'Coulis de chocolat', | ||||
| 	'Milliliters' => 'Millilitres', | ||||
| 	'Milliliter' => 'Millilitre', | ||||
| 	'Bottom' => 'Dessous', | ||||
| 	'Topping' => 'Garniture', | ||||
| 	'French' => 'Français' | ||||
| ); | ||||
							
								
								
									
										8
									
								
								localization/fr/stock_transaction_types.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								localization/fr/stock_transaction_types.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| <?php | ||||
|  | ||||
| return array( | ||||
| 	'purchase' => 'Achat', | ||||
| 	'consume' => 'Consommation', | ||||
| 	'inventory-correction' => 'Correction d\'inventaire', | ||||
| 	'product-opened' => 'Produit ouvert' | ||||
| ); | ||||
							
								
								
									
										330
									
								
								localization/fr/strings.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										330
									
								
								localization/fr/strings.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,330 @@ | ||||
| <?php | ||||
|  | ||||
| return array( | ||||
| 	'Stock overview' => 'Aperçu du stock', | ||||
| 	'#1 products expiring within the next #2 days' => '#1 produits se périment dans les #2 jours', | ||||
| 	'#1 products are already expired' => '#1 produits sont périmés', | ||||
| 	'#1 products are below defined min. stock amount' => '#1 produits sont sous le seuil de stock minimum', | ||||
| 	'Product' => 'Produit', | ||||
| 	'Amount' => 'Quantité', | ||||
| 	'Next best before date' => 'Prochaine date de péremption', | ||||
| 	'Logout' => 'Se déconnecter', | ||||
| 	'Chores overview' => 'Aperçu des corvées', | ||||
| 	'Batteries overview' => 'Batteries', | ||||
| 	'Purchase' => 'Achat', | ||||
| 	'Consume' => 'Consommation', | ||||
| 	'Inventory' => 'Inventaire', | ||||
| 	'Shopping list' => 'Liste de courses', | ||||
| 	'Chore tracking' => 'Suivi des corvées', | ||||
| 	'Battery tracking' => 'Suivi des batteries', | ||||
| 	'Products' => 'Produits', | ||||
| 	'Locations' => 'Emplacements', | ||||
| 	'Quantity units' => 'Formats', | ||||
| 	'Chores' => 'Corvées', | ||||
| 	'Batteries' => 'Batteries', | ||||
| 	'Chore' => 'Corvée', | ||||
| 	'Next estimated tracking' => 'Prochaine occurrence estimée', | ||||
| 	'Last tracked' => 'Dernière réalisation', | ||||
| 	'Battery' => 'Batterie', | ||||
| 	'Last charged' => 'Dernier chargement', | ||||
| 	'Next planned charge cycle' => 'Prochaine charge planifiée', | ||||
| 	'Best before' => 'Date d\'expiration', | ||||
| 	'OK' => 'Ok', | ||||
| 	'Product overview' => 'Aperçu du produit', | ||||
| 	'Stock quantity unit' => 'Format de stockage', | ||||
| 	'Stock amount' => 'Quantité en stock', | ||||
| 	'Last purchased' => 'Dernier achat', | ||||
| 	'Last used' => 'Dernière utilisation', | ||||
| 	'Spoiled' => 'Périmé', | ||||
| 	'Barcode lookup is disabled' => 'La recherche par code barres est désactivée', | ||||
| 	'will be added to the list of barcodes for the selected product on submit' => 'sera ajouté à la liste des codes barres du produit sélectionné à l\'envoi', | ||||
| 	'New amount' => 'Nouvelle quantité', | ||||
| 	'Note' => 'Note', | ||||
| 	'Tracked time' => 'Réalisé le', | ||||
| 	'Chore overview' => 'Aperçu de la corvée', | ||||
| 	'Tracked count' => 'Nombre de réalisations', | ||||
| 	'Battery overview' => 'Aperçu des batteries', | ||||
| 	'Charge cycles count' => 'Nombre de charges', | ||||
| 	'Create shopping list item' => 'Créer une liste de courses', | ||||
| 	'Edit shopping list item' => 'Modifier une liste de courses', | ||||
| 	'#1 units were automatically added and will apply in addition to the amount entered here' => '#1 unités seront automatiquement ajoutées en plus de la quantité renseignée ici', | ||||
| 	'Save' => 'Sauvegarder', | ||||
| 	'Add' => 'Ajouter', | ||||
| 	'Name' => 'Nom', | ||||
| 	'Location' => 'Emplacement', | ||||
| 	'Min. stock amount' => 'Quantité minimum en stock', | ||||
| 	'QU purchase' => 'Format achat', | ||||
| 	'QU stock' => 'Format stock', | ||||
| 	'QU factor' => 'Facteur format', | ||||
| 	'Description' => 'Description', | ||||
| 	'Create product' => 'Créer un produit', | ||||
| 	'Barcode(s)' => 'Code(s) barres', | ||||
| 	'Minimum stock amount' => 'Quantité minimum en stock', | ||||
| 	'Default best before days' => 'Jours avant péremption par défaut', | ||||
| 	'Quantity unit purchase' => 'Format à l\'achat', | ||||
| 	'Quantity unit stock' => 'Format au stockage', | ||||
| 	'Factor purchase to stock quantity unit' => 'Facteur entre la quantité à l\'achat et la quantité en stock', | ||||
| 	'Create location' => 'Créer un emplacement', | ||||
| 	'Create quantity unit' => 'Créer un format', | ||||
| 	'Period type' => 'Type de période', | ||||
| 	'Period days' => 'Jours dans la période', | ||||
| 	'Create chore' => 'Créer une corvée', | ||||
| 	'Used in' => 'Utilisé dans', | ||||
| 	'Create battery' => 'Créer une batterie', | ||||
| 	'Edit battery' => 'Modifier une batterie', | ||||
| 	'Edit chore' => 'Modifier une corvée', | ||||
| 	'Edit quantity unit' => 'Modifier le format', | ||||
| 	'Edit product' => 'Modifier le produit', | ||||
| 	'Edit location' => 'Modifier l\'emplacement', | ||||
| 	'Record data' => 'Enregistrer les données', | ||||
| 	'Manage master data' => 'Gérer les données', | ||||
| 	'This will apply to added products' => 'Sera appliqué aux produits ajoutés', | ||||
| 	'never' => 'jamais', | ||||
| 	'Add products that are below defined min. stock amount' => 'Ajouter les produits qui sont en dessous du seuil de stock minimum', | ||||
| 	'For purchases this amount of days will be added to today for the best before date suggestion' => 'A l\'achat, ce nombre de jours sera ajouté à la date de péremption suggérée', | ||||
| 	'This means 1 #1 purchased will be converted into #2 #3 in stock' => '1 #1 acheté sera converti en #2 #3 dans le stock', | ||||
| 	'Login' => 'Se connecter', | ||||
| 	'Username' => 'Identifiant', | ||||
| 	'Password' => 'Mot de passe', | ||||
| 	'Invalid credentials, please try again' => 'Identifiants invalides, merci de réessayer', | ||||
| 	'Are you sure to delete battery "#1"?' => 'Êtes vous sûr de vouloir supprimer la batterie "#1" ?', | ||||
| 	'Yes' => 'Oui', | ||||
| 	'No' => 'Non', | ||||
| 	'Are you sure to delete chore "#1"?' => 'Voulez-vous vraiment supprimer la corvée "#1" ?', | ||||
| 	'"#1" could not be resolved to a product, how do you want to proceed?' => '"#1" n\'a pas été retrouvé en tant que produit, comment voulez-vous procéder ?', | ||||
| 	'Create or assign product' => 'Créer ou assigner à un produit', | ||||
| 	'Cancel' => 'Annuler', | ||||
| 	'Add as new product' => 'Ajouter un nouveau produit', | ||||
| 	'Add as barcode to existing product' => 'Ajouter en tant que code-barres à un produit existant', | ||||
| 	'Add as new product and prefill barcode' => 'Ajouter un nouveau produit et pré-renseigner le code-barres', | ||||
| 	'Are you sure to delete quantity unit "#1"?' => 'Voulez-vous vraiment supprimer le format "#1" ?', | ||||
| 	'Are you sure to delete product "#1"?' => 'Voulez-vous vraiment supprimer le produit "#1" ?', | ||||
| 	'Are you sure to delete location "#1"?' => 'Voulez-vous vraiment supprimer l\'emplacement "#1" ?', | ||||
| 	'Manage API keys' => 'Gérer les clefs API', | ||||
| 	'REST API & data model documentation' => 'Documentation sur l\'API REST & le modèle des données', | ||||
| 	'API keys' => 'Clefs API', | ||||
| 	'Create new API key' => 'Créer une nouvelle clef API', | ||||
| 	'API key' => 'Clef API', | ||||
| 	'Expires' => 'Valide jusqu\'à', | ||||
| 	'Created' => 'Créée', | ||||
| 	'This product is not in stock' => 'Ce produit n\'est pas en stock', | ||||
| 	'This means #1 will be added to stock' => '#1 sera ajouté au stock', | ||||
| 	'This means #1 will be removed from stock' => '#1 sera supprimé du stock', | ||||
| 	'This means it is estimated that a new execution of this chore is tracked #1 days after the last was tracked' => 'La prochaine exécution de cette corvée sera programmée #1 jours après sa dernière exécution', | ||||
| 	'Removed #1 #2 of #3 from stock' => '#1 #2 de #3 supprimés du stock', | ||||
| 	'About grocy' => 'À propos de grocy', | ||||
| 	'Close' => 'Fermer', | ||||
| 	'#1 batteries are due to be charged within the next #2 days' => '#1 batteries doivent être rechargées dans les #2 prochains jours', | ||||
| 	'#1 batteries are overdue to be charged' => '#1 batteries n\'ont pas été rechargées à temps', | ||||
| 	'#1 chores are due to be done within the next #2 days' => '#1 corvées doivent être réalisées dans les #2 prochains jours', | ||||
| 	'#1 chores are overdue to be done' => '#1 corvées n\'ont pas été réalisées à temps', | ||||
| 	'Released on' => 'Date de sortie', | ||||
| 	'Consume #3 #1 of #2' => 'Consommer #3 #1 de #2', | ||||
| 	'Added #1 #2 of #3 to stock' => '#1 #2 de #3 ajoutés au stock', | ||||
| 	'Stock amount of #1 is now #2 #3' => 'La quantité en stock de #1 est maintenant de #2 #3', | ||||
| 	'Tracked execution of chore #1 on #2' => 'La corvée "#1" a été réalisée le #2', | ||||
| 	'Tracked charge cycle of battery #1 on #2' => 'La batterie "#1" a été rechargée le #2', | ||||
| 	'Consume all #1 which are currently in stock' => 'Consommer tous les #1 actuellement en stock', | ||||
| 	'All' => 'Tout', | ||||
| 	'Track charge cycle of battery #1' => 'Indiquer le rechargement de la batterie #1', | ||||
| 	'Track execution of chore #1' => 'Indiquer la réalisation de la corvée #1', | ||||
| 	'Filter by location' => 'Filtrer par emplacement', | ||||
| 	'Search' => 'Recherche', | ||||
| 	'Not logged in' => 'Non connecté', | ||||
| 	'You have to select a product' => 'Vous devez sélectionner un produit', | ||||
| 	'You have to select a chore' => 'Vous devez sélectionner une corvée', | ||||
| 	'You have to select a battery' => 'Vous devez sélectionner une batterie', | ||||
| 	'A name is required' => 'Un nom est requis', | ||||
| 	'A location is required' => 'Un emplacement est requis', | ||||
| 	'The amount cannot be lower than #1' => 'La quantité ne peut être inférieure à #1', | ||||
| 	'This cannot be negative' => 'Ne peut être négatif', | ||||
| 	'A quantity unit is required' => 'Un format est requis', | ||||
| 	'A period type is required' => 'Un type de période est requis', | ||||
| 	'A best before date is required and must be later than today' => 'Une date de péremption est requise et doit être supérieure à la date du jour', | ||||
| 	'Settings' => 'Paramètres', | ||||
| 	'This can only be before now' => 'Ne peut être qu\'antérieur à maintenant', | ||||
| 	'Calendar' => 'Calendrier', | ||||
| 	'Recipes' => 'Recettes', | ||||
| 	'Edit recipe' => 'Modifier une recette', | ||||
| 	'New recipe' => 'Nouvelle recette', | ||||
| 	'Ingredients list' => 'Liste des ingrédients', | ||||
| 	'Add recipe ingredient' => 'Ajouter un ingrédient dans la recette', | ||||
| 	'Edit recipe ingredient' => 'Modifier un ingrédient dans la recette', | ||||
| 	'Are you sure to delete recipe "#1"?' => 'Voulez-vous vraiment supprimer la recette "#1" ?', | ||||
| 	'Are you sure to delete recipe ingredient "#1"?' => 'Voulez-vous vraiment supprimer l\'ingrédient "#1" de la recette ?', | ||||
| 	'Are you sure to empty the shopping list?' => 'Voulez-vous vraiment vider la liste de courses ?', | ||||
| 	'Clear list' => 'Vider la liste', | ||||
| 	'Requirements fulfilled' => 'Prérequis remplis', | ||||
| 	'Put missing products on shopping list' => 'Ajouter les produits manquants dans la liste de courses', | ||||
| 	'Not enough in stock, #1 ingredients missing' => 'Pas assez en stock, #1 ingrédients manquants', | ||||
| 	'Enough in stock' => 'Il y en a assez en stock', | ||||
| 	'Not enough in stock, #1 ingredients missing but already on the shopping list' => 'Pas assez en stock, #1 ingrédients manquants mais déjà dans la liste de courses', | ||||
| 	'Expand to fullscreen' => 'Mettre en plein écran', | ||||
| 	'Ingredients' => 'Ingrédients', | ||||
| 	'Preparation' => 'Préparation', | ||||
| 	'Recipe' => 'Recette', | ||||
| 	'Not enough in stock, #1 missing, #2 already on shopping list' => 'Pas assez en stock, #1 manquant et #2 déjà dans la liste de courses', | ||||
| 	'Show notes' => 'Afficher les notes', | ||||
| 	'Put missing amount on shopping list' => 'Ajouter la quantité manquante dans la liste de courses', | ||||
| 	'Are you sure to put all missing ingredients for recipe "#1" on the shopping list?' => 'Voulez-vous vraiment ajouter tous les ingrédients manquants de la recette "#1" dans la liste de courses ?', | ||||
| 	'Added for recipe #1' => 'Ajoutés pour la recette #1', | ||||
| 	'Manage users' => 'Gérer les utilisateurs', | ||||
| 	'User' => 'Utilisateur', | ||||
| 	'Users' => 'Utilisateurs', | ||||
| 	'Are you sure to delete user "#1"?' => 'Voulez-vous vraiment supprimer l\'utilisateur "#1" ?', | ||||
| 	'Create user' => 'Créer un utilisateur', | ||||
| 	'Edit user' => 'Modifier un utilisateur', | ||||
| 	'First name' => 'Prénom', | ||||
| 	'Last name' => 'Nom', | ||||
| 	'A username is required' => 'Un nom d\'utilisateur est requis', | ||||
| 	'Confirm password' => 'Confirmation du mot de passe', | ||||
| 	'Passwords do not match' => 'Les mots de passe ne sont pas identiques', | ||||
| 	'Change password' => 'Changer le mot de passe', | ||||
| 	'Done by' => 'Fait par', | ||||
| 	'Last done by' => 'Dernière réalisation par', | ||||
| 	'Unknown' => 'Inconnu', | ||||
| 	'Filter by chore' => 'Filtrer par corvée', | ||||
| 	'Chores journal' => 'Journal des corvées', | ||||
| 	'0 means suggestions for the next charge cycle are disabled' => '0 implique que les suggestions du prochain cycle de charge seront désactivées', | ||||
| 	'Charge cycle interval (days)' => 'Intervalle du cycle de charge (jours)', | ||||
| 	'Last price' => 'Dernier prix', | ||||
| 	'Price history' => 'Historique des prix', | ||||
| 	'No price history available' => 'Aucun historique disponible', | ||||
| 	'Price' => 'Prix', | ||||
| 	'in #1 per purchase quantity unit' => 'en #1 par quantité achetée (au format d\'achat)', | ||||
| 	'The price cannot be lower than #1' => 'Le prix ne peut être inférieur à #1', | ||||
| 	'#1 product expires within the next #2 days' => '#1 produit se périme dans les #2 prochains jours', | ||||
| 	'#1 product is already expired' => '#1 produit est périmé', | ||||
| 	'#1 product is below defined min. stock amount' => '#1 produit est sous le seuil de stock minimum', | ||||
| 	'Unit' => 'Unité', | ||||
| 	'Units' => 'Unités', | ||||
| 	'#1 chore is due to be done within the next #2 days' => '#1 corvée doit être réalisée dans les #2 prochains jours', | ||||
| 	'#1 chore is overdue to be done' => '#1 corvée n\'a pas été réalisée à temps', | ||||
| 	'#1 battery is due to be charged within the next #2 days' => '#1 batterie doit être rechargée dans les #2 prochains jours', | ||||
| 	'#1 battery is overdue to be charged' => '#1 batterie n\'a pas été rechargée à temps', | ||||
| 	'#1 unit was automatically added and will apply in addition to the amount entered here' => '#1 unité a automatiquement été ajoutée et sera appliquée en plus à la quantité entrée ici', | ||||
| 	'in singular form' => 'Au singulier', | ||||
| 	'in plural form' => 'Au pluriel', | ||||
| 	'Never expires' => 'Ne périme jamais', | ||||
| 	'This cannot be lower than #1' => 'Ne peut être inférieur à #1', | ||||
| 	'-1 means that this product never expires' => '-1 implique que ce produit ne périme jamais', | ||||
| 	'Quantity unit' => 'Format', | ||||
| 	'Only check if a single unit is in stock (a different quantity can then be used above)' => 'Vérifier uniquement si une unité est en stock (une quantité différente peut alors être utilisée au dessus)', | ||||
| 	'Are you sure to consume all ingredients needed by recipe "#1" (ingredients marked with "check only if a single unit is in stock" will be ignored)?' => 'Voulez-vous vraiment consommer tous les ingrédients requis par la recette "#1" (les ingrédients avec l\'option "Vérifier uniquement si une unité est en stock" seront ignorés) ?', | ||||
| 	'Removed all ingredients of recipe "#1" from stock' => 'Enlever tous les ingrédients de la recette "#1" du stock', | ||||
| 	'Consume all ingredients needed by this recipe' => 'Consommer tous les ingrédients requis par cette recette', | ||||
| 	'Click to show technical details' => 'Cliquer pour afficher les détails techniques', | ||||
| 	'Error while saving, probably this item already exists' => 'Erreur à l\'enregistrement, cet objet existe déjà', | ||||
| 	'Error details' => 'Détails sur l\'erreur', | ||||
| 	'Tasks' => 'Tâches', | ||||
| 	'Show done tasks' => 'Afficher les tâches terminées', | ||||
| 	'Task' => 'Tâche', | ||||
| 	'Due' => 'À faire', | ||||
| 	'Assigned to' => 'Assigné à', | ||||
| 	'Mark task "#1" as completed' => 'Indiquer la tâche "#1" comme terminée', | ||||
| 	'Uncategorized' => 'Sans catégorie', | ||||
| 	'Task categories' => 'Catégories de tâche', | ||||
| 	'Create task' => 'Créer une tâche', | ||||
| 	'A due date is required' => 'Une date de réalisation est requise', | ||||
| 	'Category' => 'Catégorie', | ||||
| 	'Edit task' => 'Modifier la tâche', | ||||
| 	'Are you sure to delete task "#1"?' => 'Voulez-vous vraiment supprimer la tâche "#1" ?', | ||||
| 	'#1 task is due to be done within the next #2 days' => '#1 tâche doit être réalisée dans les #2 prochains jours', | ||||
| 	'#1 tasks are due to be done within the next #2 days' => '#1 tâches doivent être réalisées dans les #2 prochains jours', | ||||
| 	'#1 task is overdue to be done' => '#1 tâche n\'a pas été réalisée à temps', | ||||
| 	'#1 tasks are overdue to be done' => '#1 tâches n\'ont pas été réalisées à temps', | ||||
| 	'Edit task category' => 'Modifier la catégorie de tâche', | ||||
| 	'Create task category' => 'Créer une catégorie de tâche', | ||||
| 	'Product groups' => 'Groupes de produit', | ||||
| 	'Ungrouped' => 'Sans groupe', | ||||
| 	'Create product group' => 'Créer un groupe de produit', | ||||
| 	'Edit product group' => 'Modifier le groupe de produit', | ||||
| 	'Product group' => 'Groupe de produit', | ||||
| 	'Are you sure to delete product group "#1"?' => 'Voulez-vous vraiment supprimer le groupe de produit "#1" ?', | ||||
| 	'Stay logged in permanently' => 'Rester connecté de manière permanente', | ||||
| 	'When not set, you will get logged out at latest after 30 days' => 'Si non défini, vous serez déconnecté après au moins 30 jours', | ||||
| 	'Filter by status' => 'Filtrer par statut', | ||||
| 	'Below min. stock amount' => 'En dessous du seuil de stock minimum', | ||||
| 	'Expiring soon' => 'Expire bientôt', | ||||
| 	'Already expired' => 'Déjà périmé', | ||||
| 	'Due soon' => 'À réaliser bientôt', | ||||
| 	'Overdue' => 'En retard', | ||||
| 	'View settings' => 'Voir les paramètres', | ||||
| 	'Auto reload on external changes' => 'Mettre à jour automatiquement lors d\'un changement externe', | ||||
| 	'Enable night mode' => 'Activer le mode nuit', | ||||
| 	'Auto enable in time range' => 'Activer automatiquement pendant la période', | ||||
| 	'From' => 'De', | ||||
| 	'in format' => 'Au format', | ||||
| 	'To' => 'à', | ||||
| 	'Time range goes over midnight' => 'La période inclus minuit', | ||||
| 	'Product picture' => 'Photo du produit', | ||||
| 	'No file selected' => 'Aucun fichier sélectionné', | ||||
| 	'If you don\'t select a file, the current picture will not be altered' => 'Si vous ne sélectionnez pas de photo, l\'actuelle sera conservée', | ||||
| 	'Current picture' => 'Photo actuelle', | ||||
| 	'Delete' => 'Supprimer', | ||||
| 	'The current picture will be deleted when you save the product' => 'La photo actuelle va être supprimée lors de la sauvegarde du produit', | ||||
| 	'Select file' => 'Sélectionner un fichier', | ||||
| 	'Image of product #1' => 'Photo du produit #1', | ||||
| 	'This product cannot be deleted because it is in stock, please remove the stock amount first.' => 'Ce produit ne peut être supprimé puisqu\'il est en stock. Merci d\'enlever la quantité en stock avant.', | ||||
| 	'Delete not possible' => 'Impossible de supprimer', | ||||
| 	'Equipment' => 'Équipement', | ||||
| 	'Instruction manual' => 'Manuel d\'utilisation', | ||||
| 	'The selected equipment has no instruction manual' => 'L\'équipement sélectionné n\'a pas de manuel d\'utilisation', | ||||
| 	'Notes' => 'Notes', | ||||
| 	'Edit equipment' => 'Modifier un équipement', | ||||
| 	'Create equipment' => 'Créer un équipement', | ||||
| 	'If you don\'t select a file, the current instruction manual will not be altered' => 'Si vous ne sélectionnez pas de fichier, le manuel actuel ne sera pas modifié', | ||||
| 	'Current instruction manual' => 'Manuel d\'utilisation actuel', | ||||
| 	'No instruction manual available' => 'Aucun manuel d\'utilisation disponible', | ||||
| 	'The current instruction manual will be deleted when you save the equipment' => 'Le manuel d\'utilisation actuel sera supprimé lors de la sauvegarde de cet équipement', | ||||
| 	'No picture available' => 'Aucune photo disponible', | ||||
| 	'Filter by product group' => 'Filtrer par groupe de produits', | ||||
| 	'Presets for new products' => 'Modèle pour les nouveaux produits', | ||||
| 	'Included recipes' => 'Recettes incluses', | ||||
| 	'A recipe is required' => 'Une recette est requise', | ||||
| 	'Add included recipe' => 'Ajouter une recette incluse', | ||||
| 	'Edit included recipe' => 'Supprimer une recette incluse', | ||||
| 	'Group' => 'Groupe', | ||||
| 	'This will be used as a headline to group ingredients together' => 'Cela sera utilisé comme titre pour regrouper les ingrédients ensemble', | ||||
| 	'Journal' => 'Journal', | ||||
| 	'Stock journal' => 'Journal du stock', | ||||
| 	'Filter by product' => 'Filtrer par produit', | ||||
| 	'Booking time' => 'Temps de réservation', | ||||
| 	'Booking type' => 'Type de réservation', | ||||
| 	'Undo booking' => 'Annuler la réservation', | ||||
| 	'Undone on' => 'Annulé le', | ||||
| 	'Batteries journal' => 'Journal des batteries', | ||||
| 	'Filter by battery' => 'Filtrer par batterie', | ||||
| 	'Undo charge cycle' => 'Annuler le cycle de charge', | ||||
| 	'Undo chore execution' => 'Annuler la réalisation de la corvée', | ||||
| 	'Chore execution successfully undone' => 'La réalisation de la corvée a bien été annulée', | ||||
| 	'Undo' => 'Annuler', | ||||
| 	'Booking successfully undone' => 'Réservation annulée', | ||||
| 	'Charge cycle successfully undone' => 'Le cycle de charge a bien été annulé', | ||||
| 	'This cannot be negative and must be an integral number' => 'Ne peut être négatif et doit être un nombre entier', | ||||
| 	'Disable stock fulfillment checking for this ingredient' => 'Désactiver la vérification du stock pour cet ingrédient', | ||||
| 	'Add all list items to stock' => 'Ajouter toute la liste dans le stock', | ||||
| 	'Add #3 #1 of #2 to stock' => 'Ajouter #3 #1 de #2 au stock', | ||||
| 	'Adding shopping list item #1 of #2' => 'Ajout du produit #1 sur #2 de la liste de courses', | ||||
| 	'Use a specific stock item' => 'Utiliser un objet spécifique du stock', | ||||
| 	'The first item in this list would be picked by the default rule which is "First expiring first, then first in first out"' => 'Le premier élément de cette liste sera sélectionné par la règle par défaut qui est "Le premier arrivant à péremption en premier, puis premier entré premier sorti"', | ||||
| 	'Mark #3 #1 of #2 as open' => 'Indiquer #3 #1 de #2 comme ouvert', | ||||
| 	'When a product was marked as opened, the best before date will be replaced by today + this amount of days (a value of 0 disables this)' => 'Quand un produit est marqué comme ouvert, la date de péremption sera remplacée par la date du jour + ce nombre de jours (une valeur de 0 désactive ce changement)', | ||||
| 	'Default best before days after opened' => 'Date de péremption en jours par défaut après ouverture', | ||||
| 	'Marked #1 #2 of #3 as opened' => '#1 #2 de #3 indiqués comme ouverts', | ||||
| 	'Mark as opened' => 'Indiquer comme ouvert', | ||||
| 	'Expires on #1; Bought on #2' => 'Périme le #1; Acheté le #2', | ||||
| 	'Not opened' => 'Non ouvert', | ||||
| 	'Opened' => 'Ouvert', | ||||
| 	'Mark #3 #1 of #2 as open' => 'Indiquer #3 #1 de #2 comme ouvert', | ||||
| 	'#1 opened' => '#1 ouvert', | ||||
| 	'Product expires' => 'Expiration du produit', | ||||
| 	'Task due' => 'Tâche à réaliser', | ||||
| 	'Chore due' => 'Corvée à réaliser', | ||||
| 	'Battery charge cycle due' => 'Rechargement à réaliser', | ||||
| 	'Show clock in header' => 'Afficher l\'horloge dans l\'en-tête', | ||||
| 	'Stock settings' => 'Paramètres du stock', | ||||
| 	'Shopping list to stock workflow' => 'Transition de la liste de courses vers le stock', | ||||
| 	'Automatically do the booking using the last price and the amount of the shopping list item, if the product has "Default best before days" set' => 'Réaliser automatiquement les achats en utilisant le dernier prix connu et la quantité indiquée dans la liste, si le premier a une date de péremption par défaut renseignée', | ||||
| 	'Skip' => 'Passer' | ||||
| ); | ||||
| @@ -1,188 +0,0 @@ | ||||
| <?php | ||||
|  | ||||
| return array( | ||||
| 	'Stock overview' => 'Dispensa', | ||||
| 	'#1 products with #2 units in stock' => '#1 prodotti stano per finire(#2 unità)', | ||||
| 	'#1 products expiring within the next #2 days' => '#1 prodotti scadranno tra #2 giorni', | ||||
| 	'#1 products are already expired' => '#1 prodotti scaduti', | ||||
| 	'#1 products are below defined min. stock amount' => '#1 prodotti sotto il limite minimo', | ||||
| 	'Product' => 'prodotto', | ||||
| 	'Amount' => 'quantità', | ||||
| 	'Next best before date' => 'Prossima data di scadenza', | ||||
| 	'Logout' => 'Logout', | ||||
| 	'Habits overview' => 'Riepilogo delle abitudini', | ||||
| 	'Batteries overview' => 'Riepilogo delle batterie', | ||||
| 	'Purchase' => 'Acquisti', | ||||
| 	'Consume' => 'Consumi', | ||||
| 	'Inventory' => 'Inventario', | ||||
| 	'Shopping list' => 'Lista della spesa', | ||||
| 	'Habit tracking' => 'Dati abitudini', | ||||
| 	'Battery tracking' => 'Dati batterie', | ||||
| 	'Products' => 'Prodotti', | ||||
| 	'Locations' => 'Posizioni', | ||||
| 	'Quantity units' => 'Unità di misura', | ||||
| 	'Habits' => 'Abitudini', | ||||
| 	'Batteries' => 'Batterie', | ||||
| 	'Habit' => 'Abitudine', | ||||
| 	'Next estimated tracking' => 'Prossima esecuzione', | ||||
| 	'Last tracked' => 'Ultima esecuzione', | ||||
| 	'Battery' => 'Batterie', | ||||
| 	'Last charged' => 'Ultima ricarica', | ||||
| 	'Next planned charge cycle' => 'Prossima ricarica', | ||||
| 	'Best before' => 'Data di scadenza', | ||||
| 	'OK' => 'OK', | ||||
| 	'Product overview' => 'Riepilogo dei prodotti', | ||||
| 	'Stock quantity unit' => 'Unità di misura', | ||||
| 	'Stock amount' => 'Quantità', | ||||
| 	'Last purchased' => 'Ultimo acquisto', | ||||
| 	'Last used' => 'Ultimo utilizzo', | ||||
| 	'Spoiled' => 'Scaduto', | ||||
| 	'Barcode lookup is disabled' => 'I codici a barre sono disabilitati', | ||||
| 	'will be added to the list of barcodes for the selected product on submit' => 'sarà aggiunto alla lista dei codici a barre per questo prodotto', | ||||
| 	'New amount' => 'Nuova quantità', | ||||
| 	'Note' => 'Nota', | ||||
| 	'Tracked time' => 'Ora di esecuzione', | ||||
| 	'Habit overview' => 'Riepilogo dell\'abitudine', | ||||
| 	'Tracked count' => 'Numero di esecuzioni', | ||||
| 	'Battery overview' => 'Riepilogo della batteria', | ||||
| 	'Charge cycles count' => 'Numero di ricariche', | ||||
| 	'Create shopping list item' => 'Aggiungi un prodotto alla lista della spesa', | ||||
| 	'Edit shopping list item' => 'Modifica un\'entrata della lista della spesa', | ||||
| 	'#1 units were automatically added and will apply in addition to the amount entered here' => '#1 sono state aggiunte automaticamente', | ||||
| 	'Save' => 'Salva', | ||||
| 	'Add' => 'Aggiungi', | ||||
| 	'Name' => 'Nome', | ||||
| 	'Location' => 'Posizione', | ||||
| 	'Min. stock amount' => 'Quantità minima', | ||||
| 	'QU purchase' => 'Unità di acquisto', | ||||
| 	'QU stock' => 'Unità di dispensa', | ||||
| 	'QU factor' => 'Fattore di conversione', | ||||
| 	'Description' => 'Descrizione', | ||||
| 	'Create product' => 'Aggiungi prodotto', | ||||
| 	'Barcode(s)' => 'Codice a barre', | ||||
| 	'Minimum stock amount' => 'Quantità minima', | ||||
| 	'Default best before days' => 'Data di scadenza standard in giorni', | ||||
| 	'Quantity unit purchase' => 'Unità di acquisto', | ||||
| 	'Quantity unit stock' => 'Unità di dispensa', | ||||
| 	'Factor purchase to stock quantity unit' => 'Fattore di conversione tra quantità di acquisto e di dispensa', | ||||
| 	'Create location' => 'Aggiungi posizione', | ||||
| 	'Create quantity unit' => 'Aggiungi unità di misura', | ||||
| 	'Period type' => 'Tipo di ripetizione', | ||||
| 	'Period days' => 'Periodo in giorni', | ||||
| 	'Create habit' => 'Aggiungi abitudine', | ||||
| 	'Used in' => 'Usato in', | ||||
| 	'Create battery' => 'Aggiungi batteria', | ||||
| 	'Edit battery' => 'Modifica batteria', | ||||
| 	'Edit habit' => 'Modifica abitudine', | ||||
| 	'Edit quantity unit' => 'Modifica unità di misura', | ||||
| 	'Edit product' => 'Modifica prodotto', | ||||
| 	'Edit location' => 'Modifica posizione', | ||||
| 	'Record data' => 'Registra dati', | ||||
| 	'Manage master data' => 'Gestisci dati', | ||||
| 	'This will apply to added products' => 'Verrà applicato ai prodotti aggiunti', | ||||
| 	'never' => 'mai', | ||||
| 	'Add products that are below defined min. stock amount' => 'Aggiungi prodotti sotti il limite minimo', | ||||
| 	'For purchases this amount of days will be added to today for the best before date suggestion' => 'Questo numero di giorni verrà aggiunto alla data di acquisto per la data di scadenza', | ||||
| 	'This means 1 #1 purchased will be converted into #2 #3 in stock' => 'Questo significa che 1 #1 acquistato diventerà #2 #3 in dispensa', | ||||
| 	'Login' => 'Login', | ||||
| 	'Username' => 'Username', | ||||
| 	'Password' => 'Password', | ||||
| 	'Invalid credentials, please try again' => 'Credenziali non valide, per favore riprova', | ||||
| 	'Are you sure to delete battery "#1"?' => 'Sei sicuro di voler eliminare la batteria "#1"?', | ||||
| 	'Yes' => 'Si', | ||||
| 	'No' => 'No', | ||||
| 	'Are you sure to delete habit "#1"?' => 'Sei sicuro di voler eliminare l\'abitudine "#1"?', | ||||
| 	'"#1" could not be resolved to a product, how do you want to proceed?' => '"#1" non è stato associato a nessun prodotto, vuoi procedere?', | ||||
| 	'Create or assign product' => 'Aggiungi o assegna prodotto', | ||||
| 	'Cancel' => 'Annulla', | ||||
| 	'Add as new product' => 'Aggiungi come nuovo prodotto', | ||||
| 	'Add as barcode to existing product' => 'Assegna il codice a barre ad un prodotto', | ||||
| 	'Add as new product and prefill barcode' => 'Aggiungi come nuovo prodotto ed assegna il codice a barre', | ||||
| 	'Are you sure to delete quantity unit "#1"?' => 'Sei sicuro di voler eliminare l\'unità di misura "#1"?', | ||||
| 	'Are you sure to delete product "#1"?' => 'Sei sicuro di voler eliminare il prodotto "#1"?', | ||||
| 	'Are you sure to delete location "#1"?' => 'Sei sicuro di voler eliminare la posizione "#1"?', | ||||
| 	'Manage API keys' => 'Gestisci le chiavi API', | ||||
|     'REST API & data model documentation' => 'REST API & Documentazione del modello di dati', | ||||
|     'API keys' => 'Chiavi API', | ||||
|     'Create new API key' => 'Crea nuova chiave API', | ||||
|     'API key' => 'Chiave API', | ||||
|     'Expires' => 'Scade il', | ||||
|     'Created' => 'Creata il', | ||||
| 	'This product is not in stock' => 'Questo prodotto non è in dispensa', | ||||
| 	'This means #1 will be added to stock' => '#1 sarà aggiunto alla dispensa', | ||||
| 	'This means #1 will be removed from stock' => '#1 sarà rimosso dalla dispensa', | ||||
| 	'This means it is estimated that a new execution of this habit is tracked #1 days after the last was tracked' => 'L\'esecuzione dell\'abitudine è #1 giorni dopo la precedente', | ||||
| 	'Removed #1 #2 of #3 from stock' => '#1 #2 su #3 rimossi dalla dispensa', | ||||
| 	'About grocy' => 'Riguardo grocy', | ||||
| 	'Close' => 'Chiudi', | ||||
| 	'#1 batteries are due to be charged within the next #2 days' => '#1 batterie da ricaricare entro #2 giorni', | ||||
| 	'#1 batteries are overdue to be charged' => '#1 batterie devono essere ricaricate', | ||||
| 	'#1 habits are due to be done within the next #2 days' => '#1 abitudini da eseguire entro #2 giorni', | ||||
| 	'#1 habits are overdue to be done' => '#1 abitudini da eseguire', | ||||
| 	'Released on' => 'Rilasciato il', | ||||
| 	'Consume #3 #1 of #2' => 'Consumati #3 #1 di #2', | ||||
| 	'Added #1 #2 of #3 to stock' => 'Aggiunti #1 #2 di #3', | ||||
| 	'Stock amount of #1 is now #2 #3' => 'La quantità in dispensa di #1 è ora #2 #3', | ||||
| 	'Tracked execution of habit #1 on #2' => 'Esecuzione dell\'abitudine #1 registrata il #2', | ||||
| 	'Tracked charge cylce of battery #1 on #2' => 'Ricarica della batteria #1 effettuata il #2', | ||||
| 	'Consume all #1 which are currently in stock' => 'Consuma tutto #1 in dispensa', | ||||
| 	'All' => 'Tutto', | ||||
| 	'Track charge cycle of battery #1' => 'Registra la ricarica della batteria #1', | ||||
| 	'Track execution of habit #1' => 'Registra l\'esecuzione dell\'abitudine #1', | ||||
| 	'Filter by location' => 'Filtra per posizione', | ||||
| 	'Search' => 'Cerca', | ||||
| 	'Not logged in' => 'Non autenticato', | ||||
| 	'You have to select a product' => 'Devi selezionare un prodotto', | ||||
| 	'You have to select a habit' => 'Devi selezionare un\'abitudine', | ||||
| 	'You have to select a battery' => 'Devi selezionare una batteria', | ||||
| 	'A name is required' => 'Inserisci un nome', | ||||
| 	'A location is required' => 'Inserisci la posizione', | ||||
| 	'The amount cannot be lower than #1' => 'La quantità non può essere minore di #1', | ||||
| 	'This cannot be negative' => 'Il numero non può essere negativo', | ||||
| 	'A quantity unit is required' => 'Inserisci un\'unità di misura', | ||||
| 	'A period type is required' => 'Seleziona un tipo di ripetizione', | ||||
| 	 | ||||
| 	//Constants | ||||
| 	'manually' => 'Manualmente', | ||||
| 	'dynamic-regular' => 'Regolatore dinamico', | ||||
| 	 | ||||
| 	//Technical component translations | ||||
| 	'timeago_locale' => 'it', | ||||
| 	'timeago_nan' => 'NaN anni fa', | ||||
| 	'moment_locale' => 'it', | ||||
| 	'bootstrap_datepicker_locale' => 'it', | ||||
| 	'datatables_localization' => '{"sEmptyTable":"Nessun dato disponibile","sInfo":"Mostrando da _START_ a _END_ di _TOTAL_ voci","sInfoEmpty":"Mostrando da 0 a 0 di 0 voci","sInfoFiltered":"(Filtrato da _MAX_ voci totali)","sInfoPostFix":"","sInfoThousands":",","sLengthMenu":"Mostra _MENU_ voci","sLoadingRecords":"Caricando...","sProcessing":"Calcolando...","sSearch":"Cerca:","sZeroRecords":"Nessun risultato trovato","oPaginate":{"sFirst":"Prima","sLast":"Ultima","sNext":"Prossima","sPrevious":"Precedente"},"oAria":{"sSortAscending":": ordine crescente","sSortDescending":": ordine decrescente"}}', | ||||
| 	 | ||||
| 	//Demo data | ||||
| 	'Cookies' => 'Biscotti', | ||||
| 	'Chocolate' => 'Cioccolato', | ||||
| 	'Pantry' => 'Vorratskammer', | ||||
| 	'Candy cupboard' => 'Süßigkeitenschrank', | ||||
| 	'Tinned food cupboard' => 'Konservenschrank', | ||||
| 	'Fridge' => 'Kühlschrank', | ||||
| 	'Piece' => 'Pezzo', | ||||
| 	'Pack' => 'Pacco', | ||||
| 	'Glass' => 'Bicchiere', | ||||
| 	'Tin' => 'Scatola', | ||||
| 	'Can' => 'Lattina', | ||||
| 	'Bunch' => 'Cespo', | ||||
| 	'Gummy bears' => 'Caramelle', | ||||
| 	'Crisps' => 'Patatine', | ||||
| 	'Eggs' => 'Uova', | ||||
| 	'Noodles' => 'Spaghetti', | ||||
| 	'Pickles' => 'Marmellata', | ||||
| 	'Gulash soup' => 'Dado', | ||||
| 	'Yogurt' => 'Yogurt', | ||||
| 	'Cheese' => 'Parmigiano', | ||||
| 	'Cold cuts' => 'Pancetta', | ||||
| 	'Paprika' => 'Pepe', | ||||
| 	'Cucumber' => 'Zucchine', | ||||
| 	'Radish' => 'Radicchio', | ||||
| 	'Tomato' => 'Pomodori', | ||||
| 	'Changed towels in the bathroom' => 'Cambiare asciugamani in bagno', | ||||
| 	'Cleaned the kitchen floor' => 'Pulire la cucina', | ||||
| 	'Warranty ends' => 'Scadenza dalla garanzia', | ||||
| 	'TV remote control' => 'Telecomando', | ||||
| 	'Alarm clock' => 'Sveglia', | ||||
| 	'Heat remote control' => 'Termostato' | ||||
| ); | ||||
							
								
								
									
										6
									
								
								localization/it/chore_types.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								localization/it/chore_types.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | ||||
| <?php | ||||
|  | ||||
| return array( | ||||
| 	'manually' => 'Manualmente', | ||||
| 	'dynamic-regular' => 'Regolatore dinamico' | ||||
| ); | ||||
							
								
								
									
										10
									
								
								localization/it/component_translations.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								localization/it/component_translations.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,10 @@ | ||||
| <?php | ||||
|  | ||||
| return array( | ||||
| 	'timeago_locale' => 'it', | ||||
| 	'timeago_nan' => 'NaN anni fa', | ||||
| 	'moment_locale' => 'it', | ||||
| 	'datatables_localization' => '{"sEmptyTable":"Nessun dato disponibile","sInfo":"Mostrando da _START_ a _END_ di _TOTAL_ voci","sInfoEmpty":"Mostrando da 0 a 0 di 0 voci","sInfoFiltered":"(Filtrato da _MAX_ voci totali)","sInfoPostFix":"","sInfoThousands":",","sLengthMenu":"Mostra _MENU_ voci","sLoadingRecords":"Caricando...","sProcessing":"Calcolando...","sSearch":"Cerca:","sZeroRecords":"Nessun risultato trovato","oPaginate":{"sFirst":"Prima","sLast":"Ultima","sNext":"Prossima","sPrevious":"Precedente"},"oAria":{"sSortAscending":": ordine crescente","sSortDescending":": ordine decrescente"}}', | ||||
| 	'summernote_locale' => 'it-IT', | ||||
| 	'fullcalendar_locale' => 'fr' | ||||
| ); | ||||
							
								
								
									
										87
									
								
								localization/it/demo_data.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										87
									
								
								localization/it/demo_data.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,87 @@ | ||||
| <?php | ||||
|  | ||||
| return array( | ||||
| 	'Cookies' => 'Biscotti', | ||||
| 	'Chocolate' => 'Cioccolato', | ||||
| 	'Pantry' => 'Vorratskammer', | ||||
| 	'Candy cupboard' => 'Süßigkeitenschrank', | ||||
| 	'Tinned food cupboard' => 'Konservenschrank', | ||||
| 	'Fridge' => 'Kühlschrank', | ||||
| 	'Piece' => 'Pezzo', | ||||
| 	'Pieces' => 'Pezzi', | ||||
| 	'Pack' => 'Pacco', | ||||
| 	'Packs' => 'Pacchi', | ||||
| 	'Glass' => 'Bicchiere', | ||||
| 	'Glasses' => 'Bicchieri', | ||||
| 	'Tin' => 'Scatola', | ||||
| 	'Tins' => 'Scatole', | ||||
| 	'Can' => 'Lattina', | ||||
| 	'Cans' => 'Lattine', | ||||
| 	'Bunch' => 'Cespo', | ||||
| 	'Bunches' => 'Cespi', | ||||
| 	'Gummy bears' => 'Caramelle', | ||||
| 	'Crisps' => 'Patatine', | ||||
| 	'Eggs' => 'Uova', | ||||
| 	'Noodles' => 'Spaghetti', | ||||
| 	'Pickles' => 'Marmellata', | ||||
| 	'Gulash soup' => 'Dado', | ||||
| 	'Yogurt' => 'Yogurt', | ||||
| 	'Cheese' => 'Parmigiano', | ||||
| 	'Cold cuts' => 'Pancetta', | ||||
| 	'Paprika' => 'Pepe', | ||||
| 	'Cucumber' => 'Zucchine', | ||||
| 	'Radish' => 'Radicchio', | ||||
| 	'Tomato' => 'Pomodori', | ||||
| 	'Changed towels in the bathroom' => 'Cambiare asciugamani in bagno', | ||||
| 	'Cleaned the kitchen floor' => 'Pulire la cucina', | ||||
| 	'Warranty ends' => 'Scadenza dalla garanzia', | ||||
| 	'TV remote control' => 'Telecomando', | ||||
| 	'Alarm clock' => 'Sveglia', | ||||
| 	'Heat remote control' => 'Termostato', | ||||
| 	'Lawn mowed in the garden' => 'Prato falciato nel giardino', | ||||
| 	'Some good snacks' => 'Some good snacks', | ||||
| 	'Pizza dough' => 'Pizza dough', | ||||
| 	'Sieved tomatoes' => 'Sieved tomatoes', | ||||
| 	'Salami' => 'Salami', | ||||
| 	'Toast' => 'Toast', | ||||
| 	'Minced meat' => 'Minced meat', | ||||
| 	'Pizza' => 'Pizza', | ||||
| 	'Spaghetti bolognese' => 'Spaghetti bolognese', | ||||
| 	'Sandwiches' => 'Sandwiches', | ||||
| 	'English' => 'English', | ||||
| 	'German' => 'German', | ||||
| 	'Italian' => 'Italian', | ||||
| 	'Demo in different language' => 'Demo in different language', | ||||
| 	'This is the note content of the recipe ingredient' => 'This is the note content of the recipe ingredient', | ||||
| 	'Demo User' => 'Demo User', | ||||
| 	'Gram' => 'Gram', | ||||
| 	'Grams' => 'Grams', | ||||
| 	'Flour' => 'Flour', | ||||
| 	'Pancakes' => 'Pancakes', | ||||
| 	'Sugar' => 'Sugar', | ||||
| 	'Home' => 'Home', | ||||
| 	'Life' => 'Life', | ||||
| 	'Projects' => 'Projects', | ||||
| 	'Repair the garage door' => 'Repair the garage door', | ||||
| 	'Fork and improve grocy' => 'Fork and improve grocy', | ||||
| 	'Find a solution for what to do when I forget the door keys' => 'Find a solution for what to do when I forget the door keys', | ||||
| 	'Sweets' => 'Sweets', | ||||
| 	'Bakery products' => 'Bakery products', | ||||
| 	'Tinned food' => 'Tinned food', | ||||
| 	'Butchery products' => 'Butchery products', | ||||
| 	'Vegetables/Fruits' => 'Vegetables/Fruits', | ||||
| 	'Refrigerated products' => 'Refrigerated products', | ||||
| 	'Coffee machine' => 'Coffee machine', | ||||
| 	'Dishwasher' => 'Dishwasher', | ||||
| 	'Liter' => 'Liter', | ||||
| 	'Liters' => 'Litri', | ||||
| 	'Bottle' => 'Bottiglia', | ||||
| 	'Bottles' => 'Bottiglie', | ||||
| 	'Milk' => 'Latte', | ||||
| 	'Chocolate sauce' => 'Salsa al cioccolato', | ||||
| 	'Milliliters' => 'Millilitri', | ||||
| 	'Milliliter' => 'Millilitro', | ||||
| 	'Bottom' => 'Parte inferiore', | ||||
| 	'Topping' => 'Topping', | ||||
| 	'French' => 'French' | ||||
| ); | ||||
							
								
								
									
										8
									
								
								localization/it/stock_transaction_types.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								localization/it/stock_transaction_types.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| <?php | ||||
|  | ||||
| return array( | ||||
| 	'purchase' => 'Purchase', | ||||
| 	'consume' => 'Consume', | ||||
| 	'inventory-correction' => 'Inventory correction', | ||||
| 	'product-opened' => 'Product opened' | ||||
| ); | ||||
							
								
								
									
										330
									
								
								localization/it/strings.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										330
									
								
								localization/it/strings.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,330 @@ | ||||
| <?php | ||||
|  | ||||
| return array( | ||||
| 	'Stock overview' => 'Dispensa', | ||||
| 	'#1 products expiring within the next #2 days' => '#1 prodotti scadranno tra #2 giorni', | ||||
| 	'#1 products are already expired' => '#1 prodotti scaduti', | ||||
| 	'#1 products are below defined min. stock amount' => '#1 prodotti sotto il limite minimo', | ||||
| 	'Product' => 'prodotto', | ||||
| 	'Amount' => 'quantità', | ||||
| 	'Next best before date' => 'Prossima data di scadenza', | ||||
| 	'Logout' => 'Logout', | ||||
| 	'Chores overview' => 'Riepilogo delle abitudini', | ||||
| 	'Batteries overview' => 'Riepilogo delle batterie', | ||||
| 	'Purchase' => 'Acquisti', | ||||
| 	'Consume' => 'Consumi', | ||||
| 	'Inventory' => 'Inventario', | ||||
| 	'Shopping list' => 'Lista della spesa', | ||||
| 	'Chore tracking' => 'Dati abitudini', | ||||
| 	'Battery tracking' => 'Dati batterie', | ||||
| 	'Products' => 'Prodotti', | ||||
| 	'Locations' => 'Posizioni', | ||||
| 	'Quantity units' => 'Unità di misura', | ||||
| 	'Chores' => 'Abitudini', | ||||
| 	'Batteries' => 'Batterie', | ||||
| 	'Chore' => 'Abitudine', | ||||
| 	'Next estimated tracking' => 'Prossima esecuzione', | ||||
| 	'Last tracked' => 'Ultima esecuzione', | ||||
| 	'Battery' => 'Batterie', | ||||
| 	'Last charged' => 'Ultima ricarica', | ||||
| 	'Next planned charge cycle' => 'Prossima ricarica', | ||||
| 	'Best before' => 'Data di scadenza', | ||||
| 	'OK' => 'OK', | ||||
| 	'Product overview' => 'Riepilogo dei prodotti', | ||||
| 	'Stock quantity unit' => 'Unità di misura', | ||||
| 	'Stock amount' => 'Quantità', | ||||
| 	'Last purchased' => 'Ultimo acquisto', | ||||
| 	'Last used' => 'Ultimo utilizzo', | ||||
| 	'Spoiled' => 'Scaduto', | ||||
| 	'Barcode lookup is disabled' => 'I codici a barre sono disabilitati', | ||||
| 	'will be added to the list of barcodes for the selected product on submit' => 'sarà aggiunto alla lista dei codici a barre per questo prodotto', | ||||
| 	'New amount' => 'Nuova quantità', | ||||
| 	'Note' => 'Nota', | ||||
| 	'Tracked time' => 'Ora di esecuzione', | ||||
| 	'Chore overview' => 'Riepilogo dell\'abitudine', | ||||
| 	'Tracked count' => 'Numero di esecuzioni', | ||||
| 	'Battery overview' => 'Riepilogo della batteria', | ||||
| 	'Charge cycles count' => 'Numero di ricariche', | ||||
| 	'Create shopping list item' => 'Aggiungi un prodotto alla lista della spesa', | ||||
| 	'Edit shopping list item' => 'Modifica un\'entrata della lista della spesa', | ||||
| 	'#1 units were automatically added and will apply in addition to the amount entered here' => '#1 sono state aggiunte automaticamente', | ||||
| 	'Save' => 'Salva', | ||||
| 	'Add' => 'Aggiungi', | ||||
| 	'Name' => 'Nome', | ||||
| 	'Location' => 'Posizione', | ||||
| 	'Min. stock amount' => 'Quantità minima', | ||||
| 	'QU purchase' => 'Unità di acquisto', | ||||
| 	'QU stock' => 'Unità di dispensa', | ||||
| 	'QU factor' => 'Fattore di conversione', | ||||
| 	'Description' => 'Descrizione', | ||||
| 	'Create product' => 'Aggiungi prodotto', | ||||
| 	'Barcode(s)' => 'Codice a barre', | ||||
| 	'Minimum stock amount' => 'Quantità minima', | ||||
| 	'Default best before days' => 'Data di scadenza standard in giorni', | ||||
| 	'Quantity unit purchase' => 'Unità di acquisto', | ||||
| 	'Quantity unit stock' => 'Unità di dispensa', | ||||
| 	'Factor purchase to stock quantity unit' => 'Fattore di conversione tra quantità di acquisto e di dispensa', | ||||
| 	'Create location' => 'Aggiungi posizione', | ||||
| 	'Create quantity unit' => 'Aggiungi unità di misura', | ||||
| 	'Period type' => 'Tipo di ripetizione', | ||||
| 	'Period days' => 'Periodo in giorni', | ||||
| 	'Create chore' => 'Aggiungi abitudine', | ||||
| 	'Used in' => 'Usato in', | ||||
| 	'Create battery' => 'Aggiungi batteria', | ||||
| 	'Edit battery' => 'Modifica batteria', | ||||
| 	'Edit chore' => 'Modifica abitudine', | ||||
| 	'Edit quantity unit' => 'Modifica unità di misura', | ||||
| 	'Edit product' => 'Modifica prodotto', | ||||
| 	'Edit location' => 'Modifica posizione', | ||||
| 	'Record data' => 'Registra dati', | ||||
| 	'Manage master data' => 'Gestisci dati', | ||||
| 	'This will apply to added products' => 'Verrà applicato ai prodotti aggiunti', | ||||
| 	'never' => 'mai', | ||||
| 	'Add products that are below defined min. stock amount' => 'Aggiungi prodotti sotti il limite minimo', | ||||
| 	'For purchases this amount of days will be added to today for the best before date suggestion' => 'Questo numero di giorni verrà aggiunto alla data di acquisto per la data di scadenza', | ||||
| 	'This means 1 #1 purchased will be converted into #2 #3 in stock' => 'Questo significa che 1 #1 acquistato diventerà #2 #3 in dispensa', | ||||
| 	'Login' => 'Login', | ||||
| 	'Username' => 'Username', | ||||
| 	'Password' => 'Password', | ||||
| 	'Invalid credentials, please try again' => 'Credenziali non valide, per favore riprova', | ||||
| 	'Are you sure to delete battery "#1"?' => 'Sei sicuro di voler eliminare la batteria "#1"?', | ||||
| 	'Yes' => 'Si', | ||||
| 	'No' => 'No', | ||||
| 	'Are you sure to delete chore "#1"?' => 'Sei sicuro di voler eliminare l\'abitudine "#1"?', | ||||
| 	'"#1" could not be resolved to a product, how do you want to proceed?' => '"#1" non è stato associato a nessun prodotto, vuoi procedere?', | ||||
| 	'Create or assign product' => 'Aggiungi o assegna prodotto', | ||||
| 	'Cancel' => 'Annulla', | ||||
| 	'Add as new product' => 'Aggiungi come nuovo prodotto', | ||||
| 	'Add as barcode to existing product' => 'Assegna il codice a barre ad un prodotto', | ||||
| 	'Add as new product and prefill barcode' => 'Aggiungi come nuovo prodotto ed assegna il codice a barre', | ||||
| 	'Are you sure to delete quantity unit "#1"?' => 'Sei sicuro di voler eliminare l\'unità di misura "#1"?', | ||||
| 	'Are you sure to delete product "#1"?' => 'Sei sicuro di voler eliminare il prodotto "#1"?', | ||||
| 	'Are you sure to delete location "#1"?' => 'Sei sicuro di voler eliminare la posizione "#1"?', | ||||
| 	'Manage API keys' => 'Gestisci le chiavi API', | ||||
| 	'REST API & data model documentation' => 'REST API & Documentazione del modello di dati', | ||||
| 	'API keys' => 'Chiavi API', | ||||
| 	'Create new API key' => 'Crea nuova chiave API', | ||||
| 	'API key' => 'Chiave API', | ||||
| 	'Expires' => 'Scade il', | ||||
| 	'Created' => 'Creata il', | ||||
| 	'This product is not in stock' => 'Questo prodotto non è in dispensa', | ||||
| 	'This means #1 will be added to stock' => '#1 sarà aggiunto alla dispensa', | ||||
| 	'This means #1 will be removed from stock' => '#1 sarà rimosso dalla dispensa', | ||||
| 	'This means it is estimated that a new execution of this chore is tracked #1 days after the last was tracked' => 'L\'esecuzione dell\'abitudine è #1 giorni dopo la precedente', | ||||
| 	'Removed #1 #2 of #3 from stock' => '#1 #2 su #3 rimossi dalla dispensa', | ||||
| 	'About grocy' => 'Riguardo grocy', | ||||
| 	'Close' => 'Chiudi', | ||||
| 	'#1 batteries are due to be charged within the next #2 days' => '#1 batterie da ricaricare entro #2 giorni', | ||||
| 	'#1 batteries are overdue to be charged' => '#1 batterie devono essere ricaricate', | ||||
| 	'#1 chores are due to be done within the next #2 days' => '#1 abitudini da eseguire entro #2 giorni', | ||||
| 	'#1 chores are overdue to be done' => '#1 abitudini da eseguire', | ||||
| 	'Released on' => 'Rilasciato il', | ||||
| 	'Consume #3 #1 of #2' => 'Consumati #3 #1 di #2', | ||||
| 	'Added #1 #2 of #3 to stock' => 'Aggiunti #1 #2 di #3', | ||||
| 	'Stock amount of #1 is now #2 #3' => 'La quantità in dispensa di #1 è ora #2 #3', | ||||
| 	'Tracked execution of chore #1 on #2' => 'Esecuzione dell\'abitudine #1 registrata il #2', | ||||
| 	'Tracked charge cycle of battery #1 on #2' => 'Ricarica della batteria #1 effettuata il #2', | ||||
| 	'Consume all #1 which are currently in stock' => 'Consuma tutto #1 in dispensa', | ||||
| 	'All' => 'Tutto', | ||||
| 	'Track charge cycle of battery #1' => 'Registra la ricarica della batteria #1', | ||||
| 	'Track execution of chore #1' => 'Registra l\'esecuzione dell\'abitudine #1', | ||||
| 	'Filter by location' => 'Filtra per posizione', | ||||
| 	'Search' => 'Cerca', | ||||
| 	'Not logged in' => 'Non autenticato', | ||||
| 	'You have to select a product' => 'Devi selezionare un prodotto', | ||||
| 	'You have to select a chore' => 'Devi selezionare un\'abitudine', | ||||
| 	'You have to select a battery' => 'Devi selezionare una batteria', | ||||
| 	'A name is required' => 'Inserisci un nome', | ||||
| 	'A location is required' => 'Inserisci la posizione', | ||||
| 	'The amount cannot be lower than #1' => 'La quantità non può essere minore di #1', | ||||
| 	'This cannot be negative' => 'Il numero non può essere negativo', | ||||
| 	'A quantity unit is required' => 'Inserisci un\'unità di misura', | ||||
| 	'A period type is required' => 'Seleziona un tipo di ripetizione', | ||||
| 	'A best before date is required and must be later than today' => 'A best before date is required and must be later than today', | ||||
| 	'Settings' => 'Settings', | ||||
| 	'This can only be before now' => 'This can only be before now', | ||||
| 	'Calendar' => 'Calendar', | ||||
| 	'Recipes' => 'Recipes', | ||||
| 	'Edit recipe' => 'Edit recipe', | ||||
| 	'New recipe' => 'New recipe', | ||||
| 	'Ingredients list' => 'Ingredients list', | ||||
| 	'Add recipe ingredient' => 'Add recipe ingredient', | ||||
| 	'Edit recipe ingredient' => 'Edit recipe ingredient', | ||||
| 	'Are you sure to delete recipe "#1"?' => 'Are you sure to delete recipe "#1"?', | ||||
| 	'Are you sure to delete recipe ingredient "#1"?' => 'Are you sure to delete recipe ingredient "#1"?', | ||||
| 	'Are you sure to empty the shopping list?' => 'Are you sure to empty the shopping list?', | ||||
| 	'Clear list' => 'Clear list', | ||||
| 	'Requirements fulfilled' => 'Requirements fulfilled', | ||||
| 	'Put missing products on shopping list' => 'Put missing products on shopping list', | ||||
| 	'Not enough in stock, #1 ingredients missing' => 'Not enough in stock, #1 ingredients missing', | ||||
| 	'Enough in stock' => 'Enough in stock', | ||||
| 	'Not enough in stock, #1 ingredients missing but already on the shopping list' => 'Not enough in stock, #1 ingredients missing but already on the shopping list', | ||||
| 	'Expand to fullscreen' => 'Expand to fullscreen', | ||||
| 	'Ingredients' => 'Ingredients', | ||||
| 	'Preparation' => 'Preparation', | ||||
| 	'Recipe' => 'Recipe', | ||||
| 	'Not enough in stock, #1 missing, #2 already on shopping list' => 'Not enough in stock, #1 missing, #2 already on shopping list', | ||||
| 	'Show notes' => 'Show notes', | ||||
| 	'Put missing amount on shopping list' => 'Put missing amount on shopping list', | ||||
| 	'Are you sure to put all missing ingredients for recipe "#1" on the shopping list?' => 'Are you sure to put all missing ingredients for recipe "#1" on the shopping list?', | ||||
| 	'Added for recipe #1' => 'Added for recipe #1', | ||||
| 	'Manage users' => 'Manage users', | ||||
| 	'User' => 'User', | ||||
| 	'Users' => 'Users', | ||||
| 	'Are you sure to delete user "#1"?' => 'Are you sure to delete user "#1"?', | ||||
| 	'Create user' => 'Create user', | ||||
| 	'Edit user' => 'Edit user', | ||||
| 	'First name' => 'First name', | ||||
| 	'Last name' => 'Last name', | ||||
| 	'A username is required' => 'A username is required', | ||||
| 	'Confirm password' => 'Confirm password', | ||||
| 	'Passwords do not match' => 'Passwords do not match', | ||||
| 	'Change password' => 'Change password', | ||||
| 	'Done by' => 'Done by', | ||||
| 	'Last done by' => 'Last done by', | ||||
| 	'Unknown' => 'Unknown', | ||||
| 	'Filter by chore' => 'Filter by chore', | ||||
| 	'Chores journal' => 'Chores journal', | ||||
| 	'0 means suggestions for the next charge cycle are disabled' => '0 means suggestions for the next charge cycle are disabled', | ||||
| 	'Charge cycle interval (days)' => 'Charge cycle interval (days)', | ||||
| 	'Last price' => 'Last price', | ||||
| 	'Price history' => 'Price history', | ||||
| 	'No price history available' => 'No price history available', | ||||
| 	'Price' => 'Price', | ||||
| 	'in #1 per purchase quantity unit' => 'in #1 per purchase quantity unit', | ||||
| 	'The price cannot be lower than #1' => 'The price cannot be lower than #1', | ||||
| 	'#1 product expires within the next #2 days' => '#1 product expires within the next #2 days', | ||||
| 	'#1 product is already expired' => '#1 product is already expired', | ||||
| 	'#1 product is below defined min. stock amount' => '#1 product is below defined min. stock amount', | ||||
| 	'Unit' => 'Unit', | ||||
| 	'Units' => 'Units', | ||||
| 	'#1 chore is due to be done within the next #2 days' => '#1 chore is due to be done within the next #2 days', | ||||
| 	'#1 chore is overdue to be done' => '#1 chore is overdue to be done', | ||||
| 	'#1 battery is due to be charged within the next #2 days' => '#1 battery is due to be charged within the next #2 days', | ||||
| 	'#1 battery is overdue to be charged' => '#1 battery is overdue to be charged', | ||||
| 	'#1 unit was automatically added and will apply in addition to the amount entered here' => '#1 unit was automatically added and will apply in addition to the amount entered here', | ||||
| 	'in singular form' => 'in singular form', | ||||
| 	'in plural form' => 'in plural form', | ||||
| 	'Never expires' => 'Never expires', | ||||
| 	'This cannot be lower than #1' => 'This cannot be lower than #1', | ||||
| 	'-1 means that this product never expires' => '-1 means that this product never expires', | ||||
| 	'Quantity unit' => 'Quantity unit', | ||||
| 	'Only check if a single unit is in stock (a different quantity can then be used above)' => 'Only check if a single unit is in stock (a different quantity can then be used above)', | ||||
| 	'Are you sure to consume all ingredients needed by recipe "#1" (ingredients marked with "check only if a single unit is in stock" will be ignored)?' => 'Are you sure to consume all ingredients needed by recipe "#1" (ingredients marked with "check only if a single unit is in stock" will be ignored)?', | ||||
| 	'Removed all ingredients of recipe "#1" from stock' => 'Removed all ingredients of recipe "#1" from stock', | ||||
| 	'Consume all ingredients needed by this recipe' => 'Consume all ingredients needed by this recipe', | ||||
| 	'Click to show technical details' => 'Click to show technical details', | ||||
| 	'Error while saving, probably this item already exists' => 'Error while saving, probably this item already exists', | ||||
| 	'Error details' => 'Error details', | ||||
| 	'Tasks' => 'Tasks', | ||||
| 	'Show done tasks' => 'Show done tasks', | ||||
| 	'Task' => 'Task', | ||||
| 	'Due' => 'Due', | ||||
| 	'Assigned to' => 'Assigned to', | ||||
| 	'Mark task "#1" as completed' => 'Mark task "#1" as completed', | ||||
| 	'Uncategorized' => 'Uncategorized', | ||||
| 	'Task categories' => 'Task categories', | ||||
| 	'Create task' => 'Create task', | ||||
| 	'A due date is required' => 'A due date is required', | ||||
| 	'Category' => 'Category', | ||||
| 	'Edit task' => 'Edit task', | ||||
| 	'Are you sure to delete task "#1"?' => 'Are you sure to delete task "#1"?', | ||||
| 	'#1 task is due to be done within the next #2 days' => '#1 task is due to be done within the next #2 days', | ||||
| 	'#1 tasks are due to be done within the next #2 days' => '#1 tasks are due to be done within the next #2 days', | ||||
| 	'#1 task is overdue to be done' => '#1 task is overdue to be done', | ||||
| 	'#1 tasks are overdue to be done' => '#1 tasks are overdue to be done', | ||||
| 	'Edit task category' => 'Edit task category', | ||||
| 	'Create task category' => 'Create task category', | ||||
| 	'Product groups' => 'Product groups', | ||||
| 	'Ungrouped' => 'Ungrouped', | ||||
| 	'Create product group' => 'Create product group', | ||||
| 	'Edit product group' => 'Edit product group', | ||||
| 	'Product group' => 'Product group', | ||||
| 	'Are you sure to delete product group "#1"?' => 'Are you sure to delete product group "#1"?', | ||||
| 	'Stay logged in permanently' => 'Stay logged in permanently', | ||||
| 	'When not set, you will get logged out at latest after 30 days' => 'When not set, you will get logged out at latest after 30 days', | ||||
| 	'Filter by status' => 'Filter by status', | ||||
| 	'Below min. stock amount' => 'Below min. stock amount', | ||||
| 	'Expiring soon' => 'Expiring soon', | ||||
| 	'Already expired' => 'Already expired', | ||||
| 	'Due soon' => 'Due soon', | ||||
| 	'Overdue' => 'Overdue', | ||||
| 	'View settings' => 'View settings', | ||||
| 	'Auto reload on external changes' => 'Auto reload on external changes', | ||||
| 	'Enable night mode' => 'Enable night mode', | ||||
| 	'Auto enable in time range' => 'Auto enable in time range', | ||||
| 	'From' => 'From', | ||||
| 	'in format' => 'in format', | ||||
| 	'To' => 'To', | ||||
| 	'Time range goes over midnight' => 'Time range goes over midnight', | ||||
| 	'Product picture' => 'Product picture', | ||||
| 	'No file selected' => 'No file selected', | ||||
| 	'If you don\'t select a file, the current picture will not be altered' => 'If you don\'t select a file, the current picture will not be altered', | ||||
| 	'Current picture' => 'Current picture', | ||||
| 	'Delete' => 'Delete', | ||||
| 	'The current picture will be deleted when you save the product' => 'The current picture will be deleted when you save the product', | ||||
| 	'Select file' => 'Select file', | ||||
| 	'Image of product #1' => 'Image of product #1', | ||||
| 	'This product cannot be deleted because it is in stock, please remove the stock amount first.' => 'This product cannot be deleted because it is in stock, please remove the stock amount first.', | ||||
| 	'Delete not possible' => 'Delete not possible', | ||||
| 	'Equipment' => 'Equipment', | ||||
| 	'Instruction manual' => 'Instruction manual', | ||||
| 	'The selected equipment has no instruction manual' => 'The selected equipment has no instruction manual', | ||||
| 	'Notes' => 'Notes', | ||||
| 	'Edit equipment' => 'Edit equipment', | ||||
| 	'Create equipment' => 'Create equipment', | ||||
| 	'If you don\'t select a file, the current instruction manual will not be altered' => 'If you don\'t select a file, the current instruction manual will not be altered', | ||||
| 	'Current instruction manual' => 'Current instruction manual', | ||||
| 	'No instruction manual available' => 'No instruction manual available', | ||||
| 	'The current instruction manual will be deleted when you save the equipment' => 'The current instruction manual will be deleted when you save the equipment', | ||||
| 	'No picture available' => 'No picture available', | ||||
| 	'Filter by product group' => 'Filter by product group', | ||||
| 	'Presets for new products' => 'Presets for new products', | ||||
| 	'Included recipes' => 'Included recipes', | ||||
| 	'A recipe is required' => 'A recipe is required', | ||||
| 	'Add included recipe' => 'Add included recipe', | ||||
| 	'Edit included recipe' => 'Edit included recipe', | ||||
| 	'Group' => 'Group', | ||||
| 	'This will be used as a headline to group ingredients together' => 'This will be used as a headline to group ingredients together', | ||||
| 	'Journal' => 'Journal', | ||||
| 	'Stock journal' => 'Stock journal', | ||||
| 	'Filter by product' => 'Filter by product', | ||||
| 	'Booking time' => 'Booking time', | ||||
| 	'Booking type' => 'Booking type', | ||||
| 	'Undo booking' => 'Undo booking', | ||||
| 	'Undone on' => 'Undone on', | ||||
| 	'Batteries journal' => 'Batteries journal', | ||||
| 	'Filter by battery' => 'Filter by battery', | ||||
| 	'Undo charge cycle' => 'Undo charge cycle', | ||||
| 	'Undo chore execution' => 'Undo chore execution', | ||||
| 	'Chore execution successfully undone' => 'Chore execution successfully undone', | ||||
| 	'Undo' => 'Undo', | ||||
| 	'Booking successfully undone' => 'Booking successfully undone', | ||||
| 	'Charge cycle successfully undone' => 'Charge cycle successfully undone', | ||||
| 	'This cannot be negative and must be an integral number' => 'This cannot be negative and must be an integral number', | ||||
| 	'Disable stock fulfillment checking for this ingredient' => 'Disable stock fulfillment checking for this ingredient', | ||||
| 	'Add all list items to stock' => 'Add all list items to stock', | ||||
| 	'Add #3 #1 of #2 to stock' => 'Add #3 #1 of #2 to stock', | ||||
| 	'Adding shopping list item #1 of #2' => 'Adding shopping list item #1 of #2', | ||||
| 	'Use a specific stock item' => 'Use a specific stock item', | ||||
| 	'The first item in this list would be picked by the default rule which is "First expiring first, then first in first out"' => 'The first item in this list would be picked by the default rule which is "First expiring first, then first in first out"', | ||||
| 	'Mark #3 #1 of #2 as open' => 'Mark #3 #1 of #2 as open', | ||||
| 	'When a product was marked as opened, the best before date will be replaced by today + this amount of days (a value of 0 disables this)' => 'When a product was marked as opened, the best before date will be replaced by today + this amount of days (a value of 0 disables this)', | ||||
| 	'Default best before days after opened' => 'Default best before days after opened', | ||||
| 	'Marked #1 #2 of #3 as opened' => 'Marked #1 #2 of #3 as opened', | ||||
| 	'Mark as opened' => 'Mark as opened', | ||||
| 	'Expires on #1; Bought on #2' => 'Expires on #1; Bought on #2', | ||||
| 	'Not opened' => 'Not opened', | ||||
| 	'Opened' => 'Opened', | ||||
| 	'Mark #3 #1 of #2 as open' => 'Mark #3 #1 of #2 as open', | ||||
| 	'#1 opened' => '#1 opened', | ||||
| 	'Product expires' => 'Product expires', | ||||
| 	'Task due' => 'Task due', | ||||
| 	'Chore due' => 'Chore due', | ||||
| 	'Battery charge cycle due' => 'Battery charge cycle due', | ||||
| 	'Show clock in header' => 'Show clock in header', | ||||
| 	'Stock settings' => 'Stock settings', | ||||
| 	'Shopping list to stock workflow' => 'Shopping list to stock workflow', | ||||
| 	'Automatically do the booking using the last price and the amount of the shopping list item, if the product has "Default best before days" set' => 'Automatically do the booking using the last price and the amount of the shopping list item, if the product has "Default best before days" set', | ||||
| 	'Skip' => 'Skip' | ||||
| ); | ||||
							
								
								
									
										6
									
								
								localization/no/chore_types.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								localization/no/chore_types.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | ||||
| <?php | ||||
|  | ||||
| return array( | ||||
| 	'manually' => 'Manuel', | ||||
| 	'dynamic-regular' => 'Automatisk' | ||||
| ); | ||||
							
								
								
									
										10
									
								
								localization/no/component_translations.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								localization/no/component_translations.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,10 @@ | ||||
| <?php | ||||
|  | ||||
| return array( | ||||
| 	'timeago_locale' => 'no', | ||||
| 	'timeago_nan' => 'for NaN År', | ||||
| 	'moment_locale' => 'nb', | ||||
| 	'datatables_localization' => '{"sEmptyTable":"Det finnes ingen data i tabellen","sInfo":"_START_ fra _END_ til _TOTAL_ skriv","sInfoEmpty":"Ingen data tilgjengelign","sInfoFiltered":"(filtrert fra _MAX_ skriv)","sInfoPostFix":"","sInfoThousands":".","sLengthMenu":"_MENU_ registrer deg","sLoadingRecords":"Laster ..","sProcessing":"Vennligst vent ..","sSearch":"Søk","sZeroRecords":"Ingen oppføringer tilgjengelig","oPaginate":{"sFirst":"Første","sPrevious":"Bakover","sNext":"Neste","sLast":"Siste"},"oAria":{"sSortAscending":": Sortér stigende","sSortDescending":": Sortér synkende"},"select":{"rows":{"0":"klikk på en linje for å velge","1":"1 linje valgt","_":"%d linger valgt"}},"buttons":{"print":"Print","colvis":"Søyle","copy":"Kopi","copyTitle":"Kopier til utklippstavlen","copyKeys":"Trykk <i>ctrl</i> eller <i>⌘</i> + <i>C</i> for å kopiere tabell<br> til utklipptavlen.<br><br>For å avbryte, klikke på meldingen eller trykk på ESC.","copySuccess":{"1":"1 Kolonne kopiert","_":"%d kolonne kopiert"}}}', | ||||
| 	'summernote_locale' => 'nb-NO', | ||||
| 	'fullcalendar_locale' => 'nb' | ||||
| ); | ||||
							
								
								
									
										87
									
								
								localization/no/demo_data.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										87
									
								
								localization/no/demo_data.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,87 @@ | ||||
| <?php | ||||
|  | ||||
| return array( | ||||
| 	'Cookies' => 'Cookies', | ||||
| 	'Chocolate' => 'Sjokolade', | ||||
| 	'Pantry' => 'Spiskammers', | ||||
| 	'Candy cupboard' => 'Godteriskapet', | ||||
| 	'Tinned food cupboard' => 'Boksematskapet', | ||||
| 	'Fridge' => 'Kjøleskapet', | ||||
| 	'Piece' => 'Ett', | ||||
| 	'Pieces' => 'Flere', | ||||
| 	'Pack' => 'Pakke', | ||||
| 	'Packs' => 'Pakker', | ||||
| 	'Glass' => 'Glass', | ||||
| 	'Glasses' => 'Glass', | ||||
| 	'Tin' => 'Hermetikkboks', | ||||
| 	'Tins' => 'Hermetikkbokser', | ||||
| 	'Can' => 'Boks', | ||||
| 	'Cans' => 'Bokser', | ||||
| 	'Bunch' => 'Klase', | ||||
| 	'Bunches' => 'Klaser', | ||||
| 	'Gummy bears' => 'Vingummibjørner', | ||||
| 	'Crisps' => 'Chips', | ||||
| 	'Eggs' => 'Egg', | ||||
| 	'Noodles' => 'Nuddler', | ||||
| 	'Pickles' => 'Sur agurk', | ||||
| 	'Gulash soup' => 'Gulasj suppe', | ||||
| 	'Yogurt' => 'Yoghurt', | ||||
| 	'Cheese' => 'Ost', | ||||
| 	'Cold cuts' => 'Kjøttpålegg', | ||||
| 	'Paprika' => 'Paprika', | ||||
| 	'Cucumber' => 'Agurk', | ||||
| 	'Radish' => 'Reddik', | ||||
| 	'Tomato' => 'Tomat', | ||||
| 	'Changed towels in the bathroom' => 'Bytt handklær på badet', | ||||
| 	'Cleaned the kitchen floor' => 'Vasket kjøkkengulvet', | ||||
| 	'Warranty ends' => 'Garanti utgår', | ||||
| 	'TV remote control' => 'Fjernkontroll for TV', | ||||
| 	'Alarm clock' => 'Alarmklokke', | ||||
| 	'Heat remote control' => 'Fjernkontroll for termostat', | ||||
| 	'Lawn mowed in the garden' => 'Kuttet gresset i hagen', | ||||
| 	'Some good snacks' => 'Noen gode snacks', | ||||
| 	'Pizza dough' => 'Pizzadeig', | ||||
| 	'Sieved tomatoes' => 'Tomatpuré', | ||||
| 	'Salami' => 'Salami', | ||||
| 	'Toast' => 'Ristet brød', | ||||
| 	'Minced meat' => 'Kjøttdeig', | ||||
| 	'Pizza' => 'Pizza', | ||||
| 	'Spaghetti bolognese' => 'Spaghetti Bolognese', | ||||
| 	'Sandwiches' => 'Smørbrød', | ||||
| 	'English' => 'Engelsk', | ||||
| 	'German' => 'Tysk', | ||||
| 	'Italian' => 'Italiensk', | ||||
| 	'Demo in different language' => 'Demo i annet språk', | ||||
| 	'This is the note content of the recipe ingredient' => 'Dette er notisen for ingrediensen i oppskriften', | ||||
| 	'Demo User' => 'Demo Bruker', | ||||
| 	'Gram' => 'Gram', | ||||
| 	'Grams' => 'Gram', | ||||
| 	'Flour' => 'Mel', | ||||
| 	'Pancakes' => 'Pannekaker', | ||||
| 	'Sugar' => 'Sukker', | ||||
| 	'Home' => 'Hus', | ||||
| 	'Life' => 'Livstil', | ||||
| 	'Projects' => 'Projekter', | ||||
| 	'Repair the garage door' => 'Reparere garasjedøren', | ||||
| 	'Fork and improve grocy' => 'Fork og forbedre grocy', | ||||
| 	'Find a solution for what to do when I forget the door keys' => 'Finne på løsning for hva jeg skal gjøre når jeg mister dørnøklene', | ||||
| 	'Sweets' => 'Godteri', | ||||
| 	'Bakery products' => 'Bakevarer', | ||||
| 	'Tinned food' => 'Boksemat', | ||||
| 	'Butchery products' => 'Kjøtt/ Ferskvare', | ||||
| 	'Vegetables/Fruits' => 'Frukt/ Grønnsaker', | ||||
| 	'Refrigerated products' => 'Frysedisk', | ||||
| 	'Coffee machine' => 'Kaffetrakter', | ||||
| 	'Dishwasher' => 'Oppvaskmaskin', | ||||
| 	'Liter' => 'Liter', | ||||
| 	'Liters' => 'Liter', | ||||
| 	'Bottle' => 'Flaske', | ||||
| 	'Bottles' => 'Flasker', | ||||
| 	'Milk' => 'Melk', | ||||
| 	'Chocolate sauce' => 'Sjokoladesaus', | ||||
| 	'Milliliters' => 'Milliliter', | ||||
| 	'Milliliter' => 'Milliliter', | ||||
| 	'Bottom' => 'Bunn', | ||||
| 	'Topping' => 'Topping', | ||||
| 	'French' => 'Fransk' | ||||
| ); | ||||
							
								
								
									
										8
									
								
								localization/no/stock_transaction_types.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								localization/no/stock_transaction_types.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| <?php | ||||
|  | ||||
| return array( | ||||
| 	'purchase' => 'Innkjøp', | ||||
| 	'consume' => 'Forbruke produkt', | ||||
| 	'inventory-correction' => 'Korreksjon av husholdningsantall ', | ||||
| 	'product-opened' => 'Produkt åpnet' | ||||
| ); | ||||
							
								
								
									
										330
									
								
								localization/no/strings.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										330
									
								
								localization/no/strings.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,330 @@ | ||||
| <?php | ||||
|  | ||||
| return array( | ||||
| 	'Stock overview' => 'Husholdning', | ||||
| 	'#1 products expiring within the next #2 days' => '#1 Produkt som går ut på dato innen de neste #2 dagene', | ||||
| 	'#1 products are already expired' => '#1 Produkt som har gått ut på dato', | ||||
| 	'#1 products are below defined min. stock amount' => '#1 Produkt under minimum husholdningsnivå', | ||||
| 	'Product' => 'Produkt', | ||||
| 	'Amount' => 'Antall', | ||||
| 	'Next best before date' => 'Kommende best før dato', | ||||
| 	'Logout' => 'Logg ut', | ||||
| 	'Chores overview' => 'Oversikt husarbeid', | ||||
| 	'Batteries overview' => 'Oversikt batteri', | ||||
| 	'Purchase' => 'Innkjøp', | ||||
| 	'Consume' => 'Forbruk produkt', | ||||
| 	'Inventory' => 'Endre husholdning', | ||||
| 	'Shopping list' => 'Handleliste', | ||||
| 	'Chore tracking' => 'Logge husarbeid', | ||||
| 	'Battery tracking' => 'Batteri ladesyklus', | ||||
| 	'Products' => 'Produkter', | ||||
| 	'Locations' => 'Lokasjoner', | ||||
| 	'Quantity units' => 'Forpakning', | ||||
| 	'Chores' => 'Husarbeid', | ||||
| 	'Batteries' => 'Batterier', | ||||
| 	'Chore' => 'Husarbeid', | ||||
| 	'Next estimated tracking' => 'Neste handling', | ||||
| 	'Last tracked' => 'Sist logget', | ||||
| 	'Battery' => 'Batteri', | ||||
| 	'Last charged' => 'Sist ladet', | ||||
| 	'Next planned charge cycle' => 'Neste planlagte ladesyklus', | ||||
| 	'Best before' => 'Best før', | ||||
| 	'OK' => 'OK', | ||||
| 	'Product overview' => 'Produkt oversikt', | ||||
| 	'Stock quantity unit' => 'Forpakningstype i husholdningen', | ||||
| 	'Stock amount' => 'Husholdning', | ||||
| 	'Last purchased' => 'Sist kjøpt', | ||||
| 	'Last used' => 'Sist brukt', | ||||
| 	'Spoiled' => 'Produkt har gått ut på dato', | ||||
| 	'Barcode lookup is disabled' => 'Strekkodesøk deaktivert', | ||||
| 	'will be added to the list of barcodes for the selected product on submit' => 'Blir lagt til liste over strekkoder når produkt blir lagt inn.', | ||||
| 	'New amount' => 'Nytt antall', | ||||
| 	'Note' => 'Info', | ||||
| 	'Tracked time' => 'Tid utført/ ladet', | ||||
| 	'Chore overview' => 'Oversikt husarbeid', | ||||
| 	'Tracked count' => 'Antall utførelser/ ladninger', | ||||
| 	'Battery overview' => 'Batteri oversikt', | ||||
| 	'Charge cycles count' => 'Antall ladesykluser', | ||||
| 	'Create shopping list item' => 'Opprett handelisteoppføring', | ||||
| 	'Edit shopping list item' => 'Endre på handlelistoppføring', | ||||
| 	'#1 units were automatically added and will apply in addition to the amount entered here' => '#1 enheter ble automatisk lagt til i tillegg til hva som blir skrevet inn her', | ||||
| 	'Save' => 'Lagre', | ||||
| 	'Add' => 'Legg til', | ||||
| 	'Name' => 'Navn', | ||||
| 	'Location' => 'Lokasjon', | ||||
| 	'Min. stock amount' => 'Minimumsantall for husholdningen', | ||||
| 	'QU purchase' => 'Forpakingsfaktor innkjøp', | ||||
| 	'QU stock' => 'Forpakingsfaktor husholdning', | ||||
| 	'QU factor' => 'Forpakingsfaktor', | ||||
| 	'Description' => 'Beskrivelse', | ||||
| 	'Create product' => 'Opprett produkt', | ||||
| 	'Barcode(s)' => 'Strekkode(r)', | ||||
| 	'Minimum stock amount' => 'Minimumsantall for husholdningen', | ||||
| 	'Default best before days' => 'Standard for antall dager best før', | ||||
| 	'Quantity unit purchase' => 'Forpakning kjøpt', | ||||
| 	'Quantity unit stock' => 'Forpakning husholdning', | ||||
| 	'Factor purchase to stock quantity unit' => 'Innkjøpsfaktor for forpakning', | ||||
| 	'Create location' => 'Opprett lokasjon', | ||||
| 	'Create quantity unit' => 'Opprett forpakning', | ||||
| 	'Period type' => 'Gjentakelse', | ||||
| 	'Period days' => 'Antall dager for gjentakelse', | ||||
| 	'Create chore' => 'Opprett husarbeid oppgave', | ||||
| 	'Used in' => 'Brukt', | ||||
| 	'Create battery' => 'Opprett batteri', | ||||
| 	'Edit battery' => 'Endre batteri', | ||||
| 	'Edit chore' => 'Endre husarbeid oppgave', | ||||
| 	'Edit quantity unit' => 'Endre forpakning', | ||||
| 	'Edit product' => 'Endre produkt', | ||||
| 	'Edit location' => 'Endre lokasjon', | ||||
| 	'Record data' => 'Logg handlinger', | ||||
| 	'Manage master data' => 'Administrer masterdata', | ||||
| 	'This will apply to added products' => 'Dette vil gjelde for produkt som blir lagt til', | ||||
| 	'never' => 'aldri', | ||||
| 	'Add products that are below defined min. stock amount' => 'Legg til produkt som er under minimumsnivå for husholdningen', | ||||
| 	'For purchases this amount of days will be added to today for the best before date suggestion' => 'Når innkjøp gjøres vil dette bli brukt som antall dager "best før"', | ||||
| 	'This means 1 #1 purchased will be converted into #2 #3 in stock' => 'Dette betyr at 1 #1 innkjøp vil bli omgjort til #2 #3 husholdning', | ||||
| 	'Login' => 'Logg inn', | ||||
| 	'Username' => 'Brukernavn', | ||||
| 	'Password' => 'Passord', | ||||
| 	'Invalid credentials, please try again' => 'Feil brukernavn og/eller passord, prøv igjen', | ||||
| 	'Are you sure to delete battery "#1"?' => 'Er du sikker du ønsker å slette batteri "#1"?', | ||||
| 	'Yes' => 'Ja', | ||||
| 	'No' => 'Nei', | ||||
| 	'Are you sure to delete chore "#1"?' => 'Er du sikker på du ønsker å slette husarbeid oppgave "#1"?', | ||||
| 	'"#1" could not be resolved to a product, how do you want to proceed?' => '"#1" kunne ikke bli tildelt et produkt, hvordan ønsker du å fortsette?', | ||||
| 	'Create or assign product' => 'Opprett eller tildel til et produkt', | ||||
| 	'Cancel' => 'Avbryt', | ||||
| 	'Add as new product' => 'Legg til som nytt produkt', | ||||
| 	'Add as barcode to existing product' => 'Legg til strekkode til allerede eksisterende produkt', | ||||
| 	'Add as new product and prefill barcode' => 'Legg til som nytt produkt med forhåndsfylt strekkode', | ||||
| 	'Are you sure to delete quantity unit "#1"?' => 'Er du sikker du ønsker å slette forpakning "#1"?', | ||||
| 	'Are you sure to delete product "#1"?' => 'Er du sikker du ønsker å slette produkt "#1"?', | ||||
| 	'Are you sure to delete location "#1"?' => 'Er du sikker du ønsker å slette lokasjon "#1"?', | ||||
| 	'Manage API keys' => 'Administrer API-Keys', | ||||
| 	'REST API & data model documentation' => 'REST-API & Datamodell Dokumentasjon', | ||||
| 	'API keys' => 'API-Keys', | ||||
| 	'Create new API key' => 'Opprett ny API-Key', | ||||
| 	'API key' => 'API-Key', | ||||
| 	'Expires' => 'Går ut', | ||||
| 	'Created' => 'Opprettet', | ||||
| 	'This product is not in stock' => 'Dette produktet er ikke i husholdningen', | ||||
| 	'This means #1 will be added to stock' => 'Dette betyr at #1 vil bli lagt til i husholdningen', | ||||
| 	'This means #1 will be removed from stock' => 'Dette betyr at #1 vil bli fjernet fra husholdningen', | ||||
| 	'This means it is estimated that a new execution of this chore is tracked #1 days after the last was tracked' => 'Dette betyr at det er estimert at den nye utførelsen av denne husarbeid oppgaven er logget #1 dag etter den sist var logget', | ||||
| 	'Removed #1 #2 of #3 from stock' => 'Fjernet #1 #2 #3 fra husholdningen', | ||||
| 	'About grocy' => 'Om Grocy', | ||||
| 	'Close' => 'Lukk', | ||||
| 	'#1 batteries are due to be charged within the next #2 days' => '#1 batteri må lades innen de #2 neste dagene', | ||||
| 	'#1 batteries are overdue to be charged' => '#1 batteri har gått over fristen for å bli ladet opp', | ||||
| 	'#1 chores are due to be done within the next #2 days' => '#1 husarbeids oppgaver skal gjøres inne de #2 neste dagene', | ||||
| 	'#1 chores are overdue to be done' => '#1 husarbeids oppgaver har gått over fristen for utførelse', | ||||
| 	'Released on' => 'Utgitt', | ||||
| 	'Consume #3 #1 of #2' => 'Forbruk #3 #1 av #2', | ||||
| 	'Added #1 #2 of #3 to stock' => '#1 #2 #3 lagt til i husholdningen', | ||||
| 	'Stock amount of #1 is now #2 #3' => 'Husholdning antall #1 er nå #2 #3', | ||||
| 	'Tracked execution of chore #1 on #2' => 'Utførte husarbeid oppgave "#1" den #2', | ||||
| 	'Tracked charge cycle of battery #1 on #2' => 'Ladet #1 den #2', | ||||
| 	'Consume all #1 which are currently in stock' => 'Forbruk alle #1 som er i husholdningen', | ||||
| 	'All' => 'Alle', | ||||
| 	'Track charge cycle of battery #1' => '#1 ladet', | ||||
| 	'Track execution of chore #1' => 'Utfør husarbeidsoppgave "#1"', | ||||
| 	'Filter by location' => 'Filtrér etter lokasjon', | ||||
| 	'Search' => 'Søk', | ||||
| 	'Not logged in' => 'Ikke logget inn', | ||||
| 	'You have to select a product' => 'Du må velge et produkt', | ||||
| 	'You have to select a chore' => 'Du må velge en husarbeids oppgave', | ||||
| 	'You have to select a battery' => 'Du må velge et batteri', | ||||
| 	'A name is required' => 'Vennligst fyll inn et navn', | ||||
| 	'A location is required' => 'En lokasjon kreves', | ||||
| 	'The amount cannot be lower than #1' => 'Antallet kan ikke være lavere enn #1', | ||||
| 	'This cannot be negative' => 'Dette kan ikke være negativt', | ||||
| 	'A quantity unit is required' => 'Forpakning antall/størrelse kreves', | ||||
| 	'A period type is required' => 'En periodetype kreves', | ||||
| 	'A best before date is required and must be later than today' => 'En best før dato kreves, denne må være senere enn i dag', | ||||
| 	'Settings' => 'Innstillinger', | ||||
| 	'This can only be before now' => 'Dette kan kun være før nå', | ||||
| 	'Calendar' => 'Kalender', | ||||
| 	'Recipes' => 'Oppskrifter', | ||||
| 	'Edit recipe' => 'Endre oppskrift', | ||||
| 	'New recipe' => 'Ny oppskrift', | ||||
| 	'Ingredients list' => 'Liste over ingredienser', | ||||
| 	'Add recipe ingredient' => 'Legg ingrediens til oppskrift', | ||||
| 	'Edit recipe ingredient' => 'Endre ingrediens i oppskrift', | ||||
| 	'Are you sure to delete recipe "#1"?' => 'Er du sikker du ønsker å slette oppskrift "#1"?', | ||||
| 	'Are you sure to delete recipe ingredient "#1"?' => 'Er du sikker du ønsker å slette ingrediens "#1" fra oppskriften?', | ||||
| 	'Are you sure to empty the shopping list?' => 'Er du sikker du ønsker å slette handlelisten?', | ||||
| 	'Clear list' => 'Slett handleliste', | ||||
| 	'Requirements fulfilled' => 'Har jeg alt jeg trenger for denne oppskriften?', | ||||
| 	'Put missing products on shopping list' => 'Legg manglende produkter til handlelisten', | ||||
| 	'Not enough in stock, #1 ingredients missing' => 'Ikke nok i husholdningen, #1 ingrediens(er) mangler', | ||||
| 	'Enough in stock' => 'Nok i husholdningen', | ||||
| 	'Not enough in stock, #1 ingredients missing but already on the shopping list' => 'Ikke nok i husholdningen, #1 ingrediens(er) mangler, men denne/disse er på handlelisten', | ||||
| 	'Expand to fullscreen' => 'Full skjerm', | ||||
| 	'Ingredients' => 'Ingredienser', | ||||
| 	'Preparation' => 'Forberedelse / Slik gjør du', | ||||
| 	'Recipe' => 'Oppskrift', | ||||
| 	'Not enough in stock, #1 missing, #2 already on shopping list' => 'Ikke nok i husholdningen, mangler #1, er #2 på handlelisten', | ||||
| 	'Show notes' => 'Vis notater', | ||||
| 	'Put missing amount on shopping list' => 'Legg manglende til handlelisten', | ||||
| 	'Are you sure to put all missing ingredients for recipe "#1" on the shopping list?' => 'Er du sikker du ønsker å legge alle manglende ingredienser for oppskrift "#1" i handlelisten?', | ||||
| 	'Added for recipe #1' => 'Lagt til fra oppskrift "#1"', | ||||
| 	'Manage users' => 'Administrer brukere', | ||||
| 	'User' => 'Bruker', | ||||
| 	'Users' => 'Brukere', | ||||
| 	'Are you sure to delete user "#1"?' => 'Er du sikker på du ønsker å slette bruker, "#1"?', | ||||
| 	'Create user' => 'Legg til bruker', | ||||
| 	'Edit user' => 'Endre på bruker', | ||||
| 	'First name' => 'Fornavn', | ||||
| 	'Last name' => 'Etternavn', | ||||
| 	'A username is required' => 'Et brukernavn er nødvendig', | ||||
| 	'Confirm password' => 'Bekreft passord', | ||||
| 	'Passwords do not match' => 'Passord er ikke like', | ||||
| 	'Change password' => 'Endre passord', | ||||
| 	'Done by' => 'Utført av', | ||||
| 	'Last done by' => 'Sist utført av', | ||||
| 	'Unknown' => 'Ukjent', | ||||
| 	'Filter by chore' => 'Filtrér husarbeid', | ||||
| 	'Chores journal' => 'Statistikk husarbeid', | ||||
| 	'0 means suggestions for the next charge cycle are disabled' => '0 betyr neste ladesyklus er avslått', | ||||
| 	'Charge cycle interval (days)' => 'Ladesyklysintervall (dager)', | ||||
| 	'Last price' => 'Siste pris', | ||||
| 	'Price history' => 'Prishistorikk', | ||||
| 	'No price history available' => 'Ingen prishistorikk tilgjengelig', | ||||
| 	'Price' => 'Pris', | ||||
| 	'in #1 per purchase quantity unit' => 'I #1 per kjøpt forpakning ', | ||||
| 	'The price cannot be lower than #1' => 'Prisen kan ikke være lavere enn #1', | ||||
| 	'#1 product expires within the next #2 days' => '#1 Produkt går ut på dato innen de #2  neste dagene', | ||||
| 	'#1 product is already expired' => '#1 Produkt er allerede gått ut på dato', | ||||
| 	'#1 product is below defined min. stock amount' => '#1 Produkt er under minimums husholdningsnivå', | ||||
| 	'Unit' => 'Enhet', | ||||
| 	'Units' => 'Enheter', | ||||
| 	'#1 chore is due to be done within the next #2 days' => '#1 husarbeid oppgave skal gjøres inne de #2 neste dagene', | ||||
| 	'#1 chore is overdue to be done' => '#1 husarbeid oppgave har gått over fristen for utførelse', | ||||
| 	'#1 battery is due to be charged within the next #2 days' => '#1 Batteri må lades innen #2 dager', | ||||
| 	'#1 battery is overdue to be charged' => '#1 Batteri har gått over fristen for å lades', | ||||
| 	'#1 unit was automatically added and will apply in addition to the amount entered here' => '#1 enhet ble automatisk lagt til i tillegg til hva som blir skrevet inn her', | ||||
| 	'in singular form' => 'I entall', | ||||
| 	'in plural form' => 'I flertall', | ||||
| 	'Never expires' => 'Går ikke ut på dato', | ||||
| 	'This cannot be lower than #1' => 'Dette kan ikke være lavere enn #1', | ||||
| 	'-1 means that this product never expires' => 'Ved å skrive -1 vil produktet ikke gå ut på dato', | ||||
| 	'Quantity unit' => 'Forpakning', | ||||
| 	'Only check if a single unit is in stock (a different quantity can then be used above)' => 'Ønsker du å bruke mindre/større enn normal forpakningsstørrelse?', | ||||
| 	'Are you sure to consume all ingredients needed by recipe "#1" (ingredients marked with "check only if a single unit is in stock" will be ignored)?' => 'Er du sikker du ønsker å forbruke alle ingredienser for "#1" oppskriften? (Ingredienser merket med "Ønsker du å bruke mindre/større enn normal forpakningsstørrelse??" blir ignorert', | ||||
| 	'Removed all ingredients of recipe "#1" from stock' => 'Fjern alle ingredienser for "#1" oppskriften fra husholdningen.', | ||||
| 	'Consume all ingredients needed by this recipe' => 'Forbruk alle ingredienser for denne oppskriften', | ||||
| 	'Click to show technical details' => 'Klikk for å vise teknisk informasjon', | ||||
| 	'Error while saving, probably this item already exists' => 'Kunne ikke lagre, produkt er lagt til fra før', | ||||
| 	'Error details' => 'Detaljer om feil', | ||||
| 	'Tasks' => 'Oppgaver', | ||||
| 	'Show done tasks' => 'Vis ferdige oppgaver', | ||||
| 	'Task' => 'Oppgave', | ||||
| 	'Due' => 'Forfall', | ||||
| 	'Assigned to' => 'Tildelt', | ||||
| 	'Mark task "#1" as completed' => 'Merk oppgave "#1" som ferdig', | ||||
| 	'Uncategorized' => 'Mangler kategori', | ||||
| 	'Task categories' => 'Oppgave kategorier', | ||||
| 	'Create task' => 'Opprett en oppgave', | ||||
| 	'A due date is required' => 'En forfallsdato kreves', | ||||
| 	'Category' => 'Kategori', | ||||
| 	'Edit task' => 'Endre oppgave', | ||||
| 	'Are you sure to delete task "#1"?' => 'Er du sikker du ønsker slette oppgave "#1"?', | ||||
| 	'#1 task is due to be done within the next #2 days' => '#1 oppgave har utførelse forfall innen de neste #2 dagene', | ||||
| 	'#1 tasks are due to be done within the next #2 days' => '#1 oppgaver har utførelse forfall innen de neste #2 dagene', | ||||
| 	'#1 task is overdue to be done' => '#1 oppgave har forfalt utførelse dato', | ||||
| 	'#1 tasks are overdue to be done' => '#1 oppgaver har forfalt utførelse dato', | ||||
| 	'Edit task category' => 'Endre oppgave kategori', | ||||
| 	'Create task category' => 'Opprett oppgave kategori', | ||||
| 	'Product groups' => 'Produktgrupper', | ||||
| 	'Ungrouped' => 'Mangler gruppe', | ||||
| 	'Create product group' => 'Opprett produkt gruppe', | ||||
| 	'Edit product group' => 'Endre produkt gruppe', | ||||
| 	'Product group' => 'Produktgruppe', | ||||
| 	'Are you sure to delete product group "#1"?' => 'Er du sikker du ønsker å slette produktgruppe "#1"?', | ||||
| 	'Stay logged in permanently' => 'Alltid være innlogget', | ||||
| 	'When not set, you will get logged out at latest after 30 days' => 'Når den ikke er satt vil du bli logget ut etter 30 dager', | ||||
| 	'Filter by status' => 'Filtrér etter status', | ||||
| 	'Below min. stock amount' => 'Under under minimum husholdningsnivå', | ||||
| 	'Expiring soon' => 'Går snart ut på dato', | ||||
| 	'Already expired' => 'Utgått på dato', | ||||
| 	'Due soon' => 'Forfaller snart', | ||||
| 	'Overdue' => 'Forfalt', | ||||
| 	'View settings' => 'Se instillinger', | ||||
| 	'Auto reload on external changes' => 'Automatisk fornying ved ekstern endring', | ||||
| 	'Enable night mode' => 'Aktiver nattmodus', | ||||
| 	'Auto enable in time range' => 'Automatisk aktivering i tidsrommet', | ||||
| 	'From' => 'Fra', | ||||
| 	'in format' => 'format', | ||||
| 	'To' => 'Til', | ||||
| 	'Time range goes over midnight' => 'Tidsrommet går over midnatt', | ||||
| 	'Product picture' => 'Produktbilde', | ||||
| 	'No file selected' => 'Produktbilde ikke valgt', | ||||
| 	'If you don\'t select a file, the current picture will not be altered' => 'Hvis du ikke velger et bilde, vil nåværende produktbilde bli værende', | ||||
| 	'Current picture' => 'Nåværende produktbilde', | ||||
| 	'Delete' => 'Slett', | ||||
| 	'The current picture will be deleted when you save the product' => 'Nåværende produktbilde vil bli slettet når du lagrer produktet', | ||||
| 	'Select file' => 'Velg produktbilde', | ||||
| 	'Image of product #1' => 'Bilde av produkt #1', | ||||
| 	'This product cannot be deleted because it is in stock, please remove the stock amount first.' => 'Dette produktet kan ikke slettes fordi det er gjenværende produkter i husholdningen', | ||||
| 	'Delete not possible' => 'Ikke mulig å slette', | ||||
| 	'Equipment' => 'Instruksjonmanualer', | ||||
| 	'Instruction manual' => 'Instruksjonsmanual', | ||||
| 	'The selected equipment has no instruction manual' => 'Merket utstyr har ingen instruksjonsmanual', | ||||
| 	'Notes' => 'Notater', | ||||
| 	'Edit equipment' => 'Endre instruksjonmanualer for utstyr', | ||||
| 	'Create equipment' => 'Opprett instruksjonmanualer for utstyr', | ||||
| 	'If you don\'t select a file, the current instruction manual will not be altered' => 'Hvis du ikke velger en instruksjonsmanual, vil nåværende instruksjonsmanual ikke bli endret', | ||||
| 	'Current instruction manual' => 'Nåværende instruksjonsmanual', | ||||
| 	'No instruction manual available' => 'Ingen instruksjonsmanual tilgjengelig', | ||||
| 	'The current instruction manual will be deleted when you save the equipment' => 'Nåværende instruksjonsmanual vil bli slettet når du lagrer utstyret', | ||||
| 	'No picture available' => 'Ingen bilde tilgjengelig', | ||||
| 	'Filter by product group' => 'Filtrér etter produktgruppe', | ||||
| 	'Presets for new products' => 'Standard for nye produkter', | ||||
| 	'Included recipes' => 'Inkludert oppskrift', | ||||
| 	'A recipe is required' => 'En oppskrift kreves', | ||||
| 	'Add included recipe' => 'Legg til inkludert oppskrift', | ||||
| 	'Edit included recipe' => 'Endre inkludert oppskrift', | ||||
| 	'Group' => 'Gruppe', | ||||
| 	'This will be used as a headline to group ingredients together' => 'Dette vil bli brukt som overskrift for gruppering av ingredienser', | ||||
| 	'Journal' => 'Logg', | ||||
| 	'Stock journal' => 'Husholdningslogg', | ||||
| 	'Filter by product' => 'Filtrér etter produkt', | ||||
| 	'Booking time' => 'Tid logget', | ||||
| 	'Booking type' => 'Booking type', | ||||
| 	'Undo booking' => 'Angre booking', | ||||
| 	'Undone on' => 'Angret den', | ||||
| 	'Batteries journal' => 'Batterilogg', | ||||
| 	'Filter by battery' => 'Filtrér etter batteri', | ||||
| 	'Undo charge cycle' => 'Angre ladesyklus', | ||||
| 	'Undo chore execution' => 'Fjerne utførelse av husarbeidsoppgave', | ||||
| 	'Chore execution successfully undone' => 'Husarbeid fjernet', | ||||
| 	'Undo' => 'Angre', | ||||
| 	'Booking successfully undone' => 'Booking fjernet', | ||||
| 	'Charge cycle successfully undone' => 'Ladesyklus fjernet', | ||||
| 	'This cannot be negative and must be an integral number' => 'Tallet kan ikke være negativ og må være et helt tall', | ||||
| 	'Disable stock fulfillment checking for this ingredient' => 'Ikke bruk husholdningsjekk for denne ingrediensen ', | ||||
| 	'Add all list items to stock' => 'Legg alle produktene i listen til husholdningen', | ||||
| 	'Add #3 #1 of #2 to stock' => 'Legg til #3 #1 av #2 til husholdningen', | ||||
| 	'Adding shopping list item #1 of #2' => 'Legger til produkt #1 av #2 fra handlelisten', | ||||
| 	'Use a specific stock item' => 'Velg et bestemt produkt', | ||||
| 	'The first item in this list would be picked by the default rule which is "First expiring first, then first in first out"' => 'Første produkt på listen vil bli konsumert først i henhold til standard regelen. "Går ut på dato først. Deretter først inn, først ut".', | ||||
| 	'Mark #3 #1 of #2 as open' => 'Merk #3 #1 av #2 som åpnet', | ||||
| 	'When a product was marked as opened, the best before date will be replaced by today + this amount of days (a value of 0 disables this)' => 'Når et produkt blir merket som åpnet endres best før datoen fra i dag + dette antallet av dager. (Et 0 vil deaktivere dette)', | ||||
| 	'Default best before days after opened' => 'Standard best før dager etter åpnet', | ||||
| 	'Marked #1 #2 of #3 as opened' => 'Merket #1 #2 av #3 som åpnet', | ||||
| 	'Mark as opened' => 'Merk som åpnet', | ||||
| 	'Expires on #1; Bought on #2' => 'Går ut på dato #1; Kjøpt #2', | ||||
| 	'Not opened' => 'Ikke åpnet', | ||||
| 	'Opened' => 'Åpnet', | ||||
| 	'Mark #3 #1 of #2 as open' => 'Merk #3 #1 av #2 som åpnet', | ||||
| 	'#1 opened' => '#1 åpnet', | ||||
| 	'Product expires' => 'Produkt går ut på dato', | ||||
| 	'Task due' => 'Tidsfrist for oppgave', | ||||
| 	'Chore due' => 'Tidsfrist for husarbeid', | ||||
| 	'Battery charge cycle due' => 'Batteri må lades', | ||||
| 	'Show clock in header' => 'Vis klokken på toppen av siden', | ||||
| 	'Stock settings' => 'Husholdningsinnstillinger', | ||||
| 	'Shopping list to stock workflow' => 'Arbeidsflyt fra handleliste til husholding', | ||||
| 	'Automatically do the booking using the last price and the amount of the shopping list item, if the product has "Default best before days" set' => 'Legg produkter automatisk til fra handlelisten. Dette vil bruke sist innkjøpspris og forutsetter at "Standard for antall dager best før" er satt', | ||||
| 	'Skip' => 'Hopp' | ||||
| ); | ||||
| @@ -22,8 +22,9 @@ class ApiKeyAuthMiddleware extends BaseMiddleware | ||||
| 		$route = $request->getAttribute('route'); | ||||
| 		$routeName = $route->getName(); | ||||
|  | ||||
| 		if ($this->ApplicationService->IsDemoInstallation()) | ||||
| 		if (GROCY_IS_DEMO_INSTALL || GROCY_IS_EMBEDDED_INSTALL) | ||||
| 		{ | ||||
| 			define('GROCY_AUTHENTICATED', true); | ||||
| 			$response = $next($request, $response); | ||||
| 		} | ||||
| 		else | ||||
| @@ -45,10 +46,23 @@ class ApiKeyAuthMiddleware extends BaseMiddleware | ||||
|  | ||||
| 			if (!$validSession && !$validApiKey) | ||||
| 			{ | ||||
| 				define('GROCY_AUTHENTICATED', false); | ||||
| 				$response = $response->withStatus(401); | ||||
| 			} | ||||
| 			else | ||||
| 			elseif ($validApiKey) | ||||
| 			{ | ||||
| 				$user = $apiKeyService->GetUserByApiKey($request->getHeaderLine($this->ApiKeyHeaderName)); | ||||
| 				define('GROCY_AUTHENTICATED', true); | ||||
| 				define('GROCY_USER_ID', $user->id); | ||||
|  | ||||
| 				$response = $next($request, $response); | ||||
| 			} | ||||
| 			elseif ($validSession) | ||||
| 			{ | ||||
| 				$user = $sessionService->GetUserBySessionKey($_COOKIE[$this->SessionCookieName]); | ||||
| 				define('GROCY_AUTHENTICATED', true); | ||||
| 				define('GROCY_USER_ID', $user->id); | ||||
|  | ||||
| 				$response = $next($request, $response); | ||||
| 			} | ||||
| 		} | ||||
|   | ||||
| @@ -1,20 +0,0 @@ | ||||
| <?php | ||||
|  | ||||
| namespace Grocy\Middleware; | ||||
|  | ||||
| class CliMiddleware extends BaseMiddleware | ||||
| { | ||||
| 	public function __invoke(\Slim\Http\Request $request, \Slim\Http\Response $response, callable $next) | ||||
| 	{ | ||||
| 		if (PHP_SAPI !== 'cli') | ||||
| 		{ | ||||
| 			$response->write('Please call this only from CLI'); | ||||
| 			return $response->withHeader('Content-Type', 'text/plain')->withStatus(400); | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			$response = $next($request, $response); | ||||
| 			return $response->withHeader('Content-Type', 'text/plain'); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
| @@ -7,6 +7,14 @@ class JsonMiddleware extends BaseMiddleware | ||||
| 	public function __invoke(\Slim\Http\Request $request, \Slim\Http\Response $response, callable $next) | ||||
| 	{ | ||||
| 		$response = $next($request, $response); | ||||
| 		return $response->withHeader('Content-Type', 'application/json'); | ||||
|  | ||||
| 		if ($response->hasHeader('Content-Disposition')) | ||||
| 		{ | ||||
| 			return $response; | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			return $response->withHeader('Content-Type', 'application/json'); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
|   | ||||
| @@ -3,6 +3,7 @@ | ||||
| namespace Grocy\Middleware; | ||||
|  | ||||
| use \Grocy\Services\SessionService; | ||||
| use \Grocy\Services\LocalizationService; | ||||
|  | ||||
| class SessionAuthMiddleware extends BaseMiddleware | ||||
| { | ||||
| @@ -18,23 +19,41 @@ class SessionAuthMiddleware extends BaseMiddleware | ||||
| 	{ | ||||
| 		$route = $request->getAttribute('route'); | ||||
| 		$routeName = $route->getName(); | ||||
| 		$sessionService = new SessionService(); | ||||
|  | ||||
| 		if ($routeName === 'root' || $this->ApplicationService->IsDemoInstallation()) | ||||
| 		if ($routeName === 'root') | ||||
| 		{ | ||||
| 			define('AUTHENTICATED', $this->ApplicationService->IsDemoInstallation()); | ||||
| 			$response = $next($request, $response); | ||||
| 		} | ||||
| 		elseif (GROCY_IS_DEMO_INSTALL || GROCY_IS_EMBEDDED_INSTALL) | ||||
| 		{ | ||||
| 			$user = $sessionService->GetDefaultUser(); | ||||
| 			define('GROCY_AUTHENTICATED', true); | ||||
| 			define('GROCY_USER_USERNAME', $user->username); | ||||
|  | ||||
| 			$response = $next($request, $response); | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			$sessionService = new SessionService(); | ||||
| 			if ((!isset($_COOKIE[$this->SessionCookieName]) || !$sessionService->IsValidSession($_COOKIE[$this->SessionCookieName])) && $routeName !== 'login') | ||||
| 			{ | ||||
| 				define('AUTHENTICATED', false); | ||||
| 				define('GROCY_AUTHENTICATED', false); | ||||
| 				$response = $response->withRedirect($this->AppContainer->UrlManager->ConstructUrl('/login')); | ||||
| 			} | ||||
| 			else | ||||
| 			{ | ||||
| 				define('AUTHENTICATED', $routeName !== 'login'); | ||||
| 				if ($routeName !== 'login') | ||||
| 				{ | ||||
| 					$user = $sessionService->GetUserBySessionKey($_COOKIE[$this->SessionCookieName]); | ||||
| 					define('GROCY_AUTHENTICATED', true); | ||||
| 					define('GROCY_USER_USERNAME', $user->username); | ||||
| 					define('GROCY_USER_ID', $user->id); | ||||
| 				} | ||||
| 				else | ||||
| 				{ | ||||
| 					define('GROCY_AUTHENTICATED', false); | ||||
| 				} | ||||
|  | ||||
| 				$response = $next($request, $response); | ||||
| 			} | ||||
| 		} | ||||
|   | ||||
| @@ -3,4 +3,3 @@ AS | ||||
| SELECT product_id, SUM(amount) AS amount, MIN(best_before_date) AS best_before_date | ||||
| FROM stock | ||||
| GROUP BY product_id | ||||
| ORDER BY MIN(best_before_date) ASC | ||||
|   | ||||
| @@ -3,4 +3,3 @@ AS | ||||
| SELECT habit_id, MAX(tracked_time) AS last_tracked_time | ||||
| FROM habits_log | ||||
| GROUP BY habit_id | ||||
| ORDER BY MAX(tracked_time) DESC | ||||
|   | ||||
| @@ -3,4 +3,3 @@ AS | ||||
| SELECT battery_id, MAX(tracked_time) AS last_tracked_time | ||||
| FROM battery_charge_cycles | ||||
| GROUP BY battery_id | ||||
| ORDER BY MAX(tracked_time) DESC | ||||
|   | ||||
							
								
								
									
										50
									
								
								migrations/0025.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								migrations/0025.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,50 @@ | ||||
| CREATE TABLE recipes ( | ||||
| 	id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, | ||||
| 	name TEXT NOT NULL, | ||||
| 	description TEXT, | ||||
| 	row_created_timestamp DATETIME DEFAULT (datetime('now', 'localtime')) | ||||
| ); | ||||
|  | ||||
| CREATE TABLE recipes_pos ( | ||||
| 	id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, | ||||
| 	recipe_id INTEGER NOT NULL, | ||||
| 	product_id INTEGER NOT NULL, | ||||
| 	amount INTEGER NOT NULL DEFAULT 0, | ||||
| 	note TEXT, | ||||
| 	row_created_timestamp DATETIME DEFAULT (datetime('now', 'localtime')) | ||||
| ); | ||||
|  | ||||
| CREATE VIEW recipes_fulfillment | ||||
| AS | ||||
| SELECT | ||||
| 	r.id AS recipe_id, | ||||
| 	rp.id AS recipe_pos_id, | ||||
| 	rp.product_id AS product_id, | ||||
| 	rp.amount AS recipe_amount, | ||||
| 	IFNULL(sc.amount, 0) AS stock_amount, | ||||
| 	CASE WHEN IFNULL(sc.amount, 0) >= rp.amount THEN 1 ELSE 0 END AS need_fulfilled, | ||||
| 	CASE WHEN IFNULL(sc.amount, 0) - IFNULL(rp.amount, 0) < 0 THEN ABS(IFNULL(sc.amount, 0) - IFNULL(rp.amount, 0)) ELSE 0 END AS missing_amount, | ||||
| 	IFNULL(sl.amount, 0) AS amount_on_shopping_list, | ||||
| 	CASE WHEN IFNULL(sc.amount, 0) + IFNULL(sl.amount, 0) >= rp.amount THEN 1 ELSE 0 END AS need_fulfilled_with_shopping_list | ||||
| FROM recipes r | ||||
| JOIN recipes_pos rp | ||||
| 	ON r.id = rp.recipe_id | ||||
| LEFT JOIN ( | ||||
| 	SELECT product_id, SUM(amount + amount_autoadded) AS amount | ||||
| 	FROM shopping_list | ||||
| 	GROUP BY product_id) sl | ||||
| 	ON rp.product_id = sl.product_id | ||||
| LEFT JOIN stock_current sc | ||||
| 	ON rp.product_id = sc.product_id; | ||||
|  | ||||
| CREATE VIEW recipes_fulfillment_sum | ||||
| AS | ||||
| SELECT | ||||
| 	r.id AS recipe_id, | ||||
| 	IFNULL(MIN(rf.need_fulfilled), 1) AS need_fulfilled, | ||||
| 	IFNULL(MIN(rf.need_fulfilled_with_shopping_list), 1) AS need_fulfilled_with_shopping_list, | ||||
| 	(SELECT COUNT(*) FROM recipes_fulfillment WHERE recipe_id = rf.recipe_id AND need_fulfilled = 0 AND recipe_pos_id IS NOT NULL) AS missing_products_count | ||||
| FROM recipes r | ||||
| LEFT JOIN recipes_fulfillment rf | ||||
| 	ON rf.recipe_id = r.id | ||||
| GROUP BY r.id; | ||||
							
								
								
									
										20
									
								
								migrations/0026.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								migrations/0026.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,20 @@ | ||||
| CREATE TABLE users ( | ||||
| 	id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, | ||||
| 	username TEXT NOT NULL UNIQUE, | ||||
| 	first_name TEXT, | ||||
| 	last_name TEXT, | ||||
| 	password TEXT NOT NULL, | ||||
| 	row_created_timestamp DATETIME DEFAULT (datetime('now', 'localtime')) | ||||
| ); | ||||
|  | ||||
| DROP TABLE sessions; | ||||
|  | ||||
| CREATE TABLE sessions ( | ||||
| 	id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, | ||||
| 	session_key TEXT NOT NULL UNIQUE, | ||||
| 	user_id INTEGER NOT NULL, | ||||
| 	expires DATETIME, | ||||
| 	last_used DATETIME, | ||||
| 	row_created_timestamp DATETIME DEFAULT (datetime('now', 'localtime')) | ||||
| ) | ||||
|  | ||||
							
								
								
									
										24
									
								
								migrations/0027.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								migrations/0027.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,24 @@ | ||||
| <?php | ||||
|  | ||||
| // This is executed inside DatabaseMigrationService class/context | ||||
|  | ||||
| $db = $this->DatabaseService->GetDbConnection(); | ||||
|  | ||||
| if (defined('GROCY_HTTP_USER')) | ||||
| { | ||||
| 	// Migrate old user defined in config file to database | ||||
| 	$newUserRow = $db->users()->createRow(array( | ||||
| 		'username' => GROCY_HTTP_USER, | ||||
| 		'password' => password_hash(GROCY_HTTP_PASSWORD, PASSWORD_DEFAULT) | ||||
| 	)); | ||||
| 	$newUserRow->save(); | ||||
| } | ||||
| else | ||||
| { | ||||
| 	// Create default user "admin" with password "admin" | ||||
| 	$newUserRow = $db->users()->createRow(array( | ||||
| 		'username' => 'admin', | ||||
| 		'password' => password_hash('admin', PASSWORD_DEFAULT) | ||||
| 	)); | ||||
| 	$newUserRow->save(); | ||||
| } | ||||
							
								
								
									
										13
									
								
								migrations/0028.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								migrations/0028.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| ALTER TABLE habits_log | ||||
| ADD done_by_user_id INTEGER; | ||||
|  | ||||
| DROP TABLE api_keys; | ||||
|  | ||||
| CREATE TABLE api_keys ( | ||||
| 	id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, | ||||
| 	api_key TEXT NOT NULL UNIQUE, | ||||
| 	user_id INTEGER NOT NULL, | ||||
| 	expires DATETIME, | ||||
| 	last_used DATETIME, | ||||
| 	row_created_timestamp DATETIME DEFAULT (datetime('now', 'localtime')) | ||||
| ); | ||||
							
								
								
									
										5
									
								
								migrations/0029.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								migrations/0029.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | ||||
| ALTER TABLE stock | ||||
| ADD price DECIMAL(15, 2); | ||||
|  | ||||
| ALTER TABLE stock_log | ||||
| ADD price DECIMAL(15, 2); | ||||
							
								
								
									
										2
									
								
								migrations/0030.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								migrations/0030.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| ALTER TABLE quantity_units | ||||
| ADD name_plural TEXT; | ||||
							
								
								
									
										32
									
								
								migrations/0031.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								migrations/0031.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,32 @@ | ||||
| <?php | ||||
|  | ||||
| // This is executed inside DatabaseMigrationService class/context | ||||
|  | ||||
| use \Grocy\Services\LocalizationService; | ||||
| $localizationService = new LocalizationService(GROCY_CULTURE); | ||||
|  | ||||
| $db = $this->DatabaseService->GetDbConnection(); | ||||
|  | ||||
| if ($db->quantity_units()->count() === 0) | ||||
| { | ||||
| 	// Create 2 default quantity units | ||||
| 	$newRow = $db->quantity_units()->createRow(array( | ||||
| 		'name' => $localizationService->Localize('Piece'), | ||||
| 		'name_plural' => $localizationService->Localize('Pieces') | ||||
| 	)); | ||||
| 	$newRow->save(); | ||||
| 	$newRow = $db->quantity_units()->createRow(array( | ||||
| 		'name' => $localizationService->Localize('Pack'), | ||||
| 		'name_plural' => $localizationService->Localize('Packs') | ||||
| 	)); | ||||
| 	$newRow->save(); | ||||
| } | ||||
|  | ||||
| if ($db->locations()->count() === 0) | ||||
| { | ||||
| 	// Create a default location | ||||
| 	$newRow = $db->locations()->createRow(array( | ||||
| 		'name' => $localizationService->Localize('Fridge') | ||||
| 	)); | ||||
| 	$newRow->save(); | ||||
| } | ||||
							
								
								
									
										20
									
								
								migrations/0032.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								migrations/0032.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,20 @@ | ||||
| DROP VIEW stock_current; | ||||
| CREATE VIEW stock_current | ||||
| AS | ||||
| SELECT product_id, SUM(amount) AS amount, MIN(best_before_date) AS best_before_date | ||||
| FROM stock | ||||
| GROUP BY product_id; | ||||
|  | ||||
| DROP VIEW habits_current; | ||||
| CREATE VIEW habits_current | ||||
| AS | ||||
| SELECT habit_id, MAX(tracked_time) AS last_tracked_time | ||||
| FROM habits_log | ||||
| GROUP BY habit_id; | ||||
|  | ||||
| DROP VIEW batteries_current; | ||||
| CREATE VIEW batteries_current | ||||
| AS | ||||
| SELECT battery_id, MAX(tracked_time) AS last_tracked_time | ||||
| FROM battery_charge_cycles | ||||
| GROUP BY battery_id; | ||||
							
								
								
									
										29
									
								
								migrations/0033.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								migrations/0033.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,29 @@ | ||||
| DROP VIEW habits_current; | ||||
| CREATE VIEW habits_current | ||||
| AS | ||||
| SELECT | ||||
| 	h.id AS habit_id, | ||||
| 	MAX(l.tracked_time) AS last_tracked_time, | ||||
| 	CASE h.period_type | ||||
| 		WHEN 'manually' THEN '2999-12-31 23:59:59' | ||||
| 		WHEN 'dynamic-regular' THEN datetime(MAX(l.tracked_time), '+' || CAST(h.period_days AS TEXT) || ' day') | ||||
| 	END AS next_estimated_execution_time | ||||
| FROM habits h | ||||
| LEFT JOIN habits_log l | ||||
| 	ON h.id = l.habit_id | ||||
| GROUP BY h.id, h.period_days; | ||||
|  | ||||
| DROP VIEW batteries_current; | ||||
| CREATE VIEW batteries_current | ||||
| AS | ||||
| SELECT | ||||
| 	b.id AS battery_id, | ||||
| 	MAX(l.tracked_time) AS last_tracked_time, | ||||
| 	CASE WHEN b.charge_interval_days = 0 | ||||
| 		THEN '2999-12-31 23:59:59' | ||||
| 		ELSE datetime(MAX(l.tracked_time), '+' || CAST(b.charge_interval_days AS TEXT) || ' day') | ||||
| 	END AS next_estimated_charge_time | ||||
| FROM batteries b | ||||
| LEFT JOIN battery_charge_cycles l | ||||
| 	ON b.id = l.battery_id | ||||
| GROUP BY b.id, b.charge_interval_days; | ||||
							
								
								
									
										41
									
								
								migrations/0034.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								migrations/0034.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,41 @@ | ||||
| ALTER TABLE recipes_pos | ||||
| ADD qu_id INTEGER; | ||||
|  | ||||
| UPDATE recipes_pos | ||||
| SET qu_id = (SELECT qu_id_stock FROM products where id = product_id); | ||||
|  | ||||
| CREATE TRIGGER recipes_pos_qu_id_default AFTER INSERT ON recipes_pos | ||||
| BEGIN | ||||
| 	UPDATE recipes_pos | ||||
| 	SET qu_id = (SELECT qu_id_stock FROM products where id = product_id) | ||||
| 	WHERE qu_id IS NULL | ||||
| 		AND id = NEW.id; | ||||
| END; | ||||
|  | ||||
| ALTER TABLE recipes_pos | ||||
| ADD only_check_single_unit_in_stock TINYINT NOT NULL DEFAULT 0; | ||||
|  | ||||
| DROP VIEW recipes_fulfillment; | ||||
| CREATE VIEW recipes_fulfillment | ||||
| AS | ||||
| SELECT | ||||
| 	r.id AS recipe_id, | ||||
| 	rp.id AS recipe_pos_id, | ||||
| 	rp.product_id AS product_id, | ||||
| 	rp.amount AS recipe_amount, | ||||
| 	IFNULL(sc.amount, 0) AS stock_amount, | ||||
| 	CASE WHEN IFNULL(sc.amount, 0) >= CASE WHEN rp.only_check_single_unit_in_stock = 1 THEN 1 ELSE IFNULL(rp.amount, 0) END THEN 1 ELSE 0 END AS need_fulfilled, | ||||
| 	CASE WHEN IFNULL(sc.amount, 0) - CASE WHEN rp.only_check_single_unit_in_stock = 1 THEN 1 ELSE IFNULL(rp.amount, 0) END < 0 THEN ABS(IFNULL(sc.amount, 0) - CASE WHEN rp.only_check_single_unit_in_stock = 1 THEN 1 ELSE IFNULL(rp.amount, 0) END) ELSE 0 END AS missing_amount, | ||||
| 	IFNULL(sl.amount, 0) AS amount_on_shopping_list, | ||||
| 	CASE WHEN IFNULL(sc.amount, 0) + IFNULL(sl.amount, 0) >= CASE WHEN rp.only_check_single_unit_in_stock = 1 THEN 1 ELSE IFNULL(rp.amount, 0) END THEN 1 ELSE 0 END AS need_fulfilled_with_shopping_list, | ||||
| 	rp.qu_id | ||||
| FROM recipes r | ||||
| JOIN recipes_pos rp | ||||
| 	ON r.id = rp.recipe_id | ||||
| LEFT JOIN ( | ||||
| 	SELECT product_id, SUM(amount + amount_autoadded) AS amount | ||||
| 	FROM shopping_list | ||||
| 	GROUP BY product_id) sl | ||||
| 	ON rp.product_id = sl.product_id | ||||
| LEFT JOIN stock_current sc | ||||
| 	ON rp.product_id = sc.product_id; | ||||
							
								
								
									
										31
									
								
								migrations/0035.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								migrations/0035.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,31 @@ | ||||
| ALTER TABLE habits RENAME TO chores; | ||||
|  | ||||
| CREATE TABLE chores_log ( | ||||
| 	id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, | ||||
| 	chore_id INTEGER NOT NULL, | ||||
| 	tracked_time DATETIME, | ||||
| 	done_by_user_id INTEGER, | ||||
| 	row_created_timestamp DATETIME DEFAULT (datetime('now', 'localtime')) | ||||
| ); | ||||
|  | ||||
| INSERT INTO chores_log | ||||
| 	(chore_id, tracked_time, done_by_user_id, row_created_timestamp) | ||||
| SELECT habit_id, tracked_time, done_by_user_id, row_created_timestamp | ||||
| FROM habits_log; | ||||
|  | ||||
| DROP TABLE habits_log; | ||||
|  | ||||
| DROP VIEW habits_current; | ||||
| CREATE VIEW chores_current | ||||
| AS | ||||
| SELECT | ||||
| 	h.id AS chore_id, | ||||
| 	MAX(l.tracked_time) AS last_tracked_time, | ||||
| 	CASE h.period_type | ||||
| 		WHEN 'manually' THEN '2999-12-31 23:59:59' | ||||
| 		WHEN 'dynamic-regular' THEN datetime(MAX(l.tracked_time), '+' || CAST(h.period_days AS TEXT) || ' day') | ||||
| 	END AS next_estimated_execution_time | ||||
| FROM chores h | ||||
| LEFT JOIN chores_log l | ||||
| 	ON h.id = l.chore_id | ||||
| GROUP BY h.id, h.period_days; | ||||
							
								
								
									
										24
									
								
								migrations/0036.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								migrations/0036.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,24 @@ | ||||
| CREATE TABLE tasks ( | ||||
| 	id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, | ||||
| 	name TEXT NOT NULL UNIQUE, | ||||
| 	description TEXT, | ||||
| 	due_date DATETIME, | ||||
| 	done TINYINT NOT NULL DEFAULT 0 CHECK(done IN (0, 1)), | ||||
| 	done_timestamp DATETIME, | ||||
| 	category_id INTEGER, | ||||
| 	assigned_to_user_id INTEGER, | ||||
| 	row_created_timestamp DATETIME DEFAULT (datetime('now', 'localtime')) | ||||
| ); | ||||
|  | ||||
| CREATE TABLE task_categories ( | ||||
| 	id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, | ||||
| 	name TEXT NOT NULL UNIQUE, | ||||
| 	description TEXT, | ||||
| 	row_created_timestamp DATETIME DEFAULT (datetime('now', 'localtime')) | ||||
| ); | ||||
|  | ||||
| CREATE VIEW tasks_current | ||||
| AS | ||||
| SELECT * | ||||
| FROM tasks | ||||
| WHERE done = 0; | ||||
							
								
								
									
										9
									
								
								migrations/0037.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								migrations/0037.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| ALTER TABLE products | ||||
| ADD product_group_id INTEGER; | ||||
|  | ||||
| CREATE TABLE product_groups ( | ||||
| 	id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, | ||||
| 	name TEXT NOT NULL UNIQUE, | ||||
| 	description TEXT, | ||||
| 	row_created_timestamp DATETIME DEFAULT (datetime('now', 'localtime')) | ||||
| ); | ||||
							
								
								
									
										27
									
								
								migrations/0038.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								migrations/0038.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,27 @@ | ||||
| DROP VIEW stock_missing_products; | ||||
| CREATE VIEW stock_missing_products | ||||
| AS | ||||
| SELECT | ||||
| 	p.id, | ||||
| 	MAX(p.name) AS name, | ||||
| 	p.min_stock_amount - IFNULL(SUM(s.amount), 0) AS amount_missing, | ||||
| 	CASE WHEN s.id IS NOT NULL THEN 1 ELSE 0 END AS is_partly_in_stock | ||||
| FROM products p | ||||
| LEFT JOIN stock s | ||||
| 	ON p.id = s.product_id | ||||
| WHERE p.min_stock_amount != 0 | ||||
| GROUP BY p.id | ||||
| HAVING IFNULL(SUM(s.amount), 0) < p.min_stock_amount; | ||||
|  | ||||
| DROP VIEW stock_current; | ||||
| CREATE VIEW stock_current | ||||
| AS | ||||
| SELECT product_id, SUM(amount) AS amount, MIN(best_before_date) AS best_before_date | ||||
| FROM stock | ||||
| GROUP BY product_id | ||||
|  | ||||
| UNION | ||||
|  | ||||
| SELECT id, 0, null | ||||
| FROM stock_missing_products | ||||
| WHERE is_partly_in_stock = 0; | ||||
							
								
								
									
										10
									
								
								migrations/0039.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								migrations/0039.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,10 @@ | ||||
| CREATE TABLE user_settings ( | ||||
| 	id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, | ||||
| 	user_id INTEGER NOT NULL, | ||||
| 	key TEXT NOT NULL, | ||||
| 	value TEXT, | ||||
| 	row_created_timestamp DATETIME DEFAULT (datetime('now', 'localtime')), | ||||
| 	row_updated_timestamp DATETIME DEFAULT (datetime('now', 'localtime')), | ||||
|  | ||||
| 	UNIQUE(user_id, key) | ||||
| ); | ||||
							
								
								
									
										2
									
								
								migrations/0040.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								migrations/0040.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| ALTER TABLE products | ||||
| ADD picture_file_name TEXT; | ||||
							
								
								
									
										7
									
								
								migrations/0041.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								migrations/0041.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,7 @@ | ||||
| CREATE TABLE equipment ( | ||||
| 	id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, | ||||
| 	name TEXT NOT NULL UNIQUE, | ||||
| 	description TEXT, | ||||
| 	instruction_manual_file_name TEXT, | ||||
| 	row_created_timestamp DATETIME DEFAULT (datetime('now', 'localtime')) | ||||
| ) | ||||
							
								
								
									
										7
									
								
								migrations/0042.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								migrations/0042.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,7 @@ | ||||
| CREATE TRIGGER cascade_change_qu_id_stock AFTER UPDATE ON products | ||||
| BEGIN | ||||
| 	UPDATE recipes_pos | ||||
| 	SET qu_id = (SELECT qu_id_stock FROM products WHERE id = NEW.id) | ||||
| 	WHERE product_id IN (SELECT id FROM products WHERE id = NEW.id) | ||||
| 		AND only_check_single_unit_in_stock = 0; | ||||
| END; | ||||
							
								
								
									
										43
									
								
								migrations/0043.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								migrations/0043.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,43 @@ | ||||
| CREATE TABLE recipes_nestings ( | ||||
| 	id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, | ||||
| 	recipe_id INTEGER NOT NULL, | ||||
| 	includes_recipe_id INTEGER NOT NULL, | ||||
| 	row_created_timestamp DATETIME DEFAULT (datetime('now', 'localtime')), | ||||
|  | ||||
| 	UNIQUE(recipe_id, includes_recipe_id) | ||||
| ); | ||||
|  | ||||
| CREATE VIEW recipes_nestings_resolved | ||||
| AS | ||||
| WITH RECURSIVE r1(recipe_id, includes_recipe_id) | ||||
| AS ( | ||||
| 	SELECT id, id | ||||
| 	FROM recipes | ||||
| 	 | ||||
| 	UNION ALL | ||||
| 	 | ||||
| 	SELECT rn.recipe_id, r1.includes_recipe_id | ||||
| 	FROM recipes_nestings rn, r1 r1 | ||||
| 	WHERE rn.includes_recipe_id = r1.recipe_id | ||||
| 	LIMIT 100 -- This is just a safety limit to prevent infinite loops due to infinite nested recipes | ||||
| ) | ||||
| SELECT * | ||||
| FROM r1; | ||||
|  | ||||
| DROP VIEW recipes_fulfillment_sum; | ||||
| CREATE VIEW recipes_fulfillment_sum | ||||
| AS | ||||
| SELECT | ||||
| 	r.id AS recipe_id, | ||||
| 	IFNULL(MIN(rf.need_fulfilled), 1) AS need_fulfilled, | ||||
| 	IFNULL(MIN(rf.need_fulfilled_with_shopping_list), 1) AS need_fulfilled_with_shopping_list, | ||||
| 	(SELECT COUNT(*) FROM recipes_fulfillment WHERE recipe_id IN (SELECT includes_recipe_id FROM recipes_nestings_resolved rnr2 WHERE rnr2.recipe_id = r.id) AND need_fulfilled = 0 AND recipe_pos_id IS NOT NULL) AS missing_products_count | ||||
| FROM recipes r | ||||
| LEFT JOIN recipes_nestings_resolved rnr | ||||
| 	ON r.id = rnr.recipe_id | ||||
| LEFT JOIN recipes_fulfillment rf | ||||
| 	ON rnr.includes_recipe_id = rf.recipe_id | ||||
| GROUP BY r.id; | ||||
|  | ||||
| ALTER TABLE recipes_pos | ||||
| ADD ingredient_group TEXT; | ||||
							
								
								
									
										26
									
								
								migrations/0044.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								migrations/0044.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,26 @@ | ||||
| ALTER TABLE stock_log | ||||
| ADD undone TINYINT NOT NULL DEFAULT 0 CHECK(undone IN (0, 1)); | ||||
|  | ||||
| UPDATE stock_log | ||||
| SET undone = 0; | ||||
|  | ||||
| ALTER TABLE stock_log | ||||
| ADD undone_timestamp DATETIME; | ||||
|  | ||||
| ALTER TABLE chores_log | ||||
| ADD undone TINYINT NOT NULL DEFAULT 0 CHECK(undone IN (0, 1)); | ||||
|  | ||||
| UPDATE chores_log | ||||
| SET undone = 0; | ||||
|  | ||||
| ALTER TABLE chores_log | ||||
| ADD undone_timestamp DATETIME; | ||||
|  | ||||
| ALTER TABLE battery_charge_cycles | ||||
| ADD undone TINYINT NOT NULL DEFAULT 0 CHECK(undone IN (0, 1)); | ||||
|  | ||||
| UPDATE battery_charge_cycles | ||||
| SET undone = 0; | ||||
|  | ||||
| ALTER TABLE battery_charge_cycles | ||||
| ADD undone_timestamp DATETIME; | ||||
							
								
								
									
										92
									
								
								migrations/0045.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										92
									
								
								migrations/0045.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,92 @@ | ||||
| ALTER TABLE recipes_pos RENAME TO recipes_pos_old; | ||||
|  | ||||
| CREATE TABLE recipes_pos ( | ||||
| 	id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, | ||||
| 	recipe_id INTEGER NOT NULL, | ||||
| 	product_id INTEGER NOT NULL, | ||||
| 	amount REAL NOT NULL DEFAULT 0, | ||||
| 	note TEXT, | ||||
| 	qu_id INTEGER, | ||||
| 	only_check_single_unit_in_stock TINYINT NOT NULL DEFAULT 0, | ||||
| 	ingredient_group TEXT, | ||||
| 	not_check_stock_fulfillment TINYINT NOT NULL DEFAULT 0, | ||||
| 	row_created_timestamp DATETIME DEFAULT (datetime('now', 'localtime')) | ||||
| ); | ||||
|  | ||||
| DROP TRIGGER recipes_pos_qu_id_default; | ||||
| CREATE TRIGGER recipes_pos_qu_id_default AFTER INSERT ON recipes_pos | ||||
| BEGIN | ||||
| 	UPDATE recipes_pos | ||||
| 	SET qu_id = (SELECT qu_id_stock FROM products where id = product_id) | ||||
| 	WHERE qu_id IS NULL | ||||
| 		AND id = NEW.id; | ||||
| END; | ||||
|  | ||||
| INSERT INTO recipes_pos | ||||
| 	(recipe_id, product_id, amount, note, qu_id, only_check_single_unit_in_stock, ingredient_group, row_created_timestamp) | ||||
| SELECT recipe_id, product_id, amount, note, qu_id, only_check_single_unit_in_stock, ingredient_group, row_created_timestamp | ||||
| FROM recipes_pos_old; | ||||
|  | ||||
| DROP TABLE recipes_pos_old; | ||||
|  | ||||
| DROP TRIGGER cascade_change_qu_id_stock; | ||||
| CREATE TRIGGER cascade_change_qu_id_stock AFTER UPDATE ON products | ||||
| BEGIN | ||||
| 	UPDATE recipes_pos | ||||
| 	SET qu_id = (SELECT qu_id_stock FROM products WHERE id = NEW.id) | ||||
| 	WHERE product_id IN (SELECT id FROM products WHERE id = NEW.id) | ||||
| 		AND only_check_single_unit_in_stock = 0; | ||||
| END; | ||||
|  | ||||
| DROP VIEW recipes_fulfillment; | ||||
| CREATE VIEW recipes_fulfillment | ||||
| AS | ||||
| SELECT | ||||
| 	r.id AS recipe_id, | ||||
| 	rp.id AS recipe_pos_id, | ||||
| 	rp.product_id AS product_id, | ||||
| 	rp.amount AS recipe_amount, | ||||
| 	IFNULL(sc.amount, 0) AS stock_amount, | ||||
| 	CASE WHEN IFNULL(sc.amount, 0) >= CASE WHEN rp.only_check_single_unit_in_stock = 1 THEN 1 ELSE IFNULL(rp.amount, 0) END THEN 1 ELSE 0 END AS need_fulfilled, | ||||
| 	CASE WHEN IFNULL(sc.amount, 0) - CASE WHEN rp.only_check_single_unit_in_stock = 1 THEN 1 ELSE IFNULL(rp.amount, 0) END < 0 THEN ABS(IFNULL(sc.amount, 0) - CASE WHEN rp.only_check_single_unit_in_stock = 1 THEN 1 ELSE IFNULL(rp.amount, 0) END) ELSE 0 END AS missing_amount, | ||||
| 	IFNULL(sl.amount, 0) AS amount_on_shopping_list, | ||||
| 	CASE WHEN IFNULL(sc.amount, 0) + IFNULL(sl.amount, 0) >= CASE WHEN rp.only_check_single_unit_in_stock = 1 THEN 1 ELSE IFNULL(rp.amount, 0) END THEN 1 ELSE 0 END AS need_fulfilled_with_shopping_list, | ||||
| 	rp.qu_id | ||||
| FROM recipes r | ||||
| JOIN recipes_pos rp | ||||
| 	ON r.id = rp.recipe_id | ||||
| LEFT JOIN ( | ||||
| 	SELECT product_id, SUM(amount + amount_autoadded) AS amount | ||||
| 	FROM shopping_list | ||||
| 	GROUP BY product_id) sl | ||||
| 	ON rp.product_id = sl.product_id | ||||
| LEFT JOIN stock_current sc | ||||
| 	ON rp.product_id = sc.product_id | ||||
| WHERE rp.not_check_stock_fulfillment = 0 | ||||
|  | ||||
| UNION | ||||
|  | ||||
| -- Just add all recipe positions which should not be checked against stock with fulfilled need | ||||
|  | ||||
| SELECT | ||||
| 	r.id AS recipe_id, | ||||
| 	rp.id AS recipe_pos_id, | ||||
| 	rp.product_id AS product_id, | ||||
| 	rp.amount AS recipe_amount, | ||||
| 	IFNULL(sc.amount, 0) AS stock_amount, | ||||
| 	1 AS need_fulfilled, | ||||
| 	0 AS missing_amount, | ||||
| 	IFNULL(sl.amount, 0) AS amount_on_shopping_list, | ||||
| 	1 AS need_fulfilled_with_shopping_list, | ||||
| 	rp.qu_id | ||||
| FROM recipes r | ||||
| JOIN recipes_pos rp | ||||
| 	ON r.id = rp.recipe_id | ||||
| LEFT JOIN ( | ||||
| 	SELECT product_id, SUM(amount + amount_autoadded) AS amount | ||||
| 	FROM shopping_list | ||||
| 	GROUP BY product_id) sl | ||||
| 	ON rp.product_id = sl.product_id | ||||
| LEFT JOIN stock_current sc | ||||
| 	ON rp.product_id = sc.product_id | ||||
| WHERE rp.not_check_stock_fulfillment = 1; | ||||
							
								
								
									
										38
									
								
								migrations/0046.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								migrations/0046.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,38 @@ | ||||
| ALTER TABLE stock | ||||
| ADD opened_date DATETIME; | ||||
|  | ||||
| ALTER TABLE stock_log | ||||
| ADD opened_date DATETIME; | ||||
|  | ||||
| ALTER TABLE stock | ||||
| ADD open TINYINT NOT NULL DEFAULT 0 CHECK(open IN (0, 1)); | ||||
|  | ||||
| UPDATE stock | ||||
| SET open = 0; | ||||
|  | ||||
| ALTER TABLE products | ||||
| ADD default_best_before_days_after_open INTEGER NOT NULL DEFAULT 0; | ||||
|  | ||||
| UPDATE products | ||||
| SET default_best_before_days_after_open = 0; | ||||
|  | ||||
| DROP VIEW stock_current; | ||||
| CREATE VIEW stock_current | ||||
| AS | ||||
| SELECT | ||||
| 	s.product_id, | ||||
| 	SUM(s.amount) AS amount, | ||||
| 	MIN(s.best_before_date) AS best_before_date, | ||||
| 	IFNULL((SELECT SUM(amount) FROM stock WHERE product_id = s.product_id AND open = 1), 0) AS amount_opened | ||||
| FROM stock s | ||||
| GROUP BY s.product_id | ||||
|  | ||||
| UNION | ||||
|  | ||||
| SELECT | ||||
| 	id, | ||||
| 	0, | ||||
| 	null, | ||||
| 	0 | ||||
| FROM stock_missing_products | ||||
| WHERE is_partly_in_stock = 0; | ||||
							
								
								
									
										69
									
								
								migrations/0047.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										69
									
								
								migrations/0047.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,69 @@ | ||||
| DROP TRIGGER cascade_change_qu_id_stock; | ||||
| CREATE TRIGGER cascade_change_qu_id_stock AFTER UPDATE ON products | ||||
| BEGIN | ||||
| 	UPDATE recipes_pos | ||||
| 	SET qu_id = (SELECT qu_id_stock FROM products WHERE id = NEW.id) | ||||
| 	WHERE product_id IN (SELECT id FROM products WHERE id = NEW.id) | ||||
| 		AND only_check_single_unit_in_stock = 0; | ||||
| END; | ||||
|  | ||||
| UPDATE recipes_pos | ||||
| SET qu_id = (SELECT qu_id_stock FROM products WHERE id = recipes_pos.product_id) | ||||
| WHERE only_check_single_unit_in_stock = 0; | ||||
|  | ||||
| DROP VIEW recipes_fulfillment; | ||||
| CREATE VIEW recipes_fulfillment | ||||
| AS | ||||
| SELECT | ||||
| 	r.id AS recipe_id, | ||||
| 	rp.id AS recipe_pos_id, | ||||
| 	rp.product_id AS product_id, | ||||
| 	rp.amount AS recipe_amount, | ||||
| 	IFNULL(sc.amount, 0) AS stock_amount, | ||||
| 	CASE WHEN IFNULL(sc.amount, 0) >= CASE WHEN rp.only_check_single_unit_in_stock = 1 THEN 1 ELSE IFNULL(rp.amount, 0) END THEN 1 ELSE 0 END AS need_fulfilled, | ||||
| 	CASE WHEN IFNULL(sc.amount, 0) - CASE WHEN rp.only_check_single_unit_in_stock = 1 THEN 1 ELSE IFNULL(rp.amount, 0) END < 0 THEN ABS(IFNULL(sc.amount, 0) - CASE WHEN rp.only_check_single_unit_in_stock = 1 THEN 1 ELSE IFNULL(rp.amount, 0) END) ELSE 0 END AS missing_amount, | ||||
| 	IFNULL(sl.amount, 0) * p.qu_factor_purchase_to_stock AS amount_on_shopping_list, | ||||
| 	CASE WHEN IFNULL(sc.amount, 0) + (IFNULL(sl.amount, 0) * p.qu_factor_purchase_to_stock) >= CASE WHEN rp.only_check_single_unit_in_stock = 1 THEN 1 ELSE IFNULL(rp.amount, 0) END THEN 1 ELSE 0 END AS need_fulfilled_with_shopping_list, | ||||
| 	rp.qu_id | ||||
| FROM recipes r | ||||
| JOIN recipes_pos rp | ||||
| 	ON r.id = rp.recipe_id | ||||
| JOIN products p | ||||
| 	ON rp.product_id = p.id | ||||
| LEFT JOIN ( | ||||
| 	SELECT product_id, SUM(amount + amount_autoadded) AS amount | ||||
| 	FROM shopping_list | ||||
| 	GROUP BY product_id) sl | ||||
| 	ON rp.product_id = sl.product_id | ||||
| LEFT JOIN stock_current sc | ||||
| 	ON rp.product_id = sc.product_id | ||||
| WHERE rp.not_check_stock_fulfillment = 0 | ||||
|  | ||||
| UNION | ||||
|  | ||||
| -- Just add all recipe positions which should not be checked against stock with fulfilled need | ||||
|  | ||||
| SELECT | ||||
| 	r.id AS recipe_id, | ||||
| 	rp.id AS recipe_pos_id, | ||||
| 	rp.product_id AS product_id, | ||||
| 	rp.amount AS recipe_amount, | ||||
| 	IFNULL(sc.amount, 0) AS stock_amount, | ||||
| 	1 AS need_fulfilled, | ||||
| 	0 AS missing_amount, | ||||
| 	IFNULL(sl.amount, 0) * p.qu_factor_purchase_to_stock AS amount_on_shopping_list, | ||||
| 	1 AS need_fulfilled_with_shopping_list, | ||||
| 	rp.qu_id | ||||
| FROM recipes r | ||||
| JOIN recipes_pos rp | ||||
| 	ON r.id = rp.recipe_id | ||||
| JOIN products p | ||||
| 	ON rp.product_id = p.id | ||||
| LEFT JOIN ( | ||||
| 	SELECT product_id, SUM(amount + amount_autoadded) AS amount | ||||
| 	FROM shopping_list | ||||
| 	GROUP BY product_id) sl | ||||
| 	ON rp.product_id = sl.product_id | ||||
| LEFT JOIN stock_current sc | ||||
| 	ON rp.product_id = sc.product_id | ||||
| WHERE rp.not_check_stock_fulfillment = 1; | ||||
							
								
								
									
										14
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								package.json
									
									
									
									
									
								
							| @@ -2,24 +2,32 @@ | ||||
| 	"name": "grocy", | ||||
| 	"private": true, | ||||
| 	"dependencies": { | ||||
| 		"@danielfarrell/bootstrap-combobox": "https://github.com/pallidus-fintech/bootstrap-combobox.git#enhance/boostrap_4", | ||||
| 		"@danielfarrell/bootstrap-combobox": "https://github.com/berrnd/bootstrap-combobox.git#master", | ||||
| 		"@fortawesome/fontawesome-free": "^5.1.0", | ||||
| 		"TagManager": "https://github.com/max-favilli/tagmanager.git#3.0.2", | ||||
| 		"bootbox": "https://github.com/makeusabrew/bootbox.git#v5.x", | ||||
| 		"bootstrap": "^4.1.1", | ||||
| 		"bootstrap-side-navbar": "https://github.com/samrayner/bootstrap-side-navbar.git#1.0.1", | ||||
| 		"chart.js": "^2.7.2", | ||||
| 		"datatables.net": "^1.10.19", | ||||
| 		"datatables.net-bs4": "^1.10.19", | ||||
| 		"datatables.net-colreorder": "^1.5.1", | ||||
| 		"datatables.net-colreorder-bs4": "^1.5.1", | ||||
| 		"datatables.net-responsive": "^2.2.3", | ||||
| 		"datatables.net-responsive-bs4": "^2.2.3", | ||||
| 		"datatables.net-rowgroup": "^1.0.4", | ||||
| 		"datatables.net-rowgroup-bs4": "^1.0.4", | ||||
| 		"datatables.net-select": "^1.2.7", | ||||
| 		"datatables.net-select-bs4": "^1.2.7", | ||||
| 		"fullcalendar": "^3.9.0", | ||||
| 		"jquery": "^3.3.1", | ||||
| 		"jquery-serializejson": "^2.8.1", | ||||
| 		"jquery-ui-dist": "^1.12.1", | ||||
| 		"moment": "^2.22.2", | ||||
| 		"startbootstrap-sb-admin": "^4.0.0", | ||||
| 		"summernote": "^0.8.10", | ||||
| 		"swagger-ui-dist": "^3.17.3", | ||||
| 		"tagmanager": "https://github.com/max-favilli/tagmanager.git#3.0.2", | ||||
| 		"tempusdominus-bootstrap-4": "^5.0.1", | ||||
| 		"tempusdominus-bootstrap-4": "^5.1.2", | ||||
| 		"timeago": "^1.6.3", | ||||
| 		"toastr": "^2.1.4" | ||||
| 	} | ||||
|   | ||||
| @@ -11,10 +11,6 @@ body { | ||||
|     white-space: normal; | ||||
| } | ||||
|  | ||||
| .no-real-button { | ||||
| 	pointer-events: none; | ||||
| } | ||||
|  | ||||
| .timeago-contextual { | ||||
| 	font-style: italic; | ||||
| 	font-size: 0.8em; | ||||
| @@ -45,10 +41,60 @@ a.discrete-link:focus { | ||||
| 	background-color: #e5e5e5; | ||||
| } | ||||
|  | ||||
| .card-body { | ||||
| 	flex-grow: 0; | ||||
| } | ||||
|  | ||||
| .content-text .invalid-feedback { | ||||
| 	font-size: 95%; | ||||
| } | ||||
|  | ||||
| .fullscreen { | ||||
| 	z-index: 9999; | ||||
| 	width: 100%; | ||||
| 	height: 100%; | ||||
| 	position: fixed; | ||||
| 	top: 0; | ||||
| 	left: 0; | ||||
| 	overflow: auto; | ||||
|  } | ||||
|  | ||||
|  .form-check-input.is-valid ~ .form-check-label, | ||||
|  .was-validated .form-check-input:valid ~ .form-check-label { | ||||
|     color: inherit; | ||||
| } | ||||
|  | ||||
| .text-strike-through { | ||||
| 	text-decoration: line-through; | ||||
| } | ||||
|  | ||||
| button.disabled { | ||||
| 	pointer-events: none; | ||||
| } | ||||
|  | ||||
| .embedded .hide-when-embedded { | ||||
| 	display: none; | ||||
| } | ||||
| body.embedded.fixed-nav { | ||||
| 	padding-top: 0; | ||||
| } | ||||
| .embedded .content-wrapper { | ||||
| 	margin-left: 0; | ||||
| } | ||||
|  | ||||
| iframe { | ||||
| 	border: 0; | ||||
| } | ||||
|  | ||||
| /* Hide the default up/down arrow buttons for number inputs because we use our own buttons in numberpicker */ | ||||
| input[type='number'] { | ||||
| 	-moz-appearance: textfield; | ||||
| } | ||||
| input::-webkit-outer-spin-button, | ||||
| input::-webkit-inner-spin-button { | ||||
| 	-webkit-appearance: none; | ||||
| } | ||||
|  | ||||
| /* Navigation style customizations */ | ||||
| #mainNav { | ||||
| 	background-color: #e5e5e5 !important; | ||||
| @@ -57,14 +103,14 @@ a.discrete-link:focus { | ||||
| } | ||||
|  | ||||
| .navbar-sidenav { | ||||
| 	overflow-y: auto; | ||||
| 	overflow-x: hidden; | ||||
| 	overflow-y: overlay; | ||||
| 	border-top: 2px solid !important; | ||||
| } | ||||
|  | ||||
| .navbar-sidenav, | ||||
| .sidenav-second-level { | ||||
| 	background-color: #e5e5e5 !important; | ||||
| 	border-top: 2px solid !important; | ||||
| 	border-right: 2px solid !important; | ||||
| 	border-color: #d6d6d6 !important; | ||||
| } | ||||
| @@ -110,6 +156,18 @@ a.discrete-link:focus { | ||||
| 	background-color: #d6d6d6 !important; | ||||
| } | ||||
|  | ||||
| .navbar-brand { | ||||
| 	margin-right: 0; | ||||
| } | ||||
|  | ||||
| .cursor-link { | ||||
| 	cursor: pointer; | ||||
| } | ||||
|  | ||||
| .cursor-busy { | ||||
| 	cursor: wait; | ||||
| } | ||||
|  | ||||
| /* Third party component customizations - DataTables */ | ||||
| td { | ||||
|      vertical-align: middle !important; | ||||
| @@ -156,3 +214,22 @@ td { | ||||
| 		padding: 0.8em; | ||||
| 	} | ||||
| } | ||||
|  | ||||
| html { | ||||
| 	min-height: inherit; | ||||
| } | ||||
|  | ||||
| /* Third party component customizations - Tempus Dominus */ | ||||
| .date-only-datetimepicker .bootstrap-datetimepicker-widget.dropdown-menu { | ||||
| 	width: auto !important; | ||||
| } | ||||
|  | ||||
| /* Third party component customizations - Bootstrap Combobox */ | ||||
| .typeahead .active { | ||||
| 	background-color: #e5e5e5; | ||||
| } | ||||
|  | ||||
| /* Third party component customizations - Popper.js */ | ||||
| .tooltip { | ||||
| 	pointer-events: none; | ||||
| } | ||||
|   | ||||
							
								
								
									
										221
									
								
								public/css/grocy_night_mode.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										221
									
								
								public/css/grocy_night_mode.css
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,221 @@ | ||||
| body.night-mode { | ||||
| 	color: #c1c1c1; | ||||
| } | ||||
|  | ||||
| .night-mode .table-info, | ||||
| .night-mode .table-info > td, | ||||
| .night-mode .table-info > th { | ||||
| 	background-color: #07373f; | ||||
| } | ||||
|  | ||||
| .night-mode .btn, | ||||
| .night-mode .nav-link, | ||||
| .night-mode #mainNav.navbar-light .navbar-collapse .navbar-nav > .nav-item.dropdown > .nav-link::after, | ||||
| .night-mode .dropdown-item { | ||||
| 	color: #c1c1c1 !important; | ||||
| } | ||||
|  | ||||
| .night-mode .btn-outline-dark { | ||||
| 	border-color: #c1c1c1; | ||||
| } | ||||
|  | ||||
| .night-mode .btn-info { | ||||
| 	color: #c1c1c1; | ||||
| 	background-color: #07373f; | ||||
| 	border-color: #07373f; | ||||
| } | ||||
|  | ||||
| .night-mode .btn-warning { | ||||
| 	color: #c1c1c1; | ||||
| 	background-color: #473604; | ||||
| 	border-color: #473604; | ||||
| } | ||||
|  | ||||
| .night-mode .btn-danger { | ||||
| 	color: #c1c1c1; | ||||
| 	background-color: #471116; | ||||
| 	border-color: #471116; | ||||
| } | ||||
|  | ||||
| .night-mode .btn-success { | ||||
| 	color: #c1c1c1; | ||||
| 	background-color: #0d3a18; | ||||
| 	border-color: #0d3a18; | ||||
| } | ||||
|  | ||||
| .night-mode .form-control { | ||||
| 	color: #495057; | ||||
| 	background-color: #333131; | ||||
| 	border: 1px solid #ced4da; | ||||
| } | ||||
|  | ||||
| .night-mode .content-wrapper { | ||||
| 	background: #333131; | ||||
| } | ||||
|  | ||||
| .night-mode table.dataTable tr.group td { | ||||
| 	font-weight: bold; | ||||
| 	background-color: #333131; | ||||
| } | ||||
|  | ||||
| .night-mode .table-danger, | ||||
| .night-mode .table-danger > td, | ||||
| .night-mode .table-danger > th { | ||||
| 	background-color: #471116; | ||||
| } | ||||
|  | ||||
| .night-mode .table-warning, | ||||
| .night-mode .table-warning > td, | ||||
| .night-mode .table-warning > th { | ||||
| 	background-color: #473604; | ||||
| } | ||||
|  | ||||
| .night-mode .bg-warning { | ||||
| 	background-color: #473604!important; | ||||
| } | ||||
|  | ||||
| .night-mode .bg-info { | ||||
| 	background-color: #07373f!important; | ||||
| } | ||||
|  | ||||
| .night-mode .bg-danger { | ||||
| 	background-color: #471116!important; | ||||
| } | ||||
|  | ||||
| .night-mode .form-control:focus { | ||||
| 	color: #495057; | ||||
| 	background-color: #333131; | ||||
| 	border-color: #80bdff; | ||||
| } | ||||
|  | ||||
| .night-mode .dropdown-item:focus, | ||||
| .night-mode .dropdown-item:hover { | ||||
| 	color: #16181b; | ||||
| 	background-color: #333131; | ||||
| } | ||||
|  | ||||
| .night-mode .dropdown-item { | ||||
| 	color: #7c7b6f; | ||||
| 	background-color: #333131; | ||||
| } | ||||
|  | ||||
| .night-mode .list-group-item { | ||||
| 	background-color: #333131; | ||||
| } | ||||
|  | ||||
| .night-mode .modal-content { | ||||
| 	background-color: #1a1919; | ||||
| 	border: 1px solid rgba(186, 189, 189, 0.66); | ||||
| } | ||||
|  | ||||
| .night-mode .modal-footer { | ||||
| 	border-top: 1px solid #6f7173; | ||||
| } | ||||
|  | ||||
| .night-mode .container-fluid { | ||||
| 	background-color: #333131; | ||||
| } | ||||
|  | ||||
| .night-mode a.discrete-link:hover { | ||||
| 	color: #16354f !important; | ||||
| 	text-decoration: none !important; | ||||
| 	background-color: #333131; | ||||
| } | ||||
|  | ||||
| .night-mode a.discrete-link:focus { | ||||
| 	color: #3a0b0f !important; | ||||
| 	background-color: #333131; | ||||
| } | ||||
|  | ||||
| .night-mode .card { | ||||
| 	border: 2px solid; | ||||
| 	border-color: #383838; | ||||
| 	background-color: #333131; | ||||
| } | ||||
|  | ||||
| .night-mode .card-header { | ||||
| 	background-color: #333131; | ||||
| } | ||||
|  | ||||
| .night-mode #mainNav { | ||||
| 	background-color: #333131 !important; | ||||
| 	border-bottom: 2px solid !important; | ||||
| 	border-color: #383838 !important; | ||||
| } | ||||
|  | ||||
| .night-mode .navbar-sidenav, | ||||
| .night-mode .sidenav-second-level { | ||||
| 	background-color: #333131 !important; | ||||
| 	border-right: 2px solid !important; | ||||
| 	border-color: #383838 !important; | ||||
| } | ||||
|  | ||||
| .night-mode .navbar-nav .dropdown-menu { | ||||
| 	background-color: #333131 !important; | ||||
| } | ||||
|  | ||||
| .night-mode .navbar-nav .dropdown-divider { | ||||
| 	border-color: #383838 !important; | ||||
| 	background-color: #333131; | ||||
| } | ||||
|  | ||||
| .night-mode .sidenav-toggler { | ||||
| 	background-color: #383838 !important; | ||||
| 	border-right: 2px solid !important; | ||||
| 	border-color: #383838 !important; | ||||
| } | ||||
|  | ||||
| .night-mode .navbar-sidenav > li:hover, | ||||
| .night-mode .sidenav-second-level > li:hover, | ||||
| .night-mode .navbar-nav .dropdown-item:hover { | ||||
| 	box-shadow: inset 5px 0 0 #112a3f !important; | ||||
| 	background-color: #383838 !important; | ||||
| 	color: #c1c1c1 !important; | ||||
| } | ||||
|  | ||||
| .night-mode .navbar-sidenav > li > a:focus, | ||||
| .night-mode .sidenav-second-level > li > a:focus, | ||||
| .night-mode .navbar-nav .dropdown-item:focus { | ||||
| 	box-shadow: inset 5px 0 0 #350a0f !important; | ||||
| 	background-color: #383838 !important; | ||||
| 	color: #c1c1c1 !important; | ||||
| } | ||||
|  | ||||
| .night-mode .active-page { | ||||
| 	box-shadow: inset 5px 0 0 #350a0f !important; | ||||
| 	background-color: #383838 !important; | ||||
| } | ||||
|  | ||||
| .night-mode .toast-success { | ||||
| 	background-color: #092810; | ||||
| } | ||||
|  | ||||
| .night-mode .toast-error { | ||||
| 	background-color: #471015; | ||||
| } | ||||
|  | ||||
| .night-mode .typeahead .active { | ||||
| 	background-color: #333131; | ||||
| } | ||||
|  | ||||
| .night-mode .note-editor.note-frame .note-editing-area .note-editable { | ||||
|     color: #c1c1c1; | ||||
|     background-color: #333131; | ||||
| } | ||||
|  | ||||
| .night-mode .bootstrap-datetimepicker-widget table td.day { | ||||
|     background-color: #333131; | ||||
| } | ||||
|  | ||||
| .night-mode .bootstrap-datetimepicker-widget table td { | ||||
|     background-color: #333131; | ||||
| } | ||||
|  | ||||
| .night-mode .bootstrap-datetimepicker-widget table td,  | ||||
| .night-mode .bootstrap-datetimepicker-widget table th { | ||||
|     background-color: #333131; | ||||
| } | ||||
|  | ||||
| .night-mode .dropdown-menu { | ||||
|     background-color: #333131; | ||||
| } | ||||
| @@ -31,3 +31,36 @@ GetUriParam = function(key) | ||||
| 		} | ||||
| 	} | ||||
| }; | ||||
|  | ||||
| IsTouchInputDevice = function() | ||||
| { | ||||
| 	if (("ontouchstart" in window) || window.DocumentTouch && document instanceof DocumentTouch) | ||||
| 	{ | ||||
| 		return true; | ||||
| 	} | ||||
|  | ||||
| 	return false; | ||||
| } | ||||
|  | ||||
| BoolVal = function(test) | ||||
| { | ||||
| 	var anything = test.toString().toLowerCase(); | ||||
| 	if (anything === true || anything === "true" || anything === "1" || anything === "on") | ||||
| 	{ | ||||
| 		return true; | ||||
| 	} | ||||
| 	else | ||||
| 	{ | ||||
| 		return false; | ||||
| 	} | ||||
| } | ||||
|  | ||||
| GetFileNameFromPath = function(path) | ||||
| { | ||||
| 	return path.split("/").pop().split("\\").pop(); | ||||
| } | ||||
|  | ||||
| GetFileExtension = function(pathOrFileName) | ||||
| { | ||||
| 	return pathOrFileName.split(".").pop(); | ||||
| } | ||||
|   | ||||
| @@ -3,6 +3,22 @@ | ||||
| 	var localizedText = Grocy.LocalizationStrings[text]; | ||||
| 	if (localizedText === undefined) | ||||
| 	{ | ||||
| 		if (Grocy.Mode === 'dev') | ||||
| 		{ | ||||
| 			jsonData = {}; | ||||
| 			jsonData.text = text; | ||||
| 			Grocy.Api.Post('system/log-missing-localization', jsonData, | ||||
| 				function(result) | ||||
| 				{ | ||||
| 					// Nothing to do... | ||||
| 				}, | ||||
| 				function(xhr) | ||||
| 				{ | ||||
| 					Grocy.FrontendHelpers.ShowGenericError('Error while saving, probably this item already exists', xhr.response) | ||||
| 				} | ||||
| 			); | ||||
| 		} | ||||
|  | ||||
| 		localizedText = text; | ||||
| 	} | ||||
| 	 | ||||
| @@ -19,16 +35,64 @@ U = function(relativePath) | ||||
| 	return Grocy.BaseUrl.replace(/\/$/, '') + relativePath; | ||||
| } | ||||
|  | ||||
| Pluralize = function(number, singularForm, pluralForm) | ||||
| { | ||||
| 	var text = singularForm; | ||||
| 	if (number != 1 && pluralForm !== null && !pluralForm.isEmpty()) | ||||
| 	{ | ||||
| 		text = pluralForm; | ||||
| 	} | ||||
| 	return text; | ||||
| } | ||||
|  | ||||
| if (!Grocy.ActiveNav.isEmpty()) | ||||
| { | ||||
| 	var menuItem = $('#sidebarResponsive').find("[data-nav-for-page='" + Grocy.ActiveNav + "']"); | ||||
| 	menuItem.addClass('active-page'); | ||||
| }	 | ||||
|  | ||||
| 	var parentMenuSelector = menuItem.data("sub-menu-of"); | ||||
| 	if (typeof parentMenuSelector !== "undefined") | ||||
| 	{ | ||||
| 		$(parentMenuSelector).collapse("show"); | ||||
| 		$(parentMenuSelector).prev(".nav-link-collapse").addClass("active-page"); | ||||
| 	} | ||||
| } | ||||
|  | ||||
| var observer = new MutationObserver(function(mutations) | ||||
| { | ||||
| 	mutations.forEach(function(mutation) | ||||
| 	{ | ||||
| 		if (mutation.attributeName === "class") | ||||
| 		{ | ||||
| 			var attributeValue = $(mutation.target).prop(mutation.attributeName); | ||||
| 			if (attributeValue.contains("sidenav-toggled")) | ||||
| 			{ | ||||
| 				window.localStorage.setItem("sidebar_state", "collapsed"); | ||||
| 			} | ||||
| 			else | ||||
| 			{ | ||||
| 				window.localStorage.setItem("sidebar_state", "expanded"); | ||||
| 			} | ||||
| 		} | ||||
| 	}); | ||||
| }); | ||||
| observer.observe(document.body, { | ||||
| 	attributes: true | ||||
| }); | ||||
| if (window.localStorage.getItem("sidebar_state") === "collapsed") | ||||
| { | ||||
| 	$("#sidenavToggler").click(); | ||||
| } | ||||
|  | ||||
| $.timeago.settings.allowFuture = true; | ||||
| RefreshContextualTimeago = function() | ||||
| {	 | ||||
| 	$('time.timeago').timeago(); | ||||
| 	$("time.timeago").each(function() | ||||
| 	{ | ||||
| 		var element = $(this); | ||||
| 		var timestamp = element.attr("datetime"); | ||||
| 		element.timeago("update", timestamp); | ||||
| 	}); | ||||
| } | ||||
| RefreshContextualTimeago(); | ||||
|  | ||||
| @@ -43,6 +107,14 @@ window.FontAwesomeConfig = { | ||||
| 	searchPseudoElements: true | ||||
| } | ||||
|  | ||||
| // Don't show tooltips on touch input devices | ||||
| if (IsTouchInputDevice()) | ||||
| { | ||||
| 	var css = document.createElement("style"); | ||||
| 	css.innerHTML = ".tooltip { display: none; }"; | ||||
| 	document.body.appendChild(css); | ||||
| } | ||||
|  | ||||
| Grocy.Api = { }; | ||||
| Grocy.Api.Get = function(apiFunction, success, error) | ||||
| { | ||||
| @@ -105,6 +177,68 @@ Grocy.Api.Post = function(apiFunction, jsonData, success, error) | ||||
| 	xhr.send(JSON.stringify(jsonData)); | ||||
| }; | ||||
|  | ||||
| Grocy.Api.UploadFile = function(file, group, fileName, success, error) | ||||
| { | ||||
| 	var xhr = new XMLHttpRequest(); | ||||
| 	var url = U('/api/file/' + group + '?file_name=' + encodeURIComponent(fileName)); | ||||
|  | ||||
| 	xhr.onreadystatechange = function() | ||||
| 	{ | ||||
| 		if (xhr.readyState === XMLHttpRequest.DONE) | ||||
| 		{ | ||||
| 			if (xhr.status === 200) | ||||
| 			{ | ||||
| 				if (success) | ||||
| 				{ | ||||
| 					success(JSON.parse(xhr.responseText)); | ||||
| 				} | ||||
| 			} | ||||
| 			else | ||||
| 			{ | ||||
| 				if (error) | ||||
| 				{ | ||||
| 					error(xhr); | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 	}; | ||||
|  | ||||
| 	xhr.open('PUT', url, true); | ||||
| 	xhr.setRequestHeader('Content-type', 'application/octet-stream'); | ||||
| 	xhr.send(file); | ||||
| }; | ||||
|  | ||||
| Grocy.Api.DeleteFile = function(fileName, group, success, error) | ||||
| { | ||||
| 	var xhr = new XMLHttpRequest(); | ||||
| 	var url = U('/api/file/' + group + '?file_name=' + encodeURIComponent(fileName)); | ||||
|  | ||||
| 	xhr.onreadystatechange = function() | ||||
| 	{ | ||||
| 		if (xhr.readyState === XMLHttpRequest.DONE) | ||||
| 		{ | ||||
| 			if (xhr.status === 200) | ||||
| 			{ | ||||
| 				if (success) | ||||
| 				{ | ||||
| 					success(JSON.parse(xhr.responseText)); | ||||
| 				} | ||||
| 			} | ||||
| 			else | ||||
| 			{ | ||||
| 				if (error) | ||||
| 				{ | ||||
| 					error(xhr); | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 	}; | ||||
|  | ||||
| 	xhr.open('DELETE', url, true); | ||||
| 	xhr.setRequestHeader('Content-type', 'application/json'); | ||||
| 	xhr.send(); | ||||
| }; | ||||
|  | ||||
| Grocy.FrontendHelpers = { }; | ||||
| Grocy.FrontendHelpers.ValidateForm = function(formId) | ||||
| { | ||||
| @@ -120,3 +254,132 @@ Grocy.FrontendHelpers.ValidateForm = function(formId) | ||||
|  | ||||
| 	$(form).addClass('was-validated'); | ||||
| } | ||||
|  | ||||
| Grocy.FrontendHelpers.BeginUiBusy = function(formId = null) | ||||
| { | ||||
| 	$("body").addClass("cursor-busy"); | ||||
|  | ||||
| 	if (formId !== null) | ||||
| 	{ | ||||
| 		$("#" + formId + " :input").attr("disabled", true); | ||||
| 	} | ||||
| } | ||||
|  | ||||
| Grocy.FrontendHelpers.EndUiBusy = function(formId = null) | ||||
| { | ||||
| 	$("body").removeClass("cursor-busy"); | ||||
|  | ||||
| 	if (formId !== null) | ||||
| 	{ | ||||
| 		$("#" + formId + " :input").attr("disabled", false); | ||||
| 	} | ||||
| } | ||||
|  | ||||
| Grocy.FrontendHelpers.ShowGenericError = function(message, exception) | ||||
| { | ||||
| 	toastr.error(L(message) + '<br><br>' + L('Click to show technical details'), '', { | ||||
| 		onclick: function() | ||||
| 		{ | ||||
| 			bootbox.alert({ | ||||
| 				title: L('Error details'), | ||||
| 				message: JSON.stringify(exception, null, 4) | ||||
| 			}); | ||||
| 		} | ||||
| 	}); | ||||
| 	 | ||||
| 	console.error(exception); | ||||
| } | ||||
|  | ||||
| $("form").on("keyup paste", "input, textarea", function() | ||||
| { | ||||
| 	$(this).closest("form").addClass("is-dirty"); | ||||
| }); | ||||
| $("form").on("click", "select", function() | ||||
| { | ||||
| 	$(this).closest("form").addClass("is-dirty"); | ||||
| }); | ||||
|  | ||||
| // Auto saving user setting controls | ||||
| $(".user-setting-control").on("change", function() | ||||
| { | ||||
| 	var element = $(this); | ||||
| 	var settingKey = element.attr("data-setting-key"); | ||||
|  | ||||
| 	var inputType = "unknown"; | ||||
| 	if (typeof element.attr("type") !== typeof undefined && element.attr("type") !== false) | ||||
| 	{ | ||||
| 		inputType = element.attr("type").toLowerCase(); | ||||
| 	} | ||||
| 	 | ||||
| 	if (inputType === "checkbox") | ||||
| 	{ | ||||
| 		value = element.is(":checked"); | ||||
| 	} | ||||
| 	else | ||||
| 	{ | ||||
| 		var value = element.val(); | ||||
| 	} | ||||
| 	 | ||||
| 	Grocy.UserSettings[settingKey] = value; | ||||
| 	 | ||||
| 	jsonData = { }; | ||||
| 	jsonData.value = value; | ||||
| 	Grocy.Api.Post('user/settings/' + settingKey, jsonData, | ||||
| 		function(result) | ||||
| 		{ | ||||
| 			// Nothing to do... | ||||
| 		}, | ||||
| 		function(xhr) | ||||
| 		{ | ||||
| 			Grocy.FrontendHelpers.ShowGenericError('Error while saving, probably this item already exists', xhr.response) | ||||
| 		} | ||||
| 	); | ||||
| }); | ||||
|  | ||||
| // Show file name Bootstrap custom file input | ||||
| $('input.custom-file-input').on('change', function() | ||||
| { | ||||
| 	$(this).next('.custom-file-label').html(GetFileNameFromPath($(this).val())); | ||||
| }); | ||||
|  | ||||
| // Translation of "Browse"-button of Bootstrap custom file input | ||||
| if ($(".custom-file-label").length > 0) | ||||
| { | ||||
| 	$("<style>").html('.custom-file-label::after { content: "' + L("Select file") + '"; }').appendTo("head"); | ||||
| } | ||||
|  | ||||
| ResizeResponsiveEmbeds = function(fillEntireViewport = false) | ||||
| { | ||||
| 	if (!fillEntireViewport) | ||||
| 	{ | ||||
| 		var maxHeight = $("body").height() - $("#mainNav").outerHeight() - 62; | ||||
| 	} | ||||
| 	else | ||||
| 	{ | ||||
| 		var maxHeight = $("body").height(); | ||||
| 	} | ||||
| 	 | ||||
| 	$(".embed-responsive").attr("height", maxHeight.toString() + "px"); | ||||
| } | ||||
| $(window).on('resize', function() | ||||
| { | ||||
| 	ResizeResponsiveEmbeds($("body").hasClass("fullscreen-card")); | ||||
| }); | ||||
| $("iframe").on("load", function() | ||||
| { | ||||
| 	ResizeResponsiveEmbeds($("body").hasClass("fullscreen-card")); | ||||
| }); | ||||
|  | ||||
| function WindowMessageBag(message, payload = null) | ||||
| { | ||||
| 	var obj = { }; | ||||
| 	obj.Message = message; | ||||
| 	obj.Payload = payload; | ||||
| 	return obj; | ||||
| } | ||||
|  | ||||
| // Add border around anchor link section | ||||
| if (window.location.hash) | ||||
| { | ||||
| 	$(window.location.hash).addClass("p-2 border border-info rounded"); | ||||
| } | ||||
|   | ||||
							
								
								
									
										42
									
								
								public/js/grocy_clock.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								public/js/grocy_clock.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,42 @@ | ||||
| $("#show-clock-in-header").on("change", function () | ||||
| { | ||||
| 	CheckHeaderClockEnabled(); | ||||
| }); | ||||
|  | ||||
| function RefreshHeaderClock() | ||||
| { | ||||
| 	$("#clock-small").text(moment().format("l LT")); | ||||
| 	$("#clock-big").text(moment().format("LLLL")); | ||||
| } | ||||
|  | ||||
| Grocy.HeaderClockInterval = null; | ||||
| function CheckHeaderClockEnabled() | ||||
| { | ||||
| 	// Refresh the clock in the header every second when enabled | ||||
| 	if (BoolVal(Grocy.UserSettings.show_clock_in_header)) | ||||
| 	{ | ||||
| 		RefreshHeaderClock(); | ||||
| 		$("#clock-container").removeClass("d-none"); | ||||
|  | ||||
| 		Grocy.HeaderClockInterval = setInterval(function() | ||||
| 		{ | ||||
| 			RefreshHeaderClock(); | ||||
| 		}, 1000); | ||||
| 	} | ||||
| 	else | ||||
| 	{ | ||||
| 		if (Grocy.HeaderClockInterval !== null) | ||||
| 		{ | ||||
| 			clearInterval(Grocy.HeaderClockInterval); | ||||
| 			Grocy.HeaderClockInterval = null; | ||||
| 		} | ||||
|  | ||||
| 		$("#clock-container").addClass("d-none"); | ||||
| 	} | ||||
| } | ||||
| CheckHeaderClockEnabled(); | ||||
|  | ||||
| if (BoolVal(Grocy.UserSettings.show_clock_in_header)) | ||||
| { | ||||
| 	$("#show-clock-in-header").prop("checked", true); | ||||
| } | ||||
							
								
								
									
										62
									
								
								public/js/grocy_dbchangedhandling.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								public/js/grocy_dbchangedhandling.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,62 @@ | ||||
| Grocy.Api.Get('system/get-db-changed-time', | ||||
| 	function(result) | ||||
| 	{ | ||||
| 		Grocy.DatabaseChangedTime = moment(result.changed_time); | ||||
| 	}, | ||||
| 	function(xhr) | ||||
| 	{ | ||||
| 		console.error(xhr); | ||||
| 	} | ||||
| ); | ||||
|  | ||||
| // Check if the database has changed once a minute | ||||
| // If a change is detected, reload the current page, but only if already idling for at least 50 seconds, | ||||
| // when there is no unsaved form data and when the user enabled auto reloading | ||||
| setInterval(function() | ||||
| { | ||||
| 	Grocy.Api.Get('system/get-db-changed-time', | ||||
| 		function(result) | ||||
| 		{ | ||||
| 			var newDbChangedTime = moment(result.changed_time); | ||||
| 			if (newDbChangedTime.isAfter(Grocy.DatabaseChangedTime)) | ||||
| 			{ | ||||
| 				if (Grocy.IdleTime >= 50) | ||||
| 				{ | ||||
| 					if (BoolVal(Grocy.UserSettings.auto_reload_on_db_change) && $("form.is-dirty").length === 0 && !$("body").hasClass("fullscreen-card")) | ||||
| 					{ | ||||
| 						window.location.reload(); | ||||
| 					} | ||||
| 				} | ||||
|  | ||||
| 				Grocy.DatabaseChangedTime = newDbChangedTime; | ||||
| 			} | ||||
| 		}, | ||||
| 		function(xhr) | ||||
| 		{ | ||||
| 			console.error(xhr); | ||||
| 		} | ||||
| 	); | ||||
| }, 60000); | ||||
|  | ||||
| Grocy.IdleTime = 0; | ||||
| Grocy.ResetIdleTime = function() | ||||
| { | ||||
| 	Grocy.IdleTime = 0; | ||||
| } | ||||
| window.onmousemove = Grocy.ResetIdleTime; | ||||
| window.onmousedown = Grocy.ResetIdleTime; | ||||
| window.onclick = Grocy.ResetIdleTime; | ||||
| window.onscroll = Grocy.ResetIdleTime; | ||||
| window.onkeypress = Grocy.ResetIdleTime; | ||||
|  | ||||
| // Increase the idle time once every second | ||||
| // On any interaction it will be reset to 0 (see above) | ||||
| setInterval(function() | ||||
| { | ||||
| 	Grocy.IdleTime += 1; | ||||
| }, 1000); | ||||
|  | ||||
| if (BoolVal(Grocy.UserSettings.auto_reload_on_db_change)) | ||||
| { | ||||
| 	$("#auto-reload-enabled").prop("checked", true); | ||||
| } | ||||
							
								
								
									
										106
									
								
								public/js/grocy_nightmode.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										106
									
								
								public/js/grocy_nightmode.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,106 @@ | ||||
| $("#night-mode-enabled").on("change", function() | ||||
| { | ||||
| 	var value = $(this).is(":checked"); | ||||
| 	if (value) | ||||
| 	{ | ||||
| 		$("body").addClass("night-mode"); | ||||
| 	} | ||||
| 	else | ||||
| 	{ | ||||
| 		$("body").removeClass("night-mode"); | ||||
| 	} | ||||
| }); | ||||
|  | ||||
| $("#auto-night-mode-enabled").on("change", function() | ||||
| { | ||||
| 	var value = $(this).is(":checked"); | ||||
| 	$("#auto-night-mode-time-range-from").prop("readonly", !value); | ||||
| 	$("#auto-night-mode-time-range-to").prop("readonly", !value); | ||||
|  | ||||
| 	if (!value && !BoolVal(Grocy.UserSettings.night_mode_enabled)) | ||||
| 	{ | ||||
| 		$("body").removeClass("night-mode"); | ||||
| 	} | ||||
| }); | ||||
|  | ||||
| $(document).on("keyup", "#auto-night-mode-time-range-from, #auto-night-mode-time-range-to", function() | ||||
| { | ||||
| 	var value = $(this).val(); | ||||
| 	var valueIsValid = moment(value, "HH:mm", true).isValid(); | ||||
| 	 | ||||
| 	if (valueIsValid) | ||||
| 	{ | ||||
| 		$(this).removeClass("bg-danger"); | ||||
| 	} | ||||
| 	else | ||||
| 	{ | ||||
| 		$(this).addClass("bg-danger"); | ||||
| 	} | ||||
|  | ||||
| 	CheckNightMode(); | ||||
| }); | ||||
|  | ||||
| $("#auto-night-mode-time-range-goes-over-midgnight").on("change", function() | ||||
| { | ||||
| 	CheckNightMode(); | ||||
| }); | ||||
|  | ||||
| $("#night-mode-enabled").prop("checked", BoolVal(Grocy.UserSettings.night_mode_enabled)); | ||||
| $("#auto-night-mode-enabled").prop("checked", BoolVal(Grocy.UserSettings.auto_night_mode_enabled)); | ||||
| $("#auto-night-mode-time-range-goes-over-midgnight").prop("checked", BoolVal(Grocy.UserSettings.auto_night_mode_time_range_goes_over_midnight)); | ||||
| $("#auto-night-mode-enabled").trigger("change"); | ||||
| $("#auto-night-mode-time-range-from").val(Grocy.UserSettings.auto_night_mode_time_range_from); | ||||
| $("#auto-night-mode-time-range-from").trigger("keyup"); | ||||
| $("#auto-night-mode-time-range-to").val(Grocy.UserSettings.auto_night_mode_time_range_to); | ||||
| $("#auto-night-mode-time-range-to").trigger("keyup"); | ||||
|  | ||||
| function CheckNightMode() | ||||
| { | ||||
| 	if (!BoolVal(Grocy.UserSettings.auto_night_mode_enabled)) | ||||
| 	{ | ||||
| 		return; | ||||
| 	} | ||||
|  | ||||
| 	var start = moment(Grocy.UserSettings.auto_night_mode_time_range_from, "HH:mm", true); | ||||
| 	var end = moment(Grocy.UserSettings.auto_night_mode_time_range_to, "HH:mm", true); | ||||
| 	var now = moment(); | ||||
|  | ||||
| 	if (!start.isValid() || !end.isValid) | ||||
| 	{ | ||||
| 		return; | ||||
| 	} | ||||
|  | ||||
| 	if (BoolVal(Grocy.UserSettings.auto_night_mode_time_range_goes_over_midnight)) | ||||
| 	{ | ||||
| 		end.add(1, "day"); | ||||
| 	} | ||||
|  | ||||
| 	if (start.isSameOrBefore(now) && end.isSameOrAfter(now)) // We're INSIDE of night mode time range | ||||
| 	{ | ||||
| 		if (!$("body").hasClass("night-mode")) | ||||
| 		{ | ||||
| 			$("body").addClass("night-mode"); | ||||
| 			$("#currently-inside-night-mode-range").prop("checked", true); | ||||
| 			$("#currently-inside-night-mode-range").trigger("change"); | ||||
| 		} | ||||
| 	} | ||||
| 	else // We're OUTSIDE of night mode time range | ||||
| 	{ | ||||
| 		if ($("body").hasClass("night-mode")) | ||||
| 		{ | ||||
| 			$("body").removeClass("night-mode"); | ||||
| 			$("#currently-inside-night-mode-range").prop("checked", false); | ||||
| 			$("#currently-inside-night-mode-range").trigger("change"); | ||||
| 		}		 | ||||
| 	} | ||||
| } | ||||
| CheckNightMode(); | ||||
|  | ||||
| if (Grocy.Mode === "production") | ||||
| { | ||||
| 	setInterval(CheckNightMode, 60000); | ||||
| } | ||||
| else | ||||
| { | ||||
| 	setInterval(CheckNightMode, 4000); | ||||
| } | ||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user