Merge branch 'dev' into 7949-TicketModifications
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
commit
f308765694
|
@ -210,6 +210,7 @@ function onDrag() {
|
||||||
class="all-pointer-events absolute delete-button zindex"
|
class="all-pointer-events absolute delete-button zindex"
|
||||||
@click.stop="viewDeleteDms(index)"
|
@click.stop="viewDeleteDms(index)"
|
||||||
round
|
round
|
||||||
|
:data-cy="`delete-button-${index+1}`"
|
||||||
/>
|
/>
|
||||||
<QIcon
|
<QIcon
|
||||||
name="play_circle"
|
name="play_circle"
|
||||||
|
@ -227,6 +228,7 @@ function onDrag() {
|
||||||
class="rounded-borders cursor-pointer fit"
|
class="rounded-borders cursor-pointer fit"
|
||||||
@click="openDialog(media.dmsFk)"
|
@click="openDialog(media.dmsFk)"
|
||||||
v-if="!media.isVideo"
|
v-if="!media.isVideo"
|
||||||
|
:data-cy="`file-${index+1}`"
|
||||||
>
|
>
|
||||||
</QImg>
|
</QImg>
|
||||||
<video
|
<video
|
||||||
|
@ -235,6 +237,7 @@ function onDrag() {
|
||||||
muted="muted"
|
muted="muted"
|
||||||
v-if="media.isVideo"
|
v-if="media.isVideo"
|
||||||
@click="openDialog(media.dmsFk)"
|
@click="openDialog(media.dmsFk)"
|
||||||
|
:data-cy="`file-${index+1}`"
|
||||||
/>
|
/>
|
||||||
</QCard>
|
</QCard>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -118,14 +118,6 @@ const debtWarning = computed(() => {
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('Allowed substitution') }}</QTooltip>
|
<QTooltip>{{ t('Allowed substitution') }}</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
<QIcon
|
|
||||||
v-if="customer?.isFreezed"
|
|
||||||
name="vn:frozen"
|
|
||||||
size="xs"
|
|
||||||
color="primary"
|
|
||||||
>
|
|
||||||
<QTooltip>{{ t('customer.card.isFrozen') }}</QTooltip>
|
|
||||||
</QIcon>
|
|
||||||
<QIcon
|
<QIcon
|
||||||
v-if="!entity.account?.active"
|
v-if="!entity.account?.active"
|
||||||
color="primary"
|
color="primary"
|
||||||
|
@ -150,6 +142,14 @@ const debtWarning = computed(() => {
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('customer.card.notChecked') }}</QTooltip>
|
<QTooltip>{{ t('customer.card.notChecked') }}</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
|
<QIcon
|
||||||
|
v-if="entity?.isFreezed"
|
||||||
|
name="vn:frozen"
|
||||||
|
size="xs"
|
||||||
|
color="primary"
|
||||||
|
>
|
||||||
|
<QTooltip>{{ t('customer.card.isFrozen') }}</QTooltip>
|
||||||
|
</QIcon>
|
||||||
<QBtn
|
<QBtn
|
||||||
v-if="entity.unpaid"
|
v-if="entity.unpaid"
|
||||||
flat
|
flat
|
||||||
|
@ -163,13 +163,13 @@ const debtWarning = computed(() => {
|
||||||
<br />
|
<br />
|
||||||
{{
|
{{
|
||||||
t('unpaidDated', {
|
t('unpaidDated', {
|
||||||
dated: toDate(customer.unpaid?.dated),
|
dated: toDate(entity.unpaid?.dated),
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
<br />
|
<br />
|
||||||
{{
|
{{
|
||||||
t('unpaidAmount', {
|
t('unpaidAmount', {
|
||||||
amount: toCurrency(customer.unpaid?.amount),
|
amount: toCurrency(entity.unpaid?.amount),
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
|
|
|
@ -1,14 +1,17 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import VnPaginate from 'components/ui/VnPaginate.vue';
|
import { computed } from 'vue';
|
||||||
import CardList from 'components/ui/CardList.vue';
|
|
||||||
import VnLv from 'components/ui/VnLv.vue';
|
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import ShelvingFilter from 'pages/Shelving/Card/ShelvingFilter.vue';
|
import { useI18n } from 'vue-i18n';
|
||||||
import ShelvingSummary from 'pages/Shelving/Card/ShelvingSummary.vue';
|
import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
|
||||||
import VnSection from 'src/components/common/VnSection.vue';
|
import VnSection from 'src/components/common/VnSection.vue';
|
||||||
|
import ShelvingFilter from 'pages/Shelving/Card/ShelvingFilter.vue';
|
||||||
|
import ShelvingSummary from './Card/ShelvingSummary.vue';
|
||||||
|
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||||
import exprBuilder from './ShelvingExprBuilder.js';
|
import exprBuilder from './ShelvingExprBuilder.js';
|
||||||
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
|
import VnCheckbox from 'src/components/common/VnCheckbox.vue';
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { viewSummary } = useSummaryDialog();
|
const { viewSummary } = useSummaryDialog();
|
||||||
const dataKey = 'ShelvingList';
|
const dataKey = 'ShelvingList';
|
||||||
|
@ -17,9 +20,56 @@ const filter = {
|
||||||
include: [{ relation: 'parking' }],
|
include: [{ relation: 'parking' }],
|
||||||
};
|
};
|
||||||
|
|
||||||
function navigate(id) {
|
const columns = computed(() => [
|
||||||
router.push({ path: `/shelving/${id}` });
|
{
|
||||||
}
|
align: 'left',
|
||||||
|
name: 'code',
|
||||||
|
label: t('globals.code'),
|
||||||
|
isId: true,
|
||||||
|
isTitle: true,
|
||||||
|
columnFilter: false,
|
||||||
|
create: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'parking',
|
||||||
|
label: t('shelving.list.parking'),
|
||||||
|
sortable: true,
|
||||||
|
format: (val) => val?.code ?? '',
|
||||||
|
cardVisible: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'priority',
|
||||||
|
label: t('shelving.list.priority'),
|
||||||
|
sortable: true,
|
||||||
|
cardVisible: true,
|
||||||
|
create: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'isRecyclable',
|
||||||
|
label: t('shelving.summary.recyclable'),
|
||||||
|
sortable: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'right',
|
||||||
|
label: '',
|
||||||
|
name: 'tableActions',
|
||||||
|
actions: [
|
||||||
|
{
|
||||||
|
title: t('components.smartCard.viewSummary'),
|
||||||
|
icon: 'preview',
|
||||||
|
action: (row) => viewSummary(row.id, ShelvingSummary),
|
||||||
|
isPrimary: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
const onDataSaved = ({ id }) => {
|
||||||
|
router.push({ name: 'ShelvingBasicData', params: { id } });
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -37,48 +87,75 @@ function navigate(id) {
|
||||||
<ShelvingFilter data-key="ShelvingList" />
|
<ShelvingFilter data-key="ShelvingList" />
|
||||||
</template>
|
</template>
|
||||||
<template #body>
|
<template #body>
|
||||||
<QPage class="column items-center q-pa-md">
|
<VnTable
|
||||||
<div class="vn-card-list">
|
:data-key="dataKey"
|
||||||
<VnPaginate :data-key="dataKey">
|
:columns="columns"
|
||||||
<template #body="{ rows }">
|
is-editable="false"
|
||||||
<CardList
|
:right-search="false"
|
||||||
v-for="row of rows"
|
:use-model="true"
|
||||||
:key="row.id"
|
:disable-option="{ table: true }"
|
||||||
:id="row.id"
|
redirect="shelving"
|
||||||
:title="row.code"
|
default-mode="card"
|
||||||
@click="navigate(row.id)"
|
:create="{
|
||||||
>
|
urlCreate: 'Shelvings',
|
||||||
<template #list-items>
|
title: t('globals.pageTitles.shelvingCreate'),
|
||||||
<VnLv
|
onDataSaved,
|
||||||
:label="$t('shelving.list.parking')"
|
formInitialData: {
|
||||||
:title-label="$t('shelving.list.parking')"
|
parkingFk: null,
|
||||||
:value="row.parking?.code"
|
priority: null,
|
||||||
/>
|
code: '',
|
||||||
<VnLv
|
isRecyclable: false,
|
||||||
:label="$t('shelving.list.priority')"
|
},
|
||||||
:value="row?.priority"
|
}"
|
||||||
/>
|
>
|
||||||
</template>
|
<template #more-create-dialog="{ data }">
|
||||||
<template #actions>
|
<VnSelect
|
||||||
<QBtn
|
v-model="data.parkingFk"
|
||||||
:label="$t('components.smartCard.openSummary')"
|
url="Parkings"
|
||||||
@click.stop="viewSummary(row.id, ShelvingSummary)"
|
option-value="id"
|
||||||
color="primary"
|
option-label="code"
|
||||||
/>
|
:label="t('shelving.list.parking')"
|
||||||
</template>
|
:filter-options="['id', 'code']"
|
||||||
</CardList>
|
:fields="['id', 'code']"
|
||||||
</template>
|
/>
|
||||||
</VnPaginate>
|
<VnCheckbox
|
||||||
</div>
|
v-model="data.isRecyclable"
|
||||||
<QPageSticky :offset="[20, 20]">
|
:label="t('shelving.summary.recyclable')"
|
||||||
<RouterLink :to="{ name: 'ShelvingCreate' }">
|
/>
|
||||||
<QBtn fab icon="add" color="primary" v-shortcut="'+'" />
|
</template>
|
||||||
<QTooltip>
|
</VnTable>
|
||||||
{{ $t('shelving.list.newShelving') }}
|
|
||||||
</QTooltip>
|
|
||||||
</RouterLink>
|
|
||||||
</QPageSticky>
|
|
||||||
</QPage>
|
|
||||||
</template>
|
</template>
|
||||||
</VnSection>
|
</VnSection>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
width: 55%;
|
||||||
|
}
|
||||||
|
.list-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
shelving:
|
||||||
|
list:
|
||||||
|
parking: Estacionamiento
|
||||||
|
priority: Prioridad
|
||||||
|
|
||||||
|
summary:
|
||||||
|
recyclable: Reciclable
|
||||||
|
en:
|
||||||
|
shelving:
|
||||||
|
list:
|
||||||
|
parking: Parking
|
||||||
|
priority: Priority
|
||||||
|
|
||||||
|
summary:
|
||||||
|
recyclable: Recyclable
|
||||||
|
</i18n>
|
||||||
|
|
|
@ -111,15 +111,6 @@ export default {
|
||||||
shelvingCard,
|
shelvingCard,
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: 'create',
|
|
||||||
name: 'ShelvingCreate',
|
|
||||||
meta: {
|
|
||||||
title: 'shelvingCreate',
|
|
||||||
icon: 'add',
|
|
||||||
},
|
|
||||||
component: () => import('src/pages/Shelving/Card/ShelvingForm.vue'),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: 'parking',
|
path: 'parking',
|
||||||
name: 'ParkingMain',
|
name: 'ParkingMain',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
// redmine.verdnatura.es/issues/8417
|
describe('ClaimPhoto', () => {
|
||||||
describe.skip('ClaimPhoto', () => {
|
const carrouselClose = '.q-dialog__inner > .q-toolbar > .q-btn > .q-btn__content > .q-icon';
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
const claimId = 1;
|
const claimId = 1;
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
|
@ -16,6 +16,7 @@ describe.skip('ClaimPhoto', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should add new file with drag and drop', () => {
|
it('should add new file with drag and drop', () => {
|
||||||
|
cy.get('.container').should('be.visible').and('exist');
|
||||||
cy.get('.container').selectFile('test/cypress/fixtures/image.jpg', {
|
cy.get('.container').selectFile('test/cypress/fixtures/image.jpg', {
|
||||||
action: 'drag-drop',
|
action: 'drag-drop',
|
||||||
});
|
});
|
||||||
|
@ -23,33 +24,23 @@ describe.skip('ClaimPhoto', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should open first image dialog change to second and close', () => {
|
it('should open first image dialog change to second and close', () => {
|
||||||
cy.get(':nth-last-child(1) > .q-card').click();
|
cy.dataCy('file-1').click();
|
||||||
cy.get('.q-carousel__slide > .q-img > .q-img__container > .q-img__image').should(
|
cy.get(carrouselClose).click();
|
||||||
'be.visible',
|
|
||||||
);
|
|
||||||
|
|
||||||
cy.get('.q-carousel__control > button').click();
|
cy.dataCy('file-1').click();
|
||||||
|
cy.get('.q-carousel__control > button').as('nextButton').click();
|
||||||
cy.get(
|
cy.get('.q-carousel__slide > .q-ma-none').should('be.visible');
|
||||||
'.q-dialog__inner > .q-toolbar > .q-btn > .q-btn__content > .q-icon',
|
cy.get(carrouselClose).click();
|
||||||
).click();
|
|
||||||
cy.get('.q-carousel__slide > .q-img > .q-img__container > .q-img__image').should(
|
|
||||||
'not.be.visible',
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should remove third and fourth file', () => {
|
it('should remove third and fourth file', () => {
|
||||||
cy.get(
|
cy.dataCy('delete-button-4').click();
|
||||||
'.multimediaParent > :nth-last-child(1) > .q-btn > .q-btn__content > .q-icon',
|
|
||||||
).click();
|
|
||||||
cy.get(
|
cy.get(
|
||||||
'.q-card__actions > .q-btn--unelevated > .q-btn__content > .block',
|
'.q-card__actions > .q-btn--unelevated > .q-btn__content > .block',
|
||||||
).click();
|
).click();
|
||||||
cy.get('.q-notification__message').should('have.text', 'Data deleted');
|
cy.get('.q-notification__message').should('have.text', 'Data deleted');
|
||||||
|
|
||||||
cy.get(
|
cy.dataCy('delete-button-3').click();
|
||||||
'.multimediaParent > :nth-last-child(1) > .q-btn > .q-btn__content > .q-icon',
|
|
||||||
).click();
|
|
||||||
cy.get(
|
cy.get(
|
||||||
'.q-card__actions > .q-btn--unelevated > .q-btn__content > .block',
|
'.q-card__actions > .q-btn--unelevated > .q-btn__content > .block',
|
||||||
).click();
|
).click();
|
||||||
|
|
|
@ -17,7 +17,6 @@ describe('InvoiceOut summary', () => {
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit(`/#/invoice-out/1/summary`);
|
cy.visit(`/#/invoice-out/1/summary`);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('open the descriptors', () => {
|
it('open the descriptors', () => {
|
||||||
cy.get(firstRowDescriptors(1)).click();
|
cy.get(firstRowDescriptors(1)).click();
|
||||||
cy.get('.descriptor').should('be.visible');
|
cy.get('.descriptor').should('be.visible');
|
||||||
|
@ -33,9 +32,8 @@ describe('InvoiceOut summary', () => {
|
||||||
cy.get('.q-item > .q-item__label').should('include.text', '1101');
|
cy.get('.q-item > .q-item__label').should('include.text', '1101');
|
||||||
});
|
});
|
||||||
|
|
||||||
it.skip('should open the ticket list', () => {
|
it('should open the ticket list', () => {
|
||||||
cy.get(toTicketList).click();
|
cy.get(toTicketList).click();
|
||||||
cy.get('.descriptor').should('be.visible');
|
|
||||||
cy.dataCy('vnFilterPanelChip').should('include.text', 'T1111111');
|
cy.dataCy('vnFilterPanelChip').should('include.text', 'T1111111');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
/// <reference types="cypress" />
|
||||||
|
describe('ShelvingList', () => {
|
||||||
|
const parking =
|
||||||
|
'.q-card > :nth-child(1) > .q-select > .q-field__inner > .q-field__control > .q-field__control-container';
|
||||||
|
beforeEach(() => {
|
||||||
|
cy.viewport(1920, 1080);
|
||||||
|
cy.login('developer');
|
||||||
|
cy.visit(`/#/shelving/1/basic-data`);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should give an error if the code aldready exists', () => {
|
||||||
|
cy.dataCy('Code_input').should('exist').clear().type('AA7');
|
||||||
|
cy.saveCard();
|
||||||
|
cy.get('.q-notification__message').should('have.text', 'The code already exists');
|
||||||
|
});
|
||||||
|
it('should edit the data and save', () => {
|
||||||
|
cy.selectOption(parking, 'P-01-1');
|
||||||
|
cy.dataCy('Code_input').clear().type('AA1');
|
||||||
|
cy.dataCy('Priority_input').clear().type('10');
|
||||||
|
cy.get(':nth-child(2) > .q-checkbox > .q-checkbox__inner').click();
|
||||||
|
cy.saveCard();
|
||||||
|
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,41 @@
|
||||||
|
/// <reference types="cypress" />
|
||||||
|
describe('ShelvingList', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
cy.viewport(1920, 1080);
|
||||||
|
cy.login('developer');
|
||||||
|
cy.visit(`/#/shelving/list`);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should redirect on clicking a shelving', () => {
|
||||||
|
cy.typeSearchbar('{enter}');
|
||||||
|
cy.dataCy('cardBtn').eq(0).click();
|
||||||
|
cy.get('.summaryHeader > .header > .q-icon').click();
|
||||||
|
cy.url().should('include', '/shelving/1/summary');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should redirect from preview to basic-data', () => {
|
||||||
|
cy.typeSearchbar('{enter}');
|
||||||
|
cy.dataCy('cardBtn').eq(0).click();
|
||||||
|
cy.get('.q-card > .header').click();
|
||||||
|
cy.url().should('include', '/shelving/1/basic-data');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should filter and redirect if only one result', () => {
|
||||||
|
cy.selectOption('[data-cy="Parking_select"]', 'P-02-2');
|
||||||
|
cy.dataCy('Parking_select').type('{enter}');
|
||||||
|
cy.url().should('match', /\/shelving\/\d+\/summary/);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create a new shelving', () => {
|
||||||
|
cy.dataCy('vnTableCreateBtn').click();
|
||||||
|
cy.dataCy('code-create-popup').type('Test');
|
||||||
|
cy.dataCy('Priority_input').type('10');
|
||||||
|
cy.selectOption(
|
||||||
|
'.grid-create > .q-select > .q-field__inner > .q-field__control > .q-field__control-container',
|
||||||
|
'100-01',
|
||||||
|
);
|
||||||
|
cy.dataCy('FormModelPopup_save').click();
|
||||||
|
cy.checkNotification('Data created');
|
||||||
|
cy.url().should('match', /\/shelving\/\d+\/basic-data/);
|
||||||
|
});
|
||||||
|
});
|
Loading…
Reference in New Issue