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
a7c0febd
Commit
a7c0febd
authored
Nov 19, 2021
by
François
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change in late people rendering in shift list
parent
0825e1e6
Pipeline
#1493
passed with stage
in 1 minute 30 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
6 deletions
+10
-6
models.py
members/models.py
+1
-1
member.css
members/static/css/member.css
+3
-2
members.js
members/static/js/members.js
+6
-3
No files found.
members/models.py
View file @
a7c0febd
...
@@ -1175,7 +1175,7 @@ class CagetteServices(models.Model):
...
@@ -1175,7 +1175,7 @@ class CagetteServices(models.Model):
)
.
total_seconds
()
/
60
>
default_acceptable_minutes_after_shift_begins
)
.
total_seconds
()
/
60
>
default_acceptable_minutes_after_shift_begins
if
with_members
is
True
:
if
with_members
is
True
:
cond
=
[[
'id'
,
'in'
,
s
[
'registration_ids'
]],
[
'state'
,
'!='
,
'cancel'
]]
cond
=
[[
'id'
,
'in'
,
s
[
'registration_ids'
]],
[
'state'
,
'!='
,
'cancel'
]]
fields
=
[
'partner_id'
,
'shift_type'
,
'state'
]
fields
=
[
'partner_id'
,
'shift_type'
,
'state'
,
'is_late'
]
members
=
api
.
search_read
(
'shift.registration'
,
cond
,
fields
)
members
=
api
.
search_read
(
'shift.registration'
,
cond
,
fields
)
s
[
'members'
]
=
sorted
(
members
,
key
=
lambda
x
:
x
[
'partner_id'
][
0
])
s
[
'members'
]
=
sorted
(
members
,
key
=
lambda
x
:
x
[
'partner_id'
][
0
])
if
len
(
s
[
'members'
])
>
0
:
if
len
(
s
[
'members'
])
>
0
:
...
...
members/static/css/member.css
View file @
a7c0febd
...
@@ -43,8 +43,9 @@ h1 .member_name {font-weight: bold;}
...
@@ -43,8 +43,9 @@ h1 .member_name {font-weight: bold;}
{
border
:
1px
solid
#000
;
border-radius
:
5px
;
padding
:
5px
;
margin-bottom
:
15px
;
background
:
#FFF
;}
{
border
:
1px
solid
#000
;
border-radius
:
5px
;
padding
:
5px
;
margin-bottom
:
15px
;
background
:
#FFF
;}
.members_list
{
list-style
:
none
;}
.members_list
{
list-style
:
none
;}
.members_list
li
{
display
:
block
;
margin-bottom
:
5px
;}
.members_list
li
{
display
:
block
;
margin-bottom
:
5px
;}
.members_list.late
li
{
background-color
:
#de9b00
;
color
:
white
}
.members_list
li
.btn--inverse
{
background
:
#449d44
!important
;
cursor
:
not-allowed
;
color
:
#FFF
;
}
.members_list
li
.btn--inverse
{
background
:
#449d44
;
cursor
:
not-allowed
;
color
:
#FFF
;
}
.members_list
li
.btn--inverse.late
{
background-color
:
#de9b00
;
color
:
white
}
#service_entry_success
{
font-size
:
x-large
;}
#service_entry_success
{
font-size
:
x-large
;}
#service_entry_success
.explanations
{
margin
:
25px
0
;
font-size
:
18px
;}
#service_entry_success
.explanations
{
margin
:
25px
0
;
font-size
:
18px
;}
...
...
members/static/js/members.js
View file @
a7c0febd
...
@@ -263,15 +263,18 @@ function fill_service_entry(s) {
...
@@ -263,15 +263,18 @@ function fill_service_entry(s) {
if
(
s
.
members
)
{
if
(
s
.
members
)
{
m_list
=
'<ul class="members_list">'
;
m_list
=
'<ul class="members_list">'
;
if
(
typeof
s
.
late
!=
"undefined"
&&
s
.
late
==
true
)
{
//
if (typeof s.late != "undefined" && s.late == true) {
m_list
=
'<ul class="members_list late">'
;
//
m_list = '<ul class="members_list late">';
}
//
}
$
.
each
(
s
.
members
,
function
(
i
,
e
)
{
$
.
each
(
s
.
members
,
function
(
i
,
e
)
{
var
li_class
=
"btn"
;
var
li_class
=
"btn"
;
var
li_data
=
""
;
var
li_data
=
""
;
if
(
e
.
state
==
"done"
)
{
if
(
e
.
state
==
"done"
)
{
li_class
+=
"--inverse"
;
li_class
+=
"--inverse"
;
if
(
e
.
is_late
==
true
)
{
li_class
+=
" late"
;
}
}
else
{
}
else
{
li_data
=
' data-rid="'
+
e
.
id
+
'" data-mid="'
+
e
.
partner_id
[
0
]
+
'"'
;
li_data
=
' data-rid="'
+
e
.
id
+
'" data-mid="'
+
e
.
partner_id
[
0
]
+
'"'
;
}
}
...
...
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