let _lang=$("#tabs").attr("data-lang");DevExpress.localization.locale(_lang);var assetUrl=getCookie("asset_url");document.oncontextmenu=function(){return!1};var actionSheetItems=[{text:"vi"===_lang?"Chi ti\u1ebft":"\u8a73\u7d30",id:1},{text:"vi"===_lang?"DSKH h\xf4m nay":"\u672c\u65e5\u6765\u5e97",id:2},{text:"vi"===_lang?"Qu\u1ea3n l\xfd ch\u1ed7 ng\u1ed3i":"\u30d5\u30ed\u30a2\u30de\u30cd\u30fc\u30b8\u30e1\u30f3\u30c8",id:3}];function getCookie(t){for(var e=t+"=",a=decodeURIComponent(document.cookie),n=a.split(";"),i=0;i<n.length;i++){var r=n[i];while(" "==r.charAt(0))r=r.substring(1);if(0==r.indexOf(e))return r.substring(e.length,r.length)}return""}$((function(){function t(t,e){return $.ajax({url:t,type:"POST",data:e,async:!1,timeout:3e4,dataType:"json",success:function(t){},error:function(t){}}).responseJSON}$("#tabs").attr("data-store"),$("#tabs").attr("data-clientIP"),$("#tabs").attr("data-serverip"),$("#tabs").attr("data-port_web"),a("");var e=$("#action-sheet").dxActionSheet({dataSource:actionSheetItems,title:"vi"===_lang?"Truy c\u1eadp":"\u30a2\u30af\u30b7\u30e7\u30f3",usePopover:!1,onItemClick:function(t){if(1===t.itemData.id){var e=n("customer/visit-customers/update/"+$("#list .name").attr("data-id"));window.open(e,"_blank")}else if(2===t.itemData.id){e=n("customer/visit-customers");window.open(e,"_blank")}else if(3===t.itemData.id){e=n("floor-manager");window.open(e,"_blank")}}}).dxActionSheet("instance");$branchID=$("#tabs").attr("data-branchid");$("#list").dxList({dataSource:t(n("notAuth/visit-customers/today"),{BranchID:$branchID}),itemTemplate:function(t,e,a){a.parent().before($("<div class='date' />").text(t.created_at));var n="",i=t.carType;"undefined"!==typeof t.staff&&t.staff.length>0&&(n="vi"===_lang?"Ph\u1ee5 tr\xe1ch: ":"\u62c5\u5f53: "+t.staff),"undefined"!==typeof t.carColor&&t.carColor.length>0&&(i=t.carType+"-"+t.carColor),a.append($("<div class='name' data-id="+t.id+"/>").text(t.customerName),$("<div class='plate' />").text(t.plate),$("<div class='cartype' />").text(i),$("<div class='staff' />").text(n),$("<div class='reversion' />").text(t.purpose))},onItemClick:function(t){t.itemData.seq,e.option("target",t.itemElement),e.option("visible",!0)}}).dxList("instance");function a(t){var e=new Date,a=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),i=e.getFullYear();return e=i+t+n+t+a,e}document.createElement("AUDIO");function n(t){return assetUrl+"/"+t}}));