251201:1700 Prepare to version 1.5 use spec-kit

This commit is contained in:
admin
2025-12-01 17:00:32 +07:00
parent 71c091055a
commit fc0580e14c
13 changed files with 2788 additions and 2690 deletions

View File

@@ -1,8 +1,15 @@
{
"general": {
"previewFeatures": true
"previewFeatures": true,
"enablePromptCompletion": true
},
"ide": {
"enabled": true
},
"output": {
"format": "json"
},
"ui": {
"showStatusInTitle": true
}
}

12
.prettierrc Normal file
View File

@@ -0,0 +1,12 @@
{
"singleQuote": true,
"semi": true,
"tabWidth": 2,
"useTabs": false,
"trailingComma": "es5",
"printWidth": 80,
"arrowParens": "always",
"endOfLine": "lf",
"bracketSpacing": true,
"jsxSingleQuote": false
}

View File

@@ -1,59 +1,3 @@
{
"recommendations": [
// Linting & Formatting
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
// Code Quality & Error Handling
"usernamehw.errorlens",
"yoavbls.pretty-typescript-errors",
"aaron-bond.better-comments",
"gruntfuggly.todo-tree",
// Framework & Language Support
"ashinzekene.nestjs",
"dsznajder.es7-react-js-snippets",
"orta.vscode-jest",
"bradlc.vscode-tailwindcss",
"heybourn.headwind",
"prisma.prisma",
// API Testing
"rangav.vscode-thunder-client",
"formulahendry.auto-close-tag",
"formulahendry.auto-rename-tag",
// Docker & DevOps
"ms-azuretools.vscode-docker",
"mtxr.sqltools",
"redhat.vscode-yaml",
"mikestead.dotenv",
"editorconfig.editorconfig",
// Git
"eamodio.gitlens",
"mhutchie.git-graph",
"vivaxy.vscode-conventional-commits",
// Path & Navigation
"christian-kohler.path-intellisense",
"christian-kohler.npm-intellisense",
"csstools.postcss",
// CSS Enhancement
"pranaygp.vscode-css-peek",
// Productivity
"alefragnani.bookmarks",
"chakrounanas.turbo-console-log",
"wallabyjs.console-ninja",
// Icons & Theme
"pkief.material-icon-theme",
"bierner.markdown-mermaid"
// AI Assistance (Optional - เลือก 1 อัน)
// "github.copilot",
// "tabnine.tabnine-vscode"
]
"recommendations": ["ms-vscode.powershell"]
}

59
.vscode/extensions.json.bak vendored Normal file
View File

@@ -0,0 +1,59 @@
{
"recommendations": [
// Linting & Formatting
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
// Code Quality & Error Handling
"usernamehw.errorlens",
"yoavbls.pretty-typescript-errors",
"aaron-bond.better-comments",
"gruntfuggly.todo-tree",
// Framework & Language Support
"ashinzekene.nestjs",
"dsznajder.es7-react-js-snippets",
"orta.vscode-jest",
"bradlc.vscode-tailwindcss",
"heybourn.headwind",
"prisma.prisma",
// API Testing
"rangav.vscode-thunder-client",
"formulahendry.auto-close-tag",
"formulahendry.auto-rename-tag",
// Docker & DevOps
"ms-azuretools.vscode-docker",
"mtxr.sqltools",
"redhat.vscode-yaml",
"mikestead.dotenv",
"editorconfig.editorconfig",
// Git
"eamodio.gitlens",
"mhutchie.git-graph",
"vivaxy.vscode-conventional-commits",
// Path & Navigation
"christian-kohler.path-intellisense",
"christian-kohler.npm-intellisense",
"csstools.postcss",
// CSS Enhancement
"pranaygp.vscode-css-peek",
// Productivity
"alefragnani.bookmarks",
"chakrounanas.turbo-console-log",
"wallabyjs.console-ninja",
// Icons & Theme
"pkief.material-icon-theme",
"bierner.markdown-mermaid"
// AI Assistance (Optional - เลือก 1 อัน)
// "github.copilot",
// "tabnine.tabnine-vscode"
]
}

560
.vscode/settings.json vendored
View File

@@ -1,559 +1,3 @@
{
// ========================================
// EDITOR SETTINGS
// ========================================
// ขนาดตัวอักษรในโค้ด
"editor.fontSize": 14,
// ความสูงของแต่ละบรรทัด
"editor.lineHeight": 1.6,
// แสดงเส้นแนวตั้งที่ตำแหน่งตัวอักษรที่ 80 และ 120
"editor.rulers": [80, 120],
// เปิดใช้ minimap ขวามือ
"editor.minimap.enabled": true,
// แสดงช่องว่างและ tab เป็นจุดและเส้น
"editor.renderWhitespace": "boundary",
// เปิดใช้ bracket pair colorization
"editor.bracketPairColorization.enabled": true,
// แสดงเส้นเชื่อม brackets
"editor.guides.bracketPairs": "active",
// smooth scrolling
"editor.smoothScrolling": true,
// cursor animation
"editor.cursorBlinking": "smooth",
"editor.cursorSmoothCaretAnimation": "on",
// แสดง breadcrumb ด้านบน
"breadcrumbs.enabled": true,
// word wrap ที่ขอบหน้าต่าง
"editor.wordWrap": "on",
// ========================================
// FORMAT ON SAVE
// ========================================
// format โค้ดอัตโนมัติเมื่อ save
"editor.formatOnSave": true,
// format โค้ดเมื่อ paste
"editor.formatOnPaste": true,
// ใช้ Prettier เป็น default formatter
"editor.defaultFormatter": "esbenp.prettier-vscode",
// กำหนด formatter เฉพาะแต่ละภาษา
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[scss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
// ========================================
// CODE ACTION ON SAVE
// ========================================
// รัน ESLint fix และจัดเรียง imports เมื่อ save
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "explicit",
"source.addMissingImports": "explicit"
},
// ========================================
// PRETTIER SETTINGS
// ========================================
// ใช้ single quotes แทน double quotes
"prettier.singleQuote": true,
// ใช้ semicolons ท้ายบรรทัด
"prettier.semi": true,
// ความกว้างของ tab เป็น 2 spaces
"prettier.tabWidth": 2,
// ใช้ spaces แทน tabs
"prettier.useTabs": false,
// ใส่ trailing comma ใน ES5 (objects, arrays, etc.)
"prettier.trailingComma": "es5",
// ความกว้างสูงสุดก่อนขึ้นบรรทัดใหม่
"prettier.printWidth": 80,
// ใส่ comma ท้ายสุดใน multiline
"prettier.arrowParens": "always",
// ใช้ LF (Line Feed) แทน CRLF
"prettier.endOfLine": "lf",
// ========================================
// ESLINT SETTINGS
// ========================================
// เปิดใช้ ESLint
"eslint.enable": true,
// รัน ESLint บนไฟล์เหล่านี้
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
// แสดง ESLint status ใน status bar
"eslint.alwaysShowStatus": true,
// ========================================
// ERROR LENS SETTINGS
// ========================================
// เปิดใช้ Error Lens
"errorLens.enabled": true,
// แสดง errors, warnings, และ info
"errorLens.enabledDiagnosticLevels": [
"error",
"warning",
"info"
],
// ระยะห่างของข้อความจากโค้ด
"errorLens.padding": "0 1ch",
// ตำแหน่งข้อความ error
"errorLens.messageTemplate": "$message",
// แสดง error ท้ายบรรทัด
"errorLens.messageEnabled": true,
// ========================================
// TAILWIND CSS SETTINGS
// ========================================
// เปิดใช้ IntelliSense สำหรับ Tailwind
"tailwindCSS.emmetCompletions": true,
// แสดง color preview
"tailwindCSS.colorDecorators": true,
// เปิดใช้ suggestions
"tailwindCSS.suggestions": true,
// ไฟล์ที่จะใช้ Tailwind IntelliSense
"tailwindCSS.includeLanguages": {
"typescript": "javascript",
"typescriptreact": "javascript"
},
// ========================================
// HEADWIND (Tailwind Class Sorter)
// ========================================
// รัน Headwind เมื่อ save
"headwind.runOnSave": true,
// ========================================
// AUTO CLOSE/RENAME TAG
// ========================================
// เปิดใช้ auto close tag
"auto-close-tag.activationOnLanguage": [
"html",
"xml",
"php",
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
// เปิดใช้ auto rename tag
"auto-rename-tag.activationOnLanguage": [
"html",
"xml",
"php",
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
// ========================================
// BETTER COMMENTS
// ========================================
// กำหนดสีและรูปแบบของ comments
"better-comments.tags": [
{
"tag": "!",
"color": "#FF2D00",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "?",
"color": "#3498DB",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "//",
"color": "#474747",
"strikethrough": true,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "todo",
"color": "#FF8C00",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "*",
"color": "#98C379",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
}
],
// ========================================
// TODO TREE
// ========================================
// keywords ที่จะ highlight
"todo-tree.general.tags": [
"TODO",
"FIXME",
"BUG",
"HACK",
"NOTE",
"XXX"
],
// highlight TODO ในโค้ด
"todo-tree.highlights.enabled": true,
// แสดง TODO tree ใน activity bar
"todo-tree.tree.showInExplorer": false,
// กำหนดสีของแต่ละ tag
"todo-tree.highlights.defaultHighlight": {
"foreground": "black",
"type": "text",
"opacity": 50
},
"todo-tree.highlights.customHighlight": {
"TODO": {
"icon": "check",
"iconColour": "#FF8C00",
"foreground": "#FF8C00"
},
"FIXME": {
"icon": "alert",
"iconColour": "#FF2D00",
"foreground": "#FF2D00"
},
"BUG": {
"icon": "bug",
"iconColour": "#FF2D00",
"foreground": "#FF2D00"
},
"NOTE": {
"icon": "note",
"iconColour": "#3498DB",
"foreground": "#3498DB"
}
},
// ========================================
// GITLENS SETTINGS
// ========================================
// แสดง Git blame ใน status bar
"gitlens.statusBar.enabled": true,
// แสดง current line blame
"gitlens.currentLine.enabled": true,
// format ของ current line blame
"gitlens.currentLine.format": "${author}, ${agoOrDate}",
// แสดง codelens (ข้อมูล Git เหนือฟังก์ชัน)
"gitlens.codeLens.enabled": true,
// แสดง blame annotations
"gitlens.hovers.enabled": true,
// ========================================
// GIT SETTINGS
// ========================================
// เปิดใช้ Git
"git.enabled": true,
// auto fetch ทุก 180 วินาที
"git.autofetch": true,
"git.autofetchPeriod": 180,
// ยืนยันก่อน sync
"git.confirmSync": false,
// enable smart commit
"git.enableSmartCommit": true,
// ========================================
// PATH INTELLISENSE
// ========================================
// mappings สำหรับ path aliases
"path-intellisense.mappings": {
"@": "${workspaceFolder}/src"
},
// ========================================
// IMPORT COST
// ========================================
// แสดงขนาดของ imports
"importCost.showCalculatingDecoration": true,
// เตือนเมื่อ import ใหญ่เกิน
"importCost.largePackageSize": 100,
"importCost.mediumPackageSize": 50,
"importCost.smallPackageSize": 20,
// ========================================
// JAVASCRIPT/TYPESCRIPT
// ========================================
// auto imports
"javascript.suggest.autoImports": true,
"typescript.suggest.autoImports": true,
// update imports on file move
"javascript.updateImportsOnFileMove.enabled": "always",
"typescript.updateImportsOnFileMove.enabled": "always",
// inlay hints
"javascript.inlayHints.parameterNames.enabled": "all",
"typescript.inlayHints.parameterNames.enabled": "all",
"javascript.inlayHints.functionLikeReturnTypes.enabled": true,
"typescript.inlayHints.functionLikeReturnTypes.enabled": true,
// ========================================
// EMMET
// ========================================
// เปิดใช้ Emmet
"emmet.includeLanguages": {
"javascript": "javascriptreact",
"typescript": "typescriptreact"
},
// trigger Emmet ด้วย Tab
"emmet.triggerExpansionOnTab": true,
// ========================================
// FILES
// ========================================
// auto save
"files.autoSave": "onFocusChange",
// ลบ whitespace ท้ายบรรทัดเมื่อ save
"files.trimTrailingWhitespace": true,
// เพิ่มบรรทัดว่างท้ายไฟล์
"files.insertFinalNewline": true,
// encoding
"files.encoding": "utf8",
// line ending
"files.eol": "\n",
// exclude files/folders จาก explorer
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
"**/node_modules": true,
"**/.next": true,
"**/dist": true,
"**/build": true,
"**/.turbo": true
},
// ========================================
// SEARCH
// ========================================
// exclude files/folders จากการค้นหา
"search.exclude": {
"**/node_modules": true,
"**/dist": true,
"**/build": true,
"**/.next": true,
"**/.turbo": true,
"**/coverage": true,
"**/.git": true,
"**/yarn.lock": true,
"**/package-lock.json": true,
"**/pnpm-lock.yaml": true
},
// ========================================
// TERMINAL
// ========================================
// font size ใน terminal
"terminal.integrated.fontSize": 13,
// line height ใน terminal
"terminal.integrated.lineHeight": 1.2,
// smooth scrolling
"terminal.integrated.smoothScrolling": true,
// ========================================
// WORKBENCH
// ========================================
// icon theme
"workbench.iconTheme": "material-icon-theme",
// color theme (เลือกตามชอบ)
// "workbench.colorTheme": "One Dark Pro",
// แสดง activity bar
"workbench.activityBar.location": "default",
// tree indent
"workbench.tree.indent": 15,
// smooth scrolling
"workbench.list.smoothScrolling": true,
// ========================================
// EXPLORER
// ========================================
// compact folders
"explorer.compactFolders": false,
// confirm before delete
"explorer.confirmDelete": true,
// confirm drag and drop
"explorer.confirmDragAndDrop": false,
// ========================================
// JEST
// ========================================
// auto run tests
"jest.autoRun": "off",
// แสดง coverage overlay
"jest.showCoverageOnLoad": false,
// ========================================
// DOCKER
// ========================================
// format docker files
"docker.languageserver.formatter.ignoreMultilineInstructions": true,
// ========================================
// YAML
// ========================================
// schemas สำหรับ YAML validation
"yaml.schemas": {
"https://json.schemastore.org/github-workflow.json": ".github/workflows/*.{yml,yaml}",
"https://json.schemastore.org/github-action.json": "action.{yml,yaml}",
"https://json.schemastore.org/prettierrc.json": ".prettierrc.{yml,yaml}"
},
// format YAML files
"yaml.format.enable": true,
// ========================================
// CONSOLE NINJA
// ========================================
// เปิดใช้ Console Ninja
"console-ninja.featureSet": "Community",
// ========================================
// REST CLIENT
// ========================================
// timeout สำหรับ HTTP requests (milliseconds)
"rest-client.timeoutinmilliseconds": 30000,
// แสดงเวลาที่ใช้ในการ request
"rest-client.showResponseInDifferentTab": true,
// ========================================
// SECURITY
// ========================================
// trust workspace
"security.workspace.trust.untrustedFiles": "open",
// ========================================
// PERFORMANCE
// ========================================
// จำกัดจำนวนไฟล์ที่เปิดพร้อมกัน
"files.maxMemoryForLargeFilesMB": 4096,
// ปิด crash reporter
"telemetry.telemetryLevel": "off"
}
"terminal.integrated.cwd": "\"cwd\": \"D:\\\\nap-dms.lcbp3\\\\frontend\""
}

559
.vscode/settings.json.bak vendored Normal file
View File

@@ -0,0 +1,559 @@
{
// ========================================
// EDITOR SETTINGS
// ========================================
// ขนาดตัวอักษรในโค้ด
"editor.fontSize": 14,
// ความสูงของแต่ละบรรทัด
"editor.lineHeight": 1.6,
// แสดงเส้นแนวตั้งที่ตำแหน่งตัวอักษรที่ 80 และ 120
"editor.rulers": [80, 120],
// เปิดใช้ minimap ขวามือ
"editor.minimap.enabled": true,
// แสดงช่องว่างและ tab เป็นจุดและเส้น
"editor.renderWhitespace": "boundary",
// เปิดใช้ bracket pair colorization
"editor.bracketPairColorization.enabled": true,
// แสดงเส้นเชื่อม brackets
"editor.guides.bracketPairs": "active",
// smooth scrolling
"editor.smoothScrolling": true,
// cursor animation
"editor.cursorBlinking": "smooth",
"editor.cursorSmoothCaretAnimation": "on",
// แสดง breadcrumb ด้านบน
"breadcrumbs.enabled": true,
// word wrap ที่ขอบหน้าต่าง
"editor.wordWrap": "on",
// ========================================
// FORMAT ON SAVE
// ========================================
// format โค้ดอัตโนมัติเมื่อ save
"editor.formatOnSave": true,
// format โค้ดเมื่อ paste
"editor.formatOnPaste": true,
// ใช้ Prettier เป็น default formatter
"editor.defaultFormatter": "esbenp.prettier-vscode",
// กำหนด formatter เฉพาะแต่ละภาษา
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[scss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
// ========================================
// CODE ACTION ON SAVE
// ========================================
// รัน ESLint fix และจัดเรียง imports เมื่อ save
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "explicit",
"source.addMissingImports": "explicit"
},
// ========================================
// PRETTIER SETTINGS
// ========================================
// ใช้ single quotes แทน double quotes
"prettier.singleQuote": true,
// ใช้ semicolons ท้ายบรรทัด
"prettier.semi": true,
// ความกว้างของ tab เป็น 2 spaces
"prettier.tabWidth": 2,
// ใช้ spaces แทน tabs
"prettier.useTabs": false,
// ใส่ trailing comma ใน ES5 (objects, arrays, etc.)
"prettier.trailingComma": "es5",
// ความกว้างสูงสุดก่อนขึ้นบรรทัดใหม่
"prettier.printWidth": 80,
// ใส่ comma ท้ายสุดใน multiline
"prettier.arrowParens": "always",
// ใช้ LF (Line Feed) แทน CRLF
"prettier.endOfLine": "lf",
// ========================================
// ESLINT SETTINGS
// ========================================
// เปิดใช้ ESLint
"eslint.enable": true,
// รัน ESLint บนไฟล์เหล่านี้
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
// แสดง ESLint status ใน status bar
"eslint.alwaysShowStatus": true,
// ========================================
// ERROR LENS SETTINGS
// ========================================
// เปิดใช้ Error Lens
"errorLens.enabled": true,
// แสดง errors, warnings, และ info
"errorLens.enabledDiagnosticLevels": [
"error",
"warning",
"info"
],
// ระยะห่างของข้อความจากโค้ด
"errorLens.padding": "0 1ch",
// ตำแหน่งข้อความ error
"errorLens.messageTemplate": "$message",
// แสดง error ท้ายบรรทัด
"errorLens.messageEnabled": true,
// ========================================
// TAILWIND CSS SETTINGS
// ========================================
// เปิดใช้ IntelliSense สำหรับ Tailwind
"tailwindCSS.emmetCompletions": true,
// แสดง color preview
"tailwindCSS.colorDecorators": true,
// เปิดใช้ suggestions
"tailwindCSS.suggestions": true,
// ไฟล์ที่จะใช้ Tailwind IntelliSense
"tailwindCSS.includeLanguages": {
"typescript": "javascript",
"typescriptreact": "javascript"
},
// ========================================
// HEADWIND (Tailwind Class Sorter)
// ========================================
// รัน Headwind เมื่อ save
"headwind.runOnSave": true,
// ========================================
// AUTO CLOSE/RENAME TAG
// ========================================
// เปิดใช้ auto close tag
"auto-close-tag.activationOnLanguage": [
"html",
"xml",
"php",
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
// เปิดใช้ auto rename tag
"auto-rename-tag.activationOnLanguage": [
"html",
"xml",
"php",
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
// ========================================
// BETTER COMMENTS
// ========================================
// กำหนดสีและรูปแบบของ comments
"better-comments.tags": [
{
"tag": "!",
"color": "#FF2D00",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "?",
"color": "#3498DB",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "//",
"color": "#474747",
"strikethrough": true,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "todo",
"color": "#FF8C00",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
},
{
"tag": "*",
"color": "#98C379",
"strikethrough": false,
"underline": false,
"backgroundColor": "transparent",
"bold": false,
"italic": false
}
],
// ========================================
// TODO TREE
// ========================================
// keywords ที่จะ highlight
"todo-tree.general.tags": [
"TODO",
"FIXME",
"BUG",
"HACK",
"NOTE",
"XXX"
],
// highlight TODO ในโค้ด
"todo-tree.highlights.enabled": true,
// แสดง TODO tree ใน activity bar
"todo-tree.tree.showInExplorer": false,
// กำหนดสีของแต่ละ tag
"todo-tree.highlights.defaultHighlight": {
"foreground": "black",
"type": "text",
"opacity": 50
},
"todo-tree.highlights.customHighlight": {
"TODO": {
"icon": "check",
"iconColour": "#FF8C00",
"foreground": "#FF8C00"
},
"FIXME": {
"icon": "alert",
"iconColour": "#FF2D00",
"foreground": "#FF2D00"
},
"BUG": {
"icon": "bug",
"iconColour": "#FF2D00",
"foreground": "#FF2D00"
},
"NOTE": {
"icon": "note",
"iconColour": "#3498DB",
"foreground": "#3498DB"
}
},
// ========================================
// GITLENS SETTINGS
// ========================================
// แสดง Git blame ใน status bar
"gitlens.statusBar.enabled": true,
// แสดง current line blame
"gitlens.currentLine.enabled": true,
// format ของ current line blame
"gitlens.currentLine.format": "${author}, ${agoOrDate}",
// แสดง codelens (ข้อมูล Git เหนือฟังก์ชัน)
"gitlens.codeLens.enabled": true,
// แสดง blame annotations
"gitlens.hovers.enabled": true,
// ========================================
// GIT SETTINGS
// ========================================
// เปิดใช้ Git
"git.enabled": true,
// auto fetch ทุก 180 วินาที
"git.autofetch": true,
"git.autofetchPeriod": 180,
// ยืนยันก่อน sync
"git.confirmSync": false,
// enable smart commit
"git.enableSmartCommit": true,
// ========================================
// PATH INTELLISENSE
// ========================================
// mappings สำหรับ path aliases
"path-intellisense.mappings": {
"@": "${workspaceFolder}/src"
},
// ========================================
// IMPORT COST
// ========================================
// แสดงขนาดของ imports
"importCost.showCalculatingDecoration": true,
// เตือนเมื่อ import ใหญ่เกิน
"importCost.largePackageSize": 100,
"importCost.mediumPackageSize": 50,
"importCost.smallPackageSize": 20,
// ========================================
// JAVASCRIPT/TYPESCRIPT
// ========================================
// auto imports
"javascript.suggest.autoImports": true,
"typescript.suggest.autoImports": true,
// update imports on file move
"javascript.updateImportsOnFileMove.enabled": "always",
"typescript.updateImportsOnFileMove.enabled": "always",
// inlay hints
"javascript.inlayHints.parameterNames.enabled": "all",
"typescript.inlayHints.parameterNames.enabled": "all",
"javascript.inlayHints.functionLikeReturnTypes.enabled": true,
"typescript.inlayHints.functionLikeReturnTypes.enabled": true,
// ========================================
// EMMET
// ========================================
// เปิดใช้ Emmet
"emmet.includeLanguages": {
"javascript": "javascriptreact",
"typescript": "typescriptreact"
},
// trigger Emmet ด้วย Tab
"emmet.triggerExpansionOnTab": true,
// ========================================
// FILES
// ========================================
// auto save
"files.autoSave": "onFocusChange",
// ลบ whitespace ท้ายบรรทัดเมื่อ save
"files.trimTrailingWhitespace": true,
// เพิ่มบรรทัดว่างท้ายไฟล์
"files.insertFinalNewline": true,
// encoding
"files.encoding": "utf8",
// line ending
"files.eol": "\n",
// exclude files/folders จาก explorer
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
"**/node_modules": true,
"**/.next": true,
"**/dist": true,
"**/build": true,
"**/.turbo": true
},
// ========================================
// SEARCH
// ========================================
// exclude files/folders จากการค้นหา
"search.exclude": {
"**/node_modules": true,
"**/dist": true,
"**/build": true,
"**/.next": true,
"**/.turbo": true,
"**/coverage": true,
"**/.git": true,
"**/yarn.lock": true,
"**/package-lock.json": true,
"**/pnpm-lock.yaml": true
},
// ========================================
// TERMINAL
// ========================================
// font size ใน terminal
"terminal.integrated.fontSize": 13,
// line height ใน terminal
"terminal.integrated.lineHeight": 1.2,
// smooth scrolling
"terminal.integrated.smoothScrolling": true,
// ========================================
// WORKBENCH
// ========================================
// icon theme
"workbench.iconTheme": "material-icon-theme",
// color theme (เลือกตามชอบ)
// "workbench.colorTheme": "One Dark Pro",
// แสดง activity bar
"workbench.activityBar.location": "default",
// tree indent
"workbench.tree.indent": 15,
// smooth scrolling
"workbench.list.smoothScrolling": true,
// ========================================
// EXPLORER
// ========================================
// compact folders
"explorer.compactFolders": false,
// confirm before delete
"explorer.confirmDelete": true,
// confirm drag and drop
"explorer.confirmDragAndDrop": false,
// ========================================
// JEST
// ========================================
// auto run tests
"jest.autoRun": "off",
// แสดง coverage overlay
"jest.showCoverageOnLoad": false,
// ========================================
// DOCKER
// ========================================
// format docker files
"docker.languageserver.formatter.ignoreMultilineInstructions": true,
// ========================================
// YAML
// ========================================
// schemas สำหรับ YAML validation
"yaml.schemas": {
"https://json.schemastore.org/github-workflow.json": ".github/workflows/*.{yml,yaml}",
"https://json.schemastore.org/github-action.json": "action.{yml,yaml}",
"https://json.schemastore.org/prettierrc.json": ".prettierrc.{yml,yaml}"
},
// format YAML files
"yaml.format.enable": true,
// ========================================
// CONSOLE NINJA
// ========================================
// เปิดใช้ Console Ninja
"console-ninja.featureSet": "Community",
// ========================================
// REST CLIENT
// ========================================
// timeout สำหรับ HTTP requests (milliseconds)
"rest-client.timeoutinmilliseconds": 30000,
// แสดงเวลาที่ใช้ในการ request
"rest-client.showResponseInDifferentTab": true,
// ========================================
// SECURITY
// ========================================
// trust workspace
"security.workspace.trust.untrustedFiles": "open",
// ========================================
// PERFORMANCE
// ========================================
// จำกัดจำนวนไฟล์ที่เปิดพร้อมกัน
"files.maxMemoryForLargeFilesMB": 4096,
// ปิด crash reporter
"telemetry.telemetryLevel": "off"
}

View File

@@ -1,4 +1,12 @@
{
"singleQuote": true,
"trailingComma": "all"
"semi": true,
"tabWidth": 2,
"useTabs": false,
"trailingComma": "es5",
"printWidth": 80,
"arrowParens": "always",
"endOfLine": "lf",
"bracketSpacing": true,
"jsxSingleQuote": false
}

View File

@@ -280,17 +280,6 @@ CREATE TABLE correspondence_types (
sort_order INT DEFAULT 0 COMMENT 'ลำดับการแสดงผล',
is_active TINYINT(1) DEFAULT 1 COMMENT 'สถานะการใช้งาน '
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'ตาราง Master เก็บประเภทเอกสารโต้ตอบ';
INSERT INTO correspondence_types (type_code, type_name, sort_order, is_active)
VALUES ('RFA', 'Request for Approval', 1, 1),
('RFI', 'Request for Information', 2, 1),
('TRANSMITTAL', 'Transmittal', 3, 1),
('EMAIL', 'Email', 4, 1),
('INSTRUCTION', 'Instruction', 5, 1),
('LETTER', 'Letter', 6, 1),
('MEMO', 'Memorandum', 7, 1),
('MOM', 'Minutes of Meeting', 8, 1),
('NOTICE', 'Notice', 9, 1),
('OTHER', 'Other', 10, 1);
-- ตาราง Master เก็บสถานะของเอกสาร
CREATE TABLE correspondence_status (
id INT PRIMARY KEY AUTO_INCREMENT COMMENT 'ID ของตาราง',
@@ -650,11 +639,6 @@ CREATE TABLE circulation_status_codes (
sort_order INT DEFAULT 0 COMMENT 'ลำดับการแสดงผล',
is_active TINYINT(1) DEFAULT 1 COMMENT 'สถานะการใช้งาน '
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'ตาราง Master เก็บสถานะใบเวียน';
INSERT INTO circulation_status_codes (code, description, sort_order)
VALUES ('OPEN', 'Open', 1),
('IN_REVIEW', 'In Review', 2),
('COMPLETED', 'ปCompleted', 3),
('CANCELLED', 'Cancelled / Withdrawn', 9);
-- ตาราง "แม่" ของใบเวียนเอกสารภายใน
CREATE TABLE circulations (
id INT PRIMARY KEY AUTO_INCREMENT COMMENT 'ID ของตารางใบเวียน',

File diff suppressed because it is too large Load Diff

View File

@@ -28,7 +28,10 @@
"@public": ["public/*"],
"@styles": ["styles/*"],
"@types": ["types/*"],
"@api": ["app/api/*"]
"@api": ["app/api/*"],
// เพิ่มส่วนที่ขาดไปเพื่อให้ตรงกับ Workspace
"@hooks/*": ["app/hooks/*"],
"@utils/*": ["utils/*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],

View File

@@ -1,32 +1,17 @@
{
"folders": [+
{
"name": "🎯 Root",
"path": "./"
},
{
"name": "🗓️ docs",
"path": "./docs"
},
{
"name": "🔗 specs",
"path": "./specs"
},
{
"name": "🔧 Backend",
"path": "./backend"
},
{
"name": "🎨 Frontend",
"path": "./frontend"
}
"folders": [
{ "name": "🎯 Root", "path": "./" },
{ "name": "🔧 Backend", "path": "./backend" },
{ "name": "🎨 Frontend", "path": "./frontend" },
{ "name": "🗓️ docs", "path": "./docs" },
{ "name": "🔗 specs", "path": "./specs" }
],
"settings": {
// ========================================
// EDITOR SETTINGS
// ========================================
"editor.fontSize": 14,
"editor.fontSize": 15,
"editor.lineHeight": 1.6,
"editor.rulers": [80, 120],
"editor.minimap.enabled": true,
@@ -85,34 +70,28 @@
"editor.defaultFormatter": "redhat.vscode-yaml"
},
"[dockerfile]": {
"editor.defaultFormatter": "ms-azuretools.vscode-docker"
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[sql]": {
"editor.defaultFormatter": "inferrinizzard.prettier-sql-vscode",
"editor.tabSize": 2,
"editor.insertSpaces": true
},
// ========================================
// CODE ACTION ON SAVE
// ========================================
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.fixAll": "explicit",
// "source.fixAll.eslint": "explicit"
"source.organizeImports": "explicit",
"source.addMissingImports": "explicit"
},
// ========================================
// PRETTIER SETTINGS
// PRETTIER SETTINGS .prettierrc
// ========================================
"prettier.singleQuote": true,
"prettier.semi": true,
"prettier.tabWidth": 2,
"prettier.useTabs": false,
"prettier.trailingComma": "es5",
"prettier.printWidth": 80,
"prettier.arrowParens": "always",
"prettier.endOfLine": "lf",
"prettier.bracketSpacing": true,
"prettier.jsxSingleQuote": false,
// ========================================
// ESLINT SETTINGS
// ========================================
@@ -127,10 +106,7 @@
"eslint.alwaysShowStatus": true,
"eslint.format.enable": false,
"eslint.lintTask.enable": true,
"eslint.workingDirectories": [
"./backend",
"./frontend"
],
"eslint.workingDirectories": ["./backend", "./frontend"],
// ========================================
// PATH INTELLISENSE - ไม่มี src folder
// ========================================
@@ -170,7 +146,7 @@
"@public": "${workspaceFolder:🎨 Frontend (React/Next.js)}/public",
"@styles": "${workspaceFolder:🎨 Frontend (React/Next.js)}/styles",
"@types": "${workspaceFolder:🎨 Frontend (React/Next.js)}/types",
"@api": "${workspaceFolder:🎨 Frontend (React/Next.js)}/app/api",
"@api": "${workspaceFolder:🎨 Frontend (React/Next.js)}/app/api"
},
"path-intellisense.autoSlashAfterDirectory": true,
"path-intellisense.extensionOnImport": false,
@@ -461,12 +437,18 @@
// TERMINAL
// ========================================
"terminal.integrated.fontSize": 14,
"terminal.integrated.fontSize": 15,
"terminal.integrated.lineHeight": 1.2,
"terminal.integrated.smoothScrolling": true,
"terminal.integrated.cursorBlinking": true,
"terminal.integrated.fontFamily": "MesloLGS NF, Consolas, monospace",
"terminal.integrated.defaultProfile.windows": "PowerShell",
"terminal.integrated.profiles.windows": {
"PowerShell-7": {
"path": "C:\\Program Files\\PowerShell\\7\\pwsh.exe",
"icon": "terminal-powershell"
}
},
"terminal.integrated.defaultProfile.windows": "PowerShell-7",
"terminal.integrated.cwd": "${workspaceFolder}",
// ========================================
@@ -513,7 +495,7 @@
"*.jsx": "${capture}.test.jsx, ${capture}.spec.jsx"
},
// ========================================
// ========================================
// BREADCRUMBS
// ========================================
@@ -525,9 +507,31 @@
// JEST
// ========================================
"jest.autoRun": "off",
"jest.showCoverageOnLoad": false,
"jest.rootPath": "backend",
// เปิดใช้งาน Jest extension
"jest.enable": true,
// ปิดการเปิด Terminal ตอนเปิด VS Code
"jest.showTerminalOnLaunch": false,
// ปิดการเปิด Terminal ตอนรันเทสต์
"jest.showTerminalOnTestRun": false,
// ให้รัน Jest ใน background โดยไม่ต้องเปิด terminal
"jest.runInWorkspace": true,
// แสดงผลลัพธ์เทสต์ใน editor (inline)
"jest.showInlineError": true,
// ใช้ watch mode สำหรับการรันเทสต์อัตโนมัติเมื่อไฟล์เปลี่ยน
"jest.runMode": "watch",
// กำหนด path ของ Jest ถ้าใช้ local install
"jest.pathToJest": "node_modules/.bin/jest",
// กำหนด config ของ Jest ถ้ามีไฟล์ jest.config.js
"jest.pathToConfig": "jest.config.js",
"jest.disabledWorkspaceFolders": ["🎯 Root", "🗓️ docs", "🔗 specs"],
// ========================================
// DOCKER
@@ -535,6 +539,7 @@
"docker.languageserver.formatter.ignoreMultilineInstructions": true,
"docker.showStartPage": false,
// ========================================
// YAML
// ========================================
@@ -622,7 +627,7 @@
"telemetry.telemetryLevel": "off",
"security.workspace.trust.untrustedFiles": "open",
"extensions.ignoreRecommendations": false,
// ========================================
// ========================================
// DEBUGGING
// ========================================
@@ -790,6 +795,67 @@
"type": "shell",
"command": "docker-compose down",
"problemMatcher": []
},
{
"label": "Start Backend",
"type": "shell",
"command": "npm run start:dev",
"options": {
"cwd": "${workspaceFolder:🔧 Backend}"
},
"presentation": {
"panel": "dedicated",
"group": "dev",
"reveal": "always"
}
},
// 1. Task หลักที่จะรันอัตโนมัติเมื่อเปิดโปรแกรม
{
"label": "🚀 Setup Workspace",
"dependsOn": ["🔧 PS: Backend", "🎨 PS: Frontend"], // สั่งให้รัน 2 task ย่อย
"runOptions": {
"runOn": "folderOpen" // <--- คำสั่งศักดิ์สิทธิ์: รันทันทีที่เปิด VS Code
},
"presentation": {
"reveal": "never" // ไม่ต้องโชว์หน้าต่างของตัวคุมหลัก
},
"problemMatcher": []
},
// 2. Task ย่อย: เปิด Terminal ที่ Backend
{
"label": "🔧 PS: Backend",
"type": "shell",
"command": "powershell", // สั่งเปิด PowerShell ค้างไว้
"options": {
"cwd": "${workspaceFolder:🔧 Backend}" // cd เข้า folder นี้
},
"isBackground": true, // บอก VS Code ว่าไม่ต้องรอให้จบ (รันค้างไว้เลย)
"problemMatcher": [],
"presentation": {
"group": "workspace-terminals", // จัดกลุ่มเดียวกัน
"reveal": "always",
"panel": "dedicated", // แยก Tab ให้ชัดเจน
"focus": false // ไม่ต้องแย่ง Focus ทันที
}
},
// 3. Task ย่อย: เปิด Terminal ที่ Frontend
{
"label": "🎨 PS: Frontend",
"type": "shell",
"command": "powershell",
"options": {
"cwd": "${workspaceFolder:🎨 Frontend}" // cd เข้า folder นี้
},
"isBackground": true,
"problemMatcher": [],
"presentation": {
"group": "workspace-terminals",
"reveal": "always",
"panel": "dedicated",
"focus": true // ให้ Focus ที่อันนี้เป็นอันสุดท้าย (พร้อมพิมพ์)
}
}
]
},
@@ -832,7 +898,8 @@
"chakrounanas.turbo-console-log",
"wallabyjs.console-ninja",
"pkief.material-icon-theme",
"github.copilot"
"github.copilot",
"inferrinizzard.prettier-sql-vscode"
]
}
}

View File

@@ -18,17 +18,22 @@ related:
## 3.11.1. วัตถุประสงค์:
- ระบบต้องสามารถสร้างเลขที่เอกสาร (Running Number) ได้โดยอัตโนมัติและยืดหยุ่นสูง
- ระบต้องสามารถกำหนด รูปแบบ(template) เลขที่เอกสารได้ สำหรับแต่ละโครงการ, ชนิดเอกสาร, ประเภทเอกสาร
## 3.11.2. Logic การนับเลข (Counter Logic):
- การนับเลขจะต้องรองรับการแยกตาม Key ที่ซับซ้อนขึ้น:
- Project + Originator + Type + Discipline (ถ้ามี) + Sub-Type (ถ้ามี) + Year
- การนับเลขจะต้องรองรับการแยกตาม Key ที่ซับซ้อนขึ้น ตามแต่ละ รูปแบบ(template) ได้
## 3.11.3. Format Template:
- รองรับการกำหนดรูปแบบด้วย Token Replacement เช่น:
- รองรับ Token: `{ORG}-{TYPE}-{DISCIPLINE}-{SEQ:4}-{REV}` -> `TEAM-RFA-STR-0001-A`
- รองรับ Token: `{PROJECT}`, `{ORG}`, `{TYPE}`, `{DISCIPLINE}`, `{SUBTYPE}`, `{SUBTYPE_NUM}`, `{YEAR}`, `{YEAR_SHORT}`, `{SEQ:n}`
- transmittal to owner: คคง.-สคฉ.3-03-21-0117-2568
- other transmittal: ผรม.2-คคง.-0117-2568
- LCBP3-C2-RFI-ROW-0029-A
- Correspondence type LETTEE คคง.-สคฉ.3-0985-2568
- Correspondence รองรับ Token: {ORG}-{ORG}-{TYPE}-{SEQ:4}-{YEAR B.D.} -> คคง.-สคฉ.3-STR-0001-2568
- RFA รองรับ Token: {PROJECT}-{ORG}-{TYPE}-{DISCIPLINE}-{SEQ:4}-{REV} -> TEAM-RFA-STR-0001-A
- Transmittal รองรับ Token: {PROJECT}-{ORG}-{TYPE}-{DISCIPLINE}-{SEQ:4}-{REV} -> TEAM-TR-STR-0001-A
## 3.11.4. Transmittal Logic: