fix(issue11): Removess useless info rule message

This commit is contained in:
sovanna 2020-01-22 19:06:56 +01:00
parent 12650be390
commit 9b4bb0fd7c
2 changed files with 7 additions and 3 deletions

View File

@ -1562,7 +1562,9 @@ class Shop extends React.PureComponent {
} }
if (nbUsedSlot > itemsCloned[idx].nbrSlotMax) { if (nbUsedSlot > itemsCloned[idx].nbrSlotMax) {
if (itemsCloned[idx].rules.maxSlot.message) {
rules[itemsCloned[idx].rules.maxSlot.type] = {...itemsCloned[idx].rules.maxSlot}; rules[itemsCloned[idx].rules.maxSlot.type] = {...itemsCloned[idx].rules.maxSlot};
}
itemsData[idx].warnings.maxSlotWarning = {...itemsCloned[idx].rules.maxSlotWarning}; itemsData[idx].warnings.maxSlotWarning = {...itemsCloned[idx].rules.maxSlotWarning};
} }
@ -1701,8 +1703,10 @@ class Shop extends React.PureComponent {
} }
if (nbUsedSlot > 0) { if (nbUsedSlot > 0) {
if (itemsCloned[idx].rules.maxSlot.message) {
rules[itemsCloned[idx].rules.maxSlot.type] = {...itemsCloned[idx].rules.maxSlot}; rules[itemsCloned[idx].rules.maxSlot.type] = {...itemsCloned[idx].rules.maxSlot};
} }
}
if (nbUsedSlot > itemsCloned[idx].nbrSlotMax) { if (nbUsedSlot > itemsCloned[idx].nbrSlotMax) {
itemsData[idx].warnings.maxSlotWarning = {...itemsCloned[idx].rules.maxSlotWarning}; itemsData[idx].warnings.maxSlotWarning = {...itemsCloned[idx].rules.maxSlotWarning};
} }

View File

@ -359,7 +359,7 @@ const shop_data = {
type: 'hd68-max-slot', type: 'hd68-max-slot',
icon: '/shop/icon-reminder.svg', icon: '/shop/icon-reminder.svg',
name: 'HD68-IDC', name: 'HD68-IDC',
message: 'HD68-IDC has at most 4 IDC-BNC adapters.', message: null,
}, },
maxSlotWarning: { maxSlotWarning: {
type: 'hd68-max-slot-warning', type: 'hd68-max-slot-warning',