|
|
@@ -53,7 +53,7 @@
|
|
|
|
|
|
<div class="right-content">
|
|
|
<div class="price">
|
|
|
- {{ $t('provider.dashboard.opportunities.currency', { value: chooseprice(item.period_type) }) }}
|
|
|
+ {{ $t('provider.dashboard.opportunities.currency', { value: chooseprice(item.period_type, user.user.provider.daily_price_8h) }) }}
|
|
|
</div>
|
|
|
|
|
|
<div class="service-address">
|
|
|
@@ -80,7 +80,7 @@
|
|
|
<script setup>
|
|
|
import { ref, onMounted } from 'vue'
|
|
|
import { useRouter } from 'vue-router'
|
|
|
-
|
|
|
+import { chooseprice } from 'src/helpers/utils'
|
|
|
import { getProviderOpportunities } from 'src/api/opportunities'
|
|
|
import { userStore } from 'src/stores/user'
|
|
|
|
|
|
@@ -102,20 +102,7 @@ const goToOpportunityDetails = (item) => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-const chooseprice = (periodType) => {
|
|
|
- switch (periodType) {
|
|
|
- case "8":
|
|
|
- return user.user.provider_daily_price_8h
|
|
|
- case "6":
|
|
|
- return user.user.provider_daily_price_6h
|
|
|
- case "4":
|
|
|
- return user.user.provider_daily_price_4h
|
|
|
- case "2":
|
|
|
- return user.user.provider_daily_price_2h
|
|
|
- default:
|
|
|
- return 0
|
|
|
- }
|
|
|
-}
|
|
|
+
|
|
|
|
|
|
// formatando a data
|
|
|
const formatDate = (date) => {
|