def adminLoadDashboard(): try: if adminLoginSession() == 'admin': complainCount = 0 feedbackCount = 0 userCount = 0 complainDAO = ComplainDAO() complainList = complainDAO.complainCount() print('complainList>>>>>', complainList) complainCount = complainList[0][0] feedbackDAO = FeedbackDAO() feedbackList = feedbackDAO.adminViewFeedback() feedbackCount = len(feedbackList) registerDAO = RegisterDAO() registerList = registerDAO.viewRegister() userCount = len(registerList) return render_template('admin/index.html', complainCount=complainCount, feedbackCount=feedbackCount, userCount=userCount) else: return adminLogoutSession() except Exception as ex: print(ex)
def adminViewFeedback(): try: if adminLoginSession() == 'admin': feedbackDAO = FeedbackDAO() feedbackVOList = feedbackDAO.adminViewFeedback() print("__________________", feedbackVOList) return render_template('admin/viewFeedback.html', feedbackVOList=feedbackVOList) else: return adminLogoutSession() except Exception as ex: print(ex)
def adminLoadDashboard(): try: if adminLoginSession() == 'admin': complainDAO = ComplainDAO() feedbackDAO = FeedbackDAO() registerDAO = RegisterDAO() complainVOList = complainDAO.viewComplain() totalComplainCount = len(complainVOList) feedbackVOList = feedbackDAO.adminViewFeedback() totalFeedbackCount = len(feedbackVOList) registerVOList = registerDAO.viewRegister() totalUserCount = len(registerVOList) return render_template('admin/Index.html', totalUserCount=totalUserCount, totalComplainCount=totalComplainCount, totalFeedbackCount=totalFeedbackCount) else: return adminLogoutSession() except Exception as ex: print(ex)