feat: Implement comprehensive three-party supply order workflow system
- 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>
This commit is contained in:
@ -206,6 +206,18 @@ export const typeDefs = gql`
|
||||
id: ID!
|
||||
status: SupplyOrderStatus!
|
||||
): SupplyOrderResponse!
|
||||
|
||||
# Действия поставщика
|
||||
supplierApproveOrder(id: ID!): SupplyOrderResponse!
|
||||
supplierRejectOrder(id: ID!, reason: String): SupplyOrderResponse!
|
||||
supplierShipOrder(id: ID!): SupplyOrderResponse!
|
||||
|
||||
# Действия логиста
|
||||
logisticsConfirmOrder(id: ID!): SupplyOrderResponse!
|
||||
logisticsRejectOrder(id: ID!, reason: String): SupplyOrderResponse!
|
||||
|
||||
# Действия фулфилмента
|
||||
fulfillmentReceiveOrder(id: ID!): SupplyOrderResponse!
|
||||
|
||||
# Работа с логистикой
|
||||
createLogistics(input: LogisticsInput!): LogisticsResponse!
|
||||
@ -594,11 +606,14 @@ export const typeDefs = gql`
|
||||
}
|
||||
|
||||
enum SupplyOrderStatus {
|
||||
PENDING
|
||||
CONFIRMED
|
||||
IN_TRANSIT
|
||||
DELIVERED
|
||||
CANCELLED
|
||||
PENDING # Ожидает одобрения поставщика
|
||||
CONFIRMED # Устаревший статус (для обратной совместимости)
|
||||
IN_TRANSIT # Устаревший статус (для обратной совместимости)
|
||||
SUPPLIER_APPROVED # Поставщик одобрил, ожидает подтверждения логистики
|
||||
LOGISTICS_CONFIRMED # Логистика подтвердила, ожидает отправки
|
||||
SHIPPED # Отправлено поставщиком, в пути
|
||||
DELIVERED # Доставлено и принято фулфилментом
|
||||
CANCELLED # Отменено (любой участник может отменить)
|
||||
}
|
||||
|
||||
input SupplyOrderInput {
|
||||
|
Reference in New Issue
Block a user