@finema/finework-layer 0.2.41 → 0.2.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/app/app.config.ts +1 -1
- package/app/components/InfoItemList.vue +2 -13
- package/app/components/Layout/Admin/index.vue +38 -121
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.2.43](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.42...0.2.43) (2025-10-31)
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* change for date_time ([1b2d5fc](https://gitlab.finema.co/finema/finework/finework-frontend-layer/commit/1b2d5fc3130904684fd209e7242399bef423ef67))
|
|
8
|
+
* info display date and date_time ([33fad4f](https://gitlab.finema.co/finema/finework/finework-frontend-layer/commit/33fad4f2f032d5ad7e80ddd7032b8c27d13c0e2c))
|
|
9
|
+
|
|
10
|
+
## [0.2.42](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.41...0.2.42) (2025-10-31)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* layout ([120936a](https://gitlab.finema.co/finema/finework/finework-frontend-layer/commit/120936a020d8a86a8a912c62734ee754e699f380))
|
|
15
|
+
|
|
3
16
|
## [0.2.41](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.40...0.2.41) (2025-10-31)
|
|
4
17
|
|
|
5
18
|
### Bug Fixes
|
package/app/app.config.ts
CHANGED
|
@@ -154,24 +154,13 @@ const toggleExpanded = (label: string): void => {
|
|
|
154
154
|
const getValue = (item: any): string => {
|
|
155
155
|
if (item.type === TYPE_INFO_ITEM.DATE) {
|
|
156
156
|
return item.value
|
|
157
|
-
?
|
|
158
|
-
year: 'numeric',
|
|
159
|
-
month: 'long',
|
|
160
|
-
day: 'numeric',
|
|
161
|
-
})
|
|
157
|
+
? TimeHelper.displayDate(item.value) ?? '-'
|
|
162
158
|
: '-'
|
|
163
159
|
}
|
|
164
160
|
|
|
165
161
|
if (item.type === TYPE_INFO_ITEM.DATE_TIME) {
|
|
166
162
|
return item.value
|
|
167
|
-
?
|
|
168
|
-
year: 'numeric',
|
|
169
|
-
month: 'long',
|
|
170
|
-
day: 'numeric',
|
|
171
|
-
hour: '2-digit',
|
|
172
|
-
minute: '2-digit',
|
|
173
|
-
hour12: false,
|
|
174
|
-
})
|
|
163
|
+
? TimeHelper.displayDateTime(item.value) ?? '-'
|
|
175
164
|
: '-'
|
|
176
165
|
}
|
|
177
166
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="relative flex min-h-screen flex-1
|
|
2
|
+
<div class="relative flex min-h-screen flex-1">
|
|
3
3
|
<div
|
|
4
4
|
:class="[
|
|
5
5
|
`
|
|
@@ -113,96 +113,49 @@
|
|
|
113
113
|
</DropdownMenu>
|
|
114
114
|
</div>
|
|
115
115
|
</nav>
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
116
|
+
<div class="w-full bg-gray-50 pt-[64px] lg:pt-[72px]">
|
|
117
|
+
<main
|
|
118
|
+
:class="[
|
|
119
|
+
'mx-auto min-h-full flex-1 px-6 py-10 lg:px-8',
|
|
120
|
+
fullScreen ? 'w-full 2xl:max-w-[90%]' : 'max-w-7xl 2xl:max-w-[70%]',
|
|
121
|
+
]"
|
|
121
122
|
>
|
|
122
|
-
<
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
:items="breadcrumbsItems"
|
|
133
|
-
class="mb-6"
|
|
134
|
-
:ui="{
|
|
135
|
-
item: 'max-w-2/3',
|
|
136
|
-
list: 'w-full',
|
|
137
|
-
}"
|
|
138
|
-
/>
|
|
139
|
-
<div
|
|
140
|
-
v-if="app.pageMeta.title"
|
|
141
|
-
class="mb-4 flex flex-col justify-between gap-1 md:mb-6 md:gap-4 lg:flex-row lg:items-start"
|
|
142
|
-
>
|
|
143
|
-
<div class="flex flex-1 flex-col">
|
|
144
|
-
<h1
|
|
145
|
-
class="text-3xl font-bold wrap-break-word lg:max-w-2/3"
|
|
146
|
-
:title="app.pageMeta.title"
|
|
147
|
-
>
|
|
148
|
-
{{ app.pageMeta.title }}
|
|
149
|
-
<span id="page-title-extra" />
|
|
150
|
-
</h1>
|
|
151
|
-
|
|
152
|
-
<div id="page-subtitle" />
|
|
153
|
-
<p
|
|
154
|
-
v-if="app.pageMeta.sub_title"
|
|
155
|
-
class="text-[#475467]"
|
|
156
|
-
>
|
|
157
|
-
{{ app.pageMeta.sub_title }}
|
|
158
|
-
</p>
|
|
159
|
-
</div>
|
|
160
|
-
<div id="page-header" />
|
|
161
|
-
</div>
|
|
162
|
-
<slot />
|
|
163
|
-
</main>
|
|
164
|
-
</div>
|
|
165
|
-
<DefineTemplate>
|
|
166
|
-
<Button
|
|
167
|
-
icon="i-heroicons-x-mark"
|
|
168
|
-
variant="ghost"
|
|
169
|
-
color="neutral"
|
|
170
|
-
class="mb-3 ml-auto flex p-0 md:mt-3"
|
|
171
|
-
@click="showFilter = false"
|
|
123
|
+
<Breadcrumb
|
|
124
|
+
v-if="
|
|
125
|
+
!app.pageMeta.isHideBreadcrumbs && breadcrumbsItems.length > 1
|
|
126
|
+
"
|
|
127
|
+
:items="breadcrumbsItems"
|
|
128
|
+
class="mb-6"
|
|
129
|
+
:ui="{
|
|
130
|
+
item: 'max-w-2/3',
|
|
131
|
+
list: 'w-full',
|
|
132
|
+
}"
|
|
172
133
|
/>
|
|
173
|
-
<div id="page-filters" />
|
|
174
|
-
</DefineTemplate>
|
|
175
|
-
<!-- แผง Filter (push ข้างๆ) Desktop -->
|
|
176
|
-
<div
|
|
177
|
-
v-if="!isMobile"
|
|
178
|
-
v-show="showFilter"
|
|
179
|
-
class="fixed top-0 right-0 hidden h-screen w-80 transform flex-col border-l border-gray-200 bg-white shadow-lg transition-transform duration-300 ease-in-out md:flex!"
|
|
180
|
-
:class="showFilter ? 'translate-x-0' : 'translate-x-full'"
|
|
181
|
-
>
|
|
182
|
-
<div class="flex-1 overflow-y-auto px-4 pt-[64px]! lg:pt-[72px]!">
|
|
183
|
-
<ReuseTemplate />
|
|
184
|
-
</div>
|
|
185
|
-
</div>
|
|
186
|
-
<!-- mobile -->
|
|
187
|
-
<Transition
|
|
188
|
-
v-else
|
|
189
|
-
name="slide-up"
|
|
190
|
-
>
|
|
191
134
|
<div
|
|
192
|
-
v-
|
|
193
|
-
class="
|
|
194
|
-
@click.self="showFilter = false"
|
|
135
|
+
v-if="app.pageMeta.title"
|
|
136
|
+
class="mb-4 flex flex-col justify-between gap-1 md:mb-6 md:gap-4 lg:flex-row lg:items-start"
|
|
195
137
|
>
|
|
196
|
-
<div
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
138
|
+
<div class="flex flex-1 flex-col">
|
|
139
|
+
<h1
|
|
140
|
+
class="text-3xl font-bold wrap-break-word lg:max-w-2/3"
|
|
141
|
+
:title="app.pageMeta.title"
|
|
142
|
+
>
|
|
143
|
+
{{ app.pageMeta.title }}
|
|
144
|
+
<span id="page-title-extra" />
|
|
145
|
+
</h1>
|
|
146
|
+
|
|
147
|
+
<div id="page-subtitle" />
|
|
148
|
+
<p
|
|
149
|
+
v-if="app.pageMeta.sub_title"
|
|
150
|
+
class="text-[#475467]"
|
|
151
|
+
>
|
|
152
|
+
{{ app.pageMeta.sub_title }}
|
|
153
|
+
</p>
|
|
203
154
|
</div>
|
|
155
|
+
<div id="page-header" />
|
|
204
156
|
</div>
|
|
205
|
-
|
|
157
|
+
<slot />
|
|
158
|
+
</main>
|
|
206
159
|
</div>
|
|
207
160
|
</div>
|
|
208
161
|
</div>
|
|
@@ -213,7 +166,6 @@ import type { DropdownMenuItem, NavigationMenuItem } from '@nuxt/ui'
|
|
|
213
166
|
import { computed } from 'vue'
|
|
214
167
|
import Sidebar from './Sidebar.vue'
|
|
215
168
|
import Apps from '../Apps.vue'
|
|
216
|
-
import { createReusableTemplate, useBreakpoints } from '@vueuse/core'
|
|
217
169
|
|
|
218
170
|
defineProps<{
|
|
219
171
|
label: string
|
|
@@ -222,18 +174,9 @@ defineProps<{
|
|
|
222
174
|
fullScreen?: boolean
|
|
223
175
|
}>()
|
|
224
176
|
|
|
225
|
-
const [DefineTemplate, ReuseTemplate] = createReusableTemplate()
|
|
226
177
|
const app = useApp()
|
|
227
178
|
const isShowSidebarMobile = ref(false)
|
|
228
|
-
const showFilter = useState('pageFilterOpen', () => false)
|
|
229
179
|
const auth = useAuth()
|
|
230
|
-
const route = useRoute()
|
|
231
|
-
const breakpoints = useBreakpoints({
|
|
232
|
-
mobile: 0,
|
|
233
|
-
desktop: 768,
|
|
234
|
-
})
|
|
235
|
-
|
|
236
|
-
const isMobile = breakpoints.smaller('desktop')
|
|
237
180
|
// Cookie to store user preference for desktop
|
|
238
181
|
const isCollapsed = useCookie<boolean>('app.admin.sidebar.isCollapsed', {
|
|
239
182
|
default: () => false,
|
|
@@ -273,30 +216,4 @@ const breadcrumbsItems = computed(() => {
|
|
|
273
216
|
|
|
274
217
|
return [home, ...extra]
|
|
275
218
|
})
|
|
276
|
-
|
|
277
|
-
watch(isMobile, (newVal, oldVal) => {
|
|
278
|
-
if (newVal !== oldVal) {
|
|
279
|
-
window.location.reload()
|
|
280
|
-
}
|
|
281
|
-
})
|
|
282
|
-
|
|
283
|
-
watch(
|
|
284
|
-
() => route.fullPath,
|
|
285
|
-
() => {
|
|
286
|
-
showFilter.value = false
|
|
287
|
-
isShowSidebarMobile.value = false
|
|
288
|
-
},
|
|
289
|
-
)
|
|
290
219
|
</script>
|
|
291
|
-
|
|
292
|
-
<style scoped>
|
|
293
|
-
.slide-enter-active,
|
|
294
|
-
.slide-leave-active {
|
|
295
|
-
transition: all 0.3s ease;
|
|
296
|
-
}
|
|
297
|
-
.slide-enter-from,
|
|
298
|
-
.slide-leave-to {
|
|
299
|
-
transform: translateX(100%);
|
|
300
|
-
opacity: 0;
|
|
301
|
-
}
|
|
302
|
-
</style>
|