def reset_display(): item_info_box.hide() spacer_widget.hide_top_bottom_spacers() confirm_widget.hide_confirm() picture_widget.hide_picture() key_pad_widget.hide_key_pad() button_widget.show_main_buttons() picture_widget.reset_picture()
def new_item_yes(): spacer_widget.hide_top_bottom_spacers() confirm_widget.hide_confirm() item_info_box.show() picture_widget.show_picture() if 'potential_new_item' in globals(): item = potential_new_item if item['status'] == 'partial': item_found(item['item']) key_pad_widget.show_key_pad() editable_text_widget.swap_to_text_box(item['item']) app.update()
def new_item_no(): spacer_widget.hide_top_bottom_spacers() confirm_widget.hide_confirm() reset_display()
def failed_validation_no(): spacer_widget.hide_top_bottom_spacers() confirm_widget.hide_confirm() reset_display()
def failed_validation_yes(): spacer_widget.hide_top_bottom_spacers() confirm_widget.hide_confirm() item_info_box.show() picture_widget.show_picture() key_pad_widget.show_key_pad()
picture_widget.hide_picture() key_pad_widget.hide_key_pad() spacer_widget.show_top_bottom_spacers() spacer_widget.update_top_bottom_spacer_width(app) confirm_widget.show_confirm(commands, message) app = App(title='Inventory Scanner') main_buttons_commands = [ set_display_to_scan_in, set_display_to_scan_out, set_display_to_look_up ] buttons = button_widget.spin_up_main_buttons(app, main_buttons_commands) spacer_widget.spin_up_top_bottom_spacers(app) spacer_widget.hide_top_bottom_spacers() confirm_widget.spin_up_confirm_widget(app) item_info_box = Box(app, width='fill', layout='grid') barcodes_commands = [ scan_in_key_pressed, scan_out_key_pressed, look_up_key_pressed ] barcodes = barcode_widget.get_barcodes(item_info_box, barcodes_commands) label_widget.spin_up_item_labels(item_info_box) editable_text_widget.spin_up_editable_texts(item_info_box, spin_up_key_pad) editable_text_widget.hide_text_boxes() button_widget.spin_up_edit_button(item_info_box, try_save_new_item)