Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
P
ptarpwatraining
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
training
ptarpwatraining
Commits
c3e627b2
Commit
c3e627b2
authored
May 05, 2021
by
Azrul Amir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update page fine
parent
0b950a9f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
9 deletions
+33
-9
quasar.conf.js
quasar.conf.js
+4
-1
borrow.vue
src/pages/borrow.vue
+3
-3
fine.vue
src/pages/fine.vue
+26
-5
No files found.
quasar.conf.js
View file @
c3e627b2
...
...
@@ -94,7 +94,10 @@ module.exports = function (/* ctx */) {
// directives: [],
// Quasar plugins
plugins
:
[]
plugins
:
[
'Loading'
,
'Notify'
]
},
// animations: 'all', // --- includes all animations
...
...
src/pages/borrow.vue
View file @
c3e627b2
...
...
@@ -6,9 +6,9 @@
Borrow
</div>
</q-banner>
<q-input
bottom-slots
v-model=
"borrower_id"
ref=
"borrower_id"
:rules=
"[val => !!val || 'Field is required']"
label=
"
borrower_id
"
dense
>
<q-input
bottom-slots
v-model=
"borrower_id"
ref=
"borrower_id"
:rules=
"[val => !!val || 'Field is required']"
label=
"
Staf/Student ID
"
dense
>
<template
v-slot:hint
>
Borrower id
2016607348
</
template
>
<
template
v-slot:append
>
...
...
@@ -31,7 +31,7 @@
export
default
{
data
()
{
return
{
borrower_id
:
''
,
borrower_id
:
'
2016607348
'
,
total_fines
:
.
0
,
columns
:
[
{
...
...
src/pages/fine.vue
View file @
c3e627b2
...
...
@@ -6,7 +6,7 @@
Fines
</div>
</q-banner>
<q-input
bottom-slots
v-model=
"borrower_id"
ref=
"borrower_id"
:rules=
"[val => !!val || 'Field is required']"
label=
"
borrower_id
"
dense
>
<q-input
bottom-slots
v-model=
"borrower_id"
ref=
"borrower_id"
:rules=
"[val => !!val || 'Field is required']"
label=
"
Student/Staff ID
"
dense
>
<template
v-slot:hint
>
Borrower id
</
template
>
...
...
@@ -16,7 +16,7 @@
</
template
>
</q-input>
<div
v-if=
"total_fines>0"
class=
"q-pa-md fit row wrap justify-center q-gutter-md"
>
<q-avatar
size=
"
300px"
color=
"red
"
>
{{ total_fines }}
</q-avatar>
<q-avatar
size=
"
70vw"
color=
"green
"
>
{{ total_fines }}
</q-avatar>
</div>
</div>
</q-page>
...
...
@@ -26,17 +26,25 @@
export
default
{
data
()
{
return
{
borrower_id
:
''
,
borrower_id
:
'
2016607348
'
,
total_fines
:
.
0
}
},
methods
:
{
findFines
()
{
this
.
$refs
.
borrower_id
.
validate
()
if
(
this
.
$refs
.
borrower_id
.
hasError
){
this
.
$q
.
notify
({
message
:
'Error. Please enter ID.'
,
icon
:
'error'
,
color
:
'red'
})
}
else
{
this
.
$q
.
loading
.
show
({
delay
:
10
// ms
})
this
.
$axios
.
get
(
'wils/denda'
,{
params
:
{
borrower_id
:
this
.
borrower_id
...
...
@@ -44,8 +52,21 @@ export default {
}).
then
((
response
)
=>
{
console
.
log
(
response
)
this
.
total_fines
=
response
.
data
.
jumlah
this
.
$q
.
notify
({
message
:
'Record was successfully retrieved.'
,
icon
:
'check'
,
color
:
'green'
})
}).
catch
((
err
)
=>
{
console
.
log
(
err
)
this
.
$q
.
notify
({
message
:
'Error. please try again.'
,
icon
:
'error'
,
color
:
'red'
})
}).
finally
(()
=>
{
this
.
$q
.
loading
.
hide
()
})
}
}
...
...
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