From cd27c5f5c12676a623df802fc9b8a1dad7e3dc34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment?= Date: Wed, 6 Nov 2024 17:02:37 +0100 Subject: [PATCH] fix: not delivred order state --- .../images/dashboard/offer-pdf-pending.png | Bin 0 -> 16302 bytes webapp/src/components/ui/Typewriter.tsx | 62 ++++ webapp/src/pages/dashboard/order/[id].tsx | 271 +++++++++--------- 3 files changed, 200 insertions(+), 133 deletions(-) create mode 100644 webapp/public/images/dashboard/offer-pdf-pending.png create mode 100644 webapp/src/components/ui/Typewriter.tsx diff --git a/webapp/public/images/dashboard/offer-pdf-pending.png b/webapp/public/images/dashboard/offer-pdf-pending.png new file mode 100644 index 0000000000000000000000000000000000000000..eaa54bb5caf20c0b4f87bd5fa4aeaaf08f607b71 GIT binary patch literal 16302 zcmeIZ`9GBF{|By4#Suy++n~u&86gqITAU18$(V{E2?>M2m?E5PEsU{@lA;<)mXUoK zYsw5+vSrUQW6z%Ke6M?We;?n!;QQ0(haTd-uIqkXul4y_?k86-qxgBnc)7T^_>Bzz zHRa;krOw5*)0Jlr_)EeCn-%cmZ#Tmm9$Z{|4?_QTaJ_sb0{*ze!xW{*MQebKfnRnx zoV#?6iz_Q)@0!hSE-qbtqkqqt5qC`X)_2KuJ{10ixNkiz&X^*o2^+y~-693J?NV0` zaobfP>bA$op06rQ^c0Iv@4<1Rf%c~h1x;LGrVm^CPUOoezmiiARY2zOS3~d0UrQuDtt;i>u#RakEUU zblQ5uU8tdLWPa66zVr%%HNV{Dw&d(*skPbZP~QD;V|h{Iu2Elag<7BQJau!`Uv2X? zebVYt_&|gPxEk)AfO4(JY+mM0(&-+<#UVFoY~r3Htj3@K7Pszx{C85?PEuys$}pqq z`)19zfe1}#Pb#09-a_@Cp-sdGmZJ>Aa-sT^I4(>-eEHNrmYajmrptq1ebaAtOBL@; zy2TnQUzYL)yGowycaE8q8E~mpH@zE4nok^X(<#3^Es6>L(!M$G@3(Lum9O`?wcn4*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Ev}EYnn612hbIj_kd3}Wi~B36{P*6kHO$U z1{Qk7>@UKN=WnzrCDa3mx~vQ)+9e2_ ze32-ixT(69Q#IS~f8Qf{bED6{Y%fwTWxvI>m4_AIrARGe9V=Igtu~&VGgxU60%J9K zy-gRt85=${md4A*)Lo&nvf0D}=~glV*!o1FjhbAPlMz7Fl=Y{1C+Ozqx%u;poZ{pdro z?(;6Q!Nm}dkMif^p*^g$G_{>Vu%5cU&DHX9pYR`I*Rny<95NG-bnrrS4aV?en!DR5M?$X8v_Gjz?3(W0RW00S*Jat^J z-$0yvspElXocfsySul&ZT<|mT;qs8T|II{UH#ZL@_L6h1j;hr2bByoc!(VP;Fwv^_ z)YDQ|*`JWU2EmtzfuTg=<{xnURAK{GIWQ12pOd)mwfN22ue3YH6lW%@mJ$>u?-}#O zDZX=3cGg#|_^<_L&Y83%R<71KCXyKe^y7`A?(*7v-!d!tnZ4W0y^WcD{+WB>Uo!m` z9CJ-%8XGz;l}^?ci6cvxbC%(=e`0!He|1`Mj_dpzGPthAx#`t;8o09Td1zwG_f-}i5|jiqmjtJX03 zmEGK#3PG^9 ztI;01)bqh=^HowCufgY@WojB2@0hy0lrXgqe98j`sU44}gGIr%N#1zV{O-+7DgQs6 z%L4{)9tEl`aQn}A6Lx(0a0Pr_i+pD2a>7otc5U7LmSfT3d|?RQseIVnSH3>^r?G5p zj;=eYaHPM#etl!wzi6*a*~UuzRMe@XyCps@B=PCYxeFKsK_GTBN z)p?I+ifKckw;+4@tNr}smGbpJKDwp(#;g~c+zwfhL~_Q|2q2Kl==|k>X?nLF{Xc13 B2u}b2 literal 0 HcmV?d00001 diff --git a/webapp/src/components/ui/Typewriter.tsx b/webapp/src/components/ui/Typewriter.tsx new file mode 100644 index 00000000..0fb77c68 --- /dev/null +++ b/webapp/src/components/ui/Typewriter.tsx @@ -0,0 +1,62 @@ +import { motion, Variants } from "framer-motion"; +import { HTMLMotionProps } from "framer-motion"; +import React, { useState } from "react"; +import { useInterval } from "usehooks-ts"; + +export const sentenceVariants: Variants = { + hidden: { + opacity: 0, + }, + visible: { + opacity: 1, + transition: { + staggerChildren: 0.5, + // duration: 1, + repeat: Infinity, + repeatType: "reverse", + repeatDelay: 2, + }, + }, +}; + +export const letterVariants: Variants = { + hidden: { + opacity: 0, + }, + visible: { + opacity: 1, + transition: { + opacity: { + duration: 0, + }, + }, + }, +}; + +interface TypewriterProps extends Omit, "children"> { + text: string; +} + +export const Typewriter: React.FC = ({ text, ...rest }) => { + const [count, setCount] = useState(0); + + useInterval(() => { + setCount(count + 1); + }, 2000); + + return ( + + {text.split("").map((char, i) => ( + + {char} + + ))} + + ); +}; diff --git a/webapp/src/pages/dashboard/order/[id].tsx b/webapp/src/pages/dashboard/order/[id].tsx index e6def602..d231fdaa 100644 --- a/webapp/src/pages/dashboard/order/[id].tsx +++ b/webapp/src/pages/dashboard/order/[id].tsx @@ -10,12 +10,19 @@ import { } from "@chakra-ui/react"; import { useRouter } from "next/router"; import { useEffect, useMemo, useState } from "react"; -import { HiEye, HiMinus, HiPlus } from "react-icons/hi2"; +import { + HiCheckCircle, + HiClock, + HiEye, + HiMinus, + HiPlus, +} from "react-icons/hi2"; import { MdOutlineFileDownload } from "react-icons/md"; import { BarcodeIcon } from "~/components/icons/barcode"; import LoadingLoader from "~/components/LoadingLoader"; import BackButton from "~/components/ui/BackButton"; import Image from "~/components/ui/Image"; +import { Typewriter } from "~/components/ui/Typewriter"; import { api } from "~/utils/api"; import { formatDateToDDMMYYYY } from "~/utils/tools"; @@ -66,7 +73,7 @@ export default function OrderObizPage() { ); } - if (!order) { + if (!order || !order.articles) { router.replace("/dashboard"); return; } @@ -91,55 +98,146 @@ export default function OrderObizPage() { const getOrderContent = () => { if (!order.articles) return; - if ( - order.status !== "delivered" && - !isLoadingSyncOrder && - !isRefetchingOrder - ) { + if (order.status !== "delivered") { return ( - - - Vos billets sont en cours d'approvisionnement, veuillez revenir dans - quelques minutes. - + + + + {`En + + + + Vos bons
arrivent bientôt + +
+
+
+ + + + + Votre paiement a bien été enregistré + + + + + + Les bons peuvent prendre 24h à être activés +
); } - if (isLoadingSyncOrder) { - return ( + return ( + <> + + + {`Image + + + {`Logo + + + + + + + Afficher + + + + + + Télécharger + + + + + ); + }; + + return ( + + + - - - Nous récupérons vos billets chez notre partenaire - - - Veuillez patienter ou revenir dans quelques secondes... + + + {`Logo + + + {order.offer.partner.name} - + + Bon d'achat + - ); - } - - return ( - <> {amount}€ - - - {`Image - - - {`Logo - - - - - - - Afficher - - - - - - Télécharger - - - + {getOrderContent()} @@ -248,53 +300,6 @@ export default function OrderObizPage() { - - ); - }; - - return ( - - - - - - - {`Logo - - - {order.offer.partner.name} - - - - Bon d'achat - - - {getOrderContent()} );