issue #11 Add notification popup message when there is no ordered amenity item.
This commit is contained in:
@@ -295,7 +295,7 @@ HotelTV.ui_appfull = (function() {
|
||||
_state.menu.stage.cur=="tvPreparing" )
|
||||
{
|
||||
console.warn("HDMI input doesn't work tv mode");
|
||||
//신규 메시지 볼룬팝업
|
||||
//HDMI사용불가 말풍선 출력
|
||||
HotelTV.ui_utils.ShowNotificationMsgBalloon(_trTbl.system.notice.event.external_input.hdmi_unavailable[_state.lang], 5);
|
||||
return;
|
||||
}
|
||||
@@ -533,13 +533,7 @@ HotelTV.ui_appfull = (function() {
|
||||
case "build":
|
||||
{
|
||||
let _total_quantity = 0;
|
||||
|
||||
try {
|
||||
HotelTV.orders.amenity = _RsOrder = await HotelTV.api.GetAmenityOrders(null);
|
||||
} catch (_error) {
|
||||
console.log(`Fail to call API::> ${_error}`);
|
||||
return;
|
||||
}
|
||||
_AmOrder = HotelTV.orders.amenity;
|
||||
|
||||
_elAmOLstRoot.children(`#title`).text(_trTbl.ui.amenity.title.orderdetails[_state.lang]);
|
||||
_elAmOLstRoot.children(`#usage`).text(_trTbl.ui.amenity.usage.details[_state.lang]);
|
||||
@@ -554,8 +548,8 @@ HotelTV.ui_appfull = (function() {
|
||||
_elAmOLstItemTblRec.children('tr').remove();
|
||||
}
|
||||
|
||||
for (let _idx = 1; _idx <= _RsOrder.orders.length; _idx++) {
|
||||
let _Order = _RsOrder.orders[_idx];
|
||||
for (let _idx = 1; _idx <= _AmOrder.orders.length; _idx++) {
|
||||
let _Order = _AmOrder.orders[_idx];
|
||||
|
||||
var _eltr_ordering = document.createElement('tr');
|
||||
_eltr_ordering.setAttribute("id", _Order.id);
|
||||
@@ -651,7 +645,8 @@ HotelTV.ui_appfull = (function() {
|
||||
var _elTbl_OdItemsRec = document.createElement('table');
|
||||
_elTbl_OdItemsRec.className = "tbl_record";
|
||||
|
||||
let _elTBody_OdItmesRec = document.createElement('tbody'); {
|
||||
let _elTBody_OdItmesRec = document.createElement('tbody');
|
||||
{
|
||||
_elTBody_OdItmesRec.setAttribute("id", "record");
|
||||
for (let _j = 1; _j <= _Order.items.length; _j++) {
|
||||
let _OdItem = _Order.items[_j];
|
||||
@@ -691,7 +686,7 @@ HotelTV.ui_appfull = (function() {
|
||||
// Draw Total Amount and Quantity
|
||||
_elAmOLstSummary.children(`#title`).text(_trTbl.ui.amenity.title.sum[_state.lang]);
|
||||
_elAmOLstSummary.children(`#quantity`).text(_total_quantity);
|
||||
_elAmOLstSummary.children(`#amount`).text(_RsOrder.amount[_state.lang].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + _amenity.currency[_state.lang]);
|
||||
_elAmOLstSummary.children(`#amount`).text(_AmOrder.amount[_state.lang].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + _amenity.currency[_state.lang]);
|
||||
|
||||
// Activate first order lists
|
||||
_elAmOLstItemTblRec.children('tr').first().addClass('active');
|
||||
@@ -1226,12 +1221,27 @@ HotelTV.ui_appfull = (function() {
|
||||
_state.hotkey.mm[_opening.amenity.button].status.cartlist.idx = "confirm";
|
||||
break;
|
||||
case "details":
|
||||
// Hide Menu
|
||||
_elAmMnRoot.hide();
|
||||
// Check ordered amenity item count
|
||||
try {
|
||||
HotelTV.orders.amenity = _AmOrder = await HotelTV.api.GetAmenityOrders(null);
|
||||
|
||||
// Build Order details
|
||||
_state.hotkey.mm[_amenity.button].status.focus = "orderdetails";
|
||||
__uifxn_AppFull_DrawAmenityOrderList(true, "build");
|
||||
if ( _AmOrder.orders.length>1 )
|
||||
{
|
||||
// Hide Menu
|
||||
_elAmMnRoot.hide();
|
||||
|
||||
// Build Order details
|
||||
_state.hotkey.mm[_amenity.button].status.focus = "orderdetails";
|
||||
__uifxn_AppFull_DrawAmenityOrderList(true, "build");
|
||||
}
|
||||
else
|
||||
{
|
||||
//주문된 Amenity 아이탬이 없음을 알리는 말풍선
|
||||
HotelTV.ui_utils.ShowNotificationMsgBalloon(_trTbl.ui.roomservice.usage.emptyorder[_state.lang], 5);
|
||||
}
|
||||
} catch (_error) {
|
||||
console.log(`Fail to call API::> ${_error}`);
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else if (_state.hotkey.mm[_amenity.button].status.focus == "cartlist") {
|
||||
|
||||
Reference in New Issue
Block a user