|
15 | 15 | <LoadpointSettingsButton :id="id" class="d-block d-sm-none" />
|
16 | 16 | </div>
|
17 | 17 | <div class="mb-3 d-flex align-items-center">
|
18 |
| - <Mode class="flex-grow-1" :mode="mode" @updated="setTargetMode" /> |
| 18 | + <Mode class="flex-grow-1" v-bind="modeProps" @updated="setTargetMode" /> |
19 | 19 | <LoadpointSettingsButton :id="id" class="d-none d-sm-block ms-2" />
|
20 | 20 | </div>
|
21 | 21 | </div>
|
@@ -98,6 +98,7 @@ import LoadpointSettingsButton from "./LoadpointSettingsButton.vue";
|
98 | 98 | import LoadpointSettingsModal from "./LoadpointSettingsModal.vue";
|
99 | 99 | import VehicleIcon from "./VehicleIcon";
|
100 | 100 | import LoadpointSessionInfo from "./LoadpointSessionInfo.vue";
|
| 101 | +import smartCostAvailable from "../utils/smartCostAvailable"; |
101 | 102 |
|
102 | 103 | export default {
|
103 | 104 | name: "Loadpoint",
|
@@ -189,6 +190,8 @@ export default {
|
189 | 190 | tariffCo2: Number,
|
190 | 191 | currency: String,
|
191 | 192 | multipleLoadpoints: Boolean,
|
| 193 | + gridConfigured: Boolean, |
| 194 | + pvConfigured: Boolean, |
192 | 195 | },
|
193 | 196 | data() {
|
194 | 197 | return {
|
@@ -218,6 +221,9 @@ export default {
|
218 | 221 | phasesProps: function () {
|
219 | 222 | return this.collectProps(Phases);
|
220 | 223 | },
|
| 224 | + modeProps: function () { |
| 225 | + return this.collectProps(Mode); |
| 226 | + }, |
221 | 227 | sessionInfoProps: function () {
|
222 | 228 | return this.collectProps(LoadpointSessionInfo);
|
223 | 229 | },
|
@@ -251,6 +257,12 @@ export default {
|
251 | 257 | socBasedPlanning: function () {
|
252 | 258 | return this.socBasedCharging && this.vehicle?.capacity > 0;
|
253 | 259 | },
|
| 260 | + pvPossible: function () { |
| 261 | + return this.pvConfigured || this.gridConfigured; |
| 262 | + }, |
| 263 | + hasSmartCost: function () { |
| 264 | + return smartCostAvailable(this.smartCostType); |
| 265 | + }, |
254 | 266 | },
|
255 | 267 | watch: {
|
256 | 268 | phaseRemaining() {
|
|
0 commit comments