From 921a6ab76396478b75bddb67931eb18b355c9363 Mon Sep 17 00:00:00 2001 From: jfrye122 Date: Wed, 17 May 2023 11:44:35 -0400 Subject: [PATCH] added style to copmonents for phone being sideways --- .../screen-time-ticket-browser.component.jsx | 61 +++++++++++-------- .../screen-time-ticket-clockoff.component.jsx | 4 +- 2 files changed, 38 insertions(+), 27 deletions(-) diff --git a/components/screen-time-ticket-browser/screen-time-ticket-browser.component.jsx b/components/screen-time-ticket-browser/screen-time-ticket-browser.component.jsx index c784138..f90306d 100644 --- a/components/screen-time-ticket-browser/screen-time-ticket-browser.component.jsx +++ b/components/screen-time-ticket-browser/screen-time-ticket-browser.component.jsx @@ -1,5 +1,5 @@ import React, { useState } from "react"; -import { View, Text } from "react-native"; +import { View, Text, StyleSheet, ScrollView } from "react-native"; import axios from "axios"; import { connect } from "react-redux"; import { employeeGetRatesStart } from "../../redux/employee/employee.actions"; @@ -10,7 +10,7 @@ import { selectGettingRates, selectSignInError, } from "../../redux/employee/employee.selectors"; -import { Button } from "react-native-paper"; +import { Button, Card } from "react-native-paper"; //temp import { useQuery } from "@apollo/client"; @@ -97,7 +97,6 @@ export function ScreenTimeTicketBrowser({ if (currentSJobId) console.log("jobid or currentSJobId", currentSJobId?.value); - const tempVariablesObj = { variables: { timeTicketInput: [ @@ -126,10 +125,9 @@ export function ScreenTimeTicketBrowser({ }; console.info( "INSERT_NEW_TIME_TICKET, variables for clockin. : ", - tempVariablesObj?.variables?.timeTicketInput[0] + tempVariablesObj?.variables?.timeTicketInput[0] ); - const result = await insertTimeTicket(tempVariablesObj); console.log("insertTimeTicket, result :", result); @@ -145,35 +143,46 @@ export function ScreenTimeTicketBrowser({ setCurrentSCC(null); } - setLoading(false); }; return ( - - - - - {error && error?.message ? ( - - ) : null} - - + + + + + + + {error && error?.message ? ( + + ) : null} + + + + + ); } +const localStyles = StyleSheet.create({ + content: { + display: "flex", + flex: 2, + }, +}); + export default connect( mapStateToProps, mapDispatchToProps diff --git a/components/time-ticket/screen-time-ticket-clockoff.component.jsx b/components/time-ticket/screen-time-ticket-clockoff.component.jsx index 1487ddd..0120323 100644 --- a/components/time-ticket/screen-time-ticket-clockoff.component.jsx +++ b/components/time-ticket/screen-time-ticket-clockoff.component.jsx @@ -4,7 +4,7 @@ import { StyleSheet, Text, View, ScrollView } from "react-native"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; -import { Button, TextInput } from "react-native-paper"; +import { Button, TextInput, Card } from "react-native-paper"; import { CostCenterSelect } from "../Selects/select-cost-center"; import { selectCurrentEmployee, @@ -120,6 +120,7 @@ export function TimeTicketClockOff({ return ( + )} +