diff --git a/src/components/CustomSearchInput.vue b/src/components/CustomSearchInput.vue new file mode 100644 index 0000000..30aa4ef --- /dev/null +++ b/src/components/CustomSearchInput.vue @@ -0,0 +1,43 @@ + + + + + \ No newline at end of file diff --git a/src/components/CustomSwitch.vue b/src/components/CustomSwitch.vue new file mode 100644 index 0000000..3c2e9c3 --- /dev/null +++ b/src/components/CustomSwitch.vue @@ -0,0 +1,93 @@ + + + + + \ No newline at end of file diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue index 7fc5cd9..dee42d6 100644 --- a/src/components/Sidebar.vue +++ b/src/components/Sidebar.vue @@ -159,6 +159,16 @@ class="nav-link" :to="{name: 'calculator'}">{{ t('global.calculator') }} +
  • +
    + + Lista privada +
    +
  • diff --git a/src/router/index.js b/src/router/index.js index d507444..9d26858 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -200,7 +200,16 @@ const router = createRouter({ path: '/:pathMatch(.*)*', name: 'not-found', component: () => import('../views/dashboard/HomeView.vue'), - } + }, + { + path: 'lista-privada', + name: 'groups', + meta: { + permissions: ['role_shipper'], + roles: ['staff', 'manager', 'owner'] + }, + component: () => import('../views/contacts/ContactsView.vue'), + }, ] } ] diff --git a/src/stores/contacts.js b/src/stores/contacts.js new file mode 100644 index 0000000..1123163 --- /dev/null +++ b/src/stores/contacts.js @@ -0,0 +1,66 @@ +import { defineStore } from "pinia" +import { ref } from "vue"; + +export const useContactsStore = defineStore('contacts', () => { + + const contacts = ref([ + { + "id": 13, + "company": "Altos", + "companyId": 929, + "rfc": "USKSK00101", + "category": "Agricola" + }, + { + "id": 15, + "company": "Altos logos", + "companyId": 2018, + "rfc": "USKSK0010a", + "category": "Agricola" + }, + { + "id": 18, + "company": "Bravos SA", + "companyId": 199, + "rfc": "UJSK8991", + "category": "Materiales" + }, + { + "id": 10, + "company": "Kolo", + "companyId": 1993, + "rfc": "JKDKD91001", + "category": "Servicios" + }, + { + "id": 39, + "company": "Altos", + "companyId": 929, + "rfc": "USKSK00101", + "category": "Agricola" + }, + { + "id": 19, + "company": "Altos", + "companyId": 929, + "rfc": "USKSK00101", + "category": "Agricola" + }, + { + "id": 934, + "company": "Altos", + "companyId": 929, + "rfc": "USKSK00101", + "category": "Agricola" + }, + ]); + + const removeContact = (id) => { + contacts.value = contacts.value.filter((e) => e.id !== id); + } + + return { + contacts, + removeContact + } +}); \ No newline at end of file diff --git a/src/views/contacts/ContactsView.vue b/src/views/contacts/ContactsView.vue new file mode 100644 index 0000000..fb20b11 --- /dev/null +++ b/src/views/contacts/ContactsView.vue @@ -0,0 +1,54 @@ + + + + + \ No newline at end of file diff --git a/src/views/contacts/components/ContactCard.vue b/src/views/contacts/components/ContactCard.vue new file mode 100644 index 0000000..15d48c8 --- /dev/null +++ b/src/views/contacts/components/ContactCard.vue @@ -0,0 +1,90 @@ + + + + + \ No newline at end of file diff --git a/src/views/loads/modals/FormLoadModal.vue b/src/views/loads/modals/FormLoadModal.vue index dd85797..78ff999 100644 --- a/src/views/loads/modals/FormLoadModal.vue +++ b/src/views/loads/modals/FormLoadModal.vue @@ -14,9 +14,9 @@ import { useCompanyStore } from '../../../stores/company'; import { useI18n } from 'vue-i18n'; import { computed } from 'vue'; - import {getDateToLocal } from '../../../helpers/date_formats'; import { validateEmail } from '../../../helpers/validations'; import AddressPreview from '../../../components/AddressPreview.vue'; +import CustomSwitch from '../../../components/CustomSwitch.vue'; const loadStore = useLoadsStore(); @@ -42,7 +42,8 @@ const destinationRef = ref('') const emails = ref([]); const emailInput = ref(''); - + const isPrivate = ref(false); + const errors = ref({ segment: null, truckType: null, @@ -605,6 +606,14 @@ -
    +
    + {{ t('buttons.profile') }}