Skip to content

Commit

Permalink
Changer les valeurs maximales et par défaut afin d'être plus proche d…
Browse files Browse the repository at this point in the history
…e la réalité (#27)

* feat: edit max values and adapt layout
* feat: new default values
  • Loading branch information
ValLG authored May 4, 2021
1 parent aeda9c5 commit dab7458
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 5 additions & 3 deletions src/components/IncrementButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
</template>

<script>
import { MAX_FIELDS_VALUE } from '../constants';
export default {
props: {
value: {
Expand All @@ -44,7 +46,7 @@ export default {
type: Number,
},
max: {
default: undefined,
default: MAX_FIELDS_VALUE,
type: Number,
},
},
Expand Down Expand Up @@ -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;
Expand Down
10 changes: 3 additions & 7 deletions src/components/Scenario.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
</span>
<IncrementButton
v-model="scenario.numberOfParticipants"
:max="999"
:min="1"
class="align-right"
/><br />
Expand All @@ -28,7 +27,6 @@
</span>
<IncrementButton
v-model="scenario.meetingDuration"
:max="999"
:min="1"
class="align-right"
/><br />
Expand Down Expand Up @@ -60,7 +58,6 @@
</Tooltip>
<IncrementButton
v-model="scenario.software.numberOfInstances"
:max="999"
:min="0"
class="align-right"
/><br />
Expand All @@ -87,7 +84,6 @@
</span>
<IncrementButton
v-model="h.qty"
:max="99"
class="align-right"
/><br />
</div>
Expand All @@ -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>
Expand Down Expand Up @@ -170,8 +166,8 @@ const { NB_OF_INSTANCES } = SOFTWARE;
function initialScenario() {
return {
meetingDuration: 1,
numberOfParticipants: 1,
meetingDuration: 60,
numberOfParticipants: 2,
hardware: [
{
name: "LAPTOP",
Expand Down
2 changes: 2 additions & 0 deletions src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ export const SOFTWARE = {
WITH_SOFTWARE: 2,
},
};

export const MAX_FIELDS_VALUE = 99999;

0 comments on commit dab7458

Please sign in to comment.