#7354 end Zone migration #539
|
@ -164,7 +164,7 @@ const isEmployee = computed(() => useRole().isEmployee());
|
||||||
class="q-mt-sm q-px-md"
|
class="q-mt-sm q-px-md"
|
||||||
:to="`/worker/${user.id}`"
|
:to="`/worker/${user.id}`"
|
||||||
color="primary"
|
color="primary"
|
||||||
:label="t('My account')"
|
:label="t('globals.myAccount')"
|
||||||
dense
|
dense
|
||||||
/>
|
/>
|
||||||
<div class="text-subtitle1 q-mt-md">
|
<div class="text-subtitle1 q-mt-md">
|
||||||
|
@ -270,7 +270,3 @@ const isEmployee = computed(() => useRole().isEmployee());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<i18n>
|
|
||||||
es:
|
|
||||||
My account: Mi cuenta
|
|
||||||
</i18n>
|
|
||||||
|
|
|
@ -9,6 +9,9 @@
|
||||||
> :deep(*) {
|
> :deep(*) {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
&[wrap] {
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@media screen and (max-width: 800px) {
|
@media screen and (max-width: 800px) {
|
||||||
.vn-row {
|
.vn-row {
|
||||||
|
|
|
@ -43,20 +43,9 @@ onBeforeUnmount(() => stateStore.toggleSubToolbar());
|
||||||
</slot>
|
</slot>
|
||||||
</QToolbar>
|
</QToolbar>
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss">
|
|
||||||
.q-toolbar {
|
|
||||||
background: var(--vn-section-color);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.sticky {
|
.sticky {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 61px;
|
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
@media (max-width: $breakpoint-sm) {
|
|
||||||
.sticky {
|
|
||||||
top: 90px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -190,6 +190,10 @@ select:-webkit-autofill {
|
||||||
font-size: medium;
|
font-size: medium;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.q-toolbar {
|
||||||
|
background: var(--vn-section-color);
|
||||||
|
}
|
||||||
|
|
||||||
.q-card__actions {
|
.q-card__actions {
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
|
@ -266,6 +266,7 @@ globals:
|
||||||
title: Unsaved changes will be lost
|
title: Unsaved changes will be lost
|
||||||
subtitle: Are you sure exit without saving?
|
subtitle: Are you sure exit without saving?
|
||||||
createInvoiceIn: Create invoice in
|
createInvoiceIn: Create invoice in
|
||||||
|
myAccount: My account
|
||||||
errors:
|
errors:
|
||||||
statusUnauthorized: Access denied
|
statusUnauthorized: Access denied
|
||||||
statusInternalServerError: An internal server error has ocurred
|
statusInternalServerError: An internal server error has ocurred
|
||||||
|
|
|
@ -268,7 +268,7 @@ globals:
|
||||||
title: Los cambios que no haya guardado se perderán
|
title: Los cambios que no haya guardado se perderán
|
||||||
subtitle: ¿Seguro que quiere salir sin guardar?
|
subtitle: ¿Seguro que quiere salir sin guardar?
|
||||||
createInvoiceIn: Crear factura recibida
|
createInvoiceIn: Crear factura recibida
|
||||||
|
myAccount: Mi cuenta
|
||||||
errors:
|
errors:
|
||||||
statusUnauthorized: Acceso denegado
|
statusUnauthorized: Acceso denegado
|
||||||
statusInternalServerError: Ha ocurrido un error interno del servidor
|
statusInternalServerError: Ha ocurrido un error interno del servidor
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, onUnmounted, ref, computed } from 'vue';
|
import { onMounted, onUnmounted, ref, computed, watchEffect } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||||
|
@ -12,7 +12,6 @@ import InvoiceOutSummary from './Card/InvoiceOutSummary.vue';
|
||||||
import { toCurrency, toDate } from 'src/filters/index';
|
import { toCurrency, toDate } from 'src/filters/index';
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
import { QBtn } from 'quasar';
|
import { QBtn } from 'quasar';
|
||||||
import { watchEffect } from 'vue';
|
|
||||||
import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue';
|
import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -222,6 +221,7 @@ watchEffect(selectedRows);
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template #more-create-dialog="{ data }">
|
<template #more-create-dialog="{ data }">
|
||||||
|
<div class="flex no-wrap flex-center">
|
||||||
<VnSelect
|
<VnSelect
|
||||||
url="Tickets"
|
url="Tickets"
|
||||||
v-model="data.ticketFk"
|
v-model="data.ticketFk"
|
||||||
|
@ -230,6 +230,8 @@ watchEffect(selectedRows);
|
||||||
option-label="nickname"
|
option-label="nickname"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
/>
|
/>
|
||||||
|
<span class="q-ml-md">O</span>
|
||||||
|
</div>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
url="Clients"
|
url="Clients"
|
||||||
v-model="data.clientFk"
|
v-model="data.clientFk"
|
||||||
|
@ -238,10 +240,6 @@ watchEffect(selectedRows);
|
||||||
option-label="name"
|
option-label="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
/>
|
/>
|
||||||
<VnInputDate
|
|
||||||
:label="t('invoiceOutList.tableVisibleColumns.dueDate')"
|
|
||||||
v-model="data.maxShipped"
|
|
||||||
/>
|
|
||||||
<VnSelect
|
<VnSelect
|
||||||
url="InvoiceOutSerials"
|
url="InvoiceOutSerials"
|
||||||
v-model="data.invoiceOutSerial"
|
v-model="data.invoiceOutSerial"
|
||||||
|
@ -250,6 +248,10 @@ watchEffect(selectedRows);
|
||||||
option-label="description"
|
option-label="description"
|
||||||
option-value="code"
|
option-value="code"
|
||||||
/>
|
/>
|
||||||
|
<VnInputDate
|
||||||
|
:label="t('invoiceOutList.tableVisibleColumns.dueDate')"
|
||||||
|
v-model="data.maxShipped"
|
||||||
|
/>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
url="TaxAreas"
|
url="TaxAreas"
|
||||||
v-model="data.area"
|
v-model="data.area"
|
||||||
|
|
|
@ -74,6 +74,9 @@ const columns = computed(() => [
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'amount',
|
name: 'amount',
|
||||||
label: t('invoiceOutModule.amount'),
|
label: t('invoiceOutModule.amount'),
|
||||||
|
columnFilter: {
|
||||||
|
type: 'number',
|
||||||
|
},
|
||||||
format: (row) => toCurrency(row.amount),
|
format: (row) => toCurrency(row.amount),
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
|
|
|
@ -12,9 +12,12 @@ import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
const workersOptions = ref([]);
|
const educationLevels = ref([]);
|
||||||
const countriesOptions = ref([]);
|
const countries = ref([]);
|
||||||
const educationLevelsOptions = ref([]);
|
const maritalStatus = [
|
||||||
|
{ code: 'M', name: t('Married') },
|
||||||
|
{ code: 'S', name: t('Single') },
|
||||||
|
];
|
||||||
|
|
||||||
const workerFilter = {
|
const workerFilter = {
|
||||||
include: [
|
include: [
|
||||||
|
@ -29,44 +32,21 @@ const workerFilter = {
|
||||||
{ relation: 'department', scope: { include: { relation: 'department' } } },
|
{ relation: 'department', scope: { include: { relation: 'department' } } },
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
const workersFilter = {
|
|
||||||
fields: ['id', 'nickname'],
|
|
||||||
order: 'nickname ASC',
|
|
||||||
limit: 30,
|
|
||||||
};
|
|
||||||
const countriesFilter = {
|
|
||||||
fields: ['id', 'name', 'code'],
|
|
||||||
order: 'name ASC',
|
|
||||||
limit: 30,
|
|
||||||
};
|
|
||||||
const educationLevelsFilter = { fields: ['id', 'name'], order: 'name ASC', limit: 30 };
|
|
||||||
|
|
||||||
const maritalStatus = [
|
|
||||||
{ code: 'M', name: t('Married') },
|
|
||||||
{ code: 'S', name: t('Single') },
|
|
||||||
];
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<FetchData
|
||||||
:filter="workersFilter"
|
:filter="{ fields: ['id', 'name'], order: 'name ASC' }"
|
||||||
@on-fetch="(data) => (workersOptions = data)"
|
@on-fetch="(data) => (educationLevels = data)"
|
||||||
auto-load
|
|
||||||
url="Workers/search"
|
|
||||||
/>
|
|
||||||
<FetchData
|
|
||||||
:filter="countriesFilter"
|
|
||||||
@on-fetch="(data) => (countriesOptions = data)"
|
|
||||||
auto-load
|
|
||||||
url="Countries"
|
|
||||||
/>
|
|
||||||
<FetchData
|
|
||||||
:filter="educationLevelsFilter"
|
|
||||||
@on-fetch="(data) => (educationLevelsOptions = data)"
|
|
||||||
auto-load
|
auto-load
|
||||||
url="EducationLevels"
|
url="EducationLevels"
|
||||||
/>
|
/>
|
||||||
|
<FetchData
|
||||||
|
url="Countries"
|
||||||
|
:filter="{ fields: ['id', 'name'], order: 'name ASC' }"
|
||||||
|
@on-fetch="(data) => (countries = data)"
|
||||||
|
auto-load
|
||||||
|
/>
|
||||||
<FormModel
|
<FormModel
|
||||||
:filter="workerFilter"
|
:filter="workerFilter"
|
||||||
:url="`Workers/${route.params.id}`"
|
:url="`Workers/${route.params.id}`"
|
||||||
|
@ -90,7 +70,7 @@ const maritalStatus = [
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('Boss')"
|
:label="t('Boss')"
|
||||||
:options="workersOptions"
|
url="Workers/search"
|
||||||
hide-selected
|
hide-selected
|
||||||
option-label="nickname"
|
option-label="nickname"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
|
@ -121,7 +101,7 @@ const maritalStatus = [
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('Origin country')"
|
:label="t('Origin country')"
|
||||||
:options="countriesOptions"
|
:options="countries"
|
||||||
hide-selected
|
hide-selected
|
||||||
option-label="name"
|
option-label="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
|
@ -129,7 +109,7 @@ const maritalStatus = [
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('Education level')"
|
:label="t('Education level')"
|
||||||
:options="educationLevelsOptions"
|
:options="educationLevels"
|
||||||
hide-selected
|
hide-selected
|
||||||
option-label="name"
|
option-label="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
|
|
|
@ -108,7 +108,7 @@ const columns = computed(() => [
|
||||||
:filter="courseFilter"
|
:filter="courseFilter"
|
||||||
:create="{
|
:create="{
|
||||||
urlCreate: 'trainingCourses',
|
urlCreate: 'trainingCourses',
|
||||||
title: 'Create trainingCourse',
|
title: t('Create training course'),
|
||||||
onDataSaved: () => tableRef.reload(),
|
onDataSaved: () => tableRef.reload(),
|
||||||
formInitialData: {
|
formInitialData: {
|
||||||
workerFk: entityId,
|
workerFk: entityId,
|
||||||
|
@ -122,3 +122,7 @@ const columns = computed(() => [
|
||||||
:use-model="true"
|
:use-model="true"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
Create training course: Crear curso de formación
|
||||||
|
</i18n>
|
||||||
|
|
|
@ -5,6 +5,7 @@ import { useI18n } from 'vue-i18n';
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
@ -26,7 +27,7 @@ const departments = ref();
|
||||||
<span>{{ formatFn(tag.value) }}</span>
|
<span>{{ formatFn(tag.value) }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ params, searchFn }">
|
<template #body="{ params }">
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInput :label="t('FI')" v-model="params.fi" is-outlined
|
<VnInput :label="t('FI')" v-model="params.fi" is-outlined
|
||||||
|
@ -67,20 +68,17 @@ const departments = ref();
|
||||||
<QSkeleton type="QInput" class="full-width" />
|
<QSkeleton type="QInput" class="full-width" />
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
<QItemSection v-if="departments">
|
<QItemSection v-if="departments">
|
||||||
<QSelect
|
<VnSelect
|
||||||
:label="t('Department')"
|
:label="t('Department')"
|
||||||
v-model="params.departmentFk"
|
v-model="params.departmentFk"
|
||||||
@update:model-value="searchFn()"
|
|
||||||
:options="departments"
|
:options="departments"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
use-input
|
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
rounded
|
rounded
|
||||||
:input-debounce="0"
|
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
@ -107,6 +105,7 @@ en:
|
||||||
userName: User
|
userName: User
|
||||||
extension: Extension
|
extension: Extension
|
||||||
departmentFk: Department
|
departmentFk: Department
|
||||||
|
id: ID
|
||||||
es:
|
es:
|
||||||
params:
|
params:
|
||||||
search: Contiene
|
search: Contiene
|
||||||
|
@ -116,6 +115,7 @@ es:
|
||||||
userName: Usuario
|
userName: Usuario
|
||||||
extension: Extensión
|
extension: Extensión
|
||||||
departmentFk: Departamento
|
departmentFk: Departamento
|
||||||
|
id: ID
|
||||||
FI: NIF
|
FI: NIF
|
||||||
First Name: Nombre
|
First Name: Nombre
|
||||||
Last Name: Apellidos
|
Last Name: Apellidos
|
||||||
|
|
|
@ -14,6 +14,8 @@ import VnLocation from 'src/components/common/VnLocation.vue';
|
||||||
import VnSelectDialog from 'src/components/common/VnSelectDialog.vue';
|
import VnSelectDialog from 'src/components/common/VnSelectDialog.vue';
|
||||||
import CreateBankEntityForm from 'src/components/CreateBankEntityForm.vue';
|
import CreateBankEntityForm from 'src/components/CreateBankEntityForm.vue';
|
||||||
import FetchData from 'src/components/FetchData.vue';
|
import FetchData from 'src/components/FetchData.vue';
|
||||||
|
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||||
|
import WorkerFilter from './WorkerFilter.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
|
@ -28,14 +30,8 @@ const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'id',
|
name: 'id',
|
||||||
label: t('tableColumns.id'),
|
label: t('id'),
|
||||||
columnFilter: {
|
field: 'id',
|
||||||
alias: 'w',
|
|
||||||
inWhere: true,
|
|
||||||
},
|
|
||||||
chip: {
|
|
||||||
condition: () => true,
|
|
||||||
},
|
|
||||||
isId: true,
|
isId: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -44,7 +40,7 @@ const columns = computed(() => [
|
||||||
label: t('tableColumns.name'),
|
label: t('tableColumns.name'),
|
||||||
isTitle: true,
|
isTitle: true,
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
name: 'search',
|
name: 'firstName',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -54,8 +50,7 @@ const columns = computed(() => [
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
component: 'select',
|
component: 'select',
|
||||||
inWhere: true,
|
name: 'departmentFk',
|
||||||
alias: 'wd',
|
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'Departments',
|
url: 'Departments',
|
||||||
},
|
},
|
||||||
|
@ -130,6 +125,11 @@ function uppercaseStreetModel(data) {
|
||||||
@on-fetch="(data) => (bankEntitiesOptions = data)"
|
@on-fetch="(data) => (bankEntitiesOptions = data)"
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
|
<RightMenu>
|
||||||
|
<template #right-panel>
|
||||||
|
<WorkerFilter data-key="Worker" />
|
||||||
|
</template>
|
||||||
|
</RightMenu>
|
||||||
<VnTable
|
<VnTable
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
data-key="Worker"
|
data-key="Worker"
|
||||||
|
@ -145,6 +145,7 @@ function uppercaseStreetModel(data) {
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
default-mode="table"
|
default-mode="table"
|
||||||
redirect="worker"
|
redirect="worker"
|
||||||
|
:right-search="false"
|
||||||
auto-load
|
auto-load
|
||||||
>
|
>
|
||||||
<template #more-create-dialog="{ data }">
|
<template #more-create-dialog="{ data }">
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
describe('WorkerList', () => {
|
describe('WorkerList', () => {
|
||||||
|
const inputName = '.q-drawer .q-form input[aria-label="First Name"]';
|
||||||
|
const searchBtn = '.q-drawer button:nth-child(3)';
|
||||||
|
const descriptorTitle = '.descriptor .title span';
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.viewport(1280, 720);
|
cy.viewport(1280, 720);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
|
@ -6,6 +9,11 @@ describe('WorkerList', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should open the worker summary', () => {
|
it('should open the worker summary', () => {
|
||||||
cy.get('.q-drawer .q-form input[aria-label="Name"]').type('jessica jones{enter}');
|
cy.get(inputName).type('jessica{enter}');
|
||||||
|
cy.get(searchBtn).click();
|
||||||
|
cy.intercept('GET', /\/api\/Workers\/\d+/).as('worker');
|
||||||
|
cy.wait('@worker').then(() =>
|
||||||
|
cy.get(descriptorTitle).should('include.text', 'Jessica')
|
||||||
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue