From d8fc77789c9f57f7d3e09ad2ad67dc4762277d25 Mon Sep 17 00:00:00 2001
From: hyoseung930 <35983843+hyoseung930@users.noreply.github.com>
Date: Thu, 16 Apr 2026 18:23:53 +0900
Subject: [PATCH] =?UTF-8?q?=EC=BF=A0=ED=8F=B0=20=EC=9E=90=EB=8F=99=20?=
=?UTF-8?q?=EC=9E=85=EB=A0=A5=20=EC=82=AC=EC=9D=B4=ED=8A=B8=20=EC=9E=91?=
=?UTF-8?q?=EC=84=B1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
배포 완료. 이제 쿠폰 코드만 입력하면 되고, 목록에도 코드만 표시됩니다.
---
front/src/components/CouponManager.vue | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/front/src/components/CouponManager.vue b/front/src/components/CouponManager.vue
index 27f235e..fe6cf69 100644
--- a/front/src/components/CouponManager.vue
+++ b/front/src/components/CouponManager.vue
@@ -6,9 +6,8 @@
-
-
+
@@ -19,7 +18,6 @@
:class="{ inactive: !c.is_active, expired: c.is_expired }"
>
- {{ c.name }}
{{ c.code }}
@@ -44,15 +42,14 @@ import { ref, computed } from 'vue';
import { useWosStore } from '../stores/wos.store';
const store = useWosStore();
-const newName = ref('');
const newCode = ref('');
const activeCoupons = computed(() => store.coupons.filter((c) => c.is_active && !c.is_expired).length);
async function add() {
- if (!newName.value.trim() || !newCode.value.trim()) return;
- await store.addCoupon(newName.value.trim(), newCode.value.trim().toUpperCase());
- newName.value = '';
+ if (!newCode.value.trim()) return;
+ const code = newCode.value.trim().toUpperCase();
+ await store.addCoupon(code, code);
newCode.value = '';
}
@@ -102,8 +99,7 @@ async function add() {
.coupon-item.inactive { border-left-color: #334155; opacity: 0.6; }
.coupon-item.expired { border-left-color: #7c3aed; opacity: 0.5; }
.coupon-info { display: flex; flex-direction: column; gap: 2px; flex: 1; }
-.coupon-name { color: #f1f5f9; font-size: 0.9rem; font-weight: 500; }
-.coupon-code { color: #60a5fa; font-family: monospace; font-size: 0.82rem; }
+.coupon-code { color: #60a5fa; font-family: monospace; font-size: 0.9rem; }
.coupon-actions { display: flex; gap: 6px; align-items: center; }
.btn-toggle {
padding: 3px 10px;