Completata gestione allegati e riepilogo commessa
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
@using salesbook.Shared.Core.Dto
|
||||
@using salesbook.Shared.Core.Interface
|
||||
@inject IIntegryApiService IntegryApiService
|
||||
@inject IAttachedService AttachedService
|
||||
|
||||
<div @onclick="OpenAttached" class="activity-card">
|
||||
<div class="activity-left-section">
|
||||
<div class="activity-body-section">
|
||||
<div class="title-section">
|
||||
<MudText Class="activity-title" Typo="Typo.body1" HtmlTag="h3">
|
||||
@(Attached.Description.IsNullOrEmpty() ? Attached.FileName : Attached.Description)
|
||||
</MudText>
|
||||
<div class="activity-hours-section">
|
||||
<span class="activity-hours">@($"{Attached.DateAttached:g}")</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="activity-info-section">
|
||||
@if (Attached.IsActivity)
|
||||
{
|
||||
<MudChip T="string" Color="Color.Primary" Variant="Variant.Outlined" Icon="@IconConstants.Chip.Tag" Size="Size.Small">
|
||||
@Attached.RefAttached
|
||||
</MudChip>
|
||||
}
|
||||
else
|
||||
{
|
||||
<MudChip T="string" Color="Color.Warning" Variant="Variant.Outlined" Icon="@IconConstants.Chip.FileTextLine" Size="Size.Small">
|
||||
@Attached.RefAttached
|
||||
</MudChip>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
[Parameter] public CRMAttachedResponseDTO Attached { get; set; } = new();
|
||||
|
||||
private async Task OpenAttached()
|
||||
{
|
||||
var bytes = await IntegryApiService.DownloadFileFromRefUuid(Attached.RefUuid, Attached.FileName);
|
||||
await AttachedService.OpenFile(bytes, Attached.FileName);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
.activity-card {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: .5rem .5rem;
|
||||
border-radius: 12px;
|
||||
line-height: normal;
|
||||
box-shadow: var(--custom-box-shadow);
|
||||
}
|
||||
|
||||
.activity-card.memo { border-left: 5px solid var(--mud-palette-info-darken); }
|
||||
|
||||
.activity-card.interna { border-left: 5px solid var(--mud-palette-success-darken); }
|
||||
|
||||
.activity-card.commessa { border-left: 5px solid var(--mud-palette-warning); }
|
||||
|
||||
.activity-left-section {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.title-section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.activity-hours {
|
||||
color: var(--mud-palette-gray-darker);
|
||||
font-weight: 600;
|
||||
font-size: .8rem;
|
||||
}
|
||||
|
||||
.activity-hours-section ::deep .mud-chip { margin: 5px 0 0 !important; }
|
||||
|
||||
.activity-body-section {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.title-section ::deep > .activity-title {
|
||||
font-weight: 700 !important;
|
||||
margin: 0 !important;
|
||||
line-height: normal !important;
|
||||
color: var(--mud-palette-text-primary);
|
||||
}
|
||||
|
||||
.activity-body-section ::deep > .activity-subtitle {
|
||||
color: var(--mud-palette-gray-darker);
|
||||
margin: .2rem 0 !important;
|
||||
line-height: normal !important;
|
||||
}
|
||||
|
||||
.activity-info-section {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: .25rem;
|
||||
}
|
||||
Reference in New Issue
Block a user