feat: refs #7924 add custom inspection checkbox and localization support

This commit is contained in:
Javi Gallego 2024-12-19 10:25:45 +01:00
parent 9e686f6a25
commit 542acc2c0e
5 changed files with 33 additions and 4 deletions

View File

@ -1,7 +1,7 @@
<script setup> <script setup>
import axios from 'axios'; import axios from 'axios';
import { onMounted, onUnmounted, computed, ref, watch, nextTick } from 'vue'; import { onMounted, onUnmounted, computed, ref, watch, nextTick } from 'vue';
import { onBeforeRouteLeave, useRouter } from 'vue-router'; import { onBeforeRouteLeave, useRouter, useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { useQuasar } from 'quasar'; import { useQuasar } from 'quasar';
import { useState } from 'src/composables/useState'; import { useState } from 'src/composables/useState';
@ -12,7 +12,6 @@ import SkeletonForm from 'components/ui/SkeletonForm.vue';
import VnConfirm from './ui/VnConfirm.vue'; import VnConfirm from './ui/VnConfirm.vue';
import { tMobile } from 'src/composables/tMobile'; import { tMobile } from 'src/composables/tMobile';
import { useArrayData } from 'src/composables/useArrayData'; import { useArrayData } from 'src/composables/useArrayData';
import { useRoute } from 'vue-router';
const { push } = useRouter(); const { push } = useRouter();
const quasar = useQuasar(); const quasar = useQuasar();

View File

@ -203,6 +203,12 @@ const onIntrastatCreated = (response, formData) => {
v-model="data.hasKgPrice" v-model="data.hasKgPrice"
:label="t('item.basicData.hasKgPrice')" :label="t('item.basicData.hasKgPrice')"
/> />
<QCheckbox
v-model="data.isCustomInspectionRequired"
:label="t('item.basicData.isCustomInspectionRequired')"
/>
</VnRow>
<VnRow class="row q-gutter-md q-mb-md">
<div> <div>
<QCheckbox <QCheckbox
v-model="data.isFragile" v-model="data.isFragile"

View File

@ -158,6 +158,7 @@ item:
isFragileTooltip: Is shown at website, app that this item cannot travel (wreath, palms, ...) isFragileTooltip: Is shown at website, app that this item cannot travel (wreath, palms, ...)
isPhotoRequested: Do photo isPhotoRequested: Do photo
isPhotoRequestedTooltip: This item does need a photo isPhotoRequestedTooltip: This item does need a photo
isCustomInspectionRequired: Custom inspection
description: Description description: Description
fixedPrice: fixedPrice:
itemFk: Item ID itemFk: Item ID

View File

@ -160,6 +160,7 @@ item:
isFragileTooltip: Se muestra en la web, app que este artículo no puede viajar (coronas, palmas, ...) isFragileTooltip: Se muestra en la web, app que este artículo no puede viajar (coronas, palmas, ...)
isPhotoRequested: Hacer foto isPhotoRequested: Hacer foto
isPhotoRequestedTooltip: Este artículo necesita una foto isPhotoRequestedTooltip: Este artículo necesita una foto
isCustomInspectionRequired: Inspección aduanera
description: Descripción description: Descripción
fixedPrice: fixedPrice:
itemFk: ID Artículo itemFk: ID Artículo

View File

@ -11,9 +11,8 @@ import VnInput from 'src/components/common/VnInput.vue';
import EntryDescriptorProxy from '../Entry/Card/EntryDescriptorProxy.vue'; import EntryDescriptorProxy from '../Entry/Card/EntryDescriptorProxy.vue';
import { useStateStore } from 'stores/useStateStore'; import { useStateStore } from 'stores/useStateStore';
import { toCurrency } from 'src/filters';
import { useArrayData } from 'composables/useArrayData'; import { useArrayData } from 'composables/useArrayData';
import { toDate } from 'src/filters'; import { toDate, toCurrency } from 'src/filters';
import { usePrintService } from 'composables/usePrintService'; import { usePrintService } from 'composables/usePrintService';
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue'; import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
import axios from 'axios'; import axios from 'axios';
@ -128,6 +127,10 @@ const tableColumnComponents = {
component: 'span', component: 'span',
attrs: {}, attrs: {},
}, },
isCustomInspectionRequired: {
component: 'span',
attrs: {},
},
}; };
const columns = computed(() => [ const columns = computed(() => [
@ -262,6 +265,11 @@ const columns = computed(() => [
showValue: false, showValue: false,
sortable: true, sortable: true,
}, },
{
label: '',
name: 'isCustomInspectionRequired',
align: 'center',
},
]); ]);
async function getData() { async function getData() {
@ -625,6 +633,16 @@ const getColor = (percentage) => {
/> />
</QBtn> </QBtn>
</QTd> </QTd>
<QTd>
<QIcon
v-if="entry.isCustomInspectionRequired"
name="warning"
color="negative"
size="xs"
:title="t('requiresInspection')"
>
</QIcon>
</QTd>
</QTr> </QTr>
</template> </template>
</QTable> </QTable>
@ -704,6 +722,8 @@ en:
physicKg: Phy. KG physicKg: Phy. KG
shipped: W. shipped shipped: W. shipped
landed: W. landed landed: W. landed
requiresInspection: Requires inspection
BIP: Boder Inspection Point
es: es:
searchExtraCommunity: Buscar por envío extra comunitario searchExtraCommunity: Buscar por envío extra comunitario
@ -712,4 +732,6 @@ es:
shipped: F. envío shipped: F. envío
landed: F. llegada landed: F. llegada
Open as PDF: Abrir como PDF Open as PDF: Abrir como PDF
requiresInspection: Requiere inspección
BIP: Punto de Inspección Fronteriza
</i18n> </i18n>