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
6f10063e
Commit
6f10063e
authored
Apr 20, 2022
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
INS: register to comitees shift
parent
d893ecc1
Pipeline
#2147
passed with stage
in 1 minute 28 seconds
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
5 deletions
+25
-5
inscriptions.js
members/static/js/inscriptions.js
+3
-0
views.py
members/views.py
+4
-1
common.js
outils/static/js/common.js
+13
-1
inscriptions.html
templates/members/inscriptions.html
+5
-3
No files found.
members/static/js/inscriptions.js
View file @
6f10063e
...
...
@@ -773,4 +773,7 @@ $(document).ready(function() {
searchMembersForAssociate
();
});
if
(
committees_shift_id
!==
"None"
)
{
$
(
"#shift_choice button[data-select='Volant']"
).
text
(
"Comités"
);
}
});
members/views.py
View file @
6f10063e
...
...
@@ -87,7 +87,9 @@ def inscriptions(request, type=1):
"""
template
=
loader
.
get_template
(
'members/inscriptions.html'
)
context
=
{
'type'
:
type
,
'title'
:
'Inscriptions'
,
committees_shift_id
=
CagetteServices
.
get_committees_shift_id
()
context
=
{
'type'
:
type
,
'title'
:
'Inscriptions'
,
'couchdb_server'
:
settings
.
COUCHDB
[
'url'
],
'mag_place_string'
:
settings
.
MAG_NAME
,
'office_place_string'
:
settings
.
OFFICE_NAME
,
...
...
@@ -104,6 +106,7 @@ def inscriptions(request, type=1):
'db'
:
settings
.
COUCHDB
[
'dbs'
][
'member'
],
'ASSOCIATE_MEMBER_SHIFT'
:
getattr
(
settings
,
'ASSOCIATE_MEMBER_SHIFT'
,
''
),
'prepa_odoo_url'
:
getattr
(
settings
,
'PREPA_ODOO_URL'
,
'/members/prepa-odoo'
),
'committees_shift_id'
:
committees_shift_id
,
}
response
=
HttpResponse
(
template
.
render
(
context
,
request
))
...
...
outils/static/js/common.js
View file @
6f10063e
...
...
@@ -53,8 +53,13 @@ function subscribe_shift(shift_t_id) {
var
s_data
=
shift_templates
[
shift_t_id
].
data
;
var
shift_name
=
get_shift_name
(
s_data
);
if
(
committees_shift_id
!==
undefined
&&
committees_shift_id
!==
"None"
&&
shift_name
===
"Volant"
)
{
shift_name
=
'des Comités'
}
let
msg
=
'On inscrit le membre au créneau '
+
shift_name
openModal
(
'On inscrit le membre au créneau '
+
shift_name
,
msg
,
function
()
{
closeModal
();
current_coop
.
shift_template
=
shift_templates
[
shift_t_id
];
...
...
@@ -327,8 +332,15 @@ function retrieve_and_draw_shift_tempates() {
$
.
each
(
shift_templates
,
function
(
i
,
e
)
{
if
(
e
.
data
.
type
==
2
&&
volant
==
null
)
{
// has comitee shift
if
(
committees_shift_id
!==
undefined
&&
committees_shift_id
!==
"None"
)
{
if
(
e
.
data
.
id
==
parseInt
(
committees_shift_id
))
{
volant
=
e
.
data
.
id
}
}
else
{
volant
=
e
.
data
.
id
;
}
}
});
dbc
.
allDocs
({
include_docs
:
true
,
descending
:
true
},
function
(
err
,
resp
)
{
...
...
templates/members/inscriptions.html
View file @
6f10063e
...
...
@@ -178,9 +178,11 @@
auto_compaction
:
false
});
var
mag_place_string
=
'{{mag_place_string}}'
;
var
office_place_string
=
'{{office_place_string}}'
var
max_begin_hour
=
'{{max_begin_hour}}'
var
email_domain
=
'{{email_domain}}'
var
office_place_string
=
'{{office_place_string}}'
;
var
max_begin_hour
=
'{{max_begin_hour}}'
;
var
email_domain
=
'{{email_domain}}'
;
var
committees_shift_id
=
'{{committees_shift_id}}'
;
</script>
<script
src=
"{% static "
js
/
all_common
.
js
"
%}?
v=
"></script>
<script src="
{%
static
"
js
/
common
.
js
"
%}?
v=
"></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