Add ShippingController to Grand.Web.Store and StoreId support to Admin Shipping for delivery dates, warehouses, pickup points, and shipping methods#702
Conversation
…ses, and pickup points per store Agent-Logs-Url: https://github.com/grandnode/grandnode2/sessions/6f46e96f-0a47-461a-b122-306c82c07139 Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
Agent-Logs-Url: https://github.com/grandnode/grandnode2/sessions/6f46e96f-0a47-461a-b122-306c82c07139 Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
…add storeId filter to GetAllWarehouses/GetAllDeliveryDates Agent-Logs-Url: https://github.com/grandnode/grandnode2/sessions/7619c4f6-ba72-4fd8-94d2-76228b83d336 Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
…oller pickup points section Agent-Logs-Url: https://github.com/grandnode/grandnode2/sessions/7619c4f6-ba72-4fd8-94d2-76228b83d336 Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
…up point in Store area; store owners see only their own data Agent-Logs-Url: https://github.com/grandnode/grandnode2/sessions/3cbffee5-4776-46b3-9e36-9f2c6fb8a13c Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
…ix WarehouseId validation span in pickup point partial Agent-Logs-Url: https://github.com/grandnode/grandnode2/sessions/3cbffee5-4776-46b3-9e36-9f2c6fb8a13c Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
|
@copilot remove cache from: |
Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
Done — cache removed from |
|
…ore ToList; add pagination to all three GetAll methods Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
Done in
|
|
@copilot Grand.Web.Admin - Add support for StoreId to Warehouse/DeliveryDate/PickupPoint in Shipping |
…ing views Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
Done in the latest commit. Here's what was changed:
|
Done in |
Replaced the `storeScope` variable with `CurrentStoreId` for loading shipping settings and assigning the active store. This change simplifies the code and reduces redundancy.
…tro' of https://github.com/grandnode/grandnode2 into copilot/add-delivery-dates-warehouses-pickup-points-contro
|
@copilot improve Shipping restrictions - Add support per store in Grand.Web.Admin - add Grand.Web.Store by current store |
Agent-Logs-Url: https://github.com/grandnode/grandnode2/sessions/de700b2e-fb8c-4f54-aef1-881c2c24f7cc Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
This reverts commit 382b65f.
|
@copilot Grand.Web.Store - Add Shipping methods action from Grand.Web.Admin - Add support shippingmethod by storeId (add new field StoreId) |
…d.Web.Admin Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
Done in the latest commit. Here's what was changed: Domain/Service layer:
Admin (
Store (
Resource keys added:
|
|
@copilot Grand.Web.Admin - add store name to the lists of DeliveryDates, Warehouses, Pickup points |
…dmin Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
Done. Added |
|
@copilot ShippingMethodService.GetAllShippingMethods remove cache and use the best standards for LINQ |
… LINQ best practices Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
Done. Cache removed from |
…tro' of https://github.com/grandnode/grandnode2 into copilot/add-delivery-dates-warehouses-pickup-points-contro
Adds full CRUD support for warehouses, delivery dates, pickup points, and shipping methods in
Grand.Web.Store, with store-owner data isolation so each store owner only sees and manages their own records. Also addsStoreIdsupport to the existingGrand.Web.Adminshipping management for all four entities. Adds shipping settings and provider management toGrand.Web.Store, both scoped to the current store.Service Layer Changes
IDeliveryDateService.GetAllDeliveryDates,IWarehouseService.GetAllWarehouses, andIPickupPointService.GetAllPickupPointsupdated withstoreIdparameter,pageIndex/pageSizepagination parameters, andIPagedList<T>return typeGetAll*methods — each now queries the repository directly with filtering applied to theIQueryablebefore pagination (no in-memory filtering)PagedList<T>.Create(query, pageIndex, pageSize)following the existingShipmentServicepatternIShippingMethodService.GetAllShippingMethods; the method now queries the repository directly, applies thestoreIdfilter on theIQueryablebefore materialization, and performs country/customer-group restriction filters in-memory after fetchingController & Views (Grand.Web.Store)
ShippingControllerwith full CRUD (list, create, edit, delete) for warehouses, delivery dates, pickup points, and shipping methodsSettings()GET and POST actions added to the StoreShippingController, loading and savingShippingSettingsscoped exclusively toCurrentStoreIdSettings.cshtmlview mirrors the admin shipping settings view but targetsAreaStoreand omits the global store-scope selectorProviders()GET/POST andProviderUpdatePOST actions added to the StoreShippingController, loadingShippingProviderSettingsscoped toCurrentStoreIdand toggling provider active/inactive state per storeProviders.cshtmlview mirrors the admin providers view but targetsAreaStoreand omits the global store-scope selectorStoreId == CurrentStoreId_ViewImports.cshtmlupdated withGrand.Web.AdminShared.Models.ShippingnamespaceAdmin (Grand.Web.Admin) — StoreId Support
WarehouseModel,DeliveryDateModel, andShippingMethodModelextended withStoreId,AvailableStores, andStoreNamepropertiesShippingController(Admin) updated: newPrepareDeliveryDateModel,PrepareShippingMethodModelhelpers and updatedPrepareAddressWarehouseModelnow populate the store dropdown for create/edit formsDeliveryDates,Warehouses, andPickupPointslist actions populateStoreNamevia O(1) dictionary lookup and return it in the grid dataCreateOrUpdateWarehouse.cshtml,CreateOrUpdateDeliveryDate.cshtml, andCreateOrUpdateMethod.cshtmlpartial views now render a store selector dropdownDeliveryDates.cshtml,Warehouses.cshtml, andPickupPoints.cshtmllist views now display a "Store" columnAdmin.Configuration.Shipping.Warehouses.Fields.Store,Admin.Configuration.Shipping.Warehouses.SelectStore,Admin.Configuration.Shipping.DeliveryDates.Fields.Store,Admin.Configuration.Shipping.DeliveryDates.SelectStore,Admin.Configuration.Shipping.Methods.Fields.Store,Admin.Configuration.Shipping.Methods.SelectStoreCleanup
StoreDeliveryDateModel,StoreWarehouseModel,StorePickupPointModelProductImportDataObjectTestsupdated to match new signatures andIPagedList<T>return types