Skip to content

Commit

Permalink
Extend Store entity - Add company registration number
Browse files Browse the repository at this point in the history
  • Loading branch information
KrzysztofPajak committed Oct 18, 2021
1 parent f4917c0 commit a8be637
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/API/Grand.Api/DTOs/Common/StoreDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public partial class StoreDto : BaseApiEntityModel
public string CompanyName { get; set; }
public string CompanyAddress { get; set; }
public string CompanyPhoneNumber { get; set; }
public string CompanyRegNo { get; set; }
public string CompanyVat { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ public string CompanyHours
get { return _store.CompanyHours; }
}

public string CompanyRegNo {
get { return _store.CompanyRegNo; }
}

public string CompanyVat
{
get { return _store.CompanyVat; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ protected virtual async Task InstallStores(string companyName, string companyAdd
CompanyName = companyName,
CompanyAddress = companyAddress,
CompanyPhoneNumber = companyPhoneNumber,
CompanyRegNo = null,
CompanyVat = null,
CompanyEmail = companyEmail,
CompanyHours = "Monday - Sunday / 8:00AM - 6:00PM",
Expand Down
5 changes: 5 additions & 0 deletions src/Core/Grand.Domain/Stores/Store.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ public Store()
/// </summary>
public string CompanyName { get; set; }

/// <summary>
/// Gets or sets the company registration number
/// </summary>
public string CompanyRegNo { get; set; }

/// <summary>
/// Gets or sets the company address
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@
<span asp-validation-for="CompanyName"></span>
</div>
</div>
<div class="form-group">
<admin-label asp-for="CompanyRegNo" />
<div class="col-md-9 col-sm-9">
<admin-input asp-for="CompanyRegNo" />
<span asp-validation-for="CompanyRegNo"></span>
</div>
</div>
<div class="form-group">
<admin-label asp-for="CompanyAddress" />
<div class="col-md-9 col-sm-9">
Expand Down
3 changes: 3 additions & 0 deletions src/Web/Grand.Web.Admin/Models/Stores/StoreModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ public StoreModel()
[GrandResourceDisplayName("Admin.Configuration.Stores.Fields.CompanyPhoneNumber")]
public string CompanyPhoneNumber { get; set; }

[GrandResourceDisplayName("Admin.Configuration.Stores.Fields.CompanyRegNo")]
public string CompanyRegNo { get; set; }

[GrandResourceDisplayName("Admin.Configuration.Stores.Fields.CompanyVat")]
public string CompanyVat { get; set; }

Expand Down
3 changes: 3 additions & 0 deletions src/Web/Grand.Web/App_Data/Resources/DefaultLanguage.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5133,6 +5133,9 @@
<Resource Name="Admin.Configuration.Stores.Fields.CompanyPhoneNumber">
<Value>Company phone number</Value>
</Resource>
<Resource Name="Admin.Configuration.Stores.Fields.CompanyRegNo">
<Value>Company Reg. No.</Value>
</Resource>
<Resource Name="Admin.Configuration.Stores.Fields.CompanyVat">
<Value>Company VAT</Value>
</Resource>
Expand Down

0 comments on commit a8be637

Please sign in to comment.