This commit is contained in:
@@ -142,6 +142,7 @@ export interface DeliveryItem {
|
||||
adresse: string;
|
||||
total_prix: number;
|
||||
referral_used?: number;
|
||||
is_new_client?: boolean;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
eta?: string;
|
||||
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
useWindowDimensions,
|
||||
} from "react-native";
|
||||
import Geolocation from "@react-native-community/geolocation";
|
||||
import { Ionicons } from "@expo/vector-icons";
|
||||
import { Ionicons, FontAwesome5 } from "@expo/vector-icons";
|
||||
import * as Location from "expo-location";
|
||||
import { spacing, fontSize, borderRadius } from "../../theme";
|
||||
import { useTheme } from "../../context/ThemeContext";
|
||||
@@ -271,6 +271,8 @@ export default function DashboardScreen() {
|
||||
[],
|
||||
referral_used:
|
||||
detail.delivery?.referral_used || 0,
|
||||
is_new_client:
|
||||
detail.delivery?.is_new_client || false,
|
||||
};
|
||||
}
|
||||
} catch {
|
||||
@@ -623,6 +625,38 @@ export default function DashboardScreen() {
|
||||
{item.clientName}
|
||||
</Text>
|
||||
)}
|
||||
{item.is_new_client && (
|
||||
<View
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
alignItems: "center",
|
||||
alignSelf: "flex-start",
|
||||
gap: spacing.xs,
|
||||
marginTop: spacing.xs,
|
||||
paddingHorizontal: spacing.m,
|
||||
paddingVertical: spacing.xs,
|
||||
borderRadius: borderRadius.xl,
|
||||
borderWidth: 1,
|
||||
borderColor: "#EF4444",
|
||||
backgroundColor: "#EF444422",
|
||||
}}
|
||||
>
|
||||
<FontAwesome5
|
||||
name="user-plus"
|
||||
size={11}
|
||||
color={"#EF4444"}
|
||||
/>
|
||||
<Text
|
||||
style={{
|
||||
color: "#EF4444",
|
||||
fontSize: fontSize.xs,
|
||||
fontWeight: "600",
|
||||
}}
|
||||
>
|
||||
NEW
|
||||
</Text>
|
||||
</View>
|
||||
)}
|
||||
</View>
|
||||
<Badge
|
||||
label={
|
||||
|
||||
Reference in New Issue
Block a user