Merge branch 'dev' into 8224-contextMenu
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
This commit is contained in:
commit
b8231c4878
|
@ -25,6 +25,9 @@ describe('VnDmsList', () => {
|
|||
deleteModel: 'WorkerDms',
|
||||
downloadModel: 'WorkerDms',
|
||||
},
|
||||
global: {
|
||||
stubs: ['VnUserLink'],
|
||||
},
|
||||
}).vm;
|
||||
});
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ describe('VnLog', () => {
|
|||
|
||||
vm = createWrapper(VnLog, {
|
||||
global: {
|
||||
stubs: ['FetchData', 'vue-i18n'],
|
||||
stubs: ['FetchData', 'vue-i18n', 'VnUserLink'],
|
||||
mocks: {
|
||||
fetch: vi.fn(),
|
||||
},
|
||||
|
|
|
@ -1,12 +1,27 @@
|
|||
<script setup>
|
||||
import AccountDescriptorProxy from 'src/pages/Account/Card/AccountDescriptorProxy.vue';
|
||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||
|
||||
defineProps({
|
||||
import { ref, onMounted } from 'vue';
|
||||
import axios from 'axios';
|
||||
const $props = defineProps({
|
||||
name: { type: String, default: null },
|
||||
tag: { type: String, default: null },
|
||||
workerId: { type: Number, default: null },
|
||||
defaultName: { type: Boolean, default: false },
|
||||
});
|
||||
const isWorker = ref(false);
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
const {
|
||||
data: { exists },
|
||||
} = await axios(`/Workers/${$props.workerId}/exists`);
|
||||
isWorker.value = exists;
|
||||
} catch (error) {
|
||||
if (error.status === 403) return;
|
||||
throw error;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
<slot name="link">
|
||||
|
@ -14,5 +29,10 @@ defineProps({
|
|||
{{ defaultName ? (name ?? $t('globals.system')) : name }}
|
||||
</span>
|
||||
</slot>
|
||||
<WorkerDescriptorProxy v-if="workerId" :id="workerId" />
|
||||
<WorkerDescriptorProxy
|
||||
v-if="isWorker"
|
||||
:id="workerId"
|
||||
@on-fetch="(data) => (isWorker = data?.workerId !== undefined)"
|
||||
/>
|
||||
<AccountDescriptorProxy v-else :id="workerId" />
|
||||
</template>
|
||||
|
|
|
@ -17,6 +17,7 @@ import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.v
|
|||
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
||||
import VnSelect from 'components/common/VnSelect.vue';
|
||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||
import VnCheckbox from 'src/components/common/VnCheckbox.vue';
|
||||
|
||||
const arrayData = useArrayData('Customer');
|
||||
const { t } = useI18n();
|
||||
|
@ -50,7 +51,7 @@ const columns = computed(() => [
|
|||
label: t('globals.ticket'),
|
||||
cardVisible: true,
|
||||
columnFilter: {
|
||||
inWhere: true,
|
||||
name: 'ticketId',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -84,25 +85,19 @@ const columns = computed(() => [
|
|||
label: t('globals.description'),
|
||||
columnClass: 'expand',
|
||||
columnFilter: {
|
||||
inWhere: true,
|
||||
name: 'description',
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'quantity',
|
||||
name: 'quantity',
|
||||
label: t('globals.quantity'),
|
||||
cardVisible: true,
|
||||
visible: true,
|
||||
columnFilter: {
|
||||
inWhere: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'grouped',
|
||||
label: t('Group by items'),
|
||||
component: 'checkbox',
|
||||
visible: false,
|
||||
orderBy: false,
|
||||
columnFilter: false
|
||||
|
||||
},
|
||||
|
||||
]);
|
||||
|
||||
onBeforeMount(async () => {
|
||||
|
@ -218,9 +213,9 @@ const updateDateParams = (value, params) => {
|
|||
<div v-if="row.subName" class="subName">
|
||||
{{ row.subName }}
|
||||
</div>
|
||||
<FetchedTags :item="row" />
|
||||
<FetchedTags :item="row" :columns="6"/>
|
||||
</template>
|
||||
<template #moreFilterPanel="{ params }">
|
||||
<template #moreFilterPanel="{ params, searchFn}">
|
||||
<div class="column no-wrap flex-center q-gutter-y-md q-mt-xs q-pr-xl">
|
||||
<VnSelect
|
||||
:filled="true"
|
||||
|
@ -290,6 +285,13 @@ const updateDateParams = (value, params) => {
|
|||
class="q-px-xs q-pt-none fit"
|
||||
dense
|
||||
/>
|
||||
<VnCheckbox
|
||||
v-model="params.grouped"
|
||||
:label="t('Group by items')"
|
||||
class="q-px-xs q-pt-none fit"
|
||||
dense
|
||||
@update:modelValue="() => searchFn()"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</VnTable>
|
||||
|
|
|
@ -117,8 +117,6 @@ async function acceptPropagate({ isEqualizated }) {
|
|||
option-value="id"
|
||||
v-model="data.sageTaxTypeFk"
|
||||
data-cy="sageTaxTypeFk"
|
||||
:required="data.isTaxDataChecked"
|
||||
:rules="[(val) => validations.required(data.isTaxDataChecked, val)]"
|
||||
/>
|
||||
<VnSelect
|
||||
:label="t('Sage transaction type')"
|
||||
|
@ -128,10 +126,6 @@ async function acceptPropagate({ isEqualizated }) {
|
|||
option-value="id"
|
||||
data-cy="sageTransactionTypeFk"
|
||||
v-model="data.sageTransactionTypeFk"
|
||||
:required="data.isTaxDataChecked"
|
||||
:rules="[
|
||||
(val) => validations.required(data.sageTransactionTypeFk, val),
|
||||
]"
|
||||
>
|
||||
<template #option="scope">
|
||||
<QItem v-bind="scope.itemProps">
|
||||
|
|
|
@ -222,6 +222,7 @@ async function getAmountPaid() {
|
|||
clearable
|
||||
v-model.number="data.amountPaid"
|
||||
data-cy="paymentAmount"
|
||||
:positive="false"
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
|
|
|
@ -123,3 +123,4 @@ customer:
|
|||
ticketFk: Ticket Id
|
||||
description: Description
|
||||
quantity: Quantity
|
||||
ticketId: Ticket
|
||||
|
|
|
@ -123,3 +123,4 @@ customer:
|
|||
ticketFk: Id Ticket
|
||||
description: Descripción
|
||||
quantity: Cantidad
|
||||
ticketId: Ticket
|
||||
|
|
|
@ -89,7 +89,7 @@ defineExpose({ save });
|
|||
</div>
|
||||
|
||||
<div v-if="newPrice" class="column items-center q-mt-lg">
|
||||
<span class="text-primary">{{ t('New price') }}</span>
|
||||
<span class="text-primary">{{ t('basicData.newPrice') }}</span>
|
||||
<span class="text-subtitle1">{{ toCurrency(newPrice) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -135,3 +135,4 @@ defineExpose({ save });
|
|||
min-width: 230px;
|
||||
}
|
||||
</style>
|
||||
<
|
||||
|
|
|
@ -314,7 +314,7 @@ const changePrice = async (sale) => {
|
|||
const updatePrice = async (sale, newPrice) => {
|
||||
try {
|
||||
await axios.post(`Sales/${sale.id}/updatePrice`, {
|
||||
newPrice: newPrice,
|
||||
newPrice,
|
||||
componentId: componentId.value,
|
||||
});
|
||||
notify('globals.dataSaved', 'positive');
|
||||
|
|
|
@ -13,12 +13,14 @@ import { useArrayData } from 'composables/useArrayData';
|
|||
import useNotify from 'src/composables/useNotify.js';
|
||||
import axios from 'axios';
|
||||
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||
import FetchData from 'src/components/FetchData.vue';
|
||||
|
||||
const stateStore = useStateStore();
|
||||
const { t } = useI18n();
|
||||
const { notify } = useNotify();
|
||||
const { openConfirmationModal } = useVnConfirm();
|
||||
const allColumnNames = ref([]);
|
||||
const agencies = ref([]);
|
||||
|
||||
const arrayData = useArrayData('WeeklyTickets');
|
||||
const { store } = arrayData;
|
||||
|
@ -51,11 +53,16 @@ const columns = computed(() => [
|
|||
isTitle: true,
|
||||
cardVisible: true,
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'Clients',
|
||||
optionLabel: 'name',
|
||||
optionValue: 'id',
|
||||
isWhere: true,
|
||||
columnFilter: {
|
||||
name: 'id',
|
||||
component: 'select',
|
||||
alias: 'c',
|
||||
attrs: {
|
||||
url: 'Clients',
|
||||
optionLabel: 'name',
|
||||
optionValue: 'id',
|
||||
inWhere: true,
|
||||
},
|
||||
},
|
||||
columnField: {
|
||||
component: null,
|
||||
|
@ -170,6 +177,11 @@ onMounted(async () => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData
|
||||
url="AgencyModes/isActive"
|
||||
@on-fetch="(data) => (agencies = data)"
|
||||
auto-load
|
||||
/>
|
||||
<VnSearchbar
|
||||
data-key="WeeklyTickets"
|
||||
:label="t('weeklyTickets.search')"
|
||||
|
@ -203,7 +215,7 @@ onMounted(async () => {
|
|||
</template>
|
||||
<template #column-agencyModeFk="{ row }">
|
||||
<VnSelectCache
|
||||
url="AgencyModes/isActive"
|
||||
:options="agencies"
|
||||
:row="row"
|
||||
:find="['agencyModeFk', 'agencyModeName']"
|
||||
v-model="row.agencyModeFk"
|
||||
|
|
|
@ -5,7 +5,7 @@ describe('Client fiscal data', () => {
|
|||
cy.login('developer');
|
||||
cy.visit('#/customer/1107/fiscal-data');
|
||||
});
|
||||
it('Should change required value when change customer', () => {
|
||||
it.skip('Should change required value when change customer', () => {
|
||||
cy.get('.q-card').should('be.visible');
|
||||
cy.dataCy('sageTaxTypeFk').filter('input').should('not.have.attr', 'required');
|
||||
cy.get('#searchbar input').clear();
|
||||
|
|
|
@ -116,10 +116,11 @@ Cypress.Commands.add('waitSpinner', (_spinner = 'navBar') => {
|
|||
|
||||
// Fill Inputs
|
||||
Cypress.Commands.add('selectOption', (selector, option, timeout = 2500) => {
|
||||
cy.get(selector).should('exist').scrollIntoView();
|
||||
cy.waitForElement(selector, timeout);
|
||||
|
||||
cy.get(selector, { timeout })
|
||||
.should('exist')
|
||||
|
||||
.should('be.visible')
|
||||
.click()
|
||||
.then(($el) => {
|
||||
|
|
Loading…
Reference in New Issue