@neutron.co.id/operasional-interfaces 1.16.1-beta.1 → 1.16.1-beta.3

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.
@@ -82,14 +82,17 @@ export function useImportShift() {
82
82
  formData.append("file", upload.file, upload.file.name || "shift.csv");
83
83
  try {
84
84
  isLoading.value = true;
85
- const response = await ofetch(`${store.officeApiUrl}/importData`, {
86
- method: "POST",
87
- headers: {
88
- "X-Neon-Key": "CH7JLKT6MW",
89
- Authorization: `Bearer ${authStore.accessToken}`
90
- },
91
- body: formData
92
- });
85
+ const response = await ofetch(
86
+ `${store.officeApiUrl}/importDataShift`,
87
+ {
88
+ method: "POST",
89
+ headers: {
90
+ "X-Neon-Key": "CH7JLKT6MW",
91
+ Authorization: `Bearer ${authStore.accessToken}`
92
+ },
93
+ body: formData
94
+ }
95
+ );
93
96
  console.log("response:", response);
94
97
  toast.push({
95
98
  content: "Data shifting berhasil diimport.",
@@ -1,7 +1,7 @@
1
1
  export declare const useOperasionalOfficeStore: import("pinia").StoreDefinition<"neu:operasional:office:store", import("pinia")._UnwrapAll<Pick<{
2
- officeApiUrl: import("vue").Ref<string | undefined>;
2
+ officeApiUrl: import("vue").Ref<string>;
3
3
  }, "officeApiUrl">>, Pick<{
4
- officeApiUrl: import("vue").Ref<string | undefined>;
4
+ officeApiUrl: import("vue").Ref<string>;
5
5
  }, never>, Pick<{
6
- officeApiUrl: import("vue").Ref<string | undefined>;
6
+ officeApiUrl: import("vue").Ref<string>;
7
7
  }, never>>;
@@ -3,7 +3,9 @@ import { ref } from "vue";
3
3
  export const useOperasionalOfficeStore = defineStore(
4
4
  "neu:operasional:office:store",
5
5
  () => {
6
- const officeApiUrl = ref();
6
+ const officeApiUrl = ref(
7
+ process.env.APP_ENVIRONMENT === "prod" ? "https://api.office.operasional.neutron.neon.id" : process.env.APP_ENVIRONMENT === "dev" ? "https://dev.api.office.operasional.neutron.neon.id" : process.env.NEU_OPERASIONAL_OFFICE_API_URL
8
+ );
7
9
  return {
8
10
  officeApiUrl
9
11
  };
@@ -1,7 +1,7 @@
1
1
  export declare const useOperasionalOfficeStore: import("pinia").StoreDefinition<"neu:operasional:office:store", import("pinia")._UnwrapAll<Pick<{
2
- officeApiUrl: import("vue").Ref<string | undefined>;
2
+ officeApiUrl: import("vue").Ref<string>;
3
3
  }, "officeApiUrl">>, Pick<{
4
- officeApiUrl: import("vue").Ref<string | undefined>;
4
+ officeApiUrl: import("vue").Ref<string>;
5
5
  }, never>, Pick<{
6
- officeApiUrl: import("vue").Ref<string | undefined>;
6
+ officeApiUrl: import("vue").Ref<string>;
7
7
  }, never>>;
@@ -12776,7 +12776,9 @@ const Papa = /* @__PURE__ */ getDefaultExportFromCjs(papaparse_minExports);
12776
12776
  const useOperasionalOfficeStore = pinia.defineStore(
12777
12777
  "neu:operasional:office:store",
12778
12778
  () => {
12779
- const officeApiUrl = vue.ref();
12779
+ const officeApiUrl = vue.ref(
12780
+ process.env.APP_ENVIRONMENT === "prod" ? "https://api.office.operasional.neutron.neon.id" : process.env.APP_ENVIRONMENT === "dev" ? "https://dev.api.office.operasional.neutron.neon.id" : process.env.NEU_OPERASIONAL_OFFICE_API_URL
12781
+ );
12780
12782
  return {
12781
12783
  officeApiUrl
12782
12784
  };
@@ -12860,14 +12862,17 @@ function useImportShift() {
12860
12862
  formData.append("file", upload.file, upload.file.name || "shift.csv");
12861
12863
  try {
12862
12864
  isLoading.value = true;
12863
- const response = await ofetch(`${store.officeApiUrl}/importData`, {
12864
- method: "POST",
12865
- headers: {
12866
- "X-Neon-Key": "CH7JLKT6MW",
12867
- Authorization: `Bearer ${authStore.accessToken}`
12868
- },
12869
- body: formData
12870
- });
12865
+ const response = await ofetch(
12866
+ `${store.officeApiUrl}/importDataShift`,
12867
+ {
12868
+ method: "POST",
12869
+ headers: {
12870
+ "X-Neon-Key": "CH7JLKT6MW",
12871
+ Authorization: `Bearer ${authStore.accessToken}`
12872
+ },
12873
+ body: formData
12874
+ }
12875
+ );
12871
12876
  console.log("response:", response);
12872
12877
  toast.push({
12873
12878
  content: "Data shifting berhasil diimport.",
@@ -12757,7 +12757,9 @@ const Papa = /* @__PURE__ */ getDefaultExportFromCjs(papaparse_minExports);
12757
12757
  const useOperasionalOfficeStore = defineStore(
12758
12758
  "neu:operasional:office:store",
12759
12759
  () => {
12760
- const officeApiUrl = ref();
12760
+ const officeApiUrl = ref(
12761
+ process.env.APP_ENVIRONMENT === "prod" ? "https://api.office.operasional.neutron.neon.id" : process.env.APP_ENVIRONMENT === "dev" ? "https://dev.api.office.operasional.neutron.neon.id" : process.env.NEU_OPERASIONAL_OFFICE_API_URL
12762
+ );
12761
12763
  return {
12762
12764
  officeApiUrl
12763
12765
  };
@@ -12841,14 +12843,17 @@ function useImportShift() {
12841
12843
  formData.append("file", upload.file, upload.file.name || "shift.csv");
12842
12844
  try {
12843
12845
  isLoading.value = true;
12844
- const response = await ofetch(`${store.officeApiUrl}/importData`, {
12845
- method: "POST",
12846
- headers: {
12847
- "X-Neon-Key": "CH7JLKT6MW",
12848
- Authorization: `Bearer ${authStore.accessToken}`
12849
- },
12850
- body: formData
12851
- });
12846
+ const response = await ofetch(
12847
+ `${store.officeApiUrl}/importDataShift`,
12848
+ {
12849
+ method: "POST",
12850
+ headers: {
12851
+ "X-Neon-Key": "CH7JLKT6MW",
12852
+ Authorization: `Bearer ${authStore.accessToken}`
12853
+ },
12854
+ body: formData
12855
+ }
12856
+ );
12852
12857
  console.log("response:", response);
12853
12858
  toast.push({
12854
12859
  content: "Data shifting berhasil diimport.",
package/build/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0"
6
6
  },
7
- "version": "1.16.1-beta.1",
7
+ "version": "1.16.1-beta.3",
8
8
  "builder": {
9
9
  "@neon.id/module-builder": "1.8.0",
10
10
  "unbuild": "2.0.0"
package/build/nuxt.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0"
6
6
  },
7
- "version": "1.16.1-beta.1",
7
+ "version": "1.16.1-beta.3",
8
8
  "builder": {
9
9
  "@neon.id/module-builder": "1.8.0",
10
10
  "unbuild": "2.0.0"
package/build/nuxt.mjs CHANGED
@@ -208,8 +208,8 @@ function setupConfig(options) {
208
208
  isDebug: false,
209
209
  isProd: env === "prod",
210
210
  mode: options.mode || "office",
211
- office: {},
212
- officeApiUrl: process.env.NEU_OPERASIONAL_OFFICE_API_URL
211
+ office: {}
212
+ // officeApiUrl: process.env.NEU_OPERASIONAL_OFFICE_API_URL as string,
213
213
  });
214
214
  const key = "neu:operasional:interfaces";
215
215
  nuxt.options.runtimeConfig[key] = config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neutron.co.id/operasional-interfaces",
3
- "version": "1.16.1-beta.1",
3
+ "version": "1.16.1-beta.3",
4
4
  "description": "Interface library of Neutron Operasional.",
5
5
  "sideEffects": [
6
6
  "*.css"
@@ -78,8 +78,8 @@
78
78
  "@neon.id/nuxt": "^1.5.0",
79
79
  "@neon.id/office": "1.46.0",
80
80
  "@neon.id/utils": "^1.51.0",
81
- "@neutron.co.id/operasional-modules": "1.12.12",
82
- "@neutron.co.id/personalia-models": "1.13.7",
81
+ "@neutron.co.id/operasional-modules": "1.12.13-beta.1",
82
+ "@neutron.co.id/personalia-models": "1.13.8-beta.1",
83
83
  "@nuxt/kit": "^3.12.3",
84
84
  "file-saver": "^2.0.5",
85
85
  "papaparse": "5.4.1",
@@ -153,8 +153,8 @@
153
153
  "@neon.id/nuxt": "^1.5.0",
154
154
  "@neon.id/office": "1.46.0",
155
155
  "@neon.id/utils": "^1.51.0",
156
- "@neutron.co.id/operasional-modules": "1.12.12",
157
- "@neutron.co.id/personalia-models": "1.13.7",
156
+ "@neutron.co.id/operasional-modules": "1.12.13-beta.1",
157
+ "@neutron.co.id/personalia-models": "1.13.8-beta.1",
158
158
  "@nuxt/kit": "^3.12.3",
159
159
  "file-saver": "^2.0.5",
160
160
  "qr-scanner": "^1.4.2",
@@ -164,5 +164,5 @@
164
164
  "publishConfig": {
165
165
  "access": "public"
166
166
  },
167
- "build": 171
167
+ "build": 173
168
168
  }