Добавлены модели и функциональность для управления логистикой, включая создание, обновление и удаление логистических маршрутов через GraphQL. Обновлены компоненты для отображения и управления логистикой, улучшен интерфейс взаимодействия с пользователем. Реализованы новые типы данных и интерфейсы для логистики, а также улучшена обработка ошибок.

This commit is contained in:
Bivekich
2025-07-18 15:40:12 +03:00
parent 7e7e4a9b4a
commit 93bb5827d2
20 changed files with 5015 additions and 667 deletions

View File

@ -29,6 +29,9 @@ export const typeDefs = gql`
# Расходники организации
mySupplies: [Supply!]!
# Логистика организации
myLogistics: [Logistics!]!
# Товары оптовика
myProducts: [Product!]!
@ -100,6 +103,11 @@ export const typeDefs = gql`
updateSupply(id: ID!, input: SupplyInput!): SupplyResponse!
deleteSupply(id: ID!): Boolean!
# Работа с логистикой
createLogistics(input: LogisticsInput!): LogisticsResponse!
updateLogistics(id: ID!, input: LogisticsInput!): LogisticsResponse!
deleteLogistics(id: ID!): Boolean!
# Работа с товарами (для оптовиков)
createProduct(input: ProductInput!): ProductResponse!
updateProduct(id: ID!, input: ProductInput!): ProductResponse!
@ -372,7 +380,6 @@ export const typeDefs = gql`
name: String!
description: String
price: Float!
quantity: Int!
imageUrl: String
createdAt: String!
updatedAt: String!
@ -383,7 +390,6 @@ export const typeDefs = gql`
name: String!
description: String
price: Float!
quantity: Int!
imageUrl: String
}
@ -393,6 +399,33 @@ export const typeDefs = gql`
supply: Supply
}
# Типы для логистики
type Logistics {
id: ID!
fromLocation: String!
toLocation: String!
priceUnder1m3: Float!
priceOver1m3: Float!
description: String
createdAt: String!
updatedAt: String!
organization: Organization!
}
input LogisticsInput {
fromLocation: String!
toLocation: String!
priceUnder1m3: Float!
priceOver1m3: Float!
description: String
}
type LogisticsResponse {
success: Boolean!
message: String!
logistics: Logistics
}
# Типы для категорий товаров
type Category {
id: ID!