fixes: pagination & users permissions
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user