diff --git a/src/components/AddProjectDetails.js b/src/components/AddProjectDetails.js index 04f77793..8ccf409c 100644 --- a/src/components/AddProjectDetails.js +++ b/src/components/AddProjectDetails.js @@ -27,6 +27,7 @@ const AddProjectDetails = (props) => { const { budgetTimeframe, client, + projectBudget, projectDate, projectEndDate, projectName, @@ -136,6 +137,7 @@ const AddProjectDetails = (props) => { variant='outlined' currencySymbol={`${currencyInformation['symbol']}`} minimumValue='0' + maximumValue='2147483647' outputFormat='string' decimalCharacter={`${currencyInformation['decimal']}`} digitGroupSeparator={`${currencyInformation['thousand']}`} @@ -155,7 +157,9 @@ const AddProjectDetails = (props) => { value={budgetTimeframe} onChange={(event) => (handleTimeframeChange(event.target.value))} > - {renderTimeframeOptions({ timeframes: EXPECTED_BUDGET_TIMEFRAME_OPTIONS })} + {renderTimeframeOptions( + { timeframes: EXPECTED_BUDGET_TIMEFRAME_OPTIONS } + )} diff --git a/src/components/AddProjectForm.js b/src/components/AddProjectForm.js index cf0817e8..aad2444d 100644 --- a/src/components/AddProjectForm.js +++ b/src/components/AddProjectForm.js @@ -206,6 +206,7 @@ const AddProjectForm = (props) => { { //create allocation with that rate id const allocationCreated = await createAllocation({ variables: { - amount: Number(rate.total_amount), + amount: Number(Number(rate.total_amount).toFixed(2)), start_date: moment(startDate).format('YYYY-MM-DD'), end_date: moment(endDate).format('YYYY-MM-DD'), date_paid: null, @@ -376,41 +376,40 @@ const AllocationAddForm = (props) => { - { - project + {project + ? ( + + ) + : client ? ( - + ) : ( + ) - : client - ? ( - - ) : ( - - ) }
diff --git a/src/components/AllocationOverview.js b/src/components/AllocationOverview.js index d373b1b1..94ed1408 100644 --- a/src/components/AllocationOverview.js +++ b/src/components/AllocationOverview.js @@ -221,6 +221,11 @@ const AllocationOverview = (props) => { if (!contributorAllocation) { setContributorAllocation(allocation) } + + const editButtonDisabled = ( + updatedAllocationRate.total_amount == allocationInfo.amount && + updatedAllocationRate.hourly_rate == allocationInfo.rate.hourly_rate + ) return ( {