chore: install prettier

This commit is contained in:
Viet An
2026-05-04 15:22:27 +07:00
parent 93d29ca7d8
commit bd58e2b847
267 changed files with 22950 additions and 13581 deletions

View File

@@ -14,8 +14,16 @@
{{ v.name }}
</div>
</template>
<div class="field is-grouped is-grouped-multiline" v-else>
<div class="control" v-for="(v, i) in tabs" :key="i" @click="changeTab(v)">
<div
class="field is-grouped is-grouped-multiline"
v-else
>
<div
class="control"
v-for="(v, i) in tabs"
:key="i"
@click="changeTab(v)"
>
<div style="width: 110px">
<div :class="`py-3 px-3 ${getStyle(v)}`">{{ v.name }}</div>
</div>
@@ -31,17 +39,25 @@
<template v-if="record">
<ImageGallery
v-if="tab === 'image'"
v-bind="{ row: record, pagename, api: 'peoplefile', show: ['delete'] }"
v-bind="{
row: record,
pagename,
api: 'peoplefile',
show: ['delete'],
}"
@update="update"
></ImageGallery>
</template>
<PeopleView v-bind="{ row: record, pagename }" v-if="tab === 'summary'" />
<PeopleView
v-bind="{ row: record, pagename }"
v-if="tab === 'summary'"
/>
</div>
</div>
</template>
<script setup>
import PeopleInfo from "~/components/people/PeopleInfo";
const { $dialog } = useNuxtApp()
const { $dialog } = useNuxtApp();
const props = defineProps({
pagename: String,
row: Object,
@@ -64,19 +80,15 @@ function getStyle(v) {
}
function changeTab(v) {
if (tab.value === v.code) return;
if (!record.value)
return $dialog(
"Vui lòng <b>lưu dữ liệu</b> trước khi chuyển sang mục tiếp theo",
"Thông báo"
);
if (!record.value) return $dialog("Vui lòng <b>lưu dữ liệu</b> trước khi chuyển sang mục tiếp theo", "Thông báo");
tab.value = v.code;
}
function update(v) {
record.value = {
...v,
label: `${v.code} / ${v.fullname} / ${v.phone || ""}`
}
label: `${v.code} / ${v.fullname} / ${v.phone || ""}`,
};
emit("modalevent", { name: "dataevent", data: record.value });
if (!props.row) emit("close");