|
@@ -45,6 +45,7 @@ export default function CircadianDetailPopup(props: { record: any, schedule?: an
|
|
|
}, [])
|
|
}, [])
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
|
|
|
+ debugger
|
|
|
checkTimezone()
|
|
checkTimezone()
|
|
|
// var current_record = props.record
|
|
// var current_record = props.record
|
|
|
if (detail.fast)
|
|
if (detail.fast)
|
|
@@ -55,12 +56,14 @@ export default function CircadianDetailPopup(props: { record: any, schedule?: an
|
|
|
}, [detail])
|
|
}, [detail])
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
|
|
|
+ debugger
|
|
|
setDetail(JSON.parse(JSON.stringify(props.record)))
|
|
setDetail(JSON.parse(JSON.stringify(props.record)))
|
|
|
}, [props.record])
|
|
}, [props.record])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function checkTimezone() {
|
|
function checkTimezone() {
|
|
|
|
|
+ debugger
|
|
|
var split = new Date().toString().split(' ');
|
|
var split = new Date().toString().split(' ');
|
|
|
var currentTZ = split[split.length - 2];
|
|
var currentTZ = split[split.length - 2];
|
|
|
var isDiff = false;
|
|
var isDiff = false;
|
|
@@ -156,16 +159,47 @@ export default function CircadianDetailPopup(props: { record: any, schedule?: an
|
|
|
var start, end;
|
|
var start, end;
|
|
|
switch (index) {
|
|
switch (index) {
|
|
|
case 0:
|
|
case 0:
|
|
|
- start = props.record.fast.real_start_time
|
|
|
|
|
- end = props.record.sleep.real_start_time
|
|
|
|
|
|
|
+ if (props.record.status == 'WAIT_FOR_START') {
|
|
|
|
|
+ start = props.record.fast.target_start_time
|
|
|
|
|
+ end = props.record.sleep.target_start_time
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (props.record.status == 'ONGOING1') {
|
|
|
|
|
+ return TimeFormatter.countdown(props.record.fast.real_start_time)
|
|
|
|
|
+ }
|
|
|
|
|
+ else {
|
|
|
|
|
+ start = props.record.fast.real_start_time
|
|
|
|
|
+ end = props.record.sleep.real_start_time
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
break
|
|
break
|
|
|
case 1:
|
|
case 1:
|
|
|
- start = props.record.sleep.real_start_time
|
|
|
|
|
- end = props.record.sleep.real_end_time
|
|
|
|
|
|
|
+ if (props.record.status == 'WAIT_FOR_START' ||
|
|
|
|
|
+ props.record.status == 'ONGOING1') {
|
|
|
|
|
+ start = props.record.sleep.target_start_time
|
|
|
|
|
+ end = props.record.sleep.target_end_time
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (props.record.status == 'ONGOING2') {
|
|
|
|
|
+ return TimeFormatter.countdown(props.record.sleep.real_start_time)
|
|
|
|
|
+ }
|
|
|
|
|
+ else {
|
|
|
|
|
+ start = props.record.sleep.real_start_time
|
|
|
|
|
+ end = props.record.sleep.real_end_time
|
|
|
|
|
+ }
|
|
|
break
|
|
break
|
|
|
case 2:
|
|
case 2:
|
|
|
- start = props.record.sleep.real_end_time
|
|
|
|
|
- end = props.record.fast.real_end_time
|
|
|
|
|
|
|
+ if (props.record.status == 'WAIT_FOR_START' ||
|
|
|
|
|
+ props.record.status == 'ONGOING1' ||
|
|
|
|
|
+ props.record.status == 'ONGOING2') {
|
|
|
|
|
+ start = props.record.sleep.target_end_time
|
|
|
|
|
+ end = props.record.fast.target_end_time
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (props.record.status == 'ONGOING3'){
|
|
|
|
|
+ return TimeFormatter.countdown(props.record.sleep.real_end_time)
|
|
|
|
|
+ }
|
|
|
|
|
+ else {
|
|
|
|
|
+ start = props.record.sleep.real_end_time
|
|
|
|
|
+ end = props.record.fast.real_end_time
|
|
|
|
|
+ }
|
|
|
break
|
|
break
|
|
|
case 3:
|
|
case 3:
|
|
|
start = props.record.fast.real_start_time
|
|
start = props.record.fast.real_start_time
|
|
@@ -185,7 +219,7 @@ export default function CircadianDetailPopup(props: { record: any, schedule?: an
|
|
|
end = props.record.sleep.real_end_time
|
|
end = props.record.sleep.real_end_time
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
- return TimeFormatter.durationFormate(start, end)
|
|
|
|
|
|
|
+ return TimeFormatter.durationFormate2(start, end)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function completedOverView() {
|
|
function completedOverView() {
|
|
@@ -375,8 +409,8 @@ export default function CircadianDetailPopup(props: { record: any, schedule?: an
|
|
|
if (props.record.fast.status == 'WAIT_FOR_START') {
|
|
if (props.record.fast.status == 'WAIT_FOR_START') {
|
|
|
return <View className='pop_ring_bg pop_overview_bg'>
|
|
return <View className='pop_ring_bg pop_overview_bg'>
|
|
|
<Text className='pop_duration_title'>{t('feature.track_time_duration.record_fast_sleep.item.fast')}</Text>
|
|
<Text className='pop_duration_title'>{t('feature.track_time_duration.record_fast_sleep.item.fast')}</Text>
|
|
|
- <View style={{ flexDirection: 'row', alignItems: 'center', marginTop: rpxToPx(8), display: 'flex', width: '100%' }}>
|
|
|
|
|
- <Text onClick={() => tapDuration(true)} className='pop_duration_txt' style={{ color: ColorType.fast }}>{TimeFormatter.durationFormate(detail.fast.target_start_time, detail.fast.target_end_time)}</Text>
|
|
|
|
|
|
|
+ <View onClick={() => tapDuration(true)} style={{ flexDirection: 'row', alignItems: 'center', marginTop: rpxToPx(8), display: 'flex', width: '100%' }}>
|
|
|
|
|
+ <Text className='pop_duration_txt' style={{ color: ColorType.fast }}>{TimeFormatter.durationFormate(detail.fast.target_start_time, detail.fast.target_end_time)}</Text>
|
|
|
<View onClick={() => tapMinus(true)} className='minus' style={{ backgroundColor: ColorType.fast, opacity: 0.6 }}><IconMinus color='#090909' /></View>
|
|
<View onClick={() => tapMinus(true)} className='minus' style={{ backgroundColor: ColorType.fast, opacity: 0.6 }}><IconMinus color='#090909' /></View>
|
|
|
<View onClick={() => tapPlus(true)} className='plus' style={{ backgroundColor: ColorType.fast }}><IconPlus color='#090909' /></View>
|
|
<View onClick={() => tapPlus(true)} className='plus' style={{ backgroundColor: ColorType.fast }}><IconPlus color='#090909' /></View>
|
|
|
</View>
|
|
</View>
|
|
@@ -385,8 +419,8 @@ export default function CircadianDetailPopup(props: { record: any, schedule?: an
|
|
|
else if (props.record.status != 'COMPLETED') {
|
|
else if (props.record.status != 'COMPLETED') {
|
|
|
return <View className='pop_ring_bg pop_overview_bg'>
|
|
return <View className='pop_ring_bg pop_overview_bg'>
|
|
|
<Text className='pop_duration_title'>{t('feature.track_time_duration.record_fast_sleep.item.fast')}</Text>
|
|
<Text className='pop_duration_title'>{t('feature.track_time_duration.record_fast_sleep.item.fast')}</Text>
|
|
|
- <View style={{ flexDirection: 'row', alignItems: 'center', marginTop: rpxToPx(8), display: 'flex', width: '100%' }}>
|
|
|
|
|
- <Text onClick={() => tapDuration(true)} className='pop_duration_txt'>{TimeFormatter.durationFormate(detail.fast.target_start_time, detail.fast.target_end_time)}</Text>
|
|
|
|
|
|
|
+ <View onClick={() => tapDuration(true)} style={{ flexDirection: 'row', alignItems: 'center', marginTop: rpxToPx(8), display: 'flex', width: '100%' }}>
|
|
|
|
|
+ <Text className='pop_duration_txt'>{TimeFormatter.durationFormate(detail.fast.target_start_time, detail.fast.target_end_time)}</Text>
|
|
|
<Image onClick={() => tapDuration(true)} className="arrow2" src={require('@/assets/images/arrow3.png')} />
|
|
<Image onClick={() => tapDuration(true)} className="arrow2" src={require('@/assets/images/arrow3.png')} />
|
|
|
</View>
|
|
</View>
|
|
|
<View style={{ marginTop: rpxToPx(20), display: 'flex', flexDirection: 'row', alignItems: 'center' }}>
|
|
<View style={{ marginTop: rpxToPx(20), display: 'flex', flexDirection: 'row', alignItems: 'center' }}>
|
|
@@ -416,8 +450,8 @@ export default function CircadianDetailPopup(props: { record: any, schedule?: an
|
|
|
if (props.record.sleep.status == 'WAIT_FOR_START') {
|
|
if (props.record.sleep.status == 'WAIT_FOR_START') {
|
|
|
return <View className='pop_ring_bg pop_overview_bg'>
|
|
return <View className='pop_ring_bg pop_overview_bg'>
|
|
|
<Text className='pop_duration_title'>{t('feature.track_time_duration.record_fast_sleep.item.sleep')}</Text>
|
|
<Text className='pop_duration_title'>{t('feature.track_time_duration.record_fast_sleep.item.sleep')}</Text>
|
|
|
- <View style={{ flexDirection: 'row', alignItems: 'center', marginTop: rpxToPx(8), display: 'flex', width: '100%' }}>
|
|
|
|
|
- <Text onClick={() => tapDuration(false)} className='pop_duration_txt' style={{ color: ColorType.sleep }}>{TimeFormatter.durationFormate(detail.sleep.target_start_time, detail.sleep.target_end_time)}</Text>
|
|
|
|
|
|
|
+ <View onClick={() => tapDuration(false)} style={{ flexDirection: 'row', alignItems: 'center', marginTop: rpxToPx(8), display: 'flex', width: '100%' }}>
|
|
|
|
|
+ <Text className='pop_duration_txt' style={{ color: ColorType.sleep }}>{TimeFormatter.durationFormate(detail.sleep.target_start_time, detail.sleep.target_end_time)}</Text>
|
|
|
<View onClick={() => tapMinus(false)} className='minus' style={{ backgroundColor: ColorType.sleep, opacity: 0.6 }}><IconMinus color='#090909' /></View>
|
|
<View onClick={() => tapMinus(false)} className='minus' style={{ backgroundColor: ColorType.sleep, opacity: 0.6 }}><IconMinus color='#090909' /></View>
|
|
|
<View onClick={() => tapPlus(false)} className='plus' style={{ backgroundColor: ColorType.sleep }}><IconPlus color='#090909' /></View>
|
|
<View onClick={() => tapPlus(false)} className='plus' style={{ backgroundColor: ColorType.sleep }}><IconPlus color='#090909' /></View>
|
|
|
</View>
|
|
</View>
|
|
@@ -426,8 +460,8 @@ export default function CircadianDetailPopup(props: { record: any, schedule?: an
|
|
|
else if (props.record.sleep.status == 'WAIT_FOR_END') {
|
|
else if (props.record.sleep.status == 'WAIT_FOR_END') {
|
|
|
return <View className='pop_ring_bg pop_overview_bg'>
|
|
return <View className='pop_ring_bg pop_overview_bg'>
|
|
|
<Text className='pop_duration_title'>{t('feature.track_time_duration.record_fast_sleep.item.sleep')}</Text>
|
|
<Text className='pop_duration_title'>{t('feature.track_time_duration.record_fast_sleep.item.sleep')}</Text>
|
|
|
- <View style={{ flexDirection: 'row', alignItems: 'center', marginTop: rpxToPx(8), display: 'flex', width: '100%' }}>
|
|
|
|
|
- <Text onClick={() => tapDuration(false)} className='pop_duration_txt'>{TimeFormatter.durationFormate(detail.sleep.target_start_time, detail.sleep.target_end_time)}</Text>
|
|
|
|
|
|
|
+ <View onClick={() => tapDuration(false)} style={{ flexDirection: 'row', alignItems: 'center', marginTop: rpxToPx(8), display: 'flex', width: '100%' }}>
|
|
|
|
|
+ <Text className='pop_duration_txt'>{TimeFormatter.durationFormate(detail.sleep.target_start_time, detail.sleep.target_end_time)}</Text>
|
|
|
<Image onClick={() => tapDuration(false)} className="arrow2" src={require('@/assets/images/arrow3.png')} />
|
|
<Image onClick={() => tapDuration(false)} className="arrow2" src={require('@/assets/images/arrow3.png')} />
|
|
|
</View>
|
|
</View>
|
|
|
<View style={{ marginTop: rpxToPx(20), display: 'flex', flexDirection: 'row', alignItems: 'center' }}>
|
|
<View style={{ marginTop: rpxToPx(20), display: 'flex', flexDirection: 'row', alignItems: 'center' }}>
|
|
@@ -479,23 +513,134 @@ export default function CircadianDetailPopup(props: { record: any, schedule?: an
|
|
|
var common = getCommon(null, false)
|
|
var common = getCommon(null, false)
|
|
|
common.radius = bigRingRadius;
|
|
common.radius = bigRingRadius;
|
|
|
common.lineWidth = ringWidth;
|
|
common.lineWidth = ringWidth;
|
|
|
|
|
+ var timestamp, timestamp2, timestamp3
|
|
|
|
|
+ var duration, duration2, duration3;
|
|
|
|
|
+ if (props.record.status == 'WAIT_FOR_START') {
|
|
|
|
|
+ var date = new Date()
|
|
|
|
|
+ date.setSeconds(0)
|
|
|
|
|
+ date.setMilliseconds(0)
|
|
|
|
|
+ var fastStart = props.schedule.fast.start_time
|
|
|
|
|
+ var sleepStart = props.schedule.sleep.start_time
|
|
|
|
|
+ var sleepEnd = props.schedule.sleep.end_time
|
|
|
|
|
+ date.setHours(parseInt(fastStart.split(':')[0]))
|
|
|
|
|
+ date.setMinutes(parseInt(fastStart.split(':')[1]))
|
|
|
|
|
+
|
|
|
|
|
+ timestamp = date.getTime()
|
|
|
|
|
+ date.setHours(parseInt(sleepStart.split(':')[0]))
|
|
|
|
|
+ date.setMinutes(parseInt(sleepStart.split(':')[1]))
|
|
|
|
|
+ timestamp2 = date.getTime()
|
|
|
|
|
+ if (timestamp2 < timestamp) {
|
|
|
|
|
+ timestamp2 += 24 * 3600 * 1000
|
|
|
|
|
+ }
|
|
|
|
|
+ date.setHours(parseInt(sleepEnd.split(':')[0]))
|
|
|
|
|
+ date.setMinutes(parseInt(sleepEnd.split(':')[1]))
|
|
|
|
|
+ timestamp3 = date.getTime()
|
|
|
|
|
+ if (timestamp3 < timestamp2) {
|
|
|
|
|
+ timestamp3 += 24 * 3600 * 1000
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ duration = durationArc(props.record.fast.target_start_time, props.record.sleep.target_start_time)
|
|
|
|
|
+ duration2 = durationArc(props.record.sleep.target_start_time, props.record.sleep.target_end_time)
|
|
|
|
|
+ duration3 = durationArc(props.record.sleep.target_end_time, props.record.fast.target_end_time)
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (props.record.status == 'ONGOING1') {
|
|
|
|
|
+ var date = new Date()
|
|
|
|
|
+ timestamp = props.record.fast.real_start_time
|
|
|
|
|
+ timestamp2 = props.record.sleep.target_start_time
|
|
|
|
|
+ timestamp3 = props.record.sleep.target_end_time
|
|
|
|
|
+ duration = durationArc(props.record.fast.real_start_time, date.getTime())
|
|
|
|
|
+ duration2 = durationArc(props.record.sleep.target_start_time, props.record.sleep.target_end_time)
|
|
|
|
|
+ duration3 = durationArc(props.record.sleep.target_end_time, props.record.fast.target_end_time)
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (props.record.status == 'ONGOING2') {
|
|
|
|
|
+ var date = new Date()
|
|
|
|
|
+ timestamp = props.record.fast.real_start_time
|
|
|
|
|
+ timestamp2 = props.record.sleep.real_start_time
|
|
|
|
|
+ timestamp3 = props.record.sleep.target_end_time
|
|
|
|
|
+ duration = durationArc(props.record.fast.real_start_time, props.record.sleep.real_start_time)
|
|
|
|
|
+ duration2 = durationArc(props.record.sleep.real_start_time, date.getTime())
|
|
|
|
|
+ duration3 = durationArc(props.record.sleep.target_end_time, props.record.fast.target_end_time)
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (props.record.status == 'ONGOING3'){
|
|
|
|
|
+ var date = new Date()
|
|
|
|
|
+ timestamp = props.record.fast.real_start_time
|
|
|
|
|
+ timestamp2 = props.record.sleep.real_start_time
|
|
|
|
|
+ timestamp3 = props.record.sleep.real_end_time
|
|
|
|
|
+ duration = durationArc(props.record.fast.real_start_time, props.record.sleep.real_start_time)
|
|
|
|
|
+ duration2 = durationArc(props.record.sleep.real_start_time, props.record.sleep.real_end_time)
|
|
|
|
|
+ duration3 = durationArc(props.record.sleep.real_end_time, date.getTime())
|
|
|
|
|
+ }
|
|
|
|
|
+ else {
|
|
|
|
|
+ timestamp = TimeFormatter.transferTimestamp(props.record.fast.real_start_time, props.record.fast.real_end_time_zone)
|
|
|
|
|
+ timestamp2 = TimeFormatter.transferTimestamp(props.record.sleep.real_start_time, props.record.fast.real_end_time_zone)
|
|
|
|
|
+ timestamp3 = TimeFormatter.transferTimestamp(props.record.sleep.real_end_time, props.record.fast.real_end_time_zone)
|
|
|
|
|
+ duration = durationArc(props.record.fast.real_start_time, props.record.sleep.real_start_time)
|
|
|
|
|
+ duration2 = durationArc(props.record.sleep.real_start_time, props.record.sleep.real_end_time)
|
|
|
|
|
+ duration3 = durationArc(props.record.sleep.real_end_time, props.record.fast.real_end_time)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const preRing: RealRing = {
|
|
|
|
|
+ color: global.fastColor ? global.fastColor : ColorType.fast,
|
|
|
|
|
+ startArc: startArc(timestamp),
|
|
|
|
|
+ durationArc: duration
|
|
|
|
|
+ }
|
|
|
|
|
+ const sleepRing: RealRing = {
|
|
|
|
|
+ color: global.sleepColor ? global.sleepColor : ColorType.sleep,
|
|
|
|
|
+ startArc: startArc(timestamp2),
|
|
|
|
|
+ durationArc: duration2
|
|
|
|
|
+ }
|
|
|
|
|
+ const wakeRing: RealRing = {
|
|
|
|
|
+ color: global.fastColor ? global.fastColor : ColorType.fast,
|
|
|
|
|
+ startArc: startArc(timestamp3),
|
|
|
|
|
+ durationArc: duration3
|
|
|
|
|
+ }
|
|
|
|
|
+ return <View>
|
|
|
|
|
+ <View className='pop_ring_bg'>
|
|
|
|
|
+ <Rings common={common} bgRing={bgRing} canvasId={'pre_sleep_ring'} realRing={preRing} />
|
|
|
|
|
+ <View className="pop_duration_bg">
|
|
|
|
|
+ <Text className="pop_duration_title">{t('feature.track_time_duration.stage.a')}</Text>
|
|
|
|
|
+ <Text className="pop_duration_value" style={{ color: ColorType.fast }}>{getStageDuration(0)}</Text>
|
|
|
|
|
+ </View>
|
|
|
|
|
+ </View>
|
|
|
|
|
+ <View className='pop_ring_bg'>
|
|
|
|
|
+ <Rings common={common} bgRing={bgRing} canvasId={'sleeping_ring'} realRing={sleepRing} />
|
|
|
|
|
+ <View className="pop_duration_bg">
|
|
|
|
|
+ <Text className="pop_duration_title">{t('feature.track_time_duration.stage.b')}</Text>
|
|
|
|
|
+ <Text className="pop_duration_value" style={{ color: ColorType.sleep }}>{getStageDuration(1)}</Text>
|
|
|
|
|
+ </View>
|
|
|
|
|
+ </View>
|
|
|
|
|
+ <View className='pop_ring_bg'>
|
|
|
|
|
+ <Rings common={common} bgRing={bgRing} canvasId={'later_sleep_ring'} realRing={wakeRing} />
|
|
|
|
|
+ <View className="pop_duration_bg">
|
|
|
|
|
+ <Text className="pop_duration_title">{t('feature.track_time_duration.stage.c')}</Text>
|
|
|
|
|
+ <Text className="pop_duration_value" style={{ color: ColorType.fast }}>{getStageDuration(2)}</Text>
|
|
|
|
|
+ </View>
|
|
|
|
|
+ </View>
|
|
|
|
|
+ </View>
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function stage2() {
|
|
|
|
|
+ var bgRing = getBgRing()
|
|
|
|
|
+ var common = getCommon(null, false)
|
|
|
|
|
+ common.radius = bigRingRadius;
|
|
|
|
|
+ common.lineWidth = ringWidth;
|
|
|
|
|
|
|
|
var timestamp = TimeFormatter.transferTimestamp(props.record.fast.real_start_time, props.record.fast.real_end_time_zone)
|
|
var timestamp = TimeFormatter.transferTimestamp(props.record.fast.real_start_time, props.record.fast.real_end_time_zone)
|
|
|
var timestamp2 = TimeFormatter.transferTimestamp(props.record.sleep.real_start_time, props.record.fast.real_end_time_zone)
|
|
var timestamp2 = TimeFormatter.transferTimestamp(props.record.sleep.real_start_time, props.record.fast.real_end_time_zone)
|
|
|
var timestamp3 = TimeFormatter.transferTimestamp(props.record.sleep.real_end_time, props.record.fast.real_end_time_zone)
|
|
var timestamp3 = TimeFormatter.transferTimestamp(props.record.sleep.real_end_time, props.record.fast.real_end_time_zone)
|
|
|
const preRing: RealRing = {
|
|
const preRing: RealRing = {
|
|
|
color: global.fastColor ? global.fastColor : ColorType.fast,
|
|
color: global.fastColor ? global.fastColor : ColorType.fast,
|
|
|
- startArc: startArc(timestamp),//startArc(props.record.fast.real_start_time),
|
|
|
|
|
|
|
+ startArc: startArc(timestamp),
|
|
|
durationArc: durationArc(props.record.fast.real_start_time, props.record.sleep.real_start_time)
|
|
durationArc: durationArc(props.record.fast.real_start_time, props.record.sleep.real_start_time)
|
|
|
}
|
|
}
|
|
|
const sleepRing: RealRing = {
|
|
const sleepRing: RealRing = {
|
|
|
color: global.sleepColor ? global.sleepColor : ColorType.sleep,
|
|
color: global.sleepColor ? global.sleepColor : ColorType.sleep,
|
|
|
- startArc: startArc(timestamp2),//startArc(props.record.sleep.real_start_time),
|
|
|
|
|
|
|
+ startArc: startArc(timestamp2),
|
|
|
durationArc: durationArc(props.record.sleep.real_start_time, props.record.sleep.real_end_time)
|
|
durationArc: durationArc(props.record.sleep.real_start_time, props.record.sleep.real_end_time)
|
|
|
}
|
|
}
|
|
|
const wakeRing: RealRing = {
|
|
const wakeRing: RealRing = {
|
|
|
color: global.fastColor ? global.fastColor : ColorType.fast,
|
|
color: global.fastColor ? global.fastColor : ColorType.fast,
|
|
|
- startArc: startArc(timestamp3),//startArc(props.record.sleep.real_end_time),
|
|
|
|
|
|
|
+ startArc: startArc(timestamp3),
|
|
|
durationArc: durationArc(props.record.sleep.real_end_time, props.record.fast.real_end_time)
|
|
durationArc: durationArc(props.record.sleep.real_end_time, props.record.fast.real_end_time)
|
|
|
}
|
|
}
|
|
|
return <View>
|
|
return <View>
|
|
@@ -654,14 +799,15 @@ export default function CircadianDetailPopup(props: { record: any, schedule?: an
|
|
|
return <View />
|
|
return <View />
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
return <View className='detail_container'>
|
|
return <View className='detail_container'>
|
|
|
|
|
|
|
|
<Text className='detail_popup_title'>{getTitle()}<Text className='detail_popup_subttitle'> {getSubTitle()}</Text></Text>
|
|
<Text className='detail_popup_title'>{getTitle()}<Text className='detail_popup_subttitle'> {getSubTitle()}</Text></Text>
|
|
|
<View className='detail_tabbar'>
|
|
<View className='detail_tabbar'>
|
|
|
<View onClick={() => { setTabIndex(0) }} className={tabIndex == 0 ? 'detail_tabitem_sel' : 'detail_tabitem_nor'}>{t('feature.day_night.overview')}</View>
|
|
<View onClick={() => { setTabIndex(0) }} className={tabIndex == 0 ? 'detail_tabitem_sel' : 'detail_tabitem_nor'}>{t('feature.day_night.overview')}</View>
|
|
|
{
|
|
{
|
|
|
- props.record.status == 'COMPLETED' &&
|
|
|
|
|
- (props.record.sleep && props.record.sleep.status == 'COMPLETED') &&
|
|
|
|
|
|
|
+ // props.record.status == 'COMPLETED' &&
|
|
|
|
|
+ // (props.record.sleep && props.record.sleep.status == 'COMPLETED') &&
|
|
|
props.record.scenario == 'FAST_SLEEP' &&
|
|
props.record.scenario == 'FAST_SLEEP' &&
|
|
|
<View onClick={() => { setTabIndex(1) }} className={tabIndex == 1 ? 'detail_tabitem_sel' : 'detail_tabitem_nor'}>{t('feature.day_night.stages')}</View>
|
|
<View onClick={() => { setTabIndex(1) }} className={tabIndex == 1 ? 'detail_tabitem_sel' : 'detail_tabitem_nor'}>{t('feature.day_night.stages')}</View>
|
|
|
}
|
|
}
|