work in progress commit
This commit is contained in:
parent
8a0b370dd7
commit
57bacdc5f8
|
|
@ -5,4 +5,5 @@ public enum ProductType : byte
|
|||
NotDefined = 0,
|
||||
Transfer = 5,
|
||||
Hotel = 10,
|
||||
Guide = 15,
|
||||
}
|
||||
|
|
@ -57,6 +57,7 @@ namespace TIAM.Database.DataLayers.Admins
|
|||
|
||||
public Task<List<Transfer>> GetTransfersByFilterAsync(CriteriaOperator criteriaOperator) => SessionAsync(ctx => (ctx.GetTransfers().AppendWhere(new CriteriaToExpressionConverter(), criteriaOperator) as IQueryable<Transfer>)!.OrderBy(x => x.TransferStatusType).ThenByDescending(x => x.OrderId).ToList());
|
||||
public Task<List<Transfer>> GetTransfersByDriverUserIdAsync(Guid driverUserId) => SessionAsync(ctx => ctx.GetTransfersByDriverUserId(driverUserId).OrderBy(x => x.TransferStatusType).ThenByDescending(x => x.OrderId).ToList());
|
||||
public Task<List<Transfer>> GetTransfersByProductIdAsync(Guid productId) => SessionAsync(ctx => ctx.GetTransfersByProductId(productId).OrderBy(x => x.TransferStatusType).ThenByDescending(x => x.OrderId).ToList());
|
||||
public Task<List<Transfer>> GetTransfersByUserProductMappingIdAsync(Guid userProductMappingId) => SessionAsync(ctx => ctx.GetTransfersByUserProductMappingId(userProductMappingId).OrderBy(x => x.TransferStatusType).ThenByDescending(x => x.OrderId).ToList());
|
||||
|
||||
public Task<List<Transfer>> GetTransfersAsync() => SessionAsync(ctx => ctx.GetTransfers().OrderBy(x => x.TransferStatusType).ThenByDescending(x => x.OrderId).ToList());
|
||||
|
|
|
|||
|
|
@ -50,6 +50,9 @@ public static class TransferDbSetExtensions
|
|||
public static IQueryable<Transfer> GetTransfersByDriverUserId(this ITransferDbSet ctx, Guid driverUserId)
|
||||
=> ctx.GetTransfers().Where(x => x.TransferToDrivers.Any(ttd => ttd.UserProductMapping.UserId == driverUserId));
|
||||
|
||||
public static IQueryable<Transfer> GetTransfersByProductId(this ITransferDbSet ctx, Guid productId)
|
||||
=> ctx.GetTransfers().Where(x => x.ProductId == productId);
|
||||
|
||||
public static IQueryable<Transfer> GetTransfersByUserProductMappingId(this ITransferDbSet ctx, Guid userProductMappingId)
|
||||
=> ctx.GetTransfers().Where(x => x.TransferToDrivers.Any(ttd => ttd.UserProductMappingId == userProductMappingId));
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ public class SignalRTags : AcSignalRTags
|
|||
public const int GetTransfersByProductId = 5;
|
||||
public const int GetTransfersByCompanyId = 6;
|
||||
public const int GetTransfersByUserProductMappingId = 701;
|
||||
public const int GetTransfersByOrderingProductId = 702;
|
||||
|
||||
public const int GetTransfersByFilterText = 301;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System.Net;
|
||||
using TIAM.Core.Consts;
|
||||
using TIAM.Entities.Products;
|
||||
using TIAM.Entities.Users;
|
||||
using TIAMWebApp.Shared.Application.Interfaces;
|
||||
using TIAMWebApp.Shared.Application.Models;
|
||||
|
|
@ -17,6 +18,14 @@ namespace TIAMMobileApp.Services
|
|||
public bool IsDriver { get; set; } = false;
|
||||
public bool IsDevAdmin { get; set; } = false;
|
||||
public bool IsSysAdmin { get; set; } = false;
|
||||
public List<Product> GetHotels()
|
||||
{
|
||||
if (User.UserModelDto.Products.Count > 0)
|
||||
{
|
||||
return User.UserModelDto.Products.Where(x => x.ProductType == TIAM.Core.Enums.ProductType.Hotel).ToList();
|
||||
}
|
||||
else return new List<Product>();
|
||||
}
|
||||
public Guid DriverPersmissionId { get; set; } = Guid.Empty;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@
|
|||
{
|
||||
if (SessionService.User.UserModelDto.Products.Any(x => x.ProductType == TIAM.Core.Enums.ProductType.Hotel))
|
||||
{
|
||||
Hotels = SessionService.User.UserModelDto.Products.Where(x => x.ProductType == TIAM.Core.Enums.ProductType.Hotel).ToList();
|
||||
Hotels = SessionService.GetHotels();
|
||||
SelectedHotel = Hotels[0];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
@page "/user/hoteladmin/{id}"
|
||||
@page "/user/hoteladmin/{id:guid}"
|
||||
@using TIAMSharedUI.Shared
|
||||
@using TIAMWebApp.Shared.Application.Interfaces;
|
||||
@layout AdminLayout
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
<div class="container">
|
||||
|
||||
<HotelComponent Id="@Guid.Parse(id)"></HotelComponent>
|
||||
<HotelComponent Id="@id"></HotelComponent>
|
||||
|
||||
<!-- Stats admin-->
|
||||
<hr />
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
|
||||
@code {
|
||||
[Parameter] public string id { get; set; }
|
||||
[Parameter] public Guid id { get; set; }
|
||||
bool isUserLoggedIn;
|
||||
int userType = 0;
|
||||
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
{
|
||||
return;
|
||||
}
|
||||
var check = SessionService.User.UserModelDto.UserProductMappings.Any(x => x.ProductId == Guid.Parse(id));
|
||||
var check = SessionService.User.UserModelDto.UserProductMappings.Any(x => x.ProductId == id);
|
||||
if (!check)
|
||||
{
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,15 @@
|
|||
@using BlazorAnimation
|
||||
@using AyCode.Core
|
||||
@using AyCode.Core.Extensions
|
||||
@using BlazorAnimation
|
||||
@using TIAM.Entities.Transfers
|
||||
@using TIAMSharedUI.Pages.User.SysAdmins
|
||||
@using TIAMSharedUI.Shared
|
||||
@using TIAMSharedUI.Shared.Components.Grids
|
||||
@using TIAMWebApp.Shared.Application.Models;
|
||||
@using TIAMWebApp.Shared.Application.Interfaces;
|
||||
@using TIAMSharedUI.Pages.User;
|
||||
@using TIAMWebApp.Shared.Application.Models.ClientSide.UI
|
||||
@using TIAM.Services
|
||||
|
||||
|
||||
|
||||
|
|
@ -41,9 +48,9 @@
|
|||
</div>
|
||||
|
||||
<div class="d-flex flex-column mb-4 pb-2">
|
||||
<h4> Hotel name: <span class="small text-muted"> Example hotel </span></h4>
|
||||
<h4> Address: <span class="small text-muted"> Budapest, Minta u. 46 </span></h4>
|
||||
<h4> Phone number: <span class="small text-muted"> +36 1 123 4567</span></h4>
|
||||
<h4> Hotel name: <span class="small text-muted"> @hotelName </span></h4>
|
||||
<h4> Address: <span class="small text-muted"> @hotelAddress </span></h4>
|
||||
<h4> Contact name: <span class="small text-muted"> @hotelContactName</span></h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer py-2 px-4">
|
||||
|
|
@ -58,7 +65,7 @@
|
|||
</div>
|
||||
</Animation>
|
||||
</div>
|
||||
<div class=" col-12 col-xl-3">
|
||||
<div class=" col-12 col-xl-9">
|
||||
<Animation Effect="@Effect.FadeIn" Speed="@Speed.Fast" Delay="@TimeSpan.FromMilliseconds(250)">
|
||||
<div class="card glass card-admin" style="border-radius: 16px;">
|
||||
<div class="card-header py-2 px-4">
|
||||
|
|
@ -75,19 +82,66 @@
|
|||
<div class="card-body card-admin-body py-2 px-4">
|
||||
<div class="d-flex flex-row mb-4 pb-2">
|
||||
|
||||
<DxGrid Data="@OrderData">
|
||||
<Columns>
|
||||
<DxGridDataColumn FieldName="Date" DisplayFormat="D" MinWidth="100">
|
||||
<CellDisplayTemplate>
|
||||
<a class="d-block text-left" href="transferdetails">@context.Value</a>
|
||||
</CellDisplayTemplate>
|
||||
<TransferGrid Logger="_logger"
|
||||
SignalRClient="adminSignalRClient"
|
||||
ContextIds="@(Id.IsNullOrEmpty() ? null : [Id])"
|
||||
GetAllMessageTag="@SignalRTags.GetTransfersByOrderingProductId"
|
||||
CustomizeElement="Grid_CustomizeElement"
|
||||
EditMode="GridEditMode.EditRow"
|
||||
ColumnResizeMode="GridColumnResizeMode.NextColumn"
|
||||
PageSize="13"
|
||||
ShowFilterRow="true"
|
||||
DetailRowDisplayMode="GridDetailRowDisplayMode.Never">
|
||||
|
||||
<Columns>
|
||||
<DxGridCommandColumn NewButtonVisible="false" DeleteButtonVisible="AcDomain.IsDeveloperVersion" Width="80" MinWidth="80" FixedPosition="GridColumnFixedPosition.Left" />
|
||||
<DxGridDataColumn FieldName="Id" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N" />
|
||||
<DxGridDataColumn FieldName="OrderId" Caption="Order" SortIndex="1" SortOrder="GridColumnSortOrder.Descending" Width="70">
|
||||
<CellDisplayTemplate>
|
||||
@{
|
||||
var idKeyField = ((Transfer)context.DataItem).Id.ToString("N");
|
||||
var editUri = $"mytransfers/{idKeyField}";
|
||||
<NavLink href="@editUri">
|
||||
<text>@context.Value</text>
|
||||
</NavLink>
|
||||
}
|
||||
</CellDisplayTemplate>
|
||||
</DxGridDataColumn>
|
||||
<DxGridDataColumn FieldName="Income" Width="15%" />
|
||||
<DxGridDataColumn FieldName="TransactionId" Width="15%" />
|
||||
<DxGridDataColumn FieldName="Status" Width="10%" />
|
||||
|
||||
<DxGridDataColumn FieldName="Revenue" Caption="Revenue" Width="70" CaptionAlignment="GridTextAlignment.Center" />
|
||||
<DxGridDataColumn FieldName="FullName" />
|
||||
<DxGridDataColumn FieldName="ContactPhone" Width="120" />
|
||||
<DxGridDataColumn FieldName="ContactEmail" Width="120">
|
||||
</DxGridDataColumn>
|
||||
<DxGridDataColumn FieldName="PaymentId" DisplayFormat="N" Visible="false" />
|
||||
<DxGridDataColumn Caption="Paid" FieldName="Paid" Width="75" TextAlignment="GridTextAlignment.Center" CaptionAlignment="GridTextAlignment.Center" />
|
||||
<DxGridDataColumn FieldName="TransferStatusType" Caption="Status" SortIndex="0" Width="120" SortOrder="GridColumnSortOrder.Ascending" SortMode="GridColumnSortMode.Value">
|
||||
<CellDisplayTemplate>
|
||||
@{
|
||||
|
||||
TransferStatusModel keyField = Statuses.FirstOrDefault(x => x.StatusValue == (byte)context.Value)!;
|
||||
string transferStatusText = keyField.StatusName;
|
||||
<text>@transferStatusText</text>
|
||||
}
|
||||
</CellDisplayTemplate>
|
||||
</DxGridDataColumn>
|
||||
<DxGridDataColumn FieldName="ReferralId" DisplayFormat="N" Visible="false" />
|
||||
<DxGridDataColumn FieldName="Comment" Caption="Comment" />
|
||||
<DxGridDataColumn FieldName="Created" DisplayFormat="g" Width="125" Visible="false" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||
</Columns>
|
||||
</DxGrid>
|
||||
<DetailRowTemplate>
|
||||
<DxTabs>
|
||||
<DxTabPage Text="Messages">
|
||||
<MessageDetailGridComponent ContextId="((Transfer)context.DataItem).Id" />
|
||||
</DxTabPage>
|
||||
<DxTabPage Text="Driver">
|
||||
<TransferToDriverGridComponent ContextId="((Transfer)context.DataItem).Id" ParentData="(Transfer)context.DataItem" />
|
||||
</DxTabPage>
|
||||
</DxTabs>
|
||||
</DetailRowTemplate>
|
||||
|
||||
|
||||
</TransferGrid>
|
||||
|
||||
|
||||
|
||||
|
|
@ -109,7 +163,7 @@
|
|||
</div>
|
||||
</Animation>
|
||||
</div>
|
||||
<div class=" col-12 col-xl-3">
|
||||
<div class=" col-12 col-xl-6">
|
||||
<Animation Effect="@Effect.FadeIn" Speed="@Speed.Fast" Delay="@TimeSpan.FromMilliseconds(250)">
|
||||
<div class="card glass card-admin" style="border-radius: 16px;">
|
||||
<div class="card-header py-2 px-4">
|
||||
|
|
@ -126,38 +180,38 @@
|
|||
<div class="card-body card-admin-body py-2 px-4">
|
||||
<div class="d-flex flex-column mb-4 pb-2">
|
||||
|
||||
|
||||
|
||||
<div class="media text-muted pt-3">
|
||||
<!--img src="https://bootdey.com/img/Content/avatar/avatar7.png" alt="" class="mr-2 rounded" width="32" height="32"-->
|
||||
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
|
||||
<strong class="d-block text-gray-dark">username</strong>
|
||||
Donec id elit non mi porta gravida at eget metus...
|
||||
</p>
|
||||
</div>
|
||||
<div class="media text-muted pt-3">
|
||||
|
||||
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
|
||||
<strong class="d-block text-gray-dark">username</strong>
|
||||
Donec id elit non mi porta gravida at eget metus...
|
||||
</p>
|
||||
</div>
|
||||
<div class="media text-muted pt-3">
|
||||
|
||||
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
|
||||
<strong class="d-block text-gray-dark">username</strong>
|
||||
Donec id elit non mi porta gravida at eget metus...
|
||||
</p>
|
||||
</div>
|
||||
<div class="media text-muted pt-3">
|
||||
|
||||
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
|
||||
<strong class="d-block text-gray-dark">username</strong>
|
||||
Donec id elit non mi porta gravida at eget metus...
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="media text-muted pt-3">
|
||||
<!--img src="https://bootdey.com/img/Content/avatar/avatar7.png" alt="" class="mr-2 rounded" width="32" height="32"-->
|
||||
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
|
||||
<strong class="d-block text-gray-dark">username</strong>
|
||||
Donec id elit non mi porta gravida at eget metus...
|
||||
</p>
|
||||
</div>
|
||||
<div class="media text-muted pt-3">
|
||||
|
||||
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
|
||||
<strong class="d-block text-gray-dark">username</strong>
|
||||
Donec id elit non mi porta gravida at eget metus...
|
||||
</p>
|
||||
</div>
|
||||
<div class="media text-muted pt-3">
|
||||
|
||||
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
|
||||
<strong class="d-block text-gray-dark">username</strong>
|
||||
Donec id elit non mi porta gravida at eget metus...
|
||||
</p>
|
||||
</div>
|
||||
<div class="media text-muted pt-3">
|
||||
|
||||
<p class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray">
|
||||
<strong class="d-block text-gray-dark">username</strong>
|
||||
Donec id elit non mi porta gravida at eget metus...
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
|
@ -175,13 +229,13 @@
|
|||
</Animation>
|
||||
</div>
|
||||
|
||||
<div class=" col-12 col-xl-3">
|
||||
<div class="col-12 col-xl-6" hidden="@accessDenied">
|
||||
<Animation Effect="@Effect.FadeIn" Speed="@Speed.Fast" Delay="@TimeSpan.FromMilliseconds(250)">
|
||||
<div class="card glass card-admin" style="border-radius: 16px;">
|
||||
<div class="card-header py-2 px-4">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<span class="fw-bold text-body">Panel title</span>
|
||||
<span class="fw-bold text-body">Income</span>
|
||||
<p class="text-muted mb-0">Subtitle</p>
|
||||
</div>
|
||||
<div>
|
||||
|
|
@ -191,29 +245,35 @@
|
|||
</div>
|
||||
<div class="card-body card-admin-body py-2 px-4">
|
||||
<div class="d-flex flex-row mb-4 pb-2">
|
||||
<div class="flex-fill">
|
||||
<h5 class="bold">Some info</h5>
|
||||
<p class="text-muted"> Budapest, Dózsa György út 35, 1146</p>
|
||||
</div>
|
||||
<div>
|
||||
<!--img class="align-self-center img-fluid"
|
||||
src="https://mdbcdn.b-cdn.net/img/Photos/Horizontal/E-commerce/Products/6.webp" width="250"-->
|
||||
</div>
|
||||
<TransferGrid Logger="_logger"
|
||||
SignalRClient="adminSignalRClient"
|
||||
ContextIds="@(Id.IsNullOrEmpty() ? null : [Id])"
|
||||
GetAllMessageTag="@SignalRTags.GetTransfersByOrderingProductId"
|
||||
ColumnResizeMode="GridColumnResizeMode.NextColumn"
|
||||
PageSize="13"
|
||||
ShowFilterRow="true"
|
||||
DetailRowDisplayMode="GridDetailRowDisplayMode.Never">
|
||||
|
||||
<Columns>
|
||||
|
||||
<DxGridDataColumn FieldName="Id" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N" />
|
||||
<DxGridDataColumn FieldName="OrderId" Caption="Order" SortIndex="1" SortOrder="GridColumnSortOrder.Descending" Width="70">
|
||||
<CellDisplayTemplate>
|
||||
@{
|
||||
var idKeyField = ((Transfer)context.DataItem).Id.ToString("N");
|
||||
var editUri = $"mytransfers/{idKeyField}";
|
||||
<NavLink href="@editUri">
|
||||
<text>@context.Value</text>
|
||||
</NavLink>
|
||||
}
|
||||
</CellDisplayTemplate>
|
||||
</DxGridDataColumn>
|
||||
<DxGridDataColumn Caption="Paid" FieldName="Paid" Width="75" TextAlignment="GridTextAlignment.Center" CaptionAlignment="GridTextAlignment.Center" />
|
||||
<DxGridDataColumn FieldName="Revenue" Caption="Revenue" Width="70" CaptionAlignment="GridTextAlignment.Center" />
|
||||
</Columns>
|
||||
</TransferGrid>
|
||||
</div>
|
||||
<ul id="progressbar-1" class="mx-0 mt-0 mb-5 px-0 pt-0 pb-4">
|
||||
<li class="step0 active" id="step1">
|
||||
<span style="margin-left: 22px; margin-top: 12px;">PLACED</span>
|
||||
</li>
|
||||
<li class="step0 active text-center" id="step2"><span>WAITING FOR PICK UP</span></li>
|
||||
<li class="step0 text-muted text-end" id="step3">
|
||||
<span style="margin-right: 22px;">FINISHED</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="d-flex flex-row mb-4 pb-2">
|
||||
<h4> Some <span class="small text-muted"> conclusion </span></h4>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="card-footer py-2 px-4">
|
||||
<div class="d-flex justify-content-between">
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
using Microsoft.AspNetCore.Components;
|
||||
using SkiaSharp;
|
||||
using System;
|
||||
using System.Buffers.Text;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using AyCode.Services.Loggers;
|
||||
using DevExpress.Blazor;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using System.Runtime.CompilerServices;
|
||||
using TIAM.Core.Enums;
|
||||
using TIAM.Entities.Products;
|
||||
using TIAM.Services;
|
||||
using TIAMWebApp.Shared.Application.Interfaces;
|
||||
using TIAMWebApp.Shared.Application.Models;
|
||||
using TIAMWebApp.Shared.Application.Models.ClientSide.UI;
|
||||
using TIAMWebApp.Shared.Application.Services;
|
||||
using TIAMWebApp.Shared.Application.Utility;
|
||||
|
||||
namespace TIAMSharedUI.Pages.User.Hotels
|
||||
{
|
||||
|
|
@ -17,6 +19,9 @@ namespace TIAMSharedUI.Pages.User.Hotels
|
|||
[Parameter]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[Parameter] public bool ShowSeriesPointMarkers { get; set; }
|
||||
[Parameter] public bool ShowSeriesLabels { get; set; }
|
||||
|
||||
[Inject]
|
||||
ISupplierService SupplierService { get; set; }
|
||||
|
||||
|
|
@ -26,6 +31,17 @@ namespace TIAMSharedUI.Pages.User.Hotels
|
|||
[Inject]
|
||||
IServiceProviderDataService ServiceProviderDataService { get; set; }
|
||||
|
||||
[Inject]
|
||||
AdminSignalRClient adminSignalRClient { get; set; }
|
||||
|
||||
[Inject]
|
||||
IEnumerable<IAcLogWriterClientBase> LogWriters { get; set; }
|
||||
|
||||
[Inject]
|
||||
ISessionService SessionService { get; set; }
|
||||
|
||||
private LoggerClient<HotelComponent> _logger;
|
||||
|
||||
object? OrderData { get; set; }
|
||||
object? AffiliateData { get; set; }
|
||||
|
||||
|
|
@ -33,8 +49,71 @@ namespace TIAMSharedUI.Pages.User.Hotels
|
|||
|
||||
public string ImageSource { get; set; } = "";
|
||||
|
||||
public Guid productId { get; set; }
|
||||
|
||||
private Product? hotel;
|
||||
private string hotelName;
|
||||
private string hotelAddress = "No address set";
|
||||
private string hotelContactName = "No contact name set yet";
|
||||
|
||||
private bool isProductAdmin;
|
||||
private bool accessDenied = true;
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
productId = Id;
|
||||
base.OnParametersSet();
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
_logger = new LoggerClient<HotelComponent>(LogWriters.ToArray());
|
||||
|
||||
hotel = await adminSignalRClient.GetByIdAsync<Product>(SignalRTags.GetProductById, Id);
|
||||
if (hotel != null)
|
||||
{
|
||||
if (hotel.Name != null)
|
||||
{
|
||||
hotelName = hotel.Name;
|
||||
}
|
||||
if (hotel.Profile != null)
|
||||
{
|
||||
if (hotel.Profile.Address != null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(hotel.Profile.Address.AddressText))
|
||||
{
|
||||
hotelAddress = hotel.Profile.Address.AddressText;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
hotelAddress = "Address is empty";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
hotelAddress = "No address found";
|
||||
}
|
||||
if (hotel.Profile.FullName != null)
|
||||
{
|
||||
hotelContactName = hotel.Profile.FullName;
|
||||
}
|
||||
else
|
||||
{
|
||||
hotelContactName = "No contact name has been set yet";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
hotelAddress = "No profile found";
|
||||
}
|
||||
}
|
||||
|
||||
//TEMPORARY
|
||||
isProductAdmin = SessionService.User.UserModelDto.UserProductMappings.Any(m => m.ProductId == Id && m.Permissions == 1);
|
||||
accessDenied = !isProductAdmin;
|
||||
|
||||
_logger.Debug($"{hotel.Name}, {isProductAdmin}");
|
||||
base.OnInitialized();
|
||||
|
||||
OrderData = new object[]
|
||||
|
|
@ -101,9 +180,60 @@ namespace TIAMSharedUI.Pages.User.Hotels
|
|||
});
|
||||
|
||||
//SKBitmap bitmap = await ServiceProviderDataService.GetQRCodeByProductIdAsync(Guid.NewGuid());
|
||||
ImageSource = await ServiceProviderDataService.GetQRCodeByProductIdAsync(Guid.NewGuid());
|
||||
ImageSource = await ServiceProviderDataService.GetQRCodeByProductIdAsync(Id);
|
||||
}
|
||||
[Parameter] public bool ShowSeriesPointMarkers { get; set; }
|
||||
[Parameter] public bool ShowSeriesLabels { get; set; }
|
||||
|
||||
void Grid_CustomizeElement(GridCustomizeElementEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (e.ElementType == GridElementType.HeaderCell)
|
||||
{
|
||||
e.Style = "background-color: rgba(0, 0, 0, 0.08)";
|
||||
e.CssClass = "header-bold";
|
||||
}
|
||||
|
||||
if (e.ElementType != GridElementType.DataRow) return;
|
||||
|
||||
var transferStatus = e.Grid?.GetRowValue(e.VisibleIndex, "TransferStatusType");
|
||||
if (transferStatus == null) return;
|
||||
|
||||
var transferStatusByte = (byte)transferStatus;
|
||||
|
||||
switch (transferStatusByte)
|
||||
{
|
||||
case 5:
|
||||
e.CssClass = "bg-important";
|
||||
break;
|
||||
case > 5 and < 35:
|
||||
e.CssClass = "bg-attention";
|
||||
break;
|
||||
case 35:
|
||||
e.CssClass = "bg-finished";
|
||||
break;
|
||||
case > 35:
|
||||
e.CssClass = "bg-cancel";
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Error($"Grid_CustomizeElement; {ex.Message}", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static readonly List<TransferStatusModel> Statuses =
|
||||
[
|
||||
new(Convert.ToByte(TransferStatusType.OrderSubmitted), "Order submitted"),
|
||||
new(Convert.ToByte(TransferStatusType.OrderConfirmed), "Order confirmed"),
|
||||
new(Convert.ToByte(TransferStatusType.AssignedToDriver), "Assigned to driver"),
|
||||
new(Convert.ToByte(TransferStatusType.DriverConfirmed), "Driver confirmed"),
|
||||
new(Convert.ToByte(TransferStatusType.DriverEnRoute), "Driver enroute"),
|
||||
new(Convert.ToByte(TransferStatusType.PassengerPickup), "Passenger in car"),
|
||||
new(Convert.ToByte(TransferStatusType.Finished), "Finished"),
|
||||
new(Convert.ToByte(TransferStatusType.UserCanceled), "User cancelled"),
|
||||
new(Convert.ToByte(TransferStatusType.AdminDenied), "Admin cancelled")
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
@using TIAM.Entities.ServiceProviders
|
||||
@using TIAM.Resources
|
||||
@using TIAM.Services
|
||||
@using TIAMSharedUI.Pages.User.SysAdmins
|
||||
@using TIAMSharedUI.Shared
|
||||
@using TIAMWebApp.Shared.Application.Interfaces
|
||||
@using TIAMWebApp.Shared.Application.Models.ClientSide.UI.WizardModels
|
||||
|
|
@ -45,26 +46,34 @@
|
|||
GetAllMessageTag="SignalRTags.GetCompaniesByContextId"
|
||||
PageSize="12"
|
||||
ValidationEnabled="false"
|
||||
DetailRowDisplayMode="GridDetailRowDisplayMode.Always"
|
||||
DetailRowDisplayMode="GridDetailRowDisplayMode.Auto"
|
||||
CustomizeEditModel="Grid_CustomizeEditModel"
|
||||
EditMode="GridEditMode.EditRow">
|
||||
<Columns>
|
||||
<DxGridCommandColumn Width="160px" />
|
||||
<DxGridDataColumn FieldName="Id" Visible="false" MinWidth="130" />
|
||||
<DxGridDataColumn FieldName="Name" MinWidth="80" />
|
||||
<DxGridDataColumn FieldName="AffiliateId" MinWidth="80" />
|
||||
<DxGridDataColumn FieldName="Id" Visible="false" MinWidth="130" />
|
||||
<DxGridDataColumn FieldName="Name" MinWidth="80" />
|
||||
<DxGridDataColumn FieldName="AffiliateId" MinWidth="80" />
|
||||
<DxGridDataColumn FieldName="Id" Width="130">
|
||||
<CellDisplayTemplate>
|
||||
<a class="btn btn-primary" href="user/serviceprovider/@context.Value.ToString()">Manage</a>
|
||||
</CellDisplayTemplate>
|
||||
</DxGridDataColumn>
|
||||
<DxGridDataColumn Caption="Address" FieldName="Profile.Address.AddressText" Width="280" />
|
||||
|
||||
|
||||
</Columns>
|
||||
<DetailRowTemplate>
|
||||
@{
|
||||
<p>Address: @(((Company)context.DataItem).Profile.Address.AddressText)</p>
|
||||
}
|
||||
|
||||
<DxTabs>
|
||||
<DxTabPage Text="Products">
|
||||
<ProductDetailGridComponent DetailExpandButtonDisplayMode="GridDetailExpandButtonDisplayMode.Auto" ParentData="(Company)context.DataItem" ContextId="((Company)context.DataItem).Id" />
|
||||
</DxTabPage>
|
||||
|
||||
</DxTabs>
|
||||
|
||||
</DetailRowTemplate>
|
||||
</CompanyGrid>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -44,12 +44,45 @@
|
|||
<DxGridDataColumn FieldName="@nameof(Product.ServiceProvider.Name)" Caption="Company name" />
|
||||
<DxGridDataColumn Caption=@Localizer.GetString(ResourceKeys.ProductName) FieldName="Name" SortIndex="0"/>
|
||||
<DxGridDataColumn Caption=@Localizer.GetString(ResourceKeys.ProductType) FieldName="ProductType" Width="130" />
|
||||
<DxGridDataColumn FieldName="Id" Width="180">
|
||||
<CellDisplayTemplate>
|
||||
@{
|
||||
Product product = (Product)context.DataItem;
|
||||
if (product.ProductType == TIAM.Core.Enums.ProductType.Hotel)
|
||||
{
|
||||
<a class="btn btn-primary" href="user/hoteladmin/@context.Value">Manage hotel</a>
|
||||
}
|
||||
else if (product.ProductType == TIAM.Core.Enums.ProductType.Transfer)
|
||||
{
|
||||
<a class="btn btn-primary" href="user/transferadmin/@context.Value">Manage transfer service </a>
|
||||
}
|
||||
}
|
||||
</CellDisplayTemplate>
|
||||
</DxGridDataColumn>
|
||||
<DxGridDataColumn Caption=@Localizer.GetString(ResourceKeys.Price) FieldName="Price" Width="100" />
|
||||
<DxGridDataColumn Caption=@Localizer.GetString(ResourceKeys.ProductDescription) FieldName="Description" />
|
||||
<DxGridDataColumn FieldName="Created" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||
<DxGridDataColumn FieldName="Modified" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||
</Columns>
|
||||
<DetailRowTemplate>
|
||||
@{
|
||||
//check if has transferdestination
|
||||
var AddressId = ((Product)context.DataItem).Profile.AddressId;
|
||||
var result = CheckDestinations(AddressId);
|
||||
//if not, display button
|
||||
if(!result)
|
||||
{ <p>Address:</p>
|
||||
<p>@(((Product)context.DataItem).Profile.Address.AddressText)</p>
|
||||
<DxButton Click="() => SaveAsDestination(((Product)context.DataItem).Profile.Address, (Product)context.DataItem)" Text="Save as destination" RenderStyle="ButtonRenderStyle.Primary" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<p>Address:</p>
|
||||
<p>@(((Product)context.DataItem).Profile.Address.AddressText)</p>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
<DxTabs>
|
||||
<DxTabPage Text="Permissions">
|
||||
<UserProductMappingGridComponent DetailExpandButtonDisplayMode="GridDetailExpandButtonDisplayMode.Never" ContextIds="new [] {((Product)context.DataItem).Id}" GetAllTag="SignalRTags.GetUserProductMappingsByProductId">
|
||||
|
|
@ -94,6 +127,8 @@
|
|||
[Parameter] public int GetAllTag { get; set; } = SignalRTags.GetProductsByOwnerId;
|
||||
[Parameter] public GridDetailExpandButtonDisplayMode DetailExpandButtonDisplayMode { get; set; } = GridDetailExpandButtonDisplayMode.Never;
|
||||
|
||||
private List<TransferDestination>? destinations = null;
|
||||
|
||||
private ProductDetailGrid _productGrid = null!;
|
||||
private LoggerClient<ProductDetailGridComponent> _logger = null!;
|
||||
protected override void OnInitialized()
|
||||
|
|
@ -103,6 +138,53 @@
|
|||
|
||||
}
|
||||
|
||||
private bool CheckDestinations(Guid addressId)
|
||||
{
|
||||
|
||||
|
||||
if(destinations!=null)
|
||||
{
|
||||
if (destinations.Any(d => d.AddressId == addressId))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private async Task SaveAsDestination(Address address, Product product)
|
||||
{
|
||||
TransferDestination transferDestination = new TransferDestination();
|
||||
transferDestination.Id = Guid.NewGuid();
|
||||
transferDestination.Name = product.Name;
|
||||
if (!string.IsNullOrEmpty(product.Profile.Description))
|
||||
{
|
||||
transferDestination.Description = product.Profile.Description;
|
||||
}
|
||||
else
|
||||
{
|
||||
transferDestination.Description = "No description available";
|
||||
}
|
||||
transferDestination.AddressId = address.Id;
|
||||
transferDestination.AddressString = address.AddressText;
|
||||
var result = await AdminSignalRClient.PostDataAsync<TransferDestination>(SignalRTags.CreateTransferDestination, transferDestination);
|
||||
_productGrid.Reload();
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
destinations = await AdminSignalRClient.GetAllAsync<List<TransferDestination>>(SignalRTags.GetAllTransferDestinations);
|
||||
await base.OnInitializedAsync();
|
||||
}
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
// if (ParentData != null)
|
||||
|
|
@ -119,7 +201,7 @@
|
|||
// _productGrid.DataSource = result;
|
||||
// }
|
||||
// else
|
||||
|
||||
|
||||
await base.OnParametersSetAsync();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
@using Address = TIAM.Entities.Addresses.Address
|
||||
@using Profile = TIAM.Entities.Profiles.Profile
|
||||
@using TIAMSharedUI.Shared.Components.Grids
|
||||
@using TIAMSharedUI.Pages.Components.EditComponents
|
||||
|
||||
@using TIAMWebApp.Shared.Application.Services
|
||||
@using AyCode.Interfaces.Addresses
|
||||
@using AyCode.Core
|
||||
|
|
@ -38,7 +38,21 @@
|
|||
<DxGridDataColumn FieldName="Id" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N"/>
|
||||
|
||||
<DxGridDataColumn FieldName="@nameof(Product.ServiceProvider.Name)" Caption="Company name" />
|
||||
<DxGridDataColumn Caption=@Localizer.GetString(ResourceKeys.ProductName) FieldName="Name" SortIndex="0"/>
|
||||
<DxGridDataColumn FieldName="Id" Width="180">
|
||||
<CellDisplayTemplate>
|
||||
@{
|
||||
Product product = (Product)context.DataItem;
|
||||
if (product.ProductType==TIAM.Core.Enums.ProductType.Hotel)
|
||||
{
|
||||
<a class="btn btn-primary" href="user/hoteladmin/@context.Value">Manage hotel</a>
|
||||
}
|
||||
else if (product.ProductType == TIAM.Core.Enums.ProductType.Transfer)
|
||||
{
|
||||
<a class="btn btn-primary" href="user/transferadmin/@context.Value">Manage transfer service </a>
|
||||
}
|
||||
}
|
||||
</CellDisplayTemplate>
|
||||
</DxGridDataColumn>
|
||||
<DxGridDataColumn Caption=@Localizer.GetString(ResourceKeys.ProductType) FieldName="ProductType" Width="130" />
|
||||
<DxGridDataColumn Caption=@Localizer.GetString(ResourceKeys.Price) FieldName="Price" Width="100" />
|
||||
<DxGridDataColumn Caption=@Localizer.GetString(ResourceKeys.ProductDescription) FieldName="Description" />
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ namespace TIAMSharedUI.Shared.Components.Grids;
|
|||
|
||||
public class TransferGrid : TiamGrid<Transfer>
|
||||
{
|
||||
|
||||
|
||||
public TransferGrid() : base()
|
||||
{
|
||||
GetAllMessageTag = SignalRTags.GetTransfersByFilterText;//SignalRTags.GetTransfers;
|
||||
|
|
@ -17,7 +19,7 @@ public class TransferGrid : TiamGrid<Transfer>
|
|||
protected override Task SetParametersAsyncCore(ParameterView parameters)
|
||||
{
|
||||
if (!IsFirstInitializeParameters)
|
||||
{
|
||||
{
|
||||
//ShowFilterRow = true;
|
||||
//ShowGroupPanel = true;
|
||||
//AllowSort = false;
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@
|
|||
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<AuthorizeView>
|
||||
@* <AuthorizeView>
|
||||
<Authorized>
|
||||
@if(hasProperty)
|
||||
{
|
||||
|
|
@ -117,7 +117,7 @@
|
|||
|
||||
}
|
||||
</Authorized>
|
||||
</AuthorizeView>
|
||||
</AuthorizeView> *@
|
||||
@if(enableLogin)
|
||||
{
|
||||
if (!myUser && enableLogin)
|
||||
|
|
|
|||
|
|
@ -19,11 +19,12 @@
|
|||
DisplayMode="DisplayMode">
|
||||
<Items>
|
||||
<DxMenuItem NavigateUrl="/" Text="Home" IconCssClass="menu-icon-home menu-icon" />
|
||||
<DxMenuItem NavigateUrl="user/properties" Text="My companies" IconCssClass="menu-icon-home menu-icon" />
|
||||
<DxMenuItem NavigateUrl="user/properties" Text="My companies" IconCssClass="fa-solid fa-building" />
|
||||
<DxMenuItem NavigateUrl="user/createAndManageTransfer" IconCssClass="fa-solid fa-route" Text="Transfer" />
|
||||
<DxMenuItem NavigateUrl="user/media" Text="Media" IconCssClass="menu-icon-home menu-icon" />
|
||||
<DxMenuItem NavigateUrl="user/messages" Text="Media" IconCssClass="menu-icon-home menu-icon" />
|
||||
<DxMenuItem NavigateUrl="user/messages" Text="Messages" IconCssClass="fa-solid fa-envelope" />
|
||||
|
||||
<DxMenuItem Text="Driver" Visible="@IsDriver" IconCssClass="menu-icon-products menu-icon">
|
||||
<DxMenuItem Text="Driver" Visible="@IsDriver" IconCssClass="fa-solid fa-id-card">
|
||||
<Items>
|
||||
<DxMenuItem NavigateUrl="driver/dashboard" Text="Dashboard" />
|
||||
|
||||
|
|
@ -38,7 +39,7 @@
|
|||
</Items>
|
||||
</DxMenuItem>
|
||||
|
||||
<DxMenuItem Text="SysAdmin" Visible="@IsSysAdmin" IconCssClass="menu-icon-products menu-icon">
|
||||
<DxMenuItem Text="SysAdmin" Visible="@IsSysAdmin" IconCssClass="fa-solid fa-unlock-keyhole">
|
||||
<Items>
|
||||
<DxMenuItem NavigateUrl="user/sysadmin" Text="Dashboard" />
|
||||
<DxMenuItem NavigateUrl="sysadmin/transfers" Text="Transfers" />
|
||||
|
|
@ -53,20 +54,43 @@
|
|||
<DxMenuItem NavigateUrl="sysadmin/users" Text="Users" />
|
||||
</Items>
|
||||
</DxMenuItem>
|
||||
|
||||
<DxMenuItem Text="DevAdmin" Visible="@IsDevAdmin" IconCssClass="menu-icon-products menu-icon">
|
||||
|
||||
<DxMenuItem Text="DevAdmin" Visible="@IsDevAdmin" IconCssClass="fa-solid fa-shield-halved">
|
||||
<Items>
|
||||
<DxMenuItem NavigateUrl="sysadmin/logs" Text="Logs" />
|
||||
</Items>
|
||||
</DxMenuItem>
|
||||
|
||||
<DxMenuItem Text="HotelAdmin" IconCssClass="menu-icon-support menu-icon">
|
||||
<Items>
|
||||
<DxMenuItem NavigateUrl="user/hoteladmin" Text="Dashboard" />
|
||||
<!--DxMenuItem Text="HotelAdmin" IconCssClass="menu-icon-support menu-icon">
|
||||
<Items>
|
||||
<DxMenuItem NavigateUrl="user/hoteladmin/" Text="Dashboard" />
|
||||
<DxMenuItem NavigateUrl="user/createAndManageTransfer" Text="Transfers" />
|
||||
<DxMenuItem NavigateUrl="user/serviceprovider/5453-a87f77787d-khj899" Text="Manage hotel" />
|
||||
</Items>
|
||||
</DxMenuItem>
|
||||
</DxMenuItem-->
|
||||
<DxMenuItem CssClass="notoggle" Position="ItemPosition.End">
|
||||
<TextTemplate>
|
||||
<div class="fa-solid fa-user" />
|
||||
</TextTemplate>
|
||||
<SubMenuTemplate>
|
||||
<div class="w-100 user-profile p-3">
|
||||
<div class="flex-column align-items-center justify-content-center">
|
||||
<div class="logo-container d-flex align-items-center justify-content-center">
|
||||
<div class="menu-icon-large">
|
||||
<i class="fa-solid fa-user"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="user-name-container bm-3 mb-2">
|
||||
<div class="tm-8 text-center">@SessionService.User.Email</div>
|
||||
<div class="text-center">@SessionService.User.UserModelDto.ProfileDto.FullName</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-center log-off-btn">
|
||||
<DxButton Text="Log Off" RenderStyle="@ButtonRenderStyle.Secondary"></DxButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</SubMenuTemplate>
|
||||
</DxMenuItem>
|
||||
</Items>
|
||||
</DxMenu>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System.Net;
|
||||
using TIAM.Entities.Products;
|
||||
using TIAMWebApp.Shared.Application.Interfaces;
|
||||
using TIAMWebApp.Shared.Application.Models;
|
||||
|
||||
|
|
@ -15,6 +16,15 @@ namespace TIAMWebApp.Client.Services
|
|||
public bool IsDevAdmin { get; set; } = false;
|
||||
public bool IsSysAdmin { get; set; } = false;
|
||||
|
||||
public List<Product> GetHotels()
|
||||
{
|
||||
if(User.UserModelDto.Products.Count > 0)
|
||||
{
|
||||
return User.UserModelDto.Products.Where(x => x.ProductType == TIAM.Core.Enums.ProductType.Hotel).ToList();
|
||||
}
|
||||
else return new List<Product>();
|
||||
}
|
||||
|
||||
public Guid DriverPersmissionId { get; set; } = Guid.Empty;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ using DevExpress.Data.Linq.Helpers;
|
|||
using System;
|
||||
using TIAM.Database.DbSets.Transfers;
|
||||
using TIAM.Services.Interfaces;
|
||||
using TIAM.Entities.Products;
|
||||
|
||||
namespace TIAMWebApp.Server.Controllers
|
||||
{
|
||||
|
|
@ -485,10 +486,25 @@ namespace TIAMWebApp.Server.Controllers
|
|||
|
||||
var from = await _adminDal.Context.TransferDestinations.FirstOrDefaultAsync(x => x.AddressString == transfer.FromAddress);
|
||||
var to = await _adminDal.Context.TransferDestinations.FirstOrDefaultAsync(x => x.AddressString == transfer.ToAddress);
|
||||
|
||||
Product? product = null;
|
||||
//TODO
|
||||
if (!transfer.ProductId.IsNullOrEmpty())
|
||||
{
|
||||
product = await _adminDal.GetProductByIdAsync((Guid)transfer.ProductId);
|
||||
transfer.Price = _transferBackendService.GetTransferPrice(transfer.ProductId.Value, from, to, transfer.PassengerCount);
|
||||
}
|
||||
|
||||
if(transfer.Price != null && transfer.Price > 0 && product != null)
|
||||
{
|
||||
if(product.ServiceProvider.CommissionPercent!=null)
|
||||
{
|
||||
transfer.Revenue = transfer.Price * product.ServiceProvider.CommissionPercent;
|
||||
}
|
||||
else
|
||||
{
|
||||
transfer.Revenue=0;
|
||||
}
|
||||
}
|
||||
|
||||
transfer.TransferStatusType = TransferStatusType.OrderSubmitted;
|
||||
|
||||
|
|
@ -666,6 +682,16 @@ namespace TIAMWebApp.Server.Controllers
|
|||
return result;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
[SignalR(SignalRTags.GetTransfersByOrderingProductId)]
|
||||
public async Task<List<Transfer>> GetTransfersByProductId(Guid productId)
|
||||
{
|
||||
_logger.Debug($"GetTransfersByProductId called; productId: {productId}");
|
||||
|
||||
var result = await _adminDal.GetTransfersByProductIdAsync(productId);
|
||||
return result;
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
[HttpGet]
|
||||
[Route(APIUrls.GetTransfersByUserProductMappingIdRouteName)]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System.Net;
|
||||
using TIAM.Entities.Products;
|
||||
using TIAMWebApp.Shared.Application.Models;
|
||||
|
||||
namespace TIAMWebApp.Shared.Application.Interfaces
|
||||
|
|
@ -13,6 +14,7 @@ namespace TIAMWebApp.Shared.Application.Interfaces
|
|||
public bool IsDriver { get; set; }
|
||||
public bool IsDevAdmin { get; set; }
|
||||
public bool IsSysAdmin { get; set; }
|
||||
public List<Product> GetHotels();
|
||||
public Guid DriverPersmissionId { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ namespace TIAMWebApp.Shared.Application.Services
|
|||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
var result = await response.Content.ReadAsStringAsync();
|
||||
_logger.Debug("SKBitmap width: " + result);
|
||||
|
||||
return result;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue