Esempio n. 1
0
        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))
Esempio n. 2
0
        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))
Esempio n. 3
0
        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))
Esempio n. 4
0
 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
Esempio n. 5
0
 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())
Esempio n. 6
0
 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))
Esempio n. 7
0
 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()
Esempio n. 8
0
    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)
Esempio n. 9
0
        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))
Esempio n. 10
0
    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)
Esempio n. 11
0
        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")
Esempio n. 12
0
    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")
Esempio n. 13
0
 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)
Esempio n. 14
0
 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))
Esempio n. 15
0
        def wrapper():
            if not data_holder.are_sheets_loaded():
                MessageDialog(self, "Load contractors and procurements first!")
                return

            self.set_output(contractor_workhead_grade())
Esempio n. 16
0
    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())