From ab5d37762590b3da49c5496f0d8835ee8f36a722 Mon Sep 17 00:00:00 2001 From: Guilherme Baufaker Date: Mon, 22 Apr 2024 14:50:45 -0300 Subject: [PATCH] created login for admin, dashboard to display orders --- actions/adminGetOrders.ts | 81 ++++++ actions/cognitoAdminSignIn.ts | 30 ++ actions/getUserOrders.ts | 3 + components/ui/AdminOrders.tsx | 222 +++++++++++++++ components/ui/PrivatePageControlAdmin.tsx | 60 ++++ components/ui/SignInAdmin.tsx | 18 ++ components/ui/SignInFormAdmin.tsx | 96 +++++++ fresh.gen.ts | 6 + islands/AdminOrders.tsx | 9 + islands/PrivatePageControlAdmin.tsx | 8 + islands/SignInFormAdmin.tsx | 8 + manifest.gen.ts | 263 +++++++++--------- sections/Miscellaneous/AdminOrders.tsx | 1 + .../Miscellaneous/PrivatePageControlAdmin.tsx | 1 + sections/Miscellaneous/SignInAdmin.tsx | 1 + 15 files changed, 681 insertions(+), 126 deletions(-) create mode 100644 actions/adminGetOrders.ts create mode 100644 actions/cognitoAdminSignIn.ts create mode 100644 components/ui/AdminOrders.tsx create mode 100644 components/ui/PrivatePageControlAdmin.tsx create mode 100644 components/ui/SignInAdmin.tsx create mode 100644 components/ui/SignInFormAdmin.tsx create mode 100644 islands/AdminOrders.tsx create mode 100644 islands/PrivatePageControlAdmin.tsx create mode 100644 islands/SignInFormAdmin.tsx create mode 100644 sections/Miscellaneous/AdminOrders.tsx create mode 100644 sections/Miscellaneous/PrivatePageControlAdmin.tsx create mode 100644 sections/Miscellaneous/SignInAdmin.tsx diff --git a/actions/adminGetOrders.ts b/actions/adminGetOrders.ts new file mode 100644 index 0000000..b7236a2 --- /dev/null +++ b/actions/adminGetOrders.ts @@ -0,0 +1,81 @@ +import { Product } from "deco-sites/ecannadeco/components/ui/CheckoutUpsellModal.tsx"; + +export interface Props { + token: string; + params?: { + status?: string; + page: number; + limit: number; + }; +} + +export interface Sku { + _id: string; + name: string; + product: string | Product; +} + +export interface Order { + _id: string; + value: number; + type: string; + status: + | "PAID" + | "PENDING" + | "CANCELED" + | "IN_PRODUCTION" + | "PENDING_SHIPPING" + | "SHIPPED" + | "DELIVERED"; + subscription: string; + payment: string; + created_at: string; + updated_at: string; + items: { + sku: Sku; + quantity: number; + }[]; +} + +export interface PaginationOrderResponse { + docs: Order[]; + totalDocs: number; + totalPages: number; + page: number; + limit?: number; + pagingCounter?: number; + hasPrevPage: boolean; + hasNextPage: boolean; +} + +const adminGetOrders = async ( + { token, params }: Props, + _req: Request, +): Promise => { + let url = `http://localhost:3000/admin/orders/`; + + if (params) { + const query = `?limit=${params.limit}&page=${params.page}${ + params.status && `&status=${params.status}` + }`; + url = `http://localhost:3000/admin/orders${query}`; + } + + try { + const response = await fetch(url, { + method: "GET", + headers: { + "Content-Type": "application/json", + Authorization: token, + }, + }); + + const res = await response.json(); + return res; + } catch (e) { + // console.log({ e }); + return e; + } +}; + +export default adminGetOrders; diff --git a/actions/cognitoAdminSignIn.ts b/actions/cognitoAdminSignIn.ts new file mode 100644 index 0000000..71cd906 --- /dev/null +++ b/actions/cognitoAdminSignIn.ts @@ -0,0 +1,30 @@ +export interface Props { + email: string; + password: string; +} + +const signInCognito = async ( + props: Props, + _req: Request, +): Promise => { + try { + const response = await fetch("http://localhost:3000/admin/sign-in", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + email: props.email, + password: props.password, + }), + }); + + const res = await response.json(); + return res; + } catch (e) { + // console.log({ e }); + return e; + } +}; + +export default signInCognito; diff --git a/actions/getUserOrders.ts b/actions/getUserOrders.ts index 455d3a8..2f77f62 100644 --- a/actions/getUserOrders.ts +++ b/actions/getUserOrders.ts @@ -30,6 +30,9 @@ export interface Order { sku: Sku; quantity: number; }[]; + user_data?: { + email: string; + }; } export interface PaginationOrderResponse { diff --git a/components/ui/AdminOrders.tsx b/components/ui/AdminOrders.tsx new file mode 100644 index 0000000..64dffca --- /dev/null +++ b/components/ui/AdminOrders.tsx @@ -0,0 +1,222 @@ +/** + * This component was made to control if user is logged in to access pages + */ +// import type { SectionProps } from "deco/types.ts"; +// import { useUI } from "../../sdk/useUI.ts"; +import { useEffect, useState } from "preact/hooks"; +import { invoke } from "../../runtime.ts"; +import PageWrap from "./PageWrap.tsx"; +import OrderStatus from "./OrderStatus.tsx"; +import Icon from "deco-sites/ecannadeco/components/ui/Icon.tsx"; +import { format } from "datetime"; + +import type { + Order, + PaginationOrderResponse, +} from "../../actions/getUserOrders.ts"; +import Slider from "./Slider.tsx"; +import { useUI } from "../../sdk/useUI.ts"; +import SliderJS from "../../islands/SliderJS.tsx"; + +const OrderItem = ( + { productName, userEmail, productPrice, created_at, status }: { + userEmail: string; + productName: string; + productPrice: string; + created_at: string; + status: + | "PAID" + | "PENDING" + | "CANCELED" + | "IN_PRODUCTION" + | "PENDING_SHIPPING" + | "SHIPPED" + | "DELIVERED"; + }, +) => { + return ( +
  • +
    + {userEmail} +
    +
    + {productName} + {"RS " + productPrice} +
    +
    + + {created_at} + +
    +
    + +
    +
  • + ); +}; + +function AdminOrders() { + const [isLoading, setIsLoading] = useState(true); + const [orders, setOrders] = useState(); + const [limit, setLimit] = useState(); + const [hasNextPage, setHasNextPage] = useState(false); + const [hasPrevPage, setHasPrevPage] = useState(false); + const [page, setPage] = useState(); + const [totalPages, setTotalPages] = useState(); + const [statusSearch, setStatusSearch] = useState(""); + + useEffect(() => { + setIsLoading(true); + + try { + invoke["deco-sites/ecannadeco"].actions.adminGetOrders({ + token: localStorage.getItem("AdminAccessToken") || "", + }).then((r) => { + setPage(r.page); + setTotalPages(r.totalPages); + setLimit(r.limit); + setHasNextPage(r.hasNextPage); + setHasPrevPage(r.hasPrevPage); + setOrders(r.docs); + + console.log({ r }); + + setIsLoading(false); + }); + } catch (e) { + setIsLoading(false); + alert( + "Não foi possível recuperar Pedidos..", + ); + } + }, []); // Passando um array de dependências vazio + + const handleGetOrders = (pageParam: number, status?: string) => { + const accessToken = localStorage.getItem("AdminAccessToken") || ""; + setIsLoading(true); + + try { + invoke["deco-sites/ecannadeco"].actions.adminGetOrders({ + token: accessToken, + params: { + status: status, + page: pageParam, + limit: limit || 25, + }, + }).then((r) => { + const res = r as { message?: string; errors?: Array }; + if (res.message) { + throw new Error(res.message); + } + setPage(r.page); + setTotalPages(r.totalPages); + setLimit(r.limit); + setHasNextPage(r.hasNextPage); + setHasPrevPage(r.hasPrevPage); + console.log({ docs: r.docs }); + setOrders(r.docs); + setIsLoading(false); + }); + } catch (e) { + alert( + "Não foi possível carregar usuários. Tente novamente mais tarde ou contecte o suporte.", + ); + setIsLoading(false); + } + }; + + return ( + + {isLoading + ? + : ( +
    +
    +

    + Pedidos Do Sistema +

    +
    +
    + +
    +
    +
    +
    + Paciente +
    +
    + Produto +
    +
    + + Data + +
    +
    + Status +
    +
    +
      + {orders && orders.map((o) => { + return ( + + ); + })} +
    + {/* pagination */} +
    +
    + {hasPrevPage && ( + handleGetOrders(page! - 1)} + id="ChevronLeft" + size={19} + /> + )} +
    +
    + + {`Página ${page}/${totalPages}`} + +
    +
    + {hasNextPage && ( + handleGetOrders(page! + 1)} + id="ChevronRight" + size={19} + /> + )} +
    +
    +
    +
    + )} +
    + ); +} + +export default AdminOrders; diff --git a/components/ui/PrivatePageControlAdmin.tsx b/components/ui/PrivatePageControlAdmin.tsx new file mode 100644 index 0000000..7085925 --- /dev/null +++ b/components/ui/PrivatePageControlAdmin.tsx @@ -0,0 +1,60 @@ +/** + * This component was made to control if user is logged in to access pages + */ +// import type { SectionProps } from "deco/types.ts"; +import { useUI } from "../../sdk/useUI.ts"; +import { useEffect, useState } from "preact/hooks"; + +export interface Props { + redirectTo?: string; +} + +function PrivatePageControl(props: Props) { + const { updatedData, uploadedFile, user } = useUI(); + + async function isLogged({ accessToken }: { accessToken: string }) { + if (accessToken === "") { + window.location.href = "/"; + } + + try { + const response = await fetch("http://localhost:3000/v1/admin/me", { + method: "GET", + headers: { + "content-type": "application/json", + accept: "application/json", + Authorization: accessToken, + }, + }); + + console.log({ accessToken }); + + const r = await response.json(); + + console.log({ responseGetMeAdmin: r }); + + const username = r.data.Username; + + if (!username) { + user.value = null; + localStorage.setItem("AdminAccessToken", ""); + window.location.href = "/"; + } + } catch (error) { + console.error("Erro ao carregar dados:", error); + localStorage.setItem("AdminAccessToken", ""); + window.location.href = "/"; + } + } + + useEffect(() => { + // Pega accessCode no localStorage para verificar se ainda está válida a sessão via api + const accessToken = localStorage.getItem("AdminAccessToken") || ""; + + isLogged({ accessToken }); + }, []); // Passando um array de dependências vazio + + return <>; +} + +export default PrivatePageControl; diff --git a/components/ui/SignInAdmin.tsx b/components/ui/SignInAdmin.tsx new file mode 100644 index 0000000..f0c56b2 --- /dev/null +++ b/components/ui/SignInAdmin.tsx @@ -0,0 +1,18 @@ +import SignInFormAdmin from "deco-sites/ecannadeco/islands/SignInFormAdmin.tsx"; +import FormWrap from "../../components/ui/FormWrap.tsx"; + +export interface Props { + formTitle: string; +} + +function SignIn( + { formTitle }: Props, +) { + return ( + + + + ); +} + +export default SignIn; diff --git a/components/ui/SignInFormAdmin.tsx b/components/ui/SignInFormAdmin.tsx new file mode 100644 index 0000000..bc73306 --- /dev/null +++ b/components/ui/SignInFormAdmin.tsx @@ -0,0 +1,96 @@ +import { invoke } from "../../runtime.ts"; +import { useState } from "preact/hooks"; + +export interface Props { + formTitle?: string; +} + +interface SignInResponse { + AuthenticationResult: { + AccessToken: string; + }; +} + +function SignInFormAdmin({ formTitle }: Props) { + const [password, setPassword] = useState(""); + const [email, setEmail] = useState(""); + const [loading, setLoading] = useState(false); + + const handleSubmit = async (e: Event) => { + e.preventDefault(); + setLoading(true); + try { + const data = await invoke["deco-sites/ecannadeco"].actions + .cognitoAdminSignIn( + { email, password }, + ) as SignInResponse; + console.log({ data }); + localStorage.setItem( + "AdminAccessToken", + data.AuthenticationResult.AccessToken, + ); + setLoading(false); + window.location.href = "/sys/admin/orders"; + setEmail(""); + setPassword(""); + } catch (e) { + alert( + "Usuário ou senha incorretos", + ); + console.log({ e }); + setLoading(false); + } + }; + + return ( +
    +
    handleSubmit(e)} + > + + {formTitle} + +
    + + +
    + +
    +
    + ); +} + +export default SignInFormAdmin; diff --git a/fresh.gen.ts b/fresh.gen.ts index 0ebb242..1c57811 100644 --- a/fresh.gen.ts +++ b/fresh.gen.ts @@ -10,6 +10,7 @@ import * as $AddToCartButton_vnda from "./islands/AddToCartButton/vnda.tsx"; import * as $AddToCartButton_vtex from "./islands/AddToCartButton/vtex.tsx"; import * as $AddToCartButton_wake from "./islands/AddToCartButton/wake.tsx"; import * as $AdminNewDocModal from "./islands/AdminNewDocModal.tsx"; +import * as $AdminOrders from "./islands/AdminOrders.tsx"; import * as $AssociationAdmin from "./islands/AssociationAdmin.tsx"; import * as $CheckoutForm from "./islands/CheckoutForm.tsx"; import * as $CheckoutUpsellModal from "./islands/CheckoutUpsellModal.tsx"; @@ -36,12 +37,14 @@ import * as $Newsletter from "./islands/Newsletter.tsx"; import * as $OutOfStock from "./islands/OutOfStock.tsx"; import * as $PreSignupUsersModal from "./islands/PreSignupUsersModal.tsx"; import * as $PrivatePageControl from "./islands/PrivatePageControl.tsx"; +import * as $PrivatePageControlAdmin from "./islands/PrivatePageControlAdmin.tsx"; import * as $ProductImageZoom from "./islands/ProductImageZoom.tsx"; import * as $PublicPageControl from "./islands/PublicPageControl.tsx"; import * as $SearchControls from "./islands/SearchControls.tsx"; import * as $ShippingSimulation from "./islands/ShippingSimulation.tsx"; import * as $ShowMore from "./islands/ShowMore.tsx"; import * as $SignInForm from "./islands/SignInForm.tsx"; +import * as $SignInFormAdmin from "./islands/SignInFormAdmin.tsx"; import * as $SignUpForm from "./islands/SignUpForm.tsx"; import * as $Signout from "./islands/Signout.tsx"; import * as $SliderJS from "./islands/SliderJS.tsx"; @@ -63,6 +66,7 @@ const manifest = { "./islands/AddToCartButton/vtex.tsx": $AddToCartButton_vtex, "./islands/AddToCartButton/wake.tsx": $AddToCartButton_wake, "./islands/AdminNewDocModal.tsx": $AdminNewDocModal, + "./islands/AdminOrders.tsx": $AdminOrders, "./islands/AssociationAdmin.tsx": $AssociationAdmin, "./islands/CheckoutForm.tsx": $CheckoutForm, "./islands/CheckoutUpsellModal.tsx": $CheckoutUpsellModal, @@ -89,12 +93,14 @@ const manifest = { "./islands/OutOfStock.tsx": $OutOfStock, "./islands/PreSignupUsersModal.tsx": $PreSignupUsersModal, "./islands/PrivatePageControl.tsx": $PrivatePageControl, + "./islands/PrivatePageControlAdmin.tsx": $PrivatePageControlAdmin, "./islands/ProductImageZoom.tsx": $ProductImageZoom, "./islands/PublicPageControl.tsx": $PublicPageControl, "./islands/SearchControls.tsx": $SearchControls, "./islands/ShippingSimulation.tsx": $ShippingSimulation, "./islands/ShowMore.tsx": $ShowMore, "./islands/SignInForm.tsx": $SignInForm, + "./islands/SignInFormAdmin.tsx": $SignInFormAdmin, "./islands/SignUpForm.tsx": $SignUpForm, "./islands/Signout.tsx": $Signout, "./islands/SliderJS.tsx": $SliderJS, diff --git a/islands/AdminOrders.tsx b/islands/AdminOrders.tsx new file mode 100644 index 0000000..96b47aa --- /dev/null +++ b/islands/AdminOrders.tsx @@ -0,0 +1,9 @@ +import Component from "deco-sites/ecannadeco/components/ui/AdminOrders.tsx"; +// import type { Props } from "$store/components/ui/MyDocs.tsx"; + +function Island() { + return ; + // return ; +} + +export default Island; diff --git a/islands/PrivatePageControlAdmin.tsx b/islands/PrivatePageControlAdmin.tsx new file mode 100644 index 0000000..c8db8a3 --- /dev/null +++ b/islands/PrivatePageControlAdmin.tsx @@ -0,0 +1,8 @@ +import Component from "deco-sites/ecannadeco/components/ui/PrivatePageControlAdmin.tsx"; +import type { Props } from "deco-sites/ecannadeco/components/ui/PrivatePageControlAdmin.tsx"; + +function Island(props: Props) { + return ; +} + +export default Island; diff --git a/islands/SignInFormAdmin.tsx b/islands/SignInFormAdmin.tsx new file mode 100644 index 0000000..0746f66 --- /dev/null +++ b/islands/SignInFormAdmin.tsx @@ -0,0 +1,8 @@ +import Component from "deco-sites/ecannadeco/components/ui/SignInFormAdmin.tsx"; +import type { Props } from "deco-sites/ecannadeco/components/ui/SignInFormAdmin.tsx"; + +function Island(props: Props) { + return ; +} + +export default Island; diff --git a/manifest.gen.ts b/manifest.gen.ts index ea25e40..11ab10c 100644 --- a/manifest.gen.ts +++ b/manifest.gen.ts @@ -4,32 +4,34 @@ import * as $$$$$$$$$0 from "./actions/adminGetAssociation.ts"; import * as $$$$$$$$$1 from "./actions/adminGetAssociationUsers.ts"; -import * as $$$$$$$$$2 from "./actions/adminUpdateAssociation.ts"; -import * as $$$$$$$$$3 from "./actions/changePassword.ts"; -import * as $$$$$$$$$4 from "./actions/changeSubscription.ts"; -import * as $$$$$$$$$5 from "./actions/checkout.ts"; -import * as $$$$$$$$$6 from "./actions/checkoutv2.ts"; -import * as $$$$$$$$$7 from "./actions/cognitoSignIn.ts"; -import * as $$$$$$$$$8 from "./actions/cognitoSignUp.ts"; -import * as $$$$$$$$$9 from "./actions/confirmCognitoSignup.ts"; -import * as $$$$$$$$$10 from "./actions/confirmForgotPassword.ts"; -import * as $$$$$$$$$11 from "./actions/createTicket.ts"; -import * as $$$$$$$$$12 from "./actions/deleteAssociationDocument.ts"; -import * as $$$$$$$$$13 from "./actions/deleteDocument.ts"; -import * as $$$$$$$$$14 from "./actions/forgotPassword.ts"; -import * as $$$$$$$$$15 from "./actions/getAssociation.ts"; -import * as $$$$$$$$$16 from "./actions/getAssociationDocs.ts"; -import * as $$$$$$$$$17 from "./actions/getCardProduct.ts"; -import * as $$$$$$$$$18 from "./actions/getCids.ts"; -import * as $$$$$$$$$19 from "./actions/getDocs.ts"; -import * as $$$$$$$$$20 from "./actions/getPlans.ts"; -import * as $$$$$$$$$21 from "./actions/getProfile.ts"; -import * as $$$$$$$$$22 from "./actions/getUser.ts"; -import * as $$$$$$$$$23 from "./actions/getUserOrders.ts"; -import * as $$$$$$$$$24 from "./actions/resendConfirmationCode.ts"; -import * as $$$$$$$$$25 from "./actions/updateProfile.ts"; -import * as $$$$$$$$$26 from "./actions/updateUserData.ts"; -import * as $$$$$$$$$27 from "./actions/uploadFile.ts"; +import * as $$$$$$$$$2 from "./actions/adminGetOrders.ts"; +import * as $$$$$$$$$3 from "./actions/adminUpdateAssociation.ts"; +import * as $$$$$$$$$4 from "./actions/changePassword.ts"; +import * as $$$$$$$$$5 from "./actions/changeSubscription.ts"; +import * as $$$$$$$$$6 from "./actions/checkout.ts"; +import * as $$$$$$$$$7 from "./actions/checkoutv2.ts"; +import * as $$$$$$$$$8 from "./actions/cognitoAdminSignIn.ts"; +import * as $$$$$$$$$9 from "./actions/cognitoSignIn.ts"; +import * as $$$$$$$$$10 from "./actions/cognitoSignUp.ts"; +import * as $$$$$$$$$11 from "./actions/confirmCognitoSignup.ts"; +import * as $$$$$$$$$12 from "./actions/confirmForgotPassword.ts"; +import * as $$$$$$$$$13 from "./actions/createTicket.ts"; +import * as $$$$$$$$$14 from "./actions/deleteAssociationDocument.ts"; +import * as $$$$$$$$$15 from "./actions/deleteDocument.ts"; +import * as $$$$$$$$$16 from "./actions/forgotPassword.ts"; +import * as $$$$$$$$$17 from "./actions/getAssociation.ts"; +import * as $$$$$$$$$18 from "./actions/getAssociationDocs.ts"; +import * as $$$$$$$$$19 from "./actions/getCardProduct.ts"; +import * as $$$$$$$$$20 from "./actions/getCids.ts"; +import * as $$$$$$$$$21 from "./actions/getDocs.ts"; +import * as $$$$$$$$$22 from "./actions/getPlans.ts"; +import * as $$$$$$$$$23 from "./actions/getProfile.ts"; +import * as $$$$$$$$$24 from "./actions/getUser.ts"; +import * as $$$$$$$$$25 from "./actions/getUserOrders.ts"; +import * as $$$$$$$$$26 from "./actions/resendConfirmationCode.ts"; +import * as $$$$$$$$$27 from "./actions/updateProfile.ts"; +import * as $$$$$$$$$28 from "./actions/updateUserData.ts"; +import * as $$$$$$$$$29 from "./actions/uploadFile.ts"; import * as $$$$$$$$$$$0 from "./apps/decohub.ts"; import * as $$$$$$$$$$$1 from "./apps/site.ts"; import * as $$$2 from "./loaders/availableIcons.ts"; @@ -74,43 +76,46 @@ import * as $$$$$$33 from "./sections/Layout/Grid.tsx"; import * as $$$$$$34 from "./sections/Layout/GridItem.tsx"; import * as $$$$$$35 from "./sections/Links/LinkTree.tsx"; import * as $$$$$$36 from "./sections/Links/Shortcuts.tsx"; -import * as $$$$$$37 from "./sections/Miscellaneous/AssociationAdmin.tsx"; -import * as $$$$$$38 from "./sections/Miscellaneous/CampaignTimer.tsx"; -import * as $$$$$$39 from "./sections/Miscellaneous/Checkout.tsx"; -import * as $$$$$$40 from "./sections/Miscellaneous/ChoosePlanSignup.tsx"; -import * as $$$$$$41 from "./sections/Miscellaneous/ConfirmForgotPassword.tsx"; -import * as $$$$$$42 from "./sections/Miscellaneous/ConfirmSignup.tsx"; -import * as $$$$$$43 from "./sections/Miscellaneous/CookieConsent.tsx"; -import * as $$$$$$44 from "./sections/Miscellaneous/EcannaCardPage.tsx"; -import * as $$$$$$45 from "./sections/Miscellaneous/ForgotPassword.tsx"; -import * as $$$$$$46 from "./sections/Miscellaneous/MyAccount.tsx"; -import * as $$$$$$47 from "./sections/Miscellaneous/MyDocs.tsx"; -import * as $$$$$$48 from "./sections/Miscellaneous/MyInfo.tsx"; -import * as $$$$$$49 from "./sections/Miscellaneous/MyOrders.tsx"; -import * as $$$$$$50 from "./sections/Miscellaneous/PrivatePageControl.tsx"; -import * as $$$$$$51 from "./sections/Miscellaneous/PublicPageControl.tsx"; -import * as $$$$$$52 from "./sections/Miscellaneous/PublicProfile.tsx"; -import * as $$$$$$53 from "./sections/Miscellaneous/SignIn.tsx"; -import * as $$$$$$55 from "./sections/Miscellaneous/Signout.tsx"; -import * as $$$$$$54 from "./sections/Miscellaneous/SignUp.tsx"; -import * as $$$$$$56 from "./sections/Miscellaneous/Slide.tsx"; -import * as $$$$$$57 from "./sections/Miscellaneous/UserAlerts.tsx"; -import * as $$$$$$58 from "./sections/Miscellaneous/UserAssociatedSignup.tsx"; -import * as $$$$$$59 from "./sections/Newsletter/Newsletter.tsx"; -import * as $$$$$$60 from "./sections/Product/ImageGalleryFrontBack.tsx"; -import * as $$$$$$61 from "./sections/Product/ImageGallerySlider.tsx"; -import * as $$$$$$62 from "./sections/Product/NotFound.tsx"; -import * as $$$$$$63 from "./sections/Product/NotFoundChallenge.tsx"; -import * as $$$$$$64 from "./sections/Product/ProductDetails.tsx"; -import * as $$$$$$65 from "./sections/Product/ProductInfo.tsx"; -import * as $$$$$$66 from "./sections/Product/ProductShelf.tsx"; -import * as $$$$$$67 from "./sections/Product/ProductShelfTabbed.tsx"; -import * as $$$$$$68 from "./sections/Product/SearchResult.tsx"; -import * as $$$$$$69 from "./sections/Product/ShelfWithImage.tsx"; -import * as $$$$$$70 from "./sections/Product/Wishlist.tsx"; -import * as $$$$$$71 from "./sections/Social/InstagramPosts.tsx"; -import * as $$$$$$72 from "./sections/Social/WhatsApp.tsx"; -import * as $$$$$$73 from "./sections/Theme/Theme.tsx"; +import * as $$$$$$37 from "./sections/Miscellaneous/AdminOrders.tsx"; +import * as $$$$$$38 from "./sections/Miscellaneous/AssociationAdmin.tsx"; +import * as $$$$$$39 from "./sections/Miscellaneous/CampaignTimer.tsx"; +import * as $$$$$$40 from "./sections/Miscellaneous/Checkout.tsx"; +import * as $$$$$$41 from "./sections/Miscellaneous/ChoosePlanSignup.tsx"; +import * as $$$$$$42 from "./sections/Miscellaneous/ConfirmForgotPassword.tsx"; +import * as $$$$$$43 from "./sections/Miscellaneous/ConfirmSignup.tsx"; +import * as $$$$$$44 from "./sections/Miscellaneous/CookieConsent.tsx"; +import * as $$$$$$45 from "./sections/Miscellaneous/EcannaCardPage.tsx"; +import * as $$$$$$46 from "./sections/Miscellaneous/ForgotPassword.tsx"; +import * as $$$$$$47 from "./sections/Miscellaneous/MyAccount.tsx"; +import * as $$$$$$48 from "./sections/Miscellaneous/MyDocs.tsx"; +import * as $$$$$$49 from "./sections/Miscellaneous/MyInfo.tsx"; +import * as $$$$$$50 from "./sections/Miscellaneous/MyOrders.tsx"; +import * as $$$$$$51 from "./sections/Miscellaneous/PrivatePageControl.tsx"; +import * as $$$$$$52 from "./sections/Miscellaneous/PrivatePageControlAdmin.tsx"; +import * as $$$$$$53 from "./sections/Miscellaneous/PublicPageControl.tsx"; +import * as $$$$$$54 from "./sections/Miscellaneous/PublicProfile.tsx"; +import * as $$$$$$55 from "./sections/Miscellaneous/SignIn.tsx"; +import * as $$$$$$56 from "./sections/Miscellaneous/SignInAdmin.tsx"; +import * as $$$$$$58 from "./sections/Miscellaneous/Signout.tsx"; +import * as $$$$$$57 from "./sections/Miscellaneous/SignUp.tsx"; +import * as $$$$$$59 from "./sections/Miscellaneous/Slide.tsx"; +import * as $$$$$$60 from "./sections/Miscellaneous/UserAlerts.tsx"; +import * as $$$$$$61 from "./sections/Miscellaneous/UserAssociatedSignup.tsx"; +import * as $$$$$$62 from "./sections/Newsletter/Newsletter.tsx"; +import * as $$$$$$63 from "./sections/Product/ImageGalleryFrontBack.tsx"; +import * as $$$$$$64 from "./sections/Product/ImageGallerySlider.tsx"; +import * as $$$$$$65 from "./sections/Product/NotFound.tsx"; +import * as $$$$$$66 from "./sections/Product/NotFoundChallenge.tsx"; +import * as $$$$$$67 from "./sections/Product/ProductDetails.tsx"; +import * as $$$$$$68 from "./sections/Product/ProductInfo.tsx"; +import * as $$$$$$69 from "./sections/Product/ProductShelf.tsx"; +import * as $$$$$$70 from "./sections/Product/ProductShelfTabbed.tsx"; +import * as $$$$$$71 from "./sections/Product/SearchResult.tsx"; +import * as $$$$$$72 from "./sections/Product/ShelfWithImage.tsx"; +import * as $$$$$$73 from "./sections/Product/Wishlist.tsx"; +import * as $$$$$$74 from "./sections/Social/InstagramPosts.tsx"; +import * as $$$$$$75 from "./sections/Social/WhatsApp.tsx"; +import * as $$$$$$76 from "./sections/Theme/Theme.tsx"; const manifest = { "loaders": { @@ -160,80 +165,86 @@ const manifest = { "deco-sites/ecannadeco/sections/Layout/GridItem.tsx": $$$$$$34, "deco-sites/ecannadeco/sections/Links/LinkTree.tsx": $$$$$$35, "deco-sites/ecannadeco/sections/Links/Shortcuts.tsx": $$$$$$36, + "deco-sites/ecannadeco/sections/Miscellaneous/AdminOrders.tsx": $$$$$$37, "deco-sites/ecannadeco/sections/Miscellaneous/AssociationAdmin.tsx": - $$$$$$37, - "deco-sites/ecannadeco/sections/Miscellaneous/CampaignTimer.tsx": $$$$$$38, - "deco-sites/ecannadeco/sections/Miscellaneous/Checkout.tsx": $$$$$$39, + $$$$$$38, + "deco-sites/ecannadeco/sections/Miscellaneous/CampaignTimer.tsx": $$$$$$39, + "deco-sites/ecannadeco/sections/Miscellaneous/Checkout.tsx": $$$$$$40, "deco-sites/ecannadeco/sections/Miscellaneous/ChoosePlanSignup.tsx": - $$$$$$40, - "deco-sites/ecannadeco/sections/Miscellaneous/ConfirmForgotPassword.tsx": $$$$$$41, - "deco-sites/ecannadeco/sections/Miscellaneous/ConfirmSignup.tsx": $$$$$$42, - "deco-sites/ecannadeco/sections/Miscellaneous/CookieConsent.tsx": $$$$$$43, - "deco-sites/ecannadeco/sections/Miscellaneous/EcannaCardPage.tsx": $$$$$$44, - "deco-sites/ecannadeco/sections/Miscellaneous/ForgotPassword.tsx": $$$$$$45, - "deco-sites/ecannadeco/sections/Miscellaneous/MyAccount.tsx": $$$$$$46, - "deco-sites/ecannadeco/sections/Miscellaneous/MyDocs.tsx": $$$$$$47, - "deco-sites/ecannadeco/sections/Miscellaneous/MyInfo.tsx": $$$$$$48, - "deco-sites/ecannadeco/sections/Miscellaneous/MyOrders.tsx": $$$$$$49, + "deco-sites/ecannadeco/sections/Miscellaneous/ConfirmForgotPassword.tsx": + $$$$$$42, + "deco-sites/ecannadeco/sections/Miscellaneous/ConfirmSignup.tsx": $$$$$$43, + "deco-sites/ecannadeco/sections/Miscellaneous/CookieConsent.tsx": $$$$$$44, + "deco-sites/ecannadeco/sections/Miscellaneous/EcannaCardPage.tsx": $$$$$$45, + "deco-sites/ecannadeco/sections/Miscellaneous/ForgotPassword.tsx": $$$$$$46, + "deco-sites/ecannadeco/sections/Miscellaneous/MyAccount.tsx": $$$$$$47, + "deco-sites/ecannadeco/sections/Miscellaneous/MyDocs.tsx": $$$$$$48, + "deco-sites/ecannadeco/sections/Miscellaneous/MyInfo.tsx": $$$$$$49, + "deco-sites/ecannadeco/sections/Miscellaneous/MyOrders.tsx": $$$$$$50, "deco-sites/ecannadeco/sections/Miscellaneous/PrivatePageControl.tsx": - $$$$$$50, - "deco-sites/ecannadeco/sections/Miscellaneous/PublicPageControl.tsx": $$$$$$51, - "deco-sites/ecannadeco/sections/Miscellaneous/PublicProfile.tsx": $$$$$$52, - "deco-sites/ecannadeco/sections/Miscellaneous/SignIn.tsx": $$$$$$53, - "deco-sites/ecannadeco/sections/Miscellaneous/Signout.tsx": $$$$$$55, - "deco-sites/ecannadeco/sections/Miscellaneous/SignUp.tsx": $$$$$$54, - "deco-sites/ecannadeco/sections/Miscellaneous/Slide.tsx": $$$$$$56, - "deco-sites/ecannadeco/sections/Miscellaneous/UserAlerts.tsx": $$$$$$57, + "deco-sites/ecannadeco/sections/Miscellaneous/PrivatePageControlAdmin.tsx": + $$$$$$52, + "deco-sites/ecannadeco/sections/Miscellaneous/PublicPageControl.tsx": + $$$$$$53, + "deco-sites/ecannadeco/sections/Miscellaneous/PublicProfile.tsx": $$$$$$54, + "deco-sites/ecannadeco/sections/Miscellaneous/SignIn.tsx": $$$$$$55, + "deco-sites/ecannadeco/sections/Miscellaneous/SignInAdmin.tsx": $$$$$$56, + "deco-sites/ecannadeco/sections/Miscellaneous/Signout.tsx": $$$$$$58, + "deco-sites/ecannadeco/sections/Miscellaneous/SignUp.tsx": $$$$$$57, + "deco-sites/ecannadeco/sections/Miscellaneous/Slide.tsx": $$$$$$59, + "deco-sites/ecannadeco/sections/Miscellaneous/UserAlerts.tsx": $$$$$$60, "deco-sites/ecannadeco/sections/Miscellaneous/UserAssociatedSignup.tsx": - $$$$$$58, - "deco-sites/ecannadeco/sections/Newsletter/Newsletter.tsx": $$$$$$59, + $$$$$$61, + "deco-sites/ecannadeco/sections/Newsletter/Newsletter.tsx": $$$$$$62, "deco-sites/ecannadeco/sections/Product/ImageGalleryFrontBack.tsx": - $$$$$$60, - "deco-sites/ecannadeco/sections/Product/ImageGallerySlider.tsx": $$$$$$61, - "deco-sites/ecannadeco/sections/Product/NotFound.tsx": $$$$$$62, - "deco-sites/ecannadeco/sections/Product/NotFoundChallenge.tsx": $$$$$$63, - "deco-sites/ecannadeco/sections/Product/ProductDetails.tsx": $$$$$$64, - "deco-sites/ecannadeco/sections/Product/ProductInfo.tsx": $$$$$$65, - "deco-sites/ecannadeco/sections/Product/ProductShelf.tsx": $$$$$$66, - "deco-sites/ecannadeco/sections/Product/ProductShelfTabbed.tsx": $$$$$$67, - "deco-sites/ecannadeco/sections/Product/SearchResult.tsx": $$$$$$68, - "deco-sites/ecannadeco/sections/Product/ShelfWithImage.tsx": $$$$$$69, - "deco-sites/ecannadeco/sections/Product/Wishlist.tsx": $$$$$$70, - "deco-sites/ecannadeco/sections/Social/InstagramPosts.tsx": $$$$$$71, - "deco-sites/ecannadeco/sections/Social/WhatsApp.tsx": $$$$$$72, - "deco-sites/ecannadeco/sections/Theme/Theme.tsx": $$$$$$73, + $$$$$$63, + "deco-sites/ecannadeco/sections/Product/ImageGallerySlider.tsx": $$$$$$64, + "deco-sites/ecannadeco/sections/Product/NotFound.tsx": $$$$$$65, + "deco-sites/ecannadeco/sections/Product/NotFoundChallenge.tsx": $$$$$$66, + "deco-sites/ecannadeco/sections/Product/ProductDetails.tsx": $$$$$$67, + "deco-sites/ecannadeco/sections/Product/ProductInfo.tsx": $$$$$$68, + "deco-sites/ecannadeco/sections/Product/ProductShelf.tsx": $$$$$$69, + "deco-sites/ecannadeco/sections/Product/ProductShelfTabbed.tsx": $$$$$$70, + "deco-sites/ecannadeco/sections/Product/SearchResult.tsx": $$$$$$71, + "deco-sites/ecannadeco/sections/Product/ShelfWithImage.tsx": $$$$$$72, + "deco-sites/ecannadeco/sections/Product/Wishlist.tsx": $$$$$$73, + "deco-sites/ecannadeco/sections/Social/InstagramPosts.tsx": $$$$$$74, + "deco-sites/ecannadeco/sections/Social/WhatsApp.tsx": $$$$$$75, + "deco-sites/ecannadeco/sections/Theme/Theme.tsx": $$$$$$76, }, "actions": { "deco-sites/ecannadeco/actions/adminGetAssociation.ts": $$$$$$$$$0, "deco-sites/ecannadeco/actions/adminGetAssociationUsers.ts": $$$$$$$$$1, - "deco-sites/ecannadeco/actions/adminUpdateAssociation.ts": $$$$$$$$$2, - "deco-sites/ecannadeco/actions/changePassword.ts": $$$$$$$$$3, - "deco-sites/ecannadeco/actions/changeSubscription.ts": $$$$$$$$$4, - "deco-sites/ecannadeco/actions/checkout.ts": $$$$$$$$$5, - "deco-sites/ecannadeco/actions/checkoutv2.ts": $$$$$$$$$6, - "deco-sites/ecannadeco/actions/cognitoSignIn.ts": $$$$$$$$$7, - "deco-sites/ecannadeco/actions/cognitoSignUp.ts": $$$$$$$$$8, - "deco-sites/ecannadeco/actions/confirmCognitoSignup.ts": $$$$$$$$$9, - "deco-sites/ecannadeco/actions/confirmForgotPassword.ts": $$$$$$$$$10, - "deco-sites/ecannadeco/actions/createTicket.ts": $$$$$$$$$11, - "deco-sites/ecannadeco/actions/deleteAssociationDocument.ts": $$$$$$$$$12, - "deco-sites/ecannadeco/actions/deleteDocument.ts": $$$$$$$$$13, - "deco-sites/ecannadeco/actions/forgotPassword.ts": $$$$$$$$$14, - "deco-sites/ecannadeco/actions/getAssociation.ts": $$$$$$$$$15, - "deco-sites/ecannadeco/actions/getAssociationDocs.ts": $$$$$$$$$16, - "deco-sites/ecannadeco/actions/getCardProduct.ts": $$$$$$$$$17, - "deco-sites/ecannadeco/actions/getCids.ts": $$$$$$$$$18, - "deco-sites/ecannadeco/actions/getDocs.ts": $$$$$$$$$19, - "deco-sites/ecannadeco/actions/getPlans.ts": $$$$$$$$$20, - "deco-sites/ecannadeco/actions/getProfile.ts": $$$$$$$$$21, - "deco-sites/ecannadeco/actions/getUser.ts": $$$$$$$$$22, - "deco-sites/ecannadeco/actions/getUserOrders.ts": $$$$$$$$$23, - "deco-sites/ecannadeco/actions/resendConfirmationCode.ts": $$$$$$$$$24, - "deco-sites/ecannadeco/actions/updateProfile.ts": $$$$$$$$$25, - "deco-sites/ecannadeco/actions/updateUserData.ts": $$$$$$$$$26, - "deco-sites/ecannadeco/actions/uploadFile.ts": $$$$$$$$$27, + "deco-sites/ecannadeco/actions/adminGetOrders.ts": $$$$$$$$$2, + "deco-sites/ecannadeco/actions/adminUpdateAssociation.ts": $$$$$$$$$3, + "deco-sites/ecannadeco/actions/changePassword.ts": $$$$$$$$$4, + "deco-sites/ecannadeco/actions/changeSubscription.ts": $$$$$$$$$5, + "deco-sites/ecannadeco/actions/checkout.ts": $$$$$$$$$6, + "deco-sites/ecannadeco/actions/checkoutv2.ts": $$$$$$$$$7, + "deco-sites/ecannadeco/actions/cognitoAdminSignIn.ts": $$$$$$$$$8, + "deco-sites/ecannadeco/actions/cognitoSignIn.ts": $$$$$$$$$9, + "deco-sites/ecannadeco/actions/cognitoSignUp.ts": $$$$$$$$$10, + "deco-sites/ecannadeco/actions/confirmCognitoSignup.ts": $$$$$$$$$11, + "deco-sites/ecannadeco/actions/confirmForgotPassword.ts": $$$$$$$$$12, + "deco-sites/ecannadeco/actions/createTicket.ts": $$$$$$$$$13, + "deco-sites/ecannadeco/actions/deleteAssociationDocument.ts": $$$$$$$$$14, + "deco-sites/ecannadeco/actions/deleteDocument.ts": $$$$$$$$$15, + "deco-sites/ecannadeco/actions/forgotPassword.ts": $$$$$$$$$16, + "deco-sites/ecannadeco/actions/getAssociation.ts": $$$$$$$$$17, + "deco-sites/ecannadeco/actions/getAssociationDocs.ts": $$$$$$$$$18, + "deco-sites/ecannadeco/actions/getCardProduct.ts": $$$$$$$$$19, + "deco-sites/ecannadeco/actions/getCids.ts": $$$$$$$$$20, + "deco-sites/ecannadeco/actions/getDocs.ts": $$$$$$$$$21, + "deco-sites/ecannadeco/actions/getPlans.ts": $$$$$$$$$22, + "deco-sites/ecannadeco/actions/getProfile.ts": $$$$$$$$$23, + "deco-sites/ecannadeco/actions/getUser.ts": $$$$$$$$$24, + "deco-sites/ecannadeco/actions/getUserOrders.ts": $$$$$$$$$25, + "deco-sites/ecannadeco/actions/resendConfirmationCode.ts": $$$$$$$$$26, + "deco-sites/ecannadeco/actions/updateProfile.ts": $$$$$$$$$27, + "deco-sites/ecannadeco/actions/updateUserData.ts": $$$$$$$$$28, + "deco-sites/ecannadeco/actions/uploadFile.ts": $$$$$$$$$29, }, "apps": { "deco-sites/ecannadeco/apps/decohub.ts": $$$$$$$$$$$0, diff --git a/sections/Miscellaneous/AdminOrders.tsx b/sections/Miscellaneous/AdminOrders.tsx new file mode 100644 index 0000000..5e3831e --- /dev/null +++ b/sections/Miscellaneous/AdminOrders.tsx @@ -0,0 +1 @@ +export { default } from "../../islands/AdminOrders.tsx"; diff --git a/sections/Miscellaneous/PrivatePageControlAdmin.tsx b/sections/Miscellaneous/PrivatePageControlAdmin.tsx new file mode 100644 index 0000000..5241db9 --- /dev/null +++ b/sections/Miscellaneous/PrivatePageControlAdmin.tsx @@ -0,0 +1 @@ +export { default } from "../../islands/PrivatePageControlAdmin.tsx"; diff --git a/sections/Miscellaneous/SignInAdmin.tsx b/sections/Miscellaneous/SignInAdmin.tsx new file mode 100644 index 0000000..92f327b --- /dev/null +++ b/sections/Miscellaneous/SignInAdmin.tsx @@ -0,0 +1 @@ +export { default } from "../../components/ui/SignInAdmin.tsx";