Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "store-admin",
"version": "7.0.3",
"version": "7.0.4",
"private": true,
"description": "Admin panel for Heseya Store API",
"author": "Heseya",
Expand All @@ -19,7 +19,7 @@
"postinstall": "patch-package"
},
"dependencies": {
"@heseya/store-core": "7.1.0-beta.3",
"@heseya/store-core": "7.1.0-beta.5",
"@sentry/tracing": "^7.6.0",
"@sentry/vue": "^7.6.0",
"ant-design-vue": "^1.7.8",
Expand Down
2 changes: 1 addition & 1 deletion src/components/AutocompleteInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default defineComponent({
props: {
value: {
type: [String, Object, Array] as PropType<
UUID | AutocompleteBaseItem | UUID[] | AutocompleteBaseItem[]
UUID | AutocompleteBaseItem | UUID[] | AutocompleteBaseItem[] | null
>,
default: () => [],
},
Expand Down
11 changes: 9 additions & 2 deletions src/components/modules/products/view/ProductBasicDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
/>
<AppTextarea
v-if="!loading"
v-model="form.safety_information"
v-model="formSafetyInformation"
:label="$t('form.safetyInformation').toString()"
:disabled="disabled"
/>
Expand All @@ -45,7 +45,6 @@
prop-mode="id"
mode="single"
:disabled="disabled"
:rules="{ required: form.manufacturer_id }"
class="sale-configurator__autocomplete"
>
<template #option="manufacturer">
Expand Down Expand Up @@ -137,6 +136,14 @@ export default defineComponent({
this.form.translations[this.editedLang].description_short = value
},
},
formSafetyInformation: {
get() {
return this.form.safety_information || undefined
},
set(value: string) {
this.form.safety_information = value
},
},
},

methods: {
Expand Down
18 changes: 15 additions & 3 deletions src/views/products/View.vue
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@
<h2 class="product-page__subtitle">{{ $t('galleryTitle') }}</h2>
<Gallery ref="gallery" v-model="form.gallery" :disabled="!canModify" />
</Card>
<Card class="product-page__rewards">
<h2 class="product-page__subtitle">{{ $t('rewardImagesTitle') }}</h2>
<Gallery ref="gallery" v-model="form.reward_images" :disabled="!canModify" />
</Card>
</form>
</ValidationObserver>
</div>
Expand All @@ -170,6 +174,7 @@
"titleNew": "Nowy produkt",
"baseFormTitle": "Informacje podstawowe",
"galleryTitle": "Zdjęcia i wideo produktu",
"rewardImagesTitle": "Wyróżnienia produktu",
"deleteConfirm": "Czy na pewno chcesz usunąć ten produkt?",
"nav": {
"goTo": "Przejdź do produktu"
Expand Down Expand Up @@ -266,6 +271,7 @@ const EMPTY_FORM: ProductComponentForm = {
order: null,
schemas: [],
gallery: [],
reward_images: [],
tags: [],
seo: undefined,
attributes: [],
Expand All @@ -276,6 +282,8 @@ const EMPTY_FORM: ProductComponentForm = {
published: [],
translations: {},
banner: null,
safety_information: undefined,
manufacturer_id: undefined,
}

export default defineComponent({
Expand Down Expand Up @@ -439,6 +447,7 @@ export default defineComponent({
...this.form,
order: this.form.order || 0,
media: this.form.gallery.map(({ id }) => id),
reward_images: this.form.reward_images.map(({ id }) => id),
tags: this.form.tags.map(({ id }) => id),
schemas: this.form.schemas.map(({ id }) => id),
related_sets: this.form.related_sets.map(({ id }) => id),
Expand Down Expand Up @@ -525,15 +534,15 @@ export default defineComponent({

.product-page {
display: grid;
grid-template-rows: auto;
grid-template-rows: auto max-content;
grid-gap: 14px;
align-items: start;
grid-template-columns: 1fr;
grid-template-areas: 'visibility' 'gallery' 'main';
grid-template-areas: 'visibility' 'gallery' 'rewards' 'main';

@media ($viewport-7) {
grid-template-columns: 2.6fr 1fr;
grid-template-areas: 'main visibility' 'main gallery' 'main .';
grid-template-areas: 'main visibility' 'main gallery' 'main rewards' 'main .';
}

&__main {
Expand All @@ -545,6 +554,9 @@ export default defineComponent({
&__gallery {
grid-area: gallery;
}
&__rewards {
grid-area: rewards;
}

&__subtitle {
font-size: 1em;
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/store-core@7.1.0-beta.3":
version "7.1.0-beta.3"
resolved "https://registry.yarnpkg.com/@heseya/store-core/-/store-core-7.1.0-beta.3.tgz#25aa447242ee5b8cc91cbe97a80ac09f130671e3"
integrity sha512-J7loGuyVig0aFmFy2M6s65pwmsHAJUVdPThRxNS31izFHBcZySkWFROeWTUzr7qn2bTFMAK4GdRrd7WJEyEzUg==
"@heseya/store-core@7.1.0-beta.5":
version "7.1.0-beta.5"
resolved "https://registry.yarnpkg.com/@heseya/store-core/-/store-core-7.1.0-beta.5.tgz#26059425d252a8e5816a3c87a0fcf8ccc7c3412f"
integrity sha512-2oqNwj4yWED9vbtgIXzroOwz5n6hYhZqNSiCPm+4MZj1BiryDK0zxCaAMv8z1upZxmosYf7IQ7Apf0NRgFehcQ==
dependencies:
flat "^5.0.2"
form-data "^4.0.0"
Expand Down
Loading