Skip to content

Commit

Permalink
Grand.Web.Admin - remove all dependencies to vendor
Browse files Browse the repository at this point in the history
  • Loading branch information
support committed Nov 7, 2023
1 parent fa786f4 commit 12e8210
Show file tree
Hide file tree
Showing 71 changed files with 986 additions and 2,367 deletions.
31 changes: 2 additions & 29 deletions src/Web/Grand.Web.Admin/Areas/Admin/Views/Home/Index.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@using Grand.Business.Core.Interfaces.Common.Directory
@model DashboardModel

@inject Grand.Domain.Customers.CustomerSettings customerSettings
@inject Grand.Business.Core.Interfaces.Common.Security.IPermissionService permissionService
Expand All @@ -22,7 +21,7 @@
}

<vc:admin-widget widget-zone="admin_dashboard_top" additional-data="null"/>
@if (!Model.IsLoggedInAsVendor && canManageOrders)
@if (canManageOrders)
{
<div class="form-row top_tiles">
<div class="animated flipInY col-lg-4 col-md-4 col-sm-6 col-12">
Expand Down Expand Up @@ -143,33 +142,7 @@
}
</div>
</div>
}
@if (Model.IsLoggedInAsVendor)
{
<div class="row">
<div class="col-md-12">
<div class="x_panel">
<div class="x_title">
<h2>@Loc["Admin.Dashboard.Summary"]</h2>
<div class="filter">
<div class="page-bar" style="height:43px;">
<div class="page-toolbar">
<div id="dashboard-report-range" class="pull-right btn btn-fit-height green" data-original-title="Change dashboard date range">
<i class="icon-calendar"></i>&nbsp;
<span class="thin uppercase d-none d-sm-inline"></span>&nbsp;
<i class="fa fa-angle-down"></i>
</div>
</div>
</div>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>
}
@if (canManageOrders)
{

<div class="row">
<div class="col-md-12">
<div class="x_panel light bordered">
Expand Down
13 changes: 5 additions & 8 deletions src/Web/Grand.Web.Admin/Areas/Admin/Views/Home/Statistics.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@model DashboardModel
@inject Grand.Business.Core.Interfaces.Common.Security.IPermissionService permissionService
@inject Grand.Business.Core.Interfaces.Common.Security.IPermissionService permissionService

@{
//page title
Expand Down Expand Up @@ -28,7 +27,7 @@
<div class="content">
<div class="row">
<div class="col-md-12">
@if (!Model.IsLoggedInAsVendor && canManageOrders)
@if (canManageOrders)
{
<div class="row">
<div class="col-md-12">
Expand All @@ -45,10 +44,9 @@
</div>
</div>
}
@if (!Model.IsLoggedInAsVendor)

@if (canManageOrders || canManageCustomers || canManageProducts)
{
if (canManageOrders || canManageCustomers || canManageProducts)
{
<div class="row">
@if (canManageOrders)
{
Expand Down Expand Up @@ -115,9 +113,8 @@
}

</div>
}
}

@if (canManageOrders)
{
<div class="row">
Expand Down
62 changes: 30 additions & 32 deletions src/Web/Grand.Web.Admin/Areas/Admin/Views/Order/Edit.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
var canManageMessageQueue = await permissionService.Authorize(Grand.Business.Core.Utilities.Common.Security.StandardPermission.ManageMessageQueue);
}
<form asp-area="@Constants.AreaAdmin" asp-controller="Order" asp-action="Edit" method="post" id="order-form">
<input type="hidden" asp-for="Id" />
<input type="hidden" asp-for="Id"/>
<div asp-validation-summary="All"></div>
<div class="row">
<div class="col-md-12">
Expand All @@ -17,22 +17,23 @@
<div class="caption">
<i class="icon-basket"></i>
@Loc["Admin.Orders.EditOrderDetails"] - @Model.OrderNumber
<small><i class="fa fa-arrow-circle-left"></i>@Html.ActionLink(Loc["Admin.Orders.BackToList"], "List")</small>
<small>
<i class="fa fa-arrow-circle-left"></i>@Html.ActionLink(Loc["Admin.Orders.BackToList"], "List")
</small>
</div>
<div class="actions">
<div class="btn-group btn-group-devided util-btn-margin-bottom-5">
<a href="@Url.Action("PdfInvoice", new { orderId = Model.Id, area = Constants.AreaAdmin })" class="btn purple">
<i class="fa fa-file-pdf-o"></i> @Loc["Admin.Orders.PdfInvoice"]
</a>
@if (!Model.IsLoggedInAsVendor)
{
<span id="order-delete" class="btn red"><i class="fa fa-trash-o"></i> @Loc["Admin.Common.Delete"]</span>
<a asp-action="CancelOrder" asp-route-id="@Model.Id" class="btn border-red" onclick="return confirm('@Loc["Admin.Common.AreYouSure"]');">
<i class="red fa fa-times-circle-o"></i>
@Loc["Admin.Common.Cancel"]
</a>
}
<input type="submit" id="btnRefreshPage" style="display: none" />
<span id="order-delete" class="btn red">
<i class="fa fa-trash-o"></i> @Loc["Admin.Common.Delete"]
</span>
<a asp-action="CancelOrder" asp-route-id="@Model.Id" class="btn border-red" onclick="return confirm('@Loc["Admin.Common.AreYouSure"]');">
<i class="red fa fa-times-circle-o"></i>
@Loc["Admin.Common.Cancel"]
</a>
<input type="submit" id="btnRefreshPage" style="display: none"/>
<script>
$(document).ready(function () {
$('#btnRefreshPage').click(function () {
Expand All @@ -41,7 +42,7 @@
});
});
</script>
<vc:admin-widget widget-zone="order_details_buttons" additional-data="Model" />
<vc:admin-widget widget-zone="order_details_buttons" additional-data="Model"/>
</div>
</div>
</div>
Expand All @@ -51,15 +52,15 @@
<tabstrip-item text="@Loc["Admin.Orders.Info"]" tab-index="0">
<content>
<div>
<partial name="Partials/OrderDetails.Info" model="Model" />
<partial name="Partials/OrderDetails.Info" model="Model"/>
</div>
</content>
</tabstrip-item>

<tabstrip-item text="@Loc["Admin.Orders.Addresses"]" tab-index="1">
<content>
<div>
<partial name="Partials/OrderDetails.Addresses" model="Model" />
<partial name="Partials/OrderDetails.Addresses" model="Model"/>
</div>
</content>
</tabstrip-item>
Expand All @@ -68,34 +69,31 @@
<tabstrip-item text="@Loc["Admin.Orders.Shipments"]" tab-index="2">
<content>
<div>
<partial name="Partials/OrderDetails.Shipment" model="Model" />
<partial name="Partials/OrderDetails.Shipment" model="Model"/>
</div>
</content>
</tabstrip-item>
}
<tabstrip-item text="@Loc["Admin.Orders.Products"]" tab-index="3">
<content>
<div>
<partial name="Partials/OrderDetails.Products" model="Model" />
<partial name="Partials/OrderDetails.Products" model="Model"/>
</div>
</content>
</tabstrip-item>
<tabstrip-item text="@Loc["Admin.Orders.OrderNotes"]" tab-index="4">
<content>
<div>
<partial name="Partials/OrderDetails.Notes" model="Model"/>
</div>
</content>
</tabstrip-item>
@if (!Model.IsLoggedInAsVendor)
{
<tabstrip-item text="@Loc["Admin.Orders.OrderNotes"]" tab-index="4">
<content>
<div>
<partial name="Partials/OrderDetails.Notes" model="Model" />
</div>
</content>
</tabstrip-item>
}
@if (canManageDocuments)
{
<tabstrip-item text="@Loc["Admin.Orders.Documents"]" tab-index="5">
<content>
<div>
<partial name="Partials/OrderDetails.Documents" model="Model" />
<partial name="Partials/OrderDetails.Documents" model="Model"/>
</div>
</content>
</tabstrip-item>
Expand All @@ -104,10 +102,10 @@
<content>
<div>
<div class="form-actions">
<input type="submit" value="@Loc["Admin.Common.Save"]" id="btnSaveUserFields" name="save-generic-attributes" asp-action="EditUserFields" class="k-button" />
<input type="submit" value="@Loc["Admin.Common.Save"]" id="btnSaveUserFields" name="save-generic-attributes" asp-action="EditUserFields" class="k-button"/>
</div>
<div class="form-horizontal">
<partial name="Partials/UserFields" model="Model" />
<partial name="Partials/UserFields" model="Model"/>
</div>
</div>
</content>
Expand All @@ -117,17 +115,17 @@
<tabstrip-item text="@Loc["Admin.Orders.Notifications"]" tab-index="7">
<content>
<div>
<partial name="Partials/OrderDetails.Notifications" model="Model" />
<partial name="Partials/OrderDetails.Notifications" model="Model"/>
</div>
</content>
</tabstrip-item>
}
<vc:admin-widget widget-zone="order_details_tabs" additional-data="Model" />
<vc:admin-widget widget-zone="order_details_tabs" additional-data="Model"/>
</items>
</admin-tabstrip>
</div>
</div>
</div>
</div>
</form>
<admin-delete-confirmation button-id="order-delete" />
<admin-delete-confirmation button-id="order-delete"/>
Loading

0 comments on commit 12e8210

Please sign in to comment.