fix: remove invalid posX, posY, notes from FacilityPosition seed
This commit is contained in:
parent
b0cd3bdcf9
commit
96c7a2bf75
1 changed files with 1 additions and 7 deletions
|
|
@ -248,9 +248,6 @@ async function main() {
|
||||||
sectionCount++;
|
sectionCount++;
|
||||||
|
|
||||||
// Create plant positions for this section
|
// Create plant positions for this section
|
||||||
const cellWidth = Math.floor(s.width / s.columns);
|
|
||||||
const cellHeight = Math.floor(s.height / s.rows);
|
|
||||||
|
|
||||||
for (let row = 0; row < s.rows; row++) {
|
for (let row = 0; row < s.rows; row++) {
|
||||||
for (let col = 0; col < s.columns; col++) {
|
for (let col = 0; col < s.columns; col++) {
|
||||||
await prisma.facilityPosition.create({
|
await prisma.facilityPosition.create({
|
||||||
|
|
@ -258,10 +255,7 @@ async function main() {
|
||||||
sectionId: section.id,
|
sectionId: section.id,
|
||||||
row: row + 1,
|
row: row + 1,
|
||||||
column: col + 1,
|
column: col + 1,
|
||||||
posX: col * cellWidth + Math.floor(cellWidth / 2),
|
status: 'EMPTY'
|
||||||
posY: row * cellHeight + Math.floor(cellHeight / 2),
|
|
||||||
status: 'EMPTY',
|
|
||||||
notes: null
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
positionCount++;
|
positionCount++;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue