Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix-front into dev
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
This commit is contained in:
commit
0dbcc4be3d
|
@ -34,7 +34,7 @@ const model = defineModel(undefined, { required: true });
|
||||||
const arrayData = useArrayData($props.dataKey, { searchUrl: $props.searchUrl });
|
const arrayData = useArrayData($props.dataKey, { searchUrl: $props.searchUrl });
|
||||||
const columnFilter = computed(() => $props.column?.columnFilter);
|
const columnFilter = computed(() => $props.column?.columnFilter);
|
||||||
|
|
||||||
const updateEvent = { 'update:modelValue': addFilter, remove: () => addFilter(null) };
|
const updateEvent = { 'update:modelValue': addFilter };
|
||||||
const enterEvent = {
|
const enterEvent = {
|
||||||
'keyup.enter': () => addFilter(model.value),
|
'keyup.enter': () => addFilter(model.value),
|
||||||
remove: () => addFilter(null),
|
remove: () => addFilter(null),
|
||||||
|
|
|
@ -722,6 +722,7 @@ worker:
|
||||||
newWorker: New worker
|
newWorker: New worker
|
||||||
card:
|
card:
|
||||||
workerId: Worker ID
|
workerId: Worker ID
|
||||||
|
user: User
|
||||||
name: Name
|
name: Name
|
||||||
email: Email
|
email: Email
|
||||||
phone: Phone
|
phone: Phone
|
||||||
|
|
|
@ -729,6 +729,7 @@ worker:
|
||||||
newWorker: Nuevo trabajador
|
newWorker: Nuevo trabajador
|
||||||
card:
|
card:
|
||||||
workerId: ID Trabajador
|
workerId: ID Trabajador
|
||||||
|
user: Usuario
|
||||||
name: Nombre
|
name: Nombre
|
||||||
email: Correo personal
|
email: Correo personal
|
||||||
phone: Teléfono
|
phone: Teléfono
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -52,6 +52,7 @@ const columns = computed(() => [
|
||||||
name: 'attendedBy',
|
name: 'attendedBy',
|
||||||
orderBy: 'workerFk',
|
orderBy: 'workerFk',
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
|
name: 'attenderFk',
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'Workers/activeWithInheritedRole',
|
url: 'Workers/activeWithInheritedRole',
|
||||||
|
|
|
@ -151,7 +151,7 @@ const refetch = async () => await cardDescriptorRef.value.getData();
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<VnLv :label="t('worker.card.name')" :value="entity.user?.nickname" />
|
<VnLv :label="t('worker.card.user')" :value="entity.user?.name" />
|
||||||
<VnLv :label="t('worker.card.email')" :value="entity.user?.email" copy />
|
<VnLv :label="t('worker.card.email')" :value="entity.user?.email" copy />
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('worker.list.department')"
|
:label="t('worker.list.department')"
|
||||||
|
|
|
@ -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