Skip to content

Commit

Permalink
Merge pull request #13 from heseya/feature/SK-816
Browse files Browse the repository at this point in the history
feat: handle match_any switch in the attributes form
  • Loading branch information
demtario authored Apr 22, 2024
2 parents 79feb08 + ed1a15a commit 6d193eb
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"postinstall": "patch-package"
},
"dependencies": {
"@heseya/store-core": "6.0.0",
"@heseya/store-core": "6.0.3",
"@sentry/tracing": "^7.6.0",
"@sentry/vue": "^7.6.0",
"ant-design-vue": "^1.7.8",
Expand Down
1 change: 1 addition & 0 deletions src/components/form/SwitchInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export default defineComponent({
margin-bottom: 3px;
display: flex;
align-items: center;
text-align: right;
& > i {
margin-left: 4px;
Expand Down
17 changes: 17 additions & 0 deletions src/components/modules/attributes/Form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@
</template>
</switch-input>

<switch-input
v-if="form.include_in_text_search"
v-model="form.match_any"
:disabled="disabled"
horizontal
>
<template #title>
{{ $t('form.matchAny') }}
<info-tooltip> {{ $t('form.matchAnyTooltip') }}</info-tooltip>
</template>
</switch-input>

<switch-input v-model="form.global" :disabled="disabled" horizontal>
<template #title>
{{ $t('form.global') }}
Expand Down Expand Up @@ -108,6 +120,8 @@
"slug": "Skrócona nazwa",
"includeInSearch": "Uwzględnij w wyszukiwarce",
"includeInSearchTooltip": "Uwzględnij atrybut w wyszukiwarce produktów. Dzięki temu łatwo znajdziej produkty dla których atrybut ma daną wartość.",
"matchAny": "Dopasuj dowolne",
"matchAnyTooltip": "Dopasuj dowolne oznacza, że jeśli w polu wyszukiwania zostanie podana wiele wartości atrybutów, to znalezione zostaną produkty które posiadają przynajmniej atrybut o przynajmniej jednej z podanych wartości.",
"global": "Globalna atrybut",
"globalTooltip": "Globalna atrybut oznacza, że po danej cesze można filtrować produkty niezależnie od kolekcji w której się one znajdują.",
"sortable": "Sortowalny atrybut",
Expand All @@ -123,6 +137,8 @@
"slug": "Short name",
"includeInSearch": "Include in search",
"includeInSearchTooltip": "Include attribute in product search. This allows you to easily find products for which the attribute has a given value.",
"matchAny": "Match any",
"matchAnyTooltip": "Match any means that if multiple attribute values are entered in the search field, products that have at least one attribute with at least one of the entered values will be found.",
"global": "Global attribute",
"globalTooltip": "Global attribute means that you can filter products independently from the collection in which they are located.",
"sortable": "Sortable attribute",
Expand Down Expand Up @@ -163,6 +179,7 @@ const CLEAR_FORM: AttributeCreateDto = {
sortable: false,
global: false,
include_in_text_search: false,
match_any: false,
translations: {},
published: [],
metadata: {},
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1224,10 +1224,10 @@
dependencies:
"@hapi/hoek" "^9.0.0"

"@heseya/[email protected].0":
version "6.0.0"
resolved "https://registry.yarnpkg.com/@heseya/store-core/-/store-core-6.0.0.tgz#6845c7cba623f829eef091af28586a87c3739761"
integrity sha512-FmXuWoZpHsowV82NFYVTXcsJv9Z25SWdBZSWyTadn15fIzVsx8vAblTGdX6XuDaImdqtu8mvEAvVM+i5VLlnQw==
"@heseya/[email protected].3":
version "6.0.3"
resolved "https://registry.yarnpkg.com/@heseya/store-core/-/store-core-6.0.3.tgz#4904888e4ec174a5b385c66ca7ae39a11d48ed83"
integrity sha512-NYg6eRVFxoNlm0GkRY1TLBwDyqVuKA4Mh1V6BeAeXWZicF3JBDp0bYhVmXjYaZXsH3xbFVIGbgRlFBucb+iGNA==
dependencies:
flat "^5.0.2"
form-data "^4.0.0"
Expand Down

0 comments on commit 6d193eb

Please sign in to comment.