From b402991ac796fbb10cc4a9ddc14265faa938fa89 Mon Sep 17 00:00:00 2001 From: "jose.lopez" Date: Tue, 23 Sep 2025 13:42:23 -0600 Subject: [PATCH] vue datepicker y layouts separados --- package-lock.json | 26 ++ package.json | 1 + src/components/Holos/Calendar.vue | 191 +++++++++++++ src/layouts/AdminLayout.vue | 7 + src/layouts/AppLayout.vue | 5 + src/layouts/CoordinatorLayout.vue | 5 + src/pages/Auth/Login.vue | 2 +- src/pages/Dashboard/Module.js | 16 ++ src/pages/Vacations/Admin/Create.vue | 181 +++++++++++++ src/pages/Vacations/Admin/Form.vue | 236 +++++++++++++++++ src/pages/Vacations/Admin/Index.vue | 129 +++++++++ src/pages/Vacations/Admin/Module.js | 16 ++ src/pages/Vacations/Coordinator/Create.vue | 181 +++++++++++++ src/pages/Vacations/Coordinator/Form.vue | 236 +++++++++++++++++ src/pages/Vacations/Coordinator/Index.vue | 295 +++++++++++++++++++++ src/pages/Vacations/Coordinator/Module.js | 16 ++ src/pages/Vacations/Employee/Create.vue | 181 +++++++++++++ src/pages/Vacations/Employee/Form.vue | 236 +++++++++++++++++ src/pages/Vacations/Employee/Index.vue | 136 ++++++++++ src/pages/Vacations/Employee/Module.js | 16 ++ src/router/Index.js | 51 ++++ 21 files changed, 2162 insertions(+), 1 deletion(-) create mode 100644 src/components/Holos/Calendar.vue create mode 100644 src/pages/Dashboard/Module.js create mode 100644 src/pages/Vacations/Admin/Create.vue create mode 100644 src/pages/Vacations/Admin/Form.vue create mode 100644 src/pages/Vacations/Admin/Index.vue create mode 100644 src/pages/Vacations/Admin/Module.js create mode 100644 src/pages/Vacations/Coordinator/Create.vue create mode 100644 src/pages/Vacations/Coordinator/Form.vue create mode 100644 src/pages/Vacations/Coordinator/Index.vue create mode 100644 src/pages/Vacations/Coordinator/Module.js create mode 100644 src/pages/Vacations/Employee/Create.vue create mode 100644 src/pages/Vacations/Employee/Form.vue create mode 100644 src/pages/Vacations/Employee/Index.vue create mode 100644 src/pages/Vacations/Employee/Module.js diff --git a/package-lock.json b/package-lock.json index a7e332d..6e1802a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "@tailwindcss/postcss": "^4.0.9", "@tailwindcss/vite": "^4.0.9", "@vitejs/plugin-vue": "^5.2.1", + "@vuepic/vue-datepicker": "^11.0.2", "apexcharts": "^5.3.5", "axios": "^1.8.1", "laravel-echo": "^2.0.2", @@ -1507,6 +1508,31 @@ "integrity": "sha512-CabR+UN630VnsJO/jHWYBC1YVXyMq94KKp6iF5MQgZJs5I8cmjw6oVMO1oDbtBkENSHSSn/UadWlW/OAgdmKrg==", "license": "MIT" }, + "node_modules/@vuepic/vue-datepicker": { + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/@vuepic/vue-datepicker/-/vue-datepicker-11.0.2.tgz", + "integrity": "sha512-uHh78mVBXCEjam1uVfTzZ/HkyDwut/H6b2djSN9YTF+l/EA+XONfdCnOVSi1g+qVGSy65DcQAwyBNidAssnudQ==", + "license": "MIT", + "dependencies": { + "date-fns": "^4.1.0" + }, + "engines": { + "node": ">=18.12.0" + }, + "peerDependencies": { + "vue": ">=3.3.0" + } + }, + "node_modules/@vuepic/vue-datepicker/node_modules/date-fns": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-4.1.0.tgz", + "integrity": "sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/kossnocorp" + } + }, "node_modules/@yr/monotone-cubic-spline": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@yr/monotone-cubic-spline/-/monotone-cubic-spline-1.0.3.tgz", diff --git a/package.json b/package.json index 6b2b224..cc69e1c 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "@tailwindcss/postcss": "^4.0.9", "@tailwindcss/vite": "^4.0.9", "@vitejs/plugin-vue": "^5.2.1", + "@vuepic/vue-datepicker": "^11.0.2", "apexcharts": "^5.3.5", "axios": "^1.8.1", "laravel-echo": "^2.0.2", diff --git a/src/components/Holos/Calendar.vue b/src/components/Holos/Calendar.vue new file mode 100644 index 0000000..96db6d4 --- /dev/null +++ b/src/components/Holos/Calendar.vue @@ -0,0 +1,191 @@ + + + + + \ No newline at end of file diff --git a/src/layouts/AdminLayout.vue b/src/layouts/AdminLayout.vue index f72215c..8d4d7c4 100644 --- a/src/layouts/AdminLayout.vue +++ b/src/layouts/AdminLayout.vue @@ -71,6 +71,13 @@ onMounted(() => { to="admin.additional.index" /> +
+ +
{ name="Dashboard" to="dashboard.index" /> + { name="Dashboard" to="coordinator.dashboard.index" /> +
{ } // Verificar si tiene el rol coordinador - const hasCoordinatorRole = userRoles.some(role => role.name === 'coordinador') + const hasCoordinatorRole = userRoles.some(role => role.name === 'coordinator') if (hasCoordinatorRole) { router.push('/coordinator') return diff --git a/src/pages/Dashboard/Module.js b/src/pages/Dashboard/Module.js new file mode 100644 index 0000000..cd617bf --- /dev/null +++ b/src/pages/Dashboard/Module.js @@ -0,0 +1,16 @@ +import { lang } from '@Lang/i18n'; + +// Ruta API +const apiTo = (name, params = {}) => route(`dashboard.${name}`, params) + +// Ruta visual +const viewTo = ({ name = '', params = {}, query = {} }) => view({ name: `dashboard.${name}`, params, query }) + +// Obtener traducción del componente +const transl = (str) => lang(`dashboard.${str}`) + +export { + viewTo, + apiTo, + transl +} \ No newline at end of file diff --git a/src/pages/Vacations/Admin/Create.vue b/src/pages/Vacations/Admin/Create.vue new file mode 100644 index 0000000..c1692d9 --- /dev/null +++ b/src/pages/Vacations/Admin/Create.vue @@ -0,0 +1,181 @@ + + + \ No newline at end of file diff --git a/src/pages/Vacations/Admin/Form.vue b/src/pages/Vacations/Admin/Form.vue new file mode 100644 index 0000000..4ac48cb --- /dev/null +++ b/src/pages/Vacations/Admin/Form.vue @@ -0,0 +1,236 @@ + + +