[actions] brandActions.js / edited, added changeAppStatus(showLoadingPanel)

This commit is contained in:
younghoon100.park
2024-06-19 13:03:44 +09:00
parent bea6688095
commit 6c53da87dd

View File

@@ -5,8 +5,11 @@ import { changeAppStatus } from "./commonActions";
// Featured Brands 정보 조회 IF-LGSP-304
export const getBrandList = () => (dispatch, getState) => {
dispatch(changeAppStatus({ showLoadingPanel: { show: true, type: "wait" } }));
const onSuccess = (response) => {
// console.log("getBrandList onSuccess ", response.data);
dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
dispatch({
type: types.GET_BRAND_LIST,
@@ -18,6 +21,7 @@ export const getBrandList = () => (dispatch, getState) => {
const onFail = (error) => {
console.error("getBrandList onFail", error);
dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
};
TAxios(
@@ -36,8 +40,11 @@ export const getBrandList = () => (dispatch, getState) => {
export const getBrandLayoutInfo = (props) => (dispatch, getState) => {
const { patnrId } = props;
dispatch(changeAppStatus({ showLoadingPanel: { show: true, type: "wait" } }));
const onSuccess = (response) => {
// console.log("getBrandLayoutInfo onSuccess ", response.data);
dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
dispatch({
type: types.GET_BRAND_LAYOUT_INFO,
@@ -49,6 +56,7 @@ export const getBrandLayoutInfo = (props) => (dispatch, getState) => {
const onFail = (error) => {
console.error("getBrandLayoutInfo onFail ", error);
dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
};
TAxios(
@@ -132,8 +140,11 @@ export const getBrandChanInfo = (props) => (dispatch, getState) => {
export const getBrandTSVInfo = (props) => (dispatch, getState) => {
const { patnrId } = props;
dispatch(changeAppStatus({ showLoadingPanel: { show: true, type: "wait" } }));
const onSuccess = (response) => {
// console.log("getBrandTSVInfo onSuccess ", response.data);
dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
dispatch({
type: types.GET_BRAND_TSV_INFO,
@@ -145,6 +156,7 @@ export const getBrandTSVInfo = (props) => (dispatch, getState) => {
const onFail = (error) => {
console.error("getBrandTSVInfo onFail ", error);
dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
};
TAxios(
@@ -262,8 +274,11 @@ export const getBrandCreatorsInfo = (props) => (dispatch, getState) => {
export const getBrandSeriesInfo = (props) => (dispatch, getState) => {
const { patnrId, seriesId } = props;
dispatch(changeAppStatus({ showLoadingPanel: { show: true, type: "wait" } }));
const onSuccess = (response) => {
// console.log("getBrandSeriesInfo onSuccess ", response.data);
dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
dispatch({
type: types.GET_BRAND_SERIES_INFO,
@@ -275,6 +290,7 @@ export const getBrandSeriesInfo = (props) => (dispatch, getState) => {
const onFail = (error) => {
console.error("getBrandSeriesInfo onFail ", error);
dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
};
TAxios(
@@ -293,7 +309,12 @@ export const getBrandSeriesInfo = (props) => (dispatch, getState) => {
export const getBrandCategoryInfo = (props) => (dispatch, getState) => {
const { catCdLv1, catCdLv2, patnrId } = props;
dispatch(changeAppStatus({ showLoadingPanel: { show: true, type: "wait" } }));
const onSuccess = (response) => {
// console.log("getBrandCategoryInfo onSuccess ", response.data);
dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
dispatch({
type: types.GET_BRAND_CATEGORY_INFO,
payload: {
@@ -303,6 +324,7 @@ export const getBrandCategoryInfo = (props) => (dispatch, getState) => {
};
const onFail = (error) => {
dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
console.error("getBrandCategoryInfo onFail ", error);
};
@@ -352,8 +374,11 @@ export const getBrandCategoryProductInfo = (props) => (dispatch, getState) => {
export const getBrandBestSeller = (props) => (dispatch, getState) => {
const { patnrId } = props;
dispatch(changeAppStatus({ showLoadingPanel: { show: true, type: "wait" } }));
const onSuccess = (response) => {
// console.log("getBrandBestSeller onSuccess ", response.data);
dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
dispatch({
type: types.GET_BRAND_BEST_SELLER,
@@ -365,6 +390,7 @@ export const getBrandBestSeller = (props) => (dispatch, getState) => {
const onFail = (error) => {
console.error("getBrandBestSeller onFail ", error);
dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
};
TAxios(
@@ -383,8 +409,11 @@ export const getBrandBestSeller = (props) => (dispatch, getState) => {
export const getBrandShowroom = (props) => (dispatch, getState) => {
const { patnrId } = props;
dispatch(changeAppStatus({ showLoadingPanel: { show: true, type: "wait" } }));
const onSuccess = (response) => {
// console.log("getBrandShowroom onSuccess ", response.data);
dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
dispatch({
type: types.GET_BRAND_SHOWROOM,
@@ -396,6 +425,7 @@ export const getBrandShowroom = (props) => (dispatch, getState) => {
const onFail = (error) => {
console.error("getBrandShowroom onFail ", error);
dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
};
TAxios(