Compare commits

..

22 Commits

Author SHA1 Message Date
Giovanni Gabriel Septriadi a314a62f1f Merge branch 'development' into 'production'
Development

See merge request mbugroup/lti-web-client!484
2026-05-19 06:48:45 +00:00
Giovanni Gabriel Septriadi 2bf5f36a77 Merge branch 'development' into 'production'
Development

See merge request mbugroup/lti-web-client!474
2026-05-12 09:31:27 +00:00
Giovanni Gabriel Septriadi 989e30fbed Merge branch 'development' into 'production'
Development

See merge request mbugroup/lti-web-client!468
2026-05-11 08:32:23 +00:00
Adnan Zahir 40139cd636 Merge branch 'development' into 'production'
Development

See merge request mbugroup/lti-web-client!456
2026-05-05 14:12:28 +07:00
Adnan Zahir 8c03f10043 Merge branch 'development' into 'production'
Development

See merge request mbugroup/lti-web-client!454
2026-05-02 13:43:29 +07:00
Adnan Zahir 89a6e51b48 Merge branch 'development' into 'production'
Revert "fixing devops"

See merge request mbugroup/lti-web-client!449
2026-04-30 09:54:39 +07:00
Adnan Zahir f6727dc4dc Merge branch 'development' into 'production'
Development

See merge request mbugroup/lti-web-client!446
2026-04-29 12:53:07 +07:00
Adnan Zahir 1284b22345 Merge branch 'development' into 'production'
Development

See merge request mbugroup/lti-web-client!441
2026-04-28 13:43:32 +07:00
Adnan Zahir f73ea182ae Merge branch 'development' into 'production'
Development

See merge request mbugroup/lti-web-client!435
2026-04-26 00:13:15 +07:00
Adnan Zahir 047266b6d8 Merge branch 'development' into 'production'
Development

See merge request mbugroup/lti-web-client!432
2026-04-25 14:46:53 +07:00
Adnan Zahir 6b95edfb72 Merge branch 'development' into 'production'
Development

See merge request mbugroup/lti-web-client!427
2026-04-23 12:38:36 +07:00
Adnan Zahir 4b62b02a13 Merge branch 'development' into 'production'
Development

See merge request mbugroup/lti-web-client!420
2026-04-22 13:12:50 +07:00
Adnan Zahir 12a50c6100 Merge branch 'development' into 'production'
Development

See merge request mbugroup/lti-web-client!410
2026-04-20 08:24:51 +07:00
Adnan Zahir 09537d84d0 Merge branch 'development' into 'production'
Development

See merge request mbugroup/lti-web-client!407
2026-04-18 09:41:09 +07:00
Adnan Zahir 1aa2ca9b31 Merge branch 'development' into 'production'
refactor(FE-add-param): Update MarketingFilter to refine API calls and

See merge request mbugroup/lti-web-client!400
2026-04-14 13:20:27 +07:00
Adnan Zahir c87107b4ee Merge branch 'development' into 'production'
refactor(FE-load-more-option): Add infinite scroll to location and

See merge request mbugroup/lti-web-client!396
2026-04-13 14:08:57 +07:00
Adnan Zahir 55b13988bf Merge branch 'development' into 'production'
Development

See merge request mbugroup/lti-web-client!393
2026-04-13 11:17:24 +07:00
Adnan Zahir 19033278b3 Merge branch 'development' into 'production'
Development

See merge request mbugroup/lti-web-client!388
2026-04-11 14:13:02 +07:00
Adnan Zahir 4a6ac8a57d Merge branch 'development' into 'production'
Development

See merge request mbugroup/lti-web-client!382
2026-04-09 15:36:40 +07:00
Adnan Zahir 2b9847e1a9 Merge branch 'development' into 'production'
Development

See merge request mbugroup/lti-web-client!378
2026-04-08 13:39:17 +07:00
Adnan Zahir 167769a711 Merge branch 'development' into 'production'
Development

See merge request mbugroup/lti-web-client!375
2026-04-07 22:56:27 +07:00
Adnan Zahir 417dbba458 Merge branch 'development' into 'production'
Development

See merge request mbugroup/lti-web-client!373
2026-04-07 16:53:36 +07:00
4 changed files with 5 additions and 97 deletions
-3
View File
@@ -48,6 +48,3 @@ next-env.d.ts
# rtk
rtk.exe
# local specs
/local-specs
@@ -77,10 +77,7 @@ const DebtSupplierTab = ({ tabId }: DebtSupplierTabProps) => {
// ===== STATE MANAGEMENT =====
const [isPdfExportLoading, setIsPdfExportLoading] = useState(false);
const [isExcelExportLoading, setIsExcelExportLoading] = useState(false);
const [isExcelGeneralExportLoading, setIsExcelGeneralExportLoading] =
useState(false);
const isAnyExportLoading =
isPdfExportLoading || isExcelExportLoading || isExcelGeneralExportLoading;
const isAnyExportLoading = isPdfExportLoading || isExcelExportLoading;
// ===== PAGINATION STATE =====
const [currentPage, setCurrentPage] = useState(1);
@@ -311,23 +308,6 @@ const DebtSupplierTab = ({ tabId }: DebtSupplierTabProps) => {
formik.values.endDate,
]);
const handleExportExcelGeneral = useCallback(async () => {
setIsExcelGeneralExportLoading(true);
try {
await DebtSupplierApi.exportToExcelGeneral(
filterParams.supplier_ids,
filterParams.filter_by,
filterParams.start_date,
filterParams.end_date
);
toast.success('Excel General berhasil dibuat dan diunduh.');
} catch {
toast.error('Gagal membuat Excel General. Silakan coba lagi.');
} finally {
setIsExcelGeneralExportLoading(false);
}
}, [filterParams]);
// ===== TAB ACTIONS COMPONENT =====
const TabActions = useMemo(() => {
return function TabActionsComponent() {
@@ -390,17 +370,7 @@ const DebtSupplierTab = ({ tabId }: DebtSupplierTabProps) => {
className='w-full p-3 justify-start text-sm text-base-content/50 font-semibold text-nowrap'
>
<Icon icon='heroicons:table-cells' width={20} height={20} />
Export to Excel - Supplier Per Sheet
</Button>
<Button
variant='ghost'
color='none'
onClick={handleExportExcelGeneral}
isLoading={isExcelGeneralExportLoading}
className='w-full p-3 justify-start text-sm text-base-content/50 font-semibold text-nowrap'
>
<Icon icon='heroicons:table-cells' width={20} height={20} />
Export to Excel - General
Export to Excel
</Button>
<Button
variant='ghost'
@@ -430,10 +400,8 @@ const DebtSupplierTab = ({ tabId }: DebtSupplierTabProps) => {
filterParams,
isAnyExportLoading,
handleExportExcel,
handleExportExcelGeneral,
handleExportPdf,
isExcelExportLoading,
isExcelGeneralExportLoading,
isPdfExportLoading,
]);
@@ -184,11 +184,6 @@ export function DailyChecklistContent() {
const [emptyKandangEndDateError, setEmptyKandangEndDateError] =
useState<string>('');
const [preloadedKandang, setPreloadedKandang] = useState<{
id: string;
name: string;
} | null>(null);
const [existingDocuments, setExistingDocuments] = useState<Document[]>([]);
const [documents, setDocuments] = useState<File[]>([]);
const [deletedDocumentIds, setDeletedDocumentIds] = useState<number[]>([]);
@@ -233,11 +228,7 @@ export function DailyChecklistContent() {
const rawDate = data.date || '';
setDate(rawDate.length > 10 ? rawDate.slice(0, 10) : rawDate);
skipKandangClearRef.current = true;
const loadedKandangId = String(data.kandang?.id || '');
setKandangId(loadedKandangId);
if (data.kandang?.name) {
setPreloadedKandang({ id: loadedKandangId, name: data.kandang.name });
}
setKandangId(String(data.kandang?.id || ''));
const isEmptyKandang =
!!data.empty_kandang || data.category === 'empty_kandang';
@@ -1171,17 +1162,9 @@ export function DailyChecklistContent() {
<SelectValue placeholder='Pilih kandang' />
</SelectTrigger>
<SelectContent onScroll={handleKandangScroll}>
{preloadedKandang &&
!kandangOptions.some(
(k) => String(k.value) === preloadedKandang.id
) && (
<SelectItem value={preloadedKandang.id}>
{preloadedKandang.name}
</SelectItem>
)}
{kandangOptions.map((kandang, kandangIdx) => (
{kandangOptions.map((kandang) => (
<SelectItem
key={`${kandang.value}-${kandangIdx}`}
key={kandang.value}
value={String(kandang.value)}
>
{kandang.label}
-40
View File
@@ -1,6 +1,4 @@
import { BaseApiService } from '@/services/api/base';
import { httpClient } from '@/services/http/client';
import { formatDate } from '@/lib/helper';
import { BaseApiResponse } from '@/types/api/api-general';
import { DebtSupplier } from '@/types/api/report/debt-supplier';
@@ -13,44 +11,6 @@ export class DebtSupplierApiService extends BaseApiService<
super(basePath);
}
async exportToExcelGeneral(
supplier_ids?: string,
filter_by?: string,
start_date?: string,
end_date?: string
) {
const params = new URLSearchParams();
if (supplier_ids) params.set('supplier_ids', supplier_ids);
if (filter_by) params.set('filter_by', filter_by);
if (start_date) params.set('start_date', start_date);
if (end_date) params.set('end_date', end_date);
params.set('export', 'excel-all');
params.set('page', '1');
params.set('limit', '99999999999');
const queryString = `?${params.toString()}`;
const res = await httpClient<Blob>(
`${this.basePath.replace(/\/$/, '')}/debt-supplier${queryString}`,
{
method: 'GET',
responseType: 'blob',
}
);
const url = window.URL.createObjectURL(new Blob([res]));
const link = document.createElement('a');
link.href = url;
const fileName = `laporan-hutang-supplier-general-${formatDate(Date.now(), 'DD-MM-YYYY')}.xlsx`;
link.setAttribute('download', fileName);
document.body.appendChild(link);
link.click();
link.remove();
}
async getDebtSupplierReport(
supplier_ids?: string,
filter_by?: string,