diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js
index 7f3237050..878dc03b8 100644
--- a/src/i18n/en/index.js
+++ b/src/i18n/en/index.js
@@ -207,6 +207,18 @@ export default {
contactChannel: 'Contact channel',
},
},
+ entry: {
+ pageTitles: {
+ entries: 'Entries',
+ list: 'List',
+ createEntry: 'New entry',
+ summary: 'Summary',
+ create: 'Create',
+ },
+ list: {
+ newEntry: 'New entry',
+ },
+ },
ticket: {
pageTitles: {
tickets: 'Tickets',
diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js
index 60b813f3a..4d29947a7 100644
--- a/src/i18n/es/index.js
+++ b/src/i18n/es/index.js
@@ -206,6 +206,17 @@ export default {
contactChannel: 'Canal de contacto',
},
},
+ entry: {
+ pageTitles: {
+ entries: 'Entradas',
+ list: 'Listado',
+ summary: 'Resumen',
+ create: 'Crear',
+ },
+ list: {
+ newEntry: 'Nueva entrada',
+ },
+ },
ticket: {
pageTitles: {
tickets: 'Tickets',
diff --git a/src/pages/Entry/Card/EntryCard.vue b/src/pages/Entry/Card/EntryCard.vue
new file mode 100644
index 000000000..5aa50fc94
--- /dev/null
+++ b/src/pages/Entry/Card/EntryCard.vue
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Entry/EntryCreate.vue b/src/pages/Entry/EntryCreate.vue
new file mode 100644
index 000000000..30b54cb38
--- /dev/null
+++ b/src/pages/Entry/EntryCreate.vue
@@ -0,0 +1,135 @@
+
+
+
+ (suppliersOptions = data)"
+ auto-load
+ />
+ (travelsOptionsOptions = data)"
+ auto-load
+ />
+ (companiesOptions = data)"
+ auto-load
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.opt?.nickname }}
+
+ #{{ scope.opt?.id }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.opt?.agencyModeName }} -
+ {{ scope.opt?.warehouseInName }} ({{
+ toDate(scope.opt?.shipped)
+ }}) → {{ scope.opt?.warehouseOutName }} ({{
+ toDate(scope.opt?.landed)
+ }})
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ es:
+ Supplier *: Proveedor *
+ Travel *: EnvĂo *
+ Company *: Empresa *
+
diff --git a/src/pages/Entry/EntryList.vue b/src/pages/Entry/EntryList.vue
new file mode 100644
index 000000000..1baa9e019
--- /dev/null
+++ b/src/pages/Entry/EntryList.vue
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+ {{ t('entry.list.newEntry') }}
+
+
+
+
diff --git a/src/pages/Entry/EntryMain.vue b/src/pages/Entry/EntryMain.vue
new file mode 100644
index 000000000..66ce78f23
--- /dev/null
+++ b/src/pages/Entry/EntryMain.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Supplier/SupplierCreate.vue b/src/pages/Supplier/SupplierCreate.vue
index 3317225d5..d6cfaeb42 100644
--- a/src/pages/Supplier/SupplierCreate.vue
+++ b/src/pages/Supplier/SupplierCreate.vue
@@ -51,13 +51,3 @@ const newSupplierForm = reactive({
-
-
diff --git a/src/pages/Travel/Card/TravelSummary.vue b/src/pages/Travel/Card/TravelSummary.vue
index ad4659b11..c8a62ec00 100644
--- a/src/pages/Travel/Card/TravelSummary.vue
+++ b/src/pages/Travel/Card/TravelSummary.vue
@@ -2,15 +2,17 @@
import { onMounted, ref, computed, onUpdated } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { useI18n } from 'vue-i18n';
+
+import { QCheckbox, QIcon } from 'quasar';
import CardSummary from 'components/ui/CardSummary.vue';
import VnLv from 'src/components/ui/VnLv.vue';
-import { getUrl } from 'src/composables/getUrl';
-import { toDate } from 'src/filters';
-import travelService from 'src/services/travel.service';
-import { QCheckbox, QIcon } from 'quasar';
-import { toCurrency } from 'filters/index';
import VnRow from 'components/ui/VnRow.vue';
+import travelService from 'src/services/travel.service';
+import { toDate, toCurrency } from 'src/filters';
+import { getUrl } from 'src/composables/getUrl';
+import axios from 'axios';
+
onUpdated(() => summaryRef.value.fetch());
const route = useRoute();
@@ -40,9 +42,17 @@ const cloneTravel = () => {
redirectToCreateView(stringifiedTravelData);
};
+const cloneTravelWithEntries = () => {
+ try {
+ axios.post(`Travels/${$props.id}/cloneWithEntries`);
+ } catch (err) {
+ console.err('Error cloning travel with entries');
+ }
+};
+
const headerMenuOptions = [
{ name: t('travel.summary.cloneShipping'), action: cloneTravel },
- { name: t('travel.summary.CloneTravelAndEntries'), action: null },
+ { name: t('travel.summary.CloneTravelAndEntries'), action: cloneTravelWithEntries },
{ name: t('travel.summary.AddEntry'), action: null },
];
diff --git a/src/pages/Travel/TravelList.vue b/src/pages/Travel/TravelList.vue
index 56d529a7b..889f096aa 100644
--- a/src/pages/Travel/TravelList.vue
+++ b/src/pages/Travel/TravelList.vue
@@ -31,6 +31,10 @@ const redirectToCreateView = (queryParams) => {
router.push({ name: 'TravelCreate', query: { travelData: queryParams } });
};
+const redirectCreateEntryView = (travelData) => {
+ router.push({ name: 'EntryCreate', query: { travelFk: travelData.id } });
+};
+
const viewSummary = (id) => {
quasar.dialog({
component: TravelSummaryDialog,
@@ -103,7 +107,7 @@ onMounted(async () => {
/>
import('src/pages/Entry/EntryMain.vue'),
+ redirect: { name: 'EntryList' },
+ children: [
+ {
+ path: 'list',
+ name: 'EntryList',
+ meta: {
+ title: 'list',
+ icon: 'view_list',
+ },
+ component: () => import('src/pages/Entry/EntryList.vue'),
+ },
+ {
+ path: 'create',
+ name: 'EntryCreate',
+ meta: {
+ title: 'create',
+ },
+ component: () => import('src/pages/Entry/EntryCreate.vue'),
+ },
+ ],
+ },
+ // {
+ // name: 'EntryCard',
+ // path: ':id',
+ // component: () => import('src/pages/Entry/Card/EntryCard.vue'),
+ // redirect: { name: 'EntrySummary' },
+ // children: [
+ // {
+ // name: 'EntrySummary',
+ // path: 'summary',
+ // meta: {
+ // title: 'summary',
+ // icon: 'launch',
+ // },
+ // component: () =>
+ // import('src/pages/Entry/Card/EntrySummary.vue'),
+ // },
+ // ],
+ // },
+ ],
+};
diff --git a/src/router/modules/index.js b/src/router/modules/index.js
index 68d1d8146..cc5034959 100644
--- a/src/router/modules/index.js
+++ b/src/router/modules/index.js
@@ -11,6 +11,7 @@ import Supplier from './Supplier';
import Travel from './travel';
import Order from './order';
import Department from './department';
+import Entry from './entry';
export default [
Customer,
@@ -26,4 +27,5 @@ export default [
Order,
invoiceIn,
Department,
+ Entry,
];
diff --git a/src/router/routes.js b/src/router/routes.js
index 32f5aaef6..6a2fa6a97 100644
--- a/src/router/routes.js
+++ b/src/router/routes.js
@@ -11,6 +11,7 @@ import travel from './modules/travel';
import department from './modules/department';
import shelving from 'src/router/modules/shelving';
import order from 'src/router/modules/order';
+import entry from 'src/router/modules/entry';
const routes = [
{
@@ -63,6 +64,7 @@ const routes = [
supplier,
travel,
department,
+ entry,
{
path: '/:catchAll(.*)*',
name: 'NotFound',
diff --git a/src/stores/useNavigationStore.js b/src/stores/useNavigationStore.js
index 63dce6162..6964c9401 100644
--- a/src/stores/useNavigationStore.js
+++ b/src/stores/useNavigationStore.js
@@ -19,6 +19,7 @@ export const useNavigationStore = defineStore('navigationStore', () => {
'supplier',
'travel',
'invoiceIn',
+ 'entry',
];
const pinnedModules = ref([]);
const role = useRole();