Merge branch 'develop' into nice_dev

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-01-12 09:57:02 +07:00
commit 9b4b5010c7
2 changed files with 5 additions and 25 deletions

View file

@ -231,7 +231,7 @@
</q-item-section>
<q-item-section>ใหออกจากราชการ</q-item-section>
</q-item>
<q-separator />
<!-- <q-separator />
<q-item
clickable
v-close-popup
@ -252,7 +252,7 @@
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
</q-item-section>
<q-item-section>ไลออกจากราชการ</q-item-section>
</q-item>
</q-item> -->
<q-separator />
<q-item
clickable

View file

@ -77,23 +77,10 @@ const dateMonth = ref<DataDateMonthObject>({
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 เดอนป