update Employee field to show first and last name

This commit is contained in:
jfrye122
2023-06-02 13:34:42 -04:00
parent 00316dd6d0
commit 20e59bdd6b
2 changed files with 52 additions and 2 deletions

View File

@@ -11,6 +11,7 @@ import DateTimePickerModal from "react-native-modal-datetime-picker";
import {
selectCurrentEmployee,
selectRates,
selectEmployeeFullName
} from "../../redux/employee/employee.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors";
import { useCallback } from "react";
@@ -29,6 +30,7 @@ const mapStateToProps = createStructuredSelector({
currentEmployee: selectCurrentEmployee,
currentRatesNCostCenters: selectRates,
currentBodyshop: selectBodyshop,
currentEmployeeFullName: selectEmployeeFullName
});
// const mapDispatchToProps = (dispatch) => ({});
@@ -36,6 +38,7 @@ export function TimeTicketCreate({
currentEmployee,
currentRatesNCostCenters,
currentBodyshop,
currentEmployeeFullName
}) {
const navigation = useNavigation();
const { t } = useTranslation();
@@ -183,7 +186,7 @@ export function TimeTicketCreate({
initialValues={{
jobid: { currentSJobId },
ticketdate: date2.toLocaleDateString(),
employee: currentEmployee.technician.first_name,
employee: {currentEmployeeFullName},
costcenter: { currentSCC },
productivehours: "",
actualhours: "",