-
Notifications
You must be signed in to change notification settings - Fork 0
Implement consumables (Verbrauchsgüter) management feature for inventory system #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| @Column({ nullable: true }) | ||
| locationId?: number; | ||
| @ManyToOne(() => LocationEntity, (x) => x.consumables, { | ||
| nullable: true, | ||
| onDelete: 'SET NULL', | ||
| onUpdate: 'CASCADE', | ||
| }) | ||
| location?: LocationEntity; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ich würde die location als many to many Beziehung designen.
Es soll ja möglich sein z.B. Müllsäcke an mehreren Orten zu Lagern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implemented many-to-many relationship between consumables and locations. Consumables can now be stored in multiple locations by providing an array of locationIds. Updated entities, DTOs, services, and all related functionality to support this relationship. Tests are passing. (7b14ac6)
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
KirschbaumP
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Das Frontend wurde noch nicht an die Many to Many Verbindung angepasst.
- Bitte erstelle noch Endpunkte um, einem Consumable eine Location hinzuzufügen oder zu entfernen im Backend und setzte es auch im Frontend entsprechend um.
- Erstelle entsprechende Rollen (View, Manage) für Consumable und ConsumableGroup und passe die Controller an.
All three requirements have been implemented:
The frontend now displays multiple locations correctly, and the backend provides granular control over location assignments. All tests are passing and both backend and frontend build successfully. (b817539) Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
… and controllers Co-authored-by: KirschbaumP <2657033+KirschbaumP@users.noreply.github.com>
Co-authored-by: KirschbaumP <2657033+KirschbaumP@users.noreply.github.com>
…ables Co-authored-by: KirschbaumP <2657033+KirschbaumP@users.noreply.github.com>
Co-authored-by: KirschbaumP <2657033+KirschbaumP@users.noreply.github.com>
Co-authored-by: KirschbaumP <2657033+KirschbaumP@users.noreply.github.com>
…tend consumables Co-authored-by: KirschbaumP <2657033+KirschbaumP@users.noreply.github.com>
consumable-group CRUD
31d512a to
d65b5c1
Compare
This PR implements a complete consumables (Verbrauchsgüter) management feature for the inventory system, extending the existing device management with support for consumable goods and consumable groups.
🎯 Features Implemented
Backend Implementation
name(optional) - Name of the consumablenotice(optional) - Additional notes/remarksquantity(required) - Number of items availableexpirationDate(optional) - Expiration date for perishable itemsgroupId(optional) - Reference to consumable grouplocationId(optional) - Reference to storage locationAPI Endpoints
Full RESTful API with the following endpoints:
GET/POST /api/consumable-group- List/Create consumable groupsGET/PUT/DELETE /api/consumable-group/{id}- Read/Update/Delete specific groupGET /api/consumable-group/count- Get total count with search supportGET/POST /api/consumable- List/Create consumablesGET/PUT/DELETE /api/consumable/{id}- Read/Update/Delete specific consumableGET /api/consumable/count- Get total count with search supportFrontend Implementation
Technical Details
🏗️ Architecture
The implementation follows the established patterns from the existing device/device-group structure:
🧪 Testing
📸 Example Usage
Create a consumable group:
Create a consumable:
🔄 Migration Path
The feature is fully backward compatible. Existing device management functionality remains unchanged, and the new consumables feature operates independently while sharing common infrastructure (locations, user roles).
Fixes #4.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
scarf.shnode ./report.js(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.