|
@@ -25,7 +25,7 @@
|
|
|
<div v-else class="opportunity-list">
|
|
<div v-else class="opportunity-list">
|
|
|
<q-card v-for="item in opportunities" :key="item.id" flat class="opportunity-card">
|
|
<q-card v-for="item in opportunities" :key="item.id" flat class="opportunity-card">
|
|
|
<div class="avatar-column">
|
|
<div class="avatar-column">
|
|
|
- <img :src="item.avatar" class="client-avatar" />
|
|
|
|
|
|
|
+ <img :src="item.customer_photo || 'https://cdn.quasar.dev/img/avatar.png'" alt="Avatar" class="client-avatar" />
|
|
|
<div class="service-type">
|
|
<div class="service-type">
|
|
|
{{ item.custom_schedule?.service_type.description }}
|
|
{{ item.custom_schedule?.service_type.description }}
|
|
|
</div>
|
|
</div>
|
|
@@ -53,11 +53,11 @@
|
|
|
|
|
|
|
|
<div class="right-content">
|
|
<div class="right-content">
|
|
|
<div class="price">
|
|
<div class="price">
|
|
|
- {{ $t('provider.dashboard.opportunities.currency', { value: chooseprice(item.period_type, user.user.provider.daily_price_8h) }) }}
|
|
|
|
|
|
|
+ {{ filterCurrency(chooseprice(item.period_type, user.user.provider.daily_price_8h)) }}
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="service-address">
|
|
<div class="service-address">
|
|
|
- {{ item.custom_schedule?.address_type }}
|
|
|
|
|
|
|
+ {{ neighborhood(item.address?.address) }}
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="district">
|
|
<div class="district">
|
|
@@ -80,7 +80,7 @@
|
|
|
<script setup>
|
|
<script setup>
|
|
|
import { ref, onMounted } from 'vue'
|
|
import { ref, onMounted } from 'vue'
|
|
|
import { useRouter } from 'vue-router'
|
|
import { useRouter } from 'vue-router'
|
|
|
-import { chooseprice } from 'src/helpers/utils'
|
|
|
|
|
|
|
+import { chooseprice,filterCurrency } from 'src/helpers/utils'
|
|
|
import { getProviderOpportunities } from 'src/api/opportunities'
|
|
import { getProviderOpportunities } from 'src/api/opportunities'
|
|
|
import { userStore } from 'src/stores/user'
|
|
import { userStore } from 'src/stores/user'
|
|
|
|
|
|
|
@@ -121,6 +121,16 @@ const formatHour = (time) => {
|
|
|
return time.slice(0, 5)
|
|
return time.slice(0, 5)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+const neighborhood = (address) => {
|
|
|
|
|
+ if(!address) return '';
|
|
|
|
|
+
|
|
|
|
|
+ return address
|
|
|
|
|
+ .split(',')[1]
|
|
|
|
|
+ ?.split('-')[0]
|
|
|
|
|
+ ?.trim();
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
const loadOpportunities = async () => {
|
|
const loadOpportunities = async () => {
|
|
|
loading.value = true
|
|
loading.value = true
|
|
|
|
|
|
|
@@ -143,7 +153,7 @@ onMounted(loadOpportunities)
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
|
.opportunities-page {
|
|
.opportunities-page {
|
|
|
- padding: 16px;
|
|
|
|
|
|
|
+ padding: 0;
|
|
|
background: #f7f7fb;
|
|
background: #f7f7fb;
|
|
|
min-height: 100vh;
|
|
min-height: 100vh;
|
|
|
}
|
|
}
|
|
@@ -153,17 +163,26 @@ onMounted(loadOpportunities)
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
|
position: relative;
|
|
position: relative;
|
|
|
|
|
+
|
|
|
|
|
+ padding: 14px 16px;
|
|
|
|
|
+ background: #fff;
|
|
|
|
|
+
|
|
|
|
|
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
|
|
|
|
+ border-radius: 0 0 16px 16px;
|
|
|
|
|
+
|
|
|
margin-bottom: 16px;
|
|
margin-bottom: 16px;
|
|
|
|
|
+ z-index: 10;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.back-btn {
|
|
.back-btn {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
- left: 0;
|
|
|
|
|
|
|
+ left: 8px;
|
|
|
|
|
+ color: #7c5cff;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.page-title {
|
|
.page-title {
|
|
|
font-size: 16px;
|
|
font-size: 16px;
|
|
|
- font-weight: 700;
|
|
|
|
|
|
|
+ font-weight: 600;
|
|
|
color: #7c5cff;
|
|
color: #7c5cff;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -174,7 +193,7 @@ onMounted(loadOpportunities)
|
|
|
border-radius: 14px;
|
|
border-radius: 14px;
|
|
|
background: #a78bfa;
|
|
background: #a78bfa;
|
|
|
color: white;
|
|
color: white;
|
|
|
- margin-bottom: 16px;
|
|
|
|
|
|
|
+ margin: 16px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.banner-text {
|
|
.banner-text {
|
|
@@ -186,6 +205,7 @@ onMounted(loadOpportunities)
|
|
|
display: flex;
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
gap: 14px;
|
|
gap: 14px;
|
|
|
|
|
+ padding: 0 16px 16px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.opportunity-card {
|
|
.opportunity-card {
|