[FeaturedBrandsPanel] test, system alert (luna)

This commit is contained in:
younghoon100.park
2024-06-28 13:19:06 +09:00
parent a388c2593a
commit 4afb2d4a8f
4 changed files with 103 additions and 15 deletions

View File

@@ -37,10 +37,81 @@ export const getMainLiveShow = (props) => (dispatch, getState) => {
// Live 알람 설정/해제 IF-LGSP-012
export const setMainLiveUpcomingAlarm = (props) => (dispatch, getState) => {
const { alamDispFlag, endDt, patnrId, showId, strtDt } = props;
const {
alamDispFlag,
endDt,
patnrId,
patncNm,
showId,
showNm,
strtDt,
testStrtDt,
} = props;
const onSuccess = (response) => {
console.log("@@ setMainLiveUpcomingAlarm onSuccess", response.data);
console.log("setMainLiveUpcomingAlarm onSuccess", response.data);
if (alamDispFlag === "Y") {
const data = {
startTime: {
// year: new Date(strtDt).getFullYear(),
// month: new Date(strtDt).getMonth() + 1,
// day: new Date(strtDt).getDate(),
// hour: new Date(strtDt).getHours(),
// minute: new Date(strtDt).getMinutes(),
// second: new Date(strtDt).getSeconds(),
// pyh, delete test case
year: new Date(testStrtDt).getFullYear(),
month: new Date(testStrtDt).getMonth() + 1,
day: new Date(testStrtDt).getDate(),
hour: new Date(testStrtDt).getHours(),
minute: new Date(testStrtDt).getMinutes(),
second: new Date(testStrtDt).getSeconds(),
},
params: {
message: `[${patncNm}] ${showNm}\nWatch Live show now?`,
buttons: [
{
label: HelperMethods.$L("yes"),
},
{
label: HelperMethods.$L("no"),
},
],
launch: {
contentTarget: `V3_8002_Tv_FB_${patnrId}`,
},
showId: showId,
},
};
dispatch(
addReservation(data, {
onSuccess: (res) => {
console.log("LUNA SEND addReservation success", res);
},
onFailure: (err) => {
// todo pyh, add callback in case of failure
console.log("LUNA SEND addReservation failed", err);
},
})
);
}
//
else if (alamDispFlag === "N") {
dispatch(
deleteReservation(showId, {
onSuccess: (res) => {
console.log("LUNA SEND deleteReservation success", res);
},
onFailure: (err) => {
// todo pyh, add callback in case of failure
console.log("LUNA SEND deleteReservation failed", err);
},
})
);
}
/* ---------------------------------------------- example
@@ -94,7 +165,7 @@ export const setMainLiveUpcomingAlarm = (props) => (dispatch, getState) => {
};
const onFail = (error) => {
console.error("@@ setMainLiveUpcomingAlarm onFail", error);
console.error("setMainLiveUpcomingAlarm onFail", error);
};
TAxios(