Fix remove from multiple acquisitions
This commit is contained in:
@@ -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