Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m21s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m21s
This commit is contained in:
commit
d00d4ac692
1 changed files with 11 additions and 13 deletions
|
|
@ -14,7 +14,7 @@ export const useCounterMixin = defineStore("mixin", () => {
|
|||
const calAge = (
|
||||
srcDate: Date,
|
||||
birthCal: Date = new Date(),
|
||||
eng: boolean = false
|
||||
eng: boolean = false,
|
||||
) => {
|
||||
const year = eng ? "years" : "ปี";
|
||||
const month = eng ? "months" : "เดือน";
|
||||
|
|
@ -82,7 +82,7 @@ export const useCounterMixin = defineStore("mixin", () => {
|
|||
function date2Thai(
|
||||
srcDate: Date | null,
|
||||
isFullMonth: boolean = false,
|
||||
isTime: boolean = false
|
||||
isTime: boolean = false,
|
||||
) {
|
||||
if (srcDate == null || !moment(srcDate).isValid()) return "";
|
||||
|
||||
|
|
@ -98,7 +98,7 @@ export const useCounterMixin = defineStore("mixin", () => {
|
|||
function dateThai(
|
||||
srcDate: Date,
|
||||
isFullMonth: boolean = true,
|
||||
isTime: boolean = false
|
||||
isTime: boolean = false,
|
||||
) {
|
||||
if (srcDate == null) {
|
||||
return null;
|
||||
|
|
@ -490,7 +490,7 @@ export const useCounterMixin = defineStore("mixin", () => {
|
|||
color: string | undefined,
|
||||
ok?: Function | undefined,
|
||||
cancel?: Function | undefined,
|
||||
onlycancel: Boolean = false
|
||||
onlycancel: Boolean = false,
|
||||
) => {
|
||||
q.dialog({
|
||||
component: CustomComponent,
|
||||
|
|
@ -529,7 +529,7 @@ export const useCounterMixin = defineStore("mixin", () => {
|
|||
title: string,
|
||||
message: string,
|
||||
ok: Function,
|
||||
cancel?: Function
|
||||
cancel?: Function,
|
||||
) {
|
||||
q.dialog({
|
||||
title: `<span class="text-red">${title}</span>`,
|
||||
|
|
@ -559,7 +559,7 @@ export const useCounterMixin = defineStore("mixin", () => {
|
|||
title: string,
|
||||
message: string,
|
||||
ok: Function,
|
||||
cancel?: Function
|
||||
cancel?: Function,
|
||||
) {
|
||||
q.dialog({
|
||||
title: `<span class="text-primary">${title}</span>`,
|
||||
|
|
@ -795,7 +795,7 @@ export const useCounterMixin = defineStore("mixin", () => {
|
|||
ok?: Function,
|
||||
title?: string, // ถ้ามี cancel action ใส่เป็น null
|
||||
desc?: string, // ถ้ามี cancel action ใส่เป็น null
|
||||
cancel?: Function
|
||||
cancel?: Function,
|
||||
) => {
|
||||
q.dialog({
|
||||
component: CustomComponent,
|
||||
|
|
@ -824,7 +824,7 @@ export const useCounterMixin = defineStore("mixin", () => {
|
|||
ok?: Function,
|
||||
title?: string, // ถ้ามี cancel action ใส่เป็น null
|
||||
desc?: string, // ถ้ามี cancel action ใส่เป็น null
|
||||
cancel?: Function
|
||||
cancel?: Function,
|
||||
) => {
|
||||
q.dialog({
|
||||
component: CustomComponent,
|
||||
|
|
@ -851,7 +851,7 @@ export const useCounterMixin = defineStore("mixin", () => {
|
|||
const dialogMessageNotify = (
|
||||
q: any,
|
||||
desc?: string, // ถ้ามี cancel action ใส่เป็น null
|
||||
cancel?: Function
|
||||
cancel?: Function,
|
||||
) => {
|
||||
q.dialog({
|
||||
component: CustomComponent,
|
||||
|
|
@ -973,7 +973,7 @@ export const useCounterMixin = defineStore("mixin", () => {
|
|||
* @returns ผลการคำนวน ปี เดือน วัน ในรูปแบบ 1 ปี 10 เดือน 5 วัน
|
||||
*/
|
||||
function calculateDurationYmd(startDate: any, endDate: any) {
|
||||
if (!startDate || !endDate) return "";
|
||||
if (!startDate || !endDate) return "";
|
||||
|
||||
let start = moment(startDate).startOf("day");
|
||||
let end = moment(endDate).startOf("day").add(1, "day");
|
||||
|
|
@ -1252,9 +1252,7 @@ export const useCounterMixin = defineStore("mixin", () => {
|
|||
|
||||
// กรณีมีเฉพาะ date
|
||||
function convertDateToAPI(date: Date | null) {
|
||||
return date
|
||||
? format(utcToZonedTime(date, "Asia/Bangkok"), "yyyy-MM-dd")
|
||||
: null;
|
||||
return date ? format(date, "yyyy-MM-dd") : null;
|
||||
}
|
||||
|
||||
// กรณี datetime
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue