Добавлены модели услуг и расходников для фулфилмент центров, реализованы соответствующие мутации и запросы в GraphQL. Обновлен конфигурационный файл и добавлен новый компонент Toaster в макет приложения. Обновлены зависимости в package.json и package-lock.json.

This commit is contained in:
Bivekich
2025-07-17 10:47:20 +03:00
parent 205c9eae98
commit 99e91287f3
22 changed files with 2148 additions and 2 deletions

View File

@ -22,6 +22,12 @@ export const typeDefs = gql`
# Список чатов (последние сообщения с каждым контрагентом)
conversations: [Conversation!]!
# Услуги организации
myServices: [Service!]!
# Расходники организации
mySupplies: [Supply!]!
}
type Mutation {
@ -61,6 +67,16 @@ export const typeDefs = gql`
sendImageMessage(receiverOrganizationId: ID!, fileUrl: String!, fileName: String!, fileSize: Int!, fileType: String!): MessageResponse!
sendFileMessage(receiverOrganizationId: ID!, fileUrl: String!, fileName: String!, fileSize: Int!, fileType: String!): MessageResponse!
markMessagesAsRead(conversationId: ID!): Boolean!
# Работа с услугами
createService(input: ServiceInput!): ServiceResponse!
updateService(id: ID!, input: ServiceInput!): ServiceResponse!
deleteService(id: ID!): Boolean!
# Работа с расходниками
createSupply(input: SupplyInput!): SupplyResponse!
updateSupply(id: ID!, input: SupplyInput!): SupplyResponse!
deleteSupply(id: ID!): Boolean!
}
# Типы данных
@ -281,6 +297,58 @@ export const typeDefs = gql`
messageData: Message
}
# Типы для услуг
type Service {
id: ID!
name: String!
description: String
price: Float!
imageUrl: String
createdAt: String!
updatedAt: String!
organization: Organization!
}
input ServiceInput {
name: String!
description: String
price: Float!
imageUrl: String
}
type ServiceResponse {
success: Boolean!
message: String!
service: Service
}
# Типы для расходников
type Supply {
id: ID!
name: String!
description: String
price: Float!
quantity: Int!
imageUrl: String
createdAt: String!
updatedAt: String!
organization: Organization!
}
input SupplyInput {
name: String!
description: String
price: Float!
quantity: Int!
imageUrl: String
}
type SupplyResponse {
success: Boolean!
message: String!
supply: Supply
}
# JSON скаляр
scalar JSON
`