diff --git a/03_source/frontend/.gitignore b/03_source/frontend/.gitignore index 5f0eeb6..d544fff 100644 --- a/03_source/frontend/.gitignore +++ b/03_source/frontend/.gitignore @@ -1,3 +1,8 @@ +**/*del +**/*bak +**/*copy* + + # Logs logs *.log diff --git a/03_source/frontend/eslint.config.mjs b/03_source/frontend/eslint.config.mjs index e90b097..e83adcc 100644 --- a/03_source/frontend/eslint.config.mjs +++ b/03_source/frontend/eslint.config.mjs @@ -92,6 +92,8 @@ const sortImportsRules = () => { }; return { + 'perfectionist/sort-named-imports': [1, { type: 'line-length', order: 'asc' }], + 'perfectionist/sort-named-exports': [1, { type: 'line-length', order: 'asc' }], 'perfectionist/sort-exports': [ 1, { @@ -100,8 +102,6 @@ const sortImportsRules = () => { groupKind: 'values-first', }, ], - 'perfectionist/sort-named-imports': [1, { type: 'line-length', order: 'asc' }], - 'perfectionist/sort-named-exports': [1, { type: 'line-length', order: 'asc' }], 'perfectionist/sort-imports': [ 2, { diff --git a/03_source/frontend/package.json b/03_source/frontend/package.json index ee5ebb8..817c36b 100644 --- a/03_source/frontend/package.json +++ b/03_source/frontend/package.json @@ -21,7 +21,7 @@ "re:build": "yarn clean && yarn install && yarn build", "re:build-npm": "npm run clean && npm install && npm run build", "tsc:dev": "yarn dev & yarn tsc:watch", - "tsc:watch": "tsc --noEmit --watch", + "tsc:w": "tsc --noEmit --watch", "tsc:print": "npx tsc --showConfig" }, "engines": { @@ -43,6 +43,7 @@ "@fontsource-variable/noto-sans-sc": "^5.2.5", "@fontsource-variable/noto-sans-tc": "^5.2.5", "@fontsource-variable/nunito-sans": "^5.2.5", + "@fontsource-variable/public-sans": "^5.2.5", "@fontsource/barlow": "^5.2.5", "@fullcalendar/core": "^6.1.15", "@fullcalendar/daygrid": "^6.1.15", @@ -52,7 +53,7 @@ "@fullcalendar/timegrid": "^6.1.15", "@fullcalendar/timeline": "^6.1.15", "@hookform/resolvers": "^4.1.3", - "@ianvs/prettier-plugin-sort-imports": "^4.4.1", + "@ianvs/prettier-plugin-sort-imports": "^4.4.2", "@iconify/react": "^5.2.0", "@mui/lab": "^7.0.0-beta.10", "@mui/material": "^7.0.1", diff --git a/03_source/frontend/prettier.config.mjs b/03_source/frontend/prettier.config.mjs index 92057ae..2cce50f 100644 --- a/03_source/frontend/prettier.config.mjs +++ b/03_source/frontend/prettier.config.mjs @@ -12,7 +12,7 @@ const config = { trailingComma: 'es5', plugins: [ // - // '@ianvs/prettier-plugin-sort-imports', + '@ianvs/prettier-plugin-sort-imports', ], }; diff --git a/03_source/frontend/src/lib/axios.ts b/03_source/frontend/src/lib/axios.ts index b291a92..4332393 100644 --- a/03_source/frontend/src/lib/axios.ts +++ b/03_source/frontend/src/lib/axios.ts @@ -54,6 +54,10 @@ export const endpoints = { list: '/api/product/list', details: '/api/product/details', search: '/api/product/search', + save: '/api/product/saveProduct', + create: '/api/product/create', + update: '/api/product/update', + delete: '/api/product/delete', }, user: { list: '/api/user/list', diff --git a/03_source/frontend/tsconfig.json b/03_source/frontend/tsconfig.json index 12cf4d8..9a45b9a 100644 --- a/03_source/frontend/tsconfig.json +++ b/03_source/frontend/tsconfig.json @@ -1,29 +1,32 @@ { "compilerOptions": { - "allowJs": true, /* Bundler */ "baseUrl": ".", - "esModuleInterop": true, - "incremental": true, - "isolatedModules": true, + "module": "ESNext", "jsx": "react-jsx", + "allowJs": true, + "resolveJsonModule": true, + /* Build */ + "target": "ES2020", "lib": [ "ES2020", "DOM", "DOM.Iterable" ], - "module": "ESNext", "moduleResolution": "bundler", - "noEmit": true, - "resolveJsonModule": true, + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", + "incremental": true, "skipLibCheck": true, + "esModuleInterop": true, + "isolatedModules": true, /* Linting */ "strict": true, - "strictNullChecks": true, - /* Build */ - "target": "ES2020", - "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo" + "noEmit": true, + "strictNullChecks": true }, + "include": [ + "src" + ], "exclude": [ "node_modules", ".next", @@ -39,12 +42,9 @@ "**/*.tmp", "**/*del" ], - "include": [ - "src" - ], "references": [ { "path": "./tsconfig.node.json" } - ] + ], } diff --git a/03_source/frontend/tsconfig.node.json b/03_source/frontend/tsconfig.node.json index af9e097..1b28ed6 100644 --- a/03_source/frontend/tsconfig.node.json +++ b/03_source/frontend/tsconfig.node.json @@ -16,8 +16,5 @@ "**/*.log", "**/*.tmp", "**/*del" - ], - "include": [ - "vite.config.ts" - ] + ], "include": ["vite.config.ts"] }