def wrapper(): if not data_holder.are_sheets_loaded(): MessageDialog(self, "Load contractors and procurements first!") return self.set_output(sort_date_time1()) self.set_output(sort_by_expired_date1(True))
def wrapper(): if not data_holder.are_sheets_loaded(): MessageDialog(self, "Load contractors and procurements first!") return self.output_tb.set_output( function_12.sort_by_nonexpired_date1(asc))
def wrapper(): if not data_holder.are_sheets_loaded(): MessageDialog(self, "Load contractors and procurements first!") return self.output_tb.set_output(function_9.agency_min_procurement()) self.output_tb.set_output(function_9.sorted_min_procurement(asc))
def function_2_clicked(self, e): function_2.createFolder() function_2.writetxt() function_2.txtdetails() if not data_holder.are_sheets_loaded(): MessageDialog(self, "Load contractors and procurements first!") return
def function_5_clicked(self, e): """ Check if sheets are loaded and perform function 5 """ if not data_holder.are_sheets_loaded(): MessageDialog(self, "Load contractors and procurements first!") return self.output_tb.set_output(function_5())
def wrapper(): if not data_holder.are_sheets_loaded(): MessageDialog(self, "Load contractors and procurements first!") return function_3.procurement_dictionary1() function_3.total_procurement_dictionary1() self.output_tb.set_output( function_3.sorted_total_procurement_dictionary1(asc))
def function_2_clicked(self, e): """ Check if sheets are loaded and perform function 2 """ if not data_holder.are_sheets_loaded(): MessageDialog(self, "Load contractors and procurements first!") return function_2.save()
def function_10_clicked(self, e): """ Check if sheets are loaded and show the workheads pop up window """ if not data_holder.are_sheets_loaded(): MessageDialog(self, "Load contractors and procurements first!") return WorkheadsPage(self)
def wrapper(): if not data_holder.are_sheets_loaded(): MessageDialog(self, "Load contractors and procurements first!") return self.set_output(procurement_dictionary1()) self.set_output(total_procurement_dictionary1()) self.set_output(agency_min_procurement()) self.set_output(sorted_min_procurement(asc))
def lda_function_clicked(self, e): """ Check if sheets are loaded and show procurements grouped by topic. The topics are created using natural language processing, LDA model """ if not data_holder.are_sheets_loaded(): MessageDialog(self, "Load contractors and procurements first!") return ProcurementTopicsDialog(self)
def inner_func(e): path = self.prompt_sheet_location() if path == '': return try: func(path) except: traceback.print_exc() MessageDialog(self, "Please select the correct sheet")
def procurements_browse_clicked(self, e): path = self.prompt_sheet_location() if path == '': return try: data_holder.load_procurement_list(path) except: traceback.print_exc() MessageDialog(self, "Please select the correct sheet")
def on_send_message(self, widget): widget.set_sensitive(False) messageDialog = MessageDialog() response = messageDialog.run() if response == Gtk.ResponseType.ACCEPT: text = messageDialog.get_text() if text != '': self.gotify_client.send_message(text) messageDialog.destroy() widget.set_sensitive(True)
def wrapper(): if not data_holder.are_sheets_loaded(): MessageDialog(self, "Load contractors and procurements first!") return self.output_tb.set_output(function_6(category))
def wrapper(): if not data_holder.are_sheets_loaded(): MessageDialog(self, "Load contractors and procurements first!") return self.set_output(contractor_workhead_grade())
def function_6_clicked(self, e): if not data_holder.are_sheets_loaded(): MessageDialog(self, "Load contractors and procurements first!") return self.set_output(function_5())