fixed filtering Invoiced ROs for JobIdSearchSelect
This commit is contained in:
@@ -14,7 +14,7 @@ import { selectCurrentEmployee, selectRates, selectGettingRates, selectSignInE
|
|||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
|
|
||||||
import { JobIdSearchSelect } from "../Selects/select-job-id";
|
import { JobIdSearchSelect } from "../Selects/select-job-id";
|
||||||
import { CostCenterSelect } from "../Selects/select-cost-center";
|
import CostCenterSelect from "../Selects/select-cost-center";
|
||||||
import ErrorDisplay from "../error-display/error-display.component";
|
import ErrorDisplay from "../error-display/error-display.component";
|
||||||
import { selectCurrentTimeTicketJob, selectCurrentTimeTicketJobId,
|
import { selectCurrentTimeTicketJob, selectCurrentTimeTicketJobId,
|
||||||
} from "../../redux/timetickets/timetickets.selectors";
|
} from "../../redux/timetickets/timetickets.selectors";
|
||||||
@@ -25,6 +25,8 @@ import { QUERY_ACTIVE_TIME_TICKETS } from "../../graphql/timetickets.queries";
|
|||||||
import EmployeeClockedInList from "../time-ticket-lists/employee-clockedin-list.component";
|
import EmployeeClockedInList from "../time-ticket-lists/employee-clockedin-list.component";
|
||||||
import { logImEXEvent } from "../../firebase/firebase.analytics";
|
import { logImEXEvent } from "../../firebase/firebase.analytics";
|
||||||
import StyleRepeater from "../style-repeater/style-repeater";
|
import StyleRepeater from "../style-repeater/style-repeater";
|
||||||
|
// import SignOutButton from "../Buttons/employee-sign-out-button.component";
|
||||||
|
// import AddTimeTicketButton from "../Buttons/create-time-ticket-button.component";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
currentEmployee: selectCurrentEmployee,
|
currentEmployee: selectCurrentEmployee,
|
||||||
@@ -135,7 +137,9 @@ export function ScreenTimeTicketBrowser({
|
|||||||
>
|
>
|
||||||
<StyleRepeater childStyle={{ margin: 4 }}>
|
<StyleRepeater childStyle={{ margin: 4 }}>
|
||||||
<Card>
|
<Card>
|
||||||
<Card.Title title={"Logged in Employee"} />
|
<Card.Title title={"Logged in Employee"}
|
||||||
|
// right={(props) => <SignOutButton />}
|
||||||
|
/>
|
||||||
<Card.Content>
|
<Card.Content>
|
||||||
{currentEmployeeFullName && (
|
{currentEmployeeFullName && (
|
||||||
<Subheading>{currentEmployeeFullName}</Subheading>
|
<Subheading>{currentEmployeeFullName}</Subheading>
|
||||||
@@ -143,11 +147,24 @@ export function ScreenTimeTicketBrowser({
|
|||||||
</Card.Content>
|
</Card.Content>
|
||||||
</Card>
|
</Card>
|
||||||
<Card>
|
<Card>
|
||||||
|
<Card.Title title={"Clock Into Job"}
|
||||||
|
// 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
|
<JobIdSearchSelect
|
||||||
currentValue={currentSJobId}
|
currentValue={currentSJobId}
|
||||||
onJobSelected={setCurrentSJobId}
|
onJobSelected={setCurrentSJobId}
|
||||||
convertedOnly={!currentBodyshop.tt_allow_post_to_invoiced}
|
convertedOnly={!currentBodyshop.tt_allow_post_to_invoiced}
|
||||||
notExported={!currentBodyshop.tt_allow_post_to_invoiced}
|
notExported={!currentBodyshop.tt_allow_post_to_invoiced}
|
||||||
|
notInvoiced={!currentBodyshop.tt_allow_post_to_invoiced}
|
||||||
/>
|
/>
|
||||||
<CostCenterSelect
|
<CostCenterSelect
|
||||||
currentValue={currentSCC}
|
currentValue={currentSCC}
|
||||||
@@ -160,6 +177,7 @@ export function ScreenTimeTicketBrowser({
|
|||||||
<Button mode="outlined" loading={loading} onPress={handleFinish}>
|
<Button mode="outlined" loading={loading} onPress={handleFinish}>
|
||||||
<Text>Clock In</Text>
|
<Text>Clock In</Text>
|
||||||
</Button>
|
</Button>
|
||||||
|
</Card.Content>
|
||||||
</Card>
|
</Card>
|
||||||
</StyleRepeater>
|
</StyleRepeater>
|
||||||
<View style={{ flexGrow: 1, flex: 1 }}>
|
<View style={{ flexGrow: 1, flex: 1 }}>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { useTranslation } from "react-i18next";
|
|||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { Button, TextInput, Card } from "react-native-paper";
|
import { Button, TextInput, Card } from "react-native-paper";
|
||||||
import { CostCenterSelect } from "../Selects/select-cost-center";
|
import CostCenterSelect from "../Selects/select-cost-center";
|
||||||
import {
|
import {
|
||||||
selectCurrentEmployee,
|
selectCurrentEmployee,
|
||||||
selectRates,
|
selectRates,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { useTranslation } from "react-i18next";
|
|||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { Button, Dialog, TextInput } from "react-native-paper";
|
import { Button, Dialog, TextInput } from "react-native-paper";
|
||||||
import { CostCenterSelect } from "../Selects/select-cost-center";
|
import CostCenterSelect from "../Selects/select-cost-center";
|
||||||
import { JobIdSearchSelect } from "../Selects/select-job-id";
|
import { JobIdSearchSelect } from "../Selects/select-job-id";
|
||||||
import DateTimePickerModal from "react-native-modal-datetime-picker";
|
import DateTimePickerModal from "react-native-modal-datetime-picker";
|
||||||
import {
|
import {
|
||||||
@@ -198,8 +198,9 @@ export function TimeTicketCreate({
|
|||||||
<JobIdSearchSelect
|
<JobIdSearchSelect
|
||||||
currentValue={currentSJobId}
|
currentValue={currentSJobId}
|
||||||
onJobSelected={setCurrentSJobId}
|
onJobSelected={setCurrentSJobId}
|
||||||
convertedOnly={!currentBodyshop.tt_allow_post_to_invoiced}
|
convertedOnly={true}
|
||||||
notExported={!currentBodyshop.tt_allow_post_to_invoiced}
|
notExported={!currentBodyshop.tt_allow_post_to_invoiced}
|
||||||
|
notInvoiced={!currentBodyshop.tt_allow_post_to_invoiced}
|
||||||
/>
|
/>
|
||||||
{/* Below will be replaced with a Date Picker*/}
|
{/* Below will be replaced with a Date Picker*/}
|
||||||
{/* <TextInput style={localStyles.input} mode="flat" onChangeText={handleChange("ticketdate")} onBlur={handleBlur("ticketdate")} value={values.ticketdate} label={"Ticket Date"} /> */}
|
{/* <TextInput style={localStyles.input} mode="flat" onChangeText={handleChange("ticketdate")} onBlur={handleBlur("ticketdate")} value={values.ticketdate} label={"Ticket Date"} /> */}
|
||||||
|
|||||||
Reference in New Issue
Block a user