trying setup store
This commit is contained in:
@@ -92,7 +92,7 @@
|
||||
id="contract-hours"
|
||||
class="form-control"
|
||||
:class="classIsInvalid(v$.contractHours)"
|
||||
:disabled="!editEmployee"
|
||||
:disabled="!editEmployee || !user.isAdmin"
|
||||
/>
|
||||
|
||||
<div v-for="(error) in v$.contractHours.$errors" class="invalid-feedback" id="contractHoursFeedback">
|
||||
@@ -164,6 +164,7 @@
|
||||
import VProfileControls from '@/components/VProfileControls.vue';
|
||||
import { onMounted, computed, ref, watch } from 'vue'
|
||||
import { useEmployee } from '@/stores/employee'
|
||||
import { useUser } from '@/stores/user'
|
||||
import { useRoute } from 'vue-router';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import useVuelidate from '@vuelidate/core'
|
||||
@@ -172,6 +173,7 @@ import { IMaskComponent as MaskInput } from 'vue-imask'
|
||||
|
||||
const route = useRoute()
|
||||
const state = useEmployee()
|
||||
const user = useUser()
|
||||
|
||||
const { employee } = storeToRefs(state)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user