휴가 저장
This commit is contained in:
parent
9c47467ba7
commit
3fa7eff7d9
@ -206,24 +206,15 @@ cursor: not-allowed !important;
|
|||||||
.custom-button:hover i {
|
.custom-button:hover i {
|
||||||
color: #ff0800;
|
color: #ff0800;
|
||||||
}
|
}
|
||||||
|
.custom-button:disabled {
|
||||||
|
cursor: not-allowed;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/* 휴가 사원프로필 */
|
/* 휴가 사원프로필 */
|
||||||
.profile-list {
|
.profile-list {
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
gap: 15px;
|
|
||||||
padding: 0;
|
|
||||||
list-style: none;
|
|
||||||
justify-content: flex-start;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.profile-item {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
cursor: pointer;
|
|
||||||
width: calc(33.33% - 10px);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 오전/오후반차,저장버튼 */
|
/* 오전/오후반차,저장버튼 */
|
||||||
/* 버튼 기본 스타일 */
|
/* 버튼 기본 스타일 */
|
||||||
|
|||||||
@ -74,13 +74,17 @@ const usedVacations = computed(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// 받은 휴가
|
// 받은 휴가
|
||||||
const receivedVacations = computed(() =>
|
const receivedVacations = computed(() => {
|
||||||
props.receivedVacations.map((v) => ({
|
const data = props.receivedVacations.flatMap((v) => {
|
||||||
...v,
|
const count = v.received_quota ?? 1;
|
||||||
category: "received",
|
return Array.from({ length: Math.ceil(count) }, (_, i) => ({
|
||||||
}))
|
...v,
|
||||||
);
|
category: "received",
|
||||||
|
_expandIndex: globalCounter++,
|
||||||
|
}));
|
||||||
|
});
|
||||||
|
return data;
|
||||||
|
});
|
||||||
// 필터링
|
// 필터링
|
||||||
const sortedUsedVacationsAsc = computed(() => {
|
const sortedUsedVacationsAsc = computed(() => {
|
||||||
return [...usedVacations.value].sort((a, b) => {
|
return [...usedVacations.value].sort((a, b) => {
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
data-bs-placement="top"
|
data-bs-placement="top"
|
||||||
:aria-label="user.MEMBERSEQ"
|
:aria-label="user.MEMBERSEQ"
|
||||||
>
|
>
|
||||||
<div class="ratio ratio-1x1 mb-2">
|
<div class="ratio ratio-1x1 mb-2 profile-list">
|
||||||
<img
|
<img
|
||||||
class="rounded-circle profile-img"
|
class="rounded-circle profile-img"
|
||||||
:src="getUserProfileImage(user.MEMBERPRF)"
|
:src="getUserProfileImage(user.MEMBERPRF)"
|
||||||
|
|||||||
@ -383,7 +383,9 @@ async function fetchVacationHistory(year) {
|
|||||||
try {
|
try {
|
||||||
const response = await axios.get(`vacation/history?year=${year}`);
|
const response = await axios.get(`vacation/history?year=${year}`);
|
||||||
if (response.status === 200 && response.data) {
|
if (response.status === 200 && response.data) {
|
||||||
|
console.log(response.data.data)
|
||||||
myVacations.value = response.data.data.usedVacations || [];
|
myVacations.value = response.data.data.usedVacations || [];
|
||||||
|
receivedVacations.value = response.data.data.receivedVacations || []
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(`🚨 휴가 데이터 불러오기 실패:`, error);
|
console.error(`🚨 휴가 데이터 불러오기 실패:`, error);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user