- Added SEO configuration settings in appsettings for both development and staging environments, including site URL, name, and default description.
- Registered SEO-related services in the dependency injection container, including `SeoMetadataProvider` and `SitemapGenerator`.
- Updated the main program to configure SEO settings and map a new endpoint for generating the sitemap.
- Enhanced the `_Host.cshtml` page to utilize SEO metadata, including title, description, and Open Graph tags, improving search engine visibility and user engagement.
These changes significantly enhance the SEO capabilities of the application, ensuring better indexing and presentation in search results.
- Introduced an `_initialized` flag to manage product loading state more effectively.
- Updated `OnParametersSetAsync` to conditionally load product details based on the initialization state and valid product ID.
- Refactored product retrieval logic in `ProductService` to handle invalid IDs and improve fallback mechanisms for fetching product details.
These changes improve the reliability and performance of the product detail component, ensuring that product information is loaded correctly and efficiently.
- Introduced a "How It Works" section with a three-step guide to enhance user onboarding.
- Added a "Features" section showcasing six key features with icons to highlight the platform's benefits.
- Implemented a "Stats" section displaying counter cards for key metrics, improving the overall presentation of information on the landing page.
These changes enhance the user experience by providing clear and engaging content that guides users through the platform's offerings.
- Modified `GetTopSellingAsync` methods in `ProductService` and `DiscountProductService` to include an optional `inStock` parameter for filtering products based on availability.
- Introduced a constant for the top product count in `Index.razor.cs` to improve maintainability and readability.
- Updated the product retrieval logic in `Index.razor.cs` to utilize the new in-stock filtering feature.
These changes enhance the product listing functionality by allowing users to view only in-stock top-selling products, improving the overall shopping experience.
- Updated references to `jsRuntime` to `JSRuntime` for consistency across the ChargeCreditWallet component.
- Improved the clarity of the code by ensuring uniform naming conventions in the handling of return URLs.
These changes enhance code readability and maintainability in the ChargeCreditWallet functionality.
- Added support for return URL handling in ChargeCreditWallet to improve user experience after payment.
- Introduced a "Continue Shopping" button that allows users to navigate back to their previous shopping session after successfully charging their wallet.
- Updated the component to manage pending return URLs and ensure they are saved and retrieved correctly.
These changes enhance the functionality of the ChargeCreditWallet page, providing a smoother transition for users post-transaction.
- Introduced methods for initiating and verifying credit wallet charges in the WalletService.
- Updated PaymentCallback.razor to handle credit wallet charge verification.
- Added a button for charging the credit wallet in Wallet.razor.
- Updated route constants to include the new credit wallet charge route.
These changes enhance the wallet functionality by allowing users to charge their credit wallets and verify transactions seamlessly.
Updated the organization chart component to explicitly map network node properties to a flat array with camelCase keys. This change aligns the data structure with the BackOffice admin chart, enhancing consistency and clarity in the displayed information.
Changed the imagePullPolicy for the frontoffice container to Always to ensure that the latest image is always pulled from the registry during deployment, improving the consistency of the application updates. Additionally, added a cleanup step in the kub-deploy workflow to remove the latest image from the local cache after deployment.
Updated the imagePullPolicy for the frontoffice container to IfNotPresent to optimize image pulling behavior, ensuring that images are only pulled when not already present on the node.
- Updated the version of the Foursat.CMSMicroservice.Protobuf package from 0.0.197 to 0.0.199.
- Added a new property `PackageName` to `NetworkNodeDto` and `FlatNetworkNodeDto` for better representation of membership packages.
- Updated mapping in `NetworkMembershipService` to include the new `PackageName` property.
- Enhanced the org chart display by adding a badge for the package name in the UI.
These changes improve the clarity and functionality of the network membership features.
Gate payment callback with a semaphore and block double-clicks on checkout
to avoid sending multiple verify requests after gateway redirect.
Co-authored-by: Cursor <cursoragent@cursor.com>
Guests can browse products and product details for presentation purposes,
but prices are hidden behind a 'وارد شوید' prompt (lock icon).
Authenticated users see prices as before.
Affected pages:
- Landing page (Index): top-selling regular + discount sections
- Store/Products list
- Store/ProductDetail (desktop price + mobile sticky bar)
- DiscountStore/Products list
- DiscountStore/ProductDetail (full price box)
Each code-behind now checks AuthService.IsAuthenticatedAsync() on init
and stores the result in _isAuthenticated for use in the template.
Co-authored-by: Cursor <cursoragent@cursor.com>
Changed the text for best-selling products in both the main store and credit store sections to improve clarity and consistency. The previous titles "پرخریدترین محصولات فروشگاه" and "پرخریدترین محصولات فروشگاه اعتباری" have been updated to "محصولات پرفروش فروشگاه" and "محصولات پرفروش فروشگاه اعتباری" respectively.
Both kub-deploy and prod-deploy were only running kubectl rollout restart,
meaning changes to the deployment manifest (env vars, resources, image tag)
were never applied to the cluster.
- Add scp + kubectl apply before rollout restart in kub-deploy.yml (staging)
- Add scp + kubectl apply before rollout restart in prod-deploy.yml (production)
- Add k8s/production/frontoffice-deployment.yaml with ASPNETCORE_ENVIRONMENT=Production
and image tag :prod
Co-authored-by: Cursor <cursoragent@cursor.com>
GW_URL/GwUrl env vars were baked into the Dockerfile (ENV) and the
staging K8s manifest, overriding appsettings.*.json at runtime.
This meant merging to production still used the staging CMS URL.
Now only ASPNETCORE_ENVIRONMENT is set in the manifest; the correct
GwUrl is read from appsettings.Staging.json or appsettings.Production.json
depending on the environment — as intended.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add staging-ca.crt to the Dockerfile so the ASP.NET runtime inside the
container trusts the internal staging CA. This fixes server-side gRPC
calls from FrontOffice (Blazor Server) to https://cms.se.kbs1.ir which
were failing with PartialChain because the container CA store did not
include the staging root certificate.
Also adds GW_URL env support alongside GwUrl for parity with BackOffice.
Co-authored-by: Cursor <cursoragent@cursor.com>
- Changed GW_URL and GwUrl in frontoffice-deployment.yaml and Dockerfile to use the internal service URL http://cms-svc:8080 for the staging environment.
- Enhanced ConfigureServices to handle HTTP/1.1 for gRPC when using the internal service URL, ensuring compatibility with Kestrel's requirements.
- Added GW_URL and GwUrl environment variables in frontoffice-deployment.yaml and Dockerfile for consistent gateway URL configuration.
- Updated AddGrpcServices method to resolve gateway URL from both environment variables, ensuring proper error handling for missing values.
- Modified TokenNotificationService to prioritize GW_URL over GwUrl for improved configuration flexibility.
- Removed CmsServerBaseUrl utility class and updated references to directly access GwUrl from configuration.
- Adjusted frontoffice-deployment.yaml to remove CmsInternalBaseUrl environment variable.
- Updated appsettings for staging and main environments to reflect the correct CMS service URLs.
- Ensured consistent handling of GwUrl in TokenNotificationService and AddGrpcServices methods.
- Replace direct access to configuration for GwUrl with CmsServerBaseUrl.Resolve in AddGrpcServices and TokenNotificationService.
- Ensure proper error handling for missing GwUrl and add support for optional bypass of public TLS using CmsInternalBaseUrl.
- Adjust channel credentials based on whether the base URL is HTTPS or not.
- Add two sections to landing page (Index.razor) below the hero:
- Top 6 best-selling regular products (3-per-row grid)
- Top 6 best-selling discount store products (3-per-row grid)
- Each section has a 'More' button linking to /products and /discount-store
- Add GuestActionGate utility service: wraps auth-required actions; shows
login modal for guests and resumes the original action after successful login
- Register GuestActionGate as scoped service in ConfigureServices
- Add GetTopSellingAsync(count) to ProductService and DiscountProductService
- Add optional sortBy parameter to DiscountProductService.GetProductsAsync
- Hybridize all product pages for guest browsing:
- Store/Products, Store/ProductDetail: wrap AddToCart with GuestActionGate
- DiscountStore/Products, DiscountStore/ProductDetail: wrap AddToCart with GuestActionGate
- Store/Cart, DiscountStore/Cart, Store/CheckoutSummary: soft auth gate on page init
- Fix MembershipPage membership benefit text to be package-agnostic
Co-authored-by: Cursor <cursoragent@cursor.com>
- NuGet.config: nuget.org for standard packages, local nupkg for proto
- Dockerfile: COPY nupkg/ before restore
- CI: build proto from CMS source before Docker build
Root cause: FrontOffice was converting Toman→Rial (×10) before sending to CMS,
but CMS ZarinPalService already does Toman→Rial conversion internally.
This caused double ×10 = amounts shown 10x higher in payment gateway.
Fixes:
- MagicWallet.razor.cs: remove ×10 conversion, send _chargeAmount (Toman) directly
- MagicWallet.razor: fix Max field (no /10), fix preset filter (no ×10)
- MagicWallet.razor.cs: fix FormatPrice — values from CMS are Toman, not Rial
- ChargeDiscountWallet.razor.cs: same fix — send Toman directly
- ClubMembershipContractDialog.razor: fix Price display (no /10)
1. Toman/Rial mismatch — Price from server is in Rial, now divides by 10 for correct Toman display
2. ضریب تخفیف → ضریب اعتبار label change in dialog + packages page
3. Back button already functional (ArrowForward in TitleContent) — verified
4. HTML rendering in package description via MarkupString
- حذف متن hardcoded 'پکیج پایه ۵۶ میلیون تومان' و دیالوگ inline
- ایجاد PackagePurchaseDialog — کامپوننت مستقل 2 مرحلهای:
مرحله ۱: نمایش کاشیهای پکیج (ریسپانسیو ۲-۳ تایی)
مرحله ۲: انتخاب روش پرداخت (درگاه بانکی / دایا الماس)
- دایا الماس فقط برای پکیج پایه + دور اول نمایش داده میشه
- پکیجها داینامیک از API بارگذاری میشن
- تغییر متن CTA از 'شروع فرآیند تامین اعتبار' به 'تهیه پکیج'
- تغییر متن راهنما از 'پکیج پایه را تهیه کنید' به 'یکی از پکیجها را تهیه کنید'
- CSS: hover effects + badge + responsive tiles
F6: MagicWallet.razor — جایگزینی ×2.5 و سقفهای ثابت با مقادیر از API
- WalletService: MagicMultiplier + MagicMaxCredit از gRPC response
- Index.razor.cs: 'شارژ ×2.5' → 'شارژ چندبرابری' (تایل داشبورد)
F7: ChargeDiscountWallet.razor — Max از 100M تومان به 1B تومان
اصلاح rename:
- ConfigureServices: UserWalletChangeLog → UserWalletHistory
- WalletService: اصلاح تمام رفرنسها
NuGet: v0.0.189
T4.2: Conditional Payment in Checkout
- Load package flags via PackageService.GetAllPackagesAsync
- Respect SupportsDirectPurchase/SupportsDayaPurchase flags
- Add Daya loan payment button when supported
- Show alert when no payment method available
T4.3: MyPackages Re-Purchase Logic
- Load MagicWallet status to detect cycle completion
- Show re-purchase CTA when magic cycle is complete
- Show magic wallet progress bar during active cycle
- Display deposit progress, remaining, and credited amounts
F3: PV Display in Order Details
- Add CalculateOrderPVAsync to OrderService
- Show per-product PV and total PV in Store OrderDetail
- Update NuGet to v0.0.188
- NuGet: 0.0.182 → 0.0.185 + local feed source
- PackageDetail: GetPackageAsync → GetCustomerPackageDetailsAsync
Features & specs now driven by API (PackageFeature) not hardcoded
- Packages.razor: Un-excluded from build, dynamic feature bullets
from CustomerPackageModel (DiscountMultiplier, MagicWallet, etc.)
- PackageService: Enriched PackageDto with 8 new package fields
GetUserPackageStatusAsync connected to real RPC (was stub)
- MyPackages.razor: dynamic PackageTitle from DTO instead of hardcoded 'پکیج طلایی'
- Packages.razor: generic text for purchase status and info section
- PackageService.cs: add PackageTitle to UserPackageStatusDto record