diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e1d4c433..f1d10b26e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,184 @@ +# Version 24.38 - 2024-09-17 + +### Added 🆕 + +- chore: refs #6772 fix e2e (origin/6772-warmfix-fixE2e) by:jorgep +- chore: refs #7323 worker changes by:jorgep +- chore: refs #7353 fix warnings by:jorgep +- chore: refs #7353 use Vue component nomenclature by:jorgep +- chore: refs #7356 fix type by:jorgep +- feat(AccountConnections): use VnToken by:alexm +- feat: add key to routerView by:Javier Segarra +- feat: add plus shortcut in VnTable by:Javier Segarra +- feat: add row by:Javier Segarra +- feat: addRow withour dialog by:Javier Segarra +- feat: apply mixin by:Javier Segarra +- feat by:Javier Segarra +- feat: change navBar buttons by:Javier Segarra +- feat: dense rows by:Javier Segarra +- feat: fields with wrong name by:jgallego +- feat: fix bugs and filters by:Javier Segarra +- feat: fix refund parameters by:jgallego +- feat: handle create row by:Javier Segarra +- feat: handle dates by:Javier Segarra +- feat: handle qCheckbox 3rd state by:Javier Segarra +- feat: imrpove VnInputTime to set cursor at start by:Javier Segarra +- feat: keyShortcut directive by:Javier Segarra +- feat: minor fixes by:jgallego +- feat: only filter by isDestiny by:Javier Segarra +- feat: refs #211153 businessDataLinkGrafana by:robert +- feat: refs #7129 add km start and end on create form by:pablone +- feat: refs #7353 add filter & fix customTags by:jorgep +- feat: refs #7353 add locale by:jorgep +- feat: refs #7353 add no one opt by:jorgep +- feat: refs #7353 add right icons by:jorgep +- feat: refs #7353 imporve toDateFormat by:jorgep +- feat: refs #7353 salesPerson nickname & id by:jorgep +- feat: refs #7353 split sections by:jorgep +- feat: refs #7847 remove reload btn by:jorgep +- feat: refs #7847 remove reload fn by:jorgep +- feat: refs #7889 added shortcuts to modules by:Jon +- feat: refs #7911 added shortcut to modules by:Jon +- feat: refuncInvoiceForm component by:jgallego +- feat: remove duplicity by:Javier Segarra +- feat: remove future itemFixedPrices by:Javier Segarra +- feat: replace stickyButtons by subtoolbar by:Javier Segarra +- feat: required validation by:Javier Segarra +- feat: show bad dates by:Javier Segarra +- feat: showdate icons by:Javier Segarra +- feat: solve ItemFixedFilterPanel by:Javier Segarra +- feat: transfer an invoice by:jgallego +- feat: try to fix ItemFixedFilterPanel by:Javier Segarra +- feat: unnecessary changes by:Javier Segarra +- feat: update changelog (origin/7896_down_devToTest_2436) by:Javier Segarra +- feat: updates by:Javier Segarra +- feat: update version and changelog by:Javier Segarra +- feat: vnInput\* by:Javier Segarra +- feat: with VnTable by:Javier Segarra +- refs #6772 feat: fix approach by:Javier Segarra +- refs #6772 feat: refresh shelving.basic-data by:Javier Segarra +- style: show subName value by:Javier Segarra + +### Changed 📦 + +- perf: add v-shortcut in VnCard by:Javier Segarra +- perf: approach by:Javier Segarra +- perf: change directive location by:Javier Segarra +- perf: change slots order by:Javier Segarra +- perf: examples by:Javier Segarra +- perf: hide icon for VnInputDate by:Javier Segarra +- perf: improve ItemFixedPricefilterPanel by:Javier Segarra +- perf: improve mainShrotcutMixin by:Javier Segarra +- perf: minor clean code by:Javier Segarra +- perf: onRowchange by:Javier Segarra +- perf: order by by:Javier Segarra +- perf: order components by:Javier Segarra +- perf: refs #7889 perf shortcut test by:Jon +- perf: remove console.log by:Javier Segarra +- perf: remove icons in header slot by:Javier Segarra +- perf: remove print variables by:Javier Segarra +- perf: restore CustomerBasicData by:Javier Segarra +- refactor: deleted useless prop by:Jon +- refactor: deleted useless prop in FetchedTags by:Jon +- refactor: refs #7323 drop useless code by:jorgep +- refactor: refs #7353 clients correction by:jorgep +- refactor: refs #7353 clients correction wip by:jorgep +- refactor: refs #7353 ease logic by:jorgep +- refactor: refs #7353 order correction by:jorgep +- refactor: refs #7353 simplify code by:jorgep +- refactor: refs #7353 tickets correction by:jorgep +- refactor: refs #7353 use global locales by:jorgep +- refactor: refs #7354 changed descriptor menu options by:Jon +- refactor: refs #7354 changed icon color in table and notification when deleting a zone by:Jon +- refactor: refs #7354 fix tableFilters by:Jon +- refactor: refs #7354 modified VnInputTime by:Jon +- refactor: refs #7354 refactor deliveryPanel by:Jon +- refactor: refs #7354 refactor zones section and fixed e2e tests by:Jon +- refactor: refs #7354 requested changes by:Jon +- refactor: refs #7354 reverse deliveryPanel changes by:Jon +- refactor: refs #7354 Zone migration changes by:Jon +- refactor: refs #7889 deleted subtitle attr and use keyBinding instead by:Jon +- refactor: refs #7889 modified shortcut and dashboard, and added tootlip in LeftMenu by:Jon +- refs #6722 perf: not fetch when id not exists by:Javier Segarra +- refs #6772 perf: change variable name by:JAVIER SEGARRA MARTINEZ +- refs #6772 perf: use ArrayData (6772_reload_sections) by:Javier Segarra +- refs #7283 refactor fix ItemDescriptor by:carlossa +- refs #7283 refactor ItexDescriptor by:carlossa + +### Fixed 🛠️ + +- chore: refs #6772 fix e2e (origin/6772-warmfix-fixE2e) by:jorgep +- chore: refs #7353 fix warnings by:jorgep +- chore: refs #7356 fix type by:jorgep +- feat: fix bugs and filters by:Javier Segarra +- feat: fix refund parameters by:jgallego +- feat: minor fixes by:jgallego +- feat: refs #7353 add filter & fix customTags by:jorgep +- feat: try to fix ItemFixedFilterPanel by:Javier Segarra +- fix: add border-top by:Javier Segarra +- fix: added missing descriptors and small details by:Jon +- fix branch by:carlossa +- fix: call upsert when crudModel haschanges by:Javier Segarra +- fix(ClaimList): fix summary by:alexm +- fix: cli warnings by:Javier Segarra +- fix: editTableOptions by:Javier Segarra +- fix events and descriptor menu by:Jon +- fix: InvoiceIn sections (origin/6772_reload_sections) by:Javier Segarra +- fix: minor changes by:Javier Segarra +- fix: minor error whit dates by:Javier Segarra +- fix: module icon by:Javier Segarra +- fix: options QDate by:Javier Segarra +- fix: refs #6900 e2e error by:jorgep +- fix: refs #6900 rollback by:jorgep +- fix: refs #7353 css by:jorgep +- fix: refs #7353 hide search param (origin/7353-warmfix-fixSearchbar) by:jorgep +- fix: refs #7353 iron out filter by:jorgep +- fix: refs #7353 iron out ticket table by:jorgep +- fix: refs #7353 padding by:jorgep +- fix: refs #7353 salesClientTable by:jorgep +- fix: refs #7353 salesorderTable by:jorgep +- fix: refs #7353 saleTicketMonitors by:jorgep +- fix: refs #7353 use same datakey by:jorgep +- fix: refs #7353 vnTable colors by:jorgep +- fix: refs #7354 e2e tests by:Jon +- fix: refs #7354 fix delivery days by:Jon +- fix: refs #7354 fix list searchbar and filters by:Jon +- fix: refs #7354 fix VnSearchbar search for zone section & finished basic tests by:Jon +- fix: refs #7354 fix VnTable filters and agency field by:Jon +- fix: refs #7354 fix zoneSearchbar by:Jon +- fix: refs #7354 requested changes by:Jon +- fix: refs #7356 colors by:jorgep +- fix: refs #7356 create claim dialog by:jorgep +- fix: refs #7889 fixed shortcut test by:Jon +- fix: refs #7903 fixed ticket's search bar and keybinding tooltip by:Jon +- fix: refs #7911 fixed shortcut and related files by:Jon +- fix: remove condition duplicated by:Javier Segarra +- fix: remove property by:Javier Segarra +- fix tootltip by:carlossa +- fix traduction by:carlossa +- fix(VnSectionMain): add QPage by:alexm +- fix(zone): zoneLocation and the others searchbar by:alexm +- refactor: refs #7354 fix tableFilters by:Jon +- refactor: refs #7354 refactor zones section and fixed e2e tests by:Jon +- refs #6772 feat: fix approach by:Javier Segarra +- refs #6772 fix: claimPhoto reload by:Javier Segarra +- refs #6896 fix searchbar by:carlossa +- refs #6897 fix entry by:carlossa +- refs #6899 fix invoiceFix by:carlossa +- refs #6899 fix order by:carlossa +- refs #7283 fix by:carlossa +- refs #7283 fix ItemDescriptor warehouse by:carlossa +- refs #7283 refactor fix ItemDescriptor by:carlossa +- refs #7355 #7366 fix account, summary, list, travelList, tooltip by:carlossa +- refs #7355 fix accountPrivileges by:carlossa +- refs #7355 fix accounts, vnTable by:carlossa +- refs #7355 fix privileges by:carlossa +- refs #7355 fix roles filters by:carlossa +- refs #7355 fix total by:carlossa +- refs #7355 fix views summarys, entryList, travelList refact by:carlossa +- refs #7366 fix travel hours by:carlossa +- test: fix e2e by:Javier Segarra + # Version 24.36 - 2024-08-27 ### Added 🆕 diff --git a/package.json b/package.json index eaffd8d85..ead0193c9 100644 --- a/package.json +++ b/package.json @@ -62,4 +62,4 @@ "vite": "^5.1.4", "vitest": "^0.31.1" } -} \ No newline at end of file +} diff --git a/src/boot/axios.js b/src/boot/axios.js index 9b32275bd..99a163cca 100644 --- a/src/boot/axios.js +++ b/src/boot/axios.js @@ -5,8 +5,10 @@ import useNotify from 'src/composables/useNotify.js'; const session = useSession(); const { notify } = useNotify(); +const baseUrl = '/api/'; -axios.defaults.baseURL = '/api/'; +axios.defaults.baseURL = baseUrl; +const axiosNoError = axios.create({ baseURL: baseUrl }); const onRequest = (config) => { const token = session.getToken(); @@ -79,5 +81,7 @@ const onResponseError = (error) => { axios.interceptors.request.use(onRequest, onRequestError); axios.interceptors.response.use(onResponse, onResponseError); +axiosNoError.interceptors.request.use(onRequest); +axiosNoError.interceptors.response.use(onResponse); -export { onRequest, onResponseError }; +export { onRequest, onResponseError, axiosNoError }; diff --git a/src/boot/quasar.js b/src/boot/quasar.js index e2035c880..5db6edd24 100644 --- a/src/boot/quasar.js +++ b/src/boot/quasar.js @@ -2,9 +2,15 @@ import { boot } from 'quasar/wrappers'; import qFormMixin from './qformMixin'; import mainShortcutMixin from './mainShortcutMixin'; import keyShortcut from './keyShortcut'; +import useNotify from 'src/composables/useNotify.js'; +const { notify } = useNotify(); export default boot(({ app }) => { app.mixin(qFormMixin); app.mixin(mainShortcutMixin); app.directive('shortcut', keyShortcut); + app.config.errorHandler = function (err) { + console.error(err); + notify('globals.error', 'negative', 'error'); + }; }); diff --git a/src/components/ItemsFilterPanel.vue b/src/components/ItemsFilterPanel.vue index 8449f9354..e89d32da4 100644 --- a/src/components/ItemsFilterPanel.vue +++ b/src/components/ItemsFilterPanel.vue @@ -297,11 +297,12 @@ const removeTag = (index, params, search) => { /> - diff --git a/src/components/VnTable/VnFilter.vue b/src/components/VnTable/VnFilter.vue index c6d4d8ef2..fd3c29fa3 100644 --- a/src/components/VnTable/VnFilter.vue +++ b/src/components/VnTable/VnFilter.vue @@ -34,7 +34,7 @@ const model = defineModel(undefined, { required: true }); const arrayData = useArrayData($props.dataKey, { searchUrl: $props.searchUrl }); const columnFilter = computed(() => $props.column?.columnFilter); -const updateEvent = { 'update:modelValue': addFilter, remove: () => addFilter(null) }; +const updateEvent = { 'update:modelValue': addFilter }; const enterEvent = { 'keyup.enter': () => addFilter(model.value), remove: () => addFilter(null), diff --git a/src/components/VnTable/VnOrder.vue b/src/components/VnTable/VnOrder.vue index 98c7ab392..7fdd23b78 100644 --- a/src/components/VnTable/VnOrder.vue +++ b/src/components/VnTable/VnOrder.vue @@ -4,7 +4,7 @@ import { useArrayData } from 'composables/useArrayData'; const model = defineModel({ type: Object }); const $props = defineProps({ name: { - type: String, + type: [String, Boolean], default: '', }, label: { diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index 689be76ee..3e982919b 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -69,10 +69,7 @@ const $props = defineProps({ type: Boolean, default: false, }, - disableInfiniteScroll: { - type: Boolean, - default: false, - }, + hasSubToolbar: { type: Boolean, default: null, @@ -101,6 +98,10 @@ const $props = defineProps({ type: String, default: '90vh', }, + footer: { + type: Boolean, + default: false, + }, }); const { t } = useI18n(); const stateStore = useStateStore(); @@ -196,7 +197,7 @@ function setUserParams(watchedParams, watchedOrder) { function sanitizer(params) { for (const [key, value] of Object.entries(params)) { - if (typeof value == 'object') { + if (value && typeof value == 'object') { const param = Object.values(value)[0]; if (typeof param == 'string') params[key] = param.replaceAll('%', ''); } @@ -301,6 +302,7 @@ defineExpose({ redirect: redirectFn, selected, CrudModelRef, + params, }); function handleOnDataSaved(_) { @@ -368,9 +370,7 @@ function handleOnDataSaved(_) { ref="CrudModelRef" @on-fetch="(...args) => emit('onFetch', ...args)" :search-url="searchUrl" - :disable-infinite-scroll=" - $attrs['disableInfiniteScroll'] ? isTableMode : !disableInfiniteScroll - " + :disable-infinite-scroll="isTableMode" @save-changes="reload" :has-sub-toolbar="$props.hasSubToolbar ?? isEditable" :auto-load="hasParams || $attrs['auto-load']" @@ -390,7 +390,7 @@ function handleOnDataSaved(_) { card-container-class="grid-three" flat :style="isTableMode && `max-height: ${tableHeight}`" - virtual-scroll + :virtual-scroll="isTableMode" @virtual-scroll=" (event) => event.index > rows.length - 2 && @@ -507,11 +507,8 @@ function handleOnDataSaved(_) { :key="index" :title="btn.title" :icon="btn.icon" - class="q-px-sm" + class="q-px-sm text-primary-light" flat - :class=" - btn.isPrimary ? 'text-primary-light' : 'color-vn-text ' - " :style="`visibility: ${ (btn.show && btn.show(row)) ?? true ? 'visible' : 'hidden' }`" @@ -635,6 +632,28 @@ function handleOnDataSaved(_) { + @@ -702,7 +721,7 @@ es: } .bg-header { - background-color: var(--vn-header-color); + background-color: var(--vn-accent-color); color: var(--vn-text-color); } @@ -712,9 +731,7 @@ es: .q-table--dark .q-table__bottom, .q-table--dark thead, -.q-table--dark tr, -.q-table--dark th, -.q-table--dark td { +.q-table--dark tr { border-color: var(--vn-section-color); } diff --git a/src/components/common/VnCard.vue b/src/components/common/VnCard.vue index 7d29da232..0d80f43ce 100644 --- a/src/components/common/VnCard.vue +++ b/src/components/common/VnCard.vue @@ -24,7 +24,9 @@ const stateStore = useStateStore(); const route = useRoute(); const router = useRouter(); const url = computed(() => { - if (props.baseUrl) return `${props.baseUrl}/${route.params.id}`; + if (props.baseUrl) { + return `${props.baseUrl}/${route.params.id}`; + } return props.customUrl; }); const searchRightDataKey = computed(() => { @@ -40,8 +42,10 @@ onBeforeMount(async () => { try { if (!props.baseUrl) arrayData.store.filter.where = { id: route.params.id }; await arrayData.fetch({ append: false, updateRouter: false }); - } catch (e) { - router.push({ name: 'WorkerList' }); + } catch { + const { matched: matches } = router.currentRoute.value; + const { path } = matches.at(-1); + router.push({ path: path.replace(/:id.*/, '') }); } }); diff --git a/src/components/common/VnComponent.vue b/src/components/common/VnComponent.vue index fa99f9892..bd25c787c 100644 --- a/src/components/common/VnComponent.vue +++ b/src/components/common/VnComponent.vue @@ -17,17 +17,15 @@ const $props = defineProps({ }, }); -let mixed; const componentArray = computed(() => { if (typeof $props.prop === 'object') return [$props.prop]; return $props.prop; }); function mix(toComponent) { - if (mixed) return mixed; const { component, attrs, event } = toComponent; const customComponent = $props.components[component]; - mixed = { + return { component: customComponent?.component ?? component, attrs: { ...toValueAttrs(attrs), @@ -37,7 +35,6 @@ function mix(toComponent) { }, event: { ...customComponent?.event, ...event }, }; - return mixed; } function toValueAttrs(attrs) { diff --git a/src/components/common/VnDmsList.vue b/src/components/common/VnDmsList.vue index 68ff0e359..52dd6ef79 100644 --- a/src/components/common/VnDmsList.vue +++ b/src/components/common/VnDmsList.vue @@ -5,12 +5,14 @@ import { useRoute } from 'vue-router'; import { useQuasar, QCheckbox, QBtn, QInput } from 'quasar'; import axios from 'axios'; +import VnUserLink from '../ui/VnUserLink.vue'; +import { downloadFile } from 'src/composables/downloadFile'; +import VnImg from 'components/ui/VnImg.vue'; import VnPaginate from 'components/ui/VnPaginate.vue'; import VnDms from 'src/components/common/VnDms.vue'; import VnConfirm from 'components/ui/VnConfirm.vue'; import VnInputDate from 'components/common/VnInputDate.vue'; -import VnUserLink from '../ui/VnUserLink.vue'; -import { downloadFile } from 'src/composables/downloadFile'; +import { useSession } from 'src/composables/useSession'; const route = useRoute(); const quasar = useQuasar(); @@ -18,6 +20,7 @@ const { t } = useI18n(); const rows = ref(); const dmsRef = ref(); const formDialog = ref({}); +const token = useSession().getTokenMultimedia(); const $props = defineProps({ model: { @@ -89,6 +92,23 @@ const dmsFilter = { }; const columns = computed(() => [ + { + label: '', + name: 'file', + align: 'left', + component: VnImg, + props: (prop) => { + return { + storage: 'dms', + collection: null, + resolution: null, + id: prop.row.file.split('.')[0], + token: token, + class: 'rounded', + ratio: 1, + }; + }, + }, { align: 'left', field: 'id', @@ -142,13 +162,6 @@ const columns = computed(() => [ 'model-value': Boolean(prop.value), }), }, - { - align: 'left', - field: 'file', - label: t('globals.file'), - name: 'file', - component: 'span', - }, { align: 'left', field: 'worker', @@ -387,7 +400,14 @@ defineExpose({ /> - + {{ t('Upload file') }} @@ -395,10 +415,6 @@ defineExpose({ diff --git a/src/composables/usePrintService.js b/src/composables/usePrintService.js index ff43c65a1..68a009d7b 100644 --- a/src/composables/usePrintService.js +++ b/src/composables/usePrintService.js @@ -16,7 +16,7 @@ export function usePrintService() { ); } - function openReport(path, params) { + function openReport(path, params, isNewTab = '_self') { if (typeof params === 'string') params = JSON.parse(params); params = Object.assign( { @@ -26,8 +26,7 @@ export function usePrintService() { ); const query = new URLSearchParams(params).toString(); - - window.open(`api/${path}?${query}`); + window.open(`api/${path}?${query}`, isNewTab); } return { diff --git a/src/css/app.scss b/src/css/app.scss index 3c51dc8af..905934d4c 100644 --- a/src/css/app.scss +++ b/src/css/app.scss @@ -268,6 +268,7 @@ input::-webkit-inner-spin-button { max-width: 400px; } } + .edit-photo-btn { position: absolute; right: 12px; @@ -280,3 +281,10 @@ input::-webkit-inner-spin-button { color: var(--vn-label-color); text-transform: uppercase; } + +.q-date { + &__today { + border: 2px solid $info; + color: $info; + } +} diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index d29b864b9..2e2365f7b 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -103,8 +103,10 @@ globals: ticket: Ticket campaign: Campaign weight: Weight + error: Ups! Something went wrong pageTitles: logIn: Login + addressEdit: Update address summary: Summary basicData: Basic data log: Logs @@ -133,6 +135,7 @@ globals: fiscalData: Fiscal data billingData: Billing data consignees: Consignees + 'address-create': New address notes: Notes credits: Credits greuges: Greuges @@ -156,6 +159,7 @@ globals: dms: File management entryCreate: New entry latestBuys: Latest buys + reserves: Reserves tickets: Tickets ticketCreate: New Tickets boxing: Boxing @@ -284,6 +288,14 @@ globals: createInvoiceIn: Create invoice in myAccount: My account noOne: No one + params: + clientFk: Client id + salesPersonFk: Sales person + warehouseFk: Warehouse + provinceFk: Province + from: From + To: To + stateFk: State errors: statusUnauthorized: Access denied statusInternalServerError: An internal server error has ocurred @@ -721,6 +733,7 @@ worker: newWorker: New worker card: workerId: Worker ID + user: User name: Name email: Email phone: Phone @@ -807,6 +820,16 @@ worker: credit: Have concept: Concept wagon: + pageTitles: + wagons: Wagons + wagonsList: Wagons List + wagonCreate: Create wagon + wagonEdit: Edit wagon + typesList: Types List + typeCreate: Create type + typeEdit: Edit type + wagonCounter: Trolley counter + wagonTray: Tray List type: name: Name submit: Submit diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 3d905509d..53b487e9f 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -105,8 +105,10 @@ globals: ticket: Ticket campaign: Campaña weight: Peso + error: ¡Ups! Algo salió mal pageTitles: logIn: Inicio de sesión + addressEdit: Modificar consignatario summary: Resumen basicData: Datos básicos log: Historial @@ -136,6 +138,7 @@ globals: fiscalData: Datos fiscales billingData: Forma de pago consignees: Consignatarios + 'address-create': Nuevo consignatario notes: Notas credits: Créditos greuges: Greuges @@ -288,6 +291,14 @@ globals: createInvoiceIn: Crear factura recibida myAccount: Mi cuenta noOne: Nadie + params: + clientFk: Id cliente + salesPersonFk: Comercial + warehouseFk: Almacén + provinceFk: Provincia + from: Desde + To: Hasta + stateFk: Estado errors: statusUnauthorized: Acceso denegado statusInternalServerError: Ha ocurrido un error interno del servidor @@ -728,6 +739,7 @@ worker: newWorker: Nuevo trabajador card: workerId: ID Trabajador + user: Usuario name: Nombre email: Correo personal phone: Teléfono @@ -805,6 +817,16 @@ worker: credit: Haber concept: Concepto wagon: + pageTitles: + wagons: Vagones + wagonsList: Listado vagones + wagonCreate: Crear tipo + wagonEdit: Editar tipo + typesList: Listado tipos + typeCreate: Crear tipo + typeEdit: Editar tipo + wagonCounter: Contador de carros + wagonTray: Listado bandejas type: name: Nombre submit: Guardar diff --git a/src/pages/Account/Card/AccountBasicData.vue b/src/pages/Account/Card/AccountBasicData.vue index f38299f9e..f1cdaf9df 100644 --- a/src/pages/Account/Card/AccountBasicData.vue +++ b/src/pages/Account/Card/AccountBasicData.vue @@ -2,6 +2,7 @@ import { useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n'; import VnSelect from 'src/components/common/VnSelect.vue'; +import VnSelectEnum from 'src/components/common/VnSelectEnum.vue'; import FormModel from 'components/FormModel.vue'; import VnInput from 'src/components/common/VnInput.vue'; import { ref, watch } from 'vue'; @@ -24,7 +25,7 @@ watch( diff --git a/src/pages/Account/Role/Card/SubRoles.vue b/src/pages/Account/Role/Card/SubRoles.vue index 7a0088bac..d17f96dd8 100644 --- a/src/pages/Account/Role/Card/SubRoles.vue +++ b/src/pages/Account/Role/Card/SubRoles.vue @@ -142,7 +142,13 @@ const redirectToRoleSummary = (id) => - + {{ t('warehouses.add') }} diff --git a/src/pages/Account/locale/en.yml b/src/pages/Account/locale/en.yml index 3cf861fb2..fe8707eb8 100644 --- a/src/pages/Account/locale/en.yml +++ b/src/pages/Account/locale/en.yml @@ -35,6 +35,7 @@ account: willDeactivated: User will be deactivated activated: User activated! deactivated: User deactivated! + twoFactor: Two factor actions: setPassword: Set password disableAccount: diff --git a/src/pages/Account/locale/es.yml b/src/pages/Account/locale/es.yml index b53a0153c..112ffe9cc 100644 --- a/src/pages/Account/locale/es.yml +++ b/src/pages/Account/locale/es.yml @@ -32,6 +32,7 @@ account: activated: ¡Usuario activado! deactivated: ¡Usuario desactivado! newUser: Nuevo usuario + twoFactor: Doble factor privileges: delegate: Puede delegar privilegios actions: diff --git a/src/pages/Claim/Card/ClaimBasicData.vue b/src/pages/Claim/Card/ClaimBasicData.vue index b1d3e24cd..63b0b7c0d 100644 --- a/src/pages/Claim/Card/ClaimBasicData.vue +++ b/src/pages/Claim/Card/ClaimBasicData.vue @@ -3,58 +3,18 @@ import { ref } from 'vue'; import { useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n'; import VnSelect from 'src/components/common/VnSelect.vue'; +import VnSelectEnum from 'src/components/common/VnSelectEnum.vue'; import FetchData from 'components/FetchData.vue'; import FormModel from 'components/FormModel.vue'; import VnRow from 'components/ui/VnRow.vue'; import VnInput from 'src/components/common/VnInput.vue'; import VnInputDate from 'components/common/VnInputDate.vue'; -import axios from 'axios'; import VnAvatar from 'src/components/ui/VnAvatar.vue'; const route = useRoute(); const { t } = useI18n(); - -const claimStates = ref([]); -const claimStatesCopy = ref([]); -const optionsList = ref([]); - const workersOptions = ref([]); - -function setClaimStates(data) { - claimStates.value = data; - claimStatesCopy.value = data; -} - -async function getEnumValues() { - optionsList.value = [{ id: null, description: t('claim.null') }]; - const { data } = await axios.get(`Applications/get-enum-values`, { - params: { - schema: 'vn', - table: 'claim', - column: 'pickup', - }, - }); - for (let value of data) - optionsList.value.push({ id: value, description: t(`claim.${value}`) }); -} - -getEnumValues(); - -const statesFilter = { - options: claimStates, - filterFn: (options, value) => { - const search = value.toLowerCase(); - - if (value === '') return claimStatesCopy.value; - - return options.value.filter((row) => { - const description = row.description.toLowerCase(); - - return description.indexOf(search) > -1; - }); - }, -}; diff --git a/src/pages/Claim/Card/ClaimPhoto.vue b/src/pages/Claim/Card/ClaimPhoto.vue index 21f1be6ed..ec619cc7d 100644 --- a/src/pages/Claim/Card/ClaimPhoto.vue +++ b/src/pages/Claim/Card/ClaimPhoto.vue @@ -246,7 +246,13 @@ function onDrag() {