[SHOPTIME-3563] Q-Event/System Alarm 연동 (test)

변경 파일:
1. mainActions.js
2. helperMethods.js

변경 내용:
1. setMainLiveUpcomingAlarm 함수, onSuccess, startTime 수정
2. parseDateTime 함수 추가
This commit is contained in:
younghoon100.park
2024-09-10 16:08:30 +09:00
parent 4702bddd94
commit 93129b1e41
2 changed files with 25 additions and 9 deletions

View File

@@ -1,6 +1,5 @@
import { URLS } from "../api/apiConfig";
import { TAxios } from "../api/TAxios";
import { convertUtcToLocal } from "../components/MediaPlayer/util";
import { CATEGORY_DATA_MAX_RESULTS_LIMIT } from "../utils/Config";
import * as HelperMethods from "../utils/helperMethods";
import { types } from "./actionTypes";
@@ -47,10 +46,9 @@ export const setMainLiveUpcomingAlarm = (props) => (dispatch, getState) => {
showId,
showNm,
strtDt,
testStrtDt,
} = props;
const convertedStrtDt = convertUtcToLocal(strtDt);
const parseStrtDt = HelperMethods.parseDateTime(strtDt);
const onSuccess = (response) => {
console.log("setMainLiveUpcomingAlarm onSuccess", response.data);
@@ -58,12 +56,12 @@ export const setMainLiveUpcomingAlarm = (props) => (dispatch, getState) => {
if (alamDispFlag === "Y") {
const data = {
startTime: {
year: new Date(convertedStrtDt).getFullYear(),
month: new Date(convertedStrtDt).getMonth() + 1,
day: new Date(convertedStrtDt).getDate(),
hour: new Date(convertedStrtDt).getHours(),
minute: new Date(convertedStrtDt).getMinutes(),
second: new Date(convertedStrtDt).getSeconds(),
year: parseStrtDt.year,
month: parseStrtDt.month,
day: parseStrtDt.day,
hour: parseStrtDt.hour,
minute: parseStrtDt.minute,
second: parseStrtDt.second,
},
params: {
message: `[${patncNm}] ${showNm}\n${HelperMethods.$L("Watch Now!")}`,