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
f4fd7818
Commit
f4fd7818
authored
Aug 30, 2021
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP detect orders missing from groups
parent
76f40537
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
reception_index.js
reception/static/js/reception_index.js
+13
-2
No files found.
reception/static/js/reception_index.js
View file @
f4fd7818
...
...
@@ -103,18 +103,29 @@ function goto(id) {
* @param {int} group_index index of group in groups array
*/
function
group_goto
(
group_index
)
{
let
missing_orders
=
[];
// Make sure a couchdb document exists for all group's orders
for
(
let
i
in
order_groups
.
groups
[
group_index
])
{
let
order_data
=
null
;
let
order_id
=
order_groups
.
groups
[
group_index
][
i
];
// Find order data
for
(
let
order
of
orders
)
{
if
(
order
.
id
==
order_
groups
.
groups
[
group_index
][
i
]
)
{
if
(
order
.
id
==
order_
id
)
{
order_data
=
order
;
}
}
create_order_doc
(
order_data
);
if
(
order_data
!=
null
)
{
create_order_doc
(
order_data
);
}
else
{
missing_orders
.
push
(
order_id
)
}
}
if
(
missing_orders
.
length
>
0
)
{
// TODO what to do when orders are missing from group?
}
// go to first 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