| @@ -1,4 +1,4 @@ | |||
| <!doctype html><html lang=""><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width,initial-scale=1"/><link rel="icon" id="favicon" href="/favicon.svg"/><link rel="stylesheet" href="/fonts/vazir.css"/><script defer="defer" src="https://bazarce.liara.run/script.js" data-website-id="7baabdd5-3224-41c1-9267-d2a1abd29d01"></script><title>NovinPlast</title><script defer="defer" src="/js/chunk-vendors.0a758772.js"></script><script defer="defer" src="/js/app.7f7271d2.js"></script><link href="/css/chunk-vendors.8ada15f4.css" rel="stylesheet"><link href="/css/app.fed18238.css" rel="stylesheet"></head><body lang><noscript><strong>We're sorry but NovinPlast doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script>document.addEventListener("DOMContentLoaded", function () { | |||
| <!doctype html><html lang=""><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width,initial-scale=1"/><link rel="icon" id="favicon" href="/favicon.svg"/><link rel="stylesheet" href="/fonts/vazir.css"/><script defer="defer" src="https://bazarce.liara.run/script.js" data-website-id="7baabdd5-3224-41c1-9267-d2a1abd29d01"></script><title>NovinPlast</title><script defer="defer" src="/js/chunk-vendors.e75a4c30.js"></script><script defer="defer" src="/js/app.deaabe6f.js"></script><link href="/css/chunk-vendors.8ada15f4.css" rel="stylesheet"><link href="/css/app.fed18238.css" rel="stylesheet"></head><body lang><noscript><strong>We're sorry but NovinPlast doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script>document.addEventListener("DOMContentLoaded", function () { | |||
| const faviconUrl = localStorage.getItem("logo"); | |||
| if (faviconUrl) { | |||
| const faviconLink = document.getElementById("favicon"); | |||
| @@ -211,7 +211,6 @@ export default { | |||
| }, 500); | |||
| }) | |||
| .catch((error) => { | |||
| console.error(error.response.data.message); | |||
| toast.error(`${error.response.data.message}`, { | |||
| position: "top-right", | |||
| autoClose: 1000, | |||
| @@ -218,8 +218,7 @@ export default { | |||
| }, 500); | |||
| }) | |||
| .catch((error) => { | |||
| console.error(error); | |||
| toast.error("!ویرایش کاربر با مشکل مواحه شد", { | |||
| toast.error(error?.response?.data?.message , { | |||
| position: "top-right", | |||
| autoClose: 1000, | |||
| onClose: () => emit("user-updated"), | |||
| @@ -42,25 +42,25 @@ | |||
| </div> | |||
| </BCol> | |||
| <!-- <BCol lg="6">--> | |||
| <!-- <div class="form-group">--> | |||
| <!-- <label class="form-label">انتخاب دسته</label>--> | |||
| <!-- <div class="color-picker-wrapper">--> | |||
| <!-- <VueSelect--> | |||
| <!-- style="--vs-min-height: 48px; --vs-border-radius: 8px"--> | |||
| <!-- :isLoading="categorySelectorLoader"--> | |||
| <!-- v-model="selectedCat"--> | |||
| <!-- :options="formattedCategories"--> | |||
| <!-- placeholder="دسته ای را انتخاب کنید"--> | |||
| <!-- @search="handleSearch"--> | |||
| <!-- />--> | |||
| <!-- </div>--> | |||
| <!-- <small v-if="errors.selectedCat" class="text-danger">--> | |||
| <!-- {{ errors.selectedCat }}--> | |||
| <!-- </small>--> | |||
| <!-- </div>--> | |||
| <!-- </BCol>--> | |||
| <BCol v-if="!categoryId" lg="12"> | |||
| <div class="form-group"> | |||
| <label class="form-label">انتخاب دسته</label> | |||
| <div class="color-picker-wrapper"> | |||
| <VueSelect | |||
| style="--vs-min-height: 48px; --vs-border-radius: 8px" | |||
| :isLoading="categorySelectorLoader" | |||
| v-model="selectedCat" | |||
| :options="formattedCategories" | |||
| placeholder="دسته ای را انتخاب کنید" | |||
| @search="handleSearch" | |||
| /> | |||
| </div> | |||
| <small v-if="errors.selectedCat" class="text-danger"> | |||
| {{ errors.selectedCat }} | |||
| </small> | |||
| </div> | |||
| </BCol> | |||
| </BRow> | |||
| <!-- Submit Buttons --> | |||
| @@ -98,6 +98,7 @@ import { ref, computed } from "vue"; | |||
| import { toast } from "vue3-toastify"; | |||
| import "vue3-toastify/dist/index.css"; | |||
| import ApiServiece from "@/services/ApiService"; | |||
| import VueSelect from "vue3-select-component"; | |||
| export default { | |||
| @@ -108,8 +109,11 @@ export default { | |||
| } | |||
| }, | |||
| setup(props, { emit }) { | |||
| components: { | |||
| VueSelect | |||
| }, | |||
| setup(props, { emit }) { | |||
| const selectedCat = ref(); | |||
| const title = ref(); | |||
| const errors = ref({}); | |||
| @@ -164,8 +168,8 @@ export default { | |||
| loading.value = true; | |||
| const formData = new FormData(); | |||
| if (props.categoryId) { | |||
| formData.append("category_id", props.categoryId); | |||
| if (props.categoryId || selectedCat.value) { | |||
| formData.append("category_id", props.categoryId || selectedCat.value); | |||
| } | |||
| formData.append("title", title.value); | |||
| @@ -210,10 +210,15 @@ export default { | |||
| attributeTitle.value = title; | |||
| attrebuteCat.value = cat; | |||
| }) | |||
| showIdenities() | |||
| }; | |||
| const showIdenities = () => { | |||
| const modal = new Modal(document.getElementById('editIdentity')); | |||
| modal?.show(); | |||
| }; | |||
| } | |||
| onMounted(() => { | |||
| getAttributes(); | |||
| @@ -22,6 +22,7 @@ export default { | |||
| const filterLoading = ref(false); | |||
| const searchQuery = ref(""); | |||
| const orders = ref(); | |||
| const panel = ref(""); | |||
| const convertToJalali = (date) => { | |||
| if (!date) return | |||
| @@ -71,7 +72,7 @@ export default { | |||
| ApiServiece.get( | |||
| `admin/orders?title=${searchQuery.value || ""}&status=${ | |||
| selectedStatus.value || "" | |||
| }&paginate=${paginate.value || 10}&page=${page.value || 1}` | |||
| }&paginate=${paginate.value || 10}&page=${page.value || 1}&panel=${panel.value}` | |||
| ) | |||
| .then((resp) => { | |||
| filterLoading.value = false; | |||
| @@ -230,6 +231,9 @@ export default { | |||
| watch(selectedStatus, () => { | |||
| getOrders(); | |||
| }); | |||
| watch(panel, () => { | |||
| getOrders(); | |||
| }); | |||
| const nextPage = () => { | |||
| if (currentPage.value < totalPages.value) { | |||
| @@ -268,6 +272,7 @@ export default { | |||
| selectedStatus, | |||
| getExport, | |||
| loadingId, | |||
| panel, | |||
| }; | |||
| }, | |||
| }; | |||
| @@ -281,7 +286,7 @@ export default { | |||
| class="card-header d-flex justify-content-between align-items-center p-3" | |||
| dir="rtl" | |||
| > | |||
| <div class="d-flex align-items-center"> | |||
| <div class="d-flex align-items-center gap-2"> | |||
| <input | |||
| v-model="searchQuery" | |||
| type="text" | |||
| @@ -306,6 +311,17 @@ export default { | |||
| <option value="delivered">تحویل شده</option> | |||
| <option value="canceled">لغو شده</option> | |||
| </select> | |||
| <select | |||
| class="form-select form-select-sm" | |||
| v-model="panel" | |||
| style="width: 120px; border-radius: 15px" | |||
| > | |||
| <option value="" disabled selected>نوع پنل</option> | |||
| <option value="">همه</option> | |||
| <option value="wholesale">عمده</option> | |||
| <option value="web">تک</option> | |||
| </select> | |||
| </div> | |||
| </div> | |||
| <div v-if="!filterLoading" class="card-body table-border-style p-0"> | |||
| @@ -207,7 +207,7 @@ export default { | |||
| <!-- Order Details and Items Here --> | |||
| <h6 class="mt-4 mb-3">آیتم های سفارش</h6> | |||
| <div v-if="order.order_items.length > 0"> | |||
| <div v-if="order.order_items.length > 0" class="overflow-x-auto"> | |||
| <BTable | |||
| hover | |||
| class="table-header" | |||
| @@ -248,7 +248,12 @@ export default { | |||
| </template> | |||
| <template #cell(color)="data"> | |||
| {{ data?.item?.attribute_value_product?.attribute_value?.title }} | |||
| <div | |||
| class="rounded p-1 text-black" | |||
| :style="{ background: data?.item?.attribute_value_product?.attribute_value?.code }" | |||
| > | |||
| {{ data?.item?.attribute_value_product?.attribute_value?.title }} | |||
| </div> | |||
| </template> | |||
| <!-- Editable shipped quantity with API call --> | |||
| @@ -665,7 +665,7 @@ export default { | |||
| }); | |||
| const handleIdentityUpdate = () => { | |||
| ApiServiece.get(`admin/attributes?category_id=${selectedCat.value}`) | |||
| ApiServiece.get(`admin/attributes?category_id=${selectedCat.value}&v_global=1`) | |||
| .then((resp) => { | |||
| relatedAttrebutes.value = resp.data.data; | |||
| }) | |||