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
cc101100
Commit
cc101100
authored
Mar 09, 2022
by
François C.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix eslint warning
parent
5b119348
Pipeline
#1888
passed with stage
in 1 minute 32 seconds
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
9 deletions
+14
-9
members-space-faq.js
members_space/static/js/members-space-faq.js
+0
-0
members-space-my-shifts.js
members_space/static/js/members-space-my-shifts.js
+1
-2
members-space-shifts-exchange.js
members_space/static/js/members-space-shifts-exchange.js
+1
-1
members-space.js
members_space/static/js/members-space.js
+0
-0
orders_helper.js
orders/static/js/orders_helper.js
+12
-6
No files found.
members_space/static/js/members-space-faq.js
View file @
cc101100
members_space/static/js/members-space-my-shifts.js
View file @
cc101100
...
...
@@ -68,8 +68,7 @@ function prepare_server_data(data) {
if
(
history_item
.
associate_registered
==
false
||
history_item
.
associate_registered
==
undefined
)
{
history_item
.
associate_registered
=
""
;
}
else
{
}
else
{
if
(
partner_data
.
associated_partner_id
!=
"False"
)
{
if
(
history_item
.
associate_registered
===
"partner"
)
{
history_item
.
associate_registered
=
partner_data
.
name
;
...
...
members_space/static/js/members-space-shifts-exchange.js
View file @
cc101100
...
...
@@ -36,7 +36,7 @@ function add_or_change_shift(new_shift_id) {
+
'&idPartner='
+
partner_data
.
partner_id
+
'&shift_type='
+
partner_data
.
shift_type
+
'&verif_token='
+
partner_data
.
verif_token
;
}
else
if
(
partner_data
.
is_associated_people
===
"True"
&&
block_actions_for_attached_people
===
"False"
)
{
}
else
if
(
partner_data
.
is_associated_people
===
"True"
&&
block_actions_for_attached_people
===
"False"
)
{
tData
=
'idNewShift='
+
new_shift_id
+
'&idPartner='
+
partner_data
.
parent_id
+
'&shift_type='
+
partner_data
.
shift_type
...
...
members_space/static/js/members-space.js
View file @
cc101100
orders/static/js/orders_helper.js
View file @
cc101100
...
...
@@ -196,6 +196,7 @@ var process_new_product_qty = function(input) {
*
* @returns -1 if validation failed, 0 otherwise
*/
function
add_product
()
{
const
user_input
=
$
(
"#product_input"
).
val
();
...
...
@@ -258,6 +259,7 @@ function add_product() {
}
function
compute_purchase_qty_for_coverage
(
product
,
coeff
,
stock
,
incoming_qty
,
daily_conso
,
days
)
{
let
purchase_qty_for_coverage
=
null
;
purchase_qty_for_coverage
=
days
*
daily_conso
-
stock
-
incoming_qty
+
product
.
minimal_stock
;
purchase_qty_for_coverage
=
(
purchase_qty_for_coverage
<
0
)
?
0
:
purchase_qty_for_coverage
;
...
...
@@ -283,6 +285,7 @@ function compute_and_affect_product_supplier_quantities(coeff, days) {
const
stock
=
product
.
qty_available
;
const
incoming_qty
=
product
.
incoming_qty
;
const
daily_conso
=
product
.
daily_conso
;
purchase_package_qty_for_coverage
=
compute_purchase_qty_for_coverage
(
product
,
coeff
,
stock
,
incoming_qty
,
daily_conso
,
days
);
// Set qty to purchase for first supplier only
products
[
key
].
suppliersinfo
[
0
].
qty
=
purchase_package_qty_for_coverage
;
...
...
@@ -300,6 +303,7 @@ function compute_products_coverage_qties() {
return
new
Promise
((
resolve
)
=>
{
const
pc_adjust
=
$
(
'#percent_adjust_input'
).
val
();
let
coeff
=
1
;
if
(
!
isNaN
(
parseFloat
(
pc_adjust
)))
{
coeff
=
(
1
+
parseFloat
(
pc_adjust
)
/
100
);
}
...
...
@@ -315,7 +319,7 @@ function compute_products_coverage_qties() {
step
=
1
;
//Let's compute the nearst amount, by changing days quantity
while
(
go_on
==
true
&&
iter
<
max_iter
)
{
while
(
go_on
==
true
&&
iter
<
max_iter
)
{
order_total_value
=
0
;
compute_and_affect_product_supplier_quantities
(
coeff
,
days
);
_compute_total_values_by_supplier
();
...
...
@@ -2263,12 +2267,12 @@ $(document).ready(function() {
.
then
(()
=>
{
debounceFunction
(
update_cdb_order
);
update_main_screen
();
})
});
}
else
{
$
(
"#coverage_days_input"
).
val
(
order_doc
.
coverage_days
||
''
);
$
(
'#targeted_amount_input'
).
val
(
order_doc
.
targeted_amount
||
''
);
alert
(
"Ni le nombre de jours de couverture, ni le montant à atteindre sont correctement renseignés"
)
alert
(
"Ni le nombre de jours de couverture, ni le montant à atteindre sont correctement renseignés"
)
;
}
}
...
...
@@ -2328,7 +2332,7 @@ $(document).ready(function() {
update_main_screen
();
debounceFunction
(
update_cdb_order
);
closeModal
();
})
});
});
}
...
...
@@ -2606,17 +2610,19 @@ $(document).ready(function() {
// Indeed, capturing click only remove the ability to click to have focus on the input to type a number.
$
(
document
).
on
(
"mousedown"
,
'[type="number"]'
,
function
()
{
const
clicked
=
this
;
qties_values
[
$
(
clicked
).
attr
(
'id'
)]
=
$
(
clicked
).
val
();
});
$
(
document
).
on
(
"mouseup"
,
'[type="number"]'
,
function
()
{
const
clicked
=
this
;
try
{
if
(
$
(
clicked
).
val
()
!=
qties_values
[
$
(
clicked
).
attr
(
'id'
)])
{
process_new_product_qty
(
clicked
);
}
}
catch
(
err
)
{
console
.
log
(
err
)
}
catch
(
err
)
{
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