|
@@ -26,6 +26,7 @@ import { setSelID } from "@/store/common";
|
|
|
import CircadianDetailPopup from "./CircadianDetailPopup";
|
|
import CircadianDetailPopup from "./CircadianDetailPopup";
|
|
|
import dayjs from 'dayjs'
|
|
import dayjs from 'dayjs'
|
|
|
import '@/utils/ring_card.scss';
|
|
import '@/utils/ring_card.scss';
|
|
|
|
|
+import showAlert from "@/components/basic/Alert";
|
|
|
// import { sqrt } from 'mathjs'
|
|
// import { sqrt } from 'mathjs'
|
|
|
|
|
|
|
|
let AppState;
|
|
let AppState;
|
|
@@ -156,16 +157,15 @@ const RecordFastSleep = memo((props: { data: any, type: string, index: number, d
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function tapDel() {
|
|
function tapDel() {
|
|
|
- Taro.showModal({
|
|
|
|
|
|
|
+ showAlert({
|
|
|
title: t('feature.common.modal.delete_item_title'),
|
|
title: t('feature.common.modal.delete_item_title'),
|
|
|
content: t('feature.common.modal.delete_item_content'),
|
|
content: t('feature.common.modal.delete_item_content'),
|
|
|
- success: function (res) {
|
|
|
|
|
- if (res.confirm) {
|
|
|
|
|
- del();
|
|
|
|
|
- }
|
|
|
|
|
- else {
|
|
|
|
|
- setShowDel(false)
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ showCancel: true,
|
|
|
|
|
+ confirm: () => {
|
|
|
|
|
+ del();
|
|
|
|
|
+ },
|
|
|
|
|
+ cancel: () => {
|
|
|
|
|
+ setShowDel(false)
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
@@ -447,11 +447,11 @@ const RecordFastSleep = memo((props: { data: any, type: string, index: number, d
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if (global.language == 'en') {
|
|
if (global.language == 'en') {
|
|
|
- return TimeFormatter.tzTimeFormateLocalTime(props.data.first_real_check_time, props.data.first_timezone.id,'MMM D z')
|
|
|
|
|
|
|
+ return TimeFormatter.tzTimeFormateLocalTime(props.data.first_real_check_time, props.data.first_timezone.id, 'MMM D z')
|
|
|
// return dayjs(props.data.first_real_check_time).tz(props.data.first_timezone.id).format('MMM D z')
|
|
// return dayjs(props.data.first_real_check_time).tz(props.data.first_timezone.id).format('MMM D z')
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
|
- return TimeFormatter.tzTimeFormateLocalTime(props.data.first_real_check_time, props.data.first_timezone.id,'M月D日 z')
|
|
|
|
|
|
|
+ return TimeFormatter.tzTimeFormateLocalTime(props.data.first_real_check_time, props.data.first_timezone.id, 'M月D日 z')
|
|
|
// return dayjs(props.data.first_real_check_time).tz(props.data.first_timezone.id).format('M月D日 z')
|
|
// return dayjs(props.data.first_real_check_time).tz(props.data.first_timezone.id).format('M月D日 z')
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -475,11 +475,11 @@ const RecordFastSleep = memo((props: { data: any, type: string, index: number, d
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if (global.language == 'en') {
|
|
if (global.language == 'en') {
|
|
|
- return TimeFormatter.tzTimeFormateLocalTime(props.data.first_real_check_time, props.data.first_timezone.id,'MMM D z')
|
|
|
|
|
|
|
+ return TimeFormatter.tzTimeFormateLocalTime(props.data.first_real_check_time, props.data.first_timezone.id, 'MMM D z')
|
|
|
// return dayjs(props.data.first_real_check_time).tz(props.data.first_timezone.id).format('MMM D z')
|
|
// return dayjs(props.data.first_real_check_time).tz(props.data.first_timezone.id).format('MMM D z')
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
|
- return TimeFormatter.tzTimeFormateLocalTime(props.data.first_real_check_time, props.data.first_timezone.id,'M月D日 z')
|
|
|
|
|
|
|
+ return TimeFormatter.tzTimeFormateLocalTime(props.data.first_real_check_time, props.data.first_timezone.id, 'M月D日 z')
|
|
|
// return dayjs(props.data.first_real_check_time).tz(props.data.first_timezone.id).format('M月D日 z')
|
|
// return dayjs(props.data.first_real_check_time).tz(props.data.first_timezone.id).format('M月D日 z')
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -703,7 +703,7 @@ const RecordFastSleep = memo((props: { data: any, type: string, index: number, d
|
|
|
{
|
|
{
|
|
|
process.env.TARO_ENV == 'weapp' && <View className={showDel ? 'btnDelete btnDeleteAni' : 'btnDelete'} onClick={tapDel}>{t('feature.track_time_duration.record_fast_sleep.delete')}</View>
|
|
process.env.TARO_ENV == 'weapp' && <View className={showDel ? 'btnDelete btnDeleteAni' : 'btnDelete'} onClick={tapDel}>{t('feature.track_time_duration.record_fast_sleep.delete')}</View>
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
</View>
|
|
</View>
|
|
|
{/* {
|
|
{/* {
|