diff --git a/src/components/ui/VnSearchbar.vue b/src/components/ui/VnSearchbar.vue
index 4e90245d6..4e284d8e4 100644
--- a/src/components/ui/VnSearchbar.vue
+++ b/src/components/ui/VnSearchbar.vue
@@ -63,6 +63,10 @@ const props = defineProps({
type: Function,
default: undefined,
},
+ searchRemoveParams: {
+ type: Boolean,
+ default: true,
+ },
});
const searchText = ref();
@@ -96,17 +100,25 @@ onMounted(() => {
});
async function search() {
- const staticParams = Object.entries(store.userParams);
- arrayData.reset(['skip', 'page']);
+ const staticParams = Object.keys(store.userParams ?? {}).length
+ ? store.userParams
+ : store.defaultParams;
+ arrayData.resetPagination();
const filter = {
params: {
- ...Object.fromEntries(staticParams),
search: searchText.value,
},
- ...{ filter: props.filter },
+ filter: props.filter,
};
+ if (!props.searchRemoveParams || !searchText.value) {
+ filter.params = {
+ ...staticParams,
+ search: searchText.value,
+ };
+ }
+
if (props.whereFilter) {
filter.filter = {
where: props.whereFilter(searchText.value),
diff --git a/src/composables/useArrayData.js b/src/composables/useArrayData.js
index 6e685ee20..1a91cc50b 100644
--- a/src/composables/useArrayData.js
+++ b/src/composables/useArrayData.js
@@ -25,11 +25,14 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
const searchUrl = store.searchUrl;
if (query[searchUrl]) {
const params = JSON.parse(query[searchUrl]);
- const filter = params?.filter && JSON.parse(params?.filter ?? '{}');
+ const filter =
+ params?.filter && typeof params?.filter == 'object'
+ ? params?.filter
+ : JSON.parse(params?.filter ?? '{}');
delete params.filter;
store.userParams = { ...store.userParams, ...params };
- store.userFilter = { ...filter, ...store.userFilter };
+ store.filter = { ...filter, ...store.userFilter };
if (filter?.order) store.order = filter.order;
}
});
@@ -61,6 +64,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
store[option] = userOptions.keepOpts?.includes(option)
? Object.assign(defaultOpts, store[option])
: defaultOpts;
+ if (option === 'userParams') store.defaultParams = store[option];
}
}
}
@@ -75,7 +79,6 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
const filter = {
limit: store.limit,
};
-
let userParams = { ...store.userParams };
Object.assign(filter, store.userFilter);
@@ -143,6 +146,10 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
if (arrayDataStore.get(key)) arrayDataStore.reset(key, opts);
}
+ function resetPagination() {
+ if (arrayDataStore.get(key)) arrayDataStore.resetPagination(key);
+ }
+
function cancelRequest() {
if (canceller) {
canceller.abort();
@@ -166,7 +173,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
userParams = sanitizerParams(userParams, store?.exprBuilder);
store.userParams = userParams;
- reset(['skip', 'filter.skip', 'page']);
+ resetPagination();
await fetch({});
return { filter, params };
@@ -193,7 +200,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
}
store.order = order;
- reset(['skip', 'filter.skip', 'page']);
+ resetPagination();
fetch({});
index++;
@@ -276,7 +283,6 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
const pushUrl = { path: to };
if (to.endsWith('/list') || to.endsWith('/'))
pushUrl.query = newUrl.query;
- else destroy();
return router.push(pushUrl);
}
}
@@ -328,5 +334,6 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
isLoading,
deleteOption,
reset,
+ resetPagination,
};
}
diff --git a/src/composables/useFilterParams.js b/src/composables/useFilterParams.js
new file mode 100644
index 000000000..2878e4b76
--- /dev/null
+++ b/src/composables/useFilterParams.js
@@ -0,0 +1,65 @@
+import { useArrayData } from 'src/composables/useArrayData';
+import { onBeforeMount, ref, watch } from 'vue';
+
+export function useFilterParams(key) {
+ if (!key) throw new Error('ArrayData: A key is required to use this composable');
+ const params = ref({});
+ const orders = ref({});
+ const arrayData = ref({});
+
+ onBeforeMount(() => {
+ arrayData.value = useArrayData(key);
+ });
+
+ watch(
+ () => arrayData.value.store?.currentFilter,
+ (val, oldValue) => (val || oldValue) && setUserParams(val),
+ { immediate: true, deep: true }
+ );
+
+ function parseOrder(urlOrders) {
+ const orderObject = {};
+ if (urlOrders) {
+ if (typeof urlOrders == 'string') urlOrders = [urlOrders];
+ for (const [index, orders] of urlOrders.entries()) {
+ const [name, direction] = orders.split(' ');
+ orderObject[name] = { direction, index: index + 1 };
+ }
+ }
+ orders.value = orderObject;
+ }
+
+ function setUserParams(watchedParams) {
+ if (!watchedParams || Object.keys(watchedParams).length == 0) return;
+
+ if (typeof watchedParams == 'string') watchedParams = JSON.parse(watchedParams);
+ if (typeof watchedParams?.filter == 'string')
+ watchedParams.filter = JSON.parse(watchedParams.filter);
+
+ watchedParams = { ...watchedParams, ...watchedParams.filter?.where };
+ parseOrder(watchedParams.filter?.order);
+
+ delete watchedParams.filter;
+ params.value = sanitizer(watchedParams);
+ }
+
+ function sanitizer(params) {
+ for (const [key, value] of Object.entries(params)) {
+ if (key === 'and' && Array.isArray(value)) {
+ value.forEach((item) => {
+ Object.assign(params, item);
+ });
+ delete params[key];
+ } else if (value && typeof value === 'object') {
+ const param = Object.values(value)[0];
+ if (typeof param == 'string') params[key] = param.replaceAll('%', '');
+ }
+ }
+ return params;
+ }
+
+ return {
+ params,
+ orders,
+ };
+}
diff --git a/src/pages/Account/AccountAcls.vue b/src/pages/Account/AccountAcls.vue
index d80f835ec..6d3571661 100644
--- a/src/pages/Account/AccountAcls.vue
+++ b/src/pages/Account/AccountAcls.vue
@@ -1,16 +1,15 @@
-
-
-
(roles = data)"
/>
-
+ prefix="acls"
+ :array-data-props="{
+ url: 'ACLs',
+ order: 'id DESC',
+ exprBuilder,
+ }"
+ >
+
+
+
+
diff --git a/src/pages/Account/AccountAliasList.vue b/src/pages/Account/AccountAliasList.vue
index c67283297..f6016fb6c 100644
--- a/src/pages/Account/AccountAliasList.vue
+++ b/src/pages/Account/AccountAliasList.vue
@@ -2,21 +2,12 @@
import { useI18n } from 'vue-i18n';
import { ref, computed } from 'vue';
import VnTable from 'components/VnTable/VnTable.vue';
-import VnSearchbar from 'components/ui/VnSearchbar.vue';
-import { useStateStore } from 'stores/useStateStore';
+import VnSection from 'src/components/common/VnSection.vue';
const tableRef = ref();
const { t } = useI18n();
-const stateStore = useStateStore();
+const dataKey = 'AccountAliasList';
-const exprBuilder = (param, value) => {
- switch (param) {
- case 'search':
- return /^\d+$/.test(value)
- ? { id: value }
- : { alias: { like: `%${value}%` } };
- }
-};
const columns = computed(() => [
{
align: 'left',
@@ -40,40 +31,45 @@ const columns = computed(() => [
create: true,
},
]);
+
+const exprBuilder = (param, value) => {
+ switch (param) {
+ case 'search':
+ return /^\d+$/.test(value)
+ ? { id: value }
+ : { alias: { like: `%${value}%` } };
+ }
+};
-
-
-
-
-
-
+ prefix="mailAlias"
+ :array-data-props="{ url: 'MailAliases', order: 'id DESC', exprBuilder }"
+ >
+
+
+
+
-
es:
Id: Id
diff --git a/src/pages/Account/AccountList.vue b/src/pages/Account/AccountList.vue
index 341dd92a2..c1c75fcee 100644
--- a/src/pages/Account/AccountList.vue
+++ b/src/pages/Account/AccountList.vue
@@ -1,19 +1,20 @@
-
-
-
-
-
-
- (roles = data)" auto-load />
+
-
-
-
-
+
+
+
+
+
+
+
+
-
+
diff --git a/src/pages/Account/Alias/Card/AliasCard.vue b/src/pages/Account/Alias/Card/AliasCard.vue
index 65951b3bf..3a814edc0 100644
--- a/src/pages/Account/Alias/Card/AliasCard.vue
+++ b/src/pages/Account/Alias/Card/AliasCard.vue
@@ -1,12 +1,12 @@
-
-import { useI18n } from 'vue-i18n';
-import VnCard from 'components/common/VnCard.vue';
+import VnCardBeta from 'components/common/VnCardBeta.vue';
import AccountDescriptor from './AccountDescriptor.vue';
-
-const { t } = useI18n();
-
+
diff --git a/src/pages/Account/Card/AccountDescriptor.vue b/src/pages/Account/Card/AccountDescriptor.vue
index 3156f8e1e..4e10e1366 100644
--- a/src/pages/Account/Card/AccountDescriptor.vue
+++ b/src/pages/Account/Card/AccountDescriptor.vue
@@ -41,7 +41,7 @@ const hasAccount = ref(false);
/>
$props.id || route.params.id);
-const { viewSummary } = useSummaryDialog();
const columns = computed(() => [
{
align: 'left',
@@ -81,30 +85,32 @@ const exprBuilder = (param, value) => {
-
-
+ prefix="role"
+ :array-data-props="{ url, exprBuilder, order: 'id ASC' }"
+ >
+
+
+
+
diff --git a/src/pages/Account/Role/Card/RoleCard.vue b/src/pages/Account/Role/Card/RoleCard.vue
index a2d5710f4..7664deca8 100644
--- a/src/pages/Account/Role/Card/RoleCard.vue
+++ b/src/pages/Account/Role/Card/RoleCard.vue
@@ -1,20 +1,7 @@
-
+
diff --git a/src/pages/Account/Role/Card/RoleDescriptor.vue b/src/pages/Account/Role/Card/RoleDescriptor.vue
index 693fcdf48..b4b4fe316 100644
--- a/src/pages/Account/Role/Card/RoleDescriptor.vue
+++ b/src/pages/Account/Role/Card/RoleDescriptor.vue
@@ -43,7 +43,7 @@ const removeRole = async () => {
:filter="filter"
module="Role"
@on-fetch="setData"
- data-key="accountData"
+ data-key="Role"
:title="data.title"
:subtitle="data.subtitle"
:summary="$props.summary"
diff --git a/src/pages/Account/Role/Card/RoleSummary.vue b/src/pages/Account/Role/Card/RoleSummary.vue
index fef85f919..f0daa77fb 100644
--- a/src/pages/Account/Role/Card/RoleSummary.vue
+++ b/src/pages/Account/Role/Card/RoleSummary.vue
@@ -27,10 +27,10 @@ const filter = {
(role = data)"
- data-key="RoleSummary"
+ data-key="Role"
>
{{ role.id }} - {{ role.name }}
diff --git a/src/pages/Account/locale/en.yml b/src/pages/Account/locale/en.yml
index f2f563923..88a6b11e9 100644
--- a/src/pages/Account/locale/en.yml
+++ b/src/pages/Account/locale/en.yml
@@ -66,7 +66,7 @@ account:
mailInputInfo: All emails will be forwarded to the specified address.
role:
newRole: New role
- searchRoles: Search role
+ search: Search role
searchInfo: Search role by id or name
description: Description
id: Id
diff --git a/src/pages/Claim/ClaimFilter.vue b/src/pages/Claim/ClaimFilter.vue
index f7e2ffbf6..c28e95cb8 100644
--- a/src/pages/Claim/ClaimFilter.vue
+++ b/src/pages/Claim/ClaimFilter.vue
@@ -30,7 +30,7 @@ defineExpose({ states });
{{ formatFn(tag.value) }}
-
+
+
@@ -153,6 +146,7 @@ en:
created: Created
myTeam: My team
itemFk: Item
+ zoneFk: Zone
es:
params:
search: Contiene
@@ -165,6 +159,7 @@ es:
created: Creada
myTeam: Mi equipo
itemFk: ArtÃculo
+ zoneFk: Zona
Client Name: Nombre del cliente
Salesperson: Comercial
Item: ArtÃculo
diff --git a/src/pages/Claim/ClaimList.vue b/src/pages/Claim/ClaimList.vue
index 5f61db5c0..bb97162d8 100644
--- a/src/pages/Claim/ClaimList.vue
+++ b/src/pages/Claim/ClaimList.vue
@@ -10,6 +10,7 @@ import ClaimSummary from './Card/ClaimSummary.vue';
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
import RightMenu from 'src/components/common/RightMenu.vue';
import VnTable from 'src/components/VnTable/VnTable.vue';
+import ZoneDescriptorProxy from '../Zone/Card/ZoneDescriptorProxy.vue';
const { t } = useI18n();
const { viewSummary } = useSummaryDialog();
@@ -95,7 +96,12 @@ const columns = computed(() => [
optionLabel: 'description',
},
},
- orderBy: 'priority',
+ orderBy: 'cs.priority',
+ },
+ {
+ align: 'left',
+ label: t('claim.zone'),
+ name: 'zoneFk',
},
{
align: 'right',
@@ -132,7 +138,7 @@ const STATE_COLOR = {
+
+
+ {{ row.zoneName }}
+
+
+
diff --git a/src/pages/Customer/Card/CustomerBasicData.vue b/src/pages/Customer/Card/CustomerBasicData.vue
index 768c66f32..e9a349e0b 100644
--- a/src/pages/Customer/Card/CustomerBasicData.vue
+++ b/src/pages/Customer/Card/CustomerBasicData.vue
@@ -16,14 +16,17 @@ const { t } = useI18n();
const businessTypes = ref([]);
const contactChannels = ref([]);
-const handleSalesModelValue = (val) => ({
- or: [
- { id: val },
- { name: val },
- { nickname: { like: '%' + val + '%' } },
- { code: { like: `${val}%` } },
- ],
-});
+const handleSalesModelValue = (val) => {
+ if (!val) val = '';
+ return {
+ or: [
+ { id: val },
+ { name: val },
+ { nickname: { like: '%' + val + '%' } },
+ { code: { like: `${val}%` } },
+ ],
+ };
+};
const exprBuilder = (param, value) => {
return {
diff --git a/src/pages/Customer/CustomerFilter.vue b/src/pages/Customer/CustomerFilter.vue
index 96f670542..c62ec7dbb 100644
--- a/src/pages/Customer/CustomerFilter.vue
+++ b/src/pages/Customer/CustomerFilter.vue
@@ -12,14 +12,17 @@ defineProps({
required: true,
},
});
-const handleSalesModelValue = (val) => ({
- or: [
- { id: val },
- { name: val },
- { nickname: { like: '%' + val + '%' } },
- { code: { like: `${val}%` } },
- ],
-});
+const handleSalesModelValue = (val) => {
+ if (!val) val = '';
+ return {
+ or: [
+ { id: val },
+ { name: val },
+ { nickname: { like: '%' + val + '%' } },
+ { code: { like: `${val}%` } },
+ ],
+ };
+};
const exprBuilder = (param, value) => {
return {
diff --git a/src/pages/Customer/components/CustomerSamplesCreate.vue b/src/pages/Customer/components/CustomerSamplesCreate.vue
index a75dfa1b2..665e136e4 100644
--- a/src/pages/Customer/components/CustomerSamplesCreate.vue
+++ b/src/pages/Customer/components/CustomerSamplesCreate.vue
@@ -107,7 +107,7 @@ const setParams = (params) => {
const getPreview = async () => {
const params = {
- recipientId: entityId,
+ recipientId: entityId.value,
};
const validationMessage = validateMessage();
if (validationMessage) return notify(t(validationMessage), 'negative');
diff --git a/src/pages/Order/Card/OrderCatalog.vue b/src/pages/Order/Card/OrderCatalog.vue
index 4ad009133..da2e88aa9 100644
--- a/src/pages/Order/Card/OrderCatalog.vue
+++ b/src/pages/Order/Card/OrderCatalog.vue
@@ -86,6 +86,7 @@ watch(
url="Orders/CatalogFilter"
:label="t('Search items')"
:info="t('You can search items by name or id')"
+ :search-remove-params="false"
/>
{
+ stateStore.rightDrawer = true;
await fetch();
});
@@ -148,7 +149,6 @@ async function getVideoList(expeditionId, timed) {
-
-import { useI18n } from 'vue-i18n';
-
-import VnCard from 'components/common/VnCard.vue';
+import VnCardBeta from 'components/common/VnCardBeta.vue';
import TicketDescriptor from './TicketDescriptor.vue';
-import TicketFilter from '../TicketFilter.vue';
-
-const { t } = useI18n();
-
+
diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue
index 786f5e012..5147af81f 100644
--- a/src/pages/Ticket/TicketList.vue
+++ b/src/pages/Ticket/TicketList.vue
@@ -8,13 +8,11 @@ import { useQuasar } from 'quasar';
import { toDate, toCurrency, dashIfEmpty } from 'src/filters/index';
import useNotify from 'src/composables/useNotify';
import TicketSummary from './Card/TicketSummary.vue';
-import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
import VnTable from 'src/components/VnTable/VnTable.vue';
import VnSelect from 'src/components/common/VnSelect.vue';
import VnInputDate from 'src/components/common/VnInputDate.vue';
import VnRow from 'src/components/ui/VnRow.vue';
-import RightMenu from 'src/components/common/RightMenu.vue';
import TicketFilter from './TicketFilter.vue';
import VnInput from 'src/components/common/VnInput.vue';
import FetchData from 'src/components/FetchData.vue';
@@ -23,6 +21,7 @@ import ZoneDescriptorProxy from 'src/pages/Zone/Card/ZoneDescriptorProxy.vue';
import { toTimeFormat } from 'src/filters/date';
import InvoiceOutDescriptorProxy from 'src/pages/InvoiceOut/Card/InvoiceOutDescriptorProxy.vue';
import TicketProblems from 'src/components/TicketProblems.vue';
+import VnSection from 'src/components/common/VnSection.vue';
const route = useRoute();
const router = useRouter();
@@ -66,6 +65,7 @@ const dialogData = ref();
const companiesOptions = ref([]);
const accountingOptions = ref([]);
const amountToReturn = ref();
+const dataKey = 'TicketList';
const columns = computed(() => [
{
@@ -455,223 +455,228 @@ function setReference(data) {
@on-fetch="(data) => (accountingOptions = data)"
auto-load
/>
-
-
-
+
+
-
-
-
-
-
-
-
- {{ dashIfEmpty(row.userName) }}
-
-
-
-
-
-
- {{ toDate(row.shippedDate) }}
-
-
-
-
-
- {{ row.nickname }}
-
-
-
-
-
- {{ row.addressNickname }}
-
-
-
-
-
-
- {{ row.refFk }}
-
-
-
-
-
- {{ row.state }}
-
-
-
- {{ row.state }}
-
-
-
-
- {{ dashIfEmpty(row.zoneName) }}
-
-
-
-
-
+
- {{ row.totalWithVat }}
-
-
-
-
- onClientSelected(data)"
- :sort-by="'id ASC'"
- >
-
-
-
-
- {{ scope.opt.name }}
-
-
- {{ `#${scope.opt.id}` }}
-
-
-
-
-
-
-
- fetchAvailableAgencies(data)"
- >
-
-
+
+
+
+
+ {{ dashIfEmpty(row.userName) }}
+
+
+
+
+
+
+ {{ toDate(row.shippedDate) }}
+
+
+
+
+
+ {{ row.nickname }}
+
+
+
+
+
+ {{ row.addressNickname }}
+
+
+
+
+
+
+ {{ row.refFk }}
+
+
+
+
+
+ {{ row.state }}
+
+
+
+ {{ row.state }}
+
+
+
+
+ {{ dashIfEmpty(row.zoneName) }}
+
+
+
+
+
+ {{ row.totalWithVat }}
+
+
+
+
+ onClientSelected(data)"
+ :sort-by="'id ASC'"
>
-
-
-
-
-
+
+
+
+ {{ scope.opt.name }}
+
+
+ {{ `#${scope.opt.id}` }}
+
+
+
+
+
+
+
+ fetchAvailableAgencies(data)"
+ >
+
+
- {{
- `${
- !scope.opt?.isActive
- ? t('basicData.inactive')
- : ''
- } `
- }}
-
- {{ scope.opt?.nickname }}:
- {{ scope.opt?.street }}, {{ scope.opt?.city }}
-
-
-
-
-
-
-
-
-
- fetchAvailableAgencies(data)"
- />
-
-
-
-
- fetchAvailableAgencies(data)"
- />
-
-
-
-
-
-
-
+
+
+
+
+
+ {{
+ `${
+ !scope.opt?.isActive
+ ? t('basicData.inactive')
+ : ''
+ } `
+ }}
+
+ {{ scope.opt?.nickname }}:
+ {{ scope.opt?.street }},
+ {{ scope.opt?.city }}
+
+
+
+
+
+
+
+
+
+ fetchAvailableAgencies(data)"
+ />
+
+
+
+
+ fetchAvailableAgencies(data)"
+ />
+
+
+
+
+
+
+
+
+
-
+
{
const resendEmail = async () => {
const params = {
- recipient: worker.value?.user?.email,
+ recipient: worker.value[0]?.user?.emailUser?.email,
week: selectedWeekNumber.value,
year: selectedDate.value.getFullYear(),
workerId: Number(route.params.id),
diff --git a/src/pages/Zone/Card/ZoneLocationsTree.vue b/src/pages/Zone/Card/ZoneLocationsTree.vue
index 650047e40..5c87faf99 100644
--- a/src/pages/Zone/Card/ZoneLocationsTree.vue
+++ b/src/pages/Zone/Card/ZoneLocationsTree.vue
@@ -163,7 +163,13 @@ onUnmounted(() => {
-
+
import('src/components/common/VnSectionMain.vue'),
- redirect: { name: 'AccountList' },
+ component: () => import('src/components/common/VnModule.vue'),
+ redirect: { name: 'AccountIndexMain' },
children: [
{
- path: 'list',
- name: 'AccountList',
- meta: {
- title: 'list',
- icon: 'view_list',
- },
+ path: '',
+ name: 'AccountIndexMain',
+ redirect: { name: 'AccountList' },
component: () => import('src/pages/Account/AccountList.vue'),
+ children: [
+ {
+ name: 'AccountList',
+ path: 'list',
+ meta: {
+ title: 'list',
+ icon: 'view_list',
+ },
+ },
+ accountCard,
+ ],
},
{
- path: 'role-list',
+ path: 'role',
name: 'AccountRoles',
+ redirect: { name: 'AccountRoleList' },
meta: {
title: 'roles',
icon: 'group',
},
component: () => import('src/pages/Account/Role/AccountRoles.vue'),
+ children: [
+ {
+ name: 'AccountRoleList',
+ path: 'list',
+ },
+ roleCard,
+ ],
},
{
- path: 'alias-list',
- name: 'AccountAliasList',
+ path: 'alias',
+ name: 'AccountAlias',
+ redirect: { name: 'AccountAliasList' },
meta: {
title: 'alias',
icon: 'email',
},
component: () => import('src/pages/Account/AccountAliasList.vue'),
+ children: [
+ {
+ name: 'AccountAliasList',
+ path: 'list',
+ },
+ aliasCard,
+ ],
},
{
path: 'acls',
@@ -120,81 +137,5 @@ export default {
},
],
},
- {
- name: 'AccountCard',
- path: ':id',
- component: () => import('src/pages/Account/Card/AccountCard.vue'),
- redirect: { name: 'AccountSummary' },
- children: [
- {
- name: 'AccountSummary',
- path: 'summary',
- meta: {
- title: 'summary',
- icon: 'launch',
- },
- component: () => import('src/pages/Account/Card/AccountSummary.vue'),
- },
- {
- name: 'AccountBasicData',
- path: 'basic-data',
- meta: {
- title: 'basicData',
- icon: 'vn:settings',
- },
- component: () =>
- import('src/pages/Account/Card/AccountBasicData.vue'),
- },
- {
- name: 'AccountInheritedRoles',
- path: 'inherited-roles',
- meta: {
- title: 'inheritedRoles',
- icon: 'group',
- },
- component: () =>
- import('src/pages/Account/Card/AccountInheritedRoles.vue'),
- },
- {
- name: 'AccountMailForwarding',
- path: 'mail-forwarding',
- meta: {
- title: 'mailForwarding',
- icon: 'forward',
- },
- component: () =>
- import('src/pages/Account/Card/AccountMailForwarding.vue'),
- },
- {
- name: 'AccountMailAlias',
- path: 'mail-alias',
- meta: {
- title: 'mailAlias',
- icon: 'email',
- },
- component: () =>
- import('src/pages/Account/Card/AccountMailAlias.vue'),
- },
- {
- name: 'AccountPrivileges',
- path: 'privileges',
- meta: {
- title: 'privileges',
- icon: 'badge',
- },
- component: () =>
- import('src/pages/Account/Card/AccountPrivileges.vue'),
- },
- {
- name: 'AccountLog',
- path: 'log',
- meta: {
- title: 'log',
- icon: 'history',
- },
- component: () => import('src/pages/Account/Card/AccountLog.vue'),
- },
- ],
- },
],
};
diff --git a/src/router/modules/account/accountCard.js b/src/router/modules/account/accountCard.js
new file mode 100644
index 000000000..3ba687adf
--- /dev/null
+++ b/src/router/modules/account/accountCard.js
@@ -0,0 +1,81 @@
+export default {
+ name: 'AccountCard',
+ path: ':id',
+ redirect: { name: 'AccountSummary' },
+ component: () => import('src/pages/Account/Card/AccountCard.vue'),
+ meta: {
+ menu: [
+ 'AccountBasicData',
+ 'AccountInheritedRoles',
+ 'AccountMailForwarding',
+ 'AccountMailAlias',
+ 'AccountPrivileges',
+ 'AccountLog',
+ ],
+ },
+ children: [
+ {
+ name: 'AccountSummary',
+ path: 'summary',
+ meta: {
+ title: 'summary',
+ icon: 'launch',
+ },
+ component: () => import('src/pages/Account/Card/AccountSummary.vue'),
+ },
+ {
+ name: 'AccountBasicData',
+ path: 'basic-data',
+ meta: {
+ title: 'basicData',
+ icon: 'vn:settings',
+ },
+ component: () => import('src/pages/Account/Card/AccountBasicData.vue'),
+ },
+ {
+ name: 'AccountInheritedRoles',
+ path: 'inherited-roles',
+ meta: {
+ title: 'inheritedRoles',
+ icon: 'group',
+ },
+ component: () => import('src/pages/Account/Card/AccountInheritedRoles.vue'),
+ },
+ {
+ name: 'AccountMailForwarding',
+ path: 'mail-forwarding',
+ meta: {
+ title: 'mailForwarding',
+ icon: 'forward',
+ },
+ component: () => import('src/pages/Account/Card/AccountMailForwarding.vue'),
+ },
+ {
+ name: 'AccountMailAlias',
+ path: 'mail-alias',
+ meta: {
+ title: 'mailAlias',
+ icon: 'email',
+ },
+ component: () => import('src/pages/Account/Card/AccountMailAlias.vue'),
+ },
+ {
+ name: 'AccountPrivileges',
+ path: 'privileges',
+ meta: {
+ title: 'privileges',
+ icon: 'badge',
+ },
+ component: () => import('src/pages/Account/Card/AccountPrivileges.vue'),
+ },
+ {
+ name: 'AccountLog',
+ path: 'log',
+ meta: {
+ title: 'log',
+ icon: 'history',
+ },
+ component: () => import('src/pages/Account/Card/AccountLog.vue'),
+ },
+ ],
+};
diff --git a/src/router/modules/account/aliasCard.js b/src/router/modules/account/aliasCard.js
new file mode 100644
index 000000000..cbbd31e51
--- /dev/null
+++ b/src/router/modules/account/aliasCard.js
@@ -0,0 +1,36 @@
+export default {
+ name: 'AliasCard',
+ path: ':id',
+ component: () => import('src/pages/Account/Alias/Card/AliasCard.vue'),
+ redirect: { name: 'AliasSummary' },
+ meta: { menu: ['AliasBasicData', 'AliasUsers'] },
+ children: [
+ {
+ name: 'AliasSummary',
+ path: 'summary',
+ meta: {
+ title: 'summary',
+ icon: 'launch',
+ },
+ component: () => import('src/pages/Account/Alias/Card/AliasSummary.vue'),
+ },
+ {
+ name: 'AliasBasicData',
+ path: 'basic-data',
+ meta: {
+ title: 'basicData',
+ icon: 'vn:settings',
+ },
+ component: () => import('src/pages/Account/Alias/Card/AliasBasicData.vue'),
+ },
+ {
+ name: 'AliasUsers',
+ path: 'users',
+ meta: {
+ title: 'aliasUsers',
+ icon: 'group',
+ },
+ component: () => import('src/pages/Account/Alias/Card/AliasUsers.vue'),
+ },
+ ],
+};
diff --git a/src/router/modules/account/roleCard.js b/src/router/modules/account/roleCard.js
new file mode 100644
index 000000000..c36ce71b9
--- /dev/null
+++ b/src/router/modules/account/roleCard.js
@@ -0,0 +1,57 @@
+export default {
+ name: 'RoleCard',
+ path: ':id',
+ component: () => import('src/pages/Account/Role/Card/RoleCard.vue'),
+ redirect: { name: 'RoleSummary' },
+ meta: {
+ menu: ['RoleBasicData', 'SubRoles', 'InheritedRoles', 'RoleLog'],
+ },
+ children: [
+ {
+ name: 'RoleSummary',
+ path: 'summary',
+ meta: {
+ title: 'summary',
+ icon: 'launch',
+ },
+ component: () => import('src/pages/Account/Role/Card/RoleSummary.vue'),
+ },
+ {
+ name: 'RoleBasicData',
+ path: 'basic-data',
+ meta: {
+ title: 'basicData',
+ icon: 'vn:settings',
+ },
+ component: () => import('src/pages/Account/Role/Card/RoleBasicData.vue'),
+ },
+ {
+ name: 'SubRoles',
+ path: 'sub-roles',
+ meta: {
+ title: 'subRoles',
+ icon: 'group',
+ },
+ component: () => import('src/pages/Account/Role/Card/SubRoles.vue'),
+ },
+
+ {
+ name: 'InheritedRoles',
+ path: 'inherited-roles',
+ meta: {
+ title: 'inheritedRoles',
+ icon: 'account_tree',
+ },
+ component: () => import('src/pages/Account/Role/Card/InheritedRoles.vue'),
+ },
+ {
+ name: 'RoleLog',
+ path: 'log',
+ meta: {
+ title: 'log',
+ icon: 'history',
+ },
+ component: () => import('src/pages/Account/Role/Card/RoleLog.vue'),
+ },
+ ],
+};
diff --git a/src/router/modules/claim.js b/src/router/modules/claim.js
index b58a58e8d..8b0a70896 100644
--- a/src/router/modules/claim.js
+++ b/src/router/modules/claim.js
@@ -27,7 +27,7 @@ export default {
{
name: 'ClaimMain',
path: '',
- component: () => import('src/components/common/VnSectionMain.vue'),
+ component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'ClaimList' },
children: [
{
diff --git a/src/router/modules/customer.js b/src/router/modules/customer.js
index 1b707f1a2..9e7f6fe70 100644
--- a/src/router/modules/customer.js
+++ b/src/router/modules/customer.js
@@ -39,7 +39,7 @@ export default {
{
path: '',
name: 'CustomerMain',
- component: () => import('src/components/common/VnSectionMain.vue'),
+ component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'CustomerList' },
children: [
{
diff --git a/src/router/modules/entry.js b/src/router/modules/entry.js
index 3add239df..26ce773c5 100644
--- a/src/router/modules/entry.js
+++ b/src/router/modules/entry.js
@@ -25,7 +25,7 @@ export default {
{
path: '',
name: 'EntryMain',
- component: () => import('src/components/common/VnSectionMain.vue'),
+ component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'EntryList' },
children: [
{
diff --git a/src/router/modules/index.js b/src/router/modules/index.js
index bf7e46b00..f28fed1c2 100644
--- a/src/router/modules/index.js
+++ b/src/router/modules/index.js
@@ -8,7 +8,7 @@ import Worker from './worker';
import Shelving from './shelving';
import Wagon from './wagon';
import Route from './route';
-import Supplier from './Supplier';
+import Supplier from './supplier';
import Travel from './travel';
import Order from './order';
import Department from './department';
@@ -20,8 +20,6 @@ import ItemType from './itemType';
import Zone from './zone';
import Account from './account';
import Monitor from './monitor';
-import MailAlias from './mailAlias';
-import Role from './role';
export default [
Item,
@@ -45,7 +43,5 @@ export default [
ItemType,
Zone,
Account,
- MailAlias,
Monitor,
- Role,
];
diff --git a/src/router/modules/invoiceIn.js b/src/router/modules/invoiceIn.js
index 168d64f37..788b27d37 100644
--- a/src/router/modules/invoiceIn.js
+++ b/src/router/modules/invoiceIn.js
@@ -25,7 +25,7 @@ export default {
{
path: '',
name: 'InvoiceInMain',
- component: () => import('src/components/common/VnSectionMain.vue'),
+ component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'InvoiceInList' },
children: [
{
diff --git a/src/router/modules/invoiceOut.js b/src/router/modules/invoiceOut.js
index 5e83b0859..53d27d0e8 100644
--- a/src/router/modules/invoiceOut.js
+++ b/src/router/modules/invoiceOut.js
@@ -18,7 +18,7 @@ export default {
{
path: '',
name: 'InvoiceOutMain',
- component: () => import('src/components/common/VnSectionMain.vue'),
+ component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'InvoiceOutList' },
children: [
{
diff --git a/src/router/modules/item.js b/src/router/modules/item.js
index 0f810434c..e2afd6c7b 100644
--- a/src/router/modules/item.js
+++ b/src/router/modules/item.js
@@ -36,7 +36,7 @@ export default {
{
path: '',
name: 'ItemMain',
- component: () => import('src/components/common/VnSectionMain.vue'),
+ component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'ItemList' },
children: [
{
diff --git a/src/router/modules/mailAlias.js b/src/router/modules/mailAlias.js
deleted file mode 100644
index 8e0f8abdc..000000000
--- a/src/router/modules/mailAlias.js
+++ /dev/null
@@ -1,57 +0,0 @@
-import { RouterView } from 'vue-router';
-
-export default {
- path: 'account/alias',
- name: 'Alias',
- meta: {
- title: 'alias',
- icon: 'email',
- moduleName: 'Alias',
- },
- component: RouterView,
- redirect: { name: 'AccountAliasList' },
- menus: {
- main: [],
- card: ['AliasBasicData', 'AliasUsers'],
- },
- children: [
- {
- name: 'AliasCard',
- path: ':id',
- component: () => import('src/pages/Account/Alias/Card/AliasCard.vue'),
- redirect: { name: 'AliasSummary' },
- children: [
- {
- name: 'AliasSummary',
- path: 'summary',
- meta: {
- title: 'summary',
- icon: 'launch',
- },
- component: () =>
- import('src/pages/Account/Alias/Card/AliasSummary.vue'),
- },
- {
- name: 'AliasBasicData',
- path: 'basic-data',
- meta: {
- title: 'basicData',
- icon: 'vn:settings',
- },
- component: () =>
- import('src/pages/Account/Alias/Card/AliasBasicData.vue'),
- },
- {
- name: 'AliasUsers',
- path: 'users',
- meta: {
- title: 'aliasUsers',
- icon: 'group',
- },
- component: () =>
- import('src/pages/Account/Alias/Card/AliasUsers.vue'),
- },
- ],
- },
- ],
-};
diff --git a/src/router/modules/monitor.js b/src/router/modules/monitor.js
index 2af60c09c..89ba4078f 100644
--- a/src/router/modules/monitor.js
+++ b/src/router/modules/monitor.js
@@ -19,7 +19,7 @@ export default {
{
path: '',
name: 'MonitorMain',
- component: () => import('src/components/common/VnSectionMain.vue'),
+ component: () => import('src/components/common/VnModule.vue'),
props: (route) => ({ leftDrawer: route.name === 'MonitorClientsActions' }),
redirect: { name: 'MonitorTickets' },
children: [
diff --git a/src/router/modules/order.js b/src/router/modules/order.js
index bfa37fce5..77af812cf 100644
--- a/src/router/modules/order.js
+++ b/src/router/modules/order.js
@@ -19,7 +19,7 @@ export default {
{
path: '',
name: 'OrderMain',
- component: () => import('src/components/common/VnSectionMain.vue'),
+ component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'OrderList' },
children: [
{
diff --git a/src/router/modules/role.js b/src/router/modules/role.js
deleted file mode 100644
index 47cd10b18..000000000
--- a/src/router/modules/role.js
+++ /dev/null
@@ -1,76 +0,0 @@
-import { RouterView } from 'vue-router';
-
-export default {
- path: 'account/role',
- name: 'Role',
- meta: {
- title: 'role',
- icon: 'vn:greuge',
- moduleName: 'Role',
- },
- component: RouterView,
- redirect: { name: 'AccountRoles' },
- menus: {
- main: [],
- card: ['RoleBasicData', 'SubRoles', 'InheritedRoles', 'RoleLog'],
- },
- children: [
- {
- name: 'RoleCard',
- path: ':id',
- component: () => import('src/pages/Account/Role/Card/RoleCard.vue'),
- redirect: { name: 'RoleSummary' },
- children: [
- {
- name: 'RoleSummary',
- path: 'summary',
- meta: {
- title: 'summary',
- icon: 'launch',
- },
- component: () =>
- import('src/pages/Account/Role/Card/RoleSummary.vue'),
- },
- {
- name: 'RoleBasicData',
- path: 'basic-data',
- meta: {
- title: 'basicData',
- icon: 'vn:settings',
- },
- component: () =>
- import('src/pages/Account/Role/Card/RoleBasicData.vue'),
- },
- {
- name: 'SubRoles',
- path: 'sub-roles',
- meta: {
- title: 'subRoles',
- icon: 'group',
- },
- component: () => import('src/pages/Account/Role/Card/SubRoles.vue'),
- },
-
- {
- name: 'InheritedRoles',
- path: 'inherited-roles',
- meta: {
- title: 'inheritedRoles',
- icon: 'account_tree',
- },
- component: () =>
- import('src/pages/Account/Role/Card/InheritedRoles.vue'),
- },
- {
- name: 'RoleLog',
- path: 'log',
- meta: {
- title: 'log',
- icon: 'history',
- },
- component: () => import('src/pages/Account/Role/Card/RoleLog.vue'),
- },
- ],
- },
- ],
-};
diff --git a/src/router/modules/route.js b/src/router/modules/route.js
index 9a7b16df3..a6c4f30a2 100644
--- a/src/router/modules/route.js
+++ b/src/router/modules/route.js
@@ -25,7 +25,7 @@ export default {
{
path: '/route',
name: 'RouteMain',
- component: () => import('src/components/common/VnSectionMain.vue'),
+ component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'RouteList' },
children: [
{
diff --git a/src/router/modules/shelving.js b/src/router/modules/shelving.js
index 2eeec4b98..9cc6bcef1 100644
--- a/src/router/modules/shelving.js
+++ b/src/router/modules/shelving.js
@@ -18,7 +18,7 @@ export default {
{
path: '',
name: 'ShelvingMain',
- component: () => import('src/components/common/VnSectionMain.vue'),
+ component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'ShelvingList' },
children: [
{
diff --git a/src/router/modules/Supplier.js b/src/router/modules/supplier.js
similarity index 98%
rename from src/router/modules/Supplier.js
rename to src/router/modules/supplier.js
index c08fb5961..647f4bdd3 100644
--- a/src/router/modules/Supplier.js
+++ b/src/router/modules/supplier.js
@@ -30,7 +30,7 @@ export default {
{
path: '',
name: 'SupplierMain',
- component: () => import('src/components/common/VnSectionMain.vue'),
+ component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'SupplierList' },
children: [
{
diff --git a/src/router/modules/ticket.js b/src/router/modules/ticket.js
index 6e407b88b..600b64c14 100644
--- a/src/router/modules/ticket.js
+++ b/src/router/modules/ticket.js
@@ -1,19 +1,12 @@
import { RouterView } from 'vue-router';
-export default {
- name: 'Ticket',
- path: '/ticket',
+const ticketCard = {
+ name: 'TicketCard',
+ path: ':id',
+ component: () => import('src/pages/Ticket/Card/TicketCard.vue'),
+ redirect: { name: 'TicketSummary' },
meta: {
- title: 'tickets',
- icon: 'vn:ticket',
- moduleName: 'Ticket',
- keyBinding: 't',
- },
- component: RouterView,
- redirect: { name: 'TicketMain' },
- menus: {
- main: ['TicketList', 'TicketAdvance', 'TicketWeekly', 'TicketFuture'],
- card: [
+ menu: [
'TicketBasicData',
'TicketSale',
'TicketLog',
@@ -32,21 +25,200 @@ export default {
'TicketSms',
],
},
+ children: [
+ {
+ path: 'summary',
+ name: 'TicketSummary',
+ meta: {
+ title: 'summary',
+ icon: 'launch',
+ },
+ component: () => import('src/pages/Ticket/Card/TicketSummary.vue'),
+ },
+ {
+ path: 'basic-data',
+ name: 'TicketBasicData',
+ meta: {
+ title: 'basicData',
+ icon: 'vn:settings',
+ },
+ component: () =>
+ import('src/pages/Ticket/Card/BasicData/TicketBasicDataView.vue'),
+ },
+ {
+ path: 'sale',
+ name: 'TicketSale',
+ meta: {
+ title: 'sale',
+ icon: 'vn:lines',
+ },
+ component: () => import('src/pages/Ticket/Card/TicketSale.vue'),
+ },
+ {
+ path: 'request',
+ name: 'TicketPurchaseRequest',
+ meta: {
+ title: 'purchaseRequest',
+ icon: 'vn:buyrequest',
+ },
+ component: () => import('src/pages/Ticket/Card/TicketPurchaseRequest.vue'),
+ },
+ {
+ path: 'tracking',
+ name: 'TicketTracking',
+ meta: {
+ title: 'tracking',
+ icon: 'vn:eye',
+ },
+ component: () => import('src/pages/Ticket/Card/TicketTracking.vue'),
+ },
+ {
+ path: 'log',
+ name: 'TicketLog',
+ meta: {
+ title: 'log',
+ icon: 'history',
+ },
+ component: () => import('src/pages/Ticket/Card/TicketLog.vue'),
+ },
+ {
+ path: 'observation',
+ name: 'TicketNotes',
+ meta: {
+ title: 'notes',
+ icon: 'vn:notes',
+ },
+ component: () => import('src/pages/Ticket/Card/TicketNotes.vue'),
+ },
+ {
+ path: 'picture',
+ name: 'TicketPicture',
+ meta: {
+ title: 'pictures',
+ icon: 'vn:photo',
+ },
+ component: () => import('src/pages/Ticket/Card/TicketPicture.vue'),
+ },
+ {
+ path: 'volume',
+ name: 'TicketVolume',
+ meta: {
+ title: 'volume',
+ icon: 'vn:volume',
+ },
+ component: () => import('src/pages/Ticket/Card/TicketVolume.vue'),
+ },
+ {
+ path: 'expedition',
+ name: 'TicketExpedition',
+ meta: {
+ title: 'expedition',
+ icon: 'vn:package',
+ },
+ component: () => import('src/pages/Ticket/Card/TicketExpedition.vue'),
+ },
+ {
+ path: 'service',
+ name: 'TicketService',
+ meta: {
+ title: 'services',
+ icon: 'vn:services',
+ },
+ component: () => import('src/pages/Ticket/Card/TicketService.vue'),
+ },
+ {
+ path: 'package',
+ name: 'TicketPackage',
+ meta: {
+ title: 'packages',
+ icon: 'vn:bucket',
+ },
+ component: () => import('src/pages/Ticket/Card/TicketPackage.vue'),
+ },
+ {
+ path: 'components',
+ name: 'TicketComponents',
+ meta: {
+ title: 'components',
+ icon: 'vn:components',
+ },
+ component: () => import('src/pages/Ticket/Card/TicketComponents.vue'),
+ },
+
+ {
+ path: 'sale-tracking',
+ name: 'TicketSaleTracking',
+ meta: {
+ title: 'saleTracking',
+ icon: 'assignment',
+ },
+ component: () => import('src/pages/Ticket/Card/TicketSaleTracking.vue'),
+ },
+ {
+ path: 'dms',
+ name: 'TicketDms',
+ meta: {
+ title: 'dms',
+ icon: 'cloud_upload',
+ },
+ component: () => import('src/pages/Ticket/Card/TicketDms.vue'),
+ },
+ {
+ path: 'boxing',
+ name: 'TicketBoxing',
+ meta: {
+ title: 'boxing',
+ icon: 'science',
+ },
+ component: () => import('src/pages/Ticket/Card/TicketBoxing.vue'),
+ },
+ {
+ path: 'sms',
+ name: 'TicketSms',
+ meta: {
+ title: 'sms',
+ icon: 'sms',
+ },
+ component: () => import('src/pages/Ticket/Card/TicketSms.vue'),
+ },
+ ],
+};
+
+export default {
+ name: 'Ticket',
+ path: '/ticket',
+ meta: {
+ title: 'tickets',
+ icon: 'vn:ticket',
+ moduleName: 'Ticket',
+ keyBinding: 't',
+ menu: ['TicketList', 'TicketAdvance', 'TicketWeekly', 'TicketFuture'],
+ },
+ component: RouterView,
+ redirect: { name: 'TicketMain' },
children: [
{
name: 'TicketMain',
path: '',
- component: () => import('src/components/common/VnSectionMain.vue'),
- redirect: { name: 'TicketList' },
+ component: () => import('src/components/common/VnModule.vue'),
+ redirect: { name: 'TicketIndexMain' },
children: [
{
- path: 'list',
- name: 'TicketList',
- meta: {
- title: 'list',
- icon: 'view_list',
- },
+ path: '',
+ name: 'TicketIndexMain',
+ redirect: { name: 'TicketList' },
component: () => import('src/pages/Ticket/TicketList.vue'),
+ children: [
+ {
+ name: 'TicketList',
+ path: 'list',
+ meta: {
+ title: 'list',
+ icon: 'view_list',
+ },
+ },
+ ticketCard,
+ ],
},
{
path: 'create',
@@ -86,170 +258,5 @@ export default {
},
],
},
- {
- name: 'TicketCard',
- path: ':id',
- component: () => import('src/pages/Ticket/Card/TicketCard.vue'),
- redirect: { name: 'TicketSummary' },
- children: [
- {
- path: 'summary',
- name: 'TicketSummary',
- meta: {
- title: 'summary',
- icon: 'launch',
- },
- component: () => import('src/pages/Ticket/Card/TicketSummary.vue'),
- },
- {
- path: 'basic-data',
- name: 'TicketBasicData',
- meta: {
- title: 'basicData',
- icon: 'vn:settings',
- },
- component: () =>
- import('src/pages/Ticket/Card/BasicData/TicketBasicDataView.vue'),
- },
- {
- path: 'sale',
- name: 'TicketSale',
- meta: {
- title: 'sale',
- icon: 'vn:lines',
- },
- component: () => import('src/pages/Ticket/Card/TicketSale.vue'),
- },
- {
- path: 'request',
- name: 'TicketPurchaseRequest',
- meta: {
- title: 'purchaseRequest',
- icon: 'vn:buyrequest',
- },
- component: () =>
- import('src/pages/Ticket/Card/TicketPurchaseRequest.vue'),
- },
- {
- path: 'tracking',
- name: 'TicketTracking',
- meta: {
- title: 'tracking',
- icon: 'vn:eye',
- },
- component: () => import('src/pages/Ticket/Card/TicketTracking.vue'),
- },
- {
- path: 'log',
- name: 'TicketLog',
- meta: {
- title: 'log',
- icon: 'history',
- },
- component: () => import('src/pages/Ticket/Card/TicketLog.vue'),
- },
- {
- path: 'observation',
- name: 'TicketNotes',
- meta: {
- title: 'notes',
- icon: 'vn:notes',
- },
- component: () => import('src/pages/Ticket/Card/TicketNotes.vue'),
- },
- {
- path: 'picture',
- name: 'TicketPicture',
- meta: {
- title: 'pictures',
- icon: 'vn:photo',
- },
- component: () => import('src/pages/Ticket/Card/TicketPicture.vue'),
- },
- {
- path: 'volume',
- name: 'TicketVolume',
- meta: {
- title: 'volume',
- icon: 'vn:volume',
- },
- component: () => import('src/pages/Ticket/Card/TicketVolume.vue'),
- },
- {
- path: 'expedition',
- name: 'TicketExpedition',
- meta: {
- title: 'expedition',
- icon: 'vn:package',
- },
- component: () => import('src/pages/Ticket/Card/TicketExpedition.vue'),
- },
- {
- path: 'service',
- name: 'TicketService',
- meta: {
- title: 'services',
- icon: 'vn:services',
- },
- component: () => import('src/pages/Ticket/Card/TicketService.vue'),
- },
- {
- path: 'package',
- name: 'TicketPackage',
- meta: {
- title: 'packages',
- icon: 'vn:bucket',
- },
- component: () => import('src/pages/Ticket/Card/TicketPackage.vue'),
- },
- {
- path: 'components',
- name: 'TicketComponents',
- meta: {
- title: 'components',
- icon: 'vn:components',
- },
- component: () => import('src/pages/Ticket/Card/TicketComponents.vue'),
- },
-
- {
- path: 'sale-tracking',
- name: 'TicketSaleTracking',
- meta: {
- title: 'saleTracking',
- icon: 'assignment',
- },
- component: () =>
- import('src/pages/Ticket/Card/TicketSaleTracking.vue'),
- },
- {
- path: 'dms',
- name: 'TicketDms',
- meta: {
- title: 'dms',
- icon: 'cloud_upload',
- },
- component: () => import('src/pages/Ticket/Card/TicketDms.vue'),
- },
- {
- path: 'boxing',
- name: 'TicketBoxing',
- meta: {
- title: 'boxing',
- icon: 'science',
- },
- component: () => import('src/pages/Ticket/Card/TicketBoxing.vue'),
- },
- {
- path: 'sms',
- name: 'TicketSms',
- meta: {
- title: 'sms',
- icon: 'sms',
- },
- component: () => import('src/pages/Ticket/Card/TicketSms.vue'),
- },
- ],
- },
],
};
diff --git a/src/router/modules/travel.js b/src/router/modules/travel.js
index dff693d2f..49272be1e 100644
--- a/src/router/modules/travel.js
+++ b/src/router/modules/travel.js
@@ -18,7 +18,7 @@ export default {
{
path: '',
name: 'TravelMain',
- component: () => import('src/components/common/VnSectionMain.vue'),
+ component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'TravelList' },
children: [
{
diff --git a/src/router/modules/wagon.js b/src/router/modules/wagon.js
index 3556f215f..4a322d305 100644
--- a/src/router/modules/wagon.js
+++ b/src/router/modules/wagon.js
@@ -18,7 +18,7 @@ export default {
{
path: '/wagon',
name: 'WagonMain',
- component: () => import('src/components/common/VnSectionMain.vue'),
+ component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'WagonList' },
children: [
{
@@ -62,7 +62,7 @@ export default {
{
path: '/wagon/type',
name: 'WagonTypeMain',
- component: () => import('src/components/common/VnSectionMain.vue'),
+ component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'WagonTypeList' },
children: [
{
diff --git a/src/router/modules/worker.js b/src/router/modules/worker.js
index 925019734..c732664ec 100644
--- a/src/router/modules/worker.js
+++ b/src/router/modules/worker.js
@@ -35,7 +35,7 @@ export default {
{
path: '',
name: 'WorkerMain',
- component: () => import('src/components/common/VnSectionMain.vue'),
+ component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'WorkerList' },
children: [
{
diff --git a/src/router/modules/zone.js b/src/router/modules/zone.js
index fc8161fb3..f400a708e 100644
--- a/src/router/modules/zone.js
+++ b/src/router/modules/zone.js
@@ -30,7 +30,7 @@ export default {
{
path: '/zone',
name: 'ZoneMain',
- component: () => import('src/components/common/VnSectionMain.vue'),
+ component: () => import('src/components/common/VnModule.vue'),
redirect: { name: 'ZoneList' },
children: [
{
diff --git a/src/router/routes.js b/src/router/routes.js
index cced308b5..b9120f8c4 100644
--- a/src/router/routes.js
+++ b/src/router/routes.js
@@ -7,10 +7,9 @@ import worker from './modules/worker';
import invoiceOut from './modules/invoiceOut';
import invoiceIn from './modules/invoiceIn';
import wagon from './modules/wagon';
-import supplier from './modules/Supplier';
+import supplier from './modules/supplier';
import travel from './modules/travel';
import department from './modules/department';
-import role from './modules/role';
import ItemType from './modules/itemType';
import shelving from 'src/router/modules/shelving';
import order from 'src/router/modules/order';
@@ -21,7 +20,6 @@ import agency from 'src/router/modules/agency';
import zone from 'src/router/modules/zone';
import account from './modules/account';
import monitor from 'src/router/modules/monitor';
-import mailAlias from './modules/mailAlias';
const routes = [
{
@@ -95,8 +93,6 @@ const routes = [
ItemType,
zone,
account,
- role,
- mailAlias,
{
path: '/:catchAll(.*)*',
name: 'NotFound',
diff --git a/src/stores/useArrayDataStore.js b/src/stores/useArrayDataStore.js
index d0a1c3a8f..e0d8b7929 100644
--- a/src/stores/useArrayDataStore.js
+++ b/src/stores/useArrayDataStore.js
@@ -51,10 +51,15 @@ export const useArrayDataStore = defineStore('arrayDataStore', () => {
});
}
+ function resetPagination(key) {
+ reset(key, ['skip', 'filter.skip', 'page']);
+ }
+
return {
get,
set,
clear,
reset,
+ resetPagination,
};
});
diff --git a/test/cypress/integration/vnComponent/VnSearchBar.spec.js b/test/cypress/integration/vnComponent/VnSearchBar.spec.js
index b8621118c..885e5d6b3 100644
--- a/test/cypress/integration/vnComponent/VnSearchBar.spec.js
+++ b/test/cypress/integration/vnComponent/VnSearchBar.spec.js
@@ -7,10 +7,10 @@ describe('VnSearchBar', () => {
beforeEach(() => {
cy.viewport(1280, 720);
cy.login('developer');
- cy.visit('#/customer/list');
+ cy.visit('#/account/list');
});
- it('should redirect to customer summary page', () => {
+ it('should redirect to account summary page', () => {
searchAndCheck('1', employeeId);
searchAndCheck('salesPerson', salesPersonId);
});
@@ -20,7 +20,6 @@ describe('VnSearchBar', () => {
checkTableLength(2);
cy.clearSearchbar();
-
cy.writeSearchbar('0{enter}');
checkTableLength(0);
});