Successful 2tier and 3 tier export of invoices. BOD-83 BOD-131

This commit is contained in:
Patrick Fic
2020-06-02 09:19:46 -07:00
parent 5564b5dc4a
commit 73040064d4
16 changed files with 265 additions and 112 deletions

View File

@@ -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>