This commit is contained in:
@@ -5,12 +5,13 @@
|
|||||||
|
|
||||||
MISC ITEMS THAT CAME UP
|
MISC ITEMS THAT CAME UP
|
||||||
|
|
||||||
|
todo: DataList if there is a meta filter it should default to no filter first then apply teh meta filter as a temporary filter like if the user had hand selected it
|
||||||
|
The current filter if any applied fights with the meta filter and in many cases would block it completely
|
||||||
|
This way they can save it as a common filter if they want and
|
||||||
|
|
||||||
todo: Part form menu has links to inventory list filtered for that part not implemented yet but could be now
|
todo: Part form menu has links to inventory list filtered for that part not implemented yet but could be now
|
||||||
make sure it checks if useinvenotry is in effect
|
make sure it checks if useinvenotry is in effect
|
||||||
|
|
||||||
todo: confirm on delete cascade functionality for partassembly and partstocklevel records when either part or warehouse is deleted
|
|
||||||
|
|
||||||
todo: every form all fields error collection is set to "servererrors" but really its' any kind of validation error local or server so not sure why ti's named that
|
|
||||||
|
|
||||||
todo: userbiz validate can delete has funky error
|
todo: userbiz validate can delete has funky error
|
||||||
|
|
||||||
@@ -174,13 +175,7 @@ Inventory related objects that need to be ported:
|
|||||||
XPartSerial
|
XPartSerial
|
||||||
XPartWarehouse
|
XPartWarehouse
|
||||||
XPartInventory (was "PartByWarehouseInventory")
|
XPartInventory (was "PartByWarehouseInventory")
|
||||||
transformed into a inventory transaction ledger as per case 3847
|
XPartRestock
|
||||||
PartRestock
|
|
||||||
contains partid/warehouseid/minimumstock level
|
|
||||||
accessible from the Part form as it's own edit window
|
|
||||||
no list of all
|
|
||||||
only when useinventory
|
|
||||||
very much like partassembly, can reuse from that base
|
|
||||||
XPartInventoryAdjustment
|
XPartInventoryAdjustment
|
||||||
XPartAssembly
|
XPartAssembly
|
||||||
|
|
||||||
|
|||||||
@@ -586,6 +586,9 @@ export default {
|
|||||||
// Process and return server errors if any for form and field specified
|
// Process and return server errors if any for form and field specified
|
||||||
// note that this is called in turn by every control on the form so it's only job
|
// note that this is called in turn by every control on the form so it's only job
|
||||||
// is to return errors if they exist for *that* field
|
// is to return errors if they exist for *that* field
|
||||||
|
// Not to be confused with validation errors through the "rules" property
|
||||||
|
// that is separate and any errors returned here are *added* to the validation
|
||||||
|
// errors in the UI by Vuetify
|
||||||
//
|
//
|
||||||
serverErrors(vm, ref) {
|
serverErrors(vm, ref) {
|
||||||
let ret = [];
|
let ret = [];
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
:dataListSort="dataListSort"
|
:dataListSort="dataListSort"
|
||||||
:showSelect="rights.read"
|
:showSelect="rights.read"
|
||||||
:reload="reload"
|
:reload="reload"
|
||||||
|
:metaView="metaView"
|
||||||
v-on:selection-change="handleSelected"
|
v-on:selection-change="handleSelected"
|
||||||
data-cy="partInventoryTransactionsTable"
|
data-cy="partInventoryTransactionsTable"
|
||||||
>
|
>
|
||||||
@@ -26,9 +27,35 @@
|
|||||||
const FORM_KEY = "part-inventory-list";
|
const FORM_KEY = "part-inventory-list";
|
||||||
export default {
|
export default {
|
||||||
created() {
|
created() {
|
||||||
this.rights = window.$gz.role.getRights(window.$gz.type.PartInventory);
|
let vm = this;
|
||||||
|
vm.rights = window.$gz.role.getRights(window.$gz.type.PartInventory);
|
||||||
window.$gz.eventBus.$on("menu-click", clickHandler);
|
window.$gz.eventBus.$on("menu-click", clickHandler);
|
||||||
generateMenu(this);
|
if (vm.$route.params.filter) {
|
||||||
|
let metaFilter = [];
|
||||||
|
//pre-filter by PartNumber or warehouse name or both
|
||||||
|
if (vm.$route.params.filter.PartPartNumber != null) {
|
||||||
|
metaFilter.push({
|
||||||
|
fld: "PartPartNumber",
|
||||||
|
filter: {
|
||||||
|
items: [{ op: "=", value: vm.$route.params.filter.PartPartNumber }]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (vm.$route.params.filter.PartWarehouseName != null) {
|
||||||
|
metaFilter.push({
|
||||||
|
fld: "PartWarehouseName",
|
||||||
|
filter: {
|
||||||
|
items: [
|
||||||
|
{ op: "=", value: vm.$route.params.filter.PartWarehouseName }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
vm.metaView = JSON.stringify(metaFilter);
|
||||||
|
}
|
||||||
|
|
||||||
|
generateMenu(vm);
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
window.$gz.eventBus.$off("menu-click", clickHandler);
|
window.$gz.eventBus.$off("menu-click", clickHandler);
|
||||||
@@ -42,6 +69,7 @@ export default {
|
|||||||
rights: window.$gz.role.defaultRightsObject(),
|
rights: window.$gz.role.defaultRightsObject(),
|
||||||
ayType: window.$gz.type.PartInventory,
|
ayType: window.$gz.type.PartInventory,
|
||||||
selectedItems: [],
|
selectedItems: [],
|
||||||
|
metaView: undefined,
|
||||||
reload: false
|
reload: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
:dataListSort="dataListSort"
|
:dataListSort="dataListSort"
|
||||||
:showSelect="rights.read"
|
:showSelect="rights.read"
|
||||||
:reload="reload"
|
:reload="reload"
|
||||||
|
:metaView="metaView"
|
||||||
v-on:selection-change="handleSelected"
|
v-on:selection-change="handleSelected"
|
||||||
data-cy="partInventoryTable"
|
data-cy="partInventoryTable"
|
||||||
>
|
>
|
||||||
@@ -26,9 +27,35 @@
|
|||||||
const FORM_KEY = "part-inventory-list";
|
const FORM_KEY = "part-inventory-list";
|
||||||
export default {
|
export default {
|
||||||
created() {
|
created() {
|
||||||
this.rights = window.$gz.role.getRights(window.$gz.type.PartInventory);
|
let vm = this;
|
||||||
|
vm.rights = window.$gz.role.getRights(window.$gz.type.PartInventory);
|
||||||
window.$gz.eventBus.$on("menu-click", clickHandler);
|
window.$gz.eventBus.$on("menu-click", clickHandler);
|
||||||
generateMenu(this);
|
|
||||||
|
if (vm.$route.params.filter) {
|
||||||
|
let metaFilter = [];
|
||||||
|
//pre-filter by PartNumber or warehouse name or both
|
||||||
|
if (vm.$route.params.filter.PartPartNumber != null) {
|
||||||
|
metaFilter.push({
|
||||||
|
fld: "PartPartNumber",
|
||||||
|
filter: {
|
||||||
|
items: [{ op: "=", value: vm.$route.params.filter.PartPartNumber }]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (vm.$route.params.filter.PartWarehouseName != null) {
|
||||||
|
metaFilter.push({
|
||||||
|
fld: "PartWarehouseName",
|
||||||
|
filter: {
|
||||||
|
items: [
|
||||||
|
{ op: "=", value: vm.$route.params.filter.PartWarehouseName }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
vm.metaView = JSON.stringify(metaFilter);
|
||||||
|
}
|
||||||
|
generateMenu(vm);
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
window.$gz.eventBus.$off("menu-click", clickHandler);
|
window.$gz.eventBus.$off("menu-click", clickHandler);
|
||||||
@@ -42,6 +69,7 @@ export default {
|
|||||||
rights: window.$gz.role.defaultRightsObject(),
|
rights: window.$gz.role.defaultRightsObject(),
|
||||||
ayType: window.$gz.type.PartInventory,
|
ayType: window.$gz.type.PartInventory,
|
||||||
selectedItems: [],
|
selectedItems: [],
|
||||||
|
metaView: undefined,
|
||||||
reload: false
|
reload: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -491,7 +491,18 @@ async function clickHandler(menuItem) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case "PartByWarehouseInventoryList":
|
||||||
|
m.vm.$router.push({
|
||||||
|
name: "inv-part-inventory",
|
||||||
|
params: { filter: { PartWarehouseName: m.vm.obj.name } }
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case "PartInventoryTransactionList":
|
||||||
|
m.vm.$router.push({
|
||||||
|
name: "inv-part-inventory-transactions",
|
||||||
|
params: { filter: { PartWarehouseName: m.vm.obj.name } }
|
||||||
|
});
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
window.$gz.eventBus.$emit(
|
window.$gz.eventBus.$emit(
|
||||||
"notify-warning",
|
"notify-warning",
|
||||||
@@ -585,6 +596,26 @@ function generateMenu(vm) {
|
|||||||
|
|
||||||
menuOptions.menuItems.push({ divider: true, inset: false });
|
menuOptions.menuItems.push({ divider: true, inset: false });
|
||||||
|
|
||||||
|
if (
|
||||||
|
vm.obj.id != null &&
|
||||||
|
vm.obj.id != 0 &&
|
||||||
|
window.$gz.store.state.globalSettings.useInventory
|
||||||
|
) {
|
||||||
|
menuOptions.menuItems.push({
|
||||||
|
title: "PartByWarehouseInventoryList",
|
||||||
|
icon: "$ayiPallet",
|
||||||
|
key: FORM_KEY + ":PartByWarehouseInventoryList",
|
||||||
|
vm: vm
|
||||||
|
});
|
||||||
|
|
||||||
|
menuOptions.menuItems.push({
|
||||||
|
title: "PartInventoryTransactionList",
|
||||||
|
icon: "$ayiDolly",
|
||||||
|
key: FORM_KEY + ":PartInventoryTransactionList",
|
||||||
|
vm: vm
|
||||||
|
});
|
||||||
|
}
|
||||||
|
menuOptions.menuItems.push({ divider: true, inset: false });
|
||||||
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -605,6 +636,8 @@ async function initForm(vm) {
|
|||||||
async function fetchTranslatedText(vm) {
|
async function fetchTranslatedText(vm) {
|
||||||
await window.$gz.translation.cacheTranslations([
|
await window.$gz.translation.cacheTranslations([
|
||||||
"PartWarehouse",
|
"PartWarehouse",
|
||||||
|
"PartByWarehouseInventoryList",
|
||||||
|
"PartInventoryTransactionList",
|
||||||
"PartWarehouseName",
|
"PartWarehouseName",
|
||||||
"PartWarehouseNotes",
|
"PartWarehouseNotes",
|
||||||
"PartWarehouseCustom1",
|
"PartWarehouseCustom1",
|
||||||
|
|||||||
@@ -718,6 +718,18 @@ async function clickHandler(menuItem) {
|
|||||||
params: { recordid: m.vm.obj.id }
|
params: { recordid: m.vm.obj.id }
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
case "PartByWarehouseInventoryList":
|
||||||
|
m.vm.$router.push({
|
||||||
|
name: "inv-part-inventory",
|
||||||
|
params: { filter: { PartPartNumber: m.vm.obj.partNumber } }
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case "PartInventoryTransactionList":
|
||||||
|
m.vm.$router.push({
|
||||||
|
name: "inv-part-inventory-transactions",
|
||||||
|
params: { filter: { PartPartNumber: m.vm.obj.partNumber } }
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
window.$gz.eventBus.$emit(
|
window.$gz.eventBus.$emit(
|
||||||
@@ -807,8 +819,6 @@ function generateMenu(vm) {
|
|||||||
|
|
||||||
menuOptions.menuItems.push({ divider: true, inset: false });
|
menuOptions.menuItems.push({ divider: true, inset: false });
|
||||||
|
|
||||||
//---- SHOW ALL ---
|
|
||||||
//MIGRATE_OUTSTANDING part inventory link from part form
|
|
||||||
if (
|
if (
|
||||||
vm.obj.id != null &&
|
vm.obj.id != null &&
|
||||||
vm.obj.id != 0 &&
|
vm.obj.id != 0 &&
|
||||||
@@ -817,17 +827,14 @@ function generateMenu(vm) {
|
|||||||
menuOptions.menuItems.push({
|
menuOptions.menuItems.push({
|
||||||
title: "PartByWarehouseInventoryList",
|
title: "PartByWarehouseInventoryList",
|
||||||
icon: "$ayiPallet",
|
icon: "$ayiPallet",
|
||||||
key: FORM_KEY + ":TODO-PartByWareHouseInventoryLinkForThisPart",
|
key: FORM_KEY + ":PartByWarehouseInventoryList",
|
||||||
vm: vm
|
vm: vm
|
||||||
});
|
});
|
||||||
|
|
||||||
//MIGRATE_OUTSTANDING part inventory transactions list for this part
|
|
||||||
menuOptions.menuItems.push({
|
menuOptions.menuItems.push({
|
||||||
title: "PartInventoryTransactionList",
|
title: "PartInventoryTransactionList",
|
||||||
icon: "$ayiDolly",
|
icon: "$ayiDolly",
|
||||||
key:
|
key: FORM_KEY + ":PartInventoryTransactionList",
|
||||||
FORM_KEY +
|
|
||||||
":TODO-PartByWareHouseInventoryTransactionListLinkForThisPart",
|
|
||||||
vm: vm
|
vm: vm
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -871,6 +878,7 @@ async function fetchTranslatedText(vm) {
|
|||||||
await window.$gz.translation.cacheTranslations([
|
await window.$gz.translation.cacheTranslations([
|
||||||
"Part",
|
"Part",
|
||||||
"PartByWarehouseInventoryList",
|
"PartByWarehouseInventoryList",
|
||||||
|
"PartInventoryTransactionList",
|
||||||
"PartSerialNumbersAvailable",
|
"PartSerialNumbersAvailable",
|
||||||
"PartStockingLevels",
|
"PartStockingLevels",
|
||||||
"PartName",
|
"PartName",
|
||||||
|
|||||||
Reference in New Issue
Block a user