fix problem update price in cart
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user