validations of role store

This commit is contained in:
Alexandro Uc Santos
2024-12-14 18:10:35 -06:00
parent fa56d25258
commit 68f2599cdd
3 changed files with 42 additions and 17 deletions

View File

@@ -3,22 +3,24 @@
import {eventStatusLoad} from '../helpers/status';
import {getDateTime, formatOnlyDate} from '../helpers/date_formats';
import { onMounted, ref } from 'vue';
import { useRouter } from 'vue-router';
import { useI18n } from 'vue-i18n';
import useCalendar from '../composables/useCalendar';
import CustomPopup from '../components/CustomPopup.vue';
import { watch } from 'vue';
import { useAuthStore } from '../stores/auth';
const events = ref([]);
const router = useRouter();
const { t, locale } = useI18n()
const auth = useAuthStore();
const { getCalendarDate, loading, loads } = useCalendar()
const filter = ref({value: 'my', label: t('calendar.my')})
const startDate = ref('');
const endDate = ref('');
const optionsFilter = ref([])
const openPopup = ref(false);
const jobRole = auth.user.job_role;
const roleCheck = 'store';
const config = {
week: {
@@ -166,11 +168,12 @@
<div class="indicators">
<span><i class="fa-solid fa-circle" style="color: #A9B0B2"></i> {{ t('global.published') }}</span>
<span><i class="fa-solid fa-circle" style="color: #F44336"></i> {{ t('global.loading') }}</span>
<span><i class="fa-solid fa-circle" style="color: #ffd22b"></i> {{ t('global.transit') }}</span>
<span><i class="fa-solid fa-circle" style="color: #428502"></i> {{ t('global.downloading') }}</span>
<span><i class="fa-solid fa-circle" style="color: #1B70AF"></i> {{ t('global.delivered') }}</span>
<span v-if="jobRole !== roleCheck"><i class="fa-solid fa-circle" style="color: #ffd22b"></i> {{ t('global.transit') }}</span>
<span v-if="jobRole !== roleCheck"><i class="fa-solid fa-circle" style="color: #428502"></i> {{ t('global.downloading') }}</span>
<span v-if="jobRole !== roleCheck"><i class="fa-solid fa-circle" style="color: #1B70AF"></i> {{ t('global.delivered') }}</span>
</div>
<div class="box-filter"
v-if="jobRole !== roleCheck"
@click="openPopup = true"
>
<span class="clear-sm" v-if="filter === null">{{ t('directory.directory') }}</span>