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
fe16e7d5
Commit
fe16e7d5
authored
Mar 08, 2022
by
Félicie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
css added
parent
e9635429
Pipeline
#1878
failed with stage
in 1 minute 25 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
117 additions
and
34 deletions
+117
-34
admin.py
members/admin.py
+2
-0
manage_attached.css
members/static/css/admin/manage_attached.css
+34
-21
manage_attached.js
members/static/js/admin/manage_attached.js
+19
-1
manage_attached_create_pair.html
templates/members/admin/manage_attached_create_pair.html
+62
-12
No files found.
members/admin.py
View file @
fe16e7d5
...
...
@@ -430,6 +430,8 @@ def get_member_info(request,coop_id):
'shift_type'
,
'parent_id'
,
'is_associated_people'
,
'parent_name'
,
'barcode_base'
,
]
member
=
api
.
search_read
(
'res.partner'
,
[[
'barcode_base'
,
'='
,
coop_id
]],
fields
)
...
...
members/static/css/admin/manage_attached.css
View file @
fe16e7d5
...
...
@@ -31,29 +31,41 @@
font-size
:
1.3em
;
}
/* Search membres area */
.create_pair_button
{
display
:
flex
;
justify-content
:
center
;
margin
:
100px
0
100px
0
;
}
#search_member_form_area
{
align-items
:
center
;
@media
screen
and
(
max-width
:
992px
)
{
.create_pair_button
{
margin
:
auto
;
}
}
#
search_member_form
{
margin-left
:
10px
;
#
createPair
{
border-radius
:
30px
;
}
.search_member_results_area
{
margin-top
:
15px
;
display
:
flex
;
/* Search membres area */
.search_member_form_area
{
align-items
:
center
;
padding-bottom
:
20px
;
}
.search_
results_text
{
m
in-width
:
15
0px
;
.search_
member_form
{
m
argin-left
:
1
0px
;
}
.search_member_results
{
display
:
flex
;
flex-wrap
:
wrap
;
/* Member infos */
.tile_icon
{
margin-right
:
15px
;
color
:
#00a573
;
}
.member_info
{
font-weight
:
bold
;
}
/* -- Tiles */
...
...
@@ -70,17 +82,19 @@
}
.tile
{
flex
:
1
0
45
%
;
flex
:
1
0
20
%
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
text-align
:
center
;
border-radius
:
30px
;
margin
:
1rem
1rem
;
padding
:
1rem
;
box-shadow
:
2px
2px
3px
rgba
(
10
,
10
,
10
,
.1
),
0
0
0
1px
rgba
(
10
,
10
,
10
,
.1
);
}
.high_tile
{
min-height
:
350px
;
.tile_content
{
height
:
100%
;
flex-direction
:
column
;
text-align
:
center
;
font-size
:
1.6rem
;
}
.small_tile
{
min-height
:
250px
;
}
\ No newline at end of file
members/static/js/admin/manage_attached.js
View file @
fe16e7d5
var
parentId
=
null
;
var
childId
=
null
;
const
possible_cooperative_state
=
{
suspended
:
"Rattrapage"
,
exempted
:
"Exempté.e"
,
alert
:
"En alerte"
,
up_to_date
:
"À jour"
,
unsubscribed
:
"Désinscrit.e des créneaux"
,
delay
:
"En délai"
,
gone
:
"Parti.e"
};
/**
* Load member infos
*/
...
...
@@ -49,7 +59,15 @@ function ready_for_submission() {
function
display_member_infos
(
divId
,
memberData
)
{
console
.
log
(
memberData
)
$
(
"#"
+
divId
).
show
()
$
(
"#"
+
divId
).
find
(
"#name"
).
text
(
memberData
.
name
)
$
(
"#"
+
divId
).
find
(
".member_name"
).
text
(
memberData
.
name
)
$
(
"#"
+
divId
).
find
(
".member_status"
).
text
(
possible_cooperative_state
[
memberData
.
cooperative_state
])
$
(
"#"
+
divId
).
find
(
".member_shift_name"
).
text
(
memberData
.
current_template_name
);
$
(
"#"
+
divId
).
find
(
".member_coop_number"
).
text
(
memberData
.
barcode_base
);
if
(
memberData
.
is_associated_people
===
false
)
{
$
(
"#"
+
divId
).
find
(
".member_associated_partner_area"
).
hide
();
}
if
(
parentId
!=
null
&&
childId
!=
null
)
{
$
(
"#createPair"
).
prop
(
"disabled"
,
false
)
}
...
...
templates/members/admin/manage_attached_create_pair.html
View file @
fe16e7d5
...
...
@@ -27,34 +27,84 @@
<div
class=
"page_content"
>
<div
class=
"tiles_container"
>
<div
class=
"tile
high_tile
"
>
<div
id=
"search_member_form_area"
>
<div
class=
"tile"
>
<div
class=
"search_member_form_area"
id=
"search_member_form_area"
>
<h4>
Rechercher le.a coopérateur.ice titulaire
</h4>
<form
autocomplete=
"off"
id=
"search_member_form"
action=
"javascript:;"
method=
"post"
>
<form
autocomplete=
"off"
id=
"search_member_form"
class=
"search_member_form"
action=
"javascript:;"
method=
"post"
>
<input
name=
"searchParent"
type=
"text"
id=
"search_member_input"
value=
""
placeholder=
"Nom ou numéro du coop..."
required
>
</form>
</div>
<div
id=
"parentInfo"
style=
"display:none;"
>
<div>
Nom
</div><div
id=
"name"
></div>
<div
class=
"tile_title"
>
<i
class=
"fas fa-user tile_icon"
></i>
<span
class=
"member_info member_name"
></span>
</div>
<div
class=
"tile_content"
>
<div
class=
"member_status_text_container"
>
<span>
Mon statut :
</span>
<span
class=
"member_info member_status"
></span>
</div>
<div
class=
"member_shift_name_area"
>
<span>
Mon créneau :
</span>
<span
class=
"member_shift_name member_info"
></span>
</div>
<div
class=
"member_coop_number_area"
>
<span>
Mon numéro de coop :
</span>
<span
class=
"member_coop_number member_info"
></span>
</div>
<div
class=
"member_associated_partner_area"
>
<span>
Je suis déjà en binôme !
</span>
<span
class=
"member_associated_partner member_info"
></span>
</div>
</div>
</div>
</div>
<div
class=
"create_pair_button"
>
<button
id=
"createPair"
type=
"button"
name=
"button"
disabled
>
Créer le binôme
</button>
</div>
<div
class=
"tiles_container"
>
<div
class=
"tile high_tile"
>
<div
id=
"search_member_form_area"
>
<div
class=
"tile"
>
<div
class=
"search_member_form_area"
id=
"search_member_form_area"
>
<h4>
Rechercher le.a coopérateur.ice co-titulaire
</h4>
<form
autocomplete=
"off"
id=
"search_member_form_child"
action=
"javascript:;"
method=
"post"
>
<form
autocomplete=
"off"
id=
"search_member_form_child"
class=
"search_member_form"
action=
"javascript:;"
method=
"post"
>
<input
name=
"searchChild"
type=
"text"
id=
"search_child_input"
value=
""
placeholder=
"Nom ou numéro du coop..."
required
>
</form>
</div>
<div
id=
"childInfo"
style=
"display:none;"
>
<div>
Nom
</div><div
id=
"name"
></div>
<div
class=
"tile_title"
>
<i
class=
"fas fa-user tile_icon"
></i>
<span
class=
"member_info member_name"
></span>
</div>
<div
class=
"tile_content"
>
<div
class=
"member_status_text_container"
>
<span>
Mon statut :
</span>
<span
class=
"member_info member_status"
></span>
</div>
<div
class=
"member_shift_name_area"
>
<span>
Mon créneau :
</span>
<span
class=
"member_shift_name member_info"
></span>
</div>
<div
class=
"member_coop_number_area"
>
<span>
Mon numéro de coop :
</span>
<span
class=
"member_coop_number member_info"
></span>
</div>
<div
class=
"member_associated_partner_area"
>
<span>
Je suis déjà en binôme !
</span>
<span
class=
"member_associated_partner member_info"
></span>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"create-pair"
>
<button
id=
"createPair"
type=
"button"
name=
"button"
disabled
>
Créer le binôme
</button>
</div>
</div>
</div>
<script
src=
'{% static "js/all_common.js" %}?v='
></script>
...
...
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