Compare commits
12 Commits
b1af1eb5e4
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
| e1a71ce248 | |||
| b0555d944b | |||
| a1e7330463 | |||
| d498a521a4 | |||
| 5faef46663 | |||
| 933f5dee24 | |||
| fb0af73a0b | |||
| a4ae624777 | |||
| 9885e4ee85 | |||
| 0d156faead | |||
| ea65e6a3dc | |||
| 67870e19ea |
Generated
+136
-30
@@ -28,6 +28,7 @@
|
||||
"@angular/cli": "^20.3.10",
|
||||
"@angular/compiler-cli": "^20.3.0",
|
||||
"less": "^4.2.0",
|
||||
"rimraf": "^6.1.3",
|
||||
"typescript": "~5.9.2"
|
||||
}
|
||||
},
|
||||
@@ -571,6 +572,7 @@
|
||||
"resolved": "https://registry.npmjs.org/@angular/common/-/common-20.3.10.tgz",
|
||||
"integrity": "sha512-12fEzvKbEqjqy1fSk9DMYlJz6dF1MJVXuC5BB+oWWJpd+2lfh4xJ62pkvvLGAICI89hfM5n9Cy5kWnXwnqPZsA==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"tslib": "^2.3.0"
|
||||
},
|
||||
@@ -587,6 +589,7 @@
|
||||
"resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-20.3.10.tgz",
|
||||
"integrity": "sha512-cW939Lr8GZjPSYfbQKIDNrUaHWmn2M+zBbERThfq5skLuY+xM60bJFv4NqBekfX6YqKLCY62ilUZlnImYIXaqA==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"tslib": "^2.3.0"
|
||||
},
|
||||
@@ -600,6 +603,7 @@
|
||||
"integrity": "sha512-9BemvpFxA26yIVdu8ROffadMkEdlk/AQQ2Jb486w7RPkrvUQ0pbEJukhv9aryJvhbMopT66S5H/j4ipOUMzmzQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@babel/core": "7.28.3",
|
||||
"@jridgewell/sourcemap-codec": "^1.4.14",
|
||||
@@ -632,6 +636,7 @@
|
||||
"resolved": "https://registry.npmjs.org/@angular/core/-/core-20.3.10.tgz",
|
||||
"integrity": "sha512-g99Qe+NOVo72OLxowVF9NjCckswWYHmvO7MgeiZTDJbTjF9tXH96dMx7AWq76/GUinV10sNzDysVW16NoAbCRQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"tslib": "^2.3.0"
|
||||
},
|
||||
@@ -657,6 +662,7 @@
|
||||
"resolved": "https://registry.npmjs.org/@angular/forms/-/forms-20.3.10.tgz",
|
||||
"integrity": "sha512-9yWr51EUauTEINB745AaHwZNTHLpXIm4uxuykxzOg+g2QskEgVfH26uS8G2ogdNuwYpB8wnsXWr34qhM3qgOWw==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"tslib": "^2.3.0"
|
||||
},
|
||||
@@ -675,6 +681,7 @@
|
||||
"resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-20.3.10.tgz",
|
||||
"integrity": "sha512-UV8CGoB5P3FmJciI3/I/n3L7C3NVgGh7bIlZ1BaB/qJDtv0Wq0rRAGwmT/Z3gwmrRtfHZWme7/CeQ2CYJmMyUQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"tslib": "^2.3.0"
|
||||
},
|
||||
@@ -697,6 +704,7 @@
|
||||
"resolved": "https://registry.npmjs.org/@angular/router/-/router-20.3.10.tgz",
|
||||
"integrity": "sha512-Z03cfH1jgQ7XMDJj4R8qAGqivcvhdG3wYBwaiN1K1ODBgPhbFKNeD4stKqYp7xBNtswmM2O2jMxrL/Djwju4Gg==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"tslib": "^2.3.0"
|
||||
},
|
||||
@@ -778,6 +786,7 @@
|
||||
"integrity": "sha512-yDBHV9kQNcr2/sUr9jghVyz9C3Y5G2zUM2H2lo+9mKv4sFgbA8s8Z9t8D1jiTkGoO/NoIfKMyKWr4s6CN23ZwQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@ampproject/remapping": "^2.2.0",
|
||||
"@babel/code-frame": "^7.27.1",
|
||||
@@ -1745,6 +1754,7 @@
|
||||
"integrity": "sha512-nqhDw2ZcAUrKNPwhjinJny903bRhI0rQhiDz1LksjeRxqa36i3l75+4iXbOy0rlDpLJGxqtgoPavQjmmyS5UJw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@inquirer/checkbox": "^4.2.1",
|
||||
"@inquirer/confirm": "^5.1.14",
|
||||
@@ -2604,6 +2614,7 @@
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-11.1.9.tgz",
|
||||
"integrity": "sha512-zDntUTReRbAThIfSp3dQZ9kKqI+LjgLp5YZN5c1bgNRDuoeLySAoZg46Bg1a+uV8TMgIRziHocglKGNzr6l+bQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"file-type": "21.1.0",
|
||||
"iterare": "1.2.1",
|
||||
@@ -4420,6 +4431,7 @@
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.13.2.tgz",
|
||||
"integrity": "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.6",
|
||||
"form-data": "^4.0.4",
|
||||
@@ -4588,6 +4600,7 @@
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"baseline-browser-mapping": "^2.8.19",
|
||||
"caniuse-lite": "^1.0.30001751",
|
||||
@@ -4787,6 +4800,7 @@
|
||||
"integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"readdirp": "^4.0.1"
|
||||
},
|
||||
@@ -5490,29 +5504,6 @@
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/encoding": {
|
||||
"version": "0.1.13",
|
||||
"resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz",
|
||||
"integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==",
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"iconv-lite": "^0.6.2"
|
||||
}
|
||||
},
|
||||
"node_modules/encoding/node_modules/iconv-lite": {
|
||||
"version": "0.6.3",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
||||
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/enhanced-resolve": {
|
||||
"version": "5.18.3",
|
||||
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.3.tgz",
|
||||
@@ -5810,6 +5801,7 @@
|
||||
"integrity": "sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"accepts": "^2.0.0",
|
||||
"body-parser": "^2.2.0",
|
||||
@@ -7071,6 +7063,7 @@
|
||||
"integrity": "sha512-j1n1IuTX1VQjIy3tT7cyGbX7nvQOsFLoIqobZv4ttI5axP923gA44zUj6miiA6R5Aoms4sEGVIIcucXUbRI14g==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"copy-anything": "^2.0.1",
|
||||
"parse-node-version": "^1.0.1",
|
||||
@@ -7358,6 +7351,7 @@
|
||||
"integrity": "sha512-SL0JY3DaxylDuo/MecFeiC+7pedM0zia33zl0vcjgwcq1q1FWWF1To9EIauPbl8GbMCU0R2e0uJ8bZunhYKD2g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"cli-truncate": "^4.0.0",
|
||||
"colorette": "^2.0.20",
|
||||
@@ -7748,10 +7742,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/minipass": {
|
||||
"version": "7.1.2",
|
||||
"resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz",
|
||||
"integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==",
|
||||
"license": "ISC",
|
||||
"version": "7.1.3",
|
||||
"resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz",
|
||||
"integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==",
|
||||
"license": "BlueOak-1.0.0",
|
||||
"engines": {
|
||||
"node": ">=16 || 14 >=14.17"
|
||||
}
|
||||
@@ -9016,7 +9010,8 @@
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.2.tgz",
|
||||
"integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==",
|
||||
"license": "Apache-2.0"
|
||||
"license": "Apache-2.0",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/require-directory": {
|
||||
"version": "2.1.1",
|
||||
@@ -9092,6 +9087,110 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/rimraf": {
|
||||
"version": "6.1.3",
|
||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.1.3.tgz",
|
||||
"integrity": "sha512-LKg+Cr2ZF61fkcaK1UdkH2yEBBKnYjTyWzTJT6KNPcSPaiT7HSdhtMXQuN5wkTX0Xu72KQ1l8S42rlmexS2hSA==",
|
||||
"dev": true,
|
||||
"license": "BlueOak-1.0.0",
|
||||
"dependencies": {
|
||||
"glob": "^13.0.3",
|
||||
"package-json-from-dist": "^1.0.1"
|
||||
},
|
||||
"bin": {
|
||||
"rimraf": "dist/esm/bin.mjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": "20 || >=22"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/rimraf/node_modules/balanced-match": {
|
||||
"version": "4.0.4",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
|
||||
"integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "18 || 20 || >=22"
|
||||
}
|
||||
},
|
||||
"node_modules/rimraf/node_modules/brace-expansion": {
|
||||
"version": "5.0.6",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz",
|
||||
"integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"balanced-match": "^4.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "18 || 20 || >=22"
|
||||
}
|
||||
},
|
||||
"node_modules/rimraf/node_modules/glob": {
|
||||
"version": "13.0.6",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz",
|
||||
"integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==",
|
||||
"dev": true,
|
||||
"license": "BlueOak-1.0.0",
|
||||
"dependencies": {
|
||||
"minimatch": "^10.2.2",
|
||||
"minipass": "^7.1.3",
|
||||
"path-scurry": "^2.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "18 || 20 || >=22"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/rimraf/node_modules/lru-cache": {
|
||||
"version": "11.5.1",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.1.tgz",
|
||||
"integrity": "sha512-RPimw/7aMdv2oqRrxKwvZXcPfwBrn/JZ2xYcY9Hus/6LaS3VOAKVWKWgNLCFSiOm1ESXinjsDlidVU7JlnCN2A==",
|
||||
"dev": true,
|
||||
"license": "BlueOak-1.0.0",
|
||||
"engines": {
|
||||
"node": "20 || >=22"
|
||||
}
|
||||
},
|
||||
"node_modules/rimraf/node_modules/minimatch": {
|
||||
"version": "10.2.5",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz",
|
||||
"integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==",
|
||||
"dev": true,
|
||||
"license": "BlueOak-1.0.0",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^5.0.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": "18 || 20 || >=22"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/rimraf/node_modules/path-scurry": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz",
|
||||
"integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==",
|
||||
"dev": true,
|
||||
"license": "BlueOak-1.0.0",
|
||||
"dependencies": {
|
||||
"lru-cache": "^11.0.0",
|
||||
"minipass": "^7.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "18 || 20 || >=22"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/rollup": {
|
||||
"version": "4.52.3",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.52.3.tgz",
|
||||
@@ -9165,6 +9264,7 @@
|
||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz",
|
||||
"integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==",
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"tslib": "^2.1.0"
|
||||
}
|
||||
@@ -9201,6 +9301,7 @@
|
||||
"integrity": "sha512-9GUyuksjw70uNpb1MTYWsH9MQHOHY6kwfnkafC24+7aOMZn9+rVMBxRbLvw756mrBFbIsFg6Xw9IkR2Fnn3k+Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"chokidar": "^4.0.0",
|
||||
"immutable": "^5.0.2",
|
||||
@@ -9950,7 +10051,8 @@
|
||||
"version": "2.8.1",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
|
||||
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
|
||||
"license": "0BSD"
|
||||
"license": "0BSD",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/tuf-js": {
|
||||
"version": "3.1.0",
|
||||
@@ -10000,6 +10102,7 @@
|
||||
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
@@ -10161,6 +10264,7 @@
|
||||
"integrity": "sha512-uzcxnSDVjAopEUjljkWh8EIrg6tlzrjFUfMcR1EVsRDGwf/ccef0qQPRyOrROwhrTDaApueq+ja+KLPlzR/zdg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"esbuild": "^0.25.0",
|
||||
"fdir": "^6.5.0",
|
||||
@@ -10549,6 +10653,7 @@
|
||||
"integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/colinhacks"
|
||||
}
|
||||
@@ -10567,7 +10672,8 @@
|
||||
"version": "0.15.1",
|
||||
"resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.15.1.tgz",
|
||||
"integrity": "sha512-XE96n56IQpJM7NAoXswY3XRLcWFW83xe0BiAOeMD7K5k5xecOeul3Qcpx6GqEeeHNkW5DWL5zOyTbEfB4eti8w==",
|
||||
"license": "MIT"
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -6,7 +6,7 @@
|
||||
"start": "ng serve",
|
||||
"build": "ng build",
|
||||
"watch": "ng build --watch --configuration development",
|
||||
"openapi": "rm -rf src/app/services/api && openapi-generator-cli generate -i http://localhost:5298/swagger/v1/swagger.json -g typescript-angular -o src/app/services/api -c openapi-generator.yaml"
|
||||
"openapi": "rimraf src/app/services/api && openapi-generator-cli generate -i http://localhost:5298/swagger/v1/swagger.json -g typescript-angular -o src/app/services/api -c openapi-generator.yaml"
|
||||
},
|
||||
"prettier": {
|
||||
"printWidth": 100,
|
||||
@@ -42,6 +42,7 @@
|
||||
"@angular/cli": "^20.3.10",
|
||||
"@angular/compiler-cli": "^20.3.0",
|
||||
"less": "^4.2.0",
|
||||
"rimraf": "^6.1.3",
|
||||
"typescript": "~5.9.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import { registerLocaleData } from '@angular/common';
|
||||
import fr from '@angular/common/locales/fr';
|
||||
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
|
||||
import { provideHttpClient } from '@angular/common/http';
|
||||
import {NzModalService} from 'ng-zorro-antd/modal';
|
||||
|
||||
registerLocaleData(fr);
|
||||
|
||||
@@ -14,6 +15,7 @@ export const appConfig: ApplicationConfig = {
|
||||
providers: [
|
||||
provideBrowserGlobalErrorListeners(),
|
||||
provideZoneChangeDetection({ eventCoalescing: true }),
|
||||
provideRouter(routes), provideNzI18n(fr_FR), provideAnimationsAsync(), provideHttpClient()
|
||||
provideRouter(routes), provideNzI18n(fr_FR), provideAnimationsAsync(), provideHttpClient(),
|
||||
NzModalService
|
||||
]
|
||||
};
|
||||
|
||||
@@ -1 +1,61 @@
|
||||
<p>contact-add-form works!</p>
|
||||
<form nz-form nzLayout="horizontal" [formGroup]="contactForm">
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired>Nom</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis">
|
||||
<input nz-input placeholder="Nom" formControlName="lastName">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired>Prénom</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis">
|
||||
<input nz-input placeholder="Prénom" formControlName="firstName">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired>Email</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis">
|
||||
<input nz-input placeholder="Email" formControlName="email">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired>Téléphone</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis">
|
||||
<input nz-input placeholder="Téléphone" formControlName="phoneNumber">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired>Adresse</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis">
|
||||
<input nz-input placeholder="Adresse" formControlName="address">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired>Code postal</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis">
|
||||
<input nz-input type="number" placeholder="Code postal" formControlName="zipCode">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired>Ville</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis">
|
||||
<input nz-input placeholder="Ville" formControlName="city">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired>Rôle</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis">
|
||||
<input nz-input placeholder="Rôle" formControlName="role">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-flex nzJustify="end">
|
||||
<button nz-button nzType="primary" (click)="submitForm()">Valider</button>
|
||||
</nz-flex>
|
||||
</form>
|
||||
@@ -1,11 +1,89 @@
|
||||
import { Component } from '@angular/core';
|
||||
import {Component, inject, signal} from '@angular/core';
|
||||
import {NzFormControlComponent, NzFormDirective, NzFormItemComponent, NzFormLabelComponent} from "ng-zorro-antd/form";
|
||||
import {NzInputDirective} from "ng-zorro-antd/input";
|
||||
import {FormControl, FormGroup, ReactiveFormsModule, Validators} from "@angular/forms";
|
||||
import {NzColDirective} from "ng-zorro-antd/grid";
|
||||
import {NzFlexDirective} from "ng-zorro-antd/flex";
|
||||
import {ContactsService, CreateContactDto} from "../../../services/api";
|
||||
import {NzNotificationService} from "ng-zorro-antd/notification";
|
||||
import {firstValueFrom} from "rxjs";
|
||||
import {NzButtonComponent} from "ng-zorro-antd/button";
|
||||
|
||||
@Component({
|
||||
selector: 'app-contact-add-form',
|
||||
imports: [],
|
||||
imports: [
|
||||
NzFormLabelComponent,
|
||||
NzFormItemComponent,
|
||||
NzFormControlComponent,
|
||||
NzInputDirective,
|
||||
ReactiveFormsModule,
|
||||
NzColDirective,
|
||||
NzFormDirective,
|
||||
NzFlexDirective,
|
||||
NzButtonComponent
|
||||
],
|
||||
templateUrl: './contact-add-form.html',
|
||||
styleUrl: './contact-add-form.css',
|
||||
})
|
||||
export class ContactAddForm {
|
||||
private contactsService = inject(ContactsService);
|
||||
private notificationService = inject(NzNotificationService);
|
||||
|
||||
contactForm = new FormGroup({
|
||||
lastName: new FormControl<string>(null, [Validators.required]),
|
||||
firstName: new FormControl<string>(null, [Validators.required]),
|
||||
phoneNumber: new FormControl<string>(null, [Validators.required]),
|
||||
email: new FormControl<string>(null, [Validators.required]),
|
||||
address: new FormControl<string>(null, [Validators.required]),
|
||||
city: new FormControl<string>(null, [Validators.required]),
|
||||
role: new FormControl<string>(null, [Validators.required]),
|
||||
customerId: new FormControl<number>(null),
|
||||
})
|
||||
|
||||
contactPost = signal<CreateContactDto>(this.contactForm.value);
|
||||
contactsLoading = signal<boolean>(false);
|
||||
|
||||
async submitForm() {
|
||||
if (this.contactForm.invalid) return;
|
||||
|
||||
console.log(this.contactForm.getRawValue())
|
||||
this.contactPost.set(this.contactForm.getRawValue())
|
||||
|
||||
await this.createContact(
|
||||
this.contactPost().lastName,
|
||||
this.contactPost().firstName,
|
||||
this.contactPost().phoneNumber,
|
||||
this.contactPost().email,
|
||||
this.contactPost().address,
|
||||
this.contactPost().city,
|
||||
this.contactPost().role,
|
||||
this.contactPost().customerId
|
||||
)
|
||||
this.contactForm.reset()
|
||||
}
|
||||
|
||||
async createContact(lastName: string, firstName: string, phoneNumber: string, email: string, address: string, city: string, role: string, customerId: number) {
|
||||
this.contactsLoading.set(true);
|
||||
|
||||
const contactValue: CreateContactDto = {
|
||||
lastName: lastName,
|
||||
firstName: firstName,
|
||||
phoneNumber: phoneNumber,
|
||||
email: email,
|
||||
address: address,
|
||||
city: city,
|
||||
role: role,
|
||||
customerId: customerId
|
||||
}
|
||||
|
||||
try {
|
||||
const contact = await firstValueFrom(this.contactsService.createContactEndpoint(contactValue));
|
||||
this.contactPost.set(contact);
|
||||
console.log(contact);
|
||||
} catch (e) {
|
||||
this.notificationService.error('Erreur', 'Erreur de communication avec l\'API');
|
||||
}
|
||||
|
||||
this.contactsLoading.set(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
@if (edit() == false) {
|
||||
<nz-card style="width:400px;" [nzActions]="[edit, delete]">
|
||||
<h2 style="text-align: center; font-weight: bold">Contact n°{{ contact().id }}</h2>
|
||||
<p>Nom : {{ contact().lastName + " " + contact().firstName }}</p>
|
||||
<p>Rôle : {{ contact().role }}</p>
|
||||
<p>Numéro de téléphone : {{ contact().phoneNumber }} </p>
|
||||
<p>Email : {{ contact().email }}</p>
|
||||
<p>Adresse : {{ contact().address + ", " + contact().city }}</p>
|
||||
|
||||
</nz-card>
|
||||
<ng-template #edit>
|
||||
<nz-icon (click)="Edit()" nzType="edit" nzTheme="fill" />
|
||||
</ng-template>
|
||||
<ng-template #delete>
|
||||
<nz-icon (click)="Delete()" nzType="delete" nzTheme="fill" />
|
||||
</ng-template>
|
||||
} @else {
|
||||
<nz-card style="width:400px;" [nzActions]="[back, check]">
|
||||
<form nz-form nzLayout="horizontal" [formGroup]="contactForm">
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired> Nom </nz-form-label>
|
||||
<nz-form-control nzSpan="22" nzErrorTip="Ce champ est requis !">
|
||||
<input nz-input placeholder="Nom" formControlName="lastname">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired> Prénom </nz-form-label>
|
||||
<nz-form-control nzSpan="22" nzErrorTip="Ce champ est requis !">
|
||||
<input nz-input placeholder="Prénom" formControlName="firstname">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired> Num. Tél. </nz-form-label>
|
||||
<nz-form-control nzSpan="22" nzErrorTip="Ce champ est requis !">
|
||||
<input nz-input placeholder="Numéro de téléphone" formControlName="phone">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired> Email </nz-form-label>
|
||||
<nz-form-control nzSpan="22" nzErrorTip="Ce champ est requis !">
|
||||
<input nz-input placeholder="Email" formControlName="email">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired> Adresse </nz-form-label>
|
||||
<nz-form-control nzSpan="22" nzErrorTip="Ce champ est requis !">
|
||||
<input nz-input placeholder="Adresse" formControlName="address">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired> Ville </nz-form-label>
|
||||
<nz-form-control nzSpan="22" nzErrorTip="Ce champ est requis !">
|
||||
<input nz-input placeholder="Ville" formControlName="city">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired> Rôle </nz-form-label>
|
||||
<nz-form-control nzSpan="22" nzErrorTip="Ce champ est requis !">
|
||||
<input nz-input placeholder="Rôle" formControlName="role">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</form>
|
||||
</nz-card>
|
||||
<ng-template #back>
|
||||
<nz-icon (click)="Back()" nzType="backward" nzTheme="fill" />
|
||||
</ng-template>
|
||||
<ng-template #check>
|
||||
<nz-icon (click)="submitForm()" nzType="check" nzTheme="outline" />
|
||||
</ng-template>
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
import {Component, inject, input, output, signal} from '@angular/core';
|
||||
import {
|
||||
ContactsService,
|
||||
CustomersService, GetContactDto,
|
||||
GetCustomerDto,
|
||||
UpdateContactDto,
|
||||
UpdateCustomerDto
|
||||
} from "../../../services/api";
|
||||
import {NzNotificationService} from "ng-zorro-antd/notification";
|
||||
import {FormControl, FormGroup, ReactiveFormsModule, Validators} from "@angular/forms";
|
||||
import {firstValueFrom} from "rxjs";
|
||||
import {NzCardComponent} from "ng-zorro-antd/card";
|
||||
import {NzColDirective, NzRowDirective} from "ng-zorro-antd/grid";
|
||||
import {NzFormControlComponent, NzFormDirective, NzFormItemComponent, NzFormLabelComponent} from "ng-zorro-antd/form";
|
||||
import {NzIconDirective} from "ng-zorro-antd/icon";
|
||||
import {NzInputDirective} from "ng-zorro-antd/input";
|
||||
|
||||
@Component({
|
||||
selector: 'app-contact-card',
|
||||
imports: [NzCardComponent, NzColDirective, NzFormControlComponent, NzFormDirective, NzFormItemComponent, NzFormLabelComponent, NzIconDirective, NzInputDirective, NzRowDirective, ReactiveFormsModule],
|
||||
templateUrl: './contact-card.html',
|
||||
styleUrl: './contact-card.css',
|
||||
})
|
||||
export class ContactCard {
|
||||
private contactsService = inject(ContactsService);
|
||||
private notificationService = inject(NzNotificationService)
|
||||
|
||||
contactEdit = signal<UpdateContactDto>(null);
|
||||
contactsLoading = signal<boolean>(false);
|
||||
|
||||
contactForm = new FormGroup({
|
||||
id: new FormControl(null, [Validators.required]),
|
||||
lastname: new FormControl<string>(null, [Validators.required]),
|
||||
firstname: new FormControl(null, [Validators.required]),
|
||||
phone: new FormControl(null, [Validators.required]),
|
||||
email: new FormControl(null, [Validators.required]),
|
||||
address: new FormControl(null, [Validators.required]),
|
||||
city: new FormControl(null, [Validators.required]),
|
||||
role: new FormControl(null, [Validators.required])
|
||||
})
|
||||
|
||||
async submitForm() {
|
||||
this.contactsLoading.set(true);
|
||||
|
||||
const contactValue = {
|
||||
lastname: this.contactForm.value.lastname,
|
||||
firstname: this.contactForm.value.firstname,
|
||||
phone: this.contactForm.value.phone,
|
||||
email: this.contactForm.value.email,
|
||||
address: this.contactForm.value.address,
|
||||
city: this.contactForm.value.city,
|
||||
role: this.contactForm.value.role,
|
||||
}
|
||||
|
||||
try {
|
||||
const contact = await firstValueFrom(this.contactsService.updateContactEndpoint(this.contact().id,contactValue));
|
||||
this.contactEdit.set(contact);
|
||||
console.log(contact);
|
||||
this.contactForm.reset();
|
||||
this.edit.set(false);
|
||||
|
||||
this.triggerEdited.emit();
|
||||
|
||||
} catch (e)
|
||||
{
|
||||
this.notificationService.error('Erreur', ' (ou Erreur de communication avec l\'API)');
|
||||
}
|
||||
|
||||
this.contactsLoading.set(false);
|
||||
|
||||
}
|
||||
|
||||
|
||||
contact = input<GetContactDto>(null);
|
||||
|
||||
edit = signal(false)
|
||||
|
||||
triggerEdited = output<void>();
|
||||
|
||||
protected Edit() {
|
||||
this.edit.set(true)
|
||||
}
|
||||
|
||||
protected Back() {
|
||||
this.edit.set(false)
|
||||
this.contactForm.reset();
|
||||
}
|
||||
|
||||
async Delete() {
|
||||
this.contactsLoading.set(true);
|
||||
|
||||
try {
|
||||
const contact = await firstValueFrom(this.contactsService.deleteContactEndpoint(this.contact().id));
|
||||
this.contactEdit.set(contact);
|
||||
|
||||
this.contactForm.reset();
|
||||
this.triggerEdited.emit();
|
||||
|
||||
} catch (e)
|
||||
{
|
||||
this.notificationService.error('Erreur de recherche', "Le contact n\'existe pas !");
|
||||
|
||||
this.notificationService.error('Erreur', ' (ou Erreur de communication avec l\'API)');
|
||||
}
|
||||
|
||||
this.contactsLoading.set(false);
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
<p>contact-get-all-form works!</p>
|
||||
@@ -1,11 +0,0 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-contact-get-all-form',
|
||||
imports: [],
|
||||
templateUrl: './contact-get-all-form.html',
|
||||
styleUrl: './contact-get-all-form.css',
|
||||
})
|
||||
export class ContactGetAllForm {
|
||||
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
<p>contact-get-all works!</p>
|
||||
@@ -1,11 +0,0 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-contact-get-all',
|
||||
imports: [],
|
||||
templateUrl: './contact-get-all.html',
|
||||
styleUrl: './contact-get-all.css',
|
||||
})
|
||||
export class ContactGetAll {
|
||||
|
||||
}
|
||||
@@ -1 +1,11 @@
|
||||
<p>contact works!</p>
|
||||
<app-create-contact-modal (triggerCreated)="fetchCustomers()" />
|
||||
|
||||
<div class="card">
|
||||
<div nz-row [nzGutter]="10" style="gap: 30px">
|
||||
@for (contact of contacts(); track contact.id)
|
||||
{
|
||||
<!-- Passage de la donnée du parent vers l'enfant + signal à émettre -->
|
||||
<app-contact-card [contact]="contact" (triggerEdited)="fetchCustomers()" />
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,11 +1,46 @@
|
||||
import { Component } from '@angular/core';
|
||||
import {Component, inject, signal} from '@angular/core';
|
||||
import {ContactsService, GetContactDto} from "../../services/api";
|
||||
import {NzNotificationService} from "ng-zorro-antd/notification";
|
||||
import {Router} from "@angular/router";
|
||||
import {firstValueFrom} from "rxjs";
|
||||
import {CustomersCardForm} from "../customers/create-customers-modal/customers-card-form";
|
||||
import {GetAllCustomersCard} from "../customers/customers-card/get-all-customers-card";
|
||||
import {NzRowDirective} from "ng-zorro-antd/grid";
|
||||
import {CreateContactModal} from "./create-contact-modal/create-contact-modal";
|
||||
import {ContactCard} from "./contact-card/contact-card";
|
||||
|
||||
@Component({
|
||||
selector: 'app-contact',
|
||||
imports: [],
|
||||
imports: [
|
||||
NzRowDirective,
|
||||
CreateContactModal,
|
||||
ContactCard
|
||||
],
|
||||
templateUrl: './contact.html',
|
||||
styleUrl: './contact.css',
|
||||
})
|
||||
export class Contact {
|
||||
private contactsService = inject(ContactsService);
|
||||
private notificationService = inject(NzNotificationService)
|
||||
|
||||
router = inject(Router);
|
||||
|
||||
contacts = signal<GetContactDto[]>([]);
|
||||
contactsLoading = signal<boolean>(false);
|
||||
|
||||
async ngOnInit() {
|
||||
await this.fetchCustomers();
|
||||
}
|
||||
|
||||
async fetchCustomers() {
|
||||
this.contactsLoading.set(true);
|
||||
try {
|
||||
const contacts = await firstValueFrom(this.contactsService.getAllContactEndpoint())
|
||||
this.contacts.set(contacts)
|
||||
} catch (e) {
|
||||
this.notificationService.error('Erreur', 'Erreur de communication avec l\'API');
|
||||
}
|
||||
|
||||
this.contactsLoading.set(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<p>create-contact-modal works!</p>
|
||||
@@ -0,0 +1,63 @@
|
||||
import {Component, output} from '@angular/core';
|
||||
import {ContactAddForm} from "../contact-add-form/contact-add-form";
|
||||
import {NzMessageService} from "ng-zorro-antd/message";
|
||||
import {NzButtonComponent} from "ng-zorro-antd/button";
|
||||
import {NzModalComponent} from "ng-zorro-antd/modal";
|
||||
|
||||
@Component({
|
||||
selector: 'app-create-contact-modal',
|
||||
imports: [
|
||||
ContactAddForm,
|
||||
NzButtonComponent,
|
||||
NzModalComponent
|
||||
],
|
||||
template: `
|
||||
<button nz-button nzType="primary" (click)="showModal()">
|
||||
<span style="font-weight: bold">+</span>
|
||||
</button>
|
||||
<nz-modal
|
||||
[(nzVisible)]="isVisible"
|
||||
[nzTitle]="modalTitle"
|
||||
[nzContent]="modalContent"
|
||||
[nzFooter]="modalFooter"
|
||||
(nzOnCancel)="handleCancel()">
|
||||
<ng-template #modalTitle style="text-align: center">Création de contacts</ng-template>
|
||||
|
||||
<ng-template #modalContent>
|
||||
<app-contact-add-form/>
|
||||
</ng-template>
|
||||
|
||||
<ng-template #modalFooter>
|
||||
<button nz-button nzType="default" (click)="handleCancel()">Annuler</button>
|
||||
<button nz-button nzType="primary" (click)="handleOk()" [nzLoading]="isConfirmLoading">Confirmer</button>
|
||||
</ng-template>
|
||||
</nz-modal>
|
||||
`,
|
||||
styleUrl: './create-contact-modal.css',
|
||||
})
|
||||
export class CreateContactModal {
|
||||
constructor(private message: NzMessageService) {}
|
||||
isVisible = false;
|
||||
isConfirmLoading = false;
|
||||
|
||||
showModal(): void {
|
||||
this.isVisible = true;
|
||||
}
|
||||
|
||||
handleOk(): void {
|
||||
this.isConfirmLoading = true;
|
||||
this.message.success('Client créé !');
|
||||
setTimeout(() => {
|
||||
this.isVisible = false;
|
||||
this.isConfirmLoading = false;
|
||||
}, 300);
|
||||
this.triggerCreated.emit();
|
||||
}
|
||||
|
||||
handleCancel(): void {
|
||||
this.isVisible = false;
|
||||
this.message.info('Création annulée');
|
||||
}
|
||||
|
||||
triggerCreated = output<void>()
|
||||
}
|
||||
@@ -2,7 +2,6 @@ import {Component, output} from '@angular/core';
|
||||
import {NzMessageService} from "ng-zorro-antd/message";
|
||||
import {NzButtonModule} from "ng-zorro-antd/button";
|
||||
import {NzModalModule} from "ng-zorro-antd/modal";
|
||||
import {ProvidersAddForm} from "../../providers/providers-add-form/providers-add-form";
|
||||
import {CustomersAddForm} from "../customers-add-form/customers-add-form";
|
||||
|
||||
@Component({
|
||||
@@ -17,8 +16,7 @@ import {CustomersAddForm} from "../customers-add-form/customers-add-form";
|
||||
[nzTitle]="modalTitle"
|
||||
[nzContent]="modalContent"
|
||||
[nzFooter]="modalFooter"
|
||||
(nzOnCancel)="handleCancel()"
|
||||
>
|
||||
(nzOnCancel)="handleCancel()">
|
||||
<ng-template #modalTitle style="text-align: center">Création de clients</ng-template>
|
||||
|
||||
<ng-template #modalContent>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
@if (edit() == false) {
|
||||
<nz-card style="width:400px;" [nzActions]="[edit, delete]">
|
||||
<h2 style="text-align: center; font-weight: bold">Client n°{{ customer().id }}</h2>
|
||||
<p>Nom : {{ customer().note }}</p>
|
||||
<p>Note : {{ customer().note }}</p>
|
||||
<p> Type de client : {{ customer().customerType}}</p>
|
||||
</nz-card>
|
||||
<ng-template #edit>
|
||||
<nz-icon (click)="Edit()" nzType="edit" nzTheme="fill" />
|
||||
@@ -13,7 +14,7 @@
|
||||
<nz-card style="width:400px;" [nzActions]="[back, check]">
|
||||
<form nz-form nzLayout="horizontal" [formGroup]="customerForm">
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired> Nom </nz-form-label>
|
||||
<nz-form-label nzSpan="5" nzRequired> Note </nz-form-label>
|
||||
<nz-form-control nzSpan="22" nzErrorTip="Ce champ est requis !">
|
||||
<input nz-input placeholder="Nom" formControlName="note">
|
||||
</nz-form-control>
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<p>create-opportunity-modal works!</p>
|
||||
+29
-23
@@ -1,14 +1,17 @@
|
||||
import { Component } from '@angular/core';
|
||||
import {Component, output} from '@angular/core';
|
||||
import {OpportunityAddForm} from "../opportunity-add-form/opportunity-add-form";
|
||||
import {NzMessageService} from "ng-zorro-antd/message";
|
||||
import {StaffAddForm} from "../staff-add-form/staff-add-form";
|
||||
import {NzButtonModule} from "ng-zorro-antd/button";
|
||||
import {NzModalModule} from "ng-zorro-antd/modal";
|
||||
import {ProvidersAddForm} from "../../providers/providers-add-form/providers-add-form";
|
||||
import {NzButtonComponent} from "ng-zorro-antd/button";
|
||||
import {NzModalComponent} from "ng-zorro-antd/modal";
|
||||
|
||||
@Component({
|
||||
selector: 'app-staff-card-form',
|
||||
imports: [NzButtonModule, NzModalModule, StaffAddForm],
|
||||
template: `
|
||||
selector: 'app-create-opportunity-modal',
|
||||
imports: [
|
||||
OpportunityAddForm,
|
||||
NzButtonComponent,
|
||||
NzModalComponent
|
||||
],
|
||||
template: `
|
||||
<button nz-button nzType="primary" (click)="showModal()">
|
||||
<span style="font-weight: bold">+</span>
|
||||
</button>
|
||||
@@ -17,12 +20,11 @@ import {ProvidersAddForm} from "../../providers/providers-add-form/providers-add
|
||||
[nzTitle]="modalTitle"
|
||||
[nzContent]="modalContent"
|
||||
[nzFooter]="modalFooter"
|
||||
(nzOnCancel)="handleCancel()"
|
||||
>
|
||||
<ng-template #modalTitle style="text-align: center">Création de artificiers</ng-template>
|
||||
(nzOnCancel)="handleCancel()">
|
||||
<ng-template #modalTitle style="text-align: center">Création d'opportunités</ng-template>
|
||||
|
||||
<ng-template #modalContent>
|
||||
<app-staff-add-form/>
|
||||
<app-opportunity-add-form/>
|
||||
</ng-template>
|
||||
|
||||
<ng-template #modalFooter>
|
||||
@@ -31,27 +33,31 @@ import {ProvidersAddForm} from "../../providers/providers-add-form/providers-add
|
||||
</ng-template>
|
||||
</nz-modal>
|
||||
`,
|
||||
styleUrl: './staff-card-form.css',
|
||||
styleUrl: './create-opportunity-modal.css',
|
||||
})
|
||||
export class StaffCardForm {
|
||||
export class CreateOpportunityModal {
|
||||
constructor(private message: NzMessageService) {}
|
||||
isVisible = false;
|
||||
isConfirmLoading = false;
|
||||
|
||||
showModal(): void {
|
||||
this.isVisible = true;
|
||||
this.isVisible = true;
|
||||
}
|
||||
|
||||
handleOk(): void {
|
||||
this.isConfirmLoading = true;
|
||||
this.message.success('Prestataire créé !');
|
||||
setTimeout(() => {
|
||||
this.isVisible = false;
|
||||
this.isConfirmLoading = false;
|
||||
}, 1000);
|
||||
this.isConfirmLoading = true;
|
||||
this.message.success('Opportunité créé !');
|
||||
setTimeout(() => {
|
||||
this.isVisible = false;
|
||||
this.isConfirmLoading = false;
|
||||
}, 300);
|
||||
this.triggerCreated.emit();
|
||||
}
|
||||
|
||||
handleCancel(): void {
|
||||
this.isVisible = false;
|
||||
this.isVisible = false;
|
||||
this.message.info('Création annulée');
|
||||
}
|
||||
}
|
||||
|
||||
triggerCreated = output<void>()
|
||||
}
|
||||
@@ -1 +1,57 @@
|
||||
<p>opportunities works!</p>
|
||||
<app-create-opportunity-modal (triggerCreated)="fetchCommunications()" />
|
||||
|
||||
<nz-divider></nz-divider>
|
||||
|
||||
<nz-card style="margin-bottom: 16px">
|
||||
<div nz-row [nzGutter]="16" style="text-align: center">
|
||||
<div nz-col [nzSpan]="8">
|
||||
<h3>📞 Appels</h3>
|
||||
<p style="font-size: 24px; font-weight: bold">{{ totalCalls }}</p>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="8">
|
||||
<h3>✉️ Emails</h3>
|
||||
<p style="font-size: 24px; font-weight: bold">{{ totalEmails }}</p>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="8">
|
||||
<h3>🤝 Réunions</h3>
|
||||
<p style="font-size: 24px; font-weight: bold">{{ totalMeetings }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<nz-divider></nz-divider>
|
||||
|
||||
<div nz-row [nzGutter]="16">
|
||||
<div nz-col [nzSpan]="8">
|
||||
<nz-card nzTitle="Appels ({{ totalCalls }})">
|
||||
@for (communication of communications(); track communication.id) {
|
||||
@if (communication.calling) {
|
||||
<app-opportunity-card [communication]="communication" (triggerEdited)="fetchCommunications()" />
|
||||
<nz-divider></nz-divider>
|
||||
}
|
||||
}
|
||||
</nz-card>
|
||||
</div>
|
||||
|
||||
<div nz-col [nzSpan]="8">
|
||||
<nz-card nzTitle="Emails ({{ totalEmails }})">
|
||||
@for (communication of communications(); track communication.id) {
|
||||
@if (communication.email) {
|
||||
<app-opportunity-card [communication]="communication" (triggerEdited)="fetchCommunications()" />
|
||||
<nz-divider></nz-divider>
|
||||
}
|
||||
}
|
||||
</nz-card>
|
||||
</div>
|
||||
|
||||
<div nz-col [nzSpan]="8">
|
||||
<nz-card nzTitle="Réunions ({{ totalMeetings }})">
|
||||
@for (communication of communications(); track communication.id) {
|
||||
@if (communication.meeting) {
|
||||
<app-opportunity-card [communication]="communication" (triggerEdited)="fetchCommunications()" />
|
||||
<nz-divider></nz-divider>
|
||||
}
|
||||
}
|
||||
</nz-card>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,11 +1,54 @@
|
||||
import { Component } from '@angular/core';
|
||||
import {Component, inject, signal} from '@angular/core';
|
||||
import {CreateOpportunityModal} from "./create-opportunity-modal/create-opportunity-modal";
|
||||
import {NzNotificationService} from "ng-zorro-antd/notification";
|
||||
import {Router} from "@angular/router";
|
||||
import {firstValueFrom} from "rxjs";
|
||||
import {NzCardComponent} from "ng-zorro-antd/card";
|
||||
import {NzDividerComponent} from "ng-zorro-antd/divider";
|
||||
import {NzColDirective, NzRowDirective} from "ng-zorro-antd/grid";
|
||||
import {OpportunityCard} from "./opportunity-card/opportunity-card";
|
||||
import {CommunicationsService, GetCommunicationDto} from "../../services/api";
|
||||
|
||||
@Component({
|
||||
selector: 'app-opportunities',
|
||||
imports: [],
|
||||
imports: [CreateOpportunityModal, NzCardComponent, NzDividerComponent, NzRowDirective, NzColDirective, OpportunityCard],
|
||||
templateUrl: './opportunities.html',
|
||||
styleUrl: './opportunities.css',
|
||||
})
|
||||
export class Opportunities {
|
||||
private communicationsService = inject(CommunicationsService);
|
||||
private notificationService = inject(NzNotificationService)
|
||||
|
||||
router = inject(Router);
|
||||
|
||||
communications = signal<GetCommunicationDto[]>([]);
|
||||
communicationsLoading = signal<boolean>(false);
|
||||
|
||||
async ngOnInit() {
|
||||
await this.fetchCommunications();
|
||||
}
|
||||
|
||||
get totalCalls() {
|
||||
return this.communications().filter(c => c.calling).length;
|
||||
}
|
||||
|
||||
get totalEmails() {
|
||||
return this.communications().filter(c => c.email).length;
|
||||
}
|
||||
|
||||
get totalMeetings() {
|
||||
return this.communications().filter(c => c.meeting).length;
|
||||
}
|
||||
|
||||
async fetchCommunications() {
|
||||
this.communicationsLoading.set(true);
|
||||
try {
|
||||
const communications = await firstValueFrom(this.communicationsService.getAllCommunicationsEndpoint())
|
||||
this.communications.set(communications)
|
||||
} catch (e) {
|
||||
this.notificationService.error('Erreur', 'Erreur de communication avec l\'API');
|
||||
}
|
||||
|
||||
this.communicationsLoading.set(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
<form nz-form nzLayout="horizontal" [formGroup]="communicationForm">
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired>Appel</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis">
|
||||
<input nz-input placeholder="Appel" formControlName="calling">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired>Email</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis">
|
||||
<input nz-input placeholder="Email" formControlName="email">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired>Réunion</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis">
|
||||
<input nz-input placeholder="Réunion" formControlName="meeting">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired>Contact</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis">
|
||||
<nz-select placeholder="Sélectionner un contact" formControlName="contactId">
|
||||
@for (contact of contacts(); track contact.id) {
|
||||
<nz-option [nzValue]="contact.id" nzLabel="{{ contact.firstName }} {{ contact.lastName }}"></nz-option>
|
||||
}
|
||||
</nz-select>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-flex nzJustify="end">
|
||||
<button nz-button nzType="primary" (click)="submitForm()">Valider</button>
|
||||
</nz-flex>
|
||||
</form>
|
||||
@@ -0,0 +1,105 @@
|
||||
import {Component, inject, signal} from '@angular/core';
|
||||
import {NzButtonComponent} from "ng-zorro-antd/button";
|
||||
import {NzColDirective, NzRowDirective} from "ng-zorro-antd/grid";
|
||||
import {NzFlexDirective} from "ng-zorro-antd/flex";
|
||||
import {NzFormControlComponent, NzFormDirective, NzFormItemComponent, NzFormLabelComponent} from "ng-zorro-antd/form";
|
||||
import {NzInputDirective} from "ng-zorro-antd/input";
|
||||
import {FormControl, FormGroup, ReactiveFormsModule, Validators} from "@angular/forms";
|
||||
import {CommunicationsService, ContactsService, CreateCommunicationDto, GetContactDto} from "../../../services/api";
|
||||
import {NzNotificationService} from "ng-zorro-antd/notification";
|
||||
import {firstValueFrom} from "rxjs";
|
||||
import {NzOptionComponent, NzSelectComponent} from "ng-zorro-antd/select";
|
||||
|
||||
@Component({
|
||||
selector: 'app-opportunity-add-form',
|
||||
imports: [
|
||||
NzButtonComponent,
|
||||
NzColDirective,
|
||||
NzFlexDirective,
|
||||
NzFormControlComponent,
|
||||
NzFormDirective,
|
||||
NzFormItemComponent,
|
||||
NzFormLabelComponent,
|
||||
NzInputDirective,
|
||||
NzRowDirective,
|
||||
ReactiveFormsModule,
|
||||
NzSelectComponent,
|
||||
NzOptionComponent
|
||||
],
|
||||
templateUrl: './opportunity-add-form.html',
|
||||
styleUrl: './opportunity-add-form.css',
|
||||
})
|
||||
export class OpportunityAddForm {
|
||||
|
||||
private communicationsService = inject(CommunicationsService);
|
||||
private notificationService = inject(NzNotificationService)
|
||||
private contactsService = inject(ContactsService);
|
||||
|
||||
|
||||
communicationForm = new FormGroup({
|
||||
calling: new FormControl<string>(null),
|
||||
email: new FormControl<string>(null),
|
||||
meeting: new FormControl<string>(null),
|
||||
contactId: new FormControl<number>(null, [Validators.required]),
|
||||
}, { validators: atLeastOneRequired })
|
||||
|
||||
communicationPost = signal<CreateCommunicationDto>(this.communicationForm.value);
|
||||
communicationsLoading = signal<boolean>(false);
|
||||
|
||||
async submitForm() {
|
||||
if (this.communicationForm.invalid) return;
|
||||
|
||||
const raw = this.communicationForm.getRawValue();
|
||||
console.log('contactId:', raw.contactId, 'type:', typeof raw.contactId);
|
||||
|
||||
console.log(this.communicationForm.getRawValue())
|
||||
this.communicationPost.set(this.communicationForm.getRawValue())
|
||||
|
||||
await this.createCommunication(this.communicationPost().calling, this.communicationPost().email, this.communicationPost().meeting, this.communicationPost().contactId)
|
||||
this.communicationForm.reset()
|
||||
}
|
||||
|
||||
async createCommunication(calling: string, email: string, meeting: string, contactId: number) {
|
||||
this.communicationsLoading.set(true);
|
||||
|
||||
const communicationValue: CreateCommunicationDto = {
|
||||
calling: calling,
|
||||
email: email,
|
||||
meeting: meeting,
|
||||
contactId: Number(contactId)
|
||||
}
|
||||
|
||||
try {
|
||||
const communication = await firstValueFrom(this.communicationsService.createCommunicationEndpoint(communicationValue));
|
||||
this.communicationPost.set(communication);
|
||||
console.log(communication);
|
||||
} catch (e) {
|
||||
this.notificationService.error('Erreur', 'Erreur de communication avec l\'API');
|
||||
}
|
||||
|
||||
this.communicationsLoading.set(false);
|
||||
}
|
||||
|
||||
contacts = signal<GetContactDto[]>([]);
|
||||
|
||||
async ngOnInit() {
|
||||
await this.fetchContacts();
|
||||
}
|
||||
|
||||
async fetchContacts() {
|
||||
try {
|
||||
const contacts = await firstValueFrom(this.contactsService.getAllContactEndpoint());
|
||||
this.contacts.set(contacts);
|
||||
} catch (e) {
|
||||
this.notificationService.error('Erreur', 'Erreur de communication avec l\'API');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function atLeastOneRequired(group: FormGroup) {
|
||||
const { calling, email, meeting } = group.controls;
|
||||
const valid = [calling, email, meeting].some(c => c.value);
|
||||
return valid ? null : { atLeastOneRequired: true };
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
@if (edit() == false) {
|
||||
<nz-card style="width:400px;" [nzActions]="[edit, delete]">
|
||||
<h2 style="text-align: center; font-weight: bold">Contact n°{{ communication().contactId }}</h2>
|
||||
@if (communication().calling) {
|
||||
<p>📞 Appel : {{ communication().calling }}</p>
|
||||
<p> Nom du Contact : {{ communication().contactLastName + " " + communication().contactFirstName}}</p>
|
||||
<p> Numéro du Contact : {{ communication().contactPhoneNumber }}</p>
|
||||
<p> Email du Contact : {{ communication().contactEmail }}</p>
|
||||
}
|
||||
@if (communication().email) {
|
||||
<p>✉️ Email : {{ communication().email }}</p>
|
||||
<p> Nom du Contact : {{ communication().contactLastName + " " + communication().contactFirstName}}</p>
|
||||
<p> Numéro du Contact : {{ communication().contactPhoneNumber }}</p>
|
||||
<p> Email du Contact : {{ communication().contactEmail }}</p>
|
||||
}
|
||||
@if (communication().meeting) {
|
||||
<p>🤝 Réunion : {{ communication().meeting }}</p>
|
||||
<p> Nom du Contact : {{ communication().contactLastName + " " + communication().contactFirstName}}</p>
|
||||
<p> Numéro du Contact : {{ communication().contactPhoneNumber }}</p>
|
||||
<p> Email du Contact : {{ communication().contactEmail }}</p>
|
||||
}
|
||||
</nz-card>
|
||||
<ng-template #edit>
|
||||
<nz-icon (click)="Edit()" nzType="edit" nzTheme="fill" />
|
||||
</ng-template>
|
||||
<ng-template #delete>
|
||||
<nz-icon (click)="Delete()" nzType="delete" nzTheme="fill" />
|
||||
</ng-template>
|
||||
} @else {
|
||||
<nz-card style="width:400px;" [nzActions]="[back, check]">
|
||||
<form nz-form nzLayout="horizontal" [formGroup]="communicationForm">
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5">Appel</nz-form-label>
|
||||
<nz-form-control nzSpan="22">
|
||||
<input nz-input placeholder="Appel" formControlName="calling">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5">Email</nz-form-label>
|
||||
<nz-form-control nzSpan="22">
|
||||
<input nz-input placeholder="Email" formControlName="email">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5">Réunion</nz-form-label>
|
||||
<nz-form-control nzSpan="22">
|
||||
<input nz-input placeholder="Réunion" formControlName="meeting">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</form>
|
||||
</nz-card>
|
||||
<ng-template #back>
|
||||
<nz-icon (click)="Back()" nzType="backward" nzTheme="fill" />
|
||||
</ng-template>
|
||||
<ng-template #check>
|
||||
<nz-icon (click)="submitForm()" nzType="check" nzTheme="outline" />
|
||||
</ng-template>
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
import {Component, inject, input, output, signal} from '@angular/core';
|
||||
import {NzNotificationService} from "ng-zorro-antd/notification";
|
||||
import {FormControl, FormGroup, ReactiveFormsModule} from "@angular/forms";
|
||||
import {firstValueFrom} from "rxjs";
|
||||
import {NzCardComponent} from "ng-zorro-antd/card";
|
||||
import {NzFormControlComponent, NzFormItemComponent, NzFormLabelComponent} from "ng-zorro-antd/form";
|
||||
import {NzIconDirective} from "ng-zorro-antd/icon";
|
||||
import {NzColDirective} from "ng-zorro-antd/grid";
|
||||
import {NzInputDirective} from "ng-zorro-antd/input";
|
||||
import {CommunicationsService, GetCommunicationDto, UpdateCommunicationDto} from "../../../services/api";
|
||||
|
||||
@Component({
|
||||
selector: 'app-opportunity-card',
|
||||
imports: [
|
||||
NzCardComponent,
|
||||
ReactiveFormsModule,
|
||||
NzFormLabelComponent,
|
||||
NzFormControlComponent,
|
||||
NzFormItemComponent,
|
||||
NzIconDirective,
|
||||
NzColDirective,
|
||||
NzInputDirective
|
||||
],
|
||||
templateUrl: './opportunity-card.html',
|
||||
styleUrl: './opportunity-card.css',
|
||||
})
|
||||
export class OpportunityCard {
|
||||
private communicationsService = inject(CommunicationsService);
|
||||
private notificationService = inject(NzNotificationService);
|
||||
|
||||
communicationEdit = signal<UpdateCommunicationDto>(null);
|
||||
communicationsLoading = signal<boolean>(false);
|
||||
|
||||
communicationForm = new FormGroup({
|
||||
calling: new FormControl<string>(null),
|
||||
email: new FormControl<string>(null),
|
||||
meeting: new FormControl<string>(null),
|
||||
}, { validators: atLeastOneRequired })
|
||||
|
||||
async submitForm() {
|
||||
this.communicationsLoading.set(true);
|
||||
|
||||
const communicationValue: UpdateCommunicationDto = {
|
||||
calling: this.communicationForm.value.calling,
|
||||
email: this.communicationForm.value.email,
|
||||
meeting: this.communicationForm.value.meeting,
|
||||
}
|
||||
|
||||
try {
|
||||
const communication = await firstValueFrom(this.communicationsService.updateCommunicationEndpoint(this.communication().id, communicationValue));
|
||||
this.communicationEdit.set(communication as unknown as UpdateCommunicationDto);
|
||||
console.log(communication);
|
||||
this.communicationForm.reset();
|
||||
this.edit.set(false);
|
||||
this.triggerEdited.emit();
|
||||
} catch (e) {
|
||||
this.notificationService.error('Erreur', '(ou Erreur de communication avec l\'API)');
|
||||
}
|
||||
|
||||
this.communicationsLoading.set(false);
|
||||
}
|
||||
|
||||
communication = input<GetCommunicationDto>(null);
|
||||
edit = signal(false);
|
||||
triggerEdited = output<void>();
|
||||
|
||||
protected Edit() {
|
||||
this.edit.set(true);
|
||||
this.communicationForm.patchValue({
|
||||
calling: this.communication().calling,
|
||||
email: this.communication().email,
|
||||
meeting: this.communication().meeting,
|
||||
});
|
||||
}
|
||||
|
||||
protected Back() {
|
||||
this.edit.set(false);
|
||||
this.communicationForm.reset();
|
||||
}
|
||||
|
||||
async Delete() {
|
||||
this.communicationsLoading.set(true);
|
||||
|
||||
try {
|
||||
await firstValueFrom(this.communicationsService.deleteCommunicationEndpoint(this.communication().id));
|
||||
this.communicationForm.reset();
|
||||
this.triggerEdited.emit();
|
||||
} catch (e) {
|
||||
this.notificationService.error('Erreur', '(ou Erreur de communication avec l\'API)');
|
||||
}
|
||||
|
||||
this.communicationsLoading.set(false);
|
||||
}
|
||||
}
|
||||
|
||||
function atLeastOneRequired(group: FormGroup) {
|
||||
const { calling, email, meeting } = group.controls;
|
||||
const valid = [calling, email, meeting].some(c => c.value);
|
||||
return valid ? null : { atLeastOneRequired: true };
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<p>create-providers-modal works!</p>
|
||||
@@ -0,0 +1,59 @@
|
||||
import {Component, output} from '@angular/core';
|
||||
import {NzMessageService} from "ng-zorro-antd/message";
|
||||
import {NzButtonComponent} from "ng-zorro-antd/button";
|
||||
import {NzModalComponent} from "ng-zorro-antd/modal";
|
||||
import {ProvidersAddForm} from "../providers-add-form/providers-add-form";
|
||||
|
||||
@Component({
|
||||
selector: 'app-create-providers-modal',
|
||||
imports: [NzButtonComponent, NzModalComponent, ProvidersAddForm],
|
||||
template: `
|
||||
<button nz-button nzType="primary" (click)="showModal()">
|
||||
<span style="font-weight: bold">+</span>
|
||||
</button>
|
||||
<nz-modal
|
||||
[(nzVisible)]="isVisible"
|
||||
[nzTitle]="modalTitle"
|
||||
[nzContent]="modalContent"
|
||||
[nzFooter]="modalFooter"
|
||||
(nzOnCancel)="handleCancel()">
|
||||
<ng-template #modalTitle style="text-align: center">Création de prestataires</ng-template>
|
||||
|
||||
<ng-template #modalContent>
|
||||
<app-providers-add-form/>
|
||||
</ng-template>
|
||||
|
||||
<ng-template #modalFooter>
|
||||
<button nz-button nzType="default" (click)="handleCancel()">Annuler</button>
|
||||
<button nz-button nzType="primary" (click)="handleOk()" [nzLoading]="isConfirmLoading">Confirmer</button>
|
||||
</ng-template>
|
||||
</nz-modal>
|
||||
`,
|
||||
styleUrl: './create-providers-modal.css',
|
||||
})
|
||||
export class CreateProvidersModal {
|
||||
constructor(private message: NzMessageService) {}
|
||||
isVisible = false;
|
||||
isConfirmLoading = false;
|
||||
|
||||
showModal(): void {
|
||||
this.isVisible = true;
|
||||
}
|
||||
|
||||
handleOk(): void {
|
||||
this.isConfirmLoading = true;
|
||||
this.message.success('Prestataire créé !');
|
||||
setTimeout(() => {
|
||||
this.isVisible = false;
|
||||
this.isConfirmLoading = false;
|
||||
}, 300);
|
||||
this.triggerCreated.emit();
|
||||
}
|
||||
|
||||
handleCancel(): void {
|
||||
this.isVisible = false;
|
||||
this.message.info('Création annulée');
|
||||
}
|
||||
|
||||
triggerCreated = output<void>()
|
||||
}
|
||||
@@ -1,46 +1,4 @@
|
||||
<form nz-form nzLayout="horizontal" [formGroup]="providerForm">
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired> Nom </nz-form-label>
|
||||
<nz-form-control nzSpan="22" nzErrorTip="Ce champ est requis !">
|
||||
<input nz-input placeholder="Nom" formControlName="lastName">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired>Prénom</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis">
|
||||
<input nz-input placeholder="Prénom" formControlName="firstName">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired>Téléphone</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis !">
|
||||
<input nz-input placeholder="Numéro de téléphone" formControlName="phoneNumber">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired>Email</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis !">
|
||||
<input nz-input placeholder="Email" formControlName="email">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired>Adresse</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis !">
|
||||
<input nz-input placeholder="Adresse" formControlName="address">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired>Rôle</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis">
|
||||
<input nz-input placeholder="Rôle" formControlName="role">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired>Prix</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis">
|
||||
@@ -48,4 +6,18 @@
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired> Type </nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis">
|
||||
<nz-select placeholder="Type de client" formControlName="providerTypeId">
|
||||
@for (providertype of providerTypes(); track providertype.id) {
|
||||
<nz-option nzValue="{{providertype.id}}" nzLabel="{{ providertype.label }}"></nz-option>
|
||||
}
|
||||
</nz-select>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-flex nzJustify="end">
|
||||
<button nz-button nzType="primary" (click)="submitForm()">Valider</button>
|
||||
</nz-flex>
|
||||
</form>
|
||||
|
||||
@@ -1,34 +1,85 @@
|
||||
import { Component } from '@angular/core';
|
||||
import {FormControl, FormGroup, ReactiveFormsModule, Validators} from "@angular/forms";
|
||||
import {NzFormModule} from "ng-zorro-antd/form";
|
||||
import {NzInputDirective} from "ng-zorro-antd/input";
|
||||
import {NzFlexDirective} from "ng-zorro-antd/flex";
|
||||
import {Component, inject, signal} from '@angular/core';
|
||||
import {FormControl, FormGroup, FormsModule, ReactiveFormsModule, Validators} from "@angular/forms";
|
||||
import {NzButtonComponent} from "ng-zorro-antd/button";
|
||||
import {NzColDirective, NzRowDirective} from "ng-zorro-antd/grid";
|
||||
import {NzFlexDirective} from "ng-zorro-antd/flex";
|
||||
import {NzFormControlComponent, NzFormDirective, NzFormItemComponent, NzFormLabelComponent} from "ng-zorro-antd/form";
|
||||
import {NzInputDirective} from "ng-zorro-antd/input";
|
||||
import {NzOptionComponent, NzSelectComponent} from "ng-zorro-antd/select";
|
||||
import {CreateProviderDto, GetProviderTypeDto, ProvidertypesService, ServiceprovidersService} from "../../../services/api";
|
||||
import {NzNotificationService} from "ng-zorro-antd/notification";
|
||||
import {firstValueFrom} from "rxjs";
|
||||
|
||||
@Component({
|
||||
selector: 'app-providers-add-form',
|
||||
imports: [ReactiveFormsModule, NzFormModule, NzInputDirective,],
|
||||
imports: [FormsModule, NzButtonComponent, NzColDirective, NzFlexDirective, NzFormControlComponent, NzFormDirective, NzFormItemComponent, NzFormLabelComponent, NzInputDirective, NzOptionComponent, NzRowDirective, NzSelectComponent, ReactiveFormsModule],
|
||||
templateUrl: './providers-add-form.html',
|
||||
styleUrl: './providers-add-form.css',
|
||||
})
|
||||
export class ProvidersAddForm {
|
||||
providerForm = new FormGroup({
|
||||
lastName: new FormControl<string>(null, [Validators.required]),
|
||||
firstName: new FormControl<string>(null, [Validators.required]),
|
||||
phoneNumber: new FormControl<string>(null, [Validators.required]),
|
||||
email: new FormControl<string>(null, [Validators.required]),
|
||||
address: new FormControl<string>(null, [Validators.required]),
|
||||
role: new FormControl<string>(null, [Validators.required]),
|
||||
price: new FormControl<string>(null, [Validators.required]),
|
||||
})
|
||||
submitForm() {
|
||||
// Pour annuler si le formulaire est invalide
|
||||
if (this.providerForm.invalid) return;
|
||||
private providersService = inject(ServiceprovidersService);
|
||||
private serviceprovidertypesService = inject(ProvidertypesService);
|
||||
private notificationService = inject(NzNotificationService)
|
||||
|
||||
// Pour obtenir la valeur du formulaire
|
||||
console.log(this.providerForm.getRawValue())
|
||||
|
||||
// Pour vider le formulaire
|
||||
this.providerForm.reset()
|
||||
providerForm = new FormGroup({
|
||||
Price: new FormControl<number>(null, [Validators.required]),
|
||||
providerTypeId: new FormControl<number>(null, [Validators.required]),
|
||||
})
|
||||
|
||||
providerPost = signal<CreateProviderDto>(this.providerForm.value);
|
||||
providersLoading = signal<boolean>(false);
|
||||
|
||||
async submitForm() {
|
||||
// Pour annuler si le formulaire est invalide
|
||||
if (this.providerForm.invalid) return;
|
||||
|
||||
// Pour obtenir la valeur du formulaire
|
||||
console.log(this.providerForm.getRawValue())
|
||||
this.providerPost.set(this.providerForm.getRawValue())
|
||||
|
||||
await this.createProviders(this.providerPost().price, this.providerPost().providerTypeId)
|
||||
// Pour vider le formulaire
|
||||
this.providerForm.reset()
|
||||
}
|
||||
|
||||
async createProviders(price: number, customerTypeId: number) {
|
||||
this.providersLoading.set(true);
|
||||
|
||||
const providerValue = {
|
||||
price: price,
|
||||
customerTypeId: customerTypeId
|
||||
}
|
||||
|
||||
try {
|
||||
const provider = await firstValueFrom(this.providersService.createProviderEndpoint(providerValue));
|
||||
this.providerPost.set(provider);
|
||||
console.log(provider);
|
||||
} catch (e)
|
||||
{
|
||||
this.notificationService.error('Erreur de recherche', "L\'auteur n\'existe pas !");
|
||||
|
||||
this.notificationService.error('Erreur', ' (ou Erreur de communication avec l\'API)');
|
||||
}
|
||||
|
||||
this.providersLoading.set(false);
|
||||
}
|
||||
|
||||
providerTypes = signal<GetProviderTypeDto[]>([])
|
||||
|
||||
async ngOnInit() {
|
||||
await this.fetchCustomerTypes()
|
||||
}
|
||||
|
||||
async fetchCustomerTypes() {
|
||||
this.providersLoading.set(true);
|
||||
try {
|
||||
const providerType = await firstValueFrom(this.serviceprovidertypesService.getAllProviderTypesEndpoint())
|
||||
this.providerTypes.set(providerType)
|
||||
} catch (e) {
|
||||
this.notificationService.error('Erreur', 'Erreur de communication avec l\'API');
|
||||
}
|
||||
|
||||
this.providersLoading.set(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
.ant-modal-content {
|
||||
background: #272727;
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
<p>providers-card-form works!</p>
|
||||
@@ -1,56 +0,0 @@
|
||||
import { Component } from '@angular/core';
|
||||
import {NzModalComponent, NzModalModule} from "ng-zorro-antd/modal";
|
||||
import {NzButtonComponent, NzButtonModule} from "ng-zorro-antd/button";
|
||||
import {NzMessageService} from "ng-zorro-antd/message";
|
||||
import {ProvidersAddForm} from "../providers-add-form/providers-add-form";
|
||||
|
||||
@Component({
|
||||
selector: 'app-providers-card-form',
|
||||
imports: [NzButtonModule, NzModalModule, ProvidersAddForm],
|
||||
template: `
|
||||
<button nz-button nzType="primary" (click)="showModal()">
|
||||
<span style="font-weight: bold">+</span>
|
||||
</button>
|
||||
<nz-modal
|
||||
[(nzVisible)]="isVisible"
|
||||
[nzTitle]="modalTitle"
|
||||
[nzContent]="modalContent"
|
||||
[nzFooter]="modalFooter"
|
||||
(nzOnCancel)="handleCancel()"
|
||||
>
|
||||
<ng-template #modalTitle>Création de prestataires</ng-template>
|
||||
|
||||
<ng-template #modalContent>
|
||||
<app-providers-add-form/>
|
||||
</ng-template>
|
||||
|
||||
<ng-template #modalFooter>
|
||||
<button nz-button nzType="default" (click)="handleCancel()">Annuler</button>
|
||||
<button nz-button nzType="primary" (click)="handleOk()" [nzLoading]="isConfirmLoading">Confirmer</button>
|
||||
</ng-template>
|
||||
</nz-modal>
|
||||
`,
|
||||
styleUrl: './providers-card-form.css',
|
||||
})
|
||||
export class ProvidersCardForm {
|
||||
constructor(private message: NzMessageService) {}
|
||||
isVisible = false;
|
||||
isConfirmLoading = false;
|
||||
|
||||
showModal(): void {
|
||||
this.isVisible = true;
|
||||
}
|
||||
|
||||
handleOk(): void {
|
||||
this.isConfirmLoading = true;
|
||||
this.message.success('Prestataire créé !');
|
||||
setTimeout(() => {
|
||||
this.isVisible = false;
|
||||
this.isConfirmLoading = false;
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
handleCancel(): void {
|
||||
this.isVisible = false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
@if (edit() == false) {
|
||||
<nz-card style="width:400px;" [nzActions]="[edit, delete]">
|
||||
<h2 style="text-align: center; font-weight: bold">Prestataire n°{{ provider().id }}</h2>
|
||||
<p>Prix : {{ provider().price }}</p>
|
||||
<p>Type de Prestataire : {{ provider().providerType }}</p>
|
||||
</nz-card>
|
||||
<ng-template #edit>
|
||||
<nz-icon (click)="Edit()" nzType="edit" nzTheme="fill" />
|
||||
</ng-template>
|
||||
<ng-template #delete>
|
||||
<nz-icon (click)="Delete()" nzType="delete" nzTheme="fill" />
|
||||
</ng-template>
|
||||
} @else {
|
||||
<nz-card style="width:400px;" [nzActions]="[back, check]">
|
||||
<form nz-form nzLayout="horizontal" [formGroup]="providerForm">
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired> Prix </nz-form-label>
|
||||
<nz-form-control nzSpan="22" nzErrorTip="Ce champ est requis !">
|
||||
<input nz-input placeholder="Nom" formControlName="price">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</form>
|
||||
</nz-card>
|
||||
<ng-template #back>
|
||||
<nz-icon (click)="Back()" nzType="backward" nzTheme="fill" />
|
||||
</ng-template>
|
||||
<ng-template #check>
|
||||
<nz-icon (click)="submitForm()" nzType="check" nzTheme="outline" />
|
||||
</ng-template>
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
import {Component, inject, input, output, signal} from '@angular/core';
|
||||
import {FormControl, FormGroup, FormsModule, ReactiveFormsModule, Validators} from "@angular/forms";
|
||||
import {NzCardComponent} from "ng-zorro-antd/card";
|
||||
import {NzColDirective, NzRowDirective} from "ng-zorro-antd/grid";
|
||||
import {NzFormControlComponent, NzFormDirective, NzFormItemComponent, NzFormLabelComponent} from "ng-zorro-antd/form";
|
||||
import {NzIconDirective} from "ng-zorro-antd/icon";
|
||||
import {NzInputDirective} from "ng-zorro-antd/input";
|
||||
import {GetProviderDto, ServiceprovidersService, UpdateProviderDto} from "../../../services/api";
|
||||
import {NzNotificationService} from "ng-zorro-antd/notification";
|
||||
import {firstValueFrom} from "rxjs";
|
||||
|
||||
@Component({
|
||||
selector: 'app-providers-card',
|
||||
imports: [FormsModule, NzCardComponent, NzColDirective, NzFormControlComponent, NzFormDirective, NzFormItemComponent, NzFormLabelComponent, NzIconDirective, NzInputDirective, NzRowDirective, ReactiveFormsModule],
|
||||
templateUrl: './providers-card.html',
|
||||
styleUrl: './providers-card.css',
|
||||
})
|
||||
export class ProvidersCard {
|
||||
private providersService = inject(ServiceprovidersService);
|
||||
private notificationService = inject(NzNotificationService)
|
||||
|
||||
providerEdit = signal<UpdateProviderDto>(null);
|
||||
providersLoading = signal<boolean>(false);
|
||||
|
||||
providerForm = new FormGroup({
|
||||
id: new FormControl(null, [Validators.required]),
|
||||
price: new FormControl<number>(null, [Validators.required]),
|
||||
})
|
||||
|
||||
async submitForm() {
|
||||
this.providersLoading.set(true);
|
||||
|
||||
const providerValue = {
|
||||
price: this.providerForm.value.price,
|
||||
}
|
||||
|
||||
try {
|
||||
const provider = await firstValueFrom(this.providersService.updateProviderEndpoint(this.provider().id,providerValue));
|
||||
this.providerEdit.set(provider);
|
||||
console.log(provider);
|
||||
this.providerForm.reset();
|
||||
this.edit.set(false);
|
||||
|
||||
this.triggerEdited.emit();
|
||||
|
||||
} catch (e)
|
||||
{
|
||||
this.notificationService.error('Erreur', ' (ou Erreur de communication avec l\'API)');
|
||||
}
|
||||
|
||||
this.providersLoading.set(false);
|
||||
|
||||
}
|
||||
|
||||
|
||||
provider = input<GetProviderDto>(null);
|
||||
|
||||
edit = signal(false)
|
||||
|
||||
triggerEdited = output<void>();
|
||||
|
||||
protected Edit() {
|
||||
this.edit.set(true)
|
||||
}
|
||||
|
||||
protected Back() {
|
||||
this.edit.set(false)
|
||||
this.providerForm.reset();
|
||||
}
|
||||
|
||||
async Delete() {
|
||||
this.providersLoading.set(true);
|
||||
|
||||
try {
|
||||
const provider = await firstValueFrom(this.providersService.deleteProviderEndpoint(this.provider().id));
|
||||
this.providerEdit.set(provider);
|
||||
|
||||
this.providerForm.reset();
|
||||
this.triggerEdited.emit();
|
||||
|
||||
} catch (e)
|
||||
{
|
||||
this.notificationService.error('Erreur de recherche', "L\'auteur n\'existe pas !");
|
||||
|
||||
this.notificationService.error('Erreur', ' (ou Erreur de communication avec l\'API)');
|
||||
}
|
||||
|
||||
this.providersLoading.set(false);
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
<p>providers-get-all works!</p>
|
||||
@@ -1,13 +0,0 @@
|
||||
import {Component, inject, signal} from '@angular/core';
|
||||
import {NzNotificationService} from "ng-zorro-antd/notification";
|
||||
import {Router} from "@angular/router";
|
||||
import {firstValueFrom} from "rxjs";
|
||||
|
||||
@Component({
|
||||
selector: 'app-providers-get-all',
|
||||
imports: [],
|
||||
templateUrl: './providers-get-all.html',
|
||||
styleUrl: './providers-get-all.css',
|
||||
})
|
||||
export class ProvidersGetAll {
|
||||
}
|
||||
@@ -1,3 +1,11 @@
|
||||
<app-providers-card-form/>
|
||||
<app-create-providers-modal (triggerCreated)="fetchProviders()" />
|
||||
|
||||
<app-providers-get-all/>
|
||||
<div class="card">
|
||||
<div nz-row [nzGutter]="10" style="gap: 30px">
|
||||
@for (provider of providers(); track provider.id)
|
||||
{
|
||||
<!-- Passage de la donnée du parent vers l'enfant + signal à émettre -->
|
||||
<app-providers-card [provider]="provider" (triggerEdited)="fetchProviders()" />
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,16 +1,40 @@
|
||||
import { Component } from '@angular/core';
|
||||
import {ProvidersCardForm} from "./providers-card-form/providers-card-form";
|
||||
import {ProvidersGetAll} from "./providers-get-all/providers-get-all";
|
||||
import {Component, inject, signal} from '@angular/core';
|
||||
import {NzRowDirective} from "ng-zorro-antd/grid";
|
||||
import {GetProviderDto, ServiceprovidersService} from "../../services/api";
|
||||
import {NzNotificationService} from "ng-zorro-antd/notification";
|
||||
import {Router} from "@angular/router";
|
||||
import {firstValueFrom} from "rxjs";
|
||||
import {ProvidersCard} from "./providers-card/providers-card";
|
||||
import {CreateProvidersModal} from "./create-providers-modal/create-providers-modal";
|
||||
|
||||
@Component({
|
||||
selector: 'app-providers',
|
||||
imports: [
|
||||
ProvidersCardForm,
|
||||
ProvidersGetAll
|
||||
],
|
||||
imports: [NzRowDirective, ProvidersCard, CreateProvidersModal],
|
||||
templateUrl: './providers.html',
|
||||
styleUrl: './providers.css',
|
||||
})
|
||||
export class Providers {
|
||||
private providersService = inject(ServiceprovidersService);
|
||||
private notificationService = inject(NzNotificationService)
|
||||
|
||||
router = inject(Router);
|
||||
|
||||
providers = signal<GetProviderDto[]>([]);
|
||||
providersLoading = signal<boolean>(false);
|
||||
|
||||
async ngOnInit() {
|
||||
await this.fetchProviders();
|
||||
}
|
||||
|
||||
async fetchProviders() {
|
||||
this.providersLoading.set(true);
|
||||
try {
|
||||
const providers = await firstValueFrom(this.providersService.getAllProvidersEndpoint())
|
||||
this.providers.set(providers)
|
||||
} catch (e) {
|
||||
this.notificationService.error('Erreur', 'Erreur de communication avec l\'API');
|
||||
}
|
||||
|
||||
this.providersLoading.set(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<p>create-staff-modal works!</p>
|
||||
@@ -0,0 +1,63 @@
|
||||
import {Component, output} from '@angular/core';
|
||||
import StaffAddForm from "../staff-add-form/staff-add-form";
|
||||
import {NzMessageService} from "ng-zorro-antd/message";
|
||||
import {NzModalComponent} from "ng-zorro-antd/modal";
|
||||
import {NzButtonComponent} from "ng-zorro-antd/button";
|
||||
|
||||
@Component({
|
||||
selector: 'app-create-staff-modal',
|
||||
imports: [
|
||||
StaffAddForm,
|
||||
NzModalComponent,
|
||||
NzButtonComponent
|
||||
],
|
||||
template: `
|
||||
<button nz-button nzType="primary" (click)="showModal()">
|
||||
<span style="font-weight: bold">+</span>
|
||||
</button>
|
||||
<nz-modal
|
||||
[(nzVisible)]="isVisible"
|
||||
[nzTitle]="modalTitle"
|
||||
[nzContent]="modalContent"
|
||||
[nzFooter]="modalFooter"
|
||||
(nzOnCancel)="handleCancel()">
|
||||
<ng-template #modalTitle style="text-align: center">Création de staff</ng-template>
|
||||
|
||||
<ng-template #modalContent>
|
||||
<app-staff-add-form/>
|
||||
</ng-template>
|
||||
|
||||
<ng-template #modalFooter>
|
||||
<button nz-button nzType="default" (click)="handleCancel()">Annuler</button>
|
||||
<button nz-button nzType="primary" (click)="handleOk()" [nzLoading]="isConfirmLoading">Confirmer</button>
|
||||
</ng-template>
|
||||
</nz-modal>
|
||||
`,
|
||||
styleUrl: './create-staff-modal.css',
|
||||
})
|
||||
export class CreateStaffModal {
|
||||
constructor(private message: NzMessageService) {}
|
||||
isVisible = false;
|
||||
isConfirmLoading = false;
|
||||
|
||||
showModal(): void {
|
||||
this.isVisible = true;
|
||||
}
|
||||
|
||||
handleOk(): void {
|
||||
this.isConfirmLoading = true;
|
||||
this.message.success('Staff créé !');
|
||||
setTimeout(() => {
|
||||
this.isVisible = false;
|
||||
this.isConfirmLoading = false;
|
||||
}, 300);
|
||||
this.triggerCreated.emit();
|
||||
}
|
||||
|
||||
handleCancel(): void {
|
||||
this.isVisible = false;
|
||||
this.message.info('Création annulée');
|
||||
}
|
||||
|
||||
triggerCreated = output<void>()
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
<form nz-form nzLayout="horizontal" [formGroup]="staffForm">
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired> Nom </nz-form-label>
|
||||
<nz-form-control nzSpan="22" nzErrorTip="Ce champ est requis !">
|
||||
<input nz-input placeholder="Nom" formControlName="lastName">
|
||||
<nz-form-label nzSpan="5" nzRequired>Nom</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis">
|
||||
<input nz-input placeholder="Nom de Famille" formControlName="lastName">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
@@ -14,48 +14,34 @@
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired>Téléphone</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis !">
|
||||
<input nz-input placeholder="Numéro de téléphone" formControlName="phoneNumber">
|
||||
<nz-form-label nzSpan="5" nzRequired>Profession</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis">
|
||||
<input nz-input placeholder="Profession" formControlName="profession">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired>Email</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis !">
|
||||
<nz-form-control nzErrorTip="Ce champ est requis">
|
||||
<input nz-input placeholder="Email" formControlName="email">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired>Adresse</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis !">
|
||||
<input nz-input placeholder="Adresse" formControlName="address">
|
||||
<nz-form-label nzSpan="5" nzRequired>Numéro F4T2</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis">
|
||||
<input nz-input placeholder="Numéro F4T2" formControlName="f4T2NumberApproval">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired>Rôle</nz-form-label>
|
||||
<nz-form-label nzSpan="5" nzRequired>Exp. F4T2</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis">
|
||||
<input nz-input placeholder="Rôle" formControlName="role">
|
||||
<input nz-input placeholder="Date d'expiration F4T2" formControlName="f4T2ExpirationDate">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-layout></nz-layout>
|
||||
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="10" nzRequired>Numéro F4T2</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis">
|
||||
<input nz-input placeholder="Numéro F4T2" formControlName="F4T2NumberApproval">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="10" nzRequired>Date d'expiration du F4T2</nz-form-label>
|
||||
<nz-form-control nzErrorTip="Ce champ est requis">
|
||||
<input nz-input placeholder="Date d'expiration du F4T2" formControlName="F4T2ExpirationDate">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
|
||||
|
||||
<nz-flex nzJustify="end">
|
||||
<button nz-button nzType="primary" (click)="submitForm()">Valider</button>
|
||||
</nz-flex>
|
||||
</form>
|
||||
|
||||
@@ -1,43 +1,94 @@
|
||||
import { Component } from '@angular/core';
|
||||
import {Component, inject, signal} from '@angular/core';
|
||||
import {FormControl, FormGroup, FormsModule, ReactiveFormsModule, Validators} from "@angular/forms";
|
||||
import {NzButtonComponent} from "ng-zorro-antd/button";
|
||||
import {NzColDirective, NzRowDirective} from "ng-zorro-antd/grid";
|
||||
import {
|
||||
NzFormControlComponent,
|
||||
NzFormDirective,
|
||||
NzFormItemComponent,
|
||||
NzFormLabelComponent,
|
||||
NzFormModule
|
||||
} from "ng-zorro-antd/form";
|
||||
import {NzFlexDirective} from "ng-zorro-antd/flex";
|
||||
import {NzFormControlComponent, NzFormDirective, NzFormItemComponent, NzFormLabelComponent} from "ng-zorro-antd/form";
|
||||
import {NzInputDirective} from "ng-zorro-antd/input";
|
||||
import {NzLayoutComponent} from "ng-zorro-antd/layout";
|
||||
import {NzNotificationService} from "ng-zorro-antd/notification";
|
||||
import {firstValueFrom} from "rxjs";
|
||||
import {CreateStaffDto, GetProviderTypeDto, ProvidertypesService, StaffsService} from "../../../services/api";
|
||||
|
||||
@Component({
|
||||
selector: 'app-staff-add-form',
|
||||
imports: [ReactiveFormsModule, NzFormModule, NzInputDirective, NzLayoutComponent],
|
||||
imports: [FormsModule, NzButtonComponent, NzColDirective, NzFlexDirective, NzFormControlComponent, NzFormDirective, NzFormItemComponent, NzFormLabelComponent, NzInputDirective, NzRowDirective, ReactiveFormsModule],
|
||||
templateUrl: './staff-add-form.html',
|
||||
styleUrl: './staff-add-form.css',
|
||||
})
|
||||
export class StaffAddForm {
|
||||
class StaffAddForm {
|
||||
private staffsService = inject(StaffsService);
|
||||
private serviceprovidertypesService = inject(ProvidertypesService);
|
||||
private notificationService = inject(NzNotificationService)
|
||||
|
||||
|
||||
staffForm = new FormGroup({
|
||||
lastName: new FormControl<string>(null, [Validators.required]),
|
||||
firstName: new FormControl<string>(null, [Validators.required]),
|
||||
phoneNumber: new FormControl<string>(null, [Validators.required]),
|
||||
profession: new FormControl<string>(null, [Validators.required]),
|
||||
email: new FormControl<string>(null, [Validators.required]),
|
||||
address: new FormControl<string>(null, [Validators.required]),
|
||||
role: new FormControl<string>(null, [Validators.required]),
|
||||
price: new FormControl<string>(null, [Validators.required]),
|
||||
F4T2NumberApproval: new FormControl<string>(null, [Validators.required]),
|
||||
F4T2ExpirationDate: new FormControl<Date>(null, [Validators.required]),
|
||||
|
||||
f4T2NumberApproval: new FormControl<string>(null, [Validators.required]),
|
||||
f4T2ExpirationDate: new FormControl<Date>(null, [Validators.required])
|
||||
})
|
||||
submitForm() {
|
||||
// Pour annuler si le formulaire est invalide
|
||||
if (this.staffForm.invalid) return;
|
||||
|
||||
// Pour obtenir la valeur du formulaire
|
||||
console.log(this.staffForm.getRawValue())
|
||||
staffPost = signal<CreateStaffDto>(this.staffForm.value as any);
|
||||
staffsLoading = signal<boolean>(false);
|
||||
|
||||
// Pour vider le formulaire
|
||||
this.staffForm.reset()
|
||||
async submitForm() {
|
||||
// Pour annuler si le formulaire est invalide
|
||||
if (this.staffForm.invalid) return;
|
||||
|
||||
// Pour obtenir la valeur du formulaire
|
||||
console.log(this.staffForm.getRawValue())
|
||||
this.staffPost.set(this.staffForm.getRawValue() as any)
|
||||
|
||||
await this.createStaff(this.staffPost().lastName, this.staffPost().firstName, this.staffPost().profession, this.staffPost().email, this.staffPost().f4T2NumberApproval, this.staffPost().f4T2ExpirationDate)
|
||||
// Pour vider le formulaire
|
||||
this.staffForm.reset()
|
||||
}
|
||||
|
||||
async createStaff(lastname: string, firstname: string, profession: string, email: string, f4t2number: string, f4t2expiration: Date | string)
|
||||
{
|
||||
this.staffsLoading.set(true);
|
||||
|
||||
const staffValue: CreateStaffDto = {
|
||||
lastName: lastname,
|
||||
firstName: firstname,
|
||||
profession: profession,
|
||||
email: email,
|
||||
f4T2NumberApproval: f4t2number,
|
||||
f4T2ExpirationDate: f4t2expiration instanceof Date ? f4t2expiration : new Date(f4t2expiration)
|
||||
}
|
||||
|
||||
try {
|
||||
const staff = await firstValueFrom(this.staffsService.createStaffEndpoint(staffValue));
|
||||
this.staffPost.set(staff as unknown as CreateStaffDto);
|
||||
console.log(staff);
|
||||
} catch (e)
|
||||
{
|
||||
|
||||
this.notificationService.error('Erreur', ' (ou Erreur de communication avec l\'API)');
|
||||
}
|
||||
|
||||
this.staffsLoading.set(false);
|
||||
}
|
||||
|
||||
providerTypes = signal<GetProviderTypeDto[]>([])
|
||||
|
||||
async ngOnInit() {
|
||||
await this.fetchCustomerTypes()
|
||||
}
|
||||
|
||||
async fetchCustomerTypes() {
|
||||
this.staffsLoading.set(true);
|
||||
try {
|
||||
const providerType = await firstValueFrom(this.serviceprovidertypesService.getAllProviderTypesEndpoint())
|
||||
this.providerTypes.set(providerType)
|
||||
} catch (e) {
|
||||
this.notificationService.error('Erreur', 'Erreur de communication avec l\'API');
|
||||
}
|
||||
|
||||
this.staffsLoading.set(false);
|
||||
}
|
||||
}
|
||||
|
||||
export default StaffAddForm
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
<p>staff-card-form works!</p>
|
||||
@@ -0,0 +1,40 @@
|
||||
@if (edit() == false) {
|
||||
<nz-card style="width:400px;" [nzActions]="[edit, delete]">
|
||||
<h2 style="text-align: center; font-weight: bold">Staff n°{{ staff().id }}</h2>
|
||||
<p>Nom : {{ staff().lastName }} {{ staff().firstName }}</p>
|
||||
<p>Profession : {{ staff().profession }}</p>
|
||||
<p>Email : {{ staff().email }}</p>
|
||||
<p>N° F4T2 : {{ staff().f4T2NumberApproval }}</p>
|
||||
<p>Expiration F4T2 : {{ staff().f4T2ExpirationDate }}</p>
|
||||
<p> Niveau d'experience : {{ staff().experienceLevel}}</p>
|
||||
</nz-card>
|
||||
<ng-template #edit>
|
||||
<nz-icon (click)="Edit()" nzType="edit" nzTheme="fill" />
|
||||
</ng-template>
|
||||
<ng-template #delete>
|
||||
<nz-icon (click)="Delete()" nzType="delete" nzTheme="fill" />
|
||||
</ng-template>
|
||||
} @else {
|
||||
<nz-card style="width:400px;" [nzActions]="[back, check]">
|
||||
<form nz-form nzLayout="horizontal" [formGroup]="staffForm">
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired> N° F4T2 </nz-form-label>
|
||||
<nz-form-control nzSpan="22" nzErrorTip="Ce champ est requis !">
|
||||
<input nz-input placeholder="N° F4T2" formControlName="f4T2NumberApproval">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
<nz-form-item>
|
||||
<nz-form-label nzSpan="5" nzRequired> Exp. F4T2 </nz-form-label>
|
||||
<nz-form-control nzSpan="22" nzErrorTip="Ce champ est requis !">
|
||||
<input nz-input placeholder="Expiration F4T2" formControlName="f4T2ExpirationDate">
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</form>
|
||||
</nz-card>
|
||||
<ng-template #back>
|
||||
<nz-icon (click)="Back()" nzType="backward" nzTheme="fill" />
|
||||
</ng-template>
|
||||
<ng-template #check>
|
||||
<nz-icon (click)="submitForm()" nzType="check" nzTheme="outline" />
|
||||
</ng-template>
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
import {Component, inject, input, output, signal} from '@angular/core';
|
||||
import {NzCardComponent} from "ng-zorro-antd/card";
|
||||
import {NzColDirective, NzRowDirective} from "ng-zorro-antd/grid";
|
||||
import {NzFormControlComponent, NzFormDirective, NzFormItemComponent, NzFormLabelComponent} from "ng-zorro-antd/form";
|
||||
import {NzIconDirective} from "ng-zorro-antd/icon";
|
||||
import {NzInputDirective} from "ng-zorro-antd/input";
|
||||
import {FormControl, FormGroup, ReactiveFormsModule, Validators} from "@angular/forms";
|
||||
import {NzNotificationService} from "ng-zorro-antd/notification";
|
||||
import {firstValueFrom} from "rxjs";
|
||||
import {GetStaffDto, StaffsService, UpdateStaffDto} from "../../../services/api";
|
||||
|
||||
@Component({
|
||||
selector: 'app-staff-card',
|
||||
imports: [
|
||||
NzCardComponent,
|
||||
NzColDirective,
|
||||
NzFormControlComponent,
|
||||
NzFormDirective,
|
||||
NzFormItemComponent,
|
||||
NzFormLabelComponent,
|
||||
NzIconDirective,
|
||||
NzInputDirective,
|
||||
NzRowDirective,
|
||||
ReactiveFormsModule
|
||||
],
|
||||
templateUrl: './staff-card.html',
|
||||
styleUrl: './staff-card.css',
|
||||
})
|
||||
export class StaffCard {
|
||||
private staffsService = inject(StaffsService);
|
||||
private notificationService = inject(NzNotificationService)
|
||||
|
||||
staffEdit = signal<UpdateStaffDto>(null);
|
||||
staffsLoading = signal<boolean>(false);
|
||||
|
||||
staffForm = new FormGroup({
|
||||
f4T2NumberApproval: new FormControl<string>(null, [Validators.required]),
|
||||
f4T2ExpirationDate: new FormControl<Date>(null, [Validators.required]),
|
||||
})
|
||||
|
||||
async submitForm() {
|
||||
this.staffsLoading.set(true);
|
||||
|
||||
const staffValue: UpdateStaffDto = {
|
||||
f4T2NumberApproval: this.staffForm.value.f4T2NumberApproval,
|
||||
f4T2ExpirationDate: this.staffForm.value.f4T2ExpirationDate,
|
||||
}
|
||||
|
||||
try {
|
||||
const staff = await firstValueFrom(this.staffsService.updateStaffEndpoint(this.staff().id, staffValue));
|
||||
this.staffEdit.set(staff as unknown as UpdateStaffDto);
|
||||
console.log(staff);
|
||||
this.staffForm.reset();
|
||||
this.edit.set(false);
|
||||
this.triggerEdited.emit();
|
||||
} catch (e) {
|
||||
this.notificationService.error('Erreur', '(ou Erreur de communication avec l\'API)');
|
||||
}
|
||||
|
||||
this.staffsLoading.set(false);
|
||||
}
|
||||
|
||||
staff = input<GetStaffDto>(null);
|
||||
edit = signal(false)
|
||||
triggerEdited = output<void>();
|
||||
|
||||
protected Edit() {
|
||||
this.edit.set(true)
|
||||
}
|
||||
|
||||
protected Back() {
|
||||
this.edit.set(false)
|
||||
this.staffForm.reset();
|
||||
}
|
||||
|
||||
async Delete() {
|
||||
this.staffsLoading.set(true);
|
||||
|
||||
try {
|
||||
await firstValueFrom(this.staffsService.deleteStaffEndpoint(this.staff().id));
|
||||
this.staffForm.reset();
|
||||
this.triggerEdited.emit();
|
||||
} catch (e) {
|
||||
this.notificationService.error('Erreur', '(ou Erreur de communication avec l\'API)');
|
||||
}
|
||||
|
||||
this.staffsLoading.set(false);
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
<p>staff-get-all works!</p>
|
||||
@@ -1,11 +0,0 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-staff-get-all',
|
||||
imports: [],
|
||||
templateUrl: './staff-get-all.html',
|
||||
styleUrl: './staff-get-all.css',
|
||||
})
|
||||
export class StaffGetAll {
|
||||
|
||||
}
|
||||
@@ -1,3 +1,11 @@
|
||||
<app-staff-card-form/>
|
||||
<app-create-staff-modal (triggerCreated)="fetchStaff()" />
|
||||
|
||||
<app-staff-get-all/>
|
||||
<div class="card">
|
||||
<div nz-row [nzGutter]="10" style="gap: 30px">
|
||||
@for (staff of staffs(); track staff.id)
|
||||
{
|
||||
<!-- Passage de la donnée du parent vers l'enfant + signal à émettre -->
|
||||
<app-staff-card [staff]="staff" (triggerEdited)="fetchStaff()" />
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,16 +1,40 @@
|
||||
import { Component } from '@angular/core';
|
||||
import {StaffCardForm} from "./staff-card-form/staff-card-form";
|
||||
import {StaffGetAll} from "./staff-get-all/staff-get-all";
|
||||
import {Component, inject, signal} from '@angular/core';
|
||||
import {NzRowDirective} from "ng-zorro-antd/grid";
|
||||
import {GetStaffDto, StaffsService} from "../../services/api";
|
||||
import {NzNotificationService} from "ng-zorro-antd/notification";
|
||||
import {Router} from "@angular/router";
|
||||
import {firstValueFrom} from "rxjs";
|
||||
import {CreateStaffModal} from "./create-staff-modal/create-staff-modal";
|
||||
import {StaffCard} from "./staff-card/staff-card";
|
||||
|
||||
@Component({
|
||||
selector: 'app-staff',
|
||||
imports: [
|
||||
StaffCardForm,
|
||||
StaffGetAll
|
||||
],
|
||||
imports: [NzRowDirective, CreateStaffModal, StaffCard,],
|
||||
templateUrl: './staff.html',
|
||||
styleUrl: './staff.css',
|
||||
})
|
||||
export class Staff {
|
||||
private staffsService = inject(StaffsService);
|
||||
private notificationService = inject(NzNotificationService)
|
||||
|
||||
router = inject(Router);
|
||||
|
||||
staffs = signal<GetStaffDto[]>([]);
|
||||
staffsLoading = signal<boolean>(false);
|
||||
|
||||
async ngOnInit() {
|
||||
await this.fetchStaff();
|
||||
}
|
||||
|
||||
async fetchStaff() {
|
||||
this.staffsLoading.set(true);
|
||||
try {
|
||||
const staff = await firstValueFrom(this.staffsService.getAllStaffsEndpoint())
|
||||
this.staffs.set(staff)
|
||||
} catch (e) {
|
||||
this.notificationService.error('Erreur', 'Erreur de communication avec l\'API');
|
||||
}
|
||||
|
||||
this.staffsLoading.set(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,22 +11,13 @@ api/customers.service.ts
|
||||
api/customertypes.service.ts
|
||||
api/experiencelevels.service.ts
|
||||
api/historyofapprovals.service.ts
|
||||
api/providers.service.ts
|
||||
api/providertype.service.ts
|
||||
api/providertypes.service.ts
|
||||
api/serviceproviders.service.ts
|
||||
api/staffs.service.ts
|
||||
configuration.ts
|
||||
encoder.ts
|
||||
git_push.sh
|
||||
index.ts
|
||||
model/action-of-authorization-policy-builder.ts
|
||||
model/assembly.ts
|
||||
model/base-endpoint.ts
|
||||
model/calling-conventions.ts
|
||||
model/claim.ts
|
||||
model/claims-identity.ts
|
||||
model/claims-principal.ts
|
||||
model/constructor-info.ts
|
||||
model/create-availability-dto.ts
|
||||
model/create-communication-dto.ts
|
||||
model/create-contact-dto.ts
|
||||
@@ -37,17 +28,6 @@ model/create-history-of-approval-dto.ts
|
||||
model/create-provider-dto.ts
|
||||
model/create-provider-type-dto.ts
|
||||
model/create-staff-dto.ts
|
||||
model/custom-attribute-data.ts
|
||||
model/custom-attribute-named-argument.ts
|
||||
model/custom-attribute-typed-argument.ts
|
||||
model/delegate.ts
|
||||
model/endpoint-definition.ts
|
||||
model/endpoint-of-empty-request-and-list-of-get-communication-dto.ts
|
||||
model/endpoint-summary.ts
|
||||
model/endpoint-without-request-of-list-of-get-communication-dto.ts
|
||||
model/ep-version.ts
|
||||
model/func-of-object.ts
|
||||
model/get-all-communications-endpoint.ts
|
||||
model/get-availability-dto.ts
|
||||
model/get-communication-dto.ts
|
||||
model/get-contact-dto.ts
|
||||
@@ -58,25 +38,7 @@ model/get-history-of-approval-dto.ts
|
||||
model/get-provider-dto.ts
|
||||
model/get-provider-type-dto.ts
|
||||
model/get-staff-dto.ts
|
||||
model/http.ts
|
||||
model/i-identity.ts
|
||||
model/i-web-host-environment.ts
|
||||
model/idempotency-options.ts
|
||||
model/member-info.ts
|
||||
model/member-types.ts
|
||||
model/method-base.ts
|
||||
model/method-impl-attributes.ts
|
||||
model/method-info.ts
|
||||
model/models.ts
|
||||
model/module-handle.ts
|
||||
model/module.ts
|
||||
model/multicast-delegate.ts
|
||||
model/parameter-attributes.ts
|
||||
model/parameter-info.ts
|
||||
model/request-example.ts
|
||||
model/response-header.ts
|
||||
model/security-rule-set.ts
|
||||
model/severity.ts
|
||||
model/update-availability-dto.ts
|
||||
model/update-communication-dto.ts
|
||||
model/update-contact-dto.ts
|
||||
@@ -87,7 +49,6 @@ model/update-history-of-approval-dto.ts
|
||||
model/update-provider-dto.ts
|
||||
model/update-provider-type-dto.ts
|
||||
model/update-staff-dto.ts
|
||||
model/validation-failure.ts
|
||||
param.ts
|
||||
provide-api.ts
|
||||
variables.ts
|
||||
|
||||
@@ -12,12 +12,10 @@ export * from './experiencelevels.service';
|
||||
import { ExperiencelevelsService } from './experiencelevels.service';
|
||||
export * from './historyofapprovals.service';
|
||||
import { HistoryofapprovalsService } from './historyofapprovals.service';
|
||||
export * from './providers.service';
|
||||
import { ProvidersService } from './providers.service';
|
||||
export * from './providertype.service';
|
||||
import { ProvidertypeService } from './providertype.service';
|
||||
export * from './providertypes.service';
|
||||
import { ProvidertypesService } from './providertypes.service';
|
||||
export * from './serviceproviders.service';
|
||||
import { ServiceprovidersService } from './serviceproviders.service';
|
||||
export * from './staffs.service';
|
||||
import { StaffsService } from './staffs.service';
|
||||
export const APIS = [AvailabilitiesService, CommunicationsService, ContactsService, CustomersService, CustomertypesService, ExperiencelevelsService, HistoryofapprovalsService, ProvidersService, ProvidertypeService, ProvidertypesService, StaffsService];
|
||||
export const APIS = [AvailabilitiesService, CommunicationsService, ContactsService, CustomersService, CustomertypesService, ExperiencelevelsService, HistoryofapprovalsService, ProvidertypesService, ServiceprovidersService, StaffsService];
|
||||
|
||||
@@ -19,8 +19,6 @@ import { Observable } from 'rxjs';
|
||||
// @ts-ignore
|
||||
import { CreateCommunicationDto } from '../model/create-communication-dto';
|
||||
// @ts-ignore
|
||||
import { GetAllCommunicationsEndpoint } from '../model/get-all-communications-endpoint';
|
||||
// @ts-ignore
|
||||
import { GetCommunicationDto } from '../model/get-communication-dto';
|
||||
// @ts-ignore
|
||||
import { UpdateCommunicationDto } from '../model/update-communication-dto';
|
||||
@@ -108,20 +106,16 @@ export class CommunicationsService extends BaseService {
|
||||
/**
|
||||
* @endpoint delete /API/communications/{id}
|
||||
* @param id
|
||||
* @param getCommunicationDto
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public deleteCommunicationEndpoint(id: number, getCommunicationDto: GetCommunicationDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<GetAllCommunicationsEndpoint>;
|
||||
public deleteCommunicationEndpoint(id: number, getCommunicationDto: GetCommunicationDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<GetAllCommunicationsEndpoint>>;
|
||||
public deleteCommunicationEndpoint(id: number, getCommunicationDto: GetCommunicationDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<GetAllCommunicationsEndpoint>>;
|
||||
public deleteCommunicationEndpoint(id: number, getCommunicationDto: GetCommunicationDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
public deleteCommunicationEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<GetCommunicationDto>;
|
||||
public deleteCommunicationEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<GetCommunicationDto>>;
|
||||
public deleteCommunicationEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<GetCommunicationDto>>;
|
||||
public deleteCommunicationEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
if (id === null || id === undefined) {
|
||||
throw new Error('Required parameter id was null or undefined when calling deleteCommunicationEndpoint.');
|
||||
}
|
||||
if (getCommunicationDto === null || getCommunicationDto === undefined) {
|
||||
throw new Error('Required parameter getCommunicationDto was null or undefined when calling deleteCommunicationEndpoint.');
|
||||
}
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
@@ -137,15 +131,6 @@ export class CommunicationsService extends BaseService {
|
||||
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
||||
if (localVarHttpHeaderAcceptSelected) {
|
||||
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
||||
@@ -159,10 +144,9 @@ export class CommunicationsService extends BaseService {
|
||||
|
||||
let localVarPath = `/API/communications/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<GetAllCommunicationsEndpoint>('delete', `${basePath}${localVarPath}`,
|
||||
return this.httpClient.request<GetCommunicationDto>('delete', `${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
body: getCommunicationDto,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
|
||||
@@ -162,10 +162,10 @@ export class ContactsService extends BaseService {
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public getAllContactxuest(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<GetContactDto>>;
|
||||
public getAllContactxuest(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<GetContactDto>>>;
|
||||
public getAllContactxuest(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<GetContactDto>>>;
|
||||
public getAllContactxuest(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
public getAllContactEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<GetContactDto>>;
|
||||
public getAllContactEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<GetContactDto>>>;
|
||||
public getAllContactEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<GetContactDto>>>;
|
||||
public getAllContactEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
@@ -268,15 +268,15 @@ export class ContactsService extends BaseService {
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public updateContactRequest(id: number, updateContactDto: UpdateContactDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<GetContactDto>;
|
||||
public updateContactRequest(id: number, updateContactDto: UpdateContactDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<GetContactDto>>;
|
||||
public updateContactRequest(id: number, updateContactDto: UpdateContactDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<GetContactDto>>;
|
||||
public updateContactRequest(id: number, updateContactDto: UpdateContactDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
public updateContactEndpoint(id: number, updateContactDto: UpdateContactDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<GetContactDto>;
|
||||
public updateContactEndpoint(id: number, updateContactDto: UpdateContactDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<GetContactDto>>;
|
||||
public updateContactEndpoint(id: number, updateContactDto: UpdateContactDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<GetContactDto>>;
|
||||
public updateContactEndpoint(id: number, updateContactDto: UpdateContactDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
if (id === null || id === undefined) {
|
||||
throw new Error('Required parameter id was null or undefined when calling updateContactRequest.');
|
||||
throw new Error('Required parameter id was null or undefined when calling updateContactEndpoint.');
|
||||
}
|
||||
if (updateContactDto === null || updateContactDto === undefined) {
|
||||
throw new Error('Required parameter updateContactDto was null or undefined when calling updateContactRequest.');
|
||||
throw new Error('Required parameter updateContactDto was null or undefined when calling updateContactEndpoint.');
|
||||
}
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
/**
|
||||
* PyroFetes
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
/* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
import { Inject, Injectable, Optional } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders, HttpParams,
|
||||
HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
|
||||
} from '@angular/common/http';
|
||||
import { CustomHttpParameterCodec } from '../encoder';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
// @ts-ignore
|
||||
import { GetProviderTypeDto } from '../model/get-provider-type-dto';
|
||||
|
||||
// @ts-ignore
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
import { Configuration } from '../configuration';
|
||||
import { BaseService } from '../api.base.service';
|
||||
|
||||
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ProvidertypeService extends BaseService {
|
||||
|
||||
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
|
||||
super(basePath, configuration);
|
||||
}
|
||||
|
||||
/**
|
||||
* @endpoint get /API/providertype
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public getAllProviderTypesEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<GetProviderTypeDto>>;
|
||||
public getAllProviderTypesEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<GetProviderTypeDto>>>;
|
||||
public getAllProviderTypesEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<GetProviderTypeDto>>>;
|
||||
public getAllProviderTypesEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
||||
'application/json'
|
||||
]);
|
||||
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
||||
|
||||
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||
|
||||
|
||||
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
||||
if (localVarHttpHeaderAcceptSelected) {
|
||||
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
||||
responseType_ = 'text';
|
||||
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
||||
responseType_ = 'json';
|
||||
} else {
|
||||
responseType_ = 'blob';
|
||||
}
|
||||
}
|
||||
|
||||
let localVarPath = `/API/providertype`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<Array<GetProviderTypeDto>>('get', `${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -157,6 +157,56 @@ export class ProvidertypesService extends BaseService {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @endpoint get /API/providertypes
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public getAllProviderTypesEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<GetProviderTypeDto>>;
|
||||
public getAllProviderTypesEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<GetProviderTypeDto>>>;
|
||||
public getAllProviderTypesEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<GetProviderTypeDto>>>;
|
||||
public getAllProviderTypesEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
||||
'application/json'
|
||||
]);
|
||||
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
||||
|
||||
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||
|
||||
|
||||
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
||||
if (localVarHttpHeaderAcceptSelected) {
|
||||
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
||||
responseType_ = 'text';
|
||||
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
||||
responseType_ = 'json';
|
||||
} else {
|
||||
responseType_ = 'blob';
|
||||
}
|
||||
}
|
||||
|
||||
let localVarPath = `/API/providertypes`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<Array<GetProviderTypeDto>>('get', `${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @endpoint get /API/providertypes/{id}
|
||||
* @param id
|
||||
|
||||
+11
-11
@@ -33,14 +33,14 @@ import { BaseService } from '../api.base.service';
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ProvidersService extends BaseService {
|
||||
export class ServiceprovidersService extends BaseService {
|
||||
|
||||
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
|
||||
super(basePath, configuration);
|
||||
}
|
||||
|
||||
/**
|
||||
* @endpoint post /API/providers
|
||||
* @endpoint post /API/serviceproviders
|
||||
* @param createProviderDto
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
@@ -87,7 +87,7 @@ export class ProvidersService extends BaseService {
|
||||
}
|
||||
}
|
||||
|
||||
let localVarPath = `/API/providers`;
|
||||
let localVarPath = `/API/serviceproviders`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<GetProviderDto>('post', `${basePath}${localVarPath}`,
|
||||
{
|
||||
@@ -104,7 +104,7 @@ export class ProvidersService extends BaseService {
|
||||
}
|
||||
|
||||
/**
|
||||
* @endpoint delete /API/providers/{id}
|
||||
* @endpoint delete /API/serviceproviders/{id}
|
||||
* @param id
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
@@ -142,7 +142,7 @@ export class ProvidersService extends BaseService {
|
||||
}
|
||||
}
|
||||
|
||||
let localVarPath = `/API/providers/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
|
||||
let localVarPath = `/API/serviceproviders/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<GetProviderDto>('delete', `${basePath}${localVarPath}`,
|
||||
{
|
||||
@@ -158,7 +158,7 @@ export class ProvidersService extends BaseService {
|
||||
}
|
||||
|
||||
/**
|
||||
* @endpoint get /API/providers
|
||||
* @endpoint get /API/serviceproviders
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
*/
|
||||
@@ -192,7 +192,7 @@ export class ProvidersService extends BaseService {
|
||||
}
|
||||
}
|
||||
|
||||
let localVarPath = `/API/providers`;
|
||||
let localVarPath = `/API/serviceproviders`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<Array<GetProviderDto>>('get', `${basePath}${localVarPath}`,
|
||||
{
|
||||
@@ -208,7 +208,7 @@ export class ProvidersService extends BaseService {
|
||||
}
|
||||
|
||||
/**
|
||||
* @endpoint get /API/providers/{id}
|
||||
* @endpoint get /API/serviceproviders/{id}
|
||||
* @param id
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
@@ -246,7 +246,7 @@ export class ProvidersService extends BaseService {
|
||||
}
|
||||
}
|
||||
|
||||
let localVarPath = `/API/providers/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
|
||||
let localVarPath = `/API/serviceproviders/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<GetProviderDto>('get', `${basePath}${localVarPath}`,
|
||||
{
|
||||
@@ -262,7 +262,7 @@ export class ProvidersService extends BaseService {
|
||||
}
|
||||
|
||||
/**
|
||||
* @endpoint put /API/providers/{id}
|
||||
* @endpoint put /API/serviceproviders/{id}
|
||||
* @param id
|
||||
* @param updateProviderDto
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
@@ -313,7 +313,7 @@ export class ProvidersService extends BaseService {
|
||||
}
|
||||
}
|
||||
|
||||
let localVarPath = `/API/providers/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
|
||||
let localVarPath = `/API/serviceproviders/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<GetProviderDto>('put', `${basePath}${localVarPath}`,
|
||||
{
|
||||
@@ -268,15 +268,15 @@ export class StaffsService extends BaseService {
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public updateStaffRequest(id: number, updateStaffDto: UpdateStaffDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<GetStaffDto>;
|
||||
public updateStaffRequest(id: number, updateStaffDto: UpdateStaffDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<GetStaffDto>>;
|
||||
public updateStaffRequest(id: number, updateStaffDto: UpdateStaffDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<GetStaffDto>>;
|
||||
public updateStaffRequest(id: number, updateStaffDto: UpdateStaffDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
public updateStaffEndpoint(id: number, updateStaffDto: UpdateStaffDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<GetStaffDto>;
|
||||
public updateStaffEndpoint(id: number, updateStaffDto: UpdateStaffDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<GetStaffDto>>;
|
||||
public updateStaffEndpoint(id: number, updateStaffDto: UpdateStaffDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<GetStaffDto>>;
|
||||
public updateStaffEndpoint(id: number, updateStaffDto: UpdateStaffDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
if (id === null || id === undefined) {
|
||||
throw new Error('Required parameter id was null or undefined when calling updateStaffRequest.');
|
||||
throw new Error('Required parameter id was null or undefined when calling updateStaffEndpoint.');
|
||||
}
|
||||
if (updateStaffDto === null || updateStaffDto === undefined) {
|
||||
throw new Error('Required parameter updateStaffDto was null or undefined when calling updateStaffRequest.');
|
||||
throw new Error('Required parameter updateStaffDto was null or undefined when calling updateStaffEndpoint.');
|
||||
}
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
/**
|
||||
* PyroFetes
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { MethodInfo } from './method-info';
|
||||
|
||||
|
||||
export interface ActionOfAuthorizationPolicyBuilder {
|
||||
target?: any | null;
|
||||
method?: MethodInfo;
|
||||
}
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
/**
|
||||
* PyroFetes
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { CustomAttributeData } from './custom-attribute-data';
|
||||
import { SecurityRuleSet } from './security-rule-set';
|
||||
import { MethodInfo } from './method-info';
|
||||
import { Module } from './module';
|
||||
|
||||
|
||||
export interface Assembly {
|
||||
definedTypes?: Array<string>;
|
||||
exportedTypes?: Array<string>;
|
||||
/** @deprecated */
|
||||
codeBase?: string | null;
|
||||
entryPoint?: MethodInfo | null;
|
||||
fullName?: string | null;
|
||||
imageRuntimeVersion?: string;
|
||||
isDynamic?: boolean;
|
||||
location?: string;
|
||||
reflectionOnly?: boolean;
|
||||
isCollectible?: boolean;
|
||||
isFullyTrusted?: boolean;
|
||||
customAttributes?: Array<CustomAttributeData>;
|
||||
/** @deprecated */
|
||||
escapedCodeBase?: string;
|
||||
manifestModule?: Module;
|
||||
modules?: Array<Module>;
|
||||
/** @deprecated */
|
||||
globalAssemblyCache?: boolean;
|
||||
hostContext?: number;
|
||||
securityRuleSet?: SecurityRuleSet;
|
||||
}
|
||||
export namespace Assembly {
|
||||
}
|
||||
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
/**
|
||||
* PyroFetes
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { EndpointDefinition } from './endpoint-definition';
|
||||
import { ValidationFailure } from './validation-failure';
|
||||
|
||||
|
||||
/**
|
||||
* the base class all fast endpoints inherit from
|
||||
*/
|
||||
export interface BaseEndpoint {
|
||||
definition?: EndpointDefinition;
|
||||
httpContext?: object;
|
||||
validationFailures?: Array<ValidationFailure>;
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
/**
|
||||
* PyroFetes
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export const CallingConventions = {
|
||||
NUMBER_1: 1,
|
||||
NUMBER_2: 2,
|
||||
NUMBER_3: 3,
|
||||
NUMBER_32: 32,
|
||||
NUMBER_64: 64
|
||||
} as const;
|
||||
export type CallingConventions = typeof CallingConventions[keyof typeof CallingConventions];
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
/**
|
||||
* PyroFetes
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { ClaimsIdentity } from './claims-identity';
|
||||
|
||||
|
||||
export interface Claim {
|
||||
issuer?: string;
|
||||
originalIssuer?: string;
|
||||
properties?: { [key: string]: string; };
|
||||
subject?: ClaimsIdentity | null;
|
||||
type?: string;
|
||||
value?: string;
|
||||
valueType?: string;
|
||||
}
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
/**
|
||||
* PyroFetes
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { Claim } from './claim';
|
||||
|
||||
|
||||
export interface ClaimsIdentity {
|
||||
authenticationType?: string | null;
|
||||
isAuthenticated?: boolean;
|
||||
actor?: ClaimsIdentity | null;
|
||||
bootstrapContext?: any | null;
|
||||
claims?: Array<Claim>;
|
||||
label?: string | null;
|
||||
name?: string | null;
|
||||
nameClaimType?: string;
|
||||
roleClaimType?: string;
|
||||
}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
/**
|
||||
* PyroFetes
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { ClaimsIdentity } from './claims-identity';
|
||||
import { IIdentity } from './i-identity';
|
||||
import { Claim } from './claim';
|
||||
|
||||
|
||||
export interface ClaimsPrincipal {
|
||||
claims?: Array<Claim>;
|
||||
identities?: Array<ClaimsIdentity>;
|
||||
identity?: IIdentity | null;
|
||||
}
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
/**
|
||||
* PyroFetes
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { CustomAttributeData } from './custom-attribute-data';
|
||||
import { CallingConventions } from './calling-conventions';
|
||||
import { MethodImplAttributes } from './method-impl-attributes';
|
||||
import { Module } from './module';
|
||||
import { MemberTypes } from './member-types';
|
||||
|
||||
|
||||
export interface ConstructorInfo {
|
||||
module?: Module;
|
||||
customAttributes?: Array<CustomAttributeData>;
|
||||
isCollectible?: boolean;
|
||||
metadataToken?: number;
|
||||
methodImplementationFlags?: MethodImplAttributes;
|
||||
callingConvention?: CallingConventions;
|
||||
isAbstract?: boolean;
|
||||
isConstructor?: boolean;
|
||||
isFinal?: boolean;
|
||||
isHideBySig?: boolean;
|
||||
isSpecialName?: boolean;
|
||||
isStatic?: boolean;
|
||||
isVirtual?: boolean;
|
||||
isAssembly?: boolean;
|
||||
isFamily?: boolean;
|
||||
isFamilyAndAssembly?: boolean;
|
||||
isFamilyOrAssembly?: boolean;
|
||||
isPrivate?: boolean;
|
||||
isPublic?: boolean;
|
||||
isConstructedGenericMethod?: boolean;
|
||||
isGenericMethod?: boolean;
|
||||
isGenericMethodDefinition?: boolean;
|
||||
containsGenericParameters?: boolean;
|
||||
isSecurityCritical?: boolean;
|
||||
isSecuritySafeCritical?: boolean;
|
||||
isSecurityTransparent?: boolean;
|
||||
memberType?: MemberTypes;
|
||||
}
|
||||
export namespace ConstructorInfo {
|
||||
}
|
||||
|
||||
|
||||
@@ -13,5 +13,6 @@ export interface CreateCommunicationDto {
|
||||
calling?: string | null;
|
||||
email?: string | null;
|
||||
meeting?: string | null;
|
||||
contactId?: number;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,5 +11,6 @@
|
||||
|
||||
export interface CreateExperienceLevelDto {
|
||||
label?: string | null;
|
||||
staffId?: number | null;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,5 +12,6 @@
|
||||
export interface CreateHistoryOfApprovalDto {
|
||||
deliveryDate?: string;
|
||||
expirationDate?: string;
|
||||
staffId?: number;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,5 +11,6 @@
|
||||
|
||||
export interface CreateProviderDto {
|
||||
price?: number;
|
||||
providerTypeId?: number;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,11 @@
|
||||
|
||||
|
||||
export interface CreateStaffDto {
|
||||
firstName?: string | null;
|
||||
lastName?: string | null;
|
||||
profession?: string | null;
|
||||
email?: string | null;
|
||||
f4T2NumberApproval?: string | null;
|
||||
f4T2ExpirationDate?: string;
|
||||
f4T2ExpirationDate?: Date | null;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/**
|
||||
* PyroFetes
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { CustomAttributeTypedArgument } from './custom-attribute-typed-argument';
|
||||
import { CustomAttributeNamedArgument } from './custom-attribute-named-argument';
|
||||
import { ConstructorInfo } from './constructor-info';
|
||||
|
||||
|
||||
export interface CustomAttributeData {
|
||||
attributeType?: string;
|
||||
constructor?: ConstructorInfo;
|
||||
constructorArguments?: Array<CustomAttributeTypedArgument>;
|
||||
namedArguments?: Array<CustomAttributeNamedArgument>;
|
||||
}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
/**
|
||||
* PyroFetes
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { CustomAttributeTypedArgument } from './custom-attribute-typed-argument';
|
||||
import { MemberInfo } from './member-info';
|
||||
|
||||
|
||||
export interface CustomAttributeNamedArgument {
|
||||
memberInfo?: MemberInfo;
|
||||
typedValue?: CustomAttributeTypedArgument;
|
||||
memberName?: string;
|
||||
isField?: boolean;
|
||||
}
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
/**
|
||||
* PyroFetes
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface CustomAttributeTypedArgument {
|
||||
argumentType?: string;
|
||||
value?: any | null;
|
||||
}
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
/**
|
||||
* PyroFetes
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { MethodInfo } from './method-info';
|
||||
|
||||
|
||||
export interface Delegate {
|
||||
target?: any | null;
|
||||
method?: MethodInfo;
|
||||
}
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
/**
|
||||
* PyroFetes
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { ActionOfAuthorizationPolicyBuilder } from './action-of-authorization-policy-builder';
|
||||
import { IdempotencyOptions } from './idempotency-options';
|
||||
import { EndpointSummary } from './endpoint-summary';
|
||||
import { EpVersion } from './ep-version';
|
||||
|
||||
|
||||
/**
|
||||
* represents the configuration settings of an endpoint
|
||||
*/
|
||||
export interface EndpointDefinition {
|
||||
endpointType?: string;
|
||||
mapperType?: string | null;
|
||||
preProcessorsList?: Array<object>;
|
||||
postProcessorsList?: Array<object>;
|
||||
reqDtoType?: string;
|
||||
resDtoType?: string;
|
||||
routes?: Array<string>;
|
||||
securityPolicyName?: string;
|
||||
validatorType?: string | null;
|
||||
verbs?: Array<string>;
|
||||
version?: EpVersion;
|
||||
allowAnyPermission?: boolean;
|
||||
allowedPermissions?: Array<string> | null;
|
||||
allowAnyScope?: boolean;
|
||||
allowedScopes?: Array<string> | null;
|
||||
allowAnyClaim?: boolean;
|
||||
allowedClaimTypes?: Array<string> | null;
|
||||
allowedRoles?: Array<string> | null;
|
||||
anonymousVerbs?: Array<string> | null;
|
||||
antiforgeryEnabled?: boolean;
|
||||
authSchemeNames?: Array<string> | null;
|
||||
dontAutoSend?: boolean;
|
||||
dontAutoTagEndpoints?: boolean;
|
||||
dontBindFormData?: boolean;
|
||||
doNotCatchExceptions?: boolean;
|
||||
endpointAttributes?: Array<any> | null;
|
||||
endpointSummary?: EndpointSummary | null;
|
||||
endpointTags?: Array<string> | null;
|
||||
formDataContentType?: string | null;
|
||||
idempotencyOptions?: IdempotencyOptions | null;
|
||||
overriddenRoutePrefix?: string | null;
|
||||
preBuiltUserPolicies?: Array<string> | null;
|
||||
policyBuilder?: ActionOfAuthorizationPolicyBuilder | null;
|
||||
throwIfValidationFails?: boolean;
|
||||
}
|
||||
|
||||
-58
@@ -1,58 +0,0 @@
|
||||
/**
|
||||
* PyroFetes
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { GetCommunicationDto } from './get-communication-dto';
|
||||
import { ClaimsPrincipal } from './claims-principal';
|
||||
import { EndpointDefinition } from './endpoint-definition';
|
||||
import { Http } from './http';
|
||||
import { IWebHostEnvironment } from './i-web-host-environment';
|
||||
import { ValidationFailure } from './validation-failure';
|
||||
|
||||
|
||||
export interface EndpointOfEmptyRequestAndListOfGetCommunicationDto {
|
||||
definition?: EndpointDefinition;
|
||||
httpContext?: object;
|
||||
validationFailures?: Array<ValidationFailure>;
|
||||
/**
|
||||
* the response object that is serialized to the response stream.
|
||||
*/
|
||||
response?: Array<GetCommunicationDto> | null;
|
||||
user?: ClaimsPrincipal;
|
||||
/**
|
||||
* Represents a set of key/value application configuration properties.
|
||||
*/
|
||||
config?: object;
|
||||
env?: IWebHostEnvironment;
|
||||
/**
|
||||
* Represents a type used to perform logging.
|
||||
*/
|
||||
logger?: object;
|
||||
/**
|
||||
* the base url of the current request
|
||||
*/
|
||||
baseURL?: string;
|
||||
httpMethod?: Http;
|
||||
/**
|
||||
* the form sent with the request. only populated if content-type is \'application/x-www-form-urlencoded\' or \'multipart/form-data\'
|
||||
*/
|
||||
form?: Array<any>;
|
||||
/**
|
||||
* the files sent with the request. only populated when content-type is \'multipart/form-data\'
|
||||
*/
|
||||
files?: Array<any>;
|
||||
/**
|
||||
* get or set whether the response has started. you\'d only use this if you\'re writing to the response stream by yourself.
|
||||
*/
|
||||
responseStarted?: boolean;
|
||||
validationFailed?: boolean;
|
||||
}
|
||||
export namespace EndpointOfEmptyRequestAndListOfGetCommunicationDto {
|
||||
}
|
||||
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
/**
|
||||
* PyroFetes
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { RequestExample } from './request-example';
|
||||
import { ResponseHeader } from './response-header';
|
||||
|
||||
|
||||
/**
|
||||
* a class used for providing a textual description about an endpoint for swagger
|
||||
*/
|
||||
export interface EndpointSummary {
|
||||
/**
|
||||
* the short summary of the endpoint
|
||||
*/
|
||||
summary?: string;
|
||||
/**
|
||||
* the long description of the endpoint
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* specify multiple request examples by adding to this collection.
|
||||
*/
|
||||
requestExamples?: Array<RequestExample>;
|
||||
/**
|
||||
* an example request object to be used in swagger/ openapi. multiple examples can be specified by setting this property multiple times or by adding to the RequestExamples collection.
|
||||
*/
|
||||
exampleRequest?: any | null;
|
||||
/**
|
||||
* the descriptions for endpoint parameters. you can add descriptions for route/query params and request dto properties. what you specify here will take precedence over xml comments of dto classes (if they are also specified).
|
||||
*/
|
||||
params?: { [key: string]: string; };
|
||||
/**
|
||||
* the descriptions of the different responses/ status codes an endpoint can return
|
||||
*/
|
||||
responses?: { [key: string]: string; };
|
||||
/**
|
||||
* the response examples for each status code
|
||||
*/
|
||||
responseExamples?: { [key: string]: any; };
|
||||
responseHeaders?: Array<ResponseHeader>;
|
||||
}
|
||||
|
||||
-58
@@ -1,58 +0,0 @@
|
||||
/**
|
||||
* PyroFetes
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { GetCommunicationDto } from './get-communication-dto';
|
||||
import { ClaimsPrincipal } from './claims-principal';
|
||||
import { EndpointDefinition } from './endpoint-definition';
|
||||
import { Http } from './http';
|
||||
import { IWebHostEnvironment } from './i-web-host-environment';
|
||||
import { ValidationFailure } from './validation-failure';
|
||||
|
||||
|
||||
export interface EndpointWithoutRequestOfListOfGetCommunicationDto {
|
||||
definition?: EndpointDefinition;
|
||||
httpContext?: object;
|
||||
validationFailures?: Array<ValidationFailure>;
|
||||
/**
|
||||
* the response object that is serialized to the response stream.
|
||||
*/
|
||||
response?: Array<GetCommunicationDto> | null;
|
||||
user?: ClaimsPrincipal;
|
||||
/**
|
||||
* Represents a set of key/value application configuration properties.
|
||||
*/
|
||||
config?: object;
|
||||
env?: IWebHostEnvironment;
|
||||
/**
|
||||
* Represents a type used to perform logging.
|
||||
*/
|
||||
logger?: object;
|
||||
/**
|
||||
* the base url of the current request
|
||||
*/
|
||||
baseURL?: string;
|
||||
httpMethod?: Http;
|
||||
/**
|
||||
* the form sent with the request. only populated if content-type is \'application/x-www-form-urlencoded\' or \'multipart/form-data\'
|
||||
*/
|
||||
form?: Array<object>;
|
||||
/**
|
||||
* the files sent with the request. only populated when content-type is \'multipart/form-data\'
|
||||
*/
|
||||
files?: Array<object>;
|
||||
/**
|
||||
* get or set whether the response has started. you\'d only use this if you\'re writing to the response stream by yourself.
|
||||
*/
|
||||
responseStarted?: boolean;
|
||||
validationFailed?: boolean;
|
||||
}
|
||||
export namespace EndpointWithoutRequestOfListOfGetCommunicationDto {
|
||||
}
|
||||
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
/**
|
||||
* PyroFetes
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* represents an endpoint version
|
||||
*/
|
||||
export interface EpVersion {
|
||||
current?: number;
|
||||
startingReleaseVersion?: number;
|
||||
deprecatedAt?: number;
|
||||
}
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
/**
|
||||
* PyroFetes
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { MethodInfo } from './method-info';
|
||||
|
||||
|
||||
export interface FuncOfObject {
|
||||
target?: any | null;
|
||||
method?: MethodInfo;
|
||||
}
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
/**
|
||||
* PyroFetes
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { GetCommunicationDto } from './get-communication-dto';
|
||||
import { ClaimsPrincipal } from './claims-principal';
|
||||
import { EndpointDefinition } from './endpoint-definition';
|
||||
import { Http } from './http';
|
||||
import { IWebHostEnvironment } from './i-web-host-environment';
|
||||
import { ValidationFailure } from './validation-failure';
|
||||
|
||||
|
||||
export interface GetAllCommunicationsEndpoint {
|
||||
definition?: EndpointDefinition;
|
||||
httpContext?: object;
|
||||
validationFailures?: Array<ValidationFailure>;
|
||||
/**
|
||||
* the response object that is serialized to the response stream.
|
||||
*/
|
||||
response?: Array<GetCommunicationDto> | null;
|
||||
user?: ClaimsPrincipal;
|
||||
/**
|
||||
* Represents a set of key/value application configuration properties.
|
||||
*/
|
||||
config?: object;
|
||||
env?: IWebHostEnvironment;
|
||||
/**
|
||||
* Represents a type used to perform logging.
|
||||
*/
|
||||
logger?: object;
|
||||
/**
|
||||
* the base url of the current request
|
||||
*/
|
||||
baseURL?: string;
|
||||
httpMethod?: Http;
|
||||
/**
|
||||
* the form sent with the request. only populated if content-type is \'application/x-www-form-urlencoded\' or \'multipart/form-data\'
|
||||
*/
|
||||
form?: Array<object>;
|
||||
/**
|
||||
* the files sent with the request. only populated when content-type is \'multipart/form-data\'
|
||||
*/
|
||||
files?: Array<object>;
|
||||
/**
|
||||
* get or set whether the response has started. you\'d only use this if you\'re writing to the response stream by yourself.
|
||||
*/
|
||||
responseStarted?: boolean;
|
||||
validationFailed?: boolean;
|
||||
}
|
||||
export namespace GetAllCommunicationsEndpoint {
|
||||
}
|
||||
|
||||
|
||||
@@ -10,8 +10,14 @@
|
||||
|
||||
|
||||
export interface GetCommunicationDto {
|
||||
id?: number;
|
||||
calling?: string | null;
|
||||
email?: string | null;
|
||||
meeting?: string | null;
|
||||
contactId?: number;
|
||||
contactFirstName?: string | null;
|
||||
contactLastName?: string | null;
|
||||
contactEmail?: string | null;
|
||||
contactPhoneNumber?: string | null;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,5 +13,6 @@ export interface GetCustomerDto {
|
||||
id?: number;
|
||||
note?: string | null;
|
||||
customerTypeId?: number;
|
||||
customerType?: string | null;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,5 +12,6 @@
|
||||
export interface GetExperienceLevelDto {
|
||||
id?: number;
|
||||
label?: string | null;
|
||||
staffId?: number | null;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,5 +13,6 @@ export interface GetHistoryOfApprovalDto {
|
||||
id?: number;
|
||||
deliveryDate?: string;
|
||||
expirationDate?: string;
|
||||
staffId?: number;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,5 +12,7 @@
|
||||
export interface GetProviderDto {
|
||||
id?: number;
|
||||
price?: number;
|
||||
providerTypeId?: number;
|
||||
providerType?: string | null;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,12 @@
|
||||
|
||||
export interface GetStaffDto {
|
||||
id?: number;
|
||||
firstName?: string | null;
|
||||
lastName?: string | null;
|
||||
profession?: string | null;
|
||||
email?: string | null;
|
||||
f4T2NumberApproval?: string | null;
|
||||
f4T2ExpirationDate?: string;
|
||||
f4T2ExpirationDate?: Date | null;
|
||||
experienceLevel?: string | null;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
/**
|
||||
* PyroFetes
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* enum for specifying a http verb
|
||||
*/
|
||||
export const Http = {
|
||||
NUMBER_1: 1,
|
||||
NUMBER_2: 2,
|
||||
NUMBER_3: 3,
|
||||
NUMBER_4: 4,
|
||||
NUMBER_5: 5,
|
||||
NUMBER_6: 6,
|
||||
NUMBER_7: 7,
|
||||
NUMBER_8: 8,
|
||||
NUMBER_9: 9
|
||||
} as const;
|
||||
export type Http = typeof Http[keyof typeof Http];
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
/**
|
||||
* PyroFetes
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface IIdentity {
|
||||
name?: string | null;
|
||||
authenticationType?: string | null;
|
||||
isAuthenticated?: boolean;
|
||||
}
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
/**
|
||||
* PyroFetes
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface IWebHostEnvironment {
|
||||
webRootPath?: string;
|
||||
/**
|
||||
* A read-only file provider abstraction.
|
||||
*/
|
||||
webRootFileProvider?: object;
|
||||
}
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
/**
|
||||
* PyroFetes
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { FuncOfObject } from './func-of-object';
|
||||
|
||||
|
||||
/**
|
||||
* idempotency settings for an endpoint
|
||||
*/
|
||||
export interface IdempotencyOptions {
|
||||
/**
|
||||
* the header name that will contain the idempotency key. defaults to Idempotency-Key
|
||||
*/
|
||||
headerName?: string;
|
||||
/**
|
||||
* any additional headers that should participate in the generation of the cache-key. see the source/definition for the list of default additional headers.
|
||||
*/
|
||||
additionalHeaders?: Array<string>;
|
||||
/**
|
||||
* by default, the contents of the request body (form data/json) is taken into consideration when determining the uniqueness of incoming requests even if the idempotency-key is the same among them. i.e. if two different requests come in with the same idempotency-key but with different request body content, they will be considered to be unique requests and the endpoint will be executed for each request.
|
||||
*/
|
||||
ignoreRequestBody?: boolean;
|
||||
/**
|
||||
* determines how long the cached responses will remain in the cache store before being evicted. defaults to 10 minutes.
|
||||
*/
|
||||
cacheDuration?: string;
|
||||
/**
|
||||
* by default, the idempotency header will be automatically added to the response headers collection. set false to prevent that from happening.
|
||||
*/
|
||||
addHeaderToResponse?: boolean;
|
||||
/**
|
||||
* the description text for the swagger request header parameter
|
||||
*/
|
||||
swaggerHeaderDescription?: string | null;
|
||||
swaggerExampleGenerator?: FuncOfObject | null;
|
||||
/**
|
||||
* the type/format of the swagger example value
|
||||
*/
|
||||
swaggerHeaderType?: string | null;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user