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
59cec0ae
Commit
59cec0ae
authored
Dec 15, 2021
by
Félicie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_cooperatic' into '1492-order-press-enter'
# Conflicts: # orders/static/js/orders_helper.js
parents
69547f1c
b88b0203
Pipeline
#1649
passed with stage
in 1 minute 32 seconds
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
7 deletions
+18
-7
members.js
members/static/js/members.js
+7
-2
members-space-shifts-exchange.js
members_space/static/js/members-space-shifts-exchange.js
+4
-2
orders_helper.js
orders/static/js/orders_helper.js
+5
-3
index.html
templates/members/index.html
+2
-0
No files found.
members/static/js/members.js
View file @
59cec0ae
...
@@ -62,6 +62,7 @@ var html_elts = {
...
@@ -62,6 +62,7 @@ var html_elts = {
real_capture
:
$
(
'#real_capture'
),
real_capture
:
$
(
'#real_capture'
),
multi_results
:
$
(
'#multi_results_preview'
),
multi_results
:
$
(
'#multi_results_preview'
),
cooperative_state
:
$
(
'#cooperative_state'
),
cooperative_state
:
$
(
'#cooperative_state'
),
status_explanation
:
$
(
'#status_explanation'
),
next_shifts
:
$
(
'#next_shifts'
)
next_shifts
:
$
(
'#next_shifts'
)
};
};
...
@@ -91,8 +92,12 @@ function fill_member_slide(member) {
...
@@ -91,8 +92,12 @@ function fill_member_slide(member) {
}
}
html_elts
.
image_medium
.
html
(
'<img src="'
+
img_src
+
'" width="128" />'
);
html_elts
.
image_medium
.
html
(
'<img src="'
+
img_src
+
'" width="128" />'
);
html_elts
.
cooperative_state
.
html
(
member
.
cooperative_state
);
html_elts
.
cooperative_state
.
html
(
member
.
cooperative_state
);
if
(
member
.
cooperative_state
==
'Désinscrit(e)'
||
member
.
cooperative_state
==
'Rattrapage'
)
coop_info
.
addClass
(
'b_red'
);
if
(
member
.
cooperative_state
==
'Rattrapage'
)
{
else
if
(
member
.
cooperative_state
==
'En alerte'
||
member
.
cooperative_state
==
'Délai accordé'
)
coop_info
.
addClass
(
'b_orange'
);
var
explanation
=
"Tu as dû manquer un service! Pour pouvoir faire tes courses aujourd'hui, tu dois d'abord sélectionner un rattrapage sur ton espace membre."
html_elts
.
status_explanation
.
html
(
explanation
)
}
if
(
member
.
cooperative_state
==
'Désinscrit(e)'
)
coop_info
.
addClass
(
'b_red'
);
else
if
(
member
.
cooperative_state
==
'En alerte'
||
member
.
cooperative_state
==
'Délai accordé'
||
member
.
cooperative_state
==
'Rattrapage'
)
coop_info
.
addClass
(
'b_orange'
);
if
(
member
.
shifts
.
length
>
0
)
{
if
(
member
.
shifts
.
length
>
0
)
{
html_elts
.
next_shifts
.
append
(
'Prochains services : '
);
html_elts
.
next_shifts
.
append
(
'Prochains services : '
);
...
...
members_space/static/js/members-space-shifts-exchange.js
View file @
59cec0ae
...
@@ -91,8 +91,10 @@ function add_or_change_shift(new_shift_id) {
...
@@ -91,8 +91,10 @@ function add_or_change_shift(new_shift_id) {
selected_shift
=
null
;
selected_shift
=
null
;
if
(
error
.
status
===
400
)
{
if
(
error
.
status
===
400
)
{
alert
(
`Désolé ! Le service que vous souhaitez échanger démarre dans moins de 24h. `
+
alert
(
`Désolé ! Le service que tu souhaites échanger démarre dans moins de 24h. `
+
`Il n'est plus possible de l'échanger.`
);
`Afin de faciliter la logistique des services, il n'est plus possible de l'échanger.`
+
`Si tu ne peux vraiment pas venir, tu seras noté.e absent.e à ton service.`
+
`Tu devras alors sélectionner un service de rattrapage sur ton espace membre.`
);
}
else
{
}
else
{
alert
(
`Une erreur est survenue. `
+
alert
(
`Une erreur est survenue. `
+
`Il est néanmoins possible que la requête ait abouti, `
+
`Il est néanmoins possible que la requête ait abouti, `
+
...
...
orders/static/js/orders_helper.js
View file @
59cec0ae
...
@@ -1601,9 +1601,11 @@ function display_products(params) {
...
@@ -1601,9 +1601,11 @@ function display_products(params) {
}
}
}
}
})
})
.
on
(
'change'
,
'tbody td .product_qty_input'
,
function
()
{
.
on
(
'keypress'
,
'tbody td .product_qty_input'
,
function
(
e
)
{
// Since data change is saved on blur, set focus on change in case of arrows pressed
// Validate on Enter pressed
$
(
this
).
focus
();
if
(
e
.
which
==
13
)
{
$
(
this
).
blur
();
}
})
})
.
on
(
'keydown'
,
'tbody td .product_qty_input'
,
function
(
e
)
{
.
on
(
'keydown'
,
'tbody td .product_qty_input'
,
function
(
e
)
{
if
(
e
.
which
==
38
)
{
if
(
e
.
which
==
38
)
{
...
...
templates/members/index.html
View file @
59cec0ae
...
@@ -107,6 +107,8 @@
...
@@ -107,6 +107,8 @@
</div>
</div>
<div
id=
"cooperative_state"
>
<div
id=
"cooperative_state"
>
</div>
</div>
<div
id=
"status_explanation"
>
</div>
<div
id=
"next_shifts"
>
<div
id=
"next_shifts"
>
</div>
</div>
</div>
</div>
...
...
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