def userLoadDashboard(): try: if adminLoginSession() == 'user': pendingComplainCount = 0 repliedComplainCount = 0 loginID = session['session_loginId'] complainDAO = ComplainDAO() complainList = complainDAO.viewComplain(loginID) print('complainList>>>>>', complainList) for i in complainList: if i.complainStatus == 'replied': repliedComplainCount += 1 elif i.complainStatus == 'Pending': pendingComplainCount += 1 feedbackVO = FeedbackVO() feedbackDAO = FeedbackDAO() feedbackVO.feedbackFrom_LoginId = loginID feedbackList = feedbackDAO.viewFeedback(feedbackVO) feedbackCount = len(feedbackList) return render_template('user/index.html', pendingComplainCount=pendingComplainCount, repliedComplainCount=repliedComplainCount, feedbackCount=feedbackCount) else: return adminLogoutSession() except Exception as ex: print(ex)
def adminViewFeedback(): try: if adminLoginSession() == "admin": print("a") feedbackDAO = FeedbackDAO() feedbackVOList = feedbackDAO.viewFeedback() return render_template('admin/viewFeedback.html', feedbackVOList=feedbackVOList) else: return adminLogoutSession() except Exception as ex: print(ex)
def bloodbankViewFeedback(): try: if adminLoginSession() == "bloodbank": feedbackDAO = FeedbackDAO() feedbackVO = FeedbackVO() feedbackFrom_LoginId = session['session_loginId'] feedbackVO.feedbackFrom_LoginId = feedbackFrom_LoginId print(feedbackFrom_LoginId) feedbackVOList = feedbackDAO.viewFeedback(feedbackVO) return render_template('bloodbank/viewFeedback.html', feedbackVOList=feedbackVOList) else: return adminLogoutSession() except Exception as ex: print(ex)
def userViewFeedback(): try: feedbackDAO = FeedbackDAO() feedbackVO = FeedbackVO() feedbackFrom_LoginId = session['session_loginId'] print(feedbackFrom_LoginId) feedbackVO.feedbackFrom_LoginId = feedbackFrom_LoginId print(feedbackVO.feedbackFrom_LoginId) feedbackVOList = feedbackDAO.viewFeedback(feedbackVO) print("______________", feedbackVOList) return render_template('user/viewFeedback.html', feedbackVOList=feedbackVOList) except Exception as ex: print(ex)