diff --git a/src/css/app.scss b/src/css/app.scss index 770df8e01..2e524e693 100644 --- a/src/css/app.scss +++ b/src/css/app.scss @@ -141,15 +141,6 @@ select:-webkit-autofill { background-color: var(--vn-section-color); } -.q-checkbox { - & .q-checkbox__label { - color: var(--vn-text-color); - } - & .q-checkbox__inner { - color: var(--vn-label-color); - } -} - .tr-header { color: var(--vn-label-color); } diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 3486cc1d8..0e27eeade 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -521,7 +521,7 @@ claim: records: records card: claimId: Claim ID - assignedTo: Assigned + attendedBy: Attended by created: Created state: State ticketId: Ticket ID @@ -559,6 +559,7 @@ claim: responsible: Responsible worker: Worker redelivery: Redelivery + changeState: Change state basicData: customer: Customer assignedTo: Assigned @@ -1228,6 +1229,12 @@ item/itemType: itemType: Item type basicData: Basic data summary: Summary +zone: + pageTitles: + zones: Zone + zonesList: Zones + deliveryList: Delivery days + upcomingList: Upcoming deliveries components: topbar: {} itemsFilterPanel: diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 70a39dd3c..bc246a6cb 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -519,7 +519,7 @@ claim: records: registros card: claimId: ID reclamación - assignedTo: Asignada a + attendedBy: Atendida por created: Creada state: Estado ticketId: ID ticket @@ -557,6 +557,7 @@ claim: responsible: Responsable worker: Trabajador redelivery: Devolución + changeState: Cambiar estado basicData: customer: Cliente assignedTo: Asignada a @@ -1227,6 +1228,12 @@ item/itemType: itemType: Familia basicData: Datos básicos summary: Resumen +zone: + pageTitles: + zones: Zona + zonesList: Zonas + deliveryList: Días de entrega + upcomingList: Próximos repartos components: topbar: {} itemsFilterPanel: diff --git a/src/pages/Claim/Card/ClaimBasicData.vue b/src/pages/Claim/Card/ClaimBasicData.vue index be2efa31a..e2450a5e5 100644 --- a/src/pages/Claim/Card/ClaimBasicData.vue +++ b/src/pages/Claim/Card/ClaimBasicData.vue @@ -41,10 +41,6 @@ const claimStates = ref([]); const claimStatesCopy = ref([]); const optionsList = ref([]); -function setWorkers(data) { - workers.value = data; - workersCopy.value = data; -} const workersOptions = ref([]); function setClaimStates(data) { diff --git a/src/pages/Claim/Card/ClaimDescriptor.vue b/src/pages/Claim/Card/ClaimDescriptor.vue index 968f1e294..aae999117 100644 --- a/src/pages/Claim/Card/ClaimDescriptor.vue +++ b/src/pages/Claim/Card/ClaimDescriptor.vue @@ -11,6 +11,7 @@ import VnLv from 'src/components/ui/VnLv.vue'; import useCardDescription from 'src/composables/useCardDescription'; import VnUserLink from 'src/components/ui/VnUserLink.vue'; import { getUrl } from 'src/composables/getUrl'; +import ZoneDescriptorProxy from 'src/pages/Zone/Card/ZoneDescriptorProxy.vue'; const $props = defineProps({ id: { @@ -73,8 +74,9 @@ const filter = { const STATE_COLOR = { pending: 'warning', - managed: 'info', + incomplete: 'info', resolved: 'positive', + canceled: 'negative', }; function stateColor(code) { return STATE_COLOR[code]; @@ -127,17 +129,24 @@ onMounted(async () => { - + + + + {{ entity.ticket?.zone?.name }} + + + + import { onMounted, ref, computed } from 'vue'; -import { useRoute } from 'vue-router'; +import { useRoute, useRouter } from 'vue-router'; import { useI18n } from 'vue-i18n'; import { toDate, toCurrency } from 'src/filters'; import CardSummary from 'components/ui/CardSummary.vue'; @@ -13,8 +13,11 @@ import VnUserLink from 'src/components/ui/VnUserLink.vue'; import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue'; import VnTitle from 'src/components/common/VnTitle.vue'; import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue'; +import axios from 'axios'; +import dashIfEmpty from 'src/filters/dashIfEmpty'; const route = useRoute(); +const router = useRouter(); const { t } = useI18n(); const { getTokenMultimedia } = useSession(); const token = getTokenMultimedia(); @@ -27,7 +30,7 @@ const $props = defineProps({ }); const entityId = computed(() => $props.id || route.params.id); - +const ClaimStates = ref([]); const claimUrl = ref(); const salixUrl = ref(); const claimDmsRef = ref(); @@ -99,8 +102,9 @@ const detailsColumns = ref([ const STATE_COLOR = { pending: 'warning', - managed: 'info', + incomplete: 'info', resolved: 'positive', + canceled: 'negative', }; function stateColor(code) { return STATE_COLOR[code]; @@ -162,6 +166,10 @@ function openDialog(dmsId) { multimediaSlide.value = dmsId; multimediaDialog.value = true; } +async function changeState(value) { + await axios.patch(`Claims/updateClaim/${entityId.value}`, { claimStateFk: value }); + router.go(route.fullPath); +} @@ -171,6 +179,7 @@ function openDialog(dmsId) { @on-fetch="(data) => setClaimDms(data)" ref="claimDmsRef" /> + (ClaimStates = data)" auto-load /> {{ claim.id }} - {{ claim.client.name }} ({{ claim.client.id }}) + + + + + + + {{ item.description }} + + + + + + @@ -447,4 +486,8 @@ function openDialog(dmsId) { .zindex { z-index: 1; } + +.change-state { + width: 10%; +} diff --git a/src/pages/Ticket/Card/TicketSummary.vue b/src/pages/Ticket/Card/TicketSummary.vue index 364ae04a6..af501240b 100644 --- a/src/pages/Ticket/Card/TicketSummary.vue +++ b/src/pages/Ticket/Card/TicketSummary.vue @@ -188,7 +188,7 @@ async function changeState(value) { :label="t('ticket.summary.landed')" :value="toDate(ticket.landed)" /> - + {{ t('ticket.summary.consigneePhone') }} diff --git a/src/pages/Zone/Card/ZoneCard.vue b/src/pages/Zone/Card/ZoneCard.vue new file mode 100644 index 000000000..948636c55 --- /dev/null +++ b/src/pages/Zone/Card/ZoneCard.vue @@ -0,0 +1,6 @@ + + + + diff --git a/src/pages/Zone/Card/ZoneDescriptor.vue b/src/pages/Zone/Card/ZoneDescriptor.vue new file mode 100644 index 000000000..486e4f063 --- /dev/null +++ b/src/pages/Zone/Card/ZoneDescriptor.vue @@ -0,0 +1,103 @@ + + + + + + + + {{ t('Summary') }} + + + + + + {{ console.log('entity', entity) }} + + + + + + + + + + +es: + Summary: Detalles + The zone will be deleted: El envío será eliminado + Do you want to delete this zone?: ¿Quieres eliminar este envío? + All zones with current agency: Todos los envíos con la agencia actual + Agency: Agencia + Closing hour: Hora de cierre + zoneing days: Días de viaje + Price: Precio + Bonus: Bonificación + diff --git a/src/pages/Zone/Card/ZoneDescriptorMenuItems.vue b/src/pages/Zone/Card/ZoneDescriptorMenuItems.vue new file mode 100644 index 000000000..b6c7f28b3 --- /dev/null +++ b/src/pages/Zone/Card/ZoneDescriptorMenuItems.vue @@ -0,0 +1,93 @@ + + + + + + + {{ t('To clone zone') }} + + + + + + {{ t('deleteOrder') }} + + + + +en: + deleteOrder: Delete order + confirmDeletion: Confirm deletion + confirmDeletionMessage: Are you sure you want to delete this order? + +es: + To clone zone: Clonar zone + deleteOrder: Eliminar pedido + confirmDeletion: Confirmar eliminación + confirmDeletionMessage: Seguro que quieres eliminar este pedido? + + diff --git a/src/pages/Zone/Card/ZoneDescriptorProxy.vue b/src/pages/Zone/Card/ZoneDescriptorProxy.vue new file mode 100644 index 000000000..15c5fb0e5 --- /dev/null +++ b/src/pages/Zone/Card/ZoneDescriptorProxy.vue @@ -0,0 +1,16 @@ + + + + + + + diff --git a/src/pages/Zone/Card/ZoneSummary.vue b/src/pages/Zone/Card/ZoneSummary.vue new file mode 100644 index 000000000..00df03cb0 --- /dev/null +++ b/src/pages/Zone/Card/ZoneSummary.vue @@ -0,0 +1,94 @@ + + + + + + {{ entity.id }} - {{ entity.firstName }} {{ entity.lastName }} + + + + + + + + + + + + + + + {{ t('zone.summary.phoneExtension') }} + + + + + + {{ t('zone.summary.entPhone') }} + + + + + + + + + + + + + {{ t('zone.summary.sipExtension') }} + + + + + + + diff --git a/src/router/modules/index.js b/src/router/modules/index.js index 941358d26..7fff2f2e5 100644 --- a/src/router/modules/index.js +++ b/src/router/modules/index.js @@ -17,6 +17,7 @@ import roadmap from './roadmap'; import Parking from './parking'; import Agency from './agency'; import ItemType from './itemType'; +import Zone from './zone'; export default [ Item, @@ -38,4 +39,5 @@ export default [ Parking, Agency, ItemType, + Zone, ]; diff --git a/src/router/modules/zone.js b/src/router/modules/zone.js new file mode 100644 index 000000000..079dfaa84 --- /dev/null +++ b/src/router/modules/zone.js @@ -0,0 +1,160 @@ +import { RouterView } from 'vue-router'; + +export default { + path: '/zone', + name: 'Zone', + meta: { + title: 'zones', + icon: 'vn:zone', + moduleName: 'Zone', + }, + component: RouterView, + redirect: { name: 'ZoneMain' }, + menus: { + main: [ + /*'ZoneList', 'ZoneDeliveryList', 'ZoneUpcomingList'*/ + ], + card: [ + // + ], + }, + children: [ + // { + // path: '/zone', + // name: 'ZoneMain', + // component: () => import('src/pages/Zone/ZoneMain.vue'), + // redirect: { name: 'ZoneList' }, + // children: [ + // { + // path: 'list', + // name: 'ZoneList', + // meta: { + // title: 'zonesList', + // icon: 'vn:zone', + // }, + // component: () => import('src/pages/Zone/ZoneList.vue'), + // }, + // { + // path: 'create', + // name: 'ZoneCreate', + // meta: { + // title: 'zoneCreate', + // icon: 'create', + // }, + // component: () => import('src/pages/Zone/ZoneCreate.vue'), + // }, + // { + // path: ':id/edit', + // name: 'ZoneEdit', + // meta: { + // title: 'zoneEdit', + // icon: 'edit', + // }, + // component: () => import('src/pages/Zone/ZoneCreate.vue'), + // }, + // { + // path: 'counter', + // name: 'ZoneCounter', + // meta: { + // title: 'zoneCounter', + // icon: 'add_circle', + // }, + // component: () => import('src/pages/Zone/ZoneCounter.vue'), + // }, + // ], + // }, + { + name: 'ZoneCard', + path: ':id', + component: () => import('src/pages/Zone/Card/ZoneCard.vue'), + redirect: { name: 'ZoneSummary' }, + children: [ + { + name: 'ZoneSummary', + path: 'summary', + meta: { + title: 'summary', + icon: 'launch', + }, + component: () => import('src/pages/Zone/Card/ZoneSummary.vue'), + }, + // { + // path: '/zone/delivery', + // name: 'ZoneDeliveryMain', + // component: () => import('src/pages/Zone/ZoneMain.vue'), + // redirect: { name: 'ZoneDeliveryList' }, + // children: [ + // { + // path: 'list', + // name: 'ZoneDeliveryList', + // meta: { + // title: 'deliveryList', + // icon: 'today', + // }, + // component: () => + // import('src/pages/Zone/Delivery/ZoneDeliveryList.vue'), + // }, + // { + // path: 'create', + // name: 'ZoneDeliveryCreate', + // meta: { + // title: 'deliveryCreate', + // icon: 'create', + // }, + // component: () => + // import('src/pages/Zone/Delivery/ZoneDeliveryCreate.vue'), + // }, + // { + // path: ':id/edit', + // name: 'ZoneDeliveryEdit', + // meta: { + // title: 'deliveryEdit', + // icon: 'edit', + // }, + // component: () => + // import('src/pages/Zone/Delivery/ZoneDeliveryCreate.vue'), + // }, + // ], + // }, + // { + // path: '/zone/upcoming', + // name: 'ZoneUpcomingMain', + // component: () => import('src/pages/Zone/ZoneMain.vue'), + // redirect: { name: 'ZoneUpcomingList' }, + // children: [ + // { + // path: 'list', + // name: 'ZoneUpcomingList', + // meta: { + // title: 'upcomingList', + // icon: 'today', + // }, + // component: () => + // import('src/pages/Zone/Upcoming/ZoneUpcomingList.vue'), + // }, + // { + // path: 'create', + // name: 'ZoneUpcomingCreate', + // meta: { + // title: 'upcomingCreate', + // icon: 'create', + // }, + // component: () => + // import('src/pages/Zone/Upcoming/ZoneUpcomingCreate.vue'), + // }, + // { + // path: ':id/edit', + // name: 'ZoneUpcomingEdit', + // meta: { + // title: 'upcomingEdit', + // icon: 'edit', + // }, + // component: () => + // import('src/pages/Zone/Upcoming/ZoneUpcomingCreate.vue'), + // }, + // ], + // }, + ], + }, + ], +}; diff --git a/src/router/routes.js b/src/router/routes.js index 92145d44e..04780ee17 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -17,6 +17,7 @@ import entry from 'src/router/modules/entry'; import roadmap from 'src/router/modules/roadmap'; import parking from 'src/router/modules/parking'; import agency from 'src/router/modules/agency'; +import zone from 'src/router/modules/zone'; const routes = [ { @@ -75,6 +76,7 @@ const routes = [ parking, agency, ItemType, + zone, { path: '/:catchAll(.*)*', name: 'NotFound', diff --git a/src/stores/useNavigationStore.js b/src/stores/useNavigationStore.js index f075301f6..ee1e04e9b 100644 --- a/src/stores/useNavigationStore.js +++ b/src/stores/useNavigationStore.js @@ -21,6 +21,7 @@ export const useNavigationStore = defineStore('navigationStore', () => { 'ticket', 'worker', 'wagon', + 'zone', ]; const pinnedModules = ref([]); const role = useRole();