Skip to content

Commit

Permalink
fix: production amount and emissions allocated should be allowed to be 0
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieu-foucault committed Aug 4, 2020
1 parent 8007d06 commit 5f1f86b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2302,7 +2302,7 @@ exports[`Form should match the snapshot with the production form 1`] = `
onKeyDown={[Function]}
onMouseUp={[Function]}
type="text"
value="-60,000,000"
value="20,000,000"
/>
<span
className="font-italic text-muted"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ exports[`ApplicationDetailsPdf should render application pdf donwload link 1`] =
Object {
"comments": "mollit eu esse",
"isEnergyProduct": false,
"productAmount": 0,
"productAmount": 50000000,
"productRowId": -60000000,
"productUnits": "in qui",
"requiresEmissionAllocation": false,
Expand Down Expand Up @@ -1008,7 +1008,7 @@ exports[`ApplicationDetailsPdf should render application pdf donwload link 1`] =
Object {
"properties": Object {
"productEmissions": Object {
"exclusiveMinimum": 0,
"minimum": 0,
"title": "Emissions allocated to product",
"type": "number",
},
Expand All @@ -1027,6 +1027,7 @@ exports[`ApplicationDetailsPdf should render application pdf donwload link 1`] =
Object {
"properties": Object {
"productAmount": Object {
"minimum": 0,
"title": "Annual Production Amount",
"type": "number",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ exports[`The ProductionFields Component with archived product should match the s
Object {
"properties": Object {
"productEmissions": Object {
"exclusiveMinimum": 0,
"minimum": 0,
"title": "Emissions allocated to product",
"type": "number",
},
Expand All @@ -146,6 +146,7 @@ exports[`The ProductionFields Component with archived product should match the s
Object {
"properties": Object {
"productAmount": Object {
"minimum": 0,
"title": "Annual Production Amount",
"type": "number",
},
Expand Down Expand Up @@ -352,7 +353,7 @@ exports[`The ProductionFields Component with published product should match the
Object {
"properties": Object {
"productEmissions": Object {
"exclusiveMinimum": 0,
"minimum": 0,
"title": "Emissions allocated to product",
"type": "number",
},
Expand All @@ -371,6 +372,7 @@ exports[`The ProductionFields Component with published product should match the
Object {
"properties": Object {
"productAmount": Object {
"minimum": 0,
"title": "Annual Production Amount",
"type": "number",
},
Expand Down
5 changes: 3 additions & 2 deletions schema/data/prod/form_json/production.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"productEmissions": {
"title": "Emissions allocated to product",
"type": "number",
"exclusiveMinimum": 0
"minimum": 0
},
"requiresEmissionAllocation": {
"const": true
Expand All @@ -57,7 +57,8 @@
"requiresProductAmount": { "const": true },
"productAmount": {
"title": "Annual Production Amount",
"type": "number"
"type": "number",
"minimum": 0
},
"productUnits": {
"title": "Units",
Expand Down

0 comments on commit 5f1f86b

Please sign in to comment.