Add CurrencyController to Grand.Web.Store for SaaS per-store currency management - #698
Conversation
…cy management Agent-Logs-Url: https://github.com/grandnode/grandnode2/sessions/ead7dcab-44e3-4922-91e9-b4b63d39da43 Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
…n view Agent-Logs-Url: https://github.com/grandnode/grandnode2/sessions/ead7dcab-44e3-4922-91e9-b4b63d39da43 Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
|
@copilot Hide unpublished currencies |
Agent-Logs-Url: https://github.com/grandnode/grandnode2/sessions/1ca790d7-0fe6-440e-be65-2f2318340176 Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
Done in 61e3852 — Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot When currency is possible to assign, there is a text: Microsoft.AspNetCore.Mvc.ViewFeatures.AntiforgeryExtensions+InputContent |
Agent-Logs-Url: https://github.com/grandnode/grandnode2/sessions/e462a852-5760-4d9b-9e0d-283b9307b782 Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
Fixed in 81277a7:
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot AssignStore and UnAssignStore - should be ajax request or shoud be redirect to list |
Agent-Logs-Url: https://github.com/grandnode/grandnode2/sessions/3f509641-f86c-4513-9b30-d2305c575710 Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
Changed to AJAX in 444b4c2 — both actions now use Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot Grand.Web.Store - list currencies - mark currency that assign or unssign to the Store manager |
|
@copilot on the list of currencies add button Set as Default Currency - this Action should set default currency for the store Owner on Store entitie |
Agent-Logs-Url: https://github.com/grandnode/grandnode2/sessions/e9e250d2-a982-4445-8552-ee850c2becbe Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
Done in 2c90d7f — currencies assigned to the current store now show a green badge (✓) next to the name in the Name column. The existing yellow star badge for the primary store currency is preserved. Both badges update immediately after assign/unassign since the grid refreshes in-place via Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
…ency Agent-Logs-Url: https://github.com/grandnode/grandnode2/sessions/ea1a4fce-6921-4286-872c-6249c1e3383a Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
Agent-Logs-Url: https://github.com/grandnode/grandnode2/sessions/ea1a4fce-6921-4286-872c-6249c1e3383a Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
|
@copilot For Grand.Web.Store currency service and list of currencies, should not be limitd per store, maybe the best way will be add new method (just only published) |
…rrencyController Agent-Logs-Url: https://github.com/grandnode/grandnode2/sessions/01a6e679-44ee-4cf7-90f1-4b0b9232c271 Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
Done in 4888e49 — added Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
…Store CurrencyController" This reverts commit 4888e49.
There was a problem hiding this comment.
Pull request overview
Adds a new Store-area currency management UI intended for SaaS/per-store currency assignment and default-currency selection within Grand.Web.Store.
Changes:
- Introduces
StoreCurrencyModelto drive a Kendo grid for currency listing/status flags. - Adds a Store-area
CurrencyControllerwith JSON grid endpoint plus AJAX actions to assign/unassign currencies to the current store and set/unset the store default currency. - Adds a Store-area
Currency/List.cshtmlview implementing the Kendo grid + AJAX action buttons.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| src/Web/Grand.Web.Store/Models/StoreCurrencyModel.cs | New view-model for presenting currency/store status in the Store UI grid. |
| src/Web/Grand.Web.Store/Controllers/CurrencyController.cs | New Store-area controller providing grid data and endpoints for store assignment and default currency changes. |
| src/Web/Grand.Web.Store/Areas/Store/Views/Currency/List.cshtml | New Store UI page with Kendo grid and AJAX actions for currency assignment/default selection. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/grandnode/grandnode2/sessions/437b4398-4875-4fbd-9496-9ed644afdfb2 Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
…aSourceRequest param Agent-Logs-Url: https://github.com/grandnode/grandnode2/sessions/5633c6a6-55c8-4391-a6f9-d54b35227f5d Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Agent-Logs-Url: https://github.com/grandnode/grandnode2/sessions/b723aac6-0971-4975-a9d0-89ea738735f2 Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
…ncies Agent-Logs-Url: https://github.com/grandnode/grandnode2/sessions/4a6c6a72-736b-4459-9fb6-a0c40ffff38f Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
StoreCurrencyModelinGrand.Web.Store/Models/CurrencyControllerinGrand.Web.Store/Controllers/with:List()GET – returns the list viewListData()POST – returns JSON data for Kendo grid (published currencies only, no store filtering)AssignStore(string id)POST – assigns current store to a per-store currencyUnassignStore(string id)POST – removes current store from a per-store currency (blocked for primary store currency)SetDefaultCurrency(string id)POST – setsStore.DefaultCurrencyIdfor the store owner viaIStoreService.UpdateStore; validates the currency is assigned to the store firstUnsetDefaultCurrency(string id)POST – clearsStore.DefaultCurrencyId; validates the currency is currently the store defaultAreas/Store/Views/Currency/List.cshtmlwith Kendo grid showing published currencies with the following columns:-otherwiseGetAllPublishedCurrencies()(no store ACL filtering)DefaultLanguage.xml:admin.common.actions,admin.configuration.currencies.assignstore,admin.configuration.currencies.unassignstore,admin.configuration.currencies.setdefaultcurrency,admin.configuration.currencies.unsetdefaultcurrency,admin.configuration.currencies.notassignedtostore,admin.configuration.currencies.notdefaultcurrency