Update time ticket areas added to use translations
This commit is contained in:
@@ -25,6 +25,7 @@ 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 { useTranslation } from "react-i18next";
|
||||
// import SignOutButton from "../Buttons/employee-sign-out-button.component";
|
||||
// import AddTimeTicketButton from "../Buttons/create-time-ticket-button.component";
|
||||
|
||||
@@ -55,6 +56,7 @@ export function ScreenTimeTicketBrowser({
|
||||
currentSelectedTimeTicketJobId,
|
||||
currentEmployeeFullName,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
const [currentSCC, setCurrentSCC] = useState(null);
|
||||
const [currentSJobId, setCurrentSJobId] = useState(null);
|
||||
const [loading, setLoading] = useState(false);
|
||||
@@ -65,7 +67,7 @@ export function ScreenTimeTicketBrowser({
|
||||
});
|
||||
|
||||
const handleFinish = async (values) => {
|
||||
console.log("handleFinish called in ScreenTimeTicketBrowser");
|
||||
// console.log("handleFinish called in ScreenTimeTicketBrowser");
|
||||
setLoading(true);
|
||||
setError(null);
|
||||
|
||||
@@ -77,7 +79,7 @@ export function ScreenTimeTicketBrowser({
|
||||
} else {
|
||||
// console.log("missing values!");
|
||||
setLoading(false);
|
||||
setError({ message: "Please make sure all fields have a value." });
|
||||
setError({ message: t("timeticketbrowser.errors.missingvalues") });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -137,7 +139,7 @@ export function ScreenTimeTicketBrowser({
|
||||
>
|
||||
<StyleRepeater childStyle={{ margin: 4 }}>
|
||||
<Card>
|
||||
<Card.Title title={"Logged in Employee"}
|
||||
<Card.Title title={t("timeticketbrowser.labels.loggedinemployee")}
|
||||
// right={(props) => <SignOutButton />}
|
||||
/>
|
||||
<Card.Content>
|
||||
@@ -147,7 +149,7 @@ export function ScreenTimeTicketBrowser({
|
||||
</Card.Content>
|
||||
</Card>
|
||||
<Card>
|
||||
<Card.Title title={"Clock Into Job"}
|
||||
<Card.Title title={t("timeticketbrowser.labels.clockintojob")}
|
||||
// right={(props) =>
|
||||
// <View style={{ flexDirection:"row" }} ><AddTimeTicketButton />
|
||||
// <Button mode="outlined"
|
||||
@@ -175,7 +177,7 @@ export function ScreenTimeTicketBrowser({
|
||||
<ErrorDisplay errorMessage={error.message} />
|
||||
) : null}
|
||||
<Button mode="outlined" loading={loading} onPress={handleFinish}>
|
||||
<Text>Clock In</Text>
|
||||
<Text>{t("timeticketbrowser.actions.clockin")}</Text>
|
||||
</Button>
|
||||
</Card.Content>
|
||||
</Card>
|
||||
|
||||
Reference in New Issue
Block a user