@using salesbook.Shared.Core.Dto @using salesbook.Shared.Core.Interface @using salesbook.Shared.Core.Interface.IntegryApi @inject IIntegryApiService IntegryApiService @inject IAttachedService AttachedService
@(Attached.Description.IsNullOrEmpty() ? Attached.FileName : Attached.Description)
@($"{Attached.DateAttached:g}")
@if (Attached.IsActivity) { @Attached.RefAttached } else { @Attached.RefAttached }
@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); } }