|
|
|
@@ -105,7 +105,7 @@ function canHandleExpiryItem(item: ExpiryItemResult): boolean { |
|
|
|
return d != null && !d.isAfter(dayjs(), "day"); |
|
|
|
} |
|
|
|
|
|
|
|
/** FP-MTMS Version Checklist | Functions Ref. No. 74 | v1.0.1 | 2026-09-07 */ |
|
|
|
/** FP-MTMS Version Checklist | Functions Ref. No. 74 | v1.0.2 | 2026-09-07 */ |
|
|
|
const ExpiryHandleTab: React.FC = () => { |
|
|
|
const BATCH_CHUNK_SIZE = 20; |
|
|
|
const { t } = useTranslation("stockIssue"); |
|
|
|
@@ -316,7 +316,7 @@ const ExpiryHandleTab: React.FC = () => { |
|
|
|
|
|
|
|
const handleExportExcel = useCallback( |
|
|
|
async (mode: "filtered" | "all") => { |
|
|
|
if (mode === "filtered" && !hasSearched) return; |
|
|
|
if (!hasSearched) return; |
|
|
|
if (exportInFlightRef.current) return; |
|
|
|
exportInFlightRef.current = true; |
|
|
|
setExporting(mode); |
|
|
|
@@ -325,7 +325,6 @@ const ExpiryHandleTab: React.FC = () => { |
|
|
|
mode === "all" |
|
|
|
? { |
|
|
|
daysAhead, |
|
|
|
bucket: resultTab, |
|
|
|
} |
|
|
|
: { |
|
|
|
...lastFilters, |
|
|
|
@@ -381,7 +380,7 @@ const ExpiryHandleTab: React.FC = () => { |
|
|
|
variant="outlined" |
|
|
|
startIcon={<FileDownload />} |
|
|
|
onClick={() => handleExportExcel("all")} |
|
|
|
disabled={exporting != null} |
|
|
|
disabled={!hasSearched || exporting != null} |
|
|
|
> |
|
|
|
{exporting === "all" ? t("Exporting...") : t("Export all in tab")} |
|
|
|
</Button> |
|
|
|
|