[SHOPTIME-3563] Q-Event/System Alarm 연동
변경 파일: 1. mainActions.js 2. helperMethods.js 3. LiveVideoCard.jsx 4. NoLiveCard.jsx 5. UpComingCard.jsx 6. OrderListCardTopContents.jsx 7. ReminderCard.jsx 변경 내용: 1. setMainLiveUpcomingAlarm 함수, onSuccess 함수 안에 lunasend params 변경 2. parseDateTime 함수 삭제 3, 4, 5, 6, 7. server time → system time 반영
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
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";
|
||||
@@ -48,20 +49,20 @@ export const setMainLiveUpcomingAlarm = (props) => (dispatch, getState) => {
|
||||
strtDt,
|
||||
} = props;
|
||||
|
||||
const parseStrtDt = HelperMethods.parseDateTime(strtDt);
|
||||
|
||||
const onSuccess = (response) => {
|
||||
console.log("setMainLiveUpcomingAlarm onSuccess", response.data);
|
||||
|
||||
if (alamDispFlag === "Y") {
|
||||
const convertedStrtDt = convertUtcToLocal(strtDt);
|
||||
|
||||
const data = {
|
||||
startTime: {
|
||||
year: parseStrtDt.year,
|
||||
month: parseStrtDt.month,
|
||||
day: parseStrtDt.day,
|
||||
hour: parseStrtDt.hour,
|
||||
minute: parseStrtDt.minute,
|
||||
second: parseStrtDt.second,
|
||||
year: convertedStrtDt.getFullYear(),
|
||||
month: convertedStrtDt.getMonth() + 1,
|
||||
day: convertedStrtDt.getDate(),
|
||||
hour: convertedStrtDt.getHours(),
|
||||
minute: convertedStrtDt.getMinutes(),
|
||||
second: convertedStrtDt.getSeconds(),
|
||||
},
|
||||
params: {
|
||||
message: `[${patncNm}] ${showNm}\n${HelperMethods.$L("Watch Now!")}`,
|
||||
|
||||
@@ -482,21 +482,3 @@ export const parseLocalizedNumber = (numberString, countryCode) => {
|
||||
|
||||
return parseFloat(numberString);
|
||||
};
|
||||
|
||||
export const parseDateTime = (dateTimeStr) => {
|
||||
const dateTimePattern = /(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})/;
|
||||
const matches = dateTimeStr.match(dateTimePattern);
|
||||
|
||||
if (matches) {
|
||||
const [_, year, month, day, hour, minute, second] = matches.map(Number);
|
||||
|
||||
return {
|
||||
year: year,
|
||||
month: month,
|
||||
day: day,
|
||||
hour: hour,
|
||||
minute: minute,
|
||||
second: second,
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
@@ -6,6 +6,7 @@ import Spottable from "@enact/spotlight/Spottable";
|
||||
|
||||
import ImgLiveShow from "../../../../../../assets/images/tag/tag-liveshow.png";
|
||||
import CustomImage from "../../../../../components/CustomImage/CustomImage";
|
||||
import { convertUtcToLocal } from "../../../../../components/MediaPlayer/util";
|
||||
import { convertToTimeFormat } from "../../../../../utils/helperMethods";
|
||||
import css from "./LiveVideoCard.module.less";
|
||||
|
||||
@@ -80,7 +81,8 @@ export default memo(function LiveVideoCard({
|
||||
<CustomImage src={ImgLiveShow} alt="Live Icon" />
|
||||
<h3>{showNm.replace(/<br\s*\/?>/gi, " ")}</h3>
|
||||
<time>
|
||||
{convertToTimeFormat(strtDt)} ~ {convertToTimeFormat(endDt)}
|
||||
{convertToTimeFormat(convertUtcToLocal(strtDt))} ~{" "}
|
||||
{convertToTimeFormat(convertUtcToLocal(endDt))}
|
||||
</time>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ import { setMainLiveUpcomingAlarm } from "../../../../../actions/mainActions";
|
||||
import { getMyUpcomingAlertShow } from "../../../../../actions/myPageActions";
|
||||
import { updatePanel } from "../../../../../actions/panelActions";
|
||||
import { startVideoPlayer } from "../../../../../actions/playActions";
|
||||
import { convertUtcToLocal } from "../../../../../components/MediaPlayer/util";
|
||||
import TButton from "../../../../../components/TButton/TButton";
|
||||
import { ACTIVE_POPUP, panel_names } from "../../../../../utils/Config";
|
||||
import { $L, convertToTimeFormat } from "../../../../../utils/helperMethods";
|
||||
@@ -241,7 +242,7 @@ export default memo(function NoLiveCard({
|
||||
src={isReserved ? IcUpcomingsReserved : IcUpcomingsNormal}
|
||||
alt=""
|
||||
/>
|
||||
<time>{convertToTimeFormat(strtDt, true)}</time>
|
||||
<time>{convertToTimeFormat(convertUtcToLocal(strtDt), true)}</time>
|
||||
<div className={css.sectionSubTitle}>{showNm}</div>
|
||||
<p>{hstNm ? $L(STRING_CONF.WITH_HOST) + " " + hstNm : ""}</p>
|
||||
<div>
|
||||
|
||||
@@ -6,6 +6,7 @@ import Spottable from "@enact/spotlight/Spottable";
|
||||
|
||||
import IcUpcomingsNormal from "../../../../../../assets/images/badge/ic-upcomings-nor@3x.png";
|
||||
import IcUpcomingsReserved from "../../../../../../assets/images/badge/ic-upcomings-sel@3x.png";
|
||||
import { convertUtcToLocal } from "../../../../../components/MediaPlayer/util";
|
||||
import { $L, convertToTimeFormat } from "../../../../../utils/helperMethods";
|
||||
import css from "./UpComingCard.module.less";
|
||||
|
||||
@@ -62,7 +63,11 @@ export default memo(function UpComingCard({
|
||||
|
||||
const hstNmText = hstNm ? hstNm : "";
|
||||
const ariaLabel =
|
||||
`${convertToTimeFormat(strtDt, true)}` + " " + showNm + " " + hstNmText;
|
||||
`${convertToTimeFormat(convertUtcToLocal(strtDt), true)}` +
|
||||
" " +
|
||||
showNm +
|
||||
" " +
|
||||
hstNmText;
|
||||
return (
|
||||
<SpottableComponent
|
||||
className={classNames(css.card, isReserved && css.reserved)}
|
||||
@@ -82,7 +87,7 @@ export default memo(function UpComingCard({
|
||||
</div>
|
||||
)}
|
||||
|
||||
<time>{convertToTimeFormat(strtDt, true)}</time>
|
||||
<time>{convertToTimeFormat(convertUtcToLocal(strtDt), true)}</time>
|
||||
<h3>{showNm}</h3>
|
||||
{hstNm && <p>{$L(STRING_CONF.WITH_HOST) + " " + hstNm}</p>}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ import React, { memo } from "react";
|
||||
|
||||
import { useSelector } from "react-redux";
|
||||
|
||||
import { convertUtcToLocal } from "../../../../../components/MediaPlayer/util";
|
||||
import {
|
||||
$L,
|
||||
convertToTimeFormat,
|
||||
@@ -32,7 +33,9 @@ export default memo(function OrderListCardTopContents({ paymentInfo }) {
|
||||
{cardKnd} / {getFormattingCardNo(cardNo)}
|
||||
</span>
|
||||
<p className={css.leftTitle}>{$L("ORDER DATE")}</p>
|
||||
<span className={css.leftDesc}>{convertToTimeFormat(regDt, true)}</span>
|
||||
<span className={css.leftDesc}>
|
||||
{convertToTimeFormat(convertUtcToLocal(regDt), true)}
|
||||
</span>
|
||||
</div>
|
||||
<table className={css.table}>
|
||||
<thead>
|
||||
|
||||
@@ -1,21 +1,16 @@
|
||||
import React, {
|
||||
memo,
|
||||
useCallback,
|
||||
useEffect,
|
||||
useState,
|
||||
} from 'react';
|
||||
import React, { memo, useCallback, useEffect, useState } from "react";
|
||||
|
||||
import classNames from 'classnames';
|
||||
import classNames from "classnames";
|
||||
|
||||
import Spotlight from '@enact/spotlight';
|
||||
import Spottable from '@enact/spotlight/Spottable';
|
||||
import Spotlight from "@enact/spotlight";
|
||||
import Spottable from "@enact/spotlight/Spottable";
|
||||
|
||||
import CustomImage from '../../../../components/CustomImage/CustomImage';
|
||||
import { convertUtcToLocal } from '../../../../components/MediaPlayer/util';
|
||||
import TCheckBox from '../../../../components/TCheckBox/TCheckBox';
|
||||
import * as HelperMethods from '../../../../utils/helperMethods';
|
||||
import { $L } from '../../../../utils/helperMethods';
|
||||
import css from './RemindersCard.module.less';
|
||||
import CustomImage from "../../../../components/CustomImage/CustomImage";
|
||||
import { convertUtcToLocal } from "../../../../components/MediaPlayer/util";
|
||||
import TCheckBox from "../../../../components/TCheckBox/TCheckBox";
|
||||
import * as HelperMethods from "../../../../utils/helperMethods";
|
||||
import { $L } from "../../../../utils/helperMethods";
|
||||
import css from "./RemindersCard.module.less";
|
||||
|
||||
const RemindersItem = Spottable("div");
|
||||
|
||||
@@ -73,7 +68,7 @@ export default memo(function RemindersCard({
|
||||
|
||||
const hostText = hstNm !== null && hstNm !== "" ? hstNm : "";
|
||||
const ariaLabel =
|
||||
HelperMethods.convertToTimeFormat(strtDt, true) +
|
||||
HelperMethods.convertToTimeFormat(convertUtcToLocal(strtDt), true) +
|
||||
`, "` +
|
||||
showNm +
|
||||
`", ` +
|
||||
@@ -161,7 +156,10 @@ export default memo(function RemindersCard({
|
||||
{!liveTime ? (
|
||||
<>
|
||||
<p className={css.strtDt}>
|
||||
{HelperMethods.convertToTimeFormat(strtDt, true)}
|
||||
{HelperMethods.convertToTimeFormat(
|
||||
convertUtcToLocal(strtDt),
|
||||
true
|
||||
)}
|
||||
</p>
|
||||
<h2 className={css.showNm}>{showNm}</h2>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user