wad-lab 1.0.8 → 1.1.0
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 +15 -8
- package/package.json +1 -1
- package/templates/springboot-hospital-api/.mvn/wrapper/maven-wrapper.properties +3 -0
- package/templates/springboot-hospital-api/mvnw +295 -0
- package/templates/springboot-hospital-api/mvnw.cmd +189 -0
- package/templates/springboot-hospital-api/pom.xml +41 -0
- package/templates/springboot-hospital-api/src/main/java/com/example/hospital/HospitalApplication.java +12 -0
- package/templates/springboot-hospital-api/src/main/java/com/example/hospital/controller/HospitalController.java +50 -0
- package/templates/springboot-hospital-api/src/main/java/com/example/hospital/model/Appointment.java +95 -0
- package/templates/springboot-hospital-api/src/main/java/com/example/hospital/repository/AppointmentRepository.java +15 -0
- package/templates/springboot-hospital-api/src/main/java/com/example/hospital/service/HospitalService.java +54 -0
- package/templates/springboot-hospital-api/src/main/resources/application.properties +3 -0
- package/templates/springboot-hospital-api/src/test/java/com/example/hospital/HospitalApplicationTests.java +12 -0
- package/templates/springboot-library-api/.mvn/wrapper/maven-wrapper.properties +3 -0
- package/templates/springboot-library-api/mvnw +295 -0
- package/templates/springboot-library-api/mvnw.cmd +189 -0
- package/templates/springboot-library-api/pom.xml +42 -0
- package/templates/springboot-library-api/src/main/java/com/example/library/LibraryApplication.java +12 -0
- package/templates/springboot-library-api/src/main/java/com/example/library/controller/LibraryController.java +51 -0
- package/templates/springboot-library-api/src/main/java/com/example/library/model/Book.java +76 -0
- package/templates/springboot-library-api/src/main/java/com/example/library/model/CategoryAnalytics.java +41 -0
- package/templates/springboot-library-api/src/main/java/com/example/library/repository/BookRepository.java +13 -0
- package/templates/springboot-library-api/src/main/java/com/example/library/service/LibraryService.java +60 -0
- package/templates/springboot-library-api/src/main/resources/application.properties +3 -0
- package/templates/vue-game-rps/index.html +12 -0
- package/templates/vue-game-rps/package.json +19 -0
- package/templates/vue-game-rps/src/App.vue +125 -0
- package/templates/vue-game-rps/src/main.js +5 -0
- package/templates/vue-game-rps/src/stores/rpsStore.js +43 -0
- package/templates/vue-game-rps/vite.config.js +6 -0
- package/templates/vue-game-tictactoe/index.html +12 -0
- package/templates/vue-game-tictactoe/package.json +19 -0
- package/templates/vue-game-tictactoe/src/App.vue +105 -0
- package/templates/vue-game-tictactoe/src/main.js +5 -0
- package/templates/vue-game-tictactoe/src/stores/tictactoeStore.js +61 -0
- package/templates/vue-game-tictactoe/vite.config.js +6 -0
- package/templates/vue-game-whackamole/index.html +12 -0
- package/templates/vue-game-whackamole/package.json +19 -0
- package/templates/vue-game-whackamole/src/App.vue +104 -0
- package/templates/vue-game-whackamole/src/main.js +7 -0
- package/templates/vue-game-whackamole/src/stores/moleStore.js +71 -0
- package/templates/vue-game-whackamole/vite.config.js +6 -0
- package/templates/vue-hospital-portal/index.html +12 -0
- package/templates/vue-hospital-portal/package.json +20 -0
- package/templates/vue-hospital-portal/src/App.vue +107 -0
- package/templates/vue-hospital-portal/src/main.js +9 -0
- package/templates/vue-hospital-portal/src/router/index.js +17 -0
- package/templates/vue-hospital-portal/src/stores/hospitalStore.js +91 -0
- package/templates/vue-hospital-portal/src/views/HospitalBillingView.vue +271 -0
- package/templates/vue-hospital-portal/src/views/OPDRegistrationView.vue +453 -0
- package/templates/vue-hospital-portal/src/views/PatientListView.vue +315 -0
- package/templates/vue-hospital-portal/vite.config.js +6 -0
- package/templates/vue-library-system/index.html +12 -0
- package/templates/vue-library-system/package.json +20 -0
- package/templates/vue-library-system/src/App.vue +91 -0
- package/templates/vue-library-system/src/main.js +9 -0
- package/templates/vue-library-system/src/router/index.js +29 -0
- package/templates/vue-library-system/src/stores/libraryStore.js +87 -0
- package/templates/vue-library-system/src/views/BookCatalogView.vue +432 -0
- package/templates/vue-library-system/src/views/LoanManagerView.vue +296 -0
- package/templates/vue-library-system/src/views/MembershipView.vue +269 -0
- package/templates/vue-library-system/vite.config.js +6 -0
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
import { useLibraryStore } from '../stores/libraryStore'
|
|
4
|
+
|
|
5
|
+
const libraryStore = useLibraryStore()
|
|
6
|
+
|
|
7
|
+
const newMember = ref({
|
|
8
|
+
name: '',
|
|
9
|
+
email: '',
|
|
10
|
+
membershipType: 'Standard'
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
const successMessage = ref('')
|
|
14
|
+
|
|
15
|
+
function handleRegister() {
|
|
16
|
+
if (!newMember.value.name || !newMember.value.email) {
|
|
17
|
+
return
|
|
18
|
+
}
|
|
19
|
+
const registered = libraryStore.registerMember({
|
|
20
|
+
name: newMember.value.name,
|
|
21
|
+
email: newMember.value.email,
|
|
22
|
+
membershipType: newMember.value.membershipType
|
|
23
|
+
})
|
|
24
|
+
successMessage.value = `Member registered successfully with ID: ${registered.id}`
|
|
25
|
+
newMember.value = {
|
|
26
|
+
name: '',
|
|
27
|
+
email: '',
|
|
28
|
+
membershipType: 'Standard'
|
|
29
|
+
}
|
|
30
|
+
setTimeout(() => {
|
|
31
|
+
successMessage.value = ''
|
|
32
|
+
}, 3500)
|
|
33
|
+
}
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<template>
|
|
37
|
+
<div class="membership-page">
|
|
38
|
+
<div v-if="successMessage" class="alert-box">
|
|
39
|
+
{{ successMessage }}
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<div class="form-card">
|
|
43
|
+
<h2>Register New Member</h2>
|
|
44
|
+
<form class="member-form" @submit.prevent="handleRegister">
|
|
45
|
+
<div class="form-group">
|
|
46
|
+
<label>Full Name</label>
|
|
47
|
+
<input
|
|
48
|
+
v-model="newMember.name"
|
|
49
|
+
type="text"
|
|
50
|
+
required
|
|
51
|
+
placeholder="e.g. Alice Walker"
|
|
52
|
+
/>
|
|
53
|
+
</div>
|
|
54
|
+
<div class="form-group">
|
|
55
|
+
<label>Email Address</label>
|
|
56
|
+
<input
|
|
57
|
+
v-model="newMember.email"
|
|
58
|
+
type="email"
|
|
59
|
+
required
|
|
60
|
+
placeholder="e.g. alice@example.com"
|
|
61
|
+
/>
|
|
62
|
+
</div>
|
|
63
|
+
<div class="form-group">
|
|
64
|
+
<label>Membership Type</label>
|
|
65
|
+
<select v-model="newMember.membershipType">
|
|
66
|
+
<option value="Standard">Standard</option>
|
|
67
|
+
<option value="Premium">Premium</option>
|
|
68
|
+
<option value="Student">Student</option>
|
|
69
|
+
</select>
|
|
70
|
+
</div>
|
|
71
|
+
<button type="submit" class="btn-submit">Register Member</button>
|
|
72
|
+
</form>
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<div class="table-card">
|
|
76
|
+
<div class="card-header">
|
|
77
|
+
<h2>Member Roster</h2>
|
|
78
|
+
<span class="count-badge">{{ libraryStore.members.length }} Members</span>
|
|
79
|
+
</div>
|
|
80
|
+
<table class="data-table">
|
|
81
|
+
<thead>
|
|
82
|
+
<tr>
|
|
83
|
+
<th>Member ID</th>
|
|
84
|
+
<th>Full Name</th>
|
|
85
|
+
<th>Email</th>
|
|
86
|
+
<th>Type</th>
|
|
87
|
+
<th>Currently Borrowed Books</th>
|
|
88
|
+
</tr>
|
|
89
|
+
</thead>
|
|
90
|
+
<tbody>
|
|
91
|
+
<tr v-for="member in libraryStore.members" :key="member.id">
|
|
92
|
+
<td><code>{{ member.id }}</code></td>
|
|
93
|
+
<td class="font-bold">{{ member.name }}</td>
|
|
94
|
+
<td>{{ member.email }}</td>
|
|
95
|
+
<td>
|
|
96
|
+
<span :class="['type-badge', member.membershipType.toLowerCase()]">
|
|
97
|
+
{{ member.membershipType }}
|
|
98
|
+
</span>
|
|
99
|
+
</td>
|
|
100
|
+
<td>
|
|
101
|
+
<div v-if="member.borrowedBooks && member.borrowedBooks.length > 0" class="books-list">
|
|
102
|
+
<span v-for="(b, i) in member.borrowedBooks" :key="i" class="book-tag">
|
|
103
|
+
{{ b }}
|
|
104
|
+
</span>
|
|
105
|
+
</div>
|
|
106
|
+
<span v-else class="text-muted">None</span>
|
|
107
|
+
</td>
|
|
108
|
+
</tr>
|
|
109
|
+
</tbody>
|
|
110
|
+
</table>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
</template>
|
|
114
|
+
|
|
115
|
+
<style scoped>
|
|
116
|
+
.membership-page {
|
|
117
|
+
display: flex;
|
|
118
|
+
flex-direction: column;
|
|
119
|
+
gap: 20px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.alert-box {
|
|
123
|
+
background-color: #ecfdf5;
|
|
124
|
+
color: #065f46;
|
|
125
|
+
border: 1px solid #a7f3d0;
|
|
126
|
+
padding: 12px 16px;
|
|
127
|
+
border-radius: 6px;
|
|
128
|
+
font-size: 14px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.form-card,
|
|
132
|
+
.table-card {
|
|
133
|
+
background: white;
|
|
134
|
+
border: 1px solid #e2e8f0;
|
|
135
|
+
border-radius: 6px;
|
|
136
|
+
padding: 20px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.form-card h2,
|
|
140
|
+
.table-card h2 {
|
|
141
|
+
margin: 0 0 16px 0;
|
|
142
|
+
font-size: 18px;
|
|
143
|
+
color: #1e293b;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.card-header {
|
|
147
|
+
display: flex;
|
|
148
|
+
justify-content: space-between;
|
|
149
|
+
align-items: center;
|
|
150
|
+
margin-bottom: 16px;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.card-header h2 {
|
|
154
|
+
margin: 0;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.count-badge {
|
|
158
|
+
background: #f1f5f9;
|
|
159
|
+
color: #475569;
|
|
160
|
+
padding: 4px 10px;
|
|
161
|
+
border-radius: 12px;
|
|
162
|
+
font-size: 13px;
|
|
163
|
+
font-weight: 500;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.member-form {
|
|
167
|
+
display: grid;
|
|
168
|
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
169
|
+
gap: 12px;
|
|
170
|
+
align-items: flex-end;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.form-group {
|
|
174
|
+
display: flex;
|
|
175
|
+
flex-direction: column;
|
|
176
|
+
gap: 6px;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.form-group label {
|
|
180
|
+
font-size: 12px;
|
|
181
|
+
font-weight: 600;
|
|
182
|
+
color: #475569;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.form-group input,
|
|
186
|
+
.form-group select {
|
|
187
|
+
padding: 8px 10px;
|
|
188
|
+
border: 1px solid #cbd5e1;
|
|
189
|
+
border-radius: 4px;
|
|
190
|
+
font-size: 14px;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.btn-submit {
|
|
194
|
+
background-color: #0f172a;
|
|
195
|
+
color: white;
|
|
196
|
+
border: none;
|
|
197
|
+
padding: 9px 16px;
|
|
198
|
+
border-radius: 4px;
|
|
199
|
+
font-size: 14px;
|
|
200
|
+
cursor: pointer;
|
|
201
|
+
font-weight: 500;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.btn-submit:hover {
|
|
205
|
+
background-color: #1e293b;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.data-table {
|
|
209
|
+
width: 100%;
|
|
210
|
+
border-collapse: collapse;
|
|
211
|
+
font-size: 14px;
|
|
212
|
+
text-align: left;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.data-table th,
|
|
216
|
+
.data-table td {
|
|
217
|
+
padding: 10px 12px;
|
|
218
|
+
border-bottom: 1px solid #e2e8f0;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.data-table th {
|
|
222
|
+
background-color: #f8fafc;
|
|
223
|
+
color: #475569;
|
|
224
|
+
font-weight: 600;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.font-bold {
|
|
228
|
+
font-weight: 600;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.type-badge {
|
|
232
|
+
display: inline-block;
|
|
233
|
+
padding: 3px 8px;
|
|
234
|
+
border-radius: 4px;
|
|
235
|
+
font-size: 12px;
|
|
236
|
+
font-weight: 600;
|
|
237
|
+
background-color: #e2e8f0;
|
|
238
|
+
color: #334155;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.type-badge.premium {
|
|
242
|
+
background-color: #fef3c7;
|
|
243
|
+
color: #92400e;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.type-badge.student {
|
|
247
|
+
background-color: #e0e7ff;
|
|
248
|
+
color: #3730a3;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.books-list {
|
|
252
|
+
display: flex;
|
|
253
|
+
flex-wrap: wrap;
|
|
254
|
+
gap: 6px;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.book-tag {
|
|
258
|
+
background-color: #f1f5f9;
|
|
259
|
+
border: 1px solid #cbd5e1;
|
|
260
|
+
border-radius: 4px;
|
|
261
|
+
padding: 2px 6px;
|
|
262
|
+
font-size: 12px;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.text-muted {
|
|
266
|
+
color: #94a3b8;
|
|
267
|
+
font-size: 13px;
|
|
268
|
+
}
|
|
269
|
+
</style>
|