fixing call master

This commit is contained in:
Warunee Tamkoo 2024-12-20 17:43:17 +07:00
parent bd2212610c
commit 91408ca6b3

View file

@ -562,7 +562,7 @@ async function sendDataAbout() {
async function fetchProvince() {
showLoader();
await http
.get(config.API.province)
.get(config.API.orgProvince)
.then((res) => {
const data = res.data.result;
let option: DataOption[] = [];
@ -587,9 +587,9 @@ async function fetchDistrict(id: string | null) {
if (id !== null && id != "") {
showLoader();
await http
.get(config.API.listDistrict(id))
.get(config.API.orgProvince + `/${id}`)
.then((res) => {
const data = res.data.result;
const data = res.data.result.districts;
let option: DataOption[] = [];
data.map((r: any) => {
option.push({ id: r.id.toString(), name: r.name.toString() });
@ -613,9 +613,9 @@ async function fetchSubDistrict(id: string | null) {
if (id !== null && id != "") {
showLoader();
await http
.get(config.API.listSubDistrict(id))
.get(config.API.orgDistrict + `/${id}`)
.then((res) => {
const data = res.data.result;
const data = res.data.result.subDistricts;
let option: zipCodeOption[] = [];
data.map((r: any) => {
option.push({