Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
third-party
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
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
cooperatic-foodcoops
third-party
Commits
edd0e0df
Commit
edd0e0df
authored
Jun 03, 2022
by
François C.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#3037 Fix wrong next step in inventory processus
parent
cc917b9e
Pipeline
#2251
passed with stage
in 1 minute 26 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
shelf_inventory.js
shelfs/static/js/shelf_inventory.js
+7
-6
No files found.
shelfs/static/js/shelf_inventory.js
View file @
edd0e0df
...
@@ -851,9 +851,12 @@ function send() {
...
@@ -851,9 +851,12 @@ function send() {
contentType
:
"application/json; charset=utf-8"
,
contentType
:
"application/json; charset=utf-8"
,
data
:
JSON
.
stringify
(
shelf
),
data
:
JSON
.
stringify
(
shelf
),
success
:
function
(
data
)
{
success
:
function
(
data
)
{
let
next_step_call
=
back
;
// If step 1, display additionnal message in validation popup
// If step 1, display additionnal message in validation popup
if
(
shelf
.
inventory_status
==
''
)
{
if
(
shelf
.
inventory_status
==
''
)
{
inventory_validated_msg
.
find
(
'#step1_validated'
).
show
();
inventory_validated_msg
.
find
(
'#step1_validated'
).
show
();
next_step_call
=
refresh
;
}
}
if
(
typeof
data
.
res
.
inventory
!=
'undefined'
)
{
if
(
typeof
data
.
res
.
inventory
!=
'undefined'
)
{
...
@@ -867,12 +870,10 @@ function send() {
...
@@ -867,12 +870,10 @@ function send() {
var
msg
=
(
originView
==
'shelf'
)
?
'OK, je passe à la suite !'
:
'Retour'
;
var
msg
=
(
originView
==
'shelf'
)
?
'OK, je passe à la suite !'
:
'Retour'
;
// Go to step 2 if step 1 is validated and modal closed
// Go to next step if modal closed
openModal
(
inventory_validated_msg
.
html
(),
refresh
,
msg
,
true
,
false
);
openModal
(
inventory_validated_msg
.
html
(),
next_step_call
,
msg
,
true
,
false
);
$
(
'#modal_closebtn_top'
).
on
(
'click'
,
next_step_call
);
// Go to step 2 if modal is closed
$
(
'#modal_closebtn_bottom'
).
on
(
'click'
,
next_step_call
);
$
(
'#modal_closebtn_top'
).
on
(
'click'
,
refresh
);
$
(
'#modal_closebtn_bottom'
).
on
(
'click'
,
refresh
);
// Clear local storage before leaving
// Clear local storage before leaving
localStorage
.
removeItem
(
originView
+
'_'
+
shelf
.
id
);
localStorage
.
removeItem
(
originView
+
'_'
+
shelf
.
id
);
...
...
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