Options
All
  • Public
  • Public/Protected
  • All
Menu

Module redux/slices/constantsSlice

Index

Properties

default

default: Reducer<SliceState, AnyAction>

The slice's reducer.

Variables

Const constantsSlice

constantsSlice: Slice<SliceState, { setCategories: (state: WritableDraft<SliceState>, __namedParameters: { payload: Category[] }) => void; setDumpsterTypes: (state: WritableDraft<SliceState>, __namedParameters: { payload: DumpsterType[] }) => void; setStoreTypes: (state: WritableDraft<SliceState>, __namedParameters: { payload: StoreType[] }) => void }, "constants"> = ...

Const fetchAllConstants

fetchAllConstants: AsyncThunk<{ categories: Category[]; dumpsterTypes: DumpsterType[]; storeTypes: StoreType[] }, void, {}> = ...

Fetch all constant values from db

Usage: dispatch(fetchAllConstants())

setCategories

setCategories: ActionCreatorWithPayload<Category[], string>

setDumpsterTypes

setDumpsterTypes: ActionCreatorWithPayload<DumpsterType[], string>

setStoreTypes

setStoreTypes: ActionCreatorWithPayload<StoreType[], string>

Functions

Const categoriesSelector

  • categoriesSelector(__namedParameters: EmptyObject & Object & PersistPartial): string[]
  • Selects a list of possible categories

    Parameters

    • __namedParameters: EmptyObject & Object & PersistPartial

    Returns string[]

Const categoryMappingSelector

  • categoryMappingSelector(__namedParameters: EmptyObject & Object & PersistPartial): Record<number, string>
  • Selects the actual mapping of ID to category

    Parameters

    • __namedParameters: EmptyObject & Object & PersistPartial

    Returns Record<number, string>

Const dumpsterTypeMappingSelector

  • dumpsterTypeMappingSelector(__namedParameters: EmptyObject & Object & PersistPartial): Record<number, string>
  • Selects the actual mapping of ID to dumpster type

    Parameters

    • __namedParameters: EmptyObject & Object & PersistPartial

    Returns Record<number, string>

Const dumpsterTypesSelector

  • dumpsterTypesSelector(__namedParameters: EmptyObject & Object & PersistPartial): string[]
  • Selects a list of possible dumpster types

    Parameters

    • __namedParameters: EmptyObject & Object & PersistPartial

    Returns string[]

Const storeTypeMappingSelector

  • storeTypeMappingSelector(__namedParameters: EmptyObject & Object & PersistPartial): Record<number, string>
  • Selects the actual mapping of ID to store type

    Parameters

    • __namedParameters: EmptyObject & Object & PersistPartial

    Returns Record<number, string>

Const storeTypesSelector

  • storeTypesSelector(__namedParameters: EmptyObject & Object & PersistPartial): string[]
  • Selects a list of possible store types

    Parameters

    • __namedParameters: EmptyObject & Object & PersistPartial

    Returns string[]

Generated using TypeDoc