172 lines
4.0 KiB
TypeScript
172 lines
4.0 KiB
TypeScript
import CreateOrUpdateHaulModal from "@/components/tripInfo/modal/CreateOrUpdateHaulModal";
|
|
import { useState } from "react";
|
|
import { Button, Platform, StyleSheet, View } from "react-native";
|
|
import { SafeAreaView } from "react-native-safe-area-context";
|
|
|
|
export default function Warning() {
|
|
const [isShowModal, setIsShowModal] = useState(false);
|
|
return (
|
|
<SafeAreaView style={{ flex: 1 }}>
|
|
<View style={styles.container}>
|
|
<CreateOrUpdateHaulModal
|
|
fishingLog={fishingLogData}
|
|
isVisible={isShowModal}
|
|
onClose={function (): void {
|
|
setIsShowModal(false);
|
|
}}
|
|
/>
|
|
<Button title="Thêm thu hoạch" onPress={() => setIsShowModal(true)} />
|
|
</View>
|
|
</SafeAreaView>
|
|
);
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
scrollContent: {
|
|
flexGrow: 1,
|
|
},
|
|
container: {
|
|
alignItems: "center",
|
|
padding: 15,
|
|
},
|
|
titleText: {
|
|
fontSize: 32,
|
|
fontWeight: "700",
|
|
lineHeight: 40,
|
|
marginBottom: 10,
|
|
fontFamily: Platform.select({
|
|
ios: "System",
|
|
android: "Roboto",
|
|
default: "System",
|
|
}),
|
|
},
|
|
button: {
|
|
backgroundColor: "#007AFF",
|
|
paddingVertical: 14,
|
|
paddingHorizontal: 24,
|
|
borderRadius: 8,
|
|
marginTop: 20,
|
|
},
|
|
buttonText: {
|
|
color: "#fff",
|
|
fontSize: 16,
|
|
fontWeight: "600",
|
|
},
|
|
});
|
|
|
|
const fishingLogData:Model.FishingLog = {
|
|
fishing_log_id: "124b2701-a5d6-4eb0-ba3b-6789473c14a9",
|
|
trip_id: "d84caab6-ebb0-4cf7-abf9-31e5617d23b9",
|
|
start_at: "2025-11-07T10:50:01.693193764Z",
|
|
end_at: "2025-11-07T10:50:31.693027729Z",
|
|
start_lat: 11.59141,
|
|
start_lon: 109.0489,
|
|
haul_lat: 11.590274,
|
|
haul_lon: 109.049284,
|
|
status: 1,
|
|
weather_description: "Stormy",
|
|
info: [
|
|
{
|
|
fish_species_id: 8,
|
|
fish_name: "Cá hồng phớn",
|
|
catch_number: 1309,
|
|
catch_unit: "kg",
|
|
fish_size: 173,
|
|
fish_rarity: 3,
|
|
fish_condition: "Còn sống",
|
|
gear_usage: "Câu vàng",
|
|
},
|
|
{
|
|
fish_species_id: 18,
|
|
fish_name: "Cá đuối quạt",
|
|
catch_number: 731,
|
|
catch_unit: "kg",
|
|
fish_size: 16,
|
|
fish_rarity: 4,
|
|
fish_condition: "Chết",
|
|
gear_usage: "Bẫy lưới",
|
|
},
|
|
{
|
|
fish_species_id: 7,
|
|
fish_name: "Cá bơn vàng",
|
|
catch_number: 1224,
|
|
catch_unit: "kg",
|
|
fish_size: 12,
|
|
fish_rarity: 1,
|
|
fish_condition: "Chết",
|
|
gear_usage: "",
|
|
},
|
|
{
|
|
fish_species_id: 16,
|
|
fish_name: "Cá rồng biển",
|
|
catch_number: 838,
|
|
catch_unit: "kg",
|
|
fish_size: 164,
|
|
fish_rarity: 3,
|
|
fish_condition: "Chết",
|
|
gear_usage: "Lưới rê",
|
|
},
|
|
{
|
|
fish_species_id: 9,
|
|
fish_name: "Cá hổ Napoleon",
|
|
catch_number: 1410,
|
|
catch_unit: "kg",
|
|
fish_size: 104,
|
|
fish_rarity: 4,
|
|
fish_condition: "Bị thương",
|
|
gear_usage: "Câu vàng",
|
|
},
|
|
{
|
|
fish_species_id: 3,
|
|
fish_name: "Cá chim trắng",
|
|
catch_number: 1184,
|
|
catch_unit: "kg",
|
|
fish_size: 104,
|
|
fish_rarity: 2,
|
|
fish_condition: "Còn sống",
|
|
gear_usage: "",
|
|
},
|
|
{
|
|
fish_species_id: 5,
|
|
fish_name: "Cá mú đỏ",
|
|
catch_number: 987,
|
|
catch_unit: "kg",
|
|
fish_size: 171,
|
|
fish_rarity: 2,
|
|
fish_condition: "Bị thương",
|
|
gear_usage: "",
|
|
},
|
|
{
|
|
fish_species_id: 13,
|
|
fish_name: "Cá song đỏ",
|
|
catch_number: 1676,
|
|
catch_unit: "kg",
|
|
fish_size: 99,
|
|
fish_rarity: 2,
|
|
fish_condition: "Bị thương",
|
|
gear_usage: "",
|
|
},
|
|
{
|
|
fish_species_id: 11,
|
|
fish_name: "Cá ngừ đại dương",
|
|
catch_number: 462,
|
|
catch_unit: "kg",
|
|
fish_size: 11,
|
|
fish_rarity: 1,
|
|
fish_condition: "Bị thương",
|
|
gear_usage: "",
|
|
},
|
|
{
|
|
fish_species_id: 2,
|
|
fish_name: "Cá nục",
|
|
catch_number: 496,
|
|
catch_unit: "kg",
|
|
fish_size: 125,
|
|
fish_rarity: 1,
|
|
fish_condition: "Còn sống",
|
|
gear_usage: "",
|
|
},
|
|
],
|
|
sync: true,
|
|
};
|