@neutron.co.id/operasional-interfaces 1.17.5 → 1.17.9-beta.1
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/build/@office/config.mjs +3 -0
- package/build/@office/models/personalia/attendance/AttendanceDelegate.vue +12 -12
- package/build/@office/models/personalia/attendance/AttendanceManager.vue +11 -11
- package/build/@office/models/personalia/attendance/AttendanceSingle/AttendanceSingle.vue +3 -2
- package/build/@office/models/personalia/attendance/AttendanceStaff.vue +33 -33
- package/build/@office/models/personalia/attendance/AttendanceSupervisor.vue +25 -25
- package/build/@office/models/personalia/attendanceType/AttendanceTypeCollection/AttendanceTypeCollection.vue +23 -0
- package/build/@office/models/personalia/attendanceType/AttendanceTypeCollection/AttendanceTypeTypeCollection.stories.d.ts +7 -0
- package/build/@office/models/personalia/attendanceType/AttendanceTypeCollection/AttendanceTypeTypeCollection.stories.mjs +40 -0
- package/build/@office/models/personalia/attendanceType/AttendanceTypeCollection/index.d.ts +1 -0
- package/build/@office/models/personalia/attendanceType/AttendanceTypeCollection/index.mjs +1 -0
- package/build/@office/models/personalia/attendanceType/AttendanceTypeSingle/AttendanceTypeSingle.stories.d.ts +8 -0
- package/build/@office/models/personalia/attendanceType/AttendanceTypeSingle/AttendanceTypeSingle.stories.mjs +47 -0
- package/build/@office/models/personalia/attendanceType/AttendanceTypeSingle/AttendanceTypeSingle.vue +100 -0
- package/build/@office/models/personalia/attendanceType/AttendanceTypeSingle/index.d.ts +1 -0
- package/build/@office/models/personalia/attendanceType/AttendanceTypeSingle/index.mjs +1 -0
- package/build/@office/models/personalia/attendanceType/index.d.ts +2 -0
- package/build/@office/models/personalia/attendanceType/index.mjs +2 -0
- package/build/@office/models/personalia/index.d.ts +1 -0
- package/build/@office/models/personalia/index.mjs +1 -0
- package/build/@package/@office/models/personalia/attendanceType/AttendanceTypeCollection/AttendanceTypeCollection.vue.d.ts +2 -0
- package/build/@package/@office/models/personalia/attendanceType/AttendanceTypeCollection/index.d.ts +1 -0
- package/build/@package/@office/models/personalia/attendanceType/AttendanceTypeSingle/AttendanceTypeSingle.vue.d.ts +2 -0
- package/build/@package/@office/models/personalia/attendanceType/AttendanceTypeSingle/index.d.ts +1 -0
- package/build/@package/@office/models/personalia/attendanceType/index.d.ts +2 -0
- package/build/@package/@office/models/personalia/index.d.ts +1 -0
- package/build/mock/index.cjs +1254 -1093
- package/build/mock/index.mjs +1256 -1095
- package/build/mock/style.css +9 -5
- package/build/module.json +1 -1
- package/build/nuxt.json +1 -1
- package/build/nuxt.mjs +3 -0
- package/package.json +6 -6
package/build/@office/config.mjs
CHANGED
|
@@ -13,6 +13,9 @@ export const config = OfficeInterfaces.define({
|
|
|
13
13
|
"AttendanceManager",
|
|
14
14
|
"AttendanceSupervisor",
|
|
15
15
|
"AttendanceDelegate",
|
|
16
|
+
// Attendance Type
|
|
17
|
+
"AttendanceTypeCollection",
|
|
18
|
+
"AttendanceTypeSingle",
|
|
16
19
|
// Check In
|
|
17
20
|
"CheckInCollection",
|
|
18
21
|
"CheckInSingle",
|
|
@@ -202,10 +202,10 @@ async function generate() {
|
|
|
202
202
|
>
|
|
203
203
|
<OfficeRelation
|
|
204
204
|
v-if="
|
|
205
|
-
values.type == 'leave' ||
|
|
206
|
-
values.type == 'dayOff' ||
|
|
207
|
-
values.type == 'sick' ||
|
|
208
|
-
values.type == 'permission'
|
|
205
|
+
values.type?.code == 'leave' ||
|
|
206
|
+
values.type?.code == 'dayOff' ||
|
|
207
|
+
values.type?.code == 'sick' ||
|
|
208
|
+
values.type?.code == 'permission'
|
|
209
209
|
"
|
|
210
210
|
v-model="values"
|
|
211
211
|
:field="fields.delegateStaffs"
|
|
@@ -251,10 +251,10 @@ async function generate() {
|
|
|
251
251
|
/>
|
|
252
252
|
<!-- <OfficeRelation
|
|
253
253
|
v-if="
|
|
254
|
-
values.type == 'leave' ||
|
|
255
|
-
values.type == 'sick' ||
|
|
256
|
-
values.type == 'dayOff' ||
|
|
257
|
-
values.type == 'permission'
|
|
254
|
+
values.type?.code == 'leave' ||
|
|
255
|
+
values.type?.code == 'sick' ||
|
|
256
|
+
values.type?.code == 'dayOff' ||
|
|
257
|
+
values.type?.code == 'permission'
|
|
258
258
|
"
|
|
259
259
|
v-model="values"
|
|
260
260
|
:field="fields.monitoringStaffs"
|
|
@@ -264,10 +264,10 @@ async function generate() {
|
|
|
264
264
|
/> -->
|
|
265
265
|
<NeonField
|
|
266
266
|
v-if="
|
|
267
|
-
values.type == 'leave' ||
|
|
268
|
-
values.type == 'dayOff' ||
|
|
269
|
-
values.type == 'sick' ||
|
|
270
|
-
values.type == 'permission'
|
|
267
|
+
values.type?.code == 'leave' ||
|
|
268
|
+
values.type?.code == 'dayOff' ||
|
|
269
|
+
values.type?.code == 'sick' ||
|
|
270
|
+
values.type?.code == 'permission'
|
|
271
271
|
"
|
|
272
272
|
v-model="values.delegateNotes"
|
|
273
273
|
v-bind="fields.delegateNotes"
|
|
@@ -180,9 +180,9 @@ const rejectedAbsensi = async () => {
|
|
|
180
180
|
@update:model-value="onStartedAtUpdate"
|
|
181
181
|
/>
|
|
182
182
|
|
|
183
|
-
<
|
|
184
|
-
v-model="values
|
|
185
|
-
|
|
183
|
+
<OfficeRelation
|
|
184
|
+
v-model="values"
|
|
185
|
+
:field="fields.type"
|
|
186
186
|
:is-disabled="
|
|
187
187
|
values.status == 'approved' || values.status == 'rejected'
|
|
188
188
|
"
|
|
@@ -197,7 +197,7 @@ const rejectedAbsensi = async () => {
|
|
|
197
197
|
/>
|
|
198
198
|
|
|
199
199
|
<OfficeRelation
|
|
200
|
-
v-if="values.type
|
|
200
|
+
v-if="values.type?.code === 'leave'"
|
|
201
201
|
v-model="values"
|
|
202
202
|
:field="fields.delegateStaffs"
|
|
203
203
|
:is-disabled="
|
|
@@ -215,10 +215,10 @@ const rejectedAbsensi = async () => {
|
|
|
215
215
|
|
|
216
216
|
<NeonField
|
|
217
217
|
v-if="
|
|
218
|
-
values.type
|
|
219
|
-
values.type
|
|
220
|
-
values.type
|
|
221
|
-
values.type
|
|
218
|
+
values.type?.code === 'dayOff' ||
|
|
219
|
+
values.type?.code === 'sick' ||
|
|
220
|
+
values.type?.code === 'permission' ||
|
|
221
|
+
values.type?.code === 'leave'
|
|
222
222
|
"
|
|
223
223
|
v-model="values.submittedAt"
|
|
224
224
|
v-bind="fields.submittedAt"
|
|
@@ -227,7 +227,7 @@ const rejectedAbsensi = async () => {
|
|
|
227
227
|
|
|
228
228
|
<!-- EARLY GO HOME -->
|
|
229
229
|
<div
|
|
230
|
-
v-if="values.type == 'homeEarly'"
|
|
230
|
+
v-if="values.type?.code == 'homeEarly'"
|
|
231
231
|
class="grid gap-2 sm:grid-cols-2"
|
|
232
232
|
>
|
|
233
233
|
<NeonField
|
|
@@ -275,7 +275,7 @@ const rejectedAbsensi = async () => {
|
|
|
275
275
|
|
|
276
276
|
<!-- COME TOO LATE -->
|
|
277
277
|
<div
|
|
278
|
-
v-if="values.type == 'comeLate'"
|
|
278
|
+
v-if="values.type?.code == 'comeLate'"
|
|
279
279
|
class="grid gap-2 sm:grid-cols-2"
|
|
280
280
|
>
|
|
281
281
|
<NeonField
|
|
@@ -323,7 +323,7 @@ const rejectedAbsensi = async () => {
|
|
|
323
323
|
|
|
324
324
|
<!-- TIMEOUT -->
|
|
325
325
|
<div
|
|
326
|
-
v-if="values.type == 'timeout'"
|
|
326
|
+
v-if="values.type?.code == 'timeout'"
|
|
327
327
|
class="grid gap-2 sm:grid-cols-2"
|
|
328
328
|
>
|
|
329
329
|
<NeonField
|
|
@@ -10,6 +10,7 @@ import type {
|
|
|
10
10
|
} from '@neutron.co.id/personalia-models'
|
|
11
11
|
import { NeonTime } from '../../../../common'
|
|
12
12
|
import { DateUtil } from '../../../../common/utils/util.date'
|
|
13
|
+
import { Query } from '@neon.id/query'
|
|
13
14
|
|
|
14
15
|
const {
|
|
15
16
|
fields,
|
|
@@ -90,12 +91,12 @@ function onStartedAtUpdate(date: any) {
|
|
|
90
91
|
@update:model-value="onStartedAtUpdate"
|
|
91
92
|
/>
|
|
92
93
|
|
|
93
|
-
<
|
|
94
|
+
<OfficeRelation v-model="values" :field="fields.type" />
|
|
94
95
|
|
|
95
96
|
<OfficeRelation v-model="values" :field="fields.decideStaff" />
|
|
96
97
|
|
|
97
98
|
<OfficeRelation
|
|
98
|
-
v-if="values.type == 'leave'"
|
|
99
|
+
v-if="values.type?.code == 'leave'"
|
|
99
100
|
v-model="values"
|
|
100
101
|
:field="fields.delegateStaffs"
|
|
101
102
|
/>
|
|
@@ -276,9 +276,9 @@ const copy = ref({
|
|
|
276
276
|
@update:model-value="onStartedAtUpdate"
|
|
277
277
|
/>
|
|
278
278
|
|
|
279
|
-
<
|
|
280
|
-
v-model="values
|
|
281
|
-
|
|
279
|
+
<OfficeRelation
|
|
280
|
+
v-model="values"
|
|
281
|
+
:field="fields.type"
|
|
282
282
|
:is-disabled="
|
|
283
283
|
values.status == 'notApproved' ||
|
|
284
284
|
values.status == 'approved' ||
|
|
@@ -301,10 +301,10 @@ const copy = ref({
|
|
|
301
301
|
<NeonFields class="flex-1"> -->
|
|
302
302
|
<OfficeRelation
|
|
303
303
|
v-if="
|
|
304
|
-
values.type == 'leave' ||
|
|
305
|
-
values.type == 'dayOff' ||
|
|
306
|
-
values.type == 'sick' ||
|
|
307
|
-
values.type == 'permission'
|
|
304
|
+
values.type?.code == 'leave' ||
|
|
305
|
+
values.type?.code == 'dayOff' ||
|
|
306
|
+
values.type?.code == 'sick' ||
|
|
307
|
+
values.type?.code == 'permission'
|
|
308
308
|
"
|
|
309
309
|
v-model="values"
|
|
310
310
|
:field="fields.delegateStaffs"
|
|
@@ -319,10 +319,10 @@ const copy = ref({
|
|
|
319
319
|
<!-- <div class="ml-2 flex items-end pb-1">
|
|
320
320
|
<NeonCopy
|
|
321
321
|
v-if="
|
|
322
|
-
values.type == 'leave' ||
|
|
323
|
-
values.type == 'dayOff' ||
|
|
324
|
-
values.type == 'sick' ||
|
|
325
|
-
values.type == 'permission' ||
|
|
322
|
+
values.type?.code == 'leave' ||
|
|
323
|
+
values.type?.code == 'dayOff' ||
|
|
324
|
+
values.type?.code == 'sick' ||
|
|
325
|
+
values.type?.code == 'permission' ||
|
|
326
326
|
values.isNotes == true
|
|
327
327
|
"
|
|
328
328
|
:size="'sm'"
|
|
@@ -332,10 +332,10 @@ const copy = ref({
|
|
|
332
332
|
</div> -->
|
|
333
333
|
<!-- <NeonField
|
|
334
334
|
v-if="
|
|
335
|
-
values.type == 'leave' ||
|
|
336
|
-
values.type == 'dayOff' ||
|
|
337
|
-
values.type == 'sick' ||
|
|
338
|
-
values.type == 'permission'
|
|
335
|
+
values.type?.code == 'leave' ||
|
|
336
|
+
values.type?.code == 'dayOff' ||
|
|
337
|
+
values.type?.code == 'sick' ||
|
|
338
|
+
values.type?.code == 'permission'
|
|
339
339
|
"
|
|
340
340
|
v-model="values.isNotes"
|
|
341
341
|
v-bind="fields.isNotes"
|
|
@@ -348,10 +348,10 @@ const copy = ref({
|
|
|
348
348
|
<!-- <template #input>
|
|
349
349
|
<NeonCheck
|
|
350
350
|
v-if="
|
|
351
|
-
values.type == 'leave' ||
|
|
352
|
-
values.type == 'dayOff' ||
|
|
353
|
-
values.type == 'sick' ||
|
|
354
|
-
values.type == 'permission'
|
|
351
|
+
values.type?.code == 'leave' ||
|
|
352
|
+
values.type?.code == 'dayOff' ||
|
|
353
|
+
values.type?.code == 'sick' ||
|
|
354
|
+
values.type?.code == 'permission'
|
|
355
355
|
"
|
|
356
356
|
v-model="values.isNotes"
|
|
357
357
|
label="Catatan"
|
|
@@ -368,10 +368,10 @@ const copy = ref({
|
|
|
368
368
|
/>
|
|
369
369
|
<NeonField
|
|
370
370
|
v-if="
|
|
371
|
-
values.type == 'leave' ||
|
|
372
|
-
values.type == 'dayOff' ||
|
|
373
|
-
values.type == 'sick' ||
|
|
374
|
-
values.type == 'permission'
|
|
371
|
+
values.type?.code == 'leave' ||
|
|
372
|
+
values.type?.code == 'dayOff' ||
|
|
373
|
+
values.type?.code == 'sick' ||
|
|
374
|
+
values.type?.code == 'permission'
|
|
375
375
|
"
|
|
376
376
|
v-model="values.delegateNotes"
|
|
377
377
|
v-bind="fields.delegateNotes"
|
|
@@ -381,10 +381,10 @@ const copy = ref({
|
|
|
381
381
|
|
|
382
382
|
<NeonField
|
|
383
383
|
v-if="
|
|
384
|
-
values.type == 'dayOff' ||
|
|
385
|
-
values.type == 'sick' ||
|
|
386
|
-
values.type == 'permission' ||
|
|
387
|
-
values.type == 'leave'
|
|
384
|
+
values.type?.code == 'dayOff' ||
|
|
385
|
+
values.type?.code == 'sick' ||
|
|
386
|
+
values.type?.code == 'permission' ||
|
|
387
|
+
values.type?.code == 'leave'
|
|
388
388
|
"
|
|
389
389
|
v-model="values.submittedAt"
|
|
390
390
|
v-bind="fields.submittedAt"
|
|
@@ -392,9 +392,9 @@ const copy = ref({
|
|
|
392
392
|
/>
|
|
393
393
|
<div
|
|
394
394
|
v-if="
|
|
395
|
-
values.type == 'sick' ||
|
|
396
|
-
values.type == 'leave' ||
|
|
397
|
-
values.type == 'permission'
|
|
395
|
+
values.type?.code == 'sick' ||
|
|
396
|
+
values.type?.code == 'leave' ||
|
|
397
|
+
values.type?.code == 'permission'
|
|
398
398
|
"
|
|
399
399
|
>
|
|
400
400
|
<NeonDivider
|
|
@@ -435,7 +435,7 @@ const copy = ref({
|
|
|
435
435
|
|
|
436
436
|
<!-- EARLY GO HOME -->
|
|
437
437
|
<div
|
|
438
|
-
v-if="values.type == 'homeEarly'"
|
|
438
|
+
v-if="values.type?.code == 'homeEarly'"
|
|
439
439
|
class="grid gap-2 sm:grid-cols-2"
|
|
440
440
|
>
|
|
441
441
|
<NeonField
|
|
@@ -493,7 +493,7 @@ const copy = ref({
|
|
|
493
493
|
|
|
494
494
|
<!-- COME TOO LATE -->
|
|
495
495
|
<div
|
|
496
|
-
v-if="values.type == 'comeLate'"
|
|
496
|
+
v-if="values.type?.code == 'comeLate'"
|
|
497
497
|
class="grid gap-2 sm:grid-cols-2"
|
|
498
498
|
>
|
|
499
499
|
<NeonField
|
|
@@ -551,7 +551,7 @@ const copy = ref({
|
|
|
551
551
|
|
|
552
552
|
<!-- TIMEOUT -->
|
|
553
553
|
<div
|
|
554
|
-
v-if="values.type == 'timeout'"
|
|
554
|
+
v-if="values.type?.code == 'timeout'"
|
|
555
555
|
class="grid gap-2 sm:grid-cols-2"
|
|
556
556
|
>
|
|
557
557
|
<NeonField
|
|
@@ -252,9 +252,9 @@ async function generate() {
|
|
|
252
252
|
@update:model-value="onStartedAtUpdate"
|
|
253
253
|
/>
|
|
254
254
|
|
|
255
|
-
<
|
|
256
|
-
v-model="values
|
|
257
|
-
|
|
255
|
+
<OfficeRelation
|
|
256
|
+
v-model="values"
|
|
257
|
+
:field="fields.type"
|
|
258
258
|
:is-disabled="
|
|
259
259
|
values.status == 'approved' || values.status == 'rejected'
|
|
260
260
|
"
|
|
@@ -269,10 +269,10 @@ async function generate() {
|
|
|
269
269
|
/>
|
|
270
270
|
<OfficeRelation
|
|
271
271
|
v-if="
|
|
272
|
-
values.type == 'leave' ||
|
|
273
|
-
values.type == 'dayOff' ||
|
|
274
|
-
values.type == 'sick' ||
|
|
275
|
-
values.type == 'permission'
|
|
272
|
+
values.type?.code == 'leave' ||
|
|
273
|
+
values.type?.code == 'dayOff' ||
|
|
274
|
+
values.type?.code == 'sick' ||
|
|
275
|
+
values.type?.code == 'permission'
|
|
276
276
|
"
|
|
277
277
|
v-model="values"
|
|
278
278
|
:field="fields.delegateStaffs"
|
|
@@ -282,10 +282,10 @@ async function generate() {
|
|
|
282
282
|
/>
|
|
283
283
|
<!-- <NeonField
|
|
284
284
|
v-if="
|
|
285
|
-
values.type == 'leave' ||
|
|
286
|
-
values.type == 'dayOff' ||
|
|
287
|
-
values.type == 'sick' ||
|
|
288
|
-
values.type == 'permission'
|
|
285
|
+
values.type?.code == 'leave' ||
|
|
286
|
+
values.type?.code == 'dayOff' ||
|
|
287
|
+
values.type?.code == 'sick' ||
|
|
288
|
+
values.type?.code == 'permission'
|
|
289
289
|
"
|
|
290
290
|
v-model="values.isNotes"
|
|
291
291
|
v-bind="fields.isNotes"
|
|
@@ -313,10 +313,10 @@ async function generate() {
|
|
|
313
313
|
/>
|
|
314
314
|
<NeonField
|
|
315
315
|
v-if="
|
|
316
|
-
values.type == 'leave' ||
|
|
317
|
-
values.type == 'dayOff' ||
|
|
318
|
-
values.type == 'sick' ||
|
|
319
|
-
values.type == 'permission'
|
|
316
|
+
values.type?.code == 'leave' ||
|
|
317
|
+
values.type?.code == 'dayOff' ||
|
|
318
|
+
values.type?.code == 'sick' ||
|
|
319
|
+
values.type?.code == 'permission'
|
|
320
320
|
"
|
|
321
321
|
v-model="values.delegateNotes"
|
|
322
322
|
v-bind="fields.delegateNotes"
|
|
@@ -326,10 +326,10 @@ async function generate() {
|
|
|
326
326
|
|
|
327
327
|
<NeonField
|
|
328
328
|
v-if="
|
|
329
|
-
values.type == 'dayOff' ||
|
|
330
|
-
values.type == 'sick' ||
|
|
331
|
-
values.type == 'permission' ||
|
|
332
|
-
values.type == 'leave'
|
|
329
|
+
values.type?.code == 'dayOff' ||
|
|
330
|
+
values.type?.code == 'sick' ||
|
|
331
|
+
values.type?.code == 'permission' ||
|
|
332
|
+
values.type?.code == 'leave'
|
|
333
333
|
"
|
|
334
334
|
v-model="values.submittedAt"
|
|
335
335
|
v-bind="fields.submittedAt"
|
|
@@ -338,9 +338,9 @@ async function generate() {
|
|
|
338
338
|
|
|
339
339
|
<div
|
|
340
340
|
v-if="
|
|
341
|
-
values.type == 'sick' ||
|
|
342
|
-
values.type == 'leave' ||
|
|
343
|
-
values.type == 'permission'
|
|
341
|
+
values.type?.code == 'sick' ||
|
|
342
|
+
values.type?.code == 'leave' ||
|
|
343
|
+
values.type?.code == 'permission'
|
|
344
344
|
"
|
|
345
345
|
>
|
|
346
346
|
<NeonDivider
|
|
@@ -381,7 +381,7 @@ async function generate() {
|
|
|
381
381
|
|
|
382
382
|
<!-- EARLY GO HOME -->
|
|
383
383
|
<div
|
|
384
|
-
v-if="values.type == 'homeEarly'"
|
|
384
|
+
v-if="values.type?.code == 'homeEarly'"
|
|
385
385
|
class="grid gap-2 sm:grid-cols-2"
|
|
386
386
|
>
|
|
387
387
|
<NeonField
|
|
@@ -429,7 +429,7 @@ async function generate() {
|
|
|
429
429
|
|
|
430
430
|
<!-- COME TOO LATE -->
|
|
431
431
|
<div
|
|
432
|
-
v-if="values.type == 'comeLate'"
|
|
432
|
+
v-if="values.type?.code == 'comeLate'"
|
|
433
433
|
class="grid gap-2 sm:grid-cols-2"
|
|
434
434
|
>
|
|
435
435
|
<NeonField
|
|
@@ -477,7 +477,7 @@ async function generate() {
|
|
|
477
477
|
|
|
478
478
|
<!-- TIMEOUT -->
|
|
479
479
|
<div
|
|
480
|
-
v-if="values.type == 'timeout'"
|
|
480
|
+
v-if="values.type?.code == 'timeout'"
|
|
481
481
|
class="grid gap-2 sm:grid-cols-2"
|
|
482
482
|
>
|
|
483
483
|
<NeonField
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { NeonCollection, useCollection } from '@neon.id/context'
|
|
3
|
+
import { OfficeCollectionTable } from '@neon.id/office'
|
|
4
|
+
import type {
|
|
5
|
+
Schema,
|
|
6
|
+
TPersonaliaAttendanceTypeModel,
|
|
7
|
+
} from '@neutron.co.id/personalia-models'
|
|
8
|
+
|
|
9
|
+
defineOptions({ name: 'AttendanceTypeCollection' })
|
|
10
|
+
|
|
11
|
+
const { resource, display, items, userQuery } = useCollection<
|
|
12
|
+
Schema.AttendanceType,
|
|
13
|
+
TPersonaliaAttendanceTypeModel
|
|
14
|
+
>()
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<NeonCollection class="neu-attendance-type-collection">
|
|
19
|
+
<OfficeCollectionTable />
|
|
20
|
+
</NeonCollection>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<style scoped></style>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta } from '@storybook/vue3';
|
|
2
|
+
import AttendanceTypeCollection from './AttendanceTypeCollection.vue';
|
|
3
|
+
declare const _default: Meta<typeof AttendanceTypeCollection>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Main: import("@storybook/csf").StoryAnnotations<import("@storybook/vue3").VueRenderer, {}, {}>;
|
|
6
|
+
export declare const InsideContent: import("@storybook/csf").StoryAnnotations<import("@storybook/vue3").VueRenderer, {}, {}>;
|
|
7
|
+
export declare const $DefaultView: any;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { decorateCollection, viewCollection, wrapCollection } from "@mock";
|
|
2
|
+
import { StoryUtil } from "@neon.id/story/helpers";
|
|
3
|
+
import { AttendanceTypeCollectionView } from "@neutron.co.id/operasional-modules";
|
|
4
|
+
import { AttendanceTypeModel } from "@neutron.co.id/personalia-models";
|
|
5
|
+
import { withOperasional } from "../../../../common/providers/index.mjs";
|
|
6
|
+
import AttendanceTypeCollection from "./AttendanceTypeCollection.vue";
|
|
7
|
+
export default {
|
|
8
|
+
title: "Office/AttendanceType/Collection",
|
|
9
|
+
tags: [],
|
|
10
|
+
component: AttendanceTypeCollection,
|
|
11
|
+
parameters: StoryUtil.parameters({
|
|
12
|
+
description: "`AttendanceTypeCollection`",
|
|
13
|
+
layout: "fullscreen",
|
|
14
|
+
controls: { exclude: ["colors"] },
|
|
15
|
+
backgrounds: { default: "light" }
|
|
16
|
+
})
|
|
17
|
+
};
|
|
18
|
+
export const Main = StoryUtil.story({
|
|
19
|
+
description: "Main.",
|
|
20
|
+
decorators: decorateCollection({
|
|
21
|
+
model: AttendanceTypeModel
|
|
22
|
+
})
|
|
23
|
+
});
|
|
24
|
+
export const InsideContent = StoryUtil.story({
|
|
25
|
+
description: "Inside content.",
|
|
26
|
+
render: wrapCollection(AttendanceTypeCollection),
|
|
27
|
+
decorators: decorateCollection({
|
|
28
|
+
model: AttendanceTypeModel
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
export const $DefaultView = viewCollection({
|
|
32
|
+
description: "Default view.",
|
|
33
|
+
component: AttendanceTypeCollectionView,
|
|
34
|
+
setup() {
|
|
35
|
+
withOperasional();
|
|
36
|
+
},
|
|
37
|
+
props: {
|
|
38
|
+
overrides: {}
|
|
39
|
+
}
|
|
40
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as AttendanceTypeCollection } from './AttendanceTypeCollection.vue';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as AttendanceTypeCollection } from "./AttendanceTypeCollection.vue";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Meta } from '@storybook/vue3';
|
|
2
|
+
import AttendanceTypeSingle from './AttendanceTypeSingle.vue';
|
|
3
|
+
declare const _default: Meta<typeof AttendanceTypeSingle>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const New: import("@storybook/csf").StoryAnnotations<import("@storybook/vue3").VueRenderer, {}, {}>;
|
|
6
|
+
export declare const Existing: import("@storybook/csf").StoryAnnotations<import("@storybook/vue3").VueRenderer, {}, {}>;
|
|
7
|
+
export declare const Content: import("@storybook/csf").StoryAnnotations<import("@storybook/vue3").VueRenderer, {}, {}>;
|
|
8
|
+
export declare const $DefaultView: any;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { StoryUtil } from "@neon.id/story/helpers";
|
|
2
|
+
import { AttendanceTypeModel } from "@neutron.co.id/personalia-models";
|
|
3
|
+
import { AttendanceTypeSingleView } from "@neutron.co.id/operasional-modules";
|
|
4
|
+
import AttendanceTypeSingle from "./AttendanceTypeSingle.vue";
|
|
5
|
+
import { decorateSingle, viewSingle, wrapSingle } from "@mock";
|
|
6
|
+
export default {
|
|
7
|
+
title: "Office/AttendanceType/Single",
|
|
8
|
+
tags: [],
|
|
9
|
+
component: AttendanceTypeSingle,
|
|
10
|
+
parameters: StoryUtil.parameters({
|
|
11
|
+
description: "`AttendanceTypeSingle`",
|
|
12
|
+
layout: "fullscreen",
|
|
13
|
+
controls: { exclude: ["colors"] },
|
|
14
|
+
backgrounds: { default: "light" }
|
|
15
|
+
})
|
|
16
|
+
};
|
|
17
|
+
export const New = StoryUtil.story({
|
|
18
|
+
description: "New.",
|
|
19
|
+
decorators: decorateSingle({
|
|
20
|
+
model: AttendanceTypeModel
|
|
21
|
+
})
|
|
22
|
+
});
|
|
23
|
+
export const Existing = StoryUtil.story({
|
|
24
|
+
description: "Existing.",
|
|
25
|
+
args: { id: "" },
|
|
26
|
+
decorators: decorateSingle({
|
|
27
|
+
model: AttendanceTypeModel
|
|
28
|
+
// id: '___',
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
export const Content = StoryUtil.story({
|
|
32
|
+
description: "Inside content.",
|
|
33
|
+
render: wrapSingle(AttendanceTypeSingle),
|
|
34
|
+
args: { id: "" },
|
|
35
|
+
decorators: decorateSingle({
|
|
36
|
+
model: AttendanceTypeModel
|
|
37
|
+
// id: '___',
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
export const $DefaultView = viewSingle({
|
|
41
|
+
description: "Default view.",
|
|
42
|
+
component: AttendanceTypeSingleView,
|
|
43
|
+
props: {
|
|
44
|
+
// id: '___',
|
|
45
|
+
overrides: {}
|
|
46
|
+
}
|
|
47
|
+
});
|
package/build/@office/models/personalia/attendanceType/AttendanceTypeSingle/AttendanceTypeSingle.vue
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { NeonSingle, useSingle } from '@neon.id/context'
|
|
3
|
+
import { NeonField, NeonForm, NeonCheck } from '@neon.id/form'
|
|
4
|
+
import { OfficeRelation, OfficeTab, OfficeTabs } from '@neon.id/office'
|
|
5
|
+
import { useToast } from '@neon.id/interfaces'
|
|
6
|
+
import type {
|
|
7
|
+
TPersonaliaAttendanceTypeModel,
|
|
8
|
+
Schema,
|
|
9
|
+
} from '@neutron.co.id/personalia-models'
|
|
10
|
+
|
|
11
|
+
const {
|
|
12
|
+
fields,
|
|
13
|
+
initialValues,
|
|
14
|
+
values,
|
|
15
|
+
isLoading,
|
|
16
|
+
isChanged,
|
|
17
|
+
isMain,
|
|
18
|
+
saveOne,
|
|
19
|
+
discardChanges,
|
|
20
|
+
} = useSingle<Schema.AttendanceType, TPersonaliaAttendanceTypeModel>()
|
|
21
|
+
|
|
22
|
+
const toast = useToast()
|
|
23
|
+
|
|
24
|
+
async function saveCheck() {
|
|
25
|
+
if (
|
|
26
|
+
initialValues.value.code === '' ||
|
|
27
|
+
values.value.code === '' ||
|
|
28
|
+
!values.value.code
|
|
29
|
+
) {
|
|
30
|
+
toast.push({
|
|
31
|
+
id: 'neu:attendance-type:code',
|
|
32
|
+
icon: 'warning',
|
|
33
|
+
content: 'Kode dari Tipe Absensi belum diisi!',
|
|
34
|
+
color: 'danger',
|
|
35
|
+
placement: 'bottom-right',
|
|
36
|
+
})
|
|
37
|
+
return
|
|
38
|
+
} else if (values.value.name !== '') {
|
|
39
|
+
await saveOne()
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<template>
|
|
45
|
+
<NeonSingle class="neu-attendance-type-single">
|
|
46
|
+
<OfficeTabs :use-url="isMain">
|
|
47
|
+
<OfficeTab handle="info" icon="circle-info" title="Info">
|
|
48
|
+
<NeonForm
|
|
49
|
+
handle="info"
|
|
50
|
+
:initial-values="initialValues"
|
|
51
|
+
:is-loading="isLoading"
|
|
52
|
+
:is-changed="isChanged"
|
|
53
|
+
use-unsaved
|
|
54
|
+
@cancel="discardChanges"
|
|
55
|
+
@submit="saveCheck"
|
|
56
|
+
>
|
|
57
|
+
<NeonField v-model="values.name" v-bind="fields.name" />
|
|
58
|
+
<NeonField v-model="values.code" v-bind="fields.code" />
|
|
59
|
+
<NeonField v-model="values.leaveQuota" v-bind="fields.leaveQuota" />
|
|
60
|
+
<OfficeRelation v-model="values" :field="fields.branches" />
|
|
61
|
+
<NeonField
|
|
62
|
+
v-model="values.maxDurationDays"
|
|
63
|
+
v-bind="fields.maxDurationDays"
|
|
64
|
+
/>
|
|
65
|
+
<NeonField
|
|
66
|
+
v-model="values.showLeaveQuota"
|
|
67
|
+
v-bind="fields.showLeaveQuota"
|
|
68
|
+
>
|
|
69
|
+
<template #input>
|
|
70
|
+
<NeonCheck
|
|
71
|
+
v-model="values.showLeaveQuota"
|
|
72
|
+
label="Tampilkan"
|
|
73
|
+
class="mt-2"
|
|
74
|
+
/>
|
|
75
|
+
</template>
|
|
76
|
+
</NeonField>
|
|
77
|
+
<NeonField
|
|
78
|
+
v-model="values.showAttendanceType"
|
|
79
|
+
v-bind="fields.showAttendanceType"
|
|
80
|
+
>
|
|
81
|
+
<template #input>
|
|
82
|
+
<NeonCheck
|
|
83
|
+
v-model="values.showAttendanceType"
|
|
84
|
+
label="Tampilkan"
|
|
85
|
+
class="mt-2"
|
|
86
|
+
/>
|
|
87
|
+
</template>
|
|
88
|
+
</NeonField>
|
|
89
|
+
<NeonField v-model="values.description" v-bind="fields.description" />
|
|
90
|
+
</NeonForm>
|
|
91
|
+
</OfficeTab>
|
|
92
|
+
</OfficeTabs>
|
|
93
|
+
</NeonSingle>
|
|
94
|
+
</template>
|
|
95
|
+
|
|
96
|
+
<style scoped>
|
|
97
|
+
.neu-AttendanceType-single {
|
|
98
|
+
@apply block;
|
|
99
|
+
}
|
|
100
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as AttendanceTypeSingle } from './AttendanceTypeSingle.vue';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as AttendanceTypeSingle } from "./AttendanceTypeSingle.vue";
|