-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #297 from ozgurg/dev
release: v7.4.0
- Loading branch information
Showing
13 changed files
with
97 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,27 @@ | ||
<template> | ||
<!-- DO NOT use v-html on the root element --> | ||
<vh-alert type="info"> | ||
<!-- eslint-disable vue/no-v-text-v-html-on-component vue/no-v-html --> | ||
<div v-html="text" /> | ||
Türkiye'de asgari ücretle ({{ formattedMinimumWage }}) çalışan birisi yemeden içmeden bu ürünü <span | ||
class="text-h6 font-weight-bold">{{ count }}</span> {{ timeUnit }} maaşıyla satın alabilir. | ||
</vh-alert> | ||
</template> | ||
|
||
<script> | ||
<script setup=""> | ||
import { calculateMinimumWageDayCount, calculateMinimumWageMonthCount } from "@/utils/calculate-minimum-wage-count.js"; | ||
import { moneyFormat } from "@/utils/formatter.js"; | ||
const { MINIMUM_WAGE } = process.env; | ||
export default { | ||
props: { | ||
price: { | ||
type: Number, | ||
required: true | ||
} | ||
}, | ||
computed: { | ||
text() { | ||
const vm = this; | ||
const props = defineProps({ | ||
price: { | ||
type: Number, | ||
required: true | ||
} | ||
}); | ||
const count = vm.minimumWageMonthCount > 1 ? vm.minimumWageMonthCount : vm.minimumWageDayCount; | ||
const timeUnit = vm.minimumWageMonthCount > 1 ? "aylık" : "günlük"; | ||
const minimumWageMonthCount = calculateMinimumWageMonthCount(props.price, MINIMUM_WAGE); | ||
const minimumWageDayCount = calculateMinimumWageDayCount(props.price, MINIMUM_WAGE); | ||
return `Türkiye'de asgari ücretle (${vm.formattedMinimumWage}) çalışan birisi yemeden içmeden bu ürünü <span class="text-h6 font-weight-bold">${count}</span> ${timeUnit} maaşıyla satın alabilir.`; | ||
}, | ||
formattedMinimumWage() { | ||
return moneyFormat(MINIMUM_WAGE, "TRY"); | ||
}, | ||
minimumWageDayCount() { | ||
const vm = this; | ||
return calculateMinimumWageDayCount(vm.price, MINIMUM_WAGE); | ||
}, | ||
minimumWageMonthCount() { | ||
const vm = this; | ||
return calculateMinimumWageMonthCount(vm.price, MINIMUM_WAGE); | ||
} | ||
} | ||
}; | ||
const formattedMinimumWage = moneyFormat(MINIMUM_WAGE, "TRY"); | ||
const count = minimumWageMonthCount > 1 ? minimumWageMonthCount : minimumWageDayCount; | ||
const timeUnit = minimumWageMonthCount > 1 ? "aylık" : "günlük"; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,22 @@ | ||
<template> | ||
<v-list-item | ||
:to="calculator.url" | ||
color="primary"> | ||
<v-list-item :to="props.calculator.url"> | ||
<v-list-item-icon> | ||
<v-icon> | ||
{{ calculator.icon }} | ||
{{ props.calculator.icon }} | ||
</v-icon> | ||
</v-list-item-icon> | ||
|
||
<v-list-item-title> | ||
{{ calculator.shortTitle }} | ||
{{ props.calculator.shortTitle }} | ||
</v-list-item-title> | ||
</v-list-item> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: { | ||
calculator: { | ||
type: Object, | ||
required: true | ||
} | ||
<script setup=""> | ||
const props = defineProps({ | ||
calculator: { | ||
type: Object, | ||
required: true | ||
} | ||
}; | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.