// app/page.tsx (ระบบ B) 'use client'; import Link from "next/link"; import type { ChangeEvent } from 'react'; import DependentDropdown, { DropdownData } from '@/components/utils/DependentDropdown'; import { Bookmark,ToyBrick,FilePenLine,BicepsFlexed,Rocket,Workflow, Files,Blocks,FileQuestionMark, ExternalLink, FileText, Highlighter, MessagesSquare, } from "lucide-react"; export default function HomePage() { const templateData: DropdownData = { T_X: ['T_no_warning', 'TF_no_warning_P2', 'TS_P2_IN'], T12_X: ['T12_b2_IN', 'T12_FD155_3s-long'], }; const handleTmplSelect = (template: string, data: string) => { //console.log('Location Selected:', { template, data }); }; const handleInput = (e: ChangeEvent) => { // console.log(e.target) return true; } return (

eCourt Template

ระบบสร้างเทมเพลตเอกสารแบบใหม่ MS Word จากไฟล์ JSON และ Template docx

ระบบนี้ทำอะไรได้

{[ { icon: FileText, title: "DOCX Template", detail: "ออกแบบหน้าของเอกสารจาก Microsoft Word โดยไม่ต้องใช้เครื่องมือพิเศษ " + "สามารถนำเอกสารตัวเดิมมาใช้ออกแบบได้เลย " + "ไม่จำเป็นต้องมีความรู้ด้านการเขียนโปรแกรมหรือ XML ก็สามารถสร้างเทมเพลตได้", }, { icon: FilePenLine, title: "Fill Form", detail: "รอรับ Rich และ Plain Text Content Control " + "สามารถสร้างฟอร์มสำหรับกรอกข้อมูลพร้อมข้อมูลตั้งต้น " + "ผู้ใช้สามารถนำไปกรอกข้อมูลใน Word ได้เลย และสามารถเใช้โปรแกรมดึงข้อมูลกับมาเก็บในฐานข้อมูลได้", }, { icon: ToyBrick, title: "Integrate with Other System", detail: "มี Web API สำหรับสร้างเอกสารจากเทมเพลต(DOCX) กับข้อมูล(JSON) " + "มี API Key เพื่อจำกัดการใช้งาน สามารถออกบัตรผ่านที่ลงลายเซ็นต์ด้วย HmacSha256" + "เพื่อให้ผสานกับระบบงานอื่นๆ ได้อย่างปลอดภัย", }, { icon: FileText, title: "Dynamic Document", detail: "รองรับเทมเพลตที่ซับซ้อน ข้อมูลที่มีไม่แน่นอนอย่างอาเรย์ การแสดงผลตามเงื่อนไขแบบต่างๆ " + "สามารถเขียนโปรแกรมเพิ่มลงในเทมเพลตได้ รองรับ FOR , IF แทรกโค้ด " + "ฟังก์ชั่นในตัวเพื่อรองรับการสร้าง Content Control Bookmark ฯลฯ", }, { icon: Rocket, title: " High Performance", detail: "containerization ขยายระบบได้ง่าย, ระบบเทมเพลตใช้การ XML โดยตรง " + "การสร้าง template เป็นแบบ Multi-Thread รองรับ CPU หลายแกน " + "", }, ].map(({ icon: Icon, title, detail }) => (

{title}

{detail}

))}

ตัวอย่างการใช้งาน

Link (GET)

T_no_warning_john_xxx.docx
TF_no_warning_P2_john_xxx.docx
TS_P2_IN_john_xxx.docx
T12_b2_IN_john_xxx.docx
T12_FD155_3s-long_john_xxx.docx

Template & Data

Template: T_X.docx,   T12_X.docx
Data: TF_no_warning_P2.json,   T_no_warning.json,   TS_P2_IN.json
T12_b2_IN.json,   T12_FD155_3s-long.json

Form (POST)

Flow

ลิงค์เลือกไฟล์
↓
ตรวจสิทธิ์ สร้าง docx
↓
ดาว์นโหลด เปิด Word
↓
Add-ins ตรวจสอบไฟล์
↓
Versioning
↓
อัปเดตฐานข้อมูลและไฟล์

วิธีการใช้งาน

แนะนำเทมเพลตของ Docedit เบื้องต้น
Sideload Office add-ins

Add-ins

Word Add-ins

ดาวน์โหลด  manifest.xml   ไว้ที่ SharePoint แชร์เน็ตเวิร์ก หรือดาวน์โหลดสคริปต์ PowerShell(Dev Install)   install-word-addins.ps1   แล้วใช้คำสั่ง PowerShell ด้านล่างเพื่อติดตั้ง Add-ins ใน Word

Unblock-File .\install-word-addins.ps1

Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned -Force

.\install-word-addins.ps1 -Install

); }