Przeglądaj źródła

chore: remove functions nao mais utilizadas

ebagabee 1 miesiąc temu
rodzic
commit
240a1fee3d
1 zmienionych plików z 14 dodań i 38 usunięć
  1. 14 38
      src/pages/unit/components/EditContractDialog.vue

+ 14 - 38
src/pages/unit/components/EditContractDialog.vue

@@ -136,7 +136,10 @@
             </template>
           </DefaultInput>
 
-          <div class="col-md-3 col-12 row no-wrap items-center" style="gap: 8px">
+          <div
+            class="col-md-3 col-12 row no-wrap items-center"
+            style="gap: 8px"
+          >
             <DefaultInput
               v-model="contractForm.tax_base_maintenance"
               label="Taxa de Manutenção"
@@ -163,7 +166,9 @@
       </q-card-section>
 
       <q-card-section>
-        <div class="text-body2 q-mb-sm">Histórico de Reajuste de Valores e TBR</div>
+        <div class="text-body2 q-mb-sm">
+          Histórico de Reajuste de Valores e TBR
+        </div>
 
         <q-table
           flat
@@ -201,10 +206,7 @@ import DefaultSelect from "src/components/defaults/DefaultSelect.vue";
 
 import { getUnit } from "src/api/unit";
 import { getInhabitantClassificationsForSelect } from "src/api/inhabitant_classification";
-import {
-  updateFranchiseeContract,
-  getFranchiseeContractTaxHistory,
-} from "src/api/franchisee_contract";
+import { getFranchiseeContractTaxHistory } from "src/api/franchisee_contract";
 
 defineEmits([...useDialogPluginComponent.emits]);
 
@@ -226,7 +228,6 @@ function openTaxesDialog() {
   onDialogOK({ openTaxes: true, contract: props.contract });
 }
 
-const saving = ref(false);
 const loadingHistory = ref(false);
 const inhabitantOptions = ref([]);
 const tbrHistory = ref([]);
@@ -275,7 +276,12 @@ const tbrColumns = [
     field: "inhabitant_classification",
     align: "left",
   },
-  { name: "tbr_fixed_value", label: "TBR", field: "tbr_fixed_value", align: "left" },
+  {
+    name: "tbr_fixed_value",
+    label: "TBR",
+    field: "tbr_fixed_value",
+    align: "left",
+  },
   {
     name: "marketing_fund_percentage",
     label: "FNM",
@@ -328,35 +334,5 @@ async function loadTaxHistory() {
   }
 }
 
-async function save() {
-  saving.value = true;
-  try {
-    await updateFranchiseeContract(props.contract.id, {
-      start_date: contractForm.start_date,
-      end_date: contractForm.end_date,
-      tbr_fixed_value: contractForm.tbr_fixed_value,
-      invoice_due_date: contractForm.invoice_due_date,
-      inhabitant_classification_id: contractForm.inhabitant_classification_id,
-      tbr_fixed_value_percentage:
-        contractForm.tax_base_royalts != null
-          ? contractForm.tax_base_royalts / 100
-          : null,
-      marketing_fund_percentage:
-        contractForm.tax_base_fnm != null
-          ? contractForm.tax_base_fnm / 100
-          : null,
-      maintance_tax_percentage:
-        contractForm.tax_base_maintenance != null
-          ? contractForm.tax_base_maintenance / 100
-          : null,
-    });
-    onDialogOK();
-  } catch (error) {
-    console.error(error);
-  } finally {
-    saving.value = false;
-  }
-}
-
 onMounted(loadData);
 </script>