From 099b3f08fa7e784e03477fd30a739ee0855c4d63 Mon Sep 17 00:00:00 2001 From: Pritimay Sarkar Date: Tue, 12 Dec 2023 22:12:26 +0530 Subject: [PATCH] add dev web app --- .firebaserc | 3 +++ README.md | 2 +- firebase.json | 2 +- src/components/Accuracy.js | 2 +- src/components/ExportData.js | 2 +- src/components/Registration.js | 4 ++-- src/components/nav/Topbar.js | 2 +- src/firebase.js | 40 +++++++++++++++++----------------- 8 files changed, 30 insertions(+), 27 deletions(-) diff --git a/.firebaserc b/.firebaserc index a78ff03..dc10c99 100644 --- a/.firebaserc +++ b/.firebaserc @@ -10,6 +10,9 @@ ], "qa": [ "hpos-qa" + ], + "dev": [ + "hpos-dev" ] } } diff --git a/README.md b/README.md index ca0fb69..c777ea0 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,6 @@ ### deploy - firebase deploy --only hosting:dev1 + firebase deploy --only hosting:dev pyinstaller --noconfirm --noconsole -i "smi.ico" --windowed --clean hemocube.py diff --git a/firebase.json b/firebase.json index ea808ec..c219f3b 100644 --- a/firebase.json +++ b/firebase.json @@ -1,6 +1,6 @@ { "hosting": { - "target": "qa", + "target": "dev", "public": "build", "ignore": [ "firebase.json", diff --git a/src/components/Accuracy.js b/src/components/Accuracy.js index 54a4696..db5c3b9 100644 --- a/src/components/Accuracy.js +++ b/src/components/Accuracy.js @@ -34,7 +34,7 @@ function Accuracy({ show }) { 'YYYY-MM-DD' )}&end_date=${moment(endDate).format('YYYY-MM-DD')}`; - const url = `https://asia-south1-hpos-qa.cloudfunctions.net/performance?${queryString}`; + const url = `https://asia-south1-hpos-af3cc.cloudfunctions.net/performance?${queryString}`; // Make a POST request using the Fetch API const response = await fetch(url, { diff --git a/src/components/ExportData.js b/src/components/ExportData.js index bc0a4d5..c871169 100644 --- a/src/components/ExportData.js +++ b/src/components/ExportData.js @@ -11,7 +11,7 @@ function ExportData({ url, show }) { const [endDate, setEndDate] = useState(""); const fetchFile = (start_date, end_date) => { - window.location.href = `https://asia-south1-hpos-qa.cloudfunctions.net/consolidation?start_date=${moment(startDate).format("YYYY-MM-DD")}&end_date=${moment(endDate).format("YYYY-MM-DD")}`; + window.location.href = `https://asia-south1-hpos-af3cc.cloudfunctions.net/consolidation?start_date=${moment(startDate).format("YYYY-MM-DD")}&end_date=${moment(endDate).format("YYYY-MM-DD")}`; } return ( diff --git a/src/components/Registration.js b/src/components/Registration.js index f6abe73..ccbb1cc 100644 --- a/src/components/Registration.js +++ b/src/components/Registration.js @@ -16,7 +16,7 @@ function Registration() { setCounter(counter + 1); axios({ method: 'post', - url: "https://asia-south1-hpos-qa.cloudfunctions.net/registerUser", + url: "https://asia-south1-hpos-af3cc.cloudfunctions.net/registerUser", data: { "_id": id, "aadharId": "2808202300001", @@ -65,7 +65,7 @@ function Registration() { setMessage(""); axios({ method: 'get', - url: "https://asia-south1-hpos-qa.cloudfunctions.net/clearUsers", + url: "https://asia-south1-hpos-af3cc.cloudfunctions.net/clearUsers", withCredentials: false, secure: false, headers: { diff --git a/src/components/nav/Topbar.js b/src/components/nav/Topbar.js index dee399b..6b5433a 100644 --- a/src/components/nav/Topbar.js +++ b/src/components/nav/Topbar.js @@ -16,7 +16,7 @@ const Topbar = () => { > - HPOS Web - Quality / QA + HPOS Web - Dev diff --git a/src/firebase.js b/src/firebase.js index 5b5de26..6a1dce0 100644 --- a/src/firebase.js +++ b/src/firebase.js @@ -3,27 +3,27 @@ import { getFirestore} from "firebase/firestore"; import { initializeApp } from "firebase/app"; import { getAnalytics } from "firebase/analytics"; -// /* dev and test */ -// const firebaseConfig = { -// apiKey: "AIzaSyBFl_YkJ5PMIvMY3G70313SyrqemjFnUv8", -// authDomain: "hpos-af3cc.firebaseapp.com", -// projectId: "hpos-af3cc", -// storageBucket: "hpos-af3cc.appspot.com", -// messagingSenderId: "650071678820", -// appId: "1:650071678820:web:ce50538bf46632d46c6471", -// measurementId: "G-6JHQ47S9DD" -// }; - -/* qa: hpos-qa */ +/* dev and test */ const firebaseConfig = { - apiKey: "AIzaSyCF7BNZ5vOMQIpKRi_vxquzWP5pIjcb59I", - authDomain: "hpos-qa.firebaseapp.com", - projectId: "hpos-qa", - storageBucket: "hpos-qa.appspot.com", - messagingSenderId: "1004619739289", - appId: "1:1004619739289:web:c3ee0c0127f0d073e5c808", - measurementId: "G-4MSTJHE64W" -}; + apiKey: "AIzaSyBFl_YkJ5PMIvMY3G70313SyrqemjFnUv8", + authDomain: "hpos-af3cc.firebaseapp.com", + projectId: "hpos-af3cc", + storageBucket: "hpos-af3cc.appspot.com", + messagingSenderId: "650071678820", + appId: "1:650071678820:web:ce50538bf46632d46c6471", + measurementId: "G-6JHQ47S9DD" + }; + +// /* qa: hpos-qa */ +// const firebaseConfig = { +// apiKey: "AIzaSyCF7BNZ5vOMQIpKRi_vxquzWP5pIjcb59I", +// authDomain: "hpos-qa.firebaseapp.com", +// projectId: "hpos-qa", +// storageBucket: "hpos-qa.appspot.com", +// messagingSenderId: "1004619739289", +// appId: "1:1004619739289:web:c3ee0c0127f0d073e5c808", +// measurementId: "G-4MSTJHE64W" +// }; // /* preprod */