Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
pail23 committed Jan 6, 2024
1 parent 9cbcfb4 commit 7053139
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
14 changes: 12 additions & 2 deletions src/views/Forecast.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,19 @@
<v-card-text>
<div>{{ costTotalProfitLabel }}</div>
<div>
{{ $t('consumption') + ': '+ formatNumberWithUnit(forecast?.consumed_energy, 'kWh') }}
{{
$t('consumption') +
': ' +
formatNumberWithUnit(forecast?.consumed_energy, 'kWh')
}}
</div>
<div>
{{
$t('home_card.solar_production') +
': ' +
formatNumberWithUnit(forecast?.solar_energy, 'kWh')
}}
</div>
<div>{{ $t('home_card.solar_production') + ': '+ formatNumberWithUnit(forecast?.solar_energy, 'kWh') }}</div>
</v-card-text>
</v-card>

Expand Down
19 changes: 3 additions & 16 deletions src/views/Statistics.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,38 +60,25 @@
</template>

<script lang="ts" setup>
import { computed, watch, ref, onMounted } from 'vue';
import { watch, ref, onMounted } from 'vue';
import {
api,
IHomeMeasurementPeriod,
IHomeMeasurementDate,
} from '@/api/energyAssistant.api';
import { getBreakpointValue } from '@/plugins/breakpoint';
import { useRouter } from 'vue-router';
import PowerFlowCard from '@/components/PowerFlowCard.vue';
import DeviceEnergyCard from '@/components/DeviceEnergyCard.vue';
import WeeklyStatisticsCard from '@/components/WeeklyStatisticsCard.vue';
// global refs
const router = useRouter();
const data = ref<IHomeMeasurementPeriod>();
const statistics = ref<IHomeMeasurementDate[]>();
const isLoading = ref(false);
// computed properties
const activeTab = ref('today'); /* computed(() => {
if (router.currentRoute.value.name?.toString().includes('today')) {
return 'today';
}
if (router.currentRoute.value.name?.toString().includes('week')) {
return 'week';
}
if (router.currentRoute.value.name?.toString().includes('month')) {
return 'month';
}
return 'year';
});
*/
const activeTab = ref('today');
watch(activeTab, () => {
const from_date = new Date();
Expand Down

0 comments on commit 7053139

Please sign in to comment.