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.
Files changed (48) hide show
  1. package/bin/index.js +23 -17
  2. package/package.json +1 -1
  3. package/templates/game-bingo/index.html +32 -0
  4. package/templates/game-bingo/script.js +118 -0
  5. package/templates/game-bingo/style.css +104 -0
  6. package/templates/springboot-course-registration/.mvn/wrapper/maven-wrapper.properties +3 -0
  7. package/templates/springboot-course-registration/mvnw +295 -0
  8. package/templates/springboot-course-registration/mvnw.cmd +189 -0
  9. package/templates/springboot-course-registration/pom.xml +41 -0
  10. package/templates/springboot-course-registration/src/main/java/com/example/coursereg/CourseRegApplication.java +12 -0
  11. package/templates/springboot-course-registration/src/main/java/com/example/coursereg/controller/CourseController.java +42 -0
  12. package/templates/springboot-course-registration/src/main/java/com/example/coursereg/model/Course.java +99 -0
  13. package/templates/springboot-course-registration/src/main/java/com/example/coursereg/repository/CourseRepository.java +16 -0
  14. package/templates/springboot-course-registration/src/main/java/com/example/coursereg/service/CourseService.java +60 -0
  15. package/templates/springboot-course-registration/src/main/resources/application.properties +3 -0
  16. package/templates/springboot-course-registration/src/test/java/com/example/coursereg/CourseRegApplicationTests.java +12 -0
  17. package/templates/vue-banking-app/index.html +12 -0
  18. package/templates/vue-banking-app/package.json +20 -0
  19. package/templates/vue-banking-app/src/App.vue +80 -0
  20. package/templates/vue-banking-app/src/main.js +9 -0
  21. package/templates/vue-banking-app/src/router/index.js +17 -0
  22. package/templates/vue-banking-app/src/stores/bankStore.js +48 -0
  23. package/templates/vue-banking-app/src/views/DashboardView.vue +88 -0
  24. package/templates/vue-banking-app/src/views/StatementView.vue +171 -0
  25. package/templates/vue-banking-app/src/views/TransactionFormView.vue +144 -0
  26. package/templates/vue-banking-app/vite.config.js +6 -0
  27. package/templates/vue-employee-system/index.html +12 -0
  28. package/templates/vue-employee-system/package.json +19 -0
  29. package/templates/vue-employee-system/src/App.vue +388 -0
  30. package/templates/vue-employee-system/src/main.js +5 -0
  31. package/templates/vue-employee-system/src/stores/employeeStore.js +54 -0
  32. package/templates/vue-employee-system/vite.config.js +6 -0
  33. package/templates/vue-food-ordering/index.html +12 -0
  34. package/templates/vue-food-ordering/package.json +20 -0
  35. package/templates/vue-food-ordering/src/App.vue +109 -0
  36. package/templates/vue-food-ordering/src/main.js +6 -0
  37. package/templates/vue-food-ordering/src/router/index.js +17 -0
  38. package/templates/vue-food-ordering/src/stores/foodStore.js +65 -0
  39. package/templates/vue-food-ordering/src/views/MenuView.vue +145 -0
  40. package/templates/vue-food-ordering/src/views/OrderCartView.vue +181 -0
  41. package/templates/vue-food-ordering/src/views/OrderSuccessView.vue +93 -0
  42. package/templates/vue-food-ordering/vite.config.js +6 -0
  43. package/templates/vue-symposium-system/index.html +12 -0
  44. package/templates/vue-symposium-system/package.json +19 -0
  45. package/templates/vue-symposium-system/src/App.vue +297 -0
  46. package/templates/vue-symposium-system/src/main.js +5 -0
  47. package/templates/vue-symposium-system/src/stores/symposiumStore.js +44 -0
  48. package/templates/vue-symposium-system/vite.config.js +6 -0
@@ -0,0 +1,88 @@
1
+ <script setup>
2
+ import { useBankStore } from '../stores/bankStore'
3
+
4
+ const bank = useBankStore()
5
+ </script>
6
+
7
+ <template>
8
+ <div class="dashboard-card">
9
+ <h2>Account Overview</h2>
10
+ <div class="info-row">
11
+ <span>Account Holder:</span>
12
+ <strong>{{ bank.accountHolder }}</strong>
13
+ </div>
14
+ <div class="info-row">
15
+ <span>Account Number:</span>
16
+ <strong>{{ bank.accountNumber }}</strong>
17
+ </div>
18
+ <div class="info-row">
19
+ <span>Account Type:</span>
20
+ <strong>{{ bank.accountType }}</strong>
21
+ </div>
22
+ <div class="balance-box">
23
+ <span>Available Balance</span>
24
+ <h3 class="balance-val">${{ bank.balance.toFixed(2) }}</h3>
25
+ </div>
26
+
27
+ <div class="quick-actions">
28
+ <router-link to="/transaction" class="btn btn-primary">Deposit / Withdraw</router-link>
29
+ <router-link to="/statement" class="btn btn-secondary">View Statement ({{ bank.transactionCount }})</router-link>
30
+ </div>
31
+ </div>
32
+ </template>
33
+
34
+ <style scoped>
35
+ .dashboard-card {
36
+ border: 1px solid #ddd;
37
+ border-radius: 8px;
38
+ padding: 20px;
39
+ background-color: #fafafa;
40
+ }
41
+
42
+ .info-row {
43
+ display: flex;
44
+ justify-content: space-between;
45
+ padding: 8px 0;
46
+ border-bottom: 1px solid #eee;
47
+ }
48
+
49
+ .balance-box {
50
+ margin: 20px 0;
51
+ padding: 15px;
52
+ background-color: #e8f8f5;
53
+ border: 1px solid #a3e4d7;
54
+ border-radius: 6px;
55
+ text-align: center;
56
+ }
57
+
58
+ .balance-val {
59
+ color: #16a085;
60
+ font-size: 28px;
61
+ margin: 5px 0 0 0;
62
+ }
63
+
64
+ .quick-actions {
65
+ display: flex;
66
+ gap: 10px;
67
+ margin-top: 15px;
68
+ }
69
+
70
+ .btn {
71
+ flex: 1;
72
+ text-align: center;
73
+ padding: 10px;
74
+ border-radius: 4px;
75
+ text-decoration: none;
76
+ font-weight: bold;
77
+ }
78
+
79
+ .btn-primary {
80
+ background-color: #2980b9;
81
+ color: white;
82
+ }
83
+
84
+ .btn-secondary {
85
+ background-color: #7f8c8d;
86
+ color: white;
87
+ }
88
+ </style>
@@ -0,0 +1,171 @@
1
+ <script setup>
2
+ import { computed } from 'vue'
3
+ import { useBankStore } from '../stores/bankStore'
4
+
5
+ const bank = useBankStore()
6
+
7
+ const totalDeposits = computed(() => {
8
+ return bank.transactions
9
+ .filter(tx => tx.type === 'DEPOSIT')
10
+ .reduce((sum, tx) => sum + tx.amount, 0)
11
+ })
12
+
13
+ const totalWithdrawals = computed(() => {
14
+ return bank.transactions
15
+ .filter(tx => tx.type === 'WITHDRAWAL')
16
+ .reduce((sum, tx) => sum + tx.amount, 0)
17
+ })
18
+ </script>
19
+
20
+ <template>
21
+ <div class="statement-card">
22
+ <div class="header-row">
23
+ <h2>Account Statement</h2>
24
+ <router-link to="/" class="btn btn-back">Back to Dashboard</router-link>
25
+ </div>
26
+
27
+ <div class="summary-cards">
28
+ <div class="summary-box deposits">
29
+ <span>Total Deposits</span>
30
+ <strong>${{ totalDeposits.toFixed(2) }}</strong>
31
+ </div>
32
+ <div class="summary-box withdrawals">
33
+ <span>Total Withdrawals</span>
34
+ <strong>${{ totalWithdrawals.toFixed(2) }}</strong>
35
+ </div>
36
+ <div class="summary-box balance">
37
+ <span>Current Balance</span>
38
+ <strong>${{ bank.balance.toFixed(2) }}</strong>
39
+ </div>
40
+ </div>
41
+
42
+ <div class="table-container">
43
+ <table class="statement-table" v-if="bank.transactions.length">
44
+ <thead>
45
+ <tr>
46
+ <th>Date</th>
47
+ <th>Type</th>
48
+ <th>Amount</th>
49
+ <th>Balance After</th>
50
+ </tr>
51
+ </thead>
52
+ <tbody>
53
+ <tr v-for="tx in bank.transactions" :key="tx.id">
54
+ <td>{{ tx.date }}</td>
55
+ <td :class="tx.type === 'DEPOSIT' ? 'type-deposit' : 'type-withdrawal'">{{ tx.type }}</td>
56
+ <td>${{ tx.amount.toFixed(2) }}</td>
57
+ <td>${{ tx.balanceAfter.toFixed(2) }}</td>
58
+ </tr>
59
+ </tbody>
60
+ </table>
61
+ <p v-else class="empty-state">No transactions recorded yet.</p>
62
+ </div>
63
+ </div>
64
+ </template>
65
+
66
+ <style scoped>
67
+ .statement-card {
68
+ border: 1px solid #ddd;
69
+ border-radius: 8px;
70
+ padding: 20px;
71
+ background-color: #fafafa;
72
+ }
73
+
74
+ .header-row {
75
+ display: flex;
76
+ justify-content: space-between;
77
+ align-items: center;
78
+ margin-bottom: 20px;
79
+ }
80
+
81
+ .summary-cards {
82
+ display: grid;
83
+ grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
84
+ gap: 12px;
85
+ margin-bottom: 20px;
86
+ }
87
+
88
+ .summary-box {
89
+ padding: 12px;
90
+ border-radius: 6px;
91
+ display: flex;
92
+ flex-direction: column;
93
+ gap: 4px;
94
+ }
95
+
96
+ .summary-box.deposits {
97
+ background-color: #e8f8f5;
98
+ border: 1px solid #a3e4d7;
99
+ color: #16a085;
100
+ }
101
+
102
+ .summary-box.withdrawals {
103
+ background-color: #fdebd0;
104
+ border: 1px solid #f8c471;
105
+ color: #d35400;
106
+ }
107
+
108
+ .summary-box.balance {
109
+ background-color: #ebf5fb;
110
+ border: 1px solid #aed6f1;
111
+ color: #2980b9;
112
+ }
113
+
114
+ .summary-box span {
115
+ font-size: 13px;
116
+ color: #555;
117
+ }
118
+
119
+ .summary-box strong {
120
+ font-size: 18px;
121
+ }
122
+
123
+ .table-container {
124
+ overflow-x: auto;
125
+ }
126
+
127
+ .statement-table {
128
+ width: 100%;
129
+ border-collapse: collapse;
130
+ }
131
+
132
+ .statement-table th,
133
+ .statement-table td {
134
+ padding: 10px;
135
+ text-align: left;
136
+ border-bottom: 1px solid #eee;
137
+ }
138
+
139
+ .statement-table th {
140
+ background-color: #f2f2f2;
141
+ }
142
+
143
+ .type-deposit {
144
+ color: #27ae60;
145
+ font-weight: bold;
146
+ }
147
+
148
+ .type-withdrawal {
149
+ color: #c0392b;
150
+ font-weight: bold;
151
+ }
152
+
153
+ .btn {
154
+ padding: 8px 14px;
155
+ border-radius: 4px;
156
+ text-decoration: none;
157
+ font-weight: bold;
158
+ font-size: 14px;
159
+ }
160
+
161
+ .btn-back {
162
+ background-color: #7f8c8d;
163
+ color: white;
164
+ }
165
+
166
+ .empty-state {
167
+ text-align: center;
168
+ color: #777;
169
+ padding: 20px;
170
+ }
171
+ </style>
@@ -0,0 +1,144 @@
1
+ <script setup>
2
+ import { ref } from 'vue'
3
+ import { useRouter } from 'vue-router'
4
+ import { useBankStore } from '../stores/bankStore'
5
+
6
+ const bank = useBankStore()
7
+ const router = useRouter()
8
+
9
+ const txType = ref('DEPOSIT')
10
+ const amount = ref('')
11
+ const feedback = ref({ text: '', isError: false })
12
+
13
+ function handleSubmit() {
14
+ feedback.value = { text: '', isError: false }
15
+
16
+ let res
17
+ if (txType.value === 'DEPOSIT') {
18
+ res = bank.deposit(amount.value)
19
+ } else {
20
+ res = bank.withdraw(amount.value)
21
+ }
22
+
23
+ if (res.success) {
24
+ feedback.value = { text: res.message, isError: false }
25
+ amount.value = ''
26
+ setTimeout(() => {
27
+ router.push('/statement')
28
+ }, 1000)
29
+ } else {
30
+ feedback.value = { text: res.message, isError: true }
31
+ }
32
+ }
33
+ </script>
34
+
35
+ <template>
36
+ <div class="tx-card">
37
+ <h2>Make a Transaction</h2>
38
+ <p>Current Balance: <strong>${{ bank.balance.toFixed(2) }}</strong></p>
39
+
40
+ <div v-if="feedback.text" :class="['alert', feedback.isError ? 'alert-danger' : 'alert-success']">
41
+ {{ feedback.text }}
42
+ </div>
43
+
44
+ <form @submit.prevent="handleSubmit" class="tx-form">
45
+ <div class="form-group">
46
+ <label>Transaction Type:</label>
47
+ <div class="radio-row">
48
+ <label>
49
+ <input type="radio" value="DEPOSIT" v-model="txType" /> Deposit
50
+ </label>
51
+ <label>
52
+ <input type="radio" value="WITHDRAWAL" v-model="txType" /> Withdrawal
53
+ </label>
54
+ </div>
55
+ </div>
56
+
57
+ <div class="form-group">
58
+ <label for="amt">Amount ($):</label>
59
+ <input id="amt" type="number" step="0.01" min="1" v-model="amount" placeholder="e.g. 250.00" required />
60
+ </div>
61
+
62
+ <div class="btn-row">
63
+ <button type="submit" class="btn btn-submit">Confirm {{ txType }}</button>
64
+ <router-link to="/" class="btn btn-back">Cancel</router-link>
65
+ </div>
66
+ </form>
67
+ </div>
68
+ </template>
69
+
70
+ <style scoped>
71
+ .tx-card {
72
+ border: 1px solid #ddd;
73
+ border-radius: 8px;
74
+ padding: 20px;
75
+ background-color: #fafafa;
76
+ }
77
+
78
+ .alert {
79
+ padding: 10px;
80
+ border-radius: 4px;
81
+ margin-bottom: 15px;
82
+ }
83
+
84
+ .alert-success {
85
+ background-color: #d4edda;
86
+ color: #155724;
87
+ }
88
+
89
+ .alert-danger {
90
+ background-color: #f8d7da;
91
+ color: #721c24;
92
+ }
93
+
94
+ .tx-form {
95
+ display: flex;
96
+ flex-direction: column;
97
+ gap: 15px;
98
+ }
99
+
100
+ .form-group {
101
+ display: flex;
102
+ flex-direction: column;
103
+ gap: 5px;
104
+ }
105
+
106
+ .radio-row {
107
+ display: flex;
108
+ gap: 20px;
109
+ }
110
+
111
+ input[type="number"] {
112
+ padding: 8px;
113
+ font-size: 16px;
114
+ border: 1px solid #ccc;
115
+ border-radius: 4px;
116
+ }
117
+
118
+ .btn-row {
119
+ display: flex;
120
+ gap: 10px;
121
+ margin-top: 10px;
122
+ }
123
+
124
+ .btn {
125
+ padding: 10px 16px;
126
+ border: none;
127
+ border-radius: 4px;
128
+ cursor: pointer;
129
+ text-decoration: none;
130
+ font-weight: bold;
131
+ }
132
+
133
+ .btn-submit {
134
+ background-color: #27ae60;
135
+ color: white;
136
+ }
137
+
138
+ .btn-back {
139
+ background-color: #95a5a6;
140
+ color: white;
141
+ display: inline-flex;
142
+ align-items: center;
143
+ }
144
+ </style>
@@ -0,0 +1,6 @@
1
+ import { defineConfig } from 'vite'
2
+ import vue from '@vitejs/plugin-vue'
3
+
4
+ export default defineConfig({
5
+ plugins: [vue()]
6
+ })
@@ -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>Employee 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-employee-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
+ }