Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7133-fixCustomerSelect
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
commit
24d09c1841
|
@ -379,7 +379,8 @@ function handleKeyDown(event) {
|
||||||
</template>
|
</template>
|
||||||
<template #option="{ opt, itemProps }">
|
<template #option="{ opt, itemProps }">
|
||||||
<QItem v-bind="itemProps">
|
<QItem v-bind="itemProps">
|
||||||
<QItemSection v-if="opt[optionValue] == opt[optionLabel]">
|
<QItemSection v-if="typeof opt !== 'object'"> {{ opt }}</QItemSection>
|
||||||
|
<QItemSection v-else-if="opt[optionValue] == opt[optionLabel]">
|
||||||
<QItemLabel>{{ opt[optionLabel] }}</QItemLabel>
|
<QItemLabel>{{ opt[optionLabel] }}</QItemLabel>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
<QItemSection v-else>
|
<QItemSection v-else>
|
||||||
|
|
|
@ -861,6 +861,7 @@ components:
|
||||||
ended: To
|
ended: To
|
||||||
mine: For me
|
mine: For me
|
||||||
hasMinPrice: Minimum price
|
hasMinPrice: Minimum price
|
||||||
|
warehouseFk: Warehouse
|
||||||
# LatestBuysFilter
|
# LatestBuysFilter
|
||||||
salesPersonFk: Buyer
|
salesPersonFk: Buyer
|
||||||
from: From
|
from: From
|
||||||
|
|
|
@ -853,6 +853,7 @@ components:
|
||||||
ended: Hasta
|
ended: Hasta
|
||||||
mine: Para mi
|
mine: Para mi
|
||||||
hasMinPrice: Precio mínimo
|
hasMinPrice: Precio mínimo
|
||||||
|
wareHouseFk: Almacén
|
||||||
# LatestBuysFilter
|
# LatestBuysFilter
|
||||||
salesPersonFk: Comprador
|
salesPersonFk: Comprador
|
||||||
active: Activo
|
active: Activo
|
||||||
|
|
|
@ -30,7 +30,7 @@ defineExpose({ states });
|
||||||
<span>{{ formatFn(tag.value) }}</span>
|
<span>{{ formatFn(tag.value) }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ params, searchFn }">
|
<template #body="{ params }">
|
||||||
<div class="q-pa-sm q-gutter-y-sm">
|
<div class="q-pa-sm q-gutter-y-sm">
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('claim.customerId')"
|
:label="t('claim.customerId')"
|
||||||
|
@ -49,12 +49,9 @@ defineExpose({ states });
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('Salesperson')"
|
:label="t('Salesperson')"
|
||||||
v-model="params.salesPersonFk"
|
v-model="params.salesPersonFk"
|
||||||
@update:model-value="searchFn()"
|
|
||||||
url="Workers/activeWithInheritedRole"
|
url="Workers/activeWithInheritedRole"
|
||||||
:filter="{ where: { role: 'salesPerson' } }"
|
:filter="{ where: { role: 'salesPerson' } }"
|
||||||
:use-like="false"
|
:use-like="false"
|
||||||
option-value="id"
|
|
||||||
option-label="name"
|
|
||||||
option-filter="firstName"
|
option-filter="firstName"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
|
@ -63,12 +60,9 @@ defineExpose({ states });
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('claim.attendedBy')"
|
:label="t('claim.attendedBy')"
|
||||||
v-model="params.attenderFk"
|
v-model="params.attenderFk"
|
||||||
@update:model-value="searchFn()"
|
|
||||||
url="Workers/activeWithInheritedRole"
|
url="Workers/activeWithInheritedRole"
|
||||||
:filter="{ where: { role: 'salesPerson' } }"
|
:filter="{ where: { role: 'salesPerson' } }"
|
||||||
:use-like="false"
|
:use-like="false"
|
||||||
option-value="id"
|
|
||||||
option-label="name"
|
|
||||||
option-filter="firstName"
|
option-filter="firstName"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
|
@ -77,9 +71,7 @@ defineExpose({ states });
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('claim.state')"
|
:label="t('claim.state')"
|
||||||
v-model="params.claimStateFk"
|
v-model="params.claimStateFk"
|
||||||
@update:model-value="searchFn()"
|
|
||||||
:options="states"
|
:options="states"
|
||||||
option-value="id"
|
|
||||||
option-label="description"
|
option-label="description"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
|
@ -87,7 +79,6 @@ defineExpose({ states });
|
||||||
/>
|
/>
|
||||||
<VnInputDate
|
<VnInputDate
|
||||||
v-model="params.created"
|
v-model="params.created"
|
||||||
@update:model-value="searchFn()"
|
|
||||||
:label="t('claim.created')"
|
:label="t('claim.created')"
|
||||||
outlined
|
outlined
|
||||||
rounded
|
rounded
|
||||||
|
@ -96,10 +87,7 @@ defineExpose({ states });
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('Item')"
|
:label="t('Item')"
|
||||||
v-model="params.itemFk"
|
v-model="params.itemFk"
|
||||||
@update:model-value="searchFn()"
|
|
||||||
url="Items/withName"
|
url="Items/withName"
|
||||||
option-value="id"
|
|
||||||
option-label="name"
|
|
||||||
:use-like="false"
|
:use-like="false"
|
||||||
sort-by="id DESC"
|
sort-by="id DESC"
|
||||||
outlined
|
outlined
|
||||||
|
@ -118,21 +106,26 @@ defineExpose({ states });
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('claim.responsible')"
|
:label="t('claim.responsible')"
|
||||||
v-model="params.claimResponsibleFk"
|
v-model="params.claimResponsibleFk"
|
||||||
@update:model-value="searchFn()"
|
|
||||||
url="Workers/activeWithInheritedRole"
|
url="Workers/activeWithInheritedRole"
|
||||||
:filter="{ where: { role: 'salesPerson' } }"
|
:filter="{ where: { role: 'salesPerson' } }"
|
||||||
:use-like="false"
|
:use-like="false"
|
||||||
option-value="id"
|
|
||||||
option-label="name"
|
|
||||||
option-filter="firstName"
|
option-filter="firstName"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
rounded
|
rounded
|
||||||
/>
|
/>
|
||||||
|
<VnSelect
|
||||||
|
:label="t('claim.zone')"
|
||||||
|
v-model="params.zoneFk"
|
||||||
|
url="Zones"
|
||||||
|
:use-like="false"
|
||||||
|
outlined
|
||||||
|
rounded
|
||||||
|
dense
|
||||||
|
/>
|
||||||
<QCheckbox
|
<QCheckbox
|
||||||
v-model="params.myTeam"
|
v-model="params.myTeam"
|
||||||
:label="t('params.myTeam')"
|
:label="t('params.myTeam')"
|
||||||
@update:model-value="searchFn()"
|
|
||||||
toggle-indeterminate
|
toggle-indeterminate
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -153,6 +146,7 @@ en:
|
||||||
created: Created
|
created: Created
|
||||||
myTeam: My team
|
myTeam: My team
|
||||||
itemFk: Item
|
itemFk: Item
|
||||||
|
zoneFk: Zone
|
||||||
es:
|
es:
|
||||||
params:
|
params:
|
||||||
search: Contiene
|
search: Contiene
|
||||||
|
@ -165,6 +159,7 @@ es:
|
||||||
created: Creada
|
created: Creada
|
||||||
myTeam: Mi equipo
|
myTeam: Mi equipo
|
||||||
itemFk: Artículo
|
itemFk: Artículo
|
||||||
|
zoneFk: Zona
|
||||||
Client Name: Nombre del cliente
|
Client Name: Nombre del cliente
|
||||||
Salesperson: Comercial
|
Salesperson: Comercial
|
||||||
Item: Artículo
|
Item: Artículo
|
||||||
|
|
|
@ -10,6 +10,7 @@ import ClaimSummary from './Card/ClaimSummary.vue';
|
||||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||||
import VnTable from 'src/components/VnTable/VnTable.vue';
|
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||||
|
import ZoneDescriptorProxy from '../Zone/Card/ZoneDescriptorProxy.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { viewSummary } = useSummaryDialog();
|
const { viewSummary } = useSummaryDialog();
|
||||||
|
@ -95,7 +96,12 @@ const columns = computed(() => [
|
||||||
optionLabel: 'description',
|
optionLabel: 'description',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
orderBy: 'priority',
|
orderBy: 'cs.priority',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
label: t('claim.zone'),
|
||||||
|
name: 'zoneFk'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'right',
|
align: 'right',
|
||||||
|
@ -132,7 +138,7 @@ const STATE_COLOR = {
|
||||||
<VnTable
|
<VnTable
|
||||||
data-key="ClaimList"
|
data-key="ClaimList"
|
||||||
url="Claims/filter"
|
url="Claims/filter"
|
||||||
:order="['priority ASC', 'created ASC']"
|
:order="['cs.priority ASC', 'created ASC']"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
redirect="claim"
|
redirect="claim"
|
||||||
:right-search="false"
|
:right-search="false"
|
||||||
|
@ -148,6 +154,12 @@ const STATE_COLOR = {
|
||||||
<VnUserLink :name="row.workerName" :worker-id="row.workerFk" />
|
<VnUserLink :name="row.workerName" :worker-id="row.workerFk" />
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
<template #column-zoneFk="{ row }">
|
||||||
|
<span class="link" @click.stop>
|
||||||
|
{{ row.zoneName }}
|
||||||
|
<ZoneDescriptorProxy :id="row.zoneId" />
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
</VnTable>
|
</VnTable>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -116,6 +116,7 @@ function deleteFile(dmsFk) {
|
||||||
<template #form="{ data }">
|
<template #form="{ data }">
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
|
:required="true"
|
||||||
:label="t('supplierFk')"
|
:label="t('supplierFk')"
|
||||||
v-model="data.supplierFk"
|
v-model="data.supplierFk"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
|
@ -244,6 +245,8 @@ function deleteFile(dmsFk) {
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
|
:required="true"
|
||||||
|
:is-clearable="false"
|
||||||
:label="t('Currency')"
|
:label="t('Currency')"
|
||||||
v-model="data.currencyFk"
|
v-model="data.currencyFk"
|
||||||
:options="currencies"
|
:options="currencies"
|
||||||
|
@ -253,6 +256,8 @@ function deleteFile(dmsFk) {
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<VnSelect
|
<VnSelect
|
||||||
|
:required="true"
|
||||||
|
:is-clearable="false"
|
||||||
v-if="companiesRef"
|
v-if="companiesRef"
|
||||||
:label="t('Company')"
|
:label="t('Company')"
|
||||||
v-model="data.companyFk"
|
v-model="data.companyFk"
|
||||||
|
|
|
@ -32,7 +32,7 @@ const itemTypeWorkersOptions = ref([]);
|
||||||
<QItem class="q-my-md">
|
<QItem class="q-my-md">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('components.itemsFilterPanel.buyerFk')"
|
:label="t('params.buyerFk')"
|
||||||
v-model="params.buyerFk"
|
v-model="params.buyerFk"
|
||||||
:options="itemTypeWorkersOptions"
|
:options="itemTypeWorkersOptions"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
|
@ -51,7 +51,7 @@ const itemTypeWorkersOptions = ref([]);
|
||||||
url="Warehouses"
|
url="Warehouses"
|
||||||
auto-load
|
auto-load
|
||||||
:filter="{ fields: ['id', 'name'], order: 'name ASC', limit: 30 }"
|
:filter="{ fields: ['id', 'name'], order: 'name ASC', limit: 30 }"
|
||||||
:label="t('globals.warehouse')"
|
:label="t('params.warehouseFk')"
|
||||||
v-model="params.warehouseFk"
|
v-model="params.warehouseFk"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
|
@ -66,7 +66,7 @@ const itemTypeWorkersOptions = ref([]);
|
||||||
<QItem class="q-my-md">
|
<QItem class="q-my-md">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInputDate
|
<VnInputDate
|
||||||
:label="t('components.itemsFilterPanel.started')"
|
:label="t('params.started')"
|
||||||
v-model="params.started"
|
v-model="params.started"
|
||||||
is-outlined
|
is-outlined
|
||||||
@update:model-value="searchFn()"
|
@update:model-value="searchFn()"
|
||||||
|
@ -76,7 +76,7 @@ const itemTypeWorkersOptions = ref([]);
|
||||||
<QItem class="q-my-md">
|
<QItem class="q-my-md">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInputDate
|
<VnInputDate
|
||||||
:label="t('components.itemsFilterPanel.ended')"
|
:label="t('params.ended')"
|
||||||
v-model="params.ended"
|
v-model="params.ended"
|
||||||
is-outlined
|
is-outlined
|
||||||
@update:model-value="searchFn()"
|
@update:model-value="searchFn()"
|
||||||
|
@ -86,7 +86,7 @@ const itemTypeWorkersOptions = ref([]);
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<QCheckbox
|
<QCheckbox
|
||||||
:label="t('components.itemsFilterPanel.mine')"
|
:label="t('params.mine')"
|
||||||
v-model="params.mine"
|
v-model="params.mine"
|
||||||
toggle-indeterminate
|
toggle-indeterminate
|
||||||
@update:model-value="searchFn()"
|
@update:model-value="searchFn()"
|
||||||
|
@ -94,14 +94,14 @@ const itemTypeWorkersOptions = ref([]);
|
||||||
|
|
||||||
<QCheckbox
|
<QCheckbox
|
||||||
v-model="params.showBadDates"
|
v-model="params.showBadDates"
|
||||||
:label="t(`components.itemsFilterPanel.showBadDates`)"
|
:label="t(`params.showBadDates`)"
|
||||||
toggle-indeterminate
|
toggle-indeterminate
|
||||||
@update:model-value="searchFn()"
|
@update:model-value="searchFn()"
|
||||||
>
|
>
|
||||||
</QCheckbox>
|
</QCheckbox>
|
||||||
|
|
||||||
<QCheckbox
|
<QCheckbox
|
||||||
:label="t('components.itemsFilterPanel.hasMinPrice')"
|
:label="t('params.hasMinPrice')"
|
||||||
v-model="params.hasMinPrice"
|
v-model="params.hasMinPrice"
|
||||||
toggle-indeterminate
|
toggle-indeterminate
|
||||||
@update:model-value="searchFn()"
|
@update:model-value="searchFn()"
|
||||||
|
@ -111,3 +111,23 @@ const itemTypeWorkersOptions = ref([]);
|
||||||
</template>
|
</template>
|
||||||
</ItemsFilterPanel>
|
</ItemsFilterPanel>
|
||||||
</template>
|
</template>
|
||||||
|
<i18n>
|
||||||
|
en:
|
||||||
|
params:
|
||||||
|
buyerFk: Buyer
|
||||||
|
warehouseFk: Warehouse
|
||||||
|
started: Started
|
||||||
|
ended: Ended
|
||||||
|
mine: Mine
|
||||||
|
showBadDates: Show future items
|
||||||
|
hasMinPrice: Has Min Price
|
||||||
|
es:
|
||||||
|
params:
|
||||||
|
buyerFk: Comprador
|
||||||
|
warehouseFk: Almacén
|
||||||
|
started: Desde
|
||||||
|
ended: Hasta
|
||||||
|
mine: Para mi
|
||||||
|
showBadDates: Ver items a futuro
|
||||||
|
hasMinPrice: Precio mínimo
|
||||||
|
</i18n>
|
||||||
|
|
|
@ -281,6 +281,7 @@ en:
|
||||||
problems: With problems
|
problems: With problems
|
||||||
pending: Pending
|
pending: Pending
|
||||||
alertLevel: Grouped State
|
alertLevel: Grouped State
|
||||||
|
department: Department
|
||||||
FREE: Free
|
FREE: Free
|
||||||
DELIVERED: Delivered
|
DELIVERED: Delivered
|
||||||
ON_PREPARATION: On preparation
|
ON_PREPARATION: On preparation
|
||||||
|
@ -300,6 +301,7 @@ es:
|
||||||
problems: Con problemas
|
problems: Con problemas
|
||||||
pending: Pendiente
|
pending: Pendiente
|
||||||
alertLevel: Estado agrupado
|
alertLevel: Estado agrupado
|
||||||
|
department: Departamento
|
||||||
FREE: Libre
|
FREE: Libre
|
||||||
DELIVERED: Servido
|
DELIVERED: Servido
|
||||||
ON_PREPARATION: En preparación
|
ON_PREPARATION: En preparación
|
||||||
|
|
|
@ -71,9 +71,11 @@ onMounted(async () => (stateStore.rightDrawer = false));
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<QCard v-if="volumeSummary" class="order-volume-summary q-pa-lg">
|
<QCard v-if="volumeSummary" class="order-volume-summary q-pa-lg">
|
||||||
<VnLv :label="t('total')" :value="`${volumeSummary?.totalVolume} m³`" />
|
<VnLv
|
||||||
|
:label="`${t('total')}: `"
|
||||||
|
:value="`${volumeSummary?.totalVolume} m³`" />
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('boxes')"
|
:label="`${t('boxes')}: `"
|
||||||
:value="`${dashIfEmpty(volumeSummary?.totalBoxes)} U`"
|
:value="`${dashIfEmpty(volumeSummary?.totalBoxes)} U`"
|
||||||
/>
|
/>
|
||||||
</QCard>
|
</QCard>
|
||||||
|
@ -111,12 +113,12 @@ onMounted(async () => (stateStore.rightDrawer = false));
|
||||||
</VnTable>
|
</VnTable>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss" scoped>
|
||||||
.order-volume-summary {
|
.order-volume-summary {
|
||||||
.vn-label-value {
|
.vn-label-value {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
gap: 2%;
|
gap: 0.5%;
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
color: var(--vn-label-color);
|
color: var(--vn-label-color);
|
||||||
|
|
|
@ -13,7 +13,7 @@ export default defineConfig({
|
||||||
include: [
|
include: [
|
||||||
// Matches vitest tests in any subfolder of 'src' or into 'test/vitest/__tests__'
|
// Matches vitest tests in any subfolder of 'src' or into 'test/vitest/__tests__'
|
||||||
// Matches all files with extension 'js', 'jsx', 'ts' and 'tsx'
|
// Matches all files with extension 'js', 'jsx', 'ts' and 'tsx'
|
||||||
'test/vitest/__tests__/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
|
'src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
|
Loading…
Reference in New Issue