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
0f923906
Commit
0f923906
authored
Mar 10, 2022
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix error message not being displayed in calendar
parent
a28e4a63
Pipeline
#1907
passed with stage
in 1 minute 32 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
members-space-shifts-exchange.js
members_space/static/js/members-space-shifts-exchange.js
+3
-3
No files found.
members_space/static/js/members-space-shifts-exchange.js
View file @
0f923906
...
...
@@ -116,17 +116,17 @@ function add_or_change_shift(new_shift_id) {
closeModal
();
selected_shift
=
null
;
if
(
error
.
status
===
400
&&
error
.
msg
===
"Old service in less than 24hours."
)
{
if
(
error
.
status
===
400
&&
'msg'
in
error
.
responseJSON
&&
error
.
responseJSON
.
msg
===
"Old service in less than 24hours."
)
{
alert
(
`Désolé ! Le service que tu souhaites échanger démarre dans moins de 24h. `
+
`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
if
(
error
.
status
===
500
&&
error
.
msg
===
"Fail to create shift"
)
{
}
else
if
(
error
.
status
===
500
&&
'msg'
in
error
.
responseJSON
&&
error
.
responseJSON
.
msg
===
"Fail to create shift"
)
{
// TODO differentiate error cases!
alert
(
`Une erreur est survenue. `
+
`Il est néanmoins possible que la requête ait abouti, `
+
`veuillez patienter quelques secondes puis vérifier vos services enregistrés.`
);
}
else
if
(
error
.
status
===
400
&&
error
.
msg
===
"Bad arguments"
)
{
}
else
if
(
error
.
status
===
400
&&
'msg'
in
error
.
responseJSON
&&
error
.
responseJSON
.
msg
===
"Bad arguments"
)
{
alert
(
`Une erreur est survenue. `
+
`Il est néanmoins possible que la requête ait abouti, `
+
`veuillez patienter quelques secondes puis vérifier vos services enregistrés.`
);
...
...
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