-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from Edwardb11/refactor/fix
Refactor FIX
- Loading branch information
Showing
24 changed files
with
255 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React from 'react' | ||
import Footer from '../components/Footer' | ||
import NavBar from '../components/NavBar' | ||
|
||
const AdminPackage = () => { | ||
return ( | ||
<> | ||
<NavBar /> | ||
<div className="py-10 mt-10"> | ||
<div className="flex flex-col px-8 mx-auto space-y-12 max-w-7xl xl:px-12"> | ||
<div className="relative"> | ||
<h2 className="w-full text-3xl font-bold text-center sm:text-4xl md:text-5xl"> | ||
{" "} | ||
Acciones permitidas | ||
</h2> | ||
</div> | ||
</div> | ||
</div> | ||
<Footer /> | ||
</> | ||
) | ||
} | ||
|
||
export default AdminPackage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from "react"; | ||
import Footer from "../components/Footer"; | ||
import NavBar from "../components/NavBar"; | ||
|
||
const Dashboard = () => { | ||
return ( | ||
<div> | ||
<NavBar /> | ||
<div lassName="mt-20">Dashboard</div> | ||
<Footer /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Dashboard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,155 @@ | ||
import React from "react"; | ||
import React, { useContext } from "react"; | ||
import { Link } from "react-router-dom"; | ||
import User from "../context/userContext"; | ||
|
||
const Footer = () => { | ||
return ( | ||
<footer className="footer bg-gray-100 relative pt-1 border-b-2 border-blue-700"> | ||
<div className="container mx-auto px-6"> | ||
<div className="sm:flex sm:mt-8"> | ||
<div className="mt-8 sm:mt-0 sm:w-full sm:px-8 flex flex-col md:flex-row justify-between"> | ||
<div className="flex flex-col"> | ||
<span className="font-bold text-gray-700 uppercase mb-2"> | ||
Seguimiento de paquetes | ||
</span> | ||
<span className="my-2"> | ||
<Link to="/tracking" className="text-blue-700 text-md hover:text-blue-500"> | ||
Seguimiento | ||
</Link> | ||
</span> | ||
<span className="my-2"> | ||
<Link to="/package" className="text-blue-700 text-md hover:text-blue-500"> | ||
Agregar | ||
</Link> | ||
</span> | ||
</div> | ||
<div className="flex flex-col"> | ||
<span className="font-bold text-gray-700 uppercase mt-4 md:mt-0 mb-2"> | ||
FAQ | ||
</span> | ||
const { user } = useContext(User); | ||
const rol = user?.rol; | ||
if (rol === undefined) { | ||
return ( | ||
<footer className="footer bg-gray-100 relative pt-1 border-b-2 border-blue-700"> | ||
<div className="container mx-auto px-6"> | ||
<div className="sm:flex sm:mt-8"> | ||
<div className="mt-8 sm:mt-0 sm:w-full sm:px-8 flex flex-col md:flex-row justify-between"> | ||
<div className="flex flex-col"> | ||
<span className="font-bold text-gray-700 uppercase mb-2"> | ||
Seguimiento de paquetes | ||
</span> | ||
<span className="my-2"> | ||
<Link | ||
to="/tracking" | ||
className="text-blue-700 text-md hover:text-blue-500"> | ||
Seguimiento | ||
</Link> | ||
</span> | ||
<span className="my-2"> | ||
<Link | ||
to="/package" | ||
className="text-blue-700 text-md hover:text-blue-500"> | ||
Agregar | ||
</Link> | ||
</span> | ||
</div> | ||
<div className="flex flex-col"> | ||
<span className="font-bold text-gray-700 uppercase mt-4 md:mt-0 mb-2"> | ||
FAQ | ||
</span> | ||
|
||
<span className="my-2"> | ||
<Link to="/faq" className="text-blue-700 text-md hover:text-blue-500"> | ||
Preguntas frecuentes | ||
</Link> | ||
</span> | ||
<span className="my-2"> | ||
<Link className="text-blue-700 text-md hover:text-blue-500"> | ||
Soporte | ||
</Link> | ||
</span> | ||
<span className="my-2"> | ||
<Link | ||
to="/faq" | ||
className="text-blue-700 text-md hover:text-blue-500"> | ||
Preguntas frecuentes | ||
</Link> | ||
</span> | ||
<span className="my-2"> | ||
<Link className="text-blue-700 text-md hover:text-blue-500"> | ||
Soporte | ||
</Link> | ||
</span> | ||
</div> | ||
<div className="flex flex-col"> | ||
<span className="font-bold text-gray-700 uppercase mt-4 md:mt-0 mb-2"> | ||
Acerca de nosotros | ||
</span> | ||
<span className="my-2"> | ||
<Link | ||
to="/about" | ||
className="text-blue-700 text-md hover:text-blue-500"> | ||
¿Quiénes somos? | ||
</Link> | ||
</span> | ||
<span className="my-2"> | ||
<Link | ||
to="/NoFound" | ||
className="text-blue-700 text-md hover:text-blue-500"> | ||
404 | ||
</Link> | ||
</span> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div className="container mx-auto px-6"> | ||
<div className="mt-16 border-t-2 border-gray-300 flex flex-col items-center"> | ||
<div className="sm:w-2/3 text-center py-6"> | ||
<p className="text-sm font-bold mb-2"> | ||
© 2022 Todos los derechos reservados. | ||
</p> | ||
</div> | ||
<div className="flex flex-col"> | ||
<span className="font-bold text-gray-700 uppercase mt-4 md:mt-0 mb-2"> | ||
Acerca de nosotros | ||
</span> | ||
<span className="my-2"> | ||
<Link to="/about" className="text-blue-700 text-md hover:text-blue-500"> | ||
¿Quiénes somos? | ||
</Link> | ||
</span> | ||
<span className="my-2"> | ||
<Link to="/NoFound" className="text-blue-700 text-md hover:text-blue-500"> | ||
404 | ||
</Link> | ||
</span> | ||
</div> | ||
</div> | ||
</footer> | ||
); | ||
} else { | ||
return ( | ||
<footer className="footer bg-gray-100 relative pt-1 border-b-2 border-blue-700"> | ||
<div className="container mx-auto px-6"> | ||
<div className="sm:flex sm:mt-8"> | ||
<div className="mt-8 sm:mt-0 sm:w-full sm:px-8 flex flex-col md:flex-row justify-between"> | ||
<div className="flex flex-col"> | ||
<span className="font-bold text-gray-700 uppercase mb-2"> | ||
Seguimiento de paquetes | ||
</span> | ||
<span className="my-2"> | ||
<Link | ||
to="/tracking" | ||
className="text-blue-700 text-md hover:text-blue-500"> | ||
Seguimiento UPS | ||
</Link> | ||
</span> | ||
<span className="my-2"> | ||
<Link | ||
to="/admin/package" | ||
className="text-blue-700 text-md hover:text-blue-500"> | ||
Administrar Paquetes | ||
</Link> | ||
</span> | ||
</div> | ||
<div className="flex flex-col"> | ||
<span className="font-bold text-gray-700 uppercase mt-4 md:mt-0 mb-2"> | ||
FAQ | ||
</span> | ||
|
||
<span className="my-2"> | ||
<Link | ||
to="/faq" | ||
className="text-blue-700 text-md hover:text-blue-500"> | ||
Preguntas frecuentes | ||
</Link> | ||
</span> | ||
<span className="my-2"> | ||
<Link className="text-blue-700 text-md hover:text-blue-500"> | ||
Soporte | ||
</Link> | ||
</span> | ||
</div> | ||
<div className="flex flex-col"> | ||
<span className="font-bold text-gray-700 uppercase mt-4 md:mt-0 mb-2"> | ||
Acerca de nosotros | ||
</span> | ||
<span className="my-2"> | ||
<Link | ||
to="/about" | ||
className="text-blue-700 text-md hover:text-blue-500"> | ||
¿Quiénes somos? | ||
</Link> | ||
</span> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div className="container mx-auto px-6"> | ||
<div className="mt-16 border-t-2 border-gray-300 flex flex-col items-center"> | ||
<div className="sm:w-2/3 text-center py-6"> | ||
<p className="text-sm font-bold mb-2"> | ||
© 2022 Todos los derechos reservados. | ||
</p> | ||
<div className="container mx-auto px-6"> | ||
<div className="mt-16 border-t-2 border-gray-300 flex flex-col items-center"> | ||
<div className="sm:w-2/3 text-center py-6"> | ||
<p className="text-sm font-bold mb-2"> | ||
© 2022 Todos los derechos reservados. | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</footer> | ||
); | ||
</footer> | ||
); | ||
} | ||
}; | ||
|
||
export default Footer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import React from 'react' | ||
|
||
const PackageCards = () => { | ||
return ( | ||
<div>PackageCards</div> | ||
) | ||
} | ||
|
||
export default PackageCards |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
src/components/PackageForms.js → src/components/client/PackageForms.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/components/PackagePayment.js → src/components/client/PackagePayment.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/components/PackagesTable.js → src/components/client/PackagesTable.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/components/ShowInvoice.js → src/components/client/ShowInvoice.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
src/components/UserFinalForms.js → src/components/client/UserFinalForms.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.