feat: refs #6321 remove ticketConfig
This commit is contained in:
parent
852e51c06f
commit
ceef46eccc
|
@ -36,7 +36,6 @@ onUnmounted(() => {
|
||||||
|
|
||||||
const entityId = computed(() => route.params.id);
|
const entityId = computed(() => route.params.id);
|
||||||
const item = ref({});
|
const item = ref({});
|
||||||
const ticketConfig = ref(null);
|
|
||||||
|
|
||||||
const itemProposalSelected = ref(null);
|
const itemProposalSelected = ref(null);
|
||||||
const reload = async () => {
|
const reload = async () => {
|
||||||
|
@ -69,24 +68,13 @@ const showItemProposal = () => {
|
||||||
const filter = computed(() => ({
|
const filter = computed(() => ({
|
||||||
scopeDays: 2,
|
scopeDays: 2,
|
||||||
showType: true,
|
showType: true,
|
||||||
alertLevelCode: null,
|
alertLevelCode: 'FREE',
|
||||||
date: Date.vnNew(),
|
date: Date.vnNew(),
|
||||||
warehouseFk: useState().getUser().value.warehouseFk,
|
warehouseFk: useState().getUser().value.warehouseFk,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
async function handleTicketConfig(data) {
|
|
||||||
filter.value.alertLevelCode = data[0].lackDefaultAlertLevelCode;
|
|
||||||
ticketConfig.value = data[0];
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
|
||||||
url="TicketConfigs"
|
|
||||||
:filter="{ fields: ['lackDefaultAlertLevelCode'] }"
|
|
||||||
@on-fetch="handleTicketConfig"
|
|
||||||
auto-load
|
|
||||||
/>
|
|
||||||
<FetchData
|
<FetchData
|
||||||
url="States/editableStates"
|
url="States/editableStates"
|
||||||
@on-fetch="(data) => (editableStates = data)"
|
@on-fetch="(data) => (editableStates = data)"
|
||||||
|
@ -107,7 +95,6 @@ async function handleTicketConfig(data) {
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<TicketLackTable
|
<TicketLackTable
|
||||||
v-if="ticketConfig"
|
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
@update:selection="({ value }, _) => (selectedRows = value)"
|
@update:selection="({ value }, _) => (selectedRows = value)"
|
||||||
|
@ -140,6 +127,7 @@ async function handleTicketConfig(data) {
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="showProposalDialog = true"
|
@click="showProposalDialog = true"
|
||||||
:disable="selectedRows.length < 1"
|
:disable="selectedRows.length < 1"
|
||||||
|
data-cy="itemProposal"
|
||||||
>
|
>
|
||||||
<QIcon
|
<QIcon
|
||||||
name="import_export"
|
name="import_export"
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
describe('Ticket Lack detail', () => {
|
describe('Ticket Lack detail', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
const ticketId = 1;
|
|
||||||
|
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.intercept('GET', /\/api\/Tickets\/itemLack\/5.*$/, {
|
cy.intercept('GET', /\/api\/Tickets\/itemLack\/5.*$/, {
|
||||||
statusCode: 200,
|
statusCode: 200,
|
||||||
|
@ -37,7 +35,7 @@ describe('Ticket Lack detail', () => {
|
||||||
observationTypeCode: 'administrative',
|
observationTypeCode: 'administrative',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}).as('getItemLack'); // and assign an alias
|
}).as('getItemLack');
|
||||||
|
|
||||||
cy.visit('/#/ticket/negative/5');
|
cy.visit('/#/ticket/negative/5');
|
||||||
cy.wait('@getItemLack');
|
cy.wait('@getItemLack');
|
||||||
|
@ -51,8 +49,6 @@ describe('Ticket Lack detail', () => {
|
||||||
cy.get('[data-cy="changeQuantity"]').should('be.disabled');
|
cy.get('[data-cy="changeQuantity"]').should('be.disabled');
|
||||||
cy.get('[data-cy="itemProposal"]').should('be.disabled');
|
cy.get('[data-cy="itemProposal"]').should('be.disabled');
|
||||||
cy.get('[data-cy="transferLines"]').should('be.disabled');
|
cy.get('[data-cy="transferLines"]').should('be.disabled');
|
||||||
// WIP
|
|
||||||
// cy.get('[data-cy="showFree"] > .q-checkbox__inner').should('be.checked');
|
|
||||||
cy.get('tr.cursor-pointer > :nth-child(1)').click();
|
cy.get('tr.cursor-pointer > :nth-child(1)').click();
|
||||||
cy.get('[data-cy="changeItem"]').should('be.enabled');
|
cy.get('[data-cy="changeItem"]').should('be.enabled');
|
||||||
cy.get('[data-cy="changeState"]').should('be.enabled');
|
cy.get('[data-cy="changeState"]').should('be.enabled');
|
||||||
|
@ -61,21 +57,7 @@ describe('Ticket Lack detail', () => {
|
||||||
cy.get('[data-cy="transferLines"]').should('be.enabled');
|
cy.get('[data-cy="transferLines"]').should('be.enabled');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
describe.skip('Update quantity', () => {
|
describe('Item proposal', () => {
|
||||||
it('Update from popover', () => {});
|
|
||||||
it('Update from table', () => {});
|
|
||||||
});
|
|
||||||
describe.skip('Update state', () => {
|
|
||||||
it('Update from popover', () => {});
|
|
||||||
it('Update from table', () => {});
|
|
||||||
});
|
|
||||||
describe.skip('Ticket transfer', () => {
|
|
||||||
describe('Split ticket if ', () => {
|
|
||||||
it('Ticket has less or equal than 1 row', () => {});
|
|
||||||
it('Ticket has more than 1 row', () => {});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
describe.only('Item proposal', () => {
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.get('tr.cursor-pointer > :nth-child(1)').click();
|
cy.get('tr.cursor-pointer > :nth-child(1)').click();
|
||||||
|
|
||||||
|
@ -158,23 +140,8 @@ describe('Ticket Lack detail', () => {
|
||||||
});
|
});
|
||||||
describe('Replace item if', () => {
|
describe('Replace item if', () => {
|
||||||
it.only('Quantity is less than available', () => {
|
it.only('Quantity is less than available', () => {
|
||||||
/* ==== Generated with Cypress Studio ==== */
|
cy.get(':nth-child(1) > .text-right > .q-btn').click();
|
||||||
cy.get(
|
});
|
||||||
':nth-child(2) > .text-left > .q-td > [data-cy="replaceBtn"]',
|
|
||||||
).should('not.have.class', 'fill-icon');
|
|
||||||
cy.get(
|
|
||||||
':nth-child(2) > .text-left > .q-td > [data-cy="replaceBtn"] > .q-btn__content > .q-icon',
|
|
||||||
).click();
|
|
||||||
cy.get(
|
|
||||||
':nth-child(2) > .text-left > .q-td > [data-cy="replaceBtn"]',
|
|
||||||
).should('have.class', 'fill-icon');
|
|
||||||
cy.get(
|
|
||||||
':nth-child(2) > .text-left > .q-td > [data-cy="replaceBtn"] > .q-btn__content > .q-icon',
|
|
||||||
).click();
|
|
||||||
/* ==== End Cypress Studio ==== */
|
|
||||||
});
|
|
||||||
it('Quantity is equal than available', () => {});
|
|
||||||
it('Quantity is more than available', () => {});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -24,7 +24,6 @@ describe('Ticket Lack list', () => {
|
||||||
|
|
||||||
cy.visit('/#/ticket/negative');
|
cy.visit('/#/ticket/negative');
|
||||||
});
|
});
|
||||||
describe('Filters', () => {});
|
|
||||||
|
|
||||||
describe('Table actions', () => {
|
describe('Table actions', () => {
|
||||||
it('should display only one row in the lack list', () => {
|
it('should display only one row in the lack list', () => {
|
||||||
|
|
Loading…
Reference in New Issue