diff --git a/src/pages/Zone/ZoneList.vue b/src/pages/Zone/ZoneList.vue
index 04b973d8d..9c7036b94 100644
--- a/src/pages/Zone/ZoneList.vue
+++ b/src/pages/Zone/ZoneList.vue
@@ -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
- />
-
-
- {{ t('list.create') }}
-
-
+ >
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Zone/ZoneUpcoming.vue b/src/pages/Zone/ZoneUpcoming.vue
index 76f464e02..be7b12534 100644
--- a/src/pages/Zone/ZoneUpcoming.vue
+++ b/src/pages/Zone/ZoneUpcoming.vue
@@ -63,13 +63,7 @@ onMounted(() => weekdayStore.initStore());
-
+
diff --git a/src/pages/Zone/locale/en.yml b/src/pages/Zone/locale/en.yml
index 3f4871982..49ad3448b 100644
--- a/src/pages/Zone/locale/en.yml
+++ b/src/pages/Zone/locale/en.yml
@@ -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
diff --git a/src/pages/Zone/locale/es.yml b/src/pages/Zone/locale/es.yml
index 29f036000..dd673ec8d 100644
--- a/src/pages/Zone/locale/es.yml
+++ b/src/pages/Zone/locale/es.yml
@@ -21,6 +21,12 @@ list:
searchInfo: Buscar zonas por identificador o nombre
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
+ isVolumetric: Volumétrico
+ createZone: Crear zona
create:
name: Nombre
warehouse: Almacén