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.

Remove vendor info section from Account details section

support074c70e1cb93
diff --git a/src/Core/Grand.Domain/Vendors/VendorSettings.cs b/src/Core/Grand.Domain/Vendors/VendorSettings.cs
index e0278161f..6e692d72b 100644
--- a/src/Core/Grand.Domain/Vendors/VendorSettings.cs
+++ b/src/Core/Grand.Domain/Vendors/VendorSettings.cs
@@ -45,11 +45,6 @@ namespace Grand.Domain.Vendors
/// Get or sets a value indicating whether vendor can edit information about itself (public store)
/// </summary>
public bool AllowVendorsToEditInfo { get; set; }
- /// <summary>
- /// Get or sets a value indicating whether vendor can upload picture file
- /// </summary>
- public bool AllowToUploadFile { get; set; }
-
/// <summary>
/// Gets or sets a value indicating whether the store owner is notified that the vendor information has been changed
/// </summary>
diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Setting/Vendor.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Setting/Vendor.cshtml
index 71d5a9886..3acecf4b3 100644
--- a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Setting/Vendor.cshtml
+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Setting/Vendor.cshtml
@@ -209,19 +209,7 @@
<span asp-validation-for="TermsOfServiceEnabled"></span>
</div>
</div>
- <div class="form-group">
- <div class="col-8 col-md-4 col-sm-4 text-right">
- <admin-label asp-for="AllowToUploadFile" class="control-label" />
- </div>
- <div class="col-4 col-md-8 col-sm-8">
- <label class="mt-checkbox mt-checkbox-outline control control-checkbox">
- <admin-input asp-for="AllowToUploadFile" />
- <div class="control__indicator"></div>
- </label>
- <span asp-validation-for="AllowToUploadFile"></span>
- </div>
- </div>
- <div class="form-group">
+ <div class="form-group">
<div class="col-8 col-md-4 col-sm-4 text-right">
<admin-label asp-for="VendorReviewsMustBeApproved" class="control-label" />
</div>
diff --git a/src/Web/Grand.Web.Admin/Models/Settings/VendorSettingsModel.cs b/src/Web/Grand.Web.Admin/Models/Settings/VendorSettingsModel.cs
index 093a6c0ee..eb5841254 100644
--- a/src/Web/Grand.Web.Admin/Models/Settings/VendorSettingsModel.cs
+++ b/src/Web/Grand.Web.Admin/Models/Settings/VendorSettingsModel.cs
@@ -36,8 +36,6 @@ namespace Grand.Web.Admin.Models.Settings
[GrandResourceDisplayName("Admin.Settings.Vendor.TermsOfServiceEnabled")]
public bool TermsOfServiceEnabled { get; set; }
- [GrandResourceDisplayName("Admin.Settings.Vendor.AllowToUploadFile")]
- public bool AllowToUploadFile { get; set; }
//review vendor
[GrandResourceDisplayName("Admin.Settings.Vendor.VendorReviewsMustBeApproved")]
public bool VendorReviewsMustBeApproved { get; set; }
diff --git a/src/Web/Grand.Web/App_Data/Resources/DefaultLanguage.xml b/src/Web/Grand.Web/App_Data/Resources/DefaultLanguage.xml
index f6c6b25d3..db360d8b8 100644
--- a/src/Web/Grand.Web/App_Data/Resources/DefaultLanguage.xml
+++ b/src/Web/Grand.Web/App_Data/Resources/DefaultLanguage.xml
@@ -11424,9 +11424,6 @@
<Resource Name="Admin.Settings.Vendor.AllowCustomersToContactVendors" Area="Admin">
<Value>Allow customers to contact vendors</Value>
</Resource>
- <Resource Name="Admin.Settings.Vendor.AllowToUploadFile" Area="Admin">
- <Value>Allow vendor to upload picture file</Value>
- </Resource>
<Resource Name="Admin.Settings.Vendor.AllowSearchByVendor" Area="Admin">
<Value>Allow search by vendor in store advanced search</Value>
</Resource>
diff --git a/src/Web/Grand.Web/Controllers/VendorController.cs b/src/Web/Grand.Web/Controllers/VendorController.cs
index a972bbf9e..91c620da5 100644
--- a/src/Web/Grand.Web/Controllers/VendorController.cs
+++ b/src/Web/Grand.Web/Controllers/VendorController.cs
@@ -14,7 +14,6 @@ using Grand.Infrastructure;
using Grand.SharedKernel.Extensions;
using Grand.Web.Commands.Models.Vendors;
using Grand.Web.Common.Controllers;
-using Grand.Web.Common.Extensions;
using Grand.Web.Common.Filters;
using Grand.Web.Common.Security.Authorization;
using Grand.Web.Common.Security.Captcha;
@@ -113,7 +112,6 @@ namespace Grand.Web.Controllers
model.DisplayCaptcha = _captchaSettings.Enabled && _captchaSettings.ShowOnApplyVendorPage;
model.Email = _workContext.CurrentCustomer.Email;
model.TermsOfServiceEnabled = _vendorSettings.TermsOfServiceEnabled;
- model.AllowToUploadFile = _vendorSettings.AllowToUploadFile;
model.TermsOfServicePopup = _commonSettings.PopupForTermsOfServiceLinks;
var countries = await _countryService.GetAllCountries(_workContext.WorkingLanguage.Id, _workContext.CurrentStore.Id);
model.Address = await _mediator.Send(new GetVendorAddress {
@@ -137,28 +135,6 @@ namespace Grand.Web.Controllers
if (!_vendorSettings.AllowCustomersToApplyForVendorAccount)
return RedirectToRoute("HomePage");
- var contentType = string.Empty;
- byte[] vendorPictureBinary = null;
-
- if (_vendorSettings.AllowToUploadFile && uploadedFile != null && !string.IsNullOrEmpty(uploadedFile.FileName))
- {
- try
- {
- contentType = uploadedFile.ContentType;
- if (string.IsNullOrEmpty(contentType))
- ModelState.AddModelError("", "Empty content type");
- else
- if (!contentType.StartsWith("image"))
- ModelState.AddModelError("", "Only image content type is allowed");
-
- vendorPictureBinary = uploadedFile.GetPictureBits();
- }
- catch (Exception)
- {
- ModelState.AddModelError("", _translationService.GetResource("Vendors.ApplyAccount.Picture.ErrorMessage"));
- }
- }
-
if (ModelState.IsValid)
{
var description = FormatText.ConvertText(model.Description);
@@ -173,13 +149,7 @@ namespace Grand.Web.Controllers
AllowCustomerReviews = _vendorSettings.DefaultAllowCustomerReview
};
model.Address.ToEntity(vendor.Address);
- if (vendorPictureBinary != null && !string.IsNullOrEmpty(contentType))
- {
- var picture = await _pictureService.InsertPicture(vendorPictureBinary, contentType, null, reference: Reference.Vendor, objectId: vendor.Id);
- if (picture != null)
- vendor.PictureId = picture.Id;
- }
-
+
await _vendorService.InsertVendor(vendor);
//search engine name (the same as vendor name)
@@ -209,7 +179,6 @@ namespace Grand.Web.Controllers
model.DisplayCaptcha = _captchaSettings.Enabled && _captchaSettings.ShowOnApplyVendorPage;
model.TermsOfServiceEnabled = _vendorSettings.TermsOfServiceEnabled;
model.TermsOfServicePopup = _commonSettings.PopupForTermsOfServiceLinks;
- model.AllowToUploadFile = _vendorSettings.AllowToUploadFile;
var countries = await _countryService.GetAllCountries(_workContext.WorkingLanguage.Id, _workContext.CurrentStore.Id);
model.Address = await _mediator.Send(new GetVendorAddress {
Language = _workContext.WorkingLanguage,
@@ -222,133 +191,7 @@ namespace Grand.Web.Controllers
});
return View(model);
}
-
- [HttpGet]
- [CustomerGroupAuthorize(SystemCustomerGroupNames.Registered)]
- public virtual async Task<IActionResult> Info()
- {
- if (_workContext.CurrentVendor == null || !_vendorSettings.AllowVendorsToEditInfo)
- return RedirectToRoute("CustomerInfo");
-
- var model = new VendorInfoModel();
- var vendor = _workContext.CurrentVendor;
- model.Description = vendor.Description;
- model.Email = vendor.Email;
- model.Name = vendor.Name;
- model.UserFields = vendor.UserFields;
- model.AllowToUploadFile = _vendorSettings.AllowToUploadFile;
- model.PictureUrl = await _pictureService.GetPictureUrl(vendor.PictureId);
- var countries = await _countryService.GetAllCountries(_workContext.WorkingLanguage.Id, _workContext.CurrentStore.Id);
- model.Address = await _mediator.Send(new GetVendorAddress {
- Language = _workContext.WorkingLanguage,
- Address = vendor.Address,
- ExcludeProperties = false,
- LoadCountries = () => countries
- });
-
- return View(model);
- }
-
- [HttpPost]
- [AutoValidateAntiforgeryToken]
- [CustomerGroupAuthorize(SystemCustomerGroupNames.Registered)]
- public virtual async Task<IActionResult> Info(VendorInfoModel model, IFormFile uploadedFile)
- {
- if (_workContext.CurrentVendor == null || !_vendorSettings.AllowVendorsToEditInfo)
- return RedirectToRoute("CustomerInfo");
-
- var contentType = string.Empty;
- byte[] vendorPictureBinary = null;
-
- if (_vendorSettings.AllowToUploadFile && uploadedFile != null && !string.IsNullOrEmpty(uploadedFile.FileName))
- {
- try
- {
- contentType = uploadedFile.ContentType;
- if (string.IsNullOrEmpty(contentType))
- ModelState.AddModelError("", "Empty content type");
- else
- if (!contentType.StartsWith("image"))
- ModelState.AddModelError("", "Only image content type is allowed");
-
- vendorPictureBinary = uploadedFile.GetPictureBits();
- }
- catch (Exception)
- {
- ModelState.AddModelError("", _translationService.GetResource("Account.VendorInfo.Picture.ErrorMessage"));
- }
- }
-
- var vendor = _workContext.CurrentVendor;
- var prevPicture = await _pictureService.GetPictureById(vendor.PictureId);
- if (prevPicture == null)
- vendor.PictureId = "";
-
- if (ModelState.IsValid)
- {
- var description = FormatText.ConvertText(model.Description);
-
- vendor.Name = model.Name;
- vendor.Email = model.Email;
- vendor.Description = description;
-
- if (vendorPictureBinary != null && !string.IsNullOrEmpty(contentType))
- {
- var picture = await _pictureService.InsertPicture(vendorPictureBinary, contentType, null, reference: Reference.Vendor, objectId: vendor.Id);
- if (picture != null)
- vendor.PictureId = picture.Id;
-
- if (prevPicture != null)
- await _pictureService.DeletePicture(prevPicture);
- }
- //update picture seo file name
- await UpdatePictureSeoNames(vendor);
- model.Address.ToEntity(vendor.Address);
-
- await _vendorService.UpdateVendor(vendor);
-
- //notifications
- if (_vendorSettings.NotifyStoreOwnerAboutVendorInformationChange)
- await _messageProviderService.SendVendorInformationChangeMessage(vendor, _workContext.CurrentStore, _languageSettings.DefaultAdminLanguageId);
-
- return RedirectToAction("Info");
- }
- var countries = await _countryService.GetAllCountries(_workContext.WorkingLanguage.Id, _workContext.CurrentStore.Id);
- model.Address = await _mediator.Send(new GetVendorAddress {
- Language = _workContext.WorkingLanguage,
- Model = model.Address,
- Address = vendor.Address,
- ExcludeProperties = false,
- LoadCountries = () => countries
- });
-
- return View(model);
- }
-
- [HttpGet]
- [CustomerGroupAuthorize(SystemCustomerGroupNames.Registered)]
- public virtual async Task<IActionResult> RemovePicture()
- {
- if (_workContext.CurrentVendor == null || !_vendorSettings.AllowVendorsToEditInfo)
- return RedirectToRoute("CustomerInfo");
-
- var vendor = _workContext.CurrentVendor;
- var picture = await _pictureService.GetPictureById(vendor.PictureId);
-
- if (picture != null)
- await _pictureService.DeletePicture(picture);
-
- vendor.PictureId = "";
- await _vendorService.UpdateVendor(vendor);
-
- //notifications
- if (_vendorSettings.NotifyStoreOwnerAboutVendorInformationChange)
- await _messageProviderService.SendVendorInformationChangeMessage(vendor, _workContext.CurrentStore, _languageSettings.DefaultAdminLanguageId);
-
- return RedirectToAction("Info");
- }
-
-
+
[HttpPost]
[AutoValidateAntiforgeryToken]
[DenySystemAccount]
diff --git a/src/Web/Grand.Web/Features/Handlers/Customers/GetNavigationHandler.cs b/src/Web/Grand.Web/Features/Handlers/Customers/GetNavigationHandler.cs
index 89f99f4e4..4f246c52c 100644
--- a/src/Web/Grand.Web/Features/Handlers/Customers/GetNavigationHandler.cs
+++ b/src/Web/Grand.Web/Features/Handlers/Customers/GetNavigationHandler.cs
@@ -42,10 +42,6 @@ namespace Grand.Web.Features.Handlers.Customers
HideCourses = _customerSettings.HideCoursesTab,
HideSubAccounts = _customerSettings.HideSubAccountsTab || !string.IsNullOrEmpty(request.Customer.OwnerId)
};
- if (_vendorSettings.AllowVendorsToEditInfo && request.Vendor != null)
- {
- model.ShowVendorInfo = true;
- }
model.SelectedTab = (AccountNavigationEnum)request.SelectedTabId;
return await Task.FromResult(model);
diff --git a/src/Web/Grand.Web/Models/Customer/CustomerNavigationModel.cs b/src/Web/Grand.Web/Models/Customer/CustomerNavigationModel.cs
index 192d55ac2..712d1ef4e 100644
--- a/src/Web/Grand.Web/Models/Customer/CustomerNavigationModel.cs
+++ b/src/Web/Grand.Web/Models/Customer/CustomerNavigationModel.cs
@@ -16,7 +16,6 @@ namespace Grand.Web.Models.Customer
public bool HideAuctions { get; set; }
public bool HideNotes { get; set; }
public bool HideDocuments { get; set; }
- public bool ShowVendorInfo { get; set; }
public bool HideReviews { get; set; }
public bool HideCourses { get; set; }
public bool HideSubAccounts { get; set; }
diff --git a/src/Web/Grand.Web/Models/Vendors/ApplyVendorModel.cs b/src/Web/Grand.Web/Models/Vendors/ApplyVendorModel.cs
index b54316963..5d0bb707c 100644
--- a/src/Web/Grand.Web/Models/Vendors/ApplyVendorModel.cs
+++ b/src/Web/Grand.Web/Models/Vendors/ApplyVendorModel.cs
@@ -27,7 +27,6 @@ namespace Grand.Web.Models.Vendors
public bool TermsOfServiceEnabled { get; set; }
public bool TermsOfServicePopup { get; set; }
public bool DisableFormInput { get; set; }
- public bool AllowToUploadFile { get; set; }
public string Result { get; set; }
}
}
\ No newline at end of file
diff --git a/src/Web/Grand.Web/Models/Vendors/VendorInfoModel.cs b/src/Web/Grand.Web/Models/Vendors/VendorInfoModel.cs
deleted file mode 100644
index 726096e66..000000000
--- a/src/Web/Grand.Web/Models/Vendors/VendorInfoModel.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using Grand.Infrastructure.ModelBinding;
-using Grand.Infrastructure.Models;
-
-namespace Grand.Web.Models.Vendors
-{
- public class VendorInfoModel : BaseModel
- {
- public VendorInfoModel()
- {
- Address = new VendorAddressModel();
- }
-
- [GrandResourceDisplayName("Account.VendorInfo.Name")]
- public string Name { get; set; }
-
- [GrandResourceDisplayName("Account.VendorInfo.Email")]
- public string Email { get; set; }
-
- [GrandResourceDisplayName("Account.VendorInfo.Description")]
- public string Description { get; set; }
-
- [GrandResourceDisplayName("Account.VendorInfo.Picture")]
- public string PictureUrl { get; set; }
- public bool AllowToUploadFile { get; set; }
- public VendorAddressModel Address { get; set; }
- }
-}
\ No newline at end of file
diff --git a/src/Web/Grand.Web/Validators/Vendors/VendorInfoValidator.cs b/src/Web/Grand.Web/Validators/Vendors/VendorInfoValidator.cs
deleted file mode 100644
index 55eb300ab..000000000
--- a/src/Web/Grand.Web/Validators/Vendors/VendorInfoValidator.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using FluentValidation;
-using Grand.Business.Core.Interfaces.Common.Directory;
-using Grand.Business.Core.Interfaces.Common.Localization;
-using Grand.Domain.Vendors;
-using Grand.Infrastructure.Validators;
-using Grand.Web.Models.Vendors;
-
-namespace Grand.Web.Validators.Vendors
-{
- public class VendorInfoValidator : BaseGrandValidator<VendorInfoModel>
- {
- public VendorInfoValidator(
- IEnumerable<IValidatorConsumer<VendorInfoModel>> validators,
- IEnumerable<IValidatorConsumer<VendorAddressModel>> addressvalidators,
- ITranslationService translationService,
- ICountryService countryService, VendorSettings addressSettings)
- : base(validators)
- {
- RuleFor(x => x.Name).NotEmpty().WithMessage(translationService.GetResource("Account.VendorInfo.Name.Required"));
- RuleFor(x => x.Email).NotEmpty().WithMessage(translationService.GetResource("Account.VendorInfo.Email.Required"));
- RuleFor(x => x.Email).EmailAddress().WithMessage(translationService.GetResource("Common.WrongEmail"));
- RuleFor(x => x.Address).SetValidator(new VendorAddressValidator(addressvalidators, translationService, countryService, addressSettings));
- }
- }
-}
\ No newline at end of file
diff --git a/src/Web/Grand.Web/Views/Shared/Components/CustomerNavigation/Default.cshtml b/src/Web/Grand.Web/Views/Shared/Components/CustomerNavigation/Default.cshtml
index 9efb82b14..b6beaf583 100644
--- a/src/Web/Grand.Web/Views/Shared/Components/CustomerNavigation/Default.cshtml
+++ b/src/Web/Grand.Web/Views/Shared/Components/CustomerNavigation/Default.cshtml
@@ -1,154 +1,132 @@
@model CustomerNavigationModel
<div id="block-account-navigation" class="block block-account-navigation mt-2">
- <h2 class="h5"><strong>@Loc["Account.Navigation"]</strong></h2>
+ <h2 class="h5">
+ <strong>@Loc["Account.Navigation"]</strong>
+ </h2>
<ul class="list viewBox">
@await Component.InvokeAsync("Widget", new { widgetZone = "account_navigation_before" })
@if (!Model.HideInfo)
{
<li class="customer-info">
- <a href="@Url.RouteUrl("CustomerInfo")" class="@if (Model.SelectedTab == AccountNavigationEnum.Info)
- {<text>active</text>}
- else
- {<text>inactive</text>}"><b-icon icon="person"></b-icon> <span>@Loc["Account.CustomerInfo"]</span></a>
- </li>
- }
+ <a href="@Url.RouteUrl("CustomerInfo")" class="@if (Model.SelectedTab == AccountNavigationEnum.Info) {<text>active</text>} else {<text>inactive</text>}">
+ <b-icon icon="person"></b-icon> <span>@Loc["Account.CustomerInfo"]</span>
+ </a>
+ </li>
+ }
@if (!Model.HideAddresses)
{
<li class="customer-addresses">
- <a href="@Url.RouteUrl("CustomerAddresses")" class="@if (Model.SelectedTab == AccountNavigationEnum.Addresses)
- {<text>active</text>}
- else
- {<text>inactive</text>}"><b-icon icon="file-earmark-richtext"></b-icon> <span>@Loc["Account.CustomerAddresses"]</span></a>
- </li>
- }
+ <a href="@Url.RouteUrl("CustomerAddresses")" class="@if (Model.SelectedTab == AccountNavigationEnum.Addresses) {<text>active</text>} else {<text>inactive</text>}">
+ <b-icon icon="file-earmark-richtext"></b-icon> <span>@Loc["Account.CustomerAddresses"]</span>
+ </a>
+ </li>
+ }
@if (!Model.HideOrders)
{
<li class="customer-orders">
- <a href="@Url.RouteUrl("CustomerOrders")" class="@if (Model.SelectedTab == AccountNavigationEnum.Orders)
- {<text>active</text>}
- else
- {<text>inactive</text>}"><b-icon icon="cart-check"></b-icon> <span>@Loc["Account.CustomerOrders"]</span></a>
- </li>
- }
+ <a href="@Url.RouteUrl("CustomerOrders")" class="@if (Model.SelectedTab == AccountNavigationEnum.Orders) {<text>active</text>} else {<text>inactive</text>}">
+ <b-icon icon="cart-check"></b-icon> <span>@Loc["Account.CustomerOrders"]</span>
+ </a>
+ </li>
+ }
@if (!Model.HideCourses)
{
<li class="customer-auctions">
- <a href="@Url.RouteUrl("CustomerCourses")" class="@if (Model.SelectedTab == AccountNavigationEnum.Courses)
- {<text>active</text>}
- else
- {<text>inactive</text>}"><b-icon icon="file-earmark-easel"></b-icon> <span>@Loc["Account.CustomerCourses"]</span></a>
- </li>
- }
+ <a href="@Url.RouteUrl("CustomerCourses")" class="@if (Model.SelectedTab == AccountNavigationEnum.Courses) {<text>active</text>} else {<text>inactive</text>}">
+ <b-icon icon="file-earmark-easel"></b-icon> <span>@Loc["Account.CustomerCourses"]</span>
+ </a>
+ </li>
+ }
@if (!Model.HideAuctions)
{
<li class="customer-auctions">
- <a href="@Url.RouteUrl("CustomerAuctions")" class="@if (Model.SelectedTab == AccountNavigationEnum.Auctions)
- {<text>active</text>}
- else
- {<text>inactive</text>}"><b-icon icon="hammer"></b-icon> <span>@Loc["Account.CustomerAuctions"]</span></a>
- </li>
- }
+ <a href="@Url.RouteUrl("CustomerAuctions")" class="@if (Model.SelectedTab == AccountNavigationEnum.Auctions) {<text>active</text>} else {<text>inactive</text>}">
+ <b-icon icon="hammer"></b-icon> <span>@Loc["Account.CustomerAuctions"]</span>
+ </a>
+ </li>
+ }
@if (!Model.HideNotes)
{
<li class="customer-notes">
- <a href="@Url.RouteUrl("CustomerNotes")" class="@if (Model.SelectedTab == AccountNavigationEnum.Notes)
- {<text>active</text>}
- else
- {<text>inactive</text>}"><b-icon icon="file-earmark-font"></b-icon> <span>@Loc["Account.CustomerNotes"]</span></a>
- </li>
- }
+ <a href="@Url.RouteUrl("CustomerNotes")" class="@if (Model.SelectedTab == AccountNavigationEnum.Notes) {<text>active</text>} else {<text>inactive</text>}">
+ <b-icon icon="file-earmark-font"></b-icon> <span>@Loc["Account.CustomerNotes"]</span>
+ </a>
+ </li>
+ }
@if (!Model.HideDocuments)
{
<li class="customer-notes">
- <a href="@Url.RouteUrl("CustomerDocuments")" class="@if (Model.SelectedTab == AccountNavigationEnum.Documents)
- {<text>active</text>}
- else
- {<text>inactive</text>}"><b-icon icon="file-earmark-check"></b-icon> <span>@Loc["Account.CustomerDocuments"]</span></a>
- </li>
- }
+ <a href="@Url.RouteUrl("CustomerDocuments")" class="@if (Model.SelectedTab == AccountNavigationEnum.Documents) {<text>active</text>} else {<text>inactive</text>}">
+ <b-icon icon="file-earmark-check"></b-icon> <span>@Loc["Account.CustomerDocuments"]</span>
+ </a>
+ </li>
+ }
@if (!Model.HideMerchandiseReturns)
{
<li class="customer-returns">
- <a href="@Url.RouteUrl("CustomerMerchandiseReturns")" class="@if (Model.SelectedTab == AccountNavigationEnum.MerchandiseReturns)
- {<text>active</text>}
- else
- {<text>inactive</text>}"><b-icon icon="arrow-return-left"></b-icon> <span>@Loc["Account.CustomerMerchandiseReturns"]</span></a>
- </li>
- }
+ <a href="@Url.RouteUrl("CustomerMerchandiseReturns")" class="@if (Model.SelectedTab == AccountNavigationEnum.MerchandiseReturns) {<text>active</text>} else {<text>inactive</text>}">
+ <b-icon icon="arrow-return-left"></b-icon> <span>@Loc["Account.CustomerMerchandiseReturns"]</span>
+ </a>
+ </li>
+ }
@if (!Model.HideDownloadableProducts)
{
<li class="customer-downloadable">
- <a href="@Url.RouteUrl("CustomerDownloadableProducts")" class="@if (Model.SelectedTab == AccountNavigationEnum.DownloadableProducts)
- {<text>active</text>}
- else
- {<text>inactive</text>}"><b-icon icon="cloud-download"></b-icon> <span>@Loc["Account.DownloadableProducts"]</span></a>
- </li>
- }
+ <a href="@Url.RouteUrl("CustomerDownloadableProducts")" class="@if (Model.SelectedTab == AccountNavigationEnum.DownloadableProducts) {<text>active</text>} else {<text>inactive</text>}">
+ <b-icon icon="cloud-download"></b-icon> <span>@Loc["Account.DownloadableProducts"]</span>
+ </a>
+ </li>
+ }
@if (!Model.HideOutOfStockSubscriptions)
{
<li class="customer-back">
- <a href="@Url.RouteUrl("CustomerOutOfStockSubscriptions")" class="@if (Model.SelectedTab == AccountNavigationEnum.OutOfStockSubscriptions)
- {<text>active</text>}
- else
- {<text>inactive</text>}"><b-icon icon="skip-backward"></b-icon> <span>@Loc["Account.OutOfStockSubscriptions"]</span></a>
- </li>
- }
+ <a href="@Url.RouteUrl("CustomerOutOfStockSubscriptions")" class="@if (Model.SelectedTab == AccountNavigationEnum.OutOfStockSubscriptions) {<text>active</text>} else {<text>inactive</text>}">
+ <b-icon icon="skip-backward"></b-icon> <span>@Loc["Account.OutOfStockSubscriptions"]</span>
+ </a>
+ </li>
+ }
@if (!Model.HideLoyaltyPoints)
{
<li class="loyalty-points">
- <a href="@Url.RouteUrl("CustomerLoyaltyPoints")" class="@if (Model.SelectedTab == AccountNavigationEnum.LoyaltyPoints)
- {<text>active</text>}
- else
- {<text>inactive</text>}"><b-icon icon="trophy"></b-icon> <span>@Loc["Account.LoyaltyPoints"]</span></a>
- </li>
- }
+ <a href="@Url.RouteUrl("CustomerLoyaltyPoints")" class="@if (Model.SelectedTab == AccountNavigationEnum.LoyaltyPoints) {<text>active</text>} else {<text>inactive</text>}">
+ <b-icon icon="trophy"></b-icon> <span>@Loc["Account.LoyaltyPoints"]</span>
+ </a>
+ </li>
+ }
@if (!Model.HideChangePassword)
{
<li class="change-password">
- <a href="@Url.RouteUrl("CustomerChangePassword")" class="@if (Model.SelectedTab == AccountNavigationEnum.ChangePassword)
- {<text>active</text>}
- else
- {<text>inactive</text>}"><b-icon icon="file-earmark-lock2"></b-icon> <span>@Loc["Account.ChangePassword"]</span></a>
- </li>
- }
+ <a href="@Url.RouteUrl("CustomerChangePassword")" class="@if (Model.SelectedTab == AccountNavigationEnum.ChangePassword) {<text>active</text>} else {<text>inactive</text>}">
+ <b-icon icon="file-earmark-lock2"></b-icon> <span>@Loc["Account.ChangePassword"]</span>
+ </a>
+ </li>
+ }
@if (!Model.HideDeleteAccount)
{
<li class="customer-delete">
- <a href="@Url.RouteUrl("CustomerDeleteAccount")" class="@if (Model.SelectedTab == AccountNavigationEnum.DeleteAccount)
- {<text>active</text>}
- else
- {<text>inactive</text>}"><b-icon icon="trash"></b-icon> <span>@Loc["Account.DeleteAccount"]</span></a>
- </li>
- }
- @if (Model.ShowVendorInfo)
- {
- <li class="customer-vendor">
- <a href="@Url.RouteUrl("CustomerVendorInfo")" class="@if(Model.SelectedTab == AccountNavigationEnum.VendorInfo)
- {<text>active</text>}
- else
- {<text>inactive</text>}"><b-icon icon="shop"></b-icon> <span>@Loc["Account.VendorInfo"]</span></a>
- </li>
- }
+ <a href="@Url.RouteUrl("CustomerDeleteAccount")" class="@if (Model.SelectedTab == AccountNavigationEnum.DeleteAccount) {<text>active</text>} else {<text>inactive</text>}">
+ <b-icon icon="trash"></b-icon> <span>@Loc["Account.DeleteAccount"]</span>
+ </a>
+ </li>
+ }
@if (!Model.HideReviews)
{
<!--todo change class customer-notes to other (change icon???) and mdi mdi-account-supervisor - also change-->
<li class="customer-notes">
- <a href="@Url.RouteUrl("CustomerReviews")" class="@if(Model.SelectedTab == AccountNavigationEnum.Reviews)
- {<text>active</text>}
- else
- {<text>inactive</text>}"><b-icon icon="star"></b-icon> <span>@Loc["Account.Reviews"]</span></a>
- </li>
- }
+ <a href="@Url.RouteUrl("CustomerReviews")" class="@if (Model.SelectedTab == AccountNavigationEnum.Reviews) {<text>active</text>} else {<text>inactive</text>}">
+ <b-icon icon="star"></b-icon> <span>@Loc["Account.Reviews"]</span>
+ </a>
+ </li>
+ }
@if (!Model.HideSubAccounts)
{
<!--todo change class customer-notes to other (change icon???) and mdi mdi-account-supervisor - also change-->
<li class="customer-subaccounts">
- <a href="@Url.RouteUrl("CustomerSubAccounts")" class="@if(Model.SelectedTab == AccountNavigationEnum.SubAccounts)
- {<text>active</text>}
- else
- {<text>inactive</text>}"><b-icon icon="person-plus"></b-icon> <span>@Loc["Account.SubAccounts"]</span></a>
- </li>
- }
+ <a href="@Url.RouteUrl("CustomerSubAccounts")" class="@if (Model.SelectedTab == AccountNavigationEnum.SubAccounts) {<text>active</text>} else {<text>inactive</text>}">
+ <b-icon icon="person-plus"></b-icon> <span>@Loc["Account.SubAccounts"]</span>
+ </a>
+ </li>
+ }
@await Component.InvokeAsync("Widget", new { widgetZone = "account_navigation_after", additionalData = Model })
</ul>
-</div>
+</div>
\ No newline at end of file
diff --git a/src/Web/Grand.Web/Views/Vendor/ApplyVendor.cshtml b/src/Web/Grand.Web/Views/Vendor/ApplyVendor.cshtml
index e211aa767..22a2db34c 100644
--- a/src/Web/Grand.Web/Views/Vendor/ApplyVendor.cshtml
+++ b/src/Web/Grand.Web/Views/Vendor/ApplyVendor.cshtml
@@ -47,15 +47,6 @@
<label asp-for="Description" class="col-form-label">@Loc["Vendors.ApplyAccount.Description"]:</label>
<textarea asp-for="Description" class="form-control description"></textarea>
</div>
- @if (Model.AllowToUploadFile)
- {
- <div class="form-group">
- <label class="col-form-label">@Loc["Vendors.ApplyAccount.Picture"]:</label>
- <div class="custom-file">
- <b-form-file id="uploadedFile" name="uploadedFile" accept="image/*"></b-form-file>
- </div>
- </div>
- }
@if (Model.DisplayCaptcha)
{
<div class="captcha-box">
diff --git a/src/Web/Grand.Web/Views/Vendor/Info.cshtml b/src/Web/Grand.Web/Views/Vendor/Info.cshtml
deleted file mode 100644
index 577637ce1..000000000
--- a/src/Web/Grand.Web/Views/Vendor/Info.cshtml
+++ /dev/null
@@ -1,86 +0,0 @@
-@model VendorInfoModel
-@inject IPageHeadBuilder pagebuilder
-@{
- Layout = "_TwoColumns";
-
- //title
- pagebuilder.AddTitleParts(Loc["Title.Vendorinfo"]);
-}
-@section left
-{
- @await Component.InvokeAsync("CustomerNavigation", new { selectedTabId = AccountNavigationEnum.VendorInfo })
-}
-<div class="page vendorinfo-page">
- <h1 class="text-center generalTitle h2">@Loc["Account.MyAccount"] - @Loc["Account.VendorInfo"]</h1>
- <validation-observer v-slot="{ handleSubmit }">
- <form asp-controller="Vendor" method="post" enctype="multipart/form-data" ref="form" v-on:submit.prevent="handleSubmit(formSubmit)">
- <div asp-validation-summary="ModelOnly" class="message-error alert alert-danger" my-3></div>
- <div class="form-fields">
- <div class="form-group">
- <validation-provider tag="div" rules="required" name="Name" v-slot="{ errors, classes }">
- <label asp-for="Name" class="col-form-label">@Loc["Account.VendorInfo.Name"]:</label>
- <span class="required">*</span>
- <input asp-for="Name" v-model="vendorinfo.Name" placeholder="@Loc["Account.VendorInfo.Name.Hint"]" v-bind:class="[classes , 'form-control']" data-val-required=@Loc["Account.VendorInfo.Name.Required"] />
- <span class="field-validation-error">{{ errors[0] }}</span>
- <span asp-validation-for="Name"></span>
- </validation-provider>
- </div>
- <div class="form-group">
- <validation-provider tag="div" rules="required|email" name="Email" v-slot="{ errors, classes }">
- <label asp-for="Email" class="col-form-label">@Loc["Account.VendorInfo.Email"]:</label>
- <span class="required">*</span>
- <input asp-for="Email" v-model="vendorinfo.Email" placeholder="@Loc["Account.VendorInfo.Email.Hint"]" v-bind:class="[classes , 'form-control']"
- data-val-email=@Loc["Common.WrongEmail"] data-val-required=@Loc["Account.VendorInfo.Email.Required"] />
- <span class="field-validation-error">{{ errors[0] }}</span>
- <span asp-validation-for="Email"></span>
- </validation-provider>
- </div>
- <div class="form-group">
- <label asp-for="Description" class="col-form-label">@Loc["Account.VendorInfo.Description"]:</label>
- <textarea asp-for="Description" class="form-control description"></textarea>
- </div>
- @if (Model.AllowToUploadFile)
- {
- <div class="form-group">
- <label asp-for="PictureUrl" class="col-form-label">@Loc["Account.VendorInfo.Picture"]:</label>
- <b-form-file id="uploadedFile" name="uploadedFile" accept="image/*"></b-form-file>
- @if (!string.IsNullOrEmpty(Model.PictureUrl))
- {
- <div class="vendor-picture mt-3">
- <img src="@(Model.PictureUrl)" alt="picture" style="width:100px; display:block"/>
- <a asp-route="CustomerVendorRemovePicture" name="remove-picture" class="btn btn-danger remove-picture-button mt-3">@Loc["Account.VendorInfo.Picture.Remove"]</a>
- </div>
- }
- </div>
- }
- @{
- var dataDictAddress = new ViewDataDictionary(ViewData)
- {
- TemplateInfo =
- {
- HtmlFieldPrefix = "Address"
- }
- };
- <partial name="Partials/CreateOrUpdateVendorAddress" model="Model.Address" view-data="dataDictAddress" />
- }
- </div>
- <div class="row">
- <div class="col-12 buttons pt-1 pb-1">
- <input type="submit" asp-action="Info" name="save-info-button" class="btn btn-info apply-vendor-button" value="@Loc["Common.Save"]" />
- </div>
- </div>
- </form>
- </validation-observer>
-</div>
-<script asp-location="Footer" asp-order="300">
- var vendorinfo = new Vue({
- data: () => ({
- @{
- <text>
- Name: '@Html.Raw(Model.Name)',
- Email: '@Html.Raw(Model.Email)',
- </text>
- }
- })
- });
-</script>
\ No newline at end of file