Skip to content

Commit

Permalink
rearangement of main dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
kemboi590 committed Jul 21, 2024
1 parent 37c4d61 commit fa2a725
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 29 deletions.
16 changes: 8 additions & 8 deletions src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/integration/react';
import { store, persistedStore } from './app/store.ts';
import Vehicles from './pages/dashboard/main/Vehicles.tsx';
import AllBookings from './pages/dashboard/main/AllBookings.tsx';
import SupportTickets from './pages/dashboard/main/SupportTickets.tsx';
import AllBookings from './pages/dashboard/main/Bookings/AllBookings.tsx';
import SupportTickets from './pages/dashboard/main/Tickets/SupportTickets.tsx';
import Account from './pages/dashboard/main/Account.tsx';
import BookingForm from './pages/dashboard/main/BookingForm.tsx';
import BookingForm from './pages/dashboard/main/Bookings/BookingForm.tsx';
import Profile from './pages/dashboard/main/Profile.tsx';
import UserBookings from './pages/dashboard/main/Payments';
import SuccessPayment from './pages/dashboard/main/Success.Payment.tsx';
import PaymentFailed from './pages/dashboard/main/PaymentFailed.tsx';
import UserBookings from './pages/dashboard/main/Payments/Payments.tsx';
import SuccessPayment from './pages/dashboard/main/Payments/Success.Payment.tsx';
import PaymentFailed from './pages/dashboard/main/Payments/PaymentFailed.tsx';
import Error from './pages/Error.tsx';
import MyBookings from './pages/dashboard/main/MyBookings';
import MyTickets from './pages/dashboard/main/MyTickets.tsx';
import MyBookings from './pages/dashboard/main/Bookings/MyBookings.tsx';
import MyTickets from './pages/dashboard/main/Tickets/MyTickets.tsx';
import ManageVehicle from './pages/dashboard/main/ManageVehicles/ManageVehicle.tsx';

const router = createBrowserRouter([
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { format } from 'date-fns';
import { bookingVehicleAPI } from "../../../features/booking/bookingAPI";
import { vehiclesAPI } from './../../../features/vehicles/Vehicles';
import { usersAPI } from '../../../features/users/usersAPI';
import { bookingVehicleAPI } from "../../../../features/booking/bookingAPI";
import { vehiclesAPI } from '../../../../features/vehicles/Vehicles';
import { usersAPI } from '../../../../features/users/usersAPI';

function AllBookings() {
const page = void 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import * as yup from "yup";
import { Toaster, toast } from 'sonner';
import { Link, useParams } from "react-router-dom";
import { useSelector } from "react-redux";
import { RootState } from "../../../app/store";
import { bookingVehicleAPI } from "../../../features/booking/bookingAPI";
import { vehiclesAPI } from "../../../features/vehicles/Vehicles";
import { RootState } from "../../../../app/store";
import { bookingVehicleAPI } from "../../../../features/booking/bookingAPI";
import { vehiclesAPI } from "../../../../features/vehicles/Vehicles";
import { ArrowLeft } from 'lucide-react';
import { useNavigate } from "react-router-dom";

Expand Down Expand Up @@ -93,7 +93,7 @@ const BookingForm = () => {
{!isLoading && !vehicleError && vehicleData && (
<div className="card shadow-xl lg:gap-10 border-2 lg:flex-row justify-center items-center bg-gray-100 ">
<figure className="w-[50%] lg:w-[35%] p-3 ">
<img src={vehicleData.vehicle_specifications.image_url} alt="cardetails" className="rounded-lg" />
<img src={vehicleData.vehicle_specifications.image_url} alt="cardetails" className="rounded-lg" />
</figure>

<div className="card-body justify-center items-center text-justify space-y-4 p-6 rounded-lg">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useSelector } from 'react-redux';
import { format } from 'date-fns';
import { RootState } from '../../../app/store';
import { bookingVehicleAPI } from '../../../features/booking/bookingAPI';
import { vehiclesAPI } from '../../../features/vehicles/Vehicles';
import { RootState } from '../../../../app/store';
import { bookingVehicleAPI } from '../../../../features/booking/bookingAPI';
import { vehiclesAPI } from '../../../../features/vehicles/Vehicles';

const MyBookings = () => {
const user = useSelector((state: RootState) => state.user);
Expand Down Expand Up @@ -49,9 +49,9 @@ const MyBookings = () => {

return (
<div className='bg-slate-200 min-h-screen'>

<div className='mx-auto bg-slate-200 w-full rounded-md mb-5 border-2'>
<h2 className="text-center text-xl p-2 rounded-t-md text-webcolor font-bold">Your Bookings</h2>
<h2 className="text-center text-xl p-2 rounded-t-md text-webcolor font-bold">Your Bookings</h2>
<div className="overflow-x-auto">
<table className="table-auto w-full">
<thead>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { useState } from 'react';
import { useSelector } from 'react-redux';
import { format } from 'date-fns';
import { RootState } from '../../../app/store';
import { bookingVehicleAPI } from '../../../features/booking/bookingAPI';
import { vehiclesAPI } from '../../../features/vehicles/Vehicles';
import { RootState } from '../../../../app/store';
import { bookingVehicleAPI } from '../../../../features/booking/bookingAPI';
import { vehiclesAPI } from '../../../../features/vehicles/Vehicles';
import { toast, Toaster } from 'sonner';
import { loadStripe } from '@stripe/stripe-js';
import { paymentAPI } from '../../../features/payment/paymentAPI';
import { paymentAPI } from '../../../../features/payment/paymentAPI';

const stripePromise = loadStripe('pk_test_51O0yZQFnVjhMqK7vwrYX1wz3VThFWgoAEjafFFKVNSv0KQ76YMKbFW0dWDWOOs9DSXcp3zeNvRt14lVPO4C5FmyW00iLYryWNn');

Expand Down
9 changes: 9 additions & 0 deletions src/pages/dashboard/main/Tickets/CreateTicket.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@


const CreateTicket = () => {
return (
<div>CreateTicket</div>
)
}

export default CreateTicket
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useSelector } from 'react-redux';
import { RootState } from '../../../app/store';
import { TicketAPI } from "../../../features/Tickets/AllTickets";
import { RootState } from '../../../../app/store';
import { TicketAPI } from "../../../../features/Tickets/AllTickets";

const MyTickets = () => {
const user = useSelector((state: RootState) => state.user);
Expand All @@ -27,7 +27,7 @@ const MyTickets = () => {
return (
<div className='bg-slate-200 min-h-screen'>
<div className='mx-auto w-full rounded-md mb-5 border-2'>
<h2 className="text-center text-xl p-2 rounded-t-md text-webcolor font-bold">Your Tickets</h2>
<h2 className="text-center text-xl p-2 rounded-t-md text-webcolor font-bold">Your Tickets</h2>
<div className="overflow-x-auto">
<table className="table-auto w-full">
<thead>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { TicketAPI } from "../../../features/Tickets/AllTickets";
import { usersAPI } from "../../../features/users/usersAPI";
import { TicketAPI } from "../../../../features/Tickets/AllTickets";
import { usersAPI } from "../../../../features/users/usersAPI";

function SupportTickets() {
const page = undefined;
Expand Down

0 comments on commit fa2a725

Please sign in to comment.