@neutron.co.id/operasional-interfaces 1.14.2 → 1.14.4-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.
@@ -267,40 +267,6 @@ async function generate() {
267
267
  "
268
268
  @update:model-value="onStartedAtUpdate"
269
269
  />
270
- <NeonDivider
271
- is-dashed
272
- label="Tanggal ini digunakan hanya untuk Generate Absensi"
273
- class="divider"
274
- />
275
- <NeonFields md="grid-cols-3">
276
- <NeonField
277
- v-model="values.startedAt"
278
- v-bind="fields.startedAt"
279
- :is-disabled="
280
- values.status == 'approved' || values.isGenerate === true
281
- "
282
- />
283
- <NeonField
284
- v-model="values.endedAt"
285
- v-bind="fields.endedAt"
286
- :is-disabled="
287
- values.status == 'approved' || values.isGenerate === true
288
- "
289
- />
290
- <NeonButton
291
- icon-left="bolt"
292
- label="Generate"
293
- color="success"
294
- class="mt-12"
295
- size="xs"
296
- :is-loading="isLoading"
297
- :is-disabled="
298
- values.status !== 'approved' || values.isGenerate === true
299
- "
300
- is-rounded
301
- @click="generate"
302
- />
303
- </NeonFields>
304
270
 
305
271
  <NeonField
306
272
  v-model="values.type"
@@ -353,6 +319,60 @@ async function generate() {
353
319
  v-bind="fields.submittedAt"
354
320
  is-disabled
355
321
  />
322
+ <div
323
+ v-if="
324
+ values.type == 'sick' ||
325
+ values.type == 'leave' ||
326
+ values.type == 'permission'
327
+ "
328
+ >
329
+ <NeonDivider
330
+ is-dashed
331
+ label="Tanggal ini digunakan hanya untuk Generate Absensi"
332
+ class="divider"
333
+ />
334
+ <NeonFields md="grid-cols-3">
335
+ <NeonField
336
+ v-model="values.startedAt"
337
+ v-bind="{
338
+ handle: 'startedAt',
339
+ name: 'Tanggal Mulai',
340
+ options: {
341
+ note: 'Tanggal mulai absensi.',
342
+ },
343
+ }"
344
+ :is-disabled="
345
+ values.status == 'approved' || values.isGenerate === true
346
+ "
347
+ />
348
+ <NeonField
349
+ v-model="values.endedAt"
350
+ v-bind="{
351
+ handle: 'endedAt',
352
+ name: 'Tanggal Selesai',
353
+ options: {
354
+ note: 'Tanggal selesai absensi.',
355
+ },
356
+ }"
357
+ :is-disabled="
358
+ values.status == 'approved' || values.isGenerate === true
359
+ "
360
+ />
361
+ <NeonButton
362
+ icon-left="bolt"
363
+ label="Generate"
364
+ color="success"
365
+ class="mt-12"
366
+ size="xs"
367
+ :is-loading="isLoading"
368
+ :is-disabled="
369
+ values.status !== 'approved' || values.isGenerate === true
370
+ "
371
+ is-rounded
372
+ @click="generate"
373
+ />
374
+ </NeonFields>
375
+ </div>
356
376
 
357
377
  <!-- EARLY GO HOME -->
358
378
  <div
@@ -241,35 +241,6 @@ async function generate() {
241
241
  "
242
242
  @update:model-value="onStartedAtUpdate"
243
243
  />
244
- <NeonDivider
245
- label="Tanggal ini digunakan hanya untuk Generate Absensi"
246
- class="divider"
247
- />
248
- <NeonFields md="grid-cols-3">
249
- <NeonField
250
- v-model="values.startedAt"
251
- v-bind="fields.startedAt"
252
- :is-disabled="values.isGenerate === true"
253
- />
254
- <NeonField
255
- v-model="values.endedAt"
256
- v-bind="fields.endedAt"
257
- :is-disabled="values.isGenerate === true"
258
- />
259
- <NeonButton
260
- icon-left="bolt"
261
- label="Generate"
262
- color="success"
263
- class="mt-12"
264
- size="xs"
265
- :is-loading="isLoading"
266
- :is-disabled="
267
- values.status !== 'approved' || values.isGenerate === true
268
- "
269
- is-rounded
270
- @click="generate"
271
- />
272
- </NeonFields>
273
244
 
274
245
  <NeonField
275
246
  v-model="values.type"
@@ -316,6 +287,61 @@ async function generate() {
316
287
  is-disabled
317
288
  />
318
289
 
290
+ <div
291
+ v-if="
292
+ values.type == 'sick' ||
293
+ values.type == 'leave' ||
294
+ values.type == 'permission'
295
+ "
296
+ >
297
+ <NeonDivider
298
+ is-dashed
299
+ label="Tanggal ini digunakan hanya untuk Generate Absensi"
300
+ class="divider"
301
+ />
302
+ <NeonFields md="grid-cols-3">
303
+ <NeonField
304
+ v-model="values.startedAt"
305
+ v-bind="{
306
+ handle: 'startedAt',
307
+ name: 'Tanggal Mulai',
308
+ options: {
309
+ note: 'Tanggal mulai absensi.',
310
+ },
311
+ }"
312
+ :is-disabled="
313
+ values.status == 'approved' || values.isGenerate === true
314
+ "
315
+ />
316
+ <NeonField
317
+ v-model="values.endedAt"
318
+ v-bind="{
319
+ handle: 'endedAt',
320
+ name: 'Tanggal Selesai',
321
+ options: {
322
+ note: 'Tanggal selesai absensi.',
323
+ },
324
+ }"
325
+ :is-disabled="
326
+ values.status == 'approved' || values.isGenerate === true
327
+ "
328
+ />
329
+ <NeonButton
330
+ icon-left="bolt"
331
+ label="Generate"
332
+ color="success"
333
+ class="mt-12"
334
+ size="xs"
335
+ :is-loading="isLoading"
336
+ :is-disabled="
337
+ values.status !== 'approved' || values.isGenerate === true
338
+ "
339
+ is-rounded
340
+ @click="generate"
341
+ />
342
+ </NeonFields>
343
+ </div>
344
+
319
345
  <!-- EARLY GO HOME -->
320
346
  <div
321
347
  v-if="values.type == 'homeEarly'"
@@ -2,6 +2,7 @@
2
2
  import { useSingle, NeonSingle } from '@neon.id/context'
3
3
  import { NeonField, NeonFields, NeonForm } from '@neon.id/form'
4
4
  import { OfficeRelation, OfficeTab, OfficeTabs } from '@neon.id/office'
5
+ import { Query } from '@neon.id/query'
5
6
  import type {
6
7
  TPersonaliaSituationModel,
7
8
  Schema,
@@ -32,32 +33,36 @@ const {
32
33
  @cancel="discardChanges"
33
34
  @submit="saveOne"
34
35
  >
35
- <NeonFields md="grid-cols-4" title="Situasi">
36
+ <NeonFields title="Situasi">
36
37
  <NeonField
37
38
  v-model="values.situationStatus"
38
39
  v-bind="fields.situationStatus"
39
40
  />
40
41
  </NeonFields>
41
42
  <OfficeRelation v-model="values" :field="fields.branches" />
42
- <OfficeRelation v-model="values" :field="fields.situationType" />
43
+ <OfficeRelation v-model="values" :field="fields.situationType" :query="Query.define({
44
+ filter: {
45
+ branchIds: { $in: values.branchIds },
46
+ }
47
+ })" />
43
48
  <OfficeRelation
44
49
  v-model="values"
45
50
  :field="fields.situationReportedBy"
46
51
  />
47
- <NeonFields md="grid-cols-4">
52
+ <NeonFields>
48
53
  <NeonField
49
54
  v-model="values.situationDescription"
50
55
  v-bind="fields.situationDescription"
51
56
  />
52
57
  </NeonFields>
53
- <NeonFields md="grid-cols-4">
58
+ <NeonFields>
54
59
  <NeonField
55
60
  v-model="values.urgentSituationDate"
56
61
  v-bind="fields.urgentSituationDate"
57
62
  />
58
63
  </NeonFields>
59
64
  <OfficeRelation v-model="values" :field="fields.situationRelatedBy" />
60
- <NeonFields md="grid-cols-4" title="Suportif">
65
+ <NeonFields title="Suportif">
61
66
  <NeonField
62
67
  v-model="values.supportiveStatus"
63
68
  v-bind="fields.supportiveStatus"
@@ -67,7 +72,7 @@ const {
67
72
  v-model="values"
68
73
  :field="fields.situationSupportedBy"
69
74
  />
70
- <NeonFields md="grid-cols-4">
75
+ <NeonFields>
71
76
  <NeonField
72
77
  v-model="values.situationResponse"
73
78
  v-bind="fields.situationResponse"
@@ -32,7 +32,7 @@ const {
32
32
  @cancel="discardChanges"
33
33
  @submit="saveOne"
34
34
  >
35
- <NeonFields md="grid-cols-4">
35
+ <NeonFields>
36
36
  <NeonField
37
37
  v-model="values.situationTypeName"
38
38
  v-bind="fields.situationTypeName"