From c93f248518558470f3a87e36d866c9720c937428 Mon Sep 17 00:00:00 2001 From: jfrye122 Date: Fri, 5 May 2023 09:23:43 -0400 Subject: [PATCH] updated selectcostcenter --- components/Selects/select-cost-center.jsx | 35 +++++++++++++++++++---- 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/components/Selects/select-cost-center.jsx b/components/Selects/select-cost-center.jsx index 4bf0795..5cadda3 100644 --- a/components/Selects/select-cost-center.jsx +++ b/components/Selects/select-cost-center.jsx @@ -1,7 +1,17 @@ import React, { useState } from "react"; +import { useQuery } from "@apollo/client"; import { StyleSheet, Text, View } from "react-native"; import { Dropdown } from "react-native-element-dropdown"; import { connect } from "react-redux"; +import { createStructuredSelector } from "reselect"; + +//TODO Justin currently inprogress +import { + selectCurrentTimeTicketJob, + selectCurrentTimeTicketJobId, + } from "../../redux/app/app.selectors"; + import { selectBodyshop } from "../../redux/user/user.selectors"; +import { QUERY_EMPLOYEE_BY_ID } from "../../graphql/employees.queries"; const data = [ { label: "Item 1", value: "1" }, @@ -14,11 +24,28 @@ const data = [ { label: "Item 8", value: "8" }, ]; +// const mapStateToProps = createStructuredSelector({ +// bodyshop: selectBodyshop, +// timeTicketJobId: selectCurrentTimeTicketJobId, +// timeTicketJob: selectCurrentTimeTicketJob, +// }); + +const mapDispatchToProps = {}; + export function SelectCostCenter(props) { + + const [value, setValue] = useState(null); const [isFocus, setIsFocus] = useState(false); - + +// const { loading, error, data } = useQuery(QUERY_EMPLOYEE_BY_ID, { +// variables: { id: technician.id,}, +// fetchPolicy: "network-only", +// nextFetchPolicy: "network-only", +// } +// ); + return ( ({}); - -const mapDispatchToProps = {}; - -export default connect(mapStateToProps, mapDispatchToProps)(SelectCostCenter); +export default connect(null, mapDispatchToProps)(SelectCostCenter); const styles = StyleSheet.create({ container: {