Merge branch 'NiceDev' into develop

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-12-22 17:36:31 +07:00
commit f20309e6b1
2 changed files with 29 additions and 10 deletions

View file

@ -7,6 +7,9 @@ const props = defineProps({
type: {
type: String,
},
row: {
type: Object,
},
});
const columnsDrictor = ref<QTableProps["columns"]>([
@ -20,11 +23,11 @@ const columnsDrictor = ref<QTableProps["columns"]>([
style: "font-size: 14px",
},
{
name: "name",
name: "fullName",
align: "left",
label: "ชื่อ - นามสกุล",
sortable: true,
field: "name",
field: "fullName",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
@ -85,21 +88,21 @@ const columnsMeeting = ref<QTableProps["columns"]>([
style: "font-size: 14px",
},
{
name: "results",
name: "result",
align: "left",
label: "ผลการพิจารณาของคณะกรรมการประเมินผลงานแต่ละคณะ",
sortable: true,
field: "results",
field: "result",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "timePeriod",
name: "duration",
align: "left",
label: "ระยะเวลาในการแก้ไขผลงาน",
sortable: true,
field: "timePeriod",
field: "duration",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
@ -119,6 +122,7 @@ onMounted(() => {
bordered
class="custom-header-table"
:columns="columns"
:rows="props.row"
dense
:rows-per-page-options="[10, 25, 50, 100]"
>

View file

@ -13,7 +13,7 @@ import { useCounterMixin } from "@/stores/mixin";
const $q = useQuasar();
const mixin = useCounterMixin();
const { showLoader, hideLoader, messageError, success } = mixin;
const { showLoader, hideLoader, messageError, success, date2Thai } = mixin;
const props = defineProps({
evaluateId: {
@ -71,7 +71,22 @@ async function fetchDirector() {
props.evaluateId &&
(await http
.get(config.API.evaluationDirectorMeetring(props.evaluateId))
.then((res) => {})
.then((res) => {
const directors = res.data.result.directors;
const meetings = res.data.result.meetings;
directorList.value = directors.map((e: any) => ({
fullName: `${e.prefix}${e.firstName} ${e.lastName}`,
position: e.position ?? "-",
email: e.email ?? "-",
phone: e.phone ?? "-",
}));
meetingList.value = meetings.map((e: any) => ({
fullName: `${e.Prefix}${e.FirstName} ${e.LastName}`,
dateMeeting: `${date2Thai(e.dateStart)} - ${date2Thai(e.dateEnd)}`,
result: e.result ?? "-",
duration: e.duration ?? "-",
}));
})
.catch((err) => {})
.finally(() => {
hideLoader();
@ -161,11 +176,11 @@ onMounted(async () => {
<q-separator />
<q-tab-panels v-model="tabMenu" animated>
<q-tab-panel name="director"
><TableDirector :type="tabMenu"
><TableDirector :type="tabMenu" :row="directorList"
/></q-tab-panel>
<q-tab-panel name="meeting">
<TableDirector :type="tabMenu"
<TableDirector :type="tabMenu" :row="meetingList"
/></q-tab-panel>
</q-tab-panels>
</q-card>