Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dtd
/
civitas.ui
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 584c5823
authored
a week ago
by
Nabiilah Putri Safa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add peminjaman buku
1 parent
191af21b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
131 additions
and
25 deletions
@core/components/TheCustomizer.vue
@layouts/components/HorizontalNavLayout.vue
@layouts/components/VerticalNav.vue
components/beranda/UserLib.vue
components/beranda/UserLog.vue
layouts/components/DefaultLayoutWithHorizontalNav.vue
pages/naputpro/beranda/[tab].vue
@core/components/TheCustomizer.vue
View file @
584c582
<
script
setup
lang=
"tsx"
>
import
{
useStorage
}
from
'@vueuse/core'
import
{
PerfectScrollbar
}
from
'vue3-perfect-scrollbar'
import
{
useTheme
}
from
'vuetify'
import
{
staticPrimaryColor
,
staticPrimaryDarkenColor
}
from
'@/plugins/vuetify/theme'
import
{
Direction
,
Layout
,
Skins
,
Theme
}
from
'@core/enums'
import
{
useConfigStore
}
from
'@core/stores/config'
...
...
@@ -9,6 +6,9 @@ import horizontalLight from '@images/customizer-icons/horizontal-light.svg'
import
{
AppContentLayoutNav
,
ContentWidth
}
from
'@layouts/enums'
import
{
cookieRef
,
namespaceConfig
}
from
'@layouts/stores/config'
import
{
themeConfig
}
from
'@themeConfig'
import
{
useStorage
}
from
'@vueuse/core'
import
{
PerfectScrollbar
}
from
'vue3-perfect-scrollbar'
import
{
useTheme
}
from
'vuetify'
import
borderSkin
from
'@images/customizer-icons/border-light.svg'
import
collapsed
from
'@images/customizer-icons/collapsed-light.svg'
...
...
@@ -488,7 +488,7 @@ const resetCustomizer = async () => {
<!-- SECTION LAYOUT -->
<CustomizerSection
title=
"Layout"
>
<!-- 👉 Layouts -->
<div
class=
"d-flex flex-column gap-3"
>
<
!-- <
div class="d-flex flex-column gap-3">
<h6 class="text-base font-weight-medium">
Layout
</h6>
...
...
@@ -503,7 +503,7 @@ const resetCustomizer = async () => {
<span class="text-sm text-medium-emphasis">{{ item.label }}</span>
</template>
</CustomRadiosWithImage>
</div>
</div>
-->
<!-- 👉 Content Width -->
<div
class=
"d-flex flex-column gap-3"
>
...
...
@@ -524,7 +524,7 @@ const resetCustomizer = async () => {
</div>
<!-- 👉 Direction -->
<div
class=
"d-flex flex-column gap-3"
>
<
!-- <
div class="d-flex flex-column gap-3">
<h6 class="text-base font-weight-medium">
Direction
</h6>
...
...
@@ -539,7 +539,7 @@ const resetCustomizer = async () => {
<span class="text-sm text-medium-emphasis">{{ item?.label }}</span>
</template>
</CustomRadiosWithImage>
</div>
</div>
-->
</CustomizerSection>
<!-- !SECTION -->
</PerfectScrollbar>
...
...
This diff is collapsed.
Click to expand it.
@layouts/components/HorizontalNavLayout.vue
View file @
584c582
<
script
lang=
"ts"
setup
>
import
{
HorizontalNav
}
from
'@layouts/components'
import
type
{
HorizontalNavItems
}
from
'@layouts/types'
import
type
{
HorizontalNavItems
}
from
'@layouts/types'
;
// ℹ️ Using import from `@layouts` causing build to hangup
// import { useLayouts } from '@layouts'
import
{
useLayoutConfigStore
}
from
'@layouts/stores/config'
import
{
useLayoutConfigStore
}
from
'@layouts/stores/config'
;
defineProps
<
{
navItems
:
HorizontalNavItems
...
...
@@ -35,11 +34,11 @@ const configStore = useLayoutConfigStore()
</div>
</div>
<!-- 👉 Navigation -->
<div
class=
"layout-horizontal-nav"
>
<
!--
<
div
class=
"layout-horizontal-nav"
>
<div
class=
"horizontal-nav-content-container"
>
<HorizontalNav
:nav-items=
"navItems"
/>
</div>
</div>
</div>
-->
</div>
<main
class=
"layout-page-content"
>
...
...
This diff is collapsed.
Click to expand it.
@layouts/components/VerticalNav.vue
View file @
584c582
<
script
lang=
"ts"
setup
>
import
type
{
Component
}
from
'vue'
import
{
PerfectScrollbar
}
from
'vue3-perfect-scrollbar'
import
{
VNodeRenderer
}
from
'./VNodeRenderer'
import
{
layoutConfig
}
from
'@layouts'
import
{
VerticalNavGroup
,
VerticalNavLink
,
VerticalNavSectionTitle
}
from
'@layouts/components'
import
{
useLayoutConfigStore
}
from
'@layouts/stores/config'
import
{
injectionKeyIsVerticalNavHovered
}
from
'@layouts/symbols'
import
type
{
NavGroup
,
NavLink
,
NavSectionTitle
,
VerticalNavItems
}
from
'@layouts/types'
import
type
{
Component
}
from
'vue'
interface
Props
{
tag
?:
string
|
Component
...
...
@@ -77,14 +75,16 @@ const hideTitleAndIcon = configStore.isVerticalNavMini(isHovered)
to=
"/"
class=
"app-logo app-title-wrapper"
>
<VNodeRenderer
:nodes=
"layoutConfig.app.logo"
/>
<img
src=
"@/assets/images/naput/logo-UI.png"
alt=
"Logo UI"
width=
"35"
height=
"auto"
/>
<!--
<VNodeRenderer
:nodes=
"layoutConfig.app.logo"
/>
-->
<Transition
name=
"vertical-nav-app-title"
>
<h1
v-show=
"!hideTitleAndIcon"
class=
"app-logo-title leading-normal"
>
{{
layoutConfig
.
app
.
title
}}
CIVITAS UI
</h1>
</Transition>
</NuxtLink>
...
...
@@ -123,7 +123,7 @@ const hideTitleAndIcon = configStore.isVerticalNavMini(isHovered)
name=
"nav-items"
:update-is-vertical-nav-scrolled=
"updateIsVerticalNavScrolled"
>
<PerfectScrollbar
<
!--
<
PerfectScrollbar
:key=
"configStore.isAppRTL"
tag=
"ul"
class=
"nav-items"
...
...
@@ -136,7 +136,7 @@ const hideTitleAndIcon = configStore.isVerticalNavMini(isHovered)
:key=
"index"
:item=
"item"
/>
</PerfectScrollbar>
</PerfectScrollbar>
-->
</slot>
<slot
name=
"after-nav-items"
/>
...
...
This diff is collapsed.
Click to expand it.
components/beranda/UserLib.vue
0 → 100644
View file @
584c582
<
script
setup
lang=
"ts"
>
import
{
useKeycloakStore
}
from
"@/@core/stores/keycloakStore"
;
import
{
ref
}
from
"vue"
;
// Store Keycloak
const
keycloakStore
=
useKeycloakStore
();
// Data dan state
const
items
=
ref
<
any
[]
>
([]);
const
loading
=
ref
(
false
);
const
searchQuery
=
ref
(
""
);
const
logHeaders
=
[
{
title
:
"KOLEKSI"
,
key
:
"koleksi"
},
{
title
:
"TANGGAL PEMINJAMAN"
,
key
:
"tglpinjam"
},
{
title
:
"TANGGAL PENGEMBALIAN"
,
key
:
"tglkembali"
},
{
title
:
"DIPINJAM"
,
key
:
"dipinjam"
},
{
title
:
"PERPANJANGAN"
,
key
:
"perpanjangan"
},
{
title
:
"DENDA"
,
key
:
"denda"
},
{
title
:
"DENDA TOTAL"
,
key
:
"dendatotoal"
},
];
async
function
getData
()
{
loading
.
value
=
true
;
items
.
value
=
[];
try
{
const
apiEndpoint
=
"https://api.ui.ac.id/my/lib"
;
const
response
=
await
fetch
(
apiEndpoint
,
{
headers
:
{
Authorization
:
`Bearer
${
keycloakStore
.
accessToken
}
`
,
},
});
if
(
!
response
.
ok
)
throw
new
Error
(
"Gagal mengambil data"
);
const
dataku
=
await
response
.
json
();
// Tambahkan properti tanggal, namaHari, mulai aktual, dan selesai aktual ke setiap item
items
.
value
=
dataku
.
map
((
item
:
any
)
=>
{
return
{
...
item
,
};
});
}
catch
(
err
)
{
console
.
error
(
"Gagal mengambil data:"
,
err
);
}
finally
{
loading
.
value
=
false
;
}
}
const
filteredItems
=
computed
(()
=>
{
if
(
!
searchQuery
.
value
)
return
items
.
value
;
const
query
=
searchQuery
.
value
.
toLowerCase
();
return
items
.
value
.
filter
((
item
)
=>
logHeaders
.
some
(
(
header
)
=>
item
[
header
.
key
]
&&
String
(
item
[
header
.
key
]).
toLowerCase
().
includes
(
query
)
)
);
});
</
script
>
<
template
>
<VCard
title=
"Status Peminjaman Buku"
class=
"recentnamaHariCard"
>
<div
class=
"search-container mb-4 pl-2 pr-2"
>
<VTextField
v-model=
"searchQuery"
label=
"Search"
placeholder=
"Search ..."
append-inner-icon=
"ri-search-line"
clearable
single-line
hide-details
dense
outlined
/>
</div>
<VDataTable
:headers=
"logHeaders"
:items=
"filteredItems"
hide-default-footer
fixed-header
item-value=
"tglpinjam"
:sort-by=
"['tglpinjam']"
:sort-asc=
"[true]"
></VDataTable>
</VCard>
</
template
>
This diff is collapsed.
Click to expand it.
components/beranda/UserLog.vue
View file @
584c582
...
...
@@ -95,6 +95,17 @@ watchEffect(async () => {
await
getData
();
});
const
filteredItems
=
computed
(()
=>
{
if
(
!
searchQuery
.
value
)
return
items
.
value
;
const
query
=
searchQuery
.
value
.
toLowerCase
();
return
items
.
value
.
filter
((
item
)
=>
logHeaders
.
some
(
(
header
)
=>
item
[
header
.
key
]
&&
String
(
item
[
header
.
key
]).
toLowerCase
().
includes
(
query
)
)
);
});
</
script
>
...
...
@@ -115,7 +126,7 @@ watchEffect(async () => {
</div>
<VDataTable
:headers=
"logHeaders"
:items=
"
i
tems"
:items=
"
filteredI
tems"
hide-default-footer
fixed-header
item-value=
"tanggal"
...
...
This diff is collapsed.
Click to expand it.
layouts/components/DefaultLayoutWithHorizontalNav.vue
View file @
584c582
...
...
@@ -12,7 +12,6 @@ import NavbarThemeSwitcher from '@/layouts/components/NavbarThemeSwitcher.vue'
import
UserProfile
from
'@/layouts/components/UserProfile.vue'
import
NavBarI18n
from
'@core/components/I18n.vue'
import
{
HorizontalNavLayout
}
from
'@layouts'
import
{
VNodeRenderer
}
from
'@layouts/components/VNodeRenderer'
</
script
>
<
template
>
...
...
@@ -23,11 +22,12 @@ import { VNodeRenderer } from '@layouts/components/VNodeRenderer'
to=
"/"
class=
"d-flex align-start gap-x-4"
>
<VNodeRenderer
:nodes=
"themeConfig.app.logo"
/>
<!--
<VNodeRenderer
:nodes=
"themeConfig.app.logo"
/>
-->
<div
style=
"display: inline-flex; align-items: center; gap: 8px;"
>
<img
src=
"@/assets/images/naput/logo-UI.png"
alt=
"Logo UI"
width=
"35"
height=
"auto"
/>
<h1
style=
"font-size: 1.25rem; text-transform: uppercase; margin-left: 10px;"
>
CIVITAS UI
</h1>
</div>
<h1
class=
"leading-normal text-xl text-uppercase"
>
{{
themeConfig
.
app
.
title
}}
</h1>
</NuxtLink>
<VSpacer
/>
...
...
This diff is collapsed.
Click to expand it.
pages/naputpro/beranda/[tab].vue
View file @
584c582
<
script
setup
lang=
"ts"
>
import
{
useKeycloakStore
}
from
'@/@core/stores/keycloakStore'
import
UserBerita
from
'@/components/beranda/UserBerita.vue'
import
UserLib
from
'@/components/beranda/UserLib.vue'
import
UserLog
from
'@/components/beranda/UserLog.vue'
import
UserRiwayat
from
'@/components/beranda/UserRiwayat.vue'
import
{
computed
}
from
'vue'
...
...
@@ -37,6 +38,8 @@ const tabs = [
{
title
:
'Riwayat'
,
icon
:
'ri-file-history-line'
,
tab
:
'riwayat'
},
{
title
:
'Log Absen'
,
icon
:
'ri-history-line'
,
tab
:
'log'
},
{
title
:
'Peta'
,
icon
:
'ri-history-line'
,
tab
:
'peta'
},
{
title
:
'Peminjaman Buku'
,
icon
:
'ri-book-line'
,
tab
:
'lib'
},
]
...
...
@@ -111,6 +114,10 @@ const navigateTab = (tab: string) => {
<VWindowItem
value=
"peta"
>
<UserPeta
/>
</VWindowItem>
<VWindowItem
value=
"lib"
>
<UserLib
/>
</VWindowItem>
</vwindow>
</div>
</
template
>
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
Attach a file
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 post a comment