Compare commits

..

1 Commits

Author SHA1 Message Date
Egor Savkin bb971e23bf Add shuttler to the shop
Signed-off-by: Egor Savkin <es@m-labs.hk>
2023-10-10 16:47:18 +08:00
5 changed files with 14 additions and 55 deletions

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 42 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 34 KiB

File diff suppressed because one or more lines are too long

View File

@ -86,12 +86,10 @@ const copy = (
) => {
const destClone = Array.from(destination.items);
destClone.splice(droppableDestination.index, 0, ...draggableSource.map((dragged_item, _) => {
return {
...model[dragged_item],
id: uuidv4(),
}
}));
destClone.splice(droppableDestination.index, 0, {
...model[draggableSource],
id: uuidv4(),
});
return destClone;
};
@ -1635,12 +1633,10 @@ class Shop extends React.PureComponent {
}
componentDidMount() {
// index 0 is a Kasli, we place it as a default conf on the crate.
const source = {
droppableId: 'backlog',
indexes: [
itemsUnfoldedList.findIndex(element => element === "eem_pwr_mod"),
itemsUnfoldedList.findIndex(element => element === "kasli")
],
index: 0,
};
const destination = {
droppableId: 'cart',
@ -1949,14 +1945,7 @@ class Shop extends React.PureComponent {
source,
destination,
} = result;
let dragged_items = [];
if (source.indexes) {
source.indexes.forEach((card_index, _) => {
dragged_items.push(itemsUnfoldedList[card_index]);
})
} else if (source.index) {
dragged_items.push(itemsUnfoldedList[source.index]);
}
let dragged_item = itemsUnfoldedList[source.index];
if (!destination) {
@ -1995,7 +1984,7 @@ class Shop extends React.PureComponent {
this.state.items,
this.state.columns[source.droppableId],
this.state.columns[destination.droppableId],
dragged_items,
dragged_item,
destination,
),
},

View File

@ -870,7 +870,7 @@ const shop_data = {
},
'shuttler': {
id: 'shuttler',
name: 'DAC',
name: 'FMC/DAC',
name_number: '5716',
name_codename: 'Shuttler',
price: 8500,
@ -881,7 +881,7 @@ const shop_data = {
'~15 MHz analog bandwidth.',
'AD9117 DACs (14 bits @ 125 MSPS, <1 LSB DNL).',
'Differential analog output (+/-5 V differential) via COTS connector with shielded impedance-matched pairs (mini-SAS HD).',
'Included remote analog front-end (AFE) board converts differential signals on mini-SAS HD cables to single-ended, with additional gain/filtering as desired.',
'Remote analog front-end (AFE) board converts differential signals on mini-SAS HD cables to single-ended, with additional gain/filtering as desired.',
],
size: 'big',
type: null,
@ -912,34 +912,7 @@ const shop_data = {
nbrClockMax: 0,
slotOccupied: 1,
clockOccupied: 1,
},
'eem_pwr_mod': {
id: 'eem_pwr_mod',
name: 'EEM AC Power Module',
name_number: '1106',
name_codename: '',
price: 750,
image: '/shop/graphic-03_eem_pwr_mod.svg',
specs: [
"EEM AC power module.",
"400W with forced cooling (25CFM), 200W with free air convection.",
"Universal input.",
"IEC inlet on front panel.",
"EMC filter.",
"LED current indicator.",
"6 rear side outputs.",
"Mains circuit protected with steel cover.",
"Optional - external power brick will be shipped free of charge if removed."
],
size: 'big',
type: null,
hp: 8,
nbrSlotMin: 0,
nbrSlotMax: 0,
nbrClockMax: 0,
slotOccupied: 0,
clockOccupied: 0,
},
}
},
columns: {
@ -988,9 +961,7 @@ const shop_data = {
'koster',
'stabilizer',
'pounder',
'thermostat-eem',
'eem_pwr_mod',
]}
'thermostat-eem']}
],
},