Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send order lines in orderGrantRefundCreate mutation #4373

Merged
merged 33 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
33d91fc
Add line to mutation
poulch Oct 23, 2023
63e086b
Fetch schema and build types
poulch Oct 23, 2023
800d4ac
Send lines
poulch Oct 23, 2023
d9b4213
Fisnish create using lines
poulch Oct 24, 2023
e2a1a02
Edit grant refund
poulch Oct 24, 2023
1f1d5a8
Edit grant refund with remove current grant line
poulch Oct 24, 2023
2794827
showing calculated refund value
poulch Oct 25, 2023
bf17c21
Generate errors for create refund and grantRefund for query
poulch Oct 25, 2023
dcaa877
Showing proper quantity
poulch Oct 25, 2023
4751ef8
Add missing prop to storybook
poulch Oct 25, 2023
8d0462f
Merge branch 'main' into 4277-send-refund-line-items
poulch Oct 25, 2023
bbc70db
Add changeset
poulch Oct 25, 2023
7cc2947
Send refundShipping
poulch Oct 25, 2023
61fa693
Prevent mutiple shiping refund
poulch Oct 25, 2023
1905a86
Clenup initial refund data
poulch Oct 25, 2023
d3a7bd1
Layout change
poulch Oct 26, 2023
2422af1
Merge branch 'main' into 4277-send-refund-line-items
poulch Oct 26, 2023
ee8aa4e
Remove not needed styles
poulch Oct 26, 2023
55a5af5
Prepare utils function for calculation and test them
poulch Oct 26, 2023
01cd4e9
Fix setting isDirty
poulch Oct 27, 2023
80bb819
Fix showing refund amount
poulch Oct 27, 2023
ef180f4
Fix calcaulate value base on lines and shipping dirty
poulch Oct 27, 2023
1793c26
Fix sending amount
poulch Oct 27, 2023
1309ba4
Fix set max quantity isDirty
poulch Oct 27, 2023
7710a01
Stop disable submit button
poulch Oct 27, 2023
e0f5ff3
Savebar
poulch Oct 27, 2023
af9c33b
Fix sending value amount
poulch Oct 27, 2023
d1de463
createToGrantRefundLineMap and getDisplayRefundAmountValue
poulch Oct 30, 2023
9d9907d
Merge branch 'main' into 4277-send-refund-line-items
poulch Oct 30, 2023
af65064
Fix typos and refactor
poulch Oct 30, 2023
19b2dde
Merge branch 'main' into 4277-send-refund-line-items
poulch Oct 31, 2023
764ed70
Fix amount as number
poulch Nov 1, 2023
a7de592
Empty-Commit
poulch Nov 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/angry-buckets-marry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": minor
---

Send order lines in orderGrantRefundCreate mutation
76 changes: 64 additions & 12 deletions introspection.json
Original file line number Diff line number Diff line change
Expand Up @@ -17703,7 +17703,7 @@
},
{
"name": "displayGrossPrices",
"description": "Determines whether checkout prices should include taxes when displayed in a storefront.\n\nAdded in Saleor 3.9.",
"description": "Determines whether displayed prices should include taxes.\n\nAdded in Saleor 3.9.",
"args": [],
"type": {
"kind": "NON_NULL",
Expand Down Expand Up @@ -30049,7 +30049,7 @@
{
"kind": "OBJECT",
"name": "Domain",
"description": "Represents shop's domain.",
"description": "Represents API domain.",
"fields": [
{
"name": "host",
Expand Down Expand Up @@ -30085,7 +30085,7 @@
},
{
"name": "url",
"description": "Shop's absolute URL.",
"description": "The absolute URL of the API.",
"args": [],
"type": {
"kind": "NON_NULL",
Expand Down Expand Up @@ -62390,7 +62390,7 @@
},
{
"name": "stockBulkUpdate",
"description": "Updates stocks for a given variant and warehouse.\n\nAdded in Saleor 3.13.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point. \n\nRequires one of the following permissions: MANAGE_PRODUCTS.",
"description": "Updates stocks for a given variant and warehouse.\n\nAdded in Saleor 3.13.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point. \n\nRequires one of the following permissions: MANAGE_PRODUCTS.\n\nTriggers the following webhook events:\n- PRODUCT_VARIANT_STOCK_UPDATED (async): A product variant stock details were updated.",
"args": [
{
"name": "errorPolicy",
Expand Down Expand Up @@ -65492,7 +65492,7 @@
},
{
"name": "displayGrossPrices",
"description": "Determines whether checkout prices should include taxes when displayed in a storefront.\n\nAdded in Saleor 3.9.",
"description": "Determines whether displayed prices should include taxes.\n\nAdded in Saleor 3.9.",
"args": [],
"type": {
"kind": "NON_NULL",
Expand Down Expand Up @@ -67546,7 +67546,7 @@
},
{
"name": "displayGrossPrices",
"description": "Determines whether checkout prices should include taxes, when displayed in a storefront.",
"description": "Determines whether displayed prices should include taxes.",
"type": {
"kind": "SCALAR",
"name": "Boolean",
Expand Down Expand Up @@ -73479,6 +73479,18 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "saleId",
"description": "Denormalized sale ID, set when order line is created for a product variant that is on sale.\n\nAdded in Saleor 3.14.",
"args": [],
"type": {
"kind": "SCALAR",
"name": "ID",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "taxClass",
"description": "Denormalized tax class of the product in this order line.\n\nAdded in Saleor 3.9.\n\nRequires one of the following permissions: AUTHENTICATED_STAFF_USER, AUTHENTICATED_APP.",
Expand Down Expand Up @@ -73783,6 +73795,18 @@
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "voucherCode",
"description": "Voucher code that was used for this order line.\n\nAdded in Saleor 3.14.",
"args": [],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
Expand Down Expand Up @@ -80425,6 +80449,22 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "partial",
"description": "Informs whether this is a partial payment.\n\nAdded in Saleor 3.14.",
"args": [],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "paymentMethodType",
"description": "Type of method used for payment.",
Expand Down Expand Up @@ -80527,6 +80567,18 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "pspReference",
"description": "PSP reference of the payment.\n\nAdded in Saleor 3.14.",
"args": [],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "token",
"description": "Unique token associated with a payment.",
Expand Down Expand Up @@ -91714,7 +91766,7 @@
},
{
"name": "displayGrossPrices",
"description": "Determines whether this product's price displayed in a storefront should include taxes.\n\nAdded in Saleor 3.9.",
"description": "Determines whether displayed prices should include taxes.\n\nAdded in Saleor 3.9.",
"args": [],
"type": {
"kind": "NON_NULL",
Expand Down Expand Up @@ -118724,7 +118776,7 @@
{
"kind": "OBJECT",
"name": "StockBulkUpdate",
"description": "Updates stocks for a given variant and warehouse.\n\nAdded in Saleor 3.13.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point. \n\nRequires one of the following permissions: MANAGE_PRODUCTS.",
"description": "Updates stocks for a given variant and warehouse.\n\nAdded in Saleor 3.13.\n\nNote: this API is currently in Feature Preview and can be subject to changes at later point. \n\nRequires one of the following permissions: MANAGE_PRODUCTS.\n\nTriggers the following webhook events:\n- PRODUCT_VARIANT_STOCK_UPDATED (async): A product variant stock details were updated.",
"fields": [
{
"name": "count",
Expand Down Expand Up @@ -121043,7 +121095,7 @@
},
{
"name": "displayGrossPrices",
"description": "Determines whether prices displayed in a storefront should include taxes.",
"description": "Determines whether displayed prices should include taxes.",
"args": [],
"type": {
"kind": "NON_NULL",
Expand Down Expand Up @@ -121486,7 +121538,7 @@
},
{
"name": "displayGrossPrices",
"description": "Determines whether prices displayed in a storefront should include taxes for this country.",
"description": "Determines whether displayed prices should include taxes for this country.",
"args": [],
"type": {
"kind": "NON_NULL",
Expand Down Expand Up @@ -121558,7 +121610,7 @@
},
{
"name": "displayGrossPrices",
"description": "Determines whether prices displayed in a storefront should include taxes for this country.",
"description": "Determines whether displayed prices should include taxes for this country.",
"type": {
"kind": "NON_NULL",
"name": null,
Expand Down Expand Up @@ -121766,7 +121818,7 @@
},
{
"name": "displayGrossPrices",
"description": "Determines whether prices displayed in a storefront should include taxes.",
"description": "Determines whether displayed prices should include taxes.",
"type": {
"kind": "SCALAR",
"name": "Boolean",
Expand Down
3 changes: 3 additions & 0 deletions locale/defaultMessages.json
Original file line number Diff line number Diff line change
Expand Up @@ -7373,6 +7373,9 @@
"context": "Add filter button text",
"string": "+ Add filter"
},
"o/4OCR": {
"string": "Shipping has already been refunded"
},
"o5KXAN": {
"context": "delete webhook",
"string": "Are you sure you want to delete {name}?"
Expand Down
60 changes: 44 additions & 16 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -4482,7 +4482,7 @@ type Checkout implements Node & ObjectWithMetadata {
discountName: String

"""
Determines whether checkout prices should include taxes when displayed in a storefront.
Determines whether displayed prices should include taxes.

Added in Saleor 3.9.
"""
Expand Down Expand Up @@ -7351,15 +7351,15 @@ enum DistanceUnitsEnum {
YD
}

"""Represents shop's domain."""
"""Represents API domain."""
type Domain {
"""The host name of the domain."""
host: String!

"""Inform if SSL is enabled."""
sslEnabled: Boolean!

"""Shop's absolute URL."""
"""The absolute URL of the API."""
url: String!
}

Expand Down Expand Up @@ -15898,6 +15898,9 @@ type Mutation {
Note: this API is currently in Feature Preview and can be subject to changes at later point.

Requires one of the following permissions: MANAGE_PRODUCTS.

Triggers the following webhook events:
- PRODUCT_VARIANT_STOCK_UPDATED (async): A product variant stock details were updated.
"""
stockBulkUpdate(
"""Policies of error handling. DEFAULT: REJECT_EVERYTHING"""
Expand Down Expand Up @@ -16656,7 +16659,7 @@ type Order implements Node & ObjectWithMetadata {
discounts: [OrderDiscount!]!

"""
Determines whether checkout prices should include taxes when displayed in a storefront.
Determines whether displayed prices should include taxes.

Added in Saleor 3.9.
"""
Expand Down Expand Up @@ -17179,9 +17182,7 @@ input OrderBulkCreateInput {
"""List of discounts."""
discounts: [OrderDiscountCommonInput!]

"""
Determines whether checkout prices should include taxes, when displayed in a storefront.
"""
"""Determines whether displayed prices should include taxes."""
displayGrossPrices: Boolean

"""External ID of the order."""
Expand Down Expand Up @@ -18538,6 +18539,13 @@ type OrderLine implements Node & ObjectWithMetadata {
"""
quantityToFulfill: Int!

"""
Denormalized sale ID, set when order line is created for a product variant that is on sale.

Added in Saleor 3.14.
"""
saleId: ID

"""
Denormalized tax class of the product in this order line.

Expand Down Expand Up @@ -18617,6 +18625,13 @@ type OrderLine implements Node & ObjectWithMetadata {
"""
variant: ProductVariant
variantName: String!

"""
Voucher code that was used for this order line.

Added in Saleor 3.14.
"""
voucherCode: String
}

input OrderLineCreateInput {
Expand Down Expand Up @@ -20228,6 +20243,13 @@ type Payment implements Node & ObjectWithMetadata {
"""Order associated with a payment."""
order: Order

"""
Informs whether this is a partial payment.

Added in Saleor 3.14.
"""
partial: Boolean!

"""Type of method used for payment."""
paymentMethodType: String!

Expand All @@ -20250,6 +20272,13 @@ type Payment implements Node & ObjectWithMetadata {
"""
privateMetafields(keys: [String!]): Metadata

"""
PSP reference of the payment.

Added in Saleor 3.14.
"""
pspReference: String

"""Unique token associated with a payment."""
token: String!

Expand Down Expand Up @@ -23006,7 +23035,7 @@ type ProductPricingInfo {
discountLocalCurrency: TaxedMoney @deprecated(reason: "This field will be removed in Saleor 4.0. Always returns `null`.")

"""
Determines whether this product's price displayed in a storefront should include taxes.
Determines whether displayed prices should include taxes.

Added in Saleor 3.9.
"""
Expand Down Expand Up @@ -30045,6 +30074,9 @@ Added in Saleor 3.13.
Note: this API is currently in Feature Preview and can be subject to changes at later point.

Requires one of the following permissions: MANAGE_PRODUCTS.

Triggers the following webhook events:
- PRODUCT_VARIANT_STOCK_UPDATED (async): A product variant stock details were updated.
"""
type StockBulkUpdate {
"""Returns how many objects were updated."""
Expand Down Expand Up @@ -30602,9 +30634,7 @@ type TaxConfiguration implements Node & ObjectWithMetadata {
"""List of country-specific exceptions in tax configuration."""
countries: [TaxConfigurationPerCountry!]!

"""
Determines whether prices displayed in a storefront should include taxes.
"""
"""Determines whether displayed prices should include taxes."""
displayGrossPrices: Boolean!

"""The ID of the object."""
Expand Down Expand Up @@ -30693,7 +30723,7 @@ type TaxConfigurationPerCountry {
country: CountryDisplay!

"""
Determines whether prices displayed in a storefront should include taxes for this country.
Determines whether displayed prices should include taxes for this country.
"""
displayGrossPrices: Boolean!

Expand All @@ -30711,7 +30741,7 @@ input TaxConfigurationPerCountryInput {
countryCode: CountryCode!

"""
Determines whether prices displayed in a storefront should include taxes for this country.
Determines whether displayed prices should include taxes for this country.
"""
displayGrossPrices: Boolean!

Expand Down Expand Up @@ -30761,9 +30791,7 @@ input TaxConfigurationUpdateInput {
"""Determines whether taxes are charged in the given channel."""
chargeTaxes: Boolean

"""
Determines whether prices displayed in a storefront should include taxes.
"""
"""Determines whether displayed prices should include taxes."""
displayGrossPrices: Boolean

"""Determines whether prices are entered with the tax included."""
Expand Down
Loading
Loading