Добавлены новые модели и мутации для управления товарами дня, лучшими ценами и топом продаж. Обновлены типы GraphQL и резолверы для обработки запросов, что улучшает функциональность и структуру данных. В боковое меню добавлены новые элементы для навигации по товарам. Это повышает удобство работы с приложением и расширяет возможности взаимодействия с API.
This commit is contained in:
@ -1165,4 +1165,179 @@ export const GET_DELIVERY_OFFERS = gql`
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
// Daily Products mutations
|
||||
export const CREATE_DAILY_PRODUCT = gql`
|
||||
mutation CreateDailyProduct($input: DailyProductInput!) {
|
||||
createDailyProduct(input: $input) {
|
||||
id
|
||||
productId
|
||||
displayDate
|
||||
discount
|
||||
isActive
|
||||
sortOrder
|
||||
product {
|
||||
id
|
||||
name
|
||||
article
|
||||
brand
|
||||
retailPrice
|
||||
images {
|
||||
url
|
||||
alt
|
||||
order
|
||||
}
|
||||
}
|
||||
createdAt
|
||||
updatedAt
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
export const UPDATE_DAILY_PRODUCT = gql`
|
||||
mutation UpdateDailyProduct($id: ID!, $input: DailyProductUpdateInput!) {
|
||||
updateDailyProduct(id: $id, input: $input) {
|
||||
id
|
||||
productId
|
||||
displayDate
|
||||
discount
|
||||
isActive
|
||||
sortOrder
|
||||
product {
|
||||
id
|
||||
name
|
||||
article
|
||||
brand
|
||||
retailPrice
|
||||
images {
|
||||
url
|
||||
alt
|
||||
order
|
||||
}
|
||||
}
|
||||
createdAt
|
||||
updatedAt
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
export const DELETE_DAILY_PRODUCT = gql`
|
||||
mutation DeleteDailyProduct($id: ID!) {
|
||||
deleteDailyProduct(id: $id)
|
||||
}
|
||||
`
|
||||
|
||||
export const CREATE_BEST_PRICE_PRODUCT = gql`
|
||||
mutation CreateBestPriceProduct($input: BestPriceProductInput!) {
|
||||
createBestPriceProduct(input: $input) {
|
||||
id
|
||||
productId
|
||||
discount
|
||||
isActive
|
||||
sortOrder
|
||||
product {
|
||||
id
|
||||
name
|
||||
article
|
||||
brand
|
||||
retailPrice
|
||||
images {
|
||||
url
|
||||
alt
|
||||
order
|
||||
}
|
||||
}
|
||||
createdAt
|
||||
updatedAt
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
export const UPDATE_BEST_PRICE_PRODUCT = gql`
|
||||
mutation UpdateBestPriceProduct($id: ID!, $input: BestPriceProductInput!) {
|
||||
updateBestPriceProduct(id: $id, input: $input) {
|
||||
id
|
||||
productId
|
||||
discount
|
||||
isActive
|
||||
sortOrder
|
||||
product {
|
||||
id
|
||||
name
|
||||
article
|
||||
brand
|
||||
retailPrice
|
||||
images {
|
||||
url
|
||||
alt
|
||||
order
|
||||
}
|
||||
}
|
||||
createdAt
|
||||
updatedAt
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
export const DELETE_BEST_PRICE_PRODUCT = gql`
|
||||
mutation DeleteBestPriceProduct($id: ID!) {
|
||||
deleteBestPriceProduct(id: $id)
|
||||
}
|
||||
`
|
||||
|
||||
export const CREATE_TOP_SALES_PRODUCT = gql`
|
||||
mutation CreateTopSalesProduct($input: TopSalesProductInput!) {
|
||||
createTopSalesProduct(input: $input) {
|
||||
id
|
||||
productId
|
||||
isActive
|
||||
sortOrder
|
||||
product {
|
||||
id
|
||||
name
|
||||
article
|
||||
brand
|
||||
retailPrice
|
||||
images {
|
||||
url
|
||||
alt
|
||||
order
|
||||
}
|
||||
}
|
||||
createdAt
|
||||
updatedAt
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
export const UPDATE_TOP_SALES_PRODUCT = gql`
|
||||
mutation UpdateTopSalesProduct($id: ID!, $input: TopSalesProductUpdateInput!) {
|
||||
updateTopSalesProduct(id: $id, input: $input) {
|
||||
id
|
||||
productId
|
||||
isActive
|
||||
sortOrder
|
||||
product {
|
||||
id
|
||||
name
|
||||
article
|
||||
brand
|
||||
retailPrice
|
||||
images {
|
||||
url
|
||||
alt
|
||||
order
|
||||
}
|
||||
}
|
||||
createdAt
|
||||
updatedAt
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
export const DELETE_TOP_SALES_PRODUCT = gql`
|
||||
mutation DeleteTopSalesProduct($id: ID!) {
|
||||
deleteTopSalesProduct(id: $id)
|
||||
}
|
||||
`
|
Reference in New Issue
Block a user