added parts for last 3 calls
This commit is contained in:
28
components/Buttons/tech-clock-out-button.component.jsx
Normal file
28
components/Buttons/tech-clock-out-button.component.jsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import React from "react";
|
||||
import { Text } from "react-native";
|
||||
import { Button } from "react-native-paper";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { employeeSignOut } from "../../redux/employee/employee.actions";
|
||||
import { setTmTicketJobId } from "../../redux/app/app.actions";
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
signOut:(jobId) => dispatch(setTmTicketJobId()),
|
||||
});
|
||||
|
||||
export function TechClockOffButton({ setTmTicketJobId,
|
||||
jobId,
|
||||
timeTicketId, }) {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<Button
|
||||
mode="text"
|
||||
compact={true}
|
||||
onPress={() => signOut()}
|
||||
icon="logout"
|
||||
>
|
||||
<Text style={{fontSize: 12}}>{t("general.actions.logout")}</Text>
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
export default connect(null, mapDispatchToProps)(SignOutButton);
|
||||
Reference in New Issue
Block a user