diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index 96d097191..eb0bbbe66 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -79,6 +79,7 @@ watch( const isLoading = ref(false); async function search() { + store.filter.where = {}; isLoading.value = true; const params = { ...userParams.value }; store.userParamsChanged = true; diff --git a/src/components/ui/VnSearchbar.vue b/src/components/ui/VnSearchbar.vue index fc8475ace..344267ef7 100644 --- a/src/components/ui/VnSearchbar.vue +++ b/src/components/ui/VnSearchbar.vue @@ -81,8 +81,10 @@ async function search() { const staticParams = Object.entries(store.userParams).filter( ([key, value]) => value && (props.staticParams || []).includes(key) ); + // const filter =props?.where? { where: JSON.parse(props.where) }: {} await arrayData.applyFilter({ params: { + // filter , ...Object.fromEntries(staticParams), search: searchText.value, }, @@ -106,6 +108,7 @@ async function search() { let targetUrl; if (path.endsWith('/list')) targetUrl = path.replace('/list', `/${targetId}/summary`); + if (path.endsWith('-list')) targetUrl = path.replace('-list', `/${targetId}/summary`); else if (path.includes(':id')) targetUrl = path.replace(':id', targetId); await router.push({ path: targetUrl }); diff --git a/src/components/ui/VnUserLink.vue b/src/components/ui/VnUserLink.vue index 47287c12b..33836550a 100644 --- a/src/components/ui/VnUserLink.vue +++ b/src/components/ui/VnUserLink.vue @@ -1,6 +1,5 @@ + + diff --git a/src/pages/Item/ItemTypeList.vue b/src/pages/Item/ItemTypeList.vue new file mode 100644 index 000000000..9d826655f --- /dev/null +++ b/src/pages/Item/ItemTypeList.vue @@ -0,0 +1,142 @@ + + + + + +es: + New item type: Nueva familia + Name: Nombre + Search item type: Buscar familia + Search itemType by id, name or code: Buscar familia por id, nombre o código + diff --git a/src/pages/ItemType/Card/ItemTypeBasicData.vue b/src/pages/ItemType/Card/ItemTypeBasicData.vue new file mode 100644 index 000000000..0bdfab951 --- /dev/null +++ b/src/pages/ItemType/Card/ItemTypeBasicData.vue @@ -0,0 +1,79 @@ + + diff --git a/src/pages/ItemType/Card/ItemTypeCard.vue b/src/pages/ItemType/Card/ItemTypeCard.vue new file mode 100644 index 000000000..cb8adf7f6 --- /dev/null +++ b/src/pages/ItemType/Card/ItemTypeCard.vue @@ -0,0 +1,12 @@ + + diff --git a/src/pages/ItemType/Card/ItemTypeDescriptor.vue b/src/pages/ItemType/Card/ItemTypeDescriptor.vue new file mode 100644 index 000000000..e565a791b --- /dev/null +++ b/src/pages/ItemType/Card/ItemTypeDescriptor.vue @@ -0,0 +1,85 @@ + + + + + +es: + Go to module index: Ir al índice del módulo + diff --git a/src/pages/ItemType/Card/ItemTypeSummary.vue b/src/pages/ItemType/Card/ItemTypeSummary.vue new file mode 100644 index 000000000..62d1c74ab --- /dev/null +++ b/src/pages/ItemType/Card/ItemTypeSummary.vue @@ -0,0 +1,109 @@ + + + + + diff --git a/src/pages/ItemType/ItemTypeFilter.vue b/src/pages/ItemType/ItemTypeFilter.vue new file mode 100644 index 000000000..2a86795c2 --- /dev/null +++ b/src/pages/ItemType/ItemTypeFilter.vue @@ -0,0 +1,55 @@ + + + + + +en: + params: + name: Name + code: Code +es: + params: + name: Nombre + code: Código + Name: Nombre + Code: Código + diff --git a/src/pages/ItemType/locale/en.yml b/src/pages/ItemType/locale/en.yml new file mode 100644 index 000000000..7889418ea --- /dev/null +++ b/src/pages/ItemType/locale/en.yml @@ -0,0 +1,12 @@ +shared: + code: Code + name: Name + worker: Worker + category: Category + temperature: Temperature +summary: + id: id + life: Life + promo: Promo + itemPackingType: Item packing type + isUnconventionalSize: Is unconventional size diff --git a/src/pages/ItemType/locale/es.yml b/src/pages/ItemType/locale/es.yml new file mode 100644 index 000000000..9a94dceb6 --- /dev/null +++ b/src/pages/ItemType/locale/es.yml @@ -0,0 +1,17 @@ +shared: + code: Código + name: Nombre + worker: Trabajador + category: Reino + temperature: Temperatura +summary: + id: id + code: Código + name: Nombre + worker: Trabajador + category: Reino + temperature: Temperatura + life: Vida + promo: Promoción + itemPackingType: Tipo de embalaje + isUnconventionalSize: Es de tamaño poco convencional diff --git a/src/pages/Shelving/Card/ShelvingSummary.vue b/src/pages/Shelving/Card/ShelvingSummary.vue index 49470719e..649799b00 100644 --- a/src/pages/Shelving/Card/ShelvingSummary.vue +++ b/src/pages/Shelving/Card/ShelvingSummary.vue @@ -20,14 +20,14 @@ const router = useRouter(); const { t } = useI18n(); const entityId = computed(() => $props.id || route.params.id); -const isDialog = Boolean($props.id); -const hideRightDrawer = () => { - if (!isDialog) { - stateStore.rightDrawer = false; - } -}; -onMounted(hideRightDrawer); -onUnmounted(hideRightDrawer); +const isDialog = false; +// const hideRightDrawer = () => { +// if (!isDialog) { +// stateStore.rightDrawer = false; +// } +// }; +// onMounted(hideRightDrawer); +// onUnmounted(hideRightDrawer); const filter = { include: [ { @@ -46,23 +46,6 @@ const filter = { diff --git a/src/router/modules/department.js b/src/router/modules/department.js index aaffc3460..dfd5e64ba 100644 --- a/src/router/modules/department.js +++ b/src/router/modules/department.js @@ -6,6 +6,7 @@ export default { meta: { title: 'department', icon: 'vn:greuge', + moduleName: 'Department', }, component: RouterView, redirect: { name: 'DepartmentCard' }, diff --git a/src/router/modules/index.js b/src/router/modules/index.js index 6f4b0b35e..941358d26 100644 --- a/src/router/modules/index.js +++ b/src/router/modules/index.js @@ -16,6 +16,7 @@ import Entry from './entry'; import roadmap from './roadmap'; import Parking from './parking'; import Agency from './agency'; +import ItemType from './itemType'; export default [ Item, @@ -36,4 +37,5 @@ export default [ roadmap, Parking, Agency, + ItemType, ]; diff --git a/src/router/modules/item.js b/src/router/modules/item.js index bc1e72a94..7ee5dcf78 100644 --- a/src/router/modules/item.js +++ b/src/router/modules/item.js @@ -11,7 +11,13 @@ export default { component: RouterView, redirect: { name: 'ItemMain' }, menus: { - main: ['ItemList', 'WasteBreakdown', 'ItemFixedPrice', 'ItemRequest'], + main: [ + 'ItemList', + 'WasteBreakdown', + 'ItemFixedPrice', + 'ItemRequest', + 'ItemTypeList', + ], card: [ 'ItemBasicData', 'ItemLog', @@ -68,6 +74,23 @@ export default { 'https://grafana.verdnatura.es/d/TTNXQAxVk'; }, }, + { + path: 'item-type-list', + name: 'ItemTypeList', + meta: { + title: 'family', + icon: 'contact_support', + }, + component: () => import('src/pages/Item/ItemTypeList.vue'), + }, + { + path: 'item-type-list/create', + name: 'ItemTypeCreate', + meta: { + title: 'itemTypeCreate', + }, + component: () => import('src/pages/Item/ItemTypeCreate.vue'), + }, { path: 'request', name: 'ItemRequest', diff --git a/src/router/modules/itemType.js b/src/router/modules/itemType.js new file mode 100644 index 000000000..8064c41ff --- /dev/null +++ b/src/router/modules/itemType.js @@ -0,0 +1,46 @@ +import { RouterView } from 'vue-router'; + +export default { + path: '/item/item-type', + name: 'ItemType', + meta: { + title: 'itemType', + icon: 'contact_support', + moduleName: 'ItemType', + }, + component: RouterView, + redirect: { name: 'ItemTypeList' }, + menus: { + main: [], + card: ['ItemTypeBasicData'], + }, + children: [ + { + name: 'ItemTypeCard', + path: ':id', + component: () => import('src/pages/ItemType/Card/ItemTypeCard.vue'), + redirect: { name: 'ItemTypeSummary' }, + children: [ + { + name: 'ItemTypeSummary', + path: 'summary', + meta: { + title: 'summary', + }, + component: () => + import('src/pages/ItemType/Card/ItemTypeSummary.vue'), + }, + { + name: 'ItemTypeBasicData', + path: 'basic-data', + meta: { + title: 'basicData', + icon: 'vn:settings', + }, + component: () => + import('src/pages/ItemType/Card/ItemTypeBasicData.vue'), + }, + ], + }, + ], +}; diff --git a/src/router/modules/roadmap.js b/src/router/modules/roadmap.js index 02edf94be..6b2aa6a13 100644 --- a/src/router/modules/roadmap.js +++ b/src/router/modules/roadmap.js @@ -6,6 +6,7 @@ export default { meta: { title: 'roadmap', icon: 'vn:troncales', + moduleName: 'Roadmap', }, component: RouterView, redirect: { name: 'RouteMain' }, diff --git a/src/router/routes.js b/src/router/routes.js index ca52441e7..92145d44e 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -10,6 +10,7 @@ import supplier from './modules/Supplier'; import route from './modules/route'; import travel from './modules/travel'; import department from './modules/department'; +import ItemType from './modules/itemType'; import shelving from 'src/router/modules/shelving'; import order from 'src/router/modules/order'; import entry from 'src/router/modules/entry'; @@ -73,6 +74,7 @@ const routes = [ entry, parking, agency, + ItemType, { path: '/:catchAll(.*)*', name: 'NotFound',