Cambio de ruta petite-vue

This commit is contained in:
AlexLara
2025-03-21 13:06:19 -06:00
parent ecba498276
commit cc60154b35
19 changed files with 38 additions and 37 deletions

View File

@@ -1,4 +1,4 @@
import { createApp, reactive } from 'https://unpkg.com/petite-vue?module'
import { createApp, reactive } from 'https://unpkg.com/petite-vue@0.4.1/dist/petite-vue.es.js'
type Registro = {
carrera: string;
@@ -77,10 +77,10 @@ $('div.modal#cargando').modal({
const store = reactive({
loading: false,
<<<<<<< HEAD
=======
<<<<<<< HEAD
=======
perido: null as Periodo | null,
>>>>>>> 7688f1aac1824c234bc5f19b154e9ad1f4808d4f
>>>>>>> 7688f1aac1824c234bc5f19b154e9ad1f4808d4f
current: {
comentario: '',
clase_vista: null,
@@ -220,13 +220,13 @@ const store = reactive({
registro_fecha_justificacion: Date;
};
try {
<<<<<<< HEAD
<<<<<<< HEAD
const res = await fetch('action/action_justificar.php', {
method: 'PUT',
=======
=======
const res = await fetch('action/justificar.php', {
method: 'POST',
>>>>>>> 7688f1aac1824c234bc5f19b154e9ad1f4808d4f
>>>>>>> 7688f1aac1824c234bc5f19b154e9ad1f4808d4f
headers: {
'Content-Type': 'application/json'
},
@@ -246,8 +246,8 @@ const store = reactive({
store.current.justificada.justificador_rol = data.justificador_rol
store.current.justificada.registro_fecha_justificacion = data.registro_fecha_justificacion
},
<<<<<<< HEAD
=======
<<<<<<< HEAD
=======
async justificarBloque(fecha: Date, bloques: Array<number>, justificacion: string) {
if (bloques.length === 0) {
alert('No se ha seleccionado ningún bloque');
@@ -283,7 +283,7 @@ const store = reactive({
alert('Error al justificar');
}
},
>>>>>>> 7688f1aac1824c234bc5f19b154e9ad1f4808d4f
>>>>>>> 7688f1aac1824c234bc5f19b154e9ad1f4808d4f
registros: {
data: [] as Registro[],
async fetch(fecha?: Date, fecha_inicio?: Date, fecha_fin?: Date) {
@@ -331,11 +331,11 @@ const store = reactive({
if one of the filters is null, then it is not relevant
*/
<<<<<<< HEAD
<<<<<<< HEAD
const filters = Object.keys(store.filters).filter((filtro) => store.filters[filtro] !== null || store.filters[filtro]?.length > 0 )
=======
=======
const filters = Object.keys(store.filters).filter((filtro) => store.filters[filtro] !== null || store.filters[filtro]?.length > 0)
>>>>>>> 7688f1aac1824c234bc5f19b154e9ad1f4808d4f
>>>>>>> 7688f1aac1824c234bc5f19b154e9ad1f4808d4f
return this.data.filter((registro: Registro) => {
return filters.every((filtro) => {
switch (filtro) {
@@ -416,10 +416,10 @@ type Profesor = {
}
createApp({
store,
<<<<<<< HEAD
=======
<<<<<<< HEAD
=======
messages: [] as Array<{ title: string, text: string, type: string, timestamp: string }>,
>>>>>>> 7688f1aac1824c234bc5f19b154e9ad1f4808d4f
>>>>>>> 7688f1aac1824c234bc5f19b154e9ad1f4808d4f
get clase_vista() {
return store.current.clase_vista
},
@@ -436,7 +436,7 @@ createApp({
profesores: [] as Profesor[],
async mounted() {
$('div.modal#cargando').modal('show');
<<<<<<< HEAD
<<<<<<< HEAD
// await store.registros.fetch()
await store.facultades.fetch()
@@ -446,7 +446,7 @@ createApp({
this.profesores = await (await fetch('action/action_profesor.php')).json() as Profesor[];
$('div.modal#cargando').modal('hide');
=======
=======
try {
// await store.registros.fetch()
@@ -464,6 +464,6 @@ createApp({
finally {
$('div.modal#cargando').modal('hide');
}
>>>>>>> 7688f1aac1824c234bc5f19b154e9ad1f4808d4f
>>>>>>> 7688f1aac1824c234bc5f19b154e9ad1f4808d4f
}
}).mount('#app')