Fix Android Keyboard display issue
This commit is contained in:
@@ -50,6 +50,8 @@ import ClockedinListItem from "../time-ticket-items/clockedin-list-item.componen
|
||||
import SignOutButton from "../Buttons/employee-sign-out-button.component";
|
||||
import AddTimeTicketButton from "../Buttons/create-time-ticket-button.component";
|
||||
|
||||
import KeyboardAvoidingComponent from "../keyboards/KeyboardAvoidingComponent";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
currentEmployee: selectCurrentEmployee,
|
||||
loaderGettingRates: selectGettingRates,
|
||||
@@ -198,75 +200,77 @@ export function ScreenTimeTicketBrowser({
|
||||
|
||||
return (
|
||||
<View style={styles.cardBackground}>
|
||||
<FlatList
|
||||
ListHeaderComponent={
|
||||
<Card style={localStyles.localCardStyle}>
|
||||
<Card.Title
|
||||
title={t("timeticketbrowser.labels.loggedinemployee")}
|
||||
// right={(props) => <SignOutButton />}
|
||||
/>
|
||||
<Card.Content>
|
||||
{currentEmployeeFullName && (
|
||||
<Subheading>{currentEmployeeFullName}</Subheading>
|
||||
)}
|
||||
</Card.Content>
|
||||
</Card>
|
||||
}
|
||||
data={!!itemState ? [itemState] : null}
|
||||
renderItem={({ item }) => (
|
||||
<MyItem style={localStyles.localCardStyle} itemState={item} />
|
||||
)}
|
||||
ListFooterComponent={
|
||||
<Card style={localStyles.localCardStyle}>
|
||||
<Card.Title
|
||||
title={t("timeticketbrowser.labels.clockintojob")}
|
||||
// right={(props) =>
|
||||
// <View style={{ flexDirection:"row" }} ><AddTimeTicketButton />
|
||||
// <Button mode="outlined"
|
||||
// compact={true} loading={loading} onPress={handleFinish}
|
||||
// style={{margin:4}}
|
||||
// >
|
||||
// <Text>Clock In</Text>
|
||||
// </Button></View>
|
||||
// }
|
||||
/>
|
||||
<Card.Content>
|
||||
<JobIdSearchSelect
|
||||
currentValue={currentSJobId}
|
||||
onJobSelected={setCurrentSJobId}
|
||||
convertedOnly={!currentBodyshop.tt_allow_post_to_invoiced}
|
||||
notExported={!currentBodyshop.tt_allow_post_to_invoiced}
|
||||
notInvoiced={!currentBodyshop.tt_allow_post_to_invoiced}
|
||||
<KeyboardAvoidingComponent>
|
||||
<FlatList
|
||||
ListHeaderComponent={
|
||||
<Card style={localStyles.localCardStyle}>
|
||||
<Card.Title
|
||||
title={t("timeticketbrowser.labels.loggedinemployee")}
|
||||
// right={(props) => <SignOutButton />}
|
||||
/>
|
||||
<CostCenterSelect
|
||||
currentValue={currentSCC}
|
||||
currentRatesNCostCenters={currentRatesNCostCenters}
|
||||
onValueSelected={setCurrentSCC}
|
||||
<Card.Content>
|
||||
{currentEmployeeFullName && (
|
||||
<Subheading>{currentEmployeeFullName}</Subheading>
|
||||
)}
|
||||
</Card.Content>
|
||||
</Card>
|
||||
}
|
||||
data={!!itemState ? [itemState] : null}
|
||||
renderItem={({ item }) => (
|
||||
<MyItem style={localStyles.localCardStyle} itemState={item} />
|
||||
)}
|
||||
ListFooterComponent={
|
||||
<Card style={localStyles.localCardStyle}>
|
||||
<Card.Title
|
||||
title={t("timeticketbrowser.labels.clockintojob")}
|
||||
// right={(props) =>
|
||||
// <View style={{ flexDirection:"row" }} ><AddTimeTicketButton />
|
||||
// <Button mode="outlined"
|
||||
// compact={true} loading={loading} onPress={handleFinish}
|
||||
// style={{margin:4}}
|
||||
// >
|
||||
// <Text>Clock In</Text>
|
||||
// </Button></View>
|
||||
// }
|
||||
/>
|
||||
{error && error?.message ? (
|
||||
<ErrorDisplay errorMessage={error.message} />
|
||||
) : null}
|
||||
</Card.Content>
|
||||
<Card.Actions
|
||||
style={{
|
||||
justifyContent: "center",
|
||||
}}
|
||||
>
|
||||
<Button
|
||||
mode="outlined"
|
||||
style={styles.buttonBasicOutlined}
|
||||
loading={loadingClockIn}
|
||||
onPress={handleFinish}
|
||||
<Card.Content>
|
||||
<JobIdSearchSelect
|
||||
currentValue={currentSJobId}
|
||||
onJobSelected={setCurrentSJobId}
|
||||
convertedOnly={!currentBodyshop.tt_allow_post_to_invoiced}
|
||||
notExported={!currentBodyshop.tt_allow_post_to_invoiced}
|
||||
notInvoiced={!currentBodyshop.tt_allow_post_to_invoiced}
|
||||
/>
|
||||
<CostCenterSelect
|
||||
currentValue={currentSCC}
|
||||
currentRatesNCostCenters={currentRatesNCostCenters}
|
||||
onValueSelected={setCurrentSCC}
|
||||
/>
|
||||
{error && error?.message ? (
|
||||
<ErrorDisplay errorMessage={error.message} />
|
||||
) : null}
|
||||
</Card.Content>
|
||||
<Card.Actions
|
||||
style={{
|
||||
justifyContent: "center",
|
||||
}}
|
||||
>
|
||||
<Text>{t("timeticketbrowser.actions.clockin")}</Text>
|
||||
</Button>
|
||||
</Card.Actions>
|
||||
</Card>
|
||||
}
|
||||
refreshControl={
|
||||
<RefreshControl refreshing={loading} onRefresh={onRefresh} />
|
||||
}
|
||||
/>
|
||||
<Button
|
||||
mode="outlined"
|
||||
style={styles.buttonBasicOutlined}
|
||||
loading={loadingClockIn}
|
||||
onPress={handleFinish}
|
||||
>
|
||||
<Text>{t("timeticketbrowser.actions.clockin")}</Text>
|
||||
</Button>
|
||||
</Card.Actions>
|
||||
</Card>
|
||||
}
|
||||
refreshControl={
|
||||
<RefreshControl refreshing={loading} onRefresh={onRefresh} />
|
||||
}
|
||||
/>
|
||||
</KeyboardAvoidingComponent>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user