Browse Source

fix: remove debug alerts to fix TS build errors

unknown 1 ngày trước cách đây
mục cha
commit
1ac117b5b4
2 tập tin đã thay đổi với 2 bổ sung3 xóa
  1. 2 2
      src/components/admin/OrderCard.vue
  2. 0 1
      src/pages/Admin.vue

+ 2 - 2
src/components/admin/OrderCard.vue

@@ -32,7 +32,7 @@
           <div class="flex flex-col">
             <div class="flex items-center gap-2">
               <h3 class="font-bold leading-none">{{ order.first_name }} {{ order.last_name }}</h3>
-              <button @click.stop="() => { alert('EDIT: Name'); $emit('edit-order', order); }" class="p-1.5 bg-primary/5 hover:bg-primary/20 rounded-md text-primary transition-colors" style="position: relative; z-index: 100;">
+              <button @click.stop="$emit('edit-order', order)" class="p-1.5 bg-primary/5 hover:bg-primary/20 rounded-md text-primary transition-colors" style="position: relative; z-index: 100;">
                 <Edit2 class="w-3 h-3" />
               </button>
             </div>
@@ -84,7 +84,7 @@
               <span class="text-[9px] font-bold uppercase text-primary/60 tracking-widest">{{ t("admin.fields.material") }} & {{ t("admin.fields.colors") }}</span>
               <p class="text-sm font-bold">{{ order.material_name || '???' }} — {{ order.color_name || '???' }}</p>
             </div>
-            <button @click.stop="() => { alert('EDIT: Material/Qty'); $emit('edit-order', order); }" class="bg-primary text-primary-foreground p-3 rounded-xl shadow-lg hover:scale-105 transition-transform" style="position: relative; z-index: 100;">
+            <button @click.stop="$emit('edit-order', order)" class="bg-primary text-primary-foreground p-3 rounded-xl shadow-lg hover:scale-105 transition-transform" style="position: relative; z-index: 100;">
               <Edit2 class="w-5 h-5" />
             </button>
           </div>

+ 0 - 1
src/pages/Admin.vue

@@ -445,7 +445,6 @@ const handleUpdateFiscal = async (id: number, data: any) => {
 };
 
 const handleEditOrder = (order: any) => {
-  alert("ADMIN: Received edit-order for " + order.id);
   console.log("Editing order:", order.id);
   editingOrder.value = order;
   Object.assign(orderForm, {