updated selectcostcenter
This commit is contained in:
@@ -1,7 +1,17 @@
|
|||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
|
import { useQuery } from "@apollo/client";
|
||||||
import { StyleSheet, Text, View } from "react-native";
|
import { StyleSheet, Text, View } from "react-native";
|
||||||
import { Dropdown } from "react-native-element-dropdown";
|
import { Dropdown } from "react-native-element-dropdown";
|
||||||
import { connect } from "react-redux";
|
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 = [
|
const data = [
|
||||||
{ label: "Item 1", value: "1" },
|
{ label: "Item 1", value: "1" },
|
||||||
@@ -14,11 +24,28 @@ const data = [
|
|||||||
{ label: "Item 8", value: "8" },
|
{ label: "Item 8", value: "8" },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// const mapStateToProps = createStructuredSelector({
|
||||||
|
// bodyshop: selectBodyshop,
|
||||||
|
// timeTicketJobId: selectCurrentTimeTicketJobId,
|
||||||
|
// timeTicketJob: selectCurrentTimeTicketJob,
|
||||||
|
// });
|
||||||
|
|
||||||
|
const mapDispatchToProps = {};
|
||||||
|
|
||||||
export function SelectCostCenter(props) {
|
export function SelectCostCenter(props) {
|
||||||
|
|
||||||
|
|
||||||
const [value, setValue] = useState(null);
|
const [value, setValue] = useState(null);
|
||||||
const [isFocus, setIsFocus] = useState(false);
|
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 (
|
return (
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
@@ -46,11 +73,7 @@ export function SelectCostCenter(props) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const mapStateToProps = (state) => ({});
|
export default connect(null, mapDispatchToProps)(SelectCostCenter);
|
||||||
|
|
||||||
const mapDispatchToProps = {};
|
|
||||||
|
|
||||||
export default connect(mapStateToProps, mapDispatchToProps)(SelectCostCenter);
|
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
container: {
|
container: {
|
||||||
|
|||||||
Reference in New Issue
Block a user