From e402d43ea50696b7334f6f275aed61dc2eed2cd3 Mon Sep 17 00:00:00 2001 From: leedj312 Date: Fri, 23 May 2025 09:16:19 +0900 Subject: [PATCH 1/7] =?UTF-8?q?=EA=B0=9C=EB=B0=9C=EC=84=9C=EB=B2=84=20?= =?UTF-8?q?=EB=B9=8C=EB=93=9C=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pnpm-lock.yaml | 212 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 211 insertions(+), 1 deletion(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c89e4431c..940c50beb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -308,6 +308,15 @@ importers: next: specifier: 15.1.7 version: 15.1.7(react-dom@18.3.1)(react@18.3.1) + ol: + specifier: ^7.3.0 + version: 7.5.2 + ol-ext: + specifier: ^4.0.11 + version: 4.0.31(ol@7.5.2) + proj4: + specifier: ^2.9.0 + version: 2.17.0 react-chartjs-2: specifier: ^5.3.0 version: 5.3.0(chart.js@4.4.8)(react@18.3.1) @@ -366,6 +375,9 @@ importers: apps/wr: dependencies: + '@common/assets': + specifier: workspace:* + version: link:../../packages/common/assets '@common/business_components': specifier: workspace:* version: link:../../packages/common/business_components @@ -375,6 +387,9 @@ importers: '@hookform/resolvers': specifier: ^4.1.3 version: 4.1.3(react-hook-form@7.54.2) + '@tanstack/react-table': + specifier: ^8.21.2 + version: 8.21.2(react-dom@18.3.1)(react@18.3.1) class-variance-authority: specifier: ^0.7.1 version: 0.7.1 @@ -399,6 +414,9 @@ importers: tailwindcss-animate: specifier: ^1.0.7 version: 1.0.7(tailwindcss@3.4.17) + tus-js-client: + specifier: ^4.3.1 + version: 4.3.1 zod: specifier: ^3.24.2 version: 3.24.2 @@ -457,6 +475,9 @@ importers: '@radix-ui/react-slot': specifier: ^1.1.2 version: 1.1.2(@types/react@18.3.18)(react@18.3.1) + axios: + specifier: 1.8.1 + version: 1.8.1 class-variance-authority: specifier: ^0.7.1 version: 0.7.1 @@ -2319,6 +2340,33 @@ packages: resolution: {integrity: sha512-M5UknZPHRu3DEDWoipU6sE8PdkZ6Z/S+v4dD+Ke8IaNlpdSQah50lz1KtcFBa2vsdOnwbbnxJwVM4wty6udA5w==} dev: false + /@mapbox/jsonlint-lines-primitives@2.0.2: + resolution: {integrity: sha512-rY0o9A5ECsTQRVhv7tL/OyDpGAoUB4tTvLiW1DSzQGq4bvTPhNw1VpSNjDJc5GFZ2XuyOtSWSVN05qOtcD71qQ==} + engines: {node: '>= 0.6'} + dev: false + + /@mapbox/mapbox-gl-style-spec@13.28.0: + resolution: {integrity: sha512-B8xM7Fp1nh5kejfIl4SWeY0gtIeewbuRencqO3cJDrCHZpaPg7uY+V8abuR+esMeuOjRl5cLhVTP40v+1ywxbg==} + hasBin: true + dependencies: + '@mapbox/jsonlint-lines-primitives': 2.0.2 + '@mapbox/point-geometry': 0.1.0 + '@mapbox/unitbezier': 0.0.0 + csscolorparser: 1.0.3 + json-stringify-pretty-compact: 2.0.0 + minimist: 1.2.8 + rw: 1.3.3 + sort-object: 0.3.2 + dev: false + + /@mapbox/point-geometry@0.1.0: + resolution: {integrity: sha512-6j56HdLTwWGO0fJPlrZtdU/B13q8Uwmo18Ck2GnGgN9PCFyKTZ3UbXeEdRFh18i9XQ92eH2VdtpJHpBD3aripQ==} + dev: false + + /@mapbox/unitbezier@0.0.0: + resolution: {integrity: sha512-HPnRdYO0WjFjRTSwO3frz1wKaU649OBFPX3Zo/2WZvuRi6zMiRGui8SnPQiQABgqCf8YikDe5t3HViTVw1WUzA==} + dev: false + /@mdx-js/react@3.1.0(@types/react@18.3.18)(react@18.3.1): resolution: {integrity: sha512-QjHtSaoameoalGnKDT3FoIl4+9RwyTmo9ZJGBdLOks/YOiWHoRDI3PUwEzOE7kEmGcV3AFcp9K6dYu9rEuKLAQ==} peerDependencies: @@ -2553,6 +2601,10 @@ packages: engines: {node: '>=12.4.0'} dev: true + /@petamoriken/float16@3.9.2: + resolution: {integrity: sha512-VgffxawQde93xKxT3qap3OH+meZf7VaSB5Sqd4Rqc+FP5alWbpOyan/7tRbOAvynjpG3GpdtAuGU/NdhQpmrog==} + dev: false + /@pkgjs/parseargs@0.11.0: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} @@ -5249,6 +5301,10 @@ packages: resolution: {integrity: sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==} dev: true + /csscolorparser@1.0.3: + resolution: {integrity: sha512-umPSgYwZkdFoUrH5hIq5kf0wPSXiro51nPw0j2K/c83KflkPSTBGMz6NJvMB+07VlL0y7VPo6QJcDjcgKTTm3w==} + dev: false + /cssesc@3.0.0: resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} engines: {node: '>=4'} @@ -5600,6 +5656,10 @@ packages: es-errors: 1.3.0 gopd: 1.2.0 + /earcut@2.2.4: + resolution: {integrity: sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==} + dev: false + /eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} @@ -6469,6 +6529,24 @@ packages: engines: {node: '>=6.9.0'} dev: true + /geographiclib-geodesic@2.1.1: + resolution: {integrity: sha512-lkd8EUkPSByobWu9BPMHTdYA5AUZxOa8McmUNtBE9KrvUJEvSADnN6gTDmhXbi6NzdA16LtWLpSxLE/lIIRhyA==} + dev: false + + /geotiff@2.1.3: + resolution: {integrity: sha512-PT6uoF5a1+kbC3tHmZSUsLHBp2QJlHasxxxxPW47QIY1VBKpFB+FcDvX+MxER6UzgLQZ0xDzJ9s48B9JbOCTqA==} + engines: {node: '>=10.19'} + dependencies: + '@petamoriken/float16': 3.9.2 + lerc: 3.0.0 + pako: 2.1.0 + parse-headers: 2.0.6 + quick-lru: 6.1.2 + web-worker: 1.5.0 + xml-utils: 1.10.2 + zstddec: 0.1.0 + dev: false + /get-amd-module-type@6.0.1: resolution: {integrity: sha512-MtjsmYiCXcYDDrGqtNbeIYdAl85n+5mSv2r3FbzER/YV3ZILw4HNNIw34HuV5pyl0jzs6GFYU1VHVEefhgcNHQ==} engines: {node: '>=18'} @@ -6662,6 +6740,10 @@ packages: react-is: 16.13.1 dev: false + /ieee754@1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + dev: false + /ignore@5.3.2: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} @@ -7055,6 +7137,10 @@ packages: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} dev: true + /json-stringify-pretty-compact@2.0.0: + resolution: {integrity: sha512-WRitRfs6BGq4q8gTgOy4ek7iPFXjbra0H3PmDLKm2xnZ+Gh1HUhiKGgCZkSPNULlP7mvfu6FV/mOLhCarspADQ==} + dev: false + /json5@1.0.2: resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} hasBin: true @@ -7104,6 +7190,10 @@ packages: language-subtag-registry: 0.3.23 dev: true + /lerc@3.0.0: + resolution: {integrity: sha512-Rm4J/WaHhRa93nCN2mwWDZFoRVF18G1f47C+kvQWyHGEZxFpTUi73p7lMVSAndyxGt6lJ2/CFbOcf9ra5p8aww==} + dev: false + /levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} @@ -7269,6 +7359,10 @@ packages: resolution: {integrity: sha512-0aF7ZmVon1igznGI4VS30yugpduQW3y3GkcgGJOp7d8x8QrizhigUxjI/m2UojsXXto+jLAH3KSz+xOJTiORjg==} dev: true + /mapbox-to-css-font@2.4.5: + resolution: {integrity: sha512-VJ6nB8emkO9VODI0Fk+TQ/0zKBTqmf/Pkt8Xv0kHstoc0iXRajA00DAid4Kc3K5xeFIOoiZrVxijEzj0GLVO2w==} + dev: false + /math-intrinsics@1.1.0: resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} engines: {node: '>= 0.4'} @@ -7287,6 +7381,10 @@ packages: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} + /mgrs@1.0.0: + resolution: {integrity: sha512-awNbTOqCxK1DBGjalK3xqWIstBZgN6fxsMSiXLs9/spqWkF2pAhb2rrYCFSsr1/tT7PhcDGjZndG8SWYn0byYA==} + dev: false + /micromatch@4.0.8: resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} engines: {node: '>=8.6'} @@ -7323,7 +7421,6 @@ packages: /minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} - dev: true /minipass@7.1.2: resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} @@ -7550,6 +7647,32 @@ packages: es-object-atoms: 1.1.1 dev: true + /ol-ext@4.0.31(ol@7.5.2): + resolution: {integrity: sha512-byh26JcXZggkLUY79+c29cxf2ovkkwz5niWJzOIN+dLPDJ+ogSn0y4Wl8fIS9O2JtQff5/cInHRImgZBvl+N1g==} + peerDependencies: + ol: '>= 5.3.0' + dependencies: + ol: 7.5.2 + dev: false + + /ol-mapbox-style@10.7.0: + resolution: {integrity: sha512-S/UdYBuOjrotcR95Iq9AejGYbifKeZE85D9VtH11ryJLQPTZXZSW1J5bIXcr4AlAH6tyjPPHTK34AdkwB32Myw==} + dependencies: + '@mapbox/mapbox-gl-style-spec': 13.28.0 + mapbox-to-css-font: 2.4.5 + ol: 7.5.2 + dev: false + + /ol@7.5.2: + resolution: {integrity: sha512-HJbb3CxXrksM6ct367LsP3N+uh+iBBMdP3DeGGipdV9YAYTP0vTJzqGnoqQ6C2IW4qf8krw9yuyQbc9fjOIaOQ==} + dependencies: + earcut: 2.2.4 + geotiff: 2.1.3 + ol-mapbox-style: 10.7.0 + pbf: 3.2.1 + rbush: 3.0.1 + dev: false + /open@8.4.2: resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==} engines: {node: '>=12'} @@ -7601,6 +7724,10 @@ packages: resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} dev: false + /pako@2.1.0: + resolution: {integrity: sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==} + dev: false + /parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} @@ -7608,6 +7735,10 @@ packages: callsites: 3.1.0 dev: true + /parse-headers@2.0.6: + resolution: {integrity: sha512-Tz11t3uKztEW5FEVZnj1ox8GKblWn+PvHY9TmJV5Mll2uHEwRdR/5Li1OlXoECjLYkApdhWy44ocONwXLiKO5A==} + dev: false + /parse-json@5.2.0: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} @@ -7662,6 +7793,14 @@ packages: effector: 23.3.0 dev: true + /pbf@3.2.1: + resolution: {integrity: sha512-ClrV7pNOn7rtmoQVF4TS1vyU0WhYRnP92fzbfF75jAIwpnzdJXf8iTd4CMEqO4yUenH6NDqLiwjqlh6QgZzgLQ==} + hasBin: true + dependencies: + ieee754: 1.2.1 + resolve-protobuf-schema: 2.1.0 + dev: false + /picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -7920,6 +8059,14 @@ packages: resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} engines: {node: '>= 0.6.0'} + /proj4@2.17.0: + resolution: {integrity: sha512-BqVoruVAOUgkw5U9Ns76+E2nHZG0Y42tbkC+0BpyqjhwPIai29hoivyQoyelEKFSfaV3zkR3NqPRD0EwPM4Wug==} + dependencies: + geographiclib-geodesic: 2.1.1 + mgrs: 1.0.0 + wkt-parser: 1.5.2 + dev: false + /prop-types@15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} dependencies: @@ -7935,6 +8082,10 @@ packages: signal-exit: 3.0.7 dev: false + /protocol-buffers-schema@3.6.0: + resolution: {integrity: sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw==} + dev: false + /proxy-from-env@1.1.0: resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} dev: false @@ -7951,6 +8102,15 @@ packages: /queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + /quick-lru@6.1.2: + resolution: {integrity: sha512-AAFUA5O1d83pIHEhJwWCq/RQcRukCkn/NSm2QsTEMle5f2hP0ChI2+3Xb051PZCkLryI/Ir1MVKviT2FIloaTQ==} + engines: {node: '>=12'} + dev: false + + /quickselect@2.0.0: + resolution: {integrity: sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw==} + dev: false + /quote-unquote@1.0.0: resolution: {integrity: sha512-twwRO/ilhlG/FIgYeKGFqyHhoEhqgnKVkcmqMKi2r524gz3ZbDTcyFt38E9xjJI2vT+KbRNHVbnJ/e0I25Azwg==} dev: true @@ -7961,6 +8121,12 @@ packages: safe-buffer: 5.2.1 dev: true + /rbush@3.0.1: + resolution: {integrity: sha512-XRaVO0YecOpEuIvbhbpTrZgoiI6xBlz6hnlr6EHhd+0x9ase6EmeN+hdwwUaJvLcsFFQ8iWVF1GAK1yB0BWi0w==} + dependencies: + quickselect: 2.0.0 + dev: false + /react-chartjs-2@5.3.0(chart.js@4.4.8)(react@18.3.1): resolution: {integrity: sha512-UfZZFnDsERI3c3CZGxzvNJd02SHjaSJ8kgW1djn65H1KK8rehwTjyrRKOG3VTMG8wtHZ5rgAO5oTHtHi9GCCmw==} peerDependencies: @@ -8361,6 +8527,12 @@ packages: resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} dev: true + /resolve-protobuf-schema@2.1.0: + resolution: {integrity: sha512-kI5ffTiZWmJaS/huM8wZfEMer1eRd7oJQhDuxeCLe3t7N7mX3z94CN0xPxBQxFYQTSNz9T0i+v6inKqSdK8xrQ==} + dependencies: + protocol-buffers-schema: 3.6.0 + dev: false + /resolve@1.22.10: resolution: {integrity: sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==} engines: {node: '>= 0.4'} @@ -8422,6 +8594,10 @@ packages: dependencies: queue-microtask: 1.2.3 + /rw@1.3.3: + resolution: {integrity: sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==} + dev: false + /safe-array-concat@1.1.3: resolution: {integrity: sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==} engines: {node: '>=0.4'} @@ -8676,6 +8852,24 @@ packages: react-dom: 18.3.1(react@18.3.1) dev: false + /sort-asc@0.1.0: + resolution: {integrity: sha512-jBgdDd+rQ+HkZF2/OHCmace5dvpos/aWQpcxuyRs9QUbPRnkEJmYVo81PIGpjIdpOcsnJ4rGjStfDHsbn+UVyw==} + engines: {node: '>=0.10.0'} + dev: false + + /sort-desc@0.1.1: + resolution: {integrity: sha512-jfZacW5SKOP97BF5rX5kQfJmRVZP5/adDUTY8fCSPvNcXDVpUEe2pr/iKGlcyZzchRJZrswnp68fgk3qBXgkJw==} + engines: {node: '>=0.10.0'} + dev: false + + /sort-object@0.3.2: + resolution: {integrity: sha512-aAQiEdqFTTdsvUFxXm3umdo04J7MRljoVGbBlkH7BgNsMvVNAJyGj7C/wV1A8wHWAJj/YikeZbfuCKqhggNWGA==} + engines: {node: '>=0.10.0'} + dependencies: + sort-asc: 0.1.0 + sort-desc: 0.1.1 + dev: false + /source-map-js@1.2.1: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} @@ -9616,6 +9810,10 @@ packages: graceful-fs: 4.2.11 dev: true + /web-worker@1.5.0: + resolution: {integrity: sha512-RiMReJrTAiA+mBjGONMnjVDP2u3p9R1vkcGz6gDIrOMT3oGuYwX2WRMYI9ipkphSuE5XKEhydbhNEJh4NY9mlw==} + dev: false + /webidl-conversions@4.0.2: resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==} dev: true @@ -9735,6 +9933,10 @@ packages: dependencies: isexe: 2.0.0 + /wkt-parser@1.5.2: + resolution: {integrity: sha512-1ZUiV1FTwSiSrgWzV9KXJuOF2BVW91KY/mau04BhnmgOdroRQea7Q0s5TVqwGLm0D2tZwObd/tBYXW49sSxp3Q==} + dev: false + /wmf@1.0.2: resolution: {integrity: sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw==} engines: {node: '>=0.8'} @@ -9802,6 +10004,10 @@ packages: word: 0.3.0 dev: false + /xml-utils@1.10.2: + resolution: {integrity: sha512-RqM+2o1RYs6T8+3DzDSoTRAUfrvaejbVHcp3+thnAtDKo8LskR+HomLajEy5UjTz24rpka7AxVBRR3g2wTUkJA==} + dev: false + /y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} @@ -9851,6 +10057,10 @@ packages: /zod@3.24.2: resolution: {integrity: sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==} + /zstddec@0.1.0: + resolution: {integrity: sha512-w2NTI8+3l3eeltKAdK8QpiLo/flRAr2p8AGeakfMZOXBxOg9HIu4LVDxBi81sYgVhFhdJjv1OrB5ssI8uFPoLg==} + dev: false + /zustand@5.0.3(@types/react@18.3.18)(react@18.3.1): resolution: {integrity: sha512-14fwWQtU3pH4dE0dOpdMiWjddcH+QzKIgk1cl8epwSE7yag43k/AD/m4L6+K7DytAOr9gGBe3/EXj9g7cdostg==} engines: {node: '>=12.20.0'} From efae3210e489549d6452ef09fc38f9d332742d9f Mon Sep 17 00:00:00 2001 From: leedj312 Date: Wed, 18 Jun 2025 09:45:11 +0900 Subject: [PATCH 2/7] =?UTF-8?q?=EC=88=98=EC=9A=94=EB=A7=A4=EC=B9=AD=20?= =?UTF-8?q?=EA=B2=80=ED=86=A0=20put=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EC=99=84=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wr/app/matMng/coMat/coMatRvw/page.tsx | 1423 +++++++++-------- .../wr/app/store/matDmd/coMatRvw/headList.tsx | 12 + apps/wr/app/store/matDmd/coMatRvw/index.tsx | 74 +- apps/wr/app/store/matDmd/coMatRvw/type.tsx | 128 +- apps/wr/components/lib/func/commom.tsx | 26 +- .../bizTotalMoneyPop/bizTotalMoneyPop.tsx | 28 + .../ui/popover/usagePorcPop/usageProcPop.tsx | 30 + 7 files changed, 958 insertions(+), 763 deletions(-) create mode 100644 apps/wr/components/ui/popover/bizTotalMoneyPop/bizTotalMoneyPop.tsx create mode 100644 apps/wr/components/ui/popover/usagePorcPop/usageProcPop.tsx diff --git a/apps/wr/app/matMng/coMat/coMatRvw/page.tsx b/apps/wr/app/matMng/coMat/coMatRvw/page.tsx index d661e60d6..5f4a3943b 100644 --- a/apps/wr/app/matMng/coMat/coMatRvw/page.tsx +++ b/apps/wr/app/matMng/coMat/coMatRvw/page.tsx @@ -1,9 +1,19 @@ "use client"; import { useWrStore } from "@/app/store"; -import {DmdCoReqSchema, type DmdCoReqType, type DmdMatTableType} from "@/app/store/matDmd/coMatRvw/type"; +import { + DmdCoReqSchema, + type DedMatUpdateType, + type DmdCoReqType, + type DmdMatTableType, +} from "@/app/store/matDmd/coMatRvw/type"; import { formH1Class, formTableName } from "@/components/lib/class/comClass"; -import { getCity, tableData, yearOptions } from "@/components/lib/func/commom"; +import { + getCity, + getdmdMatFlag, + tableData, + yearOptions, +} from "@/components/lib/func/commom"; import { CmpttnModal } from "@/components/ui/modal/coMat/cmpttnModal"; import { CoMatModal } from "@/components/ui/modal/coMat/coMatModal"; import type { objSearchType } from "@/components/ui/modal/fcltReg/bdstRegModal/bdstRegModal"; @@ -24,24 +34,23 @@ import { type SelectDataType, } from "@common/business_components/ui"; import ListDiv from "@common/business_components/ui/list_div"; -import { Button, DatePicker, Input, Label } from "@common/components/ui"; -import { - Tooltip, - TooltipContent, - TooltipProvider, - TooltipTrigger, -} from "@common/components/ui/tooltip"; -import { zodResolver } from "@hookform/resolvers/zod"; +import { Button, Input, Label } from "@common/components/ui"; import { useEffect, useRef, useState } from "react"; -import { useFieldArray, useForm } from "react-hook-form"; +import { useForm } from "react-hook-form"; import toast, { Toaster } from "react-hot-toast"; import { z } from "zod"; import moment from "moment"; +import { usageProcData } from "@/app/store/matDmd/coMatRvw/headList"; +import UsageProcData from "@/components/ui/popover/usagePorcPop/usageProcPop"; +import BizTotalMoneyPop from "@/components/ui/popover/bizTotalMoneyPop/BizTotalMoneyPop"; +import { TEST_UUID } from "@/app/store/ruseFcltMng/fcltReg/rainReg"; +import { zodResolver } from "@hookform/resolvers/zod"; + export default function CoMatRvw() { - const { code, coRvw ,coMatRvwInit} = useWrStore((state) => state); -const {coMatRvwRes} = coRvw - + const { code, coRvw, coMatRvwInit ,coMatRvwUpdate} = useWrStore((state) => state); + const { coMatRvwRes } = coRvw; + //init, sub, match const initRef = useRef(false); const { coRvwHeadList } = coRvw; const [dmdMatData, setDmdMtaData] = useState([]); @@ -65,34 +74,70 @@ const {coMatRvwRes} = coRvw const [toDate, setToDate] = useState( String(new Date().getFullYear()) ); - const [selectData, setSelectData] = useState({} as DmdCoReqType) + const [selectData, setSelectData] = useState( + {} as DmdCoReqType + ); const form = useForm>({ resolver: zodResolver(DmdCoReqSchema), - }) + }); - const TableCellClick = (index:number) =>{ - console.log(coMatRvwRes ) - if(coMatRvwRes && coMatRvwRes[index]){ + const TableCellClick = (index: number) => { + console.log(coMatRvwRes); + if (coMatRvwRes && coMatRvwRes[index]) { + console.log(dmdMatData[index]); - console.log(dmdMatData[index]) - - - setSelectData(coMatRvwRes[index] ) + setSelectData(coMatRvwRes[index]); } + }; + const onSubmit = () => { + const data:DedMatUpdateType = { + dmdInfoSn: form.getValues("dmdInfoSn"), + usgPrcsProcs: form.getValues("demandCst.usgPrcsProcs"), + cstrnCst:form.getValues("demandCst.cstrnCst"), + fcltSbsdEpsTrf:form.getValues("demandCst.fcltSbsdEpsTrf"), + prcsFcltCpctCstrnCst:form.getValues("demandCst.prcsFcltCpctCstrnCst"), + rgtr:TEST_UUID + + }; - } - useEffect(()=>{ - if(coMatRvwRes){ - const data =coMatRvwRes.map((item)=>{ - return ({ - ...item, - regDt: moment(item.regDt).format('YYYY-MM-DD') , - state:'' - })}) - setDmdMtaData(tableData(data,{code}) ) + + coMatRvwUpdate( '11000SW001R1', form.getValues('dmdInfoFk'), data ) + }; + + useEffect(() => { + if (form?.getValues("useUsgCd")) { + form.setValue( + "demandCst.usgPrcsProcs", + usageProcData?.find( + (item) => item.usage === (form?.getValues("useUsgCd") as string) + )?.process ?? "" + ); } - },[coMatRvwRes]) + }, [form.watch("useUsgCd")]); + + useEffect(() => { + + + console.log('coMatRvwRes ', coMatRvwRes) + if (coMatRvwRes) { + const data = coMatRvwRes?.map((item, index) => { + console.log(" item ", item); + return { + ...item, + ctpvCd: item.demandCo.ctpvCd, + sggCd: item.demandCo.sggCd, + dmdCoNm: item.demandCo.dmdCoNm, + daddr: item.demandCo.daddr, + telno: item.demandCo.telno, + splyFcltFlg: getdmdMatFlag(item.demandMatching?.splyFcltFlg), + regDt: moment(item?.demandCo?.regDt).format("YYYY-MM-DD"), + state: "", + }; + }); + setDmdMtaData(tableData(data, { code })); + } + }, [coMatRvwRes]); const getSelCity = (val: string | number) => { const cityValue = String(val); // Ensure val is treated as a string @@ -105,23 +150,19 @@ const {coMatRvwRes} = coRvw setObjSearch({ ...objSearch, sgg: String(val) }); }; - -useEffect(() =>{ - if(!initRef.current){ - coMatRvwInit(1,13,'11',fromDate,toDate) - initRef.current = true; + useEffect(() => { + if (!initRef.current) { + coMatRvwInit(1, 13, fromDate, toDate, "47"); + initRef.current = true; } + }, [coMatRvwInit, initRef, fromDate, toDate]); -},[coMatRvwInit,initRef,fromDate,toDate]) - - -useEffect(() =>{ - if(selectData){ - console.log(selectData) - form.reset(selectData) - } - -},[selectData,form ] ) + useEffect(() => { + if (selectData) { + console.log(selectData); + form.reset(selectData); + } + }, [selectData, form]); return ( <> @@ -215,627 +256,536 @@ useEffect(() =>{ { - if(index !==undefined&& index>=0){ - - TableCellClick(index) + cellClick={(index: number | undefined, headId: string) => { + if (index !== undefined && index >= 0) { + TableCellClick(index); } - } } + }} onPageChange={() => {}} >
- -

- 수요신청 상세현황 -

-
-
-
- ( - - { - field.onChange(Number(e.target.value)); - }} - value={ moment(field.value).format('YYYY-MM-DD') ?? ""} - readOnly - /> - - )} - /> -
-
- ( - - { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - - )} - /> -
-
- ( - - { - field.onChange(e.target.value); - }} - value={field.value ?? ''} - readOnly - /> - - )} - /> -
-
- ( - - { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - - )} - /> -
-
-

요구수질

-
-
- ( - - { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - - )} - /> -
-
- ( - - { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - - )} - /> -
-
- ( - - { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - - )} - /> -
-
- ( - - { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - - )} - /> -
-
- ( - - { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - - )} - /> -
-
- ( - - { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - - )} - /> -
-
- ( - - { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - - )} - /> -
-
- ( - - { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - - )} - /> -
-
- ( - - { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - - )} - /> -
-
- ( - - { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - - )} - /> -
-
- ( - - { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - - )} - /> -
-
- ( - - { - field.onChange(e.target.value); - }} - value={field.value ?? ""} - /> - - )} - /> -
-
-

공급처 후보지

-
-
- ( - - { - field.onChange(String(e.target.value)); - }} - value={field.value ?? ""} - /> - - )} - /> -
-
- ( - - { - field.onChange(e.target.value); - }} - value={field.value ?? ""} - /> - - )} - /> -
-
- ( - - { - field.onChange(e.target.value); - }} - value={field.value ?? ""} - /> - - )} - /> -
-
-
-
-
+

- 표준공사비 산정 + 수요신청 상세현황

-
-

처리시설 표준공사비 산정

- - - -
-
-
- ( - - { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? ""} - /> - - )} - /> -
-
- ( - - { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - - )} - /> -
-
- - - ( - - { - field.onChange(Number(e.target.value)); - }} - value={field.value || ""} - className="mt-2" - /> - - )} - /> -
-
- ( - - { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - - )} - /> -
-
-
- - -
- ( - - { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - - )} - /> -
-
-
- - -
- ( - - { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - - )} - /> -
- -
- - ( - - { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - - )} - /> -
-
-
- - -
- ( - - { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? ""} - /> - - )} - /> -
- -
-
+ +
+
( - + { + field.onChange(String(e.target.value)); + }} + value={ + moment(field.value).format("YYYY-MM-DD") ?? "" + } + readOnly + /> + + )} + /> +
+
+ ( + + { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + readOnly + /> + + )} + /> +
+
+ ( + + { + field.onChange(e.target.value); + }} + value={field.value ?? ""} + readOnly + /> + + )} + /> +
+
+ ( + + { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + readOnly + /> + + )} + /> +
+
+

요구수질

+
+
+ ( + + { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + readOnly + /> + + )} + /> +
+
+ ( + + { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + readOnly + /> + + )} + /> +
+
+ ( + + { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + readOnly + /> + + )} + /> +
+
+ ( + + { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + readOnly + /> + + )} + /> +
+
+ ( + + { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + readOnly + /> + + )} + /> +
+
+ ( + + { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + readOnly + /> + + )} + /> +
+
+ ( + + { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + readOnly + /> + + )} + /> +
+
+ ( + + { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + readOnly + /> + + )} + /> +
+
+ ( + + { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + readOnly + /> + + )} + /> +
+
+ ( + + { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + readOnly + /> + + )} + /> +
+
+ ( + + { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + readOnly + /> + + )} + /> +
+
+ ( + + { + field.onChange(e.target.value); + }} + value={field.value ?? ""} + readOnly + /> + + )} + /> +
+
+

공급처 후보지

+
+
+ ( + + { + field.onChange(String(e.target.value)); + }} + value={field.value ?? ""} + readOnly + /> + + )} + /> +
+
+ ( + + { + field.onChange(e.target.value); + }} + value={field.value ?? ""} + readOnly + /> + + )} + /> +
+
+ ( + + { + field.onChange(e.target.value); + }} + value={field.value ?? ""} + readOnly + /> + + )} + /> +
+
+ +
+
+

+ 표준공사비 산정 +

+
+

처리시설 표준공사비 산정

+ + + +
+
+

기본사항

+
+
+
+ ( + + { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? ""} + /> + + )} + /> +
+
+ ( + + { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + /> + + )} + /> +
+
+ + + + } + > + ( + + + + )} + /> +
+
+ ( + + { + field.onChange(Number(e.target.value)); + }} + value={Number(field.value) * 365} + /> + + )} + /> +
+
+

공사비 입력사항

+
+
+
+ + +
+ ( + + { field.onChange(Number(e.target.value)); @@ -846,24 +796,88 @@ useEffect(() =>{ )} />
-
- - +
+
+ + +
+ ( + + { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + /> + + )} + />
-
+
+ + + + {}} + value={ + form.getValues("demandCst.prcsFcltCpctCstrnCst") + + form.getValues("demandCst.fcltSbsdEpsTrf") || 0 + } + /> +
+
+
+ + +
( -
+ +
+
+ ( + { onChange={(e) => { field.onChange(Number(e.target.value)); }} - readOnly={true} value={field.value ?? 0} /> - - )} - /> + )} + /> +
+
+ + +
+
+ ( + + )} + /> +
-
- +
- - {}} - onPageChange={() => {}} - /> - - } - bodyClass="w-[25vw] max-w-none h-[60vh]" - open={isPrcsMo.isModal} - onOpenChange={(open) => { - setIsPrcsMo({ isModal: open }); - }} - /> + } bodyClass="w-[40vw] max-w-none h-[70vh]" diff --git a/apps/wr/app/store/matDmd/coMatRvw/headList.tsx b/apps/wr/app/store/matDmd/coMatRvw/headList.tsx index 571deb001..1848a36c5 100644 --- a/apps/wr/app/store/matDmd/coMatRvw/headList.tsx +++ b/apps/wr/app/store/matDmd/coMatRvw/headList.tsx @@ -249,4 +249,16 @@ export const coModalHeadListExport: CommonTableProps[] = [ rowSpan: 1, colSpan: 1, }, +] + +export const usageProcData =[ + { usage: "청소", process: "총인처리시설 + 염소소독" }, + { usage: "화장실용수", process: "총인처리시설 + 염소소독" }, + { usage: "세척", process: "총인처리시설 + UV소독" }, + { usage: "살수", process: "총인처리시설 + UV소독" }, + { usage: "조경", process: "총인처리시설 + UV소독" }, + { usage: "농업", process: "총인처리시설 + UV소독" }, + { usage: "하천", process: "총인처리시설 + UV소독" }, + { usage: "지하수", process: "전처리시설 + RO" }, + { usage: "공업", process: "전처리시설 + RO" }, ] \ No newline at end of file diff --git a/apps/wr/app/store/matDmd/coMatRvw/index.tsx b/apps/wr/app/store/matDmd/coMatRvw/index.tsx index 31d818ba5..9362ead28 100644 --- a/apps/wr/app/store/matDmd/coMatRvw/index.tsx +++ b/apps/wr/app/store/matDmd/coMatRvw/index.tsx @@ -2,8 +2,9 @@ import type { z } from "zod"; import type { sttnHeadListType } from "../coSttn/headList"; import { coRvwHeadListExport, coRvwNodeListExport } from "./headList"; import type { CommonTableProps } from "../../common/type/header"; -import type { DmdCoReqType } from "./type"; -import { fetchType, getFetch } from "@/components/lib/api"; +import type { DedMatUpdateType, DmdCoReqType } from "./type"; +import { fetchType, getFetch, putFectch } from "@/components/lib/api"; +import toast from "react-hot-toast/headless"; const coRvwHeadList = coRvwHeadListExport; const coRvwNodeList = coRvwNodeListExport; @@ -30,35 +31,82 @@ export type coRvwType = coRvwState & coRvwActions; type coRvwActions = { coMatRvwInit: ( - pageCnt: number, pageNo: number, - sggCd: string, + pageCnt: number, startYear: string, - endYear: string - ) => void; + endYear: string, + sggCd: string + ) => void, + coMatRvwUpdate: ( + splyCd: string, + dmdCd: string, + data: DedMatUpdateType + )=>void +}; + +const coMatInit = async ( + pageNo: number, + pageCnt: number, + startYear: string, + endYear: string, + sggCd: string +) => { + const url = `/reuseFc/request/infoList/${pageNo}/${pageCnt}/${startYear}/${endYear}/${sggCd}`; + const coMatRvwRes = await getFetch(fetchType.WR, url); + + return coMatRvwRes; }; export const coRvwActionsExport: (set: any) => coRvwActions = (set: any) => { return { coMatRvwInit: async ( - pageCnt: number, pageNo: number, - sggCd: string, + pageCnt: number, startYear: string, - endYear: string + endYear: string, + sggCd: string ) => { - const tempData = `/reuseFc/request/10000000000000`; - const url = `/reuseFc/request/${pageNo}/${pageCnt}/${sggCd}/${startYear}/${endYear}}`; - const coMatRvwRes = await getFetch(fetchType.WR, tempData); + const url = `/reuseFc/request/infoList/${pageNo}/${pageCnt}/${startYear}/${endYear}/${sggCd}`; + const coMatRvwRes = await getFetch(fetchType.WR, url); return set((state: coRvwState) => ({ ...state, coRvw: { ...state.coRvw, init: false, - coMatRvwRes: [coMatRvwRes], + coMatRvwRes: coMatRvwRes, }, })); }, + coMatRvwUpdate: async ( + splyCd: string, + dmdCd: string, + data: DedMatUpdateType + ) => { + try { + const isUpdate = await putFectch( + `/reuseFc/request/cst/${splyCd}/${dmdCd}`, + data + ); + + const coMatRvwRes = coMatInit( + 1, + 10, + new Date().getFullYear().toString(), + new Date().getFullYear().toString(), + "11" + ); + return set((state: coRvwState) => ({ + ...state, + coRvw: { + ...state.coRvw, + init: false, + coMatRvwRes: coMatRvwRes, + }, + })); + } catch (e) { + toast.error("매칭 검토 저장 오류입니다."); + } + }, }; }; diff --git a/apps/wr/app/store/matDmd/coMatRvw/type.tsx b/apps/wr/app/store/matDmd/coMatRvw/type.tsx index eeaaaf8f5..93e214643 100644 --- a/apps/wr/app/store/matDmd/coMatRvw/type.tsx +++ b/apps/wr/app/store/matDmd/coMatRvw/type.tsx @@ -1,40 +1,43 @@ import { z } from "zod"; -const DmdInfoSchema = z.object({ - dmdInfoSn: z.number(), - dmdInfoFk: z.string(), - dmndTmng: z.coerce.date(), - dmndQty: z.number(), - wntUntprc: z.number(), - grssClfg: z.number(), - combResdch: z.number(), - trbt: z.number(), - blgcOxygDmndQnt: z.number(), - smll: z.number(), - crmty: z.number(), - tn: z.number(), - tph: z.number(), - ph: z.number(), - clIonQnt: z.number(), - cdtnv: z.number(), - rmrk: z.string(), - useUsgCd: z.string(), -}); -const DmdMatSchema = z.object({ - dmdInfoFk: z.string(), - splyFcltFk: z.string(), - splyFcltFlg: z.string(), - pbnstRuseFcltBizFk: z.number(), - splyBgngDay: z.coerce.date(), - splyEndDay: z.coerce.date(), - splyCpct: z.number(), - splyFmYn: z.string(), - useUsgCd: z.string(), -}); -export const DmdCoReqSchema = - z.object({ - cityText:z.string().nullish(), - sggText:z.string().nullish(), + const DemandInfoSchema = z.object({ + dmdInfoSn: z.number(), + dmdInfoFk: z.string(), + dmndTmng: z.coerce.date(), + dmndQty: z.number(), + wntUntprc: z.number(), + grssClfg: z.number(), + combResdch: z.number(), + trbt: z.number(), + blgcOxygDmndQnt: z.number(), + smll: z.number(), + crmty: z.number(), + tn: z.number(), + tph: z.number(), + ph: z.number(), + clIonQnt: z.number(), + cdtnv: z.number(), + rmrk: z.string(), + useUsgCd: z.string(), + mtchnCmptnYmd: z.string(), + rvwCmptnYmd: z.string() + }); + + const DemandMatchingSchema = z.object({ + dmdInfoFk: z.string(), + splyFcltFk: z.string(), + splyFcltFlg: z.string(), + pbnstRuseFcltBizFk: z.number(), + splyBgngDay: z.coerce.date(), + splyEndDay: z.coerce.date(), + splyCpct: z.number(), + splyFmYn: z.string(), + useUsgCd: z.string(), + dmdInfoSn: z.number(), + splyCndtList:z.array(z.string()) + }); + + const DemandCoSchema = z.object({ dmdInfoPk: z.string(), dmdCoNm: z.string(), ctpvCd: z.string(), @@ -51,11 +54,45 @@ export const DmdCoReqSchema = mdfcnDt: z.coerce.date(), mdfr: z.string(), dmdAplyPswd: z.string(), - demandInfo: z.array(DmdInfoSchema), - demandMatchings: z.array(DmdMatSchema), - }) - - + demandInfo: z.array(DemandInfoSchema).nullish(), // 안쓰는 거임 + demandMatchings: z.array(DemandMatchingSchema).nullish()// 안쓰는 거임 + }); + + const DemandCstSchema = z.object({ + dmdInfoSn: z.number(), + usgPrcsProcs: z.string(), + cstrnCst: z.number(), + fcltSbsdEpsTrf: z.number(), + prcsFcltCpctCstrnCst: z.number() + }); + + export const DmdCoReqSchema = z.object({ + cityText:z.string().nullish(), + sggText:z.string().nullish(), + dmdInfoSn: z.number(), + dmdInfoFk: z.string(), + dmndTmng: z.coerce.date(), + dmndQty: z.number(), + wntUntprc: z.number(), + grssClfg: z.number(), + combResdch: z.number(), + trbt: z.number(), + blgcOxygDmndQnt: z.number(), + smll: z.number(), + crmty: z.number(), + tn: z.number(), + tph: z.number(), + ph: z.number(), + clIonQnt: z.number(), + cdtnv: z.number(), + rmrk: z.string(), + useUsgCd: z.string(), + mtchnCmptnYmd: z.string(), + rvwCmptnYmd: z.string(), + demandCo: DemandCoSchema, + demandMatching: DemandMatchingSchema, + demandCst: DemandCstSchema + }); export type DmdCoReqType = z.infer; @@ -67,4 +104,15 @@ export type DmdMatTableType = { telno:string, regDt:string, state:string +} + + +export type DedMatUpdateType = +{ + dmdInfoSn: number; + usgPrcsProcs: string; + cstrnCst: number; + fcltSbsdEpsTrf: number; + prcsFcltCpctCstrnCst: number; + rgtr: string; } \ No newline at end of file diff --git a/apps/wr/components/lib/func/commom.tsx b/apps/wr/components/lib/func/commom.tsx index 7d4eff124..72f2943ce 100644 --- a/apps/wr/components/lib/func/commom.tsx +++ b/apps/wr/components/lib/func/commom.tsx @@ -14,7 +14,7 @@ export const getCity = (val: string, sggCd: SelectDataType[]) => { val: item.val, text: item.text, // 한국어 텍스트 })); - data.unshift({val:'0',text:'전체'}) + data.unshift({ val: "0", text: "전체" }); return data; }; @@ -95,8 +95,6 @@ export const excelArrayDownload = ( }); }; - - // onchange 텍스트를 숫자로 and ,제거 export const handleCommaNumberChange = ( e: React.ChangeEvent, @@ -126,7 +124,6 @@ export const getCityOrSgg = (ref: RefObject) => { return con; }; - export const safeDate = (value: any): Date | undefined => { const date = new Date(value); return isNaN(date.getTime()) ? undefined : date; @@ -139,4 +136,23 @@ export const yearOptions: { val: string; text: string }[] = Array.from( val: String(1970 + i), text: `${1970 + i}년`, }) -); \ No newline at end of file +); + +export const getdmdMatFlag = (flag: string) => { + let flagMat = ""; + switch (flag) { + case "Init": + flagMat = "신청"; + break; + case "Sub": + flagMat = "검토"; + break; + case "Matched": + flagMat = "완료"; + break; + default : + flagMat = ""; + break; + } + return flagMat; +}; diff --git a/apps/wr/components/ui/popover/bizTotalMoneyPop/bizTotalMoneyPop.tsx b/apps/wr/components/ui/popover/bizTotalMoneyPop/bizTotalMoneyPop.tsx new file mode 100644 index 000000000..84fbd83a5 --- /dev/null +++ b/apps/wr/components/ui/popover/bizTotalMoneyPop/bizTotalMoneyPop.tsx @@ -0,0 +1,28 @@ +import { + Label, + Popover, + PopoverContent, + PopoverTrigger, +} from "@common/components"; + +export default function BizTotalMoneyPop({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + + {children} + +
+
총사업비 계산방법
+
+ 하수처리수 재이용시설 총 사업비 = 공사비+시설부대경비{" "} +
+
+
+
+ + ); +} diff --git a/apps/wr/components/ui/popover/usagePorcPop/usageProcPop.tsx b/apps/wr/components/ui/popover/usagePorcPop/usageProcPop.tsx new file mode 100644 index 000000000..c1483847a --- /dev/null +++ b/apps/wr/components/ui/popover/usagePorcPop/usageProcPop.tsx @@ -0,0 +1,30 @@ +import { usageProcData } from "@/app/store/matDmd/coMatRvw/headList"; +import { UiTable } from "@common/business_components/ui"; +import { Popover, PopoverContent, PopoverTrigger } from "@common/components"; +import { Children } from "react"; + +export default function UsageProcData({ children }: { children: React.ReactNode }) { + return ( + <> + + {children} + + + {}} + onPageChange={() => {}} + /> + + + + ); +} From bb908f5861c2320454ee7c8d86dd00a14c3edf58 Mon Sep 17 00:00:00 2001 From: leedj312 Date: Wed, 18 Jun 2025 20:32:37 +0900 Subject: [PATCH 3/7] =?UTF-8?q?=EC=88=98=EC=9A=94=EC=B2=98=20=EB=A7=A4?= =?UTF-8?q?=ED=95=91,=20=EC=9E=AC=EC=9D=B4=EC=9A=A9=20=EA=B2=80=ED=86=A0?= =?UTF-8?q?=EC=9D=B4=EB=A0=A5=20=EA=B3=B5=EC=82=AC=EB=B9=84=20=EB=B6=80?= =?UTF-8?q?=EB=B6=84=20=EC=A0=9C=EC=99=B8=20=EC=99=84=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wr/app/matMng/coMat/coMatRvw/page.tsx | 371 ++-------- .../wr/app/matMng/coMat/ruseRvwHstry/page.tsx | 694 +++++++----------- apps/wr/app/store/matDmd/coMatRvw/index.tsx | 87 ++- apps/wr/app/store/matDmd/coMatRvw/type.tsx | 56 +- .../store/matDmd/ruseRvwHstry/headList.tsx | 137 +--- .../app/store/matDmd/ruseRvwHstry/index.tsx | 202 ++++- .../ui/form/coMat/conCostForm/conCostForm.tsx | 377 ++++++++++ .../bizTotalMoneyPop/bizTotalMoneyPop.tsx | 28 - .../ui/popover/usagePorcPop/usageProcPop.tsx | 30 - 9 files changed, 1008 insertions(+), 974 deletions(-) create mode 100644 apps/wr/components/ui/form/coMat/conCostForm/conCostForm.tsx delete mode 100644 apps/wr/components/ui/popover/bizTotalMoneyPop/bizTotalMoneyPop.tsx delete mode 100644 apps/wr/components/ui/popover/usagePorcPop/usageProcPop.tsx diff --git a/apps/wr/app/matMng/coMat/coMatRvw/page.tsx b/apps/wr/app/matMng/coMat/coMatRvw/page.tsx index 5f4a3943b..49f23127f 100644 --- a/apps/wr/app/matMng/coMat/coMatRvw/page.tsx +++ b/apps/wr/app/matMng/coMat/coMatRvw/page.tsx @@ -36,38 +36,32 @@ import { import ListDiv from "@common/business_components/ui/list_div"; import { Button, Input, Label } from "@common/components/ui"; import { useEffect, useRef, useState } from "react"; -import { useForm } from "react-hook-form"; +import { useForm } from "react-hook-form"; import toast, { Toaster } from "react-hot-toast"; import { z } from "zod"; import moment from "moment"; import { usageProcData } from "@/app/store/matDmd/coMatRvw/headList"; -import UsageProcData from "@/components/ui/popover/usagePorcPop/usageProcPop"; -import BizTotalMoneyPop from "@/components/ui/popover/bizTotalMoneyPop/BizTotalMoneyPop"; -import { TEST_UUID } from "@/app/store/ruseFcltMng/fcltReg/rainReg"; import { zodResolver } from "@hookform/resolvers/zod"; - +import ConCostForm from "@/components/ui/form/coMat/conCostForm/conCostForm"; export default function CoMatRvw() { - const { code, coRvw, coMatRvwInit ,coMatRvwUpdate} = useWrStore((state) => state); + const { code, coRvw, coMatRvwInit ,coMatRvwSearch ,coMatRvwInqua} = useWrStore( + (state) => state + ); const { coMatRvwRes } = coRvw; //init, sub, match const initRef = useRef(false); const { coRvwHeadList } = coRvw; + const [pageNation, setPageNatiion] = useState(1); + + const [dmdCoNm, setDmdCoNm] = useState(""); const [dmdMatData, setDmdMtaData] = useState([]); const [selectSgg, setSelectSgg] = useState(); const [objSearch, setObjSearch] = useState({ sgg: "", city: "", }); - const [isPrcsMo, setIsPrcsMo] = useState<{ - isModal: boolean; - }>({ isModal: false }); - const [isTrfMo, setIsTrfMo] = useState<{ - isModal: boolean; - }>({ isModal: false }); - const [isCmpttnMo, setIsCmpttnMo] = useState<{ - isModal: boolean; - }>({ isModal: false }); + const [fromDate, setFromDate] = useState( String(new Date().getFullYear()) ); @@ -77,6 +71,29 @@ export default function CoMatRvw() { const [selectData, setSelectData] = useState( {} as DmdCoReqType ); + + const getSearch = ( + startYear: number, + endYear: number, + sggCd: string, + dmdCoNm: string + ) => { + + if (dmdCoNm.length>0 ) { + + coMatRvwSearch( + pageNation, + 13, + String(startYear), + String(endYear), + sggCd, + dmdCoNm + ); + } else { + coMatRvwInqua(pageNation, 13, String(startYear), String(endYear), sggCd); + } + }; + const form = useForm>({ resolver: zodResolver(DmdCoReqSchema), }); @@ -89,22 +106,6 @@ export default function CoMatRvw() { setSelectData(coMatRvwRes[index]); } }; - const onSubmit = () => { - const data:DedMatUpdateType = { - dmdInfoSn: form.getValues("dmdInfoSn"), - usgPrcsProcs: form.getValues("demandCst.usgPrcsProcs"), - cstrnCst:form.getValues("demandCst.cstrnCst"), - fcltSbsdEpsTrf:form.getValues("demandCst.fcltSbsdEpsTrf"), - prcsFcltCpctCstrnCst:form.getValues("demandCst.prcsFcltCpctCstrnCst"), - rgtr:TEST_UUID - - }; - - - - coMatRvwUpdate( '11000SW001R1', form.getValues('dmdInfoFk'), data ) - }; - useEffect(() => { if (form?.getValues("useUsgCd")) { form.setValue( @@ -118,8 +119,7 @@ export default function CoMatRvw() { useEffect(() => { - - console.log('coMatRvwRes ', coMatRvwRes) + console.log(' coMatRvwRes ', coMatRvwRes) if (coMatRvwRes) { const data = coMatRvwRes?.map((item, index) => { console.log(" item ", item); @@ -152,7 +152,7 @@ export default function CoMatRvw() { useEffect(() => { if (!initRef.current) { - coMatRvwInit(1, 13, fromDate, toDate, "47"); + coMatRvwInit(1, 13, fromDate, toDate); initRef.current = true; } }, [coMatRvwInit, initRef, fromDate, toDate]); @@ -216,8 +216,8 @@ export default function CoMatRvw() { {}} + textValue={dmdCoNm} + setText={setDmdCoNm} />
@@ -238,6 +238,20 @@ export default function CoMatRvw() { "시작년도가 종료년도 이후로 설정할 수 없습니다." ); } else { + let con: string | number = ""; + if (String(objSearch.city).length > 0) { + con = String(objSearch.city); + } + if (String(objSearch.sgg).length > 0) { + con = String(objSearch.sgg); + } + getSearch( + fromNum, + toNum, + con, + dmdCoNm + ); + } } }} @@ -660,293 +674,10 @@ export default function CoMatRvw() {
-
-
-

- 표준공사비 산정 -

-
-

처리시설 표준공사비 산정

- - - -
-
-

기본사항

-
-
-
- ( - - { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? ""} - /> - - )} - /> -
-
- ( - - { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - - )} - /> -
-
- - - - } - > - ( - - - - )} - /> -
-
- ( - - { - field.onChange(Number(e.target.value)); - }} - value={Number(field.value) * 365} - /> - - )} - /> -
-
-

공사비 입력사항

-
-
-
- - -
- ( - - { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - - )} - /> -
-
-
- - -
- ( - - { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - - )} - /> -
-
- - - - {}} - value={ - form.getValues("demandCst.prcsFcltCpctCstrnCst") + - form.getValues("demandCst.fcltSbsdEpsTrf") || 0 - } - /> -
-
-
- - -
- ( - - { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? ""} - /> - - )} - /> -
- -
-
- ( - - { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - - )} - /> -
-
- - -
-
- ( - - )} - /> -
-
-
- +
- - } - bodyClass="w-[40vw] max-w-none h-[70vh]" - open={isTrfMo.isModal} - onOpenChange={(open) => { - setIsTrfMo({ isModal: open }); - }} - /> - } - bodyClass="w-[70vw] max-w-none h-[50vh]" - open={isCmpttnMo.isModal} - onOpenChange={(open) => { - setIsCmpttnMo({ isModal: open }); - }} - />
diff --git a/apps/wr/app/matMng/coMat/ruseRvwHstry/page.tsx b/apps/wr/app/matMng/coMat/ruseRvwHstry/page.tsx index 70d57d0b9..934831be8 100644 --- a/apps/wr/app/matMng/coMat/ruseRvwHstry/page.tsx +++ b/apps/wr/app/matMng/coMat/ruseRvwHstry/page.tsx @@ -1,434 +1,292 @@ "use client"; import { useWrStore } from "@/app/store"; -import { formTableName } from "@/components/lib/class/comClass"; -import { getCity } from "@/components/lib/func/commom"; -import { CmpttnModal } from "@/components/ui/modal/coMat/cmpttnModal"; -import { CoMatModal } from "@/components/ui/modal/coMat/coMatModal"; +import { + DmdCoReqSchema, + type DmdCoReqType, +} from "@/app/store/matDmd/coMatRvw/type"; +import { + getCity, + getdmdMatFlag, + yearOptions, +} from "@/components/lib/func/commom"; +import ConCostForm from "@/components/ui/form/coMat/conCostForm/conCostForm"; import type { objSearchType } from "@/components/ui/modal/fcltReg/bdstRegModal/bdstRegModal"; -import { ContentsDiv, Form, FormField, FormUi, ScrollArea, SearchDiv, SearchFormLeft, SearchFormRight, SearchInput, SelectBox, Title, UiModal, UiTable, type SelectDataType } from "@common/business_components/ui"; +import { + ContentsDiv, + SearchDiv, + SearchFormLeft, + SearchFormRight, + SearchInput, + SelectBox, + Title, + UiTable, + type SelectDataType, +} from "@common/business_components/ui"; import ListDiv from "@common/business_components/ui/list_div"; import { Button, DatePicker, Input, Label } from "@common/components/ui"; -import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@common/components/ui/tooltip"; import { zodResolver } from "@hookform/resolvers/zod"; -import { useEffect, useState } from "react"; -import { useFieldArray, useForm } from "react-hook-form"; +import moment from "moment"; +import { useCallback, useEffect, useState } from "react"; +import { set, useFieldArray, useForm } from "react-hook-form"; import { z } from "zod"; - - +import { tableData } from "@/components/lib/func/commom"; +import toast, { Toaster } from "react-hot-toast"; export default function RuseRvwHstry() { - const { code, ruseHstry, } = useWrStore((state) => state); - const { ruseHstryHeadList, } = ruseHstry; - const [fromDate, setFromDate] = useState(new Date()); - const [toDate, setToDate] = useState(new Date()); - const schema = z.object({}); - const [selectSgg, setSelectSgg] = useState() - const [objSearch, setObjSearch] = useState({ sgg: "", city: "" }); + const { code, ruseHist, ruseRvwHistInit, ruseRvwSearch, ruseRvwInqua } = + useWrStore((state) => state); + const { rvwHistRes, ruseHistHeadList } = ruseHist; + const schema = z.object({}); + const [pageNation, setPageNatiion] = useState(1); - const getSelCity = (val: string | number) => { - const cityValue = String(val); // Ensure val is treated as a string - const data = getCity(cityValue, code.sggCd); - setSelectSgg(data); - setObjSearch({ city: cityValue, sgg: '' }); - }; + const [dmdCoNm, setDmdCoNm] = useState(""); + const [ruseUtztnFcltNm, setRuseUtztnFcltNm] = useState(""); + const [selectSgg, setSelectSgg] = useState(); + const [objSearch, setObjSearch] = useState({ + sgg: "", + city: "", + }); - const getSgg = (val: string | number) => { - console.log(val); - setObjSearch({ ...objSearch, sgg: String(val) }) - }; + const [fromDate, setFromDate] = useState( + String(new Date().getFullYear()) + ); + const [toDate, setToDate] = useState( + String(new Date().getFullYear()) + ); + const [rvwHistData, setRvwHistData] = useState(); - const form = useForm>({ - resolver: zodResolver(schema), - defaultValues: { - fcltCpct: 0, - } - }); - const [isPrcsMo, setIsPrcsMo] = useState<{ - isModal: boolean; - }>({ isModal: false }); - const [isTrfMo, setIsTrfMo] = useState<{ - isModal: boolean; - }>({ isModal: false, }); - const [isCmpttnMo, setIsCmpttnMo] = useState<{ - isModal: boolean; - }>({ isModal: false, }); + const getSelCity = (val: string | number) => { + const cityValue = String(val); // Ensure val is treated as a string + const data = getCity(cityValue, code.sggCd); + setSelectSgg(data); + setObjSearch({ city: cityValue, sgg: "0" }); + }; - return ( - -
-
- - <SearchDiv> - <SearchFormLeft> - <div className="col-span-8 flex flex-row"> - <SelectBox - className="col-span-2 w-1/3 h-full text-2xl" - label="시도" - selectClass={""} - selectArray={code.cityCd || []} - onSelectValue={getSelCity} - > - {""} - </SelectBox> - <SelectBox - className="col-span-2 w-1/3 h-full text-2xl ml-4" - label="시군구" - selectClass={""} - selectArray={selectSgg || []} - onSelectValue={getSgg} - > - {""} - </SelectBox> - <div className="col-span-5 w-full"> - <div className="flex flex-row items-center"> - <Label className="text-xl text-gray-600 ml-4 mr-4">수요신청년도</Label> - <div className="flex flex-row"> - <DatePicker mode={'single'} - className="w-full" - selected={fromDate} - onSelect={(date: Date | undefined) => { if (date) setFromDate(date) }} /> - <span className="ml-2 mr-2">~</span> - <DatePicker mode={'single'} - selected={toDate} - onSelect={(date: Date | undefined) => { if (date) setToDate(date) }} /> - </div> - </div> - </div> - <SearchInput - className={"text-2xl"} - label="시설명" - textValue={""} - setText={(e) => { - }} - /> - <SearchInput - className={"text-2xl ml-4"} - label="회사명" - textValue={""} - setText={(e) => { - }} - /> - </div> - </SearchFormLeft> - <SearchFormRight - className="w-2/12 mx-5 flex flex-col items-center justify-center space-x-2 "> - <div className="space-y"> - <div className="flex flex-row space-x-2"> - <Button - size={"sm"} - onClick={(e) => { }} - > - 조회 - </Button> - <Button - size={"sm"} - onClick={(e) => { }} - > - 검토완료 - </Button> - </div> - </div> - </SearchFormRight> - </SearchDiv> + const getSgg = (val: string | number) => { + console.log(val); + setObjSearch({ ...objSearch, sgg: String(val) }); + }; + + const getSearch = ( + startYear: number, + endYear: number, + sggCd: string, + dmdCoNm: string, + ruseUtztnFcltNm: string + ) => { + if (dmdCoNm || ruseUtztnFcltNm) { + ruseRvwSearch( + pageNation, + 13, + String(startYear), + String(endYear), + sggCd, + dmdCoNm, + ruseUtztnFcltNm + ); + } else { + ruseRvwInqua(pageNation, 13, String(startYear), String(endYear), sggCd); + } + }; + + const form = useForm<DmdCoReqType>({ + resolver: zodResolver(DmdCoReqSchema), + }); + + const TableCellClick = useCallback( + (index: number | undefined) => { + if ( + index !== undefined && + index >= 0 && + rvwHistRes && + rvwHistRes[index] + ) { + form.reset(rvwHistRes[index]); + } + }, + [rvwHistRes, form] + ); + + useEffect(() => { + if (!ruseHist.isInit) { + ruseRvwHistInit( + 1, + 13, + new Date().getFullYear().toString(), + new Date().getFullYear().toString() + ); + } + }, [ruseHist.isInit]); + + useEffect(() => { + if (rvwHistRes) { + const data = rvwHistRes?.map((item, index) => { + return { + ...item, + ctpvCd: item.demandCo.ctpvCd, + sggCd: item.demandCo.sggCd, + dmdCoNm: item.demandCo.dmdCoNm, + daddr: item.demandCo.daddr, + telno: item.demandCo.telno, + regDt: item?.demandCo?.regDt + ? moment(item?.demandCo?.regDt).format("YYYY-MM-DD") + : "없음", + rvwCmptnYmd: item?.rvwCmptnYmd + ? moment(item?.rvwCmptnYmd).format("YYYY-MM-DD") + : "없음", + mtchnCmptnYmd: item?.mtchnCmptnYmd + ? moment(item?.mtchnCmptnYmd).format("YYYY-MM-DD") + : "없음", + splyFcltFk: item.demandMatching?.splyFcltFk, + dmndQty: item.dmndQty, + splyFcltFlg: getdmdMatFlag(item.demandMatching?.splyFcltFlg), + matYn: false, + }; + }); + setRvwHistData(tableData(data, { code })); + } + }, [rvwHistRes]); + + useEffect(() => { + }, [form.formState]); + + return ( + <ContentsDiv> + <div className="grid grid-cols-4 gap-4"> + <div className="col-span-4"> + <Title title={"재이용검토이력"} /> + <SearchDiv> + <SearchFormLeft> + <div className="col-span-10 flex flex-row"> + <SelectBox + className="w-80 h-full text-2xl" + label="시도" + selectClass={""} + selectArray={code.cityCd || []} + onSelectValue={getSelCity} + > + {""} + </SelectBox> + <SelectBox + className="w-80 h-full text-2xl ml-4" + label="시군구" + selectClass={""} + selectArray={selectSgg || []} + onSelectValue={getSgg} + > + {""} + </SelectBox> + <div className="col-span-4 w-full"> + <div className="flex flex-row items-center"> + <Label className="text-xl text-gray-600 ml-4 mr-4"> + 수요신청년도 + </Label> + <div className="flex flex-row mt-2"> + <SelectBox + className="h-full w-32 text-2xl" + label="" + selectClass={""} + selectArray={yearOptions} + value={fromDate} + onSelectValue={(val: string | number) => + setFromDate(String(val)) + } + /> + <span className="mx-6">~</span> + <SelectBox + className="h-full w-32 text-2xl" + label="" + selectClass={""} + selectArray={yearOptions} + value={toDate} + onSelectValue={(val: string | number) => + setToDate(String(val)) + } + /> + <SearchInput + className={"text-2xl w-60 ml-4 "} + label="시설명" + textValue={ruseUtztnFcltNm} + setText={setRuseUtztnFcltNm} + /> + <SearchInput + className={"text-2xl w-60 ml-4 "} + label="회사명" + textValue={dmdCoNm} + setText={setDmdCoNm} + /> + </div> + </div> </div> - </div> - - <div className="grid grid-cols-6 gap-4 "> - <div className="col-span-6"> - <ListDiv> - <UiTable - headName={"재이용검토현황"} - tableData={[]} - children={undefined} - headlist={ruseHstryHeadList} - pageSize={20} - total={100000} - cellClick={(index: number | undefined, headId: string) => { - }} - onPageChange={() => { }} - ></UiTable> - <hr /> - <Form {...form}> - <h3 className="mt-4 ml-2 text-2xl font-medium text-label">수요신청 상세현황</h3> - <h1 className="mt-2 ml-3">표준공사비 산정</h1> - <div className="flex items-center mx-3 mb-3"> - <h1 className="">처리시설 표준공사비 산정</h1> - <Button - size={"sm"} - onClick={(e) => { }} - > - 재계산 - </Button> - <Button - size={"sm"} - onClick={(e) => { }} - > - 저장 - </Button> - - </div> - <div className="grid grid-cols-12 gap-4 ml-4 mr-4"> - <div className="col-span-3 mt-4"> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label="용도"> - <Input - placeholder="" - type="text" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? ""} - /> - </FormUi> - )} - /> - </div> - <div className="col-span-3 mt-4"> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label="요구수량(M3/d)"> - <Input - placeholder="" - type="number" - step="0.1" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - </FormUi> - )} - /> - </div> - <div className="col-span-3 mt-4"> - <Label className="">용도에 따른 처리공정<i className="diveicon di-search" onClick={(e) => setIsPrcsMo({ isModal: true })} /></Label> - - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label=""> - <Input - placeholder="" - type="text" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value || ""} - className="mt-2" - /> - </FormUi> - )} - /> - </div> - <div className="col-span-3 mt-4"> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label="처리시설 용량(요구수량 * 365일)"> - <Input - placeholder="" - type="number" - step="0.001" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - </FormUi> - )} - /> - </div> - <div className="col-span-3 mt-4"> - <div className="flex items-center justify-between"> - <Label>처리시설용량에 따른 공사비(백만원)</Label> - <Button - size={"sm"} - onClick={(e) => setIsCmpttnMo({ isModal: true })} - className="bg-none" - > - 공사비 산정표 보기 - </Button> - </div> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label=""> - <Input - placeholder="" - type="number" - step="0.001" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - </FormUi> - )} - /> - </div> - <div className="col-span-3 mt-4"> - <div className="flex items-center justify-between"> - <Label>시설부대경비 요율(%)</Label> - <Button - size={"sm"} - onClick={(e) => setIsTrfMo({ isModal: true })} - > - 요율표 보기 - </Button> - </div> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label=""> - <Input - placeholder="" - type="number" - step="0.01" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - </FormUi> - )} - /> - </div> - - <div className="col-span-3 mt-4"> - <Label>총사업비 (백만원) - <TooltipProvider> - <Tooltip> - <TooltipTrigger asChild> - <i className="diveicon di-search" /> - </TooltipTrigger> - <TooltipContent> - <div className="font-bold mb-1 text-xl">총사업비 계산방법</div> - <div className="text-lg">하수처리수 재이용시설 총 사업비 = 공사비+시설부대경비 </div> - </TooltipContent> - </Tooltip> - </TooltipProvider> - </Label> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label=""> - <Input - placeholder="" - className="mt-2" - type="number" - step="0.01" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? 0} - /> - </FormUi> - )} - /> - </div> - <div className="col-span-3 mt-4"> - <div className="flex items-center justify-between"> - <Label>공급처 선정</Label> - <Button - size={"sm"} - onClick={(e) => { }} - className="bg-none" - > - 후보지 조회 - </Button> - </div> - <FormField - control={form.control} - name="" - render={({ field }) => ( - <FormUi label=""> - <Input - placeholder="" - type="text" - onChange={(e) => { - field.onChange(Number(e.target.value)); - }} - value={field.value ?? ""} - /> - </FormUi> - )} - /> - </div> - - <div className="col-span-4 mt-4 mb-3"> - <div className="mt-4"> - <Label>관로 표준공사비 산정</Label> - </div> - </div> - </div> - </Form> - </ListDiv> + </div> + </SearchFormLeft> + <SearchFormRight className="w-2/12 mx-5 flex flex-col items-center justify-center space-x-2 "> + <div className="space-y"> + <div className="flex flex-row space-x-2"> + <Button + size={"sm"} + onClick={(e) => { + if (fromDate && toDate) { + const fromNum = Number(fromDate); + const toNum = Number(toDate); + if (fromNum > toNum) { + toast.error( + "시작년도가 종료년도 이후로 설정할 수 없습니다." + ); + } else { + let con: string | number = ""; + if (String(objSearch.city).length > 0) { + con = String(objSearch.city); + } + if (String(objSearch.sgg).length > 0) { + con = String(objSearch.sgg); + } + getSearch( + fromNum, + toNum, + con, + dmdCoNm, + ruseUtztnFcltNm + ); + } + } + }} + > + 조회 + </Button> + <Button size={"sm"} onClick={(e) => {}}> + 검토완료 + </Button> </div> - <UiModal - body={ - <> - <UiTable - headName={"용도에 따른 처리공정"} - tableData={[ - { usage: "청소", process: "총인처리시설 + 염소소독" }, - { usage: "화장실용수", process: "총인처리시설 + 염소소독" }, - { usage: "세척", process: "총인처리시설 + UV소독" }, - { usage: "살수", process: "총인처리시설 + UV소독" }, - { usage: "조경", process: "총인처리시설 + UV소독" }, - { usage: "농업", process: "총인처리시설 + UV소독" }, - { usage: "하천", process: "총인처리시설 + UV소독" }, - { usage: "지하수", process: "전처리시설 + RO" }, - { usage: "공업용수", process: "전처리시설 + RO" }, + </div> + </SearchFormRight> + </SearchDiv> + </div> + </div> - ]} - headlist={[ - { id: "usage", title: "용도" }, - { id: "process", title: "단위공정" } - ]} - pageSize={0} - total={0} - cellClick={() => { }} - onPageChange={() => { }} - /> - </> - } - bodyClass="w-[25vw] max-w-none h-[60vh]" - open={isPrcsMo.isModal} - onOpenChange={(open) => { - setIsPrcsMo({ isModal: open }); - }} - /> - <UiModal - body={ - <CoMatModal data={[]}></CoMatModal> - } - bodyClass="w-[40vw] max-w-none h-[70vh]" - open={isTrfMo.isModal} - onOpenChange={(open) => { - setIsTrfMo({ isModal: open }); - }} - /> - <UiModal - body={ - <CmpttnModal data={[]}></CmpttnModal> - } - bodyClass="w-[70vw] max-w-none h-[50vh]" - open={isCmpttnMo.isModal} - onOpenChange={(open) => { - setIsCmpttnMo({ isModal: open }); - }} - /> - </div> - </ContentsDiv > - ) -} \ No newline at end of file + <div className="grid grid-cols-6 gap-4 "> + <div className="col-span-6"> + <ListDiv> + <UiTable + headName={"재이용검토현황"} + tableData={rvwHistData || []} + headlist={ruseHistHeadList} + pageSize={20} + total={100000} + cellClick={(index: number | undefined, headId: string) => { + TableCellClick(index); + }} + onPageChange={setPageNatiion} + ></UiTable> + <hr /> + <h3 className="mt-4 ml-2 text-2xl font-medium text-label"> + 수요신청 상세현황 + </h3> + <ConCostForm form={form} type={"hist"} /> + </ListDiv> + </div> + </div> + <Toaster position="top-center" /> + </ContentsDiv> + ); +} diff --git a/apps/wr/app/store/matDmd/coMatRvw/index.tsx b/apps/wr/app/store/matDmd/coMatRvw/index.tsx index 9362ead28..6ad500d99 100644 --- a/apps/wr/app/store/matDmd/coMatRvw/index.tsx +++ b/apps/wr/app/store/matDmd/coMatRvw/index.tsx @@ -35,13 +35,27 @@ type coRvwActions = { pageCnt: number, startYear: string, endYear: string, - sggCd: string - ) => void, - coMatRvwUpdate: ( + ) => void; + coMatRvwUpdate: ( splyCd: string, dmdCd: string, data: DedMatUpdateType - )=>void + ) => void; + coMatRvwSearch: ( + pageNo: number, + pageCnt: number, + startYear: string, + endYear: string, + sggCd: string, + dmdCoNm: string, + ) => void; + coMatRvwInqua: ( + pageNo: number, + pageCnt: number, + startYear: string, + endYear: string, + sggCd: string + ) => void; }; const coMatInit = async ( @@ -49,9 +63,8 @@ const coMatInit = async ( pageCnt: number, startYear: string, endYear: string, - sggCd: string ) => { - const url = `/reuseFc/request/infoList/${pageNo}/${pageCnt}/${startYear}/${endYear}/${sggCd}`; + const url = `/reuseFc/request/infoList/${pageNo}/${pageCnt}/${startYear}/${endYear}`; const coMatRvwRes = await getFetch(fetchType.WR, url); return coMatRvwRes; @@ -64,9 +77,8 @@ export const coRvwActionsExport: (set: any) => coRvwActions = (set: any) => { pageCnt: number, startYear: string, endYear: string, - sggCd: string ) => { - const url = `/reuseFc/request/infoList/${pageNo}/${pageCnt}/${startYear}/${endYear}/${sggCd}`; + const url = `/reuseFc/request/infoList/${pageNo}/${pageCnt}/${startYear}/${endYear}`; const coMatRvwRes = await getFetch(fetchType.WR, url); return set((state: coRvwState) => ({ @@ -94,7 +106,6 @@ export const coRvwActionsExport: (set: any) => coRvwActions = (set: any) => { 10, new Date().getFullYear().toString(), new Date().getFullYear().toString(), - "11" ); return set((state: coRvwState) => ({ ...state, @@ -108,5 +119,63 @@ export const coRvwActionsExport: (set: any) => coRvwActions = (set: any) => { toast.error("매칭 검토 저장 오류입니다."); } }, + coMatRvwSearch: async ( + pageNo: number, + pageCnt: number, + startYear: string, + endYear: string, + sggCd: string, + dmdCoNm: string, + ) => { + let url = `/reuseFc/request/infoList/${pageNo}/${pageCnt}/${startYear}/${endYear}`; + + if (sggCd.length > 0) { + url += `/${sggCd}`; + } else { + url += `/0`; + } + if (dmdCoNm?.length > 0) { + url += `/${dmdCoNm}`; + } else { + url += `/0`; + } + + console.log(' url ', url) + const coMatRvwRes = await getFetch(fetchType.WR, url); + + return set((state: coRvwState) => ({ + ...state, + coRvw: { + ...state.coRvw, + coMatRvwRes: coMatRvwRes, + }, + })); + }, + coMatRvwInqua: async ( + pageNo: number, + pageCnt: number, + startYear: string, + endYear: string, + sggCd: string + ) => { + try { + let url = `/reuseFc/request/infoList/${pageNo}/${pageCnt}/${startYear}/${endYear}`; + if (sggCd.length > 0) { + url += `/${sggCd}`; + }else if(sggCd ==='0'){ + url += `/0/0`; + } + const coMatRvwRes = await getFetch(fetchType.WR, url); + return set((state: coRvwState) => ({ + ...state, + coRvw: { + ...state.coRvw, + coMatRvwRes: coMatRvwRes, + }, + })); + } catch (e) { + console.log(" error ", e); + } + }, }; }; diff --git a/apps/wr/app/store/matDmd/coMatRvw/type.tsx b/apps/wr/app/store/matDmd/coMatRvw/type.tsx index 93e214643..de1b123c7 100644 --- a/apps/wr/app/store/matDmd/coMatRvw/type.tsx +++ b/apps/wr/app/store/matDmd/coMatRvw/type.tsx @@ -11,7 +11,7 @@ import { z } from "zod"; trbt: z.number(), blgcOxygDmndQnt: z.number(), smll: z.number(), - crmty: z.number(), + crmty: z.number().nullish(), tn: z.number(), tph: z.number(), ph: z.number(), @@ -19,22 +19,22 @@ import { z } from "zod"; cdtnv: z.number(), rmrk: z.string(), useUsgCd: z.string(), - mtchnCmptnYmd: z.string(), - rvwCmptnYmd: z.string() + mtchnCmptnYmd: z.string().nullish(), + rvwCmptnYmd: z.string().nullish() }); const DemandMatchingSchema = z.object({ - dmdInfoFk: z.string(), - splyFcltFk: z.string(), - splyFcltFlg: z.string(), - pbnstRuseFcltBizFk: z.number(), - splyBgngDay: z.coerce.date(), - splyEndDay: z.coerce.date(), - splyCpct: z.number(), - splyFmYn: z.string(), - useUsgCd: z.string(), - dmdInfoSn: z.number(), - splyCndtList:z.array(z.string()) + dmdInfoFk: z.string().nullish(), + splyFcltFk: z.string().nullish(), + splyFcltFlg: z.string().nullish(), + pbnstRuseFcltBizFk: z.number().nullish(), + splyBgngDay: z.coerce.date().nullish(), + splyEndDay: z.coerce.date().nullish(), + splyCpct: z.number().nullish(), + splyFmYn: z.string().nullish(), + useUsgCd: z.string().nullish(), + dmdInfoSn: z.number().nullish(), + splyCndtList:z.array(z.string().nullish() ).nullish() }); const DemandCoSchema = z.object({ @@ -46,21 +46,21 @@ import { z } from "zod"; splyBgngDay: z.coerce.date(), splyEndDay: z.coerce.date(), splyCpct: z.number(), - splyFmYn: z.string(), + splyFmYn: z.string().nullish(), telno: z.string(), - useUsgCd: z.string(), - regDt: z.coerce.date(), - rgtr: z.string(), - mdfcnDt: z.coerce.date(), - mdfr: z.string(), + useUsgCd: z.string().nullish(), + regDt: z.coerce.date().nullish(), + rgtr: z.string().nullish(), + mdfcnDt: z.coerce.date().nullish(), + mdfr: z.string().nullish(), dmdAplyPswd: z.string(), - demandInfo: z.array(DemandInfoSchema).nullish(), // 안쓰는 거임 - demandMatchings: z.array(DemandMatchingSchema).nullish()// 안쓰는 거임 + demandInfo: z.array(DemandInfoSchema.nullish()).nullish(), // 안쓰는 거임 + demandMatchings: z.array(DemandMatchingSchema.nullish()).nullish()// 안쓰는 거임 }); const DemandCstSchema = z.object({ dmdInfoSn: z.number(), - usgPrcsProcs: z.string(), + usgPrcsProcs: z.string().nullish(), cstrnCst: z.number(), fcltSbsdEpsTrf: z.number(), prcsFcltCpctCstrnCst: z.number() @@ -86,11 +86,11 @@ import { z } from "zod"; clIonQnt: z.number(), cdtnv: z.number(), rmrk: z.string(), - useUsgCd: z.string(), - mtchnCmptnYmd: z.string(), - rvwCmptnYmd: z.string(), - demandCo: DemandCoSchema, - demandMatching: DemandMatchingSchema, + useUsgCd: z.string().nullish(), + mtchnCmptnYmd: z.string().nullish(), + rvwCmptnYmd: z.string().nullish(), + demandCo: DemandCoSchema.nullish(), + demandMatching: DemandMatchingSchema.nullish(), demandCst: DemandCstSchema }); diff --git a/apps/wr/app/store/matDmd/ruseRvwHstry/headList.tsx b/apps/wr/app/store/matDmd/ruseRvwHstry/headList.tsx index 8bbaa8e89..5702406e1 100644 --- a/apps/wr/app/store/matDmd/ruseRvwHstry/headList.tsx +++ b/apps/wr/app/store/matDmd/ruseRvwHstry/headList.tsx @@ -1,37 +1,29 @@ -import { z } from "zod"; -import type { CommonTableProps } from "../../common/type/header"; +import type { TableUpperProps } from "../../common/type/header"; -export const sttnHeadListType = z.array( - z.object({ - id: z.string(), - title: z.string(), - visible: z.boolean(), - }) -); -export const ruseHstryHeadListExport: z.infer<typeof sttnHeadListType> = [ +export const ruseHstryHeadListExport:TableUpperProps[]= [ { - id: "ctpv", + id: "cityText", title: "시도", visible: true, }, { - id: "sgg", + id: "sggText", title: "시군구", visible: true, }, { - id: "coNm", + id: "dmdCoNm", title: "회사명", visible: true, }, { - id: "addr", + id: "daddr", title: "공장주소", visible: true, }, { - id: "telNo", + id: "telno", title: "전화번호", visible: true, }, @@ -41,17 +33,17 @@ export const ruseHstryHeadListExport: z.infer<typeof sttnHeadListType> = [ visible: true, }, { - id: "rvwDt", //바꾸기 + id: "rvwCmptnYmd", //바꾸기 title: "검토일자", visible: true, }, { - id: "matDt", //바꾸기 + id: "mtchnCmptnYmd", //바꾸기 title: "매칭 완료일자", visible: true, }, { - id: "gong", //바꾸기 + id: "splyFcltFk", //바꾸기 title: "공급처", visible: true, }, @@ -66,7 +58,7 @@ export const ruseHstryHeadListExport: z.infer<typeof sttnHeadListType> = [ visible: true, }, { - id: "state", //바꾸기 + id: "splyFcltFlg", //바꾸기 title: "진행상태", visible: true, }, @@ -74,112 +66,7 @@ export const ruseHstryHeadListExport: z.infer<typeof sttnHeadListType> = [ id: "matYn", //바꾸기 title: "매칭완료 여부", visible: true, + type:'check' }, ]; - -// id는 다확인해야함 -export const ruseHstryNodeListExport: CommonTableProps[] = [ - { - id: "ctpv", - title: "시도", - visible: true, - row: 1, - rowSpan: 1, - colSpan: 1, - }, - { - id: "sgg", - title: "시군구", - visible: true, - row: 1, - rowSpan: 1, - colSpan: 1, - }, - { - id: "coNm", - title: "회사명", - visible: true, - row: 1, - rowSpan: 1, - colSpan: 1, - }, - { - id: "addr", - title: "공장주소", - visible: true, - row: 1, - rowSpan: 1, - colSpan: 1, - },{ - id: "telNo", - title: "전화번호", - visible: true, - row: 1, - rowSpan: 1, - colSpan: 1, - }, - { - id: "regDt", //바꾸기 - title: "신청일자", - visible: true, - row: 1, - rowSpan: 1, - colSpan: 1, - }, - { - id: "rvwDt", //바꾸기 - title: "검토일자", - visible: true, - row: 1, - rowSpan: 1, - colSpan: 1, - },{ - id: "matDt", //바꾸기 - title: "매칭 완료일자", - visible: true, - row: 1, - rowSpan: 1, - colSpan: 1, - },{ - id: "gong", //바꾸기 - title: "공급처", - visible: true, - row: 1, - rowSpan: 1, - colSpan: 1, - }, - { - id: "dmndQty", //바꾸기 - title: "요구수량(M3/d)", - visible: true, - row: 1, - rowSpan: 1, - colSpan: 1, - }, - { - id: "useUsgCd", //바꾸기 - title: "사용용도", - visible: true, - row: 1, - rowSpan: 1, - colSpan: 1, - }, - { - id: "state", //바꾸기 - title: "진행상태", - visible: true, - row: 1, - rowSpan: 1, - colSpan: 1, - }, - { - id: "matYn", //바꾸기 - title: "매칭완료 여부", - visible: true, - row: 1, - rowSpan: 1, - colSpan: 1, - }, - -]; \ No newline at end of file diff --git a/apps/wr/app/store/matDmd/ruseRvwHstry/index.tsx b/apps/wr/app/store/matDmd/ruseRvwHstry/index.tsx index 8bb70deae..b14e7b3a0 100644 --- a/apps/wr/app/store/matDmd/ruseRvwHstry/index.tsx +++ b/apps/wr/app/store/matDmd/ruseRvwHstry/index.tsx @@ -1,34 +1,204 @@ import type { z } from "zod"; import type { sttnHeadListType } from "../coSttn/headList"; -import type { CommonTableProps } from "../../common/type/header"; -import { ruseHstryHeadListExport, ruseHstryNodeListExport } from "./headList"; +import type { + CommonTableProps, + TableUpperProps, +} from "../../common/type/header"; +import { ruseHstryHeadListExport } from "./headList"; +import { fetchType, getFetch, putFectch } from "@/components/lib/api"; +import type { DmdCoReqType } from "../coMatRvw/type"; +import toast from "react-hot-toast"; -const ruseHstryHeadList = ruseHstryHeadListExport; -const ruseHstryNodeList = ruseHstryNodeListExport; +const ruseHistHeadList = ruseHstryHeadListExport; export type ruseHstryState = { - ruseHstry: { + ruseHist: { isInit: boolean; - ruseHstryHeadList: z.infer<typeof sttnHeadListType>; - ruseHstryNodeList: CommonTableProps[]; - + rvwHistRes: DmdCoReqType[]; + ruseHistHeadList: TableUpperProps[]; }; }; export const ruseHstryStateExport: ruseHstryState = { - ruseHstry: { + ruseHist: { isInit: false, - ruseHstryHeadList: ruseHstryHeadList, - ruseHstryNodeList: ruseHstryNodeList, - } -} + rvwHistRes: [], + ruseHistHeadList: ruseHistHeadList, + }, +}; export type ruseHstryType = ruseHstryState & ruseHstryActions; type ruseHstryActions = { + ruseRvwHistInit: ( + pageNo: number, + pageCnt: number, + startYear: string, + endYear: string, + sggCd?: string + ) => void; + ruseRvwCalUpdate: (data: DmdCoReqType) => void; + ruseRvwSearch: ( + pageNo: number, + pageCnt: number, + startYear: string, + endYear: string, + sggCd: string, + dmdCoNm: string, + ruseUtztnFcltNm: string + + ) => void; + ruseRvwInqua: ( + pageNo: number, + pageCnt: number, + startYear: string, + endYear: string, + sggCd: string + ) => void; }; -export const ruseHstryActionsExport: (set: any) => ruseHstryActions = (set: any) => { - return { +const irvwHistInit = async ( + pageNo: number, + pageCnt: number, + startYear: string, + endYear: string, + sggCd?: string +) => { + let url = `/reuseFc/request/infoList/${pageNo}/${pageCnt}/${startYear}/${endYear}`; + + console.log("sggCd ", sggCd); + if (sggCd) { + url += `/${sggCd}`; } -} \ No newline at end of file + + const rvwHistRes = await getFetch(fetchType.WR, url); + + return rvwHistRes; +}; + +export const ruseHstryActionsExport: (set: any) => ruseHstryActions = ( + set: any +) => { + return { + ruseRvwHistInit: async ( + pageNo: number, + pageCnt: number, + startYear: string, + endYear: string, + sggCd?: string + ) => { + let url = `/reuseFc/request/infoList/${pageNo}/${pageCnt}/${startYear}/${endYear}`; + + if (sggCd) { + url += `/${sggCd}`; + } + const rvwHistRes = await irvwHistInit( + pageNo, + pageCnt, + startYear, + endYear, + sggCd + ); + + return set((state: ruseHstryState) => ({ + ...state, + ruseHist: { + ...state.ruseHist, + init: false, + rvwHistRes: rvwHistRes, + }, + })); + }, + ruseRvwCalUpdate: async (data: DmdCoReqType) => { + try { + const update = await putFectch( + `/reuseFc/request/cst`, + JSON.stringify(data) + ); + if (update.status === 200) { + toast.success("매칭 계산 저장이 완료입니다."); + const rvwHistRes = await irvwHistInit( + 1, + 10, + new Date().getFullYear().toString(), + new Date().getFullYear().toString(), + "11" + ); + return set((state: ruseHstryState) => ({ + ...state, + ruseHist: { + ...state.ruseHist, + init: false, + rvwHistRes: rvwHistRes, + }, + })); + } + } catch (e) { + toast.error("매칭 계산 저장이 오류입니다."); + console.log(e); + } + }, + ruseRvwSearch: async ( + pageNo: number, + pageCnt: number, + startYear: string, + endYear: string, + sggCd: string, + dmdCoNm: string, + ruseUtztnFcltNm: string + + ) => { + let url = `/reuseFc/request/infoList/${pageNo}/${pageCnt}/${startYear}/${endYear}`; + + if (sggCd.length > 0) { + url += `/${sggCd}`; + } else { + url += `/0`; + } + if (dmdCoNm?.length > 0) { + url += `/${dmdCoNm}`; + } else { + url += `/0`; + } + if (ruseUtztnFcltNm?.length > 0) { + url += `/${ruseUtztnFcltNm}`; + } else { + url += `/0`; + } + const rvwHistRes = await getFetch(fetchType.WR, url); + + return set((state: ruseHstryState) => ({ + ...state, + ruseHist: { + ...state.ruseHist, + rvwHistRes: rvwHistRes, + }, + })); + }, + ruseRvwInqua: async ( + pageNo: number, + pageCnt: number, + startYear: string, + endYear: string, + sggCd: string + ) => { + try { + let url = `/reuseFc/request/infoList/${pageNo}/${pageCnt}/${startYear}/${endYear}`; + if (sggCd.length > 0) { + url += `/${sggCd}`; + } + + const rvwHistRes = await getFetch(fetchType.WR, url); + return set((state: ruseHstryState) => ({ + ...state, + ruseHist: { + ...state.ruseHist, + rvwHistRes: rvwHistRes, + }, + })); + } catch (e) { + console.log(" error ", e); + } + }, + }; +}; diff --git a/apps/wr/components/ui/form/coMat/conCostForm/conCostForm.tsx b/apps/wr/components/ui/form/coMat/conCostForm/conCostForm.tsx new file mode 100644 index 000000000..1d5fa789c --- /dev/null +++ b/apps/wr/components/ui/form/coMat/conCostForm/conCostForm.tsx @@ -0,0 +1,377 @@ +import { useWrStore } from "@/app/store"; +import { usageProcData } from "@/app/store/matDmd/coMatRvw/headList"; +import type { + DedMatUpdateType, + DmdCoReqType, +} from "@/app/store/matDmd/coMatRvw/type"; +import { TEST_UUID } from "@/app/store/ruseFcltMng/fcltReg/rainReg"; +import { formH1Class } from "@/components/lib/class/comClass"; +import { CmpttnModal } from "@/components/ui/modal/coMat/cmpttnModal"; +import { CoMatModal } from "@/components/ui/modal/coMat/coMatModal"; +import { + Form, + FormField, + FormUi, + UiModal, + UiTable, +} from "@common/business_components/ui"; +import PopoverUi from "@common/business_components/ui/popover_ui"; +import { Button, Input, Label } from "@common/components/ui"; +import { useEffect, useState } from "react"; +import { type UseFormReturn } from "react-hook-form"; + +export default function ConCostForm({ + form, + type, +}: { + form: UseFormReturn<DmdCoReqType>; + type: string; +}) { + const { coMatRvwUpdate,ruseRvwCalUpdate } = useWrStore((state) => state); + + const [isTrfMo, setIsTrfMo] = useState<{ + isModal: boolean; + }>({ isModal: false }); + const [isCmpttnMo, setIsCmpttnMo] = useState<{ + isModal: boolean; + }>({ isModal: false }); + + + + const onSubmit = (value: DmdCoReqType) => { + + if (type === "mat") { + const data: DedMatUpdateType = { + dmdInfoSn: form.getValues("dmdInfoSn"), + usgPrcsProcs: form.getValues("demandCst.usgPrcsProcs"), + cstrnCst: form.getValues("demandCst.cstrnCst"), + fcltSbsdEpsTrf: form.getValues("demandCst.fcltSbsdEpsTrf"), + prcsFcltCpctCstrnCst: form.getValues("demandCst.prcsFcltCpctCstrnCst"), + rgtr: TEST_UUID, + }; + console.log("mat data ", data); + coMatRvwUpdate("11000SW001R1", form.getValues("dmdInfoFk"), data); + } else if (type === "hist") { + console.log("hist data ", value); + ruseRvwCalUpdate(value) + } + }; + + useEffect(() => { + console.log(" form ", form.formState.errors); + }, [form.formState]); + + return ( + <> + <hr className="mt-8" /> + <Form {...form}> + <h3 className="mt-4 ml-2 text-2xl font-medium text-label"> + 표준공사비 산정 + </h3> + <div className="flex items-center mx-3 mb-3"> + <h1 className="">처리시설 표준공사비 산정</h1> + + <Button size={"sm"} onClick={(e) => {}}> + 계산 + </Button> + <Button size={"sm"} onClick={form.handleSubmit(onSubmit)}> + 저장 + </Button> + </div> + <div className="col-span-12 w-full"> + <h1 className={formH1Class}>기본사항</h1> + </div> + <div className="grid grid-cols-12 gap-4 ml-4 mr-4"> + <div className="col-span-3 mt-4"> + <FormField + control={form.control} + name="useUsgCd" + render={({ field }) => ( + <FormUi label="용도"> + <Input + placeholder="" + type="text" + onChange={(e) => { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? ""} + /> + </FormUi> + )} + /> + </div> + <div className="col-span-3 mt-4"> + <FormField + control={form.control} + name="dmndQty" + render={({ field }) => ( + <FormUi label="요구수량(M3/d)"> + <Input + placeholder="" + type="number" + step="0.1" + onChange={(e) => { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + /> + </FormUi> + )} + /> + </div> + <div className="col-span-3 mt-4"> + <PopoverUi + childrenTriger={ + <> + <Label className="underline"> + 용도에 따른 처리공정 + <i className="diveicon di-search" /> + </Label> + </> + } + childrenBody={ + <> + <UiTable + className="" + headName={"용도에 따른 처리공정"} + tableData={usageProcData} + headlist={[ + { id: "usage", title: "용도" }, + { id: "process", title: "단위공정" }, + ]} + pageSize={0} + total={0} + cellClick={() => {}} + onPageChange={() => {}} + /> + </> + } + bodyClassName={"w-[25vw] max-w-none h-[54vh]"} + ></PopoverUi> + <FormField + control={form.control} + name="demandCst.usgPrcsProcs" + render={({ field }) => ( + <FormUi label=""> + <Input + placeholder="" + type="text" + onChange={field.onChange} + value={form.getValues("demandCst.usgPrcsProcs") ?? ""} + className="mt-2" + /> + </FormUi> + )} + /> + </div> + <div className="col-span-3 mt-4"> + <FormField + control={form.control} + name="dmndQty" + render={({ field }) => ( + <FormUi label="처리시설 용량(요구수량 * 365일)"> + <Input + placeholder="" + type="number" + step="0.001" + onChange={(e) => { + field.onChange(Number(e.target.value)); + }} + value={(Number(field.value) * 365)|| 0} + /> + </FormUi> + )} + /> + </div> + <div className="col-span-12 w-full"> + <h1 className={formH1Class}>공사비 입력사항</h1> + </div> + <div className="col-span-3 mt-4"> + <div className="flex items-center justify-between"> + <Label>처리시설용량에 따른 공사비(백만원)</Label> + <Button + size={"sm"} + onClick={(e) => setIsCmpttnMo({ isModal: true })} + className="bg-none" + > + 공사비 산정표 보기 + </Button> + </div> + <FormField + control={form.control} + name="demandCst.prcsFcltCpctCstrnCst" + render={({ field }) => ( + <FormUi label=""> + <Input + placeholder="" + type="number" + step="0.001" + onChange={(e) => { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + /> + </FormUi> + )} + /> + </div> + <div className="col-span-3 mt-4"> + <div className="flex items-center justify-between"> + <Label>시설부대경비 요율(%)</Label> + <Button + size={"sm"} + onClick={(e) => setIsTrfMo({ isModal: true })} + > + 요율표 보기 + </Button> + </div> + <FormField + control={form.control} + name="demandCst.fcltSbsdEpsTrf" + render={({ field }) => ( + <FormUi label=""> + <Input + placeholder="" + type="number" + step="0.01" + onChange={(e) => { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + /> + </FormUi> + )} + /> + </div> + <div className="col-span-3 mt-4"> + <PopoverUi + childrenTriger={ + <> + <Label className="underline"> + 총사업비 (백만원) <i className="diveicon di-search" /> + </Label> + </> + } + childrenBody={ + <> + <div className="!w-full "> + <div className=" items-center font-bold mb-1 !text-3xl"> + 총사업비 계산방법 + </div> + <div className=" items-center !text-2xl"> + 하수처리수 재이용시설 총 사업비 = + 공사비+시설부대경비{" "} + </div> + </div> + </> + } + bodyClassName={"w-[22vw]"} + ></PopoverUi> + <Input + placeholder="" + className="mt-2" + type="number" + step="0.01" + onChange={(e) => {}} + value={ + form.getValues("demandCst.prcsFcltCpctCstrnCst") + + form.getValues("demandCst.fcltSbsdEpsTrf") || 0 + } + /> + </div> + <div className="col-span-3 mt-4"> + <div className="flex items-center justify-between"> + <Label>공급처 선정</Label> + <Button size={"sm"} onClick={(e) => {}} className="bg-none"> + 후보지 조회 + </Button> + </div> + <FormField + control={form.control} + name="" + render={({ field }) => ( + <FormUi label=""> + <Input + placeholder="" + type="text" + onChange={(e) => { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? ""} + /> + </FormUi> + )} + /> + </div> + + <div className="col-span-4 mt-4"> + <div> + <FormField + control={form.control} + name="demandCst.cstrnCst" + render={({ field }) => ( + <FormUi label="공급관로 표준공사비(백만원)"> + <Input + placeholder="" + type="text" + step="0.001" + onChange={(e) => { + field.onChange(Number(e.target.value)); + }} + value={field.value ?? 0} + /> + </FormUi> + )} + /> + </div> + <div className="mt-4"> + <Label>관로 표준공사비 산정 프로그램</Label> + <Button size={"sm"} onClick={(e) => {}} className="bg-none"> + 다운로드 + </Button> + </div> + <div className="col-span-4 mt-4 mb-3"> + <FormField + control={form.control} + name="" + render={({ field }) => ( + <Label className="text-xl"> + 처리시설 + 공급관로 총사업비(백만원) + <FormUi label=""> + <Input + placeholder="" + type="number" + step="0.001" + onChange={(e) => { + field.onChange(Number(e.target.value)); + }} + readOnly={true} + value={field.value ?? 0} + /> + </FormUi> + </Label> + )} + /> + </div> + </div> + </div> + <UiModal + body={<CoMatModal data={[]}></CoMatModal>} + bodyClass="w-[40vw] max-w-none h-[70vh]" + open={isTrfMo.isModal} + onOpenChange={(open) => { + setIsTrfMo({ isModal: open }); + }} + /> + <UiModal + body={<CmpttnModal data={[]}></CmpttnModal>} + bodyClass="w-[70vw] max-w-none h-[50vh]" + open={isCmpttnMo.isModal} + onOpenChange={(open) => { + setIsCmpttnMo({ isModal: open }); + }} + /> + </Form> + </> + ); +} diff --git a/apps/wr/components/ui/popover/bizTotalMoneyPop/bizTotalMoneyPop.tsx b/apps/wr/components/ui/popover/bizTotalMoneyPop/bizTotalMoneyPop.tsx deleted file mode 100644 index 84fbd83a5..000000000 --- a/apps/wr/components/ui/popover/bizTotalMoneyPop/bizTotalMoneyPop.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { - Label, - Popover, - PopoverContent, - PopoverTrigger, -} from "@common/components"; - -export default function BizTotalMoneyPop({ - children, -}: { - children: React.ReactNode; -}) { - return ( - <> - <Popover> - <PopoverTrigger>{children}</PopoverTrigger> - <PopoverContent className="w-[22vw]"> - <div className="!w-full justify-center flex items-center"> - <div className=" items-center font-bold mb-1 !text-3xl">총사업비 계산방법</div> - <div className=" items-center !text-2xl"> - 하수처리수 재이용시설 총 사업비 = 공사비+시설부대경비{" "} - </div> - </div> - </PopoverContent> - </Popover> - </> - ); -} diff --git a/apps/wr/components/ui/popover/usagePorcPop/usageProcPop.tsx b/apps/wr/components/ui/popover/usagePorcPop/usageProcPop.tsx deleted file mode 100644 index c1483847a..000000000 --- a/apps/wr/components/ui/popover/usagePorcPop/usageProcPop.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import { usageProcData } from "@/app/store/matDmd/coMatRvw/headList"; -import { UiTable } from "@common/business_components/ui"; -import { Popover, PopoverContent, PopoverTrigger } from "@common/components"; -import { Children } from "react"; - -export default function UsageProcData({ children }: { children: React.ReactNode }) { - return ( - <> - <Popover> - <PopoverTrigger>{children}</PopoverTrigger> - - <PopoverContent className="w-[25vw] max-w-none h-[54vh]"> - <UiTable - className="" - headName={"용도에 따른 처리공정"} - tableData={usageProcData} - headlist={[ - { id: "usage", title: "용도" }, - { id: "process", title: "단위공정" }, - ]} - pageSize={0} - total={0} - cellClick={() => {}} - onPageChange={() => {}} - /> - </PopoverContent> - </Popover> - </> - ); -} From 4ee673204552110924d8c9652cb752d10310cf1b Mon Sep 17 00:00:00 2001 From: leedj312 <dlehd467@gmail.com> Date: Wed, 18 Jun 2025 20:33:15 +0900 Subject: [PATCH 4/7] =?UTF-8?q?=ED=8C=9D=EC=98=A4=EB=B2=84=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business_components/src/ui/index.ts | 3 ++- .../src/ui/popover_ui/index.tsx | 23 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 packages/common/business_components/src/ui/popover_ui/index.tsx diff --git a/packages/common/business_components/src/ui/index.ts b/packages/common/business_components/src/ui/index.ts index a1fa95f39..19d966a53 100644 --- a/packages/common/business_components/src/ui/index.ts +++ b/packages/common/business_components/src/ui/index.ts @@ -19,4 +19,5 @@ export * from "./tab"; export * from "./table"; export * from "./table_div"; export * from "./title"; -export * from "./sdmInsertForm"; \ No newline at end of file +export * from "./sdmInsertForm"; +export * from "./popover_ui" \ No newline at end of file diff --git a/packages/common/business_components/src/ui/popover_ui/index.tsx b/packages/common/business_components/src/ui/popover_ui/index.tsx new file mode 100644 index 000000000..39094bc24 --- /dev/null +++ b/packages/common/business_components/src/ui/popover_ui/index.tsx @@ -0,0 +1,23 @@ +import { Popover, PopoverContent, PopoverTrigger } from "@common/components/ui"; + +export default function PopoverUi({ + childrenTriger, + childrenBody, + bodyClassName + }: { + childrenTriger: React.ReactNode; + childrenBody: React.ReactNode; + bodyClassName:string + }) { + return ( + <> + <Popover> + <PopoverTrigger>{childrenTriger}</PopoverTrigger> + <PopoverContent className={bodyClassName}> + {childrenBody} + </PopoverContent> + </Popover> + </> + ); + } + \ No newline at end of file From 7f9e67fe417ba4c330f26611e1111bed1fcb95cb Mon Sep 17 00:00:00 2001 From: truthwing <truthplumage@gmail.com> Date: Thu, 19 Jun 2025 09:48:26 +0900 Subject: [PATCH 5/7] =?UTF-8?q?config=20webpack=20=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=ED=95=B4=EA=B2=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wr/next.config.ts | 60 ++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 34 deletions(-) diff --git a/apps/wr/next.config.ts b/apps/wr/next.config.ts index 99301dab6..d157358c9 100644 --- a/apps/wr/next.config.ts +++ b/apps/wr/next.config.ts @@ -1,40 +1,32 @@ import type { NextConfig } from "next"; -import webpack from "webpack"; + +const subDomain = + process.env.NEXT_PUBLIC_SUB_DOMAIN || "http://localhost:13001"; const nextConfig: NextConfig = { - eslint: { - ignoreDuringBuilds: true, - }, - webpack: (config) => { - config.plugins.push( - new webpack.DefinePlugin({ - "import.meta.env.VITE_PORT": JSON.stringify( - process.env.NEXT_PUBLIC_PORT - ), - "import.meta.env.VITE_PROXY_HOST": JSON.stringify( - process.env.NEXT_PUBLIC_PROXY_HOST - ), - "import.meta.env.VITE_SERVER_API_URL": JSON.stringify( - process.env.NEXT_PUBLIC_SERVER_API_URL - ), - "import.meta.env.VITE_SITE_ID": JSON.stringify(process.env.SITE_ID), - "import.meta.env.VITE_CLAIM_NAME": JSON.stringify( - process.env.NEXT_PUBLIC_CLAIM_NAME - ), - "import.meta.env.VITE_ACCESS_TOKEN": JSON.stringify( - process.env.NEXT_PUBLIC_ACCESS_TOKEN - ), - "import.meta.env.VITE_REFRESH_TOKEN": JSON.stringify( - process.env.NEXT_PUBLIC_REFRESH_TOKEN - ), - "import.meta.env.VITE_AUTH_USER_ID": JSON.stringify( - process.env.NEXT_PUBLIC_AUTH_USER_ID - ), - "process.env.SITE_ID": JSON.stringify(process.env.NEXT_PUBLIC_SITE_ID), - }) - ); - - return config; + async rewrites() { + return { + beforeFiles: [ + { + source: "/_next/static/:path*", + destination: `${subDomain}/_next/static/:path*`, + has: [ + { + type: "header", + key: "referer", + value: "(.*)/pst(.*)", + }, + ], + }, + ], + afterFiles: [ + { + source: "/pst/:path*", + destination: `${subDomain}/pst/:path*`, + }, + ], + fallback: [], + }; }, }; From 976a20c485db7d2b9c1efc6d02bcb20e19f7dfc5 Mon Sep 17 00:00:00 2001 From: truthwing <truthplumage@gmail.com> Date: Thu, 19 Jun 2025 09:50:10 +0900 Subject: [PATCH 6/7] =?UTF-8?q?=ED=83=80=EC=9E=85=EC=98=A4=EB=A5=98?= =?UTF-8?q?=EB=A1=9C=20=EC=9D=B8=ED=95=9C=20chartConfig=20=EC=88=98?= =?UTF-8?q?=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/business_components/src/ui/chart/DoughnutChart.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/common/business_components/src/ui/chart/DoughnutChart.tsx b/packages/common/business_components/src/ui/chart/DoughnutChart.tsx index d666f1d14..39dee3d9e 100644 --- a/packages/common/business_components/src/ui/chart/DoughnutChart.tsx +++ b/packages/common/business_components/src/ui/chart/DoughnutChart.tsx @@ -1,7 +1,7 @@ "use client" -import { Pie, PieChart } from "recharts"; import type { CSSProperties } from "react"; +import { Pie, PieChart } from "recharts"; import { Card, CardContent @@ -99,7 +99,7 @@ const CustomLegend = (props: LegendProps) => { }; export default function DoughnutChart(props: { - chartConfig: ChartConfig; + chartConfig: any; chartData: ChartDataItem[] | undefined; chartTitle: string }) { From c3ccf3870d8e4a561f471a3d98d2a68573e04f77 Mon Sep 17 00:00:00 2001 From: truthwing <truthplumage@gmail.com> Date: Thu, 19 Jun 2025 10:32:56 +0900 Subject: [PATCH 7/7] =?UTF-8?q?=EB=A9=94=EB=89=B4=20=EC=A0=95=EB=B3=B4=20o?= =?UTF-8?q?nclick=EC=9C=BC=EB=A1=9C=20=EC=88=98=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wr/app/page.tsx | 87 ++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 52 deletions(-) diff --git a/apps/wr/app/page.tsx b/apps/wr/app/page.tsx index 5e1cd2333..4c6c58faf 100644 --- a/apps/wr/app/page.tsx +++ b/apps/wr/app/page.tsx @@ -1,8 +1,9 @@ "use client"; -import Link from "next/link"; import { Button } from "@common/components/ui"; +import { useRouter } from "next/navigation"; export default function Home() { + const router = useRouter(); return ( <> <div className="flex flex-col gap-8 p-6"> @@ -11,27 +12,23 @@ export default function Home() { <h2 className="text-xl font-semibold mb-4">시설 등록</h2> <div className="grid grid-cols-12 gap-4"> <div className="col-span-2"> - <Button className="w-full"> - <Link href="ruseFcltMng/fcltReg/pbnstReg"> + <Button className="w-full" onClick={() => {router.push('/ruseFcltMng/fcltReg/pbnstReg')}}> 하수재이용 시설 등록 - </Link> </Button> </div> <div className="col-span-2"> - <Button className="w-full"> - <Link href="ruseFcltMng/fcltReg/rainReg"> + <Button className="w-full" onClick={() => {router.push('/ruseFcltMng/fcltReg/rainReg')}}> 빗물재이용 시설 등록 - </Link> </Button> </div> <div className="col-span-2"> - <Button className="w-full"> - <Link href="ruseFcltMng/fcltReg/rswtReg">중수도시설 등록</Link> + <Button className="w-full" onClick={() => {router.push('/ruseFcltMng/fcltReg/rswtReg')}}> + 중수도시설 등록 </Button> </div> <div className="col-span-2"> - <Button className="w-full"> - <Link href="ruseFcltMng/fcltReg/htdflReg">온배수 등록</Link> + <Button className="w-full" onClick={() => {router.push('/ruseFcltMng/fcltReg/htdflReg')}}> + 온배수시설 등록 </Button> </div> </div> @@ -42,29 +39,23 @@ export default function Home() { <h2 className="text-xl font-semibold mb-4">지도점검 결과</h2> <div className="grid grid-cols-12 gap-4"> <div className="col-span-2"> - <Button className="w-full"> - <Link href="ruseFcltMng/prfmncReg/pbnstPrfmncReg"> + <Button className="w-full" onClick={() => {router.push('/ruseFcltMng/prfmncReg/pbnstPrfmncReg')}}> 하수재이용실적 등록 - </Link> </Button> </div> <div className="col-span-2"> - <Button className="w-full"> - <Link href="ruseFcltMng/prfmncSttn/pbnstPrfmncSttn"> + <Button className="w-full" onClick={() => {router.push('/ruseFcltMng/prfmncSttn/pbnstPrfmncSttn')}}> 하수재이용실적 현황 - </Link> </Button> </div> <div className="col-span-2"> - <Button className="w-full"> - <Link href="ruseFcltMng/prfmncReg/chkgdnReg"> + <Button className="w-full" onClick={() => {router.push('/ruseFcltMng/prfmncReg/chkgdnReg')}}> 지도점검 결과 등록 - </Link> </Button> </div> <div className="col-span-2"> - <Button className="w-full"> - <Link href="ruseFcltMng/prfmncSttn/chkgdnSttn">지도점검 결과 현황</Link> + <Button className="w-full" onClick={() => {router.push('/ruseFcltMng/prfmncSttn/chkgdnSttn')}}> + 지도점검 결과 현황 </Button> </div> </div> @@ -75,31 +66,23 @@ export default function Home() { <h2 className="text-xl font-semibold mb-4">시설 현황</h2> <div className="grid grid-cols-12 gap-4"> <div className="col-span-2"> - <Button className="w-full"> - <Link href="ruseFcltMng/fcltSttn/pbnstSttn"> + <Button className="w-full" onClick={() => {router.push('/ruseFcltMng/fcltSttn/pbnstSttn')}}> 하수재이용시설현황 - </Link> </Button> </div> <div className="col-span-2"> - <Button className="w-full"> - <Link href="ruseFcltMng/fcltSttn/rainSttn"> + <Button className="w-full" onClick={() => {router.push('/ruseFcltMng/fcltSttn/rainSttn')}}> 빗물재이용시설현황 - </Link> </Button> </div> <div className="col-span-2"> - <Button className="w-full"> - <Link href="ruseFcltMng/fcltSttn/rswtSttn"> + <Button className="w-full" onClick={() => {router.push('/ruseFcltMng/fcltSttn/rswtSttn')}}> 중수도이용시설현황 - </Link> </Button> </div> <div className="col-span-2"> - <Button className="w-full"> - <Link href="ruseFcltMng/fcltSttn/htdflSttn"> + <Button className="w-full" onClick={() => {router.push('/ruseFcltMng/fcltSttn/htdflSttn')}}> 온배수현황 - </Link> </Button> </div> </div> @@ -111,18 +94,18 @@ export default function Home() { <div className="grid grid-cols-12 gap-4"> <div className="col-span-2"> - <Button className="w-full"> - <Link href="matMng/coMng/coSttn">수요처 관리</Link> + <Button className="w-full" onClick={() => {router.push('/matMng/coMng/coSttn')}}> + 수요처 관리 </Button> </div> <div className="col-span-2"> - <Button className="w-full"> - <Link href="matMng/coMng/ldrmntCoSttn">잠재수요처 관리</Link> + <Button className="w-full" onClick={() => {router.push('/matMng/coMng/ldrmntCoSttn')}}> + 잠재수요처 관리 </Button> </div> <div className="col-span-2"> - <Button className="w-full"> - <Link href="matMng/coMng/drgtSttn">우리동네가뭄</Link> + <Button className="w-full" onClick={() => {router.push('/matMng/coMng/drgtSttn')}}> + 우리동네가뭄 </Button> </div> </div> @@ -133,18 +116,18 @@ export default function Home() { <h2 className="text-xl font-semibold mb-4">수요처 매칭</h2> <div className="grid grid-cols-12 gap-4"> <div className="col-span-2"> - <Button className="w-full"> - <Link href="matMng/coMat/coMatRvw">수요처 매칭 검토</Link> + <Button className="w-full" onClick={() => {router.push('/matMng/coMat/coMatRvw')}}> + 수요처 매칭 검토 </Button> </div> <div className="col-span-2"> - <Button className="w-full"> - <Link href="matMng/coMat/ruseRvwHstry">재이용검토이력</Link> + <Button className="w-full" onClick={() => {router.push('/matMng/coMat/ruseRvwHstry')}}> + 재이용검토이력 </Button> </div> <div className="col-span-2"> - <Button className="w-full"> - <Link href="matMng/coMat/ruseCaseMng">물재이용사례 관리</Link> + <Button className="w-full" onClick={() => {router.push('/matMng/coMat/ruseCaseMng')}}> + 물재이용사례 관리 </Button> </div> </div> @@ -154,18 +137,18 @@ export default function Home() { <h2 className="text-xl font-semibold mb-4">통계 매칭</h2> <div className="grid grid-cols-12 gap-4"> <div className="col-span-2"> - <Button className="w-full"> - <Link href="stats/rainStat">빗물재이용시설통계</Link> + <Button className="w-full" onClick={() => {router.push('/stats/rainStat')}}> + 빗물재이용시설통계 </Button> </div> <div className="col-span-2"> - <Button className="w-full"> - <Link href="stats/rswtStat">중수도시설통계</Link> + <Button className="w-full" onClick={() => {router.push('/stats/rswtStat')}}> + 중수도시설통계 </Button> </div> <div className="col-span-2"> - <Button className="w-full"> - <Link href="stats/matStat">물재이용사례 관리</Link> + <Button className="w-full" onClick={() => {router.push('/stats/matStat')}}> + 물재이용사례 관리 </Button> </div> </div>