diff --git a/app/components/Landing.tsx b/app/components/Landing.tsx index 7daa895..983fd0d 100644 --- a/app/components/Landing.tsx +++ b/app/components/Landing.tsx @@ -11,12 +11,12 @@ import bgimg from "../../public/img/bg.png"; import Footer from "@/components/Footer"; // Import Swiper React components -import { Swiper, SwiperSlide } from "swiper/react"; +import { Swiper, SwiperSlide } from "swiper/react"; // Import Swiper styles import "swiper/css"; import "swiper/css/pagination"; // import required modules -import { Pagination } from "swiper/modules"; +import { Autoplay, Pagination, Navigation} from "swiper/modules"; import { sliderItems } from "@/constants"; export default function Landing() { @@ -26,9 +26,15 @@ export default function Landing() { diff --git a/components/FollowResult.tsx b/components/FollowResult.tsx index 686cf78..ca789fc 100644 --- a/components/FollowResult.tsx +++ b/components/FollowResult.tsx @@ -4,6 +4,7 @@ import Image from "next/image"; import Resultimg from "../public/img/followResult.png"; import Link from "next/link"; import { useRouter } from "next/navigation"; +import { ThreeDots } from "react-loader-spinner"; import { AlertDialog, @@ -38,10 +39,11 @@ export default function FollowResult() { onSuccess: (res) => { console.log(res); - alert("SuccessPrint"); + // alert("SuccessPrint"); + console.log("Success Folllow Result"); console.log(res); - setComplaintData(res) + setComplaintData(res); console.log(complaintData); }, onError: (error) => { @@ -58,8 +60,10 @@ export default function FollowResult() { }); } - function handlePrint() { + var prtContent = document.getElementById("details"); + // document.body.innerHTML= printContents; + // window.document.write(prtContent?.innerHTML); window.print(); } return ( @@ -67,7 +71,7 @@ export default function FollowResult() {

درخواست شما با کد رهگیری {`${trackingNumber}`}و @@ -102,10 +106,22 @@ export default function FollowResult() { - - {complaintPrintMutation.isSuccess && ( - <> - {" "} + + {complaintPrintMutation.isPending ? ( +

+ +
+ ) : ( +

{" "} موضوع شکایت:{" "} @@ -115,29 +131,27 @@ export default function FollowResult() {

{" "} - موضوع شکایت:{" "} + متن شکایت:{" "} - متن تستی + {`${complaintData?.contents[0]?.text}`}

+
+

{" "} - موضوع شکایت:{" "} - - متن تستی - -

-

- {" "} - موضوع شکایت: + جزئیات شکایت:


- درخواست شما با کد رهگیری 1243230783 و رمز عبور 12422 در - دست بررسی و اقدام می باشد. در صورت تمایل می توانید با - شماره تلفن 0353286545 جهت پشتیبانی تماس حاصل کنید.{" "} + درخواست شما با کد رهگیری + {`${trackingNumber}`} + و رمز عبور + {`${password}`} + در دست بررسی و اقدام می باشد. در صورت تمایل می توانید با + شماره تلفن 0353286545 جهت پشتیبانی تماس حاصل کنید.

- +
)} diff --git a/components/FollowUp.tsx b/components/FollowUp.tsx index bd7a0b1..f19ecc1 100644 --- a/components/FollowUp.tsx +++ b/components/FollowUp.tsx @@ -47,7 +47,8 @@ export default function FollowUp() { console.log(res); console.log(result); - alert("Success"); + // alert("Success"); + console.log("Success FollowUp"); // router.push("/FollowResult"); router.push("/FollowResult", {data: JSON.stringify( result ) }); diff --git a/components/RequestStep2.tsx b/components/RequestStep2.tsx index e8e914e..88f30c2 100644 --- a/components/RequestStep2.tsx +++ b/components/RequestStep2.tsx @@ -104,7 +104,8 @@ export default function RequestStep2() { localStorage.setItem("trackingNumber", res.trackingNumber); localStorage.setItem("password", res.password); - alert("Success"); + // alert("Success"); + console.log("Success Step2"); router.push("/RequestResult"); // router.push("/RequestResult", { data: trackingComplaint }); // return (res) @@ -273,7 +274,7 @@ export default function RequestStep2() { control={form.control} name="categoryId" render={({ field }) => ( - + انتخاب دسته بندی @@ -387,7 +388,7 @@ export default function RequestStep2() { render={({ field }) => ( - *کد کپچا + *کد امنیتی = 6" } }, + "node_modules/camelize": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.1.tgz", + "integrity": "sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/caniuse-lite": { "version": "1.0.30001564", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001564.tgz", @@ -2175,6 +2194,14 @@ "node": ">= 8" } }, + "node_modules/css-color-keywords": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz", + "integrity": "sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg==", + "engines": { + "node": ">=4" + } + }, "node_modules/css-in-js-utils": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/css-in-js-utils/-/css-in-js-utils-3.1.0.tgz", @@ -2183,6 +2210,16 @@ "hyphenate-style-name": "^1.0.3" } }, + "node_modules/css-to-react-native": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-3.2.0.tgz", + "integrity": "sha512-e8RKaLXMOFii+02mOlqwjbD00KSEKqblnpO9e++1aXS1fPQOpS1YoqdVHBqPjHNoxeF2mimzVqawm2KCbEdtHQ==", + "dependencies": { + "camelize": "^1.0.0", + "css-color-keywords": "^1.0.0", + "postcss-value-parser": "^4.0.2" + } + }, "node_modules/css-tree": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz", @@ -4752,6 +4789,27 @@ "react-dom": "^18.0.0" } }, + "node_modules/react-loader-spinner": { + "version": "6.1.6", + "resolved": "https://registry.npmjs.org/react-loader-spinner/-/react-loader-spinner-6.1.6.tgz", + "integrity": "sha512-x5h1Jcit7Qn03MuKlrWcMG9o12cp9SNDVHVJTNRi9TgtGPKcjKiXkou4NRfLAtXaFB3+Z8yZsVzONmPzhv2ErA==", + "dependencies": { + "react-is": "^18.2.0", + "styled-components": "^6.1.2" + }, + "engines": { + "node": ">= 12" + }, + "peerDependencies": { + "react": "^16.0.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/react-loader-spinner/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + }, "node_modules/react-otp-input": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/react-otp-input/-/react-otp-input-3.1.1.tgz", @@ -5119,6 +5177,11 @@ "node": ">=6.9" } }, + "node_modules/shallowequal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", + "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==" + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -5325,6 +5388,51 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/styled-components": { + "version": "6.1.6", + "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-6.1.6.tgz", + "integrity": "sha512-DgTLULSC29xpabJ24bbn1+hulU6vvGFQf4RPwBOJrm8WJFnN42yXpo5voBt3jDSJBa5tBd1L6PqswJjQ0wRKdg==", + "dependencies": { + "@emotion/is-prop-valid": "1.2.1", + "@emotion/unitless": "0.8.0", + "@types/stylis": "4.2.0", + "css-to-react-native": "3.2.0", + "csstype": "3.1.2", + "postcss": "8.4.31", + "shallowequal": "1.1.0", + "stylis": "4.3.1", + "tslib": "2.5.0" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/styled-components" + }, + "peerDependencies": { + "react": ">= 16.8.0", + "react-dom": ">= 16.8.0" + } + }, + "node_modules/styled-components/node_modules/@emotion/is-prop-valid": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.1.tgz", + "integrity": "sha512-61Mf7Ufx4aDxx1xlDeOm8aFFigGHE4z+0sKCa+IHCeZKiyP9RLD0Mmx7m8b9/Cf37f7NAvQOOJAbQQGVr5uERw==", + "dependencies": { + "@emotion/memoize": "^0.8.1" + } + }, + "node_modules/styled-components/node_modules/@emotion/memoize": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz", + "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==" + }, + "node_modules/styled-components/node_modules/tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" + }, "node_modules/styled-jsx": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.1.tgz", @@ -5348,9 +5456,9 @@ } }, "node_modules/stylis": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.0.tgz", - "integrity": "sha512-E87pIogpwUsUwXw7dNyU4QDjdgVMy52m+XEOPEKUn161cCzWjjhPSQhByfd1CcNvrOLnXQ6OnnZDwnJrz/Z4YQ==" + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.1.tgz", + "integrity": "sha512-EQepAV+wMsIaGVGX1RECzgrcqRRU/0sYOHkeLsZ3fzHaHXZy4DaOOX0vOlGQdlsjkh3mFHAIlVimpwAs4dslyQ==" }, "node_modules/sucrase": { "version": "3.34.0", diff --git a/package.json b/package.json index c9625a3..f86bd4c 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "react-hook-form": "^7.48.2", "react-icons": "^4.12.0", "react-leaflet": "^4.2.1", + "react-loader-spinner": "^6.1.6", "react-otp-input": "^3.1.1", "react-use": "^17.4.2", "swiper": "^11.0.5",