@@ -195,21 +195,19 @@ const updateDealStage = async (
195
195
} else {
196
196
// moving deal across columns
197
197
// Fetch all the deals in both stages (because the list may be filtered, but we need to update even non-filtered deals)
198
- const [
199
- { data : sourceDeals } ,
200
- { data : destinationDeals } ,
201
- ] = await Promise . all ( [
202
- dataProvider . getList ( 'deals' , {
203
- sort : { field : 'index' , order : 'ASC' } ,
204
- pagination : { page : 1 , perPage : 100 } ,
205
- filter : { stage : source . stage } ,
206
- } ) ,
207
- dataProvider . getList ( 'deals' , {
208
- sort : { field : 'index' , order : 'ASC' } ,
209
- pagination : { page : 1 , perPage : 100 } ,
210
- filter : { stage : destination . stage } ,
211
- } ) ,
212
- ] ) ;
198
+ const [ { data : sourceDeals } , { data : destinationDeals } ] =
199
+ await Promise . all ( [
200
+ dataProvider . getList ( 'deals' , {
201
+ sort : { field : 'index' , order : 'ASC' } ,
202
+ pagination : { page : 1 , perPage : 100 } ,
203
+ filter : { stage : source . stage } ,
204
+ } ) ,
205
+ dataProvider . getList ( 'deals' , {
206
+ sort : { field : 'index' , order : 'ASC' } ,
207
+ pagination : { page : 1 , perPage : 100 } ,
208
+ filter : { stage : destination . stage } ,
209
+ } ) ,
210
+ ] ) ;
213
211
const destinationIndex =
214
212
destination . index ?? destinationDeals . length + 1 ;
215
213
0 commit comments