inital commit

This commit is contained in:
2026-01-01 15:25:19 +05:30
commit f0ae49465a
36361 changed files with 4894111 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
"use client";
import { ReactstrapInput } from "@/components/reactstrapFormik";
import Btn from "@/elements/buttons/Btn";
import I18NextContext from "@/helper/i18NextContext";
import LoginBoxWrapper from "@/utils/hoc/LoginBoxWrapper";
import { ForgotPasswordSchema,} from "@/utils/hooks/auth/useForgotPassword";
import { useTranslation } from "@/app/i18n/client";
import { Field, Form, Formik } from "formik";
import { useRouter } from "next/navigation";
import { useContext } from "react";
import { Col } from "reactstrap";
const ForgotPassword = () => {
const router = useRouter()
const { i18Lang } = useContext(I18NextContext);
const { t } = useTranslation(i18Lang, "common");
return (
<div className="box-wrapper">
<LoginBoxWrapper>
<div className="log-in-title">
<h4>{t("ForgotPassword")}</h4>
</div>
<div className="input-box">
<Formik
initialValues={{
email: "",
}}
validationSchema={ForgotPasswordSchema}
onSubmit={(values) => router.push(`/${i18Lang}/auth/otp-verification`)}
>
{() => (
<Form className="row g-2">
<Col sm="12">
<Field
name="email"
component={ReactstrapInput}
className="form-control"
id="email"
placeholder="Email Address"
label="EmailAddress"
/>
</Col>
<Col sm="12">
<Btn
title="SendEmail"
className="btn btn-animation w-100 justify-content-center"
type="submit"
color="false"
/>
</Col>
</Form>
)}
</Formik>
</div>
</LoginBoxWrapper>
</div>
);
};
export default ForgotPassword;

View File

@@ -0,0 +1,66 @@
"use client"
import React, { useContext, useState } from "react";
import { Col } from "reactstrap";
import { Field, Form, Formik } from "formik";
import Link from "next/link";
import LoginBoxWrapper from "@/utils/hoc/LoginBoxWrapper";
import { LogInSchema } from "@/utils/hooks/auth/useLogin";
import Btn from "@/elements/buttons/Btn";
import I18NextContext from "@/helper/i18NextContext";
import { useTranslation } from "@/app/i18n/client";
import { ReactstrapInput } from "@/components/reactstrapFormik";
import { useRouter } from "next/navigation";
const Login = () => {
const { i18Lang } = useContext(I18NextContext);
const { t } = useTranslation(i18Lang, 'common');
const router = useRouter()
return (
<div className="box-wrapper">
<LoginBoxWrapper>
<div className="log-in-title">
<h3>{t("WelcomeToFastkart")}</h3>
<h4>{t("LogInYourAccount")}</h4>
</div>
<div className="input-box">
<Formik
initialValues={{
email: "admin@example.com",
password: "123456789",
}}
validationSchema={LogInSchema}
onSubmit={() => {
router.push(`/${i18Lang}/dashboard`)
}}>
{() => (
<Form className="row g-2">
<Col sm="12">
<Field name="email" type="email" component={ReactstrapInput} className="form-control" id="email" placeholder="Email Address" label="EmailAddress" />
</Col>
<Col sm="12">
<Field name="password" component={ReactstrapInput} type="password" className="form-control" id="password" placeholder="Password" label="Password" />
</Col>
<Col sm="12">
<div className="forgot-box">
<Link href={`/${i18Lang}/auth/forgot-password`} className="forgot-password">
{t("ForgotPassword")}?
</Link>
</div>
</Col>
<Col sm="12">
<Btn title="Login" className="btn btn-animation w-100 justify-content-center" type="submit" color="false" />
<div className="sign-up-box">
<h4>{'Don\'t Have Seller Account?'}</h4>
<Link href={`/${i18Lang}/auth/register`}>{'Sign Up'}</Link>
</div>
</Col>
</Form>
)}
</Formik>
</div>
</LoginBoxWrapper>
</div>
);
};
export default Login;

View File

@@ -0,0 +1,90 @@
"use client";
import ShowBox from "@/elements/alerts&Modals/ShowBox";
import I18NextContext from "@/helper/i18NextContext";
import { obscureEmail } from "@/utils/customFunctions/EmailFormates";
import LoginBoxWrapper from "@/utils/hoc/LoginBoxWrapper";
import NoSsr from "@/utils/hoc/NoSsr";
import { useTranslation } from "@/app/i18n/client";
import Cookies from "js-cookie";
import { useContext, useEffect, useState } from "react";
import { Input } from "reactstrap";
const OtpVerification = () => {
const { i18Lang } = useContext(I18NextContext);
const { t } = useTranslation(i18Lang, "common");
const [showBoxMessage, setShowBoxMessage] = useState();
const cookies = Cookies.get("ue");
const [seconds, setSeconds] = useState();
const [otp, setOtp] = useState("");
const handleChange = (e) => {
if (e.target.value.length <= 5 && !isNaN(Number(e.target.value))) {
setOtp(e.target.value);
}
};
useEffect(() => {
otp && otp.length === 5 && router.push(`/${i18Lang}/auth/update-password`)
}, [otp]);
useEffect(() => {
const otpTimer =
Boolean(seconds) && setInterval(() => setSeconds(seconds - 1), 1000);
return () => {
clearInterval(otpTimer);
};
}, [seconds]);
return (
<>
<div className="box-wrapper">
<ShowBox showBoxMessage={showBoxMessage} />
<LoginBoxWrapper>
<div className="log-in-title">
<h3 className="text-content">
{t("PleasEnterTheOneTimePasswordToVerifyYourAccount")}
</h3>
<h5 className="text-content">
{t("ACodeHasBeenSentTo") + " "}
<span>
<NoSsr>{obscureEmail(cookies)}</NoSsr>
</span>
</h5>
</div>
<div className="outer-otp">
<div className="inner-otp">
<Input
type="text"
maxLength="5"
onChange={handleChange}
value={otp}
/>
</div>
</div>
<div className="send-box pt-4">
{seconds ? (
<h5>
{t("PleaseWait")}
<a className="theme-color fw-bold">
{seconds} <NoSsr>{t("second(s)")}</NoSsr>3
</a>
{t("BeforeRequestingANewOneTimePassword(OTP)")}.
</h5>
) : (
<h5>
{t("Didn'tGetTheOTP")}?
<a
className="theme-color fw-bold"
onClick={() => { router.push(`/${i18Lang}/auth/forgot-password`)
setSeconds(60);
}}
>
{t("ResendIt")}
</a>
</h5>
)}
</div>
</LoginBoxWrapper>
</div>
</>
);
};
export default OtpVerification;

View File

@@ -0,0 +1,52 @@
"use client"
import { useContext } from "react";
import { Col } from "reactstrap";
import { ReactstrapInput } from "@/components/reactstrapFormik";
import Btn from "@/elements/buttons/Btn";
import I18NextContext from "@/helper/i18NextContext";
import LoginBoxWrapper from "@/utils/hoc/LoginBoxWrapper";
import { UpdatePasswordSchema } from "@/utils/hooks/auth/useUpdatePassword";
import { useTranslation } from "@/app/i18n/client";
import { Field, Form, Formik } from "formik";
const UpdatePassword = () => {
const { i18Lang } = useContext(I18NextContext);
const { t } = useTranslation(i18Lang, 'common');
return (
<>
<div className="box-wrapper">
<LoginBoxWrapper>
<div className="log-in-title">
<h4>{t("UpdatePassword")}</h4>
</div>
<div className="input-box">
<Formik
initialValues={{
password: "",
password_confirmation: "",
}}
validationSchema={UpdatePasswordSchema}
onSubmit={() => {
router.push(`/${i18Lang}/auth/login`)
}}>
{() => (
<Form className="row g-2">
<Col sm="12">
<Field name="password" component={ReactstrapInput} type="password" className="form-control" id="password" placeholder="Password" label="Password" />
</Col>
<Col sm="12">
<Field name="password_confirmation" component={ReactstrapInput} type="password" className="form-control" id="password" placeholder="Confirm Password" label="ConfirmPassword" />
</Col>
<Col sm="12">
<Btn title="Submit" className="btn btn-animation w-100 justify-content-center" type="submit" color="false" />
</Col>
</Form>
)}
</Formik>
</div>
</LoginBoxWrapper>
</div>
</>
);
};
export default UpdatePassword;

View File

@@ -0,0 +1,30 @@
"use client";
import React, { useContext, useEffect } from "react";
import { use } from "react";
import I18NextContext from "@/helper/i18NextContext";
import { Col, Container, Row } from "reactstrap";
const AuthLayout = ({ children, params }) => {
const { i18Lang, setI18Lang } = useContext(I18NextContext);
const { lng } = use(params); // Unwrap the promise using React.use()
useEffect(() => {
if (i18Lang === "") {
setI18Lang(lng);
}
}, [lng]);
return (
<section className="log-in-section section-b-space">
<Container className="w-100">
<Row>
<Col xl="5" lg="6" className="me-auto">
{children}
</Col>
</Row>
</Container>
</section>
);
};
export default AuthLayout;

View File

@@ -0,0 +1,13 @@
"use client"
import AccountForm from "@/components/account"
import FormWrapper from "@/utils/hoc/FormWrapper"
const Account = () => {
return (
<FormWrapper title="MyAccount">
<AccountForm />
</FormWrapper>
)
}
export default Account

View File

@@ -0,0 +1,7 @@
'use client'
import AttachmentContain from "@/components/attachment";
const Media = () => {
return <AttachmentContain isattachment={true} />;
};
export default Media;

View File

@@ -0,0 +1,13 @@
"use client";
import AttributeForm from "@/components/attribute/AttributeForm";
import FormWrapper from "@/utils/hoc/FormWrapper";
const AttributeCreate = () => {
return (
<FormWrapper title="AddAttribute">
<AttributeForm />
</FormWrapper>
);
};
export default AttributeCreate;

View File

@@ -0,0 +1,21 @@
"use client";
import React, { useState } from "react";
import { Col } from "reactstrap";
import AttributesTable from "@/components/attribute/AttributesTable";
import { attribute } from "@/utils/axiosUtils/API";
const AllAttributes = () => {
const [isCheck, setIsCheck] = useState([]);
return (
<Col sm="12">
<AttributesTable
url={attribute}
moduleName="Attribute"
isCheck={isCheck}
setIsCheck={setIsCheck}
/>
</Col>
);
};
export default AllAttributes;

View File

@@ -0,0 +1,18 @@
"use client";
import AttributeForm from "@/components/attribute/AttributeForm";
import FormWrapper from "@/utils/hoc/FormWrapper";
import { useParams } from "next/navigation";
const UpdateAttributes = () => {
const params = useParams();
return (
params?.updateId && (
<FormWrapper title="UpdateAttribute">
<AttributeForm updateId={params?.updateId} />
</FormWrapper>
)
);
};
export default UpdateAttributes;

View File

@@ -0,0 +1,50 @@
'use client'
import { useContext } from 'react';
import I18NextContext from '@/helper/i18NextContext';
import { useTranslation } from '@/app/i18n/client';
import { useMutation, useQueryClient } from '@tanstack/react-query';
import { useRouter } from 'next/navigation';
import { Card, CardBody, Col, Container, Row } from 'reactstrap';
import CategoryForm from '@/components/category/CategoryForm';
import TreeForm from '@/components/category/TreeForm';
import request from '@/utils/axiosUtils';
import SuccessHandle from '@/utils/customFunctions/SuccessHandle';
import { Category } from '@/utils/axiosUtils/API';
const CreateBlogCategory = () => {
const { i18Lang } = useContext(I18NextContext);
const { t } = useTranslation(i18Lang, 'common');
const queryClient = useQueryClient();
const router = useRouter();
const { mutate, isLoading } = useMutation({mutationFn: (data) => request({ url: Category, data, method: "post" }),
onSuccess: (resData) => {
SuccessHandle(resData, router, "/blog/category/create", t("CategoryCreatedSuccessfully"));
queryClient.invalidateQueries({ queryKey: ["/blog/category/create"] });
},
});
return (
<Container fluid={true}>
<Row >
<Col xl="4">
<Card>
<CardBody>
<TreeForm type={"post"} isLoading={isLoading} />
</CardBody>
</Card>
</Col>
<Col xl="8">
<Card>
<CardBody>
<div className="title-header option-title">
<h5>{t("AddCategory")}</h5>
</div>
<CategoryForm loading={isLoading} mutate={mutate} type={"post"} />
</CardBody>
</Card>
</Col>
</Row>
</Container>
);
};
export default CreateBlogCategory

View File

@@ -0,0 +1,36 @@
'use client'
import { useContext, useRef, useState } from 'react'
import { Card, CardBody, Col, Row } from 'reactstrap'
import CategoryForm from '@/components/category/CategoryForm'
import TreeForm from '@/components/category/TreeForm'
import I18NextContext from '@/helper/i18NextContext'
import { useTranslation } from '@/app/i18n/client'
const BlogCategory = () => {
const { i18Lang } = useContext(I18NextContext);
const { t } = useTranslation(i18Lang, 'common');
const [resetData, setResetData] = useState(false)
const refRefetch = useRef()
return (
<Row >
<Col xl="4">
<Card>
<CardBody>
<TreeForm type={"post"} ref={refRefetch} />
</CardBody>
</Card>
</Col>
<Col xl="8">
<Card>
<CardBody>
<div className="title-header option-title">
<h5>{t("AddCategory")}</h5>
</div>
<CategoryForm key={resetData} type={"post"} setResetData={setResetData} />
</CardBody>
</Card>
</Col>
</Row>
);
}
export default BlogCategory

View File

@@ -0,0 +1,39 @@
"use client";
import TableTitle from "@/components/table/TableTitle";
import CategoryForm from "@/components/category/CategoryForm";
import TreeForm from "@/components/category/TreeForm";
import { useParams } from "next/navigation";
import { Card, CardBody, Col, Container, Row } from "reactstrap";
const UpdateBlogCategory = () => {
const params = useParams();
return (
<>
<Container fluid={true}>
<Row>
<Col xl="4">
<Card>
<CardBody>
<TreeForm type={"post"} />
</CardBody>
</Card>
</Col>
<Col xl="8">
<Card>
<CardBody>
{params?.updateId && (
<>
<TableTitle moduleName="UpdateCategory" onlyTitle={true} />
<CategoryForm updateId={params?.updateId} type={"post"} />
</>
)}
</CardBody>
</Card>
</Col>
</Row>
</Container>
</>
);
};
export default UpdateBlogCategory;

View File

@@ -0,0 +1,13 @@
"use client";
import BlogForm from "@/components/blog/BlogForm";
import FormWrapper from "@/utils/hoc/FormWrapper";
const AddBlog = () => {
return (
<FormWrapper title="AddBlog">
<BlogForm />
</FormWrapper>
);
};
export default AddBlog;

View File

@@ -0,0 +1,17 @@
'use client'
import AllBlogsTable from "@/components/blog/AllBlogsTable";
import { blog } from "@/utils/axiosUtils/API";
import { useState } from "react";
import { Col } from "reactstrap";
const AllBlogs = () => {
const [isCheck, setIsCheck] = useState([]);
return (
<Col sm="12">
<AllBlogsTable url={blog} moduleName="Blog" isCheck={isCheck} setIsCheck={setIsCheck} />
</Col>
);
};
export default AllBlogs;

View File

@@ -0,0 +1,13 @@
"use client";
import TagForm from "@/components/tag/TagForm";
import FormWrapper from "@/utils/hoc/FormWrapper";
const TagsCreate = () => {
return (
<FormWrapper title="AddTag">
<TagForm type={"post"} />
</FormWrapper>
);
};
export default TagsCreate;

View File

@@ -0,0 +1,16 @@
'use client'
import React, { useState } from "react";
import { Col } from "reactstrap";
import AllTagsTable from "@/components/tag/AllTagsTable";
import { tag } from "@/utils/axiosUtils/API";
const AllTags = () => {
const [isCheck, setIsCheck] = useState([]);
return (
<Col sm="12">
<AllTagsTable url={tag} moduleName="Tag" isCheck={isCheck} setIsCheck={setIsCheck} type={"post"} />
</Col>
);
};
export default AllTags;

View File

@@ -0,0 +1,18 @@
"use client";
import TagForm from "@/components/tag/TagForm";
import FormWrapper from "@/utils/hoc/FormWrapper";
import { useParams } from "next/navigation";
const BlogTagUpdate = () => {
const params = useParams();
return (
params?.updateId && (
<FormWrapper title="UpdateTag">
<TagForm updateId={params?.updateId} type={"post"} />
</FormWrapper>
)
);
};
export default BlogTagUpdate;

View File

@@ -0,0 +1,19 @@
"use client";
import BlogForm from "@/components/blog/BlogForm";
import FormWrapper from "@/utils/hoc/FormWrapper";
import { useParams } from "next/navigation";
const BlogUpdate = () => {
const params = useParams();
return (
params?.updateId && (
<FormWrapper title="UpdateBlog">
<BlogForm updateId={params?.updateId} />
</FormWrapper>
)
);
};
export default BlogUpdate;

View File

@@ -0,0 +1,53 @@
"use client"
import React, { useContext } from "react";
import { Card, CardBody, Col, Container, Row } from "reactstrap";
import { useMutation, useQueryClient } from "@tanstack/react-query";
import { useRouter } from "next/navigation";
import { Category } from "@/utils/axiosUtils/API";
import CategoryForm from "@/components/category/CategoryForm";
import TreeForm from "@/components/category/TreeForm";
import request from "@/utils/axiosUtils";
import SuccessHandle from "@/utils/customFunctions/SuccessHandle";
import TableTitle from "@/components/table/TableTitle";
import I18NextContext from "@/helper/i18NextContext";
import { useTranslation } from "@/app/i18n/client";
const CategoryCreate = () => {
const { i18Lang } = useContext(I18NextContext);
const { t } = useTranslation(i18Lang, 'common');
const queryClient = useQueryClient();
const router = useRouter();
const { mutate, isLoading } = useMutation({mutationFn: (data) => request({ url: Category, data, method: "post" }),
onSuccess: (resData) => {
SuccessHandle(resData, router, `${i18Lang}/category/create`, t("CategoryCreatedSuccessfully"));
queryClient.invalidateQueries({ queryKey: [`${i18Lang}/category/create`] });
},
});
return (
<>
<Row>
<Col xl="4">
<Card>
<CardBody>
<TableTitle moduleName="Category" type={'product'} onlyTitle={true} />
<TreeForm type={"product"} isLoading={isLoading} />
</CardBody>
</Card>
</Col>
<Col xl="8">
<Card>
<CardBody>
<div className="title-header option-title">
<h5>{t("AddCategory")}</h5>
</div>
<CategoryForm loading={isLoading} mutate={mutate} type={"product"} />
</CardBody>
</Card>
</Col>
</Row>
</>
);
};
export default CategoryCreate;

View File

@@ -0,0 +1,40 @@
"use client";
import { useContext, useRef, useState } from "react";
import { Card, CardBody, Col, Row } from "reactstrap";
import TreeForm from "@/components/category/TreeForm";
import CategoryForm from "@/components/category/CategoryForm";
import TableTitle from "@/components/table/TableTitle";
import I18NextContext from "@/helper/i18NextContext";
import { useTranslation } from "@/app/i18n/client";
const CategoryCreate = () => {
const { i18Lang } = useContext(I18NextContext);
const { t } = useTranslation(i18Lang, 'common');
const refRefetch = useRef()
return (
<>
<Row>
<Col xl="4">
<Card>
<CardBody>
<TableTitle moduleName="Category" type={'product'} onlyTitle={true} />
<TreeForm type={"product"} ref={refRefetch} />
</CardBody>
</Card>
</Col>
<Col xl="8">
<Card>
<CardBody>
<div className="title-header option-title">
<h5>{t("AddCategory")}</h5>
</div>
<CategoryForm type={"product"} />
</CardBody>
</Card>
</Col>
</Row>
</>
);
};
export default CategoryCreate;

View File

@@ -0,0 +1,37 @@
"use client";
import TableTitle from "@/components/table/TableTitle";
import CategoryForm from "@/components/category/CategoryForm";
import TreeForm from "@/components/category/TreeForm";
import { useParams } from "next/navigation";
import { Card, CardBody, Col, Container, Row } from "reactstrap";
const CategoryUpdate = () => {
const params = useParams();
return (
<>
<Container fluid={true}>
<Row>
<Col xl="4">
<Card>
<CardBody>
<TableTitle moduleName="Category" type={"product"} />
<TreeForm type={"product"} />
</CardBody>
</Card>
</Col>
<Col xl="8">
<Card>
<CardBody>
<TableTitle moduleName="UpdateCategory" onlyTitle={true} />
{params?.updateId && <CategoryForm updateId={params?.updateId} type={"product"} />}
</CardBody>
</Card>
</Col>
</Row>
</Container>
</>
);
};
export default CategoryUpdate;

View File

@@ -0,0 +1,7 @@
"use client";
import Checkout from "@/components/pos/checkout/Checkout";
const MainCheckout = () => {
return <Checkout />;
};
export default MainCheckout;

View File

@@ -0,0 +1,14 @@
'use client'
import { Col } from "reactstrap"
import { commissions } from "@/utils/axiosUtils/API"
import AllCommissionTable from "@/components/commission"
const Commission = () => {
return (
<Col sm="12">
<AllCommissionTable moduleName="Commission" url={commissions} dateRange={true} />
</Col>
)
}
export default Commission

View File

@@ -0,0 +1,11 @@
"use client";
import CouponForm from "@/components/coupon/CouponForm";
const AddNewCoupon = () => {
return (
<CouponForm title={"CreateCoupons"} />
);
};
export default AddNewCoupon;

View File

@@ -0,0 +1,17 @@
'use client'
import AllCouponTable from "@/components/coupon/AllCouponTable";
import { coupon } from "@/utils/axiosUtils/API";
import { useState } from "react";
import { Col } from "reactstrap";
const AllCoupon = () => {
const [isCheck, setIsCheck] = useState([]);
return (
<Col sm="12">
<AllCouponTable url={coupon} moduleName="Coupon" isCheck={isCheck} setIsCheck={setIsCheck} />
</Col>
);
};
export default AllCoupon;

View File

@@ -0,0 +1,11 @@
"use client";
import CouponForm from "@/components/coupon/CouponForm";
import { useParams } from "next/navigation";
const CouponUpdate = () => {
const params = useParams();
return params?.updateId && <CouponForm updateId={params?.updateId} title={"UpdateCoupon"} />;
};
export default CouponUpdate;

View File

@@ -0,0 +1,13 @@
"use client";
import CurrencyForm from "@/components/currency/CurrencyForm";
import FormWrapper from "@/utils/hoc/FormWrapper";
const CreateCurrency = () => {
return (
<FormWrapper title="AddCurrency">
<CurrencyForm />
</FormWrapper>
);
};
export default CreateCurrency;

View File

@@ -0,0 +1,16 @@
'use client'
import { useState } from "react";
import { Col } from "reactstrap";
import AllCurrency from "@/components/currency/AllCurrency";
import { currency } from "@/utils/axiosUtils/API";
const Currency = () => {
const [isCheck, setIsCheck] = useState([]);
return (
<Col sm="12">
<AllCurrency url={currency} moduleName="Currency" isCheck={isCheck} setIsCheck={setIsCheck} />
</Col>
)
}
export default Currency

View File

@@ -0,0 +1,18 @@
"use client";
import CurrencyForm from "@/components/currency/CurrencyForm";
import FormWrapper from "@/utils/hoc/FormWrapper";
import { useParams } from "next/navigation";
const UpdateCurrency = () => {
const params = useParams();
return (
params?.updateId && (
<FormWrapper title="Update Currency">
<CurrencyForm updateId={params?.updateId} />
</FormWrapper>
)
);
};
export default UpdateCurrency;

View File

@@ -0,0 +1,11 @@
"use client"
import dynamic from "next/dynamic";
const MainDashboard = dynamic(() => import("../../../../components/dashboard"), { ssr: false })
const Dashboard = () => {
return (
<MainDashboard />
)
};
export default Dashboard;

View File

@@ -0,0 +1,13 @@
"use client";
import FaqForm from "@/components/faq/FaqForm";
import FormWrapper from "@/utils/hoc/FormWrapper";
const CreateFaq = () => {
return (
<FormWrapper title="AddFaq">
<FaqForm />
</FormWrapper>
);
};
export default CreateFaq;

View File

@@ -0,0 +1,15 @@
'use client'
import { FaqAPI } from "@/utils/axiosUtils/API";
import { useState } from "react";
import { Col } from "reactstrap";
import AllFaqTable from "@/components/faq/index";
const FaqComponent = () => {
const [isCheck, setIsCheck] = useState([]);
return (
<Col sm="12">
<AllFaqTable url={FaqAPI} moduleName="Faq" isCheck={isCheck} setIsCheck={setIsCheck} />
</Col>
)
}
export default FaqComponent

View File

@@ -0,0 +1,17 @@
"use client";
import FaqForm from "@/components/faq/FaqForm";
import FormWrapper from "@/utils/hoc/FormWrapper";
import { useParams } from "next/navigation";
const UpdateFaq = () => {
const params = useParams();
return (
params?.updateId && (
<FormWrapper title="Update Faq">
<FaqForm updateId={params?.updateId} />
</FormWrapper>
)
);
};
export default UpdateFaq;

View File

@@ -0,0 +1,7 @@
import Layout from "@/layout";
export default function RootLayout({ children, params: { lng } }) {
return (
<Layout lng={lng}>{children}</Layout>
)
}

View File

@@ -0,0 +1,17 @@
'use client'
import NotificationsData from "@/components/notifications/NotificationsData"
import FormWrapper from "@/utils/hoc/FormWrapper"
import { Col } from "reactstrap"
const Notifications = () => {
return (
<Col sm="12">
<FormWrapper title="Notifications">
<NotificationsData />
</FormWrapper>
</Col>
)
}
export default Notifications

View File

@@ -0,0 +1,61 @@
'use client'
import React, { useContext, useEffect, useState } from "react";
import { Form, Formik } from "formik";
import { Card, Col, Row } from "reactstrap";
import { useQuery } from "@tanstack/react-query";
import { AddtoCartAPI, Category } from "@/utils/axiosUtils/API";
import CreateCartContext from "@/helper/cartContext";
import TopCategories from "@/components/pos/TopCategories";
import AllProducts from "@/components/pos/AllProducts";
import PosDetailCard from "@/components/pos/PosDetailCard";
import Loader from "@/components/commonComponent/Loader";
import request from "@/utils/axiosUtils";
const POS = () => {
const [getCategoryId, setGetCategoryId] = useState('')
const { dispatch, setCartData, setCartState } = useContext(CreateCartContext);
const { data: CategoryData, isLoading } = useQuery({queryKey: [Category], queryFn:() => request({ url: Category, params: { type: 'product', status: 1 } }), refetchOnWindowFocus: false, select: (data) => data.data.data});
const { data: addToCartData, isLoading: addToCartLoader } = useQuery({queryKey: [AddtoCartAPI], queryFn:() => request({ url: AddtoCartAPI }), refetchOnWindowFocus: false, select: (res) => res?.data });
const [initValues, setInitValues] = useState({ products: [], consumer_id: "", billing_address_id: "", shipping_address_id: "", shipping_total: 0, tax_total: 0, total: 0, variation_id: "" });
useEffect(() => {
if (addToCartData?.items?.length > 0) {
setInitValues((prev) => {
return {
...prev, // Preserve the existing values
products: addToCartData?.items,
total: addToCartData?.total
};
});
setCartState(addToCartData?.items)
}
}, [addToCartLoader]);
if (isLoading || addToCartLoader) return <Loader />
return (
<>
<Formik
initialValues={initValues}
>
{({ values, setFieldValue }) => (
<Form>
<Row>
<Col xxl="8">
<TopCategories CategoryData={CategoryData} setGetCategoryId={setGetCategoryId} getCategoryId={getCategoryId} />
<div className="pos-product-sec">
<AllProducts setFieldValue={setFieldValue} values={values} dispatch={dispatch} setCartData={setCartData} CategoryData={CategoryData} getCategoryId={getCategoryId} setGetCategoryId={setGetCategoryId} />
</div>
</Col>
<Col xxl="4">
<Card className="pos-detail-card">
<PosDetailCard values={values} setFieldValue={setFieldValue} dispatch={dispatch} initValues={initValues} />
</Card>
</Col>
</Row>
</Form>
)}
</Formik>
</>
);
};
export default POS;

View File

@@ -0,0 +1,10 @@
"use client";
import OrderDetailsContain from "@/components/orders/details";
import { useParams } from "next/navigation";
const OrderDetails = () => {
const params = useParams();
return params?.updateId && <OrderDetailsContain updateId={params?.updateId} />;
};
export default OrderDetails;

View File

@@ -0,0 +1,16 @@
'use client'
import React, { useState } from "react";
import { Col } from "reactstrap";
import AllOrdersTable from "@/components/orders/AllOrdersTable";
import { OrderAPI } from "@/utils/axiosUtils/API";
const Order = () => {
const [isCheck, setIsCheck] = useState([]);
return (
<Col sm="12">
<AllOrdersTable url={OrderAPI} dateRange={true} moduleName="Order" isCheck={isCheck} setIsCheck={setIsCheck} />
</Col>
)
};
export default Order;

View File

@@ -0,0 +1,13 @@
"use client";
import PageForm from "@/components/pages/PageForm";
import FormWrapper from "@/utils/hoc/FormWrapper";
const CreatePage = () => {
return (
<FormWrapper title="CreatePage">
<PageForm />
</FormWrapper>
);
};
export default CreatePage;

View File

@@ -0,0 +1,16 @@
'use client'
import React, { useState } from 'react'
import { Col } from 'reactstrap'
import { PagesAPI } from '@/utils/axiosUtils/API';
import AllPagesTable from '@/components/pages';
const Pages = () => {
const [isCheck, setIsCheck] = useState([]);
return (
<Col sm="12">
<AllPagesTable url={PagesAPI} moduleName="Page" isCheck={isCheck} setIsCheck={setIsCheck} />
</Col>
)
}
export default Pages

View File

@@ -0,0 +1,17 @@
"use client";
import PageForm from "@/components/pages/PageForm";
import FormWrapper from "@/utils/hoc/FormWrapper";
import { useParams } from "next/navigation";
const UpdatePage = () => {
const params = useParams();
return (
params?.updateId && (
<FormWrapper title="Update Page">
<PageForm updateId={params?.updateId} />
</FormWrapper>
)
);
};
export default UpdatePage;

View File

@@ -0,0 +1,13 @@
'use client'
import PaymentDetailsForm from "@/components/paymentDetails"
import FormWrapper from "@/utils/hoc/FormWrapper"
const PaymentDetails = () => {
return (
<FormWrapper title="Payment Details">
<PaymentDetailsForm />
</FormWrapper>
)
}
export default PaymentDetails

View File

@@ -0,0 +1,56 @@
'use client'
import SelectUser from "@/components/wallet/SelectUser";
import SeleteWalletPrice from "@/components/wallet/SeleteWalletPrice";
import UserTransactionsTable from "@/components/wallet/UserTransactionsTable";
import I18NextContext from "@/helper/i18NextContext";
import { PointUserTransations } from "@/utils/axiosUtils/API";
import usePermissionCheck from "@/utils/hooks/usePermissionCheck";
import { YupObject, nameSchema } from "@/utils/validation/ValidationSchemas";
import { useTranslation } from "@/app/i18n/client";
import { Form, Formik } from "formik";
import { useContext, useRef, useState } from "react";
import { RiCoinsLine } from "react-icons/ri";
import { Col, Row } from "reactstrap";
const Point = () => {
const [isValue, setIsValue] = useState("");
const [credit, debit] = usePermissionCheck(["credit", "debit"]);
const { i18Lang } = useContext(I18NextContext);
const { t } = useTranslation(i18Lang, 'common');
const refRefetch = useRef();
return (
<div className="save-back-button">
<Formik
initialValues={{
consumer_id: "",
showBalance: "",
balance: "",
}}
validationSchema={YupObject({ consumer_id: nameSchema })}
onSubmit={(values, { setFieldValue }) => {
if (isValue == "credit") {
//Put Your Logic Here
} else {
//Put Your Logic Here
}
setFieldValue("balance", "");
}}
>
{({ values, handleSubmit, setFieldValue, errors }) => (
<>
<Form>
<Row>
<SelectUser title={t("SelectCustomer")} values={values} setFieldValue={setFieldValue} errors={errors} name={"consumer_id"} role="consumer" />
<SeleteWalletPrice values={values} setFieldValue={setFieldValue} handleSubmit={handleSubmit} setIsValue={setIsValue} title={t("Point")} description={t("PointBalance")} selectUser={"consumer_id"} icon={<RiCoinsLine />} isCredit={credit} isDebit={debit} />
</Row>
</Form>
<Col sm="12">{values["consumer_id"] !== "" && <UserTransactionsTable url={values["consumer_id"] ? PointUserTransations : ""} moduleName="UserTransations" setFieldValue={setFieldValue} userIdParams={true} ref={refRefetch} dateRange={true} paramsProps={{ consumer_id: values["consumer_id"] ? values["consumer_id"] : null }} />}</Col>
</>
)}
</Formik>
</div>
);
};
export default Point;

View File

@@ -0,0 +1,18 @@
"use client";
import ProductForm from "@/components/product/ProductForm";
import { useState } from "react";
const ProductCreate = () => {
const [resetKey, setResetKey] = useState(false);
return (
<ProductForm
setResetKey={setResetKey}
title={"AddProduct"}
key={resetKey}
/>
);
};
export default ProductCreate;

View File

@@ -0,0 +1,22 @@
"use client";
import { useState } from "react";
import { Col } from "reactstrap";
import AllProductTable from "@/components/product/AllProductTable";
import { product } from "@/utils/axiosUtils/API";
const AllUsers = () => {
const [isCheck, setIsCheck] = useState([]);
return (
<Col sm="12">
<AllProductTable
url={product}
moduleName="Product"
isCheck={isCheck}
setIsCheck={setIsCheck}
isReplicate={{ title: "Duplicate", replicateAPI: "replicate" }}
/>
</Col>
);
};
export default AllUsers;

View File

@@ -0,0 +1,12 @@
"use client";
import ProductForm from "@/components/product/ProductForm";
import { useParams } from "next/navigation";
import { useState } from "react";
const UpdateProduct = () => {
const [resetKey, setResetKey] = useState(false);
const params = useParams();
return params?.updateId && <ProductForm setResetKey={setResetKey} updateId={params?.updateId} title={"EditProduct"} key={resetKey} />;
};
export default UpdateProduct;

View File

@@ -0,0 +1,22 @@
"use client"
import React, { useState } from "react";
import { Col } from "reactstrap";
import { QuestionNAnswerAPI } from "@/utils/axiosUtils/API";
import QnATable from "@/components/qna/QnATable";
const QuestionAndAnswer = () => {
const [isCheck, setIsCheck] = useState([]);
return (
<Col sm="12">
<QnATable
url={QuestionNAnswerAPI}
moduleName="Q&A"
isCheck={isCheck}
setIsCheck={setIsCheck}
keyInPermission={"question_and_answer"}
/>
</Col>
);
};
export default QuestionAndAnswer;

View File

@@ -0,0 +1,14 @@
'use client'
import AllRefundTable from "@/components/refund/AllRefundTable";
import { RefundAPI } from "@/utils/axiosUtils/API";
import { Col } from "reactstrap";
const Refund = () => {
return (
<Col sm="12">
<AllRefundTable onlyTitle={true} url={RefundAPI} moduleName="Refund" />
</Col>
);
}
export default Refund

View File

@@ -0,0 +1,16 @@
"use client"
import React, { useState } from 'react'
import { Col } from 'reactstrap';
import { ReviewAPI } from '@/utils/axiosUtils/API';
import AllReviewsTable from '@/components/reviews';
const Reviews = () => {
const [isCheck, setIsCheck] = useState([]);
return (
<Col sm="12">
<AllReviewsTable url={ReviewAPI} moduleName="Reviews" onlyTitle={true} isCheck={isCheck} setIsCheck={setIsCheck} />
</Col>
)
}
export default Reviews

View File

@@ -0,0 +1,13 @@
"use client";
import PermissionForm from "@/components/role/PermissionForm";
import FormWrapper from "@/utils/hoc/FormWrapper";
const Role = () => {
return (
<FormWrapper title="AddRole">
<PermissionForm />
</FormWrapper>
);
};
export default Role;

View File

@@ -0,0 +1,23 @@
"use client";
import dynamic from "next/dynamic";
import { useState } from "react";
import { Col } from "reactstrap";
import { role } from "@/utils/axiosUtils/API";
const AllRolesTable = dynamic(() => import("@/components/role/AllRolesTable"),{ suspense: true,});
const AllRoles = () => {
const [isCheck, setIsCheck] = useState([]);
return (
<Col sm="12">
<AllRolesTable
url={role}
moduleName="Role"
isCheck={isCheck}
setIsCheck={setIsCheck}
/>
</Col>
);
};
export default AllRoles;

View File

@@ -0,0 +1,26 @@
"use client";
import PermissionForm from "@/components/role/PermissionForm";
import { useParams } from "next/navigation";
import { Card, CardBody, Col, Row } from "reactstrap";
const UserUpdate = () => {
const params = useParams();
return (
params?.updateId && (
<Row>
<Col xxl="8" lg="10" className="m-auto">
<Card>
<CardBody>
<div className="title-header option-title">
<h5>{t("UpdateRole")}</h5>
</div>
<PermissionForm updateId={params?.updateId} />
</CardBody>
</Card>
</Col>
</Row>
)
);
};
export default UserUpdate;

View File

@@ -0,0 +1,8 @@
"use client";
import SettingForm from "@/components/setting/SettingForm";
const Setting = () => {
return <SettingForm title={"Settings"} />;
};
export default Setting;

View File

@@ -0,0 +1,52 @@
'use client'
import Loader from "@/components/commonComponent/Loader";
import NoDataFound from "@/components/commonComponent/NoDataFound";
import FormShipping from "@/components/shipping/FormShipping";
import DeleteButton from "@/components/table/DeleteButton";
import Btn from "@/elements/buttons/Btn";
import I18NextContext from "@/helper/i18NextContext";
import request from "@/utils/axiosUtils";
import { shipping } from "@/utils/axiosUtils/API";
import FormWrapper from "@/utils/hoc/FormWrapper";
import usePermissionCheck from "@/utils/hooks/usePermissionCheck";
import { useQuery } from "@tanstack/react-query";
import Link from "next/link";
import { useContext, useState } from "react";
import { FiPlus } from "react-icons/fi";
import { RiPencilLine } from "react-icons/ri";
const Shipping = () => {
const [create, edit, destroy] = usePermissionCheck(["create", "edit", "destroy"]);
const [active, setActive] = useState(false);
const { data, isLoading } = useQuery({queryKey: [shipping], queryFn: () => request({ url: shipping }),
refetchOnWindowFocus: false, select: (data) => data.data,
});
const { i18Lang } = useContext(I18NextContext);
if (isLoading) return <Loader />
return (
<>
<FormWrapper title="Shipping" modal={
create && <Btn className="align-items-center btn-theme add-button" title="SelectCountry" onClick={() => setActive("create")}>
<FiPlus /></Btn>
}>
<FormShipping open={"create" === active ? true : false} setActive={setActive} />
{
data.length > 0 ?
<ul className="country-list">
{data?.map((elem, index) => (
<li key={index}>
<h5>{elem.country.name}</h5>
{edit && <Link href={`/${i18Lang}/shipping/update/${elem?.id}`}><RiPencilLine className="text-success" />
</Link>}
{destroy && <DeleteButton id={elem?.id} />}
</li>
))}
</ul>
: <NoDataFound />
}
</FormWrapper>
</>
);
};
export default Shipping;

View File

@@ -0,0 +1,90 @@
"use client";
import React, { useContext, useEffect, useState } from "react";
import { useMutation, useQuery } from "@tanstack/react-query";
import { useParams, useRouter } from "next/navigation";
import { RiArrowDownLine } from "react-icons/ri";
import { FiPlus } from "react-icons/fi";
import Loader from "@/components/commonComponent/Loader";
import NoDataFound from "@/components/commonComponent/NoDataFound";
import FormsShippingRuleCreation from "@/components/shipping/FormsShippingRuleCreation";
import ShowModal from "@/elements/alerts&Modals/Modal";
import Btn from "@/elements/buttons/Btn";
import request from "@/utils/axiosUtils";
import { shipping, shippingRule } from "@/utils/axiosUtils/API";
import SuccessHandle from "@/utils/customFunctions/SuccessHandle";
import { ToastNotification } from "@/utils/customFunctions/ToastNotification";
import FormWrapper from "@/utils/hoc/FormWrapper";
import I18NextContext from "@/helper/i18NextContext";
import { useTranslation } from "@/app/i18n/client";
import NoCategorySVG from "../../../../../../../public/assets/svg/no-category.svg";
const AddShippingRules = () => {
const params = useParams();
const router = useRouter();
const { i18Lang } = useContext(I18NextContext);
const { t } = useTranslation(i18Lang, "common");
const [active, setActive] = useState(false);
const updateId = params?.updateId;
const { data, isLoading, refetch } = useQuery({ queryKey: [`${shipping}/update/${updateId}`], queryFn: () => request({ url: `${shipping}/${updateId}` }), enabled: false, refetchOnWindowFocus: false, select: (data) => data?.data });
const { mutate: createMutate, isLoading: createMutateIsloading } = useMutation({
mutationFn: (data) => request({ url: shippingRule, data, method: "post" }),
onSuccess: (resData) => {
SuccessHandle(resData, false, `${shipping}/update/${updateId}`, t("ShippingCreatedSuccessFully"));
resData.status === 201 && setActive(false);
refetch();
},
onError: () => ToastNotification("error"),
});
const { mutate: updateMutate, isLoading: updateLoading } = useMutation({
mutationFn: (data) => request({ url: shippingRule + "/" + active, method: "put", data }),
onSuccess: (resData) => {
SuccessHandle(resData, false, `${shipping}/update/${updateId}`, t("RuleUpdatedSuccessfully"));
resData.status === 200 && setActive(false);
refetch();
},
});
useEffect(() => {
params?.updateId && refetch();
}, [params?.updateId]);
if (isLoading && updateId) return <Loader />;
if (!data) return null;
return (
<FormWrapper
title={data?.country?.name}
modal={
<div className="d-flex">
<Btn className="me-2 btn-outline btn-lg" title="Back" onClick={() => router.back()} />
<Btn className="align-items-center btn-theme add-button" title={"NewRules"} onClick={() => setActive({ create: data?.id })}>
<FiPlus />
</Btn>
</div>
}
>
<div className="dflex-wgap">
<ShowModal title={"AddShippingRule"} modalAttr={{ className: "modal-lg" }} setModal={setActive} open={active?.create === data?.id ? true : false} close={true}>
<FormsShippingRuleCreation setActive={setActive} mutate={createMutate} shipping_id={active} loading={createMutateIsloading} />
</ShowModal>
</div>
{data?.shipping_rules?.length > 0 ? (
data.shipping_rules.map((item, index) => (
<div className="mt-3 shipping-accordion-custom" key={index}>
<div className="p-3 rule-dropdown d-flex justify-content-between" onClick={() => setActive((prev) => prev !== item.id && item.id)}>
{item.name}
<RiArrowDownLine />
</div>
{active === item.id && (
<div className="rule-edit-form">
<FormsShippingRuleCreation rules={item} mutate={updateMutate} shipping_id={data?.id} setActive={setActive} loading={updateLoading} refetch={refetch} />
</div>
)}
</div>
))
) : (
<NoDataFound customImage={NoCategorySVG} />
)}
</FormWrapper>
);
};
export default AddShippingRules;

View File

@@ -0,0 +1,13 @@
"use client";
import StoreForm from "@/components/store/StoreForm";
import FormWrapper from "@/utils/hoc/FormWrapper";
const StoreCreate = () => {
return (
<FormWrapper title="AddStore">
<StoreForm />
</FormWrapper>
);
};
export default StoreCreate;

View File

@@ -0,0 +1,16 @@
'use client'
import { useState } from "react";
import { Col } from "reactstrap";
import AllStoresTable from "@/components/store/AllStoresTable";
import { store } from "@/utils/axiosUtils/API";
const AllStores = () => {
const [isCheck, setIsCheck] = useState([]);
return (
<Col sm="12">
<AllStoresTable url={store} moduleName="Store" isCheck={isCheck} setIsCheck={setIsCheck} />
</Col>
);
};
export default AllStores;

View File

@@ -0,0 +1,18 @@
"use client";
import StoreForm from "@/components/store/StoreForm";
import FormWrapper from "@/utils/hoc/FormWrapper";
import { useParams } from "next/navigation";
const StoreUpdate = () => {
const params = useParams();
return (
params?.updateId && (
<FormWrapper title="UpdateStore">
<StoreForm updateId={params?.updateId} />
</FormWrapper>
)
);
};
export default StoreUpdate;

View File

@@ -0,0 +1,13 @@
"use client";
import TagForm from "@/components/tag/TagForm";
import FormWrapper from "@/utils/hoc/FormWrapper";
const TagsCreate = () => {
return (
<FormWrapper title="AddTag">
<TagForm type={"product"} />
</FormWrapper>
);
};
export default TagsCreate;

View File

@@ -0,0 +1,22 @@
"use client";
import React, { useState } from "react";
import { Col } from "reactstrap";
import AllTagsTable from "@/components/tag/AllTagsTable";
import { tag } from "@/utils/axiosUtils/API";
const AllTags = () => {
const [isCheck, setIsCheck] = useState([]);
return (
<Col sm="12">
<AllTagsTable
url={tag}
moduleName="Tag"
isCheck={isCheck}
setIsCheck={setIsCheck}
type={"product"}
/>
</Col>
);
};
export default AllTags;

View File

@@ -0,0 +1,18 @@
"use client";
import TagForm from "@/components/tag/TagForm";
import FormWrapper from "@/utils/hoc/FormWrapper";
import { useParams } from "next/navigation";
const RoleUpdate = () => {
const params = useParams();
return (
params?.updateId && (
<FormWrapper title="UpdateTag">
<TagForm updateId={params?.updateId} type={"product"} />
</FormWrapper>
)
);
};
export default RoleUpdate;

View File

@@ -0,0 +1,13 @@
'use client'
import TaxForm from "@/components/tax/TaxForm";
import FormWrapper from "@/utils/hoc/FormWrapper";
const TaxCreate = () => {
return (
<FormWrapper title="AddTax">
<TaxForm />
</FormWrapper>
);
};
export default TaxCreate;

View File

@@ -0,0 +1,16 @@
'use client'
import AllTax from "@/components/tax/AllTax";
import { tax } from "@/utils/axiosUtils/API";
import { useState } from "react";
import { Col } from "reactstrap";
const AllRoles = () => {
const [isCheck, setIsCheck] = useState([]);
return (
<Col sm="12">
<AllTax url={tax} moduleName="Tax" isCheck={isCheck} setIsCheck={setIsCheck} />
</Col>
);
};
export default AllRoles;

View File

@@ -0,0 +1,32 @@
"use client";
import { useTranslation } from "@/app/i18n/client";
import TaxForm from "@/components/tax/TaxForm";
import I18NextContext from "@/helper/i18NextContext";
import { useParams } from "next/navigation";
import { useContext } from "react";
import { Card, CardBody, Col, Row } from "reactstrap";
const TaxUpdate = () => {
const params = useParams();
const { i18Lang } = useContext(I18NextContext);
const { t } = useTranslation(i18Lang, "common");
return (
params?.updateId && (
<Row>
<Col sm="8" className="m-auto">
<Card>
<CardBody>
<div className="card-header-2">
<h5>{t("UpdateTax")}</h5>
</div>
<TaxForm updateId={params?.updateId} />
</CardBody>
</Card>
</Col>
</Row>
)
);
};
export default TaxUpdate;

View File

@@ -0,0 +1,10 @@
'use client'
import HomePageSixForm from '@/components/homePages/homePage6';
const ThemeSix = () => {
return (
<HomePageSixForm title={"Berlin"} />
)
}
export default ThemeSix

View File

@@ -0,0 +1,9 @@
'use client'
import HomePageSevenForm from "@/components/homePages/homePage7"
const ThemeNine = () => {
return (
<HomePageSevenForm title={"Denver"} />
)
}
export default ThemeNine

View File

@@ -0,0 +1,10 @@
'use client'
import HomePageFiveForm from '@/components/homePages/homePage5';
const ThemeFive = () => {
return (
<HomePageFiveForm title={"Madrid"} />
)
}
export default ThemeFive

View File

@@ -0,0 +1,10 @@
'use client'
import HomePageThreeForm from '@/components/homePages/homePage3';
const ThemeThree = () => {
return (
<HomePageThreeForm title={"Osaka"} />
)
}
export default ThemeThree

View File

@@ -0,0 +1,61 @@
'use client'
import { useContext, useEffect, useState } from "react";
import Image from "next/image";
import { useRouter } from "next/navigation";
import { useQuery } from "@tanstack/react-query";
import { Card, CardBody, Col, Row } from "reactstrap";
import Loader from "@/components/commonComponent/Loader";
import request from "@/utils/axiosUtils";
import { theme } from "@/utils/axiosUtils/API";
import usePermissionCheck from "@/utils/hooks/usePermissionCheck";
import I18NextContext from "@/helper/i18NextContext";
import { useTranslation } from "@/app/i18n/client";
const Theme = () => {
const { i18Lang } = useContext(I18NextContext);
const { t } = useTranslation(i18Lang, 'common');
const [edit] = usePermissionCheck(["edit"]);
const [activeTheme, setActiveTheme] = useState('')
const router = useRouter();
const { data, isLoading, refetch } = useQuery({queryKey: [theme], queryFn: () => request({ url: theme }), refetchOnMount: false, select: (data) => data?.data?.data });
useEffect(() => {
data && data?.forEach((elem) => {
elem.status ? setActiveTheme(elem.id) : ''
})
}, [data])
const handleClick = (value, i) => {
setActiveTheme(value.id)
}
if (isLoading) return <Loader />
return (
<Col sm="12">
<Card>
<CardBody>
<div className="title-header option-title justify-content-start">
<h5>{t("ThemeLibrary")}</h5>
</div>
<Row className="row row-cols-xxl-4 row-cols-xl-3 row-cols-lg-2 row-cols-md-3 row-cols-sm-2 row-cols-1 g-lg-5 g-4 layout-selection-sec ratio_square">
{data?.map((theme, i) => (
<div key={i}>
<div className={`theme-card ${activeTheme == theme.id ? "active" : ""}`}>
<div className="library-box" onClick={(e) => { e.preventDefault(); edit && router.push(`/${i18Lang}/theme/${theme.slug}`) }}>
<a href="#javascript">
<Image src={theme.image} className="img-fluid bg-img bg_size_content" alt={theme?.name} height={250} width={300} />
</a>
<a href="#javascript" className="details-box">{t("ThemeDetails")}</a>
</div>
<div className="content-sec">
<h5>{theme.name}</h5>
{edit && <a href="#javascript" className="disable" onClick={() => handleClick(theme, i)}>{activeTheme == theme.id ? t("Activated") : t('Active')}</a>}
</div>
</div>
</div>
))}
</Row>
</CardBody>
</Card>
</Col>
);
};
export default Theme;

View File

@@ -0,0 +1,10 @@
'use client'
import HomePageOneForm from '@/components/homePages/homePage1'
const ThemeOne = () => {
return (
<HomePageOneForm title={"Paris"} />
)
}
export default ThemeOne

View File

@@ -0,0 +1,10 @@
'use client'
import HomePageFourForm from '@/components/homePages/homePage4';
const ThemeFour = () => {
return (
<HomePageFourForm title={"Rome"} />
)
}
export default ThemeFour

View File

@@ -0,0 +1,9 @@
'use client'
import HomePageTwoForm from '@/components/homePages/homePage2';
const ThemeTwo = () => {
return (
<HomePageTwoForm title={"Tokyo"} />
)
}
export default ThemeTwo

View File

@@ -0,0 +1,9 @@
'use client'
import ThemeOptionForm from "@/components/themeOption";
const ThemeOption = () => {
return <ThemeOptionForm title={"ThemeOption"} />;
}
export default ThemeOption

View File

@@ -0,0 +1,14 @@
"use client";
import UserForm from "@/components/user/UserForm";
import FormWrapper from "@/utils/hoc/FormWrapper";
const AddNewUser = () => {
return (
<FormWrapper title="AddUser">
<UserForm />
</FormWrapper>
);
};
export default AddNewUser;

View File

@@ -0,0 +1,22 @@
"use client"
import React, { useState } from "react";
import { Col } from "reactstrap";
import { UserExportAPI, UserImportAPI, user } from "@/utils/axiosUtils/API";
import AllUsersTable from "@/components/user/AllUsersTable";
const AllUsers = () => {
const [isCheck, setIsCheck] = useState([]);
return (
<Col sm="12">
<AllUsersTable
url={user}
moduleName="User"
isCheck={isCheck}
setIsCheck={setIsCheck}
importExport={{ importUrl: UserImportAPI, exportUrl: UserExportAPI }}
/>
</Col>
);
};
export default AllUsers;

View File

@@ -0,0 +1,17 @@
"use client";
import UserForm from "@/components/user/UserForm";
import FormWrapper from "@/utils/hoc/FormWrapper";
import { useParams } from "next/navigation";
const UserUpdate = () => {
const params = useParams();
return (
params?.updateId && (
<FormWrapper title="UpdateUser">
<UserForm updateId={params?.updateId} />
</FormWrapper>
)
);
};
export default UserUpdate;

View File

@@ -0,0 +1,60 @@
"use client"
import SelectUser from '@/components/wallet/SelectUser';
import SeleteWalletPrice from '@/components/wallet/SeleteWalletPrice';
import WrappedVendor from '@/components/wallet/WrappedVendor';
import AccountContext from '@/helper/accountContext';
import I18NextContext from '@/helper/i18NextContext';
import { VendorTransations } from '@/utils/axiosUtils/API';
import usePermissionCheck from '@/utils/hooks/usePermissionCheck';
import { YupObject, nameSchema } from '@/utils/validation/ValidationSchemas';
import { useTranslation } from '@/app/i18n/client';
import { Form, Formik } from 'formik';
import { useContext, useEffect, useRef, useState } from 'react';
import { RiWallet2Line } from 'react-icons/ri';
import { Col, Row } from 'reactstrap';
const VendorWallet = () => {
const { role, setRole } = useContext(AccountContext)
useEffect(() => {
setRole(JSON.parse(localStorage.getItem("role"))?.name)
}, [])
const { i18Lang } = useContext(I18NextContext);
const { t } = useTranslation(i18Lang, 'common');
const [credit, debit] = usePermissionCheck(["credit", "debit"]);
const [isValue, setIsValue] = useState("");
const refRefetch = useRef()
return (
<div className='save-back-button'>
<Formik
initialValues={{
vendor_id: "",
showBalance: '',
balance: ''
}}
validationSchema={YupObject({ vendor_id: nameSchema })}
onSubmit={() => {
if (isValue == "credit") {
// Put Your Logic Here
} else {
// Put Your Logic Here
}
}}>
{({ values, handleSubmit, setFieldValue }) => (
<>
<Form>
<Row>
{role !== "vendor" && <SelectUser title={t("SelectVendor")} values={values} setFieldValue={setFieldValue} role={"vendor"} name={'vendor_id'} userRole={role} />}
<SeleteWalletPrice values={values} setFieldValue={setFieldValue} handleSubmit={handleSubmit} setIsValue={setIsValue} title={t("Wallet")} description={t("WalletBalance")} selectUser={'vendor_id'} icon={<RiWallet2Line />} isCredit={credit} isDebit={debit} role={role} />
</Row>
</Form>
<Col sm="12">
<WrappedVendor url={VendorTransations} moduleName="UserTransations" setFieldValue={setFieldValue} values={values} ref={refRefetch} dateRange={true} userIdParams={true} role={role} />
</Col>
</>
)}
</Formik>
</div>
)
}
export default VendorWallet;

View File

@@ -0,0 +1,56 @@
'use client'
import SelectUser from '@/components/wallet/SelectUser'
import SeleteWalletPrice from '@/components/wallet/SeleteWalletPrice'
import UserTransactionsTable from '@/components/wallet/UserTransactionsTable'
import I18NextContext from '@/helper/i18NextContext'
import { UserTransations } from '@/utils/axiosUtils/API'
import usePermissionCheck from '@/utils/hooks/usePermissionCheck'
import { YupObject, nameSchema } from '@/utils/validation/ValidationSchemas'
import { useTranslation } from '@/app/i18n/client'
import { Form, Formik } from 'formik'
import { useContext, useRef, useState } from 'react'
import { RiWallet2Line } from 'react-icons/ri'
import { Col, Row } from 'reactstrap'
const Wallet = () => {
const [isValue, setIsValue] = useState("")
const [credit, debit] = usePermissionCheck(["credit", "debit"]);
const { i18Lang } = useContext(I18NextContext);
const { t } = useTranslation(i18Lang, 'common');
const refRefetch = useRef()
return (
<div className='save-back-button'>
<Formik
initialValues={{
consumer_id: "",
showBalance: '',
balance: ''
}}
validationSchema={YupObject({ consumer_id: nameSchema })}
onSubmit={(values) => {
if (isValue == "credit") {
//Put Your Logic Here
} else {
//Put Your Logic Here
}
}}>
{({ values, handleSubmit, setFieldValue }) => (
<>
<Form>
<Row>
<SelectUser title={t("SelectCustomer")} values={values} setFieldValue={setFieldValue} role="consumer" name={'consumer_id'} userRole={''} />
<SeleteWalletPrice values={values} setFieldValue={setFieldValue} handleSubmit={handleSubmit} setIsValue={setIsValue} title={t("Wallet")} description={t("WalletBalance")} selectUser={'consumer_id'} icon={<RiWallet2Line />} isCredit={credit} isDebit={debit} />
</Row>
</Form>
<Col sm="12">
{values['consumer_id'] !== '' && < UserTransactionsTable url={UserTransations} moduleName="UserTransations" setFieldValue={setFieldValue} userIdParams={true} ref={refRefetch} dateRange={true} paramsProps={{ consumer_id: values['consumer_id'] }} />}
</Col>
</>
)}
</Formik>
</div>
)
}
export default Wallet;

View File

@@ -0,0 +1,9 @@
'use client'
import VendorDetails from "@/components/withdrawRequest/VendorDetails"
const WithdrawRequest = () => {
return <VendorDetails />
}
export default WithdrawRequest

View File

@@ -0,0 +1,65 @@
'use client'
import { RegistrationInitialValues, RegistrationValidationSchema } from "@/components/auth/RegistrationFormObjects";
import UserAddress from "@/components/auth/UserAddress";
import UserContact from "@/components/auth/UserContact";
import UserPersonalInfo from "@/components/auth/UserPersonalInfo";
import Btn from "@/elements/buttons/Btn";
import I18NextContext from "@/helper/i18NextContext";
import { YupObject } from "@/utils/validation/ValidationSchemas";
import { useTranslation } from "@/app/i18n/client";
import { Form, Formik } from "formik";
import Link from "next/link";
import { useRouter } from "next/navigation";
import { useContext } from "react";
import { Col, Container, Row } from "reactstrap";
const VendorRegister = () => {
const { i18Lang } = useContext(I18NextContext);
const { t } = useTranslation(i18Lang, 'common');
const router = useRouter()
return (
<section className='log-in-section section-b-space'>
<Container className='w-100'>
<Row>
<Col xl={7}>
<div className="log-in-box">
<div className="log-in-title">
<h3>{"Welcome To Fastkart"}</h3>
<h4>{"Setup Your Store Information"}</h4>
</div>
<div className="input-box">
<Formik
initialValues={RegistrationInitialValues}
validationSchema={YupObject({
...RegistrationValidationSchema,
})}
onSubmit={(values) => {
values["status"] = 1;
router.push(`/${i18Lang}/auth/login`)
}}
>
{({ values, errors }) => (
<Form className="row g-4">
<UserPersonalInfo />
<UserAddress values={values} />
<UserContact />
<Col xs={12}>
<Btn title="Submit" className="btn btn-animation w-100 justify-content-center" type="submit" color="false" />
<div className="sign-up-box">
<h4>{t("Alreadyhaveanaccount?")}</h4>
<Link href={`/${i18Lang}/auth/login`}>{t("Login")}</Link>
</div>
</Col>
</Form>
)}
</Formik>
</div>
</div>
</Col>
</Row>
</Container>
</section>
);
};
export default VendorRegister;

29
src/app/[lng]/layout.js Normal file
View File

@@ -0,0 +1,29 @@
import '../../../public/assets/scss/app.scss'
import I18NextProvider from "@/helper/i18NextContext/I18NextProvider"
import TanstackWrapper from "@/layout/TanstackWrapper"
export async function generateMetadata() {
// fetch data
const settingData = await fetch(`${process.env.API_PROD_URL}settings`).then((res) => res.json()).catch((err) => console.log("err", err))
return {
metadataBase: new URL(process.env.API_PROD_URL),
title: settingData?.values?.general?.site_title,
description: settingData?.values?.general?.site_tagline,
icons: {
icon: settingData?.values?.general?.favicon_image?.original_url,
link: {
rel: "stylesheet",
href: "https://fonts.googleapis.com/css2?family=Public+Sans&display=swap"
},
}
}
}
export default function RootLayout({ children, params: { lng } }) {
return (
<html lang={lng}>
<body suppressHydrationWarning={true}>
<I18NextProvider><TanstackWrapper>{children}</TanstackWrapper></I18NextProvider></body>
</html>
)
}

View File

@@ -0,0 +1,677 @@
{
"data": [
{
"id": 1470,
"collection_name": "attachment",
"name": "01",
"file_name": "01.jpg",
"mime_type": "image/jpeg",
"disk": "public",
"conversions_disk": "public",
"size": "1006040",
"created_by_id": "1",
"created_at": "2023-10-04T12:51:37.000000Z",
"updated_at": "2023-10-04T12:51:37.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1471,
"collection_name": "attachment",
"name": "02",
"file_name": "02.jpg",
"mime_type": "image/jpeg",
"disk": "public",
"conversions_disk": "public",
"size": "387500",
"created_by_id": "1",
"created_at": "2023-10-04T12:51:37.000000Z",
"updated_at": "2023-10-04T12:51:37.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1472,
"collection_name": "attachment",
"name": "03",
"file_name": "03.jpg",
"mime_type": "image/jpeg",
"disk": "public",
"conversions_disk": "public",
"size": "144913",
"created_by_id": "1",
"created_at": "2023-10-04T12:51:37.000000Z",
"updated_at": "2023-10-04T12:51:37.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1473,
"collection_name": "attachment",
"name": "04",
"file_name": "04.jpg",
"mime_type": "image/jpeg",
"disk": "public",
"conversions_disk": "public",
"size": "437886",
"created_by_id": "1",
"created_at": "2023-10-04T12:51:37.000000Z",
"updated_at": "2023-10-04T12:51:37.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1465,
"collection_name": "attachment",
"name": "Group 427320141",
"file_name": "Group-427320141.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "8384",
"created_by_id": "1",
"created_at": "2023-09-30T09:27:07.000000Z",
"updated_at": "2023-09-30T09:27:07.000000Z",
"original_url": "/assets/images/data/avtar.jpg"
},
{
"id": 1466,
"collection_name": "attachment",
"name": "Group 427320142",
"file_name": "Group-427320142.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "8067",
"created_by_id": "1",
"created_at": "2023-09-30T09:27:07.000000Z",
"updated_at": "2023-09-30T09:27:07.000000Z",
"original_url": "/assets/images/data/avtar.jpg"
},
{
"id": 1467,
"collection_name": "attachment",
"name": "Group 427320143",
"file_name": "Group-427320143.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "9441",
"created_by_id": "1",
"created_at": "2023-09-30T09:27:07.000000Z",
"updated_at": "2023-09-30T09:27:07.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1468,
"collection_name": "attachment",
"name": "Group 427320144",
"file_name": "Group-427320144.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "8563",
"created_by_id": "1",
"created_at": "2023-09-30T09:27:07.000000Z",
"updated_at": "2023-09-30T09:27:07.000000Z",
"original_url": "/assets/images/data/avtar.jpg"
},
{
"id": 1463,
"collection_name": "attachment",
"name": "03",
"file_name": "03.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "122551",
"created_by_id": "1",
"created_at": "2023-09-23T05:59:17.000000Z",
"updated_at": "2023-09-23T05:59:17.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1461,
"collection_name": "attachment",
"name": "02",
"file_name": "02.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "805460",
"created_by_id": "1",
"created_at": "2023-09-23T05:45:36.000000Z",
"updated_at": "2023-09-23T05:45:36.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1456,
"collection_name": "attachment",
"name": "05",
"file_name": "05.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "19580",
"created_by_id": "1",
"created_at": "2023-09-23T04:35:00.000000Z",
"updated_at": "2023-09-23T04:35:00.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1454,
"collection_name": "attachment",
"name": "fruite-Banner",
"file_name": "fruite-Banner.jpg",
"mime_type": "image/jpeg",
"disk": "public",
"conversions_disk": "public",
"size": "1648482",
"created_by_id": "1",
"created_at": "2023-09-22T09:14:56.000000Z",
"updated_at": "2023-09-22T09:14:56.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1449,
"collection_name": "attachment",
"name": "01",
"file_name": "01.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "95506",
"created_by_id": "1",
"created_at": "2023-09-22T08:52:17.000000Z",
"updated_at": "2023-09-22T08:52:17.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1450,
"collection_name": "attachment",
"name": "02",
"file_name": "02.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "103393",
"created_by_id": "1",
"created_at": "2023-09-22T08:52:17.000000Z",
"updated_at": "2023-09-22T08:52:17.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1451,
"collection_name": "attachment",
"name": "03",
"file_name": "03.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "12014",
"created_by_id": "1",
"created_at": "2023-09-22T08:52:17.000000Z",
"updated_at": "2023-09-22T08:52:17.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1452,
"collection_name": "attachment",
"name": "04",
"file_name": "04.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "13034",
"created_by_id": "1",
"created_at": "2023-09-22T08:52:17.000000Z",
"updated_at": "2023-09-22T08:52:17.000000Z",
"original_url": "/assets/images/data/logo.png"
},
{
"id": 1447,
"collection_name": "attachment",
"name": "madrid_05",
"file_name": "madrid_05.jpg",
"mime_type": "image/jpeg",
"disk": "public",
"conversions_disk": "public",
"size": "2163999",
"created_by_id": "1",
"created_at": "2023-09-22T03:28:51.000000Z",
"updated_at": "2023-09-22T03:28:51.000000Z",
"original_url": "/assets/images/data/banner.jpg"
},
{
"id": 1445,
"collection_name": "attachment",
"name": "sizechart_jeans",
"file_name": "sizechart_jeans.jpg",
"mime_type": "image/jpeg",
"disk": "public",
"conversions_disk": "public",
"size": "145889",
"created_by_id": "1",
"created_at": "2023-09-21T04:11:53.000000Z",
"updated_at": "2023-09-21T04:11:53.000000Z",
"original_url": "/assets/images/data/sizechart_jeans.jpg"
},
{
"id": 1441,
"collection_name": "attachment",
"name": "store01",
"file_name": "store01.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "81368",
"created_by_id": "1",
"created_at": "2023-09-20T09:37:56.000000Z",
"updated_at": "2023-09-20T09:37:56.000000Z",
"original_url": "/assets/images/data/logo.png"
},
{
"id": 1439,
"collection_name": "attachment",
"name": "store02",
"file_name": "store02.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "75525",
"created_by_id": "1",
"created_at": "2023-09-20T09:37:48.000000Z",
"updated_at": "2023-09-20T09:37:48.000000Z",
"original_url": "/assets/images/data/logo.png"
},
{
"id": 1437,
"collection_name": "attachment",
"name": "sizechart",
"file_name": "sizechart.jpg",
"mime_type": "image/jpeg",
"disk": "public",
"conversions_disk": "public",
"size": "258339",
"created_by_id": "1",
"created_at": "2023-09-20T08:11:56.000000Z",
"updated_at": "2023-09-20T08:11:56.000000Z",
"original_url": "/assets/images/data/sizechart.jpg"
},
{
"id": 1434,
"collection_name": "attachment",
"name": "Instagram story - 1",
"file_name": "Instagram-story---1.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "90205",
"created_by_id": "1",
"created_at": "2023-09-19T09:57:43.000000Z",
"updated_at": "2023-09-19T09:57:43.000000Z",
"original_url": "/assets/images/data/logo.png"
},
{
"id": 1435,
"collection_name": "attachment",
"name": "Instagram story - 2",
"file_name": "Instagram-story---2.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "54948",
"created_by_id": "1",
"created_at": "2023-09-19T09:57:43.000000Z",
"updated_at": "2023-09-19T09:57:43.000000Z",
"original_url": "/assets/images/data/logo.png"
},
{
"id": 1429,
"collection_name": "attachment",
"name": "Cap_1",
"file_name": "Cap_1.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "35133",
"created_by_id": "1",
"created_at": "2023-09-19T09:56:56.000000Z",
"updated_at": "2023-09-19T09:56:56.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1430,
"collection_name": "attachment",
"name": "Cap_2",
"file_name": "Cap_2.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "82505",
"created_by_id": "1",
"created_at": "2023-09-19T09:56:56.000000Z",
"updated_at": "2023-09-19T09:56:56.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1431,
"collection_name": "attachment",
"name": "Cap_3",
"file_name": "Cap_3.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "75801",
"created_by_id": "1",
"created_at": "2023-09-19T09:56:56.000000Z",
"updated_at": "2023-09-19T09:56:56.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1432,
"collection_name": "attachment",
"name": "Cap_4",
"file_name": "Cap_4.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "61387",
"created_by_id": "1",
"created_at": "2023-09-19T09:56:56.000000Z",
"updated_at": "2023-09-19T09:56:56.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1424,
"collection_name": "attachment",
"name": "Goggles_1",
"file_name": "Goggles_1.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "17087",
"created_by_id": "1",
"created_at": "2023-09-19T09:11:06.000000Z",
"updated_at": "2023-09-19T09:11:06.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1425,
"collection_name": "attachment",
"name": "Goggles_1-1",
"file_name": "Goggles_1-1.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "26797",
"created_by_id": "1",
"created_at": "2023-09-19T09:11:06.000000Z",
"updated_at": "2023-09-19T09:11:06.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1426,
"collection_name": "attachment",
"name": "Goggles_1-2",
"file_name": "Goggles_1-2.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "17116",
"created_by_id": "1",
"created_at": "2023-09-19T09:11:06.000000Z",
"updated_at": "2023-09-19T09:11:06.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1427,
"collection_name": "attachment",
"name": "Goggles_1-3",
"file_name": "Goggles_1-3.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "23605",
"created_by_id": "1",
"created_at": "2023-09-19T09:11:06.000000Z",
"updated_at": "2023-09-19T09:11:06.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1419,
"collection_name": "attachment",
"name": "Headphone_1",
"file_name": "Headphone_1.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "54111",
"created_by_id": "1",
"created_at": "2023-09-19T09:10:27.000000Z",
"updated_at": "2023-09-19T09:10:27.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1420,
"collection_name": "attachment",
"name": "Headphone_2",
"file_name": "Headphone_2.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "35615",
"created_by_id": "1",
"created_at": "2023-09-19T09:10:27.000000Z",
"updated_at": "2023-09-19T09:10:27.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1421,
"collection_name": "attachment",
"name": "Headphone_3",
"file_name": "Headphone_3.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "43332",
"created_by_id": "1",
"created_at": "2023-09-19T09:10:27.000000Z",
"updated_at": "2023-09-19T09:10:27.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1422,
"collection_name": "attachment",
"name": "Headphone_4",
"file_name": "Headphone_4.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "35895",
"created_by_id": "1",
"created_at": "2023-09-19T09:10:27.000000Z",
"updated_at": "2023-09-19T09:10:27.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1414,
"collection_name": "attachment",
"name": "Wallet_1",
"file_name": "Wallet_1.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "52641",
"created_by_id": "1",
"created_at": "2023-09-19T09:09:53.000000Z",
"updated_at": "2023-09-19T09:09:53.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1415,
"collection_name": "attachment",
"name": "Wallet_2",
"file_name": "Wallet_2.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "78275",
"created_by_id": "1",
"created_at": "2023-09-19T09:09:53.000000Z",
"updated_at": "2023-09-19T09:09:53.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1416,
"collection_name": "attachment",
"name": "Wallet_3",
"file_name": "Wallet_3.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "60098",
"created_by_id": "1",
"created_at": "2023-09-19T09:09:53.000000Z",
"updated_at": "2023-09-19T09:09:53.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1417,
"collection_name": "attachment",
"name": "Wallet_4",
"file_name": "Wallet_4.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "51527",
"created_by_id": "1",
"created_at": "2023-09-19T09:09:53.000000Z",
"updated_at": "2023-09-19T09:09:53.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1409,
"collection_name": "attachment",
"name": "Socks_1",
"file_name": "Socks_1.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "83126",
"created_by_id": "1",
"created_at": "2023-09-19T09:09:02.000000Z",
"updated_at": "2023-09-19T09:09:02.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1410,
"collection_name": "attachment",
"name": "Socks_2",
"file_name": "Socks_2.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "41646",
"created_by_id": "1",
"created_at": "2023-09-19T09:09:02.000000Z",
"updated_at": "2023-09-19T09:09:02.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1411,
"collection_name": "attachment",
"name": "Socks_3",
"file_name": "Socks_3.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "51078",
"created_by_id": "1",
"created_at": "2023-09-19T09:09:02.000000Z",
"updated_at": "2023-09-19T09:09:02.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1412,
"collection_name": "attachment",
"name": "Socks_4",
"file_name": "Socks_4.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "72376",
"created_by_id": "1",
"created_at": "2023-09-19T09:09:02.000000Z",
"updated_at": "2023-09-19T09:09:02.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1404,
"collection_name": "attachment",
"name": "Clothes_dryer_1",
"file_name": "Clothes_dryer_1.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "53526",
"created_by_id": "1",
"created_at": "2023-09-19T09:08:22.000000Z",
"updated_at": "2023-09-19T09:08:22.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1405,
"collection_name": "attachment",
"name": "Clothes_dryer_2",
"file_name": "Clothes_dryer_2.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "56445",
"created_by_id": "1",
"created_at": "2023-09-19T09:08:22.000000Z",
"updated_at": "2023-09-19T09:08:22.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1406,
"collection_name": "attachment",
"name": "Clothes_dryer_3",
"file_name": "Clothes_dryer_3.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "52504",
"created_by_id": "1",
"created_at": "2023-09-19T09:08:22.000000Z",
"updated_at": "2023-09-19T09:08:22.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1407,
"collection_name": "attachment",
"name": "Clothes_dryer_4",
"file_name": "Clothes_dryer_4.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "51956",
"created_by_id": "1",
"created_at": "2023-09-19T09:08:22.000000Z",
"updated_at": "2023-09-19T09:08:22.000000Z",
"original_url": "/assets/images/data/product.png"
},
{
"id": 1399,
"collection_name": "attachment",
"name": "Coffee_maker_1",
"file_name": "Coffee_maker_1.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "30297",
"created_by_id": "1",
"created_at": "2023-09-19T09:03:35.000000Z",
"updated_at": "2023-09-19T09:03:35.000000Z",
"original_url": "/assets/images/data/product.png"
}
],
"total": 933
}

View File

@@ -0,0 +1,6 @@
import media from "./media.json";
import { NextResponse } from "next/server";
export async function GET() {
return NextResponse.json(media);
}

View File

@@ -0,0 +1,10 @@
import attribute from "../attribute.json";
import { NextResponse } from "next/server";
export async function GET(_, { params }) {
const singleBlog = params.updateId;
const attributeObj = attribute?.data.find((elem) => elem.id == singleBlog);
return NextResponse.json(attributeObj);
}

View File

@@ -0,0 +1,358 @@
{
"data": [
{
"id": 11,
"name": "Liter",
"style": "dropdown",
"slug": "liter",
"status": 1,
"created_by_id": "1",
"created_at": "2023-09-20T09:54:07.000000Z",
"updated_at": "2023-09-20T09:54:07.000000Z",
"deleted_at": null,
"attribute_values": [
{
"id": 24,
"value": "5 Liter",
"slug": "5-liter",
"hex_color": null,
"attribute_id": "11",
"created_by_id": "1",
"created_at": "2023-09-20T09:54:07.000000Z",
"updated_at": "2023-09-20T09:54:07.000000Z",
"deleted_at": null
},
{
"id": 25,
"value": "10 Liter",
"slug": "10-liter",
"hex_color": null,
"attribute_id": "11",
"created_by_id": "1",
"created_at": "2023-09-20T09:54:07.000000Z",
"updated_at": "2023-09-20T09:54:07.000000Z",
"deleted_at": null
}
]
},
{
"id": 10,
"name": "Color",
"style": "color",
"slug": "color",
"status": 1,
"created_by_id": "1",
"created_at": "2023-09-20T09:19:49.000000Z",
"updated_at": "2023-09-20T09:19:49.000000Z",
"deleted_at": null,
"attribute_values": [
{
"id": 16,
"value": "Red",
"slug": "red",
"hex_color": "#d03535",
"attribute_id": "10",
"created_by_id": "1",
"created_at": "2023-09-20T09:19:49.000000Z",
"updated_at": "2023-09-20T09:19:49.000000Z",
"deleted_at": null
},
{
"id": 17,
"value": "Black",
"slug": "black",
"hex_color": "#000000",
"attribute_id": "10",
"created_by_id": "1",
"created_at": "2023-09-20T09:19:49.000000Z",
"updated_at": "2023-09-20T09:19:49.000000Z",
"deleted_at": null
},
{
"id": 18,
"value": "Purple",
"slug": "purple",
"hex_color": "#9b809e",
"attribute_id": "10",
"created_by_id": "1",
"created_at": "2023-09-20T09:19:49.000000Z",
"updated_at": "2023-09-20T09:19:49.000000Z",
"deleted_at": null
},
{
"id": 19,
"value": "White",
"slug": "white-2",
"hex_color": "#d6d6d6",
"attribute_id": "10",
"created_by_id": "1",
"created_at": "2023-09-20T09:19:49.000000Z",
"updated_at": "2023-09-20T09:19:49.000000Z",
"deleted_at": null
},
{
"id": 20,
"value": "Green",
"slug": "green",
"hex_color": "#259889",
"attribute_id": "10",
"created_by_id": "1",
"created_at": "2023-09-20T09:19:49.000000Z",
"updated_at": "2023-09-20T09:19:49.000000Z",
"deleted_at": null
},
{
"id": 21,
"value": "Yellow",
"slug": "yellow",
"hex_color": "#e2d62c",
"attribute_id": "10",
"created_by_id": "1",
"created_at": "2023-09-20T09:19:49.000000Z",
"updated_at": "2023-09-20T09:19:49.000000Z",
"deleted_at": null
},
{
"id": 22,
"value": "Blue",
"slug": "blue",
"hex_color": "#5ea1e8",
"attribute_id": "10",
"created_by_id": "1",
"created_at": "2023-09-20T09:19:49.000000Z",
"updated_at": "2023-09-20T09:19:49.000000Z",
"deleted_at": null
},
{
"id": 23,
"value": "Orange",
"slug": "orange",
"hex_color": "#f09124",
"attribute_id": "10",
"created_by_id": "1",
"created_at": "2023-09-20T09:19:49.000000Z",
"updated_at": "2023-09-20T09:19:49.000000Z",
"deleted_at": null
}
]
},
{
"id": 9,
"name": "Waist",
"style": "radio",
"slug": "waist",
"status": 1,
"created_by_id": "1",
"created_at": "2023-09-20T09:15:30.000000Z",
"updated_at": "2023-09-20T09:15:30.000000Z",
"deleted_at": null,
"attribute_values": [
{
"id": 12,
"value": "28",
"slug": "28",
"hex_color": null,
"attribute_id": "9",
"created_by_id": "1",
"created_at": "2023-09-20T09:15:30.000000Z",
"updated_at": "2023-09-20T09:15:30.000000Z",
"deleted_at": null
},
{
"id": 13,
"value": "30",
"slug": "30",
"hex_color": null,
"attribute_id": "9",
"created_by_id": "1",
"created_at": "2023-09-20T09:15:30.000000Z",
"updated_at": "2023-09-20T09:15:30.000000Z",
"deleted_at": null
},
{
"id": 14,
"value": "32",
"slug": "32",
"hex_color": null,
"attribute_id": "9",
"created_by_id": "1",
"created_at": "2023-09-20T09:15:30.000000Z",
"updated_at": "2023-09-20T09:15:30.000000Z",
"deleted_at": null
},
{
"id": 15,
"value": "34",
"slug": "34",
"hex_color": null,
"attribute_id": "9",
"created_by_id": "1",
"created_at": "2023-09-20T09:15:30.000000Z",
"updated_at": "2023-09-20T09:15:30.000000Z",
"deleted_at": null
}
]
},
{
"id": 8,
"name": "Colour",
"style": "image",
"slug": "colour",
"status": 1,
"created_by_id": "1",
"created_at": "2023-09-20T08:32:56.000000Z",
"updated_at": "2023-09-20T08:32:56.000000Z",
"deleted_at": null,
"attribute_values": [
{
"id": 9,
"value": "Burgundy",
"slug": "burgundy",
"hex_color": null,
"attribute_id": "8",
"created_by_id": "1",
"created_at": "2023-09-20T08:32:56.000000Z",
"updated_at": "2023-09-20T08:34:39.000000Z",
"deleted_at": null
},
{
"id": 10,
"value": "Brown",
"slug": "brown",
"hex_color": null,
"attribute_id": "8",
"created_by_id": "1",
"created_at": "2023-09-20T08:32:56.000000Z",
"updated_at": "2023-09-20T08:32:56.000000Z",
"deleted_at": null
},
{
"id": 11,
"value": "White",
"slug": "white",
"hex_color": null,
"attribute_id": "8",
"created_by_id": "1",
"created_at": "2023-09-20T08:32:56.000000Z",
"updated_at": "2023-09-20T08:32:56.000000Z",
"deleted_at": null
}
]
},
{
"id": 7,
"name": "Size",
"style": "circle",
"slug": "size",
"status": 1,
"created_by_id": "1",
"created_at": "2023-09-20T07:58:34.000000Z",
"updated_at": "2023-09-20T07:58:34.000000Z",
"deleted_at": null,
"attribute_values": [
{
"id": 4,
"value": "S",
"slug": "s",
"hex_color": null,
"attribute_id": "7",
"created_by_id": "1",
"created_at": "2023-09-20T07:58:34.000000Z",
"updated_at": "2023-09-20T07:58:34.000000Z",
"deleted_at": null
},
{
"id": 5,
"value": "M",
"slug": "m",
"hex_color": null,
"attribute_id": "7",
"created_by_id": "1",
"created_at": "2023-09-20T07:58:34.000000Z",
"updated_at": "2023-09-20T07:58:34.000000Z",
"deleted_at": null
},
{
"id": 6,
"value": "L",
"slug": "l",
"hex_color": null,
"attribute_id": "7",
"created_by_id": "1",
"created_at": "2023-09-20T07:58:34.000000Z",
"updated_at": "2023-09-20T07:58:34.000000Z",
"deleted_at": null
},
{
"id": 7,
"value": "XL",
"slug": "xl",
"hex_color": null,
"attribute_id": "7",
"created_by_id": "1",
"created_at": "2023-09-20T07:58:34.000000Z",
"updated_at": "2023-09-20T07:58:34.000000Z",
"deleted_at": null
},
{
"id": 8,
"value": "XXL",
"slug": "xxl",
"hex_color": null,
"attribute_id": "7",
"created_by_id": "1",
"created_at": "2023-09-20T07:58:34.000000Z",
"updated_at": "2023-09-20T07:58:34.000000Z",
"deleted_at": null
}
]
},
{
"id": 1,
"name": "Weight",
"style": "rectangle",
"slug": "weight",
"status": 1,
"created_by_id": "1",
"created_at": "2023-08-24T11:43:50.000000Z",
"updated_at": "2023-08-24T13:03:54.000000Z",
"deleted_at": null,
"attribute_values": [
{
"id": 1,
"value": "1 KG",
"slug": "1-kg",
"hex_color": null,
"attribute_id": "1",
"created_by_id": "1",
"created_at": "2023-08-24T11:43:50.000000Z",
"updated_at": "2023-08-24T11:43:50.000000Z",
"deleted_at": null
},
{
"id": 2,
"value": "5 KG",
"slug": "5-kg",
"hex_color": null,
"attribute_id": "1",
"created_by_id": "1",
"created_at": "2023-08-24T11:43:50.000000Z",
"updated_at": "2023-08-24T11:43:50.000000Z",
"deleted_at": null
},
{
"id": 3,
"value": "10 KG",
"slug": "10-kg",
"hex_color": null,
"attribute_id": "1",
"created_by_id": "1",
"created_at": "2023-08-24T11:43:50.000000Z",
"updated_at": "2023-08-24T11:43:50.000000Z",
"deleted_at": null
}
]
}
],
"total": 6
}

View File

@@ -0,0 +1,6 @@
import attribute from "./attribute.json";
import { NextResponse } from "next/server";
export async function GET() {
return NextResponse.json(attribute);
}

View File

@@ -0,0 +1,6 @@
import setting from "./setting.json";
import { NextResponse } from "next/server";
export async function GET() {
return NextResponse.json(setting);
}

View File

@@ -0,0 +1,188 @@
{
"values": {
"general": {
"light_logo_image_id": 3,
"dark_logo_image_id": 4,
"tiny_logo_image_id": 5,
"favicon_image_id": 2,
"site_title": "FastKart Marketplace: Where Vendors Shine Together",
"site_tagline": "Shop Unique, Sell Exceptional FastKart's Multi-Vendor Universe.",
"default_timezone": "Asia/Kolkata",
"default_currency_id": 1,
"admin_site_language_direction": "ltr",
"min_order_amount": 0,
"min_order_free_shipping": 50,
"product_sku_prefix": "FS",
"mode": "light-only",
"copyright": "Copyright 2025 © Fastkart theme by Pixelstrap",
"light_logo_image": {
"id": 3,
"collection_name": "attachment",
"name": "logo-white",
"file_name": "logo-white.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "6079",
"created_by_id": "1",
"created_at": "2023-08-24T08:16:03.000000Z",
"updated_at": "2023-08-24T08:16:03.000000Z",
"original_url": "/assets/images/data/logo-white.png"
},
"dark_logo_image": {
"id": 4,
"collection_name": "attachment",
"name": "logo-dark",
"file_name": "logo-dark.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "4997",
"created_by_id": "1",
"created_at": "2023-08-24T08:16:03.000000Z",
"updated_at": "2023-08-24T08:16:03.000000Z",
"original_url": "/assets/images/data/logo-dark.png"
},
"favicon_image": {
"id": 2,
"collection_name": "attachment",
"name": "favicon",
"file_name": "favicon.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "416",
"created_by_id": "1",
"created_at": "2023-08-24T08:16:03.000000Z",
"updated_at": "2023-08-24T08:16:03.000000Z",
"original_url": "/assets/images/data/favicon.png"
},
"tiny_logo_image": {
"id": 5,
"collection_name": "attachment",
"name": "tiny-logo",
"file_name": "tiny-logo.png",
"mime_type": "image/png",
"disk": "public",
"conversions_disk": "public",
"size": "448",
"created_by_id": "1",
"created_at": "2023-08-24T08:16:03.000000Z",
"updated_at": "2023-08-24T08:16:03.000000Z",
"original_url": "/assets/images/data/tiny-logo.png"
},
"default_currency": {
"id": 1,
"code": "USD",
"symbol": "$",
"no_of_decimal": 2,
"exchange_rate": "1.00",
"symbol_position": "before_price",
"thousands_separator": "comma",
"decimal_separator": "comma",
"system_reserve": "1",
"status": 1,
"created_by_id": null,
"created_at": "2023-08-24T08:16:03.000000Z",
"updated_at": "2023-08-24T08:16:03.000000Z",
"deleted_at": null
}
},
"activation": {
"multivendor": true,
"point_enable": true,
"coupon_enable": true,
"wallet_enable": true,
"stock_product_hide": false,
"store_auto_approve": true,
"product_auto_approve": true
},
"wallet_points": {
"signup_points": 100,
"min_per_order_amount": 100,
"point_currency_ratio": 30,
"reward_per_order_amount": 10
},
"analytics": {
"facebook_pixel": {
"status": true,
"pixel_id": "1354077145459856"
},
"google_analytics": {
"measurement_id": "G-RB17BJ6VZB"
}
},
"delivery": {
"default_delivery": 1,
"default": {
"title": "Standard Delivery",
"description": "Approx 5 to 7 Days"
},
"same_day_delivery": true,
"same_day": {
"title": "Express Delivery",
"description": "Schedule"
},
"same_day_intervals": [
{
"title": "Morning",
"description": "8.00 AM - 12.00 AM"
},
{
"title": "Noon",
"description": "12.00 PM - 2.00 PM"
},
{
"title": "Afternoon",
"description": "02.00 PM - 05.00 PM"
},
{
"title": "Evening",
"description": "05.00 PM - 08.00 PM"
}
]
},
"maintenance": {
"title": "We'll be back Soon..",
"maintenance_mode": false,
"maintenance_image_id": 6,
"description": "We are busy to updating our store for you.",
"maintenance_image": {
"id": 6,
"collection_name": "attachment",
"name": "maintainance",
"file_name": "maintainance.jpg",
"mime_type": "image/jpeg",
"disk": "public",
"conversions_disk": "public",
"size": "111275",
"created_by_id": "1",
"created_at": "2023-08-24T08:16:03.000000Z",
"updated_at": "2023-08-24T08:16:03.000000Z",
"original_url": "/assets/images/data/maintainance.jpg"
}
},
"payment_methods": [
{
"name": "cod",
"status": true
},
{
"name": "paypal",
"status": true
},
{
"name": "stripe",
"status": true
},
{
"name": "mollie",
"status": true
},
{
"name": "razorpay",
"status": true
}
]
}
}

View File

@@ -0,0 +1,24 @@
{
"product": {
"total_products": 138,
"total_approved_products": 136,
"total_in_approved_products": 2
},
"store": {
"total_stores": 9,
"total_approved_stores": 9,
"total_in_approved_stores": 0
},
"refund": {
"total_refunds": 3,
"total_pending_refunds": 1,
"total_approved_refunds": 1,
"total_rejected_refunds": 1
},
"withdraw_request": {
"total_withdraw_requests": 0,
"total_pending_withdraw_requests": 0,
"total_approved_withdraw_requests": 0,
"total_rejected_withdraw_requests": 0
}
}

View File

@@ -0,0 +1,6 @@
import badge from './badge.json'
import { NextResponse } from "next/server";
export async function GET() {
return NextResponse.json(badge);
}

View File

@@ -0,0 +1,10 @@
import blog from "../blog.json";
import { NextResponse } from "next/server";
export async function GET(_, { params }) {
const singleBlog = params.updateId;
const blogObj = blog?.data.find((elem) => elem.id == singleBlog);
return NextResponse.json(blogObj);
}

2079
src/app/api/blog/blog.json Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
import blog from './blog.json'
import { NextResponse } from "next/server";
export async function GET() {
return NextResponse.json(blog);
}

2608
src/app/api/cart/cart.json Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
import cart from './cart.json'
import { NextResponse } from "next/server";
export async function GET() {
return NextResponse.json(cart);
}

View File

@@ -0,0 +1,10 @@
import category from "../category.json";
import { NextResponse } from "next/server";
export async function GET(_, { params }) {
const singleCategory = params.updateId;
const categoryObj = category?.data.find((elem) => elem.id == singleCategory);
return NextResponse.json(categoryObj);
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
import category from './category.json'
import { NextResponse } from "next/server";
export async function GET() {
return NextResponse.json(category);
}

View File

@@ -0,0 +1,891 @@
{
"data": [
{
"id": 22,
"admin_commission": 7.6,
"vendor_commission": 118.58,
"order_id": 31,
"store_id": 3,
"created_at": "2023-10-07T00:00:05.000000Z",
"updated_at": "2023-10-07T00:00:05.000000Z",
"deleted_at": null,
"order": {
"id": 31,
"order_number": 1030,
"consumer_id": 19,
"tax_total": 9.12,
"shipping_total": 0,
"points_amount": 0,
"wallet_balance": 0,
"amount": 126.18,
"total": 135.3,
"coupon_total_discount": 0,
"payment_method": "cod",
"payment_status": "COMPLETED",
"store_id": 3,
"billing_address_id": 3,
"shipping_address_id": 1,
"delivery_description": "Standard Delivery | Approx 5 to 7 Days",
"delivery_interval": null,
"order_status_id": 6,
"coupon_id": null,
"parent_id": null,
"created_by_id": 1,
"invoice_url": "https://fastkart.webiots.co.in/order/invoice/1030",
"status": 1,
"created_at": "2023-09-30T08:56:51.000000Z",
"consumer": {
"id": 19,
"name": "John Doe",
"email": "john.customer@example.com",
"country_code": "1",
"phone": 5551855359,
"role": {
"id": 2,
"name": "consumer",
"guard_name": "web",
"system_reserve": "1",
"created_at": "2023-08-24T08:16:03.000000Z",
"updated_at": "2023-08-24T08:16:03.000000Z",
"pivot": {
"model_type": "App\\Models\\User",
"model_id": "19",
"role_id": "2"
}
}
},
"order_status": {
"id": 6,
"name": "delivered"
}
},
"store": {
"id": 3,
"store_name": "Natures Basket Mart",
"description": "Welcome to Nature's Basket Mart, We understand the importance of fresh, nourishing vegetables in your daily diet, and that's why we've curated a marketplace that celebrates the vibrancy, flavors, and vitality of farm-fresh produce",
"slug": "natures-basket-mart",
"store_logo_id": 1439,
"store_cover_id": null,
"country_id": 840,
"state_id": 3787,
"city": "Rochester",
"address": "2775 James Street",
"pincode": "14616",
"facebook": "https://www.facebook.com/",
"twitter": "https://twitter.com/",
"instagram": "https://www.instagram.com/",
"youtube": null,
"pinterest": null,
"hide_vendor_email": 0,
"hide_vendor_phone": 0,
"vendor_id": 4,
"created_by_id": "1",
"status": 1,
"is_approved": 1,
"created_at": "2023-08-24T09:37:50.000000Z",
"updated_at": "2023-09-29T13:35:05.000000Z",
"deleted_at": null,
"orders_count": 10,
"reviews_count": 23,
"products_count": 10,
"product_images": [
"https://fastkart.webiots.co.in/storage/77/Pumpkin_3.png",
"https://fastkart.webiots.co.in/storage/25/Durian_4.png",
"https://fastkart.webiots.co.in/storage/70/Pea_1.png"
],
"order_amount": 539.3,
"rating_count": 3.260869565217391,
"reviews": [
{
"id": 1,
"product_id": 18,
"consumer_id": 19,
"store_id": 3,
"review_image_id": null,
"rating": 4,
"description": "Very impressed with this purchase. The item is of excellent quality, and it has exceeded my expectations.",
"created_at": "2023-09-29T11:52:57.000000Z",
"review_image": null,
"consumer": {
"id": 19,
"name": "John Doe",
"email": "john.customer@example.com",
"profile_image_id": null,
"role": {
"id": 2,
"name": "consumer",
"guard_name": "web",
"system_reserve": "1",
"created_at": "2023-08-24T08:16:03.000000Z",
"updated_at": "2023-08-24T08:16:03.000000Z",
"pivot": {
"model_type": "App\\Models\\User",
"model_id": "19",
"role_id": "2"
}
}
}
},
{
"id": 2,
"product_id": 12,
"consumer_id": 21,
"store_id": 3,
"review_image_id": null,
"rating": 5,
"description": "I am genuinely delighted with this item. It's a total winner! The quality is superb, and it has added so much convenience to my daily routine. Highly satisfied customer!",
"created_at": "2023-09-29T12:27:04.000000Z",
"review_image": null,
"consumer": {
"id": 21,
"name": "Sarah Davis",
"email": "sarah.customer@example.com",
"profile_image_id": null,
"role": {
"id": 2,
"name": "consumer",
"guard_name": "web",
"system_reserve": "1",
"created_at": "2023-08-24T08:16:03.000000Z",
"updated_at": "2023-08-24T08:16:03.000000Z",
"pivot": {
"model_type": "App\\Models\\User",
"model_id": "21",
"role_id": "2"
}
}
}
},
{
"id": 3,
"product_id": 16,
"consumer_id": 21,
"store_id": 3,
"review_image_id": null,
"rating": 5,
"description": "I am genuinely delighted with this item. It's a total winner! The quality is superb, and it has added so much convenience to my daily routine. Highly satisfied customer!",
"created_at": "2023-09-29T12:27:45.000000Z",
"review_image": null,
"consumer": {
"id": 21,
"name": "Sarah Davis",
"email": "sarah.customer@example.com",
"profile_image_id": null,
"role": {
"id": 2,
"name": "consumer",
"guard_name": "web",
"system_reserve": "1",
"created_at": "2023-08-24T08:16:03.000000Z",
"updated_at": "2023-08-24T08:16:03.000000Z",
"pivot": {
"model_type": "App\\Models\\User",
"model_id": "21",
"role_id": "2"
}
}
}
},
{
"id": 4,
"product_id": 15,
"consumer_id": 21,
"store_id": 3,
"review_image_id": null,
"rating": 5,
"description": "I am genuinely delighted with this item. It's a total winner! The quality is superb, and it has added so much convenience to my daily routine. Highly satisfied customer!",
"created_at": "2023-09-29T12:27:54.000000Z",
"review_image": null,
"consumer": {
"id": 21,
"name": "Sarah Davis",
"email": "sarah.customer@example.com",
"profile_image_id": null,
"role": {
"id": 2,
"name": "consumer",
"guard_name": "web",
"system_reserve": "1",
"created_at": "2023-08-24T08:16:03.000000Z",
"updated_at": "2023-08-24T08:16:03.000000Z",
"pivot": {
"model_type": "App\\Models\\User",
"model_id": "21",
"role_id": "2"
}
}
}
},
{
"id": 5,
"product_id": 10,
"consumer_id": 21,
"store_id": 3,
"review_image_id": null,
"rating": 5,
"description": "I am genuinely delighted with this item. It's a total winner! The quality is superb, and it has added so much convenience to my daily routine. Highly satisfied customer!",
"created_at": "2023-09-29T12:28:12.000000Z",
"review_image": null,
"consumer": {
"id": 21,
"name": "Sarah Davis",
"email": "sarah.customer@example.com",
"profile_image_id": null,
"role": {
"id": 2,
"name": "consumer",
"guard_name": "web",
"system_reserve": "1",
"created_at": "2023-08-24T08:16:03.000000Z",
"updated_at": "2023-08-24T08:16:03.000000Z",
"pivot": {
"model_type": "App\\Models\\User",
"model_id": "21",
"role_id": "2"
}
}
}
},
{
"id": 6,
"product_id": 19,
"consumer_id": 21,
"store_id": 3,
"review_image_id": null,
"rating": 5,
"description": "I am genuinely delighted with this item. It's a total winner! The quality is superb, and it has added so much convenience to my daily routine. Highly satisfied customer!",
"created_at": "2023-09-29T12:28:25.000000Z",
"review_image": null,
"consumer": {
"id": 21,
"name": "Sarah Davis",
"email": "sarah.customer@example.com",
"profile_image_id": null,
"role": {
"id": 2,
"name": "consumer",
"guard_name": "web",
"system_reserve": "1",
"created_at": "2023-08-24T08:16:03.000000Z",
"updated_at": "2023-08-24T08:16:03.000000Z",
"pivot": {
"model_type": "App\\Models\\User",
"model_id": "21",
"role_id": "2"
}
}
}
},
{
"id": 7,
"product_id": 9,
"consumer_id": 21,
"store_id": 3,
"review_image_id": null,
"rating": 5,
"description": "I am genuinely delighted with this item. It's a total winner! The quality is superb, and it has added so much convenience to my daily routine. Highly satisfied customer!",
"created_at": "2023-09-29T12:28:39.000000Z",
"review_image": null,
"consumer": {
"id": 21,
"name": "Sarah Davis",
"email": "sarah.customer@example.com",
"profile_image_id": null,
"role": {
"id": 2,
"name": "consumer",
"guard_name": "web",
"system_reserve": "1",
"created_at": "2023-08-24T08:16:03.000000Z",
"updated_at": "2023-08-24T08:16:03.000000Z",
"pivot": {
"model_type": "App\\Models\\User",
"model_id": "21",
"role_id": "2"
}
}
}
},
{
"id": 8,
"product_id": 18,
"consumer_id": 21,
"store_id": 3,
"review_image_id": null,
"rating": 4,
"description": "I am genuinely delighted with this item. It's a total winner! The quality is superb, and it has added so much convenience to my daily routine. Highly satisfied customer!",
"created_at": "2023-09-29T12:28:59.000000Z",
"review_image": null,
"consumer": {
"id": 21,
"name": "Sarah Davis",
"email": "sarah.customer@example.com",
"profile_image_id": null,
"role": {
"id": 2,
"name": "consumer",
"guard_name": "web",
"system_reserve": "1",
"created_at": "2023-08-24T08:16:03.000000Z",
"updated_at": "2023-08-24T08:16:03.000000Z",
"pivot": {
"model_type": "App\\Models\\User",
"model_id": "21",
"role_id": "2"
}
}
}
},
{
"id": 9,
"product_id": 18,
"consumer_id": 20,
"store_id": 3,
"review_image_id": null,
"rating": 5,
"description": "I am extremely satisfied with this purchase. The item arrived promptly, and the quality is exceptional. It's evident that the makers paid attention to detail. Overall, a fantastic buy!",
"created_at": "2023-09-29T12:48:03.000000Z",
"review_image": null,
"consumer": {
"id": 20,
"name": "Rome Doe",
"email": "rome.customer@example.com",
"profile_image_id": null,
"role": {
"id": 2,
"name": "consumer",
"guard_name": "web",
"system_reserve": "1",
"created_at": "2023-08-24T08:16:03.000000Z",
"updated_at": "2023-08-24T08:16:03.000000Z",
"pivot": {
"model_type": "App\\Models\\User",
"model_id": "20",
"role_id": "2"
}
}
}
},
{
"id": 10,
"product_id": 18,
"consumer_id": 22,
"store_id": 3,
"review_image_id": null,
"rating": 1,
"description": "Honestly, I regret buying this item. The quality is subpar, and it feels like a waste of money. I wouldn't recommend it to anyone.",
"created_at": "2023-09-29T13:04:13.000000Z",
"review_image": null,
"consumer": {
"id": 22,
"name": "Jessica Miller",
"email": "jessica.customer@example.com",
"profile_image_id": null,
"role": {
"id": 2,
"name": "consumer",
"guard_name": "web",
"system_reserve": "1",
"created_at": "2023-08-24T08:16:03.000000Z",
"updated_at": "2023-08-24T08:16:03.000000Z",
"pivot": {
"model_type": "App\\Models\\User",
"model_id": "22",
"role_id": "2"
}
}
}
},
{
"id": 11,
"product_id": 17,
"consumer_id": 22,
"store_id": 3,
"review_image_id": null,
"rating": 3,
"description": "Honestly, I regret buying this item. The quality is subpar, and it feels like a waste of money. I wouldn't recommend it to anyone.",
"created_at": "2023-09-29T13:04:48.000000Z",
"review_image": null,
"consumer": {
"id": 22,
"name": "Jessica Miller",
"email": "jessica.customer@example.com",
"profile_image_id": null,
"role": {
"id": 2,
"name": "consumer",
"guard_name": "web",
"system_reserve": "1",
"created_at": "2023-08-24T08:16:03.000000Z",
"updated_at": "2023-08-24T08:16:03.000000Z",
"pivot": {
"model_type": "App\\Models\\User",
"model_id": "22",
"role_id": "2"
}
}
}
},
{
"id": 12,
"product_id": 13,
"consumer_id": 22,
"store_id": 3,
"review_image_id": null,
"rating": 2,
"description": "Honestly, I regret buying this item. The quality is subpar, and it feels like a waste of money. I wouldn't recommend it to anyone.",
"created_at": "2023-09-29T13:04:59.000000Z",
"review_image": null,
"consumer": {
"id": 22,
"name": "Jessica Miller",
"email": "jessica.customer@example.com",
"profile_image_id": null,
"role": {
"id": 2,
"name": "consumer",
"guard_name": "web",
"system_reserve": "1",
"created_at": "2023-08-24T08:16:03.000000Z",
"updated_at": "2023-08-24T08:16:03.000000Z",
"pivot": {
"model_type": "App\\Models\\User",
"model_id": "22",
"role_id": "2"
}
}
}
},
{
"id": 13,
"product_id": 11,
"consumer_id": 22,
"store_id": 3,
"review_image_id": null,
"rating": 1,
"description": "Honestly, I regret buying this item. The quality is subpar, and it feels like a waste of money. I wouldn't recommend it to anyone.",
"created_at": "2023-09-29T13:05:09.000000Z",
"review_image": null,
"consumer": {
"id": 22,
"name": "Jessica Miller",
"email": "jessica.customer@example.com",
"profile_image_id": null,
"role": {
"id": 2,
"name": "consumer",
"guard_name": "web",
"system_reserve": "1",
"created_at": "2023-08-24T08:16:03.000000Z",
"updated_at": "2023-08-24T08:16:03.000000Z",
"pivot": {
"model_type": "App\\Models\\User",
"model_id": "22",
"role_id": "2"
}
}
}
},
{
"id": 14,
"product_id": 18,
"consumer_id": 18,
"store_id": 3,
"review_image_id": null,
"rating": 2,
"description": "Avoid this product. The quality is terrible, and it started falling apart almost immediately. I wish I had read more reviews before buying. Lesson learned.",
"created_at": "2023-09-29T13:10:49.000000Z",
"review_image": null,
"consumer": {
"id": 18,
"name": "Jack Doe",
"email": "jack.customer@example.com",
"profile_image_id": null,
"role": {
"id": 2,
"name": "consumer",
"guard_name": "web",
"system_reserve": "1",
"created_at": "2023-08-24T08:16:03.000000Z",
"updated_at": "2023-08-24T08:16:03.000000Z",
"pivot": {
"model_type": "App\\Models\\User",
"model_id": "18",
"role_id": "2"
}
}
}
},
{
"id": 15,
"product_id": 17,
"consumer_id": 18,
"store_id": 3,
"review_image_id": null,
"rating": 2,
"description": "Avoid this product. The quality is terrible, and it started falling apart almost immediately. I wish I had read more reviews before buying. Lesson learned.",
"created_at": "2023-09-29T13:12:23.000000Z",
"review_image": null,
"consumer": {
"id": 18,
"name": "Jack Doe",
"email": "jack.customer@example.com",
"profile_image_id": null,
"role": {
"id": 2,
"name": "consumer",
"guard_name": "web",
"system_reserve": "1",
"created_at": "2023-08-24T08:16:03.000000Z",
"updated_at": "2023-08-24T08:16:03.000000Z",
"pivot": {
"model_type": "App\\Models\\User",
"model_id": "18",
"role_id": "2"
}
}
}
},
{
"id": 16,
"product_id": 11,
"consumer_id": 18,
"store_id": 3,
"review_image_id": null,
"rating": 3,
"description": "Avoid this product. The quality is terrible, and it started falling apart almost immediately. I wish I had read more reviews before buying. Lesson learned.",
"created_at": "2023-09-29T13:12:47.000000Z",
"review_image": null,
"consumer": {
"id": 18,
"name": "Jack Doe",
"email": "jack.customer@example.com",
"profile_image_id": null,
"role": {
"id": 2,
"name": "consumer",
"guard_name": "web",
"system_reserve": "1",
"created_at": "2023-08-24T08:16:03.000000Z",
"updated_at": "2023-08-24T08:16:03.000000Z",
"pivot": {
"model_type": "App\\Models\\User",
"model_id": "18",
"role_id": "2"
}
}
}
},
{
"id": 17,
"product_id": 13,
"consumer_id": 18,
"store_id": 3,
"review_image_id": null,
"rating": 1,
"description": "Avoid this product. The quality is terrible, and it started falling apart almost immediately. I wish I had read more reviews before buying. Lesson learned.",
"created_at": "2023-09-29T13:13:00.000000Z",
"review_image": null,
"consumer": {
"id": 18,
"name": "Jack Doe",
"email": "jack.customer@example.com",
"profile_image_id": null,
"role": {
"id": 2,
"name": "consumer",
"guard_name": "web",
"system_reserve": "1",
"created_at": "2023-08-24T08:16:03.000000Z",
"updated_at": "2023-08-24T08:16:03.000000Z",
"pivot": {
"model_type": "App\\Models\\User",
"model_id": "18",
"role_id": "2"
}
}
}
},
{
"id": 18,
"product_id": 9,
"consumer_id": 20,
"store_id": 3,
"review_image_id": null,
"rating": 3,
"description": "This is one of the worst purchases I've made. The item looks nothing like the pictures, and the functionality is a joke. I feel misled and dissatisfied.",
"created_at": "2023-09-29T13:30:02.000000Z",
"review_image": null,
"consumer": {
"id": 20,
"name": "Rome Doe",
"email": "rome.customer@example.com",
"profile_image_id": null,
"role": {
"id": 2,
"name": "consumer",
"guard_name": "web",
"system_reserve": "1",
"created_at": "2023-08-24T08:16:03.000000Z",
"updated_at": "2023-08-24T08:16:03.000000Z",
"pivot": {
"model_type": "App\\Models\\User",
"model_id": "20",
"role_id": "2"
}
}
}
},
{
"id": 19,
"product_id": 10,
"consumer_id": 20,
"store_id": 3,
"review_image_id": null,
"rating": 2,
"description": "This is one of the worst purchases I've made. The item looks nothing like the pictures, and the functionality is a joke. I feel misled and dissatisfied.",
"created_at": "2023-09-29T13:30:26.000000Z",
"review_image": null,
"consumer": {
"id": 20,
"name": "Rome Doe",
"email": "rome.customer@example.com",
"profile_image_id": null,
"role": {
"id": 2,
"name": "consumer",
"guard_name": "web",
"system_reserve": "1",
"created_at": "2023-08-24T08:16:03.000000Z",
"updated_at": "2023-08-24T08:16:03.000000Z",
"pivot": {
"model_type": "App\\Models\\User",
"model_id": "20",
"role_id": "2"
}
}
}
},
{
"id": 20,
"product_id": 12,
"consumer_id": 20,
"store_id": 3,
"review_image_id": null,
"rating": 2,
"description": "This is one of the worst purchases I've made. The item looks nothing like the pictures, and the functionality is a joke. I feel misled and dissatisfied.",
"created_at": "2023-09-29T13:30:54.000000Z",
"review_image": null,
"consumer": {
"id": 20,
"name": "Rome Doe",
"email": "rome.customer@example.com",
"profile_image_id": null,
"role": {
"id": 2,
"name": "consumer",
"guard_name": "web",
"system_reserve": "1",
"created_at": "2023-08-24T08:16:03.000000Z",
"updated_at": "2023-08-24T08:16:03.000000Z",
"pivot": {
"model_type": "App\\Models\\User",
"model_id": "20",
"role_id": "2"
}
}
}
},
{
"id": 21,
"product_id": 15,
"consumer_id": 20,
"store_id": 3,
"review_image_id": null,
"rating": 1,
"description": "This is one of the worst purchases I've made. The item looks nothing like the pictures, and the functionality is a joke. I feel misled and dissatisfied.",
"created_at": "2023-09-29T13:31:13.000000Z",
"review_image": null,
"consumer": {
"id": 20,
"name": "Rome Doe",
"email": "rome.customer@example.com",
"profile_image_id": null,
"role": {
"id": 2,
"name": "consumer",
"guard_name": "web",
"system_reserve": "1",
"created_at": "2023-08-24T08:16:03.000000Z",
"updated_at": "2023-08-24T08:16:03.000000Z",
"pivot": {
"model_type": "App\\Models\\User",
"model_id": "20",
"role_id": "2"
}
}
}
},
{
"id": 22,
"product_id": 161,
"consumer_id": 19,
"store_id": 3,
"review_image_id": null,
"rating": 5,
"description": "Nice Fitt",
"created_at": "2023-10-05T04:39:35.000000Z",
"review_image": null,
"consumer": {
"id": 19,
"name": "John Doe",
"email": "john.customer@example.com",
"profile_image_id": null,
"role": {
"id": 2,
"name": "consumer",
"guard_name": "web",
"system_reserve": "1",
"created_at": "2023-08-24T08:16:03.000000Z",
"updated_at": "2023-08-24T08:16:03.000000Z",
"pivot": {
"model_type": "App\\Models\\User",
"model_id": "19",
"role_id": "2"
}
}
}
},
{
"id": 23,
"product_id": 178,
"consumer_id": 19,
"store_id": 3,
"review_image_id": null,
"rating": 4,
"description": "Nice Fit",
"created_at": "2023-10-05T04:50:06.000000Z",
"review_image": null,
"consumer": {
"id": 19,
"name": "John Doe",
"email": "john.customer@example.com",
"profile_image_id": null,
"role": {
"id": 2,
"name": "consumer",
"guard_name": "web",
"system_reserve": "1",
"created_at": "2023-08-24T08:16:03.000000Z",
"updated_at": "2023-08-24T08:16:03.000000Z",
"pivot": {
"model_type": "App\\Models\\User",
"model_id": "19",
"role_id": "2"
}
}
}
}
]
}
},
{
"id": 13,
"admin_commission": 0.68,
"vendor_commission": 67.05,
"order_id": 17,
"store_id": 4,
"created_at": "2023-10-06T07:00:05.000000Z",
"updated_at": "2023-10-06T07:00:05.000000Z",
"deleted_at": null,
"order": {
"id": 17,
"order_number": 1016,
"consumer_id": 22,
"tax_total": 4.89,
"shipping_total": 0,
"points_amount": 0,
"wallet_balance": 0,
"amount": 67.73,
"total": 72.62,
"coupon_total_discount": 0,
"payment_method": "cod",
"payment_status": "COMPLETED",
"store_id": 4,
"billing_address_id": 9,
"shipping_address_id": 9,
"delivery_description": "Standard Delivery|Approx 5 to 7 Days",
"delivery_interval": null,
"order_status_id": 6,
"coupon_id": null,
"parent_id": "15",
"created_by_id": 1,
"status": 1,
"created_at": "2023-09-29T13:00:56.000000Z",
"consumer": {
"id": 22,
"name": "Jessica Miller",
"email": "jessica.customer@example.com",
"country_code": "1",
"phone": 5551895359,
"role": {
"id": 2,
"name": "consumer",
"guard_name": "web",
"system_reserve": "1",
"created_at": "2023-08-24T08:16:03.000000Z",
"updated_at": "2023-08-24T08:16:03.000000Z",
"pivot": {
"model_type": "App\\Models\\User",
"model_id": "22",
"role_id": "2"
}
}
},
"order_status": {
"id": 6,
"name": "delivered"
}
},
"store": {
"id": 4,
"store_name": "Fruits Market",
"description": "Welcome to Fruits Market, your gateway to a world of natural sweetness and vibrant flavors. At FruitE, we celebrate the beauty and goodness of fruits in their purest form",
"slug": "fruits-market",
"store_logo_id": 1441,
"store_cover_id": null,
"country_id": 840,
"state_id": 3757,
"city": "San Jose",
"address": "4105 Park Street",
"pincode": "95110",
"facebook": "https://www.facebook.com/",
"twitter": "https://twitter.com/",
"instagram": "https://www.instagram.com/",
"youtube": null,
"pinterest": null,
"hide_vendor_email": 0,
"hide_vendor_phone": 0,
"vendor_id": 5,
"created_by_id": "1",
"status": 1,
"is_approved": 1,
"created_at": "2023-08-24T09:40:33.000000Z",
"updated_at": "2023-09-20T09:38:35.000000Z",
"deleted_at": null,
"orders_count": 12,
"reviews_count": 0,
"products_count": 10,
"product_images": [
"https://fastkart.webiots.co.in/storage/90/Pomegranate_2.png",
"https://fastkart.webiots.co.in/storage/93/Strawberry_1.png",
"https://fastkart.webiots.co.in/storage/100/Watermelon_4.png"
],
"order_amount": 1463.93,
"rating_count": null,
"reviews": []
}
}
],
"total": 2
}

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