mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 21:38:13 +00:00
Zmienne środowiskowe dla środowiska dev
This commit is contained in:
Generated
+3
-3
@@ -1,12 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "stacjownik",
|
"name": "stacjownik",
|
||||||
"version": "1.6.8",
|
"version": "1.8.5",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "stacjownik",
|
"version": "1.8.5",
|
||||||
"version": "1.6.8",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"core-js": "^3.12.1",
|
"core-js": "^3.12.1",
|
||||||
"dotenv": "^8.6.0",
|
"dotenv": "^8.6.0",
|
||||||
@@ -21,6 +20,7 @@
|
|||||||
"vuex": "^4.0.0-0"
|
"vuex": "^4.0.0-0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@types/node": "^17.0.35",
|
||||||
"@vue/cli-plugin-babel": "^5.0.4",
|
"@vue/cli-plugin-babel": "^5.0.4",
|
||||||
"@vue/cli-plugin-router": "^5.0.4",
|
"@vue/cli-plugin-router": "^5.0.4",
|
||||||
"@vue/cli-plugin-typescript": "^5.0.4",
|
"@vue/cli-plugin-typescript": "^5.0.4",
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
"vuex": "^4.0.0-0"
|
"vuex": "^4.0.0-0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@types/node": "^17.0.35",
|
||||||
"@vue/cli-plugin-babel": "^5.0.4",
|
"@vue/cli-plugin-babel": "^5.0.4",
|
||||||
"@vue/cli-plugin-router": "^5.0.4",
|
"@vue/cli-plugin-router": "^5.0.4",
|
||||||
"@vue/cli-plugin-typescript": "^5.0.4",
|
"@vue/cli-plugin-typescript": "^5.0.4",
|
||||||
|
|||||||
@@ -100,8 +100,7 @@ import JournalOptions from '@/components/JournalView/JournalOptions.vue';
|
|||||||
|
|
||||||
import { URLs } from '@/scripts/utils/apiURLs';
|
import { URLs } from '@/scripts/utils/apiURLs';
|
||||||
|
|
||||||
const DEV_MODE = false;
|
const PROD_MODE = process.env.VUE_APP_JORUNAL_DISPATCHERS_DEV != "1" || process.env.NODE_ENV === 'production';
|
||||||
const PROD_MODE = !DEV_MODE || process.env.NODE_ENV === 'production';
|
|
||||||
|
|
||||||
const DISPATCHERS_API_URL = (PROD_MODE ? `${URLs.stacjownikAPI}/api` : 'http://localhost:3001/api') + '/getDispatchers';
|
const DISPATCHERS_API_URL = (PROD_MODE ? `${URLs.stacjownikAPI}/api` : 'http://localhost:3001/api') + '/getDispatchers';
|
||||||
|
|
||||||
|
|||||||
@@ -158,10 +158,9 @@ import { URLs } from '@/scripts/utils/apiURLs';
|
|||||||
import { journalTimetableFilters } from '@/data/journalFilters';
|
import { journalTimetableFilters } from '@/data/journalFilters';
|
||||||
import { JournalFilterType } from '@/scripts/enums/JournalFilterType';
|
import { JournalFilterType } from '@/scripts/enums/JournalFilterType';
|
||||||
|
|
||||||
const DEV_MODE = true;
|
const PROD_MODE = process.env.VUE_APP_JOURNAL_TIMETABLES_DEV != "1" || process.env.NODE_ENV === "production";
|
||||||
const PROD_MODE = !DEV_MODE || process.env.NODE_ENV === "production";
|
|
||||||
|
|
||||||
const API_URL = PROD_MODE ? `${URLs.stacjownikAPI}/api/getTimetables` : 'http://localhost:3001/api/getTimetables';
|
const TIMETABLES_API_URL = PROD_MODE ? `${URLs.stacjownikAPI}/api/getTimetables` : 'http://localhost:3001/api/getTimetables';
|
||||||
|
|
||||||
interface APIResponse {
|
interface APIResponse {
|
||||||
errorMessage: string | null;
|
errorMessage: string | null;
|
||||||
@@ -317,7 +316,7 @@ export default defineComponent({
|
|||||||
const countFrom = this.historyList.length;
|
const countFrom = this.historyList.length;
|
||||||
|
|
||||||
const responseData: APIResponse | null = await (
|
const responseData: APIResponse | null = await (
|
||||||
await axios.get(`${API_URL}?${this.currentQuery}&countFrom=${countFrom}`)
|
await axios.get(`${TIMETABLES_API_URL}?${this.currentQuery}&countFrom=${countFrom}`)
|
||||||
).data;
|
).data;
|
||||||
|
|
||||||
console.log('Loading...');
|
console.log('Loading...');
|
||||||
@@ -377,7 +376,7 @@ export default defineComponent({
|
|||||||
this.currentQuery = queries.join('&');
|
this.currentQuery = queries.join('&');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const responseData: APIResponse | null = await (await axios.get(`${API_URL}?${this.currentQuery}`)).data;
|
const responseData: APIResponse | null = await (await axios.get(`${TIMETABLES_API_URL}?${this.currentQuery}`)).data;
|
||||||
|
|
||||||
if (!responseData) {
|
if (!responseData) {
|
||||||
this.historyDataStatus.status = DataStatus.Error;
|
this.historyDataStatus.status = DataStatus.Error;
|
||||||
|
|||||||
Reference in New Issue
Block a user