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.
- package/bin/index.js +104 -25
- package/package.json +1 -1
- package/templates/fullstack-springboot-vue/backend/pom.xml +42 -0
- package/templates/fullstack-springboot-vue/backend/src/main/java/com/example/company/CompanyApplication.java +11 -0
- package/templates/fullstack-springboot-vue/backend/src/main/java/com/example/company/controller/CompanyController.java +74 -0
- package/templates/fullstack-springboot-vue/backend/src/main/java/com/example/company/model/Department.java +51 -0
- package/templates/fullstack-springboot-vue/backend/src/main/java/com/example/company/model/Employee.java +73 -0
- package/templates/fullstack-springboot-vue/backend/src/main/java/com/example/company/repository/DepartmentRepository.java +12 -0
- package/templates/fullstack-springboot-vue/backend/src/main/java/com/example/company/repository/EmployeeRepository.java +12 -0
- package/templates/fullstack-springboot-vue/backend/src/main/java/com/example/company/service/CompanyService.java +60 -0
- package/templates/fullstack-springboot-vue/backend/src/main/resources/application.properties +4 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-basic/index.html +12 -0
- package/templates/{frontend → fullstack-springboot-vue/frontend/vue-axios-basic}/package.json +6 -9
- package/templates/fullstack-springboot-vue/frontend/vue-axios-basic/src/App.vue +405 -0
- package/templates/{frontend → fullstack-springboot-vue/frontend/vue-axios-basic}/src/main.js +0 -2
- package/templates/fullstack-springboot-vue/frontend/vue-axios-basic/src/services/api.js +7 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-basic/vite.config.js +9 -0
- package/templates/{frontend → fullstack-springboot-vue/frontend/vue-axios-interceptor}/index.html +2 -3
- package/templates/fullstack-springboot-vue/frontend/vue-axios-interceptor/package.json +20 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-interceptor/src/App.vue +159 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-interceptor/src/components/ToastNotification.vue +47 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-interceptor/src/main.js +7 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-interceptor/src/services/api.js +32 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-interceptor/src/stores/toastStore.js +23 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-interceptor/vite.config.js +6 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia/index.html +12 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia/package.json +20 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia/src/App.vue +427 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia/src/main.js +5 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia/src/services/api.js +7 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia/src/stores/companyStore.js +96 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia/vite.config.js +9 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia-props/index.html +12 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia-props/package.json +20 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia-props/src/App.vue +69 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia-props/src/components/DepartmentSection.vue +152 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia-props/src/components/EmployeeSection.vue +181 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia-props/src/main.js +5 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia-props/src/services/api.js +7 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia-props/src/stores/companyStore.js +35 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia-props/vite.config.js +6 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-props-emits/index.html +12 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-props-emits/package.json +19 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-props-emits/src/App.vue +167 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-props-emits/src/components/DepartmentForm.vue +98 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-props-emits/src/components/DepartmentList.vue +91 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-props-emits/src/components/EmployeeForm.vue +128 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-props-emits/src/components/EmployeeList.vue +94 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-props-emits/src/main.js +4 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-props-emits/src/services/api.js +7 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-props-emits/vite.config.js +9 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router/index.html +12 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router/package.json +20 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router/src/App.vue +90 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router/src/main.js +5 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router/src/router/index.js +19 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router/src/services/api.js +7 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router/src/views/AddEmployeeView.vue +247 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router/src/views/DepartmentView.vue +273 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router/src/views/EmployeeView.vue +196 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router/src/views/HomeDashboardView.vue +263 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router/vite.config.js +6 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-children/index.html +12 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-children/package.json +20 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-children/src/App.vue +20 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-children/src/main.js +5 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-children/src/router/index.js +42 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-children/src/services/api.js +7 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-children/src/views/CompanyLayout.vue +75 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-children/src/views/CompanyOverview.vue +109 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-children/src/views/DepartmentListView.vue +231 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-children/src/views/EmployeeDetailView.vue +159 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-children/src/views/EmployeeListView.vue +295 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-children/vite.config.js +6 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia/index.html +12 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia/package.json +21 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia/src/App.vue +92 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia/src/main.js +9 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia/src/router/index.js +17 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia/src/services/api.js +7 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia/src/stores/companyStore.js +70 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia/src/views/DashboardView.vue +77 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia/src/views/DepartmentView.vue +209 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia/src/views/EmployeeView.vue +237 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia/vite.config.js +6 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/index.html +12 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/package.json +21 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/src/App.vue +67 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/src/components/EntityForm.vue +101 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/src/components/EntityTable.vue +92 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/src/components/SummaryBadge.vue +43 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/src/main.js +9 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/src/router/index.js +29 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/src/services/api.js +29 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/src/stores/companyStore.js +84 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/src/views/ManageDepartmentsView.vue +64 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/src/views/ManageEmployeesView.vue +67 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/src/views/OverviewView.vue +38 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia-props/vite.config.js +6 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-props/index.html +12 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-props/package.json +20 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-props/src/App.vue +59 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-props/src/components/DataCard.vue +53 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-props/src/components/EntryForm.vue +117 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-props/src/main.js +7 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-props/src/router/index.js +23 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-props/src/services/api.js +7 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-props/src/views/DepartmentPage.vue +77 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-props/src/views/EmployeePage.vue +116 -0
- package/templates/fullstack-springboot-vue/frontend/vue-axios-router-props/vite.config.js +6 -0
- package/templates/springboot-2model-1controller-api/.mvn/wrapper/maven-wrapper.properties +3 -0
- package/templates/springboot-2model-1controller-api/mvnw +295 -0
- package/templates/springboot-2model-1controller-api/mvnw.cmd +189 -0
- package/templates/springboot-2model-1controller-api/pom.xml +42 -0
- package/templates/springboot-2model-1controller-api/src/main/java/com/example/company/CompanyApplication.java +11 -0
- package/templates/springboot-2model-1controller-api/src/main/java/com/example/company/controller/CompanyController.java +74 -0
- package/templates/springboot-2model-1controller-api/src/main/java/com/example/company/model/Department.java +51 -0
- package/templates/springboot-2model-1controller-api/src/main/java/com/example/company/model/Employee.java +73 -0
- package/templates/springboot-2model-1controller-api/src/main/java/com/example/company/repository/DepartmentRepository.java +12 -0
- package/templates/springboot-2model-1controller-api/src/main/java/com/example/company/repository/EmployeeRepository.java +12 -0
- package/templates/springboot-2model-1controller-api/src/main/java/com/example/company/service/CompanyService.java +60 -0
- package/templates/springboot-2model-1controller-api/src/main/resources/application.properties +4 -0
- package/templates/vue-axios-basic/index.html +12 -0
- package/templates/vue-axios-basic/package.json +19 -0
- package/templates/vue-axios-basic/src/App.vue +405 -0
- package/templates/vue-axios-basic/src/main.js +4 -0
- package/templates/vue-axios-basic/src/services/api.js +7 -0
- package/templates/vue-axios-basic/vite.config.js +9 -0
- package/templates/vue-axios-interceptor/index.html +12 -0
- package/templates/vue-axios-interceptor/package.json +20 -0
- package/templates/vue-axios-interceptor/src/App.vue +159 -0
- package/templates/vue-axios-interceptor/src/components/ToastNotification.vue +47 -0
- package/templates/vue-axios-interceptor/src/main.js +7 -0
- package/templates/vue-axios-interceptor/src/services/api.js +32 -0
- package/templates/vue-axios-interceptor/src/stores/toastStore.js +23 -0
- package/templates/vue-axios-interceptor/vite.config.js +6 -0
- package/templates/vue-axios-pinia/index.html +12 -0
- package/templates/vue-axios-pinia/package.json +20 -0
- package/templates/vue-axios-pinia/src/App.vue +427 -0
- package/templates/vue-axios-pinia/src/main.js +5 -0
- package/templates/vue-axios-pinia/src/services/api.js +7 -0
- package/templates/vue-axios-pinia/src/stores/companyStore.js +96 -0
- package/templates/vue-axios-pinia/vite.config.js +9 -0
- package/templates/vue-axios-pinia-props/index.html +12 -0
- package/templates/vue-axios-pinia-props/package.json +20 -0
- package/templates/vue-axios-pinia-props/src/App.vue +69 -0
- package/templates/vue-axios-pinia-props/src/components/DepartmentSection.vue +152 -0
- package/templates/vue-axios-pinia-props/src/components/EmployeeSection.vue +181 -0
- package/templates/vue-axios-pinia-props/src/main.js +5 -0
- package/templates/vue-axios-pinia-props/src/services/api.js +7 -0
- package/templates/vue-axios-pinia-props/src/stores/companyStore.js +35 -0
- package/templates/vue-axios-pinia-props/vite.config.js +6 -0
- package/templates/vue-axios-props-emits/index.html +12 -0
- package/templates/vue-axios-props-emits/package.json +19 -0
- package/templates/vue-axios-props-emits/src/App.vue +167 -0
- package/templates/vue-axios-props-emits/src/components/DepartmentForm.vue +98 -0
- package/templates/vue-axios-props-emits/src/components/DepartmentList.vue +91 -0
- package/templates/vue-axios-props-emits/src/components/EmployeeForm.vue +128 -0
- package/templates/vue-axios-props-emits/src/components/EmployeeList.vue +94 -0
- package/templates/vue-axios-props-emits/src/main.js +4 -0
- package/templates/vue-axios-props-emits/src/services/api.js +7 -0
- package/templates/vue-axios-props-emits/vite.config.js +9 -0
- package/templates/vue-axios-router/index.html +12 -0
- package/templates/vue-axios-router/package.json +20 -0
- package/templates/vue-axios-router/src/App.vue +90 -0
- package/templates/vue-axios-router/src/main.js +5 -0
- package/templates/vue-axios-router/src/router/index.js +19 -0
- package/templates/vue-axios-router/src/services/api.js +7 -0
- package/templates/vue-axios-router/src/views/AddEmployeeView.vue +247 -0
- package/templates/vue-axios-router/src/views/DepartmentView.vue +273 -0
- package/templates/vue-axios-router/src/views/EmployeeView.vue +196 -0
- package/templates/vue-axios-router/src/views/HomeDashboardView.vue +263 -0
- package/templates/vue-axios-router/vite.config.js +6 -0
- package/templates/vue-axios-router-children/index.html +12 -0
- package/templates/vue-axios-router-children/package.json +20 -0
- package/templates/vue-axios-router-children/src/App.vue +20 -0
- package/templates/vue-axios-router-children/src/main.js +5 -0
- package/templates/vue-axios-router-children/src/router/index.js +42 -0
- package/templates/vue-axios-router-children/src/services/api.js +7 -0
- package/templates/vue-axios-router-children/src/views/CompanyLayout.vue +75 -0
- package/templates/vue-axios-router-children/src/views/CompanyOverview.vue +109 -0
- package/templates/vue-axios-router-children/src/views/DepartmentListView.vue +231 -0
- package/templates/vue-axios-router-children/src/views/EmployeeDetailView.vue +159 -0
- package/templates/vue-axios-router-children/src/views/EmployeeListView.vue +295 -0
- package/templates/vue-axios-router-children/vite.config.js +6 -0
- package/templates/vue-axios-router-pinia/index.html +12 -0
- package/templates/vue-axios-router-pinia/package.json +21 -0
- package/templates/vue-axios-router-pinia/src/App.vue +92 -0
- package/templates/vue-axios-router-pinia/src/main.js +9 -0
- package/templates/vue-axios-router-pinia/src/router/index.js +17 -0
- package/templates/vue-axios-router-pinia/src/services/api.js +7 -0
- package/templates/vue-axios-router-pinia/src/stores/companyStore.js +70 -0
- package/templates/vue-axios-router-pinia/src/views/DashboardView.vue +77 -0
- package/templates/vue-axios-router-pinia/src/views/DepartmentView.vue +209 -0
- package/templates/vue-axios-router-pinia/src/views/EmployeeView.vue +237 -0
- package/templates/vue-axios-router-pinia/vite.config.js +6 -0
- package/templates/vue-axios-router-pinia-props/index.html +12 -0
- package/templates/vue-axios-router-pinia-props/package.json +21 -0
- package/templates/vue-axios-router-pinia-props/src/App.vue +67 -0
- package/templates/vue-axios-router-pinia-props/src/components/EntityForm.vue +101 -0
- package/templates/vue-axios-router-pinia-props/src/components/EntityTable.vue +92 -0
- package/templates/vue-axios-router-pinia-props/src/components/SummaryBadge.vue +43 -0
- package/templates/vue-axios-router-pinia-props/src/main.js +9 -0
- package/templates/vue-axios-router-pinia-props/src/router/index.js +29 -0
- package/templates/vue-axios-router-pinia-props/src/services/api.js +29 -0
- package/templates/vue-axios-router-pinia-props/src/stores/companyStore.js +84 -0
- package/templates/vue-axios-router-pinia-props/src/views/ManageDepartmentsView.vue +64 -0
- package/templates/vue-axios-router-pinia-props/src/views/ManageEmployeesView.vue +67 -0
- package/templates/vue-axios-router-pinia-props/src/views/OverviewView.vue +38 -0
- package/templates/vue-axios-router-pinia-props/vite.config.js +6 -0
- package/templates/vue-axios-router-props/index.html +12 -0
- package/templates/vue-axios-router-props/package.json +20 -0
- package/templates/vue-axios-router-props/src/App.vue +59 -0
- package/templates/vue-axios-router-props/src/components/DataCard.vue +53 -0
- package/templates/vue-axios-router-props/src/components/EntryForm.vue +117 -0
- package/templates/vue-axios-router-props/src/main.js +7 -0
- package/templates/vue-axios-router-props/src/router/index.js +23 -0
- package/templates/vue-axios-router-props/src/services/api.js +7 -0
- package/templates/vue-axios-router-props/src/views/DepartmentPage.vue +77 -0
- package/templates/vue-axios-router-props/src/views/EmployeePage.vue +116 -0
- package/templates/vue-axios-router-props/vite.config.js +6 -0
- package/templates/backend/.gitattributes +0 -2
- package/templates/backend/.idea/compiler.xml +0 -21
- package/templates/backend/.idea/encodings.xml +0 -6
- package/templates/backend/.idea/jarRepositories.xml +0 -20
- package/templates/backend/.idea/misc.xml +0 -12
- package/templates/backend/.idea/vcs.xml +0 -6
- package/templates/backend/pom.xml +0 -104
- package/templates/backend/src/main/java/com/example/crud/CrudApplication.java +0 -13
- package/templates/backend/src/main/java/com/example/crud/controller/ItemController.java +0 -42
- package/templates/backend/src/main/java/com/example/crud/model/Item.java +0 -20
- package/templates/backend/src/main/java/com/example/crud/repository/ItemRepository.java +0 -9
- package/templates/backend/src/main/java/com/example/crud/service/ItemService.java +0 -37
- package/templates/backend/src/main/resources/application.properties +0 -4
- package/templates/backend/src/test/java/com/example/crud/CrudApplicationTests.java +0 -13
- package/templates/frontend/.vscode/extensions.json +0 -3
- package/templates/frontend/README.md +0 -38
- package/templates/frontend/jsconfig.json +0 -8
- package/templates/frontend/public/favicon.ico +0 -0
- package/templates/frontend/src/App.vue +0 -50
- package/templates/frontend/src/assets/base.css +0 -86
- package/templates/frontend/src/assets/logo.svg +0 -1
- package/templates/frontend/src/assets/main.css +0 -35
- package/templates/frontend/src/components/HelloWorld.vue +0 -44
- package/templates/frontend/src/components/TheWelcome.vue +0 -95
- package/templates/frontend/src/components/WelcomeItem.vue +0 -87
- package/templates/frontend/src/components/icons/IconCommunity.vue +0 -7
- package/templates/frontend/src/components/icons/IconDocumentation.vue +0 -7
- package/templates/frontend/src/components/icons/IconEcosystem.vue +0 -7
- package/templates/frontend/src/components/icons/IconSupport.vue +0 -7
- package/templates/frontend/src/components/icons/IconTooling.vue +0 -19
- package/templates/frontend/src/services/ItemService.js +0 -21
- package/templates/frontend/vite.config.js +0 -18
- /package/templates/{backend → fullstack-springboot-vue/backend}/.mvn/wrapper/maven-wrapper.properties +0 -0
- /package/templates/{backend → fullstack-springboot-vue/backend}/mvnw +0 -0
- /package/templates/{backend → fullstack-springboot-vue/backend}/mvnw.cmd +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "vue-axios-router-pinia",
|
|
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
|
+
"axios": "^1.7.7",
|
|
13
|
+
"pinia": "^4.1.0",
|
|
14
|
+
"vue": "^3.5.44",
|
|
15
|
+
"vue-router": "^5.4.0"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@vitejs/plugin-vue": "^6.0.10",
|
|
19
|
+
"vite": "^8.3.4"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="app-container">
|
|
3
|
+
<header class="app-header">
|
|
4
|
+
<div class="header-inner">
|
|
5
|
+
<h1 class="logo">Company Admin</h1>
|
|
6
|
+
<nav class="nav">
|
|
7
|
+
<router-link to="/" class="nav-link">Dashboard</router-link>
|
|
8
|
+
<router-link to="/departments" class="nav-link">Departments</router-link>
|
|
9
|
+
<router-link to="/employees" class="nav-link">Employees</router-link>
|
|
10
|
+
</nav>
|
|
11
|
+
</div>
|
|
12
|
+
</header>
|
|
13
|
+
|
|
14
|
+
<main class="main-content">
|
|
15
|
+
<router-view />
|
|
16
|
+
</main>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script setup>
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<style>
|
|
24
|
+
* {
|
|
25
|
+
box-sizing: border-box;
|
|
26
|
+
margin: 0;
|
|
27
|
+
padding: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
body {
|
|
31
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
32
|
+
background-color: #f4f5f7;
|
|
33
|
+
color: #333333;
|
|
34
|
+
line-height: 1.5;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.app-container {
|
|
38
|
+
min-height: 100vh;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.app-header {
|
|
42
|
+
background-color: #ffffff;
|
|
43
|
+
border-bottom: 1px solid #e1e4e8;
|
|
44
|
+
padding: 0 16px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.header-inner {
|
|
48
|
+
max-width: 1200px;
|
|
49
|
+
margin: 0 auto;
|
|
50
|
+
display: flex;
|
|
51
|
+
justify-content: space-between;
|
|
52
|
+
align-items: center;
|
|
53
|
+
height: 60px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.logo {
|
|
57
|
+
font-size: 18px;
|
|
58
|
+
font-weight: 700;
|
|
59
|
+
color: #1a1a1a;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.nav {
|
|
63
|
+
display: flex;
|
|
64
|
+
gap: 16px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.nav-link {
|
|
68
|
+
text-decoration: none;
|
|
69
|
+
color: #555555;
|
|
70
|
+
font-weight: 600;
|
|
71
|
+
font-size: 14px;
|
|
72
|
+
padding: 6px 10px;
|
|
73
|
+
border-radius: 4px;
|
|
74
|
+
transition: all 0.2s ease;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.nav-link:hover {
|
|
78
|
+
color: #0066cc;
|
|
79
|
+
background-color: #f0f4f8;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.nav-link.router-link-exact-active {
|
|
83
|
+
color: #0066cc;
|
|
84
|
+
background-color: #e6f0fa;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.main-content {
|
|
88
|
+
max-width: 1200px;
|
|
89
|
+
margin: 0 auto;
|
|
90
|
+
padding: 24px 16px;
|
|
91
|
+
}
|
|
92
|
+
</style>
|
package/templates/fullstack-springboot-vue/frontend/vue-axios-router-pinia/src/router/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createRouter, createWebHistory } from 'vue-router'
|
|
2
|
+
import DashboardView from '../views/DashboardView.vue'
|
|
3
|
+
import DepartmentView from '../views/DepartmentView.vue'
|
|
4
|
+
import EmployeeView from '../views/EmployeeView.vue'
|
|
5
|
+
|
|
6
|
+
const routes = [
|
|
7
|
+
{ path: '/', name: 'Dashboard', component: DashboardView },
|
|
8
|
+
{ path: '/departments', name: 'Departments', component: DepartmentView },
|
|
9
|
+
{ path: '/employees', name: 'Employees', component: EmployeeView }
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
const router = createRouter({
|
|
13
|
+
history: createWebHistory(),
|
|
14
|
+
routes
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
export default router
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { defineStore } from 'pinia'
|
|
2
|
+
import api from '../services/api'
|
|
3
|
+
|
|
4
|
+
export const useCompanyStore = defineStore('company', {
|
|
5
|
+
state: () => ({
|
|
6
|
+
departments: [],
|
|
7
|
+
employees: []
|
|
8
|
+
}),
|
|
9
|
+
getters: {
|
|
10
|
+
totalDepts: (state) => state.departments.length,
|
|
11
|
+
totalEmployees: (state) => state.employees.length,
|
|
12
|
+
getDepartmentName: (state) => (deptId) => {
|
|
13
|
+
const dept = state.departments.find((d) => d.id === deptId)
|
|
14
|
+
return dept ? dept.name : `Dept #${deptId}`
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
actions: {
|
|
18
|
+
async fetchDepartments() {
|
|
19
|
+
try {
|
|
20
|
+
const response = await api.get('/departments')
|
|
21
|
+
this.departments = response.data
|
|
22
|
+
} catch (error) {
|
|
23
|
+
console.error(error)
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
async addDepartment(dept) {
|
|
27
|
+
try {
|
|
28
|
+
const response = await api.post('/departments', dept)
|
|
29
|
+
await this.fetchDepartments()
|
|
30
|
+
return response.data
|
|
31
|
+
} catch (error) {
|
|
32
|
+
console.error(error)
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
async deleteDepartment(id) {
|
|
36
|
+
try {
|
|
37
|
+
await api.delete(`/departments/${id}`)
|
|
38
|
+
await this.fetchDepartments()
|
|
39
|
+
await this.fetchEmployees()
|
|
40
|
+
} catch (error) {
|
|
41
|
+
console.error(error)
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
async fetchEmployees() {
|
|
45
|
+
try {
|
|
46
|
+
const response = await api.get('/employees')
|
|
47
|
+
this.employees = response.data
|
|
48
|
+
} catch (error) {
|
|
49
|
+
console.error(error)
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
async addEmployee(emp) {
|
|
53
|
+
try {
|
|
54
|
+
const response = await api.post('/employees', emp)
|
|
55
|
+
await this.fetchEmployees()
|
|
56
|
+
return response.data
|
|
57
|
+
} catch (error) {
|
|
58
|
+
console.error(error)
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
async deleteEmployee(id) {
|
|
62
|
+
try {
|
|
63
|
+
await api.delete(`/employees/${id}`)
|
|
64
|
+
await this.fetchEmployees()
|
|
65
|
+
} catch (error) {
|
|
66
|
+
console.error(error)
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
})
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="dashboard-view">
|
|
3
|
+
<h2>Dashboard</h2>
|
|
4
|
+
<div class="stats-grid">
|
|
5
|
+
<div class="stat-card">
|
|
6
|
+
<h3>Total Departments</h3>
|
|
7
|
+
<p class="stat-number">{{ companyStore.totalDepts }}</p>
|
|
8
|
+
<router-link to="/departments" class="stat-link">Manage Departments</router-link>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="stat-card">
|
|
11
|
+
<h3>Total Employees</h3>
|
|
12
|
+
<p class="stat-number">{{ companyStore.totalEmployees }}</p>
|
|
13
|
+
<router-link to="/employees" class="stat-link">Manage Employees</router-link>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script setup>
|
|
20
|
+
import { onMounted } from 'vue'
|
|
21
|
+
import { useCompanyStore } from '../stores/companyStore'
|
|
22
|
+
|
|
23
|
+
const companyStore = useCompanyStore()
|
|
24
|
+
|
|
25
|
+
onMounted(() => {
|
|
26
|
+
companyStore.fetchDepartments()
|
|
27
|
+
companyStore.fetchEmployees()
|
|
28
|
+
})
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<style scoped>
|
|
32
|
+
.dashboard-view h2 {
|
|
33
|
+
font-size: 22px;
|
|
34
|
+
margin-bottom: 20px;
|
|
35
|
+
color: #1a1a1a;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.stats-grid {
|
|
39
|
+
display: grid;
|
|
40
|
+
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
|
41
|
+
gap: 20px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.stat-card {
|
|
45
|
+
background: #ffffff;
|
|
46
|
+
border: 1px solid #e1e4e8;
|
|
47
|
+
border-radius: 8px;
|
|
48
|
+
padding: 24px;
|
|
49
|
+
text-align: center;
|
|
50
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.stat-card h3 {
|
|
54
|
+
font-size: 16px;
|
|
55
|
+
color: #555555;
|
|
56
|
+
margin-bottom: 12px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.stat-number {
|
|
60
|
+
font-size: 40px;
|
|
61
|
+
font-weight: bold;
|
|
62
|
+
color: #0066cc;
|
|
63
|
+
margin-bottom: 16px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.stat-link {
|
|
67
|
+
display: inline-block;
|
|
68
|
+
color: #0066cc;
|
|
69
|
+
text-decoration: none;
|
|
70
|
+
font-weight: 600;
|
|
71
|
+
font-size: 14px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.stat-link:hover {
|
|
75
|
+
text-decoration: underline;
|
|
76
|
+
}
|
|
77
|
+
</style>
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="department-view">
|
|
3
|
+
<h2>Departments Management</h2>
|
|
4
|
+
|
|
5
|
+
<section class="card">
|
|
6
|
+
<h3>Add Department</h3>
|
|
7
|
+
<form @submit.prevent="handleSubmit" class="form">
|
|
8
|
+
<div class="form-group">
|
|
9
|
+
<label for="dept-name">Department Name</label>
|
|
10
|
+
<input
|
|
11
|
+
id="dept-name"
|
|
12
|
+
v-model="form.name"
|
|
13
|
+
type="text"
|
|
14
|
+
required
|
|
15
|
+
placeholder="e.g. Engineering"
|
|
16
|
+
/>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="form-group">
|
|
19
|
+
<label for="dept-code">Department Code</label>
|
|
20
|
+
<input
|
|
21
|
+
id="dept-code"
|
|
22
|
+
v-model="form.code"
|
|
23
|
+
type="text"
|
|
24
|
+
required
|
|
25
|
+
placeholder="e.g. ENG"
|
|
26
|
+
/>
|
|
27
|
+
</div>
|
|
28
|
+
<button type="submit" class="btn btn-primary">Add Department</button>
|
|
29
|
+
</form>
|
|
30
|
+
</section>
|
|
31
|
+
|
|
32
|
+
<section class="card table-card">
|
|
33
|
+
<h3>Department List</h3>
|
|
34
|
+
<div class="table-wrapper">
|
|
35
|
+
<table>
|
|
36
|
+
<thead>
|
|
37
|
+
<tr>
|
|
38
|
+
<th>ID</th>
|
|
39
|
+
<th>Name</th>
|
|
40
|
+
<th>Code</th>
|
|
41
|
+
<th>Action</th>
|
|
42
|
+
</tr>
|
|
43
|
+
</thead>
|
|
44
|
+
<tbody>
|
|
45
|
+
<tr v-if="companyStore.departments.length === 0">
|
|
46
|
+
<td colspan="4" class="empty">No departments found</td>
|
|
47
|
+
</tr>
|
|
48
|
+
<tr v-for="dept in companyStore.departments" :key="dept.id">
|
|
49
|
+
<td>{{ dept.id }}</td>
|
|
50
|
+
<td>{{ dept.name }}</td>
|
|
51
|
+
<td><code>{{ dept.code }}</code></td>
|
|
52
|
+
<td>
|
|
53
|
+
<button @click="handleDelete(dept.id)" class="btn btn-danger">Delete</button>
|
|
54
|
+
</td>
|
|
55
|
+
</tr>
|
|
56
|
+
</tbody>
|
|
57
|
+
</table>
|
|
58
|
+
</div>
|
|
59
|
+
</section>
|
|
60
|
+
</div>
|
|
61
|
+
</template>
|
|
62
|
+
|
|
63
|
+
<script setup>
|
|
64
|
+
import { reactive, onMounted } from 'vue'
|
|
65
|
+
import { useCompanyStore } from '../stores/companyStore'
|
|
66
|
+
|
|
67
|
+
const companyStore = useCompanyStore()
|
|
68
|
+
|
|
69
|
+
const form = reactive({
|
|
70
|
+
name: '',
|
|
71
|
+
code: ''
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
const handleSubmit = async () => {
|
|
75
|
+
await companyStore.addDepartment({
|
|
76
|
+
name: form.name,
|
|
77
|
+
code: form.code
|
|
78
|
+
})
|
|
79
|
+
form.name = ''
|
|
80
|
+
form.code = ''
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const handleDelete = async (id) => {
|
|
84
|
+
await companyStore.deleteDepartment(id)
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
onMounted(() => {
|
|
88
|
+
companyStore.fetchDepartments()
|
|
89
|
+
})
|
|
90
|
+
</script>
|
|
91
|
+
|
|
92
|
+
<style scoped>
|
|
93
|
+
.department-view h2 {
|
|
94
|
+
font-size: 22px;
|
|
95
|
+
margin-bottom: 20px;
|
|
96
|
+
color: #1a1a1a;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.card {
|
|
100
|
+
background: #ffffff;
|
|
101
|
+
border: 1px solid #e1e4e8;
|
|
102
|
+
border-radius: 8px;
|
|
103
|
+
padding: 20px;
|
|
104
|
+
margin-bottom: 24px;
|
|
105
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.card h3 {
|
|
109
|
+
font-size: 16px;
|
|
110
|
+
margin-bottom: 16px;
|
|
111
|
+
color: #333333;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.form {
|
|
115
|
+
display: flex;
|
|
116
|
+
flex-direction: column;
|
|
117
|
+
gap: 12px;
|
|
118
|
+
max-width: 400px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.form-group {
|
|
122
|
+
display: flex;
|
|
123
|
+
flex-direction: column;
|
|
124
|
+
gap: 4px;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.form-group label {
|
|
128
|
+
font-size: 13px;
|
|
129
|
+
font-weight: 600;
|
|
130
|
+
color: #444444;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.form-group input {
|
|
134
|
+
padding: 8px 10px;
|
|
135
|
+
border: 1px solid #cccccc;
|
|
136
|
+
border-radius: 4px;
|
|
137
|
+
font-size: 14px;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.form-group input:focus {
|
|
141
|
+
outline: none;
|
|
142
|
+
border-color: #0066cc;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.btn {
|
|
146
|
+
padding: 8px 14px;
|
|
147
|
+
border: none;
|
|
148
|
+
border-radius: 4px;
|
|
149
|
+
cursor: pointer;
|
|
150
|
+
font-size: 13px;
|
|
151
|
+
font-weight: 600;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.btn-primary {
|
|
155
|
+
background-color: #0066cc;
|
|
156
|
+
color: #ffffff;
|
|
157
|
+
align-self: flex-start;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.btn-primary:hover {
|
|
161
|
+
background-color: #0052a3;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.btn-danger {
|
|
165
|
+
background-color: #d9383a;
|
|
166
|
+
color: #ffffff;
|
|
167
|
+
padding: 4px 8px;
|
|
168
|
+
font-size: 12px;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.btn-danger:hover {
|
|
172
|
+
background-color: #b8282a;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.table-wrapper {
|
|
176
|
+
overflow-x: auto;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
table {
|
|
180
|
+
width: 100%;
|
|
181
|
+
border-collapse: collapse;
|
|
182
|
+
font-size: 13px;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
th, td {
|
|
186
|
+
text-align: left;
|
|
187
|
+
padding: 8px 10px;
|
|
188
|
+
border-bottom: 1px solid #eeeeee;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
th {
|
|
192
|
+
background-color: #fafbfc;
|
|
193
|
+
color: #555555;
|
|
194
|
+
font-weight: 600;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
code {
|
|
198
|
+
background: #f0f0f0;
|
|
199
|
+
padding: 2px 4px;
|
|
200
|
+
border-radius: 3px;
|
|
201
|
+
font-size: 12px;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.empty {
|
|
205
|
+
text-align: center;
|
|
206
|
+
color: #888888;
|
|
207
|
+
padding: 16px;
|
|
208
|
+
}
|
|
209
|
+
</style>
|