Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

Migrate CreateOrUpdate.Discounts.cshtml to AdminShared (ARCH-001 Phase 2)

KrzysztofPajakce0068bf2557
diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Product/Partials/CreateOrUpdate.Discounts.cshtml b/src/Web/Grand.Web.AdminShared/Views/Product/Partials/CreateOrUpdate.Discounts.cshtml
similarity index 95%
rename from src/Web/Grand.Web.Admin/Areas/Admin/Views/Product/Partials/CreateOrUpdate.Discounts.cshtml
rename to src/Web/Grand.Web.AdminShared/Views/Product/Partials/CreateOrUpdate.Discounts.cshtml
index a15fb8b3d..8380a9dd4 100644
--- a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Product/Partials/CreateOrUpdate.Discounts.cshtml
+++ b/src/Web/Grand.Web.AdminShared/Views/Product/Partials/CreateOrUpdate.Discounts.cshtml
@@ -1,4 +1,4 @@
-@model ProductModel
+@model ProductModel
<vc:admin-widget widget-zone="product_details_discounts_top" additional-data="Model"/>
@if (Model.AvailableDiscounts is { Count: > 0 })
{
@@ -22,4 +22,4 @@ else
@Html.Raw(Loc["Admin.Catalog.Collections.Discounts.NoDiscounts"])
</div>
}
-<vc:admin-widget widget-zone="product_details_discounts_bottom" additional-data="Model"/>
\ No newline at end of file
+<vc:admin-widget widget-zone="product_details_discounts_bottom" additional-data="Model"/>
diff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Product/Partials/CreateOrUpdate.Discounts.cshtml b/src/Web/Grand.Web.Store/Areas/Store/Views/Product/Partials/CreateOrUpdate.Discounts.cshtml
deleted file mode 100644
index a15fb8b3d..000000000
--- a/src/Web/Grand.Web.Store/Areas/Store/Views/Product/Partials/CreateOrUpdate.Discounts.cshtml
+++ /dev/null
@@ -1,25 +0,0 @@
-@model ProductModel
-<vc:admin-widget widget-zone="product_details_discounts_top" additional-data="Model"/>
-@if (Model.AvailableDiscounts is { Count: > 0 })
-{
- <div class="mt-checkbox-list">
- @foreach (var discount in Model.AvailableDiscounts)
- {
- <label class="mt-checkbox mt-checkbox-outline control control-checkbox">
- <input type="checkbox" name="SelectedDiscountIds" value="@discount.Id"
- @if (Model.SelectedDiscountIds != null && Model.SelectedDiscountIds.Contains(discount.Id))
- {
- <text> checked="checked" </text>
- }/>@discount.Name
- <div class="control__indicator"></div>
- </label>
- }
- </div>
-}
-else
-{
- <div class="note note-info">
- @Html.Raw(Loc["Admin.Catalog.Collections.Discounts.NoDiscounts"])
- </div>
-}
-<vc:admin-widget widget-zone="product_details_discounts_bottom" additional-data="Model"/>
\ No newline at end of file