Compare commits
10 Commits
dev
...
7793_sortB
Author | SHA1 | Date |
---|---|---|
|
126cbd3151 | |
|
ea5ef91fcc | |
|
022ced3116 | |
|
fb340d1f27 | |
|
d7b0b8b356 | |
|
8f963ab78a | |
|
ad76d81908 | |
|
0e05e2c7f8 | |
|
2d55013a90 | |
|
3476b4807f |
|
@ -58,6 +58,19 @@ defineExpose({
|
||||||
<p>{{ subtitle }}</p>
|
<p>{{ subtitle }}</p>
|
||||||
<slot name="form-inputs" :data="data" :validate="validate" />
|
<slot name="form-inputs" :data="data" :validate="validate" />
|
||||||
<div class="q-mt-lg row justify-end">
|
<div class="q-mt-lg row justify-end">
|
||||||
|
<QBtn
|
||||||
|
v-if="showSaveAndContinueBtn"
|
||||||
|
:label="t('globals.isSaveAndContinue')"
|
||||||
|
:title="t('globals.isSaveAndContinue')"
|
||||||
|
type="submit"
|
||||||
|
color="primary"
|
||||||
|
class="q-ml-sm"
|
||||||
|
:disabled="isLoading"
|
||||||
|
:loading="isLoading"
|
||||||
|
data-cy="FormModelPopup_isSaveAndContinue"
|
||||||
|
z-max
|
||||||
|
@click="() => (isSaveAndContinue = true)"
|
||||||
|
/>
|
||||||
<QBtn
|
<QBtn
|
||||||
:label="t('globals.cancel')"
|
:label="t('globals.cancel')"
|
||||||
:title="t('globals.cancel')"
|
:title="t('globals.cancel')"
|
||||||
|
@ -77,7 +90,6 @@ defineExpose({
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
<QBtn
|
<QBtn
|
||||||
:flat="showSaveAndContinueBtn"
|
|
||||||
:label="t('globals.save')"
|
:label="t('globals.save')"
|
||||||
:title="t('globals.save')"
|
:title="t('globals.save')"
|
||||||
type="submit"
|
type="submit"
|
||||||
|
@ -89,19 +101,6 @@ defineExpose({
|
||||||
z-max
|
z-max
|
||||||
@click="() => (isSaveAndContinue = false)"
|
@click="() => (isSaveAndContinue = false)"
|
||||||
/>
|
/>
|
||||||
<QBtn
|
|
||||||
v-if="showSaveAndContinueBtn"
|
|
||||||
:label="t('globals.isSaveAndContinue')"
|
|
||||||
:title="t('globals.isSaveAndContinue')"
|
|
||||||
type="submit"
|
|
||||||
color="primary"
|
|
||||||
class="q-ml-sm"
|
|
||||||
:disabled="isLoading"
|
|
||||||
:loading="isLoading"
|
|
||||||
data-cy="FormModelPopup_isSaveAndContinue"
|
|
||||||
z-max
|
|
||||||
@click="() => (isSaveAndContinue = true)"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</FormModel>
|
</FormModel>
|
||||||
|
|
|
@ -340,9 +340,8 @@ const clickHandler = async (event) => {
|
||||||
|
|
||||||
const isDateElement = event.target.closest('.q-date');
|
const isDateElement = event.target.closest('.q-date');
|
||||||
const isTimeElement = event.target.closest('.q-time');
|
const isTimeElement = event.target.closest('.q-time');
|
||||||
const isQselectDropDown = event.target.closest('.q-select__dropdown-icon');
|
|
||||||
|
|
||||||
if (isDateElement || isTimeElement || isQselectDropDown) return;
|
if (isDateElement || isTimeElement) return;
|
||||||
|
|
||||||
if (clickedElement === null) {
|
if (clickedElement === null) {
|
||||||
destroyInput(editingRow.value, editingField.value);
|
destroyInput(editingRow.value, editingField.value);
|
||||||
|
@ -412,7 +411,7 @@ async function renderInput(rowId, field, clickedElement) {
|
||||||
focusOnMount: true,
|
focusOnMount: true,
|
||||||
eventHandlers: {
|
eventHandlers: {
|
||||||
'update:modelValue': async (value) => {
|
'update:modelValue': async (value) => {
|
||||||
if (isSelect && value) {
|
if (isSelect) {
|
||||||
row[column.name] = value[column.attrs?.optionValue ?? 'id'];
|
row[column.name] = value[column.attrs?.optionValue ?? 'id'];
|
||||||
row[column?.name + 'TextValue'] =
|
row[column?.name + 'TextValue'] =
|
||||||
value[column.attrs?.optionLabel ?? 'name'];
|
value[column.attrs?.optionLabel ?? 'name'];
|
||||||
|
@ -594,7 +593,6 @@ const checkbox = ref(null);
|
||||||
@row-click="(_, row) => rowClickFunction && rowClickFunction(row)"
|
@row-click="(_, row) => rowClickFunction && rowClickFunction(row)"
|
||||||
@update:selected="emit('update:selected', $event)"
|
@update:selected="emit('update:selected', $event)"
|
||||||
@selection="(details) => handleSelection(details, rows)"
|
@selection="(details) => handleSelection(details, rows)"
|
||||||
:hide-selected-banner="true"
|
|
||||||
>
|
>
|
||||||
<template #top-left v-if="!$props.withoutHeader">
|
<template #top-left v-if="!$props.withoutHeader">
|
||||||
<slot name="top-left"> </slot>
|
<slot name="top-left"> </slot>
|
||||||
|
@ -1044,7 +1042,7 @@ es:
|
||||||
|
|
||||||
.grid-three {
|
.grid-three {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(300px, max-content));
|
grid-template-columns: repeat(auto-fit, minmax(150px, max-content));
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
grid-gap: 20px;
|
grid-gap: 20px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
colors: {
|
colors: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '{"value": []}',
|
default: '{"value":[]}',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ const maxHeight = 30;
|
||||||
const colorHeight = maxHeight / colorArray?.length;
|
const colorHeight = maxHeight / colorArray?.length;
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div v-if="colors" class="color-div" :style="{ height: `${maxHeight}px` }">
|
<div class="color-div" :style="{ height: `${maxHeight}px` }">
|
||||||
<div
|
<div
|
||||||
v-for="(color, index) in colorArray"
|
v-for="(color, index) in colorArray"
|
||||||
:key="index"
|
:key="index"
|
||||||
|
|
|
@ -51,7 +51,7 @@ const url = computed(() => {
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="nickname"
|
option-label="nickname"
|
||||||
:fields="['id', 'name', 'nickname', 'code']"
|
:fields="['id', 'name', 'nickname', 'code']"
|
||||||
:filter-options="['id', 'name', 'nickname', 'code']"
|
:filter-options="['name','id', 'nickname', 'code']"
|
||||||
sort-by="nickname ASC"
|
sort-by="nickname ASC"
|
||||||
data-cy="vnWorkerSelect"
|
data-cy="vnWorkerSelect"
|
||||||
>
|
>
|
||||||
|
|
|
@ -29,6 +29,10 @@ const $props = defineProps({
|
||||||
type: String,
|
type: String,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
module: {
|
||||||
|
type: String,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
summary: {
|
summary: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: null,
|
default: null,
|
||||||
|
@ -144,9 +148,7 @@ const toModule = computed(() =>
|
||||||
{{ t('components.smartCard.openSummary') }}
|
{{ t('components.smartCard.openSummary') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QBtn>
|
</QBtn>
|
||||||
<RouterLink
|
<RouterLink :to="{ name: `${module}Summary`, params: { id: entity.id } }">
|
||||||
:to="{ name: `${dataKey}Summary`, params: { id: entity.id } }"
|
|
||||||
>
|
|
||||||
<QBtn
|
<QBtn
|
||||||
class="link"
|
class="link"
|
||||||
color="white"
|
color="white"
|
||||||
|
|
|
@ -156,7 +156,6 @@ globals:
|
||||||
changeState: Change state
|
changeState: Change state
|
||||||
raid: 'Raid {daysInForward} days'
|
raid: 'Raid {daysInForward} days'
|
||||||
isVies: Vies
|
isVies: Vies
|
||||||
noData: No data available
|
|
||||||
pageTitles:
|
pageTitles:
|
||||||
logIn: Login
|
logIn: Login
|
||||||
addressEdit: Update address
|
addressEdit: Update address
|
||||||
|
|
|
@ -160,7 +160,6 @@ globals:
|
||||||
changeState: Cambiar estado
|
changeState: Cambiar estado
|
||||||
raid: 'Redada {daysInForward} días'
|
raid: 'Redada {daysInForward} días'
|
||||||
isVies: Vies
|
isVies: Vies
|
||||||
noData: Datos no disponibles
|
|
||||||
pageTitles:
|
pageTitles:
|
||||||
logIn: Inicio de sesión
|
logIn: Inicio de sesión
|
||||||
addressEdit: Modificar consignatario
|
addressEdit: Modificar consignatario
|
||||||
|
|
|
@ -51,6 +51,7 @@ const removeAlias = () => {
|
||||||
<CardDescriptor
|
<CardDescriptor
|
||||||
ref="descriptor"
|
ref="descriptor"
|
||||||
:url="`MailAliases/${entityId}`"
|
:url="`MailAliases/${entityId}`"
|
||||||
|
module="Alias"
|
||||||
data-key="Alias"
|
data-key="Alias"
|
||||||
title="alias"
|
title="alias"
|
||||||
>
|
>
|
||||||
|
|
|
@ -24,6 +24,7 @@ onMounted(async () => {
|
||||||
ref="descriptor"
|
ref="descriptor"
|
||||||
:url="`VnUsers/preview`"
|
:url="`VnUsers/preview`"
|
||||||
:filter="{ ...filter, where: { id: entityId } }"
|
:filter="{ ...filter, where: { id: entityId } }"
|
||||||
|
module="Account"
|
||||||
data-key="Account"
|
data-key="Account"
|
||||||
title="nickname"
|
title="nickname"
|
||||||
>
|
>
|
||||||
|
|
|
@ -35,6 +35,7 @@ const removeRole = async () => {
|
||||||
<CardDescriptor
|
<CardDescriptor
|
||||||
url="VnRoles"
|
url="VnRoles"
|
||||||
:filter="{ where: { id: entityId } }"
|
:filter="{ where: { id: entityId } }"
|
||||||
|
module="Role"
|
||||||
data-key="Role"
|
data-key="Role"
|
||||||
:summary="$props.summary"
|
:summary="$props.summary"
|
||||||
>
|
>
|
||||||
|
|
|
@ -46,6 +46,7 @@ onMounted(async () => {
|
||||||
<CardDescriptor
|
<CardDescriptor
|
||||||
:url="`Claims/${entityId}`"
|
:url="`Claims/${entityId}`"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
|
module="Claim"
|
||||||
title="client.name"
|
title="client.name"
|
||||||
data-key="Claim"
|
data-key="Claim"
|
||||||
>
|
>
|
||||||
|
|
|
@ -55,6 +55,7 @@ const debtWarning = computed(() => {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<CardDescriptor
|
<CardDescriptor
|
||||||
|
module="Customer"
|
||||||
:url="`Clients/${entityId}/getCard`"
|
:url="`Clients/${entityId}/getCard`"
|
||||||
:summary="$props.summary"
|
:summary="$props.summary"
|
||||||
data-key="Customer"
|
data-key="Customer"
|
||||||
|
|
|
@ -156,10 +156,10 @@ const columns = [
|
||||||
{
|
{
|
||||||
align: 'center',
|
align: 'center',
|
||||||
labelAbbreviation: t('Sti.'),
|
labelAbbreviation: t('Sti.'),
|
||||||
label: t('Stickers'),
|
label: t('Printed Stickers/Stickers'),
|
||||||
toolTip: t('Printed Stickers/Stickers'),
|
toolTip: t('Printed Stickers/Stickers'),
|
||||||
name: 'stickers',
|
name: 'stickers',
|
||||||
component: 'input',
|
component: 'number',
|
||||||
create: true,
|
create: true,
|
||||||
attrs: {
|
attrs: {
|
||||||
positive: false,
|
positive: false,
|
||||||
|
@ -179,7 +179,7 @@ const columns = [
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'packagings',
|
url: 'packagings',
|
||||||
fields: ['id'],
|
fields: ['id', 'volume'],
|
||||||
optionLabel: 'id',
|
optionLabel: 'id',
|
||||||
},
|
},
|
||||||
create: true,
|
create: true,
|
||||||
|
@ -192,10 +192,10 @@ const columns = [
|
||||||
component: 'number',
|
component: 'number',
|
||||||
create: true,
|
create: true,
|
||||||
width: '35px',
|
width: '35px',
|
||||||
format: (row, dashIfEmpty) => parseFloat(row['weight']).toFixed(1),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
labelAbbreviation: 'P',
|
align: 'center',
|
||||||
|
labelAbbreviation: 'Pack',
|
||||||
label: 'Packing',
|
label: 'Packing',
|
||||||
toolTip: 'Packing',
|
toolTip: 'Packing',
|
||||||
name: 'packing',
|
name: 'packing',
|
||||||
|
@ -209,13 +209,14 @@ const columns = [
|
||||||
row['amount'] = row['quantity'] * row['buyingValue'];
|
row['amount'] = row['quantity'] * row['buyingValue'];
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
width: '20px',
|
width: '35px',
|
||||||
style: (row) => {
|
style: (row) => {
|
||||||
if (row.groupingMode === 'grouping')
|
if (row.groupingMode === 'grouping')
|
||||||
return { color: 'var(--vn-label-color)' };
|
return { color: 'var(--vn-label-color)' };
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
align: 'center',
|
||||||
labelAbbreviation: 'GM',
|
labelAbbreviation: 'GM',
|
||||||
label: t('Grouping selector'),
|
label: t('Grouping selector'),
|
||||||
toolTip: t('Grouping selector'),
|
toolTip: t('Grouping selector'),
|
||||||
|
@ -228,7 +229,7 @@ const columns = [
|
||||||
indeterminateValue: null,
|
indeterminateValue: null,
|
||||||
},
|
},
|
||||||
size: 'xs',
|
size: 'xs',
|
||||||
width: '25px',
|
width: '30px',
|
||||||
create: true,
|
create: true,
|
||||||
rightFilter: false,
|
rightFilter: false,
|
||||||
getIcon: (value) => {
|
getIcon: (value) => {
|
||||||
|
@ -244,12 +245,12 @@ const columns = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'center',
|
align: 'center',
|
||||||
labelAbbreviation: 'G',
|
labelAbbreviation: 'Group',
|
||||||
label: 'Grouping',
|
label: 'Grouping',
|
||||||
toolTip: 'Grouping',
|
toolTip: 'Grouping',
|
||||||
name: 'grouping',
|
name: 'grouping',
|
||||||
component: 'number',
|
component: 'number',
|
||||||
width: '20px',
|
width: '35px',
|
||||||
create: true,
|
create: true,
|
||||||
style: (row) => {
|
style: (row) => {
|
||||||
if (row.groupingMode === 'packing') return { color: 'var(--vn-label-color)' };
|
if (row.groupingMode === 'packing') return { color: 'var(--vn-label-color)' };
|
||||||
|
@ -289,7 +290,6 @@ const columns = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
width: '45px',
|
width: '45px',
|
||||||
format: (row) => parseFloat(row['buyingValue']).toFixed(3),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
@ -301,7 +301,6 @@ const columns = [
|
||||||
positive: false,
|
positive: false,
|
||||||
},
|
},
|
||||||
isEditable: false,
|
isEditable: false,
|
||||||
format: (row) => parseFloat(row['amount']).toFixed(2),
|
|
||||||
style: getAmountStyle,
|
style: getAmountStyle,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -313,7 +312,6 @@ const columns = [
|
||||||
component: 'number',
|
component: 'number',
|
||||||
width: '35px',
|
width: '35px',
|
||||||
create: true,
|
create: true,
|
||||||
format: (row) => parseFloat(row['price2']).toFixed(2),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
@ -327,7 +325,6 @@ const columns = [
|
||||||
},
|
},
|
||||||
width: '35px',
|
width: '35px',
|
||||||
create: true,
|
create: true,
|
||||||
format: (row) => parseFloat(row['price3']).toFixed(2),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
@ -347,7 +344,6 @@ const columns = [
|
||||||
style: (row) => {
|
style: (row) => {
|
||||||
if (!row?.hasMinPrice) return { color: 'var(--vn-label-color)' };
|
if (!row?.hasMinPrice) return { color: 'var(--vn-label-color)' };
|
||||||
},
|
},
|
||||||
format: (row) => parseFloat(row['minPrice']).toFixed(2),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
@ -522,7 +518,7 @@ onMounted(() => {
|
||||||
<Teleport to="#st-data" v-if="stateStore?.isSubToolbarShown() && editableMode">
|
<Teleport to="#st-data" v-if="stateStore?.isSubToolbarShown() && editableMode">
|
||||||
<QBtnGroup push style="column-gap: 1px">
|
<QBtnGroup push style="column-gap: 1px">
|
||||||
<QBtnDropdown
|
<QBtnDropdown
|
||||||
label="+/-"
|
icon="exposure_neg_1"
|
||||||
color="primary"
|
color="primary"
|
||||||
flat
|
flat
|
||||||
:title="t('Invert quantity value')"
|
:title="t('Invert quantity value')"
|
||||||
|
@ -537,7 +533,7 @@ onMounted(() => {
|
||||||
@click="invertQuantitySign(selectedRows, -1)"
|
@click="invertQuantitySign(selectedRows, -1)"
|
||||||
data-cy="set-negative-quantity"
|
data-cy="set-negative-quantity"
|
||||||
>
|
>
|
||||||
<span style="font-size: large">-</span>
|
<span style="font-size: medium">-1</span>
|
||||||
</QBtn>
|
</QBtn>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
@ -548,7 +544,7 @@ onMounted(() => {
|
||||||
@click="invertQuantitySign(selectedRows, 1)"
|
@click="invertQuantitySign(selectedRows, 1)"
|
||||||
data-cy="set-positive-quantity"
|
data-cy="set-positive-quantity"
|
||||||
>
|
>
|
||||||
<span style="font-size: large">+</span>
|
<span style="font-size: medium">1</span>
|
||||||
</QBtn>
|
</QBtn>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
@ -562,11 +558,11 @@ onMounted(() => {
|
||||||
:disable="!selectedRows.length"
|
:disable="!selectedRows.length"
|
||||||
data-cy="check-buy-amount"
|
data-cy="check-buy-amount"
|
||||||
>
|
>
|
||||||
|
<QTooltip>{{}}</QTooltip>
|
||||||
<QList>
|
<QList>
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<QBtn
|
<QBtn
|
||||||
size="sm"
|
|
||||||
icon="check"
|
icon="check"
|
||||||
flat
|
flat
|
||||||
@click="setIsChecked(selectedRows, true)"
|
@click="setIsChecked(selectedRows, true)"
|
||||||
|
@ -577,7 +573,6 @@ onMounted(() => {
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<QBtn
|
<QBtn
|
||||||
size="sm"
|
|
||||||
icon="close"
|
icon="close"
|
||||||
flat
|
flat
|
||||||
@click="setIsChecked(selectedRows, false)"
|
@click="setIsChecked(selectedRows, false)"
|
||||||
|
@ -667,7 +662,7 @@ onMounted(() => {
|
||||||
<FetchedTags :item="row" :columns="3" />
|
<FetchedTags :item="row" :columns="3" />
|
||||||
</template>
|
</template>
|
||||||
<template #column-stickers="{ row }">
|
<template #column-stickers="{ row }">
|
||||||
<span :class="editableMode ? 'editable-text' : ''">
|
<span class="editable-text">
|
||||||
<span style="color: var(--vn-label-color)">
|
<span style="color: var(--vn-label-color)">
|
||||||
{{ row.printedStickers }}
|
{{ row.printedStickers }}
|
||||||
</span>
|
</span>
|
||||||
|
@ -698,36 +693,20 @@ onMounted(() => {
|
||||||
</template>
|
</template>
|
||||||
<template #column-create-itemFk="{ data }">
|
<template #column-create-itemFk="{ data }">
|
||||||
<VnSelect
|
<VnSelect
|
||||||
url="Items/search"
|
url="Items"
|
||||||
v-model="data.itemFk"
|
v-model="data.itemFk"
|
||||||
:label="t('Article')"
|
:label="t('Article')"
|
||||||
:fields="['id', 'name', 'size', 'producerName']"
|
:fields="['id', 'name']"
|
||||||
:filter-options="['id', 'name', 'size', 'producerName']"
|
|
||||||
option-label="name"
|
option-label="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
@update:modelValue="
|
@update:modelValue="
|
||||||
async (value) => {
|
async (value) => {
|
||||||
await setBuyUltimate(value, data);
|
setBuyUltimate(value, data);
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
:required="true"
|
:required="true"
|
||||||
data-cy="itemFk-create-popup"
|
data-cy="itemFk-create-popup"
|
||||||
sort-by="nickname DESC"
|
/>
|
||||||
>
|
|
||||||
<template #option="scope">
|
|
||||||
<QItem v-bind="scope.itemProps">
|
|
||||||
<QItemSection>
|
|
||||||
<QItemLabel>
|
|
||||||
{{ scope.opt.name }}
|
|
||||||
</QItemLabel>
|
|
||||||
<QItemLabel caption>
|
|
||||||
#{{ scope.opt.id }}, {{ scope.opt?.size }},
|
|
||||||
{{ scope.opt?.producerName }}
|
|
||||||
</QItemLabel>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
</template>
|
|
||||||
</VnSelect>
|
|
||||||
</template>
|
</template>
|
||||||
<template #column-create-groupingMode="{ data }">
|
<template #column-create-groupingMode="{ data }">
|
||||||
<VnSelectEnum
|
<VnSelectEnum
|
||||||
|
@ -741,14 +720,9 @@ onMounted(() => {
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #previous-create-dialog="{ data }">
|
<template #previous-create-dialog="{ data }">
|
||||||
<div
|
<div style="position: absolute">
|
||||||
style="position: absolute"
|
|
||||||
:class="{ 'centered-container': !data.itemFk }"
|
|
||||||
>
|
|
||||||
<ItemDescriptor :id="data.itemFk" v-if="data.itemFk" />
|
<ItemDescriptor :id="data.itemFk" v-if="data.itemFk" />
|
||||||
<div v-else>
|
<SkeletonDescriptor v-if="!data.itemFk" :has-image="true" />
|
||||||
<span>{{ t('globals.noData') }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</VnTable>
|
</VnTable>
|
||||||
|
@ -770,7 +744,6 @@ es:
|
||||||
Com.: Ref.
|
Com.: Ref.
|
||||||
Comment: Referencia
|
Comment: Referencia
|
||||||
Minimum price: Precio mínimo
|
Minimum price: Precio mínimo
|
||||||
Stickers: Etiquetas
|
|
||||||
Printed Stickers/Stickers: Etiquetas impresas/Etiquetas
|
Printed Stickers/Stickers: Etiquetas impresas/Etiquetas
|
||||||
Cost: Cost.
|
Cost: Cost.
|
||||||
Buying value: Coste
|
Buying value: Coste
|
||||||
|
@ -788,12 +761,7 @@ es:
|
||||||
Check buy amount: Marcar como correcta la cantidad de compra
|
Check buy amount: Marcar como correcta la cantidad de compra
|
||||||
</i18n>
|
</i18n>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.centered-container {
|
.test {
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
|
||||||
position: absolute;
|
|
||||||
width: 40%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -147,6 +147,7 @@ async function deleteEntry() {
|
||||||
<template>
|
<template>
|
||||||
<CardDescriptor
|
<CardDescriptor
|
||||||
ref="entryDescriptorRef"
|
ref="entryDescriptorRef"
|
||||||
|
module="Entry"
|
||||||
:url="`Entries/${entityId}`"
|
:url="`Entries/${entityId}`"
|
||||||
:userFilter="entryFilter"
|
:userFilter="entryFilter"
|
||||||
title="supplier.nickname"
|
title="supplier.nickname"
|
||||||
|
|
|
@ -182,6 +182,14 @@ const columns = computed(() => [
|
||||||
name: 'entryTypeCode',
|
name: 'entryTypeCode',
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'dated',
|
||||||
|
label: t('entry.list.tableVisibleColumns.dated'),
|
||||||
|
component: 'date',
|
||||||
|
cardVisible: false,
|
||||||
|
visible: false,
|
||||||
|
create: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'companyFk',
|
name: 'companyFk',
|
||||||
label: t('entry.list.tableVisibleColumns.companyFk'),
|
label: t('entry.list.tableVisibleColumns.companyFk'),
|
||||||
|
@ -212,8 +220,7 @@ function getBadgeAttrs(row) {
|
||||||
|
|
||||||
let timeDiff = today - timeTicket;
|
let timeDiff = today - timeTicket;
|
||||||
|
|
||||||
if (timeDiff > 0) return { color: 'info', 'text-color': 'black' };
|
if (timeDiff > 0) return { color: 'warning', 'text-color': 'black' };
|
||||||
if (timeDiff < 0) return { color: 'warning', 'text-color': 'black' };
|
|
||||||
switch (row.entryTypeCode) {
|
switch (row.entryTypeCode) {
|
||||||
case 'regularization':
|
case 'regularization':
|
||||||
case 'life':
|
case 'life':
|
||||||
|
@ -238,6 +245,7 @@ function getBadgeAttrs(row) {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (timeDiff < 0) return { color: 'info', 'text-color': 'black' };
|
||||||
return { color: 'transparent' };
|
return { color: 'transparent' };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -90,6 +90,7 @@ async function setInvoiceCorrection(id) {
|
||||||
<template>
|
<template>
|
||||||
<CardDescriptor
|
<CardDescriptor
|
||||||
ref="cardDescriptorRef"
|
ref="cardDescriptorRef"
|
||||||
|
module="InvoiceIn"
|
||||||
data-key="InvoiceIn"
|
data-key="InvoiceIn"
|
||||||
:url="`InvoiceIns/${entityId}`"
|
:url="`InvoiceIns/${entityId}`"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
|
|
|
@ -36,6 +36,7 @@ function ticketFilter(invoice) {
|
||||||
<template>
|
<template>
|
||||||
<CardDescriptor
|
<CardDescriptor
|
||||||
ref="descriptor"
|
ref="descriptor"
|
||||||
|
module="InvoiceOut"
|
||||||
:url="`InvoiceOuts/${entityId}`"
|
:url="`InvoiceOuts/${entityId}`"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
title="ref"
|
title="ref"
|
||||||
|
|
|
@ -92,6 +92,7 @@ const updateStock = async () => {
|
||||||
<template>
|
<template>
|
||||||
<CardDescriptor
|
<CardDescriptor
|
||||||
data-key="Item"
|
data-key="Item"
|
||||||
|
module="Item"
|
||||||
:summary="$props.summary"
|
:summary="$props.summary"
|
||||||
:url="`Items/${entityId}/getCard`"
|
:url="`Items/${entityId}/getCard`"
|
||||||
@on-fetch="setData"
|
@on-fetch="setData"
|
||||||
|
|
|
@ -110,16 +110,10 @@ const columns = computed(() => [
|
||||||
attrs: { inWhere: true },
|
attrs: { inWhere: true },
|
||||||
align: 'left',
|
align: 'left',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: t('globals.visible'),
|
|
||||||
name: 'stock',
|
|
||||||
attrs: { inWhere: true },
|
|
||||||
align: 'left',
|
|
||||||
},
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const totalLabels = computed(() =>
|
const totalLabels = computed(() =>
|
||||||
rows.value.reduce((acc, row) => acc + row.stock / row.packing, 0).toFixed(2),
|
rows.value.reduce((acc, row) => acc + row.stock / row.packing, 0).toFixed(2)
|
||||||
);
|
);
|
||||||
|
|
||||||
const removeLines = async () => {
|
const removeLines = async () => {
|
||||||
|
@ -163,7 +157,7 @@ watchEffect(selectedRows);
|
||||||
openConfirmationModal(
|
openConfirmationModal(
|
||||||
t('shelvings.removeConfirmTitle'),
|
t('shelvings.removeConfirmTitle'),
|
||||||
t('shelvings.removeConfirmSubtitle'),
|
t('shelvings.removeConfirmSubtitle'),
|
||||||
removeLines,
|
removeLines
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
|
|
@ -26,6 +26,7 @@ const entityId = computed(() => {
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<CardDescriptor
|
<CardDescriptor
|
||||||
|
module="ItemType"
|
||||||
:url="`ItemTypes/${entityId}`"
|
:url="`ItemTypes/${entityId}`"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
title="code"
|
title="code"
|
||||||
|
|
|
@ -57,6 +57,7 @@ const total = ref(0);
|
||||||
ref="descriptor"
|
ref="descriptor"
|
||||||
:url="`Orders/${entityId}`"
|
:url="`Orders/${entityId}`"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
|
module="Order"
|
||||||
title="client.name"
|
title="client.name"
|
||||||
@on-fetch="setData"
|
@on-fetch="setData"
|
||||||
data-key="Order"
|
data-key="Order"
|
||||||
|
|
|
@ -22,6 +22,7 @@ const card = computed(() => store.data);
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<CardDescriptor
|
<CardDescriptor
|
||||||
|
module="Agency"
|
||||||
data-key="Agency"
|
data-key="Agency"
|
||||||
:url="`Agencies/${entityId}`"
|
:url="`Agencies/${entityId}`"
|
||||||
:title="card?.name"
|
:title="card?.name"
|
||||||
|
|
|
@ -23,6 +23,7 @@ const entityId = computed(() => {
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<CardDescriptor
|
<CardDescriptor
|
||||||
|
module="Route"
|
||||||
:url="`Routes/${entityId}`"
|
:url="`Routes/${entityId}`"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
:title="null"
|
:title="null"
|
||||||
|
|
|
@ -26,7 +26,12 @@ const entityId = computed(() => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<CardDescriptor :url="`Roadmaps/${entityId}`" :filter="filter" data-key="Roadmap">
|
<CardDescriptor
|
||||||
|
module="Roadmap"
|
||||||
|
:url="`Roadmaps/${entityId}`"
|
||||||
|
:filter="filter"
|
||||||
|
data-key="Roadmap"
|
||||||
|
>
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<VnLv :label="t('Roadmap')" :value="entity?.name" />
|
<VnLv :label="t('Roadmap')" :value="entity?.name" />
|
||||||
<VnLv :label="t('ETD')" :value="toDateHourMin(entity?.etd)" />
|
<VnLv :label="t('ETD')" :value="toDateHourMin(entity?.etd)" />
|
||||||
|
|
|
@ -9,6 +9,7 @@ const { notify } = useNotify();
|
||||||
<template>
|
<template>
|
||||||
<CardDescriptor
|
<CardDescriptor
|
||||||
:url="`Vehicles/${$route.params.id}`"
|
:url="`Vehicles/${$route.params.id}`"
|
||||||
|
module="Vehicle"
|
||||||
data-key="Vehicle"
|
data-key="Vehicle"
|
||||||
title="numberPlate"
|
title="numberPlate"
|
||||||
:to-module="{ name: 'VehicleList' }"
|
:to-module="{ name: 'VehicleList' }"
|
||||||
|
|
|
@ -25,6 +25,7 @@ const entityId = computed(() => {
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<CardDescriptor
|
<CardDescriptor
|
||||||
|
module="Shelving"
|
||||||
:url="`Shelvings/${entityId}`"
|
:url="`Shelvings/${entityId}`"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
title="code"
|
title="code"
|
||||||
|
|
|
@ -17,6 +17,7 @@ const entityId = computed(() => props.id || route.params.id);
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<CardDescriptor
|
<CardDescriptor
|
||||||
|
module="Parking"
|
||||||
data-key="Parking"
|
data-key="Parking"
|
||||||
:url="`Parkings/${entityId}`"
|
:url="`Parkings/${entityId}`"
|
||||||
title="code"
|
title="code"
|
||||||
|
|
|
@ -62,6 +62,7 @@ const getEntryQueryParams = (supplier) => {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<CardDescriptor
|
<CardDescriptor
|
||||||
|
module="Supplier"
|
||||||
:url="`Suppliers/${entityId}`"
|
:url="`Suppliers/${entityId}`"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
data-key="Supplier"
|
data-key="Supplier"
|
||||||
|
|
|
@ -44,6 +44,7 @@ function ticketFilter(ticket) {
|
||||||
@on-fetch="(data) => ([problems] = data)"
|
@on-fetch="(data) => ([problems] = data)"
|
||||||
/>
|
/>
|
||||||
<CardDescriptor
|
<CardDescriptor
|
||||||
|
module="Ticket"
|
||||||
:url="`Tickets/${entityId}`"
|
:url="`Tickets/${entityId}`"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
data-key="Ticket"
|
data-key="Ticket"
|
||||||
|
|
|
@ -34,7 +34,7 @@ const redirectToCreateView = ({ itemFk }) => {
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
name: 'date',
|
name: 'date',
|
||||||
align: 'center',
|
align: 'left',
|
||||||
label: t('negative.date'),
|
label: t('negative.date'),
|
||||||
format: ({ timed }) => toDate(timed),
|
format: ({ timed }) => toDate(timed),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
|
@ -47,7 +47,7 @@ const columns = computed(() => [
|
||||||
{
|
{
|
||||||
columnClass: 'shrink',
|
columnClass: 'shrink',
|
||||||
name: 'timed',
|
name: 'timed',
|
||||||
align: 'center',
|
align: 'left',
|
||||||
label: t('negative.timed'),
|
label: t('negative.timed'),
|
||||||
format: ({ timed }) => toHour(timed),
|
format: ({ timed }) => toHour(timed),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
|
@ -58,7 +58,7 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'itemFk',
|
name: 'itemFk',
|
||||||
align: 'center',
|
align: 'left',
|
||||||
label: t('negative.id'),
|
label: t('negative.id'),
|
||||||
format: ({ itemFk }) => itemFk,
|
format: ({ itemFk }) => itemFk,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
|
@ -70,7 +70,7 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'longName',
|
name: 'longName',
|
||||||
align: 'center',
|
align: 'left',
|
||||||
label: t('negative.longName'),
|
label: t('negative.longName'),
|
||||||
field: ({ longName }) => longName,
|
field: ({ longName }) => longName,
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'producer',
|
name: 'producer',
|
||||||
align: 'center',
|
align: 'left',
|
||||||
label: t('negative.supplier'),
|
label: t('negative.supplier'),
|
||||||
field: ({ producer }) => dashIfEmpty(producer),
|
field: ({ producer }) => dashIfEmpty(producer),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
|
@ -89,7 +89,7 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'inkFk',
|
name: 'inkFk',
|
||||||
align: 'center',
|
align: 'left',
|
||||||
label: t('negative.colour'),
|
label: t('negative.colour'),
|
||||||
field: ({ inkFk }) => inkFk,
|
field: ({ inkFk }) => inkFk,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
|
@ -97,7 +97,7 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'size',
|
name: 'size',
|
||||||
align: 'center',
|
align: 'left',
|
||||||
label: t('negative.size'),
|
label: t('negative.size'),
|
||||||
field: ({ size }) => size,
|
field: ({ size }) => size,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
|
@ -110,7 +110,7 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'category',
|
name: 'category',
|
||||||
align: 'center',
|
align: 'left',
|
||||||
label: t('negative.origen'),
|
label: t('negative.origen'),
|
||||||
field: ({ category }) => dashIfEmpty(category),
|
field: ({ category }) => dashIfEmpty(category),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
|
@ -118,7 +118,7 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'lack',
|
name: 'lack',
|
||||||
align: 'center',
|
align: 'left',
|
||||||
label: t('negative.lack'),
|
label: t('negative.lack'),
|
||||||
field: ({ lack }) => lack,
|
field: ({ lack }) => lack,
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
|
@ -127,12 +127,12 @@ const columns = computed(() => [
|
||||||
columnClass: 'shrink',
|
columnClass: 'shrink',
|
||||||
},
|
},
|
||||||
sortable: true,
|
sortable: true,
|
||||||
headerStyle: 'padding-center: 33px',
|
headerStyle: 'padding-left: 33px',
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'tableActions',
|
name: 'tableActions',
|
||||||
align: 'center',
|
align: 'left',
|
||||||
actions: [
|
actions: [
|
||||||
{
|
{
|
||||||
title: t('Open details'),
|
title: t('Open details'),
|
||||||
|
|
|
@ -52,26 +52,27 @@ const route = useRoute();
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
name: 'status',
|
name: 'status',
|
||||||
align: 'center',
|
align: 'left',
|
||||||
sortable: false,
|
sortable: false,
|
||||||
columnClass: 'shrink',
|
columnClass: 'expand',
|
||||||
columnFilter: false,
|
columnFilter: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'ticketFk',
|
name: 'ticketFk',
|
||||||
label: t('negative.detail.ticketFk'),
|
label: t('negative.detail.ticketFk'),
|
||||||
align: 'center',
|
align: 'left',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
component: 'input',
|
component: 'input',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
},
|
},
|
||||||
|
columnClass: 'shrink',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'shipped',
|
name: 'shipped',
|
||||||
label: t('negative.detail.shipped'),
|
label: t('negative.detail.shipped'),
|
||||||
field: 'shipped',
|
field: 'shipped',
|
||||||
align: 'center',
|
align: 'left',
|
||||||
format: ({ shipped }) => toDate(shipped),
|
format: ({ shipped }) => toDate(shipped),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
|
@ -83,9 +84,11 @@ const columns = computed(() => [
|
||||||
name: 'minTimed',
|
name: 'minTimed',
|
||||||
label: t('negative.detail.theoreticalhour'),
|
label: t('negative.detail.theoreticalhour'),
|
||||||
field: 'minTimed',
|
field: 'minTimed',
|
||||||
align: 'center',
|
align: 'left',
|
||||||
|
format: ({ minTimed }) => toHour(minTimed),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
component: 'time',
|
component: 'time',
|
||||||
|
columnClass: 'shrink',
|
||||||
columnFilter: {},
|
columnFilter: {},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -101,27 +104,29 @@ const columns = computed(() => [
|
||||||
optionValue: 'code',
|
optionValue: 'code',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
align: 'center',
|
columnClass: 'expand',
|
||||||
|
align: 'left',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'zoneName',
|
name: 'zoneName',
|
||||||
label: t('negative.detail.zoneName'),
|
label: t('negative.detail.zoneName'),
|
||||||
field: 'zoneName',
|
field: 'zoneName',
|
||||||
align: 'center',
|
align: 'left',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'nickname',
|
name: 'nickname',
|
||||||
label: t('negative.detail.nickname'),
|
label: t('negative.detail.nickname'),
|
||||||
field: 'nickname',
|
field: 'nickname',
|
||||||
align: 'center',
|
align: 'left',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'quantity',
|
name: 'quantity',
|
||||||
label: t('negative.detail.quantity'),
|
label: t('negative.detail.quantity'),
|
||||||
field: 'quantity',
|
field: 'quantity',
|
||||||
|
align: 'left',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
component: 'input',
|
component: 'input',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
|
@ -162,6 +167,7 @@ const saveChange = async (field, { row }) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const hasToIgnore = (row) => row.hasToIgnore === 1;
|
||||||
function onBuysFetched(data) {
|
function onBuysFetched(data) {
|
||||||
Object.assign(item.value, data[0]);
|
Object.assign(item.value, data[0]);
|
||||||
}
|
}
|
||||||
|
@ -238,7 +244,7 @@ function onBuysFetched(data) {
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #column-status="{ row }">
|
<template #column-status="{ row }">
|
||||||
<QTd style="min-width: 150px">
|
<QTd style="width: 150px">
|
||||||
<div class="icon-container">
|
<div class="icon-container">
|
||||||
<QIcon
|
<QIcon
|
||||||
v-if="row.isBasket"
|
v-if="row.isBasket"
|
||||||
|
|
|
@ -232,7 +232,7 @@ const columns = computed(() => [
|
||||||
|
|
||||||
function resetAgenciesSelector(formData) {
|
function resetAgenciesSelector(formData) {
|
||||||
agenciesOptions.value = [];
|
agenciesOptions.value = [];
|
||||||
if (formData) formData.agencyModeId = null;
|
if(formData) formData.agencyModeId = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function redirectToLines(id) {
|
function redirectToLines(id) {
|
||||||
|
@ -248,12 +248,14 @@ const onClientSelected = async (formData) => {
|
||||||
|
|
||||||
const fetchAvailableAgencies = async (formData) => {
|
const fetchAvailableAgencies = async (formData) => {
|
||||||
resetAgenciesSelector(formData);
|
resetAgenciesSelector(formData);
|
||||||
const response = await getAgencies(formData, selectedClient.value);
|
const response= await getAgencies(formData, selectedClient.value);
|
||||||
if (!response) return;
|
if (!response) return;
|
||||||
|
|
||||||
const { options, agency } = response;
|
const { options, agency } = response
|
||||||
if (options) agenciesOptions.value = options;
|
if(options)
|
||||||
if (agency) formData.agencyModeId = agency;
|
agenciesOptions.value = options;
|
||||||
|
if(agency)
|
||||||
|
formData.agencyModeId = agency;
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchClient = async (formData) => {
|
const fetchClient = async (formData) => {
|
||||||
|
@ -328,7 +330,7 @@ function openBalanceDialog(ticket) {
|
||||||
const description = ref([]);
|
const description = ref([]);
|
||||||
const firstTicketClientId = checkedTickets[0].clientFk;
|
const firstTicketClientId = checkedTickets[0].clientFk;
|
||||||
const isSameClient = checkedTickets.every(
|
const isSameClient = checkedTickets.every(
|
||||||
(ticket) => ticket.clientFk === firstTicketClientId,
|
(ticket) => ticket.clientFk === firstTicketClientId
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!isSameClient) {
|
if (!isSameClient) {
|
||||||
|
@ -367,7 +369,7 @@ async function onSubmit() {
|
||||||
description: dialogData.value.value.description,
|
description: dialogData.value.value.description,
|
||||||
clientFk: dialogData.value.value.clientFk,
|
clientFk: dialogData.value.value.clientFk,
|
||||||
email: email[0].email,
|
email: email[0].email,
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
if (data) notify('globals.dataSaved', 'positive');
|
if (data) notify('globals.dataSaved', 'positive');
|
||||||
|
@ -386,32 +388,32 @@ function setReference(data) {
|
||||||
switch (data) {
|
switch (data) {
|
||||||
case 1:
|
case 1:
|
||||||
newDescription = `${t(
|
newDescription = `${t(
|
||||||
'ticketList.creditCard',
|
'ticketList.creditCard'
|
||||||
)}, ${dialogData.value.value.description.replace(
|
)}, ${dialogData.value.value.description.replace(
|
||||||
/^(Credit Card, |Cash, |Transfers, )/,
|
/^(Credit Card, |Cash, |Transfers, )/,
|
||||||
'',
|
''
|
||||||
)}`;
|
)}`;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
newDescription = `${t(
|
newDescription = `${t(
|
||||||
'ticketList.cash',
|
'ticketList.cash'
|
||||||
)}, ${dialogData.value.value.description.replace(
|
)}, ${dialogData.value.value.description.replace(
|
||||||
/^(Credit Card, |Cash, |Transfers, )/,
|
/^(Credit Card, |Cash, |Transfers, )/,
|
||||||
'',
|
''
|
||||||
)}`;
|
)}`;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
newDescription = `${newDescription.replace(
|
newDescription = `${newDescription.replace(
|
||||||
/^(Credit Card, |Cash, |Transfers, )/,
|
/^(Credit Card, |Cash, |Transfers, )/,
|
||||||
'',
|
''
|
||||||
)}`;
|
)}`;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
newDescription = `${t(
|
newDescription = `${t(
|
||||||
'ticketList.transfers',
|
'ticketList.transfers'
|
||||||
)}, ${dialogData.value.value.description.replace(
|
)}, ${dialogData.value.value.description.replace(
|
||||||
/^(Credit Card, |Cash, |Transfers, )/,
|
/^(Credit Card, |Cash, |Transfers, )/,
|
||||||
'',
|
''
|
||||||
)}`;
|
)}`;
|
||||||
break;
|
break;
|
||||||
case 3317:
|
case 3317:
|
||||||
|
|
|
@ -32,6 +32,7 @@ const setData = (entity) => (data.value = useCardDescription(entity.ref, entity.
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<CardDescriptor
|
<CardDescriptor
|
||||||
|
module="Travel"
|
||||||
:url="`Travels/${entityId}`"
|
:url="`Travels/${entityId}`"
|
||||||
:title="data.title"
|
:title="data.title"
|
||||||
:subtitle="data.subtitle"
|
:subtitle="data.subtitle"
|
||||||
|
|
|
@ -50,6 +50,7 @@ const handlePhotoUpdated = (evt = false) => {
|
||||||
<template>
|
<template>
|
||||||
<CardDescriptor
|
<CardDescriptor
|
||||||
ref="cardDescriptorRef"
|
ref="cardDescriptorRef"
|
||||||
|
module="Worker"
|
||||||
:data-key="dataKey"
|
:data-key="dataKey"
|
||||||
url="Workers/summary"
|
url="Workers/summary"
|
||||||
:filter="{ where: { id: entityId } }"
|
:filter="{ where: { id: entityId } }"
|
||||||
|
|
|
@ -12,6 +12,11 @@ const $props = defineProps({
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<QPopupProxy>
|
<QPopupProxy>
|
||||||
<WorkerDescriptor v-if="$props.id" :id="$props.id" :summary="WorkerSummary" />
|
<WorkerDescriptor
|
||||||
|
v-if="$props.id"
|
||||||
|
:id="$props.id"
|
||||||
|
:summary="WorkerSummary"
|
||||||
|
data-key="workerDescriptorProxy"
|
||||||
|
/>
|
||||||
</QPopupProxy>
|
</QPopupProxy>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -42,6 +42,7 @@ const { openConfirmationModal } = useVnConfirm();
|
||||||
<template>
|
<template>
|
||||||
<CardDescriptor
|
<CardDescriptor
|
||||||
ref="DepartmentDescriptorRef"
|
ref="DepartmentDescriptorRef"
|
||||||
|
module="Department"
|
||||||
:url="`Departments/${entityId}`"
|
:url="`Departments/${entityId}`"
|
||||||
:summary="$props.summary"
|
:summary="$props.summary"
|
||||||
:to-module="{ name: 'WorkerDepartment' }"
|
:to-module="{ name: 'WorkerDepartment' }"
|
||||||
|
|
|
@ -25,7 +25,12 @@ const entityId = computed(() => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<CardDescriptor :url="`Zones/${entityId}`" :filter="filter" data-key="Zone">
|
<CardDescriptor
|
||||||
|
module="Zone"
|
||||||
|
:url="`Zones/${entityId}`"
|
||||||
|
:filter="filter"
|
||||||
|
data-key="Zone"
|
||||||
|
>
|
||||||
<template #menu="{ entity }">
|
<template #menu="{ entity }">
|
||||||
<ZoneDescriptorMenuItems :zone="entity" />
|
<ZoneDescriptorMenuItems :zone="entity" />
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -124,12 +124,12 @@ describe('Entry', () => {
|
||||||
|
|
||||||
clickAndType('stickers', '1');
|
clickAndType('stickers', '1');
|
||||||
checkText('quantity', '11');
|
checkText('quantity', '11');
|
||||||
checkText('amount', '550.00');
|
checkText('amount', '550');
|
||||||
clickAndType('packing', '2');
|
clickAndType('packing', '2');
|
||||||
checkText('packing', '12close');
|
checkText('packing', '12close');
|
||||||
checkText('weight', '12.0');
|
checkText('weight', '12');
|
||||||
checkText('quantity', '132');
|
checkText('quantity', '132');
|
||||||
checkText('amount', '6600.00');
|
checkText('amount', '6600');
|
||||||
checkColor('packing', COLORS.enabled);
|
checkColor('packing', COLORS.enabled);
|
||||||
|
|
||||||
selectCell('groupingMode').click().click().click();
|
selectCell('groupingMode').click().click().click();
|
||||||
|
@ -137,7 +137,7 @@ describe('Entry', () => {
|
||||||
checkColor('grouping', COLORS.enabled);
|
checkColor('grouping', COLORS.enabled);
|
||||||
|
|
||||||
selectCell('buyingValue').click().clear().type('{backspace}{backspace}1');
|
selectCell('buyingValue').click().clear().type('{backspace}{backspace}1');
|
||||||
checkText('amount', '132.00');
|
checkText('amount', '132');
|
||||||
checkColor('minPrice', COLORS.disable);
|
checkColor('minPrice', COLORS.disable);
|
||||||
|
|
||||||
selectCell('hasMinPrice').click().click();
|
selectCell('hasMinPrice').click().click();
|
|
@ -4,6 +4,9 @@ describe('Route', () => {
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit(`/#/route/extended-list`);
|
cy.visit(`/#/route/extended-list`);
|
||||||
});
|
});
|
||||||
|
const getVnSelect =
|
||||||
|
'> :nth-child(1) > .column > .q-field > .q-field__inner > .q-field__control > .q-field__control-container';
|
||||||
|
const getRowColumn = (row, column) => `:nth-child(${row}) > :nth-child(${column})`;
|
||||||
|
|
||||||
it('Route list create route', () => {
|
it('Route list create route', () => {
|
||||||
cy.addBtnClick();
|
cy.addBtnClick();
|
||||||
|
@ -13,25 +16,18 @@ describe('Route', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Route list search and edit', () => {
|
it('Route list search and edit', () => {
|
||||||
cy.get('#searchbar input').type('{enter}');
|
cy.get('#searchbar input').type('{enter}'); /*
|
||||||
cy.get('[data-col-field="description"][data-row-index="0"]')
|
cy.get('td[data-col-field="description"]').click(); */
|
||||||
.click()
|
cy.get('input[name="description"]').type('routeTestOne{enter}');
|
||||||
.type('routeTestOne{enter}');
|
/* cy.get('.q-table tr')
|
||||||
cy.get('.q-table tr')
|
|
||||||
.its('length')
|
.its('length')
|
||||||
.then((rowCount) => {
|
.then((rowCount) => {
|
||||||
expect(rowCount).to.be.greaterThan(0);
|
expect(rowCount).to.be.greaterThan(0);
|
||||||
});
|
});
|
||||||
cy.get('[data-col-field="workerFk"][data-row-index="0"]')
|
cy.get(getRowColumn(1, 3) + getVnSelect).type('{downArrow}{enter}');
|
||||||
.click()
|
cy.get(getRowColumn(1, 4) + getVnSelect).type('{downArrow}{enter}');
|
||||||
.type('{downArrow}{enter}');
|
cy.get(getRowColumn(1, 5) + getVnSelect).type('{downArrow}{enter}');
|
||||||
cy.get('[data-col-field="agencyModeFk"][data-row-index="0"]')
|
|
||||||
.click()
|
|
||||||
.type('{downArrow}{enter}');
|
|
||||||
cy.get('[data-col-field="vehicleFk"][data-row-index="0"]')
|
|
||||||
.click()
|
|
||||||
.type('{downArrow}{enter}');
|
|
||||||
cy.get('button[title="Save"]').click();
|
cy.get('button[title="Save"]').click();
|
||||||
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
cy.get('.q-notification__message').should('have.text', 'Data saved'); */
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue