[FeaturedBrandsPanel] test, system alert (luna)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { URLS } from "../api/apiConfig";
|
||||
import { TAxios } from "../api/TAxios";
|
||||
import { searchReservation } from "../lunaSend";
|
||||
import { CATEGORY_DATA_MAX_RESULTS_LIMIT } from "../utils/Config";
|
||||
import * as HelperMethods from "../utils/helperMethods";
|
||||
import { types } from "./actionTypes";
|
||||
@@ -92,7 +93,6 @@ export const setMainLiveUpcomingAlarm = (props) => (dispatch, getState) => {
|
||||
console.log("LUNA SEND addReservation success", res);
|
||||
},
|
||||
onFailure: (err) => {
|
||||
// todo pyh, add callback in case of failure
|
||||
console.log("LUNA SEND addReservation failed", err);
|
||||
},
|
||||
})
|
||||
@@ -100,17 +100,30 @@ export const setMainLiveUpcomingAlarm = (props) => (dispatch, getState) => {
|
||||
}
|
||||
//
|
||||
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);
|
||||
},
|
||||
})
|
||||
);
|
||||
dispatch(searchReservation(), {
|
||||
onSuccess: (res) => {
|
||||
console.log("LUNA SEND searchReservation success", res);
|
||||
|
||||
let index = res.findIndex((item) => (item.showId = showId));
|
||||
let deletedIdList = [];
|
||||
|
||||
if (index !== -1) {
|
||||
deletedIdList.push(res[index]._id);
|
||||
|
||||
dispatch(deleteReservation(deletedIdList), {
|
||||
onSuccess: (res) => {
|
||||
console.log("LUNA SEND deleteReservation success", res);
|
||||
},
|
||||
onFailure: (err) => {
|
||||
console.log("LUNA SEND deleteReservation failed", err);
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
onFailure: (err) => {
|
||||
console.log("LUNA SEND searchReservation failed", err);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/* ---------------------------------------------- example
|
||||
|
||||
Reference in New Issue
Block a user