-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New update #5
base: development
Are you sure you want to change the base?
New update #5
Conversation
Added 2 new screens - Trip History and 2. Trip Details. Implemented Animation of trip on map.
Issue Pause & stop buttons were not being hidden when the trip animation end is reached. Other changes: Minor driver pod design changes
Passed data from home page as props.
For merging to Rubeena's branch
…ofile fields, creayed a button in driver profile page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why we need map.jpg and satellite.jpg. Wont google map provides
Remove console.logs
Remove commented codes
app/components/DateTab.tsx
Outdated
const formattedDate = `${initialDate.getFullYear()}-0${ | ||
initialDate.getMonth() + 1 | ||
}-${initialDate.getDate()}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not readable. Put code comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rewrote in a readable format
@@ -0,0 +1,189 @@ | |||
import { StyleSheet, Text, View, TouchableOpacity } from "react-native"; | |||
import React, { useEffect, useState } from "react"; | |||
// import { VehicleInfoStyles } from "./VehicleInfo"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dont include commented code for merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed all commented codes and console logs
app/components/DateTab.tsx
Outdated
let unchangedDate; | ||
const { displayDate, actualDate } = setMoment(1, true); | ||
const activeDate = moment(selectedDate).isSame(actualDate, "date"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this code should be at the top
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
put the code at the top
app/components/DateTab.tsx
Outdated
|
||
let dateComponent = []; | ||
const dateComparison = moment(selectedDate).isSame(initialDate, "date"); | ||
console.log("date Comparison", dateComparison); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove console.og
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed console logs
<> | ||
<View style={{ marginVertical: "1%" }}> | ||
<Text | ||
style={{ fontWeight: "600", fontSize: moderateScale(15) }} | ||
> | ||
{trips.length} Trips found on{" "} | ||
{moment(trips[0]?.startDate, "DD-MM-YYYY HH:mm:ss").format( | ||
"DD MMM YYYY" | ||
)} | ||
</Text> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be a component
<NoResourceFound /> | ||
<View style={styles.errorMsg}> | ||
<Text style={styles.extraBoldFont}> | ||
No trips found on :{" "} | ||
<Text | ||
style={{ | ||
color: AppStyles.color.COLOR_DARK_GREY, | ||
fontSize: moderateScale(18), | ||
}} | ||
> | ||
{moment(dateDetails.startDate).format("DD MMM YYYY")} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be a seperate component
app/services/client.ts
Outdated
@@ -17,27 +18,30 @@ const FetchApi = async ({ | |||
const body = | |||
contentType === "multipart/form-data" ? payload : JSON.stringify(payload); | |||
apiOverride = isAuth ? ApiConfig.BASE_URL_AUTH : ApiConfig.BASE_URL_API; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make isAuth as isAuthReq
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed everywhere
@@ -17,27 +18,30 @@ const FetchApi = async ({ | |||
const body = | |||
contentType === "multipart/form-data" ? payload : JSON.stringify(payload); | |||
apiOverride = isAuth ? ApiConfig.BASE_URL_AUTH : ApiConfig.BASE_URL_API; | |||
apiOverride = isGtrackit ? ApiConfig.GTRACKIT_BASE_URL_API : apiOverride; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isGtrackit is not needed as the URL should be decided based on login user's region
if (response.headers.get("content-type") && response.headers.get("content-type")?.match(/application\/json/)) { | ||
if ( | ||
response.headers.get("content-type") && | ||
response.headers.get("content-type")?.match(/application\/json/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
? should be with each object and its member objects. The first null check is not needed if we are using ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed first condition
HAW-441
removed hardcoded values in the home page
HAW-452
In 'my profile' page removed one of the address fields and added the school name, and all fields are now read only.
HAW-453
In My profile, added a button 'bus no' when clicking the same, that is redirected to 'my bus' page. The my bus page is not yet started. Once it is finished that can be display here. Currently a simple page is navigated instead