Fix remove from multiple acquisitions
This commit is contained in:
1 parent
27f146b945
commit
400737dab8
4 files changed
+50
-33
No files matched your search
@@ -38,7 +38,7 @@ export const useAcquiredTypesStore = defineStore('market-acquisition', () => {
|
||||
const found = acquiredTypes.value.find(t => t.id === id);
|
||||
|
||||
if (!found) {
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
const item = {
|
||||
@@ -57,7 +57,7 @@ export const useAcquiredTypesStore = defineStore('market-acquisition', () => {
|
||||
log.info(`Acquired type ${item.id} remaining: ${item.remaining}`, item);
|
||||
};
|
||||
|
||||
marbasAxiosInstance.get<MarbasAcquiredType[]>(endpoint).then(res => acquiredTypes.value = res.data);
|
||||
marbasAxiosInstance.get<MarbasAcquiredType[]>(endpoint).then(res => acquiredTypes.value = res.data.map(item => ({ ...item, date: new Date(item.date) })));
|
||||
|
||||
return { acquiredTypes: types, addAcquiredType, removeAcquiredType };
|
||||
});
|
||||
Reference in new issue
Block a user