Skip to content
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

Open
wants to merge 15 commits into
base: development
Choose a base branch
from
Open

New update #5

wants to merge 15 commits into from

Conversation

Rubeena-zt
Copy link
Collaborator

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

ThalmisFaraj and others added 7 commits May 4, 2023 22:27
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
Copy link
Owner

@codeadmin-zs codeadmin-zs left a 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/screens/BusDetails/index.tsx Outdated Show resolved Hide resolved
Comment on lines 12 to 14
const formattedDate = `${initialDate.getFullYear()}-0${
initialDate.getMonth() + 1
}-${initialDate.getDate()}`;
Copy link
Owner

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

Copy link
Collaborator Author

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";
Copy link
Owner

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

Copy link
Collaborator Author

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

Comment on lines 82 to 84
let unchangedDate;
const { displayDate, actualDate } = setMoment(1, true);
const activeDate = moment(selectedDate).isSame(actualDate, "date");
Copy link
Owner

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

Copy link
Collaborator Author

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


let dateComponent = [];
const dateComparison = moment(selectedDate).isSame(initialDate, "date");
console.log("date Comparison", dateComparison);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove console.og

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed console logs

Comment on lines +146 to +155
<>
<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>
Copy link
Owner

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

Comment on lines +175 to +185
<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")}
Copy link
Owner

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

@@ -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;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make isAuth as isAuthReq

Copy link
Collaborator Author

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;
Copy link
Owner

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/)
Copy link
Owner

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 ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed first condition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants