| @@ -110,7 +110,6 @@ export const actions = { | |||||
| // ); | // ); | ||||
| Swal.fire({ | Swal.fire({ | ||||
| icon: "error", | icon: "error", | ||||
| title: "انگار چیزی اشتباه شد", | |||||
| text: `${error?.response?.data?.message}`, | text: `${error?.response?.data?.message}`, | ||||
| confirmButtonText: "باشه", | confirmButtonText: "باشه", | ||||
| }); | }); | ||||
| @@ -32,7 +32,6 @@ export default { | |||||
| loading.value = false; | loading.value = false; | ||||
| Swal.fire({ | Swal.fire({ | ||||
| icon: "error", | icon: "error", | ||||
| title: "اوه! انگار چیزی اشتباه شد", | |||||
| text: `${error.message}`, | text: `${error.message}`, | ||||
| confirmButtonText: "باشه", | confirmButtonText: "باشه", | ||||
| }); | }); | ||||
| @@ -45,6 +45,15 @@ | |||||
| > | > | ||||
| <i class="fa fa-info-circle"></i> راهنمایی بنر برند | <i class="fa fa-info-circle"></i> راهنمایی بنر برند | ||||
| </button> | </button> | ||||
| <button | |||||
| data-bs-toggle="modal" | |||||
| data-bs-target="#specialPageBanner" | |||||
| class="btn btn-info btn-sm mx-2" | |||||
| @click="showModal" | |||||
| v-if="pageType === 'blog_page'" | |||||
| > | |||||
| <i class="fa fa-info-circle"></i> راهنمایی بنر بلاگ | |||||
| </button> | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| </BCardHeader> | </BCardHeader> | ||||
| @@ -102,6 +111,7 @@ | |||||
| <option value="category">صفحه دسته</option> | <option value="category">صفحه دسته</option> | ||||
| <option value="special_page">صفحه فروش ویژه</option> | <option value="special_page">صفحه فروش ویژه</option> | ||||
| <option value="brand">صفحه برند</option> | <option value="brand">صفحه برند</option> | ||||
| <option value="blog_page">صفحه بلاگ</option> | |||||
| </select> | </select> | ||||
| </div> | </div> | ||||
| <small v-if="errors.pageType" class="text-danger"> | <small v-if="errors.pageType" class="text-danger"> | ||||
| @@ -36,6 +36,15 @@ | |||||
| > | > | ||||
| <i class="fa fa-info-circle"></i> راهنمایی بنر فروش ویژه | <i class="fa fa-info-circle"></i> راهنمایی بنر فروش ویژه | ||||
| </button> | </button> | ||||
| <button | |||||
| data-bs-toggle="modal" | |||||
| data-bs-target="#specialPageBanner" | |||||
| class="btn btn-info btn-sm mx-2" | |||||
| @click="showModal" | |||||
| v-if="pageType === 'blog_page'" | |||||
| > | |||||
| <i class="fa fa-info-circle"></i>ر راهنمایی بنر بلاگ | |||||
| </button> | |||||
| <button | <button | ||||
| v-if="pageType === 'brand'" | v-if="pageType === 'brand'" | ||||
| data-bs-toggle="modal" | data-bs-toggle="modal" | ||||
| @@ -102,6 +111,7 @@ | |||||
| <option value="category">صفحه دسته</option> | <option value="category">صفحه دسته</option> | ||||
| <option value="special_page">صفحه فروش ویژه</option> | <option value="special_page">صفحه فروش ویژه</option> | ||||
| <option value="brand">صفحه برند</option> | <option value="brand">صفحه برند</option> | ||||
| <option value="blog_page">صفحه بلاگ</option> | |||||
| </select> | </select> | ||||
| </div> | </div> | ||||
| <small v-if="errors.pageType" class="text-danger"> | <small v-if="errors.pageType" class="text-danger"> | ||||
| @@ -654,7 +654,7 @@ export default { | |||||
| watch(selectedCat, (value) => { | watch(selectedCat, (value) => { | ||||
| if (value){ | if (value){ | ||||
| ApiServiece.get(`admin/attributes?category_id=${selectedCat.value}`) | |||||
| ApiServiece.get(`admin/attributes?category_id=${selectedCat.value}&with_global=1`) | |||||
| .then((resp) => { | .then((resp) => { | ||||
| relatedAttrebutes.value = resp?.data?.data | relatedAttrebutes.value = resp?.data?.data | ||||
| }) | }) | ||||
| @@ -665,7 +665,7 @@ export default { | |||||
| }); | }); | ||||
| const handleIdentityUpdate = () => { | const handleIdentityUpdate = () => { | ||||
| ApiServiece.get(`admin/attributes?category_id=${selectedCat.value}&v_global=1`) | |||||
| ApiServiece.get(`admin/attributes?category_id=${selectedCat.value}&with_global=1`) | |||||
| .then((resp) => { | .then((resp) => { | ||||
| relatedAttrebutes.value = resp.data.data; | relatedAttrebutes.value = resp.data.data; | ||||
| }) | }) | ||||
| @@ -946,10 +946,9 @@ export default { | |||||
| }; | }; | ||||
| watch(selectedCat, () => { | watch(selectedCat, () => { | ||||
| ApiServiece.get(`admin/attributes?category_id=${selectedCat.value}`) | |||||
| ApiServiece.get(`admin/attributes?category_id=${selectedCat.value}&with_global=1`) | |||||
| .then((resp) => { | .then((resp) => { | ||||
| identities.value = resp.data.data; | identities.value = resp.data.data; | ||||
| console.log(identities.value); | |||||
| }) | }) | ||||
| .catch((err) => { | .catch((err) => { | ||||
| console.log(err); | console.log(err); | ||||
| @@ -957,10 +956,9 @@ export default { | |||||
| }); | }); | ||||
| const getIdentities = () => { | const getIdentities = () => { | ||||
| ApiServiece.get(`admin/attributes?category_id=${selectedCat.value}`) | |||||
| ApiServiece.get(`admin/attributes?category_id=${selectedCat.value}&with_global=1`) | |||||
| .then((resp) => { | .then((resp) => { | ||||
| identities.value = resp.data.data; | identities.value = resp.data.data; | ||||
| console.log(identities.value, "identities"); | |||||
| }) | }) | ||||
| .then(() => { | .then(() => { | ||||
| localIdentitiesIds.value = localIdentities.value.map( | localIdentitiesIds.value = localIdentities.value.map( | ||||