Added product admin features

This commit is contained in:
Niklas Fondberg
2021-07-26 10:35:52 +02:00
committed by GitHub
parent 32adee1bf4
commit d17df41d86
38 changed files with 1613 additions and 381 deletions
+94 -8
View File
@@ -19,6 +19,26 @@ const typeDefs = gql`
keyword(id: Int!): Keyword
designers(limit: Int): [Designer]
designer(id: Int!): Designer
markets: [Market]
market(name: String!): Market
interiors(filter: InteriorsFilterInput): [Interior]
}
type Mutation {
addKeyword(productId: Int!, keywordId: Int!): MutationResult
}
type MutationResult {
result: String!
}
"""
Only return valid interiors for product, type and orientation
"""
input InteriorsFilterInput {
productId: Int!
type: InteriorType!
orientation: Orientation!
}
input DateInput {
@@ -134,8 +154,8 @@ const typeDefs = gql`
designerPath: String
discountType: String
discountValue: Float
displayHeight: Int
displayWidth: Int
displayHeight: Float
displayWidth: Float
edge: String
frameColor: String
framed: Int
@@ -175,6 +195,7 @@ const typeDefs = gql`
id: ID!
name: String
path: String
pathNumeric: String
isLeaf: Int
depth: Int
childCount: Int
@@ -185,6 +206,7 @@ const typeDefs = gql`
type Product {
id: ID!
stockid: Int
path: String!
visible: Boolean!
browsable: Boolean!
@@ -196,15 +218,53 @@ const typeDefs = gql`
designerId: Int
designer: Designer
keywords: [Keyword]
ref1: String
ref2: String
ref3: String
related: [Product]
wallpaperTypes: [ProductWallpaperType]
fields: ProductFields
orientation: Orientation
"""
Will be single value return in later release
Will be single values return in later release
"""
type: [ProductType]
# Below are for debug
api1json: JSON
# Below are for debug and will be removed soon
fields_json: JSON
}
type ProductFields {
artNo: String!
name: String!
height: Int
width: Int
photowallResolution: Int
canvasResolution: Int
wallpaperResolution: Int
copyright: String
proportionsWarning: String
marginWidthMax: Int
marginWidthMin: Int
marginHeightMax: Int
marginHeightMin: Int
focusXpoint: Float
focusYpoint: Float
focusXpoint2: Float
focusYpoint2: Float
batch: String
imageResolution: Int
printFileWidth: Int
printFileHeight: Int
printFileDpi: Int
}
enum Orientation {
UNKNOWN
PORTRAIT
LANDSCAPE
SQUARE
}
enum ProductGroup {
PHOTO_WALLPAPER
CANVAS
@@ -223,6 +283,11 @@ const typeDefs = gql`
ILLUSTRATION
}
enum ProductWallpaperType {
WALLMURAL
DESIGN
}
type ProductBlacklist {
id: ID!
groupId: Int!
@@ -239,7 +304,28 @@ const typeDefs = gql`
group: ProductGroup!
inserted: DateTime!
updated: DateTime
price(market: Int, width: Int, height: Int, sku: String): JSON
interiors: [Interior]
}
enum InteriorType {
WALLPAPER
PAINTING
POSTER
FRAMED_PRINT
}
type Interior {
"""
room id
"""
id: ID!
roomName: String
position: Int
roomType: String
uri: String
roomNumber: Int
type: InteriorType
orientation: Orientation
}
type Designer {
@@ -255,7 +341,7 @@ const typeDefs = gql`
}
type Keyword {
id: Int!
id: ID!
value: String!
type: KeywordType
products: [Product]
@@ -321,7 +407,7 @@ orderrows example
}
types:
"doityourselfframe"
"fixed"
"tiling"