diff --git a/src/components/IncrementButton.vue b/src/components/IncrementButton.vue index 488a66b..e43a04e 100644 --- a/src/components/IncrementButton.vue +++ b/src/components/IncrementButton.vue @@ -33,6 +33,8 @@ </template> <script> +import { MAX_FIELDS_VALUE } from '../constants'; + export default { props: { value: { @@ -44,7 +46,7 @@ export default { type: Number, }, max: { - default: undefined, + default: MAX_FIELDS_VALUE, type: Number, }, }, @@ -122,11 +124,11 @@ export default { <style> .increment-button { - min-width: 60px; + min-width: 70px; } .increment-button input { - width: 30px; + width: 40px; text-align: center; border-width: 1px 0; border-style: solid; diff --git a/src/components/Scenario.vue b/src/components/Scenario.vue index 0147392..a7a916d 100644 --- a/src/components/Scenario.vue +++ b/src/components/Scenario.vue @@ -17,7 +17,6 @@ </span> <IncrementButton v-model="scenario.numberOfParticipants" - :max="999" :min="1" class="align-right" /><br /> @@ -28,7 +27,6 @@ </span> <IncrementButton v-model="scenario.meetingDuration" - :max="999" :min="1" class="align-right" /><br /> @@ -60,7 +58,6 @@ </Tooltip> <IncrementButton v-model="scenario.software.numberOfInstances" - :max="999" :min="0" class="align-right" /><br /> @@ -87,7 +84,6 @@ </span> <IncrementButton v-model="h.qty" - :max="99" class="align-right" /><br /> </div> @@ -106,7 +102,7 @@ v-for="j in scenario.journey" :key="j.length" > - <IncrementButton v-model="j.distance" :max="9999" /> + <IncrementButton v-model="j.distance"/> <p>km en</p> <select v-model="j.mean" class="select-journey"> <option disabled value="">...</option> @@ -170,8 +166,8 @@ const { NB_OF_INSTANCES } = SOFTWARE; function initialScenario() { return { - meetingDuration: 1, - numberOfParticipants: 1, + meetingDuration: 60, + numberOfParticipants: 2, hardware: [ { name: "LAPTOP", diff --git a/src/constants.js b/src/constants.js index 267e63c..5d33b44 100644 --- a/src/constants.js +++ b/src/constants.js @@ -4,3 +4,5 @@ export const SOFTWARE = { WITH_SOFTWARE: 2, }, }; + +export const MAX_FIELDS_VALUE = 99999;