fix problem update price in cart

This commit is contained in:
hamid zarghami
2025-12-25 10:46:04 +03:30
parent 91b5a61fbd
commit 0f2f0d5c29
3 changed files with 109 additions and 81 deletions
@@ -29,28 +29,28 @@ const getDeliveryMethodTitle = (method: string) => {
}
};
const getStatusPercentage = (status: string) => {
switch (status) {
case 'new':
case 'pendingPayment':
return 0;
case 'paid':
case 'confirmed':
return 20;
case 'preparing':
return 40;
case 'ready':
return 60;
case 'shipped':
case 'delivering':
return 80;
case 'completed':
case 'delivered':
return 100;
default:
return 0;
}
};
// const getStatusPercentage = (status: string) => {
// switch (status) {
// case 'new':
// case 'pendingPayment':
// return 0;
// case 'paid':
// case 'confirmed':
// return 20;
// case 'preparing':
// return 40;
// case 'ready':
// return 60;
// case 'shipped':
// case 'delivering':
// return 80;
// case 'completed':
// case 'delivered':
// return 100;
// default:
// return 0;
// }
// };
const getStatusText = (status: string): string => {
const statusKey = status as keyof typeof ordersTranslations.status;