diff --git a/src/components/VnTable/VnOrder.vue b/src/components/VnTable/VnOrder.vue index ac77c8ac6..375def792 100644 --- a/src/components/VnTable/VnOrder.vue +++ b/src/components/VnTable/VnOrder.vue @@ -5,7 +5,7 @@ const model = defineModel({ type: Object, required: true }); const $props = defineProps({ name: { type: String, - required: true, + default: '', }, label: { type: String, @@ -28,6 +28,7 @@ const hover = ref(); const arrayData = useArrayData($props.dataKey, { searchUrl: $props.searchUrl }); async function orderBy(name, direction) { + if (!name) return; switch (direction) { case 'DESC': direction = undefined; @@ -40,7 +41,7 @@ async function orderBy(name, direction) { break; } if (!direction) return await arrayData.deleteOrder(name); - await arrayData.addOrder($props.name, direction); + await arrayData.addOrder(name, direction); } defineExpose({ orderBy }); @@ -54,7 +55,7 @@ defineExpose({ orderBy }); > {{ label }} [], + }, }); const { notify } = useNotify(); @@ -30,8 +34,12 @@ function setUserConfigViewData(data, isLocal) { if (!data) return; // Importante: El name de las columnas de la tabla debe conincidir con el name de las variables que devuelve la view config if (!isLocal) localColumns.value = []; + // Array to Object + const skippeds = $props.skip.reduce((a, v) => ({ ...a, [v]: v }), {}); + for (let column of columns.value) { const { label, name } = column; + if (skippeds[name]) continue; column.visible = data[name] ?? true; if (!isLocal) localColumns.value.push({ name, label, visible: column.visible }); } diff --git a/src/components/ui/VnSubToolbar.vue b/src/components/ui/VnSubToolbar.vue index df6fcbcb7..cfefe98a7 100644 --- a/src/components/ui/VnSubToolbar.vue +++ b/src/components/ui/VnSubToolbar.vue @@ -1,5 +1,5 @@ - es: + es: isOwn: Tiene propietario isAnyVolumeAllowed: Permite cualquier volumen Search agency: Buscar agencia diff --git a/src/pages/Route/Cmr/CmrList.vue b/src/pages/Route/Cmr/CmrList.vue index 74a070cbf..dd9e2a75a 100644 --- a/src/pages/Route/Cmr/CmrList.vue +++ b/src/pages/Route/Cmr/CmrList.vue @@ -117,6 +117,7 @@ function downloadPdfs() { :columns="columns" :right-search="true" :use-model="true" + default-mode="card" />