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
27f86846
Commit
27f86846
authored
May 23, 2023
by
François C.
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '4444_improve_presence_recording' into 'dev_cooperatic'
4444 improve presence recording See merge request
!228
parents
bdecae48
ffcc0c36
Pipeline
#2752
passed with stage
in 1 minute 28 seconds
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
8 deletions
+16
-8
member.css
members/static/css/member.css
+1
-1
members.js
members/static/js/members.js
+9
-4
views.py
members/views.py
+4
-1
common.css
outils/static/css/common.css
+2
-2
No files found.
members/static/css/member.css
View file @
27f86846
...
...
@@ -29,7 +29,7 @@ video {max-width:none;}
#webcam_button
{
min-width
:
115px
;
max-width
:
115px
;}
#multi_results_preview
button
{
margin
:
2px
;}
#member_slide
{
grid-gap
:
0
;
padding
:
5px
;
display
:
none
;}
#member_slide
.coop-info
{
background
:
#
fbfbd5
;}
#member_slide
.coop-info
{
background
:
#
449d44
;}
#image_medium
{
width
:
128px
;
float
:
left
;}
#image_medium
:hover
{
cursor
:
url(/static/img/ip-camera.png)
,
url(/static/img/ip-camera.svg)
5
5
,
pointer
;}
#barcode
{
height
:
128px
;}
...
...
members/static/js/members.js
View file @
27f86846
...
...
@@ -101,18 +101,23 @@ function fill_member_slide(member) {
}
html_elts
.
image_medium
.
html
(
'<img src="'
+
img_src
+
'" width="128" />'
);
html_elts
.
cooperative_state
.
html
(
member
.
cooperative_state
);
if
(
member
.
cooperative_state
==
'
Rattrapage
'
)
{
if
(
member
.
cooperative_state
==
'
Suspendu(e)
'
)
{
var
explanation
=
"Tu as dû manquer un service! Pour pouvoir faire tes courses aujourd'hui, tu dois d'abord sélectionner un rattrapage sur ton espace membre."
;
html_elts
.
status_explanation
.
html
(
explanation
);
}
if
(
member
.
cooperative_state
==
'Désinscrit(e)'
||
member
.
cooperative_state
==
'Parti(e)'
)
coop_info
.
addClass
(
'b_red'
);
else
if
(
member
.
cooperative_state
==
'En alerte'
||
member
.
cooperative_state
==
'Délai accordé'
||
member
.
cooperative_state
==
'Rattrapage'
)
coop_info
.
addClass
(
'b_orange'
);
if
(
member
.
cooperative_state
==
'Désinscrit(e)'
||
member
.
cooperative_state
==
'Parti(e)'
)
{
coop_info
.
addClass
(
'b_red'
);
}
else
if
(
member
.
cooperative_state
==
'En alerte'
||
member
.
cooperative_state
==
'Délai accordé'
)
{
coop_info
.
addClass
(
'b_yellow'
)
}
else
if
(
member
.
cooperative_state
==
'Suspendu(e)'
)
{
coop_info
.
addClass
(
'b_orange'
);
}
if
(
member
.
shifts
.
length
>
0
)
{
html_elts
.
next_shifts
.
append
(
'Prochains services : '
);
var
slist
=
$
(
'<ul>'
);
for
(
i
in
member
.
shifts
)
{
var
s
=
$
(
'<li>'
).
text
(
member
.
shifts
[
i
].
start
);
...
...
members/views.py
View file @
27f86846
...
...
@@ -294,7 +294,8 @@ def record_service_presence(request):
stid
=
int
(
request
.
POST
.
get
(
"stid"
,
0
))
# shift_ticket_id
cancel
=
request
.
POST
.
get
(
"cancel"
)
==
'true'
typeAction
=
str
(
request
.
POST
.
get
(
"type"
))
coop_logger
.
info
(
"Enregistrement presence : mid =
%
s, rid =
%
s, sid =
%
s, stid =
%
s, cancel =
%
s, typeAction =
%
s"
,
str
(
mid
),
str
(
rid
),
str
(
sid
),
str
(
stid
),
str
(
cancel
),
typeAction
)
app_env
=
getattr
(
settings
,
'APP_ENV'
,
"prod"
)
if
(
rid
>
-
1
and
mid
>
0
):
overrided_date
=
""
...
...
@@ -316,6 +317,7 @@ def record_service_presence(request):
res
[
'update'
]
=
'ok'
else
:
res
[
'update'
]
=
'ko'
coop_logger
.
info
(
"Résultat update record_service_presence :
%
s"
,
res
[
'update'
])
if
res
[
'update'
]
==
'ok'
:
members
=
CagetteMember
.
search
(
'id'
,
mid
)
m
=
members
[
0
]
...
...
@@ -331,6 +333,7 @@ def record_service_presence(request):
except
Exception
as
e
:
res
[
'error'
]
=
str
(
e
)
coop_logger
.
error
(
"Erreur record_service_presence :
%
s"
,
str
(
e
))
return
JsonResponse
({
'res'
:
res
})
def
easy_validate_shift_presence
(
request
):
...
...
outils/static/css/common.css
View file @
27f86846
.green
{
color
:
#60B000
;}
.b_green
,
.b_more_than_50pc
{
background
:
#d9ebd2
}
.b_green
,
.b_more_than_50pc
{
background
:
#d9ebd2
!important
;
}
.orange
{
color
:
#FFA500
;}
.b_orange
,
.b_less_than_50pc
{
background
:
#F0B000
!important
;}
.yellow
{
color
:
#F0B000
;}
.b_yellow
{
background
:
#fcf3cc
;}
.b_yellow
{
background
:
#fcf3cc
!important
;}
.red
{
color
:
#FF0000
;}
.b_red
,
.b_less_than_25pc
{
background
:
#ff3333
!important
;}
.loading
{
background-image
:
url("/static/img/ajax-loader.gif")
;
background-repeat
:
no-repeat
;
background-position
:
center
;
background-color
:
#efefef
;}
...
...
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