@@ -42,7 +42,6 @@ export const handleServerBoardAction =
4242 } ) =>
4343 async ( dispatch , getState ) => {
4444 const { data, renderMode, filterSearchMap } = params ;
45-
4645 const dashboard = getDashBoardByResBoard ( data ) ;
4746 const { datacharts, views : serverViews , widgets : serverWidgets } = data ;
4847
@@ -53,30 +52,34 @@ export const handleServerBoardAction =
5352 dataCharts ,
5453 filterSearchMap ,
5554 ) ;
56-
5755 const widgetIds = Object . values ( widgetMap ) . map ( w => w . id ) ;
58- //
5956 let boardInfo = getInitBoardInfo ( {
6057 id : dashboard . id ,
6158 widgetIds,
6259 controllerWidgets,
6360 } ) ;
64-
6561 if ( renderMode === 'schedule' ) {
6662 boardInfo = getScheduleBoardInfo ( boardInfo , widgetMap ) ;
6763 }
64+ const widgetInfoMap = getWidgetInfoMapByServer ( widgetMap ) ;
6865
6966 const allDataCharts : DataChart [ ] = dataCharts . concat ( wrappedDataCharts ) ;
67+
7068 const viewViews = getChartDataView ( serverViews , allDataCharts ) ;
71- const widgetInfoMap = getWidgetInfoMapByServer ( widgetMap ) ;
72- dispatch (
73- boardActions . setBoardDetailToState ( {
69+
70+ await dispatch (
71+ boardActions . setBoardState ( {
7472 board : dashboard ,
7573 boardInfo : boardInfo ,
76- views : viewViews ,
74+ } ) ,
75+ ) ;
76+ dispatch ( boardActions . setViewMap ( viewViews ) ) ;
77+ dispatch ( boardActions . setDataChartToMap ( allDataCharts ) ) ;
78+ dispatch (
79+ boardActions . setWidgetMapState ( {
80+ boardId : dashboard . id ,
7781 widgetMap : widgetMap ,
7882 widgetInfoMap : widgetInfoMap ,
79- dataCharts : allDataCharts ,
8083 } ) ,
8184 ) ;
8285 } ;
0 commit comments