Skip to content

Commit

Permalink
feat: implement edit order
Browse files Browse the repository at this point in the history
  • Loading branch information
belsman committed Aug 26, 2024
1 parent ae82cae commit 2d94224
Show file tree
Hide file tree
Showing 5 changed files with 448 additions and 6 deletions.
38 changes: 38 additions & 0 deletions packages/core/graphql/src/lib/documents/fragments/order.gql
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ fragment OrderFragment on IoRestorecommerceOrderOrder {
id
customerOrderNr
notificationEmail
shopId
orderState
items {
id
quantity
productId
variantId
parentItemId
product {
...ProductFragment
}
Expand Down Expand Up @@ -62,6 +66,40 @@ fragment OrderFragment on IoRestorecommerceOrderOrder {
}
}
}
billingAddress {
comments
contact {
name
email
phone
}
address {
id
street
buildingNumber
locality
region
businessAddress {
name
}
addressAddition {
field1
field2
}
country {
id
name
countryCode
}
postcode
residentialAddress {
title
givenName
midName
familyName
}
}
}
totalAmounts {
currency {
name
Expand Down
173 changes: 173 additions & 0 deletions packages/core/graphql/src/lib/generated/generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5969,11 +5969,15 @@ export type OrderFragmentFragment = {
id?: string | null;
customerOrderNr?: string | null;
notificationEmail?: string | null;
shopId?: string | null;
orderState?: IoRestorecommerceOrderOrderState | null;
items?: Array<{
__typename?: 'IoRestorecommerceOrderItem';
id?: string | null;
quantity?: number | null;
productId?: string | null;
variantId?: string | null;
parentItemId?: string | null;
product?: {
__typename?: 'IoRestorecommerceProductProduct';
id?: string | null;
Expand Down Expand Up @@ -6403,6 +6407,47 @@ export type OrderFragmentFragment = {
} | null;
} | null;
} | null;
billingAddress?: {
__typename?: 'IoRestorecommerceAddressBillingAddress';
comments?: string | null;
contact?: {
__typename?: 'IoRestorecommerceAddressContact';
name?: string | null;
email?: string | null;
phone?: string | null;
} | null;
address?: {
__typename?: 'IoRestorecommerceAddressAddress';
id?: string | null;
street?: string | null;
buildingNumber?: string | null;
locality?: string | null;
region?: string | null;
postcode?: string | null;
businessAddress?: {
__typename?: 'IoRestorecommerceAddressBusinessAddress';
name?: string | null;
} | null;
addressAddition?: {
__typename?: 'IoRestorecommerceAddressAddressAddition';
field1?: string | null;
field2?: string | null;
} | null;
country?: {
__typename?: 'IoRestorecommerceCountryCountry';
id?: string | null;
name?: string | null;
countryCode?: string | null;
} | null;
residentialAddress?: {
__typename?: 'IoRestorecommerceAddressResidentialAddress';
title?: string | null;
givenName?: string | null;
midName?: string | null;
familyName?: string | null;
} | null;
} | null;
} | null;
totalAmounts?: Array<{
__typename?: 'IoRestorecommerceAmountAmount';
gross?: number | null;
Expand Down Expand Up @@ -8228,11 +8273,15 @@ export type OrderingOrderMutateMutation = {
id?: string | null;
customerOrderNr?: string | null;
notificationEmail?: string | null;
shopId?: string | null;
orderState?: IoRestorecommerceOrderOrderState | null;
items?: Array<{
__typename?: 'IoRestorecommerceOrderItem';
id?: string | null;
quantity?: number | null;
productId?: string | null;
variantId?: string | null;
parentItemId?: string | null;
product?: {
__typename?: 'IoRestorecommerceProductProduct';
id?: string | null;
Expand Down Expand Up @@ -8662,6 +8711,47 @@ export type OrderingOrderMutateMutation = {
} | null;
} | null;
} | null;
billingAddress?: {
__typename?: 'IoRestorecommerceAddressBillingAddress';
comments?: string | null;
contact?: {
__typename?: 'IoRestorecommerceAddressContact';
name?: string | null;
email?: string | null;
phone?: string | null;
} | null;
address?: {
__typename?: 'IoRestorecommerceAddressAddress';
id?: string | null;
street?: string | null;
buildingNumber?: string | null;
locality?: string | null;
region?: string | null;
postcode?: string | null;
businessAddress?: {
__typename?: 'IoRestorecommerceAddressBusinessAddress';
name?: string | null;
} | null;
addressAddition?: {
__typename?: 'IoRestorecommerceAddressAddressAddition';
field1?: string | null;
field2?: string | null;
} | null;
country?: {
__typename?: 'IoRestorecommerceCountryCountry';
id?: string | null;
name?: string | null;
countryCode?: string | null;
} | null;
residentialAddress?: {
__typename?: 'IoRestorecommerceAddressResidentialAddress';
title?: string | null;
givenName?: string | null;
midName?: string | null;
familyName?: string | null;
} | null;
} | null;
} | null;
totalAmounts?: Array<{
__typename?: 'IoRestorecommerceAmountAmount';
gross?: number | null;
Expand Down Expand Up @@ -8764,11 +8854,15 @@ export type OrderingOrderReadQuery = {
id?: string | null;
customerOrderNr?: string | null;
notificationEmail?: string | null;
shopId?: string | null;
orderState?: IoRestorecommerceOrderOrderState | null;
items?: Array<{
__typename?: 'IoRestorecommerceOrderItem';
id?: string | null;
quantity?: number | null;
productId?: string | null;
variantId?: string | null;
parentItemId?: string | null;
product?: {
__typename?: 'IoRestorecommerceProductProduct';
id?: string | null;
Expand Down Expand Up @@ -9198,6 +9292,47 @@ export type OrderingOrderReadQuery = {
} | null;
} | null;
} | null;
billingAddress?: {
__typename?: 'IoRestorecommerceAddressBillingAddress';
comments?: string | null;
contact?: {
__typename?: 'IoRestorecommerceAddressContact';
name?: string | null;
email?: string | null;
phone?: string | null;
} | null;
address?: {
__typename?: 'IoRestorecommerceAddressAddress';
id?: string | null;
street?: string | null;
buildingNumber?: string | null;
locality?: string | null;
region?: string | null;
postcode?: string | null;
businessAddress?: {
__typename?: 'IoRestorecommerceAddressBusinessAddress';
name?: string | null;
} | null;
addressAddition?: {
__typename?: 'IoRestorecommerceAddressAddressAddition';
field1?: string | null;
field2?: string | null;
} | null;
country?: {
__typename?: 'IoRestorecommerceCountryCountry';
id?: string | null;
name?: string | null;
countryCode?: string | null;
} | null;
residentialAddress?: {
__typename?: 'IoRestorecommerceAddressResidentialAddress';
title?: string | null;
givenName?: string | null;
midName?: string | null;
familyName?: string | null;
} | null;
} | null;
} | null;
totalAmounts?: Array<{
__typename?: 'IoRestorecommerceAmountAmount';
gross?: number | null;
Expand Down Expand Up @@ -9558,10 +9693,14 @@ export const OrderFragmentFragmentDoc = gql`
id
customerOrderNr
notificationEmail
shopId
orderState
items {
id
quantity
productId
variantId
parentItemId
product {
...ProductFragment
}
Expand Down Expand Up @@ -9618,6 +9757,40 @@ export const OrderFragmentFragmentDoc = gql`
}
}
}
billingAddress {
comments
contact {
name
email
phone
}
address {
id
street
buildingNumber
locality
region
businessAddress {
name
}
addressAddition {
field1
field2
}
country {
id
name
countryCode
}
postcode
residentialAddress {
title
givenName
midName
familyName
}
}
}
totalAmounts {
currency {
name
Expand Down
Loading

0 comments on commit 2d94224

Please sign in to comment.