mantenimento-app 2.2.8 → 2.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app.js +17 -17
- package/frontend/public/app.js +17 -17
- package/frontend/public/index.html +1 -1
- package/frontend/public/styles.css +12 -5
- package/package.json +1 -1
package/app.js
CHANGED
|
@@ -3642,6 +3642,8 @@ const defaultExpenseItems = [
|
|
|
3642
3642
|
});
|
|
3643
3643
|
}
|
|
3644
3644
|
if (splitCenterEl) splitCenterEl.textContent = `${normalizedShare1.toFixed(0)}% / ${share2.toFixed(0)}%`;
|
|
3645
|
+
const splitRangeWrapEl = shareEl.closest(".mortgage-split-range-wrap");
|
|
3646
|
+
if (splitRangeWrapEl) splitRangeWrapEl.style.setProperty("--split-left", `${normalizedShare1.toFixed(0)}%`);
|
|
3645
3647
|
if (splitLeftNameEl) splitLeftNameEl.textContent = c1n();
|
|
3646
3648
|
if (splitRightNameEl) splitRightNameEl.textContent = c2n();
|
|
3647
3649
|
if (splitLeftAmountEl) splitLeftAmountEl.textContent = eur(quota1);
|
|
@@ -5002,30 +5004,20 @@ const defaultExpenseItems = [
|
|
|
5002
5004
|
</div>`;
|
|
5003
5005
|
}).join("")}</div>`
|
|
5004
5006
|
: "";
|
|
5005
|
-
const
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
<div class="section-title">${tr("sepCostPanelTitle")}</div>
|
|
5009
|
-
<table>
|
|
5010
|
-
<tbody>
|
|
5011
|
-
<tr><td>${tr("sepCostNetTogether")}</td><td class="num"><strong>${eur(m.nettoInsiemeCombinato || 0)}</strong></td></tr>
|
|
5012
|
-
<tr><td>${tr("sepCostNetSeparated")}</td><td class="num"><strong>${eur(m.nettoSeparatoTotale || 0)}</strong></td></tr>
|
|
5013
|
-
${m.separationAdjustmentHousingUtilities > 0 ? `<tr><td>${tr("sepCostHousingUtilityAdj")}</td><td class="num">${eur(m.separationAdjustmentHousingUtilities)}</td></tr>` : ""}
|
|
5014
|
-
<tr><td>${tr("sepCostDuplication")}</td><td class="num"><strong>${eur(m.costoSeparazioneMensile || 0)}</strong></td></tr>
|
|
5015
|
-
<tr><td>${tr("sepCostLossMonthly")}</td><td class="num"><strong>${eur(m.perditaMensile || 0)}</strong></td></tr>
|
|
5016
|
-
<tr><td>${tr("sepCostLossAnnually")}</td><td class="num"><strong>${eur(m.perditaAnnua || 0)}</strong></td></tr>
|
|
5017
|
-
<tr><td>${msg("sepCostLossSpouse", { spouse: c1NameEsc })}</td><td class="num">${eur(m.perditaSpouse1 || 0)}</td></tr>
|
|
5018
|
-
<tr><td>${msg("sepCostLossSpouse", { spouse: c2NameEsc })}</td><td class="num">${eur(m.perditaSpouse2 || 0)}</td></tr>
|
|
5019
|
-
</tbody>
|
|
5020
|
-
</table>
|
|
5021
|
-
</div>`
|
|
5007
|
+
const liveSepPanelSnapshot = String(document.getElementById("sepCostPanel")?.innerHTML || "").trim();
|
|
5008
|
+
const separationSectionHtml = m.speseConvivenza > 0 && liveSepPanelSnapshot
|
|
5009
|
+
? `<div class="section pdf-screen-section">${liveSepPanelSnapshot}</div>`
|
|
5022
5010
|
: "";
|
|
5011
|
+
const activeAppScriptSrc = String(document.querySelector('script[src*="app.js"]')?.getAttribute("src") || "");
|
|
5012
|
+
const appVersionFromScript = (activeAppScriptSrc.match(/[?&]v=([^&#]+)/) || [])[1] || String(Date.now());
|
|
5013
|
+
const pdfStylesHref = `styles.css?v=${encodeURIComponent(appVersionFromScript)}`;
|
|
5023
5014
|
|
|
5024
5015
|
const html = `<!DOCTYPE html>
|
|
5025
5016
|
<html lang="${pdfLang}">
|
|
5026
5017
|
<head>
|
|
5027
5018
|
<meta charset="UTF-8"/>
|
|
5028
5019
|
<title>${tr("pdfReportTitle")} – ${genDate}</title>
|
|
5020
|
+
<link rel="stylesheet" href="${pdfStylesHref}">
|
|
5029
5021
|
<style>
|
|
5030
5022
|
@page { size: A4 portrait; margin: 16mm 14mm 14mm 14mm; }
|
|
5031
5023
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
@@ -5216,6 +5208,14 @@ const defaultExpenseItems = [
|
|
|
5216
5208
|
.footer { border-top: 1px solid #cde5e0; padding-top: 6px; margin-top: 20px;
|
|
5217
5209
|
font-size: 7.5pt; color: #888; text-align: center; }
|
|
5218
5210
|
|
|
5211
|
+
/* Keep on-screen section visuals (e.g. separation panel) close to app rendering */
|
|
5212
|
+
.pdf-screen-section { break-inside: avoid; }
|
|
5213
|
+
.pdf-screen-section .sep-cost-panel { margin-top: 0; }
|
|
5214
|
+
.pdf-screen-section .sep-cost-title { margin-bottom: 6px; }
|
|
5215
|
+
.pdf-screen-section .sep-cost-hero,
|
|
5216
|
+
.pdf-screen-section .sep-cost-section--grid,
|
|
5217
|
+
.pdf-screen-section .sep-cost-pill-wrap { gap: 8px; }
|
|
5218
|
+
|
|
5219
5219
|
@media print {
|
|
5220
5220
|
body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
|
|
5221
5221
|
}
|
package/frontend/public/app.js
CHANGED
|
@@ -3642,6 +3642,8 @@ const defaultExpenseItems = [
|
|
|
3642
3642
|
});
|
|
3643
3643
|
}
|
|
3644
3644
|
if (splitCenterEl) splitCenterEl.textContent = `${normalizedShare1.toFixed(0)}% / ${share2.toFixed(0)}%`;
|
|
3645
|
+
const splitRangeWrapEl = shareEl.closest(".mortgage-split-range-wrap");
|
|
3646
|
+
if (splitRangeWrapEl) splitRangeWrapEl.style.setProperty("--split-left", `${normalizedShare1.toFixed(0)}%`);
|
|
3645
3647
|
if (splitLeftNameEl) splitLeftNameEl.textContent = c1n();
|
|
3646
3648
|
if (splitRightNameEl) splitRightNameEl.textContent = c2n();
|
|
3647
3649
|
if (splitLeftAmountEl) splitLeftAmountEl.textContent = eur(quota1);
|
|
@@ -5002,30 +5004,20 @@ const defaultExpenseItems = [
|
|
|
5002
5004
|
</div>`;
|
|
5003
5005
|
}).join("")}</div>`
|
|
5004
5006
|
: "";
|
|
5005
|
-
const
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
<div class="section-title">${tr("sepCostPanelTitle")}</div>
|
|
5009
|
-
<table>
|
|
5010
|
-
<tbody>
|
|
5011
|
-
<tr><td>${tr("sepCostNetTogether")}</td><td class="num"><strong>${eur(m.nettoInsiemeCombinato || 0)}</strong></td></tr>
|
|
5012
|
-
<tr><td>${tr("sepCostNetSeparated")}</td><td class="num"><strong>${eur(m.nettoSeparatoTotale || 0)}</strong></td></tr>
|
|
5013
|
-
${m.separationAdjustmentHousingUtilities > 0 ? `<tr><td>${tr("sepCostHousingUtilityAdj")}</td><td class="num">${eur(m.separationAdjustmentHousingUtilities)}</td></tr>` : ""}
|
|
5014
|
-
<tr><td>${tr("sepCostDuplication")}</td><td class="num"><strong>${eur(m.costoSeparazioneMensile || 0)}</strong></td></tr>
|
|
5015
|
-
<tr><td>${tr("sepCostLossMonthly")}</td><td class="num"><strong>${eur(m.perditaMensile || 0)}</strong></td></tr>
|
|
5016
|
-
<tr><td>${tr("sepCostLossAnnually")}</td><td class="num"><strong>${eur(m.perditaAnnua || 0)}</strong></td></tr>
|
|
5017
|
-
<tr><td>${msg("sepCostLossSpouse", { spouse: c1NameEsc })}</td><td class="num">${eur(m.perditaSpouse1 || 0)}</td></tr>
|
|
5018
|
-
<tr><td>${msg("sepCostLossSpouse", { spouse: c2NameEsc })}</td><td class="num">${eur(m.perditaSpouse2 || 0)}</td></tr>
|
|
5019
|
-
</tbody>
|
|
5020
|
-
</table>
|
|
5021
|
-
</div>`
|
|
5007
|
+
const liveSepPanelSnapshot = String(document.getElementById("sepCostPanel")?.innerHTML || "").trim();
|
|
5008
|
+
const separationSectionHtml = m.speseConvivenza > 0 && liveSepPanelSnapshot
|
|
5009
|
+
? `<div class="section pdf-screen-section">${liveSepPanelSnapshot}</div>`
|
|
5022
5010
|
: "";
|
|
5011
|
+
const activeAppScriptSrc = String(document.querySelector('script[src*="app.js"]')?.getAttribute("src") || "");
|
|
5012
|
+
const appVersionFromScript = (activeAppScriptSrc.match(/[?&]v=([^&#]+)/) || [])[1] || String(Date.now());
|
|
5013
|
+
const pdfStylesHref = `styles.css?v=${encodeURIComponent(appVersionFromScript)}`;
|
|
5023
5014
|
|
|
5024
5015
|
const html = `<!DOCTYPE html>
|
|
5025
5016
|
<html lang="${pdfLang}">
|
|
5026
5017
|
<head>
|
|
5027
5018
|
<meta charset="UTF-8"/>
|
|
5028
5019
|
<title>${tr("pdfReportTitle")} – ${genDate}</title>
|
|
5020
|
+
<link rel="stylesheet" href="${pdfStylesHref}">
|
|
5029
5021
|
<style>
|
|
5030
5022
|
@page { size: A4 portrait; margin: 16mm 14mm 14mm 14mm; }
|
|
5031
5023
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
@@ -5216,6 +5208,14 @@ const defaultExpenseItems = [
|
|
|
5216
5208
|
.footer { border-top: 1px solid #cde5e0; padding-top: 6px; margin-top: 20px;
|
|
5217
5209
|
font-size: 7.5pt; color: #888; text-align: center; }
|
|
5218
5210
|
|
|
5211
|
+
/* Keep on-screen section visuals (e.g. separation panel) close to app rendering */
|
|
5212
|
+
.pdf-screen-section { break-inside: avoid; }
|
|
5213
|
+
.pdf-screen-section .sep-cost-panel { margin-top: 0; }
|
|
5214
|
+
.pdf-screen-section .sep-cost-title { margin-bottom: 6px; }
|
|
5215
|
+
.pdf-screen-section .sep-cost-hero,
|
|
5216
|
+
.pdf-screen-section .sep-cost-section--grid,
|
|
5217
|
+
.pdf-screen-section .sep-cost-pill-wrap { gap: 8px; }
|
|
5218
|
+
|
|
5219
5219
|
@media print {
|
|
5220
5220
|
body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
|
|
5221
5221
|
}
|
|
@@ -910,13 +910,14 @@
|
|
|
910
910
|
|
|
911
911
|
.mortgage-split-side {
|
|
912
912
|
border: 1px solid #c6ded8;
|
|
913
|
-
border-radius:
|
|
914
|
-
padding:
|
|
915
|
-
background:
|
|
913
|
+
border-radius: 12px;
|
|
914
|
+
padding: 8px;
|
|
915
|
+
background: linear-gradient(180deg, #ffffff, #f3faf8);
|
|
916
916
|
min-height: 58px;
|
|
917
917
|
display: grid;
|
|
918
918
|
align-content: center;
|
|
919
|
-
gap:
|
|
919
|
+
gap: 3px;
|
|
920
|
+
box-shadow: 0 1px 3px rgba(17, 74, 68, 0.08);
|
|
920
921
|
}
|
|
921
922
|
|
|
922
923
|
.mortgage-split-side-left {
|
|
@@ -945,6 +946,7 @@
|
|
|
945
946
|
.mortgage-split-range-wrap {
|
|
946
947
|
position: relative;
|
|
947
948
|
padding: 14px 0 6px;
|
|
949
|
+
--split-left: 50%;
|
|
948
950
|
}
|
|
949
951
|
|
|
950
952
|
.mortgage-split-range-wrap input[type="range"] {
|
|
@@ -953,9 +955,14 @@
|
|
|
953
955
|
width: 100%;
|
|
954
956
|
height: 8px;
|
|
955
957
|
border-radius: 999px;
|
|
956
|
-
background: linear-gradient(90deg,
|
|
958
|
+
background: linear-gradient(90deg,
|
|
959
|
+
#2b9d8e 0%,
|
|
960
|
+
#6cb9a9 var(--split-left),
|
|
961
|
+
#dfb264 var(--split-left),
|
|
962
|
+
#cb8a2d 100%);
|
|
957
963
|
outline: none;
|
|
958
964
|
margin: 0;
|
|
965
|
+
transition: background 0.16s ease;
|
|
959
966
|
}
|
|
960
967
|
|
|
961
968
|
.mortgage-split-range-wrap input[type="range"]::-webkit-slider-thumb {
|