Merge pull request #726 from Sid127/matlist-fix

Matlist fix
This commit is contained in:
Felix Linker
2022-11-11 20:18:22 +01:00
committed by GitHub
7 changed files with 37372 additions and 14 deletions

1
.gitignore vendored
View File

@@ -10,4 +10,3 @@ env
.project
.vscode/
docs/
package-lock.json

1
.npmrc
View File

@@ -1 +0,0 @@
package-lock=false

37358
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -105,7 +105,7 @@
"less-loader": "^4.1.0",
"react-addons-perf": "^15.4.2",
"react-container-dimensions": "^1.4.1",
"react-testutils-additions": "^16.0.0",
"react-testutils-additions": "^15.0.0",
"react-transition-group": "^2.5.0",
"rimraf": "^2.6.1",
"rollup": "^0.66.2",
@@ -123,6 +123,7 @@
"sideEffects": false,
"dependencies": {
"@babel/polyfill": "^7.0.0",
"auto-bind": "^5.0.1",
"browserify-zlib-next": "^1.0.1",
"classnames": "^2.2.6",
"coriolis-data": "../coriolis-data",
@@ -135,7 +136,6 @@
"prop-types": "^15.6.2",
"react": "^15.5.4",
"react-dom": "^15.5.4",
"react-extras": "^0.7.1",
"react-fuzzy": "^0.5.2",
"react-ga": "^2.5.3",
"react-number-editor": "Athanasius/react-number-editor.git#miggy",

View File

@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { autoBind } from 'react-extras';
import autoBind from 'auto-bind';
/**
* Announcement component

View File

@@ -177,14 +177,16 @@ export default class ModalShoppingList extends TranslatedComponent {
mats[i] = module.m.blueprint.grades[g].components[i] * this.state.matsPerGrade[g];
}
}
for (const j in module.m.blueprint.special.components) {
if (!module.m.blueprint.special.components.hasOwnProperty(j)) {
continue;
}
if (mats[j]) {
mats[j] += module.m.blueprint.special.components[j];
} else {
mats[j] = module.m.blueprint.special.components[j];
if (module.m.blueprint.special) {
for (const j in module.m.blueprint.special.components) {
if (!module.m.blueprint.special.components.hasOwnProperty(j)) {
continue;
}
if (mats[j]) {
mats[j] += module.m.blueprint.special.components[j];
} else {
mats[j] = module.m.blueprint.special.components[j];
}
}
}
}

View File

@@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import TranslatedComponent from './TranslatedComponent';
import { Pip } from './SvgIcons';
import { autoBind } from 'react-extras';
import autoBind from 'auto-bind';
/**
* Pips displays SYS/ENG/WEP pips and allows users to change them with key presses by clicking on the relevant area.