This commit is contained in:
@@ -142,6 +142,7 @@ export interface DeliveryItem {
|
|||||||
adresse: string;
|
adresse: string;
|
||||||
total_prix: number;
|
total_prix: number;
|
||||||
referral_used?: number;
|
referral_used?: number;
|
||||||
|
is_new_client?: boolean;
|
||||||
created_at: string;
|
created_at: string;
|
||||||
updated_at: string;
|
updated_at: string;
|
||||||
eta?: string;
|
eta?: string;
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import {
|
|||||||
useWindowDimensions,
|
useWindowDimensions,
|
||||||
} from "react-native";
|
} from "react-native";
|
||||||
import Geolocation from "@react-native-community/geolocation";
|
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 * as Location from "expo-location";
|
||||||
import { spacing, fontSize, borderRadius } from "../../theme";
|
import { spacing, fontSize, borderRadius } from "../../theme";
|
||||||
import { useTheme } from "../../context/ThemeContext";
|
import { useTheme } from "../../context/ThemeContext";
|
||||||
@@ -271,6 +271,8 @@ export default function DashboardScreen() {
|
|||||||
[],
|
[],
|
||||||
referral_used:
|
referral_used:
|
||||||
detail.delivery?.referral_used || 0,
|
detail.delivery?.referral_used || 0,
|
||||||
|
is_new_client:
|
||||||
|
detail.delivery?.is_new_client || false,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
@@ -623,6 +625,38 @@ export default function DashboardScreen() {
|
|||||||
{item.clientName}
|
{item.clientName}
|
||||||
</Text>
|
</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>
|
</View>
|
||||||
<Badge
|
<Badge
|
||||||
label={
|
label={
|
||||||
|
|||||||
Reference in New Issue
Block a user