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

Read message api #15

Open
wants to merge 62 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
7ceee93
Trip-history & trip detail animation
ThalmisFaraj May 4, 2023
ae12eaa
Minor bug fix
ThalmisFaraj May 5, 2023
747216d
Driver Pod UI update
ThalmisFaraj May 5, 2023
85c78fa
My profile update
ThalmisFaraj May 11, 2023
c43069b
Merge pull request #4 from codeadmin-zs/trip-history
Rubeena-zt May 11, 2023
bb5cde6
made 'my bus' button and removed 'children' button, updated driver pr…
Rubeena-zt May 12, 2023
348cd20
started driver-leaves
Rubeena-zt May 12, 2023
6ac7fe5
deleted apk.ap files
Rubeena-zt May 15, 2023
c776bf4
Updated apply leave page
Rubeena-zt May 15, 2023
416da42
apply leave posted
Rubeena-zt May 16, 2023
1d54ee7
modal for successful appllication of leave and error message done
Rubeena-zt May 16, 2023
419ee6f
deleted all console logs and comments
Rubeena-zt May 17, 2023
bee54fd
removed commented codes
Rubeena-zt May 17, 2023
b4d068f
corrections made for the pull request
Rubeena-zt May 17, 2023
12fcb64
password hide, made changes in the driver profile page,
Rubeena-zt May 18, 2023
64f4a9b
made changes in the myProfile page and holiday & events listed
Rubeena-zt May 19, 2023
ea0c43a
holiday completed
Rubeena-zt May 19, 2023
5f3a3b1
changed color in holiday calender
Rubeena-zt May 19, 2023
6b68cba
changed holiday color to red
Rubeena-zt May 19, 2023
48fdb71
Merge branch 'driver-leaves' into driver-holiday
Rubeena-zt May 19, 2023
03a9bdf
apply leaves added
Rubeena-zt May 19, 2023
2cab770
messages and filter message completed
Rubeena-zt May 23, 2023
2a56203
changed applied leave
Rubeena-zt May 23, 2023
4224fab
Merge branch 'driver-holiday' of https://github.com/codeadmin-zs/hawk…
Rubeena-zt May 23, 2023
6895499
made some change in api apply leave
Rubeena-zt May 23, 2023
2beb6fa
initial commit for my-bus page
Rubeena-zt May 23, 2023
64edc81
changes made in date tab component
Rubeena-zt May 24, 2023
8b01694
added date picker and bus pod to my bus page
Rubeena-zt May 25, 2023
a6e6913
added svg components in bus pod
Rubeena-zt May 25, 2023
0abd217
cleared bug in datepicker, displayed start, end and intermediate stop…
Rubeena-zt May 26, 2023
c42b435
my-bus page error fixed
Rubeena-zt Jun 1, 2023
ff90e5d
got the routes when clicking the bus pods
Rubeena-zt Jun 2, 2023
81a8718
my bus toggling done
Rubeena-zt Jun 2, 2023
8cb6ba1
View on map in my bus page completed, added the list of vehicles of t…
Rubeena-zt Jun 6, 2023
d24b483
changed color in links and removed underline
Rubeena-zt Jun 6, 2023
f8fec2d
added live location, trip history and pickupdata buttons in the bus pod
Rubeena-zt Jun 6, 2023
e428efc
on click of a bus listed all routes of the bus filtered the route by …
Rubeena-zt Jun 7, 2023
8ab3ea5
added live location in track screen-map view
Rubeena-zt Jun 7, 2023
b8039a6
doing the list view of the vehicle stops
Rubeena-zt Jun 7, 2023
314946b
live location completed, added list view and timer in every 1 minute
Rubeena-zt Jun 8, 2023
6a80e9e
if only one bus is there the track page is redirect to live location,…
Rubeena-zt Jun 9, 2023
9643c64
removed all hard coded values. Pickup details screen done
Rubeena-zt Jun 9, 2023
3f782cf
changes in the applied leave
Rubeena-zt Jun 12, 2023
251da8b
bug fixed in the apply leave page
Rubeena-zt Jun 12, 2023
5e79e5e
applied leaves are shown in the calendar. Bug fixed-cant select alrea…
Rubeena-zt Jun 13, 2023
9b24fe1
bug fixed, added employee id and school name in the driver pod
Rubeena-zt Jun 13, 2023
54eb504
changed the base url
Rubeena-zt Jun 15, 2023
bde21f6
first commit
Rubeena-zt Jun 15, 2023
cd1f236
created a component scheduled route and imported in my-bus
Rubeena-zt Jun 16, 2023
7ef1158
imported the scheduled routes component in pickup details and my-bus …
Rubeena-zt Jun 19, 2023
a4f91d9
displayed the route details in the home page
Rubeena-zt Jun 19, 2023
946b7d3
bug fixed
Rubeena-zt Jun 19, 2023
5fe5612
added "todays route" in home page and removed routes found
Rubeena-zt Jun 19, 2023
82b191f
start and end stop added in live location
Rubeena-zt Jun 20, 2023
54ec6f8
added the stops number and the distance in live location page
Rubeena-zt Jun 20, 2023
ff57cc6
bug fixed
Rubeena-zt Jun 20, 2023
371da1b
final correction is made
Rubeena-zt Jun 20, 2023
8b8f21a
addded a boarder for the routes showing component
Rubeena-zt Jun 21, 2023
8501174
read message Api integrated
Rubeena-zt Jun 21, 2023
2503e93
integrated read message APIs
Rubeena-zt Jun 21, 2023
f14025b
bug fixed in read one message API integration
Rubeena-zt Jun 22, 2023
56c6ca1
removed all console logs and commented codes
Rubeena-zt Jun 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* Generated with the TypeScript template
* https://github.com/react-native-community/react-native-template-typescript
*
* @format
*/

import React, {type PropsWithChildren} from 'react';
import {
Expand Down
Binary file added android/app/release/app-release.apk
Binary file not shown.
20 changes: 20 additions & 0 deletions android/app/release/output-metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.hawkeye_driver",
"variantName": "release",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 1,
"versionName": "1.0",
"outputFile": "app-release.apk"
}
],
"elementType": "File"
}
Binary file added app/assets/Images/map.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/Images/satelite.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/assets/Svgs/MyBus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions app/assets/Svgs/RightArrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion app/components/ActionBar/ActionItem.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import {Image, StyleSheet, View,TouchableOpacity} from 'react-native';
import {moderateScale} from 'react-native-size-matters';
// import { TouchableOpacity } from 'react-native-gesture-handler';

const ActionItem = ({children,onPress}) => {
return (
Expand Down
340 changes: 340 additions & 0 deletions app/components/AssetBottomSheet.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,340 @@
import React, { useEffect, useState } from "react";
import {
View,
ActivityIndicator,
Text,
TouchableOpacity,
Pressable,
StyleSheet,
TouchableWithoutFeedback,
Image,
} from "react-native";
import { moderateScale } from "react-native-size-matters";

import { Typography } from "./Typography";
import metrics from "../config/metrics";

import AppStyles from "../config/styles";
import Separator from "./Separator";
import moment from "moment";
import StudentPod from "./StudentPod";
import {
StartTrackIcon,
Calendar,
ClockIcon,
SchoolBus,
InfoIcon,
} from "./svgComponents";
import { getAssetFilters } from "../utils/utilFuncs";
import ExpandableList from "./ExpandableList";

export default function AssetBottomSheet(props) {
const { locationData, childData } = props;

const [assetState, setAssetState] = useState({});
const [locationAddr, setLocationAddr] = useState("");

function findState(state) {
const [filteredState] = getAssetFilters().filter(
(item) => item.id === state
);
console.log("filteredState", filteredState);
setAssetState(filteredState);
}

function getLocationAddr(state) {
// logic to fetch address
if (locationAddr) {
setLocationAddr("");
} else {
setLocationAddr("Oman");
}
}

function shortenAddress(latlang) {
const locationArr = latlang.split(",");
const lat = locationArr[0].slice(0, 7);
const lang = locationArr[1].slice(0, 8);
return lat + "," + lang;
}

useEffect(() => {
findState(locationData[0]?.state);
}, [locationData]);

return props.showDetails ? (
<>
<TouchableWithoutFeedback onPress={props.onDismiss}>
<View style={styles.modalOverlay} />
</TouchableWithoutFeedback>
<View
style={{
position: "absolute",
bottom: 0,
left: 0,
right: 0,
zIndex: 50,
}}
>
<View style={styles.container}>
<View style={styles.header}>
<TouchableOpacity onPress={props.onDismiss}>
<View style={[styles.line, styles.common]} />
</TouchableOpacity>
</View>
<View style={styles.listContainer}>
<View style={styles.imageContainer}>
<SchoolBus
width={moderateScale(60)}
height={moderateScale(60)}
color={assetState?.color}
/>
<Text style={styles.text}>{assetState?.filterName}</Text>
</View>

<View style={styles.infoContainer}>
<View>
<Text style={{ ...styles.text, fontSize: moderateScale(18) }}>
{locationData[0]?.plate}
</Text>
<View style={{ ...styles.flexContainer, alignItems: "center" }}>
<StartTrackIcon
width={10}
height={13}
color={AppStyles.color.COLOR_DARK_GREY}
/>
<Text
style={{
marginLeft: moderateScale(10),
...styles.text,
display: "flex",
flexDirection: "row",
alignItems: "center",
}}
>
LAT/LONG :{" "}
<Text style={{ color: AppStyles.color.COLOR_DARK_BLUE }}>
{locationAddr
? locationAddr
: shortenAddress(locationData[0]?.latlang)}
</Text>
<TouchableOpacity
onPress={() => getLocationAddr(locationData[0]?.latlang)}
>
<View
style={{
backgroundColor: AppStyles.color.COLOR_BLACK,
borderRadius: moderateScale(10),
height: moderateScale(15),
width: moderateScale(15),
display: "flex",
justifyContent: "center",
alignItems: "center",
marginLeft: moderateScale(5),
}}
>
<InfoIcon width={10} height={10} color={"white"} />
</View>
</TouchableOpacity>
</Text>
</View>
</View>
<View
style={{
...styles.flexContainer,
justifyContent: "space-between",
}}
>
<View style={{ ...styles.flexContainer, alignItems: "center" }}>
<Calendar
width={12}
height={15}
color={AppStyles.color.COLOR_DARK_GREY}
/>
<Text
style={{ marginLeft: moderateScale(10), ...styles.text }}
>
{moment(locationData[0]?.time).format("DD/MM/YYYY")}
</Text>
</View>
<View style={{ ...styles.flexContainer, alignItems: "center" }}>
<ClockIcon
width={10}
height={13}
iconColor={AppStyles.color.COLOR_DARK_GREY}
/>
<Text
style={{ marginLeft: moderateScale(8), ...styles.text }}
>
{moment(locationData[0]?.time).format("h:mm A")}
</Text>
</View>
</View>
</View>
</View>
<View style={styles.horizontalLine} />
<View style={styles.stopContainer}>
<View style={styles.stop}>
<View style={styles.redDot}></View>
<Text style={{ marginLeft: moderateScale(18), ...styles.text }}>
Last Stop: <Text style={{}}>Lulu Hypermarket Barka</Text>
</Text>
</View>
<View style={styles.stop}>
<View style={styles.greenDot}></View>
<Text style={{ marginLeft: moderateScale(18), ...styles.text }}>
Next Stop: <Text style={{}}>Chavadimukku Trivandrum</Text>
</Text>
</View>
</View>
<View style={styles.horizontalLine} />
{Array.isArray(childData) && childData.length > 0 ? (
<ExpandableList title={"Children"}>
{childData.map((child, index) => (
<>
<Typography.H6Light>{child.name}</Typography.H6Light>
{index !== childData.length - 1 ? <Separator /> : null}
</>
))}
</ExpandableList>
) : (
<StudentPod data={childData} />
)}
</View>
</View>
</>
) : null;
}

const styles = StyleSheet.create({
modalOverlay: {
position: "absolute",
top: 0,
bottom: 0,
left: 0,
right: 0,
backgroundColor: "rgba(0,0,0,0.5)",
},
container: {
paddingHorizontal: "4%",
paddingBottom: "2%",
marginTop: "auto",
backgroundColor: "white",
width: metrics.screenWidth,
bottom: 0,
left: 0,
minHeight: metrics.screenHeight * 0.1,
borderTopRightRadius: moderateScale(18),
borderTopLeftRadius: moderateScale(18),
shadowColor: "#000",
shadowOffset: {
width: 0,
height: 2,
},
shadowOpacity: 0.25,
shadowRadius: 4,
elevation: 5,
display: "flex",
},
imageContainer: {
width: "25%",
alignItems: "center",
},
flexContainer: {
display: "flex",
flexDirection: "row",
},
infoContainer: {
padding: moderateScale(5),
width: "75%",
},
listContainer: {
display: "flex",
flexDirection: "row",
width: "100%",
},

listItem: {
backgroundColor: AppStyles.color.COLOR_WHITE,
justifyContent: "center",
alignItems: "flex-start",
paddingHorizontal: moderateScale(20),
height: moderateScale(40),
borderBottomWidth: 1,
borderColor: "#C4C4C4",
},
listItemText: {
fontSize: moderateScale(14),
fontFamily: "Poppins-Medium",
color: AppStyles.color.COLOR_MEDIUM_DARK_GREY,
fontWeight: "500",
},
header: {
paddingVertical: moderateScale(2),
flexDirection: "row",
justifyContent: "center",
alignItems: "center",
},
headerText: {
fontSize: moderateScale(16),
fontFamily: "Poppins-SemiBold",
color: AppStyles.color.COLOR_MEDIUM_DARK_GREY,
fontWeight: "600",
},
common: {
shadowColor: "#000",
shadowOffset: {
height: -3,
width: 0,
},
shadowOpacity: 0.24,
shadowRadius: 4,
},
line: {
width: moderateScale(75),
height: moderateScale(5),
backgroundColor: AppStyles.color.COLOR_DARK_BLUE,
alignSelf: "center",
marginVertical: 5,
borderRadius: 2,
},
horizontalLine: {
backgroundColor: "rgba(202, 202, 202, 0.5)",
marginTop: moderateScale(5),
height: 1,
width: metrics.screenWidth,
alignSelf: "center",
},
stopContainer: {
paddingVertical: "2%",
},
stop: {
display: "flex",
flexDirection: "row",

position: "relative",
left: moderateScale(3),
},
redDot: {
borderRadius: moderateScale(5),
backgroundColor: AppStyles.color.COLOR_DARK_RED,
width: moderateScale(6),
height: moderateScale(6),
position: "absolute",
top: moderateScale(7),
},
greenDot: {
borderRadius: moderateScale(5),
backgroundColor: AppStyles.color.COLOR_GREEN,
width: moderateScale(6),
height: moderateScale(6),
position: "absolute",
top: moderateScale(7),
},
text: {
fontSize: moderateScale(14),
fontFamily: "Poppins-Medium",
color: AppStyles.color.COLOR_MEDIUM_DARK_GREY,
fontWeight: "500",
},
});
Loading