fix
This commit is contained in:
parent
ef0295d882
commit
aadf15bcde
4 changed files with 263 additions and 225 deletions
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted } from "vue";
|
||||
import { ref, onMounted, computed } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
|
|
@ -18,7 +18,8 @@ const listPerson = defineModel<ResRecord[]>("listPerson", { required: true });
|
|||
//ข้อมุล Table
|
||||
const keyword = ref<string>("");
|
||||
const rows = ref<ResRecord[]>([]);
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
// baseColumns
|
||||
const baseColumns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "isDone",
|
||||
align: "left",
|
||||
|
|
@ -185,6 +186,17 @@ const columns = ref<QTableProps["columns"]>([
|
|||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||
},
|
||||
]);
|
||||
const columns = computed(() => {
|
||||
if (!isProfile.value) {
|
||||
if (baseColumns.value) {
|
||||
return baseColumns.value.filter(
|
||||
(column) => column.name !== "isDone" && column.name !== "isDoneIDP"
|
||||
);
|
||||
}
|
||||
}
|
||||
return baseColumns.value;
|
||||
});
|
||||
|
||||
const visibleColumns = ref<string[]>([
|
||||
"isDone",
|
||||
"isDoneIDP",
|
||||
|
|
@ -195,8 +207,8 @@ const visibleColumns = ref<string[]>([
|
|||
"posTypeName",
|
||||
"posLevelName",
|
||||
"posExecutive",
|
||||
"startDate",
|
||||
"endDate",
|
||||
"dateStart",
|
||||
"dateEnd",
|
||||
"trainingDays",
|
||||
"org",
|
||||
"commandNumber",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue