Add: - api-client/api-event : fetch get one, update data, update status, create event Fix: - UI : create , detail dan status: untuk menyambungkan ke API ### No Issue
31 lines
728 B
TypeScript
31 lines
728 B
TypeScript
import { apiConfig } from "../api-config";
|
|
|
|
export async function apiMasterBidangBisnis() {
|
|
try {
|
|
const response = await apiConfig.get(`/master/bidang-bisnis`);
|
|
return response.data;
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|
|
|
|
export async function apiMasterSubBidangBisnis({ id }: { id?: string }) {
|
|
try {
|
|
const selectBidangId = id ? `/${id}` : "";
|
|
const response = await apiConfig.get(
|
|
`/master/sub-bidang-bisnis${selectBidangId}`
|
|
);
|
|
return response.data;
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|
|
|
|
export async function apiMasterEventType() {
|
|
try {
|
|
const response = await apiConfig.get(`/mobile/master/event-type`);
|
|
return response.data;
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
} |