Add fullscreen grid support and PDF preview in info panel
- Added fullscreen mode to grid and info panel components, including toolbar toggle and fullscreen styling. - Introduced embedded PDF viewing in the info panel using PDF.js and a custom JavaScript viewer. - Updated interfaces, CSS, and toolbar templates to support new features. - Added new PDF asset (2_BANK FRA.pdf) for document preview. - Minor: Added local settings for Bash permission, fixed text encoding, and improved info panel table layout. - No code changes in other referenced PDF files; added for informational or asset purposes only.
This commit is contained in:
parent
2bcf802da7
commit
7923c42a1e
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"permissions": {
|
||||
"allow": [
|
||||
"Bash(dir:*)"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -1,28 +1,83 @@
|
|||
@using AyCode.Blazor.Components.Components.Grids
|
||||
@using DevExpress.Blazor
|
||||
@using FruitBank.Common.Entities
|
||||
@using System.IO
|
||||
@inject IJSRuntime JS
|
||||
|
||||
<MgGridInfoPanel>
|
||||
<HeaderTemplate Context="dataItem">
|
||||
@* <HeaderTemplate Context="dataItem">
|
||||
<div class="dxbl-grid-header-panel px-3 py-2 border-bottom d-flex align-items-center">
|
||||
<span class="me-2">??</span>
|
||||
<span class="fw-semibold">Szállítólevél részletei</span>
|
||||
<span class="fw-semibold">Szállítólevél részletei</span>
|
||||
</div>
|
||||
</HeaderTemplate>
|
||||
|
||||
<BeforeColumnsTemplate Context="dataItem">
|
||||
</HeaderTemplate> *@
|
||||
|
||||
@* <BeforeColumnsTemplate Context="dataItem">
|
||||
@if (dataItem is ShippingDocument doc)
|
||||
{
|
||||
<div class="alert alert-info mb-2 py-1 px-2 small">
|
||||
<strong>Partner:</strong> @doc.Partner?.Name
|
||||
</div>
|
||||
}
|
||||
</BeforeColumnsTemplate>
|
||||
|
||||
<FooterTemplate Context="dataItem">
|
||||
</BeforeColumnsTemplate> *@
|
||||
|
||||
<AfterColumnsTemplate Context="dataItem">
|
||||
@if (dataItem is ShippingDocument doc)
|
||||
{
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="white-space: nowrap;">Termék neve</th>
|
||||
<th style="white-space: nowrap;">Név a dokumentumon</th>
|
||||
<th style="white-space: nowrap;">Raklapok</th>
|
||||
<th style="white-space: nowrap;">Mennyiség</th>
|
||||
<th style="white-space: nowrap;">Net.súly</th>
|
||||
<th style="white-space: nowrap;">Brt.súly</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var shippingItem in doc.ShippingItems)
|
||||
{
|
||||
<tr>
|
||||
<td style="white-space: nowrap;">@shippingItem.ProductName</td>
|
||||
<td style="white-space: nowrap;">@shippingItem.NameOnDocument</td>
|
||||
<td style="white-space: nowrap;">@shippingItem.QuantityOnDocument</td>
|
||||
<td style="white-space: nowrap;">@shippingItem.NetWeightOnDocument</td>
|
||||
<td style="white-space: nowrap;">@shippingItem.GrossWeightOnDocument</td>
|
||||
<td style="white-space: nowrap;">@shippingItem.PalletsOnDocument</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div id="pdfContainer" style="width: 100%; height: 800px; overflow-y: auto;">
|
||||
</div>
|
||||
}
|
||||
</AfterColumnsTemplate>
|
||||
|
||||
@* <FooterTemplate Context="dataItem">
|
||||
<div class="p-2 border-top d-flex gap-2">
|
||||
<DxButton Text="Nyomtatás" IconCssClass="dx-icon dx-icon-print" RenderStyle="ButtonRenderStyle.Light" />
|
||||
<DxButton Text="Nyomtatás" IconCssClass="dx-icon dx-icon-print" RenderStyle="ButtonRenderStyle.Light" />
|
||||
<DxButton Text="Export" IconCssClass="dx-icon dx-icon-export" RenderStyle="ButtonRenderStyle.Light" />
|
||||
</div>
|
||||
</FooterTemplate>
|
||||
</FooterTemplate> *@
|
||||
</MgGridInfoPanel>
|
||||
|
||||
@code
|
||||
{
|
||||
private readonly string[] _pdfFiles = new[]
|
||||
{
|
||||
"1_Albaran_AH25007715.pdf",
|
||||
"2_BANK FRA.pdf",
|
||||
"3_BP-30M35_20251113_163816.pdf"
|
||||
};
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (firstRender)
|
||||
{
|
||||
var pdfUrls = _pdfFiles.Select(f => $"_content/FruitBankHybrid.Shared/uploads/{f}").ToArray();
|
||||
await JS.InvokeVoidAsync("pdfViewer.renderPdfs", "pdfContainer", pdfUrls);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,6 +44,15 @@ public class MgGridBase : DxGrid, IMgGridBase
|
|||
/// <inheritdoc />
|
||||
public IInfoPanelBase? InfoPanelInstance { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsFullscreen => false;
|
||||
|
||||
/// <inheritdoc />
|
||||
public void ToggleFullscreen()
|
||||
{
|
||||
// Not implemented in this legacy class - will be removed
|
||||
}
|
||||
|
||||
[Inject] public required IEnumerable<IAcLogWriterClientBase> LogWriters { get; set; }
|
||||
[Inject] public required FruitBankSignalRClient FruitBankSignalRClient { get; set; }
|
||||
[Inject] public required LoggedInModel LoggedInModel { get; set; }
|
||||
|
|
|
|||
|
|
@ -0,0 +1,134 @@
|
|||
window.pdfViewer = {
|
||||
_pdfCache: new Map(),
|
||||
_resizeObserver: null,
|
||||
_currentContainerId: null,
|
||||
_currentPdfUrls: null,
|
||||
_renderTimeout: null,
|
||||
|
||||
renderPdfs: async function (containerId, pdfUrls) {
|
||||
// Wait for container to be available
|
||||
let container = null;
|
||||
for (let i = 0; i < 50; i++) {
|
||||
container = document.getElementById(containerId);
|
||||
if (container) break;
|
||||
await new Promise(resolve => setTimeout(resolve, 100));
|
||||
}
|
||||
|
||||
if (!container) {
|
||||
console.error('Container not found after waiting:', containerId);
|
||||
return;
|
||||
}
|
||||
|
||||
// Store for resize handling
|
||||
this._currentContainerId = containerId;
|
||||
this._currentPdfUrls = pdfUrls;
|
||||
|
||||
// Setup resize observer
|
||||
this._setupResizeObserver(container);
|
||||
|
||||
// Initial render
|
||||
await this._doRender(container, pdfUrls);
|
||||
},
|
||||
|
||||
_setupResizeObserver: function(container) {
|
||||
// Clean up previous observer
|
||||
if (this._resizeObserver) {
|
||||
this._resizeObserver.disconnect();
|
||||
}
|
||||
|
||||
let lastWidth = container.clientWidth;
|
||||
|
||||
this._resizeObserver = new ResizeObserver((entries) => {
|
||||
const newWidth = entries[0].contentRect.width;
|
||||
// Only re-render if width changed significantly (more than 5px)
|
||||
if (Math.abs(newWidth - lastWidth) > 5) {
|
||||
lastWidth = newWidth;
|
||||
// Debounce the re-render
|
||||
if (this._renderTimeout) {
|
||||
clearTimeout(this._renderTimeout);
|
||||
}
|
||||
this._renderTimeout = setTimeout(() => {
|
||||
this._doRender(container, this._currentPdfUrls);
|
||||
}, 150);
|
||||
}
|
||||
});
|
||||
|
||||
this._resizeObserver.observe(container);
|
||||
},
|
||||
|
||||
_doRender: async function(container, pdfUrls) {
|
||||
container.innerHTML = '';
|
||||
|
||||
if (typeof pdfjsLib === 'undefined') {
|
||||
console.error('PDF.js not loaded');
|
||||
container.innerHTML = '<p style="color:red;">PDF.js nincs betöltve</p>';
|
||||
return;
|
||||
}
|
||||
|
||||
const pixelRatio = window.devicePixelRatio || 1;
|
||||
const scrollbarWidth = 17;
|
||||
const containerWidth = container.clientWidth - scrollbarWidth;
|
||||
|
||||
if (containerWidth <= 0) {
|
||||
console.log('Container width is 0, skipping render');
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('Rendering PDFs at width:', containerWidth);
|
||||
|
||||
for (const url of pdfUrls) {
|
||||
try {
|
||||
// Use cached PDF if available
|
||||
let pdf = this._pdfCache.get(url);
|
||||
if (!pdf) {
|
||||
console.log('Loading PDF:', url);
|
||||
const loadingTask = pdfjsLib.getDocument(url);
|
||||
pdf = await loadingTask.promise;
|
||||
this._pdfCache.set(url, pdf);
|
||||
}
|
||||
|
||||
for (let pageNum = 1; pageNum <= pdf.numPages; pageNum++) {
|
||||
const page = await pdf.getPage(pageNum);
|
||||
|
||||
const viewport = page.getViewport({ scale: 1 });
|
||||
const scale = containerWidth / viewport.width;
|
||||
const displayHeight = viewport.height * scale;
|
||||
const scaledViewport = page.getViewport({ scale: scale * pixelRatio });
|
||||
|
||||
const canvas = document.createElement('canvas');
|
||||
canvas.width = scaledViewport.width;
|
||||
canvas.height = scaledViewport.height;
|
||||
canvas.style.width = containerWidth + 'px';
|
||||
canvas.style.height = displayHeight + 'px';
|
||||
canvas.style.marginBottom = '8px';
|
||||
canvas.style.display = 'block';
|
||||
container.appendChild(canvas);
|
||||
|
||||
const context = canvas.getContext('2d');
|
||||
await page.render({
|
||||
canvasContext: context,
|
||||
viewport: scaledViewport
|
||||
}).promise;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error rendering PDF:', url, error);
|
||||
const errorDiv = document.createElement('div');
|
||||
errorDiv.textContent = 'Hiba a PDF betöltésekor: ' + url + ' - ' + error.message;
|
||||
errorDiv.style.color = 'red';
|
||||
errorDiv.style.marginBottom = '8px';
|
||||
container.appendChild(errorDiv);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
dispose: function() {
|
||||
if (this._resizeObserver) {
|
||||
this._resizeObserver.disconnect();
|
||||
this._resizeObserver = null;
|
||||
}
|
||||
if (this._renderTimeout) {
|
||||
clearTimeout(this._renderTimeout);
|
||||
}
|
||||
this._pdfCache.clear();
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
Fecha Cliente Albarán FRUITBANK KFT (BONFRED MERCA-BARNA)
|
||||
HU14902170
|
||||
12/11/2025 506619 AH25007715 MERCA-BARNA
|
||||
|
||||
Trasportista: HNOS. GUERRERO HARO S.L. 08040-BARCELONA
|
||||
Barcelona
|
||||
Matrícula: / Porte: Origen ESPAÑA
|
||||
|
||||
Incoterm: CPT Volumen:1,0 Palet
|
||||
|
||||
Fecha Entrega: 13/11/2025
|
||||
|
||||
Descripción Bultos Piezas K.Neto Precio Suma %Iva
|
||||
6,25B
|
||||
AGUACATE BACON GLOBALG.A.P. CAL. 14 77 481,25 0
|
||||
|
||||
Envase: CT MANZANO NEGRO 40*30*9.5
|
||||
|
||||
CAT: I - Origen: ESPAÑA
|
||||
|
||||
AGUACATE BACON GLOBALG.A.P. CAL. 20 115 6,25B 718,75 0
|
||||
|
||||
Envase: CT MANZANO NEGRO 40*30*9.5
|
||||
|
||||
CAT: I - Origen: ESPAÑA
|
||||
|
||||
AGUACATE HASS GLOBALG.A.P. CAL. 20 48 13,50B 648,00 0
|
||||
|
||||
Envase: CT MANZANO NEGRO 40*30*9.5
|
||||
|
||||
CAT: I - Origen: PERU
|
||||
|
||||
Producto Certif. GLOBALG.A.P. GGN: 8436025340012
|
||||
|
||||
Bultos Sumas Dto 1 Dto 2 B.Imponible %Iva Iva Total
|
||||
240 0,00 0,00% 0,00 1.848,00 0% 0,00 1.848,00
|
||||
1.848,00 0,00%
|
||||
|
||||
FRUTAS RAFAEL MANZANO E HIJOS S.L. no se responsabiliza de ninguna reclamación por no conformidad de la mercancía, que no haya sido comunicada
|
||||
por escrito en un plazo máximo de DOS DÍAS desde la recepción de la misma, debiendo acompañar justificación de la no conformidad (informe pericial
|
||||
efectuado por profesional acreditado) además del detalle de los números de lotes y cajas no conformes.
|
||||
En las ventas a consignación, FRUTAS RAFAEL MANZANO E HIJOS S.L. establece un período de tiempo no superior a 20 DÍAS para acordar el precio de
|
||||
facturación de la mercancía enviada. Transcurrido éste plazo son acordarlo, será facturada al valor del precio medio de mercado que tuviese el producto
|
||||
el día en que se recepcionó la mercancía, incrementando el importe del transporte , si es por cuenta de FRUTAS RAFAEL MANZANO E HIJOS S.L.
|
||||
Nº Registro de Productores de Producto: ENV/2023/000016586.
|
||||
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
F A C T U R A de V E N T A
|
||||
|
||||
Victor i Merce , S.L. FECHA NUMERO CIF / NIF PÁGINA
|
||||
Mercabarna, Pab.F-6035-6036 13/11/2025 FV-015444 HU14902170 1 de 1
|
||||
08040 Barcelona Barcelona (Spain)
|
||||
C.I.F.: ESB61478095 FRUIT BANK KFT
|
||||
Tlf: 93 335 02 44 RIPPL-RONAI UTCA 18
|
||||
comercialventas@victorimerce.com 1068 BUDAPEST
|
||||
HUNGRIA (HU)
|
||||
IBAN: ES08 2100 0749 16 0200163991
|
||||
BIC:CAIXESBBXXX CAIXESBBXXX
|
||||
|
||||
IBAN:
|
||||
BIC:CAIXESBBXXX
|
||||
|
||||
LOTE ARTICULO ENV BULTOS BRUTO TARA NETO PRECIO IMPORTE
|
||||
|
||||
3501544401003 PERA WILLIAMS I *16* ESP. 192 927,00 0,40 850,20 1,90 1.615,38
|
||||
3501544402000 PERA WILLIAMS I *16* ESP. 0,40 832,20 1,90 1.581,18
|
||||
3501544403007 PERA WILLIAMS I *18* ESP. ES 192 909,00 0,40 863,20 1,80 1.553,76
|
||||
3501544404004 PERA WILLIAMS I *20* ESP. 0,40 643,20 1,70 1.093,44
|
||||
192 940,00
|
||||
|
||||
192 720,00
|
||||
|
||||
Recibí: Total Mercancía 5.843,76
|
||||
Fianza por envases 0,00
|
||||
Vencimiento a: 30 días Base Imponible
|
||||
IVA al 0,00% 5.843,76
|
||||
R. Equivalencia al 0,00% 0,00
|
||||
0,00
|
||||
Total
|
||||
5.843,76
|
||||
|
||||
Información Básica Sobre Protección De Datos - Gestión económica y administrativa. Responsable: VICTOR I MERCE FRUITS SL. Finalidad: Gestión administrativa, facturación, contabilidad y obligaciones legales. Derechos: Acceder,
|
||||
rectificar y suprimir los datos, así como otros derechos, como se explica en la información adicional. Información adicional. Puede consultar la información adicional y detallada sobre Protección de Datos en la siguiente dirección de
|
||||
correo electrónico gerencia@victorimerce.com.
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
MANIPULADO TERCEROS
|
||||
|
||||
CARRETERA N-340, KM. 415 . EL EJIDO . 04710 . ALMERÍA . ESPAÑA
|
||||
. Tels. +34 950 347300 . Fax +34 950 581627
|
||||
E-mail:terceros@hcostadealmeria.es . Web:http://www.hcostadealmeria.es
|
||||
|
||||
FRUITBANK KFT ALBARÁN FECHA fra_26008338
|
||||
RIPPL-RONAI U.18 6 - 749 12/11/2025
|
||||
BUDAPEST 1068 FACTURA
|
||||
HUNGRIA FECHA N.I.F. 06-549
|
||||
HUNGRÍA 12/11/2025 HU14902170
|
||||
CLIENTE
|
||||
6705
|
||||
|
||||
Descripción Bultos Piezas K.netos Precio Importe
|
||||
|
||||
PRODUCTO GLOBALG.A.P. Y SPRING GGN 8429302390008 70 0
|
||||
220 0
|
||||
Origen del producto: ESPAÑA 40 0
|
||||
|
||||
Albaran: 749
|
||||
|
||||
PTO CALIFORNIA VERDE 400X300X185/19 I GG QDELICIAS 350 1,7000 595,00
|
||||
1.100 2,4500 2.695,00
|
||||
PTO CALIFORNIA ROJO 400X300X185 I GG QDELICIAS 1,9000 380,00
|
||||
200
|
||||
PTO CALIFORNIA AMARILLO 400X300X185 I GG QDELICIAS
|
||||
|
||||
Observaciones: 3 PALETS 100X120
|
||||
|
||||
330 0 1.650 3.670,00
|
||||
3.670,00€
|
||||
CONDICIONES DE COMPRA-VENTA Base imponible % Importe I.V.A. % Importe R.E.
|
||||
3.670,00€
|
||||
1º Recibí, con completa conformidad mercacías, precios, 0,00 0,00 0,00 0,00
|
||||
|
||||
envases e importe total de compra aquí realizada. 3.670,00 / TOTAL FACTURA
|
||||
2º El envasado y carga de la mercancía son a cargo del EXW
|
||||
|
||||
comprador.
|
||||
|
||||
3º En caso de litigio el comprador renuncia a su propio
|
||||
|
||||
fuero y se someta a la competecia de los Juzgados de Almería.
|
||||
|
||||
4º Se trata de venta en origen, recordamos de su exigencia
|
||||
|
||||
de normalizar la venta de destino según la legislación vigente
|
||||
|
||||
(R.D. 2192/84). El comprado o persona autorizada
|
||||
|
||||
5º MANIPULADO TERCEROS, no se responsa- Matricula vehiculo:
|
||||
biliza de ninguna reclamación que no haya sido comunicada CLAÚSULA INCOTERMS:
|
||||
por escrito en un plazo máximo de 48 horas desde la
|
||||
|
||||
recepción de la mercancía.
|
||||
|
||||
FACTURA FECHA CLIENTE INSTRUCCIONES DE PAGO:
|
||||
549 12/11/2025 6705 - FRUITBANK KFT A Vencimiento, sirvase ingresar en nuestra cuenta, como sigue:
|
||||
ENVASES -Banco: CAJAMAR (CAJA RURAL INTERMEDITERRÁNEA S.C.C)
|
||||
ENTREGA RETIRA
|
||||
|
||||
-Entidad/Sucursal: 3058-0040
|
||||
|
||||
-IBAN: ES6730580040381011800052
|
||||
|
||||
-Swift Code: CCRIES2A
|
||||
|
||||
-Beneficiario: HORTOFRUTICOLA COSTA DE ALMERIA, S.L.
|
||||
|
||||
CIF:B04257028
|
||||
|
||||
DIRECCIÓN FISCAL: HORTOFRUTÍCOLA COSTA DE ALMERÍA, S.L.; PLAZA HUERTA DE EUROPA, 1; 04740; ROQUETAS DE MAR; ALMERÍA; ESPAÑA; TELS. +34950326232; INFO@HCOSTADEALMERIA.ES
|
||||
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
Invoice To Sales order Confirmation
|
||||
Fruitbank Kft
|
||||
Rippl - Ronai 18 Invoice Date : 13/11/2025
|
||||
1068 BUDAPEST Delivery Date : 13/11/2025
|
||||
HUNGARY Currency : EUR
|
||||
Order Number : 637462
|
||||
Delivered To Order Reference :
|
||||
Fruitbank KFT Customer VAT No
|
||||
Rippl - Ronai 18 Payment Terms : HU14902170
|
||||
1068 BUDAPEST : 21 Days after invoice date
|
||||
HUNGARY
|
||||
|
||||
Gross Net Unit VAT Total
|
||||
|
||||
Product Variety Size C.O Qty Weight Weight Price (%) Price
|
||||
Blackberries -
|
||||
Blueberries - 12x125g NL 10 20,00 15,00 30,00 0 300,00
|
||||
Limes Tahiti
|
||||
Mango by air Kent 12x125g 18+ PE 390 752,00 585,00 11,00 0 4.290,00
|
||||
Red currant -
|
||||
42 BR 240 1.067,00 960,00 6,75 0 1.620,00
|
||||
Total
|
||||
9 BR 15 99,70 90,00 33,00 0 495,00
|
||||
|
||||
12x125g NL 20 42,50 30,00 17,50 0 350,00
|
||||
|
||||
675 1.981,20 1.680,00 7.055,00
|
||||
|
||||
Roveg Fruit B.V. Roveg Tel +31 (0)180-635700 Handelsregister 30166109 EURO/GBP/USD: NL59 RABO 0316 9215 64
|
||||
Nijverheidsweg 20 Roveg Fax +31 (0)180-635750 BTW nr NL808838210B01
|
||||
2742 RG Waddinxveen Email db@roveg.nl Swift: RABONL2U
|
||||
PO Box 309 www.roveg.nl
|
||||
2740 AH Waddinxveen Global GAP CoC 8713807000006
|
||||
|
||||
Global GAP NG: Non Global GAP
|
||||
|
||||
NL-BIO-01 SKAL 018903
|
||||
|
||||
The terms and conditions of Roveg Fruit B.V., with its registered office in Waddinxveen, are filed at the Chamber of Commerce
|
||||
Rotterdam No 30166109. The terms and conditions apply to all transactions and are available on request.
|
||||
The exporter of the products covered by this document (customs authorization NL/311/01/826) declares that, except where otherwise
|
||||
clearly indicated, these products are of EU preferential origin
|
||||
|
||||
Pagina 1 van 1
|
||||
|
||||
|
|
@ -26,6 +26,11 @@
|
|||
<body class="dxbl-theme-fluent">
|
||||
<Routes @rendermode="InteractiveWebAssembly" />
|
||||
<script src="_content/AyCode.Blazor.Components/js/mgGridInfoPanel.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.min.js"></script>
|
||||
<script>
|
||||
pdfjsLib.GlobalWorkerOptions.workerSrc = 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.worker.min.js';
|
||||
</script>
|
||||
<script src="_content/FruitBankHybrid.Shared/js/pdfViewer.js"></script>
|
||||
<script src="@Assets["_framework/blazor.web.js"]"></script>
|
||||
</body>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue