diff --git a/cypress.config.js b/cypress.config.js index dfe963a12..368b92d8d 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -31,7 +31,6 @@ export default defineConfig({ requestTimeout: 10000, responseTimeout: 30000, pageLoadTimeout: 60000, - defaultBrowser: 'chromium', fixturesFolder: 'test/cypress/fixtures', screenshotsFolder: 'test/cypress/screenshots', supportFile: 'test/cypress/support/index.js', @@ -39,10 +38,17 @@ export default defineConfig({ downloadsFolder: 'test/cypress/downloads', video: false, specPattern: 'test/cypress/integration/**/*.spec.js', - experimentalRunAllSpecs: true, - watchForFileChanges: true, - reporter, - reporterOptions, + experimentalRunAllSpecs: false, + watchForFileChanges: false, + reporter: 'cypress-mochawesome-reporter', + reporterOptions: { + charts: true, + reportPageTitle: 'Cypress Inline Reporter', + reportFilename: '[status]_[datetime]-report', + embeddedScreenshots: true, + reportDir: 'test/cypress/reports', + inlineAssets: true, + }, component: { componentFolder: 'src', testFiles: '**/*.spec.js', diff --git a/src/components/FormModelPopup.vue b/src/components/FormModelPopup.vue index 672eeff7a..85943e91e 100644 --- a/src/components/FormModelPopup.vue +++ b/src/components/FormModelPopup.vue @@ -1,12 +1,13 @@ + { ); }); +const routeName = computed(() => { + const DESCRIPTOR_PROXY = 'DescriptorProxy'; + + let name = $props.dataKey; + if ($props.dataKey.includes(DESCRIPTOR_PROXY)) { + name = name.split(DESCRIPTOR_PROXY)[0]; + } + return `${name}Summary`; +}); async function getData() { store.url = $props.url; store.filter = $props.filter ?? {}; @@ -159,9 +168,7 @@ const toModule = computed( {{ t('components.smartCard.openSummary') }} - + #{{ getValueFromPath(subtitle) ?? entity.id }} - -
diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 9a60e9da1..9e46c54e3 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -153,6 +153,7 @@ globals: maxTemperature: Max minTemperature: Min changePass: Change password + setPass: Set password deleteConfirmTitle: Delete selected elements changeState: Change state raid: 'Raid {daysInForward} days' diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 846c442ea..6e43e0882 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -157,6 +157,7 @@ globals: maxTemperature: Máx minTemperature: Mín changePass: Cambiar contraseña + setPass: Establecer contraseña deleteConfirmTitle: Eliminar los elementos seleccionados changeState: Cambiar estado raid: 'Redada {daysInForward} días' diff --git a/src/pages/Account/Card/AccountDescriptorMenu.vue b/src/pages/Account/Card/AccountDescriptorMenu.vue index 30584c61f..eafd62df6 100644 --- a/src/pages/Account/Card/AccountDescriptorMenu.vue +++ b/src/pages/Account/Card/AccountDescriptorMenu.vue @@ -25,12 +25,13 @@ const $props = defineProps({ const { t } = useI18n(); const { hasAccount } = toRefs($props); const { openConfirmationModal } = useVnConfirm(); +const arrayData = useArrayData('Account'); const route = useRoute(); const router = useRouter(); const state = useState(); const user = state.getUser(); const { notify } = useQuasar(); -const account = computed(() => useArrayData('Account').store.data[0]); +const account = computed(() => arrayData.store.data); account.value.hasAccount = hasAccount.value; const entityId = computed(() => +route.params.id); const hasitManagementAccess = ref(); @@ -39,7 +40,7 @@ const isHimself = computed(() => user.value.id === account.value.id); const url = computed(() => isHimself.value ? 'Accounts/change-password' - : `Accounts/${entityId.value}/setPassword` + : `Accounts/${entityId.value}/setPassword`, ); async function updateStatusAccount(active) { @@ -153,6 +154,7 @@ onMounted(() => { t('account.card.actions.disableAccount.title'), t('account.card.actions.disableAccount.subtitle'), () => deleteAccount(), + () => deleteAccount(), ) " > @@ -172,6 +174,7 @@ onMounted(() => { t('account.card.actions.enableAccount.title'), t('account.card.actions.enableAccount.subtitle'), () => updateStatusAccount(true), + () => updateStatusAccount(true), ) " > @@ -186,6 +189,7 @@ onMounted(() => { t('account.card.actions.disableAccount.title'), t('account.card.actions.disableAccount.subtitle'), () => updateStatusAccount(false), + () => updateStatusAccount(false), ) " > @@ -201,6 +205,7 @@ onMounted(() => { t('account.card.actions.activateUser.title'), t('account.card.actions.activateUser.title'), () => updateStatusUser(true), + () => updateStatusUser(true), ) " > @@ -215,6 +220,7 @@ onMounted(() => { t('account.card.actions.deactivateUser.title'), t('account.card.actions.deactivateUser.title'), () => updateStatusUser(false), + () => updateStatusUser(false), ) " > diff --git a/src/pages/Claim/Card/ClaimAction.vue b/src/pages/Claim/Card/ClaimAction.vue index 8ac7c224f..baa36710c 100644 --- a/src/pages/Claim/Card/ClaimAction.vue +++ b/src/pages/Claim/Card/ClaimAction.vue @@ -27,6 +27,7 @@ const claimActionsForm = ref(); const rows = ref([]); const selectedRows = ref([]); const destinationTypes = ref([]); +const shelvings = ref([]); const totalClaimed = ref(null); const DEFAULT_MAX_RESPONSABILITY = 5; const DEFAULT_MIN_RESPONSABILITY = 1; @@ -56,6 +57,12 @@ const columns = computed(() => [ field: (row) => row.claimDestinationFk, align: 'left', }, + { + name: 'shelving', + label: t('shelvings.shelving'), + field: (row) => row.shelvingFk, + align: 'left', + }, { name: 'Landed', label: t('Landed'), @@ -125,6 +132,10 @@ async function updateDestination(claimDestinationFk, row, options = {}) { options.reload && claimActionsForm.value.reload(); } } +async function updateShelving(shelvingFk, row) { + await axios.patch(`ClaimEnds/${row.id}`, { shelvingFk }); + claimActionsForm.value.reload(); +} async function regularizeClaim() { await post(`Claims/${claimId}/regularizeClaim`); @@ -200,6 +211,7 @@ async function post(query, params) { auto-load @on-fetch="(data) => (destinationTypes = data)" /> + + + diff --git a/src/pages/Claim/Card/ClaimBasicData.vue b/src/pages/Claim/Card/ClaimBasicData.vue index 67034da1a..43941d1dc 100644 --- a/src/pages/Claim/Card/ClaimBasicData.vue +++ b/src/pages/Claim/Card/ClaimBasicData.vue @@ -40,7 +40,7 @@ const workersOptions = ref([]);