IO-1038 Negative time tickets to reduce hours.
This commit is contained in:
@@ -32479,6 +32479,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>zeroactualnegativeprod</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
<default_text></default_text>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>es-MX</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fr-CA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
</children>
|
||||
</folder_node>
|
||||
<folder_node>
|
||||
|
||||
@@ -265,6 +265,7 @@ export function TimeTicketList({
|
||||
</Table.Summary.Cell>
|
||||
<Table.Summary.Cell />
|
||||
<Table.Summary.Cell />
|
||||
<Table.Summary.Cell />
|
||||
<Table.Summary.Cell>{totals.productivehrs}</Table.Summary.Cell>
|
||||
<Table.Summary.Cell>{totals.actualhrs}</Table.Summary.Cell>
|
||||
<Table.Summary.Cell>
|
||||
|
||||
@@ -152,11 +152,33 @@ export function TimeTicketModalComponent({
|
||||
},
|
||||
]}
|
||||
>
|
||||
<InputNumber min={0} precision={1} />
|
||||
<InputNumber precision={1} />
|
||||
</Form.Item>
|
||||
)}
|
||||
</Form.Item>
|
||||
<Form.Item label={t("timetickets.fields.actualhrs")} name="actualhrs">
|
||||
<Form.Item
|
||||
dependencies={["productivehrs"]}
|
||||
label={t("timetickets.fields.actualhrs")}
|
||||
name="actualhrs"
|
||||
rules={[
|
||||
({ getFieldValue }) => ({
|
||||
async validator(rule, value) {
|
||||
if (value) {
|
||||
const prodHrs = getFieldValue("productivehrs");
|
||||
if (prodHrs < 0 && value !== 0)
|
||||
return Promise.reject(
|
||||
t("timetickets.labels.zeroactualnegativeprod")
|
||||
);
|
||||
else {
|
||||
return Promise.resolve();
|
||||
}
|
||||
} else {
|
||||
return Promise.resolve();
|
||||
}
|
||||
},
|
||||
}),
|
||||
]}
|
||||
>
|
||||
<InputNumber min={0} precision={1} />
|
||||
</Form.Item>
|
||||
{isEdit && (
|
||||
|
||||
@@ -1793,7 +1793,7 @@
|
||||
"refinishhours": "R",
|
||||
"selectview": "Select a View",
|
||||
"sublets": "Sublets",
|
||||
"totalhours": "Total Hrs",
|
||||
"totalhours": "Total Hrs ",
|
||||
"touchtime": "T/T",
|
||||
"viewname": "View Name"
|
||||
},
|
||||
@@ -1957,7 +1957,8 @@
|
||||
"shift": "Shift",
|
||||
"shiftalreadyclockedon": "Active Shift Time Tickets",
|
||||
"straight_time": "Straight Time",
|
||||
"timetickets": "Time Tickets"
|
||||
"timetickets": "Time Tickets",
|
||||
"zeroactualnegativeprod": "Actual hours must be 0 if entering negative productive hours."
|
||||
},
|
||||
"successes": {
|
||||
"clockedin": "Clocked in successfully.",
|
||||
|
||||
@@ -1957,7 +1957,8 @@
|
||||
"shift": "",
|
||||
"shiftalreadyclockedon": "",
|
||||
"straight_time": "",
|
||||
"timetickets": ""
|
||||
"timetickets": "",
|
||||
"zeroactualnegativeprod": ""
|
||||
},
|
||||
"successes": {
|
||||
"clockedin": "",
|
||||
|
||||
@@ -1957,7 +1957,8 @@
|
||||
"shift": "",
|
||||
"shiftalreadyclockedon": "",
|
||||
"straight_time": "",
|
||||
"timetickets": ""
|
||||
"timetickets": "",
|
||||
"zeroactualnegativeprod": ""
|
||||
},
|
||||
"successes": {
|
||||
"clockedin": "",
|
||||
|
||||
Reference in New Issue
Block a user