added component for testing selecting job id

This commit is contained in:
jfrye122
2023-05-12 11:25:17 -04:00
parent 9573283901
commit 2d17623bdf
3 changed files with 232 additions and 9 deletions

View File

@@ -13,6 +13,7 @@ import {
selectRates,
} from "../../redux/employee/employee.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors";
import { useCallback } from "react";
//TODO add props needed for call
const mapStateToProps = createStructuredSelector({
@@ -32,7 +33,12 @@ export function TimeTicketCreate({
const [isDatePickerVisible, setDatePickerVisibility] = useState(false);
const [date2, setDate2] = useState(new Date());
const [currentCC, setCurrentCC] = useState(null);
const [currentSCC, setCurrentSCC] = useState(null);
const [currentSJob, setCurrentSJob] = useState(null);
const wrapperSetCurrentSJobState = useCallback(val => {
setCurrentSJob(val);
}, [setCurrentSJob]);
const showDatePicker = () => {
setDatePickerVisibility(true);
@@ -93,7 +99,7 @@ export function TimeTicketCreate({
label={"Employee"}
/>
<CostCenterSelect currentRatesNCostCenters={currentRatesNCostCenters} currentValue={currentCC} onValueSelected={setCurrentCC}/>
<CostCenterSelect currentRatesNCostCenters={currentRatesNCostCenters} currentValue={currentSCC} onValueSelected={setCurrentSCC}/>
<TextInput
style={localStyles.inputStyle}
mode="outlined"