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,69 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { onMounted } from 'vue'
|
|
3
|
+
import { useCompanyStore } from './stores/companyStore'
|
|
4
|
+
import DepartmentSection from './components/DepartmentSection.vue'
|
|
5
|
+
import EmployeeSection from './components/EmployeeSection.vue'
|
|
6
|
+
|
|
7
|
+
const store = useCompanyStore()
|
|
8
|
+
|
|
9
|
+
onMounted(() => {
|
|
10
|
+
store.fetchDepartments()
|
|
11
|
+
store.fetchEmployees()
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
function handleCreateDepartment(department) {
|
|
15
|
+
store.createDepartment(department)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function handleDeleteDepartment(id) {
|
|
19
|
+
store.deleteDepartment(id)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function handleCreateEmployee(employee) {
|
|
23
|
+
store.createEmployee(employee)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function handleDeleteEmployee(id) {
|
|
27
|
+
store.deleteEmployee(id)
|
|
28
|
+
}
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<template>
|
|
32
|
+
<main class="app-container">
|
|
33
|
+
<header class="app-header">
|
|
34
|
+
<h1>Company Management System</h1>
|
|
35
|
+
</header>
|
|
36
|
+
<DepartmentSection
|
|
37
|
+
:departments="store.departments"
|
|
38
|
+
@create="handleCreateDepartment"
|
|
39
|
+
@delete="handleDeleteDepartment"
|
|
40
|
+
/>
|
|
41
|
+
<EmployeeSection
|
|
42
|
+
:employees="store.employees"
|
|
43
|
+
:departments="store.departments"
|
|
44
|
+
@create="handleCreateEmployee"
|
|
45
|
+
@delete="handleDeleteEmployee"
|
|
46
|
+
/>
|
|
47
|
+
</main>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<style scoped>
|
|
51
|
+
.app-container {
|
|
52
|
+
max-width: 960px;
|
|
53
|
+
margin: 0 auto;
|
|
54
|
+
padding: 24px 16px;
|
|
55
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
56
|
+
color: #333;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.app-header {
|
|
60
|
+
margin-bottom: 24px;
|
|
61
|
+
border-bottom: 2px solid #eee;
|
|
62
|
+
padding-bottom: 12px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.app-header h1 {
|
|
66
|
+
margin: 0;
|
|
67
|
+
font-size: 24px;
|
|
68
|
+
}
|
|
69
|
+
</style>
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
|
|
4
|
+
const props = defineProps(['departments'])
|
|
5
|
+
const emit = defineEmits(['create', 'delete'])
|
|
6
|
+
|
|
7
|
+
const name = ref('')
|
|
8
|
+
const code = ref('')
|
|
9
|
+
|
|
10
|
+
function handleSubmit() {
|
|
11
|
+
if (!name.value || !code.value) return
|
|
12
|
+
emit('create', {
|
|
13
|
+
name: name.value.trim(),
|
|
14
|
+
code: code.value.trim()
|
|
15
|
+
})
|
|
16
|
+
name.value = ''
|
|
17
|
+
code.value = ''
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function handleDelete(id) {
|
|
21
|
+
emit('delete', id)
|
|
22
|
+
}
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<template>
|
|
26
|
+
<section class="section">
|
|
27
|
+
<h2>Departments</h2>
|
|
28
|
+
<form class="form" @submit.prevent="handleSubmit">
|
|
29
|
+
<div class="form-group">
|
|
30
|
+
<label for="dept-name">Department Name</label>
|
|
31
|
+
<input id="dept-name" v-model="name" type="text" placeholder="e.g. Engineering" required>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="form-group">
|
|
34
|
+
<label for="dept-code">Department Code</label>
|
|
35
|
+
<input id="dept-code" v-model="code" type="text" placeholder="e.g. ENG" required>
|
|
36
|
+
</div>
|
|
37
|
+
<button type="submit" class="btn btn-primary">Add Department</button>
|
|
38
|
+
</form>
|
|
39
|
+
|
|
40
|
+
<div class="table-container">
|
|
41
|
+
<p v-if="!departments || departments.length === 0" class="empty">No departments available.</p>
|
|
42
|
+
<table v-else class="data-table">
|
|
43
|
+
<thead>
|
|
44
|
+
<tr>
|
|
45
|
+
<th>ID</th>
|
|
46
|
+
<th>Name</th>
|
|
47
|
+
<th>Code</th>
|
|
48
|
+
<th>Actions</th>
|
|
49
|
+
</tr>
|
|
50
|
+
</thead>
|
|
51
|
+
<tbody>
|
|
52
|
+
<tr v-for="dept in departments" :key="dept.id">
|
|
53
|
+
<td>{{ dept.id }}</td>
|
|
54
|
+
<td>{{ dept.name }}</td>
|
|
55
|
+
<td>{{ dept.code }}</td>
|
|
56
|
+
<td>
|
|
57
|
+
<button class="btn btn-danger" @click="handleDelete(dept.id)">Delete</button>
|
|
58
|
+
</td>
|
|
59
|
+
</tr>
|
|
60
|
+
</tbody>
|
|
61
|
+
</table>
|
|
62
|
+
</div>
|
|
63
|
+
</section>
|
|
64
|
+
</template>
|
|
65
|
+
|
|
66
|
+
<style scoped>
|
|
67
|
+
.section {
|
|
68
|
+
border: 1px solid #ccc;
|
|
69
|
+
border-radius: 4px;
|
|
70
|
+
padding: 16px;
|
|
71
|
+
margin-bottom: 24px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.form {
|
|
75
|
+
display: flex;
|
|
76
|
+
flex-wrap: wrap;
|
|
77
|
+
gap: 12px;
|
|
78
|
+
align-items: flex-end;
|
|
79
|
+
margin-bottom: 16px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.form-group {
|
|
83
|
+
display: flex;
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
gap: 4px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.form-group label {
|
|
89
|
+
font-size: 14px;
|
|
90
|
+
font-weight: 600;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.form-group input {
|
|
94
|
+
padding: 6px 10px;
|
|
95
|
+
border: 1px solid #ccc;
|
|
96
|
+
border-radius: 4px;
|
|
97
|
+
font-size: 14px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.btn {
|
|
101
|
+
padding: 6px 14px;
|
|
102
|
+
border: 1px solid transparent;
|
|
103
|
+
border-radius: 4px;
|
|
104
|
+
cursor: pointer;
|
|
105
|
+
font-size: 14px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.btn-primary {
|
|
109
|
+
background-color: #007bff;
|
|
110
|
+
color: white;
|
|
111
|
+
border-color: #007bff;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.btn-primary:hover {
|
|
115
|
+
background-color: #0069d9;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.btn-danger {
|
|
119
|
+
background-color: #dc3545;
|
|
120
|
+
color: white;
|
|
121
|
+
border-color: #dc3545;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.btn-danger:hover {
|
|
125
|
+
background-color: #c82333;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.table-container {
|
|
129
|
+
overflow-x: auto;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.data-table {
|
|
133
|
+
width: 100%;
|
|
134
|
+
border-collapse: collapse;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.data-table th,
|
|
138
|
+
.data-table td {
|
|
139
|
+
border: 1px solid #ddd;
|
|
140
|
+
padding: 8px 12px;
|
|
141
|
+
text-align: left;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.data-table th {
|
|
145
|
+
background-color: #f2f2f2;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.empty {
|
|
149
|
+
color: #666;
|
|
150
|
+
font-style: italic;
|
|
151
|
+
}
|
|
152
|
+
</style>
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
|
|
4
|
+
const props = defineProps(['employees', 'departments'])
|
|
5
|
+
const emit = defineEmits(['create', 'delete'])
|
|
6
|
+
|
|
7
|
+
const name = ref('')
|
|
8
|
+
const email = ref('')
|
|
9
|
+
const departmentId = ref('')
|
|
10
|
+
const salary = ref('')
|
|
11
|
+
|
|
12
|
+
function handleSubmit() {
|
|
13
|
+
if (!name.value || !email.value || !departmentId.value || salary.value === '') return
|
|
14
|
+
emit('create', {
|
|
15
|
+
name: name.value.trim(),
|
|
16
|
+
email: email.value.trim(),
|
|
17
|
+
departmentId: departmentId.value,
|
|
18
|
+
salary: Number(salary.value)
|
|
19
|
+
})
|
|
20
|
+
name.value = ''
|
|
21
|
+
email.value = ''
|
|
22
|
+
departmentId.value = ''
|
|
23
|
+
salary.value = ''
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function handleDelete(id) {
|
|
27
|
+
emit('delete', id)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function getDepartmentLabel(deptId) {
|
|
31
|
+
const dept = props.departments?.find(d => d.id === deptId)
|
|
32
|
+
return dept ? `${dept.name} (${dept.code})` : deptId
|
|
33
|
+
}
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<template>
|
|
37
|
+
<section class="section">
|
|
38
|
+
<h2>Employees</h2>
|
|
39
|
+
<form class="form" @submit.prevent="handleSubmit">
|
|
40
|
+
<div class="form-group">
|
|
41
|
+
<label for="emp-name">Employee Name</label>
|
|
42
|
+
<input id="emp-name" v-model="name" type="text" placeholder="e.g. John Doe" required>
|
|
43
|
+
</div>
|
|
44
|
+
<div class="form-group">
|
|
45
|
+
<label for="emp-email">Email</label>
|
|
46
|
+
<input id="emp-email" v-model="email" type="email" placeholder="e.g. john@example.com" required>
|
|
47
|
+
</div>
|
|
48
|
+
<div class="form-group">
|
|
49
|
+
<label for="emp-dept">Department</label>
|
|
50
|
+
<select id="emp-dept" v-model="departmentId" required>
|
|
51
|
+
<option value="" disabled>Select Department</option>
|
|
52
|
+
<option v-for="dept in departments" :key="dept.id" :value="dept.id">
|
|
53
|
+
{{ dept.name }} ({{ dept.code }})
|
|
54
|
+
</option>
|
|
55
|
+
</select>
|
|
56
|
+
</div>
|
|
57
|
+
<div class="form-group">
|
|
58
|
+
<label for="emp-salary">Salary</label>
|
|
59
|
+
<input id="emp-salary" v-model="salary" type="number" step="any" placeholder="e.g. 50000" required>
|
|
60
|
+
</div>
|
|
61
|
+
<button type="submit" class="btn btn-primary">Add Employee</button>
|
|
62
|
+
</form>
|
|
63
|
+
|
|
64
|
+
<div class="table-container">
|
|
65
|
+
<p v-if="!employees || employees.length === 0" class="empty">No employees available.</p>
|
|
66
|
+
<table v-else class="data-table">
|
|
67
|
+
<thead>
|
|
68
|
+
<tr>
|
|
69
|
+
<th>ID</th>
|
|
70
|
+
<th>Name</th>
|
|
71
|
+
<th>Email</th>
|
|
72
|
+
<th>Department</th>
|
|
73
|
+
<th>Salary</th>
|
|
74
|
+
<th>Actions</th>
|
|
75
|
+
</tr>
|
|
76
|
+
</thead>
|
|
77
|
+
<tbody>
|
|
78
|
+
<tr v-for="emp in employees" :key="emp.id">
|
|
79
|
+
<td>{{ emp.id }}</td>
|
|
80
|
+
<td>{{ emp.name }}</td>
|
|
81
|
+
<td>{{ emp.email }}</td>
|
|
82
|
+
<td>{{ getDepartmentLabel(emp.departmentId) }}</td>
|
|
83
|
+
<td>${{ Number(emp.salary).toLocaleString() }}</td>
|
|
84
|
+
<td>
|
|
85
|
+
<button class="btn btn-danger" @click="handleDelete(emp.id)">Delete</button>
|
|
86
|
+
</td>
|
|
87
|
+
</tr>
|
|
88
|
+
</tbody>
|
|
89
|
+
</table>
|
|
90
|
+
</div>
|
|
91
|
+
</section>
|
|
92
|
+
</template>
|
|
93
|
+
|
|
94
|
+
<style scoped>
|
|
95
|
+
.section {
|
|
96
|
+
border: 1px solid #ccc;
|
|
97
|
+
border-radius: 4px;
|
|
98
|
+
padding: 16px;
|
|
99
|
+
margin-bottom: 24px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.form {
|
|
103
|
+
display: flex;
|
|
104
|
+
flex-wrap: wrap;
|
|
105
|
+
gap: 12px;
|
|
106
|
+
align-items: flex-end;
|
|
107
|
+
margin-bottom: 16px;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.form-group {
|
|
111
|
+
display: flex;
|
|
112
|
+
flex-direction: column;
|
|
113
|
+
gap: 4px;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.form-group label {
|
|
117
|
+
font-size: 14px;
|
|
118
|
+
font-weight: 600;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.form-group input,
|
|
122
|
+
.form-group select {
|
|
123
|
+
padding: 6px 10px;
|
|
124
|
+
border: 1px solid #ccc;
|
|
125
|
+
border-radius: 4px;
|
|
126
|
+
font-size: 14px;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.btn {
|
|
130
|
+
padding: 6px 14px;
|
|
131
|
+
border: 1px solid transparent;
|
|
132
|
+
border-radius: 4px;
|
|
133
|
+
cursor: pointer;
|
|
134
|
+
font-size: 14px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.btn-primary {
|
|
138
|
+
background-color: #007bff;
|
|
139
|
+
color: white;
|
|
140
|
+
border-color: #007bff;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.btn-primary:hover {
|
|
144
|
+
background-color: #0069d9;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.btn-danger {
|
|
148
|
+
background-color: #dc3545;
|
|
149
|
+
color: white;
|
|
150
|
+
border-color: #dc3545;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.btn-danger:hover {
|
|
154
|
+
background-color: #c82333;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.table-container {
|
|
158
|
+
overflow-x: auto;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.data-table {
|
|
162
|
+
width: 100%;
|
|
163
|
+
border-collapse: collapse;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.data-table th,
|
|
167
|
+
.data-table td {
|
|
168
|
+
border: 1px solid #ddd;
|
|
169
|
+
padding: 8px 12px;
|
|
170
|
+
text-align: left;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.data-table th {
|
|
174
|
+
background-color: #f2f2f2;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.empty {
|
|
178
|
+
color: #666;
|
|
179
|
+
font-style: italic;
|
|
180
|
+
}
|
|
181
|
+
</style>
|
package/templates/fullstack-springboot-vue/frontend/vue-axios-pinia-props/src/stores/companyStore.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
actions: {
|
|
10
|
+
async fetchDepartments() {
|
|
11
|
+
const response = await api.get('/departments')
|
|
12
|
+
this.departments = response.data
|
|
13
|
+
},
|
|
14
|
+
async createDepartment(department) {
|
|
15
|
+
const response = await api.post('/departments', department)
|
|
16
|
+
this.departments.push(response.data)
|
|
17
|
+
},
|
|
18
|
+
async deleteDepartment(id) {
|
|
19
|
+
await api.delete(`/departments/${id}`)
|
|
20
|
+
this.departments = this.departments.filter(dept => dept.id !== id)
|
|
21
|
+
},
|
|
22
|
+
async fetchEmployees() {
|
|
23
|
+
const response = await api.get('/employees')
|
|
24
|
+
this.employees = response.data
|
|
25
|
+
},
|
|
26
|
+
async createEmployee(employee) {
|
|
27
|
+
const response = await api.post('/employees', employee)
|
|
28
|
+
this.employees.push(response.data)
|
|
29
|
+
},
|
|
30
|
+
async deleteEmployee(id) {
|
|
31
|
+
await api.delete(`/employees/${id}`)
|
|
32
|
+
this.employees = this.employees.filter(emp => emp.id !== id)
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
})
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Vue Axios Props Emits CRUD</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="app"></div>
|
|
10
|
+
<script type="module" src="/src/main.js"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "vue-axios-props-emits",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.0",
|
|
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
|
+
"vue": "^3.5.44"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@vitejs/plugin-vue": "^6.0.10",
|
|
17
|
+
"vite": "^8.3.4"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="container">
|
|
3
|
+
<header class="header">
|
|
4
|
+
<h1>Company Directory</h1>
|
|
5
|
+
<p>Vue 3 + Axios + Props & Emits</p>
|
|
6
|
+
</header>
|
|
7
|
+
|
|
8
|
+
<div class="grid">
|
|
9
|
+
<section class="card">
|
|
10
|
+
<h2>Departments</h2>
|
|
11
|
+
<DepartmentForm @create-department="createDepartment" />
|
|
12
|
+
<DepartmentList
|
|
13
|
+
:departments="departments"
|
|
14
|
+
@delete-department="deleteDepartment"
|
|
15
|
+
/>
|
|
16
|
+
</section>
|
|
17
|
+
|
|
18
|
+
<section class="card">
|
|
19
|
+
<h2>Employees</h2>
|
|
20
|
+
<EmployeeForm
|
|
21
|
+
:departments="departments"
|
|
22
|
+
@create-employee="createEmployee"
|
|
23
|
+
/>
|
|
24
|
+
<EmployeeList
|
|
25
|
+
:employees="employees"
|
|
26
|
+
:departments="departments"
|
|
27
|
+
@delete-employee="deleteEmployee"
|
|
28
|
+
/>
|
|
29
|
+
</section>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script setup>
|
|
35
|
+
import { ref, onMounted } from 'vue'
|
|
36
|
+
import api from './services/api'
|
|
37
|
+
import DepartmentList from './components/DepartmentList.vue'
|
|
38
|
+
import DepartmentForm from './components/DepartmentForm.vue'
|
|
39
|
+
import EmployeeList from './components/EmployeeList.vue'
|
|
40
|
+
import EmployeeForm from './components/EmployeeForm.vue'
|
|
41
|
+
|
|
42
|
+
const departments = ref([])
|
|
43
|
+
const employees = ref([])
|
|
44
|
+
|
|
45
|
+
const fetchDepartments = async () => {
|
|
46
|
+
try {
|
|
47
|
+
const response = await api.get('/departments')
|
|
48
|
+
departments.value = response.data
|
|
49
|
+
} catch (error) {
|
|
50
|
+
console.error(error)
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const fetchEmployees = async () => {
|
|
55
|
+
try {
|
|
56
|
+
const response = await api.get('/employees')
|
|
57
|
+
employees.value = response.data
|
|
58
|
+
} catch (error) {
|
|
59
|
+
console.error(error)
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const createDepartment = async (departmentData) => {
|
|
64
|
+
try {
|
|
65
|
+
await api.post('/departments', departmentData)
|
|
66
|
+
await fetchDepartments()
|
|
67
|
+
} catch (error) {
|
|
68
|
+
console.error(error)
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const deleteDepartment = async (id) => {
|
|
73
|
+
try {
|
|
74
|
+
await api.delete(`/departments/${id}`)
|
|
75
|
+
await fetchDepartments()
|
|
76
|
+
await fetchEmployees()
|
|
77
|
+
} catch (error) {
|
|
78
|
+
console.error(error)
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const createEmployee = async (employeeData) => {
|
|
83
|
+
try {
|
|
84
|
+
await api.post('/employees', employeeData)
|
|
85
|
+
await fetchEmployees()
|
|
86
|
+
} catch (error) {
|
|
87
|
+
console.error(error)
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const deleteEmployee = async (id) => {
|
|
92
|
+
try {
|
|
93
|
+
await api.delete(`/employees/${id}`)
|
|
94
|
+
await fetchEmployees()
|
|
95
|
+
} catch (error) {
|
|
96
|
+
console.error(error)
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
onMounted(() => {
|
|
101
|
+
fetchDepartments()
|
|
102
|
+
fetchEmployees()
|
|
103
|
+
})
|
|
104
|
+
</script>
|
|
105
|
+
|
|
106
|
+
<style>
|
|
107
|
+
* {
|
|
108
|
+
box-sizing: border-box;
|
|
109
|
+
margin: 0;
|
|
110
|
+
padding: 0;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
body {
|
|
114
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
115
|
+
background-color: #f4f5f7;
|
|
116
|
+
color: #333333;
|
|
117
|
+
line-height: 1.5;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.container {
|
|
121
|
+
max-width: 1200px;
|
|
122
|
+
margin: 0 auto;
|
|
123
|
+
padding: 32px 16px;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.header {
|
|
127
|
+
margin-bottom: 24px;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.header h1 {
|
|
131
|
+
font-size: 28px;
|
|
132
|
+
color: #1a1a1a;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.header p {
|
|
136
|
+
color: #666666;
|
|
137
|
+
font-size: 14px;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.grid {
|
|
141
|
+
display: grid;
|
|
142
|
+
grid-template-columns: 1fr;
|
|
143
|
+
gap: 24px;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
@media (min-width: 900px) {
|
|
147
|
+
.grid {
|
|
148
|
+
grid-template-columns: 1fr 1fr;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.card {
|
|
153
|
+
background: #ffffff;
|
|
154
|
+
border: 1px solid #e1e4e8;
|
|
155
|
+
border-radius: 8px;
|
|
156
|
+
padding: 20px;
|
|
157
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.card h2 {
|
|
161
|
+
font-size: 20px;
|
|
162
|
+
margin-bottom: 16px;
|
|
163
|
+
color: #222222;
|
|
164
|
+
border-bottom: 1px solid #edf0f2;
|
|
165
|
+
padding-bottom: 8px;
|
|
166
|
+
}
|
|
167
|
+
</style>
|