mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-11 16:53:02 +00:00
@@ -53,6 +53,10 @@ export default class ModalShoppingList extends TranslatedComponent {
|
|||||||
if (!module.m.blueprint.grade || !module.m.blueprint.grades) {
|
if (!module.m.blueprint.grade || !module.m.blueprint.grades) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (module.m.blueprint.special) {
|
||||||
|
console.log(module.m.blueprint.special);
|
||||||
|
blueprints.push({ uuid: module.m.blueprint.special.uuid, number: 1 });
|
||||||
|
}
|
||||||
for (const g in module.m.blueprint.grades) {
|
for (const g in module.m.blueprint.grades) {
|
||||||
if (!module.m.blueprint.grades.hasOwnProperty(g)) {
|
if (!module.m.blueprint.grades.hasOwnProperty(g)) {
|
||||||
continue;
|
continue;
|
||||||
@@ -60,7 +64,7 @@ export default class ModalShoppingList extends TranslatedComponent {
|
|||||||
if (g > module.m.blueprint.grade) {
|
if (g > module.m.blueprint.grade) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
blueprints.push({ blueprint: module.m.blueprint.grades[g], number: this.state.matsPerGrade[g] });
|
blueprints.push({ uuid: module.m.blueprint.grades[g].uuid, number: this.state.matsPerGrade[g] });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -109,7 +113,7 @@ export default class ModalShoppingList extends TranslatedComponent {
|
|||||||
for (const i of this.state.blueprints) {
|
for (const i of this.state.blueprints) {
|
||||||
request
|
request
|
||||||
.patch(`http://localhost:44405/${this.state.cmdrName}/shopping-list`)
|
.patch(`http://localhost:44405/${this.state.cmdrName}/shopping-list`)
|
||||||
.field('uuid', i.blueprint.uuid)
|
.field('uuid', i.uuid)
|
||||||
.field('size', i.number)
|
.field('size', i.number)
|
||||||
.end(err => {
|
.end(err => {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user