parent
685d14a7df
commit
01913a739f
|
@ -1,3 +1,5 @@
|
|||
VITE_APP_MODE=production
|
||||
VITE_BASE_API_URL=http://103.187.147.241:30050/api
|
||||
VITE_BASE_API_REPORT_URL=http://103.187.147.241:30050/api
|
||||
|
||||
VITE_BASE_API_URL_LOCAL=https://api.sky.eigen.co.id/api
|
|
@ -1,3 +1,5 @@
|
|||
VITE_APP_MODE=production
|
||||
VITE_BASE_API_URL=https://api.sky.eigen.co.id/api
|
||||
VITE_BASE_API_REPORT_URL=https://api.sky.eigen.co.id/api
|
||||
|
||||
VITE_BASE_API_URL_LOCAL=https://api.sky.eigen.co.id/api
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
VITE_APP_MODE=production
|
||||
VITE_BASE_API_URL=http://172.16.2.101:30050/api
|
||||
VITE_BASE_API_REPORT_URL=http://172.16.2.101:30050/api
|
||||
|
||||
VITE_BASE_API_URL_LOCAL=http://172.16.2.101:30050/api
|
|
@ -1,3 +1,5 @@
|
|||
VITE_APP_MODE=production
|
||||
VITE_BASE_API_URL=https://api.office.weplayground.id/api
|
||||
VITE_BASE_API_REPORT_URL=https://api.office.weplayground.id/api
|
||||
|
||||
VITE_BASE_API_URL_LOCAL=https://api.office.weplayground.id/api
|
|
@ -1,7 +1,7 @@
|
|||
import axios from 'axios';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { App, Button, Col, InputNumber, InputNumberProps, Modal, ModalProps, Row, Slider } from 'antd';
|
||||
import { API_URL } from '@pos/base';
|
||||
import { API_URL, BASE_API_URL_LOCAL } from '@pos/base';
|
||||
|
||||
export default function LocalDataConfiguration(modalProps: ModalProps) {
|
||||
const { modal, notification } = App.useApp();
|
||||
|
@ -27,7 +27,7 @@ export default function LocalDataConfiguration(modalProps: ModalProps) {
|
|||
async function handleSave(value: number) {
|
||||
setLoadingSave(true);
|
||||
await axios
|
||||
.put(API_URL.EDIT_TRANSACTION_SETTING, { id: configData?.id, value })
|
||||
.put(API_URL.EDIT_TRANSACTION_SETTING, { id: configData?.id, value }, { baseURL: BASE_API_URL_LOCAL })
|
||||
.then(() => {
|
||||
notification.success({
|
||||
message: 'Sukses',
|
||||
|
@ -50,7 +50,7 @@ export default function LocalDataConfiguration(modalProps: ModalProps) {
|
|||
async function handleGetData() {
|
||||
setLoadingGet(true);
|
||||
await axios
|
||||
.get(API_URL.GET_TRANSACTION_SETTING)
|
||||
.get(API_URL.GET_TRANSACTION_SETTING, { baseURL: BASE_API_URL_LOCAL })
|
||||
.then((res) => {
|
||||
const data = res.data.data;
|
||||
const respValue = data?.value;
|
||||
|
|
|
@ -8,3 +8,5 @@ export const EMBED_DASHBOARD_ID = import.meta.env.VITE_EMBED_DASHBOARD_ID;
|
|||
export const DOWLOAD_POS_WINDOWS_URL = import.meta.env.VITE_DOWLOAD_POS_WINDOWS_URL;
|
||||
export const DOWLOAD_POS_LINUX_DEB_URL = import.meta.env.VITE_DOWLOAD_POS_LINUX_DEB_URL;
|
||||
export const DOWLOAD_POS_LINUX_SNAP_URL = import.meta.env.VITE_DOWLOAD_POS_LINUX_SNAP_URL;
|
||||
|
||||
export const BASE_API_URL_LOCAL = import.meta.env.VITE_BASE_API_URL_LOCAL;
|
||||
|
|
Loading…
Reference in New Issue