Monthly income page basics
This commit is contained in:
parent
77704ad7cd
commit
874315ad80
|
|
@ -8,7 +8,7 @@
|
||||||
</SourceModelProvider>
|
</SourceModelProvider>
|
||||||
<TargetModelProvider>
|
<TargetModelProvider>
|
||||||
<ConnectionBasedModelProvider>
|
<ConnectionBasedModelProvider>
|
||||||
<ConnectionString>Data Source=185.51.190.197;Initial Catalog=TIAM_PROD;Persist Security Info=True;User ID=Anata_Development_Team;Pooling=False;Multiple Active Result Sets=False;Connect Timeout=60;Encrypt=True;Trust Server Certificate=True;Command Timeout=0</ConnectionString>
|
<ConnectionString>Data Source=185.51.190.197;Initial Catalog=TIAM_DEVRELEASE;Persist Security Info=True;User ID=Anata_Development_Team;Pooling=False;Multiple Active Result Sets=False;Connect Timeout=60;Encrypt=True;Trust Server Certificate=True;Command Timeout=0</ConnectionString>
|
||||||
</ConnectionBasedModelProvider>
|
</ConnectionBasedModelProvider>
|
||||||
</TargetModelProvider>
|
</TargetModelProvider>
|
||||||
<SchemaCompareSettingsService>
|
<SchemaCompareSettingsService>
|
||||||
|
|
@ -345,11 +345,11 @@
|
||||||
</PropertyElementName>
|
</PropertyElementName>
|
||||||
<PropertyElementName>
|
<PropertyElementName>
|
||||||
<Name>TargetDatabaseName</Name>
|
<Name>TargetDatabaseName</Name>
|
||||||
<Value>TIAM_PROD</Value>
|
<Value>TIAM_DEVRELEASE</Value>
|
||||||
</PropertyElementName>
|
</PropertyElementName>
|
||||||
<PropertyElementName>
|
<PropertyElementName>
|
||||||
<Name>TargetConnectionString</Name>
|
<Name>TargetConnectionString</Name>
|
||||||
<Value>Data Source=185.51.190.197;Initial Catalog=TIAM_PROD;Persist Security Info=True;User ID=Anata_Development_Team;Pooling=False;Multiple Active Result Sets=False;Connect Timeout=60;Encrypt=True;Trust Server Certificate=True;Application Name="Microsoft SQL Server Data Tools, Schema Compare";Command Timeout=0</Value>
|
<Value>Data Source=185.51.190.197;Initial Catalog=TIAM_DEVRELEASE;Persist Security Info=True;User ID=Anata_Development_Team;Pooling=False;Multiple Active Result Sets=False;Connect Timeout=60;Encrypt=True;Trust Server Certificate=True;Application Name="Microsoft SQL Server Data Tools, Schema Compare";Command Timeout=0</Value>
|
||||||
</PropertyElementName>
|
</PropertyElementName>
|
||||||
<PropertyElementName>
|
<PropertyElementName>
|
||||||
<Name>TreatVerificationErrorsAsWarnings</Name>
|
<Name>TreatVerificationErrorsAsWarnings</Name>
|
||||||
|
|
|
||||||
|
|
@ -140,8 +140,7 @@
|
||||||
CustomizeElement="Grid_CustomizeElement"
|
CustomizeElement="Grid_CustomizeElement"
|
||||||
ShowGroupPanel="true"
|
ShowGroupPanel="true"
|
||||||
CustomGroup="Grid_CustomGroup"
|
CustomGroup="Grid_CustomGroup"
|
||||||
CustomizeGroupValueDisplayText="Grid_CustomizeGroupValueDisplayText"
|
CustomizeGroupValueDisplayText="Grid_CustomizeGroupValueDisplayText"
|
||||||
EditMode="GridEditMode.EditForm"
|
|
||||||
ColumnResizeMode="GridColumnResizeMode.NextColumn"
|
ColumnResizeMode="GridColumnResizeMode.NextColumn"
|
||||||
AllowSelectRowByClick="false"
|
AllowSelectRowByClick="false"
|
||||||
PageSize="13"
|
PageSize="13"
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@
|
||||||
<Columns>
|
<Columns>
|
||||||
<DxGridCommandColumn NewButtonVisible="false" DeleteButtonVisible="AcDomain.IsDeveloperVersion" Width="80" MinWidth="80" FixedPosition="GridColumnFixedPosition.Left" />
|
<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="Id" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N" />
|
||||||
<DxGridDataColumn FieldName="OrderId" Caption="Order" SortIndex="1" SortOrder="GridColumnSortOrder.Descending" Width="70">
|
<DxGridDataColumn FieldName="OrderId" ReadOnly="true" Caption="Order" SortIndex="1" SortOrder="GridColumnSortOrder.Descending" Width="70">
|
||||||
<CellDisplayTemplate>
|
<CellDisplayTemplate>
|
||||||
@{
|
@{
|
||||||
var idKeyField = ((Transfer)context.DataItem).Id.ToString("N");
|
var idKeyField = ((Transfer)context.DataItem).Id.ToString("N");
|
||||||
|
|
@ -105,11 +105,7 @@
|
||||||
</DxGridDataColumn>
|
</DxGridDataColumn>
|
||||||
<DxGridDataColumn FieldName="FullName" />
|
<DxGridDataColumn FieldName="FullName" />
|
||||||
<DxGridDataColumn FieldName="ContactPhone" Width="120" />
|
<DxGridDataColumn FieldName="ContactPhone" Width="120" />
|
||||||
<DxGridDataColumn FieldName="ContactEmail" Width="120">
|
<DxGridDataColumn FieldName="ContactEmail" Width="120" />
|
||||||
</DxGridDataColumn>
|
|
||||||
|
|
||||||
|
|
||||||
<DxGridDataColumn FieldName="ReferralId" DisplayFormat="N" Visible="true" />
|
|
||||||
<DxGridDataColumn FieldName="Comment" Caption="Comment" />
|
<DxGridDataColumn FieldName="Comment" Caption="Comment" />
|
||||||
<DxGridDataColumn FieldName="Created" DisplayFormat="g" Width="125" Visible="false" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
<DxGridDataColumn FieldName="Created" DisplayFormat="g" Width="125" Visible="false" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" />
|
||||||
</Columns>
|
</Columns>
|
||||||
|
|
@ -189,7 +185,7 @@
|
||||||
<p class="text-muted mb-0">Subtitle</p>
|
<p class="text-muted mb-0">Subtitle</p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<h6 class="mb-0"> <a href="#">All details</a> </h6>
|
<h6 class="mb-0"> <a href="/user/income/@Id">All details</a> </h6>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -219,7 +215,17 @@
|
||||||
</CellDisplayTemplate>
|
</CellDisplayTemplate>
|
||||||
</DxGridDataColumn>
|
</DxGridDataColumn>
|
||||||
<DxGridDataColumn Caption="Paid" FieldName="Paid" TextAlignment="GridTextAlignment.Center" CaptionAlignment="GridTextAlignment.Center" />
|
<DxGridDataColumn Caption="Paid" FieldName="Paid" TextAlignment="GridTextAlignment.Center" CaptionAlignment="GridTextAlignment.Center" />
|
||||||
<DxGridDataColumn FieldName="Revenue" Caption="Revenue" CaptionAlignment="GridTextAlignment.Center" />
|
<DxGridDataColumn FieldName="Revenue" Caption="Revenue" CaptionAlignment="GridTextAlignment.Center">
|
||||||
|
<CellDisplayTemplate>
|
||||||
|
@{
|
||||||
|
var idKeyField = ((Transfer)context.DataItem).Id.ToString("N");
|
||||||
|
|
||||||
|
|
||||||
|
<text>Eur @context.Value</text>
|
||||||
|
|
||||||
|
}
|
||||||
|
</CellDisplayTemplate>
|
||||||
|
</DxGridDataColumn>
|
||||||
</Columns>
|
</Columns>
|
||||||
</TransferGrid>
|
</TransferGrid>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,190 @@
|
||||||
|
@page "/user/income/{id:guid}"
|
||||||
|
@using BlazorAnimation
|
||||||
|
@using TIAM.Core.Enums
|
||||||
|
@using TIAM.Entities.Emails
|
||||||
|
@using TIAM.Entities.Transfers
|
||||||
|
@using TIAM.Resources
|
||||||
|
@using TIAM.Services
|
||||||
|
@using TIAMSharedUI.Pages.Components
|
||||||
|
@using TIAMSharedUI.Shared
|
||||||
|
@using TIAMWebApp.Shared.Application.Interfaces
|
||||||
|
@using TIAMWebApp.Shared.Application.Models.ClientSide.UI
|
||||||
|
@using TIAMWebApp.Shared.Application.Models.ClientSide.UI.WizardModels
|
||||||
|
@using TIAMWebApp.Shared.Application.Models.PageModels
|
||||||
|
@using TIAMWebApp.Shared.Application.Utility
|
||||||
|
@using AyCode.Services.Loggers
|
||||||
|
@using TIAMWebApp.Shared.Application.Services
|
||||||
|
@using TIAMSharedUI.Shared.Components.Grids
|
||||||
|
@using AyCode.Core.Enums
|
||||||
|
@using AyCode.Core.Extensions
|
||||||
|
@using AyCode.Core.Consts
|
||||||
|
@using AyCode.Core
|
||||||
|
@using AyCode.Core.Helpers
|
||||||
|
@using DevExpress.Data.Filtering
|
||||||
|
@using TIAM.Entities.Emails
|
||||||
|
@layout AdminLayout
|
||||||
|
@inject IEnumerable<IAcLogWriterClientBase> LogWriters
|
||||||
|
@inject IStringLocalizer<TIAMResources> localizer
|
||||||
|
@inject IWizardProcessor wizardProcessor
|
||||||
|
@inject ITransferDataService transferDataService
|
||||||
|
@inject ISessionService sessionService
|
||||||
|
@inject AdminSignalRClient AdminSignalRClient;
|
||||||
|
<PageTitle>Transfers</PageTitle>
|
||||||
|
|
||||||
|
<div class="text-center m-5">
|
||||||
|
<h1>Income</h1>
|
||||||
|
<h2 style="font-size:small">Manage transfers here!</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class=" col-12">
|
||||||
|
<Animation Effect="@Effect.FadeIn" Speed="@Speed.Fast" Delay="@TimeSpan.FromMilliseconds(250)">
|
||||||
|
<div class="card">
|
||||||
|
|
||||||
|
<TransferGrid Logger="_logger"
|
||||||
|
SignalRClient="AdminSignalRClient"
|
||||||
|
ContextIds="@(Id.IsNullOrEmpty() ? null : [Id])"
|
||||||
|
GetAllMessageTag="@SignalRTags.GetTransfersByOrderingProductId"
|
||||||
|
ShowGroupPanel="true"
|
||||||
|
CustomGroup="Grid_CustomGroup"
|
||||||
|
CustomizeGroupValueDisplayText="Grid_CustomizeGroupValueDisplayText"
|
||||||
|
ColumnResizeMode="GridColumnResizeMode.NextColumn"
|
||||||
|
PageSize="13"
|
||||||
|
ShowFilterRow="true"
|
||||||
|
DetailRowDisplayMode="GridDetailRowDisplayMode.Never">
|
||||||
|
|
||||||
|
<Columns>
|
||||||
|
|
||||||
|
<DxGridDataColumn FieldName="Id" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N" />
|
||||||
|
<DxGridDataColumn FieldName="Appointment" SortOrder="GridColumnSortOrder.Descending" GroupIndex="0" GroupInterval="GridColumnGroupInterval.Custom" DisplayFormat="g" Width="125" />
|
||||||
|
<DxGridDataColumn FieldName="OrderId" Caption="Order" SortIndex="1" SortOrder="GridColumnSortOrder.Descending">
|
||||||
|
<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" TextAlignment="GridTextAlignment.Center" CaptionAlignment="GridTextAlignment.Center" />
|
||||||
|
<DxGridDataColumn FieldName="Revenue" Caption="Revenue" CaptionAlignment="GridTextAlignment.Center">
|
||||||
|
<CellDisplayTemplate>
|
||||||
|
@{
|
||||||
|
var idKeyField = ((Transfer)context.DataItem).Id.ToString("N");
|
||||||
|
|
||||||
|
|
||||||
|
<text>Eur @context.Value</text>
|
||||||
|
|
||||||
|
}
|
||||||
|
</CellDisplayTemplate>
|
||||||
|
</DxGridDataColumn>
|
||||||
|
</Columns>
|
||||||
|
</TransferGrid>
|
||||||
|
</div>
|
||||||
|
</Animation>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=" col-12 col-xl-6">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@code {
|
||||||
|
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
|
||||||
|
private LoggerClient<ManageIncome> _logger;
|
||||||
|
|
||||||
|
private TransferGrid _gridTransfer;
|
||||||
|
|
||||||
|
private DxTagBox<TransferStatusModel, TransferStatusModel> _filterTag;
|
||||||
|
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Grid_CustomGroup(GridCustomGroupEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.FieldName == "Appointment")
|
||||||
|
{
|
||||||
|
e.SameGroup = Grid_CompareColumnValues(((DateTime)e.Value1), ((DateTime)e.Value2));
|
||||||
|
e.Handled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bool Grid_CompareColumnValues(DateTime value1, DateTime value2)
|
||||||
|
{
|
||||||
|
if (value1.Year == value2.Year && value1.Month == value2.Month)
|
||||||
|
return true;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
void Grid_CustomizeGroupValueDisplayText(GridCustomizeGroupValueDisplayTextEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.FieldName == "Appointment")
|
||||||
|
{
|
||||||
|
|
||||||
|
string displayText = $"Month: {((DateTime)e.Value).Year.ToString()}.{((DateTime)e.Value).Month.ToString()}";
|
||||||
|
e.DisplayText = displayText;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected override Task OnInitializedAsync()
|
||||||
|
{
|
||||||
|
_logger = new LoggerClient<ManageIncome>(LogWriters.ToArray());
|
||||||
|
|
||||||
|
return base.OnInitializedAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected override void OnAfterRender(bool firstRender)
|
||||||
|
{
|
||||||
|
if (firstRender)
|
||||||
|
{
|
||||||
|
//_gridTransfer.ExpandDetailRow(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue