Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
59b478f262 | ||
|
|
e4f14a24b7 |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "app-ts",
|
"name": "app-ts",
|
||||||
"version": "1.6.0",
|
"version": "1.6.2",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "dist/server.js",
|
"main": "dist/server.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { useMemo, useRef, useCallback, useEffect } from "react";
|
import { useMemo, useRef, useCallback, useLayoutEffect } from "react";
|
||||||
import ReactQuill from "react-quill-new";
|
import ReactQuill from "react-quill-new";
|
||||||
import "react-quill-new/dist/quill.snow.css";
|
import "react-quill-new/dist/quill.snow.css";
|
||||||
|
|
||||||
@@ -96,11 +96,14 @@ export default function RichEditor({
|
|||||||
[onChange],
|
[onChange],
|
||||||
);
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useLayoutEffect(() => {
|
||||||
if (!quillRef.current) return;
|
if (!quillRef.current) return;
|
||||||
const editor = quillRef.current.getEditor();
|
const editor = quillRef.current.getEditor();
|
||||||
editor.format("font", "tahoma");
|
editor.format("font", "tahoma");
|
||||||
editor.format("size", "14px");
|
editor.format("size", "14px");
|
||||||
|
// Quill auto-focuses on mount with existing content, which scrolls
|
||||||
|
// the page to the editor. Blur to prevent unwanted scroll.
|
||||||
|
editor.blur();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -221,10 +221,16 @@ export default async function attendanceRoutes(
|
|||||||
isAdmin,
|
isAdmin,
|
||||||
authUserId: authData.userId,
|
authUserId: authData.userId,
|
||||||
month: query.month
|
month: query.month
|
||||||
? Number(String(query.month).split("-")[1])
|
? String(query.month).includes("-")
|
||||||
|
? Number(String(query.month).split("-")[1])
|
||||||
|
: Number(query.month)
|
||||||
: undefined,
|
: undefined,
|
||||||
year: query.month
|
year: query.month
|
||||||
? Number(String(query.month).split("-")[0])
|
? String(query.month).includes("-")
|
||||||
|
? Number(String(query.month).split("-")[0])
|
||||||
|
: query.year
|
||||||
|
? Number(query.year)
|
||||||
|
: undefined
|
||||||
: query.year
|
: query.year
|
||||||
? Number(query.year)
|
? Number(query.year)
|
||||||
: undefined,
|
: undefined,
|
||||||
|
|||||||
@@ -632,14 +632,6 @@ ${indentCSS}
|
|||||||
border: none;
|
border: none;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
.logo-header {
|
|
||||||
text-align: right;
|
|
||||||
padding-bottom: 4mm;
|
|
||||||
}
|
|
||||||
.first-content {
|
|
||||||
margin-top: -26mm;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ---- Page break helpers ---- */
|
/* ---- Page break helpers ---- */
|
||||||
table.page-layout thead { display: table-header-group; }
|
table.page-layout thead { display: table-header-group; }
|
||||||
table.items tbody tr { break-inside: avoid; }
|
table.items tbody tr { break-inside: avoid; }
|
||||||
@@ -696,30 +688,16 @@ ${indentCSS}
|
|||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.first-content {
|
|
||||||
margin-top: 0 !important;
|
|
||||||
}
|
|
||||||
.logo-header {
|
|
||||||
text-align: right;
|
|
||||||
padding-bottom: 0;
|
|
||||||
margin-bottom: -18mm;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<!-- ============ QUOTATION (logo repeats via thead, full header only on first page) ============ -->
|
<!-- ============ QUOTATION (full header in thead repeats on every page) ============ -->
|
||||||
<div class="quotation-page">
|
<div class="quotation-page">
|
||||||
<table class="page-layout">
|
<table class="page-layout">
|
||||||
<thead>
|
<thead>
|
||||||
<tr><td>
|
<tr><td>
|
||||||
<div class="logo-header">${logoImg}</div>
|
|
||||||
</td></tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr><td>
|
|
||||||
<div class="first-content">
|
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<div class="page-title">${escapeHtml(t("title"))}</div>
|
<div class="page-title">${escapeHtml(t("title"))}</div>
|
||||||
@@ -727,9 +705,13 @@ ${indentCSS}
|
|||||||
${quotation.project_code ? `<div class="project-code">${escapeHtml(quotation.project_code)}</div>` : ""}
|
${quotation.project_code ? `<div class="project-code">${escapeHtml(quotation.project_code)}</div>` : ""}
|
||||||
<div class="valid-until">${escapeHtml(t("valid_until"))}: ${escapeHtml(formatDate(quotation.valid_until))}</div>
|
<div class="valid-until">${escapeHtml(t("valid_until"))}: ${escapeHtml(formatDate(quotation.valid_until))}</div>
|
||||||
</div>
|
</div>
|
||||||
|
${logoImg ? `<div class="right">${logoImg}</div>` : ""}
|
||||||
</div>
|
</div>
|
||||||
<hr class="separator" />
|
<hr class="separator" />
|
||||||
|
</td></tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr><td>
|
||||||
<div class="addresses">
|
<div class="addresses">
|
||||||
<div class="address-block left">
|
<div class="address-block left">
|
||||||
<div class="address-label">${escapeHtml(t("customer"))}</div>
|
<div class="address-label">${escapeHtml(t("customer"))}</div>
|
||||||
@@ -763,7 +745,6 @@ ${indentCSS}
|
|||||||
${totalsHtml}
|
${totalsHtml}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
Reference in New Issue
Block a user