@neutron.co.id/operasional-interfaces 1.4.2 → 1.4.3-beta.2

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/index.cjs CHANGED
@@ -19,9 +19,9 @@ const pinia = require("pinia");
19
19
  const vueRouter = require("vue-router");
20
20
  const component = require("@neon.id/utils/component");
21
21
  const personaliaModels = require("@neutron.co.id/personalia-models");
22
- const _hoisted_1$9 = { class: "xxx-button" };
22
+ const _hoisted_1$a = { class: "xxx-button" };
23
23
  const __default__$9 = vue.defineComponent({ name: "XxxButton" });
24
- const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
24
+ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
25
25
  ...__default__$9,
26
26
  props: {
27
27
  color: {
@@ -31,7 +31,7 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
31
31
  },
32
32
  setup(__props) {
33
33
  return (_ctx, _cache) => {
34
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$9, [
34
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [
35
35
  vue.createVNode(vue.unref(interfaces.NeonButton), { label: "XXX" })
36
36
  ]);
37
37
  };
@@ -3292,103 +3292,108 @@ var getOperationName = (r2) => {
3292
3292
  }
3293
3293
  };
3294
3294
  "undefined" != typeof TextDecoder ? new TextDecoder() : null;
3295
+ var b = /* @__PURE__ */ new WeakMap();
3295
3296
  function useClient() {
3296
- if ("production" !== process.env.NODE_ENV && !vue.getCurrentInstance()) {
3297
+ var e3 = vue.getCurrentInstance();
3298
+ if ("production" !== process.env.NODE_ENV && !e3) {
3297
3299
  throw new Error("use* functions may only be called during the `setup()` or other lifecycle hooks.");
3298
3300
  }
3299
- var e3 = vue.inject("$urql");
3300
- if ("production" !== process.env.NODE_ENV && !e3) {
3301
+ var r2 = vue.inject("$urql");
3302
+ if (!r2 && e3) {
3303
+ r2 = b.get(e3);
3304
+ }
3305
+ if ("production" !== process.env.NODE_ENV && !r2) {
3301
3306
  throw new Error("No urql Client was provided. Did you forget to install the plugin or call `provideClient` in a parent?");
3302
3307
  }
3303
- return e3;
3308
+ return r2;
3304
3309
  }
3305
3310
  function unwrapPossibleProxy(e3) {
3306
3311
  return e3 && vue.isRef(e3) ? e3.value : e3;
3307
3312
  }
3308
- var b = {
3313
+ var P = {
3309
3314
  flush: "pre"
3310
3315
  };
3311
- function callUseQuery(e3, l2 = useClient(), t3 = []) {
3312
- var n = vue.reactive(e3);
3313
- var o2 = vue.ref();
3316
+ function callUseQuery(e3, l2 = useClient(), n = []) {
3317
+ var s4 = vue.reactive(e3);
3318
+ var i3 = vue.ref();
3314
3319
  var v2 = vue.ref(false);
3315
3320
  var f2 = vue.ref(false);
3316
3321
  var y3 = vue.ref();
3322
+ var b3 = vue.ref();
3317
3323
  var d4 = vue.ref();
3318
- var h3 = vue.ref();
3319
- var x2 = vue.isRef(e3.pause) ? e3.pause : vue.ref(!!e3.pause);
3320
- var w2 = vue.ref(createRequest(n.query, unwrapPossibleProxy(n.variables)));
3321
- var P = vue.ref();
3322
- t3.push(vue.watchEffect(() => {
3323
- var e4 = createRequest(n.query, unwrapPossibleProxy(n.variables));
3324
- if (w2.value.key !== e4.key) {
3325
- w2.value = e4;
3326
- }
3327
- }, b));
3328
- t3.push(vue.watchEffect(() => {
3329
- P.value = !x2.value ? l2.value.executeQuery(w2.value, {
3330
- requestPolicy: n.requestPolicy,
3331
- ...n.context
3324
+ var h3 = vue.isRef(e3.pause) ? e3.pause : vue.ref(!!e3.pause);
3325
+ var x2 = vue.ref(createRequest(unwrapPossibleProxy(s4.query), unwrapPossibleProxy(s4.variables)));
3326
+ var w2 = vue.ref();
3327
+ n.push(vue.watchEffect(() => {
3328
+ var e4 = createRequest(unwrapPossibleProxy(s4.query), unwrapPossibleProxy(s4.variables));
3329
+ if (x2.value.key !== e4.key) {
3330
+ x2.value = e4;
3331
+ }
3332
+ }, P));
3333
+ n.push(vue.watchEffect(() => {
3334
+ w2.value = !h3.value ? l2.value.executeQuery(x2.value, {
3335
+ requestPolicy: unwrapPossibleProxy(s4.requestPolicy),
3336
+ ...unwrapPossibleProxy(s4.context)
3332
3337
  }) : void 0;
3333
- }, b));
3338
+ }, P));
3334
3339
  var q2 = {
3335
- data: o2,
3340
+ data: i3,
3336
3341
  stale: v2,
3337
3342
  error: y3,
3338
- operation: d4,
3339
- extensions: h3,
3343
+ operation: b3,
3344
+ extensions: d4,
3340
3345
  fetching: f2,
3341
- isPaused: x2,
3346
+ isPaused: h3,
3342
3347
  executeQuery(e4) {
3343
- var u2 = P.value = l2.value.executeQuery(w2.value, {
3344
- requestPolicy: n.requestPolicy,
3345
- ...n.context,
3348
+ var r2 = w2.value = l2.value.executeQuery(x2.value, {
3349
+ requestPolicy: unwrapPossibleProxy(s4.requestPolicy),
3350
+ ...s4.context,
3346
3351
  ...e4
3347
3352
  });
3348
3353
  return {
3349
3354
  ...E2,
3350
- then(e5, r2) {
3355
+ then(e5, u2) {
3351
3356
  var a3;
3352
3357
  return new Promise((e6) => {
3353
- var r3 = false;
3358
+ var u3 = false;
3354
3359
  a3 = subscribe(() => {
3355
3360
  if (!q2.fetching.value && !q2.stale.value) {
3356
3361
  if (a3) {
3357
3362
  a3.unsubscribe();
3358
3363
  }
3359
- r3 = true;
3364
+ u3 = true;
3360
3365
  e6(q2);
3361
3366
  }
3362
- })(u2);
3363
- if (r3) {
3367
+ })(r2);
3368
+ if (u3) {
3364
3369
  a3.unsubscribe();
3365
3370
  }
3366
- }).then(e5, r2);
3371
+ }).then(e5, u2);
3367
3372
  }
3368
3373
  };
3369
3374
  },
3370
3375
  pause() {
3371
- x2.value = true;
3376
+ h3.value = true;
3372
3377
  },
3373
3378
  resume() {
3374
- x2.value = false;
3379
+ h3.value = false;
3375
3380
  }
3376
3381
  };
3377
- t3.push(vue.watchEffect((e4) => {
3378
- if (P.value) {
3382
+ n.push(vue.watchEffect((e4) => {
3383
+ if (w2.value) {
3379
3384
  f2.value = true;
3380
3385
  v2.value = false;
3381
3386
  e4(subscribe((e5) => {
3382
- o2.value = e5.data;
3387
+ i3.value = e5.data;
3383
3388
  v2.value = !!e5.stale;
3384
3389
  f2.value = false;
3385
3390
  y3.value = e5.error;
3386
- d4.value = e5.operation;
3387
- h3.value = e5.extensions;
3391
+ b3.value = e5.operation;
3392
+ d4.value = e5.extensions;
3388
3393
  })(onEnd(() => {
3389
3394
  f2.value = false;
3390
3395
  v2.value = false;
3391
- })(P.value)).unsubscribe);
3396
+ })(w2.value)).unsubscribe);
3392
3397
  } else {
3393
3398
  f2.value = false;
3394
3399
  v2.value = false;
@@ -3398,53 +3403,53 @@ function callUseQuery(e3, l2 = useClient(), t3 = []) {
3398
3403
  }));
3399
3404
  var E2 = {
3400
3405
  ...q2,
3401
- then(e4, u2) {
3402
- var r2;
3406
+ then(e4, r2) {
3407
+ var u2;
3403
3408
  return new Promise((e5) => {
3404
- if (!P.value) {
3409
+ if (!w2.value) {
3405
3410
  return e5(q2);
3406
3411
  }
3407
- var u3 = false;
3408
- r2 = subscribe(() => {
3412
+ var r3 = false;
3413
+ u2 = subscribe(() => {
3409
3414
  if (!q2.fetching.value && !q2.stale.value) {
3410
- if (r2) {
3411
- r2.unsubscribe();
3415
+ if (u2) {
3416
+ u2.unsubscribe();
3412
3417
  }
3413
- u3 = true;
3418
+ r3 = true;
3414
3419
  e5(q2);
3415
3420
  }
3416
- })(P.value);
3417
- if (u3) {
3418
- r2.unsubscribe();
3421
+ })(w2.value);
3422
+ if (r3) {
3423
+ u2.unsubscribe();
3419
3424
  }
3420
- }).then(e4, u2);
3425
+ }).then(e4, r2);
3421
3426
  }
3422
3427
  };
3423
3428
  return E2;
3424
3429
  }
3425
- function callUseMutation(e3, r2 = useClient()) {
3430
+ function callUseMutation(e3, u2 = useClient()) {
3426
3431
  var l2 = vue.ref();
3427
- var t3 = vue.ref(false);
3428
3432
  var n = vue.ref(false);
3429
- var s4 = vue.ref();
3430
- var i3 = vue.ref();
3433
+ var s4 = vue.ref(false);
3434
+ var t3 = vue.ref();
3431
3435
  var o2 = vue.ref();
3436
+ var i3 = vue.ref();
3432
3437
  return {
3433
3438
  data: l2,
3434
- stale: t3,
3435
- fetching: n,
3436
- error: s4,
3437
- operation: i3,
3438
- extensions: o2,
3439
+ stale: n,
3440
+ fetching: s4,
3441
+ error: t3,
3442
+ operation: o2,
3443
+ extensions: i3,
3439
3444
  executeMutation(a3, v2) {
3440
- n.value = true;
3441
- return toPromise(take(1)(r2.value.executeMutation(createRequest(e3, unwrapPossibleProxy(a3)), v2 || {}))).then((e4) => {
3445
+ s4.value = true;
3446
+ return toPromise(take(1)(u2.value.executeMutation(createRequest(e3, unwrapPossibleProxy(a3)), v2 || {}))).then((e4) => {
3442
3447
  l2.value = e4.data;
3443
- t3.value = !!e4.stale;
3444
- n.value = false;
3445
- s4.value = e4.error;
3446
- i3.value = e4.operation;
3447
- o2.value = e4.extensions;
3448
+ n.value = !!e4.stale;
3449
+ s4.value = false;
3450
+ t3.value = e4.error;
3451
+ o2.value = e4.operation;
3452
+ i3.value = e4.extensions;
3448
3453
  return e4;
3449
3454
  });
3450
3455
  }
@@ -3453,38 +3458,38 @@ function callUseMutation(e3, r2 = useClient()) {
3453
3458
  var d = {
3454
3459
  flush: "pre"
3455
3460
  };
3456
- function callUseSubscription(e3, l2, t3 = useClient(), n = []) {
3457
- var o2 = vue.reactive(e3);
3461
+ function callUseSubscription(e3, l2, n = useClient(), s4 = []) {
3462
+ var i3 = vue.reactive(e3);
3458
3463
  var v2 = vue.ref();
3459
3464
  var f2 = vue.ref(false);
3460
3465
  var y3 = vue.ref(false);
3461
3466
  var b3 = vue.ref();
3467
+ var P2 = vue.ref();
3462
3468
  var h3 = vue.ref();
3463
- var x2 = vue.ref();
3464
- var w2 = vue.ref(l2);
3465
- var P = vue.isRef(e3.pause) ? e3.pause : vue.ref(!!e3.pause);
3466
- var q2 = vue.ref(createRequest(o2.query, unwrapPossibleProxy(o2.variables)));
3469
+ var x2 = vue.ref(l2);
3470
+ var w2 = vue.isRef(e3.pause) ? e3.pause : vue.ref(!!e3.pause);
3471
+ var q2 = vue.ref(createRequest(unwrapPossibleProxy(i3.query), unwrapPossibleProxy(i3.variables)));
3467
3472
  var E2 = vue.ref();
3468
- n.push(vue.watchEffect(() => {
3469
- var e4 = createRequest(o2.query, unwrapPossibleProxy(o2.variables));
3473
+ s4.push(vue.watchEffect(() => {
3474
+ var e4 = createRequest(unwrapPossibleProxy(i3.query), unwrapPossibleProxy(i3.variables));
3470
3475
  if (q2.value.key !== e4.key) {
3471
3476
  q2.value = e4;
3472
3477
  }
3473
3478
  }, d));
3474
- n.push(vue.watchEffect(() => {
3475
- E2.value = !P.value ? t3.value.executeSubscription(q2.value, {
3476
- ...o2.context
3479
+ s4.push(vue.watchEffect(() => {
3480
+ E2.value = !w2.value ? n.value.executeSubscription(q2.value, {
3481
+ ...unwrapPossibleProxy(i3.context)
3477
3482
  }) : void 0;
3478
3483
  }, d));
3479
- n.push(vue.watchEffect((e4) => {
3484
+ s4.push(vue.watchEffect((e4) => {
3480
3485
  if (E2.value) {
3481
3486
  y3.value = true;
3482
3487
  e4(subscribe((e5) => {
3483
3488
  y3.value = true;
3484
- v2.value = void 0 !== e5.data ? "function" == typeof w2.value ? w2.value(v2.value, e5.data) : e5.data : e5.data, b3.value = e5.error;
3485
- x2.value = e5.extensions;
3489
+ v2.value = void 0 !== e5.data ? "function" == typeof x2.value ? x2.value(v2.value, e5.data) : e5.data : e5.data, b3.value = e5.error;
3490
+ h3.value = e5.extensions;
3486
3491
  f2.value = !!e5.stale;
3487
- h3.value = e5.operation;
3492
+ P2.value = e5.operation;
3488
3493
  })(onEnd(() => {
3489
3494
  y3.value = false;
3490
3495
  })(E2.value)).unsubscribe);
@@ -3496,60 +3501,60 @@ function callUseSubscription(e3, l2, t3 = useClient(), n = []) {
3496
3501
  data: v2,
3497
3502
  stale: f2,
3498
3503
  error: b3,
3499
- operation: h3,
3500
- extensions: x2,
3504
+ operation: P2,
3505
+ extensions: h3,
3501
3506
  fetching: y3,
3502
- isPaused: P,
3507
+ isPaused: w2,
3503
3508
  executeSubscription(e4) {
3504
- E2.value = t3.value.executeSubscription(q2.value, {
3505
- ...o2.context,
3509
+ E2.value = n.value.executeSubscription(q2.value, {
3510
+ ...unwrapPossibleProxy(i3.context),
3506
3511
  ...e4
3507
3512
  });
3508
3513
  return m3;
3509
3514
  },
3510
3515
  pause() {
3511
- P.value = true;
3516
+ w2.value = true;
3512
3517
  },
3513
3518
  resume() {
3514
- P.value = false;
3519
+ w2.value = false;
3515
3520
  }
3516
3521
  };
3517
3522
  return m3;
3518
3523
  }
3519
3524
  function useClientHandle() {
3520
3525
  var e3 = useClient();
3521
- var u2 = [];
3526
+ var r2 = [];
3522
3527
  vue.onBeforeUnmount(() => {
3523
3528
  var e4;
3524
- while (e4 = u2.shift()) {
3529
+ while (e4 = r2.shift()) {
3525
3530
  e4();
3526
3531
  }
3527
3532
  });
3528
- var r2 = {
3533
+ var u2 = {
3529
3534
  client: e3.value,
3530
- useQuery: (r3) => callUseQuery(r3, e3, u2),
3531
- useSubscription: (r3, a3) => callUseSubscription(r3, a3, e3, u2),
3532
- useMutation: (u3) => callUseMutation(u3, e3)
3535
+ useQuery: (u3) => callUseQuery(u3, e3, r2),
3536
+ useSubscription: (u3, a3) => callUseSubscription(u3, a3, e3, r2),
3537
+ useMutation: (r3) => callUseMutation(r3, e3)
3533
3538
  };
3534
3539
  if ("production" !== process.env.NODE_ENV) {
3535
3540
  vue.onMounted(() => {
3536
- Object.assign(r2, {
3537
- useQuery(r3) {
3541
+ Object.assign(u2, {
3542
+ useQuery(u3) {
3538
3543
  if ("production" !== process.env.NODE_ENV && !vue.getCurrentInstance()) {
3539
3544
  throw new Error("`handle.useQuery()` should only be called in the `setup()` or a lifecycle hook.");
3540
3545
  }
3541
- return callUseQuery(r3, e3, u2);
3546
+ return callUseQuery(u3, e3, r2);
3542
3547
  },
3543
- useSubscription(r3, a3) {
3548
+ useSubscription(u3, a3) {
3544
3549
  if ("production" !== process.env.NODE_ENV && !vue.getCurrentInstance()) {
3545
3550
  throw new Error("`handle.useSubscription()` should only be called in the `setup()` or a lifecycle hook.");
3546
3551
  }
3547
- return callUseSubscription(r3, a3, e3, u2);
3552
+ return callUseSubscription(u3, a3, e3, r2);
3548
3553
  }
3549
3554
  });
3550
3555
  });
3551
3556
  }
3552
- return r2;
3557
+ return u2;
3553
3558
  }
3554
3559
  function toInteger(dirtyNumber) {
3555
3560
  if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
@@ -5104,13 +5109,13 @@ function cleanEscapedString(input) {
5104
5109
  function startOfToday() {
5105
5110
  return startOfDay(Date.now());
5106
5111
  }
5107
- const _hoisted_1$8 = { class: "operasional-identitas" };
5112
+ const _hoisted_1$9 = { class: "operasional-identitas" };
5108
5113
  const _hoisted_2$5 = {
5109
5114
  key: 2,
5110
5115
  class: "section"
5111
5116
  };
5112
5117
  const __default__$8 = vue.defineComponent({ name: "OperasionalIdentitas" });
5113
- const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
5118
+ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
5114
5119
  ...__default__$8,
5115
5120
  props: {
5116
5121
  profile: {
@@ -5364,7 +5369,7 @@ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
5364
5369
  candidateId.value = null;
5365
5370
  }
5366
5371
  return (_ctx, _cache) => {
5367
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [
5372
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$9, [
5368
5373
  state.value === "connect" ? (vue.openBlock(), vue.createBlock(vue.unref(identitasInterfaces.IdentitasConnect), {
5369
5374
  key: 0,
5370
5375
  user: vue.unref(user),
@@ -5457,7 +5462,7 @@ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
5457
5462
  };
5458
5463
  }
5459
5464
  });
5460
- const OperasionalIdentitas_vue_vue_type_style_index_0_scoped_e17256c5_lang = "";
5465
+ const OperasionalIdentitas_vue_vue_type_style_index_0_scoped_780f9c83_lang = "";
5461
5466
  const _export_sfc = (sfc, props) => {
5462
5467
  const target = sfc.__vccOpts || sfc;
5463
5468
  for (const [key, val] of props) {
@@ -5465,7 +5470,7 @@ const _export_sfc = (sfc, props) => {
5465
5470
  }
5466
5471
  return target;
5467
5472
  };
5468
- const OperasionalIdentitas = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-e17256c5"]]);
5473
+ const OperasionalIdentitas = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-780f9c83"]]);
5469
5474
  const CheckInModel = tempatModels.models.CheckInModel;
5470
5475
  const useOperasionalStore = pinia.defineStore("neu:operasional", () => {
5471
5476
  const isLoading = vue.ref(false);
@@ -5606,8 +5611,8 @@ function mitt(n) {
5606
5611
  } };
5607
5612
  }
5608
5613
  const bus = mitt();
5609
- const _withScopeId$2 = (n) => (vue.pushScopeId("data-v-d5ce5adb"), n = n(), vue.popScopeId(), n);
5610
- const _hoisted_1$7 = { id: "view-checkIns" };
5614
+ const _withScopeId$2 = (n) => (vue.pushScopeId("data-v-89ba2448"), n = n(), vue.popScopeId(), n);
5615
+ const _hoisted_1$8 = { id: "view-checkIns" };
5611
5616
  const _hoisted_2$4 = { class: "summary" };
5612
5617
  const _hoisted_3$1 = { class: "wrapper" };
5613
5618
  const _hoisted_4$1 = { class: "header" };
@@ -5625,7 +5630,7 @@ const _hoisted_6 = { class: "end" };
5625
5630
  const __default__$7 = vue.defineComponent({
5626
5631
  name: "CheckInPresenceCollection"
5627
5632
  });
5628
- const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
5633
+ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
5629
5634
  ...__default__$7,
5630
5635
  setup(__props) {
5631
5636
  const collectionBus = core.useEventBus("neu:tempat:checkIn");
@@ -5761,9 +5766,9 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
5761
5766
  return checkInId;
5762
5767
  }
5763
5768
  return (_ctx, _cache) => {
5764
- const _component_CheckInSingleView = vue.resolveComponent("CheckInSingleView");
5769
+ const _component_CheckInSingleExternalView = vue.resolveComponent("CheckInSingleExternalView");
5765
5770
  const _component_CheckInCollection = vue.resolveComponent("CheckInCollection");
5766
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$7, [
5771
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [
5767
5772
  vue.createVNode(vue.unref(office.OfficeContent), {
5768
5773
  icon: "barcode-read",
5769
5774
  title: "Presensi",
@@ -5863,7 +5868,7 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
5863
5868
  onClose: onModalClose
5864
5869
  }, {
5865
5870
  default: vue.withCtx(() => [
5866
- vue.createVNode(_component_CheckInSingleView, {
5871
+ vue.createVNode(_component_CheckInSingleExternalView, {
5867
5872
  id: id.value,
5868
5873
  "is-new": "",
5869
5874
  "is-main": false,
@@ -5926,10 +5931,10 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
5926
5931
  };
5927
5932
  }
5928
5933
  });
5929
- const CheckInPresenceCollection_vue_vue_type_style_index_0_scoped_d5ce5adb_lang = "";
5930
- const CheckInPresenceCollection = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-d5ce5adb"]]);
5931
- const _hoisted_1$6 = { class: "grid gap-4 sm:grid-cols-2" };
5932
- const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
5934
+ const CheckInPresenceCollection_vue_vue_type_style_index_0_scoped_89ba2448_lang = "";
5935
+ const CheckInPresenceCollection = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-89ba2448"]]);
5936
+ const _hoisted_1$7 = { class: "grid gap-4 sm:grid-cols-2" };
5937
+ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
5933
5938
  __name: "CheckInSingle",
5934
5939
  setup(__props) {
5935
5940
  const {
@@ -5987,7 +5992,7 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
5987
5992
  field: vue.unref(fields).building,
5988
5993
  "is-disabled": ""
5989
5994
  }, null, 8, ["modelValue", "field"]),
5990
- vue.createElementVNode("div", _hoisted_1$6, [
5995
+ vue.createElementVNode("div", _hoisted_1$7, [
5991
5996
  vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
5992
5997
  modelValue: vue.unref(values).type,
5993
5998
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.unref(values).type = $event)
@@ -6027,7 +6032,107 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
6027
6032
  }
6028
6033
  });
6029
6034
  const CheckInSingle_vue_vue_type_style_index_0_scoped_2e2803fb_lang = "";
6030
- const CheckInSingle = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-2e2803fb"]]);
6035
+ const CheckInSingle = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-2e2803fb"]]);
6036
+ const _hoisted_1$6 = { class: "grid gap-4 sm:grid-cols-2" };
6037
+ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
6038
+ __name: "CheckInExternal",
6039
+ setup(__props) {
6040
+ const {
6041
+ fields,
6042
+ id,
6043
+ initialValues,
6044
+ values,
6045
+ isLoading,
6046
+ isChanged,
6047
+ isReady,
6048
+ isMain,
6049
+ isNew,
6050
+ saveOne,
6051
+ discardChanges,
6052
+ getOne
6053
+ } = context.useSingle();
6054
+ const { staff } = useOperasional();
6055
+ vue.onMounted(() => {
6056
+ var _a, _b, _c;
6057
+ console.log("idnya?", id.value);
6058
+ if (id.value === "new") {
6059
+ values.value.staffId = (_a = staff.value) == null ? void 0 : _a.id;
6060
+ values.value.staff = {
6061
+ id: (_b = staff.value) == null ? void 0 : _b.id,
6062
+ display: (_c = staff.value) == null ? void 0 : _c.display
6063
+ };
6064
+ values.value.checkInAt = new Date().toISOString();
6065
+ values.value.type = "checkpoint";
6066
+ }
6067
+ });
6068
+ return (_ctx, _cache) => {
6069
+ return vue.openBlock(), vue.createBlock(vue.unref(context.NeonSingle), { class: "neu-checkIn-single" }, {
6070
+ default: vue.withCtx(() => [
6071
+ vue.createVNode(vue.unref(office.OfficeTabs), { "use-url": vue.unref(isMain) }, {
6072
+ default: vue.withCtx(() => [
6073
+ vue.createVNode(vue.unref(office.OfficeTab), {
6074
+ handle: "info",
6075
+ icon: "circle-info",
6076
+ title: "Info"
6077
+ }, {
6078
+ default: vue.withCtx(() => [
6079
+ vue.createVNode(vue.unref(form.NeonForm), {
6080
+ handle: "info",
6081
+ "initial-values": vue.unref(initialValues),
6082
+ "is-loading": vue.unref(isLoading),
6083
+ "is-changed": vue.unref(isChanged),
6084
+ "use-unsaved": "",
6085
+ onCancel: vue.unref(discardChanges),
6086
+ onSubmit: vue.unref(saveOne)
6087
+ }, {
6088
+ default: vue.withCtx(() => [
6089
+ vue.unref(values).type === "in" || vue.unref(values).type === "out" ? (vue.openBlock(), vue.createBlock(vue.unref(office.OfficeRelation), {
6090
+ key: 0,
6091
+ modelValue: vue.unref(values),
6092
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(values) ? values.value = $event : null),
6093
+ field: vue.unref(fields).building
6094
+ }, null, 8, ["modelValue", "field"])) : vue.createCommentVNode("v-if", true),
6095
+ vue.createElementVNode("div", _hoisted_1$6, [
6096
+ vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
6097
+ modelValue: vue.unref(values).type,
6098
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.unref(values).type = $event)
6099
+ }, vue.unref(fields).type, { "is-disabled": "" }), null, 16, ["modelValue"]),
6100
+ vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
6101
+ modelValue: vue.unref(values).checkInAt,
6102
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vue.unref(values).checkInAt = $event)
6103
+ }, vue.unref(fields).checkInAt, { "is-disabled": "" }), null, 16, ["modelValue"])
6104
+ ]),
6105
+ vue.createVNode(vue.unref(office.OfficeRelation), {
6106
+ modelValue: vue.unref(values),
6107
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vue.isRef(values) ? values.value = $event : null),
6108
+ field: vue.unref(fields).staff,
6109
+ "is-disabled": ""
6110
+ }, null, 8, ["modelValue", "field"]),
6111
+ vue.createVNode(vue.unref(form.NeonField), vue.mergeProps({
6112
+ modelValue: vue.unref(values).note,
6113
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => vue.unref(values).note = $event)
6114
+ }, vue.unref(fields).note), null, 16, ["modelValue"])
6115
+ ]),
6116
+ _: 1
6117
+ /* STABLE */
6118
+ }, 8, ["initial-values", "is-loading", "is-changed", "onCancel", "onSubmit"])
6119
+ ]),
6120
+ _: 1
6121
+ /* STABLE */
6122
+ })
6123
+ ]),
6124
+ _: 1
6125
+ /* STABLE */
6126
+ }, 8, ["use-url"])
6127
+ ]),
6128
+ _: 1
6129
+ /* STABLE */
6130
+ });
6131
+ };
6132
+ }
6133
+ });
6134
+ const CheckInExternal_vue_vue_type_style_index_0_scoped_3c28699a_lang = "";
6135
+ const CheckInExternal = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-3c28699a"]]);
6031
6136
  const _withScopeId$1 = (n) => (vue.pushScopeId("data-v-d23b6de5"), n = n(), vue.popScopeId(), n);
6032
6137
  const _hoisted_1$5 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ vue.createElementVNode(
6033
6138
  "h4",
@@ -7280,26 +7385,43 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
7280
7385
  discardChanges
7281
7386
  } = context.useSingle();
7282
7387
  const authStore = identitasInterfaces.useAuthStore();
7283
- const { userId } = pinia.storeToRefs(authStore);
7388
+ pinia.storeToRefs(authStore);
7284
7389
  const { staff } = useOperasional();
7285
- vue.onMounted(() => {
7286
- var _a, _b, _c, _d, _e, _f;
7287
- if (id.value === "new") {
7288
- values.value.situationReportedByIds = [((_a = staff.value) == null ? void 0 : _a.id) || ""];
7289
- values.value.branchIds = [((_b = staff.value) == null ? void 0 : _b.branchId) || ""];
7290
- values.value.userId = userId.value;
7390
+ vue.watch(
7391
+ isNew,
7392
+ (isNew2) => {
7393
+ var _a, _b, _c, _d, _e;
7394
+ const branch = ((_a = staff.value) == null ? void 0 : _a.branchIds) || [];
7395
+ const branchDisplay = ((_b = staff.value) == null ? void 0 : _b.branches) || [];
7396
+ if (!isNew2)
7397
+ return;
7398
+ values.value.situationReportedByIds = [((_c = staff.value) == null ? void 0 : _c.id) || ""];
7291
7399
  values.value.situationReportedBy = [
7292
7400
  {
7293
- id: (_c = staff.value) == null ? void 0 : _c.id,
7294
- display: (_d = staff.value) == null ? void 0 : _d.display
7401
+ id: (_d = staff.value) == null ? void 0 : _d.id,
7402
+ display: (_e = staff.value) == null ? void 0 : _e.display
7295
7403
  }
7296
7404
  ];
7297
- }
7298
- if (isChanged) {
7299
- values.value.situationReportedByIds = [((_e = staff.value) == null ? void 0 : _e.id) || ""];
7300
- values.value.branchIds = [((_f = staff.value) == null ? void 0 : _f.branchId) || ""];
7301
- values.value.userId = userId.value;
7302
- }
7405
+ values.value.branchIds = [branch[0]];
7406
+ values.value.branches = [branchDisplay[0]];
7407
+ },
7408
+ { immediate: true }
7409
+ );
7410
+ const onTypeState = vue.computed(() => {
7411
+ var _a;
7412
+ return query.Query.define({
7413
+ filter: {
7414
+ branchIds: { $in: (_a = staff.value) == null ? void 0 : _a.branchIds }
7415
+ }
7416
+ });
7417
+ });
7418
+ const onBranchState = vue.computed(() => {
7419
+ var _a;
7420
+ return query.Query.define({
7421
+ filter: {
7422
+ _id: { $in: (_a = staff.value) == null ? void 0 : _a.branchIds }
7423
+ }
7424
+ });
7303
7425
  });
7304
7426
  return (_ctx, _cache) => {
7305
7427
  return vue.openBlock(), vue.createBlock(vue.unref(context.NeonSingle), { class: "neu-situation-single" }, {
@@ -7339,18 +7461,21 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
7339
7461
  modelValue: vue.unref(values),
7340
7462
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.isRef(values) ? values.value = $event : null),
7341
7463
  field: vue.unref(fields).branches,
7342
- fragment: { id: 1, display: 1, name: 1 }
7343
- }, null, 8, ["modelValue", "field"]),
7464
+ fragment: { id: 1, display: 1, name: 1 },
7465
+ query: vue.unref(onBranchState)
7466
+ }, null, 8, ["modelValue", "field", "query"]),
7344
7467
  vue.createVNode(vue.unref(office.OfficeRelation), {
7345
7468
  modelValue: vue.unref(values),
7346
7469
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vue.isRef(values) ? values.value = $event : null),
7347
- field: vue.unref(fields).situationType
7348
- }, null, 8, ["modelValue", "field"]),
7470
+ field: vue.unref(fields).situationType,
7471
+ query: vue.unref(onTypeState)
7472
+ }, null, 8, ["modelValue", "field", "query"]),
7349
7473
  vue.createVNode(vue.unref(office.OfficeRelation), {
7350
7474
  modelValue: vue.unref(values),
7351
7475
  "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vue.isRef(values) ? values.value = $event : null),
7352
7476
  field: vue.unref(fields).situationReportedBy,
7353
- fragment: { id: 1, display: 1, name: 1 }
7477
+ fragment: { id: 1, display: 1, name: 1 },
7478
+ "is-disabled": ""
7354
7479
  }, null, 8, ["modelValue", "field"]),
7355
7480
  vue.createVNode(vue.unref(form.NeonFields), { md: "grid-cols-4" }, {
7356
7481
  default: vue.withCtx(() => [
@@ -8059,16 +8184,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
8059
8184
  discardChanges
8060
8185
  } = context.useSingle();
8061
8186
  const authStore = identitasInterfaces.useAuthStore();
8062
- const { userId } = pinia.storeToRefs(authStore);
8187
+ pinia.storeToRefs(authStore);
8063
8188
  useOperasional();
8064
- vue.onMounted(() => {
8065
- if (id.value === "new") {
8066
- values.value.userId = userId.value;
8067
- }
8068
- if (isChanged) {
8069
- values.value.userId = userId.value;
8070
- }
8071
- });
8072
8189
  function onChangeDateUpdate(date) {
8073
8190
  values.value.estimatedStartDate = date == null ? void 0 : date.start.toISOString();
8074
8191
  values.value.estimatedEndDate = date == null ? void 0 : date.end.toISOString();
@@ -8286,6 +8403,7 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
8286
8403
  __proto__: null,
8287
8404
  CheckInAccess,
8288
8405
  CheckInCollection: _sfc_main$d,
8406
+ CheckInExternal,
8289
8407
  CheckInModel,
8290
8408
  CheckInPresenceCollection,
8291
8409
  CheckInScanError: _sfc_main$g,
@@ -8310,7 +8428,7 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
8310
8428
  TaskSingle: _sfc_main$1,
8311
8429
  TaskWork: _sfc_main,
8312
8430
  TaskWorkButton: _sfc_main$3,
8313
- XxxButton: _sfc_main$l
8431
+ XxxButton: _sfc_main$m
8314
8432
  }, Symbol.toStringTag, { value: "Module" }));
8315
8433
  function registerComponents(app) {
8316
8434
  Object.entries(components).forEach(([name, component2]) => {
@@ -8429,6 +8547,7 @@ const qrScannerWorker_min = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object
8429
8547
  }, Symbol.toStringTag, { value: "Module" }));
8430
8548
  exports.CheckInAccess = CheckInAccess;
8431
8549
  exports.CheckInCollection = _sfc_main$d;
8550
+ exports.CheckInExternal = CheckInExternal;
8432
8551
  exports.CheckInModel = CheckInModel;
8433
8552
  exports.CheckInPresenceCollection = CheckInPresenceCollection;
8434
8553
  exports.CheckInScanError = _sfc_main$g;
@@ -8456,7 +8575,7 @@ exports.TaskModel = TaskModel;
8456
8575
  exports.TaskSingle = _sfc_main$1;
8457
8576
  exports.TaskWork = _sfc_main;
8458
8577
  exports.TaskWorkButton = _sfc_main$3;
8459
- exports.XxxButton = _sfc_main$l;
8578
+ exports.XxxButton = _sfc_main$m;
8460
8579
  exports.bus = bus;
8461
8580
  exports.useAttendanceStore = useAttendanceStore;
8462
8581
  exports.useOperasional = useOperasional;