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
f333bf6e
Commit
f333bf6e
authored
Jun 30, 2023
by
François C.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix cancel shift error
parent
9910c111
Pipeline
#2890
failed with stage
in 1 minute 6 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
members-space-shifts-exchange.js
members_space/static/js/members-space-shifts-exchange.js
+1
-1
models.py
shifts/models.py
+1
-2
No files found.
members_space/static/js/members-space-shifts-exchange.js
View file @
f333bf6e
...
@@ -119,7 +119,7 @@ function add_or_change_shift(new_shift_id) {
...
@@ -119,7 +119,7 @@ function add_or_change_shift(new_shift_id) {
error
:
function
(
error
)
{
error
:
function
(
error
)
{
closeModal
();
closeModal
();
selected_shift
=
null
;
selected_shift
=
null
;
console
.
log
(
error
)
if
(
error
.
status
===
400
&&
'msg'
in
error
.
responseJSON
&&
error
.
responseJSON
.
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. `
+
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. `
+
`Afin de faciliter la logistique des services, il n'est plus possible de l'échanger. `
+
...
...
shifts/models.py
View file @
f333bf6e
...
@@ -292,13 +292,12 @@ class CagetteShift(models.Model):
...
@@ -292,13 +292,12 @@ class CagetteShift(models.Model):
coop_logger
.
error
(
"Model affect shift nobody found :
%
s"
,
str
(
cond
))
coop_logger
.
error
(
"Model affect shift nobody found :
%
s"
,
str
(
cond
))
return
response
return
response
def
cancel_shift
(
self
,
idsRegisteur
,
origin
=
'memberspace'
,
description
=
None
):
def
cancel_shift
(
self
,
idsRegisteur
,
origin
=
'memberspace'
,
description
=
''
):
"""Annule un shift"""
"""Annule un shift"""
fieldsDatas
=
{
"related_shift_state"
:
'cancel'
,
fieldsDatas
=
{
"related_shift_state"
:
'cancel'
,
"origin"
:
origin
,
"origin"
:
origin
,
"state"
:
'cancel'
,
"state"
:
'cancel'
,
"cancellation_description"
:
description
}
"cancellation_description"
:
description
}
return
self
.
o_api
.
update
(
'shift.registration'
,
idsRegisteur
,
fieldsDatas
)
return
self
.
o_api
.
update
(
'shift.registration'
,
idsRegisteur
,
fieldsDatas
)
def
reopen_shift
(
self
,
data
):
def
reopen_shift
(
self
,
data
):
...
...
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