Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
AURA
dashboard
Commits
f43afc2c
Commit
f43afc2c
authored
Sep 26, 2019
by
jackie / Andrea Ida Malkah Klaura
Browse files
ShowManager: handle empty strings as null
parent
8a45f85d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/components/ShowManagerModalShow.vue
View file @
f43afc2c
...
...
@@ -571,12 +571,13 @@ export default {
if
(
this
.
string
!==
this
.
show
.
description
)
{
event
.
preventDefault
()
let
updatedShow
=
this
.
getUpdateShowObject
()
updatedShow
.
description
=
this
.
string
if
(
this
.
string
===
''
)
{
updatedShow
.
description
=
null
}
else
{
updatedShow
.
description
=
this
.
string
}
axios
.
put
(
process
.
env
.
VUE_APP_API_STEERING_SHOWS
+
this
.
show
.
id
+
'
/
'
,
updatedShow
,
{
withCredentials
:
true
,
headers
:
{
'
Authorization
'
:
'
Bearer
'
+
this
.
$parent
.
$parent
.
user
.
access_token
}
}).
then
(()
=>
{
this
.
show
.
description
=
this
.
string
this
.
show
.
description
=
updatedShow
.
description
this
.
$refs
.
modalShowDescription
.
hide
()
}).
catch
(
error
=>
{
this
.
$log
.
error
(
error
.
response
.
status
+
'
'
+
error
.
response
.
statusText
)
...
...
@@ -590,12 +591,13 @@ export default {
if
(
this
.
string
!==
this
.
show
.
email
)
{
event
.
preventDefault
()
let
updatedShow
=
this
.
getUpdateShowObject
()
updatedShow
.
email
=
this
.
string
if
(
this
.
string
===
''
)
{
updatedShow
.
email
=
null
}
else
{
updatedShow
.
email
=
this
.
string
}
axios
.
put
(
process
.
env
.
VUE_APP_API_STEERING_SHOWS
+
this
.
show
.
id
+
'
/
'
,
updatedShow
,
{
withCredentials
:
true
,
headers
:
{
'
Authorization
'
:
'
Bearer
'
+
this
.
$parent
.
$parent
.
user
.
access_token
}
}).
then
(()
=>
{
this
.
show
.
email
=
this
.
string
this
.
show
.
email
=
updatedShow
.
email
this
.
$refs
.
modalShowEmail
.
hide
()
}).
catch
(
error
=>
{
this
.
$log
.
error
(
error
.
response
.
status
+
'
'
+
error
.
response
.
statusText
)
...
...
@@ -609,12 +611,13 @@ export default {
if
(
this
.
string
!==
this
.
show
.
website
)
{
event
.
preventDefault
()
let
updatedShow
=
this
.
getUpdateShowObject
()
updatedShow
.
website
=
this
.
string
if
(
this
.
string
===
''
)
{
updatedShow
.
website
=
null
}
else
{
updatedShow
.
website
=
this
.
string
}
axios
.
put
(
process
.
env
.
VUE_APP_API_STEERING_SHOWS
+
this
.
show
.
id
+
'
/
'
,
updatedShow
,
{
withCredentials
:
true
,
headers
:
{
'
Authorization
'
:
'
Bearer
'
+
this
.
$parent
.
$parent
.
user
.
access_token
}
}).
then
(()
=>
{
this
.
show
.
website
=
this
.
string
this
.
show
.
website
=
updatedShow
.
website
this
.
$refs
.
modalShowWebsite
.
hide
()
}).
catch
(
error
=>
{
this
.
$log
.
error
(
error
.
response
.
status
+
'
'
+
error
.
response
.
statusText
)
...
...
@@ -878,23 +881,28 @@ export default {
They are called from the parent component
*/
showName
()
{
this
.
string
=
this
.
show
.
name
if
(
this
.
show
.
name
!==
null
)
{
this
.
string
=
this
.
show
.
name
}
else
{
this
.
string
=
''
}
this
.
$refs
.
modalShowName
.
show
()
},
showShortDescription
()
{
this
.
string
=
this
.
show
.
short_description
if
(
this
.
show
.
short_description
!==
null
)
{
this
.
string
=
this
.
show
.
short_description
}
else
{
this
.
string
=
''
}
this
.
$refs
.
modalShowShortDescription
.
show
()
},
showDescription
()
{
this
.
string
=
this
.
show
.
description
if
(
this
.
show
.
description
!==
null
)
{
this
.
string
=
this
.
show
.
description
}
else
{
this
.
string
=
''
}
this
.
$refs
.
modalShowDescription
.
show
()
},
showEmail
()
{
this
.
string
=
this
.
show
.
email
if
(
this
.
show
.
email
!==
null
)
{
this
.
string
=
this
.
show
.
email
}
else
{
this
.
string
=
''
}
this
.
$refs
.
modalShowEmail
.
show
()
},
showWebsite
()
{
this
.
string
=
this
.
show
.
website
if
(
this
.
show
.
website
!==
null
)
{
this
.
string
=
this
.
show
.
website
}
else
{
this
.
string
=
''
}
this
.
$refs
.
modalShowWebsite
.
show
()
},
showCBAid
()
{
...
...
Write
Preview
Supports
Markdown
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