diff --git a/app/Domains/LogerProfile/Services/LogerProfileService.php b/app/Domains/LogerProfile/Services/LogerProfileService.php index 2634812b..962f5141 100644 --- a/app/Domains/LogerProfile/Services/LogerProfileService.php +++ b/app/Domains/LogerProfile/Services/LogerProfileService.php @@ -63,7 +63,8 @@ public function getTransactionsByProfileId(int $profileId, $startDate, $endDate) $teamId = $entities[0]->team_id; - $transactions = TransactionLine::query()->byTeam($teamId) + $transactions = TransactionLine::query() + ->byTeam($teamId) ->inDateFrame($startDate, $endDate) ->expenseCategories($categories) ->verified() @@ -72,7 +73,7 @@ public function getTransactionsByProfileId(int $profileId, $startDate, $endDate) return [ "data" => $transactions, - "total" => $transactions->sum('total'), + "total" => $transactions->sum('amount'), ]; } } diff --git a/resources/js/Components/molecules/ColorSelector.vue b/resources/js/Components/molecules/ColorSelector.vue index dada069c..8e71e0e8 100644 --- a/resources/js/Components/molecules/ColorSelector.vue +++ b/resources/js/Components/molecules/ColorSelector.vue @@ -2,11 +2,10 @@ import { NPopover } from "naive-ui" import { computed } from "vue"; - const props = defineProps({ - modelValue: { - type: String - } - }) + const props = defineProps<{ + modelValue: string; + type: boolean; + }>(); const colors = [ '#037F4C', @@ -29,10 +28,6 @@ '#808080' ] - const currentColor = computed(() => { - return props.modelValue || colors[0]; - }) - const styleColor = computed(() => { return { backgroundColor: props.modelValue || colors[0] @@ -42,7 +37,7 @@