|
| 1 | +<template> |
| 2 | + <div class="flex flex-col gap-y-6"> |
| 3 | + <ModalView |
| 4 | + :isOpen="isModalVisible" |
| 5 | + :type="'successType'" |
| 6 | + @close="handleCancel"> |
| 7 | + <template #header> 정보가 수정되었습니다 </template> |
| 8 | + </ModalView> |
| 9 | + |
| 10 | + <div class="profile"> |
| 11 | + <p class="text-body text-xs font-bold">프로필 사진</p> |
| 12 | + <img |
| 13 | + v-if="imageUrl" |
| 14 | + :src="imageUrl" |
| 15 | + alt="프로필 이미지" |
| 16 | + class="w-24 h-24 rounded-full object-cover border mt-3" /> |
| 17 | + <div |
| 18 | + v-else |
| 19 | + class="w-24 h-24 rounded-full bg-background-1 flex items-center justify-center"></div> |
| 20 | + <!-- 파일 업로드 필요 --> |
| 21 | + <p class="mt-3 text-xs text-primary1 font-bold cursor-pointer">변경</p> |
| 22 | + </div> |
| 23 | + |
| 24 | + <div class="flex flex-col"> |
| 25 | + <p class="text-body text-xs font-bold">이름</p> |
| 26 | + <input |
| 27 | + class="input-box h-11 mt-2" |
| 28 | + placeholder="이름을 입력해주세요" |
| 29 | + v-model="memberName" /> |
| 30 | + </div> |
| 31 | + <div class="flex flex-col"> |
| 32 | + <p class="text-body text-xs font-bold">아이디</p> |
| 33 | + <p class="mt-">{{ memberId }}</p> |
| 34 | + </div> |
| 35 | + <div class="flex flex-col"> |
| 36 | + <p class="text-body text-xs font-bold">이메일</p> |
| 37 | + <p class="mt-2">{{ memberEmail }}</p> |
| 38 | + </div> |
| 39 | + <div class="flex flex-col"> |
| 40 | + <p class="text-body text-xs font-bold">부서</p> |
| 41 | + <p class="mt-2">{{ memberDepartment }}</p> |
| 42 | + </div> |
| 43 | + <div class="flex flex-col"> |
| 44 | + <p class="text-body text-xs font-bold">직무</p> |
| 45 | + <p class="mt-2">{{ memberJob }}</p> |
| 46 | + </div> |
| 47 | + <div> |
| 48 | + <p class="text-body text-xs font-bold">알림 수신 여부</p> |
| 49 | + <div class="flex flex-col mt-2 gap-2"> |
| 50 | + <FormCheckbox |
| 51 | + v-model="memberForm.isAgitChecked" |
| 52 | + :checkButtonName="'아지트'" |
| 53 | + :isChecked="memberForm.isAgitChecked" /> |
| 54 | + <FormCheckbox |
| 55 | + v-model="memberForm.isKakaoWorkChecked" |
| 56 | + :checkButtonName="'카카오워크'" |
| 57 | + :isChecked="memberForm.isKakaoWorkChecked" /> |
| 58 | + <FormCheckbox |
| 59 | + v-model="memberForm.isEmailChecked" |
| 60 | + :checkButtonName="'이메일'" |
| 61 | + :isChecked="memberForm.isEmailChecked" /> |
| 62 | + </div> |
| 63 | + </div> |
| 64 | + <div> |
| 65 | + <p class="text-body text-xs font-bold">비밀번호 재설정</p> |
| 66 | + <button |
| 67 | + class="button-medium-secondary mt-2" |
| 68 | + @click="handlePwChange"> |
| 69 | + 재설정하기 |
| 70 | + </button> |
| 71 | + </div> |
| 72 | + |
| 73 | + <FormButtonContainer |
| 74 | + :handleCancel="handleCancel" |
| 75 | + :handleSubmit="handleSubmit" |
| 76 | + cancelText="취소" |
| 77 | + submitText="수정" /> |
| 78 | + </div> |
| 79 | +</template> |
| 80 | + |
| 81 | +<script lang="ts" setup> |
| 82 | +import { ref } from 'vue' |
| 83 | +import { useRouter } from 'vue-router' |
| 84 | +import ModalView from './ModalView.vue' |
| 85 | +import FormButtonContainer from './common/FormButtonContainer.vue' |
| 86 | +import FormCheckbox from './common/FormCheckbox.vue' |
| 87 | +const router = useRouter() |
| 88 | +
|
| 89 | +const memberName = ref('백지연') |
| 90 | +const memberId = ref('Chole.yeon') |
| 91 | +const memberEmail = ref('[email protected]') |
| 92 | +const memberDepartment = ref('인프라팀') |
| 93 | +const memberJob = ref('인프라 아키텍처') |
| 94 | +const imageUrl = ref('../../public/images/mockProfile.jpg') |
| 95 | +const isModalVisible = ref(false) |
| 96 | +
|
| 97 | +const memberForm = ref({ |
| 98 | + isAgitChecked: false, |
| 99 | + isKakaoWorkChecked: false, |
| 100 | + isEmailChecked: false |
| 101 | +}) |
| 102 | +
|
| 103 | +const handleCancel = () => { |
| 104 | + isModalVisible.value = false |
| 105 | +} |
| 106 | +
|
| 107 | +const handleSubmit = () => { |
| 108 | + isModalVisible.value = true |
| 109 | +} |
| 110 | +
|
| 111 | +const handlePwChange = () => { |
| 112 | + router.push('/pw-check') |
| 113 | +} |
| 114 | +</script> |
0 commit comments