Commit 4f0b56ab by Nattana Chaiyamat

backupโค้ดเปลี่ยนเครื่อง

parent fddf6930
...@@ -2761,6 +2761,271 @@ ...@@ -2761,6 +2761,271 @@
"resolved": "https://registry.npmjs.org/@swimlane/ngx-datatable/-/ngx-datatable-17.1.0.tgz", "resolved": "https://registry.npmjs.org/@swimlane/ngx-datatable/-/ngx-datatable-17.1.0.tgz",
"integrity": "sha512-zYUS7uNO9OJ5UQZFuuTRjlPu6vdKA+FHYLfeEs7PgSuUiDCcbl2SWoUdS/3zIoWn/qQyws767ueWiAvvWUbpEw==" "integrity": "sha512-zYUS7uNO9OJ5UQZFuuTRjlPu6vdKA+FHYLfeEs7PgSuUiDCcbl2SWoUdS/3zIoWn/qQyws767ueWiAvvWUbpEw=="
}, },
"@syncfusion/ej2-angular-base": {
"version": "29.2.4",
"resolved": "https://registry.npmjs.org/@syncfusion/ej2-angular-base/-/ej2-angular-base-29.2.4.tgz",
"integrity": "sha512-6SiGkjKOy/9RwfkFNKCix5OjoZkN7bqN+76S0+0FOP67fLH9DYcDvwkkSd7tVNAHnEbfSh8SV5oSjEm4hvYSNQ==",
"requires": {
"@syncfusion/ej2-base": "~29.2.4",
"@syncfusion/ej2-icons": "~29.2.4"
}
},
"@syncfusion/ej2-angular-dropdowns": {
"version": "29.2.7",
"resolved": "https://registry.npmjs.org/@syncfusion/ej2-angular-dropdowns/-/ej2-angular-dropdowns-29.2.7.tgz",
"integrity": "sha512-30cS9p79UH8mEeopFDExZnILw/e7pq02LYDM4gZWx2YUIKqMPzFz7DDb89SEw7K3JFagunUToXIO7VnaDUo94A==",
"requires": {
"@syncfusion/ej2-angular-base": "~29.2.4",
"@syncfusion/ej2-base": "~29.2.4",
"@syncfusion/ej2-dropdowns": "29.2.7"
}
},
"@syncfusion/ej2-angular-grids": {
"version": "29.2.7",
"resolved": "https://registry.npmjs.org/@syncfusion/ej2-angular-grids/-/ej2-angular-grids-29.2.7.tgz",
"integrity": "sha512-1XJcqJw50DhPaNX68/ybanpK3luegbPNxFoGtfsPT4kCJ+NkVlGrXT+Kc0Hc80M5LM0Vw/lodypC4K/GQd94cg==",
"requires": {
"@syncfusion/ej2-angular-base": "~29.2.4",
"@syncfusion/ej2-base": "~29.2.4",
"@syncfusion/ej2-grids": "29.2.7"
}
},
"@syncfusion/ej2-angular-inputs": {
"version": "29.2.5",
"resolved": "https://registry.npmjs.org/@syncfusion/ej2-angular-inputs/-/ej2-angular-inputs-29.2.5.tgz",
"integrity": "sha512-839rdXnftfuXQXeLE/u3InLwNmjR/NiQifM7F1BY6ZfoKNAm2jfZMI+t3sX7j87/DBIeUPaUkJNhkjjhl1b2Jg==",
"requires": {
"@syncfusion/ej2-angular-base": "~29.2.4",
"@syncfusion/ej2-base": "~29.2.4",
"@syncfusion/ej2-inputs": "29.2.5"
}
},
"@syncfusion/ej2-angular-pivotview": {
"version": "29.2.4",
"resolved": "https://registry.npmjs.org/@syncfusion/ej2-angular-pivotview/-/ej2-angular-pivotview-29.2.4.tgz",
"integrity": "sha512-hodqoX+tMn2sShPWRaVny3cyJN24CYU5oHnnZUyjkEKrjz7v6iAmCVHzuxqTQczZHUXaGqKvekF/ZfwEdStZNQ==",
"requires": {
"@syncfusion/ej2-angular-base": "~29.2.4",
"@syncfusion/ej2-base": "~29.2.4",
"@syncfusion/ej2-pivotview": "29.2.4"
}
},
"@syncfusion/ej2-base": {
"version": "29.2.4",
"resolved": "https://registry.npmjs.org/@syncfusion/ej2-base/-/ej2-base-29.2.4.tgz",
"integrity": "sha512-ka+ClGOvb4RzyPq5sveOO8TUMjIvSOBwExnbOG47YwMrC0RGJSNc6wJlhtm+6ZtmHx457oyH7c/WEj5wfV2B4w==",
"requires": {
"@syncfusion/ej2-icons": "~29.2.4"
}
},
"@syncfusion/ej2-buttons": {
"version": "29.2.5",
"resolved": "https://registry.npmjs.org/@syncfusion/ej2-buttons/-/ej2-buttons-29.2.5.tgz",
"integrity": "sha512-FbMi9rUi/7i8mpPA6KRaO7qW/3wIeH759u2/Ag0iMQUEdtdK7NvOCSFF29WESeBjW6GmEJ8zkW0340ymgXZruQ==",
"requires": {
"@syncfusion/ej2-base": "~29.2.4"
}
},
"@syncfusion/ej2-calendars": {
"version": "29.2.5",
"resolved": "https://registry.npmjs.org/@syncfusion/ej2-calendars/-/ej2-calendars-29.2.5.tgz",
"integrity": "sha512-CIKB1ZMGasgau7E0FWJqrYV0dUQ0MCWlESrMnWFZ5sncsFHRVit7+JVgZdwZfmGKTPZuatq+ACUYOMJS0Le76g==",
"requires": {
"@syncfusion/ej2-base": "~29.2.4",
"@syncfusion/ej2-buttons": "~29.2.5",
"@syncfusion/ej2-inputs": "~29.2.5",
"@syncfusion/ej2-lists": "~29.2.4",
"@syncfusion/ej2-popups": "~29.2.4"
}
},
"@syncfusion/ej2-charts": {
"version": "29.2.5",
"resolved": "https://registry.npmjs.org/@syncfusion/ej2-charts/-/ej2-charts-29.2.5.tgz",
"integrity": "sha512-IM/aGWa3ldXrXZAR8b4cT3nkCuhQyNHvIIxnPRR92Su6nA55gY12ORlQu4AURfLef+QPZe2DXqdjbhWXqFTJ3w==",
"requires": {
"@syncfusion/ej2-base": "~29.2.4",
"@syncfusion/ej2-calendars": "~29.2.5",
"@syncfusion/ej2-data": "~29.2.4",
"@syncfusion/ej2-excel-export": "~29.2.4",
"@syncfusion/ej2-navigations": "~29.2.5",
"@syncfusion/ej2-pdf-export": "~29.2.4",
"@syncfusion/ej2-svg-base": "~29.2.4"
}
},
"@syncfusion/ej2-compression": {
"version": "29.2.4",
"resolved": "https://registry.npmjs.org/@syncfusion/ej2-compression/-/ej2-compression-29.2.4.tgz",
"integrity": "sha512-mcgFmgtITGxoX4zV4LrFGAOHOQD8Z7is85vQE+k2Bf4OI6rZsLNIQFm6KEFg+sZMOSrABzKzg49yrktmlus4TQ==",
"requires": {
"@syncfusion/ej2-file-utils": "~29.2.4"
}
},
"@syncfusion/ej2-data": {
"version": "29.2.4",
"resolved": "https://registry.npmjs.org/@syncfusion/ej2-data/-/ej2-data-29.2.4.tgz",
"integrity": "sha512-2R+N65OPq+yfwTXyBz7NdD8MHGoxUbJSEWGT0kNEGMiobiI4AL+hfMYEhXWXE+DqL5Pm0txA4gTXQprFXXbccg==",
"requires": {
"@syncfusion/ej2-base": "~29.2.4"
}
},
"@syncfusion/ej2-dropdowns": {
"version": "29.2.7",
"resolved": "https://registry.npmjs.org/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-29.2.7.tgz",
"integrity": "sha512-0lOX8y01gi2LupQ9GeP5ql9VPmU05enEufz5l2Btm+2bMkHWyybJwvcOHZq5cUGoNkOTyNrgy+0ClYeQvLCS2Q==",
"requires": {
"@syncfusion/ej2-base": "~29.2.4",
"@syncfusion/ej2-data": "~29.2.4",
"@syncfusion/ej2-inputs": "~29.2.5",
"@syncfusion/ej2-lists": "~29.2.4",
"@syncfusion/ej2-navigations": "~29.2.7",
"@syncfusion/ej2-notifications": "~29.2.4",
"@syncfusion/ej2-popups": "~29.2.7"
}
},
"@syncfusion/ej2-excel-export": {
"version": "29.2.4",
"resolved": "https://registry.npmjs.org/@syncfusion/ej2-excel-export/-/ej2-excel-export-29.2.4.tgz",
"integrity": "sha512-N3VAdlhP+Wq/Uyl82ZSx6x8zL3slgtEKzWb13nrfas7cdJicYrbx02YZru5/euaeE3yGTlbKmhjjLLbkVFU/kQ==",
"requires": {
"@syncfusion/ej2-base": "~29.2.4",
"@syncfusion/ej2-compression": "~29.2.4"
}
},
"@syncfusion/ej2-file-utils": {
"version": "29.2.4",
"resolved": "https://registry.npmjs.org/@syncfusion/ej2-file-utils/-/ej2-file-utils-29.2.4.tgz",
"integrity": "sha512-nnvZ+1xVULe418habMciZnDAoMOM+TqFaFpO9kf4Cct9RPYUr22Tsvu84CZI7yzzKj/dLfD4n5TRRCHVo+5vVA=="
},
"@syncfusion/ej2-grids": {
"version": "29.2.7",
"resolved": "https://registry.npmjs.org/@syncfusion/ej2-grids/-/ej2-grids-29.2.7.tgz",
"integrity": "sha512-aie+qudXCReD90LAmPU6XCr9EAT6yclxcsVixiWYkXJGmGYxNecOHCJ1XcGGWXoNo57rv7cmlGbXfIsN5Q4Ptw==",
"requires": {
"@syncfusion/ej2-base": "~29.2.4",
"@syncfusion/ej2-buttons": "~29.2.5",
"@syncfusion/ej2-calendars": "~29.2.5",
"@syncfusion/ej2-compression": "~29.2.4",
"@syncfusion/ej2-data": "~29.2.4",
"@syncfusion/ej2-dropdowns": "~29.2.7",
"@syncfusion/ej2-excel-export": "~29.2.4",
"@syncfusion/ej2-file-utils": "~29.2.4",
"@syncfusion/ej2-inputs": "~29.2.5",
"@syncfusion/ej2-lists": "~29.2.4",
"@syncfusion/ej2-navigations": "~29.2.7",
"@syncfusion/ej2-notifications": "~29.2.4",
"@syncfusion/ej2-pdf-export": "~29.2.4",
"@syncfusion/ej2-popups": "~29.2.7",
"@syncfusion/ej2-splitbuttons": "~29.2.4"
}
},
"@syncfusion/ej2-icons": {
"version": "29.2.4",
"resolved": "https://registry.npmjs.org/@syncfusion/ej2-icons/-/ej2-icons-29.2.4.tgz",
"integrity": "sha512-2DYZglxLM++w0S2wB2bcr/Akk1MODdVhfFYLaLqe6mDHDRicFeTEyvnGPx2SHS2EXXlNNFm2GfNWoNNxgs5MhQ=="
},
"@syncfusion/ej2-inputs": {
"version": "29.2.5",
"resolved": "https://registry.npmjs.org/@syncfusion/ej2-inputs/-/ej2-inputs-29.2.5.tgz",
"integrity": "sha512-3ZqMl005qL0tENHcKvBfKUHMYQ/S0FRYjUDQVDPRsg28tE0Lz87oyamrxLYne3zDBEJ7kxWWnaNpgrTVvxsVNw==",
"requires": {
"@syncfusion/ej2-base": "~29.2.4",
"@syncfusion/ej2-buttons": "~29.2.5",
"@syncfusion/ej2-popups": "~29.2.4",
"@syncfusion/ej2-splitbuttons": "~29.2.4"
}
},
"@syncfusion/ej2-lists": {
"version": "29.2.4",
"resolved": "https://registry.npmjs.org/@syncfusion/ej2-lists/-/ej2-lists-29.2.4.tgz",
"integrity": "sha512-U64nGdZMjnhHG/+YCTF+WhJ3BoUxFyN2DXxv2qlC+wtayMbfioDRwqSQgxTkH8XE4TgrkRFenRtj5SbYLKliSw==",
"requires": {
"@syncfusion/ej2-base": "~29.2.4",
"@syncfusion/ej2-buttons": "~29.2.4",
"@syncfusion/ej2-data": "~29.2.4",
"@syncfusion/ej2-popups": "~29.2.4"
}
},
"@syncfusion/ej2-navigations": {
"version": "29.2.7",
"resolved": "https://registry.npmjs.org/@syncfusion/ej2-navigations/-/ej2-navigations-29.2.7.tgz",
"integrity": "sha512-5rSAS56RH4zWS5caIRtenf1gPauJTf2nZ/Cbs/6Lf2xzqfFeWTNKdYl9nNIszHAn/76v+Kmzn89cBoqAwfkeRA==",
"requires": {
"@syncfusion/ej2-base": "~29.2.4",
"@syncfusion/ej2-buttons": "~29.2.5",
"@syncfusion/ej2-data": "~29.2.4",
"@syncfusion/ej2-inputs": "~29.2.5",
"@syncfusion/ej2-lists": "~29.2.4",
"@syncfusion/ej2-popups": "~29.2.7"
}
},
"@syncfusion/ej2-notifications": {
"version": "29.2.4",
"resolved": "https://registry.npmjs.org/@syncfusion/ej2-notifications/-/ej2-notifications-29.2.4.tgz",
"integrity": "sha512-rB9OuGHWVfnl9aBno+4KRH3aESbakLKYT70V7wjTxwS7u11XbxYwLiA4/YKsTQg/zrgOtcr3Ma1sVOeMYW17gQ==",
"requires": {
"@syncfusion/ej2-base": "~29.2.4",
"@syncfusion/ej2-buttons": "~29.2.4",
"@syncfusion/ej2-popups": "~29.2.4"
}
},
"@syncfusion/ej2-pdf-export": {
"version": "29.2.4",
"resolved": "https://registry.npmjs.org/@syncfusion/ej2-pdf-export/-/ej2-pdf-export-29.2.4.tgz",
"integrity": "sha512-Cb5QKYqhuvEb96DzqJT6/nLuan8FkA40mU4Lggg5Ujo1OdIK3Ca5GolM7HStTct4DnU02UKuXTrqoL5umGTfKQ==",
"requires": {
"@syncfusion/ej2-compression": "~29.2.4"
}
},
"@syncfusion/ej2-pivotview": {
"version": "29.2.4",
"resolved": "https://registry.npmjs.org/@syncfusion/ej2-pivotview/-/ej2-pivotview-29.2.4.tgz",
"integrity": "sha512-C0u+4M+geatx8iTC75G9e7R7YIsVgt+HNmm6tuqWmPC2cjy5KCrdR/D/e6G+FkFrVa8WWUk+MfVmivfDAnsFIA==",
"requires": {
"@syncfusion/ej2-base": "~29.2.4",
"@syncfusion/ej2-buttons": "~29.2.4",
"@syncfusion/ej2-calendars": "~29.2.4",
"@syncfusion/ej2-charts": "~29.2.4",
"@syncfusion/ej2-compression": "~29.2.4",
"@syncfusion/ej2-data": "~29.2.4",
"@syncfusion/ej2-dropdowns": "~29.2.4",
"@syncfusion/ej2-excel-export": "~29.2.4",
"@syncfusion/ej2-file-utils": "~29.2.4",
"@syncfusion/ej2-grids": "~29.2.4",
"@syncfusion/ej2-inputs": "~29.2.4",
"@syncfusion/ej2-lists": "~29.2.4",
"@syncfusion/ej2-navigations": "~29.2.4",
"@syncfusion/ej2-pdf-export": "~29.2.4",
"@syncfusion/ej2-popups": "~29.2.4",
"@syncfusion/ej2-splitbuttons": "~29.2.4",
"@syncfusion/ej2-svg-base": "~29.2.4"
}
},
"@syncfusion/ej2-popups": {
"version": "29.2.7",
"resolved": "https://registry.npmjs.org/@syncfusion/ej2-popups/-/ej2-popups-29.2.7.tgz",
"integrity": "sha512-kDRyqyPwRZjD8Mze3m+4dIaFAorH83jFO4UOD3p5w6VMCYLpi7lmncH3sCHgP/7zD1PsVfzy5iilBvC5mo8Vmw==",
"requires": {
"@syncfusion/ej2-base": "~29.2.4",
"@syncfusion/ej2-buttons": "~29.2.5"
}
},
"@syncfusion/ej2-splitbuttons": {
"version": "29.2.4",
"resolved": "https://registry.npmjs.org/@syncfusion/ej2-splitbuttons/-/ej2-splitbuttons-29.2.4.tgz",
"integrity": "sha512-sZKs0IZJ6+rDK2OLRl+m5Rs1ai84GE9NV2hpDG5CPFv5uM5WoOf33qYOyp6BSuBerpobpycoXDWH/mh1fZSCDw==",
"requires": {
"@syncfusion/ej2-base": "~29.2.4",
"@syncfusion/ej2-popups": "~29.2.4"
}
},
"@syncfusion/ej2-svg-base": {
"version": "29.2.4",
"resolved": "https://registry.npmjs.org/@syncfusion/ej2-svg-base/-/ej2-svg-base-29.2.4.tgz",
"integrity": "sha512-rLEnJTBQ1AxmfiBo4T/sGwG0fOTVPyLVa3NDMx9Bre6yIjEbezHyRu5ujrFubgVDNLQZ1StkEnGlGVduPrr3fA==",
"requires": {
"@syncfusion/ej2-base": "~29.2.4"
}
},
"@tootallnate/once": { "@tootallnate/once": {
"version": "1.1.2", "version": "1.1.2",
"resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz",
...@@ -3094,6 +3359,12 @@ ...@@ -3094,6 +3359,12 @@
"integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==", "integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==",
"dev": true "dev": true
}, },
"@types/file-saver": {
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/@types/file-saver/-/file-saver-2.0.7.tgz",
"integrity": "sha512-dNKVfHd/jk0SkR/exKGj2ggkB45MAkzvWCaqLUUgkyjITkGNzH8H+yUwr+BLJUBjZOe9w8X3wgmXhZDRg1ED6A==",
"dev": true
},
"@types/geojson": { "@types/geojson": {
"version": "7946.0.14", "version": "7946.0.14",
"resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.14.tgz", "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.14.tgz",
...@@ -4084,6 +4355,16 @@ ...@@ -4084,6 +4355,16 @@
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
"integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==" "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw=="
}, },
"bindings": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
"dev": true,
"optional": true,
"requires": {
"file-uri-to-path": "1.0.0"
}
},
"bl": { "bl": {
"version": "4.1.0", "version": "4.1.0",
"resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
...@@ -7033,6 +7314,13 @@ ...@@ -7033,6 +7314,13 @@
"resolved": "https://registry.npmjs.org/file-saver/-/file-saver-2.0.5.tgz", "resolved": "https://registry.npmjs.org/file-saver/-/file-saver-2.0.5.tgz",
"integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA==" "integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA=="
}, },
"file-uri-to-path": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
"dev": true,
"optional": true
},
"fill-range": { "fill-range": {
"version": "7.1.1", "version": "7.1.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
...@@ -9349,6 +9637,13 @@ ...@@ -9349,6 +9637,13 @@
"resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
"integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA=="
}, },
"nan": {
"version": "2.22.2",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.22.2.tgz",
"integrity": "sha512-DANghxFkS1plDdRsX0X9pm0Z6SJNN6gBdtXfanwoZ8hooC5gosGFSBGRYHUVPz1asKA/kMRqDRdHrluZ61SpBQ==",
"dev": true,
"optional": true
},
"nanoid": { "nanoid": {
"version": "3.3.7", "version": "3.3.7",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz",
...@@ -9462,11 +9757,35 @@ ...@@ -9462,11 +9757,35 @@
"tslib": "^2.0.0" "tslib": "^2.0.0"
} }
}, },
"ng2-material-dropdown": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/ng2-material-dropdown/-/ng2-material-dropdown-1.0.0.tgz",
"integrity": "sha512-waKgEkKQwGZT0dqRAd3ZW+wueYs5Xw9owiPBSMdg5jru5DcKDpUqFaADMqqI7HPuzJCxNJSln6nXX1tMYDbXGA==",
"requires": {
"tslib": "^2.0.0"
}
},
"ng2-search-filter": { "ng2-search-filter": {
"version": "0.5.1", "version": "0.5.1",
"resolved": "https://registry.npmjs.org/ng2-search-filter/-/ng2-search-filter-0.5.1.tgz", "resolved": "https://registry.npmjs.org/ng2-search-filter/-/ng2-search-filter-0.5.1.tgz",
"integrity": "sha512-noN8R+Gyxo5ZuboEOvq+u0zKio6pEf1IVYQTCZfAfXm6ONmzWu/M2xK0di9oVUprDbPBQXCGUuvD5i2GD+35HA==" "integrity": "sha512-noN8R+Gyxo5ZuboEOvq+u0zKio6pEf1IVYQTCZfAfXm6ONmzWu/M2xK0di9oVUprDbPBQXCGUuvD5i2GD+35HA=="
}, },
"ngx-chips": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/ngx-chips/-/ngx-chips-2.2.2.tgz",
"integrity": "sha512-ZrkqiE4mtTo8cBA4+2C/OBeyPuvC6dgNPz7VflerbpTF8Qp6WwCGnZb4ApH+kcmBpSDSxHAE9lMYuYIrF+rFgA==",
"requires": {
"ng2-material-dropdown": ">=0.11.0",
"tslib": "^1.10.0"
},
"dependencies": {
"tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
}
}
},
"ngx-custom-validators": { "ngx-custom-validators": {
"version": "8.0.0", "version": "8.0.0",
"resolved": "https://registry.npmjs.org/ngx-custom-validators/-/ngx-custom-validators-8.0.0.tgz", "resolved": "https://registry.npmjs.org/ngx-custom-validators/-/ngx-custom-validators-8.0.0.tgz",
...@@ -9519,7 +9838,11 @@ ...@@ -9519,7 +9838,11 @@
"resolved": "https://registry.npmjs.org/nice-napi/-/nice-napi-1.0.2.tgz", "resolved": "https://registry.npmjs.org/nice-napi/-/nice-napi-1.0.2.tgz",
"integrity": "sha512-px/KnJAJZf5RuBGcfD+Sp2pAKq0ytz8j+1NehvgIGFkvtvFrDM3T8E4x/JJODXK9WZow8RRGrbA9QQ3hs+pDhA==", "integrity": "sha512-px/KnJAJZf5RuBGcfD+Sp2pAKq0ytz8j+1NehvgIGFkvtvFrDM3T8E4x/JJODXK9WZow8RRGrbA9QQ3hs+pDhA==",
"dev": true, "dev": true,
"optional": true "optional": true,
"requires": {
"node-addon-api": "^3.0.0",
"node-gyp-build": "^4.2.2"
}
}, },
"nice-try": { "nice-try": {
"version": "1.0.5", "version": "1.0.5",
...@@ -9527,6 +9850,13 @@ ...@@ -9527,6 +9850,13 @@
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
"dev": true "dev": true
}, },
"node-addon-api": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz",
"integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==",
"dev": true,
"optional": true
},
"node-forge": { "node-forge": {
"version": "0.10.0", "version": "0.10.0",
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz",
...@@ -9550,6 +9880,13 @@ ...@@ -9550,6 +9880,13 @@
"which": "^2.0.2" "which": "^2.0.2"
} }
}, },
"node-gyp-build": {
"version": "4.8.4",
"resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz",
"integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==",
"dev": true,
"optional": true
},
"node-releases": { "node-releases": {
"version": "2.0.14", "version": "2.0.14",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz",
...@@ -14760,7 +15097,11 @@ ...@@ -14760,7 +15097,11 @@
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
"dev": true, "dev": true,
"optional": true "optional": true,
"requires": {
"bindings": "^1.5.0",
"nan": "^2.12.1"
}
}, },
"glob-parent": { "glob-parent": {
"version": "3.1.0", "version": "3.1.0",
......
...@@ -29,6 +29,17 @@ ...@@ -29,6 +29,17 @@
"@ngx-translate/http-loader": "^6.0.0", "@ngx-translate/http-loader": "^6.0.0",
"@swimlane/ngx-charts": "^16.0.0", "@swimlane/ngx-charts": "^16.0.0",
"@swimlane/ngx-datatable": "^17.0.0", "@swimlane/ngx-datatable": "^17.0.0",
"@syncfusion/ej2-angular-base": "^29.2.4",
"@syncfusion/ej2-angular-dropdowns": "^29.2.4",
"@syncfusion/ej2-angular-grids": "^29.2.4",
"@syncfusion/ej2-angular-inputs": "^29.2.4",
"@syncfusion/ej2-angular-pivotview": "^29.2.4",
"@syncfusion/ej2-base": "^29.2.4",
"@syncfusion/ej2-buttons": "^29.2.4",
"@syncfusion/ej2-data": "^29.2.4",
"@syncfusion/ej2-dropdowns": "^29.2.4",
"@syncfusion/ej2-grids": "^29.2.4",
"@syncfusion/ej2-inputs": "^29.2.4",
"@types/quill": "1.3.6", "@types/quill": "1.3.6",
"angular-calendar": "^0.28.16", "angular-calendar": "^0.28.16",
"angular-datatables": "^11.1.1", "angular-datatables": "^11.1.1",
...@@ -82,6 +93,7 @@ ...@@ -82,6 +93,7 @@
"@types/c3": "^0.6.4", "@types/c3": "^0.6.4",
"@types/chartist": "^0.9.47", "@types/chartist": "^0.9.47",
"@types/datatables.net": "^1.10.18", "@types/datatables.net": "^1.10.18",
"@types/file-saver": "^2.0.7",
"@types/jasmine": "~3.6.0", "@types/jasmine": "~3.6.0",
"@types/jasminewd2": "^2.0.8", "@types/jasminewd2": "^2.0.8",
"@types/node": "^14.0.13", "@types/node": "^14.0.13",
......
...@@ -98,7 +98,12 @@ import { ApprovedListComponent } from './approved-list/approved-list.component'; ...@@ -98,7 +98,12 @@ import { ApprovedListComponent } from './approved-list/approved-list.component';
import { OpenImageComponent } from './open-image/open-image.component'; import { OpenImageComponent } from './open-image/open-image.component';
import { ListWidgetsComponent } from './list-widgets/list-widgets.component'; import { ListWidgetsComponent } from './list-widgets/list-widgets.component';
import { ViewListWidgetsComponent } from './view-list-widgets/view-list-widgets.component'; import { ViewListWidgetsComponent } from './view-list-widgets/view-list-widgets.component';
import { GridModule } from '@syncfusion/ej2-angular-grids';
import { PivotViewModule } from '@syncfusion/ej2-angular-pivotview';
import { ExcelReportComponent } from './excel-report/excel-report.component';
import { ExcelListComponent } from './excel-list/excel-list.component';
import { ExcelReportToggleComponent } from './excel-report-toggle/excel-report-toggle.component';
import { ExcelReportEmpviewComponent } from './excel-report-empview/excel-report-empview.component';
@NgModule({ @NgModule({
imports: [ imports: [
...@@ -119,7 +124,9 @@ import { ViewListWidgetsComponent } from './view-list-widgets/view-list-widgets. ...@@ -119,7 +124,9 @@ import { ViewListWidgetsComponent } from './view-list-widgets/view-list-widgets.
DragDropModule, DragDropModule,
FlatpickrModule.forRoot(), FlatpickrModule.forRoot(),
HttpClientModule, HttpClientModule,
FeatherModule FeatherModule,
GridModule,
PivotViewModule
], ],
declarations: [ declarations: [
ChatComponent, ChatComponent,
...@@ -173,7 +180,11 @@ import { ViewListWidgetsComponent } from './view-list-widgets/view-list-widgets. ...@@ -173,7 +180,11 @@ import { ViewListWidgetsComponent } from './view-list-widgets/view-list-widgets.
ApprovedListComponent, ApprovedListComponent,
OpenImageComponent, OpenImageComponent,
ListWidgetsComponent, ListWidgetsComponent,
ViewListWidgetsComponent ViewListWidgetsComponent,
ExcelReportComponent,
ExcelListComponent,
ExcelReportToggleComponent,
ExcelReportEmpviewComponent
], ],
providers: [ providers: [
ContactService, ContactService,
......
...@@ -49,6 +49,10 @@ import { ViewListDocComponent } from "./view-list-doc/view-list-doc.component"; ...@@ -49,6 +49,10 @@ import { ViewListDocComponent } from "./view-list-doc/view-list-doc.component";
import { ApprovedListComponent } from "./approved-list/approved-list.component"; import { ApprovedListComponent } from "./approved-list/approved-list.component";
import { ListWidgetsComponent } from "./list-widgets/list-widgets.component"; import { ListWidgetsComponent } from "./list-widgets/list-widgets.component";
import { ViewListWidgetsComponent } from "./view-list-widgets/view-list-widgets.component"; import { ViewListWidgetsComponent } from "./view-list-widgets/view-list-widgets.component";
import { ExcelReportComponent } from "./excel-report/excel-report.component";
import { ExcelListComponent } from "./excel-list/excel-list.component";
import { ExcelReportEmpviewComponent } from "./excel-report-empview/excel-report-empview.component";
import { ExcelReportToggleComponent } from "./excel-report-toggle/excel-report-toggle.component";
export const AppsRoutes: Routes = [ export const AppsRoutes: Routes = [
{ {
path: "", path: "",
...@@ -206,7 +210,7 @@ export const AppsRoutes: Routes = [ ...@@ -206,7 +210,7 @@ export const AppsRoutes: Routes = [
data: { data: {
title: "อนุมัติ Excel", title: "อนุมัติ Excel",
urls: [ urls: [
{ title: "รายการเอกสารรอการอนุมัติ" ,url: "apps/portal-category-list-approve"}, { title: "รายการเอกสารรอการอนุมัติ", url: "apps/portal-category-list-approve" },
{ title: "อนุมัติ Excel" }, { title: "อนุมัติ Excel" },
], ],
}, },
...@@ -217,7 +221,7 @@ export const AppsRoutes: Routes = [ ...@@ -217,7 +221,7 @@ export const AppsRoutes: Routes = [
data: { data: {
title: "อนุมัติเอกสาร", title: "อนุมัติเอกสาร",
urls: [ urls: [
{ title: "รายการเอกสารรอการอนุมัติ" ,url: "apps/portal-category-list-approve"}, { title: "รายการเอกสารรอการอนุมัติ", url: "apps/portal-category-list-approve" },
{ title: "อนุมัติเอกสาร" }, { title: "อนุมัติเอกสาร" },
], ],
}, },
...@@ -228,7 +232,7 @@ export const AppsRoutes: Routes = [ ...@@ -228,7 +232,7 @@ export const AppsRoutes: Routes = [
data: { data: {
title: "อนุมัติหลักสูตร", title: "อนุมัติหลักสูตร",
urls: [ urls: [
{ title: "รายการเอกสารรอการอนุมัติ" ,url: "apps/portal-category-list-approve"}, { title: "รายการเอกสารรอการอนุมัติ", url: "apps/portal-category-list-approve" },
{ title: "อนุมัติหลักสูตร" }, { title: "อนุมัติหลักสูตร" },
], ],
}, },
...@@ -239,7 +243,7 @@ export const AppsRoutes: Routes = [ ...@@ -239,7 +243,7 @@ export const AppsRoutes: Routes = [
data: { data: {
title: "รายการเอกสารผ่านการอนุมัติ", title: "รายการเอกสารผ่านการอนุมัติ",
urls: [ urls: [
{ title: "รายการเอกสารผ่านการอนุมัติ" ,url: "apps/portal-category-list-approve"}, { title: "รายการเอกสารผ่านการอนุมัติ", url: "apps/portal-category-list-approve" },
{ title: "อนุมัติหลักสูตร" }, { title: "อนุมัติหลักสูตร" },
], ],
}, },
...@@ -270,8 +274,8 @@ export const AppsRoutes: Routes = [ ...@@ -270,8 +274,8 @@ export const AppsRoutes: Routes = [
data: { data: {
title: "รายการ Excel", title: "รายการ Excel",
urls: [ urls: [
{ title: "รายการเอกสาร" ,url: "apps/portal-category-list"}, { title: "รายการเอกสาร", url: "apps/portal-category-list" },
{title:"รายการ Excel"} { title: "รายการ Excel" }
], ],
}, },
}, },
...@@ -281,8 +285,8 @@ export const AppsRoutes: Routes = [ ...@@ -281,8 +285,8 @@ export const AppsRoutes: Routes = [
data: { data: {
title: "รายการ Excel", title: "รายการ Excel",
urls: [ urls: [
{ title: "รายการเอกสาร" ,url: "apps/portal-category-list"}, { title: "รายการเอกสาร", url: "apps/portal-category-list" },
{title:"รายการ Excel"} { title: "รายการ Excel" }
], ],
}, },
}, },
...@@ -292,8 +296,8 @@ export const AppsRoutes: Routes = [ ...@@ -292,8 +296,8 @@ export const AppsRoutes: Routes = [
data: { data: {
title: "รายการเอกสาร", title: "รายการเอกสาร",
urls: [ urls: [
{ title: "รายการเอกสาร" ,url: "apps/portal-category-list"}, { title: "รายการเอกสาร", url: "apps/portal-category-list" },
{title:"รายการเอกสาร"} { title: "รายการเอกสาร" }
], ],
}, },
}, },
...@@ -303,8 +307,8 @@ export const AppsRoutes: Routes = [ ...@@ -303,8 +307,8 @@ export const AppsRoutes: Routes = [
data: { data: {
title: "รายการเอกสาร", title: "รายการเอกสาร",
urls: [ urls: [
{ title: "รายการเอกสาร" ,url: "apps/portal-category-list"}, { title: "รายการเอกสาร", url: "apps/portal-category-list" },
{title:"รายการเอกสาร"} { title: "รายการเอกสาร" }
], ],
}, },
}, },
...@@ -314,8 +318,8 @@ export const AppsRoutes: Routes = [ ...@@ -314,8 +318,8 @@ export const AppsRoutes: Routes = [
data: { data: {
title: "รายการหลักสูตร", title: "รายการหลักสูตร",
urls: [ urls: [
{ title: "รายการเอกสาร" ,url: "apps/portal-category-list"}, { title: "รายการเอกสาร", url: "apps/portal-category-list" },
{title:"รายการหลักสูตร"} { title: "รายการหลักสูตร" }
], ],
}, },
}, },
...@@ -325,8 +329,8 @@ export const AppsRoutes: Routes = [ ...@@ -325,8 +329,8 @@ export const AppsRoutes: Routes = [
data: { data: {
title: "รายการหลักสูตร", title: "รายการหลักสูตร",
urls: [ urls: [
{ title: "รายการเอกสาร" ,url: "apps/portal-category-list"}, { title: "รายการเอกสาร", url: "apps/portal-category-list" },
{title:"รายการหลักสูตร"} { title: "รายการหลักสูตร" }
], ],
}, },
}, },
...@@ -336,8 +340,8 @@ export const AppsRoutes: Routes = [ ...@@ -336,8 +340,8 @@ export const AppsRoutes: Routes = [
data: { data: {
title: "รายการวิทเจ็ท", title: "รายการวิทเจ็ท",
urls: [ urls: [
{ title: "รายการเอกสาร" ,url: "apps/portal-category-list"}, { title: "รายการเอกสาร", url: "apps/portal-category-list" },
{title:"รายการวิทเจ็ท"} { title: "รายการวิทเจ็ท" }
], ],
}, },
}, },
...@@ -519,6 +523,38 @@ export const AppsRoutes: Routes = [ ...@@ -519,6 +523,38 @@ export const AppsRoutes: Routes = [
urls: [], urls: [],
}, },
}, },
{
path: "excel-export/:id",
component: ExcelReportComponent,
data: {
title: "รายงาน Excel",
urls: [],
},
},
{
path: "excel-list",
component: ExcelListComponent,
data: {
title: "เพิ่มรายงาน Excel",
urls: [],
},
},
{
path: "excel-report-toggle",
component: ExcelReportToggleComponent,
data: {
title: "เปิด-ปิด การใช้งานรายงาน Excel",
urls: [],
},
},
{
path: "excel-report-empview",
component: ExcelReportEmpviewComponent,
data: {
title: "รายงาน Excel สำหรับ Empview",
urls: [],
},
},
], ],
}, },
]; ];
<div class="row">
<div class="col-12">
<div class="card card-body">
<h4 class="card-title">รายการเอกสาร</h4>
<div class="row align-items-center mb-2">
<div class="col-4 col-lg-3 text-right">
Search By
</div>
<div class="col-8 col-lg-3">
<select class="custom-select" [(ngModel)]="searchBy">
<option style="color: red" [class.d-none]="searchBy==''" [value]="''">
{{searchBy!=''?'ยกเลิก':''}}</option>
<option [value]="'templateId'">รหัสกลุ่มแม่แบบ</option>
<option [value]="'module'">โมดูล</option>
<option [value]="'tname'">ชื่อกลุ่มรายงาน (ภาษาไทย)</option>
<option [value]="'ename'">ชื่อกลุ่มรายงาน (ภาษาอังกฤษ)</option>
<option [value]="'tdesc'">รายละเอียด (ภาษาไทย)</option>
<option [value]="'edesc'">รายละเอียด (ภาษาอังกฤษ)</option>
</select>
</div>
</div>
<div class="row align-items-center mb-2">
<div class="col-4 col-lg-3 text-right">
Condition
</div>
<div class="col-8 col-lg-3">
<select class="custom-select" [(ngModel)]="condition">
<option style="color: red" [class.d-none]="condition==''" [value]="''">
{{condition!=''?'ยกเลิก':''}}</option>
<option value="includes">คำในประโยค</option>
<option value="lt">น้อยกว่า</option>
<option value="gt">มากกว่า</option>
<option value="eq">เท่ากับ</option>
<option value="lte">น้อยกว่าเท่ากับ</option>
<option value="gte">มากกว่าเท่ากับ</option>
<option value="neq">ไม่เท่ากับ</option>
</select>
</div>
</div>
<div class="row align-items-center mb-2">
<div class="col-4 col-lg-3 text-right">
Key Value
</div>
<div class="col-8 col-lg-3">
<input type="text" class="form-control" [(ngModel)]="searchValue">
</div>
</div>
<div class="row justify-content-center align-items-center mb-2">
<button type="button" class="btn btn-info"
(click)="openTemplate.clear();templateListSearch()">ค้นหา</button>
</div>
<div class="row m-0 justify-content-end align-items-center">
<button type="button" class="btn btn-info" (click)="openAddGroupModal(addGroupModal)">Add Group</button>
</div>
<div class="table-responsive">
<table class="table mb-0 no-wrap v-middle ">
<thead class="bg-info text-white">
<tr>
<th class="text-center" scope="col">ชื่อกลุ่มรายงาน(Thai)</th>
<th class="text-center" scope="col">ชื่อกลุ่มรายงาน (ภาษาอังกฤษ)</th>
<th class="text-center" scope="col" style="min-width: 200px">สร้างโดย</th>
<th class="text-center" scope="col" style="min-width:120px">วันที่สร้าง</th>
<th class="text-center" scope="col">สร้างเมื่อ</th>
<th class="text-center" scope="col" style="min-width: 120px;">โมดูล</th>
<th class="text-center" scope="col">Add file</th>
</tr>
</thead>
<tbody *ngIf="!template.filter.length">
<tr style="background-color:#ebf2f6">
<td colspan="7" class="text-center">ไม่พบข้อมูล</td>
</tr>
</tbody>
<tbody *ngIf="template.filter.length">
<ng-container
*ngFor="let items of template.filter | slice: (page-1) * pageSize : (page-1) * pageSize + pageSize ; let i = index">
<tr style="background-color:#ebf2f6">
<td colspan="6" class="font-16 font-medium">
<span class="cursor-pointer" (click)="openAddGroupModal(addGroupModal,items)">
{{items.tname}}-{{items.ename}}
</span>
</td>
<td class="text-center">
<button type="button" *ngIf="!openTemplate.get(items.tname+'-'+items.ename)"
class="btn"
style="border:3px solid #2962ff;border-radius: 10%;background-color: white;"
(click)="
openTemplate.set(items.tname+'-'+items.ename,true)">
<i class="fa fa-arrow-right text-info"></i>
</button>
<button type="button" *ngIf="openTemplate.get(items.tname+'-'+items.ename)"
class="btn"
style="border:3px solid #2962ff;border-radius: 10%;background-color: white;"
(click)="
openTemplate.set(items.tname+'-'+items.ename,false)">
<i class="fa fa-arrow-down text-info"></i>
</button>
&nbsp;
<button type="button" class="btn"
style="border:3px solid #2962ff;border-radius: 10%;background-color: white;"
(click)="openAddChildModal(addChildModal)">
<i class="fa fa-floppy-o text-info"></i>
</button>
</td>
</tr>
<ng-container *ngIf="openTemplate.get(items.tname+'-'+items.ename)">
<ng-container
*ngFor="let item of items.templateFile | slice: (page-1) * pageSize : (page-1) * pageSize + pageSize ; let i = index">
<tr style="background-color:#ffffff">
<td style="white-space: normal !important;word-break: break-word;">
<i *ngIf="item.menuActive=='0'" class="fa fa-times text-danger"></i>
<i *ngIf="item.menuActive=='1'" class="fa fa-check text-success"></i>
{{item.tdesc}}
</td>
<td style="white-space: normal !important;word-break: break-word;">
{{item.edesc}}</td>
<td class="text-center"
style="white-space: normal !important;word-break: break-word;">
{{item.createBy.thFullName}}</td>
<td class="text-center"
style="white-space: normal !important;word-break: break-word;">
{{item.createDate}}</td>
<td class="text-center"
style="white-space: normal !important;word-break: break-word;">
{{item.createTime}}</td>
<td class="text-center"
style="white-space: normal !important;word-break: break-word;">
{{item.module}}</td>
<td class="text-center" class="text-center">
<button type="button" class="btn"
style="border:3px solid #2962ff;border-radius: 10%;background-color: white;">
<i class="fa fa-files-o text-info"></i>
</button>
&nbsp;
<button type="button" class="btn"
style="border:3px solid #2962ff;border-radius: 10%;background-color: white;">
<i class="fa fa-print text-info"></i>
</button>
</td>
</tr>
</ng-container>
</ng-container>
</ng-container>
</tbody>
</table>
</div>
<div class="d-flex justify-content-end py-2">
<select class="custom-select m-r-5" style="width: auto" [(ngModel)]="pageSize" (ngModelChange)="page">
<option [ngValue]="10">รายการต่อหน้า: 10</option>
<option [ngValue]="50">รายการต่อหน้า: 50</option>
<option [ngValue]="100">รายการต่อหน้า: 100</option>
</select>
<ngb-pagination [(page)]="page" [pageSize]="pageSize" [collectionSize]="template.filter.length"
[maxSize]="3" [rotate]="true">
<ng-template ngbPaginationPrevious>ก่อนหน้า</ng-template>
<ng-template ngbPaginationNext>ถัดไป</ng-template>
</ngb-pagination>
</div>
<div class="row justify-content-end align-items-center">
<i class="fa fa-times text-danger"></i>&nbsp;=&nbsp;used on menu&nbsp;&nbsp;&nbsp;
<i class="fa fa-check text-success"></i>&nbsp;=&nbsp;unused on menu&nbsp;&nbsp;&nbsp;
<i class="fa fa-files-o text-info"></i>&nbsp;=&nbsp;copy template&nbsp;&nbsp;&nbsp;
<i class="fa fa-print text-info"></i>&nbsp;=&nbsp;print report
</div>
</div>
</div>
</div>
<ng-template #addGroupModal let-modal>
<div class="modal-header">
<h5 class="modal-title" id="edittemplateLabel">EXCHEAD, Template header excel</h5>
<button type="button" class="close" (click)="modal.dismiss()" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="form-group row">
<label for="nameth" class="col-sm-4 col-form-label">
รหัสกลุ่มแม่แบบ</label>
<div class="col-sm-8">
<input type="text" class="form-control" disabled [value]="bodyTemplate.data.templateId">
</div>
</div>
<div class="form-group row">
<label for="nameth" class="col-sm-4 col-form-label">ชื่อกลุ่มรายงาน (ภาษาไทย)<span
style="color: red">*</span></label>
<div class="col-sm-8">
<input type="text" class="form-control" [(ngModel)]="bodyTemplate.data.tname">
</div>
</div>
<div class="form-group row">
<label for="nameeng" class="col-sm-4 col-form-label">ชื่อกลุ่มรายงาน (ภาษาอังกฤษ)</label>
<div class="col-sm-8">
<input type="text" class="form-control" [(ngModel)]="bodyTemplate.data.ename">
</div>
</div>
<div class="form-group row">
<label for="position" class="col-sm-4 col-form-label">รายละเอียด (ภาษาไทย)</label>
<div class="col-sm-8">
<textarea class="form-control" [(ngModel)]="bodyTemplate.data.tdesc"></textarea>
</div>
</div>
<div class="form-group row">
<label for="position" class="col-sm-4 col-form-label">รายละเอียด (ภาษาอังกฤษ)</label>
<div class="col-sm-8">
<textarea class="form-control" [(ngModel)]="bodyTemplate.data.edesc"></textarea>
</div>
</div>
<div class="form-group row">
<label for="position" class="col-sm-4 col-form-label">โมดูล<span style="color: red">*</span></label>
<div class="col-sm-8">
<select class=" custom-select" [disabled]="bodyTemplate.status=='edit'"
[(ngModel)]="bodyTemplate.data.module">
<option style="color: red" [class.d-none]="bodyTemplate.data.module==''" [value]="''">
{{bodyTemplate.data.module!=''?'ยกเลิก':''}}</option>
<option *ngFor="let item of module.data" [ngValue]="item.code">{{item.tdesc}}</option>
</select>
</div>
</div>
<div class="modal-footer ">
<button type="submit" class="btn btn-info" [disabled]="!bodyTemplate.data.tname||!bodyTemplate.data.module"
(click)="modal.close()">บันทึก</button>
<button type="button" class="btn btn-danger" (click)="modal.dismiss()">ปิด</button>
</div>
</div>
</ng-template>
<ng-template #addChildModal let-modal>
<div class="modal-header">
<h5 class="modal-title" id="edittemplateLabel">EXCHEAD, Template header excel</h5>
<button type="button" class="close" (click)="modal.dismiss()" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="form-group row">
<label for="nameth" class="col-sm-4 col-form-label">
ชื่อเอ็กเซลล์ไฟล์</label>
<div class="col-sm-8">
<input type="text" class="form-control">
</div>
</div>
<div class="form-group row">
<label for="nameth" class="col-sm-4 col-form-label">รายละเอียด<span
style="color: red">*</span></label>
<div class="col-sm-8">
<input type="text" class="form-control" [(ngModel)]="bodyTemplate.data.tname">
</div>
</div>
<div class="form-group row">
<label for="nameeng" class="col-sm-4 col-form-label">ชื่อกลุ่มรายงาน (ภาษาอังกฤษ)</label>
<div class="col-sm-8">
<input type="text" class="form-control" [(ngModel)]="bodyTemplate.data.ename">
</div>
</div>
<div class="form-group row">
<label for="position" class="col-sm-4 col-form-label">รายละเอียด (ภาษาไทย)</label>
<div class="col-sm-8">
<textarea class="form-control" [(ngModel)]="bodyTemplate.data.tdesc"></textarea>
</div>
</div>
<div class="form-group row">
<label for="position" class="col-sm-4 col-form-label">รายละเอียด (ภาษาอังกฤษ)</label>
<div class="col-sm-8">
<textarea class="form-control" [(ngModel)]="bodyTemplate.data.edesc"></textarea>
</div>
</div>
<div class="form-group row">
<label for="position" class="col-sm-4 col-form-label">โมดูล<span style="color: red">*</span></label>
<div class="col-sm-8">
<select class=" custom-select" [disabled]="bodyTemplate.status=='edit'"
[(ngModel)]="bodyTemplate.data.module">
<option style="color: red" [class.d-none]="bodyTemplate.data.module==''" [value]="''">
{{bodyTemplate.data.module!=''?'ยกเลิก':''}}</option>
<option *ngFor="let item of module.data" [ngValue]="item.code">{{item.tdesc}}</option>
</select>
</div>
</div>
<div class="modal-footer ">
<button type="submit" class="btn btn-info" [disabled]="!bodyTemplate.data.tname||!bodyTemplate.data.module"
(click)="modal.close()">บันทึก</button>
<button type="button" class="btn btn-danger" (click)="modal.dismiss()">ปิด</button>
</div>
</div>
</ng-template>
\ No newline at end of file
import { ChangeDetectorRef, Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { NgbDate, NgbModal } from '@ng-bootstrap/ng-bootstrap';
import * as FileSaver from 'file-saver';
import { IDataOptions } from '@syncfusion/ej2-angular-pivotview';
import { ExcelReportService } from 'src/app/service/excel-report.service';
import { MyTemplateModel, TemplateModel } from 'src/app/model/template.model';
import { AlertModalComponent } from '../alert-modal/alert-modal.component';
import { MyModuleModel, ModuleModel } from 'src/app/model/module.model';
import { ConfirmModalComponent } from '../confirm-modal/confirm-modal.component';
export interface ModalDetail {
text: { cardHead: string, search: string[], tableHead: string[] }
}
@Component({
selector: 'app-excel-list',
templateUrl: './excel-list.component.html',
styleUrls: ['./excel-list.component.scss']
})
export class ExcelListComponent implements OnInit {
template: { data: TemplateModel[], filter: TemplateModel[], loading: boolean } = { data: [], filter: [], loading: false }
module: { data: ModuleModel[], loading: boolean } = { data: [], loading: false }
page = 1
pageSize = 10
searchBy = ''
condition = ''
searchValue = ''
openTemplate: Map<string, boolean> = new Map<string, boolean>()
bodyTemplate: {
status: 'add' | 'edit',
data: {
templateId: string,
tname: string,
ename: string,
tdesc: string,
edesc: string,
module: string
}
} = {
status: 'add',
data: {
templateId: '',
tname: '',
ename: '',
tdesc: '',
edesc: '',
module: ''
}
}
constructor(private excelReportService: ExcelReportService,
private modalService: NgbModal,
private cdr: ChangeDetectorRef) {
}
ngOnInit(): void {
this.getExcelList()
this.getModuleList()
}
getExcelList() {
this.template.loading = true
this.excelReportService.getExcelList().subscribe(response => {
this.template.data = response.map(e => new MyTemplateModel(e))
this.template.filter = response.map(e => new MyTemplateModel(e))
this.template.loading = false
}, error => {
this.template.loading = false
})
}
getModuleList() {
this.module.loading = true
this.excelReportService.getModuleList().subscribe(response => {
this.module.data = response.map(e => new MyModuleModel(e))
this.module.loading = false
}, error => {
this.module.loading = false
})
}
postTemplate() {
}
openAlertModal(message?: string) {
const modalRef = this.modalService.open(AlertModalComponent, {
centered: true,
backdrop: 'static'
})
modalRef.componentInstance.message = message ? message : ""
modalRef.result.then(result => {
}, reason => {
})
}
openAddGroupModal(targetModal: NgbModal, data?: TemplateModel) {
if (data) {
this.bodyTemplate.status = 'edit'
this.bodyTemplate.data = {
templateId: data.templateId,
tname: data.tname,
ename: data.ename,
tdesc: data.tdesc,
edesc: data.edesc,
module: data.module
}
} else {
this.bodyTemplate.status = 'add'
this.bodyTemplate.data = {
templateId: '',
tname: '',
ename: '',
tdesc: '',
edesc: '',
module: ''
}
}
const modalRef = this.modalService.open(targetModal, {
centered: true,
backdrop: 'static',
size: 'lg'
})
modalRef.result.then(result => {
const modalConfirmRef = this.modalService.open(ConfirmModalComponent, {
centered: true,
backdrop: 'static',
})
modalConfirmRef.componentInstance.message = 'คุณต้องการบันทึกข้อมูลหรือไม่'
modalConfirmRef.result.then(result => {
console.log(" 🐒 this.bodyTemplate:", this.bodyTemplate)
this.excelReportService.postTemplate(this.bodyTemplate.data).subscribe((response: any) => {
this.openAlertModal(response.message)
if (response.success) {
this.getExcelList()
this.getModuleList()
}
}, error => { this.openAlertModal(error.message) })
}, reject => { })
}, reject => { })
}
openAddChildModal(targetModal: NgbModal) {
const modalRef = this.modalService.open(targetModal, {
centered: true,
backdrop: 'static',
size: 'lg'
})
modalRef.result.then(result => {
const modalConfirmRef = this.modalService.open(ConfirmModalComponent, {
centered: true,
backdrop: 'static',
})
modalConfirmRef.componentInstance.message = 'คุณต้องการบันทึกข้อมูลหรือไม่'
modalConfirmRef.result.then(result => {
console.log(" 🐒 this.bodyTemplate:", this.bodyTemplate)
}, reject => { })
}, reject => { })
}
templateListSearch() {
if (!this.searchBy || !this.condition || !this.searchValue) {
this.template.filter = this.template.data.map(e => new MyTemplateModel(e))
}
const conditionMap: { [key: string]: (a: any, b: any) => boolean } = {
includes: (a, b) => (a || '').toString().toLowerCase().includes((b || '').toString().toLowerCase()),
lt: (a, b) => parseFloat(a) < parseFloat(b),
gt: (a, b) => parseFloat(a) > parseFloat(b),
eq: (a, b) => a == b,
lte: (a, b) => parseFloat(a) <= parseFloat(b),
gte: (a, b) => parseFloat(a) >= parseFloat(b),
neq: (a, b) => a != b,
};
const compareFn = conditionMap[this.condition];
if (!compareFn) {
this.template.filter = this.template.data.map(e => new MyTemplateModel(e))
}
this.template.filter = this.template.data.filter(item => {
const value = (item as any)[this.searchBy];
return compareFn(value, this.searchValue);
}).map(e => new MyTemplateModel(e));
}
}
\ No newline at end of file
import { ChangeDetectorRef, Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { NgbDate, NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { ExcelReportService } from 'src/app/service/excel-report.service';
import * as FileSaver from 'file-saver';
import { IDataOptions } from '@syncfusion/ej2-angular-pivotview';
export interface ModalDetail {
text: { cardHead: string, search: string[], tableHead: string[] }
}
@Component({
selector: 'app-excel-report-empview',
templateUrl: './excel-report-empview.component.html',
styleUrls: ['./excel-report-empview.component.scss']
})
export class ExcelReportEmpviewComponent implements OnInit {
ngOnInit(): void {
}
}
\ No newline at end of file
import { ChangeDetectorRef, Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { NgbDate, NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { ExcelReportService } from 'src/app/service/excel-report.service';
import * as FileSaver from 'file-saver';
import { IDataOptions } from '@syncfusion/ej2-angular-pivotview';
export interface ModalDetail {
text: { cardHead: string, search: string[], tableHead: string[] }
}
@Component({
selector: 'app-excel-report-toggle',
templateUrl: './excel-report-toggle.component.html',
styleUrls: ['./excel-report-toggle.component.scss']
})
export class ExcelReportToggleComponent implements OnInit {
ngOnInit(): void {
}
}
\ No newline at end of file
<h2>🔹 Syncfusion Grid</h2>
<ejs-grid [dataSource]="gridData" [allowPaging]="true" [pageSettings]="{ pageSize: 5 }">
<e-columns>
<e-column field="id" headerText="ID" width="100"></e-column>
<e-column field="name" headerText="Name" width="150"></e-column>
<e-column field="age" headerText="Age" width="100"></e-column>
</e-columns>
</ejs-grid>
<hr />
<h2>🔹 Syncfusion PivotView</h2>
<ejs-pivotview [dataSourceSettings]="pivotDataSource" height="300"></ejs-pivotview>
<div class="card">
<div class="card-header bg-myhr">
<h4>{{"Excel Report"}}</h4>
</div>
<div class="card-body">
<div class="row">
<div class="d-flex col-12 justify-content-center" *ngIf="loading">
<div *ngFor="let item of [1,2,3]" class="spinner-grow text-info mx-1" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
<ng-container *ngIf="!loading">
<ng-container *ngFor="let item of variableSheet; let i=index">
<div class="col-12 row">
<div class="col-3 form-group justify-content-center font-weight-bold control-label col-form-label font-14"
style="text-align: end;">
{{item.label}}
</div>
<div class="col-3 d-flex form-group align-items-center">
<ng-container *ngIf="item.type=='text'">
<input type="text" class="form-control" [(ngModel)]="item.value">
</ng-container>
<ng-container *ngIf="item.type=='list'">
<select class="custom-select" [(ngModel)]="item.value">
<option *ngFor="let list of item.option" [value]="list.value">
{{list.text}}
</option>
</select>
</ng-container>
<ng-container *ngIf="item.type=='radio'">
<div class="row m-0">
<ng-container *ngFor="let radioItem of item.option">
<div class="col-auto custom-control custom-radio">
<input type="radio" class="custom-control-input"
[name]="'group-' + item.label" [id]="radioItem.text+radioItem.value"
[value]="radioItem.value" [(ngModel)]="item.value">
<label class="custom-control-label"
[for]="radioItem.text+radioItem.value">{{radioItem.text}}</label>
</div>
</ng-container>
</div>
</ng-container>
<ng-container *ngIf="item.type=='help'">
<div class="input-group">
<input type="text" readonly class="form-control bg-white cursor-pointer"
[value]="item.value.tdesc" (click)="openModal(item,modalData)">
<div class="input-group-append">
<button class="btn mr-0 btn-info" type="button"
(click)="openModal(item,modalData)">
<i class="fa fa-search"></i>
</button>
</div>
</div>
</ng-container>
<ng-container *ngIf="item.type=='calendar'">
<div class="input-group">
<input class="form-control bg-white cursor-pointer"
placeholder="{{ 'dd.mm.yyyy' | translate }}" name="dp1" ngbDatepicker
#d1="ngbDatepicker" [(ngModel)]="select[item.key]" readonly
(click)="d1.toggle()" (ngModelChange)="formatNgbDate(item.key,select[item.key])"
#c1="ngModel" (change)="validateDate(c1)">
<div class="input-group-append">
<button class="btn btn-outline-info no-shadow" (click)="d1.toggle()"
type="button">
<i class="far fa-calendar-alt"></i>
</button>
</div>
</div>
</ng-container>
</div>
<div class="col">
<ng-container *ngIf="item.type=='help'">
<button type="button" class="btn btn-danger btn-sm btn-circle"
(click)="item.value={id:'',tdesc:'',edesc:''}"><i class="fa fa-times"></i> </button>
</ng-container>
<ng-container *ngIf="item.type=='calendar'">
<button type="button" class="btn btn-danger btn-sm btn-circle"
(click)="select[item.key]=null ;formatNgbDate(item.key)"><i class="fa fa-times"></i>
</button>
</ng-container>
<ng-container *ngIf="item.type=='list'">
<button type="button" class="btn btn-danger btn-sm btn-circle"
(click)="item.value=''"><i class="fa fa-times"></i>
</button>
</ng-container>
</div>
</div>
</ng-container>
<div *ngIf="variableSheet.length&&!loadingExcel"
class="col-12 justify-content-center align-content-center d-flex" style="margin-bottom: 1rem;">
<button type="submit" class="btn btn-info waves-effect waves-light btn-w-100"
(click)="dowloadExcelReport()">
{{"Print" |translate }}
</button>
</div>
<div *ngIf="loadingExcel" class="col-12 justify-content-center align-content-center d-flex"
style="margin-bottom: 1rem;">
<div *ngFor="let item of [1,2,3]" class="spinner-grow text-info mx-1" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
<div *ngIf="!variableSheet.length" class="col-12 justify-content-center align-content-center d-flex"
style="margin-bottom: 1rem;margin-top: 1rem;">
<div
class="col-3 justify-content-center text-center font-weight-bold control-label col-form-label font-14">
{{'No Data Found' | translate}}
</div>
</div>
</ng-container>
</div>
</div>
</div>
<ng-template #modalData let-modal>
<div class="modal-content dialog-height">
<div class="modal-body" [perfectScrollbar]="{}">
<div class="card" style="margin-bottom:-15px">
<div class="card-header bg-myhr">
<h5 class="card-title">
{{modalDetail.text.cardHead | translate}}</h5>
</div>
<div class="card-body pb-0 pt-1">
<div class="d-flex mb-1">
<input type="text"
placeholder="{{'systemcode.search' | translate}} {{modalDetail.text.search[0]| translate}}"
class=" form-control w-75 border-color-gray-full-focus" [(ngModel)]='searchModal'>
</div>
<div class="table-responsive">
<table class="table table-hover table-striped-myhr table-sm mb-0 no-wrap v-middle ">
<thead class="bg-info ">
<tr class="text-white font-weight-normal">
<th class="font-weight-normal text-center" scope="col"
*ngFor="let item of modalDetail.text.tableHead">
{{item| translate}}
</th>
</tr>
</thead>
<tbody *ngIf="!valueDetailFilter().length">
<tr>
<td colspan="9" class="font-weight-normal text-center">
{{"No Data Found" |translate}}
</td>
</tr>
</tbody>
<tbody *ngIf="valueDetailFilter().length">
<tr class="cursor-myhr"
*ngFor="let item of valueDetailFilter() | slice: (page-1) * pageSize : (page-1) * pageSize + pageSize; let i=index"
(click)="selectData(item);modal.dismiss()">
<td class="align-middle text-center">
{{item.id}}
</td>
<td class="align-middle text-center">
{{item.tdesc}}
</td>
<td class="align-middle text-center">
{{item.edesc}}
</td>
</tr>
</tbody>
</table>
</div>
<div class="d-flex justify-content-end p-2">
<select class="custom-select m-r-5 border-color-gray-full-focus" style="width: auto"
[(ngModel)]="pageSize" (ngModelChange)="page=1">
<option *ngFor="let item of [10,50,100]" [ngValue]="item">
{{"Items per page"| translate}}: {{item}}
</option>
</select>
<ngb-pagination [collectionSize]="valueDetailFilter().length" [(page)]="page"
[pageSize]="pageSize" [maxSize]="3" [rotate]="true">
<ng-template ngbPaginationPrevious>{{"Prev"| translate}}</ng-template>
<ng-template ngbPaginationNext>{{"Next"| translate}}</ng-template>
</ngb-pagination>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" (click)="modal.close()">
{{"Close"| translate}}
</button>
</div>
</div>
</ng-template>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
export interface ModuleModel {
code: string
tdesc: string
edesc: string
}
export class MyModuleModel implements ModuleModel {
code: string
tdesc: string
edesc: string
constructor(data: Partial<any>) {
this.code = data?.code || ''
this.tdesc = data?.tdesc || ''
this.edesc = data?.edesc || ''
}
}
\ No newline at end of file
export interface PrefixModel {
edesc: string
prefixId: string
tdesc: string
}
export class MyPrefixModel implements PrefixModel {
edesc: string
prefixId: string
tdesc: string
constructor(data?: Partial<PrefixModel>) {
this.edesc = data?.edesc || ''
this.prefixId = data?.prefixId || ''
this.tdesc = data?.tdesc || ''
}
}
export interface CreateByModel {
efname: string
elname: string
email: string
employeeId: string
engFullName: string
fname: string
lname: string
picture: string
prefix: PrefixModel
sex: string
thFullName: string
}
export class MyCreateByModel implements CreateByModel {
efname: string
elname: string
email: string
employeeId: string
engFullName: string
fname: string
lname: string
picture: string
prefix: PrefixModel
sex: string
thFullName: string
constructor(data?: Partial<CreateByModel>) {
this.efname = data?.efname || ''
this.elname = data?.elname || ''
this.email = data?.email || ''
this.employeeId = data?.employeeId || ''
this.engFullName = data?.engFullName || ''
this.fname = data?.fname || ''
this.lname = data?.lname || ''
this.picture = data?.picture || ''
this.prefix = new MyPrefixModel(data?.prefix)
this.sex = data?.sex || ''
this.thFullName = data?.thFullName || ''
}
}
export interface TemplateFileModel {
templateId: string
portalId: string
itemId: string
fileName: string
realFileName: string
realFileNameOld: string
tdesc: string
edesc: string
menuActive: string
uponMenu: string
module: string
page: string
isShare: string
isPivot: string
createDate: string
createTime: string
param: any | null
createBy: CreateByModel
}
export class MyTemplateFileModel implements TemplateFileModel {
templateId: string
portalId: string
itemId: string
fileName: string
realFileName: string
realFileNameOld: string
tdesc: string
edesc: string
menuActive: string
uponMenu: string
module: string
page: string
isShare: string
isPivot: string
createDate: string
createTime: string
param: any | null
createBy: CreateByModel
constructor(data?: Partial<TemplateFileModel>) {
this.templateId = data?.templateId || ''
this.portalId = data?.portalId || ''
this.itemId = data?.itemId || ''
this.fileName = data?.fileName || ''
this.realFileName = data?.realFileName || ''
this.realFileNameOld = data?.realFileNameOld || ''
this.tdesc = data?.tdesc || ''
this.edesc = data?.edesc || ''
this.menuActive = data?.menuActive || ''
this.uponMenu = data?.uponMenu || ''
this.module = data?.module || ''
this.page = data?.page || ''
this.isShare = data?.isShare || ''
this.isPivot = data?.isPivot || ''
this.createDate = data?.createDate || ''
this.createTime = data?.createTime || ''
this.param = data?.param || null
this.createBy = new MyCreateByModel(data?.createBy)
}
}
export interface TemplateModel {
templateId: string
tname: string
ename: string
tdesc: string
edesc: string
module: string
templateFile: TemplateFileModel[]
}
export class MyTemplateModel implements TemplateModel {
templateId: string
tname: string
ename: string
tdesc: string
edesc: string
module: string
templateFile: TemplateFileModel[]
constructor(data?: Partial<TemplateModel>) {
this.templateId = data?.templateId || ''
this.tname = data?.tname || ''
this.ename = data?.ename || ''
this.tdesc = data?.tdesc || ''
this.edesc = data?.edesc || ''
this.module = data?.module || ''
this.templateFile = data?.templateFile?.map(x => new MyTemplateFileModel(x)) || []
}
}
\ No newline at end of file
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { TranslateService } from '@ngx-translate/core';
import { Observable } from 'rxjs';
import { environment } from '../../environments/environment';
import { TemplateModel } from '../model/template.model';
import { ModuleModel } from '../model/module.model';
@Injectable({
providedIn: 'root'
})
export class ExcelReportService {
constructor(private http: HttpClient,
private translateService: TranslateService
) { }
getExcelReport(itemId: string): Observable<any> {
return this.http.get(environment.url + "/irapi/menuitem/" + itemId + '?companyid=eb2f4f30-edaf-11ee-a69a-c7680edc0e47')
}
dowloadExcelReport(fileName: string, varname: string, data: string): Observable<any> {
return this.http.get(environment.url + "/irapi/excel/export-to-excel?companyid=eb2f4f30-edaf-11ee-a69a-c7680edc0e47&fileName=" + fileName + "&param=__varname=" + varname + "|__screen=XLSOPTION|" + data, { responseType: 'blob' })
}
getExcelList(): Observable<TemplateModel[]> {
return this.http.get<TemplateModel[]>("https://hrplus-std.myhr.co.th/plus/template/lists?companyid=eb2f4f30-edaf-11ee-a69a-c7680edc0e47")
}
getModuleList(): Observable<ModuleModel[]> {
return this.http.get<ModuleModel[]>("https://hrplus-std.myhr.co.th/plus/template/lists/module?companyid=eb2f4f30-edaf-11ee-a69a-c7680edc0e47")
}
postTemplate(body: {
templateId: string,
tname: string,
ename: string,
tdesc: string,
edesc: string,
module: string
}) {
return this.http.post("https://hrplus-std.myhr.co.th/plus/template?companyid=eb2f4f30-edaf-11ee-a69a-c7680edc0e47", body)
}
}
...@@ -6,7 +6,8 @@ import { environment } from 'src/environments/environment'; ...@@ -6,7 +6,8 @@ import { environment } from 'src/environments/environment';
@Injectable() @Injectable()
export class HttpRequestInterceptor { export class HttpRequestInterceptor {
token= 'eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBdXRoIiwidWlkIjoiOGFhNDUzMzAtMzE0Yy0xMWU3LWJhZjMtMmQ3ZDA5ODc3NzQ0Iiwicm9sZSI6InVzZXIiLCJpc3MiOiJDb21wdXRlciBTY2llbmNlIENvcnBvcmF0aW9uIExpbWl0ZWQiLCJmdWxsTmFtZSI6InRlZXJhZGFjaCBrdWhhdGFuYXNhdGllbiIsIm1lbWJlcklkIjoiOGFhNDUzMzAtMzE0Yy0xMWU3LWJhZjMtMmQ3ZDA5ODc3NzQ0In0.FO7u8g7KfzkmZFTuuniBCEQxduPjcvzMbH7iug3DT90' // token= 'eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBdXRoIiwidWlkIjoiOGFhNDUzMzAtMzE0Yy0xMWU3LWJhZjMtMmQ3ZDA5ODc3NzQ0Iiwicm9sZSI6InVzZXIiLCJpc3MiOiJDb21wdXRlciBTY2llbmNlIENvcnBvcmF0aW9uIExpbWl0ZWQiLCJmdWxsTmFtZSI6InRlZXJhZGFjaCBrdWhhdGFuYXNhdGllbiIsIm1lbWJlcklkIjoiOGFhNDUzMzAtMzE0Yy0xMWU3LWJhZjMtMmQ3ZDA5ODc3NzQ0In0.FO7u8g7KfzkmZFTuuniBCEQxduPjcvzMbH7iug3DT90'
token= 'eyJhbGciOiJIUzI1NiJ9.eyJzY2hlbWEiOiJkYm8iLCJlbmNvZGUiOiIyIiwic3ViIjoiQXV0aCIsImNvbXBhbnlOYW1lIjoi4Lia4Lij4Li04Lip4Lix4LiXIOC4oeC4suC4ouC5gOC4reC4iuC4reC4suC4o-C5jCDguIjguLPguIHguLHguJQiLCJkYk5hbWUiOiJNWUhSUExVUyIsInJvbGVzIjpbIlVTRVIiXSwid29ya2FyZWEiOiJUS1ciLCJpc3MiOiJDb21wdXRlciBTY2llbmNlIENvcnBvcmF0aW9uIExpbWl0ZWQiLCJ6bWxvZ2luIjoiZmFsc2UiLCJyb2xlX2xldmVsIjoiNiIsImVtcGxveWVlaWQiOiIxMDAwMDA4MiIsImJyYW5jaCI6Im15aHIiLCJlbXBfcG9zaXRpb24iOiIwOTciLCJ1c2VyX3JvbGUiOiJBbGwiLCJ1aWQiOiIxMDAwMDA4MiIsImNvbXBhbnlpZCI6IjEwMCIsImFjdG9yaWQiOiIxMDAwMDA4MiIsImFjY291bnRhY3RpdmUiOiJ0cnVlIiwibGFuZyI6InRoIiwiYWQiOiJmYWxzZSIsImZpcnN0bG9naW4iOiJmYWxzZSIsInVybF9teWhyIjoiaHR0cDovL2hycGx1cy1zdGQubXloci5jby50aC9ociIsImFwcF9uYW1lIjoibXlociIsInJlZ2lvbmFsbHR5IjoiRU5HIiwidG9rZW5femVlbWUiOiIiLCJ1c2VyX2xldmVsIjoiTVlIUiIsImZ1bGxuYW1lIjoi4LiZ4Liy4Lii4Lit4Lie4Li04Lij4Lix4LiV4LiZ4LmMICDguJfguJTguKrguK3guJoiLCJjb21pZCI6IiIsImpvYiI6IjA5Ny0yNDY5IiwidXNlciI6Im15aHIiLCJ6bV91c2VyIjoiIiwidXNlcm5hbWUiOiJteWhyIiwibWVtYmVyaWQiOiIifQ.z106M3tnpWYWmD7tzAf7hPv2CDSyw50FoUrfDqqHFjw'
constructor() { } constructor() { }
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> { intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
......
import { RouteInfo } from "./vertical-sidebar.metadata"; import { RouteInfo } from "./vertical-sidebar.metadata";
export const ROUTES: RouteInfo[] = [ export const ROUTES: RouteInfo[] = [
{ {
path: '/apps/portal-category-list', path: '/apps/portal-category-list',
title: 'รายการเอกสาร', title: 'รายการเอกสาร',
...@@ -83,7 +82,47 @@ export const ROUTES: RouteInfo[] = [ ...@@ -83,7 +82,47 @@ export const ROUTES: RouteInfo[] = [
// }, // },
] ]
}, },
{
path: "",
title: "ตั้งค่ารายงานเอ็กเซล",
icon: "mdi mdi-adjust",
class: "has-arrow",
extralink: false,
label: "",
labelClass: "badge badge-info sidebar-badge",
submenu: [
{
path: '/apps/excel-list',
title: 'เพิ่มรายงาน Excel',
icon: '',
class: '',
label: "",
labelClass: "",
extralink: false,
submenu: []
},
{
path: '/apps/excel-report-toggle',
title: 'เปิด-ปิด การใช้งานรายงาน Excel',
icon: '',
class: '',
label: "",
labelClass: "",
extralink: false,
submenu: []
},
{
path: '/apps/excel-report-empview',
title: 'รายงาน Excel สำหรับ Empview',
icon: '',
class: '',
label: "",
labelClass: "",
extralink: false,
submenu: []
},
]
},
// //
// { // {
......
...@@ -17,11 +17,40 @@ export class VerticalSidebarComponent { ...@@ -17,11 +17,40 @@ export class VerticalSidebarComponent {
path = ''; path = '';
constructor(private menuServise: VerticalSidebarService, private router: Router) { constructor(private menuServise: VerticalSidebarService, private router: Router) {
if (this.menuServise.submenu.length > 0) {
const currentValue = this.menuServise.items.value;
const updated = [...currentValue, {
path: '',
title: 'รายงาน Excel',
icon: 'mdi mdi-adjust',
class: 'has-arrow',
label: "",
labelClass: "",
extralink: false,
submenu: []
}];
this.menuServise.items.next(updated);
}
this.menuServise.items.subscribe(menuItems => { this.menuServise.items.subscribe(menuItems => {
this.sidebarnavItems = menuItems; this.sidebarnavItems = menuItems.map(e => {
if (e.title == 'รายงาน Excel') {
// Active menu this.menuServise.submenu.map(e2 => {
this.sidebarnavItems.filter(m => m.submenu.filter( e.submenu.push({
path: '/apps/excel-export/' + e2.itemId,
title: e2.tdesc,
icon: "",
class: "",
label: "",
labelClass: "",
extralink: false,
submenu: []
})
})
}
return e
})
this.sidebarnavItems.filter(m =>
m.submenu.filter(
(s) => { (s) => {
if (s.path === this.router.url) { if (s.path === this.router.url) {
this.path = m.title; this.path = m.title;
......
...@@ -17,6 +17,24 @@ export class VerticalSidebarService { ...@@ -17,6 +17,24 @@ export class VerticalSidebarService {
items = new BehaviorSubject<RouteInfo[]>(this.MENUITEMS); items = new BehaviorSubject<RouteInfo[]>(this.MENUITEMS);
submenu = [
{
"itemId": "3459",
"templateId": "3011",
"fileName": "BFET6T4QJ.xlsx",
"tdesc": "FOR TEST OPTION ESS",
"edesc": "FOR TEST OPTION ESS",
"module": "EMPVIEW"
},
{
"itemId": "3462",
"templateId": "3011",
"fileName": "F5QTI20MBJ.xls",
"tdesc": "REPORT WORKING HOURS_BU3",
"edesc": "REPORT WORKING HOURS_BU3",
"module": "EMPVIEW"
}
]
constructor() { constructor() {
} }
} }
import { enableProdMode } from '@angular/core'; import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { registerLicense } from '@syncfusion/ej2-base';
import { AppModule } from './app/app.module'; import { AppModule } from './app/app.module';
import { environment } from './environments/environment'; import { environment } from './environments/environment';
registerLicense('ORg4AjUWIQA/Gnt2XFhhQlJHfV5AQmBIYVp/TGpJfl96cVxMZVVBJAtUQF1hTH5WdUVjWXtXdHNdRWFbWkdx');
if (environment.production) { if (environment.production) {
enableProdMode(); enableProdMode();
} }
......
...@@ -3,6 +3,17 @@ ...@@ -3,6 +3,17 @@
@import url('https://fonts.googleapis.com/css?family=Nunito+Sans:300,400,600,700,800'); @import url('https://fonts.googleapis.com/css?family=Nunito+Sans:300,400,600,700,800');
@import url("https://fonts.googleapis.com/css?family=Kanit:300,400,600,700,800"); @import url("https://fonts.googleapis.com/css?family=Kanit:300,400,600,700,800");
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"); @import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css");
@import '../node_modules/@syncfusion/ej2-base/styles/material.css';
@import '../node_modules/@syncfusion/ej2-buttons/styles/material.css';
@import '../node_modules/@syncfusion/ej2-calendars/styles/material.css';
@import '../node_modules/@syncfusion/ej2-dropdowns/styles/material.css';
@import '../node_modules/@syncfusion/ej2-inputs/styles/material.css';
@import '../node_modules/@syncfusion/ej2-navigations/styles/material.css';
@import '../node_modules/@syncfusion/ej2-popups/styles/material.css';
@import '../node_modules/@syncfusion/ej2-splitbuttons/styles/material.css';
@import '../node_modules/@syncfusion/ej2-angular-grids/styles/material.css';
body { body {
font-family: "Kanit", sans-serif !important; font-family: "Kanit", sans-serif !important;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment