|
|
@@ -186,7 +186,7 @@
|
|
|
<label class="text-[10px] font-bold uppercase text-primary/60 ml-1">{{ t("admin.fields.material") }}</label>
|
|
|
<select v-model="orderForm.material_name" class="w-full bg-background border border-border/50 rounded-xl px-3 py-2 text-sm">
|
|
|
<option value="">{{ t("admin.fields.material") }}...</option>
|
|
|
- <option v-for="m in activeMaterials" :key="m.id" :value="m.name">{{ m.name }}</option>
|
|
|
+ <option v-for="m in activeMaterials" :key="m.id" :value="m.name_en">{{ m.name_en }} ({{ m.name_ru }})</option>
|
|
|
</select>
|
|
|
</div>
|
|
|
<div class="space-y-1">
|
|
|
@@ -481,8 +481,8 @@ onUnmounted(() => {
|
|
|
|
|
|
const newColor = ref("");
|
|
|
|
|
|
-const activeMaterials = computed(() => materials.value.filter((m: any) => m.is_active));
|
|
|
-const selectedMaterialObj = computed(() => activeMaterials.value.find((m: any) => m.name === orderForm.material_name));
|
|
|
+const activeMaterials = computed(() => materials.value.filter((m: any) => m.is_active || m.is_active === 1));
|
|
|
+const selectedMaterialObj = computed(() => activeMaterials.value.find((m: any) => m.name_en === orderForm.material_name || m.name_ru === orderForm.material_name));
|
|
|
const materialColors = computed(() => {
|
|
|
if (!selectedMaterialObj.value) return [];
|
|
|
try {
|