import { defineComponent, onBeforeMount, ComputedRef, computed, ref } from 'vue';
-import { useMainStore } from 'src/stores';
import { Drink, usePricelistStore, DrinkPriceVolume } from 'src/plugins/pricelist/store';
import MinPriceSetting from 'src/plugins/pricelist/components/MinPriceSetting.vue';
import SearchInput from './SearchInput.vue';
@@ -197,23 +179,12 @@ export default defineComponent({
},
},
setup(props) {
- const mainStore = useMainStore();
const store = usePricelistStore();
onBeforeMount(() => {
void store.getDrinks();
- try {
- user.value = mainStore.currentUser.userid;
- } catch {
- user.value = undefined;
- }
-
- if (user.value) {
- store.getPriceCalcColumn(user.value);
- }
});
- const user = ref
();
const columns = [
{
@@ -369,12 +340,6 @@ export default defineComponent({
field: 'public',
},
];
- const visibleColumn = computed({
- get: () => store.pricecalc_columns,
- set: (val) => {
- store.updatePriceCalcColumn(user.value, val);
- },
- });
const search_keys = computed(() =>
columns.filter(
@@ -515,7 +480,6 @@ export default defineComponent({
columns,
column_calc,
column_prices,
- visibleColumn,
drinkTypes,
updateDrink,
deleteDrink,
diff --git a/src/plugins/pricelist/components/CalculationTable/BuildManual.vue b/src/plugins/pricelist/components/CalculationTable/BuildManual.vue
index 40d4ee7..61eaa0f 100644
--- a/src/plugins/pricelist/components/CalculationTable/BuildManual.vue
+++ b/src/plugins/pricelist/components/CalculationTable/BuildManual.vue
@@ -32,6 +32,7 @@ export default defineComponent({
props: {
steps: {
type: Array as PropType>,
+ default: undefined
},
editable: {
type: Boolean,
diff --git a/src/plugins/pricelist/components/CalculationTable/DrinkPriceVolumes.vue b/src/plugins/pricelist/components/CalculationTable/DrinkPriceVolumes.vue
index 83cf1dc..776d3ca 100644
--- a/src/plugins/pricelist/components/CalculationTable/DrinkPriceVolumes.vue
+++ b/src/plugins/pricelist/components/CalculationTable/DrinkPriceVolumes.vue
@@ -101,7 +101,7 @@