ADD: Actualizar metodo api.resource por api.catalog

This commit is contained in:
Moisés Cortés C. 2025-05-23 13:52:32 -06:00
parent 6b7bccc500
commit c8bab712d3
5 changed files with 819 additions and 490 deletions

1291
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
"name": "notsoweb.frontend", "name": "notsoweb.frontend",
"copyright": "Notsoweb Software Inc.", "copyright": "Notsoweb Software Inc.",
"private": true, "private": true,
"version": "0.9.9", "version": "0.9.10",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",

View File

@ -10,7 +10,7 @@ import Notify from '@Plugins/Notify'
import { bootPermissions, bootRoles } from '@Plugins/RolePermission'; import { bootPermissions, bootRoles } from '@Plugins/RolePermission';
import TailwindScreen from '@Plugins/TailwindScreen' import TailwindScreen from '@Plugins/TailwindScreen'
import { pagePlugin } from '@Services/Page'; import { pagePlugin } from '@Services/Page';
import { reloadApp, view } from '@Services/Page'; import { defineApp, reloadApp, view } from '@Services/Page';
import { apiURL } from '@Services/Api'; import { apiURL } from '@Services/Api';
import App from '@Components/App.vue' import App from '@Components/App.vue'
@ -32,8 +32,10 @@ async function boot() {
// Iniciar rutas // Iniciar rutas
try { try {
const routes = await axios.get(apiURL('resources/routes')); const routes = await axios.get(apiURL('resources/routes'));
const appData = await axios.get(apiURL('resources/app'));
window.Ziggy = routes.data; window.Ziggy = routes.data;
defineApp(appData.data);
window.route = useRoute(); window.route = useRoute();
window.view = view; window.view = view;
initRoutes = true; initRoutes = true;

View File

@ -93,6 +93,14 @@ const changelogs = [
], ],
date: '2025-03-13' date: '2025-03-13'
}, },
{
version: '0.9.10',
details: [
'ADD: Se actualizo el método api.resource por api.catalog para obtener catálogos del backend.',
'UPDATE: Actualización de dependencias.'
],
date: '2025-05-23'
}
] ]
</script> </script>

View File

@ -216,8 +216,8 @@ const api = {
options options
}) })
}, },
resource(resources, options) { catalog(resources, options) {
this.post(apiURL('resources/get'), { this.post(apiURL('catalogs/get'), {
...options, ...options,
data: resources data: resources
}) })