Skip to content

Commit

Permalink
[shopsys] added product inquiries (#3465)
Browse files Browse the repository at this point in the history
  • Loading branch information
grossmannmartin authored Nov 6, 2024
2 parents d09babc + 9bc092d commit 123022f
Show file tree
Hide file tree
Showing 86 changed files with 1,901 additions and 270 deletions.
4 changes: 4 additions & 0 deletions app/config/graphql/types/EnumType/ProductTypeEnum.types.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ProductTypeEnum:
type: enum
inherits:
- 'ProductTypeEnumDecorator'
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CreateInquiryInput:
type: input-object
inherits:
- 'CreateInquiryInputDecorator'
4 changes: 4 additions & 0 deletions app/config/packages/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ security:
- ROLE_FILES_FULL
- ROLE_COMPLAINT_FULL
- ROLE_COMPLAINT_STATUS_FULL
- ROLE_INQUIRY_VIEW
ROLE_ALL_VIEW:
- ROLE_ORDER_VIEW
- ROLE_CUSTOMER_VIEW
Expand Down Expand Up @@ -113,6 +114,7 @@ security:
- ROLE_FILES_VIEW
- ROLE_COMPLAINT_VIEW
- ROLE_COMPLAINT_STATUS_VIEW
- ROLE_INQUIRY_VIEW
ROLE_ORDER_FULL: [ROLE_ORDER_VIEW]
ROLE_CUSTOMER_FULL: [ROLE_CUSTOMER_VIEW]
ROLE_NEWSLETTER_FULL: [ROLE_NEWSLETTER_VIEW]
Expand Down Expand Up @@ -235,6 +237,8 @@ security:
- { path: ^/%admin_url%/order/delete, roles: ROLE_ORDER_FULL }
- { path: ^/%admin_url%/order/add-product/, roles: ROLE_ORDER_FULL }
- { path: ^/%admin_url%/order/, roles: ROLE_ORDER_VIEW }
# inquiries
- { path: ^/%admin_url%/inquiry/, roles: ROLE_INQUIRY_VIEW }
# customers
- { path: ^/%admin_url%/customer/new, roles: ROLE_CUSTOMER_FULL }
- { path: ^/%admin_url%/customer/edit, roles: ROLE_CUSTOMER_FULL, methods: [POST] }
Expand Down
39 changes: 39 additions & 0 deletions app/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,27 @@ type Country {
name: String!
}

input CreateInquiryInput {
"The customer’s company name"
companyName: String
"The customer’s company identification number"
companyNumber: String
"The customer’s company tax number"
companyTaxNumber: String
"The customer's email address"
email: String!
"Customer user first name"
firstName: String!
"Customer user last name"
lastName: String!
"Customer's question or note to the inquiry product"
note: String
"Product UUID"
productUuid: Uuid!
"The customer's telephone number"
telephone: String!
}

type CreateOrderResult {
cart: Cart
order: Order
Expand Down Expand Up @@ -1007,6 +1028,7 @@ type MainVariant implements Product & Hreflang & Breadcrumb & Slug {
id: Int!
"Product images"
images(type: String = null): [Image!]!
isInquiryType: Boolean!
isMainVariant: Boolean!
isSellingDenied: Boolean!
isVisible: Boolean!
Expand All @@ -1026,6 +1048,7 @@ type MainVariant implements Product & Hreflang & Breadcrumb & Slug {
partNumber: String
"Product price"
price: ProductPrice!
productType: ProductTypeEnum!
productVideos: [VideoToken!]!
"List of related products"
relatedProducts: [Product!]!
Expand Down Expand Up @@ -1082,6 +1105,8 @@ type Mutation {
CreateComplaint(input: ComplaintInput!): Complaint!
"Create a new delivery address"
CreateDeliveryAddress(input: DeliveryAddressInput!): [DeliveryAddress!]!
"Send the inquiry for the product"
CreateInquiry(input: CreateInquiryInput!): Boolean!
"Creates complete order with products and addresses"
CreateOrder(input: OrderInput!): CreateOrderResult!
"Delete delivery address by Uuid"
Expand Down Expand Up @@ -1717,6 +1742,7 @@ interface Product {
id: Int!
"Product images"
images(type: String = null): [Image!]!
isInquiryType: Boolean!
isMainVariant: Boolean!
isSellingDenied: Boolean!
isVisible: Boolean!
Expand All @@ -1736,6 +1762,7 @@ interface Product {
partNumber: String
"Product price"
price: ProductPrice!
productType: ProductTypeEnum!
productVideos: [VideoToken!]!
"List of related products"
relatedProducts: [Product!]!
Expand Down Expand Up @@ -1877,6 +1904,14 @@ type ProductPrice {
vatAmount: Money!
}

"One of possible product types"
enum ProductTypeEnum {
"Basic product"
BASIC
"Product with inquiry form instead of add to cart button"
INQUIRY
}

type Query {
"Access personal data using hash received in email from personal data access request"
accessPersonalData(
Expand Down Expand Up @@ -2168,6 +2203,7 @@ type RegularProduct implements Product & Hreflang & Breadcrumb & Slug {
id: Int!
"Product images"
images(type: String = null): [Image!]!
isInquiryType: Boolean!
isMainVariant: Boolean!
isSellingDenied: Boolean!
isVisible: Boolean!
Expand All @@ -2187,6 +2223,7 @@ type RegularProduct implements Product & Hreflang & Breadcrumb & Slug {
partNumber: String
"Product price"
price: ProductPrice!
productType: ProductTypeEnum!
productVideos: [VideoToken!]!
"List of related products"
relatedProducts: [Product!]!
Expand Down Expand Up @@ -2497,6 +2534,7 @@ type Variant implements Product & Hreflang & Breadcrumb & Slug {
id: Int!
"Product images"
images(type: String = null): [Image!]!
isInquiryType: Boolean!
isMainVariant: Boolean!
isSellingDenied: Boolean!
isVisible: Boolean!
Expand All @@ -2517,6 +2555,7 @@ type Variant implements Product & Hreflang & Breadcrumb & Slug {
partNumber: String
"Product price"
price: ProductPrice!
productType: ProductTypeEnum!
productVideos: [VideoToken!]!
"List of related products"
relatedProducts: [Product!]!
Expand Down
Loading

0 comments on commit 123022f

Please sign in to comment.