Commit 474110c4 authored by Andres Käver's avatar Andres Käver
Browse files

track translations

parent 1be2708e
Pipeline #839 passed with stages
in 2 minutes and 1 second
......@@ -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
......
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
......@@ -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>
......@@ -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>
......@@ -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: {
......
......@@ -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';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment