diff --git a/app/(tabs)/tripInfo.tsx b/app/(tabs)/tripInfo.tsx
index a72335a..bc917d2 100644
--- a/app/(tabs)/tripInfo.tsx
+++ b/app/(tabs)/tripInfo.tsx
@@ -1,3 +1,6 @@
+import ButtonCancelTrip from "@/components/ButtonCancelTrip";
+import ButtonCreateNewHaulOrTrip from "@/components/ButtonCreateNewHaulOrTrip";
+import ButtonEndTrip from "@/components/ButtonEndTrip";
import CrewListTable from "@/components/tripInfo/CrewListTable";
import FishingToolsTable from "@/components/tripInfo/FishingToolsList";
import NetListTable from "@/components/tripInfo/NetListTable";
@@ -8,13 +11,22 @@ import { SafeAreaView } from "react-native-safe-area-context";
export default function TripInfoScreen() {
return (
+
+ Thông Tin Chuyến Đi
+
+
+
+
- Thông Tin Chuyến Đi
+
+
+
+
@@ -25,15 +37,32 @@ const styles = StyleSheet.create({
scrollContent: {
flexGrow: 1,
},
+ header: {
+ width: "100%",
+ paddingHorizontal: 15,
+ paddingTop: 15,
+ paddingBottom: 10,
+ alignItems: "center",
+ },
+ buttonWrapper: {
+ width: "100%",
+ flexDirection: "row",
+ justifyContent: "flex-end",
+ },
container: {
alignItems: "center",
- padding: 15,
+ paddingHorizontal: 15,
+ },
+ buttonRow: {
+ flexDirection: "row",
+ gap: 10,
+ marginTop: 15,
},
titleText: {
fontSize: 32,
fontWeight: "700",
lineHeight: 40,
- marginBottom: 10,
+ paddingBottom: 10,
fontFamily: Platform.select({
ios: "System",
android: "Roboto",
diff --git a/components/ButtonCancelTrip.tsx b/components/ButtonCancelTrip.tsx
new file mode 100644
index 0000000..7b2f646
--- /dev/null
+++ b/components/ButtonCancelTrip.tsx
@@ -0,0 +1,45 @@
+import React from "react";
+import { StyleSheet, Text, TouchableOpacity } from "react-native";
+
+interface ButtonCancelTripProps {
+ title?: string;
+ onPress?: () => void;
+}
+
+const ButtonCancelTrip: React.FC = ({
+ title = "Hủy chuyến đi",
+ onPress,
+}) => {
+ return (
+
+ {title}
+
+ );
+};
+
+const styles = StyleSheet.create({
+ button: {
+ backgroundColor: "#f45b57", // đỏ nhẹ giống ảnh
+ borderRadius: 8,
+ paddingVertical: 10,
+ paddingHorizontal: 20,
+ alignSelf: "flex-start",
+ shadowColor: "#000",
+ shadowOpacity: 0.1,
+ shadowRadius: 2,
+ shadowOffset: { width: 0, height: 1 },
+ elevation: 2, // cho Android
+ },
+ text: {
+ color: "#fff",
+ fontSize: 16,
+ fontWeight: "600",
+ textAlign: "center",
+ },
+});
+
+export default ButtonCancelTrip;
diff --git a/components/ButtonCreateNewHaulOrTrip.tsx b/components/ButtonCreateNewHaulOrTrip.tsx
new file mode 100644
index 0000000..13c2e8a
--- /dev/null
+++ b/components/ButtonCreateNewHaulOrTrip.tsx
@@ -0,0 +1,107 @@
+import { AntDesign } from "@expo/vector-icons";
+import React, { useState } from "react";
+import { Alert, StyleSheet, Text, TouchableOpacity, View } from "react-native";
+
+interface StartButtonProps {
+ title?: string;
+ onPress?: () => void;
+}
+
+const ButtonCreateNewHaulOrTrip: React.FC = ({
+ title = "Bắt đầu mẻ lưới",
+ onPress,
+}) => {
+ const [isStarted, setIsStarted] = useState(false);
+
+ const handlePress = () => {
+ if (isStarted) {
+ Alert.alert(
+ "Kết thúc mẻ lưới",
+ "Bạn có chắc chắn muốn kết thúc mẻ lưới này?",
+ [
+ {
+ text: "Hủy",
+ style: "cancel",
+ },
+ {
+ text: "Kết thúc",
+ onPress: () => {
+ setIsStarted(false);
+ Alert.alert("Thành công", "Đã kết thúc mẻ lưới!");
+ },
+ },
+ ]
+ );
+ } else {
+ Alert.alert("Bắt đầu mẻ lưới", "Bạn có muốn bắt đầu mẻ lưới mới?", [
+ {
+ text: "Hủy",
+ style: "cancel",
+ },
+ {
+ text: "Bắt đầu",
+ onPress: () => {
+ setIsStarted(true);
+ Alert.alert("Thành công", "Đã bắt đầu mẻ lưới mới!");
+ },
+ },
+ ]);
+ }
+
+ if (onPress) {
+ onPress();
+ }
+ };
+
+ return (
+
+
+
+
+ {isStarted ? "Kết thúc mẻ lưới" : title}
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ button: {
+ backgroundColor: "#4ecdc4", // màu ngọc lam
+ borderRadius: 8,
+ paddingVertical: 10,
+ paddingHorizontal: 16,
+ alignSelf: "flex-start",
+ shadowColor: "#000",
+ shadowOpacity: 0.15,
+ shadowRadius: 3,
+ shadowOffset: { width: 0, height: 2 },
+ elevation: 3, // hiệu ứng nổi trên Android
+ },
+ buttonActive: {
+ backgroundColor: "#e74c3c", // màu đỏ khi đang hoạt động
+ },
+ content: {
+ flexDirection: "row",
+ alignItems: "center",
+ },
+ icon: {
+ marginRight: 6,
+ },
+ text: {
+ color: "#fff",
+ fontSize: 16,
+ fontWeight: "600",
+ },
+});
+
+export default ButtonCreateNewHaulOrTrip;
diff --git a/components/ButtonEndTrip.tsx b/components/ButtonEndTrip.tsx
new file mode 100644
index 0000000..818682d
--- /dev/null
+++ b/components/ButtonEndTrip.tsx
@@ -0,0 +1,45 @@
+import React from "react";
+import { StyleSheet, Text, TouchableOpacity } from "react-native";
+
+interface ButtonEndTripProps {
+ title?: string;
+ onPress?: () => void;
+}
+
+const ButtonEndTrip: React.FC = ({
+ title = "Kết thúc",
+ onPress,
+}) => {
+ return (
+
+ {title}
+
+ );
+};
+
+const styles = StyleSheet.create({
+ button: {
+ backgroundColor: "#ed9434", // màu cam sáng
+ borderRadius: 8,
+ paddingVertical: 10,
+ paddingHorizontal: 28,
+ alignSelf: "flex-start",
+ shadowColor: "#000",
+ shadowOpacity: 0.1,
+ shadowRadius: 3,
+ shadowOffset: { width: 0, height: 1 },
+ elevation: 2, // hiệu ứng nổi trên Android
+ },
+ text: {
+ color: "#fff",
+ fontSize: 16,
+ fontWeight: "600",
+ textAlign: "center",
+ },
+});
+
+export default ButtonEndTrip;
diff --git a/components/tripInfo/NetListTable.tsx b/components/tripInfo/NetListTable.tsx
index a67a000..90d6b24 100644
--- a/components/tripInfo/NetListTable.tsx
+++ b/components/tripInfo/NetListTable.tsx
@@ -101,7 +101,7 @@ const NetListTable: React.FC = () => {
{/* Cột Thao tác */}
- {/*
+
{
color="#333"
style={{ marginLeft: 10 }}
/>
- */}
+
))}
@@ -138,7 +138,7 @@ const NetListTable: React.FC = () => {
{/* Cột Thao tác */}
- {/*
+
{
color="#333"
style={{ marginLeft: 10 }}
/>
- */}
+
))}