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
15306480
Commit
15306480
authored
May 05, 2021
by
adamrusly
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://gitlab.uitm.edu.my/training/ptarpwatraining
parents
ab5ed938
fb89ab48
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
7 deletions
+72
-7
borrow.vue
src/pages/borrow.vue
+69
-7
fine.vue
src/pages/fine.vue
+3
-0
No files found.
src/pages/borrow.vue
View file @
15306480
...
...
@@ -2,8 +2,11 @@
<q-page
padding
>
<div
class=
"q-pa-md"
>
<q-banner
dense
inline-actions
class=
"text-white bg-blue font-tajuk"
>
<div
class=
"font-tajuk text-h4"
>
Borrow
<div
v-if=
"user.fullname"
class=
"font-tajuk text-h7 ellipsis"
>
Borrow History for
{{
user
.
fullname
}}
</div>
<div
v-if=
"!user.fullname"
class=
"font-tajuk text-h7"
>
Borrow History
</div>
</q-banner>
<q-input
bottom-slots
v-model=
"borrower_id"
ref=
"borrower_id"
:rules=
"[val => !!val || 'Field is required']"
label=
"Staf/Student ID"
dense
>
...
...
@@ -15,12 +18,37 @@
<q-btn
round
dense
flat
icon=
"search"
@
click=
"findFines"
/>
</
template
>
</q-input>
<div
class=
"q-pa-md fit row wrap justify-center q-gutter-md"
>
<div
v-if=
"searchact"
class=
"q-pt-md"
>
<div
class=
""
>
<q-card
style=
"width: 90vw"
>
<q-item>
<q-item-section
>
ID
</q-item-section>
<q-item-section>
<q-item-label>
<q-skeleton
type=
"text"
/>
</q-item-label>
</q-item-section>
</q-item>
<q-skeleton
height=
"200px"
square
/>
<q-card-actions
align=
"right"
class=
"q-gutter-md"
>
<q-skeleton
type=
"QBtn"
/>
<q-skeleton
type=
"QBtn"
/>
</q-card-actions>
</q-card>
</div>
</div>
<div
v-if=
"data.length>0 && !searchact"
class=
"q-pt-md row wrap justify-center q-gutter-md"
>
<q-table
title=
"Borrows
"
:title=
"lbltitle+borrower_id
"
:data=
"data"
:columns=
"columns"
row-key=
"name"
style=
"width:90vw"
/>
</div>
</div>
...
...
@@ -28,11 +56,14 @@
</template>
<
script
>
import
{
mapGetters
}
from
"vuex"
export
default
{
data
()
{
return
{
borrower_id
:
'2016607348'
,
total_fines
:
.
0
,
searchact
:
false
,
lbltitle
:
'ID : '
,
columns
:
[
{
name
:
'BOR_ID'
,
...
...
@@ -45,27 +76,58 @@ export default {
{
name
:
'COPY_ID'
,
align
:
'center'
,
label
:
'Copy ID'
,
field
:
'COPY_ID'
,
sortable
:
true
},
{
name
:
'ISS_DT'
,
label
:
'Iss Date'
,
field
:
'ISS_DT'
,
sortable
:
false
},
{
name
:
'RET_DT'
,
label
:
'Ret Date'
,
field
:
'RET_DT'
},
{
name
:
'TITLE_NAME'
,
label
:
'Title Name'
,
field
:
'TITLE_NAME'
}
{
name
:
'TITLE_NAME'
,
label
:
'Title Name'
,
field
:
'TITLE_NAME'
,
align
:
"left"
}
],
data
:
[]
}
},
computed
:
{
...
mapGetters
(
"user"
,
[
"user"
]),
},
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
.
searchact
=
true
;
this
.
$axios
.
get
(
'wils/pinjam'
,{
params
:
{
BOR_ID
:
this
.
borrower_id
}
}).
then
((
response
)
=>
{
console
.
log
(
response
)
this
.
data
=
response
.
data
this
.
data
=
response
.
data
if
(
this
.
data
.
length
>
0
){
this
.
$q
.
notify
({
message
:
'Record was successfully retrieved.'
,
icon
:
'check'
,
color
:
'green'
})
}
else
{
this
.
$q
.
notify
({
message
:
'No record found'
,
icon
:
'error'
,
color
:
'red'
})
}
}).
catch
((
err
)
=>
{
console
.
log
(
err
)
this
.
$q
.
notify
({
message
:
'Error. please try again.'
,
icon
:
'error'
,
color
:
'red'
})
}).
finally
(()
=>
{
this
.
$q
.
loading
.
hide
()
this
.
searchact
=
false
})
}
}
...
...
src/pages/fine.vue
View file @
15306480
<
template
>
<q-page
padding
>
<div
class=
"q-pa-md"
>
</div>
<div
class=
"q-pa-md"
>
<q-banner
dense
inline-actions
class=
"text-white bg-blue font-tajuk"
>
<div
class=
"font-tajuk text-h4"
>
...
...
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