Month: March 2025

V-Dialog Delete Confirmation

User add v-dialog when delete item Assistant To add a `v-dialog` confirmation when deleting an item (using Vuetify's `v-dialog`), here's a simple implementation pattern: — ### ✅ Example (Vue 3 + Vuetify 3) #### 1. **Template:** <template> <div> <v-btn color="error" @click="openDialog(item)">Delete</v-btn> <v-dialog v-model="dialog" max-width="400"> <v-card> <v-card-title class="text-h6">Confirm Deletion</v-card-title> <v-card-text>Are you sure you want to delete […]

v-select Object Issue Fix

User onMounted(async()=>{ categories.value = await fetchPortfolioCategories() as any; console.log(categories.value) }) showing object object Assistant You're seeing `[object Object]` in your “ because by default, Vuetify tries to render the item as a string, and it doesn't know how to display an object. To fix this, you need to tell Vuetify which **property** of the object […]

Sass @import to @use Migration

User Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0. More info and automated migrator: https://sass-lang.com/d/import ╷ 2 │ @import 'vuetify/styles/main.sass'; │ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ╵ ../../../../src/scss/style.scss 2:9 root stylesheet Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0. More info and automated […]

Vue TS validate fix

User Vue errors src/views/dashboards/usersection/AddPortfolio.vue:47:13 – error TS2339: Property 'valid' does not exist on type '{ valid: boolean; errors: { id: string | number; errorMessages: string[]; }[]; } | undefined'. 47 const { valid } = await form.value?.validate(); Assistant The error you're seeing: error TS2339: Property 'valid' does not exist on type '{ valid: boolean; errors: […]

Image Not Returning Debug

User import { db, storage } from '@/firebase' import { collection, addDoc, getDocs, doc, deleteDoc, updateDoc, } from 'firebase/firestore' import { ref as storageRef, uploadBytes, getDownloadURL, deleteObject, } from 'firebase/storage' const portfolioCollection = collection(db, 'portfolio'); export const addPortfolioItem = async ({ title, description, url, imageFile}: { title:string, description:string, url:string, imageFile:File}) => { try { const […]

Portfolio page logout issue

User import { createRouter, createWebHistory } from 'vue-router' import NProgress from 'nprogress'; import 'nprogress/nprogress.css'; NProgress.configure({ showSpinner: false, speed: 500, minimum: 0.2 }); import DefaultVuetify from '@/layouts/DefaultVuetify.vue'; import HomeView from '../views/HomeView.vue' import Youtubeiew from '@/views/Youtubeiew.vue' import NewsView from '@/views/NewsView.vue' import LoginView from '@/views/LoginView.vue' import RegisterView from '@/views/RegisterView.vue' import DashboardView from '@/views/User/DashboardView.vue' import ProfileView from '@/views/User/ProfileView.vue' import […]

ID based list conversion

User videosCategories.value = response.data.items.map(cat => ({ label: cat.snippet.title, value: cat.id })); How to add id based list Assistant If you want to **create an object with `id` as the key** (instead of an array of objects), you can use `.reduce()` instead of `.map()`. ### Original Code (List format) videosCategories.value = response.data.items.map(cat => ({ label: cat.snippet.title, […]

Consent Mode Error Fix

User I have checked the issue there are 3 method of integration 1- Google Tag Manager 2- WordPress plugin 3- Manually – (This is the method I've applied at Astrowow website) Actually the "Consent mode v2 is not correctly setup" error is actually related to (Google Tag Manager). We can ignore it because we have […]

Consent Mode v2 Setup

User Consent mode v2 is not correctly setup cookie hub manuall installtion Assistant Got it — sounds like you're implementing **Google Consent Mode v2** manually using **CookieHub**, and something’s not set up correctly. Let's walk through how to fix it. — ### ✅ Prerequisites: Make sure you have: – CookieHub installed via their manual install […]

Admin Order Fields Display

User add_action('woocommerce_after_order_notes', 'custom_flower_delivery_fields'); function custom_flower_delivery_fields($checkout) { echo '' . __('Gift Delivery Details') . ''; woocommerce_form_field('gift_eircode', array( 'type' => 'text', 'class' => array('form-row-wide'), 'label' => __('Eircode'), 'required' => true, ), $checkout->get_value('gift_eircode')); woocommerce_form_field('gift_phone', array( 'type' => 'tel', 'class' => array('form-row-wide'), 'label' => __('Phone Number'), 'required' => true, ), $checkout->get_value('gift_phone')); } add_action('woocommerce_checkout_process', 'custom_flower_delivery_field_validation'); function custom_flower_delivery_field_validation() { if (empty($_POST['gift_eircode'])) […]