diff --git a/src/pages/Entry/Card/EntryBuys.vue b/src/pages/Entry/Card/EntryBuys.vue
index f5ee3e7cb..dd17082db 100644
--- a/src/pages/Entry/Card/EntryBuys.vue
+++ b/src/pages/Entry/Card/EntryBuys.vue
@@ -59,31 +59,6 @@ const columns = [
createOrder: 12,
width: '25px',
},
- {
- label: t('Buyer'),
- name: 'workerFk',
- component: 'select',
- attrs: {
- url: 'TicketRequests/getItemTypeWorker',
- fields: ['id', 'nickname'],
- optionLabel: 'nickname',
- sortBy: 'nickname ASC',
- optionValue: 'id',
- },
- visible: false,
- },
- {
- label: t('Family'),
- name: 'itemTypeFk',
- component: 'select',
- attrs: {
- url: 'itemTypes',
- fields: ['id', 'name'],
- optionLabel: 'name',
- optionValue: 'id',
- },
- visible: false,
- },
{
name: 'id',
isId: true,
@@ -115,15 +90,8 @@ const columns = [
{
align: 'center',
label: t('Article'),
+ component: 'input',
name: 'name',
- component: 'select',
- attrs: {
- url: 'Items',
- fields: ['id', 'name'],
- optionLabel: 'name',
- optionValue: 'id',
- sortBy: 'name ASC',
- },
width: '85px',
isEditable: false,
},
@@ -423,6 +391,8 @@ const itemTypeFk = ref(null);
const inkFk = ref(null);
const tag1 = ref(null);
const tag2 = ref(null);
+const tag1Filter = ref(null);
+const tag2Filter = ref(null);
const filter = computed(() => {
const where = {};
if (buyerFk.value) {
@@ -434,6 +404,7 @@ const filter = computed(() => {
if (inkFk.value) {
where.inkFk = inkFk.value;
}
+
if (tag1.value) {
where.tag1 = tag1.value;
}
@@ -710,8 +681,16 @@ onMounted(() => {
option-label="name"
sort-by="name ASC"
/>
-
-
+
+
diff --git a/test/cypress/integration/entry/entryCard/entryNotes.spec.js b/test/cypress/integration/entry/entryCard/entryNotes.spec.js
index 08d2731b6..544ac23b0 100644
--- a/test/cypress/integration/entry/entryCard/entryNotes.spec.js
+++ b/test/cypress/integration/entry/entryCard/entryNotes.spec.js
@@ -7,14 +7,44 @@ describe('EntryNotes', () => {
cy.visit(`/#/entry/list`);
});
- it('Create delete and edit', () => {
+ const createObservation = (type, description) => {
+ cy.dataCy('vnTableCreateBtn').click();
+ cy.dataCy('Observation type_select').eq(1).should('be.visible').type(type);
+ cy.get('div[role="listbox"] > div > div[role="option"]').eq(0).click();
+ cy.dataCy('Description_input').should('be.visible').type(description);
+ cy.dataCy('FormModelPopup_save').should('be.enabled').click();
+ };
+
+ const editObservation = (rowIndex, type, description) => {
+ cy.get(`td[data-col-field="description"][data-row-index="${rowIndex}"]`)
+ .click()
+ .clear()
+ .type(description);
+ cy.get(`td[data-col-field="observationTypeFk"][data-row-index="${rowIndex}"]`)
+ .click()
+ .clear()
+ .type(type);
+ cy.get('div[role="listbox"] > div > div[role="option"]').eq(0).click();
+ cy.saveCard();
+ };
+
+ it('Create, delete, and edit observations', () => {
cy.createEntry();
cy.waitForElement('[data-cy="entry-buys"]');
+
cy.dataCy('EntryNotes-menu-item').click();
- cy.dataCy('vnTableCreateBtn').click();
- cy.dataCy('Observation type_select').eq(1).should('be.visible').type('Packager');
- cy.dataCy('Description_input').should('be.visible').type('test');
- cy.dataCy('FormModelPopup_save').should('be.enabled').click();
+
+ createObservation('Packager', 'test');
+ cy.get('.q-notification__message').eq(0).should('have.text', 'Data created');
+
+ editObservation(0, 'Administrative', 'test2');
+
+ createObservation('Administrative', 'test');
+ cy.get('.q-notification__message')
+ .eq(2)
+ .should('have.text', "The observation type can't be repeated");
+ cy.dataCy('FormModelPopup_cancel').click();
+
cy.deleteEntry();
});
});
diff --git a/test/cypress/integration/entry/entryList.spec.js b/test/cypress/integration/entry/entryList.spec.js
index f0397d3e1..9fe14dcb7 100644
--- a/test/cypress/integration/entry/entryList.spec.js
+++ b/test/cypress/integration/entry/entryList.spec.js
@@ -7,20 +7,12 @@ describe('Entry', () => {
cy.visit(`/#/entry/list`);
});
- it('Filter deleted entries and view popup summary', () => {
+ it('View popup summary', () => {
cy.createEntry();
cy.get('.q-notification__message').eq(0).should('have.text', 'Data created');
cy.waitForElement('[data-cy="entry-buys"]');
cy.deleteEntry();
cy.typeSearchbar('{enter}');
- cy.get('span[title="Date"]').click().click();
- cy.typeSearchbar('{enter}');
- cy.url().should('include', 'order');
- cy.get('td[data-row-index="0"][data-col-field="landed"]').should(
- 'have.text',
- '-',
- );
-
cy.get('button[title="Summary"]').eq(1).should('be.visible').click();
cy.dataCy('entry-summary').should('be.visible');
});