diff --git a/src/database/schemas/inventory/filamentstock.schema.js b/src/database/schemas/inventory/filamentstock.schema.js index c5d4dda..cd2e0a1 100644 --- a/src/database/schemas/inventory/filamentstock.schema.js +++ b/src/database/schemas/inventory/filamentstock.schema.js @@ -100,10 +100,6 @@ filamentStockSchema.statics.recalculate = async function (filamentStock, user) { const startingGross = filamentStock.startingWeight?.gross ?? 0; const gross = startingNet > 0 ? (startingGross * net) / startingNet : net; - console.log('Recalculating filament stock'); - console.log('events', events); - console.log('filamentStock', filamentStock); - await editObject({ model: this, id: filamentStock._id, diff --git a/src/database/schemas/production/filamentprofile.schema.js b/src/database/schemas/production/filamentprofile.schema.js index 2c5564c..91b893b 100644 --- a/src/database/schemas/production/filamentprofile.schema.js +++ b/src/database/schemas/production/filamentprofile.schema.js @@ -154,10 +154,7 @@ const filamentProfileSchema = new mongoose.Schema( { timestamps: true } ); -filamentProfileSchema.index({ - name: 'text', - filamentNotes: 'text', -}); +filamentProfileSchema.index({ name: 'text', filamentNotes: 'text' }); filamentProfileSchema.virtual('id').get(function () { return this._id; @@ -165,7 +162,4 @@ filamentProfileSchema.virtual('id').get(function () { filamentProfileSchema.set('toJSON', { virtuals: true }); -export const filamentProfileModel = mongoose.model( - 'filamentProfile', - filamentProfileSchema -); +export const filamentProfileModel = mongoose.model('filamentProfile', filamentProfileSchema); diff --git a/src/database/schemas/production/printerprofile.schema.js b/src/database/schemas/production/printerprofile.schema.js index ca63778..eea6ea7 100644 --- a/src/database/schemas/production/printerprofile.schema.js +++ b/src/database/schemas/production/printerprofile.schema.js @@ -24,10 +24,19 @@ const bedExcludeAreaSchema = new mongoose.Schema( const extruderSchema = new mongoose.Schema( { + defaultNozzleVolumeType: { type: String }, nozzleDiameter: { type: Number }, nozzleVolume: { type: Number }, + nozzleType: { type: String }, + nozzleFlushDataset: { type: String }, minLayerHeight: { type: Number }, maxLayerHeight: { type: Number }, + extruderColour: { type: String }, + extruderType: { type: String }, + extruderVariantList: { type: String }, + extruderPrintableHeight: { type: Number }, + printerExtruderId: { type: String }, + printerExtruderVariant: { type: String }, positionOffsetX: { type: Number }, positionOffsetY: { type: Number }, retractionLength: { type: Number }, @@ -48,7 +57,8 @@ const extruderSchema = new mongoose.Schema( zHopOnlyLiftZBelow: { type: Number }, materialSwitchRetractionLength: { type: Number }, materialSwitchExtraLengthOnRestart: { type: Number }, - longRetractionWhenCut: { type: Boolean } + longRetractionWhenCut: { type: Boolean }, + retractionDistancesWhenCut: { type: Number }, }, { _id: true } ); @@ -85,15 +95,12 @@ const printerProfileSchema = new mongoose.Schema( machineUnloadFilamentTime: { type: Number }, thumbnails: [thumbnailSchema], auxiliaryFan: { type: Boolean }, - machineMaxJunctionDeviation: minMaxNumberSchema + machineMaxJunctionDeviation: minMaxNumberSchema, }, { timestamps: true } ); -printerProfileSchema.index({ - name: 'text', - printerNotes: 'text' -}); +printerProfileSchema.index({ name: 'text', printerNotes: 'text' }); printerProfileSchema.virtual('id').get(function () { return this._id; @@ -101,7 +108,4 @@ printerProfileSchema.virtual('id').get(function () { printerProfileSchema.set('toJSON', { virtuals: true }); -export const printerProfileModel = mongoose.model( - 'printerProfile', - printerProfileSchema -); +export const printerProfileModel = mongoose.model('printerProfile', printerProfileSchema); diff --git a/src/database/schemas/sales/marketplace.schema.js b/src/database/schemas/sales/marketplace.schema.js index 531a8a8..2b8dcdc 100644 --- a/src/database/schemas/sales/marketplace.schema.js +++ b/src/database/schemas/sales/marketplace.schema.js @@ -43,7 +43,6 @@ marketplaceSchema.statics.recalculate = async function (marketplace, user) { } else { stateType = 'ready'; } - console.log('recalculating marketplace state', stateType); marketplace.state = { type: stateType }; await editObject({ model: this, diff --git a/src/updates/updatemanager.js b/src/updates/updatemanager.js index e8b7d1c..973d885 100644 --- a/src/updates/updatemanager.js +++ b/src/updates/updatemanager.js @@ -107,7 +107,7 @@ export class UpdateManager { `Filtered ${eventName} event: ${formatTraceData({ objectType, filter: normalizedFilter, - value, + value })}` ); return; diff --git a/src/utils.js b/src/utils.js index 6455714..a483b52 100644 --- a/src/utils.js +++ b/src/utils.js @@ -27,8 +27,6 @@ export async function generateHostOTP(id) { auditLog: false }); - console.log('otpHost', otpHost); - return otpHost; }