@neutron.co.id/operasional-interfaces 1.9.5 → 1.9.7

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
@@ -26,13 +26,13 @@ const identitasInterfaces = require("@neon.id/identitas-interfaces");
26
26
  const vueRouter = require("vue-router");
27
27
  const Scanner = require("qr-scanner");
28
28
  const mitt = require("mitt");
29
+ const promise = require("@neon.id/utils/promise");
29
30
  const display = require("@neon.id/display");
30
31
  const identitasModels = require("@neon.id/identitas-models");
31
32
  const model = require("@neon.id/model");
32
33
  const relation = require("@neon.id/relation");
33
34
  const code = require("@neon.id/utils/code");
34
35
  const catatInterfaces = require("@neon.id/catat-interfaces");
35
- const promise = require("@neon.id/utils/promise");
36
36
  const AttendanceModel = personaliaModels.models.AttendanceModel;
37
37
  const _sfc_main$11 = /* @__PURE__ */ vue.defineComponent({
38
38
  ...{
@@ -1518,7 +1518,7 @@ const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
1518
1518
  const AttendanceSupervisor_vue_vue_type_style_index_0_scoped_07f6564f_lang = "";
1519
1519
  const AttendanceSupervisor = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-07f6564f"]]);
1520
1520
  const CheckInModel = tempatModels.models.CheckInModel;
1521
- const _withScopeId$2 = (n) => (vue.pushScopeId("data-v-8637aebc"), n = n(), vue.popScopeId(), n);
1521
+ const _withScopeId$2 = (n) => (vue.pushScopeId("data-v-7782d75c"), n = n(), vue.popScopeId(), n);
1522
1522
  const _hoisted_1$j = { id: "view-checkIns" };
1523
1523
  const _hoisted_2$c = { class: "summary" };
1524
1524
  const _hoisted_3$4 = { class: "wrapper" };
@@ -1725,7 +1725,6 @@ const _sfc_main$X = /* @__PURE__ */ vue.defineComponent({
1725
1725
  default: vue.withCtx(() => [
1726
1726
  vue.createVNode(vue.unref(interfaces.NeonStat), {
1727
1727
  label: "Checkpoint",
1728
- icon: "barcode-read",
1729
1728
  onClick: onPresenceCheckpoint
1730
1729
  }, {
1731
1730
  default: vue.withCtx(() => [
@@ -1755,7 +1754,6 @@ const _sfc_main$X = /* @__PURE__ */ vue.defineComponent({
1755
1754
  default: vue.withCtx(() => [
1756
1755
  vue.createVNode(vue.unref(interfaces.NeonStat), {
1757
1756
  label: "Pulang",
1758
- icon: "barcode-read",
1759
1757
  onClick: onPresenceHome
1760
1758
  }, {
1761
1759
  default: vue.withCtx(() => [
@@ -1863,8 +1861,8 @@ const _sfc_main$X = /* @__PURE__ */ vue.defineComponent({
1863
1861
  };
1864
1862
  }
1865
1863
  });
1866
- const CheckInPresenceCollection_vue_vue_type_style_index_0_scoped_8637aebc_lang = "";
1867
- const CheckInPresenceCollection = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["__scopeId", "data-v-8637aebc"]]);
1864
+ const CheckInPresenceCollection_vue_vue_type_style_index_0_scoped_7782d75c_lang = "";
1865
+ const CheckInPresenceCollection = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["__scopeId", "data-v-7782d75c"]]);
1868
1866
  const _hoisted_1$i = { class: "grid gap-4 sm:grid-cols-2" };
1869
1867
  const _sfc_main$W = /* @__PURE__ */ vue.defineComponent({
1870
1868
  __name: "CheckInSingle",
@@ -1982,25 +1980,24 @@ const _sfc_main$V = /* @__PURE__ */ vue.defineComponent({
1982
1980
  const route = vueRouter.useRoute();
1983
1981
  const permit = context.usePermit();
1984
1982
  const { staff } = useOperasional();
1985
- const isOperasional = vue.computed(() => {
1983
+ vue.computed(() => {
1986
1984
  var _a;
1987
1985
  return (_a = route.name) == null ? void 0 : _a.includes("rapor");
1988
1986
  });
1989
- vue.onMounted(() => {
1987
+ vue.watch(isNew, setDefaultValues, { immediate: true });
1988
+ async function setDefaultValues() {
1990
1989
  var _a, _b, _c;
1991
- console.log("idnya?", id.value);
1992
- if (id.value === "new" && isOperasional) {
1993
- values.value.staffId = (_a = staff.value) == null ? void 0 : _a.id;
1994
- values.value.staff = {
1995
- id: (_b = staff.value) == null ? void 0 : _b.id,
1996
- display: (_c = staff.value) == null ? void 0 : _c.display
1997
- };
1998
- values.value.checkInAt = (/* @__PURE__ */ new Date()).toISOString();
1999
- values.value.type = "checkpoint";
2000
- } else {
2001
- values.value.checkInAt = (/* @__PURE__ */ new Date()).toISOString();
2002
- }
2003
- });
1990
+ if (!isNew.value)
1991
+ return;
1992
+ await promise.PromiseUtil.wait(500);
1993
+ const defaultValues = {
1994
+ staffId: (_a = staff.value) == null ? void 0 : _a.id,
1995
+ staff: { id: (_b = staff.value) == null ? void 0 : _b.id, flag: (_c = staff.value) == null ? void 0 : _c.flag },
1996
+ checkInAt: (/* @__PURE__ */ new Date()).toISOString(),
1997
+ type: "checkpoint"
1998
+ };
1999
+ values.value = defaultValues;
2000
+ }
2004
2001
  return (_ctx, _cache) => {
2005
2002
  return vue.openBlock(), vue.createBlock(vue.unref(context.NeonSingle), { class: "neu-checkIn-single" }, {
2006
2003
  default: vue.withCtx(() => [
@@ -2070,8 +2067,8 @@ const _sfc_main$V = /* @__PURE__ */ vue.defineComponent({
2070
2067
  };
2071
2068
  }
2072
2069
  });
2073
- const CheckInExternal_vue_vue_type_style_index_0_scoped_4f96baca_lang = "";
2074
- const CheckInExternal = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["__scopeId", "data-v-4f96baca"]]);
2070
+ const CheckInExternal_vue_vue_type_style_index_0_scoped_aeda12b0_lang = "";
2071
+ const CheckInExternal = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["__scopeId", "data-v-aeda12b0"]]);
2075
2072
  const _withScopeId$1 = (n) => (vue.pushScopeId("data-v-d6ac1ebc"), n = n(), vue.popScopeId(), n);
2076
2073
  const _hoisted_1$g = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ vue.createElementVNode("h4", { align: "center" }, "Aktifkan kamera untuk scan QR Code", -1));
2077
2074
  const _hoisted_2$b = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ vue.createElementVNode("p", { align: "center" }, [
package/build/index.mjs CHANGED
@@ -24,13 +24,13 @@ import { useAuthStore, IdentitasConnect, IdentitasAssistRegistration, IdentitasD
24
24
  import { useRouter, useRoute } from "vue-router";
25
25
  import Scanner from "qr-scanner";
26
26
  import mitt from "mitt";
27
+ import { PromiseUtil } from "@neon.id/utils/promise";
27
28
  import { RowUtil } from "@neon.id/display";
28
29
  import { models as models$2 } from "@neon.id/identitas-models";
29
30
  import { Field } from "@neon.id/model";
30
31
  import { withRelation, NeonRelationSheet } from "@neon.id/relation";
31
32
  import { CodeUtil } from "@neon.id/utils/code";
32
33
  import { CatatPaperPad, CatatSketchPad } from "@neon.id/catat-interfaces";
33
- import { PromiseUtil } from "@neon.id/utils/promise";
34
34
  const AttendanceModel = models.AttendanceModel;
35
35
  const _sfc_main$11 = /* @__PURE__ */ defineComponent({
36
36
  ...{
@@ -1516,7 +1516,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
1516
1516
  const AttendanceSupervisor_vue_vue_type_style_index_0_scoped_07f6564f_lang = "";
1517
1517
  const AttendanceSupervisor = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-07f6564f"]]);
1518
1518
  const CheckInModel = models$1.CheckInModel;
1519
- const _withScopeId$2 = (n) => (pushScopeId("data-v-8637aebc"), n = n(), popScopeId(), n);
1519
+ const _withScopeId$2 = (n) => (pushScopeId("data-v-7782d75c"), n = n(), popScopeId(), n);
1520
1520
  const _hoisted_1$j = { id: "view-checkIns" };
1521
1521
  const _hoisted_2$c = { class: "summary" };
1522
1522
  const _hoisted_3$4 = { class: "wrapper" };
@@ -1723,7 +1723,6 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
1723
1723
  default: withCtx(() => [
1724
1724
  createVNode(unref(NeonStat), {
1725
1725
  label: "Checkpoint",
1726
- icon: "barcode-read",
1727
1726
  onClick: onPresenceCheckpoint
1728
1727
  }, {
1729
1728
  default: withCtx(() => [
@@ -1753,7 +1752,6 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
1753
1752
  default: withCtx(() => [
1754
1753
  createVNode(unref(NeonStat), {
1755
1754
  label: "Pulang",
1756
- icon: "barcode-read",
1757
1755
  onClick: onPresenceHome
1758
1756
  }, {
1759
1757
  default: withCtx(() => [
@@ -1861,8 +1859,8 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
1861
1859
  };
1862
1860
  }
1863
1861
  });
1864
- const CheckInPresenceCollection_vue_vue_type_style_index_0_scoped_8637aebc_lang = "";
1865
- const CheckInPresenceCollection = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["__scopeId", "data-v-8637aebc"]]);
1862
+ const CheckInPresenceCollection_vue_vue_type_style_index_0_scoped_7782d75c_lang = "";
1863
+ const CheckInPresenceCollection = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["__scopeId", "data-v-7782d75c"]]);
1866
1864
  const _hoisted_1$i = { class: "grid gap-4 sm:grid-cols-2" };
1867
1865
  const _sfc_main$W = /* @__PURE__ */ defineComponent({
1868
1866
  __name: "CheckInSingle",
@@ -1980,25 +1978,24 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
1980
1978
  const route = useRoute();
1981
1979
  const permit = usePermit();
1982
1980
  const { staff } = useOperasional();
1983
- const isOperasional = computed(() => {
1981
+ computed(() => {
1984
1982
  var _a;
1985
1983
  return (_a = route.name) == null ? void 0 : _a.includes("rapor");
1986
1984
  });
1987
- onMounted(() => {
1985
+ watch(isNew, setDefaultValues, { immediate: true });
1986
+ async function setDefaultValues() {
1988
1987
  var _a, _b, _c;
1989
- console.log("idnya?", id.value);
1990
- if (id.value === "new" && isOperasional) {
1991
- values.value.staffId = (_a = staff.value) == null ? void 0 : _a.id;
1992
- values.value.staff = {
1993
- id: (_b = staff.value) == null ? void 0 : _b.id,
1994
- display: (_c = staff.value) == null ? void 0 : _c.display
1995
- };
1996
- values.value.checkInAt = (/* @__PURE__ */ new Date()).toISOString();
1997
- values.value.type = "checkpoint";
1998
- } else {
1999
- values.value.checkInAt = (/* @__PURE__ */ new Date()).toISOString();
2000
- }
2001
- });
1988
+ if (!isNew.value)
1989
+ return;
1990
+ await PromiseUtil.wait(500);
1991
+ const defaultValues = {
1992
+ staffId: (_a = staff.value) == null ? void 0 : _a.id,
1993
+ staff: { id: (_b = staff.value) == null ? void 0 : _b.id, flag: (_c = staff.value) == null ? void 0 : _c.flag },
1994
+ checkInAt: (/* @__PURE__ */ new Date()).toISOString(),
1995
+ type: "checkpoint"
1996
+ };
1997
+ values.value = defaultValues;
1998
+ }
2002
1999
  return (_ctx, _cache) => {
2003
2000
  return openBlock(), createBlock(unref(NeonSingle), { class: "neu-checkIn-single" }, {
2004
2001
  default: withCtx(() => [
@@ -2068,8 +2065,8 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
2068
2065
  };
2069
2066
  }
2070
2067
  });
2071
- const CheckInExternal_vue_vue_type_style_index_0_scoped_4f96baca_lang = "";
2072
- const CheckInExternal = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["__scopeId", "data-v-4f96baca"]]);
2068
+ const CheckInExternal_vue_vue_type_style_index_0_scoped_aeda12b0_lang = "";
2069
+ const CheckInExternal = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["__scopeId", "data-v-aeda12b0"]]);
2073
2070
  const _withScopeId$1 = (n) => (pushScopeId("data-v-d6ac1ebc"), n = n(), popScopeId(), n);
2074
2071
  const _hoisted_1$g = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("h4", { align: "center" }, "Aktifkan kamera untuk scan QR Code", -1));
2075
2072
  const _hoisted_2$b = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("p", { align: "center" }, [
package/build/nuxt.json CHANGED
@@ -4,5 +4,5 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0"
6
6
  },
7
- "version": "1.9.5"
7
+ "version": "1.9.7"
8
8
  }
package/build/style.css CHANGED
@@ -81,15 +81,15 @@
81
81
  display: block
82
82
  }
83
83
 
84
- #view-checkIns[data-v-8637aebc] {
84
+ #view-checkIns[data-v-7782d75c] {
85
85
 
86
86
  height: 100%
87
87
  }
88
- #view-checkIns .wrapper[data-v-8637aebc] {
88
+ #view-checkIns .wrapper[data-v-7782d75c] {
89
89
 
90
90
  height: 100%
91
91
  }
92
- #view-checkIns .header[data-v-8637aebc] {
92
+ #view-checkIns .header[data-v-7782d75c] {
93
93
 
94
94
  display: flex;
95
95
 
@@ -105,15 +105,15 @@
105
105
 
106
106
  padding-bottom: 0.5rem
107
107
  }
108
- #view-checkIns .header .start[data-v-8637aebc] {
108
+ #view-checkIns .header .start[data-v-7782d75c] {
109
109
 
110
110
  line-height: 1.25
111
111
  }
112
- #view-checkIns .header .title[data-v-8637aebc] {
112
+ #view-checkIns .header .title[data-v-7782d75c] {
113
113
 
114
114
  font-weight: 700
115
115
  }
116
- #view-checkIns .header .description[data-v-8637aebc] {
116
+ #view-checkIns .header .description[data-v-7782d75c] {
117
117
 
118
118
  font-size: 0.875rem;
119
119
 
@@ -121,13 +121,13 @@
121
121
 
122
122
  color: rgb(161 161 170 / var(--tw-text-opacity))
123
123
  }
124
- #view-checkIns .buttons[data-v-8637aebc] {
124
+ #view-checkIns .buttons[data-v-7782d75c] {
125
125
 
126
126
  display: flex;
127
127
 
128
128
  align-items: center
129
129
  }
130
- #view-checkIns .buttons[data-v-8637aebc] > :not([hidden]) ~ :not([hidden]) {
130
+ #view-checkIns .buttons[data-v-7782d75c] > :not([hidden]) ~ :not([hidden]) {
131
131
 
132
132
  --tw-space-x-reverse: 0;
133
133
 
@@ -135,11 +135,11 @@
135
135
 
136
136
  margin-left: calc(0.25rem * calc(1 - var(--tw-space-x-reverse)))
137
137
  }
138
- #view-checkIns .buttons[data-v-8637aebc] {
138
+ #view-checkIns .buttons[data-v-7782d75c] {
139
139
 
140
140
  padding-right: 0.25rem
141
141
  }
142
- #view-checkIns .summary[data-v-8637aebc] {
142
+ #view-checkIns .summary[data-v-7782d75c] {
143
143
 
144
144
  padding-bottom: 0.5rem
145
145
  }
@@ -148,7 +148,7 @@
148
148
  display: block
149
149
  }
150
150
 
151
- .neu-checkIn-single[data-v-4f96baca] {
151
+ .neu-checkIn-single[data-v-aeda12b0] {
152
152
  display: block
153
153
  }
154
154
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neutron.co.id/operasional-interfaces",
3
- "version": "1.9.5",
3
+ "version": "1.9.7",
4
4
  "description": "Interface library of Neutron Operasional.",
5
5
  "sideEffects": [
6
6
  "*.css"
@@ -143,5 +143,5 @@
143
143
  "publishConfig": {
144
144
  "access": "public"
145
145
  },
146
- "build": 126
146
+ "build": 128
147
147
  }