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
b7031bb8
Commit
b7031bb8
authored
May 11, 2023
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow to change shift at employee validation & fix shift change not working
parent
644261a5
Pipeline
#2728
passed with stage
in 1 minute 32 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
12 deletions
+10
-12
subscription_common.js
members/static/js/subscription_common.js
+4
-11
views.py
members/views.py
+5
-1
prepa_odoo.html
templates/members/prepa_odoo.html
+1
-0
No files found.
members/static/js/subscription_common.js
View file @
b7031bb8
...
...
@@ -100,13 +100,11 @@ function display_current_coop_form() {
$
(
'#checks'
).
show
();
for
(
var
i
=
1
;
i
<=
current_coop
.
checks_nb
;
i
++
)
{
$
(
check_details
).
append
(
'<p>Chèque #'
+
i
+
' : <input type="text" name="check_'
+
i
+
'" class="b_green check_item" required/> € </p>'
);
$
(
check_details
).
append
(
'<p>Chèque #'
+
i
+
' : <input type="text" name="check_'
+
i
+
'" class="b_green check_item" required/> € </p>'
);
}
}
}
var
show_change_shift
=
false
;
if
(
current_coop
.
shift_template
)
{
var
st
=
current_coop
.
shift_template
.
data
;
...
...
@@ -121,25 +119,20 @@ function display_current_coop_form() {
place
=
'Bureau'
;
}
form
.
find
(
'[name="place"]'
).
val
(
place
);
if
(
current_coop
.
coop_msg
)
{
show_change_shift
=
true
;
}
}
else
{
show_change_shift
=
true
;
}
let
show_change_shift
=
current_coop
.
validation_state
===
'waiting_validation_employee'
;
if
(
show_change_shift
==
true
)
{
chgt_shift_btn
.
show
();
chgt_shift_btn
.
on
(
'click'
,
open_shift_choice
);
}
if
(
typeof
(
coop_page
)
!=
"undefined"
)
{
if
(
typeof
(
coop_page
)
!=
"undefined"
)
{
coop_page
.
show
();
}
}
$
(
'#payment_meaning'
).
change
(
function
()
{
$
(
'#payment_meaning'
).
change
(
function
()
{
if
(
$
(
this
).
val
()
==
'ch'
)
{
show_checks_nb
();
}
else
{
...
...
members/views.py
View file @
b7031bb8
...
...
@@ -124,6 +124,8 @@ def get_shift_templates_next_shift(request, id):
def
prepa_odoo
(
request
):
"""Generate coop subscription form, to be fill by BDM."""
template
=
loader
.
get_template
(
'members/prepa_odoo.html'
)
committees_shift_id
=
CagetteServices
.
get_committees_shift_id
()
context
=
{
'title'
:
'Préparation Odoo Inscriptions'
,
'warning_placeholder'
:
'Par exemple, il manque un chèque'
,
'couchdb_server'
:
settings
.
COUCHDB
[
'url'
],
...
...
@@ -137,7 +139,9 @@ def prepa_odoo(request):
'ask_for_street2'
:
getattr
(
settings
,
'SUBSCRIPTION_ADD_STREET2'
,
False
),
'ask_for_second_phone'
:
getattr
(
settings
,
'SUBSCRIPTION_ADD_SECOND_PHONE'
,
False
),
'show_ftop_button'
:
getattr
(
settings
,
'SHOW_FTOP_BUTTON'
,
True
),
'db'
:
settings
.
COUCHDB
[
'dbs'
][
'member'
]}
'db'
:
settings
.
COUCHDB
[
'dbs'
][
'member'
],
'committees_shift_id'
:
committees_shift_id
,
}
# with_addr_complement
# with_second_phone
...
...
templates/members/prepa_odoo.html
View file @
b7031bb8
...
...
@@ -106,6 +106,7 @@
var
mag_place_string
=
'{{mag_place_string}}'
;
var
office_place_string
=
'{{office_place_string}}'
var
max_begin_hour
=
'{{max_begin_hour}}'
var
committees_shift_id
=
'{{committees_shift_id}}'
;
</script>
<script
src=
"{% static "
js
/
all_common
.
js
"
%}"?
v=
1651853225
></script>
<script
src=
"{% static "
js
/
common
.
js
"
%}"?
v=
1651853225
></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