Commit Graph

522 Commits

Author SHA1 Message Date
kriddles
64a2f5b25e dialogs for shopping list (#1103) 2020-10-29 17:09:35 +01:00
kriddles
9bbcdafab9 Add purchased date to inventory (#1102)
* Add purchased date to inventory

* Clarify stock settings label

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
2020-10-29 17:04:34 +01:00
fipwmaqzufheoxq92ebc
7ef9ffe041 Fixes #1092: Repair QR-Codes for API-Keys (#1093) 2020-10-25 08:42:58 +01:00
kriddles
ff254f8db2 stock entries button on product card (#1079) 2020-10-20 20:14:25 +02:00
kriddles
57aa6499eb display productCard when clicking item on shopping list (#1078) 2020-10-20 20:14:11 +02:00
kriddles
46e8123477 Allow price up to 4 decimals instead of 2 (#1077)
* Allow price to be 4 decimals

* remove logging

* Finalize custom decimal places by user setting

* Typo

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
2020-10-20 20:08:54 +02:00
Bernd Bestel
9e982979c3 Allow 4 decimals for all amount inputs (this now closes #998) 2020-10-19 20:25:42 +02:00
Bernd Bestel
9115645e19 Fixed consuming tare weight handling enabled products on the stock entries page (fixes #988) 2020-10-18 14:51:32 +02:00
Bernd Bestel
80cf68aeaa Allow no product for shopping list items & always in-/decrement by 1 when using the number input arrow buttons (fixes #964) 2020-10-18 14:27:23 +02:00
Bernd Bestel
7e08224c75 Fixed tooltip/model z-index (fixes #1065) 2020-10-18 14:13:39 +02:00
kriddles
f7a1634442 typo (#1062) 2020-10-18 13:57:10 +02:00
John M. Harris, Jr
2958ccfc14 Fix night mode (#1067)
This fixes a few lines of white when in night mode.

This change was done from a tablet, I can redo this commit properly on a computer when I get back home if needed. This just really annoyed me ;)
2020-10-18 13:54:33 +02:00
Bernd Bestel
e24f3143b5 Changelog/little naming changes/fixes/new translations strings for #1056 2020-10-17 11:03:47 +02:00
kriddles
cd65195532 add purchased date to purchase (#1056) 2020-10-17 10:54:10 +02:00
Bernd Bestel
235b96d17f Fixed recipe ingredient initial QU (fixes #1060) 2020-10-17 10:52:25 +02:00
kriddles
758a8d9708 fix for price and total price (#1057)
* fix for price and total price

* product card clarity
2020-10-15 19:55:58 +02:00
kriddles
5ae36e6ba8 Value information (#1045)
* viewjs stockoverview: add total value to stock overview

* view stockoverview.blade: add Value column

* refresh stockOverview value column

* Removed the total units info

* Properly format the total stock value number

* Added new localization strings

* Resolved merge conflict

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
2020-10-15 19:46:27 +02:00
Bernd Bestel
08644f95bf Revert "Excape HTML (where needed, for bootbox) (references #996)"
This reverts commit 0df2590de2.

Revert "Excape shopping list item notes (references #996)"

This reverts commit 0624b0df59.
2020-10-14 22:58:26 +02:00
fipwmaqzufheoxq92ebc
a85998dd40 Improvements (#1049)
* Fixes #1035: Check available amount after filtering by stock_entry_id

* Fixes #1036: Remove stock-related buttons/options from Shopping-list  if FEATURE_FLAG_STOCK is disabled

* Fixes #1010: Repair recipe-picture upload.

* Fixes #958: Disable auto-reload of equipments-page.

* Fix uncaught exception in locationpicker.js

* Fixes #761 and #762: Add "Remove exact amount" for products with tare weight handling and use it for recipe-consumption.

* Fixes #1048: Repair product-group-filter on "Master Data"/Products

* Renamed variable

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
2020-10-14 17:48:37 +02:00
SourceFactory.at
617b25bda8 added button to add expired products to shoppinglist (#1026)
* added button to add expired products to shoppinglist

* Localizations are managed via Transifex

Revert "added button to add expired products to shoppinglist"

This reverts commit ad1ab5d6a0.

* Revert unnecessary change

* Reuse existing function (GetExpiringProducts) to get expired products

Co-authored-by: Mario Klug <mario.klug@sourcefactory.at>
Co-authored-by: Bernd Bestel <bernd@berrnd.de>
2020-10-04 15:20:34 +02:00
fipwmaqzufheoxq92ebc
b03e43b708 Ui fixes (#1018)
* Fixes #1005. Recipes: filter by stock-status in gallery

* Fixes #1017. Productform: Remove "Store"-Header from barcode-table if FEATURE_FLAG_STOCK_PRICE_TRACKING is not set.

* Fixed typo

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
2020-10-04 15:00:34 +02:00
Bernd Bestel
4b5b7bcb19 Applied formatting rules for by #1000 changed files 2020-09-14 11:20:29 +02:00
fipwmaqzufheoxq92ebc
5056ca9397 Some bug fixes. (#1000)
* Fix #997. Remove datetimepicker if FEATURE_FLAG_STOCK_BEST_BEFORE_DATE is not set.

* datetimepicker: Fix that SetValue did not set the value if "shortcut-checkbox" (e.g. "never expires") was checked.

* Use parent div as clickable area for checkboxes in dropdowns

* Fix nightmode-enable

* Fix possibly undefined variables in CalendarService.php

* Fix undefined variable in GenericEntityApiController.php

* Fix "Trying to access property barcodes on non-object" in productpicker

* Fix undefined "hintId" in shoppinglocationpicker

* Fix undefined variables in locationpicker.blade.php
2020-09-14 11:15:11 +02:00
Bernd Bestel
0df2590de2 Excape HTML (where needed, for bootbox) (references #996) 2020-09-08 18:10:30 +02:00
Bernd Bestel
22434c85f0 Applied formatting rules for by #995 changed files 2020-09-08 17:52:35 +02:00
Maximilian Bosch
34ffdb2b4b Adds a few small frontend fixes (#995)
* Add a few instructions to the readme on how to get `grocy` running locally

* Fix toggle for header-clock

I'm not 100% sure why, but with this change, the listener which calls
`CheckHeaderClockEnabled` will be invoked *before* the listener which
persists the setting.

If the setting is persisted before that, the clock doesn't show up when
enabling it in the settings-menu and appears/disappears in the exact
opposite way the setting is true/false.

* Allow replacing a product picture when removing it at first

Right now, a preview image of a product doesn't get updated when
pressing the delete-button at first and adding a new image the
upload-form which can be quite confusing for an end-user.

This patch allows to delete an image and add a new one in one go.

* Add `Save & return` button to product form

Same concept as for recipes: when pressing this button, the user will
stay at the form's site after saving.

* Removed unneeded class

* Revert "Add a few instructions to the readme on how to get `grocy` running locally"

This reverts commit 6ffad1d3c7.

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
2020-09-08 17:46:37 +02:00
fipwmaqzufheoxq92ebc
0454c128f0 Stock-Journal: API, Summary, Done By (#989)
* Stockjournal: Add "Done by"

* Add API for Stock-Journal

* Add "Journal-Summary"

* Use ALTER TABLE

* Moved the "Jounral summary" button to the stock journal page

* Changed icon & context menu position for new stock journal summary page

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
2020-09-06 13:18:51 +02:00
Bernd Bestel
7498d8f13d Applied formatting rules for by #986 changed files 2020-09-06 10:10:30 +02:00
fipwmaqzufheoxq92ebc
85a95f1973 Apikeys (#986)
* Add QR-Code for API-Url/Key

* Show only API-Keys for current user

* Allow only admin users to create custom API-Keys

* Use a managed package of qrcode-generator instead of a copy of the JS file

* Reuse existing localization string (API key)

* Center QR-Code in popups

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
2020-09-06 10:00:49 +02:00
Bernd Bestel
d4c5da2173 Applied PHP formatting rules 2020-08-31 20:40:31 +02:00
fipwmaqzufheoxq92ebc
07beee93a9 Add user-field-type "file" (#977)
* Add user-field-type "file"

* Add userfield-type "picture"

* Also limit image height on userfieldsform

* Prevent empty userfields (cause warnings in tables after deleting a file)

* Show files in dialogs

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
2020-08-31 20:07:46 +02:00
fipwmaqzufheoxq92ebc
6f8ad9b76e Locales: use http-accept-language or cookie (#976)
* Locales: use http-accept-language or "language"-cookie

* Add user-setting "locale"

Rename CULTURE to DEFAULT_LOCALE

* Use LocaleMiddleware also in dev mode

* CORS: don't require authentication on OPTIONS

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

* Fixed (broken by myself) link-return handling

* Clarify language settings

* Removed unneeded files

* Better user settings icon

* Added localization hints

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
2020-08-31 19:11:51 +02:00
Bernd Bestel
9cea0c77cd Applied VSCode JS formatting settings 2020-08-30 12:18:16 +02:00
Bernd Bestel
86300b7025 Refined permissions by existing feature structure (closes #971, references #960) 2020-08-29 18:31:28 +02:00
Bernd Bestel
3b0d29bed0 Applied EditorConfig settings to all files 2020-08-29 16:41:27 +02:00
fipwmaqzufheoxq92ebc
b7d1b21f1d [WIP] Implemented basic permissions (#960)
* Add permissions to Database & add "User"-classes

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

* Add some permissions.

* Add permission localization

* Add error handling.

* Error pages: only redirect on 404

* ExceptionController: return JSON-Response on api-routes

* Rename PRODUCT_ADD to PRODUCT_PURCHASE

* Move translation to new file

* Fix checkboxes stay selected on reload.

* Remove configurable User-implementation

* Remove MASTER_DATA_READ

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

* Add default permissions for new users

* When migration to permissions, everyone starts as ADMIN

* Permission-Localization: add to transifex & LocalizationService

* Review

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
2020-08-29 12:05:32 +02:00
Bernd Bestel
f28697e5b4 Added a "Clear filter" button on the stock overview page (closes #879) 2020-08-25 20:20:51 +02:00
Bernd Bestel
0b98504371 Don't hide the product row on the stock overview page if there are still child products in stock 2020-08-25 18:15:34 +02:00
Bernd Bestel
3b564294e3 Allow decimal amounts in general for the shopping list 2020-08-24 20:25:50 +02:00
Bernd Bestel
9d04d81744 Use correct amount for the success popup on the consume page (fixes #766) 2020-08-24 19:06:33 +02:00
Bernd Bestel
5c62377ba6 Don't trigger row select event on first column (fixes #791) 2020-08-24 18:42:32 +02:00
Bernd Bestel
a569048a3a Validate form after changing the QU on the recipe ingredient edit page (fixes #907) 2020-08-24 18:32:50 +02:00
Bernd Bestel
fa32258553 Only reload "Disable stock fulfillment checking for this ingredient" by the products default when creating a recipe ingredient (fixes #910) 2020-08-24 18:16:32 +02:00
Bernd Bestel
4d38614671 Reload recipe page after add/edit an ingredient (fixes #803) 2020-08-24 18:02:46 +02:00
Bernd Bestel
2c151fb4de Do an exact search for product group and location filters on the stock overview pages (fixes #778) 2020-08-24 17:57:43 +02:00
Andre Monteiro
b8cd5cd0b5 Additional configuration options for Quagga2 (#844) 2020-08-19 19:52:04 +02:00
Matthias B
88949dc3e4 Make product amount picker locale independent (#876)
Since the value of $('#amount') will be written to the database it should not be locale dependent. This code also limits the result to a maximum of 4 digits but always uses a dot as decimal separator.
2020-08-18 19:43:50 +02:00
Stefan Haller
623fce6c08 Run multi instances by making GROCY_DATAPATH customizable (#939)
Previously the data directory was fixed to the GROCY_DATAPATH constant.

This commit allows overriding the default GROCY_DATAPATH location by the
FastCGI parameter `GROCY_DATAPATH`. Relative paths are modified and get
rooted at the top level grocy installation directory.

The previous behaviour is preserved in case the new parameter is absent.

The following example nginx config snippet shows how to run multiple
instances.

```nginx
server {
    location /instance1/ {
        alias /var/www/grocy/;
        set $instance instance1;
        try_files $uri @grocy;
    }

    location /instane2/ {
        alias /var/www/grocy/;
        set $instance instance2;
        try_files $uri @grocy;
    }

    location @grocy {
        fastcgi_pass 127.0.0.1:9000;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME index.php;
        fastcgi_param GROCY_DATAPATH data/$instance;
    }
}
```
2020-08-18 18:10:26 +02:00
kriddles
e8845fe2e8 Qu factor purchase to stock & Product Barcode Details (#801)
* Puchase add qu_factor_to_stock

* qu_factor_purchase_to_stock for stock edit

* product barcodes with QU and Stores

* remove product barcode tags

* migrations/0103 add value and factor_puchase_amount to stock_current and stock_current_location_content

* Remove unused method

* StockService#GetProductDetails: include stock_value

* productcard: include stock_value

* Add Purchase Factor to Stock Overview

* update demo data with stock qu_factor_purchase_to_stock

* recipes_pos_resolved update

* avg_price and oldest_price in product details

* add average price to product card

* hint for recipe costs not included if not in stock

* Round value and factor_purchas_amount. Include currency for stock value

* Add factor_purchase_amount to product card stock amount

* Allow editing qu_factor_purchase_to_stock for stock entries

* fix update qu_factor_purchase_to_stock for Transfers

* Add barcode to existing product update to add to product_barcodes table

* Add barcode to new product workflow update to add to product_barcodes table

* *** Price now saved as 1 QU to stock in stock tables ***

* remove column product barcode and use product_barcodes

* Allow products to be deactivated instead of deleted

* Embedded barcode and qu-conversion with page reload on change

* Save current product barcode into new product_barcodes table

* Embedded popup for product group add/edit

* barcode scanner added to product barcodes input

* Edit product qu_stock is unavailable after first purchase

* StockOverview: Filters break when columns are reordered so for now just disable colReorder

* view stockoverview.blade: display product_group column

* Review

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
2020-08-17 21:47:33 +02:00
Bernd Bestel
9e824e1845 Little adjustments and changelog for #788 2020-04-24 17:51:48 +02:00