fixed filtering Invoiced ROs for JobIdSearchSelect

This commit is contained in:
jfrye122
2023-06-05 13:14:45 -04:00
parent 5e107bc767
commit aca336fceb
3 changed files with 24 additions and 5 deletions

View File

@@ -14,7 +14,7 @@ import { selectCurrentEmployee, selectRates, selectGettingRates, selectSignInE
import { selectBodyshop } from "../../redux/user/user.selectors";
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 { selectCurrentTimeTicketJob, selectCurrentTimeTicketJobId,
} 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 { logImEXEvent } from "../../firebase/firebase.analytics";
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({
currentEmployee: selectCurrentEmployee,
@@ -135,7 +137,9 @@ export function ScreenTimeTicketBrowser({
>
<StyleRepeater childStyle={{ margin: 4 }}>
<Card>
<Card.Title title={"Logged in Employee"} />
<Card.Title title={"Logged in Employee"}
// right={(props) => <SignOutButton />}
/>
<Card.Content>
{currentEmployeeFullName && (
<Subheading>{currentEmployeeFullName}</Subheading>
@@ -143,11 +147,24 @@ export function ScreenTimeTicketBrowser({
</Card.Content>
</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
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}
@@ -160,6 +177,7 @@ export function ScreenTimeTicketBrowser({
<Button mode="outlined" loading={loading} onPress={handleFinish}>
<Text>Clock In</Text>
</Button>
</Card.Content>
</Card>
</StyleRepeater>
<View style={{ flexGrow: 1, flex: 1 }}>