Update time ticket areas added to use translations
This commit is contained in:
@@ -62,17 +62,16 @@ export function TimeTicketClockOff({
|
||||
!!currentSCC?.value
|
||||
) {
|
||||
if (isNaN(values.actualhours)|isNaN(values.productivehours)) {
|
||||
console.log("actual hours is NAN!");
|
||||
// console.log("actual hours is NAN!");
|
||||
setLoading(false);
|
||||
setError({ message: "Please make sure all fields have valid values." });
|
||||
return;
|
||||
|
||||
setError({ message: t("timeticketclockoff.errors.nan") });
|
||||
return;
|
||||
}
|
||||
setError(null);
|
||||
console.log("all have values:");
|
||||
// console.log("all have values:");
|
||||
} else {
|
||||
console.log("missing values!");
|
||||
setError({ message: "Please make sure all fields have a value." });
|
||||
// console.log("missing values!");
|
||||
setError({ message: t("timeticketclockoff.errors.missingvalues") });
|
||||
return;
|
||||
}
|
||||
const tempcallobj = {
|
||||
@@ -119,9 +118,9 @@ export function TimeTicketClockOff({
|
||||
setLoading(false);
|
||||
if (!!result.errors) {
|
||||
// console.log("updateTimeticket, result.error :", result.errors);
|
||||
setError(SON.stringify(result.errors));
|
||||
setError(JSON.stringify(result.errors));
|
||||
} else {
|
||||
console.log("updateTimeticket, result. :", result.data);
|
||||
// console.log("updateTimeticket, result :", result.data);
|
||||
navigation.goBack();
|
||||
}
|
||||
//if (completedCallback) completedCallback();
|
||||
@@ -146,7 +145,7 @@ export function TimeTicketClockOff({
|
||||
onChangeText={handleChange("actualhours")}
|
||||
onBlur={handleBlur("actualhours")}
|
||||
value={values.actualhours}
|
||||
label={"Actual Hours"}
|
||||
label={t("timeticketclockoff.labels.actualhoursplaceholder")}
|
||||
keyboardType="numeric"
|
||||
/>
|
||||
<TextInput
|
||||
@@ -155,7 +154,7 @@ export function TimeTicketClockOff({
|
||||
onChangeText={handleChange("productivehours")}
|
||||
onBlur={handleBlur("productivehours")}
|
||||
value={values.productivehours}
|
||||
label={"Productive Hours"}
|
||||
label={t("timeticketclockoff.labels.productivehoursplaceholder")}
|
||||
keyboardType="numeric"
|
||||
/>
|
||||
<CostCenterSelect
|
||||
@@ -167,9 +166,9 @@ export function TimeTicketClockOff({
|
||||
<Button
|
||||
style={localStyles.input}
|
||||
onPress={handleSubmit}
|
||||
title="Submit"
|
||||
title={t("timeticketclockoff.actions.clockoff")}
|
||||
>
|
||||
<Text style={{ fontSize: 12 }}>Clock Off</Text>
|
||||
<Text style={{ fontSize: 12 }}>{t("timeticketclockoff.actions.clockoff")}</Text>
|
||||
</Button>
|
||||
</View>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user