- Add pricePerUnit field to Supply model for seller pricing
- Fix updateSupplyPrice mutation to update pricePerUnit only
- Separate purchase price (price) from selling price (pricePerUnit)
- Fix GraphQL mutations to include organization field (CREATE/UPDATE_LOGISTICS)
- Update GraphQL types to make Supply.price required again
- Add comprehensive pricing rules to rules-complete.md sections 11.7.5 and 18.8
- Fix supplies-tab.tsx to show debug info and handle user loading
Architecture changes:
• Supply.price = purchase price from supplier (immutable)
• Supply.pricePerUnit = selling price to sellers (mutable by fulfillment)
• Warehouse shows purchase price only (readonly)
• Services shows/edits selling price only
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Обновлена схема Prisma с новыми полями и связями
- Актуализированы правила системы в rules-complete.md
- Оптимизированы GraphQL типы, запросы и мутации
- Улучшены компоненты интерфейса и валидация данных
- Исправлены критические ESLint ошибки: удалены неиспользуемые импорты и переменные
- Добавлены тестовые файлы для проверки функционала
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added logistics partner selection as mandatory requirement for fulfillment supply orders
- Implemented complete status workflow: PENDING → SUPPLIER_APPROVED → LOGISTICS_CONFIRMED → SHIPPED → DELIVERED
- Created dedicated interfaces for all three parties:
* Fulfillment: Create orders with mandatory logistics selection and receive shipments
* Suppliers: View, approve/reject orders, and ship approved orders via /supplies tab
* Logistics: Confirm/reject transport requests via new /logistics-orders dashboard
- Updated Prisma schema with logisticsPartnerId (non-nullable) and new SupplyOrderStatus enum
- Added comprehensive GraphQL mutations for each party's workflow actions
- Fixed GraphQL resolver to include logistics partners in supplyOrders query
- Enhanced UI components with proper status badges and action buttons
- Added backward compatibility for legacy status handling
- Updated sidebar navigation routing for LOGIST organization type
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- ✨ Added compact employee forms (add/edit) with all fields visible
- 🎯 Implemented expandable employee rows with timesheet integration
- 📊 Added real KPI calculation based on work hours, sick days, and overtime
- 📅 Added bulk date selection and editing in calendar
- 🗓️ Implemented day-specific editing modal with hours and overtime tracking
- 💾 Extended database schema with overtimeHours field
- 🎨 Improved UI layout: tabs left, search right, real current date display
- 🧹 Fixed spacing issues and removed unnecessary gaps
- 🔧 Enhanced GraphQL mutations for employee schedule management