fix worker not found module in build standalone
All checks were successful
Deploy eCourt Note Web to Server / Validate Database Schema (Drizzle) (push) Successful in 3s
Deploy eCourt Note Web to Server / Build Web Docker Image (push) Successful in 1m19s
Deploy eCourt Note Web to Server / Deploy eCourt Note Web to Server (push) Successful in 5s
Deploy eCourt Note Web to Server / Notify Deployment Status (push) Successful in 0s
All checks were successful
Deploy eCourt Note Web to Server / Validate Database Schema (Drizzle) (push) Successful in 3s
Deploy eCourt Note Web to Server / Build Web Docker Image (push) Successful in 1m19s
Deploy eCourt Note Web to Server / Deploy eCourt Note Web to Server (push) Successful in 5s
Deploy eCourt Note Web to Server / Notify Deployment Status (push) Successful in 0s
fix next/link prefetch/call twice(replace with a)
This commit is contained in:
parent
2486b6e434
commit
2e951f99f4
4 changed files with 57 additions and 30 deletions
|
|
@ -118,12 +118,13 @@ export default function HomePage() {
|
||||||
<div>
|
<div>
|
||||||
<h3 className="font-display text-subhead text-ink">Link (GET)</h3>
|
<h3 className="font-display text-subhead text-ink">Link (GET)</h3>
|
||||||
<p className="mt-1.5 text-sm leading-relaxed text-ink-soft">
|
<p className="mt-1.5 text-sm leading-relaxed text-ink-soft">
|
||||||
<Link href="/api/template/download-docx?tid=T_X&fid=T_no_warning&uid=john&uname=John%20Doe">T_no_warning_john_xxx.docx</Link><br />
|
|
||||||
<Link href="/api/template/download-docx?tid=T_X&fid=TF_no_warning_P2&uid=john&uname=John%20Doe">TF_no_warning_P2_john_xxx.docx</Link><br />
|
|
||||||
<Link href="/api/template/download-docx?tid=T_X&fid=TS_P2_IN&uid=john&uname=John%20Doe">TS_P2_IN_john_xxx.docx</Link><br />
|
|
||||||
|
|
||||||
<Link href="/api/template/download-docx?tid=T12_X&fid=T12_b2_IN&uid=john&uname=John%20Doe">T12_b2_IN_john_xxx.docx</Link><br />
|
<a href="/docedit/api/template/download-docx?tid=T_X&fid=T_no_warning&uid=john&uname=John%20Doe">T_no_warning_john_xxx.docx</a><br />
|
||||||
<Link href="/api/template/download-docx?tid=T12_X&fid=T12_FD155_3s-long&uid=john&uname=John%20Doe">T12_FD155_3s-long_john_xxx.docx</Link><br />
|
<a href="/docedit/api/template/download-docx?tid=T_X&fid=TF_no_warning_P2&uid=john&uname=John%20Doe">TF_no_warning_P2_john_xxx.docx</a><br />
|
||||||
|
<a href="/docedit/api/template/download-docx?tid=T_X&fid=TS_P2_IN&uid=john&uname=John%20Doe">TS_P2_IN_john_xxx.docx</a><br />
|
||||||
|
|
||||||
|
<a href="/docedit/api/template/download-docx?tid=T12_X&fid=T12_b2_IN&uid=john&uname=John%20Doe">T12_b2_IN_john_xxx.docx</a><br />
|
||||||
|
<a href="/docedit/api/template/download-docx?tid=T12_X&fid=T12_FD155_3s-long&uid=john&uname=John%20Doe">T12_FD155_3s-long_john_xxx.docx</a><br />
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -136,7 +137,6 @@ export default function HomePage() {
|
||||||
<div>
|
<div>
|
||||||
<h3 className="font-display text-subhead text-ink">Template & Data</h3>
|
<h3 className="font-display text-subhead text-ink">Template & Data</h3>
|
||||||
<p className="mt-1.5 text-sm leading-relaxed text-ink-soft">
|
<p className="mt-1.5 text-sm leading-relaxed text-ink-soft">
|
||||||
<h2 className="font-semibold text-blue-600 mb-2"></h2>
|
|
||||||
Template: <Link href="/tmpl/T_X.docx">T_X.docx</Link>,
|
Template: <Link href="/tmpl/T_X.docx">T_X.docx</Link>,
|
||||||
<Link href="/tmpl/T12_X.docx">T12_X.docx</Link><br />
|
<Link href="/tmpl/T12_X.docx">T12_X.docx</Link><br />
|
||||||
Data: <Link href="tmpl/TF_no_warning_P2.json">TF_no_warning_P2.json</Link>,
|
Data: <Link href="tmpl/TF_no_warning_P2.json">TF_no_warning_P2.json</Link>,
|
||||||
|
|
@ -155,7 +155,7 @@ export default function HomePage() {
|
||||||
</span>
|
</span>
|
||||||
<div>
|
<div>
|
||||||
<h3 className="font-display text-subhead text-ink">Form (POST)</h3>
|
<h3 className="font-display text-subhead text-ink">Form (POST)</h3>
|
||||||
<p className="mt-1.5 text-sm leading-relaxed text-ink-soft">
|
<div className="mt-1.5 text-sm leading-relaxed text-ink-soft">
|
||||||
|
|
||||||
<form action="/docedit/api/template/download-docx" method="POST">
|
<form action="/docedit/api/template/download-docx" method="POST">
|
||||||
<DependentDropdown data={templateData} name1='tid' name2='fid'
|
<DependentDropdown data={templateData} name1='tid' name2='fid'
|
||||||
|
|
@ -186,7 +186,7 @@ export default function HomePage() {
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</p>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -196,7 +196,7 @@ export default function HomePage() {
|
||||||
</span>
|
</span>
|
||||||
<div>
|
<div>
|
||||||
<h3 className="font-display text-subhead text-ink">Flow</h3>
|
<h3 className="font-display text-subhead text-ink">Flow</h3>
|
||||||
<p className="mt-1.5 text-sm leading-relaxed text-ink-soft">
|
<div className="mt-1.5 text-sm leading-relaxed text-ink-soft">
|
||||||
<div className="text-xl font-bold text-center">
|
<div className="text-xl font-bold text-center">
|
||||||
ลิงค์เลือกไฟล์<br />
|
ลิงค์เลือกไฟล์<br />
|
||||||
↓ <br />
|
↓ <br />
|
||||||
|
|
@ -210,7 +210,7 @@ export default function HomePage() {
|
||||||
↓ <br />
|
↓ <br />
|
||||||
อัปเดตฐานข้อมูลและไฟล์<br />
|
อัปเดตฐานข้อมูลและไฟล์<br />
|
||||||
</div>
|
</div>
|
||||||
</p>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -254,9 +254,9 @@ export default function HomePage() {
|
||||||
install-word-addins.ps1 </Link>
|
install-word-addins.ps1 </Link>
|
||||||
แล้วใช้คำสั่ง PowerShell ด้านล่างเพื่อติดตั้ง Add-ins ใน Word<br />
|
แล้วใช้คำสั่ง PowerShell ด้านล่างเพื่อติดตั้ง Add-ins ใน Word<br />
|
||||||
<br />
|
<br />
|
||||||
<p className="whitespace-nowrap">Unblock-File .\install-word-addins.ps1</p>
|
<b className="whitespace-nowrap">Unblock-File .\install-word-addins.ps1</b>
|
||||||
<p className="whitespace-nowrap">Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned -Force</p>
|
<b className="whitespace-nowrap">Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned -Force</b>
|
||||||
<p className="whitespace-nowrap">.\install-word-addins.ps1 -Install</p>
|
<b className="whitespace-nowrap">.\install-word-addins.ps1 -Install</b>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,34 @@
|
||||||
# judes-note-db เก่ารันอยู่ (สร้างด้วย docker run) ให้ `docker rm -f judes-note-db`
|
# judes-note-db เก่ารันอยู่ (สร้างด้วย docker run) ให้ `docker rm -f judes-note-db`
|
||||||
# ก่อน แล้ว compose จะต่อวอลุ่ม judes-note-db-data เดิมได้เลย ข้อมูลไม่หาย
|
# ก่อน แล้ว compose จะต่อวอลุ่ม judes-note-db-data เดิมได้เลย ข้อมูลไม่หาย
|
||||||
services:
|
services:
|
||||||
|
docedit:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: docker/web.Dockerfile
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
- SECRET=${SECRET}
|
||||||
|
- PRIVATE_KEY_HEX=${PRIVATE_KEY_HEX}
|
||||||
|
- PUBLIC_KEY_HEX=${PUBLIC_KEY_HEX}
|
||||||
|
- EXTERNAL_API_KEY=${EXTERNAL_API_KEY}
|
||||||
|
- DOCVER_API_KEY=${DOCVER_API_KEY}
|
||||||
|
- DOCVER_TOKEN_SECRET=${DOCVER_TOKEN_SECRET}
|
||||||
|
- DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/note
|
||||||
|
### สำหรับโค้ดตัวอย่างระบบนอกเรียกเข้ามาไม่ได้ใช้ในระบบนี้ ห้ามเอาไช้
|
||||||
|
- DOCEDIT_BASE_URL=http://docedit:3000/docedit
|
||||||
|
- TICKET_SEC=300
|
||||||
|
- DOCX_WORKERS=4
|
||||||
|
|
||||||
|
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
||||||
|
depends_on:
|
||||||
|
db:
|
||||||
|
condition: service_healthy
|
||||||
|
minio:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: postgres:18-alpine
|
image: postgres:18-alpine
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,21 @@ const nextConfig = {
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
experimental: {
|
experimental: {
|
||||||
serverComponentsExternalPackages: ['piscina']
|
serverComponentsExternalPackages: ['piscina'],
|
||||||
|
outputFileTracingIncludes: {
|
||||||
|
// ปรับ Path ฝั่งซ้ายให้ตรงกับ API Route หรือจุดที่เรียกใช้ Piscina
|
||||||
|
'/api/**/*': [
|
||||||
|
'node_modules/piscina/**/*',
|
||||||
|
'node_modules/pizzip/**/*',
|
||||||
|
'node_modules/@xmldom/xmldom/**/*',
|
||||||
|
'node_modules/xpath/**/*',
|
||||||
|
'node_modules/docx-templates/**/*',
|
||||||
|
'node_modules/jszip/**/*',
|
||||||
|
'node_modules/setimmediate/**/*',
|
||||||
|
'node_modules/pako/**/*',
|
||||||
|
'workers/**/*' // Path ที่เก็บไฟล์ worker.js ของคุณ (ปรับตามจริง)
|
||||||
|
],
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<!--
|
<!--
|
||||||
manifest ของ Word add-in "e-Court Documents Versioning" (พอร์ตจาก D:\word-addin-poc\addin\manifest.xml)
|
manifest ของ Word add-in "e-Court Documents Versioning"
|
||||||
|
|
||||||
ไฟล์นี้เป็น **template** — URL ทุกตัวเป็น absolute https ตามข้อบังคับของ Office
|
ไฟล์นี้เป็น **template** — URL ทุกตัวเป็น absolute https ตามข้อบังคับของ Office
|
||||||
โดยค่า default คือ dev (https://localhost:3000/docedit/wordaddin) และถูก serve
|
|
||||||
ผ่าน route `app/wordaddin/manifest.xml/route.ts` ที่ rewrite origin ให้ตรงกับ
|
|
||||||
โฮสต์ที่ขอไฟล์อัตโนมัติ (dev/UAT/production ใช้ template เดียวกัน — เข้าถึงที่
|
|
||||||
/docedit/wordaddin/manifest.xml ของ environment นั้น ๆ ได้เลย)
|
|
||||||
(รายละเอียดวิธีรัน dev + sideload: docs/WORDADDIN-DEV.md)
|
|
||||||
|
|
||||||
ผลต่างจากต้นฉบับ:
|
|
||||||
- taskpane ชี้ที่หน้า Next.js (/docedit/wordaddin) แทน taskpane.html ของ webpack
|
|
||||||
- ตัด DialogAPI + AppDomain ของ Keycloak (https://localhost:8443) — ยกเลิก auth ด้วย Keycloak
|
|
||||||
2026-10-27: ไม่มี login ใน add-in auth เป็น e-Court pass-through (token/owner ใน custom
|
|
||||||
properties ของไฟล์) requirement set เหลือ WordApi 1.3 + OpenBrowserWindowApi
|
|
||||||
(ดูรายละเอียดระดับที่ใช้จริงในคอมเมนต์ก่อน <Requirements>)
|
|
||||||
- Commands.Url ชี้ taskpane URL เดียวกัน (ไม่มี commands.html — ปุ่มเดียวคือ ShowTaskpane)
|
|
||||||
- คง Id GUID เดิม — เครื่องที่เคย sideload ตัว poc จะถือว่าเป็น add-in ตัวเดิม
|
|
||||||
-->
|
-->
|
||||||
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="TaskPaneApp">
|
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="TaskPaneApp">
|
||||||
<Id>4a1e184a-ab31-4fa4-b3c7-9a2283051c3f</Id>
|
<Id>4a1e184a-ab31-4fa4-b3c7-9a2283051c3f</Id>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue