wad-lab 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/index.js +23 -17
- package/package.json +1 -1
- package/templates/game-bingo/index.html +32 -0
- package/templates/game-bingo/script.js +118 -0
- package/templates/game-bingo/style.css +104 -0
- package/templates/springboot-course-registration/.mvn/wrapper/maven-wrapper.properties +3 -0
- package/templates/springboot-course-registration/mvnw +295 -0
- package/templates/springboot-course-registration/mvnw.cmd +189 -0
- package/templates/springboot-course-registration/pom.xml +41 -0
- package/templates/springboot-course-registration/src/main/java/com/example/coursereg/CourseRegApplication.java +12 -0
- package/templates/springboot-course-registration/src/main/java/com/example/coursereg/controller/CourseController.java +42 -0
- package/templates/springboot-course-registration/src/main/java/com/example/coursereg/model/Course.java +99 -0
- package/templates/springboot-course-registration/src/main/java/com/example/coursereg/repository/CourseRepository.java +16 -0
- package/templates/springboot-course-registration/src/main/java/com/example/coursereg/service/CourseService.java +60 -0
- package/templates/springboot-course-registration/src/main/resources/application.properties +3 -0
- package/templates/springboot-course-registration/src/test/java/com/example/coursereg/CourseRegApplicationTests.java +12 -0
- package/templates/vue-banking-app/index.html +12 -0
- package/templates/vue-banking-app/package.json +20 -0
- package/templates/vue-banking-app/src/App.vue +80 -0
- package/templates/vue-banking-app/src/main.js +9 -0
- package/templates/vue-banking-app/src/router/index.js +17 -0
- package/templates/vue-banking-app/src/stores/bankStore.js +48 -0
- package/templates/vue-banking-app/src/views/DashboardView.vue +88 -0
- package/templates/vue-banking-app/src/views/StatementView.vue +171 -0
- package/templates/vue-banking-app/src/views/TransactionFormView.vue +144 -0
- package/templates/vue-banking-app/vite.config.js +6 -0
- package/templates/vue-employee-system/index.html +12 -0
- package/templates/vue-employee-system/package.json +19 -0
- package/templates/vue-employee-system/src/App.vue +388 -0
- package/templates/vue-employee-system/src/main.js +5 -0
- package/templates/vue-employee-system/src/stores/employeeStore.js +54 -0
- package/templates/vue-employee-system/vite.config.js +6 -0
- package/templates/vue-food-ordering/index.html +12 -0
- package/templates/vue-food-ordering/package.json +20 -0
- package/templates/vue-food-ordering/src/App.vue +109 -0
- package/templates/vue-food-ordering/src/main.js +6 -0
- package/templates/vue-food-ordering/src/router/index.js +17 -0
- package/templates/vue-food-ordering/src/stores/foodStore.js +65 -0
- package/templates/vue-food-ordering/src/views/MenuView.vue +145 -0
- package/templates/vue-food-ordering/src/views/OrderCartView.vue +181 -0
- package/templates/vue-food-ordering/src/views/OrderSuccessView.vue +93 -0
- package/templates/vue-food-ordering/vite.config.js +6 -0
- package/templates/vue-symposium-system/index.html +12 -0
- package/templates/vue-symposium-system/package.json +19 -0
- package/templates/vue-symposium-system/src/App.vue +297 -0
- package/templates/vue-symposium-system/src/main.js +5 -0
- package/templates/vue-symposium-system/src/stores/symposiumStore.js +44 -0
- package/templates/vue-symposium-system/vite.config.js +6 -0
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref, computed } from 'vue'
|
|
3
|
+
import { useFoodStore } from '../stores/foodStore'
|
|
4
|
+
|
|
5
|
+
const store = useFoodStore()
|
|
6
|
+
const selectedCategory = ref('All')
|
|
7
|
+
|
|
8
|
+
const filteredItems = computed(() => {
|
|
9
|
+
if (selectedCategory.value === 'All') {
|
|
10
|
+
return store.menuItems
|
|
11
|
+
}
|
|
12
|
+
return store.menuItems.filter((item) => item.category === selectedCategory.value)
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
const selectCategory = (category) => {
|
|
16
|
+
selectedCategory.value = category
|
|
17
|
+
}
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<div class="menu-container">
|
|
22
|
+
<h2>Menu</h2>
|
|
23
|
+
|
|
24
|
+
<div class="category-tabs">
|
|
25
|
+
<button
|
|
26
|
+
v-for="cat in store.categories"
|
|
27
|
+
:key="cat"
|
|
28
|
+
:class="{ active: selectedCategory === cat }"
|
|
29
|
+
class="tab-btn"
|
|
30
|
+
@click="selectCategory(cat)"
|
|
31
|
+
>
|
|
32
|
+
{{ cat }}
|
|
33
|
+
</button>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<div class="menu-grid">
|
|
37
|
+
<div v-for="item in filteredItems" :key="item.id" class="menu-card">
|
|
38
|
+
<div class="card-header">
|
|
39
|
+
<h3>{{ item.name }}</h3>
|
|
40
|
+
<span class="category-tag">{{ item.category }}</span>
|
|
41
|
+
</div>
|
|
42
|
+
<p class="description">{{ item.description }}</p>
|
|
43
|
+
<div class="card-footer">
|
|
44
|
+
<span class="price">${{ item.price.toFixed(2) }}</span>
|
|
45
|
+
<button class="add-btn" @click="store.addToCart(item)">Add to Order</button>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
</template>
|
|
51
|
+
|
|
52
|
+
<style scoped>
|
|
53
|
+
.menu-container {
|
|
54
|
+
padding: 1rem 0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.category-tabs {
|
|
58
|
+
display: flex;
|
|
59
|
+
gap: 0.5rem;
|
|
60
|
+
margin-bottom: 1.5rem;
|
|
61
|
+
flex-wrap: wrap;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.tab-btn {
|
|
65
|
+
padding: 0.5rem 1rem;
|
|
66
|
+
border: 1px solid #ccc;
|
|
67
|
+
background-color: #f8f9fa;
|
|
68
|
+
cursor: pointer;
|
|
69
|
+
border-radius: 4px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.tab-btn.active {
|
|
73
|
+
background-color: #007bff;
|
|
74
|
+
color: #fff;
|
|
75
|
+
border-color: #007bff;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.menu-grid {
|
|
79
|
+
display: grid;
|
|
80
|
+
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
|
|
81
|
+
gap: 1rem;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.menu-card {
|
|
85
|
+
border: 1px solid #ddd;
|
|
86
|
+
border-radius: 6px;
|
|
87
|
+
padding: 1rem;
|
|
88
|
+
display: flex;
|
|
89
|
+
flex-direction: column;
|
|
90
|
+
justify-content: space-between;
|
|
91
|
+
background-color: #fff;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.card-header {
|
|
95
|
+
display: flex;
|
|
96
|
+
justify-content: space-between;
|
|
97
|
+
align-items: baseline;
|
|
98
|
+
margin-bottom: 0.5rem;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.card-header h3 {
|
|
102
|
+
margin: 0;
|
|
103
|
+
font-size: 1.1rem;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.category-tag {
|
|
107
|
+
font-size: 0.75rem;
|
|
108
|
+
background-color: #e9ecef;
|
|
109
|
+
padding: 0.2rem 0.5rem;
|
|
110
|
+
border-radius: 3px;
|
|
111
|
+
color: #495057;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.description {
|
|
115
|
+
color: #666;
|
|
116
|
+
font-size: 0.9rem;
|
|
117
|
+
margin: 0 0 1rem 0;
|
|
118
|
+
flex-grow: 1;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.card-footer {
|
|
122
|
+
display: flex;
|
|
123
|
+
justify-content: space-between;
|
|
124
|
+
align-items: center;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.price {
|
|
128
|
+
font-weight: bold;
|
|
129
|
+
font-size: 1.1rem;
|
|
130
|
+
color: #28a745;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.add-btn {
|
|
134
|
+
padding: 0.4rem 0.8rem;
|
|
135
|
+
background-color: #28a745;
|
|
136
|
+
color: white;
|
|
137
|
+
border: none;
|
|
138
|
+
border-radius: 4px;
|
|
139
|
+
cursor: pointer;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.add-btn:hover {
|
|
143
|
+
background-color: #218838;
|
|
144
|
+
}
|
|
145
|
+
</style>
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useRouter } from 'vue-router'
|
|
3
|
+
import { useFoodStore } from '../stores/foodStore'
|
|
4
|
+
|
|
5
|
+
const store = useFoodStore()
|
|
6
|
+
const router = useRouter()
|
|
7
|
+
|
|
8
|
+
const checkout = () => {
|
|
9
|
+
if (store.cart.length > 0) {
|
|
10
|
+
router.push('/order-success')
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<div class="cart-container">
|
|
17
|
+
<h2>Your Order Cart</h2>
|
|
18
|
+
|
|
19
|
+
<div v-if="store.cart.length === 0" class="empty-cart">
|
|
20
|
+
<p>Your cart is empty.</p>
|
|
21
|
+
<router-link to="/" class="menu-link">Browse Menu</router-link>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<div v-else>
|
|
25
|
+
<table class="cart-table">
|
|
26
|
+
<thead>
|
|
27
|
+
<tr>
|
|
28
|
+
<th>Item</th>
|
|
29
|
+
<th>Price</th>
|
|
30
|
+
<th>Quantity</th>
|
|
31
|
+
<th>Total</th>
|
|
32
|
+
<th>Action</th>
|
|
33
|
+
</tr>
|
|
34
|
+
</thead>
|
|
35
|
+
<tbody>
|
|
36
|
+
<tr v-for="item in store.cart" :key="item.id">
|
|
37
|
+
<td>{{ item.name }}</td>
|
|
38
|
+
<td>${{ item.price.toFixed(2) }}</td>
|
|
39
|
+
<td class="qty-cell">
|
|
40
|
+
<button class="qty-btn" @click="store.decrementQuantity(item.id)">-</button>
|
|
41
|
+
<span class="qty-val">{{ item.quantity }}</span>
|
|
42
|
+
<button class="qty-btn" @click="store.incrementQuantity(item.id)">+</button>
|
|
43
|
+
</td>
|
|
44
|
+
<td>${{ (item.price * item.quantity).toFixed(2) }}</td>
|
|
45
|
+
<td>
|
|
46
|
+
<button class="remove-btn" @click="store.removeFromCart(item.id)">Remove</button>
|
|
47
|
+
</td>
|
|
48
|
+
</tr>
|
|
49
|
+
</tbody>
|
|
50
|
+
</table>
|
|
51
|
+
|
|
52
|
+
<div class="cart-summary">
|
|
53
|
+
<div class="summary-row">
|
|
54
|
+
<span>Subtotal:</span>
|
|
55
|
+
<span>${{ store.cartSubtotal.toFixed(2) }}</span>
|
|
56
|
+
</div>
|
|
57
|
+
<div class="summary-row">
|
|
58
|
+
<span>Tax (5%):</span>
|
|
59
|
+
<span>${{ store.taxAmount.toFixed(2) }}</span>
|
|
60
|
+
</div>
|
|
61
|
+
<div class="summary-row total-row">
|
|
62
|
+
<span>Grand Total:</span>
|
|
63
|
+
<span>${{ store.totalBill.toFixed(2) }}</span>
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<div class="checkout-actions">
|
|
67
|
+
<button class="checkout-btn" @click="checkout">Proceed to Checkout</button>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</template>
|
|
73
|
+
|
|
74
|
+
<style scoped>
|
|
75
|
+
.cart-container {
|
|
76
|
+
padding: 1rem 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.empty-cart {
|
|
80
|
+
text-align: center;
|
|
81
|
+
padding: 2rem;
|
|
82
|
+
background-color: #f8f9fa;
|
|
83
|
+
border-radius: 6px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.menu-link {
|
|
87
|
+
display: inline-block;
|
|
88
|
+
margin-top: 0.5rem;
|
|
89
|
+
color: #007bff;
|
|
90
|
+
text-decoration: none;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.cart-table {
|
|
94
|
+
width: 100%;
|
|
95
|
+
border-collapse: collapse;
|
|
96
|
+
margin-bottom: 1.5rem;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.cart-table th,
|
|
100
|
+
.cart-table td {
|
|
101
|
+
border: 1px solid #ddd;
|
|
102
|
+
padding: 0.75rem;
|
|
103
|
+
text-align: left;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.cart-table th {
|
|
107
|
+
background-color: #f8f9fa;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.qty-cell {
|
|
111
|
+
display: flex;
|
|
112
|
+
align-items: center;
|
|
113
|
+
gap: 0.5rem;
|
|
114
|
+
border: none;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.qty-btn {
|
|
118
|
+
width: 28px;
|
|
119
|
+
height: 28px;
|
|
120
|
+
background-color: #e9ecef;
|
|
121
|
+
border: 1px solid #ced4da;
|
|
122
|
+
border-radius: 4px;
|
|
123
|
+
cursor: pointer;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.qty-val {
|
|
127
|
+
min-width: 20px;
|
|
128
|
+
text-align: center;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.remove-btn {
|
|
132
|
+
background-color: #dc3545;
|
|
133
|
+
color: white;
|
|
134
|
+
border: none;
|
|
135
|
+
padding: 0.3rem 0.6rem;
|
|
136
|
+
border-radius: 4px;
|
|
137
|
+
cursor: pointer;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.cart-summary {
|
|
141
|
+
max-width: 350px;
|
|
142
|
+
margin-left: auto;
|
|
143
|
+
border: 1px solid #ddd;
|
|
144
|
+
padding: 1rem;
|
|
145
|
+
border-radius: 6px;
|
|
146
|
+
background-color: #fff;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.summary-row {
|
|
150
|
+
display: flex;
|
|
151
|
+
justify-content: space-between;
|
|
152
|
+
margin-bottom: 0.5rem;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.total-row {
|
|
156
|
+
font-weight: bold;
|
|
157
|
+
font-size: 1.1rem;
|
|
158
|
+
border-top: 1px solid #ddd;
|
|
159
|
+
padding-top: 0.5rem;
|
|
160
|
+
margin-top: 0.5rem;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.checkout-actions {
|
|
164
|
+
margin-top: 1rem;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.checkout-btn {
|
|
168
|
+
width: 100%;
|
|
169
|
+
padding: 0.75rem;
|
|
170
|
+
background-color: #007bff;
|
|
171
|
+
color: white;
|
|
172
|
+
border: none;
|
|
173
|
+
border-radius: 4px;
|
|
174
|
+
font-size: 1rem;
|
|
175
|
+
cursor: pointer;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.checkout-btn:hover {
|
|
179
|
+
background-color: #0069d9;
|
|
180
|
+
}
|
|
181
|
+
</style>
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
import { useRouter } from 'vue-router'
|
|
4
|
+
import { useFoodStore } from '../stores/foodStore'
|
|
5
|
+
|
|
6
|
+
const store = useFoodStore()
|
|
7
|
+
const router = useRouter()
|
|
8
|
+
|
|
9
|
+
const orderId = ref('ORD-' + Math.floor(100000 + Math.random() * 900000))
|
|
10
|
+
const totalPaid = ref(store.totalBill)
|
|
11
|
+
|
|
12
|
+
const orderAgain = () => {
|
|
13
|
+
store.clearCart()
|
|
14
|
+
router.push('/')
|
|
15
|
+
}
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<div class="success-container">
|
|
20
|
+
<div class="success-card">
|
|
21
|
+
<div class="success-icon">✓</div>
|
|
22
|
+
<h2>Order Placed Successfully!</h2>
|
|
23
|
+
<p>Thank you for your order. We are preparing your delicious food.</p>
|
|
24
|
+
|
|
25
|
+
<div class="order-details">
|
|
26
|
+
<div class="detail-row">
|
|
27
|
+
<span>Order ID:</span>
|
|
28
|
+
<strong>#{{ orderId }}</strong>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="detail-row">
|
|
31
|
+
<span>Total Paid:</span>
|
|
32
|
+
<strong>${{ totalPaid.toFixed(2) }}</strong>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<button class="order-again-btn" @click="orderAgain">Order Again</button>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</template>
|
|
40
|
+
|
|
41
|
+
<style scoped>
|
|
42
|
+
.success-container {
|
|
43
|
+
display: flex;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
padding: 3rem 1rem;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.success-card {
|
|
49
|
+
max-width: 480px;
|
|
50
|
+
width: 100%;
|
|
51
|
+
border: 1px solid #ddd;
|
|
52
|
+
border-radius: 8px;
|
|
53
|
+
padding: 2rem;
|
|
54
|
+
text-align: center;
|
|
55
|
+
background-color: #fff;
|
|
56
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.success-icon {
|
|
60
|
+
font-size: 3rem;
|
|
61
|
+
color: #28a745;
|
|
62
|
+
margin-bottom: 1rem;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.order-details {
|
|
66
|
+
margin: 1.5rem 0;
|
|
67
|
+
padding: 1rem;
|
|
68
|
+
background-color: #f8f9fa;
|
|
69
|
+
border-radius: 6px;
|
|
70
|
+
display: flex;
|
|
71
|
+
flex-direction: column;
|
|
72
|
+
gap: 0.5rem;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.detail-row {
|
|
76
|
+
display: flex;
|
|
77
|
+
justify-content: space-between;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.order-again-btn {
|
|
81
|
+
background-color: #28a745;
|
|
82
|
+
color: white;
|
|
83
|
+
border: none;
|
|
84
|
+
padding: 0.75rem 1.5rem;
|
|
85
|
+
font-size: 1rem;
|
|
86
|
+
border-radius: 4px;
|
|
87
|
+
cursor: pointer;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.order-again-btn:hover {
|
|
91
|
+
background-color: #218838;
|
|
92
|
+
}
|
|
93
|
+
</style>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Symposium Management System</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="app"></div>
|
|
10
|
+
<script type="module" src="/src/main.js"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "vue-symposium-system",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "vite build",
|
|
9
|
+
"preview": "vite preview"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"pinia": "^4.1.0",
|
|
13
|
+
"vue": "^3.5.44"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@vitejs/plugin-vue": "^6.0.10",
|
|
17
|
+
"vite": "^8.3.4"
|
|
18
|
+
}
|
|
19
|
+
}
|