Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
com.akaver.sportmap
SportMap-ASPNET
Commits
474110c4
Commit
474110c4
authored
Jun 03, 2020
by
Andres Käver
Browse files
track translations
parent
1be2708e
Pipeline
#839
passed with stages
in 2 minutes and 1 second
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
BLL.App/Services/GpsLocationService.cs
View file @
474110c4
...
...
@@ -36,7 +36,11 @@ namespace BLL.App.Services
// add location
var
gpsSession
=
await
UOW
.
GpsSessions
.
FirstOrDefaultAsync
(
gpsLocation
.
GpsSessionId
,
gpsLocation
.
AppUserId
);
// last location, based on time
var
lastLocation
=
await
UOW
.
GpsLocations
.
LastInSessionAsync
(
gpsSession
.
Id
);
if
(
lastLocation
!=
null
)
{
// calculate the metrics
...
...
DAL.App.EF/Repositories/TrackRepository.cs
View file @
474110c4
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
Contracts.DAL.App.Repositories
;
using
Contracts.DAL.Base.Mappers
;
using
DAL.App.EF.Mappers
;
using
DAL.Base.EF.Repositories
;
using
DAL.Base.Mappers
;
using
Domain.App
;
using
Microsoft.EntityFrameworkCore
;
using
Track
=
DAL
.
App
.
DTO
.
Track
;
namespace
DAL.App.EF.Repositories
{
...
...
@@ -14,5 +19,20 @@ namespace DAL.App.EF.Repositories
public
TrackRepository
(
AppDbContext
repoDbContext
)
:
base
(
repoDbContext
,
new
DALMapper
<
Domain
.
App
.
Track
,
DTO
.
Track
>())
{
}
public
override
async
Task
<
IEnumerable
<
Track
>>
GetAllAsync
(
object
?
userId
=
null
,
bool
noTracking
=
true
)
{
var
query
=
PrepareQuery
(
userId
,
noTracking
);
query
=
query
.
Include
(
l
=>
l
.
Name
)
.
ThenInclude
(
t
=>
t
!.
Translations
)
.
Include
(
l
=>
l
.
Description
)
.
ThenInclude
(
t
=>
t
!.
Translations
);
var
domainEntities
=
await
query
.
ToListAsync
();
var
result
=
domainEntities
.
Select
(
e
=>
Mapper
.
Map
(
e
));
return
result
;
}
}
}
\ No newline at end of file
Extensions/Extensions.csproj
View file @
474110c4
...
...
@@ -5,8 +5,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="6.
5.1
" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.
5.1
" />
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="6.
6.0
" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.
6.0
" />
</ItemGroup>
</Project>
WebApp/Views/Home/Index.cshtml
View file @
474110c4
...
...
@@ -10,4 +10,16 @@
<h4>
Frontend
</h4>
<p><a
href=
"https://aurelia.sportmap.akaver.com"
>
Web done in Aurelia!
</a></p>
<div
class=
"dropdown"
>
<button
class=
"btn btn-secondary dropdown-toggle"
type=
"button"
id=
"dropdownMenuButton"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
>
Dropdown button
</button>
<div
class=
"dropdown-menu"
aria-labelledby=
"dropdownMenuButton"
>
<a
class=
"dropdown-item"
href=
"#"
>
Action
</a>
<a
class=
"dropdown-item"
href=
"#"
>
Another action
</a>
<a
class=
"dropdown-item"
href=
"#"
>
Something else here
</a>
</div>
</div>
</div>
WebApp/webpack.config.js
View file @
474110c4
...
...
@@ -20,7 +20,11 @@ module.exports = ({production} = {}, {} = {}) => ({
test
:
/
\.
css$/
,
use
:
[
MiniCssExtractPlugin
.
loader
,
'
css-loader
'
]
},
{
test
:
/
\.(
png|gif|jpg|cur
)
$/i
,
loader
:
'
url-loader
'
,
options
:
{
limit
:
8192
}},
{
test
:
/
\.(
png|gif|jpg|cur
)
$/i
,
loader
:
'
url-loader
'
,
options
:
{
limit
:
8192
}
},
{
test
:
/
\.
woff2
(\?
v=
[
0-9
]\.[
0-9
]\.[
0-9
])?
$/i
,
loader
:
'
url-loader
'
,
...
...
@@ -32,7 +36,14 @@ module.exports = ({production} = {}, {} = {}) => ({
options
:
{
limit
:
10000
,
mimetype
:
'
application/font-woff
'
}
},
// load these fonts normally, as files:
{
test
:
/
\.(
ttf|eot|svg|otf
)(\?
v=
[
0-9
]\.[
0-9
]\.[
0-9
])?
$/i
,
loader
:
'
file-loader
'
},
{
test
:
/
\.(
ttf|eot|svg|otf
)(\?
v=
[
0-9
]\.[
0-9
]\.[
0-9
])?
$/i
,
loader
:
'
file-loader
'
},
{
test
:
/
\.
exec
\.
js$/
,
use
:
'
script-loader
'
}
],
},
resolve
:
{
...
...
WebApp/wwwroot/js/site.ts
View file @
474110c4
...
...
@@ -8,7 +8,14 @@ import 'script-loader!jquery-validation/dist/jquery.validate.min';
import
'
script-loader!jquery-validation-unobtrusive/dist/jquery.validate.unobtrusive.min
'
;
import
'
script-loader!popper.js/dist/popper.min.js
'
;
import
'
script-loader!popper.js/dist/umd/popper-utils.js
'
;
import
'
script-loader!popper.js/dist/umd/popper.js
'
;
declare
global
{
interface
Window
{
Popper
:
any
;
}
}
window
.
Popper
=
require
(
'
popper.js/dist/popper.js
'
)
import
'
script-loader!bootstrap
'
;
import
'
bootstrap/dist/css/bootstrap.min.css
'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment