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
39e18e62
Commit
39e18e62
authored
Oct 08, 2022
by
Yvon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
give explanation when you add or delete makeup and display it point movements screen in odoo
parent
71e4b8bb
Pipeline
#2422
passed with stage
in 1 minute 25 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
11 deletions
+36
-11
admin.py
members/admin.py
+1
-1
manage_makeups.js
members/static/js/admin/manage_makeups.js
+35
-10
No files found.
members/admin.py
View file @
39e18e62
...
...
@@ -400,7 +400,7 @@ def update_members_makeups(request):
points_update
=
points_diff
data
=
{
'name'
:
"
Modif manuelle des rattrapages depuis l'admin BDM"
,
'name'
:
"
Admin BDM - "
+
member_data
[
"description"
]
,
'shift_id'
:
False
,
'type'
:
member_data
[
"member_shift_type"
],
'partner_id'
:
int
(
member_data
[
"member_id"
]),
...
...
members/static/js/admin/manage_makeups.js
View file @
39e18e62
...
...
@@ -151,9 +151,15 @@ function display_makeups_members() {
const
member
=
makeups_members
.
find
(
m
=>
m
.
id
==
member_id
);
openModal
(
`Enlever un rattrapage à
${
member
.
name
}
?`
,
`Enlever un rattrapage à
${
member
.
name
}
?
<br><br><label>Explication : </label><input class="" type="text" id="decr-explanation">
<br><br><label>Signature : </label><input class="" type="text" id="decr-signature">`
,
()
=>
{
update_members_makeups
([
member_id
],
"decrement"
);
update_members_makeups
(
[
member_id
],
"decrement"
,
$
(
"#decr-signature"
)[
0
].
value
+
' : '
+
$
(
"#decr-explanation"
)[
0
].
value
);
},
"Confirmer"
,
false
...
...
@@ -168,9 +174,15 @@ function display_makeups_members() {
const
member
=
makeups_members
.
find
(
m
=>
m
.
id
==
member_id
);
openModal
(
`Ajouter un rattrapage à
${
member
.
name
}
?`
,
`Ajouter un rattrapage à
${
member
.
name
}
?
<br><br><label>Explication : </label><input class="" type="text" id="incr-explanation">
<br><br><label>Signature : </label><input class="" type="text" id="incr-signature">`
,
()
=>
{
update_members_makeups
([
member_id
],
"increment"
);
update_members_makeups
(
[
member_id
],
"increment"
,
$
(
"#incr-signature"
)[
0
].
value
+
' : '
+
$
(
"#incr-explanation"
)[
0
].
value
);
},
"Confirmer"
,
false
...
...
@@ -198,9 +210,15 @@ function display_makeups_members() {
if
(
first_select
)
{
$
(
"#decrement_selected_members_makeups"
).
on
(
"click"
,
()
=>
{
openModal
(
`Enlever un rattrapage aux membres sélectionnés ?`
,
`Enlever un rattrapage aux membres sélectionnés ?
<br><br><label>Explication : </label><input class="" type="text" id="decr-explanation">
<br><br><label>Signature : </label><input class="" type="text" id="decr-signature">`
,
()
=>
{
update_members_makeups
(
selected_rows
,
"decrement"
);
update_members_makeups
(
selected_rows
,
"decrement"
,
$
(
"#decr-signature"
)[
0
].
value
+
' : '
+
$
(
"#decr-explanation"
)[
0
].
value
);
},
"Confirmer"
,
false
...
...
@@ -220,7 +238,7 @@ function display_makeups_members() {
* @param {Array} member_ids
* @param {String} action increment | decrement
*/
function
update_members_makeups
(
member_ids
,
action
)
{
function
update_members_makeups
(
member_ids
,
action
,
description
)
{
openModal
();
data
=
[];
...
...
@@ -255,7 +273,8 @@ function update_members_makeups(member_ids, action) {
target_makeups_nb
:
makeups_members
[
member_index
].
makeups_to_do
,
member_shift_type
:
makeups_members
[
member_index
].
shift_type
,
display_ftop_points
:
makeups_members
[
member_index
].
display_ftop_points
,
display_std_points
:
makeups_members
[
member_index
].
display_std_points
display_std_points
:
makeups_members
[
member_index
].
display_std_points
,
description
:
description
,
});
}
...
...
@@ -332,9 +351,15 @@ function display_possible_members() {
});
openModal
(
`Ajouter un rattrapage à
${
member
.
name
}
?`
,
`Ajouter un rattrapage à
${
member
.
name
}
?
<br><br><label>Explication : </label><input class="" type="text" id="incr-explanation">
<br><br><label>Signature : </label><input class="" type="text" id="incr-signature">`
,
()
=>
{
update_members_makeups
([
member
.
id
],
"increment"
);
update_members_makeups
(
[
member
.
id
],
"increment"
,
$
(
"#incr-signature"
)[
0
].
value
+
' : '
+
$
(
"#incr-explanation"
)[
0
].
value
);
members_search_results
=
[];
$
(
'#search_member_input'
).
val
(
''
);
$
(
'.search_member_results_area'
).
hide
();
...
...
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