diff --git a/.gitignore b/.gitignore index 71e39b9..099d08e 100644 --- a/.gitignore +++ b/.gitignore @@ -62,3 +62,6 @@ typings/ *.lock /services/node/package-lock.json +/DMT/.idea/ +.idea/ +.scannerwork/ \ No newline at end of file diff --git a/DMT/.gitignore b/DMT/.gitignore index 2b11622..1ed5686 100644 --- a/DMT/.gitignore +++ b/DMT/.gitignore @@ -9,3 +9,5 @@ npm-debug.* web-build/ web-report/ /*.lock + +.idea/ diff --git a/DMT/.idea/DMT.iml b/DMT/.idea/DMT.iml deleted file mode 100644 index 24643cc..0000000 --- a/DMT/.idea/DMT.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/DMT/.idea/encodings.xml b/DMT/.idea/encodings.xml deleted file mode 100644 index 15a15b2..0000000 --- a/DMT/.idea/encodings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/DMT/.idea/misc.xml b/DMT/.idea/misc.xml deleted file mode 100644 index 24eb271..0000000 --- a/DMT/.idea/misc.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/DMT/.idea/modules.xml b/DMT/.idea/modules.xml deleted file mode 100644 index a796769..0000000 --- a/DMT/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/DMT/.idea/vcs.xml b/DMT/.idea/vcs.xml deleted file mode 100644 index 6c0b863..0000000 --- a/DMT/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/DMT/App.js b/DMT/App.js index 4b06ae7..708d9af 100644 --- a/DMT/App.js +++ b/DMT/App.js @@ -7,9 +7,14 @@ import RevenueLicense from './components/RevenueLicense' import MyVehicles from './components/MyVehicles' import Logout from './components/actions/Logout' import Reload from './components/commons/Reload' -import {ScrollView} from 'react-native'; +import {ScrollView, View} from 'react-native'; import {Image} from "react-native-elements"; import {createAppContainer, createDrawerNavigator, createSwitchNavigator, DrawerItems} from 'react-navigation' +import configs from "./config.json" +import FineManagement from "./components/FineManagement"; + +import SignInScreen from "./components/SignInScreen"; +import PaymentGateway from "./components/PaymentGateway"; export default class App extends React.Component { @@ -23,10 +28,12 @@ export default class App extends React.Component { const customDrawerContent = (props) => ( - + + + ) @@ -44,6 +51,11 @@ const DrawerNavigator = createDrawerNavigator({ headerVisible: false, }, initialRouteName: 'Home', + contentOptions: { + activeLabelStyle: { + color: configs.theme + } + }, contentComponent: customDrawerContent, } ); @@ -54,6 +66,7 @@ const DrawerNavigatorLoginUsers = createDrawerNavigator({ VehicleDetails: {screen: VehicleDetails}, RevenueLicense: {screen: RevenueLicense}, MyVehicles: {screen: MyVehicles}, + FineManagement: {screen: FineManagement}, Logout: {screen: Logout} }, { @@ -62,12 +75,19 @@ const DrawerNavigatorLoginUsers = createDrawerNavigator({ headerVisible: false, }, initialRouteName: 'Home', + contentOptions: { + activeLabelStyle: { + color: configs.theme + } + }, contentComponent: customDrawerContent, } ); const SwitchNavigator = createSwitchNavigator({ Reload: {screen: Reload}, + SignIn: SignInScreen, + PaymentGateway: PaymentGateway, App: DrawerNavigator, UserApp: DrawerNavigatorLoginUsers }, diff --git a/DMT/app.json b/DMT/app.json index 431ad3e..c48e4c6 100644 --- a/DMT/app.json +++ b/DMT/app.json @@ -1,7 +1,7 @@ { "expo": { "name": "DMT", - "slug": "first-rn-app", + "slug": "dmt", "privacy": "public", "sdkVersion": "33.0.0", "platforms": [ @@ -27,7 +27,12 @@ "supportsTablet": true }, "android": { - "package": "com.tmg" + "package": "com.tmg", + "permissions": [ + "CAMERA", + "READ_EXTERNAL_STORAGE", + "WRITE_EXTERNAL_STORAGE" + ] } } } \ No newline at end of file diff --git a/DMT/assets/OngoingNumberIcons/bigTruckIcon.png b/DMT/assets/OngoingNumberIcons/bigTruckIcon.png new file mode 100644 index 0000000..9fb5887 Binary files /dev/null and b/DMT/assets/OngoingNumberIcons/bigTruckIcon.png differ diff --git a/DMT/assets/OngoingNumberIcons/buldozerIcon.png b/DMT/assets/OngoingNumberIcons/buldozerIcon.png new file mode 100644 index 0000000..47f83d5 Binary files /dev/null and b/DMT/assets/OngoingNumberIcons/buldozerIcon.png differ diff --git a/DMT/assets/OngoingNumberIcons/busIcon.png b/DMT/assets/OngoingNumberIcons/busIcon.png new file mode 100644 index 0000000..1394f35 Binary files /dev/null and b/DMT/assets/OngoingNumberIcons/busIcon.png differ diff --git a/DMT/assets/OngoingNumberIcons/carIcon.png b/DMT/assets/OngoingNumberIcons/carIcon.png new file mode 100644 index 0000000..d0a4211 Binary files /dev/null and b/DMT/assets/OngoingNumberIcons/carIcon.png differ diff --git a/DMT/assets/OngoingNumberIcons/cementIcon.png b/DMT/assets/OngoingNumberIcons/cementIcon.png new file mode 100644 index 0000000..09022ba Binary files /dev/null and b/DMT/assets/OngoingNumberIcons/cementIcon.png differ diff --git a/DMT/assets/OngoingNumberIcons/commercialIcon.png b/DMT/assets/OngoingNumberIcons/commercialIcon.png new file mode 100644 index 0000000..106d774 Binary files /dev/null and b/DMT/assets/OngoingNumberIcons/commercialIcon.png differ diff --git a/DMT/assets/OngoingNumberIcons/excavatorIcon.png b/DMT/assets/OngoingNumberIcons/excavatorIcon.png new file mode 100644 index 0000000..2a04efa Binary files /dev/null and b/DMT/assets/OngoingNumberIcons/excavatorIcon.png differ diff --git a/DMT/assets/OngoingNumberIcons/forkLiftIcon.png b/DMT/assets/OngoingNumberIcons/forkLiftIcon.png new file mode 100644 index 0000000..808c521 Binary files /dev/null and b/DMT/assets/OngoingNumberIcons/forkLiftIcon.png differ diff --git a/DMT/assets/OngoingNumberIcons/lorryIcon.png b/DMT/assets/OngoingNumberIcons/lorryIcon.png new file mode 100644 index 0000000..e2228a4 Binary files /dev/null and b/DMT/assets/OngoingNumberIcons/lorryIcon.png differ diff --git a/DMT/assets/OngoingNumberIcons/panzerIcon.png b/DMT/assets/OngoingNumberIcons/panzerIcon.png new file mode 100644 index 0000000..d089583 Binary files /dev/null and b/DMT/assets/OngoingNumberIcons/panzerIcon.png differ diff --git a/DMT/assets/OngoingNumberIcons/primeMoverIcon.png b/DMT/assets/OngoingNumberIcons/primeMoverIcon.png new file mode 100644 index 0000000..664375d Binary files /dev/null and b/DMT/assets/OngoingNumberIcons/primeMoverIcon.png differ diff --git a/DMT/assets/OngoingNumberIcons/singleCabIcon.png b/DMT/assets/OngoingNumberIcons/singleCabIcon.png new file mode 100644 index 0000000..5d6782c Binary files /dev/null and b/DMT/assets/OngoingNumberIcons/singleCabIcon.png differ diff --git a/DMT/assets/OngoingNumberIcons/tractorTrailerIcon.png b/DMT/assets/OngoingNumberIcons/tractorTrailerIcon.png new file mode 100644 index 0000000..3292b0a Binary files /dev/null and b/DMT/assets/OngoingNumberIcons/tractorTrailerIcon.png differ diff --git a/DMT/assets/OngoingNumberIcons/trailerIcon.png b/DMT/assets/OngoingNumberIcons/trailerIcon.png new file mode 100644 index 0000000..d9cba27 Binary files /dev/null and b/DMT/assets/OngoingNumberIcons/trailerIcon.png differ diff --git a/DMT/assets/drawer_image - Copy.png b/DMT/assets/drawer_image - Copy.png index 5d1bc29..98955d9 100644 Binary files a/DMT/assets/drawer_image - Copy.png and b/DMT/assets/drawer_image - Copy.png differ diff --git a/DMT/assets/drawer_image.png b/DMT/assets/drawer_image.png index 379a56c..0f954a0 100644 Binary files a/DMT/assets/drawer_image.png and b/DMT/assets/drawer_image.png differ diff --git a/DMT/assets/home_logo.png b/DMT/assets/home_logo.png new file mode 100644 index 0000000..aa475a5 Binary files /dev/null and b/DMT/assets/home_logo.png differ diff --git a/DMT/assets/icon - Copy.png b/DMT/assets/icon - Copy.png deleted file mode 100644 index d28cd2f..0000000 Binary files a/DMT/assets/icon - Copy.png and /dev/null differ diff --git a/DMT/assets/icon-copy.png b/DMT/assets/icon-copy.png new file mode 100644 index 0000000..a5b387e Binary files /dev/null and b/DMT/assets/icon-copy.png differ diff --git a/DMT/assets/icon.png b/DMT/assets/icon.png index af9247c..d28cd2f 100644 Binary files a/DMT/assets/icon.png and b/DMT/assets/icon.png differ diff --git a/DMT/assets/icons/email.png b/DMT/assets/icons/email.png new file mode 100644 index 0000000..c056545 Binary files /dev/null and b/DMT/assets/icons/email.png differ diff --git a/DMT/assets/icons/fine_management.png b/DMT/assets/icons/fine_management.png new file mode 100644 index 0000000..7a1330c Binary files /dev/null and b/DMT/assets/icons/fine_management.png differ diff --git a/DMT/assets/icons/firstName.png b/DMT/assets/icons/firstName.png new file mode 100644 index 0000000..f57bf14 Binary files /dev/null and b/DMT/assets/icons/firstName.png differ diff --git a/DMT/assets/icons/home.png b/DMT/assets/icons/home.png index 9563284..353d732 100644 Binary files a/DMT/assets/icons/home.png and b/DMT/assets/icons/home.png differ diff --git a/DMT/assets/icons/left_arrow.png b/DMT/assets/icons/left_arrow.png new file mode 100644 index 0000000..dd52599 Binary files /dev/null and b/DMT/assets/icons/left_arrow.png differ diff --git a/DMT/assets/icons/logged_user.png b/DMT/assets/icons/logged_user.png index ae07978..4c94fa5 100644 Binary files a/DMT/assets/icons/logged_user.png and b/DMT/assets/icons/logged_user.png differ diff --git a/DMT/assets/icons/login.png b/DMT/assets/icons/login.png index ee5c5db..304eadc 100644 Binary files a/DMT/assets/icons/login.png and b/DMT/assets/icons/login.png differ diff --git a/DMT/assets/icons/login_black.png b/DMT/assets/icons/login_black.png index d7a743e..1a13a4e 100644 Binary files a/DMT/assets/icons/login_black.png and b/DMT/assets/icons/login_black.png differ diff --git a/DMT/assets/icons/login_logo.png b/DMT/assets/icons/login_logo.png new file mode 100644 index 0000000..a8b4c02 Binary files /dev/null and b/DMT/assets/icons/login_logo.png differ diff --git a/DMT/assets/icons/logout.png b/DMT/assets/icons/logout.png index e727fa8..96bb074 100644 Binary files a/DMT/assets/icons/logout.png and b/DMT/assets/icons/logout.png differ diff --git a/DMT/assets/icons/my_vehicle.png b/DMT/assets/icons/my_vehicle.png index d320d33..ac22581 100644 Binary files a/DMT/assets/icons/my_vehicle.png and b/DMT/assets/icons/my_vehicle.png differ diff --git a/DMT/assets/icons/ongoing_numbers.png b/DMT/assets/icons/ongoing_numbers.png index 9c750af..75d82eb 100644 Binary files a/DMT/assets/icons/ongoing_numbers.png and b/DMT/assets/icons/ongoing_numbers.png differ diff --git a/DMT/assets/icons/password.png b/DMT/assets/icons/password.png new file mode 100644 index 0000000..07fa8dc Binary files /dev/null and b/DMT/assets/icons/password.png differ diff --git a/DMT/assets/icons/revenue_license.png b/DMT/assets/icons/revenue_license.png index aecb0c8..8fd1116 100644 Binary files a/DMT/assets/icons/revenue_license.png and b/DMT/assets/icons/revenue_license.png differ diff --git a/DMT/assets/icons/user_reg.png b/DMT/assets/icons/user_reg.png new file mode 100644 index 0000000..60d61f6 Binary files /dev/null and b/DMT/assets/icons/user_reg.png differ diff --git a/DMT/assets/icons/user_reg2.png b/DMT/assets/icons/user_reg2.png new file mode 100644 index 0000000..14a2458 Binary files /dev/null and b/DMT/assets/icons/user_reg2.png differ diff --git a/DMT/assets/icons/user_reg3.png b/DMT/assets/icons/user_reg3.png new file mode 100644 index 0000000..753ffb6 Binary files /dev/null and b/DMT/assets/icons/user_reg3.png differ diff --git a/DMT/assets/icons/username.png b/DMT/assets/icons/username.png new file mode 100644 index 0000000..01f7a89 Binary files /dev/null and b/DMT/assets/icons/username.png differ diff --git a/DMT/assets/icons/vehicle_info.png b/DMT/assets/icons/vehicle_info.png index 72461ba..0e5a3dd 100644 Binary files a/DMT/assets/icons/vehicle_info.png and b/DMT/assets/icons/vehicle_info.png differ diff --git a/DMT/assets/ongoing_numbers.jpg b/DMT/assets/ongoing_numbers.jpg index 8e99bb2..b821bdd 100644 Binary files a/DMT/assets/ongoing_numbers.jpg and b/DMT/assets/ongoing_numbers.jpg differ diff --git a/DMT/assets/vehicle_details.jpg b/DMT/assets/vehicle_details.jpg index bb87834..f619bda 100644 Binary files a/DMT/assets/vehicle_details.jpg and b/DMT/assets/vehicle_details.jpg differ diff --git a/DMT/components/FineManagement.js b/DMT/components/FineManagement.js new file mode 100644 index 0000000..57a7a06 --- /dev/null +++ b/DMT/components/FineManagement.js @@ -0,0 +1,175 @@ +import React from "react" +import {AsyncStorage, Image, ScrollView, Text, View, StyleSheet} from "react-native"; +import AppHeader from "./commons/AppHeader"; +import {Button, Card, Icon, Avatar} from "react-native-elements"; +import configs from "../config"; + + +export default class HomeScreen extends React.Component { + static navigationOptions = { + title: "Fine Management", + drawerIcon: ( + + ) + }; + + state = { + fineDetails: [], + name: "Ranmal Dewage", + licenseDetails: "B54356789", + loading: false + } + + componentDidMount() { + const PUSH_ENDPOINT = configs.dmtUrl + "/fines/" + fetch(PUSH_ENDPOINT).then(res => res.json()).then(res => { + this.setState({ + fineDetails: res + }) + }); + } + + render() { + const {navigate} = this.props.navigation; + return ( + <> + + + + + + Name : {this.state.name} + License No : {this.state.licenseDetails} + + + {this.state.fineDetails.length != 0 && this.state.fineDetails.map((fine) => { + const ref = "REF : " + fine.ref + return + + Vehicle Number + : {fine.vehicleNumber} + + + Fined Date + : {fine.finedDate} + + + Fined Place + : {fine.finedPlace} + + + Fine Due Date + : {fine.fineDueDate} + + + Reason + : {fine.reason} + + + Amount + : Rs.{fine.amount} + + + Status + : {fine.status} + + + {fine.status === "NOT PAID" &&