wad-lab 1.1.2 → 1.1.4

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 (256) hide show
  1. package/bin/index.js +104 -25
  2. package/package.json +1 -1
  3. package/templates/fullstack-springboot-vue/backend/pom.xml +42 -0
  4. package/templates/fullstack-springboot-vue/backend/src/main/java/com/example/company/CompanyApplication.java +11 -0
  5. package/templates/fullstack-springboot-vue/backend/src/main/java/com/example/company/controller/CompanyController.java +74 -0
  6. package/templates/fullstack-springboot-vue/backend/src/main/java/com/example/company/model/Department.java +51 -0
  7. package/templates/fullstack-springboot-vue/backend/src/main/java/com/example/company/model/Employee.java +73 -0
  8. package/templates/fullstack-springboot-vue/backend/src/main/java/com/example/company/repository/DepartmentRepository.java +12 -0
  9. package/templates/fullstack-springboot-vue/backend/src/main/java/com/example/company/repository/EmployeeRepository.java +12 -0
  10. package/templates/fullstack-springboot-vue/backend/src/main/java/com/example/company/service/CompanyService.java +60 -0
  11. package/templates/fullstack-springboot-vue/backend/src/main/resources/application.properties +4 -0
  12. package/templates/fullstack-springboot-vue/frontend/vue-axios-basic/index.html +12 -0
  13. package/templates/{frontend → fullstack-springboot-vue/frontend/vue-axios-basic}/package.json +6 -9
  14. package/templates/fullstack-springboot-vue/frontend/vue-axios-basic/src/App.vue +405 -0
  15. package/templates/{frontend → fullstack-springboot-vue/frontend/vue-axios-basic}/src/main.js +0 -2
  16. package/templates/fullstack-springboot-vue/frontend/vue-axios-basic/src/services/api.js +7 -0
  17. package/templates/fullstack-springboot-vue/frontend/vue-axios-basic/vite.config.js +9 -0
  18. package/templates/{frontend → fullstack-springboot-vue/frontend/vue-axios-interceptor}/index.html +2 -3
  19. package/templates/fullstack-springboot-vue/frontend/vue-axios-interceptor/package.json +20 -0
  20. package/templates/fullstack-springboot-vue/frontend/vue-axios-interceptor/src/App.vue +159 -0
  21. package/templates/fullstack-springboot-vue/frontend/vue-axios-interceptor/src/components/ToastNotification.vue +47 -0
  22. package/templates/fullstack-springboot-vue/frontend/vue-axios-interceptor/src/main.js +7 -0
  23. package/templates/fullstack-springboot-vue/frontend/vue-axios-interceptor/src/services/api.js +32 -0
  24. package/templates/fullstack-springboot-vue/frontend/vue-axios-interceptor/src/stores/toastStore.js +23 -0
  25. package/templates/fullstack-springboot-vue/frontend/vue-axios-interceptor/vite.config.js +6 -0
  26. package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia/index.html +12 -0
  27. package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia/package.json +20 -0
  28. package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia/src/App.vue +427 -0
  29. package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia/src/main.js +5 -0
  30. package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia/src/services/api.js +7 -0
  31. package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia/src/stores/companyStore.js +96 -0
  32. package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia/vite.config.js +9 -0
  33. package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia-props/index.html +12 -0
  34. package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia-props/package.json +20 -0
  35. package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia-props/src/App.vue +69 -0
  36. package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia-props/src/components/DepartmentSection.vue +152 -0
  37. package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia-props/src/components/EmployeeSection.vue +181 -0
  38. package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia-props/src/main.js +5 -0
  39. package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia-props/src/services/api.js +7 -0
  40. package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia-props/src/stores/companyStore.js +35 -0
  41. package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia-props/vite.config.js +6 -0
  42. package/templates/fullstack-springboot-vue/frontend/vue-axios-props-emits/index.html +12 -0
  43. package/templates/fullstack-springboot-vue/frontend/vue-axios-props-emits/package.json +19 -0
  44. package/templates/fullstack-springboot-vue/frontend/vue-axios-props-emits/src/App.vue +167 -0
  45. package/templates/fullstack-springboot-vue/frontend/vue-axios-props-emits/src/components/DepartmentForm.vue +98 -0
  46. package/templates/fullstack-springboot-vue/frontend/vue-axios-props-emits/src/components/DepartmentList.vue +91 -0
  47. package/templates/fullstack-springboot-vue/frontend/vue-axios-props-emits/src/components/EmployeeForm.vue +128 -0
  48. package/templates/fullstack-springboot-vue/frontend/vue-axios-props-emits/src/components/EmployeeList.vue +94 -0
  49. package/templates/fullstack-springboot-vue/frontend/vue-axios-props-emits/src/main.js +4 -0
  50. package/templates/fullstack-springboot-vue/frontend/vue-axios-props-emits/src/services/api.js +7 -0
  51. package/templates/fullstack-springboot-vue/frontend/vue-axios-props-emits/vite.config.js +9 -0
  52. package/templates/fullstack-springboot-vue/frontend/vue-axios-router/index.html +12 -0
  53. package/templates/fullstack-springboot-vue/frontend/vue-axios-router/package.json +20 -0
  54. package/templates/fullstack-springboot-vue/frontend/vue-axios-router/src/App.vue +90 -0
  55. package/templates/fullstack-springboot-vue/frontend/vue-axios-router/src/main.js +5 -0
  56. package/templates/fullstack-springboot-vue/frontend/vue-axios-router/src/router/index.js +19 -0
  57. package/templates/fullstack-springboot-vue/frontend/vue-axios-router/src/services/api.js +7 -0
  58. package/templates/fullstack-springboot-vue/frontend/vue-axios-router/src/views/AddEmployeeView.vue +247 -0
  59. package/templates/fullstack-springboot-vue/frontend/vue-axios-router/src/views/DepartmentView.vue +273 -0
  60. package/templates/fullstack-springboot-vue/frontend/vue-axios-router/src/views/EmployeeView.vue +196 -0
  61. package/templates/fullstack-springboot-vue/frontend/vue-axios-router/src/views/HomeDashboardView.vue +263 -0
  62. package/templates/fullstack-springboot-vue/frontend/vue-axios-router/vite.config.js +6 -0
  63. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-children/index.html +12 -0
  64. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-children/package.json +20 -0
  65. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-children/src/App.vue +20 -0
  66. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-children/src/main.js +5 -0
  67. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-children/src/router/index.js +42 -0
  68. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-children/src/services/api.js +7 -0
  69. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-children/src/views/CompanyLayout.vue +75 -0
  70. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-children/src/views/CompanyOverview.vue +109 -0
  71. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-children/src/views/DepartmentListView.vue +231 -0
  72. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-children/src/views/EmployeeDetailView.vue +159 -0
  73. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-children/src/views/EmployeeListView.vue +295 -0
  74. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-children/vite.config.js +6 -0
  75. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia/index.html +12 -0
  76. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia/package.json +21 -0
  77. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia/src/App.vue +92 -0
  78. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia/src/main.js +9 -0
  79. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia/src/router/index.js +17 -0
  80. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia/src/services/api.js +7 -0
  81. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia/src/stores/companyStore.js +70 -0
  82. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia/src/views/DashboardView.vue +77 -0
  83. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia/src/views/DepartmentView.vue +209 -0
  84. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia/src/views/EmployeeView.vue +237 -0
  85. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia/vite.config.js +6 -0
  86. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/index.html +12 -0
  87. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/package.json +21 -0
  88. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/src/App.vue +67 -0
  89. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/src/components/EntityForm.vue +101 -0
  90. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/src/components/EntityTable.vue +92 -0
  91. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/src/components/SummaryBadge.vue +43 -0
  92. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/src/main.js +9 -0
  93. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/src/router/index.js +29 -0
  94. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/src/services/api.js +29 -0
  95. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/src/stores/companyStore.js +84 -0
  96. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/src/views/ManageDepartmentsView.vue +64 -0
  97. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/src/views/ManageEmployeesView.vue +67 -0
  98. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/src/views/OverviewView.vue +38 -0
  99. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/vite.config.js +6 -0
  100. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-props/index.html +12 -0
  101. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-props/package.json +20 -0
  102. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-props/src/App.vue +59 -0
  103. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-props/src/components/DataCard.vue +53 -0
  104. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-props/src/components/EntryForm.vue +117 -0
  105. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-props/src/main.js +7 -0
  106. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-props/src/router/index.js +23 -0
  107. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-props/src/services/api.js +7 -0
  108. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-props/src/views/DepartmentPage.vue +77 -0
  109. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-props/src/views/EmployeePage.vue +116 -0
  110. package/templates/fullstack-springboot-vue/frontend/vue-axios-router-props/vite.config.js +6 -0
  111. package/templates/springboot-2model-1controller-api/.mvn/wrapper/maven-wrapper.properties +3 -0
  112. package/templates/springboot-2model-1controller-api/mvnw +295 -0
  113. package/templates/springboot-2model-1controller-api/mvnw.cmd +189 -0
  114. package/templates/springboot-2model-1controller-api/pom.xml +42 -0
  115. package/templates/springboot-2model-1controller-api/src/main/java/com/example/company/CompanyApplication.java +11 -0
  116. package/templates/springboot-2model-1controller-api/src/main/java/com/example/company/controller/CompanyController.java +74 -0
  117. package/templates/springboot-2model-1controller-api/src/main/java/com/example/company/model/Department.java +51 -0
  118. package/templates/springboot-2model-1controller-api/src/main/java/com/example/company/model/Employee.java +73 -0
  119. package/templates/springboot-2model-1controller-api/src/main/java/com/example/company/repository/DepartmentRepository.java +12 -0
  120. package/templates/springboot-2model-1controller-api/src/main/java/com/example/company/repository/EmployeeRepository.java +12 -0
  121. package/templates/springboot-2model-1controller-api/src/main/java/com/example/company/service/CompanyService.java +60 -0
  122. package/templates/springboot-2model-1controller-api/src/main/resources/application.properties +4 -0
  123. package/templates/vue-axios-basic/index.html +12 -0
  124. package/templates/vue-axios-basic/package.json +19 -0
  125. package/templates/vue-axios-basic/src/App.vue +405 -0
  126. package/templates/vue-axios-basic/src/main.js +4 -0
  127. package/templates/vue-axios-basic/src/services/api.js +7 -0
  128. package/templates/vue-axios-basic/vite.config.js +9 -0
  129. package/templates/vue-axios-interceptor/index.html +12 -0
  130. package/templates/vue-axios-interceptor/package.json +20 -0
  131. package/templates/vue-axios-interceptor/src/App.vue +159 -0
  132. package/templates/vue-axios-interceptor/src/components/ToastNotification.vue +47 -0
  133. package/templates/vue-axios-interceptor/src/main.js +7 -0
  134. package/templates/vue-axios-interceptor/src/services/api.js +32 -0
  135. package/templates/vue-axios-interceptor/src/stores/toastStore.js +23 -0
  136. package/templates/vue-axios-interceptor/vite.config.js +6 -0
  137. package/templates/vue-axios-pinia/index.html +12 -0
  138. package/templates/vue-axios-pinia/package.json +20 -0
  139. package/templates/vue-axios-pinia/src/App.vue +427 -0
  140. package/templates/vue-axios-pinia/src/main.js +5 -0
  141. package/templates/vue-axios-pinia/src/services/api.js +7 -0
  142. package/templates/vue-axios-pinia/src/stores/companyStore.js +96 -0
  143. package/templates/vue-axios-pinia/vite.config.js +9 -0
  144. package/templates/vue-axios-pinia-props/index.html +12 -0
  145. package/templates/vue-axios-pinia-props/package.json +20 -0
  146. package/templates/vue-axios-pinia-props/src/App.vue +69 -0
  147. package/templates/vue-axios-pinia-props/src/components/DepartmentSection.vue +152 -0
  148. package/templates/vue-axios-pinia-props/src/components/EmployeeSection.vue +181 -0
  149. package/templates/vue-axios-pinia-props/src/main.js +5 -0
  150. package/templates/vue-axios-pinia-props/src/services/api.js +7 -0
  151. package/templates/vue-axios-pinia-props/src/stores/companyStore.js +35 -0
  152. package/templates/vue-axios-pinia-props/vite.config.js +6 -0
  153. package/templates/vue-axios-props-emits/index.html +12 -0
  154. package/templates/vue-axios-props-emits/package.json +19 -0
  155. package/templates/vue-axios-props-emits/src/App.vue +167 -0
  156. package/templates/vue-axios-props-emits/src/components/DepartmentForm.vue +98 -0
  157. package/templates/vue-axios-props-emits/src/components/DepartmentList.vue +91 -0
  158. package/templates/vue-axios-props-emits/src/components/EmployeeForm.vue +128 -0
  159. package/templates/vue-axios-props-emits/src/components/EmployeeList.vue +94 -0
  160. package/templates/vue-axios-props-emits/src/main.js +4 -0
  161. package/templates/vue-axios-props-emits/src/services/api.js +7 -0
  162. package/templates/vue-axios-props-emits/vite.config.js +9 -0
  163. package/templates/vue-axios-router/index.html +12 -0
  164. package/templates/vue-axios-router/package.json +20 -0
  165. package/templates/vue-axios-router/src/App.vue +90 -0
  166. package/templates/vue-axios-router/src/main.js +5 -0
  167. package/templates/vue-axios-router/src/router/index.js +19 -0
  168. package/templates/vue-axios-router/src/services/api.js +7 -0
  169. package/templates/vue-axios-router/src/views/AddEmployeeView.vue +247 -0
  170. package/templates/vue-axios-router/src/views/DepartmentView.vue +273 -0
  171. package/templates/vue-axios-router/src/views/EmployeeView.vue +196 -0
  172. package/templates/vue-axios-router/src/views/HomeDashboardView.vue +263 -0
  173. package/templates/vue-axios-router/vite.config.js +6 -0
  174. package/templates/vue-axios-router-children/index.html +12 -0
  175. package/templates/vue-axios-router-children/package.json +20 -0
  176. package/templates/vue-axios-router-children/src/App.vue +20 -0
  177. package/templates/vue-axios-router-children/src/main.js +5 -0
  178. package/templates/vue-axios-router-children/src/router/index.js +42 -0
  179. package/templates/vue-axios-router-children/src/services/api.js +7 -0
  180. package/templates/vue-axios-router-children/src/views/CompanyLayout.vue +75 -0
  181. package/templates/vue-axios-router-children/src/views/CompanyOverview.vue +109 -0
  182. package/templates/vue-axios-router-children/src/views/DepartmentListView.vue +231 -0
  183. package/templates/vue-axios-router-children/src/views/EmployeeDetailView.vue +159 -0
  184. package/templates/vue-axios-router-children/src/views/EmployeeListView.vue +295 -0
  185. package/templates/vue-axios-router-children/vite.config.js +6 -0
  186. package/templates/vue-axios-router-pinia/index.html +12 -0
  187. package/templates/vue-axios-router-pinia/package.json +21 -0
  188. package/templates/vue-axios-router-pinia/src/App.vue +92 -0
  189. package/templates/vue-axios-router-pinia/src/main.js +9 -0
  190. package/templates/vue-axios-router-pinia/src/router/index.js +17 -0
  191. package/templates/vue-axios-router-pinia/src/services/api.js +7 -0
  192. package/templates/vue-axios-router-pinia/src/stores/companyStore.js +70 -0
  193. package/templates/vue-axios-router-pinia/src/views/DashboardView.vue +77 -0
  194. package/templates/vue-axios-router-pinia/src/views/DepartmentView.vue +209 -0
  195. package/templates/vue-axios-router-pinia/src/views/EmployeeView.vue +237 -0
  196. package/templates/vue-axios-router-pinia/vite.config.js +6 -0
  197. package/templates/vue-axios-router-pinia-props/index.html +12 -0
  198. package/templates/vue-axios-router-pinia-props/package.json +21 -0
  199. package/templates/vue-axios-router-pinia-props/src/App.vue +67 -0
  200. package/templates/vue-axios-router-pinia-props/src/components/EntityForm.vue +101 -0
  201. package/templates/vue-axios-router-pinia-props/src/components/EntityTable.vue +92 -0
  202. package/templates/vue-axios-router-pinia-props/src/components/SummaryBadge.vue +43 -0
  203. package/templates/vue-axios-router-pinia-props/src/main.js +9 -0
  204. package/templates/vue-axios-router-pinia-props/src/router/index.js +29 -0
  205. package/templates/vue-axios-router-pinia-props/src/services/api.js +29 -0
  206. package/templates/vue-axios-router-pinia-props/src/stores/companyStore.js +84 -0
  207. package/templates/vue-axios-router-pinia-props/src/views/ManageDepartmentsView.vue +64 -0
  208. package/templates/vue-axios-router-pinia-props/src/views/ManageEmployeesView.vue +67 -0
  209. package/templates/vue-axios-router-pinia-props/src/views/OverviewView.vue +38 -0
  210. package/templates/vue-axios-router-pinia-props/vite.config.js +6 -0
  211. package/templates/vue-axios-router-props/index.html +12 -0
  212. package/templates/vue-axios-router-props/package.json +20 -0
  213. package/templates/vue-axios-router-props/src/App.vue +59 -0
  214. package/templates/vue-axios-router-props/src/components/DataCard.vue +53 -0
  215. package/templates/vue-axios-router-props/src/components/EntryForm.vue +117 -0
  216. package/templates/vue-axios-router-props/src/main.js +7 -0
  217. package/templates/vue-axios-router-props/src/router/index.js +23 -0
  218. package/templates/vue-axios-router-props/src/services/api.js +7 -0
  219. package/templates/vue-axios-router-props/src/views/DepartmentPage.vue +77 -0
  220. package/templates/vue-axios-router-props/src/views/EmployeePage.vue +116 -0
  221. package/templates/vue-axios-router-props/vite.config.js +6 -0
  222. package/templates/backend/.gitattributes +0 -2
  223. package/templates/backend/.idea/compiler.xml +0 -21
  224. package/templates/backend/.idea/encodings.xml +0 -6
  225. package/templates/backend/.idea/jarRepositories.xml +0 -20
  226. package/templates/backend/.idea/misc.xml +0 -12
  227. package/templates/backend/.idea/vcs.xml +0 -6
  228. package/templates/backend/pom.xml +0 -104
  229. package/templates/backend/src/main/java/com/example/crud/CrudApplication.java +0 -13
  230. package/templates/backend/src/main/java/com/example/crud/controller/ItemController.java +0 -42
  231. package/templates/backend/src/main/java/com/example/crud/model/Item.java +0 -20
  232. package/templates/backend/src/main/java/com/example/crud/repository/ItemRepository.java +0 -9
  233. package/templates/backend/src/main/java/com/example/crud/service/ItemService.java +0 -37
  234. package/templates/backend/src/main/resources/application.properties +0 -4
  235. package/templates/backend/src/test/java/com/example/crud/CrudApplicationTests.java +0 -13
  236. package/templates/frontend/.vscode/extensions.json +0 -3
  237. package/templates/frontend/README.md +0 -38
  238. package/templates/frontend/jsconfig.json +0 -8
  239. package/templates/frontend/public/favicon.ico +0 -0
  240. package/templates/frontend/src/App.vue +0 -50
  241. package/templates/frontend/src/assets/base.css +0 -86
  242. package/templates/frontend/src/assets/logo.svg +0 -1
  243. package/templates/frontend/src/assets/main.css +0 -35
  244. package/templates/frontend/src/components/HelloWorld.vue +0 -44
  245. package/templates/frontend/src/components/TheWelcome.vue +0 -95
  246. package/templates/frontend/src/components/WelcomeItem.vue +0 -87
  247. package/templates/frontend/src/components/icons/IconCommunity.vue +0 -7
  248. package/templates/frontend/src/components/icons/IconDocumentation.vue +0 -7
  249. package/templates/frontend/src/components/icons/IconEcosystem.vue +0 -7
  250. package/templates/frontend/src/components/icons/IconSupport.vue +0 -7
  251. package/templates/frontend/src/components/icons/IconTooling.vue +0 -19
  252. package/templates/frontend/src/services/ItemService.js +0 -21
  253. package/templates/frontend/vite.config.js +0 -18
  254. /package/templates/{backend → fullstack-springboot-vue/backend}/.mvn/wrapper/maven-wrapper.properties +0 -0
  255. /package/templates/{backend → fullstack-springboot-vue/backend}/mvnw +0 -0
  256. /package/templates/{backend → fullstack-springboot-vue/backend}/mvnw.cmd +0 -0
@@ -0,0 +1,247 @@
1
+ <script setup>
2
+ import { ref, reactive, onMounted } from 'vue'
3
+ import { useRouter } from 'vue-router'
4
+ import api from '../services/api'
5
+
6
+ const router = useRouter()
7
+ const departments = ref([])
8
+ const loading = ref(false)
9
+ const submitting = ref(false)
10
+ const errorMessage = ref('')
11
+
12
+ const form = reactive({
13
+ name: '',
14
+ email: '',
15
+ departmentId: '',
16
+ salary: ''
17
+ })
18
+
19
+ async function fetchDepartments() {
20
+ loading.value = true
21
+ try {
22
+ const res = await api.get('/departments')
23
+ departments.value = res.data
24
+ if (departments.value.length > 0) {
25
+ form.departmentId = departments.value[0].id
26
+ }
27
+ } catch (err) {
28
+ errorMessage.value = err.message || 'Failed to fetch departments'
29
+ } finally {
30
+ loading.value = false
31
+ }
32
+ }
33
+
34
+ async function handleAddEmployee() {
35
+ if (!form.name.trim() || !form.email.trim() || !form.salary) return
36
+ submitting.value = true
37
+ errorMessage.value = ''
38
+ try {
39
+ await api.post('/employees', {
40
+ name: form.name.trim(),
41
+ email: form.email.trim(),
42
+ departmentId: form.departmentId,
43
+ salary: Number(form.salary)
44
+ })
45
+ router.push('/employees')
46
+ } catch (err) {
47
+ errorMessage.value = err.message || 'Failed to add employee'
48
+ } finally {
49
+ submitting.value = false
50
+ }
51
+ }
52
+
53
+ function handleCancel() {
54
+ router.push('/employees')
55
+ }
56
+
57
+ onMounted(() => {
58
+ fetchDepartments()
59
+ })
60
+ </script>
61
+
62
+ <template>
63
+ <div class="add-employee-view">
64
+ <h2>Add Employee</h2>
65
+
66
+ <div v-if="loading" class="state-msg">Loading department list...</div>
67
+ <div v-if="errorMessage" class="state-msg error">{{ errorMessage }}</div>
68
+
69
+ <div class="card">
70
+ <form @submit.prevent="handleAddEmployee" class="emp-form">
71
+ <div class="form-group">
72
+ <label for="emp-name">Full Name</label>
73
+ <input
74
+ id="emp-name"
75
+ v-model="form.name"
76
+ type="text"
77
+ placeholder="John Doe"
78
+ required
79
+ />
80
+ </div>
81
+
82
+ <div class="form-group">
83
+ <label for="emp-email">Email Address</label>
84
+ <input
85
+ id="emp-email"
86
+ v-model="form.email"
87
+ type="email"
88
+ placeholder="john.doe@example.com"
89
+ required
90
+ />
91
+ </div>
92
+
93
+ <div class="form-group">
94
+ <label for="emp-dept">Department</label>
95
+ <select
96
+ v-if="departments.length > 0"
97
+ id="emp-dept"
98
+ v-model="form.departmentId"
99
+ required
100
+ >
101
+ <option
102
+ v-for="dept in departments"
103
+ :key="dept.id"
104
+ :value="dept.id"
105
+ >
106
+ {{ dept.name }} ({{ dept.code }})
107
+ </option>
108
+ </select>
109
+ <input
110
+ v-else
111
+ id="emp-dept"
112
+ v-model="form.departmentId"
113
+ type="text"
114
+ placeholder="Department ID / Code"
115
+ required
116
+ />
117
+ </div>
118
+
119
+ <div class="form-group">
120
+ <label for="emp-salary">Annual Salary ($)</label>
121
+ <input
122
+ id="emp-salary"
123
+ v-model="form.salary"
124
+ type="number"
125
+ min="0"
126
+ step="100"
127
+ placeholder="75000"
128
+ required
129
+ />
130
+ </div>
131
+
132
+ <div class="form-actions">
133
+ <button type="submit" class="btn primary" :disabled="submitting">
134
+ {{ submitting ? 'Saving...' : 'Save Employee' }}
135
+ </button>
136
+ <button type="button" class="btn secondary" @click="handleCancel">
137
+ Cancel
138
+ </button>
139
+ </div>
140
+ </form>
141
+ </div>
142
+ </div>
143
+ </template>
144
+
145
+ <style scoped>
146
+ .add-employee-view {
147
+ max-width: 600px;
148
+ display: flex;
149
+ flex-direction: column;
150
+ gap: 20px;
151
+ }
152
+
153
+ h2 {
154
+ margin: 0;
155
+ color: #2c3e50;
156
+ }
157
+
158
+ .card {
159
+ background: #ffffff;
160
+ border: 1px solid #ddd;
161
+ border-radius: 6px;
162
+ padding: 24px;
163
+ }
164
+
165
+ .emp-form {
166
+ display: flex;
167
+ flex-direction: column;
168
+ gap: 16px;
169
+ }
170
+
171
+ .form-group {
172
+ display: flex;
173
+ flex-direction: column;
174
+ gap: 6px;
175
+ }
176
+
177
+ label {
178
+ font-size: 13px;
179
+ font-weight: bold;
180
+ color: #555;
181
+ }
182
+
183
+ input,
184
+ select {
185
+ padding: 10px 12px;
186
+ border: 1px solid #ccc;
187
+ border-radius: 4px;
188
+ font-size: 14px;
189
+ }
190
+
191
+ input:focus,
192
+ select:focus {
193
+ outline: none;
194
+ border-color: #3498db;
195
+ }
196
+
197
+ .form-actions {
198
+ display: flex;
199
+ gap: 12px;
200
+ margin-top: 10px;
201
+ }
202
+
203
+ .btn {
204
+ padding: 10px 20px;
205
+ border: none;
206
+ border-radius: 4px;
207
+ font-size: 14px;
208
+ cursor: pointer;
209
+ font-weight: bold;
210
+ }
211
+
212
+ .btn:disabled {
213
+ opacity: 0.6;
214
+ cursor: not-allowed;
215
+ }
216
+
217
+ .btn.primary {
218
+ background: #27ae60;
219
+ color: #fff;
220
+ }
221
+
222
+ .btn.primary:hover:not(:disabled) {
223
+ background: #219150;
224
+ }
225
+
226
+ .btn.secondary {
227
+ background: #ecf0f1;
228
+ color: #2c3e50;
229
+ }
230
+
231
+ .btn.secondary:hover {
232
+ background: #bdc3c7;
233
+ }
234
+
235
+ .state-msg {
236
+ padding: 10px;
237
+ background-color: #f8f9fa;
238
+ border: 1px solid #ddd;
239
+ border-radius: 4px;
240
+ }
241
+
242
+ .state-msg.error {
243
+ background-color: #fde8e8;
244
+ color: #c0392b;
245
+ border-color: #f5c6cb;
246
+ }
247
+ </style>
@@ -0,0 +1,273 @@
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>
@@ -0,0 +1,196 @@
1
+ <script setup>
2
+ import { ref, onMounted } from 'vue'
3
+ import api from '../services/api'
4
+
5
+ const employees = ref([])
6
+ const departments = ref([])
7
+ const loading = ref(false)
8
+ const errorMessage = ref('')
9
+
10
+ async function fetchData() {
11
+ loading.value = true
12
+ errorMessage.value = ''
13
+ try {
14
+ const [empRes, deptRes] = await Promise.all([
15
+ api.get('/employees'),
16
+ api.get('/departments').catch(() => ({ data: [] }))
17
+ ])
18
+ employees.value = empRes.data
19
+ departments.value = deptRes.data
20
+ } catch (err) {
21
+ errorMessage.value = err.message || 'Failed to fetch employees'
22
+ } finally {
23
+ loading.value = false
24
+ }
25
+ }
26
+
27
+ function getDepartmentName(deptId) {
28
+ if (!deptId) return 'N/A'
29
+ const dept = departments.value.find(d => d.id === deptId)
30
+ return dept ? `${dept.name} (${dept.code})` : deptId
31
+ }
32
+
33
+ async function handleDeleteEmployee(id) {
34
+ if (!confirm('Are you sure you want to delete this employee?')) return
35
+ loading.value = true
36
+ errorMessage.value = ''
37
+ try {
38
+ await api.delete(`/employees/${id}`)
39
+ await fetchData()
40
+ } catch (err) {
41
+ errorMessage.value = err.message || 'Failed to delete employee'
42
+ } finally {
43
+ loading.value = false
44
+ }
45
+ }
46
+
47
+ onMounted(() => {
48
+ fetchData()
49
+ })
50
+ </script>
51
+
52
+ <template>
53
+ <div class="employee-view">
54
+ <div class="view-header">
55
+ <h2>Employees</h2>
56
+ <router-link to="/add-employee" class="btn primary">+ Add Employee</router-link>
57
+ </div>
58
+
59
+ <div v-if="loading" class="state-msg">Loading...</div>
60
+ <div v-if="errorMessage" class="state-msg error">{{ errorMessage }}</div>
61
+
62
+ <div class="card">
63
+ <table v-if="employees.length > 0" class="data-table">
64
+ <thead>
65
+ <tr>
66
+ <th>ID</th>
67
+ <th>Name</th>
68
+ <th>Email</th>
69
+ <th>Department</th>
70
+ <th>Salary</th>
71
+ <th>Actions</th>
72
+ </tr>
73
+ </thead>
74
+ <tbody>
75
+ <tr v-for="emp in employees" :key="emp.id">
76
+ <td>{{ emp.id }}</td>
77
+ <td><strong>{{ emp.name }}</strong></td>
78
+ <td>{{ emp.email }}</td>
79
+ <td>{{ getDepartmentName(emp.departmentId) }}</td>
80
+ <td>${{ Number(emp.salary || 0).toLocaleString() }}</td>
81
+ <td>
82
+ <button
83
+ @click="handleDeleteEmployee(emp.id)"
84
+ class="btn danger"
85
+ :disabled="loading"
86
+ >
87
+ Delete
88
+ </button>
89
+ </td>
90
+ </tr>
91
+ </tbody>
92
+ </table>
93
+ <p v-else class="empty-text">No employees found.</p>
94
+ </div>
95
+ </div>
96
+ </template>
97
+
98
+ <style scoped>
99
+ .employee-view {
100
+ display: flex;
101
+ flex-direction: column;
102
+ gap: 20px;
103
+ }
104
+
105
+ .view-header {
106
+ display: flex;
107
+ justify-content: space-between;
108
+ align-items: center;
109
+ }
110
+
111
+ h2 {
112
+ margin: 0;
113
+ color: #2c3e50;
114
+ }
115
+
116
+ .card {
117
+ background: #ffffff;
118
+ border: 1px solid #ddd;
119
+ border-radius: 6px;
120
+ padding: 18px;
121
+ }
122
+
123
+ .btn {
124
+ padding: 8px 16px;
125
+ border: none;
126
+ border-radius: 4px;
127
+ font-size: 14px;
128
+ text-decoration: none;
129
+ cursor: pointer;
130
+ font-weight: bold;
131
+ display: inline-block;
132
+ }
133
+
134
+ .btn:disabled {
135
+ opacity: 0.6;
136
+ cursor: not-allowed;
137
+ }
138
+
139
+ .btn.primary {
140
+ background: #27ae60;
141
+ color: #fff;
142
+ }
143
+
144
+ .btn.primary:hover:not(:disabled) {
145
+ background: #219150;
146
+ }
147
+
148
+ .btn.danger {
149
+ background: #e74c3c;
150
+ color: #fff;
151
+ padding: 5px 10px;
152
+ font-size: 12px;
153
+ }
154
+
155
+ .btn.danger:hover:not(:disabled) {
156
+ background: #c0392b;
157
+ }
158
+
159
+ .data-table {
160
+ width: 100%;
161
+ border-collapse: collapse;
162
+ }
163
+
164
+ .data-table th,
165
+ .data-table td {
166
+ padding: 10px 12px;
167
+ text-align: left;
168
+ border-bottom: 1px solid #eee;
169
+ font-size: 14px;
170
+ }
171
+
172
+ .data-table th {
173
+ background: #f8f9fa;
174
+ color: #555;
175
+ font-weight: 600;
176
+ }
177
+
178
+ .state-msg {
179
+ padding: 10px;
180
+ background-color: #f8f9fa;
181
+ border: 1px solid #ddd;
182
+ border-radius: 4px;
183
+ }
184
+
185
+ .state-msg.error {
186
+ background-color: #fde8e8;
187
+ color: #c0392b;
188
+ border-color: #f5c6cb;
189
+ }
190
+
191
+ .empty-text {
192
+ color: #7f8c8d;
193
+ font-size: 14px;
194
+ margin: 0;
195
+ }
196
+ </style>