Portofolio
Add: - ervice/api-client/api-portofolio.ts - creens/Portofolio/BoxPortofolioView.tsx - screens/Portofolio/ButtonCreatePortofolio.tsx - create dan show ### No Issue
This commit is contained in:
20
service/api-client/api-master.ts
Normal file
20
service/api-client/api-master.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
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 response = await apiConfig.get(`/master/sub-bidang-bisnis/${id}`);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
33
service/api-client/api-portofolio.ts
Normal file
33
service/api-client/api-portofolio.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import { apiConfig } from "../api-config";
|
||||
|
||||
export async function apiPortofolioCreate({ data }: { data: any }) {
|
||||
try {
|
||||
const response = await apiConfig.post(`/mobile/portofolio`, {
|
||||
data: data,
|
||||
});
|
||||
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
export async function apiGetPortofolio({ id }: { id: string }) {
|
||||
try {
|
||||
const response = await apiConfig.get(`/mobile/portofolio?id=${id}`);
|
||||
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
export async function apiGetOnePortofolio({ id }: { id: string }) {
|
||||
try {
|
||||
const response = await apiConfig.get(`/mobile/portofolio/${id}`);
|
||||
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user