From 357fffff2c7a7d5d38489fcd9cc6a2236e24b339 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Fri, 12 Jan 2024 09:53:00 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=AA=E0=B8=B5?= =?UTF-8?q?=E0=B8=9B=E0=B8=8F=E0=B8=B4=E0=B8=97=E0=B8=B4=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CalandarDialog.vue | 26 +++---------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/src/modules/11_discipline/components/3_InvestigateDisciplinary/CalandarDialog.vue b/src/modules/11_discipline/components/3_InvestigateDisciplinary/CalandarDialog.vue index 5dd7e014f..1077f256c 100644 --- a/src/modules/11_discipline/components/3_InvestigateDisciplinary/CalandarDialog.vue +++ b/src/modules/11_discipline/components/3_InvestigateDisciplinary/CalandarDialog.vue @@ -77,23 +77,10 @@ const dateMonth = ref({ year: new Date().getFullYear(), }); -/** function เรียกข่อมูล calendar*/ -function getRandomColor() { - return ( - "hsl(" + - 360 * Math.random() + - "," + - (25 + 70 * Math.random()) + - "%," + - (85 + 10 * Math.random()) + - "%)" - ); -} - async function fetchCalendar() { showLoader(); - const defaultColor = "#E3FDDA"; - const gradientColors = generateGradientColors(props.lists.length); + const defaultColor = "#e3fdda"; + const gradientColors = '#f7d0dd' const events = await props.lists.map( (e: ExtendHistoryObject, index: number) => ({ @@ -104,7 +91,7 @@ async function fetchCalendar() { allDay: false, color: props.lists.length > 1 && index > 0 - ? gradientColors[index] + ? gradientColors : defaultColor, }) ); @@ -120,13 +107,6 @@ async function fetchCalendar() { }, 1000); } -function generateGradientColors(length: number) { - const colors = []; - for (let i = 0; i < length; i++) { - colors.push(getRandomColor()); - } - return colors; -} /** * function convert เดือนปี