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
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
15 deletions
+13
-15
subscription_common.js
members/static/js/subscription_common.js
+7
-14
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
...
@@ -55,14 +55,14 @@ function display_current_coop_form() {
...
@@ -55,14 +55,14 @@ function display_current_coop_form() {
// form.find('[name="barcode_base"]').val(current_coop.barcode_base);
// form.find('[name="barcode_base"]').val(current_coop.barcode_base);
form
.
find
(
'[name="email"]'
).
val
(
current_coop
.
_id
);
form
.
find
(
'[name="email"]'
).
val
(
current_coop
.
_id
);
if
(
current_coop
.
shift_template
&&
if
(
current_coop
.
shift_template
&&
current_coop
.
shift_template
.
data
.
type
==
2
&&
current_coop
.
shift_template
.
data
.
type
==
2
&&
typeof
manage_ftop
!=
"undefined"
&&
manage_ftop
==
true
)
{
typeof
manage_ftop
!=
"undefined"
&&
manage_ftop
==
true
)
{
$
(
'#choosen_shift input'
).
hide
();
$
(
'#choosen_shift input'
).
hide
();
ftop_shift
.
val
(
'Volant'
);
ftop_shift
.
val
(
'Volant'
);
ftop_shift
.
show
();
ftop_shift
.
show
();
}
else
{
}
else
{
// Bien laisser dans cet ordre
// Bien laisser dans cet ordre
$
(
'#choosen_shift input'
).
show
();
$
(
'#choosen_shift input'
).
show
();
ftop_shift
.
hide
();
ftop_shift
.
hide
();
...
@@ -100,13 +100,11 @@ function display_current_coop_form() {
...
@@ -100,13 +100,11 @@ function display_current_coop_form() {
$
(
'#checks'
).
show
();
$
(
'#checks'
).
show
();
for
(
var
i
=
1
;
i
<=
current_coop
.
checks_nb
;
i
++
)
{
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
)
{
if
(
current_coop
.
shift_template
)
{
var
st
=
current_coop
.
shift_template
.
data
;
var
st
=
current_coop
.
shift_template
.
data
;
...
@@ -121,25 +119,20 @@ function display_current_coop_form() {
...
@@ -121,25 +119,20 @@ function display_current_coop_form() {
place
=
'Bureau'
;
place
=
'Bureau'
;
}
}
form
.
find
(
'[name="place"]'
).
val
(
place
);
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
)
{
if
(
show_change_shift
==
true
)
{
chgt_shift_btn
.
show
();
chgt_shift_btn
.
show
();
chgt_shift_btn
.
on
(
'click'
,
open_shift_choice
);
chgt_shift_btn
.
on
(
'click'
,
open_shift_choice
);
}
}
if
(
typeof
(
coop_page
)
!=
"undefined"
)
{
if
(
typeof
(
coop_page
)
!=
"undefined"
)
{
coop_page
.
show
();
coop_page
.
show
();
}
}
}
}
$
(
'#payment_meaning'
).
change
(
function
()
{
$
(
'#payment_meaning'
).
change
(
function
()
{
if
(
$
(
this
).
val
()
==
'ch'
)
{
if
(
$
(
this
).
val
()
==
'ch'
)
{
show_checks_nb
();
show_checks_nb
();
}
else
{
}
else
{
...
...
members/views.py
View file @
b7031bb8
...
@@ -124,6 +124,8 @@ def get_shift_templates_next_shift(request, id):
...
@@ -124,6 +124,8 @@ def get_shift_templates_next_shift(request, id):
def
prepa_odoo
(
request
):
def
prepa_odoo
(
request
):
"""Generate coop subscription form, to be fill by BDM."""
"""Generate coop subscription form, to be fill by BDM."""
template
=
loader
.
get_template
(
'members/prepa_odoo.html'
)
template
=
loader
.
get_template
(
'members/prepa_odoo.html'
)
committees_shift_id
=
CagetteServices
.
get_committees_shift_id
()
context
=
{
'title'
:
'Préparation Odoo Inscriptions'
,
context
=
{
'title'
:
'Préparation Odoo Inscriptions'
,
'warning_placeholder'
:
'Par exemple, il manque un chèque'
,
'warning_placeholder'
:
'Par exemple, il manque un chèque'
,
'couchdb_server'
:
settings
.
COUCHDB
[
'url'
],
'couchdb_server'
:
settings
.
COUCHDB
[
'url'
],
...
@@ -137,7 +139,9 @@ def prepa_odoo(request):
...
@@ -137,7 +139,9 @@ def prepa_odoo(request):
'ask_for_street2'
:
getattr
(
settings
,
'SUBSCRIPTION_ADD_STREET2'
,
False
),
'ask_for_street2'
:
getattr
(
settings
,
'SUBSCRIPTION_ADD_STREET2'
,
False
),
'ask_for_second_phone'
:
getattr
(
settings
,
'SUBSCRIPTION_ADD_SECOND_PHONE'
,
False
),
'ask_for_second_phone'
:
getattr
(
settings
,
'SUBSCRIPTION_ADD_SECOND_PHONE'
,
False
),
'show_ftop_button'
:
getattr
(
settings
,
'SHOW_FTOP_BUTTON'
,
True
),
'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_addr_complement
# with_second_phone
# with_second_phone
...
...
templates/members/prepa_odoo.html
View file @
b7031bb8
...
@@ -106,6 +106,7 @@
...
@@ -106,6 +106,7 @@
var
mag_place_string
=
'{{mag_place_string}}'
;
var
mag_place_string
=
'{{mag_place_string}}'
;
var
office_place_string
=
'{{office_place_string}}'
var
office_place_string
=
'{{office_place_string}}'
var
max_begin_hour
=
'{{max_begin_hour}}'
var
max_begin_hour
=
'{{max_begin_hour}}'
var
committees_shift_id
=
'{{committees_shift_id}}'
;
</script>
</script>
<script
src=
"{% static "
js
/
all_common
.
js
"
%}"?
v=
1651853225
></script>
<script
src=
"{% static "
js
/
all_common
.
js
"
%}"?
v=
1651853225
></script>
<script
src=
"{% static "
js
/
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