0
0
Fork 0

Merge branch 'dev' into 6943_fix_customer_module

This commit is contained in:
Javier Segarra 2024-09-16 10:11:29 +00:00
commit 27069e56b8
13 changed files with 94 additions and 103 deletions

View File

@ -34,7 +34,7 @@ const model = defineModel(undefined, { required: true });
const arrayData = useArrayData($props.dataKey, { searchUrl: $props.searchUrl });
const columnFilter = computed(() => $props.column?.columnFilter);
const updateEvent = { 'update:modelValue': addFilter, remove: () => addFilter(null) };
const updateEvent = { 'update:modelValue': addFilter };
const enterEvent = {
'keyup.enter': () => addFilter(model.value),
remove: () => addFilter(null),

View File

@ -285,6 +285,14 @@ globals:
createInvoiceIn: Create invoice in
myAccount: My account
noOne: No one
params:
clientFk: Client id
salesPersonFk: Sales person
warehouseFk: Warehouse
provinceFk: Province
from: From
To: To
stateFk: State
errors:
statusUnauthorized: Access denied
statusInternalServerError: An internal server error has ocurred
@ -722,6 +730,7 @@ worker:
newWorker: New worker
card:
workerId: Worker ID
user: User
name: Name
email: Email
phone: Phone

View File

@ -289,6 +289,14 @@ globals:
createInvoiceIn: Crear factura recibida
myAccount: Mi cuenta
noOne: Nadie
params:
clientFk: Id cliente
salesPersonFk: Comercial
warehouseFk: Almacén
provinceFk: Provincia
from: Desde
To: Hasta
stateFk: Estado
errors:
statusUnauthorized: Acceso denegado
statusInternalServerError: Ha ocurrido un error interno del servidor
@ -729,6 +737,7 @@ worker:
newWorker: Nuevo trabajador
card:
workerId: ID Trabajador
user: Usuario
name: Nombre
email: Correo personal
phone: Teléfono

View File

@ -16,7 +16,6 @@ const claimReasons = ref([]);
const claimResults = ref([]);
const claimResponsibles = ref([]);
const claimRedeliveries = ref([]);
const workers = ref([]);
const selected = ref([]);
const saveButtonRef = ref();
@ -82,7 +81,9 @@ const columns = computed(() => [
label: t('Worker'),
field: (row) => row.workerFk,
sortable: true,
options: workers.value,
url: 'Workers/search',
where: { active: 1 },
sortBy: 'name ASC',
model: 'workerFk',
optionValue: 'id',
optionLabel: 'nickname',
@ -129,13 +130,6 @@ const columns = computed(() => [
@on-fetch="(data) => (claimRedeliveries = data)"
auto-load
/>
<FetchData
url="Workers/search"
:where="{ active: 1 }"
order="name ASC"
@on-fetch="(data) => (workers = data)"
auto-load
/>
<CrudModel
data-key="ClaimDevelopments"
url="ClaimDevelopments"
@ -165,6 +159,9 @@ const columns = computed(() => [
>
<VnSelect
v-model="row[col.model]"
:url="col.url"
:where="col.where"
:sort-by="col.sortBy"
:options="col.options"
:option-value="col.optionValue"
:option-label="col.optionLabel"

View File

@ -52,6 +52,7 @@ const columns = computed(() => [
name: 'attendedBy',
orderBy: 'workerFk',
columnFilter: {
name: 'attenderFk',
component: 'select',
attrs: {
url: 'Workers/activeWithInheritedRole',

View File

@ -116,7 +116,7 @@ const entriesTableColumns = computed(() => [
{{ col.value }}
</QTd>
<QBtn
icon="print"
icon="visibility"
v-if="props.row.stickers > 0"
:loading="isLoading"
@click="
@ -126,7 +126,7 @@ const entriesTableColumns = computed(() => [
"
unelevated
>
<QTooltip>{{ t('printLabel') }}</QTooltip>
<QTooltip>{{ t('viewLabel') }}</QTooltip>
</QBtn>
</QTr>
</template>

View File

@ -11,4 +11,4 @@ shipped: Shipped
fromShipped: Shipped(from)
toShipped: Shipped(to)
printLabels: Print stickers
printLabel: Print sticker
viewLabel: View sticker

View File

@ -15,4 +15,4 @@ shipped: F. salida
fromShipped: F. salida(desde)
toShipped: F. salida(hasta)
printLabels: Imprimir etiquetas
printLabel: Imprimir etiqueta
viewLabel: Ver etiqueta

View File

@ -76,16 +76,8 @@ const columns = computed(() => [
name: 'rate2',
...defaultColumnAttrs,
cardVisible: true,
columnField: {
class: 'expand',
component: 'input',
type: 'number',
},
columnFilter: {
class: 'expand',
component: 'input',
type: 'number',
},
component: 'input',
type: 'number',
},
{
label: t('item.fixedPrice.packingPrice'),
@ -93,35 +85,18 @@ const columns = computed(() => [
name: 'rate3',
...defaultColumnAttrs,
cardVisible: true,
columnField: {
class: 'expand',
component: 'input',
type: 'number',
},
columnFilter: {
class: 'expand',
component: 'input',
type: 'number',
},
component: 'input',
type: 'number',
},
{
label: t('item.fixedPrice.minPrice'),
field: 'minPrice',
columnClass: 'shrink',
name: 'minPrice',
...defaultColumnAttrs,
cardVisible: true,
columnField: {
class: 'expand',
component: 'input',
type: 'number',
},
columnFilter: {
class: 'expand',
component: 'input',
type: 'number',
},
component: 'input',
type: 'number',
},
{
label: t('item.fixedPrice.started'),
@ -162,16 +137,9 @@ const columns = computed(() => [
name: 'warehouseFk',
...defaultColumnAttrs,
columnClass: 'shrink',
columnFilter: {
component: 'select',
},
columnField: {
component: 'select',
class: 'expand',
},
attrs: {
options: warehousesOptions,
},
component: 'select',
options: warehousesOptions,
},
{
align: 'right',
@ -518,29 +486,35 @@ function handleOnDataSave({ CrudModelRef }) {
</span>
<span class="subName">{{ row.subName }}</span>
<ItemDescriptorProxy :id="row.itemFk" />
<FetchedTags style="width: max-content; max-width: 220px" :item="row" />
<FetchedTags :item="row" />
</template>
<template #column-rate2="props">
<VnInput
mask="###.##"
v-model.number="props.row.rate2"
v-on="getRowUpdateInputEvents(props)"
>
<template #append></template>
</VnInput>
<QTd class="col">
<VnInput
type="currency"
style="width: 75px"
v-model.number="props.row.rate2"
v-on="getRowUpdateInputEvents(props)"
>
<template #append></template>
</VnInput>
</QTd>
</template>
<template #column-rate3="props">
<VnInput
mask="###.##"
v-model.number="props.row.rate3"
v-on="getRowUpdateInputEvents(props)"
>
<template #append></template>
</VnInput>
<QTd class="col">
<VnInput
style="width: 75px"
type="currency"
v-model.number="props.row.rate3"
v-on="getRowUpdateInputEvents(props)"
>
<template #append></template>
</VnInput>
</QTd>
</template>
<template #column-minPrice="props">
<QTd class="col">
<div class="row" style="width: 115px">
<div class="row">
<QCheckbox
:model-value="props.row.hasMinPrice"
@update:model-value="updateMinPrice($event, props)"
@ -549,6 +523,8 @@ function handleOnDataSave({ CrudModelRef }) {
/>
<VnInput
class="col"
type="currency"
mask="###.##"
:disable="props.row.hasMinPrice === 1"
v-model.number="props.row.minPrice"
v-on="getRowUpdateInputEvents(props)"
@ -577,15 +553,17 @@ function handleOnDataSave({ CrudModelRef }) {
/>
</template>
<template #column-warehouseFk="props">
<VnSelect
style="max-width: 150px"
:options="warehousesOptions"
hide-selected
option-label="name"
option-value="id"
v-model="props.row.warehouseFk"
v-on="getRowUpdateInputEvents(props, false, 'select')"
/>
<QTd class="col">
<VnSelect
style="max-width: 150px"
:options="warehousesOptions"
hide-selected
option-label="name"
option-value="id"
v-model="props.row.warehouseFk"
v-on="getRowUpdateInputEvents(props, false, 'select')"
/>
</QTd>
</template>
<template #column-deleteAction="{ row, rowIndex }">
<QIcon

View File

@ -40,7 +40,7 @@ const handleScopeDays = (params, days, callback) => {
<VnFilterPanel
:data-key="dataKey"
:search-button="true"
:hidden-tags="['from', 'to']"
:hidden-tags="['from', 'to', 'search']"
:custom-tags="['scopeDays']"
:unremovable-params="['from', 'to', 'scopeDays']"
>
@ -64,7 +64,7 @@ const handleScopeDays = (params, days, callback) => {
<QItem>
<QItemSection>
<VnInput
:label="t('params.clientFk')"
:label="t('globals.params.clientFk')"
v-model="params.clientFk"
is-outlined
/>
@ -105,7 +105,7 @@ const handleScopeDays = (params, days, callback) => {
outlined
dense
rounded
:label="t('params.salesPersonFk')"
:label="t('globals.params.salesPersonFk')"
v-model="params.salesPersonFk"
url="Workers/search"
:params="{ departmentCodes: ['VT'] }"
@ -158,7 +158,7 @@ const handleScopeDays = (params, days, callback) => {
outlined
dense
rounded
:label="t('params.stateFk')"
:label="t('globals.params.stateFk')"
v-model="params.stateFk"
url="States"
is-outlined
@ -184,7 +184,7 @@ const handleScopeDays = (params, days, callback) => {
outlined
dense
rounded
:label="t('params.warehouseFk')"
:label="t('globals.params.warehouseFk')"
v-model="params.warehouseFk"
:options="warehouses"
/>
@ -196,7 +196,7 @@ const handleScopeDays = (params, days, callback) => {
outlined
dense
rounded
:label="t('params.provinceFk')"
:label="t('globals.params.provinceFk')"
v-model="params.provinceFk"
url="Provinces"
/>
@ -235,22 +235,15 @@ const handleScopeDays = (params, days, callback) => {
<i18n>
en:
params:
clientFk: Client id
orderFk: Order id
scopeDays: Days onward
nickname: Nickname
salesPersonFk: Sales person
refFk: Invoice
agencyModeFk: Agency
stateFk: State
groupedStates: Grouped State
warehouseFk: Warehouse
provinceFk: Province
myTeam: My team
problems: With problems
pending: Pending
from: From
to: To
alertLevel: Grouped State
FREE: Free
DELIVERED: Delivered
@ -261,22 +254,15 @@ en:
es:
params:
clientFk: Id cliente
orderFk: Id cesta
scopeDays: Días en adelante
nickname: Nombre mostrado
salesPersonFk: Comercial
refFk: Factura
agencyModeFk: Agencia
stateFk: Estado
groupedStates: Estado agrupado
warehouseFk: Almacén
provinceFk: Provincia
myTeam: Mi equipo
problems: Con problemas
pending: Pendiente
from: Desde
To: Hasta
alertLevel: Estado agrupado
FREE: Libre
DELIVERED: Servido

View File

@ -3,7 +3,7 @@ import VnSearchbar from 'components/ui/VnSearchbar.vue';
</script>
<template>
<VnSearchbar
data-key="SalesMonitorTickets"
data-key="saleMonitorTickets"
url="SalesMonitors/salesFilter"
:redirect="false"
:label="$t('searchBar.label')"

View File

@ -151,7 +151,7 @@ const refetch = async () => await cardDescriptorRef.value.getData();
</div>
</template>
<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.list.department')"

View File

@ -8,6 +8,8 @@ describe('ClaimDevelopment', () => {
cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/claim/${claimId}/development`);
cy.intercept('GET', /\/api\/Workers\/search/).as('workers');
cy.intercept('GET', /\/api\/Workers\/search/).as('workers');
cy.waitForElement('tbody');
});
@ -32,10 +34,19 @@ describe('ClaimDevelopment', () => {
});
it('should add and remove new line', () => {
cy.wait(['@workers', '@workers']);
cy.addCard();
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.saveCard();