Refactoring code module 02_organization

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-09-11 17:00:27 +07:00
parent 63b9aafbaf
commit 0f5d772e53
24 changed files with 805 additions and 1033 deletions

View file

@ -1,12 +1,12 @@
<script setup lang="ts">
import { ref, onMounted } from "vue";
import { useQuasar } from "quasar";
import { OrgChart } from "bma-org-chart";
import "bma-org-chart/org-chart.css";
import http from "@/plugins/http";
import config from "@/app.config";
import { OrgChart } from "bma-org-chart";
import "bma-org-chart/org-chart.css";
import { useCounterMixin } from "@/stores/mixin";
import { useOrganizational } from "@/modules/02_organization/store/organizational";
import avatar from "@/assets/avatar_user.jpg";
@ -26,10 +26,10 @@ const chartRef = ref(); // อ้างอิงไปที่ตัว chart
/**
* fetch อม Chart โครงสราง
*/
function fetchOrgChart() {
async function fetchOrgChart() {
showLoader();
let urlRequest = config.API.orgChart(rootOrgID.value);
http
await http
.get(urlRequest)
.then(async (response) => {
if (response.data.result.length > 0) {