@@ -17,8 +17,10 @@ class event_dto {
17
17
private $ startTime ;
18
18
private $ endTime ;
19
19
private $ location ;
20
+ private $ attend ;
21
+ private $ purchaseStatus ;
20
22
21
- public function __construct ($ eventId , $ title , $ gender , $ money , $ description , $ startTime , $ endTime , $ location ) {
23
+ public function __construct ($ eventId , $ title , $ gender , $ money , $ description , $ startTime , $ endTime , $ location, $ attend , $ purchaseStatus ) {
22
24
$ this ->eventId = $ eventId ;
23
25
$ this ->title = $ title ;
24
26
$ this ->gender = $ gender ;
@@ -27,6 +29,8 @@ public function __construct($eventId, $title, $gender, $money, $description, $st
27
29
$ this ->startTime = $ startTime ;
28
30
$ this ->endTime = $ endTime ;
29
31
$ this ->location = $ location ;
32
+ $ this ->attend = $ attend ;
33
+ $ this ->purchaseStatus = $ purchaseStatus ;
30
34
}
31
35
public function get_event_id () {
32
36
return $ this ->eventId ;
@@ -81,9 +85,15 @@ public function get_event_endTime() {
81
85
public function get_event_location () {
82
86
return $ this ->location ;
83
87
}
88
+ public function get_event_attend () {
89
+ return $ this ->attend ;
90
+ }
91
+ public function get_event_purchaseStatus () {
92
+ return $ this ->purchaseStatus ;
93
+ }
84
94
85
95
}
86
- $ event_dto = new event_dto ($ get_event ['readResult ' ]['eventId ' ], $ get_event ['readResult ' ]['title ' ], $ get_event ['readResult ' ]['gender ' ], $ get_event ['readResult ' ]['money ' ], $ get_event ['readResult ' ]['description ' ], $ get_event ['readResult ' ]['startTime ' ], $ get_event ['readResult ' ]['endTime ' ], $ get_event ['readResult ' ]['location ' ]);
96
+ $ event_dto = new event_dto ($ get_event ['readResult ' ]['eventId ' ], $ get_event ['readResult ' ]['title ' ], $ get_event ['readResult ' ]['gender ' ], $ get_event ['readResult ' ]['money ' ], $ get_event ['readResult ' ]['description ' ], $ get_event ['readResult ' ]['startTime ' ], $ get_event ['readResult ' ]['endTime ' ], $ get_event ['readResult ' ]['location ' ], $ get_event [ ' readResult ' ][ ' attend ' ], $ get_event [ ' readResult ' ][ ' purchaseStatus ' ] );
87
97
$ event_dto_id = $ event_dto ->get_event_id ();
88
98
$ event_dto_title = $ event_dto ->get_event_title ();
89
99
$ event_dto_gender = $ event_dto ->get_event_gender ();
@@ -92,6 +102,8 @@ public function get_event_location() {
92
102
$ event_dto_startTime = $ event_dto ->get_event_startTime ();
93
103
$ event_dto_endTime = $ event_dto ->get_event_endTime ();
94
104
$ event_dto_location = $ event_dto ->get_event_location ();
105
+ $ event_dto_attend = $ event_dto ->get_event_attend ();
106
+ $ event_dto_purchaseStatus = $ event_dto ->get_event_purchaseStatus ();
95
107
if ($ event_dto_gender == 'MALE ' ) {
96
108
$ event_dto_gender = '남자 경기 ' ;
97
109
} elseif ($ event_dto_gender == 'FEMALE ' ) {
@@ -161,13 +173,29 @@ function comparePlayers($player1, $player2) {
161
173
</div>
162
174
<div class="member_check_wrap">
163
175
<div class="member_check">
164
- <a href="javascript:;" onclick="attendance_check()" class="attendance_check">
165
- <div class="icon"><i class="fa-solid fa-user-check"></i></div>
166
- <div class="attendance_check_txt"><p>출석 확인</p></div>
176
+ <a href="javascript:;" onclick="attendance_check()" class="attendance_check <?= $ event_dto_attend == 'LATE ' ? 'attendance_check_late ' : '' ?> ">
177
+ <?php if ($ event_dto_attend == 'ATTEND ' ) { ?>
178
+ <div class="icon"><i class="fa-solid fa-user-check"></i></div>
179
+ <div class="attendance_check_txt"><p>출석 완료</p></div>
180
+ <?php } elseif ($ event_dto_attend == 'LATE ' ) { ?>
181
+ <div class="icon"><i class="fa-solid fa-user-clock"></i></div>
182
+ <div class="attendance_check_txt"><p>지각 완료</p></div>
183
+ <?php } else { ?>
184
+ <div class="icon"><i class="fa-solid fa-user-xmark"></i></div>
185
+ <div class="attendance_check_txt"><p>출석 확인</p></div>
186
+ <?php } ?>
167
187
</a>
168
188
<a href="javascript:;" onclick="purchasereq_check()" class="expenses_check">
189
+ <?php if ($ event_dto_purchaseStatus == 'PURCHASED ' ) { ?>
190
+ <div class="icon"><i class="fa-solid fa-dollar-sign"></i></div>
191
+ <div class="expenses_check_txt"><p>납부 완료</p></div>
192
+ <?php } elseif ($ event_dto_purchaseStatus == 'WAITING ' ) { ?>
193
+ <div class="icon"><i class="fa-solid fa-spinner"></i></div>
194
+ <div class="expenses_check_txt"><p>납부 확인중</p></div>
195
+ <?php } else { ?>
169
196
<div class="icon"><i class="fa-solid fa-hand-holding-dollar"></i></div>
170
197
<div class="expenses_check_txt"><p>납부 확인</p></div>
198
+ <?php } ?>
171
199
</a>
172
200
<a href="javascript:;" onclick="player_check_lity();" class="player_check">
173
201
<div class="icon"><i class="fa-solid fa-user"></i></div>
@@ -236,13 +264,15 @@ function attendance_check() {
236
264
navigator.geolocation.getCurrentPosition(function(position) {
237
265
var latitude = position.coords.latitude; // 위도
238
266
var longitude = position.coords.longitude; // 경도
267
+ console.log('위도 :' + latitude + ' / 경도 : '+ longitude);
239
268
$.ajax({
240
269
url: '../view_control/attendance_check',
241
270
method: 'POST',
242
271
data: { eventId: <?= $ event_dto_id?> , latitude: latitude, longitude: longitude },
243
272
success: function(response) {
244
273
loading_page(false);
245
274
alert(response);
275
+ location.reload();
246
276
}
247
277
});
248
278
}, function(error) {
@@ -251,6 +281,10 @@ function attendance_check() {
251
281
} else {
252
282
alert("위치 정보를 가져오는 중 오류가 발생했습니다.");
253
283
}
284
+ },
285
+ {
286
+ enableHighAccuracy: true,
287
+ timeout: Infinity,
254
288
});
255
289
} else {
256
290
loading_page(false);
@@ -266,6 +300,7 @@ function purchasereq_check() {
266
300
success: function(response) {
267
301
loading_page(false);
268
302
alert(response);
303
+ location.reload();
269
304
}
270
305
});
271
306
}
0 commit comments