Merge branch 'Dev' of https://github.com/dotnet/eShopOnContainers into dev
This commit is contained in:
commit
e0831dcac8
@ -61,8 +61,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.TestRunne
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.TestRunner.iOS", "src\Mobile\eShopOnContainers\eShopOnContainers.TestRunner.iOS\eShopOnContainers.TestRunner.iOS.csproj", "{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Ordering.Application", "src\Services\Ordering\Ordering.Application\Ordering.Application.xproj", "{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Ordering.Infrastructure", "src\Services\Ordering\Ordering.Infrastructure\Ordering.Infrastructure.xproj", "{95F1F07C-4D92-4742-BD07-E5B805AAB651}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Identity", "Identity", "{02DF7FEE-C302-433D-A6CD-237A2569F236}"
|
||||
@ -668,54 +666,6 @@ Global
|
||||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
|
||||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.Release|x64.ActiveCfg = Release|iPhone
|
||||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.Release|x86.ActiveCfg = Release|iPhone
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.AppStore|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.AppStore|ARM.ActiveCfg = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.AppStore|ARM.Build.0 = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.AppStore|iPhone.Build.0 = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.AppStore|x64.ActiveCfg = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.AppStore|x64.Build.0 = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.AppStore|x86.ActiveCfg = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.AppStore|x86.Build.0 = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Release|x64.Build.0 = Release|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7}.Release|x86.Build.0 = Release|Any CPU
|
||||
{95F1F07C-4D92-4742-BD07-E5B805AAB651}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{95F1F07C-4D92-4742-BD07-E5B805AAB651}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
|
||||
{95F1F07C-4D92-4742-BD07-E5B805AAB651}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
|
||||
@ -984,7 +934,6 @@ Global
|
||||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1} = {B7B1D395-4E06-4036-BE86-C216756B9367}
|
||||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F} = {B7B1D395-4E06-4036-BE86-C216756B9367}
|
||||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3} = {B7B1D395-4E06-4036-BE86-C216756B9367}
|
||||
{4193CAA3-A1C3-4818-A06F-A2D85FDE77E7} = {0BD0DB92-2D98-44D9-9AC0-C59186D59B0B}
|
||||
{95F1F07C-4D92-4742-BD07-E5B805AAB651} = {0BD0DB92-2D98-44D9-9AC0-C59186D59B0B}
|
||||
{02DF7FEE-C302-433D-A6CD-237A2569F236} = {91CF7717-08AB-4E65-B10E-0B426F01E2E8}
|
||||
{A579E108-5445-403D-A407-339AC4D1611B} = {02DF7FEE-C302-433D-A6CD-237A2569F236}
|
||||
|
@ -3,7 +3,7 @@
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:5003/",
|
||||
"applicationUrl": "http://localhost:5103/",
|
||||
"sslPort": 0
|
||||
}
|
||||
},
|
||||
|
@ -7,6 +7,6 @@
|
||||
"Microsoft": "Information"
|
||||
}
|
||||
},
|
||||
"IdentityUrl": "http://identity.service:5105",
|
||||
"IdentityUrl": "http://localhost:5105",
|
||||
"ConnectionString": "127.0.0.1"
|
||||
}
|
||||
|
@ -298,7 +298,10 @@ namespace IdentityServer4.Quickstart.UI.Controllers
|
||||
if (HttpContext.User.Identity.IsAuthenticated)
|
||||
return Redirect(returnUrl);
|
||||
else
|
||||
if (ModelState.IsValid)
|
||||
return RedirectToAction("login", "account", new { returnUrl = returnUrl });
|
||||
else
|
||||
return View(model);
|
||||
}
|
||||
|
||||
return RedirectToAction("index", "home");
|
||||
|
@ -3,7 +3,7 @@
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:5000",
|
||||
"applicationUrl": "http://localhost:5105",
|
||||
"sslPort": 0
|
||||
}
|
||||
},
|
||||
|
@ -93,6 +93,14 @@ namespace eShopOnContainers.Identity
|
||||
|
||||
app.UseStaticFiles();
|
||||
|
||||
|
||||
// Make work identity server redirections in Edge and lastest versions of browers. WARN: Not valid in a production environment.
|
||||
app.Use(async (context, next) =>
|
||||
{
|
||||
context.Response.Headers.Add("Content-Security-Policy", "script-src 'unsafe-inline'");
|
||||
await next();
|
||||
});
|
||||
|
||||
app.UseIdentity();
|
||||
|
||||
// Adds IdentityServer
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"ConnectionString": "Server=tcp:127.0.0.1,5433;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;",
|
||||
"IdentityUrl": "http://identity.service:5105",
|
||||
"IdentityUrl": "http://localhost:5105",
|
||||
"Logging": {
|
||||
"IncludeScopes": false,
|
||||
"LogLevel": {
|
||||
|
@ -37,9 +37,9 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> Create(Order model, string action)
|
||||
{
|
||||
var user = _appUserParser.Parse(HttpContext.User);
|
||||
if (action == "[ Place Order ]")
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
var user = _appUserParser.Parse(HttpContext.User);
|
||||
await _orderSvc.CreateOrder(model);
|
||||
|
||||
//Empty basket for current user.
|
||||
|
@ -37,7 +37,7 @@ namespace Microsoft.eShopOnContainers.WebMVC.Models
|
||||
|
||||
public DateTime CardExpiration { get; set; }
|
||||
[RegularExpression(@"(0[1-9]|1[0-2])\/[0-9]{2}", ErrorMessage = "Expiration should match a valid MM/YY value")]
|
||||
[CardExpiration(ErrorMessage = "Should't be expired"), Required]
|
||||
[CardExpiration(ErrorMessage = "The card is expired"), Required]
|
||||
public string CardExpirationShort { get; set; }
|
||||
[Required]
|
||||
public string CardSecurityNumber { get; set; }
|
||||
|
@ -17,6 +17,7 @@ namespace Microsoft.eShopOnContainers.WebMVC.Services
|
||||
|
||||
user.CardHolderName = (claims.Claims.Where(x => x.Type == "card_holder").Count() > 0) ? claims.Claims.First(x => x.Type == "card_holder").Value : "";
|
||||
user.CardNumber = (claims.Claims.Where(x => x.Type == "card_number").Count() > 0) ? claims.Claims.First(x => x.Type == "card_number").Value : "";
|
||||
user.Expiration = (claims.Claims.Where(x => x.Type == "card_expiration").Count() > 0) ? claims.Claims.First(x => x.Type == "card_expiration").Value : "";
|
||||
user.CardType = (claims.Claims.Where(x => x.Type == "missing").Count() > 0) ? int.Parse(claims.Claims.First(x => x.Type == "missing").Value) : 0;
|
||||
user.City = (claims.Claims.Where(x => x.Type == "address_city").Count() > 0) ? claims.Claims.First(x => x.Type == "address_city").Value : "";
|
||||
user.Country = (claims.Claims.Where(x => x.Type == "address_country").Count() > 0) ? claims.Claims.First(x => x.Type == "address_country").Value : "";
|
||||
|
@ -65,7 +65,7 @@ namespace Microsoft.eShopOnContainers.WebMVC.Services
|
||||
|
||||
order.CardNumber = user.CardNumber;
|
||||
order.CardHolderName = user.CardHolderName;
|
||||
order.CardExpiration = new DateTime(1,int.Parse(user.Expiration.Split('/')[0]), int.Parse("20" + user.Expiration.Split('/')[1]));
|
||||
order.CardExpiration = new DateTime(int.Parse("20" + user.Expiration.Split('/')[1]),int.Parse(user.Expiration.Split('/')[0]), 1);
|
||||
order.CardSecurityNumber = user.SecurityNumber;
|
||||
|
||||
return order;
|
||||
|
@ -12,11 +12,11 @@
|
||||
<div class="container">
|
||||
<form asp-action="Index" asp-controller="Catalog" method="post">
|
||||
<div data-name="brand" class="select-filter-wrapper">
|
||||
<img src="~/images/arrow-down.png" class="select-filter-arrow" />
|
||||
<div class="select-filter-arrow-container"><img src="~/images/arrow-down.png" class="select-filter-arrow" /></div>
|
||||
<select asp-for="@Model.BrandFilterApplied" asp-items="@Model.Brands" class="select-filter"></select>
|
||||
</div>
|
||||
<div data-name="type" class="select-filter-wrapper">
|
||||
<img src="~/images/arrow-down.png" class="select-filter-arrow" />
|
||||
<div class="select-filter-arrow-container"><img src="~/images/arrow-down.png" class="select-filter-arrow" /></div>
|
||||
<select asp-for="@Model.TypesFilterApplied" asp-items="@Model.Types" class="select-filter"></select>
|
||||
</div>
|
||||
<button type="submit" class="btn-brand btn-brand-small btn-brand-small-filter btn-catalog-apply">
|
||||
|
@ -12,6 +12,7 @@
|
||||
</div>
|
||||
<div class="container order-create-container">
|
||||
<form method="post" asp-controller="Order" asp-action="Create">
|
||||
<div asp-validation-summary="All" class="text-danger"></div>
|
||||
<h4 class="order-create-section-title">SHIPPING ADDRESS</h4>
|
||||
<div class="form-horizontal row">
|
||||
<div class="form-group col-sm-6">
|
||||
|
@ -55,15 +55,12 @@
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>
|
||||
<input type="submit"
|
||||
class="btn btn-default cart-refresh-button"
|
||||
value=""
|
||||
name="action" />
|
||||
</td>
|
||||
<td>
|
||||
<div class="cart-total-value">
|
||||
<div class="cart-total-label"><span>TOTAL</span></div>
|
||||
<span>$ @Model.Total</span>
|
||||
<input type="hidden" value="@Model.Total" name="Total"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -6,11 +6,10 @@
|
||||
|
||||
<div>
|
||||
<a asp-area="" asp-controller="Cart" asp-action="Index"><img src="~/images/cart.png" class="fr layout-cart-image @Model.Disabled" />
|
||||
|
||||
<div class="layout-cart-badge @Model.Disabled">
|
||||
@Model.ItemsCount
|
||||
</div>
|
||||
</a>
|
||||
<div class="layout-cart-badge @Model.Disabled">
|
||||
@Model.ItemsCount
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
"CatalogUrl": "http://localhost:5101",
|
||||
"OrderingUrl": "http://localhost:5102",
|
||||
"BasketUrl": "http://localhost:5103",
|
||||
"IdentityUrl": "http://identity.service:5105",
|
||||
"IdentityUrl": "http://localhost:5105",
|
||||
"CallBackUrl": "http://localhost:5100/",
|
||||
"Logging": {
|
||||
"IncludeScopes": false,
|
||||
|
@ -36,7 +36,7 @@ textarea {
|
||||
}
|
||||
|
||||
.select-filter {
|
||||
background-color: transparent;
|
||||
background-color: #00A69C;
|
||||
padding: 10px;
|
||||
margin: 10px;
|
||||
margin-right: 20px;
|
||||
@ -61,6 +61,7 @@ select::-ms-expand {
|
||||
z-index: 0;
|
||||
display:inline-block;
|
||||
margin-left: -10px;
|
||||
position:relative
|
||||
}
|
||||
|
||||
.select-filter-wrapper::before {
|
||||
@ -75,11 +76,18 @@ select::-ms-expand {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.select-filter-arrow {
|
||||
.select-filter-arrow-container {
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
right: 25px;
|
||||
}
|
||||
|
||||
|
||||
/*.select-filter-arrow {
|
||||
position: absolute;
|
||||
margin-left: 130px;
|
||||
margin-top: 40px;
|
||||
}
|
||||
}*/
|
||||
|
||||
.btn-brand-small-filter {
|
||||
margin-top: 10px;
|
||||
|
Loading…
x
Reference in New Issue
Block a user