diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue index fe15d2db1..078c95b2a 100644 --- a/src/components/CrudModel.vue +++ b/src/components/CrudModel.vue @@ -89,6 +89,7 @@ defineExpose({ saveChanges, getChanges, formData, + vnPaginateRef, }); async function fetch(data) { @@ -271,8 +272,9 @@ function isEmpty(obj) { if (obj.length > 0) return false; } -async function reload() { - vnPaginateRef.value.fetch(); +async function reload(params) { + const data = await vnPaginateRef.value.fetch(params); + fetch(data); } watch(formUrl, async () => { @@ -284,10 +286,10 @@ watch(formUrl, async () => { - @@ -231,7 +232,9 @@ defineExpose({ :style="mode == 'table' && 'max-height: 92vh'" virtual-scroll @virtual-scroll=" - (event) => event.index > rows.length - 2 && VnPaginateRef.paginate() + (event) => + event.index > rows.length - 2 && + CrudModelRef.vnPaginateRef.paginate() " @row-click="(_, row) => rowClickFunction(row)" > @@ -421,7 +424,7 @@ defineExpose({ - + diff --git a/src/components/ui/VnPaginate.vue b/src/components/ui/VnPaginate.vue index 2b898f747..3752d0840 100644 --- a/src/components/ui/VnPaginate.vue +++ b/src/components/ui/VnPaginate.vue @@ -105,6 +105,11 @@ watch( } ); +watch( + () => store.data, + (data) => emit('onFetch', data) +); + const addFilter = async (filter, params) => { await arrayData.addFilter({ filter, params }); }; @@ -118,6 +123,7 @@ async function fetch(params) { isLoading.value = false; } emit('onFetch', store.data); + return store.data; } async function paginate() { @@ -149,6 +155,7 @@ function endPagination() { emit('onPaginate'); } async function onLoad(index, done) { + console.log('onLoad?'); if (!store.data) return done(); if (store.data.length === 0 || !props.url) return done(false); diff --git a/src/composables/useArrayData.js b/src/composables/useArrayData.js index c20260c59..6db4251e1 100644 --- a/src/composables/useArrayData.js +++ b/src/composables/useArrayData.js @@ -34,7 +34,6 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) { delete params.filter; store.userParams = { ...params, ...store.userParams }; store.userFilter = { ...JSON.parse(filter), ...store.userFilter }; - console.log('store.userParams', store.userParams, store.userFilter); } }); @@ -126,7 +125,6 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) { } function destroy() { - console.log('DESTROY', key); if (arrayDataStore.get(key)) { arrayDataStore.clear(key); } @@ -223,13 +221,11 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) { ? path.replace(/\/(list|:id)|-list/, `/${store.data[0].id}`) : path.replace(/:id.*/, ''); - console.log('to: ', to, store.userParams, store.userFilter, route.query); if (route.path != to) { destroy(); const pushUrl = { path: to }; if (to.endsWith('/list') || to.endsWith('/')) pushUrl.query = newUrl.query; - console.log('pushUrl: ', to, pushUrl.query); return router.push(pushUrl); } } diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index d5e669cf4..966aac233 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -472,6 +472,7 @@ ticket: agency: Agency zone: Zone warehouse: Warehouse + collection: Collection route: Route invoice: Invoice shipped: Shipped @@ -1187,6 +1188,7 @@ item: available: Available warehouseText: 'Calculated on the warehouse of { warehouseName }' itemDiary: Item diary + producer: Producer list: id: Identifier grouping: Grouping diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index d8db0c44a..3749904b3 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -470,6 +470,7 @@ ticket: agency: Agencia zone: Zona warehouse: Almacén + collection: Colección route: Ruta invoice: Factura shipped: Enviado @@ -1177,6 +1178,7 @@ item: available: Disponible warehouseText: 'Calculado sobre el almacén de { warehouseName }' itemDiary: Registro de compra-venta + producer: Productor list: id: Identificador grouping: Grouping diff --git a/src/pages/Account/AccountAccounts.vue b/src/pages/Account/AccountAccounts.vue new file mode 100644 index 000000000..3d7dda899 --- /dev/null +++ b/src/pages/Account/AccountAccounts.vue @@ -0,0 +1,104 @@ + + + + + +es: + Roles synchronized!: ¡Roles sincronizados! + Synchronizing in the background: Sincronizando en segundo plano + diff --git a/src/pages/Account/AccountAcls.vue b/src/pages/Account/AccountAcls.vue index 82d171ce7..bd7f0f9ae 100644 --- a/src/pages/Account/AccountAcls.vue +++ b/src/pages/Account/AccountAcls.vue @@ -8,12 +8,12 @@ import VnSearchbar from 'components/ui/VnSearchbar.vue'; import CardList from 'src/components/ui/CardList.vue'; import VnLv from 'src/components/ui/VnLv.vue'; import AclFilter from './Acls/AclFilter.vue'; +import AclFormView from './Acls/AclFormView.vue'; import { useVnConfirm } from 'composables/useVnConfirm'; import { useStateStore } from 'stores/useStateStore'; import axios from 'axios'; import useNotify from 'src/composables/useNotify.js'; -import AclFormView from './Acls/AclFormView.vue'; defineProps({ id: { diff --git a/src/pages/Account/AccountLdap.vue b/src/pages/Account/AccountLdap.vue new file mode 100644 index 000000000..77c4d89f8 --- /dev/null +++ b/src/pages/Account/AccountLdap.vue @@ -0,0 +1,171 @@ + + + + + +es: + LDAP connection established!: ¡Conexión con LDAP establecida! + diff --git a/src/pages/Account/AccountSamba.vue b/src/pages/Account/AccountSamba.vue new file mode 100644 index 000000000..25428a674 --- /dev/null +++ b/src/pages/Account/AccountSamba.vue @@ -0,0 +1,187 @@ + + + + + +es: + Samba connection established!: ¡Conexión con LDAP establecida! + diff --git a/src/pages/Account/Alias/Card/AliasBasicData.vue b/src/pages/Account/Alias/Card/AliasBasicData.vue index 035ba0e8b..ba940cda5 100644 --- a/src/pages/Account/Alias/Card/AliasBasicData.vue +++ b/src/pages/Account/Alias/Card/AliasBasicData.vue @@ -1,11 +1,9 @@ diff --git a/src/pages/Account/locale/en.yml b/src/pages/Account/locale/en.yml index bbc1da69e..dca9b45d9 100644 --- a/src/pages/Account/locale/en.yml +++ b/src/pages/Account/locale/en.yml @@ -67,6 +67,7 @@ ldap: groupDN: Group DN testConnection: Test connection success: LDAP connection established! + password: Password samba: enableSync: Enable synchronization domainController: Domain controller @@ -78,6 +79,16 @@ samba: verifyCertificate: Verify certificate testConnection: Test connection success: Samba connection established! +accounts: + homedir: Homedir base + shell: Shell + idBase: User and role base id + min: Min + max: Max + warn: Warn + inact: Inact + syncAll: Synchronize all + syncRoles: Synchronize roles connections: refresh: Refresh username: Username diff --git a/src/pages/Account/locale/es.yml b/src/pages/Account/locale/es.yml index 97bcd1d00..896cc8ea9 100644 --- a/src/pages/Account/locale/es.yml +++ b/src/pages/Account/locale/es.yml @@ -70,6 +70,7 @@ mailAlias: name: Nombre isPublic: Público ldap: + password: Contraseña enableSync: Habilitar sincronización server: Servidor rdn: RDN @@ -86,9 +87,19 @@ samba: userAD: Usuario AD passwordAD: Contraseña AD domainPart: DN usuarios (sin la parte del dominio) - Verify certificate: Verificar certificado + verifyCertificate: Verificar certificado testConnection: Probar conexión success: ¡Conexión con Samba establecida! +accounts: + homedir: Directorio base para carpetas de usuario + shell: Intérprete de línea de comandos + idBase: Id base usuarios y roles + min: Min + max: Max + warn: Warn + inact: Inact + syncAll: Sincronizar todo + syncRoles: Sincronizar roles connections: refresh: Actualizar username: Nombre de usuario diff --git a/src/pages/Item/Card/ItemDescriptor.vue b/src/pages/Item/Card/ItemDescriptor.vue index 305d29b8b..155c9eb4c 100644 --- a/src/pages/Item/Card/ItemDescriptor.vue +++ b/src/pages/Item/Card/ItemDescriptor.vue @@ -16,6 +16,7 @@ import useCardDescription from 'src/composables/useCardDescription'; import { useSession } from 'src/composables/useSession'; import { getUrl } from 'src/composables/getUrl'; import axios from 'axios'; +import { dashIfEmpty } from 'src/filters'; const $props = defineProps({ id: { @@ -182,6 +183,10 @@ const openCloneDialog = async () => { + { ticketUrl.value = (await getUrl('ticket/')) + entityId.value + '/'; @@ -159,6 +160,20 @@ async function changeState(value) { :label="t('ticket.summary.warehouse')" :value="ticket.warehouse?.name" /> + + +