Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f054dd54a4 | ||
|
|
34d39c7215 |
3 changed files with 12 additions and 4 deletions
|
|
@ -228,7 +228,7 @@ const score5 = computed(() => {
|
||||||
Number(other_training_percent.value)) /
|
Number(other_training_percent.value)) /
|
||||||
(isSelectionPartfour.value ? 4 : 3);
|
(isSelectionPartfour.value ? 4 : 3);
|
||||||
|
|
||||||
const total = Math.round(rawTotal);
|
const total = Math.trunc(rawTotal);
|
||||||
|
|
||||||
develop_result.value = total > 60 ? 1 : 0;
|
develop_result.value = total > 60 ? 1 : 0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -255,7 +255,7 @@ const score5 = computed(() => {
|
||||||
Number(other_training_percent.value)) /
|
Number(other_training_percent.value)) /
|
||||||
(isSelectionPartfour.value ? 4 : 3);
|
(isSelectionPartfour.value ? 4 : 3);
|
||||||
|
|
||||||
const total = Math.round(rawTotal);
|
const total = Math.trunc(rawTotal);
|
||||||
|
|
||||||
develop_result.value = total > 60 ? 1 : 0;
|
develop_result.value = total > 60 ? 1 : 0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -362,13 +362,21 @@ export const useCounterMixin = defineStore("mixin", () => {
|
||||||
const messageError = (q: any, e: any = "", msg: string = "") => {
|
const messageError = (q: any, e: any = "", msg: string = "") => {
|
||||||
if (e.response !== undefined) {
|
if (e.response !== undefined) {
|
||||||
if (e.response.data.status !== undefined) {
|
if (e.response.data.status !== undefined) {
|
||||||
if (e.response.data.status == 401) {
|
if (
|
||||||
|
e.response.data.status == 401 ||
|
||||||
|
(e.response.data.status == 404 &&
|
||||||
|
e.response.data.message == "ไม่พบข้อมูลสิทธิ์")
|
||||||
|
) {
|
||||||
//invalid_token
|
//invalid_token
|
||||||
|
const msg =
|
||||||
|
e.response.data.status == 401
|
||||||
|
? "ล็อกอินหมดอายุ กรุณาล็อกอินใหม่อีกครั้ง"
|
||||||
|
: e.response.data.message;
|
||||||
q.dialog({
|
q.dialog({
|
||||||
component: CustomComponent,
|
component: CustomComponent,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
title: `พบข้อผิดพลาด`,
|
title: `พบข้อผิดพลาด`,
|
||||||
message: `ล็อกอินหมดอายุ กรุณาล็อกอินใหม่อีกครั้ง`,
|
message: msg,
|
||||||
icon: "warning",
|
icon: "warning",
|
||||||
color: "red",
|
color: "red",
|
||||||
onlycancel: true,
|
onlycancel: true,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue