Merge branch 'develop' of github.com:Frappet/bma-ehr-frontend into develop

* 'develop' of github.com:Frappet/bma-ehr-frontend:
  แก้คำ
  เป้าหมาย: แก้ไขบัค+เพิ่มcolumn เป้าหมายย่อย
  แก้คำ

# Conflicts:
#	src/modules/15_development/components/scholarship/DetailView.vue
#	src/modules/15_development/views/Scholarship.vue
This commit is contained in:
Warunee Tamkoo 2024-04-18 11:26:21 +07:00
commit 9e69d7388f
2 changed files with 39 additions and 21 deletions

View file

@ -21,7 +21,6 @@ import type {
import DialogHeader from "@/components/DialogHeader.vue";
import { useDevelopmentDataStore } from "@/modules/15_development/store/developmentStore";
import { useCounterMixin } from "@/stores/mixin";
const route = useRoute();
const projectId = ref<string>(route.params.id.toLocaleString());
@ -42,6 +41,16 @@ const columnsPlannedGoals = ref<QTableProps["columns"]>([
style: "font-size: 14px",
format: (val) => convertNameGoals(val),
},
{
name: "groupTargetSub",
align: "left",
label: "กลุ่มเป้าหมายย่อย",
sortable: true,
field: "groupTargetSub",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (val) => convertNameSubGoals(val),
},
{
name: "posTypePlannedId",
align: "left",
@ -75,6 +84,16 @@ const columnsActualGoals = ref<QTableProps["columns"]>([
style: "font-size: 14px",
format: (val) => convertNameGoals(val),
},
{
name: "groupTargetSub",
align: "left",
label: "กลุ่มเป้าหมายย่อย",
sortable: true,
field: "groupTargetSub",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
format: (val) => convertNameSubGoals(val),
},
{
name: "posTypeActualId",
align: "left",
@ -83,9 +102,7 @@ const columnsActualGoals = ref<QTableProps["columns"]>([
field: "posTypeActualId",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
// format: (val) => convertTypeGoals(val),
},
{
name: "amount",
align: "left",
@ -248,12 +265,18 @@ async function onSubmitGroup() {
{
groupTarget: formGroupTarget.groupTarget,
groupTargetSub: formGroupTarget.groupTargetSub,
positions: formGroupTarget.positions.map((v) => ({
position: v.position ? v.position : "",
posTypePlannedId: v.posTypeId ? v.posTypeId : "",
posLevelPlannedId: v.posLevelId ? v.posLevelId : "",
})),
type: formGroupTarget.type ? formGroupTarget.type : "",
positions:
formGroupTarget.groupTarget !== "OUTSIDERS"
? formGroupTarget.positions.map((v) => ({
position: v.position ? v.position : "",
posTypePlannedId: v.posTypeId ? v.posTypeId : "",
posLevelPlannedId: v.posLevelId ? v.posLevelId : "",
}))
: [],
type:
formGroupTarget.groupTarget === "OUTSIDERS"
? formGroupTarget.type
: "",
amount: formGroupTarget.amount,
}
)
@ -416,6 +439,11 @@ function convertNameGoals(id: string) {
return data && data?.name;
}
function convertNameSubGoals(id: string) {
const data = groupSubOp.value.find((e: DataOption) => e.id === id);
return data && data?.name;
}
function convertNamePeoples(id: string) {
const data = peoplesOp.value.find((e: DataOption) => e.id === id);
return data && data?.name;
@ -665,16 +693,6 @@ onMounted(() => {
<div v-else class="table_ellipsis">
{{ col.value ? col.value : "-" }}
</div>
<!-- <div
v-if="col.name === 'posTypeActualId'"
class="table_ellipsis"
>
{{
props.row.posTypeActualId !== null
? convertTypeGoals(props.row)
: props.row.type
}}
</div> -->
<div v-else class="table_ellipsis">
{{ col.value ? col.value : "-" }}
</div>

View file

@ -719,11 +719,11 @@ onMounted(() => {
outlined
class="inputgreen"
v-model="formBody.bookNo"
label="เลขที่หนังสออนุมัติ"
label="เลขที่หนังสออนุมัติ"
hide-bottom-space
:rules="[
(val: string) =>
!!val || `${'กรุณากรอกเลขที่หนังสออนุมัติ'}`,
!!val || `${'กรุณากรอกเลขที่หนังสออนุมัติ'}`,
]"
/>
</div>