mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-05 06:08:46 -05:00
fix rounding on new shopping list
This commit is contained in:
@@ -308,13 +308,13 @@ else:
|
|||||||
|
|
||||||
# SQLite testing DB
|
# SQLite testing DB
|
||||||
# DATABASES = {
|
# DATABASES = {
|
||||||
# 'default': {
|
# 'default': {
|
||||||
# 'ENGINE': 'django.db.backends.sqlite3',
|
# 'ENGINE': 'django.db.backends.sqlite3',
|
||||||
# 'OPTIONS': ast.literal_eval(os.getenv('DB_OPTIONS')) if os.getenv('DB_OPTIONS') else {},
|
# 'OPTIONS': ast.literal_eval(os.getenv('DB_OPTIONS')) if os.getenv('DB_OPTIONS') else {},
|
||||||
# 'NAME': 'db.sqlite3',
|
# 'NAME': 'db.sqlite3',
|
||||||
# 'CONN_MAX_AGE': 600,
|
# 'CONN_MAX_AGE': 600,
|
||||||
# }
|
# }
|
||||||
#}
|
# }
|
||||||
|
|
||||||
CACHES = {
|
CACHES = {
|
||||||
'default': {
|
'default': {
|
||||||
|
|||||||
@@ -682,7 +682,6 @@ export default {
|
|||||||
|
|
||||||
this.settings = getUserPreference()
|
this.settings = getUserPreference()
|
||||||
this.delay = Number(this.settings.default_delay || 4)
|
this.delay = Number(this.settings.default_delay || 4)
|
||||||
console.log(this.delay)
|
|
||||||
this.supermarket_categories_only = this.settings.filter_to_supermarket
|
this.supermarket_categories_only = this.settings.filter_to_supermarket
|
||||||
if (this.settings.shopping_auto_sync) {
|
if (this.settings.shopping_auto_sync) {
|
||||||
window.addEventListener("online", this.updateOnlineStatus)
|
window.addEventListener("online", this.updateOnlineStatus)
|
||||||
|
|||||||
@@ -151,6 +151,9 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
for (const [k, v] of Object.entries(amount)) {
|
||||||
|
amount[k] = Math.round(v * 100 + Number.EPSILON) / 100 // javascript hack to force rounding at 2 places
|
||||||
|
}
|
||||||
return amount
|
return amount
|
||||||
},
|
},
|
||||||
formatCategory: function () {
|
formatCategory: function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user