update login, detail table in tripInfo
This commit is contained in:
@@ -17,6 +17,12 @@ interface CrewMember {
|
||||
// ⚓ Dữ liệu mẫu
|
||||
// ---------------------------
|
||||
const data: CrewMember[] = [
|
||||
{
|
||||
id: "10",
|
||||
maDinhDanh: "ChuTau",
|
||||
ten: "Nguyễn Nhật Minh",
|
||||
chucVu: "Chủ tàu",
|
||||
},
|
||||
{
|
||||
id: "1",
|
||||
maDinhDanh: "TV001",
|
||||
@@ -43,6 +49,10 @@ const CrewListTable: React.FC = () => {
|
||||
setCollapsed((prev) => !prev);
|
||||
};
|
||||
|
||||
const handleCrewPress = (crewId: string) => {
|
||||
console.log("Crew ID:", crewId);
|
||||
};
|
||||
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{/* Header toggle */}
|
||||
@@ -77,7 +87,9 @@ const CrewListTable: React.FC = () => {
|
||||
<Text style={[styles.cell, styles.left, styles.headerText]}>
|
||||
Mã định danh
|
||||
</Text>
|
||||
<Text style={[styles.cell, styles.headerText]}>Tên</Text>
|
||||
<View style={styles.cellWrapper}>
|
||||
<Text style={[styles.cell, styles.headerText]}>Tên</Text>
|
||||
</View>
|
||||
<Text style={[styles.cell, styles.right, styles.headerText]}>
|
||||
Chức vụ
|
||||
</Text>
|
||||
@@ -87,7 +99,12 @@ const CrewListTable: React.FC = () => {
|
||||
{data.map((item) => (
|
||||
<View key={item.id} style={styles.row}>
|
||||
<Text style={[styles.cell, styles.left]}>{item.maDinhDanh}</Text>
|
||||
<Text style={[styles.cell]}>{item.ten}</Text>
|
||||
<TouchableOpacity
|
||||
style={styles.cellWrapper}
|
||||
onPress={() => handleCrewPress(item.id)}
|
||||
>
|
||||
<Text style={[styles.cell, styles.linkText]}>{item.ten}</Text>
|
||||
</TouchableOpacity>
|
||||
<Text style={[styles.cell, styles.right]}>{item.chucVu}</Text>
|
||||
</View>
|
||||
))}
|
||||
@@ -109,7 +126,9 @@ const CrewListTable: React.FC = () => {
|
||||
<Text style={[styles.cell, styles.left, styles.headerText]}>
|
||||
Mã định danh
|
||||
</Text>
|
||||
<Text style={[styles.cell, styles.headerText]}>Tên</Text>
|
||||
<View style={styles.cellWrapper}>
|
||||
<Text style={[styles.cell, styles.headerText]}>Tên</Text>
|
||||
</View>
|
||||
<Text style={[styles.cell, styles.right, styles.headerText]}>
|
||||
Chức vụ
|
||||
</Text>
|
||||
@@ -119,7 +138,12 @@ const CrewListTable: React.FC = () => {
|
||||
{data.map((item) => (
|
||||
<View key={item.id} style={styles.row}>
|
||||
<Text style={[styles.cell, styles.left]}>{item.maDinhDanh}</Text>
|
||||
<Text style={[styles.cell]}>{item.ten}</Text>
|
||||
<TouchableOpacity
|
||||
style={styles.cellWrapper}
|
||||
onPress={() => handleCrewPress(item.id)}
|
||||
>
|
||||
<Text style={[styles.cell, styles.linkText]}>{item.ten}</Text>
|
||||
</TouchableOpacity>
|
||||
<Text style={[styles.cell, styles.right]}>{item.chucVu}</Text>
|
||||
</View>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user