+
+
+ *หมายเหตุ คลิกลงเวลาเข้างานแล้วระบบจะลงเวลาทันที
+
@@ -259,23 +260,26 @@ import { ref, onMounted } from "vue";
import { useCounterMixin } from "@/stores/mixin";
import { useRouter } from "vue-router";
import moment, { Moment } from "moment";
+import type { FormRef } from "@/modules/checkin/interface/response/checkin";
const mixin = useCounterMixin();
const { date2Thai } = mixin;
const router = useRouter();
-const dateNow = ref(new Date());
-const Thai = ref(dateNow.value);
+const dateNow = ref
(new Date());
+const Thai = ref(date2Thai(dateNow.value));
const checkIn = ref(true); //เช็คการเช็คอิน ถ้าลงเวลาครั้งแรกเป็นเช็คอิน(สีเขียว) true แต่ถ้าครั้ง 2 เป็นเช็คเอ้าท์(สีแดง)
-const location = ref("สำนักงาน ก.ก");
-const coordinates = ref("13° 43’ 45” N 100° 31’ 26” E");
-const workplace = ref("in-place");
-const model = ref(null);
-const options = ref([
+const location = ref("สำนักงาน ก.ก");
+const coordinates = ref("13° 43’ 45” N 100° 31’ 26” E");
+const workplace = ref("in-place");
+const useLocation = ref("");
+const model = ref("");
+const options = ref([
"ปฏิบัติงานที่บ้าน",
"ลืมลงเวลาปฏิบัติงาน",
"ไปประชุม/อบรม/สัมมนา/ปฏิบัติงานที่บ้านนอกสถานที่",
"ขออนุญาตออกนอกสถานที่",
+ "อื่นๆ",
]);
const camera = ref(false);
@@ -285,12 +289,14 @@ const mediaStream = ref(null);
const video = ref(null);
const canvas = ref(null);
const hasPhoto = ref(true);
-const img = ref();
+const img = ref(null);
-const videoWidth = ref(335);
-const videoHeight = ref(350);
-const canvasWidth = ref(335);
-const canvasHeight = ref(350);
+const useLocationRef = ref