فهرست منبع

feat: ajuste em titulos e correção de porcentagem

ebagabee 1 ماه پیش
والد
کامیت
9a95d01251

+ 1 - 1
src/components/shared/ChangeImageDialog.vue

@@ -1,7 +1,7 @@
 <template>
   <q-dialog ref="dialogRef" @hide="onDialogHide">
     <q-card class="q-dialog-plugin overflow-hidden" style="min-width: 400px">
-      <DefaultDialogHeader :title="() => 'Trocar Imagem'" @close="onDialogCancel" />
+      <DefaultDialogHeader title="Trocar Imagem" @close="onDialogCancel" />
 
       <q-card-section class="q-pt-none q-pb-sm">
         <div class="text-caption text-grey-6 q-mb-xs">Personalizar</div>

+ 0 - 1
src/pages/tbr/components/AddEditInhabitantClassificationDialog.vue

@@ -47,7 +47,6 @@
             v-model:error="validationErrors.tbr_percentage"
             class="col-12"
             label="Porcentagem de Royalties"
-            max="100"
             min="0"
             step="0.01"
             type="number"

+ 23 - 48
src/pages/tbr/components/GenerateBillingsDialog.vue

@@ -1,48 +1,22 @@
 <template>
   <q-dialog ref="dialogRef" @hide="onDialogHide">
     <q-card class="q-dialog-plugin overflow-hidden" style="width: 100%; max-width: 400px">
-      <DefaultDialogHeader :title="() => 'Mês de Cobrança'" @close="onDialogCancel" />
+      <DefaultDialogHeader title="Mês de Cobrança" @close="onDialogCancel" />
 
       <q-form ref="formRef" @submit="onGenerate">
         <q-card-section class="q-pt-none">
-          <DefaultInput
-            v-model="monthDisplay"
+          <DefaultSelect
+            v-model="month"
             label="Mês"
-            outlined
-            readonly
-            clearable
+            :options="monthOptions"
             :rules="[inputRules.required]"
-            @clear="onClearMonth"
-          >
-            <template #append>
-              <q-icon name="mdi-calendar" class="cursor-pointer">
-                <q-popup-proxy cover transition-show="scale" transition-hide="scale">
-                  <q-date
-                    v-model="month"
-                    mask="MM/YYYY"
-                    emit-immediately
-                    default-view="Months"
-                    @update:model-value="onMonthSelect"
-                  >
-                    <div class="row items-center justify-end">
-                      <q-btn v-close-popup label="OK" color="primary" flat />
-                    </div>
-                  </q-date>
-                </q-popup-proxy>
-              </q-icon>
-            </template>
-          </DefaultInput>
+          />
         </q-card-section>
 
         <q-card-actions>
           <q-space />
           <q-btn outline label="Cancelar" @click="onDialogCancel" />
-          <q-btn
-            color="primary-2"
-            label="Gerar"
-            type="submit"
-            :loading="loading"
-          />
+          <q-btn color="primary-2" label="Gerar" type="submit" />
         </q-card-actions>
       </q-form>
     </q-card>
@@ -54,7 +28,7 @@ import { ref } from "vue";
 import { useDialogPluginComponent } from "quasar";
 import { useInputRules } from "src/composables/useInputRules";
 import DefaultDialogHeader from "src/components/defaults/DefaultDialogHeader.vue";
-import DefaultInput from "src/components/defaults/DefaultInput.vue";
+import DefaultSelect from "src/components/defaults/DefaultSelect.vue";
 
 defineEmits([...useDialogPluginComponent.emits]);
 
@@ -63,23 +37,24 @@ const { dialogRef, onDialogHide, onDialogOK, onDialogCancel } =
 
 const { inputRules } = useInputRules();
 
-const formRef = ref(null);
-const loading = ref(false);
 const month = ref(null);
-const monthDisplay = ref(null);
-
-function onMonthSelect(value) {
-  if (!value) return;
-  monthDisplay.value = value;
-}
-
-function onClearMonth() {
-  month.value = null;
-  monthDisplay.value = null;
-}
 
-async function onGenerate() {
-  // TODO: call generate billings API with month.value (MM/YYYY)
+const monthOptions = [
+  { label: "Janeiro", value: 1 },
+  { label: "Fevereiro", value: 2 },
+  { label: "Março", value: 3 },
+  { label: "Abril", value: 4 },
+  { label: "Maio", value: 5 },
+  { label: "Junho", value: 6 },
+  { label: "Julho", value: 7 },
+  { label: "Agosto", value: 8 },
+  { label: "Setembro", value: 9 },
+  { label: "Outubro", value: 10 },
+  { label: "Novembro", value: 11 },
+  { label: "Dezembro", value: 12 },
+];
+
+function onGenerate() {
   onDialogOK({ month: month.value });
 }
 </script>

+ 1 - 1
src/pages/tbr/components/ViewInhabitantClassificationDialog.vue

@@ -2,7 +2,7 @@
   <q-dialog ref="dialogRef" @hide="onDialogHide">
     <q-card class="q-dialog-plugin overflow-hidden" style="width: 100%; max-width: 500px">
       <DefaultDialogHeader
-        :title="() => 'Visualizar Faixa de Habitante'"
+        title="Visualizar Faixa de Habitante"
         @close="onDialogCancel"
       />
 

+ 1 - 1
src/pages/unit/components/AddEditHistoryDialog.vue

@@ -2,7 +2,7 @@
   <q-dialog ref="dialogRef" @hide="onDialogHide">
     <q-card class="q-dialog-plugin overflow-hidden" style="width: 560px; max-width: 95vw">
       <DefaultDialogHeader
-        :title="() => (history ? 'Editar Histórico' : 'Novo Histórico')"
+        :title="history ? 'Editar Histórico' : 'Novo Histórico'"
         @close="onDialogCancel"
       />
 

+ 1 - 1
src/pages/unit/components/AddEditPartnerDialog.vue

@@ -5,7 +5,7 @@
       style="width: 860px; max-width: 95vw"
     >
       <DefaultDialogHeader
-        :title="() => (partner ? 'Editar Sócio' : 'Adicionar Sócio')"
+        :title="partner ? 'Editar Sócio' : 'Adicionar Sócio'"
         @close="onDialogCancel"
       />
 

+ 1 - 1
src/pages/unit/components/AddMediaDialog.vue

@@ -1,7 +1,7 @@
 <template>
   <q-dialog ref="dialogRef" @hide="onDialogHide">
     <q-card class="q-dialog-plugin overflow-hidden" style="width: 480px; max-width: 95vw">
-      <DefaultDialogHeader :title="() => 'Adicionar Mídia'" @close="onDialogCancel" />
+      <DefaultDialogHeader title="Adicionar Mídia" @close="onDialogCancel" />
 
       <q-form ref="formRef" @submit="onOKClick">
         <q-card-section class="q-pt-none">

+ 1 - 1
src/pages/unit/components/ViewContractDialog.vue

@@ -5,7 +5,7 @@
       style="width: 100%; max-width: 1100px"
     >
       <DefaultDialogHeader
-        :title="() => 'Visualizar Contrato'"
+        title="Visualizar Contrato"
         @close="onDialogCancel"
       />