Skip to content

Commit

Permalink
spajanjeMerge branch 'playground/devops' of https://github.com/milomi…
Browse files Browse the repository at this point in the history
…lo33/mrs-isa-projekat into playground/devops
  • Loading branch information
draganaF committed Jun 15, 2021
2 parents 76bff2c + b06b8bd commit d3abbad
Show file tree
Hide file tree
Showing 27 changed files with 94 additions and 95 deletions.
7 changes: 3 additions & 4 deletions src/main/ui/vue/src/components/PharmacistTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export default defineComponent({
{ key: "email", sortable: true, label: "Email" },
{ key: "rating", sortable: true, label: "Rating" },
"info",
{ key: "update", label: "Edit" },
"delete",
],
sortBy: "name",
Expand Down Expand Up @@ -66,7 +65,7 @@ export default defineComponent({
).sub;
var self = this;
self.axios
.get(`/api/pharmacyAdmin/` + AdminUsername, {
.get(process.env.VUE_APP_API_URL + `/pharmacyAdmin/` + AdminUsername, {
headers: {
Authorization: "Bearer " + localStorage.getItem("token"),
},
Expand All @@ -83,7 +82,7 @@ export default defineComponent({
GetPharmacists() {
var self = this;
self.axios
.get(`/api/pharmacy/pharmacists/` + parseInt(self.pharmacyId), {
.get(process.env.VUE_APP_API_URL + `/pharmacy/pharmacists/` + parseInt(self.pharmacyId), {
headers: {
Authorization: "Bearer " + localStorage.getItem("token"),
},
Expand Down Expand Up @@ -120,7 +119,7 @@ export default defineComponent({
DeleteOne(item, button) {
var self = this;
self.axios
.delete(`/api/pharmacist/` + item.email, {
.delete(process.env.VUE_APP_API_URL + `/pharmacist/` + item.email, {
headers: {
Authorization: "Bearer " + localStorage.getItem("token"),
},
Expand Down
4 changes: 2 additions & 2 deletions src/main/ui/vue/src/components/PharmacyAdminRegistration.vue
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
export default {
name: "PharmacyAdminRegistration",
mounted() {
this.axios.get(`/api/pharmacy`,{
this.axios.get(process.env.VUE_APP_API_URL + `/pharmacy`,{
headers: {Authorization: "Bearer " + localStorage.getItem('token')}
})
.then(response => {
Expand Down Expand Up @@ -259,7 +259,7 @@ export default {
this.error_message = "Lozinke se ne poklapaju!";
}
role = `/api/pharmacyAdmin`;
role = process.env.VUE_APP_API_URL + `/pharmacyAdmin`;
this.guessCoordinatesFromLocation();
if (errorFound == false) {
Expand Down
18 changes: 9 additions & 9 deletions src/main/ui/vue/src/components/PharmacyBasicInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export default {
if(userRole =="ROLE_PHARMACY_ADMIN" && d === undefined){
_this.axios
.get(`/api/pharmacyAdmin/` + _this.user, {
.get(process.env.VUE_APP_API_URL + `/pharmacyAdmin/` + _this.user, {
headers: {
Authorization: "Bearer " + localStorage.getItem('token'),
},
Expand All @@ -140,7 +140,7 @@ export default {
console.log(error);
});
}else{
this.axios.get(`/api/pharmacy/${this.$route.params.id}`, {
this.axios.get(process.env.VUE_APP_API_URL + `/pharmacy/${this.$route.params.id}`, {
headers: {Authorization: "Bearer " + localStorage.getItem('token')}
})
.then(response => {
Expand All @@ -151,7 +151,7 @@ export default {
}
if(userRole == "ROLE_PATIENT")
{
this.axios.get(`/api/patients/subscribedPharmacies/${this.user},`+parseInt(this.$route.params.id), {
this.axios.get( process.env.VUE_APP_API_URL + `/patients/subscribedPharmacies/${this.user},`+parseInt(this.$route.params.id), {
headers: {Authorization: "Bearer " + localStorage.getItem('token')}
})
.then(response=> {
Expand Down Expand Up @@ -182,7 +182,7 @@ export default {
getRatingOfUser() {
var patientEmail = JSON.parse(atob(localStorage.getItem('token').split(".")[1])).sub;
this.axios.get(`http://localhost:8080/api/patients/get_rating/${patientEmail}/${this.$route.params.id}/pharmacy`)
this.axios.get(process.env.VUE_APP_API_URL + `/patients/get_rating/${patientEmail}/${this.$route.params.id}/pharmacy`)
.then(response =>
this.rating = response.data
)
Expand All @@ -192,7 +192,7 @@ export default {
postRating(rating) {
this.rating = rating
console.log(this.rating);
this.axios.post('http://localhost:8080/api/patients/rating', {
this.axios.post(process.env.VUE_APP_API_URL + '/patients/rating', {
rateType: 0,
ratedEntityId: this.$route.params.id,
rating: this.rating,
Expand Down Expand Up @@ -243,7 +243,7 @@ export default {
this.showRatingAlert = false;
let _this = this;
this.axios
.post(`/api/patients/subscribe`, {
.post(process.env.VUE_APP_API_URL + `/patients/subscribe`, {
pharmacy: this.pharmacy,
user: this.user
},{
Expand All @@ -263,7 +263,7 @@ export default {
this.showRatingAlert = false;
let _this = this;
this.axios
.post(`/api/patients/unsubscribe`, {
.post(process.env.VUE_APP_API_URL + `/patients/unsubscribe`, {
pharmacy: this.pharmacy,
user: this.user
},{
Expand All @@ -286,7 +286,7 @@ export default {
},
findPharmacy(id){
var _this= this;
_this.axios.get(`/api/pharmacy/`+id, {
_this.axios.get(process.env.VUE_APP_API_URL + `/pharmacy/`+id, {
headers: {Authorization: "Bearer " + localStorage.getItem('token')}
})
.then(response => {
Expand All @@ -297,7 +297,7 @@ export default {
},
findRating(){
var _this= this;
_this.axios.get(`/api/pharmacy/rating/`+_this.idp, {
_this.axios.get(process.env.VUE_APP_API_URL + `/pharmacy/rating/`+_this.idp, {
headers: {Authorization: "Bearer " + localStorage.getItem('token')}
})
.then(response => {
Expand Down
4 changes: 2 additions & 2 deletions src/main/ui/vue/src/components/PharmacyFilter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export default {
}
if(this.rating != -1) {
await this.axios.get(`http://localhost:8080/api/pharmacy/filter/rating=${this.rating}&subscribed=${tempUsername}`, {
await this.axios.get(process.env.VUE_APP_API_URL + `/pharmacy/filter/rating=${this.rating}&subscribed=${tempUsername}`, {
headers: {Authorization: "Bearer " + localStorage.getItem('token')}
})
.then(response => {
Expand Down Expand Up @@ -153,7 +153,7 @@ export default {
var username = JSON.parse(
atob(localStorage.getItem('token').split(".")[1])
).sub;
await this.axios.get(`http://localhost:8080/api/patients/allSubscribed/${username}`)
await this.axios.get(process.env.VUE_APP_API_URL + `/patients/allSubscribed/${username}`)
.then(response => {
if(response.data.length === 0) {
this.showFailedAlert = true;
Expand Down
2 changes: 1 addition & 1 deletion src/main/ui/vue/src/components/PharmacyRegistration.vue
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export default {
if(errorFound==false && locationFound==true){
this.axios
.post(`/api/pharmacy`, {
.post(process.env.VUE_APP_API_URL + `/pharmacy`, {
name: this.name,
description: this.description,
address: {
Expand Down
14 changes: 7 additions & 7 deletions src/main/ui/vue/src/components/PharmacyTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export default defineComponent({
mounted(){
var self = this;
self.axios
.get(`/api/pharmacy/getAllWithAdmins`, {
.get(process.env.VUE_APP_API_URL + `/pharmacy/getAllWithAdmins`, {
headers: {
Authorization: "Bearer " + localStorage.getItem("token"),
},
Expand All @@ -170,7 +170,7 @@ export default defineComponent({
});
self.axios
.get(`/api/pharmacyAdmin/getUnemployedAdmins`, {
.get(process.env.VUE_APP_API_URL + `/pharmacyAdmin/getUnemployedAdmins`, {
headers: {
Authorization: "Bearer " + localStorage.getItem("token"),
},
Expand All @@ -186,7 +186,7 @@ export default defineComponent({
deletePharmacy(row){
var self = this;
self.axios
.get(`/api/pharmacy/delete/`+parseInt(row.item.id), {
.get(process.env.VUE_APP_API_URL + `/pharmacy/delete/`+parseInt(row.item.id), {
headers: {
Authorization: "Bearer " + localStorage.getItem("token"),
},
Expand Down Expand Up @@ -228,8 +228,8 @@ export default defineComponent({
console.log(this.fired);
this.axios
.post(
`/api/pharmacyAdmin/firePharmacyAdmin`,
.post(process.env.VUE_APP_API_URL +
`/pharmacyAdmin/firePharmacyAdmin`,
{
id: this.pharmacy.id,
name: this.pharmacy.name,
Expand Down Expand Up @@ -264,8 +264,8 @@ export default defineComponent({
setAdmins(){
var self = this;
this.axios
.post(
`/api/pharmacyAdmin/updatePharmacyToAdmin`,
.post(process.env.VUE_APP_API_URL+
`/pharmacyAdmin/updatePharmacyToAdmin`,
{
name: this.added.name,
email: this.added.email,
Expand Down
4 changes: 2 additions & 2 deletions src/main/ui/vue/src/components/PointsComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ export default defineComponent({
console.log(this.point);
if(this.point.points > 0){
this.axios
.post(
`/api/loyaltyProgram/updatePoints`,
.post(process.env.VUE_APP_API_URL+
`/loyaltyProgram/updatePoints`,
{
id: this.point.id,
points: this.point.points,
Expand Down
8 changes: 4 additions & 4 deletions src/main/ui/vue/src/components/PricelistAppointments.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export default {
).sub;
var self = this;
self.axios
.get(`/api/pharmacyAdmin/` + AdminUsername, {
.get(process.env.VUE_APP_API_URL + `/pharmacyAdmin/` + AdminUsername, {
headers: {
Authorization: "Bearer " + localStorage.getItem('token'),
},
Expand Down Expand Up @@ -156,8 +156,8 @@ export default {
},
check(){
var self = this;
self.axios.put(
`/api/pricelistItems/appointments/update/`+self.id,
self.axios.put(process.env.VUE_APP_API_URL+
`/pricelistItems/appointments/update/`+self.id,
{
price:[{
id :self.priceid,
Expand All @@ -178,7 +178,7 @@ export default {
refresh(){
var self = this;
self.axios
.get(`/api/pricelistItems/appointments/`+ self.pharmacyId, {
.get(process.env.VUE_APP_API_URL + `/pricelistItems/appointments/`+ self.pharmacyId, {
headers: {Authorization: "Bearer " + localStorage.getItem('token')}
})
.then(function (response) {
Expand Down
14 changes: 7 additions & 7 deletions src/main/ui/vue/src/components/PricelistTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export default {
).sub;
var self = this;
self.axios
.get(`/api/pharmacyAdmin/` + AdminUsername, {
.get(process.env.VUE_APP_API_URL + `/pharmacyAdmin/` + AdminUsername, {
headers: {
Authorization: "Bearer " + localStorage.getItem('token'),
},
Expand Down Expand Up @@ -267,8 +267,8 @@ export default {
},
check(){
var self = this;
self.axios.put(
`/api/pricelistItems/update/`+self.id,
self.axios.put(process.env.VUE_APP_API_URL+
`/pricelistItems/update/`+self.id,
{
price:[{
id :self.priceid,
Expand All @@ -289,7 +289,7 @@ export default {
refresh(){
var self = this;
self.axios
.get(`/api/pricelistItems/`+ self.pharmacyId, {
.get(process.env.VUE_APP_API_URL + `/pricelistItems/`+ self.pharmacyId, {
headers: {Authorization: "Bearer " + localStorage.getItem('token')}
})
.then(function (response) {
Expand Down Expand Up @@ -338,7 +338,7 @@ export default {
GetAllMedicamentItems() {
var self = this;
self.axios
.get(`/api/pharmacy/medicamentItems/` + parseInt(self.pharmacyId), {
.get(process.env.VUE_APP_API_URL + `/pharmacy/medicamentItems/` + parseInt(self.pharmacyId), {
headers: {
Authorization: "Bearer " + localStorage.getItem('token'),
},
Expand Down Expand Up @@ -366,8 +366,8 @@ export default {
if (idx != -1) {
this.medicamentss.splice(idx, 1);
var self = this;
self.axios.put(
`/api/pricelistItems/promotion/`+self.selected[0].medId+`/`+self.pharmacyId,
self.axios.put(process.env.VUE_APP_API_URL+
`/pricelistItems/promotion/`+self.selected[0].medId+`/`+self.pharmacyId,
{
price:[{
id :self.priceid,
Expand Down
4 changes: 2 additions & 2 deletions src/main/ui/vue/src/components/Profile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export default defineComponent({
var self = this;
self.role = userRole;
self.axios
.get(`/api/pharmacyAdmin/` + AdminUsername, {
.get(process.env.VUE_APP_API_URL + `/pharmacyAdmin/` + AdminUsername, {
headers: {
Authorization: "Bearer " + localStorage.getItem('token'),
},
Expand Down Expand Up @@ -195,7 +195,7 @@ export default defineComponent({
this.guessCoordinatesFromLocation();
var self = this;
if(self.role == "ROLE_PHARMACY_ADMIN"){
self.axios.put(`/api/pharmacyAdmin/updatePharmacyAdmin/` +
self.axios.put(process.env.VUE_APP_API_URL + `/pharmacyAdmin/updatePharmacyAdmin/` +
self.email,
{
email: self.email,
Expand Down
4 changes: 2 additions & 2 deletions src/main/ui/vue/src/components/QRCodeReader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default {
fileSelected(event){
this.username = JSON.parse(atob(localStorage.getItem("token").split(".")[1])).sub;
this.selectedFile = event.target.files[0].name;
this.axios.get(`http://localhost:8080/api/patients/uploadQRCode/${this.selectedFile},${this.username}`)
this.axios.get(process.env.VUE_APP_API_URL + `/patients/uploadQRCode/${this.selectedFile},${this.username}`)
.then(response =>
{
this.qrCodeItem = response.data
Expand All @@ -139,7 +139,7 @@ export default {
this.qrCodeItem.qrCode.patient = this.username;
console.log(this.qrCodeItem);
this.axios
.post(`http://localhost:8080/api/patients/addEPrescription`, {
.post(process.env.VUE_APP_API_URL + `/patients/addEPrescription`, {
pharmacy: row.item,
qrCode: this.qrCodeItem.qrCode
},{
Expand Down
8 changes: 4 additions & 4 deletions src/main/ui/vue/src/components/ReportAppointments.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
).sub;
var self = this;
self.axios
.get(`/api/pharmacyAdmin/` + AdminUsername, {
.get(process.env.VUE_APP_API_URL + `/pharmacyAdmin/` + AdminUsername, {
headers: {
Authorization: "Bearer " + localStorage.getItem('token'),
},
Expand Down Expand Up @@ -99,7 +99,7 @@
|| self.f =="July" || self.f =="August" || self.f =="September"|| self.f =="October" || self.f =="November"
|| self.f =="December"){
self.axios
.get(`/api/pharmacy/reportAppointments/` + parseInt(self.pharmacyId)+"/"+self.f+"/"+self.y, {
.get(process.env.VUE_APP_API_URL + `/pharmacy/reportAppointments/` + parseInt(self.pharmacyId)+"/"+self.f+"/"+self.y, {
headers: {
Authorization: "Bearer " + localStorage.getItem('token'),
},
Expand All @@ -117,7 +117,7 @@
}else if(self.f == "Year"){
self.axios
.get(`/api/pharmacy/reportAppointments1/` + parseInt(self.pharmacyId)+"/"+self.y, {
.get(process.env.VUE_APP_API_URL + `/pharmacy/reportAppointments1/` + parseInt(self.pharmacyId)+"/"+self.y, {
headers: {
Authorization: "Bearer " + localStorage.getItem('token'),
},
Expand All @@ -135,7 +135,7 @@
}else if(self.f == "Quarter"){
self.axios
.get(`/api/pharmacy/reportAppointments2/` + parseInt(self.pharmacyId)+"/"+self.y, {
.get(process.env.VUE_APP_API_URL + `/pharmacy/reportAppointments2/` + parseInt(self.pharmacyId)+"/"+self.y, {
headers: {
Authorization: "Bearer " + localStorage.getItem('token'),
},
Expand Down
Loading

0 comments on commit d3abbad

Please sign in to comment.