login time

This commit is contained in:
Sone
2025-11-05 20:11:34 +01:00
parent b43aec6b9a
commit fdcc42007a
21 changed files with 1363 additions and 843 deletions
+10 -3
View File
@@ -1,7 +1,8 @@
import { ScrollView, Text, View } from "react-native";
import { UserLoginLog } from "@/store/api/usersApi";
import { formatDate, formatTime } from "@/utils/dateUtils";
import { formatDate, formatTimeWithSeconds } from "@/utils/dateUtils";
import { reasonLabel } from "@/utils/loginUtils";
interface MobileLogsTableProps {
logs: UserLoginLog[];
@@ -21,10 +22,16 @@ export const MobileLogsTable = ({ logs }: MobileLogsTableProps) => {
<Text className="font-normal text-gray-600">({log.email})</Text>
</Text>
<Text className="text-sm text-gray-700 mt-1">
Time: {formatDate(log.lastLoginAt)} {formatTime(log.lastLoginAt)}
Time: {formatDate(log.lastLoginAt)} {formatTimeWithSeconds(log.lastLoginAt)}
</Text>
<Text className="text-sm text-gray-700 mt-1">
<Text
className="text-sm mt-1"
style={{ color: log.status === "FAILURE" ? "#F83434" : "#22C927" }}
>
Login activity: {log.activity}
{log.status === "FAILURE" && reasonLabel(log.failureReason)
? ` - ${reasonLabel(log.failureReason)}`
: ""}
</Text>
</View>
))}