This *absolute commit monster* does the following things:
- Introduce gulp to build javascript and css files.
This includes moving node_modules out of the public/ folder.
Use `gulp --tasks` to get a list of all tasks; however some
of them are automatically generated.
Use `gulp live` to watch for changes and automatically recompile
what's needed.
- Upgrade to yarn2
- Upgrade FullCalendar to 4.4.2
I know that 5.x is the current version, but two major version upgrades
are too much right now. Also v5 would break any custom css as they
renamed a bunch of classes.
- Move Styles to sass
(Most) global styles are now included in one sass file. This also
means that we now compile our own bootstrap.
- Javascript is now in strict mode
Because everything is a module now, `use strict` is now in effect
for all javascript files. There are probably still some parts left
where implicit variable declarations were used.
- grocy*.js were split up in modules.
`window.Grocy` is now an instance of GrocyClass. API-wise nothing
has changed (albeit some functions were added regarding Undo actions)
At the Moment, this leaks a whole bunch of functions into window
(that was easier than tracking those down).
- FindObjectIn... style functions were removed.
Array.prototype.find and Array.prototype.filter suffice.
- Use babel to preprocess javascript.
- Use rollup to bundle javascript.
rollup bundles and tree-shakes es6 javascript bundles.
It also allows to "import" css files and generate css
files specific to this javascript file. This is used
in viewjs scripts, for example when importing FullCalendar,
to generate an associated viewcss file.
- Use postcss to post-process css files.
postcss uses autoprefixer to handle browser compatiblity.
Internally this uses the package `browserslist`; and is currently
configured to the default setting.
- Minify assets when building in production
`gulp publish` builds all assets in production mode, that is,
the assets get minified. This includes javascript as well as
css files.
- css bundling
concatCss is used to pull @imports of non-sass-files into one
grocy.css
- animate.css is now in the main bundle
animate.css was used in so many places that it is now located
in the main style bundle.
* 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>
* Add missing translation for de
* Add option to set best-before-date field input-type to number
This allows faster input in mobile devices
* Fix datetimepicker with inputmode
* Fix datatimepicker with numeric input
* Add missing translation for de
* Add option to set best-before-date field input-type to number
This allows faster input in mobile devices
* Fix datetimepicker with inputmode
* Fix datatimepicker with numeric input
* Use more precise name for number pad option
* Update localization/de/strings.po
Co-Authored-By: Bernd Bestel <bernd@berrnd.de>
* Fix merge conflict
* Fix merge conflict try 2
Co-authored-by: Michael Neuendorf <neuendorf@gonicus.de>
Co-authored-by: Bernd Bestel <bernd@berrnd.de>
* viewjs consume: implement location and update stock specific
* Transfer Products
* services StockService#GetProductStockEntriesByLocation: add method
* services StockService#AddProduct: check for stock and locations
* services StockService: include location_id
* services StockService#LocationExists: add method
* services StockService#UndoBooking: fix based on stockRow
* Reimplement StockServer->TransferProduct (one loop for the whole action to preserve stock_id)
* Ensure that the location_id is never NULL in the stock and stock_log table (checked by an INSERT trigger, sets the products default location if empty)
* Only consider stock amount at the given location on consume, if supplied
* Restore more/old display text for "specific stock entry"
* Don't allow transfering tare weight enabled products
* Various small changes (code style, missing OpenAPI endpoint, remove location_id null checking)
* Updated translations strings
* Added transaction_id and correlation_id to stock_log entries to group them together
* ProductCard - location to default location label change
* Also undo correlated bookings on undo
* Added API endpoints for listing and undoing transactions and use them on purchase/consume/inventory/stockoverview
* Initial Stock detail page
* Allow Undo for Tranfers
* Price step to .01
* Some localization string changes & fixes