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