diff --git a/modules/item/back/methods/fixed-price/upsertFixedPrice.js b/modules/item/back/methods/fixed-price/upsertFixedPrice.js index edbd23604..d815ed426 100644 --- a/modules/item/back/methods/fixed-price/upsertFixedPrice.js +++ b/modules/item/back/methods/fixed-price/upsertFixedPrice.js @@ -87,7 +87,7 @@ module.exports = Self => { await targetItem.updateAttributes({ minPrice: args.minPrice, - hasMinPrice: args.hasMinPrice + hasMinPrice: args.hasMinPrice ? args.hasMinPrice : false }, myOptions); const itemFields = [ diff --git a/modules/item/front/fixed-price/index.html b/modules/item/front/fixed-price/index.html index 43fe89552..584c4b14e 100644 --- a/modules/item/front/fixed-price/index.html +++ b/modules/item/front/fixed-price/index.html @@ -64,6 +64,7 @@ - {{price.name}} + {{itemFk.selection.name}}

{{price.subName}}

diff --git a/modules/item/front/fixed-price/index.js b/modules/item/front/fixed-price/index.js index 2eb53cfbd..1a7bf6466 100644 --- a/modules/item/front/fixed-price/index.js +++ b/modules/item/front/fixed-price/index.js @@ -36,7 +36,17 @@ export default class Controller extends Section { if (!this.$.model.data || this.$.model.data.length == 0) { this.$.model.data = []; this.$.model.proxiedData = []; - this.$.model.insert({}); + + const today = Date.vnNew(); + + const millisecsInDay = 86400000; + const daysInWeek = 7; + const nextWeek = new Date(today.getTime() + daysInWeek * millisecsInDay); + + this.$.model.insert({ + started: today, + ended: nextWeek + }); return; }