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
b22feabf
Commit
b22feabf
authored
Feb 24, 2022
by
Félicie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated
parent
deac8e8a
Pipeline
#1842
passed with stage
in 1 minute 30 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
17 deletions
+46
-17
manage_attached.css
members/static/css/admin/manage_attached.css
+0
-5
manage_attached.js
members/static/js/admin/manage_attached.js
+46
-12
No files found.
members/static/css/admin/manage_attached.css
View file @
b22feabf
...
@@ -46,7 +46,3 @@
...
@@ -46,7 +46,3 @@
display
:
flex
;
display
:
flex
;
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
}
}
.btn_possible_member
{
margin
:
0.5rem
1rem
;
}
\ No newline at end of file
members/static/js/admin/manage_attached.js
View file @
b22feabf
$
(
document
).
ready
(
function
()
{
/**
if
(
coop_is_connected
())
{
* Load member infos
$
.
ajaxSetup
({
headers
:
{
"X-CSRFToken"
:
getCookie
(
'csrftoken'
)
}
});
*/
function
load_member_infos
()
{
$
.
ajax
({
type
:
'GET'
,
url
:
"/members_space/my_info/"
+
selected_member
.
id
,
dataType
:
"json"
,
traditional
:
true
,
contentType
:
"application/json; charset=utf-8"
,
success
:
function
(
data
)
{
incoming_shifts
=
data
;
display_member_infos
();
},
error
:
function
(
data
)
{
err
=
{
msg
:
"erreur serveur lors de la récupération des infos du membre"
,
ctx
:
'load_member_infos'
};
if
(
typeof
data
.
responseJSON
!=
'undefined'
&&
typeof
data
.
responseJSON
.
error
!=
'undefined'
)
{
err
.
msg
+=
' : '
+
data
.
responseJSON
.
error
;
}
report_JS_error
(
err
,
'members.admin'
);
$
(
".page_content"
).
show
();
closeModal
();
}
else
{
alert
(
'Erreur lors de la récupération des infos du membre.'
);
$
(
".page_content"
).
hide
();
}
}
});
}
$
(
'#back_to_admin_index'
).
on
(
'click'
,
function
()
{
/**
let
base_location
=
window
.
location
.
href
.
split
(
"manage_attached"
)[
0
].
slice
(
0
,
-
1
);
* Display table of member future shifts
*/
function
display_member_shifts
()
{
window
.
location
.
assign
(
base_location
);
}
});
/**
/**
* Display the members from the search result
* Display the members from the search result
*/
*/
function
display_possible_members
()
{
function
display_possible_members
()
{
...
@@ -42,7 +61,7 @@ function display_possible_members() {
...
@@ -42,7 +61,7 @@ function display_possible_members() {
for
(
member
of
members_search_results
)
{
for
(
member
of
members_search_results
)
{
if
(
member
.
id
==
$
(
this
).
attr
(
'member_id'
))
{
if
(
member
.
id
==
$
(
this
).
attr
(
'member_id'
))
{
selected_member
=
member
;
selected_member
=
member
;
load_member_
future_shift
s
();
load_member_
info
s
();
$
(
'.search_member_results'
).
empty
();
$
(
'.search_member_results'
).
empty
();
$
(
'.search_member_results_area'
).
hide
();
$
(
'.search_member_results_area'
).
hide
();
$
(
'#search_member_input'
).
val
(
''
);
$
(
'#search_member_input'
).
val
(
''
);
...
@@ -61,6 +80,21 @@ function display_possible_members() {
...
@@ -61,6 +80,21 @@ function display_possible_members() {
}
}
}
}
$
(
document
).
ready
(
function
()
{
if
(
coop_is_connected
())
{
$
.
ajaxSetup
({
headers
:
{
"X-CSRFToken"
:
getCookie
(
'csrftoken'
)
}
});
$
(
".page_content"
).
show
();
}
else
{
$
(
".page_content"
).
hide
();
}
$
(
'#back_to_admin_index'
).
on
(
'click'
,
function
()
{
let
base_location
=
window
.
location
.
href
.
split
(
"manage_attached"
)[
0
].
slice
(
0
,
-
1
);
window
.
location
.
assign
(
base_location
);
});
// Set action to search for the member
// Set action to search for the member
$
(
'#search_member_form'
).
submit
(
function
()
{
$
(
'#search_member_form'
).
submit
(
function
()
{
let
search_str
=
$
(
'#search_member_input'
).
val
();
let
search_str
=
$
(
'#search_member_input'
).
val
();
...
...
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