Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
soko
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bitsoko services
soko
Commits
b6328da5
Commit
b6328da5
authored
Dec 10, 2018
by
gaseema.n
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inventory update
parent
ee6d8f00
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
index.html
index.html
+1
-1
inventory.js
js/inventory.js
+8
-8
No files found.
index.html
View file @
b6328da5
...
...
@@ -1522,7 +1522,7 @@
</div>
</div>
</div>
<div
style=
" text-align: center; padding-bottom: 10px; font-weight: bold;"
>
Prices valid
until
<span
id=
"invetoryEndDate"
>
21st December
</span></div>
<div
style=
" text-align: center; padding-bottom: 10px; font-weight: bold;"
>
Prices valid
for the next
<span
id=
"invetoryEndDate"
>
1 day
</span></div>
</div>
<!-- newPromo Modal Start -->
<div
id=
"newPromoModal"
class=
"modal modal-fixed-footer"
>
...
...
js/inventory.js
View file @
b6328da5
...
...
@@ -26,11 +26,12 @@ function sponpProdNamesInput() {
var
itemName
=
sponProds
[
iii
].
name
;
var
itemPrice
=
sponProds
[
iii
].
price
;
var
itemId
=
sponProds
[
iii
].
id
;
var
itemIcon
=
sponProds
[
iii
].
icon
;
if
(
itemName
.
toLowerCase
()
==
"eggs"
)
{
$
(
'.inventoryItemsToAdd'
).
append
(
'<form action="#" style="padding-right: 20px;"> <p> <label> <input class="inventoryItems" type="checkbox" pid="'
+
itemId
+
'" id="inventoryItem'
+
itemId
+
'"/> <span><img src="
/images/inventory/eggs.jpeg" style=" width: 25px; height: 25px; object-fit: cover; border-radius: 50%; float: left; margin-right: 10px;">'
+
itemName
+
' @ 270
per tray</span> </label> </p></form>'
);
$
(
'.inventoryItemsToAdd'
).
append
(
'<form action="#" style="padding-right: 20px;"> <p> <label> <input class="inventoryItems" type="checkbox" pid="'
+
itemId
+
'" id="inventoryItem'
+
itemId
+
'"/> <span><img src="
'
+
itemIcon
+
'" style=" width: 25px; height: 25px; object-fit: cover; border-radius: 50%; float: left; margin-right: 10px;">'
+
itemName
+
' @ '
+
itemPrice
+
'
per tray</span> </label> </p></form>'
);
}
if
(
itemName
.
toLowerCase
()
==
"potatoes"
)
{
$
(
'.inventoryItemsToAdd'
).
append
(
'<form action="#" style="padding-right: 20px;"> <p> <label> <input class="inventoryItems" type="checkbox" pid="'
+
itemId
+
'" id="inventoryItem'
+
itemId
+
'"/> <span><img src="
/images/inventory/potatoes.jpg" style=" width: 25px; height: 25px; object-fit: cover; border-radius: 50%; float: left; margin-right: 10px;">'
+
itemName
+
' @ 37
per kg</span> </label> </p></form>'
);
$
(
'.inventoryItemsToAdd'
).
append
(
'<form action="#" style="padding-right: 20px;"> <p> <label> <input class="inventoryItems" type="checkbox" pid="'
+
itemId
+
'" id="inventoryItem'
+
itemId
+
'"/> <span><img src="
'
+
itemIcon
+
'" style=" width: 25px; height: 25px; object-fit: cover; border-radius: 50%; float: left; margin-right: 10px;">'
+
itemName
+
' @ '
+
itemPrice
+
'
per kg</span> </label> </p></form>'
);
}
if
(
invetoryItemsInStore
.
includes
(
itemId
)
==
true
)
{
...
...
@@ -39,13 +40,12 @@ function sponpProdNamesInput() {
}
});
function
daysRemaining
()
{
var
eventdate
=
moment
(
"2018-12-14"
)
;
var
todaysdate
=
moment
();
return
eventdate
.
diff
(
todaysdate
,
'days'
)
;
var
remainingTime
=
7
-
moment
().
format
(
"d"
);
if
(
remainingTime
==
1
)
{
document
.
getElementById
(
'invetoryEndDate'
).
innerHTML
=
remainingTime
+
" day"
;
}
else
{
document
.
getElementById
(
'invetoryEndDate'
).
innerHTML
=
remainingTime
+
" days"
;
}
document
.
getElementById
(
'invetoryEndDate'
).
innerHTML
=
daysRemaining
();
}
//Process Inventory Order
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment