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
01281b3e
Commit
01281b3e
authored
May 22, 2020
by
Andres Käver
Browse files
session fix
parent
fe0d36a8
Pipeline
#836
passed with stages
in 1 minute and 30 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
BLL.App/Services/GpsSessionService.cs
View file @
01281b3e
...
...
@@ -43,7 +43,7 @@ namespace BLL.App.Services
// calculate duration - in seconds
if
(
session
.
GpsLocations
!.
Count
>
1
)
{
session
.
Duration
=
(
session
.
GpsLocations
.
La
st
().
RecordedAt
-
session
.
GpsLocations
.
Fir
st
().
RecordedAt
).
TotalSeconds
;
session
.
Duration
=
(
session
.
GpsLocations
.
Fir
st
().
RecordedAt
-
session
.
GpsLocations
.
La
st
().
RecordedAt
).
TotalSeconds
;
}
DAL
.
App
.
DTO
.
GpsLocation
?
prevLocation
=
null
;
...
...
@@ -72,7 +72,7 @@ namespace BLL.App.Services
session
.
GpsLocations
=
null
;
await
UOW
.
GpsSessions
.
UpdateAsync
(
session
);
await
UOW
.
SaveChangesAsync
();
}
private
static
double
GetDistance
(
DAL
.
App
.
DTO
.
GpsLocation
gpsLocation
,
DAL
.
App
.
DTO
.
GpsLocation
lastLocation
)
...
...
WebApp/Views/GpsSessions/Index.cshtml
View file @
01281b3e
...
...
@@ -26,7 +26,7 @@
<p
class=
"card-text"
>
@Html.DisplayNameFor(model => model.GpsSessionType) - @(item.GpsSessionType!.Name!)
</p>
<p
class=
"card-text"
>
@Html.DisplayNameFor(model => model.AppUser) - @(item.AppUser!.FirstLastName)
</p>
<p
class=
"card-text"
>
@Html.DisplayNameFor(model => model.RecordedAt) - @Html.DisplayFor(model => item.RecordedAt)
</p>
<p
class=
"card-text"
>
@Html.DisplayNameFor(model => model.Duration) - @
Html.DisplayFor(model => item.Duration
)
</p>
<p
class=
"card-text"
>
@Html.DisplayNameFor(model => model.Duration) - @
(TimeSpan.FromSeconds(item.Duration).ToString(@"hh\:mm\:ss")
)
</p>
<p
class=
"card-text"
>
@Html.DisplayNameFor(model => model.Distance) - @((item.Distance / 1000.0).ToString("N3"))
</p>
<p
class=
"card-text"
>
@Html.DisplayNameFor(model => model.Climb) - @Html.DisplayFor(model => item.Climb)
</p>
<p
class=
"card-text"
>
@Html.DisplayNameFor(model => model.Descent) - @Html.DisplayFor(model => item.Descent)
</p>
...
...
WebApp/appsettings.Development.json
View file @
01281b3e
{
"Logging"
:
{
"Logging"
:
{
"LogLevel"
:
{
"Default"
:
"Information"
,
"Microsoft"
:
"Warning"
,
...
...
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