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
eff4f693
Commit
eff4f693
authored
Jul 21, 2021
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
linting
parent
61ffcad7
Pipeline
#1252
passed with stage
in 1 minute 22 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
26 deletions
+26
-26
orders_helper.js
orders/static/js/orders_helper.js
+26
-26
No files found.
orders/static/js/orders_helper.js
View file @
eff4f693
...
...
@@ -1553,35 +1553,35 @@ function update_order_selection_screen() {
dbc
.
allDocs
({
include_docs
:
true
})
.
then
(
function
(
result
)
{
.
then
(
function
(
result
)
{
// Remove listener before recreating them
$
(
".order_pill"
).
off
();
let
existing_orders_container
=
$
(
"#existing_orders"
);
existing_orders_container
.
empty
();
$
(
'#new_order_name'
).
val
(
''
);
if
(
result
.
rows
.
length
===
0
)
{
existing_orders_container
.
append
(
`<i>Aucune commande en cours...</i>`
);
}
else
{
for
(
let
row
of
result
.
rows
)
{
let
template
=
$
(
"#templates #order_pill_template"
);
template
.
find
(
".pill_order_name"
).
text
(
row
.
id
);
existing_orders_container
.
append
(
template
.
html
());
$
(
".order_pill"
).
off
();
let
existing_orders_container
=
$
(
"#existing_orders"
);
existing_orders_container
.
empty
();
$
(
'#new_order_name'
).
val
(
''
);
if
(
result
.
rows
.
length
===
0
)
{
existing_orders_container
.
append
(
`<i>Aucune commande en cours...</i>`
);
}
else
{
for
(
let
row
of
result
.
rows
)
{
let
template
=
$
(
"#templates #order_pill_template"
);
template
.
find
(
".pill_order_name"
).
text
(
row
.
id
);
existing_orders_container
.
append
(
template
.
html
());
}
$
(
".order_pill"
).
on
(
"click"
,
order_pill_on_click
);
}
$
(
".order_pill"
).
on
(
"click"
,
order_pill_on_click
);
}
resolve
();
})
.
catch
(
function
(
err
)
{
alert
(
'Erreur lors de la synchronisation des commandes. Vous pouvez créer une nouvelle commande.'
);
console
.
log
(
err
);
});
resolve
();
})
.
catch
(
function
(
err
)
{
alert
(
'Erreur lors de la synchronisation des commandes. Vous pouvez créer une nouvelle commande.'
);
console
.
log
(
err
);
});
});
}
...
...
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