wad-lab 1.1.5 → 1.1.7

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 (100) hide show
  1. package/bin/index.js +30 -3
  2. package/package.json +1 -1
  3. package/templates/fullstack-springboot-vue/backend/src/main/java/com/example/company/controller/CompanyController.java +88 -74
  4. package/templates/fullstack-springboot-vue/backend/src/main/java/com/example/company/model/Employee.java +73 -73
  5. package/templates/fullstack-springboot-vue/backend/src/main/java/com/example/company/service/CompanyService.java +90 -60
  6. package/templates/fullstack-springboot-vue/frontend/vue-axios-basic/src/App.vue +429 -405
  7. package/templates/fullstack-springboot-vue/frontend/vue-axios-interceptor/src/App.vue +177 -159
  8. package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia/src/App.vue +441 -427
  9. package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia/src/stores/companyStore.js +126 -96
  10. package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia-props/src/App.vue +84 -69
  11. package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia-props/src/components/DepartmentSection.vue +164 -152
  12. package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia-props/src/components/EmployeeSection.vue +193 -181
  13. package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia-props/src/stores/companyStore.js +126 -35
  14. package/templates/fullstack-springboot-vue/frontend/vue-axios-props-emits/src/App.vue +191 -167
  15. package/templates/fullstack-springboot-vue/frontend/vue-axios-props-emits/src/components/DepartmentForm.vue +98 -98
  16. package/templates/fullstack-springboot-vue/frontend/vue-axios-props-emits/src/components/DepartmentList.vue +92 -91
  17. package/templates/fullstack-springboot-vue/frontend/vue-axios-props-emits/src/components/EmployeeForm.vue +128 -128
  18. package/templates/fullstack-springboot-vue/frontend/vue-axios-props-emits/src/components/EmployeeList.vue +95 -94
  19. package/templates/fullstack-springboot-vue/frontend/vue-axios-router/src/App.vue +90 -90
  20. package/templates/fullstack-springboot-vue/frontend/vue-axios-router/src/views/AddEmployeeView.vue +247 -247
  21. package/templates/fullstack-springboot-vue/frontend/vue-axios-router/src/views/DepartmentView.vue +296 -273
  22. package/templates/fullstack-springboot-vue/frontend/vue-axios-router/src/views/EmployeeView.vue +219 -196
  23. package/templates/fullstack-springboot-vue/frontend/vue-axios-router/src/views/HomeDashboardView.vue +263 -263
  24. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-children/src/views/DepartmentListView.vue +250 -231
  25. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-children/src/views/EmployeeDetailView.vue +181 -159
  26. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-children/src/views/EmployeeListView.vue +315 -295
  27. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia/src/stores/companyStore.js +137 -70
  28. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia/src/views/DepartmentView.vue +229 -209
  29. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia/src/views/EmployeeView.vue +257 -237
  30. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/src/components/EntityTable.vue +106 -92
  31. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/src/stores/companyStore.js +139 -84
  32. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/src/views/ManageDepartmentsView.vue +73 -64
  33. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/src/views/ManageEmployeesView.vue +76 -67
  34. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-props/src/App.vue +59 -59
  35. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-props/src/components/DataCard.vue +72 -53
  36. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-props/src/views/DepartmentPage.vue +89 -77
  37. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-props/src/views/EmployeePage.vue +128 -116
  38. package/templates/springboot-2model-1controller-api/src/main/java/com/example/company/controller/CompanyController.java +88 -74
  39. package/templates/springboot-2model-1controller-api/src/main/java/com/example/company/model/Employee.java +73 -73
  40. package/templates/springboot-2model-1controller-api/src/main/java/com/example/company/service/CompanyService.java +90 -60
  41. package/templates/springboot-course-registration/src/main/java/com/example/coursereg/controller/CourseController.java +46 -42
  42. package/templates/springboot-course-registration/src/main/java/com/example/coursereg/service/CourseService.java +70 -60
  43. package/templates/springboot-hospital-api/src/main/java/com/example/hospital/controller/HospitalController.java +54 -50
  44. package/templates/springboot-hospital-api/src/main/java/com/example/hospital/service/HospitalService.java +65 -54
  45. package/templates/springboot-library-api/src/main/java/com/example/library/controller/LibraryController.java +57 -51
  46. package/templates/springboot-library-api/src/main/java/com/example/library/service/LibraryService.java +70 -60
  47. package/templates/springboot-mockmvc/src/main/java/com/example/mockmvc/controller/ItemController.java +45 -41
  48. package/templates/springboot-mockmvc/src/main/java/com/example/mockmvc/service/ItemService.java +48 -38
  49. package/templates/springboot-mongo-aggregation/src/main/java/com/example/aggregation/controller/ItemController.java +45 -41
  50. package/templates/springboot-mongo-aggregation/src/main/java/com/example/aggregation/service/ItemService.java +48 -38
  51. package/templates/springboot-mongo-aggregation-mockmvc/src/main/java/com/example/aggmockmvc/controller/ItemController.java +45 -41
  52. package/templates/springboot-mongo-aggregation-mockmvc/src/main/java/com/example/aggmockmvc/service/ItemService.java +48 -38
  53. package/templates/springboot-mongo-crud/src/main/java/com/example/crud/controller/ItemController.java +45 -41
  54. package/templates/springboot-mongo-crud/src/main/java/com/example/crud/service/ItemService.java +48 -38
  55. package/templates/vue-axios/src/App.vue +264 -243
  56. package/templates/vue-axios/src/services/ItemService.js +27 -21
  57. package/templates/vue-axios-basic/src/App.vue +429 -405
  58. package/templates/vue-axios-interceptor/src/App.vue +177 -159
  59. package/templates/vue-axios-pinia/src/App.vue +441 -427
  60. package/templates/vue-axios-pinia/src/stores/companyStore.js +126 -96
  61. package/templates/vue-axios-pinia-props/src/App.vue +84 -69
  62. package/templates/vue-axios-pinia-props/src/components/DepartmentSection.vue +164 -152
  63. package/templates/vue-axios-pinia-props/src/components/EmployeeSection.vue +193 -181
  64. package/templates/vue-axios-pinia-props/src/stores/companyStore.js +126 -35
  65. package/templates/vue-axios-props-emits/src/App.vue +191 -167
  66. package/templates/vue-axios-props-emits/src/components/DepartmentForm.vue +98 -98
  67. package/templates/vue-axios-props-emits/src/components/DepartmentList.vue +92 -91
  68. package/templates/vue-axios-props-emits/src/components/EmployeeForm.vue +128 -128
  69. package/templates/vue-axios-props-emits/src/components/EmployeeList.vue +95 -94
  70. package/templates/vue-axios-router/src/App.vue +90 -90
  71. package/templates/vue-axios-router/src/views/AddEmployeeView.vue +247 -247
  72. package/templates/vue-axios-router/src/views/DepartmentView.vue +296 -273
  73. package/templates/vue-axios-router/src/views/EmployeeView.vue +219 -196
  74. package/templates/vue-axios-router/src/views/HomeDashboardView.vue +263 -263
  75. package/templates/vue-axios-router-children/src/views/DepartmentListView.vue +250 -231
  76. package/templates/vue-axios-router-children/src/views/EmployeeDetailView.vue +181 -159
  77. package/templates/vue-axios-router-children/src/views/EmployeeListView.vue +315 -295
  78. package/templates/vue-axios-router-pinia/src/stores/companyStore.js +137 -70
  79. package/templates/vue-axios-router-pinia/src/views/DepartmentView.vue +229 -209
  80. package/templates/vue-axios-router-pinia/src/views/EmployeeView.vue +257 -237
  81. package/templates/vue-axios-router-pinia-props/src/components/EntityTable.vue +106 -92
  82. package/templates/vue-axios-router-pinia-props/src/stores/companyStore.js +139 -84
  83. package/templates/vue-axios-router-pinia-props/src/views/ManageDepartmentsView.vue +73 -64
  84. package/templates/vue-axios-router-pinia-props/src/views/ManageEmployeesView.vue +76 -67
  85. package/templates/vue-axios-router-props/src/App.vue +59 -59
  86. package/templates/vue-axios-router-props/src/components/DataCard.vue +72 -53
  87. package/templates/vue-axios-router-props/src/views/DepartmentPage.vue +89 -77
  88. package/templates/vue-axios-router-props/src/views/EmployeePage.vue +128 -116
  89. package/templates/vue-fetch/src/App.vue +285 -259
  90. package/templates/vue-router-pinia-springboot/backend/src/main/java/com/example/crud/controller/ItemController.java +45 -41
  91. package/templates/vue-router-pinia-springboot/backend/src/main/java/com/example/crud/service/ItemService.java +45 -35
  92. package/templates/vue-router-pinia-springboot/frontend/src/services/ItemService.js +24 -21
  93. package/templates/vue-router-pinia-springboot/frontend/src/stores/itemStore.js +42 -37
  94. package/templates/vue-router-pinia-springboot/frontend/src/views/ListView.vue +76 -67
  95. package/templates/vue-springboot-mongo-aggregation/backend/src/main/java/com/example/aggregation/controller/ItemController.java +45 -41
  96. package/templates/vue-springboot-mongo-aggregation/backend/src/main/java/com/example/aggregation/service/ItemService.java +45 -35
  97. package/templates/vue-springboot-mongo-crud/backend/src/main/java/com/example/crud/controller/ItemController.java +45 -41
  98. package/templates/vue-springboot-mongo-crud/backend/src/main/java/com/example/crud/service/ItemService.java +45 -35
  99. package/templates/vue-springboot-mongo-crud/frontend/src/App.vue +158 -149
  100. package/templates/vue-springboot-mongo-crud/frontend/src/services/ItemService.js +24 -21
@@ -1,273 +1,296 @@
1
- <script setup>
2
- import { ref, reactive, onMounted } from 'vue'
3
- import api from '../services/api'
4
-
5
- const departments = ref([])
6
- const loading = ref(false)
7
- const errorMessage = ref('')
8
-
9
- const form = reactive({
10
- name: '',
11
- code: ''
12
- })
13
-
14
- async function fetchDepartments() {
15
- loading.value = true
16
- errorMessage.value = ''
17
- try {
18
- const res = await api.get('/departments')
19
- departments.value = res.data
20
- } catch (err) {
21
- errorMessage.value = err.message || 'Failed to fetch departments'
22
- } finally {
23
- loading.value = false
24
- }
25
- }
26
-
27
- async function handleAddDepartment() {
28
- if (!form.name.trim() || !form.code.trim()) return
29
- loading.value = true
30
- errorMessage.value = ''
31
- try {
32
- await api.post('/departments', {
33
- name: form.name.trim(),
34
- code: form.code.trim()
35
- })
36
- form.name = ''
37
- form.code = ''
38
- await fetchDepartments()
39
- } catch (err) {
40
- errorMessage.value = err.message || 'Failed to add department'
41
- } finally {
42
- loading.value = false
43
- }
44
- }
45
-
46
- async function handleDeleteDepartment(id) {
47
- if (!confirm('Are you sure you want to delete this department?')) return
48
- loading.value = true
49
- errorMessage.value = ''
50
- try {
51
- await api.delete(`/departments/${id}`)
52
- await fetchDepartments()
53
- } catch (err) {
54
- errorMessage.value = err.message || 'Failed to delete department'
55
- } finally {
56
- loading.value = false
57
- }
58
- }
59
-
60
- onMounted(() => {
61
- fetchDepartments()
62
- })
63
- </script>
64
-
65
- <template>
66
- <div class="department-view">
67
- <h2>Departments</h2>
68
-
69
- <div v-if="loading" class="state-msg">Loading...</div>
70
- <div v-if="errorMessage" class="state-msg error">{{ errorMessage }}</div>
71
-
72
- <div class="card">
73
- <h3>Add New Department</h3>
74
- <form @submit.prevent="handleAddDepartment" class="dept-form">
75
- <div class="form-group">
76
- <label for="dept-name">Department Name</label>
77
- <input
78
- id="dept-name"
79
- v-model="form.name"
80
- type="text"
81
- placeholder="e.g. Engineering"
82
- required
83
- />
84
- </div>
85
-
86
- <div class="form-group">
87
- <label for="dept-code">Department Code</label>
88
- <input
89
- id="dept-code"
90
- v-model="form.code"
91
- type="text"
92
- placeholder="e.g. ENG"
93
- required
94
- />
95
- </div>
96
-
97
- <button type="submit" class="btn primary" :disabled="loading">Add Department</button>
98
- </form>
99
- </div>
100
-
101
- <div class="card">
102
- <h3>Department List</h3>
103
- <table v-if="departments.length > 0" class="data-table">
104
- <thead>
105
- <tr>
106
- <th>ID</th>
107
- <th>Name</th>
108
- <th>Code</th>
109
- <th>Actions</th>
110
- </tr>
111
- </thead>
112
- <tbody>
113
- <tr v-for="dept in departments" :key="dept.id">
114
- <td>{{ dept.id }}</td>
115
- <td>{{ dept.name }}</td>
116
- <td><span class="badge">{{ dept.code }}</span></td>
117
- <td>
118
- <button
119
- @click="handleDeleteDepartment(dept.id)"
120
- class="btn danger"
121
- :disabled="loading"
122
- >
123
- Delete
124
- </button>
125
- </td>
126
- </tr>
127
- </tbody>
128
- </table>
129
- <p v-else class="empty-text">No departments found.</p>
130
- </div>
131
- </div>
132
- </template>
133
-
134
- <style scoped>
135
- .department-view {
136
- display: flex;
137
- flex-direction: column;
138
- gap: 20px;
139
- }
140
-
141
- h2 {
142
- margin: 0;
143
- color: #2c3e50;
144
- }
145
-
146
- .card {
147
- background: #ffffff;
148
- border: 1px solid #ddd;
149
- border-radius: 6px;
150
- padding: 18px;
151
- }
152
-
153
- .card h3 {
154
- margin: 0 0 14px 0;
155
- font-size: 16px;
156
- color: #2c3e50;
157
- }
158
-
159
- .dept-form {
160
- display: flex;
161
- flex-wrap: wrap;
162
- gap: 12px;
163
- align-items: flex-end;
164
- }
165
-
166
- .form-group {
167
- display: flex;
168
- flex-direction: column;
169
- gap: 4px;
170
- flex: 1;
171
- min-width: 180px;
172
- }
173
-
174
- label {
175
- font-size: 13px;
176
- font-weight: bold;
177
- color: #555;
178
- }
179
-
180
- input {
181
- padding: 8px 10px;
182
- border: 1px solid #ccc;
183
- border-radius: 4px;
184
- font-size: 14px;
185
- }
186
-
187
- input:focus {
188
- outline: none;
189
- border-color: #3498db;
190
- }
191
-
192
- .btn {
193
- padding: 8px 16px;
194
- border: none;
195
- border-radius: 4px;
196
- font-size: 14px;
197
- cursor: pointer;
198
- font-weight: bold;
199
- }
200
-
201
- .btn:disabled {
202
- opacity: 0.6;
203
- cursor: not-allowed;
204
- }
205
-
206
- .btn.primary {
207
- background: #27ae60;
208
- color: #fff;
209
- }
210
-
211
- .btn.primary:hover:not(:disabled) {
212
- background: #219150;
213
- }
214
-
215
- .btn.danger {
216
- background: #e74c3c;
217
- color: #fff;
218
- padding: 5px 10px;
219
- font-size: 12px;
220
- }
221
-
222
- .btn.danger:hover:not(:disabled) {
223
- background: #c0392b;
224
- }
225
-
226
- .data-table {
227
- width: 100%;
228
- border-collapse: collapse;
229
- margin-top: 10px;
230
- }
231
-
232
- .data-table th,
233
- .data-table td {
234
- padding: 10px 12px;
235
- text-align: left;
236
- border-bottom: 1px solid #eee;
237
- font-size: 14px;
238
- }
239
-
240
- .data-table th {
241
- background: #f8f9fa;
242
- color: #555;
243
- font-weight: 600;
244
- }
245
-
246
- .badge {
247
- background: #ecf0f1;
248
- color: #2c3e50;
249
- padding: 2px 6px;
250
- border-radius: 3px;
251
- font-size: 12px;
252
- font-family: monospace;
253
- }
254
-
255
- .state-msg {
256
- padding: 10px;
257
- background-color: #f8f9fa;
258
- border: 1px solid #ddd;
259
- border-radius: 4px;
260
- }
261
-
262
- .state-msg.error {
263
- background-color: #fde8e8;
264
- color: #c0392b;
265
- border-color: #f5c6cb;
266
- }
267
-
268
- .empty-text {
269
- color: #7f8c8d;
270
- font-size: 14px;
271
- margin: 10px 0 0 0;
272
- }
273
- </style>
1
+ <script setup>
2
+ import { ref, reactive, onMounted } from 'vue'
3
+ import api from '../services/api'
4
+
5
+ const departments = ref([])
6
+ const loading = ref(false)
7
+ const errorMessage = ref('')
8
+
9
+ const form = reactive({
10
+ name: '',
11
+ code: ''
12
+ })
13
+
14
+ async function fetchDepartments() {
15
+ loading.value = true
16
+ errorMessage.value = ''
17
+ try {
18
+ const res = await api.get('/departments')
19
+ departments.value = res.data
20
+ } catch (err) {
21
+ errorMessage.value = err.message || 'Failed to fetch departments'
22
+ } finally {
23
+ loading.value = false
24
+ }
25
+ }
26
+
27
+ async function handleAddDepartment() {
28
+ if (!form.name.trim() || !form.code.trim()) return
29
+ loading.value = true
30
+ errorMessage.value = ''
31
+ try {
32
+ await api.post('/departments', {
33
+ name: form.name.trim(),
34
+ code: form.code.trim()
35
+ })
36
+ form.name = ''
37
+ form.code = ''
38
+ await fetchDepartments()
39
+ } catch (err) {
40
+ errorMessage.value = err.message || 'Failed to add department'
41
+ } finally {
42
+ loading.value = false
43
+ }
44
+ }
45
+
46
+ async function handlePatchDepartment(id, currentCode) {
47
+ const code = prompt('Enter new department code:', currentCode)
48
+ if (!code || code === currentCode) return
49
+ loading.value = true
50
+ errorMessage.value = ''
51
+ try {
52
+ await api.patch(`/departments/${id}`, { code })
53
+ await fetchDepartments()
54
+ } catch (err) {
55
+ errorMessage.value = err.message || 'Failed to patch department'
56
+ } finally {
57
+ loading.value = false
58
+ }
59
+ }
60
+
61
+ async function handleDeleteDepartment(id) {
62
+ if (!confirm('Are you sure you want to delete this department?')) return
63
+ loading.value = true
64
+ errorMessage.value = ''
65
+ try {
66
+ await api.delete(`/departments/${id}`)
67
+ await fetchDepartments()
68
+ } catch (err) {
69
+ errorMessage.value = err.message || 'Failed to delete department'
70
+ } finally {
71
+ loading.value = false
72
+ }
73
+ }
74
+
75
+ onMounted(() => {
76
+ fetchDepartments()
77
+ })
78
+ </script>
79
+
80
+ <template>
81
+ <div class="department-view">
82
+ <h2>Departments</h2>
83
+
84
+ <div v-if="loading" class="state-msg">Loading...</div>
85
+ <div v-if="errorMessage" class="state-msg error">{{ errorMessage }}</div>
86
+
87
+ <div class="card">
88
+ <h3>Add New Department</h3>
89
+ <form @submit.prevent="handleAddDepartment" class="dept-form">
90
+ <div class="form-group">
91
+ <label for="dept-name">Department Name</label>
92
+ <input
93
+ id="dept-name"
94
+ v-model="form.name"
95
+ type="text"
96
+ placeholder="e.g. Engineering"
97
+ required
98
+ />
99
+ </div>
100
+
101
+ <div class="form-group">
102
+ <label for="dept-code">Department Code</label>
103
+ <input
104
+ id="dept-code"
105
+ v-model="form.code"
106
+ type="text"
107
+ placeholder="e.g. ENG"
108
+ required
109
+ />
110
+ </div>
111
+
112
+ <button type="submit" class="btn primary" :disabled="loading">Add Department</button>
113
+ </form>
114
+ </div>
115
+
116
+ <div class="card">
117
+ <h3>Department List</h3>
118
+ <table v-if="departments.length > 0" class="data-table">
119
+ <thead>
120
+ <tr>
121
+ <th>ID</th>
122
+ <th>Name</th>
123
+ <th>Code</th>
124
+ <th>Actions</th>
125
+ </tr>
126
+ </thead>
127
+ <tbody>
128
+ <tr v-for="dept in departments" :key="dept.id">
129
+ <td>{{ dept.id }}</td>
130
+ <td>{{ dept.name }}</td>
131
+ <td><span class="badge">{{ dept.code }}</span></td>
132
+ <td>
133
+ <button
134
+ @click="handlePatchDepartment(dept.id, dept.code)"
135
+ class="btn"
136
+ :disabled="loading"
137
+ >
138
+ Patch
139
+ </button>
140
+ &nbsp;
141
+ <button
142
+ @click="handleDeleteDepartment(dept.id)"
143
+ class="btn danger"
144
+ :disabled="loading"
145
+ >
146
+ Delete
147
+ </button>
148
+ </td>
149
+ </tr>
150
+ </tbody>
151
+ </table>
152
+ <p v-else class="empty-text">No departments found.</p>
153
+ </div>
154
+ </div>
155
+ </template>
156
+
157
+ <style scoped>
158
+ .department-view {
159
+ display: flex;
160
+ flex-direction: column;
161
+ gap: 20px;
162
+ }
163
+
164
+ h2 {
165
+ margin: 0;
166
+ color: #2c3e50;
167
+ }
168
+
169
+ .card {
170
+ background: #ffffff;
171
+ border: 1px solid #ddd;
172
+ border-radius: 6px;
173
+ padding: 18px;
174
+ }
175
+
176
+ .card h3 {
177
+ margin: 0 0 14px 0;
178
+ font-size: 16px;
179
+ color: #2c3e50;
180
+ }
181
+
182
+ .dept-form {
183
+ display: flex;
184
+ flex-wrap: wrap;
185
+ gap: 12px;
186
+ align-items: flex-end;
187
+ }
188
+
189
+ .form-group {
190
+ display: flex;
191
+ flex-direction: column;
192
+ gap: 4px;
193
+ flex: 1;
194
+ min-width: 180px;
195
+ }
196
+
197
+ label {
198
+ font-size: 13px;
199
+ font-weight: bold;
200
+ color: #555;
201
+ }
202
+
203
+ input {
204
+ padding: 8px 10px;
205
+ border: 1px solid #ccc;
206
+ border-radius: 4px;
207
+ font-size: 14px;
208
+ }
209
+
210
+ input:focus {
211
+ outline: none;
212
+ border-color: #3498db;
213
+ }
214
+
215
+ .btn {
216
+ padding: 8px 16px;
217
+ border: none;
218
+ border-radius: 4px;
219
+ font-size: 14px;
220
+ cursor: pointer;
221
+ font-weight: bold;
222
+ }
223
+
224
+ .btn:disabled {
225
+ opacity: 0.6;
226
+ cursor: not-allowed;
227
+ }
228
+
229
+ .btn.primary {
230
+ background: #27ae60;
231
+ color: #fff;
232
+ }
233
+
234
+ .btn.primary:hover:not(:disabled) {
235
+ background: #219150;
236
+ }
237
+
238
+ .btn.danger {
239
+ background: #e74c3c;
240
+ color: #fff;
241
+ padding: 5px 10px;
242
+ font-size: 12px;
243
+ }
244
+
245
+ .btn.danger:hover:not(:disabled) {
246
+ background: #c0392b;
247
+ }
248
+
249
+ .data-table {
250
+ width: 100%;
251
+ border-collapse: collapse;
252
+ margin-top: 10px;
253
+ }
254
+
255
+ .data-table th,
256
+ .data-table td {
257
+ padding: 10px 12px;
258
+ text-align: left;
259
+ border-bottom: 1px solid #eee;
260
+ font-size: 14px;
261
+ }
262
+
263
+ .data-table th {
264
+ background: #f8f9fa;
265
+ color: #555;
266
+ font-weight: 600;
267
+ }
268
+
269
+ .badge {
270
+ background: #ecf0f1;
271
+ color: #2c3e50;
272
+ padding: 2px 6px;
273
+ border-radius: 3px;
274
+ font-size: 12px;
275
+ font-family: monospace;
276
+ }
277
+
278
+ .state-msg {
279
+ padding: 10px;
280
+ background-color: #f8f9fa;
281
+ border: 1px solid #ddd;
282
+ border-radius: 4px;
283
+ }
284
+
285
+ .state-msg.error {
286
+ background-color: #fde8e8;
287
+ color: #c0392b;
288
+ border-color: #f5c6cb;
289
+ }
290
+
291
+ .empty-text {
292
+ color: #7f8c8d;
293
+ font-size: 14px;
294
+ margin: 10px 0 0 0;
295
+ }
296
+ </style>