Commit Graph

1576 Commits

Author SHA1 Message Date
Katharina Bogad
71ccd22d3c eslint: js/viewjs/mealplan.js
Also, I simplified the rendering code for the events a bit.
Day recepie rendering is now deduped.
2021-06-18 19:49:46 +02:00
Katharina Bogad
d6eb70496f eslint: grocy.js 2021-06-18 19:32:57 +02:00
Katharina Bogad
378e2d7aad gulp: Add eslint and config 2021-06-18 19:32:22 +02:00
Katharina Bogad
f7bc6a3f6d Modernize Javascript
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.
2021-06-18 12:44:39 +02:00
Bernd Bestel
fe59fac1c3
Fixed client side webhook runner (references #1500) 2021-06-13 08:40:16 +02:00
Bernd Bestel
26979a4321
Set HTMLPurifier cache path (fixes #1497) 2021-06-12 20:56:58 +02:00
Kendell R
a0e5f45da3
More night mode improvements (#1336)
* More night mode improvements

* Update grocy_night_mode.css

* Update extensions.js

* Update grocy_night_mode.css

* Update public/css/grocy_night_mode.css
2021-06-12 20:39:08 +02:00
Bernd Bestel
739379fabb
Fixed stock entry grocycode download (references #1500) 2021-06-12 20:15:48 +02:00
Bernd Bestel
96fff2e5f4
Added changelog for #1500 2021-06-12 17:21:48 +02:00
Katharina Bogad
2471e78188
Grocycode, label printing (#1500)
* Grocycode: Productpicker, StockService

* Grocycode: Datamatrix generation

* Grocycode: Display in UI, make Images downloadable

* Grocycode: Do not show on product card

* Grocycode: Stockentry Label view

* Grocycode: Webhooks & Labelprinter Feature

* Grocycode: Manual Label printing

* Grocycode: Print Label from product form

* Quagga2: use zxing for DataMatrix recognition

* Grocycode: Default settings for label printing

* Prepare merge of master

* Grocycode: docs

* Docs: label printing webhook

* Review

- "grocy" is currently written lower-case everywhere, so let's do this also for "grocycode"
- Unified phrases / capitalization
- Minor UI adjustments (mainly context menu item ordering / ordering/spacing on product edit page)
- Documented API changes for Swagger UI (grocy.openapi.json)
- Reverted German localizations (those are managed via Transifex; would cause conflicts when manually edited - will import them later there)
- Reverted a somehow messed up localization string (productform/help text for `cumulate_min_stock_amount_of_sub_products`)
- Suppress deprecation warnings when generating Datamatrix PNG (otherwise the PNG is invalid, https://github.com/jucksearm/php-barcode/issues/3)
- Default `FEATURE_FLAG_LABELPRINTER` to disabled

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
2021-06-12 17:21:12 +02:00
Bernd Bestel
d23fda245e
Fixed that the number picker up/down buttons did not work when the input field was empty or contained an invalid number 2021-03-31 22:26:27 +02:00
Bernd Bestel
791a17fcad
Default shopping list item amount to 1 2021-03-31 22:22:28 +02:00
Bernd Bestel
dabc48fed3
Typo 2021-03-31 22:15:41 +02:00
rozgonik
980778e599
Fix untranslateable hint values (#1435) 2021-03-31 22:14:42 +02:00
Kai
68c5fd0617
Update README.md (#1432) 2021-03-31 22:14:05 +02:00
Edward Betts
7bbcec91aa
Correct spelling (#1420) 2021-03-31 22:12:51 +02:00
Bernd Bestel
c483c34598
Display calories always per single serving (fixes #1359) 2021-02-21 20:57:34 +01:00
Bernd Bestel
906a9db628
Fixed embedded /transfer from /stockentries (fixes #1303) 2021-02-21 19:36:37 +01:00
Bernd Bestel
5583074001
Don't initialise numeric Userfields with 1.0 (fixes #1312) 2021-02-21 19:14:49 +01:00
Bernd Bestel
e4c8f6b023
Don't require 1 to be in stock for "Only check if any amount is in stock" 2021-02-21 19:10:10 +01:00
Bernd Bestel
4555bf3b63
Enforce product barcodes to be unique (references #1205) 2021-02-21 18:55:48 +01:00
Bernd Bestel
2aca551692
Fixed product page QU conversion hint pluralisation (fixes #1352) 2021-02-21 18:24:04 +01:00
Bernd Bestel
f5eff8ab49
Include due_type = "Expiration date" products in /stock/volatile API endpoint (fixes #1372) 2021-02-21 18:18:34 +01:00
Bernd Bestel
36f5fb23e9
Added changelog for #1347 2021-02-21 18:13:16 +01:00
Lauri Niskanen
33dcd17fbd
Fix rounding error on total value calculation (#1347)
* Fix rounding error on total value calculation

* Remove unused 'amountSum' calculation
2021-02-21 18:10:41 +01:00
Bernd Bestel
3d82c9abbd
Disabled platform-check (references #1285) 2021-02-18 12:14:57 +01:00
Bernd Bestel
779ac31ffe
Added changelog for #1332 2021-02-14 12:56:21 +01:00
Lauri Niskanen
0a6c7d73a7
Hide unsuitable fields from printed recipe pages (#1332)
* Hide unsuitable fields from printed recipe pages

Resolves #1330.

* Use proper total energy label in the recipe page
2021-02-14 12:55:01 +01:00
Bernd Bestel
fc05044353
Added changelog for #1331 2021-02-14 12:51:40 +01:00
Kendell R
55ac768521
Night mode improvements (#1331)
* Night mode readability improvements

* Update grocy_night_mode.css

* Update grocy_night_mode.css
2021-02-14 12:49:44 +01:00
Bernd Bestel
a455a01204
Fixed print layout display handling (fixes #1272) 2021-01-30 13:11:40 +01:00
Bernd Bestel
8b963ae0f1
Merge branch 'master' of https://github.com/grocy/grocy 2021-01-30 13:07:16 +01:00
Bernd Bestel
a1adc80c29
Fixed consuming Scan Mode timing (fixes #1292) 2021-01-30 13:06:44 +01:00
Marius Boro
760914bf82
Update grocy_night_mode.css (#1269)
Night mode updates for Grocy 3
2021-01-30 12:49:51 +01:00
Bernd Bestel
42689ecefe
Added changelog for #1297 2021-01-30 12:49:17 +01:00
Marc Ole Bulling
c889416c0a
Fix for #1289 and #1261 (#1297) 2021-01-30 12:47:12 +01:00
Bernd Bestel
bfb5525ec1
Added changelog for #1286 2021-01-30 12:41:09 +01:00
Marc Ole Bulling
20380faeb3
Fix for #1271 (#1286) 2021-01-30 12:39:10 +01:00
Bernd Bestel
5ecd3a585e
Added changelog for #1269 2021-01-12 18:14:32 +01:00
Bernd Bestel
bfa3347a20
Fixed that editing stock entries was not possible (fixes #1268) 2021-01-12 18:04:20 +01:00
Bernd Bestel
e42f4b405d
Fixed PHP warning (fixes #1267) 2021-01-12 10:40:14 +01:00
Bernd Bestel
27169e1428
Fixed constant typo (fixes #1260) 2021-01-06 09:31:36 +01:00
Bernd Bestel
4a4d9c451f
Prepared next release 2021-01-05 10:54:32 +01:00
Bernd Bestel
ced709bbf9
Auto create the data/viewcache folder if it doesn't exist (however) 2021-01-05 10:52:23 +01:00
Bernd Bestel
4a8d4120e1
Updated dependencies 2021-01-05 10:48:28 +01:00
Bernd Bestel
8f877dc716
Pulled translations from Transifex 2021-01-05 10:45:09 +01:00
Bernd Bestel
45abc99a77
Use barcode amounts also for Consume/Transfer/Inventory (closes #1254) 2021-01-04 21:59:19 +01:00
Bernd Bestel
d78e156609
Use barcode defaults also for scan mode (fixes #1253) 2021-01-04 21:15:22 +01:00
Bernd Bestel
030939e013
Typo 2021-01-03 22:42:16 +01:00
Bernd Bestel
a646f2c6bd
Fixed included recipe missing amount resolving (references #1252) 2021-01-03 22:40:33 +01:00