mantenimento-app 2.2.1 → 2.2.2
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 +25 -1
- package/frontend/public/app.js +25 -1
- package/frontend/public/index.html +1 -1
- package/frontend/public/styles.css +13 -0
- package/package.json +1 -1
package/app.js
CHANGED
|
@@ -387,6 +387,8 @@ const defaultExpenseItems = [
|
|
|
387
387
|
sepCostLossSpouse: "Impatto stimato su {spouse}",
|
|
388
388
|
sepCostInlineHint: "Duplicazione mensile stimata: {amount}",
|
|
389
389
|
sepCostWarning: "Inserisci le spese mensili in convivenza nel campo sopra per attivare questa analisi.",
|
|
390
|
+
sepCostCurrentTotal: "Totale spese attuali dopo separazione: {amount}",
|
|
391
|
+
sepCostUseCurrentTotalBtn: "Usa il totale spese attuale",
|
|
390
392
|
footerVisitorsTotal: "Visitatori totali",
|
|
391
393
|
footerVisitorsActive: "Visitatori attivi",
|
|
392
394
|
footerLoggedUsers: "Utenti loggati",
|
|
@@ -726,6 +728,8 @@ const defaultExpenseItems = [
|
|
|
726
728
|
sepCostLossSpouse: "Estimated impact on {spouse}",
|
|
727
729
|
sepCostInlineHint: "Estimated monthly duplication: {amount}",
|
|
728
730
|
sepCostWarning: "Enter the cohabiting monthly expenses above to activate this analysis.",
|
|
731
|
+
sepCostCurrentTotal: "Current total expenses after separation: {amount}",
|
|
732
|
+
sepCostUseCurrentTotalBtn: "Use current total expenses",
|
|
729
733
|
footerVisitorsTotal: "Total visitors",
|
|
730
734
|
footerVisitorsActive: "Active visitors",
|
|
731
735
|
footerLoggedUsers: "Logged users",
|
|
@@ -4603,7 +4607,27 @@ const defaultExpenseItems = [
|
|
|
4603
4607
|
}
|
|
4604
4608
|
|
|
4605
4609
|
if (!m.speseConvivenza || m.speseConvivenza <= 0) {
|
|
4606
|
-
panel.innerHTML =
|
|
4610
|
+
panel.innerHTML = `
|
|
4611
|
+
<div class="sep-cost-panel">
|
|
4612
|
+
<h3 class="sep-cost-title">${escapeHtml(tr("sepCostPanelTitle"))}</h3>
|
|
4613
|
+
<div class="sep-cost-warning">
|
|
4614
|
+
<div>${escapeHtml(tr("sepCostWarning"))}</div>
|
|
4615
|
+
<div class="sep-cost-warning-meta">${escapeHtml(msg("sepCostCurrentTotal", { amount: eur(m.speseTot) }))}</div>
|
|
4616
|
+
<button type="button" class="btn-secondary sep-cost-fill-btn">${escapeHtml(tr("sepCostUseCurrentTotalBtn"))}</button>
|
|
4617
|
+
</div>
|
|
4618
|
+
</div>
|
|
4619
|
+
`;
|
|
4620
|
+
const fillBtn = panel.querySelector(".sep-cost-fill-btn");
|
|
4621
|
+
if (fillBtn) {
|
|
4622
|
+
fillBtn.addEventListener("click", () => {
|
|
4623
|
+
const input = document.getElementById("speseConvivenza");
|
|
4624
|
+
if (!input) return;
|
|
4625
|
+
const suggested = Math.max(0, Math.round(Number(m.speseTot || 0)));
|
|
4626
|
+
input.value = String(suggested);
|
|
4627
|
+
input.focus();
|
|
4628
|
+
renderAll();
|
|
4629
|
+
});
|
|
4630
|
+
}
|
|
4607
4631
|
return;
|
|
4608
4632
|
}
|
|
4609
4633
|
|
package/frontend/public/app.js
CHANGED
|
@@ -387,6 +387,8 @@ const defaultExpenseItems = [
|
|
|
387
387
|
sepCostLossSpouse: "Impatto stimato su {spouse}",
|
|
388
388
|
sepCostInlineHint: "Duplicazione mensile stimata: {amount}",
|
|
389
389
|
sepCostWarning: "Inserisci le spese mensili in convivenza nel campo sopra per attivare questa analisi.",
|
|
390
|
+
sepCostCurrentTotal: "Totale spese attuali dopo separazione: {amount}",
|
|
391
|
+
sepCostUseCurrentTotalBtn: "Usa il totale spese attuale",
|
|
390
392
|
footerVisitorsTotal: "Visitatori totali",
|
|
391
393
|
footerVisitorsActive: "Visitatori attivi",
|
|
392
394
|
footerLoggedUsers: "Utenti loggati",
|
|
@@ -726,6 +728,8 @@ const defaultExpenseItems = [
|
|
|
726
728
|
sepCostLossSpouse: "Estimated impact on {spouse}",
|
|
727
729
|
sepCostInlineHint: "Estimated monthly duplication: {amount}",
|
|
728
730
|
sepCostWarning: "Enter the cohabiting monthly expenses above to activate this analysis.",
|
|
731
|
+
sepCostCurrentTotal: "Current total expenses after separation: {amount}",
|
|
732
|
+
sepCostUseCurrentTotalBtn: "Use current total expenses",
|
|
729
733
|
footerVisitorsTotal: "Total visitors",
|
|
730
734
|
footerVisitorsActive: "Active visitors",
|
|
731
735
|
footerLoggedUsers: "Logged users",
|
|
@@ -4603,7 +4607,27 @@ const defaultExpenseItems = [
|
|
|
4603
4607
|
}
|
|
4604
4608
|
|
|
4605
4609
|
if (!m.speseConvivenza || m.speseConvivenza <= 0) {
|
|
4606
|
-
panel.innerHTML =
|
|
4610
|
+
panel.innerHTML = `
|
|
4611
|
+
<div class="sep-cost-panel">
|
|
4612
|
+
<h3 class="sep-cost-title">${escapeHtml(tr("sepCostPanelTitle"))}</h3>
|
|
4613
|
+
<div class="sep-cost-warning">
|
|
4614
|
+
<div>${escapeHtml(tr("sepCostWarning"))}</div>
|
|
4615
|
+
<div class="sep-cost-warning-meta">${escapeHtml(msg("sepCostCurrentTotal", { amount: eur(m.speseTot) }))}</div>
|
|
4616
|
+
<button type="button" class="btn-secondary sep-cost-fill-btn">${escapeHtml(tr("sepCostUseCurrentTotalBtn"))}</button>
|
|
4617
|
+
</div>
|
|
4618
|
+
</div>
|
|
4619
|
+
`;
|
|
4620
|
+
const fillBtn = panel.querySelector(".sep-cost-fill-btn");
|
|
4621
|
+
if (fillBtn) {
|
|
4622
|
+
fillBtn.addEventListener("click", () => {
|
|
4623
|
+
const input = document.getElementById("speseConvivenza");
|
|
4624
|
+
if (!input) return;
|
|
4625
|
+
const suggested = Math.max(0, Math.round(Number(m.speseTot || 0)));
|
|
4626
|
+
input.value = String(suggested);
|
|
4627
|
+
input.focus();
|
|
4628
|
+
renderAll();
|
|
4629
|
+
});
|
|
4630
|
+
}
|
|
4607
4631
|
return;
|
|
4608
4632
|
}
|
|
4609
4633
|
|
|
@@ -1832,6 +1832,19 @@
|
|
|
1832
1832
|
padding: 10px 12px;
|
|
1833
1833
|
}
|
|
1834
1834
|
|
|
1835
|
+
.sep-cost-warning-meta {
|
|
1836
|
+
margin-top: 6px;
|
|
1837
|
+
font-size: 0.8rem;
|
|
1838
|
+
color: #6f4c13;
|
|
1839
|
+
font-weight: 700;
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
.sep-cost-fill-btn {
|
|
1843
|
+
margin-top: 8px;
|
|
1844
|
+
width: fit-content;
|
|
1845
|
+
max-width: 100%;
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1835
1848
|
.sep-cost-panel {
|
|
1836
1849
|
margin-top: 10px;
|
|
1837
1850
|
border-radius: 14px;
|