Exemple #1
0
 def get_value_dict_for_worksheet(self, master_id='', master_title=''):
     if master_id == '':
         self.set_master_details(self.sale_id, self.title)
     else:
         self.set_master_details(master_id, master_title)
     worksheet_columns = SLDC.get_columns_for_excel()
     return {column: self.get_value(column) for column in worksheet_columns}
 def get_table_style_cell_conditional() -> list:
     return [{
         'if': {
             'column_id': c
         },
         'textAlign': 'left'
     } for c in SLDC.get_text_columns_for_search_results()]
 def __init__(
     self,
     sys_config: SystemConfiguration,
     df: pd.DataFrame,
 ):
     self._columns_for_similar_sale_grid = SLDC.get_columns_for_similar_sales_tab_table(
     )
     self._columns_for_plotting = SLDC.get_columns_for_sales_plotting()
     self.sys_config = sys_config
     self._df_base = df
     self.__assign_process_columns_to_data_frame__()
     self._sale_master = None
     self._df_for_sale_master = None
     self._entity_label_main_values_dict = {}
     self._df_for_grid = None
     self._df_for_plot = None
     self._outlier_for_selection = None
 def __get_search_result_grid_table__(self):
     if len(self._online_rows) == 0:
         return 'Nothing found - please adjust your query...'
     columns = SLDC.get_columns_for_search_results()
     return MyDCC.data_table(
         self._elements.my_search_result_grid_table,
         rows=self._online_rows,
         style_cell_conditional=self.get_table_style_cell_conditional(),
         style_data_conditional=self.get_table_style_data_conditional(
             self._online_rows),
         columns=columns)
Exemple #5
0
 def __init__(self, sale_source: SalesmanSale, sales: list):
     self._entity_handler = sale_source.sys_config.entity_handler
     self._columns = SLDC.get_columns_for_sales_plotting()
     self._sale_source = sale_source
     self._sales = sales
     self._sale_dict_list = []
     self.__fill_sale_dict_list__()
     self._df_sale = self.__get_df_from_sale_dict_list__(self._sale_dict_list)
     self._df_sale = self.__get_df_without_single_entries__()
     self._plot_category_list = self._df_sale[SLDC.PLOT_CATEGORY].unique()
     self._detail_offset_dict = {}
     self._ax = None
 def __get_sale_columns_dict__():
     return {
         SLSRC.DB: SLDC.get_columns_for_sales_tab_table(),
     }
 def __get_columns__():
     return SLDC.get_columns_for_similar_sales_tab_table()
 def __init__(self, file_path: str, is_for_test=False):
     self._file_path = file_path
     AccessLayerFile.__init__(self, file_path, SLDC.get_columns_for_virtual_sales_in_file(), is_for_test=is_for_test)
 def __get_source_df__(self):
     df = pd.read_csv(self._file_path, delimiter='#', header=None)
     df.columns = SLDC.get_columns_for_virtual_sales_in_file()
     return df