Refactor repo type in overview

Replaces "type type string" with "offline type abap_bool"
This commit is contained in:
Marc Bernard 2025-03-30 15:23:15 +00:00
parent 8e02089f8f
commit baef4483e2

View File

@ -32,8 +32,7 @@ CLASS zcl_abapgit_gui_page_repo_over DEFINITION
TYPES: TYPES:
BEGIN OF ty_overview, BEGIN OF ty_overview,
favorite TYPE string, favorite TYPE string,
"! True for offline, false for online repo offline TYPE abap_bool,
type TYPE string,
key TYPE zif_abapgit_persistence=>ty_value, key TYPE zif_abapgit_persistence=>ty_value,
name TYPE string, name TYPE string,
labels TYPE string_table, labels TYPE string_table,
@ -384,7 +383,7 @@ CLASS zcl_abapgit_gui_page_repo_over IMPLEMENTATION.
ls_overview-favorite = zcl_abapgit_persistence_user=>get_instance( ls_overview-favorite = zcl_abapgit_persistence_user=>get_instance(
)->is_favorite_repo( <ls_repo>->ms_data-key ). )->is_favorite_repo( <ls_repo>->ms_data-key ).
ls_overview-type = <ls_repo>->ms_data-offline. ls_overview-offline = <ls_repo>->ms_data-offline.
ls_overview-key = <ls_repo>->ms_data-key. ls_overview-key = <ls_repo>->ms_data-key.
ls_overview-name = <ls_repo>->get_name( ). ls_overview-name = <ls_repo>->get_name( ).
ls_overview-labels = zcl_abapgit_repo_labels=>split( <ls_repo>->ms_data-local_settings-labels ). ls_overview-labels = zcl_abapgit_repo_labels=>split( <ls_repo>->ms_data-local_settings-labels ).
@ -712,7 +711,7 @@ CLASS zcl_abapgit_gui_page_repo_over IMPLEMENTATION.
lv_lock TYPE string, lv_lock TYPE string,
lv_flow TYPE string. lv_flow TYPE string.
lv_is_online_repo = boolc( is_repo-type = abap_false ). lv_is_online_repo = boolc( is_repo-offline = abap_false ).
" Start of row " Start of row
IF is_repo-favorite = abap_true. IF is_repo-favorite = abap_true.
@ -721,7 +720,7 @@ CLASS zcl_abapgit_gui_page_repo_over IMPLEMENTATION.
lv_fav_tr_class = ''. lv_fav_tr_class = ''.
ENDIF. ENDIF.
ii_html->add( |<tr{ lv_fav_tr_class } data-key="{ is_repo-key }" data-offline="{ is_repo-type }">| ). ii_html->add( |<tr{ lv_fav_tr_class } data-key="{ is_repo-key }" data-offline="{ is_repo-offline }">| ).
" Favorite " Favorite
lv_favorite_icon = ii_html->icon( lv_favorite_icon = ii_html->icon(