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AGA,GACI7I,IAAmB4B,EAAAA,GAA0BgD,uBAC7CtE,EACF,CACE,MAAMgE,GAAe7C,EAAAA,EAAAA,IAAad,GAC5BO,GAAa2D,EAAAA,EAAAA,GACflE,EACAL,GAEEQ,EAAWS,MAAQqH,QAAQrH,IAAM+C,IAEvC,MAAO,CAAEA,eAAcpD,aAAYF,WADhBO,MAAQqH,QAAQrH,IAAML,IACMJ,WAAU+H,uBAAuB,EACpF,CAEA,MAAO,CAAE/H,UAAU,EAAME,YAAY,EAAO6H,uBAAuB,EACvE,CAEO,MAAMrG,EAAoB,CAC7BQ,SAAU,WACVP,kBAAmB,oBACnBQ,QAAS,U,8EC7DE,SAAS0B,EAA2BmE,EAAeC,GAC9D,MAAMC,GAAevH,EAAAA,EAAAA,IAAaqH,GAQlC,OAPmBvH,IAAMyH,GACpBC,IAAIF,EAAY,OAChBG,KAAK,IACLC,OAAO,IACPC,OAAO,IACPC,YAAY,KACZC,SAET,CAEO,SAASzE,EAAgCiE,EAAeS,GAE3D,MAAMP,GAAevH,EAAAA,EAAAA,IAAaqH,GASlC,OARmBvH,IAAMyH,GACpBC,IAAIM,EAAc,SAClBL,KAAK,IACLC,OAAO,IACPC,OAAO,IACPC,YAAY,KACZG,MAAM,SACNF,SAET,C","sources":["client/components/Result/prizeList/sortPrizeList.js","client/components/Result/prizeList/PrizeRedeemStatusLabel.js","client/components/Result/prizeList/PrizeRedeemDeadline.js","client/components/Result/prizeList/PrizeListItem.js","client/components/Result/prizeList/PrizeList.js","client/components/Result/prizeList/ScrollerFixedHeader.js","client/components/Result/prizeList/getPrizeRedeemStatus.js","client/utils/getPrizeRedeemWithinEndUtc.js"],"sourcesContent":["import dayjs from 'dayjs';\n\nimport { utcDTStr2UTC } from 'utils/dateTime';\nimport { prizeRedeemDateLimitTypes } from 'config/promoPrizeTypes';\nimport {\n getPrizeRedeemExpiredInfo,\n prizeStatusLabels\n} from 'client/components/Result/prizeList/getPrizeRedeemStatus';\n\nexport default function sortPrizes(items = []) {\n const categories = categorizePrize(items);\n return sortAllCategoriesAndMerge(categories);\n}\n\nfunction categorizePrize(items) {\n const categories = items.reduce(\n (obj, item) => {\n const {\n prizeSettings: {\n redeemTimeType,\n fillFormEndDate,\n redeemStartDate,\n redeemEndDate,\n redeemWithinDays,\n redeemWithinDateTime,\n redeemWithinMonthsLastDay,\n formId\n } = {},\n winnerStatus: { formAwardee, redeemed } = {},\n winnerCreatedAt\n } = item;\n const hasNotFillForm = Boolean(formId) && !formAwardee;\n const {\n hasStart: hasRedeemStart,\n hasExpired: hasRedeemExpired,\n endDateUtc: redeemEndDateUTC\n } = getPrizeRedeemExpiredInfo({\n redeemTimeType,\n redeemStartDate,\n redeemEndDate,\n redeemWithinDays,\n redeemWithinDateTime,\n redeemWithinMonthsLastDay,\n winnerCreatedAt\n });\n\n if (redeemed) {\n obj.redeemed.push(item);\n } else if (hasRedeemExpired) {\n obj.expired.push(item);\n } else if (hasNotFillForm) {\n if (!fillFormEndDate) {\n obj.notFillForm.push(item);\n } else {\n const hasFillFormDateAvailable = dayjs().isBefore(\n dayjs(utcDTStr2UTC(fillFormEndDate))\n );\n if (hasFillFormDateAvailable) {\n obj.notFillFormWithDateLimit.push(item);\n } else {\n obj.expired.push(item);\n }\n }\n } else if (redeemTimeType === prizeRedeemDateLimitTypes.NO_LIMIT) {\n obj.general.push(item);\n } else {\n const newItem = {\n ...item,\n redeemEndDateUTC\n };\n if (!hasRedeemStart) {\n obj.redeemableWithDateLimitHasNotStart.push(newItem);\n } else {\n obj.redeemableWithDateLimit.push(newItem);\n }\n }\n return obj;\n },\n {\n notFillFormWithDateLimit: [],\n notFillForm: [],\n redeemableWithDateLimit: [],\n redeemableWithDateLimitHasNotStart: [],\n general: [],\n redeemed: [],\n expired: []\n }\n );\n return categories;\n}\nfunction sortAllCategoriesAndMerge({\n notFillFormWithDateLimit = [],\n notFillForm = [],\n redeemableWithDateLimit = [],\n redeemableWithDateLimitHasNotStart = [],\n general = [],\n redeemed = [],\n expired = []\n} = {}) {\n notFillFormWithDateLimit = notFillFormWithDateLimit.map(item => ({\n ...item,\n statusLabel: prizeStatusLabels.HAS_NOT_FILL_FORM\n }));\n notFillFormWithDateLimit.sort((a, b) => {\n const aEndDate = a.prizeSettings.fillFormEndDate;\n const bEndDate = b.prizeSettings.fillFormEndDate;\n if (aEndDate === bEndDate) {\n return b.entryId - a.entryId;\n } else {\n return aEndDate < bEndDate ? -1 : 1;\n }\n });\n notFillForm = notFillForm.map(item => ({\n ...item,\n statusLabel: prizeStatusLabels.HAS_NOT_FILL_FORM\n }));\n notFillForm.sort((a, b) => b.entryId - a.entryId);\n redeemableWithDateLimit.sort((a, b) => a.redeemEndDateUTC - b.redeemEndDateUTC);\n redeemableWithDateLimitHasNotStart.sort((a, b) => a.redeemEndDateUTC - b.redeemEndDateUTC);\n general.sort((a, b) => b.entryId - a.entryId);\n redeemed = redeemed.map(item => ({\n ...item,\n statusLabel: prizeStatusLabels.REDEEMED\n }));\n redeemed.sort((a, b) => b.entryId - a.entryId);\n expired = expired.map(item => ({\n ...item,\n statusLabel: prizeStatusLabels.EXPIRED\n }));\n expired.sort((a, b) => b.entryId - a.entryId);\n\n return [\n ...notFillFormWithDateLimit,\n ...notFillForm,\n ...redeemableWithDateLimit,\n ...redeemableWithDateLimitHasNotStart,\n ...general,\n ...redeemed,\n ...expired\n ];\n}\n","import React from 'react';\nimport i18n from 'i18next';\nimport { css } from '@emotion/core';\n\nimport { error, system400 } from 'Mui/styles/color';\nimport { prizeStatusLabels } from 'client/components/Result/prizeList/getPrizeRedeemStatus';\n\nfunction PrizeRedeemStatusLabel({ status }) {\n switch (status) {\n case prizeStatusLabels.EXPIRED:\n return {i18n.t('label.redeem_expired')};\n case prizeStatusLabels.HAS_NOT_FILL_FORM:\n return {i18n.t('label.not_fill_form')};\n case prizeStatusLabels.REDEEMED:\n return {i18n.t('label.prize_redeemed')};\n default:\n return null;\n }\n}\n\nexport default PrizeRedeemStatusLabel;\n\nconst labelStyle = css`\n font-size: 12px;\n font-weight: 500;\n background-color: ${system400.color};\n color: #fff;\n border-radius: 4px;\n z-index: 2;\n position: absolute;\n right: 8px;\n bottom: 6px;\n padding: 4px 6px;\n`;\n\nconst alertColorStyle = css`\n background-color: ${error.color};\n`;\n","import React from 'react';\nimport i18n from 'i18next';\nimport dayjs from 'dayjs';\nimport { css } from '@emotion/core';\nimport Typography from '@material-ui/core/Typography';\n\nimport { utcDTStr2UTC, utcDTStr2LocalDTStr } from 'utils/dateTime';\nimport { error } from 'Mui/styles/color';\nimport { prizeRedeemDateLimitTypes } from 'config/promoPrizeTypes';\nimport getPrizeRedeemWithinEndUtc, {\n getPrizeRedeemWithinMonthEndUtc\n} from 'client/utils/getPrizeRedeemWithinEndUtc';\n\nfunction PrizeRedeemDeadline({\n style,\n hasEnableRedeemForm,\n hasFillRedeemForm,\n fillFormEndDate,\n redeemTimeType,\n redeemStartDate,\n redeemEndDate,\n redeemWithinDateTime,\n redeemWithinMonthsLastDay,\n winnerCreatedAt,\n redeemWithinDays\n}) {\n if (hasEnableRedeemForm && !hasFillRedeemForm) {\n return !fillFormEndDate ? null : (\n