Compare commits
3 commits
de697a2b8f
...
fbfc801ef9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fbfc801ef9 | ||
|
|
5b1dce3bd8 | ||
|
|
01f47a69b7 |
2 changed files with 44 additions and 8 deletions
|
|
@ -32,7 +32,11 @@ jobs:
|
|||
ca=["/etc/ssl/certs/ca-certificates.crt"]
|
||||
- name: Tag Version
|
||||
run: |
|
||||
echo "IMAGE_VERSION=latest"
|
||||
if [ "${{ github.ref_type }}" == "tag" ]; then
|
||||
echo "IMAGE_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
|
||||
else
|
||||
echo "IMAGE_VERSION=latest" >> $GITHUB_ENV
|
||||
fi
|
||||
- name: Login in to registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -306,7 +306,7 @@ async function fetchDataDetail(id: string) {
|
|||
isStatus.value = data.status;
|
||||
isGov.value = data.citizenId ? true : false;
|
||||
isGuarantor.value = data.guarantorCitizenId ? true : false;
|
||||
if (isStatus.value !== "PENDING") {
|
||||
if (isStatus.value === "GRADUATE" || isStatus.value === "NOTGRADUATE") {
|
||||
router.push(`/development/scholarship-detail/${id}`);
|
||||
}
|
||||
})
|
||||
|
|
@ -678,6 +678,27 @@ async function uploadFileDoc(uploadUrl: string, file: any) {
|
|||
});
|
||||
}
|
||||
|
||||
/** ฟังก์ชั่นแปลงสถานะ */
|
||||
function conventStatus(val: string, type: string) {
|
||||
switch (val) {
|
||||
case "PENDING":
|
||||
if (type === "TRAINING") {
|
||||
return "อยู่ระหว่างฝึกอบรม";
|
||||
} else if (type === "DOMESTICE" || type === "STUDY") {
|
||||
return "อยู่ระหว่างศึกษา";
|
||||
}
|
||||
return "";
|
||||
case "REPORTED":
|
||||
return "รายงานตัวกลับเข้าปฏิบัติราชการแล้ว";
|
||||
case "GRADUATE":
|
||||
return "เรียนจบ";
|
||||
case "NOTGRADUATE":
|
||||
return "เรียนไม่จบ";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
/** ดึงข้อมูลเมื่อคอมโพเนนต์โหลดเสร็จสมบูรณ์ */
|
||||
onMounted(async () => {
|
||||
if (scholarshipId.value) {
|
||||
|
|
@ -772,27 +793,38 @@ onMounted(async () => {
|
|||
</q-menu>
|
||||
</q-btn>
|
||||
</div>
|
||||
<div class="q-gutter-sm" v-if="isStatus === 'REPORTED'">
|
||||
|
||||
<div
|
||||
class="q-gutter-sm"
|
||||
v-if="isStatus === 'REPORTED' && !checkRouteDetail"
|
||||
>
|
||||
<q-btn
|
||||
v-if="!checkRouteDetail"
|
||||
unelevated
|
||||
color="green"
|
||||
label="เรียนจบ"
|
||||
@click="onClickUpdateStatus('GRADUATE')"
|
||||
/>
|
||||
<q-btn
|
||||
v-if="!checkRouteDetail"
|
||||
unelevated
|
||||
color="red"
|
||||
label="เรียนไม่จบ"
|
||||
@click="onClickUpdateStatus('NOTGRADUATE')"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="isStatus === 'GRADUATE' || isStatus === 'NOTGRADUATE'"
|
||||
:class="isStatus === 'GRADUATE' ? 'text-green' : 'text-red'"
|
||||
v-if="
|
||||
checkRouteDetail || isStatus === 'PENDING' || isStatus !== 'REPORTED'
|
||||
"
|
||||
:class="
|
||||
isStatus === 'GRADUATE'
|
||||
? 'text-green'
|
||||
: isStatus === 'NOTGRADUATE'
|
||||
? 'text-red'
|
||||
: ''
|
||||
"
|
||||
>
|
||||
{{ isStatus === "GRADUATE" ? "เรียนจบ" : "เรียนไม่จบ" }}
|
||||
{{ conventStatus(isStatus, formBody.scholarshipType) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue