feat(order-status): add "Ready for Office Pickup" status and update related components
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 6m50s
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 6m50s
- Introduced a new order status "Ready for Office Pickup" across various components including DiscountOrdersMainPage, SalesReports, and UserOrder pages. - Updated the color and text representations for the new status in relevant dialogs and services. - Enhanced the DiscountOrderService to handle the new status in delivery processing logic. - Bumped Foursat.CMSMicroservice.Protobuf version to 0.0.207 for compatibility with the new order status features.
This commit is contained in:
@@ -143,7 +143,7 @@
|
||||
<ProjectReference Include="../../../CMS/src/CMSMicroservice.Protobuf/CMSMicroservice.Protobuf.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="!Exists('../../../CMS/src/CMSMicroservice.Protobuf/CMSMicroservice.Protobuf.csproj')">
|
||||
<PackageReference Include="Foursat.CMSMicroservice.Protobuf" Version="0.0.206" />
|
||||
<PackageReference Include="Foursat.CMSMicroservice.Protobuf" Version="0.0.207" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
<MudSelectItem T="OrderStatus" Value="@OrderStatus.Processing">در حال آمادهسازی</MudSelectItem>
|
||||
<MudSelectItem T="OrderStatus" Value="@OrderStatus.Shipped">ارسال شده</MudSelectItem>
|
||||
<MudSelectItem T="OrderStatus" Value="@OrderStatus.Delivered">تحویل داده شده</MudSelectItem>
|
||||
<MudSelectItem T="OrderStatus" Value="@OrderStatus.ReadyForOfficePickup">آماده تحویل در دفتر</MudSelectItem>
|
||||
<MudSelectItem T="OrderStatus" Value="@OrderStatus.Cancelled">لغو شده</MudSelectItem>
|
||||
<MudSelectItem T="OrderStatus" Value="@OrderStatus.Returned">مرجوع شده</MudSelectItem>
|
||||
</MudSelect>
|
||||
@@ -55,6 +56,15 @@
|
||||
</MudItem>
|
||||
}
|
||||
|
||||
@if (Model.Status == OrderStatus.ReadyForOfficePickup)
|
||||
{
|
||||
<MudItem xs="12">
|
||||
<MudAlert Severity="Severity.Info">
|
||||
<MudText>سفارش برای تحویل حضوری در دفتر آماده است.</MudText>
|
||||
</MudAlert>
|
||||
</MudItem>
|
||||
}
|
||||
|
||||
@if (Model.Status == OrderStatus.Shipped)
|
||||
{
|
||||
<MudItem xs="12">
|
||||
@@ -126,8 +136,9 @@
|
||||
OrderStatus.Processing => Color.Primary,
|
||||
OrderStatus.Shipped => Color.Secondary,
|
||||
OrderStatus.Delivered => Color.Success,
|
||||
OrderStatus.Cancelled => Color.Error,
|
||||
OrderStatus.Returned => Color.Dark,
|
||||
OrderStatus.ReadyForOfficePickup => Color.Primary,
|
||||
OrderStatus.Cancelled => Color.Dark,
|
||||
OrderStatus.Returned => Color.Error,
|
||||
_ => Color.Default
|
||||
};
|
||||
}
|
||||
@@ -141,6 +152,7 @@
|
||||
OrderStatus.Processing => "در حال آمادهسازی",
|
||||
OrderStatus.Shipped => "ارسال شده",
|
||||
OrderStatus.Delivered => "تحویل داده شده",
|
||||
OrderStatus.ReadyForOfficePickup => "آماده تحویل در دفتر",
|
||||
OrderStatus.Cancelled => "لغو شده",
|
||||
OrderStatus.Returned => "مرجوع شده",
|
||||
_ => "نامشخص"
|
||||
|
||||
@@ -91,6 +91,7 @@
|
||||
<MudSelectItem T="OrderStatus" Value="@OrderStatus.Processing">در حال آمادهسازی</MudSelectItem>
|
||||
<MudSelectItem T="OrderStatus" Value="@OrderStatus.Shipped">ارسال شده</MudSelectItem>
|
||||
<MudSelectItem T="OrderStatus" Value="@OrderStatus.Delivered">تحویل داده شده</MudSelectItem>
|
||||
<MudSelectItem T="OrderStatus" Value="@OrderStatus.ReadyForOfficePickup">آماده تحویل در دفتر</MudSelectItem>
|
||||
<MudSelectItem T="OrderStatus" Value="@OrderStatus.Cancelled">لغو شده</MudSelectItem>
|
||||
<MudSelectItem T="OrderStatus" Value="@OrderStatus.Returned">مرجوع شده</MudSelectItem>
|
||||
</MudSelect>
|
||||
@@ -114,6 +115,12 @@
|
||||
توجه: در صورت لغو یا مرجوعی سفارش، موجودی محصولات به انبار بازگردانده میشود.
|
||||
</MudAlert>
|
||||
}
|
||||
@if (_newStatus == OrderStatus.ReadyForOfficePickup)
|
||||
{
|
||||
<MudAlert Severity="Severity.Info" Dense="true">
|
||||
سفارش برای تحویل حضوری در دفتر آماده است.
|
||||
</MudAlert>
|
||||
}
|
||||
@if (_newStatus == OrderStatus.Shipped)
|
||||
{
|
||||
<MudAlert Severity="Severity.Info" Dense="true">
|
||||
|
||||
@@ -49,6 +49,8 @@
|
||||
<MudSelectItem T="OrderStatus?" Value="@OrderStatus.Shipped">ارسال شده</MudSelectItem>
|
||||
<MudSelectItem T="OrderStatus?" Value="@OrderStatus.Delivered">تحویل داده شده</MudSelectItem>
|
||||
<MudSelectItem T="OrderStatus?" Value="@OrderStatus.Cancelled">لغو شده</MudSelectItem>
|
||||
<MudSelectItem T="OrderStatus?" Value="@OrderStatus.ReadyForOfficePickup">آماده تحویل در دفتر</MudSelectItem>
|
||||
<MudSelectItem T="OrderStatus?" Value="@OrderStatus.Returned">مرجوع شده</MudSelectItem>
|
||||
</MudSelect>
|
||||
</MudItem>
|
||||
</Filters>
|
||||
|
||||
@@ -187,8 +187,9 @@ public partial class DiscountOrdersMainPage
|
||||
OrderStatus.Processing => Color.Primary,
|
||||
OrderStatus.Shipped => Color.Secondary,
|
||||
OrderStatus.Delivered => Color.Success,
|
||||
OrderStatus.Cancelled => Color.Error,
|
||||
OrderStatus.Returned => Color.Dark,
|
||||
OrderStatus.Cancelled => Color.Dark,
|
||||
OrderStatus.ReadyForOfficePickup => Color.Primary,
|
||||
OrderStatus.Returned => Color.Error,
|
||||
_ => Color.Default
|
||||
};
|
||||
}
|
||||
@@ -203,6 +204,7 @@ public partial class DiscountOrdersMainPage
|
||||
OrderStatus.Shipped => "ارسال شده",
|
||||
OrderStatus.Delivered => "تحویل داده شده",
|
||||
OrderStatus.Cancelled => "لغو شده",
|
||||
OrderStatus.ReadyForOfficePickup => "آماده تحویل در دفتر",
|
||||
OrderStatus.Returned => "مرجوع شده",
|
||||
_ => "نامشخص"
|
||||
};
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
<MudSelectItem T="OrderStatus?" Value="OrderStatus.Processing">در حال پردازش</MudSelectItem>
|
||||
<MudSelectItem T="OrderStatus?" Value="OrderStatus.Shipped">ارسال شده</MudSelectItem>
|
||||
<MudSelectItem T="OrderStatus?" Value="OrderStatus.Delivered">تحویل شده</MudSelectItem>
|
||||
<MudSelectItem T="OrderStatus?" Value="OrderStatus.ReadyForOfficePickup">آماده تحویل در دفتر</MudSelectItem>
|
||||
<MudSelectItem T="OrderStatus?" Value="OrderStatus.Cancelled">لغو شده</MudSelectItem>
|
||||
<MudSelectItem T="OrderStatus?" Value="OrderStatus.Returned">مرجوع شده</MudSelectItem>
|
||||
</MudSelect>
|
||||
@@ -498,7 +499,8 @@
|
||||
OrderStatus.Processing => Color.Info,
|
||||
OrderStatus.Shipped => Color.Info,
|
||||
OrderStatus.Delivered => Color.Success,
|
||||
OrderStatus.Cancelled => Color.Error,
|
||||
OrderStatus.ReadyForOfficePickup => Color.Primary,
|
||||
OrderStatus.Cancelled => Color.Dark,
|
||||
OrderStatus.Returned => Color.Error,
|
||||
_ => Color.Default
|
||||
};
|
||||
@@ -513,6 +515,7 @@
|
||||
OrderStatus.Processing => "در حال پردازش",
|
||||
OrderStatus.Shipped => "ارسال شده",
|
||||
OrderStatus.Delivered => "تحویل شده",
|
||||
OrderStatus.ReadyForOfficePickup => "آماده تحویل در دفتر",
|
||||
OrderStatus.Cancelled => "لغو شده",
|
||||
OrderStatus.Returned => "مرجوع شده",
|
||||
_ => "نامشخص"
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
<MudSelectItem T="int" Value="2">تحویل پست</MudSelectItem>
|
||||
<MudSelectItem T="int" Value="3">تحویل به مشتری</MudSelectItem>
|
||||
<MudSelectItem T="int" Value="4">مرجوع شده</MudSelectItem>
|
||||
<MudSelectItem T="int" Value="5">لغو شده</MudSelectItem>
|
||||
<MudSelectItem T="int" Value="6">آماده تحویل در دفتر</MudSelectItem>
|
||||
</MudSelect>
|
||||
</MudItem>
|
||||
|
||||
@@ -56,6 +58,24 @@
|
||||
</MudItem>
|
||||
}
|
||||
|
||||
@if (_newStatus == 5)
|
||||
{
|
||||
<MudItem xs="12">
|
||||
<MudAlert Severity="Severity.Warning">
|
||||
توجه: وضعیت «لغو شده» یعنی ارسال این سفارش متوقف شده است.
|
||||
</MudAlert>
|
||||
</MudItem>
|
||||
}
|
||||
|
||||
@if (_newStatus == 6)
|
||||
{
|
||||
<MudItem xs="12">
|
||||
<MudAlert Severity="Severity.Info">
|
||||
سفارش برای تحویل حضوری در دفتر آماده است.
|
||||
</MudAlert>
|
||||
</MudItem>
|
||||
}
|
||||
|
||||
@if (_newStatus == 2)
|
||||
{
|
||||
<MudItem xs="12">
|
||||
|
||||
@@ -37,6 +37,8 @@ public partial class ChangeOrderStatusDialog
|
||||
2 => "تحویل پست",
|
||||
3 => "تحویل به مشتری",
|
||||
4 => "مرجوع شده",
|
||||
5 => "لغو شده",
|
||||
6 => "آماده تحویل در دفتر",
|
||||
_ => "بدون ارسال / نامشخص"
|
||||
};
|
||||
}
|
||||
@@ -49,6 +51,8 @@ public partial class ChangeOrderStatusDialog
|
||||
2 => Color.Info,
|
||||
3 => Color.Success,
|
||||
4 => Color.Error,
|
||||
5 => Color.Dark,
|
||||
6 => Color.Primary,
|
||||
_ => Color.Default
|
||||
};
|
||||
}
|
||||
|
||||
@@ -95,6 +95,8 @@
|
||||
<MudSelectItem T="int" Value="2">تحویل پست</MudSelectItem>
|
||||
<MudSelectItem T="int" Value="3">تحویل به مشتری</MudSelectItem>
|
||||
<MudSelectItem T="int" Value="4">مرجوع شده</MudSelectItem>
|
||||
<MudSelectItem T="int" Value="5">لغو شده</MudSelectItem>
|
||||
<MudSelectItem T="int" Value="6">آماده تحویل در دفتر</MudSelectItem>
|
||||
</MudSelect>
|
||||
</MudText>
|
||||
<MudTextField T="string"
|
||||
|
||||
@@ -59,6 +59,8 @@ public partial class UserOrderDetailsDialog
|
||||
2 => Color.Info, // InTransit
|
||||
3 => Color.Success, // Delivered
|
||||
4 => Color.Error, // Returned
|
||||
5 => Color.Dark, // Cancelled
|
||||
6 => Color.Primary, // ReadyForOfficePickup
|
||||
_ => Color.Default // None / Unknown
|
||||
};
|
||||
}
|
||||
@@ -71,6 +73,8 @@ public partial class UserOrderDetailsDialog
|
||||
2 => "تحویل پست",
|
||||
3 => "تحویل به مشتری",
|
||||
4 => "مرجوع شده",
|
||||
5 => "لغو شده",
|
||||
6 => "آماده تحویل در دفتر",
|
||||
_ => "بدون ارسال / نامشخص"
|
||||
};
|
||||
}
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
<MudSelectItem T="int?" Value="@(3)">تحویل به مشتری</MudSelectItem>
|
||||
<MudSelectItem T="int?" Value="@(4)">مرجوع شده</MudSelectItem>
|
||||
<MudSelectItem T="int?" Value="@(5)">لغو شده</MudSelectItem>
|
||||
<MudSelectItem T="int?" Value="@(6)">آماده تحویل در دفتر</MudSelectItem>
|
||||
</MudSelect>
|
||||
</MudItem>
|
||||
<MudItem xs="12" sm="6" md="3">
|
||||
|
||||
@@ -215,7 +215,8 @@ public partial class OrderSalesReports
|
||||
2 => Color.Info,
|
||||
3 => Color.Success,
|
||||
4 => Color.Error,
|
||||
5 => Color.Error,
|
||||
5 => Color.Dark,
|
||||
6 => Color.Primary,
|
||||
_ => Color.Default
|
||||
};
|
||||
}
|
||||
@@ -229,6 +230,7 @@ public partial class OrderSalesReports
|
||||
3 => "تحویل به مشتری",
|
||||
4 => "مرجوع شده",
|
||||
5 => "لغو شده",
|
||||
6 => "آماده تحویل در دفتر",
|
||||
_ => "بدون ارسال / نامشخص"
|
||||
};
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
<MudSelectItem T="int?" Value="@(3)">تحویل به مشتری</MudSelectItem>
|
||||
<MudSelectItem T="int?" Value="@(4)">مرجوع شده</MudSelectItem>
|
||||
<MudSelectItem T="int?" Value="@(5)">لغو شده</MudSelectItem>
|
||||
<MudSelectItem T="int?" Value="@(6)">آماده تحویل در دفتر</MudSelectItem>
|
||||
</MudSelect>
|
||||
</MudItem>
|
||||
</Filters>
|
||||
|
||||
@@ -213,6 +213,8 @@ public partial class UserOrderMainPage
|
||||
2 => Color.Info, // InTransit
|
||||
3 => Color.Success, // Delivered
|
||||
4 => Color.Error, // Returned
|
||||
5 => Color.Dark, // Cancelled
|
||||
6 => Color.Primary, // ReadyForOfficePickup
|
||||
_ => Color.Default // None / Unknown
|
||||
};
|
||||
}
|
||||
@@ -225,6 +227,8 @@ public partial class UserOrderMainPage
|
||||
2 => "تحویل پست",
|
||||
3 => "تحویل به مشتری",
|
||||
4 => "مرجوع شده",
|
||||
5 => "لغو شده",
|
||||
6 => "آماده تحویل در دفتر",
|
||||
_ => "بدون ارسال / نامشخص"
|
||||
};
|
||||
}
|
||||
|
||||
@@ -201,12 +201,13 @@ public class DiscountOrderService : IDiscountOrderService
|
||||
return status switch
|
||||
{
|
||||
OrderStatus.Pending => ProtoDeliveryStatus.DeliveryPending,
|
||||
OrderStatus.Paid => ProtoDeliveryStatus.DeliveryPending, // Paid but not processed yet
|
||||
OrderStatus.Paid => ProtoDeliveryStatus.DeliveryPending,
|
||||
OrderStatus.Processing => ProtoDeliveryStatus.DeliveryProcessing,
|
||||
OrderStatus.Shipped => ProtoDeliveryStatus.DeliveryShipped,
|
||||
OrderStatus.Delivered => ProtoDeliveryStatus.DeliveryDelivered,
|
||||
OrderStatus.Cancelled => ProtoDeliveryStatus.DeliveryCancelled,
|
||||
OrderStatus.Returned => ProtoDeliveryStatus.DeliveryCancelled, // Treat as cancelled
|
||||
OrderStatus.ReadyForOfficePickup => ProtoDeliveryStatus.DeliveryReadyForOffice,
|
||||
OrderStatus.Returned => ProtoDeliveryStatus.DeliveryReturned,
|
||||
_ => ProtoDeliveryStatus.DeliveryPending
|
||||
};
|
||||
}
|
||||
@@ -222,6 +223,8 @@ public class DiscountOrderService : IDiscountOrderService
|
||||
ProtoDeliveryStatus.DeliveryShipped => OrderStatus.Shipped,
|
||||
ProtoDeliveryStatus.DeliveryDelivered => OrderStatus.Delivered,
|
||||
ProtoDeliveryStatus.DeliveryCancelled => OrderStatus.Cancelled,
|
||||
ProtoDeliveryStatus.DeliveryReadyForOffice => OrderStatus.ReadyForOfficePickup,
|
||||
ProtoDeliveryStatus.DeliveryReturned => OrderStatus.Returned,
|
||||
_ => OrderStatus.Pending
|
||||
};
|
||||
}
|
||||
@@ -236,6 +239,8 @@ public class DiscountOrderService : IDiscountOrderService
|
||||
ProtoDeliveryStatus.DeliveryShipped => OrderStatus.Shipped,
|
||||
ProtoDeliveryStatus.DeliveryDelivered => OrderStatus.Delivered,
|
||||
ProtoDeliveryStatus.DeliveryCancelled => OrderStatus.Cancelled,
|
||||
ProtoDeliveryStatus.DeliveryReadyForOffice => OrderStatus.ReadyForOfficePickup,
|
||||
ProtoDeliveryStatus.DeliveryReturned => OrderStatus.Returned,
|
||||
_ => OrderStatus.Pending
|
||||
};
|
||||
}
|
||||
|
||||
@@ -33,7 +33,8 @@ public enum OrderStatus
|
||||
Shipped = 3, // DELIVERY_SHIPPED
|
||||
Delivered = 4, // DELIVERY_DELIVERED
|
||||
Cancelled = 5, // DELIVERY_CANCELLED
|
||||
Returned = 6 // Not in proto - handle in service
|
||||
Returned = 6, // DELIVERY_RETURNED
|
||||
ReadyForOfficePickup = 7 // DELIVERY_READY_FOR_OFFICE
|
||||
}
|
||||
|
||||
public class DiscountOrderDto
|
||||
|
||||
Reference in New Issue
Block a user