Added employee name to the employee field

This commit is contained in:
jfrye122
2023-05-08 17:19:59 -04:00
parent 79b6decff0
commit 9fc2d4c67c
4 changed files with 104 additions and 19 deletions

View File

@@ -16,8 +16,9 @@ import DateTimePickerModal from "react-native-modal-datetime-picker";
const mapStateToProps = createStructuredSelector({
currentEmployee: selectCurrentEmployee,
});
const mapDispatchToProps = (dispatch) => ({})
export function TimeTicketCreate() {
export function TimeTicketCreate({currentEmployee}) {
const [isDatePickerVisible, setDatePickerVisibility] = useState(false);
const [date2, setDate2] = useState(new Date());
@@ -47,7 +48,7 @@ export function TimeTicketCreate() {
initialValues={{
jobid: "",
ticketdate: date2.toLocaleDateString(),
employee: "",
employee: currentEmployee.technician.first_name,
costcenter: "",
productivehours: "",
actualhours: "",
@@ -139,7 +140,7 @@ export function TimeTicketCreate() {
);
}
export default connect(null, null)(TimeTicketCreate);
export default connect(mapStateToProps, null)(TimeTicketCreate);
const localStyles = StyleSheet.create({
content: {