shop: group cards #67
|
@ -77,7 +77,7 @@ const copy = (
|
||||||
droppableSource,
|
droppableSource,
|
||||||
droppableDestination
|
droppableDestination
|
||||||
) => {
|
) => {
|
||||||
const sourceClone = Array.from(source.itemIds);
|
const sourceClone = Array.from(source.categories.map(groupId => groupId.itemIds).flat());
|
||||||
const destClone = Array.from(destination.items);
|
const destClone = Array.from(destination.items);
|
||||||
const item = sourceClone[droppableSource.index];
|
const item = sourceClone[droppableSource.index];
|
||||||
|
|
||||||
|
@ -1515,7 +1515,8 @@ class Backlog extends React.PureComponent {
|
||||||
isMobile,
|
isMobile,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
const ordered_items = data.itemIds.map(itemId => items[itemId]);
|
|
||||||
|
const ordered_items = data.categories.map(groupItem => groupItem.itemIds.map(itemId => items[itemId])).flat();
|
||||||
const products = ordered_items.map((item, index) => {
|
const products = ordered_items.map((item, index) => {
|
||||||
return (
|
return (
|
||||||
<ProductItem
|
<ProductItem
|
||||||
|
|
|
@ -108,7 +108,9 @@ var nbrClocksStyle = function nbrClocksStyle(data) {
|
||||||
};
|
};
|
||||||
|
|
||||||
var copy = function copy(model, source, destination, droppableSource, droppableDestination) {
|
var copy = function copy(model, source, destination, droppableSource, droppableDestination) {
|
||||||
var sourceClone = Array.from(source.itemIds);
|
var sourceClone = Array.from(source.categories.map(function (groupId) {
|
||||||
|
return groupId.itemIds;
|
||||||
|
}).flat());
|
||||||
var destClone = Array.from(destination.items);
|
var destClone = Array.from(destination.items);
|
||||||
var item = sourceClone[droppableSource.index];
|
var item = sourceClone[droppableSource.index];
|
||||||
destClone.splice(droppableDestination.index, 0, _objectSpread({}, model[item], {
|
destClone.splice(droppableDestination.index, 0, _objectSpread({}, model[item], {
|
||||||
|
@ -1551,9 +1553,11 @@ var Backlog = /*#__PURE__*/function (_React$PureComponent11) {
|
||||||
onClickAddItem = _this$props11.onClickAddItem,
|
onClickAddItem = _this$props11.onClickAddItem,
|
||||||
onClickToggleMobileSideMenu = _this$props11.onClickToggleMobileSideMenu,
|
onClickToggleMobileSideMenu = _this$props11.onClickToggleMobileSideMenu,
|
||||||
isMobile = _this$props11.isMobile;
|
isMobile = _this$props11.isMobile;
|
||||||
var ordered_items = data.itemIds.map(function (itemId) {
|
var ordered_items = data.categories.map(function (groupItem) {
|
||||||
return items[itemId];
|
return groupItem.itemIds.map(function (itemId) {
|
||||||
});
|
return items[itemId];
|
||||||
|
});
|
||||||
|
}).flat();
|
||||||
var products = ordered_items.map(function (item, index) {
|
var products = ordered_items.map(function (item, index) {
|
||||||
return /*#__PURE__*/React.createElement(ProductItem, {
|
return /*#__PURE__*/React.createElement(ProductItem, {
|
||||||
key: item.id,
|
key: item.id,
|
||||||
|
|
|
@ -855,28 +855,40 @@ const shop_data = {
|
||||||
id: 'backlog',
|
id: 'backlog',
|
||||||
title: 'Backlog',
|
title: 'Backlog',
|
||||||
/* itemIds define items order - change order to suit your need */
|
/* itemIds define items order - change order to suit your need */
|
||||||
itemIds: [
|
categories: [
|
||||||
'kasli',
|
{ name: 'Core',
|
||||||
'kaslisoc',
|
itemIds: [
|
||||||
'bnc-dio',
|
'kasli',
|
||||||
'sma-dio',
|
'kaslisoc']},
|
||||||
'mcx-dio',
|
{ name: 'TTL',
|
||||||
'rj45-dio',
|
itemIds: [
|
||||||
'urukul',
|
'bnc-dio',
|
||||||
'phaser',
|
'sma-dio',
|
||||||
'mirny',
|
'mcx-dio',
|
||||||
'almazny',
|
'rj45-dio']},
|
||||||
'zotino',
|
{ name: 'RF',
|
||||||
'fastino',
|
itemIds: [
|
||||||
'idc-bnc-adapter',
|
'clocker',
|
||||||
'idc-sma-adapter',
|
'urukul',
|
||||||
'idc-mcx-adapter',
|
'phaser',
|
||||||
'hd68-idc-adapter',
|
'mirny',
|
||||||
'novo',
|
'almazny']},
|
||||||
'koster',
|
{ name: 'DAC/ADC',
|
||||||
'clocker',
|
itemIds: [
|
||||||
'stabilizer',
|
'zotino',
|
||||||
'vhdcicarrier',
|
'fastino',
|
||||||
|
'novo']},
|
||||||
|
{ name: 'Adapters',
|
||||||
|
itemIds: [
|
||||||
|
'idc-bnc-adapter',
|
||||||
|
'idc-sma-adapter',
|
||||||
|
'idc-mcx-adapter',
|
||||||
|
'hd68-idc-adapter',
|
||||||
|
'vhdcicarrier']},
|
||||||
|
{ name: 'Misc',
|
||||||
|
itemIds: [
|
||||||
|
'koster',
|
||||||
|
'stabilizer']}
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue