휴가 사원리스트추가
This commit is contained in:
parent
024807ccda
commit
e4455e94e5
@ -12,7 +12,7 @@
|
|||||||
@click="toggleDisable(index)"
|
@click="toggleDisable(index)"
|
||||||
data-bs-toggle="tooltip"
|
data-bs-toggle="tooltip"
|
||||||
data-popup="tooltip-custom"
|
data-popup="tooltip-custom"
|
||||||
data-bs-placement="top"
|
data-bs-placement="bottom"
|
||||||
:aria-label="user.MEMBERSEQ"
|
:aria-label="user.MEMBERSEQ"
|
||||||
:data-bs-original-title="getTooltipTitle(user)"
|
:data-bs-original-title="getTooltipTitle(user)"
|
||||||
>
|
>
|
||||||
@ -41,11 +41,10 @@
|
|||||||
const emit = defineEmits();
|
const emit = defineEmits();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const userList = ref([]);
|
const userList = ref([]);
|
||||||
const userListContainer = ref(null); // 프로필 목록 컨테이너 참조
|
const userListContainer = ref(null);
|
||||||
const baseUrl = $api.defaults.baseURL.replace(/api\/$/, "");
|
const baseUrl = $api.defaults.baseURL.replace(/api\/$/, "");
|
||||||
const defaultProfile = "/img/icons/icon.png"; // 기본 이미지 경로
|
const defaultProfile = "/img/icons/icon.png";
|
||||||
|
|
||||||
// ✅ 사용자 목록 호출
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await userStore.fetchUserList();
|
await userStore.fetchUserList();
|
||||||
userList.value = userStore.userList;
|
userList.value = userStore.userList;
|
||||||
@ -57,77 +56,78 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// ✅ 프로필 이미지 경로 반환
|
|
||||||
const getUserProfileImage = (profilePath) => {
|
const getUserProfileImage = (profilePath) => {
|
||||||
return profilePath && profilePath.trim()
|
return profilePath && profilePath.trim()
|
||||||
? `${baseUrl}upload/img/profile/${profilePath}`
|
? `${baseUrl}upload/img/profile/${profilePath}`
|
||||||
: defaultProfile;
|
: defaultProfile;
|
||||||
};
|
};
|
||||||
|
|
||||||
// ✅ 이미지 로딩 오류 처리
|
|
||||||
const setDefaultImage = (event) => {
|
const setDefaultImage = (event) => {
|
||||||
event.target.src = defaultProfile;
|
event.target.src = defaultProfile;
|
||||||
};
|
};
|
||||||
|
|
||||||
// ✅ 이미지 로드 후 깜빡임 방지
|
|
||||||
const showImage = (event) => {
|
const showImage = (event) => {
|
||||||
event.target.style.visibility = "visible";
|
event.target.style.visibility = "visible";
|
||||||
};
|
};
|
||||||
|
|
||||||
// ✅ 툴팁 타이틀 설정
|
|
||||||
const getTooltipTitle = (user) => {
|
const getTooltipTitle = (user) => {
|
||||||
return user.MEMBERSEQ === userList.value.MEMBERSEQ ? "나" : user.MEMBERNAM;
|
return user.MEMBERSEQ === userList.value.MEMBERSEQ ? "나" : user.MEMBERNAM;
|
||||||
};
|
};
|
||||||
|
|
||||||
// ✅ 좌우 스크롤 이동 기능 추가 (한 줄씩 이동)
|
const scrollAmount = 9 * 100;
|
||||||
|
|
||||||
const scrollLeft = () => {
|
const scrollLeft = () => {
|
||||||
userListContainer.value.scrollBy({ left: -userListContainer.value.clientWidth, behavior: "smooth" });
|
userListContainer.value.scrollBy({ left: -scrollAmount, behavior: "smooth" });
|
||||||
};
|
};
|
||||||
|
|
||||||
const scrollRight = () => {
|
const scrollRight = () => {
|
||||||
userListContainer.value.scrollBy({ left: userListContainer.value.clientWidth, behavior: "smooth" });
|
userListContainer.value.scrollBy({ left: scrollAmount, behavior: "smooth" });
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
/* ✅ 전체 프로필 목록 감싸는 영역 */
|
/* ✅ 프로필 리스트 컨테이너 */
|
||||||
.users-list-wrapper {
|
.users-list-wrapper {
|
||||||
|
margin: auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 1250px;
|
max-width: 990px;
|
||||||
margin: auto;
|
margin: 0.2 auto; /* 중앙 정렬 */
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ✅ 스크롤 가능하도록 컨테이너 설정 */
|
/* ✅ 프로필 리스트 */
|
||||||
.users-list-container {
|
.users-list-container {
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
overflow-y: hidden;
|
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
align-items: center;
|
||||||
max-height: 200px; /* 한 줄 이상 넘어가지 않도록 조절 */
|
padding: 0px;
|
||||||
padding: 50px;
|
scrollbar-width: none;
|
||||||
scrollbar-width: none; /* Firefox에서 스크롤바 숨김 */
|
padding-bottom: 50px;
|
||||||
|
padding-top: 30px;
|
||||||
|
left: 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ✅ 스크롤바 숨기기 */
|
/* ✅ 스크롤바 숨기기 */
|
||||||
.users-list-container::-webkit-scrollbar {
|
.users-list-container::-webkit-scrollbar {
|
||||||
display: none; /* Chrome, Safari에서 스크롤바 숨김 */
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ✅ 프로필 목록 */
|
/* ✅ 프로필 목록 */
|
||||||
.users-list {
|
.users-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
gap: 91px; /* 기본 간격 */
|
||||||
gap: 20px; /* 프로필 간격 */
|
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ✅ 프로필 이미지 스타일 */
|
/* ✅ 프로필 이미지 스타일 */
|
||||||
.user-avatar {
|
.user-avatar {
|
||||||
border: 3px solid;
|
border: 3px solid;
|
||||||
width: 100px;
|
width: 110px;
|
||||||
height: 100px;
|
height: 110px;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
transition: transform 0.2s ease-in-out;
|
transition: transform 0.2s ease-in-out;
|
||||||
@ -138,15 +138,15 @@
|
|||||||
transform: scale(1.1);
|
transform: scale(1.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ✅ 툴팁 위치 조정 */
|
/* ✅ 툴팁 위치 조정 (하단 & 오른쪽 정렬) */
|
||||||
.tooltip-custom {
|
.tooltip-custom {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -30px;
|
top: 110%; /* 아래쪽으로 이동 */
|
||||||
left: 50%;
|
left: 60%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
background: rgba(0, 0, 0, 0.75);
|
background: rgba(0, 0, 0, 0.75);
|
||||||
color: white;
|
color: white;
|
||||||
padding: 5px 8px;
|
padding: 5px 10px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@ -160,9 +160,6 @@
|
|||||||
|
|
||||||
/* ✅ 좌우 스크롤 버튼 */
|
/* ✅ 좌우 스크롤 버튼 */
|
||||||
.scroll-btn {
|
.scroll-btn {
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
transform: translateY(-50%);
|
|
||||||
background-color: rgba(0, 0, 0, 0.5);
|
background-color: rgba(0, 0, 0, 0.5);
|
||||||
color: white;
|
color: white;
|
||||||
border: none;
|
border: none;
|
||||||
@ -173,15 +170,53 @@
|
|||||||
transition: background 0.3s ease;
|
transition: background 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ✅ 좌우 버튼 위치 */
|
||||||
.scroll-btn.left {
|
.scroll-btn.left {
|
||||||
left: -40px;
|
left: 0;
|
||||||
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scroll-btn.right {
|
.scroll-btn.right {
|
||||||
right: -40px;
|
right: 0;
|
||||||
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scroll-btn:hover {
|
.scroll-btn:hover {
|
||||||
background-color: rgba(0, 0, 0, 0.8);
|
background-color: rgba(0, 0, 0, 0.8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ✅ 반응형 처리 */
|
||||||
|
@media (max-width: 1024px) {
|
||||||
|
.users-list {
|
||||||
|
gap: 40px; /* 좁은 화면에서는 간격 축소 */
|
||||||
|
}
|
||||||
|
.user-avatar {
|
||||||
|
width: 80px;
|
||||||
|
height: 80px;
|
||||||
|
}
|
||||||
|
.scroll-btn {
|
||||||
|
padding: 8px 12px;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.users-list {
|
||||||
|
gap: 15px;
|
||||||
|
}
|
||||||
|
.user-avatar {
|
||||||
|
width: 70px;
|
||||||
|
height: 70px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 480px) {
|
||||||
|
.users-list {
|
||||||
|
gap: 40px;
|
||||||
|
}
|
||||||
|
.user-avatar {
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -5,23 +5,19 @@
|
|||||||
<div class="row g-0">
|
<div class="row g-0">
|
||||||
<div class="col app-calendar-content">
|
<div class="col app-calendar-content">
|
||||||
<div class="card shadow-none border-0">
|
<div class="card shadow-none border-0">
|
||||||
|
<ProfileList />
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<full-calendar
|
<full-calendar
|
||||||
ref="fullCalendarRef"
|
ref="fullCalendarRef"
|
||||||
:options="calendarOptions"
|
:options="calendarOptions"
|
||||||
class="flatpickr-calendar-only"
|
class="flatpickr-calendar-only"
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<ProfileList />
|
|
||||||
|
|
||||||
<HalfDayButtons
|
<HalfDayButtons
|
||||||
@toggleHalfDay="toggleHalfDay"
|
@toggleHalfDay="toggleHalfDay"
|
||||||
@addVacationRequests="addVacationRequests"
|
@addVacationRequests="addVacationRequests"
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
<br />
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user