Merge pull request #1169 from mirumee/SALEOR-3522/company-name-in-warehouse-updates-2

fix company name in warehouse updates
This commit is contained in:
SektorDV 2021-06-17 11:40:55 +02:00 committed by GitHub
commit b32371b66e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 35 deletions

View file

@ -4548,7 +4548,6 @@ type ProductVariant implements Node & ObjectWithMetadata {
channelListings: [ProductVariantChannelListing!] channelListings: [ProductVariantChannelListing!]
pricing(address: AddressInput): VariantPricingInfo pricing(address: AddressInput): VariantPricingInfo
attributes(variantSelection: VariantAttributeScope): [SelectedAttribute!]! attributes(variantSelection: VariantAttributeScope): [SelectedAttribute!]!
costPrice: Money
margin: Int margin: Int
quantityOrdered: Int quantityOrdered: Int
revenue(period: ReportingPeriod): TaxedMoney revenue(period: ReportingPeriod): TaxedMoney
@ -5915,23 +5914,12 @@ type Warehouse implements Node & ObjectWithMetadata {
id: ID! id: ID!
name: String! name: String!
slug: String! slug: String!
companyName: String!
shippingZones(before: String, after: String, first: Int, last: Int): ShippingZoneCountableConnection! shippingZones(before: String, after: String, first: Int, last: Int): ShippingZoneCountableConnection!
address: Address! address: Address!
email: String! email: String!
privateMetadata: [MetadataItem]! privateMetadata: [MetadataItem]!
metadata: [MetadataItem]! metadata: [MetadataItem]!
} companyName: String! @deprecated(reason: "Use address.CompanyName. This field will be removed in Saleor 4.0.")
input WarehouseAddressInput {
streetAddress1: String!
streetAddress2: String
city: String!
cityArea: String
postalCode: String
country: CountryCode!
countryArea: String
phone: String
} }
type WarehouseCountableConnection { type WarehouseCountableConnection {
@ -5953,10 +5941,9 @@ type WarehouseCreate {
input WarehouseCreateInput { input WarehouseCreateInput {
slug: String slug: String
companyName: String
email: String email: String
name: String! name: String!
address: WarehouseAddressInput! address: AddressInput!
shippingZones: [ID] shippingZones: [ID]
} }
@ -6015,10 +6002,9 @@ type WarehouseUpdate {
input WarehouseUpdateInput { input WarehouseUpdateInput {
slug: String slug: String
companyName: String
email: String email: String
name: String name: String
address: WarehouseAddressInput address: AddressInput
} }
type Webhook implements Node { type Webhook implements Node {

View file

@ -327,6 +327,7 @@ const ShippingZoneDetails: React.FC<ShippingZoneDetailsProps> = ({
variables: { variables: {
input: { input: {
address: { address: {
companyName: data.companyName,
city: data.city, city: data.city,
cityArea: data.cityArea, cityArea: data.cityArea,
country: findValueInEnum(data.country, CountryCode), country: findValueInEnum(data.country, CountryCode),
@ -336,7 +337,6 @@ const ShippingZoneDetails: React.FC<ShippingZoneDetailsProps> = ({
streetAddress1: data.streetAddress1, streetAddress1: data.streetAddress1,
streetAddress2: data.streetAddress2 streetAddress2: data.streetAddress2
}, },
companyName: data.companyName,
name: data.name name: data.name
} }
} }

View file

@ -1984,23 +1984,11 @@ export interface VoucherSortingInput {
field: VoucherSortField; field: VoucherSortField;
} }
export interface WarehouseAddressInput {
streetAddress1: string;
streetAddress2?: string | null;
city: string;
cityArea?: string | null;
postalCode?: string | null;
country: CountryCode;
countryArea?: string | null;
phone?: string | null;
}
export interface WarehouseCreateInput { export interface WarehouseCreateInput {
slug?: string | null; slug?: string | null;
companyName?: string | null;
email?: string | null; email?: string | null;
name: string; name: string;
address: WarehouseAddressInput; address: AddressInput;
shippingZones?: (string | null)[] | null; shippingZones?: (string | null)[] | null;
} }
@ -2016,10 +2004,9 @@ export interface WarehouseSortingInput {
export interface WarehouseUpdateInput { export interface WarehouseUpdateInput {
slug?: string | null; slug?: string | null;
companyName?: string | null;
email?: string | null; email?: string | null;
name?: string | null; name?: string | null;
address?: WarehouseAddressInput | null; address?: AddressInput | null;
} }
export interface WebhookCreateInput { export interface WebhookCreateInput {

View file

@ -48,6 +48,7 @@ const WarehouseCreate: React.FC = () => {
variables: { variables: {
input: { input: {
address: { address: {
companyName: data.companyName,
city: data.city, city: data.city,
cityArea: data.cityArea, cityArea: data.cityArea,
country: findValueInEnum(data.country, CountryCode), country: findValueInEnum(data.country, CountryCode),
@ -57,7 +58,6 @@ const WarehouseCreate: React.FC = () => {
streetAddress1: data.streetAddress1, streetAddress1: data.streetAddress1,
streetAddress2: data.streetAddress2 streetAddress2: data.streetAddress2
}, },
companyName: data.companyName,
name: data.name name: data.name
} }
} }

View file

@ -84,6 +84,7 @@ const WarehouseDetails: React.FC<WarehouseDetailsProps> = ({ id, params }) => {
id, id,
input: { input: {
address: { address: {
companyName: data.companyName,
city: data.city, city: data.city,
cityArea: data.cityArea, cityArea: data.cityArea,
country: findValueInEnum(data.country, CountryCode), country: findValueInEnum(data.country, CountryCode),