var qStr = document.location.search.replace(/\?/g, '');
var fullUrl = document.location.href;
var actionString = '';
if (qStr.indexOf('orderCreated=1') !== -1) {
actionString = 'orderCreated=1';
ehm.modal.present({
title: "#{msgs['phk.orders.created.heading']}",
body: "#{msgs['phk.orders.created.text']}"
});
} else if (qStr.indexOf('orderCancelled=1') !== -1) {
actionString = 'orderCancelled=1';
ehm.modal.present({
body: "#{msgs['phk.orders.cancelled.message']}"
});
} else if (qStr.indexOf('orderAlreadyCreated=1') !== -1) {
actionString = 'orderAlreadyCreated=1';
ehm.modal.present({
body: "#{msgs['phk.orders.order-already-exist']}"
});
} else if (qStr.indexOf('synchronizationStarted=1') !== -1) {
actionString = 'synchronizationStarted=1';
ehm.modal.present({
body: "#{msgs['phk.orders.synchronization-started']}"
});
}
if (actionString !== '') {
window.history.pushState({}, '', fullUrl.split(actionString).join(''));
}
Comments