From a60abff2264672744fc69189ef9d1b939d23f262 Mon Sep 17 00:00:00 2001 From: John Lyon-Smith Date: Fri, 6 Apr 2018 17:13:09 -0700 Subject: [PATCH] Adding work item ticket number into to list --- mobile/src/Auth/DefaultRoute.js | 2 +- mobile/src/WorkItem/WorkItemList.js | 11 ++++++++++- mobile/src/util.js | 6 ++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/mobile/src/Auth/DefaultRoute.js b/mobile/src/Auth/DefaultRoute.js index 1d41d5d..43027b5 100644 --- a/mobile/src/Auth/DefaultRoute.js +++ b/mobile/src/Auth/DefaultRoute.js @@ -3,5 +3,5 @@ import { Route, Redirect } from "react-router-native" export const DefaultRoute = () => { // NOTE: When working on the app, change this to the page you are working on - return } /> + return } /> } diff --git a/mobile/src/WorkItem/WorkItemList.js b/mobile/src/WorkItem/WorkItemList.js index 5406643..f79ade5 100644 --- a/mobile/src/WorkItem/WorkItemList.js +++ b/mobile/src/WorkItem/WorkItemList.js @@ -13,7 +13,7 @@ import { MessageModal } from "../Modal" import autobind from "autobind-decorator" import { SwipeListView } from "react-native-swipe-list-view" import { api } from "../API" -import { workItemTypeEnum, formatLatLng, parseLatLng } from "../util" +import { workItemTypeEnum, formatLatLng, parseLatLng, pad } from "../util" const styles = StyleSheet.create({ container: { @@ -140,6 +140,15 @@ export class WorkItemList extends React.Component { onPress={() => this.handleItemSelect(item, rowMap[item._id])}> + + {pad(item.ticketNumber, 4)} + { + var s = num + "" + while (s.length < size) s = "0" + s + return s +}