test, deleted system alert
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user