

231109 김성훈 PICK 취소 수정
@4a4393a4556164930ae91a1c75b3cf2c12ee00c6
--- client/views/pages/user/networking/Matching.vue
+++ client/views/pages/user/networking/Matching.vue
... | ... | @@ -94,6 +94,7 @@ |
94 | 94 |
searchType: null, |
95 | 95 |
searchText: null, |
96 | 96 |
}, |
97 |
+ userCompanyId: null, |
|
97 | 98 |
bestList:[], |
98 | 99 |
companyList:[], |
99 | 100 |
keyword:[], |
... | ... | @@ -121,6 +122,7 @@ |
121 | 122 |
vm.companyListCount = response.data.companySelectListCount; |
122 | 123 |
vm.companyIdx = vm.companyListCount - (vm.companyListSearch.currentPage - 1) * vm.companyListSearch.perPage; |
123 | 124 |
vm.companyTop6List = response.data.companyTop6; |
125 |
+ vm.userCompanyId = response.data.userCompanyId; |
|
124 | 126 |
|
125 | 127 |
for( let i = 0; i < vm.companyList.length; i++) { |
126 | 128 |
vm.keyword = vm.companyList[i].keyword.split('#',4); |
... | ... | @@ -136,9 +138,15 @@ |
136 | 138 |
}, |
137 | 139 |
|
138 | 140 |
pickModal: function(item) { |
139 |
- if(confirm(item.company_nm + "에 PICK 신청을 하시겠습니까?")) { |
|
141 |
+ |
|
142 |
+ if(this.userCompanyId != item.company_id) { |
|
143 |
+ if(confirm(item.company_nm + "에 PICK 신청을 하시겠습니까?")) { |
|
140 | 144 |
this.pick(item) |
145 |
+ } |
|
146 |
+ } else { |
|
147 |
+ alert("자신의 기업에는 PICK을 할 수 없습니다.") |
|
141 | 148 |
} |
149 |
+ |
|
142 | 150 |
}, |
143 | 151 |
|
144 | 152 |
pickCancelModal: function(item) { |
... | ... | @@ -149,7 +157,7 @@ |
149 | 157 |
|
150 | 158 |
pick: function(item) { |
151 | 159 |
const vm = this; |
152 |
- |
|
160 |
+ |
|
153 | 161 |
axios({ |
154 | 162 |
url: '/matching/pick.json', |
155 | 163 |
method: 'post', |
... | ... | @@ -177,13 +185,8 @@ |
177 | 185 |
}, |
178 | 186 |
data: item |
179 | 187 |
}).then(function(response) { |
180 |
- if(response.data > 0) { |
|
181 |
- alert("PICK 취소 완료 되었습니다.") |
|
182 |
- vm.companySelectList(); |
|
183 |
- } else { |
|
184 |
- alert("이미 취소된 PICK입니다.") |
|
185 |
- } |
|
186 |
- |
|
188 |
+ alert(response.data); |
|
189 |
+ vm.companySelectList(); |
|
187 | 190 |
}).catch(function(error) { |
188 | 191 |
console.log('error - ', error) |
189 | 192 |
alert('기업 목록 조회 오류, 관리자에게 문의하세요.'); |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?