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
ba8cceb1
Commit
ba8cceb1
authored
Mar 08, 2022
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
linting
parent
ab49214a
Pipeline
#1880
passed with stage
in 1 minute 31 seconds
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
10 deletions
+21
-10
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
+19
-7
members-space.js
members_space/static/js/members-space.js
+1
-1
No files found.
members_space/static/js/members-space-faq.js
View file @
ba8cceb1
members_space/static/js/members-space-my-shifts.js
View file @
ba8cceb1
...
...
@@ -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 @
ba8cceb1
...
...
@@ -40,7 +40,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
...
...
@@ -144,6 +144,8 @@ function add_or_change_shift(new_shift_id) {
}
});
}
return
null
;
}
/**
...
...
@@ -160,7 +162,7 @@ function delete_shift_registration(shift_registration_id) {
if
(
partner_data
.
is_associated_people
===
"False"
)
{
tData
+=
'&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
+=
'&verif_token='
+
partner_data
.
parent_verif_token
;
}
else
{
return
false
;
...
...
@@ -205,6 +207,8 @@ function delete_shift_registration(shift_registration_id) {
}
});
}
return
null
;
}
/**
...
...
@@ -212,7 +216,7 @@ function delete_shift_registration(shift_registration_id) {
* @param {string} partner
* @param {string} shift_id
*/
function
affect_shift
(
partner
,
shift_id
)
{
function
affect_shift
(
partner
,
shift_id
)
{
if
(
is_time_to
(
'affect_shift'
))
{
tData
=
'idShiftRegistration='
+
shift_id
+
'&idPartner='
+
partner_data
.
partner_id
...
...
@@ -295,6 +299,7 @@ function init_shifts_list() {
let
datetime_shift_start
=
new
Date
(
shift
.
date_begin
.
replace
(
/
\s
/
,
'T'
));
let
f_date_shift_start
=
datetime_shift_start
.
toLocaleDateString
(
"fr-fr"
,
date_options
);
f_date_shift_start
=
f_date_shift_start
.
charAt
(
0
).
toUpperCase
()
+
f_date_shift_start
.
slice
(
1
);
shift_line_template
.
find
(
".shift_line_date"
).
text
(
f_date_shift_start
);
...
...
@@ -316,7 +321,8 @@ function init_shifts_list() {
if
(
partner_data
.
associated_partner_id
===
"False"
&&
partner_data
.
parent_id
===
"False"
)
{
shift_line_template
.
find
(
'.affect_associate_registered'
).
hide
();
}
else
{
shift_line_template
.
find
(
'.affect_associate_registered'
).
closest
(
".shift_line_container"
).
attr
(
'id'
,
'shift_id_'
+
shift
.
id
);
shift_line_template
.
find
(
'.affect_associate_registered'
).
closest
(
".shift_line_container"
)
.
attr
(
'id'
,
'shift_id_'
+
shift
.
id
);
if
(
shift
.
associate_registered
===
"both"
)
{
shift_line_template
.
find
(
'.affect_associate_registered'
).
text
(
"Les deux"
);
}
else
if
(
shift
.
associate_registered
===
"partner"
)
{
...
...
@@ -341,6 +347,7 @@ function init_shifts_list() {
if
(
partner_data
.
extra_shift_done
>
0
&&
shift
.
is_makeup
===
false
)
{
if
(
shift_line_template
.
find
(
".delete_registration_button"
).
length
===
0
)
{
let
delete_reg_button_template
=
$
(
"#delete_registration_button_template"
);
shift_line_template
.
find
(
".shift_line_container"
).
append
(
delete_reg_button_template
.
html
());
}
}
else
{
...
...
@@ -379,7 +386,8 @@ function init_shifts_list() {
$
(
".affect_associate_registered"
).
on
(
"click"
,
function
()
{
// Display modal
let
id
=
$
(
this
).
closest
(
".shift_line_container"
).
attr
(
'id'
)
let
id
=
$
(
this
).
closest
(
".shift_line_container"
)
.
attr
(
'id'
)
.
split
(
'_'
)[
2
];
let
modal_template
=
$
(
"#modal_affect_shift"
);
...
...
@@ -697,8 +705,12 @@ function init_read_only_calendar_page() {
function
init_delete_registration_buttons
()
{
$
(
".delete_registration_button"
).
off
();
$
(
".delete_registration_button"
).
on
(
"click"
,
function
()
{
let
shift_name
=
$
(
this
).
closest
(
"div"
).
siblings
(
".selectable_shift_line"
).
text
().
trim
();
let
shift_id
=
$
(
this
).
closest
(
".shift_line_container"
).
attr
(
'id'
)
let
shift_name
=
$
(
this
).
closest
(
"div"
)
.
siblings
(
".selectable_shift_line"
)
.
text
()
.
trim
();
let
shift_id
=
$
(
this
).
closest
(
".shift_line_container"
)
.
attr
(
'id'
)
.
split
(
'_'
)[
2
];
openModal
(
...
...
members_space/static/js/members-space.js
View file @
ba8cceb1
...
...
@@ -265,7 +265,7 @@ $(document).ready(function() {
// debouncing function from John Hann
// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
var
debounce
=
function
(
func
,
threshold
,
execAsap
)
{
var
timeout
;
var
timeout
=
null
;
return
function
debounced
()
{
var
obj
=
this
,
args
=
arguments
;
...
...
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