Skip to content

Commit

Permalink
Merge pull request #81 from Crudzaso/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
DiegoAndresRamirez authored Nov 30, 2024
2 parents af28c88 + 2dd81a7 commit 7a40960
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 222 deletions.
4 changes: 0 additions & 4 deletions Modules/Lottery/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,3 @@ export default defineConfig({
],
});

//export const paths = [
// 'Modules/Lottery/resources/assets/sass/app.scss',
// 'Modules/Lottery/resources/assets/js/app.js',
//];
125 changes: 0 additions & 125 deletions app/Filament/Resources/MultimediaResource.php

This file was deleted.

This file was deleted.

19 changes: 0 additions & 19 deletions app/Filament/Resources/MultimediaResource/Pages/EditMultimedia.php

This file was deleted.

19 changes: 0 additions & 19 deletions app/Filament/Resources/MultimediaResource/Pages/ListMultimedia.php

This file was deleted.

29 changes: 1 addition & 28 deletions resources/js/Pages/Users/Edit.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<template>
<div class="container mx-auto px-6 py-10">
<!-- Modal de Confirmación -->
<modal v-if="modalData.show" :title="modalData.title" :message="modalData.message" @close="goBack" />

<!-- Encabezado -->
<div class="flex justify-between items-center mb-8">
Expand Down Expand Up @@ -110,10 +108,8 @@
<script>
import { ref } from 'vue';
import { router } from '@inertiajs/vue3';
import Modal from '../../Components/Cruds/Notification.vue';
export default {
components: { Modal },
props: {
user: Object,
},
Expand All @@ -127,34 +123,11 @@
email: props.user.email,
});
const modalData = ref({
show: false,
title: '',
message: '',
});
const submit = async () => {
try {
await router.put(`/users/${props.user.id}`, form.value);
modalData.value = {
show: true,
title: 'Usuario Actualizado',
message: 'El usuario ha sido actualizado exitosamente.',
};
} catch (error) {
modalData.value = {
show: true,
title: 'Error',
message: 'No se pudo actualizar el usuario. Inténtalo de nuevo.',
};
}
};
const goBack = () => {
router.visit('/users');
};
return { form, modalData, submit, goBack };
return { form, submit, goBack };
},
};
</script>
Expand Down
29 changes: 14 additions & 15 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,9 @@
Route::middleware(['auth', 'role:admin'])->group(function () {
Route::get('/users', [UserController::class, 'index'])->name('users.index');
Route::get('/users/create', [UserController::class, 'create'])->name('users.create');
Route::post('/users', [UserController::class, 'store'])->name('users.store');
Route::get('/users/{user}/edit', [UserController::class, 'edit'])->name('users.edit');
Route::put('/users/{user}', [UserController::class, 'update'])->name('users.update');
Route::delete('/users/{user}', [UserController::class, 'destroy'])->name('users.destroy');
Route::get('/raffles/active', [UserController::class, 'activeRaffles'])->name('raffles.active');
});

Route::middleware(['auth'])->get('/profile/{user}', [UserController::class, 'showProfile'])->name('users.profile');
Expand All @@ -65,19 +63,20 @@
return Inertia::render('About');
})->name('about');

Route::get('/raffles-actives', [RaffleController::class, 'getRaffles'])->name('raffles.actives');

Route::get('/raffles-last-chance', [RaffleController::class, 'getLastChanceRaffles'])->name('raffles.last-chance');

Route::get('/auth/redirect/github', [AuthController::class, 'redirectToGitHub'])->name('github.login');
Route::get('/auth/callback/github', [AuthController::class, 'handleGitHubCallback'])->name('github.callback');

Route::get('/auth/redirect/google', [AuthController::class, 'redirectToGoogle'])->name('google.login');
Route::get('/auth/google/callback', [AuthController::class, 'handleGoogleCallback'])->name('google.callback');

Route::get('/raffles-filtered', [RaffleController::class, 'getFilteredRaffles'])->name('raffles.filtered');


Route::middleware(['auth'])->group(function () {
Route::get('/raffles-actives', [RaffleController::class, 'getRaffles'])->name('raffles.actives');

Route::get('/raffles-last-chance', [RaffleController::class, 'getLastChanceRaffles'])->name('raffles.last-chance');

Route::get('/auth/redirect/github', [AuthController::class, 'redirectToGitHub'])->name('github.login');
Route::get('/auth/callback/github', [AuthController::class, 'handleGitHubCallback'])->name('github.callback');

Route::get('/auth/redirect/google', [AuthController::class, 'redirectToGoogle'])->name('google.login');
Route::get('/auth/google/callback', [AuthController::class, 'handleGoogleCallback'])->name('google.callback');

Route::get('/raffles-filtered', [RaffleController::class, 'getFilteredRaffles'])->name('raffles.filtered');
Route::get('/raffles/active', [UserController::class, 'activeRaffles'])->name('raffles.active');
});

Route::middleware(['auth'])->group(function () {
Route::get('/api/user-tickets/{userId}', [TicketController::class, 'getUserTickets'])->name('user.tickets');
Expand Down

0 comments on commit 7a40960

Please sign in to comment.