Compare commits
No commits in common. "3604bdbc306f422ef391ab4af9bba1664d8c69a9" and "6cd675d76d4b041628bead512118ec50057c9b06" have entirely different histories.
3604bdbc30
...
6cd675d76d
|
|
@ -23,7 +23,6 @@ using TIAM.Entities.Transfers;
|
||||||
using TIAM.Entities.Users;
|
using TIAM.Entities.Users;
|
||||||
using TIAM.Models.Dtos.Products;
|
using TIAM.Models.Dtos.Products;
|
||||||
using AyCode.Database.DbSets.Profiles;
|
using AyCode.Database.DbSets.Profiles;
|
||||||
using TIAM.Database.DbSets.Drivers;
|
|
||||||
|
|
||||||
namespace TIAM.Database.DataLayers.Admins
|
namespace TIAM.Database.DataLayers.Admins
|
||||||
{
|
{
|
||||||
|
|
@ -67,7 +66,7 @@ namespace TIAM.Database.DataLayers.Admins
|
||||||
return ctx.UpdateTransfer(transfer);
|
return ctx.UpdateTransfer(transfer);
|
||||||
});
|
});
|
||||||
|
|
||||||
public Task<bool> RemoveTransferAsync(Transfer transfer) => RemoveTransferAsync(transfer.Id);
|
public Task<bool> RemoveTransferAsync(Transfer transfer) => TransactionAsync(ctx => ctx.RemoveTransfer(transfer));
|
||||||
public Task<bool> RemoveTransferAsync(Guid transferId) => TransactionAsync(ctx => ctx.RemoveTransfer(transferId));
|
public Task<bool> RemoveTransferAsync(Guid transferId) => TransactionAsync(ctx => ctx.RemoveTransfer(transferId));
|
||||||
#endregion Transfer
|
#endregion Transfer
|
||||||
|
|
||||||
|
|
@ -79,15 +78,15 @@ namespace TIAM.Database.DataLayers.Admins
|
||||||
|
|
||||||
public Task<bool> AddTransferDestinationAsync(TransferDestination transferDestination) => TransactionAsync(ctx => ctx.AddTransferDestination(transferDestination));
|
public Task<bool> AddTransferDestinationAsync(TransferDestination transferDestination) => TransactionAsync(ctx => ctx.AddTransferDestination(transferDestination));
|
||||||
public Task<bool> UpdateTransferDestinationAsync(TransferDestination transferDestination) => TransactionAsync(ctx => ctx.UpdateTransferDestination(transferDestination));
|
public Task<bool> UpdateTransferDestinationAsync(TransferDestination transferDestination) => TransactionAsync(ctx => ctx.UpdateTransferDestination(transferDestination));
|
||||||
public Task<bool> RemoveTransferDestinationAsync(TransferDestination transferDestination, bool removeAddress) => RemoveTransferDestinationAsync(transferDestination.Id, removeAddress);
|
public Task<bool> RemoveTransferDestinationAsync(TransferDestination transferDestination, bool removeAddress) => TransactionAsync(ctx => ctx.RemoveTransferDestination(transferDestination.Id, removeAddress));
|
||||||
public Task<bool> RemoveTransferDestinationAsync(Guid transferDestinationId, bool removeAddress) => TransactionAsync(ctx => ctx.RemoveTransferDestination(transferDestinationId, removeAddress));
|
public Task<bool> RemoveTransferDestinationAsync(Guid transferDestinationId, bool removeAddress) => TransactionAsync(ctx => ctx.RemoveTransferDestination(transferDestinationId, removeAddress));
|
||||||
#endregion TransferDestination
|
#endregion TransferDestination
|
||||||
|
|
||||||
#region TransferToDriver
|
#region TransferToDriver
|
||||||
public Task<TransferToDriver?> GetTransferToDriverByIdAsync(Guid transferToDriverId, bool autoInclude = true) => SessionAsync(ctx => ctx.GetTransferToDriverById(transferToDriverId, autoInclude));
|
public Task<TransferToDriver?> GetTransferToDriverByIdAsync(Guid transferToDriverId, bool autoInclude = false) => SessionAsync(ctx => ctx.TransferToDrivers.FirstOrDefault(x=>x.Id == transferToDriverId));
|
||||||
public Task<List<TransferToDriver>> GetTransferToDriversByTransferIdAsync(Guid transferId, bool autoInclude = true) => SessionAsync(ctx => ctx.GetTransferToDriversByTransferId(transferId, autoInclude).ToList());
|
public Task<List<TransferToDriver>> GetTransferToDriversByTransferIdAsync(Guid transferId, bool autoInclude = false) => SessionAsync(ctx => ctx.TransferToDrivers.Where(x => x.TransferId == transferId).ToList());
|
||||||
|
|
||||||
public Task<bool> AddTransferToDriverAsync(TransferToDriver transferToDriver) => TransactionAsync(ctx => ctx.AddTransferToDriver(transferToDriver));
|
public Task<bool> AddTransferToDriverAsync(TransferToDriver transferToDriver) => TransactionAsync(ctx => ctx.TransferToDrivers.Add(transferToDriver).State == EntityState.Added);
|
||||||
public async Task<TransferToDriver?> UpdateTransferToDriverAsync(TransferToDriver transferToDriver)
|
public async Task<TransferToDriver?> UpdateTransferToDriverAsync(TransferToDriver transferToDriver)
|
||||||
{
|
{
|
||||||
var transferToDriverId = transferToDriver.Id;
|
var transferToDriverId = transferToDriver.Id;
|
||||||
|
|
@ -105,14 +104,14 @@ namespace TIAM.Database.DataLayers.Admins
|
||||||
return result ? transferToDriver : null;
|
return result ? transferToDriver : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<bool> RemoveTransferToDriverAsync(TransferToDriver transferToDriver) => TransactionAsync(ctx => ctx.RemoveTransferToDriver(transferToDriver.Id));
|
public Task<bool> RemoveTransferToDriverAsync(TransferToDriver transferToDriver) => TransactionAsync(ctx => ctx.TransferToDrivers.Remove(transferToDriver).State == EntityState.Deleted);
|
||||||
#endregion TransferToDriver
|
#endregion TransferToDriver
|
||||||
|
|
||||||
#region Drivers
|
#region Drivers
|
||||||
public Task<List<UserProductMapping>> GetAllDriversAsync(bool autoInclude = true) => SessionAsync(ctx => ctx.GetAllDrivers(autoInclude).ToList());
|
|
||||||
public Task<List<UserProductMapping>> GetAllDriversByProductIdAsync(Guid productId, bool autoInclude = true) => SessionAsync(ctx => ctx.GetAllDriversByProductId(productId, autoInclude).ToList());
|
|
||||||
#endregion Drivers
|
|
||||||
|
|
||||||
|
public Task<List<UserProductMapping>> GetTAllDrivers() => SessionAsync(ctx => ctx.UserProductMappings.Where(x => ctx.Cars.Any(car => car.UserProductMappingId == x.Id)).ToList());
|
||||||
|
public Task<List<UserProductMapping>> GetTAllDriversByProductId(Guid productId) => SessionAsync(ctx => ctx.UserProductMappings.Where(x => x.ProductId == productId && ctx.Cars.Any(car => car.UserProductMappingId == x.Id)).ToList());
|
||||||
|
#endregion Drivers
|
||||||
#region TransferDestinationToProduct
|
#region TransferDestinationToProduct
|
||||||
public TransferDestinationToProduct? GetTransferDestinationToProductById(Guid transferDestinationToProductId) => Session(ctx=>ctx.GetTransferDestinationToProductById(transferDestinationToProductId));
|
public TransferDestinationToProduct? GetTransferDestinationToProductById(Guid transferDestinationToProductId) => Session(ctx=>ctx.GetTransferDestinationToProductById(transferDestinationToProductId));
|
||||||
public Task<TransferDestinationToProduct?> GetTransferDestinationToProductByIdAsync(Guid transferDestinationToProductId) => SessionAsync(ctx=>ctx.GetTransferDestinationToProductById(transferDestinationToProductId));
|
public Task<TransferDestinationToProduct?> GetTransferDestinationToProductByIdAsync(Guid transferDestinationToProductId) => SessionAsync(ctx=>ctx.GetTransferDestinationToProductById(transferDestinationToProductId));
|
||||||
|
|
@ -126,7 +125,7 @@ namespace TIAM.Database.DataLayers.Admins
|
||||||
|
|
||||||
public Task<bool> AddTransferDestinationToProductAsync(TransferDestinationToProduct transferDestinationToProduct) => TransactionAsync(ctx => ctx.AddTransferDestinationToProduct(transferDestinationToProduct));
|
public Task<bool> AddTransferDestinationToProductAsync(TransferDestinationToProduct transferDestinationToProduct) => TransactionAsync(ctx => ctx.AddTransferDestinationToProduct(transferDestinationToProduct));
|
||||||
public Task<bool> UpdateTransferDestinationToProductAsync(TransferDestinationToProduct transferDestinationToProduct) => TransactionAsync(ctx => ctx.UpdateTransferDestinationToProduct(transferDestinationToProduct));
|
public Task<bool> UpdateTransferDestinationToProductAsync(TransferDestinationToProduct transferDestinationToProduct) => TransactionAsync(ctx => ctx.UpdateTransferDestinationToProduct(transferDestinationToProduct));
|
||||||
public Task<bool> RemoveTransferDestinationToProductAsync(TransferDestinationToProduct transferDestinationToProduct) => RemoveTransferDestinationToProductAsync(transferDestinationToProduct.Id);
|
public Task<bool> RemoveTransferDestinationToProductAsync(TransferDestinationToProduct transferDestinationToProduct) => TransactionAsync(ctx => ctx.RemoveTransferDestinationToProduct(transferDestinationToProduct.Id));
|
||||||
public Task<bool> RemoveTransferDestinationToProductAsync(Guid transferDestinationToProductId) => TransactionAsync(ctx => ctx.RemoveTransferDestinationToProduct(transferDestinationToProductId));
|
public Task<bool> RemoveTransferDestinationToProductAsync(Guid transferDestinationToProductId) => TransactionAsync(ctx => ctx.RemoveTransferDestinationToProduct(transferDestinationToProductId));
|
||||||
#endregion TransferDestinationToProduct
|
#endregion TransferDestinationToProduct
|
||||||
|
|
||||||
|
|
@ -159,7 +158,7 @@ namespace TIAM.Database.DataLayers.Admins
|
||||||
public Task<bool> AddProductAsync(Product product) => TransactionAsync(ctx => ctx.AddProduct(product));
|
public Task<bool> AddProductAsync(Product product) => TransactionAsync(ctx => ctx.AddProduct(product));
|
||||||
|
|
||||||
public Task<bool> UpdateProductAsync(Product product) => TransactionAsync(ctx => ctx.UpdateProduct(product));
|
public Task<bool> UpdateProductAsync(Product product) => TransactionAsync(ctx => ctx.UpdateProduct(product));
|
||||||
public Task<bool> RemoveProductAsync(Product product) => RemoveProductAsync(product.Id);
|
//public Task<bool> RemoveProductAsync(Product product) => TransactionAsync(ctx => ctx.RemoveProduct(product.Id));
|
||||||
public Task<bool> RemoveProductAsync(Guid productId) => TransactionAsync(ctx => ctx.RemoveProduct(productId));
|
public Task<bool> RemoveProductAsync(Guid productId) => TransactionAsync(ctx => ctx.RemoveProduct(productId));
|
||||||
|
|
||||||
public UserProductMapping? GetUserProductMappingById(Guid userProductMappingId, bool autoInclude = true) => Session(ctx => ctx.GetUserProductMappingById(userProductMappingId, autoInclude));
|
public UserProductMapping? GetUserProductMappingById(Guid userProductMappingId, bool autoInclude = true) => Session(ctx => ctx.GetUserProductMappingById(userProductMappingId, autoInclude));
|
||||||
|
|
@ -218,7 +217,9 @@ namespace TIAM.Database.DataLayers.Admins
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<bool> RemoveUserProductMappingAsync(Guid userProductMappingId) => TransactionAsync(ctx => ctx.RemoveUserProductMapping(userProductMappingId));
|
public Task<bool> RemoveUserProductMappingAsync(Guid userProductMappingId) => TransactionAsync(ctx => ctx.RemoveUserProductMapping(userProductMappingId));
|
||||||
public Task<bool> RemoveUserProductMappingAsync(Guid userId, Guid productId) => TransactionAsync(ctx => ctx.RemoveUserProductMapping(userId, productId));
|
|
||||||
|
public Task<bool> RemoveUserProductMappingAsync(Guid userId, Guid productId)
|
||||||
|
=> TransactionAsync(ctx => ctx.RemoveUserProductMapping(userId, productId));
|
||||||
|
|
||||||
#endregion UserProductMapping
|
#endregion UserProductMapping
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
using AyCode.Database.DbContexts.Users;
|
using AyCode.Database.DbContexts.Users;
|
||||||
using TIAM.Database.DbSets.Drivers;
|
|
||||||
using TIAM.Database.DbSets.Emails;
|
using TIAM.Database.DbSets.Emails;
|
||||||
using TIAM.Database.DbSets.Permissions;
|
using TIAM.Database.DbSets.Permissions;
|
||||||
using TIAM.Database.DbSets.Products;
|
using TIAM.Database.DbSets.Products;
|
||||||
|
|
@ -15,7 +14,7 @@ using TIAM.Entities.Users;
|
||||||
namespace TIAM.Database.DbContexts.Admins;
|
namespace TIAM.Database.DbContexts.Admins;
|
||||||
|
|
||||||
public interface IAdminDbContext :
|
public interface IAdminDbContext :
|
||||||
ICompanyDbSet, IProductDbSet, IDriverDbSet,
|
ICompanyDbSet, IProductDbSet, IUserProductMappingDbSet,
|
||||||
IAcUserDbContextBase<User, Profile, UserToken, Company, UserToCompany, Address, EmailMessage>,
|
IAcUserDbContextBase<User, Profile, UserToken, Company, UserToCompany, Address, EmailMessage>,
|
||||||
IPermissionsDbSetContext, ITransferDestinationDbSet, ITransferDbSet, IEmailMessageDbSet
|
IPermissionsDbSetContext, ITransferDestinationDbSet, ITransferDbSet, IEmailMessageDbSet
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,6 @@ namespace TIAM.Database.DbContexts.Users
|
||||||
public DbSet<Company> Companies { get; set; }
|
public DbSet<Company> Companies { get; set; }
|
||||||
|
|
||||||
public DbSet<Transfer> Transfers { get; set; }
|
public DbSet<Transfer> Transfers { get; set; }
|
||||||
public DbSet<TransferToDriver> TransferToDrivers { get; set; }
|
|
||||||
|
|
||||||
public DbSet<TransferDestinationToProduct> TransferDestinationToProducts { get; set; }
|
public DbSet<TransferDestinationToProduct> TransferDestinationToProducts { get; set; }
|
||||||
|
|
||||||
public DbSet<TransferDestination> TransferDestinations { get; set; }
|
public DbSet<TransferDestination> TransferDestinations { get; set; }
|
||||||
|
|
@ -88,5 +86,6 @@ namespace TIAM.Database.DbContexts.Users
|
||||||
// //builderUserProductJsonDetail.OwnsMany(userProductJsonDetail => userProductJsonDetail.Cars2);
|
// //builderUserProductJsonDetail.OwnsMany(userProductJsonDetail => userProductJsonDetail.Cars2);
|
||||||
// });
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using TIAM.Entities.Drivers;
|
|
||||||
|
|
||||||
namespace TIAM.Database.DbSets.Cars;
|
|
||||||
|
|
||||||
public interface ICarDbSet
|
|
||||||
{
|
|
||||||
public DbSet<Car> Cars { get; set; }
|
|
||||||
}
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
using AyCode.Core.Extensions;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using TIAM.Database.DbSets.Transfers;
|
|
||||||
using TIAM.Database.DbSets.Users;
|
|
||||||
using TIAM.Entities.Drivers;
|
|
||||||
using TIAM.Entities.Transfers;
|
|
||||||
using TIAM.Entities.Users;
|
|
||||||
|
|
||||||
namespace TIAM.Database.DbSets.Drivers;
|
|
||||||
|
|
||||||
public static class DriverDbSetExtensions
|
|
||||||
{
|
|
||||||
public static IQueryable<UserProductMapping> GetAllDrivers(this IDriverDbSet ctx, bool autoInclude = true)
|
|
||||||
=> ctx.UserProductMappingsWithRelations(autoInclude).Where(x => ctx.Cars.Any(car => car.UserProductMappingId == x.Id));
|
|
||||||
|
|
||||||
public static IQueryable<UserProductMapping> GetAllDriversByProductId(this IDriverDbSet ctx, Guid productId, bool autoInclude = true)
|
|
||||||
=> ctx.GetAllDrivers(autoInclude).Where(x => x.ProductId == productId);
|
|
||||||
}
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
using TIAM.Database.DbSets.Cars;
|
|
||||||
using TIAM.Database.DbSets.Transfers;
|
|
||||||
using TIAM.Database.DbSets.Users;
|
|
||||||
using TIAM.Entities.Users;
|
|
||||||
|
|
||||||
namespace TIAM.Database.DbSets.Drivers;
|
|
||||||
|
|
||||||
public interface IDriverDbSet : IUserProductMappingDbSet, ICarDbSet, ITransferToDriverDbSet, ITransferDbSet
|
|
||||||
{ }
|
|
||||||
|
|
@ -3,7 +3,7 @@ using TIAM.Entities.Transfers;
|
||||||
|
|
||||||
namespace TIAM.Database.DbSets.Transfers;
|
namespace TIAM.Database.DbSets.Transfers;
|
||||||
|
|
||||||
public interface ITransferDbSet : ITransferToDriverDbSet
|
public interface ITransferDbSet
|
||||||
{
|
{
|
||||||
public DbSet<Transfer> Transfers { get; set; }
|
public DbSet<Transfer> Transfers { get; set; }
|
||||||
}
|
}
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using TIAM.Entities.Transfers;
|
|
||||||
|
|
||||||
namespace TIAM.Database.DbSets.Transfers;
|
|
||||||
|
|
||||||
public interface ITransferToDriverDbSet
|
|
||||||
{
|
|
||||||
public DbSet<TransferToDriver> TransferToDrivers { get; set; }
|
|
||||||
}
|
|
||||||
|
|
@ -13,12 +13,8 @@ public static class TransferDbSetExtensions
|
||||||
public static bool UpdateTransfer(this ITransferDbSet ctx, Transfer transfer)
|
public static bool UpdateTransfer(this ITransferDbSet ctx, Transfer transfer)
|
||||||
=> ctx.Transfers.Update(transfer).State == EntityState.Modified;
|
=> ctx.Transfers.Update(transfer).State == EntityState.Modified;
|
||||||
|
|
||||||
private static bool RemoveTransfer(this ITransferDbSet ctx, Transfer transfer)
|
public static bool RemoveTransfer(this ITransferDbSet ctx, Transfer transfer)
|
||||||
{
|
=> ctx.Transfers.Remove(transfer).State == EntityState.Deleted;
|
||||||
ctx.TransferToDrivers.RemoveRange(ctx.TransferToDrivers.Where(x => x.TransferId == transfer.Id));
|
|
||||||
|
|
||||||
return ctx.Transfers.Remove(transfer).State == EntityState.Deleted;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool RemoveTransfer(this ITransferDbSet ctx, Guid transferId)
|
public static bool RemoveTransfer(this ITransferDbSet ctx, Guid transferId)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using TIAM.Core.Enums;
|
|
||||||
using TIAM.Database.DbSets.Drivers;
|
|
||||||
using TIAM.Database.DbSets.Users;
|
|
||||||
using TIAM.Entities.Transfers;
|
|
||||||
using TIAM.Entities.Users;
|
|
||||||
|
|
||||||
namespace TIAM.Database.DbSets.Transfers;
|
|
||||||
|
|
||||||
public static class TransferToDriverDbSetExtensions
|
|
||||||
{
|
|
||||||
#region TransferToDriver
|
|
||||||
public static TransferToDriver? GetTransferToDriverById(this ITransferToDriverDbSet ctx, Guid transferToDriverId, bool autoInclude = true)
|
|
||||||
=> ctx.TransferToDrivers.FirstOrDefault(x => x.Id == transferToDriverId);
|
|
||||||
|
|
||||||
public static IQueryable<TransferToDriver> GetTransferToDriversByTransferId(this ITransferToDriverDbSet ctx, Guid transferId, bool autoInclude = true)
|
|
||||||
=> ctx.TransferToDrivers.Where(x => x.TransferId == transferId);
|
|
||||||
|
|
||||||
public static bool AddTransferToDriver(this ITransferDbSet ctx, TransferToDriver transferToDriver)
|
|
||||||
{
|
|
||||||
var transfer = ctx.GetTransferById(transferToDriver.TransferId)!;
|
|
||||||
transfer.TransferStatusType = TransferStatusType.AssignedToDriver;
|
|
||||||
|
|
||||||
return ctx.TransferToDrivers.Add(transferToDriver).State == EntityState.Added;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static bool RemoveTransferToDriver(this ITransferDbSet ctx, TransferToDriver transferToDriver)
|
|
||||||
{
|
|
||||||
//TODO: TransferStatusType change, ha nincs sofőr a törlés után! - J.
|
|
||||||
return ctx.TransferToDrivers.Remove(transferToDriver).State == EntityState.Deleted;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool RemoveTransferToDriver(this ITransferDbSet ctx, Guid transferToDriverId)
|
|
||||||
{
|
|
||||||
var transferToDriver = ctx.GetTransferToDriverById(transferToDriverId);
|
|
||||||
return transferToDriver == null || ctx.RemoveTransferToDriver(transferToDriver);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion TransferToDriver
|
|
||||||
}
|
|
||||||
|
|
@ -25,6 +25,7 @@ public static class UserProductMappingDbSetExtensions
|
||||||
public static IQueryable<UserProductMapping> GetUserProductMappingsByProductId(this IUserProductMappingDbSet ctx, Guid productId, bool autoInclude = true)
|
public static IQueryable<UserProductMapping> GetUserProductMappingsByProductId(this IUserProductMappingDbSet ctx, Guid productId, bool autoInclude = true)
|
||||||
=> ctx.UserProductMappingsWithRelations(autoInclude).Where(x => x.ProductId == productId);
|
=> ctx.UserProductMappingsWithRelations(autoInclude).Where(x => x.ProductId == productId);
|
||||||
|
|
||||||
|
|
||||||
public static bool AddUserProductMapping(this IUserProductMappingDbSet ctx, UserProductMapping userProductMapping)
|
public static bool AddUserProductMapping(this IUserProductMappingDbSet ctx, UserProductMapping userProductMapping)
|
||||||
{
|
{
|
||||||
if (userProductMapping.UserId.IsNullOrEmpty() || userProductMapping.ProductId.IsNullOrEmpty() || userProductMapping.Permissions < 0)
|
if (userProductMapping.UserId.IsNullOrEmpty() || userProductMapping.ProductId.IsNullOrEmpty() || userProductMapping.Permissions < 0)
|
||||||
|
|
|
||||||
|
|
@ -588,7 +588,7 @@ namespace TIAMWebApp.Server.Controllers
|
||||||
[SignalR(SignalRTags.GetAllDrivers)]
|
[SignalR(SignalRTags.GetAllDrivers)]
|
||||||
public async Task<List<UserProductMapping>> GetAllDrivers()
|
public async Task<List<UserProductMapping>> GetAllDrivers()
|
||||||
{
|
{
|
||||||
var result = await _adminDal.GetAllDriversAsync();
|
var result = await _adminDal.GetTAllDrivers();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -598,7 +598,7 @@ namespace TIAMWebApp.Server.Controllers
|
||||||
[SignalR(SignalRTags.GetAllDriversByProductId)]
|
[SignalR(SignalRTags.GetAllDriversByProductId)]
|
||||||
public async Task<List<UserProductMapping>> GetAllDriversByProductId(Guid productId)
|
public async Task<List<UserProductMapping>> GetAllDriversByProductId(Guid productId)
|
||||||
{
|
{
|
||||||
var result = await _adminDal.GetAllDriversByProductIdAsync(productId);
|
var result = await _adminDal.GetTAllDriversByProductId(productId);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -629,8 +629,6 @@ namespace TIAMWebApp.Server.Controllers
|
||||||
public async Task<TransferToDriver?> AddTransferDriver([FromBody] TransferToDriver transferToDriver)
|
public async Task<TransferToDriver?> AddTransferDriver([FromBody] TransferToDriver transferToDriver)
|
||||||
{
|
{
|
||||||
var result = await _adminDal.AddTransferToDriverAsync(transferToDriver);
|
var result = await _adminDal.AddTransferToDriverAsync(transferToDriver);
|
||||||
//TODO: Send email to driver... - J.
|
|
||||||
|
|
||||||
return result ? transferToDriver : null;
|
return result ? transferToDriver : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -641,8 +639,6 @@ namespace TIAMWebApp.Server.Controllers
|
||||||
public async Task<TransferToDriver?> UpdateTransferDriver([FromBody] TransferToDriver transferToDriver)
|
public async Task<TransferToDriver?> UpdateTransferDriver([FromBody] TransferToDriver transferToDriver)
|
||||||
{
|
{
|
||||||
var result = await _adminDal.UpdateTransferToDriverAsync(transferToDriver);
|
var result = await _adminDal.UpdateTransferToDriverAsync(transferToDriver);
|
||||||
//TODO: Send email to driver/user, ha van változás... - J.
|
|
||||||
|
|
||||||
return result; // ? transferToDriver : null;
|
return result; // ? transferToDriver : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -653,8 +649,6 @@ namespace TIAMWebApp.Server.Controllers
|
||||||
public async Task<TransferToDriver?> RemoveTransferDriver([FromBody] TransferToDriver transferToDriver)
|
public async Task<TransferToDriver?> RemoveTransferDriver([FromBody] TransferToDriver transferToDriver)
|
||||||
{
|
{
|
||||||
var result = await _adminDal.RemoveTransferToDriverAsync(transferToDriver);
|
var result = await _adminDal.RemoveTransferToDriverAsync(transferToDriver);
|
||||||
//TODO: Send email to driver/user... - J.
|
|
||||||
|
|
||||||
return result ? transferToDriver : null;
|
return result ? transferToDriver : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue