Added employee name to the employee field
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user