fixes: pagination & users permissions

This commit is contained in:
Alexandro Uc Santos
2024-03-13 21:39:26 -06:00
parent cbd076e887
commit c286da773e
18 changed files with 92 additions and 63 deletions

View File

@@ -2,6 +2,7 @@
import Swal from 'sweetalert2';
import { getDateMonthDayEs } from '../helpers/date_formats';
import { useVehiclesStore } from '../stores/vehicles';
import { useAuthStore } from '../stores/auth';
const props = defineProps({
vehicle: {
@@ -13,6 +14,7 @@
defineEmits(['set-vehicle']);
const vehicleStore = useVehiclesStore();
const authStore = useAuthStore();
const handleDeleteVehicle = async() => {
Swal.fire({
@@ -102,12 +104,14 @@
</div>
<div class="card-footer">
<button
v-if="authStore.user?.job_role === 'owner' || authStore.user?.job_role === 'manager'"
class="btn btn-dark radius-sm"
@click="handleDeleteVehicle"
>
<i class="fa-solid fa-trash" /> <span class="clear-xsm">Eliminar</span>
</button>
<button
v-if="authStore.user?.job_role === 'owner' || authStore.user?.job_role === 'manager'"
class="btn-primary-sm radius-sm"
@click="$emit('set-vehicle', {vehicle: vehicle, modal: 'form'})"
data-toggle="modal"