change verbage

This commit is contained in:
Hayden 2023-02-05 11:29:12 -09:00
parent a1d2a57709
commit 06d3fd9ed2
No known key found for this signature in database
GPG key ID: 17CF79474E257545
3 changed files with 5 additions and 6 deletions

View file

@ -85,6 +85,6 @@
importRef.value.value = "";
}
eventBus.emit(EventTypes.ClearStores);
eventBus.emit(EventTypes.InvalidStores);
}
</script>

View file

@ -2,7 +2,7 @@ export enum EventTypes {
// ClearStores event is used to inform the stores that _all_ the data they are using
// is now out of date and they should refresh - This is used when the user makes large
// changes to the data such as bulk actions or importing a CSV file
ClearStores,
InvalidStores,
}
export type EventFn = () => void;
@ -15,7 +15,7 @@ export interface IEventBus {
class EventBus implements IEventBus {
private listeners: Record<EventTypes, Record<string, EventFn>> = {
[EventTypes.ClearStores]: {},
[EventTypes.InvalidStores]: {},
};
on(event: EventTypes, fn: EventFn, key: string): void {

View file

@ -214,7 +214,7 @@
const eventBus = useEventBus();
eventBus.on(
EventTypes.ClearStores,
EventTypes.InvalidStores,
() => {
labelStore.refresh();
locationStore.refreshChildren();
@ -226,7 +226,7 @@
onUnmounted(() => {
rmLabelStoreObserver();
rmLocationStoreObserver();
eventBus.off(EventTypes.ClearStores, "stores");
eventBus.off(EventTypes.InvalidStores, "stores");
});
const authStore = useAuthStore();
@ -238,7 +238,6 @@
return;
}
eventBus.emit(EventTypes.ClearStores);
navigateTo("/");
}
</script>