small fixes to time tickets
This commit is contained in:
@@ -9,7 +9,7 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
signOut: () => dispatch(employeeSignOut()),
|
||||
});
|
||||
|
||||
export function SignOutButton({ signOut }) {
|
||||
export function SignOutButton({ signOut,style }) {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<Button
|
||||
@@ -17,6 +17,7 @@ export function SignOutButton({ signOut }) {
|
||||
compact={true}
|
||||
onPress={() => signOut()}
|
||||
icon="logout"
|
||||
style={style}
|
||||
>
|
||||
<Text style={{fontSize: 12}}>{t("general.actions.logout")}</Text>
|
||||
</Button>
|
||||
|
||||
@@ -49,6 +49,7 @@ import AddTimeTicketButton from "../Buttons/create-time-ticket-button.component"
|
||||
|
||||
import KeyboardAvoidingComponent from "../keyboards/KeyboardAvoidingComponent";
|
||||
import JobSearchAndSelectModal from "../Modals/JobSearchAndSelectModal";
|
||||
import { useNavigation } from "@react-navigation/native";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
currentEmployee: selectCurrentEmployee,
|
||||
@@ -86,6 +87,7 @@ export function ScreenTimeTicketBrowser({
|
||||
refetchQueries: ["QUERY_ACTIVE_TIME_TICKETS"],
|
||||
});
|
||||
|
||||
const navigation = useNavigation();
|
||||
const [curSelClockIntoJob, setCurSelClockIntoJob] = useState(null);
|
||||
|
||||
const handleFinish = async (values) => {
|
||||
@@ -196,7 +198,7 @@ export function ScreenTimeTicketBrowser({
|
||||
<Card style={localStyles.localCardStyle}>
|
||||
<Card.Title
|
||||
title={t("timeticketbrowser.labels.loggedinemployee")}
|
||||
// right={(props) => <SignOutButton />}
|
||||
right={(props) => <SignOutButton style={{margin:8}}/>}
|
||||
/>
|
||||
<Card.Content>
|
||||
{currentEmployeeFullName && (
|
||||
@@ -213,32 +215,32 @@ export function ScreenTimeTicketBrowser({
|
||||
<Card style={localStyles.localCardStyle}>
|
||||
<Card.Title
|
||||
title={t("timeticketbrowser.labels.clockintojob")}
|
||||
// right={(props) => (
|
||||
// <View style={{ flexDirection: "row" }}>
|
||||
// <Button
|
||||
// mode="outlined"
|
||||
// compact={true}
|
||||
// onPress={() => {
|
||||
// navigation.navigate("CreateTimeTicket");
|
||||
// }}
|
||||
// icon="plus"
|
||||
// style={{ margin: 4 }}
|
||||
// >
|
||||
// <Text >
|
||||
// {t("timeticketbrowser.actions.ticket")}
|
||||
// </Text>
|
||||
// </Button>
|
||||
// <Button
|
||||
// mode="outlined"
|
||||
// compact={true}
|
||||
// loading={loadingClockIn}
|
||||
// onPress={handleFinish}
|
||||
// style={{ margin: 4 }}
|
||||
// >
|
||||
// <Text>Clock In</Text>
|
||||
// </Button>
|
||||
// </View>
|
||||
// )}
|
||||
right={(props) => (
|
||||
<View style={{ flexDirection: "row" }}>
|
||||
<Button
|
||||
mode="text"
|
||||
compact={true}
|
||||
onPress={() => {
|
||||
navigation.navigate("CreateTimeTicket");
|
||||
}}
|
||||
icon="plus"
|
||||
style={{ margin: 8 }}
|
||||
>
|
||||
<Text >
|
||||
{t("timeticketbrowser.actions.ticket")}
|
||||
</Text>
|
||||
</Button>
|
||||
{/* <Button
|
||||
mode="outlined"
|
||||
compact={true}
|
||||
loading={loadingClockIn}
|
||||
onPress={handleFinish}
|
||||
style={{ margin: 4 }}
|
||||
>
|
||||
<Text>Clock In</Text>
|
||||
</Button> */}
|
||||
</View>
|
||||
)}
|
||||
/>
|
||||
<Card.Content>
|
||||
<JobSearchAndSelectModal
|
||||
@@ -278,7 +280,7 @@ export function ScreenTimeTicketBrowser({
|
||||
}
|
||||
ListEmptyComponent={
|
||||
<View style={styles.containerNoData}>
|
||||
<Text>No Data</Text>
|
||||
<Text>{t("timeticketbrowser.labels.nodata")}</Text>
|
||||
</View>
|
||||
}
|
||||
/>
|
||||
@@ -288,6 +290,7 @@ export function ScreenTimeTicketBrowser({
|
||||
}
|
||||
|
||||
const MyItem = ({ itemState, style }) => {
|
||||
const { t } = useTranslation();
|
||||
const items = itemState?.data;
|
||||
return (
|
||||
<Card key={itemState.title} style={style}>
|
||||
|
||||
Reference in New Issue
Block a user