|
|
@@ -51,33 +51,48 @@ const $q = useQuasar();
|
|
|
const rows = ref([]);
|
|
|
|
|
|
const columns = [
|
|
|
- { name: "id", label: "ID", field: "id", align: "left" },
|
|
|
- { name: "description", label: "Descrição", field: "description", align: "left" },
|
|
|
- { name: "start", label: "Início", field: "start", align: "left" },
|
|
|
- { name: "end", label: "Fim", field: "end", align: "left" },
|
|
|
- { name: "tbr_percentage", label: "%", field: "tbr_percentage", align: "left", format: (val) => `${(val * 100).toFixed(2)}%` },
|
|
|
- { name: "actions", label: "Ações", field: "actions", align: "center" },
|
|
|
+ { name: "id", label: "ID", field: "id", align: "left" },
|
|
|
+ {
|
|
|
+ name: "description",
|
|
|
+ label: "Descrição",
|
|
|
+ field: "description",
|
|
|
+ align: "left",
|
|
|
+ },
|
|
|
+ { name: "start", label: "Início", field: "start", align: "left" },
|
|
|
+ { name: "end", label: "Fim", field: "end", align: "left" },
|
|
|
+ {
|
|
|
+ name: "tbr_percentage",
|
|
|
+ label: "%",
|
|
|
+ field: "tbr_percentage",
|
|
|
+ align: "left",
|
|
|
+ format: (val) => `${(val * 100).toFixed(2)}%`,
|
|
|
+ },
|
|
|
+ { name: "actions", label: "Ações", field: "actions", align: "center" },
|
|
|
];
|
|
|
|
|
|
const loadData = async () => {
|
|
|
rows.value = await getInhabitantClassifications();
|
|
|
-}
|
|
|
+};
|
|
|
|
|
|
const onAdd = () => {
|
|
|
- $q.dialog({ component: AddEditInhabitantClassificationDialog }).onOk(() => loadData());
|
|
|
-}
|
|
|
+ $q.dialog({ component: AddEditInhabitantClassificationDialog }).onOk(() =>
|
|
|
+ loadData(),
|
|
|
+ );
|
|
|
+};
|
|
|
|
|
|
const onEdit = (row) => {
|
|
|
$q.dialog({
|
|
|
- component: AddEditInhabitantClassificationDialog, componentProps: { item: row },
|
|
|
+ component: AddEditInhabitantClassificationDialog,
|
|
|
+ componentProps: { item: row },
|
|
|
}).onOk(() => loadData());
|
|
|
-}
|
|
|
+};
|
|
|
|
|
|
const onView = (row) => {
|
|
|
$q.dialog({
|
|
|
- component: ViewInhabitantClassificationDialog, componentProps: { item: row },
|
|
|
+ component: ViewInhabitantClassificationDialog,
|
|
|
+ componentProps: { item: row },
|
|
|
});
|
|
|
-}
|
|
|
+};
|
|
|
|
|
|
onMounted(loadData);
|
|
|
</script>
|