Skip to content

Commit 4056e09

Browse files
committed
style: prettier reformat after options Vue refactor merge
Run `npm run format` across components touched by the merge of #205/#206 — primarily bringing the new Vue-options files in line with repo-wide Prettier config (line wrapping, arrow-function parens, trailing commas). Also cleans up the unused `InputNumber` import from CategoryOptionsTab flagged by ESLint.
1 parent 845ea9d commit 4056e09

3 files changed

Lines changed: 18 additions & 9 deletions

File tree

vueManager/src/components/CategoryOptionsTab.vue

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import DataTable from 'primevue/datatable'
88
import Dialog from 'primevue/dialog'
99
import IconField from 'primevue/iconfield'
1010
import InputIcon from 'primevue/inputicon'
11-
import InputNumber from 'primevue/inputnumber'
1211
import InputText from 'primevue/inputtext'
1312
import Select from 'primevue/select'
1413
import Toast from 'primevue/toast'
@@ -108,11 +107,12 @@ async function saveCellEdit(event) {
108107
if (!editable.includes(field)) return
109108
110109
// Backend expects 'caption'/'description' for the per-link override (schema columns).
111-
const serverField = field === 'category_caption'
112-
? 'caption'
113-
: field === 'category_description'
114-
? 'description'
115-
: field
110+
const serverField =
111+
field === 'category_caption'
112+
? 'caption'
113+
: field === 'category_description'
114+
? 'description'
115+
: field
116116
117117
try {
118118
await request.put(`/api/mgr/categories/${props.categoryId}/options/${newData.option_id}`, {
@@ -378,7 +378,9 @@ onMounted(() => {
378378
<InputText
379379
v-model="data[field]"
380380
class="w-full"
381-
:placeholder="_('ms3_category_option_caption_override_desc') || 'Пусто: берётся глобальное'"
381+
:placeholder="
382+
_('ms3_category_option_caption_override_desc') || 'Пусто: берётся глобальное'
383+
"
382384
autofocus
383385
@keyup.enter.stop
384386
/>

vueManager/src/components/OptionValuesEditor.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,11 @@ function hexWithHash(v) {
117117
:model-value="hexWithoutHash(items[index]?.name)"
118118
format="hex"
119119
class="value-picker"
120-
:pt="{ input: { class: !isValidHex(items[index]?.name) && items[index]?.name ? 'invalid' : '' } }"
120+
:pt="{
121+
input: {
122+
class: !isValidHex(items[index]?.name) && items[index]?.name ? 'invalid' : '',
123+
},
124+
}"
121125
@update:model-value="updateColor(index, 'name', hexWithHash($event))"
122126
/>
123127
<InputText

vueManager/src/components/product/ProductOptionField.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,10 @@ function addSuggestion(s) {
316316
class="w-full"
317317
separator=","
318318
:add-on-blur="true"
319-
:placeholder="_('ms3_combo_options_chips_placeholder') || 'Введите значение — Enter, запятая или клик вне поля добавят его'"
319+
:placeholder="
320+
_('ms3_combo_options_chips_placeholder') ||
321+
'Введите значение — Enter, запятая или клик вне поля добавят его'
322+
"
320323
@add="onChange"
321324
@remove="onChange"
322325
@keyup="onComboOptionsKeyup"

0 commit comments

Comments
 (0)