#7354 end Zone migration #539

Merged
jon merged 58 commits from 7354_ZoneMigration_End into dev 2024-09-03 04:48:18 +00:00
4 changed files with 57 additions and 19 deletions
Showing only changes of commit 8913c6a31b - Show all commits

View File

@ -11,6 +11,9 @@ import useNotify from 'src/composables/useNotify.js';
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
import ZoneSummary from 'src/pages/Zone/Card/ZoneSummary.vue';
import VnTable from 'src/components/VnTable/VnTable.vue';
import VnSelect from 'src/components/common/VnSelect.vue';
import VnInput from 'src/components/common/VnInput.vue';
import VnInputTime from 'src/components/common/VnInputTime.vue';
const { t } = useI18n();
const router = useRouter();
@ -18,7 +21,9 @@ const { notify } = useNotify();
const { viewSummary } = useSummaryDialog();
const { openConfirmationModal } = useVnConfirm();
const tableRef = ref();
const tableFilter = ref({
const warehouseOptions = ref([]);
const tableFilter = {
include: [
{
relation: 'agencyMode',
@ -27,7 +32,7 @@ const tableFilter = ref({
},
},
],
});
};
const columns = computed(() => [
{
@ -44,21 +49,22 @@ const columns = computed(() => [
name: 'name',
label: t('list.name'),
isTitle: true,
create: true,
},
{
align: 'left',
name: 'agencyModeFk',
label: t('list.agency'),
cardVisible: true,
create: true,
component: 'select',
attrs: {
url: 'agencyModes',
fields: ['id', 'name'],
url: 'AgencyModes',
},
columnField: {
component: null,
},
format: (row) => row?.agencyMode?.name,
format: (row, dashIfEmpty) => dashIfEmpty(row?.agencyMode?.name),
},
{
align: 'left',
@ -112,16 +118,42 @@ const handleClone = (id) => {
ref="tableRef"
data-key="ZoneList"
url="Zones"
:filter="tableFilter"
:create="{
urlCreate: 'Zones',
title: t('list.createZone'),
onDataSaved: ({ id }) => tableRef.redirect(id),
formInitialData: {},
}"
:user-filter="tableFilter"
:columns="columns"
default-mode="table"
redirect="zone"
:use-model="true"
auto-load
/>
<QPageSticky position="bottom-right" :offset="[18, 18]" style="z-index: 2">
<QBtn :to="{ path: `/zone/create` }" fab icon="add" color="primary">
<QTooltip>{{ t('list.create') }}</QTooltip>
</QBtn>
</QPageSticky>
>
<template #more-create-dialog="{ data }">
<VnInput v-model="data.price" :label="t('list.price')" min="0" />
<VnInput v-model="data.bonus" :label="t('list.bonus')" min="0" />
<VnInput
v-model="data.travelingDays"
:label="t('list.travelingDays')"
type="number"
min="0"
/>
<VnInputTime v-model="data.hour" :label="t('list.hour')" />
<VnSelect
url="Warehouses"
v-model="data.warehouseFK"
option-value="id"
option-label="name"
:label="t('list.warehouse')"
:options="warehouseOptions"
/>
<QCheckbox
v-model="data.isVolumetric"
:label="t('list.isVolumetric')"
:toggle-indeterminate="false"
/>
</template>
</VnTable>
</template>

View File

@ -63,13 +63,7 @@ onMounted(() => weekdayStore.initStore());
<span class="header">
{{ getHeaderTitle(detail.shipped) }}
</span>
<QTable
flat
:columns="columns"
:rows="detail.lines"
class="full-width"
style="text-align: center"
/>
<QTable flat :columns="columns" :rows="detail.lines" class="full-width" />
</div>
</QCard>
</QPage>

View File

@ -21,6 +21,12 @@ list:
searchInfo: Search zone by id or name
confirmCloneTitle: All it's properties will be copied
confirmCloneSubtitle: Do you want to clone this zone?
travelingDays: Traveling days
warehouse: Warehouse
bonus: Bonus
hour: Close
isVolumetric: Volumetric
createZone: Create zone
create:
name: Name
warehouse: Warehouse

View File

@ -21,6 +21,12 @@ list:
searchInfo: Buscar zonas por identificador o nombre
jon marked this conversation as resolved
Review

El texto de la sección aparece como ubicaciones en vez de localizaciones

El texto de la sección aparece como ubicaciones en vez de localizaciones
confirmCloneTitle: Todas sus propiedades serán copiadas
confirmCloneSubtitle: ¿Seguro que quieres clonar esta zona?
travelingDays: Días de viaje
warehouse: Almacén
bonus: Bonus
hour: Cierre
jgallego marked this conversation as resolved
Review

hour es hora..si quieres que sea hora de cierre, cambia la clave sino puede ser muy confuso o colisionar en el futuro con otras claves

hour es hora..si quieres que sea hora de cierre, cambia la clave sino puede ser muy confuso o colisionar en el futuro con otras claves
isVolumetric: Volumétrico
createZone: Crear zona
create:
name: Nombre
warehouse: Almacén