Revize aac857cf
Přidáno uživatelem Fantič před více než 1 rok
src/stores/reducers/planSlice.ts | ||
---|---|---|
1 | 1 |
import { PayloadAction, createSlice } from "@reduxjs/toolkit" |
2 | 2 |
import { PlanViewState } from "../../types/plan"; |
3 |
import { getFloorList, getPlanInventories, getPlanItems } from "../actions/planThunks"; |
|
3 |
import { getFloorList, getPlanFloorImage, getPlanInventories, getPlanItems } from "../actions/planThunks";
|
|
4 | 4 |
|
5 | 5 |
const initialState: PlanViewState = { |
6 | 6 |
lastError: "", |
... | ... | |
96 | 96 |
state.itemInventoriesLoading = false; |
97 | 97 |
state.lastError = action.error.message |
98 | 98 |
}) |
99 |
|
|
100 |
// getPlanFloorImage |
|
101 |
builder.addCase(getPlanFloorImage.fulfilled, (state, action) => { |
|
102 |
state.mapImage = action.payload |
|
103 |
state.mapImageLoading = false |
|
104 |
}) |
|
105 |
builder.addCase(getPlanFloorImage.pending, (state, action) => { |
|
106 |
state.mapImageLoading = true |
|
107 |
}) |
|
108 |
builder.addCase(getPlanFloorImage.rejected, (state, action) => { |
|
109 |
state.mapImageLoading = false; |
|
110 |
state.lastError = action.error.message |
|
111 |
}) |
|
99 | 112 |
} |
100 | 113 |
}) |
101 | 114 |
|
Také k dispozici: Unified diff
re #10871: PlanViewPage: CastlePlanView init : get map image