Skip to content

Commit f0f2ac4

Browse files
committedMar 18, 2022
Icon of website added and Account info created
1 parent f6e961f commit f0f2ac4

12 files changed

+3294
-87
lines changed
 

‎package-lock.json

+3,016-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+10-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"react-bootstrap": "^2.2.0",
1313
"react-dom": "^17.0.2",
1414
"react-router-dom": "^6.2.2",
15+
"react-router-sitemap-generator": "0.0.8",
1516
"react-scripts": "5.0.0",
1617
"web-vitals": "^2.1.4"
1718
},
@@ -39,5 +40,13 @@
3940
"last 1 safari version"
4041
]
4142
},
42-
"proxy": "http://localhost:5000/"
43+
"proxy": "http://localhost:5000/",
44+
"devDependencies": {
45+
"@babel/node": "^7.16.8",
46+
"@babel/plugin-transform-react-jsx": "^7.17.3",
47+
"babel-cli": "^6.26.0",
48+
"babel-preset-es2015": "^6.24.1",
49+
"babel-preset-react": "^6.24.1",
50+
"babel-register": "^6.26.0"
51+
}
4352
}

‎public/index.html

+17-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
<!DOCTYPE html>
2-
<html lang="en">
2+
<html lang="es">
33
<head>
44
<meta charset="utf-8" />
5-
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
5+
<link rel="icon" href="%PUBLIC_URL%/loguito.png" />
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
77
<meta name="theme-color" content="#000000" />
88
<meta
99
name="description"
10-
content="Web site created using create-react-app"
10+
content="Somos un pequeño grupo de dispatchers con amplia experiencia en
11+
cargas secas, refrigeradas, así como flat bed, enfocados en buscar y
12+
negociar el mejor precio con los brokers y ofrecerle tanto a dueños
13+
de camiones como pequeñas compañías un servicio de calidad y
14+
profesionalismo."
1115
/>
12-
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
16+
<link rel="apple-touch-icon" href="%PUBLIC_URL%/loguito.png" />
1317
<!--
1418
manifest.json provides metadata used when your web app is installed on a
1519
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
@@ -24,7 +28,15 @@
2428
work correctly both with client-side routing and a non-root public URL.
2529
Learn how to configure a non-root public URL by running `npm run build`.
2630
-->
27-
<title>React App</title>
31+
<title>dispatch305</title>
32+
<head>
33+
<meta property="og:title" content="dispatch305" />
34+
<meta property="og:description" content="Somos un pequeño grupo de dispatchers con amplia experiencia en
35+
cargas secas, refrigeradas, así como flat bed, enfocados en buscar y
36+
negociar el mejor precio con los brokers y ofrecerle tanto a dueños
37+
de camiones como pequeñas compañías un servicio de calidad y
38+
profesionalismo." />
39+
</head>
2840
</head>
2941
<body>
3042
<noscript>You need to enable JavaScript to run this app.</noscript>

‎public/loguito.png

2.58 KB
Loading

‎public/sitemap.xml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
2+
<!-- created with Free Online Sitemap Generator www.xml-sitemaps.com -->
3+
<url>
4+
<loc>https://www.dispatch305.com/</loc>
5+
<lastmod>2022-03-18T19:14:37+00:00</lastmod>
6+
</url>
7+
</urlset>

‎src/components/Account.jsx

+170-59
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ function Account({
1919
documents_info,
2020
onClickResetPasswordModal,
2121
}) {
22-
const [show_authorization_letter_modal, setShowAuthorizationLetterModal] = useState(false);
22+
const [show_authorization_letter_modal, setShowAuthorizationLetterModal] =
23+
useState(false);
2324
const [show_w9_modal, setShowW9Modal] = useState(false);
2425
const [show_insurance_modal, setShowInsuranceModal] = useState(false);
2526
const [show_noa_modal, setShowNOAModal] = useState(false);
@@ -40,7 +41,6 @@ function Account({
4041
setShowW9Modal(false);
4142
};
4243

43-
4444
const handleInsuranceModal = () => {
4545
setShowInsuranceModal(true);
4646
};
@@ -49,7 +49,6 @@ function Account({
4949
setShowInsuranceModal(false);
5050
};
5151

52-
5352
const handleNOAModal = () => {
5453
setShowNOAModal(true);
5554
};
@@ -59,13 +58,12 @@ function Account({
5958
};
6059

6160
const getCurrentShowModal = (doc_name) => {
62-
if(doc_name === "Authorization Letter") return handleAuthorizationLetterModal();
63-
if(doc_name === "W9") return handleW9Modal();
64-
if(doc_name === "Insurance") return handleInsuranceModal();
65-
if(doc_name === "NOA") return handleNOAModal();
66-
}
67-
68-
61+
if (doc_name === "Authorization Letter")
62+
return handleAuthorizationLetterModal();
63+
if (doc_name === "W9") return handleW9Modal();
64+
if (doc_name === "Insurance") return handleInsuranceModal();
65+
if (doc_name === "NOA") return handleNOAModal();
66+
};
6967

7068
return (
7169
<div className="account-div">
@@ -77,68 +75,182 @@ function Account({
7775
<Container className="account-info-div">
7876
<Row className="account-info-row">
7977
<Col xs={12} sm={12} md={12} lg={6} className="account-info-col">
80-
<p className="account-info-p">
81-
<span className="account-info-title">
82-
NOMBRE DE LA COMPAÑIA:{" "}
83-
</span>
84-
<span className="account-info-span">
85-
{user_info.company_name}
86-
</span>
87-
</p>
88-
89-
<p className="account-info-p">
90-
<span className="account-info-title">NOMBRE DE CONTACTO: </span>
91-
<span className="account-info-span">
92-
{user_info.contact_name}
93-
</span>
94-
</p>
95-
96-
<p className="account-info-p">
97-
<span className="account-info-title">TELEFONO: </span>
98-
<span className="account-info-span">{user_info.phone}</span>
99-
</p>
100-
101-
<p className="account-info-p">
102-
<span className="account-info-title">EMAIL: </span>
103-
<span className="account-info-span">{user_info.email}</span>
104-
</p>
78+
<Row className="account-info-edit-row">
79+
<Col
80+
xs={12}
81+
sm={12}
82+
md={2}
83+
lg={2}
84+
className="account-info-edit-col"
85+
>
86+
<span className="account-info-title">
87+
<p className="account-info-box-title">COMPANY</p>
88+
</span>
89+
</Col>
90+
91+
<Col
92+
xs={12}
93+
sm={12}
94+
md={10}
95+
lg={10}
96+
className="account-info-edit-col"
97+
>
98+
<span className="account-info-span">
99+
<div className="account-info-box-div">
100+
<p className="account-info-box-p">
101+
{user_info.company_name}
102+
</p>
103+
</div>
104+
</span>
105+
</Col>
106+
</Row>
107+
108+
<Row className="account-info-edit-row">
109+
<Col
110+
xs={12}
111+
sm={12}
112+
md={2}
113+
lg={2}
114+
className="account-info-edit-col"
115+
>
116+
<span className="account-info-title">
117+
<p className="account-info-box-title">CONTACT</p>
118+
</span>
119+
</Col>
120+
121+
<Col
122+
xs={12}
123+
sm={12}
124+
md={10}
125+
lg={10}
126+
className="account-info-edit-col"
127+
>
128+
<span className="account-info-span">
129+
<div className="account-info-box-div">
130+
<p className="account-info-box-p">
131+
{user_info.contact_name}
132+
</p>
133+
</div>
134+
</span>
135+
</Col>
136+
</Row>
137+
138+
<Row className="account-info-edit-row">
139+
<Col
140+
xs={12}
141+
sm={12}
142+
md={2}
143+
lg={2}
144+
className="account-info-edit-col"
145+
>
146+
<span className="account-info-title">
147+
<p className="account-info-box-title">PHONE</p>
148+
</span>
149+
</Col>
150+
151+
<Col
152+
xs={12}
153+
sm={12}
154+
md={10}
155+
lg={10}
156+
className="account-info-edit-col"
157+
>
158+
<span className="account-info-span">
159+
<div className="account-info-box-div">
160+
<p className="account-info-box-p">{user_info.phone}</p>
161+
</div>
162+
</span>
163+
</Col>
164+
</Row>
165+
166+
<Row className="account-info-edit-row">
167+
<Col
168+
xs={12}
169+
sm={12}
170+
md={2}
171+
lg={2}
172+
className="account-info-edit-col"
173+
>
174+
<span className="account-info-title">
175+
<p className="account-info-box-title">EMAIL</p>
176+
</span>
177+
</Col>
178+
179+
<Col
180+
xs={12}
181+
sm={12}
182+
md={10}
183+
lg={10}
184+
className="account-info-edit-col"
185+
>
186+
<span className="account-info-span">
187+
<div className="account-info-box-div">
188+
<p className="account-info-box-p">{user_info.email}</p>
189+
</div>
190+
</span>
191+
</Col>
192+
</Row>
105193
</Col>
106194

107195
<Col xs={12} sm={12} md={12} lg={6} className="account-info-col">
108196
{documents_info.map((doc_info, index) => {
109197
return (
110-
<div key={index} className="account-info-documents-div">
111-
<p className="account-info-document-p">
112-
<span className="account-info-document-title">
113-
{doc_info.name}:{" "}
198+
<Row key={index} className="account-info-edit-row">
199+
<Col
200+
xs={12}
201+
sm={12}
202+
md={10}
203+
lg={10}
204+
className="account-info-edit-col"
205+
>
206+
<span className="account-info-span">
207+
<div className="account-info-box-div">
208+
<p className="account-info-box-p">
209+
<a
210+
href={`http://localhost:5000/user-account/pdf-viewer/${user_info.email}/${doc_info.filename}`}
211+
target="_blank"
212+
className="account-info-box-a"
213+
>
214+
{doc_info.name}.pdf
215+
</a>
216+
</p>
217+
</div>
114218
</span>
115-
<span className="account-info-document-span">
116-
<a href={`http://localhost:5000/user-account/pdf-viewer/${user_info.email}/${doc_info.filename}`} target="_blank">
117-
Current doc
118-
</a>
219+
</Col>
220+
221+
<Col
222+
xs={12}
223+
sm={12}
224+
md={2}
225+
lg={2}
226+
className="account-info-edit-col"
227+
>
228+
<span className="account-info-title">
229+
<div className="user-info-document-button-div">
230+
<Button
231+
variant="primary"
232+
className="user-info-document-button"
233+
onClick={(e) => getCurrentShowModal(doc_info.name)}
234+
>
235+
CAMBIAR
236+
</Button>
237+
</div>
119238
</span>
120-
</p>
121-
122-
<div className="user-info-document-button-div">
123-
<Button
124-
variant="primary"
125-
className="user-info-document-button"
126-
onClick={(e) => getCurrentShowModal(doc_info.name)}
127-
>
128-
CAMBIAR
129-
</Button>
130-
</div>
131-
</div>
239+
</Col>
240+
</Row>
132241
);
133242
})}
134243
</Col>
135244
</Row>
136245

137246
<Row className="account-info-row">
138247
<p className="account-info-pending-bill-p">
139-
<span className="account-info-title">BILL PENDIENTE: </span>
248+
<span className="account-info-title">PRÓXIMO BILL: </span>
140249
<span className="account-info-span">
141-
${user_info.pending_bill?parseFloat(user_info.pending_bill.toFixed(2)):"0.00"}
250+
$
251+
{user_info.pending_bill
252+
? parseFloat(user_info.pending_bill.toFixed(2))
253+
: "0.00"}
142254
</span>
143255
</p>
144256
</Row>
@@ -200,5 +312,4 @@ function Account({
200312
);
201313
}
202314

203-
204-
export default Account;
315+
export default Account;

‎src/components/BannerCarousel.jsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -107,17 +107,17 @@ function PrincipalBanner() {
107107
<div className="ThirdBanner-text-div">
108108
<h2 className="ThirdBanner-custom-header2">
109109
<span className="ThirdBanner-din-alternate-bold-font">
110-
USTED DECIDE 48 ESTADOS
110+
NEGOCIAMOS CON LOS BROKERS
111111
</span>
112112
</h2>
113113
<h2 className="ThirdBanner-custom-header2">
114114
<span className="ThirdBanner-din-alternate-bold-font">
115-
ZONAS DE SU PREFERENCIA
115+
LOS MEJORES RATES
116116
</span>
117117
</h2>
118118
<h2 className="ThirdBanner-custom-header2">
119119
<span className="ThirdBanner-din-alternate-bold-font">
120-
O RUTAS DEDICADAS
120+
DEL MOMENTO
121121
</span>
122122
</h2>
123123
</div>

‎src/components/Footer.jsx

+6-5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import { NavLink } from "react-router-dom";
1212
import {useContextMenu} from "../context/MenuContext";
1313
import {useAuth} from "../context/AuthContext";
1414

15+
import agreement_download from "../assets/files/Dispatch305-agreement.pdf";
16+
1517
function Footer() {
1618

1719
const {current_link, setCurrentLinkHelper} = useContextMenu();
@@ -33,16 +35,15 @@ const {user, login, logout} = useAuth();
3335
<span onClick={()=>setCurrentLinkHelper("Home")} className={current_link=="Home"?"secondary-color-span":""}>Home</span>
3436
</Link>
3537

36-
<Link exact to="/service"
37-
as={NavLink} className="footer-link">
38-
<span onClick={()=>setCurrentLinkHelper("Nosotros")} className={current_link=="Nosotros"?"secondary-color-span":""}>Nosotros</span>
39-
</Link>
40-
4138
<Link exact to="/create-account"
4239
as={NavLink} className="footer-link">
4340
<span onClick={()=>setCurrentLinkHelper("Contratar")} className={current_link=="Contratar"?"secondary-color-span":""}>Contratar</span>
4441
</Link>
4542

43+
<Link to={agreement_download} target="_blank" className="footer-link">
44+
Agreement
45+
</Link>
46+
4647
<Link exact to="/user-account" as={NavLink} className="footer-link">
4748
<span onClick={()=>setCurrentLinkHelper("Cuenta")} className={current_link=="Cuenta"?"secondary-color-span":""}>Cuenta</span>
4849
</Link>

‎src/components/Navbar.jsx

+1-5
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,11 @@ function CustomNavbar() {
4949
<span onClick={()=>setCurrentLinkHelper("Home")} className={current_link=="Home"?"secondary-color-span":""}>Home</span>
5050
</Nav.Link>
5151

52-
<Nav.Link exact to="/service" as={NavLink} className="navbar-link">
53-
<span onClick={()=>setCurrentLinkHelper("Nosotros")} className={current_link=="Nosotros"?"secondary-color-span":""}>Nosotros</span>
54-
</Nav.Link>
55-
5652
<Nav.Link exact to="/create-account" as={NavLink} className="navbar-link">
5753
<span onClick={()=>setCurrentLinkHelper("Contratar")} className={current_link=="Contratar"?"secondary-color-span":""}>Contratar</span>
5854
</Nav.Link>
5955

60-
<Nav.Link href={agreement_download} className="navbar-link">
56+
<Nav.Link href={agreement_download} target="_blank" className="navbar-link">
6157
Agreement
6258
</Nav.Link>
6359

‎src/components/ServiceBanner.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function ServiceBanner() {
1313
<img
1414
src={banner2}
1515
width={"100%"}
16-
height="700"
16+
height="800"
1717
alt="Service Truck Cargo"
1818
className="complexBanner-banner-img"
1919
/>

‎src/pages/index.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export default function Landing() {
7979
<div className="spacer" />
8080

8181
<div className="contact-banner">
82-
<h2 className="contact-banner-title-h2">CARGUE SU CAMIÓN</h2>
82+
<h1 className="contact-banner-title-h2">CARGUE SU CAMIÓN</h1>
8383
</div>
8484

8585
<div className="spacer" />

‎src/styles/Account.css

+62-2
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ height: 50px;
1616
}
1717

1818
.account-info-pending-bill-p{
19+
margin-top: 50px !important;
1920
text-align:center;
2021
}
2122

2223
.account-info-title, .account-info-document-title{
23-
color: #35363a;
24+
color: #f89422;
2425
font-family: "Arial" !important;
2526
font-weight: bold !important;
2627
}
@@ -32,7 +33,7 @@ height: 50px;
3233

3334
.user-info-button-div{
3435
width: 250px;
35-
margin-top: 30px;
36+
margin-top: 20px;
3637
margin-left:auto;
3738
margin-right:auto;
3839
text-align:center;
@@ -90,6 +91,42 @@ height: 50px;
9091
margin-right: auto;
9192
}
9293

94+
.account-info-p-div{
95+
display: flex !important;
96+
flex-direction: row !important;
97+
column-gap: 10px !important;
98+
}
99+
100+
.account-info-box-div{
101+
width: 400px;
102+
height: 50px;
103+
border: 1px solid #9d9e9f !important;
104+
}
105+
106+
107+
.account-info-edit-col{
108+
margin-top: 10px !important;
109+
}
110+
111+
.account-info-box-title{
112+
padding-top: 10px !important;
113+
}
114+
115+
.account-info-box-p{
116+
padding-top: 10px !important;
117+
padding-left: 10px !important;
118+
}
119+
120+
.account-info-box-a{
121+
color: #9d9e9f !important;
122+
outline: none !important;
123+
text-decoration: none !important;
124+
}
125+
126+
.account-info-box-a:hover{
127+
color: #f89422 !important;
128+
}
129+
93130
@media screen and (max-width: 578px){
94131

95132
.account-info-col{
@@ -130,4 +167,27 @@ height: 50px;
130167
.account-info-col{
131168
max-width: 90%;
132169
}
170+
171+
.account-info-box-p{
172+
padding-top: 10px !important;
173+
padding-left: 0px !important;
174+
}
175+
176+
.account-info-p-div{
177+
display: flex !important;
178+
flex-direction: column !important;
179+
column-gap: 10px !important;
180+
}
181+
182+
.account-info-box-div{
183+
width: 300px;
184+
height: 50px;
185+
margin-left: auto !important;
186+
margin-right: auto !important;
187+
border: 1px solid #9d9e9f !important;
188+
}
189+
190+
.account-info-col{
191+
margin-top: 50px !important;
192+
}
133193
}