Commit c71f1b73 authored by gaseema.n's avatar gaseema.n

inventory update

parent b6328da5
...@@ -120,7 +120,9 @@ angular.module('sokoApp', []) ...@@ -120,7 +120,9 @@ angular.module('sokoApp', [])
} }
if (getBitsWinOpt('page') == 'inventory') { if (getBitsWinOpt('page') == 'inventory') {
openInventoryPage(); openInventoryPage();
$('#spnsrdModal').modal('open'); if(getBitsWinOpt('sel')=="add"){
$('#spnsrdModal').modal('open');
}
} }
} }
......
...@@ -41,9 +41,9 @@ function sponpProdNamesInput() { ...@@ -41,9 +41,9 @@ function sponpProdNamesInput() {
}); });
var remainingTime = 7 - moment().format("d"); var remainingTime = 7 - moment().format("d");
if(remainingTime == 1){ if (remainingTime == 1) {
document.getElementById('invetoryEndDate').innerHTML = remainingTime + " day"; document.getElementById('invetoryEndDate').innerHTML = remainingTime + " day";
}else{ } else {
document.getElementById('invetoryEndDate').innerHTML = remainingTime + " days"; document.getElementById('invetoryEndDate').innerHTML = remainingTime + " days";
} }
} }
...@@ -105,6 +105,7 @@ $(document).on('click touchstart', '.inventoryItems', function(e) { ...@@ -105,6 +105,7 @@ $(document).on('click touchstart', '.inventoryItems', function(e) {
} else { } else {
$("#rmvSpnsrdProd").attr("sid", getId) $("#rmvSpnsrdProd").attr("sid", getId)
$("#rmvSpnsrdProd").css('display', 'block'); $("#rmvSpnsrdProd").css('display', 'block');
$('#inventoryItem' + getId).prop('checked', true);
$(document).on('touchstart click', '#yesSponsoredBtn', function(event) { $(document).on('touchstart click', '#yesSponsoredBtn', function(event) {
var sponsoredID = $("#rmvSpnsrdProd").attr("sid"); var sponsoredID = $("#rmvSpnsrdProd").attr("sid");
$(this).unbind(event); $(this).unbind(event);
...@@ -116,8 +117,7 @@ $(document).on('click touchstart', '.inventoryItems', function(e) { ...@@ -116,8 +117,7 @@ $(document).on('click touchstart', '.inventoryItems', function(e) {
}).then(function(e) { }).then(function(e) {
if (e.status == 'ok') { if (e.status == 'ok') {
$("#rmvSpnsrdProd").hide(); $("#rmvSpnsrdProd").hide();
document.getElementById(id).remove(); $('#inventoryItem15').prop('checked', false);
document.getElementById("sprdprod_" + id).remove();
M.toast({ M.toast({
html: 'Inventory item removed successfully', html: 'Inventory item removed successfully',
displayLength: 3000 displayLength: 3000
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment