@@ -130,18 +130,6 @@ class _NotificationCardState extends State<NotificationCard> {
130130 || (user.clubAuthorityTypes != null && user.clubAuthorityTypes! .contains (authority));
131131 }
132132
133- Future <bool > _isReservationRequest (String reservationId) async {
134- ReservationModel reservation = await ReservationApiService .getReservation (reservationId: int .parse (reservationId));
135-
136- // 승인된 예약(status = CONFIRMED)인데 내 예약이 아닌 경우
137- if (reservation.status == "REQUEST"
138- || reservation.clubMemberId != MemberController .to.clubMember ().id) {
139- return true ;
140- }
141-
142- return false ;
143- }
144-
145133 Future <bool > _isPastReservation (String reservationId) async {
146134 ReservationModel reservation = await ReservationApiService .getReservation (reservationId: int .parse (reservationId));
147135
@@ -200,13 +188,11 @@ class _NotificationCardState extends State<NotificationCard> {
200188 }
201189
202190 Future <void > _handleReservationRequestNotification () async {
203- String reservationId = widget.info! ;
204-
205191 if (hasAuthority ("SCHEDULE_ALL" )) { // 권한 변경 후에도 들어가는거 방지
206192 // 예약 요청 -> 예약 관리 - 승인된 이후에도 동일하게
193+ String reservationId = widget.info! ;
207194 _toReservationManagePage (reservationId: reservationId, isReturned: null );
208195 }
209-
210196 }
211197
212198 void _handleReservationRejectNotification () {
@@ -241,9 +227,11 @@ class _NotificationCardState extends State<NotificationCard> {
241227 }
242228
243229 Future <void > _handleReturnInfoNotification () async {
244- // 반납 메시지 도착 -> 예약 요청 > 승인한 예약
245- String reservationId = widget.info! ;
246- _toReservationManagePage (reservationId: reservationId, isReturned: true );
230+ if (hasAuthority ("RETURN_MSG_READ" )) {
231+ // 반납 메시지 도착 -> 예약 요청 > 승인한 예약
232+ String reservationId = widget.info! ;
233+ _toReservationManagePage (reservationId: reservationId, isReturned: true );
234+ }
247235 }
248236
249237 Future <void > _toReservationManagePage ({required String reservationId, required bool ? isReturned}) async {
0 commit comments