Fix: - modified: app/(application)/(user)/event/[id]/publish.tsx - modified: app/(application)/(user)/event/create.tsx - modified: app/(application)/(user)/portofolio/[id]/create.tsx - modified: app/(application)/(user)/portofolio/[id]/edit.tsx - modified: app/(application)/admin/collaboration/[id]/group.tsx - modified: app/(application)/admin/collaboration/group.tsx - modified: app/(application)/admin/collaboration/publish.tsx - modified: app/(application)/admin/forum/[id]/list-report-comment.tsx - modified: app/(application)/admin/forum/[id]/list-report-posting.tsx - modified: app/(application)/admin/forum/posting.tsx - modified: app/(application)/admin/forum/report-comment.tsx - modified: app/(application)/admin/forum/report-posting.tsx - modified: app/(application)/admin/voting/[status]/status.tsx - modified: app/(application)/admin/voting/history.tsx - modified: components/Select/SelectCustom.tsx - modified: components/_ShareComponent/GridSpan_4_8.tsx - modified: screens/Authentication/LoginView.tsx - modified: screens/Collaboration/BoxPublishSection.tsx - modified: screens/Event/BoxDetailPublishSection.tsx - modified: screens/Home/topFeatureSection.tsx - modified: screens/Portofolio/ButtonCreatePortofolio.tsx Add: - app/(application)/admin/app-information/business-field/[id]/bidang-update.tsx - app/(application)/admin/app-information/business-field/[id]/sub-bidang-update.tsx ### No Issue
243 lines
4.9 KiB
TypeScript
243 lines
4.9 KiB
TypeScript
import { apiConfig } from "../api-config";
|
|
|
|
// ================== START MASTER BANK ================== //
|
|
export async function apiAdminMasterBank() {
|
|
try {
|
|
const response = await apiConfig.get(`/mobile/admin/master/bank`);
|
|
return response.data;
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|
|
|
|
export async function apiAdminMasterBankById({ id }: { id: string }) {
|
|
try {
|
|
const response = await apiConfig.get(`/mobile/admin/master/bank/${id}`);
|
|
return response.data;
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|
|
|
|
export async function apiAdminMasterBankUpdate({
|
|
id,
|
|
data,
|
|
}: {
|
|
id: string;
|
|
data: any;
|
|
}) {
|
|
try {
|
|
const response = await apiConfig.put(`/mobile/admin/master/bank/${id}`, {
|
|
data: data,
|
|
});
|
|
return response.data;
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|
|
|
|
export async function apiAdminMasterBankCreate({ data }: { data: any }) {
|
|
try {
|
|
const response = await apiConfig.post(`/mobile/admin/master/bank`, {
|
|
data: data,
|
|
});
|
|
return response.data;
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|
|
|
|
// ================== END MASTER BANK ================== //
|
|
|
|
// ================== START BUSINNES FIELD ================== //
|
|
|
|
export async function apiAdminMasterBusinessField() {
|
|
try {
|
|
const response = await apiConfig.get(`/mobile/admin/master/business-field`);
|
|
return response.data;
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|
|
|
|
export async function apiAdminMasterBusinessFieldById({
|
|
id,
|
|
subBidangId,
|
|
category,
|
|
}: {
|
|
id: string;
|
|
subBidangId?: string | null;
|
|
category: "bidang" | "sub-bidang" | "all";
|
|
}) {
|
|
const queryCategory = category ? `?category=${category}` : "";
|
|
const querySubBidang = subBidangId ? `&subBidangId=${subBidangId}` : "";
|
|
try {
|
|
const response = await apiConfig.get(
|
|
`/mobile/admin/master/business-field/${id}${queryCategory}${querySubBidang}`
|
|
);
|
|
return response.data;
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|
|
|
|
export async function apiAdminMasterBusinessFieldUpdate({
|
|
id,
|
|
data,
|
|
category,
|
|
}: {
|
|
id: string;
|
|
data: any;
|
|
category: "bidang" | "sub-bidang";
|
|
}) {
|
|
try {
|
|
const response = await apiConfig.put(
|
|
`/mobile/admin/master/business-field/${id}?category=${category}`,
|
|
{
|
|
data: data,
|
|
}
|
|
);
|
|
return response.data;
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|
|
|
|
export async function apiAdminMasterBusinessFieldCreate({
|
|
data,
|
|
}: {
|
|
data: any;
|
|
}) {
|
|
try {
|
|
const response = await apiConfig.post(
|
|
`/mobile/admin/master/business-field`,
|
|
{
|
|
data: data,
|
|
}
|
|
);
|
|
return response.data;
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|
|
|
|
// ================== END BUSINNES FIELD ================== //
|
|
|
|
// ================== START EVENT ================== //
|
|
export async function apiAdminMasterTypeOfEvent() {
|
|
try {
|
|
const response = await apiConfig.get(`/mobile/admin/master/type-of-event`);
|
|
return response.data;
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|
|
|
|
export async function apiEventCreateTypeOfEvent({ data }: { data: string }) {
|
|
try {
|
|
const response = await apiConfig.post(
|
|
`/mobile/admin/master/type-of-event`,
|
|
{
|
|
data: data,
|
|
}
|
|
);
|
|
return response.data;
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|
|
|
|
export async function apiAdminMasterTypeOfEventGetOne({ id }: { id: string }) {
|
|
try {
|
|
const response = await apiConfig.get(
|
|
`/mobile/admin/master/type-of-event/${id}`
|
|
);
|
|
return response.data;
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|
|
|
|
export async function apiAdminMasterTypeOfEventUpdate({
|
|
id,
|
|
data,
|
|
}: {
|
|
id: string;
|
|
data: any;
|
|
}) {
|
|
try {
|
|
const response = await apiConfig.put(
|
|
`/mobile/admin/master/type-of-event/${id}`,
|
|
{
|
|
data: data,
|
|
}
|
|
);
|
|
return response.data;
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|
|
|
|
// ================== END EVENT ================== //
|
|
|
|
// ================== START DONATION ================== //
|
|
|
|
export async function apiAdminMasterDonationCategory() {
|
|
try {
|
|
const response = await apiConfig.get(`/mobile/admin/master/donation`);
|
|
return response.data;
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|
|
|
|
export async function apiAdminMasterDonationCategoryById({
|
|
id,
|
|
}: {
|
|
id: string;
|
|
}) {
|
|
try {
|
|
const response = await apiConfig.get(`/mobile/admin/master/donation/${id}`);
|
|
return response.data;
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|
|
|
|
export async function apiAdminMasterDonationCategoryUpdate({
|
|
id,
|
|
data,
|
|
}: {
|
|
id: string;
|
|
data: any;
|
|
}) {
|
|
try {
|
|
const response = await apiConfig.put(
|
|
`/mobile/admin/master/donation/${id}`,
|
|
{
|
|
data: data,
|
|
}
|
|
);
|
|
return response.data;
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|
|
|
|
export async function apiAdminMasterDonationCategoryCreate({
|
|
data,
|
|
}: {
|
|
data: any;
|
|
}) {
|
|
try {
|
|
const response = await apiConfig.post(`/mobile/admin/master/donation`, {
|
|
data: data,
|
|
});
|
|
return response.data;
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|
|
|
|
// ================== END DONATION ================== //
|