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
6417e7e9
Commit
6417e7e9
authored
Nov 03, 2022
by
François C.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve auth. errors handling during on members/admin/manage_regular_shifts
parent
523a4803
Pipeline
#2482
passed with stage
in 1 minute 24 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
12 deletions
+23
-12
manage_regular_shifts.js
members/static/js/admin/manage_regular_shifts.js
+22
-11
manage_regular_shifts.html
templates/members/admin/manage_regular_shifts.html
+1
-1
No files found.
members/static/js/admin/manage_regular_shifts.js
View file @
6417e7e9
...
@@ -37,18 +37,25 @@ function remove_from_shift_template() {
...
@@ -37,18 +37,25 @@ function remove_from_shift_template() {
display_member_info
();
display_member_info
();
closeModal
();
closeModal
();
},
},
error
:
function
()
{
error
:
function
(
err_data
)
{
err
=
{
if
(
err_data
.
status
==
403
)
{
msg
:
"erreur serveur lors de la suppression du membre du créneau"
,
enqueue_message_for_next_loading
(
"Problème d'autorisation. Merci de vous réidentifier."
);
ctx
:
'members.admin.manage_regular_shifts.remove_from_shift_template'
location
.
reload
();
};
report_JS_error
(
err
,
'members.admin'
);
closeModal
();
$
.
notify
(
"Une erreur est survenue lors du processus de suppression du membre du créneau."
,
{
}
else
{
globalPosition
:
"top right"
,
err
=
{
className
:
"error"
msg
:
"erreur serveur lors de la suppression du membre du créneau"
,
});
ctx
:
'members.admin.manage_regular_shifts.remove_from_shift_template'
};
report_JS_error
(
err
,
'members.admin'
);
closeModal
();
$
.
notify
(
"Une erreur est survenue lors du processus de suppression du membre du créneau."
,
{
globalPosition
:
"top right"
,
className
:
"error"
});
}
}
}
});
});
}
}
...
@@ -115,6 +122,10 @@ function shift_subscrition(shift_type, shift_template_id = null, shift_template_
...
@@ -115,6 +122,10 @@ function shift_subscrition(shift_type, shift_template_id = null, shift_template_
true
,
true
,
false
false
);
);
}
else
if
(
err_data
.
status
==
403
)
{
enqueue_message_for_next_loading
(
"Problème d'autorisation. Merci de vous réidentifier."
);
location
.
reload
();
}
else
{
}
else
{
err
=
{
err
=
{
msg
:
"erreur serveur lors de l'inscription du membre au créneau"
,
msg
:
"erreur serveur lors de l'inscription du membre au créneau"
,
...
...
templates/members/admin/manage_regular_shifts.html
View file @
6417e7e9
{% extends "base.html" %}
{% extends "base.html" %}
{% load static %}
{% load static %}
{% block body_class %}manage_regular_shifts{% endblock %}
{% block additionnal_css %}
{% block additionnal_css %}
<link
rel=
"stylesheet"
href=
"{% static 'css/datatables/datatables.min.css' %}"
>
<link
rel=
"stylesheet"
href=
"{% static 'css/datatables/datatables.min.css' %}"
>
<link
rel=
"stylesheet"
href=
"{% static 'css/admin/manage_regular_shifts.css' %}"
>
<link
rel=
"stylesheet"
href=
"{% static 'css/admin/manage_regular_shifts.css' %}"
>
...
...
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