Добавлены модели и функциональность для управления логистикой, включая создание, обновление и удаление логистических маршрутов через GraphQL. Обновлены компоненты для отображения и управления логистикой, улучшен интерфейс взаимодействия с пользователем. Реализованы новые типы данных и интерфейсы для логистики, а также улучшена обработка ошибок.
This commit is contained in:
@ -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!
|
||||
|
Reference in New Issue
Block a user