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