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,297 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
import { useSymposiumStore } from './stores/symposiumStore'
|
|
4
|
+
|
|
5
|
+
const store = useSymposiumStore()
|
|
6
|
+
|
|
7
|
+
const formData = ref({
|
|
8
|
+
studentName: '',
|
|
9
|
+
college: '',
|
|
10
|
+
email: '',
|
|
11
|
+
eventId: ''
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
function handleSubmit() {
|
|
15
|
+
if (!formData.value.studentName || !formData.value.college || !formData.value.email || !formData.value.eventId) {
|
|
16
|
+
return
|
|
17
|
+
}
|
|
18
|
+
store.registerStudent({ ...formData.value })
|
|
19
|
+
formData.value = {
|
|
20
|
+
studentName: '',
|
|
21
|
+
college: '',
|
|
22
|
+
email: '',
|
|
23
|
+
eventId: ''
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<div class="symposium-container">
|
|
30
|
+
<header class="header">
|
|
31
|
+
<h1>Symposium Management System</h1>
|
|
32
|
+
<div class="counter-badge">
|
|
33
|
+
Total Registrations: <strong>{{ store.totalRegistrations }}</strong>
|
|
34
|
+
</div>
|
|
35
|
+
</header>
|
|
36
|
+
|
|
37
|
+
<section class="section">
|
|
38
|
+
<h2>Event Catalog</h2>
|
|
39
|
+
<div class="event-grid">
|
|
40
|
+
<div v-for="event in store.events" :key="event.id" class="event-card">
|
|
41
|
+
<div class="event-category">{{ event.category }}</div>
|
|
42
|
+
<h3 class="event-title">{{ event.title }}</h3>
|
|
43
|
+
<p class="event-fee">Registration Fee: ₹{{ event.fee }}</p>
|
|
44
|
+
<p class="event-stats">Enrolled: {{ store.registrationsByEvent(event.id).length }}</p>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</section>
|
|
48
|
+
|
|
49
|
+
<section class="section">
|
|
50
|
+
<h2>Register Participant</h2>
|
|
51
|
+
<form @submit.prevent="handleSubmit" class="registration-form">
|
|
52
|
+
<div class="form-group">
|
|
53
|
+
<label for="studentName">Student Name</label>
|
|
54
|
+
<input
|
|
55
|
+
id="studentName"
|
|
56
|
+
v-model="formData.studentName"
|
|
57
|
+
type="text"
|
|
58
|
+
placeholder="Enter full name"
|
|
59
|
+
required
|
|
60
|
+
/>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<div class="form-group">
|
|
64
|
+
<label for="college">College</label>
|
|
65
|
+
<input
|
|
66
|
+
id="college"
|
|
67
|
+
v-model="formData.college"
|
|
68
|
+
type="text"
|
|
69
|
+
placeholder="Enter college name"
|
|
70
|
+
required
|
|
71
|
+
/>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<div class="form-group">
|
|
75
|
+
<label for="email">Email</label>
|
|
76
|
+
<input
|
|
77
|
+
id="email"
|
|
78
|
+
v-model="formData.email"
|
|
79
|
+
type="email"
|
|
80
|
+
placeholder="Enter email address"
|
|
81
|
+
required
|
|
82
|
+
/>
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
<div class="form-group">
|
|
86
|
+
<label for="eventSelect">Select Event</label>
|
|
87
|
+
<select id="eventSelect" v-model="formData.eventId" required>
|
|
88
|
+
<option value="" disabled>-- Select an Event --</option>
|
|
89
|
+
<option v-for="event in store.events" :key="event.id" :value="event.id">
|
|
90
|
+
{{ event.title }} (₹{{ event.fee }})
|
|
91
|
+
</option>
|
|
92
|
+
</select>
|
|
93
|
+
</div>
|
|
94
|
+
|
|
95
|
+
<button type="submit" class="btn-submit">Register</button>
|
|
96
|
+
</form>
|
|
97
|
+
</section>
|
|
98
|
+
|
|
99
|
+
<section class="section">
|
|
100
|
+
<h2>Registered Participants</h2>
|
|
101
|
+
<table class="participants-table" v-if="store.registrations.length > 0">
|
|
102
|
+
<thead>
|
|
103
|
+
<tr>
|
|
104
|
+
<th>ID</th>
|
|
105
|
+
<th>Student Name</th>
|
|
106
|
+
<th>College</th>
|
|
107
|
+
<th>Email</th>
|
|
108
|
+
<th>Event</th>
|
|
109
|
+
<th>Action</th>
|
|
110
|
+
</tr>
|
|
111
|
+
</thead>
|
|
112
|
+
<tbody>
|
|
113
|
+
<tr v-for="reg in store.registrations" :key="reg.id">
|
|
114
|
+
<td>{{ reg.id }}</td>
|
|
115
|
+
<td>{{ reg.studentName }}</td>
|
|
116
|
+
<td>{{ reg.college }}</td>
|
|
117
|
+
<td>{{ reg.email }}</td>
|
|
118
|
+
<td>{{ reg.eventTitle }}</td>
|
|
119
|
+
<td>
|
|
120
|
+
<button
|
|
121
|
+
type="button"
|
|
122
|
+
class="btn-delete"
|
|
123
|
+
@click="store.deleteRegistration(reg.id)"
|
|
124
|
+
>
|
|
125
|
+
Delete
|
|
126
|
+
</button>
|
|
127
|
+
</td>
|
|
128
|
+
</tr>
|
|
129
|
+
</tbody>
|
|
130
|
+
</table>
|
|
131
|
+
<p v-else class="empty-state">No participants registered yet.</p>
|
|
132
|
+
</section>
|
|
133
|
+
</div>
|
|
134
|
+
</template>
|
|
135
|
+
|
|
136
|
+
<style scoped>
|
|
137
|
+
.symposium-container {
|
|
138
|
+
max-width: 900px;
|
|
139
|
+
margin: 30px auto;
|
|
140
|
+
padding: 0 20px;
|
|
141
|
+
font-family: Arial, sans-serif;
|
|
142
|
+
color: #333;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.header {
|
|
146
|
+
display: flex;
|
|
147
|
+
justify-content: space-between;
|
|
148
|
+
align-items: center;
|
|
149
|
+
border-bottom: 2px solid #ddd;
|
|
150
|
+
padding-bottom: 15px;
|
|
151
|
+
margin-bottom: 25px;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.header h1 {
|
|
155
|
+
margin: 0;
|
|
156
|
+
font-size: 24px;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.counter-badge {
|
|
160
|
+
background-color: #2563eb;
|
|
161
|
+
color: #fff;
|
|
162
|
+
padding: 8px 14px;
|
|
163
|
+
border-radius: 4px;
|
|
164
|
+
font-size: 14px;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.section {
|
|
168
|
+
margin-bottom: 30px;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.section h2 {
|
|
172
|
+
font-size: 18px;
|
|
173
|
+
margin-bottom: 12px;
|
|
174
|
+
border-bottom: 1px solid #eee;
|
|
175
|
+
padding-bottom: 6px;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.event-grid {
|
|
179
|
+
display: grid;
|
|
180
|
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
181
|
+
gap: 15px;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.event-card {
|
|
185
|
+
border: 1px solid #ddd;
|
|
186
|
+
border-radius: 6px;
|
|
187
|
+
padding: 15px;
|
|
188
|
+
background-color: #fafafa;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.event-category {
|
|
192
|
+
font-size: 12px;
|
|
193
|
+
text-transform: uppercase;
|
|
194
|
+
color: #666;
|
|
195
|
+
font-weight: bold;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.event-title {
|
|
199
|
+
margin: 8px 0;
|
|
200
|
+
font-size: 16px;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.event-fee {
|
|
204
|
+
margin: 4px 0;
|
|
205
|
+
font-size: 14px;
|
|
206
|
+
color: #16a34a;
|
|
207
|
+
font-weight: bold;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.event-stats {
|
|
211
|
+
margin: 4px 0 0;
|
|
212
|
+
font-size: 12px;
|
|
213
|
+
color: #777;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.registration-form {
|
|
217
|
+
display: grid;
|
|
218
|
+
grid-template-columns: 1fr 1fr;
|
|
219
|
+
gap: 12px 20px;
|
|
220
|
+
background-color: #f9f9f9;
|
|
221
|
+
padding: 18px;
|
|
222
|
+
border: 1px solid #ddd;
|
|
223
|
+
border-radius: 6px;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.form-group {
|
|
227
|
+
display: flex;
|
|
228
|
+
flex-direction: column;
|
|
229
|
+
gap: 4px;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.form-group label {
|
|
233
|
+
font-size: 13px;
|
|
234
|
+
font-weight: bold;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.form-group input,
|
|
238
|
+
.form-group select {
|
|
239
|
+
padding: 8px;
|
|
240
|
+
border: 1px solid #ccc;
|
|
241
|
+
border-radius: 4px;
|
|
242
|
+
font-size: 14px;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.btn-submit {
|
|
246
|
+
grid-column: span 2;
|
|
247
|
+
padding: 10px;
|
|
248
|
+
background-color: #2563eb;
|
|
249
|
+
color: #fff;
|
|
250
|
+
border: none;
|
|
251
|
+
border-radius: 4px;
|
|
252
|
+
cursor: pointer;
|
|
253
|
+
font-size: 14px;
|
|
254
|
+
font-weight: bold;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.btn-submit:hover {
|
|
258
|
+
background-color: #1d4ed8;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.participants-table {
|
|
262
|
+
width: 100%;
|
|
263
|
+
border-collapse: collapse;
|
|
264
|
+
margin-top: 10px;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.participants-table th,
|
|
268
|
+
.participants-table td {
|
|
269
|
+
border: 1px solid #ddd;
|
|
270
|
+
padding: 8px 12px;
|
|
271
|
+
text-align: left;
|
|
272
|
+
font-size: 14px;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.participants-table th {
|
|
276
|
+
background-color: #f1f5f9;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.btn-delete {
|
|
280
|
+
background-color: #ef4444;
|
|
281
|
+
color: white;
|
|
282
|
+
border: none;
|
|
283
|
+
padding: 4px 8px;
|
|
284
|
+
border-radius: 3px;
|
|
285
|
+
cursor: pointer;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.btn-delete:hover {
|
|
289
|
+
background-color: #dc2626;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.empty-state {
|
|
293
|
+
color: #777;
|
|
294
|
+
font-style: italic;
|
|
295
|
+
padding: 10px 0;
|
|
296
|
+
}
|
|
297
|
+
</style>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { defineStore } from 'pinia'
|
|
2
|
+
|
|
3
|
+
export const useSymposiumStore = defineStore('symposium', {
|
|
4
|
+
state: () => ({
|
|
5
|
+
events: [
|
|
6
|
+
{ id: 'EVT-1', title: 'CodeSprint Hackathon', category: 'Technical', fee: 100 },
|
|
7
|
+
{ id: 'EVT-2', title: 'Web Design Challenge', category: 'Technical', fee: 50 },
|
|
8
|
+
{ id: 'EVT-3', title: 'Tech Quiz Mania', category: 'Technical', fee: 30 },
|
|
9
|
+
{ id: 'EVT-4', title: 'Gaming Tournament', category: 'Non-Technical', fee: 50 }
|
|
10
|
+
],
|
|
11
|
+
registrations: [
|
|
12
|
+
{
|
|
13
|
+
id: 1,
|
|
14
|
+
studentName: 'John Doe',
|
|
15
|
+
college: 'SSN College of Engineering',
|
|
16
|
+
email: 'john@example.com',
|
|
17
|
+
eventId: 'EVT-1',
|
|
18
|
+
eventTitle: 'CodeSprint Hackathon'
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}),
|
|
22
|
+
getters: {
|
|
23
|
+
totalRegistrations: (state) => state.registrations.length,
|
|
24
|
+
registrationsByEvent: (state) => (eventId) => {
|
|
25
|
+
return state.registrations.filter((reg) => reg.eventId === eventId)
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
actions: {
|
|
29
|
+
registerStudent(student) {
|
|
30
|
+
const matchedEvent = this.events.find((e) => e.id === student.eventId)
|
|
31
|
+
this.registrations.push({
|
|
32
|
+
id: Date.now(),
|
|
33
|
+
studentName: student.studentName.trim(),
|
|
34
|
+
college: student.college.trim(),
|
|
35
|
+
email: student.email.trim(),
|
|
36
|
+
eventId: student.eventId,
|
|
37
|
+
eventTitle: matchedEvent ? matchedEvent.title : ''
|
|
38
|
+
})
|
|
39
|
+
},
|
|
40
|
+
deleteRegistration(id) {
|
|
41
|
+
this.registrations = this.registrations.filter((reg) => reg.id !== id)
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
})
|