diff --git a/src/FrontOffice.Main/Pages/Index.razor b/src/FrontOffice.Main/Pages/Index.razor index 34e0d9d..b4651dd 100644 --- a/src/FrontOffice.Main/Pages/Index.razor +++ b/src/FrontOffice.Main/Pages/Index.razor @@ -163,10 +163,13 @@ @(p.Title) @((MarkupString)p.Body) - - + @(p.Price.ToThousands().ToCurrencyUnitIRT()) + + مشاهده جزئیات diff --git a/src/FrontOffice.Main/Pages/Index.razor.cs b/src/FrontOffice.Main/Pages/Index.razor.cs index 4b162e0..3aa4324 100644 --- a/src/FrontOffice.Main/Pages/Index.razor.cs +++ b/src/FrontOffice.Main/Pages/Index.razor.cs @@ -26,10 +26,11 @@ public partial class Index if (response?.Models?.Any() == true) { _packs = response.Models.Select(p => new Pack( - p.Id, - p.Title, - p.Description, - Image: UrlUtility.DownloadUrl + p.ImagePath + Id: p.Id, + Title: p.Title, + Body: p.Description, + Image: UrlUtility.DownloadUrl + p.ImagePath, + Price: p.Price )).ToList(); } else @@ -64,7 +65,7 @@ public partial class Index Navigation.NavigateTo($"{RouteConstants.Package.Detail}/{packageId}"); } - private record Pack(long Id,string Title, string Body, string Image); + private record Pack(long Id, string Title, string Body, string Image, long Price); private record Plan(string Name, string Price, bool Highlight, IEnumerable Features); private record QA(string Q, string A); private readonly List _faqs = new() diff --git a/src/FrontOffice.Main/Pages/PackageDetail.razor b/src/FrontOffice.Main/Pages/PackageDetail.razor index 1d624fc..97b6556 100644 --- a/src/FrontOffice.Main/Pages/PackageDetail.razor +++ b/src/FrontOffice.Main/Pages/PackageDetail.razor @@ -30,8 +30,78 @@ else + + + + + + + + + + @(_package.Title) + + + + + + @if (_package.Pricing.HasDiscount) + { +
+ + @_package.Pricing.OriginalPrice.ToThousands().ToCurrencyUnitIRT() + @_package.Pricing.DiscountPercent% تخفیف + + @_package.Pricing.FinalPrice.ToThousands().ToCurrencyUnitIRT() +
+ } + else + { + @_package.Pricing.FinalPrice.ToThousands().ToCurrencyUnitIRT() + } + + + + @(_isPurchasing ? "در حال پردازش..." : "خرید پکیج") + + + +
+ شامل: + + @foreach (var feature in _package.Features) + { + + + @feature + + } + +
+ + + + + + پشتیبانی ۲۴ ساعته + +
+
+
+ - + @@ -144,76 +214,6 @@ else } - - - - - - - - - - - @(_package.Title) - - - - - - @if (_package.Pricing.HasDiscount) - { -
- - @_package.Pricing.OriginalPrice.ToString("N0") تومان - @_package.Pricing.DiscountPercent% تخفیف - - @_package.Pricing.FinalPrice.ToString("N0") تومان -
- } - else - { - @_package.Pricing.FinalPrice.ToString("N0") تومان - } - - - - @(_isPurchasing ? "در حال پردازش..." : "خرید پکیج") - - - -
- شامل: - - @foreach (var feature in _package.Features) - { - - - @feature - - } - -
- - - - - - پشتیبانی ۲۴ ساعته - -
-
-