Compare commits

...

391 Commits
main ... prod

Author SHA1 Message Date
Rama Priyanto be4c41356e clientKey
continuous-integration/drone/push Build is passing Details
2026-03-03 22:30:03 +07:00
Rama Priyanto 9140b71679 feat:client id key ng
continuous-integration/drone/push Build is passing Details
2026-03-03 12:45:03 +07:00
Rama Priyanto 6bbc4e98a7 fix:search
continuous-integration/drone/push Build is passing Details
2026-03-02 15:20:50 +07:00
Rama Priyanto 82c35be814 feat:timestamp for detail
continuous-integration/drone/push Build is passing Details
2026-02-27 09:11:52 +07:00
Rama Priyanto eb77a23bc9 feat:timestamp for detail
continuous-integration/drone/push Build is failing Details
2026-02-27 09:05:55 +07:00
Rama Priyanto caba909562 feat timestamp for article
continuous-integration/drone/push Build is passing Details
2026-02-27 09:04:05 +07:00
Rama Priyanto 4143780bb0 fix:build
continuous-integration/drone/push Build is passing Details
2026-02-25 22:20:17 +07:00
Rama Priyanto ba6b9888c6 fix:drone
continuous-integration/drone/push Build is failing Details
2026-02-25 21:57:32 +07:00
Rama Priyanto bba88fd11e fix:drone 2026-02-25 21:55:38 +07:00
Rama Priyanto 4b6966a10c feat:drone 2026-02-25 21:42:54 +07:00
Rama Priyanto 84b84c0fec fix:detail news-> get thumbnail to content 2026-02-24 14:09:04 +07:00
Rama Priyanto 19f71eb972 fix:user edit 2026-02-20 17:17:22 +07:00
Rama Priyanto 6202af2149 fix:detail article 2026-02-06 17:29:59 +07:00
Rama Priyanto 2889a9acc2 fix:dashboard bearer 2026-02-06 15:13:35 +07:00
Rama Priyanto e235b86c12 fix:delete artocle categories 2026-02-06 14:23:11 +07:00
Rama Priyanto adcae589f0 feat:bearer for get users 2026-02-05 09:25:24 +07:00
Rama Priyanto 076c16be28 fix:loading fe 2026-02-04 12:24:19 +07:00
Rama Priyanto 6e071f170f remove time stamp 2026-02-03 22:34:40 +07:00
Rama Priyanto 4c807a7fee fix:filter use query urt 2026-01-29 19:00:18 +07:00
Rama Priyanto 1df9197c5b fix:detail article suggest article 2026-01-22 11:05:51 +07:00
Rama Priyanto 45350a7132 fix:select polres category autoselect polda 2026-01-20 14:23:38 +07:00
Rama Priyanto 962b9708bf fix:page query, polda query 2026-01-19 13:03:54 +07:00
Rama Priyanto 407566899f feat:delete button on edit article 2026-01-13 16:35:54 +07:00
Rama Priyanto b785c0a2c2 new ip docker image 2026-01-02 11:52:52 +07:00
Rama Priyanto 5407da9771 fix:dashboard chart accross year 2026-01-02 11:28:49 +07:00
Rama Priyanto 4959dbfa2e Merge branch 'prod' of https://gitlab.com/hanifsalafi/web-humas-polri into prod 2026-01-02 10:01:01 +07:00
hanif salafi 5eb07ba434 fix: update static year to dynamic 2026-01-02 06:31:50 +07:00
Rama Priyanto 61d689ef53 fix:redirect request informasi 2025-12-31 10:51:12 +07:00
Rama Priyanto 1c01e472d8 fix:react 19.2.0 2025-12-09 13:22:33 +07:00
Rama Priyanto 426e63511f react ver 19.2.1 2025-12-09 12:55:48 +07:00
Rama Priyanto fcc34d65b8 fix:yaml 2025-12-09 10:37:55 +07:00
Rama Priyanto c196eaa95f update react next version 2025-12-09 10:26:59 +07:00
Rama Priyanto df6fc2da21 update react, next version 2025-12-09 10:11:14 +07:00
Rama Priyanto d303496552 feat:merge dev - suspend user 2025-11-10 13:43:32 +07:00
Rama Priyanto 87baa5e2a1 fix:suspend account 2025-11-10 12:59:33 +07:00
Rama Priyanto b982ffb000 fix:strukture humas static page asset 2025-11-06 14:48:46 +07:00
Rama Priyanto ed4f1c20e2 feaT:suspend user, kontenhumas->layananpemerintahri 2025-11-04 22:31:33 +07:00
Rama Priyanto 87d98098d9 fix:humas landing -> mediahub & disestages url 2025-10-30 16:39:40 +07:00
Rama Priyanto 89b2459065 fix:upload article file/image 2025-10-23 08:33:30 +07:00
Rama Priyanto 9b826301c0 fix:ckeditor 2025-10-20 12:19:01 +07:00
Rama Priyanto dc95533c92 fix:ckeditor 2025-10-20 12:16:46 +07:00
Rama Priyanto 92b7d4de19 fixing ckeditor 2025-10-20 10:14:53 +07:00
Rama Priyanto 0dffaf4ff5 fix:json 2025-10-15 16:06:16 +07:00
Rama Priyanto 35e33ef58a fix:ckeditor watch dog 2025-10-15 10:22:38 +07:00
Rama Priyanto 0873cf973d fix:deleted article detail 2025-10-15 09:19:51 +07:00
Rama Priyanto cb7c9b7256 fix:ckeditor 2025-10-01 09:59:55 +07:00
Rama Priyanto d79cbc026a fix:medol update 2025-09-25 17:02:21 +07:00
Rama Priyanto bf249ccbfb fix:mediahub v2 api 2025-09-24 19:25:50 +07:00
Rama Priyanto f4277a0fd8 Merge branch 'dev-restructure' of https://gitlab.com/hanifsalafi/web-humas-polri into prod 2025-09-03 09:54:24 +07:00
Rama Priyanto edad636ba1 fix:ckeditor config 2025-09-03 09:53:43 +07:00
Rama Priyanto 491939daf1 fix:image detail 2025-09-01 12:45:37 +07:00
Rama Priyanto 0809fd0ca8 change new.humas to humas 2025-09-01 10:36:09 +07:00
Rama Priyanto 9acdba3400 change new.humas to humas 2025-09-01 10:07:20 +07:00
hanif salafi 67b662dfc7 feat: rollback new.humas 2025-08-30 07:14:01 +07:00
hanif salafi 8b1c2f9bac feat: remove www humas 2025-08-30 07:06:51 +07:00
hanif salafi 40f94a9364 feat: update all merge from dev 2025-08-30 00:32:19 +07:00
hanif salafi 8ea86e2a8e feat: solving domain 2025-08-30 00:05:11 +07:00
hanif salafi 5c57e4b6ed Merge branch 'dev-restructure' of https://gitlab.com/hanifsalafi/web-humas-polri into prod 2025-08-30 00:04:12 +07:00
Rama Priyanto 01132d635c fix:build 2025-08-29 20:15:24 +07:00
Rama Priyanto e18bbace7a feat:cookies encrypt 2025-08-29 20:01:29 +07:00
Rama Priyanto 07d6eb9fa6 fix:build 2025-08-29 18:58:27 +07:00
Rama Priyanto 80e0622541 fix:cookies encrypt 2025-08-29 18:39:32 +07:00
Rama Priyanto a00d63aa8d feat:bearer token 2025-08-29 13:46:05 +07:00
Rama Priyanto 92bea89d29 fix:bearer 2025-08-29 13:43:53 +07:00
Rama Priyanto 6ef70c03c1 fix:tbn & inp media update 2025-08-21 09:57:58 +07:00
Rama Priyanto 362aae6729 fix:inp & tbn media update 2025-08-21 09:55:25 +07:00
Rama Priyanto f59f80d74b feat:sitemap 2025-08-20 09:44:35 +07:00
Rama Priyanto 135c17a51a delete sitemap 2025-08-19 13:46:51 +07:00
Rama Priyanto 7544902d59 feat:sitemap 2025-08-19 13:16:43 +07:00
Rama Priyanto 6bd881fe2e fix:facebook embed 2025-08-11 18:34:14 +07:00
Rama Priyanto cf1b5ce134 fix:tawkto 2025-07-11 13:17:36 +07:00
Rama Priyanto 41d0303bc1 fix:article search by category, feat:piechart & visitors table 2025-07-09 14:43:55 +07:00
Rama Priyanto d747233721 fix:article search by category 2025-07-09 14:22:52 +07:00
Rama Priyanto 8a4a3b1d67 feat:visitors table, fix:piee chart api, chart total views analytic 2025-07-09 12:02:51 +07:00
Rama Priyanto 0b62486da6 fix:banneer home layout text 2025-07-04 15:22:53 +07:00
Rama Priyanto 70e2fb006e feat:pie chart 2025-07-02 17:20:43 +07:00
Rama Priyanto c8480bad59 clean console, fix:maps chart 2025-07-02 09:17:22 +07:00
Rama Priyanto 7ec1e2d602 Merge branch 'dev-restructure' of https://gitlab.com/hanifsalafi/web-humas-polri into prod 2025-07-02 09:03:50 +07:00
Rama Priyanto 278dd75a61 fix:maps chart name 2025-07-02 09:02:34 +07:00
Rama Priyanto e4d4abe43f fix:banner overlay 2025-06-30 14:42:32 +07:00
Rama Priyanto d2af5ab2ee fix:dashboard analytics 2025-06-30 08:24:18 +07:00
Rama Priyanto dc44e3a3e3 fix:maps chart 2025-06-29 20:11:21 +07:00
Rama Priyanto c82b3dfc21 feat:new analytics dashboard 2025-06-29 20:01:49 +07:00
Rama Priyanto 877f2170e4 feat:visitor count 2025-06-29 17:53:03 +07:00
Rama Priyanto 33986fe7e4 feat:visitors analytics 2025-06-29 12:57:23 +07:00
Rama Priyanto 39cc916259 fix:dashboard with api 2025-06-28 23:39:22 +07:00
Rama Priyanto 9cb945d161 feat:users & maps api 2025-06-28 12:14:54 +07:00
Rama Priyanto b85dd9f5f2 otps 2025-06-27 21:21:10 +07:00
Rama Priyanto 85778aaf59 fix:user analytics 2025-06-27 21:17:17 +07:00
Rama Priyanto 34b6586dd2 fix:dashboard map 38 prov 2025-06-26 13:01:49 +07:00
Rama Priyanto 686d29439c feat:user analytic 2025-06-25 17:39:34 +07:00
Rama Priyanto cc45c2dabb feat:bulk delete 2025-06-24 19:58:02 +07:00
Rama Priyanto 2717a7530d fix:banner title ellipsis 2025-06-24 14:54:56 +07:00
Rama Priyanto aebf91a442 fix:dashboard 2025-06-24 14:50:35 +07:00
Rama Priyanto 17e9faec56 feat:map chart 2025-06-23 22:51:20 +07:00
Rama Priyanto 1fc236bff3 fix:dashboard analytics 2025-06-23 17:57:30 +07:00
Rama Priyanto f7165883dd fix:landing 2025-06-21 13:18:10 +07:00
Rama Priyanto bcd14fdef0 fix:detail news space y, temporary filtered duplicate image 2025-06-20 16:02:55 +07:00
Rama Priyanto c018be888e fix:space y detail news 2025-06-20 15:47:27 +07:00
Rama Priyanto 223d3b367d fix:tawkto 2025-06-19 13:54:26 +07:00
Rama Priyanto 9be5884caf fix:error handler 2025-06-18 14:36:01 +07:00
Rama Priyanto e75b00d25b Merge branch 'dev-restructure' of https://gitlab.com/hanifsalafi/web-humas-polri into prod 2025-06-18 11:52:04 +07:00
Rama Priyanto 3d420f48f2 fix:date recap article 2025-06-18 11:51:17 +07:00
Rama Priyanto 7d50f4b070 fix detail article 2025-06-18 11:39:17 +07:00
Rama Priyanto 3742907fd0 fix:isBanneer true banner image, dashboard recap 2025-06-18 11:37:23 +07:00
Rama Priyanto b3dcdb56ee fix:detail 2025-06-18 09:50:55 +07:00
Rama Priyanto dca4f8aaa9 fix:edit article 2025-06-18 09:42:11 +07:00
Rama Priyanto c61e7d0adb fix:dashboard recap 2025-06-18 09:32:56 +07:00
Rama Priyanto 77178d87fe fix:dashboard filter 2025-06-17 23:55:17 +07:00
Rama Priyanto f0bd7e2513 fix:comment article, dashboard recap data 2025-06-17 18:44:26 +07:00
Rama Priyanto e1204e9019 fixing tawkto 2025-06-17 10:01:19 +07:00
Rama Priyanto 2224237481 Merge branch 'dev-restructure' of https://gitlab.com/hanifsalafi/web-humas-polri into prod 2025-06-16 19:35:33 +07:00
Rama Priyanto 5f173def51 fix:landing footer, banner,static 2025-06-16 19:34:41 +07:00
Rama Priyanto 99c51a8fcf fix:sm banner image 2025-06-16 13:23:00 +07:00
Rama Priyanto 64c42f8934 [QUDO-235,237]:feat:ember tawkto, ui improve dashboard stats 2025-06-16 12:51:07 +07:00
Rama Priyanto 63865ac8b4 fix:tawkto 2025-06-16 11:24:32 +07:00
Rama Priyanto 984513321c feat:tawkto 2025-06-16 11:19:51 +07:00
Rama Priyanto c3e33351b1 fix:polda modal landing 2025-06-13 18:38:46 +07:00
Rama Priyanto 47a252e2d1 fix:polda modal landing 2025-06-13 18:37:51 +07:00
Rama Priyanto 0d390b460b fix:dashboard stats 2025-06-13 17:35:07 +07:00
Rama Priyanto 4ce6ad3fcb fix:dashboard stats 2025-06-13 17:04:25 +07:00
Rama Priyanto 413f28599f fix:dashboard stats 2025-06-13 17:03:42 +07:00
Rama Priyanto 581712953e [QUDO-221, 195] feat:new ui rekap admin dashboard, fix:landing mobile ver 2025-06-13 15:01:48 +07:00
Rama Priyanto ace3decdaa fix:fixing base on prod 2025-06-12 22:02:57 +07:00
Rama Priyanto 718f1d9d8b fix:banner image, setting page , cookies set 2025-06-12 21:59:50 +07:00
Rama Priyanto 281f6cd82a Merge branch 'dev-restructure' of https://gitlab.com/hanifsalafi/web-humas-polri into prod 2025-06-12 20:24:20 +07:00
Rama Priyanto 0a16dbe20a fix:role menu 2025-06-12 20:23:22 +07:00
Rama Priyanto 4303804136 merge dev-restructure 2025-06-12 16:18:14 +07:00
Rama Priyanto 34a78b088e [QUDO-161] fix: portrait image article, fixing user form 2025-06-12 16:16:05 +07:00
Rama Priyanto 2b5accd391 fix:delete to put method 2025-06-12 10:04:04 +07:00
Rama Priyanto a1baedde47 feat:delete change (httpdelete to put) 2025-06-11 16:38:29 +07:00
Rama Priyanto f005d9584e fix:table user levels 2025-06-11 15:02:32 +07:00
Rama Priyanto 453c9cef46 fix:create user 2025-06-11 12:50:25 +07:00
Rama Priyanto c51b8c7ff9 fix:handle error 2025-06-11 10:52:08 +07:00
Rama Priyanto 5517c3dacb fix:landinng banner 2025-06-11 10:26:35 +07:00
Rama Priyanto 6963f29249 fix:lihat semua hot topics 2025-06-10 21:23:28 +07:00
Rama Priyanto 27fc4e63db fix:login error messages 2025-06-10 17:08:40 +07:00
Rama Priyanto ca0b40663a fix:error message login 2025-06-10 17:06:43 +07:00
Rama Priyanto aac0c76356 fix:enable create button, merge dev-restructure 2025-06-10 13:11:02 +07:00
Rama Priyanto 2112cfabd9 fix:enable button create article, category 2025-06-10 13:01:56 +07:00
hanif salafi b6d4b2a59a feat: update fixing create category 2025-06-10 08:41:24 +07:00
Rama Priyanto a0b7b1efab fix:banner count 2025-06-09 19:46:55 +07:00
Rama Priyanto 3f86306bc1 fix:home banner 2025-06-09 19:38:24 +07:00
Rama Priyanto a3538d1322 fix:disable button 2025-06-09 16:56:30 +07:00
Rama Priyanto 3c5ce29060 fix:run build 2025-06-09 16:51:44 +07:00
Rama Priyanto 35cdd51b6c merge:dev-restructure 2025-06-09 16:41:54 +07:00
Rama Priyanto a0ee6421d1 fix:disable create edit delete 2025-06-09 16:36:24 +07:00
Rama Priyanto dbb2fbb464 feat:filter date top article dashboar, create magazine category 2025-06-03 14:58:43 +07:00
Rama Priyanto 70ac77dba4 fix:category landing 2025-06-02 12:18:56 +07:00
hanif salafi af5b8000cd feat: update list sidebar polda 2025-06-01 02:00:00 +07:00
Rama Priyanto 53d291c31d fix:login with otp 2025-05-31 21:55:07 +07:00
Rama Priyanto b740ca8c44 fix:pagination width 2025-05-31 21:52:58 +07:00
Rama Priyanto a7eef2e1dc fix:news all filter, pagination collapse 2025-05-31 20:56:53 +07:00
Rama Priyanto 9b4016af80 feat:news all filter, document attach article 2025-05-30 23:08:12 +07:00
Rama Priyanto a0974f7878 fix:build 2025-05-28 14:09:16 +07:00
Rama Priyanto bd40ceab56 fix:time stamp 2025-05-28 13:56:41 +07:00
Rama Priyanto 2c94754de2 fix:loading auth 2025-05-27 22:40:19 +07:00
Rama Priyanto c7e9593bae fix:hide create article & category button 2025-05-27 22:25:01 +07:00
Rama Priyanto 59fc8a248b fix:article create button mobile, user table search 2025-05-27 15:19:51 +07:00
Rama Priyanto 775fbd479d feat:search user table 2025-05-27 15:13:31 +07:00
Rama Priyanto 6d21679cb6 fix:after login flow, feedback ui 2025-05-27 12:36:19 +07:00
Rama Priyanto cf15b939f8 fix:feedback ui 2025-05-27 12:28:02 +07:00
Rama Priyanto 80f0fa6c0b fix:login flow 2025-05-27 12:19:58 +07:00
Rama Priyanto 91289143f2 fix:banner 2025-05-26 15:18:47 +07:00
Rama Priyanto fa93adffe0 fix:banner 2025-05-26 14:31:28 +07:00
Rama Priyanto bf5c67d241 fix:banner 2025-05-26 14:28:54 +07:00
Rama Priyanto 5c430a9733 disable register sw 2025-05-26 13:39:00 +07:00
Rama Priyanto 3d9975cbcb fix:banner 2025-05-26 13:07:26 +07:00
Rama Priyanto 2f3b6cb027 fix:disable category 2025-05-26 11:04:22 +07:00
Rama Priyanto 85b73ca5ab Merge branch 'prod' of https://gitlab.com/hanifsalafi/web-humas-polri into prod 2025-05-26 10:20:14 +07:00
Rama Priyanto 360fdc3264 fix:banner -> hot news 2025-05-26 10:20:01 +07:00
hanif salafi be5b6ae853 Merge branch 'prod' of https://gitlab.com/hanifsalafi/web-humas-polri into prod 2025-05-26 09:08:36 +07:00
hanif salafi cd2f41c86c feat: update timestamp in sidebar menu 2025-05-26 09:07:42 +07:00
Rama Priyanto 365ecc3283 Merge branch 'prod' of https://gitlab.com/hanifsalafi/web-humas-polri into prod 2025-05-26 09:04:24 +07:00
Rama Priyanto 57332172bf fix:dasboard top article 2025-05-26 09:01:35 +07:00
Rama Priyanto e6994c1f8c fix:top article dashboard number, article author placeholder 2025-05-26 08:54:54 +07:00
hanif salafi d29e2018e2 Merge branch 'prod' of https://gitlab.com/hanifsalafi/web-humas-polri into prod 2025-05-26 08:54:48 +07:00
hanif salafi 2917e703e1 feat: update articles table 2025-05-26 08:54:22 +07:00
Rama Priyanto f40be65e38 fix:landing drawer image 2025-05-26 08:36:47 +07:00
Rama Priyanto 2c753104f6 Merge branch 'prod' of https://gitlab.com/hanifsalafi/web-humas-polri into prod 2025-05-26 08:04:44 +07:00
Rama Priyanto dbe483506e fix:article dashboard 2025-05-26 08:04:28 +07:00
hanif salafi 05fcb88efd feat: update public url for article in landing 2025-05-26 01:12:17 +07:00
Rama Priyanto 496dffe7e6 fix:mobile ui 2025-05-25 23:41:08 +07:00
Rama Priyanto 9f57441a3b auth 2025-05-25 22:56:47 +07:00
Rama Priyanto 06e3e84344 fix:save button create article mobile 2025-05-25 22:56:00 +07:00
Rama Priyanto a614cbe33d fix:news ticker api get, article get interceptor, category create parent mandatory 2025-05-25 22:17:10 +07:00
Rama Priyanto 30d7250abf fix:service instance 2025-05-25 17:21:54 +07:00
Rama Priyanto 0413d190e1 fix:article bearer 2025-05-25 16:23:15 +07:00
Rama Priyanto e5a7990af0 fix:article bearer 2025-05-25 16:20:56 +07:00
Rama Priyanto 3fbdb13300 Merge branch 'prod' of https://gitlab.com/hanifsalafi/web-humas-polri into prod 2025-05-25 12:34:59 +07:00
Rama Priyanto a7808c832f fix:ui 2025-05-25 12:34:42 +07:00
hanif salafi 8f9b5b112d feta: update sortBy on list article 2025-05-24 23:49:31 +07:00
hanif salafi d859312788 feat : update article sort 2025-05-24 23:45:55 +07:00
Rama Priyanto 79724453f1 merge restructure 2025-05-24 22:49:03 +07:00
Rama Priyanto 686fa7bc95 fix:startdate, end date, categoryIds, createdByIds 2025-05-24 11:59:31 +07:00
Rama Priyanto b38b72f708 fix:conten detail image, feat:author, date filter 2025-05-23 00:24:14 +07:00
Rama Priyanto c7aceebd6e Merge branch 'dev-restructure' of https://gitlab.com/hanifsalafi/web-humas-polri into prod 2025-05-21 11:37:39 +07:00
Rama Priyanto b23b1d63a1 [QUDO-102] fix:navbar 2025-05-21 11:36:00 +07:00
Rama Priyanto 92f233bd97 fix:detail page 2025-05-20 15:53:32 +07:00
Rama Priyanto c55ed8038a fix:kontenhumas api-bridge 2025-05-20 11:43:13 +07:00
Rama Priyanto 69877617f5 fix:little update 2025-05-19 20:38:35 +07:00
Rama Priyanto c0b54c6eb2 fix:next/image to heroui/image 2025-05-19 14:42:15 +07:00
Rama Priyanto 4a0354fb1f fix:detail page (konten humas api) 2025-05-19 10:33:49 +07:00
Rama Priyanto 91fa603359 fix:article api, disable metadata 2025-05-18 00:54:55 +07:00
Rama Priyanto a474aa0b7c fix:service base url 2025-05-17 22:56:19 +07:00
Rama Priyanto 2e66f27c12 fix:base url services 2025-05-17 22:17:34 +07:00
Rama Priyanto 9befccf503 Merge branch 'dev-restructure' of https://gitlab.com/hanifsalafi/web-humas-polri into prod 2025-05-17 22:13:52 +07:00
Rama Priyanto 118c0bea44 config next js 2025-05-16 16:28:35 +07:00
Rama Priyanto 510490e47c edit docker file 2025-05-16 16:17:19 +07:00
Rama Priyanto b998e43306 fix:hot topic id, mediahub thumbnail 2025-05-16 14:48:29 +07:00
Rama Priyanto e2976ce8b6 fix:little issue 2025-05-15 12:07:14 +07:00
Rama Priyanto a26c6fdd73 fix:disable ads 2025-05-15 09:32:32 +07:00
Rama Priyanto 7d90e6ddd4 fix:add carousel 2025-05-13 14:46:55 +07:00
Rama Priyanto 87399caa8d fix:merge restructure 2025-05-04 17:27:48 +07:00
Rama Priyanto 9b9752265a fix:auth, service folder delete 2025-05-04 14:14:12 +07:00
hanif salafi 4c315e46ab feat: update baseurl to IP 2025-05-02 15:52:23 +07:00
hanif salafi 595d09eb81 feat: update gitlab ci 2025-04-28 23:32:06 +07:00
hanif salafi aca5e5e119 feat: change domain to prod fqdn 2025-04-28 23:29:26 +07:00
Rama Priyanto 854994e2c8 feat:filter date feedback 2025-04-28 19:42:40 +07:00
Rama Priyanto 048e593670 fix:swal button 2025-04-28 11:39:51 +07:00
Rama Priyanto e48ad4e5f9 temporary jumbotron 2025-04-24 17:30:04 +07:00
Rama Priyanto 3a9b625804 fixing pwa 2025-04-24 16:26:01 +07:00
Rama Priyanto 3cc2516a0c fixing language error 2025-04-23 14:13:14 +07:00
Rama Priyanto 8ecf1e7146 feat:landing stats 2025-04-21 13:21:05 +07:00
Rama Priyanto 427b2243bc feat:subscription, fix:isPublish advertise 2025-04-20 12:10:10 +07:00
Rama Priyanto b857e168ee fix:ckeditor 2025-04-17 20:41:26 +07:00
Rama Priyanto fef5a69303 upgrade next version 2025-04-17 20:04:04 +07:00
Rama Priyanto 4113076644 fix:next image 2025-04-17 16:25:59 +07:00
Rama Priyanto 7f3a94b70f little update 2025-04-16 16:44:07 +07:00
Rama Priyanto 203b4bdea5 feat:pwa, fix:ads video 2025-04-16 15:51:12 +07:00
Rama Priyanto 4be33b9111 fix:edit article 2025-04-11 15:36:51 +07:00
Rama Priyanto bca3031c61 fix csrf 2025-04-11 13:38:38 +07:00
Rama Priyanto 51d8feb75c feat:docx 2025-04-07 16:03:07 +07:00
Rama Priyanto 673bd461db fix:otp login(disabled), isBanner,isPublish advertise 2025-04-07 14:17:35 +07:00
Rama Priyanto 5e3ca91963 fix login 2025-03-27 09:58:26 +07:00
Rama Priyanto c030aa4444 fixing ui 2025-03-26 15:27:09 +07:00
Rama Priyanto 831acbb5da disable otp 2025-03-25 00:03:56 +07:00
Rama Priyanto 3d2bb07b00 fix otp login 2025-03-23 23:55:27 +07:00
Rama Priyanto 8058f42f2f fixing 2025-03-18 15:30:18 +07:00
Rama Priyanto a01825a40a fix landing banner article 2025-03-17 22:45:12 +07:00
Rama Priyanto fccb7d60f1 fixing metadata 2025-03-17 08:08:34 +07:00
Rama Priyanto daadd78f0b little update 2025-03-14 15:55:34 +07:00
Rama Priyanto aa7e92fedb fix locale, meta data 2025-03-14 15:54:37 +07:00
Rama Priyanto a2c04393db fix meta data 2025-03-14 15:45:40 +07:00
Rama Priyanto 9e61990f39 meta data 2025-03-14 15:04:10 +07:00
Rama Priyanto 55e9b390e4 fix:meta data 2025-03-14 14:50:34 +07:00
Rama Priyanto f5fbf31eb9 feat:embed tiktok facebook 2025-03-13 15:53:48 +07:00
Rama Priyanto 7d6c7ff927 feat:ads table, ads landing 2025-03-11 17:19:37 +07:00
Rama Priyanto 5c2a544a9f fix:meta data 2025-03-10 16:10:48 +07:00
Rama Priyanto d884ed1732 feat:meta data 2025-03-10 13:03:43 +07:00
Rama Priyanto d428928150 fix:avertise form 2025-03-07 16:08:19 +07:00
Rama Priyanto 0cf395cf59 fix footer padding 2025-03-07 09:02:53 +07:00
Rama Priyanto 094ac206b6 feat:comment approval 2025-03-06 21:58:38 +07:00
Rama Priyanto 3817131f52 feat:detail feedback, onoff userLevel 2025-03-06 17:40:54 +07:00
Rama Priyanto 78be7bc0e1 fix:user level edit 2025-03-04 16:25:12 +07:00
Rama Priyanto c52c351bf0 feat:kritik saran popup 2025-03-04 12:53:29 +07:00
Rama Priyanto 1eede31961 redeploy 2025-03-03 18:15:37 +07:00
Rama Priyanto 72736d6287 fixing ui 2025-03-03 18:06:31 +07:00
Rama Priyanto e4bbd1c063 fix schedule 2025-03-03 09:58:33 +07:00
Rama Priyanto b3f2a77363 fix create time 2025-03-03 09:43:34 +07:00
Rama Priyanto 60140c5132 little updatE 2025-03-03 08:55:08 +07:00
Rama Priyanto 30f2a97a68 feat:landing menus 2025-02-28 15:44:20 +07:00
Rama Priyanto 286a8e6946 feat:ads page admin, fix scheduling publish, edit created time 2025-02-27 18:09:32 +07:00
Rama Priyanto ada307accc fix user level, category parent 2025-02-27 00:12:10 +07:00
Rama Priyanto fc539c66f7 fixing landing 2025-02-26 15:34:45 +07:00
Rama Priyanto 5eaa8543f8 feat: polda satker section 2025-02-26 00:35:06 +07:00
Rama Priyanto 9730375aeb fix landing mobile 2025-02-25 17:30:33 +07:00
Rama Priyanto f94e21d953 feat:new landing 2025-02-24 19:24:58 +07:00
Rama Priyanto 80fd365755 feat:new landing 2025-02-24 10:34:01 +07:00
Rama Priyanto f13c496d75 landing fixing 2025-02-20 18:29:52 +07:00
Rama Priyanto 2faabb40eb ckeditor static page 2025-02-18 20:05:08 +07:00
Rama Priyanto 66aaa5f0b3 feat:userlevel form 2025-02-18 12:17:41 +07:00
Rama Priyanto e4dd1da844 feat:approval 2025-02-17 23:32:20 +07:00
Rama Priyanto 33fcdd670c fix:typo jumbotron 2025-02-17 21:12:13 +07:00
Rama Priyanto 3147e88622 fix role 2025-02-17 17:18:50 +07:00
Rama Priyanto 1e60384a47 fix landing 2025-02-17 17:01:58 +07:00
Rama Priyanto f7793d5f61 fixing dashboard 2025-02-17 14:21:28 +07:00
Rama Priyanto defa0775ce roles menu 2025-02-17 09:37:50 +07:00
Rama Priyanto 6a7ff45817 article table 2025-02-14 23:53:14 +07:00
Rama Priyanto d5c09548fa catergory 2025-02-14 23:11:51 +07:00
Rama Priyanto f553306c15 update landing, list article 2025-02-14 10:05:52 +07:00
Rama Priyanto 4c064207df double login disable 2025-02-13 17:47:24 +07:00
Rama Priyanto 600bdae34e migrate to npm back 2025-02-13 16:50:05 +07:00
Rama Priyanto d82c7a511a docker file 2025-02-13 15:39:43 +07:00
Rama Priyanto f3bd29fd70 docker file 2025-02-13 15:33:37 +07:00
Rama Priyanto 00cbffa980 migrate to heroui 2025-02-13 15:25:39 +07:00
Rama Priyanto 5a34f19488 fix build 2025-02-13 11:53:53 +07:00
Rama Priyanto 58d831a94c fix:docker file 2025-02-13 11:13:22 +07:00
Rama Priyanto cc1b8d926d migration to yarn 2025-02-13 10:47:40 +07:00
Rama Priyanto 5beff2fa0c feat:meta icon 2025-02-13 10:05:04 +07:00
Rama Priyanto c00f4094ef fix:inp api, home 2025-02-12 17:52:27 +07:00
Rama Priyanto b38b20e881 fix:landing 2025-02-12 16:19:57 +07:00
Rama Priyanto d641681ee4 inp update, yanma update 2025-02-12 15:20:38 +07:00
Rama Priyanto f2e3d7f731 feat:scheduled create article 2025-02-12 12:07:28 +07:00
Rama Priyanto ec2e0ef1b8 fix:detail article space 2025-02-11 15:39:23 +07:00
Rama Priyanto 497ebc949f fix:edit user 2025-02-11 13:01:48 +07:00
Rama Priyanto 1ebf0f9b56 fix:qudo auth 2025-02-11 08:49:14 +07:00
Rama Priyanto 1344de4c48 fix:auth 2025-02-10 22:36:49 +07:00
Rama Priyanto 573fc57991 fix:form create user 2025-02-10 17:09:06 +07:00
Rama Priyanto f1589b5316 Merge branch 'dev-main' of https://gitlab.com/hanifsalafi/web-humas-polri into dev-restructure 2025-02-10 16:17:25 +07:00
Rama Priyanto e88453c069 fix:generate article 2025-02-10 16:16:52 +07:00
hanif salafi 3b1db0a8fc feat: update pnpm lock 2025-02-10 09:49:21 +07:00
hanif salafi 6be98efc2f feat: update Dockerfile 2025-02-10 09:27:20 +07:00
hanif salafi 229f6af8bf feat: update Dockerfile 2025-02-10 09:14:15 +07:00
hanif salafi 41cd503510 feat: update with pnpm 2025-02-10 09:13:37 +07:00
hanif salafi 6747a1011d Merge branches 'dev-main' and 'dev-restructure' of https://gitlab.com/hanifsalafi/web-humas-polri into dev-main 2025-02-10 09:09:53 +07:00
Rama Priyanto c49450e704 docker file 2025-02-10 08:55:47 +07:00
Rama Priyanto 4b181b53c0 docker file 2025-02-10 08:53:07 +07:00
Rama Priyanto 9ff167e18d fix:auth, mapping level 2025-02-10 08:25:10 +07:00
Rama Priyanto 973399c0aa fix:magazine landing 2025-02-10 07:59:02 +07:00
Rama Priyanto c3ea4dcd6d feat:activity log 2025-02-07 16:37:39 +07:00
Rama Priyanto 5bae5603b7 little update landing 2025-02-07 14:05:52 +07:00
Rama Priyanto e5771ae8f4 fix detail artilce, magazine 2025-02-07 10:59:22 +07:00
Rama Priyanto d110f85e30 fix magazine 2025-02-07 10:06:38 +07:00
Rama Priyanto 34311f2fc4 fix:mapping user role 2025-02-06 21:16:50 +07:00
Rama Priyanto 4427fc2ed6 script user role 2025-02-06 20:14:11 +07:00
Rama Priyanto 28c94c5230 feat:dashboard analytics 2025-02-06 16:49:20 +07:00
Rama Priyanto c02c6661f7 fix:font 2025-02-05 18:23:03 +07:00
Rama Priyanto 18d3603734 fix:banner 2025-02-05 16:42:48 +07:00
Rama Priyanto eb1bd6903f feat:content rewrite create article, fix landing 2025-02-04 15:31:04 +07:00
Rama Priyanto 459ba05261 fix:landing 2025-02-03 19:55:03 +07:00
Rama Priyanto c37ab71a23 fix:magz detail 2025-02-03 09:51:30 +07:00
Rama Priyanto 049f0cf8fc feat:comment article, fix:polda filter 2025-01-31 19:42:40 +07:00
Rama Priyanto 308e708a3f fix:mobile admin feat:detail comment 2025-01-30 18:34:29 +07:00
hanif salafi b8f80c43a9 feat: update gitlab ci 2025-01-30 09:00:45 +07:00
hanif salafi 19e019fbe9 feat: update article thumbnails 2025-01-30 07:16:16 +07:00
Rama Priyanto 270fa658a7 fix landing navbar, dashboard, reset & forgot password 2025-01-24 22:12:23 +07:00
Rama Priyanto c4c0b20bc6 Merge branch 'dev-main' of https://gitlab.com/hanifsalafi/web-humas-polri into dev-restructure 2025-01-23 22:31:07 +07:00
Rama Priyanto 1b8b4e4302 feat:dashboard, admin setting, fixing thumbnail 2025-01-23 22:30:33 +07:00
hanif salafi d4e8483dae feat: update package json 2025-01-22 23:41:38 +07:00
Rama Priyanto a738e61277 fix: landing magazine, article aiId, feat:setting form 2025-01-22 21:22:22 +07:00
Rama Priyanto 7ad85eb8a9 Merge branch 'dev-main' of https://gitlab.com/hanifsalafi/web-humas-polri into dev-restructure 2025-01-22 09:33:48 +07:00
Rama Priyanto a093fb831b fix edit magazine file 2025-01-21 19:42:43 +07:00
Rama Priyanto 471539804c feat:magazine edit 2025-01-21 18:20:58 +07:00
Rama Priyanto d64ce7fc14 add magazine table admin, create edit 2025-01-21 15:46:31 +07:00
Rama Priyanto 91f34586cf little update 2025-01-21 14:31:30 +07:00
hanif salafi 082ee41058 feat: ckeditor in article form 2025-01-21 00:04:10 +07:00
hanif salafi f3febf88c3 feat: update ckeditor5 2025-01-20 23:51:18 +07:00
Rama Priyanto eda6921ae2 fix article create edit, feat: create magazine 2025-01-20 19:10:04 +07:00
Rama Priyanto dd6dd508cd feat:category, fix:thumbnail 2025-01-19 23:13:06 +07:00
Rama Priyanto db89e73d11 fix:article create edit 2025-01-17 17:23:54 +07:00
Rama Priyanto 5080ae17e5 feat:ckeditor vendor create article form 2025-01-17 12:23:28 +07:00
Rama Priyanto 0e87d7d627 fix:landing 2025-01-17 09:57:45 +07:00
Rama Priyanto c065569c28 fix:detail content 2025-01-15 18:37:53 +07:00
Rama Priyanto 2a9b676c5d fixing home, all content, detail content 2025-01-15 18:08:49 +07:00
Rama Priyanto 6b93b8b79f fixing landing 2025-01-14 22:30:13 +07:00
Rama Priyanto 921fd247d4 generate content 2025-01-06 10:05:30 +07:00
Rama Priyanto f05ade4d3c feat:upload to dise 2024-12-24 10:27:08 +07:00
Rama Priyanto 552f369ec7 fix:navbar, feat:news ticker landing, seo score 2024-12-24 00:29:21 +07:00
Rama Priyanto e686672363 fix:landing, edit article 2024-12-23 14:22:20 +07:00
Rama Priyanto da1b0ff839 little update admin page 2024-12-23 09:25:59 +07:00
Rama Priyanto a4f94e1c3a little update 2024-12-23 00:58:20 +07:00
Rama Priyanto 4e7eb26fd8 fix:new figma 2024-12-23 00:45:31 +07:00
Rama Priyanto 63fe08f810 docker file update 2024-12-18 09:42:20 +07:00
Rama Priyanto 1118772844 fix:run buiild 2024-12-17 17:19:52 +07:00
Rama Priyanto 34434b84d4 fix :navbar icon 2024-12-17 16:50:00 +07:00
Rama Priyanto be6a09a35a fix:navbar desktop 2024-12-16 18:31:59 +07:00
Rama Priyanto 6b0ee4cce5 feat:use translation landing 2024-12-12 16:48:17 +07:00
Rama Priyanto 89c71a5acc feat:change language setup 2024-12-11 17:13:02 +07:00
Rama Priyanto 400a01d0bb fix:bug generate keyword , title on single article 2024-12-06 13:30:16 +07:00
Rama Priyanto 0d04ea0b14 fix:create user, create role form 2024-12-04 09:35:29 +07:00
Rama Priyanto 24d27df67e fix:landing footer link, admin create user form 2024-12-02 20:19:30 +07:00
Rama Priyanto e064a7a431 fix:static page pagination 2024-11-29 19:08:40 +07:00
Rama Priyanto d22ec72066 feat:static tentang humas 2024-11-28 16:23:09 +07:00
Rama Priyanto 85309da98e feat:all static page 2024-11-26 18:59:43 +07:00
Rama Priyanto 6286b5c297 Merge branch 'dev-restructure' of https://gitlab.com/hanifsalafi/web-humas-polri into dev-restructure 2024-11-26 10:56:20 +07:00
Rama Priyanto 128c25fdc4 feat:get category, menu button landing 2024-11-26 10:55:40 +07:00
hanif salafi 99dbeaabb4 feat: minor update login 2024-11-25 11:34:38 +07:00
hanif salafi 776747c75d feat: update login flow 2024-11-25 11:16:52 +07:00
hanif salafi 1d2e9c3d12 feat: update qudo login 2024-11-25 10:56:02 +07:00
Rama Priyanto 717bd7e4ea Merge branch 'dev-restructure' of https://gitlab.com/hanifsalafi/web-humas-polri into dev-restructure 2024-11-22 18:00:32 +07:00
Rama Priyanto 5e019e10b1 feat:static page api, static/{slug} routing landing 2024-11-22 17:59:58 +07:00
hanif salafi 4e47a5ff19 Update .gitlab-ci.yml file 2024-11-22 10:10:55 +00:00
Rama Priyanto b6e5e65144 fix:gitlab yml 2024-11-22 15:07:17 +07:00
Rama Priyanto bb1229e4fa feat:qudo login 2024-11-22 09:56:34 +07:00
Rama Priyanto c5e4aac78e feat:save generate article, edit generated article 2024-11-19 18:21:14 +07:00
Rama Priyanto 24418ddb9b feat:static page table 2024-11-18 12:31:26 +07:00
Rama Priyanto 3e4dedfff7 dev-restructure 2024-11-18 11:27:57 +07:00
Rama Priyanto 900468d2c6 feat:static page generator 2024-11-16 12:29:07 +07:00
Rama Priyanto 922ddcc828 feat:generate article form 2024-11-15 17:53:04 +07:00
Rama Priyanto 6931edf52d fix:api url 2024-11-13 17:56:14 +07:00
Rama Priyanto 575dacc7e6 feat:date picker article admin, category 2024-11-13 15:29:27 +07:00
Rama Priyanto d18bbfe568 feat:login button, auth, fix:admin - article page 2024-11-08 16:01:21 +07:00
Rama Priyanto e7482b346d Merge branch 'dev-restructure' of https://gitlab.com/hanifsalafi/web-humas-polri into dev-restructure 2024-11-07 13:58:10 +07:00
hanif salafi 4939ba3b09 feat: update fixing header news 2024-11-07 13:57:11 +07:00
Rama Priyanto 7ba426c1b8 Merge branch 'dev-restructure' of https://gitlab.com/hanifsalafi/web-humas-polri into dev-restructure 2024-11-07 13:45:15 +07:00
Rama Priyanto 30181cefe4 little update 2024-11-07 13:45:09 +07:00
hanif salafi fb92cfeff2 feat: update API 2024-11-07 13:28:24 +07:00
hanif salafi 58d475bc98 feat: update gitlab-ci 2024-11-07 13:20:36 +07:00
Rama Priyanto 1aa7652eb4 feat:aksebilitas menu, fix:landing banner 2024-11-06 15:44:56 +07:00
Rama Priyanto 949b0e1924 humas restructure 2024-11-05 13:15:40 +07:00
4782 changed files with 425544 additions and 19037 deletions

34
.drone.yml Normal file
View File

@ -0,0 +1,34 @@
kind: pipeline
type: ssh
name: humas-fe-build
server:
host:
from_secret: ssh_host
user:
from_secret: ssh_user
ssh_key:
from_secret: ssh_key
steps:
- name: prepare repo
when:
branch:
- prod
commands:
- rm -rf /opt/build/web-humas-fe
- mkdir -p /opt/build/web-humas-fe
- cd /opt/build
- git clone http://38.47.180.165:3000/humas/web-humas-fe.git
- cd /opt/build/web-humas-fe
- git checkout $DRONE_BRANCH
- name: build image
when:
branch:
- prod
commands:
- docker login 38.47.180.165:3000 -u administrator -p HarborDockerImageRep0
- cd /opt/build/web-humas-fe
- docker build -t 38.47.180.165:3000/humas/web-humas-fe:$DRONE_BRANCH .
- docker push 38.47.180.165:3000/humas/web-humas-fe:$DRONE_BRANCH

1
.env Normal file
View File

@ -0,0 +1 @@
NEXT_PUBLIC_MAPS_API_KEY=AIzaSyCOkxoeKykE60L_nM4VS1JYJqBmqy2GA0Q

View File

@ -7,23 +7,26 @@ build-dev:
when: on_success when: on_success
only: only:
- main - main
image: docker:stable - dev-restructure
- prod
image: docker:25.0.3-cli
services: services:
- name: docker:dind - name: docker:25.0.3-dind
command: ["--insecure-registry=103.82.242.92:8900"] command: ["--insecure-registry=38.47.185.86:8900"]
script: script:
- docker logout - docker logout
- docker login -u $DEPLOY_USERNAME -p $DEPLOY_TOKEN 103.82.242.92:8900 - docker login -u $DEPLOY_USERNAME -p $DEPLOY_TOKEN 38.47.185.86:8900
- docker build -t 103.82.242.92:8900/humas/web-humas-fe:dev . - docker build -t 38.47.185.86:8900/humas/web-humas-fe:prod .
- docker push 103.82.242.92:8900/humas/web-humas-fe:dev - docker push 38.47.185.86:8900/humas/web-humas-fe:prod
# auto-deploy:
auto-deploy: # stage: deploy
stage: deploy # when: on_success
when: on_success # only:
only: # - main
- main # - dev-restructure
image: curlimages/curl:latest # - dev-main
services: # image: curlimages/curl:latest
- docker:dind # services:
script: # - docker:dind
- curl --user cekmedsos:$JENKINS_PWD http://103.82.242.92:8080/job/autodeploy-humas/build?token=autodeployhumas # script:
# - curl --user admin:$JENKINS_PWD http://38.47.180.165:8080/job/autodeploy-humas/build?token=autodeployhumas

View File

@ -1,24 +1,98 @@
FROM node:21-alpine # FROM node:23.5.0-alpine
# ENV PORT 4000
# # pnpm install globally
# RUN npm install -g pnpm
# # Create app directory
# RUN mkdir -p /usr/src/app
# WORKDIR /usr/src/app
# # Installing dependencies
# COPY package.json pnpm-lock.yaml ./
# # Copy ckeditor5 to workdir
# COPY vendor/ckeditor5 ./vendor/ckeditor5
# # Install dependencies
# RUN pnpm install --frozen-lockfile
# # RUN npm install --force
# # RUN npm install -g npm@latest
# # RUN npm install
# # Copying source files
# COPY . .
# # Building app
# RUN pnpm run build
# EXPOSE 4000
# # Running the app
# CMD ["pnpm", "run", "start"]
# FROM node:23.5.0-alpine
# ENV PORT 4000
# # Install Yarn globally
# # RUN npm install -g yarn
# # Create app directory
# RUN mkdir -p /usr/src/app
# WORKDIR /usr/src/app
# # Copy package.json and yarn.lock
# COPY package.json yarn.lock ./
# # Copy ckeditor5 to workdir
# COPY vendor/ckeditor5 ./vendor/ckeditor5
# # Install dependencies
# RUN yarn install --frozen-lockfile
# # Copying source files
# COPY . .
# # Building app
# RUN yarn build
# EXPOSE 4000
# # Running the app
# CMD ["yarn", "start"]
# Gunakan image Node.js
FROM node:23.5.0-alpine
# Tentukan port yang akan digunakan
ENV PORT 4000 ENV PORT 4000
# Create app directory # Buat direktori aplikasi
RUN mkdir -p /usr/src/app RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app WORKDIR /usr/src/app
# Installing dependencies # Salin file package.json dan lock file
COPY package*.json /usr/src/app/ COPY package.json package-lock.json ./
# RUN npm install --force # Salin ckeditor5 ke dalam workdir
COPY vendor/ckeditor5 ./vendor/ckeditor5
# Instal dependensi
RUN npm install -g npm@latest RUN npm install -g npm@latest
RUN npm install RUN npm install next --legacy-peer-deps
# Salin semua file proyek
# Copying source files # COPY . .
COPY . /usr/src/app COPY . /usr/src/app
# Building app
# Bangun aplikasi
RUN npm run build RUN npm run build
# Ekspos port aplikasi
EXPOSE 4000 EXPOSE 4000
# Running the app # Jalankan aplikasi
CMD "npm" "run" "start" CMD ["npm", "run", "start"]

View File

@ -0,0 +1,316 @@
"use client";
import { AddIcon, CloudUploadIcon, TimesIcon } from "@/components/icons";
import AdvertiseTable from "@/components/table/advertise/advertise-table";
import {
Button,
Card,
Chip,
Input,
Modal,
ModalBody,
ModalContent,
ModalFooter,
ModalHeader,
Radio,
RadioGroup,
Switch,
Textarea,
useDisclosure,
} from "@heroui/react";
import Link from "next/link";
import { useRouter } from "next/navigation";
import * as z from "zod";
import { zodResolver } from "@hookform/resolvers/zod";
import { Controller, useForm } from "react-hook-form";
import { Fragment, useEffect, useState } from "react";
import Swal from "sweetalert2";
import withReactContent from "sweetalert2-react-content";
import { useDropzone } from "react-dropzone";
import { close, error, loading } from "@/config/swal";
import Image from "next/image";
import {
createAdvertise,
createMediaFileAdvertise,
} from "@/services/advertisement";
const createArticleSchema = z.object({
title: z.string().min(2, {
message: "Judul harus diisi",
}),
url: z.string().min(1, {
message: "Link harus diisi",
}),
description: z.string().min(2, {
message: "Deskripsi harus diisi",
}),
});
export default function AdvertisePage() {
const { isOpen, onOpen, onOpenChange, onClose } = useDisclosure();
const MySwal = withReactContent(Swal);
const [refresh, setRefresh] = useState(false);
const [placement, setPlacement] = useState("banner");
const [files, setFiles] = useState<File[]>([]);
const formOptions = {
resolver: zodResolver(createArticleSchema),
defaultValues: { title: "", description: "", url: "" },
};
const { getRootProps, getInputProps } = useDropzone({
onDrop: (acceptedFiles) => {
setFiles(acceptedFiles.map((file) => Object.assign(file)));
},
maxFiles: 1,
accept:
placement === "banner"
? {
"image/*": [],
"video/*": [],
}
: { "image/*": [] },
});
type UserSettingSchema = z.infer<typeof createArticleSchema>;
const {
control,
handleSubmit,
formState: { errors },
} = useForm<UserSettingSchema>(formOptions);
const onSubmit = async (values: z.infer<typeof createArticleSchema>) => {
loading();
const formData = {
title: values.title,
description: values.description,
placement: placement,
redirectLink: values.url,
};
const res = await createAdvertise(formData);
if (res?.error) {
error(res?.message);
return false;
}
const idNow = res?.data?.data?.id;
if (files.length > 0) {
const formFiles = new FormData();
formFiles.append("file", files[0]);
const resFile = await createMediaFileAdvertise(idNow, formFiles);
}
close();
MySwal.fire({
title: "Sukses",
icon: "success",
confirmButtonColor: "#3085d6",
confirmButtonText: "OK",
}).then((result) => {
if (result.isConfirmed) {
setRefresh(!refresh);
}
});
};
const handleRemoveFile = (file: File) => {
const uploadedFiles = files;
const filtered = uploadedFiles.filter((i) => i.name !== file.name);
setFiles([...filtered]);
};
return (
<div className="overflow-x-hidden overflow-y-scroll">
<div className="px-2 md:px-4 md:py-4 w-full">
<div className="bg-white shadow-lg dark:bg-[#18181b] rounded-xl p-3">
<Button
size="md"
className="bg-[#F07C00] text-white w-full lg:w-fit"
onPress={onOpen}
>
Buat Baru
<AddIcon />
</Button>
<AdvertiseTable triggerRefresh={refresh} />
</div>
</div>
<Modal isOpen={isOpen} onOpenChange={onOpenChange} size="3xl">
<ModalContent>
{() => (
<>
<ModalHeader className="flex flex-col gap-1">
Advertise
</ModalHeader>
<ModalBody>
<form
onSubmit={handleSubmit(onSubmit)}
className="flex flex-col gap-3"
>
<div className="flex flex-col gap-1">
<p className="text-sm">Judul</p>
<Controller
control={control}
name="title"
render={({ field: { onChange, value } }) => (
<Input
type="text"
id="title"
placeholder=""
label=""
value={value}
onChange={onChange}
labelPlacement="outside"
className="w-full "
classNames={{
inputWrapper: [
"border-1 rounded-lg",
"dark:group-data-[focused=false]:bg-transparent !border-1 dark:!border-gray-400",
],
}}
variant="bordered"
/>
)}
/>
{errors?.title && (
<p className="text-red-400 text-sm">
{errors.title?.message}
</p>
)}
</div>
<div className="flex flex-col gap-1">
<p className="text-sm">Deskripsi</p>
<Controller
control={control}
name="description"
render={({ field: { onChange, value } }) => (
<Textarea
type="text"
id="description"
placeholder=""
label=""
value={value}
onChange={onChange}
labelPlacement="outside"
className="w-full "
classNames={{
inputWrapper: [
"border-1 rounded-lg",
"dark:group-data-[focused=false]:bg-transparent !border-1 dark:!border-gray-400",
],
}}
variant="bordered"
/>
)}
/>
{errors?.description && (
<p className="text-red-400 text-sm">
{errors.description?.message}
</p>
)}
</div>
<div className="flex flex-col gap-1">
<p className="text-sm">Link</p>
<Controller
control={control}
name="url"
render={({ field: { onChange, value } }) => (
<Input
type="text"
id="url"
placeholder=""
label=""
value={value}
onChange={onChange}
labelPlacement="outside"
className="w-full "
classNames={{
inputWrapper: [
"border-1 rounded-lg",
"dark:group-data-[focused=false]:bg-transparent !border-1 dark:!border-gray-400",
],
}}
variant="bordered"
/>
)}
/>
{errors?.url && (
<p className="text-red-400 text-sm">
{errors.url?.message}
</p>
)}
</div>
<p className="text-sm mt-3">Penempatan</p>
<RadioGroup
label=""
orientation="horizontal"
size="sm"
value={placement}
onValueChange={setPlacement}
>
<Radio value="banner">Banner</Radio>
<Radio value="jumbotron">Jumbotron</Radio>
</RadioGroup>
<div className="flex flex-col gap-1">
<p className="text-sm mt-3">Thumbnail</p>
{files.length < 1 && (
<Fragment>
<div {...getRootProps({ className: "dropzone" })}>
<input {...getInputProps()} />
<div className=" w-full text-center border-dashed border border-default-200 dark:border-default-300 rounded-md py-[52px] flex items-center flex-col">
<CloudUploadIcon />
<h4 className=" text-2xl font-medium mb-1 mt-3 text-card-foreground/80">
Tarik file disini atau klik untuk upload.
</h4>
<div className=" text-xs text-muted-foreground">
( Upload file dengan format .jpg, .jpeg, atau
.png. Ukuran maksimal 100mb.)
</div>
</div>
</div>
</Fragment>
)}
{files.length > 0 && (
<div className="flex flex-row gap-2">
<Image
src={URL.createObjectURL(files[0])}
className="w-[30%]"
alt="thumbnail"
width={480}
height={480}
/>
<Button
className=" border-none rounded-full"
variant="bordered"
onPress={() => handleRemoveFile(files[0])}
>
<TimesIcon />
</Button>
</div>
)}
</div>
<ModalFooter className="self-end grow items-end">
<Button
color="primary"
type="submit"
// isDisabled={files.length < 1}
>
Simpan
</Button>
<Button color="danger" variant="light" onPress={onClose}>
Tutup
</Button>
</ModalFooter>
</form>
</ModalBody>
</>
)}
</ModalContent>
</Modal>
</div>
);
}

View File

@ -1,10 +1,12 @@
import FormArticle from '@/components/form/form-article' import CreateArticleForm from "@/components/form/article/create-article-form";
import { Card } from '@nextui-org/react' import FormArticle from "@/components/form/form-article";
import { Card } from "@heroui/react";
export default function CreateArticle() { export default function CreateArticle() {
return ( return (
<Card className="h-[96vh] rounded-md my- ml-3 border bg-transparent"> <div className="bg-transparent p-3 lg:p-8 !bg-slate-100 dark:!bg-black overflow-y-auto">
<FormArticle /> {/* <FormArticle /> */}
</Card> <CreateArticleForm />
) </div>
);
} }

View File

@ -1,10 +1,10 @@
import FormDetailArticle from '@/components/form/form-detail-article' import EditArticleForm from "@/components/form/article/edit-article-form";
import { Card } from '@nextui-org/react'
export default function DetailArticlePage() { export default function DetailArticlePage() {
return ( return (
<Card className="h-[96vh] rounded-md my- ml-3 border bg-transparent"> <div className="h-[96vh] bg-transparent p-3 lg:p-8 !bg-slate-100 dark:!bg-black overflow-y-auto">
<FormDetailArticle /> {/* <FormDetailArticle /> */}
</Card> <EditArticleForm isDetail={true} />
) </div>
);
} }

View File

@ -1,10 +1,9 @@
import FormUpdateArticle from '@/components/form/form-edit-article' import EditArticleForm from "@/components/form/article/edit-article-form";
import { Card } from '@nextui-org/react'
export default function UpdateArticlePage() { export default function UpdateArticlePage() {
return ( return (
<Card className="h-[96vh] rounded-md my- ml-3 border bg-transparent"> <div className="h-[96vh] bg-transparent p-3 lg:p-8 !bg-slate-100 dark:!bg-black overflow-y-auto">
<FormUpdateArticle /> <EditArticleForm isDetail={false} />
</Card> </div>
) );
} }

View File

@ -0,0 +1,27 @@
"use client";
import EditGeneratedArticleChecker from "@/components/form/article/edit-generated-article-checker-form";
import EditGeneratedArticleContent from "@/components/form/article/edit-generated-article-content-form";
import { Card } from "@heroui/react";
import { Tab, Tabs } from "@heroui/react";
import { useParams } from "next/navigation";
export default function EditGeneratedArticlePage() {
const params = useParams();
const id = String(params.id);
return (
<Card className="rounded-md border bg-transparent p-6 overflow-auto">
<div className="flex flex-col gap-2">
<Tabs aria-label="Options">
<Tab key="content" title="Content">
<EditGeneratedArticleContent id={id} />
</Tab>
<Tab key="checker" title="Checker">
<EditGeneratedArticleChecker id={id} />
</Tab>
</Tabs>
</div>
</Card>
);
}

View File

@ -0,0 +1,10 @@
import GenerateArticleForm from "@/components/form/article/generate-article-form";
import { Card } from "@heroui/react";
export default function GenerateArticle() {
return (
<Card className="rounded-md border bg-transparent">
<GenerateArticleForm />
</Card>
);
}

View File

@ -1,23 +1,28 @@
"use client" "use client";
import { AddIcon } from "@/components/icons"; import { AddIcon } from "@/components/icons";
import ArticleTable from "@/components/table/article-table"; import ArticleTable from "@/components/table/article-table";
import { Button, Card } from "@nextui-org/react"; import generatedArticleIds from "@/store/generated-article-store";
import { Button, Card } from "@heroui/react";
import Link from "next/link"; import Link from "next/link";
import { useRouter } from "next/navigation";
export default function BasicPage() { export default function BasicPage() {
return ( return (
<div className="h-[96vh] overflow-x-hidden overflow-y-scroll gap-0 grid rounded-lg border-2 ml-4"> <div className="overflow-x-hidden overflow-y-scroll">
<div className="px-4"> <div className="px-2 md:px-4 md:py-4 w-full">
<Card className="rounded-md my-5 pl-5 py-2"> <div className="bg-white shadow-lg dark:bg-[#18181b] rounded-xl p-3">
<Link href="/admin/article/create"> <Link href="/admin/article/create">
<Button size="md" color="primary" className="w-min"> <Button
<AddIcon />New Article size="md"
className="bg-[#F07C00] text-white w-full lg:w-fit"
>
Tambah Artikel
<AddIcon />
</Button> </Button>
</Link> </Link>
</Card>
<Card className="rounded-md my-5">
<ArticleTable /> <ArticleTable />
</Card> </div>
</div> </div>
</div> </div>
); );

View File

@ -0,0 +1,13 @@
import CommentTable from "@/components/table/comment/comment-table";
export default function AdvertisePage() {
return (
<div className="overflow-x-hidden overflow-y-scroll">
<div className="px-2 md:px-4 md:py-4 w-full">
<div className="bg-white shadow-lg dark:bg-[#18181b] rounded-xl p-3">
<CommentTable />
</div>
</div>
</div>
);
}

View File

@ -0,0 +1,247 @@
"use client";
import { close, error, loading } from "@/config/swal";
import { FormEvent, Fragment, useEffect, useRef, useState } from "react";
import { Controller, useForm } from "react-hook-form";
import * as z from "zod";
import { zodResolver } from "@hookform/resolvers/zod";
import Swal from "sweetalert2";
import withReactContent from "sweetalert2-react-content";
import { Input, Textarea } from "@heroui/input";
import { Button } from "@heroui/button";
import { useParams, useRouter } from "next/navigation";
import { getCommentById, saveCommentStatus } from "@/services/comment";
import {
Modal,
ModalBody,
ModalContent,
ModalFooter,
ModalHeader,
useDisclosure,
} from "@heroui/react";
import { getArticleById } from "@/services/article";
import Link from "next/link";
import { postArticleComment } from "@/services/master-user";
import Cookies from "js-cookie";
interface DetailComments {
id: number;
message: string;
articleId: number;
commentFromName: string;
}
export default function ReviewComment() {
const MySwal = withReactContent(Swal);
const { isOpen, onOpen, onOpenChange } = useDisclosure();
const params = useParams();
const id = Number(params?.id);
const router = useRouter();
const [replyValue, setReplyValue] = useState("");
const [detailData, setDetailData] = useState<DetailComments>();
const [detailArticle, setDetailArticle] = useState<{
id: number;
slug: string;
title: string;
}>();
useEffect(() => {
initFetch();
}, []);
const initFetch = async () => {
loading();
const res = await getCommentById(id);
setDetailData(res?.data?.data);
const resArticle = await getArticleById(res?.data?.data?.articleId);
setDetailArticle(resArticle?.data?.data);
close();
};
const handleCommentStatus = async (statusId: number) => {
MySwal.fire({
title: "Submit Data",
text: "",
icon: "warning",
showCancelButton: true,
cancelButtonColor: "#d33",
confirmButtonColor: "#3085d6",
confirmButtonText: "Simpan",
}).then((result) => {
if (result.isConfirmed) {
saveStatus(statusId);
}
});
};
const saveStatus = async (statusId: number) => {
const req = { id: id, statusId: statusId };
const res = await saveCommentStatus(req);
if (res?.error) {
error(res.message);
return false;
}
successSubmit("/admin/comment");
};
function successSubmit(redirect: string) {
MySwal.fire({
title: "Sukses",
icon: "success",
confirmButtonColor: "#3085d6",
confirmButtonText: "OK",
}).then((result) => {
if (result.isConfirmed) {
router.push(redirect);
}
});
}
const sendComment = async () => {
const data = {
commentFromEmail: "ppid@polri.go.id",
commentFromName: "Mabes Polri",
articleId: detailData?.articleId,
isPublic: true,
message: replyValue,
parentId: id,
};
const res = await postArticleComment(data);
if (res?.error) {
error(res?.message);
return false;
}
saveStatus(2);
};
return (
<div className="p-8">
<div className="bg-white text-black shadow-lg p-4 rounded-lg flex flex-col gap-3 text-sm w-full lg:w-1/2">
<div className="flex flex-col gap-1">
<p>Artikel</p>
<Link
target="_black"
className="text-primary hover:underline w-fit"
href={`/news/detail/${detailArticle?.id}-${detailArticle?.slug}`}
>
{detailArticle?.title}
</Link>
</div>
<div className="flex flex-col gap-1">
<p>Nama</p>
<Input
type="text"
id="username"
placeholder=""
label=""
isReadOnly
value={detailData?.commentFromName}
labelPlacement="outside"
className="w-full "
classNames={{
inputWrapper: [
"border-1 rounded-lg",
"dark:group-data-[focused=false]:bg-transparent !border-1 dark:!border-gray-400",
],
}}
variant="bordered"
/>
</div>
<div className="flex flex-col gap-1">
<p>Komentar</p>
<Textarea
type="text"
id="address"
placeholder=""
label=""
value={detailData?.message}
labelPlacement="outside"
className="w-full "
classNames={{
inputWrapper: [
"border-1 rounded-lg",
"dark:group-data-[focused=false]:bg-transparent !border-1 dark:!border-gray-400",
],
}}
variant="bordered"
/>
</div>
<div className="flex flex-col gap-1">
<p>Status</p>
<div className="flex flex-row gap-3">
<Button
onPress={() => handleCommentStatus(1)}
color="success"
className="w-fit text-white"
>
Setujui
</Button>
<Button onPress={onOpen} color="primary" className="w-fit">
Balas
</Button>
<Button
onPress={() => handleCommentStatus(3)}
color="danger"
className="w-fit"
>
Tolak
</Button>
</div>
</div>
<div className="w-full justify-end flex">
<Button
onPress={router.back}
color="danger"
variant="bordered"
className="w-fit"
>
Kembali
</Button>
</div>
</div>
<Modal isOpen={isOpen} onOpenChange={onOpenChange}>
<ModalContent>
{(onClose) => (
<>
<ModalHeader className="flex flex-col gap-1">
Komentar Balasan
</ModalHeader>
<ModalBody>
<Textarea
type="text"
id="address"
placeholder=""
label=""
value={replyValue}
onValueChange={setReplyValue}
labelPlacement="outside"
className="w-full "
classNames={{
inputWrapper: [
"border-1 rounded-lg",
"dark:group-data-[focused=false]:bg-transparent !border-1 dark:!border-gray-400",
],
}}
variant="bordered"
/>
</ModalBody>
<ModalFooter>
<Button color="danger" variant="light" onPress={onClose}>
Close
</Button>
<Button
isDisabled={replyValue.length < 2}
color="primary"
onPress={() => sendComment()}
>
Submit
</Button>
</ModalFooter>
</>
)}
</ModalContent>
</Modal>
</div>
);
}

View File

@ -2,10 +2,10 @@ import DashboardContainer from "@/components/main/dashboard/dashboard-container"
export default function AdminPage() { export default function AdminPage() {
return ( return (
<div className="flex h-[96vh] overflow-x-hidden overflow-y-scroll gap-0 grid rounded-lg border-small ml-4"> <div className="h-[96vh] overflow-x-hidden overflow-y-scroll gap-0 grid">
<div className="px-4"> <div className="lg:px-4 !w-screen lg:!w-auto">
<DashboardContainer /> <DashboardContainer />
</div> </div>
</div> </div>
) );
} }

View File

@ -1,11 +0,0 @@
import CreateMagazineForm from '@/components/form/magazine/magazine-form'
import MagazineTable from '@/components/table/magazine/magazine-table'
import React from 'react'
const AdminMagazineCreate = () => {
return (
<div><CreateMagazineForm /></div>
)
}
export default AdminMagazineCreate

View File

@ -1,10 +0,0 @@
import MagazineTable from '@/components/table/magazine/magazine-table'
import React from 'react'
const AdminMagazine = () => {
return (
<div><MagazineTable /></div>
)
}
export default AdminMagazine

View File

@ -0,0 +1,13 @@
import SuggestionsTable from "@/components/table/suggestions/suggestions-table";
export default function SuggestionsPage() {
return (
<div className="overflow-x-hidden overflow-y-scroll">
<div className="px-2 md:px-4 md:py-4 w-full">
<div className="bg-white shadow-lg dark:bg-[#18181b] rounded-xl p-3">
<SuggestionsTable />
</div>
</div>
</div>
);
}

View File

@ -0,0 +1,13 @@
import NewCreateMagazineForm from "@/components/form/magazine/create-magazine-form";
import CreateMagazineForm from "@/components/form/magazine/magazine-form";
import React from "react";
const AdminMagazineCreate = () => {
return (
<div className="h-[96vh] bg-transparent p-3 lg:p-8 !bg-slate-100 dark:!bg-black overflow-y-auto">
<NewCreateMagazineForm />
</div>
);
};
export default AdminMagazineCreate;

View File

@ -0,0 +1,9 @@
import EditMagazineForm from "@/components/form/magazine/edit-magazine-form";
export default function DetailArticlePage() {
return (
<div className="h-[96vh] bg-transparent p-3 lg:p-8 !bg-slate-100 dark:!bg-black overflow-y-auto">
<EditMagazineForm isDetail={true} />
</div>
);
}

View File

@ -0,0 +1,9 @@
import EditMagazineForm from "@/components/form/magazine/edit-magazine-form";
export default function EditArticlePage() {
return (
<div className="h-[96vh] bg-transparent p-3 lg:p-8 !bg-slate-100 dark:!bg-black overflow-y-auto">
<EditMagazineForm isDetail={false} />
</div>
);
}

View File

@ -0,0 +1,26 @@
"use client";
import { AddIcon } from "@/components/icons";
import MagazineTable from "@/components/table/magazine/magazine-table";
import { Button } from "@heroui/react";
import Link from "next/link";
export default function MagazineTablePage() {
return (
<div className="overflow-x-hidden overflow-y-scroll">
<div className="px-2 md:px-4 md:py-4 w-full">
<div className="bg-white shadow-lg dark:bg-[#18181b] rounded-xl p-3">
<Link href="/admin/magazine/create">
<Button
size="md"
className="bg-[#F07C00] text-white w-full lg:w-fit"
>
Tambah Majalah
<AddIcon />
</Button>
</Link>
<MagazineTable />
</div>
</div>
</div>
);
}

View File

@ -0,0 +1,418 @@
"use client";
import { AddIcon, CloudUploadIcon, TimesIcon } from "@/components/icons";
import ArticleTable from "@/components/table/article-table";
import CategoriesTable from "@/components/table/master-categories/categories-table";
import generatedArticleIds from "@/store/generated-article-store";
import {
Button,
Card,
Chip,
Input,
Modal,
ModalBody,
ModalContent,
ModalFooter,
ModalHeader,
Textarea,
useDisclosure,
} from "@heroui/react";
import Link from "next/link";
import { useRouter } from "next/navigation";
import * as z from "zod";
import { zodResolver } from "@hookform/resolvers/zod";
import { Controller, useForm } from "react-hook-form";
import { Fragment, useEffect, useState } from "react";
import { getArticleByCategory } from "@/services/article";
import ReactSelect from "react-select";
import makeAnimated from "react-select/animated";
import { useDropzone } from "react-dropzone";
import { close, error, loading } from "@/config/swal";
import {
createCategory,
uploadCategoryThumbnail,
} from "@/services/master-categories";
import Swal from "sweetalert2";
import withReactContent from "sweetalert2-react-content";
import Image from "next/image";
import { getUnixTimestamp } from "@/utils/global";
const categorySchema = z.object({
id: z.number(),
label: z.string(),
value: z.number(),
});
const createArticleSchema = z.object({
title: z.string().min(2, {
message: "Judul harus diisi",
}),
description: z.string().min(2, {
message: "Deskripsi harus diisi",
}),
tags: z.array(z.string()),
// parent: z.array(categorySchema).nonempty({
// message: "Kategori harus memiliki setidaknya satu item",
// }),
// tags: z.array(z.string()).nonempty({
// message: "Minimal 1 tag",
// }),
});
interface CategoryType {
id: number;
label: string;
value: number;
}
export default function MasterCategoryTable() {
const router = useRouter();
const MySwal = withReactContent(Swal);
const animatedComponents = makeAnimated();
const { isOpen, onOpen, onOpenChange, onClose } = useDisclosure();
const [listCategory, setListCategory] = useState<CategoryType[]>([]);
const [files, setFiles] = useState<File[]>([]);
const [refresh, setRefresh] = useState(false);
const [tag, setTag] = useState("");
const [selectedParent, setSelectedParent] = useState<any>();
const [selectedParentValidation, setSelectedParentValidation] = useState("");
const formOptions = {
resolver: zodResolver(createArticleSchema),
defaultValues: { title: "", description: "", tags: [] },
};
const { getRootProps, getInputProps } = useDropzone({
onDrop: (acceptedFiles) => {
setFiles(acceptedFiles.map((file) => Object.assign(file)));
},
maxFiles: 1,
});
type UserSettingSchema = z.infer<typeof createArticleSchema>;
const {
control,
handleSubmit,
formState: { errors },
setValue,
getValues,
watch,
setError,
clearErrors,
} = useForm<UserSettingSchema>(formOptions);
useEffect(() => {
fetchCategory();
}, []);
const fetchCategory = async () => {
const res = await getArticleByCategory(getUnixTimestamp());
if (res?.data?.data) {
setupCategory(res?.data?.data);
}
};
const setupCategory = (data: any) => {
const temp = [];
for (const element of data) {
temp.push({
id: element.id,
label: element.title,
value: element.id,
});
}
setListCategory(temp);
};
const onSubmit = async (values: z.infer<typeof createArticleSchema>) => {
loading();
const formData = {
title: values.title,
statusId: 1,
parentId: selectedParent ? selectedParent.id : 0,
tags: values.tags.join(","),
description: values.description,
};
const response = await createCategory(formData);
if (response?.error) {
console.log();
if (
response.message?.messages[0]?.includes(
"article_categories_title_unique",
)
) {
error("Judul sudah tersedia, silahkan buat dengan judul berbeda");
} else {
error(response.message?.messages);
}
return false;
}
const categoryId = response?.data?.data?.id;
const formFiles = new FormData();
formFiles.append("files", files[0]);
const resFile = await uploadCategoryThumbnail(categoryId, formFiles);
if (resFile?.error) {
error(resFile.message);
return false;
}
close();
setRefresh(!refresh);
MySwal.fire({
title: "Sukses",
icon: "success",
confirmButtonColor: "#3085d6",
confirmButtonText: "OK",
}).then((result) => {
if (result.isConfirmed) {
}
});
};
const handleRemoveFile = (file: File) => {
const uploadedFiles = files;
const filtered = uploadedFiles.filter((i) => i.name !== file.name);
setFiles([...filtered]);
};
return (
<div className="overflow-x-hidden overflow-y-scroll">
<div className="px-2 md:px-4 md:py-4 w-full">
<div className="bg-white shadow-lg dark:bg-[#18181b] rounded-xl p-3">
<Button
size="md"
className="bg-[#F07C00] text-white w-full lg:w-fit"
onPress={onOpen}
>
Tambah Kategori
<AddIcon />
</Button>
<CategoriesTable triggerRefresh={refresh} />
</div>
</div>
<Modal isOpen={isOpen} onOpenChange={onOpenChange} size="3xl">
<ModalContent>
{() => (
<>
<ModalHeader className="flex flex-col gap-1">
Kategori Baru
</ModalHeader>
<ModalBody>
<form
onSubmit={handleSubmit(onSubmit)}
className="flex flex-col gap-3"
>
<div className="flex flex-col gap-1">
<p className="text-sm">Nama Kategori</p>
<Controller
control={control}
name="title"
render={({ field: { onChange, value } }) => (
<Input
type="text"
id="title"
placeholder=""
label=""
value={value}
onChange={onChange}
labelPlacement="outside"
className="w-full "
classNames={{
inputWrapper: [
"border-1 rounded-lg",
"dark:group-data-[focused=false]:bg-transparent !border-1 dark:!border-gray-400",
],
input: "outline-none",
}}
variant="bordered"
/>
)}
/>
{errors?.title && (
<p className="text-red-400 text-sm">
{errors.title?.message}
</p>
)}
</div>
<div className="flex flex-col gap-1">
<p className="text-sm">Deskripsi</p>
<Controller
control={control}
name="description"
render={({ field: { onChange, value } }) => (
<Textarea
type="text"
id="description"
placeholder=""
label=""
value={value}
onChange={onChange}
labelPlacement="outside"
className="w-full "
classNames={{
inputWrapper: [
"border-1 rounded-lg",
"dark:group-data-[focused=false]:bg-transparent !border-1 dark:!border-gray-400",
],
input: "outline-none",
}}
variant="bordered"
/>
)}
/>
{errors?.title && (
<p className="text-red-400 text-sm">
{errors.title?.message}
</p>
)}
</div>
<div className="flex flex-col gap-1">
<p className="text-sm mt-3">
Parent Kategori <span>(Optional)</span>
</p>
<ReactSelect
className="basic-single text-black z-50"
classNames={{
control: (state: any) =>
"!rounded-lg bg-white !border-1 !border-gray-200 dark:!border-stone-500",
}}
classNamePrefix="select"
onChange={setSelectedParent}
closeMenuOnSelect={false}
components={animatedComponents}
isClearable={true}
isSearchable={true}
isMulti={false}
placeholder="Kategori..."
name="sub-module"
options={listCategory}
/>
{selectedParentValidation !== "" && !selectedParent && (
<p className="text-red-400 text-sm">
{selectedParentValidation}
</p>
)}
</div>
<div className="flex flex-col gap-1">
<p className="text-sm mt-3">Tag Terkait</p>
<Controller
control={control}
name="tags"
render={({ field: { onChange, value } }) => (
<Input
type="text"
id="tags"
placeholder=""
label=""
value={tag}
onValueChange={setTag}
startContent={
<div className="flex flex-row gap-1">
{value.map((item, index) => (
<Chip
color="primary"
key={index}
className=""
onClose={() => {
const filteredTags = value.filter(
(tag) => tag !== item,
);
if (filteredTags.length === 0) {
setError("tags", {
type: "manual",
message: "Tags tidak boleh kosong",
});
} else {
clearErrors("tags");
setValue(
"tags",
filteredTags as [string, ...string[]],
);
}
}}
>
{item}
</Chip>
))}
</div>
}
onKeyDown={(e) => {
if (e.key === "Enter") {
if (tag.trim() !== "") {
setValue("tags", [...value, tag.trim()]);
setTag("");
e.preventDefault();
}
}
}}
labelPlacement="outside"
className="w-full h-fit"
classNames={{
inputWrapper: [
"border-1 rounded-lg",
"dark:group-data-[focused=false]:bg-transparent !border-1 dark:!border-gray-400 outline-none",
],
input: "outline-none",
}}
variant="bordered"
/>
)}
/>
</div>
<div className="flex flex-col gap-1">
<p className="text-sm mt-3">Thumbnail</p>
{files.length < 1 && (
<Fragment>
<div {...getRootProps({ className: "dropzone" })}>
<input {...getInputProps()} />
<div className=" w-full text-center border-dashed border border-default-200 dark:border-default-300 rounded-md py-[52px] flex items-center flex-col">
<CloudUploadIcon />
<h4 className=" text-2xl font-medium mb-1 mt-3 text-card-foreground/80">
Tarik file disini atau klik untuk upload.
</h4>
<div className=" text-xs text-muted-foreground">
( Upload file dengan format .jpg, .jpeg, atau
.png. Ukuran maksimal 100mb.)
</div>
</div>
</div>
</Fragment>
)}
{files.length > 0 && (
<div className="flex flex-row gap-2">
<Image
src={URL.createObjectURL(files[0])}
className="w-[30%]"
alt="thumbnail"
width={480}
height={480}
/>
<Button
className=" border-none rounded-full"
variant="bordered"
onClick={() => handleRemoveFile(files[0])}
>
<TimesIcon />
</Button>
</div>
)}
</div>
<ModalFooter className="self-end grow items-end">
<Button color="primary" type="submit">
Simpan
</Button>
<Button color="danger" variant="light" onPress={onClose}>
Tutup
</Button>
</ModalFooter>
</form>
</ModalBody>
</>
)}
</ModalContent>
</Modal>
</div>
);
}

View File

@ -1,10 +1,10 @@
import FormMasterUserRole from '@/components/form/form-master-user-role' import FormMasterUserRole from "@/components/form/form-master-user-role";
import { Card } from '@nextui-org/react' import { Card } from "@heroui/react";
export default function CreateMasterUserRolePage() { export default function CreateMasterUserRolePage() {
return ( return (
<Card className="h-[96vh] rounded-md my- ml-3 border bg-transparent"> <Card className="h-[96vh] rounded-md bg-transparent">
<FormMasterUserRole /> <FormMasterUserRole />
</Card> </Card>
) );
} }

View File

@ -1,10 +1,10 @@
import FormDetailMasterUserRole from '@/components/form/form-detail-master-user-role' import FormDetailMasterUserRole from "@/components/form/form-detail-master-user-role";
import { Card } from '@nextui-org/react' import { Card } from "@heroui/react";
export default function DetailMasterRolePage() { export default function DetailMasterRolePage() {
return ( return (
<Card className="h-[96vh] rounded-md my- ml-3 border bg-transparent"> <Card className="h-[96vh] rounded-md my- ml-3 bg-transparent">
<FormDetailMasterUserRole /> <FormDetailMasterUserRole />
</Card> </Card>
) );
} }

View File

@ -1,23 +1,26 @@
"use client" "use client";
import { AddIcon } from "@/components/icons"; import { AddIcon } from "@/components/icons";
import MasterRoleTable from "@/components/table/master-role-table"; import MasterRoleTable from "@/components/table/master-role-table";
import { Button, Card } from "@nextui-org/react"; import { Button, Card } from "@heroui/react";
import Link from "next/link"; import Link from "next/link";
export default function MasterRolePage() { export default function MasterRolePage() {
return ( return (
<div className="h-[96vh] overflow-x-hidden overflow-y-scroll gap-0 grid rounded-lg border-2 ml-4"> <div className="overflow-x-hidden overflow-y-scroll">
<div className="px-4"> <div className="px-2 md:px-4 md:py-4 w-full">
<Card className="rounded-md my-5 pl-5 py-2"> <div className="bg-white shadow-lg dark:bg-[#18181b] rounded-xl py-3">
<Link href="/admin/master-role/create"> <Link href="/admin/master-role/create" className="mx-3">
<Button size="md" color="primary" className="w-min"> <Button
<AddIcon />New Role size="md"
color="primary"
className="bg-[#F07C00] text-white"
>
Peran Baru
<AddIcon />
</Button> </Button>
</Link> </Link>
</Card>
<Card className="rounded-md my-5">
<MasterRoleTable /> <MasterRoleTable />
</Card> </div>
</div> </div>
</div> </div>
); );

View File

@ -1,13 +1,36 @@
import MagazineTable from '@/components/table/magazine/magazine-table' import { AddIcon } from "@/components/icons";
import MenuDataTable from '@/components/table/master/master-menu/menu-data/menu-data-table' import MappingUserLevel from "@/components/table/master/master-user-level/mapping-user-level";
import MasterModuleTable from '@/components/table/master/master-module/master-module-table' import MasterUserLevelTable from "@/components/table/master/master-user-level/master-user-level-table";
import MasterUserLevelTable from '@/components/table/master/master-user-level/master-user-level-table' import { Button } from "@heroui/button";
import React from 'react' import Link from "next/link";
import React from "react";
const AdminMasterUserLevel = () => { const AdminMasterUserLevel = () => {
return ( return (
<div><MasterUserLevelTable /></div> // <div>
) // <MasterUserLevelTable />
} // </div>
// <div>
// <MappingUserLevel />
// </div>
<div className="overflow-x-hidden overflow-y-scroll">
<div className="px-2 md:px-4 md:py-4 w-full">
<div className="bg-white shadow-lg dark:bg-[#18181b] rounded-xl py-3">
<Link href="/admin/master-user-level/create" className="mx-3">
<Button
size="md"
color="primary"
className="bg-[#F07C00] text-white"
>
Pengguna Baru
<AddIcon />
</Button>
</Link>
<MasterUserLevelTable />
</div>
</div>
</div>
);
};
export default AdminMasterUserLevel export default AdminMasterUserLevel;

View File

@ -1,10 +1,10 @@
import FormMasterUser from '@/components/form/form-master-user' import FormMasterUser from "@/components/form/form-master-user";
import { Card } from '@nextui-org/react' import { Card } from "@heroui/react";
export default function CreateMasterUserPage() { export default function CreateMasterUserPage() {
return ( return (
<Card className="h-[96vh] rounded-md my- ml-3 border bg-transparent"> <Card className="h-[96vh] rounded-md bg-transparent">
<FormMasterUser /> <FormMasterUser />
</Card> </Card>
) );
} }

View File

@ -0,0 +1,11 @@
import FormMasterUser from "@/components/form/form-master-user";
import FormMasterUserEdit from "@/components/form/form-master-user-edit";
import { Card } from "@heroui/react";
export default function CreateMasterUserPage() {
return (
<Card className="h-[96vh] rounded-md bg-transparent">
<FormMasterUserEdit />
</Card>
);
}

View File

@ -1,23 +1,26 @@
"use client" "use client";
import { AddIcon } from "@/components/icons"; import { AddIcon } from "@/components/icons";
import MasterUserTable from "@/components/table/master-user-table"; import MasterUserTable from "@/components/table/master-user-table";
import { Button, Card } from "@nextui-org/react"; import { Button, Card } from "@heroui/react";
import Link from "next/link"; import Link from "next/link";
export default function MasterUserPage() { export default function MasterUserPage() {
return ( return (
<div className="h-[96vh] overflow-x-hidden overflow-y-scroll gap-0 grid rounded-lg border-2 ml-4"> <div className="overflow-x-hidden overflow-y-scroll">
<div className="px-4"> <div className="px-2 md:px-4 md:py-4 w-full">
<Card className="rounded-md my-5 pl-5 py-2"> <div className="bg-white shadow-lg dark:bg-[#18181b] rounded-xl py-3">
<Link href="/admin/master-user/create"> <Link href="/admin/master-user/create" className="mx-3">
<Button size="md" color="primary" className="w-min"> <Button
<AddIcon />New User size="md"
color="primary"
className="bg-[#F07C00] text-white"
>
Pengguna Baru
<AddIcon />
</Button> </Button>
</Link> </Link>
</Card>
<Card className="rounded-md my-5">
<MasterUserTable /> <MasterUserTable />
</Card> </div>
</div> </div>
</div> </div>
); );

View File

@ -0,0 +1,10 @@
import StaticPageBuilder from "@/components/main/static-page/static-page-main";
import { Card } from "@heroui/react";
export default function StaticPageGenerator() {
return (
<div className="bg-transparent p-4 overflow-auto">
<StaticPageBuilder />
</div>
);
}

View File

@ -0,0 +1,10 @@
import StaticPageBuilderEdit from "@/components/form/static-page/static-page-edit-form";
import { Card } from "@heroui/react";
export default function StaticPageEdit() {
return (
<Card className="rounded-md bg-transparent p-4 overflow-auto">
<StaticPageBuilderEdit />
</Card>
);
}

View File

@ -0,0 +1,26 @@
import { AddIcon } from "@/components/icons";
import StaticPageTable from "@/components/table/static-page-table";
import { Button, Card } from "@heroui/react";
import Link from "next/link";
export default function StaticPageGeneratorList() {
return (
<div className="overflow-x-hidden overflow-y-scroll rounded-lg">
<div className="px-2 md:px-4 md:py-4 w-full">
<div className="bg-white shadow-lg dark:bg-[#18181b] rounded-xl p-3">
<Link href="/admin/static-page/create">
<Button
size="md"
color="primary"
className="bg-[#F07C00] text-white w-full lg:w-fit"
>
Tambah Halaman
<AddIcon />
</Button>
</Link>
<StaticPageTable />
</div>
</div>
</div>
);
}

View File

@ -0,0 +1,12 @@
import CreateMasterUserLevelForm from "@/components/form/master/master-user-level/master-user-level-form";
import React from "react";
const AdminMasterUserLevelCreate = () => {
return (
<div>
<CreateMasterUserLevelForm />
</div>
);
};
export default AdminMasterUserLevelCreate;

View File

@ -0,0 +1,8 @@
import EditUserLevelForm from "@/components/form/master/master-user-level/edit-user-level-form";
import React from "react";
const AdminMasterUserLevelCreate = () => {
return <EditUserLevelForm />;
};
export default AdminMasterUserLevelCreate;

View File

@ -0,0 +1,30 @@
import { AddIcon } from "@/components/icons";
import MappingUserLevel from "@/components/table/master/master-user-level/mapping-user-level";
import MasterUserLevelTable from "@/components/table/master/master-user-level/master-user-level-table";
import { Button } from "@heroui/button";
import Link from "next/link";
import React from "react";
const AdminMasterUserLevel = () => {
return (
<div className="overflow-x-hidden overflow-y-scroll">
<div className="px-2 md:px-4 md:py-4 w-full">
<div className="bg-white shadow-lg dark:bg-[#18181b] rounded-xl py-3">
<Link href="/admin/user-level/create" className="mx-3">
<Button
size="md"
color="primary"
className="bg-[#F07C00] text-white"
>
Level Baru
<AddIcon />
</Button>
</Link>
<MasterUserLevelTable />
</div>
</div>
</div>
);
};
export default AdminMasterUserLevel;

View File

@ -0,0 +1,15 @@
"use client";
import { AdminLayout } from "@/components/layout/admin-layout";
export default function AdminPageLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<AdminLayout>
{children}
</AdminLayout>
);
}

View File

@ -0,0 +1,40 @@
"use client";
import PasswordForm from "@/components/form/settings/password";
import ProfileForm from "@/components/form/settings/profile";
import { close, loading } from "@/config/swal";
import { getDetailMasterUsers, getProfile } from "@/services/master-user";
import { getCookiesDecrypt } from "@/utils/global";
import { Tab, Tabs } from "@heroui/react";
import Cookies from "js-cookie";
import { useEffect, useState } from "react";
export default function Settings() {
const [profile, setProfile] = useState<any>();
const uid = getCookiesDecrypt("uie");
useEffect(() => {
if (!profile) {
initFetch();
}
}, [profile]);
const initFetch = async () => {
loading();
// const profile = await getDetailMasterUsers(String(uid));
const profile = await getProfile();
setProfile(profile?.data?.data);
close();
};
return (
<div className="w-full lg:w-[60%] p-3">
<div className="flex flex-col bg-gray-50 shadow-md dark:bg-stone-900 text-black dark:text-white rounded-md p-5">
<Tabs aria-label="Tabs radius" radius="sm">
<Tab key="profile" title="Profile">
<ProfileForm profile={profile} doFetch={() => initFetch()} />
</Tab>
<Tab key="music" title="Password">
<PasswordForm doFetch={() => initFetch()} />
</Tab>
</Tabs>
</div>
</div>
);
}

View File

@ -1,13 +1,7 @@
import { HumasLayout } from "@/components/layout/HumasLayout";
export default function AuthLayout({ export default function AuthLayout({
children, children,
}: { }: {
children: React.ReactNode; children: React.ReactNode;
}) { }) {
return ( return <> {children}</>;
<HumasLayout>
{children}
</HumasLayout>
);
} }

View File

@ -1,8 +1,5 @@
import Login from '@/components/form/login' import Login from "@/components/form/login";
import React from 'react'
export default function AuthPage() { export default function AuthPage() {
return ( return <Login />;
<Login />
)
} }

View File

@ -1,7 +0,0 @@
import React from 'react'
export default function Page() {
return (
<div>page</div>
)
}

View File

@ -1,15 +1,11 @@
'use client' "use client";
import { HumasLayout } from "@/components/layout/HumasLayout"; import HumasLayout from "@/components/layout/humas-layout";
export default function DocsLayout({ export default function DocsLayout({
children, children,
}: { }: {
children: React.ReactNode; children: React.ReactNode;
}) { }) {
return ( return <HumasLayout>{children}</HumasLayout>;
<HumasLayout>
{children}
</HumasLayout>
);
} }

View File

@ -1,13 +0,0 @@
import { HumasLayout } from "@/components/layout/HumasLayout";
export default function EMajalahLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<HumasLayout>
{children}
</HumasLayout>
);
}

View File

@ -1,8 +1,10 @@
import ListEnewsPolri from '@/components/table/tabel-emajalah-polri' import HumasLayout from "@/components/layout/humas-layout";
import React from 'react' import ListEnewsPolri from "@/components/table/tabel-emajalah-polri";
export default function ListEnewsPage() { export default function ListEnewsPage() {
return ( return (
<HumasLayout>
<ListEnewsPolri /> <ListEnewsPolri />
) </HumasLayout>
);
} }

View File

@ -1,13 +1,9 @@
import { HumasLayout } from "@/components/layout/HumasLayout"; import HumasLayout from "@/components/layout/humas-layout";
export default function DetailEMajalahLayout({ export default function DetailEMajalahLayout({
children, children,
}: { }: {
children: React.ReactNode; children: React.ReactNode;
}) { }) {
return ( return <>{children}</>;
<HumasLayout>
{children}
</HumasLayout>
);
} }

View File

@ -1,8 +1,22 @@
import EMagazineDetail from '@/components/detail/E-MagazineDetail' "use client";
import React from 'react' import HumasLayout from "@/components/layout/humas-layout";
import EMagazineDetail from "@/components/main/detail/e-magazine-detail";
import React, { Suspense, useEffect, useState } from "react";
export default function EnewsDetailPage() { export default function EnewsDetailPage() {
const [hasMounted, setHasMounted] = useState(false);
useEffect(() => {
setHasMounted(true);
}, []);
// Render
if (!hasMounted) return null;
return ( return (
<HumasLayout>
<Suspense>
<EMagazineDetail /> <EMagazineDetail />
) </Suspense>
</HumasLayout>
);
} }

View File

@ -1,13 +1,10 @@
import { HumasLayout } from "@/components/layout/HumasLayout"; "use client";
import HumasLayout from "@/components/layout/humas-layout";
export default function ApplicationLayout({ export default function ApplicationLayout({
children, children,
}: { }: {
children: React.ReactNode; children: React.ReactNode;
}) { }) {
return ( return <HumasLayout>{children}</HumasLayout>;
<HumasLayout>
{children}
</HumasLayout>
);
} }

View File

@ -1,7 +1,8 @@
import FormApplication from '@/components/form/form-permohonan-informasi' import FormApplication from "@/components/form/form-permohonan-informasi";
export default function ApplicationPage() { export default function ApplicationPage() {
return ( return (
<FormApplication /> <div></div>
) // <FormApplication />
);
} }

View File

@ -1,13 +1,10 @@
import { HumasLayout } from "@/components/layout/HumasLayout"; "use client";
import HumasLayout from "@/components/layout/humas-layout";
export default function KontakLayout({ export default function KontakLayout({
children, children,
}: { }: {
children: React.ReactNode; children: React.ReactNode;
}) { }) {
return ( return <HumasLayout>{children}</HumasLayout>;
<HumasLayout>
{children}
</HumasLayout>
);
} }

View File

@ -1,7 +1,10 @@
import Contact from '@/components/detail/Contact' import Contact from "@/components/main/detail/contact";
import { Suspense } from "react";
export default function VisiMisiPage() { export default function VisiMisiPage() {
return ( return (
<Suspense>
<Contact /> <Contact />
) </Suspense>
);
} }

View File

@ -1,9 +1,23 @@
// RootLayout.tsx
import { fontSans } from "@/config/fonts"; import { fontSans } from "@/config/fonts";
import { siteConfig } from "@/config/site"; import { siteConfig } from "@/config/site";
import { Inter } from "next/font/google";
import "@/styles/globals.css"; import "@/styles/globals.css";
import clsx from "clsx"; import clsx from "clsx";
import { Metadata } from "next"; import { Metadata } from "next";
import { Providers } from "./providers"; import { Providers } from "./providers";
import { type ReactNode } from "react";
import LoadTawk from "@/components/ui/tawkto/load-tawk";
import LoadScript from "@/utils/loadsripct";
const inter = Inter({ subsets: ["latin"] });
// const Tawkto = dynamic(
// () => {
// return import("@/components/ui/tawkto/tawkto");
// },
// { ssr: true }
// );
export const metadata: Metadata = { export const metadata: Metadata = {
title: { title: {
@ -22,25 +36,35 @@ export const metadata: Metadata = {
}, },
}; };
export default function RootLayout({ export default function RootLayout({ children }: { children: ReactNode }) {
children,
}: {
children: React.ReactNode;
}) {
return ( return (
<html lang="en" suppressHydrationWarning className="scroll-smooth"> <html suppressHydrationWarning className="scroll-smooth">
<head /> <head>
<meta
name="theme-color"
content="white"
media="(prefers-color-scheme: light)"
/>
<link rel="icon" href="/logohumas.png" />
<meta
name="theme-color"
content="black"
media="(prefers-color-scheme: dark)"
/>
<meta property="og:image" content="/logohumas.png" />
<link rel="manifest" href="/manifest.json" />
<link rel="apple-touch-icon" href="divhumas.png" />
<meta name="theme-color" content="#000000" />
<LoadScript />
</head>
<body <body
className={clsx( className={clsx("bg-background font-sans antialiased", inter.className)}
"bg-background font-sans antialiased",
fontSans.variable
)}
> >
<Providers themeProps={{ attribute: "class", defaultTheme: "dark" }}> <Providers themeProps={{ attribute: "class", defaultTheme: "light" }}>
<main className=""> <main className="">{children}</main>
{children}
</main>
</Providers> </Providers>
<LoadTawk />
</body> </body>
</html> </html>
); );

26
app/manifest.ts Normal file
View File

@ -0,0 +1,26 @@
import type { MetadataRoute } from "next";
export default function manifest(): MetadataRoute.Manifest {
return {
name: "Konten Humas",
short_name: "PWA",
description:
"DIVISI HUMAS POLRI - Pengelola Informasi dan Dokumentasi Polri.",
start_url: "/",
display: "standalone",
background_color: "#ffffff",
theme_color: "#000000",
icons: [
{
src: "/divhumas.png",
sizes: "192x192",
type: "image/png",
},
{
src: "/divhumas.png",
sizes: "512x512",
type: "image/png",
},
],
};
}

View File

@ -1,13 +0,0 @@
import { HumasLayout } from "@/components/layout/HumasLayout";
export default function PoldaNewsLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<HumasLayout>
{children}
</HumasLayout>
);
}

View File

@ -1,8 +0,0 @@
import ListNews from '@/components/detail/ListNews'
import React from 'react'
export default function PoldaNewsPage() {
return (
<ListNews />
)
}

View File

@ -1,13 +1,9 @@
import { HumasLayout } from "@/components/layout/HumasLayout"; "use client";
export default function AllNewsLayout({ export default function AllNewsLayout({
children, children,
}: { }: {
children: React.ReactNode; children: React.ReactNode;
}) { }) {
return ( return <>{children}</>;
<HumasLayout>
{children}
</HumasLayout>
);
} }

View File

@ -1,8 +1,20 @@
import ListNews from '@/components/detail/ListNews' "use client";
import React from 'react' import ListNews from "@/components/main/detail/list-news";
import React, { useEffect, useState } from "react";
import HumasLayout from "@/components/layout/humas-layout";
export default function ListNewsPage() { export default function ListNewsPage() {
const [hasMounted, setHasMounted] = useState(false);
useEffect(() => {
setHasMounted(true);
}, []);
// Render
if (!hasMounted) return null;
return ( return (
<HumasLayout>
<ListNews /> <ListNews />
) </HumasLayout>
);
} }

View File

@ -1,13 +1,7 @@
import { HumasLayout } from "@/components/layout/HumasLayout";
export default function NewsLayout({ export default function NewsLayout({
children, children,
}: { }: {
children: React.ReactNode; children: React.ReactNode;
}) { }) {
return ( return <>{children}</>;
<HumasLayout>
{children}
</HumasLayout>
);
} }

View File

@ -1,8 +1,51 @@
import DetailPage from '@/components/detail/DetailPage' import HumasLayout from "@/components/layout/humas-layout";
import React from 'react' import DetailPage from "@/components/main/detail/new-detail";
import { getArticleById } from "@/services/article";
import { Metadata } from "next";
export default function NewsPage() { type Props = {
return ( params: { id: string };
<DetailPage /> };
)
export async function generateMetadata({ params }: any): Promise<Metadata> {
// const params = await props.params;
const { id } = await params;
const res = await getArticleById(id?.split("-")[0]);
const article = res?.data?.data;
if (article) {
return {
title: article.title,
description: article.description,
openGraph: {
title: article.title,
description: article.description,
images: [`${article.thumbnailUrl}`],
},
};
} else {
return {
title: "",
description: "",
openGraph: {
title: "",
description: "",
images: [``],
},
};
}
}
export default async function NewsPage({ params }: any) {
// const params = await props.params;
const { id } = await params;
const articleId = id?.split("-")[0];
const res = await getArticleById(articleId);
const article = res?.data?.data;
return (
<HumasLayout>
<DetailPage datas={article} />
</HumasLayout>
);
} }

View File

@ -0,0 +1,7 @@
export default function PoldaNewsLayout({
children,
}: {
children: React.ReactNode;
}) {
return <>{children}</>;
}

View File

@ -0,0 +1,12 @@
import ListNews from "@/components/main/detail/list-news";
import React from "react";
import HumasLayout from "@/components/layout/humas-layout";
export default function PoldaNewsPage() {
// return <ListNews />;
return (
<HumasLayout>
<ListNews />
</HumasLayout>
);
}

View File

@ -0,0 +1,7 @@
export default function PoldaNewsLayout({
children,
}: {
children: React.ReactNode;
}) {
return <>{children}</>;
}

View File

@ -0,0 +1,12 @@
import ListNews from "@/components/main/detail/list-news";
import React from "react";
import HumasLayout from "@/components/layout/humas-layout";
export default function PoldaNewsPage() {
// return <ListNews />;
return (
<HumasLayout>
<ListNews />
</HumasLayout>
);
}

View File

@ -1,27 +1,36 @@
'use client' "use client";
import BannerHumas from "@/components/Landing Page/BannerHumas"; import InstallPrompt from "@/components/install-promp";
import BodyLayout from "@/components/Landing Page/BodyLayout"; import BannerHumasNew from "@/components/landing/banner-new";
import HeaderNews from "@/components/Landing Page/HeaderNews"; import BodyLayout from "@/components/landing/BodyLayout";
import { HumasLayout } from "@/components/layout/HumasLayout"; import AnalyticDrawer from "@/components/landing/drawer";
import { useEffect, useState } from "react"; import FooterNew from "@/components/landing/footer-new";
import HeaderNews from "@/components/landing/HeaderNews";
import NewsTicker from "@/components/landing/NewsTicker";
import dynamic from "next/dynamic";
import { Suspense } from "react";
const TawktoEmbed = dynamic(
() => {
return import("@/components/ui/tawkto/tawkto");
},
{ ssr: true }
);
export default function Home() { export default function Home() {
const [hasMounted, setHasMounted] = useState(false);
useEffect(() => {
setHasMounted(true);
}, []);
// Render
if (!hasMounted) return null;
return ( return (
<> <>
<HumasLayout> {/* <TawktoEmbed /> */}
<BannerHumas /> <section className="flex flex-col">
{/* <InstallPrompt /> */}
<NewsTicker />
<AnalyticDrawer />
<BannerHumasNew />
<HeaderNews /> <HeaderNews />
<BodyLayout /> <BodyLayout />
</HumasLayout> <Suspense>
<FooterNew margin={true} />
</Suspense>
</section>
</> </>
); );
} }

View File

@ -1,13 +1,9 @@
import { PPIDAdminLayout } from "@/components/layout/PPIDAdminLayout"; import { PPIDAdminLayout } from "@/components/layout/ppid-admin-layout";
export default function LayoutAdmin({ export default function LayoutAdmin({
children, children,
}: { }: {
children: React.ReactNode; children: React.ReactNode;
}) { }) {
return ( return <PPIDAdminLayout>{children}</PPIDAdminLayout>;
<PPIDAdminLayout >
{children}
</PPIDAdminLayout>
);
} }

View File

@ -1,19 +1,14 @@
'use client' "use client";
import { PPIDLayout } from '@/components/layout/PPIDLayout'; import { PPIDLayout } from "@/components/layout/ppid-layout";
import { usePathname } from 'next/navigation'; import { usePathname } from "next/navigation";
import React, { Children } from 'react' import React, { Children } from "react";
export default function EPPIDPoldaLayout({ export default function EPPIDPoldaLayout({
children, children,
}: { }: {
children: React.ReactNode children: React.ReactNode;
}) { }) {
const pathname = usePathname(); const pathname = usePathname();
console.log(pathname)
return ( return <PPIDLayout>{children}</PPIDLayout>;
<PPIDLayout>
{children}
</PPIDLayout>
)
} }

View File

@ -1,7 +1,5 @@
import PPIDPolda from '@/components/Portal PPID/PPIDPolda' import PPIDPolda from "@/components/layout/portal-ppid/PPIDPolda";
export default function PPIDSakterPage() { export default function PPIDSakterPage() {
return ( return <PPIDPolda />;
<PPIDPolda />
)
} }

View File

@ -1,19 +1,14 @@
'use client' "use client";
import { PPIDLayout } from '@/components/layout/PPIDLayout'; import { PPIDLayout } from "@/components/layout/ppid-layout";
import { usePathname } from 'next/navigation'; import { usePathname } from "next/navigation";
import React, { Children } from 'react' import React, { Children } from "react";
export default function EPPIDSatkerLayout({ export default function EPPIDSatkerLayout({
children, children,
}: { }: {
children: React.ReactNode children: React.ReactNode;
}) { }) {
const pathname = usePathname(); const pathname = usePathname();
console.log(pathname)
return ( return <PPIDLayout>{children}</PPIDLayout>;
<PPIDLayout>
{children}
</PPIDLayout>
)
} }

View File

@ -1,7 +1,5 @@
import PPIDSatker from '@/components/Portal PPID/PPIDSatker' import PPIDSatker from "@/components/layout/portal-ppid/PPIDSatker";
export default function PPIDSakterPage() { export default function PPIDSakterPage() {
return ( return <PPIDSatker />;
<PPIDSatker />
)
} }

View File

@ -1,7 +1,5 @@
import InformasiBerkala from '@/components/table/informasi-berkala' import InformasiBerkala from "@/components/table/informasi-berkala-table";
export default function InformasiSMPage() { export default function InformasiSMPage() {
return ( return <InformasiBerkala />;
<InformasiBerkala />
)
} }

View File

@ -1,19 +1,14 @@
'use client' "use client";
import { PPIDLayout } from '@/components/layout/PPIDLayout'; import { PPIDLayout } from "@/components/layout/ppid-layout";
import { usePathname } from 'next/navigation'; import { usePathname } from "next/navigation";
import React, { Children } from 'react' import React, { Children } from "react";
export default function InfoPublicLayout({ export default function InfoPublicLayout({
children, children,
}: { }: {
children: React.ReactNode children: React.ReactNode;
}) { }) {
const pathname = usePathname(); const pathname = usePathname();
console.log(pathname)
return ( return <PPIDLayout>{children}</PPIDLayout>;
<PPIDLayout>
{children}
</PPIDLayout>
)
} }

View File

@ -1,19 +1,14 @@
'use client' "use client";
import { PPIDLayout } from '@/components/layout/PPIDLayout'; import { PPIDLayout } from "@/components/layout/ppid-layout";
import { usePathname } from 'next/navigation'; import { usePathname } from "next/navigation";
import React, { Children } from 'react' import React, { Children } from "react";
export default function LayananInformasiLayout({ export default function LayananInformasiLayout({
children, children,
}: { }: {
children: React.ReactNode children: React.ReactNode;
}) { }) {
const pathname = usePathname(); const pathname = usePathname();
console.log(pathname)
return ( return <PPIDLayout>{children}</PPIDLayout>;
<PPIDLayout>
{children}
</PPIDLayout>
)
} }

View File

@ -1,8 +1,9 @@
import FormObjectionRequest from '@/components/form/form-permohonan-keberatan' import FormObjectionRequest from "@/components/form/form-permohonan-keberatan";
import React from 'react' import React from "react";
export default function PermohonanKeberanatan() { export default function PermohonanKeberanatan() {
return ( return (
<FormObjectionRequest /> <div></div>
) // <FormObjectionRequest />
);
} }

View File

@ -1,8 +1,9 @@
import FormApplication from '@/components/form/form-permohonan-informasi' import FormApplication from "@/components/form/form-permohonan-informasi";
import React from 'react' import React from "react";
export default function RegistrasiPage() { export default function RegistrasiPage() {
return ( return (
<FormApplication /> <div></div>
) // <FormApplication />
);
} }

View File

@ -1,8 +1,6 @@
import StatiticAndRecap from '@/components/detail/StatistikRekapitulas' import StatiticAndRecap from "@/components/main/detail/statistic-recap";
import React from 'react' import React from "react";
export default function StatisticPage() { export default function StatisticPage() {
return ( return <StatiticAndRecap />;
<StatiticAndRecap />
)
} }

View File

@ -1,16 +1,14 @@
'use client' "use client";
import FooterPPID from '@/components/Portal PPID/FooterPPID';
import PPIDbody from '@/components/Portal PPID/PpidMain';
import PPIDBanner from '@/components/Portal PPID/ppid-banner';
import NavbarPPID from '@/components/navbar/NavbarPPID';
import { usePathname } from 'next/navigation';
import React from 'react';
import NavbarPPID from "@/components/layout/navbar/NavbarPPID";
import FooterPPID from "@/components/layout/portal-ppid/FooterPPID";
import PPIDBanner from "@/components/layout/portal-ppid/ppid-banner";
import PPIDbody from "@/components/layout/portal-ppid/PpidMain";
import { usePathname } from "next/navigation";
import React from "react";
export default function PortalPPID(url: any) { export default function PortalPPID(url: any) {
const pathname = usePathname(); const pathname = usePathname();
console.log(pathname)
return ( return (
<> <>
@ -19,5 +17,5 @@ export default function PortalPPID(url: any) {
<PPIDbody /> <PPIDbody />
<FooterPPID /> <FooterPPID />
</> </>
) );
} }

View File

@ -1,7 +1,5 @@
import InformasiBerkala from '@/components/table/informasi-berkala' import InformasiBerkala from "@/components/table/informasi-berkala-table";
export default function InformasiSMPage() { export default function InformasiSMPage() {
return ( return <InformasiBerkala />;
<InformasiBerkala />
)
} }

View File

@ -1,19 +1,12 @@
'use client' "use client";
import { SatkerLayout } from '@/components/layout/SatKerLayout'; import { SatkerLayout } from "@/components/layout/satker-layout";
import { usePathname } from 'next/navigation'; import { usePathname } from "next/navigation";
import React from 'react'; import React from "react";
export default function DinamicSatkerLayout({ export default function DinamicSatkerLayout({
children, children,
}: { }: {
children: React.ReactNode children: React.ReactNode;
}) { }) {
// const pathname = usePathname(); return <SatkerLayout>{children}</SatkerLayout>;
// console.log(pathname)
return (
<SatkerLayout>
{children}
</SatkerLayout>
)
} }

View File

@ -1,19 +1,14 @@
'use client' "use client";
import { SatkerLayout } from '@/components/layout/SatKerLayout'; import { SatkerLayout } from "@/components/layout/satker-layout";
import { usePathname } from 'next/navigation'; import { usePathname } from "next/navigation";
import React from 'react'; import React from "react";
export default function LayananInformasiLayout({ export default function LayananInformasiLayout({
children, children,
}: { }: {
children: React.ReactNode children: React.ReactNode;
}) { }) {
const pathname = usePathname(); const pathname = usePathname();
console.log(pathname)
return ( return <SatkerLayout>{children}</SatkerLayout>;
<SatkerLayout>
{children}
</SatkerLayout>
)
} }

View File

@ -1,8 +1,6 @@
import StatiticAndRecap from '@/components/detail/StatistikRekapitulas' import StatiticAndRecap from "@/components/main/detail/statistic-recap";
import React from 'react' import React from "react";
export default function StatisticPage() { export default function StatisticPage() {
return ( return <StatiticAndRecap />;
<StatiticAndRecap />
)
} }

View File

@ -1,24 +1,27 @@
'use client' "use client";
import PPIDSatkerMain from '@/components/Portal PPID/PPIDMainSatker';
import PPIDBanner from '@/components/Portal PPID/ppid-banner'; import FooterSatker from "@/components/layout/navbar/FooterSatker";
import FooterSatker from '@/components/navbar/FooterSatker'; import NavbarSatker from "@/components/layout/navbar/NavbarSatker";
import NavbarSatker from '@/components/navbar/NavbarSatker'; import PPIDBanner from "@/components/layout/portal-ppid/ppid-banner";
import { usePathname } from 'next/navigation'; import PPIDSatkerMain from "@/components/layout/portal-ppid/PPIDMainSatker";
import React from 'react' import { usePathname } from "next/navigation";
import React from "react";
export default function PoldaPage() { export default function PoldaPage() {
const pathname = usePathname(); const pathname = usePathname();
const url: string = pathname.split('polda/')[1].replace(/-/g, ' ').toUpperCase(); const url: string = pathname
.split("polda/")[1]
.replace(/-/g, " ")
.toUpperCase();
return ( return (
<div className='text-black'> <div className="text-black">
<div className='text-black'> <div className="text-black">
<NavbarSatker /> <NavbarSatker />
<PPIDBanner url={url} /> <PPIDBanner url={url} />
<PPIDSatkerMain /> <PPIDSatkerMain />
<FooterSatker /> <FooterSatker />
</div> </div>
</div> </div>
) );
} }

View File

@ -1,19 +1,12 @@
'use client' "use client";
import { SatkerLayout } from '@/components/layout/SatKerLayout'; import { SatkerLayout } from "@/components/layout/satker-layout";
import { usePathname } from 'next/navigation'; import { usePathname } from "next/navigation";
import React from 'react'; import React from "react";
export default function DinamicSatkerLayout({ export default function DinamicSatkerLayout({
children, children,
}: { }: {
children: React.ReactNode children: React.ReactNode;
}) { }) {
// const pathname = usePathname(); return <SatkerLayout>{children}</SatkerLayout>;
// console.log(pathname)
return (
<SatkerLayout>
{children}
</SatkerLayout>
)
} }

View File

@ -1,8 +1,6 @@
import About from '@/components/detail/About' import About from "@/components/main/detail/about";
import React from 'react' import React from "react";
export default function PPIDProfile() { export default function PPIDProfile() {
return ( return <About />;
<About />
)
} }

View File

@ -1,8 +1,6 @@
import HistoryPPID from '@/components/page/HistoryPPID' import HistoryPPID from "@/components/page/history-ppid";
import React from 'react' import React from "react";
export default function PPIDProfilePage() { export default function PPIDProfilePage() {
return ( return <HistoryPPID />;
<HistoryPPID />
)
} }

View File

@ -1,7 +1,5 @@
import StrukturOrganisasi from "@/components/detail/StrukturOrganisasi"; import StrukturOrganisasi from "@/components/main/detail/structure";
export default function StructurePPID() { export default function StructurePPID() {
return ( return <StrukturOrganisasi />;
<StrukturOrganisasi />
)
} }

View File

@ -1,9 +1,5 @@
import Task from "@/components/detail/TaskDetail"; import Task from "@/components/main/detail/task-detail";
export default function PPIDTask() { export default function PPIDTask() {
return ( return <Task />;
<Task />
)
} }

View File

@ -1,8 +1,6 @@
import VisiMisi from '@/components/detail/VisiMisi' import VisiMisi from "@/components/main/detail/visi-misi";
import React from 'react' import React from "react";
export default function VMPPID() { export default function VMPPID() {
return ( return <VisiMisi />;
<VisiMisi />
)
} }

View File

@ -1,19 +1,14 @@
'use client' "use client";
import { SatkerLayout } from '@/components/layout/SatKerLayout'; import { SatkerLayout } from "@/components/layout/satker-layout";
import { usePathname } from 'next/navigation'; import { usePathname } from "next/navigation";
import React from 'react'; import React from "react";
export default function RegulasiLayout({ export default function RegulasiLayout({
children, children,
}: { }: {
children: React.ReactNode children: React.ReactNode;
}) { }) {
const pathname = usePathname(); const pathname = usePathname();
console.log(pathname)
return ( return <SatkerLayout>{children}</SatkerLayout>;
<SatkerLayout>
{children}
</SatkerLayout>
)
} }

View File

@ -1,15 +1,15 @@
import PPIDSidebar from '@/components/Portal PPID/PPIDSidebar' import PPIDSidebar from "@/components/layout/portal-ppid/PPIDSidebar";
import RegulationTable from '@/components/table/tabel-regulasi' import RegulationTable from "@/components/table/tabel-regulasi";
export default function RegulasiPage() { export default function RegulasiPage() {
return ( return (
<div className='md:flex'> <div className="md:flex">
<div className='w-auto bg-[#E2E2E2] md:w-2/3 lg:w-[75%] px-2 md:px-0 lg:px-5'> <div className="w-auto bg-[#E2E2E2] md:w-2/3 lg:w-[75%] px-2 md:px-0 lg:px-5">
<RegulationTable /> <RegulationTable />
</div> </div>
<div className='w-auto md:w-1/3 lg:w-[25%]'> <div className="w-auto md:w-1/3 lg:w-[25%]">
<PPIDSidebar /> <PPIDSidebar />
</div> </div>
</div> </div>
) );
} }

View File

@ -1,8 +1,6 @@
import ServiceFlow from '@/components/detail/ServiceFlow' import ServiceFlow from "@/components/main/detail/service-flow";
import React from 'react' import React from "react";
export default function ServiceFlowPage() { export default function ServiceFlowPage() {
return ( return <ServiceFlow />;
<ServiceFlow />
)
} }

View File

@ -1,20 +1,15 @@
'use client' "use client";
import { PPIDLayout } from '@/components/layout/PPIDLayout'; import { PPIDLayout } from "@/components/layout/ppid-layout";
import { SatkerLayout } from '@/components/layout/SatKerLayout'; import { SatkerLayout } from "@/components/layout/satker-layout";
import { usePathname } from 'next/navigation'; import { usePathname } from "next/navigation";
import React, { Children } from 'react' import React, { Children } from "react";
export default function StandarLayananLayout({ export default function StandarLayananLayout({
children, children,
}: { }: {
children: React.ReactNode children: React.ReactNode;
}) { }) {
const pathname = usePathname(); const pathname = usePathname();
console.log(pathname)
return ( return <SatkerLayout>{children}</SatkerLayout>;
<SatkerLayout>
{children}
</SatkerLayout>
)
} }

View File

@ -1,8 +1,6 @@
import ServiceAnnouncement from '@/components/detail/ServiceAnnouncement' import ServiceAnnouncement from "@/components/main/detail/service-announcement";
import React from 'react' import React from "react";
export default function ServiceAnnouncePage() { export default function ServiceAnnouncePage() {
return ( return <ServiceAnnouncement />;
<ServiceAnnouncement />
)
} }

View File

@ -1,8 +1,6 @@
import ObjectionMecanism from '@/components/detail/ObjectionMecanism' import ObjectionMecanism from "@/components/main/detail/objection-mecanism";
import React from 'react' import React from "react";
export default function ObjectionMecanismPage() { export default function ObjectionMecanismPage() {
return ( return <ObjectionMecanism />;
<ObjectionMecanism />
)
} }

View File

@ -1,8 +1,6 @@
import RequestDispute from '@/components/detail/RequestDispute' import RequestDispute from "@/components/main/detail/reqeust-dispute";
import React from 'react' import React from "react";
export default function RequestDisputePage() { export default function RequestDisputePage() {
return ( return <RequestDispute />;
<RequestDispute />
)
} }

View File

@ -1,8 +1,6 @@
import ServiceFee from '@/components/detail/ServiceFee' import ServiceFee from "@/components/main/detail/service-fee";
import React from 'react' import React from "react";
export default function ServiceFeePage() { export default function ServiceFeePage() {
return ( return <ServiceFee />;
<ServiceFee />
)
} }

View File

@ -1,8 +1,6 @@
import RequestInformation from '@/components/detail/RequestInformation' import RequestInformation from "@/components/main/detail/request-information";
import React from 'react' import React from "react";
export default function RequestInformationPage() { export default function RequestInformationPage() {
return ( return <RequestInformation />;
<RequestInformation />
)
} }

View File

@ -1,8 +1,6 @@
import ServiceTime from '@/components/detail/ServiceTime' import ServiceTime from "@/components/main/detail/serive-time";
import React from 'react' import React from "react";
export default function ServiceTimePage() { export default function ServiceTimePage() {
return ( return <ServiceTime />;
<ServiceTime />
)
} }

View File

@ -1,19 +1,14 @@
'use client' "use client";
import { PPIDLayout } from '@/components/layout/PPIDLayout'; import { PPIDLayout } from "@/components/layout/ppid-layout";
import { usePathname } from 'next/navigation'; import { usePathname } from "next/navigation";
import React, { Children } from 'react' import React, { Children } from "react";
export default function PPIDProfileLayout({ export default function PPIDProfileLayout({
children, children,
}: { }: {
children: React.ReactNode children: React.ReactNode;
}) { }) {
const pathname = usePathname(); const pathname = usePathname();
console.log(pathname)
return ( return <PPIDLayout>{children}</PPIDLayout>;
<PPIDLayout>
{children}
</PPIDLayout>
)
} }

View File

@ -1,8 +1,6 @@
import About from '@/components/detail/About' import About from "@/components/main/detail/about";
import React from 'react' import React from "react";
export default function PPIDProfile() { export default function PPIDProfile() {
return ( return <About />;
<About />
)
} }

View File

@ -1,8 +1,6 @@
import HistoryPPID from '@/components/page/HistoryPPID' import HistoryPPID from "@/components/page/history-ppid";
import React from 'react' import React from "react";
export default function PPIDProfilePage() { export default function PPIDProfilePage() {
return ( return <HistoryPPID />;
<HistoryPPID />
)
} }

View File

@ -1,7 +1,5 @@
import StrukturOrganisasi from "@/components/detail/StrukturOrganisasi"; import StrukturOrganisasi from "@/components/main/detail/structure";
export default function StructurePPID() { export default function StructurePPID() {
return ( return <StrukturOrganisasi />;
<StrukturOrganisasi />
)
} }

Some files were not shown because too many files have changed in this diff Show More