Forráskód Böngészése

feat: ✨ feat (detalhes agendamento) alterada exibicao das especialidades

foi alterada a exibicao das especialidades, para exibir 'limpeza padrao' quando for agendamento padrao, e exibir a lista de especialidades contratada na oportunidade, quando for oportunidade.

fase:prod | origin:escopo
Gustavo Zanatta 8 órája
szülő
commit
002bced32c

+ 6 - 8
src/components/dashboard/SolicitationDetailsDialog.vue

@@ -501,7 +501,12 @@ const servicesList = computed(() => {
     solicitation.specialities?.length
   ) {
     solicitation.specialities.forEach((speciality) => {
-      services.push({ active: true, label: speciality.name });
+      services.push({ active: true, label: speciality.description });
+    });
+  } else {
+    services.push({
+      active: true,
+      label: t("provider.dashboard.next_schedules.default"),
     });
   }
 
@@ -514,13 +519,6 @@ const servicesList = computed(() => {
     });
   }
 
-  if (!services.length) {
-    services.push({
-      active: true,
-      label: t("provider.dashboard.next_schedules.default"),
-    });
-  }
-
   return services;
 });
 

+ 1 - 1
src/i18n/locales/pt.json

@@ -357,7 +357,7 @@
       "next_schedules": {
         "title": "Próximos serviços",
         "custom": "Personalizada",
-        "default": "Faxina padrão",
+        "default": "Limpeza padrão",
         "no_provider": "Prestador não definido",
         "from": "de",
         "to": "até",

+ 10 - 2
src/pages/opportunities/components/OpportunityDetailsDialog.vue

@@ -64,7 +64,7 @@
         </div>
 
         <div class="font10 fontmedium text-grey-6">
-          {{ t(labelsPeriodTypes.find((periodType) => periodType.value === details.schedule?.period_type)?.label) }}
+          {{ periodTypeLabel }}
         </div>
 
         <div class="date font11">
@@ -239,7 +239,7 @@ import {
 
 import { avatarColors } from 'src/helpers/utils'
 import { labelsPeriodTypes } from 'src/helpers/labelsPeriodTypes.js'
-import { onMounted, ref } from 'vue'
+import { computed, onMounted, ref } from 'vue'
 import { useI18n } from 'vue-i18n'
 import { useRouter } from 'vue-router'
 import { userStore } from 'src/stores/user'
@@ -274,6 +274,14 @@ const user = userStore()
 const details = ref(null)
 const loading = ref(true)
 
+const periodTypeLabel = computed(() => {
+  const periodType = labelsPeriodTypes.find(
+    (item) => item.value === Number(details.value?.schedule?.period_type)
+  )
+
+  return periodType ? t(periodType.label) : ''
+})
+
 
 
 const choosePrice = (periodType) => {