-
+
@@ -169,6 +211,8 @@ const columns = computed(() => [
:option-value="col.optionValue"
:option-label="col.optionLabel"
dense
+ input-debounce="0"
+ :autofocus="col.tabIndex == 1"
/>
@@ -178,9 +222,28 @@ const columns = computed(() => [
+
+
+
-
+
diff --git a/src/pages/Claim/Card/ClaimLines.vue b/src/pages/Claim/Card/ClaimLines.vue
index 8680ff922..c03291b85 100644
--- a/src/pages/Claim/Card/ClaimLines.vue
+++ b/src/pages/Claim/Card/ClaimLines.vue
@@ -40,7 +40,6 @@ const claimLinesForm = ref();
const claim = ref(null);
async function onFetchClaim(data) {
claim.value = data;
-
fetchMana();
}
@@ -147,8 +146,11 @@ function showImportDialog() {
quasar
.dialog({
component: ClaimLinesImport,
+ componentProps: {
+ ticketId: claim.value.ticketFk,
+ },
})
- .onOk(() => arrayData.refresh());
+ .onOk(() => claimLinesForm.value.reload());
}
diff --git a/src/pages/Claim/Card/ClaimLinesImport.vue b/src/pages/Claim/Card/ClaimLinesImport.vue
index 26e59bbc0..be8914eec 100644
--- a/src/pages/Claim/Card/ClaimLinesImport.vue
+++ b/src/pages/Claim/Card/ClaimLinesImport.vue
@@ -14,6 +14,13 @@ const route = useRoute();
const quasar = useQuasar();
const { t } = useI18n();
+const $props = defineProps({
+ ticketId: {
+ type: Number,
+ required: true,
+ },
+});
+
const columns = computed(() => [
{
name: 'delivered',
@@ -99,7 +106,7 @@ function cancel() {
(claimableSales = data)"
auto-load
/>
diff --git a/test/cypress/integration/claimDevelopment.spec.js b/test/cypress/integration/claimDevelopment.spec.js
index 77ce2bb45..88ccbfab8 100755
--- a/test/cypress/integration/claimDevelopment.spec.js
+++ b/test/cypress/integration/claimDevelopment.spec.js
@@ -13,15 +13,17 @@ describe('ClaimDevelopment', () => {
it('should reset line', () => {
cy.selectOption(firstLineReason, 'Novato');
cy.resetCard();
- cy.getValue(firstLineReason).should('have.text', 'Prisas');
+ cy.getValue(firstLineReason).should('have.value', 'Prisas');
});
it('should edit line', () => {
cy.selectOption(firstLineReason, 'Novato');
- cy.saveCard();
- cy.reload();
- cy.getValue(firstLineReason).should('have.text', 'Novato');
+ cy.saveCard();
+ cy.login('developer');
+ cy.visit(`/#/claim/${claimId}/development`);
+
+ cy.getValue(firstLineReason).should('have.value', 'Novato');
//Restart data
cy.selectOption(firstLineReason, 'Prisas');
@@ -29,13 +31,16 @@ describe('ClaimDevelopment', () => {
});
it('should add and remove new line', () => {
- //add row
cy.addCard();
cy.get(thirdRow).should('exist');
const rowData = [false, 'Novato', 'Roces', 'Compradores', 'employeeNick', 'Tour'];
cy.fillRow(thirdRow, rowData);
+
cy.saveCard();
+ cy.login('developer');
+ cy.visit(`/#/claim/${claimId}/development`);
+
cy.validateRow(thirdRow, rowData);
cy.reload();
diff --git a/test/cypress/support/commands.js b/test/cypress/support/commands.js
index 2eb14e463..a725837a1 100755
--- a/test/cypress/support/commands.js
+++ b/test/cypress/support/commands.js
@@ -54,7 +54,7 @@ Cypress.Commands.add('getValue', (selector) => {
else if ($el.find('.q-select__dropdown-icon').length) {
return cy.get(
selector +
- '> .q-field > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native > span'
+ '> .q-field > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native > input'
);
} else {
// Puedes aƱadir un log o lanzar un error si el elemento no es reconocido
@@ -76,7 +76,6 @@ Cypress.Commands.add('checkOption', (selector) => {
// Global buttons
Cypress.Commands.add('saveCard', () => {
cy.get('[title="Save"]').click();
- cy.get('[title="Save"]').should('have.class', 'disabled');
});
Cypress.Commands.add('resetCard', () => {
cy.get('[title="Reset"]').click();
@@ -123,7 +122,7 @@ Cypress.Commands.add('validateRow', (rowSelector, expectedValues) => {
cy.getValue(`:nth-child(${index + 1})`).should(`${prefix}be.checked`);
continue;
}
- cy.getValue(`:nth-child(${index + 1})`).should('have.text', value);
+ cy.getValue(`:nth-child(${index + 1})`).should('have.value', value);
}
});
});