chore: add new address
This commit is contained in:
@@ -362,6 +362,24 @@ export const confirmReception = async (
|
||||
}
|
||||
};
|
||||
|
||||
export const respondToAddressProposal = async (
|
||||
commandId: number,
|
||||
accepted: boolean,
|
||||
): Promise<{ success: boolean; message: string }> => {
|
||||
try {
|
||||
const { data } = await apiClient.post(
|
||||
`${V1}/commands/${commandId}/address/respond`,
|
||||
{ accepted },
|
||||
);
|
||||
return { success: true, message: data.message || "Réponse enregistrée" };
|
||||
} catch (error: any) {
|
||||
return {
|
||||
success: false,
|
||||
message: error.response?.data?.error || "Erreur lors de la réponse",
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
// ============================================
|
||||
// TRACKING
|
||||
// ============================================
|
||||
|
||||
@@ -256,6 +256,10 @@ export interface OrderDetail {
|
||||
// Métadonnées
|
||||
payment_method?: string;
|
||||
notes?: string;
|
||||
|
||||
// Proposition de modification d'adresse
|
||||
proposed_address?: string | null;
|
||||
address_proposal_status?: "none" | "pending" | "accepted" | "rejected";
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user