diff --git a/image/feature/alert_sms/Success.png b/image/feature/alert_sms/Success.png new file mode 100644 index 00000000..51d4f5e3 Binary files /dev/null and b/image/feature/alert_sms/Success.png differ diff --git a/image/feature/alert_sms/bn_alert_customer.png b/image/feature/alert_sms/bn_alert_customer.png new file mode 100644 index 00000000..93967bba Binary files /dev/null and b/image/feature/alert_sms/bn_alert_customer.png differ diff --git a/image/feature/alert_sms/bp_alert_customer.png b/image/feature/alert_sms/bp_alert_customer.png new file mode 100644 index 00000000..5224fa53 Binary files /dev/null and b/image/feature/alert_sms/bp_alert_customer.png differ diff --git a/image/feature/alert_sms/text_1.png b/image/feature/alert_sms/text_1.png new file mode 100644 index 00000000..3a428760 Binary files /dev/null and b/image/feature/alert_sms/text_1.png differ diff --git a/inc/page_board_events.inc b/inc/page_board_events.inc new file mode 100644 index 00000000..c4787cb6 --- /dev/null +++ b/inc/page_board_events.inc @@ -0,0 +1,509 @@ + + + ReloadAll + + + + Var NextPage = "ROOT/taobin_project/xml/page_back_to_main.xml" + + OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_advert2.xml" + + + Var OpenFromPageBoard = 1 + + If InternationalEnable = 1 Then + + ; show language icon + OpenInst 3 "ROOT/taobin_project/xml/topview2.xml" + RootLayoutVisible 3 "show" + + OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_catalog_group_recommend.lxml" + Else + TRY "/mnt/sdcard/coffeevending/taobin_project/xml/event/script_common_for_open_promotion_xml.ev" + EndIf + + Machine DoorClose + + TopView "show" + Open "/mnt/sdcard/coffeevending/taobin_project/xml/page_main_blank.xml" + + + +PRICE "Reset" "-" + PRICE "Load" "-" + PRICE "CheckAndApply" XMLProfile + + DEBUGVAR ProfileIndex[0] + DEBUGVAR ProfileIndex[1] + DEBUGVAR ProfileIndex[2] + DEBUGVAR ProfileIndex[3] + DEBUGVAR ProfileIndex[4] + DEBUGVAR ProfileIndex[5] + DEBUGVAR ProfileIndex[6] + DEBUGVAR ProfileIndex[7] + DEBUGVAR ProfileIndex[8] + DEBUGVAR ProfileIndex[9] + DEBUGVAR ProfileIndex[10] + + PRICE "Reload" "-" + + + + If CountryName = "-Thailand-" Then + Var InternationalEnable = 1 + DEBUGVAR InternationalEnable + + ;TRY "/mnt/sdcard/coffeevending/taobin_project/inter/tha/video/script_video.ev" + + TRY "/mnt/sdcard/coffeevending/taobin_project/xml/multi_ads/ads_path.ev" + + ;specified to unittest4 + Var OpenFileXML = CountryRootPath + "xml/event/tricker.ev" + DEBUGVAR OpenFileXML + TRY OpenFileXML + + EnableLanguage "ENG" + EnableLanguage "THAI" + EnableLanguage "MYANMAR" + SetLanguage "THAI" + LanguageControl "UpdateList" "-" + Var show_eng = "false" + + ;Var img_press_main_page = "ROOT/taobin_project/image/main_page/bp_main_page_start.png" + ;Var img_rest_main_page = "" + ;Var img_reset_topup = "" + ;ROOT/taobin_project/image/main_page/bn_main_page_topup.png + + ;Var ShowNetworkProblemText = "Network error. Payment Cash only." + + Var CountryRootPath = "ROOT/taobin_project/inter/tha/" + Var CountryShortName = "tha" + + Var TextPriceMenuSize = 12 + Var TextPriceMenuY = 266 + Var TextPriceMenuBlendX = 180 + Var TextPriceMenuHotX = 48 + + Var ShowButtonClick2 = "Invisible" + Var ButtontoTopupMenu = "Enable" + + + Var PriceUnitText = "" + + ;Var MemberButtonFileName = "ROOT/taobin_project/image/TermTempage2/bp_main_page_member.png" + ;Var MemberButtonFileNameRest = "ROOT/taobin_project/image/TermTempage2/bn_main_page_member.png" + + Var show_eng_button_stage = "Invisible" + + Var CountDownShowButton = 35 + + Var XButtonMember = 384 + Var YButtonMember = 1695 + + If Not#LanguageLoaded = "" Then + LoadLanguage "/mnt/sdcard/coffeevending/taobin_project/inter/tha/menu/lang.tsv" + EndIf + + Var cups_sold_text = "Cups Sold Worldwide" + + Var MinPhoneNumber = 10 + Var MaxPhoneNumber = 10 + + OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/sold_cup_count.xml" + + EndIf + + + + Var XMLProfile = "y18IDCardCaffeine" + Var TimeProfilePrice = 0 + + + + + + Var XMLProfile = "ProfileIncrease35" + Var TimeProfilePrice = 0 + + + + + Var XMLProfile = "ProfileIncrease45" + Var TimeProfilePrice = 0 + + + + + Var buttonRemoveCup = "Enable" + DEBUGVAR buttonRemoveCup + DEBUGVAR bnRemoveCup + DEBUGVAR bpRemoveCup + + + + + Var buttonRemoveCup = "Enable" + Var UseVeryBigRemoveCupButton = "Enable" + DEBUGVAR buttonRemoveCup + + + + + + SAVELOG "EventDrink EventDrink EventDrink EventDrink EventDrink " + + + 1000 + + + If CNTDOWN_PROTECT_SCREEN_BLANK = 0 Then + + SAVELOG "CNTDOWN_PROTECT_SCREEN_BLANK" + OpenInst 0 "ROOT/taobin_project/xml/page_board.xml" + EndIf + + If IgnoreNetCore = "true" Then + + Else + If SELLSTATUS = "DEACTIVE" Then + OpenInst 0 "/ROOT/xml/offline.xml" + EndIf + + If NoWaitMachineEnable = 1 Then + If RecoveryRunning = "true" Then + OpenInst 0 "/mnt/sdcard/coffeevending/taobin_project/xml/page_board.xml" + + EndIf + If stop_now = "true" Then + OpenInst 0 "/mnt/sdcard/coffeevending/taobin_project/xml/page_board.xml" + EndIf + Else + If MachineStage = "close-maintenance" Then + OpenInst 0 "/mnt/sdcard/coffeevending/taobin_project/xml/page_board.xml" + + EndIf + EndIf + + + + If CLOSE_ORDER_NOW = "true" Then + OpenInst 0 "/mnt/sdcard/coffeevending/taobin_project/xml/page_board.xml" + EndIf + + If MachineStage = "mcu-upgrade" Then + OpenInst 0 "/mnt/sdcard/coffeevending/taobin_project/xml/page_board.xml" + + EndIf + + + ;stop_now + If NETCORE_LOST_CNT > 120 Then + Var stop_now = "true" + Var MachineErrorDetailAll = "???" + SAVELOG "NETCORE_LOST_CNT" + OpenInst 0 "/mnt/sdcard/coffeevending/taobin_project/xml/page_board.xml" + EndIf + + + ;DEBUGVAR NETCORE_EVENT_CNT_X + + + If NCIC07_EVENT_CNT = NETCORE_EVENT_CNT_TMP Then + + If NETCORE_EVENT_CNT_X > 3600 Then + Var stop_now = "true" + Var stop_now_from_netcore_event = 1 + Var MachineErrorDetailAll = "Netcore Lost" + SAVELOG "Netcore Lost NCIC07_EVENT_CNT" + DEBUGVAR NCIC07_EVENT_CNT + OpenInst 0 "/mnt/sdcard/coffeevending/taobin_project/xml/page_board.xml" + EndIf + + Else + Var NETCORE_EVENT_CNT_X = 0 + Var NETCORE_EVENT_CNT_TMP = NCIC07_EVENT_CNT + EndIf + + + + EndIf + + If MachineStage = "drink-failed" Then + OpenInst 0 "/mnt/sdcard/coffeevending/taobin_project/xml/page_board.xml" + + EndIf + + If MachineStage = "remove-cup" Then + OpenInst 0 "/mnt/sdcard/coffeevending/taobin_project/xml/page_board.xml" + + EndIf + + If BrewTimeoutExtend = 1 Then + DEBUGVAR BrewTimeoutExtend + DEBUGVAR DoorCupPosition + If DoorCupPosition = "bottom" Then + SAVELOG "BrewTimeoutExtend = 0 Clear Error Flag" + Var BrewTimeoutExtend = 0 + ; clear stage + + Else + + Var stop_now = "true" + Var stop_now_from_door_cup = 1 + + OpenInst 0 "/mnt/sdcard/coffeevending/taobin_project/xml/page_board.xml" + EndIf + Else + If DoorCupPosition = "Bottom" Then + Var BrewTimeoutExtend = 0 + + Else + Var BrewTimeoutExtend = 0 + EndIf + EndIf + + + + If NeedUpgrade = "true" Then + OpenInst 0 "/mnt/sdcard/coffeevending/taobin_project/xml/page_board.xml" + EndIf + + ;DEBUGVAR MachineStage + ;DEBUGVAR CountDownShowButton + ;DEBUGVAR ShowButtonClick + ;DEBUGVAR ShowButtonClickFull + ;DEBUGVAR CountDownPauseVideo + + If TaobinOnlineX = "true" Then + + If CountDownPauseVideo > 0 Then + DEBUGVAR CountDownPauseVideo + ; ignore + + ;Var CountDownPauseVideo = CountDownPauseVideo - 1 + ;Var CountDownPauseVideo2 = CountDownPauseVideo - 1 + DEBUGVAR CountDownPauseVideo2 + If CountDownPauseVideo = 2 Then + + + ;TapScreen 30 638 + + EndIf + + + If CountDownPauseVideo = 1 Then + + ;TapScreen 860 1004 + + EndIf + + + If CountDownPauseVideo = 0 Then + + Var NextPage = "ROOT/taobin_project/xml/page_back_to_main.xml" + + OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_advert2.xml" + + + Var OpenFromPageBoard = 1 + + If DoorCupPosition = "bottom" Then + If CupOnArm = "true" Then + + Else + __CMD "CLI" "arm_id=3,arm_position=posi_espresso_ii" "-" "-" + EndIf + EndIf + + + + DEBUGVAR InternationalEnable + DEBUGVAR CountryName + If InternationalEnable = 1 Then + If CountryName = "Thailand" Then + SAVELOG " Thailand Thailand Thailand Thailand Pooon Pooon Pooon Pooon Pooon" + ;TRY "/mnt/sdcard/coffeevending/taobin_project/inter/tha/xml/event/script_common_for_open_promotion_xml.ev" + Else + ; show language icon + OpenInst 3 "ROOT/taobin_project/xml/topview2.xml" + RootLayoutVisible 3 "show" + + + ;Var OpenFileXML = CountryRootPath + "xml/event/script_common_for_open_promotion_xml.ev" + ;TRY OpenFileXML + EndIf + + Else + If BeerTrapEnable = "true" Then + ;OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_catalog_cocktail.xml" + Else + ;TRY "/mnt/sdcard/coffeevending/taobin_project/xml/event/script_common_for_open_promotion_xml.ev" + EndIf + EndIf + + Machine DoorClose + + TopView "show" + OpenInst 0 "/mnt/sdcard/coffeevending/taobin_project/xml/page_main_blank.xml" + + EndIf + EndIf + + EndIf + + + + If TimerFirst = "true" Then + + DEBUGVAR CountUpReloadAll + ; setvarint CountUpReloadAll 49 + ; Original value is 40 + If EnableMultiInstance = "true" Then + + If CountUpReloadAll > 300 Then + Var NeedReboot = "false" + + Var StartUpExt = "-" + Var CountUpReloadAll = 0 + + ReloadAll + EndIf + + If CountUpReloadAll = 50 Then + Var SlientRefreshIndex = 2 + EndIf + If CountUpReloadAll = 150 Then + Var SlientRefreshIndex = 2 + EndIf + If CountUpReloadAll = 200 Then + Var SlientRefreshIndex = 2 + EndIf + If CountUpReloadAll = 250 Then + Var SlientRefreshIndex = 2 + EndIf + + Else + If CountUpReloadAll > 100 Then + Var NeedReboot = "false" + + Var StartUpExt = "-" + Var CountUpReloadAll = 0 + + ReloadAll + EndIf + + EndIf + + EndIf + + + If CupOnArm = "true" Then + + If CheckCupStateDoorCupClose = "" Then + Var buttonRemoveCup = "Enable" + EndIf + + If CheckCupStateDoorCupClose = "done" Then + Var buttonRemoveCup = "Enable" + EndIf + Else + If buttonRemoveCup = "Enable" Then + Var buttonRemoveCup = "Invisible" + EndIf + EndIf + + + + + If Seeker = "curr" Then + If DoorCupPosition = "bottom" Then + ; It normal + Var EmergencyStop = "false" + Else + ;Var EmergencyStop = "true" + + EndIf + EndIf + + If MainPageEventWithTimeout = "" Then + + Else + If MainPageEventWithTimeout > 0 Then + Var MainPageEventWithTimeout = MainPageEventWithTimeout - 1 + EndIf + + ;DEBUGVAR MainPageEventWithTimeout + If MainPageEventWithTimeout = 1 Then + Var CountDownPauseVideo = 4 + EndIf + EndIf + + + + ;Var TimeProfilePrice = TimeProfilePrice + 1 + If XMLProfilePrevious = XMLProfile Then + + Else + DEBUGVAR XMLProfile + DEBUGVAR XMLProfilePrevious + + If NoTrickPriceProfile = 0 Then + + If TimeProfilePrice = 5 Then + PRICE "Reset" "-" + PRICE "Load" "-" + PRICE "CheckAndApply" XMLProfile + + DEBUGVAR ProfileIndex[0] + DEBUGVAR ProfileIndex[1] + DEBUGVAR ProfileIndex[2] + DEBUGVAR ProfileIndex[3] + DEBUGVAR ProfileIndex[4] + DEBUGVAR ProfileIndex[5] + DEBUGVAR ProfileIndex[6] + DEBUGVAR ProfileIndex[7] + DEBUGVAR ProfileIndex[8] + DEBUGVAR ProfileIndex[9] + DEBUGVAR ProfileIndex[10] + + PRICE "Reload" "-" + + Var XMLProfilePrevious = XMLProfile + + Var refresh_str = "-RefreshProf" + STRCONTAIN refresh_str XMLProfile HasRefreshProf + If HasRefreshProf = "true" Then + RebootWithCause "RefreshProf_ProMelon" + EndIf + + EndIf + + EndIf + + + EndIf + + + If SleepModeXML = "ON" Then + Var BackgroundColor = "0x2C2F4E" + OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/sold_cup_count.xml" + Open "ROOT/taobin_project/xml/page_sleepmode.xml" + EndIf + + Refresh + + TimerReset + + + + + SAVELOG NetworkStatus + ;Open "/mnt/sdcard/coffeevending/xml/main.xml" + + + + SAVELOG NetworkStatus + If SELLSTATUS = "DEACTIVE" Then + Open "/mnt/sdcard/coffeevending/xml/main.xml" + EndIf + diff --git a/inc/video_page_board.inc b/inc/video_page_board.inc new file mode 100644 index 00000000..7d1e65eb --- /dev/null +++ b/inc/video_page_board.inc @@ -0,0 +1,8 @@ + diff --git a/inter/common/image/main_page/bn_remove_cup_beeg_af.png b/inter/common/image/main_page/bn_remove_cup_beeg_af.png index bb9ad861..0e3dd624 100644 Binary files a/inter/common/image/main_page/bn_remove_cup_beeg_af.png and b/inter/common/image/main_page/bn_remove_cup_beeg_af.png differ diff --git a/inter/common/image/main_page/bp_remove_cup_beeg_af.png b/inter/common/image/main_page/bp_remove_cup_beeg_af.png index aa386a27..9c6546d6 100644 Binary files a/inter/common/image/main_page/bp_remove_cup_beeg_af.png and b/inter/common/image/main_page/bp_remove_cup_beeg_af.png differ diff --git a/inter/mys/xml/menu_new_layout_gen_v2.py b/inter/mys/xml/menu_new_layout_gen_v2.py index f3351c76..d780b4ad 100644 --- a/inter/mys/xml/menu_new_layout_gen_v2.py +++ b/inter/mys/xml/menu_new_layout_gen_v2.py @@ -1,4 +1,13 @@ if "v2" in param: + def find_templatable_product_codes(str_pd): + # find sep `|` + str_pd_spl = str_pd.split('|') + t_pd = [pd for pd in str_pd_spl if pd != '-'] + if len(t_pd) >= 1: + # + return t_pd[0] + return "" + def GenMenuProductCodeBlock(spl, str_hot_product_code, str_cold_product_code, str_blend_product_code): #print(" size " + str( len(spl)) + " img=" + spl[ idx_img][1] ) out_xml( '\t; ==================> Len = ' + str(len(spl)) + '\r\n') @@ -12,14 +21,26 @@ out_xml('\t 296 \r\n') str_con = "" str_con_var = "" - #print("#########################################################################################################################") - #print( str( spl)) - #print("#########################################################################################################################") + # print("#########################################################################################################################") + # print( str( spl), str_hot_product_code, str_cold_product_code, str_blend_product_code) + # print("#########################################################################################################################") + # + print("check param[gcpm]:","gcpm" in param, '|' in str_cold_product_code, "gen_cold_paper_menus" in param or "gcpm" in param) + enable_gcpm = "gen_cold_paper_menus" in param or "gcpm" in param + if str_hot_product_code != '-': str_con += str_hot_product_code + '.Button,' if str_cold_product_code != '-': - str_con += str_cold_product_code + '.Button,' + + # @Slot 12-05-02-0074.Button or 12-05-22-0074.Button, + if '|' in str_cold_product_code and enable_gcpm: + str_con += "@Slot " + genpdc = [ f"{pdc}.Button" for pdc in str_cold_product_code.split("|") if pdc != '-'] + str_con += ' or '.join(genpdc) + "," + print("str_con", str_con) + else: + str_con += str_cold_product_code + '.Button,' if str_blend_product_code != '-': str_con += str_blend_product_code + '.Button,' @@ -27,8 +48,19 @@ if str_hot_product_code != '-': str_con_var += str_hot_product_code + '-' - if str_cold_product_code != '-': - str_con_var += str_cold_product_code + '-' + if str_cold_product_code != '-' : + auto_var_arrs = find_templatable_product_codes(str_cold_product_code).split('-') + + if '|' in str_cold_product_code: + print(find_templatable_product_codes(str_cold_product_code).split('-'), '|' not in str_cold_product_code and "gen_cold_paper_menus" not in param and "gcpm" not in param and len(find_templatable_product_codes(str_cold_product_code).split('-')) == 4) + + if '|' in str_cold_product_code and len(find_templatable_product_codes(str_cold_product_code).split('-')) == 4: + auto_var_arrs[2] = "X2" + + if '|' not in str_cold_product_code and "gen_cold_paper_menus" not in param and "gcpm" not in param and len(find_templatable_product_codes(str_cold_product_code).split('-')) == 4: + str_con_var += str_cold_product_code + '-' + else: + str_con_var += '-'.join(auto_var_arrs) + '-' if str_blend_product_code != '-': str_con_var += str_blend_product_code + '-' @@ -39,6 +71,8 @@ str_con += "$Sum" + str_con_var + print(str_con) + out_xml( '\t Flag( '+ str_con + ') \r\n') pd_code_1 = str_hot_product_code @@ -53,6 +87,20 @@ pd_code_2 = pd_code_available pd_stage2 = '"Disable2"' + if '|' in str_cold_product_code: + # always use cold pd 1 + + # + str_c_pd = str_cold_product_code.split('|') + first_ok_pd = "" + for c_pd in str_c_pd: + if c_pd != "-": + first_ok_pd = c_pd + break + + pd_code_2 = first_ok_pd if first_ok_pd != '' else pd_code_available + pd_stage2 = '"Disable2"' if first_ok_pd == "" else '' + pd_code_3 = str_blend_product_code pd_stage3 = '$' + str_blend_product_code + '.Button' if str_blend_product_code == "-" or len(str_blend_product_code) == 0: @@ -81,11 +129,29 @@ out_xml( '\t\tVar OpenFromXML = CurrentXMLFileName2\r\n') out_xml( '\t\tVar PriceD1 = $' + str_hot_product_code + '.Price\r\n') - out_xml( '\t\tVar PriceD2 = $' + str_cold_product_code + '.Price\r\n') + + + if '|' in str_cold_product_code and ( "gen_cold_paper_menus" in param or "gcpm" in param) and len(find_templatable_product_codes(str_cold_product_code).split('-')) == 4: + auto_var_arrs = find_templatable_product_codes(str_cold_product_code).split('-') + # print("auto_var_arrs:PriceD2 \t", auto_var_arrs, "["+str_cold_product_code+"]") + auto_var_arrs[2] = "{XSlotPrefix}2" + out_xml( f'\t\tVar PriceD2 !assigned @AutoVar ${'-'.join(auto_var_arrs)}.Price' + '\r\n') + else: + out_xml( '\t\tVar PriceD2 = $' + str_cold_product_code + '.Price\r\n') + out_xml( '\t\tVar PriceD3 = $' + str_blend_product_code + '.Price\r\n') out_xml( '\t\tVar PD_CODE1 = "' + pd_code_1 + '"\r\n') - out_xml( '\t\tVar PD_CODE2 = "' + pd_code_2 + '"\r\n') + + + if '|' in str_cold_product_code and ("gen_cold_paper_menus" in param or "gcpm" in param) and len(find_templatable_product_codes(str_cold_product_code).split('-')) == 4: + auto_var_arrs = find_templatable_product_codes(str_cold_product_code).split('-') + # print("auto_var_arrs:PriceD2 \t", auto_var_arrs, "["+str_cold_product_code+"]") + auto_var_arrs[2] = "{XSlotPrefix}2" + out_xml( f'\t\tVar PD_CODE2 !assigned @AutoVar "{'-'.join(auto_var_arrs)}"' + '\r\n') + else: + out_xml( '\t\tVar PD_CODE2 = "' + pd_code_2 + '"\r\n') + out_xml( '\t\tVar PD_CODE3 = "' + pd_code_3 + '"\r\n') out_xml( '\t\t; begin lang \r\n') @@ -116,7 +182,15 @@ out_xml( '\t\t; end lang \r\n') out_xml( '\t\tVar PD_STAGE_1 = ' + pd_stage1 + '\r\n') - out_xml( '\t\tVar PD_STAGE_2 = ' + pd_stage2 + '\r\n') + + if '|' in str_cold_product_code and ("gen_cold_paper_menus" in param or "gcpm" in param) and len(find_templatable_product_codes(str_cold_product_code).split('-')) == 4: + + auto_var_arrs = find_templatable_product_codes(str_cold_product_code).split('-') + auto_var_arrs[2] = "{XSlotPrefix}2" + out_xml( f'\t\tVar PD_STAGE_2 !assigned @AutoVar ${'-'.join(auto_var_arrs)}.Button' + '\r\n') + else: + out_xml( '\t\tVar PD_STAGE_2 = ' + pd_stage2 + '\r\n') + out_xml( '\t\tVar PD_STAGE_3 = ' + pd_stage3 + '\r\n') @@ -144,7 +218,24 @@ out_xml( '\t\tIf PD_STAGE_2 = "Enable" Then\r\n') #out_xml( '\t\t\tVar PD_STAGE_2 = "Enable"\r\n') - out_xml( '\t\t\tTopping "Load" "'+ str_cold_product_code +'"\r\n') + + + # spl[ idx_name][ idx_cold_product_code] + if '|' in str_cold_product_code and ( "gen_cold_paper_menus" in param or "gcpm" in param) and len(find_templatable_product_codes(str_cold_product_code).split('-')) == 4: + cold_paper_options = str_cold_product_code.split("|") + slot_t = 1 + for cpo in cold_paper_options: + if cpo == "-": + continue + out_xml( f'\t\t\tIf XSlot = {slot_t} Then\r\n') + out_xml( '\t\t\t\tTopping "Load" "'+ cpo +'"\r\n') + out_xml( '\t\t\tEndIf'+'\r\n') + slot_t += 1 + else: + out_xml( '\t\t\tTopping "Load" "'+ str_cold_product_code +'"\r\n') + + + out_xml( '\t\tElse\r\n') out_xml( '\t\t\tIf PD_STAGE_1 = "Enable" Then\r\n') #out_xml( '\t\t\t\tVar PD_STAGE_1 = "Enable"\r\n') @@ -310,6 +401,11 @@ shw = '"Invisible"' ice_tab_ice_show = False + if '|' in str_cold_product_code and ice_tab_ice_show and ("gen_cold_paper_menus" in param or "gcpm" in param) and len(find_templatable_product_codes(str_cold_product_code).split('-')) == 4: + auto_var_arrs = find_templatable_product_codes(str_cold_product_code).split('-') + auto_var_arrs[2] = "{XSlotPrefix}2" + shw = f"@AutoVar ${'-'.join(auto_var_arrs)}.Button" + out_xml( '\t\r\n') out_xml( '\t 81 \r\n') out_xml( '\t 264 \r\n') @@ -335,7 +431,12 @@ if "free" in param: out_xml( '\t "Free" \r\n') else: - out_xml( '\t StringFmt( $' + str_cold_product_code + '.Price , DisplayFormat, PreScaleConvertShow) ; test\r\n') + if '|' in str_cold_product_code and ("gen_cold_paper_menus" in param or "gcpm" in param) and len(find_templatable_product_codes(str_cold_product_code).split('-')) == 4: + auto_var_arrs = find_templatable_product_codes(str_cold_product_code).split('-') + auto_var_arrs[2] = "{XSlotPrefix}2" + out_xml( '\t @AutoVar StringFmt( $' + '-'.join(auto_var_arrs) + '.Price , DisplayFormat, PreScaleConvertShow) ; test\r\n') + else: + out_xml( '\t StringFmt( $' + str_cold_product_code + '.Price , DisplayFormat, PreScaleConvertShow) ; test\r\n') else: out_xml( '\t Var( "฿" + $' + str_cold_product_code + '.Price ) \r\n') out_xml( '\t\r\n') @@ -416,7 +517,12 @@ out_xml( '\t\teval( \r\n') out_xml( '\t\t\tIf $Sum' + str_con_var +' = "Disable" Then\r\n') out_xml( '\t\t\t\tSTRCONTAIN "ERR" $' + pd_code_1 + '.TAG tag1_is_disable\r\n') - out_xml( '\t\t\t\tSTRCONTAIN "ERR" $' + pd_code_2 + '.TAG tag2_is_disable\r\n') + if '|' in str_cold_product_code and ("gen_cold_paper_menus" in param or "gcpm" in param) and len(find_templatable_product_codes(str_cold_product_code).split('-')) == 4: + auto_var_arrs = find_templatable_product_codes(str_cold_product_code).split('-') + auto_var_arrs[2] = "{XSlotPrefix}2" + out_xml( '\t\t\t\tSTRCONTAIN "ERR" $' + '-'.join(auto_var_arrs) + '.TAG tag2_is_disable\r\n') + else: + out_xml( '\t\t\t\tSTRCONTAIN "ERR" $' + pd_code_2 + '.TAG tag2_is_disable\r\n') out_xml( '\t\t\t\tSTRCONTAIN "ERR" $' + pd_code_3 + '.TAG tag3_is_disable\r\n') #out_xml( '\t\t\t\tDEBUGVAR $' + pd_code_1 + '.TAG\r\n') #out_xml( '\t\t\t\tDEBUGVAR $' + pd_code_2 + '.TAG\r\n') @@ -611,13 +717,34 @@ #print(' size = ' + str( len( hot_pd)) + ' size = ' + str( len( cold_pd)) + ' size = ' + str( len( blend_pd)) + '\r\n') list_size = len( hot_pd) + + # if "gen_cold_paper_menus" in param or "gcpm" in param: + # # inject auto -22- + # has_already_paper_cup_cold = "-22-" in spl[ idx_name][ idx_cold_product_code] + # if not has_already_paper_cup_cold: + # # copy format + # copied_pd = cold_pd[0] if cold_pd[0] != '-' else cold_pd[1] if cold_pd[1] != '-' else '' + + # for cpd in cold_pd: + # if cpd != '-': + # c_pd_spl = cpd.split('-') + # c_pd_spl[2] = '22' + # spl[ idx_name][ idx_cold_product_code] += ","+'-'.join(c_pd_spl) + + # print("append auto -22-: ", spl[ idx_name][ idx_cold_product_code]) + for idx in range( list_size): print(' hot = ' + hot_pd[ idx] + ' cold = ' + cold_pd[ idx]+ ' blend_pd = ' + blend_pd[ idx] + '\r\n') if hot_pd[ idx] == '-' and cold_pd[ idx] == '-' and blend_pd[ idx] == '-': print("\t\t==> ignore ") else: - print("\t\t==> gen ") - GenMenuProductCodeBlock(spl, hot_pd[ idx], cold_pd[ idx], blend_pd[ idx] ) + print("\t\t==> gen "+"gen_cold_paper_menus" not in param +","+ "gcpm" not in param) + # if "gen_cold_paper_menus" not in param and "gcpm" not in param else spl[ idx_name][ idx_cold_product_code].replace(",", "|") + GenMenuProductCodeBlock( + spl, + hot_pd[ idx], + cold_pd[ idx] , + blend_pd[ idx] ) else: GenMenuBlock(spl, idx_hot_product_code, idx_cold_product_code, idx_blend_product_code) #out_xml( '\t; parallel '+ spl[ idx_name][ idx_hot_product_code2] + ' ' + spl[ idx_name][ idx_cold_product_code2] + ' ' + spl[ idx_name][ idx_blend_product_code2] + ' \r\n') diff --git a/inter/mys/xml/page_catalog_group_appfast.lxml b/inter/mys/xml/page_catalog_group_appfast.lxml index f6a0743d..9233827c 100644 --- a/inter/mys/xml/page_catalog_group_appfast.lxml +++ b/inter/mys/xml/page_catalog_group_appfast.lxml @@ -646,15 +646,15 @@ ;dummy_layout.inc ; menu_new_list 5 ; ==================> Len = 3 - ; - 12-04-02-1018 - + ; - 12-04-02-1018|12-04-22-1018 - 33 22 225 296 - Flag( 12-04-02-1018.Button,$Sum1204021018) + Flag( @Slot 12-04-02-1018.Button or 12-04-22-1018.Button,$Sum1204X21018) +;include="ROOT/taobin_project/inc/button_remove_cup.inc" diff --git a/inter/mys/xml/page_catalog_group_recommend_multi_pro.lxml b/inter/mys/xml/page_catalog_group_recommend_multi_pro.lxml index 0cd91b90..5ad8ec8b 100644 --- a/inter/mys/xml/page_catalog_group_recommend_multi_pro.lxml +++ b/inter/mys/xml/page_catalog_group_recommend_multi_pro.lxml @@ -1,174 +1,174 @@ - - - - "Enable" - 1080 - 1920 -; "0xeae6e1" - SoundVolume - - ; On open - Var NextPage = "-" - - DEBUGVAR ICE_PROCESS_STATUS - DEBUGVAR ICE_PROCESS_TXT - - - DEBUGVAR LanguageShow - DEBUGVAR CountryName - - If LanguageShow = "ENG" Then - Var DirImage2 = "ROOT/taobin_project/image/drink_option_en/" - Var DirImageAlter = "ROOT/taobin_project/image/page3_2_en/" - Var DirImage = "ROOT/taobin_project/image/page3_en" - Var ice_tab_text = "Ice will be ready at " - - EndIf - If LanguageShow = "THAI" Then - Var DirImage2 = "ROOT/taobin_project/image/drink_option/" - Var DirImageAlter = "ROOT/taobin_project/image/page3_2/" - Var ice_tab_text = "น้ำแข็งจะพร้อมเวลา " - Var DirImage = "ROOT/taobin_project/image/page3" - EndIf - - ;inter-image - If CountryName = "Malaysia" Then - Var DirImage2 = "ROOT/taobin_project/image/drink_option_myr/" - Var DirImageAlter = "ROOT/taobin_project/image/page3_2_en/" - Var DirImage = "ROOT/taobin_project/image/page3_en" - Var ice_tab_text = "Ice will be ready at " - EndIf - - - ;inter-image - If CountryName = "Australia" Then - Var DirImage2 = "ROOT/taobin_project/image/drink_option_myr/" - Var DirImageAlter = "ROOT/taobin_project/image/page3_2_en/" - Var DirImage = "ROOT/taobin_project/image/page3_en" - Var ice_tab_text = "Ice will be ready at " - EndIf - - - If ICE_PROCESS_STATUS = 2 Then - Var ice_tab_process_show = "Enable" - Var ice_show_open = ice_tab_text + ICE_PROCESS_TXT - Else - Var ice_tab_process_show = "Invisible" - EndIf - - - ; SpiralOnline - - Var MenuVSelected2 = "Invisible" - - Var Menu1Selected2 = "Invisible" - Var Menu2Selected2 = "Invisible" - Var Menu3Selected2 = "Invisible" - Var Menu4Selected2 = "Invisible" - - Var Menu6Selected2 = "Invisible" - Var Menu7Selected2 = "Invisible" - Var MenuVSelected2 = "Invisible" - Var Menu11Selected2 = "Invisible" - - Var Menu21Selected2 = "Invisible" - - Var MenuVSelected2 = "Invisible" - If SpiralOnline = "true" Then - If Seeker = "curr" Then - Var MenuVSelected2 = "Enable" - EndIf - EndIf - - ; init default - Var Menu1Selected = "Enable" - Var Menu2Selected = "Enable" - Var Menu3Selected = "Enable" - Var Menu4Selected = "Enable" - ; 5 fruit - Var Menu5Selected = "Invisible" - Var Menu6Selected = "Enable" - Var Menu7Selected = "Enable" - ; 8 cocktail - Var Menu8Selected = "Invisible" - - If CocktailShow = "true" Then - Var Menu7Selected = "Invisible" - Var Menu8Selected = "Enable" - EndIf - - - If AppFastEnable = "true" Then - Var Menu11Selected = "Enable" - Var Menu21Selected = "Invisible" - Var Menu7Selected = "Invisible" - Else - If MenuKidEnable = "true" Then - Var Menu11Selected = "Invisible" - Var Menu21Selected = "Enable" - Var Menu7Selected = "Invisible" - Else - Var Menu11Selected = "Invisible" - Var Menu21Selected = "Invisible" - Var Menu7Selected = "Enable" - EndIf - EndIf - - If CocktailShow = "true" Then - Var Menu7Selected = "Invisible" - EndIf - - If RecipeTag1 = "HealthTurnOn" Then - Var Menu22Selected = "Enable" - Else - Var Menu22Selected = "Invisible" - EndIf - ; - - - - Var Menu1Selected = "PressForever" - - Var OreoBigButtonEnable = "Enable" - - If $12-01-01-0001.Button = "Invisible" Then - Var esp102101001Enable = "Invisible" - Var esp122101001Enable = "Enable" - - Else - Var esp102101001Enable = "Enable" - Var esp122101001Enable = "Invisible" - - EndIf - - SAVELOG PreviseXMLFileName2 - - Var Timeout = 0 - - If show_eng = "true" Then - - Var text_unavailable = "UNAVAILABLE###size=16" - Else - Var text_unavailable = "หมด###size=32" - - EndIf - - - If show_eng = "true" Then - Var DirImage2 = "ROOT/taobin_project/image/drink_option_en/" - Var DirImageAlter = "ROOT/taobin_project/image/page3_2_en/" - - Else - Var DirImage2 = "ROOT/taobin_project/image/drink_option/" - Var DirImageAlter = "ROOT/taobin_project/image/page3_2/" - EndIf - - - - -;include="ROOT/taobin_project/inter/mys/xml/menu_catalog_new.lxml" - - + + + + "Enable" + 1080 + 1920 +; "0xeae6e1" + SoundVolume + + ; On open + Var NextPage = "-" + + DEBUGVAR ICE_PROCESS_STATUS + DEBUGVAR ICE_PROCESS_TXT + + + DEBUGVAR LanguageShow + DEBUGVAR CountryName + + If LanguageShow = "ENG" Then + Var DirImage2 = "ROOT/taobin_project/image/drink_option_en/" + Var DirImageAlter = "ROOT/taobin_project/image/page3_2_en/" + Var DirImage = "ROOT/taobin_project/image/page3_en" + Var ice_tab_text = "Ice will be ready at " + + EndIf + If LanguageShow = "THAI" Then + Var DirImage2 = "ROOT/taobin_project/image/drink_option/" + Var DirImageAlter = "ROOT/taobin_project/image/page3_2/" + Var ice_tab_text = "น้ำแข็งจะพร้อมเวลา " + Var DirImage = "ROOT/taobin_project/image/page3" + EndIf + + ;inter-image + If CountryName = "Malaysia" Then + Var DirImage2 = "ROOT/taobin_project/image/drink_option_myr/" + Var DirImageAlter = "ROOT/taobin_project/image/page3_2_en/" + Var DirImage = "ROOT/taobin_project/image/page3_en" + Var ice_tab_text = "Ice will be ready at " + EndIf + + + ;inter-image + If CountryName = "Australia" Then + Var DirImage2 = "ROOT/taobin_project/image/drink_option_myr/" + Var DirImageAlter = "ROOT/taobin_project/image/page3_2_en/" + Var DirImage = "ROOT/taobin_project/image/page3_en" + Var ice_tab_text = "Ice will be ready at " + EndIf + + + If ICE_PROCESS_STATUS = 2 Then + Var ice_tab_process_show = "Enable" + Var ice_show_open = ice_tab_text + ICE_PROCESS_TXT + Else + Var ice_tab_process_show = "Invisible" + EndIf + + + ; SpiralOnline + + Var MenuVSelected2 = "Invisible" + + Var Menu1Selected2 = "Invisible" + Var Menu2Selected2 = "Invisible" + Var Menu3Selected2 = "Invisible" + Var Menu4Selected2 = "Invisible" + + Var Menu6Selected2 = "Invisible" + Var Menu7Selected2 = "Invisible" + Var MenuVSelected2 = "Invisible" + Var Menu11Selected2 = "Invisible" + + Var Menu21Selected2 = "Invisible" + + Var MenuVSelected2 = "Invisible" + If SpiralOnline = "true" Then + If Seeker = "curr" Then + Var MenuVSelected2 = "Enable" + EndIf + EndIf + + ; init default + Var Menu1Selected = "Enable" + Var Menu2Selected = "Enable" + Var Menu3Selected = "Enable" + Var Menu4Selected = "Enable" + ; 5 fruit + Var Menu5Selected = "Invisible" + Var Menu6Selected = "Enable" + Var Menu7Selected = "Enable" + ; 8 cocktail + Var Menu8Selected = "Invisible" + + If CocktailShow = "true" Then + Var Menu7Selected = "Invisible" + Var Menu8Selected = "Enable" + EndIf + + + If AppFastEnable = "true" Then + Var Menu11Selected = "Enable" + Var Menu21Selected = "Invisible" + Var Menu7Selected = "Invisible" + Else + If MenuKidEnable = "true" Then + Var Menu11Selected = "Invisible" + Var Menu21Selected = "Enable" + Var Menu7Selected = "Invisible" + Else + Var Menu11Selected = "Invisible" + Var Menu21Selected = "Invisible" + Var Menu7Selected = "Enable" + EndIf + EndIf + + If CocktailShow = "true" Then + Var Menu7Selected = "Invisible" + EndIf + + If RecipeTag1 = "HealthTurnOn" Then + Var Menu22Selected = "Enable" + Else + Var Menu22Selected = "Invisible" + EndIf + ; + + + + Var Menu1Selected = "PressForever" + + Var OreoBigButtonEnable = "Enable" + + If $12-01-01-0001.Button = "Invisible" Then + Var esp102101001Enable = "Invisible" + Var esp122101001Enable = "Enable" + + Else + Var esp102101001Enable = "Enable" + Var esp122101001Enable = "Invisible" + + EndIf + + SAVELOG PreviseXMLFileName2 + + Var Timeout = 0 + + If show_eng = "true" Then + + Var text_unavailable = "UNAVAILABLE###size=16" + Else + Var text_unavailable = "หมด###size=32" + + EndIf + + + If show_eng = "true" Then + Var DirImage2 = "ROOT/taobin_project/image/drink_option_en/" + Var DirImageAlter = "ROOT/taobin_project/image/page3_2_en/" + + Else + Var DirImage2 = "ROOT/taobin_project/image/drink_option/" + Var DirImageAlter = "ROOT/taobin_project/image/page3_2/" + EndIf + + + + +;include="ROOT/taobin_project/inter/mys/xml/menu_catalog_new.lxml" + + 4 10 @@ -200,7 +200,6 @@ Var block_index_override = 0 Var block_index_move = 0 - ;TAGESP ; ==================> Len = 3 ; - - 12-03-03-0026 @@ -228,12 +227,12 @@ ; begin lang Var aliasName[0] = "Pink milk\nOreo Vocalno" Var aliasDesc[0] = "Salak Syrup, Milk,\nSugar Oreo" - Var aliasName[1] = "นมชมพูปั่น\nโอริโอ้ภูเขาไฟ" - Var aliasDesc[1] = "น้ำแดงกลิ่นสละ นม น้ำตาล \n Oreo" - Var aliasName[2] = "-" - Var aliasDesc[2] = "-" - Var aliasName[3] = "-" - Var aliasDesc[3] = "-" + Var aliasName[1] = "" + Var aliasDesc[1] = "" + Var aliasName[2] = "" + Var aliasDesc[2] = "" + Var aliasName[3] = "" + Var aliasDesc[3] = "" Var aliasName[4] = "Susu Pink\nOreo Volcano" Var aliasDesc[4] = "Sirap Salak, Susu, Gula, Oreo" Var aliasName[5] = "" @@ -322,11 +321,11 @@ 0x322B26 Pink milk\nOreo Vocalno - นมชมพูปั่น\nโอริโอ้ภูเขาไฟ + Pink milk\nOreo Vocalno - นมชมพูปั่น\nโอริโอ้ภูเขาไฟ + Susu Pink\nOreo Volcano - นมชมพูปั่น\nโอริโอ้ภูเขาไฟ + @@ -338,11 +337,11 @@ 0x6F5F51 Salak Syrup, Milk,\nSugar Oreo - น้ำแดงกลิ่นสละ นม น้ำตาล \n Oreo + Salak Syrup, Milk,\nSugar Oreo - น้ำแดงกลิ่นสละ นม น้ำตาล \n Oreo + Sirap Salak, Susu, Gula, Oreo - น้ำแดงกลิ่นสละ นม น้ำตาล \n Oreo + @@ -1019,17 +1018,16 @@ center-vertical-horizontal - ;TAGESP ; ==================> Len = 3 - ; 12-01-01-0003 12-01-02-0001 - + ; 12-01-01-0003 12-01-02-0001|12-01-22-0001 - 33 22 225 296 - Flag( 12-01-01-0003.Button,12-01-02-0001.Button,$Sum12010100031201020001) + Flag( 12-01-01-0003.Button,@Slot 12-01-02-0001.Button or 12-01-22-0001.Button,$Sum12010100031201X20001) - - - - -;BigLogoLayout - - - - - - + + + + +;BigLogoLayout + +;include="ROOT/taobin_project/inc/button_remove_cup.inc" + + + + diff --git a/inter/mys/xml/page_catalog_group_tea.lxml b/inter/mys/xml/page_catalog_group_tea.lxml index 43431e57..dda2e83e 100644 --- a/inter/mys/xml/page_catalog_group_tea.lxml +++ b/inter/mys/xml/page_catalog_group_tea.lxml @@ -639,15 +639,15 @@ ;dummy_layout.inc ; menu_new_list 54 ; ==================> Len = 3 - ; 12-02-01-0001 12-02-02-0001 12-02-03-0001 + ; 12-02-01-0001 12-02-02-0001|12-02-22-0001 12-02-03-0001 33 22 225 296 - Flag( 12-02-01-0001.Button,12-02-02-0001.Button,12-02-03-0001.Button,$Sum120201000112020200011202030001) + Flag( 12-02-01-0001.Button,@Slot 12-02-02-0001.Button or 12-02-22-0001.Button,12-02-03-0001.Button,$Sum12020100011202X200011202030001) \r\n') + out_xml( '\r\n') @@ -706,13 +747,19 @@ print( '==>\t; '+ spl[ idx_name][ idx_hot_product_code] + ' ' + spl[ idx_name][ idx_cold_product_code] + ' ' + spl[ idx_name][ idx_blend_product_code] + ' \r\n') if "," in spl[ idx_name][ idx_hot_product_code] and "," in spl[ idx_name][ idx_cold_product_code] and "," in spl[ idx_name][ idx_blend_product_code]: - #print(" hot = " + spl[ idx_name][ idx_hot_product_code]) + print(" hot = " + spl[ idx_name][ idx_hot_product_code]) hot_pd = spl[ idx_name][ idx_hot_product_code].split(',') + print("ok hot") cold_pd = spl[ idx_name][ idx_cold_product_code].split(',') + print("ok cold") blend_pd = spl[ idx_name][ idx_blend_product_code].split(',') - date_time_start = spl[idx_name][idx_date_time_start] - date_time_end = spl[idx_name][idx_date_time_end] - product_var = spl[idx_name][idx_product_var] + print("ok blend") + date_time_start = spl[idx_name][idx_date_time_start] if len(spl[idx_name]) > 17 else "-" + print("ok datetime") + date_time_end = spl[idx_name][idx_date_time_end] if len(spl[idx_name]) > 17 else "-" + print("ok datetime end") + product_var = spl[idx_name][idx_product_var] if len(spl[idx_name]) > 17 else "-" + print("ok pd") # if len(spl) > idx_name and len(spl[idx_name]) > max(idx_date_time_start, idx_date_time_end, idx_product_var): # date_time_start = spl[idx_name][idx_date_time_start] # date_time_end = spl[idx_name][idx_date_time_end] diff --git a/inter/whatthecup/common/xml/feature.page_board_fullscreen/page_board_wtc.lxml b/inter/whatthecup/common/xml/feature.page_board_fullscreen/page_board_wtc.lxml new file mode 100644 index 00000000..ed0847df --- /dev/null +++ b/inter/whatthecup/common/xml/feature.page_board_fullscreen/page_board_wtc.lxml @@ -0,0 +1,238 @@ + + "Enable" + 1080 + 1920 +; "0xeae6e1" +; SoundVolume + + + + + + + + + + + + + + +;include="ROOT/taobin_project/inc/video_page_board.inc" + + +; button-click + + + + +; button-click-full + + + + + + + + + + + ShowNetworkProblem + 5 + 1880 + 24 + Center + 1080 + RobotoRegular + 0xFFFFFF + ShowNetworkProblemText + + + + + + eval( + If LangProcess = "LoadConfig" Then + Var return = "Enable" + Else + Var return = "Invisible" + EndIf +) + 5 + 1880 + 24 + Center + 1080 + RobotoRegular + 0x000000 + eval( + If LangProcess = "LoadConfig" Then + Var return = "Loading ..." + Else + Var return = "" + EndIf +) + + + + + + +; add-vending-info-access-button + + 670 + 0 + 400 + 400 + "/mnt/sdcard/coffeevending/wav/click.wav" + SoundVolume + + OpenInst 0 "//mnt/sdcard/coffeevending/taobin_project/xml/vending_info.xml" + + + Var ClickCountMainTe = ClickCountMainTe + 1 + + DEBUGVAR ClickCountMainTe + + If ClickCountMainTe = 2 Then + RootLayoutVisible 2 "hide" + OpenInst 0 "/mnt/sdcard/coffeevending/taobin_project/xml/vending_info.xml" + EndIf + + ;OpenInst 0 "//mnt/sdcard/coffeevending/taobin_project/xml/page_remove_cup.xml" + + + + + diff --git a/inter/whatthecup/common/xml/feature.page_board_fullscreen/show_button_click_script.ev b/inter/whatthecup/common/xml/feature.page_board_fullscreen/show_button_click_script.ev new file mode 100644 index 00000000..cfeb42a1 --- /dev/null +++ b/inter/whatthecup/common/xml/feature.page_board_fullscreen/show_button_click_script.ev @@ -0,0 +1,29 @@ +;OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_advert.xml" + OpenInst 0 "/mnt/sdcard/coffeevending/taobin_project/xml/page_main_blank.xml" + + If CocktailShow = "true" Then + OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_catalog_cocktail.xml" + Else + + If SpiralOnline = "true" Then + If InternationalEnable = 1 Then + If CountryName = "Thailand" Then + OpenInst 3 "ROOT/taobin_project/xml/topview2.xml" + Open "/mnt/sdcard/coffeevending/taobin_project/xml/page_catalog.lxml" + EndIf + Else + Open "/mnt/sdcard/coffeevending/taobin_project/xml/page_catalog_with_vending.xml" + EndIf + Else + If InternationalEnable = 1 Then + OpenInst 3 "ROOT/taobin_project/xml/topview2.xml" + OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_catalog.lxml" + Else + OpenInst 2 "/mnt/sdcard/coffeevending/taobin_project/xml/page_catalog.xml" + EndIf + + EndIf + + EndIf + + TopView "show" diff --git a/inter/whatthecup/sgp/xml/page_payment_cash-SGP_blue.xml b/inter/whatthecup/sgp/xml/page_payment_cash-SGP_blue.xml index b9942e7c..c78f75fa 100644 --- a/inter/whatthecup/sgp/xml/page_payment_cash-SGP_blue.xml +++ b/inter/whatthecup/sgp/xml/page_payment_cash-SGP_blue.xml @@ -24,7 +24,9 @@ Var PreScaleCanculate = 100 DEBUGVAR VendingCashless - CashlessReq FAIL "" + + Var WaitForStableCashlessState = 0 + DEBUGVAR WaitForStableCashlessState Var CashlessPayFlag = 0 @@ -478,6 +480,9 @@ Var CancelContinue = 0 Var QR_POPUP = "ROOT/taobin_project/inter/whatthecup/sgp/image/page_payment/img_tap_card_5_sec.png" + + Var CountDownAllowCancel = 5 + @@ -706,6 +711,7 @@ If VendingCashless = "OK" Then DEBUGVAR CashlessCode + DEBUGVAR "Ok make::drink" Var Timeout = 0 Var QRErrorState = "Invisible" @@ -728,7 +734,9 @@ DEBUGVAR UserChoosePayment Var UserChoosePayment = "" Open "ROOT/taobin_project/xml/page_thankyou.xml" - + Else + DEBUGVAR "VendingCashless get ActOk not ok" + DEBUGVAR VendingCashless EndIf @@ -805,37 +813,37 @@ DEBUGVAR UserChoosePayment DEBUGVAR VendingCashless - If UserChoosePayment = "CreditCashless" Then - If VendingCashless = "READY" Then - Var QRCODE99 = "" - Var Timeout = 0 - Var QRErrorState = "Invisible" - Var QR_POPUP = "ROOT/taobin_project/image/page_payment_en/page_payment/img_popup8-2.png" - Var VendingCashless = "-" - Var LOADING_STATE = "Enable" - Var alphaState = "Enable" - Var RemainAmountX = PayAmount - Seeker.IntVendingCampaign - CashlessPay RemainAmountX CreditCardRef - Var CashlessPayFlag = 1 + If UserChoosePayment = "CreditCashless" Then + If VendingCashless = "READY" Then + Var QRCODE99 = "" + Var Timeout = 0 + Var QRErrorState = "Invisible" + Var QR_POPUP = "ROOT/taobin_project/image/page_payment_en/page_payment/img_popup8-2.png" + Var VendingCashless = "-" + Var LOADING_STATE = "Enable" + Var alphaState = "Enable" + Var RemainAmountX = PayAmount - Seeker.IntVendingCampaign + CashlessPay RemainAmountX CreditCardRef + Var CashlessPayFlag = 1 + EndIf EndIf - EndIf - If UserChoosePayment = "" Then - If VendingCashless = "READY" Then - Var QRCODE99 = "" - Var Timeout = 0 - Var QRErrorState = "Invisible" - Var QR_POPUP = "ROOT/taobin_project/image/page_payment_en/page_payment/img_popup8-2.png" - Var VendingCashless = "-" - Var LOADING_STATE = "Enable" - Var alphaState = "Enable" - Var RemainAmountX = PayAmount - Seeker.IntVendingCampaign - CashlessPay RemainAmountX CreditCardRef - Var CashlessPayFlag = 1 + If UserChoosePayment = "" Then + If VendingCashless = "READY" Then + Var QRCODE99 = "" + Var Timeout = 0 + Var QRErrorState = "Invisible" + Var QR_POPUP = "ROOT/taobin_project/image/page_payment_en/page_payment/img_popup8-2.png" + Var VendingCashless = "-" + Var LOADING_STATE = "Enable" + Var alphaState = "Enable" + Var RemainAmountX = PayAmount - Seeker.IntVendingCampaign + CashlessPay RemainAmountX CreditCardRef + Var CashlessPayFlag = 1 - Var UserChoosePayment = "CreditCashless" + Var UserChoosePayment = "CreditCashless" + EndIf EndIf - EndIf EndIf @@ -859,7 +867,11 @@ DEBUGVAR VendingCashless + DEBUGVAR CountDownAllowCancel + If CountDownAllowCancel > 0 Then + Var CountDownAllowCancel = CountDownAllowCancel - 1 + EndIf If ReadyForBrew = "false" Then SAVELOG "Back to main1" @@ -1633,6 +1645,7 @@ If alphaState = "Invisible" Then DEBUGVAR QR_POPUP Refresh Var alphaState = "Enable" + Var CountDownAllowCancel = 5 Coin CARD EndIf EndIf @@ -1844,7 +1857,13 @@ EndIf + + + + + + + + + + + + + + + + + + + + + + + + 0 + 873 + 1080 + Center + 62 + RobotoBlack + 0x513C2F + TelephoneNumber + Telnum-mask-1 + + + + + + + +; title text +; TODO-will-apply-lang + + 188 + 699 + "ROOT/taobin_project/image/feature/alert_sms/text_1.png" + + +; Border Edit + + 217 + 866 + "ROOT/taobin_project/image/collect_point1/img3.png" + + + + 157 + 868 + ShowTextNumber + Var( DirImage + "/text_edit.png") + + + + + 236 + 699 + eval( + If FromProThaiTea = 1 Then + Var return = "Enable" + Else + If FromProYuzu = 1 Then + Var return = "Invisible" + Else + Var return = "Enable" + EndIf + EndIf +) + Var( DirImage + "/edit.png") + + + \ No newline at end of file diff --git a/xml/features/alert_sms/page_send_sms.lxml b/xml/features/alert_sms/page_send_sms.lxml new file mode 100644 index 00000000..c7091d63 --- /dev/null +++ b/xml/features/alert_sms/page_send_sms.lxml @@ -0,0 +1,91 @@ + + "Enable" + 1080 + 1920 + "0xeae6e1" + SoundVolume +; "Partial" + + + + If show_eng = "true" Then + Var DirImage = "ROOT/taobin_project/image/collectiing_en" + Else + Var DirImage = "ROOT/taobin_project/image/collectiing" + EndIf + + + DEBUGVAR CurrentAlertName + DEBUGVAR CurrentAlertProductCode + DEBUGVAR TelephoneNumberX + + NotifyCustomerMenuReady TelephoneNumberX CurrentAlertProductCode CurrentAlertName + + + + + + + + + + + 1000 + + + Var Timeout = Timeout + 1 + If Timeout > 10 Then + TabMenuVisibleInst 99 + + RootLayoutVisible 13 "hide" + + Var AlertSMSButtonPause = "false" + + Var OpenFromMulti = 1 + OpenInst 2 "ROOT/taobin_project/inter/tha/xml/multi/page_catalog.lxml" + EndIf + + Refresh + TimerReset + + + + + 0 + 380 + "ROOT/taobin_project/image/collectiing/alpha.png" + + + + 158 + 665 + "ROOT/taobin_project/image/collectiing/img_popup1.png" + + +; --------------------- + + + 189 + 1004 + "ROOT/taobin_project/image/feature/alert_sms/Success.png" + + + + + + diff --git a/xml/features/alert_sms/reset_lock.ev b/xml/features/alert_sms/reset_lock.ev new file mode 100644 index 00000000..33f51db0 --- /dev/null +++ b/xml/features/alert_sms/reset_lock.ev @@ -0,0 +1,4 @@ +; do-not-call + +WRITE_FILE "/mnt/sdcard/coffeevending/lock_sms" "0" +WRITE_FILE "/mnt/sdcard/coffeevending/current_alert_times" 0 \ No newline at end of file diff --git a/xml/page_board.xml b/xml/page_board.xml index b077fa02..3539e6a0 100644 --- a/xml/page_board.xml +++ b/xml/page_board.xml @@ -129,6 +129,9 @@ Var ShowButtonClickFull = "Invisible" Var ShowButtonClick2 = "Invisible" + Var ShowButtonClick_WTC = "Invisible" + Var ShowButtonClickFull_WTC = "Invisible" + ;SAVELOG DisplayType If DisplayType = "2" Then @@ -210,9 +213,9 @@ STRCONTAIN "1037" MaterialAvailable 7UpSyrupEnable STRCONTAIN "1038" MaterialAvailable PepsiHighYSyrupEnable STRCONTAIN "1052" MaterialAvailable CollagenPowderEnable - + STRCONTAIN "1062" MaterialAvailable MatchaPowderEnable - + STRCONTAIN "1065" MaterialAvailable HaveIngredientOvaltine ;Var AppFastEnable = "false" @@ -284,7 +287,7 @@ If TermTemOnline = "false" Then ; TODO Machine Initial - Open "/ROOT/xml/outservice.xml" + OpenInst 0 "/ROOT/xml/outservice.xml" EndIf EndIf @@ -547,7 +550,7 @@ EndIf If ConnectWithPOSMachine = 1 Then - Open "ROOT/taobin_project/xml/page_network_down_pos_machine.xml" + OpenInst 0 "ROOT/taobin_project/xml/page_network_down_pos_machine.xml" EndIf EndIf @@ -652,6 +655,7 @@ DEBUGVAR EventTurnOn Var UsePepsiTheme = 0 + Var PepsiFullScreenPageBoard = "ROOT/taobin_project/inter/whatthecup/common/xml/feature.page_board_fullscreen/page_board_wtc.lxml" Var NoTrickPriceProfile = 0 Var NeedRefreshProfile = 0 @@ -663,6 +667,11 @@ READ_FILE "/mnt/sdcard/enable_load_lang_fast" ENABLE_LOAD_LANG_V2 STRCONTAIN "1" ENABLE_LOAD_LANG_V2 UseLoadLangV2 + ; very-big-btn-init + Var UseVeryBigRemoveCupButton = "false" + + Var EnablePepsiFullscreen = 0 + ;inter-page-board If CountryName = "Malaysia" Then @@ -738,6 +747,25 @@ STRCONTAIN "1215" MaterialAvailable SugarZeroCalEnable + STRCONTAIN "9502" MaterialAvailable CupPlastic9502Enable + STRCONTAIN "9512" MaterialAvailable CupPaper9512Enable + + DEBUGVAR MaterialAvailable + DEBUGVAR CupPlastic9502Enable + DEBUGVAR CupPaper9512Enable + + If CupPlastic9502Enable = "true" Then + SET-MENU-SHOW 1 + Else + If CupPaper9512Enable = "true" Then + SET-MENU-SHOW 2 + EndIf + Endif + + DEBUGVAR XSlot + + + Var MinPhoneNumber = 10 Var MaxPhoneNumber = 11 @@ -978,7 +1006,9 @@ ; Var = "/mnt/sdcard/coffeevending/taobin_project/xml/page_advert.xml" OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/sold_cup_count.xml" + ;OpenInst 2 PepsiFullScreenPageBoard + ;Var EnablePepsiFullscreen = 1 EndIf @@ -1061,7 +1091,7 @@ EnableLanguage "ENG" EnableLanguage "MSC" EnableLanguage "MTC" - Var LanguageShow = "ENG" + Var LanguageShow = "ENG" SetLanguage "ENG" LanguageControl "UpdateList" "-" @@ -1342,7 +1372,7 @@ RootLayoutVisible 3 "hide" If SELLSTATUS = "DEACTIVE" Then - Open "/ROOT/xml/offline.xml" + OpenInst 0 "/ROOT/xml/offline.xml" EndIf Var CheckCupStateDoorCupClose = "" @@ -1356,8 +1386,6 @@ Var btnRemoveCupY = 630 Var btnRemoveCupYNotPageBoard = 500 - Var UseVeryBigRemoveCupButton = "false" - If UseVeryBigRemoveCupButton = "true" Then Var btnRemoveCupX = 580 Var btnRemoveCupY = 530 @@ -1511,12 +1539,21 @@ If UsePepsiTheme = 1 Then Var ShowButtonClickFull = "Enable" + + If EnablePepsiFullscreen = 1 Then + Var ShowButtonClickFull = "Invisible" + Var ShowButtonClickFull_WTC = "Enable" + EndIf + EndIf Else Var ShowButtonClick = "Invisible" Var ShowButtonClickFull = "Invisible" + + Var ShowButtonClick_WTC = "Invisible" + Var ShowButtonClickFull_WTC = "Invisible" EndIf Var onResume = "false" @@ -1526,6 +1563,18 @@ Machine NewPaymentOpenBrewingXMLEnable ;include="ROOT/taobin_project/inter/tha/xml/multi/tab_menu_hide.lxml" + + If EnablePepsiFullscreen = 1 Then + DEBUGVAR EnablePepsiFullscreen + TopView "hide" + RootLayoutVisible 2 "show" + + Var ShowButtonClick_WTC = "Enable" + Var ShowButtonClickFull_WTC = "Enable" + + OpenInst 2 PepsiFullScreenPageBoard + EndIf + @@ -1755,14 +1804,14 @@ PRICE "Reset" "-" If CNTDOWN_PROTECT_SCREEN_BLANK = 0 Then SAVELOG "CNTDOWN_PROTECT_SCREEN_BLANK" - Open "ROOT/taobin_project/xml/page_board.xml" + OpenInst 0 "ROOT/taobin_project/xml/page_board.xml" EndIf If IgnoreNetCore = "true" Then Else If SELLSTATUS = "DEACTIVE" Then - Open "/ROOT/xml/offline.xml" + OpenInst 0 "/ROOT/xml/offline.xml" EndIf If NoWaitMachineEnable = 1 Then @@ -1842,7 +1891,7 @@ PRICE "Reset" "-" EndIf If MachineStage = "remove-cup" Then - Open "ROOT/taobin_project/xml/page_remove_cup.xml" + OpenInst 0 "ROOT/taobin_project/xml/page_remove_cup.xml" EndIf @@ -1896,6 +1945,12 @@ PRICE "Reset" "-" If UsePepsiTheme = 1 Then Var ShowButtonClickFull = "Enable" + + If EnablePepsiFullScreen = "true" Then + Var ShowButtonClickFull = "Invisible" + Var ShowButtonClickFull_WTC = "Enable" + EndIf + EndIf If InternationalEnable = 1 Then If CountryName = "Thailand" Then @@ -1914,6 +1969,11 @@ PRICE "Reset" "-" If UsePepsiTheme = 1 Then Var ShowButtonClickFull = "Enable" + + If EnablePepsiFullScreen = "true" Then + Var ShowButtonClickFull = "Invisible" + Var ShowButtonClickFull_WTC = "Enable" + EndIf EndIf @@ -1929,15 +1989,18 @@ PRICE "Reset" "-" DEBUGVAR CountDownPauseVideo2 If CountDownPauseVideo = 2 Then - - TapScreen 30 638 + If EnablePepsiFullscreen = 0 Then + TapScreen 30 638 + EndIf EndIf If CountDownPauseVideo = 1 Then - TapScreen 860 1004 + If EnablePepsiFullscreen = 0 Then + TapScreen 860 1004 + EndIf EndIf @@ -1988,7 +2051,7 @@ PRICE "Reset" "-" Machine DoorClose TopView "show" - Open "/mnt/sdcard/coffeevending/taobin_project/xml/page_main_blank.xml" + OpenInst 0 "/mnt/sdcard/coffeevending/taobin_project/xml/page_main_blank.xml" EndIf EndIf diff --git a/xml/sometime/script_open_page_show_error.ev b/xml/sometime/script_open_page_show_error.ev index d3e87cc1..e13c931a 100644 --- a/xml/sometime/script_open_page_show_error.ev +++ b/xml/sometime/script_open_page_show_error.ev @@ -8,14 +8,14 @@ If InternationalEnable = 1 Then Else If CountryName = "Singapore" Then - Open "ROOT/taobin_project/inter/sgp/xml/page_show_error.lxml" + OpenInst 0 "ROOT/taobin_project/inter/sgp/xml/page_show_error.lxml" EndIf If CountryName = "UnitedArabEmirates Dubai" Then Open "ROOT/taobin_project/inter/uae_dubai/xml/page_show_error.lxml" EndIf - Open "ROOT/taobin_project/xml/page_show_error.lxml" + OpenInst 0 "ROOT/taobin_project/xml/page_show_error.lxml" EndIf Else diff --git a/xml/topview2.xml b/xml/topview2.xml index 70bc54fc..ae8819f9 100644 --- a/xml/topview2.xml +++ b/xml/topview2.xml @@ -161,16 +161,28 @@ DEBUGVAR LanguageButtonEnable + Var CheckDisableTimeout = 0 + + TRY "ROOT/taobin_project/xml/features/alert_sms/check_disable.ev" + 1000 ;DEBUGVAR Top2Timeout Var Top2Timeout = Top2Timeout + 1 + Var CheckDisableTimeout = CheckDisableTimeout + 1 + If Top2Timeout = 15 Then Open "ROOT/taobin_project/xml/topview2.xml" EndIf + + If CheckDisableTimeout > 5 Then + TRY "ROOT/taobin_project/xml/features/alert_sms/check_disable.ev" + Var CheckDisableTimeout = 0 + Endif + If TimeForClose > 0 Then Var TimeForClose = TimeForClose - 1 DEBUGVAR TimeForClose