|
|
@@ -288,10 +288,20 @@
|
|
|
|
|
|
<!-- Material Modal Form -->
|
|
|
<form v-if="activeTab === 'materials'" @submit.prevent="handleSaveMaterial" class="space-y-4">
|
|
|
- <div class="space-y-1"><label class="text-[10px] font-bold uppercase ml-1">{{ t("admin.fields.nameEn") }}</label><input v-model="matForm.name_en" required class="w-full bg-background border border-border/50 rounded-xl px-4 py-3 text-sm" /></div>
|
|
|
- <div class="space-y-1"><label class="text-[10px] font-bold uppercase ml-1">{{ t("admin.fields.nameRu") }}</label><input v-model="matForm.name_ru" required class="w-full bg-background border border-border/50 rounded-xl px-4 py-3 text-sm" /></div>
|
|
|
- <div class="space-y-1"><label class="text-[10px] font-bold uppercase ml-1">{{ t("admin.fields.nameMe") }}</label><input v-model="matForm.name_me" required class="w-full bg-background border border-border/50 rounded-xl px-4 py-3 text-sm" /></div>
|
|
|
- <div class="space-y-1"><label class="text-[10px] font-bold uppercase ml-1">{{ t("admin.fields.nameUa") }}</label><input v-model="matForm.name_ua" required class="w-full bg-background border border-border/50 rounded-xl px-4 py-3 text-sm" /></div>
|
|
|
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
|
+ <div class="space-y-1"><label class="text-[10px] font-bold uppercase ml-1">{{ t("admin.fields.nameEn") }}</label><input v-model="matForm.name_en" required class="w-full bg-background border border-border/50 rounded-xl px-4 py-3 text-sm" /></div>
|
|
|
+ <div class="space-y-1"><label class="text-[10px] font-bold uppercase ml-1">{{ t("admin.fields.nameRu") }}</label><input v-model="matForm.name_ru" required class="w-full bg-background border border-border/50 rounded-xl px-4 py-3 text-sm" /></div>
|
|
|
+ <div class="space-y-1"><label class="text-[10px] font-bold uppercase ml-1">{{ t("admin.fields.nameMe") }}</label><input v-model="matForm.name_me" required class="w-full bg-background border border-border/50 rounded-xl px-4 py-3 text-sm" /></div>
|
|
|
+ <div class="space-y-1"><label class="text-[10px] font-bold uppercase ml-1">{{ t("admin.fields.nameUa") }}</label><input v-model="matForm.name_ua" required class="w-full bg-background border border-border/50 rounded-xl px-4 py-3 text-sm" /></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
|
+ <div class="space-y-1"><label class="text-[10px] font-bold uppercase ml-1">{{ t("admin.fields.longDescEn") }}</label><textarea v-model="matForm.long_desc_en" class="w-full bg-background border border-border/50 rounded-xl px-4 py-2 text-xs h-20 resize-none" /></div>
|
|
|
+ <div class="space-y-1"><label class="text-[10px] font-bold uppercase ml-1">{{ t("admin.fields.longDescRu") }}</label><textarea v-model="matForm.long_desc_ru" class="w-full bg-background border border-border/50 rounded-xl px-4 py-2 text-xs h-20 resize-none" /></div>
|
|
|
+ <div class="space-y-1"><label class="text-[10px] font-bold uppercase ml-1">{{ t("admin.fields.longDescMe") }}</label><textarea v-model="matForm.long_desc_me" class="w-full bg-background border border-border/50 rounded-xl px-4 py-2 text-xs h-20 resize-none" /></div>
|
|
|
+ <div class="space-y-1"><label class="text-[10px] font-bold uppercase ml-1">{{ t("admin.fields.longDescUa") }}</label><textarea v-model="matForm.long_desc_ua" class="w-full bg-background border border-border/50 rounded-xl px-4 py-2 text-xs h-20 resize-none" /></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
<div class="space-y-1"><label class="text-[10px] font-bold uppercase ml-1">{{ t("admin.fields.pricePerCm3") }}</label><input v-model.number="matForm.price_per_cm3" type="number" step="any" required class="w-full bg-background border border-border/50 rounded-xl px-4 py-3 text-sm" /></div>
|
|
|
|
|
|
<div class="space-y-1">
|
|
|
@@ -473,7 +483,12 @@ const editingService = ref<any | null>(null);
|
|
|
const editingPost = ref<any | null>(null);
|
|
|
const editingOrder = ref<any | null>(null);
|
|
|
|
|
|
-const matForm = reactive({ name_en: "", name_ru: "", name_ua: "", name_me: "", desc_en: "", desc_ru: "", desc_ua: "", desc_me: "", price_per_cm3: 0, available_colors: [] as string[], is_active: true });
|
|
|
+const matForm = reactive({
|
|
|
+ name_en: "", name_ru: "", name_ua: "", name_me: "",
|
|
|
+ desc_en: "", desc_ru: "", desc_ua: "", desc_me: "",
|
|
|
+ long_desc_en: "", long_desc_ru: "", long_desc_ua: "", long_desc_me: "",
|
|
|
+ price_per_cm3: 0, available_colors: [] as string[], is_active: true
|
|
|
+});
|
|
|
const svcForm = reactive({ name_en: "", name_ru: "", name_ua: "", name_me: "", desc_en: "", desc_ru: "", desc_ua: "", desc_me: "", tech_type: "", is_active: true });
|
|
|
const postForm = reactive({ slug: "", title_en: "", title_me: "", title_ru: "", title_ua: "", category: "Technology", image_url: "", is_published: true });
|
|
|
const userForm = reactive({ email: "", password: "", first_name: "", last_name: "", phone: "" });
|
|
|
@@ -689,7 +704,12 @@ function closeModals() {
|
|
|
editingService.value = null;
|
|
|
editingPost.value = null;
|
|
|
editingOrder.value = null;
|
|
|
- Object.assign(matForm, { name_en: "", name_ru: "", name_me: "", name_ua: "", desc_en: "", desc_ru: "", desc_ua: "", desc_me: "", price_per_cm3: 0, available_colors: [], is_active: true });
|
|
|
+ Object.assign(matForm, {
|
|
|
+ name_en: "", name_ru: "", name_me: "", name_ua: "",
|
|
|
+ desc_en: "", desc_ru: "", desc_ua: "", desc_me: "",
|
|
|
+ long_desc_en: "", long_desc_ru: "", long_desc_ua: "", long_desc_me: "",
|
|
|
+ price_per_cm3: 0, available_colors: [], is_active: true
|
|
|
+ });
|
|
|
Object.assign(svcForm, { name_en: "", name_ru: "", name_me: "", name_ua: "", desc_en: "", desc_ru: "", desc_ua: "", desc_me: "", tech_type: "", is_active: true });
|
|
|
Object.assign(userForm, { email: "", password: "", first_name: "", last_name: "", phone: "" });
|
|
|
Object.assign(postForm, { slug: "", title_en: "", title_me: "", title_ru: "", title_ua: "", category: "Technology", image_url: "", is_published: true });
|