Quellcode durchsuchen

feat: corrige acronimo, adiciona taxas

ebagabee vor 1 Monat
Ursprung
Commit
13aa4e1a5b

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

@@ -236,7 +236,7 @@ async function loadData() {
   }
 
   inhabitantOptions.value = classifications.map((c) => ({
-    label: `${c.description} (${c.acronym})`,
+    label: c.description,
     value: c.id,
   }));
 }

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

@@ -327,7 +327,7 @@ async function loadData() {
   }
 
   inhabitantOptions.value = classifications.map((c) => ({
-    label: `${c.description} (${c.acronym})`,
+    label: c.description,
     value: c.id,
   }));
 

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

@@ -124,7 +124,7 @@ const form = reactive({
 async function loadData() {
   const classifications = await getInhabitantClassificationsForSelect();
   inhabitantOptions.value = classifications.map((c) => ({
-    label: `${c.description} (${c.acronym})`,
+    label: c.description,
     value: c.id,
   }));
 }

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

@@ -301,7 +301,7 @@ async function loadData() {
   }
 
   inhabitantOptions.value = classifications.map((c) => ({
-    label: `${c.description} (${c.acronym})`,
+    label: c.description,
     value: c.id,
   }));
 

+ 58 - 0
src/pages/unit/tabs/ContractsTab.vue

@@ -22,6 +22,40 @@
         <q-td>{{ formatToBRLCurrency(row.tbr_fixed_value) }}</q-td>
       </template>
 
+      <template #body-cell-royalties="{ row }">
+        <q-td>
+          {{
+            row.tbr_fixed_value_percentage != null
+              ? `${(row.tbr_fixed_value_percentage * 100).toFixed(2)}%`
+              : "-"
+          }}
+        </q-td>
+      </template>
+
+      <template #body-cell-fnm="{ row }">
+        <q-td>
+          {{
+            row.marketing_fund_percentage != null
+              ? `${(row.marketing_fund_percentage * 100).toFixed(2)}%`
+              : "-"
+          }}
+        </q-td>
+      </template>
+
+      <template #body-cell-maintenance="{ row }">
+        <q-td>
+          {{
+            row.maintance_tax_percentage != null
+              ? `${(row.maintance_tax_percentage * 100).toFixed(2)}%`
+              : "-"
+          }}
+        </q-td>
+      </template>
+
+      <template #body-cell-inhabitant_classification="{ row }">
+        <q-td>{{ row.inhabitant_classification?.description ?? "-" }}</q-td>
+      </template>
+
       <template #body-cell-actions="{ row: contract }">
         <q-td align="center">
           <div class="row no-wrap" style="gap: 4px">
@@ -160,6 +194,30 @@ const columns = [
     field: "tbr_fixed_value",
     align: "left",
   },
+  {
+    name: "royalties",
+    label: "Royalties",
+    field: "tbr_fixed_value_percentage",
+    align: "left",
+  },
+  {
+    name: "fnm",
+    label: "FNM",
+    field: "marketing_fund_percentage",
+    align: "left",
+  },
+  {
+    name: "maintenance",
+    label: "Taxa de Manutenção",
+    field: "maintance_tax_percentage",
+    align: "left",
+  },
+  {
+    name: "inhabitant_classification",
+    label: "Faixa de Habitantes",
+    field: "inhabitant_classification",
+    align: "left",
+  },
   {
     name: "actions",
     label: "Ações",