Successful 2tier and 3 tier export of invoices. BOD-83 BOD-131
This commit is contained in:
@@ -19,6 +19,7 @@ export function JobsCloseLabmatAllocationButton({
|
||||
allocation,
|
||||
setAllocations,
|
||||
bodyshop,
|
||||
invoiced
|
||||
}) {
|
||||
const [visible, setVisible] = useState(false);
|
||||
const [state, setState] = useState({ center: "", amount: 0 });
|
||||
@@ -87,7 +88,7 @@ export function JobsCloseLabmatAllocationButton({
|
||||
<Button
|
||||
onClick={handleAllocate}
|
||||
disabled={
|
||||
state.amount === 0 || state.center === "" || remainingAmount === 0
|
||||
state.amount === 0 || state.center === "" || remainingAmount === 0 || invoiced
|
||||
}
|
||||
>
|
||||
{t("jobs.actions.allocate")}
|
||||
@@ -95,9 +96,9 @@ export function JobsCloseLabmatAllocationButton({
|
||||
</div>
|
||||
<div>
|
||||
{visible ? (
|
||||
<CloseCircleFilled onClick={() => setVisible(false)} />
|
||||
<CloseCircleFilled onClick={() => setVisible(false)} disabled={invoiced} />
|
||||
) : (
|
||||
<PlusCircleFilled onClick={() => setVisible(true)} />
|
||||
<PlusCircleFilled onClick={() => setVisible(true)} disabled={invoiced}/>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user