diff --git a/CHANGELOG.md b/CHANGELOG.md index f1f911d62..119f702f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,100 @@ +# Version 24.24 - 2024-06-11 + +### Added 🆕 + +- feat: 6942 hashtag in key : value summary by:jgallego +- feat: #6957: Rename FetchedTags instance tag by:Javier Segarra +- feat: refactor template by:Javier Segarra +- feat: refs #6600 Add option to add comment for photo motivation by:jorgep +- feat: refs #6942 test e2e tobook & toUnbook by:jorgep +- feat: refs #6942 to book summary button & reactive value by:jorgep +- feat: refs #6942 to unbook by:jorgep +- feat: refs #6942 url update by:jorgep +- feat: refs #6942 use correct currency in InvoiceIn components by:jorgep +- feat: refs #6942 vat rate total by:jorgep +- feat: refs #7494 new icons (7494-icons) by:alexm +- feat: refs #7494 new icons by:alexm +- feat: refs #7542 drop space by:jorgep +- feat: refs #7542 empty by:jorgep +- fix: refs #6942 changes and new features by:jorgep +- fix: style by:Javier Segarra +- style: color transparent when is fetive by:Javier Segarra +- style: fix color when is empty by:Javier Segarra +- style: reset poc style (6957_refactorFetechedTags) by:Javier Segarra +- style: reset poc style by:Javier Segarra +- style updates by:Javier Segarra + +### Changed 📦 + +- feat: refactor template by:Javier Segarra +- perf: 6957 add color as new shared variable by:Javier Segarra +- perf: 6957 change fetchedTags color by:Javier Segarra +- perf: remove local tree variable by:Javier Segarra +- refactor: add flat by:alexm +- refactor: refs #6600 replace QInput to VnInput by:jorgep +- refactor: refs #6652 improved defaulter section by:Jon +- refactor: refs #6942 Fix getTotalAmount function to correctly calculate the total amount in InvoiceInDueDay.vue by:jorgep +- refactor: refs #6942 new summary layout by:jorgep +- refactor: refs #6942 store key & actions by:jorgep +- refactor: refs #6942 summary by:jorgep +- refactor: refs #6942 use router hook by:jorgep +- refactor: refs #6942 WIP summary layout by:jorgep + +### Fixed 🛠️ + +- fix: 9-12 by:Javier Segarra +- fix: defaulter icon by:alexm +- fix: refs #5186 validation by:jorgep +- fix: refs #6095 add reFfk null on search by:pablone +- fix: refs #6942 cardDescriptor use store if its popup or different source data by:jorgep +- fix: refs #6942 changes and new features by:jorgep +- fix: refs #6942 drop comments by:jorgep +- fix: refs #6942 drop console by:jorgep +- fix: refs #6942 drop console.log by:jorgep +- fix: refs #6942 e2e test (origin/6942-warmfix-fixFormModel) by:jorgep +- fix: refs #6942 e2e tests by:jorgep +- fix: refs #6942 e2e tests by:jorgep +- fix: refs #6942 fix emit on data saved by:jorgep +- fix: refs #6942 fix emit on reset by:jorgep +- fix: refs #6942 fix vncard by:jorgep +- fix: refs #6942 formModel & CardDescriptor by:jorgep +- fix: refs #6942 formModel watch changes & invoiceInCreate by:jorgep +- fix: refs #6942 import by:jorgep +- fix: refs #6942 reloading by:jorgep +- fix: refs #6942 rollback by:jorgep +- fix: refs #6942 selectable expense by:jorgep +- fix: refs #6942 skip e2e tests by:jorgep +- fix: refs #6942 table bottom highlight & drop isBooked field by:jorgep +- fix: refs #6942 tests e2e by:jorgep +- fix: refs #6942 tests & summary table spacing by:jorgep +- fix: refs #6942 unit tests by:jorgep +- fix: refs #6942 vnLocation by:jorgep +- fix: refs #6942 wip: formModel by:jorgep +- fix: refs #7542 use right panel by:jorgep +- fix: searchbar redirect by:alexm +- fix: style by:Javier Segarra +- fix: WorkerCalendarItem by:Javier Segarra +- mini fix by:wbuezas +- refs #6111 clean code fix changes by:carlossa +- refs #6111 fix merge, fix column by:carlossa +- refs #6111 fix qtable, actions, scroll by:carlossa +- refs #6111 fix routeList by:carlossa +- refs #6111 fix sticky by:carlossa +- refs #6111 fix trad remove logs by:carlossa +- refs #6111 fix visibleColumns by:carlossa +- refs #6111 routeList fix by:carlossa +- refs #6332 fix calendar by:carlossa +- refs #6332 fix colors by:carlossa +- refs #6332 fix festive by:carlossa +- refs #6820 fix BasicData Tickets by:carlossa +- refs #6820 fix error front by:carlossa +- refs #6820 fix traduction by:carlossa +- refs #7391 fix textarea by:carlossa +- refs #7396 fix summary by:carlossa +- Search childs fix by:wbuezas +- small fix by:wbuezas +- style: fix color when is empty by:Javier Segarra + # Changelog All notable changes to this project will be documented in this file. @@ -11,6 +108,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - (Item) => Se añade la opción de añadir un comentario del motivo de hacer una foto - (Worker) => Se añade la opción de crear un trabajador ajeno a la empresa +- (Route) => Ahora se muestran todos los cmrs ## [2418.01] diff --git a/Jenkinsfile b/Jenkinsfile index 7cad5ef41..1766e3aea 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -94,7 +94,7 @@ pipeline { sh 'quasar build' script { def packageJson = readJSON file: 'package.json' - env.VERSION = packageJson.version + env.VERSION = "${packageJson.version}-build${env.BUILD_ID}" } dockerBuild() } @@ -106,7 +106,7 @@ pipeline { steps { script { def packageJson = readJSON file: 'package.json' - env.VERSION = packageJson.version + env.VERSION = "${packageJson.version}-build${env.BUILD_ID}" } withKubeConfig([ serverUrl: "$KUBERNETES_API", diff --git a/changelog.sh b/changelog.sh new file mode 100644 index 000000000..8cd7b4716 --- /dev/null +++ b/changelog.sh @@ -0,0 +1,34 @@ +features_types=(chore feat style) +changes_types=(refactor perf) +fix_types=(fix revert) +file="CHANGELOG.md" +file_tmp="temp_log.txt" +file_current_tmp="temp_current_log.txt" + +setType(){ + echo "### $1" >> $file_tmp + arr=("$@") + echo "" > $file_current_tmp + for i in "${arr[@]}" + do + git log --grep="$i" --oneline --no-merges --format="- %s %d by:%an" master..test >> $file_current_tmp + done + # remove duplicates + sort -o $file_current_tmp -u $file_current_tmp + cat $file_current_tmp >> $file_tmp + echo "" >> $file_tmp + # remove tmp current file + [ -e $file_current_tmp ] && rm $file_current_tmp +} + +echo "# Version XX.XX - XXXX-XX-XX" >> $file_tmp +echo "" >> $file_tmp + +setType "Added 🆕" "${features_types[@]}" +setType "Changed 📦" "${changes_types[@]}" +setType "Fixed 🛠️" "${fix_types[@]}" + +cat $file >> $file_tmp +mv $file_tmp $file + + diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue index 377708143..426d99b9a 100644 --- a/src/components/FormModel.vue +++ b/src/components/FormModel.vue @@ -12,6 +12,7 @@ import SkeletonForm from 'components/ui/SkeletonForm.vue'; import VnConfirm from './ui/VnConfirm.vue'; import { tMobile } from 'src/composables/tMobile'; import { useArrayData } from 'src/composables/useArrayData'; +import { useRoute } from 'vue-router'; const { push } = useRouter(); const quasar = useQuasar(); @@ -20,6 +21,7 @@ const stateStore = useStateStore(); const { t } = useI18n(); const { validate } = useValidator(); const { notify } = useNotify(); +const route = useRoute(); const $props = defineProps({ url: { @@ -28,7 +30,7 @@ const $props = defineProps({ }, model: { type: String, - default: '', + default: null, }, filter: { type: Object, @@ -82,17 +84,18 @@ const $props = defineProps({ description: 'It is used for redirect on click "save and continue"', }, }); - const emit = defineEmits(['onFetch', 'onDataSaved']); - +const modelValue = computed( + () => $props.model ?? `formModel_${route?.meta?.title ?? route.name}` +); const componentIsRendered = ref(false); -const arrayData = useArrayData($props.model); +const arrayData = useArrayData(modelValue); const isLoading = ref(false); // Si elegimos observar los cambios del form significa que inicialmente las actions estaran deshabilitadas const isResetting = ref(false); const hasChanges = ref(!$props.observeFormChanges); const originalData = ref({}); -const formData = computed(() => state.get($props.model)); +const formData = computed(() => state.get(modelValue)); const formUrl = computed(() => $props.url); const defaultButtons = computed(() => ({ save: { @@ -114,7 +117,7 @@ onMounted(async () => { nextTick(() => (componentIsRendered.value = true)); // Podemos enviarle al form la estructura de data inicial sin necesidad de fetchearla - state.set($props.model, $props.formInitialData); + state.set(modelValue, $props.formInitialData); if ($props.autoLoad && !$props.formInitialData && $props.url) await fetch(); else if (arrayData.store.data) updateAndEmit('onFetch', arrayData.store.data); @@ -161,8 +164,8 @@ onBeforeRouteLeave((to, from, next) => { onUnmounted(() => { // Restauramos los datos originales en el store si se realizaron cambios en el formulario pero no se guardaron, evitando modificaciones erróneas. - if (hasChanges.value) return state.set($props.model, originalData.value); - if ($props.clearStoreOnUnmount) state.unset($props.model); + if (hasChanges.value) return state.set(modelValue, originalData.value); + if ($props.clearStoreOnUnmount) state.unset(modelValue); }); async function fetch() { @@ -174,7 +177,7 @@ async function fetch() { updateAndEmit('onFetch', data); } catch (e) { - state.set($props.model, {}); + state.set(modelValue, {}); originalData.value = {}; } } @@ -235,11 +238,11 @@ function filter(value, update, filterOptions) { } function updateAndEmit(evt, val, res) { - state.set($props.model, val); + state.set(modelValue, val); originalData.value = val && JSON.parse(JSON.stringify(val)); if (!$props.url) arrayData.store.data = val; - emit(evt, state.get($props.model), res); + emit(evt, state.get(modelValue), res); } defineExpose({ save, isLoading, hasChanges }); diff --git a/src/components/common/VnInput.vue b/src/components/common/VnInput.vue index 6144f975d..c84a55122 100644 --- a/src/components/common/VnInput.vue +++ b/src/components/common/VnInput.vue @@ -13,6 +13,10 @@ const $props = defineProps({ type: Boolean, default: false, }, + info: { + type: String, + default: '', + }, }); const { t } = useI18n(); @@ -83,6 +87,11 @@ const inputRules = [ v-if="hover && value && !$attrs.disabled" @click="value = null" > + + + {{ info }} + + diff --git a/src/components/ui/CardList.vue b/src/components/ui/CardList.vue index e8392b13e..c9b062457 100644 --- a/src/components/ui/CardList.vue +++ b/src/components/ui/CardList.vue @@ -28,7 +28,7 @@ const toggleCardCheck = (item) => {
{{ $props.title }}
- + {{ t('ID') }}: {{ $props.id }} diff --git a/src/composables/useAcl.js b/src/composables/useAcl.js new file mode 100644 index 000000000..46aaa3c25 --- /dev/null +++ b/src/composables/useAcl.js @@ -0,0 +1,33 @@ +import axios from 'axios'; +import { useState } from './useState'; + +export function useAcl() { + const state = useState(); + + async function fetch() { + const { data } = await axios.get('VnUsers/acls'); + const acls = {}; + data.forEach((acl) => { + acls[acl.model] = acls[acl.model] || {}; + acls[acl.model][acl.property] = acls[acl.model][acl.property] || {}; + acls[acl.model][acl.property][acl.accessType] = true; + }); + + state.setAcls(acls); + } + + function hasAny(model, prop, accessType) { + const acls = state.getAcls().value[model]; + if (acls) + return ['*', prop].some((key) => { + const acl = acls[key]; + return acl && (acl['*'] || acl[accessType]); + }); + } + + return { + fetch, + hasAny, + state, + }; +} diff --git a/src/composables/useSession.js b/src/composables/useSession.js index 56bce0279..ca2abef00 100644 --- a/src/composables/useSession.js +++ b/src/composables/useSession.js @@ -1,5 +1,6 @@ import { useState } from './useState'; import { useRole } from './useRole'; +import { useAcl } from './useAcl'; import { useUserConfig } from './useUserConfig'; import axios from 'axios'; import useNotify from './useNotify'; @@ -88,6 +89,7 @@ export function useSession() { setSession(data); await useRole().fetch(); + await useAcl().fetch(); await useUserConfig().fetch(); await useTokenConfig().fetch(); diff --git a/src/composables/useState.js b/src/composables/useState.js index f20209494..c2ac1740c 100644 --- a/src/composables/useState.js +++ b/src/composables/useState.js @@ -15,6 +15,7 @@ if (sessionStorage.getItem('user')) user.value = JSON.parse(sessionStorage.getItem('user')); const roles = ref([]); +const acls = ref([]); const tokenConfig = ref({}); const drawer = ref(true); const headerMounted = ref(false); @@ -42,6 +43,14 @@ export function useState() { function setRoles(data) { roles.value = data; } + + function getAcls() { + return computed(() => acls.value); + } + + function setAcls(data) { + acls.value = data; + } function getTokenConfig() { return computed(() => { return tokenConfig.value; @@ -69,6 +78,8 @@ export function useState() { setUser, getRoles, setRoles, + getAcls, + setAcls, getTokenConfig, setTokenConfig, set, diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 8ccdf640f..72c192fcc 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 @@ -581,6 +582,9 @@ claim: created: Created state: State pickup: Pick up + null: No + agency: Agency + delivery: Delivery photo: fileDescription: 'Claim id {claimId} from client {clientName} id {clientId}' noData: 'There are no images/videos, click here or drag and drop the file' @@ -962,7 +966,7 @@ roadmap: route: pageTitles: routes: Routes - cmrsList: External CMRs list + cmrsList: CMRs list RouteList: List routeCreate: New route basicData: Basic Data @@ -1177,6 +1181,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 452421343..f95d3bff7 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 @@ -950,7 +951,7 @@ roadmap: route: pageTitles: routes: Rutas - cmrsList: Listado de CMRs externos + cmrsList: Listado de CMRs RouteList: Listado routeCreate: Nueva ruta basicData: Datos básicos @@ -1166,6 +1167,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/AccountConnections.vue b/src/pages/Account/AccountConnections.vue new file mode 100644 index 000000000..98208e5f2 --- /dev/null +++ b/src/pages/Account/AccountConnections.vue @@ -0,0 +1,112 @@ + + + + + +es: + Session killed: Sesión matada + Session will be killed: Se va a matar la sesión + Are you sure you want to continue?: ¿Seguro que quieres continuar? + 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 babedae70..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,21 @@ 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 + created: Created + killSession: Kill session acls: role: Role accessType: Access type diff --git a/src/pages/Account/locale/es.yml b/src/pages/Account/locale/es.yml index 36125f361..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,24 @@ 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 + created: Creado + killSession: Matar sesión acls: role: Rol accessType: Tipo de acceso 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 () => { + import { ref } from 'vue'; import { useI18n } from 'vue-i18n'; - import FetchData from 'components/FetchData.vue'; import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue'; import VnInputDate from 'components/common/VnInputDate.vue'; import VnInput from 'src/components/common/VnInput.vue'; +import VnSelect from 'src/components/common/VnSelect.vue'; const { t } = useI18n(); const props = defineProps({ @@ -16,10 +16,11 @@ const props = defineProps({ }); const countries = ref(); +const warehouses = ref(); - - en: params: diff --git a/src/pages/Route/Cmr/CmrList.vue b/src/pages/Route/Cmr/CmrList.vue index 154e49977..cbfc3751a 100644 --- a/src/pages/Route/Cmr/CmrList.vue +++ b/src/pages/Route/Cmr/CmrList.vue @@ -14,6 +14,7 @@ const { t } = useI18n(); const { getTokenMultimedia } = useSession(); const token = getTokenMultimedia(); const selected = ref([]); +const warehouses = ref([]); const columns = computed(() => [ { @@ -63,6 +64,13 @@ const columns = computed(() => [ sortable: true, headerStyle: 'padding-left: 33px', }, + { + name: 'warehouseFk', + label: t('globals.warehouse'), + field: ({ warehouseFk }) => warehouseFk, + align: 'center', + sortable: true, + }, { name: 'icons', align: 'center', @@ -99,7 +107,7 @@ function downloadPdfs() {
+