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
2f953b53
Commit
2f953b53
authored
Nov 23, 2021
by
Etienne Freiss
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ajout fake activity, ajout config AMNISTIE_DATE
parent
ae39186e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
3 deletions
+29
-3
config_lacagette.py
coops_configurations/config_lacagette.py
+1
-0
members-space-my-shifts.css
members_space/static/css/members-space-my-shifts.css
+4
-0
members-space-my-shifts.js
members_space/static/js/members-space-my-shifts.js
+10
-3
views.py
members_space/views.py
+11
-0
config.md
outils/config.md
+3
-0
No files found.
coops_configurations/config_lacagette.py
View file @
2f953b53
...
...
@@ -125,6 +125,7 @@ RECEPTION_PB = "Ici, vous pouvez signaler toute anomalie lors d'une réception,
Merci d'indiquer un maximum d'informations, le nom du produit et son code barre.
\
Dans le cas de produits déteriorés, merci d'envoyer une photo avec votre téléphone à [Adresse_email]"
AMNISTIE_DATE
=
"2021-11-24"
# display or not column "Autres" in reception process
DISPLAY_COL_AUTRES
=
False
...
...
members_space/static/css/members-space-my-shifts.css
View file @
2f953b53
...
...
@@ -83,6 +83,10 @@ table.dataTable.display tbody tr.row_partner_late {
table
.dataTable.display
tbody
tr
.row_partner_absent
{
background-color
:
#ff847b
;
}
table
.dataTable.display
tbody
tr
.row_partner_amnistie
{
background-color
:
black
;
color
:
white
;
}
table
.dataTable.display
tbody
tr
.row_partner_ok
td
,
table
.dataTable.display
tbody
tr
.row_partner_late
td
,
table
.dataTable.display
tbody
tr
.row_partner_absent
td
{
...
...
members_space/static/js/members-space-my-shifts.js
View file @
2f953b53
...
...
@@ -58,8 +58,7 @@ function prepare_server_data(data) {
}
else
if
(
history_item
.
state
===
'cancel'
)
{
history_item
.
details
=
"Annulé"
;
}
history_item
.
shift_name
=
(
history_item
.
shift_id
===
false
)
?
''
:
history_item
.
shift_id
[
1
];
if
(
history_item
.
is_amnesty
==
undefined
)
history_item
.
shift_name
=
(
history_item
.
shift_id
===
false
)
?
''
:
history_item
.
shift_id
[
1
];
}
return
data
;
...
...
@@ -105,6 +104,8 @@ function init_history() {
$
(
row
).
addClass
(
'row_partner_late'
);
}
else
if
(
cell
.
text
()
===
"Absent"
)
{
$
(
row
).
addClass
(
'row_partner_absent'
);
}
else
if
(
cell
.
text
()
===
"Amnistie"
)
{
$
(
row
).
addClass
(
'row_partner_amnistie'
);
}
}
}
...
...
@@ -147,8 +148,14 @@ function init_my_shifts() {
.
then
((
data
)
=>
{
partner_history
=
data
;
for
(
d
of
data
)
{
d
.
create_date
=
Date
.
parse
(
d
.
create_date
);
}
// Sort by date desc
partner_history
.
sort
((
a
,
b
)
=>
a
.
create_date
-
b
.
create_date
);
partner_history
.
sort
((
a
,
b
)
=>
b
.
create_date
-
a
.
create_date
);
if
(
partner_history
.
length
>
0
&&
partner_history
[
partner_history
.
length
-
1
].
is_amnesty
!=
undefined
)
{
partner_history
.
pop
();
}
init_history
();
});
...
...
members_space/views.py
View file @
2f953b53
...
...
@@ -221,5 +221,15 @@ def get_shifts_history(request):
offset
=
int
(
request
.
GET
.
get
(
'offset'
))
date_from
=
getattr
(
settings
,
'START_DATE_FOR_SHIFTS_HISTORY'
,
'2018-01-01'
)
res
[
"data"
]
=
m
.
get_shifts_history
(
partner_id
,
limit
,
offset
,
date_from
)
is_amnesty
=
getattr
(
settings
,
'AMNISTIE_DATE'
,
'false'
)
company_code
=
getattr
(
settings
,
'COMPANY_CODE'
,
''
)
if
is_amnesty
and
company_code
==
"lacagette"
:
amnesty
=
{}
amnesty
[
'is_amnesty'
]
=
True
amnesty
[
'create_date'
]
=
is_amnesty
amnesty
[
'shift_name'
]
=
'Amnistie'
amnesty
[
'state'
]
=
''
res
[
"data"
]
.
append
(
amnesty
)
return
JsonResponse
(
res
)
\ No newline at end of file
outils/config.md
View file @
2f953b53
...
...
@@ -311,6 +311,9 @@
Message shown to people when they connect to the Member Space
-
AMNISTIE_DATE = "2021-11-24"
In members_space history display a special activity about amnistie
### Reception
-
RECEPTION_ADD_ADMIN_MODE = True
...
...
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