Skip to content

Commit

Permalink
Merge branch 'master' into SALEOR-3736-Product-and-page-translations-…
Browse files Browse the repository at this point in the history
…missing-attributes-of-type-text
  • Loading branch information
kamilpastuszka authored Aug 9, 2021
2 parents 8efb132 + 19b0a96 commit 98fbf51
Show file tree
Hide file tree
Showing 119 changed files with 5,329 additions and 701 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,18 @@ All notable, unreleased changes to this project will be documented in this file.
- Fix forbidden null sending as attribute value - #1201 by @orzechdev
- Fix missing call for update metadata mutation - #1207 by @orzechdev
- Disable next step when no value selected in variant selector - #1218 by @orzechdev
- Add boolean attributes - #1157 by @piotrgrundas
- Add date & date time attributes - #1180 by @piotrgrundas
- Fix order links on home page - #1219 by @jwm0
- Fix incorrectly handled image upload errors - #1223 by @kamilpastuszka
- Fix huge payload issue for plugins view - #1203 by @kamilpastuszka
- Fix content type validation in create page view - #1205 by @orzechdev
- Fix list pagination crash on search - #1230 by @orzechdev
- Fix positive float number input validation - #1233 by @orzechdev
- Use MacawUI - #1229 by @dominik-zeglen
- Add Metadata for Sale & Voucher - #7653 by @piotrgrundas
- Add variant create options dialog - #1238 by @orzechdev
- Fix for errors on changing channel availability - #1264 by @krzysztofwolski

# 2.11.1

Expand Down Expand Up @@ -185,7 +189,6 @@ All notable, unreleased changes to this project will be documented in this file.
- Update product stock management to newest design - #515 by @dominik-zeglen
- Handle untracked products - #523 by @dominik-zeglen
- Display correct error if there were no graphql errors - #525 by @dominik-zeglen
- Add boolean attributes - #1157 by @piotrgrundas

## 2.0.0

Expand Down
23 changes: 23 additions & 0 deletions locale/defaultMessages.json
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,14 @@
"context": "boolean attribute type",
"string": "Boolean"
},
"src_dot_attributes_dot_components_dot_AttributeDetails_dot_date": {
"context": "date attribute type",
"string": "Date"
},
"src_dot_attributes_dot_components_dot_AttributeDetails_dot_dateTime": {
"context": "date time attribute type",
"string": "Date Time"
},
"src_dot_attributes_dot_components_dot_AttributeDetails_dot_distance": {
"context": "distance units type",
"string": "Distance"
Expand Down Expand Up @@ -2757,6 +2765,9 @@
"src_dot_dashboard": {
"string": "Dashboard"
},
"src_dot_date": {
"string": "Date"
},
"src_dot_delete": {
"context": "button",
"string": "Delete"
Expand Down Expand Up @@ -6656,6 +6667,10 @@
"src_dot_translationAttributes": {
"string": "Attributes"
},
"src_dot_time": {
"context": "independent of any particular day, eg. 11:35",
"string": "Time"
},
"src_dot_translations": {
"context": "translations section name",
"string": "Translations"
Expand Down Expand Up @@ -7245,6 +7260,10 @@
"context": "event",
"string": "Order created"
},
"src_dot_webhooks_dot_components_dot_WebhookEvents_dot_36047288": {
"context": "event",
"string": "Translation created"
},
"src_dot_webhooks_dot_components_dot_WebhookEvents_dot_3617444329": {
"context": "event",
"string": "Order cancelled"
Expand Down Expand Up @@ -7285,6 +7304,10 @@
"context": "event",
"string": "Process payment"
},
"src_dot_webhooks_dot_components_dot_WebhookEvents_dot_482477254": {
"context": "event",
"string": "Translation updated"
},
"src_dot_webhooks_dot_components_dot_WebhookEvents_dot_679080833": {
"context": "event",
"string": "Page created"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
"test:e2e:run": "start-server-and-test start http://localhost:9000 cy:run",
"test:e2e:run:record": "start-server-and-test start http://localhost:9000 cy:run:record",
"test:e2e:dev": "start-server-and-test start http://localhost:9000 cy:open",
"test": "jest src/",
"test": "TZ=UTC jest src/",
"transpile-messages": "node scripts/transpile-tx.js",
"lint": "npx eslint \"src/**/*.@(tsx|ts|jsx|js)\" --fix ; npx prettier --check \"src/**/*.@(tsx|ts|jsx|js)\" --write",
"postbuild": "rimraf ./build/**/*.js.map",
Expand Down
39 changes: 34 additions & 5 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -513,12 +513,15 @@ input AttributeFilterInput {
type: AttributeTypeEnum
inCollection: ID
inCategory: ID
channel: String
}

input AttributeInput {
slug: String!
values: [String]
valuesRange: IntRangeInput
dateTime: DateTimeRangeInput
date: DateRangeInput
boolean: Boolean
}

Expand All @@ -530,6 +533,8 @@ enum AttributeInputTypeEnum {
NUMERIC
RICH_TEXT
BOOLEAN
DATE
DATE_TIME
}

type AttributeReorderValues {
Expand Down Expand Up @@ -611,6 +616,8 @@ type AttributeValue implements Node {
file: File
richText: JSONString
boolean: Boolean
date: Date
dateTime: DateTime
}

type AttributeValueBulkDelete {
Expand Down Expand Up @@ -662,6 +669,8 @@ input AttributeValueInput {
references: [ID!]
richText: JSONString
boolean: Boolean
date: Date
dateTime: DateTime
}

type AttributeValueTranslatableContent implements Node {
Expand Down Expand Up @@ -699,7 +708,8 @@ type AttributeValueUpdate {

input BulkAttributeValueInput {
id: ID
values: [String!]!
values: [String!]
boolean: Boolean
}

type BulkProductError {
Expand Down Expand Up @@ -799,6 +809,7 @@ enum CategorySortField {

input CategorySortingInput {
direction: OrderDirection!
channel: String
field: CategorySortField!
}

Expand Down Expand Up @@ -1232,6 +1243,7 @@ input CollectionFilterInput {
search: String
metadata: [MetadataFilter]
ids: [ID]
channel: String
}

input CollectionInput {
Expand Down Expand Up @@ -1271,6 +1283,7 @@ enum CollectionSortField {

input CollectionSortingInput {
direction: OrderDirection!
channel: String
field: CollectionSortField!
}

Expand Down Expand Up @@ -1641,6 +1654,7 @@ type CustomerEvent implements Node {
date: DateTime
type: CustomerEventsEnum
user: User
app: App
message: String
count: Int
order: Order
Expand Down Expand Up @@ -3186,6 +3200,7 @@ type OrderEvent implements Node {
date: DateTime
type: OrderEventsEnum
user: User
app: App
message: String
email: String
emailType: OrderEventsEmailsEnum
Expand Down Expand Up @@ -3903,6 +3918,7 @@ type PaymentRefund {

type PaymentSource {
gateway: String!
paymentMethodId: String
creditCardInfo: CreditCard
}

Expand Down Expand Up @@ -4293,6 +4309,7 @@ input ProductFilterInput {
minimalPrice: PriceRangeInput
productTypes: [ID]
ids: [ID]
channel: String
}

type ProductImage {
Expand Down Expand Up @@ -4377,6 +4394,7 @@ input ProductMediaUpdateInput {

input ProductOrder {
direction: OrderDirection!
channel: String
attributeId: ID
field: ProductOrderField
}
Expand Down Expand Up @@ -4781,7 +4799,6 @@ type Query {
taxTypes: [TaxType]
checkout(token: UUID): Checkout
checkouts(channel: String, before: String, after: String, first: Int, last: Int): CheckoutCountableConnection
checkoutLine(id: ID): CheckoutLine
checkoutLines(before: String, after: String, first: Int, last: Int): CheckoutLineCountableConnection
channel(id: ID): Channel
channels: [Channel!]
Expand Down Expand Up @@ -4835,12 +4852,14 @@ type RequestPasswordReset {
errors: [AccountError!]!
}

type Sale implements Node {
type Sale implements Node & ObjectWithMetadata {
id: ID!
name: String!
type: SaleType!
startDate: DateTime!
endDate: DateTime
privateMetadata: [MetadataItem]!
metadata: [MetadataItem]!
categories(before: String, after: String, first: Int, last: Int): CategoryCountableConnection
collections(before: String, after: String, first: Int, last: Int): CollectionCountableConnection
products(before: String, after: String, first: Int, last: Int): ProductCountableConnection
Expand Down Expand Up @@ -4913,6 +4932,7 @@ input SaleFilterInput {
saleType: DiscountValueTypeEnum
started: DateTimeRangeInput
search: String
metadata: [MetadataFilter]
}

input SaleInput {
Expand Down Expand Up @@ -4942,6 +4962,7 @@ enum SaleSortField {

input SaleSortingInput {
direction: OrderDirection!
channel: String
field: SaleSortField!
}

Expand Down Expand Up @@ -5753,7 +5774,7 @@ enum VolumeUnitsEnum {
ACRE_FT
}

type Voucher implements Node {
type Voucher implements Node & ObjectWithMetadata {
id: ID!
name: String
type: VoucherTypeEnum!
Expand All @@ -5767,6 +5788,8 @@ type Voucher implements Node {
onlyForStaff: Boolean!
discountValueType: DiscountValueTypeEnum!
minCheckoutItemsQuantity: Int
privateMetadata: [MetadataItem]!
metadata: [MetadataItem]!
categories(before: String, after: String, first: Int, last: Int): CategoryCountableConnection
collections(before: String, after: String, first: Int, last: Int): CollectionCountableConnection
products(before: String, after: String, first: Int, last: Int): ProductCountableConnection
Expand Down Expand Up @@ -5850,6 +5873,7 @@ input VoucherFilterInput {
discountType: [VoucherDiscountType]
started: DateTimeRangeInput
search: String
metadata: [MetadataFilter]
}

input VoucherInput {
Expand Down Expand Up @@ -5888,6 +5912,7 @@ enum VoucherSortField {

input VoucherSortingInput {
direction: OrderDirection!
channel: String
field: VoucherSortField!
}

Expand Down Expand Up @@ -6102,6 +6127,8 @@ enum WebhookEventTypeEnum {
PAYMENT_PROCESS
PAYMENT_REFUND
PAYMENT_VOID
TRANSLATION_CREATED
TRANSLATION_UPDATED
}

enum WebhookSampleEventTypeEnum {
Expand Down Expand Up @@ -6136,6 +6163,8 @@ enum WebhookSampleEventTypeEnum {
PAYMENT_PROCESS
PAYMENT_REFUND
PAYMENT_VOID
TRANSLATION_CREATED
TRANSLATION_UPDATED
}

type WebhookUpdate {
Expand Down Expand Up @@ -6170,7 +6199,7 @@ enum WeightUnitsEnum {

scalar _Any

union _Entity = Address | User | Group | App | ProductVariant | Product | ProductType | Collection | Category | ProductMedia | ProductImage | PageType
union _Entity = App | Address | User | Group | ProductVariant | Product | ProductType | Collection | Category | ProductMedia | ProductImage | PageType

type _Service {
sdl: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@ const AttributeDetails: React.FC<AttributeDetailsProps> = props => {
{
label: intl.formatMessage(inputTypeMessages.boolean),
value: AttributeInputTypeEnum.BOOLEAN
},
{
label: intl.formatMessage(inputTypeMessages.date),
value: AttributeInputTypeEnum.DATE
},
{
label: intl.formatMessage(inputTypeMessages.dateTime),
value: AttributeInputTypeEnum.DATE_TIME
}
];
const entityTypeChoices = [
Expand Down
8 changes: 8 additions & 0 deletions src/attributes/components/AttributeDetails/messages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ export const inputTypeMessages = defineMessages({
boolean: {
defaultMessage: "Boolean",
description: "boolean attribute type"
},
date: {
defaultMessage: "Date",
description: "date attribute type"
},
dateTime: {
defaultMessage: "Date Time",
description: "date time attribute type"
}
});

Expand Down
Loading

0 comments on commit 98fbf51

Please sign in to comment.