- Linting... Prettier...

This commit is contained in:
2019-08-07 01:59:10 -04:00
parent 3dc8589fb4
commit 847c9b192a
102 changed files with 2161 additions and 2109 deletions

View File

@@ -1,43 +1,43 @@
import { List, Record } from 'immutable';
export default class Item extends Record({
bidCount: 0,
bidIncrement: 10,
catalogNumber: null,
currentPrice: 0,
description: null,
donor: null,
end: null,
estimatedValue: null,
eventId: null,
hideAfterEnd: false,
hideBeforeStart: false,
id: null,
images: new List(),
isShippable: false,
notifyOnAvailable: false,
quantityAvailable: 1,
soldCount: 0,
start: null,
startingPrice: null,
subtitle: null,
title: null,
type: null,
shippingCost: 0,
bidCount: 0,
bidIncrement: 10,
catalogNumber: null,
currentPrice: 0,
description: null,
donor: null,
end: null,
estimatedValue: null,
eventId: null,
hideAfterEnd: false,
hideBeforeStart: false,
id: null,
images: new List(),
isShippable: false,
notifyOnAvailable: false,
quantityAvailable: 1,
soldCount: 0,
start: null,
startingPrice: null,
subtitle: null,
title: null,
type: null,
shippingCost: 0,
}) {
get isSoldOut() {
return this.quantityAvailable > this.soldCount;
}
get isSoldOut() {
return this.quantityAvailable > this.soldCount;
}
get totalWithShipping() {
return this.currentPrice + this.shippingCost;
}
get totalWithShipping() {
return this.currentPrice + this.shippingCost;
}
}
Item.fromJS = (data = {}) => {
return new Item({
id: data._id,
...data,
images: List(data.images),
});
return new Item({
id: data._id,
...data,
images: List(data.images),
});
};