...
|
...
|
@@ -73,7 +73,8 @@ export default function brandReducer(state=initialState, action) { |
|
|
|
|
|
case GET_BRAND_LIST_FOR_BOY_REQUEST:
|
|
|
{
|
|
|
return state.set('isFetching', true);
|
|
|
return state.set('isFetching', true)
|
|
|
.set('listError', null);
|
|
|
}
|
|
|
case GET_BRAND_LIST_FOR_BOY_SUCCESS:
|
|
|
{
|
...
|
...
|
@@ -89,17 +90,20 @@ export default function brandReducer(state=initialState, action) { |
|
|
.setIn(['brandListForBoy', 'new_list'], Immutable.fromJS(new_list))
|
|
|
.setIn(['brandListForBoy', 'all_list_key'], Immutable.fromJS(all_list_key))
|
|
|
.setIn(['brandListForBoy', 'hasSuccess'], true)
|
|
|
.set('isFetching', false);
|
|
|
.set('isFetching', false)
|
|
|
.set('listError', null);
|
|
|
|
|
|
}
|
|
|
case GET_BRAND_LIST_FOR_BOY_FAILURE:
|
|
|
{
|
|
|
return state.setIn(['brandListForBoy', 'hasSuccess'], false)
|
|
|
.set('isFetching', false);
|
|
|
.set('isFetching', false)
|
|
|
.set('listError', action.payload);
|
|
|
}
|
|
|
case GET_BRAND_LIST_FOR_GIRL_REQUEST:
|
|
|
{
|
|
|
return state.set('isFetching', true);
|
|
|
return state.set('isFetching', true)
|
|
|
.set('listError', null);
|
|
|
}
|
|
|
case GET_BRAND_LIST_FOR_GIRL_SUCCESS:
|
|
|
{
|
...
|
...
|
@@ -115,16 +119,19 @@ export default function brandReducer(state=initialState, action) { |
|
|
.setIn(['brandListForGirl', 'new_list'], Immutable.fromJS(new_list))
|
|
|
.setIn(['brandListForGirl', 'all_list_key'], Immutable.fromJS(all_list_key))
|
|
|
.setIn(['brandListForGirl', 'hasSuccess'], true)
|
|
|
.set('isFetching', false);
|
|
|
.set('isFetching', false)
|
|
|
.set('listError', null);
|
|
|
}
|
|
|
case GET_BRAND_LIST_FOR_GIRL_FAILURE:
|
|
|
{
|
|
|
return state.setIn(['brandListForGirl', 'hasSuccess'], false)
|
|
|
.set('isFetching', false);
|
|
|
.set('isFetching', false)
|
|
|
.set('listError', action.payload);
|
|
|
}
|
|
|
case GET_BRAND_LIST_FOR_KID_REQUEST:
|
|
|
{
|
|
|
return state.set('isFetching', true);
|
|
|
return state.set('isFetching', true)
|
|
|
.set('listError', null);
|
|
|
}
|
|
|
case GET_BRAND_LIST_FOR_KID_SUCCESS:
|
|
|
{
|
...
|
...
|
@@ -140,16 +147,19 @@ export default function brandReducer(state=initialState, action) { |
|
|
.setIn(['brandListForKid', 'new_list'], Immutable.fromJS(new_list))
|
|
|
.setIn(['brandListForKid', 'all_list_key'], Immutable.fromJS(all_list_key))
|
|
|
.setIn(['brandListForKid', 'hasSuccess'], true)
|
|
|
.set('isFetching', false);
|
|
|
.set('isFetching', false)
|
|
|
.set('listError', null);
|
|
|
}
|
|
|
case GET_BRAND_LIST_FOR_KID_FAILURE:
|
|
|
{
|
|
|
return state.setIn(['brandListForKid', 'hasSuccess'], false)
|
|
|
.set('isFetching', false);
|
|
|
.set('isFetching', false)
|
|
|
.set('listError', action.payload);
|
|
|
}
|
|
|
case GET_BRAND_LIST_FOR_LIFESTYLE_REQUEST:
|
|
|
{
|
|
|
return state.set('isFetching', true);
|
|
|
return state.set('isFetching', true)
|
|
|
.set('listError', null);
|
|
|
}
|
|
|
case GET_BRAND_LIST_FOR_LIFESTYLE_SUCCESS:
|
|
|
{
|
...
|
...
|
@@ -165,16 +175,19 @@ export default function brandReducer(state=initialState, action) { |
|
|
.setIn(['brandListForLifeStyle', 'new_list'], Immutable.fromJS(new_list))
|
|
|
.setIn(['brandListForLifeStyle', 'all_list_key'], Immutable.fromJS(all_list_key))
|
|
|
.setIn(['brandListForLifeStyle', 'hasSuccess'], true)
|
|
|
.set('isFetching', false);
|
|
|
.set('isFetching', false)
|
|
|
.set('listError', null);
|
|
|
}
|
|
|
case GET_BRAND_LIST_FOR_LIFESTYLE_FAILURE:
|
|
|
{
|
|
|
return state.setIn(['brandListForLifeStyle', 'hasSuccess'], false)
|
|
|
.set('isFetching', false);
|
|
|
.set('isFetching', false)
|
|
|
.set('listError', action.payload);
|
|
|
}
|
|
|
case GET_BRAND_RESOURCE_FOR_BOY_REQUEST:
|
|
|
{
|
|
|
return state;
|
|
|
return state.set('reourceFetching', true)
|
|
|
.set('reourceError', null);
|
|
|
}
|
|
|
case GET_BRAND_RESOURCE_FOR_BOY_SUCCESS:
|
|
|
{
|
...
|
...
|
@@ -184,19 +197,24 @@ export default function brandReducer(state=initialState, action) { |
|
|
brandsText,
|
|
|
} = action.payload;
|
|
|
|
|
|
return state.setIn(['reourceForBoy', 'banner'], Immutable.fromJS(banner))
|
|
|
return state.set('reourceFetching', false)
|
|
|
.set('reourceError', null)
|
|
|
.setIn(['reourceForBoy', 'banner'], Immutable.fromJS(banner))
|
|
|
.setIn(['reourceForBoy', 'custom_brands'], Immutable.fromJS(custom_brands))
|
|
|
.setIn(['reourceForBoy', 'brandsText'], Immutable.fromJS(brandsText))
|
|
|
.setIn(['reourceForBoy', 'hasSuccess'], true);
|
|
|
}
|
|
|
case GET_BRAND_RESOURCE_FOR_BOY_FAILURE:
|
|
|
{
|
|
|
return state.setIn(['reourceForBoy', 'hasSuccess'], false);
|
|
|
return state.set('reourceFetching', false)
|
|
|
.set('reourceError', action.payload)
|
|
|
.setIn(['reourceForBoy', 'hasSuccess'], false);
|
|
|
}
|
|
|
|
|
|
case GET_BRAND_RESOURCE_FOR_GIRL_REQUEST:
|
|
|
{
|
|
|
return state;
|
|
|
return state.set('reourceFetching', true)
|
|
|
.set('reourceError', null);
|
|
|
}
|
|
|
case GET_BRAND_RESOURCE_FOR_GIRL_SUCCESS:
|
|
|
{
|
...
|
...
|
@@ -206,19 +224,24 @@ export default function brandReducer(state=initialState, action) { |
|
|
brandsText,
|
|
|
} = action.payload;
|
|
|
|
|
|
return state.setIn(['reourceForGirl', 'banner'], Immutable.fromJS(banner))
|
|
|
return state.set('reourceFetching', false)
|
|
|
.set('reourceError', null)
|
|
|
.setIn(['reourceForGirl', 'banner'], Immutable.fromJS(banner))
|
|
|
.setIn(['reourceForGirl', 'custom_brands'], Immutable.fromJS(custom_brands))
|
|
|
.setIn(['reourceForGirl', 'brandsText'], Immutable.fromJS(brandsText))
|
|
|
.setIn(['reourceForGirl', 'hasSuccess'], true);
|
|
|
}
|
|
|
case GET_BRAND_RESOURCE_FOR_GIRL_FAILURE:
|
|
|
{
|
|
|
return state.setIn(['reourceForGirl', 'hasSuccess'], false);
|
|
|
return state.set('reourceFetching', false)
|
|
|
.set('reourceError', action.payload)
|
|
|
.setIn(['reourceForGirl', 'hasSuccess'], false);
|
|
|
}
|
|
|
|
|
|
case GET_BRAND_RESOURCE_FOR_KID_REQUEST:
|
|
|
{
|
|
|
return state;
|
|
|
return state.set('reourceFetching', true)
|
|
|
.set('reourceError', null);
|
|
|
}
|
|
|
case GET_BRAND_RESOURCE_FOR_KID_SUCCESS:
|
|
|
{
|
...
|
...
|
@@ -228,19 +251,24 @@ export default function brandReducer(state=initialState, action) { |
|
|
brandsText,
|
|
|
} = action.payload;
|
|
|
|
|
|
return state.setIn(['reourceForKid', 'banner'], Immutable.fromJS(banner))
|
|
|
return state.set('reourceFetching', false)
|
|
|
.set('reourceError', null)
|
|
|
.setIn(['reourceForKid', 'banner'], Immutable.fromJS(banner))
|
|
|
.setIn(['reourceForKid', 'custom_brands'], Immutable.fromJS(custom_brands))
|
|
|
.setIn(['reourceForKid', 'brandsText'], Immutable.fromJS(brandsText))
|
|
|
.setIn(['reourceForKid', 'hasSuccess'], true);
|
|
|
}
|
|
|
case GET_BRAND_RESOURCE_FOR_KID_FAILURE:
|
|
|
{
|
|
|
return state.setIn(['reourceForKid', 'hasSuccess'], false);
|
|
|
return state.set('reourceFetching', false)
|
|
|
.set('reourceError', action.payload)
|
|
|
.setIn(['reourceForKid', 'hasSuccess'], false);
|
|
|
}
|
|
|
|
|
|
case GET_BRAND_RESOURCE_FOR_LIFESTYLE_REQUEST:
|
|
|
{
|
|
|
return state;
|
|
|
return state.set('reourceFetching', true)
|
|
|
.set('reourceError', null);
|
|
|
}
|
|
|
case GET_BRAND_RESOURCE_FOR_LIFESTYLE_SUCCESS:
|
|
|
{
|
...
|
...
|
@@ -250,14 +278,18 @@ export default function brandReducer(state=initialState, action) { |
|
|
brandsText,
|
|
|
} = action.payload;
|
|
|
|
|
|
return state.setIn(['reourceForLifeStyle', 'banner'], Immutable.fromJS(banner))
|
|
|
return state.set('reourceFetching', false)
|
|
|
.set('reourceError', null)
|
|
|
.setIn(['reourceForLifeStyle', 'banner'], Immutable.fromJS(banner))
|
|
|
.setIn(['reourceForLifeStyle', 'custom_brands'], Immutable.fromJS(custom_brands))
|
|
|
.setIn(['reourceForLifeStyle', 'brandsText'], Immutable.fromJS(brandsText))
|
|
|
.setIn(['reourceForLifeStyle', 'hasSuccess'], true);
|
|
|
}
|
|
|
case GET_BRAND_RESOURCE_FOR_LIFESTYLE_FAILURE:
|
|
|
{
|
|
|
return state.setIn(['reourceForLifeStyle', 'hasSuccess'], false);
|
|
|
return state.set('reourceFetching', false)
|
|
|
.set('reourceError', action.payload)
|
|
|
.setIn(['reourceForLifeStyle', 'hasSuccess'], false);
|
|
|
}
|
|
|
|
|
|
case BRAND_SHOW_SEARCH: {
|
...
|
...
|
|