Commit Graph

83 Commits

Author SHA1 Message Date
Urtzi Alfaro
230bbe6a19 Add improvements 2026-01-12 14:24:14 +01:00
Urtzi Alfaro
29d19087f1 Update monitoring packages to latest versions
- Updated all OpenTelemetry packages to latest versions:
  - opentelemetry-api: 1.27.0 → 1.39.1
  - opentelemetry-sdk: 1.27.0 → 1.39.1
  - opentelemetry-exporter-otlp-proto-grpc: 1.27.0 → 1.39.1
  - opentelemetry-exporter-otlp-proto-http: 1.27.0 → 1.39.1
  - opentelemetry-instrumentation-fastapi: 0.48b0 → 0.60b1
  - opentelemetry-instrumentation-httpx: 0.48b0 → 0.60b1
  - opentelemetry-instrumentation-redis: 0.48b0 → 0.60b1
  - opentelemetry-instrumentation-sqlalchemy: 0.48b0 → 0.60b1

- Removed prometheus-client==0.23.1 from all services
- Unified all services to use the same monitoring package versions

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-01-08 19:25:52 +01:00
Urtzi Alfaro
0a1951051f fix demo session 2 2026-01-02 12:18:46 +01:00
Urtzi Alfaro
cf0176673c fix demo session 1 2026-01-02 11:12:50 +01:00
Urtzi Alfaro
93c9475239 fix UI 1 2026-01-01 19:01:33 +01:00
Urtzi Alfaro
54662dde79 Add frontend loading imporvements 2025-12-27 21:30:42 +01:00
Urtzi Alfaro
b95b86ee2c Add traslations 2025-12-25 18:35:37 +01:00
Urtzi Alfaro
f10a2b92ea Improve onboarding 2025-12-18 13:26:32 +01:00
Urtzi Alfaro
f8591639a7 Imporve enterprise 2025-12-17 20:50:22 +01:00
Urtzi Alfaro
8bfe4f2dd7 Fix Demo enterprise 2025-12-17 13:03:52 +01:00
Urtzi Alfaro
c566967bea Add AI insights feature 2025-12-15 21:14:22 +01:00
Urtzi Alfaro
5642b5a0c0 demo seed change 7 2025-12-15 13:39:33 +01:00
Urtzi Alfaro
82f9622411 demo seed change 4 2025-12-14 19:05:37 +01:00
Urtzi Alfaro
4ae5356ad1 demo seed change 3 2025-12-14 16:04:16 +01:00
Urtzi Alfaro
a030bd14c8 demo seed change 2 2025-12-14 11:58:14 +01:00
Urtzi Alfaro
ff830a3415 demo seed change 2025-12-13 23:57:54 +01:00
Urtzi Alfaro
10c779858a Fix enum mismatch: Update Python enums and seed data to match database uppercase values
- Fixed ProductType enum values from lowercase to uppercase (INGREDIENT, FINISHED_PRODUCT)
- Fixed UnitOfMeasure enum values from lowercase/abbreviated to uppercase (KILOGRAMS, LITERS, etc.)
- Fixed IngredientCategory enum values from lowercase to uppercase (FLOUR, YEAST, etc.)
- Fixed ProductCategory enum values from lowercase to uppercase (BREAD, CROISSANTS, etc.)
- Updated seed data files to use correct uppercase enum values
- Fixed hardcoded enum references throughout the codebase
- This resolves the InvalidTextRepresentationError when inserting inventory data

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2025-12-13 16:49:04 +01:00
Urtzi Alfaro
667e6e0404 New alert service 2025-12-05 20:07:01 +01:00
Urtzi Alfaro
972db02f6d New enterprise feature 2025-11-30 09:12:40 +01:00
Urtzi Alfaro
e902419b6e New alert system and panel de control page 2025-11-27 15:52:40 +01:00
Urtzi Alfaro
21651b396e docs: Add Stock Receipt System documentation to inventory service 2025-11-26 07:00:44 +01:00
Urtzi Alfaro
3242c8d837 Improve te panel de control logic 2025-11-21 16:15:09 +01:00
Urtzi Alfaro
54b7a5e080 Improve the UI and tests 2025-11-15 21:21:06 +01:00
Urtzi Alfaro
a8d8828935 imporve features 2025-11-14 07:23:56 +01:00
Urtzi Alfaro
9bc048d360 Add whatsapp feature 2025-11-13 16:01:08 +01:00
Urtzi Alfaro
5783c7ed05 Add POI feature and imporve the overall backend implementation 2025-11-12 15:34:10 +01:00
Claude
0086b53fa0 feat: Add automatic SKU generation to inventory service
BACKEND IMPLEMENTATION: Implemented SKU auto-generation following the proven
pattern from the orders service (order_number generation).

IMPLEMENTATION DETAILS:

**New Method: _generate_sku()**
Location: services/inventory/app/services/inventory_service.py:1069-1104

Format: SKU-{PREFIX}-{SEQUENCE}
- PREFIX: First 3 characters of product name (uppercase)
- SEQUENCE: Sequential 4-digit number per prefix per tenant
- Examples:
  - "Flour" → SKU-FLO-0001, SKU-FLO-0002, etc.
  - "Bread" → SKU-BRE-0001, SKU-BRE-0002, etc.
  - "Sourdough Starter" → SKU-SOU-0001, etc.

**Generation Logic:**
1. Extract prefix from product name (first 3 chars)
2. Query database for count of existing SKUs with same prefix
3. Increment sequence number (count + 1)
4. Format as SKU-{PREFIX}-{SEQUENCE:04d}
5. Fallback to UUID-based SKU if any error occurs

**Integration:**
- Updated create_ingredient() method (line 52-54)
- Auto-generates SKU ONLY if not provided by frontend
- Maintains support for custom SKUs from users
- Logs generation for audit trail

**Benefits:**
 Database-enforced uniqueness per tenant
 Meaningful, sequential SKUs grouped by product type
 Follows established orders service pattern
 Thread-safe with database transaction context
 Graceful fallback to UUID on errors
 Full audit logging

**Technical Details:**
- Uses SQLAlchemy select with func.count for efficient counting
- Filters by tenant_id for tenant isolation
- Uses LIKE operator for prefix matching (SKU-{prefix}-%)
- Executed within get_db_transaction() context for safety

**Testing Suggestions:**
1. Create ingredient without SKU → should auto-generate
2. Create ingredient with custom SKU → should use provided SKU
3. Create multiple ingredients with same name prefix → should increment
4. Verify tenant isolation (different tenants can have same SKU)

NEXT: Consider adding similar generation for:
- Quality template codes (TPL-{TYPE}-{SEQUENCE})
- Production batch numbers (if not already implemented)

This completes the backend implementation for inventory SKU generation,
matching the frontend changes that delegated generation to backend.
2025-11-10 12:17:36 +00:00
Urtzi Alfaro
cbe19a3cd1 IMPORVE ONBOARDING STEPS 2025-11-09 09:22:08 +01:00
Urtzi Alfaro
4678f96f8f Landing imporvement 2025-11-08 12:02:18 +01:00
Urtzi Alfaro
813e8866ef Add readme files 2025-11-06 14:10:04 +01:00
Urtzi Alfaro
394ad3aea4 Improve AI logic 2025-11-05 13:34:56 +01:00
Urtzi Alfaro
5adb0e39c0 Improve the frontend 5 2025-11-02 20:24:44 +01:00
Urtzi Alfaro
269d3b5032 Add user delete process 2025-10-31 11:54:19 +01:00
Urtzi Alfaro
63f5c6d512 Improve the frontend 3 2025-10-30 21:08:07 +01:00
Urtzi Alfaro
36217a2729 Improve the frontend 2 2025-10-29 06:58:05 +01:00
Urtzi Alfaro
858d985c92 Improve the frontend modals 2025-10-27 16:33:26 +01:00
Urtzi Alfaro
61376b7a9f Improve the frontend and fix TODOs 2025-10-24 13:05:04 +02:00
Urtzi Alfaro
07c33fa578 Improve the frontend and repository layer 2025-10-23 07:44:54 +02:00
Urtzi Alfaro
8d30172483 Improve the frontend 2025-10-21 19:50:07 +02:00
Urtzi Alfaro
05da20357d Improve teh securty of teh DB 2025-10-19 19:22:37 +02:00
Urtzi Alfaro
312e36c893 Update requirements and insfra versions 2025-10-17 23:09:40 +02:00
Urtzi Alfaro
7e089b80cf Improve public pages 2025-10-17 18:14:28 +02:00
Urtzi Alfaro
d4060962e4 Improve demo seed 2025-10-17 07:31:14 +02:00
Urtzi Alfaro
dbb48d8e2c Improve the sales import 2025-10-15 21:09:42 +02:00
Urtzi Alfaro
8f9e9a7edc Add role-based filtering and imporve code 2025-10-15 16:12:49 +02:00
Urtzi Alfaro
7556a00db7 Improve the demo feature of the project 2025-10-12 18:47:33 +02:00
Urtzi Alfaro
dbc7f2fa0d Re-create migrations init tables 2025-10-09 20:47:31 +02:00
Urtzi Alfaro
7c72f83c51 REFACTOR ALL APIs fix 1 2025-10-07 07:15:07 +02:00
Urtzi Alfaro
38fb98bc27 REFACTOR ALL APIs 2025-10-06 15:27:01 +02:00
Urtzi Alfaro
0fdc3b0211 Fix issues 2025-10-01 16:25:53 +02:00