Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Omar Elkadi
PStA WP2 OmarElkadi1
Commits
c91a4f65
Commit
c91a4f65
authored
Jun 22, 2021
by
Omar Elkadi
Browse files
change the alert theme
parent
1af21d2f
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/views/SickForm.vue
View file @
c91a4f65
...
...
@@ -153,7 +153,7 @@
<
script
lang=
"ts"
>
import
axios
from
'
axios
'
import
Swal
from
'
sweetalert2
/dist/sweetalert2.js
'
import
Swal
from
'
sweetalert2
'
export
default
{
name
:
'
SickForm
'
,
...
...
@@ -439,27 +439,32 @@ export default {
const
sizeLimit
=
2000000
// 2 megabyte
const
fileExtension
=
file
.
name
.
split
(
'
.
'
).
pop
()
console
.
log
(
fileExtension
)
if
(
!
allowedExtentions
.
includes
(
fileExtension
))
{
// extention validation
this
.
$refs
.
file
.
value
=
null
// delete the file from selection
Swal
.
fire
({
title
:
'
Fehler!
'
,
text
:
'
Die Datei muss jpg, jpeg, png oder pdf
'
,
icon
:
'
error
'
icon
:
'
error
'
,
confirmButtonColor
:
'
#1a4273
'
,
background
:
'
#dadada
'
})
}
else
if
(
file
.
size
>
sizeLimit
)
{
// size validation
this
.
$refs
.
file
.
value
=
null
Swal
.
fire
({
title
:
'
Fehler!
'
,
text
:
'
Die Datei ist zu Groß
'
,
icon
:
'
error
'
icon
:
'
error
'
,
confirmButtonColor
:
'
#1a4273
'
,
background
:
'
#dadada
'
}
)
}
else
{
// if valid then load the file in our valiable
Swal
.
fire
({
title
:
'
Super!
'
,
text
:
'
Die Datei wurde erfolgreich geladen
'
,
icon
:
'
success
'
icon
:
'
success
'
,
confirmButtonColor
:
'
#1a4273
'
,
background
:
'
#dadada
'
})
this
.
EvidenceFile
=
file
}
...
...
@@ -489,7 +494,9 @@ export default {
Swal
.
fire
({
title
:
'
Gesandet!
'
,
text
:
'
Danke für Ihre Meldung
'
,
icon
:
'
success
'
icon
:
'
success
'
,
confirmButtonColor
:
'
#1a4273
'
,
background
:
'
#dadada
'
})
// reset the form
event
.
target
.
reset
()
...
...
tsconfig.json
View file @
c91a4f65
...
...
@@ -3,9 +3,9 @@
"./src/**/*"
],
"compilerOptions"
:
{
"module"
:
"es
2015
"
,
"module"
:
"es
NEXT
"
,
"moduleResolution"
:
"node"
,
"target"
:
"es
6
"
,
"target"
:
"es
NEXT
"
,
"sourceMap"
:
true
,
"allowJs"
:
true
}
...
...
vetur.config.js
View file @
c91a4f65
...
...
@@ -5,8 +5,8 @@ module.exports = {
// override vscode settings
// Notice: It only affects the settings used by Vetur.
settings
:
{
"
vetur.useWorkspaceDependencies
"
:
true
,
"
vetur.experimental.templateInterpolationService
"
:
true
'
vetur.useWorkspaceDependencies
'
:
true
,
'
vetur.experimental.templateInterpolationService
'
:
true
},
// **optional** default: `[{ root: './' }]`
// support monorepos
...
...
@@ -39,4 +39,4 @@ module.exports = {
]
}
]
}
\ No newline at end of file
}
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