-
Notifications
You must be signed in to change notification settings - Fork 0
Clap-248 담당자 요청 승인 API 연결 #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 11 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
b37fd11
:sparkles: [feat] : 경로 연결 후 아이디 파라미터 가져오기
Minkyu0424 0fab5e8
:sparkles: [feat] : 카테고리 가져오기 및 적용
Minkyu0424 449debf
:sparkles: [feat] : ISO 타입으로 날짜 변환 함수
Minkyu0424 15399f1
:sparkles: [feat] : 구분 조회 api 연결 요청 승인 api연결
Minkyu0424 917b1af
:recycle: [refactor] : 불필요 목데이터 삭제
Minkyu0424 d85412d
:sparkles: [feat] : 구분 선택 드롭다운
Minkyu0424 129f14d
:recycle: [refactor] : 처리자, 구분 타입 수정
Minkyu0424 bd35ed2
:recycle: [refactor] : 중복되는 라벨 데이터 타입제거
Minkyu0424 eb9f989
:recycle: [refactor] : 요청 승인 연결 및 필수 제외값 분류
Minkyu0424 9c90c71
Merge branch 'develop' of https://github.com/TaskFlow-CLAP/TaskFlow-F…
Minkyu0424 a32dc8f
:recycle: [refactor] : 요청 승인 후 값들 초기화 진행
Minkyu0424 05dfc4c
:recycle: [refactor] : 미적용 스타일링, text-base제거
Minkyu0424 9b930e8
:twisted_rightwards_arrows: [fix] : 191 브랜치 카테고리 api 사용을 위한 pull
Minkyu0424 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,32 @@ | ||
| import { formDataAxiosInstance } from '@/utils/axios' | ||
| import type { RequestApprovePostTypes } from '@/types/manager' | ||
| import { axiosInstance, formDataAxiosInstance } from '@/utils/axios' | ||
|
|
||
| export const postTaskRequest = async (formdata: FormData) => { | ||
| const response = await formDataAxiosInstance.post('/api/tasks', formdata) | ||
| return response.data | ||
| } | ||
|
|
||
| export const getTaskDetailUser = async (id: number) => { | ||
| const response = await formDataAxiosInstance.get(`/api/tasks/${id}/requests/details`) | ||
| const response = await axiosInstance.get(`/api/tasks/${id}/requests/details`) | ||
| return response.data | ||
| } | ||
|
|
||
| export const getTaskDetailManager = async (id: number) => { | ||
| const response = await formDataAxiosInstance.get(`/api/tasks/${id}/details`) | ||
| const response = await axiosInstance.get(`/api/tasks/${id}/details`) | ||
| return response.data | ||
| } | ||
|
|
||
| export const getLabelsManager = async () => { | ||
| const response = await axiosInstance.get('/api/labels?page=0&size=5') | ||
| return response.data | ||
| } | ||
|
|
||
| export const postTaskApprove = async (id: number, data: RequestApprovePostTypes) => { | ||
| const response = await axiosInstance.post(`/api/tasks/${id}/approval`, data) | ||
| return response.data | ||
| } | ||
|
|
||
| export const getManager = async () => { | ||
| const response = await axiosInstance.get('/api/managers') | ||
| return response.data | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,23 @@ | ||
| <template> | ||
| <input | ||
| :type="inputType" | ||
| :v-model="modelValue" | ||
| :value="modelValue" | ||
| class="w-full border border-gray-300 rounded px-3 py-2 cursor-pointer focus:outline-none text-center text-black" | ||
| @focus="e => (e.target as HTMLInputElement).showPicker()" /> | ||
| @focus="e => (e.target as HTMLInputElement).showPicker()" | ||
| @input="updateValue(($event.target as HTMLInputElement).value)" /> | ||
| </template> | ||
|
|
||
| <script lang="ts" setup> | ||
| import type { DueDateInputProps } from '@/types/common' | ||
| import { defineProps } from 'vue' | ||
| import { defineEmits, defineProps, onMounted } from 'vue' | ||
|
|
||
| const { modelValue, inputType } = defineProps<DueDateInputProps>() | ||
| const emit = defineEmits(['update:modelValue']) | ||
| const updateValue = (value: string) => { | ||
| emit('update:modelValue', value) | ||
| } | ||
|
|
||
| onMounted(() => { | ||
| emit('update:modelValue', null) | ||
| }) | ||
| </script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| <template> | ||
| <div> | ||
| <div class="text-xs mb-2 text-body font-bold">구분</div> | ||
| <div class="relative flex text-base"> | ||
| <div | ||
| class="flex w-full h-11 items-center rounded p-4 bg-white border border-border-1 cursor-pointer text-black" | ||
| @click="toggleDropdown"> | ||
| <p :class="{ 'text-disabled': !modelValue }"> | ||
| {{ modelValue?.labelName || placeholderText }} | ||
| </p> | ||
| <CommonIcons | ||
| :name="dropdownIcon" | ||
| :class="['ml-auto', { 'rotate-180': dropdownOpen }]" /> | ||
| </div> | ||
| <div | ||
| v-if="dropdownOpen" | ||
| class="absolute w-full h-40 overflow-y-auto top-[52px] flex flex-col gap-2 p-2 bg-white rounded z-10 shadow border-t border-t-border-2 text-black"> | ||
| <div | ||
| v-for="option in labelArr" | ||
| :key="option.labelId" | ||
| class="w-full flex items-center h-11 p-2 rounded hover:bg-background-2 cursor-pointer" | ||
| @click="selectOption(option)"> | ||
| {{ option.labelName }} | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </template> | ||
|
|
||
| <script lang="ts" setup> | ||
| import { getLabelsManager } from '@/api/user' | ||
| import { dropdownIcon } from '@/constants/iconPath' | ||
| import type { LabelDataTypes } from '@/types/common' | ||
| import type { LabelDropdownProps } from '@/types/user' | ||
| import { onMounted, ref } from 'vue' | ||
| import CommonIcons from '../common/CommonIcons.vue' | ||
|
|
||
| const { modelValue, placeholderText } = defineProps<LabelDropdownProps>() | ||
| const emit = defineEmits(['update:modelValue']) | ||
| const dropdownOpen = ref(false) | ||
|
|
||
| const labelArr = ref<LabelDataTypes[]>([]) | ||
|
|
||
| onMounted(async () => { | ||
| emit('update:modelValue', null) | ||
| labelArr.value = await getLabelsManager() | ||
| }) | ||
| const toggleDropdown = () => { | ||
| dropdownOpen.value = !dropdownOpen.value | ||
| } | ||
|
|
||
| const selectOption = (option: LabelDataTypes) => { | ||
| emit('update:modelValue', option) | ||
| dropdownOpen.value = false | ||
| } | ||
| </script> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| <template> | ||
| <div> | ||
| <div class="flex text-xs gap-x-1 mb-2"> | ||
| <p class="text-disabled font-bold">담당자 변경</p> | ||
| <p class="text-red-1">*</p> | ||
| <p | ||
| v-if="isInvalidateState === 'manager'" | ||
| class="text-red-1"> | ||
| 담당자를 선택해주세요 | ||
| </p> | ||
| </div> | ||
| <div class="relative flex text-base"> | ||
| <div | ||
| class="request-task-dropdown" | ||
| @click="toggleDropdown"> | ||
| <div class="flex gap-2 items-center"> | ||
| <div | ||
| v-if="modelValue" | ||
| class="w-6 h-6 rounded-full overflow-hidden"> | ||
| <img | ||
| :src="modelValue?.imageUrl || '/images/mockProfile.jpg'" | ||
| alt="userProfile" /> | ||
| </div> | ||
| <p :class="{ 'text-disabled': !modelValue }"> | ||
| {{ modelValue?.nickname || placeholderText }} | ||
| </p> | ||
| </div> | ||
| <CommonIcons | ||
| :name="dropdownIcon" | ||
| :class="['ml-auto', { 'rotate-180': dropdownOpen }]" /> | ||
| </div> | ||
| <div | ||
| v-if="dropdownOpen" | ||
| class="request-task-dropdown-option-list"> | ||
| <div | ||
| v-for="option in managerArr" | ||
| :key="option.memberId" | ||
| class="request-task-dropdown-option justify-between" | ||
| @click="selectOption(option)"> | ||
| <div class="flex gap-2"> | ||
| <div class="w-6 h-6 rounded-full overflow-hidden"> | ||
| <img | ||
| :src="option.imageUrl || '/images/mockProfile.jpg'" | ||
| alt="userProfile" /> | ||
| </div> | ||
| <p> | ||
| {{ option.nickname }} | ||
| </p> | ||
| </div> | ||
| <p class="text-primary1 text-xs">잔여 작업 : {{ option.remainingTasks }}</p> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </template> | ||
|
|
||
| <script lang="ts" setup> | ||
| import { getManager } from '@/api/user' | ||
| import { dropdownIcon } from '@/constants/iconPath' | ||
| import type { ManagerTypes } from '@/types/manager' | ||
| import type { ManagerDropdownProps } from '@/types/user' | ||
| import { computed, onMounted, ref } from 'vue' | ||
| import CommonIcons from '../common/CommonIcons.vue' | ||
|
|
||
| const { placeholderText, modelValue, isInvalidate } = defineProps<ManagerDropdownProps>() | ||
| const emit = defineEmits(['update:modelValue']) | ||
| const dropdownOpen = ref(false) | ||
| const managerArr = ref<ManagerTypes[]>([]) | ||
| const isInvalidateState = computed(() => isInvalidate) | ||
|
|
||
| onMounted(async () => { | ||
| emit('update:modelValue', null) | ||
| managerArr.value = await getManager() | ||
| }) | ||
|
|
||
| const toggleDropdown = () => { | ||
| dropdownOpen.value = !dropdownOpen.value | ||
| } | ||
|
|
||
| const selectOption = (option: ManagerTypes) => { | ||
| emit('update:modelValue', option) | ||
| dropdownOpen.value = false | ||
| } | ||
| </script> |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.