forked from verdnatura/salix-front
Reviewed-on: verdnatura/salix-front#709 Reviewed-by: Carlos Andrés <carlosap@verdnatura.es> Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
6703511ce9
|
@ -16,7 +16,6 @@ const claimReasons = ref([]);
|
||||||
const claimResults = ref([]);
|
const claimResults = ref([]);
|
||||||
const claimResponsibles = ref([]);
|
const claimResponsibles = ref([]);
|
||||||
const claimRedeliveries = ref([]);
|
const claimRedeliveries = ref([]);
|
||||||
const workers = ref([]);
|
|
||||||
const selected = ref([]);
|
const selected = ref([]);
|
||||||
const saveButtonRef = ref();
|
const saveButtonRef = ref();
|
||||||
|
|
||||||
|
@ -82,7 +81,9 @@ const columns = computed(() => [
|
||||||
label: t('Worker'),
|
label: t('Worker'),
|
||||||
field: (row) => row.workerFk,
|
field: (row) => row.workerFk,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
options: workers.value,
|
url: 'Workers/search',
|
||||||
|
where: { active: 1 },
|
||||||
|
sortBy: 'name ASC',
|
||||||
model: 'workerFk',
|
model: 'workerFk',
|
||||||
optionValue: 'id',
|
optionValue: 'id',
|
||||||
optionLabel: 'nickname',
|
optionLabel: 'nickname',
|
||||||
|
@ -129,13 +130,6 @@ const columns = computed(() => [
|
||||||
@on-fetch="(data) => (claimRedeliveries = data)"
|
@on-fetch="(data) => (claimRedeliveries = data)"
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<FetchData
|
|
||||||
url="Workers/search"
|
|
||||||
:where="{ active: 1 }"
|
|
||||||
order="name ASC"
|
|
||||||
@on-fetch="(data) => (workers = data)"
|
|
||||||
auto-load
|
|
||||||
/>
|
|
||||||
<CrudModel
|
<CrudModel
|
||||||
data-key="ClaimDevelopments"
|
data-key="ClaimDevelopments"
|
||||||
url="ClaimDevelopments"
|
url="ClaimDevelopments"
|
||||||
|
@ -165,6 +159,9 @@ const columns = computed(() => [
|
||||||
>
|
>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
v-model="row[col.model]"
|
v-model="row[col.model]"
|
||||||
|
:url="col.url"
|
||||||
|
:where="col.where"
|
||||||
|
:sort-by="col.sortBy"
|
||||||
:options="col.options"
|
:options="col.options"
|
||||||
:option-value="col.optionValue"
|
:option-value="col.optionValue"
|
||||||
:option-label="col.optionLabel"
|
:option-label="col.optionLabel"
|
||||||
|
|
|
@ -8,6 +8,8 @@ describe('ClaimDevelopment', () => {
|
||||||
cy.viewport(1920, 1080);
|
cy.viewport(1920, 1080);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit(`/#/claim/${claimId}/development`);
|
cy.visit(`/#/claim/${claimId}/development`);
|
||||||
|
cy.intercept('GET', /\/api\/Workers\/search/).as('workers');
|
||||||
|
cy.intercept('GET', /\/api\/Workers\/search/).as('workers');
|
||||||
cy.waitForElement('tbody');
|
cy.waitForElement('tbody');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -32,10 +34,19 @@ describe('ClaimDevelopment', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should add and remove new line', () => {
|
it('should add and remove new line', () => {
|
||||||
|
cy.wait(['@workers', '@workers']);
|
||||||
cy.addCard();
|
cy.addCard();
|
||||||
|
|
||||||
cy.get(thirdRow).should('exist');
|
cy.get(thirdRow).should('exist');
|
||||||
|
|
||||||
const rowData = [false, 'Novato', 'Roces', 'Compradores', 'employeeNick', 'Tour'];
|
const rowData = [
|
||||||
|
false,
|
||||||
|
'Novato',
|
||||||
|
'Roces',
|
||||||
|
'Compradores',
|
||||||
|
'administrativeNick',
|
||||||
|
'Tour',
|
||||||
|
];
|
||||||
cy.fillRow(thirdRow, rowData);
|
cy.fillRow(thirdRow, rowData);
|
||||||
|
|
||||||
cy.saveCard();
|
cy.saveCard();
|
||||||
|
|
Loading…
Reference in New Issue