Refactor code structure for improved readability and maintainability
Test Suite / test (24.15.0) (push) Has been cancelled

This commit is contained in:
Nils-Johan Gynther
2026-05-06 07:37:59 +02:00
parent e4f201ea36
commit 969dafdbc6
273 changed files with 11357 additions and 39 deletions
+4
View File
@@ -0,0 +1,4 @@
export declare class ConsumeInventoryDto {
amountUsed: number;
comment?: string;
}
+27
View File
@@ -0,0 +1,27 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConsumeInventoryDto = void 0;
const class_validator_1 = require("class-validator");
class ConsumeInventoryDto {
}
exports.ConsumeInventoryDto = ConsumeInventoryDto;
__decorate([
(0, class_validator_1.IsNumber)(),
(0, class_validator_1.Min)(0.01),
__metadata("design:type", Number)
], ConsumeInventoryDto.prototype, "amountUsed", void 0);
__decorate([
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], ConsumeInventoryDto.prototype, "comment", void 0);
//# sourceMappingURL=consume-inventory.dto.js.map
@@ -0,0 +1 @@
{"version":3,"file":"consume-inventory.dto.js","sourceRoot":"","sources":["../../../src/inventory/dto/consume-inventory.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAsE;AAEtE,MAAa,mBAAmB;CAQ/B;AARD,kDAQC;AALC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAG,EAAC,IAAI,CAAC;;uDACU;AAIpB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;oDACM"}
+14
View File
@@ -0,0 +1,14 @@
export declare class CreateInventoryDto {
productId: number;
quantity: number;
unit: string;
location?: string;
purchaseDate?: string;
bestBeforeDate?: string;
brand?: string;
origin?: string;
receiptName?: string;
opened?: boolean;
suitableFor?: string;
comment?: string;
}
+73
View File
@@ -0,0 +1,73 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CreateInventoryDto = void 0;
const class_validator_1 = require("class-validator");
class CreateInventoryDto {
}
exports.CreateInventoryDto = CreateInventoryDto;
__decorate([
(0, class_validator_1.IsInt)(),
__metadata("design:type", Number)
], CreateInventoryDto.prototype, "productId", void 0);
__decorate([
(0, class_validator_1.IsNumber)(),
(0, class_validator_1.Min)(0),
__metadata("design:type", Number)
], CreateInventoryDto.prototype, "quantity", void 0);
__decorate([
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], CreateInventoryDto.prototype, "unit", void 0);
__decorate([
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], CreateInventoryDto.prototype, "location", void 0);
__decorate([
(0, class_validator_1.IsOptional)(),
__metadata("design:type", String)
], CreateInventoryDto.prototype, "purchaseDate", void 0);
__decorate([
(0, class_validator_1.IsOptional)(),
__metadata("design:type", String)
], CreateInventoryDto.prototype, "bestBeforeDate", void 0);
__decorate([
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], CreateInventoryDto.prototype, "brand", void 0);
__decorate([
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], CreateInventoryDto.prototype, "origin", void 0);
__decorate([
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], CreateInventoryDto.prototype, "receiptName", void 0);
__decorate([
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsBoolean)(),
__metadata("design:type", Boolean)
], CreateInventoryDto.prototype, "opened", void 0);
__decorate([
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], CreateInventoryDto.prototype, "suitableFor", void 0);
__decorate([
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], CreateInventoryDto.prototype, "comment", void 0);
//# sourceMappingURL=create-inventory.dto.js.map
@@ -0,0 +1 @@
{"version":3,"file":"create-inventory.dto.js","sourceRoot":"","sources":["../../../src/inventory/dto/create-inventory.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAOyB;AAEzB,MAAa,kBAAkB;CA4C9B;AA5CD,gDA4CC;AA1CC;IADC,IAAA,uBAAK,GAAE;;qDACW;AAInB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAG,EAAC,CAAC,CAAC;;oDACW;AAGlB;IADC,IAAA,0BAAQ,GAAE;;gDACG;AAId;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;oDACO;AAGlB;IADC,IAAA,4BAAU,GAAE;;wDACS;AAGtB;IADC,IAAA,4BAAU,GAAE;;0DACW;AAIxB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;iDACI;AAIf;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;kDACK;AAIhB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;uDACU;AAIrB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;;kDACK;AAIjB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;uDACU;AAIrB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;mDACM"}
+13
View File
@@ -0,0 +1,13 @@
export declare class UpdateInventoryDto {
productId?: number;
quantity?: number;
unit?: string;
location?: string;
purchaseDate?: string;
bestBeforeDate?: string;
brand?: string;
receiptName?: string;
opened?: boolean;
suitableFor?: string;
comment?: string;
}
+71
View File
@@ -0,0 +1,71 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.UpdateInventoryDto = void 0;
const class_validator_1 = require("class-validator");
class UpdateInventoryDto {
}
exports.UpdateInventoryDto = UpdateInventoryDto;
__decorate([
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsInt)(),
__metadata("design:type", Number)
], UpdateInventoryDto.prototype, "productId", void 0);
__decorate([
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsNumber)(),
(0, class_validator_1.Min)(0),
__metadata("design:type", Number)
], UpdateInventoryDto.prototype, "quantity", void 0);
__decorate([
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], UpdateInventoryDto.prototype, "unit", void 0);
__decorate([
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], UpdateInventoryDto.prototype, "location", void 0);
__decorate([
(0, class_validator_1.IsOptional)(),
__metadata("design:type", String)
], UpdateInventoryDto.prototype, "purchaseDate", void 0);
__decorate([
(0, class_validator_1.IsOptional)(),
__metadata("design:type", String)
], UpdateInventoryDto.prototype, "bestBeforeDate", void 0);
__decorate([
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], UpdateInventoryDto.prototype, "brand", void 0);
__decorate([
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], UpdateInventoryDto.prototype, "receiptName", void 0);
__decorate([
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsBoolean)(),
__metadata("design:type", Boolean)
], UpdateInventoryDto.prototype, "opened", void 0);
__decorate([
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], UpdateInventoryDto.prototype, "suitableFor", void 0);
__decorate([
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], UpdateInventoryDto.prototype, "comment", void 0);
//# sourceMappingURL=update-inventory.dto.js.map
@@ -0,0 +1 @@
{"version":3,"file":"update-inventory.dto.js","sourceRoot":"","sources":["../../../src/inventory/dto/update-inventory.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAOyB;AAEzB,MAAa,kBAAkB;CA2C9B;AA3CD,gDA2CC;AAxCC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,GAAE;;qDACW;AAKnB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAG,EAAC,CAAC,CAAC;;oDACW;AAIlB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;gDACG;AAId;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;oDACO;AAGlB;IADC,IAAA,4BAAU,GAAE;;wDACS;AAGtB;IADC,IAAA,4BAAU,GAAE;;0DACW;AAIxB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;iDACI;AAIf;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;uDACU;AAIrB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;;kDACK;AAIjB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;uDACU;AAIrB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;mDACM"}