add getemployeebyid call N costcenter dropdown

This commit is contained in:
jfrye122
2023-05-09 12:27:06 -04:00
parent 9fc2d4c67c
commit e57a3605b8
8 changed files with 103 additions and 42 deletions

View File

@@ -15,7 +15,7 @@ import { QUERY_EMPLOYEE_BY_ID } from "../../graphql/employees.queries";
const data = [
{ label: "Item 1", value: "1" },
{ label: "Item 2", value: "2" },
{ label: "Item 2", value: "3" },
{ label: "Item 3", value: "3" },
{ label: "Item 4", value: "4" },
{ label: "Item 5", value: "5" },
@@ -30,13 +30,14 @@ const data = [
// timeTicketJob: selectCurrentTimeTicketJob,
// });
const mapDispatchToProps = {};
// const mapDispatchToProps = {};
export function SelectCostCenter(props) {
const [value, setValue] = useState(null);
const [isFocus, setIsFocus] = useState(false);
const [selectorData, setSelectorData] = useState([]);
const [value, setValue] = useState(null);
const [isFocus, setIsFocus] = useState(false);
// const { loading, error, data } = useQuery(QUERY_EMPLOYEE_BY_ID, {
@@ -54,7 +55,7 @@ export function SelectCostCenter(props) {
selectedTextStyle={styles.selectedTextStyle}
inputSearchStyle={styles.inputSearchStyle}
iconStyle={styles.iconStyle}
data={data}
data={props.selectorData}
search
maxHeight={300}
labelField="label"
@@ -73,7 +74,7 @@ export function SelectCostCenter(props) {
);
}
export default connect(null, mapDispatchToProps)(SelectCostCenter);
export default connect(null, null)(SelectCostCenter);
const styles = StyleSheet.create({
container: {