Fix marbas integration
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import { Modal } from '@/components';
|
||||
import { MarketType, MarketTypeLabel } from '@/market';
|
||||
import { ref } from 'vue';
|
||||
import { AcquiredType } from './AcquiredType';
|
||||
import { useAcquiredTypesStore } from './acquisition';
|
||||
|
||||
|
||||
@@ -10,21 +11,21 @@ const acquiredTypesStore = useAcquiredTypesStore();
|
||||
const modalOpen = ref<boolean>(false);
|
||||
const type = ref<MarketType>();
|
||||
const count = ref(1);
|
||||
const id = ref<number>();
|
||||
|
||||
const open = (t: MarketType) => {
|
||||
type.value = t;
|
||||
const open = (t: AcquiredType) => {
|
||||
id.value = t.id;
|
||||
type.value = t.type;
|
||||
count.value = 1;
|
||||
modalOpen.value = true;
|
||||
}
|
||||
const remove = () => {
|
||||
const id = type.value?.id;
|
||||
|
||||
if (!id) {
|
||||
if (!id.value) {
|
||||
modalOpen.value = false;
|
||||
return;
|
||||
}
|
||||
|
||||
acquiredTypesStore.removeType(id, count.value);
|
||||
acquiredTypesStore.removeAcquiredType(id.value, count.value);
|
||||
modalOpen.value = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user