fix(place-order): Uses global currency
This commit is contained in:
parent
be59ae8032
commit
7a294c4cc3
@ -801,6 +801,7 @@ class OrderSumary extends React.PureComponent {
|
||||
|
||||
static get propTypes() {
|
||||
return {
|
||||
currency: PropTypes.string,
|
||||
modes: PropTypes.array,
|
||||
currentMode: PropTypes.string,
|
||||
summary: PropTypes.array,
|
||||
@ -861,6 +862,7 @@ class OrderSumary extends React.PureComponent {
|
||||
|
||||
render() {
|
||||
const {
|
||||
currency,
|
||||
modes,
|
||||
currentMode,
|
||||
summary,
|
||||
@ -889,7 +891,7 @@ class OrderSumary extends React.PureComponent {
|
||||
<tr>
|
||||
<td className="item-card-name">{mode.name}</td>
|
||||
<td className="price">
|
||||
{`${mode.currency} ${mode.price}`}
|
||||
{`${currency} ${mode.price}`}
|
||||
|
||||
<button style={{'opacity': '0', 'cursor': 'initial'}}>
|
||||
<img src="/images/shop/icon-remove.svg" />
|
||||
@ -925,7 +927,7 @@ class OrderSumary extends React.PureComponent {
|
||||
|
||||
<td className="price">
|
||||
<div>
|
||||
{`${item.currency} ${item.price}`}
|
||||
{`${currency} ${item.price}`}
|
||||
|
||||
<button onClick={this.handleOnDeleteItem.bind(this, index)}>
|
||||
<img src="/images/shop/icon-remove.svg" />
|
||||
@ -950,13 +952,13 @@ class OrderSumary extends React.PureComponent {
|
||||
<td className="item-card-name">Price estimate</td>
|
||||
<td className="price">
|
||||
{summary.length ? (
|
||||
`${summary[0].currency} ${summary.reduce(
|
||||
`${currency} ${summary.reduce(
|
||||
(prev, next) => {
|
||||
return prev + next.price;
|
||||
}, 0
|
||||
) + mode.price}`
|
||||
) : (
|
||||
`${mode.currency} ${mode.price}`
|
||||
`${currency} ${mode.price}`
|
||||
)}
|
||||
|
||||
<button style={{'opacity': '0', 'cursor': 'initial'}}>
|
||||
@ -981,6 +983,7 @@ class Backlog extends React.PureComponent {
|
||||
|
||||
static get propTypes() {
|
||||
return {
|
||||
currency: PropTypes.string,
|
||||
data: PropTypes.object.isRequired,
|
||||
items: PropTypes.object,
|
||||
onClickAddItem: PropTypes.func,
|
||||
@ -995,6 +998,7 @@ class Backlog extends React.PureComponent {
|
||||
|
||||
render() {
|
||||
const {
|
||||
currency,
|
||||
data,
|
||||
items,
|
||||
onClickAddItem,
|
||||
@ -1009,7 +1013,7 @@ class Backlog extends React.PureComponent {
|
||||
index={index}
|
||||
name={item.name}
|
||||
price={item.price}
|
||||
currency={item.currency}
|
||||
currency={currency}
|
||||
image={`/images/${item.image}`}
|
||||
specs={item.specs}
|
||||
onClickAddItem={onClickAddItem}
|
||||
@ -1632,6 +1636,7 @@ class Shop extends React.PureComponent {
|
||||
render() {
|
||||
|
||||
const {
|
||||
currency,
|
||||
currentItemHovered,
|
||||
currentMode,
|
||||
crateModeSlots,
|
||||
@ -1648,6 +1653,7 @@ class Shop extends React.PureComponent {
|
||||
className="shop"
|
||||
aside={
|
||||
<Backlog
|
||||
currency={currency}
|
||||
items={items}
|
||||
data={columns['backlog']}
|
||||
onClickAddItem={this.handleClickAddItem}>
|
||||
@ -1684,6 +1690,7 @@ class Shop extends React.PureComponent {
|
||||
}
|
||||
summaryPrice={
|
||||
<OrderSumary
|
||||
currency={currency}
|
||||
currentMode={currentMode}
|
||||
modes={crateModeItems}
|
||||
summary={columns['cart'].items}
|
||||
|
@ -2,6 +2,7 @@ const shop_data = {
|
||||
|
||||
currentItemHovered: null,
|
||||
currentMode: 'rack',
|
||||
currency: 'EUR',
|
||||
|
||||
crateModeSlots: {
|
||||
rack: 21,
|
||||
@ -22,12 +23,10 @@ const shop_data = {
|
||||
id: 'rack',
|
||||
name: 'Rack mountable crate',
|
||||
price: 1000,
|
||||
currency: 'USD',
|
||||
}, {
|
||||
id: 'desktop',
|
||||
name: 'Desktop crate',
|
||||
price: 2000,
|
||||
currency: 'USD',
|
||||
}],
|
||||
|
||||
items: {
|
||||
@ -36,7 +35,6 @@ const shop_data = {
|
||||
id: 'kasli',
|
||||
name: 'Kasli',
|
||||
price: 1000,
|
||||
currency: 'USD',
|
||||
image: '/shop/graphic-02_kasli.svg',
|
||||
specs: [
|
||||
'Artix 7 100T FPGA',
|
||||
@ -98,7 +96,6 @@ const shop_data = {
|
||||
id: 'kasli-backplane',
|
||||
name: 'Kasli',
|
||||
price: 1000,
|
||||
currency: 'USD',
|
||||
image: '/shop/graphic-02_kasli-with-backplane.svg',
|
||||
specs: [
|
||||
'Artix 7 100T FPGA',
|
||||
@ -160,7 +157,6 @@ const shop_data = {
|
||||
id: 'bnc-dio',
|
||||
name: 'BNC-DIO',
|
||||
price: 1000,
|
||||
currency: 'USD',
|
||||
image: '/shop/graphic-02_BNC-DIO.svg',
|
||||
specs: [
|
||||
'Artix 7 100T FPGA',
|
||||
@ -196,7 +192,6 @@ const shop_data = {
|
||||
id: 'eem-octal',
|
||||
name: 'SMA-DIO',
|
||||
price: 1000,
|
||||
currency: 'USD',
|
||||
image: '/shop/graphic-02_EEM-Octal.svg',
|
||||
specs: [
|
||||
'Artix 7 100T FPGA',
|
||||
@ -232,7 +227,6 @@ const shop_data = {
|
||||
id: 'eem-16x',
|
||||
name: 'RJ45-DIO',
|
||||
price: 1000,
|
||||
currency: 'USD',
|
||||
image: '/shop/graphic-02_EEM-16x.svg',
|
||||
specs: [
|
||||
'Artix 7 100T FPGA',
|
||||
@ -268,7 +262,6 @@ const shop_data = {
|
||||
id: 'urukul',
|
||||
name: 'Urukul',
|
||||
price: 1000,
|
||||
currency: 'USD',
|
||||
image: '/shop/graphic-02_Urukul.svg',
|
||||
specs: [
|
||||
'Artix 7 100T FPGA',
|
||||
@ -310,7 +303,6 @@ const shop_data = {
|
||||
id: 'zotino',
|
||||
name: 'Zotino',
|
||||
price: 1000,
|
||||
currency: 'USD',
|
||||
image: '/shop/graphic-02_zotino.svg',
|
||||
specs: [
|
||||
'Artix 7 100T FPGA',
|
||||
@ -366,7 +358,6 @@ const shop_data = {
|
||||
id: 'idc-bnc-adapter',
|
||||
name: 'IDC-BNC',
|
||||
price: 1000,
|
||||
currency: 'USD',
|
||||
image: '/shop/graphic-02_IDC-BNC-adapter.svg',
|
||||
specs: [
|
||||
'Artix 7 100T FPGA',
|
||||
@ -395,7 +386,6 @@ const shop_data = {
|
||||
id:'hd68-idc-adapter',
|
||||
name: 'HD68-IDC',
|
||||
price: 1000,
|
||||
currency: 'USD',
|
||||
image: '/shop/graphic-02_HD68.svg',
|
||||
specs: [
|
||||
'Artix 7 100T FPGA',
|
||||
@ -444,7 +434,6 @@ const shop_data = {
|
||||
id: 'novo',
|
||||
name: 'Novo',
|
||||
price: 1000,
|
||||
currency: 'USD',
|
||||
image: '/shop/graphic-02_Novo.svg',
|
||||
specs: [
|
||||
'Artix 7 100T FPGA',
|
||||
@ -486,7 +475,6 @@ const shop_data = {
|
||||
id: 'koster',
|
||||
name: 'Koster',
|
||||
price: 1000,
|
||||
currency: 'USD',
|
||||
image: '/shop/graphic-02_Koster.svg',
|
||||
specs: [
|
||||
'Artix 7 100T FPGA',
|
||||
@ -528,7 +516,6 @@ const shop_data = {
|
||||
id: 'clocker',
|
||||
name: 'Clocker',
|
||||
price: 1000,
|
||||
currency: 'USD',
|
||||
image: '/shop/graphic-02_Clocker.svg',
|
||||
specs: [
|
||||
'Artix 7 100T FPGA',
|
||||
@ -570,7 +557,6 @@ const shop_data = {
|
||||
id: 'stabiliser',
|
||||
name: 'Stabilizer',
|
||||
price: 1000,
|
||||
currency: 'USD',
|
||||
image: '/shop/graphic-02_Stabiliser.svg',
|
||||
specs: [
|
||||
'Artix 7 100T FPGA',
|
||||
@ -598,7 +584,6 @@ const shop_data = {
|
||||
id: 'mirny',
|
||||
name: 'Mirny',
|
||||
price: 1000,
|
||||
currency: 'USD',
|
||||
image: '/shop/graphic-02_Mirny.svg',
|
||||
specs: [
|
||||
'Artix 7 100T FPGA',
|
||||
|
Loading…
Reference in New Issue
Block a user