diff --git a/cypress.config.js b/cypress.config.js index dfe963a129..dd7de895c9 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -39,10 +39,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/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index 9a7d78e433..d67d157c2a 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -165,6 +165,7 @@ const app = inject('app'); const editingRow = ref(null); const editingField = ref(null); const isTableMode = computed(() => mode.value == TABLE_MODE); +const showRightIcon = computed(() => $props.rightSearch || $props.rightSearchIcon); const selectRegex = /select/; const emit = defineEmits(['onFetch', 'update:selected', 'saveChanges']); const tableModes = [ diff --git a/src/components/ui/CardDescriptor.vue b/src/components/ui/CardDescriptor.vue index 6f122ecd28..b8db68beeb 100644 --- a/src/components/ui/CardDescriptor.vue +++ b/src/components/ui/CardDescriptor.vue @@ -195,6 +195,19 @@ const toModule = computed(() => #{{ getValueFromPath(subtitle) ?? entity.id }} + + + {{ t('globals.copyId') }} + + { function setPaymentType(accounting) { if (!accounting) return; accountingType.value = accounting.accountingType; - initialData.description = []; initialData.payed = Date.vnNew(); isCash.value = accountingType.value.code == 'cash'; @@ -87,14 +86,14 @@ function setPaymentType(accounting) { initialData.payed.getDate() + accountingType.value.daysInFuture, ); maxAmount.value = accountingType.value && accountingType.value.maxAmount; - if (accountingType.value.code == 'compensation') return (initialData.description = ''); - if (accountingType.value.receiptDescription) - initialData.description.push(accountingType.value.receiptDescription); - if (initialData.description) initialData.description.push(initialData.description); - initialData.description = initialData.description.join(', '); + let descriptions = []; + if (accountingType.value.receiptDescription) + descriptions.push(accountingType.value.receiptDescription); + if (initialData.description) descriptions.push(initialData.description); + initialData.description = descriptions.join(', '); } const calculateFromAmount = (event) => { diff --git a/src/pages/Route/RouteExtendedList.vue b/src/pages/Route/RouteExtendedList.vue index a8d8477115..f32dcd0d9a 100644 --- a/src/pages/Route/RouteExtendedList.vue +++ b/src/pages/Route/RouteExtendedList.vue @@ -335,7 +335,6 @@ const openTicketsDialog = (id) => { { { -import { ref } from 'vue'; +import axios from 'axios'; import { useI18n } from 'vue-i18n'; +import { computed, ref } from 'vue'; +import { useRoute } from 'vue-router'; import { toCurrency } from 'src/filters'; import VnUsesMana from 'components/ui/VnUsesMana.vue'; const $props = defineProps({ - mana: { - type: Number, - default: null, - }, newPrice: { type: Number, default: 0, }, - usesMana: { - type: Boolean, - default: false, - }, - manaCode: { - type: String, - default: 'mana', - }, sale: { type: Object, default: null, }, }); +const route = useRoute(); +const mana = ref(null); +const usesMana = ref(false); + const emit = defineEmits(['save', 'cancel']); const { t } = useI18n(); @@ -38,32 +32,47 @@ const save = (sale = $props.sale) => { QPopupProxyRef.value.hide(); }; +const getMana = async () => { + const { data } = await axios.get(`Tickets/${route.params.id}/getSalesPersonMana`); + mana.value = data; + await getUsesMana(); +}; + +const getUsesMana = async () => { + const { data } = await axios.get('Sales/usesMana'); + usesMana.value = data; +}; + const cancel = () => { emit('cancel'); QPopupProxyRef.value.hide(); }; +const hasMana = computed(() => typeof mana.value === 'number'); defineExpose({ save }); diff --git a/src/pages/Worker/Card/WorkerDescriptor.vue b/src/pages/Worker/Card/WorkerDescriptor.vue index de3f634e2c..0e946f1ddc 100644 --- a/src/pages/Worker/Card/WorkerDescriptor.vue +++ b/src/pages/Worker/Card/WorkerDescriptor.vue @@ -111,6 +111,7 @@ const handlePhotoUpdated = (evt = false) => { -
-
- - - - -
-
+ + + + @@ -254,20 +246,3 @@ es: Search zone: Buscar zona You can search zones by id or name: Puedes buscar zonas por id o nombre - -