Revert "Fix makeshift solution for changing cawangan"
This reverts commit 03fa84b143.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="mx-auto">
|
||||
<a v-if="route === 'ada'" class="text-yellow-200 rounded bg-gray-400 px-6 py-3 font-bold mr-4 uppercase sm:invisible lg:visible xl:visible">
|
||||
CAWANGAN :
|
||||
CAWANGAN :
|
||||
<select v-model="caw" @change="tukarcawangan" class="rounded-md border bg-gray-400 font-bold border-gray-400 focus:outline-none rounded-md focus:ring-1 ring-cyan-500 uppercase">
|
||||
<option v-for="(caw,i) in cawangan" :key="i" :value="caw.kodcaw">{{ caw.details_caw }}</option>
|
||||
</select>
|
||||
@@ -33,21 +33,17 @@
|
||||
},
|
||||
|
||||
created() {
|
||||
|
||||
this.caw = this.$kodcaw
|
||||
|
||||
this.caw = this.$kodcaw
|
||||
|
||||
this.axios.get('/api/check/cawangan').then(response => {
|
||||
this.cawangan = response.data;
|
||||
});
|
||||
|
||||
fetch('/api/check/cawangan')
|
||||
.then(response => response.json()).then(response => this.cawangan = response);
|
||||
|
||||
|
||||
},
|
||||
methods:{
|
||||
tukarcawangan: function(){
|
||||
|
||||
|
||||
this.setkodcaw(this.caw)
|
||||
// this.sethostname(this.caw)
|
||||
this.pembahagiancawangan(this.caw)
|
||||
@@ -70,8 +66,8 @@
|
||||
}
|
||||
|
||||
return namcaw;
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
pembahagiancawangan: function(cawangannama){
|
||||
switch (cawangannama) {
|
||||
@@ -89,7 +85,7 @@
|
||||
case 'JLI':
|
||||
case 'ARP':
|
||||
case '020303':{
|
||||
this.sethostname('http://192.168.0.27:8083')
|
||||
this.sethostname('http://api.arrahn')
|
||||
break;
|
||||
}
|
||||
case '010621':
|
||||
@@ -103,9 +99,9 @@
|
||||
case '011013':
|
||||
case '011412':{
|
||||
// this.$hostname = 'http://api2.arrahn'
|
||||
this.sethostname('http://192.168.0.27:8083')
|
||||
this.sethostname('http://api2.arrahn')
|
||||
break;
|
||||
}
|
||||
}
|
||||
case '011229':
|
||||
case '011230':
|
||||
case '011227':
|
||||
@@ -116,10 +112,10 @@
|
||||
case '011237':
|
||||
case '011233':{
|
||||
// this.$hostname = 'http://api3.arrahn'
|
||||
this.sethostname('http://192.168.0.27:8083')
|
||||
this.sethostname('http://api2.arrahn')
|
||||
break;
|
||||
}
|
||||
default: this.sethostname('http://192.168.0.27:8083')
|
||||
default: this.sethostname('http://api.arrahn')
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user