From 3d04033daf57f777f09a44de8450b19fb678d19d Mon Sep 17 00:00:00 2001 From: "younghoon100.park" Date: Mon, 1 Jul 2024 17:16:52 +0900 Subject: [PATCH] test, deleted system alert --- .../src/actions/commonActions.js | 48 +++++++++---------- .../src/actions/mainActions.js | 22 +-------- com.twin.app.shoptime/src/lunaSend/common.js | 15 +++--- com.twin.app.shoptime/src/utils/Config.js | 12 ++--- 4 files changed, 38 insertions(+), 59 deletions(-) diff --git a/com.twin.app.shoptime/src/actions/commonActions.js b/com.twin.app.shoptime/src/actions/commonActions.js index 38cefe87..4a4d6119 100644 --- a/com.twin.app.shoptime/src/actions/commonActions.js +++ b/com.twin.app.shoptime/src/actions/commonActions.js @@ -405,33 +405,31 @@ export const searchReservation = (chanId) => (dispatch) => { dispatch(alertToast(JSON.stringify(res))); dispatch(alertToast("searchReservation onSuccessed")); - let items = []; - res.results.forEach((item) => { - let obj = JSON.parse(item.information.information); - items.push({ - _id: item._id, - showId: obj.showId, - }); - }); + // let items = []; + // res.results.forEach((item) => { + // let obj = JSON.parse(item.information.information); + // items.push({ + // _id: item._id, + // showId: obj.showId, + // }); + // }); - let index = items.findIndex((item) => item.chanId === chanId); - let deletedIdList = []; - if (index !== -1) { - deletedIdList.push(items[index]._id); + // let index = items.findIndex((item) => item.chanId === chanId); + // let deletedIdList = []; + // if (index !== -1) { + // deletedIdList.push(items[index]._id); - dispatch( - deleteReservation(deletedIdList, { - onSuccess: (r) => { - console.log(r); - }, - onFailure: (e) => { - console.log(e); - }, - }) - ); - } - - // return deletedIdList; + // dispatch( + // deleteReservation(deletedIdList, { + // onSuccess: (r) => { + // console.log(r); + // }, + // onFailure: (e) => { + // console.log(e); + // }, + // }) + // ); + // } }, onFailure: (err) => { console.log(err); diff --git a/com.twin.app.shoptime/src/actions/mainActions.js b/com.twin.app.shoptime/src/actions/mainActions.js index aa1a83f9..38f020b2 100644 --- a/com.twin.app.shoptime/src/actions/mainActions.js +++ b/com.twin.app.shoptime/src/actions/mainActions.js @@ -111,27 +111,7 @@ export const setMainLiveUpcomingAlarm = (props) => (dispatch, getState) => { // }, // })) - dispatch( - searchReservation(chanId, { - onSuccess: (res) => { - console.log("LUNA SEND searchReservation success", res); - - // dispatch( - // deleteReservation(res, { - // onSuccess: (r) => { - // console.log(r); - // }, - // onFailure: (e) => { - // console.log(e); - // }, - // }) - // ); - }, - onFailure: (err) => { - console.log("LUNA SEND searchReservation failed", err); - }, - }) - ); + dispatch(searchReservation(chanId)); } /* ---------------------------------------------- example diff --git a/com.twin.app.shoptime/src/lunaSend/common.js b/com.twin.app.shoptime/src/lunaSend/common.js index 852ae13c..121393f6 100644 --- a/com.twin.app.shoptime/src/lunaSend/common.js +++ b/com.twin.app.shoptime/src/lunaSend/common.js @@ -1,4 +1,5 @@ import appinfo from "../../webos-meta/appinfo.json"; +import { alertToast } from "../actions/commonActions"; import LS2Request from "./LS2Request"; export const getConnectionStatus = ({ onSuccess, onFailure, onComplete }) => { @@ -271,7 +272,10 @@ export const deleteReservation = (scheduleIdList) => { }); }; -export const searchReservation = (chanId) => { +export const searchReservation = ( + chanId, + { onSuccess, onFailure, onComplete } +) => { if (typeof window === "object" && !window.PalmSystem) { console.log("LUNA SEND searchReservation chanId", chanId); return; @@ -287,11 +291,8 @@ export const searchReservation = (chanId) => { filter: [{ prop: "reserveType", op: "=", val: 6 }], // 6 LG Shopping 전용. }, }, - onSuccess: (res) => { - console.log("LUNA SEND searchReservation success", res); - }, - onFailure: (err) => { - console.log("LUNA SEND searchReservation failed", err); - }, + onSuccess, + onFailure, + onComplete, }); }; diff --git a/com.twin.app.shoptime/src/utils/Config.js b/com.twin.app.shoptime/src/utils/Config.js index 5bbf8176..589b2aa3 100644 --- a/com.twin.app.shoptime/src/utils/Config.js +++ b/com.twin.app.shoptime/src/utils/Config.js @@ -281,16 +281,16 @@ export const LOG_MENU = { DETAIL_PAGE_TRAVEL_THEME_DETAIL: "Detail Page/Travel Theme Detail", // completed DETAIL_PAGE_GROUP_DETAIL: "Detail Page/Group Detail", // completed - FULL: "Full", // pyh todo, 문의, completed - FULL_SHOP_NOW: "Full/Shop Now", // completed - FULL_YOU_MAY_LIKE: "Full/You May Like", // completed - FULL_LIVE_CHANNELS: "Full/Live Channels", // completed - FULL_FEATURED_SHOWS: "Full/Featured Shows", // completed + FULL: "Full Player/Full Player", // completed + FULL_SHOP_NOW: "Full Player/Shop Now", // completed + FULL_YOU_MAY_LIKE: "Full Player/You May Like", // completed + FULL_LIVE_CHANNELS: "Full Player/Live Channels", // completed + FULL_FEATURED_SHOWS: "Full Player/Featured Shows", // completed SHOW_ROOM_SHOP_NOW: "Showroom/Shop Now", // completed SHOW_ROOM_ROOM_THEME: "Showroom/Room Theme", // completed - CHECKOUT: "Checkout/Checkout", // pyh todo, 문의, completed + CHECKOUT: "Checkout/Checkout", // completed CHECKOUT_PIN_CODE: "Checkout/PIN Code", // completed CHECKOUT_ORDER_COMPLETE: "Checkout/Order Complete", // completed };