Compare commits
3
Commits
55c2628c75
...
a22845add8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a22845add8 | ||
|
|
e8e7c4f642 | ||
|
|
da7a729321 |
@@ -1,4 +1,4 @@
|
||||
import {activityApi, characterApi} from "@/mammon";
|
||||
import {characterApi} from "@/mammon";
|
||||
import {defineStore} from "pinia";
|
||||
import {ref} from "vue";
|
||||
import {CharacterResponse} from "@/generated/mammon";
|
||||
@@ -18,11 +18,9 @@ export const useCharactersStore = defineStore('characters', () => {
|
||||
return character;
|
||||
}
|
||||
|
||||
const reloadActivities = (characterId: number): Promise<void> => activityApi.fetchNewActivitiesForCharacter(characterId) as Promise<void>;
|
||||
|
||||
const refresh = () => characterApi.findAllCharacters().then(response => characters.value = response.data);
|
||||
|
||||
refresh();
|
||||
|
||||
return {characters, findById, reloadActivities};
|
||||
return {characters, findById};
|
||||
})
|
||||
@@ -57,7 +57,6 @@ const add = async () => {
|
||||
}
|
||||
|
||||
await acquiredTypesStore.addAcquiredType(id, count.value, price.value, lid, fromEveDatetimeInput(date.value));
|
||||
await acquiredTypesStore.processNewActivities();
|
||||
modalOpen.value = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,6 @@ const remove = async () => {
|
||||
await acquiredTypesStore.removeAcquiredType(t.id, quantity, lid, datetime);
|
||||
remaining -= quantity;
|
||||
}
|
||||
await acquiredTypesStore.processNewActivities();
|
||||
modalOpen.value = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -60,8 +60,6 @@ export const useAcquiredTypesStore = defineStore('market-acquisition', () => {
|
||||
});
|
||||
};
|
||||
|
||||
const processNewActivities = () => activityApi.processNewActivities();
|
||||
|
||||
const refresh = () => acquisitionApi.findAllAcquisitions()
|
||||
.then(response => acquiredTypes.value = response.data.map(toAcquiredType));
|
||||
|
||||
@@ -69,5 +67,5 @@ export const useAcquiredTypesStore = defineStore('market-acquisition', () => {
|
||||
|
||||
onActivitiesProcessed(refresh);
|
||||
|
||||
return { acquiredTypes: types, addAcquiredType, removeAcquiredType, processNewActivities };
|
||||
return { acquiredTypes: types, addAcquiredType, removeAcquiredType };
|
||||
});
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
import {logResource} from '@/service';
|
||||
import axios from 'axios';
|
||||
|
||||
export const evepraisalAxiosInstance = axios.create({
|
||||
baseURL: import.meta.env.VITE_EVEPRAISAL_URL,
|
||||
headers: {
|
||||
'accept': 'application/json',
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
})
|
||||
logResource(evepraisalAxiosInstance)
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
import {CharacterLabel, useCharactersStore} from "@/characters";
|
||||
import {useAuthStore} from "@/auth";
|
||||
import {ArrowPathIcon} from '@heroicons/vue/24/outline';
|
||||
|
||||
const charactersStore = useCharactersStore()
|
||||
const authStore = useAuthStore()
|
||||
@@ -17,7 +16,6 @@ const addCharacter = () => authStore.addCharacter();
|
||||
</div>
|
||||
<div v-for="character in charactersStore.characters" :key="character.characterId" class="flex items-center mb-2">
|
||||
<CharacterLabel class="grow" :character="character" />
|
||||
<button class="btn-icon" @click="charactersStore.reloadActivities(character.characterId)"><ArrowPathIcon /></button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -20,8 +20,5 @@ export default defineConfig({
|
||||
server: {
|
||||
port: 3000,
|
||||
strictPort: true,
|
||||
watch: {
|
||||
usePolling: true
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user