Skip to content

Commit c2e6a65

Browse files
committed
commit before branching
1 parent 716fe24 commit c2e6a65

File tree

2 files changed

+58
-30
lines changed

2 files changed

+58
-30
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# flow-calc-v
22

33
## Description
4-
A compact but powerful mobile web application for irrigation design. It helps irrigation installers calculate the number of sprinkler heads each station can have based on flow rate and pressure. This build on two previous projects: [Flow Calculator](https://github.com/ozmos/flow-calculator), and [Flow Calculator 2.0](https://github.com/ozmos/flow-calculator-2.0), using the [Vue js](https://vuejs.org/) frame work.
4+
A compact but powerful mobile web application for irrigation design. It helps irrigation installers calculate the number of sprinkler heads each station can have based on flow rate and pressure. Flow-calc-v builds on two previous projects: [Flow Calculator](https://github.com/ozmos/flow-calculator), and [Flow Calculator 2.0](https://github.com/ozmos/flow-calculator-2.0), using the [Vue js](https://vuejs.org/) frame work.
55

66
## Instructions and live project
77
Coming soon

src/components/Sidebar.vue

+57-29
Original file line numberDiff line numberDiff line change
@@ -5,47 +5,75 @@
55
<p class="menu-label">
66
General
77
</p>
8-
<ul class="menu-list">
9-
<li><a>Dashboard</a></li>
10-
<li><a>Customers</a></li>
11-
</ul>
12-
<p class="menu-label">
13-
Administration
14-
</p>
15-
<ul class="menu-list">
16-
<li><a>Team Settings</a></li>
17-
<li>
18-
<a class="is-active">Manage Your Team</a>
19-
<ul>
20-
<li><a>Members</a></li>
21-
<li><a>Plugins</a></li>
22-
<li><a>Add a member</a></li>
23-
</ul>
24-
</li>
25-
<li><a>Invitations</a></li>
26-
<li><a>Cloud Storage Environment Settings</a></li>
27-
<li><a>Authentication</a></li>
28-
</ul>
29-
<p class="menu-label">
30-
Transactions
31-
</p>
32-
<ul class="menu-list">
33-
<li><a>Payments</a></li>
34-
<li><a>Transfers</a></li>
35-
<li><a>Balance</a></li>
36-
</ul>
8+
<div class="field" id="flow">
9+
<label class="label">Enter your flow in litres per minute</label>
10+
<div class="control is-flex is-align-items-center" id="flow">
11+
<!-- <input type="number" v-model="localFlow" :min="flowRange.min" :max="flowRange.max"> -->
12+
<NumberInput v-model="localFlow" :min="flowRange.min" :max="flowRange.max" @changeCount="updateFlow" :value="flow"/>
13+
<span class="is-right ml-1">Lpm</span>
14+
</div>
15+
</div>
16+
<!-- ./field -->
17+
<div class="field" id="pressure">
18+
<label class="label">Select your working pressure in kilopascals</label>
19+
<div class="control has-icons-right is-flex is-align-items-center">
20+
<div class="select">
21+
<select v-model="localPressure">
22+
23+
<option v-for="(pressure, index) in pressureRange" :key="index" >{{ pressure }}</option>
24+
</select>
25+
</div>
26+
27+
<span class="is-right ml-1">kpa</span>
28+
</div>
29+
</div>
30+
<!-- /.field -->
31+
<div class="field">
32+
<div class="control">
33+
<button class="button is-link" @click="$emit('set', localFlow, localPressure)">Set pressure and flow</button>
34+
</div>
35+
36+
</div>
3737
</aside>
3838
</transition>
3939
</template>
4040

4141
<script>
42+
import NumberInput from './NumberInput.vue';
4243
export default {
4344
45+
46+
47+
components: {
48+
NumberInput
49+
},
50+
props: {
51+
flow: {
52+
type: Number
53+
},
54+
pressureRange: {
55+
type: Array
56+
},
57+
flowRange: {
58+
type: Object
59+
}
60+
},
61+
4462
data() {
4563
return {
4664
isActive: false,
65+
localFlow: this.flow,
66+
localPressure: this.pressureRange[0]
4767
}
4868
},
69+
70+
methods: {
71+
updateFlow(count) {
72+
this.localFlow = count;
73+
}
74+
}
75+
76+
4977
}
5078
</script>
5179

0 commit comments

Comments
 (0)