updated selectcostcenter

This commit is contained in:
jfrye122
2023-05-05 09:23:43 -04:00
parent 57f7adac6e
commit c93f248518

View File

@@ -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 (
<View style={styles.container}>
<Dropdown
@@ -46,11 +73,7 @@ export function SelectCostCenter(props) {
);
}
const mapStateToProps = (state) => ({});
const mapDispatchToProps = {};
export default connect(mapStateToProps, mapDispatchToProps)(SelectCostCenter);
export default connect(null, mapDispatchToProps)(SelectCostCenter);
const styles = StyleSheet.create({
container: {